@coralai/sps-cli 0.51.3 → 0.51.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README-CN.md +386 -924
- package/README.md +388 -1331
- package/dist/console/index.d.ts.map +1 -1
- package/dist/console/index.js +2 -0
- package/dist/console/index.js.map +1 -1
- package/dist/console/routes/chat.d.ts.map +1 -1
- package/dist/console/routes/chat.js +12 -3
- package/dist/console/routes/chat.js.map +1 -1
- package/dist/console/routes/fs.d.ts +3 -0
- package/dist/console/routes/fs.d.ts.map +1 -0
- package/dist/console/routes/fs.js +126 -0
- package/dist/console/routes/fs.js.map +1 -0
- package/dist/console-assets/assets/index-BGNm2VZT.css +10 -0
- package/dist/console-assets/assets/index-bWzFqJKq.js +531 -0
- package/dist/console-assets/index.html +2 -2
- package/dist/services/ChatService.d.ts +9 -0
- package/dist/services/ChatService.d.ts.map +1 -1
- package/dist/services/ChatService.js +30 -0
- package/dist/services/ChatService.js.map +1 -1
- package/package.json +1 -1
- package/dist/console-assets/assets/index-DRhdpvew.css +0 -10
- package/dist/console-assets/assets/index-WUGCBcyb.js +0 -516
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
var Uk=Object.defineProperty;var uv=e=>{throw TypeError(e)};var $k=(e,t,n)=>t in e?Uk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fv=(e,t,n)=>$k(e,typeof t!="symbol"?t+"":t,n),am=(e,t,n)=>t.has(e)||uv("Cannot "+n);var z=(e,t,n)=>(am(e,t,"read from private field"),n?n.call(e):t.get(e)),Te=(e,t,n)=>t.has(e)?uv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),be=(e,t,n,a)=>(am(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),Fe=(e,t,n)=>(am(e,t,"access private method"),n);var qu=(e,t,n,a)=>({set _(s){be(e,t,s,n)},get _(){return z(e,t,a)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Ap(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rm={exports:{}},Fo={};/**
|
|
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 dv;function Fk(){if(dv)return Fo;dv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var f in s)f!=="key"&&(o[f]=s[f])}else o=s;return s=o.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:o}}return Fo.Fragment=t,Fo.jsx=n,Fo.jsxs=n,Fo}var hv;function Pk(){return hv||(hv=1,rm.exports=Fk()),rm.exports}var h=Pk(),sm={exports:{}},Ie={};/**
|
|
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 mv;function qk(){if(mv)return Ie;mv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function v(L){return L===null||typeof L!="object"?null:(L=x&&L[x]||L["@@iterator"],typeof L=="function"?L:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(L,Z,C){this.props=L,this.context=Z,this.refs=k,this.updater=C||S}_.prototype.isReactComponent={},_.prototype.setState=function(L,Z){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,Z,"setState")},_.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function A(){}A.prototype=_.prototype;function T(L,Z,C){this.props=L,this.context=Z,this.refs=k,this.updater=C||S}var j=T.prototype=new A;j.constructor=T,w(j,_.prototype),j.isPureReactComponent=!0;var F=Array.isArray;function M(){}var q={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function te(L,Z,C){var pe=C.ref;return{$$typeof:e,type:L,key:Z,ref:pe!==void 0?pe:null,props:C}}function D(L,Z){return te(L.type,Z,L.props)}function P(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function J(L){var Z={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(C){return Z[C]})}var re=/\/+/g;function Q(L,Z){return typeof L=="object"&&L!==null&&L.key!=null?J(""+L.key):Z.toString(36)}function Y(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(M,M):(L.status="pending",L.then(function(Z){L.status==="pending"&&(L.status="fulfilled",L.value=Z)},function(Z){L.status==="pending"&&(L.status="rejected",L.reason=Z)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function U(L,Z,C,pe,_e){var ve=typeof L;(ve==="undefined"||ve==="boolean")&&(L=null);var ce=!1;if(L===null)ce=!0;else switch(ve){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(L.$$typeof){case e:case t:ce=!0;break;case y:return ce=L._init,U(ce(L._payload),Z,C,pe,_e)}}if(ce)return _e=_e(L),ce=pe===""?"."+Q(L,0):pe,F(_e)?(C="",ce!=null&&(C=ce.replace(re,"$&/")+"/"),U(_e,Z,C,"",function(Dt){return Dt})):_e!=null&&(P(_e)&&(_e=D(_e,C+(_e.key==null||L&&L.key===_e.key?"":(""+_e.key).replace(re,"$&/")+"/")+ce)),Z.push(_e)),1;ce=0;var ke=pe===""?".":pe+":";if(F(L))for(var Ke=0;Ke<L.length;Ke++)pe=L[Ke],ve=ke+Q(pe,Ke),ce+=U(pe,Z,C,ve,_e);else if(Ke=v(L),typeof Ke=="function")for(L=Ke.call(L),Ke=0;!(pe=L.next()).done;)pe=pe.value,ve=ke+Q(pe,Ke++),ce+=U(pe,Z,C,ve,_e);else if(ve==="object"){if(typeof L.then=="function")return U(Y(L),Z,C,pe,_e);throw Z=String(L),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return ce}function ae(L,Z,C){if(L==null)return L;var pe=[],_e=0;return U(L,pe,"","",function(ve){return Z.call(C,ve,_e++)}),pe}function G(L){if(L._status===-1){var Z=L._result;Z=Z(),Z.then(function(C){(L._status===0||L._status===-1)&&(L._status=1,L._result=C)},function(C){(L._status===0||L._status===-1)&&(L._status=2,L._result=C)}),L._status===-1&&(L._status=0,L._result=Z)}if(L._status===1)return L._result.default;throw L._result}var he=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},O={map:ae,forEach:function(L,Z,C){ae(L,function(){Z.apply(this,arguments)},C)},count:function(L){var Z=0;return ae(L,function(){Z++}),Z},toArray:function(L){return ae(L,function(Z){return Z})||[]},only:function(L){if(!P(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Ie.Activity=g,Ie.Children=O,Ie.Component=_,Ie.Fragment=n,Ie.Profiler=s,Ie.PureComponent=T,Ie.StrictMode=a,Ie.Suspense=d,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(L){return q.H.useMemoCache(L)}},Ie.cache=function(L){return function(){return L.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(L,Z,C){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var pe=w({},L.props),_e=L.key;if(Z!=null)for(ve in Z.key!==void 0&&(_e=""+Z.key),Z)!K.call(Z,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&Z.ref===void 0||(pe[ve]=Z[ve]);var ve=arguments.length-2;if(ve===1)pe.children=C;else if(1<ve){for(var ce=Array(ve),ke=0;ke<ve;ke++)ce[ke]=arguments[ke+2];pe.children=ce}return te(L.type,_e,pe)},Ie.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},Ie.createElement=function(L,Z,C){var pe,_e={},ve=null;if(Z!=null)for(pe in Z.key!==void 0&&(ve=""+Z.key),Z)K.call(Z,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(_e[pe]=Z[pe]);var ce=arguments.length-2;if(ce===1)_e.children=C;else if(1<ce){for(var ke=Array(ce),Ke=0;Ke<ce;Ke++)ke[Ke]=arguments[Ke+2];_e.children=ke}if(L&&L.defaultProps)for(pe in ce=L.defaultProps,ce)_e[pe]===void 0&&(_e[pe]=ce[pe]);return te(L,ve,_e)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(L){return{$$typeof:f,render:L}},Ie.isValidElement=P,Ie.lazy=function(L){return{$$typeof:y,_payload:{_status:-1,_result:L},_init:G}},Ie.memo=function(L,Z){return{$$typeof:m,type:L,compare:Z===void 0?null:Z}},Ie.startTransition=function(L){var Z=q.T,C={};q.T=C;try{var pe=L(),_e=q.S;_e!==null&&_e(C,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(M,he)}catch(ve){he(ve)}finally{Z!==null&&C.types!==null&&(Z.types=C.types),q.T=Z}},Ie.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},Ie.use=function(L){return q.H.use(L)},Ie.useActionState=function(L,Z,C){return q.H.useActionState(L,Z,C)},Ie.useCallback=function(L,Z){return q.H.useCallback(L,Z)},Ie.useContext=function(L){return q.H.useContext(L)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(L,Z){return q.H.useDeferredValue(L,Z)},Ie.useEffect=function(L,Z){return q.H.useEffect(L,Z)},Ie.useEffectEvent=function(L){return q.H.useEffectEvent(L)},Ie.useId=function(){return q.H.useId()},Ie.useImperativeHandle=function(L,Z,C){return q.H.useImperativeHandle(L,Z,C)},Ie.useInsertionEffect=function(L,Z){return q.H.useInsertionEffect(L,Z)},Ie.useLayoutEffect=function(L,Z){return q.H.useLayoutEffect(L,Z)},Ie.useMemo=function(L,Z){return q.H.useMemo(L,Z)},Ie.useOptimistic=function(L,Z){return q.H.useOptimistic(L,Z)},Ie.useReducer=function(L,Z,C){return q.H.useReducer(L,Z,C)},Ie.useRef=function(L){return q.H.useRef(L)},Ie.useState=function(L){return q.H.useState(L)},Ie.useSyncExternalStore=function(L,Z,C){return q.H.useSyncExternalStore(L,Z,C)},Ie.useTransition=function(){return q.H.useTransition()},Ie.version="19.2.5",Ie}var pv;function Op(){return pv||(pv=1,sm.exports=qk()),sm.exports}var R=Op(),lm={exports:{}},Po={},om={exports:{}},cm={};/**
|
|
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 gv;function Hk(){return gv||(gv=1,(function(e){function t(U,ae){var G=U.length;U.push(ae);e:for(;0<G;){var he=G-1>>>1,O=U[he];if(0<s(O,ae))U[he]=ae,U[G]=O,G=he;else break e}}function n(U){return U.length===0?null:U[0]}function a(U){if(U.length===0)return null;var ae=U[0],G=U.pop();if(G!==ae){U[0]=G;e:for(var he=0,O=U.length,L=O>>>1;he<L;){var Z=2*(he+1)-1,C=U[Z],pe=Z+1,_e=U[pe];if(0>s(C,G))pe<O&&0>s(_e,C)?(U[he]=_e,U[pe]=G,he=pe):(U[he]=C,U[Z]=G,he=Z);else if(pe<O&&0>s(_e,G))U[he]=_e,U[pe]=G,he=pe;else break e}}return ae}function s(U,ae){var G=U.sortIndex-ae.sortIndex;return G!==0?G:U.id-ae.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],m=[],y=1,g=null,x=3,v=!1,S=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function j(U){for(var ae=n(m);ae!==null;){if(ae.callback===null)a(m);else if(ae.startTime<=U)a(m),ae.sortIndex=ae.expirationTime,t(d,ae);else break;ae=n(m)}}function F(U){if(w=!1,j(U),!S)if(n(d)!==null)S=!0,M||(M=!0,J());else{var ae=n(m);ae!==null&&Y(F,ae.startTime-U)}}var M=!1,q=-1,K=5,te=-1;function D(){return k?!0:!(e.unstable_now()-te<K)}function P(){if(k=!1,M){var U=e.unstable_now();te=U;var ae=!0;try{e:{S=!1,w&&(w=!1,A(q),q=-1),v=!0;var G=x;try{t:{for(j(U),g=n(d);g!==null&&!(g.expirationTime>U&&D());){var he=g.callback;if(typeof he=="function"){g.callback=null,x=g.priorityLevel;var O=he(g.expirationTime<=U);if(U=e.unstable_now(),typeof O=="function"){g.callback=O,j(U),ae=!0;break t}g===n(d)&&a(d),j(U)}else a(d);g=n(d)}if(g!==null)ae=!0;else{var L=n(m);L!==null&&Y(F,L.startTime-U),ae=!1}}break e}finally{g=null,x=G,v=!1}ae=void 0}}finally{ae?J():M=!1}}}var J;if(typeof T=="function")J=function(){T(P)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,Q=re.port2;re.port1.onmessage=P,J=function(){Q.postMessage(null)}}else J=function(){_(P,0)};function Y(U,ae){q=_(function(){U(e.unstable_now())},ae)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(U){U.callback=null},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(U){switch(x){case 1:case 2:case 3:var ae=3;break;default:ae=x}var G=x;x=ae;try{return U()}finally{x=G}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(U,ae){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var G=x;x=U;try{return ae()}finally{x=G}},e.unstable_scheduleCallback=function(U,ae,G){var he=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?he+G:he):G=he,U){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=G+O,U={id:y++,callback:ae,priorityLevel:U,startTime:G,expirationTime:O,sortIndex:-1},G>he?(U.sortIndex=G,t(m,U),n(d)===null&&U===n(m)&&(w?(A(q),q=-1):w=!0,Y(F,G-he))):(U.sortIndex=O,t(d,U),S||v||(S=!0,M||(M=!0,J()))),U},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(U){var ae=x;return function(){var G=x;x=ae;try{return U.apply(this,arguments)}finally{x=G}}}})(cm)),cm}var bv;function Kk(){return bv||(bv=1,om.exports=Hk()),om.exports}var um={exports:{}},hn={};/**
|
|
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 yv;function Gk(){if(yv)return hn;yv=1;var e=Op();function t(d){var m="https://react.dev/errors/"+d;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+d+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(d,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:m,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,m){if(d==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,hn.createPortal=function(d,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return o(d,m,null,y)},hn.flushSync=function(d){var m=c.T,y=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=m,a.p=y,a.d.f()}},hn.preconnect=function(d,m){typeof d=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(d,m))},hn.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},hn.preinit=function(d,m){if(typeof d=="string"&&m&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin),x=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?a.d.S(d,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:v}):y==="script"&&a.d.X(d,{crossOrigin:g,integrity:x,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},hn.preinitModule=function(d,m){if(typeof d=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=f(m.as,m.crossOrigin);a.d.M(d,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(d)},hn.preload=function(d,m){if(typeof d=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=f(y,m.crossOrigin);a.d.L(d,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},hn.preloadModule=function(d,m){if(typeof d=="string")if(m){var y=f(m.as,m.crossOrigin);a.d.m(d,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(d)},hn.requestFormReset=function(d){a.d.r(d)},hn.unstable_batchedUpdates=function(d,m){return d(m)},hn.useFormState=function(d,m,y){return c.H.useFormState(d,m,y)},hn.useFormStatus=function(){return c.H.useHostTransitionStatus()},hn.version="19.2.5",hn}var xv;function Qk(){if(xv)return um.exports;xv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),um.exports=Gk(),um.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 vv;function Yk(){if(vv)return Po;vv=1;var e=Kk(),t=Op(),n=Qk();function a(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+i+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var r=i,l=i;if(i.alternate)for(;r.return;)r=r.return;else{i=r;do r=i,(r.flags&4098)!==0&&(l=r.return),i=r.return;while(i)}return r.tag===3?l:null}function c(i){if(i.tag===13){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function f(i){if(i.tag===31){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function d(i){if(o(i)!==i)throw Error(a(188))}function m(i){var r=i.alternate;if(!r){if(r=o(i),r===null)throw Error(a(188));return r!==i?null:i}for(var l=i,u=r;;){var p=l.return;if(p===null)break;var b=p.alternate;if(b===null){if(u=p.return,u!==null){l=u;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===l)return d(p),i;if(b===u)return d(p),r;b=b.sibling}throw Error(a(188))}if(l.return!==u.return)l=p,u=b;else{for(var E=!1,N=p.child;N;){if(N===l){E=!0,l=p,u=b;break}if(N===u){E=!0,u=p,l=b;break}N=N.sibling}if(!E){for(N=b.child;N;){if(N===l){E=!0,l=b,u=p;break}if(N===u){E=!0,u=b,l=p;break}N=N.sibling}if(!E)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?i:r}function y(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i;for(i=i.child;i!==null;){if(r=y(i),r!==null)return r;i=i.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),T=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function J(i){return i===null||typeof i!="object"?null:(i=P&&i[P]||i["@@iterator"],typeof i=="function"?i:null)}var re=Symbol.for("react.client.reference");function Q(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===re?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case _:return"Profiler";case k:return"StrictMode";case F:return"Suspense";case M:return"SuspenseList";case te:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case S:return"Portal";case T:return i.displayName||"Context";case A:return(i._context.displayName||"Context")+".Consumer";case j:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case q:return r=i.displayName||null,r!==null?r:Q(i.type)||"Memo";case K:r=i._payload,i=i._init;try{return Q(i(r))}catch{}}return null}var Y=Array.isArray,U=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},he=[],O=-1;function L(i){return{current:i}}function Z(i){0>O||(i.current=he[O],he[O]=null,O--)}function C(i,r){O++,he[O]=i.current,i.current=r}var pe=L(null),_e=L(null),ve=L(null),ce=L(null);function ke(i,r){switch(C(ve,r),C(_e,i),C(pe,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?jx(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=jx(r),i=Dx(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Z(pe),C(pe,i)}function Ke(){Z(pe),Z(_e),Z(ve)}function Dt(i){i.memoizedState!==null&&C(ce,i);var r=pe.current,l=Dx(r,i.type);r!==l&&(C(_e,i),C(pe,l))}function yn(i){_e.current===i&&(Z(pe),Z(_e)),ce.current===i&&(Z(ce),zo._currentValue=G)}var Ji,Ra;function Kn(i){if(Ji===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Ji=r&&r[1]||"",Ra=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ji+i+Ra}var Ii=!1;function Ze(i,r){if(!i||Ii)return"";Ii=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ee){var W=ee}Reflect.construct(i,[],oe)}else{try{oe.call()}catch(ee){W=ee}i.call(oe.prototype)}}else{try{throw Error()}catch(ee){W=ee}(oe=i())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ee){if(ee&&W&&typeof ee.stack=="string")return[ee.stack,W.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),E=b[0],N=b[1];if(E&&N){var I=E.split(`
|
|
44
|
+
`),X=N.split(`
|
|
45
|
+
`);for(p=u=0;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;for(;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;if(u===I.length||p===X.length)for(u=I.length-1,p=X.length-1;1<=u&&0<=p&&I[u]!==X[p];)p--;for(;1<=u&&0<=p;u--,p--)if(I[u]!==X[p]){if(u!==1||p!==1)do if(u--,p--,0>p||I[u]!==X[p]){var ie=`
|
|
46
|
+
`+I[u].replace(" at new "," at ");return i.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",i.displayName)),ie}while(1<=u&&0<=p);break}}}finally{Ii=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?Kn(l):""}function _i(i,r){switch(i.tag){case 26:case 27:case 5:return Kn(i.type);case 16:return Kn("Lazy");case 13:return i.child!==r&&r!==null?Kn("Suspense Fallback"):Kn("Suspense");case 19:return Kn("SuspenseList");case 0:case 15:return Ze(i.type,!1);case 11:return Ze(i.type.render,!1);case 1:return Ze(i.type,!0);case 31:return Kn("Activity");default:return""}}function li(i){try{var r="",l=null;do r+=_i(i,l),l=i,i=i.return;while(i);return r}catch(u){return`
|
|
47
|
+
Error generating stack: `+u.message+`
|
|
48
|
+
`+u.stack}}var zi=Object.prototype.hasOwnProperty,ea=e.unstable_scheduleCallback,Tr=e.unstable_cancelCallback,Gl=e.unstable_shouldYield,bs=e.unstable_requestPaint,Ot=e.unstable_now,ys=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,de=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,qe=e.unstable_LowPriority,nt=e.unstable_IdlePriority,xn=e.log,ki=e.unstable_setDisableYieldValue,an=null,Lt=null;function un(i){if(typeof xn=="function"&&ki(i),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(an,i)}catch{}}var ot=Math.clz32?Math.clz32:Tc,Bi=Math.log,vn=Math.LN2;function Tc(i){return i>>>=0,i===0?32:31-(Bi(i)/vn|0)|0}var Cr=256,xs=262144,Ar=4194304;function Cn(i){var r=i&42;if(r!==0)return r;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function B(i,r,l){var u=i.pendingLanes;if(u===0)return 0;var p=0,b=i.suspendedLanes,E=i.pingedLanes;i=i.warmLanes;var N=u&134217727;return N!==0?(u=N&~b,u!==0?p=Cn(u):(E&=N,E!==0?p=Cn(E):l||(l=N&~i,l!==0&&(p=Cn(l))))):(N=u&~b,N!==0?p=Cn(N):E!==0?p=Cn(E):l||(l=u&~i,l!==0&&(p=Cn(l)))),p===0?0:r!==0&&r!==p&&(r&b)===0&&(b=p&-p,l=r&-r,b>=l||b===32&&(l&4194048)!==0)?r:p}function se(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function ge(i,r){switch(i){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Le(){var i=Ar;return Ar<<=1,(Ar&62914560)===0&&(Ar=4194304),i}function wt(i){for(var r=[],l=0;31>l;l++)r.push(i);return r}function bt(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Ee(i,r,l,u,p,b){var E=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var N=i.entanglements,I=i.expirationTimes,X=i.hiddenUpdates;for(l=E&~l;0<l;){var ie=31-ot(l),oe=1<<ie;N[ie]=0,I[ie]=-1;var W=X[ie];if(W!==null)for(X[ie]=null,ie=0;ie<W.length;ie++){var ee=W[ie];ee!==null&&(ee.lane&=-536870913)}l&=~oe}u!==0&&ye(i,u,0),b!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=b&~(E&~r))}function ye(i,r,l){i.pendingLanes|=r,i.suspendedLanes&=~r;var u=31-ot(r);i.entangledLanes|=r,i.entanglements[u]=i.entanglements[u]|1073741824|l&261930}function De(i,r){var l=i.entangledLanes|=r;for(i=i.entanglements;l;){var u=31-ot(l),p=1<<u;p&r|i[u]&r&&(i[u]|=r),l&=~p}}function Ft(i,r){var l=r&-r;return l=(l&42)!==0?1:Nt(l),(l&(i.suspendedLanes|r))!==0?0:l}function Nt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ta(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function vs(){var i=ae.p;return i!==0?i:(i=window.event,i===void 0?32:iv(i.type))}function Es(i,r){var l=ae.p;try{return ae.p=i,r()}finally{ae.p=l}}var Ui=Math.random().toString(36).slice(2),Pt="__reactFiber$"+Ui,fn="__reactProps$"+Ui,Ma="__reactContainer$"+Ui,Ql="__reactEvents$"+Ui,Cc="__reactListeners$"+Ui,Ss="__reactHandles$"+Ui,Ac="__reactResources$"+Ui,Or="__reactMarker$"+Ui;function Yl(i){delete i[Pt],delete i[fn],delete i[Ql],delete i[Cc],delete i[Ss]}function En(i){var r=i[Pt];if(r)return r;for(var l=i.parentNode;l;){if(r=l[Ma]||l[Pt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(i=Fx(i);i!==null;){if(l=i[Pt])return l;i=Fx(i)}return r}i=l,l=i.parentNode}return null}function na(i){if(i=i[Pt]||i[Ma]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function ja(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(a(33))}function Da(i){var r=i[Ac];return r||(r=i[Ac]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Gt(i){i[Or]=!0}var Oc=new Set,Rr={};function ia(i,r){ue(i,r),ue(i+"Capture",r)}function ue(i,r){for(Rr[i]=r,i=0;i<r.length;i++)Oc.add(r[i])}var Ne=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]*$"),He={},ct={};function qt(i){return zi.call(ct,i)?!0:zi.call(He,i)?!1:Ne.test(i)?ct[i]=!0:(He[i]=!0,!1)}function dn(i,r,l){if(qt(r))if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":i.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){i.removeAttribute(r);return}}i.setAttribute(r,""+l)}}function Gn(i,r,l){if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(r);return}i.setAttribute(r,""+l)}}function An(i,r,l,u){if(u===null)i.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttributeNS(r,l,""+u)}}function Et(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Qn(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Rc(i,r,l){var u=Object.getOwnPropertyDescriptor(i.constructor.prototype,r);if(!i.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,b=u.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return p.call(this)},set:function(E){l=""+E,b.call(this,E)}}),Object.defineProperty(i,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(E){l=""+E},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function ws(i){if(!i._valueTracker){var r=Qn(i)?"checked":"value";i._valueTracker=Rc(i,r,""+i[r])}}function Vl(i){if(!i)return!1;var r=i._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return i&&(u=Qn(i)?i.checked?"true":"false":i.value),i=u,i!==l?(r.setValue(i),!0):!1}function _s(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var id=/[\n"\\]/g;function On(i){return i.replace(id,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Xl(i,r,l,u,p,b,E,N){i.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?i.type=E:i.removeAttribute("type"),r!=null?E==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+Et(r)):i.value!==""+Et(r)&&(i.value=""+Et(r)):E!=="submit"&&E!=="reset"||i.removeAttribute("value"),r!=null?ks(i,E,Et(r)):l!=null?ks(i,E,Et(l)):u!=null&&i.removeAttribute("value"),p==null&&b!=null&&(i.defaultChecked=!!b),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.name=""+Et(N):i.removeAttribute("name")}function Mr(i,r,l,u,p,b,E,N){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(i.type=b),r!=null||l!=null){if(!(b!=="submit"&&b!=="reset"||r!=null)){ws(i);return}l=l!=null?""+Et(l):"",r=r!=null?""+Et(r):l,N||r===i.value||(i.value=r),i.defaultValue=r}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,i.checked=N?i.checked:!!u,i.defaultChecked=!!u,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(i.name=E),ws(i)}function ks(i,r,l){r==="number"&&_s(i.ownerDocument)===i||i.defaultValue===""+l||(i.defaultValue=""+l)}function rn(i,r,l,u){if(i=i.options,r){r={};for(var p=0;p<l.length;p++)r["$"+l[p]]=!0;for(l=0;l<i.length;l++)p=r.hasOwnProperty("$"+i[l].value),i[l].selected!==p&&(i[l].selected=p),p&&u&&(i[l].defaultSelected=!0)}else{for(l=""+Et(l),r=null,p=0;p<i.length;p++){if(i[p].value===l){i[p].selected=!0,u&&(i[p].defaultSelected=!0);return}r!==null||i[p].disabled||(r=i[p])}r!==null&&(r.selected=!0)}}function Mc(i,r,l){if(r!=null&&(r=""+Et(r),r!==i.value&&(i.value=r),l==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=l!=null?""+Et(l):""}function Ns(i,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(Y(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=Et(r),i.defaultValue=l,u=i.textContent,u===l&&u!==""&&u!==null&&(i.value=u),ws(i)}function je(i,r){if(r){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=r;return}}i.textContent=r}var jc=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 Qt(i,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?i.setProperty(r,""):r==="float"?i.cssFloat="":i[r]="":u?i.setProperty(r,l):typeof l!="number"||l===0||jc.has(r)?r==="float"?i.cssFloat=l:i[r]=(""+l).trim():i[r]=l+"px"}function ut(i,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(i=i.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?i.setProperty(u,""):u==="float"?i.cssFloat="":i[u]="");for(var p in r)u=r[p],r.hasOwnProperty(p)&&l[p]!==u&&Qt(i,p,u)}else for(var b in r)r.hasOwnProperty(b)&&Qt(i,b,r[b])}function La(i){if(i.indexOf("-")===-1)return!1;switch(i){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 aa=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"]]),Wl=/^[\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 Ia(i){return Wl.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function me(){}var Se=null;function Be(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ve=null,Rt=null;function oi(i){var r=na(i);if(r&&(i=r.stateNode)){var l=i[fn]||null;e:switch(i=r.stateNode,r.type){case"input":if(Xl(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+On(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==i&&u.form===i.form){var p=u[fn]||null;if(!p)throw Error(a(90));Xl(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===i.form&&Vl(u)}break e;case"textarea":Mc(i,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&rn(i,!!l.multiple,r,!1)}}}var Zl=!1;function Dc(i,r,l){if(Zl)return i(r,l);Zl=!0;try{var u=i(r);return u}finally{if(Zl=!1,(Ve!==null||Rt!==null)&&(Eu(),Ve&&(r=Ve,i=Rt,Rt=Ve=null,oi(r),i)))for(r=0;r<i.length;r++)oi(i[r])}}function Jl(i,r){var l=i.stateNode;if(l===null)return null;var u=l[fn]||null;if(u===null)return null;l=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(i=i.type,u=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!u;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var ra=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ad=!1;if(ra)try{var eo={};Object.defineProperty(eo,"passive",{get:function(){ad=!0}}),window.addEventListener("test",eo,eo),window.removeEventListener("test",eo,eo)}catch{ad=!1}var za=null,rd=null,Lc=null;function Dg(){if(Lc)return Lc;var i,r=rd,l=r.length,u,p="value"in za?za.value:za.textContent,b=p.length;for(i=0;i<l&&r[i]===p[i];i++);var E=l-i;for(u=1;u<=E&&r[l-u]===p[b-u];u++);return Lc=p.slice(i,1<u?1-u:void 0)}function Ic(i){var r=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&r===13&&(i=13)):i=r,i===10&&(i=13),32<=i||i===13?i:0}function zc(){return!0}function Lg(){return!1}function Rn(i){function r(l,u,p,b,E){this._reactName=l,this._targetInst=p,this.type=u,this.nativeEvent=b,this.target=E,this.currentTarget=null;for(var N in i)i.hasOwnProperty(N)&&(l=i[N],this[N]=l?l(b):b[N]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?zc:Lg,this.isPropagationStopped=Lg,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=zc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=zc)},persist:function(){},isPersistent:zc}),r}var jr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bc=Rn(jr),to=g({},jr,{view:0,detail:0}),zw=Rn(to),sd,ld,no,Uc=g({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cd,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==no&&(no&&i.type==="mousemove"?(sd=i.screenX-no.screenX,ld=i.screenY-no.screenY):ld=sd=0,no=i),sd)},movementY:function(i){return"movementY"in i?i.movementY:ld}}),Ig=Rn(Uc),Bw=g({},Uc,{dataTransfer:0}),Uw=Rn(Bw),$w=g({},to,{relatedTarget:0}),od=Rn($w),Fw=g({},jr,{animationName:0,elapsedTime:0,pseudoElement:0}),Pw=Rn(Fw),qw=g({},jr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Hw=Rn(qw),Kw=g({},jr,{data:0}),zg=Rn(Kw),Gw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qw={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"},Yw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Vw(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=Yw[i])?!!r[i]:!1}function cd(){return Vw}var Xw=g({},to,{key:function(i){if(i.key){var r=Gw[i.key]||i.key;if(r!=="Unidentified")return r}return i.type==="keypress"?(i=Ic(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?Qw[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cd,charCode:function(i){return i.type==="keypress"?Ic(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ic(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),Ww=Rn(Xw),Zw=g({},Uc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bg=Rn(Zw),Jw=g({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cd}),e_=Rn(Jw),t_=g({},jr,{propertyName:0,elapsedTime:0,pseudoElement:0}),n_=Rn(t_),i_=g({},Uc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),a_=Rn(i_),r_=g({},jr,{newState:0,oldState:0}),s_=Rn(r_),l_=[9,13,27,32],ud=ra&&"CompositionEvent"in window,io=null;ra&&"documentMode"in document&&(io=document.documentMode);var o_=ra&&"TextEvent"in window&&!io,Ug=ra&&(!ud||io&&8<io&&11>=io),$g=" ",Fg=!1;function Pg(i,r){switch(i){case"keyup":return l_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qg(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ts=!1;function c_(i,r){switch(i){case"compositionend":return qg(r);case"keypress":return r.which!==32?null:(Fg=!0,$g);case"textInput":return i=r.data,i===$g&&Fg?null:i;default:return null}}function u_(i,r){if(Ts)return i==="compositionend"||!ud&&Pg(i,r)?(i=Dg(),Lc=rd=za=null,Ts=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Ug&&r.locale!=="ko"?null:r.data;default:return null}}var f_={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 Hg(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!f_[i.type]:r==="textarea"}function Kg(i,r,l,u){Ve?Rt?Rt.push(u):Rt=[u]:Ve=u,r=Cu(r,"onChange"),0<r.length&&(l=new Bc("onChange","change",null,l,u),i.push({event:l,listeners:r}))}var ao=null,ro=null;function d_(i){Tx(i,0)}function $c(i){var r=ja(i);if(Vl(r))return i}function Gg(i,r){if(i==="change")return r}var Qg=!1;if(ra){var fd;if(ra){var dd="oninput"in document;if(!dd){var Yg=document.createElement("div");Yg.setAttribute("oninput","return;"),dd=typeof Yg.oninput=="function"}fd=dd}else fd=!1;Qg=fd&&(!document.documentMode||9<document.documentMode)}function Vg(){ao&&(ao.detachEvent("onpropertychange",Xg),ro=ao=null)}function Xg(i){if(i.propertyName==="value"&&$c(ro)){var r=[];Kg(r,ro,i,Be(i)),Dc(d_,r)}}function h_(i,r,l){i==="focusin"?(Vg(),ao=r,ro=l,ao.attachEvent("onpropertychange",Xg)):i==="focusout"&&Vg()}function m_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return $c(ro)}function p_(i,r){if(i==="click")return $c(r)}function g_(i,r){if(i==="input"||i==="change")return $c(r)}function b_(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Yn=typeof Object.is=="function"?Object.is:b_;function so(i,r){if(Yn(i,r))return!0;if(typeof i!="object"||i===null||typeof r!="object"||r===null)return!1;var l=Object.keys(i),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var p=l[u];if(!zi.call(r,p)||!Yn(i[p],r[p]))return!1}return!0}function Wg(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Zg(i,r){var l=Wg(i);i=0;for(var u;l;){if(l.nodeType===3){if(u=i+l.textContent.length,i<=r&&u>=r)return{node:l,offset:r-i};i=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Wg(l)}}function Jg(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?Jg(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function eb(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var r=_s(i.document);r instanceof i.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)i=r.contentWindow;else break;r=_s(i.document)}return r}function hd(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r&&(r==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||r==="textarea"||i.contentEditable==="true")}var y_=ra&&"documentMode"in document&&11>=document.documentMode,Cs=null,md=null,lo=null,pd=!1;function tb(i,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;pd||Cs==null||Cs!==_s(u)||(u=Cs,"selectionStart"in u&&hd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),lo&&so(lo,u)||(lo=u,u=Cu(md,"onSelect"),0<u.length&&(r=new Bc("onSelect","select",null,r,l),i.push({event:r,listeners:u}),r.target=Cs)))}function Dr(i,r){var l={};return l[i.toLowerCase()]=r.toLowerCase(),l["Webkit"+i]="webkit"+r,l["Moz"+i]="moz"+r,l}var As={animationend:Dr("Animation","AnimationEnd"),animationiteration:Dr("Animation","AnimationIteration"),animationstart:Dr("Animation","AnimationStart"),transitionrun:Dr("Transition","TransitionRun"),transitionstart:Dr("Transition","TransitionStart"),transitioncancel:Dr("Transition","TransitionCancel"),transitionend:Dr("Transition","TransitionEnd")},gd={},nb={};ra&&(nb=document.createElement("div").style,"AnimationEvent"in window||(delete As.animationend.animation,delete As.animationiteration.animation,delete As.animationstart.animation),"TransitionEvent"in window||delete As.transitionend.transition);function Lr(i){if(gd[i])return gd[i];if(!As[i])return i;var r=As[i],l;for(l in r)if(r.hasOwnProperty(l)&&l in nb)return gd[i]=r[l];return i}var ib=Lr("animationend"),ab=Lr("animationiteration"),rb=Lr("animationstart"),x_=Lr("transitionrun"),v_=Lr("transitionstart"),E_=Lr("transitioncancel"),sb=Lr("transitionend"),lb=new Map,bd="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(" ");bd.push("scrollEnd");function Ni(i,r){lb.set(i,r),ia(r,[i])}var Fc=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},ci=[],Os=0,yd=0;function Pc(){for(var i=Os,r=yd=Os=0;r<i;){var l=ci[r];ci[r++]=null;var u=ci[r];ci[r++]=null;var p=ci[r];ci[r++]=null;var b=ci[r];if(ci[r++]=null,u!==null&&p!==null){var E=u.pending;E===null?p.next=p:(p.next=E.next,E.next=p),u.pending=p}b!==0&&ob(l,p,b)}}function qc(i,r,l,u){ci[Os++]=i,ci[Os++]=r,ci[Os++]=l,ci[Os++]=u,yd|=u,i.lanes|=u,i=i.alternate,i!==null&&(i.lanes|=u)}function xd(i,r,l,u){return qc(i,r,l,u),Hc(i)}function Ir(i,r){return qc(i,null,null,r),Hc(i)}function ob(i,r,l){i.lanes|=l;var u=i.alternate;u!==null&&(u.lanes|=l);for(var p=!1,b=i.return;b!==null;)b.childLanes|=l,u=b.alternate,u!==null&&(u.childLanes|=l),b.tag===22&&(i=b.stateNode,i===null||i._visibility&1||(p=!0)),i=b,b=b.return;return i.tag===3?(b=i.stateNode,p&&r!==null&&(p=31-ot(l),i=b.hiddenUpdates,u=i[p],u===null?i[p]=[r]:u.push(r),r.lane=l|536870912),b):null}function Hc(i){if(50<Oo)throw Oo=0,Ch=null,Error(a(185));for(var r=i.return;r!==null;)i=r,r=i.return;return i.tag===3?i.stateNode:null}var Rs={};function S_(i,r,l,u){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vn(i,r,l,u){return new S_(i,r,l,u)}function vd(i){return i=i.prototype,!(!i||!i.isReactComponent)}function sa(i,r){var l=i.alternate;return l===null?(l=Vn(i.tag,r,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=r,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&65011712,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,r=i.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l.refCleanup=i.refCleanup,l}function cb(i,r){i.flags&=65011714;var l=i.alternate;return l===null?(i.childLanes=0,i.lanes=r,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,r=l.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),i}function Kc(i,r,l,u,p,b){var E=0;if(u=i,typeof i=="function")vd(i)&&(E=1);else if(typeof i=="string")E=Tk(i,l,pe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case te:return i=Vn(31,l,r,p),i.elementType=te,i.lanes=b,i;case w:return zr(l.children,p,b,r);case k:E=8,p|=24;break;case _:return i=Vn(12,l,r,p|2),i.elementType=_,i.lanes=b,i;case F:return i=Vn(13,l,r,p),i.elementType=F,i.lanes=b,i;case M:return i=Vn(19,l,r,p),i.elementType=M,i.lanes=b,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:E=10;break e;case A:E=9;break e;case j:E=11;break e;case q:E=14;break e;case K:E=16,u=null;break e}E=29,l=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Vn(E,l,r,p),r.elementType=i,r.type=u,r.lanes=b,r}function zr(i,r,l,u){return i=Vn(7,i,u,r),i.lanes=l,i}function Ed(i,r,l){return i=Vn(6,i,null,r),i.lanes=l,i}function ub(i){var r=Vn(18,null,null,0);return r.stateNode=i,r}function Sd(i,r,l){return r=Vn(4,i.children!==null?i.children:[],i.key,r),r.lanes=l,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var fb=new WeakMap;function ui(i,r){if(typeof i=="object"&&i!==null){var l=fb.get(i);return l!==void 0?l:(r={value:i,source:r,stack:li(r)},fb.set(i,r),r)}return{value:i,source:r,stack:li(r)}}var Ms=[],js=0,Gc=null,oo=0,fi=[],di=0,Ba=null,$i=1,Fi="";function la(i,r){Ms[js++]=oo,Ms[js++]=Gc,Gc=i,oo=r}function db(i,r,l){fi[di++]=$i,fi[di++]=Fi,fi[di++]=Ba,Ba=i;var u=$i;i=Fi;var p=32-ot(u)-1;u&=~(1<<p),l+=1;var b=32-ot(r)+p;if(30<b){var E=p-p%5;b=(u&(1<<E)-1).toString(32),u>>=E,p-=E,$i=1<<32-ot(r)+p|l<<p|u,Fi=b+i}else $i=1<<b|l<<p|u,Fi=i}function wd(i){i.return!==null&&(la(i,1),db(i,1,0))}function _d(i){for(;i===Gc;)Gc=Ms[--js],Ms[js]=null,oo=Ms[--js],Ms[js]=null;for(;i===Ba;)Ba=fi[--di],fi[di]=null,Fi=fi[--di],fi[di]=null,$i=fi[--di],fi[di]=null}function hb(i,r){fi[di++]=$i,fi[di++]=Fi,fi[di++]=Ba,$i=r.id,Fi=r.overflow,Ba=i}var sn=null,_t=null,Je=!1,Ua=null,hi=!1,kd=Error(a(519));function $a(i){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw co(ui(r,i)),kd}function mb(i){var r=i.stateNode,l=i.type,u=i.memoizedProps;switch(r[Pt]=i,r[fn]=u,l){case"dialog":Qe("cancel",r),Qe("close",r);break;case"iframe":case"object":case"embed":Qe("load",r);break;case"video":case"audio":for(l=0;l<Mo.length;l++)Qe(Mo[l],r);break;case"source":Qe("error",r);break;case"img":case"image":case"link":Qe("error",r),Qe("load",r);break;case"details":Qe("toggle",r);break;case"input":Qe("invalid",r),Mr(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Qe("invalid",r);break;case"textarea":Qe("invalid",r),Ns(r,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||Rx(r.textContent,l)?(u.popover!=null&&(Qe("beforetoggle",r),Qe("toggle",r)),u.onScroll!=null&&Qe("scroll",r),u.onScrollEnd!=null&&Qe("scrollend",r),u.onClick!=null&&(r.onclick=me),r=!0):r=!1,r||$a(i,!0)}function pb(i){for(sn=i.return;sn;)switch(sn.tag){case 5:case 31:case 13:hi=!1;return;case 27:case 3:hi=!0;return;default:sn=sn.return}}function Ds(i){if(i!==sn)return!1;if(!Je)return pb(i),Je=!0,!1;var r=i.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=i.type,l=!(l!=="form"&&l!=="button")||qh(i.type,i.memoizedProps)),l=!l),l&&_t&&$a(i),pb(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));_t=$x(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));_t=$x(i)}else r===27?(r=_t,er(i.type)?(i=Yh,Yh=null,_t=i):_t=r):_t=sn?pi(i.stateNode.nextSibling):null;return!0}function Br(){_t=sn=null,Je=!1}function Nd(){var i=Ua;return i!==null&&(Ln===null?Ln=i:Ln.push.apply(Ln,i),Ua=null),i}function co(i){Ua===null?Ua=[i]:Ua.push(i)}var Td=L(null),Ur=null,oa=null;function Fa(i,r,l){C(Td,r._currentValue),r._currentValue=l}function ca(i){i._currentValue=Td.current,Z(Td)}function Cd(i,r,l){for(;i!==null;){var u=i.alternate;if((i.childLanes&r)!==r?(i.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),i===l)break;i=i.return}}function Ad(i,r,l,u){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var b=p.dependencies;if(b!==null){var E=p.child;b=b.firstContext;e:for(;b!==null;){var N=b;b=p;for(var I=0;I<r.length;I++)if(N.context===r[I]){b.lanes|=l,N=b.alternate,N!==null&&(N.lanes|=l),Cd(b.return,l,i),u||(E=null);break e}b=N.next}}else if(p.tag===18){if(E=p.return,E===null)throw Error(a(341));E.lanes|=l,b=E.alternate,b!==null&&(b.lanes|=l),Cd(E,l,i),E=null}else E=p.child;if(E!==null)E.return=p;else for(E=p;E!==null;){if(E===i){E=null;break}if(p=E.sibling,p!==null){p.return=E.return,E=p;break}E=E.return}p=E}}function Ls(i,r,l,u){i=null;for(var p=r,b=!1;p!==null;){if(!b){if((p.flags&524288)!==0)b=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var E=p.alternate;if(E===null)throw Error(a(387));if(E=E.memoizedProps,E!==null){var N=p.type;Yn(p.pendingProps.value,E.value)||(i!==null?i.push(N):i=[N])}}else if(p===ce.current){if(E=p.alternate,E===null)throw Error(a(387));E.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(zo):i=[zo])}p=p.return}i!==null&&Ad(r,i,l,u),r.flags|=262144}function Qc(i){for(i=i.firstContext;i!==null;){if(!Yn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function $r(i){Ur=i,oa=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function ln(i){return gb(Ur,i)}function Yc(i,r){return Ur===null&&$r(i),gb(i,r)}function gb(i,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},oa===null){if(i===null)throw Error(a(308));oa=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else oa=oa.next=r;return l}var w_=typeof AbortController<"u"?AbortController:function(){var i=[],r=this.signal={aborted:!1,addEventListener:function(l,u){i.push(u)}};this.abort=function(){r.aborted=!0,i.forEach(function(l){return l()})}},__=e.unstable_scheduleCallback,k_=e.unstable_NormalPriority,Yt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Od(){return{controller:new w_,data:new Map,refCount:0}}function uo(i){i.refCount--,i.refCount===0&&__(k_,function(){i.controller.abort()})}var fo=null,Rd=0,Is=0,zs=null;function N_(i,r){if(fo===null){var l=fo=[];Rd=0,Is=Dh(),zs={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Rd++,r.then(bb,bb),r}function bb(){if(--Rd===0&&fo!==null){zs!==null&&(zs.status="fulfilled");var i=fo;fo=null,Is=0,zs=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function T_(i,r){var l=[],u={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return i.then(function(){u.status="fulfilled",u.value=r;for(var p=0;p<l.length;p++)(0,l[p])(r)},function(p){for(u.status="rejected",u.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),u}var yb=U.S;U.S=function(i,r){tx=Ot(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&N_(i,r),yb!==null&&yb(i,r)};var Fr=L(null);function Md(){var i=Fr.current;return i!==null?i:yt.pooledCache}function Vc(i,r){r===null?C(Fr,Fr.current):C(Fr,r.pool)}function xb(){var i=Md();return i===null?null:{parent:Yt._currentValue,pool:i}}var Bs=Error(a(460)),jd=Error(a(474)),Xc=Error(a(542)),Wc={then:function(){}};function vb(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Eb(i,r,l){switch(l=i[l],l===void 0?i.push(r):l!==r&&(r.then(me,me),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,wb(i),i;default:if(typeof r.status=="string")r.then(me,me);else{if(i=yt,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=r,i.status="pending",i.then(function(u){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=u}},function(u){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,wb(i),i}throw qr=r,Bs}}function Pr(i){try{var r=i._init;return r(i._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(qr=l,Bs):l}}var qr=null;function Sb(){if(qr===null)throw Error(a(459));var i=qr;return qr=null,i}function wb(i){if(i===Bs||i===Xc)throw Error(a(483))}var Us=null,ho=0;function Zc(i){var r=ho;return ho+=1,Us===null&&(Us=[]),Eb(Us,i,r)}function mo(i,r){r=r.props.ref,i.ref=r!==void 0?r:null}function Jc(i,r){throw r.$$typeof===x?Error(a(525)):(i=Object.prototype.toString.call(r),Error(a(31,i==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":i)))}function _b(i){function r(H,$){if(i){var V=H.deletions;V===null?(H.deletions=[$],H.flags|=16):V.push($)}}function l(H,$){if(!i)return null;for(;$!==null;)r(H,$),$=$.sibling;return null}function u(H){for(var $=new Map;H!==null;)H.key!==null?$.set(H.key,H):$.set(H.index,H),H=H.sibling;return $}function p(H,$){return H=sa(H,$),H.index=0,H.sibling=null,H}function b(H,$,V){return H.index=V,i?(V=H.alternate,V!==null?(V=V.index,V<$?(H.flags|=67108866,$):V):(H.flags|=67108866,$)):(H.flags|=1048576,$)}function E(H){return i&&H.alternate===null&&(H.flags|=67108866),H}function N(H,$,V,le){return $===null||$.tag!==6?($=Ed(V,H.mode,le),$.return=H,$):($=p($,V),$.return=H,$)}function I(H,$,V,le){var Ce=V.type;return Ce===w?ie(H,$,V.props.children,le,V.key):$!==null&&($.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===K&&Pr(Ce)===$.type)?($=p($,V.props),mo($,V),$.return=H,$):($=Kc(V.type,V.key,V.props,null,H.mode,le),mo($,V),$.return=H,$)}function X(H,$,V,le){return $===null||$.tag!==4||$.stateNode.containerInfo!==V.containerInfo||$.stateNode.implementation!==V.implementation?($=Sd(V,H.mode,le),$.return=H,$):($=p($,V.children||[]),$.return=H,$)}function ie(H,$,V,le,Ce){return $===null||$.tag!==7?($=zr(V,H.mode,le,Ce),$.return=H,$):($=p($,V),$.return=H,$)}function oe(H,$,V){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Ed(""+$,H.mode,V),$.return=H,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case v:return V=Kc($.type,$.key,$.props,null,H.mode,V),mo(V,$),V.return=H,V;case S:return $=Sd($,H.mode,V),$.return=H,$;case K:return $=Pr($),oe(H,$,V)}if(Y($)||J($))return $=zr($,H.mode,V,null),$.return=H,$;if(typeof $.then=="function")return oe(H,Zc($),V);if($.$$typeof===T)return oe(H,Yc(H,$),V);Jc(H,$)}return null}function W(H,$,V,le){var Ce=$!==null?$.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return Ce!==null?null:N(H,$,""+V,le);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case v:return V.key===Ce?I(H,$,V,le):null;case S:return V.key===Ce?X(H,$,V,le):null;case K:return V=Pr(V),W(H,$,V,le)}if(Y(V)||J(V))return Ce!==null?null:ie(H,$,V,le,null);if(typeof V.then=="function")return W(H,$,Zc(V),le);if(V.$$typeof===T)return W(H,$,Yc(H,V),le);Jc(H,V)}return null}function ee(H,$,V,le,Ce){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return H=H.get(V)||null,N($,H,""+le,Ce);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case v:return H=H.get(le.key===null?V:le.key)||null,I($,H,le,Ce);case S:return H=H.get(le.key===null?V:le.key)||null,X($,H,le,Ce);case K:return le=Pr(le),ee(H,$,V,le,Ce)}if(Y(le)||J(le))return H=H.get(V)||null,ie($,H,le,Ce,null);if(typeof le.then=="function")return ee(H,$,V,Zc(le),Ce);if(le.$$typeof===T)return ee(H,$,V,Yc($,le),Ce);Jc($,le)}return null}function xe(H,$,V,le){for(var Ce=null,it=null,we=$,$e=$=0,We=null;we!==null&&$e<V.length;$e++){we.index>$e?(We=we,we=null):We=we.sibling;var at=W(H,we,V[$e],le);if(at===null){we===null&&(we=We);break}i&&we&&at.alternate===null&&r(H,we),$=b(at,$,$e),it===null?Ce=at:it.sibling=at,it=at,we=We}if($e===V.length)return l(H,we),Je&&la(H,$e),Ce;if(we===null){for(;$e<V.length;$e++)we=oe(H,V[$e],le),we!==null&&($=b(we,$,$e),it===null?Ce=we:it.sibling=we,it=we);return Je&&la(H,$e),Ce}for(we=u(we);$e<V.length;$e++)We=ee(we,H,$e,V[$e],le),We!==null&&(i&&We.alternate!==null&&we.delete(We.key===null?$e:We.key),$=b(We,$,$e),it===null?Ce=We:it.sibling=We,it=We);return i&&we.forEach(function(rr){return r(H,rr)}),Je&&la(H,$e),Ce}function Me(H,$,V,le){if(V==null)throw Error(a(151));for(var Ce=null,it=null,we=$,$e=$=0,We=null,at=V.next();we!==null&&!at.done;$e++,at=V.next()){we.index>$e?(We=we,we=null):We=we.sibling;var rr=W(H,we,at.value,le);if(rr===null){we===null&&(we=We);break}i&&we&&rr.alternate===null&&r(H,we),$=b(rr,$,$e),it===null?Ce=rr:it.sibling=rr,it=rr,we=We}if(at.done)return l(H,we),Je&&la(H,$e),Ce;if(we===null){for(;!at.done;$e++,at=V.next())at=oe(H,at.value,le),at!==null&&($=b(at,$,$e),it===null?Ce=at:it.sibling=at,it=at);return Je&&la(H,$e),Ce}for(we=u(we);!at.done;$e++,at=V.next())at=ee(we,H,$e,at.value,le),at!==null&&(i&&at.alternate!==null&&we.delete(at.key===null?$e:at.key),$=b(at,$,$e),it===null?Ce=at:it.sibling=at,it=at);return i&&we.forEach(function(Bk){return r(H,Bk)}),Je&&la(H,$e),Ce}function pt(H,$,V,le){if(typeof V=="object"&&V!==null&&V.type===w&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case v:e:{for(var Ce=V.key;$!==null;){if($.key===Ce){if(Ce=V.type,Ce===w){if($.tag===7){l(H,$.sibling),le=p($,V.props.children),le.return=H,H=le;break e}}else if($.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===K&&Pr(Ce)===$.type){l(H,$.sibling),le=p($,V.props),mo(le,V),le.return=H,H=le;break e}l(H,$);break}else r(H,$);$=$.sibling}V.type===w?(le=zr(V.props.children,H.mode,le,V.key),le.return=H,H=le):(le=Kc(V.type,V.key,V.props,null,H.mode,le),mo(le,V),le.return=H,H=le)}return E(H);case S:e:{for(Ce=V.key;$!==null;){if($.key===Ce)if($.tag===4&&$.stateNode.containerInfo===V.containerInfo&&$.stateNode.implementation===V.implementation){l(H,$.sibling),le=p($,V.children||[]),le.return=H,H=le;break e}else{l(H,$);break}else r(H,$);$=$.sibling}le=Sd(V,H.mode,le),le.return=H,H=le}return E(H);case K:return V=Pr(V),pt(H,$,V,le)}if(Y(V))return xe(H,$,V,le);if(J(V)){if(Ce=J(V),typeof Ce!="function")throw Error(a(150));return V=Ce.call(V),Me(H,$,V,le)}if(typeof V.then=="function")return pt(H,$,Zc(V),le);if(V.$$typeof===T)return pt(H,$,Yc(H,V),le);Jc(H,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,$!==null&&$.tag===6?(l(H,$.sibling),le=p($,V),le.return=H,H=le):(l(H,$),le=Ed(V,H.mode,le),le.return=H,H=le),E(H)):l(H,$)}return function(H,$,V,le){try{ho=0;var Ce=pt(H,$,V,le);return Us=null,Ce}catch(we){if(we===Bs||we===Xc)throw we;var it=Vn(29,we,null,H.mode);return it.lanes=le,it.return=H,it}finally{}}}var Hr=_b(!0),kb=_b(!1),Pa=!1;function Dd(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ld(i,r){i=i.updateQueue,r.updateQueue===i&&(r.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function qa(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ha(i,r,l){var u=i.updateQueue;if(u===null)return null;if(u=u.shared,(rt&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,r=Hc(i),ob(i,null,l),r}return qc(i,u,r,l),Hc(i)}function po(i,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,De(i,l)}}function Id(i,r){var l=i.updateQueue,u=i.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var p=null,b=null;if(l=l.firstBaseUpdate,l!==null){do{var E={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};b===null?p=b=E:b=b.next=E,l=l.next}while(l!==null);b===null?p=b=r:b=b.next=r}else p=b=r;l={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:u.shared,callbacks:u.callbacks},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=r:i.next=r,l.lastBaseUpdate=r}var zd=!1;function go(){if(zd){var i=zs;if(i!==null)throw i}}function bo(i,r,l,u){zd=!1;var p=i.updateQueue;Pa=!1;var b=p.firstBaseUpdate,E=p.lastBaseUpdate,N=p.shared.pending;if(N!==null){p.shared.pending=null;var I=N,X=I.next;I.next=null,E===null?b=X:E.next=X,E=I;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,N=ie.lastBaseUpdate,N!==E&&(N===null?ie.firstBaseUpdate=X:N.next=X,ie.lastBaseUpdate=I))}if(b!==null){var oe=p.baseState;E=0,ie=X=I=null,N=b;do{var W=N.lane&-536870913,ee=W!==N.lane;if(ee?(Xe&W)===W:(u&W)===W){W!==0&&W===Is&&(zd=!0),ie!==null&&(ie=ie.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var xe=i,Me=N;W=r;var pt=l;switch(Me.tag){case 1:if(xe=Me.payload,typeof xe=="function"){oe=xe.call(pt,oe,W);break e}oe=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Me.payload,W=typeof xe=="function"?xe.call(pt,oe,W):xe,W==null)break e;oe=g({},oe,W);break e;case 2:Pa=!0}}W=N.callback,W!==null&&(i.flags|=64,ee&&(i.flags|=8192),ee=p.callbacks,ee===null?p.callbacks=[W]:ee.push(W))}else ee={lane:W,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ie===null?(X=ie=ee,I=oe):ie=ie.next=ee,E|=W;if(N=N.next,N===null){if(N=p.shared.pending,N===null)break;ee=N,N=ee.next,ee.next=null,p.lastBaseUpdate=ee,p.shared.pending=null}}while(!0);ie===null&&(I=oe),p.baseState=I,p.firstBaseUpdate=X,p.lastBaseUpdate=ie,b===null&&(p.shared.lanes=0),Va|=E,i.lanes=E,i.memoizedState=oe}}function Nb(i,r){if(typeof i!="function")throw Error(a(191,i));i.call(r)}function Tb(i,r){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)Nb(l[i],r)}var $s=L(null),eu=L(0);function Cb(i,r){i=ya,C(eu,i),C($s,r),ya=i|r.baseLanes}function Bd(){C(eu,ya),C($s,$s.current)}function Ud(){ya=eu.current,Z($s),Z(eu)}var Xn=L(null),mi=null;function Ka(i){var r=i.alternate;C(Ht,Ht.current&1),C(Xn,i),mi===null&&(r===null||$s.current!==null||r.memoizedState!==null)&&(mi=i)}function $d(i){C(Ht,Ht.current),C(Xn,i),mi===null&&(mi=i)}function Ab(i){i.tag===22?(C(Ht,Ht.current),C(Xn,i),mi===null&&(mi=i)):Ga()}function Ga(){C(Ht,Ht.current),C(Xn,Xn.current)}function Wn(i){Z(Xn),mi===i&&(mi=null),Z(Ht)}var Ht=L(0);function tu(i){for(var r=i;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Gh(l)||Qh(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var ua=0,Ue=null,ht=null,Vt=null,nu=!1,Fs=!1,Kr=!1,iu=0,yo=0,Ps=null,C_=0;function It(){throw Error(a(321))}function Fd(i,r){if(r===null)return!1;for(var l=0;l<r.length&&l<i.length;l++)if(!Yn(i[l],r[l]))return!1;return!0}function Pd(i,r,l,u,p,b){return ua=b,Ue=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,U.H=i===null||i.memoizedState===null?dy:ih,Kr=!1,b=l(u,p),Kr=!1,Fs&&(b=Rb(r,l,u,p)),Ob(i),b}function Ob(i){U.H=Eo;var r=ht!==null&&ht.next!==null;if(ua=0,Vt=ht=Ue=null,nu=!1,yo=0,Ps=null,r)throw Error(a(300));i===null||Xt||(i=i.dependencies,i!==null&&Qc(i)&&(Xt=!0))}function Rb(i,r,l,u){Ue=i;var p=0;do{if(Fs&&(Ps=null),yo=0,Fs=!1,25<=p)throw Error(a(301));if(p+=1,Vt=ht=null,i.updateQueue!=null){var b=i.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}U.H=hy,b=r(l,u)}while(Fs);return b}function A_(){var i=U.H,r=i.useState()[0];return r=typeof r.then=="function"?xo(r):r,i=i.useState()[0],(ht!==null?ht.memoizedState:null)!==i&&(Ue.flags|=1024),r}function qd(){var i=iu!==0;return iu=0,i}function Hd(i,r,l){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~l}function Kd(i){if(nu){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}nu=!1}ua=0,Vt=ht=Ue=null,Fs=!1,yo=iu=0,Ps=null}function Sn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?Ue.memoizedState=Vt=i:Vt=Vt.next=i,Vt}function Kt(){if(ht===null){var i=Ue.alternate;i=i!==null?i.memoizedState:null}else i=ht.next;var r=Vt===null?Ue.memoizedState:Vt.next;if(r!==null)Vt=r,ht=i;else{if(i===null)throw Ue.alternate===null?Error(a(467)):Error(a(310));ht=i,i={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Vt===null?Ue.memoizedState=Vt=i:Vt=Vt.next=i}return Vt}function au(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xo(i){var r=yo;return yo+=1,Ps===null&&(Ps=[]),i=Eb(Ps,i,r),r=Ue,(Vt===null?r.memoizedState:Vt.next)===null&&(r=r.alternate,U.H=r===null||r.memoizedState===null?dy:ih),i}function ru(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return xo(i);if(i.$$typeof===T)return ln(i)}throw Error(a(438,String(i)))}function Gd(i){var r=null,l=Ue.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=Ue.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=au(),Ue.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(i),u=0;u<i;u++)l[u]=D;return r.index++,l}function fa(i,r){return typeof r=="function"?r(i):r}function su(i){var r=Kt();return Qd(r,ht,i)}function Qd(i,r,l){var u=i.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var p=i.baseQueue,b=u.pending;if(b!==null){if(p!==null){var E=p.next;p.next=b.next,b.next=E}r.baseQueue=p=b,u.pending=null}if(b=i.baseState,p===null)i.memoizedState=b;else{r=p.next;var N=E=null,I=null,X=r,ie=!1;do{var oe=X.lane&-536870913;if(oe!==X.lane?(Xe&oe)===oe:(ua&oe)===oe){var W=X.revertLane;if(W===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),oe===Is&&(ie=!0);else if((ua&W)===W){X=X.next,W===Is&&(ie=!0);continue}else oe={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(N=I=oe,E=b):I=I.next=oe,Ue.lanes|=W,Va|=W;oe=X.action,Kr&&l(b,oe),b=X.hasEagerState?X.eagerState:l(b,oe)}else W={lane:oe,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(N=I=W,E=b):I=I.next=W,Ue.lanes|=oe,Va|=oe;X=X.next}while(X!==null&&X!==r);if(I===null?E=b:I.next=N,!Yn(b,i.memoizedState)&&(Xt=!0,ie&&(l=zs,l!==null)))throw l;i.memoizedState=b,i.baseState=E,i.baseQueue=I,u.lastRenderedState=b}return p===null&&(u.lanes=0),[i.memoizedState,u.dispatch]}function Yd(i){var r=Kt(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var u=l.dispatch,p=l.pending,b=r.memoizedState;if(p!==null){l.pending=null;var E=p=p.next;do b=i(b,E.action),E=E.next;while(E!==p);Yn(b,r.memoizedState)||(Xt=!0),r.memoizedState=b,r.baseQueue===null&&(r.baseState=b),l.lastRenderedState=b}return[b,u]}function Mb(i,r,l){var u=Ue,p=Kt(),b=Je;if(b){if(l===void 0)throw Error(a(407));l=l()}else l=r();var E=!Yn((ht||p).memoizedState,l);if(E&&(p.memoizedState=l,Xt=!0),p=p.queue,Wd(Lb.bind(null,u,p,i),[i]),p.getSnapshot!==r||E||Vt!==null&&Vt.memoizedState.tag&1){if(u.flags|=2048,qs(9,{destroy:void 0},Db.bind(null,u,p,l,r),null),yt===null)throw Error(a(349));b||(ua&127)!==0||jb(u,r,l)}return l}function jb(i,r,l){i.flags|=16384,i={getSnapshot:r,value:l},r=Ue.updateQueue,r===null?(r=au(),Ue.updateQueue=r,r.stores=[i]):(l=r.stores,l===null?r.stores=[i]:l.push(i))}function Db(i,r,l,u){r.value=l,r.getSnapshot=u,Ib(r)&&zb(i)}function Lb(i,r,l){return l(function(){Ib(r)&&zb(i)})}function Ib(i){var r=i.getSnapshot;i=i.value;try{var l=r();return!Yn(i,l)}catch{return!0}}function zb(i){var r=Ir(i,2);r!==null&&In(r,i,2)}function Vd(i){var r=Sn();if(typeof i=="function"){var l=i;if(i=l(),Kr){un(!0);try{l()}finally{un(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:i},r}function Bb(i,r,l,u){return i.baseState=l,Qd(i,ht,typeof u=="function"?u:fa)}function O_(i,r,l,u,p){if(cu(i))throw Error(a(485));if(i=r.action,i!==null){var b={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){b.listeners.push(E)}};U.T!==null?l(!0):b.isTransition=!1,u(b),l=r.pending,l===null?(b.next=r.pending=b,Ub(r,b)):(b.next=l.next,r.pending=l.next=b)}}function Ub(i,r){var l=r.action,u=r.payload,p=i.state;if(r.isTransition){var b=U.T,E={};U.T=E;try{var N=l(p,u),I=U.S;I!==null&&I(E,N),$b(i,r,N)}catch(X){Xd(i,r,X)}finally{b!==null&&E.types!==null&&(b.types=E.types),U.T=b}}else try{b=l(p,u),$b(i,r,b)}catch(X){Xd(i,r,X)}}function $b(i,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Fb(i,r,u)},function(u){return Xd(i,r,u)}):Fb(i,r,l)}function Fb(i,r,l){r.status="fulfilled",r.value=l,Pb(r),i.state=l,r=i.pending,r!==null&&(l=r.next,l===r?i.pending=null:(l=l.next,r.next=l,Ub(i,l)))}function Xd(i,r,l){var u=i.pending;if(i.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Pb(r),r=r.next;while(r!==u)}i.action=null}function Pb(i){i=i.listeners;for(var r=0;r<i.length;r++)(0,i[r])()}function qb(i,r){return r}function Hb(i,r){if(Je){var l=yt.formState;if(l!==null){e:{var u=Ue;if(Je){if(_t){t:{for(var p=_t,b=hi;p.nodeType!==8;){if(!b){p=null;break t}if(p=pi(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){_t=pi(p.nextSibling),u=p.data==="F!";break e}}$a(u)}u=!1}u&&(r=l[0])}}return l=Sn(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qb,lastRenderedState:r},l.queue=u,l=cy.bind(null,Ue,u),u.dispatch=l,u=Vd(!1),b=nh.bind(null,Ue,!1,u.queue),u=Sn(),p={state:r,dispatch:null,action:i,pending:null},u.queue=p,l=O_.bind(null,Ue,p,b,l),p.dispatch=l,u.memoizedState=i,[r,l,!1]}function Kb(i){var r=Kt();return Gb(r,ht,i)}function Gb(i,r,l){if(r=Qd(i,r,qb)[0],i=su(fa)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=xo(r)}catch(E){throw E===Bs?Xc:E}else u=r;r=Kt();var p=r.queue,b=p.dispatch;return l!==r.memoizedState&&(Ue.flags|=2048,qs(9,{destroy:void 0},R_.bind(null,p,l),null)),[u,b,i]}function R_(i,r){i.action=r}function Qb(i){var r=Kt(),l=ht;if(l!==null)return Gb(r,l,i);Kt(),r=r.memoizedState,l=Kt();var u=l.queue.dispatch;return l.memoizedState=i,[r,u,!1]}function qs(i,r,l,u){return i={tag:i,create:l,deps:u,inst:r,next:null},r=Ue.updateQueue,r===null&&(r=au(),Ue.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=i.next=i:(u=l.next,l.next=i,i.next=u,r.lastEffect=i),i}function Yb(){return Kt().memoizedState}function lu(i,r,l,u){var p=Sn();Ue.flags|=i,p.memoizedState=qs(1|r,{destroy:void 0},l,u===void 0?null:u)}function ou(i,r,l,u){var p=Kt();u=u===void 0?null:u;var b=p.memoizedState.inst;ht!==null&&u!==null&&Fd(u,ht.memoizedState.deps)?p.memoizedState=qs(r,b,l,u):(Ue.flags|=i,p.memoizedState=qs(1|r,b,l,u))}function Vb(i,r){lu(8390656,8,i,r)}function Wd(i,r){ou(2048,8,i,r)}function M_(i){Ue.flags|=4;var r=Ue.updateQueue;if(r===null)r=au(),Ue.updateQueue=r,r.events=[i];else{var l=r.events;l===null?r.events=[i]:l.push(i)}}function Xb(i){var r=Kt().memoizedState;return M_({ref:r,nextImpl:i}),function(){if((rt&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Wb(i,r){return ou(4,2,i,r)}function Zb(i,r){return ou(4,4,i,r)}function Jb(i,r){if(typeof r=="function"){i=i();var l=r(i);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return i=i(),r.current=i,function(){r.current=null}}function ey(i,r,l){l=l!=null?l.concat([i]):null,ou(4,4,Jb.bind(null,r,i),l)}function Zd(){}function ty(i,r){var l=Kt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&Fd(r,u[1])?u[0]:(l.memoizedState=[i,r],i)}function ny(i,r){var l=Kt();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&Fd(r,u[1]))return u[0];if(u=i(),Kr){un(!0);try{i()}finally{un(!1)}}return l.memoizedState=[u,r],u}function Jd(i,r,l){return l===void 0||(ua&1073741824)!==0&&(Xe&261930)===0?i.memoizedState=r:(i.memoizedState=l,i=ix(),Ue.lanes|=i,Va|=i,l)}function iy(i,r,l,u){return Yn(l,r)?l:$s.current!==null?(i=Jd(i,l,u),Yn(i,r)||(Xt=!0),i):(ua&42)===0||(ua&1073741824)!==0&&(Xe&261930)===0?(Xt=!0,i.memoizedState=l):(i=ix(),Ue.lanes|=i,Va|=i,r)}function ay(i,r,l,u,p){var b=ae.p;ae.p=b!==0&&8>b?b:8;var E=U.T,N={};U.T=N,nh(i,!1,r,l);try{var I=p(),X=U.S;if(X!==null&&X(N,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ie=T_(I,u);vo(i,r,ie,ei(i))}else vo(i,r,u,ei(i))}catch(oe){vo(i,r,{then:function(){},status:"rejected",reason:oe},ei())}finally{ae.p=b,E!==null&&N.types!==null&&(E.types=N.types),U.T=E}}function j_(){}function eh(i,r,l,u){if(i.tag!==5)throw Error(a(476));var p=ry(i).queue;ay(i,p,r,G,l===null?j_:function(){return sy(i),l(u)})}function ry(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:G},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:l},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function sy(i){var r=ry(i);r.next===null&&(r=i.alternate.memoizedState),vo(i,r.next.queue,{},ei())}function th(){return ln(zo)}function ly(){return Kt().memoizedState}function oy(){return Kt().memoizedState}function D_(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var l=ei();i=qa(l);var u=Ha(r,i,l);u!==null&&(In(u,r,l),po(u,r,l)),r={cache:Od()},i.payload=r;return}r=r.return}}function L_(i,r,l){var u=ei();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},cu(i)?uy(r,l):(l=xd(i,r,l,u),l!==null&&(In(l,i,u),fy(l,r,u)))}function cy(i,r,l){var u=ei();vo(i,r,l,u)}function vo(i,r,l,u){var p={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(cu(i))uy(r,p);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=r.lastRenderedReducer,b!==null))try{var E=r.lastRenderedState,N=b(E,l);if(p.hasEagerState=!0,p.eagerState=N,Yn(N,E))return qc(i,r,p,0),yt===null&&Pc(),!1}catch{}finally{}if(l=xd(i,r,p,u),l!==null)return In(l,i,u),fy(l,r,u),!0}return!1}function nh(i,r,l,u){if(u={lane:2,revertLane:Dh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},cu(i)){if(r)throw Error(a(479))}else r=xd(i,l,u,2),r!==null&&In(r,i,2)}function cu(i){var r=i.alternate;return i===Ue||r!==null&&r===Ue}function uy(i,r){Fs=nu=!0;var l=i.pending;l===null?r.next=r:(r.next=l.next,l.next=r),i.pending=r}function fy(i,r,l){if((l&4194048)!==0){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,De(i,l)}}var Eo={readContext:ln,use:ru,useCallback:It,useContext:It,useEffect:It,useImperativeHandle:It,useLayoutEffect:It,useInsertionEffect:It,useMemo:It,useReducer:It,useRef:It,useState:It,useDebugValue:It,useDeferredValue:It,useTransition:It,useSyncExternalStore:It,useId:It,useHostTransitionStatus:It,useFormState:It,useActionState:It,useOptimistic:It,useMemoCache:It,useCacheRefresh:It};Eo.useEffectEvent=It;var dy={readContext:ln,use:ru,useCallback:function(i,r){return Sn().memoizedState=[i,r===void 0?null:r],i},useContext:ln,useEffect:Vb,useImperativeHandle:function(i,r,l){l=l!=null?l.concat([i]):null,lu(4194308,4,Jb.bind(null,r,i),l)},useLayoutEffect:function(i,r){return lu(4194308,4,i,r)},useInsertionEffect:function(i,r){lu(4,2,i,r)},useMemo:function(i,r){var l=Sn();r=r===void 0?null:r;var u=i();if(Kr){un(!0);try{i()}finally{un(!1)}}return l.memoizedState=[u,r],u},useReducer:function(i,r,l){var u=Sn();if(l!==void 0){var p=l(r);if(Kr){un(!0);try{l(r)}finally{un(!1)}}}else p=r;return u.memoizedState=u.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},u.queue=i,i=i.dispatch=L_.bind(null,Ue,i),[u.memoizedState,i]},useRef:function(i){var r=Sn();return i={current:i},r.memoizedState=i},useState:function(i){i=Vd(i);var r=i.queue,l=cy.bind(null,Ue,r);return r.dispatch=l,[i.memoizedState,l]},useDebugValue:Zd,useDeferredValue:function(i,r){var l=Sn();return Jd(l,i,r)},useTransition:function(){var i=Vd(!1);return i=ay.bind(null,Ue,i.queue,!0,!1),Sn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,l){var u=Ue,p=Sn();if(Je){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),yt===null)throw Error(a(349));(Xe&127)!==0||jb(u,r,l)}p.memoizedState=l;var b={value:l,getSnapshot:r};return p.queue=b,Vb(Lb.bind(null,u,b,i),[i]),u.flags|=2048,qs(9,{destroy:void 0},Db.bind(null,u,b,l,r),null),l},useId:function(){var i=Sn(),r=yt.identifierPrefix;if(Je){var l=Fi,u=$i;l=(u&~(1<<32-ot(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=iu++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=C_++,r="_"+r+"r_"+l.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:th,useFormState:Hb,useActionState:Hb,useOptimistic:function(i){var r=Sn();r.memoizedState=r.baseState=i;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=nh.bind(null,Ue,!0,l),l.dispatch=r,[i,r]},useMemoCache:Gd,useCacheRefresh:function(){return Sn().memoizedState=D_.bind(null,Ue)},useEffectEvent:function(i){var r=Sn(),l={impl:i};return r.memoizedState=l,function(){if((rt&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},ih={readContext:ln,use:ru,useCallback:ty,useContext:ln,useEffect:Wd,useImperativeHandle:ey,useInsertionEffect:Wb,useLayoutEffect:Zb,useMemo:ny,useReducer:su,useRef:Yb,useState:function(){return su(fa)},useDebugValue:Zd,useDeferredValue:function(i,r){var l=Kt();return iy(l,ht.memoizedState,i,r)},useTransition:function(){var i=su(fa)[0],r=Kt().memoizedState;return[typeof i=="boolean"?i:xo(i),r]},useSyncExternalStore:Mb,useId:ly,useHostTransitionStatus:th,useFormState:Kb,useActionState:Kb,useOptimistic:function(i,r){var l=Kt();return Bb(l,ht,i,r)},useMemoCache:Gd,useCacheRefresh:oy};ih.useEffectEvent=Xb;var hy={readContext:ln,use:ru,useCallback:ty,useContext:ln,useEffect:Wd,useImperativeHandle:ey,useInsertionEffect:Wb,useLayoutEffect:Zb,useMemo:ny,useReducer:Yd,useRef:Yb,useState:function(){return Yd(fa)},useDebugValue:Zd,useDeferredValue:function(i,r){var l=Kt();return ht===null?Jd(l,i,r):iy(l,ht.memoizedState,i,r)},useTransition:function(){var i=Yd(fa)[0],r=Kt().memoizedState;return[typeof i=="boolean"?i:xo(i),r]},useSyncExternalStore:Mb,useId:ly,useHostTransitionStatus:th,useFormState:Qb,useActionState:Qb,useOptimistic:function(i,r){var l=Kt();return ht!==null?Bb(l,ht,i,r):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:Gd,useCacheRefresh:oy};hy.useEffectEvent=Xb;function ah(i,r,l,u){r=i.memoizedState,l=l(u,r),l=l==null?r:g({},r,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var rh={enqueueSetState:function(i,r,l){i=i._reactInternals;var u=ei(),p=qa(u);p.payload=r,l!=null&&(p.callback=l),r=Ha(i,p,u),r!==null&&(In(r,i,u),po(r,i,u))},enqueueReplaceState:function(i,r,l){i=i._reactInternals;var u=ei(),p=qa(u);p.tag=1,p.payload=r,l!=null&&(p.callback=l),r=Ha(i,p,u),r!==null&&(In(r,i,u),po(r,i,u))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var l=ei(),u=qa(l);u.tag=2,r!=null&&(u.callback=r),r=Ha(i,u,l),r!==null&&(In(r,i,l),po(r,i,l))}};function my(i,r,l,u,p,b,E){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(u,b,E):r.prototype&&r.prototype.isPureReactComponent?!so(l,u)||!so(p,b):!0}function py(i,r,l,u){i=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==i&&rh.enqueueReplaceState(r,r.state,null)}function Gr(i,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(i=i.defaultProps){l===r&&(l=g({},l));for(var p in i)l[p]===void 0&&(l[p]=i[p])}return l}function gy(i){Fc(i)}function by(i){console.error(i)}function yy(i){Fc(i)}function uu(i,r){try{var l=i.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function xy(i,r,l){try{var u=i.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function sh(i,r,l){return l=qa(l),l.tag=3,l.payload={element:null},l.callback=function(){uu(i,r)},l}function vy(i){return i=qa(i),i.tag=3,i}function Ey(i,r,l,u){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var b=u.value;i.payload=function(){return p(b)},i.callback=function(){xy(r,l,u)}}var E=l.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(i.callback=function(){xy(r,l,u),typeof p!="function"&&(Xa===null?Xa=new Set([this]):Xa.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})})}function I_(i,r,l,u,p){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Ls(r,l,p,!0),l=Xn.current,l!==null){switch(l.tag){case 31:case 13:return mi===null?Su():l.alternate===null&&zt===0&&(zt=3),l.flags&=-257,l.flags|=65536,l.lanes=p,u===Wc?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),Rh(i,u,p)),!1;case 22:return l.flags|=65536,u===Wc?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([u]):l.add(u)),Rh(i,u,p)),!1}throw Error(a(435,l.tag))}return Rh(i,u,p),Su(),!1}if(Je)return r=Xn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==kd&&(i=Error(a(422),{cause:u}),co(ui(i,l)))):(u!==kd&&(r=Error(a(423),{cause:u}),co(ui(r,l))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,u=ui(u,l),p=sh(i.stateNode,u,p),Id(i,p),zt!==4&&(zt=2)),!1;var b=Error(a(520),{cause:u});if(b=ui(b,l),Ao===null?Ao=[b]:Ao.push(b),zt!==4&&(zt=2),r===null)return!0;u=ui(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,i=p&-p,l.lanes|=i,i=sh(l.stateNode,u,i),Id(l,i),!1;case 1:if(r=l.type,b=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Xa===null||!Xa.has(b))))return l.flags|=65536,p&=-p,l.lanes|=p,p=vy(p),Ey(p,i,l,u),Id(l,p),!1}l=l.return}while(l!==null);return!1}var lh=Error(a(461)),Xt=!1;function on(i,r,l,u){r.child=i===null?kb(r,null,l,u):Hr(r,i.child,l,u)}function Sy(i,r,l,u,p){l=l.render;var b=r.ref;if("ref"in u){var E={};for(var N in u)N!=="ref"&&(E[N]=u[N])}else E=u;return $r(r),u=Pd(i,r,l,E,b,p),N=qd(),i!==null&&!Xt?(Hd(i,r,p),da(i,r,p)):(Je&&N&&wd(r),r.flags|=1,on(i,r,u,p),r.child)}function wy(i,r,l,u,p){if(i===null){var b=l.type;return typeof b=="function"&&!vd(b)&&b.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=b,_y(i,r,b,u,p)):(i=Kc(l.type,null,u,r,r.mode,p),i.ref=r.ref,i.return=r,r.child=i)}if(b=i.child,!ph(i,p)){var E=b.memoizedProps;if(l=l.compare,l=l!==null?l:so,l(E,u)&&i.ref===r.ref)return da(i,r,p)}return r.flags|=1,i=sa(b,u),i.ref=r.ref,i.return=r,r.child=i}function _y(i,r,l,u,p){if(i!==null){var b=i.memoizedProps;if(so(b,u)&&i.ref===r.ref)if(Xt=!1,r.pendingProps=u=b,ph(i,p))(i.flags&131072)!==0&&(Xt=!0);else return r.lanes=i.lanes,da(i,r,p)}return oh(i,r,l,u,p)}function ky(i,r,l,u){var p=u.children,b=i!==null?i.memoizedState:null;if(i===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(b=b!==null?b.baseLanes|l:l,i!==null){for(u=r.child=i.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~b}else u=0,r.child=null;return Ny(i,r,b,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&Vc(r,b!==null?b.cachePool:null),b!==null?Cb(r,b):Bd(),Ab(r);else return u=r.lanes=536870912,Ny(i,r,b!==null?b.baseLanes|l:l,l,u)}else b!==null?(Vc(r,b.cachePool),Cb(r,b),Ga(),r.memoizedState=null):(i!==null&&Vc(r,null),Bd(),Ga());return on(i,r,p,l),r.child}function So(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Ny(i,r,l,u,p){var b=Md();return b=b===null?null:{parent:Yt._currentValue,pool:b},r.memoizedState={baseLanes:l,cachePool:b},i!==null&&Vc(r,null),Bd(),Ab(r),i!==null&&Ls(i,r,u,!0),r.childLanes=p,null}function fu(i,r){return r=hu({mode:r.mode,children:r.children},i.mode),r.ref=i.ref,i.child=r,r.return=i,r}function Ty(i,r,l){return Hr(r,i.child,null,l),i=fu(r,r.pendingProps),i.flags|=2,Wn(r),r.memoizedState=null,i}function z_(i,r,l){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(Je){if(u.mode==="hidden")return i=fu(r,u),r.lanes=536870912,So(null,i);if($d(r),(i=_t)?(i=Ux(i,hi),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Ba!==null?{id:$i,overflow:Fi}:null,retryLane:536870912,hydrationErrors:null},l=ub(i),l.return=r,r.child=l,sn=r,_t=null)):i=null,i===null)throw $a(r);return r.lanes=536870912,null}return fu(r,u)}var b=i.memoizedState;if(b!==null){var E=b.dehydrated;if($d(r),p)if(r.flags&256)r.flags&=-257,r=Ty(i,r,l);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(a(558));else if(Xt||Ls(i,r,l,!1),p=(l&i.childLanes)!==0,Xt||p){if(u=yt,u!==null&&(E=Ft(u,l),E!==0&&E!==b.retryLane))throw b.retryLane=E,Ir(i,E),In(u,i,E),lh;Su(),r=Ty(i,r,l)}else i=b.treeContext,_t=pi(E.nextSibling),sn=r,Je=!0,Ua=null,hi=!1,i!==null&&hb(r,i),r=fu(r,u),r.flags|=4096;return r}return i=sa(i.child,{mode:u.mode,children:u.children}),i.ref=r.ref,r.child=i,i.return=r,i}function du(i,r){var l=r.ref;if(l===null)i!==null&&i.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(i===null||i.ref!==l)&&(r.flags|=4194816)}}function oh(i,r,l,u,p){return $r(r),l=Pd(i,r,l,u,void 0,p),u=qd(),i!==null&&!Xt?(Hd(i,r,p),da(i,r,p)):(Je&&u&&wd(r),r.flags|=1,on(i,r,l,p),r.child)}function Cy(i,r,l,u,p,b){return $r(r),r.updateQueue=null,l=Rb(r,u,l,p),Ob(i),u=qd(),i!==null&&!Xt?(Hd(i,r,b),da(i,r,b)):(Je&&u&&wd(r),r.flags|=1,on(i,r,l,b),r.child)}function Ay(i,r,l,u,p){if($r(r),r.stateNode===null){var b=Rs,E=l.contextType;typeof E=="object"&&E!==null&&(b=ln(E)),b=new l(u,b),r.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=rh,r.stateNode=b,b._reactInternals=r,b=r.stateNode,b.props=u,b.state=r.memoizedState,b.refs={},Dd(r),E=l.contextType,b.context=typeof E=="object"&&E!==null?ln(E):Rs,b.state=r.memoizedState,E=l.getDerivedStateFromProps,typeof E=="function"&&(ah(r,l,E,u),b.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(E=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),E!==b.state&&rh.enqueueReplaceState(b,b.state,null),bo(r,u,b,p),go(),b.state=r.memoizedState),typeof b.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(i===null){b=r.stateNode;var N=r.memoizedProps,I=Gr(l,N);b.props=I;var X=b.context,ie=l.contextType;E=Rs,typeof ie=="object"&&ie!==null&&(E=ln(ie));var oe=l.getDerivedStateFromProps;ie=typeof oe=="function"||typeof b.getSnapshotBeforeUpdate=="function",N=r.pendingProps!==N,ie||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N||X!==E)&&py(r,b,u,E),Pa=!1;var W=r.memoizedState;b.state=W,bo(r,u,b,p),go(),X=r.memoizedState,N||W!==X||Pa?(typeof oe=="function"&&(ah(r,l,oe,u),X=r.memoizedState),(I=Pa||my(r,l,I,u,W,X,E))?(ie||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(r.flags|=4194308)):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=X),b.props=u,b.state=X,b.context=E,u=I):(typeof b.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{b=r.stateNode,Ld(i,r),E=r.memoizedProps,ie=Gr(l,E),b.props=ie,oe=r.pendingProps,W=b.context,X=l.contextType,I=Rs,typeof X=="object"&&X!==null&&(I=ln(X)),N=l.getDerivedStateFromProps,(X=typeof N=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==oe||W!==I)&&py(r,b,u,I),Pa=!1,W=r.memoizedState,b.state=W,bo(r,u,b,p),go();var ee=r.memoizedState;E!==oe||W!==ee||Pa||i!==null&&i.dependencies!==null&&Qc(i.dependencies)?(typeof N=="function"&&(ah(r,l,N,u),ee=r.memoizedState),(ie=Pa||my(r,l,ie,u,W,ee,I)||i!==null&&i.dependencies!==null&&Qc(i.dependencies))?(X||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,ee,I),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,ee,I)),typeof b.componentDidUpdate=="function"&&(r.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=ee),b.props=u,b.state=ee,b.context=I,u=ie):(typeof b.componentDidUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),u=!1)}return b=u,du(i,r),u=(r.flags&128)!==0,b||u?(b=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:b.render(),r.flags|=1,i!==null&&u?(r.child=Hr(r,i.child,null,p),r.child=Hr(r,null,l,p)):on(i,r,l,p),r.memoizedState=b.state,i=r.child):i=da(i,r,p),i}function Oy(i,r,l,u){return Br(),r.flags|=256,on(i,r,l,u),r.child}var ch={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uh(i){return{baseLanes:i,cachePool:xb()}}function fh(i,r,l){return i=i!==null?i.childLanes&~l:0,r&&(i|=Jn),i}function Ry(i,r,l){var u=r.pendingProps,p=!1,b=(r.flags&128)!==0,E;if((E=b)||(E=i!==null&&i.memoizedState===null?!1:(Ht.current&2)!==0),E&&(p=!0,r.flags&=-129),E=(r.flags&32)!==0,r.flags&=-33,i===null){if(Je){if(p?Ka(r):Ga(),(i=_t)?(i=Ux(i,hi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Ba!==null?{id:$i,overflow:Fi}:null,retryLane:536870912,hydrationErrors:null},l=ub(i),l.return=r,r.child=l,sn=r,_t=null)):i=null,i===null)throw $a(r);return Qh(i)?r.lanes=32:r.lanes=536870912,null}var N=u.children;return u=u.fallback,p?(Ga(),p=r.mode,N=hu({mode:"hidden",children:N},p),u=zr(u,p,l,null),N.return=r,u.return=r,N.sibling=u,r.child=N,u=r.child,u.memoizedState=uh(l),u.childLanes=fh(i,E,l),r.memoizedState=ch,So(null,u)):(Ka(r),dh(r,N))}var I=i.memoizedState;if(I!==null&&(N=I.dehydrated,N!==null)){if(b)r.flags&256?(Ka(r),r.flags&=-257,r=hh(i,r,l)):r.memoizedState!==null?(Ga(),r.child=i.child,r.flags|=128,r=null):(Ga(),N=u.fallback,p=r.mode,u=hu({mode:"visible",children:u.children},p),N=zr(N,p,l,null),N.flags|=2,u.return=r,N.return=r,u.sibling=N,r.child=u,Hr(r,i.child,null,l),u=r.child,u.memoizedState=uh(l),u.childLanes=fh(i,E,l),r.memoizedState=ch,r=So(null,u));else if(Ka(r),Qh(N)){if(E=N.nextSibling&&N.nextSibling.dataset,E)var X=E.dgst;E=X,u=Error(a(419)),u.stack="",u.digest=E,co({value:u,source:null,stack:null}),r=hh(i,r,l)}else if(Xt||Ls(i,r,l,!1),E=(l&i.childLanes)!==0,Xt||E){if(E=yt,E!==null&&(u=Ft(E,l),u!==0&&u!==I.retryLane))throw I.retryLane=u,Ir(i,u),In(E,i,u),lh;Gh(N)||Su(),r=hh(i,r,l)}else Gh(N)?(r.flags|=192,r.child=i.child,r=null):(i=I.treeContext,_t=pi(N.nextSibling),sn=r,Je=!0,Ua=null,hi=!1,i!==null&&hb(r,i),r=dh(r,u.children),r.flags|=4096);return r}return p?(Ga(),N=u.fallback,p=r.mode,I=i.child,X=I.sibling,u=sa(I,{mode:"hidden",children:u.children}),u.subtreeFlags=I.subtreeFlags&65011712,X!==null?N=sa(X,N):(N=zr(N,p,l,null),N.flags|=2),N.return=r,u.return=r,u.sibling=N,r.child=u,So(null,u),u=r.child,N=i.child.memoizedState,N===null?N=uh(l):(p=N.cachePool,p!==null?(I=Yt._currentValue,p=p.parent!==I?{parent:I,pool:I}:p):p=xb(),N={baseLanes:N.baseLanes|l,cachePool:p}),u.memoizedState=N,u.childLanes=fh(i,E,l),r.memoizedState=ch,So(i.child,u)):(Ka(r),l=i.child,i=l.sibling,l=sa(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,i!==null&&(E=r.deletions,E===null?(r.deletions=[i],r.flags|=16):E.push(i)),r.child=l,r.memoizedState=null,l)}function dh(i,r){return r=hu({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function hu(i,r){return i=Vn(22,i,null,r),i.lanes=0,i}function hh(i,r,l){return Hr(r,i.child,null,l),i=dh(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function My(i,r,l){i.lanes|=r;var u=i.alternate;u!==null&&(u.lanes|=r),Cd(i.return,r,l)}function mh(i,r,l,u,p,b){var E=i.memoizedState;E===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:p,treeForkCount:b}:(E.isBackwards=r,E.rendering=null,E.renderingStartTime=0,E.last=u,E.tail=l,E.tailMode=p,E.treeForkCount=b)}function jy(i,r,l){var u=r.pendingProps,p=u.revealOrder,b=u.tail;u=u.children;var E=Ht.current,N=(E&2)!==0;if(N?(E=E&1|2,r.flags|=128):E&=1,C(Ht,E),on(i,r,u,l),u=Je?oo:0,!N&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&My(i,l,r);else if(i.tag===19)My(i,l,r);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(p){case"forwards":for(l=r.child,p=null;l!==null;)i=l.alternate,i!==null&&tu(i)===null&&(p=l),l=l.sibling;l=p,l===null?(p=r.child,r.child=null):(p=l.sibling,l.sibling=null),mh(r,!1,p,l,b,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=r.child,r.child=null;p!==null;){if(i=p.alternate,i!==null&&tu(i)===null){r.child=p;break}i=p.sibling,p.sibling=l,l=p,p=i}mh(r,!0,l,null,b,u);break;case"together":mh(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function da(i,r,l){if(i!==null&&(r.dependencies=i.dependencies),Va|=r.lanes,(l&r.childLanes)===0)if(i!==null){if(Ls(i,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(i!==null&&r.child!==i.child)throw Error(a(153));if(r.child!==null){for(i=r.child,l=sa(i,i.pendingProps),r.child=l,l.return=r;i.sibling!==null;)i=i.sibling,l=l.sibling=sa(i,i.pendingProps),l.return=r;l.sibling=null}return r.child}function ph(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&Qc(i)))}function B_(i,r,l){switch(r.tag){case 3:ke(r,r.stateNode.containerInfo),Fa(r,Yt,i.memoizedState.cache),Br();break;case 27:case 5:Dt(r);break;case 4:ke(r,r.stateNode.containerInfo);break;case 10:Fa(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,$d(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Ka(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Ry(i,r,l):(Ka(r),i=da(i,r,l),i!==null?i.sibling:null);Ka(r);break;case 19:var p=(i.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Ls(i,r,l,!1),u=(l&r.childLanes)!==0),p){if(u)return jy(i,r,l);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),C(Ht,Ht.current),u)break;return null;case 22:return r.lanes=0,ky(i,r,l,r.pendingProps);case 24:Fa(r,Yt,i.memoizedState.cache)}return da(i,r,l)}function Dy(i,r,l){if(i!==null)if(i.memoizedProps!==r.pendingProps)Xt=!0;else{if(!ph(i,l)&&(r.flags&128)===0)return Xt=!1,B_(i,r,l);Xt=(i.flags&131072)!==0}else Xt=!1,Je&&(r.flags&1048576)!==0&&db(r,oo,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(i=Pr(r.elementType),r.type=i,typeof i=="function")vd(i)?(u=Gr(i,u),r.tag=1,r=Ay(null,r,i,u,l)):(r.tag=0,r=oh(null,r,i,u,l));else{if(i!=null){var p=i.$$typeof;if(p===j){r.tag=11,r=Sy(null,r,i,u,l);break e}else if(p===q){r.tag=14,r=wy(null,r,i,u,l);break e}}throw r=Q(i)||i,Error(a(306,r,""))}}return r;case 0:return oh(i,r,r.type,r.pendingProps,l);case 1:return u=r.type,p=Gr(u,r.pendingProps),Ay(i,r,u,p,l);case 3:e:{if(ke(r,r.stateNode.containerInfo),i===null)throw Error(a(387));u=r.pendingProps;var b=r.memoizedState;p=b.element,Ld(i,r),bo(r,u,null,l);var E=r.memoizedState;if(u=E.cache,Fa(r,Yt,u),u!==b.cache&&Ad(r,[Yt],l,!0),go(),u=E.element,b.isDehydrated)if(b={element:u,isDehydrated:!1,cache:E.cache},r.updateQueue.baseState=b,r.memoizedState=b,r.flags&256){r=Oy(i,r,u,l);break e}else if(u!==p){p=ui(Error(a(424)),r),co(p),r=Oy(i,r,u,l);break e}else{switch(i=r.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(_t=pi(i.firstChild),sn=r,Je=!0,Ua=null,hi=!0,l=kb(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Br(),u===p){r=da(i,r,l);break e}on(i,r,u,l)}r=r.child}return r;case 26:return du(i,r),i===null?(l=Kx(r.type,null,r.pendingProps,null))?r.memoizedState=l:Je||(l=r.type,i=r.pendingProps,u=Au(ve.current).createElement(l),u[Pt]=r,u[fn]=i,cn(u,l,i),Gt(u),r.stateNode=u):r.memoizedState=Kx(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return Dt(r),i===null&&Je&&(u=r.stateNode=Px(r.type,r.pendingProps,ve.current),sn=r,hi=!0,p=_t,er(r.type)?(Yh=p,_t=pi(u.firstChild)):_t=p),on(i,r,r.pendingProps.children,l),du(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&Je&&((p=u=_t)&&(u=mk(u,r.type,r.pendingProps,hi),u!==null?(r.stateNode=u,sn=r,_t=pi(u.firstChild),hi=!1,p=!0):p=!1),p||$a(r)),Dt(r),p=r.type,b=r.pendingProps,E=i!==null?i.memoizedProps:null,u=b.children,qh(p,b)?u=null:E!==null&&qh(p,E)&&(r.flags|=32),r.memoizedState!==null&&(p=Pd(i,r,A_,null,null,l),zo._currentValue=p),du(i,r),on(i,r,u,l),r.child;case 6:return i===null&&Je&&((i=l=_t)&&(l=pk(l,r.pendingProps,hi),l!==null?(r.stateNode=l,sn=r,_t=null,i=!0):i=!1),i||$a(r)),null;case 13:return Ry(i,r,l);case 4:return ke(r,r.stateNode.containerInfo),u=r.pendingProps,i===null?r.child=Hr(r,null,u,l):on(i,r,u,l),r.child;case 11:return Sy(i,r,r.type,r.pendingProps,l);case 7:return on(i,r,r.pendingProps,l),r.child;case 8:return on(i,r,r.pendingProps.children,l),r.child;case 12:return on(i,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,Fa(r,r.type,u.value),on(i,r,u.children,l),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,$r(r),p=ln(p),u=u(p),r.flags|=1,on(i,r,u,l),r.child;case 14:return wy(i,r,r.type,r.pendingProps,l);case 15:return _y(i,r,r.type,r.pendingProps,l);case 19:return jy(i,r,l);case 31:return z_(i,r,l);case 22:return ky(i,r,l,r.pendingProps);case 24:return $r(r),u=ln(Yt),i===null?(p=Md(),p===null&&(p=yt,b=Od(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=l),p=b),r.memoizedState={parent:u,cache:p},Dd(r),Fa(r,Yt,p)):((i.lanes&l)!==0&&(Ld(i,r),bo(r,null,null,l),go()),p=i.memoizedState,b=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),Fa(r,Yt,u)):(u=b.cache,Fa(r,Yt,u),u!==p.cache&&Ad(r,[Yt],l,!0))),on(i,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function ha(i){i.flags|=4}function gh(i,r,l,u,p){if((r=(i.mode&32)!==0)&&(r=!1),r){if(i.flags|=16777216,(p&335544128)===p)if(i.stateNode.complete)i.flags|=8192;else if(lx())i.flags|=8192;else throw qr=Wc,jd}else i.flags&=-16777217}function Ly(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Xx(r))if(lx())i.flags|=8192;else throw qr=Wc,jd}function mu(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?Le():536870912,i.lanes|=r,Qs|=r)}function wo(i,r){if(!Je)switch(i.tailMode){case"hidden":r=i.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||i.tail===null?i.tail=null:i.tail.sibling=null:u.sibling=null}}function kt(i){var r=i.alternate!==null&&i.alternate.child===i.child,l=0,u=0;if(r)for(var p=i.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=u,i.childLanes=l,r}function U_(i,r,l){var u=r.pendingProps;switch(_d(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(r),null;case 1:return kt(r),null;case 3:return l=r.stateNode,u=null,i!==null&&(u=i.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),ca(Yt),Ke(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(i===null||i.child===null)&&(Ds(r)?ha(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Nd())),kt(r),null;case 26:var p=r.type,b=r.memoizedState;return i===null?(ha(r),b!==null?(kt(r),Ly(r,b)):(kt(r),gh(r,p,null,u,l))):b?b!==i.memoizedState?(ha(r),kt(r),Ly(r,b)):(kt(r),r.flags&=-16777217):(i=i.memoizedProps,i!==u&&ha(r),kt(r),gh(r,p,i,u,l)),null;case 27:if(yn(r),l=ve.current,p=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return kt(r),null}i=pe.current,Ds(r)?mb(r):(i=Px(p,u,l),r.stateNode=i,ha(r))}return kt(r),null;case 5:if(yn(r),p=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return kt(r),null}if(b=pe.current,Ds(r))mb(r);else{var E=Au(ve.current);switch(b){case 1:b=E.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:b=E.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":b=E.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":b=E.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":b=E.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof u.is=="string"?E.createElement("select",{is:u.is}):E.createElement("select"),u.multiple?b.multiple=!0:u.size&&(b.size=u.size);break;default:b=typeof u.is=="string"?E.createElement(p,{is:u.is}):E.createElement(p)}}b[Pt]=r,b[fn]=u;e:for(E=r.child;E!==null;){if(E.tag===5||E.tag===6)b.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===r)break e;for(;E.sibling===null;){if(E.return===null||E.return===r)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}r.stateNode=b;e:switch(cn(b,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ha(r)}}return kt(r),gh(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,l),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(i=ve.current,Ds(r)){if(i=r.stateNode,l=r.memoizedProps,u=null,p=sn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}i[Pt]=r,i=!!(i.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||Rx(i.nodeValue,l)),i||$a(r,!0)}else i=Au(i).createTextNode(u),i[Pt]=r,r.stateNode=i}return kt(r),null;case 31:if(l=r.memoizedState,i===null||i.memoizedState!==null){if(u=Ds(r),l!==null){if(i===null){if(!u)throw Error(a(318));if(i=r.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[Pt]=r}else Br(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;kt(r),i=!1}else l=Nd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return r.flags&256?(Wn(r),r):(Wn(r),null);if((r.flags&128)!==0)throw Error(a(558))}return kt(r),null;case 13:if(u=r.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=Ds(r),u!==null&&u.dehydrated!==null){if(i===null){if(!p)throw Error(a(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Pt]=r}else Br(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;kt(r),p=!1}else p=Nd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(Wn(r),r):(Wn(r),null)}return Wn(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,i=i!==null&&i.memoizedState!==null,l&&(u=r.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),b=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),b!==p&&(u.flags|=2048)),l!==i&&l&&(r.child.flags|=8192),mu(r,r.updateQueue),kt(r),null);case 4:return Ke(),i===null&&Bh(r.stateNode.containerInfo),kt(r),null;case 10:return ca(r.type),kt(r),null;case 19:if(Z(Ht),u=r.memoizedState,u===null)return kt(r),null;if(p=(r.flags&128)!==0,b=u.rendering,b===null)if(p)wo(u,!1);else{if(zt!==0||i!==null&&(i.flags&128)!==0)for(i=r.child;i!==null;){if(b=tu(i),b!==null){for(r.flags|=128,wo(u,!1),i=b.updateQueue,r.updateQueue=i,mu(r,i),r.subtreeFlags=0,i=l,l=r.child;l!==null;)cb(l,i),l=l.sibling;return C(Ht,Ht.current&1|2),Je&&la(r,u.treeForkCount),r.child}i=i.sibling}u.tail!==null&&Ot()>xu&&(r.flags|=128,p=!0,wo(u,!1),r.lanes=4194304)}else{if(!p)if(i=tu(b),i!==null){if(r.flags|=128,p=!0,i=i.updateQueue,r.updateQueue=i,mu(r,i),wo(u,!0),u.tail===null&&u.tailMode==="hidden"&&!b.alternate&&!Je)return kt(r),null}else 2*Ot()-u.renderingStartTime>xu&&l!==536870912&&(r.flags|=128,p=!0,wo(u,!1),r.lanes=4194304);u.isBackwards?(b.sibling=r.child,r.child=b):(i=u.last,i!==null?i.sibling=b:r.child=b,u.last=b)}return u.tail!==null?(i=u.tail,u.rendering=i,u.tail=i.sibling,u.renderingStartTime=Ot(),i.sibling=null,l=Ht.current,C(Ht,p?l&1|2:l&1),Je&&la(r,u.treeForkCount),i):(kt(r),null);case 22:case 23:return Wn(r),Ud(),u=r.memoizedState!==null,i!==null?i.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(kt(r),r.subtreeFlags&6&&(r.flags|=8192)):kt(r),l=r.updateQueue,l!==null&&mu(r,l.retryQueue),l=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),i!==null&&Z(Fr),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),ca(Yt),kt(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function $_(i,r){switch(_d(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return ca(Yt),Ke(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return yn(r),null;case 31:if(r.memoizedState!==null){if(Wn(r),r.alternate===null)throw Error(a(340));Br()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(Wn(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Br()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return Z(Ht),null;case 4:return Ke(),null;case 10:return ca(r.type),null;case 22:case 23:return Wn(r),Ud(),i!==null&&Z(Fr),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return ca(Yt),null;case 25:return null;default:return null}}function Iy(i,r){switch(_d(r),r.tag){case 3:ca(Yt),Ke();break;case 26:case 27:case 5:yn(r);break;case 4:Ke();break;case 31:r.memoizedState!==null&&Wn(r);break;case 13:Wn(r);break;case 19:Z(Ht);break;case 10:ca(r.type);break;case 22:case 23:Wn(r),Ud(),i!==null&&Z(Fr);break;case 24:ca(Yt)}}function _o(i,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var p=u.next;l=p;do{if((l.tag&i)===i){u=void 0;var b=l.create,E=l.inst;u=b(),E.destroy=u}l=l.next}while(l!==p)}}catch(N){dt(r,r.return,N)}}function Qa(i,r,l){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&i)===i){var E=u.inst,N=E.destroy;if(N!==void 0){E.destroy=void 0,p=r;var I=l,X=N;try{X()}catch(ie){dt(p,I,ie)}}}u=u.next}while(u!==b)}}catch(ie){dt(r,r.return,ie)}}function zy(i){var r=i.updateQueue;if(r!==null){var l=i.stateNode;try{Tb(r,l)}catch(u){dt(i,i.return,u)}}}function By(i,r,l){l.props=Gr(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(u){dt(i,r,u)}}function ko(i,r){try{var l=i.ref;if(l!==null){switch(i.tag){case 26:case 27:case 5:var u=i.stateNode;break;case 30:u=i.stateNode;break;default:u=i.stateNode}typeof l=="function"?i.refCleanup=l(u):l.current=u}}catch(p){dt(i,r,p)}}function Pi(i,r){var l=i.ref,u=i.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(p){dt(i,r,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){dt(i,r,p)}else l.current=null}function Uy(i){var r=i.type,l=i.memoizedProps,u=i.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(p){dt(i,i.return,p)}}function bh(i,r,l){try{var u=i.stateNode;ok(u,i.type,l,r),u[fn]=r}catch(p){dt(i,i.return,p)}}function $y(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&er(i.type)||i.tag===4}function yh(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||$y(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&er(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function xh(i,r,l){var u=i.tag;if(u===5||u===6)i=i.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(i,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(i),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=me));else if(u!==4&&(u===27&&er(i.type)&&(l=i.stateNode,r=null),i=i.child,i!==null))for(xh(i,r,l),i=i.sibling;i!==null;)xh(i,r,l),i=i.sibling}function pu(i,r,l){var u=i.tag;if(u===5||u===6)i=i.stateNode,r?l.insertBefore(i,r):l.appendChild(i);else if(u!==4&&(u===27&&er(i.type)&&(l=i.stateNode),i=i.child,i!==null))for(pu(i,r,l),i=i.sibling;i!==null;)pu(i,r,l),i=i.sibling}function Fy(i){var r=i.stateNode,l=i.memoizedProps;try{for(var u=i.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);cn(r,u,l),r[Pt]=i,r[fn]=l}catch(b){dt(i,i.return,b)}}var ma=!1,Wt=!1,vh=!1,Py=typeof WeakSet=="function"?WeakSet:Set,tn=null;function F_(i,r){if(i=i.containerInfo,Fh=Iu,i=eb(i),hd(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var p=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{l.nodeType,b.nodeType}catch{l=null;break e}var E=0,N=-1,I=-1,X=0,ie=0,oe=i,W=null;t:for(;;){for(var ee;oe!==l||p!==0&&oe.nodeType!==3||(N=E+p),oe!==b||u!==0&&oe.nodeType!==3||(I=E+u),oe.nodeType===3&&(E+=oe.nodeValue.length),(ee=oe.firstChild)!==null;)W=oe,oe=ee;for(;;){if(oe===i)break t;if(W===l&&++X===p&&(N=E),W===b&&++ie===u&&(I=E),(ee=oe.nextSibling)!==null)break;oe=W,W=oe.parentNode}oe=ee}l=N===-1||I===-1?null:{start:N,end:I}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ph={focusedElem:i,selectionRange:l},Iu=!1,tn=r;tn!==null;)if(r=tn,i=r.child,(r.subtreeFlags&1028)!==0&&i!==null)i.return=r,tn=i;else for(;tn!==null;){switch(r=tn,b=r.alternate,i=r.flags,r.tag){case 0:if((i&4)!==0&&(i=r.updateQueue,i=i!==null?i.events:null,i!==null))for(l=0;l<i.length;l++)p=i[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&b!==null){i=void 0,l=r,p=b.memoizedProps,b=b.memoizedState,u=l.stateNode;try{var xe=Gr(l.type,p);i=u.getSnapshotBeforeUpdate(xe,b),u.__reactInternalSnapshotBeforeUpdate=i}catch(Me){dt(l,l.return,Me)}}break;case 3:if((i&1024)!==0){if(i=r.stateNode.containerInfo,l=i.nodeType,l===9)Kh(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Kh(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(a(163))}if(i=r.sibling,i!==null){i.return=r.return,tn=i;break}tn=r.return}}function qy(i,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:ga(i,l),u&4&&_o(5,l);break;case 1:if(ga(i,l),u&4)if(i=l.stateNode,r===null)try{i.componentDidMount()}catch(E){dt(l,l.return,E)}else{var p=Gr(l.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(p,r,i.__reactInternalSnapshotBeforeUpdate)}catch(E){dt(l,l.return,E)}}u&64&&zy(l),u&512&&ko(l,l.return);break;case 3:if(ga(i,l),u&64&&(i=l.updateQueue,i!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Tb(i,r)}catch(E){dt(l,l.return,E)}}break;case 27:r===null&&u&4&&Fy(l);case 26:case 5:ga(i,l),r===null&&u&4&&Uy(l),u&512&&ko(l,l.return);break;case 12:ga(i,l);break;case 31:ga(i,l),u&4&&Gy(i,l);break;case 13:ga(i,l),u&4&&Qy(i,l),u&64&&(i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(l=X_.bind(null,l),gk(i,l))));break;case 22:if(u=l.memoizedState!==null||ma,!u){r=r!==null&&r.memoizedState!==null||Wt,p=ma;var b=Wt;ma=u,(Wt=r)&&!b?ba(i,l,(l.subtreeFlags&8772)!==0):ga(i,l),ma=p,Wt=b}break;case 30:break;default:ga(i,l)}}function Hy(i){var r=i.alternate;r!==null&&(i.alternate=null,Hy(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&Yl(r)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Tt=null,Mn=!1;function pa(i,r,l){for(l=l.child;l!==null;)Ky(i,r,l),l=l.sibling}function Ky(i,r,l){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(an,l)}catch{}switch(l.tag){case 26:Wt||Pi(l,r),pa(i,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Wt||Pi(l,r);var u=Tt,p=Mn;er(l.type)&&(Tt=l.stateNode,Mn=!1),pa(i,r,l),Do(l.stateNode),Tt=u,Mn=p;break;case 5:Wt||Pi(l,r);case 6:if(u=Tt,p=Mn,Tt=null,pa(i,r,l),Tt=u,Mn=p,Tt!==null)if(Mn)try{(Tt.nodeType===9?Tt.body:Tt.nodeName==="HTML"?Tt.ownerDocument.body:Tt).removeChild(l.stateNode)}catch(b){dt(l,r,b)}else try{Tt.removeChild(l.stateNode)}catch(b){dt(l,r,b)}break;case 18:Tt!==null&&(Mn?(i=Tt,zx(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),tl(i)):zx(Tt,l.stateNode));break;case 4:u=Tt,p=Mn,Tt=l.stateNode.containerInfo,Mn=!0,pa(i,r,l),Tt=u,Mn=p;break;case 0:case 11:case 14:case 15:Qa(2,l,r),Wt||Qa(4,l,r),pa(i,r,l);break;case 1:Wt||(Pi(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&By(l,r,u)),pa(i,r,l);break;case 21:pa(i,r,l);break;case 22:Wt=(u=Wt)||l.memoizedState!==null,pa(i,r,l),Wt=u;break;default:pa(i,r,l)}}function Gy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{tl(i)}catch(l){dt(r,r.return,l)}}}function Qy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{tl(i)}catch(l){dt(r,r.return,l)}}function P_(i){switch(i.tag){case 31:case 13:case 19:var r=i.stateNode;return r===null&&(r=i.stateNode=new Py),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new Py),r;default:throw Error(a(435,i.tag))}}function gu(i,r){var l=P_(i);r.forEach(function(u){if(!l.has(u)){l.add(u);var p=W_.bind(null,i,u);u.then(p,p)}})}function jn(i,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var p=l[u],b=i,E=r,N=E;e:for(;N!==null;){switch(N.tag){case 27:if(er(N.type)){Tt=N.stateNode,Mn=!1;break e}break;case 5:Tt=N.stateNode,Mn=!1;break e;case 3:case 4:Tt=N.stateNode.containerInfo,Mn=!0;break e}N=N.return}if(Tt===null)throw Error(a(160));Ky(b,E,p),Tt=null,Mn=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Yy(r,i),r=r.sibling}var Ti=null;function Yy(i,r){var l=i.alternate,u=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:jn(r,i),Dn(i),u&4&&(Qa(3,i,i.return),_o(3,i),Qa(5,i,i.return));break;case 1:jn(r,i),Dn(i),u&512&&(Wt||l===null||Pi(l,l.return)),u&64&&ma&&(i=i.updateQueue,i!==null&&(u=i.callbacks,u!==null&&(l=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var p=Ti;if(jn(r,i),Dn(i),u&512&&(Wt||l===null||Pi(l,l.return)),u&4){var b=l!==null?l.memoizedState:null;if(u=i.memoizedState,l===null)if(u===null)if(i.stateNode===null){e:{u=i.type,l=i.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":b=p.getElementsByTagName("title")[0],(!b||b[Or]||b[Pt]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(u),p.head.insertBefore(b,p.querySelector("head > title"))),cn(b,u,l),b[Pt]=i,Gt(b),u=b;break e;case"link":var E=Yx("link","href",p).get(u+(l.href||""));if(E){for(var N=0;N<E.length;N++)if(b=E[N],b.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&b.getAttribute("rel")===(l.rel==null?null:l.rel)&&b.getAttribute("title")===(l.title==null?null:l.title)&&b.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){E.splice(N,1);break t}}b=p.createElement(u),cn(b,u,l),p.head.appendChild(b);break;case"meta":if(E=Yx("meta","content",p).get(u+(l.content||""))){for(N=0;N<E.length;N++)if(b=E[N],b.getAttribute("content")===(l.content==null?null:""+l.content)&&b.getAttribute("name")===(l.name==null?null:l.name)&&b.getAttribute("property")===(l.property==null?null:l.property)&&b.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&b.getAttribute("charset")===(l.charSet==null?null:l.charSet)){E.splice(N,1);break t}}b=p.createElement(u),cn(b,u,l),p.head.appendChild(b);break;default:throw Error(a(468,u))}b[Pt]=i,Gt(b),u=b}i.stateNode=u}else Vx(p,i.type,i.stateNode);else i.stateNode=Qx(p,u,i.memoizedProps);else b!==u?(b===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):b.count--,u===null?Vx(p,i.type,i.stateNode):Qx(p,u,i.memoizedProps)):u===null&&i.stateNode!==null&&bh(i,i.memoizedProps,l.memoizedProps)}break;case 27:jn(r,i),Dn(i),u&512&&(Wt||l===null||Pi(l,l.return)),l!==null&&u&4&&bh(i,i.memoizedProps,l.memoizedProps);break;case 5:if(jn(r,i),Dn(i),u&512&&(Wt||l===null||Pi(l,l.return)),i.flags&32){p=i.stateNode;try{je(p,"")}catch(xe){dt(i,i.return,xe)}}u&4&&i.stateNode!=null&&(p=i.memoizedProps,bh(i,p,l!==null?l.memoizedProps:p)),u&1024&&(vh=!0);break;case 6:if(jn(r,i),Dn(i),u&4){if(i.stateNode===null)throw Error(a(162));u=i.memoizedProps,l=i.stateNode;try{l.nodeValue=u}catch(xe){dt(i,i.return,xe)}}break;case 3:if(Mu=null,p=Ti,Ti=Ou(r.containerInfo),jn(r,i),Ti=p,Dn(i),u&4&&l!==null&&l.memoizedState.isDehydrated)try{tl(r.containerInfo)}catch(xe){dt(i,i.return,xe)}vh&&(vh=!1,Vy(i));break;case 4:u=Ti,Ti=Ou(i.stateNode.containerInfo),jn(r,i),Dn(i),Ti=u;break;case 12:jn(r,i),Dn(i);break;case 31:jn(r,i),Dn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,gu(i,u)));break;case 13:jn(r,i),Dn(i),i.child.flags&8192&&i.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(yu=Ot()),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,gu(i,u)));break;case 22:p=i.memoizedState!==null;var I=l!==null&&l.memoizedState!==null,X=ma,ie=Wt;if(ma=X||p,Wt=ie||I,jn(r,i),Wt=ie,ma=X,Dn(i),u&8192)e:for(r=i.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(l===null||I||ma||Wt||Qr(i)),l=null,r=i;;){if(r.tag===5||r.tag===26){if(l===null){I=l=r;try{if(b=I.stateNode,p)E=b.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{N=I.stateNode;var oe=I.memoizedProps.style,W=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;N.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(xe){dt(I,I.return,xe)}}}else if(r.tag===6){if(l===null){I=r;try{I.stateNode.nodeValue=p?"":I.memoizedProps}catch(xe){dt(I,I.return,xe)}}}else if(r.tag===18){if(l===null){I=r;try{var ee=I.stateNode;p?Bx(ee,!0):Bx(I.stateNode,!1)}catch(xe){dt(I,I.return,xe)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===i)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=i.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,gu(i,l))));break;case 19:jn(r,i),Dn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,gu(i,u)));break;case 30:break;case 21:break;default:jn(r,i),Dn(i)}}function Dn(i){var r=i.flags;if(r&2){try{for(var l,u=i.return;u!==null;){if($y(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var p=l.stateNode,b=yh(i);pu(i,b,p);break;case 5:var E=l.stateNode;l.flags&32&&(je(E,""),l.flags&=-33);var N=yh(i);pu(i,N,E);break;case 3:case 4:var I=l.stateNode.containerInfo,X=yh(i);xh(i,X,I);break;default:throw Error(a(161))}}catch(ie){dt(i,i.return,ie)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function Vy(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;Vy(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),i=i.sibling}}function ga(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)qy(i,r.alternate,r),r=r.sibling}function Qr(i){for(i=i.child;i!==null;){var r=i;switch(r.tag){case 0:case 11:case 14:case 15:Qa(4,r,r.return),Qr(r);break;case 1:Pi(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&By(r,r.return,l),Qr(r);break;case 27:Do(r.stateNode);case 26:case 5:Pi(r,r.return),Qr(r);break;case 22:r.memoizedState===null&&Qr(r);break;case 30:Qr(r);break;default:Qr(r)}i=i.sibling}}function ba(i,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,p=i,b=r,E=b.flags;switch(b.tag){case 0:case 11:case 15:ba(p,b,l),_o(4,b);break;case 1:if(ba(p,b,l),u=b,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(X){dt(u,u.return,X)}if(u=b,p=u.updateQueue,p!==null){var N=u.stateNode;try{var I=p.shared.hiddenCallbacks;if(I!==null)for(p.shared.hiddenCallbacks=null,p=0;p<I.length;p++)Nb(I[p],N)}catch(X){dt(u,u.return,X)}}l&&E&64&&zy(b),ko(b,b.return);break;case 27:Fy(b);case 26:case 5:ba(p,b,l),l&&u===null&&E&4&&Uy(b),ko(b,b.return);break;case 12:ba(p,b,l);break;case 31:ba(p,b,l),l&&E&4&&Gy(p,b);break;case 13:ba(p,b,l),l&&E&4&&Qy(p,b);break;case 22:b.memoizedState===null&&ba(p,b,l),ko(b,b.return);break;case 30:break;default:ba(p,b,l)}r=r.sibling}}function Eh(i,r){var l=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==l&&(i!=null&&i.refCount++,l!=null&&uo(l))}function Sh(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&uo(i))}function Ci(i,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Xy(i,r,l,u),r=r.sibling}function Xy(i,r,l,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Ci(i,r,l,u),p&2048&&_o(9,r);break;case 1:Ci(i,r,l,u);break;case 3:Ci(i,r,l,u),p&2048&&(i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&uo(i)));break;case 12:if(p&2048){Ci(i,r,l,u),i=r.stateNode;try{var b=r.memoizedProps,E=b.id,N=b.onPostCommit;typeof N=="function"&&N(E,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(I){dt(r,r.return,I)}}else Ci(i,r,l,u);break;case 31:Ci(i,r,l,u);break;case 13:Ci(i,r,l,u);break;case 23:break;case 22:b=r.stateNode,E=r.alternate,r.memoizedState!==null?b._visibility&2?Ci(i,r,l,u):No(i,r):b._visibility&2?Ci(i,r,l,u):(b._visibility|=2,Hs(i,r,l,u,(r.subtreeFlags&10256)!==0||!1)),p&2048&&Eh(E,r);break;case 24:Ci(i,r,l,u),p&2048&&Sh(r.alternate,r);break;default:Ci(i,r,l,u)}}function Hs(i,r,l,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var b=i,E=r,N=l,I=u,X=E.flags;switch(E.tag){case 0:case 11:case 15:Hs(b,E,N,I,p),_o(8,E);break;case 23:break;case 22:var ie=E.stateNode;E.memoizedState!==null?ie._visibility&2?Hs(b,E,N,I,p):No(b,E):(ie._visibility|=2,Hs(b,E,N,I,p)),p&&X&2048&&Eh(E.alternate,E);break;case 24:Hs(b,E,N,I,p),p&&X&2048&&Sh(E.alternate,E);break;default:Hs(b,E,N,I,p)}r=r.sibling}}function No(i,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=i,u=r,p=u.flags;switch(u.tag){case 22:No(l,u),p&2048&&Eh(u.alternate,u);break;case 24:No(l,u),p&2048&&Sh(u.alternate,u);break;default:No(l,u)}r=r.sibling}}var To=8192;function Ks(i,r,l){if(i.subtreeFlags&To)for(i=i.child;i!==null;)Wy(i,r,l),i=i.sibling}function Wy(i,r,l){switch(i.tag){case 26:Ks(i,r,l),i.flags&To&&i.memoizedState!==null&&Ck(l,Ti,i.memoizedState,i.memoizedProps);break;case 5:Ks(i,r,l);break;case 3:case 4:var u=Ti;Ti=Ou(i.stateNode.containerInfo),Ks(i,r,l),Ti=u;break;case 22:i.memoizedState===null&&(u=i.alternate,u!==null&&u.memoizedState!==null?(u=To,To=16777216,Ks(i,r,l),To=u):Ks(i,r,l));break;default:Ks(i,r,l)}}function Zy(i){var r=i.alternate;if(r!==null&&(i=r.child,i!==null)){r.child=null;do r=i.sibling,i.sibling=null,i=r;while(i!==null)}}function Co(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];tn=u,ex(u,i)}Zy(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Jy(i),i=i.sibling}function Jy(i){switch(i.tag){case 0:case 11:case 15:Co(i),i.flags&2048&&Qa(9,i,i.return);break;case 3:Co(i);break;case 12:Co(i);break;case 22:var r=i.stateNode;i.memoizedState!==null&&r._visibility&2&&(i.return===null||i.return.tag!==13)?(r._visibility&=-3,bu(i)):Co(i);break;default:Co(i)}}function bu(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];tn=u,ex(u,i)}Zy(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Qa(8,r,r.return),bu(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,bu(r));break;default:bu(r)}i=i.sibling}}function ex(i,r){for(;tn!==null;){var l=tn;switch(l.tag){case 0:case 11:case 15:Qa(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:uo(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,tn=u;else e:for(l=i;tn!==null;){u=tn;var p=u.sibling,b=u.return;if(Hy(u),u===l){tn=null;break e}if(p!==null){p.return=b,tn=p;break e}tn=b}}}var q_={getCacheForType:function(i){var r=ln(Yt),l=r.data.get(i);return l===void 0&&(l=i(),r.data.set(i,l)),l},cacheSignal:function(){return ln(Yt).controller.signal}},H_=typeof WeakMap=="function"?WeakMap:Map,rt=0,yt=null,Ge=null,Xe=0,ft=0,Zn=null,Ya=!1,Gs=!1,wh=!1,ya=0,zt=0,Va=0,Yr=0,_h=0,Jn=0,Qs=0,Ao=null,Ln=null,kh=!1,yu=0,tx=0,xu=1/0,vu=null,Xa=null,Jt=0,Wa=null,Ys=null,xa=0,Nh=0,Th=null,nx=null,Oo=0,Ch=null;function ei(){return(rt&2)!==0&&Xe!==0?Xe&-Xe:U.T!==null?Dh():vs()}function ix(){if(Jn===0)if((Xe&536870912)===0||Je){var i=xs;xs<<=1,(xs&3932160)===0&&(xs=262144),Jn=i}else Jn=536870912;return i=Xn.current,i!==null&&(i.flags|=32),Jn}function In(i,r,l){(i===yt&&(ft===2||ft===9)||i.cancelPendingCommit!==null)&&(Vs(i,0),Za(i,Xe,Jn,!1)),bt(i,l),((rt&2)===0||i!==yt)&&(i===yt&&((rt&2)===0&&(Yr|=l),zt===4&&Za(i,Xe,Jn,!1)),qi(i))}function ax(i,r,l){if((rt&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&i.expiredLanes)===0||se(i,r),p=u?Q_(i,r):Oh(i,r,!0),b=u;do{if(p===0){Gs&&!u&&Za(i,r,0,!1);break}else{if(l=i.current.alternate,b&&!K_(l)){p=Oh(i,r,!1),b=!1;continue}if(p===2){if(b=r,i.errorRecoveryDisabledLanes&b)var E=0;else E=i.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){r=E;e:{var N=i;p=Ao;var I=N.current.memoizedState.isDehydrated;if(I&&(Vs(N,E).flags|=256),E=Oh(N,E,!1),E!==2){if(wh&&!I){N.errorRecoveryDisabledLanes|=b,Yr|=b,p=4;break e}b=Ln,Ln=p,b!==null&&(Ln===null?Ln=b:Ln.push.apply(Ln,b))}p=E}if(b=!1,p!==2)continue}}if(p===1){Vs(i,0),Za(i,r,0,!0);break}e:{switch(u=i,b=p,b){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Za(u,r,Jn,!Ya);break e;case 2:Ln=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(p=yu+300-Ot(),10<p)){if(Za(u,r,Jn,!Ya),B(u,0,!0)!==0)break e;xa=r,u.timeoutHandle=Lx(rx.bind(null,u,l,Ln,vu,kh,r,Jn,Yr,Qs,Ya,b,"Throttled",-0,0),p);break e}rx(u,l,Ln,vu,kh,r,Jn,Yr,Qs,Ya,b,null,-0,0)}}break}while(!0);qi(i)}function rx(i,r,l,u,p,b,E,N,I,X,ie,oe,W,ee){if(i.timeoutHandle=-1,oe=r.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:me},Wy(r,b,oe);var xe=(b&62914560)===b?yu-Ot():(b&4194048)===b?tx-Ot():0;if(xe=Ak(oe,xe),xe!==null){xa=b,i.cancelPendingCommit=xe(hx.bind(null,i,r,b,l,u,p,E,N,I,ie,oe,null,W,ee)),Za(i,b,E,!X);return}}hx(i,r,b,l,u,p,E,N,I)}function K_(i){for(var r=i;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var p=l[u],b=p.getSnapshot;p=p.value;try{if(!Yn(b(),p))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Za(i,r,l,u){r&=~_h,r&=~Yr,i.suspendedLanes|=r,i.pingedLanes&=~r,u&&(i.warmLanes|=r),u=i.expirationTimes;for(var p=r;0<p;){var b=31-ot(p),E=1<<b;u[b]=-1,p&=~E}l!==0&&ye(i,l,r)}function Eu(){return(rt&6)===0?(Ro(0),!1):!0}function Ah(){if(Ge!==null){if(ft===0)var i=Ge.return;else i=Ge,oa=Ur=null,Kd(i),Us=null,ho=0,i=Ge;for(;i!==null;)Iy(i.alternate,i),i=i.return;Ge=null}}function Vs(i,r){var l=i.timeoutHandle;l!==-1&&(i.timeoutHandle=-1,fk(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),xa=0,Ah(),yt=i,Ge=l=sa(i.current,null),Xe=r,ft=0,Zn=null,Ya=!1,Gs=se(i,r),wh=!1,Qs=Jn=_h=Yr=Va=zt=0,Ln=Ao=null,kh=!1,(r&8)!==0&&(r|=r&32);var u=i.entangledLanes;if(u!==0)for(i=i.entanglements,u&=r;0<u;){var p=31-ot(u),b=1<<p;r|=i[p],u&=~b}return ya=r,Pc(),l}function sx(i,r){Ue=null,U.H=Eo,r===Bs||r===Xc?(r=Sb(),ft=3):r===jd?(r=Sb(),ft=4):ft=r===lh?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Zn=r,Ge===null&&(zt=1,uu(i,ui(r,i.current)))}function lx(){var i=Xn.current;return i===null?!0:(Xe&4194048)===Xe?mi===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?i===mi:!1}function ox(){var i=U.H;return U.H=Eo,i===null?Eo:i}function cx(){var i=U.A;return U.A=q_,i}function Su(){zt=4,Ya||(Xe&4194048)!==Xe&&Xn.current!==null||(Gs=!0),(Va&134217727)===0&&(Yr&134217727)===0||yt===null||Za(yt,Xe,Jn,!1)}function Oh(i,r,l){var u=rt;rt|=2;var p=ox(),b=cx();(yt!==i||Xe!==r)&&(vu=null,Vs(i,r)),r=!1;var E=zt;e:do try{if(ft!==0&&Ge!==null){var N=Ge,I=Zn;switch(ft){case 8:Ah(),E=6;break e;case 3:case 2:case 9:case 6:Xn.current===null&&(r=!0);var X=ft;if(ft=0,Zn=null,Xs(i,N,I,X),l&&Gs){E=0;break e}break;default:X=ft,ft=0,Zn=null,Xs(i,N,I,X)}}G_(),E=zt;break}catch(ie){sx(i,ie)}while(!0);return r&&i.shellSuspendCounter++,oa=Ur=null,rt=u,U.H=p,U.A=b,Ge===null&&(yt=null,Xe=0,Pc()),E}function G_(){for(;Ge!==null;)ux(Ge)}function Q_(i,r){var l=rt;rt|=2;var u=ox(),p=cx();yt!==i||Xe!==r?(vu=null,xu=Ot()+500,Vs(i,r)):Gs=se(i,r);e:do try{if(ft!==0&&Ge!==null){r=Ge;var b=Zn;t:switch(ft){case 1:ft=0,Zn=null,Xs(i,r,b,1);break;case 2:case 9:if(vb(b)){ft=0,Zn=null,fx(r);break}r=function(){ft!==2&&ft!==9||yt!==i||(ft=7),qi(i)},b.then(r,r);break e;case 3:ft=7;break e;case 4:ft=5;break e;case 7:vb(b)?(ft=0,Zn=null,fx(r)):(ft=0,Zn=null,Xs(i,r,b,7));break;case 5:var E=null;switch(Ge.tag){case 26:E=Ge.memoizedState;case 5:case 27:var N=Ge;if(E?Xx(E):N.stateNode.complete){ft=0,Zn=null;var I=N.sibling;if(I!==null)Ge=I;else{var X=N.return;X!==null?(Ge=X,wu(X)):Ge=null}break t}}ft=0,Zn=null,Xs(i,r,b,5);break;case 6:ft=0,Zn=null,Xs(i,r,b,6);break;case 8:Ah(),zt=6;break e;default:throw Error(a(462))}}Y_();break}catch(ie){sx(i,ie)}while(!0);return oa=Ur=null,U.H=u,U.A=p,rt=l,Ge!==null?0:(yt=null,Xe=0,Pc(),zt)}function Y_(){for(;Ge!==null&&!Gl();)ux(Ge)}function ux(i){var r=Dy(i.alternate,i,ya);i.memoizedProps=i.pendingProps,r===null?wu(i):Ge=r}function fx(i){var r=i,l=r.alternate;switch(r.tag){case 15:case 0:r=Cy(l,r,r.pendingProps,r.type,void 0,Xe);break;case 11:r=Cy(l,r,r.pendingProps,r.type.render,r.ref,Xe);break;case 5:Kd(r);default:Iy(l,r),r=Ge=cb(r,ya),r=Dy(l,r,ya)}i.memoizedProps=i.pendingProps,r===null?wu(i):Ge=r}function Xs(i,r,l,u){oa=Ur=null,Kd(r),Us=null,ho=0;var p=r.return;try{if(I_(i,p,r,l,Xe)){zt=1,uu(i,ui(l,i.current)),Ge=null;return}}catch(b){if(p!==null)throw Ge=p,b;zt=1,uu(i,ui(l,i.current)),Ge=null;return}r.flags&32768?(Je||u===1?i=!0:Gs||(Xe&536870912)!==0?i=!1:(Ya=i=!0,(u===2||u===9||u===3||u===6)&&(u=Xn.current,u!==null&&u.tag===13&&(u.flags|=16384))),dx(r,i)):wu(r)}function wu(i){var r=i;do{if((r.flags&32768)!==0){dx(r,Ya);return}i=r.return;var l=U_(r.alternate,r,ya);if(l!==null){Ge=l;return}if(r=r.sibling,r!==null){Ge=r;return}Ge=r=i}while(r!==null);zt===0&&(zt=5)}function dx(i,r){do{var l=$_(i.alternate,i);if(l!==null){l.flags&=32767,Ge=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(i=i.sibling,i!==null)){Ge=i;return}Ge=i=l}while(i!==null);zt=6,Ge=null}function hx(i,r,l,u,p,b,E,N,I){i.cancelPendingCommit=null;do _u();while(Jt!==0);if((rt&6)!==0)throw Error(a(327));if(r!==null){if(r===i.current)throw Error(a(177));if(b=r.lanes|r.childLanes,b|=yd,Ee(i,l,b,E,N,I),i===yt&&(Ge=yt=null,Xe=0),Ys=r,Wa=i,xa=l,Nh=b,Th=p,nx=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,Z_(Re,function(){return yx(),null})):(i.callbackNode=null,i.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=U.T,U.T=null,p=ae.p,ae.p=2,E=rt,rt|=4;try{F_(i,r,l)}finally{rt=E,ae.p=p,U.T=u}}Jt=1,mx(),px(),gx()}}function mx(){if(Jt===1){Jt=0;var i=Wa,r=Ys,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=U.T,U.T=null;var u=ae.p;ae.p=2;var p=rt;rt|=4;try{Yy(r,i);var b=Ph,E=eb(i.containerInfo),N=b.focusedElem,I=b.selectionRange;if(E!==N&&N&&N.ownerDocument&&Jg(N.ownerDocument.documentElement,N)){if(I!==null&&hd(N)){var X=I.start,ie=I.end;if(ie===void 0&&(ie=X),"selectionStart"in N)N.selectionStart=X,N.selectionEnd=Math.min(ie,N.value.length);else{var oe=N.ownerDocument||document,W=oe&&oe.defaultView||window;if(W.getSelection){var ee=W.getSelection(),xe=N.textContent.length,Me=Math.min(I.start,xe),pt=I.end===void 0?Me:Math.min(I.end,xe);!ee.extend&&Me>pt&&(E=pt,pt=Me,Me=E);var H=Zg(N,Me),$=Zg(N,pt);if(H&&$&&(ee.rangeCount!==1||ee.anchorNode!==H.node||ee.anchorOffset!==H.offset||ee.focusNode!==$.node||ee.focusOffset!==$.offset)){var V=oe.createRange();V.setStart(H.node,H.offset),ee.removeAllRanges(),Me>pt?(ee.addRange(V),ee.extend($.node,$.offset)):(V.setEnd($.node,$.offset),ee.addRange(V))}}}}for(oe=[],ee=N;ee=ee.parentNode;)ee.nodeType===1&&oe.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<oe.length;N++){var le=oe[N];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Iu=!!Fh,Ph=Fh=null}finally{rt=p,ae.p=u,U.T=l}}i.current=r,Jt=2}}function px(){if(Jt===2){Jt=0;var i=Wa,r=Ys,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=U.T,U.T=null;var u=ae.p;ae.p=2;var p=rt;rt|=4;try{qy(i,r.alternate,r)}finally{rt=p,ae.p=u,U.T=l}}Jt=3}}function gx(){if(Jt===4||Jt===3){Jt=0,bs();var i=Wa,r=Ys,l=xa,u=nx;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Jt=5:(Jt=0,Ys=Wa=null,bx(i,i.pendingLanes));var p=i.pendingLanes;if(p===0&&(Xa=null),ta(l),r=r.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(an,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=U.T,p=ae.p,ae.p=2,U.T=null;try{for(var b=i.onRecoverableError,E=0;E<u.length;E++){var N=u[E];b(N.value,{componentStack:N.stack})}}finally{U.T=r,ae.p=p}}(xa&3)!==0&&_u(),qi(i),p=i.pendingLanes,(l&261930)!==0&&(p&42)!==0?i===Ch?Oo++:(Oo=0,Ch=i):Oo=0,Ro(0)}}function bx(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,uo(r)))}function _u(){return mx(),px(),gx(),yx()}function yx(){if(Jt!==5)return!1;var i=Wa,r=Nh;Nh=0;var l=ta(xa),u=U.T,p=ae.p;try{ae.p=32>l?32:l,U.T=null,l=Th,Th=null;var b=Wa,E=xa;if(Jt=0,Ys=Wa=null,xa=0,(rt&6)!==0)throw Error(a(331));var N=rt;if(rt|=4,Jy(b.current),Xy(b,b.current,E,l),rt=N,Ro(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(an,b)}catch{}return!0}finally{ae.p=p,U.T=u,bx(i,r)}}function xx(i,r,l){r=ui(l,r),r=sh(i.stateNode,r,2),i=Ha(i,r,2),i!==null&&(bt(i,2),qi(i))}function dt(i,r,l){if(i.tag===3)xx(i,i,l);else for(;r!==null;){if(r.tag===3){xx(r,i,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Xa===null||!Xa.has(u))){i=ui(l,i),l=vy(2),u=Ha(r,l,2),u!==null&&(Ey(l,u,r,i),bt(u,2),qi(u));break}}r=r.return}}function Rh(i,r,l){var u=i.pingCache;if(u===null){u=i.pingCache=new H_;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(l)||(wh=!0,p.add(l),i=V_.bind(null,i,r,l),r.then(i,i))}function V_(i,r,l){var u=i.pingCache;u!==null&&u.delete(r),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,yt===i&&(Xe&l)===l&&(zt===4||zt===3&&(Xe&62914560)===Xe&&300>Ot()-yu?(rt&2)===0&&Vs(i,0):_h|=l,Qs===Xe&&(Qs=0)),qi(i)}function vx(i,r){r===0&&(r=Le()),i=Ir(i,r),i!==null&&(bt(i,r),qi(i))}function X_(i){var r=i.memoizedState,l=0;r!==null&&(l=r.retryLane),vx(i,l)}function W_(i,r){var l=0;switch(i.tag){case 31:case 13:var u=i.stateNode,p=i.memoizedState;p!==null&&(l=p.retryLane);break;case 19:u=i.stateNode;break;case 22:u=i.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),vx(i,l)}function Z_(i,r){return ea(i,r)}var ku=null,Ws=null,Mh=!1,Nu=!1,jh=!1,Ja=0;function qi(i){i!==Ws&&i.next===null&&(Ws===null?ku=Ws=i:Ws=Ws.next=i),Nu=!0,Mh||(Mh=!0,ek())}function Ro(i,r){if(!jh&&Nu){jh=!0;do for(var l=!1,u=ku;u!==null;){if(i!==0){var p=u.pendingLanes;if(p===0)var b=0;else{var E=u.suspendedLanes,N=u.pingedLanes;b=(1<<31-ot(42|i)+1)-1,b&=p&~(E&~N),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(l=!0,_x(u,b))}else b=Xe,b=B(u,u===yt?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||se(u,b)||(l=!0,_x(u,b));u=u.next}while(l);jh=!1}}function J_(){Ex()}function Ex(){Nu=Mh=!1;var i=0;Ja!==0&&uk()&&(i=Ja);for(var r=Ot(),l=null,u=ku;u!==null;){var p=u.next,b=Sx(u,r);b===0?(u.next=null,l===null?ku=p:l.next=p,p===null&&(Ws=l)):(l=u,(i!==0||(b&3)!==0)&&(Nu=!0)),u=p}Jt!==0&&Jt!==5||Ro(i),Ja!==0&&(Ja=0)}function Sx(i,r){for(var l=i.suspendedLanes,u=i.pingedLanes,p=i.expirationTimes,b=i.pendingLanes&-62914561;0<b;){var E=31-ot(b),N=1<<E,I=p[E];I===-1?((N&l)===0||(N&u)!==0)&&(p[E]=ge(N,r)):I<=r&&(i.expiredLanes|=N),b&=~N}if(r=yt,l=Xe,l=B(i,i===r?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,l===0||i===r&&(ft===2||ft===9)||i.cancelPendingCommit!==null)return u!==null&&u!==null&&Tr(u),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||se(i,l)){if(r=l&-l,r===i.callbackPriority)return r;switch(u!==null&&Tr(u),ta(l)){case 2:case 8:l=de;break;case 32:l=Re;break;case 268435456:l=nt;break;default:l=Re}return u=wx.bind(null,i),l=ea(l,u),i.callbackPriority=r,i.callbackNode=l,r}return u!==null&&u!==null&&Tr(u),i.callbackPriority=2,i.callbackNode=null,2}function wx(i,r){if(Jt!==0&&Jt!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(_u()&&i.callbackNode!==l)return null;var u=Xe;return u=B(i,i===yt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(ax(i,u,r),Sx(i,Ot()),i.callbackNode!=null&&i.callbackNode===l?wx.bind(null,i):null)}function _x(i,r){if(_u())return null;ax(i,r,!0)}function ek(){dk(function(){(rt&6)!==0?ea(ne,J_):Ex()})}function Dh(){if(Ja===0){var i=Is;i===0&&(i=Cr,Cr<<=1,(Cr&261888)===0&&(Cr=256)),Ja=i}return Ja}function kx(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Ia(""+i)}function Nx(i,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,i.id&&l.setAttribute("form",i.id),r.parentNode.insertBefore(l,r),i=new FormData(i),l.parentNode.removeChild(l),i}function tk(i,r,l,u,p){if(r==="submit"&&l&&l.stateNode===p){var b=kx((p[fn]||null).action),E=u.submitter;E&&(r=(r=E[fn]||null)?kx(r.formAction):E.getAttribute("formAction"),r!==null&&(b=r,E=null));var N=new Bc("action","action",null,u,p);i.push({event:N,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Ja!==0){var I=E?Nx(p,E):new FormData(p);eh(l,{pending:!0,data:I,method:p.method,action:b},null,I)}}else typeof b=="function"&&(N.preventDefault(),I=E?Nx(p,E):new FormData(p),eh(l,{pending:!0,data:I,method:p.method,action:b},b,I))},currentTarget:p}]})}}for(var Lh=0;Lh<bd.length;Lh++){var Ih=bd[Lh],nk=Ih.toLowerCase(),ik=Ih[0].toUpperCase()+Ih.slice(1);Ni(nk,"on"+ik)}Ni(ib,"onAnimationEnd"),Ni(ab,"onAnimationIteration"),Ni(rb,"onAnimationStart"),Ni("dblclick","onDoubleClick"),Ni("focusin","onFocus"),Ni("focusout","onBlur"),Ni(x_,"onTransitionRun"),Ni(v_,"onTransitionStart"),Ni(E_,"onTransitionCancel"),Ni(sb,"onTransitionEnd"),ue("onMouseEnter",["mouseout","mouseover"]),ue("onMouseLeave",["mouseout","mouseover"]),ue("onPointerEnter",["pointerout","pointerover"]),ue("onPointerLeave",["pointerout","pointerover"]),ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mo="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(" "),ak=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Mo));function Tx(i,r){r=(r&4)!==0;for(var l=0;l<i.length;l++){var u=i[l],p=u.event;u=u.listeners;e:{var b=void 0;if(r)for(var E=u.length-1;0<=E;E--){var N=u[E],I=N.instance,X=N.currentTarget;if(N=N.listener,I!==b&&p.isPropagationStopped())break e;b=N,p.currentTarget=X;try{b(p)}catch(ie){Fc(ie)}p.currentTarget=null,b=I}else for(E=0;E<u.length;E++){if(N=u[E],I=N.instance,X=N.currentTarget,N=N.listener,I!==b&&p.isPropagationStopped())break e;b=N,p.currentTarget=X;try{b(p)}catch(ie){Fc(ie)}p.currentTarget=null,b=I}}}}function Qe(i,r){var l=r[Ql];l===void 0&&(l=r[Ql]=new Set);var u=i+"__bubble";l.has(u)||(Cx(r,i,2,!1),l.add(u))}function zh(i,r,l){var u=0;r&&(u|=4),Cx(l,i,u,r)}var Tu="_reactListening"+Math.random().toString(36).slice(2);function Bh(i){if(!i[Tu]){i[Tu]=!0,Oc.forEach(function(l){l!=="selectionchange"&&(ak.has(l)||zh(l,!1,i),zh(l,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[Tu]||(r[Tu]=!0,zh("selectionchange",!1,r))}}function Cx(i,r,l,u){switch(iv(r)){case 2:var p=Mk;break;case 8:p=jk;break;default:p=Jh}l=p.bind(null,r,l,i),p=void 0,!ad||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?i.addEventListener(r,l,{capture:!0,passive:p}):i.addEventListener(r,l,!0):p!==void 0?i.addEventListener(r,l,{passive:p}):i.addEventListener(r,l,!1)}function Uh(i,r,l,u,p){var b=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var E=u.tag;if(E===3||E===4){var N=u.stateNode.containerInfo;if(N===p)break;if(E===4)for(E=u.return;E!==null;){var I=E.tag;if((I===3||I===4)&&E.stateNode.containerInfo===p)return;E=E.return}for(;N!==null;){if(E=En(N),E===null)return;if(I=E.tag,I===5||I===6||I===26||I===27){u=b=E;continue e}N=N.parentNode}}u=u.return}Dc(function(){var X=b,ie=Be(l),oe=[];e:{var W=lb.get(i);if(W!==void 0){var ee=Bc,xe=i;switch(i){case"keypress":if(Ic(l)===0)break e;case"keydown":case"keyup":ee=Ww;break;case"focusin":xe="focus",ee=od;break;case"focusout":xe="blur",ee=od;break;case"beforeblur":case"afterblur":ee=od;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=Ig;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=Uw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=e_;break;case ib:case ab:case rb:ee=Pw;break;case sb:ee=n_;break;case"scroll":case"scrollend":ee=zw;break;case"wheel":ee=a_;break;case"copy":case"cut":case"paste":ee=Hw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Bg;break;case"toggle":case"beforetoggle":ee=s_}var Me=(r&4)!==0,pt=!Me&&(i==="scroll"||i==="scrollend"),H=Me?W!==null?W+"Capture":null:W;Me=[];for(var $=X,V;$!==null;){var le=$;if(V=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||V===null||H===null||(le=Jl($,H),le!=null&&Me.push(jo($,le,V))),pt)break;$=$.return}0<Me.length&&(W=new ee(W,xe,null,l,ie),oe.push({event:W,listeners:Me}))}}if((r&7)===0){e:{if(W=i==="mouseover"||i==="pointerover",ee=i==="mouseout"||i==="pointerout",W&&l!==Se&&(xe=l.relatedTarget||l.fromElement)&&(En(xe)||xe[Ma]))break e;if((ee||W)&&(W=ie.window===ie?ie:(W=ie.ownerDocument)?W.defaultView||W.parentWindow:window,ee?(xe=l.relatedTarget||l.toElement,ee=X,xe=xe?En(xe):null,xe!==null&&(pt=o(xe),Me=xe.tag,xe!==pt||Me!==5&&Me!==27&&Me!==6)&&(xe=null)):(ee=null,xe=X),ee!==xe)){if(Me=Ig,le="onMouseLeave",H="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Me=Bg,le="onPointerLeave",H="onPointerEnter",$="pointer"),pt=ee==null?W:ja(ee),V=xe==null?W:ja(xe),W=new Me(le,$+"leave",ee,l,ie),W.target=pt,W.relatedTarget=V,le=null,En(ie)===X&&(Me=new Me(H,$+"enter",xe,l,ie),Me.target=V,Me.relatedTarget=pt,le=Me),pt=le,ee&&xe)t:{for(Me=rk,H=ee,$=xe,V=0,le=H;le;le=Me(le))V++;le=0;for(var Ce=$;Ce;Ce=Me(Ce))le++;for(;0<V-le;)H=Me(H),V--;for(;0<le-V;)$=Me($),le--;for(;V--;){if(H===$||$!==null&&H===$.alternate){Me=H;break t}H=Me(H),$=Me($)}Me=null}else Me=null;ee!==null&&Ax(oe,W,ee,Me,!1),xe!==null&&pt!==null&&Ax(oe,pt,xe,Me,!0)}}e:{if(W=X?ja(X):window,ee=W.nodeName&&W.nodeName.toLowerCase(),ee==="select"||ee==="input"&&W.type==="file")var it=Gg;else if(Hg(W))if(Qg)it=g_;else{it=m_;var we=h_}else ee=W.nodeName,!ee||ee.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?X&&La(X.elementType)&&(it=Gg):it=p_;if(it&&(it=it(i,X))){Kg(oe,it,l,ie);break e}we&&we(i,W,X),i==="focusout"&&X&&W.type==="number"&&X.memoizedProps.value!=null&&ks(W,"number",W.value)}switch(we=X?ja(X):window,i){case"focusin":(Hg(we)||we.contentEditable==="true")&&(Cs=we,md=X,lo=null);break;case"focusout":lo=md=Cs=null;break;case"mousedown":pd=!0;break;case"contextmenu":case"mouseup":case"dragend":pd=!1,tb(oe,l,ie);break;case"selectionchange":if(y_)break;case"keydown":case"keyup":tb(oe,l,ie)}var $e;if(ud)e:{switch(i){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else Ts?Pg(i,l)&&(We="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(We="onCompositionStart");We&&(Ug&&l.locale!=="ko"&&(Ts||We!=="onCompositionStart"?We==="onCompositionEnd"&&Ts&&($e=Dg()):(za=ie,rd="value"in za?za.value:za.textContent,Ts=!0)),we=Cu(X,We),0<we.length&&(We=new zg(We,i,null,l,ie),oe.push({event:We,listeners:we}),$e?We.data=$e:($e=qg(l),$e!==null&&(We.data=$e)))),($e=o_?c_(i,l):u_(i,l))&&(We=Cu(X,"onBeforeInput"),0<We.length&&(we=new zg("onBeforeInput","beforeinput",null,l,ie),oe.push({event:we,listeners:We}),we.data=$e)),tk(oe,i,X,l,ie)}Tx(oe,r)})}function jo(i,r,l){return{instance:i,listener:r,currentTarget:l}}function Cu(i,r){for(var l=r+"Capture",u=[];i!==null;){var p=i,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=Jl(i,l),p!=null&&u.unshift(jo(i,p,b)),p=Jl(i,r),p!=null&&u.push(jo(i,p,b))),i.tag===3)return u;i=i.return}return[]}function rk(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function Ax(i,r,l,u,p){for(var b=r._reactName,E=[];l!==null&&l!==u;){var N=l,I=N.alternate,X=N.stateNode;if(N=N.tag,I!==null&&I===u)break;N!==5&&N!==26&&N!==27||X===null||(I=X,p?(X=Jl(l,b),X!=null&&E.unshift(jo(l,X,I))):p||(X=Jl(l,b),X!=null&&E.push(jo(l,X,I)))),l=l.return}E.length!==0&&i.push({event:r,listeners:E})}var sk=/\r\n?/g,lk=/\u0000|\uFFFD/g;function Ox(i){return(typeof i=="string"?i:""+i).replace(sk,`
|
|
49
|
+
`).replace(lk,"")}function Rx(i,r){return r=Ox(r),Ox(i)===r}function mt(i,r,l,u,p,b){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||je(i,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&je(i,""+u);break;case"className":Gn(i,"class",u);break;case"tabIndex":Gn(i,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Gn(i,l,u);break;case"style":ut(i,u,b);break;case"data":if(r!=="object"){Gn(i,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){i.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=Ia(""+u),i.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){i.setAttribute(l,"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 b=="function"&&(l==="formAction"?(r!=="input"&&mt(i,r,"name",p.name,p,null),mt(i,r,"formEncType",p.formEncType,p,null),mt(i,r,"formMethod",p.formMethod,p,null),mt(i,r,"formTarget",p.formTarget,p,null)):(mt(i,r,"encType",p.encType,p,null),mt(i,r,"method",p.method,p,null),mt(i,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=Ia(""+u),i.setAttribute(l,u);break;case"onClick":u!=null&&(i.onclick=me);break;case"onScroll":u!=null&&Qe("scroll",i);break;case"onScrollEnd":u!=null&&Qe("scrollend",i);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"multiple":i.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":i.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){i.removeAttribute("xlink:href");break}l=Ia(""+u),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""+u):i.removeAttribute(l);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":u&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""):i.removeAttribute(l);break;case"capture":case"download":u===!0?i.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,u):i.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?i.setAttribute(l,u):i.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?i.removeAttribute(l):i.setAttribute(l,u);break;case"popover":Qe("beforetoggle",i),Qe("toggle",i),dn(i,"popover",u);break;case"xlinkActuate":An(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":An(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":An(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":An(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":An(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":An(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":An(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":An(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":An(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":dn(i,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=aa.get(l)||l,dn(i,l,u))}}function $h(i,r,l,u,p,b){switch(l){case"style":ut(i,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"children":typeof u=="string"?je(i,u):(typeof u=="number"||typeof u=="bigint")&&je(i,""+u);break;case"onScroll":u!=null&&Qe("scroll",i);break;case"onScrollEnd":u!=null&&Qe("scrollend",i);break;case"onClick":u!=null&&(i.onclick=me);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),r=l.slice(2,p?l.length-7:void 0),b=i[fn]||null,b=b!=null?b[l]:null,typeof b=="function"&&i.removeEventListener(r,b,p),typeof u=="function")){typeof b!="function"&&b!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(r,u,p);break e}l in i?i[l]=u:u===!0?i.setAttribute(l,""):dn(i,l,u)}}}function cn(i,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",i),Qe("load",i);var u=!1,p=!1,b;for(b in l)if(l.hasOwnProperty(b)){var E=l[b];if(E!=null)switch(b){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:mt(i,r,b,E,l,null)}}p&&mt(i,r,"srcSet",l.srcSet,l,null),u&&mt(i,r,"src",l.src,l,null);return;case"input":Qe("invalid",i);var N=b=E=p=null,I=null,X=null;for(u in l)if(l.hasOwnProperty(u)){var ie=l[u];if(ie!=null)switch(u){case"name":p=ie;break;case"type":E=ie;break;case"checked":I=ie;break;case"defaultChecked":X=ie;break;case"value":b=ie;break;case"defaultValue":N=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,r));break;default:mt(i,r,u,ie,l,null)}}Mr(i,b,N,I,X,E,p,!1);return;case"select":Qe("invalid",i),u=E=b=null;for(p in l)if(l.hasOwnProperty(p)&&(N=l[p],N!=null))switch(p){case"value":b=N;break;case"defaultValue":E=N;break;case"multiple":u=N;default:mt(i,r,p,N,l,null)}r=b,l=E,i.multiple=!!u,r!=null?rn(i,!!u,r,!1):l!=null&&rn(i,!!u,l,!0);return;case"textarea":Qe("invalid",i),b=p=u=null;for(E in l)if(l.hasOwnProperty(E)&&(N=l[E],N!=null))switch(E){case"value":u=N;break;case"defaultValue":p=N;break;case"children":b=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(a(91));break;default:mt(i,r,E,N,l,null)}Ns(i,u,p,b);return;case"option":for(I in l)if(l.hasOwnProperty(I)&&(u=l[I],u!=null))switch(I){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:mt(i,r,I,u,l,null)}return;case"dialog":Qe("beforetoggle",i),Qe("toggle",i),Qe("cancel",i),Qe("close",i);break;case"iframe":case"object":Qe("load",i);break;case"video":case"audio":for(u=0;u<Mo.length;u++)Qe(Mo[u],i);break;case"image":Qe("error",i),Qe("load",i);break;case"details":Qe("toggle",i);break;case"embed":case"source":case"link":Qe("error",i),Qe("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in l)if(l.hasOwnProperty(X)&&(u=l[X],u!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:mt(i,r,X,u,l,null)}return;default:if(La(r)){for(ie in l)l.hasOwnProperty(ie)&&(u=l[ie],u!==void 0&&$h(i,r,ie,u,l,void 0));return}}for(N in l)l.hasOwnProperty(N)&&(u=l[N],u!=null&&mt(i,r,N,u,l,null))}function ok(i,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,E=null,N=null,I=null,X=null,ie=null;for(ee in l){var oe=l[ee];if(l.hasOwnProperty(ee)&&oe!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":I=oe;default:u.hasOwnProperty(ee)||mt(i,r,ee,null,u,oe)}}for(var W in u){var ee=u[W];if(oe=l[W],u.hasOwnProperty(W)&&(ee!=null||oe!=null))switch(W){case"type":b=ee;break;case"name":p=ee;break;case"checked":X=ee;break;case"defaultChecked":ie=ee;break;case"value":E=ee;break;case"defaultValue":N=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,r));break;default:ee!==oe&&mt(i,r,W,ee,u,oe)}}Xl(i,E,N,I,X,ie,b,p);return;case"select":ee=E=N=W=null;for(b in l)if(I=l[b],l.hasOwnProperty(b)&&I!=null)switch(b){case"value":break;case"multiple":ee=I;default:u.hasOwnProperty(b)||mt(i,r,b,null,u,I)}for(p in u)if(b=u[p],I=l[p],u.hasOwnProperty(p)&&(b!=null||I!=null))switch(p){case"value":W=b;break;case"defaultValue":N=b;break;case"multiple":E=b;default:b!==I&&mt(i,r,p,b,u,I)}r=N,l=E,u=ee,W!=null?rn(i,!!l,W,!1):!!u!=!!l&&(r!=null?rn(i,!!l,r,!0):rn(i,!!l,l?[]:"",!1));return;case"textarea":ee=W=null;for(N in l)if(p=l[N],l.hasOwnProperty(N)&&p!=null&&!u.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:mt(i,r,N,null,u,p)}for(E in u)if(p=u[E],b=l[E],u.hasOwnProperty(E)&&(p!=null||b!=null))switch(E){case"value":W=p;break;case"defaultValue":ee=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==b&&mt(i,r,E,p,u,b)}Mc(i,W,ee);return;case"option":for(var xe in l)if(W=l[xe],l.hasOwnProperty(xe)&&W!=null&&!u.hasOwnProperty(xe))switch(xe){case"selected":i.selected=!1;break;default:mt(i,r,xe,null,u,W)}for(I in u)if(W=u[I],ee=l[I],u.hasOwnProperty(I)&&W!==ee&&(W!=null||ee!=null))switch(I){case"selected":i.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:mt(i,r,I,W,u,ee)}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 Me in l)W=l[Me],l.hasOwnProperty(Me)&&W!=null&&!u.hasOwnProperty(Me)&&mt(i,r,Me,null,u,W);for(X in u)if(W=u[X],ee=l[X],u.hasOwnProperty(X)&&W!==ee&&(W!=null||ee!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,r));break;default:mt(i,r,X,W,u,ee)}return;default:if(La(r)){for(var pt in l)W=l[pt],l.hasOwnProperty(pt)&&W!==void 0&&!u.hasOwnProperty(pt)&&$h(i,r,pt,void 0,u,W);for(ie in u)W=u[ie],ee=l[ie],!u.hasOwnProperty(ie)||W===ee||W===void 0&&ee===void 0||$h(i,r,ie,W,u,ee);return}}for(var H in l)W=l[H],l.hasOwnProperty(H)&&W!=null&&!u.hasOwnProperty(H)&&mt(i,r,H,null,u,W);for(oe in u)W=u[oe],ee=l[oe],!u.hasOwnProperty(oe)||W===ee||W==null&&ee==null||mt(i,r,oe,W,u,ee)}function Mx(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ck(){if(typeof performance.getEntriesByType=="function"){for(var i=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var p=l[u],b=p.transferSize,E=p.initiatorType,N=p.duration;if(b&&N&&Mx(E)){for(E=0,N=p.responseEnd,u+=1;u<l.length;u++){var I=l[u],X=I.startTime;if(X>N)break;var ie=I.transferSize,oe=I.initiatorType;ie&&Mx(oe)&&(I=I.responseEnd,E+=ie*(I<N?1:(N-X)/(I-X)))}if(--u,r+=8*(b+E)/(p.duration/1e3),i++,10<i)break}}if(0<i)return r/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Fh=null,Ph=null;function Au(i){return i.nodeType===9?i:i.ownerDocument}function jx(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Dx(i,r){if(i===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&r==="foreignObject"?0:i}function qh(i,r){return i==="textarea"||i==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Hh=null;function uk(){var i=window.event;return i&&i.type==="popstate"?i===Hh?!1:(Hh=i,!0):(Hh=null,!1)}var Lx=typeof setTimeout=="function"?setTimeout:void 0,fk=typeof clearTimeout=="function"?clearTimeout:void 0,Ix=typeof Promise=="function"?Promise:void 0,dk=typeof queueMicrotask=="function"?queueMicrotask:typeof Ix<"u"?function(i){return Ix.resolve(null).then(i).catch(hk)}:Lx;function hk(i){setTimeout(function(){throw i})}function er(i){return i==="head"}function zx(i,r){var l=r,u=0;do{var p=l.nextSibling;if(i.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(u===0){i.removeChild(p),tl(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")Do(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Do(l);for(var b=l.firstChild;b;){var E=b.nextSibling,N=b.nodeName;b[Or]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&b.rel.toLowerCase()==="stylesheet"||l.removeChild(b),b=E}}else l==="body"&&Do(i.ownerDocument.body);l=p}while(l);tl(r)}function Bx(i,r){var l=i;i=0;do{var u=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(i===0)break;i--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||i++;l=u}while(l)}function Kh(i){var r=i.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Kh(l),Yl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function mk(i,r,l,u){for(;i.nodeType===1;){var p=l;if(i.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(u){if(!i[Or])switch(r){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(b=i.getAttribute("rel"),b==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(b!==p.rel||i.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||i.getAttribute("title")!==(p.title==null?null:p.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(b=i.getAttribute("src"),(b!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(r==="input"&&i.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===b)return i}else return i;if(i=pi(i.nextSibling),i===null)break}return null}function pk(i,r,l){if(r==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=pi(i.nextSibling),i===null))return null;return i}function Ux(i,r){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!r||(i=pi(i.nextSibling),i===null))return null;return i}function Gh(i){return i.data==="$?"||i.data==="$~"}function Qh(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function gk(i,r){var l=i.ownerDocument;if(i.data==="$~")i._reactRetry=r;else if(i.data!=="$?"||l.readyState!=="loading")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),i._reactRetry=u}}function pi(i){for(;i!=null;i=i.nextSibling){var r=i.nodeType;if(r===1||r===3)break;if(r===8){if(r=i.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return i}var Yh=null;function $x(i){i=i.nextSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"||l==="/&"){if(r===0)return pi(i.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}i=i.nextSibling}return null}function Fx(i){i=i.previousSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return i;r--}else l!=="/$"&&l!=="/&"||r++}i=i.previousSibling}return null}function Px(i,r,l){switch(r=Au(l),i){case"html":if(i=r.documentElement,!i)throw Error(a(452));return i;case"head":if(i=r.head,!i)throw Error(a(453));return i;case"body":if(i=r.body,!i)throw Error(a(454));return i;default:throw Error(a(451))}}function Do(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);Yl(i)}var gi=new Map,qx=new Set;function Ou(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var va=ae.d;ae.d={f:bk,r:yk,D:xk,C:vk,L:Ek,m:Sk,X:_k,S:wk,M:kk};function bk(){var i=va.f(),r=Eu();return i||r}function yk(i){var r=na(i);r!==null&&r.tag===5&&r.type==="form"?sy(r):va.r(i)}var Zs=typeof document>"u"?null:document;function Hx(i,r,l){var u=Zs;if(u&&typeof r=="string"&&r){var p=On(r);p='link[rel="'+i+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),qx.has(p)||(qx.add(p),i={rel:i,crossOrigin:l,href:r},u.querySelector(p)===null&&(r=u.createElement("link"),cn(r,"link",i),Gt(r),u.head.appendChild(r)))}}function xk(i){va.D(i),Hx("dns-prefetch",i,null)}function vk(i,r){va.C(i,r),Hx("preconnect",i,r)}function Ek(i,r,l){va.L(i,r,l);var u=Zs;if(u&&i&&r){var p='link[rel="preload"][as="'+On(r)+'"]';r==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+On(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+On(l.imageSizes)+'"]')):p+='[href="'+On(i)+'"]';var b=p;switch(r){case"style":b=Js(i);break;case"script":b=el(i)}gi.has(b)||(i=g({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:i,as:r},l),gi.set(b,i),u.querySelector(p)!==null||r==="style"&&u.querySelector(Lo(b))||r==="script"&&u.querySelector(Io(b))||(r=u.createElement("link"),cn(r,"link",i),Gt(r),u.head.appendChild(r)))}}function Sk(i,r){va.m(i,r);var l=Zs;if(l&&i){var u=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+On(u)+'"][href="'+On(i)+'"]',b=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=el(i)}if(!gi.has(b)&&(i=g({rel:"modulepreload",href:i},r),gi.set(b,i),l.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Io(b)))return}u=l.createElement("link"),cn(u,"link",i),Gt(u),l.head.appendChild(u)}}}function wk(i,r,l){va.S(i,r,l);var u=Zs;if(u&&i){var p=Da(u).hoistableStyles,b=Js(i);r=r||"default";var E=p.get(b);if(!E){var N={loading:0,preload:null};if(E=u.querySelector(Lo(b)))N.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":r},l),(l=gi.get(b))&&Vh(i,l);var I=E=u.createElement("link");Gt(I),cn(I,"link",i),I._p=new Promise(function(X,ie){I.onload=X,I.onerror=ie}),I.addEventListener("load",function(){N.loading|=1}),I.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Ru(E,r,u)}E={type:"stylesheet",instance:E,count:1,state:N},p.set(b,E)}}}function _k(i,r){va.X(i,r);var l=Zs;if(l&&i){var u=Da(l).hoistableScripts,p=el(i),b=u.get(p);b||(b=l.querySelector(Io(p)),b||(i=g({src:i,async:!0},r),(r=gi.get(p))&&Xh(i,r),b=l.createElement("script"),Gt(b),cn(b,"link",i),l.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function kk(i,r){va.M(i,r);var l=Zs;if(l&&i){var u=Da(l).hoistableScripts,p=el(i),b=u.get(p);b||(b=l.querySelector(Io(p)),b||(i=g({src:i,async:!0,type:"module"},r),(r=gi.get(p))&&Xh(i,r),b=l.createElement("script"),Gt(b),cn(b,"link",i),l.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function Kx(i,r,l,u){var p=(p=ve.current)?Ou(p):null;if(!p)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Js(l.href),l=Da(p).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){i=Js(l.href);var b=Da(p).hoistableStyles,E=b.get(i);if(E||(p=p.ownerDocument||p,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(i,E),(b=p.querySelector(Lo(i)))&&!b._p&&(E.instance=b,E.state.loading=5),gi.has(i)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},gi.set(i,l),b||Nk(p,i,l,E.state))),r&&u===null)throw Error(a(528,""));return E}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=el(l),l=Da(p).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,i))}}function Js(i){return'href="'+On(i)+'"'}function Lo(i){return'link[rel="stylesheet"]['+i+"]"}function Gx(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function Nk(i,r,l,u){i.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=i.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),cn(r,"link",l),Gt(r),i.head.appendChild(r))}function el(i){return'[src="'+On(i)+'"]'}function Io(i){return"script[async]"+i}function Qx(i,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=i.querySelector('style[data-href~="'+On(l.href)+'"]');if(u)return r.instance=u,Gt(u),u;var p=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(i.ownerDocument||i).createElement("style"),Gt(u),cn(u,"style",p),Ru(u,l.precedence,i),r.instance=u;case"stylesheet":p=Js(l.href);var b=i.querySelector(Lo(p));if(b)return r.state.loading|=4,r.instance=b,Gt(b),b;u=Gx(l),(p=gi.get(p))&&Vh(u,p),b=(i.ownerDocument||i).createElement("link"),Gt(b);var E=b;return E._p=new Promise(function(N,I){E.onload=N,E.onerror=I}),cn(b,"link",u),r.state.loading|=4,Ru(b,l.precedence,i),r.instance=b;case"script":return b=el(l.src),(p=i.querySelector(Io(b)))?(r.instance=p,Gt(p),p):(u=l,(p=gi.get(b))&&(u=g({},l),Xh(u,p)),i=i.ownerDocument||i,p=i.createElement("script"),Gt(p),cn(p,"link",u),i.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Ru(u,l.precedence,i));return r.instance}function Ru(i,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,b=p,E=0;E<u.length;E++){var N=u[E];if(N.dataset.precedence===r)b=N;else if(b!==p)break}b?b.parentNode.insertBefore(i,b.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(i,r.firstChild))}function Vh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function Xh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.integrity==null&&(i.integrity=r.integrity)}var Mu=null;function Yx(i,r,l){if(Mu===null){var u=new Map,p=Mu=new Map;p.set(l,u)}else p=Mu,u=p.get(l),u||(u=new Map,p.set(l,u));if(u.has(i))return u;for(u.set(i,null),l=l.getElementsByTagName(i),p=0;p<l.length;p++){var b=l[p];if(!(b[Or]||b[Pt]||i==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var E=b.getAttribute(r)||"";E=i+E;var N=u.get(E);N?N.push(b):u.set(E,[b])}}return u}function Vx(i,r,l){i=i.ownerDocument||i,i.head.insertBefore(l,r==="title"?i.querySelector("head > title"):null)}function Tk(i,r,l){if(l===1||r.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return i=r.disabled,typeof r.precedence=="string"&&i==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Xx(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Ck(i,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var p=Js(u.href),b=r.querySelector(Lo(p));if(b){r=b._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=ju.bind(i),r.then(i,i)),l.state.loading|=4,l.instance=b,Gt(b);return}b=r.ownerDocument||r,u=Gx(u),(p=gi.get(p))&&Vh(u,p),b=b.createElement("link"),Gt(b);var E=b;E._p=new Promise(function(N,I){E.onload=N,E.onerror=I}),cn(b,"link",u),l.instance=b}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(i.count++,l=ju.bind(i),r.addEventListener("load",l),r.addEventListener("error",l))}}var Wh=0;function Ak(i,r){return i.stylesheets&&i.count===0&&Lu(i,i.stylesheets),0<i.count||0<i.imgCount?function(l){var u=setTimeout(function(){if(i.stylesheets&&Lu(i,i.stylesheets),i.unsuspend){var b=i.unsuspend;i.unsuspend=null,b()}},6e4+r);0<i.imgBytes&&Wh===0&&(Wh=62500*ck());var p=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Lu(i,i.stylesheets),i.unsuspend)){var b=i.unsuspend;i.unsuspend=null,b()}},(i.imgBytes>Wh?50:800)+r);return i.unsuspend=l,function(){i.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function ju(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lu(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Du=null;function Lu(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Du=new Map,r.forEach(Ok,i),Du=null,ju.call(i))}function Ok(i,r){if(!(r.state.loading&4)){var l=Du.get(i);if(l)var u=l.get(null);else{l=new Map,Du.set(i,l);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<p.length;b++){var E=p[b];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(l.set(E.dataset.precedence,E),u=E)}u&&l.set(null,u)}p=r.instance,E=p.getAttribute("data-precedence"),b=l.get(E)||u,b===u&&l.set(null,p),l.set(E,p),this.count++,u=ju.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),b?b.parentNode.insertBefore(p,b.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),r.state.loading|=4}}var zo={$$typeof:T,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function Rk(i,r,l,u,p,b,E,N,I){this.tag=1,this.containerInfo=i,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=wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wt(0),this.hiddenUpdates=wt(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function Wx(i,r,l,u,p,b,E,N,I,X,ie,oe){return i=new Rk(i,r,l,E,I,X,ie,oe,N),r=1,b===!0&&(r|=24),b=Vn(3,null,null,r),i.current=b,b.stateNode=i,r=Od(),r.refCount++,i.pooledCache=r,r.refCount++,b.memoizedState={element:u,isDehydrated:l,cache:r},Dd(b),i}function Zx(i){return i?(i=Rs,i):Rs}function Jx(i,r,l,u,p,b){p=Zx(p),u.context===null?u.context=p:u.pendingContext=p,u=qa(r),u.payload={element:l},b=b===void 0?null:b,b!==null&&(u.callback=b),l=Ha(i,u,r),l!==null&&(In(l,i,r),po(l,i,r))}function ev(i,r){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<r?l:r}}function Zh(i,r){ev(i,r),(i=i.alternate)&&ev(i,r)}function tv(i){if(i.tag===13||i.tag===31){var r=Ir(i,67108864);r!==null&&In(r,i,67108864),Zh(i,67108864)}}function nv(i){if(i.tag===13||i.tag===31){var r=ei();r=Nt(r);var l=Ir(i,r);l!==null&&In(l,i,r),Zh(i,r)}}var Iu=!0;function Mk(i,r,l,u){var p=U.T;U.T=null;var b=ae.p;try{ae.p=2,Jh(i,r,l,u)}finally{ae.p=b,U.T=p}}function jk(i,r,l,u){var p=U.T;U.T=null;var b=ae.p;try{ae.p=8,Jh(i,r,l,u)}finally{ae.p=b,U.T=p}}function Jh(i,r,l,u){if(Iu){var p=em(u);if(p===null)Uh(i,r,u,zu,l),av(i,u);else if(Lk(p,i,r,l,u))u.stopPropagation();else if(av(i,u),r&4&&-1<Dk.indexOf(i)){for(;p!==null;){var b=na(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var E=Cn(b.pendingLanes);if(E!==0){var N=b;for(N.pendingLanes|=2,N.entangledLanes|=2;E;){var I=1<<31-ot(E);N.entanglements[1]|=I,E&=~I}qi(b),(rt&6)===0&&(xu=Ot()+500,Ro(0))}}break;case 31:case 13:N=Ir(b,2),N!==null&&In(N,b,2),Eu(),Zh(b,2)}if(b=em(u),b===null&&Uh(i,r,u,zu,l),b===p)break;p=b}p!==null&&u.stopPropagation()}else Uh(i,r,u,null,l)}}function em(i){return i=Be(i),tm(i)}var zu=null;function tm(i){if(zu=null,i=En(i),i!==null){var r=o(i);if(r===null)i=null;else{var l=r.tag;if(l===13){if(i=c(r),i!==null)return i;i=null}else if(l===31){if(i=f(r),i!==null)return i;i=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return zu=i,null}function iv(i){switch(i){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(ys()){case ne:return 2;case de:return 8;case Re:case qe:return 32;case nt:return 268435456;default:return 32}default:return 32}}var nm=!1,tr=null,nr=null,ir=null,Bo=new Map,Uo=new Map,ar=[],Dk="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 av(i,r){switch(i){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":ir=null;break;case"pointerover":case"pointerout":Bo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uo.delete(r.pointerId)}}function $o(i,r,l,u,p,b){return i===null||i.nativeEvent!==b?(i={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:b,targetContainers:[p]},r!==null&&(r=na(r),r!==null&&tv(r)),i):(i.eventSystemFlags|=u,r=i.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),i)}function Lk(i,r,l,u,p){switch(r){case"focusin":return tr=$o(tr,i,r,l,u,p),!0;case"dragenter":return nr=$o(nr,i,r,l,u,p),!0;case"mouseover":return ir=$o(ir,i,r,l,u,p),!0;case"pointerover":var b=p.pointerId;return Bo.set(b,$o(Bo.get(b)||null,i,r,l,u,p)),!0;case"gotpointercapture":return b=p.pointerId,Uo.set(b,$o(Uo.get(b)||null,i,r,l,u,p)),!0}return!1}function rv(i){var r=En(i.target);if(r!==null){var l=o(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){i.blockedOn=r,Es(i.priority,function(){nv(l)});return}}else if(r===31){if(r=f(l),r!==null){i.blockedOn=r,Es(i.priority,function(){nv(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Bu(i){if(i.blockedOn!==null)return!1;for(var r=i.targetContainers;0<r.length;){var l=em(i.nativeEvent);if(l===null){l=i.nativeEvent;var u=new l.constructor(l.type,l);Se=u,l.target.dispatchEvent(u),Se=null}else return r=na(l),r!==null&&tv(r),i.blockedOn=l,!1;r.shift()}return!0}function sv(i,r,l){Bu(i)&&l.delete(r)}function Ik(){nm=!1,tr!==null&&Bu(tr)&&(tr=null),nr!==null&&Bu(nr)&&(nr=null),ir!==null&&Bu(ir)&&(ir=null),Bo.forEach(sv),Uo.forEach(sv)}function Uu(i,r){i.blockedOn===r&&(i.blockedOn=null,nm||(nm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Ik)))}var $u=null;function lv(i){$u!==i&&($u=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){$u===i&&($u=null);for(var r=0;r<i.length;r+=3){var l=i[r],u=i[r+1],p=i[r+2];if(typeof u!="function"){if(tm(u||l)===null)continue;break}var b=na(l);b!==null&&(i.splice(r,3),r-=3,eh(b,{pending:!0,data:p,method:l.method,action:u},u,p))}}))}function tl(i){function r(I){return Uu(I,i)}tr!==null&&Uu(tr,i),nr!==null&&Uu(nr,i),ir!==null&&Uu(ir,i),Bo.forEach(r),Uo.forEach(r);for(var l=0;l<ar.length;l++){var u=ar[l];u.blockedOn===i&&(u.blockedOn=null)}for(;0<ar.length&&(l=ar[0],l.blockedOn===null);)rv(l),l.blockedOn===null&&ar.shift();if(l=(i.ownerDocument||i).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var p=l[u],b=l[u+1],E=p[fn]||null;if(typeof b=="function")E||lv(l);else if(E){var N=null;if(b&&b.hasAttribute("formAction")){if(p=b,E=b[fn]||null)N=E.formAction;else if(tm(p)!==null)continue}else N=E.action;typeof N=="function"?l[u+1]=N:(l.splice(u,3),u-=3),lv(l)}}}function ov(){function i(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(E){return p=E})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function im(i){this._internalRoot=i}Fu.prototype.render=im.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=ei();Jx(l,u,i,r,null,null)},Fu.prototype.unmount=im.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;Jx(i.current,2,null,i,null,null),Eu(),r[Ma]=null}};function Fu(i){this._internalRoot=i}Fu.prototype.unstable_scheduleHydration=function(i){if(i){var r=vs();i={blockedOn:null,target:i,priority:r};for(var l=0;l<ar.length&&r!==0&&r<ar[l].priority;l++);ar.splice(l,0,i),l===0&&rv(i)}};var cv=t.version;if(cv!=="19.2.5")throw Error(a(527,cv,"19.2.5"));ae.findDOMNode=function(i){var r=i._reactInternals;if(r===void 0)throw typeof i.render=="function"?Error(a(188)):(i=Object.keys(i).join(","),Error(a(268,i)));return i=m(r),i=i!==null?y(i):null,i=i===null?null:i.stateNode,i};var zk={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pu.isDisabled&&Pu.supportsFiber)try{an=Pu.inject(zk),Lt=Pu}catch{}}return Po.createRoot=function(i,r){if(!s(i))throw Error(a(299));var l=!1,u="",p=gy,b=by,E=yy;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(b=r.onCaughtError),r.onRecoverableError!==void 0&&(E=r.onRecoverableError)),r=Wx(i,1,!1,null,null,l,u,null,p,b,E,ov),i[Ma]=r.current,Bh(i),new im(r)},Po.hydrateRoot=function(i,r,l){if(!s(i))throw Error(a(299));var u=!1,p="",b=gy,E=by,N=yy,I=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(b=l.onUncaughtError),l.onCaughtError!==void 0&&(E=l.onCaughtError),l.onRecoverableError!==void 0&&(N=l.onRecoverableError),l.formState!==void 0&&(I=l.formState)),r=Wx(i,1,!0,r,l??null,u,p,I,b,E,N,ov),r.context=Zx(null),l=r.current,u=ei(),u=Nt(u),p=qa(u),p.callback=null,Ha(l,p,u),l=u,r.current.lanes=l,bt(r,l),qi(r),i[Ma]=r.current,Bh(i),new Fu(r)},Po.version="19.2.5",Po}var Ev;function Vk(){if(Ev)return lm.exports;Ev=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),lm.exports=Yk(),lm.exports}var Xk=Vk(),Ml=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},es,fr,gl,rE,Wk=(rE=class extends Ml{constructor(){super();Te(this,es);Te(this,fr);Te(this,gl);be(this,gl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){z(this,fr)||this.setEventListener(z(this,gl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,fr))==null||t.call(this),be(this,fr,void 0))}setEventListener(t){var n;be(this,gl,t),(n=z(this,fr))==null||n.call(this),be(this,fr,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){z(this,es)!==t&&(be(this,es,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof z(this,es)=="boolean"?z(this,es):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},es=new WeakMap,fr=new WeakMap,gl=new WeakMap,rE),Rp=new Wk,Zk={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},dr,Cp,sE,Jk=(sE=class{constructor(){Te(this,dr,Zk);Te(this,Cp,!1)}setTimeoutProvider(e){be(this,dr,e)}setTimeout(e,t){return z(this,dr).setTimeout(e,t)}clearTimeout(e){z(this,dr).clearTimeout(e)}setInterval(e,t){return z(this,dr).setInterval(e,t)}clearInterval(e){z(this,dr).clearInterval(e)}},dr=new WeakMap,Cp=new WeakMap,sE),Xr=new Jk;function eN(e){setTimeout(e,0)}var tN=typeof window>"u"||"Deno"in globalThis;function kn(){}function nN(e,t){return typeof e=="function"?e(t):e}function Hm(e){return typeof e=="number"&&e>=0&&e!==1/0}function gE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vr(e,t){return typeof e=="function"?e(t):e}function yi(e,t){return typeof e=="function"?e(t):e}function Sv(e,t){const{type:n="all",exact:a,fetchStatus:s,predicate:o,queryKey:c,stale:f}=e;if(c){if(a){if(t.queryHash!==Mp(c,t.options))return!1}else if(!nc(t.queryKey,c))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||s&&s!==t.state.fetchStatus||o&&!o(t))}function wv(e,t){const{exact:n,status:a,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(cs(t.options.mutationKey)!==cs(o))return!1}else if(!nc(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function Mp(e,t){return((t==null?void 0:t.queryKeyHashFn)||cs)(e)}function cs(e){return JSON.stringify(e,(t,n)=>Km(n)?Object.keys(n).sort().reduce((a,s)=>(a[s]=n[s],a),{}):n)}function nc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nc(e[n],t[n])):!1}var iN=Object.prototype.hasOwnProperty;function bE(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=_v(e)&&_v(t);if(!a&&!(Km(e)&&Km(t)))return t;const o=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),f=c.length,d=a?new Array(f):{};let m=0;for(let y=0;y<f;y++){const g=a?y:c[y],x=e[g],v=t[g];if(x===v){d[g]=x,(a?y<o:iN.call(e,g))&&m++;continue}if(x===null||v===null||typeof x!="object"||typeof v!="object"){d[g]=v;continue}const S=bE(x,v,n+1);d[g]=S,S===x&&m++}return o===f&&m===o?e:d}function gf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function _v(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Km(e){if(!kv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!kv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function kv(e){return Object.prototype.toString.call(e)==="[object Object]"}function aN(e){return new Promise(t=>{Xr.setTimeout(t,e)})}function Gm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?bE(e,t):t}function rN(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function sN(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var jp=Symbol();function yE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===jp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Dp(e,t){return typeof e=="function"?e(...t):!!e}function lN(e,t,n){let a=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),a||(a=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var ic=(()=>{let e=()=>tN;return{isServer(){return e()},setIsServer(t){e=t}}})();function Qm(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function a(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{a({status:"fulfilled",value:s}),e(s)},n.reject=s=>{a({status:"rejected",reason:s}),t(s)},n}var oN=eN;function cN(){let e=[],t=0,n=f=>{f()},a=f=>{f()},s=oN;const o=f=>{t?e.push(f):s(()=>{n(f)})},c=()=>{const f=e;e=[],f.length&&s(()=>{a(()=>{f.forEach(d=>{n(d)})})})};return{batch:f=>{let d;t++;try{d=f()}finally{t--,t||c()}return d},batchCalls:f=>(...d)=>{o(()=>{f(...d)})},schedule:o,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{s=f}}}var en=cN(),bl,hr,yl,lE,uN=(lE=class extends Ml{constructor(){super();Te(this,bl,!0);Te(this,hr);Te(this,yl);be(this,yl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}})}onSubscribe(){z(this,hr)||this.setEventListener(z(this,yl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,hr))==null||t.call(this),be(this,hr,void 0))}setEventListener(t){var n;be(this,yl,t),(n=z(this,hr))==null||n.call(this),be(this,hr,t(this.setOnline.bind(this)))}setOnline(t){z(this,bl)!==t&&(be(this,bl,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return z(this,bl)}},bl=new WeakMap,hr=new WeakMap,yl=new WeakMap,lE),bf=new uN;function fN(e){return Math.min(1e3*2**e,3e4)}function xE(e){return(e??"online")==="online"?bf.isOnline():!0}var Ym=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function vE(e){let t=!1,n=0,a;const s=Qm(),o=()=>s.status!=="pending",c=w=>{var k;if(!o()){const _=new Ym(w);x(_),(k=e.onCancel)==null||k.call(e,_)}},f=()=>{t=!0},d=()=>{t=!1},m=()=>Rp.isFocused()&&(e.networkMode==="always"||bf.isOnline())&&e.canRun(),y=()=>xE(e.networkMode)&&e.canRun(),g=w=>{o()||(a==null||a(),s.resolve(w))},x=w=>{o()||(a==null||a(),s.reject(w))},v=()=>new Promise(w=>{var k;a=_=>{(o()||m())&&w(_)},(k=e.onPause)==null||k.call(e)}).then(()=>{var w;a=void 0,o()||(w=e.onContinue)==null||w.call(e)}),S=()=>{if(o())return;let w;const k=n===0?e.initialPromise:void 0;try{w=k??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(g).catch(_=>{var M;if(o())return;const A=e.retry??(ic.isServer()?0:3),T=e.retryDelay??fN,j=typeof T=="function"?T(n,_):T,F=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,_);if(t||!F){x(_);return}n++,(M=e.onFail)==null||M.call(e,n,_),aN(j).then(()=>m()?void 0:v()).then(()=>{t?x(_):S()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a==null||a(),s),cancelRetry:f,continueRetry:d,canStart:y,start:()=>(y()?S():v().then(S),s)}}var ts,oE,EE=(oE=class{constructor(){Te(this,ts)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hm(this.gcTime)&&be(this,ts,Xr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ic.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,ts)!==void 0&&(Xr.clearTimeout(z(this,ts)),be(this,ts,void 0))}},ts=new WeakMap,oE),ns,xl,bi,is,nn,dc,as,ni,SE,Ea,cE,dN=(cE=class extends EE{constructor(t){super();Te(this,ni);Te(this,ns);Te(this,xl);Te(this,bi);Te(this,is);Te(this,nn);Te(this,dc);Te(this,as);be(this,as,!1),be(this,dc,t.defaultOptions),this.setOptions(t.options),this.observers=[],be(this,is,t.client),be(this,bi,z(this,is).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,be(this,ns,Tv(this.options)),this.state=t.state??z(this,ns),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,nn))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,dc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Tv(this.options);n.data!==void 0&&(this.setState(Nv(n.data,n.dataUpdatedAt)),be(this,ns,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,bi).remove(this)}setData(t,n){const a=Gm(this.state.data,t,this.options);return Fe(this,ni,Ea).call(this,{data:a,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),a}setState(t,n){Fe(this,ni,Ea).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,s;const n=(a=z(this,nn))==null?void 0:a.promise;return(s=z(this,nn))==null||s.cancel(t),n?n.then(kn).catch(kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,ns)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>yi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===jp||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>vr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!gE(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,nn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,nn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,bi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(z(this,nn)&&(z(this,as)||Fe(this,ni,SE).call(this)?z(this,nn).cancel({revert:!0}):z(this,nn).cancelRetry()),this.scheduleGc()),z(this,bi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Fe(this,ni,Ea).call(this,{type:"invalidate"})}async fetch(t,n){var d,m,y,g,x,v,S,w,k,_,A,T;if(this.state.fetchStatus!=="idle"&&((d=z(this,nn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,nn))return z(this,nn).continueRetry(),z(this,nn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const j=this.observers.find(F=>F.options.queryFn);j&&this.setOptions(j.options)}const a=new AbortController,s=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(be(this,as,!0),a.signal)})},o=()=>{const j=yE(this.options,n),M=(()=>{const q={client:z(this,is),queryKey:this.queryKey,meta:this.meta};return s(q),q})();return be(this,as,!1),this.options.persister?this.options.persister(j,M,this):j(M)},f=(()=>{const j={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,is),state:this.state,fetchFn:o};return s(j),j})();(m=this.options.behavior)==null||m.onFetch(f,this),be(this,xl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=f.fetchOptions)==null?void 0:y.meta))&&Fe(this,ni,Ea).call(this,{type:"fetch",meta:(g=f.fetchOptions)==null?void 0:g.meta}),be(this,nn,vE({initialPromise:n==null?void 0:n.initialPromise,fn:f.fetchFn,onCancel:j=>{j instanceof Ym&&j.revert&&this.setState({...z(this,xl),fetchStatus:"idle"}),a.abort()},onFail:(j,F)=>{Fe(this,ni,Ea).call(this,{type:"failed",failureCount:j,error:F})},onPause:()=>{Fe(this,ni,Ea).call(this,{type:"pause"})},onContinue:()=>{Fe(this,ni,Ea).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const j=await z(this,nn).start();if(j===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(j),(v=(x=z(this,bi).config).onSuccess)==null||v.call(x,j,this),(w=(S=z(this,bi).config).onSettled)==null||w.call(S,j,this.state.error,this),j}catch(j){if(j instanceof Ym){if(j.silent)return z(this,nn).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw Fe(this,ni,Ea).call(this,{type:"error",error:j}),(_=(k=z(this,bi).config).onError)==null||_.call(k,j,this),(T=(A=z(this,bi).config).onSettled)==null||T.call(A,this.state.data,j,this),j}finally{this.scheduleGc()}}},ns=new WeakMap,xl=new WeakMap,bi=new WeakMap,is=new WeakMap,nn=new WeakMap,dc=new WeakMap,as=new WeakMap,ni=new WeakSet,SE=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ea=function(t){const n=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...wE(a.data,this.options),fetchMeta:t.meta??null};case"success":const s={...a,...Nv(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return be(this,xl,t.manual?s:void 0),s;case"error":const o=t.error;return{...a,error:o,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=n(this.state),en.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),z(this,bi).notify({query:this,type:"updated",action:t})})},cE);function wE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Nv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Un,et,hc,wn,rs,vl,Sa,mr,mc,El,Sl,ss,ls,pr,wl,lt,Xo,Vm,Xm,Wm,Zm,Jm,ep,tp,_E,uE,hN=(uE=class extends Ml{constructor(t,n){super();Te(this,lt);Te(this,Un);Te(this,et);Te(this,hc);Te(this,wn);Te(this,rs);Te(this,vl);Te(this,Sa);Te(this,mr);Te(this,mc);Te(this,El);Te(this,Sl);Te(this,ss);Te(this,ls);Te(this,pr);Te(this,wl,new Set);this.options=n,be(this,Un,t),be(this,mr,null),be(this,Sa,Qm()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,et).addObserver(this),Cv(z(this,et),this.options)?Fe(this,lt,Xo).call(this):this.updateResult(),Fe(this,lt,Zm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return np(z(this,et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return np(z(this,et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Fe(this,lt,Jm).call(this),Fe(this,lt,ep).call(this),z(this,et).removeObserver(this)}setOptions(t){const n=this.options,a=z(this,et);if(this.options=z(this,Un).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,z(this,et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Fe(this,lt,tp).call(this),z(this,et).setOptions(this.options),n._defaulted&&!gf(this.options,n)&&z(this,Un).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,et),observer:this});const s=this.hasListeners();s&&Av(z(this,et),a,this.options,n)&&Fe(this,lt,Xo).call(this),this.updateResult(),s&&(z(this,et)!==a||yi(this.options.enabled,z(this,et))!==yi(n.enabled,z(this,et))||vr(this.options.staleTime,z(this,et))!==vr(n.staleTime,z(this,et)))&&Fe(this,lt,Vm).call(this);const o=Fe(this,lt,Xm).call(this);s&&(z(this,et)!==a||yi(this.options.enabled,z(this,et))!==yi(n.enabled,z(this,et))||o!==z(this,pr))&&Fe(this,lt,Wm).call(this,o)}getOptimisticResult(t){const n=z(this,Un).getQueryCache().build(z(this,Un),t),a=this.createResult(n,t);return pN(this,a)&&(be(this,wn,a),be(this,vl,this.options),be(this,rs,z(this,et).state)),a}getCurrentResult(){return z(this,wn)}trackResult(t,n){return new Proxy(t,{get:(a,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,Sa).status==="pending"&&z(this,Sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){z(this,wl).add(t)}getCurrentQuery(){return z(this,et)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=z(this,Un).defaultQueryOptions(t),a=z(this,Un).getQueryCache().build(z(this,Un),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return Fe(this,lt,Xo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,wn)))}createResult(t,n){var te;const a=z(this,et),s=this.options,o=z(this,wn),c=z(this,rs),f=z(this,vl),m=t!==a?t.state:z(this,hc),{state:y}=t;let g={...y},x=!1,v;if(n._optimisticResults){const D=this.hasListeners(),P=!D&&Cv(t,n),J=D&&Av(t,a,n,s);(P||J)&&(g={...g,...wE(y.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:S,errorUpdatedAt:w,status:k}=g;v=g.data;let _=!1;if(n.placeholderData!==void 0&&v===void 0&&k==="pending"){let D;o!=null&&o.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(D=o.data,_=!0):D=typeof n.placeholderData=="function"?n.placeholderData((te=z(this,Sl))==null?void 0:te.state.data,z(this,Sl)):n.placeholderData,D!==void 0&&(k="success",v=Gm(o==null?void 0:o.data,D,n),x=!0)}if(n.select&&v!==void 0&&!_)if(o&&v===(c==null?void 0:c.data)&&n.select===z(this,mc))v=z(this,El);else try{be(this,mc,n.select),v=n.select(v),v=Gm(o==null?void 0:o.data,v,n),be(this,El,v),be(this,mr,null)}catch(D){be(this,mr,D)}z(this,mr)&&(S=z(this,mr),v=z(this,El),w=Date.now(),k="error");const A=g.fetchStatus==="fetching",T=k==="pending",j=k==="error",F=T&&A,M=v!==void 0,K={status:k,fetchStatus:g.fetchStatus,isPending:T,isSuccess:k==="success",isError:j,isInitialLoading:F,isLoading:F,data:v,dataUpdatedAt:g.dataUpdatedAt,error:S,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>m.dataUpdateCount||g.errorUpdateCount>m.errorUpdateCount,isFetching:A,isRefetching:A&&!T,isLoadingError:j&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:j&&M,isStale:Lp(t,n),refetch:this.refetch,promise:z(this,Sa),isEnabled:yi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=K.data!==void 0,P=K.status==="error"&&!D,J=Y=>{P?Y.reject(K.error):D&&Y.resolve(K.data)},re=()=>{const Y=be(this,Sa,K.promise=Qm());J(Y)},Q=z(this,Sa);switch(Q.status){case"pending":t.queryHash===a.queryHash&&J(Q);break;case"fulfilled":(P||K.data!==Q.value)&&re();break;case"rejected":(!P||K.error!==Q.reason)&&re();break}}return K}updateResult(){const t=z(this,wn),n=this.createResult(z(this,et),this.options);if(be(this,rs,z(this,et).state),be(this,vl,this.options),z(this,rs).data!==void 0&&be(this,Sl,z(this,et)),gf(n,t))return;be(this,wn,n);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!z(this,wl).size)return!0;const c=new Set(o??z(this,wl));return this.options.throwOnError&&c.add("error"),Object.keys(z(this,wn)).some(f=>{const d=f;return z(this,wn)[d]!==t[d]&&c.has(d)})};Fe(this,lt,_E).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Fe(this,lt,Zm).call(this)}},Un=new WeakMap,et=new WeakMap,hc=new WeakMap,wn=new WeakMap,rs=new WeakMap,vl=new WeakMap,Sa=new WeakMap,mr=new WeakMap,mc=new WeakMap,El=new WeakMap,Sl=new WeakMap,ss=new WeakMap,ls=new WeakMap,pr=new WeakMap,wl=new WeakMap,lt=new WeakSet,Xo=function(t){Fe(this,lt,tp).call(this);let n=z(this,et).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kn)),n},Vm=function(){Fe(this,lt,Jm).call(this);const t=vr(this.options.staleTime,z(this,et));if(ic.isServer()||z(this,wn).isStale||!Hm(t))return;const a=gE(z(this,wn).dataUpdatedAt,t)+1;be(this,ss,Xr.setTimeout(()=>{z(this,wn).isStale||this.updateResult()},a))},Xm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,et)):this.options.refetchInterval)??!1},Wm=function(t){Fe(this,lt,ep).call(this),be(this,pr,t),!(ic.isServer()||yi(this.options.enabled,z(this,et))===!1||!Hm(z(this,pr))||z(this,pr)===0)&&be(this,ls,Xr.setInterval(()=>{(this.options.refetchIntervalInBackground||Rp.isFocused())&&Fe(this,lt,Xo).call(this)},z(this,pr)))},Zm=function(){Fe(this,lt,Vm).call(this),Fe(this,lt,Wm).call(this,Fe(this,lt,Xm).call(this))},Jm=function(){z(this,ss)!==void 0&&(Xr.clearTimeout(z(this,ss)),be(this,ss,void 0))},ep=function(){z(this,ls)!==void 0&&(Xr.clearInterval(z(this,ls)),be(this,ls,void 0))},tp=function(){const t=z(this,Un).getQueryCache().build(z(this,Un),this.options);if(t===z(this,et))return;const n=z(this,et);be(this,et,t),be(this,hc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},_E=function(t){en.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(z(this,wn))}),z(this,Un).getQueryCache().notify({query:z(this,et),type:"observerResultsUpdated"})})},uE);function mN(e,t){return yi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Cv(e,t){return mN(e,t)||e.state.data!==void 0&&np(e,t,t.refetchOnMount)}function np(e,t,n){if(yi(t.enabled,e)!==!1&&vr(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&Lp(e,t)}return!1}function Av(e,t,n,a){return(e!==t||yi(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Lp(e,n)}function Lp(e,t){return yi(t.enabled,e)!==!1&&e.isStaleByTime(vr(t.staleTime,e))}function pN(e,t){return!gf(e.getCurrentResult(),t)}function Ov(e){return{onFetch:(t,n)=>{var y,g,x,v,S;const a=t.options,s=(x=(g=(y=t.fetchOptions)==null?void 0:y.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((v=t.state.data)==null?void 0:v.pages)||[],c=((S=t.state.data)==null?void 0:S.pageParams)||[];let f={pages:[],pageParams:[]},d=0;const m=async()=>{let w=!1;const k=T=>{lN(T,()=>t.signal,()=>w=!0)},_=yE(t.options,t.fetchOptions),A=async(T,j,F)=>{if(w)return Promise.reject();if(j==null&&T.pages.length)return Promise.resolve(T);const q=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:j,direction:F?"backward":"forward",meta:t.options.meta};return k(P),P})(),K=await _(q),{maxPages:te}=t.options,D=F?sN:rN;return{pages:D(T.pages,K,te),pageParams:D(T.pageParams,j,te)}};if(s&&o.length){const T=s==="backward",j=T?gN:Rv,F={pages:o,pageParams:c},M=j(a,F);f=await A(F,M,T)}else{const T=e??o.length;do{const j=d===0?c[0]??a.initialPageParam:Rv(a,f);if(d>0&&j==null)break;f=await A(f,j),d++}while(d<T)}return f};t.options.persister?t.fetchFn=()=>{var w,k;return(k=(w=t.options).persister)==null?void 0:k.call(w,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=m}}}function Rv(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function gN(e,{pages:t,pageParams:n}){var a;return t.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,t[0],t,n[0],n):void 0}var pc,Gi,mn,os,Qi,cr,fE,bN=(fE=class extends EE{constructor(t){super();Te(this,Qi);Te(this,pc);Te(this,Gi);Te(this,mn);Te(this,os);be(this,pc,t.client),this.mutationId=t.mutationId,be(this,mn,t.mutationCache),be(this,Gi,[]),this.state=t.state||kE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Gi).includes(t)||(z(this,Gi).push(t),this.clearGcTimeout(),z(this,mn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){be(this,Gi,z(this,Gi).filter(n=>n!==t)),this.scheduleGc(),z(this,mn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Gi).length||(this.state.status==="pending"?this.scheduleGc():z(this,mn).remove(this))}continue(){var t;return((t=z(this,os))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,f,d,m,y,g,x,v,S,w,k,_,A,T,j,F,M,q;const n=()=>{Fe(this,Qi,cr).call(this,{type:"continue"})},a={client:z(this,pc),meta:this.options.meta,mutationKey:this.options.mutationKey};be(this,os,vE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(K,te)=>{Fe(this,Qi,cr).call(this,{type:"failed",failureCount:K,error:te})},onPause:()=>{Fe(this,Qi,cr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,mn).canRun(this)}));const s=this.state.status==="pending",o=!z(this,os).canStart();try{if(s)n();else{Fe(this,Qi,cr).call(this,{type:"pending",variables:t,isPaused:o}),z(this,mn).config.onMutate&&await z(this,mn).config.onMutate(t,this,a);const te=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,t,a));te!==this.state.context&&Fe(this,Qi,cr).call(this,{type:"pending",context:te,variables:t,isPaused:o})}const K=await z(this,os).start();return await((m=(d=z(this,mn).config).onSuccess)==null?void 0:m.call(d,K,t,this.state.context,this,a)),await((g=(y=this.options).onSuccess)==null?void 0:g.call(y,K,t,this.state.context,a)),await((v=(x=z(this,mn).config).onSettled)==null?void 0:v.call(x,K,null,this.state.variables,this.state.context,this,a)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,K,null,t,this.state.context,a)),Fe(this,Qi,cr).call(this,{type:"success",data:K}),K}catch(K){try{await((_=(k=z(this,mn).config).onError)==null?void 0:_.call(k,K,t,this.state.context,this,a))}catch(te){Promise.reject(te)}try{await((T=(A=this.options).onError)==null?void 0:T.call(A,K,t,this.state.context,a))}catch(te){Promise.reject(te)}try{await((F=(j=z(this,mn).config).onSettled)==null?void 0:F.call(j,void 0,K,this.state.variables,this.state.context,this,a))}catch(te){Promise.reject(te)}try{await((q=(M=this.options).onSettled)==null?void 0:q.call(M,void 0,K,t,this.state.context,a))}catch(te){Promise.reject(te)}throw Fe(this,Qi,cr).call(this,{type:"error",error:K}),K}finally{z(this,mn).runNext(this)}}},pc=new WeakMap,Gi=new WeakMap,mn=new WeakMap,os=new WeakMap,Qi=new WeakSet,cr=function(t){const n=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),en.batch(()=>{z(this,Gi).forEach(a=>{a.onMutationUpdate(t)}),z(this,mn).notify({mutation:this,type:"updated",action:t})})},fE);function kE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wa,Oi,gc,dE,yN=(dE=class extends Ml{constructor(t={}){super();Te(this,wa);Te(this,Oi);Te(this,gc);this.config=t,be(this,wa,new Set),be(this,Oi,new Map),be(this,gc,0)}build(t,n,a){const s=new bN({client:t,mutationCache:this,mutationId:++qu(this,gc)._,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){z(this,wa).add(t);const n=Hu(t);if(typeof n=="string"){const a=z(this,Oi).get(n);a?a.push(t):z(this,Oi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,wa).delete(t)){const n=Hu(t);if(typeof n=="string"){const a=z(this,Oi).get(n);if(a)if(a.length>1){const s=a.indexOf(t);s!==-1&&a.splice(s,1)}else a[0]===t&&z(this,Oi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Hu(t);if(typeof n=="string"){const a=z(this,Oi).get(n),s=a==null?void 0:a.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var a;const n=Hu(t);if(typeof n=="string"){const s=(a=z(this,Oi).get(n))==null?void 0:a.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){en.batch(()=>{z(this,wa).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,wa).clear(),z(this,Oi).clear()})}getAll(){return Array.from(z(this,wa))}find(t){const n={exact:!0,...t};return this.getAll().find(a=>wv(n,a))}findAll(t={}){return this.getAll().filter(n=>wv(t,n))}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return en.batch(()=>Promise.all(t.map(n=>n.continue().catch(kn))))}},wa=new WeakMap,Oi=new WeakMap,gc=new WeakMap,dE);function Hu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var _a,gr,$n,ka,Ca,of,ip,hE,xN=(hE=class extends Ml{constructor(n,a){super();Te(this,Ca);Te(this,_a);Te(this,gr);Te(this,$n);Te(this,ka);be(this,_a,n),this.setOptions(a),this.bindMethods(),Fe(this,Ca,of).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const a=this.options;this.options=z(this,_a).defaultMutationOptions(n),gf(this.options,a)||z(this,_a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,$n),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&cs(a.mutationKey)!==cs(this.options.mutationKey)?this.reset():((s=z(this,$n))==null?void 0:s.state.status)==="pending"&&z(this,$n).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=z(this,$n))==null||n.removeObserver(this)}onMutationUpdate(n){Fe(this,Ca,of).call(this),Fe(this,Ca,ip).call(this,n)}getCurrentResult(){return z(this,gr)}reset(){var n;(n=z(this,$n))==null||n.removeObserver(this),be(this,$n,void 0),Fe(this,Ca,of).call(this),Fe(this,Ca,ip).call(this)}mutate(n,a){var s;return be(this,ka,a),(s=z(this,$n))==null||s.removeObserver(this),be(this,$n,z(this,_a).getMutationCache().build(z(this,_a),this.options)),z(this,$n).addObserver(this),z(this,$n).execute(n)}},_a=new WeakMap,gr=new WeakMap,$n=new WeakMap,ka=new WeakMap,Ca=new WeakSet,of=function(){var a;const n=((a=z(this,$n))==null?void 0:a.state)??kE();be(this,gr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},ip=function(n){en.batch(()=>{var a,s,o,c,f,d,m,y;if(z(this,ka)&&this.hasListeners()){const g=z(this,gr).variables,x=z(this,gr).context,v={client:z(this,_a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(a=z(this,ka)).onSuccess)==null||s.call(a,n.data,g,x,v)}catch(S){Promise.reject(S)}try{(c=(o=z(this,ka)).onSettled)==null||c.call(o,n.data,null,g,x,v)}catch(S){Promise.reject(S)}}else if((n==null?void 0:n.type)==="error"){try{(d=(f=z(this,ka)).onError)==null||d.call(f,n.error,g,x,v)}catch(S){Promise.reject(S)}try{(y=(m=z(this,ka)).onSettled)==null||y.call(m,void 0,n.error,g,x,v)}catch(S){Promise.reject(S)}}}this.listeners.forEach(g=>{g(z(this,gr))})})},hE),Yi,mE,vN=(mE=class extends Ml{constructor(t={}){super();Te(this,Yi);this.config=t,be(this,Yi,new Map)}build(t,n,a){const s=n.queryKey,o=n.queryHash??Mp(s,n);let c=this.get(o);return c||(c=new dN({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(s)}),this.add(c)),c}add(t){z(this,Yi).has(t.queryHash)||(z(this,Yi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=z(this,Yi).get(t.queryHash);n&&(t.destroy(),n===t&&z(this,Yi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){en.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Yi).get(t)}getAll(){return[...z(this,Yi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Sv(n,a))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(a=>Sv(t,a)):n}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){en.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){en.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yi=new WeakMap,mE),Bt,br,yr,_l,kl,xr,Nl,Tl,pE,EN=(pE=class{constructor(e={}){Te(this,Bt);Te(this,br);Te(this,yr);Te(this,_l);Te(this,kl);Te(this,xr);Te(this,Nl);Te(this,Tl);be(this,Bt,e.queryCache||new vN),be(this,br,e.mutationCache||new yN),be(this,yr,e.defaultOptions||{}),be(this,_l,new Map),be(this,kl,new Map),be(this,xr,0)}mount(){qu(this,xr)._++,z(this,xr)===1&&(be(this,Nl,Rp.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Bt).onFocus())})),be(this,Tl,bf.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Bt).onOnline())})))}unmount(){var e,t;qu(this,xr)._--,z(this,xr)===0&&((e=z(this,Nl))==null||e.call(this),be(this,Nl,void 0),(t=z(this,Tl))==null||t.call(this),be(this,Tl,void 0))}isFetching(e){return z(this,Bt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,br).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,Bt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=z(this,Bt).build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(vr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return z(this,Bt).findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),s=z(this,Bt).get(a.queryHash),o=s==null?void 0:s.state.data,c=nN(t,o);if(c!==void 0)return z(this,Bt).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return en.batch(()=>z(this,Bt).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,Bt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=z(this,Bt);en.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=z(this,Bt);return en.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=en.batch(()=>z(this,Bt).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(kn).catch(kn)}invalidateQueries(e,t={}){return en.batch(()=>(z(this,Bt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=en.batch(()=>z(this,Bt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(kn)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=z(this,Bt).build(this,t);return n.isStaleByTime(vr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kn).catch(kn)}fetchInfiniteQuery(e){return e.behavior=Ov(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kn).catch(kn)}ensureInfiniteQueryData(e){return e.behavior=Ov(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return bf.isOnline()?z(this,br).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,Bt)}getMutationCache(){return z(this,br)}getDefaultOptions(){return z(this,yr)}setDefaultOptions(e){be(this,yr,e)}setQueryDefaults(e,t){z(this,_l).set(cs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,_l).values()],n={};return t.forEach(a=>{nc(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){z(this,kl).set(cs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,kl).values()],n={};return t.forEach(a=>{nc(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,yr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===jp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,yr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,Bt).clear(),z(this,br).clear()}},Bt=new WeakMap,br=new WeakMap,yr=new WeakMap,_l=new WeakMap,kl=new WeakMap,xr=new WeakMap,Nl=new WeakMap,Tl=new WeakMap,pE),NE=R.createContext(void 0),qn=e=>{const t=R.useContext(NE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},SN=({client:e,children:t})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(NE.Provider,{value:e,children:t})),TE=R.createContext(!1),wN=()=>R.useContext(TE);TE.Provider;function _N(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var kN=R.createContext(_N()),NN=()=>R.useContext(kN),TN=(e,t,n)=>{const a=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Dp(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},CN=e=>{R.useEffect(()=>{e.clearReset()},[e])},AN=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||Dp(n,[e.error,a])),ON=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...s)=>n(a(...s)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},RN=(e,t)=>e.isLoading&&e.isFetching&&!t,MN=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Mv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function jN(e,t,n){var x,v,S,w;const a=wN(),s=NN(),o=qn(),c=o.defaultQueryOptions(e);(v=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||v.call(x,c);const f=o.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",ON(c),TN(c,s,f),CN(s);const d=!o.getQueryCache().get(c.queryHash),[m]=R.useState(()=>new t(o,c)),y=m.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(k=>{const _=g?m.subscribe(en.batchCalls(k)):kn;return m.updateResult(),_},[m,g]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),R.useEffect(()=>{m.setOptions(c)},[c,m]),MN(c,y))throw Mv(c,m,s);if(AN({result:y,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw y.error;if((w=(S=o.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||w.call(S,c,y),c.experimental_prefetchInRender&&!ic.isServer()&&RN(y,a)){const k=d?Mv(c,m,s):f==null?void 0:f.promise;k==null||k.catch(kn).finally(()=>{m.updateResult()})}return c.notifyOnChangeProps?y:m.trackResult(y)}function st(e,t){return jN(e,hN)}function Pn(e,t){const n=qn(),[a]=R.useState(()=>new xN(n,e));R.useEffect(()=>{a.setOptions(e)},[a,e]);const s=R.useSyncExternalStore(R.useCallback(c=>a.subscribe(en.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=R.useCallback((c,f)=>{a.mutate(c,f).catch(kn)},[a]);if(s.error&&Dp(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}/**
|
|
50
|
+
* react-router v7.14.2
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var jv="popstate";function Dv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function DN(e={}){function t(a,s){var m;let o=(m=s.state)==null?void 0:m.masked,{pathname:c,search:f,hash:d}=o||a.location;return ap("",{pathname:c,search:f,hash:d},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,s){return typeof s=="string"?s:ac(s)}return IN(t,n,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ei(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function LN(){return Math.random().toString(36).substring(2,10)}function Lv(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ap(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?jl(t):t,state:n,key:t&&t.key||a||LN(),unstable_mask:s}}function ac({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function jl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function IN(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,c=s.history,f="POP",d=null,m=y();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function y(){return(c.state||{idx:null}).idx}function g(){f="POP";let k=y(),_=k==null?null:k-m;m=k,d&&d({action:f,location:w.location,delta:_})}function x(k,_){f="PUSH";let A=Dv(k)?k:ap(w.location,k,_);m=y()+1;let T=Lv(A,m),j=w.createHref(A.unstable_mask||A);try{c.pushState(T,"",j)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;s.location.assign(j)}o&&d&&d({action:f,location:w.location,delta:1})}function v(k,_){f="REPLACE";let A=Dv(k)?k:ap(w.location,k,_);m=y();let T=Lv(A,m),j=w.createHref(A.unstable_mask||A);c.replaceState(T,"",j),o&&d&&d({action:f,location:w.location,delta:0})}function S(k){return zN(k)}let w={get action(){return f},get location(){return e(s,c)},listen(k){if(d)throw new Error("A history only accepts one active listener");return s.addEventListener(jv,g),d=k,()=>{s.removeEventListener(jv,g),d=null}},createHref(k){return t(s,k)},createURL:S,encodeLocation(k){let _=S(k);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:x,replace:v,go(k){return c.go(k)}};return w}function zN(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:ac(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function CE(e,t,n="/"){return BN(e,t,n,!1)}function BN(e,t,n,a){let s=typeof t=="string"?jl(t):t,o=Aa(s.pathname||"/",n);if(o==null)return null;let c=AE(e);UN(c);let f=null;for(let d=0;f==null&&d<c.length;++d){let m=XN(o);f=YN(c[d],m,a)}return f}function AE(e,t=[],n=[],a="",s=!1){let o=(c,f,d=s,m)=>{let y={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(a)&&d)return;Ct(y.relativePath.startsWith(a),`Absolute route path "${y.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(a.length)}let g=Ri([a,y.relativePath]),x=n.concat(y);c.children&&c.children.length>0&&(Ct(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),AE(c.children,t,x,g,d)),!(c.path==null&&!c.index)&&t.push({path:g,score:GN(g,c.index),routesMeta:x})};return e.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))o(c,f);else for(let m of OE(c.path))o(c,f,!0,m)}),t}function OE(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return s?[o,""]:[o];let c=OE(a.join("/")),f=[];return f.push(...c.map(d=>d===""?o:[o,d].join("/"))),s&&f.push(...c),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function UN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:QN(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var $N=/^:[\w-]+$/,FN=3,PN=2,qN=1,HN=10,KN=-2,Iv=e=>e==="*";function GN(e,t){let n=e.split("/"),a=n.length;return n.some(Iv)&&(a+=KN),t&&(a+=PN),n.filter(s=>!Iv(s)).reduce((s,o)=>s+($N.test(o)?FN:o===""?qN:HN),a)}function QN(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function YN(e,t,n=!1){let{routesMeta:a}=e,s={},o="/",c=[];for(let f=0;f<a.length;++f){let d=a[f],m=f===a.length-1,y=o==="/"?t:t.slice(o.length)||"/",g=yf({path:d.relativePath,caseSensitive:d.caseSensitive,end:m},y),x=d.route;if(!g&&m&&n&&!a[a.length-1].route.index&&(g=yf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},y)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:Ri([o,g.pathname]),pathnameBase:eT(Ri([o,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(o=Ri([o,g.pathnameBase]))}return c}function yf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=VN(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:a.reduce((m,{paramName:y,isOptional:g},x)=>{if(y==="*"){let S=f[x]||"";c=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const v=f[x];return g&&!v?m[y]=void 0:m[y]=(v||"").replace(/%2F/g,"/"),m},{}),pathname:o,pathnameBase:c,pattern:e}}function VN(e,t=!1,n=!0){Ei(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,d,m,y)=>{if(a.push({paramName:f,isOptional:d!=null}),d){let g=y.charAt(m+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function XN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ei(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Aa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var WN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ZN(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?jl(e):e,o;return n?(n=RE(n),n.startsWith("/")?o=zv(n.substring(1),"/"):o=zv(n,t)):o=t,{pathname:o,search:tT(a),hash:nT(s)}}function zv(e,t){let n=xf(t).split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function fm(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function JN(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ip(e){let t=JN(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Rf(e,t,n,a=!1){let s;typeof e=="string"?s=jl(e):(s={...e},Ct(!s.pathname||!s.pathname.includes("?"),fm("?","pathname","search",s)),Ct(!s.pathname||!s.pathname.includes("#"),fm("#","pathname","hash",s)),Ct(!s.search||!s.search.includes("#"),fm("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,f;if(c==null)f=n;else{let g=t.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),g-=1;s.pathname=x.join("/")}f=g>=0?t[g]:"/"}let d=ZN(s,f),m=c&&c!=="/"&&c.endsWith("/"),y=(o||c===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(m||y)&&(d.pathname+="/"),d}var RE=e=>e.replace(/\/\/+/g,"/"),Ri=e=>RE(e.join("/")),xf=e=>e.replace(/\/+$/,""),eT=e=>xf(e).replace(/^\/*/,"/"),tT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,iT=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function aT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function rT(e){let t=e.map(n=>n.route.path).filter(Boolean);return Ri(t)||"/"}var ME=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function jE(e,t){let n=e;if(typeof n!="string"||!WN.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(ME)try{let o=new URL(window.location.href),c=n.startsWith("//")?new URL(o.protocol+n):new URL(n),f=Aa(c.pathname,t);c.origin===o.origin&&f!=null?n=f+c.search+c.hash:s=!0}catch{Ei(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var DE=["POST","PUT","PATCH","DELETE"];new Set(DE);var sT=["GET",...DE];new Set(sT);var Dl=R.createContext(null);Dl.displayName="DataRouter";var Mf=R.createContext(null);Mf.displayName="DataRouterState";var LE=R.createContext(!1);function lT(){return R.useContext(LE)}var IE=R.createContext({isTransitioning:!1});IE.displayName="ViewTransition";var oT=R.createContext(new Map);oT.displayName="Fetchers";var cT=R.createContext(null);cT.displayName="Await";var ri=R.createContext(null);ri.displayName="Navigation";var bc=R.createContext(null);bc.displayName="Location";var wi=R.createContext({outlet:null,matches:[],isDataRoute:!1});wi.displayName="Route";var zp=R.createContext(null);zp.displayName="RouteError";var zE="REACT_ROUTER_ERROR",uT="REDIRECT",fT="ROUTE_ERROR_RESPONSE";function dT(e){if(e.startsWith(`${zE}:${uT}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function hT(e){if(e.startsWith(`${zE}:${fT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new iT(t.status,t.statusText,t.data)}catch{}}function mT(e,{relative:t}={}){Ct(Ll(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=R.useContext(ri),{hash:s,pathname:o,search:c}=yc(e,{relative:t}),f=o;return n!=="/"&&(f=o==="/"?n:Ri([n,o])),a.createHref({pathname:f,search:c,hash:s})}function Ll(){return R.useContext(bc)!=null}function ji(){return Ct(Ll(),"useLocation() may be used only in the context of a <Router> component."),R.useContext(bc).location}var BE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function UE(e){R.useContext(ri).static||R.useLayoutEffect(e)}function wr(){let{isDataRoute:e}=R.useContext(wi);return e?AT():pT()}function pT(){Ct(Ll(),"useNavigate() may be used only in the context of a <Router> component.");let e=R.useContext(Dl),{basename:t,navigator:n}=R.useContext(ri),{matches:a}=R.useContext(wi),{pathname:s}=ji(),o=JSON.stringify(Ip(a)),c=R.useRef(!1);return UE(()=>{c.current=!0}),R.useCallback((d,m={})=>{if(Ei(c.current,BE),!c.current)return;if(typeof d=="number"){n.go(d);return}let y=Rf(d,JSON.parse(o),s,m.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Ri([t,y.pathname])),(m.replace?n.replace:n.push)(y,m.state,m)},[t,n,o,s,e])}var gT=R.createContext(null);function bT(e){let t=R.useContext(wi).outlet;return R.useMemo(()=>t&&R.createElement(gT.Provider,{value:e},t),[t,e])}function $E(){let{matches:e}=R.useContext(wi),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function yc(e,{relative:t}={}){let{matches:n}=R.useContext(wi),{pathname:a}=ji(),s=JSON.stringify(Ip(n));return R.useMemo(()=>Rf(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function yT(e,t){return FE(e,t)}function FE(e,t,n){var k;Ct(Ll(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=R.useContext(ri),{matches:s}=R.useContext(wi),o=s[s.length-1],c=o?o.params:{},f=o?o.pathname:"/",d=o?o.pathnameBase:"/",m=o&&o.route;{let _=m&&m.path||"";qE(f,!m||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let y=ji(),g;if(t){let _=typeof t=="string"?jl(t):t;Ct(d==="/"||((k=_.pathname)==null?void 0:k.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${_.pathname}" was given in the \`location\` prop.`),g=_}else g=y;let x=g.pathname||"/",v=x;if(d!=="/"){let _=d.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(_.length).join("/")}let S=CE(e,{pathname:v});Ei(m||S!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ei(S==null||S[S.length-1].route.element!==void 0||S[S.length-1].route.Component!==void 0||S[S.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=wT(S&&S.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:Ri([d,a.encodeLocation?a.encodeLocation(_.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?d:Ri([d,a.encodeLocation?a.encodeLocation(_.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),s,n);return t&&w?R.createElement(bc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},w):w}function xT(){let e=CT(),t=aT(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=R.createElement(R.Fragment,null,R.createElement("p",null,"💿 Hey developer 👋"),R.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",R.createElement("code",{style:o},"ErrorBoundary")," or"," ",R.createElement("code",{style:o},"errorElement")," prop on your route.")),R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),n?R.createElement("pre",{style:s},n):null,c)}var vT=R.createElement(xT,null),PE=class extends R.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=hT(e.digest);n&&(e=n)}let t=e!==void 0?R.createElement(wi.Provider,{value:this.props.routeContext},R.createElement(zp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?R.createElement(ET,{error:e},t):t}};PE.contextType=LE;var dm=new WeakMap;function ET({children:e,error:t}){let{basename:n}=R.useContext(ri);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=dT(t.digest);if(a){let s=dm.get(t);if(s)throw s;let o=jE(a.location,n);if(ME&&!dm.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw dm.set(t,c),c}return R.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function ST({routeContext:e,match:t,children:n}){let a=R.useContext(Dl);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),R.createElement(wi.Provider,{value:e},n)}function wT(e,t=[],n){let a=n==null?void 0:n.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,o=a==null?void 0:a.errors;if(o!=null){let y=s.findIndex(g=>g.route.id&&(o==null?void 0:o[g.route.id])!==void 0);Ct(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let c=!1,f=-1;if(n&&a){c=a.renderFallback;for(let y=0;y<s.length;y++){let g=s[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=y),g.route.id){let{loaderData:x,errors:v}=a,S=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!v||v[g.route.id]===void 0);if(g.route.lazy||S){n.isStatic&&(c=!0),f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}}let d=n==null?void 0:n.onError,m=a&&d?(y,g)=>{var x,v;d(y,{location:a.location,params:((v=(x=a.matches)==null?void 0:x[0])==null?void 0:v.params)??{},unstable_pattern:rT(a.matches),errorInfo:g})}:void 0;return s.reduceRight((y,g,x)=>{let v,S=!1,w=null,k=null;a&&(v=o&&g.route.id?o[g.route.id]:void 0,w=g.route.errorElement||vT,c&&(f<0&&x===0?(qE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,k=null):f===x&&(S=!0,k=g.route.hydrateFallbackElement||null)));let _=t.concat(s.slice(0,x+1)),A=()=>{let T;return v?T=w:S?T=k:g.route.Component?T=R.createElement(g.route.Component,null):g.route.element?T=g.route.element:T=y,R.createElement(ST,{match:g,routeContext:{outlet:y,matches:_,isDataRoute:a!=null},children:T})};return a&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?R.createElement(PE,{location:a.location,revalidation:a.revalidation,component:w,error:v,children:A(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:m}):A()},null)}function Bp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _T(e){let t=R.useContext(Dl);return Ct(t,Bp(e)),t}function kT(e){let t=R.useContext(Mf);return Ct(t,Bp(e)),t}function NT(e){let t=R.useContext(wi);return Ct(t,Bp(e)),t}function Up(e){let t=NT(e),n=t.matches[t.matches.length-1];return Ct(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function TT(){return Up("useRouteId")}function CT(){var a;let e=R.useContext(zp),t=kT("useRouteError"),n=Up("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function AT(){let{router:e}=_T("useNavigate"),t=Up("useNavigate"),n=R.useRef(!1);return UE(()=>{n.current=!0}),R.useCallback(async(s,o={})=>{Ei(n.current,BE),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var Bv={};function qE(e,t,n){!t&&!Bv[e]&&(Bv[e]=!0,Ei(!1,n))}R.memo(OT);function OT({routes:e,future:t,state:n,isStatic:a,onError:s}){return FE(e,void 0,{state:n,isStatic:a,onError:s})}function RT({to:e,replace:t,state:n,relative:a}){Ct(Ll(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=R.useContext(ri);Ei(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=R.useContext(wi),{pathname:c}=ji(),f=wr(),d=Rf(e,Ip(o),c,a==="path"),m=JSON.stringify(d);return R.useEffect(()=>{f(JSON.parse(m),{replace:t,state:n,relative:a})},[f,m,a,t,n]),null}function MT(e){return bT(e.context)}function zn(e){Ct(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function jT({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){Ct(!Ll(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=R.useMemo(()=>({basename:f,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[f,s,o,c]);typeof n=="string"&&(n=jl(n));let{pathname:m="/",search:y="",hash:g="",state:x=null,key:v="default",unstable_mask:S}=n,w=R.useMemo(()=>{let k=Aa(m,f);return k==null?null:{location:{pathname:k,search:y,hash:g,state:x,key:v,unstable_mask:S},navigationType:a}},[f,m,y,g,x,v,a,S]);return Ei(w!=null,`<Router basename="${f}"> is not able to match the URL "${m}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:R.createElement(ri.Provider,{value:d},R.createElement(bc.Provider,{children:t,value:w}))}function DT({children:e,location:t}){return yT(rp(e),t)}function rp(e,t=[]){let n=[];return R.Children.forEach(e,(a,s)=>{if(!R.isValidElement(a))return;let o=[...t,s];if(a.type===R.Fragment){n.push.apply(n,rp(a.props.children,o));return}Ct(a.type===zn,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ct(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=rp(a.props.children,o)),n.push(c)}),n}var cf="get",uf="application/x-www-form-urlencoded";function jf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function LT(e){return jf(e)&&e.tagName.toLowerCase()==="button"}function IT(e){return jf(e)&&e.tagName.toLowerCase()==="form"}function zT(e){return jf(e)&&e.tagName.toLowerCase()==="input"}function BT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function UT(e,t){return e.button===0&&(!t||t==="_self")&&!BT(e)}function sp(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function $T(e,t){let n=sp(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var Ku=null;function FT(){if(Ku===null)try{new FormData(document.createElement("form"),0),Ku=!1}catch{Ku=!0}return Ku}var PT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hm(e){return e!=null&&!PT.has(e)?(Ei(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${uf}"`),null):e}function qT(e,t){let n,a,s,o,c;if(IT(e)){let f=e.getAttribute("action");a=f?Aa(f,t):null,n=e.getAttribute("method")||cf,s=hm(e.getAttribute("enctype"))||uf,o=new FormData(e)}else if(LT(e)||zT(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(a=d?Aa(d,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||cf,s=hm(e.getAttribute("formenctype"))||hm(f.getAttribute("enctype"))||uf,o=new FormData(f,e),!FT()){let{name:m,type:y,value:g}=e;if(y==="image"){let x=m?`${m}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else m&&o.append(m,g)}}else{if(jf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=cf,a=null,s=uf,c=e}return o&&s==="text/plain"&&(c=o,o=void 0),{action:a,method:n.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function $p(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function HE(e,t,n,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Aa(s.pathname,t)==="/"?s.pathname=`${xf(t)}/_root.${a}`:s.pathname=`${xf(s.pathname)}.${a}`,s}async function HT(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function KT(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function GT(e,t,n){let a=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let c=await HT(o,n);return c.links?c.links():[]}return[]}));return XT(a.flat(1).filter(KT).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Uv(e,t,n,a,s,o){let c=(d,m)=>n[m]?d.route.id!==n[m].route.id:!0,f=(d,m)=>{var y;return n[m].pathname!==d.pathname||((y=n[m].route.path)==null?void 0:y.endsWith("*"))&&n[m].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,m)=>c(d,m)||f(d,m)):o==="data"?t.filter((d,m)=>{var g;let y=a.routes[d.route.id];if(!y||!y.hasLoader)return!1;if(c(d,m)||f(d,m))return!0;if(d.route.shouldRevalidate){let x=d.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function QT(e,t,{includeHydrateFallback:n}={}){return YT(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function YT(e){return[...new Set(e)]}function VT(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function XT(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let o=JSON.stringify(VT(s));return n.has(o)||(n.add(o),a.push({key:o,link:s})),a},[])}function Fp(){let e=R.useContext(Dl);return $p(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function WT(){let e=R.useContext(Mf);return $p(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Pp=R.createContext(void 0);Pp.displayName="FrameworkContext";function qp(){let e=R.useContext(Pp);return $p(e,"You must render this element inside a <HydratedRouter> element"),e}function ZT(e,t){let n=R.useContext(Pp),[a,s]=R.useState(!1),[o,c]=R.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:m,onMouseLeave:y,onTouchStart:g}=t,x=R.useRef(null);R.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=_=>{_.forEach(A=>{c(A.isIntersecting)})},k=new IntersectionObserver(w,{threshold:.5});return x.current&&k.observe(x.current),()=>{k.disconnect()}}},[e]),R.useEffect(()=>{if(a){let w=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(w)}}},[a]);let v=()=>{s(!0)},S=()=>{s(!1),c(!1)};return n?e!=="intent"?[o,x,{}]:[o,x,{onFocus:qo(f,v),onBlur:qo(d,S),onMouseEnter:qo(m,v),onMouseLeave:qo(y,S),onTouchStart:qo(g,v)}]:[!1,x,{}]}function qo(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function JT({page:e,...t}){let n=lT(),{router:a}=Fp(),s=R.useMemo(()=>CE(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?R.createElement(t2,{page:e,matches:s,...t}):R.createElement(n2,{page:e,matches:s,...t}):null}function e2(e){let{manifest:t,routeModules:n}=qp(),[a,s]=R.useState([]);return R.useEffect(()=>{let o=!1;return GT(e,t,n).then(c=>{o||s(c)}),()=>{o=!0}},[e,t,n]),a}function t2({page:e,matches:t,...n}){let a=ji(),{future:s}=qp(),{basename:o}=Fp(),c=R.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let f=HE(e,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),d=!1,m=[];for(let y of t)typeof y.route.shouldRevalidate=="function"?d=!0:m.push(y.route.id);return d&&m.length>0&&f.searchParams.set("_routes",m.join(",")),[f.pathname+f.search]},[o,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return R.createElement(R.Fragment,null,c.map(f=>R.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...n})))}function n2({page:e,matches:t,...n}){let a=ji(),{future:s,manifest:o,routeModules:c}=qp(),{basename:f}=Fp(),{loaderData:d,matches:m}=WT(),y=R.useMemo(()=>Uv(e,t,m,o,a,"data"),[e,t,m,o,a]),g=R.useMemo(()=>Uv(e,t,m,o,a,"assets"),[e,t,m,o,a]),x=R.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,k=!1;if(t.forEach(A=>{var j;let T=o.routes[A.route.id];!T||!T.hasLoader||(!y.some(F=>F.route.id===A.route.id)&&A.route.id in d&&((j=c[A.route.id])!=null&&j.shouldRevalidate)||T.hasClientLoader?k=!0:w.add(A.route.id))}),w.size===0)return[];let _=HE(e,f,s.unstable_trailingSlashAwareDataRequests,"data");return k&&w.size>0&&_.searchParams.set("_routes",t.filter(A=>w.has(A.route.id)).map(A=>A.route.id).join(",")),[_.pathname+_.search]},[f,s.unstable_trailingSlashAwareDataRequests,d,a,o,y,t,e,c]),v=R.useMemo(()=>QT(g,o),[g,o]),S=e2(g);return R.createElement(R.Fragment,null,x.map(w=>R.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),v.map(w=>R.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),S.map(({key:w,link:k})=>R.createElement("link",{key:w,nonce:n.nonce,...k,crossOrigin:k.crossOrigin??n.crossOrigin})))}function i2(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var a2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{a2&&(window.__reactRouterVersion="7.14.2")}catch{}function r2({basename:e,children:t,unstable_useTransitions:n,window:a}){let s=R.useRef();s.current==null&&(s.current=DN({window:a,v5Compat:!0}));let o=s.current,[c,f]=R.useState({action:o.action,location:o.location}),d=R.useCallback(m=>{n===!1?f(m):R.startTransition(()=>f(m))},[n]);return R.useLayoutEffect(()=>o.listen(d),[o,d]),R.createElement(jT,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:n})}var KE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ds=R.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:c,unstable_mask:f,state:d,target:m,to:y,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:v,...S},w){let{basename:k,navigator:_,unstable_useTransitions:A}=R.useContext(ri),T=typeof y=="string"&&KE.test(y),j=jE(y,k);y=j.to;let F=mT(y,{relative:s}),M=ji(),q=null;if(f){let Y=Rf(f,[],M.unstable_mask?M.unstable_mask.pathname:"/",!0);k!=="/"&&(Y.pathname=Y.pathname==="/"?k:Ri([k,Y.pathname])),q=_.createHref(Y)}let[K,te,D]=ZT(a,S),P=o2(y,{replace:c,unstable_mask:f,state:d,target:m,preventScrollReset:g,relative:s,viewTransition:x,unstable_defaultShouldRevalidate:v,unstable_useTransitions:A});function J(Y){t&&t(Y),Y.defaultPrevented||P(Y)}let re=!(j.isExternal||o),Q=R.createElement("a",{...S,...D,href:(re?q:void 0)||j.absoluteURL||F,onClick:re?J:t,ref:i2(w,te),target:m,"data-discover":!T&&n==="render"?"true":void 0});return K&&!T?R.createElement(R.Fragment,null,Q,R.createElement(JT,{page:F})):Q});ds.displayName="Link";var GE=R.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:c,viewTransition:f,children:d,...m},y){let g=yc(c,{relative:m.relative}),x=ji(),v=R.useContext(Mf),{navigator:S,basename:w}=R.useContext(ri),k=v!=null&&h2(g)&&f===!0,_=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,A=x.pathname,T=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(A=A.toLowerCase(),T=T?T.toLowerCase():null,_=_.toLowerCase()),T&&w&&(T=Aa(T,w)||T);const j=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let F=A===_||!s&&A.startsWith(_)&&A.charAt(j)==="/",M=T!=null&&(T===_||!s&&T.startsWith(_)&&T.charAt(_.length)==="/"),q={isActive:F,isPending:M,isTransitioning:k},K=F?t:void 0,te;typeof a=="function"?te=a(q):te=[a,F?"active":null,M?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let D=typeof o=="function"?o(q):o;return R.createElement(ds,{...m,"aria-current":K,className:te,ref:y,style:D,to:c,viewTransition:f},typeof d=="function"?d(q):d)});GE.displayName="NavLink";var s2=R.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:c=cf,action:f,onSubmit:d,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:x,...v},S)=>{let{unstable_useTransitions:w}=R.useContext(ri),k=f2(),_=d2(f,{relative:m}),A=c.toLowerCase()==="get"?"get":"post",T=typeof f=="string"&&KE.test(f),j=F=>{if(d&&d(F),F.defaultPrevented)return;F.preventDefault();let M=F.nativeEvent.submitter,q=(M==null?void 0:M.getAttribute("formmethod"))||c,K=()=>k(M||F.currentTarget,{fetcherKey:t,method:q,navigate:n,replace:s,state:o,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:x});w&&n!==!1?R.startTransition(()=>K()):K()};return R.createElement("form",{ref:S,method:A,action:_,onSubmit:a?d:j,...v,"data-discover":!T&&e==="render"?"true":void 0})});s2.displayName="Form";function l2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function QE(e){let t=R.useContext(Dl);return Ct(t,l2(e)),t}function o2(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:m}={}){let y=wr(),g=ji(),x=yc(e,{relative:c});return R.useCallback(v=>{if(UT(v,t)){v.preventDefault();let S=n!==void 0?n:ac(g)===ac(x),w=()=>y(e,{replace:S,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d});m?R.startTransition(()=>w()):w()}},[g,y,x,n,a,s,t,e,o,c,f,d,m])}function YE(e){Ei(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=R.useRef(sp(e)),n=R.useRef(!1),a=ji(),s=R.useMemo(()=>$T(a.search,n.current?null:t.current),[a.search]),o=wr(),c=R.useCallback((f,d)=>{const m=sp(typeof f=="function"?f(new URLSearchParams(s)):f);n.current=!0,o("?"+m,d)},[o,s]);return[s,c]}var c2=0,u2=()=>`__${String(++c2)}__`;function f2(){let{router:e}=QE("useSubmit"),{basename:t}=R.useContext(ri),n=TT(),a=e.fetch,s=e.navigate;return R.useCallback(async(o,c={})=>{let{action:f,method:d,encType:m,formData:y,body:g}=qT(o,t);if(c.navigate===!1){let x=c.fetcherKey||u2();await a(x,n,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||m,flushSync:c.flushSync})}else await s(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,n])}function d2(e,{relative:t}={}){let{basename:n}=R.useContext(ri),a=R.useContext(wi);Ct(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...yc(e||".",{relative:t})},c=ji();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),d=f.getAll("index");if(d.some(y=>y==="")){f.delete("index"),d.filter(g=>g).forEach(g=>f.append("index",g));let y=f.toString();o.search=y?`?${y}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Ri([n,o.pathname])),ac(o)}function h2(e,{relative:t}={}){let n=R.useContext(IE);Ct(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=QE("useViewTransitionState"),s=yc(e,{relative:t});if(!n.isTransitioning)return!1;let o=Aa(n.currentLocation.pathname,a)||n.currentLocation.pathname,c=Aa(n.nextLocation.pathname,a)||n.nextLocation.pathname;return yf(s.pathname,c)!=null||yf(s.pathname,o)!=null}/**
|
|
61
|
+
* @license lucide-react v0.544.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const m2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),p2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),$v=e=>{const t=p2(e);return t.charAt(0).toUpperCase()+t.slice(1)},VE=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),g2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
66
|
+
* @license lucide-react v0.544.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/var b2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
71
|
+
* @license lucide-react v0.544.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const y2=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:o,iconNode:c,...f},d)=>R.createElement("svg",{ref:d,...b2,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:VE("lucide",s),...!o&&!g2(f)&&{"aria-hidden":"true"},...f},[...c.map(([m,y])=>R.createElement(m,y)),...Array.isArray(o)?o:[o]]));/**
|
|
76
|
+
* @license lucide-react v0.544.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const Ae=(e,t)=>{const n=R.forwardRef(({className:a,...s},o)=>R.createElement(y2,{ref:o,iconNode:t,className:VE(`lucide-${m2($v(e))}`,`lucide-${e}`,a),...s}));return n.displayName=$v(e),n};/**
|
|
81
|
+
* @license lucide-react v0.544.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const x2=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Df=Ae("activity",x2);/**
|
|
86
|
+
* @license lucide-react v0.544.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const v2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],XE=Ae("arrow-left",v2);/**
|
|
91
|
+
* @license lucide-react v0.544.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const E2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],S2=Ae("arrow-up",E2);/**
|
|
96
|
+
* @license lucide-react v0.544.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const w2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],_2=Ae("check",w2);/**
|
|
101
|
+
* @license lucide-react v0.544.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const k2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],xc=Ae("chevron-down",k2);/**
|
|
106
|
+
* @license lucide-react v0.544.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const N2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Lf=Ae("chevron-right",N2);/**
|
|
111
|
+
* @license lucide-react v0.544.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const T2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],C2=Ae("chevron-up",T2);/**
|
|
116
|
+
* @license lucide-react v0.544.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const A2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],rc=Ae("circle-alert",A2);/**
|
|
121
|
+
* @license lucide-react v0.544.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const O2=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],lp=Ae("circle-check-big",O2);/**
|
|
126
|
+
* @license lucide-react v0.544.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const R2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],If=Ae("circle-check",R2);/**
|
|
131
|
+
* @license lucide-react v0.544.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const M2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],j2=Ae("circle-x",M2);/**
|
|
136
|
+
* @license lucide-react v0.544.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const D2=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],L2=Ae("clock",D2);/**
|
|
141
|
+
* @license lucide-react v0.544.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const I2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],z2=Ae("copy",I2);/**
|
|
146
|
+
* @license lucide-react v0.544.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const B2=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],WE=Ae("download",B2);/**
|
|
151
|
+
* @license lucide-react v0.544.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const U2=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],Fv=Ae("file-code",U2);/**
|
|
156
|
+
* @license lucide-react v0.544.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const $2=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Hp=Ae("file-text",$2);/**
|
|
161
|
+
* @license lucide-react v0.544.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const F2=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],P2=Ae("flame",F2);/**
|
|
166
|
+
* @license lucide-react v0.544.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const q2=[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],H2=Ae("folder-git-2",q2);/**
|
|
171
|
+
* @license lucide-react v0.544.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const K2=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],G2=Ae("folder-open",K2);/**
|
|
176
|
+
* @license lucide-react v0.544.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const Q2=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],sc=Ae("folder",Q2);/**
|
|
181
|
+
* @license lucide-react v0.544.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const Y2=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],V2=Ae("funnel",Y2);/**
|
|
186
|
+
* @license lucide-react v0.544.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const X2=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],W2=Ae("git-branch",X2);/**
|
|
191
|
+
* @license lucide-react v0.544.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const Z2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],J2=Ae("globe",Z2);/**
|
|
196
|
+
* @license lucide-react v0.544.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const eC=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],tC=Ae("history",eC);/**
|
|
201
|
+
* @license lucide-react v0.544.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const nC=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],iC=Ae("house",nC);/**
|
|
206
|
+
* @license lucide-react v0.544.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const aC=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],rC=Ae("kanban",aC);/**
|
|
211
|
+
* @license lucide-react v0.544.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const sC=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],lC=Ae("layout-grid",sC);/**
|
|
216
|
+
* @license lucide-react v0.544.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const oC=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],cC=Ae("link",oC);/**
|
|
221
|
+
* @license lucide-react v0.544.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const uC=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ut=Ae("loader-circle",uC);/**
|
|
226
|
+
* @license lucide-react v0.544.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const fC=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Pv=Ae("message-circle",fC);/**
|
|
231
|
+
* @license lucide-react v0.544.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const dC=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],hC=Ae("message-square",dC);/**
|
|
236
|
+
* @license lucide-react v0.544.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const mC=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],pC=Ae("pause",mC);/**
|
|
241
|
+
* @license lucide-react v0.544.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const gC=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Kp=Ae("pen-line",gC);/**
|
|
246
|
+
* @license lucide-react v0.544.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const bC=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Gp=Ae("play",bC);/**
|
|
251
|
+
* @license lucide-react v0.544.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const yC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Di=Ae("plus",yC);/**
|
|
256
|
+
* @license lucide-react v0.544.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const xC=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],ZE=Ae("radio",xC);/**
|
|
261
|
+
* @license lucide-react v0.544.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const vC=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Cl=Ae("refresh-cw",vC);/**
|
|
266
|
+
* @license lucide-react v0.544.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const EC=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],JE=Ae("rotate-ccw",EC);/**
|
|
271
|
+
* @license lucide-react v0.544.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const SC=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],zf=Ae("save",SC);/**
|
|
276
|
+
* @license lucide-react v0.544.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const wC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],vf=Ae("search",wC);/**
|
|
281
|
+
* @license lucide-react v0.544.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const _C=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],kC=Ae("send",_C);/**
|
|
286
|
+
* @license lucide-react v0.544.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const NC=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],e1=Ae("settings",NC);/**
|
|
291
|
+
* @license lucide-react v0.544.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const TC=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],CC=Ae("skull",TC);/**
|
|
296
|
+
* @license lucide-react v0.544.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const AC=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],OC=Ae("snowflake",AC);/**
|
|
301
|
+
* @license lucide-react v0.544.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const RC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],t1=Ae("square",RC);/**
|
|
306
|
+
* @license lucide-react v0.544.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const MC=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],n1=Ae("terminal",MC);/**
|
|
311
|
+
* @license lucide-react v0.544.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const jC=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],DC=Ae("timer-reset",jC);/**
|
|
316
|
+
* @license lucide-react v0.544.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const LC=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Il=Ae("trash-2",LC);/**
|
|
321
|
+
* @license lucide-react v0.544.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const IC=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],zC=Ae("triangle-alert",IC);/**
|
|
326
|
+
* @license lucide-react v0.544.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const BC=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],i1=Ae("users",BC);/**
|
|
331
|
+
* @license lucide-react v0.544.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const UC=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],a1=Ae("workflow",UC);/**
|
|
336
|
+
* @license lucide-react v0.544.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const $C=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],r1=Ae("wrench",$C);/**
|
|
341
|
+
* @license lucide-react v0.544.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const FC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xi=Ae("x",FC);/**
|
|
346
|
+
* @license lucide-react v0.544.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const PC=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],qC=Ae("zap",PC),HC=[{to:"/chat",label:"对话",icon:hC},{to:"/projects",label:"项目",icon:lC},{to:"/board",label:"看板",icon:rC},{to:"/workers",label:"Workers",icon:i1},{to:"/logs",label:"Logs",icon:Hp},{to:"/skills",label:"Skills",icon:J2},{to:"/system",label:"系统",icon:e1}];function KC(){return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"font-[family-name:var(--font-heading)] font-bold text-lg px-3 pt-2 pb-4 flex items-center gap-3 text-[var(--color-text)]",children:[h.jsx("span",{className:"w-5 h-5 rounded-md bg-[var(--color-accent-mint)] border-2 border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]"}),"SPS Console"]}),h.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":"主导航",children:HC.map(e=>{const t=e.icon;return h.jsxs(GE,{to:e.to,className:({isActive:n})=>["flex items-center gap-3 px-3 py-2.5 rounded-xl font-semibold text-sm cursor-pointer transition-transform duration-150","border-2 border-transparent",n?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] font-bold":"text-[var(--color-text)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)] hover:shadow-[3px_3px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px"].join(" "),children:[h.jsx(t,{size:18,strokeWidth:2.5}),e.label]},e.to)})})]})}class GC extends Error{constructor(t,n,a){super(n),this.status=t,this.detail=a,this.name="ApiError"}}async function $t(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(!t.ok){let n;try{n=await t.json()}catch{n=await t.text()}throw new GC(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}function s1(){return $t("/api/system/info")}function QC(){return $t("/api/system/env")}function YC(){return $t("/api/system/env/raw")}async function VC(e,t){const n=await fetch("/api/system/env",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,etag:t})});if(!n.ok){const a=await n.text(),s=new Error(`${n.status}: ${a}`);throw s.status=n.status,s}return n.json()}function XC(){return $t("/api/system/latest-version")}async function WC(){const e=await fetch("/api/system/upgrade",{method:"POST"});if(!e.ok&&e.status!==409)throw new Error(`${e.status}: ${await e.text()}`);return e.json()}async function ZC(e,t=!1){const n=t?"?fix=1":"",a=await fetch(`/api/system/doctor/${encodeURIComponent(e)}${n}`,{method:"POST"});if(!a.ok)throw new Error(`${a.status}: ${await a.text()}`);return a.json()}function _r(){return $t("/api/projects")}function JC(e){return $t(`/api/projects/${encodeURIComponent(e)}`)}async function eA(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.text();throw new Error(`${t.status}: ${n}`)}return t.json()}function tA(e){return $t(`/api/projects/${encodeURIComponent(e)}/conf`)}async function nA(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/conf`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,etag:n})});if(!a.ok){const s=await a.text(),o=new Error(`${a.status}: ${s}`);throw o.status=a.status,o}return a.json()}async function iA(e,t={}){const n=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}return n.json()}function aA(e){return $t(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function rA(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipeline`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({pipeline:t})});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}return n.json()}function sA(e,t){return $t(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function lA(e,t,n,a){const s=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n,etag:a})});if(!s.ok){const o=await s.text(),c=new Error(`${s.status}: ${o}`);throw c.status=s.status,c}return s.json()}async function oA(e,t,n="blank"){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,template:n})});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return a.json()}async function cA(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}}function uA(){var f;const e=st({queryKey:["system-info"],queryFn:s1,refetchInterval:3e4}),t=st({queryKey:["projects"],queryFn:_r,refetchInterval:1e4}),n=dA(),a=!e.isError,s=((f=t.data)==null?void 0:f.data)??[],o=s.filter(d=>d.pipelineStatus==="running").length,c=s.reduce((d,m)=>d+m.workers.active,0);return h.jsxs("div",{className:"h-10 flex items-center gap-3 px-6 font-[family-name:var(--font-mono)] text-[11px] text-[var(--color-text-muted)]",children:[h.jsx("span",{className:"nb-status",style:{background:a?"var(--color-running-bg)":"var(--color-crashed-bg)",color:a?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:a?"server":"offline"}),h.jsx(fA,{state:n}),h.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),h.jsxs("span",{className:"flex items-center gap-1",title:"活跃 pipeline 数",children:[h.jsx(Df,{size:10,strokeWidth:2.5}),h.jsx("span",{className:"font-bold text-[var(--color-text)]",children:o})," pipeline"]}),h.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),h.jsxs("span",{className:"flex items-center gap-1",title:"活跃 worker 数",children:[h.jsx(ZE,{size:10,strokeWidth:2.5}),h.jsx("span",{className:"font-bold text-[var(--color-text)]",children:c})," worker"]}),h.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),h.jsxs("span",{children:["localhost:",window.location.port]}),e.data&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),h.jsxs("span",{children:["v",e.data.version]}),h.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),h.jsxs("span",{children:["node ",e.data.nodeVersion]})]})]})}function fA({state:e}){return e==="open"?h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px 2px 7px"},children:"SSE"}):e==="connecting"?h.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)",padding:"2px 8px 2px 7px"},children:"SSE·connect"}):h.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[h.jsx(rc,{size:9,strokeWidth:2.5}),"SSE·down"]})}function dA(){const[e,t]=R.useState("connecting");return R.useEffect(()=>{let n=null,a=null,s=!1;const o=()=>{s||(n=new EventSource("/stream/heartbeat"),n.addEventListener("server.heartbeat",()=>t("open")),n.addEventListener("open",()=>t("open")),n.addEventListener("error",()=>{(n==null?void 0:n.readyState)===EventSource.CLOSED?(t("closed"),a==null&&(a=setTimeout(()=>{a=null,n==null||n.close(),o()},1e4))):t("connecting")}))};return o(),()=>{s=!0,a!=null&&clearTimeout(a),n==null||n.close()}},[]),e}function hA(){return h.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] h-screen",children:[h.jsx("aside",{className:"row-span-1 row-start-1 border-r-[3px] border-[var(--color-text)] bg-[var(--color-bg)] p-4 flex flex-col",children:h.jsx(KC,{})}),h.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:h.jsx(MT,{})}),h.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:h.jsx(uA,{})})]})}function op(e,t){try{const n=JSON.stringify({message:(e instanceof Error?e.message:String(e)).slice(0,1e3),stack:(e instanceof Error?e.stack??"":"").slice(0,4e3),url:typeof window<"u"?window.location.href:"",ua:typeof navigator<"u"?navigator.userAgent:"",ts:new Date().toISOString(),context:t==null?void 0:t.slice(0,200)});fetch("/api/system/client-errors",{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0}).catch(()=>{})}catch{}}function mA(){typeof window>"u"||(window.addEventListener("error",e=>{op(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;op(t instanceof Error?t:String(t),"unhandledrejection")}))}class pA extends R.Component{constructor(){super(...arguments);fv(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,a){var s;op(n,`ErrorBoundary: ${((s=a.componentStack)==null?void 0:s.slice(0,200))??""}`),console.error("[ErrorBoundary]",n,a)}render(){return this.state.error?h.jsx("div",{className:"p-6",children:h.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"💥 UI 崩了"}),h.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),h.jsxs("details",{className:"text-xs mb-4",children:[h.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),h.jsx("pre",{className:"mt-2 font-[family-name:var(--font-mono)] overflow-auto max-h-60 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md p-3",children:this.state.error.stack??"(no stack)"})]}),h.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:"刷新页面"})]})}):this.props.children}}function gA(){const e=wr(),{data:t,isLoading:n,isError:a,error:s,refetch:o}=st({queryKey:["projects"],queryFn:_r});return h.jsxs("div",{className:"flex flex-col gap-6 max-w-6xl",children:[h.jsxs("header",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"项目 🎯"}),h.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:t?`${t.data.length} 个本机项目`:n?"加载中…":"点击刷新重试"})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>o(),type:"button",children:[h.jsx(Df,{size:16,strokeWidth:2.5}),"刷新"]}),h.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>e("/projects/new"),"aria-label":"新建项目",children:[h.jsx(Di,{size:16,strokeWidth:3}),"新建项目"]})]})]}),n&&h.jsx(xA,{}),a&&h.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:"加载失败"}),h.jsx("p",{className:"text-sm text-[var(--color-text)]",children:s instanceof Error?s.message:String(s)}),h.jsx("button",{className:"nb-btn mt-4",onClick:()=>o(),type:"button",children:"重试"})]}),t&&t.data.length===0&&h.jsx(vA,{}),t&&t.data.length>0&&h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.data.map(c=>h.jsx(bA,{project:c},c.name))})]})}function bA({project:e}){const t=e.pipelineStatus==="running";return h.jsxs(ds,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),h.jsx(yA,{status:e.pipelineStatus})]}),e.repoDir&&h.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),h.jsxs("div",{className:"grid grid-cols-3 gap-2 text-sm mt-4 pt-3 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[h.jsx(mm,{label:"cards",value:e.cards.total,accent:"purple"}),h.jsx(mm,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),h.jsx(mm,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function mm({label:e,value:t,accent:n}){const a={purple:"var(--color-accent-purple)",yellow:"var(--color-accent-yellow)",mint:"var(--color-accent-mint)",idle:"var(--color-bg-cream)"};return h.jsxs("div",{className:"flex flex-col items-center justify-center py-2 rounded-lg border-2 border-[var(--color-text)]",style:{background:a[n]},children:[h.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),h.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function yA({status:e}){const t={running:{bg:"var(--color-running-bg)",label:"running"},idle:{bg:"var(--color-idle-bg)",label:"idle"},stopping:{bg:"var(--color-stuck-bg)",label:"stopping"},error:{bg:"var(--color-crashed-bg)",label:"error"}},{bg:n,label:a}=t[e],s=e==="running"?"var(--color-running)":e==="error"?"var(--color-crashed)":e==="stopping"?"var(--color-stuck)":"var(--color-idle)";return h.jsx("span",{className:"nb-status",style:{background:n,color:s},children:a})}function xA(){return h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>h.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[h.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),h.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),h.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function vA(){return h.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[h.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center",children:h.jsx(i1,{size:32,strokeWidth:2.5})}),h.jsxs("div",{className:"flex-1",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"还没有项目 ✨"}),h.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:["运行 ",h.jsx("code",{className:"bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded-md font-[family-name:var(--font-mono)]",children:"sps project init <name>"})," 创建第一个项目。"]}),h.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[h.jsx(Di,{size:16,strokeWidth:3}),"新建项目"]})]})]})}function EA({title:e,body:t,confirm:n,onConfirm:a,onCancel:s,danger:o}){return R.useEffect(()=>{const c=f=>{f.key==="Escape"&&s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s]),h.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:h.jsxs("div",{className:"nb-card max-w-md w-full",children:[h.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),h.jsxs("div",{className:"flex gap-3 justify-end",children:[h.jsx("button",{className:"nb-btn",onClick:s,type:"button",children:"取消"}),h.jsx("button",{className:o?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await a()},type:"button",children:n})]})]})})}const l1=R.createContext(null);function SA({children:e}){const[t,n]=R.useState(null),a=R.useCallback(c=>new Promise(f=>{n({kind:"confirm",opts:c,resolve:d=>{n(null),f(d)}})}),[]),s=R.useCallback(c=>new Promise(f=>{n({kind:"alert",opts:c,resolve:()=>{n(null),f()}})}),[]),o=R.useCallback(c=>new Promise(f=>{n({kind:"prompt",opts:c,resolve:d=>{n(null),f(d)}})}),[]);return h.jsxs(l1.Provider,{value:{confirm:a,alert:s,prompt:o},children:[e,(t==null?void 0:t.kind)==="confirm"&&h.jsx(EA,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"确定",danger:t.opts.danger,onConfirm:()=>t.resolve(!0),onCancel:()=>t.resolve(!1)}),(t==null?void 0:t.kind)==="alert"&&h.jsx(wA,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"知道了",onClose:()=>t.resolve()}),(t==null?void 0:t.kind)==="prompt"&&h.jsx(_A,{title:t.opts.title,body:t.opts.body,placeholder:t.opts.placeholder,defaultValue:t.opts.defaultValue,confirm:t.opts.confirm??"确定",cancel:t.opts.cancel??"取消",onConfirm:c=>t.resolve(c),onCancel:()=>t.resolve(null)})]})}function si(){const e=R.useContext(l1);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function wA({title:e,body:t,confirm:n,onClose:a}){return R.useEffect(()=>{const s=o=>{(o.key==="Escape"||o.key==="Enter")&&a()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a]),h.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:h.jsxs("div",{className:"nb-card max-w-md w-full",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),h.jsx("div",{className:"flex gap-3 justify-end",children:h.jsx("button",{className:"nb-btn nb-btn-primary",onClick:a,type:"button",autoFocus:!0,children:n})})]})})}function _A({title:e,body:t,placeholder:n,defaultValue:a,confirm:s,cancel:o,onConfirm:c,onCancel:f}){const[d,m]=R.useState(a??""),y=R.useRef(null);R.useEffect(()=>{var v,S;(v=y.current)==null||v.focus(),(S=y.current)==null||S.select();const x=w=>{w.key==="Escape"&&f()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[f]);const g=()=>{const x=d.trim();x&&c(x)};return h.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:h.jsxs("div",{className:"nb-card max-w-md w-full",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),h.jsx("input",{ref:y,type:"text",className:"nb-input w-full mb-5",placeholder:n,value:d,onChange:x=>m(x.target.value),onKeyDown:x=>{x.key==="Enter"&&!x.nativeEvent.isComposing&&(x.preventDefault(),g())}}),h.jsxs("div",{className:"flex gap-3 justify-end",children:[h.jsx("button",{className:"nb-btn",onClick:f,type:"button",children:o}),h.jsx("button",{className:"nb-btn nb-btn-primary",onClick:g,type:"button",disabled:!d.trim(),children:s})]})]})})}function kA(){const e=wr(),t=qn(),{alert:n}=si(),[a,s]=R.useState({name:"",projectDir:"",enableGit:!0,mergeBranch:"main",maxWorkers:"1",ackTimeoutMin:"5"}),o=Pn({mutationFn:d=>eA(d),onSuccess:d=>{t.invalidateQueries({queryKey:["projects"]}),e(`/projects/${encodeURIComponent(d.name)}`)},onError:d=>{n({title:"创建失败",body:d instanceof Error?d.message:String(d)})}}),c=/^[a-zA-Z0-9_-]+$/.test(a.name),f=c&&a.projectDir.trim()!==""&&!o.isPending;return h.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[h.jsxs("header",{className:"flex items-center gap-3",children:[h.jsxs("button",{type:"button",onClick:()=>e("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[h.jsx(XE,{size:14,strokeWidth:3}),"返回"]}),h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:"新建项目"})]}),h.jsx("div",{className:"nb-card",children:h.jsxs("form",{onSubmit:d=>{d.preventDefault(),f&&o.mutate(a)},className:"flex flex-col gap-5",children:[h.jsxs(sr,{label:"项目名",hint:"只能用字母、数字、下划线、连字符。例如 acme-web",children:[h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"例如: acme-web",value:a.name,onChange:d=>s({...a,name:d.target.value}),autoFocus:!0,required:!0}),a.name&&!c&&h.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:"名称只能包含 a-z A-Z 0-9 _ -"})]}),h.jsx(sr,{label:"项目目录",hint:"本机绝对路径(代码或文档都可)。和是否启用 git 无关。",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"/home/coral/code/acme",value:a.projectDir,onChange:d=>s({...a,projectDir:d.target.value}),required:!0})}),h.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[h.jsx(sr,{label:"最大 Worker 数",children:h.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.maxWorkers,onChange:d=>s({...a,maxWorkers:d.target.value})})}),h.jsx(sr,{label:"ACK 超时(分钟)",hint:"Worker 启动后多久没 ACK 视为失败",children:h.jsx("input",{type:"number",min:"1",max:"30",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.ackTimeoutMin??"5",onChange:d=>s({...a,ackTimeoutMin:d.target.value})})})]}),h.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[h.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[h.jsx("input",{type:"checkbox",checked:a.enableGit??!0,onChange:d=>s({...a,enableGit:d.target.checked}),className:"w-4 h-4 cursor-pointer"}),h.jsx("span",{className:"text-sm font-bold",children:"启用 Git(Worker 自动 commit + push)"})]}),h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:"关闭后 Worker 只做任务、不做版本控制;适合文档/数据处理等非代码项目。"}),a.enableGit!==!1&&h.jsxs("div",{className:"flex flex-col gap-4 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4",children:[h.jsx(sr,{label:"合并分支",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.mergeBranch??"main",onChange:d=>s({...a,mergeBranch:d.target.value})})}),h.jsx(sr,{label:"Git 远程项目路径",hint:"如 user/repo,空则跳过远程 API(只本地 commit/push)",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"user/repo",value:a.gitlabProject??"",onChange:d=>s({...a,gitlabProject:d.target.value})})}),a.gitlabProject&&h.jsx(sr,{label:"GitLab 项目 ID",hint:"数字;GitHub 用户留空",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"42",value:a.gitlabProjectId??"",onChange:d=>s({...a,gitlabProjectId:d.target.value})})})]})]}),h.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[h.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[h.jsx("input",{type:"checkbox",checked:a.enableWiki===!0,onChange:d=>s({...a,enableWiki:d.target.checked}),className:"w-4 h-4 cursor-pointer"}),h.jsx("span",{className:"text-sm font-bold",children:"启用 Wiki 知识库(per-project,doc-28)"})]}),h.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["开启后自动 scaffold ",h.jsx("code",{className:"font-mono",children:"wiki/"})," 目录,并向 Worker prompt 注入 5 层检索上下文与 wiki-update 提示。可后续 ",h.jsx("code",{className:"font-mono",children:"sps wiki init"})," 补办。"]})]}),h.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-3 text-[var(--color-text-muted)]",children:"通知"}),h.jsx(sr,{label:"Matrix 房间 ID",hint:"空则使用全局配置;不填 = 不通知",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"!abc:matrix.example.com",value:a.matrixRoomId??"",onChange:d=>s({...a,matrixRoomId:d.target.value})})})]}),h.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[h.jsx("button",{type:"button",className:"nb-btn",onClick:()=>e("/projects"),disabled:o.isPending,children:"取消"}),h.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!f,"aria-label":"创建项目",children:o.isPending?h.jsxs(h.Fragment,{children:[h.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}),"创建中…"]}):h.jsxs(h.Fragment,{children:[h.jsx(Di,{size:14,strokeWidth:3}),"创建"]})})]})]})})]})}function sr({label:e,hint:t,children:n}){return h.jsxs("label",{className:"flex flex-col gap-1.5",children:[h.jsx("span",{className:"text-sm font-bold",children:e}),n,t&&h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const Qp=Symbol.for("yaml.alias"),cp=Symbol.for("yaml.document"),Er=Symbol.for("yaml.map"),o1=Symbol.for("yaml.pair"),Wi=Symbol.for("yaml.scalar"),zl=Symbol.for("yaml.seq"),Si=Symbol.for("yaml.node.type"),kr=e=>!!e&&typeof e=="object"&&e[Si]===Qp,hs=e=>!!e&&typeof e=="object"&&e[Si]===cp,Bl=e=>!!e&&typeof e=="object"&&e[Si]===Er,At=e=>!!e&&typeof e=="object"&&e[Si]===o1,vt=e=>!!e&&typeof e=="object"&&e[Si]===Wi,Ul=e=>!!e&&typeof e=="object"&&e[Si]===zl;function Mt(e){if(e&&typeof e=="object")switch(e[Si]){case Er:case zl:return!0}return!1}function jt(e){if(e&&typeof e=="object")switch(e[Si]){case Qp:case Er:case Wi:case zl:return!0}return!1}const c1=e=>(vt(e)||Mt(e))&&!!e.anchor,Fn=Symbol("break visit"),u1=Symbol("skip children"),Vi=Symbol("remove node");function ms(e,t){const n=f1(t);hs(e)?cl(null,e.contents,n,Object.freeze([e]))===Vi&&(e.contents=null):cl(null,e,n,Object.freeze([]))}ms.BREAK=Fn;ms.SKIP=u1;ms.REMOVE=Vi;function cl(e,t,n,a){const s=d1(e,t,n,a);if(jt(s)||At(s))return h1(e,a,s),cl(e,s,n,a);if(typeof s!="symbol"){if(Mt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=cl(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Fn)return Fn;c===Vi&&(t.items.splice(o,1),o-=1)}}}else if(At(t)){a=Object.freeze(a.concat(t));const o=cl("key",t.key,n,a);if(o===Fn)return Fn;o===Vi&&(t.key=null);const c=cl("value",t.value,n,a);if(c===Fn)return Fn;c===Vi&&(t.value=null)}}return s}async function Bf(e,t){const n=f1(t);hs(e)?await ul(null,e.contents,n,Object.freeze([e]))===Vi&&(e.contents=null):await ul(null,e,n,Object.freeze([]))}Bf.BREAK=Fn;Bf.SKIP=u1;Bf.REMOVE=Vi;async function ul(e,t,n,a){const s=await d1(e,t,n,a);if(jt(s)||At(s))return h1(e,a,s),ul(e,s,n,a);if(typeof s!="symbol"){if(Mt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=await ul(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Fn)return Fn;c===Vi&&(t.items.splice(o,1),o-=1)}}}else if(At(t)){a=Object.freeze(a.concat(t));const o=await ul("key",t.key,n,a);if(o===Fn)return Fn;o===Vi&&(t.key=null);const c=await ul("value",t.value,n,a);if(c===Fn)return Fn;c===Vi&&(t.value=null)}}return s}function f1(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function d1(e,t,n,a){var s,o,c,f,d;if(typeof n=="function")return n(e,t,a);if(Bl(t))return(s=n.Map)==null?void 0:s.call(n,e,t,a);if(Ul(t))return(o=n.Seq)==null?void 0:o.call(n,e,t,a);if(At(t))return(c=n.Pair)==null?void 0:c.call(n,e,t,a);if(vt(t))return(f=n.Scalar)==null?void 0:f.call(n,e,t,a);if(kr(t))return(d=n.Alias)==null?void 0:d.call(n,e,t,a)}function h1(e,t,n){const a=t[t.length-1];if(Mt(a))a.items[e]=n;else if(At(a))e==="key"?a.key=n:a.value=n;else if(hs(a))a.contents=n;else{const s=kr(a)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const NA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},TA=e=>e.replace(/[!,[\]{}]/g,t=>NA[t]);class Nn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Nn.defaultYaml,t),this.tags=Object.assign({},Nn.defaultTags,n)}clone(){const t=new Nn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Nn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Nn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Nn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Nn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Nn.defaultTags),this.atNextDocument=!1);const a=t.trim().split(/[ \t]+/),s=a.shift();switch(s){case"%TAG":{if(a.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),a.length<2))return!1;const[o,c]=a;return this.tags[o]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,a.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[o]=a;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const c=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,c),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const c=t.slice(2,-1);return c==="!"||c==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),c)}const[,a,s]=t.match(/^(.*!)([^!]*)$/s);s||n(`The ${t} tag has no suffix`);const o=this.tags[a];if(o)try{return o+decodeURIComponent(s)}catch(c){return n(String(c)),null}return a==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,a]of Object.entries(this.tags))if(t.startsWith(a))return n+TA(t.substring(a.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],a=Object.entries(this.tags);let s;if(t&&a.length>0&&jt(t.contents)){const o={};ms(t.contents,(c,f)=>{jt(f)&&f.tag&&(o[f.tag]=!0)}),s=Object.keys(o)}else s=[];for(const[o,c]of a)o==="!!"&&c==="tag:yaml.org,2002:"||(!t||s.some(f=>f.startsWith(c)))&&n.push(`%TAG ${o} ${c}`);return n.join(`
|
|
351
|
+
`)}}Nn.defaultYaml={explicit:!1,version:"1.2"};Nn.defaultTags={"!!":"tag:yaml.org,2002:"};function m1(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function p1(e){const t=new Set;return ms(e,{Value(n,a){a.anchor&&t.add(a.anchor)}}),t}function g1(e,t){for(let n=1;;++n){const a=`${e}${n}`;if(!t.has(a))return a}}function CA(e,t){const n=[],a=new Map;let s=null;return{onAnchor:o=>{n.push(o),s??(s=p1(e));const c=g1(t,s);return s.add(c),c},setAnchors:()=>{for(const o of n){const c=a.get(o);if(typeof c=="object"&&c.anchor&&(vt(c.node)||Mt(c.node)))c.node.anchor=c.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:a}}function fl(e,t,n,a){if(a&&typeof a=="object")if(Array.isArray(a))for(let s=0,o=a.length;s<o;++s){const c=a[s],f=fl(e,a,String(s),c);f===void 0?delete a[s]:f!==c&&(a[s]=f)}else if(a instanceof Map)for(const s of Array.from(a.keys())){const o=a.get(s),c=fl(e,a,s,o);c===void 0?a.delete(s):c!==o&&a.set(s,c)}else if(a instanceof Set)for(const s of Array.from(a)){const o=fl(e,a,s,s);o===void 0?a.delete(s):o!==s&&(a.delete(s),a.add(o))}else for(const[s,o]of Object.entries(a)){const c=fl(e,a,s,o);c===void 0?delete a[s]:c!==o&&(a[s]=c)}return e.call(t,n,a)}function vi(e,t,n){if(Array.isArray(e))return e.map((a,s)=>vi(a,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!c1(e))return e.toJSON(t,n);const a={aliasCount:0,count:1,res:void 0};n.anchors.set(e,a),n.onCreate=o=>{a.res=o,delete n.onCreate};const s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class Yp{constructor(t){Object.defineProperty(this,Si,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:a,onAnchor:s,reviver:o}={}){if(!hs(t))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},f=vi(this,"",c);if(typeof s=="function")for(const{count:d,res:m}of c.anchors.values())s(m,d);return typeof o=="function"?fl(o,{"":f},"",f):f}}class Uf extends Yp{constructor(t){super(Qp),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let a;n!=null&&n.aliasResolveCache?a=n.aliasResolveCache:(a=[],ms(t,{Node:(o,c)=>{(kr(c)||c1(c))&&a.push(c)}}),n&&(n.aliasResolveCache=a));let s;for(const o of a){if(o===this)break;o.anchor===this.source&&(s=o)}return s}toJSON(t,n){if(!n)return{source:this.source};const{anchors:a,doc:s,maxAliasCount:o}=n,c=this.resolve(s,n);if(!c){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=a.get(c);if(f||(vi(c,null,n),f=a.get(c)),(f==null?void 0:f.res)===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=ff(s,c,a)),f.count*f.aliasCount>o)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(t,n,a){const s=`*${this.source}`;if(t){if(m1(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${s} `}return s}}function ff(e,t,n){if(kr(t)){const a=t.resolve(e),s=n&&a&&n.get(a);return s?s.count*s.aliasCount:0}else if(Mt(t)){let a=0;for(const s of t.items){const o=ff(e,s,n);o>a&&(a=o)}return a}else if(At(t)){const a=ff(e,t.key,n),s=ff(e,t.value,n);return Math.max(a,s)}return 1}const b1=e=>!e||typeof e!="function"&&typeof e!="object";class ze extends Yp{constructor(t){super(Wi),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:vi(this.value,t,n)}toString(){return String(this.value)}}ze.BLOCK_FOLDED="BLOCK_FOLDED";ze.BLOCK_LITERAL="BLOCK_LITERAL";ze.PLAIN="PLAIN";ze.QUOTE_DOUBLE="QUOTE_DOUBLE";ze.QUOTE_SINGLE="QUOTE_SINGLE";const AA="tag:yaml.org,2002:";function OA(e,t,n){if(t){const a=n.filter(o=>o.tag===t),s=a.find(o=>!o.format)??a[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find(a=>{var s;return((s=a.identify)==null?void 0:s.call(a,e))&&!a.format})}function lc(e,t,n){var g,x,v;if(hs(e)&&(e=e.contents),jt(e))return e;if(At(e)){const S=(x=(g=n.schema[Er]).createNode)==null?void 0:x.call(g,n.schema,null,n);return S.items.push(e),S}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:a,onAnchor:s,onTagObj:o,schema:c,sourceObjects:f}=n;let d;if(a&&e&&typeof e=="object"){if(d=f.get(e),d)return d.anchor??(d.anchor=s(e)),new Uf(d.anchor);d={anchor:null,node:null},f.set(e,d)}t!=null&&t.startsWith("!!")&&(t=AA+t.slice(2));let m=OA(e,t,c.tags);if(!m){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const S=new ze(e);return d&&(d.node=S),S}m=e instanceof Map?c[Er]:Symbol.iterator in Object(e)?c[zl]:c[Er]}o&&(o(m),delete n.onTagObj);const y=m!=null&&m.createNode?m.createNode(n.schema,e,n):typeof((v=m==null?void 0:m.nodeClass)==null?void 0:v.from)=="function"?m.nodeClass.from(n.schema,e,n):new ze(e);return t?y.tag=t:m.default||(y.tag=m.tag),d&&(d.node=y),y}function Ef(e,t,n){let a=n;for(let s=t.length-1;s>=0;--s){const o=t[s];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const c=[];c[o]=a,a=c}else a=new Map([[o,a]])}return lc(a,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Wo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class y1 extends Yp{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(a=>jt(a)||At(a)?a.clone(t):a),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Wo(t))this.add(n);else{const[a,...s]=t,o=this.get(a,!0);if(Mt(o))o.addIn(s,n);else if(o===void 0&&this.schema)this.set(a,Ef(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}deleteIn(t){const[n,...a]=t;if(a.length===0)return this.delete(n);const s=this.get(n,!0);if(Mt(s))return s.deleteIn(a);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${a}`)}getIn(t,n){const[a,...s]=t,o=this.get(a,!0);return s.length===0?!n&&vt(o)?o.value:o:Mt(o)?o.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!At(n))return!1;const a=n.value;return a==null||t&&vt(a)&&a.value==null&&!a.commentBefore&&!a.comment&&!a.tag})}hasIn(t){const[n,...a]=t;if(a.length===0)return this.has(n);const s=this.get(n,!0);return Mt(s)?s.hasIn(a):!1}setIn(t,n){const[a,...s]=t;if(s.length===0)this.set(a,n);else{const o=this.get(a,!0);if(Mt(o))o.setIn(s,n);else if(o===void 0&&this.schema)this.set(a,Ef(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}}const RA=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Na(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Wr=(e,t,n)=>e.endsWith(`
|
|
352
|
+
`)?Na(n,t):n.includes(`
|
|
353
|
+
`)?`
|
|
354
|
+
`+Na(n,t):(e.endsWith(" ")?"":" ")+n,x1="flow",up="block",df="quoted";function $f(e,t,n="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:o=20,onFold:c,onOverflow:f}={}){if(!s||s<0)return e;s<o&&(o=0);const d=Math.max(1+o,1+s-t.length);if(e.length<=d)return e;const m=[],y={};let g=s-t.length;typeof a=="number"&&(a>s-Math.max(2,o)?m.push(0):g=s-a);let x,v,S=!1,w=-1,k=-1,_=-1;n===up&&(w=qv(e,w,t.length),w!==-1&&(g=w+d));for(let T;T=e[w+=1];){if(n===df&&T==="\\"){switch(k=w,e[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}_=w}if(T===`
|
|
355
|
+
`)n===up&&(w=qv(e,w,t.length)),g=w+t.length+d,x=void 0;else{if(T===" "&&v&&v!==" "&&v!==`
|
|
356
|
+
`&&v!==" "){const j=e[w+1];j&&j!==" "&&j!==`
|
|
357
|
+
`&&j!==" "&&(x=w)}if(w>=g)if(x)m.push(x),g=x+d,x=void 0;else if(n===df){for(;v===" "||v===" ";)v=T,T=e[w+=1],S=!0;const j=w>_+1?w-2:k-1;if(y[j])return e;m.push(j),y[j]=!0,g=j+d,x=void 0}else S=!0}v=T}if(S&&f&&f(),m.length===0)return e;c&&c();let A=e.slice(0,m[0]);for(let T=0;T<m.length;++T){const j=m[T],F=m[T+1]||e.length;j===0?A=`
|
|
358
|
+
${t}${e.slice(0,F)}`:(n===df&&y[j]&&(A+=`${e[j]}\\`),A+=`
|
|
359
|
+
${t}${e.slice(j+1,F)}`)}return A}function qv(e,t,n){let a=t,s=t+1,o=e[s];for(;o===" "||o===" ";)if(t<s+n)o=e[++t];else{do o=e[++t];while(o&&o!==`
|
|
360
|
+
`);a=t,s=t+1,o=e[s]}return a}const Ff=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Pf=e=>/^(%|---|\.\.\.)/m.test(e);function MA(e,t,n){if(!t||t<0)return!1;const a=t-n,s=e.length;if(s<=a)return!1;for(let o=0,c=0;o<s;++o)if(e[o]===`
|
|
361
|
+
`){if(o-c>a)return!0;if(c=o+1,s-c<=a)return!1}return!0}function Zo(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:a}=t,s=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Pf(e)?" ":"");let c="",f=0;for(let d=0,m=n[d];m;m=n[++d])if(m===" "&&n[d+1]==="\\"&&n[d+2]==="n"&&(c+=n.slice(f,d)+"\\ ",d+=1,f=d,m="\\"),m==="\\")switch(n[d+1]){case"u":{c+=n.slice(f,d);const y=n.substr(d+2,4);switch(y){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:y.substr(0,2)==="00"?c+="\\x"+y.substr(2):c+=n.substr(d,6)}d+=5,f=d+1}break;case"n":if(a||n[d+2]==='"'||n.length<s)d+=1;else{for(c+=n.slice(f,d)+`
|
|
362
|
+
|
|
363
|
+
`;n[d+2]==="\\"&&n[d+3]==="n"&&n[d+4]!=='"';)c+=`
|
|
364
|
+
`,d+=2;c+=o,n[d+2]===" "&&(c+="\\"),d+=1,f=d+1}break;default:d+=1}return c=f?c+n.slice(f):n,a?c:$f(c,o,df,Ff(t,!1))}function fp(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
365
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return Zo(e,t);const n=t.indent||(Pf(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
366
|
+
${n}`)+"'";return t.implicitKey?a:$f(a,n,x1,Ff(t,!1))}function dl(e,t){const{singleQuote:n}=t.options;let a;if(n===!1)a=Zo;else{const s=e.includes('"'),o=e.includes("'");s&&!o?a=fp:o&&!s?a=Zo:a=n?fp:Zo}return a(e,t)}let dp;try{dp=new RegExp(`(^|(?<!
|
|
367
|
+
))
|
|
368
|
+
+(?!
|
|
369
|
+
|$)`,"g")}catch{dp=/\n+(?!\n|$)/g}function hf({comment:e,type:t,value:n},a,s,o){const{blockQuote:c,commentString:f,lineWidth:d}=a.options;if(!c||/\n[\t ]+$/.test(n))return dl(n,a);const m=a.indent||(a.forceBlockIndent||Pf(n)?" ":""),y=c==="literal"?!0:c==="folded"||t===ze.BLOCK_FOLDED?!1:t===ze.BLOCK_LITERAL?!0:!MA(n,d,m.length);if(!n)return y?`|
|
|
370
|
+
`:`>
|
|
371
|
+
`;let g,x;for(x=n.length;x>0;--x){const F=n[x-1];if(F!==`
|
|
372
|
+
`&&F!==" "&&F!==" ")break}let v=n.substring(x);const S=v.indexOf(`
|
|
373
|
+
`);S===-1?g="-":n===v||S!==v.length-1?(g="+",o&&o()):g="",v&&(n=n.slice(0,-v.length),v[v.length-1]===`
|
|
374
|
+
`&&(v=v.slice(0,-1)),v=v.replace(dp,`$&${m}`));let w=!1,k,_=-1;for(k=0;k<n.length;++k){const F=n[k];if(F===" ")w=!0;else if(F===`
|
|
375
|
+
`)_=k;else break}let A=n.substring(0,_<k?_+1:k);A&&(n=n.substring(A.length),A=A.replace(/\n+/g,`$&${m}`));let j=(w?m?"2":"1":"")+g;if(e&&(j+=" "+f(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!y){const F=n.replace(/\n+/g,`
|
|
376
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let M=!1;const q=Ff(a,!0);c!=="folded"&&t!==ze.BLOCK_FOLDED&&(q.onOverflow=()=>{M=!0});const K=$f(`${A}${F}${v}`,m,up,q);if(!M)return`>${j}
|
|
377
|
+
${m}${K}`}return n=n.replace(/\n+/g,`$&${m}`),`|${j}
|
|
378
|
+
${m}${A}${n}${v}`}function jA(e,t,n,a){const{type:s,value:o}=e,{actualString:c,implicitKey:f,indent:d,indentStep:m,inFlow:y}=t;if(f&&o.includes(`
|
|
379
|
+
`)||y&&/[[\]{},]/.test(o))return dl(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||y||!o.includes(`
|
|
380
|
+
`)?dl(o,t):hf(e,t,n,a);if(!f&&!y&&s!==ze.PLAIN&&o.includes(`
|
|
381
|
+
`))return hf(e,t,n,a);if(Pf(o)){if(d==="")return t.forceBlockIndent=!0,hf(e,t,n,a);if(f&&d===m)return dl(o,t)}const g=o.replace(/\n+/g,`$&
|
|
382
|
+
${d}`);if(c){const x=w=>{var k;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((k=w.test)==null?void 0:k.test(g))},{compat:v,tags:S}=t.doc.schema;if(S.some(x)||v!=null&&v.some(x))return dl(o,t)}return f?g:$f(g,d,x1,Ff(t,!1))}function vc(e,t,n,a){const{implicitKey:s,inFlow:o}=t,c=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:f}=e;f!==ze.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(f=ze.QUOTE_DOUBLE);const d=y=>{switch(y){case ze.BLOCK_FOLDED:case ze.BLOCK_LITERAL:return s||o?dl(c.value,t):hf(c,t,n,a);case ze.QUOTE_DOUBLE:return Zo(c.value,t);case ze.QUOTE_SINGLE:return fp(c.value,t);case ze.PLAIN:return jA(c,t,n,a);default:return null}};let m=d(f);if(m===null){const{defaultKeyType:y,defaultStringType:g}=t.options,x=s&&y||g;if(m=d(x),m===null)throw new Error(`Unsupported default string type ${x}`)}return m}function v1(e,t){const n=Object.assign({blockQuote:!0,commentString:RA,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let a;switch(n.collectionStyle){case"block":a=!1;break;case"flow":a=!0;break;default:a=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:a,options:n}}function DA(e,t){var s;if(t.tag){const o=e.filter(c=>c.tag===t.tag);if(o.length>0)return o.find(c=>c.format===t.format)??o[0]}let n,a;if(vt(t)){a=t.value;let o=e.filter(c=>{var f;return(f=c.identify)==null?void 0:f.call(c,a)});if(o.length>1){const c=o.filter(f=>f.test);c.length>0&&(o=c)}n=o.find(c=>c.format===t.format)??o.find(c=>!c.format)}else a=t,n=e.find(o=>o.nodeClass&&a instanceof o.nodeClass);if(!n){const o=((s=a==null?void 0:a.constructor)==null?void 0:s.name)??(a===null?"null":typeof a);throw new Error(`Tag not resolved for ${o} value`)}return n}function LA(e,t,{anchors:n,doc:a}){if(!a.directives)return"";const s=[],o=(vt(e)||Mt(e))&&e.anchor;o&&m1(o)&&(n.add(o),s.push(`&${o}`));const c=e.tag??(t.default?null:t.tag);return c&&s.push(a.directives.tagString(c)),s.join(" ")}function Al(e,t,n,a){var d;if(At(e))return e.toString(t,n,a);if(kr(e)){if(t.doc.directives)return e.toString(t);if((d=t.resolvedAliases)!=null&&d.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const o=jt(e)?e:t.doc.createNode(e,{onTagObj:m=>s=m});s??(s=DA(t.doc.schema.tags,o));const c=LA(o,s,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);const f=typeof s.stringify=="function"?s.stringify(o,t,n,a):vt(o)?vc(o,t,n,a):o.toString(t,n,a);return c?vt(o)||f[0]==="{"||f[0]==="["?`${c} ${f}`:`${c}
|
|
383
|
+
${t.indent}${f}`:f}function IA({key:e,value:t},n,a,s){const{allNullValues:o,doc:c,indent:f,indentStep:d,options:{commentString:m,indentSeq:y,simpleKeys:g}}=n;let x=jt(e)&&e.comment||null;if(g){if(x)throw new Error("With simple keys, key nodes cannot have comments");if(Mt(e)||!jt(e)&&typeof e=="object"){const q="With simple keys, collection cannot be used as a key value";throw new Error(q)}}let v=!g&&(!e||x&&t==null&&!n.inFlow||Mt(e)||(vt(e)?e.type===ze.BLOCK_FOLDED||e.type===ze.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!v&&(g||!o),indent:f+d});let S=!1,w=!1,k=Al(e,n,()=>S=!0,()=>w=!0);if(!v&&!n.inFlow&&k.length>1024){if(g)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(n.inFlow){if(o||t==null)return S&&a&&a(),k===""?"?":v?`? ${k}`:k}else if(o&&!g||t==null&&v)return k=`? ${k}`,x&&!S?k+=Wr(k,n.indent,m(x)):w&&s&&s(),k;S&&(x=null),v?(x&&(k+=Wr(k,n.indent,m(x))),k=`? ${k}
|
|
384
|
+
${f}:`):(k=`${k}:`,x&&(k+=Wr(k,n.indent,m(x))));let _,A,T;jt(t)?(_=!!t.spaceBefore,A=t.commentBefore,T=t.comment):(_=!1,A=null,T=null,t&&typeof t=="object"&&(t=c.createNode(t))),n.implicitKey=!1,!v&&!x&&vt(t)&&(n.indentAtStart=k.length+1),w=!1,!y&&d.length>=2&&!n.inFlow&&!v&&Ul(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let j=!1;const F=Al(t,n,()=>j=!0,()=>w=!0);let M=" ";if(x||_||A){if(M=_?`
|
|
385
|
+
`:"",A){const q=m(A);M+=`
|
|
386
|
+
${Na(q,n.indent)}`}F===""&&!n.inFlow?M===`
|
|
387
|
+
`&&T&&(M=`
|
|
388
|
+
|
|
389
|
+
`):M+=`
|
|
390
|
+
${n.indent}`}else if(!v&&Mt(t)){const q=F[0],K=F.indexOf(`
|
|
391
|
+
`),te=K!==-1,D=n.inFlow??t.flow??t.items.length===0;if(te||!D){let P=!1;if(te&&(q==="&"||q==="!")){let J=F.indexOf(" ");q==="&"&&J!==-1&&J<K&&F[J+1]==="!"&&(J=F.indexOf(" ",J+1)),(J===-1||K<J)&&(P=!0)}P||(M=`
|
|
392
|
+
${n.indent}`)}}else(F===""||F[0]===`
|
|
393
|
+
`)&&(M="");return k+=M+F,n.inFlow?j&&a&&a():T&&!j?k+=Wr(k,n.indent,m(T)):w&&s&&s(),k}function E1(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Gu="<<",Ta={identify:e=>e===Gu||typeof e=="symbol"&&e.description===Gu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ze(Symbol(Gu)),{addToJSMap:S1}),stringify:()=>Gu},zA=(e,t)=>(Ta.identify(t)||vt(t)&&(!t.type||t.type===ze.PLAIN)&&Ta.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Ta.tag&&n.default));function S1(e,t,n){if(n=e&&kr(n)?n.resolve(e.doc):n,Ul(n))for(const a of n.items)pm(e,t,a);else if(Array.isArray(n))for(const a of n)pm(e,t,a);else pm(e,t,n)}function pm(e,t,n){const a=e&&kr(n)?n.resolve(e.doc):n;if(!Bl(a))throw new Error("Merge sources must be maps or map aliases");const s=a.toJSON(null,e,Map);for(const[o,c]of s)t instanceof Map?t.has(o)||t.set(o,c):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0});return t}function w1(e,t,{key:n,value:a}){if(jt(n)&&n.addToJSMap)n.addToJSMap(e,t,a);else if(zA(e,n))S1(e,t,a);else{const s=vi(n,"",e);if(t instanceof Map)t.set(s,vi(a,s,e));else if(t instanceof Set)t.add(s);else{const o=BA(n,s,e),c=vi(a,o,e);o in t?Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[o]=c}}return t}function BA(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(jt(e)&&(n!=null&&n.doc)){const a=v1(n.doc,{});a.anchors=new Set;for(const o of n.anchors.keys())a.anchors.add(o.anchor);a.inFlow=!0,a.inStringifyKey=!0;const s=e.toString(a);if(!n.mapKeyWarned){let o=JSON.stringify(s);o.length>40&&(o=o.substring(0,36)+'..."'),E1(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function Vp(e,t,n){const a=lc(e,void 0,n),s=lc(t,void 0,n);return new gn(a,s)}class gn{constructor(t,n=null){Object.defineProperty(this,Si,{value:o1}),this.key=t,this.value=n}clone(t){let{key:n,value:a}=this;return jt(n)&&(n=n.clone(t)),jt(a)&&(a=a.clone(t)),new gn(n,a)}toJSON(t,n){const a=n!=null&&n.mapAsMap?new Map:{};return w1(n,a,this)}toString(t,n,a){return t!=null&&t.doc?IA(this,t,n,a):JSON.stringify(this)}}function _1(e,t,n){return(t.inFlow??e.flow?$A:UA)(e,t,n)}function UA({comment:e,items:t},n,{blockItemPrefix:a,flowChars:s,itemIndent:o,onChompKeep:c,onComment:f}){const{indent:d,options:{commentString:m}}=n,y=Object.assign({},n,{indent:o,type:null});let g=!1;const x=[];for(let S=0;S<t.length;++S){const w=t[S];let k=null;if(jt(w))!g&&w.spaceBefore&&x.push(""),Sf(n,x,w.commentBefore,g),w.comment&&(k=w.comment);else if(At(w)){const A=jt(w.key)?w.key:null;A&&(!g&&A.spaceBefore&&x.push(""),Sf(n,x,A.commentBefore,g))}g=!1;let _=Al(w,y,()=>k=null,()=>g=!0);k&&(_+=Wr(_,o,m(k))),g&&k&&(g=!1),x.push(a+_)}let v;if(x.length===0)v=s.start+s.end;else{v=x[0];for(let S=1;S<x.length;++S){const w=x[S];v+=w?`
|
|
394
|
+
${d}${w}`:`
|
|
395
|
+
`}}return e?(v+=`
|
|
396
|
+
`+Na(m(e),d),f&&f()):g&&c&&c(),v}function $A({items:e},t,{flowChars:n,itemIndent:a}){const{indent:s,indentStep:o,flowCollectionPadding:c,options:{commentString:f}}=t;a+=o;const d=Object.assign({},t,{indent:a,inFlow:!0,type:null});let m=!1,y=0;const g=[];for(let S=0;S<e.length;++S){const w=e[S];let k=null;if(jt(w))w.spaceBefore&&g.push(""),Sf(t,g,w.commentBefore,!1),w.comment&&(k=w.comment);else if(At(w)){const A=jt(w.key)?w.key:null;A&&(A.spaceBefore&&g.push(""),Sf(t,g,A.commentBefore,!1),A.comment&&(m=!0));const T=jt(w.value)?w.value:null;T?(T.comment&&(k=T.comment),T.commentBefore&&(m=!0)):w.value==null&&(A!=null&&A.comment)&&(k=A.comment)}k&&(m=!0);let _=Al(w,d,()=>k=null);m||(m=g.length>y||_.includes(`
|
|
397
|
+
`)),S<e.length-1?_+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(m||(m=g.reduce((A,T)=>A+T.length+2,2)+(_.length+2)>t.options.lineWidth)),m&&(_+=",")),k&&(_+=Wr(_,a,f(k))),g.push(_),y=g.length}const{start:x,end:v}=n;if(g.length===0)return x+v;if(!m){const S=g.reduce((w,k)=>w+k.length+2,2);m=t.options.lineWidth>0&&S>t.options.lineWidth}if(m){let S=x;for(const w of g)S+=w?`
|
|
398
|
+
${o}${s}${w}`:`
|
|
399
|
+
`;return`${S}
|
|
400
|
+
${s}${v}`}else return`${x}${c}${g.join(" ")}${c}${v}`}function Sf({indent:e,options:{commentString:t}},n,a,s){if(a&&s&&(a=a.replace(/^\n+/,"")),a){const o=Na(t(a),e);n.push(o.trimStart())}}function Zr(e,t){const n=vt(t)?t.value:t;for(const a of e)if(At(a)&&(a.key===t||a.key===n||vt(a.key)&&a.key.value===n))return a}class ii extends y1{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Er,t),this.items=[]}static from(t,n,a){const{keepUndefined:s,replacer:o}=a,c=new this(t),f=(d,m)=>{if(typeof o=="function")m=o.call(n,d,m);else if(Array.isArray(o)&&!o.includes(d))return;(m!==void 0||s)&&c.items.push(Vp(d,m,a))};if(n instanceof Map)for(const[d,m]of n)f(d,m);else if(n&&typeof n=="object")for(const d of Object.keys(n))f(d,n[d]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,n){var c;let a;At(t)?a=t:!t||typeof t!="object"||!("key"in t)?a=new gn(t,t==null?void 0:t.value):a=new gn(t.key,t.value);const s=Zr(this.items,a.key),o=(c=this.schema)==null?void 0:c.sortMapEntries;if(s){if(!n)throw new Error(`Key ${a.key} already set`);vt(s.value)&&b1(a.value)?s.value.value=a.value:s.value=a.value}else if(o){const f=this.items.findIndex(d=>o(a,d)<0);f===-1?this.items.push(a):this.items.splice(f,0,a)}else this.items.push(a)}delete(t){const n=Zr(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const a=Zr(this.items,t),s=a==null?void 0:a.value;return(!n&&vt(s)?s.value:s)??void 0}has(t){return!!Zr(this.items,t)}set(t,n){this.add(new gn(t,n),!0)}toJSON(t,n,a){const s=a?new a:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(s);for(const o of this.items)w1(n,s,o);return s}toString(t,n,a){if(!t)return JSON.stringify(this);for(const s of this.items)if(!At(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),_1(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:a,onComment:n})}}const $l={collection:"map",default:!0,nodeClass:ii,tag:"tag:yaml.org,2002:map",resolve(e,t){return Bl(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>ii.from(e,t,n)};class Sr extends y1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(zl,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Qu(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const a=Qu(t);if(typeof a!="number")return;const s=this.items[a];return!n&&vt(s)?s.value:s}has(t){const n=Qu(t);return typeof n=="number"&&n<this.items.length}set(t,n){const a=Qu(t);if(typeof a!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[a];vt(s)&&b1(n)?s.value=n:this.items[a]=n}toJSON(t,n){const a=[];n!=null&&n.onCreate&&n.onCreate(a);let s=0;for(const o of this.items)a.push(vi(o,String(s++),n));return a}toString(t,n,a){return t?_1(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:a,onComment:n}):JSON.stringify(this)}static from(t,n,a){const{replacer:s}=a,o=new this(t);if(n&&Symbol.iterator in Object(n)){let c=0;for(let f of n){if(typeof s=="function"){const d=n instanceof Set?f:String(c++);f=s.call(n,d,f)}o.items.push(lc(f,void 0,a))}}return o}}function Qu(e){let t=vt(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const Fl={collection:"seq",default:!0,nodeClass:Sr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Ul(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Sr.from(e,t,n)},qf={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,a){return t=Object.assign({actualString:!0},t),vc(e,t,n,a)}},Hf={identify:e=>e==null,createNode:()=>new ze(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ze(null),stringify:({source:e},t)=>typeof e=="string"&&Hf.test.test(e)?e:t.options.nullStr},Xp={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new ze(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&Xp.test.test(e)){const a=e[0]==="t"||e[0]==="T";if(t===a)return e}return t?n.options.trueStr:n.options.falseStr}};function Li({format:e,minFractionDigits:t,tag:n,value:a}){if(typeof a=="bigint")return String(a);const s=typeof a=="number"?a:Number(a);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=Object.is(a,-0)?"-0":JSON.stringify(a);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let c=o.indexOf(".");c<0&&(c=o.length,o+=".");let f=t-(o.length-c-1);for(;f-- >0;)o+="0"}return o}const k1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Li},N1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Li(e)}},T1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new ze(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Li},Kf=e=>typeof e=="bigint"||Number.isInteger(e),Wp=(e,t,n,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),n);function C1(e,t,n){const{value:a}=e;return Kf(a)&&a>=0?n+a.toString(t):Li(e)}const A1={identify:e=>Kf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>Wp(e,2,8,n),stringify:e=>C1(e,8,"0o")},O1={identify:Kf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Wp(e,0,10,n),stringify:Li},R1={identify:e=>Kf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Wp(e,2,16,n),stringify:e=>C1(e,16,"0x")},FA=[$l,Fl,qf,Hf,Xp,A1,O1,R1,k1,N1,T1];function Hv(e){return typeof e=="bigint"||Number.isInteger(e)}const Yu=({value:e})=>JSON.stringify(e),PA=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Yu},{identify:e=>e==null,createNode:()=>new ze(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Yu},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Yu},{identify:Hv,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Hv(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Yu}],qA={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},HA=[$l,Fl].concat(PA,qA),Zp={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),a=new Uint8Array(n.length);for(let s=0;s<n.length;++s)a[s]=n.charCodeAt(s);return a}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},a,s,o){if(!n)return"";const c=n;let f;if(typeof btoa=="function"){let d="";for(let m=0;m<c.length;++m)d+=String.fromCharCode(c[m]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=ze.BLOCK_LITERAL),t!==ze.QUOTE_DOUBLE){const d=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),m=Math.ceil(f.length/d),y=new Array(m);for(let g=0,x=0;g<m;++g,x+=d)y[g]=f.substr(x,d);f=y.join(t===ze.BLOCK_LITERAL?`
|
|
401
|
+
`:" ")}return vc({comment:e,type:t,value:f},a,s,o)}};function M1(e,t){if(Ul(e))for(let n=0;n<e.items.length;++n){let a=e.items[n];if(!At(a)){if(Bl(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");const s=a.items[0]||new gn(new ze(null));if(a.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${a.commentBefore}
|
|
402
|
+
${s.key.commentBefore}`:a.commentBefore),a.comment){const o=s.value??s.key;o.comment=o.comment?`${a.comment}
|
|
403
|
+
${o.comment}`:a.comment}a=s}e.items[n]=At(a)?a:new gn(a)}}else t("Expected a sequence for this tag");return e}function j1(e,t,n){const{replacer:a}=n,s=new Sr(e);s.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let c of t){typeof a=="function"&&(c=a.call(t,String(o++),c));let f,d;if(Array.isArray(c))if(c.length===2)f=c[0],d=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const m=Object.keys(c);if(m.length===1)f=m[0],d=c[f];else throw new TypeError(`Expected tuple with one key, not ${m.length} keys`)}else f=c;s.items.push(Vp(f,d,n))}return s}const Jp={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:M1,createNode:j1};class hl extends Sr{constructor(){super(),this.add=ii.prototype.add.bind(this),this.delete=ii.prototype.delete.bind(this),this.get=ii.prototype.get.bind(this),this.has=ii.prototype.has.bind(this),this.set=ii.prototype.set.bind(this),this.tag=hl.tag}toJSON(t,n){if(!n)return super.toJSON(t);const a=new Map;n!=null&&n.onCreate&&n.onCreate(a);for(const s of this.items){let o,c;if(At(s)?(o=vi(s.key,"",n),c=vi(s.value,o,n)):o=vi(s,"",n),a.has(o))throw new Error("Ordered maps must not include duplicate keys");a.set(o,c)}return a}static from(t,n,a){const s=j1(t,n,a),o=new this;return o.items=s.items,o}}hl.tag="tag:yaml.org,2002:omap";const eg={collection:"seq",identify:e=>e instanceof Map,nodeClass:hl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=M1(e,t),a=[];for(const{key:s}of n.items)vt(s)&&(a.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):a.push(s.value));return Object.assign(new hl,n)},createNode:(e,t,n)=>hl.from(e,t,n)};function D1({value:e,source:t},n){return t&&(e?L1:I1).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const L1={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ze(!0),stringify:D1},I1={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ze(!1),stringify:D1},KA={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Li},GA={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Li(e)}},QA={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new ze(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const a=e.substring(n+1).replace(/_/g,"");a[a.length-1]==="0"&&(t.minFractionDigits=a.length)}return t},stringify:Li},Ec=e=>typeof e=="bigint"||Number.isInteger(e);function Gf(e,t,n,{intAsBigInt:a}){const s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),a){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const c=BigInt(e);return s==="-"?BigInt(-1)*c:c}const o=parseInt(e,n);return s==="-"?-1*o:o}function tg(e,t,n){const{value:a}=e;if(Ec(a)){const s=a.toString(t);return a<0?"-"+n+s.substr(1):n+s}return Li(e)}const YA={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Gf(e,2,2,n),stringify:e=>tg(e,2,"0b")},VA={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Gf(e,1,8,n),stringify:e=>tg(e,8,"0")},XA={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Gf(e,0,10,n),stringify:Li},WA={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Gf(e,2,16,n),stringify:e=>tg(e,16,"0x")};class ml extends ii{constructor(t){super(t),this.tag=ml.tag}add(t){let n;At(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new gn(t.key,null):n=new gn(t,null),Zr(this.items,n.key)||this.items.push(n)}get(t,n){const a=Zr(this.items,t);return!n&&At(a)?vt(a.key)?a.key.value:a.key:a}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const a=Zr(this.items,t);a&&!n?this.items.splice(this.items.indexOf(a),1):!a&&n&&this.items.push(new gn(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,a){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,a);throw new Error("Set items must all have null values")}static from(t,n,a){const{replacer:s}=a,o=new this(t);if(n&&Symbol.iterator in Object(n))for(let c of n)typeof s=="function"&&(c=s.call(n,c,c)),o.items.push(Vp(c,null,a));return o}}ml.tag="tag:yaml.org,2002:set";const ng={collection:"map",identify:e=>e instanceof Set,nodeClass:ml,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>ml.from(e,t,n),resolve(e,t){if(Bl(e)){if(e.hasAllNullValues(!0))return Object.assign(new ml,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function ig(e,t){const n=e[0],a=n==="-"||n==="+"?e.substring(1):e,s=c=>t?BigInt(c):Number(c),o=a.replace(/_/g,"").split(":").reduce((c,f)=>c*s(60)+s(f),s(0));return n==="-"?s(-1)*o:o}function z1(e){let{value:t}=e,n=c=>c;if(typeof t=="bigint")n=c=>BigInt(c);else if(isNaN(t)||!isFinite(t))return Li(e);let a="";t<0&&(a="-",t*=n(-1));const s=n(60),o=[t%s];return t<60?o.unshift(0):(t=(t-o[0])/s,o.unshift(t%s),t>=60&&(t=(t-o[0])/s,o.unshift(t))),a+o.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const B1={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>ig(e,n),stringify:z1},U1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ig(e,!1),stringify:z1},Qf={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Qf.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,a,s,o,c,f]=t.map(Number),d=t[7]?Number((t[7]+"00").substr(1,3)):0;let m=Date.UTC(n,a-1,s,o||0,c||0,f||0,d);const y=t[8];if(y&&y!=="Z"){let g=ig(y,!1);Math.abs(g)<30&&(g*=60),m-=6e4*g}return new Date(m)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Kv=[$l,Fl,qf,Hf,L1,I1,YA,VA,XA,WA,KA,GA,QA,Zp,Ta,eg,Jp,ng,B1,U1,Qf],Gv=new Map([["core",FA],["failsafe",[$l,Fl,qf]],["json",HA],["yaml11",Kv],["yaml-1.1",Kv]]),Qv={binary:Zp,bool:Xp,float:T1,floatExp:N1,floatNaN:k1,floatTime:U1,int:O1,intHex:R1,intOct:A1,intTime:B1,map:$l,merge:Ta,null:Hf,omap:eg,pairs:Jp,seq:Fl,set:ng,timestamp:Qf},ZA={"tag:yaml.org,2002:binary":Zp,"tag:yaml.org,2002:merge":Ta,"tag:yaml.org,2002:omap":eg,"tag:yaml.org,2002:pairs":Jp,"tag:yaml.org,2002:set":ng,"tag:yaml.org,2002:timestamp":Qf};function gm(e,t,n){const a=Gv.get(t);if(a&&!e)return n&&!a.includes(Ta)?a.concat(Ta):a.slice();let s=a;if(!s)if(Array.isArray(e))s=[];else{const o=Array.from(Gv.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(const o of e)s=s.concat(o);else typeof e=="function"&&(s=e(s.slice()));return n&&(s=s.concat(Ta)),s.reduce((o,c)=>{const f=typeof c=="string"?Qv[c]:c;if(!f){const d=JSON.stringify(c),m=Object.keys(Qv).map(y=>JSON.stringify(y)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${m}`)}return o.includes(f)||o.push(f),o},[])}const JA=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let $1=class F1{constructor({compat:t,customTags:n,merge:a,resolveKnownTags:s,schema:o,sortMapEntries:c,toStringDefaults:f}){this.compat=Array.isArray(t)?gm(t,"compat"):t?gm(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=s?ZA:{},this.tags=gm(n,this.name,a),this.toStringOptions=f??null,Object.defineProperty(this,Er,{value:$l}),Object.defineProperty(this,Wi,{value:qf}),Object.defineProperty(this,zl,{value:Fl}),this.sortMapEntries=typeof c=="function"?c:c===!0?JA:null}clone(){const t=Object.create(F1.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function eO(e,t){var d;const n=[];let a=t.directives===!0;if(t.directives!==!1&&e.directives){const m=e.directives.toString(e);m?(n.push(m),a=!0):e.directives.docStart&&(a=!0)}a&&n.push("---");const s=v1(e,t),{commentString:o}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const m=o(e.commentBefore);n.unshift(Na(m,""))}let c=!1,f=null;if(e.contents){if(jt(e.contents)){if(e.contents.spaceBefore&&a&&n.push(""),e.contents.commentBefore){const g=o(e.contents.commentBefore);n.push(Na(g,""))}s.forceBlockIndent=!!e.comment,f=e.contents.comment}const m=f?void 0:()=>c=!0;let y=Al(e.contents,s,()=>f=null,m);f&&(y+=Wr(y,"",o(f))),(y[0]==="|"||y[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${y}`:n.push(y)}else n.push(Al(e.contents,s));if((d=e.directives)!=null&&d.docEnd)if(e.comment){const m=o(e.comment);m.includes(`
|
|
404
|
+
`)?(n.push("..."),n.push(Na(m,""))):n.push(`... ${m}`)}else n.push("...");else{let m=e.comment;m&&c&&(m=m.replace(/^\n+/,"")),m&&((!c||f)&&n[n.length-1]!==""&&n.push(""),n.push(Na(o(m),"")))}return n.join(`
|
|
405
|
+
`)+`
|
|
406
|
+
`}class Pl{constructor(t,n,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Si,{value:cp});let s=null;typeof n=="function"||Array.isArray(n)?s=n:a===void 0&&n&&(a=n,n=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},a);this.options=o;let{version:c}=o;a!=null&&a._directives?(this.directives=a._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new Nn({version:c}),this.setSchema(c,a),this.contents=t===void 0?null:this.createNode(t,s,a)}clone(){const t=Object.create(Pl.prototype,{[Si]:{value:cp}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=jt(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){nl(this.contents)&&this.contents.add(t)}addIn(t,n){nl(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const a=p1(this);t.anchor=!n||a.has(n)?g1(n||"a",a):n}return new Uf(t.anchor)}createNode(t,n,a){let s;if(typeof n=="function")t=n.call({"":t},"",t),s=n;else if(Array.isArray(n)){const k=A=>typeof A=="number"||A instanceof String||A instanceof Number,_=n.filter(k).map(String);_.length>0&&(n=n.concat(_)),s=n}else a===void 0&&n&&(a=n,n=void 0);const{aliasDuplicateObjects:o,anchorPrefix:c,flow:f,keepUndefined:d,onTagObj:m,tag:y}=a??{},{onAnchor:g,setAnchors:x,sourceObjects:v}=CA(this,c||"a"),S={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:g,onTagObj:m,replacer:s,schema:this.schema,sourceObjects:v},w=lc(t,y,S);return f&&Mt(w)&&(w.flow=!0),x(),w}createPair(t,n,a={}){const s=this.createNode(t,null,a),o=this.createNode(n,null,a);return new gn(s,o)}delete(t){return nl(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Wo(t)?this.contents==null?!1:(this.contents=null,!0):nl(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Mt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Wo(t)?!n&&vt(this.contents)?this.contents.value:this.contents:Mt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Mt(this.contents)?this.contents.has(t):!1}hasIn(t){return Wo(t)?this.contents!==void 0:Mt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Ef(this.schema,[t],n):nl(this.contents)&&this.contents.set(t,n)}setIn(t,n){Wo(t)?this.contents=n:this.contents==null?this.contents=Ef(this.schema,Array.from(t),n):nl(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let a;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Nn({version:"1.1"}),a={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Nn({version:t}),a={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,a=null;break;default:{const s=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(a)this.schema=new $1(Object.assign(a,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:a,maxAliasCount:s,onAnchor:o,reviver:c}={}){const f={anchors:new Map,doc:this,keep:!t,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},d=vi(this.contents,n??"",f);if(typeof o=="function")for(const{count:m,res:y}of f.anchors.values())o(y,m);return typeof c=="function"?fl(c,{"":d},"",d):d}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return eO(this,t)}}function nl(e){if(Mt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class ag extends Error{constructor(t,n,a,s){super(),this.name=t,this.code=a,this.message=s,this.pos=n}}class Jr extends ag{constructor(t,n,a){super("YAMLParseError",t,n,a)}}class P1 extends ag{constructor(t,n,a){super("YAMLWarning",t,n,a)}}const wf=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(f=>t.linePos(f));const{line:a,col:s}=n.linePos[0];n.message+=` at line ${a}, column ${s}`;let o=s-1,c=e.substring(t.lineStarts[a-1],t.lineStarts[a]).replace(/[\n\r]+$/,"");if(o>=60&&c.length>80){const f=Math.min(o-39,c.length-79);c="…"+c.substring(f),o-=f-1}if(c.length>80&&(c=c.substring(0,79)+"…"),a>1&&/^ *$/.test(c.substring(0,o))){let f=e.substring(t.lineStarts[a-2],t.lineStarts[a-1]);f.length>80&&(f=f.substring(0,79)+`…
|
|
407
|
+
`),c=f+c}if(/[^ ]/.test(c)){let f=1;const d=n.linePos[1];(d==null?void 0:d.line)===a&&d.col>s&&(f=Math.max(1,Math.min(d.col-s,80-o)));const m=" ".repeat(o)+"^".repeat(f);n.message+=`:
|
|
408
|
+
|
|
409
|
+
${c}
|
|
410
|
+
${m}
|
|
411
|
+
`}};function Ol(e,{flow:t,indicator:n,next:a,offset:s,onError:o,parentIndent:c,startOnNewline:f}){let d=!1,m=f,y=f,g="",x="",v=!1,S=!1,w=null,k=null,_=null,A=null,T=null,j=null,F=null;for(const K of e)switch(S&&(K.type!=="space"&&K.type!=="newline"&&K.type!=="comma"&&o(K.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S=!1),w&&(m&&K.type!=="comment"&&K.type!=="newline"&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),K.type){case"space":!t&&(n!=="doc-start"||(a==null?void 0:a.type)!=="flow-collection")&&K.source.includes(" ")&&(w=K),y=!0;break;case"comment":{y||o(K,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const te=K.source.substring(1)||" ";g?g+=x+te:g=te,x="",m=!1;break}case"newline":m?g?g+=K.source:(!j||n!=="seq-item-ind")&&(d=!0):x+=K.source,m=!0,v=!0,(k||_)&&(A=K),y=!0;break;case"anchor":k&&o(K,"MULTIPLE_ANCHORS","A node can have at most one anchor"),K.source.endsWith(":")&&o(K.offset+K.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=K,F??(F=K.offset),m=!1,y=!1,S=!0;break;case"tag":{_&&o(K,"MULTIPLE_TAGS","A node can have at most one tag"),_=K,F??(F=K.offset),m=!1,y=!1,S=!0;break}case n:(k||_)&&o(K,"BAD_PROP_ORDER",`Anchors and tags must be after the ${K.source} indicator`),j&&o(K,"UNEXPECTED_TOKEN",`Unexpected ${K.source} in ${t??"collection"}`),j=K,m=n==="seq-item-ind"||n==="explicit-key-ind",y=!1;break;case"comma":if(t){T&&o(K,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),T=K,m=!1,y=!1;break}default:o(K,"UNEXPECTED_TOKEN",`Unexpected ${K.type} token`),m=!1,y=!1}const M=e[e.length-1],q=M?M.offset+M.source.length:s;return S&&a&&a.type!=="space"&&a.type!=="newline"&&a.type!=="comma"&&(a.type!=="scalar"||a.source!=="")&&o(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(m&&w.indent<=c||(a==null?void 0:a.type)==="block-map"||(a==null?void 0:a.type)==="block-seq")&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:j,spaceBefore:d,comment:g,hasNewline:v,anchor:k,tag:_,newlineAfterProp:A,end:q,start:F??q}}function oc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
412
|
+
`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(oc(t.key)||oc(t.value))return!0}return!1;default:return!0}}function hp(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&oc(t)&&n(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function q1(e,t,n){const{uniqueKeys:a}=e.options;if(a===!1)return!1;const s=typeof a=="function"?a:(o,c)=>o===c||vt(o)&&vt(c)&&o.value===c.value;return t.some(o=>s(o.key,n))}const Yv="All mapping items must start at the same column";function tO({composeNode:e,composeEmptyNode:t},n,a,s,o){var y;const c=(o==null?void 0:o.nodeClass)??ii,f=new c(n.schema);n.atRoot&&(n.atRoot=!1);let d=a.offset,m=null;for(const g of a.items){const{start:x,key:v,sep:S,value:w}=g,k=Ol(x,{indicator:"explicit-key-ind",next:v??(S==null?void 0:S[0]),offset:d,onError:s,parentIndent:a.indent,startOnNewline:!0}),_=!k.found;if(_){if(v&&(v.type==="block-seq"?s(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==a.indent&&s(d,"BAD_INDENT",Yv)),!k.anchor&&!k.tag&&!S){m=k.end,k.comment&&(f.comment?f.comment+=`
|
|
413
|
+
`+k.comment:f.comment=k.comment);continue}(k.newlineAfterProp||oc(v))&&s(v??x[x.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((y=k.found)==null?void 0:y.indent)!==a.indent&&s(d,"BAD_INDENT",Yv);n.atKey=!0;const A=k.end,T=v?e(n,v,k,s):t(n,A,x,null,k,s);n.schema.compat&&hp(a.indent,v,s),n.atKey=!1,q1(n,f.items,T)&&s(A,"DUPLICATE_KEY","Map keys must be unique");const j=Ol(S??[],{indicator:"map-value-ind",next:w,offset:T.range[2],onError:s,parentIndent:a.indent,startOnNewline:!v||v.type==="block-scalar"});if(d=j.end,j.found){_&&((w==null?void 0:w.type)==="block-map"&&!j.hasNewline&&s(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&k.start<j.found.offset-1024&&s(T.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const F=w?e(n,w,j,s):t(n,d,S,null,j,s);n.schema.compat&&hp(a.indent,w,s),d=F.range[2];const M=new gn(T,F);n.options.keepSourceTokens&&(M.srcToken=g),f.items.push(M)}else{_&&s(T.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),j.comment&&(T.comment?T.comment+=`
|
|
414
|
+
`+j.comment:T.comment=j.comment);const F=new gn(T);n.options.keepSourceTokens&&(F.srcToken=g),f.items.push(F)}}return m&&m<d&&s(m,"IMPOSSIBLE","Map comment with trailing content"),f.range=[a.offset,d,m??d],f}function nO({composeNode:e,composeEmptyNode:t},n,a,s,o){const c=(o==null?void 0:o.nodeClass)??Sr,f=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=a.offset,m=null;for(const{start:y,value:g}of a.items){const x=Ol(y,{indicator:"seq-item-ind",next:g,offset:d,onError:s,parentIndent:a.indent,startOnNewline:!0});if(!x.found)if(x.anchor||x.tag||g)(g==null?void 0:g.type)==="block-seq"?s(x.end,"BAD_INDENT","All sequence items must start at the same column"):s(d,"MISSING_CHAR","Sequence item without - indicator");else{m=x.end,x.comment&&(f.comment=x.comment);continue}const v=g?e(n,g,x,s):t(n,x.end,y,null,x,s);n.schema.compat&&hp(a.indent,g,s),d=v.range[2],f.items.push(v)}return f.range=[a.offset,d,m??d],f}function Sc(e,t,n,a){let s="";if(e){let o=!1,c="";for(const f of e){const{source:d,type:m}=f;switch(m){case"space":o=!0;break;case"comment":{n&&!o&&a(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const y=d.substring(1)||" ";s?s+=c+y:s=y,c="";break}case"newline":s&&(c+=d),o=!0;break;default:a(f,"UNEXPECTED_TOKEN",`Unexpected ${m} at node end`)}t+=d.length}}return{comment:s,offset:t}}const bm="Block collections are not allowed within flow collections",ym=e=>e&&(e.type==="block-map"||e.type==="block-seq");function iO({composeNode:e,composeEmptyNode:t},n,a,s,o){var k;const c=a.start.source==="{",f=c?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(c?ii:Sr),m=new d(n.schema);m.flow=!0;const y=n.atRoot;y&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let g=a.offset+a.start.source.length;for(let _=0;_<a.items.length;++_){const A=a.items[_],{start:T,key:j,sep:F,value:M}=A,q=Ol(T,{flow:f,indicator:"explicit-key-ind",next:j??(F==null?void 0:F[0]),offset:g,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!q.found){if(!q.anchor&&!q.tag&&!F&&!M){_===0&&q.comma?s(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):_<a.items.length-1&&s(q.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),q.comment&&(m.comment?m.comment+=`
|
|
415
|
+
`+q.comment:m.comment=q.comment),g=q.end;continue}!c&&n.options.strict&&oc(j)&&s(j,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)q.comma&&s(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(q.comma||s(q.start,"MISSING_CHAR",`Missing , between ${f} items`),q.comment){let K="";e:for(const te of T)switch(te.type){case"comma":case"space":break;case"comment":K=te.source.substring(1);break e;default:break e}if(K){let te=m.items[m.items.length-1];At(te)&&(te=te.value??te.key),te.comment?te.comment+=`
|
|
416
|
+
`+K:te.comment=K,q.comment=q.comment.substring(K.length+1)}}if(!c&&!F&&!q.found){const K=M?e(n,M,q,s):t(n,q.end,F,null,q,s);m.items.push(K),g=K.range[2],ym(M)&&s(K.range,"BLOCK_IN_FLOW",bm)}else{n.atKey=!0;const K=q.end,te=j?e(n,j,q,s):t(n,K,T,null,q,s);ym(j)&&s(te.range,"BLOCK_IN_FLOW",bm),n.atKey=!1;const D=Ol(F??[],{flow:f,indicator:"map-value-ind",next:M,offset:te.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(D.found){if(!c&&!q.found&&n.options.strict){if(F)for(const re of F){if(re===D.found)break;if(re.type==="newline"){s(re,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}q.start<D.found.offset-1024&&s(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else M&&("source"in M&&((k=M.source)==null?void 0:k[0])===":"?s(M,"MISSING_CHAR",`Missing space after : in ${f}`):s(D.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const P=M?e(n,M,D,s):D.found?t(n,D.end,F,null,D,s):null;P?ym(M)&&s(P.range,"BLOCK_IN_FLOW",bm):D.comment&&(te.comment?te.comment+=`
|
|
417
|
+
`+D.comment:te.comment=D.comment);const J=new gn(te,P);if(n.options.keepSourceTokens&&(J.srcToken=A),c){const re=m;q1(n,re.items,te)&&s(K,"DUPLICATE_KEY","Map keys must be unique"),re.items.push(J)}else{const re=new ii(n.schema);re.flow=!0,re.items.push(J);const Q=(P??te).range;re.range=[te.range[0],Q[1],Q[2]],m.items.push(re)}g=P?P.range[2]:D.end}}const x=c?"}":"]",[v,...S]=a.end;let w=g;if((v==null?void 0:v.source)===x)w=v.offset+v.source.length;else{const _=f[0].toUpperCase()+f.substring(1),A=y?`${_} must end with a ${x}`:`${_} in block collection must be sufficiently indented and end with a ${x}`;s(g,y?"MISSING_CHAR":"BAD_INDENT",A),v&&v.source.length!==1&&S.unshift(v)}if(S.length>0){const _=Sc(S,w,n.options.strict,s);_.comment&&(m.comment?m.comment+=`
|
|
418
|
+
`+_.comment:m.comment=_.comment),m.range=[a.offset,w,_.offset]}else m.range=[a.offset,w,w];return m}function xm(e,t,n,a,s,o){const c=n.type==="block-map"?tO(e,t,n,a,o):n.type==="block-seq"?nO(e,t,n,a,o):iO(e,t,n,a,o),f=c.constructor;return s==="!"||s===f.tagName?(c.tag=f.tagName,c):(s&&(c.tag=s),c)}function aO(e,t,n,a,s){var x;const o=a.tag,c=o?t.directives.tagName(o.source,v=>s(o,"TAG_RESOLVE_FAILED",v)):null;if(n.type==="block-seq"){const{anchor:v,newlineAfterProp:S}=a,w=v&&o?v.offset>o.offset?v:o:v??o;w&&(!S||S.offset<w.offset)&&s(w,"MISSING_CHAR","Missing newline after block sequence props")}const f=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!c||c==="!"||c===ii.tagName&&f==="map"||c===Sr.tagName&&f==="seq")return xm(e,t,n,s,c);let d=t.schema.tags.find(v=>v.tag===c&&v.collection===f);if(!d){const v=t.schema.knownTags[c];if((v==null?void 0:v.collection)===f)t.schema.tags.push(Object.assign({},v,{default:!1})),d=v;else return v?s(o,"BAD_COLLECTION_TYPE",`${v.tag} used for ${f} collection, but expects ${v.collection??"scalar"}`,!0):s(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),xm(e,t,n,s,c)}const m=xm(e,t,n,s,c,d),y=((x=d.resolve)==null?void 0:x.call(d,m,v=>s(o,"TAG_RESOLVE_FAILED",v),t.options))??m,g=jt(y)?y:new ze(y);return g.range=m.range,g.tag=c,d!=null&&d.format&&(g.format=d.format),g}function H1(e,t,n){const a=t.offset,s=rO(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[a,a,a]};const o=s.mode===">"?ze.BLOCK_FOLDED:ze.BLOCK_LITERAL,c=t.source?sO(t.source):[];let f=c.length;for(let w=c.length-1;w>=0;--w){const k=c[w][1];if(k===""||k==="\r")f=w;else break}if(f===0){const w=s.chomp==="+"&&c.length>0?`
|
|
419
|
+
`.repeat(Math.max(1,c.length-1)):"";let k=a+s.length;return t.source&&(k+=t.source.length),{value:w,type:o,comment:s.comment,range:[a,k,k]}}let d=t.indent+s.indent,m=t.offset+s.length,y=0;for(let w=0;w<f;++w){const[k,_]=c[w];if(_===""||_==="\r")s.indent===0&&k.length>d&&(d=k.length);else{k.length<d&&n(m+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(d=k.length),y=w,d===0&&!e.atRoot&&n(m,"BAD_INDENT","Block scalar values in collections must be indented");break}m+=k.length+_.length+1}for(let w=c.length-1;w>=f;--w)c[w][0].length>d&&(f=w+1);let g="",x="",v=!1;for(let w=0;w<y;++w)g+=c[w][0].slice(d)+`
|
|
420
|
+
`;for(let w=y;w<f;++w){let[k,_]=c[w];m+=k.length+_.length+1;const A=_[_.length-1]==="\r";if(A&&(_=_.slice(0,-1)),_&&k.length<d){const j=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(m-_.length-(A?2:1),"BAD_INDENT",j),k=""}o===ze.BLOCK_LITERAL?(g+=x+k.slice(d)+_,x=`
|
|
421
|
+
`):k.length>d||_[0]===" "?(x===" "?x=`
|
|
422
|
+
`:!v&&x===`
|
|
423
|
+
`&&(x=`
|
|
424
|
+
|
|
425
|
+
`),g+=x+k.slice(d)+_,x=`
|
|
426
|
+
`,v=!0):_===""?x===`
|
|
427
|
+
`?g+=`
|
|
428
|
+
`:x=`
|
|
429
|
+
`:(g+=x+_,x=" ",v=!1)}switch(s.chomp){case"-":break;case"+":for(let w=f;w<c.length;++w)g+=`
|
|
430
|
+
`+c[w][0].slice(d);g[g.length-1]!==`
|
|
431
|
+
`&&(g+=`
|
|
432
|
+
`);break;default:g+=`
|
|
433
|
+
`}const S=a+s.length+t.source.length;return{value:g,type:o,comment:s.comment,range:[a,S,S]}}function rO({offset:e,props:t},n,a){if(t[0].type!=="block-scalar-header")return a(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],o=s[0];let c=0,f="",d=-1;for(let x=1;x<s.length;++x){const v=s[x];if(!f&&(v==="-"||v==="+"))f=v;else{const S=Number(v);!c&&S?c=S:d===-1&&(d=e+x)}}d!==-1&&a(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let m=!1,y="",g=s.length;for(let x=1;x<t.length;++x){const v=t[x];switch(v.type){case"space":m=!0;case"newline":g+=v.source.length;break;case"comment":n&&!m&&a(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),g+=v.source.length,y=v.source.substring(1);break;case"error":a(v,"UNEXPECTED_TOKEN",v.message),g+=v.source.length;break;default:{const S=`Unexpected token in block scalar header: ${v.type}`;a(v,"UNEXPECTED_TOKEN",S);const w=v.source;w&&typeof w=="string"&&(g+=w.length)}}}return{mode:o,indent:c,chomp:f,comment:y,length:g}}function sO(e){const t=e.split(/\n( *)/),n=t[0],a=n.match(/^( *)/),o=[a!=null&&a[1]?[a[1],n.slice(a[1].length)]:["",n]];for(let c=1;c<t.length;c+=2)o.push([t[c],t[c+1]]);return o}function K1(e,t,n){const{offset:a,type:s,source:o,end:c}=e;let f,d;const m=(x,v,S)=>n(a+x,v,S);switch(s){case"scalar":f=ze.PLAIN,d=lO(o,m);break;case"single-quoted-scalar":f=ze.QUOTE_SINGLE,d=oO(o,m);break;case"double-quoted-scalar":f=ze.QUOTE_DOUBLE,d=cO(o,m);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[a,a+o.length,a+o.length]}}const y=a+o.length,g=Sc(c,y,t,n);return{value:d,type:f,comment:g.comment,range:[a,y,g.offset]}}function lO(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),G1(e)}function oO(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),G1(e.slice(1,-1)).replace(/''/g,"'")}function G1(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
434
|
+
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
435
|
+
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let a=t.exec(e);if(!a)return e;let s=a[1],o=" ",c=t.lastIndex;for(n.lastIndex=c;a=n.exec(e);)a[1]===""?o===`
|
|
436
|
+
`?s+=o:o=`
|
|
437
|
+
`:(s+=o+a[1],o=" "),c=n.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=c,a=f.exec(e),s+o+((a==null?void 0:a[1])??"")}function cO(e,t){let n="";for(let a=1;a<e.length-1;++a){const s=e[a];if(!(s==="\r"&&e[a+1]===`
|
|
438
|
+
`))if(s===`
|
|
439
|
+
`){const{fold:o,offset:c}=uO(e,a);n+=o,a=c}else if(s==="\\"){let o=e[++a];const c=fO[o];if(c)n+=c;else if(o===`
|
|
440
|
+
`)for(o=e[a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="\r"&&e[a+1]===`
|
|
441
|
+
`)for(o=e[++a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];n+=dO(e,a+1,f,t),a+=f}else{const f=e.substr(a-1,2);t(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),n+=f}}else if(s===" "||s===" "){const o=a;let c=e[a+1];for(;c===" "||c===" ";)c=e[++a+1];c!==`
|
|
442
|
+
`&&!(c==="\r"&&e[a+2]===`
|
|
443
|
+
`)&&(n+=a>o?e.slice(o,a+1):s)}else n+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function uO(e,t){let n="",a=e[t+1];for(;(a===" "||a===" "||a===`
|
|
444
|
+
`||a==="\r")&&!(a==="\r"&&e[t+2]!==`
|
|
445
|
+
`);)a===`
|
|
446
|
+
`&&(n+=`
|
|
447
|
+
`),t+=1,a=e[t+1];return n||(n=" "),{fold:n,offset:t}}const fO={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
448
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function dO(e,t,n,a){const s=e.substr(t,n),c=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(c)){const f=e.substr(t-2,n+2);return a(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(c)}function Q1(e,t,n,a){const{value:s,type:o,comment:c,range:f}=t.type==="block-scalar"?H1(e,t,a):K1(t,e.options.strict,a),d=n?e.directives.tagName(n.source,g=>a(n,"TAG_RESOLVE_FAILED",g)):null;let m;e.options.stringKeys&&e.atKey?m=e.schema[Wi]:d?m=hO(e.schema,s,d,n,a):t.type==="scalar"?m=mO(e,s,t,a):m=e.schema[Wi];let y;try{const g=m.resolve(s,x=>a(n??t,"TAG_RESOLVE_FAILED",x),e.options);y=vt(g)?g:new ze(g)}catch(g){const x=g instanceof Error?g.message:String(g);a(n??t,"TAG_RESOLVE_FAILED",x),y=new ze(s)}return y.range=f,y.source=s,o&&(y.type=o),d&&(y.tag=d),m.format&&(y.format=m.format),c&&(y.comment=c),y}function hO(e,t,n,a,s){var f;if(n==="!")return e[Wi];const o=[];for(const d of e.tags)if(!d.collection&&d.tag===n)if(d.default&&d.test)o.push(d);else return d;for(const d of o)if((f=d.test)!=null&&f.test(t))return d;const c=e.knownTags[n];return c&&!c.collection?(e.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(s(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Wi])}function mO({atKey:e,directives:t,schema:n},a,s,o){const c=n.tags.find(f=>{var d;return(f.default===!0||e&&f.default==="key")&&((d=f.test)==null?void 0:d.test(a))})||n[Wi];if(n.compat){const f=n.compat.find(d=>{var m;return d.default&&((m=d.test)==null?void 0:m.test(a))})??n[Wi];if(c.tag!==f.tag){const d=t.tagString(c.tag),m=t.tagString(f.tag),y=`Value may be parsed as either ${d} or ${m}`;o(s,"TAG_RESOLVE_FAILED",y,!0)}}return c}function pO(e,t,n){if(t){n??(n=t.length);for(let a=n-1;a>=0;--a){let s=t[a];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++a];(s==null?void 0:s.type)==="space";)e+=s.source.length,s=t[++a];break}}return e}const gO={composeNode:Y1,composeEmptyNode:rg};function Y1(e,t,n,a){const s=e.atKey,{spaceBefore:o,comment:c,anchor:f,tag:d}=n;let m,y=!0;switch(t.type){case"alias":m=bO(e,t,a),(f||d)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":m=Q1(e,t,d,a),f&&(m.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{m=aO(gO,e,t,n,a),f&&(m.anchor=f.source.substring(1))}catch(g){const x=g instanceof Error?g.message:String(g);a(t,"RESOURCE_EXHAUSTION",x)}break;default:{const g=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;a(t,"UNEXPECTED_TOKEN",g),y=!1}}return m??(m=rg(e,t.offset,void 0,null,n,a)),f&&m.anchor===""&&a(f,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!vt(m)||typeof m.value!="string"||m.tag&&m.tag!=="tag:yaml.org,2002:str")&&a(d??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(m.spaceBefore=!0),c&&(t.type==="scalar"&&t.source===""?m.comment=c:m.commentBefore=c),e.options.keepSourceTokens&&y&&(m.srcToken=t),m}function rg(e,t,n,a,{spaceBefore:s,comment:o,anchor:c,tag:f,end:d},m){const y={type:"scalar",offset:pO(t,n,a),indent:-1,source:""},g=Q1(e,y,f,m);return c&&(g.anchor=c.source.substring(1),g.anchor===""&&m(c,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(g.spaceBefore=!0),o&&(g.comment=o,g.range[2]=d),g}function bO({options:e},{offset:t,source:n,end:a},s){const o=new Uf(n.substring(1));o.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&s(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+n.length,f=Sc(a,c,e.strict,s);return o.range=[t,c,f.offset],f.comment&&(o.comment=f.comment),o}function yO(e,t,{offset:n,start:a,value:s,end:o},c){const f=Object.assign({_directives:t},e),d=new Pl(void 0,f),m={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},y=Ol(a,{indicator:"doc-start",next:s??(o==null?void 0:o[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});y.found&&(d.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!y.hasNewline&&c(y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=s?Y1(m,s,y,c):rg(m,y.end,a,null,y,c);const g=d.contents.range[2],x=Sc(o,g,!1,c);return x.comment&&(d.comment=x.comment),d.range=[n,g,x.offset],d}function Ho(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function Vv(e){var s;let t="",n=!1,a=!1;for(let o=0;o<e.length;++o){const c=e[o];switch(c[0]){case"#":t+=(t===""?"":a?`
|
|
449
|
+
|
|
450
|
+
`:`
|
|
451
|
+
`)+(c.substring(1)||" "),n=!0,a=!1;break;case"%":((s=e[o+1])==null?void 0:s[0])!=="#"&&(o+=1),n=!1;break;default:n||(a=!0),n=!1}}return{comment:t,afterEmptyLine:a}}class sg{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,a,s,o)=>{const c=Ho(n);o?this.warnings.push(new P1(c,a,s)):this.errors.push(new Jr(c,a,s))},this.directives=new Nn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:a,afterEmptyLine:s}=Vv(this.prelude);if(a){const o=t.contents;if(n)t.comment=t.comment?`${t.comment}
|
|
452
|
+
${a}`:a;else if(s||t.directives.docStart||!o)t.commentBefore=a;else if(Mt(o)&&!o.flow&&o.items.length>0){let c=o.items[0];At(c)&&(c=c.key);const f=c.commentBefore;c.commentBefore=f?`${a}
|
|
453
|
+
${f}`:a}else{const c=o.commentBefore;o.commentBefore=c?`${a}
|
|
454
|
+
${c}`:a}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Vv(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,a=-1){for(const s of t)yield*this.next(s);yield*this.end(n,a)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,a,s)=>{const o=Ho(t);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",a,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=yO(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,a=new Jr(Ho(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(a):this.doc.errors.push(a);break}case"doc-end":{if(!this.doc){const a="Unexpected doc-end without preceding document";this.errors.push(new Jr(Ho(t),"UNEXPECTED_TOKEN",a));break}this.doc.directives.docEnd=!0;const n=Sc(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const a=this.doc.comment;this.doc.comment=a?`${a}
|
|
455
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Jr(Ho(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const a=Object.assign({_directives:this.directives},this.options),s=new Pl(void 0,a);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}function xO(e,t=!0,n){if(e){const a=(s,o,c)=>{const f=typeof s=="number"?s:Array.isArray(s)?s[0]:s.offset;if(n)n(f,o,c);else throw new Jr([f,f+1],o,c)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return K1(e,t,a);case"block-scalar":return H1({options:{strict:t}},e,a)}}return null}function vO(e,t){const{implicitKey:n=!1,indent:a,inFlow:s=!1,offset:o=-1,type:c="PLAIN"}=t,f=vc({type:c,value:e},{implicitKey:n,indent:a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),d=t.end??[{type:"newline",offset:-1,indent:a,source:`
|
|
456
|
+
`}];switch(f[0]){case"|":case">":{const m=f.indexOf(`
|
|
457
|
+
`),y=f.substring(0,m),g=f.substring(m+1)+`
|
|
458
|
+
`,x=[{type:"block-scalar-header",offset:o,indent:a,source:y}];return V1(x,d)||x.push({type:"newline",offset:-1,indent:a,source:`
|
|
459
|
+
`}),{type:"block-scalar",offset:o,indent:a,props:x,source:g}}case'"':return{type:"double-quoted-scalar",offset:o,indent:a,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:a,source:f,end:d};default:return{type:"scalar",offset:o,indent:a,source:f,end:d}}}function EO(e,t,n={}){let{afterKey:a=!1,implicitKey:s=!1,inFlow:o=!1,type:c}=n,f="indent"in e?e.indent:null;if(a&&typeof f=="number"&&(f+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const m=e.props[0];if(m.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=m.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const d=vc({type:c,value:t},{implicitKey:s||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":SO(e,d);break;case'"':vm(e,d,"double-quoted-scalar");break;case"'":vm(e,d,"single-quoted-scalar");break;default:vm(e,d,"scalar")}}function SO(e,t){const n=t.indexOf(`
|
|
460
|
+
`),a=t.substring(0,n),s=t.substring(n+1)+`
|
|
461
|
+
`;if(e.type==="block-scalar"){const o=e.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=a,e.source=s}else{const{offset:o}=e,c="indent"in e?e.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:c,source:a}];V1(f,"end"in e?e.end:void 0)||f.push({type:"newline",offset:-1,indent:c,source:`
|
|
462
|
+
`});for(const d of Object.keys(e))d!=="type"&&d!=="offset"&&delete e[d];Object.assign(e,{type:"block-scalar",indent:c,props:f,source:s})}}function V1(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function vm(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const a=e.props.slice(1);let s=t.length;e.props[0].type==="block-scalar-header"&&(s-=e.props[0].source.length);for(const o of a)o.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:a});break}case"block-map":case"block-seq":{const s={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
|
|
463
|
+
`};delete e.items,Object.assign(e,{type:n,source:t,end:[s]});break}default:{const a="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(e))o!=="type"&&o!=="offset"&&delete e[o];Object.assign(e,{type:n,indent:a,source:t,end:s})}}}const wO=e=>"type"in e?_f(e):mf(e);function _f(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=_f(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=mf(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=mf(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=mf(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function mf({start:e,key:t,sep:n,value:a}){let s="";for(const o of e)s+=o.source;if(t&&(s+=_f(t)),n)for(const o of n)s+=o.source;return a&&(s+=_f(a)),s}const mp=Symbol("break visit"),_O=Symbol("skip children"),X1=Symbol("remove item");function us(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),W1(Object.freeze([]),e,t)}us.BREAK=mp;us.SKIP=_O;us.REMOVE=X1;us.itemAtPath=(e,t)=>{let n=e;for(const[a,s]of t){const o=n==null?void 0:n[a];if(o&&"items"in o)n=o.items[s];else return}return n};us.parentCollection=(e,t)=>{const n=us.itemAtPath(e,t.slice(0,-1)),a=t[t.length-1][0],s=n==null?void 0:n[a];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function W1(e,t,n){let a=n(t,e);if(typeof a=="symbol")return a;for(const s of["key","value"]){const o=t[s];if(o&&"items"in o){for(let c=0;c<o.items.length;++c){const f=W1(Object.freeze(e.concat([[s,c]])),o.items[c],n);if(typeof f=="number")c=f-1;else{if(f===mp)return mp;f===X1&&(o.items.splice(c,1),c-=1)}}typeof a=="function"&&s==="key"&&(a=a(t,e))}}return typeof a=="function"?a(t,e):a}const Yf="\uFEFF",Vf="",Xf="",cc="",kO=e=>!!e&&"items"in e,NO=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function TO(e){switch(e){case Yf:return"<BOM>";case Vf:return"<DOC>";case Xf:return"<FLOW_END>";case cc:return"<SCALAR>";default:return JSON.stringify(e)}}function Z1(e){switch(e){case Yf:return"byte-order-mark";case Vf:return"doc-mode";case Xf:return"flow-error-end";case cc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
464
|
+
`:case`\r
|
|
465
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const CO=Object.freeze(Object.defineProperty({__proto__:null,BOM:Yf,DOCUMENT:Vf,FLOW_END:Xf,SCALAR:cc,createScalarToken:vO,isCollection:kO,isScalar:NO,prettyToken:TO,resolveAsScalar:xO,setScalarValue:EO,stringify:wO,tokenType:Z1,visit:us},Symbol.toStringTag,{value:"Module"}));function Ai(e){switch(e){case void 0:case" ":case`
|
|
466
|
+
`:case"\r":case" ":return!0;default:return!1}}const Xv=new Set("0123456789ABCDEFabcdef"),AO=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Vu=new Set(",[]{}"),OO=new Set(` ,[]{}
|
|
467
|
+
\r `),Em=e=>!e||OO.has(e);class J1{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let a=this.next??"stream";for(;a&&(n||this.hasChars(1));)a=yield*this.parseNext(a)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
|
|
468
|
+
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
469
|
+
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let a=0;for(;n===" ";)n=this.buffer[++a+t];if(n==="\r"){const s=this.buffer[a+t+1];if(s===`
|
|
470
|
+
`||!s&&!this.atEnd)return t+a+1}return n===`
|
|
471
|
+
`||a>=this.indentNext||!n&&!this.atEnd?t+a:-1}if(n==="-"||n==="."){const a=this.buffer.substr(t,3);if((a==="---"||a==="...")&&Ai(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
|
|
472
|
+
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Yf&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,a=t.indexOf("#");for(;a!==-1;){const o=t[a-1];if(o===" "||o===" "){n=a-1;break}else a=t.indexOf("#",a+1)}for(;;){const o=t[n-1];if(o===" "||o===" ")n-=1;else break}const s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Vf,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&Ai(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ai(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Ai(n)){const a=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=a,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Em),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,a=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=a=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((a!==-1&&a<this.indentNext&&s[0]!=="#"||a===0&&(s.startsWith("---")||s.startsWith("..."))&&Ai(s[3]))&&!(a===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield Xf,yield*this.parseLineStart();let o=0;for(;s[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),s[o]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Em),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||Ai(c)||c===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let o=0;for(;this.buffer[n-1-o]==="\\";)o+=1;if(o%2===0)break;n=this.buffer.indexOf('"',n+1)}const a=this.buffer.substring(0,n);let s=a.indexOf(`
|
|
473
|
+
`,this.pos);if(s!==-1){for(;s!==-1;){const o=this.continueScalar(s+1);if(o===-1)break;s=a.indexOf(`
|
|
474
|
+
`,o)}s!==-1&&(n=s-(a[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>Ai(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,a;e:for(let o=this.pos;a=this.buffer[o];++o)switch(a){case" ":n+=1;break;case`
|
|
475
|
+
`:t=o,n=0;break;case"\r":{const c=this.buffer[o+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
|
|
476
|
+
`)break}default:break e}if(!a&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(t+1);if(o===-1)break;t=this.buffer.indexOf(`
|
|
477
|
+
`,o)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let s=t+1;for(a=this.buffer[s];a===" ";)a=this.buffer[++s];if(a===" "){for(;a===" "||a===" "||a==="\r"||a===`
|
|
478
|
+
`;)a=this.buffer[++s];t=s-1}else if(!this.blockScalarKeep)do{let o=t-1,c=this.buffer[o];c==="\r"&&(c=this.buffer[--o]);const f=o;for(;c===" ";)c=this.buffer[--o];if(c===`
|
|
479
|
+
`&&o>=this.pos&&o+1+n>f)t=o;else break}while(!0);return yield cc,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,a=this.pos-1,s;for(;s=this.buffer[++a];)if(s===":"){const o=this.buffer[a+1];if(Ai(o)||t&&Vu.has(o))break;n=a}else if(Ai(s)){let o=this.buffer[a+1];if(s==="\r"&&(o===`
|
|
480
|
+
`?(a+=1,s=`
|
|
481
|
+
`,o=this.buffer[a+1]):n=a),o==="#"||t&&Vu.has(o))break;if(s===`
|
|
482
|
+
`){const c=this.continueScalar(a+1);if(c===-1)break;a=Math.max(a,c-2)}}else{if(t&&Vu.has(s))break;n=a}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield cc,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const a=this.buffer.slice(this.pos,t);return a?(yield a,this.pos+=a.length,a.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Em))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(Ai(n)||t&&Vu.has(n))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!Ai(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(AO.has(n))n=this.buffer[++t];else if(n==="%"&&Xv.has(this.buffer[t+1])&&Xv.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
|
|
483
|
+
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
484
|
+
`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,a;do a=this.buffer[++n];while(a===" "||t&&a===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(t){let n=this.pos,a=this.buffer[n];for(;!t(a);)a=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class eS{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,a=this.lineStarts.length;for(;n<a;){const o=n+a>>1;this.lineStarts[o]<t?n=o+1:a=o}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const s=this.lineStarts[n-1];return{line:n,col:t-s+1}}}}function ur(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Wv(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function tS(e){switch(e==null?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Xu(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function il(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function Zv(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!ur(t.start,"explicit-key-ind")&&!ur(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,tS(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class lg{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new J1,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const a of this.lexer.lex(t,n))yield*this.next(a);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=Z1(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const a=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:a,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const a=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in a?a.indent:0:n.type==="flow-collection"&&a.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Zv(n),a.type){case"document":a.value=n;break;case"block-scalar":a.props.push(n);break;case"block-map":{const s=a.items[a.items.length-1];if(s.value){a.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=a.items[a.items.length-1];s.value?a.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{const s=a.items[a.items.length-1];!s||s.value?a.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((a.type==="document"||a.type==="block-map"||a.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&Wv(s.start)===-1&&(n.indent===0||s.start.every(o=>o.type!=="comment"||o.indent<n.indent))&&(a.type==="document"?a.end=s.start:a.items.push({start:s.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{Wv(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const n=Xu(this.peek(2)),a=il(n);let s;t.end?(s=t.end,s.push(this.sourceToken),delete t.end):s=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:a,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
485
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
486
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0,o=Array.isArray(s)?s[s.length-1]:void 0;(o==null?void 0:o.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],o=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const s=!this.onKeyLine&&this.indent===t.indent,o=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(o&&n.sep&&!n.value){const f=[];for(let d=0;d<n.sep.length;++d){const m=n.sep[d];switch(m.type){case"newline":f.push(d);break;case"space":break;case"comment":m.indent>t.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(c=n.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||n.value?(c.push(this.sourceToken),t.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):o||n.value?(c.push(this.sourceToken),t.items.push({start:c,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ur(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(tS(n.key)&&!ur(n.sep,"newline")){const f=il(n.start),d=n.key,m=n.sep;m.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:d,sep:m}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(ur(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const f=il(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?t.items.push({start:c,key:null,sep:[this.sourceToken]}):ur(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||n.value?(t.items.push({start:c,key:f,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(f):(Object.assign(n,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(t);if(f){if(f.type==="block-seq"){if(!n.explicitKey&&n.sep&&!ur(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&t.items.push({start:c});this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const s="end"in n.value?n.value.end:void 0,o=Array.isArray(s)?s[s.length-1]:void 0;(o==null?void 0:o.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],o=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||ur(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const s=this.startBlockValue(t);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let a;do yield*this.pop(),a=this.peek(1);while((a==null?void 0:a.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const a=this.startBlockValue(t);a?this.stack.push(a):(yield*this.pop(),yield*this.step())}else{const a=this.peek(2);if(a.type==="block-map"&&(this.type==="map-value-ind"&&a.indent===t.indent||this.type==="newline"&&!a.items[a.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&a.type!=="flow-collection"){const s=Xu(a),o=il(s);Zv(t);const c=t.end.splice(1,t.end.length);c.push(this.sourceToken);const f={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
487
|
+
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
488
|
+
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Xu(t),a=il(n);return a.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Xu(t),a=il(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(a=>a.type==="newline"||a.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function nS(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new eS||null,prettyErrors:t}}function RO(e,t={}){const{lineCounter:n,prettyErrors:a}=nS(t),s=new lg(n==null?void 0:n.addNewLine),o=new sg(t),c=Array.from(o.compose(s.parse(e)));if(a&&n)for(const f of c)f.errors.forEach(wf(e,n)),f.warnings.forEach(wf(e,n));return c.length>0?c:Object.assign([],{empty:!0},o.streamInfo())}function iS(e,t={}){const{lineCounter:n,prettyErrors:a}=nS(t),s=new lg(n==null?void 0:n.addNewLine),o=new sg(t);let c=null;for(const f of o.compose(s.parse(e),!0,e.length))if(!c)c=f;else if(c.options.logLevel!=="silent"){c.errors.push(new Jr(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&n&&(c.errors.forEach(wf(e,n)),c.warnings.forEach(wf(e,n))),c}function MO(e,t,n){let a;typeof t=="function"?a=t:n===void 0&&t&&typeof t=="object"&&(n=t);const s=iS(e,n);if(!s)return null;if(s.warnings.forEach(o=>E1(s.options.logLevel,o)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:a},n))}function jO(e,t,n){let a=null;if(typeof t=="function"||Array.isArray(t)?a=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(e===void 0){const{keepUndefined:s}=n??t??{};if(!s)return}return hs(e)&&!a?e.toString(n):new Pl(e,a,n).toString(n)}const Jv=Object.freeze(Object.defineProperty({__proto__:null,Alias:Uf,CST:CO,Composer:sg,Document:Pl,Lexer:J1,LineCounter:eS,Pair:gn,Parser:lg,Scalar:ze,Schema:$1,YAMLError:ag,YAMLMap:ii,YAMLParseError:Jr,YAMLSeq:Sr,YAMLWarning:P1,isAlias:kr,isCollection:Mt,isDocument:hs,isMap:Bl,isNode:jt,isPair:At,isScalar:vt,isSeq:Ul,parse:MO,parseAllDocuments:RO,parseDocument:iS,stringify:jO,visit:ms,visitAsync:Bf},Symbol.toStringTag,{value:"Module"}));function DO({projectName:e,file:t,onClose:n,onSaved:a}){const s=qn(),{alert:o}=si(),{data:c,isLoading:f,isError:d,error:m,refetch:y}=st({queryKey:["pipeline-file",e,t],queryFn:()=>sA(e,t)}),[g,x]=R.useState("structured"),[v,S]=R.useState(null),[w,k]=R.useState(null);R.useEffect(()=>{c&&v===null&&(S(c.content),k(c.etag),c.parseError&&x("yaml"))},[c,v]),R.useEffect(()=>{const M=q=>{q.key==="Escape"&&n()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[n]);const _=Pn({mutationFn:()=>{if(v===null||w===null)throw new Error("no draft");return lA(e,t,v,w)},onSuccess:M=>{k(M.etag),s.invalidateQueries({queryKey:["pipeline-file",e,t]}),s.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:M=>{const q=M.status;o({title:q===409?"文件已被其他地方修改":q===422?"YAML 语法错":"保存失败",body:M instanceof Error?M.message:String(M)})}}),A=v!==null&&c&&v!==c.content,{parsed:T,parseError:j}=R.useMemo(()=>{if(v===null)return{parsed:null,parseError:null};try{return{parsed:Jv.parse(v)??{},parseError:null}}catch(M){return{parsed:null,parseError:M instanceof Error?M.message:String(M)}}},[v]),F=M=>{try{const q=Jv.stringify(M,{lineWidth:0});S(q)}catch(q){o({title:"YAML 序列化失败",body:q instanceof Error?q.message:String(q)})}};return h.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:h.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[h.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[h.jsxs("div",{children:[h.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[h.jsx(Fv,{size:20,strokeWidth:2.5}),h.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(c==null?void 0:c.isActive)&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:"active"})]}),h.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:[e,"/pipelines/",t,w&&` · etag ${w}`]})]}),h.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":"关闭",children:h.jsx(Xi,{size:14,strokeWidth:3})})]}),f&&h.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),d&&h.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",m instanceof Error?m.message:String(m)]}),c&&v!==null&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[h.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[h.jsxs("button",{type:"button",onClick:()=>x("structured"),"aria-pressed":g==="structured",disabled:!!j,className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",g==="structured"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]",j?"opacity-50 cursor-not-allowed":""].join(" "),title:j??void 0,children:[h.jsx(Hp,{size:11,strokeWidth:2.5}),"结构化"]}),h.jsxs("button",{type:"button",onClick:()=>x("yaml"),"aria-pressed":g==="yaml",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",g==="yaml"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[h.jsx(Fv,{size:11,strokeWidth:2.5}),"原始 YAML"]})]}),j&&h.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[h.jsx(rc,{size:12,strokeWidth:2.5}),"YAML parse: ",j]}),(c==null?void 0:c.isActive)&&h.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:"⚠ 这是当前激活的 pipeline,保存后下一轮 tick 生效"})]}),h.jsxs("div",{className:"flex-1 overflow-auto",children:[g==="structured"&&T&&h.jsx(LO,{parsed:T,onChange:F}),g==="yaml"&&h.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:v,onChange:M=>S(M.target.value),spellCheck:!1,"aria-label":"pipeline YAML 编辑器"})]}),h.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:A?h.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:"● 未保存"}):_.isSuccess?h.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[h.jsx(If,{size:12,strokeWidth:2.5})," 已保存"]}):"无变化"}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{S(null),y()},disabled:_.isPending,type:"button",children:"重新加载"}),h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>_.mutate(),disabled:!A||_.isPending,type:"button","aria-label":"保存 pipeline",children:[_.isPending?h.jsx(Ut,{size:13,strokeWidth:3,className:"animate-spin"}):h.jsx(zf,{size:13,strokeWidth:3}),"保存"]})]})]})]})]})})}function LO({parsed:e,onChange:t}){const n=e.stages??[],a=d=>{t({...e,stages:d})},s=()=>{a([...n,{name:`stage-${n.length+1}`,on_complete:"move_card Done"}])},o=d=>{a(n.filter((m,y)=>y!==d))},c=(d,m)=>{const y=[...n],g=d+m;g<0||g>=y.length||([y[d],y[g]]=[y[g],y[d]],a(y))},f=(d,m)=>{a(n.map((y,g)=>g===d?{...y,...m}:y))};return h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[h.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[h.jsx("span",{className:"font-bold",children:"mode:"}),h.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:d=>t({...e,mode:d.target.value}),children:[h.jsx("option",{value:"project",children:"project"}),h.jsx("option",{value:"steps",children:"steps"})]})]}),h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"project = 事件驱动流水线(默认) · steps = 顺序脚本"})]}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:["Stages (",n.length,")"]}),h.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:s,"aria-label":"添加 stage",children:[h.jsx(Di,{size:11,strokeWidth:3})," 添加 stage"]})]}),n.length===0?h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:'还没 stage。点"添加 stage"开始。'}):h.jsx("div",{className:"flex flex-col gap-3",children:n.map((d,m)=>h.jsx(IO,{stage:d,index:m,total:n.length,onChange:y=>f(m,y),onRemove:()=>o(m),onMoveUp:()=>c(m,-1),onMoveDown:()=>c(m,1)},m))})]})]})}function IO({stage:e,index:t,total:n,onChange:a,onRemove:s,onMoveUp:o,onMoveDown:c}){const f=e.on_fail??{};return h.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&h.jsx("code",{className:"ml-2 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:e.name})]}),h.jsxs("div",{className:"flex gap-1",children:[h.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:o,disabled:t===0,"aria-label":"上移",children:h.jsx(C2,{size:12,strokeWidth:3})}),h.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:c,disabled:t===n-1,"aria-label":"下移",children:h.jsx(xc,{size:12,strokeWidth:3})}),h.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:s,"aria-label":"删除 stage",children:h.jsx(Il,{size:12,strokeWidth:3})})]})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[h.jsx(lr,{label:"name",hint:"stage 唯一名",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:d=>a({name:d.target.value}),placeholder:"develop"})}),h.jsx(lr,{label:"profile",hint:"skill 画像,可空",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:d=>a({profile:d.target.value||void 0}),placeholder:"fullstack"})}),h.jsx(lr,{label:"card_state",hint:"本 stage 期间卡片状态",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:d=>a({card_state:d.target.value||void 0}),placeholder:"Inprogress"})}),h.jsx(lr,{label:"timeout",hint:"可选,如 30m 2h",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:d=>a({timeout:d.target.value||void 0}),placeholder:"2h"})}),h.jsx(lr,{label:"trigger",hint:"触发条件,可空走默认",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:d=>a({trigger:d.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),h.jsx(lr,{label:"on_complete",hint:"成功后动作",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:d=>a({on_complete:d.target.value}),placeholder:"move_card Done"})})]}),h.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[h.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),h.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[h.jsx(lr,{label:"action",hint:"失败时动作,如 label NEEDS-FIX",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.action??"",onChange:d=>a({on_fail:{...f,action:d.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),h.jsx(lr,{label:"comment",hint:"写进卡片的注释",children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.comment??"",onChange:d=>a({on_fail:{...f,comment:d.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),h.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[h.jsx("input",{type:"checkbox",checked:f.halt??!0,onChange:d=>a({on_fail:{...f,halt:d.target.checked}})}),h.jsx("span",{className:"font-bold",children:"halt"}),h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(失败后停流水线;去掉则继续下一张卡)"})]})]})]})}function lr({label:e,hint:t,children:n}){return h.jsxs("label",{className:"flex flex-col gap-1",children:[h.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),n,t&&h.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t})]})}function zO({onCancel:e,onCreate:t,hasActive:n,hasSample:a,isPending:s}){const[o,c]=R.useState(""),[f,d]=R.useState("blank");R.useEffect(()=>{const v=S=>{S.key==="Escape"&&e()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e]);const m=o.trim(),y=m.endsWith(".yaml")?m:m?`${m}.yaml`:"",g=y&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(y),x=()=>{!g||s||t(y,f)};return h.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:h.jsxs("div",{className:"nb-card max-w-md w-full",children:[h.jsxs("header",{className:"flex items-start justify-between mb-4",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"新建 pipeline"}),h.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":"关闭",children:h.jsx(Xi,{size:14,strokeWidth:3})})]}),h.jsxs("form",{onSubmit:v=>{v.preventDefault(),x()},className:"flex flex-col gap-4",children:[h.jsxs("label",{className:"flex flex-col gap-1.5",children:[h.jsx("span",{className:"text-sm font-bold",children:"文件名"}),h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"例如 ci",value:o,onChange:v=>c(v.target.value),autoFocus:!0}),h.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["实际会保存为 ",h.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:y||"xxx.yaml"}),"。 只允许 a-z A-Z 0-9 _ -;已有同名文件会 409 报错。"]})]}),h.jsxs("fieldset",{className:"flex flex-col gap-2",children:[h.jsx("legend",{className:"text-sm font-bold mb-1",children:"初始内容"}),h.jsx(Sm,{value:"blank",current:f,label:"空白模板",desc:"最简 1 stage (develop → Done)",onSelect:d}),h.jsx(Sm,{value:"sample",current:f,label:"教学模板",desc:"从 sample.yaml.example 复制(带注释,讲解所有字段)",onSelect:d,disabled:!a,disabledReason:"sample.yaml.example 不存在"}),h.jsx(Sm,{value:"active",current:f,label:"复制当前活动的",desc:"从 project.yaml 复制(基于目前的配置改)",onSelect:d,disabled:!n,disabledReason:"project.yaml 不存在"})]}),h.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[h.jsx("button",{className:"nb-btn",onClick:e,type:"button",disabled:s,children:"取消"}),h.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!g||s,"aria-label":"创建 pipeline",children:[s?h.jsx(Ut,{size:13,strokeWidth:3,className:"animate-spin"}):h.jsx(Di,{size:13,strokeWidth:3}),"创建"]})]})]})]})})}function Sm({value:e,current:t,label:n,desc:a,onSelect:s,disabled:o,disabledReason:c}){const f=t===e;return h.jsxs("label",{className:["flex items-start gap-2 p-2 rounded-lg border-2 cursor-pointer",o?"border-[var(--color-border-light)] opacity-50 cursor-not-allowed":f?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"border-[var(--color-border-light)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[h.jsx("input",{type:"radio",name:"pipeline-template",value:e,checked:f,disabled:o,onChange:()=>s(e),className:"mt-1 flex-shrink-0"}),h.jsxs("div",{className:"flex-1",children:[h.jsx("div",{className:"text-sm font-bold",children:n}),h.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:o?c:a})]})]})}function BO(){var o;const{name:e=""}=$E(),t=wr(),[n,a]=R.useState("overview"),s=st({queryKey:["project",e],queryFn:()=>JC(e),enabled:!!e});return h.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[h.jsxs("header",{className:"flex items-center gap-3",children:[h.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[h.jsx(XE,{size:14,strokeWidth:3}),"返回"]}),h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:e}),h.jsx(ds,{to:`/board?project=${encodeURIComponent(e)}`,className:"nb-btn nb-btn-mint",children:"看板"})]}),h.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[h.jsx(Wu,{current:n,value:"overview",onSelect:a,icon:H2,children:"概览"}),h.jsx(Wu,{current:n,value:"config",onSelect:a,icon:e1,children:"配置"}),h.jsx(Wu,{current:n,value:"pipelines",onSelect:a,icon:a1,children:"Pipelines"}),h.jsx(Wu,{current:n,value:"danger",onSelect:a,icon:Il,children:"危险操作"})]}),n==="overview"&&h.jsx(UO,{name:e,data:s.data,loading:s.isLoading}),n==="config"&&h.jsx($O,{name:e}),n==="pipelines"&&h.jsx(FO,{name:e}),n==="danger"&&h.jsx(PO,{name:e,repoDir:((o=s.data)==null?void 0:o.repoDir)??null})]})}function Wu({current:e,value:t,onSelect:n,icon:a,children:s}){const o=e===t;return h.jsxs("button",{type:"button",onClick:()=>n(t),"aria-current":o?"page":void 0,className:["nb-btn",o?"nb-btn-primary":""].join(" "),style:{padding:"6px 14px",fontSize:13},children:[h.jsx(a,{size:13,strokeWidth:2.5}),s]})}function UO({name:e,data:t,loading:n}){return n?h.jsx("div",{className:"nb-card",children:h.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):t?h.jsx("div",{className:"nb-card",children:h.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[h.jsx("dt",{className:"font-bold",children:"仓库路径"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),h.jsx("dt",{className:"font-bold",children:"PM 后端"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),h.jsx("dt",{className:"font-bold",children:"Agent"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),h.jsx("dt",{className:"font-bold",children:"卡片"}),h.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.cards.total," 张 · ",t.cards.inprogress," 进行中 · ",t.cards.done," 完成"]}),h.jsx("dt",{className:"font-bold",children:"Worker"}),h.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.workers.total," 个(",t.workers.active," 活跃)"]}),h.jsx("dt",{className:"font-bold",children:"Pipeline"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),h.jsx("dt",{className:"font-bold",children:"最近活动"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):h.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:h.jsxs("p",{children:["项目 ",e," 不存在或无法读取。"]})})}function $O({name:e}){const t=qn(),{alert:n}=si(),{data:a,isLoading:s,isError:o,error:c,refetch:f}=st({queryKey:["project-conf",e],queryFn:()=>tA(e)}),[d,m]=R.useState(null),[y,g]=R.useState(null);R.useEffect(()=>{a&&d===null&&(m(a.content),g(a.etag))},[a,d]);const x=d!==null&&a!==void 0&&d!==a.content,v=Pn({mutationFn:()=>{if(d===null||y===null)throw new Error("no draft");return nA(e,d,y)},onSuccess:S=>{g(S.etag),t.invalidateQueries({queryKey:["project-conf",e]}),t.invalidateQueries({queryKey:["project",e]})},onError:S=>{const w=S.status;n({title:w===409?"配置已被其他地方修改":"保存失败",body:w===409?'conf 文件在你编辑期间被改过。点"重新加载"后再编辑。':S instanceof Error?S.message:String(S)})}});return s?h.jsx("div",{className:"nb-card",children:h.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):o?h.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:h.jsxs("p",{children:["加载失败: ",c instanceof Error?c.message:String(c)]})}):h.jsxs("div",{className:"nb-card",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:h.jsxs("code",{className:"font-[family-name:var(--font-mono)] text-sm bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:["~/.coral/projects/",e,"/conf"]})}),y&&h.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",y]})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{m(null),f()},disabled:v.isPending,"aria-label":"重新加载",children:[h.jsx(Cl,{size:13,strokeWidth:2.5}),"重新加载"]}),h.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>v.mutate(),disabled:!x||v.isPending,"aria-label":"保存配置",children:[v.isPending?h.jsx(Ut,{size:13,strokeWidth:3,className:"animate-spin"}):v.isSuccess&&!x?h.jsx(_2,{size:13,strokeWidth:3}):h.jsx(zf,{size:13,strokeWidth:3}),"保存"]})]})]}),h.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:d??"",onChange:S=>m(S.target.value),spellCheck:!1,"aria-label":"conf 文件编辑器"}),x&&h.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:"● 未保存的修改"})]})}function FO({name:e}){const t=qn(),{confirm:n,alert:a}=si(),{data:s,isLoading:o}=st({queryKey:["project-pipelines",e],queryFn:()=>aA(e)}),[c,f]=R.useState(null),[d,m]=R.useState(!1),y=Pn({mutationFn:S=>rA(e,S),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:S=>{a({title:"切换失败",body:S instanceof Error?S.message:String(S)})}}),g=Pn({mutationFn:S=>cA(e,S),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:S=>{a({title:"删除失败",body:S instanceof Error?S.message:String(S)})}}),x=Pn({mutationFn:S=>oA(e,S.name,S.template),onSuccess:S=>{t.invalidateQueries({queryKey:["project-pipelines",e]}),m(!1),f(S.name)},onError:S=>{a({title:"创建失败",body:S instanceof Error?S.message:String(S)})}});if(o)return h.jsx("div",{className:"nb-card",children:h.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})});const v=[];s!=null&&s.active&&v.push({name:s.active,isActive:!0});for(const S of(s==null?void 0:s.available)??[])v.push({name:S.name,isActive:!1});return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"nb-card",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:"Pipelines"}),h.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>m(!0),disabled:x.isPending,"aria-label":"新建 pipeline",children:[h.jsx(Di,{size:12,strokeWidth:3}),"新建 pipeline"]})]}),v.length===0?h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:'还没有 pipeline 文件。点"新建 pipeline"开始。'}):h.jsx("ul",{className:"flex flex-col gap-2",children:v.map(S=>h.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[h.jsx(a1,{size:16,strokeWidth:2.5}),h.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:S.name}),S.isActive&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"active"}),h.jsxs("div",{className:"flex gap-1",children:[h.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>f(S.name),"aria-label":`编辑 ${S.name}`,children:[h.jsx(Kp,{size:11,strokeWidth:2.5}),"编辑"]}),!S.isActive&&h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await n({title:`切换到 ${S.name}`,body:`当前 project.yaml 会被 ${S.name} 的内容覆盖。继续?`,confirm:"切换"})&&y.mutate(S.name)},disabled:y.isPending,"aria-label":`切换到 ${S.name}`,children:"切换"}),h.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await n({title:`删除 ${S.name}`,body:"这个 pipeline 文件会被永久删除。",confirm:"删除",danger:!0})&&g.mutate(S.name)},disabled:g.isPending,"aria-label":`删除 ${S.name}`,children:h.jsx(Il,{size:11,strokeWidth:2.5})})]})]})]},S.name))})]}),c&&h.jsx(DO,{projectName:e,file:c,onClose:()=>f(null),onSaved:()=>{t.invalidateQueries({queryKey:["project-pipelines",e]})}}),d&&h.jsx(zO,{hasActive:!!(s!=null&&s.active),hasSample:!0,isPending:x.isPending,onCancel:()=>m(!1),onCreate:(S,w)=>x.mutate({name:S,template:w})})]})}function PO({name:e,repoDir:t}){const n=wr(),a=qn(),{alert:s}=si(),[o,c]=R.useState(""),[f,d]=R.useState(!0),m=Pn({mutationFn:()=>iA(e,{includeClaudeDir:f}),onSuccess:y=>{a.invalidateQueries({queryKey:["projects"]});const g=y.claudeRemoved.filter(x=>x.ok).map(x=>x.path);s({title:"已删除",body:g.length>0?`项目已删除。同时清理了:
|
|
489
|
+
${g.join(`
|
|
490
|
+
`)}`:"项目已删除。"}).then(()=>n("/projects"))},onError:y=>{s({title:"删除失败",body:y instanceof Error?y.message:String(y)})}});return h.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:"删除项目"}),h.jsxs("p",{className:"text-sm mb-4",children:["这会清理 ",h.jsxs("code",{className:"font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-1.5 py-0.5 rounded",children:["~/.coral/projects/",e,"/"]}),"(包括所有卡片、runtime、logs)。"]}),t&&h.jsxs("label",{className:"flex items-start gap-2 mb-4 p-3 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg cursor-pointer",children:[h.jsx("input",{type:"checkbox",checked:f,onChange:y=>d(y.target.checked),className:"mt-0.5"}),h.jsxs("div",{className:"flex-1",children:[h.jsx("div",{className:"text-sm font-bold",children:"同时清理 repo 的 .claude/"}),h.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),h.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:"repo 本身不动,只清这个目录。"})]})]}),h.jsx("div",{className:"mb-4",children:h.jsxs("label",{className:"flex flex-col gap-1.5",children:[h.jsxs("span",{className:"text-sm font-bold",children:["输入项目名 ",h.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e})," 确认:"]}),h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:o,onChange:y=>c(y.target.value),placeholder:e})]})}),h.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:o!==e||m.isPending,onClick:()=>m.mutate(),"aria-label":"永久删除项目",children:[m.isPending?h.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(Il,{size:14,strokeWidth:3}),"永久删除"]})]})}function og(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return $t(`/api/skills${t}`)}function qO(e){return $t(`/api/skills/${encodeURIComponent(e)}`)}function HO(e,t){return $t(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function Wf(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function KO(e,t){return Wf(`/api/skills/${encodeURIComponent(e)}/link`,{project:t})}function GO(e,t){return fetch(`/api/skills/${encodeURIComponent(e)}/link?project=${encodeURIComponent(t)}`,{method:"DELETE"}).then(n=>{if(!n.ok)throw new Error(`${n.status}`);return n.json()})}function QO(e,t){return Wf(`/api/skills/${encodeURIComponent(e)}/freeze`,{project:t})}function YO(e,t){return Wf(`/api/skills/${encodeURIComponent(e)}/unfreeze`,{project:t})}function VO(){return Wf("/api/skills/sync")}function XO({project:e,isPending:t,onCancel:n,onCreate:a}){var A;const[s,o]=R.useState(""),[c,f]=R.useState(""),[d,m]=R.useState(new Set),[y,g]=R.useState(!0),x=st({queryKey:["skills-all",e],queryFn:()=>og(e)});R.useEffect(()=>{const T=j=>{j.key==="Escape"&&n()};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[n]);const S=s.trim().length>0&&s.trim().length<=200&&!t,w=T=>{const j=new Set(d);j.has(T)?j.delete(T):j.add(T),m(j)},k=()=>{S&&a({title:s.trim(),description:c.trim(),skills:[...d],labels:y?["AI-PIPELINE"]:[]})},_=((A=x.data)==null?void 0:A.data)??[];return h.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:h.jsxs("div",{className:"nb-card mt-8 w-full max-w-xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[h.jsxs("header",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:"新建卡片"}),h.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":"关闭",children:h.jsx(Xi,{size:14,strokeWidth:3})})]}),h.jsxs("form",{onSubmit:T=>{T.preventDefault(),k()},className:"flex flex-col gap-4 overflow-auto",children:[h.jsxs("label",{className:"flex flex-col gap-1.5",children:[h.jsx("span",{className:"text-sm font-bold",children:"标题 *"}),h.jsx("input",{type:"text",className:"nb-input w-full",placeholder:"例如:接入 GitHub OAuth 登录",value:s,onChange:T=>o(T.target.value),maxLength:200,autoFocus:!0,required:!0}),h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"写简短明了的目标(<200 字符)"})]}),h.jsxs("label",{className:"flex flex-col gap-1.5",children:[h.jsx("span",{className:"text-sm font-bold",children:"描述"}),h.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:"用户故事、需求、验收标准、参考资料… Claude 启动时会读这里的内容",value:c,onChange:T=>f(T.target.value)}),h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"支持 markdown。空的话就只有 title,Claude 只能靠 title 推断要做啥。"})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx("span",{className:"text-sm font-bold",children:"Skills"}),h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"勾选哪些 skill 会被加载(走 frontmatter `skills:`)。不选也行,Worker 默认加载项目级 skills。"}),x.isLoading&&h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),x.isError&&h.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["skill 列表加载失败,不影响创建:",x.error instanceof Error?x.error.message:String(x.error)]}),_.length>0&&h.jsx("div",{className:"flex flex-wrap gap-2",children:_.map(T=>{const j=d.has(T.name);return h.jsx("button",{type:"button",onClick:()=>w(T.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",j?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),"aria-pressed":j,children:T.name},T.name)})}),d.size>0&&h.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["已选 ",d.size," 个:",[...d].join(", ")]})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx("span",{className:"text-sm font-bold",children:"流水线"}),h.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none p-3 border-[2px] border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)]",children:[h.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-[var(--color-cta)] cursor-pointer",checked:y,onChange:T=>g(T.target.checked)}),h.jsxs("div",{className:"flex-1",children:[h.jsx("div",{className:"text-sm font-bold",children:"加入流水线(`AI-PIPELINE` 标签)"}),h.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:"打开后 pipeline 会识别这张卡并派 worker 跑。关闭则只是一个普通 todo,需要人工改标签才会被流水线拾起。"})]})]})]})]}),h.jsxs("div",{className:"flex gap-2 justify-end mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[h.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:n,disabled:t,type:"button",children:"取消"}),h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:k,disabled:!S,type:"button","aria-label":"创建卡片",children:[t?h.jsx(Ut,{size:13,strokeWidth:3,className:"animate-spin"}):h.jsx(Di,{size:13,strokeWidth:3}),"创建"]})]})]})})}function WO(e){return $t(`/api/projects/${encodeURIComponent(e)}/cards`)}function ZO(e,t){return $t(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function ql(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const a=await n.text();throw new Error(`${n.status} ${n.statusText}: ${a}`)}return n.json().catch(()=>({}))}function JO(e,t){return ql(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}async function eR(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"DELETE"});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}}function tR(e,t){return ql(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function nR(e,t){const n=typeof t=="string"?{title:t}:t;return ql(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function iR(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:n})});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}}async function aR(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return a.json()}function rR(e){return ql(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function sR(e){return ql(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function lR(e,t){return ql(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function oR(e){const t=qn();R.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["cards",d.project]}),t.invalidateQueries({queryKey:["card",d.project,d.seq]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["workers",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["pipeline-status",d.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return a.addEventListener("card.created",s),a.addEventListener("card.updated",s),a.addEventListener("card.moved",s),a.addEventListener("card.deleted",s),a.addEventListener("worker.updated",o),a.addEventListener("worker.added",o),a.addEventListener("worker.deleted",o),a.addEventListener("pipeline.status",c),a.addEventListener("pipeline.started",c),a.addEventListener("pipeline.stopped",c),()=>a.close()},[e,t])}const cR=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),uR=new Set(["frontend","backend","mobile","database","devops"]),fR=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),dR=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function hR(e){return cR.has(e)?"lang":uR.has(e)?"end":fR.has(e)?"persona":dR.has(e)?"workflow":"other"}const mR={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function aS({name:e}){const t=mR[hR(e)];return h.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function rS({label:e,kind:t="default"}){const n=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return h.jsx("span",{className:"nb-badge",style:{background:n},children:e})}function pR({card:e,onClick:t,done:n,draggable:a}){const s=e.labels.some(o=>o.startsWith("STARTED-"))&&!n;return h.jsxs("article",{onClick:t,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),t())},draggable:a,onDragStart:o=>{o.dataTransfer.setData("application/x-sps-card-seq",String(e.seq)),o.dataTransfer.effectAllowed="move"},tabIndex:0,role:"button","aria-label":`Card #${e.seq}: ${e.title}`,className:["bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl p-3","shadow-[3px_3px_0_var(--color-text)] cursor-pointer","transition-[transform,box-shadow] duration-[180ms] ease-out","hover:-translate-x-0.5 hover:-translate-y-0.5 hover:shadow-[5px_5px_0_var(--color-text)]","focus:outline-none focus-visible:ring-[3px] focus-visible:ring-offset-2 focus-visible:ring-[var(--color-text)]",n?"opacity-60":"",a?"active:cursor-grabbing":""].join(" "),children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[h.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-[11px] px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full",children:["#",e.seq]}),s&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),h.jsx("p",{className:`font-bold text-sm leading-5 mb-2 line-clamp-2 ${n?"line-through decoration-2":""}`,children:e.title}),(e.skills.length>0||e.labels.length>0)&&h.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(o=>h.jsx(aS,{name:o},o)),e.labels.filter(o=>o==="NEEDS-FIX").map(o=>h.jsx(rS,{label:o,kind:"warn"},o))]}),e.checklist&&e.checklist.total>0&&h.jsx(gR,{stats:e.checklist}),h.jsxs("div",{className:"pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)] flex items-center gap-2 text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-subtle)]",children:[h.jsx("span",{children:bR(e.updatedAt??e.createdAt)}),e.branch&&h.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function gR({stats:e}){return h.jsxs("div",{className:"mb-2",children:[h.jsxs("div",{className:"flex items-center justify-between text-[11px] font-[family-name:var(--font-mono)] mb-1",children:[h.jsxs("span",{className:"font-bold",children:["检查清单 ",e.done,"/",e.total]}),h.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[e.percent,"%"]})]}),h.jsx("div",{className:"w-full h-1.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full overflow-hidden mb-1.5",children:h.jsx("div",{className:"h-full bg-[var(--color-cta)] transition-[width] duration-200",style:{width:`${e.percent}%`}})}),h.jsxs("ul",{className:"text-[11px] space-y-0.5",children:[e.items.slice(0,3).map((t,n)=>h.jsxs("li",{className:`flex items-start gap-1 ${t.done?"opacity-60 line-through":""}`,children:[h.jsx("span",{className:"flex-shrink-0 mt-0.5",children:t.done?"✓":"○"}),h.jsx("span",{className:"line-clamp-1",children:t.text})]},n)),e.items.length>3&&h.jsxs("li",{className:"text-[var(--color-text-subtle)] italic pl-3",children:["… 还有 ",e.items.length-3," 条"]})]})]})}function bR(e){if(!e)return"—";const t=new Date(e),n=Date.now()-t.getTime();return n<6e4?"刚才":n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleDateString()}function yR({label:e,bg:t,cards:n,onCardClick:a,onDropCard:s}){const[o,c]=R.useState(!1);return h.jsxs("div",{className:["flex flex-col p-3 rounded-2xl border-[3px] min-h-[280px] h-full min-h-0 overflow-hidden","transition-all",o?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:f=>{!s||!f.dataTransfer.types.includes("application/x-sps-card-seq")||(f.preventDefault(),f.dataTransfer.dropEffect="move",o||c(!0))},onDragLeave:()=>c(!1),onDrop:f=>{if(c(!1),!s)return;const d=f.dataTransfer.getData("application/x-sps-card-seq"),m=Number.parseInt(d,10);Number.isFinite(m)&&(f.preventDefault(),s(m))},children:[h.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 mb-2 border-b-2 border-[var(--color-text)] shrink-0",children:[h.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),h.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:n.length})]}),h.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto pr-1 -mr-1",style:{scrollbarWidth:"thin",scrollbarColor:"var(--color-text) transparent"},children:[n.length===0&&h.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:"— 空 —"}),n.map(f=>h.jsx(pR,{card:f,onClick:()=>a(f),done:e==="Done",draggable:!!s},f.seq))]})]})}function pp(e,t){if(!e)return"";const n=e.split(`
|
|
491
|
+
`),a=new RegExp(`^##\\s+${t}\\s*$`),s=n.findIndex(c=>a.test(c));if(s===-1)return"";let o=n.length;for(let c=s+1;c<n.length;c++)if(/^##\s+/.test(n[c]??"")){o=c;break}return n.slice(s+1,o).join(`
|
|
492
|
+
`).trim()}function wm(e){return pp(e,"描述")}function xR({project:e,seq:t,onClose:n,onChanged:a}){var U,ae,G,he,O,L,Z,C,pe,_e,ve;const s=qn(),{confirm:o,alert:c}=si(),{data:f,isLoading:d,isError:m,error:y,refetch:g}=st({queryKey:["card",e,t],queryFn:()=>ZO(e,t)}),[x,v]=R.useState(!1),[S,w]=R.useState(""),[k,_]=R.useState(""),[A,T]=R.useState(new Set),[j,F]=R.useState([]),[M,q]=R.useState(""),K=st({queryKey:["skills-all",e],queryFn:()=>og(e),enabled:x}),D=((ae=(U=st({queryKey:["projects"],queryFn:_r,refetchInterval:1e4}).data)==null?void 0:U.data.find(ce=>ce.name===e))==null?void 0:ae.pipelineStatus)==="running";R.useEffect(()=>{x&&f&&(w(f.title),_(wm(f.body)),T(new Set(f.skills)),F([...f.labels]))},[x,f]),R.useEffect(()=>{const ce=ke=>{ke.key==="Escape"&&(x?v(!1):n())};return window.addEventListener("keydown",ce),()=>window.removeEventListener("keydown",ce)},[n,x]);const P=Pn({mutationFn:()=>{if(!f)throw new Error("no data");const ce={},ke=S.trim();ke&&ke!==f.title&&(ce.title=ke);const Ke=wm(f.body);k!==Ke&&(ce.description=k);const Dt=[...A].sort(),yn=[...f.skills].sort();return JSON.stringify(Dt)!==JSON.stringify(yn)&&(ce.skills=Dt),JSON.stringify(j)!==JSON.stringify(f.labels)&&(ce.labels=j),Object.keys(ce).length===0?Promise.resolve({ok:!0,noop:!0}):aR(e,t,ce)},onSuccess:()=>{s.invalidateQueries({queryKey:["card",e,t]}),s.invalidateQueries({queryKey:["cards",e]}),v(!1),a()},onError:ce=>{c({title:"保存失败",body:ce instanceof Error?ce.message:String(ce)})}}),J=R.useMemo(()=>{if(!x||!f)return!1;if(S.trim()!==f.title||k!==wm(f.body))return!0;const ce=[...A].sort(),ke=[...f.skills].sort();return JSON.stringify(ce)!==JSON.stringify(ke)||JSON.stringify(j)!==JSON.stringify(f.labels)},[x,f,S,k,A,j]),re=ce=>{const ke=new Set(A);ke.has(ce)?ke.delete(ce):ke.add(ce),T(ke)},Q=()=>{const ce=M.trim();if(ce){if(j.includes(ce)){q("");return}F([...j,ce]),q("")}},Y=ce=>{F(j.filter(ke=>ke!==ce))};return h.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"card-modal-title",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:h.jsxs("div",{className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[h.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[h.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full",children:["#",t]}),(f==null?void 0:f.state)&&h.jsx("span",{className:"font-[family-name:var(--font-mono)] text-xs px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full font-semibold",children:f.state}),x&&h.jsx("span",{className:"text-xs font-bold text-[var(--color-stuck)]",children:"⚠ 编辑中"})]}),x?h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-heading)] text-xl font-bold",value:S,onChange:ce=>w(ce.target.value),maxLength:200,"aria-label":"卡片标题"}):h.jsx("h2",{id:"card-modal-title",className:"font-[family-name:var(--font-heading)] text-2xl font-bold break-words",children:(f==null?void 0:f.title)??"加载中…"})]}),h.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[!x&&f&&h.jsxs("button",{onClick:()=>v(!0),className:"nb-btn",style:{padding:"6px 12px"},type:"button","aria-label":"编辑卡片",children:[h.jsx(Kp,{size:12,strokeWidth:2.5})," 编辑"]}),h.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:h.jsx(Xi,{size:14,strokeWidth:3})})]})]}),d&&h.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),m&&h.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",y instanceof Error?y.message:String(y)]}),f&&h.jsxs("div",{className:"flex flex-col gap-4",children:[f.branch&&!x&&h.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[h.jsx(W2,{size:14}),h.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:f.branch})]}),x?h.jsxs(h.Fragment,{children:[h.jsxs("div",{children:[h.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),K.isLoading&&h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),K.data&&K.data.data.length>0&&h.jsx("div",{className:"flex flex-wrap gap-1.5",children:K.data.data.map(ce=>{const ke=A.has(ce.name);return h.jsx("button",{type:"button",onClick:()=>re(ce.name),"aria-pressed":ke,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",ke?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),children:ce.name},ce.name)})})]}),h.jsxs("div",{children:[h.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),h.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[j.map(ce=>h.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-accent-yellow)] border-2 border-[var(--color-text)] rounded-full",children:[ce,h.jsx("button",{type:"button",onClick:()=>Y(ce),className:"hover:text-[var(--color-crashed)]","aria-label":`删除 ${ce}`,children:h.jsx(Xi,{size:10,strokeWidth:3})})]},ce)),h.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:"+ 添加 label",value:M,onChange:ce=>q(ce.target.value),onKeyDown:ce=>{ce.key==="Enter"&&!ce.nativeEvent.isComposing&&(ce.preventDefault(),Q())}}),M&&h.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:Q,"aria-label":"添加 label",children:h.jsx(Di,{size:10,strokeWidth:3})})]}),h.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖"})]})]}):h.jsxs(h.Fragment,{children:[f.skills.length>0&&h.jsxs("div",{children:[h.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),h.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.skills.map(ce=>h.jsx(aS,{name:ce},ce))})]}),f.labels.length>0&&h.jsxs("div",{children:[h.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),h.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.labels.map(ce=>h.jsx(rS,{label:ce,kind:ce==="NEEDS-FIX"?"warn":"default"},ce))})]})]}),x?h.jsxs(h.Fragment,{children:[h.jsxs("div",{children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"描述"}),h.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:k,onChange:ce=>_(ce.target.value),"aria-label":"卡片描述"}),h.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:'只替换 "## 描述" 段的内容;检查清单和日志段不动。'})]}),(((C=f.checklist)==null?void 0:C.total)??0)>0&&h.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[h.jsx("div",{className:"flex items-center justify-between mb-2",children:h.jsxs("span",{className:"font-bold text-sm",children:["检查清单 ",((pe=f.checklist)==null?void 0:pe.done)??0,"/",((_e=f.checklist)==null?void 0:_e.total)??0]})}),h.jsx("ul",{className:"text-sm space-y-1",children:(((ve=f.checklist)==null?void 0:ve.items)??[]).map((ce,ke)=>h.jsxs("li",{className:`flex items-start gap-2 ${ce.done?"opacity-60 line-through":""}`,children:[h.jsx("span",{children:ce.done?"✓":"○"}),h.jsx("span",{children:ce.text})]},ke))})]})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"描述"}),h.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:pp(f.body,"描述")||"(空)"})]}),h.jsxs("div",{children:[h.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:["检查清单 ",h.jsxs("span",{className:"text-[var(--color-text-muted)] normal-case tracking-normal",children:[((G=f.checklist)==null?void 0:G.done)??0,"/",((he=f.checklist)==null?void 0:he.total)??0]})]}),h.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:(((O=f.checklist)==null?void 0:O.total)??0)>0?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"flex items-center justify-end mb-2",children:h.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:h.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${((L=f.checklist)==null?void 0:L.percent)??0}%`}})})}),h.jsx("ul",{className:"text-sm space-y-1",children:(((Z=f.checklist)==null?void 0:Z.items)??[]).map((ce,ke)=>h.jsxs("li",{className:`flex items-start gap-2 ${ce.done?"opacity-60 line-through":""}`,children:[h.jsx("span",{children:ce.done?"✓":"○"}),h.jsx("span",{children:ce.text})]},ke))})]}):h.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:["暂无清单项。在描述里用 ",h.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:"- [ ] 项"})," 语法添加。"]})})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"日志"}),h.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:pp(f.body,"日志")||"(空)"})]})]}),h.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:x?h.jsxs(h.Fragment,{children:[h.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{v(!1),g()},disabled:P.isPending,children:"取消"}),h.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>P.mutate(),disabled:!J||!S.trim()||P.isPending,"aria-label":"保存卡片修改",children:[P.isPending?h.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(zf,{size:14,strokeWidth:3}),"保存"]})]}):h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",disabled:f.state==="Done"||D,title:f.state==="Done"?"卡片已完成;先拖回 Todo 再启动":D?"Pipeline 正在跑——supervisor 会自动 dispatch,无需手动启动":void 0,onClick:async()=>{try{await tR(e,t),a()}catch(ce){c({title:"启动 worker 失败",body:ce instanceof Error?ce.message:String(ce)})}},children:[h.jsx(Gp,{size:14,strokeWidth:3}),"启动 worker"]}),h.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{if(await o({title:`重置卡片 #${t}`,body:"卡片状态会回到初始,已做的 checklist 会清空。",confirm:"重置",danger:!0}))try{await JO(e,t),a(),n()}catch(ke){c({title:"重置失败",body:ke instanceof Error?ke.message:String(ke)})}},children:[h.jsx(JE,{size:14,strokeWidth:2.5}),"重置卡片"]}),h.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await o({title:`删除卡片 #${t}`,body:`即将删除 "${f.title}"。此操作不可恢复(md 文件将被物理删除)。是否继续?`,confirm:"继续",danger:!0})||!await o({title:"最终确认",body:`请再次确认删除卡片 #${t}。`,confirm:"确定删除",danger:!0})))try{await eR(e,t),a(),n()}catch(Ke){c({title:"删除失败",body:Ke instanceof Error?Ke.message:String(Ke)})}},"aria-label":"删除卡片",children:[h.jsx(Il,{size:14,strokeWidth:2.5}),"删除卡片"]})]})})]})]})})}function vR({current:e,onChange:t}){const[n,a]=R.useState(!1),s=R.useRef(null),{data:o}=st({queryKey:["projects"],queryFn:_r});return R.useEffect(()=>{const c=f=>{var d;(d=s.current)!=null&&d.contains(f.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),h.jsxs("div",{className:"relative",ref:s,children:[h.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>a(c=>!c),children:[e,h.jsx(xc,{size:14,strokeWidth:2.5})]}),n&&o&&h.jsx("div",{className:"absolute right-0 mt-2 z-20 min-w-[200px] bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[5px_5px_0_var(--color-text)] overflow-hidden",children:o.data.map(c=>h.jsxs("button",{type:"button",onClick:()=>{t(c.name),a(!1)},className:["w-full text-left px-4 py-2 text-sm font-semibold",c.name===e?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[h.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:c.name}),h.jsxs("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:[c.cards.total," cards"]})]},c.name))})]})}const ER=[{state:"Planning",label:"Planning",bg:"var(--color-accent-purple)"},{state:"Backlog",label:"Backlog",bg:"var(--color-bg-cream)"},{state:"Todo",label:"Todo",bg:"var(--color-accent-yellow)"},{state:"Inprogress",label:"Inprogress",bg:"var(--color-secondary)"},{state:"QA",label:"QA / Review",bg:"var(--color-accent-pink)"},{state:"Done",label:"Done",bg:"var(--color-accent-mint)"}],sS="sps-console:last-board-project";function SR(){if(typeof window>"u")return null;try{return localStorage.getItem(sS)}catch{return null}}function wR(e){if(!(typeof window>"u"))try{localStorage.setItem(sS,e)}catch{}}function _R(){var Y,U,ae;const[e,t]=YE(),n=e.get("project"),[a,s]=R.useState(null),[o,c]=R.useState(""),[f,d]=R.useState(()=>new Set),[m,y]=R.useState(()=>new Set),{confirm:g,alert:x}=si();oR(n);const v=st({queryKey:["projects"],queryFn:_r}),S=st({queryKey:["cards",n],queryFn:()=>WO(n??""),enabled:!!n}),w=qn(),k=()=>{w.invalidateQueries({queryKey:["cards",n]}),w.invalidateQueries({queryKey:["projects"]}),w.invalidateQueries({queryKey:["pipeline-status",n]})},_=G=>{t({project:G})};R.useEffect(()=>{var he;if(n){wR(n);return}const G=SR();G&&((he=v.data)!=null&&he.data.some(O=>O.name===G))&&t({project:G},{replace:!0})},[n,v.data,t]);const A=Pn({mutationFn:()=>rR(n),onSuccess:()=>{k()},onError:G=>{x({title:"启动 pipeline 失败",body:G instanceof Error?G.message:String(G)})}}),T=Pn({mutationFn:()=>sR(n),onSuccess:()=>k(),onError:G=>{x({title:"停止 pipeline 失败",body:G instanceof Error?G.message:String(G)})}}),j=Pn({mutationFn:()=>lR(n,{all:!0}),onSuccess:()=>k(),onError:G=>{x({title:"重置失败",body:G instanceof Error?G.message:String(G)})}}),[F,M]=R.useState(!1),q=Pn({mutationFn:G=>nR(n,G),onSuccess:()=>{k(),M(!1)},onError:G=>{x({title:"新建卡片失败",body:G instanceof Error?G.message:String(G)})}}),K=Pn({mutationFn:({seq:G,state:he})=>iR(n,G,he),onMutate:async({seq:G,state:he})=>{await w.cancelQueries({queryKey:["cards",n]});const O=w.getQueryData(["cards",n]);return O&&w.setQueryData(["cards",n],{...O,data:O.data.map(L=>L.seq===G?{...L,state:he}:L)}),{prev:O}},onError:(G,he,O)=>{O!=null&&O.prev&&w.setQueryData(["cards",n],O.prev),x({title:"移动卡片失败",body:G instanceof Error?G.message:String(G)})},onSettled:()=>{w.invalidateQueries({queryKey:["cards",n]})}}),te=((Y=S.data)==null?void 0:Y.data)??[],{allSkills:D,allLabels:P}=R.useMemo(()=>{const G=new Set,he=new Set;for(const O of te){for(const L of O.skills)G.add(L);for(const L of O.labels)he.add(L)}return{allSkills:[...G].sort(),allLabels:[...he].sort()}},[te]);if(!n)return h.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"看板"}),h.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"选择一个项目 🎯"}),h.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:"看板按项目分。挑一个开始:"}),h.jsx("div",{className:"flex flex-wrap gap-2",children:(U=v.data)==null?void 0:U.data.map(G=>h.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>_(G.name),type:"button",children:G.name},G.name))})]})]});const J=te.filter(G=>{if(o){const he=o.toLowerCase();if(!(G.title.toLowerCase().includes(he)||G.skills.some(L=>L.toLowerCase().includes(he))||G.labels.some(L=>L.toLowerCase().includes(he))))return!1}return!(f.size>0&&!G.skills.some(O=>f.has(O))||m.size>0&&!G.labels.some(O=>m.has(O)))}),re=(ae=v.data)==null?void 0:ae.data.find(G=>G.name===n),Q=(re==null?void 0:re.pipelineStatus)==="running";return h.jsxs("div",{className:"flex flex-col gap-4 max-w-full flex-1 min-h-0",children:[h.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3 shrink-0",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"看板 ✨"}),h.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:re?`${re.name} · ${re.cards.total} cards · ${re.workers.active} workers 活跃`:"加载中…"})]}),h.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[h.jsx(vR,{current:n,onChange:_}),h.jsxs("button",{className:Q?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>Q?T.mutate():A.mutate(),disabled:A.isPending||T.isPending,type:"button","aria-label":Q?"停止 pipeline":"启动 pipeline",title:Q?"停止 pipeline":"启动 pipeline",children:[A.isPending||T.isPending?h.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):Q?h.jsx(t1,{size:14,strokeWidth:3}):h.jsx(Gp,{size:14,strokeWidth:3}),Q?"停止":"启动"]}),h.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await g({title:"重置整个流水线",body:"这会清空所有卡片的运行状态、worker marker、分支。不可撤销。",confirm:"重置全部",danger:!0})&&j.mutate()},disabled:j.isPending,children:[j.isPending?h.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(JE,{size:14,strokeWidth:2.5}),"重置"]}),h.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>M(!0),disabled:q.isPending,children:[q.isPending?h.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(Di,{size:14,strokeWidth:3}),"新卡片"]})]})]}),h.jsxs("div",{className:"flex items-center gap-3 flex-wrap shrink-0",children:[h.jsxs("div",{className:"relative flex-1 max-w-md",children:[h.jsx(vf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),h.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索标题 / skill / label…",value:o,onChange:G=>c(G.target.value),"aria-label":"搜索卡片"})]}),h.jsx(e0,{label:"skill",options:D,selected:f,onChange:d}),h.jsx(e0,{label:"label",options:P,selected:m,onChange:y}),(o||f.size>0||m.size>0)&&h.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{c(""),d(new Set),y(new Set)},type:"button","aria-label":"清空筛选",children:[h.jsx(Xi,{size:11,strokeWidth:3}),"清空"]}),h.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[h.jsx(V2,{size:12}),J.length," / ",te.length]})]}),S.isError&&h.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[h.jsx("p",{className:"font-semibold",children:"加载卡片失败"}),h.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:S.error instanceof Error?S.error.message:String(S.error)})]}),!S.isError&&h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6 auto-rows-fr gap-3 flex-1 min-h-0",children:ER.map(G=>h.jsx(yR,{label:G.label,bg:G.bg,cards:J.filter(kR(G.state)),onCardClick:he=>s(he.seq),onDropCard:he=>K.mutate({seq:he,state:G.state})},G.state))}),a!==null&&h.jsx(xR,{project:n,seq:a,onClose:()=>s(null),onChanged:k}),F&&h.jsx(XO,{project:n,isPending:q.isPending,onCancel:()=>M(!1),onCreate:G=>q.mutate(G)})]})}function kR(e){return t=>e==="QA"?t.state==="QA"||t.state==="Review":e==="Done"?t.state==="Done"||t.state==="Canceled":t.state===e}function e0({label:e,options:t,selected:n,onChange:a}){const[s,o]=R.useState(!1),c=R.useRef(null);R.useEffect(()=>{if(!s)return;const y=x=>{var v;(v=c.current)!=null&&v.contains(x.target)||o(!1)},g=x=>{x.key==="Escape"&&o(!1)};return window.addEventListener("click",y),window.addEventListener("keydown",g),()=>{window.removeEventListener("click",y),window.removeEventListener("keydown",g)}},[s]);const f=y=>{const g=new Set(n);g.has(y)?g.delete(y):g.add(y),a(g)},d=t.length===0,m=n.size;return h.jsxs("div",{ref:c,className:"relative",children:[h.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!d&&o(y=>!y),disabled:d,"aria-haspopup":"listbox","aria-expanded":s,"aria-label":`按 ${e} 筛选`,children:[e,m>0&&h.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:m}),h.jsx(xc,{size:11,strokeWidth:3,className:["transition-transform",s?"rotate-180":""].join(" ")})]}),s&&h.jsxs("div",{role:"listbox",className:"absolute left-0 top-full mt-2 z-20 min-w-[200px] max-h-64 overflow-auto nb-card p-2",style:{padding:8},children:[t.map(y=>{const g=n.has(y);return h.jsxs("label",{className:["flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer text-sm font-[family-name:var(--font-mono)]",g?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[h.jsx("input",{type:"checkbox",checked:g,onChange:()=>f(y),className:"flex-shrink-0"}),h.jsx("span",{className:"truncate",children:y})]},y)}),m>0&&h.jsx("button",{type:"button",className:"w-full mt-2 pt-2 border-t-2 border-dashed border-[var(--color-text)] text-xs font-bold text-[var(--color-crashed)] text-center",onClick:()=>a(new Set),children:"清空选择"})]})]})}function NR(){return $t("/api/workers/all")}function TR(e){return $t(`/api/projects/${encodeURIComponent(e)}/workers`)}function CR(e,t){return $t(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function lS(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function t0(e,t){return lS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function AR(e,t,n){return lS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,n?{seq:n}:void 0)}function cg({state:e}){const n={running:{bg:"var(--color-running-bg)",color:"var(--color-running)",label:"running"},starting:{bg:"var(--color-secondary)",color:"var(--color-text)",label:"starting",icon:h.jsx(Ut,{size:9,strokeWidth:3,className:"animate-spin"})},stuck:{bg:"var(--color-stuck-bg)",color:"var(--color-stuck)",label:"stuck"},crashed:{bg:"var(--color-crashed-bg)",color:"var(--color-crashed)",label:"crashed",icon:h.jsx(CC,{size:9,strokeWidth:2.5})},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)",label:"idle"}}[e];return h.jsxs("span",{className:"nb-status inline-flex items-center gap-1",style:{background:n.bg,color:n.color},children:[n.icon,n.label]})}function ug(e){if(e==null||e<=0)return"—";const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n>0?`${n}h ${a}m`:a>0?`${a}m ${s}s`:`${s}s`}function OR(e){if(e==null||e<=0)return"text-[var(--color-text-muted)]";const t=e/6e4;return t<10?"text-[var(--color-running)]":t<60?"text-[var(--color-stuck)]":"text-[var(--color-crashed)]"}function fg(e){const t=Date.now()-new Date(e).getTime();return t<6e4?`${Math.floor(t/1e3)}s 前`:t<36e5?`${Math.floor(t/6e4)}m 前`:`${Math.floor(t/36e5)}h 前`}function RR({alerts:e,selected:t,onSelect:n}){return e.length===0?h.jsxs("div",{className:"nb-card bg-[var(--color-running-bg)] flex items-center gap-3",children:[h.jsx(If,{size:18,strokeWidth:2.5,className:"text-[var(--color-running)]"}),h.jsx("span",{className:"text-sm font-bold text-[var(--color-running)]",children:"全部 worker 健康"})]}):h.jsxs("section",{children:[h.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2 text-[var(--color-crashed)]",children:[h.jsx(zC,{size:14,strokeWidth:2.5}),"Alerts (",e.length,")"]}),h.jsx("div",{className:"flex flex-col gap-2",children:e.map(a=>{const s=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return h.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="crashed"?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-stuck-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[h.jsx(cg,{state:a.state}),h.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold",children:[a.project,"/worker-",a.slot]}),a.card&&h.jsxs("span",{className:"truncate",children:["#",a.card.seq," ",a.card.title]}),h.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1",children:[h.jsx(L2,{size:10,strokeWidth:2.5}),ug(a.runtimeMs)]})]}),a.markerUpdatedAt&&h.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1 font-[family-name:var(--font-mono)]",children:a.state==="crashed"?"PID 已死。":`marker 停 ${fg(a.markerUpdatedAt)}。`})]},`${a.project}-${a.slot}`)})})]})}function MR({active:e,selected:t,onSelect:n}){return e.length===0?h.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"没有 worker 在运行。"})}):h.jsxs("section",{children:[h.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2",children:[h.jsx(Df,{size:14,strokeWidth:2.5}),"Active (",e.length,")"]}),h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e.map(a=>{const s=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return h.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="starting"?"bg-[var(--color-secondary)]":"bg-[var(--color-running-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[h.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[h.jsx(cg,{state:a.state}),h.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm flex-1 truncate",children:[a.project,"/worker-",a.slot]}),h.jsx("span",{className:`text-xs font-[family-name:var(--font-mono)] ${OR(a.runtimeMs)}`,children:ug(a.runtimeMs)})]}),a.card&&h.jsxs("div",{className:"text-sm font-semibold mb-1 truncate",children:["#",a.card.seq," · ",a.card.title]}),h.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-2 mb-1",children:[a.stage&&h.jsxs("span",{children:["stage: ",a.stage]}),a.markerUpdatedAt&&h.jsxs("span",{className:"ml-auto",children:["marker ",fg(a.markerUpdatedAt)]})]}),a.lastLogLine&&h.jsxs("div",{className:"text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded px-2 py-1 mt-2 truncate",children:[h.jsx(n1,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),a.lastLogLine.msg]})]},`${a.project}-${a.slot}`)})})]})}function jR({capacity:e,selected:t,onSelect:n}){return e.length===0?null:h.jsxs("section",{children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2",children:"Capacity"}),h.jsx("div",{className:"nb-card p-0 overflow-hidden",children:h.jsxs("table",{className:"w-full text-sm",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[h.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:"项目"}),h.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:"占用"}),h.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"running"}),h.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"其它"}),h.jsx("th",{className:"px-3 py-2"})]})}),h.jsx("tbody",{children:e.map(a=>{const s=a.running+a.starting+a.stuck+a.crashed,o=(t==null?void 0:t.project)===a.project;return h.jsxs("tr",{onClick:()=>n(a.project),className:["border-b border-dashed border-[var(--color-border-light)] last:border-0 cursor-pointer hover:bg-[var(--color-accent-yellow)]",o?"bg-[var(--color-accent-yellow)]":""].join(" "),children:[h.jsx("td",{className:"px-3 py-2 font-[family-name:var(--font-mono)] font-bold",children:a.project}),h.jsx("td",{className:"px-3 py-2",children:h.jsx(DR,{total:a.total,cap:a})}),h.jsxs("td",{className:"px-3 py-2 text-right font-[family-name:var(--font-mono)]",children:[h.jsx("span",{className:"text-[var(--color-running)] font-bold",children:a.running}),h.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["/",a.total]})]}),h.jsxs("td",{className:"px-3 py-2 text-right text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:[a.starting>0&&h.jsxs("span",{className:"mr-2",children:["starting ",a.starting]}),a.stuck>0&&h.jsxs("span",{className:"text-[var(--color-stuck)] font-bold mr-2",children:["stuck ",a.stuck]}),a.crashed>0&&h.jsxs("span",{className:"text-[var(--color-crashed)] font-bold mr-2",children:["crashed ",a.crashed]}),s===0&&h.jsx("span",{children:"idle"})]}),h.jsx("td",{className:"px-3 py-2 text-right",children:h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"详情 →"})})]},a.project)})})]})})]})}function DR({total:e,cap:t}){const n=[];for(let a=0;a<t.crashed;a++)n.push("crashed");for(let a=0;a<t.stuck;a++)n.push("stuck");for(let a=0;a<t.starting;a++)n.push("starting");for(let a=0;a<t.running;a++)n.push("running");for(let a=0;a<t.idle;a++)n.push("idle");return h.jsxs("div",{className:"flex gap-1 items-center",children:[n.map((a,s)=>h.jsx("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-[var(--color-text)]",style:{background:LR(a)},title:a},s)),h.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] ml-2 font-[family-name:var(--font-mono)]",children:[e," slot",e!==1?"s":""]})]})}function LR(e){switch(e){case"running":return"var(--color-running-bg)";case"starting":return"var(--color-secondary)";case"stuck":return"var(--color-stuck-bg)";case"crashed":return"var(--color-crashed-bg)";default:return"var(--color-idle-bg)"}}function IR({project:e,initialSlot:t,onChange:n}){var d;const a=st({queryKey:["workers",e],queryFn:()=>TR(e),refetchInterval:3e3}),s=((d=a.data)==null?void 0:d.data)??[],[o,c]=R.useState(null);R.useEffect(()=>{if(s.length===0){c(null);return}const m=s[0].slot;c(y=>y!=null&&s.some(g=>g.slot===y)?y:t!=null&&s.some(g=>g.slot===t)?t:m)},[e,t,s.length]);const f=s.find(m=>m.slot===o)??null;return h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold truncate",children:e}),h.jsx(ds,{to:`/board?project=${encodeURIComponent(e)}`,className:"text-xs underline text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"看板 →"})]}),a.isLoading&&s.length===0?h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 workers…"}):s.length===0?h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"该项目没有 worker slot。"}):h.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(m=>h.jsx(zR,{worker:m,active:m.slot===o,onClick:()=>c(m.slot)},m.slot))})]}),f?h.jsx(BR,{project:e,worker:f,onChange:n}):h.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:h.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:s.length===0?"无 worker":"请选择一个 worker"})})]})}function zR({worker:e,active:t,onClick:n}){return h.jsxs("button",{type:"button",onClick:n,className:["nb-card p-2 text-left min-w-[130px] transition-transform",t?"ring-4 ring-[var(--color-text)]":"opacity-80 hover:opacity-100"].join(" "),children:[h.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[h.jsx(cg,{state:e.state}),h.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs",children:["worker-",e.slot]})]}),e.card?h.jsxs("div",{className:"text-[11px] truncate font-[family-name:var(--font-mono)]",children:["#",e.card.seq," ",e.card.title]}):h.jsx("div",{className:"text-[11px] text-[var(--color-text-muted)] italic",children:"空闲"})]})}function BR({project:e,worker:t,onChange:n}){var m,y;const{confirm:a,alert:s}=si(),o=t.state==="crashed"||t.state==="stuck",c=st({queryKey:["worker-detail",e,t.slot],queryFn:()=>CR(e,t.slot),refetchInterval:3e3}),f=((m=c.data)==null?void 0:m.recentOutput)??[],d=((y=c.data)==null?void 0:y.recentLogs)??[];return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[t.card?h.jsxs("div",{children:[h.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1",children:"当前卡片"}),h.jsxs("div",{className:"text-sm font-semibold break-words",children:["#",t.card.seq," · ",t.card.title]})]}):h.jsx("div",{className:"text-sm text-[var(--color-text-muted)] italic",children:"slot 空闲,没有当前卡片。"}),h.jsxs("dl",{className:"grid grid-cols-[100px_1fr] gap-y-2 text-sm",children:[h.jsx("dt",{className:"font-bold",children:"Stage"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.stage??"—"}),h.jsx("dt",{className:"font-bold",children:"PID"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pid??"—"}),h.jsx("dt",{className:"font-bold",children:"Runtime"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:ug(t.runtimeMs)}),h.jsx("dt",{className:"font-bold",children:"Started"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.startedAt?new Date(t.startedAt).toLocaleString():"—"}),h.jsx("dt",{className:"font-bold",children:"Marker"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.markerUpdatedAt?fg(t.markerUpdatedAt):"—"})]}),h.jsxs("div",{children:[h.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 flex items-center gap-1",children:[h.jsx(n1,{size:10,strokeWidth:2.5}),"Claude 输出 · 最近 ",f.length," 行"]}),c.isLoading&&f.length===0?h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载中…"}):f.length===0?h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"还没收到 session 输出。Worker 刚启动时需要几秒。"}):h.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-80 overflow-auto whitespace-pre-wrap break-words",children:f.map(g=>`${g.ts?`${g.ts} [${g.kind}] `:`[${g.kind}] `}${g.text}`).join(`
|
|
493
|
+
`)})]}),d.length>0&&h.jsxs("div",{children:[h.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 opacity-60",children:["Supervisor 心跳 · 最近 ",d.length," 行"]}),h.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-40 overflow-auto whitespace-pre-wrap break-words opacity-80",children:d.map(g=>`${g.ts??""} [${g.level}] ${g.msg}`).join(`
|
|
494
|
+
`)}),h.jsx(ds,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"text-xs underline text-[var(--color-running)] mt-1 inline-block",children:"查看完整 log →"})]})]}),h.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] flex gap-2 justify-end flex-wrap",children:[o&&t.card&&h.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:`重启 worker-${t.slot}`,body:`先杀进程,再重新 launch 到 #${t.card.seq}`,confirm:"重启"})){try{await t0(e,t.slot)}catch{}try{await AR(e,t.slot,t.card.seq),n()}catch(x){s({title:"重启失败",body:x instanceof Error?x.message:String(x)})}}},children:[h.jsx(DC,{size:11,strokeWidth:2.5})," 重启"]}),t.state!=="idle"&&h.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:`终止 worker-${t.slot}`,body:"当前任务强制中断。",confirm:"终止",danger:!0}))try{await t0(e,t.slot),n()}catch(x){s({title:"终止失败",body:x instanceof Error?x.message:String(x)})}},children:[h.jsx(qC,{size:11,strokeWidth:2.5})," 终止"]})]})]})}function UR(){var o;const e=qn(),[t,n]=R.useState(null),a=st({queryKey:["workers-agg"],queryFn:NR,refetchInterval:5e3});R.useEffect(()=>{if(!a.data)return;const c=a.data.capacity.map(d=>d.project),f=[];for(const d of c){const m=new EventSource(`/stream/projects/${encodeURIComponent(d)}`),y=()=>{e.invalidateQueries({queryKey:["workers-agg"]})};m.addEventListener("worker.updated",y),m.addEventListener("worker.added",y),m.addEventListener("worker.deleted",y),m.addEventListener("card.updated",y),f.push(m)}return()=>{for(const d of f)d.close()}},[(o=a.data)==null?void 0:o.capacity.map(c=>c.project).join(","),e]);const s=R.useMemo(()=>{if(!a.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const c={projects:a.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const f of a.data.capacity)c.running+=f.running,c.starting+=f.starting,c.stuck+=f.stuck,c.crashed+=f.crashed,c.idle+=f.idle;return c},[a.data]);return h.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[h.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Workers 👷"}),h.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:["跨 ",s.projects," 项目 · ",s.running," 跑 · ",s.starting," 启动 ·"," ",h.jsxs("span",{className:"text-[var(--color-stuck)]",children:[s.stuck," 卡"]})," ·"," ",h.jsxs("span",{className:"text-[var(--color-crashed)]",children:[s.crashed," 崩"]})," · ",s.idle," 闲"]})]}),h.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a.refetch(),disabled:a.isFetching,type:"button","aria-label":"刷新",children:[a.isFetching?h.jsx(Ut,{size:12,strokeWidth:3,className:"animate-spin"}):h.jsx(Cl,{size:12,strokeWidth:2.5}),"刷新"]})]}),h.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[h.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pr-2",children:[a.isLoading&&h.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"加载中…"}),a.isError&&h.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:h.jsxs("p",{children:["加载失败: ",a.error instanceof Error?a.error.message:String(a.error)]})}),a.data&&h.jsxs(h.Fragment,{children:[h.jsx(RR,{alerts:a.data.alerts,selected:t,onSelect:(c,f)=>n({project:c,slot:f})}),h.jsx(MR,{active:a.data.active,selected:t,onSelect:(c,f)=>n({project:c,slot:f})}),h.jsx(jR,{capacity:a.data.capacity,selected:t,onSelect:c=>n({project:c})})]})]}),h.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:t?h.jsx(IR,{project:t.project,initialSlot:t.slot,onChange:()=>e.invalidateQueries({queryKey:["workers-agg"]})}):h.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:h.jsxs("div",{children:[h.jsx(Df,{size:32,className:"mx-auto mb-3 text-[var(--color-text-subtle)]",strokeWidth:2}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"点击项目 / worker 查看详情"})]})})})]})]})}function $R(e){const t=new URLSearchParams;return e.project&&t.set("project",e.project),e.worker&&t.set("worker",e.worker),t.set("limit",String(e.limit)),e.since&&t.set("since",e.since),$t(`/api/logs?${t}`)}function FR(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const PR=["error","warn","info","debug"],qR=["error","warn","info"];function HR(){var K,te;const[e,t]=YE(),n=e.get("project"),a=e.get("worker")??"",[s,o]=R.useState([]),[c,f]=R.useState(!1),[d,m]=R.useState(!0),[y,g]=R.useState(()=>new Set(qR)),[x,v]=R.useState(""),[S,w]=R.useState("live"),[k,_]=R.useState(()=>{const D=new Date(Date.now()-36e5),P=J=>String(J).padStart(2,"0");return`${D.getFullYear()}-${P(D.getMonth()+1)}-${P(D.getDate())}T${P(D.getHours())}:${P(D.getMinutes())}`}),A=R.useRef(null),T=!n,j=st({queryKey:["projects"],queryFn:_r}),{data:F,refetch:M}=st({queryKey:["logs",n??"agg",a,S,S==="history"?k:"live"],queryFn:()=>$R({project:n||void 0,worker:a||void 0,limit:S==="history"?2e3:500,since:S==="history"?new Date(k).toISOString():void 0}),refetchInterval:T&&S==="live"?5e3:!1});R.useEffect(()=>{F!=null&&F.data&&o(F.data)},[F]),R.useEffect(()=>{if(!n||S!=="live")return;const D=FR({project:n,worker:a||void 0}),P=new EventSource(D);return P.addEventListener("log.line",J=>{if(!c)try{const re=JSON.parse(J.data);o(Q=>{const Y=[...Q,re];return Y.length>5e3&&Y.splice(0,Y.length-5e3),Y})}catch{}}),()=>P.close()},[n,a,c,S]),R.useEffect(()=>{if(!d)return;const D=A.current;D&&(D.scrollTop=D.scrollHeight)},[s,d]);const q=R.useMemo(()=>{const D=x.toLowerCase();return s.filter(P=>!(!y.has(P.level)||D&&!P.msg.toLowerCase().includes(D)))},[s,y,x]);return h.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[h.jsx("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:h.jsxs("div",{children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Logs 📜"}),h.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[T?`全部项目(${((K=j.data)==null?void 0:K.data.length)??0})`:n,a&&` · worker-${a}`," · ",T&&S==="live"?"5s 轮询":"tail -f"," · ",s.length," lines",c&&h.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:"⏸ PAUSED"})]})]})}),h.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[h.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[h.jsxs("button",{type:"button",onClick:()=>w("live"),"aria-pressed":S==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",S==="live"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[h.jsx(ZE,{size:11,strokeWidth:2.5}),"实时"]}),h.jsxs("button",{type:"button",onClick:()=>w("history"),"aria-pressed":S==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",S==="history"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[h.jsx(tC,{size:11,strokeWidth:2.5}),"历史"]})]}),S==="history"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:k,onChange:D=>_(D.target.value),"aria-label":"查询起始时间"}),h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>M(),type:"button","aria-label":"查询",children:[h.jsx(vf,{size:11,strokeWidth:3}),"查询"]})]}),h.jsxs("div",{className:"relative",children:[h.jsx(sc,{size:14,strokeWidth:2.5,className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"}),h.jsxs("select",{className:"nb-input appearance-none pl-9 pr-9 font-[family-name:var(--font-mono)] cursor-pointer",style:{padding:"10px 36px 10px 36px",fontSize:13,minWidth:180},value:n??"",onChange:D=>{const P=D.target.value;t(P?{project:P}:{})},"aria-label":"筛选项目",children:[h.jsx("option",{value:"",children:"全部项目"}),(te=j.data)==null?void 0:te.data.map(D=>h.jsx("option",{value:D.name,children:D.name},D.name))]}),h.jsx(xc,{size:14,strokeWidth:3,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"})]}),h.jsxs("div",{className:"relative flex-1 max-w-md",children:[h.jsx(vf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),h.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"过滤关键字…",value:x,onChange:D=>v(D.target.value),"aria-label":"过滤日志"})]}),h.jsx("div",{className:"flex items-center gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:PR.map(D=>h.jsx(KR,{level:D,enabled:y.has(D),onToggle:()=>{g(P=>{const J=new Set(P);return J.has(D)?J.delete(D):J.add(D),J})}},D))}),h.jsxs("div",{className:"ml-auto flex gap-2",children:[S==="live"&&h.jsxs(h.Fragment,{children:[h.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>m(D=>!D),type:"button",children:d?"✓ Auto-scroll":"Auto-scroll"}),h.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(D=>!D),type:"button",children:c?h.jsxs(h.Fragment,{children:[h.jsx(Gp,{size:12,strokeWidth:3})," Resume"]}):h.jsxs(h.Fragment,{children:[h.jsx(pC,{size:12,strokeWidth:3})," Pause"]})})]}),h.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const D=new Blob([q.map(re=>re.raw).join(`
|
|
495
|
+
`)],{type:"text/plain"}),P=URL.createObjectURL(D),J=document.createElement("a");J.href=P,J.download=`${n}-log-${Date.now()}.log`,J.click(),URL.revokeObjectURL(P)},type:"button",children:[h.jsx(WE,{size:12,strokeWidth:2.5})," Export"]})]})]}),h.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[h.jsxs("div",{className:"px-4 py-2 bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)] flex items-center justify-between font-[family-name:var(--font-mono)] text-xs",children:[h.jsx("span",{className:"text-[var(--color-text-muted)]",children:(F==null?void 0:F.file)??"~/.coral/projects/.../logs/*.log"}),S==="live"?h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):h.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),h.jsxs("div",{ref:A,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:D=>{const P=D.currentTarget;!(P.scrollHeight-P.scrollTop-P.clientHeight<40)&&d&&m(!1)},children:[q.map((D,P)=>h.jsx(GR,{line:D},P)),q.length===0&&h.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:"没有匹配的日志"})]})]})]})}function KR({level:e,enabled:t,onToggle:n}){const a={error:"var(--color-crashed-bg)",warn:"var(--color-stuck-bg)",info:"var(--color-secondary)",debug:"var(--color-accent-purple)"},s={error:"var(--color-crashed)",warn:"var(--color-stuck)",info:"var(--color-text)",debug:"var(--color-text)"};return h.jsx("button",{type:"button",onClick:n,"aria-pressed":t,className:["px-3 py-0.5 rounded-full font-[family-name:var(--font-mono)] text-[10px] font-bold tracking-widest cursor-pointer",t?"border-[1.5px] border-[var(--color-text)]":"text-[var(--color-text-subtle)]"].join(" "),style:t?{background:a[e],color:s[e]}:{},children:e.toUpperCase()})}function GR({line:e}){var a;const t={error:"bg-[var(--color-crashed)] text-[var(--color-text)]",warn:"bg-[var(--color-stuck)] text-[var(--color-text)]",info:"bg-[var(--color-secondary)] text-[var(--color-text)]",debug:"",trace:""},n=!!e.project;return h.jsxs("div",{className:["grid gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",n?"grid-cols-[100px_90px_60px_1fr]":"grid-cols-[100px_60px_1fr]"].join(" "),children:[h.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((a=e.ts.split("T")[1])==null?void 0:a.replace("Z",""))??e.ts:"--"}),n&&h.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),h.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),h.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function QR(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const YR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XR={};function n0(e,t){return(XR.jsx?VR:YR).test(e)}const WR=/[ \t\n\f\r]/g;function ZR(e){return typeof e=="object"?e.type==="text"?i0(e.value):!1:i0(e)}function i0(e){return e.replace(WR,"")===""}class wc{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}wc.prototype.normal={};wc.prototype.property={};wc.prototype.space=void 0;function oS(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new wc(n,a,t)}function gp(e){return e.toLowerCase()}class Hn{constructor(t,n){this.attribute=n,this.property=t}}Hn.prototype.attribute="";Hn.prototype.booleanish=!1;Hn.prototype.boolean=!1;Hn.prototype.commaOrSpaceSeparated=!1;Hn.prototype.commaSeparated=!1;Hn.prototype.defined=!1;Hn.prototype.mustUseProperty=!1;Hn.prototype.number=!1;Hn.prototype.overloadedBoolean=!1;Hn.prototype.property="";Hn.prototype.spaceSeparated=!1;Hn.prototype.space=void 0;let JR=0;const Pe=ps(),Zt=ps(),bp=ps(),fe=ps(),St=ps(),pl=ps(),ti=ps();function ps(){return 2**++JR}const yp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pe,booleanish:Zt,commaOrSpaceSeparated:ti,commaSeparated:pl,number:fe,overloadedBoolean:bp,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),_m=Object.keys(yp);class dg extends Hn{constructor(t,n,a,s){let o=-1;if(super(t,n),a0(this,"space",s),typeof a=="number")for(;++o<_m.length;){const c=_m[o];a0(this,_m[o],(a&yp[c])===yp[c])}}}dg.prototype.defined=!0;function a0(e,t,n){n&&(e[t]=n)}function Hl(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new dg(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[gp(a)]=a,n[gp(o.attribute)]=a}return new wc(t,n,e.space)}const cS=Hl({properties:{ariaActiveDescendant:null,ariaAtomic:Zt,ariaAutoComplete:null,ariaBusy:Zt,ariaChecked:Zt,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:St,ariaCurrent:null,ariaDescribedBy:St,ariaDetails:null,ariaDisabled:Zt,ariaDropEffect:St,ariaErrorMessage:null,ariaExpanded:Zt,ariaFlowTo:St,ariaGrabbed:Zt,ariaHasPopup:null,ariaHidden:Zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:St,ariaLevel:fe,ariaLive:null,ariaModal:Zt,ariaMultiLine:Zt,ariaMultiSelectable:Zt,ariaOrientation:null,ariaOwns:St,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:Zt,ariaReadOnly:Zt,ariaRelevant:null,ariaRequired:Zt,ariaRoleDescription:St,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:Zt,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function uS(e,t){return t in e?e[t]:t}function fS(e,t){return uS(e,t.toLowerCase())}const eM=Hl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pl,acceptCharset:St,accessKey:St,action:null,allow:null,allowFullScreen:Pe,allowPaymentRequest:Pe,allowUserMedia:Pe,alt:null,as:null,async:Pe,autoCapitalize:null,autoComplete:St,autoFocus:Pe,autoPlay:Pe,blocking:St,capture:null,charSet:null,checked:Pe,cite:null,className:St,cols:fe,colSpan:null,content:null,contentEditable:Zt,controls:Pe,controlsList:St,coords:fe|pl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pe,defer:Pe,dir:null,dirName:null,disabled:Pe,download:bp,draggable:Zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pe,formTarget:null,headers:St,height:fe,hidden:bp,high:fe,href:null,hrefLang:null,htmlFor:St,httpEquiv:St,id:null,imageSizes:null,imageSrcSet:null,inert:Pe,inputMode:null,integrity:null,is:null,isMap:Pe,itemId:null,itemProp:St,itemRef:St,itemScope:Pe,itemType:St,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pe,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:Pe,muted:Pe,name:null,nonce:null,noModule:Pe,noValidate:Pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Pe,optimum:fe,pattern:null,ping:St,placeholder:null,playsInline:Pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pe,referrerPolicy:null,rel:St,required:Pe,reversed:Pe,rows:fe,rowSpan:fe,sandbox:St,scope:null,scoped:Pe,seamless:Pe,selected:Pe,shadowRootClonable:Pe,shadowRootDelegatesFocus:Pe,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:Zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:Pe,useMap:null,value:Zt,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:St,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Pe,declare:Pe,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:Pe,noHref:Pe,noShade:Pe,noWrap:Pe,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:Zt,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pe,disableRemotePlayback:Pe,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:fS}),tM=Hl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ti,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:St,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:Pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:pl,g2:pl,glyphName:pl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:ti,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:St,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ti,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ti,rev:ti,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ti,requiredFeatures:ti,requiredFonts:ti,requiredFormats:ti,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:ti,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ti,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ti,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:uS}),dS=Hl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),hS=Hl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fS}),mS=Hl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),nM={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},iM=/[A-Z]/g,r0=/-[a-z]/g,aM=/^data[-\w.:]+$/i;function rM(e,t){const n=gp(t);let a=t,s=Hn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&aM.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(r0,lM);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!r0.test(o)){let c=o.replace(iM,sM);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=dg}return new s(a,t)}function sM(e){return"-"+e.toLowerCase()}function lM(e){return e.charAt(1).toUpperCase()}const oM=oS([cS,eM,dS,hS,mS],"html"),hg=oS([cS,tM,dS,hS,mS],"svg");function cM(e){return e.join(" ").trim()}var al={},km,s0;function uM(){if(s0)return km;s0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
|
|
496
|
+
`,m="/",y="*",g="",x="comment",v="declaration";function S(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var A=1,T=1;function j(Q){var Y=Q.match(t);Y&&(A+=Y.length);var U=Q.lastIndexOf(d);T=~U?Q.length-U:T+Q.length}function F(){var Q={line:A,column:T};return function(Y){return Y.position=new M(Q),te(),Y}}function M(Q){this.start=Q,this.end={line:A,column:T},this.source=_.source}M.prototype.content=k;function q(Q){var Y=new Error(_.source+":"+A+":"+T+": "+Q);if(Y.reason=Q,Y.filename=_.source,Y.line=A,Y.column=T,Y.source=k,!_.silent)throw Y}function K(Q){var Y=Q.exec(k);if(Y){var U=Y[0];return j(U),k=k.slice(U.length),Y}}function te(){K(n)}function D(Q){var Y;for(Q=Q||[];Y=P();)Y!==!1&&Q.push(Y);return Q}function P(){var Q=F();if(!(m!=k.charAt(0)||y!=k.charAt(1))){for(var Y=2;g!=k.charAt(Y)&&(y!=k.charAt(Y)||m!=k.charAt(Y+1));)++Y;if(Y+=2,g===k.charAt(Y-1))return q("End of comment missing");var U=k.slice(2,Y-2);return T+=2,j(U),k=k.slice(Y),T+=2,Q({type:x,comment:U})}}function J(){var Q=F(),Y=K(a);if(Y){if(P(),!K(s))return q("property missing ':'");var U=K(o),ae=Q({type:v,property:w(Y[0].replace(e,g)),value:U?w(U[0].replace(e,g)):g});return K(c),ae}}function re(){var Q=[];D(Q);for(var Y;Y=J();)Y!==!1&&(Q.push(Y),D(Q));return Q}return te(),re()}function w(k){return k?k.replace(f,g):g}return km=S,km}var l0;function fM(){if(l0)return al;l0=1;var e=al&&al.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(al,"__esModule",{value:!0}),al.default=n;const t=e(uM());function n(a,s){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),f=typeof s=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:m,value:y}=d;f?s(m,y,d):y&&(o=o||{},o[m]=y)}),o}return al}var Ko={},o0;function dM(){if(o0)return Ko;o0=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(m){return!m||n.test(m)||e.test(m)},c=function(m,y){return y.toUpperCase()},f=function(m,y){return"".concat(y,"-")},d=function(m,y){return y===void 0&&(y={}),o(m)?m:(m=m.toLowerCase(),y.reactCompat?m=m.replace(s,f):m=m.replace(a,f),m.replace(t,c))};return Ko.camelCase=d,Ko}var Go,c0;function hM(){if(c0)return Go;c0=1;var e=Go&&Go.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(fM()),n=dM();function a(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(f,d){f&&d&&(c[(0,n.camelCase)(f,o)]=d)}),c}return a.default=a,Go=a,Go}var mM=hM();const pM=Ap(mM),pS=gS("end"),mg=gS("start");function gS(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function gM(e){const t=mg(e),n=pS(e);if(t&&n)return{start:t,end:n}}function Jo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?u0(e.position):"start"in e||"end"in e?u0(e):"line"in e||"column"in e?xp(e):""}function xp(e){return f0(e&&e.line)+":"+f0(e&&e.column)}function u0(e){return xp(e&&e.start)+"-"+xp(e&&e.end)}function f0(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",o={},c=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?s=t:!o.cause&&t&&(c=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const d=a.indexOf(":");d===-1?o.ruleId=a:(o.source=a.slice(0,d),o.ruleId=a.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=Jo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bn.prototype.file="";bn.prototype.name="";bn.prototype.reason="";bn.prototype.message="";bn.prototype.stack="";bn.prototype.column=void 0;bn.prototype.line=void 0;bn.prototype.ancestors=void 0;bn.prototype.cause=void 0;bn.prototype.fatal=void 0;bn.prototype.place=void 0;bn.prototype.ruleId=void 0;bn.prototype.source=void 0;const pg={}.hasOwnProperty,bM=new Map,yM=/[A-Z]/g,xM=new Set(["table","tbody","thead","tfoot","tr"]),vM=new Set(["td","th"]),bS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function EM(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=AM(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=CM(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?hg:oM,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=yS(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function yS(e,t,n){if(t.type==="element")return SM(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return wM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return kM(e,t,n);if(t.type==="mdxjsEsm")return _M(e,t);if(t.type==="root")return NM(e,t,n);if(t.type==="text")return TM(e,t)}function SM(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=hg,e.schema=s),e.ancestors.push(t);const o=vS(e,t.tagName,!1),c=OM(e,t);let f=bg(e,t);return xM.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!ZR(d):!0})),xS(e,c,o,t),gg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function wM(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}uc(e,t.position)}function _M(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);uc(e,t.position)}function kM(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=hg,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:vS(e,t.name,!0),c=RM(e,t),f=bg(e,t);return xS(e,c,o,t),gg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function NM(e,t,n){const a={};return gg(a,bg(e,t)),e.create(t,e.Fragment,a,n)}function TM(e,t){return t.value}function xS(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function gg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function CM(e,t,n){return a;function a(s,o,c,f){const m=Array.isArray(c.children)?n:t;return f?m(o,c,f):m(o,c)}}function AM(e,t){return n;function n(a,s,o,c){const f=Array.isArray(o.children),d=mg(a);return t(s,o,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function OM(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&pg.call(t.properties,s)){const o=MM(e,s,t.properties[s]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&vM.has(t.tagName)?a=f:n[c]=f}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function RM(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else uc(e,t.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else uc(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function bg(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:bM;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const m=s.get(d)||0;c=d+"-"+m,s.set(d,m+1)}}const f=yS(e,o,c);f!==void 0&&n.push(f)}return n}function MM(e,t,n){const a=rM(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?QR(n):cM(n)),a.property==="style"){let s=typeof n=="object"?n:jM(e,String(n));return e.stylePropertyNameCase==="css"&&(s=DM(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?nM[a.property]||a.property:a.attribute,n]}}function jM(e,t){try{return pM(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=bS+"#cannot-parse-style-attribute",s}}function vS(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,c;for(;++o<s.length;){const f=n0(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}a=c}else a=n0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return pg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);uc(e)}function uc(e,t){const n=new bn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=bS+"#cannot-handle-mdx-estrees-without-createevaluater",n}function DM(e){const t={};let n;for(n in e)pg.call(e,n)&&(t[LM(n)]=e[n]);return t}function LM(e){let t=e.replace(yM,IM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function IM(e){return"-"+e.toLowerCase()}const Nm={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},zM={};function yg(e,t){const n=zM,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ES(e,a,s)}function ES(e,t,n){if(BM(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return d0(e.children,t,n)}return Array.isArray(e)?d0(e,t,n):""}function d0(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=ES(e[s],t,n);return a.join("")}function BM(e){return!!(e&&typeof e=="object")}const h0=document.createElement("i");function xg(e){const t="&"+e+";";h0.innerHTML=t;const n=h0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ai(e,t,n,a){const s=e.length;let o=0,c;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)c=Array.from(a),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);o<a.length;)c=a.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function xi(e,t){return e.length>0?(ai(e,e.length,0,t),e):t}const m0={}.hasOwnProperty;function SS(e){const t={};let n=-1;for(;++n<e.length;)UM(t,e[n]);return t}function UM(e,t){let n;for(n in t){const s=(m0.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){m0.call(s,c)||(s[c]=[]);const f=o[c];$M(s[c],Array.isArray(f)?f:f?[f]:[])}}}function $M(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);ai(e,0,0,a)}function wS(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Mi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tn=Nr(/[A-Za-z]/),pn=Nr(/[\dA-Za-z]/),FM=Nr(/[#-'*+\--9=?A-Z^-~]/);function kf(e){return e!==null&&(e<32||e===127)}const vp=Nr(/\d/),PM=Nr(/[\dA-Fa-f]/),qM=Nr(/[!-/:-@[-`{-~]/);function Oe(e){return e!==null&&e<-2}function xt(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const Zf=Nr(new RegExp("\\p{P}|\\p{S}","u")),fs=Nr(/\s/);function Nr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Kl(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let c="";if(o===37&&pn(e.charCodeAt(n+1))&&pn(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(n+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),s=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+s+1,c=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function tt(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(d){return Ye(d)?(e.enter(n),f(d)):t(d)}function f(d){return Ye(d)&&o++<s?(e.consume(d),f):(e.exit(n),t(d))}}const HM={tokenize:KM};function KM(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),tt(e,t,"linePrefix")}function s(f){return e.enter("paragraph"),o(f)}function o(f){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Oe(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const GM={tokenize:QM},p0={tokenize:YM};function QM(e){const t=this,n=[];let a=0,s,o,c;return f;function f(T){if(a<n.length){const j=n[a];return t.containerState=j[1],e.attempt(j[0].continuation,d,m)(T)}return m(T)}function d(T){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&A();const j=t.events.length;let F=j,M;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){M=t.events[F][1].end;break}_(a);let q=j;for(;q<t.events.length;)t.events[q][1].end={...M},q++;return ai(t.events,F+1,0,t.events.slice(j)),t.events.length=q,m(T)}return f(T)}function m(T){if(a===n.length){if(!s)return x(T);if(s.currentConstruct&&s.currentConstruct.concrete)return S(T);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(p0,y,g)(T)}function y(T){return s&&A(),_(a),x(T)}function g(T){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,S(T)}function x(T){return t.containerState={},e.attempt(p0,v,S)(T)}function v(T){return a++,n.push([t.currentConstruct,t.containerState]),x(T)}function S(T){if(T===null){s&&A(),_(0),e.consume(T);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),w(T)}function w(T){if(T===null){k(e.exit("chunkFlow"),!0),_(0),e.consume(T);return}return Oe(T)?(e.consume(T),k(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(T),w)}function k(T,j){const F=t.sliceStream(T);if(j&&F.push(null),T.previous=o,o&&(o.next=T),o=T,s.defineSkip(T.start),s.write(F),t.parser.lazy[T.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<c&&(!s.events[M][1].end||s.events[M][1].end.offset>c))return;const q=t.events.length;let K=q,te,D;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){if(te){D=t.events[K][1].end;break}te=!0}for(_(a),M=q;M<t.events.length;)t.events[M][1].end={...D},M++;ai(t.events,K+1,0,t.events.slice(q)),t.events.length=M}}function _(T){let j=n.length;for(;j-- >T;){const F=n[j];t.containerState=F[1],F[0].exit.call(t,e)}n.length=T}function A(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function YM(e,t,n){return tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rl(e){if(e===null||xt(e)||fs(e))return 1;if(Zf(e))return 2}function Jf(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!a.includes(o)&&(t=o(t,n),a.push(o))}return t}const Ep={name:"attention",resolveAll:VM,tokenize:XM};function VM(e,t){let n=-1,a,s,o,c,f,d,m,y;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[a][1].end},x={...e[n][1].start};g0(g,-d),g0(x,d),c={type:d>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={type:d>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[n][1].start={...f.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=xi(m,[["enter",e[a][1],t],["exit",e[a][1],t]])),m=xi(m,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),m=xi(m,Jf(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),m=xi(m,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(y=2,m=xi(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):y=0,ai(e,a-1,n-a+3,m),n=a+m.length-y-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function XM(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Rl(a);let o;return c;function c(d){return o=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===o)return e.consume(d),f;const m=e.exit("attentionSequence"),y=Rl(d),g=!y||y===2&&s||n.includes(d),x=!s||s===2&&y||n.includes(a);return m._open=!!(o===42?g:g&&(s||!x)),m._close=!!(o===42?x:x&&(y||!g)),t(d)}}function g0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const WM={name:"autolink",tokenize:ZM};function ZM(e,t,n){let a=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return Tn(v)?(e.consume(v),c):v===64?n(v):m(v)}function c(v){return v===43||v===45||v===46||pn(v)?(a=1,f(v)):m(v)}function f(v){return v===58?(e.consume(v),a=0,d):(v===43||v===45||v===46||pn(v))&&a++<32?(e.consume(v),f):(a=0,m(v))}function d(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||kf(v)?n(v):(e.consume(v),d)}function m(v){return v===64?(e.consume(v),y):FM(v)?(e.consume(v),m):n(v)}function y(v){return pn(v)?g(v):n(v)}function g(v){return v===46?(e.consume(v),a=0,y):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):x(v)}function x(v){if((v===45||pn(v))&&a++<63){const S=v===45?x:g;return e.consume(v),S}return n(v)}}const _c={partial:!0,tokenize:JM};function JM(e,t,n){return a;function a(o){return Ye(o)?tt(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||Oe(o)?t(o):n(o)}}const _S={continuation:{tokenize:tj},exit:nj,name:"blockQuote",tokenize:ej};function ej(e,t,n){const a=this;return s;function s(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return n(c)}function o(c){return Ye(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function tj(e,t,n){const a=this;return s;function s(c){return Ye(c)?tt(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(_S,t,n)(c)}}function nj(e){e.exit("blockQuote")}const kS={name:"characterEscape",tokenize:ij};function ij(e,t,n){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return qM(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const NS={name:"characterReference",tokenize:aj};function aj(e,t,n){const a=this;let s=0,o,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),o=31,c=pn,y(g))}function m(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=PM,y):(e.enter("characterReferenceValue"),o=7,c=vp,y(g))}function y(g){if(g===59&&s){const x=e.exit("characterReferenceValue");return c===pn&&!xg(a.sliceSerialize(x))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(g)&&s++<o?(e.consume(g),y):n(g)}}const b0={partial:!0,tokenize:sj},y0={concrete:!0,name:"codeFenced",tokenize:rj};function rj(e,t,n){const a=this,s={partial:!0,tokenize:F};let o=0,c=0,f;return d;function d(M){return m(M)}function m(M){const q=a.events[a.events.length-1];return o=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,f=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(M)}function y(M){return M===f?(c++,e.consume(M),y):c<3?n(M):(e.exit("codeFencedFenceSequence"),Ye(M)?tt(e,g,"whitespace")(M):g(M))}function g(M){return M===null||Oe(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(b0,w,j)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(M))}function x(M){return M===null||Oe(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):Ye(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,v,"whitespace")(M)):M===96&&M===f?n(M):(e.consume(M),x)}function v(M){return M===null||Oe(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(M))}function S(M){return M===null||Oe(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===f?n(M):(e.consume(M),S)}function w(M){return e.attempt(s,j,k)(M)}function k(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),_}function _(M){return o>0&&Ye(M)?tt(e,A,"linePrefix",o+1)(M):A(M)}function A(M){return M===null||Oe(M)?e.check(b0,w,j)(M):(e.enter("codeFlowValue"),T(M))}function T(M){return M===null||Oe(M)?(e.exit("codeFlowValue"),A(M)):(e.consume(M),T)}function j(M){return e.exit("codeFenced"),t(M)}function F(M,q,K){let te=0;return D;function D(Y){return M.enter("lineEnding"),M.consume(Y),M.exit("lineEnding"),P}function P(Y){return M.enter("codeFencedFence"),Ye(Y)?tt(M,J,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):J(Y)}function J(Y){return Y===f?(M.enter("codeFencedFenceSequence"),re(Y)):K(Y)}function re(Y){return Y===f?(te++,M.consume(Y),re):te>=c?(M.exit("codeFencedFenceSequence"),Ye(Y)?tt(M,Q,"whitespace")(Y):Q(Y)):K(Y)}function Q(Y){return Y===null||Oe(Y)?(M.exit("codeFencedFence"),q(Y)):K(Y)}}}function sj(e,t,n){const a=this;return s;function s(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const Tm={name:"codeIndented",tokenize:oj},lj={partial:!0,tokenize:cj};function oj(e,t,n){const a=this;return s;function s(m){return e.enter("codeIndented"),tt(e,o,"linePrefix",5)(m)}function o(m){const y=a.events[a.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(m):n(m)}function c(m){return m===null?d(m):Oe(m)?e.attempt(lj,c,d)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||Oe(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),f)}function d(m){return e.exit("codeIndented"),t(m)}}function cj(e,t,n){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?n(c):Oe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):tt(e,o,"linePrefix",5)(c)}function o(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Oe(c)?s(c):n(c)}}const uj={name:"codeText",previous:dj,resolve:fj,tokenize:hj};function fj(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function dj(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hj(e,t,n){let a=0,s,o;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),a++,f):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(o=e.enter("codeTextSequence"),s=0,y(g)):Oe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),m(g))}function m(g){return g===null||g===32||g===96||Oe(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),m)}function y(g){return g===96?(e.consume(g),s++,y):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(o.type="codeTextData",m(g))}}class mj{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Qo(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Qo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Qo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Qo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Qo(this.left,n.reverse())}}}function Qo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function TS(e){const t={};let n=-1,a,s,o,c,f,d,m;const y=new mj(e);for(;++n<y.length;){for(;n in t;)n=t[n];if(a=y.get(n),n&&a[1].type==="chunkFlow"&&y.get(n-1)[1].type==="listItemPrefix"&&(d=a[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,pj(y,n)),n=t[n],m=!0);else if(a[1]._container){for(o=n,s=void 0;o--;)if(c=y.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(y.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...y.get(s)[1].start},f=y.slice(s,n),f.unshift(a),y.splice(s,n-s+1,f))}}return ai(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!m}function pj(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const o=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],m={};let y,g,x=-1,v=n,S=0,w=0;const k=[w];for(;v;){for(;e.get(++s)[1]!==v;);o.push(s),v._tokenizer||(y=a.sliceStream(v),v.next||y.push(null),g&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=v,v=v.next}for(v=n;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(w=x+1,k.push(w),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):k.pop(),x=k.length;x--;){const _=f.slice(k[x],k[x+1]),A=o.pop();d.push([A,A+_.length-1]),e.splice(A,2,_)}for(d.reverse(),x=-1;++x<d.length;)m[S+d[x][0]]=S+d[x][1],S+=d[x][1]-d[x][0]-1;return m}const gj={resolve:yj,tokenize:xj},bj={partial:!0,tokenize:vj};function yj(e){return TS(e),e}function xj(e,t){let n;return a;function a(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?o(f):Oe(f)?e.check(bj,c,o)(f):(e.consume(f),s)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function vj(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),tt(e,o,"linePrefix")}function o(c){if(c===null||Oe(c))return n(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function CS(e,t,n,a,s,o,c,f,d){const m=d||Number.POSITIVE_INFINITY;let y=0;return g;function g(_){return _===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(_),e.exit(o),x):_===null||_===32||_===41||kf(_)?n(_):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(_))}function x(_){return _===62?(e.enter(o),e.consume(_),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(f),x(_)):_===null||_===60||Oe(_)?n(_):(e.consume(_),_===92?S:v)}function S(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function w(_){return!y&&(_===null||_===41||xt(_))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(_)):y<m&&_===40?(e.consume(_),y++,w):_===41?(e.consume(_),y--,w):_===null||_===32||_===40||kf(_)?n(_):(e.consume(_),_===92?k:w)}function k(_){return _===40||_===41||_===92?(e.consume(_),w):w(_)}}function AS(e,t,n,a,s,o){const c=this;let f=0,d;return m;function m(v){return e.enter(a),e.enter(s),e.consume(v),e.exit(s),e.enter(o),y}function y(v){return f>999||v===null||v===91||v===93&&!d||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?n(v):v===93?(e.exit(o),e.enter(s),e.consume(v),e.exit(s),e.exit(a),t):Oe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||v===91||v===93||Oe(v)||f++>999?(e.exit("chunkString"),y(v)):(e.consume(v),d||(d=!Ye(v)),v===92?x:g)}function x(v){return v===91||v===92||v===93?(e.consume(v),f++,g):g(v)}}function OS(e,t,n,a,s,o){let c;return f;function f(x){return x===34||x===39||x===40?(e.enter(a),e.enter(s),e.consume(x),e.exit(s),c=x===40?41:x,d):n(x)}function d(x){return x===c?(e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):(e.enter(o),m(x))}function m(x){return x===c?(e.exit(o),d(c)):x===null?n(x):Oe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),tt(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===c||x===null||Oe(x)?(e.exit("chunkString"),m(x)):(e.consume(x),x===92?g:y)}function g(x){return x===c||x===92?(e.consume(x),y):y(x)}}function ec(e,t){let n;return a;function a(s){return Oe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):Ye(s)?tt(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const Ej={name:"definition",tokenize:wj},Sj={partial:!0,tokenize:_j};function wj(e,t,n){const a=this;let s;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return AS.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return s=Mi(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return xt(v)?ec(e,m)(v):m(v)}function m(v){return CS(e,y,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return e.attempt(Sj,g,g)(v)}function g(v){return Ye(v)?tt(e,x,"whitespace")(v):x(v)}function x(v){return v===null||Oe(v)?(e.exit("definition"),a.parser.defined.push(s),t(v)):n(v)}}function _j(e,t,n){return a;function a(f){return xt(f)?ec(e,s)(f):n(f)}function s(f){return OS(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return Ye(f)?tt(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Oe(f)?t(f):n(f)}}const kj={name:"hardBreakEscape",tokenize:Nj};function Nj(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Oe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Tj={name:"headingAtx",resolve:Cj,tokenize:Aj};function Cj(e,t){let n=e.length-2,a=3,s,o;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},o={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},ai(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function Aj(e,t,n){let a=0;return s;function s(y){return e.enter("atxHeading"),o(y)}function o(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&a++<6?(e.consume(y),c):y===null||xt(y)?(e.exit("atxHeadingSequence"),f(y)):n(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),d(y)):y===null||Oe(y)?(e.exit("atxHeading"),t(y)):Ye(y)?tt(e,f,"whitespace")(y):(e.enter("atxHeadingText"),m(y))}function d(y){return y===35?(e.consume(y),d):(e.exit("atxHeadingSequence"),f(y))}function m(y){return y===null||y===35||xt(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),m)}}const Oj=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],x0=["pre","script","style","textarea"],Rj={concrete:!0,name:"htmlFlow",resolveTo:Dj,tokenize:Lj},Mj={partial:!0,tokenize:zj},jj={partial:!0,tokenize:Ij};function Dj(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Lj(e,t,n){const a=this;let s,o,c,f,d;return m;function m(C){return y(C)}function y(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),g}function g(C){return C===33?(e.consume(C),x):C===47?(e.consume(C),o=!0,w):C===63?(e.consume(C),s=3,a.interrupt?t:O):Tn(C)?(e.consume(C),c=String.fromCharCode(C),k):n(C)}function x(C){return C===45?(e.consume(C),s=2,v):C===91?(e.consume(C),s=5,f=0,S):Tn(C)?(e.consume(C),s=4,a.interrupt?t:O):n(C)}function v(C){return C===45?(e.consume(C),a.interrupt?t:O):n(C)}function S(C){const pe="CDATA[";return C===pe.charCodeAt(f++)?(e.consume(C),f===pe.length?a.interrupt?t:J:S):n(C)}function w(C){return Tn(C)?(e.consume(C),c=String.fromCharCode(C),k):n(C)}function k(C){if(C===null||C===47||C===62||xt(C)){const pe=C===47,_e=c.toLowerCase();return!pe&&!o&&x0.includes(_e)?(s=1,a.interrupt?t(C):J(C)):Oj.includes(c.toLowerCase())?(s=6,pe?(e.consume(C),_):a.interrupt?t(C):J(C)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(C):o?A(C):T(C))}return C===45||pn(C)?(e.consume(C),c+=String.fromCharCode(C),k):n(C)}function _(C){return C===62?(e.consume(C),a.interrupt?t:J):n(C)}function A(C){return Ye(C)?(e.consume(C),A):D(C)}function T(C){return C===47?(e.consume(C),D):C===58||C===95||Tn(C)?(e.consume(C),j):Ye(C)?(e.consume(C),T):D(C)}function j(C){return C===45||C===46||C===58||C===95||pn(C)?(e.consume(C),j):F(C)}function F(C){return C===61?(e.consume(C),M):Ye(C)?(e.consume(C),F):T(C)}function M(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),d=C,q):Ye(C)?(e.consume(C),M):K(C)}function q(C){return C===d?(e.consume(C),d=null,te):C===null||Oe(C)?n(C):(e.consume(C),q)}function K(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||xt(C)?F(C):(e.consume(C),K)}function te(C){return C===47||C===62||Ye(C)?T(C):n(C)}function D(C){return C===62?(e.consume(C),P):n(C)}function P(C){return C===null||Oe(C)?J(C):Ye(C)?(e.consume(C),P):n(C)}function J(C){return C===45&&s===2?(e.consume(C),U):C===60&&s===1?(e.consume(C),ae):C===62&&s===4?(e.consume(C),L):C===63&&s===3?(e.consume(C),O):C===93&&s===5?(e.consume(C),he):Oe(C)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Mj,Z,re)(C)):C===null||Oe(C)?(e.exit("htmlFlowData"),re(C)):(e.consume(C),J)}function re(C){return e.check(jj,Q,Z)(C)}function Q(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),Y}function Y(C){return C===null||Oe(C)?re(C):(e.enter("htmlFlowData"),J(C))}function U(C){return C===45?(e.consume(C),O):J(C)}function ae(C){return C===47?(e.consume(C),c="",G):J(C)}function G(C){if(C===62){const pe=c.toLowerCase();return x0.includes(pe)?(e.consume(C),L):J(C)}return Tn(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),G):J(C)}function he(C){return C===93?(e.consume(C),O):J(C)}function O(C){return C===62?(e.consume(C),L):C===45&&s===2?(e.consume(C),O):J(C)}function L(C){return C===null||Oe(C)?(e.exit("htmlFlowData"),Z(C)):(e.consume(C),L)}function Z(C){return e.exit("htmlFlow"),t(C)}}function Ij(e,t,n){const a=this;return s;function s(c){return Oe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):n(c)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function zj(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(_c,t,n)}}const Bj={name:"htmlText",tokenize:Uj};function Uj(e,t,n){const a=this;let s,o,c;return f;function f(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),m):O===47?(e.consume(O),F):O===63?(e.consume(O),T):Tn(O)?(e.consume(O),K):n(O)}function m(O){return O===45?(e.consume(O),y):O===91?(e.consume(O),o=0,S):Tn(O)?(e.consume(O),A):n(O)}function y(O){return O===45?(e.consume(O),v):n(O)}function g(O){return O===null?n(O):O===45?(e.consume(O),x):Oe(O)?(c=g,ae(O)):(e.consume(O),g)}function x(O){return O===45?(e.consume(O),v):g(O)}function v(O){return O===62?U(O):O===45?x(O):g(O)}function S(O){const L="CDATA[";return O===L.charCodeAt(o++)?(e.consume(O),o===L.length?w:S):n(O)}function w(O){return O===null?n(O):O===93?(e.consume(O),k):Oe(O)?(c=w,ae(O)):(e.consume(O),w)}function k(O){return O===93?(e.consume(O),_):w(O)}function _(O){return O===62?U(O):O===93?(e.consume(O),_):w(O)}function A(O){return O===null||O===62?U(O):Oe(O)?(c=A,ae(O)):(e.consume(O),A)}function T(O){return O===null?n(O):O===63?(e.consume(O),j):Oe(O)?(c=T,ae(O)):(e.consume(O),T)}function j(O){return O===62?U(O):T(O)}function F(O){return Tn(O)?(e.consume(O),M):n(O)}function M(O){return O===45||pn(O)?(e.consume(O),M):q(O)}function q(O){return Oe(O)?(c=q,ae(O)):Ye(O)?(e.consume(O),q):U(O)}function K(O){return O===45||pn(O)?(e.consume(O),K):O===47||O===62||xt(O)?te(O):n(O)}function te(O){return O===47?(e.consume(O),U):O===58||O===95||Tn(O)?(e.consume(O),D):Oe(O)?(c=te,ae(O)):Ye(O)?(e.consume(O),te):U(O)}function D(O){return O===45||O===46||O===58||O===95||pn(O)?(e.consume(O),D):P(O)}function P(O){return O===61?(e.consume(O),J):Oe(O)?(c=P,ae(O)):Ye(O)?(e.consume(O),P):te(O)}function J(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,re):Oe(O)?(c=J,ae(O)):Ye(O)?(e.consume(O),J):(e.consume(O),Q)}function re(O){return O===s?(e.consume(O),s=void 0,Y):O===null?n(O):Oe(O)?(c=re,ae(O)):(e.consume(O),re)}function Q(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||xt(O)?te(O):(e.consume(O),Q)}function Y(O){return O===47||O===62||xt(O)?te(O):n(O)}function U(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function ae(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),G}function G(O){return Ye(O)?tt(e,he,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):he(O)}function he(O){return e.enter("htmlTextData"),c(O)}}const vg={name:"labelEnd",resolveAll:qj,resolveTo:Hj,tokenize:Kj},$j={tokenize:Gj},Fj={tokenize:Qj},Pj={tokenize:Yj};function qj(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&ai(e,0,e.length,n),e}function Hj(e,t){let n=e.length,a=0,s,o,c,f;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,t],["enter",m,t]],f=xi(f,e.slice(o+1,o+a+3)),f=xi(f,[["enter",y,t]]),f=xi(f,Jf(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),f=xi(f,[["exit",y,t],e[c-2],e[c-1],["exit",m,t]]),f=xi(f,e.slice(c+1)),f=xi(f,[["exit",d,t]]),ai(e,o,e.length,f),e}function Kj(e,t,n){const a=this;let s=a.events.length,o,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return f;function f(x){return o?o._inactive?g(x):(c=a.parser.defined.includes(Mi(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),d):n(x)}function d(x){return x===40?e.attempt($j,y,c?y:g)(x):x===91?e.attempt(Fj,y,c?m:g)(x):c?y(x):g(x)}function m(x){return e.attempt(Pj,y,g)(x)}function y(x){return t(x)}function g(x){return o._balanced=!0,n(x)}}function Gj(e,t,n){return a;function a(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return xt(g)?ec(e,o)(g):o(g)}function o(g){return g===41?y(g):CS(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return xt(g)?ec(e,d)(g):y(g)}function f(g){return n(g)}function d(g){return g===34||g===39||g===40?OS(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function m(g){return xt(g)?ec(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function Qj(e,t,n){const a=this;return s;function s(f){return AS.call(a,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return a.parser.defined.includes(Mi(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function c(f){return n(f)}}function Yj(e,t,n){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Vj={name:"labelStartImage",resolveAll:vg.resolveAll,tokenize:Xj};function Xj(e,t,n){const a=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):n(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const Wj={name:"labelStartLink",resolveAll:vg.resolveAll,tokenize:Zj};function Zj(e,t,n){const a=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const Cm={name:"lineEnding",tokenize:Jj};function Jj(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const pf={name:"thematicBreak",tokenize:eD};function eD(e,t,n){let a=0,s;return o;function o(m){return e.enter("thematicBreak"),c(m)}function c(m){return s=m,f(m)}function f(m){return m===s?(e.enter("thematicBreakSequence"),d(m)):a>=3&&(m===null||Oe(m))?(e.exit("thematicBreak"),t(m)):n(m)}function d(m){return m===s?(e.consume(m),a++,d):(e.exit("thematicBreakSequence"),Ye(m)?tt(e,f,"whitespace")(m):f(m))}}const Bn={continuation:{tokenize:aD},exit:sD,name:"list",tokenize:iD},tD={partial:!0,tokenize:lD},nD={partial:!0,tokenize:rD};function iD(e,t,n){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(v){const S=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:vp(v)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(pf,n,m)(v):m(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return vp(v)&&++c<10?(e.consume(v),d):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),m(v)):n(v)}function m(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(_c,a.interrupt?n:y,e.attempt(tD,x,g))}function y(v){return a.containerState.initialBlankLine=!0,o++,x(v)}function g(v){return Ye(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):n(v)}function x(v){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function aD(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(_c,s,o);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,tt(e,t,"listItemIndent",a.containerState.size+1)(f)}function o(f){return a.containerState.furtherBlankLines||!Ye(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(nD,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,tt(e,e.attempt(Bn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function rD(e,t,n){const a=this;return tt(e,s,"listItemIndent",a.containerState.size+1);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):n(o)}}function sD(e){e.exit(this.containerState.type)}function lD(e,t,n){const a=this;return tt(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=a.events[a.events.length-1];return!Ye(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const v0={name:"setextUnderline",resolveTo:oD,tokenize:cD};function oD(e,t){let n=e.length,a,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function cD(e,t,n){const a=this;let s;return o;function o(m){let y=a.events.length,g;for(;y--;)if(a.events[y][1].type!=="lineEnding"&&a.events[y][1].type!=="linePrefix"&&a.events[y][1].type!=="content"){g=a.events[y][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),s=m,c(m)):n(m)}function c(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===s?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),Ye(m)?tt(e,d,"lineSuffix")(m):d(m))}function d(m){return m===null||Oe(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const uD={tokenize:fD};function fD(e){const t=this,n=e.attempt(_c,a,e.attempt(this.parser.constructs.flowInitial,s,tt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(gj,s)),"linePrefix")));return n;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const dD={resolveAll:MS()},hD=RS("string"),mD=RS("text");function RS(e){return{resolveAll:MS(e==="text"?pD:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],o=n.attempt(s,c,f);return c;function c(y){return m(y)?o(y):f(y)}function f(y){if(y===null){n.consume(y);return}return n.enter("data"),n.consume(y),d}function d(y){return m(y)?(n.exit("data"),o(y)):(n.consume(y),d)}function m(y){if(y===null)return!0;const g=s[y];let x=-1;if(g)for(;++x<g.length;){const v=g[x];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function MS(e){return t;function t(n,a){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,a):n}}function pD(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],s=t.sliceStream(a);let o=s.length,c=-1,f=0,d;for(;o--;){const m=s[o];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)d=!0,f++;else if(m!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const m={type:n===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const gD={42:Bn,43:Bn,45:Bn,48:Bn,49:Bn,50:Bn,51:Bn,52:Bn,53:Bn,54:Bn,55:Bn,56:Bn,57:Bn,62:_S},bD={91:Ej},yD={[-2]:Tm,[-1]:Tm,32:Tm},xD={35:Tj,42:pf,45:[v0,pf],60:Rj,61:v0,95:pf,96:y0,126:y0},vD={38:NS,92:kS},ED={[-5]:Cm,[-4]:Cm,[-3]:Cm,33:Vj,38:NS,42:Ep,60:[WM,Bj],91:Wj,92:[kj,kS],93:vg,95:Ep,96:uj},SD={null:[Ep,dD]},wD={null:[42,95]},_D={null:[]},kD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:wD,contentInitial:bD,disable:_D,document:gD,flow:xD,flowInitial:yD,insideSpan:SD,string:vD,text:ED},Symbol.toStringTag,{value:"Module"}));function ND(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let c=[],f=[];const d={attempt:q(F),check:q(M),consume:A,enter:T,exit:j,interrupt:q(M,{interrupt:!0})},m={code:null,containerState:{},defineSkip:w,events:[],now:S,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:g};let y=t.tokenize.call(m,d);return t.resolveAll&&o.push(t),m;function g(P){return c=xi(c,P),k(),c[c.length-1]!==null?[]:(K(t,0),m.events=Jf(o,m.events,m),m.events)}function x(P,J){return CD(v(P),J)}function v(P){return TD(c,P)}function S(){const{_bufferIndex:P,_index:J,line:re,column:Q,offset:Y}=a;return{_bufferIndex:P,_index:J,line:re,column:Q,offset:Y}}function w(P){s[P.line]=P.column,D()}function k(){let P;for(;a._index<c.length;){const J=c[a._index];if(typeof J=="string")for(P=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===P&&a._bufferIndex<J.length;)_(J.charCodeAt(a._bufferIndex));else _(J)}}function _(P){y=y(P)}function A(P){Oe(P)?(a.line++,a.column=1,a.offset+=P===-3?2:1,D()):P!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=P}function T(P,J){const re=J||{};return re.type=P,re.start=S(),m.events.push(["enter",re,m]),f.push(re),re}function j(P){const J=f.pop();return J.end=S(),m.events.push(["exit",J,m]),J}function F(P,J){K(P,J.from)}function M(P,J){J.restore()}function q(P,J){return re;function re(Q,Y,U){let ae,G,he,O;return Array.isArray(Q)?Z(Q):"tokenize"in Q?Z([Q]):L(Q);function L(ve){return ce;function ce(ke){const Ke=ke!==null&&ve[ke],Dt=ke!==null&&ve.null,yn=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(Dt)?Dt:Dt?[Dt]:[]];return Z(yn)(ke)}}function Z(ve){return ae=ve,G=0,ve.length===0?U:C(ve[G])}function C(ve){return ce;function ce(ke){return O=te(),he=ve,ve.partial||(m.currentConstruct=ve),ve.name&&m.parser.constructs.disable.null.includes(ve.name)?_e():ve.tokenize.call(J?Object.assign(Object.create(m),J):m,d,pe,_e)(ke)}}function pe(ve){return P(he,O),Y}function _e(ve){return O.restore(),++G<ae.length?C(ae[G]):U}}}function K(P,J){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ai(m.events,J,m.events.length-J,P.resolve(m.events.slice(J),m)),P.resolveTo&&(m.events=P.resolveTo(m.events,m))}function te(){const P=S(),J=m.previous,re=m.currentConstruct,Q=m.events.length,Y=Array.from(f);return{from:Q,restore:U};function U(){a=P,m.previous=J,m.currentConstruct=re,m.events.length=Q,f=Y,D()}}function D(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function TD(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let c;if(n===s)c=[e[n].slice(a,o)];else{if(c=e.slice(n,s),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function CD(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const o=e[n];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
497
|
+
`;break}case-3:{c=`\r
|
|
498
|
+
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,a.push(c)}return a.join("")}function AD(e){const a={constructs:SS([kD,...(e||{}).extensions||[]]),content:s(HM),defined:[],document:s(GM),flow:s(uD),lazy:{},string:s(hD),text:s(mD)};return a;function s(o){return c;function c(f){return ND(a,o,f)}}}function OD(e){for(;!TS(e););return e}const E0=/[\0\t\n\r]/g;function RD(){let e=1,t="",n=!0,a;return s;function s(o,c,f){const d=[];let m,y,g,x,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),g=0,t="",n&&(o.charCodeAt(0)===65279&&g++,n=void 0);g<o.length;){if(E0.lastIndex=g,m=E0.exec(o),x=m&&m.index!==void 0?m.index:o.length,v=o.charCodeAt(x),!m){t=o.slice(g);break}if(v===10&&g===x&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),g<x&&(d.push(o.slice(g,x)),e+=x-g),v){case 0:{d.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,d.push(-2);e++<y;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:a=!0,e=1}g=x+1}return f&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const MD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jD(e){return e.replace(MD,DD)}function DD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return wS(n.slice(o?2:1),o?16:10)}return xg(n)||e}const jS={}.hasOwnProperty;function LD(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),ID(n)(OD(AD(n).document().write(RD()(e,t,!0))))}function ID(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(zi),autolinkProtocol:te,autolinkEmail:te,atxHeading:o(Ii),blockQuote:o(Dt),characterEscape:te,characterReference:te,codeFenced:o(yn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(yn,c),codeText:o(Ji,c),codeTextData:te,data:te,codeFlowValue:te,definition:o(Ra),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Kn),hardBreakEscape:o(Ze),hardBreakTrailing:o(Ze),htmlFlow:o(_i,c),htmlFlowData:te,htmlText:o(_i,c),htmlTextData:te,image:o(li),label:c,link:o(zi),listItem:o(Tr),listItemValue:x,listOrdered:o(ea,g),listUnordered:o(ea),paragraph:o(Gl),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Ii),strong:o(bs),thematicBreak:o(ys)},exit:{atxHeading:d(),atxHeadingSequence:F,autolink:d(),autolinkEmail:Ke,autolinkProtocol:ke,blockQuote:d(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:ve,characterReference:ce,codeFenced:d(k),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:D,codeIndented:d(_),codeText:d(Y),codeTextData:D,data:D,definition:d(),definitionDestinationString:j,definitionLabelString:A,definitionTitleString:T,emphasis:d(),hardBreakEscape:d(J),hardBreakTrailing:d(J),htmlFlow:d(re),htmlFlowData:D,htmlText:d(Q),htmlTextData:D,image:d(ae),label:he,labelText:G,lineEnding:P,link:d(U),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:pe,resourceDestinationString:O,resourceTitleString:L,resource:Z,setextHeading:d(K),setextHeadingLineSequence:q,setextHeadingText:M,strong:d(),thematicBreak:d()}};DS(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ne){let de={type:"root",children:[]};const Re={stack:[de],tokenStack:[],config:t,enter:f,exit:m,buffer:c,resume:y,data:n},qe=[];let nt=-1;for(;++nt<ne.length;)if(ne[nt][1].type==="listOrdered"||ne[nt][1].type==="listUnordered")if(ne[nt][0]==="enter")qe.push(nt);else{const xn=qe.pop();nt=s(ne,xn,nt)}for(nt=-1;++nt<ne.length;){const xn=t[ne[nt][0]];jS.call(xn,ne[nt][1].type)&&xn[ne[nt][1].type].call(Object.assign({sliceSerialize:ne[nt][2].sliceSerialize},Re),ne[nt][1])}if(Re.tokenStack.length>0){const xn=Re.tokenStack[Re.tokenStack.length-1];(xn[1]||S0).call(Re,void 0,xn[0])}for(de.position={start:or(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:or(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)de=t.transforms[nt](de)||de;return de}function s(ne,de,Re){let qe=de-1,nt=-1,xn=!1,ki,an,Lt,un;for(;++qe<=Re;){const ot=ne[qe];switch(ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ot[0]==="enter"?nt++:nt--,un=void 0;break}case"lineEndingBlank":{ot[0]==="enter"&&(ki&&!un&&!nt&&!Lt&&(Lt=qe),un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:un=void 0}if(!nt&&ot[0]==="enter"&&ot[1].type==="listItemPrefix"||nt===-1&&ot[0]==="exit"&&(ot[1].type==="listUnordered"||ot[1].type==="listOrdered")){if(ki){let Bi=qe;for(an=void 0;Bi--;){const vn=ne[Bi];if(vn[1].type==="lineEnding"||vn[1].type==="lineEndingBlank"){if(vn[0]==="exit")continue;an&&(ne[an][1].type="lineEndingBlank",xn=!0),vn[1].type="lineEnding",an=Bi}else if(!(vn[1].type==="linePrefix"||vn[1].type==="blockQuotePrefix"||vn[1].type==="blockQuotePrefixWhitespace"||vn[1].type==="blockQuoteMarker"||vn[1].type==="listItemIndent"))break}Lt&&(!an||Lt<an)&&(ki._spread=!0),ki.end=Object.assign({},an?ne[an][1].start:ot[1].end),ne.splice(an||qe,0,["exit",ki,ot[2]]),qe++,Re++}if(ot[1].type==="listItemPrefix"){const Bi={type:"listItem",_spread:!1,start:Object.assign({},ot[1].start),end:void 0};ki=Bi,ne.splice(qe,0,["enter",Bi,ot[2]]),qe++,Re++,Lt=void 0,un=!0}}}return ne[de][1]._spread=xn,Re}function o(ne,de){return Re;function Re(qe){f.call(this,ne(qe),qe),de&&de.call(this,qe)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ne,de,Re){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([de,Re||void 0]),ne.position={start:or(de.start),end:void 0}}function d(ne){return de;function de(Re){ne&&ne.call(this,Re),m.call(this,Re)}}function m(ne,de){const Re=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==ne.type&&(de?de.call(this,ne,qe[0]):(qe[1]||S0).call(this,ne,qe[0]));else throw new Error("Cannot close `"+ne.type+"` ("+Jo({start:ne.start,end:ne.end})+"): it’s not open");Re.position.end=or(ne.end)}function y(){return yg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x(ne){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.lang=ne}function S(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.meta=ne}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne.replace(/(\r?\n|\r)$/g,"")}function A(ne){const de=this.resume(),Re=this.stack[this.stack.length-1];Re.label=de,Re.identifier=Mi(this.sliceSerialize(ne)).toLowerCase()}function T(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.title=ne}function j(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.url=ne}function F(ne){const de=this.stack[this.stack.length-1];if(!de.depth){const Re=this.sliceSerialize(ne).length;de.depth=Re}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function q(ne){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function K(){this.data.setextHeadingSlurpLineEnding=void 0}function te(ne){const Re=this.stack[this.stack.length-1].children;let qe=Re[Re.length-1];(!qe||qe.type!=="text")&&(qe=Ot(),qe.position={start:or(ne.start),end:void 0},Re.push(qe)),this.stack.push(qe)}function D(ne){const de=this.stack.pop();de.value+=this.sliceSerialize(ne),de.position.end=or(ne.end)}function P(ne){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=de.children[de.children.length-1];Re.position.end=or(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(de.type)&&(te.call(this,ne),D.call(this,ne))}function J(){this.data.atHardBreak=!0}function re(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function Q(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function Y(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function U(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=de,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function ae(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=de,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function G(ne){const de=this.sliceSerialize(ne),Re=this.stack[this.stack.length-2];Re.label=jD(de),Re.identifier=Mi(de).toLowerCase()}function he(){const ne=this.stack[this.stack.length-1],de=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const qe=ne.children;Re.children=qe}else Re.alt=de}function O(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.url=ne}function L(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.title=ne}function Z(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function pe(ne){const de=this.resume(),Re=this.stack[this.stack.length-1];Re.label=de,Re.identifier=Mi(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function _e(ne){this.data.characterReferenceType=ne.type}function ve(ne){const de=this.sliceSerialize(ne),Re=this.data.characterReferenceType;let qe;Re?(qe=wS(de,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=xg(de);const nt=this.stack[this.stack.length-1];nt.value+=qe}function ce(ne){const de=this.stack.pop();de.position.end=or(ne.end)}function ke(ne){D.call(this,ne);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(ne)}function Ke(ne){D.call(this,ne);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(ne)}function Dt(){return{type:"blockquote",children:[]}}function yn(){return{type:"code",lang:null,meta:null,value:""}}function Ji(){return{type:"inlineCode",value:""}}function Ra(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Kn(){return{type:"emphasis",children:[]}}function Ii(){return{type:"heading",depth:0,children:[]}}function Ze(){return{type:"break"}}function _i(){return{type:"html",value:""}}function li(){return{type:"image",title:null,url:"",alt:null}}function zi(){return{type:"link",title:null,url:"",children:[]}}function ea(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function Tr(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function Gl(){return{type:"paragraph",children:[]}}function bs(){return{type:"strong",children:[]}}function Ot(){return{type:"text",value:""}}function ys(){return{type:"thematicBreak"}}}function or(e){return{line:e.line,column:e.column,offset:e.offset}}function DS(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?DS(e,a):zD(e,a)}}function zD(e,t){let n;for(n in t)if(jS.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function S0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Jo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Jo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Jo({start:t.start,end:t.end})+") is still open")}function BD(e){const t=this;t.parser=n;function n(a){return LD(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function UD(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function $D(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
499
|
+
`}]}function FD(e,t){const n=t.value?t.value+`
|
|
500
|
+
`:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function PD(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qD(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HD(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=Kl(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,f+=1,e.footnoteCounts.set(a,f);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,d);const m={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,m),e.applyData(t,m)}function KD(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GD(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function LS(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function QD(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return LS(e,t);const s={src:Kl(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function YD(e,t){const n={src:Kl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function VD(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function XD(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return LS(e,t);const s={href:Kl(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function WD(e,t){const n={href:Kl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function ZD(e,t,n){const a=e.all(t),s=n?JD(n):IS(t),o={},c=[];if(typeof t.checked=="boolean"){const y=a[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},a.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const y=a[f];(s||f!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
|
|
501
|
+
`}),y.type==="element"&&y.tagName==="p"&&!s?c.push(...y.children):c.push(y)}const d=a[a.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
|
|
502
|
+
`});const m={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,m),e.applyData(t,m)}function JD(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=IS(n[a])}return t}function IS(e){const t=e.spread;return t??e.children.length>1}function eL(e,t){const n={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function tL(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nL(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function iL(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aL(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),s.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=mg(t.children[1]),d=pS(t.children[t.children.length-1]);f&&d&&(c.position={start:f,end:d}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function rL(e,t,n){const a=n?n.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,f=c?c.length:t.children.length;let d=-1;const m=[];for(;++d<f;){const g=t.children[d],x={},v=c?c[d]:void 0;v&&(x.align=v);let S={type:"element",tagName:o,properties:x,children:[]};g&&(S.children=e.all(g),e.patch(g,S),S=e.applyData(g,S)),m.push(S)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,y),e.applyData(t,y)}function sL(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const w0=9,_0=32;function lL(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const o=[];for(;a;)o.push(k0(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return o.push(k0(t.slice(s),s>0,!1)),o.join("")}function k0(e,t,n){let a=0,s=e.length;if(t){let o=e.codePointAt(a);for(;o===w0||o===_0;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(s-1);for(;o===w0||o===_0;)s--,o=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function oL(e,t){const n={type:"text",value:lL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function cL(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const uL={blockquote:UD,break:$D,code:FD,delete:PD,emphasis:qD,footnoteReference:HD,heading:KD,html:GD,imageReference:QD,image:YD,inlineCode:VD,linkReference:XD,link:WD,listItem:ZD,list:eL,paragraph:tL,root:nL,strong:iL,table:aL,tableCell:sL,tableRow:rL,text:oL,thematicBreak:cL,toml:Zu,yaml:Zu,definition:Zu,footnoteDefinition:Zu};function Zu(){}const zS=-1,ed=0,tc=1,Nf=2,Eg=3,Sg=4,wg=5,_g=6,BS=7,US=8,N0=typeof self=="object"?self:globalThis,fL=(e,t)=>{const n=(s,o)=>(e.set(o,s),s),a=s=>{if(e.has(s))return e.get(s);const[o,c]=t[s];switch(o){case ed:case zS:return n(c,s);case tc:{const f=n([],s);for(const d of c)f.push(a(d));return f}case Nf:{const f=n({},s);for(const[d,m]of c)f[a(d)]=a(m);return f}case Eg:return n(new Date(c),s);case Sg:{const{source:f,flags:d}=c;return n(new RegExp(f,d),s)}case wg:{const f=n(new Map,s);for(const[d,m]of c)f.set(a(d),a(m));return f}case _g:{const f=n(new Set,s);for(const d of c)f.add(a(d));return f}case BS:{const{name:f,message:d}=c;return n(new N0[f](d),s)}case US:return n(BigInt(c),s);case"BigInt":return n(Object(BigInt(c)),s);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return n(new DataView(f),c)}}return n(new N0[o](c),s)};return a},T0=e=>fL(new Map,e)(0),rl="",{toString:dL}={},{keys:hL}=Object,Yo=e=>{const t=typeof e;if(t!=="object"||!e)return[ed,t];const n=dL.call(e).slice(8,-1);switch(n){case"Array":return[tc,rl];case"Object":return[Nf,rl];case"Date":return[Eg,rl];case"RegExp":return[Sg,rl];case"Map":return[wg,rl];case"Set":return[_g,rl];case"DataView":return[tc,n]}return n.includes("Array")?[tc,n]:n.includes("Error")?[BS,n]:[Nf,n]},Ju=([e,t])=>e===ed&&(t==="function"||t==="symbol"),mL=(e,t,n,a)=>{const s=(c,f)=>{const d=a.push(c)-1;return n.set(f,d),d},o=c=>{if(n.has(c))return n.get(c);let[f,d]=Yo(c);switch(f){case ed:{let y=c;switch(d){case"bigint":f=US,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);y=null;break;case"undefined":return s([zS],c)}return s([f,y],c)}case tc:{if(d){let x=c;return d==="DataView"?x=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(x=new Uint8Array(c)),s([d,[...x]],c)}const y=[],g=s([f,y],c);for(const x of c)y.push(o(x));return g}case Nf:{if(d)switch(d){case"BigInt":return s([d,c.toString()],c);case"Boolean":case"Number":case"String":return s([d,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const y=[],g=s([f,y],c);for(const x of hL(c))(e||!Ju(Yo(c[x])))&&y.push([o(x),o(c[x])]);return g}case Eg:return s([f,c.toISOString()],c);case Sg:{const{source:y,flags:g}=c;return s([f,{source:y,flags:g}],c)}case wg:{const y=[],g=s([f,y],c);for(const[x,v]of c)(e||!(Ju(Yo(x))||Ju(Yo(v))))&&y.push([o(x),o(v)]);return g}case _g:{const y=[],g=s([f,y],c);for(const x of c)(e||!Ju(Yo(x)))&&y.push(o(x));return g}}const{message:m}=c;return s([f,{name:d,message:m}],c)};return o},C0=(e,{json:t,lossy:n}={})=>{const a=[];return mL(!(t||n),!!t,new Map,a)(e),a},Tf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?T0(C0(e,t)):structuredClone(e):(e,t)=>T0(C0(e,t));function pL(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function gL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function bL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pL,a=e.options.footnoteBackLabel||gL,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[d]);if(!m)continue;const y=e.all(m),g=String(m.identifier).toUpperCase(),x=Kl(g.toLowerCase());let v=0;const S=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++v<=w;){S.length>0&&S.push({type:"text",value:" "});let A=typeof n=="string"?n:n(d,v);typeof A=="string"&&(A={type:"text",value:A}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(d,v),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const k=y[y.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const A=k.children[k.children.length-1];A&&A.type==="text"?A.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...S)}else y.push(...S);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(y,!0)};e.patch(m,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Tf(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
503
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
504
|
+
`}]}}const kc=(function(e){if(e==null)return EL;if(typeof e=="function")return td(e);if(typeof e=="object")return Array.isArray(e)?yL(e):xL(e);if(typeof e=="string")return vL(e);throw new Error("Expected function, string, or object as test")});function yL(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kc(e[n]);return td(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function xL(e){const t=e;return td(n);function n(a){const s=a;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function vL(e){return td(t);function t(n){return n&&n.type===e}}function td(e){return t;function t(n,a,s){return!!(SL(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function EL(){return!0}function SL(e){return e!==null&&typeof e=="object"&&"type"in e}const $S=[],wL=!0,Sp=!1,_L="skip";function FS(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const o=kc(s),c=a?-1:1;f(e,void 0,[])();function f(d,m,y){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const v=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=$S,S,w,k;if((!t||o(d,m,y[y.length-1]||void 0))&&(v=kL(n(d,y)),v[0]===Sp))return v;if("children"in d&&d.children){const _=d;if(_.children&&v[0]!==_L)for(w=(a?_.children.length:-1)+c,k=y.concat(_);w>-1&&w<_.children.length;){const A=_.children[w];if(S=f(A,w,k)(),S[0]===Sp)return S;w=typeof S[1]=="number"?S[1]:w+c}}return v}}}function kL(e){return Array.isArray(e)?e:typeof e=="number"?[wL,e]:e==null?$S:[e]}function nd(e,t,n,a){let s,o,c;typeof t=="function"&&typeof n!="function"?(o=void 0,c=t,s=n):(o=t,c=n,s=a),FS(e,o,f,s);function f(d,m){const y=m[m.length-1],g=y?y.children.indexOf(d):void 0;return c(d,g,y)}}const wp={}.hasOwnProperty,NL={};function TL(e,t){const n=t||NL,a=new Map,s=new Map,o=new Map,c={...uL,...n.handlers},f={all:m,applyData:AL,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:d,options:n,patch:CL,wrap:RL};return nd(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?a:s,x=String(y.identifier).toUpperCase();g.has(x)||g.set(x,y)}}),f;function d(y,g){const x=y.type,v=f.handlers[x];if(wp.call(f.handlers,x)&&v)return v(f,y,g);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in y){const{children:w,...k}=y,_=Tf(k);return _.children=f.all(y),_}return Tf(y)}return(f.options.unknownHandler||OL)(f,y,g)}function m(y){const g=[];if("children"in y){const x=y.children;let v=-1;for(;++v<x.length;){const S=f.one(x[v],y);if(S){if(v&&x[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=A0(S.value)),!Array.isArray(S)&&S.type==="element")){const w=S.children[0];w&&w.type==="text"&&(w.value=A0(w.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function CL(e,t){e.position&&(t.position=gM(e))}function AL(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const c="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:c}}n.type==="element"&&o&&Object.assign(n.properties,Tf(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function OL(e,t){const n=t.data||{},a="value"in t&&!(wp.call(n,"hProperties")||wp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function RL(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
|
|
505
|
+
`});++a<e.length;)a&&n.push({type:"text",value:`
|
|
506
|
+
`}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
507
|
+
`}),n}function A0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function O0(e,t){const n=TL(e,t),a=n.one(e,void 0),s=bL(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
|
|
508
|
+
`},s),o}function ML(e,t){return e&&"run"in e?async function(n,a){const s=O0(n,{file:a,...t});await e.run(s,a)}:function(n,a){return O0(n,{file:a,...e||t})}}function R0(e){if(e)throw e}var Am,M0;function jL(){if(M0)return Am;M0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},o=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var y=e.call(m,"constructor"),g=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!y&&!g)return!1;var x;for(x in m);return typeof x>"u"||e.call(m,x)},c=function(m,y){n&&y.name==="__proto__"?n(m,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):m[y.name]=y.newValue},f=function(m,y){if(y==="__proto__")if(e.call(m,y)){if(a)return a(m,y).value}else return;return m[y]};return Am=function d(){var m,y,g,x,v,S,w=arguments[0],k=1,_=arguments.length,A=!1;for(typeof w=="boolean"&&(A=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<_;++k)if(m=arguments[k],m!=null)for(y in m)g=f(w,y),x=f(m,y),w!==x&&(A&&x&&(o(x)||(v=s(x)))?(v?(v=!1,S=g&&s(g)?g:[]):S=g&&o(g)?g:{},c(w,{name:y,newValue:d(A,S,x)})):typeof x<"u"&&c(w,{name:y,newValue:x}));return w},Am}var DL=jL();const Om=Ap(DL);function _p(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function LL(){const e=[],t={run:n,use:a};return t;function n(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(d,...m){const y=e[++o];let g=-1;if(d){c(d);return}for(;++g<s.length;)(m[g]===null||m[g]===void 0)&&(m[g]=s[g]);s=m,y?IL(y,f)(...m):c(null,...m)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function IL(e,t){let n;return a;function a(...c){const f=e.length>c.length;let d;f&&c.push(s);try{d=e.apply(this,c)}catch(m){const y=m;if(f&&n)throw y;return s(y)}f||(d&&d.then&&typeof d.then=="function"?d.then(o,s):d instanceof Error?s(d):o(d))}function s(c,...f){n||(n=!0,t(c,...f))}function o(c){s(null,c)}}const Ki={basename:zL,dirname:BL,extname:UL,join:$L,sep:"/"};function zL(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Nc(e);let n=0,a=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else a<0&&(o=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else c<0&&(o=!0,c=s+1),f>-1&&(e.codePointAt(s)===t.codePointAt(f--)?f<0&&(a=s):(f=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function BL(e){if(Nc(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function UL(e){Nc(e);let t=e.length,n=-1,a=0,s=-1,o=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),f===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function $L(...e){let t=-1,n;for(;++t<e.length;)Nc(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":FL(n)}function FL(e){Nc(e);const t=e.codePointAt(0)===47;let n=PL(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function PL(e,t){let n="",a=0,s=-1,o=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",a=0):(n=n.slice(0,d),a=n.length-1-n.lastIndexOf("/")),s=c,o=0;continue}}else if(n.length>0){n="",a=0,s=c,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,c):n=e.slice(s+1,c),a=c-s-1;s=c,o=0}else f===46&&o>-1?o++:o=-1}return n}function Nc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const qL={cwd:HL};function HL(){return"/"}function kp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function KL(e){if(typeof e=="string")e=new URL(e);else if(!kp(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return GL(e)}function GL(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Rm=["history","path","basename","stem","extname","dirname"];class PS{constructor(t){let n;t?kp(t)?n={path:t}:typeof t=="string"||QL(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":qL.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Rm.length;){const o=Rm[a];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)Rm.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ki.basename(this.path):void 0}set basename(t){jm(t,"basename"),Mm(t,"basename"),this.path=Ki.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ki.dirname(this.path):void 0}set dirname(t){j0(this.basename,"dirname"),this.path=Ki.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ki.extname(this.path):void 0}set extname(t){if(Mm(t,"extname"),j0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ki.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kp(t)&&(t=KL(t)),jm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ki.basename(this.path,this.extname):void 0}set stem(t){jm(t,"stem"),Mm(t,"stem"),this.path=Ki.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const s=this.message(t,n,a);throw s.fatal=!0,s}info(t,n,a){const s=this.message(t,n,a);return s.fatal=void 0,s}message(t,n,a){const s=new bn(t,n,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Mm(e,t){if(e&&e.includes(Ki.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ki.sep+"`")}function jm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function j0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function QL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const YL=(function(e){const a=this.constructor.prototype,s=a[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),VL={}.hasOwnProperty;class kg extends YL{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=LL()}copy(){const t=new kg;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Om(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Im("data",this.frozen),this.namespace[t]=n,this):VL.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Im("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=n.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ef(t),a=this.parser||this.Parser;return Dm("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),Dm("process",this.parser||this.Parser),Lm("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,c){const f=ef(t),d=a.parse(f);a.run(d,f,function(y,g,x){if(y||!g||!x)return m(y);const v=g,S=a.stringify(v,x);ZL(S)?x.value=S:x.result=S,m(y,x)});function m(y,g){y||!g?c(y):o?o(g):n(void 0,g)}}}processSync(t){let n=!1,a;return this.freeze(),Dm("processSync",this.parser||this.Parser),Lm("processSync",this.compiler||this.Compiler),this.process(t,s),L0("processSync","process",n),a;function s(o,c){n=!0,R0(o),a=c}}run(t,n,a){D0(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?o(void 0,a):new Promise(o);function o(c,f){const d=ef(n);s.run(t,d,m);function m(y,g,x){const v=g||t;y?f(y):c?c(v):a(void 0,v,x)}}}runSync(t,n){let a=!1,s;return this.run(t,n,o),L0("runSync","run",a),s;function o(c,f){R0(c),s=f,a=!0}}stringify(t,n){this.freeze();const a=ef(n),s=this.compiler||this.Compiler;return Lm("stringify",s),D0(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(Im("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(m){if(typeof m=="function")d(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[y,...g]=m;d(y,g)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(m.plugins),m.settings&&(s.settings=Om(!0,s.settings,m.settings))}function f(m){let y=-1;if(m!=null)if(Array.isArray(m))for(;++y<m.length;){const g=m[y];o(g)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function d(m,y){let g=-1,x=-1;for(;++g<a.length;)if(a[g][0]===m){x=g;break}if(x===-1)a.push([m,...y]);else if(y.length>0){let[v,...S]=y;const w=a[x][1];_p(w)&&_p(v)&&(v=Om(!0,w,v)),a[x]=[m,v,...S]}}}}const XL=new kg().freeze();function Dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Lm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Im(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function D0(e){if(!_p(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function L0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ef(e){return WL(e)?e:new PS(e)}function WL(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ZL(e){return typeof e=="string"||JL(e)}function JL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const e3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",I0=[],z0={allowDangerousHtml:!0},t3=/^(https?|ircs?|mailto|xmpp)$/i,n3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ng(e){const t=i3(e),n=a3(e);return r3(t.runSync(t.parse(n),n),e)}function i3(e){const t=e.rehypePlugins||I0,n=e.remarkPlugins||I0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...z0}:z0;return XL().use(BD).use(n).use(ML,a).use(t)}function a3(e){const t=e.children||"",n=new PS;return typeof t=="string"&&(n.value=t),n}function r3(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||s3;for(const y of n3)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+e3+y.id,void 0);return nd(e,m),EM(e,{Fragment:h.Fragment,components:s,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function m(y,g,x){if(y.type==="raw"&&x&&typeof g=="number")return c?x.children.splice(g,1):x.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let v;for(v in Nm)if(Object.hasOwn(Nm,v)&&Object.hasOwn(y.properties,v)){const S=y.properties[v],w=Nm[v];(w===null||w.includes(y.tagName))&&(y.properties[v]=d(String(S||""),v,y))}}if(y.type==="element"){let v=n?!n.includes(y.tagName):o?o.includes(y.tagName):!1;if(!v&&a&&typeof g=="number"&&(v=!a(y,g,x)),v&&x&&typeof g=="number")return f&&y.children?x.children.splice(g,1,...y.children):x.children.splice(g,1),g}}}function s3(e){const t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||a!==-1&&t>a||t3.test(e.slice(0,t))?e:""}function B0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,s=n.indexOf(t);for(;s!==-1;)a++,s=n.indexOf(t,s+t.length);return a}function l3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function o3(e,t,n){const s=kc((n||{}).ignore||[]),o=c3(t);let c=-1;for(;++c<o.length;)FS(e,"text",f);function f(m,y){let g=-1,x;for(;++g<y.length;){const v=y[g],S=x?x.children:void 0;if(s(v,S?S.indexOf(v):void 0,x))return;x=v}if(x)return d(m,y)}function d(m,y){const g=y[y.length-1],x=o[c][0],v=o[c][1];let S=0;const k=g.children.indexOf(m);let _=!1,A=[];x.lastIndex=0;let T=x.exec(m.value);for(;T;){const j=T.index,F={index:T.index,input:T.input,stack:[...y,m]};let M=v(...T,F);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?x.lastIndex=j+1:(S!==j&&A.push({type:"text",value:m.value.slice(S,j)}),Array.isArray(M)?A.push(...M):M&&A.push(M),S=j+T[0].length,_=!0),!x.global)break;T=x.exec(m.value)}return _?(S<m.value.length&&A.push({type:"text",value:m.value.slice(S)}),g.children.splice(k,1,...A)):A=[m],k+A.length}}function c3(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<n.length;){const s=n[a];t.push([u3(s[0]),f3(s[1])])}return t}function u3(e){return typeof e=="string"?new RegExp(l3(e),"g"):e}function f3(e){return typeof e=="function"?e:function(){return e}}const zm="phrasing",Bm=["autolink","link","image","label"];function d3(){return{transforms:[x3],enter:{literalAutolink:m3,literalAutolinkEmail:Um,literalAutolinkHttp:Um,literalAutolinkWww:Um},exit:{literalAutolink:y3,literalAutolinkEmail:b3,literalAutolinkHttp:p3,literalAutolinkWww:g3}}}function h3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zm,notInConstruct:Bm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zm,notInConstruct:Bm},{character:":",before:"[ps]",after:"\\/",inConstruct:zm,notInConstruct:Bm}]}}function m3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Um(e){this.config.enter.autolinkProtocol.call(this,e)}function p3(e){this.config.exit.autolinkProtocol.call(this,e)}function g3(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function b3(e){this.config.exit.autolinkEmail.call(this,e)}function y3(e){this.exit(e)}function x3(e){o3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,v3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),E3]],{ignore:["link","linkReference"]})}function v3(e,t,n,a,s){let o="";if(!qS(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!S3(n)))return!1;const c=w3(n+a);if(!c[0])return!1;const f={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function E3(e,t,n,a){return!qS(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function S3(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function w3(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const s=B0(e,"(");let o=B0(e,")");for(;a!==-1&&s>o;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),o++;return[e,n]}function qS(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||fs(n)||Zf(n))&&(!t||n!==47)}HS.peek=M3;function _3(){this.buffer()}function k3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function N3(){this.buffer()}function T3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function C3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function A3(e){this.exit(e)}function O3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function R3(e){this.exit(e)}function M3(){return"["}function HS(e,t,n,a){const s=n.createTracker(a);let o=s.move("[^");const c=n.enter("footnoteReference"),f=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),f(),c(),o+=s.move("]"),o}function j3(){return{enter:{gfmFootnoteCallString:_3,gfmFootnoteCall:k3,gfmFootnoteDefinitionLabelString:N3,gfmFootnoteDefinition:T3},exit:{gfmFootnoteCallString:C3,gfmFootnoteCall:A3,gfmFootnoteDefinitionLabelString:O3,gfmFootnoteDefinition:R3}}}function D3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:HS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,o,c){const f=o.createTracker(c);let d=f.move("[^");const m=o.enter("footnoteDefinition"),y=o.enter("label");return d+=f.move(o.safe(o.associationId(a),{before:d,after:"]"})),y(),d+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),d+=f.move((t?`
|
|
509
|
+
`:" ")+o.indentLines(o.containerFlow(a,f.current()),t?KS:L3))),m(),d}}function L3(e,t,n){return t===0?e:KS(e,t,n)}function KS(e,t,n){return(n?"":" ")+e}const I3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];GS.peek=F3;function z3(){return{canContainEols:["delete"],enter:{strikethrough:U3},exit:{strikethrough:$3}}}function B3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:I3}],handlers:{delete:GS}}}function U3(e){this.enter({type:"delete",children:[]},e)}function $3(e){this.exit(e)}function GS(e,t,n,a){const s=n.createTracker(a),o=n.enter("strikethrough");let c=s.move("~~");return c+=n.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),o(),c}function F3(){return"~"}function P3(e){return e.length}function q3(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||P3,o=[],c=[],f=[],d=[];let m=0,y=-1;for(;++y<e.length;){const w=[],k=[];let _=-1;for(e[y].length>m&&(m=e[y].length);++_<e[y].length;){const A=H3(e[y][_]);if(n.alignDelimiters!==!1){const T=s(A);k[_]=T,(d[_]===void 0||T>d[_])&&(d[_]=T)}w.push(A)}c[y]=w,f[y]=k}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<m;)o[g]=U0(a[g]);else{const w=U0(a);for(;++g<m;)o[g]=w}g=-1;const x=[],v=[];for(;++g<m;){const w=o[g];let k="",_="";w===99?(k=":",_=":"):w===108?k=":":w===114&&(_=":");let A=n.alignDelimiters===!1?1:Math.max(1,d[g]-k.length-_.length);const T=k+"-".repeat(A)+_;n.alignDelimiters!==!1&&(A=k.length+A+_.length,A>d[g]&&(d[g]=A),v[g]=A),x[g]=T}c.splice(1,0,x),f.splice(1,0,v),y=-1;const S=[];for(;++y<c.length;){const w=c[y],k=f[y];g=-1;const _=[];for(;++g<m;){const A=w[g]||"";let T="",j="";if(n.alignDelimiters!==!1){const F=d[g]-(k[g]||0),M=o[g];M===114?T=" ".repeat(F):M===99?F%2?(T=" ".repeat(F/2+.5),j=" ".repeat(F/2-.5)):(T=" ".repeat(F/2),j=T):j=" ".repeat(F)}n.delimiterStart!==!1&&!g&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||g)&&_.push(" "),n.alignDelimiters!==!1&&_.push(T),_.push(A),n.alignDelimiters!==!1&&_.push(j),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||g!==m-1)&&_.push("|")}S.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return S.join(`
|
|
510
|
+
`)}function H3(e){return e==null?"":String(e)}function U0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function K3(e,t,n,a){const s=n.enter("blockquote"),o=n.createTracker(a);o.move("> "),o.shift(2);const c=n.indentLines(n.containerFlow(e,o.current()),G3);return s(),c}function G3(e,t,n){return">"+(n?"":" ")+e}function Q3(e,t){return $0(e,t.inConstruct,!0)&&!$0(e,t.notInConstruct,!1)}function $0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function F0(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
511
|
+
`&&Q3(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
512
|
+
`}function Y3(e,t){const n=String(e);let a=n.indexOf(t),s=a,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++o>c&&(c=o):o=1,s=a+t.length,a=n.indexOf(t,s);return c}function V3(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function X3(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function W3(e,t,n,a){const s=X3(n),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(V3(e,n)){const g=n.enter("codeIndented"),x=n.indentLines(o,Z3);return g(),x}const f=n.createTracker(a),d=s.repeat(Math.max(Y3(o,s)+1,3)),m=n.enter("codeFenced");let y=f.move(d);if(e.lang){const g=n.enter(`codeFencedLang${c}`);y+=f.move(n.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${c}`);y+=f.move(" "),y+=f.move(n.safe(e.meta,{before:y,after:`
|
|
513
|
+
`,encode:["`"],...f.current()})),g()}return y+=f.move(`
|
|
514
|
+
`),o&&(y+=f.move(o+`
|
|
515
|
+
`)),y+=f.move(d),m(),y}function Z3(e,t,n){return(n?"":" ")+e}function Tg(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function J3(e,t,n,a){const s=Tg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let f=n.enter("label");const d=n.createTracker(a);let m=d.move("[");return m+=d.move(n.safe(n.associationId(e),{before:m,after:"]",...d.current()})),m+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=d.move("<"),m+=d.move(n.safe(e.url,{before:m,after:">",...d.current()})),m+=d.move(">")):(f=n.enter("destinationRaw"),m+=d.move(n.safe(e.url,{before:m,after:e.title?" ":`
|
|
516
|
+
`,...d.current()}))),f(),e.title&&(f=n.enter(`title${o}`),m+=d.move(" "+s),m+=d.move(n.safe(e.title,{before:m,after:s,...d.current()})),m+=d.move(s),f()),c(),m}function eI(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function fc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Cf(e,t,n){const a=Rl(e),s=Rl(t);return a===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}QS.peek=tI;function QS(e,t,n,a){const s=eI(n),o=n.enter("emphasis"),c=n.createTracker(a),f=c.move(s);let d=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const m=d.charCodeAt(0),y=Cf(a.before.charCodeAt(a.before.length-1),m,s);y.inside&&(d=fc(m)+d.slice(1));const g=d.charCodeAt(d.length-1),x=Cf(a.after.charCodeAt(0),g,s);x.inside&&(d=d.slice(0,-1)+fc(g));const v=c.move(s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+d+v}function tI(e,t,n){return n.options.emphasis||"*"}function nI(e,t){let n=!1;return nd(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Sp}),!!((!e.depth||e.depth<3)&&yg(e)&&(t.options.setext||n))}function iI(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(a);if(nI(e,n)){const y=n.enter("headingSetext"),g=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
|
|
517
|
+
`,after:`
|
|
518
|
+
`});return g(),y(),x+`
|
|
519
|
+
`+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
520
|
+
`))+1))}const c="#".repeat(s),f=n.enter("headingAtx"),d=n.enter("phrasing");o.move(c+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
|
|
521
|
+
`,...o.current()});return/^[\t ]/.test(m)&&(m=fc(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,n.options.closeAtx&&(m+=" "+c),d(),f(),m}YS.peek=aI;function YS(e){return e.value||""}function aI(){return"<"}VS.peek=rI;function VS(e,t,n,a){const s=Tg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let f=n.enter("label");const d=n.createTracker(a);let m=d.move("![");return m+=d.move(n.safe(e.alt,{before:m,after:"]",...d.current()})),m+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=d.move("<"),m+=d.move(n.safe(e.url,{before:m,after:">",...d.current()})),m+=d.move(">")):(f=n.enter("destinationRaw"),m+=d.move(n.safe(e.url,{before:m,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=n.enter(`title${o}`),m+=d.move(" "+s),m+=d.move(n.safe(e.title,{before:m,after:s,...d.current()})),m+=d.move(s),f()),m+=d.move(")"),c(),m}function rI(){return"!"}XS.peek=sI;function XS(e,t,n,a){const s=e.referenceType,o=n.enter("imageReference");let c=n.enter("label");const f=n.createTracker(a);let d=f.move("![");const m=n.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(m+"]["),c();const y=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...f.current()});return c(),n.stack=y,o(),s==="full"||!m||m!==g?d+=f.move(g+"]"):s==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function sI(){return"!"}WS.peek=lI;function WS(e,t,n){let a=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<n.unsafe.length;){const c=n.unsafe[o],f=n.compilePattern(c);let d;if(c.atBreak)for(;d=f.exec(a);){let m=d.index;a.charCodeAt(m)===10&&a.charCodeAt(m-1)===13&&m--,a=a.slice(0,m)+" "+a.slice(d.index+1)}}return s+a+s}function lI(){return"`"}function ZS(e,t){const n=yg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}JS.peek=oI;function JS(e,t,n,a){const s=Tg(n),o=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let f,d;if(ZS(e,n)){const y=n.stack;n.stack=[],f=n.enter("autolink");let g=c.move("<");return g+=c.move(n.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),n.stack=y,g}f=n.enter("link"),d=n.enter("label");let m=c.move("[");return m+=c.move(n.containerPhrasing(e,{before:m,after:"](",...c.current()})),m+=c.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(n.safe(e.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(d=n.enter("destinationRaw"),m+=c.move(n.safe(e.url,{before:m,after:e.title?" ":")",...c.current()}))),d(),e.title&&(d=n.enter(`title${o}`),m+=c.move(" "+s),m+=c.move(n.safe(e.title,{before:m,after:s,...c.current()})),m+=c.move(s),d()),m+=c.move(")"),f(),m}function oI(e,t,n){return ZS(e,n)?"<":"["}ew.peek=cI;function ew(e,t,n,a){const s=e.referenceType,o=n.enter("linkReference");let c=n.enter("label");const f=n.createTracker(a);let d=f.move("[");const m=n.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(m+"]["),c();const y=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...f.current()});return c(),n.stack=y,o(),s==="full"||!m||m!==g?d+=f.move(g+"]"):s==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function cI(){return"["}function Cg(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function uI(e){const t=Cg(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function fI(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function tw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function dI(e,t,n,a){const s=n.enter("list"),o=n.bulletCurrent;let c=e.ordered?fI(n):Cg(n);const f=e.ordered?c==="."?")":".":uI(n);let d=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),tw(n)===c&&y){let g=-1;for(;++g<e.children.length;){const x=e.children[g];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(c=f),n.bulletCurrent=c;const m=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=o,s(),m}function hI(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function mI(e,t,n,a){const s=hI(n);let o=n.bulletCurrent||Cg(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=n.createTracker(a);f.move(o+" ".repeat(c-o.length)),f.shift(c);const d=n.enter("listItem"),m=n.indentLines(n.containerFlow(e,f.current()),y);return d(),m;function y(g,x,v){return x?(v?"":" ".repeat(c))+g:(v?o:o+" ".repeat(c-o.length))+g}}function pI(e,t,n,a){const s=n.enter("paragraph"),o=n.enter("phrasing"),c=n.containerPhrasing(e,a);return o(),s(),c}const gI=kc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function bI(e,t,n,a){return(e.children.some(function(c){return gI(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function yI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}nw.peek=xI;function nw(e,t,n,a){const s=yI(n),o=n.enter("strong"),c=n.createTracker(a),f=c.move(s+s);let d=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const m=d.charCodeAt(0),y=Cf(a.before.charCodeAt(a.before.length-1),m,s);y.inside&&(d=fc(m)+d.slice(1));const g=d.charCodeAt(d.length-1),x=Cf(a.after.charCodeAt(0),g,s);x.inside&&(d=d.slice(0,-1)+fc(g));const v=c.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},f+d+v}function xI(e,t,n){return n.options.strong||"*"}function vI(e,t,n,a){return n.safe(e.value,a)}function EI(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function SI(e,t,n){const a=(tw(n)+(n.options.ruleSpaces?" ":"")).repeat(EI(n));return n.options.ruleSpaces?a.slice(0,-1):a}const iw={blockquote:K3,break:F0,code:W3,definition:J3,emphasis:QS,hardBreak:F0,heading:iI,html:YS,image:VS,imageReference:XS,inlineCode:WS,link:JS,linkReference:ew,list:dI,listItem:mI,paragraph:pI,root:bI,strong:nw,text:vI,thematicBreak:SI};function wI(){return{enter:{table:_I,tableData:P0,tableHeader:P0,tableRow:NI},exit:{codeText:TI,table:kI,tableData:$m,tableHeader:$m,tableRow:$m}}}function _I(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function kI(e){this.exit(e),this.data.inTable=void 0}function NI(e){this.enter({type:"tableRow",children:[]},e)}function $m(e){this.exit(e)}function P0(e){this.enter({type:"tableCell",children:[]},e)}function TI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,CI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function CI(e,t){return t==="|"?t:e}function AI(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
522
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:d,tableRow:f}};function c(v,S,w,k){return m(y(v,w,k),v.align)}function f(v,S,w,k){const _=g(v,w,k),A=m([_]);return A.slice(0,A.indexOf(`
|
|
523
|
+
`))}function d(v,S,w,k){const _=w.enter("tableCell"),A=w.enter("phrasing"),T=w.containerPhrasing(v,{...k,before:o,after:o});return A(),_(),T}function m(v,S){return q3(v,{align:S,alignDelimiters:a,padding:n,stringLength:s})}function y(v,S,w){const k=v.children;let _=-1;const A=[],T=S.enter("table");for(;++_<k.length;)A[_]=g(k[_],S,w);return T(),A}function g(v,S,w){const k=v.children;let _=-1;const A=[],T=S.enter("tableRow");for(;++_<k.length;)A[_]=d(k[_],v,S,w);return T(),A}function x(v,S,w){let k=iw.inlineCode(v,S,w);return w.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function OI(){return{exit:{taskListCheckValueChecked:q0,taskListCheckValueUnchecked:q0,paragraph:MI}}}function RI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:jI}}}function q0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function MI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const a=n.children[0];if(a&&a.type==="text"){const s=t.children;let o=-1,c;for(;++o<s.length;){const f=s[o];if(f.type==="paragraph"){c=f;break}}c===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function jI(e,t,n,a){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);o&&f.move(c);let d=iw.listItem(e,t,n,{...a,...f.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),d;function m(y){return y+c}}function DI(){return[d3(),j3(),z3(),wI(),OI()]}function LI(e){return{extensions:[h3(),D3(e),B3(),AI(e),RI()]}}const II={tokenize:PI,partial:!0},aw={tokenize:qI,partial:!0},rw={tokenize:HI,partial:!0},sw={tokenize:KI,partial:!0},zI={tokenize:GI,partial:!0},lw={name:"wwwAutolink",tokenize:$I,previous:cw},ow={name:"protocolAutolink",tokenize:FI,previous:uw},Oa={name:"emailAutolink",tokenize:UI,previous:fw},Zi={};function BI(){return{text:Zi}}let Vr=48;for(;Vr<123;)Zi[Vr]=Oa,Vr++,Vr===58?Vr=65:Vr===91&&(Vr=97);Zi[43]=Oa;Zi[45]=Oa;Zi[46]=Oa;Zi[95]=Oa;Zi[72]=[Oa,ow];Zi[104]=[Oa,ow];Zi[87]=[Oa,lw];Zi[119]=[Oa,lw];function UI(e,t,n){const a=this;let s,o;return c;function c(g){return!Np(g)||!fw.call(a,a.previous)||Ag(a.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return Np(g)?(e.consume(g),f):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(zI,y,m)(g):g===45||g===95||pn(g)?(o=!0,e.consume(g),d):y(g)}function m(g){return e.consume(g),s=!0,d}function y(g){return o&&s&&Tn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function $I(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!cw.call(a,a.previous)||Ag(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(II,e.attempt(aw,e.attempt(rw,o),n),n)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function FI(e,t,n){const a=this;let s="",o=!1;return c;function c(g){return(g===72||g===104)&&uw.call(a,a.previous)&&!Ag(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),f):n(g)}function f(g){if(Tn(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),o?m:(o=!0,d)):n(g)}function m(g){return g===null||kf(g)||xt(g)||fs(g)||Zf(g)?n(g):e.attempt(aw,e.attempt(rw,y),n)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function PI(e,t,n){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),s):c===46&&a===3?(e.consume(c),o):n(c)}function o(c){return c===null?n(c):t(c)}}function qI(e,t,n){let a,s,o;return c;function c(m){return m===46||m===95?e.check(sw,d,f)(m):m===null||xt(m)||fs(m)||m!==45&&Zf(m)?d(m):(o=!0,e.consume(m),c)}function f(m){return m===95?a=!0:(s=a,a=void 0),e.consume(m),c}function d(m){return s||a||!o?n(m):t(m)}}function HI(e,t){let n=0,a=0;return s;function s(c){return c===40?(n++,e.consume(c),s):c===41&&a<n?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(sw,t,o)(c):c===null||xt(c)||fs(c)?t(c):(e.consume(c),s)}function o(c){return c===41&&a++,e.consume(c),s}}function KI(e,t,n){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),o):f===93?(e.consume(f),s):f===60||f===null||xt(f)||fs(f)?t(f):n(f)}function s(f){return f===null||f===40||f===91||xt(f)||fs(f)?t(f):a(f)}function o(f){return Tn(f)?c(f):n(f)}function c(f){return f===59?(e.consume(f),a):Tn(f)?(e.consume(f),c):n(f)}}function GI(e,t,n){return a;function a(o){return e.consume(o),s}function s(o){return pn(o)?n(o):t(o)}}function cw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xt(e)}function uw(e){return!Tn(e)}function fw(e){return!(e===47||Np(e))}function Np(e){return e===43||e===45||e===46||e===95||pn(e)}function Ag(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const QI={tokenize:tz,partial:!0};function YI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ZI,continuation:{tokenize:JI},exit:ez}},text:{91:{name:"gfmFootnoteCall",tokenize:WI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:VI,resolveTo:XI}}}}function VI(e,t,n){const a=this;let s=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const d=a.events[s][1];if(d.type==="labelImage"){c=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!c||!c._balanced)return n(d);const m=Mi(a.sliceSerialize({start:c.end,end:a.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function XI(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...f),e}function WI(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(g){if(o>999||g===93&&!c||g===null||g===91||xt(g))return n(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(Mi(a.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return xt(g)||(c=!0),o++,e.consume(g),g===92?y:m}function y(g){return g===91||g===92||g===93?(e.consume(g),o++,m):m(g)}}function ZI(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,f;return d;function d(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):n(S)}function y(S){if(c>999||S===93&&!f||S===null||S===91||xt(S))return n(S);if(S===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Mi(a.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return xt(S)||(f=!0),c++,e.consume(S),S===92?g:y}function g(S){return S===91||S===92||S===93?(e.consume(S),c++,y):y(S)}function x(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(o)||s.push(o),tt(e,v,"gfmFootnoteDefinitionWhitespace")):n(S)}function v(S){return t(S)}}function JI(e,t,n){return e.check(_c,t,e.attempt(QI,t,n))}function ez(e){e.exit("gfmFootnoteDefinition")}function tz(e,t,n){const a=this;return tt(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):n(o)}}function nz(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,f){let d=-1;for(;++d<c.length;)if(c[d][0]==="enter"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._close){let m=d;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[d][1].end.offset-c[d][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[d][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[d][1].end)},g={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[d][1].start)},x=[["enter",y,f],["enter",c[m][1],f],["exit",c[m][1],f],["enter",g,f]],v=f.parser.constructs.insideSpan.null;v&&ai(x,x.length,0,Jf(v,c.slice(m+1,d),f)),ai(x,x.length,0,[["exit",g,f],["enter",c[d][1],f],["exit",c[d][1],f],["exit",y,f]]),ai(c,m-1,d-m+3,x),d=m+x.length-2;break}}for(d=-1;++d<c.length;)c[d][1].type==="strikethroughSequenceTemporary"&&(c[d][1].type="data");return c}function o(c,f,d){const m=this.previous,y=this.events;let g=0;return x;function x(S){return m===126&&y[y.length-1][1].type!=="characterEscape"?d(S):(c.enter("strikethroughSequenceTemporary"),v(S))}function v(S){const w=Rl(m);if(S===126)return g>1?d(S):(c.consume(S),g++,v);if(g<2&&!n)return d(S);const k=c.exit("strikethroughSequenceTemporary"),_=Rl(S);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,f(S)}}}class iz{constructor(){this.map=[]}add(t,n,a){az(this,t,n,a)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const o of s)t.push(o);s=a.pop()}this.map.length=0}}function az(e,t,n,a){let s=0;if(!(n===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...a);return}s+=1}e.map.push([t,n,a])}}function rz(e,t){let n=!1;const a=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function sz(){return{flow:{null:{name:"table",tokenize:lz,resolveAll:oz}}}}function lz(e,t,n){const a=this;let s=0,o=0,c;return f;function f(D){let P=a.events.length-1;for(;P>-1;){const Q=a.events[P][1].type;if(Q==="lineEnding"||Q==="linePrefix")P--;else break}const J=P>-1?a.events[P][1].type:null,re=J==="tableHead"||J==="tableRow"?M:d;return re===M&&a.parser.lazy[a.now().line]?n(D):re(D)}function d(D){return e.enter("tableHead"),e.enter("tableRow"),m(D)}function m(D){return D===124||(c=!0,o+=1),y(D)}function y(D){return D===null?n(D):Oe(D)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),v):n(D):Ye(D)?tt(e,y,"whitespace")(D):(o+=1,c&&(c=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(D)))}function g(D){return D===null||D===124||xt(D)?(e.exit("data"),y(D)):(e.consume(D),D===92?x:g)}function x(D){return D===92||D===124?(e.consume(D),g):g(D)}function v(D){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(D):(e.enter("tableDelimiterRow"),c=!1,Ye(D)?tt(e,S,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):S(D))}function S(D){return D===45||D===58?k(D):D===124?(c=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),w):F(D)}function w(D){return Ye(D)?tt(e,k,"whitespace")(D):k(D)}function k(D){return D===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),_):D===45?(o+=1,_(D)):D===null||Oe(D)?j(D):F(D)}function _(D){return D===45?(e.enter("tableDelimiterFiller"),A(D)):F(D)}function A(D){return D===45?(e.consume(D),A):D===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(D))}function T(D){return Ye(D)?tt(e,j,"whitespace")(D):j(D)}function j(D){return D===124?S(D):D===null||Oe(D)?!c||s!==o?F(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):F(D)}function F(D){return n(D)}function M(D){return e.enter("tableRow"),q(D)}function q(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),q):D===null||Oe(D)?(e.exit("tableRow"),t(D)):Ye(D)?tt(e,q,"whitespace")(D):(e.enter("data"),K(D))}function K(D){return D===null||D===124||xt(D)?(e.exit("data"),q(D)):(e.consume(D),D===92?te:K)}function te(D){return D===92||D===124?(e.consume(D),K):K(D)}}function oz(e,t){let n=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,d=0,m,y,g;const x=new iz;for(;++n<e.length;){const v=e[n],S=v[1];v[0]==="enter"?S.type==="tableHead"?(f=!1,d!==0&&(H0(x,t,d,m,y),y=void 0,d=0),m={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",m,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(a=!0,g=void 0,o=[0,0,0,0],c=[0,n+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},x.add(n,0,[["enter",y,t]])),s=S.type==="tableDelimiterRow"?2:y?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],g=tf(x,t,o,s,void 0,g),o=[0,0,0,0]),c[2]=n)):S.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],g=tf(x,t,o,s,void 0,g)),o=c,c=[o[1],n,0,0])):S.type==="tableHead"?(f=!0,d=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=n,o[1]!==0?(c[0]=c[1],g=tf(x,t,o,s,n,g)):c[1]!==0&&(g=tf(x,t,c,s,n,g)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=n)}for(d!==0&&H0(x,t,d,m,y),x.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=rz(t.events,n))}return e}function tf(e,t,n,a,s,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(o.end=Object.assign({},sl(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const d=sl(t.events,n[1]);if(o={type:c,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const m=sl(t.events,n[2]),y=sl(t.events,n[3]),g={type:f,start:Object.assign({},m),end:Object.assign({},y)};if(e.add(n[2],0,[["enter",g,t]]),a!==2){const x=t.events[n[2]],v=t.events[n[3]];if(x[1].end=Object.assign({},v[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,w=n[3]-n[2]-1;e.add(S,w,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return s!==void 0&&(o.end=Object.assign({},sl(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function H0(e,t,n,a,s){const o=[],c=sl(t.events,n);s&&(s.end=Object.assign({},c),o.push(["exit",s,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(n+1,0,o)}function sl(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const cz={name:"tasklistCheck",tokenize:fz};function uz(){return{text:{91:cz}}}function fz(e,t,n){const a=this;return s;function s(d){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return xt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),c):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),c):n(d)}function c(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(d)}function f(d){return Oe(d)?t(d):Ye(d)?e.check({tokenize:dz},t,n)(d):n(d)}}function dz(e,t,n){return tt(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function hz(e){return SS([BI(),YI(),nz(e),sz(),uz()])}const mz={};function Og(e){const t=this,n=e||mz,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(hz(n)),o.push(DI()),c.push(LI(n))}const K0=(function(e,t,n){const a=kc(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),gs=(function(e){if(e==null)return bz;if(typeof e=="string")return gz(e);if(typeof e=="object")return pz(e);if(typeof e=="function")return Rg(e);throw new Error("Expected function, string, or array as `test`")});function pz(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gs(e[n]);return Rg(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function gz(e){return Rg(t);function t(n){return n.tagName===e}}function Rg(e){return t;function t(n,a,s){return!!(yz(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function bz(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function yz(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const G0=/\n/g,Q0=/[\t ]+/g,Tp=gs("br"),Y0=gs(Nz),xz=gs("p"),V0=gs("tr"),vz=gs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",kz,Tz]),dw=gs(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function Ez(e,t){const n=t||{},a="children"in e?e.children:[],s=dw(e),o=pw(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...mw(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...hw(a[f],e,{whitespace:o,breakBefore:f?void 0:s,breakAfter:f<a.length-1?Tp(a[f+1]):s}));const d=[];let m;for(f=-1;++f<c.length;){const y=c[f];typeof y=="number"?m!==void 0&&y>m&&(m=y):y&&(m!==void 0&&m>-1&&d.push(`
|
|
524
|
+
`.repeat(m)||" "),m=-1,d.push(y))}return d.join("")}function hw(e,t,n){return e.type==="element"?Sz(e,t,n):e.type==="text"?n.whitespace==="normal"?mw(e,n):wz(e):[]}function Sz(e,t,n){const a=pw(e,n),s=e.children||[];let o=-1,c=[];if(vz(e))return c;let f,d;for(Tp(e)||V0(e)&&K0(t,e,V0)?d=`
|
|
525
|
+
`:xz(e)?(f=2,d=2):dw(e)&&(f=1,d=1);++o<s.length;)c=c.concat(hw(s[o],e,{whitespace:a,breakBefore:o?void 0:f,breakAfter:o<s.length-1?Tp(s[o+1]):d}));return Y0(e)&&K0(t,e,Y0)&&c.push(" "),f&&c.unshift(f),d&&c.push(d),c}function mw(e,t){const n=String(e.value),a=[],s=[];let o=0;for(;o<=n.length;){G0.lastIndex=o;const d=G0.exec(n),m=d&&"index"in d?d.index:n.length;a.push(_z(n.slice(o,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,m===n.length?t.breakAfter:!0)),o=m+1}let c=-1,f;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(s.push(a[c]),f=void 0):a[c]?(typeof f=="number"&&s.push(f),s.push(a[c]),f=0):(c===0||c===a.length-1)&&s.push(0);return s}function wz(e){return[String(e.value)]}function _z(e,t,n){const a=[];let s=0,o;for(;s<e.length;){Q0.lastIndex=s;const c=Q0.exec(e);o=c?c.index:e.length,!s&&!o&&c&&!t&&a.push(""),s!==o&&a.push(e.slice(s,o)),s=c?o+c[0].length:o}return s!==o&&!n&&a.push(""),a.join(" ")}function pw(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function kz(e){return!!(e.properties||{}).hidden}function Nz(e){return e.tagName==="td"||e.tagName==="th"}function Tz(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function Cz(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},y={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",S=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],j={type:w,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},F={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,y,m],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:M.concat([{begin:/\(/,end:/\)/,keywords:j,contains:M.concat(["self"]),relevance:0}]),relevance:0},K={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:j,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,m,y,f,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,m,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,K,F,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:j,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Az(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=Cz(e),a=n.keywords;return a.type=[...a.type,...t.type],a.literal=[...a.literal,...t.literal],a.built_in=[...a.built_in,...t.built_in],a._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function Oz(e){const t=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(f);const d={match:/\\"/},m={className:"string",begin:/'/,end:/'/},y={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},x=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${x.join("|")})`,relevance:10}),S={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},w=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],_={match:/(\/[a-z._-]+)+/},A=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],T=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],j=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],F=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:w,literal:k,built_in:[...A,...T,"set","shopt",...j,...F]},contains:[v,e.SHEBANG(),S,g,o,c,_,f,d,m,y,n]}}function Rz(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},y={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",k={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},_=[g,f,n,e.C_BLOCK_COMMENT_MODE,y,m],A={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:_.concat([{begin:/\(/,end:/\)/,keywords:k,contains:_.concat(["self"]),relevance:0}]),relevance:0},T={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:k,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,m,y,f,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,m,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:k,disableAutodetect:!0,illegal:"</",contains:[].concat(A,T,_,[g,{begin:e.IDENT_RE+"::",keywords:k},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:m,keywords:k}}}function Mz(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},y={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",S=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],j={type:w,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},F={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,y,m],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:M.concat([{begin:/\(/,end:/\)/,keywords:j,contains:M.concat(["self"]),relevance:0}]),relevance:0},K={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:j,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,m,y,f,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,m,y,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,K,F,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:j,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function jz(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:s.concat(o),built_in:t,literal:a},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),d={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},m={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},y={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=e.inherit(y,{illegal:/\n/}),x={className:"subst",begin:/\{/,end:/\}/,keywords:c},v=e.inherit(x,{illegal:/\n/}),S={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},k=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});x.contains=[w,S,y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],v.contains=[k,S,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const _={variants:[m,w,S,y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},A={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},T=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",j={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},_,d,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,A,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,A,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+T+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,A],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[_,d,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},j]}}const Dz=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Lz=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Iz=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],zz=[...Lz,...Iz],Bz=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Uz=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),$z=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Fz=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Pz(e){const t=e.regex,n=Dz(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",o=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,a,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Uz.join("|")+")"},{begin:":(:)?("+$z.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Fz.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:Bz.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+zz.join("|")+")\\b"}]}}function qz(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function Hz(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function Kz(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function Gz(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[a,o,s,c,n,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,m=/"(\\"|[^"])*"/,y=/'[^']*'/,g=t.either(d,m,y),x=t.concat(g,"(\\s*\\.\\s*",g,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:x,className:"attr",starts:{end:/$/,contains:[a,f,o,s,c,n]}}]}}var ll="[0-9](_*[0-9])*",nf=`\\.(${ll})`,af="[0-9a-fA-F](_*[0-9a-fA-F])*",X0={className:"number",variants:[{begin:`(\\b(${ll})((${nf})|\\.)?|(${nf}))[eE][+-]?(${ll})[fFdD]?\\b`},{begin:`\\b(${ll})((${nf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${nf})[fFdD]?\\b`},{begin:`\\b(${ll})[fFdD]\\b`},{begin:`\\b0[xX]((${af})\\.?|(${af})?\\.(${af}))[pP][+-]?(${ll})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${af})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function gw(e,t,n){return n===-1?"":e.replace(t,a=>gw(e,t,n-1))}function Qz(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+gw("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),d={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},y={className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:d,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[y,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,X0,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},X0,m]}}const W0="[A-Za-z$_][0-9A-Za-z$_]*",Yz=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Vz=["true","false","null","undefined","NaN","Infinity"],bw=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],yw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Xz=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Wz=[].concat(xw,bw,yw);function Zz(e){const t=e.regex,n=(G,{after:he})=>{const O="</"+G[0].slice(1);return G.input.indexOf(O,he)!==-1},a=W0,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(G,he)=>{const O=G[0].length+G.index,L=G.input[O];if(L==="<"||L===","){he.ignoreMatch();return}L===">"&&(n(G,{after:O})||he.ignoreMatch());let Z;const C=G.input.substring(O);if(Z=C.match(/^\s*=/)){he.ignoreMatch();return}if((Z=C.match(/^\s+extends\s+/))&&Z.index===0){he.ignoreMatch();return}}},f={$pattern:W0,keyword:Yz,literal:Vz,built_in:Wz,"variable.language":Xz},d="[0-9](_?[0-9])*",m=`\\.(${d})`,y="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${y})((${m})|\\.)?|(${m}))[eE][+-]?(${d})\\b`},{begin:`\\b(${y})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},A={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,k,{match:/\$\d+/},g];x.contains=T.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(T)});const j=[].concat(A,x.contains),F=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(j)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},q={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},K={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...bw,...yw]}},te={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(G){return t.concat("(?!",G.join("|"),")")}const re={match:t.concat(/\b/,J([...xw,"super","import"].map(G=>`${G}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Q={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},U="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ae={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(U)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:K},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),te,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,k,A,{match:/\$\d+/},g,K,{scope:"attr",match:a+t.lookahead(":"),relevance:0},ae,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[A,e.REGEXP_MODE,{className:"function",begin:U,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},Q,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},re,P,q,Y,{match:/\$[(.]/}]}}function Jz(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],s={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var ol="[0-9](_*[0-9])*",rf=`\\.(${ol})`,sf="[0-9a-fA-F](_*[0-9a-fA-F])*",e4={className:"number",variants:[{begin:`(\\b(${ol})((${rf})|\\.)?|(${rf}))[eE][+-]?(${ol})[fFdD]?\\b`},{begin:`\\b(${ol})((${rf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${rf})[fFdD]?\\b`},{begin:`\\b(${ol})[fFdD]\\b`},{begin:`\\b0[xX]((${sf})\\.?|(${sf})?\\.(${sf}))[pP][+-]?(${ol})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${sf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function t4(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,s]}]};s.contains.push(c);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},d={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},m=e4,y=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),g={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},x=g;return x.variants[1].contains=[g],g.variants[1].contains=[x],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,y,n,a,f,d,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[g,e.C_LINE_COMMENT_MODE,y],relevance:0},e.C_LINE_COMMENT_MODE,y,f,d,c,e.C_NUMBER_MODE]},y]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,d]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
526
|
+
`},m]}}const n4=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),i4=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],a4=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],r4=[...i4,...a4],s4=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),vw=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Ew=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),l4=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),o4=vw.concat(Ew).sort().reverse();function c4(e){const t=n4(e),n=o4,a="and or not only",s="[\\w-]+",o="("+s+"|@\\{"+s+"\\})",c=[],f=[],d=function(T){return{className:"string",begin:"~?"+T+".*?"+T}},m=function(T,j,F){return{className:T,begin:j,relevance:F}},y={$pattern:/[a-z-]+/,keyword:a,attribute:s4.join(" ")},g={begin:"\\(",end:"\\)",contains:f,keywords:y,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d("'"),d('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,g,m("variable","@@?"+s,10),m("variable","@\\{"+s+"\\}"),m("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const x=f.concat({begin:/\{/,end:/\}/,contains:c}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},S={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+l4.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},w={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:y,returnEnd:!0,contains:f,relevance:0}},k={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:x}},_={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,m("keyword","all\\b"),m("variable","@\\{"+s+"\\}"),{begin:"\\b("+r4.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,m("selector-tag",o,0),m("selector-id","#"+o),m("selector-class","\\."+o,0),m("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+vw.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Ew.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:x},{begin:"!important"},t.FUNCTION_DISPATCH]},A={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[_]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,k,A,S,_,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function u4(e){const t="\\[=*\\[",n="\\]=*\\]",a={begin:t,end:n,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:s.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[a],relevance:5}])}}function f4(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,a,s,o,c]}}function d4(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,d={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},y={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=e.inherit(m,{contains:[]}),x=e.inherit(y,{contains:[]});m.contains.push(x),y.contains.push(g);let v=[n,d];return[m,y,g,x].forEach(_=>{_.contains=_.contains.concat(v)}),v=v.concat(m,y),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},n,o,m,y,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},s,a,d,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function h4(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},d={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+d.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:d,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function m4(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},c={begin:/->\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},d={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},m={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},y=[e.BACKSLASH_ESCAPE,o,d],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],x=(w,k,_="\\1")=>{const A=_==="\\1"?_:t.concat(_,k);return t.concat(t.concat("(?:",w,")"),k,/(?:\\.|[^\\\/])*?/,A,/(?:\\.|[^\\\/])*?/,_,a)},v=(w,k,_)=>t.concat(t.concat("(?:",w,")"),k,/(?:\\.|[^\\\/])*?/,_,a),S=[d,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:y,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},m,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:x("s|tr|y",t.either(...g,{capture:!0}))},{begin:x("s|tr|y","\\(","\\)")},{begin:x("s|tr|y","\\[","\\]")},{begin:x("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",t.either(...g,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f,m]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=S,c.contains=S,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:S}}function p4(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),c={scope:"variable",match:"\\$+"+a},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},m=e.inherit(e.APOS_STRING_MODE,{illegal:null}),y=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(d)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(d),"on:begin":(Q,Y)=>{Y.data._beginMatch=Q[1]||Q[2]},"on:end":(Q,Y)=>{Y.data._beginMatch!==Q[1]&&Y.ignoreMatch()}},x=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
|
|
527
|
+
]`,S={scope:"string",variants:[y,m,g,x]},w={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},k=["false","null","true"],_=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],A=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],j={keyword:_,literal:(Q=>{const Y=[];return Q.forEach(U=>{Y.push(U),U.toLowerCase()===U?Y.push(U.toUpperCase()):Y.push(U.toLowerCase())}),Y})(k),built_in:A},F=Q=>Q.map(Y=>Y.replace(/\|\d+$/,"")),M={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",F(A).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},q=t.concat(a,"\\b(?!\\()"),K={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),q],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),q],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},te={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},D={relevance:0,begin:/\(/,end:/\)/,keywords:j,contains:[te,c,K,e.C_BLOCK_COMMENT_MODE,S,w,M]},P={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",F(_).join("\\b|"),"|",F(A).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[D]};D.contains.push(P);const J=[te,K,e.C_BLOCK_COMMENT_MODE,S,w,M],re={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:k,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:k,keyword:["new","array"]},contains:["self",...J]},...J,{scope:"meta",variants:[{match:s},{match:o}]}]};return{case_insensitive:!1,keywords:j,contains:[re,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,P,K,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},M,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:j,contains:["self",re,c,K,e.C_BLOCK_COMMENT_MODE,S,w]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},S,w]}}function g4(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function b4(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function y4(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},d={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},y={begin:/\{\{/,relevance:0},g={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,d,y,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,y,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,y,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,y,m]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",v=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,S=`\\b|${a.join("|")}`,w={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${v}))[eE][+-]?(${x})[jJ]?(?=${S})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${S})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${S})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${S})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${S})`},{begin:`\\b(${x})[jJ](?=${S})`}]},k={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},_={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",d,w,g,e.HASH_COMMENT_MODE]}]};return m.contains=[g,w,d],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[d,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[_]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[w,_,g]}]}}function x4(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function v4(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[s,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[o,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function E4(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(a,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},d={begin:"#<",end:">"},m=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],y={className:"subst",begin:/#\{/,end:/\}/,keywords:c},g={className:"string",contains:[e.BACKSLASH_ESCAPE,y],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,y]})]}]},x="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",S={className:"number",relevance:0,variants:[{begin:`\\b(${x})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},w={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},M=[g,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:c},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[w]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:n}],relevance:0},S,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,y],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(d,m),relevance:0}].concat(d,m);y.contains=M,w.contains=M;const D=[{begin:/^\s*=>/,starts:{end:"$",contains:M}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:M}}];return m.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(D).concat(m).concat(M)}}function S4(e){const t=e.regex,n=/(r#)?/,a=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],d=["true","false","Some","None","Ok","Err"],m=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],y=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:y,keyword:f,literal:d,built_in:m},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:m,type:y}},{className:"punctuation",begin:"->"},o]}}const w4=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),_4=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],k4=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],N4=[..._4,...k4],T4=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),C4=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),A4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),O4=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function R4(e){const t=w4(e),n=A4,a=C4,s="@[a-z-]+",o="and or not only",f={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+N4.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+O4.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,f,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:T4.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function M4(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function j4(e){const t=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],d=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],y=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],x=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=y,S=[...m,...d].filter(F=>!y.includes(F)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},k={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function A(F){return t.concat(/\b/,t.either(...F.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const T={scope:"keyword",match:A(x),relevance:0};function j(F,{exceptions:M,when:q}={}){const K=q;return M=M||[],F.map(te=>te.match(/\|\d+$/)||M.includes(te)?te:K(te)?`${te}|0`:te)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:j(S,{when:F=>F.length<3}),literal:o,type:f,built_in:g},contains:[{scope:"type",match:A(c)},T,_,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}function Sw(e){return e?typeof e=="string"?e:e.source:null}function Vo(e){return gt("(?=",e,")")}function gt(...e){return e.map(n=>Sw(n)).join("")}function D4(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function _n(...e){return"("+(D4(e).capture?"":"?:")+e.map(a=>Sw(a)).join("|")+")"}const Mg=e=>gt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),L4=["Protocol","Type"].map(Mg),Z0=["init","self"].map(Mg),I4=["Any","Self"],Fm=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],J0=["false","nil","true"],z4=["assignment","associativity","higherThan","left","lowerThan","none","right"],B4=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],eE=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],ww=_n(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),_w=_n(ww,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Pm=gt(ww,_w,"*"),kw=_n(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Af=_n(kw,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Hi=gt(kw,Af,"*"),lf=gt(/[A-Z]/,Af,"*"),U4=["attached","autoclosure",gt(/convention\(/,_n("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",gt(/objc\(/,Hi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],$4=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function F4(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,_n(...L4,...Z0)],className:{2:"keyword"}},o={match:gt(/\./,_n(...Fm)),relevance:0},c=Fm.filter(Ze=>typeof Ze=="string").concat(["_|0"]),f=Fm.filter(Ze=>typeof Ze!="string").concat(I4).map(Mg),d={variants:[{className:"keyword",match:_n(...f,...Z0)}]},m={$pattern:_n(/\b\w+/,/#\w+/),keyword:c.concat(B4),literal:J0},y=[s,o,d],g={match:gt(/\./,_n(...eE)),relevance:0},x={className:"built_in",match:gt(/\b/,_n(...eE),/(?=\()/)},v=[g,x],S={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:Pm},{match:`\\.(\\.|${_w})+`}]},k=[S,w],_="([0-9]_*)+",A="([0-9a-fA-F]_*)+",T={className:"number",relevance:0,variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{match:`\\b0x(${A})(\\.(${A}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},j=(Ze="")=>({className:"subst",variants:[{match:gt(/\\/,Ze,/[0\\tnr"']/)},{match:gt(/\\/,Ze,/u\{[0-9a-fA-F]{1,8}\}/)}]}),F=(Ze="")=>({className:"subst",match:gt(/\\/,Ze,/[\t ]*(?:[\r\n]|\r\n)/)}),M=(Ze="")=>({className:"subst",label:"interpol",begin:gt(/\\/,Ze,/\(/),end:/\)/}),q=(Ze="")=>({begin:gt(Ze,/"""/),end:gt(/"""/,Ze),contains:[j(Ze),F(Ze),M(Ze)]}),K=(Ze="")=>({begin:gt(Ze,/"/),end:gt(/"/,Ze),contains:[j(Ze),M(Ze)]}),te={className:"string",variants:[q(),q("#"),q("##"),q("###"),K(),K("#"),K("##"),K("###")]},D=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],P={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:D},J=Ze=>{const _i=gt(Ze,/\//),li=gt(/\//,Ze);return{begin:_i,end:li,contains:[...D,{scope:"comment",begin:`#(?!.*${li})`,end:/$/}]}},re={scope:"regexp",variants:[J("###"),J("##"),J("#"),P]},Q={match:gt(/`/,Hi,/`/)},Y={className:"variable",match:/\$\d+/},U={className:"variable",match:`\\$${Af}+`},ae=[Q,Y,U],G={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:$4,contains:[...k,T,te]}]}},he={scope:"keyword",match:gt(/@/,_n(...U4),Vo(_n(/\(/,/\s+/)))},O={scope:"meta",match:gt(/@/,Hi)},L=[G,he,O],Z={match:Vo(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:gt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Af,"+")},{className:"type",match:lf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:gt(/\s+&\s+/,Vo(lf)),relevance:0}]},C={begin:/</,end:/>/,keywords:m,contains:[...a,...y,...L,S,Z]};Z.contains.push(C);const pe={match:gt(Hi,/\s*:/),keywords:"_|0",relevance:0},_e={begin:/\(/,end:/\)/,relevance:0,keywords:m,contains:["self",pe,...a,re,...y,...v,...k,T,te,...ae,...L,Z]},ve={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,Z]},ce={begin:_n(Vo(gt(Hi,/\s*:/)),Vo(gt(Hi,/\s+/,Hi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Hi}]},ke={begin:/\(/,end:/\)/,keywords:m,contains:[ce,...a,...y,...k,T,te,...L,Z,_e],endsParent:!0,illegal:/["']/},Ke={match:[/(func|macro)/,/\s+/,_n(Q.match,Hi,Pm)],className:{1:"keyword",3:"title.function"},contains:[ve,ke,t],illegal:[/\[/,/%/]},Dt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ve,ke,t],illegal:/\[|%/},yn={match:[/operator/,/\s+/,Pm],className:{1:"keyword",3:"title"}},Ji={begin:[/precedencegroup/,/\s+/,lf],className:{1:"keyword",3:"title"},contains:[Z],keywords:[...z4,...J0],end:/}/},Ra={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Kn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ii={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Hi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:m,contains:[ve,...y,{begin:/:/,end:/\{/,keywords:m,contains:[{scope:"title.class.inherited",match:lf},...y],relevance:0}]};for(const Ze of te.variants){const _i=Ze.contains.find(zi=>zi.label==="interpol");_i.keywords=m;const li=[...y,...v,...k,T,te,...ae];_i.contains=[...li,{begin:/\(/,end:/\)/,contains:["self",...li]}]}return{name:"Swift",keywords:m,contains:[...a,Ke,Dt,Ra,Kn,Ii,yn,Ji,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},re,...y,...v,...k,T,te,...ae,...L,Z,_e]}}const Of="[A-Za-z$_][0-9A-Za-z$_]*",Nw=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Tw=["true","false","null","undefined","NaN","Infinity"],Cw=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Aw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ow=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Rw=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Mw=[].concat(Ow,Cw,Aw);function P4(e){const t=e.regex,n=(G,{after:he})=>{const O="</"+G[0].slice(1);return G.input.indexOf(O,he)!==-1},a=Of,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(G,he)=>{const O=G[0].length+G.index,L=G.input[O];if(L==="<"||L===","){he.ignoreMatch();return}L===">"&&(n(G,{after:O})||he.ignoreMatch());let Z;const C=G.input.substring(O);if(Z=C.match(/^\s*=/)){he.ignoreMatch();return}if((Z=C.match(/^\s+extends\s+/))&&Z.index===0){he.ignoreMatch();return}}},f={$pattern:Of,keyword:Nw,literal:Tw,built_in:Mw,"variable.language":Rw},d="[0-9](_?[0-9])*",m=`\\.(${d})`,y="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${y})((${m})|\\.)?|(${m}))[eE][+-]?(${d})\\b`},{begin:`\\b(${y})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},A={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,k,{match:/\$\d+/},g];x.contains=T.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(T)});const j=[].concat(A,x.contains),F=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(j)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},q={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},K={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Cw,...Aw]}},te={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(G){return t.concat("(?!",G.join("|"),")")}const re={match:t.concat(/\b/,J([...Ow,"super","import"].map(G=>`${G}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Q={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},U="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ae={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(U)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:K},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),te,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,S,w,k,A,{match:/\$\d+/},g,K,{scope:"attr",match:a+t.lookahead(":"),relevance:0},ae,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[A,e.REGEXP_MODE,{className:"function",begin:U,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},Q,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},re,P,q,Y,{match:/\$[(.]/}]}}function q4(e){const t=e.regex,n=P4(e),a=Of,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},d=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:Of,keyword:Nw.concat(d),literal:Tw,built_in:Mw.concat(s),"variable.language":Rw},y={className:"meta",begin:"@"+a},g=(w,k,_)=>{const A=w.contains.findIndex(T=>T.label===k);if(A===-1)throw new Error("can not find mode to replace");w.contains.splice(A,1,_)};Object.assign(n.keywords,m),n.exports.PARAMS_CONTAINS.push(y);const x=n.contains.find(w=>w.scope==="attr"),v=Object.assign({},x,{match:t.concat(a,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,x,v]),n.contains=n.contains.concat([y,o,c,v]),g(n,"shebang",e.SHEBANG()),g(n,"use_strict",f);const S=n.contains.find(w=>w.label==="func.def");return S.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function H4(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,d={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,s),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,s),/ +/,t.either(c,f),/ *#/)}]},m={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},y={className:"label",begin:/^\w+:/},g=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),x=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,a,d,m,y,g,x,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[x]}]}}function K4(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},d={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},m={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,c,s,e.QUOTE_STRING_MODE,d,m,f]}}function G4(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(o,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),d=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,d,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,d,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[d]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:m}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Q4(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},S={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},w={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},k=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},x,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},S,w,o,c],_=[...k];return _.pop(),_.push(f),v.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}const Y4={arduino:Az,bash:Oz,c:Rz,cpp:Mz,csharp:jz,css:Pz,diff:qz,go:Hz,graphql:Kz,ini:Gz,java:Qz,javascript:Zz,json:Jz,kotlin:t4,less:c4,lua:u4,makefile:f4,markdown:d4,objectivec:h4,perl:m4,php:p4,"php-template":g4,plaintext:b4,python:y4,"python-repl":x4,r:v4,ruby:E4,rust:S4,scss:R4,shell:M4,sql:j4,swift:F4,typescript:q4,vbnet:H4,wasm:K4,xml:G4,yaml:Q4};var qm,tE;function V4(){if(tE)return qm;tE=1;function e(B){return B instanceof Map?B.clear=B.delete=B.set=function(){throw new Error("map is read-only")}:B instanceof Set&&(B.add=B.clear=B.delete=function(){throw new Error("set is read-only")}),Object.freeze(B),Object.getOwnPropertyNames(B).forEach(se=>{const ge=B[se],Le=typeof ge;(Le==="object"||Le==="function")&&!Object.isFrozen(ge)&&e(ge)}),B}class t{constructor(se){se.data===void 0&&(se.data={}),this.data=se.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(B){return B.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(B,...se){const ge=Object.create(null);for(const Le in B)ge[Le]=B[Le];return se.forEach(function(Le){for(const wt in Le)ge[wt]=Le[wt]}),ge}const s="</span>",o=B=>!!B.scope,c=(B,{prefix:se})=>{if(B.startsWith("language:"))return B.replace("language:","language-");if(B.includes(".")){const ge=B.split(".");return[`${se}${ge.shift()}`,...ge.map((Le,wt)=>`${Le}${"_".repeat(wt+1)}`)].join(" ")}return`${se}${B}`};class f{constructor(se,ge){this.buffer="",this.classPrefix=ge.classPrefix,se.walk(this)}addText(se){this.buffer+=n(se)}openNode(se){if(!o(se))return;const ge=c(se.scope,{prefix:this.classPrefix});this.span(ge)}closeNode(se){o(se)&&(this.buffer+=s)}value(){return this.buffer}span(se){this.buffer+=`<span class="${se}">`}}const d=(B={})=>{const se={children:[]};return Object.assign(se,B),se};class m{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(se){this.top.children.push(se)}openNode(se){const ge=d({scope:se});this.add(ge),this.stack.push(ge)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(se){return this.constructor._walk(se,this.rootNode)}static _walk(se,ge){return typeof ge=="string"?se.addText(ge):ge.children&&(se.openNode(ge),ge.children.forEach(Le=>this._walk(se,Le)),se.closeNode(ge)),se}static _collapse(se){typeof se!="string"&&se.children&&(se.children.every(ge=>typeof ge=="string")?se.children=[se.children.join("")]:se.children.forEach(ge=>{m._collapse(ge)}))}}class y extends m{constructor(se){super(),this.options=se}addText(se){se!==""&&this.add(se)}startScope(se){this.openNode(se)}endScope(){this.closeNode()}__addSublanguage(se,ge){const Le=se.root;ge&&(Le.scope=`language:${ge}`),this.add(Le)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(B){return B?typeof B=="string"?B:B.source:null}function x(B){return w("(?=",B,")")}function v(B){return w("(?:",B,")*")}function S(B){return w("(?:",B,")?")}function w(...B){return B.map(ge=>g(ge)).join("")}function k(B){const se=B[B.length-1];return typeof se=="object"&&se.constructor===Object?(B.splice(B.length-1,1),se):{}}function _(...B){return"("+(k(B).capture?"":"?:")+B.map(Le=>g(Le)).join("|")+")"}function A(B){return new RegExp(B.toString()+"|").exec("").length-1}function T(B,se){const ge=B&&B.exec(se);return ge&&ge.index===0}const j=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function F(B,{joinWith:se}){let ge=0;return B.map(Le=>{ge+=1;const wt=ge;let bt=g(Le),Ee="";for(;bt.length>0;){const ye=j.exec(bt);if(!ye){Ee+=bt;break}Ee+=bt.substring(0,ye.index),bt=bt.substring(ye.index+ye[0].length),ye[0][0]==="\\"&&ye[1]?Ee+="\\"+String(Number(ye[1])+wt):(Ee+=ye[0],ye[0]==="("&&ge++)}return Ee}).map(Le=>`(${Le})`).join(se)}const M=/\b\B/,q="[a-zA-Z]\\w*",K="[a-zA-Z_]\\w*",te="\\b\\d+(\\.\\d+)?",D="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",P="\\b(0b[01]+)",J="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",re=(B={})=>{const se=/^#![ ]*\//;return B.binary&&(B.begin=w(se,/.*\b/,B.binary,/\b.*/)),a({scope:"meta",begin:se,end:/$/,relevance:0,"on:begin":(ge,Le)=>{ge.index!==0&&Le.ignoreMatch()}},B)},Q={begin:"\\\\[\\s\\S]",relevance:0},Y={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Q]},U={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Q]},ae={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},G=function(B,se,ge={}){const Le=a({scope:"comment",begin:B,end:se,contains:[]},ge);Le.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const wt=_("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Le.contains.push({begin:w(/[ ]+/,"(",wt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Le},he=G("//","$"),O=G("/\\*","\\*/"),L=G("#","$"),Z={scope:"number",begin:te,relevance:0},C={scope:"number",begin:D,relevance:0},pe={scope:"number",begin:P,relevance:0},_e={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Q,{begin:/\[/,end:/\]/,relevance:0,contains:[Q]}]},ve={scope:"title",begin:q,relevance:0},ce={scope:"title",begin:K,relevance:0},ke={begin:"\\.\\s*"+K,relevance:0};var Dt=Object.freeze({__proto__:null,APOS_STRING_MODE:Y,BACKSLASH_ESCAPE:Q,BINARY_NUMBER_MODE:pe,BINARY_NUMBER_RE:P,COMMENT:G,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:he,C_NUMBER_MODE:C,C_NUMBER_RE:D,END_SAME_AS_BEGIN:function(B){return Object.assign(B,{"on:begin":(se,ge)=>{ge.data._beginMatch=se[1]},"on:end":(se,ge)=>{ge.data._beginMatch!==se[1]&&ge.ignoreMatch()}})},HASH_COMMENT_MODE:L,IDENT_RE:q,MATCH_NOTHING_RE:M,METHOD_GUARD:ke,NUMBER_MODE:Z,NUMBER_RE:te,PHRASAL_WORDS_MODE:ae,QUOTE_STRING_MODE:U,REGEXP_MODE:_e,RE_STARTERS_RE:J,SHEBANG:re,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:K,UNDERSCORE_TITLE_MODE:ce});function yn(B,se){B.input[B.index-1]==="."&&se.ignoreMatch()}function Ji(B,se){B.className!==void 0&&(B.scope=B.className,delete B.className)}function Ra(B,se){se&&B.beginKeywords&&(B.begin="\\b("+B.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",B.__beforeBegin=yn,B.keywords=B.keywords||B.beginKeywords,delete B.beginKeywords,B.relevance===void 0&&(B.relevance=0))}function Kn(B,se){Array.isArray(B.illegal)&&(B.illegal=_(...B.illegal))}function Ii(B,se){if(B.match){if(B.begin||B.end)throw new Error("begin & end are not supported with match");B.begin=B.match,delete B.match}}function Ze(B,se){B.relevance===void 0&&(B.relevance=1)}const _i=(B,se)=>{if(!B.beforeMatch)return;if(B.starts)throw new Error("beforeMatch cannot be used with starts");const ge=Object.assign({},B);Object.keys(B).forEach(Le=>{delete B[Le]}),B.keywords=ge.keywords,B.begin=w(ge.beforeMatch,x(ge.begin)),B.starts={relevance:0,contains:[Object.assign(ge,{endsParent:!0})]},B.relevance=0,delete ge.beforeMatch},li=["of","and","for","in","not","or","if","then","parent","list","value"],zi="keyword";function ea(B,se,ge=zi){const Le=Object.create(null);return typeof B=="string"?wt(ge,B.split(" ")):Array.isArray(B)?wt(ge,B):Object.keys(B).forEach(function(bt){Object.assign(Le,ea(B[bt],se,bt))}),Le;function wt(bt,Ee){se&&(Ee=Ee.map(ye=>ye.toLowerCase())),Ee.forEach(function(ye){const De=ye.split("|");Le[De[0]]=[bt,Tr(De[0],De[1])]})}}function Tr(B,se){return se?Number(se):Gl(B)?0:1}function Gl(B){return li.includes(B.toLowerCase())}const bs={},Ot=B=>{console.error(B)},ys=(B,...se)=>{console.log(`WARN: ${B}`,...se)},ne=(B,se)=>{bs[`${B}/${se}`]||(console.log(`Deprecated as of ${B}. ${se}`),bs[`${B}/${se}`]=!0)},de=new Error;function Re(B,se,{key:ge}){let Le=0;const wt=B[ge],bt={},Ee={};for(let ye=1;ye<=se.length;ye++)Ee[ye+Le]=wt[ye],bt[ye+Le]=!0,Le+=A(se[ye-1]);B[ge]=Ee,B[ge]._emit=bt,B[ge]._multi=!0}function qe(B){if(Array.isArray(B.begin)){if(B.skip||B.excludeBegin||B.returnBegin)throw Ot("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),de;if(typeof B.beginScope!="object"||B.beginScope===null)throw Ot("beginScope must be object"),de;Re(B,B.begin,{key:"beginScope"}),B.begin=F(B.begin,{joinWith:""})}}function nt(B){if(Array.isArray(B.end)){if(B.skip||B.excludeEnd||B.returnEnd)throw Ot("skip, excludeEnd, returnEnd not compatible with endScope: {}"),de;if(typeof B.endScope!="object"||B.endScope===null)throw Ot("endScope must be object"),de;Re(B,B.end,{key:"endScope"}),B.end=F(B.end,{joinWith:""})}}function xn(B){B.scope&&typeof B.scope=="object"&&B.scope!==null&&(B.beginScope=B.scope,delete B.scope)}function ki(B){xn(B),typeof B.beginScope=="string"&&(B.beginScope={_wrap:B.beginScope}),typeof B.endScope=="string"&&(B.endScope={_wrap:B.endScope}),qe(B),nt(B)}function an(B){function se(Ee,ye){return new RegExp(g(Ee),"m"+(B.case_insensitive?"i":"")+(B.unicodeRegex?"u":"")+(ye?"g":""))}class ge{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ye,De){De.position=this.position++,this.matchIndexes[this.matchAt]=De,this.regexes.push([De,ye]),this.matchAt+=A(ye)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ye=this.regexes.map(De=>De[1]);this.matcherRe=se(F(ye,{joinWith:"|"}),!0),this.lastIndex=0}exec(ye){this.matcherRe.lastIndex=this.lastIndex;const De=this.matcherRe.exec(ye);if(!De)return null;const Ft=De.findIndex((ta,vs)=>vs>0&&ta!==void 0),Nt=this.matchIndexes[Ft];return De.splice(0,Ft),Object.assign(De,Nt)}}class Le{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ye){if(this.multiRegexes[ye])return this.multiRegexes[ye];const De=new ge;return this.rules.slice(ye).forEach(([Ft,Nt])=>De.addRule(Ft,Nt)),De.compile(),this.multiRegexes[ye]=De,De}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ye,De){this.rules.push([ye,De]),De.type==="begin"&&this.count++}exec(ye){const De=this.getMatcher(this.regexIndex);De.lastIndex=this.lastIndex;let Ft=De.exec(ye);if(this.resumingScanAtSamePosition()&&!(Ft&&Ft.index===this.lastIndex)){const Nt=this.getMatcher(0);Nt.lastIndex=this.lastIndex+1,Ft=Nt.exec(ye)}return Ft&&(this.regexIndex+=Ft.position+1,this.regexIndex===this.count&&this.considerAll()),Ft}}function wt(Ee){const ye=new Le;return Ee.contains.forEach(De=>ye.addRule(De.begin,{rule:De,type:"begin"})),Ee.terminatorEnd&&ye.addRule(Ee.terminatorEnd,{type:"end"}),Ee.illegal&&ye.addRule(Ee.illegal,{type:"illegal"}),ye}function bt(Ee,ye){const De=Ee;if(Ee.isCompiled)return De;[Ji,Ii,ki,_i].forEach(Nt=>Nt(Ee,ye)),B.compilerExtensions.forEach(Nt=>Nt(Ee,ye)),Ee.__beforeBegin=null,[Ra,Kn,Ze].forEach(Nt=>Nt(Ee,ye)),Ee.isCompiled=!0;let Ft=null;return typeof Ee.keywords=="object"&&Ee.keywords.$pattern&&(Ee.keywords=Object.assign({},Ee.keywords),Ft=Ee.keywords.$pattern,delete Ee.keywords.$pattern),Ft=Ft||/\w+/,Ee.keywords&&(Ee.keywords=ea(Ee.keywords,B.case_insensitive)),De.keywordPatternRe=se(Ft,!0),ye&&(Ee.begin||(Ee.begin=/\B|\b/),De.beginRe=se(De.begin),!Ee.end&&!Ee.endsWithParent&&(Ee.end=/\B|\b/),Ee.end&&(De.endRe=se(De.end)),De.terminatorEnd=g(De.end)||"",Ee.endsWithParent&&ye.terminatorEnd&&(De.terminatorEnd+=(Ee.end?"|":"")+ye.terminatorEnd)),Ee.illegal&&(De.illegalRe=se(Ee.illegal)),Ee.contains||(Ee.contains=[]),Ee.contains=[].concat(...Ee.contains.map(function(Nt){return un(Nt==="self"?Ee:Nt)})),Ee.contains.forEach(function(Nt){bt(Nt,De)}),Ee.starts&&bt(Ee.starts,ye),De.matcher=wt(De),De}if(B.compilerExtensions||(B.compilerExtensions=[]),B.contains&&B.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return B.classNameAliases=a(B.classNameAliases||{}),bt(B)}function Lt(B){return B?B.endsWithParent||Lt(B.starts):!1}function un(B){return B.variants&&!B.cachedVariants&&(B.cachedVariants=B.variants.map(function(se){return a(B,{variants:null},se)})),B.cachedVariants?B.cachedVariants:Lt(B)?a(B,{starts:B.starts?a(B.starts):null}):Object.isFrozen(B)?a(B):B}var ot="11.11.1";class Bi extends Error{constructor(se,ge){super(se),this.name="HTMLInjectionError",this.html=ge}}const vn=n,Tc=a,Cr=Symbol("nomatch"),xs=7,Ar=function(B){const se=Object.create(null),ge=Object.create(null),Le=[];let wt=!0;const bt="Could not find the language '{}', did you forget to load/include a language module?",Ee={disableAutodetect:!0,name:"Plain text",contains:[]};let ye={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:y};function De(ue){return ye.noHighlightRe.test(ue)}function Ft(ue){let Ne=ue.className+" ";Ne+=ue.parentNode?ue.parentNode.className:"";const He=ye.languageDetectRe.exec(Ne);if(He){const ct=En(He[1]);return ct||(ys(bt.replace("{}",He[1])),ys("Falling back to no-highlight mode for this block.",ue)),ct?He[1]:"no-highlight"}return Ne.split(/\s+/).find(ct=>De(ct)||En(ct))}function Nt(ue,Ne,He){let ct="",qt="";typeof Ne=="object"?(ct=ue,He=Ne.ignoreIllegals,qt=Ne.language):(ne("10.7.0","highlight(lang, code, ...args) has been deprecated."),ne("10.7.0",`Please use highlight(code, options) instead.
|
|
528
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),qt=ue,ct=Ne),He===void 0&&(He=!0);const dn={code:ct,language:qt};Rr("before:highlight",dn);const Gn=dn.result?dn.result:ta(dn.language,dn.code,He);return Gn.code=dn.code,Rr("after:highlight",Gn),Gn}function ta(ue,Ne,He,ct){const qt=Object.create(null);function dn(me,Se){return me.keywords[Se]}function Gn(){if(!je.keywords){Qt.addText(ut);return}let me=0;je.keywordPatternRe.lastIndex=0;let Se=je.keywordPatternRe.exec(ut),Be="";for(;Se;){Be+=ut.substring(me,Se.index);const Ve=rn.case_insensitive?Se[0].toLowerCase():Se[0],Rt=dn(je,Ve);if(Rt){const[oi,Zl]=Rt;if(Qt.addText(Be),Be="",qt[Ve]=(qt[Ve]||0)+1,qt[Ve]<=xs&&(La+=Zl),oi.startsWith("_"))Be+=Se[0];else{const Dc=rn.classNameAliases[oi]||oi;Qn(Se[0],Dc)}}else Be+=Se[0];me=je.keywordPatternRe.lastIndex,Se=je.keywordPatternRe.exec(ut)}Be+=ut.substring(me),Qt.addText(Be)}function An(){if(ut==="")return;let me=null;if(typeof je.subLanguage=="string"){if(!se[je.subLanguage]){Qt.addText(ut);return}me=ta(je.subLanguage,ut,!0,jc[je.subLanguage]),jc[je.subLanguage]=me._top}else me=Es(ut,je.subLanguage.length?je.subLanguage:null);je.relevance>0&&(La+=me.relevance),Qt.__addSublanguage(me._emitter,me.language)}function Et(){je.subLanguage!=null?An():Gn(),ut=""}function Qn(me,Se){me!==""&&(Qt.startScope(Se),Qt.addText(me),Qt.endScope())}function Rc(me,Se){let Be=1;const Ve=Se.length-1;for(;Be<=Ve;){if(!me._emit[Be]){Be++;continue}const Rt=rn.classNameAliases[me[Be]]||me[Be],oi=Se[Be];Rt?Qn(oi,Rt):(ut=oi,Gn(),ut=""),Be++}}function ws(me,Se){return me.scope&&typeof me.scope=="string"&&Qt.openNode(rn.classNameAliases[me.scope]||me.scope),me.beginScope&&(me.beginScope._wrap?(Qn(ut,rn.classNameAliases[me.beginScope._wrap]||me.beginScope._wrap),ut=""):me.beginScope._multi&&(Rc(me.beginScope,Se),ut="")),je=Object.create(me,{parent:{value:je}}),je}function Vl(me,Se,Be){let Ve=T(me.endRe,Be);if(Ve){if(me["on:end"]){const Rt=new t(me);me["on:end"](Se,Rt),Rt.isMatchIgnored&&(Ve=!1)}if(Ve){for(;me.endsParent&&me.parent;)me=me.parent;return me}}if(me.endsWithParent)return Vl(me.parent,Se,Be)}function _s(me){return je.matcher.regexIndex===0?(ut+=me[0],1):(Ia=!0,0)}function id(me){const Se=me[0],Be=me.rule,Ve=new t(Be),Rt=[Be.__beforeBegin,Be["on:begin"]];for(const oi of Rt)if(oi&&(oi(me,Ve),Ve.isMatchIgnored))return _s(Se);return Be.skip?ut+=Se:(Be.excludeBegin&&(ut+=Se),Et(),!Be.returnBegin&&!Be.excludeBegin&&(ut=Se)),ws(Be,me),Be.returnBegin?0:Se.length}function On(me){const Se=me[0],Be=Ne.substring(me.index),Ve=Vl(je,me,Be);if(!Ve)return Cr;const Rt=je;je.endScope&&je.endScope._wrap?(Et(),Qn(Se,je.endScope._wrap)):je.endScope&&je.endScope._multi?(Et(),Rc(je.endScope,me)):Rt.skip?ut+=Se:(Rt.returnEnd||Rt.excludeEnd||(ut+=Se),Et(),Rt.excludeEnd&&(ut=Se));do je.scope&&Qt.closeNode(),!je.skip&&!je.subLanguage&&(La+=je.relevance),je=je.parent;while(je!==Ve.parent);return Ve.starts&&ws(Ve.starts,me),Rt.returnEnd?0:Se.length}function Xl(){const me=[];for(let Se=je;Se!==rn;Se=Se.parent)Se.scope&&me.unshift(Se.scope);me.forEach(Se=>Qt.openNode(Se))}let Mr={};function ks(me,Se){const Be=Se&&Se[0];if(ut+=me,Be==null)return Et(),0;if(Mr.type==="begin"&&Se.type==="end"&&Mr.index===Se.index&&Be===""){if(ut+=Ne.slice(Se.index,Se.index+1),!wt){const Ve=new Error(`0 width match regex (${ue})`);throw Ve.languageName=ue,Ve.badRule=Mr.rule,Ve}return 1}if(Mr=Se,Se.type==="begin")return id(Se);if(Se.type==="illegal"&&!He){const Ve=new Error('Illegal lexeme "'+Be+'" for mode "'+(je.scope||"<unnamed>")+'"');throw Ve.mode=je,Ve}else if(Se.type==="end"){const Ve=On(Se);if(Ve!==Cr)return Ve}if(Se.type==="illegal"&&Be==="")return ut+=`
|
|
529
|
+
`,1;if(Wl>1e5&&Wl>Se.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ut+=Be,Be.length}const rn=En(ue);if(!rn)throw Ot(bt.replace("{}",ue)),new Error('Unknown language: "'+ue+'"');const Mc=an(rn);let Ns="",je=ct||Mc;const jc={},Qt=new ye.__emitter(ye);Xl();let ut="",La=0,aa=0,Wl=0,Ia=!1;try{if(rn.__emitTokens)rn.__emitTokens(Ne,Qt);else{for(je.matcher.considerAll();;){Wl++,Ia?Ia=!1:je.matcher.considerAll(),je.matcher.lastIndex=aa;const me=je.matcher.exec(Ne);if(!me)break;const Se=Ne.substring(aa,me.index),Be=ks(Se,me);aa=me.index+Be}ks(Ne.substring(aa))}return Qt.finalize(),Ns=Qt.toHTML(),{language:ue,value:Ns,relevance:La,illegal:!1,_emitter:Qt,_top:je}}catch(me){if(me.message&&me.message.includes("Illegal"))return{language:ue,value:vn(Ne),illegal:!0,relevance:0,_illegalBy:{message:me.message,index:aa,context:Ne.slice(aa-100,aa+100),mode:me.mode,resultSoFar:Ns},_emitter:Qt};if(wt)return{language:ue,value:vn(Ne),illegal:!1,relevance:0,errorRaised:me,_emitter:Qt,_top:je};throw me}}function vs(ue){const Ne={value:vn(ue),illegal:!1,relevance:0,_top:Ee,_emitter:new ye.__emitter(ye)};return Ne._emitter.addText(ue),Ne}function Es(ue,Ne){Ne=Ne||ye.languages||Object.keys(se);const He=vs(ue),ct=Ne.filter(En).filter(ja).map(Et=>ta(Et,ue,!1));ct.unshift(He);const qt=ct.sort((Et,Qn)=>{if(Et.relevance!==Qn.relevance)return Qn.relevance-Et.relevance;if(Et.language&&Qn.language){if(En(Et.language).supersetOf===Qn.language)return 1;if(En(Qn.language).supersetOf===Et.language)return-1}return 0}),[dn,Gn]=qt,An=dn;return An.secondBest=Gn,An}function Ui(ue,Ne,He){const ct=Ne&&ge[Ne]||He;ue.classList.add("hljs"),ue.classList.add(`language-${ct}`)}function Pt(ue){let Ne=null;const He=Ft(ue);if(De(He))return;if(Rr("before:highlightElement",{el:ue,language:He}),ue.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ue);return}if(ue.children.length>0&&(ye.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ue)),ye.throwUnescapedHTML))throw new Bi("One of your code blocks includes unescaped HTML.",ue.innerHTML);Ne=ue;const ct=Ne.textContent,qt=He?Nt(ct,{language:He,ignoreIllegals:!0}):Es(ct);ue.innerHTML=qt.value,ue.dataset.highlighted="yes",Ui(ue,He,qt.language),ue.result={language:qt.language,re:qt.relevance,relevance:qt.relevance},qt.secondBest&&(ue.secondBest={language:qt.secondBest.language,relevance:qt.secondBest.relevance}),Rr("after:highlightElement",{el:ue,result:qt,text:ct})}function fn(ue){ye=Tc(ye,ue)}const Ma=()=>{Ss(),ne("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ql(){Ss(),ne("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Cc=!1;function Ss(){function ue(){Ss()}if(document.readyState==="loading"){Cc||window.addEventListener("DOMContentLoaded",ue,!1),Cc=!0;return}document.querySelectorAll(ye.cssSelector).forEach(Pt)}function Ac(ue,Ne){let He=null;try{He=Ne(B)}catch(ct){if(Ot("Language definition for '{}' could not be registered.".replace("{}",ue)),wt)Ot(ct);else throw ct;He=Ee}He.name||(He.name=ue),se[ue]=He,He.rawDefinition=Ne.bind(null,B),He.aliases&&na(He.aliases,{languageName:ue})}function Or(ue){delete se[ue];for(const Ne of Object.keys(ge))ge[Ne]===ue&&delete ge[Ne]}function Yl(){return Object.keys(se)}function En(ue){return ue=(ue||"").toLowerCase(),se[ue]||se[ge[ue]]}function na(ue,{languageName:Ne}){typeof ue=="string"&&(ue=[ue]),ue.forEach(He=>{ge[He.toLowerCase()]=Ne})}function ja(ue){const Ne=En(ue);return Ne&&!Ne.disableAutodetect}function Da(ue){ue["before:highlightBlock"]&&!ue["before:highlightElement"]&&(ue["before:highlightElement"]=Ne=>{ue["before:highlightBlock"](Object.assign({block:Ne.el},Ne))}),ue["after:highlightBlock"]&&!ue["after:highlightElement"]&&(ue["after:highlightElement"]=Ne=>{ue["after:highlightBlock"](Object.assign({block:Ne.el},Ne))})}function Gt(ue){Da(ue),Le.push(ue)}function Oc(ue){const Ne=Le.indexOf(ue);Ne!==-1&&Le.splice(Ne,1)}function Rr(ue,Ne){const He=ue;Le.forEach(function(ct){ct[He]&&ct[He](Ne)})}function ia(ue){return ne("10.7.0","highlightBlock will be removed entirely in v12.0"),ne("10.7.0","Please use highlightElement now."),Pt(ue)}Object.assign(B,{highlight:Nt,highlightAuto:Es,highlightAll:Ss,highlightElement:Pt,highlightBlock:ia,configure:fn,initHighlighting:Ma,initHighlightingOnLoad:Ql,registerLanguage:Ac,unregisterLanguage:Or,listLanguages:Yl,getLanguage:En,registerAliases:na,autoDetection:ja,inherit:Tc,addPlugin:Gt,removePlugin:Oc}),B.debugMode=function(){wt=!1},B.safeMode=function(){wt=!0},B.versionString=ot,B.regex={concat:w,lookahead:x,either:_,optional:S,anyNumberOfTimes:v};for(const ue in Dt)typeof Dt[ue]=="object"&&e(Dt[ue]);return Object.assign(B,Dt),B},Cn=Ar({});return Cn.newInstance=()=>Ar({}),qm=Cn,Cn.HighlightJS=Cn,Cn.default=Cn,qm}var X4=V4();const W4=Ap(X4),nE={},Z4="hljs-";function J4(e){const t=W4.newInstance();return e&&o(e),{highlight:n,highlightAuto:a,listLanguages:s,register:o,registerAlias:c,registered:f};function n(d,m,y){const g=y||nE,x=typeof g.prefix=="string"?g.prefix:Z4;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:eB,classPrefix:x});const v=t.highlight(m,{ignoreIllegals:!0,language:d});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const S=v._emitter.root,w=S.data;return w.language=v.language,w.relevance=v.relevance,S}function a(d,m){const g=(m||nE).subset||s();let x=-1,v=0,S;for(;++x<g.length;){const w=g[x];if(!t.getLanguage(w))continue;const k=n(w,d,m);k.data&&k.data.relevance!==void 0&&k.data.relevance>v&&(v=k.data.relevance,S=k)}return S||{type:"root",children:[],data:{language:void 0,relevance:v}}}function s(){return t.listLanguages()}function o(d,m){if(typeof d=="string")t.registerLanguage(d,m);else{let y;for(y in d)Object.hasOwn(d,y)&&t.registerLanguage(y,d[y])}}function c(d,m){if(typeof d=="string")t.registerAliases(typeof m=="string"?m:[...m],{languageName:d});else{let y;for(y in d)if(Object.hasOwn(d,y)){const g=d[y];t.registerAliases(typeof g=="string"?g:[...g],{languageName:y})}}}function f(d){return!!t.getLanguage(d)}}class eB{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],a=n.children[n.children.length-1];a&&a.type==="text"?a.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const a=this.stack[this.stack.length-1],s=t.root.children;n?a.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):a.children.push(...s)}openNode(t){const n=this,a=t.split(".").map(function(c,f){return f?c+"_".repeat(f):n.options.classPrefix+c}),s=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:a},children:[]};s.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const tB={};function jg(e){const t=e||tB,n=t.aliases,a=t.detect||!1,s=t.languages||Y4,o=t.plainText,c=t.prefix,f=t.subset;let d="hljs";const m=J4(s);if(n&&m.registerAlias(n),c){const y=c.indexOf("-");d=y===-1?c:c.slice(0,y)}return function(y,g){nd(y,"element",function(x,v,S){if(x.tagName!=="code"||!S||S.type!=="element"||S.tagName!=="pre")return;const w=nB(x);if(w===!1||!w&&!a||w&&o&&o.includes(w))return;Array.isArray(x.properties.className)||(x.properties.className=[]),x.properties.className.includes(d)||x.properties.className.unshift(d);const k=Ez(x,{whitespace:"pre"});let _;try{_=w?m.highlight(w,k,{prefix:c}):m.highlightAuto(k,{prefix:c,subset:f})}catch(A){const T=A;if(w&&/Unknown language/.test(T.message)){g.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[S,x],cause:T,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw T}!w&&_.data&&_.data.language&&x.properties.className.push("language-"+_.data.language),_.children.length>0&&(x.children=_.children)})}}function nB(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let a;for(;++n<t.length;){const s=String(t[n]);if(s==="no-highlight"||s==="nohighlight")return!1;!a&&s.slice(0,5)==="lang-"&&(a=s.slice(5)),!a&&s.slice(0,9)==="language-"&&(a=s.slice(9))}return a}function iB({name:e,projects:t,onClose:n,onChange:a}){const{confirm:s,alert:o}=si(),{data:c,isLoading:f,isError:d,error:m,refetch:y}=st({queryKey:["skill",e],queryFn:()=>qO(e)});R.useEffect(()=>{const _=A=>{A.key==="Escape"&&n()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[n]);const g=async(_,A)=>{try{await A(),await y(),a()}catch(T){o({title:`${_}失败`,body:T instanceof Error?T.message:String(T)})}},x=_=>g("link",()=>KO(e,_)),v=async _=>{await s({title:`从 ${_} 移除 ${e}`,body:"skill 链接会被解除,项目后续运行时将无法使用该 skill。",confirm:"移除",danger:!0})&&await g("unlink",()=>GO(e,_))},S=_=>g("freeze",()=>QO(e,_)),w=async _=>{await s({title:`解冻 ${e} @ ${_}`,body:"本地对这个 skill 的改动会被覆盖,回到最新共享版本。",confirm:"解冻",danger:!0})&&await g("unfreeze",()=>YO(e,_))},k=new Map(((c==null?void 0:c.linkedProjects)??[]).map(_=>[_.project,_.state]));return h.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:h.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl",children:[h.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),c&&h.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[c.category," · ",c.origin||"local"]})]}),h.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:h.jsx(Xi,{size:16,strokeWidth:3})})]}),f&&h.jsx("p",{children:"加载中…"}),d&&h.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",m instanceof Error?m.message:String(m)]}),c&&h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-3 uppercase tracking-wider",children:"项目链接状态"}),h.jsxs("div",{className:"flex flex-col gap-2",children:[t.map(_=>{const A=k.get(_);return h.jsxs("div",{className:"flex items-center justify-between gap-3 p-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm",children:_}),A==="linked"&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),A==="frozen"&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!A&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-idle-bg)",color:"var(--color-idle)"},children:"absent"})]}),h.jsxs("div",{className:"flex gap-2",children:[!A&&h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(_),type:"button",children:[h.jsx(cC,{size:11})," link"]}),A==="linked"&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>S(_),type:"button",children:[h.jsx(OC,{size:11})," freeze"]}),h.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>v(_),type:"button",children:"unlink"})]}),A==="frozen"&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>w(_),type:"button",children:[h.jsx(P2,{size:11})," unfreeze"]}),h.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>v(_),type:"button",children:"unlink"})]})]})]},_)}),t.length===0&&h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"还没有任何项目。先去创建一个项目。"})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"SKILL.md 预览"}),h.jsx("div",{className:"prose-chat bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-80 overflow-auto text-sm",children:c.body?h.jsx(Ng,{remarkPlugins:[Og],rehypePlugins:[jg],children:c.body}):h.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),c.references.length>0&&h.jsxs("div",{children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),h.jsx("ul",{className:"flex flex-col gap-2",children:c.references.map(_=>h.jsx(aB,{skillName:e,file:_.name,lines:_.lines},_.name))})]})]})]})})}function aB({skillName:e,file:t,lines:n}){const[a,s]=R.useState(!1),{data:o,isLoading:c,isError:f,error:d}=st({queryKey:["skill-ref",e,t],queryFn:()=>HO(e,t),enabled:a,staleTime:1/0});return h.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[h.jsxs("button",{type:"button",onClick:()=>s(m=>!m),"aria-label":`${a?"收起":"展开"} ${t}`,"aria-expanded":a,className:"w-full flex items-center gap-2 px-3 py-2 text-sm font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[h.jsx(Lf,{size:12,strokeWidth:3,className:["transition-transform",a?"rotate-90":""].join(" ")}),h.jsx(Hp,{size:12,strokeWidth:2.5}),h.jsx("span",{className:"flex-1 text-left font-bold",children:t}),h.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[n," lines"]})]}),a&&h.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg)] max-h-96 overflow-auto",children:[c&&h.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"加载中…"}),f&&h.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["加载失败: ",d instanceof Error?d.message:String(d)]}),o&&h.jsx("div",{className:"prose-chat text-sm",children:h.jsx(Ng,{remarkPlugins:[Og],rehypePlugins:[jg],children:o.content})})]})]})}const rB=[{value:"all",label:"全部"},{value:"language",label:"language"},{value:"end",label:"end"},{value:"persona",label:"persona"},{value:"workflow",label:"workflow"},{value:"other",label:"other"}],sB={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function lB(){var x;const[e,t]=R.useState("all"),[n,a]=R.useState(""),[s,o]=R.useState(null),c=qn(),{data:f,isLoading:d}=st({queryKey:["skills"],queryFn:()=>og()}),m=st({queryKey:["projects"],queryFn:_r}),y=R.useMemo(()=>((f==null?void 0:f.data)??[]).filter(S=>!(e!=="all"&&S.category!==e||n&&!S.name.toLowerCase().includes(n.toLowerCase()))),[f,e,n]),g=R.useMemo(()=>{const v=(f==null?void 0:f.data)??[],S={all:v.length};for(const w of v)S[w.category]=(S[w.category]??0)+1;return S},[f]);return h.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[h.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"Skills 🎯"}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:d?"加载中…":`${(f==null?void 0:f.data.length)??0} 个 user-level skill`})]}),h.jsx("div",{className:"flex gap-3 items-center",children:h.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await VO(),c.invalidateQueries({queryKey:["skills"]})},type:"button",children:[h.jsx(Cl,{size:14,strokeWidth:2.5}),"Sync bundled"]})})]}),h.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[h.jsxs("div",{className:"relative flex-1 max-w-md",children:[h.jsx(vf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),h.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索 skill…",value:n,onChange:v=>a(v.target.value),"aria-label":"搜索 skill"})]}),h.jsx("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:rB.map(v=>h.jsxs("button",{type:"button",onClick:()=>t(v.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",e===v.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[v.label," ",g[v.value]]},v.value))})]}),h.jsx("div",{className:"grid gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:y.map(v=>{var S;return h.jsx(oB,{skill:v,projectCount:((S=m.data)==null?void 0:S.data.length)??0,onOpen:()=>o(v.name)},v.name)})}),s&&h.jsx(iB,{name:s,projects:((x=m.data)==null?void 0:x.data.map(v=>v.name))??[],onClose:()=>o(null),onChange:()=>c.invalidateQueries({queryKey:["skills"]})})]})}function oB({skill:e,projectCount:t,onOpen:n}){const a=sB[e.category];return h.jsxs("article",{onClick:n,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n())},tabIndex:0,role:"button","aria-label":`Open ${e.name}`,className:"nb-card nb-card-interactive flex flex-col gap-3",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),h.jsx("span",{className:"nb-badge text-[10px]",style:{background:a},children:e.category})]}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),h.jsxs("div",{className:"flex items-center justify-between text-xs font-[family-name:var(--font-mono)] pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[h.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),h.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function cB(){var s;const e=st({queryKey:["system-info"],queryFn:s1}),t=st({queryKey:["system-env"],queryFn:QC}),[n,a]=R.useState(!1);return h.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[h.jsx("header",{children:h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"系统 ⚙️"})}),h.jsx(uB,{current:(s=e.data)==null?void 0:s.version}),h.jsxs("section",{className:"nb-card",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"运行时"}),e.data?h.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[h.jsx("dt",{className:"font-bold",children:"Node"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.nodeVersion}),h.jsx("dt",{className:"font-bold",children:"Platform"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.platform}),h.jsx("dt",{className:"font-bold",children:"PID"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.pid??"—"}),h.jsx("dt",{className:"font-bold",children:"Uptime"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:mB(e.data.uptimeMs)})]}):h.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})]}),h.jsxs("section",{className:"nb-card",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:["全局配置 ",h.jsx("code",{className:"text-sm font-[family-name:var(--font-mono)] font-normal bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"~/.coral/env"})]}),n?h.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 编辑模式"}):h.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a(!0),type:"button","aria-label":"编辑 env 文件",children:[h.jsx(Kp,{size:12,strokeWidth:2.5})," 编辑"]})]}),n?h.jsx(fB,{onClose:()=>{a(!1),t.refetch()}}):t.data&&t.data.exists?h.jsx("dl",{className:"grid grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:t.data.entries.map(o=>h.jsxs("div",{className:"contents",children:[h.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[o.masked&&h.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),o.key]}),h.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:o.value})]},o.key))}):h.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:['env 文件不存在。点"编辑"或者终端运行 ',h.jsx("code",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded font-[family-name:var(--font-mono)]",children:"sps setup"}),"。"]})]}),h.jsx(dB,{})]})}function uB({current:e}){var S;const{confirm:t,alert:n}=si(),[a,s]=R.useState(!1),[o,c]=R.useState(null),f=st({queryKey:["latest-version"],queryFn:XC,enabled:!1}),[d,m]=R.useState(null),[y,g]=R.useState("npm i -g @coralai/sps-cli@latest"),x=async()=>{var k;if(await t({title:"升级 sps-cli",body:`当前 ${e},升级到 ${(k=f.data)==null?void 0:k.latest}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。`,confirm:"升级"})){s(!0),c(null),m(null);try{const _=await WC();if(c(_.output),m(_.installedVersion),g(_.command),_.ok)n({title:"升级完成",body:`装上了 v${_.installedVersion}。请 \`pkill -f "sps console"\` 再重启以生效。`});else{const A=_.installedVersion&&_.installedVersion===e?`npm 执行完毕但版本没变(仍 ${_.installedVersion})——多半是权限或 registry 问题。可复制下面的命令在终端手动跑。`:"npm 没装上新版本。可复制命令手动跑,或看下面日志定位。";n({title:"升级未生效",body:A})}}catch(_){c(_.message),n({title:"升级失败",body:_.message})}finally{s(!1)}}},v=async()=>{const w=f.data&&!f.data.upToDate?`npm i -g @coralai/sps-cli@${f.data.latest}`:y;try{await navigator.clipboard.writeText(w),n({title:"命令已复制",body:`粘贴到终端运行即可:
|
|
530
|
+
${w}`})}catch{n({title:"复制失败",body:`请手动复制:
|
|
531
|
+
${w}`})}};return h.jsxs("section",{className:"nb-card",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"版本"}),h.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f.refetch(),disabled:f.isFetching||!e,type:"button","aria-label":"检查最新版本",children:[f.isFetching?h.jsx(Ut,{size:12,strokeWidth:3,className:"animate-spin"}):h.jsx(Cl,{size:12,strokeWidth:2.5}),"检查更新"]})]}),h.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[h.jsx("dt",{className:"font-bold",children:"sps-cli (当前)"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),f.data&&h.jsxs(h.Fragment,{children:[h.jsx("dt",{className:"font-bold",children:"npm (最新)"}),h.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2 flex-wrap",children:[f.data.latest,f.data.upToDate?h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"最新"}):h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:x,disabled:a,type:"button","aria-label":"升级到最新版本",children:[a?h.jsx(Ut,{size:11,strokeWidth:3,className:"animate-spin"}):h.jsx(WE,{size:11,strokeWidth:2.5}),"升级"]}),h.jsxs("button",{className:"nb-btn",style:{padding:"3px 10px",fontSize:11},onClick:v,type:"button","aria-label":"复制升级命令",title:"自动升级失败时手动跑",children:[h.jsx(z2,{size:11,strokeWidth:2.5})," 复制命令"]})]})]})]}),d&&h.jsxs(h.Fragment,{children:[h.jsx("dt",{className:"font-bold",children:"已安装"}),h.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[d,d===((S=f.data)==null?void 0:S.latest)?h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"已生效(重启 console 后可见)"}):d===e?h.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"未升级成功"}):null]})]}),f.isError&&h.jsxs(h.Fragment,{children:[h.jsx("dt",{className:"font-bold",children:"检查"}),h.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:f.error instanceof Error?f.error.message:String(f.error)})]})]}),o&&h.jsx("pre",{className:"mt-3 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-3 max-h-40 overflow-auto whitespace-pre-wrap",children:o})]})}function fB({onClose:e}){const t=qn(),{alert:n}=si(),a=st({queryKey:["system-env-raw"],queryFn:YC}),[s,o]=R.useState(null),[c,f]=R.useState(null);R.useEffect(()=>{a.data&&s===null&&(o(a.data.content),f(a.data.etag))},[a.data,s]);const d=s!==null&&a.data&&s!==a.data.content,m=Pn({mutationFn:()=>{if(s===null)throw new Error("no draft");return VC(s,c??"")},onSuccess:()=>{t.invalidateQueries({queryKey:["system-env"]}),t.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:y=>{const g=y.status;n({title:g===409?"env 被其他地方修改了":"保存失败",body:g===409?"请点取消后重开编辑。":y instanceof Error?y.message:String(y)})}});return a.isLoading?h.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}):h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:"⚠ 文件包含凭证明文。保存时保持 0600 权限。"}),h.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:s??"",onChange:y=>o(y.target.value),spellCheck:!1,"aria-label":"env 文件编辑器"}),h.jsxs("div",{className:"flex items-center justify-between mt-3",children:[h.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[c?`etag: ${c}`:"",d?" · ● 未保存":""]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:m.isPending,type:"button",children:[h.jsx(Xi,{size:12,strokeWidth:3})," 取消"]}),h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>m.mutate(),disabled:!d||m.isPending,type:"button","aria-label":"保存 env",children:[m.isPending?h.jsx(Ut,{size:12,strokeWidth:3,className:"animate-spin"}):h.jsx(zf,{size:12,strokeWidth:3}),"保存"]})]})]})]})}function dB(){var g;const{alert:e}=si(),t=st({queryKey:["projects"],queryFn:_r}),[n,a]=R.useState({}),[s,o]=R.useState({}),[c,f]=R.useState({}),d=(((g=t.data)==null?void 0:g.data)??[]).map(x=>({project:x.name})),m=async(x,v)=>{o(S=>({...S,[x]:v?"fix":"check"}));try{const S=await ZC(x,v);a(w=>({...w,[x]:S})),f(w=>({...w,[x]:!0}))}catch(S){e({title:`doctor ${v?"修复":"检查"}失败`,body:S instanceof Error?S.message:String(S)})}finally{o(S=>({...S,[x]:null}))}},y=async()=>{for(const x of d)await m(x.project,!1)};return h.jsxs("section",{className:"nb-card",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"项目健康检查"}),h.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>{y()},disabled:d.length===0||Object.values(s).some(Boolean),type:"button",children:[h.jsx(Cl,{size:12,strokeWidth:2.5}),"检查全部"]})]}),d.length===0?h.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:"还没有项目。"}):h.jsx("ul",{className:"flex flex-col gap-2",children:d.map(x=>{const v=n[x.project],S=s[x.project],w=v?v.checks.filter(T=>T.status==="fail").length:0,k=v?v.checks.filter(T=>T.status==="warn").length:0,_=c[x.project]??!1,A=v!=null;return h.jsxs("li",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[h.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[h.jsxs("button",{type:"button",onClick:()=>f(T=>({...T,[x.project]:!_})),disabled:!A,className:"flex items-center gap-2 flex-1 text-left min-w-0","aria-label":_?"折叠":"展开",children:[A&&v.ok?h.jsx(lp,{size:16,className:"text-[var(--color-running)] shrink-0",strokeWidth:2.5}):A?h.jsx(rc,{size:16,className:"text-[var(--color-stuck)] shrink-0",strokeWidth:2.5}):h.jsx(lp,{size:16,className:"text-[var(--color-text-subtle)] shrink-0",strokeWidth:2.5}),A&&(_?h.jsx(xc,{size:12}):h.jsx(Lf,{size:12})),h.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:x.project}),A?v.ok?h.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"}):h.jsxs("span",{className:"text-xs text-[var(--color-stuck)] font-semibold",children:[w," fail · ",k," warn"]}):h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:'点 "检查" 运行 sps doctor'})]}),h.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{m(x.project,!1)},disabled:!!S,type:"button","aria-label":"检查",children:[S==="check"?h.jsx(Ut,{size:11,strokeWidth:3,className:"animate-spin"}):h.jsx(Cl,{size:11,strokeWidth:2.5}),"检查"]}),h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>{m(x.project,!0)},disabled:!!S||A&&v.ok,type:"button","aria-label":"自动修复",title:A&&v.ok?"已无可修问题":"调 sps doctor <proj> --fix:自动创建 .claude/hooks/stop.sh、state.json 等",children:[S==="fix"?h.jsx(Ut,{size:11,strokeWidth:3,className:"animate-spin"}):h.jsx(r1,{size:11,strokeWidth:2.5}),"修复"]})]}),_&&A&&h.jsxs("div",{className:"border-t-2 border-dashed border-[var(--color-text)] px-3 py-2",children:[h.jsx("ul",{className:"flex flex-col gap-1 text-xs font-[family-name:var(--font-mono)]",children:v.checks.map((T,j)=>h.jsx(hB,{check:T},`${T.name}-${j}`))}),v.fixes.length>0&&h.jsxs("div",{className:"mt-3 bg-[var(--color-running-bg)] border-2 border-[var(--color-running)] rounded p-2",children:[h.jsx("div",{className:"text-xs font-bold text-[var(--color-running)] mb-1",children:"已修复"}),h.jsx("ul",{className:"text-xs list-disc pl-4",children:v.fixes.map((T,j)=>h.jsx("li",{children:T},j))})]})]})]},x.project)})})]})}function hB({check:e}){const t=e.status==="pass"?h.jsx(lp,{size:12,className:"text-[var(--color-running)]",strokeWidth:2.5}):e.status==="fail"?h.jsx(rc,{size:12,className:"text-[var(--color-crashed)]",strokeWidth:2.5}):e.status==="warn"?h.jsx(rc,{size:12,className:"text-[var(--color-stuck)]",strokeWidth:2.5}):h.jsx("span",{className:"w-3 h-3 rounded-full bg-[var(--color-text-subtle)] inline-block"});return h.jsxs("li",{className:"flex items-start gap-2",children:[h.jsx("span",{className:"pt-0.5 shrink-0",children:t}),h.jsx("span",{className:"font-bold w-32 shrink-0",children:e.name}),h.jsx("span",{className:"text-[var(--color-text-muted)] break-words",children:e.message})]})}function mB(e){const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n>0?`${n}h ${a}m ${s}s`:a>0?`${a}m ${s}s`:`${s}s`}function pB(){return $t("/api/chat/sessions")}function gB(e){return $t(`/api/chat/sessions/${e}`)}async function iE(e={}){const t=await fetch("/api/chat/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return await t.json()}async function bB(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function yB(e,t){const n=await fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return await n.json()}async function xB(e){const t=await fetch(`/api/chat/sessions/${e}/interrupt`,{method:"POST"});if(!t.ok&&t.status!==204)throw new Error(`${t.status}: ${await t.text()}`)}function vB(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return $t(`/api/chat/sessions/${e}/messages${n}`)}function EB(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return $t(`/api/fs/browse${t}`)}function aE(){var j,F,M,q,K,te,D;const{sessionId:e}=$E(),t=wr(),n=qn(),{confirm:a,alert:s}=si(),o=st({queryKey:["chat-sessions"],queryFn:pB}),c=st({queryKey:["chat-session",e],queryFn:()=>gB(e??""),enabled:!!e}),[f,d]=R.useState(null),[m,y]=R.useState(""),[g,x]=R.useState(!1),v=R.useRef(null),[S,w]=R.useState(!1);R.useEffect(()=>{if(!e)return;const P=new EventSource(`/stream/chat/${encodeURIComponent(e)}`);let J=!0;return P.addEventListener("open",()=>{if(J){J=!1;return}const re=n.getQueryData(["chat-session",e]),Q=re!=null&&re.messages.length?re.messages[re.messages.length-1].ts:void 0;vB(e,Q).then(Y=>{Y.data.length!==0&&n.setQueryData(["chat-session",e],U=>{if(!U)return U;const ae=new Set(U.messages.map(he=>he.id)),G=Y.data.filter(he=>!ae.has(he.id));return G.length===0?U:{...U,messages:[...U.messages,...G],lastMessageAt:G[G.length-1].ts,messageCount:U.messageCount+G.length}})}).catch(()=>{})}),P.addEventListener("chat.message",re=>{try{const Q=JSON.parse(re.data);n.setQueryData(["chat-session",e],Y=>{if(!Y||Y.messages.some(G=>G.id===Q.message.id))return Y;const ae=Y.messages.findIndex(G=>G.role==="user"&&G.id.startsWith("optim-")&&G.content===Q.message.content);if(ae>=0){const G=[...Y.messages];return G[ae]=Q.message,{...Y,messages:G}}return{...Y,messages:[...Y.messages,Q.message]}})}catch{}}),P.addEventListener("chat.message.pending",re=>{try{const Q=JSON.parse(re.data);d({id:Q.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),P.addEventListener("chat.message.chunk.text",re=>{try{const Q=JSON.parse(re.data);d(Y=>{if(!Y||Y.id!==Q.assistantId)return Y;const U=[...Y.blocks],ae=U[U.length-1];return ae&&ae.type==="text"?U[U.length-1]={...ae,target:ae.target+Q.text}:U.push({type:"text",target:Q.text,displayed:""}),{...Y,blocks:U}})}catch{}}),P.addEventListener("chat.message.chunk.tool_use",re=>{try{const Q=JSON.parse(re.data);d(Y=>!Y||Y.id!==Q.assistantId?Y:{...Y,blocks:[...Y.blocks,{type:"tool_use",id:Q.id,title:Q.title,kind:Q.kind,status:Q.status}]})}catch{}}),P.addEventListener("chat.message.chunk.tool_update",re=>{try{const Q=JSON.parse(re.data);d(Y=>!Y||Y.id!==Q.assistantId?Y:{...Y,blocks:Y.blocks.map(U=>U.type==="tool_use"&&U.id===Q.id?{...U,status:Q.status}:U)})}catch{}}),P.addEventListener("chat.message.complete",re=>{try{const Q=JSON.parse(re.data);d(Y=>Y&&Y.id===Q.assistantId?{...Y,done:!0,finalMessage:Q.message}:Y)}catch{}}),()=>P.close()},[e,n]),R.useEffect(()=>{if(!f)return;const P=f.blocks.reduce((re,Q)=>Q.type==="text"?re+(Q.target.length-Q.displayed.length):re,0);if(P<=0){if(f.done&&f.finalMessage){const re=f.finalMessage;n.setQueryData(["chat-session",e],Q=>!Q||Q.messages.some(Y=>Y.id===re.id)?Q:{...Q,messages:[...Q.messages,re],lastMessageAt:re.ts,messageCount:Q.messageCount+1}),n.invalidateQueries({queryKey:["chat-sessions"]}),d(null),x(!1)}return}const J=setTimeout(()=>{d(re=>{if(!re)return re;let Q=Math.max(1,Math.ceil(P/40));const Y=re.blocks.map(U=>{if(U.type!=="text"||Q<=0)return U;const ae=U.target.length-U.displayed.length;if(ae<=0)return U;const G=Math.min(ae,Q);return Q-=G,{...U,displayed:U.target.slice(0,U.displayed.length+G)}});return{...re,blocks:Y}})},25);return()=>clearTimeout(J)},[f,n,e]),R.useEffect(()=>{const P=v.current;P&&(P.scrollTop=P.scrollHeight)},[c.data,f]);const k=R.useCallback(async(P={})=>{var J,re;try{const Q=await iE({cwd:((J=P.cwd)==null?void 0:J.trim())||void 0,title:((re=P.title)==null?void 0:re.trim())||void 0});n.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${Q.id}`),w(!1)}catch(Q){s({title:"新建对话失败",body:Q instanceof Error?Q.message:String(Q)})}},[n,t,s]),_=R.useCallback(async()=>{const P=m.trim();if(!P||g)return;let J=e;if(!J){const Q=await iE();n.invalidateQueries({queryKey:["chat-sessions"]}),J=Q.id,t(`/chat/${J}`,{replace:!0})}const re={id:`optim-${Date.now()}`,role:"user",content:P,ts:new Date().toISOString(),status:"complete"};n.setQueryData(["chat-session",J],Q=>Q?{...Q,messages:[...Q.messages,re],lastMessageAt:re.ts,messageCount:Q.messageCount+1}:{id:J,createdAt:re.ts,lastMessageAt:re.ts,title:P.slice(0,60),project:null,messageCount:1,messages:[re]}),y(""),x(!0);try{await yB(J,P)}catch(Q){x(!1),console.error("sendMessage failed",Q),s({title:"发送失败",body:Q instanceof Error?Q.message:String(Q)})}},[m,g,e,n,t,s]),A=R.useCallback(async P=>{await a({title:"删除对话",body:"对话记录会永久删除,不可恢复。",confirm:"删除",danger:!0})&&(await bB(P),n.invalidateQueries({queryKey:["chat-sessions"]}),e===P&&t("/chat"))},[n,e,t,a]),T=R.useCallback(async()=>{if(e)try{await xB(e)}catch(P){s({title:"中断失败",body:P instanceof Error?P.message:String(P)})}},[e,s]);return h.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[h.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[h.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:()=>w(!0),type:"button",children:[h.jsx(Di,{size:14,strokeWidth:3}),"新建对话"]}),h.jsxs("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:["历史 ",((j=o.data)==null?void 0:j.data.length)??0]}),h.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((F=o.data)==null?void 0:F.data)??[]).map(P=>h.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",e===P.id?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[h.jsxs("button",{type:"button","aria-label":`打开对话 ${P.title}${P.cwd?`(工作目录 ${P.cwd})`:""}`,onClick:()=>t(`/chat/${P.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[h.jsx(Pv,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("p",{className:"text-sm font-semibold truncate",children:P.title}),h.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[P.messageCount," msg · ",Lw(P.lastMessageAt??P.createdAt)]}),P.cwd&&h.jsxs("p",{className:"text-[10px] text-[var(--color-text-subtle)] font-[family-name:var(--font-mono)] truncate flex items-center gap-1",title:P.cwd,children:[h.jsx(sc,{size:9,strokeWidth:2.5,className:"flex-shrink-0"}),h.jsx("span",{className:"truncate",dir:"rtl",children:P.cwd})]})]})]}),h.jsx("button",{type:"button","aria-label":"删除对话",className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:J=>{J.stopPropagation(),A(P.id)},children:h.jsx(Il,{size:12})})]},P.id)),(((M=o.data)==null?void 0:M.data)??[]).length===0&&h.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:"还没对话。点上面新建。"})]})]}),h.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:e?h.jsxs(h.Fragment,{children:[h.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((q=c.data)==null?void 0:q.title)??"新对话"}),h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:e}),((K=c.data)==null?void 0:K.cwd)&&h.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1 mt-1",title:c.data.cwd,children:[h.jsx(sc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),h.jsx("span",{className:"truncate",children:c.data.cwd})]})]}),h.jsxs("div",{ref:v,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((te=c.data)==null?void 0:te.messages)??[]).map(P=>h.jsx(_B,{msg:P},P.id)),f&&h.jsx(kB,{pending:f}),!c.isLoading&&(((D=c.data)==null?void 0:D.messages)??[]).length===0&&!f&&!g&&h.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行"})]}),h.jsx("div",{className:"border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)]",children:h.jsxs("div",{className:"flex gap-2 items-end",children:[h.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:"说点什么… (Enter 发送,Shift+Enter 换行)",rows:2,value:m,onChange:P=>y(P.target.value),onKeyDown:P=>{P.key==="Enter"&&!P.shiftKey&&!P.nativeEvent.isComposing&&(P.preventDefault(),_())},"aria-label":"消息输入"}),f?h.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:T,type:"button","aria-label":"中断生成",children:[h.jsx(t1,{size:14,strokeWidth:3}),"中断"]}):h.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:_,disabled:!m.trim()||g,type:"button","aria-label":"发送",children:[g?h.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(kC,{size:14,strokeWidth:3}),"发送"]})]})})]}):h.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:h.jsxs("div",{className:"text-center max-w-md",children:[h.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center mx-auto mb-4",children:h.jsx(Pv,{size:32,strokeWidth:2.5})}),h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"对话 💬"}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。'}),h.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:"Enter 发送 · Shift+Enter 换行 · 内容流式返回"})]})})}),S&&h.jsx(SB,{onCancel:()=>w(!1),onCreate:P=>k(P)})]})}function SB({onCancel:e,onCreate:t}){const[n,a]=R.useState(""),[s,o]=R.useState(""),[c,f]=R.useState(!1),[d,m]=R.useState(!1),y=async()=>{if(!c){f(!0);try{t({title:n.trim()||void 0,cwd:s.trim()||void 0})}finally{f(!1)}}};return h.jsxs("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-[rgba(45,55,72,0.4)] p-4",onClick:e,role:"presentation",children:[h.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-md w-full p-5",onClick:g=>g.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":"新建对话",children:[h.jsxs("header",{className:"flex items-center justify-between mb-4",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:"新建对话"}),h.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:e,"aria-label":"关闭",children:h.jsx(Xi,{size:16,strokeWidth:3})})]}),h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"new-session-title",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:"标题(可选)"}),h.jsx("input",{id:"new-session-title",type:"text",className:"nb-input w-full",placeholder:"留空 = 自动用首条消息生成",value:n,onChange:g=>a(g.target.value),autoFocus:!0})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"new-session-cwd",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:"工作目录(可选)"}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("input",{id:"new-session-cwd",type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)] text-sm",placeholder:"/home/coral/projects/my-app",value:s,onChange:g=>o(g.target.value)}),h.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>m(!0),"aria-label":"浏览选择目录",title:"浏览选择目录",children:[h.jsx(G2,{size:14,strokeWidth:2.5}),"浏览"]})]}),h.jsxs("p",{className:"text-[11px] text-[var(--color-text-muted)] mt-1.5 leading-relaxed",children:[h.jsx(sc,{size:10,strokeWidth:2.5,className:"inline mr-1 -mt-0.5"}),"Agent 在该目录下读写文件。绝对路径,必须存在。 留空则用 daemon 启动时的目录。"]})]}),h.jsxs("div",{className:"flex gap-2 justify-end pt-2",children:[h.jsx("button",{type:"button",className:"nb-btn",onClick:e,children:"取消"}),h.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:y,disabled:c,children:[c?h.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(Di,{size:14,strokeWidth:3}),"创建"]})]})]})]}),d&&h.jsx(wB,{initialPath:s.trim()||void 0,onCancel:()=>m(!1),onSelect:g=>{o(g),m(!1)}})]})}function wB({initialPath:e,onCancel:t,onSelect:n}){var m,y,g;const[a,s]=R.useState(e??null),o=st({queryKey:["fs-browse",a],queryFn:()=>EB(a??void 0),staleTime:0,gcTime:0}),c=((m=o.data)==null?void 0:m.path)??a??"",f=((y=o.data)==null?void 0:y.parent)??null,d=((g=o.data)==null?void 0:g.home)??null;return h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.5)] p-4",onClick:t,role:"presentation",children:h.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-lg w-full p-5 flex flex-col",style:{maxHeight:"70vh"},onClick:x=>x.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":"选择目录",children:[h.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base",children:"选择目录"}),h.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:t,"aria-label":"关闭",children:h.jsx(Xi,{size:14,strokeWidth:3})})]}),h.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[h.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>f&&s(f),disabled:!f||o.isLoading,"aria-label":"上级目录",title:"上级目录",children:h.jsx(S2,{size:12,strokeWidth:3})}),h.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>d&&s(d),disabled:!d||o.isLoading,"aria-label":"回到 Home",title:"回到 Home",children:h.jsx(iC,{size:12,strokeWidth:3})}),h.jsx("div",{className:"flex-1 min-w-0 nb-input font-[family-name:var(--font-mono)] text-xs px-2 py-1.5 truncate",title:c,dir:"rtl",children:c||"..."})]}),h.jsxs("div",{className:"flex-1 overflow-y-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[o.isLoading&&h.jsxs("div",{className:"flex items-center justify-center py-12 text-[var(--color-text-muted)]",children:[h.jsx(Ut,{size:16,strokeWidth:3,className:"animate-spin mr-2"}),"加载中..."]}),o.isError&&h.jsxs("div",{className:"p-4 text-sm text-[var(--color-crashed)]",children:[h.jsx("p",{className:"font-bold mb-1",children:"读取失败"}),h.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] break-all",children:o.error instanceof Error?o.error.message:String(o.error)})]}),o.data&&h.jsxs("ul",{className:"divide-y-2 divide-[var(--color-text)]/20",children:[o.data.entries.length===0&&h.jsx("li",{className:"p-4 text-xs text-[var(--color-text-subtle)] italic text-center",children:"— 空目录 —"}),o.data.entries.map(x=>h.jsx("li",{children:h.jsxs("button",{type:"button",className:"w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--color-accent-mint)] disabled:opacity-50 disabled:cursor-not-allowed font-[family-name:var(--font-mono)]",disabled:!x.isDirectory,onClick:()=>{if(!x.isDirectory)return;const v=c.endsWith("/")||c.endsWith("\\")?"":"/";s(`${c}${v}${x.name}`)},title:x.isDirectory?`进入 ${x.name}/`:"文件不可选",children:[x.isDirectory?h.jsx(sc,{size:14,strokeWidth:2.5,className:"flex-shrink-0 text-[var(--color-text)]"}):h.jsx("span",{className:"w-3.5 h-3.5 flex-shrink-0"}),h.jsx("span",{className:"truncate",children:x.name}),x.isDirectory&&h.jsx(Lf,{size:12,strokeWidth:2.5,className:"ml-auto flex-shrink-0 text-[var(--color-text-muted)]"})]})},x.name))]})]}),h.jsxs("div",{className:"flex gap-2 justify-end pt-3 shrink-0",children:[h.jsx("button",{type:"button",className:"nb-btn",onClick:t,children:"取消"}),h.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>n(c),disabled:!c||o.isLoading||o.isError,children:[h.jsx(If,{size:14,strokeWidth:3}),"选此目录"]})]})]})})}function _B({msg:e}){const t=e.role==="user",n=e.role==="error",a=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}];return h.jsx("div",{className:t?"self-end max-w-3xl":"self-start max-w-3xl",children:h.jsxs("div",{className:["nb-card",t?"bg-[var(--color-secondary)]":n?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[h.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:[t?"你":n?"错误":"assistant",h.jsx("span",{className:"font-normal",children:"·"}),h.jsx("span",{className:"font-normal",children:Lw(e.ts)})]}),h.jsx("div",{className:"flex flex-col gap-2",children:a.map((s,o)=>h.jsx(NB,{block:s},o))}),e.truncated&&h.jsx("p",{className:"mt-3 px-3 py-2 bg-[var(--color-stuck-bg)] border-2 border-[var(--color-stuck)] rounded-lg text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 输出超过 10MB,已截断"})]})})}function kB({pending:e}){const t=(()=>{for(let n=e.blocks.length-1;n>=0;n--)if(e.blocks[n].type==="text")return n;return-1})();return h.jsx("div",{className:"self-start max-w-3xl",children:h.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[h.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",h.jsx("span",{className:"font-normal",children:"·"}),h.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[h.jsx(Ut,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"…"}),e.blocks.map((n,a)=>{if(n.type==="text"){const s=a===t;return h.jsxs("div",{className:"relative",children:[h.jsx(jw,{text:n.displayed}),s&&h.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},a)}return h.jsx(Dw,{tool:n},a)})]})]})})}function NB({block:e}){return e.type==="text"?h.jsx(jw,{text:e.text}):h.jsx(Dw,{tool:e})}function jw({text:e}){return e?h.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:h.jsx(Ng,{remarkPlugins:[Og],rehypePlugins:[jg],children:e})}):null}function Dw({tool:e}){const[t,n]=R.useState(!1),a=e.status==="completed",s=e.status==="failed",o=!a&&!s;return h.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[h.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[h.jsx(Lf,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),h.jsx(r1,{size:12,strokeWidth:2.5}),h.jsx("span",{className:"font-bold",children:e.kind}),h.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",children:e.title}),o&&h.jsx(Ut,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),a&&h.jsx(If,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),s&&h.jsx(j2,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)]"})]}),t&&h.jsxs("div",{className:"px-3 py-2 text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] border-t-2 border-[var(--color-text)]",children:[h.jsxs("div",{children:["id: ",h.jsx("span",{className:"text-[var(--color-text)]",children:e.id})]}),h.jsxs("div",{children:["status: ",h.jsx("span",{className:"text-[var(--color-text)]",children:e.status})]})]})]})}function Lw(e){if(!e)return"";const t=new Date(e),n=Date.now()-t.getTime();return n<6e4?"刚才":n<36e5?`${Math.floor(n/6e4)}m`:n<864e5?`${Math.floor(n/36e5)}h`:t.toLocaleDateString()}function TB(){return h.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:"404 · 页面不存在"}),h.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:"没找到这个页面。可能是链接过期了。"}),h.jsx(ds,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:"返回首页"})]})}function CB(){return h.jsx(pA,{children:h.jsx(DT,{children:h.jsxs(zn,{element:h.jsx(hA,{}),children:[h.jsx(zn,{index:!0,element:h.jsx(RT,{to:"/projects",replace:!0})}),h.jsx(zn,{path:"/projects",element:h.jsx(gA,{})}),h.jsx(zn,{path:"/projects/new",element:h.jsx(kA,{})}),h.jsx(zn,{path:"/projects/:name",element:h.jsx(BO,{})}),h.jsx(zn,{path:"/board",element:h.jsx(_R,{})}),h.jsx(zn,{path:"/workers",element:h.jsx(UR,{})}),h.jsx(zn,{path:"/logs",element:h.jsx(HR,{})}),h.jsx(zn,{path:"/skills",element:h.jsx(lB,{})}),h.jsx(zn,{path:"/system",element:h.jsx(cB,{})}),h.jsx(zn,{path:"/chat",element:h.jsx(aE,{})}),h.jsx(zn,{path:"/chat/:sessionId",element:h.jsx(aE,{})}),h.jsx(zn,{path:"*",element:h.jsx(TB,{})})]})})})}mA();const AB=new EN({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),Iw=document.getElementById("root");if(!Iw)throw new Error("#root not found");Xk.createRoot(Iw).render(h.jsx(R.StrictMode,{children:h.jsx(SN,{client:AB,children:h.jsx(r2,{children:h.jsx(SA,{children:h.jsx(CB,{})})})})}));
|