@coralai/sps-cli 0.49.4 → 0.49.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,486 @@
1
+ var zk=Object.defineProperty;var iv=e=>{throw TypeError(e)};var Bk=(e,t,i)=>t in e?zk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var av=(e,t,i)=>Bk(e,typeof t!="symbol"?t+"":t,i),ep=(e,t,i)=>t.has(e)||iv("Cannot "+i);var B=(e,t,i)=>(ep(e,t,"read from private field"),i?i.call(e):t.get(e)),_e=(e,t,i)=>t.has(e)?iv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),ge=(e,t,i,r)=>(ep(e,t,"write to private field"),r?r.call(e,i):t.set(e,i),i),Ue=(e,t,i)=>(ep(e,t,"access private method"),i);var Pu=(e,t,i,r)=>({set _(l){ge(e,t,l,i)},get _(){return B(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function i(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=i(l);fetch(l.href,o)}})();function Sm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tp={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 rv;function Uk(){if(rv)return Fo;rv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(r,l,o){var c=null;if(o!==void 0&&(c=""+o),l.key!==void 0&&(c=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:e,type:r,key:c,ref:l!==void 0?l:null,props:o}}return Fo.Fragment=t,Fo.jsx=i,Fo.jsxs=i,Fo}var sv;function Fk(){return sv||(sv=1,tp.exports=Uk()),tp.exports}var m=Fk(),np={exports:{}},Le={};/**
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 lv;function Pk(){if(lv)return Le;lv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=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"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=v&&D[v]||D["@@iterator"],typeof D=="function"?D:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(D,J,C){this.props=D,this.context=J,this.refs=k,this.updater=C||S}_.prototype.isReactComponent={},_.prototype.setState=function(D,J){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,J,"setState")},_.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function R(){}R.prototype=_.prototype;function A(D,J,C){this.props=D,this.context=J,this.refs=k,this.updater=C||S}var I=A.prototype=new R;I.constructor=A,w(I,_.prototype),I.isPureReactComponent=!0;var $=Array.isArray;function T(){}var P={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function Z(D,J,C){var he=C.ref;return{$$typeof:e,type:D,key:J,ref:he!==void 0?he:null,props:C}}function L(D,J){return Z(D.type,J,D.props)}function K(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function X(D){var J={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(C){return J[C]})}var oe=/\/+/g;function se(D,J){return typeof D=="object"&&D!==null&&D.key!=null?X(""+D.key):J.toString(36)}function ee(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(T,T):(D.status="pending",D.then(function(J){D.status==="pending"&&(D.status="fulfilled",D.value=J)},function(J){D.status==="pending"&&(D.status="rejected",D.reason=J)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function H(D,J,C,he,ke){var ve=typeof D;(ve==="undefined"||ve==="boolean")&&(D=null);var Pe=!1;if(D===null)Pe=!0;else switch(ve){case"bigint":case"string":case"number":Pe=!0;break;case"object":switch(D.$$typeof){case e:case t:Pe=!0;break;case y:return Pe=D._init,H(Pe(D._payload),J,C,he,ke)}}if(Pe)return ke=ke(D),Pe=he===""?"."+se(D,0):he,$(ke)?(C="",Pe!=null&&(C=Pe.replace(oe,"$&/")+"/"),H(ke,J,C,"",function(Zt){return Zt})):ke!=null&&(K(ke)&&(ke=L(ke,C+(ke.key==null||D&&D.key===ke.key?"":(""+ke.key).replace(oe,"$&/")+"/")+Pe)),J.push(ke)),1;Pe=0;var st=he===""?".":he+":";if($(D))for(var it=0;it<D.length;it++)he=D[it],ve=st+se(he,it),Pe+=H(he,J,C,ve,ke);else if(it=x(D),typeof it=="function")for(D=it.call(D),it=0;!(he=D.next()).done;)he=he.value,ve=st+se(he,it++),Pe+=H(he,J,C,ve,ke);else if(ve==="object"){if(typeof D.then=="function")return H(ee(D),J,C,he,ke);throw J=String(D),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Pe}function le(D,J,C){if(D==null)return D;var he=[],ke=0;return H(D,he,"","",function(ve){return J.call(C,ve,ke++)}),he}function V(D){if(D._status===-1){var J=D._result;J=J(),J.then(function(C){(D._status===0||D._status===-1)&&(D._status=1,D._result=C)},function(C){(D._status===0||D._status===-1)&&(D._status=2,D._result=C)}),D._status===-1&&(D._status=0,D._result=J)}if(D._status===1)return D._result.default;throw D._result}var me=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},O={map:le,forEach:function(D,J,C){le(D,function(){J.apply(this,arguments)},C)},count:function(D){var J=0;return le(D,function(){J++}),J},toArray:function(D){return le(D,function(J){return J})||[]},only:function(D){if(!K(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return Le.Activity=g,Le.Children=O,Le.Component=_,Le.Fragment=i,Le.Profiler=l,Le.PureComponent=A,Le.StrictMode=r,Le.Suspense=d,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Le.__COMPILER_RUNTIME={__proto__:null,c:function(D){return P.H.useMemoCache(D)}},Le.cache=function(D){return function(){return D.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(D,J,C){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var he=w({},D.props),ke=D.key;if(J!=null)for(ve in J.key!==void 0&&(ke=""+J.key),J)!z.call(J,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&J.ref===void 0||(he[ve]=J[ve]);var ve=arguments.length-2;if(ve===1)he.children=C;else if(1<ve){for(var Pe=Array(ve),st=0;st<ve;st++)Pe[st]=arguments[st+2];he.children=Pe}return Z(D.type,ke,he)},Le.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:o,_context:D},D},Le.createElement=function(D,J,C){var he,ke={},ve=null;if(J!=null)for(he in J.key!==void 0&&(ve=""+J.key),J)z.call(J,he)&&he!=="key"&&he!=="__self"&&he!=="__source"&&(ke[he]=J[he]);var Pe=arguments.length-2;if(Pe===1)ke.children=C;else if(1<Pe){for(var st=Array(Pe),it=0;it<Pe;it++)st[it]=arguments[it+2];ke.children=st}if(D&&D.defaultProps)for(he in Pe=D.defaultProps,Pe)ke[he]===void 0&&(ke[he]=Pe[he]);return Z(D,ve,ke)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(D){return{$$typeof:f,render:D}},Le.isValidElement=K,Le.lazy=function(D){return{$$typeof:y,_payload:{_status:-1,_result:D},_init:V}},Le.memo=function(D,J){return{$$typeof:h,type:D,compare:J===void 0?null:J}},Le.startTransition=function(D){var J=P.T,C={};P.T=C;try{var he=D(),ke=P.S;ke!==null&&ke(C,he),typeof he=="object"&&he!==null&&typeof he.then=="function"&&he.then(T,me)}catch(ve){me(ve)}finally{J!==null&&C.types!==null&&(J.types=C.types),P.T=J}},Le.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Le.use=function(D){return P.H.use(D)},Le.useActionState=function(D,J,C){return P.H.useActionState(D,J,C)},Le.useCallback=function(D,J){return P.H.useCallback(D,J)},Le.useContext=function(D){return P.H.useContext(D)},Le.useDebugValue=function(){},Le.useDeferredValue=function(D,J){return P.H.useDeferredValue(D,J)},Le.useEffect=function(D,J){return P.H.useEffect(D,J)},Le.useEffectEvent=function(D){return P.H.useEffectEvent(D)},Le.useId=function(){return P.H.useId()},Le.useImperativeHandle=function(D,J,C){return P.H.useImperativeHandle(D,J,C)},Le.useInsertionEffect=function(D,J){return P.H.useInsertionEffect(D,J)},Le.useLayoutEffect=function(D,J){return P.H.useLayoutEffect(D,J)},Le.useMemo=function(D,J){return P.H.useMemo(D,J)},Le.useOptimistic=function(D,J){return P.H.useOptimistic(D,J)},Le.useReducer=function(D,J,C){return P.H.useReducer(D,J,C)},Le.useRef=function(D){return P.H.useRef(D)},Le.useState=function(D){return P.H.useState(D)},Le.useSyncExternalStore=function(D,J,C){return P.H.useSyncExternalStore(D,J,C)},Le.useTransition=function(){return P.H.useTransition()},Le.version="19.2.5",Le}var ov;function wm(){return ov||(ov=1,np.exports=Pk()),np.exports}var M=wm(),ip={exports:{}},Po={},ap={exports:{}},rp={};/**
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 cv;function $k(){return cv||(cv=1,(function(e){function t(H,le){var V=H.length;H.push(le);e:for(;0<V;){var me=V-1>>>1,O=H[me];if(0<l(O,le))H[me]=le,H[V]=O,V=me;else break e}}function i(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var le=H[0],V=H.pop();if(V!==le){H[0]=V;e:for(var me=0,O=H.length,D=O>>>1;me<D;){var J=2*(me+1)-1,C=H[J],he=J+1,ke=H[he];if(0>l(C,V))he<O&&0>l(ke,C)?(H[me]=ke,H[he]=V,me=he):(H[me]=C,H[J]=V,me=J);else if(he<O&&0>l(ke,V))H[me]=ke,H[he]=V,me=he;else break e}}return le}function l(H,le){var V=H.sortIndex-le.sortIndex;return V!==0?V:H.id-le.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=[],h=[],y=1,g=null,v=3,x=!1,S=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function I(H){for(var le=i(h);le!==null;){if(le.callback===null)r(h);else if(le.startTime<=H)r(h),le.sortIndex=le.expirationTime,t(d,le);else break;le=i(h)}}function $(H){if(w=!1,I(H),!S)if(i(d)!==null)S=!0,T||(T=!0,X());else{var le=i(h);le!==null&&ee($,le.startTime-H)}}var T=!1,P=-1,z=5,Z=-1;function L(){return k?!0:!(e.unstable_now()-Z<z)}function K(){if(k=!1,T){var H=e.unstable_now();Z=H;var le=!0;try{e:{S=!1,w&&(w=!1,R(P),P=-1),x=!0;var V=v;try{t:{for(I(H),g=i(d);g!==null&&!(g.expirationTime>H&&L());){var me=g.callback;if(typeof me=="function"){g.callback=null,v=g.priorityLevel;var O=me(g.expirationTime<=H);if(H=e.unstable_now(),typeof O=="function"){g.callback=O,I(H),le=!0;break t}g===i(d)&&r(d),I(H)}else r(d);g=i(d)}if(g!==null)le=!0;else{var D=i(h);D!==null&&ee($,D.startTime-H),le=!1}}break e}finally{g=null,v=V,x=!1}le=void 0}}finally{le?X():T=!1}}}var X;if(typeof A=="function")X=function(){A(K)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,se=oe.port2;oe.port1.onmessage=K,X=function(){se.postMessage(null)}}else X=function(){_(K,0)};function ee(H,le){P=_(function(){H(e.unstable_now())},le)}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(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(H){switch(v){case 1:case 2:case 3:var le=3;break;default:le=v}var V=v;v=le;try{return H()}finally{v=V}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(H,le){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var V=v;v=H;try{return le()}finally{v=V}},e.unstable_scheduleCallback=function(H,le,V){var me=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?me+V:me):V=me,H){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=V+O,H={id:y++,callback:le,priorityLevel:H,startTime:V,expirationTime:O,sortIndex:-1},V>me?(H.sortIndex=V,t(h,H),i(d)===null&&H===i(h)&&(w?(R(P),P=-1):w=!0,ee($,V-me))):(H.sortIndex=O,t(d,H),S||x||(S=!0,T||(T=!0,X()))),H},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(H){var le=v;return function(){var V=v;v=le;try{return H.apply(this,arguments)}finally{v=V}}}})(rp)),rp}var uv;function qk(){return uv||(uv=1,ap.exports=$k()),ap.exports}var sp={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 fv;function Hk(){if(fv)return hn;fv=1;var e=wm();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(d,h,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:g==null?null:""+g,children:d,containerInfo:h,implementation:y}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,hn.createPortal=function(d,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(d,h,null,y)},hn.flushSync=function(d){var h=c.T,y=r.p;try{if(c.T=null,r.p=2,d)return d()}finally{c.T=h,r.p=y,r.d.f()}},hn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},hn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},hn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:x}):y==="script"&&r.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},hn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=f(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},hn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,g=f(y,h.crossOrigin);r.d.L(d,y,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},hn.preloadModule=function(d,h){if(typeof d=="string")if(h){var y=f(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},hn.requestFormReset=function(d){r.d.r(d)},hn.unstable_batchedUpdates=function(d,h){return d(h)},hn.useFormState=function(d,h,y){return c.H.useFormState(d,h,y)},hn.useFormStatus=function(){return c.H.useHostTransitionStatus()},hn.version="19.2.5",hn}var dv;function Kk(){if(dv)return sp.exports;dv=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(),sp.exports=Hk(),sp.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 hv;function Gk(){if(hv)return Po;hv=1;var e=qk(),t=wm(),i=Kk();function r(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var a=n,s=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(s=a.return),n=a.return;while(n)}return a.tag===3?s:null}function c(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function f(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function d(n){if(o(n)!==n)throw Error(r(188))}function h(n){var a=n.alternate;if(!a){if(a=o(n),a===null)throw Error(r(188));return a!==n?null:n}for(var s=n,u=a;;){var p=s.return;if(p===null)break;var b=p.alternate;if(b===null){if(u=p.return,u!==null){s=u;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===s)return d(p),n;if(b===u)return d(p),a;b=b.sibling}throw Error(r(188))}if(s.return!==u.return)s=p,u=b;else{for(var E=!1,N=p.child;N;){if(N===s){E=!0,s=p,u=b;break}if(N===u){E=!0,u=p,s=b;break}N=N.sibling}if(!E){for(N=b.child;N;){if(N===s){E=!0,s=b,u=p;break}if(N===u){E=!0,u=b,s=p;break}N=N.sibling}if(!E)throw Error(r(189))}}if(s.alternate!==u)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?n:a}function y(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=y(n),a!==null)return a;n=n.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),x=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"),R=Symbol.for("react.consumer"),A=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function X(n){return n===null||typeof n!="object"?null:(n=K&&n[K]||n["@@iterator"],typeof n=="function"?n:null)}var oe=Symbol.for("react.client.reference");function se(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===oe?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case w:return"Fragment";case _:return"Profiler";case k:return"StrictMode";case $:return"Suspense";case T:return"SuspenseList";case Z:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case S:return"Portal";case A:return n.displayName||"Context";case R:return(n._context.displayName||"Context")+".Consumer";case I:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case P:return a=n.displayName||null,a!==null?a:se(n.type)||"Memo";case z:a=n._payload,n=n._init;try{return se(n(a))}catch{}}return null}var ee=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},me=[],O=-1;function D(n){return{current:n}}function J(n){0>O||(n.current=me[O],me[O]=null,O--)}function C(n,a){O++,me[O]=n.current,n.current=a}var he=D(null),ke=D(null),ve=D(null),Pe=D(null);function st(n,a){switch(C(ve,a),C(ke,n),C(he,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?Nx(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=Nx(a),n=Tx(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}J(he),C(he,n)}function it(){J(he),J(ke),J(ve)}function Zt(n){n.memoizedState!==null&&C(Pe,n);var a=he.current,s=Tx(a,n.type);a!==s&&(C(ke,n),C(he,s))}function $n(n){ke.current===n&&(J(he),J(ke)),Pe.current===n&&(J(Pe),Io._currentValue=V)}var Zi,Oa;function qn(n){if(Zi===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);Zi=a&&a[1]||"",Oa=-1<s.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Zi+n+Oa}var ji=!1;function Xe(n,a){if(!n||ji)return"";ji=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(a){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(W){var Q=W}Reflect.construct(n,[],re)}else{try{re.call()}catch(W){Q=W}n.call(re.prototype)}}else{try{throw Error()}catch(W){Q=W}(re=n())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(W){if(W&&Q&&typeof W.stack=="string")return[W.stack,Q.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 j=E.split(`
44
+ `),Y=N.split(`
45
+ `);for(p=u=0;u<j.length&&!j[u].includes("DetermineComponentFrameRoot");)u++;for(;p<Y.length&&!Y[p].includes("DetermineComponentFrameRoot");)p++;if(u===j.length||p===Y.length)for(u=j.length-1,p=Y.length-1;1<=u&&0<=p&&j[u]!==Y[p];)p--;for(;1<=u&&0<=p;u--,p--)if(j[u]!==Y[p]){if(u!==1||p!==1)do if(u--,p--,0>p||j[u]!==Y[p]){var ne=`
46
+ `+j[u].replace(" at new "," at ");return n.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",n.displayName)),ne}while(1<=u&&0<=p);break}}}finally{ji=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?qn(s):""}function _i(n,a){switch(n.tag){case 26:case 27:case 5:return qn(n.type);case 16:return qn("Lazy");case 13:return n.child!==a&&a!==null?qn("Suspense Fallback"):qn("Suspense");case 19:return qn("SuspenseList");case 0:case 15:return Xe(n.type,!1);case 11:return Xe(n.type.render,!1);case 1:return Xe(n.type,!0);case 31:return qn("Activity");default:return""}}function li(n){try{var a="",s=null;do a+=_i(n,s),s=n,n=n.return;while(n);return a}catch(u){return`
47
+ Error generating stack: `+u.message+`
48
+ `+u.stack}}var Ii=Object.prototype.hasOwnProperty,Wi=e.unstable_scheduleCallback,kr=e.unstable_cancelCallback,Kl=e.unstable_shouldYield,bs=e.unstable_requestPaint,Ot=e.unstable_now,ys=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,fe=e.unstable_UserBlockingPriority,Ce=e.unstable_NormalPriority,$e=e.unstable_LowPriority,et=e.unstable_IdlePriority,yn=e.log,ki=e.unstable_setDisableYieldValue,nn=null,Lt=null;function un(n){if(typeof yn=="function"&&ki(n),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(nn,n)}catch{}}var lt=Math.clz32?Math.clz32:kc,zi=Math.log,xn=Math.LN2;function kc(n){return n>>>=0,n===0?32:31-(zi(n)/xn|0)|0}var Nr=256,xs=262144,Tr=4194304;function Tn(n){var a=n&42;if(a!==0)return a;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function U(n,a,s){var u=n.pendingLanes;if(u===0)return 0;var p=0,b=n.suspendedLanes,E=n.pingedLanes;n=n.warmLanes;var N=u&134217727;return N!==0?(u=N&~b,u!==0?p=Tn(u):(E&=N,E!==0?p=Tn(E):s||(s=N&~n,s!==0&&(p=Tn(s))))):(N=u&~b,N!==0?p=Tn(N):E!==0?p=Tn(E):s||(s=u&~n,s!==0&&(p=Tn(s)))),p===0?0:a!==0&&a!==p&&(a&b)===0&&(b=p&-p,s=a&-a,b>=s||b===32&&(s&4194048)!==0)?a:p}function ie(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function pe(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Me(){var n=Tr;return Tr<<=1,(Tr&62914560)===0&&(Tr=4194304),n}function wt(n){for(var a=[],s=0;31>s;s++)a.push(n);return a}function gt(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function xe(n,a,s,u,p,b){var E=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var N=n.entanglements,j=n.expirationTimes,Y=n.hiddenUpdates;for(s=E&~s;0<s;){var ne=31-lt(s),re=1<<ne;N[ne]=0,j[ne]=-1;var Q=Y[ne];if(Q!==null)for(Y[ne]=null,ne=0;ne<Q.length;ne++){var W=Q[ne];W!==null&&(W.lane&=-536870913)}s&=~re}u!==0&&be(n,u,0),b!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=b&~(E&~a))}function be(n,a,s){n.pendingLanes|=a,n.suspendedLanes&=~a;var u=31-lt(a);n.entangledLanes|=a,n.entanglements[u]=n.entanglements[u]|1073741824|s&261930}function Re(n,a){var s=n.entangledLanes|=a;for(n=n.entanglements;s;){var u=31-lt(s),p=1<<u;p&a|n[u]&a&&(n[u]|=a),s&=~p}}function Bt(n,a){var s=a&-a;return s=(s&42)!==0?1:Nt(s),(s&(n.suspendedLanes|a))!==0?0:s}function Nt(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Ji(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function vs(){var n=le.p;return n!==0?n:(n=window.event,n===void 0?32:Xx(n.type))}function Es(n,a){var s=le.p;try{return le.p=n,a()}finally{le.p=s}}var Bi=Math.random().toString(36).slice(2),Ut="__reactFiber$"+Bi,fn="__reactProps$"+Bi,Ra="__reactContainer$"+Bi,Gl="__reactEvents$"+Bi,Nc="__reactListeners$"+Bi,Ss="__reactHandles$"+Bi,Tc="__reactResources$"+Bi,Cr="__reactMarker$"+Bi;function Yl(n){delete n[Ut],delete n[fn],delete n[Gl],delete n[Nc],delete n[Ss]}function vn(n){var a=n[Ut];if(a)return a;for(var s=n.parentNode;s;){if(a=s[Ra]||s[Ut]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(n=Lx(n);n!==null;){if(s=n[Ut])return s;n=Lx(n)}return a}n=s,s=n.parentNode}return null}function ea(n){if(n=n[Ut]||n[Ra]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function Ma(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(r(33))}function Da(n){var a=n[Tc];return a||(a=n[Tc]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ht(n){n[Cr]=!0}var Cc=new Set,Ar={};function ta(n,a){ce(n,a),ce(n+"Capture",a)}function ce(n,a){for(Ar[n]=a,n=0;n<a.length;n++)Cc.add(a[n])}var we=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]*$"),qe={},ot={};function Ft(n){return Ii.call(ot,n)?!0:Ii.call(qe,n)?!1:we.test(n)?ot[n]=!0:(qe[n]=!0,!1)}function dn(n,a,s){if(Ft(a))if(s===null)n.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var u=a.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+s)}}function Hn(n,a,s){if(s===null)n.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+s)}}function Cn(n,a,s,u){if(u===null)n.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(a,s,""+u)}}function vt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Kn(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Ac(n,a,s){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,b=u.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return p.call(this)},set:function(E){s=""+E,b.call(this,E)}}),Object.defineProperty(n,a,{enumerable:u.enumerable}),{getValue:function(){return s},setValue:function(E){s=""+E},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function ws(n){if(!n._valueTracker){var a=Kn(n)?"checked":"value";n._valueTracker=Ac(n,a,""+n[a])}}function Ql(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var s=a.getValue(),u="";return n&&(u=Kn(n)?n.checked?"true":"false":n.value),n=u,n!==s?(a.setValue(n),!0):!1}function _s(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Jf=/[\n"\\]/g;function An(n){return n.replace(Jf,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Vl(n,a,s,u,p,b,E,N){n.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.type=E:n.removeAttribute("type"),a!=null?E==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+vt(a)):n.value!==""+vt(a)&&(n.value=""+vt(a)):E!=="submit"&&E!=="reset"||n.removeAttribute("value"),a!=null?ks(n,E,vt(a)):s!=null?ks(n,E,vt(s)):u!=null&&n.removeAttribute("value"),p==null&&b!=null&&(n.defaultChecked=!!b),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?n.name=""+vt(N):n.removeAttribute("name")}function Or(n,a,s,u,p,b,E,N){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.type=b),a!=null||s!=null){if(!(b!=="submit"&&b!=="reset"||a!=null)){ws(n);return}s=s!=null?""+vt(s):"",a=a!=null?""+vt(a):s,N||a===n.value||(n.value=a),n.defaultValue=a}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=N?n.checked:!!u,n.defaultChecked=!!u,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(n.name=E),ws(n)}function ks(n,a,s){a==="number"&&_s(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function an(n,a,s,u){if(n=n.options,a){a={};for(var p=0;p<s.length;p++)a["$"+s[p]]=!0;for(s=0;s<n.length;s++)p=a.hasOwnProperty("$"+n[s].value),n[s].selected!==p&&(n[s].selected=p),p&&u&&(n[s].defaultSelected=!0)}else{for(s=""+vt(s),a=null,p=0;p<n.length;p++){if(n[p].value===s){n[p].selected=!0,u&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}function Oc(n,a,s){if(a!=null&&(a=""+vt(a),a!==n.value&&(n.value=a),s==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=s!=null?""+vt(s):""}function Ns(n,a,s,u){if(a==null){if(u!=null){if(s!=null)throw Error(r(92));if(ee(u)){if(1<u.length)throw Error(r(93));u=u[0]}s=u}s==null&&(s=""),a=s}s=vt(a),n.defaultValue=s,u=n.textContent,u===s&&u!==""&&u!==null&&(n.value=u),ws(n)}function Oe(n,a){if(a){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=a;return}}n.textContent=a}var Rc=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 Kt(n,a,s){var u=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?u?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":u?n.setProperty(a,s):typeof s!="number"||s===0||Rc.has(a)?a==="float"?n.cssFloat=s:n[a]=(""+s).trim():n[a]=s+"px"}function ct(n,a,s){if(a!=null&&typeof a!="object")throw Error(r(62));if(n=n.style,s!=null){for(var u in s)!s.hasOwnProperty(u)||a!=null&&a.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var p in a)u=a[p],a.hasOwnProperty(p)&&s[p]!==u&&Kt(n,p,u)}else for(var b in a)a.hasOwnProperty(b)&&Kt(n,b,a[b])}function La(n){if(n.indexOf("-")===-1)return!1;switch(n){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 na=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"]]),Xl=/^[\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 ja(n){return Xl.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function de(){}var Ee=null;function Ie(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Ye=null,Rt=null;function oi(n){var a=ea(n);if(a&&(n=a.stateNode)){var s=n[fn]||null;e:switch(n=a.stateNode,a.type){case"input":if(Vl(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+An(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var u=s[a];if(u!==n&&u.form===n.form){var p=u[fn]||null;if(!p)throw Error(r(90));Vl(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<s.length;a++)u=s[a],u.form===n.form&&Ql(u)}break e;case"textarea":Oc(n,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&an(n,!!s.multiple,a,!1)}}}var Zl=!1;function Mc(n,a,s){if(Zl)return n(a,s);Zl=!0;try{var u=n(a);return u}finally{if(Zl=!1,(Ye!==null||Rt!==null)&&(xu(),Ye&&(a=Ye,n=Rt,Rt=Ye=null,oi(a),n)))for(a=0;a<n.length;a++)oi(n[a])}}function Wl(n,a){var s=n.stateNode;if(s===null)return null;var u=s[fn]||null;if(u===null)return null;s=u[a];e:switch(a){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)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(r(231,a,typeof s));return s}var ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ed=!1;if(ia)try{var Jl={};Object.defineProperty(Jl,"passive",{get:function(){ed=!0}}),window.addEventListener("test",Jl,Jl),window.removeEventListener("test",Jl,Jl)}catch{ed=!1}var Ia=null,td=null,Dc=null;function Tg(){if(Dc)return Dc;var n,a=td,s=a.length,u,p="value"in Ia?Ia.value:Ia.textContent,b=p.length;for(n=0;n<s&&a[n]===p[n];n++);var E=s-n;for(u=1;u<=E&&a[s-u]===p[b-u];u++);return Dc=p.slice(n,1<u?1-u:void 0)}function Lc(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function jc(){return!0}function Cg(){return!1}function On(n){function a(s,u,p,b,E){this._reactName=s,this._targetInst=p,this.type=u,this.nativeEvent=b,this.target=E,this.currentTarget=null;for(var N in n)n.hasOwnProperty(N)&&(s=n[N],this[N]=s?s(b):b[N]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?jc:Cg,this.isPropagationStopped=Cg,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=jc)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=jc)},persist:function(){},isPersistent:jc}),a}var Rr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ic=On(Rr),eo=g({},Rr,{view:0,detail:0}),jw=On(eo),nd,id,to,zc=g({},eo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rd,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==to&&(to&&n.type==="mousemove"?(nd=n.screenX-to.screenX,id=n.screenY-to.screenY):id=nd=0,to=n),nd)},movementY:function(n){return"movementY"in n?n.movementY:id}}),Ag=On(zc),Iw=g({},zc,{dataTransfer:0}),zw=On(Iw),Bw=g({},eo,{relatedTarget:0}),ad=On(Bw),Uw=g({},Rr,{animationName:0,elapsedTime:0,pseudoElement:0}),Fw=On(Uw),Pw=g({},Rr,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),$w=On(Pw),qw=g({},Rr,{data:0}),Og=On(qw),Hw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Kw={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"},Gw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yw(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=Gw[n])?!!a[n]:!1}function rd(){return Yw}var Qw=g({},eo,{key:function(n){if(n.key){var a=Hw[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Lc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Kw[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rd,charCode:function(n){return n.type==="keypress"?Lc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Lc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),Vw=On(Qw),Xw=g({},zc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rg=On(Xw),Zw=g({},eo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rd}),Ww=On(Zw),Jw=g({},Rr,{propertyName:0,elapsedTime:0,pseudoElement:0}),e_=On(Jw),t_=g({},zc,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),n_=On(t_),i_=g({},Rr,{newState:0,oldState:0}),a_=On(i_),r_=[9,13,27,32],sd=ia&&"CompositionEvent"in window,no=null;ia&&"documentMode"in document&&(no=document.documentMode);var s_=ia&&"TextEvent"in window&&!no,Mg=ia&&(!sd||no&&8<no&&11>=no),Dg=" ",Lg=!1;function jg(n,a){switch(n){case"keyup":return r_.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ig(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ts=!1;function l_(n,a){switch(n){case"compositionend":return Ig(a);case"keypress":return a.which!==32?null:(Lg=!0,Dg);case"textInput":return n=a.data,n===Dg&&Lg?null:n;default:return null}}function o_(n,a){if(Ts)return n==="compositionend"||!sd&&jg(n,a)?(n=Tg(),Dc=td=Ia=null,Ts=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Mg&&a.locale!=="ko"?null:a.data;default:return null}}var c_={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 zg(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!c_[n.type]:a==="textarea"}function Bg(n,a,s,u){Ye?Rt?Rt.push(u):Rt=[u]:Ye=u,a=Nu(a,"onChange"),0<a.length&&(s=new Ic("onChange","change",null,s,u),n.push({event:s,listeners:a}))}var io=null,ao=null;function u_(n){vx(n,0)}function Bc(n){var a=Ma(n);if(Ql(a))return n}function Ug(n,a){if(n==="change")return a}var Fg=!1;if(ia){var ld;if(ia){var od="oninput"in document;if(!od){var Pg=document.createElement("div");Pg.setAttribute("oninput","return;"),od=typeof Pg.oninput=="function"}ld=od}else ld=!1;Fg=ld&&(!document.documentMode||9<document.documentMode)}function $g(){io&&(io.detachEvent("onpropertychange",qg),ao=io=null)}function qg(n){if(n.propertyName==="value"&&Bc(ao)){var a=[];Bg(a,ao,n,Ie(n)),Mc(u_,a)}}function f_(n,a,s){n==="focusin"?($g(),io=a,ao=s,io.attachEvent("onpropertychange",qg)):n==="focusout"&&$g()}function d_(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Bc(ao)}function h_(n,a){if(n==="click")return Bc(a)}function p_(n,a){if(n==="input"||n==="change")return Bc(a)}function m_(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var Gn=typeof Object.is=="function"?Object.is:m_;function ro(n,a){if(Gn(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var s=Object.keys(n),u=Object.keys(a);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var p=s[u];if(!Ii.call(a,p)||!Gn(n[p],a[p]))return!1}return!0}function Hg(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Kg(n,a){var s=Hg(n);n=0;for(var u;s;){if(s.nodeType===3){if(u=n+s.textContent.length,n<=a&&u>=a)return{node:s,offset:a-n};n=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Hg(s)}}function Gg(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?Gg(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function Yg(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=_s(n.document);a instanceof n.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)n=a.contentWindow;else break;a=_s(n.document)}return a}function cd(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var g_=ia&&"documentMode"in document&&11>=document.documentMode,Cs=null,ud=null,so=null,fd=!1;function Qg(n,a,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;fd||Cs==null||Cs!==_s(u)||(u=Cs,"selectionStart"in u&&cd(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}),so&&ro(so,u)||(so=u,u=Nu(ud,"onSelect"),0<u.length&&(a=new Ic("onSelect","select",null,a,s),n.push({event:a,listeners:u}),a.target=Cs)))}function Mr(n,a){var s={};return s[n.toLowerCase()]=a.toLowerCase(),s["Webkit"+n]="webkit"+a,s["Moz"+n]="moz"+a,s}var As={animationend:Mr("Animation","AnimationEnd"),animationiteration:Mr("Animation","AnimationIteration"),animationstart:Mr("Animation","AnimationStart"),transitionrun:Mr("Transition","TransitionRun"),transitionstart:Mr("Transition","TransitionStart"),transitioncancel:Mr("Transition","TransitionCancel"),transitionend:Mr("Transition","TransitionEnd")},dd={},Vg={};ia&&(Vg=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 Dr(n){if(dd[n])return dd[n];if(!As[n])return n;var a=As[n],s;for(s in a)if(a.hasOwnProperty(s)&&s in Vg)return dd[n]=a[s];return n}var Xg=Dr("animationend"),Zg=Dr("animationiteration"),Wg=Dr("animationstart"),b_=Dr("transitionrun"),y_=Dr("transitionstart"),x_=Dr("transitioncancel"),Jg=Dr("transitionend"),eb=new Map,hd="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(" ");hd.push("scrollEnd");function Ni(n,a){eb.set(n,a),ta(a,[n])}var Uc=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},ci=[],Os=0,pd=0;function Fc(){for(var n=Os,a=pd=Os=0;a<n;){var s=ci[a];ci[a++]=null;var u=ci[a];ci[a++]=null;var p=ci[a];ci[a++]=null;var b=ci[a];if(ci[a++]=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&&tb(s,p,b)}}function Pc(n,a,s,u){ci[Os++]=n,ci[Os++]=a,ci[Os++]=s,ci[Os++]=u,pd|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function md(n,a,s,u){return Pc(n,a,s,u),$c(n)}function Lr(n,a){return Pc(n,null,null,a),$c(n)}function tb(n,a,s){n.lanes|=s;var u=n.alternate;u!==null&&(u.lanes|=s);for(var p=!1,b=n.return;b!==null;)b.childLanes|=s,u=b.alternate,u!==null&&(u.childLanes|=s),b.tag===22&&(n=b.stateNode,n===null||n._visibility&1||(p=!0)),n=b,b=b.return;return n.tag===3?(b=n.stateNode,p&&a!==null&&(p=31-lt(s),n=b.hiddenUpdates,u=n[p],u===null?n[p]=[a]:u.push(a),a.lane=s|536870912),b):null}function $c(n){if(50<Ao)throw Ao=0,_h=null,Error(r(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var Rs={};function v_(n,a,s,u){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,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 Yn(n,a,s,u){return new v_(n,a,s,u)}function gd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function aa(n,a){var s=n.alternate;return s===null?(s=Yn(n.tag,a,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=a,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,a=n.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function nb(n,a){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,a=s.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function qc(n,a,s,u,p,b){var E=0;if(u=n,typeof n=="function")gd(n)&&(E=1);else if(typeof n=="string")E=kk(n,s,he.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case Z:return n=Yn(31,s,a,p),n.elementType=Z,n.lanes=b,n;case w:return jr(s.children,p,b,a);case k:E=8,p|=24;break;case _:return n=Yn(12,s,a,p|2),n.elementType=_,n.lanes=b,n;case $:return n=Yn(13,s,a,p),n.elementType=$,n.lanes=b,n;case T:return n=Yn(19,s,a,p),n.elementType=T,n.lanes=b,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case A:E=10;break e;case R:E=9;break e;case I:E=11;break e;case P:E=14;break e;case z:E=16,u=null;break e}E=29,s=Error(r(130,n===null?"null":typeof n,"")),u=null}return a=Yn(E,s,a,p),a.elementType=n,a.type=u,a.lanes=b,a}function jr(n,a,s,u){return n=Yn(7,n,u,a),n.lanes=s,n}function bd(n,a,s){return n=Yn(6,n,null,a),n.lanes=s,n}function ib(n){var a=Yn(18,null,null,0);return a.stateNode=n,a}function yd(n,a,s){return a=Yn(4,n.children!==null?n.children:[],n.key,a),a.lanes=s,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var ab=new WeakMap;function ui(n,a){if(typeof n=="object"&&n!==null){var s=ab.get(n);return s!==void 0?s:(a={value:n,source:a,stack:li(a)},ab.set(n,a),a)}return{value:n,source:a,stack:li(a)}}var Ms=[],Ds=0,Hc=null,lo=0,fi=[],di=0,za=null,Ui=1,Fi="";function ra(n,a){Ms[Ds++]=lo,Ms[Ds++]=Hc,Hc=n,lo=a}function rb(n,a,s){fi[di++]=Ui,fi[di++]=Fi,fi[di++]=za,za=n;var u=Ui;n=Fi;var p=32-lt(u)-1;u&=~(1<<p),s+=1;var b=32-lt(a)+p;if(30<b){var E=p-p%5;b=(u&(1<<E)-1).toString(32),u>>=E,p-=E,Ui=1<<32-lt(a)+p|s<<p|u,Fi=b+n}else Ui=1<<b|s<<p|u,Fi=n}function xd(n){n.return!==null&&(ra(n,1),rb(n,1,0))}function vd(n){for(;n===Hc;)Hc=Ms[--Ds],Ms[Ds]=null,lo=Ms[--Ds],Ms[Ds]=null;for(;n===za;)za=fi[--di],fi[di]=null,Fi=fi[--di],fi[di]=null,Ui=fi[--di],fi[di]=null}function sb(n,a){fi[di++]=Ui,fi[di++]=Fi,fi[di++]=za,Ui=a.id,Fi=a.overflow,za=n}var rn=null,_t=null,Ze=!1,Ba=null,hi=!1,Ed=Error(r(519));function Ua(n){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw oo(ui(a,n)),Ed}function lb(n){var a=n.stateNode,s=n.type,u=n.memoizedProps;switch(a[Ut]=n,a[fn]=u,s){case"dialog":Ke("cancel",a),Ke("close",a);break;case"iframe":case"object":case"embed":Ke("load",a);break;case"video":case"audio":for(s=0;s<Ro.length;s++)Ke(Ro[s],a);break;case"source":Ke("error",a);break;case"img":case"image":case"link":Ke("error",a),Ke("load",a);break;case"details":Ke("toggle",a);break;case"input":Ke("invalid",a),Or(a,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Ke("invalid",a);break;case"textarea":Ke("invalid",a),Ns(a,u.value,u.defaultValue,u.children)}s=u.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||u.suppressHydrationWarning===!0||_x(a.textContent,s)?(u.popover!=null&&(Ke("beforetoggle",a),Ke("toggle",a)),u.onScroll!=null&&Ke("scroll",a),u.onScrollEnd!=null&&Ke("scrollend",a),u.onClick!=null&&(a.onclick=de),a=!0):a=!1,a||Ua(n,!0)}function ob(n){for(rn=n.return;rn;)switch(rn.tag){case 5:case 31:case 13:hi=!1;return;case 27:case 3:hi=!0;return;default:rn=rn.return}}function Ls(n){if(n!==rn)return!1;if(!Ze)return ob(n),Ze=!0,!1;var a=n.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||Uh(n.type,n.memoizedProps)),s=!s),s&&_t&&Ua(n),ob(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));_t=Dx(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));_t=Dx(n)}else a===27?(a=_t,Ja(n.type)?(n=Hh,Hh=null,_t=n):_t=a):_t=rn?mi(n.stateNode.nextSibling):null;return!0}function Ir(){_t=rn=null,Ze=!1}function Sd(){var n=Ba;return n!==null&&(Ln===null?Ln=n:Ln.push.apply(Ln,n),Ba=null),n}function oo(n){Ba===null?Ba=[n]:Ba.push(n)}var wd=D(null),zr=null,sa=null;function Fa(n,a,s){C(wd,a._currentValue),a._currentValue=s}function la(n){n._currentValue=wd.current,J(wd)}function _d(n,a,s){for(;n!==null;){var u=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,u!==null&&(u.childLanes|=a)):u!==null&&(u.childLanes&a)!==a&&(u.childLanes|=a),n===s)break;n=n.return}}function kd(n,a,s,u){var p=n.child;for(p!==null&&(p.return=n);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 j=0;j<a.length;j++)if(N.context===a[j]){b.lanes|=s,N=b.alternate,N!==null&&(N.lanes|=s),_d(b.return,s,n),u||(E=null);break e}b=N.next}}else if(p.tag===18){if(E=p.return,E===null)throw Error(r(341));E.lanes|=s,b=E.alternate,b!==null&&(b.lanes|=s),_d(E,s,n),E=null}else E=p.child;if(E!==null)E.return=p;else for(E=p;E!==null;){if(E===n){E=null;break}if(p=E.sibling,p!==null){p.return=E.return,E=p;break}E=E.return}p=E}}function js(n,a,s,u){n=null;for(var p=a,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(r(387));if(E=E.memoizedProps,E!==null){var N=p.type;Gn(p.pendingProps.value,E.value)||(n!==null?n.push(N):n=[N])}}else if(p===Pe.current){if(E=p.alternate,E===null)throw Error(r(387));E.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Io):n=[Io])}p=p.return}n!==null&&kd(a,n,s,u),a.flags|=262144}function Kc(n){for(n=n.firstContext;n!==null;){if(!Gn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Br(n){zr=n,sa=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function sn(n){return cb(zr,n)}function Gc(n,a){return zr===null&&Br(n),cb(n,a)}function cb(n,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},sa===null){if(n===null)throw Error(r(308));sa=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else sa=sa.next=a;return s}var E_=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(s,u){n.push(u)}};this.abort=function(){a.aborted=!0,n.forEach(function(s){return s()})}},S_=e.unstable_scheduleCallback,w_=e.unstable_NormalPriority,Gt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nd(){return{controller:new E_,data:new Map,refCount:0}}function co(n){n.refCount--,n.refCount===0&&S_(w_,function(){n.controller.abort()})}var uo=null,Td=0,Is=0,zs=null;function __(n,a){if(uo===null){var s=uo=[];Td=0,Is=Oh(),zs={status:"pending",value:void 0,then:function(u){s.push(u)}}}return Td++,a.then(ub,ub),a}function ub(){if(--Td===0&&uo!==null){zs!==null&&(zs.status="fulfilled");var n=uo;uo=null,Is=0,zs=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function k_(n,a){var s=[],u={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return n.then(function(){u.status="fulfilled",u.value=a;for(var p=0;p<s.length;p++)(0,s[p])(a)},function(p){for(u.status="rejected",u.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),u}var fb=H.S;H.S=function(n,a){Qy=Ot(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&__(n,a),fb!==null&&fb(n,a)};var Ur=D(null);function Cd(){var n=Ur.current;return n!==null?n:bt.pooledCache}function Yc(n,a){a===null?C(Ur,Ur.current):C(Ur,a.pool)}function db(){var n=Cd();return n===null?null:{parent:Gt._currentValue,pool:n}}var Bs=Error(r(460)),Ad=Error(r(474)),Qc=Error(r(542)),Vc={then:function(){}};function hb(n){return n=n.status,n==="fulfilled"||n==="rejected"}function pb(n,a,s){switch(s=n[s],s===void 0?n.push(a):s!==a&&(a.then(de,de),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,gb(n),n;default:if(typeof a.status=="string")a.then(de,de);else{if(n=bt,n!==null&&100<n.shellSuspendCounter)throw Error(r(482));n=a,n.status="pending",n.then(function(u){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=u}},function(u){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=u}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,gb(n),n}throw Pr=a,Bs}}function Fr(n){try{var a=n._init;return a(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Pr=s,Bs):s}}var Pr=null;function mb(){if(Pr===null)throw Error(r(459));var n=Pr;return Pr=null,n}function gb(n){if(n===Bs||n===Qc)throw Error(r(483))}var Us=null,fo=0;function Xc(n){var a=fo;return fo+=1,Us===null&&(Us=[]),pb(Us,n,a)}function ho(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function Zc(n,a){throw a.$$typeof===v?Error(r(525)):(n=Object.prototype.toString.call(a),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function bb(n){function a(q,F){if(n){var G=q.deletions;G===null?(q.deletions=[F],q.flags|=16):G.push(F)}}function s(q,F){if(!n)return null;for(;F!==null;)a(q,F),F=F.sibling;return null}function u(q){for(var F=new Map;q!==null;)q.key!==null?F.set(q.key,q):F.set(q.index,q),q=q.sibling;return F}function p(q,F){return q=aa(q,F),q.index=0,q.sibling=null,q}function b(q,F,G){return q.index=G,n?(G=q.alternate,G!==null?(G=G.index,G<F?(q.flags|=67108866,F):G):(q.flags|=67108866,F)):(q.flags|=1048576,F)}function E(q){return n&&q.alternate===null&&(q.flags|=67108866),q}function N(q,F,G,ae){return F===null||F.tag!==6?(F=bd(G,q.mode,ae),F.return=q,F):(F=p(F,G),F.return=q,F)}function j(q,F,G,ae){var Ne=G.type;return Ne===w?ne(q,F,G.props.children,ae,G.key):F!==null&&(F.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===z&&Fr(Ne)===F.type)?(F=p(F,G.props),ho(F,G),F.return=q,F):(F=qc(G.type,G.key,G.props,null,q.mode,ae),ho(F,G),F.return=q,F)}function Y(q,F,G,ae){return F===null||F.tag!==4||F.stateNode.containerInfo!==G.containerInfo||F.stateNode.implementation!==G.implementation?(F=yd(G,q.mode,ae),F.return=q,F):(F=p(F,G.children||[]),F.return=q,F)}function ne(q,F,G,ae,Ne){return F===null||F.tag!==7?(F=jr(G,q.mode,ae,Ne),F.return=q,F):(F=p(F,G),F.return=q,F)}function re(q,F,G){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=bd(""+F,q.mode,G),F.return=q,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case x:return G=qc(F.type,F.key,F.props,null,q.mode,G),ho(G,F),G.return=q,G;case S:return F=yd(F,q.mode,G),F.return=q,F;case z:return F=Fr(F),re(q,F,G)}if(ee(F)||X(F))return F=jr(F,q.mode,G,null),F.return=q,F;if(typeof F.then=="function")return re(q,Xc(F),G);if(F.$$typeof===A)return re(q,Gc(q,F),G);Zc(q,F)}return null}function Q(q,F,G,ae){var Ne=F!==null?F.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return Ne!==null?null:N(q,F,""+G,ae);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case x:return G.key===Ne?j(q,F,G,ae):null;case S:return G.key===Ne?Y(q,F,G,ae):null;case z:return G=Fr(G),Q(q,F,G,ae)}if(ee(G)||X(G))return Ne!==null?null:ne(q,F,G,ae,null);if(typeof G.then=="function")return Q(q,F,Xc(G),ae);if(G.$$typeof===A)return Q(q,F,Gc(q,G),ae);Zc(q,G)}return null}function W(q,F,G,ae,Ne){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return q=q.get(G)||null,N(F,q,""+ae,Ne);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case x:return q=q.get(ae.key===null?G:ae.key)||null,j(F,q,ae,Ne);case S:return q=q.get(ae.key===null?G:ae.key)||null,Y(F,q,ae,Ne);case z:return ae=Fr(ae),W(q,F,G,ae,Ne)}if(ee(ae)||X(ae))return q=q.get(G)||null,ne(F,q,ae,Ne,null);if(typeof ae.then=="function")return W(q,F,G,Xc(ae),Ne);if(ae.$$typeof===A)return W(q,F,G,Gc(F,ae),Ne);Zc(F,ae)}return null}function ye(q,F,G,ae){for(var Ne=null,tt=null,Se=F,Be=F=0,Ve=null;Se!==null&&Be<G.length;Be++){Se.index>Be?(Ve=Se,Se=null):Ve=Se.sibling;var nt=Q(q,Se,G[Be],ae);if(nt===null){Se===null&&(Se=Ve);break}n&&Se&&nt.alternate===null&&a(q,Se),F=b(nt,F,Be),tt===null?Ne=nt:tt.sibling=nt,tt=nt,Se=Ve}if(Be===G.length)return s(q,Se),Ze&&ra(q,Be),Ne;if(Se===null){for(;Be<G.length;Be++)Se=re(q,G[Be],ae),Se!==null&&(F=b(Se,F,Be),tt===null?Ne=Se:tt.sibling=Se,tt=Se);return Ze&&ra(q,Be),Ne}for(Se=u(Se);Be<G.length;Be++)Ve=W(Se,q,Be,G[Be],ae),Ve!==null&&(n&&Ve.alternate!==null&&Se.delete(Ve.key===null?Be:Ve.key),F=b(Ve,F,Be),tt===null?Ne=Ve:tt.sibling=Ve,tt=Ve);return n&&Se.forEach(function(ar){return a(q,ar)}),Ze&&ra(q,Be),Ne}function Ae(q,F,G,ae){if(G==null)throw Error(r(151));for(var Ne=null,tt=null,Se=F,Be=F=0,Ve=null,nt=G.next();Se!==null&&!nt.done;Be++,nt=G.next()){Se.index>Be?(Ve=Se,Se=null):Ve=Se.sibling;var ar=Q(q,Se,nt.value,ae);if(ar===null){Se===null&&(Se=Ve);break}n&&Se&&ar.alternate===null&&a(q,Se),F=b(ar,F,Be),tt===null?Ne=ar:tt.sibling=ar,tt=ar,Se=Ve}if(nt.done)return s(q,Se),Ze&&ra(q,Be),Ne;if(Se===null){for(;!nt.done;Be++,nt=G.next())nt=re(q,nt.value,ae),nt!==null&&(F=b(nt,F,Be),tt===null?Ne=nt:tt.sibling=nt,tt=nt);return Ze&&ra(q,Be),Ne}for(Se=u(Se);!nt.done;Be++,nt=G.next())nt=W(Se,q,Be,nt.value,ae),nt!==null&&(n&&nt.alternate!==null&&Se.delete(nt.key===null?Be:nt.key),F=b(nt,F,Be),tt===null?Ne=nt:tt.sibling=nt,tt=nt);return n&&Se.forEach(function(Ik){return a(q,Ik)}),Ze&&ra(q,Be),Ne}function pt(q,F,G,ae){if(typeof G=="object"&&G!==null&&G.type===w&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case x:e:{for(var Ne=G.key;F!==null;){if(F.key===Ne){if(Ne=G.type,Ne===w){if(F.tag===7){s(q,F.sibling),ae=p(F,G.props.children),ae.return=q,q=ae;break e}}else if(F.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===z&&Fr(Ne)===F.type){s(q,F.sibling),ae=p(F,G.props),ho(ae,G),ae.return=q,q=ae;break e}s(q,F);break}else a(q,F);F=F.sibling}G.type===w?(ae=jr(G.props.children,q.mode,ae,G.key),ae.return=q,q=ae):(ae=qc(G.type,G.key,G.props,null,q.mode,ae),ho(ae,G),ae.return=q,q=ae)}return E(q);case S:e:{for(Ne=G.key;F!==null;){if(F.key===Ne)if(F.tag===4&&F.stateNode.containerInfo===G.containerInfo&&F.stateNode.implementation===G.implementation){s(q,F.sibling),ae=p(F,G.children||[]),ae.return=q,q=ae;break e}else{s(q,F);break}else a(q,F);F=F.sibling}ae=yd(G,q.mode,ae),ae.return=q,q=ae}return E(q);case z:return G=Fr(G),pt(q,F,G,ae)}if(ee(G))return ye(q,F,G,ae);if(X(G)){if(Ne=X(G),typeof Ne!="function")throw Error(r(150));return G=Ne.call(G),Ae(q,F,G,ae)}if(typeof G.then=="function")return pt(q,F,Xc(G),ae);if(G.$$typeof===A)return pt(q,F,Gc(q,G),ae);Zc(q,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,F!==null&&F.tag===6?(s(q,F.sibling),ae=p(F,G),ae.return=q,q=ae):(s(q,F),ae=bd(G,q.mode,ae),ae.return=q,q=ae),E(q)):s(q,F)}return function(q,F,G,ae){try{fo=0;var Ne=pt(q,F,G,ae);return Us=null,Ne}catch(Se){if(Se===Bs||Se===Qc)throw Se;var tt=Yn(29,Se,null,q.mode);return tt.lanes=ae,tt.return=q,tt}finally{}}}var $r=bb(!0),yb=bb(!1),Pa=!1;function Od(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rd(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function $a(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function qa(n,a,s){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(at&2)!==0){var p=u.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),u.pending=a,a=$c(n),tb(n,null,s),a}return Pc(n,u,a,s),$c(n)}function po(n,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var u=a.lanes;u&=n.pendingLanes,s|=u,a.lanes=s,Re(n,s)}}function Md(n,a){var s=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var p=null,b=null;if(s=s.firstBaseUpdate,s!==null){do{var E={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};b===null?p=b=E:b=b.next=E,s=s.next}while(s!==null);b===null?p=b=a:b=b.next=a}else p=b=a;s={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:u.shared,callbacks:u.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=a:n.next=a,s.lastBaseUpdate=a}var Dd=!1;function mo(){if(Dd){var n=zs;if(n!==null)throw n}}function go(n,a,s,u){Dd=!1;var p=n.updateQueue;Pa=!1;var b=p.firstBaseUpdate,E=p.lastBaseUpdate,N=p.shared.pending;if(N!==null){p.shared.pending=null;var j=N,Y=j.next;j.next=null,E===null?b=Y:E.next=Y,E=j;var ne=n.alternate;ne!==null&&(ne=ne.updateQueue,N=ne.lastBaseUpdate,N!==E&&(N===null?ne.firstBaseUpdate=Y:N.next=Y,ne.lastBaseUpdate=j))}if(b!==null){var re=p.baseState;E=0,ne=Y=j=null,N=b;do{var Q=N.lane&-536870913,W=Q!==N.lane;if(W?(Qe&Q)===Q:(u&Q)===Q){Q!==0&&Q===Is&&(Dd=!0),ne!==null&&(ne=ne.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var ye=n,Ae=N;Q=a;var pt=s;switch(Ae.tag){case 1:if(ye=Ae.payload,typeof ye=="function"){re=ye.call(pt,re,Q);break e}re=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ae.payload,Q=typeof ye=="function"?ye.call(pt,re,Q):ye,Q==null)break e;re=g({},re,Q);break e;case 2:Pa=!0}}Q=N.callback,Q!==null&&(n.flags|=64,W&&(n.flags|=8192),W=p.callbacks,W===null?p.callbacks=[Q]:W.push(Q))}else W={lane:Q,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ne===null?(Y=ne=W,j=re):ne=ne.next=W,E|=Q;if(N=N.next,N===null){if(N=p.shared.pending,N===null)break;W=N,N=W.next,W.next=null,p.lastBaseUpdate=W,p.shared.pending=null}}while(!0);ne===null&&(j=re),p.baseState=j,p.firstBaseUpdate=Y,p.lastBaseUpdate=ne,b===null&&(p.shared.lanes=0),Qa|=E,n.lanes=E,n.memoizedState=re}}function xb(n,a){if(typeof n!="function")throw Error(r(191,n));n.call(a)}function vb(n,a){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)xb(s[n],a)}var Fs=D(null),Wc=D(0);function Eb(n,a){n=ga,C(Wc,n),C(Fs,a),ga=n|a.baseLanes}function Ld(){C(Wc,ga),C(Fs,Fs.current)}function jd(){ga=Wc.current,J(Fs),J(Wc)}var Qn=D(null),pi=null;function Ha(n){var a=n.alternate;C(Pt,Pt.current&1),C(Qn,n),pi===null&&(a===null||Fs.current!==null||a.memoizedState!==null)&&(pi=n)}function Id(n){C(Pt,Pt.current),C(Qn,n),pi===null&&(pi=n)}function Sb(n){n.tag===22?(C(Pt,Pt.current),C(Qn,n),pi===null&&(pi=n)):Ka()}function Ka(){C(Pt,Pt.current),C(Qn,Qn.current)}function Vn(n){J(Qn),pi===n&&(pi=null),J(Pt)}var Pt=D(0);function Jc(n){for(var a=n;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||$h(s)||qh(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var oa=0,ze=null,dt=null,Yt=null,eu=!1,Ps=!1,qr=!1,tu=0,bo=0,$s=null,N_=0;function jt(){throw Error(r(321))}function zd(n,a){if(a===null)return!1;for(var s=0;s<a.length&&s<n.length;s++)if(!Gn(n[s],a[s]))return!1;return!0}function Bd(n,a,s,u,p,b){return oa=b,ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,H.H=n===null||n.memoizedState===null?ry:Jd,qr=!1,b=s(u,p),qr=!1,Ps&&(b=_b(a,s,u,p)),wb(n),b}function wb(n){H.H=vo;var a=dt!==null&&dt.next!==null;if(oa=0,Yt=dt=ze=null,eu=!1,bo=0,$s=null,a)throw Error(r(300));n===null||Qt||(n=n.dependencies,n!==null&&Kc(n)&&(Qt=!0))}function _b(n,a,s,u){ze=n;var p=0;do{if(Ps&&($s=null),bo=0,Ps=!1,25<=p)throw Error(r(301));if(p+=1,Yt=dt=null,n.updateQueue!=null){var b=n.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}H.H=sy,b=a(s,u)}while(Ps);return b}function T_(){var n=H.H,a=n.useState()[0];return a=typeof a.then=="function"?yo(a):a,n=n.useState()[0],(dt!==null?dt.memoizedState:null)!==n&&(ze.flags|=1024),a}function Ud(){var n=tu!==0;return tu=0,n}function Fd(n,a,s){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~s}function Pd(n){if(eu){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}eu=!1}oa=0,Yt=dt=ze=null,Ps=!1,bo=tu=0,$s=null}function En(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yt===null?ze.memoizedState=Yt=n:Yt=Yt.next=n,Yt}function $t(){if(dt===null){var n=ze.alternate;n=n!==null?n.memoizedState:null}else n=dt.next;var a=Yt===null?ze.memoizedState:Yt.next;if(a!==null)Yt=a,dt=n;else{if(n===null)throw ze.alternate===null?Error(r(467)):Error(r(310));dt=n,n={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Yt===null?ze.memoizedState=Yt=n:Yt=Yt.next=n}return Yt}function nu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yo(n){var a=bo;return bo+=1,$s===null&&($s=[]),n=pb($s,n,a),a=ze,(Yt===null?a.memoizedState:Yt.next)===null&&(a=a.alternate,H.H=a===null||a.memoizedState===null?ry:Jd),n}function iu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return yo(n);if(n.$$typeof===A)return sn(n)}throw Error(r(438,String(n)))}function $d(n){var a=null,s=ze.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var u=ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(a={data:u.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=nu(),ze.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(n),u=0;u<n;u++)s[u]=L;return a.index++,s}function ca(n,a){return typeof a=="function"?a(n):a}function au(n){var a=$t();return qd(a,dt,n)}function qd(n,a,s){var u=n.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=s;var p=n.baseQueue,b=u.pending;if(b!==null){if(p!==null){var E=p.next;p.next=b.next,b.next=E}a.baseQueue=p=b,u.pending=null}if(b=n.baseState,p===null)n.memoizedState=b;else{a=p.next;var N=E=null,j=null,Y=a,ne=!1;do{var re=Y.lane&-536870913;if(re!==Y.lane?(Qe&re)===re:(oa&re)===re){var Q=Y.revertLane;if(Q===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),re===Is&&(ne=!0);else if((oa&Q)===Q){Y=Y.next,Q===Is&&(ne=!0);continue}else re={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},j===null?(N=j=re,E=b):j=j.next=re,ze.lanes|=Q,Qa|=Q;re=Y.action,qr&&s(b,re),b=Y.hasEagerState?Y.eagerState:s(b,re)}else Q={lane:re,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},j===null?(N=j=Q,E=b):j=j.next=Q,ze.lanes|=re,Qa|=re;Y=Y.next}while(Y!==null&&Y!==a);if(j===null?E=b:j.next=N,!Gn(b,n.memoizedState)&&(Qt=!0,ne&&(s=zs,s!==null)))throw s;n.memoizedState=b,n.baseState=E,n.baseQueue=j,u.lastRenderedState=b}return p===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Hd(n){var a=$t(),s=a.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var u=s.dispatch,p=s.pending,b=a.memoizedState;if(p!==null){s.pending=null;var E=p=p.next;do b=n(b,E.action),E=E.next;while(E!==p);Gn(b,a.memoizedState)||(Qt=!0),a.memoizedState=b,a.baseQueue===null&&(a.baseState=b),s.lastRenderedState=b}return[b,u]}function kb(n,a,s){var u=ze,p=$t(),b=Ze;if(b){if(s===void 0)throw Error(r(407));s=s()}else s=a();var E=!Gn((dt||p).memoizedState,s);if(E&&(p.memoizedState=s,Qt=!0),p=p.queue,Yd(Cb.bind(null,u,p,n),[n]),p.getSnapshot!==a||E||Yt!==null&&Yt.memoizedState.tag&1){if(u.flags|=2048,qs(9,{destroy:void 0},Tb.bind(null,u,p,s,a),null),bt===null)throw Error(r(349));b||(oa&127)!==0||Nb(u,a,s)}return s}function Nb(n,a,s){n.flags|=16384,n={getSnapshot:a,value:s},a=ze.updateQueue,a===null?(a=nu(),ze.updateQueue=a,a.stores=[n]):(s=a.stores,s===null?a.stores=[n]:s.push(n))}function Tb(n,a,s,u){a.value=s,a.getSnapshot=u,Ab(a)&&Ob(n)}function Cb(n,a,s){return s(function(){Ab(a)&&Ob(n)})}function Ab(n){var a=n.getSnapshot;n=n.value;try{var s=a();return!Gn(n,s)}catch{return!0}}function Ob(n){var a=Lr(n,2);a!==null&&jn(a,n,2)}function Kd(n){var a=En();if(typeof n=="function"){var s=n;if(n=s(),qr){un(!0);try{s()}finally{un(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:n},a}function Rb(n,a,s,u){return n.baseState=s,qd(n,dt,typeof u=="function"?u:ca)}function C_(n,a,s,u,p){if(lu(n))throw Error(r(485));if(n=a.action,n!==null){var b={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){b.listeners.push(E)}};H.T!==null?s(!0):b.isTransition=!1,u(b),s=a.pending,s===null?(b.next=a.pending=b,Mb(a,b)):(b.next=s.next,a.pending=s.next=b)}}function Mb(n,a){var s=a.action,u=a.payload,p=n.state;if(a.isTransition){var b=H.T,E={};H.T=E;try{var N=s(p,u),j=H.S;j!==null&&j(E,N),Db(n,a,N)}catch(Y){Gd(n,a,Y)}finally{b!==null&&E.types!==null&&(b.types=E.types),H.T=b}}else try{b=s(p,u),Db(n,a,b)}catch(Y){Gd(n,a,Y)}}function Db(n,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(u){Lb(n,a,u)},function(u){return Gd(n,a,u)}):Lb(n,a,s)}function Lb(n,a,s){a.status="fulfilled",a.value=s,jb(a),n.state=s,a=n.pending,a!==null&&(s=a.next,s===a?n.pending=null:(s=s.next,a.next=s,Mb(n,s)))}function Gd(n,a,s){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do a.status="rejected",a.reason=s,jb(a),a=a.next;while(a!==u)}n.action=null}function jb(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function Ib(n,a){return a}function zb(n,a){if(Ze){var s=bt.formState;if(s!==null){e:{var u=ze;if(Ze){if(_t){t:{for(var p=_t,b=hi;p.nodeType!==8;){if(!b){p=null;break t}if(p=mi(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){_t=mi(p.nextSibling),u=p.data==="F!";break e}}Ua(u)}u=!1}u&&(a=s[0])}}return s=En(),s.memoizedState=s.baseState=a,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ib,lastRenderedState:a},s.queue=u,s=ny.bind(null,ze,u),u.dispatch=s,u=Kd(!1),b=Wd.bind(null,ze,!1,u.queue),u=En(),p={state:a,dispatch:null,action:n,pending:null},u.queue=p,s=C_.bind(null,ze,p,b,s),p.dispatch=s,u.memoizedState=n,[a,s,!1]}function Bb(n){var a=$t();return Ub(a,dt,n)}function Ub(n,a,s){if(a=qd(n,a,Ib)[0],n=au(ca)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var u=yo(a)}catch(E){throw E===Bs?Qc:E}else u=a;a=$t();var p=a.queue,b=p.dispatch;return s!==a.memoizedState&&(ze.flags|=2048,qs(9,{destroy:void 0},A_.bind(null,p,s),null)),[u,b,n]}function A_(n,a){n.action=a}function Fb(n){var a=$t(),s=dt;if(s!==null)return Ub(a,s,n);$t(),a=a.memoizedState,s=$t();var u=s.queue.dispatch;return s.memoizedState=n,[a,u,!1]}function qs(n,a,s,u){return n={tag:n,create:s,deps:u,inst:a,next:null},a=ze.updateQueue,a===null&&(a=nu(),ze.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=n.next=n:(u=s.next,s.next=n,n.next=u,a.lastEffect=n),n}function Pb(){return $t().memoizedState}function ru(n,a,s,u){var p=En();ze.flags|=n,p.memoizedState=qs(1|a,{destroy:void 0},s,u===void 0?null:u)}function su(n,a,s,u){var p=$t();u=u===void 0?null:u;var b=p.memoizedState.inst;dt!==null&&u!==null&&zd(u,dt.memoizedState.deps)?p.memoizedState=qs(a,b,s,u):(ze.flags|=n,p.memoizedState=qs(1|a,b,s,u))}function $b(n,a){ru(8390656,8,n,a)}function Yd(n,a){su(2048,8,n,a)}function O_(n){ze.flags|=4;var a=ze.updateQueue;if(a===null)a=nu(),ze.updateQueue=a,a.events=[n];else{var s=a.events;s===null?a.events=[n]:s.push(n)}}function qb(n){var a=$t().memoizedState;return O_({ref:a,nextImpl:n}),function(){if((at&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function Hb(n,a){return su(4,2,n,a)}function Kb(n,a){return su(4,4,n,a)}function Gb(n,a){if(typeof a=="function"){n=n();var s=a(n);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function Yb(n,a,s){s=s!=null?s.concat([n]):null,su(4,4,Gb.bind(null,a,n),s)}function Qd(){}function Qb(n,a){var s=$t();a=a===void 0?null:a;var u=s.memoizedState;return a!==null&&zd(a,u[1])?u[0]:(s.memoizedState=[n,a],n)}function Vb(n,a){var s=$t();a=a===void 0?null:a;var u=s.memoizedState;if(a!==null&&zd(a,u[1]))return u[0];if(u=n(),qr){un(!0);try{n()}finally{un(!1)}}return s.memoizedState=[u,a],u}function Vd(n,a,s){return s===void 0||(oa&1073741824)!==0&&(Qe&261930)===0?n.memoizedState=a:(n.memoizedState=s,n=Xy(),ze.lanes|=n,Qa|=n,s)}function Xb(n,a,s,u){return Gn(s,a)?s:Fs.current!==null?(n=Vd(n,s,u),Gn(n,a)||(Qt=!0),n):(oa&42)===0||(oa&1073741824)!==0&&(Qe&261930)===0?(Qt=!0,n.memoizedState=s):(n=Xy(),ze.lanes|=n,Qa|=n,a)}function Zb(n,a,s,u,p){var b=le.p;le.p=b!==0&&8>b?b:8;var E=H.T,N={};H.T=N,Wd(n,!1,a,s);try{var j=p(),Y=H.S;if(Y!==null&&Y(N,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var ne=k_(j,u);xo(n,a,ne,Wn(n))}else xo(n,a,u,Wn(n))}catch(re){xo(n,a,{then:function(){},status:"rejected",reason:re},Wn())}finally{le.p=b,E!==null&&N.types!==null&&(E.types=N.types),H.T=E}}function R_(){}function Xd(n,a,s,u){if(n.tag!==5)throw Error(r(476));var p=Wb(n).queue;Zb(n,p,a,V,s===null?R_:function(){return Jb(n),s(u)})}function Wb(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:V},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:s},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function Jb(n){var a=Wb(n);a.next===null&&(a=n.alternate.memoizedState),xo(n,a.next.queue,{},Wn())}function Zd(){return sn(Io)}function ey(){return $t().memoizedState}function ty(){return $t().memoizedState}function M_(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var s=Wn();n=$a(s);var u=qa(a,n,s);u!==null&&(jn(u,a,s),po(u,a,s)),a={cache:Nd()},n.payload=a;return}a=a.return}}function D_(n,a,s){var u=Wn();s={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},lu(n)?iy(a,s):(s=md(n,a,s,u),s!==null&&(jn(s,n,u),ay(s,a,u)))}function ny(n,a,s){var u=Wn();xo(n,a,s,u)}function xo(n,a,s,u){var p={lane:u,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(lu(n))iy(a,p);else{var b=n.alternate;if(n.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var E=a.lastRenderedState,N=b(E,s);if(p.hasEagerState=!0,p.eagerState=N,Gn(N,E))return Pc(n,a,p,0),bt===null&&Fc(),!1}catch{}finally{}if(s=md(n,a,p,u),s!==null)return jn(s,n,u),ay(s,a,u),!0}return!1}function Wd(n,a,s,u){if(u={lane:2,revertLane:Oh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},lu(n)){if(a)throw Error(r(479))}else a=md(n,s,u,2),a!==null&&jn(a,n,2)}function lu(n){var a=n.alternate;return n===ze||a!==null&&a===ze}function iy(n,a){Ps=eu=!0;var s=n.pending;s===null?a.next=a:(a.next=s.next,s.next=a),n.pending=a}function ay(n,a,s){if((s&4194048)!==0){var u=a.lanes;u&=n.pendingLanes,s|=u,a.lanes=s,Re(n,s)}}var vo={readContext:sn,use:iu,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};vo.useEffectEvent=jt;var ry={readContext:sn,use:iu,useCallback:function(n,a){return En().memoizedState=[n,a===void 0?null:a],n},useContext:sn,useEffect:$b,useImperativeHandle:function(n,a,s){s=s!=null?s.concat([n]):null,ru(4194308,4,Gb.bind(null,a,n),s)},useLayoutEffect:function(n,a){return ru(4194308,4,n,a)},useInsertionEffect:function(n,a){ru(4,2,n,a)},useMemo:function(n,a){var s=En();a=a===void 0?null:a;var u=n();if(qr){un(!0);try{n()}finally{un(!1)}}return s.memoizedState=[u,a],u},useReducer:function(n,a,s){var u=En();if(s!==void 0){var p=s(a);if(qr){un(!0);try{s(a)}finally{un(!1)}}}else p=a;return u.memoizedState=u.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},u.queue=n,n=n.dispatch=D_.bind(null,ze,n),[u.memoizedState,n]},useRef:function(n){var a=En();return n={current:n},a.memoizedState=n},useState:function(n){n=Kd(n);var a=n.queue,s=ny.bind(null,ze,a);return a.dispatch=s,[n.memoizedState,s]},useDebugValue:Qd,useDeferredValue:function(n,a){var s=En();return Vd(s,n,a)},useTransition:function(){var n=Kd(!1);return n=Zb.bind(null,ze,n.queue,!0,!1),En().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,s){var u=ze,p=En();if(Ze){if(s===void 0)throw Error(r(407));s=s()}else{if(s=a(),bt===null)throw Error(r(349));(Qe&127)!==0||Nb(u,a,s)}p.memoizedState=s;var b={value:s,getSnapshot:a};return p.queue=b,$b(Cb.bind(null,u,b,n),[n]),u.flags|=2048,qs(9,{destroy:void 0},Tb.bind(null,u,b,s,a),null),s},useId:function(){var n=En(),a=bt.identifierPrefix;if(Ze){var s=Fi,u=Ui;s=(u&~(1<<32-lt(u)-1)).toString(32)+s,a="_"+a+"R_"+s,s=tu++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=N_++,a="_"+a+"r_"+s.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:Zd,useFormState:zb,useActionState:zb,useOptimistic:function(n){var a=En();a.memoizedState=a.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Wd.bind(null,ze,!0,s),s.dispatch=a,[n,a]},useMemoCache:$d,useCacheRefresh:function(){return En().memoizedState=M_.bind(null,ze)},useEffectEvent:function(n){var a=En(),s={impl:n};return a.memoizedState=s,function(){if((at&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},Jd={readContext:sn,use:iu,useCallback:Qb,useContext:sn,useEffect:Yd,useImperativeHandle:Yb,useInsertionEffect:Hb,useLayoutEffect:Kb,useMemo:Vb,useReducer:au,useRef:Pb,useState:function(){return au(ca)},useDebugValue:Qd,useDeferredValue:function(n,a){var s=$t();return Xb(s,dt.memoizedState,n,a)},useTransition:function(){var n=au(ca)[0],a=$t().memoizedState;return[typeof n=="boolean"?n:yo(n),a]},useSyncExternalStore:kb,useId:ey,useHostTransitionStatus:Zd,useFormState:Bb,useActionState:Bb,useOptimistic:function(n,a){var s=$t();return Rb(s,dt,n,a)},useMemoCache:$d,useCacheRefresh:ty};Jd.useEffectEvent=qb;var sy={readContext:sn,use:iu,useCallback:Qb,useContext:sn,useEffect:Yd,useImperativeHandle:Yb,useInsertionEffect:Hb,useLayoutEffect:Kb,useMemo:Vb,useReducer:Hd,useRef:Pb,useState:function(){return Hd(ca)},useDebugValue:Qd,useDeferredValue:function(n,a){var s=$t();return dt===null?Vd(s,n,a):Xb(s,dt.memoizedState,n,a)},useTransition:function(){var n=Hd(ca)[0],a=$t().memoizedState;return[typeof n=="boolean"?n:yo(n),a]},useSyncExternalStore:kb,useId:ey,useHostTransitionStatus:Zd,useFormState:Fb,useActionState:Fb,useOptimistic:function(n,a){var s=$t();return dt!==null?Rb(s,dt,n,a):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:$d,useCacheRefresh:ty};sy.useEffectEvent=qb;function eh(n,a,s,u){a=n.memoizedState,s=s(u,a),s=s==null?a:g({},a,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var th={enqueueSetState:function(n,a,s){n=n._reactInternals;var u=Wn(),p=$a(u);p.payload=a,s!=null&&(p.callback=s),a=qa(n,p,u),a!==null&&(jn(a,n,u),po(a,n,u))},enqueueReplaceState:function(n,a,s){n=n._reactInternals;var u=Wn(),p=$a(u);p.tag=1,p.payload=a,s!=null&&(p.callback=s),a=qa(n,p,u),a!==null&&(jn(a,n,u),po(a,n,u))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var s=Wn(),u=$a(s);u.tag=2,a!=null&&(u.callback=a),a=qa(n,u,s),a!==null&&(jn(a,n,s),po(a,n,s))}};function ly(n,a,s,u,p,b,E){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,b,E):a.prototype&&a.prototype.isPureReactComponent?!ro(s,u)||!ro(p,b):!0}function oy(n,a,s,u){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,u),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,u),a.state!==n&&th.enqueueReplaceState(a,a.state,null)}function Hr(n,a){var s=a;if("ref"in a){s={};for(var u in a)u!=="ref"&&(s[u]=a[u])}if(n=n.defaultProps){s===a&&(s=g({},s));for(var p in n)s[p]===void 0&&(s[p]=n[p])}return s}function cy(n){Uc(n)}function uy(n){console.error(n)}function fy(n){Uc(n)}function ou(n,a){try{var s=n.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(u){setTimeout(function(){throw u})}}function dy(n,a,s){try{var u=n.onCaughtError;u(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function nh(n,a,s){return s=$a(s),s.tag=3,s.payload={element:null},s.callback=function(){ou(n,a)},s}function hy(n){return n=$a(n),n.tag=3,n}function py(n,a,s,u){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var b=u.value;n.payload=function(){return p(b)},n.callback=function(){dy(a,s,u)}}var E=s.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(n.callback=function(){dy(a,s,u),typeof p!="function"&&(Va===null?Va=new Set([this]):Va.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})})}function L_(n,a,s,u,p){if(s.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(a=s.alternate,a!==null&&js(a,s,p,!0),s=Qn.current,s!==null){switch(s.tag){case 31:case 13:return pi===null?vu():s.alternate===null&&It===0&&(It=3),s.flags&=-257,s.flags|=65536,s.lanes=p,u===Vc?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([u]):a.add(u),Th(n,u,p)),!1;case 22:return s.flags|=65536,u===Vc?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([u])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([u]):s.add(u)),Th(n,u,p)),!1}throw Error(r(435,s.tag))}return Th(n,u,p),vu(),!1}if(Ze)return a=Qn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,u!==Ed&&(n=Error(r(422),{cause:u}),oo(ui(n,s)))):(u!==Ed&&(a=Error(r(423),{cause:u}),oo(ui(a,s))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,u=ui(u,s),p=nh(n.stateNode,u,p),Md(n,p),It!==4&&(It=2)),!1;var b=Error(r(520),{cause:u});if(b=ui(b,s),Co===null?Co=[b]:Co.push(b),It!==4&&(It=2),a===null)return!0;u=ui(u,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,n=p&-p,s.lanes|=n,n=nh(s.stateNode,u,n),Md(s,n),!1;case 1:if(a=s.type,b=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Va===null||!Va.has(b))))return s.flags|=65536,p&=-p,s.lanes|=p,p=hy(p),py(p,n,s,u),Md(s,p),!1}s=s.return}while(s!==null);return!1}var ih=Error(r(461)),Qt=!1;function ln(n,a,s,u){a.child=n===null?yb(a,null,s,u):$r(a,n.child,s,u)}function my(n,a,s,u,p){s=s.render;var b=a.ref;if("ref"in u){var E={};for(var N in u)N!=="ref"&&(E[N]=u[N])}else E=u;return Br(a),u=Bd(n,a,s,E,b,p),N=Ud(),n!==null&&!Qt?(Fd(n,a,p),ua(n,a,p)):(Ze&&N&&xd(a),a.flags|=1,ln(n,a,u,p),a.child)}function gy(n,a,s,u,p){if(n===null){var b=s.type;return typeof b=="function"&&!gd(b)&&b.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=b,by(n,a,b,u,p)):(n=qc(s.type,null,u,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(b=n.child,!fh(n,p)){var E=b.memoizedProps;if(s=s.compare,s=s!==null?s:ro,s(E,u)&&n.ref===a.ref)return ua(n,a,p)}return a.flags|=1,n=aa(b,u),n.ref=a.ref,n.return=a,a.child=n}function by(n,a,s,u,p){if(n!==null){var b=n.memoizedProps;if(ro(b,u)&&n.ref===a.ref)if(Qt=!1,a.pendingProps=u=b,fh(n,p))(n.flags&131072)!==0&&(Qt=!0);else return a.lanes=n.lanes,ua(n,a,p)}return ah(n,a,s,u,p)}function yy(n,a,s,u){var p=u.children,b=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((a.flags&128)!==0){if(b=b!==null?b.baseLanes|s:s,n!==null){for(u=a.child=n.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~b}else u=0,a.child=null;return xy(n,a,b,s,u)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&Yc(a,b!==null?b.cachePool:null),b!==null?Eb(a,b):Ld(),Sb(a);else return u=a.lanes=536870912,xy(n,a,b!==null?b.baseLanes|s:s,s,u)}else b!==null?(Yc(a,b.cachePool),Eb(a,b),Ka(),a.memoizedState=null):(n!==null&&Yc(a,null),Ld(),Ka());return ln(n,a,p,s),a.child}function Eo(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function xy(n,a,s,u,p){var b=Cd();return b=b===null?null:{parent:Gt._currentValue,pool:b},a.memoizedState={baseLanes:s,cachePool:b},n!==null&&Yc(a,null),Ld(),Sb(a),n!==null&&js(n,a,u,!0),a.childLanes=p,null}function cu(n,a){return a=fu({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function vy(n,a,s){return $r(a,n.child,null,s),n=cu(a,a.pendingProps),n.flags|=2,Vn(a),a.memoizedState=null,n}function j_(n,a,s){var u=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(Ze){if(u.mode==="hidden")return n=cu(a,u),a.lanes=536870912,Eo(null,n);if(Id(a),(n=_t)?(n=Mx(n,hi),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:za!==null?{id:Ui,overflow:Fi}:null,retryLane:536870912,hydrationErrors:null},s=ib(n),s.return=a,a.child=s,rn=a,_t=null)):n=null,n===null)throw Ua(a);return a.lanes=536870912,null}return cu(a,u)}var b=n.memoizedState;if(b!==null){var E=b.dehydrated;if(Id(a),p)if(a.flags&256)a.flags&=-257,a=vy(n,a,s);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(r(558));else if(Qt||js(n,a,s,!1),p=(s&n.childLanes)!==0,Qt||p){if(u=bt,u!==null&&(E=Bt(u,s),E!==0&&E!==b.retryLane))throw b.retryLane=E,Lr(n,E),jn(u,n,E),ih;vu(),a=vy(n,a,s)}else n=b.treeContext,_t=mi(E.nextSibling),rn=a,Ze=!0,Ba=null,hi=!1,n!==null&&sb(a,n),a=cu(a,u),a.flags|=4096;return a}return n=aa(n.child,{mode:u.mode,children:u.children}),n.ref=a.ref,a.child=n,n.return=a,n}function uu(n,a){var s=a.ref;if(s===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(n===null||n.ref!==s)&&(a.flags|=4194816)}}function ah(n,a,s,u,p){return Br(a),s=Bd(n,a,s,u,void 0,p),u=Ud(),n!==null&&!Qt?(Fd(n,a,p),ua(n,a,p)):(Ze&&u&&xd(a),a.flags|=1,ln(n,a,s,p),a.child)}function Ey(n,a,s,u,p,b){return Br(a),a.updateQueue=null,s=_b(a,u,s,p),wb(n),u=Ud(),n!==null&&!Qt?(Fd(n,a,b),ua(n,a,b)):(Ze&&u&&xd(a),a.flags|=1,ln(n,a,s,b),a.child)}function Sy(n,a,s,u,p){if(Br(a),a.stateNode===null){var b=Rs,E=s.contextType;typeof E=="object"&&E!==null&&(b=sn(E)),b=new s(u,b),a.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=th,a.stateNode=b,b._reactInternals=a,b=a.stateNode,b.props=u,b.state=a.memoizedState,b.refs={},Od(a),E=s.contextType,b.context=typeof E=="object"&&E!==null?sn(E):Rs,b.state=a.memoizedState,E=s.getDerivedStateFromProps,typeof E=="function"&&(eh(a,s,E,u),b.state=a.memoizedState),typeof s.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&&th.enqueueReplaceState(b,b.state,null),go(a,u,b,p),mo(),b.state=a.memoizedState),typeof b.componentDidMount=="function"&&(a.flags|=4194308),u=!0}else if(n===null){b=a.stateNode;var N=a.memoizedProps,j=Hr(s,N);b.props=j;var Y=b.context,ne=s.contextType;E=Rs,typeof ne=="object"&&ne!==null&&(E=sn(ne));var re=s.getDerivedStateFromProps;ne=typeof re=="function"||typeof b.getSnapshotBeforeUpdate=="function",N=a.pendingProps!==N,ne||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N||Y!==E)&&oy(a,b,u,E),Pa=!1;var Q=a.memoizedState;b.state=Q,go(a,u,b,p),mo(),Y=a.memoizedState,N||Q!==Y||Pa?(typeof re=="function"&&(eh(a,s,re,u),Y=a.memoizedState),(j=Pa||ly(a,s,j,u,Q,Y,E))?(ne||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"&&(a.flags|=4194308)):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=u,a.memoizedState=Y),b.props=u,b.state=Y,b.context=E,u=j):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),u=!1)}else{b=a.stateNode,Rd(n,a),E=a.memoizedProps,ne=Hr(s,E),b.props=ne,re=a.pendingProps,Q=b.context,Y=s.contextType,j=Rs,typeof Y=="object"&&Y!==null&&(j=sn(Y)),N=s.getDerivedStateFromProps,(Y=typeof N=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==re||Q!==j)&&oy(a,b,u,j),Pa=!1,Q=a.memoizedState,b.state=Q,go(a,u,b,p),mo();var W=a.memoizedState;E!==re||Q!==W||Pa||n!==null&&n.dependencies!==null&&Kc(n.dependencies)?(typeof N=="function"&&(eh(a,s,N,u),W=a.memoizedState),(ne=Pa||ly(a,s,ne,u,Q,W,j)||n!==null&&n.dependencies!==null&&Kc(n.dependencies))?(Y||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,W,j),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,W,j)),typeof b.componentDidUpdate=="function"&&(a.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===n.memoizedProps&&Q===n.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===n.memoizedProps&&Q===n.memoizedState||(a.flags|=1024),a.memoizedProps=u,a.memoizedState=W),b.props=u,b.state=W,b.context=j,u=ne):(typeof b.componentDidUpdate!="function"||E===n.memoizedProps&&Q===n.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===n.memoizedProps&&Q===n.memoizedState||(a.flags|=1024),u=!1)}return b=u,uu(n,a),u=(a.flags&128)!==0,b||u?(b=a.stateNode,s=u&&typeof s.getDerivedStateFromError!="function"?null:b.render(),a.flags|=1,n!==null&&u?(a.child=$r(a,n.child,null,p),a.child=$r(a,null,s,p)):ln(n,a,s,p),a.memoizedState=b.state,n=a.child):n=ua(n,a,p),n}function wy(n,a,s,u){return Ir(),a.flags|=256,ln(n,a,s,u),a.child}var rh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sh(n){return{baseLanes:n,cachePool:db()}}function lh(n,a,s){return n=n!==null?n.childLanes&~s:0,a&&(n|=Zn),n}function _y(n,a,s){var u=a.pendingProps,p=!1,b=(a.flags&128)!==0,E;if((E=b)||(E=n!==null&&n.memoizedState===null?!1:(Pt.current&2)!==0),E&&(p=!0,a.flags&=-129),E=(a.flags&32)!==0,a.flags&=-33,n===null){if(Ze){if(p?Ha(a):Ka(),(n=_t)?(n=Mx(n,hi),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:za!==null?{id:Ui,overflow:Fi}:null,retryLane:536870912,hydrationErrors:null},s=ib(n),s.return=a,a.child=s,rn=a,_t=null)):n=null,n===null)throw Ua(a);return qh(n)?a.lanes=32:a.lanes=536870912,null}var N=u.children;return u=u.fallback,p?(Ka(),p=a.mode,N=fu({mode:"hidden",children:N},p),u=jr(u,p,s,null),N.return=a,u.return=a,N.sibling=u,a.child=N,u=a.child,u.memoizedState=sh(s),u.childLanes=lh(n,E,s),a.memoizedState=rh,Eo(null,u)):(Ha(a),oh(a,N))}var j=n.memoizedState;if(j!==null&&(N=j.dehydrated,N!==null)){if(b)a.flags&256?(Ha(a),a.flags&=-257,a=ch(n,a,s)):a.memoizedState!==null?(Ka(),a.child=n.child,a.flags|=128,a=null):(Ka(),N=u.fallback,p=a.mode,u=fu({mode:"visible",children:u.children},p),N=jr(N,p,s,null),N.flags|=2,u.return=a,N.return=a,u.sibling=N,a.child=u,$r(a,n.child,null,s),u=a.child,u.memoizedState=sh(s),u.childLanes=lh(n,E,s),a.memoizedState=rh,a=Eo(null,u));else if(Ha(a),qh(N)){if(E=N.nextSibling&&N.nextSibling.dataset,E)var Y=E.dgst;E=Y,u=Error(r(419)),u.stack="",u.digest=E,oo({value:u,source:null,stack:null}),a=ch(n,a,s)}else if(Qt||js(n,a,s,!1),E=(s&n.childLanes)!==0,Qt||E){if(E=bt,E!==null&&(u=Bt(E,s),u!==0&&u!==j.retryLane))throw j.retryLane=u,Lr(n,u),jn(E,n,u),ih;$h(N)||vu(),a=ch(n,a,s)}else $h(N)?(a.flags|=192,a.child=n.child,a=null):(n=j.treeContext,_t=mi(N.nextSibling),rn=a,Ze=!0,Ba=null,hi=!1,n!==null&&sb(a,n),a=oh(a,u.children),a.flags|=4096);return a}return p?(Ka(),N=u.fallback,p=a.mode,j=n.child,Y=j.sibling,u=aa(j,{mode:"hidden",children:u.children}),u.subtreeFlags=j.subtreeFlags&65011712,Y!==null?N=aa(Y,N):(N=jr(N,p,s,null),N.flags|=2),N.return=a,u.return=a,u.sibling=N,a.child=u,Eo(null,u),u=a.child,N=n.child.memoizedState,N===null?N=sh(s):(p=N.cachePool,p!==null?(j=Gt._currentValue,p=p.parent!==j?{parent:j,pool:j}:p):p=db(),N={baseLanes:N.baseLanes|s,cachePool:p}),u.memoizedState=N,u.childLanes=lh(n,E,s),a.memoizedState=rh,Eo(n.child,u)):(Ha(a),s=n.child,n=s.sibling,s=aa(s,{mode:"visible",children:u.children}),s.return=a,s.sibling=null,n!==null&&(E=a.deletions,E===null?(a.deletions=[n],a.flags|=16):E.push(n)),a.child=s,a.memoizedState=null,s)}function oh(n,a){return a=fu({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function fu(n,a){return n=Yn(22,n,null,a),n.lanes=0,n}function ch(n,a,s){return $r(a,n.child,null,s),n=oh(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function ky(n,a,s){n.lanes|=a;var u=n.alternate;u!==null&&(u.lanes|=a),_d(n.return,a,s)}function uh(n,a,s,u,p,b){var E=n.memoizedState;E===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:p,treeForkCount:b}:(E.isBackwards=a,E.rendering=null,E.renderingStartTime=0,E.last=u,E.tail=s,E.tailMode=p,E.treeForkCount=b)}function Ny(n,a,s){var u=a.pendingProps,p=u.revealOrder,b=u.tail;u=u.children;var E=Pt.current,N=(E&2)!==0;if(N?(E=E&1|2,a.flags|=128):E&=1,C(Pt,E),ln(n,a,u,s),u=Ze?lo:0,!N&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&ky(n,s,a);else if(n.tag===19)ky(n,s,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(s=a.child,p=null;s!==null;)n=s.alternate,n!==null&&Jc(n)===null&&(p=s),s=s.sibling;s=p,s===null?(p=a.child,a.child=null):(p=s.sibling,s.sibling=null),uh(a,!1,p,s,b,u);break;case"backwards":case"unstable_legacy-backwards":for(s=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&Jc(n)===null){a.child=p;break}n=p.sibling,p.sibling=s,s=p,p=n}uh(a,!0,s,null,b,u);break;case"together":uh(a,!1,null,null,void 0,u);break;default:a.memoizedState=null}return a.child}function ua(n,a,s){if(n!==null&&(a.dependencies=n.dependencies),Qa|=a.lanes,(s&a.childLanes)===0)if(n!==null){if(js(n,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(r(153));if(a.child!==null){for(n=a.child,s=aa(n,n.pendingProps),a.child=s,s.return=a;n.sibling!==null;)n=n.sibling,s=s.sibling=aa(n,n.pendingProps),s.return=a;s.sibling=null}return a.child}function fh(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&Kc(n)))}function I_(n,a,s){switch(a.tag){case 3:st(a,a.stateNode.containerInfo),Fa(a,Gt,n.memoizedState.cache),Ir();break;case 27:case 5:Zt(a);break;case 4:st(a,a.stateNode.containerInfo);break;case 10:Fa(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Id(a),null;break;case 13:var u=a.memoizedState;if(u!==null)return u.dehydrated!==null?(Ha(a),a.flags|=128,null):(s&a.child.childLanes)!==0?_y(n,a,s):(Ha(a),n=ua(n,a,s),n!==null?n.sibling:null);Ha(a);break;case 19:var p=(n.flags&128)!==0;if(u=(s&a.childLanes)!==0,u||(js(n,a,s,!1),u=(s&a.childLanes)!==0),p){if(u)return Ny(n,a,s);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),C(Pt,Pt.current),u)break;return null;case 22:return a.lanes=0,yy(n,a,s,a.pendingProps);case 24:Fa(a,Gt,n.memoizedState.cache)}return ua(n,a,s)}function Ty(n,a,s){if(n!==null)if(n.memoizedProps!==a.pendingProps)Qt=!0;else{if(!fh(n,s)&&(a.flags&128)===0)return Qt=!1,I_(n,a,s);Qt=(n.flags&131072)!==0}else Qt=!1,Ze&&(a.flags&1048576)!==0&&rb(a,lo,a.index);switch(a.lanes=0,a.tag){case 16:e:{var u=a.pendingProps;if(n=Fr(a.elementType),a.type=n,typeof n=="function")gd(n)?(u=Hr(n,u),a.tag=1,a=Sy(null,a,n,u,s)):(a.tag=0,a=ah(null,a,n,u,s));else{if(n!=null){var p=n.$$typeof;if(p===I){a.tag=11,a=my(null,a,n,u,s);break e}else if(p===P){a.tag=14,a=gy(null,a,n,u,s);break e}}throw a=se(n)||n,Error(r(306,a,""))}}return a;case 0:return ah(n,a,a.type,a.pendingProps,s);case 1:return u=a.type,p=Hr(u,a.pendingProps),Sy(n,a,u,p,s);case 3:e:{if(st(a,a.stateNode.containerInfo),n===null)throw Error(r(387));u=a.pendingProps;var b=a.memoizedState;p=b.element,Rd(n,a),go(a,u,null,s);var E=a.memoizedState;if(u=E.cache,Fa(a,Gt,u),u!==b.cache&&kd(a,[Gt],s,!0),mo(),u=E.element,b.isDehydrated)if(b={element:u,isDehydrated:!1,cache:E.cache},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){a=wy(n,a,u,s);break e}else if(u!==p){p=ui(Error(r(424)),a),oo(p),a=wy(n,a,u,s);break e}else{switch(n=a.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(_t=mi(n.firstChild),rn=a,Ze=!0,Ba=null,hi=!0,s=yb(a,null,u,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(Ir(),u===p){a=ua(n,a,s);break e}ln(n,a,u,s)}a=a.child}return a;case 26:return uu(n,a),n===null?(s=Bx(a.type,null,a.pendingProps,null))?a.memoizedState=s:Ze||(s=a.type,n=a.pendingProps,u=Tu(ve.current).createElement(s),u[Ut]=a,u[fn]=n,on(u,s,n),Ht(u),a.stateNode=u):a.memoizedState=Bx(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return Zt(a),n===null&&Ze&&(u=a.stateNode=jx(a.type,a.pendingProps,ve.current),rn=a,hi=!0,p=_t,Ja(a.type)?(Hh=p,_t=mi(u.firstChild)):_t=p),ln(n,a,a.pendingProps.children,s),uu(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&Ze&&((p=u=_t)&&(u=dk(u,a.type,a.pendingProps,hi),u!==null?(a.stateNode=u,rn=a,_t=mi(u.firstChild),hi=!1,p=!0):p=!1),p||Ua(a)),Zt(a),p=a.type,b=a.pendingProps,E=n!==null?n.memoizedProps:null,u=b.children,Uh(p,b)?u=null:E!==null&&Uh(p,E)&&(a.flags|=32),a.memoizedState!==null&&(p=Bd(n,a,T_,null,null,s),Io._currentValue=p),uu(n,a),ln(n,a,u,s),a.child;case 6:return n===null&&Ze&&((n=s=_t)&&(s=hk(s,a.pendingProps,hi),s!==null?(a.stateNode=s,rn=a,_t=null,n=!0):n=!1),n||Ua(a)),null;case 13:return _y(n,a,s);case 4:return st(a,a.stateNode.containerInfo),u=a.pendingProps,n===null?a.child=$r(a,null,u,s):ln(n,a,u,s),a.child;case 11:return my(n,a,a.type,a.pendingProps,s);case 7:return ln(n,a,a.pendingProps,s),a.child;case 8:return ln(n,a,a.pendingProps.children,s),a.child;case 12:return ln(n,a,a.pendingProps.children,s),a.child;case 10:return u=a.pendingProps,Fa(a,a.type,u.value),ln(n,a,u.children,s),a.child;case 9:return p=a.type._context,u=a.pendingProps.children,Br(a),p=sn(p),u=u(p),a.flags|=1,ln(n,a,u,s),a.child;case 14:return gy(n,a,a.type,a.pendingProps,s);case 15:return by(n,a,a.type,a.pendingProps,s);case 19:return Ny(n,a,s);case 31:return j_(n,a,s);case 22:return yy(n,a,s,a.pendingProps);case 24:return Br(a),u=sn(Gt),n===null?(p=Cd(),p===null&&(p=bt,b=Nd(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=s),p=b),a.memoizedState={parent:u,cache:p},Od(a),Fa(a,Gt,p)):((n.lanes&s)!==0&&(Rd(n,a),go(a,null,null,s),mo()),p=n.memoizedState,b=a.memoizedState,p.parent!==u?(p={parent:u,cache:u},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Fa(a,Gt,u)):(u=b.cache,Fa(a,Gt,u),u!==p.cache&&kd(a,[Gt],s,!0))),ln(n,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function fa(n){n.flags|=4}function dh(n,a,s,u,p){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(ex())n.flags|=8192;else throw Pr=Vc,Ad}else n.flags&=-16777217}function Cy(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!qx(a))if(ex())n.flags|=8192;else throw Pr=Vc,Ad}function du(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?Me():536870912,n.lanes|=a,Ys|=a)}function So(n,a){if(!Ze)switch(n.tailMode){case"hidden":a=n.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function kt(n){var a=n.alternate!==null&&n.alternate.child===n.child,s=0,u=0;if(a)for(var p=n.child;p!==null;)s|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)s|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=u,n.childLanes=s,a}function z_(n,a,s){var u=a.pendingProps;switch(vd(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(a),null;case 1:return kt(a),null;case 3:return s=a.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),la(Gt),it(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(Ls(a)?fa(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Sd())),kt(a),null;case 26:var p=a.type,b=a.memoizedState;return n===null?(fa(a),b!==null?(kt(a),Cy(a,b)):(kt(a),dh(a,p,null,u,s))):b?b!==n.memoizedState?(fa(a),kt(a),Cy(a,b)):(kt(a),a.flags&=-16777217):(n=n.memoizedProps,n!==u&&fa(a),kt(a),dh(a,p,n,u,s)),null;case 27:if($n(a),s=ve.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&fa(a);else{if(!u){if(a.stateNode===null)throw Error(r(166));return kt(a),null}n=he.current,Ls(a)?lb(a):(n=jx(p,u,s),a.stateNode=n,fa(a))}return kt(a),null;case 5:if($n(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==u&&fa(a);else{if(!u){if(a.stateNode===null)throw Error(r(166));return kt(a),null}if(b=he.current,Ls(a))lb(a);else{var E=Tu(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[Ut]=a,b[fn]=u;e:for(E=a.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===a)break e;for(;E.sibling===null;){if(E.return===null||E.return===a)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}a.stateNode=b;e:switch(on(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&&fa(a)}}return kt(a),dh(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,s),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==u&&fa(a);else{if(typeof u!="string"&&a.stateNode===null)throw Error(r(166));if(n=ve.current,Ls(a)){if(n=a.stateNode,s=a.memoizedProps,u=null,p=rn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}n[Ut]=a,n=!!(n.nodeValue===s||u!==null&&u.suppressHydrationWarning===!0||_x(n.nodeValue,s)),n||Ua(a,!0)}else n=Tu(n).createTextNode(u),n[Ut]=a,a.stateNode=n}return kt(a),null;case 31:if(s=a.memoizedState,n===null||n.memoizedState!==null){if(u=Ls(a),s!==null){if(n===null){if(!u)throw Error(r(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(557));n[Ut]=a}else Ir(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;kt(a),n=!1}else s=Sd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return a.flags&256?(Vn(a),a):(Vn(a),null);if((a.flags&128)!==0)throw Error(r(558))}return kt(a),null;case 13:if(u=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=Ls(a),u!==null&&u.dehydrated!==null){if(n===null){if(!p)throw Error(r(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[Ut]=a}else Ir(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;kt(a),p=!1}else p=Sd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Vn(a),a):(Vn(a),null)}return Vn(a),(a.flags&128)!==0?(a.lanes=s,a):(s=u!==null,n=n!==null&&n.memoizedState!==null,s&&(u=a.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)),s!==n&&s&&(a.child.flags|=8192),du(a,a.updateQueue),kt(a),null);case 4:return it(),n===null&&Lh(a.stateNode.containerInfo),kt(a),null;case 10:return la(a.type),kt(a),null;case 19:if(J(Pt),u=a.memoizedState,u===null)return kt(a),null;if(p=(a.flags&128)!==0,b=u.rendering,b===null)if(p)So(u,!1);else{if(It!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(b=Jc(n),b!==null){for(a.flags|=128,So(u,!1),n=b.updateQueue,a.updateQueue=n,du(a,n),a.subtreeFlags=0,n=s,s=a.child;s!==null;)nb(s,n),s=s.sibling;return C(Pt,Pt.current&1|2),Ze&&ra(a,u.treeForkCount),a.child}n=n.sibling}u.tail!==null&&Ot()>bu&&(a.flags|=128,p=!0,So(u,!1),a.lanes=4194304)}else{if(!p)if(n=Jc(b),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,du(a,n),So(u,!0),u.tail===null&&u.tailMode==="hidden"&&!b.alternate&&!Ze)return kt(a),null}else 2*Ot()-u.renderingStartTime>bu&&s!==536870912&&(a.flags|=128,p=!0,So(u,!1),a.lanes=4194304);u.isBackwards?(b.sibling=a.child,a.child=b):(n=u.last,n!==null?n.sibling=b:a.child=b,u.last=b)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=Ot(),n.sibling=null,s=Pt.current,C(Pt,p?s&1|2:s&1),Ze&&ra(a,u.treeForkCount),n):(kt(a),null);case 22:case 23:return Vn(a),jd(),u=a.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(a.flags|=8192):u&&(a.flags|=8192),u?(s&536870912)!==0&&(a.flags&128)===0&&(kt(a),a.subtreeFlags&6&&(a.flags|=8192)):kt(a),s=a.updateQueue,s!==null&&du(a,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==s&&(a.flags|=2048),n!==null&&J(Ur),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),la(Gt),kt(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function B_(n,a){switch(vd(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return la(Gt),it(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return $n(a),null;case 31:if(a.memoizedState!==null){if(Vn(a),a.alternate===null)throw Error(r(340));Ir()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(Vn(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(r(340));Ir()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return J(Pt),null;case 4:return it(),null;case 10:return la(a.type),null;case 22:case 23:return Vn(a),jd(),n!==null&&J(Ur),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return la(Gt),null;case 25:return null;default:return null}}function Ay(n,a){switch(vd(a),a.tag){case 3:la(Gt),it();break;case 26:case 27:case 5:$n(a);break;case 4:it();break;case 31:a.memoizedState!==null&&Vn(a);break;case 13:Vn(a);break;case 19:J(Pt);break;case 10:la(a.type);break;case 22:case 23:Vn(a),jd(),n!==null&&J(Ur);break;case 24:la(Gt)}}function wo(n,a){try{var s=a.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var p=u.next;s=p;do{if((s.tag&n)===n){u=void 0;var b=s.create,E=s.inst;u=b(),E.destroy=u}s=s.next}while(s!==p)}}catch(N){ft(a,a.return,N)}}function Ga(n,a,s){try{var u=a.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var b=p.next;u=b;do{if((u.tag&n)===n){var E=u.inst,N=E.destroy;if(N!==void 0){E.destroy=void 0,p=a;var j=s,Y=N;try{Y()}catch(ne){ft(p,j,ne)}}}u=u.next}while(u!==b)}}catch(ne){ft(a,a.return,ne)}}function Oy(n){var a=n.updateQueue;if(a!==null){var s=n.stateNode;try{vb(a,s)}catch(u){ft(n,n.return,u)}}}function Ry(n,a,s){s.props=Hr(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(u){ft(n,a,u)}}function _o(n,a){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof s=="function"?n.refCleanup=s(u):s.current=u}}catch(p){ft(n,a,p)}}function Pi(n,a){var s=n.ref,u=n.refCleanup;if(s!==null)if(typeof u=="function")try{u()}catch(p){ft(n,a,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){ft(n,a,p)}else s.current=null}function My(n){var a=n.type,s=n.memoizedProps,u=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&u.focus();break e;case"img":s.src?u.src=s.src:s.srcSet&&(u.srcset=s.srcSet)}}catch(p){ft(n,n.return,p)}}function hh(n,a,s){try{var u=n.stateNode;sk(u,n.type,s,a),u[fn]=a}catch(p){ft(n,n.return,p)}}function Dy(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ja(n.type)||n.tag===4}function ph(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Dy(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Ja(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function mh(n,a,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(n),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=de));else if(u!==4&&(u===27&&Ja(n.type)&&(s=n.stateNode,a=null),n=n.child,n!==null))for(mh(n,a,s),n=n.sibling;n!==null;)mh(n,a,s),n=n.sibling}function hu(n,a,s){var u=n.tag;if(u===5||u===6)n=n.stateNode,a?s.insertBefore(n,a):s.appendChild(n);else if(u!==4&&(u===27&&Ja(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(hu(n,a,s),n=n.sibling;n!==null;)hu(n,a,s),n=n.sibling}function Ly(n){var a=n.stateNode,s=n.memoizedProps;try{for(var u=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);on(a,u,s),a[Ut]=n,a[fn]=s}catch(b){ft(n,n.return,b)}}var da=!1,Vt=!1,gh=!1,jy=typeof WeakSet=="function"?WeakSet:Set,en=null;function U_(n,a){if(n=n.containerInfo,zh=Lu,n=Yg(n),cd(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var p=u.anchorOffset,b=u.focusNode;u=u.focusOffset;try{s.nodeType,b.nodeType}catch{s=null;break e}var E=0,N=-1,j=-1,Y=0,ne=0,re=n,Q=null;t:for(;;){for(var W;re!==s||p!==0&&re.nodeType!==3||(N=E+p),re!==b||u!==0&&re.nodeType!==3||(j=E+u),re.nodeType===3&&(E+=re.nodeValue.length),(W=re.firstChild)!==null;)Q=re,re=W;for(;;){if(re===n)break t;if(Q===s&&++Y===p&&(N=E),Q===b&&++ne===u&&(j=E),(W=re.nextSibling)!==null)break;re=Q,Q=re.parentNode}re=W}s=N===-1||j===-1?null:{start:N,end:j}}else s=null}s=s||{start:0,end:0}}else s=null;for(Bh={focusedElem:n,selectionRange:s},Lu=!1,en=a;en!==null;)if(a=en,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,en=n;else for(;en!==null;){switch(a=en,b=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s<n.length;s++)p=n[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&b!==null){n=void 0,s=a,p=b.memoizedProps,b=b.memoizedState,u=s.stateNode;try{var ye=Hr(s.type,p);n=u.getSnapshotBeforeUpdate(ye,b),u.__reactInternalSnapshotBeforeUpdate=n}catch(Ae){ft(s,s.return,Ae)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,s=n.nodeType,s===9)Ph(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Ph(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(r(163))}if(n=a.sibling,n!==null){n.return=a.return,en=n;break}en=a.return}}function Iy(n,a,s){var u=s.flags;switch(s.tag){case 0:case 11:case 15:pa(n,s),u&4&&wo(5,s);break;case 1:if(pa(n,s),u&4)if(n=s.stateNode,a===null)try{n.componentDidMount()}catch(E){ft(s,s.return,E)}else{var p=Hr(s.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(E){ft(s,s.return,E)}}u&64&&Oy(s),u&512&&_o(s,s.return);break;case 3:if(pa(n,s),u&64&&(n=s.updateQueue,n!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{vb(n,a)}catch(E){ft(s,s.return,E)}}break;case 27:a===null&&u&4&&Ly(s);case 26:case 5:pa(n,s),a===null&&u&4&&My(s),u&512&&_o(s,s.return);break;case 12:pa(n,s);break;case 31:pa(n,s),u&4&&Uy(n,s);break;case 13:pa(n,s),u&4&&Fy(n,s),u&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=Q_.bind(null,s),pk(n,s))));break;case 22:if(u=s.memoizedState!==null||da,!u){a=a!==null&&a.memoizedState!==null||Vt,p=da;var b=Vt;da=u,(Vt=a)&&!b?ma(n,s,(s.subtreeFlags&8772)!==0):pa(n,s),da=p,Vt=b}break;case 30:break;default:pa(n,s)}}function zy(n){var a=n.alternate;a!==null&&(n.alternate=null,zy(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&Yl(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Tt=null,Rn=!1;function ha(n,a,s){for(s=s.child;s!==null;)By(n,a,s),s=s.sibling}function By(n,a,s){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(nn,s)}catch{}switch(s.tag){case 26:Vt||Pi(s,a),ha(n,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Vt||Pi(s,a);var u=Tt,p=Rn;Ja(s.type)&&(Tt=s.stateNode,Rn=!1),ha(n,a,s),Do(s.stateNode),Tt=u,Rn=p;break;case 5:Vt||Pi(s,a);case 6:if(u=Tt,p=Rn,Tt=null,ha(n,a,s),Tt=u,Rn=p,Tt!==null)if(Rn)try{(Tt.nodeType===9?Tt.body:Tt.nodeName==="HTML"?Tt.ownerDocument.body:Tt).removeChild(s.stateNode)}catch(b){ft(s,a,b)}else try{Tt.removeChild(s.stateNode)}catch(b){ft(s,a,b)}break;case 18:Tt!==null&&(Rn?(n=Tt,Ox(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),tl(n)):Ox(Tt,s.stateNode));break;case 4:u=Tt,p=Rn,Tt=s.stateNode.containerInfo,Rn=!0,ha(n,a,s),Tt=u,Rn=p;break;case 0:case 11:case 14:case 15:Ga(2,s,a),Vt||Ga(4,s,a),ha(n,a,s);break;case 1:Vt||(Pi(s,a),u=s.stateNode,typeof u.componentWillUnmount=="function"&&Ry(s,a,u)),ha(n,a,s);break;case 21:ha(n,a,s);break;case 22:Vt=(u=Vt)||s.memoizedState!==null,ha(n,a,s),Vt=u;break;default:ha(n,a,s)}}function Uy(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{tl(n)}catch(s){ft(a,a.return,s)}}}function Fy(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{tl(n)}catch(s){ft(a,a.return,s)}}function F_(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new jy),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new jy),a;default:throw Error(r(435,n.tag))}}function pu(n,a){var s=F_(n);a.forEach(function(u){if(!s.has(u)){s.add(u);var p=V_.bind(null,n,u);u.then(p,p)}})}function Mn(n,a){var s=a.deletions;if(s!==null)for(var u=0;u<s.length;u++){var p=s[u],b=n,E=a,N=E;e:for(;N!==null;){switch(N.tag){case 27:if(Ja(N.type)){Tt=N.stateNode,Rn=!1;break e}break;case 5:Tt=N.stateNode,Rn=!1;break e;case 3:case 4:Tt=N.stateNode.containerInfo,Rn=!0;break e}N=N.return}if(Tt===null)throw Error(r(160));By(b,E,p),Tt=null,Rn=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Py(a,n),a=a.sibling}var Ti=null;function Py(n,a){var s=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Mn(a,n),Dn(n),u&4&&(Ga(3,n,n.return),wo(3,n),Ga(5,n,n.return));break;case 1:Mn(a,n),Dn(n),u&512&&(Vt||s===null||Pi(s,s.return)),u&64&&da&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?u:s.concat(u))));break;case 26:var p=Ti;if(Mn(a,n),Dn(n),u&512&&(Vt||s===null||Pi(s,s.return)),u&4){var b=s!==null?s.memoizedState:null;if(u=n.memoizedState,s===null)if(u===null)if(n.stateNode===null){e:{u=n.type,s=n.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":b=p.getElementsByTagName("title")[0],(!b||b[Cr]||b[Ut]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(u),p.head.insertBefore(b,p.querySelector("head > title"))),on(b,u,s),b[Ut]=n,Ht(b),u=b;break e;case"link":var E=Px("link","href",p).get(u+(s.href||""));if(E){for(var N=0;N<E.length;N++)if(b=E[N],b.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&b.getAttribute("rel")===(s.rel==null?null:s.rel)&&b.getAttribute("title")===(s.title==null?null:s.title)&&b.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){E.splice(N,1);break t}}b=p.createElement(u),on(b,u,s),p.head.appendChild(b);break;case"meta":if(E=Px("meta","content",p).get(u+(s.content||""))){for(N=0;N<E.length;N++)if(b=E[N],b.getAttribute("content")===(s.content==null?null:""+s.content)&&b.getAttribute("name")===(s.name==null?null:s.name)&&b.getAttribute("property")===(s.property==null?null:s.property)&&b.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&b.getAttribute("charset")===(s.charSet==null?null:s.charSet)){E.splice(N,1);break t}}b=p.createElement(u),on(b,u,s),p.head.appendChild(b);break;default:throw Error(r(468,u))}b[Ut]=n,Ht(b),u=b}n.stateNode=u}else $x(p,n.type,n.stateNode);else n.stateNode=Fx(p,u,n.memoizedProps);else b!==u?(b===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):b.count--,u===null?$x(p,n.type,n.stateNode):Fx(p,u,n.memoizedProps)):u===null&&n.stateNode!==null&&hh(n,n.memoizedProps,s.memoizedProps)}break;case 27:Mn(a,n),Dn(n),u&512&&(Vt||s===null||Pi(s,s.return)),s!==null&&u&4&&hh(n,n.memoizedProps,s.memoizedProps);break;case 5:if(Mn(a,n),Dn(n),u&512&&(Vt||s===null||Pi(s,s.return)),n.flags&32){p=n.stateNode;try{Oe(p,"")}catch(ye){ft(n,n.return,ye)}}u&4&&n.stateNode!=null&&(p=n.memoizedProps,hh(n,p,s!==null?s.memoizedProps:p)),u&1024&&(gh=!0);break;case 6:if(Mn(a,n),Dn(n),u&4){if(n.stateNode===null)throw Error(r(162));u=n.memoizedProps,s=n.stateNode;try{s.nodeValue=u}catch(ye){ft(n,n.return,ye)}}break;case 3:if(Ou=null,p=Ti,Ti=Cu(a.containerInfo),Mn(a,n),Ti=p,Dn(n),u&4&&s!==null&&s.memoizedState.isDehydrated)try{tl(a.containerInfo)}catch(ye){ft(n,n.return,ye)}gh&&(gh=!1,$y(n));break;case 4:u=Ti,Ti=Cu(n.stateNode.containerInfo),Mn(a,n),Dn(n),Ti=u;break;case 12:Mn(a,n),Dn(n);break;case 31:Mn(a,n),Dn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,pu(n,u)));break;case 13:Mn(a,n),Dn(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(gu=Ot()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,pu(n,u)));break;case 22:p=n.memoizedState!==null;var j=s!==null&&s.memoizedState!==null,Y=da,ne=Vt;if(da=Y||p,Vt=ne||j,Mn(a,n),Vt=ne,da=Y,Dn(n),u&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(s===null||j||da||Vt||Kr(n)),s=null,a=n;;){if(a.tag===5||a.tag===26){if(s===null){j=s=a;try{if(b=j.stateNode,p)E=b.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{N=j.stateNode;var re=j.memoizedProps.style,Q=re!=null&&re.hasOwnProperty("display")?re.display:null;N.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(ye){ft(j,j.return,ye)}}}else if(a.tag===6){if(s===null){j=a;try{j.stateNode.nodeValue=p?"":j.memoizedProps}catch(ye){ft(j,j.return,ye)}}}else if(a.tag===18){if(s===null){j=a;try{var W=j.stateNode;p?Rx(W,!0):Rx(j.stateNode,!1)}catch(ye){ft(j,j.return,ye)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}u&4&&(u=n.updateQueue,u!==null&&(s=u.retryQueue,s!==null&&(u.retryQueue=null,pu(n,s))));break;case 19:Mn(a,n),Dn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,pu(n,u)));break;case 30:break;case 21:break;default:Mn(a,n),Dn(n)}}function Dn(n){var a=n.flags;if(a&2){try{for(var s,u=n.return;u!==null;){if(Dy(u)){s=u;break}u=u.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var p=s.stateNode,b=ph(n);hu(n,b,p);break;case 5:var E=s.stateNode;s.flags&32&&(Oe(E,""),s.flags&=-33);var N=ph(n);hu(n,N,E);break;case 3:case 4:var j=s.stateNode.containerInfo,Y=ph(n);mh(n,Y,j);break;default:throw Error(r(161))}}catch(ne){ft(n,n.return,ne)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function $y(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;$y(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function pa(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Iy(n,a.alternate,a),a=a.sibling}function Kr(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:Ga(4,a,a.return),Kr(a);break;case 1:Pi(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&Ry(a,a.return,s),Kr(a);break;case 27:Do(a.stateNode);case 26:case 5:Pi(a,a.return),Kr(a);break;case 22:a.memoizedState===null&&Kr(a);break;case 30:Kr(a);break;default:Kr(a)}n=n.sibling}}function ma(n,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var u=a.alternate,p=n,b=a,E=b.flags;switch(b.tag){case 0:case 11:case 15:ma(p,b,s),wo(4,b);break;case 1:if(ma(p,b,s),u=b,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(Y){ft(u,u.return,Y)}if(u=b,p=u.updateQueue,p!==null){var N=u.stateNode;try{var j=p.shared.hiddenCallbacks;if(j!==null)for(p.shared.hiddenCallbacks=null,p=0;p<j.length;p++)xb(j[p],N)}catch(Y){ft(u,u.return,Y)}}s&&E&64&&Oy(b),_o(b,b.return);break;case 27:Ly(b);case 26:case 5:ma(p,b,s),s&&u===null&&E&4&&My(b),_o(b,b.return);break;case 12:ma(p,b,s);break;case 31:ma(p,b,s),s&&E&4&&Uy(p,b);break;case 13:ma(p,b,s),s&&E&4&&Fy(p,b);break;case 22:b.memoizedState===null&&ma(p,b,s),_o(b,b.return);break;case 30:break;default:ma(p,b,s)}a=a.sibling}}function bh(n,a){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&co(s))}function yh(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&co(n))}function Ci(n,a,s,u){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)qy(n,a,s,u),a=a.sibling}function qy(n,a,s,u){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Ci(n,a,s,u),p&2048&&wo(9,a);break;case 1:Ci(n,a,s,u);break;case 3:Ci(n,a,s,u),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&co(n)));break;case 12:if(p&2048){Ci(n,a,s,u),n=a.stateNode;try{var b=a.memoizedProps,E=b.id,N=b.onPostCommit;typeof N=="function"&&N(E,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(j){ft(a,a.return,j)}}else Ci(n,a,s,u);break;case 31:Ci(n,a,s,u);break;case 13:Ci(n,a,s,u);break;case 23:break;case 22:b=a.stateNode,E=a.alternate,a.memoizedState!==null?b._visibility&2?Ci(n,a,s,u):ko(n,a):b._visibility&2?Ci(n,a,s,u):(b._visibility|=2,Hs(n,a,s,u,(a.subtreeFlags&10256)!==0||!1)),p&2048&&bh(E,a);break;case 24:Ci(n,a,s,u),p&2048&&yh(a.alternate,a);break;default:Ci(n,a,s,u)}}function Hs(n,a,s,u,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var b=n,E=a,N=s,j=u,Y=E.flags;switch(E.tag){case 0:case 11:case 15:Hs(b,E,N,j,p),wo(8,E);break;case 23:break;case 22:var ne=E.stateNode;E.memoizedState!==null?ne._visibility&2?Hs(b,E,N,j,p):ko(b,E):(ne._visibility|=2,Hs(b,E,N,j,p)),p&&Y&2048&&bh(E.alternate,E);break;case 24:Hs(b,E,N,j,p),p&&Y&2048&&yh(E.alternate,E);break;default:Hs(b,E,N,j,p)}a=a.sibling}}function ko(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=n,u=a,p=u.flags;switch(u.tag){case 22:ko(s,u),p&2048&&bh(u.alternate,u);break;case 24:ko(s,u),p&2048&&yh(u.alternate,u);break;default:ko(s,u)}a=a.sibling}}var No=8192;function Ks(n,a,s){if(n.subtreeFlags&No)for(n=n.child;n!==null;)Hy(n,a,s),n=n.sibling}function Hy(n,a,s){switch(n.tag){case 26:Ks(n,a,s),n.flags&No&&n.memoizedState!==null&&Nk(s,Ti,n.memoizedState,n.memoizedProps);break;case 5:Ks(n,a,s);break;case 3:case 4:var u=Ti;Ti=Cu(n.stateNode.containerInfo),Ks(n,a,s),Ti=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=No,No=16777216,Ks(n,a,s),No=u):Ks(n,a,s));break;default:Ks(n,a,s)}}function Ky(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function To(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];en=u,Yy(u,n)}Ky(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Gy(n),n=n.sibling}function Gy(n){switch(n.tag){case 0:case 11:case 15:To(n),n.flags&2048&&Ga(9,n,n.return);break;case 3:To(n);break;case 12:To(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,mu(n)):To(n);break;default:To(n)}}function mu(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var u=a[s];en=u,Yy(u,n)}Ky(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:Ga(8,a,a.return),mu(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,mu(a));break;default:mu(a)}n=n.sibling}}function Yy(n,a){for(;en!==null;){var s=en;switch(s.tag){case 0:case 11:case 15:Ga(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var u=s.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:co(s.memoizedState.cache)}if(u=s.child,u!==null)u.return=s,en=u;else e:for(s=n;en!==null;){u=en;var p=u.sibling,b=u.return;if(zy(u),u===s){en=null;break e}if(p!==null){p.return=b,en=p;break e}en=b}}}var P_={getCacheForType:function(n){var a=sn(Gt),s=a.data.get(n);return s===void 0&&(s=n(),a.data.set(n,s)),s},cacheSignal:function(){return sn(Gt).controller.signal}},$_=typeof WeakMap=="function"?WeakMap:Map,at=0,bt=null,He=null,Qe=0,ut=0,Xn=null,Ya=!1,Gs=!1,xh=!1,ga=0,It=0,Qa=0,Gr=0,vh=0,Zn=0,Ys=0,Co=null,Ln=null,Eh=!1,gu=0,Qy=0,bu=1/0,yu=null,Va=null,Wt=0,Xa=null,Qs=null,ba=0,Sh=0,wh=null,Vy=null,Ao=0,_h=null;function Wn(){return(at&2)!==0&&Qe!==0?Qe&-Qe:H.T!==null?Oh():vs()}function Xy(){if(Zn===0)if((Qe&536870912)===0||Ze){var n=xs;xs<<=1,(xs&3932160)===0&&(xs=262144),Zn=n}else Zn=536870912;return n=Qn.current,n!==null&&(n.flags|=32),Zn}function jn(n,a,s){(n===bt&&(ut===2||ut===9)||n.cancelPendingCommit!==null)&&(Vs(n,0),Za(n,Qe,Zn,!1)),gt(n,s),((at&2)===0||n!==bt)&&(n===bt&&((at&2)===0&&(Gr|=s),It===4&&Za(n,Qe,Zn,!1)),$i(n))}function Zy(n,a,s){if((at&6)!==0)throw Error(r(327));var u=!s&&(a&127)===0&&(a&n.expiredLanes)===0||ie(n,a),p=u?K_(n,a):Nh(n,a,!0),b=u;do{if(p===0){Gs&&!u&&Za(n,a,0,!1);break}else{if(s=n.current.alternate,b&&!q_(s)){p=Nh(n,a,!1),b=!1;continue}if(p===2){if(b=a,n.errorRecoveryDisabledLanes&b)var E=0;else E=n.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){a=E;e:{var N=n;p=Co;var j=N.current.memoizedState.isDehydrated;if(j&&(Vs(N,E).flags|=256),E=Nh(N,E,!1),E!==2){if(xh&&!j){N.errorRecoveryDisabledLanes|=b,Gr|=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(n,0),Za(n,a,0,!0);break}e:{switch(u=n,b=p,b){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:Za(u,a,Zn,!Ya);break e;case 2:Ln=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(p=gu+300-Ot(),10<p)){if(Za(u,a,Zn,!Ya),U(u,0,!0)!==0)break e;ba=a,u.timeoutHandle=Cx(Wy.bind(null,u,s,Ln,yu,Eh,a,Zn,Gr,Ys,Ya,b,"Throttled",-0,0),p);break e}Wy(u,s,Ln,yu,Eh,a,Zn,Gr,Ys,Ya,b,null,-0,0)}}break}while(!0);$i(n)}function Wy(n,a,s,u,p,b,E,N,j,Y,ne,re,Q,W){if(n.timeoutHandle=-1,re=a.subtreeFlags,re&8192||(re&16785408)===16785408){re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:de},Hy(a,b,re);var ye=(b&62914560)===b?gu-Ot():(b&4194048)===b?Qy-Ot():0;if(ye=Tk(re,ye),ye!==null){ba=b,n.cancelPendingCommit=ye(sx.bind(null,n,a,b,s,u,p,E,N,j,ne,re,null,Q,W)),Za(n,b,E,!Y);return}}sx(n,a,b,s,u,p,E,N,j)}function q_(n){for(var a=n;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var u=0;u<s.length;u++){var p=s[u],b=p.getSnapshot;p=p.value;try{if(!Gn(b(),p))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Za(n,a,s,u){a&=~vh,a&=~Gr,n.suspendedLanes|=a,n.pingedLanes&=~a,u&&(n.warmLanes|=a),u=n.expirationTimes;for(var p=a;0<p;){var b=31-lt(p),E=1<<b;u[b]=-1,p&=~E}s!==0&&be(n,s,a)}function xu(){return(at&6)===0?(Oo(0),!1):!0}function kh(){if(He!==null){if(ut===0)var n=He.return;else n=He,sa=zr=null,Pd(n),Us=null,fo=0,n=He;for(;n!==null;)Ay(n.alternate,n),n=n.return;He=null}}function Vs(n,a){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,ck(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),ba=0,kh(),bt=n,He=s=aa(n.current,null),Qe=a,ut=0,Xn=null,Ya=!1,Gs=ie(n,a),xh=!1,Ys=Zn=vh=Gr=Qa=It=0,Ln=Co=null,Eh=!1,(a&8)!==0&&(a|=a&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=a;0<u;){var p=31-lt(u),b=1<<p;a|=n[p],u&=~b}return ga=a,Fc(),s}function Jy(n,a){ze=null,H.H=vo,a===Bs||a===Qc?(a=mb(),ut=3):a===Ad?(a=mb(),ut=4):ut=a===ih?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Xn=a,He===null&&(It=1,ou(n,ui(a,n.current)))}function ex(){var n=Qn.current;return n===null?!0:(Qe&4194048)===Qe?pi===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?n===pi:!1}function tx(){var n=H.H;return H.H=vo,n===null?vo:n}function nx(){var n=H.A;return H.A=P_,n}function vu(){It=4,Ya||(Qe&4194048)!==Qe&&Qn.current!==null||(Gs=!0),(Qa&134217727)===0&&(Gr&134217727)===0||bt===null||Za(bt,Qe,Zn,!1)}function Nh(n,a,s){var u=at;at|=2;var p=tx(),b=nx();(bt!==n||Qe!==a)&&(yu=null,Vs(n,a)),a=!1;var E=It;e:do try{if(ut!==0&&He!==null){var N=He,j=Xn;switch(ut){case 8:kh(),E=6;break e;case 3:case 2:case 9:case 6:Qn.current===null&&(a=!0);var Y=ut;if(ut=0,Xn=null,Xs(n,N,j,Y),s&&Gs){E=0;break e}break;default:Y=ut,ut=0,Xn=null,Xs(n,N,j,Y)}}H_(),E=It;break}catch(ne){Jy(n,ne)}while(!0);return a&&n.shellSuspendCounter++,sa=zr=null,at=u,H.H=p,H.A=b,He===null&&(bt=null,Qe=0,Fc()),E}function H_(){for(;He!==null;)ix(He)}function K_(n,a){var s=at;at|=2;var u=tx(),p=nx();bt!==n||Qe!==a?(yu=null,bu=Ot()+500,Vs(n,a)):Gs=ie(n,a);e:do try{if(ut!==0&&He!==null){a=He;var b=Xn;t:switch(ut){case 1:ut=0,Xn=null,Xs(n,a,b,1);break;case 2:case 9:if(hb(b)){ut=0,Xn=null,ax(a);break}a=function(){ut!==2&&ut!==9||bt!==n||(ut=7),$i(n)},b.then(a,a);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:hb(b)?(ut=0,Xn=null,ax(a)):(ut=0,Xn=null,Xs(n,a,b,7));break;case 5:var E=null;switch(He.tag){case 26:E=He.memoizedState;case 5:case 27:var N=He;if(E?qx(E):N.stateNode.complete){ut=0,Xn=null;var j=N.sibling;if(j!==null)He=j;else{var Y=N.return;Y!==null?(He=Y,Eu(Y)):He=null}break t}}ut=0,Xn=null,Xs(n,a,b,5);break;case 6:ut=0,Xn=null,Xs(n,a,b,6);break;case 8:kh(),It=6;break e;default:throw Error(r(462))}}G_();break}catch(ne){Jy(n,ne)}while(!0);return sa=zr=null,H.H=u,H.A=p,at=s,He!==null?0:(bt=null,Qe=0,Fc(),It)}function G_(){for(;He!==null&&!Kl();)ix(He)}function ix(n){var a=Ty(n.alternate,n,ga);n.memoizedProps=n.pendingProps,a===null?Eu(n):He=a}function ax(n){var a=n,s=a.alternate;switch(a.tag){case 15:case 0:a=Ey(s,a,a.pendingProps,a.type,void 0,Qe);break;case 11:a=Ey(s,a,a.pendingProps,a.type.render,a.ref,Qe);break;case 5:Pd(a);default:Ay(s,a),a=He=nb(a,ga),a=Ty(s,a,ga)}n.memoizedProps=n.pendingProps,a===null?Eu(n):He=a}function Xs(n,a,s,u){sa=zr=null,Pd(a),Us=null,fo=0;var p=a.return;try{if(L_(n,p,a,s,Qe)){It=1,ou(n,ui(s,n.current)),He=null;return}}catch(b){if(p!==null)throw He=p,b;It=1,ou(n,ui(s,n.current)),He=null;return}a.flags&32768?(Ze||u===1?n=!0:Gs||(Qe&536870912)!==0?n=!1:(Ya=n=!0,(u===2||u===9||u===3||u===6)&&(u=Qn.current,u!==null&&u.tag===13&&(u.flags|=16384))),rx(a,n)):Eu(a)}function Eu(n){var a=n;do{if((a.flags&32768)!==0){rx(a,Ya);return}n=a.return;var s=z_(a.alternate,a,ga);if(s!==null){He=s;return}if(a=a.sibling,a!==null){He=a;return}He=a=n}while(a!==null);It===0&&(It=5)}function rx(n,a){do{var s=B_(n.alternate,n);if(s!==null){s.flags&=32767,He=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(n=n.sibling,n!==null)){He=n;return}He=n=s}while(n!==null);It=6,He=null}function sx(n,a,s,u,p,b,E,N,j){n.cancelPendingCommit=null;do Su();while(Wt!==0);if((at&6)!==0)throw Error(r(327));if(a!==null){if(a===n.current)throw Error(r(177));if(b=a.lanes|a.childLanes,b|=pd,xe(n,s,b,E,N,j),n===bt&&(He=bt=null,Qe=0),Qs=a,Xa=n,ba=s,Sh=b,wh=p,Vy=u,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,X_(Ce,function(){return fx(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||u){u=H.T,H.T=null,p=le.p,le.p=2,E=at,at|=4;try{U_(n,a,s)}finally{at=E,le.p=p,H.T=u}}Wt=1,lx(),ox(),cx()}}function lx(){if(Wt===1){Wt=0;var n=Xa,a=Qs,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=H.T,H.T=null;var u=le.p;le.p=2;var p=at;at|=4;try{Py(a,n);var b=Bh,E=Yg(n.containerInfo),N=b.focusedElem,j=b.selectionRange;if(E!==N&&N&&N.ownerDocument&&Gg(N.ownerDocument.documentElement,N)){if(j!==null&&cd(N)){var Y=j.start,ne=j.end;if(ne===void 0&&(ne=Y),"selectionStart"in N)N.selectionStart=Y,N.selectionEnd=Math.min(ne,N.value.length);else{var re=N.ownerDocument||document,Q=re&&re.defaultView||window;if(Q.getSelection){var W=Q.getSelection(),ye=N.textContent.length,Ae=Math.min(j.start,ye),pt=j.end===void 0?Ae:Math.min(j.end,ye);!W.extend&&Ae>pt&&(E=pt,pt=Ae,Ae=E);var q=Kg(N,Ae),F=Kg(N,pt);if(q&&F&&(W.rangeCount!==1||W.anchorNode!==q.node||W.anchorOffset!==q.offset||W.focusNode!==F.node||W.focusOffset!==F.offset)){var G=re.createRange();G.setStart(q.node,q.offset),W.removeAllRanges(),Ae>pt?(W.addRange(G),W.extend(F.node,F.offset)):(G.setEnd(F.node,F.offset),W.addRange(G))}}}}for(re=[],W=N;W=W.parentNode;)W.nodeType===1&&re.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<re.length;N++){var ae=re[N];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}Lu=!!zh,Bh=zh=null}finally{at=p,le.p=u,H.T=s}}n.current=a,Wt=2}}function ox(){if(Wt===2){Wt=0;var n=Xa,a=Qs,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=H.T,H.T=null;var u=le.p;le.p=2;var p=at;at|=4;try{Iy(n,a.alternate,a)}finally{at=p,le.p=u,H.T=s}}Wt=3}}function cx(){if(Wt===4||Wt===3){Wt=0,bs();var n=Xa,a=Qs,s=ba,u=Vy;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Wt=5:(Wt=0,Qs=Xa=null,ux(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Va=null),Ji(s),a=a.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(nn,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=H.T,p=le.p,le.p=2,H.T=null;try{for(var b=n.onRecoverableError,E=0;E<u.length;E++){var N=u[E];b(N.value,{componentStack:N.stack})}}finally{H.T=a,le.p=p}}(ba&3)!==0&&Su(),$i(n),p=n.pendingLanes,(s&261930)!==0&&(p&42)!==0?n===_h?Ao++:(Ao=0,_h=n):Ao=0,Oo(0)}}function ux(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,co(a)))}function Su(){return lx(),ox(),cx(),fx()}function fx(){if(Wt!==5)return!1;var n=Xa,a=Sh;Sh=0;var s=Ji(ba),u=H.T,p=le.p;try{le.p=32>s?32:s,H.T=null,s=wh,wh=null;var b=Xa,E=ba;if(Wt=0,Qs=Xa=null,ba=0,(at&6)!==0)throw Error(r(331));var N=at;if(at|=4,Gy(b.current),qy(b,b.current,E,s),at=N,Oo(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(nn,b)}catch{}return!0}finally{le.p=p,H.T=u,ux(n,a)}}function dx(n,a,s){a=ui(s,a),a=nh(n.stateNode,a,2),n=qa(n,a,2),n!==null&&(gt(n,2),$i(n))}function ft(n,a,s){if(n.tag===3)dx(n,n,s);else for(;a!==null;){if(a.tag===3){dx(a,n,s);break}else if(a.tag===1){var u=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Va===null||!Va.has(u))){n=ui(s,n),s=hy(2),u=qa(a,s,2),u!==null&&(py(s,u,a,n),gt(u,2),$i(u));break}}a=a.return}}function Th(n,a,s){var u=n.pingCache;if(u===null){u=n.pingCache=new $_;var p=new Set;u.set(a,p)}else p=u.get(a),p===void 0&&(p=new Set,u.set(a,p));p.has(s)||(xh=!0,p.add(s),n=Y_.bind(null,n,a,s),a.then(n,n))}function Y_(n,a,s){var u=n.pingCache;u!==null&&u.delete(a),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,bt===n&&(Qe&s)===s&&(It===4||It===3&&(Qe&62914560)===Qe&&300>Ot()-gu?(at&2)===0&&Vs(n,0):vh|=s,Ys===Qe&&(Ys=0)),$i(n)}function hx(n,a){a===0&&(a=Me()),n=Lr(n,a),n!==null&&(gt(n,a),$i(n))}function Q_(n){var a=n.memoizedState,s=0;a!==null&&(s=a.retryLane),hx(n,s)}function V_(n,a){var s=0;switch(n.tag){case 31:case 13:var u=n.stateNode,p=n.memoizedState;p!==null&&(s=p.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(a),hx(n,s)}function X_(n,a){return Wi(n,a)}var wu=null,Zs=null,Ch=!1,_u=!1,Ah=!1,Wa=0;function $i(n){n!==Zs&&n.next===null&&(Zs===null?wu=Zs=n:Zs=Zs.next=n),_u=!0,Ch||(Ch=!0,W_())}function Oo(n,a){if(!Ah&&_u){Ah=!0;do for(var s=!1,u=wu;u!==null;){if(n!==0){var p=u.pendingLanes;if(p===0)var b=0;else{var E=u.suspendedLanes,N=u.pingedLanes;b=(1<<31-lt(42|n)+1)-1,b&=p&~(E&~N),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(s=!0,bx(u,b))}else b=Qe,b=U(u,u===bt?b:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(b&3)===0||ie(u,b)||(s=!0,bx(u,b));u=u.next}while(s);Ah=!1}}function Z_(){px()}function px(){_u=Ch=!1;var n=0;Wa!==0&&ok()&&(n=Wa);for(var a=Ot(),s=null,u=wu;u!==null;){var p=u.next,b=mx(u,a);b===0?(u.next=null,s===null?wu=p:s.next=p,p===null&&(Zs=s)):(s=u,(n!==0||(b&3)!==0)&&(_u=!0)),u=p}Wt!==0&&Wt!==5||Oo(n),Wa!==0&&(Wa=0)}function mx(n,a){for(var s=n.suspendedLanes,u=n.pingedLanes,p=n.expirationTimes,b=n.pendingLanes&-62914561;0<b;){var E=31-lt(b),N=1<<E,j=p[E];j===-1?((N&s)===0||(N&u)!==0)&&(p[E]=pe(N,a)):j<=a&&(n.expiredLanes|=N),b&=~N}if(a=bt,s=Qe,s=U(n,n===a?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,s===0||n===a&&(ut===2||ut===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&kr(u),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||ie(n,s)){if(a=s&-s,a===n.callbackPriority)return a;switch(u!==null&&kr(u),Ji(s)){case 2:case 8:s=fe;break;case 32:s=Ce;break;case 268435456:s=et;break;default:s=Ce}return u=gx.bind(null,n),s=Wi(s,u),n.callbackPriority=a,n.callbackNode=s,a}return u!==null&&u!==null&&kr(u),n.callbackPriority=2,n.callbackNode=null,2}function gx(n,a){if(Wt!==0&&Wt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(Su()&&n.callbackNode!==s)return null;var u=Qe;return u=U(n,n===bt?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(Zy(n,u,a),mx(n,Ot()),n.callbackNode!=null&&n.callbackNode===s?gx.bind(null,n):null)}function bx(n,a){if(Su())return null;Zy(n,a,!0)}function W_(){uk(function(){(at&6)!==0?Wi(te,Z_):px()})}function Oh(){if(Wa===0){var n=Is;n===0&&(n=Nr,Nr<<=1,(Nr&261888)===0&&(Nr=256)),Wa=n}return Wa}function yx(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:ja(""+n)}function xx(n,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,n.id&&s.setAttribute("form",n.id),a.parentNode.insertBefore(s,a),n=new FormData(n),s.parentNode.removeChild(s),n}function J_(n,a,s,u,p){if(a==="submit"&&s&&s.stateNode===p){var b=yx((p[fn]||null).action),E=u.submitter;E&&(a=(a=E[fn]||null)?yx(a.formAction):E.getAttribute("formAction"),a!==null&&(b=a,E=null));var N=new Ic("action","action",null,u,p);n.push({event:N,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Wa!==0){var j=E?xx(p,E):new FormData(p);Xd(s,{pending:!0,data:j,method:p.method,action:b},null,j)}}else typeof b=="function"&&(N.preventDefault(),j=E?xx(p,E):new FormData(p),Xd(s,{pending:!0,data:j,method:p.method,action:b},b,j))},currentTarget:p}]})}}for(var Rh=0;Rh<hd.length;Rh++){var Mh=hd[Rh],ek=Mh.toLowerCase(),tk=Mh[0].toUpperCase()+Mh.slice(1);Ni(ek,"on"+tk)}Ni(Xg,"onAnimationEnd"),Ni(Zg,"onAnimationIteration"),Ni(Wg,"onAnimationStart"),Ni("dblclick","onDoubleClick"),Ni("focusin","onFocus"),Ni("focusout","onBlur"),Ni(b_,"onTransitionRun"),Ni(y_,"onTransitionStart"),Ni(x_,"onTransitionCancel"),Ni(Jg,"onTransitionEnd"),ce("onMouseEnter",["mouseout","mouseover"]),ce("onMouseLeave",["mouseout","mouseover"]),ce("onPointerEnter",["pointerout","pointerover"]),ce("onPointerLeave",["pointerout","pointerover"]),ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ta("onBeforeInput",["compositionend","keypress","textInput","paste"]),ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ta("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ro="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(" "),nk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ro));function vx(n,a){a=(a&4)!==0;for(var s=0;s<n.length;s++){var u=n[s],p=u.event;u=u.listeners;e:{var b=void 0;if(a)for(var E=u.length-1;0<=E;E--){var N=u[E],j=N.instance,Y=N.currentTarget;if(N=N.listener,j!==b&&p.isPropagationStopped())break e;b=N,p.currentTarget=Y;try{b(p)}catch(ne){Uc(ne)}p.currentTarget=null,b=j}else for(E=0;E<u.length;E++){if(N=u[E],j=N.instance,Y=N.currentTarget,N=N.listener,j!==b&&p.isPropagationStopped())break e;b=N,p.currentTarget=Y;try{b(p)}catch(ne){Uc(ne)}p.currentTarget=null,b=j}}}}function Ke(n,a){var s=a[Gl];s===void 0&&(s=a[Gl]=new Set);var u=n+"__bubble";s.has(u)||(Ex(a,n,2,!1),s.add(u))}function Dh(n,a,s){var u=0;a&&(u|=4),Ex(s,n,u,a)}var ku="_reactListening"+Math.random().toString(36).slice(2);function Lh(n){if(!n[ku]){n[ku]=!0,Cc.forEach(function(s){s!=="selectionchange"&&(nk.has(s)||Dh(s,!1,n),Dh(s,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[ku]||(a[ku]=!0,Dh("selectionchange",!1,a))}}function Ex(n,a,s,u){switch(Xx(a)){case 2:var p=Ok;break;case 8:p=Rk;break;default:p=Vh}s=p.bind(null,a,s,n),p=void 0,!ed||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),u?p!==void 0?n.addEventListener(a,s,{capture:!0,passive:p}):n.addEventListener(a,s,!0):p!==void 0?n.addEventListener(a,s,{passive:p}):n.addEventListener(a,s,!1)}function jh(n,a,s,u,p){var b=u;if((a&1)===0&&(a&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 j=E.tag;if((j===3||j===4)&&E.stateNode.containerInfo===p)return;E=E.return}for(;N!==null;){if(E=vn(N),E===null)return;if(j=E.tag,j===5||j===6||j===26||j===27){u=b=E;continue e}N=N.parentNode}}u=u.return}Mc(function(){var Y=b,ne=Ie(s),re=[];e:{var Q=eb.get(n);if(Q!==void 0){var W=Ic,ye=n;switch(n){case"keypress":if(Lc(s)===0)break e;case"keydown":case"keyup":W=Vw;break;case"focusin":ye="focus",W=ad;break;case"focusout":ye="blur",W=ad;break;case"beforeblur":case"afterblur":W=ad;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=Ag;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=zw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=Ww;break;case Xg:case Zg:case Wg:W=Fw;break;case Jg:W=e_;break;case"scroll":case"scrollend":W=jw;break;case"wheel":W=n_;break;case"copy":case"cut":case"paste":W=$w;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=Rg;break;case"toggle":case"beforetoggle":W=a_}var Ae=(a&4)!==0,pt=!Ae&&(n==="scroll"||n==="scrollend"),q=Ae?Q!==null?Q+"Capture":null:Q;Ae=[];for(var F=Y,G;F!==null;){var ae=F;if(G=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||G===null||q===null||(ae=Wl(F,q),ae!=null&&Ae.push(Mo(F,ae,G))),pt)break;F=F.return}0<Ae.length&&(Q=new W(Q,ye,null,s,ne),re.push({event:Q,listeners:Ae}))}}if((a&7)===0){e:{if(Q=n==="mouseover"||n==="pointerover",W=n==="mouseout"||n==="pointerout",Q&&s!==Ee&&(ye=s.relatedTarget||s.fromElement)&&(vn(ye)||ye[Ra]))break e;if((W||Q)&&(Q=ne.window===ne?ne:(Q=ne.ownerDocument)?Q.defaultView||Q.parentWindow:window,W?(ye=s.relatedTarget||s.toElement,W=Y,ye=ye?vn(ye):null,ye!==null&&(pt=o(ye),Ae=ye.tag,ye!==pt||Ae!==5&&Ae!==27&&Ae!==6)&&(ye=null)):(W=null,ye=Y),W!==ye)){if(Ae=Ag,ae="onMouseLeave",q="onMouseEnter",F="mouse",(n==="pointerout"||n==="pointerover")&&(Ae=Rg,ae="onPointerLeave",q="onPointerEnter",F="pointer"),pt=W==null?Q:Ma(W),G=ye==null?Q:Ma(ye),Q=new Ae(ae,F+"leave",W,s,ne),Q.target=pt,Q.relatedTarget=G,ae=null,vn(ne)===Y&&(Ae=new Ae(q,F+"enter",ye,s,ne),Ae.target=G,Ae.relatedTarget=pt,ae=Ae),pt=ae,W&&ye)t:{for(Ae=ik,q=W,F=ye,G=0,ae=q;ae;ae=Ae(ae))G++;ae=0;for(var Ne=F;Ne;Ne=Ae(Ne))ae++;for(;0<G-ae;)q=Ae(q),G--;for(;0<ae-G;)F=Ae(F),ae--;for(;G--;){if(q===F||F!==null&&q===F.alternate){Ae=q;break t}q=Ae(q),F=Ae(F)}Ae=null}else Ae=null;W!==null&&Sx(re,Q,W,Ae,!1),ye!==null&&pt!==null&&Sx(re,pt,ye,Ae,!0)}}e:{if(Q=Y?Ma(Y):window,W=Q.nodeName&&Q.nodeName.toLowerCase(),W==="select"||W==="input"&&Q.type==="file")var tt=Ug;else if(zg(Q))if(Fg)tt=p_;else{tt=d_;var Se=f_}else W=Q.nodeName,!W||W.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?Y&&La(Y.elementType)&&(tt=Ug):tt=h_;if(tt&&(tt=tt(n,Y))){Bg(re,tt,s,ne);break e}Se&&Se(n,Q,Y),n==="focusout"&&Y&&Q.type==="number"&&Y.memoizedProps.value!=null&&ks(Q,"number",Q.value)}switch(Se=Y?Ma(Y):window,n){case"focusin":(zg(Se)||Se.contentEditable==="true")&&(Cs=Se,ud=Y,so=null);break;case"focusout":so=ud=Cs=null;break;case"mousedown":fd=!0;break;case"contextmenu":case"mouseup":case"dragend":fd=!1,Qg(re,s,ne);break;case"selectionchange":if(g_)break;case"keydown":case"keyup":Qg(re,s,ne)}var Be;if(sd)e:{switch(n){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else Ts?jg(n,s)&&(Ve="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(Ve="onCompositionStart");Ve&&(Mg&&s.locale!=="ko"&&(Ts||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Ts&&(Be=Tg()):(Ia=ne,td="value"in Ia?Ia.value:Ia.textContent,Ts=!0)),Se=Nu(Y,Ve),0<Se.length&&(Ve=new Og(Ve,n,null,s,ne),re.push({event:Ve,listeners:Se}),Be?Ve.data=Be:(Be=Ig(s),Be!==null&&(Ve.data=Be)))),(Be=s_?l_(n,s):o_(n,s))&&(Ve=Nu(Y,"onBeforeInput"),0<Ve.length&&(Se=new Og("onBeforeInput","beforeinput",null,s,ne),re.push({event:Se,listeners:Ve}),Se.data=Be)),J_(re,n,Y,s,ne)}vx(re,a)})}function Mo(n,a,s){return{instance:n,listener:a,currentTarget:s}}function Nu(n,a){for(var s=a+"Capture",u=[];n!==null;){var p=n,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=Wl(n,s),p!=null&&u.unshift(Mo(n,p,b)),p=Wl(n,a),p!=null&&u.push(Mo(n,p,b))),n.tag===3)return u;n=n.return}return[]}function ik(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Sx(n,a,s,u,p){for(var b=a._reactName,E=[];s!==null&&s!==u;){var N=s,j=N.alternate,Y=N.stateNode;if(N=N.tag,j!==null&&j===u)break;N!==5&&N!==26&&N!==27||Y===null||(j=Y,p?(Y=Wl(s,b),Y!=null&&E.unshift(Mo(s,Y,j))):p||(Y=Wl(s,b),Y!=null&&E.push(Mo(s,Y,j)))),s=s.return}E.length!==0&&n.push({event:a,listeners:E})}var ak=/\r\n?/g,rk=/\u0000|\uFFFD/g;function wx(n){return(typeof n=="string"?n:""+n).replace(ak,`
49
+ `).replace(rk,"")}function _x(n,a){return a=wx(a),wx(n)===a}function ht(n,a,s,u,p,b){switch(s){case"children":typeof u=="string"?a==="body"||a==="textarea"&&u===""||Oe(n,u):(typeof u=="number"||typeof u=="bigint")&&a!=="body"&&Oe(n,""+u);break;case"className":Hn(n,"class",u);break;case"tabIndex":Hn(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Hn(n,s,u);break;case"style":ct(n,u,b);break;case"data":if(a!=="object"){Hn(n,"data",u);break}case"src":case"href":if(u===""&&(a!=="a"||s!=="href")){n.removeAttribute(s);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=ja(""+u),n.setAttribute(s,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(s,"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"&&(s==="formAction"?(a!=="input"&&ht(n,a,"name",p.name,p,null),ht(n,a,"formEncType",p.formEncType,p,null),ht(n,a,"formMethod",p.formMethod,p,null),ht(n,a,"formTarget",p.formTarget,p,null)):(ht(n,a,"encType",p.encType,p,null),ht(n,a,"method",p.method,p,null),ht(n,a,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(s);break}u=ja(""+u),n.setAttribute(s,u);break;case"onClick":u!=null&&(n.onclick=de);break;case"onScroll":u!=null&&Ke("scroll",n);break;case"onScrollEnd":u!=null&&Ke("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(s=u.__html,s!=null){if(p.children!=null)throw Error(r(60));n.innerHTML=s}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.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"){n.removeAttribute("xlink:href");break}s=ja(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);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"?n.setAttribute(s,""+u):n.removeAttribute(s);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"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":u===!0?n.setAttribute(s,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(s,u):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(s,u):n.removeAttribute(s);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(s):n.setAttribute(s,u);break;case"popover":Ke("beforetoggle",n),Ke("toggle",n),dn(n,"popover",u);break;case"xlinkActuate":Cn(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Cn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Cn(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Cn(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Cn(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Cn(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Cn(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Cn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Cn(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":dn(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=na.get(s)||s,dn(n,s,u))}}function Ih(n,a,s,u,p,b){switch(s){case"style":ct(n,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(s=u.__html,s!=null){if(p.children!=null)throw Error(r(60));n.innerHTML=s}}break;case"children":typeof u=="string"?Oe(n,u):(typeof u=="number"||typeof u=="bigint")&&Oe(n,""+u);break;case"onScroll":u!=null&&Ke("scroll",n);break;case"onScrollEnd":u!=null&&Ke("scrollend",n);break;case"onClick":u!=null&&(n.onclick=de);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ar.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),a=s.slice(2,p?s.length-7:void 0),b=n[fn]||null,b=b!=null?b[s]:null,typeof b=="function"&&n.removeEventListener(a,b,p),typeof u=="function")){typeof b!="function"&&b!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(a,u,p);break e}s in n?n[s]=u:u===!0?n.setAttribute(s,""):dn(n,s,u)}}}function on(n,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",n),Ke("load",n);var u=!1,p=!1,b;for(b in s)if(s.hasOwnProperty(b)){var E=s[b];if(E!=null)switch(b){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:ht(n,a,b,E,s,null)}}p&&ht(n,a,"srcSet",s.srcSet,s,null),u&&ht(n,a,"src",s.src,s,null);return;case"input":Ke("invalid",n);var N=b=E=p=null,j=null,Y=null;for(u in s)if(s.hasOwnProperty(u)){var ne=s[u];if(ne!=null)switch(u){case"name":p=ne;break;case"type":E=ne;break;case"checked":j=ne;break;case"defaultChecked":Y=ne;break;case"value":b=ne;break;case"defaultValue":N=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,a));break;default:ht(n,a,u,ne,s,null)}}Or(n,b,N,j,Y,E,p,!1);return;case"select":Ke("invalid",n),u=E=b=null;for(p in s)if(s.hasOwnProperty(p)&&(N=s[p],N!=null))switch(p){case"value":b=N;break;case"defaultValue":E=N;break;case"multiple":u=N;default:ht(n,a,p,N,s,null)}a=b,s=E,n.multiple=!!u,a!=null?an(n,!!u,a,!1):s!=null&&an(n,!!u,s,!0);return;case"textarea":Ke("invalid",n),b=p=u=null;for(E in s)if(s.hasOwnProperty(E)&&(N=s[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(r(91));break;default:ht(n,a,E,N,s,null)}Ns(n,u,p,b);return;case"option":for(j in s)if(s.hasOwnProperty(j)&&(u=s[j],u!=null))switch(j){case"selected":n.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:ht(n,a,j,u,s,null)}return;case"dialog":Ke("beforetoggle",n),Ke("toggle",n),Ke("cancel",n),Ke("close",n);break;case"iframe":case"object":Ke("load",n);break;case"video":case"audio":for(u=0;u<Ro.length;u++)Ke(Ro[u],n);break;case"image":Ke("error",n),Ke("load",n);break;case"details":Ke("toggle",n);break;case"embed":case"source":case"link":Ke("error",n),Ke("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in s)if(s.hasOwnProperty(Y)&&(u=s[Y],u!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:ht(n,a,Y,u,s,null)}return;default:if(La(a)){for(ne in s)s.hasOwnProperty(ne)&&(u=s[ne],u!==void 0&&Ih(n,a,ne,u,s,void 0));return}}for(N in s)s.hasOwnProperty(N)&&(u=s[N],u!=null&&ht(n,a,N,u,s,null))}function sk(n,a,s,u){switch(a){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,j=null,Y=null,ne=null;for(W in s){var re=s[W];if(s.hasOwnProperty(W)&&re!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":j=re;default:u.hasOwnProperty(W)||ht(n,a,W,null,u,re)}}for(var Q in u){var W=u[Q];if(re=s[Q],u.hasOwnProperty(Q)&&(W!=null||re!=null))switch(Q){case"type":b=W;break;case"name":p=W;break;case"checked":Y=W;break;case"defaultChecked":ne=W;break;case"value":E=W;break;case"defaultValue":N=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(137,a));break;default:W!==re&&ht(n,a,Q,W,u,re)}}Vl(n,E,N,j,Y,ne,b,p);return;case"select":W=E=N=Q=null;for(b in s)if(j=s[b],s.hasOwnProperty(b)&&j!=null)switch(b){case"value":break;case"multiple":W=j;default:u.hasOwnProperty(b)||ht(n,a,b,null,u,j)}for(p in u)if(b=u[p],j=s[p],u.hasOwnProperty(p)&&(b!=null||j!=null))switch(p){case"value":Q=b;break;case"defaultValue":N=b;break;case"multiple":E=b;default:b!==j&&ht(n,a,p,b,u,j)}a=N,s=E,u=W,Q!=null?an(n,!!s,Q,!1):!!u!=!!s&&(a!=null?an(n,!!s,a,!0):an(n,!!s,s?[]:"",!1));return;case"textarea":W=Q=null;for(N in s)if(p=s[N],s.hasOwnProperty(N)&&p!=null&&!u.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:ht(n,a,N,null,u,p)}for(E in u)if(p=u[E],b=s[E],u.hasOwnProperty(E)&&(p!=null||b!=null))switch(E){case"value":Q=p;break;case"defaultValue":W=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==b&&ht(n,a,E,p,u,b)}Oc(n,Q,W);return;case"option":for(var ye in s)if(Q=s[ye],s.hasOwnProperty(ye)&&Q!=null&&!u.hasOwnProperty(ye))switch(ye){case"selected":n.selected=!1;break;default:ht(n,a,ye,null,u,Q)}for(j in u)if(Q=u[j],W=s[j],u.hasOwnProperty(j)&&Q!==W&&(Q!=null||W!=null))switch(j){case"selected":n.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:ht(n,a,j,Q,u,W)}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 Ae in s)Q=s[Ae],s.hasOwnProperty(Ae)&&Q!=null&&!u.hasOwnProperty(Ae)&&ht(n,a,Ae,null,u,Q);for(Y in u)if(Q=u[Y],W=s[Y],u.hasOwnProperty(Y)&&Q!==W&&(Q!=null||W!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,a));break;default:ht(n,a,Y,Q,u,W)}return;default:if(La(a)){for(var pt in s)Q=s[pt],s.hasOwnProperty(pt)&&Q!==void 0&&!u.hasOwnProperty(pt)&&Ih(n,a,pt,void 0,u,Q);for(ne in u)Q=u[ne],W=s[ne],!u.hasOwnProperty(ne)||Q===W||Q===void 0&&W===void 0||Ih(n,a,ne,Q,u,W);return}}for(var q in s)Q=s[q],s.hasOwnProperty(q)&&Q!=null&&!u.hasOwnProperty(q)&&ht(n,a,q,null,u,Q);for(re in u)Q=u[re],W=s[re],!u.hasOwnProperty(re)||Q===W||Q==null&&W==null||ht(n,a,re,Q,u,W)}function kx(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lk(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,s=performance.getEntriesByType("resource"),u=0;u<s.length;u++){var p=s[u],b=p.transferSize,E=p.initiatorType,N=p.duration;if(b&&N&&kx(E)){for(E=0,N=p.responseEnd,u+=1;u<s.length;u++){var j=s[u],Y=j.startTime;if(Y>N)break;var ne=j.transferSize,re=j.initiatorType;ne&&kx(re)&&(j=j.responseEnd,E+=ne*(j<N?1:(N-Y)/(j-Y)))}if(--u,a+=8*(b+E)/(p.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var zh=null,Bh=null;function Tu(n){return n.nodeType===9?n:n.ownerDocument}function Nx(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Tx(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function Uh(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Fh=null;function ok(){var n=window.event;return n&&n.type==="popstate"?n===Fh?!1:(Fh=n,!0):(Fh=null,!1)}var Cx=typeof setTimeout=="function"?setTimeout:void 0,ck=typeof clearTimeout=="function"?clearTimeout:void 0,Ax=typeof Promise=="function"?Promise:void 0,uk=typeof queueMicrotask=="function"?queueMicrotask:typeof Ax<"u"?function(n){return Ax.resolve(null).then(n).catch(fk)}:Cx;function fk(n){setTimeout(function(){throw n})}function Ja(n){return n==="head"}function Ox(n,a){var s=a,u=0;do{var p=s.nextSibling;if(n.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(u===0){n.removeChild(p),tl(a);return}u--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")u++;else if(s==="html")Do(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,Do(s);for(var b=s.firstChild;b;){var E=b.nextSibling,N=b.nodeName;b[Cr]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&b.rel.toLowerCase()==="stylesheet"||s.removeChild(b),b=E}}else s==="body"&&Do(n.ownerDocument.body);s=p}while(s);tl(a)}function Rx(n,a){var s=n;n=0;do{var u=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),u&&u.nodeType===8)if(s=u.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=u}while(s)}function Ph(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Ph(s),Yl(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function dk(n,a,s,u){for(;n.nodeType===1;){var p=s;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[Cr])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(b=n.getAttribute("rel"),b==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(b!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(b=n.getAttribute("src"),(b!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===b)return n}else return n;if(n=mi(n.nextSibling),n===null)break}return null}function hk(n,a,s){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=mi(n.nextSibling),n===null))return null;return n}function Mx(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=mi(n.nextSibling),n===null))return null;return n}function $h(n){return n.data==="$?"||n.data==="$~"}function qh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function pk(n,a){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||s.readyState!=="loading")a();else{var u=function(){a(),s.removeEventListener("DOMContentLoaded",u)};s.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function mi(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var Hh=null;function Dx(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(a===0)return mi(n.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}n=n.nextSibling}return null}function Lx(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return n;a--}else s!=="/$"&&s!=="/&"||a++}n=n.previousSibling}return null}function jx(n,a,s){switch(a=Tu(s),n){case"html":if(n=a.documentElement,!n)throw Error(r(452));return n;case"head":if(n=a.head,!n)throw Error(r(453));return n;case"body":if(n=a.body,!n)throw Error(r(454));return n;default:throw Error(r(451))}}function Do(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);Yl(n)}var gi=new Map,Ix=new Set;function Cu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ya=le.d;le.d={f:mk,r:gk,D:bk,C:yk,L:xk,m:vk,X:Sk,S:Ek,M:wk};function mk(){var n=ya.f(),a=xu();return n||a}function gk(n){var a=ea(n);a!==null&&a.tag===5&&a.type==="form"?Jb(a):ya.r(n)}var Ws=typeof document>"u"?null:document;function zx(n,a,s){var u=Ws;if(u&&typeof a=="string"&&a){var p=An(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),Ix.has(p)||(Ix.add(p),n={rel:n,crossOrigin:s,href:a},u.querySelector(p)===null&&(a=u.createElement("link"),on(a,"link",n),Ht(a),u.head.appendChild(a)))}}function bk(n){ya.D(n),zx("dns-prefetch",n,null)}function yk(n,a){ya.C(n,a),zx("preconnect",n,a)}function xk(n,a,s){ya.L(n,a,s);var u=Ws;if(u&&n&&a){var p='link[rel="preload"][as="'+An(a)+'"]';a==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+An(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+An(s.imageSizes)+'"]')):p+='[href="'+An(n)+'"]';var b=p;switch(a){case"style":b=Js(n);break;case"script":b=el(n)}gi.has(b)||(n=g({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:n,as:a},s),gi.set(b,n),u.querySelector(p)!==null||a==="style"&&u.querySelector(Lo(b))||a==="script"&&u.querySelector(jo(b))||(a=u.createElement("link"),on(a,"link",n),Ht(a),u.head.appendChild(a)))}}function vk(n,a){ya.m(n,a);var s=Ws;if(s&&n){var u=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+An(u)+'"][href="'+An(n)+'"]',b=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=el(n)}if(!gi.has(b)&&(n=g({rel:"modulepreload",href:n},a),gi.set(b,n),s.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(jo(b)))return}u=s.createElement("link"),on(u,"link",n),Ht(u),s.head.appendChild(u)}}}function Ek(n,a,s){ya.S(n,a,s);var u=Ws;if(u&&n){var p=Da(u).hoistableStyles,b=Js(n);a=a||"default";var E=p.get(b);if(!E){var N={loading:0,preload:null};if(E=u.querySelector(Lo(b)))N.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":a},s),(s=gi.get(b))&&Kh(n,s);var j=E=u.createElement("link");Ht(j),on(j,"link",n),j._p=new Promise(function(Y,ne){j.onload=Y,j.onerror=ne}),j.addEventListener("load",function(){N.loading|=1}),j.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Au(E,a,u)}E={type:"stylesheet",instance:E,count:1,state:N},p.set(b,E)}}}function Sk(n,a){ya.X(n,a);var s=Ws;if(s&&n){var u=Da(s).hoistableScripts,p=el(n),b=u.get(p);b||(b=s.querySelector(jo(p)),b||(n=g({src:n,async:!0},a),(a=gi.get(p))&&Gh(n,a),b=s.createElement("script"),Ht(b),on(b,"link",n),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function wk(n,a){ya.M(n,a);var s=Ws;if(s&&n){var u=Da(s).hoistableScripts,p=el(n),b=u.get(p);b||(b=s.querySelector(jo(p)),b||(n=g({src:n,async:!0,type:"module"},a),(a=gi.get(p))&&Gh(n,a),b=s.createElement("script"),Ht(b),on(b,"link",n),s.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},u.set(p,b))}}function Bx(n,a,s,u){var p=(p=ve.current)?Cu(p):null;if(!p)throw Error(r(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=Js(s.href),s=Da(p).hoistableStyles,u=s.get(a),u||(u={type:"style",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=Js(s.href);var b=Da(p).hoistableStyles,E=b.get(n);if(E||(p=p.ownerDocument||p,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(n,E),(b=p.querySelector(Lo(n)))&&!b._p&&(E.instance=b,E.state.loading=5),gi.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},gi.set(n,s),b||_k(p,n,s,E.state))),a&&u===null)throw Error(r(528,""));return E}if(a&&u!==null)throw Error(r(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=el(s),s=Da(p).hoistableScripts,u=s.get(a),u||(u={type:"script",instance:null,count:0,state:null},s.set(a,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,n))}}function Js(n){return'href="'+An(n)+'"'}function Lo(n){return'link[rel="stylesheet"]['+n+"]"}function Ux(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function _k(n,a,s,u){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?u.loading=1:(a=n.createElement("link"),u.preload=a,a.addEventListener("load",function(){return u.loading|=1}),a.addEventListener("error",function(){return u.loading|=2}),on(a,"link",s),Ht(a),n.head.appendChild(a))}function el(n){return'[src="'+An(n)+'"]'}function jo(n){return"script[async]"+n}function Fx(n,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var u=n.querySelector('style[data-href~="'+An(s.href)+'"]');if(u)return a.instance=u,Ht(u),u;var p=g({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),Ht(u),on(u,"style",p),Au(u,s.precedence,n),a.instance=u;case"stylesheet":p=Js(s.href);var b=n.querySelector(Lo(p));if(b)return a.state.loading|=4,a.instance=b,Ht(b),b;u=Ux(s),(p=gi.get(p))&&Kh(u,p),b=(n.ownerDocument||n).createElement("link"),Ht(b);var E=b;return E._p=new Promise(function(N,j){E.onload=N,E.onerror=j}),on(b,"link",u),a.state.loading|=4,Au(b,s.precedence,n),a.instance=b;case"script":return b=el(s.src),(p=n.querySelector(jo(b)))?(a.instance=p,Ht(p),p):(u=s,(p=gi.get(b))&&(u=g({},s),Gh(u,p)),n=n.ownerDocument||n,p=n.createElement("script"),Ht(p),on(p,"link",u),n.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(u=a.instance,a.state.loading|=4,Au(u,s.precedence,n));return a.instance}function Au(n,a,s){for(var u=s.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===a)b=N;else if(b!==p)break}b?b.parentNode.insertBefore(n,b.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(n,a.firstChild))}function Kh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function Gh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var Ou=null;function Px(n,a,s){if(Ou===null){var u=new Map,p=Ou=new Map;p.set(s,u)}else p=Ou,u=p.get(s),u||(u=new Map,p.set(s,u));if(u.has(n))return u;for(u.set(n,null),s=s.getElementsByTagName(n),p=0;p<s.length;p++){var b=s[p];if(!(b[Cr]||b[Ut]||n==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var E=b.getAttribute(a)||"";E=n+E;var N=u.get(E);N?N.push(b):u.set(E,[b])}}return u}function $x(n,a,s){n=n.ownerDocument||n,n.head.insertBefore(s,a==="title"?n.querySelector("head > title"):null)}function kk(n,a,s){if(s===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return n=a.disabled,typeof a.precedence=="string"&&n==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function qx(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function Nk(n,a,s,u){if(s.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=Js(u.href),b=a.querySelector(Lo(p));if(b){a=b._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=Ru.bind(n),a.then(n,n)),s.state.loading|=4,s.instance=b,Ht(b);return}b=a.ownerDocument||a,u=Ux(u),(p=gi.get(p))&&Kh(u,p),b=b.createElement("link"),Ht(b);var E=b;E._p=new Promise(function(N,j){E.onload=N,E.onerror=j}),on(b,"link",u),s.instance=b}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=Ru.bind(n),a.addEventListener("load",s),a.addEventListener("error",s))}}var Yh=0;function Tk(n,a){return n.stylesheets&&n.count===0&&Du(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var u=setTimeout(function(){if(n.stylesheets&&Du(n,n.stylesheets),n.unsuspend){var b=n.unsuspend;n.unsuspend=null,b()}},6e4+a);0<n.imgBytes&&Yh===0&&(Yh=62500*lk());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Du(n,n.stylesheets),n.unsuspend)){var b=n.unsuspend;n.unsuspend=null,b()}},(n.imgBytes>Yh?50:800)+a);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Ru(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Du(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Mu=null;function Du(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Mu=new Map,a.forEach(Ck,n),Mu=null,Ru.call(n))}function Ck(n,a){if(!(a.state.loading&4)){var s=Mu.get(n);if(s)var u=s.get(null);else{s=new Map,Mu.set(n,s);for(var p=n.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")&&(s.set(E.dataset.precedence,E),u=E)}u&&s.set(null,u)}p=a.instance,E=p.getAttribute("data-precedence"),b=s.get(E)||u,b===u&&s.set(null,p),s.set(E,p),this.count++,u=Ru.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),b?b.parentNode.insertBefore(p,b.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}var Io={$$typeof:A,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function Ak(n,a,s,u,p,b,E,N,j){this.tag=1,this.containerInfo=n,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=j,this.incompleteTransitions=new Map}function Hx(n,a,s,u,p,b,E,N,j,Y,ne,re){return n=new Ak(n,a,s,E,j,Y,ne,re,N),a=1,b===!0&&(a|=24),b=Yn(3,null,null,a),n.current=b,b.stateNode=n,a=Nd(),a.refCount++,n.pooledCache=a,a.refCount++,b.memoizedState={element:u,isDehydrated:s,cache:a},Od(b),n}function Kx(n){return n?(n=Rs,n):Rs}function Gx(n,a,s,u,p,b){p=Kx(p),u.context===null?u.context=p:u.pendingContext=p,u=$a(a),u.payload={element:s},b=b===void 0?null:b,b!==null&&(u.callback=b),s=qa(n,u,a),s!==null&&(jn(s,n,a),po(s,n,a))}function Yx(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<a?s:a}}function Qh(n,a){Yx(n,a),(n=n.alternate)&&Yx(n,a)}function Qx(n){if(n.tag===13||n.tag===31){var a=Lr(n,67108864);a!==null&&jn(a,n,67108864),Qh(n,67108864)}}function Vx(n){if(n.tag===13||n.tag===31){var a=Wn();a=Nt(a);var s=Lr(n,a);s!==null&&jn(s,n,a),Qh(n,a)}}var Lu=!0;function Ok(n,a,s,u){var p=H.T;H.T=null;var b=le.p;try{le.p=2,Vh(n,a,s,u)}finally{le.p=b,H.T=p}}function Rk(n,a,s,u){var p=H.T;H.T=null;var b=le.p;try{le.p=8,Vh(n,a,s,u)}finally{le.p=b,H.T=p}}function Vh(n,a,s,u){if(Lu){var p=Xh(u);if(p===null)jh(n,a,u,ju,s),Zx(n,u);else if(Dk(p,n,a,s,u))u.stopPropagation();else if(Zx(n,u),a&4&&-1<Mk.indexOf(n)){for(;p!==null;){var b=ea(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var E=Tn(b.pendingLanes);if(E!==0){var N=b;for(N.pendingLanes|=2,N.entangledLanes|=2;E;){var j=1<<31-lt(E);N.entanglements[1]|=j,E&=~j}$i(b),(at&6)===0&&(bu=Ot()+500,Oo(0))}}break;case 31:case 13:N=Lr(b,2),N!==null&&jn(N,b,2),xu(),Qh(b,2)}if(b=Xh(u),b===null&&jh(n,a,u,ju,s),b===p)break;p=b}p!==null&&u.stopPropagation()}else jh(n,a,u,null,s)}}function Xh(n){return n=Ie(n),Zh(n)}var ju=null;function Zh(n){if(ju=null,n=vn(n),n!==null){var a=o(n);if(a===null)n=null;else{var s=a.tag;if(s===13){if(n=c(a),n!==null)return n;n=null}else if(s===31){if(n=f(a),n!==null)return n;n=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return ju=n,null}function Xx(n){switch(n){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 te:return 2;case fe:return 8;case Ce:case $e:return 32;case et:return 268435456;default:return 32}default:return 32}}var Wh=!1,er=null,tr=null,nr=null,zo=new Map,Bo=new Map,ir=[],Mk="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 Zx(n,a){switch(n){case"focusin":case"focusout":er=null;break;case"dragenter":case"dragleave":tr=null;break;case"mouseover":case"mouseout":nr=null;break;case"pointerover":case"pointerout":zo.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bo.delete(a.pointerId)}}function Uo(n,a,s,u,p,b){return n===null||n.nativeEvent!==b?(n={blockedOn:a,domEventName:s,eventSystemFlags:u,nativeEvent:b,targetContainers:[p]},a!==null&&(a=ea(a),a!==null&&Qx(a)),n):(n.eventSystemFlags|=u,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}function Dk(n,a,s,u,p){switch(a){case"focusin":return er=Uo(er,n,a,s,u,p),!0;case"dragenter":return tr=Uo(tr,n,a,s,u,p),!0;case"mouseover":return nr=Uo(nr,n,a,s,u,p),!0;case"pointerover":var b=p.pointerId;return zo.set(b,Uo(zo.get(b)||null,n,a,s,u,p)),!0;case"gotpointercapture":return b=p.pointerId,Bo.set(b,Uo(Bo.get(b)||null,n,a,s,u,p)),!0}return!1}function Wx(n){var a=vn(n.target);if(a!==null){var s=o(a);if(s!==null){if(a=s.tag,a===13){if(a=c(s),a!==null){n.blockedOn=a,Es(n.priority,function(){Vx(s)});return}}else if(a===31){if(a=f(s),a!==null){n.blockedOn=a,Es(n.priority,function(){Vx(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Iu(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var s=Xh(n.nativeEvent);if(s===null){s=n.nativeEvent;var u=new s.constructor(s.type,s);Ee=u,s.target.dispatchEvent(u),Ee=null}else return a=ea(s),a!==null&&Qx(a),n.blockedOn=s,!1;a.shift()}return!0}function Jx(n,a,s){Iu(n)&&s.delete(a)}function Lk(){Wh=!1,er!==null&&Iu(er)&&(er=null),tr!==null&&Iu(tr)&&(tr=null),nr!==null&&Iu(nr)&&(nr=null),zo.forEach(Jx),Bo.forEach(Jx)}function zu(n,a){n.blockedOn===a&&(n.blockedOn=null,Wh||(Wh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Lk)))}var Bu=null;function ev(n){Bu!==n&&(Bu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Bu===n&&(Bu=null);for(var a=0;a<n.length;a+=3){var s=n[a],u=n[a+1],p=n[a+2];if(typeof u!="function"){if(Zh(u||s)===null)continue;break}var b=ea(s);b!==null&&(n.splice(a,3),a-=3,Xd(b,{pending:!0,data:p,method:s.method,action:u},u,p))}}))}function tl(n){function a(j){return zu(j,n)}er!==null&&zu(er,n),tr!==null&&zu(tr,n),nr!==null&&zu(nr,n),zo.forEach(a),Bo.forEach(a);for(var s=0;s<ir.length;s++){var u=ir[s];u.blockedOn===n&&(u.blockedOn=null)}for(;0<ir.length&&(s=ir[0],s.blockedOn===null);)Wx(s),s.blockedOn===null&&ir.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(u=0;u<s.length;u+=3){var p=s[u],b=s[u+1],E=p[fn]||null;if(typeof b=="function")E||ev(s);else if(E){var N=null;if(b&&b.hasAttribute("formAction")){if(p=b,E=b[fn]||null)N=E.formAction;else if(Zh(p)!==null)continue}else N=E.action;typeof N=="function"?s[u+1]=N:(s.splice(u,3),u-=3),ev(s)}}}function tv(){function n(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(E){return p=E})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),u||setTimeout(s,20)}function s(){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",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function Jh(n){this._internalRoot=n}Uu.prototype.render=Jh.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(r(409));var s=a.current,u=Wn();Gx(s,u,n,a,null,null)},Uu.prototype.unmount=Jh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;Gx(n.current,2,null,n,null,null),xu(),a[Ra]=null}};function Uu(n){this._internalRoot=n}Uu.prototype.unstable_scheduleHydration=function(n){if(n){var a=vs();n={blockedOn:null,target:n,priority:a};for(var s=0;s<ir.length&&a!==0&&a<ir[s].priority;s++);ir.splice(s,0,n),s===0&&Wx(n)}};var nv=t.version;if(nv!=="19.2.5")throw Error(r(527,nv,"19.2.5"));le.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=h(a),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var jk={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fu.isDisabled&&Fu.supportsFiber)try{nn=Fu.inject(jk),Lt=Fu}catch{}}return Po.createRoot=function(n,a){if(!l(n))throw Error(r(299));var s=!1,u="",p=cy,b=uy,E=fy;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError)),a=Hx(n,1,!1,null,null,s,u,null,p,b,E,tv),n[Ra]=a.current,Lh(n),new Jh(a)},Po.hydrateRoot=function(n,a,s){if(!l(n))throw Error(r(299));var u=!1,p="",b=cy,E=uy,N=fy,j=null;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(b=s.onUncaughtError),s.onCaughtError!==void 0&&(E=s.onCaughtError),s.onRecoverableError!==void 0&&(N=s.onRecoverableError),s.formState!==void 0&&(j=s.formState)),a=Hx(n,1,!0,a,s??null,u,p,j,b,E,N,tv),a.context=Kx(null),s=a.current,u=Wn(),u=Nt(u),p=$a(u),p.callback=null,qa(s,p,u),s=u,a.current.lanes=s,gt(a,s),$i(a),n[Ra]=a.current,Lh(n),new Uu(a)},Po.version="19.2.5",Po}var pv;function Yk(){if(pv)return ip.exports;pv=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(),ip.exports=Gk(),ip.exports}var Qk=Yk(),Rl=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,cr,gl,Z0,Vk=(Z0=class extends Rl{constructor(){super();_e(this,es);_e(this,cr);_e(this,gl);ge(this,gl,t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){B(this,cr)||this.setEventListener(B(this,gl))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,cr))==null||t.call(this),ge(this,cr,void 0))}setEventListener(t){var i;ge(this,gl,t),(i=B(this,cr))==null||i.call(this),ge(this,cr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){B(this,es)!==t&&(ge(this,es,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(i=>{i(t)})}isFocused(){var t;return typeof B(this,es)=="boolean"?B(this,es):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},es=new WeakMap,cr=new WeakMap,gl=new WeakMap,Z0),_m=new Vk,Xk={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ur,Em,W0,Zk=(W0=class{constructor(){_e(this,ur,Xk);_e(this,Em,!1)}setTimeoutProvider(e){ge(this,ur,e)}setTimeout(e,t){return B(this,ur).setTimeout(e,t)}clearTimeout(e){B(this,ur).clearTimeout(e)}setInterval(e,t){return B(this,ur).setInterval(e,t)}clearInterval(e){B(this,ur).clearInterval(e)}},ur=new WeakMap,Em=new WeakMap,W0),Xr=new Zk;function Wk(e){setTimeout(e,0)}var Jk=typeof window>"u"||"Deno"in globalThis;function _n(){}function eN(e,t){return typeof e=="function"?e(t):e}function Up(e){return typeof e=="number"&&e>=0&&e!==1/0}function oE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function yr(e,t){return typeof e=="function"?e(t):e}function yi(e,t){return typeof e=="function"?e(t):e}function mv(e,t){const{type:i="all",exact:r,fetchStatus:l,predicate:o,queryKey:c,stale:f}=e;if(c){if(r){if(t.queryHash!==km(c,t.options))return!1}else if(!tc(t.queryKey,c))return!1}if(i!=="all"){const d=t.isActive();if(i==="active"&&!d||i==="inactive"&&d)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||l&&l!==t.state.fetchStatus||o&&!o(t))}function gv(e,t){const{exact:i,status:r,predicate:l,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(i){if(cs(t.options.mutationKey)!==cs(o))return!1}else if(!tc(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||l&&!l(t))}function km(e,t){return((t==null?void 0:t.queryKeyHashFn)||cs)(e)}function cs(e){return JSON.stringify(e,(t,i)=>Fp(i)?Object.keys(i).sort().reduce((r,l)=>(r[l]=i[l],r),{}):i)}function tc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(i=>tc(e[i],t[i])):!1}var tN=Object.prototype.hasOwnProperty;function cE(e,t,i=0){if(e===t)return e;if(i>500)return t;const r=bv(e)&&bv(t);if(!r&&!(Fp(e)&&Fp(t)))return t;const o=(r?e:Object.keys(e)).length,c=r?t:Object.keys(t),f=c.length,d=r?new Array(f):{};let h=0;for(let y=0;y<f;y++){const g=r?y:c[y],v=e[g],x=t[g];if(v===x){d[g]=v,(r?y<o:tN.call(e,g))&&h++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){d[g]=x;continue}const S=cE(v,x,i+1);d[g]=S,S===v&&h++}return o===f&&h===o?e:d}function pf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(e[i]!==t[i])return!1;return!0}function bv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Fp(e){if(!yv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const i=t.prototype;return!(!yv(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function yv(e){return Object.prototype.toString.call(e)==="[object Object]"}function nN(e){return new Promise(t=>{Xr.setTimeout(t,e)})}function Pp(e,t,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,t):i.structuralSharing!==!1?cE(e,t):t}function iN(e,t,i=0){const r=[...e,t];return i&&r.length>i?r.slice(1):r}function aN(e,t,i=0){const r=[t,...e];return i&&r.length>i?r.slice(0,-1):r}var Nm=Symbol();function uE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Nm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Tm(e,t){return typeof e=="function"?e(...t):!!e}function rN(e,t,i){let r=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??(l=t()),r||(r=!0,l.aborted?i():l.addEventListener("abort",i,{once:!0})),l)}),e}var nc=(()=>{let e=()=>Jk;return{isServer(){return e()},setIsServer(t){e=t}}})();function $p(){let e,t;const i=new Promise((l,o)=>{e=l,t=o});i.status="pending",i.catch(()=>{});function r(l){Object.assign(i,l),delete i.resolve,delete i.reject}return i.resolve=l=>{r({status:"fulfilled",value:l}),e(l)},i.reject=l=>{r({status:"rejected",reason:l}),t(l)},i}var sN=Wk;function lN(){let e=[],t=0,i=f=>{f()},r=f=>{f()},l=sN;const o=f=>{t?e.push(f):l(()=>{i(f)})},c=()=>{const f=e;e=[],f.length&&l(()=>{r(()=>{f.forEach(d=>{i(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=>{i=f},setBatchNotifyFunction:f=>{r=f},setScheduler:f=>{l=f}}}var Jt=lN(),bl,fr,yl,J0,oN=(J0=class extends Rl{constructor(){super();_e(this,bl,!0);_e(this,fr);_e(this,yl);ge(this,yl,t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){B(this,fr)||this.setEventListener(B(this,yl))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,fr))==null||t.call(this),ge(this,fr,void 0))}setEventListener(t){var i;ge(this,yl,t),(i=B(this,fr))==null||i.call(this),ge(this,fr,t(this.setOnline.bind(this)))}setOnline(t){B(this,bl)!==t&&(ge(this,bl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return B(this,bl)}},bl=new WeakMap,fr=new WeakMap,yl=new WeakMap,J0),mf=new oN;function cN(e){return Math.min(1e3*2**e,3e4)}function fE(e){return(e??"online")==="online"?mf.isOnline():!0}var qp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function dE(e){let t=!1,i=0,r;const l=$p(),o=()=>l.status!=="pending",c=w=>{var k;if(!o()){const _=new qp(w);v(_),(k=e.onCancel)==null||k.call(e,_)}},f=()=>{t=!0},d=()=>{t=!1},h=()=>_m.isFocused()&&(e.networkMode==="always"||mf.isOnline())&&e.canRun(),y=()=>fE(e.networkMode)&&e.canRun(),g=w=>{o()||(r==null||r(),l.resolve(w))},v=w=>{o()||(r==null||r(),l.reject(w))},x=()=>new Promise(w=>{var k;r=_=>{(o()||h())&&w(_)},(k=e.onPause)==null||k.call(e)}).then(()=>{var w;r=void 0,o()||(w=e.onContinue)==null||w.call(e)}),S=()=>{if(o())return;let w;const k=i===0?e.initialPromise:void 0;try{w=k??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(g).catch(_=>{var T;if(o())return;const R=e.retry??(nc.isServer()?0:3),A=e.retryDelay??cN,I=typeof A=="function"?A(i,_):A,$=R===!0||typeof R=="number"&&i<R||typeof R=="function"&&R(i,_);if(t||!$){v(_);return}i++,(T=e.onFail)==null||T.call(e,i,_),nN(I).then(()=>h()?void 0:x()).then(()=>{t?v(_):S()})})};return{promise:l,status:()=>l.status,cancel:c,continue:()=>(r==null||r(),l),cancelRetry:f,continueRetry:d,canStart:y,start:()=>(y()?S():x().then(S),l)}}var ts,eE,hE=(eE=class{constructor(){_e(this,ts)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Up(this.gcTime)&&ge(this,ts,Xr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(nc.isServer()?1/0:300*1e3))}clearGcTimeout(){B(this,ts)!==void 0&&(Xr.clearTimeout(B(this,ts)),ge(this,ts,void 0))}},ts=new WeakMap,eE),ns,xl,bi,is,tn,cc,as,ei,pE,xa,tE,uN=(tE=class extends hE{constructor(t){super();_e(this,ei);_e(this,ns);_e(this,xl);_e(this,bi);_e(this,is);_e(this,tn);_e(this,cc);_e(this,as);ge(this,as,!1),ge(this,cc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,is,t.client),ge(this,bi,B(this,is).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,ns,vv(this.options)),this.state=t.state??B(this,ns),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=B(this,tn))==null?void 0:t.promise}setOptions(t){if(this.options={...B(this,cc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=vv(this.options);i.data!==void 0&&(this.setState(xv(i.data,i.dataUpdatedAt)),ge(this,ns,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&B(this,bi).remove(this)}setData(t,i){const r=Pp(this.state.data,t,this.options);return Ue(this,ei,xa).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(t,i){Ue(this,ei,xa).call(this,{type:"setState",state:t,setStateOptions:i})}cancel(t){var r,l;const i=(r=B(this,tn))==null?void 0:r.promise;return(l=B(this,tn))==null||l.cancel(t),i?i.then(_n).catch(_n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return B(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===Nm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>yr(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:!oE(this.state.dataUpdatedAt,t)}onFocus(){var i;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(i=B(this,tn))==null||i.continue()}onOnline(){var i;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(i=B(this,tn))==null||i.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),B(this,bi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(i=>i!==t),this.observers.length||(B(this,tn)&&(B(this,as)||Ue(this,ei,pE).call(this)?B(this,tn).cancel({revert:!0}):B(this,tn).cancelRetry()),this.scheduleGc()),B(this,bi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ue(this,ei,xa).call(this,{type:"invalidate"})}async fetch(t,i){var d,h,y,g,v,x,S,w,k,_,R,A;if(this.state.fetchStatus!=="idle"&&((d=B(this,tn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(B(this,tn))return B(this,tn).continueRetry(),B(this,tn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const I=this.observers.find($=>$.options.queryFn);I&&this.setOptions(I.options)}const r=new AbortController,l=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(ge(this,as,!0),r.signal)})},o=()=>{const I=uE(this.options,i),T=(()=>{const P={client:B(this,is),queryKey:this.queryKey,meta:this.meta};return l(P),P})();return ge(this,as,!1),this.options.persister?this.options.persister(I,T,this):I(T)},f=(()=>{const I={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:B(this,is),state:this.state,fetchFn:o};return l(I),I})();(h=this.options.behavior)==null||h.onFetch(f,this),ge(this,xl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=f.fetchOptions)==null?void 0:y.meta))&&Ue(this,ei,xa).call(this,{type:"fetch",meta:(g=f.fetchOptions)==null?void 0:g.meta}),ge(this,tn,dE({initialPromise:i==null?void 0:i.initialPromise,fn:f.fetchFn,onCancel:I=>{I instanceof qp&&I.revert&&this.setState({...B(this,xl),fetchStatus:"idle"}),r.abort()},onFail:(I,$)=>{Ue(this,ei,xa).call(this,{type:"failed",failureCount:I,error:$})},onPause:()=>{Ue(this,ei,xa).call(this,{type:"pause"})},onContinue:()=>{Ue(this,ei,xa).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const I=await B(this,tn).start();if(I===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(I),(x=(v=B(this,bi).config).onSuccess)==null||x.call(v,I,this),(w=(S=B(this,bi).config).onSettled)==null||w.call(S,I,this.state.error,this),I}catch(I){if(I instanceof qp){if(I.silent)return B(this,tn).promise;if(I.revert){if(this.state.data===void 0)throw I;return this.state.data}}throw Ue(this,ei,xa).call(this,{type:"error",error:I}),(_=(k=B(this,bi).config).onError)==null||_.call(k,I,this),(A=(R=B(this,bi).config).onSettled)==null||A.call(R,this.state.data,I,this),I}finally{this.scheduleGc()}}},ns=new WeakMap,xl=new WeakMap,bi=new WeakMap,is=new WeakMap,tn=new WeakMap,cc=new WeakMap,as=new WeakMap,ei=new WeakSet,pE=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},xa=function(t){const i=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...mE(r.data,this.options),fetchMeta:t.meta??null};case"success":const l={...r,...xv(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ge(this,xl,t.manual?l:void 0),l;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=i(this.state),Jt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),B(this,bi).notify({query:this,type:"updated",action:t})})},tE);function mE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function xv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function vv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,i=t!==void 0,r=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Bn,We,uc,Sn,rs,vl,va,dr,fc,El,Sl,ss,ls,hr,wl,rt,Vo,Hp,Kp,Gp,Yp,Qp,Vp,Xp,gE,nE,fN=(nE=class extends Rl{constructor(t,i){super();_e(this,rt);_e(this,Bn);_e(this,We);_e(this,uc);_e(this,Sn);_e(this,rs);_e(this,vl);_e(this,va);_e(this,dr);_e(this,fc);_e(this,El);_e(this,Sl);_e(this,ss);_e(this,ls);_e(this,hr);_e(this,wl,new Set);this.options=i,ge(this,Bn,t),ge(this,dr,null),ge(this,va,$p()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(B(this,We).addObserver(this),Ev(B(this,We),this.options)?Ue(this,rt,Vo).call(this):this.updateResult(),Ue(this,rt,Yp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zp(B(this,We),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zp(B(this,We),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ue(this,rt,Qp).call(this),Ue(this,rt,Vp).call(this),B(this,We).removeObserver(this)}setOptions(t){const i=this.options,r=B(this,We);if(this.options=B(this,Bn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,B(this,We))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ue(this,rt,Xp).call(this),B(this,We).setOptions(this.options),i._defaulted&&!pf(this.options,i)&&B(this,Bn).getQueryCache().notify({type:"observerOptionsUpdated",query:B(this,We),observer:this});const l=this.hasListeners();l&&Sv(B(this,We),r,this.options,i)&&Ue(this,rt,Vo).call(this),this.updateResult(),l&&(B(this,We)!==r||yi(this.options.enabled,B(this,We))!==yi(i.enabled,B(this,We))||yr(this.options.staleTime,B(this,We))!==yr(i.staleTime,B(this,We)))&&Ue(this,rt,Hp).call(this);const o=Ue(this,rt,Kp).call(this);l&&(B(this,We)!==r||yi(this.options.enabled,B(this,We))!==yi(i.enabled,B(this,We))||o!==B(this,hr))&&Ue(this,rt,Gp).call(this,o)}getOptimisticResult(t){const i=B(this,Bn).getQueryCache().build(B(this,Bn),t),r=this.createResult(i,t);return hN(this,r)&&(ge(this,Sn,r),ge(this,vl,this.options),ge(this,rs,B(this,We).state)),r}getCurrentResult(){return B(this,Sn)}trackResult(t,i){return new Proxy(t,{get:(r,l)=>(this.trackProp(l),i==null||i(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&B(this,va).status==="pending"&&B(this,va).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,l))})}trackProp(t){B(this,wl).add(t)}getCurrentQuery(){return B(this,We)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const i=B(this,Bn).defaultQueryOptions(t),r=B(this,Bn).getQueryCache().build(B(this,Bn),i);return r.fetch().then(()=>this.createResult(r,i))}fetch(t){return Ue(this,rt,Vo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),B(this,Sn)))}createResult(t,i){var Z;const r=B(this,We),l=this.options,o=B(this,Sn),c=B(this,rs),f=B(this,vl),h=t!==r?t.state:B(this,uc),{state:y}=t;let g={...y},v=!1,x;if(i._optimisticResults){const L=this.hasListeners(),K=!L&&Ev(t,i),X=L&&Sv(t,r,i,l);(K||X)&&(g={...g,...mE(y.data,t.options)}),i._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:S,errorUpdatedAt:w,status:k}=g;x=g.data;let _=!1;if(i.placeholderData!==void 0&&x===void 0&&k==="pending"){let L;o!=null&&o.isPlaceholderData&&i.placeholderData===(f==null?void 0:f.placeholderData)?(L=o.data,_=!0):L=typeof i.placeholderData=="function"?i.placeholderData((Z=B(this,Sl))==null?void 0:Z.state.data,B(this,Sl)):i.placeholderData,L!==void 0&&(k="success",x=Pp(o==null?void 0:o.data,L,i),v=!0)}if(i.select&&x!==void 0&&!_)if(o&&x===(c==null?void 0:c.data)&&i.select===B(this,fc))x=B(this,El);else try{ge(this,fc,i.select),x=i.select(x),x=Pp(o==null?void 0:o.data,x,i),ge(this,El,x),ge(this,dr,null)}catch(L){ge(this,dr,L)}B(this,dr)&&(S=B(this,dr),x=B(this,El),w=Date.now(),k="error");const R=g.fetchStatus==="fetching",A=k==="pending",I=k==="error",$=A&&R,T=x!==void 0,z={status:k,fetchStatus:g.fetchStatus,isPending:A,isSuccess:k==="success",isError:I,isInitialLoading:$,isLoading:$,data:x,dataUpdatedAt:g.dataUpdatedAt,error:S,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:R,isRefetching:R&&!A,isLoadingError:I&&!T,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:I&&T,isStale:Cm(t,i),refetch:this.refetch,promise:B(this,va),isEnabled:yi(i.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=z.data!==void 0,K=z.status==="error"&&!L,X=ee=>{K?ee.reject(z.error):L&&ee.resolve(z.data)},oe=()=>{const ee=ge(this,va,z.promise=$p());X(ee)},se=B(this,va);switch(se.status){case"pending":t.queryHash===r.queryHash&&X(se);break;case"fulfilled":(K||z.data!==se.value)&&oe();break;case"rejected":(!K||z.error!==se.reason)&&oe();break}}return z}updateResult(){const t=B(this,Sn),i=this.createResult(B(this,We),this.options);if(ge(this,rs,B(this,We).state),ge(this,vl,this.options),B(this,rs).data!==void 0&&ge(this,Sl,B(this,We)),pf(i,t))return;ge(this,Sn,i);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,o=typeof l=="function"?l():l;if(o==="all"||!o&&!B(this,wl).size)return!0;const c=new Set(o??B(this,wl));return this.options.throwOnError&&c.add("error"),Object.keys(B(this,Sn)).some(f=>{const d=f;return B(this,Sn)[d]!==t[d]&&c.has(d)})};Ue(this,rt,gE).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ue(this,rt,Yp).call(this)}},Bn=new WeakMap,We=new WeakMap,uc=new WeakMap,Sn=new WeakMap,rs=new WeakMap,vl=new WeakMap,va=new WeakMap,dr=new WeakMap,fc=new WeakMap,El=new WeakMap,Sl=new WeakMap,ss=new WeakMap,ls=new WeakMap,hr=new WeakMap,wl=new WeakMap,rt=new WeakSet,Vo=function(t){Ue(this,rt,Xp).call(this);let i=B(this,We).fetch(this.options,t);return t!=null&&t.throwOnError||(i=i.catch(_n)),i},Hp=function(){Ue(this,rt,Qp).call(this);const t=yr(this.options.staleTime,B(this,We));if(nc.isServer()||B(this,Sn).isStale||!Up(t))return;const r=oE(B(this,Sn).dataUpdatedAt,t)+1;ge(this,ss,Xr.setTimeout(()=>{B(this,Sn).isStale||this.updateResult()},r))},Kp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(B(this,We)):this.options.refetchInterval)??!1},Gp=function(t){Ue(this,rt,Vp).call(this),ge(this,hr,t),!(nc.isServer()||yi(this.options.enabled,B(this,We))===!1||!Up(B(this,hr))||B(this,hr)===0)&&ge(this,ls,Xr.setInterval(()=>{(this.options.refetchIntervalInBackground||_m.isFocused())&&Ue(this,rt,Vo).call(this)},B(this,hr)))},Yp=function(){Ue(this,rt,Hp).call(this),Ue(this,rt,Gp).call(this,Ue(this,rt,Kp).call(this))},Qp=function(){B(this,ss)!==void 0&&(Xr.clearTimeout(B(this,ss)),ge(this,ss,void 0))},Vp=function(){B(this,ls)!==void 0&&(Xr.clearInterval(B(this,ls)),ge(this,ls,void 0))},Xp=function(){const t=B(this,Bn).getQueryCache().build(B(this,Bn),this.options);if(t===B(this,We))return;const i=B(this,We);ge(this,We,t),ge(this,uc,t.state),this.hasListeners()&&(i==null||i.removeObserver(this),t.addObserver(this))},gE=function(t){Jt.batch(()=>{t.listeners&&this.listeners.forEach(i=>{i(B(this,Sn))}),B(this,Bn).getQueryCache().notify({query:B(this,We),type:"observerResultsUpdated"})})},nE);function dN(e,t){return yi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ev(e,t){return dN(e,t)||e.state.data!==void 0&&Zp(e,t,t.refetchOnMount)}function Zp(e,t,i){if(yi(t.enabled,e)!==!1&&yr(t.staleTime,e)!=="static"){const r=typeof i=="function"?i(e):i;return r==="always"||r!==!1&&Cm(e,t)}return!1}function Sv(e,t,i,r){return(e!==t||yi(r.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&Cm(e,i)}function Cm(e,t){return yi(t.enabled,e)!==!1&&e.isStaleByTime(yr(t.staleTime,e))}function hN(e,t){return!pf(e.getCurrentResult(),t)}function wv(e){return{onFetch:(t,i)=>{var y,g,v,x,S;const r=t.options,l=(v=(g=(y=t.fetchOptions)==null?void 0:y.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,o=((x=t.state.data)==null?void 0:x.pages)||[],c=((S=t.state.data)==null?void 0:S.pageParams)||[];let f={pages:[],pageParams:[]},d=0;const h=async()=>{let w=!1;const k=A=>{rN(A,()=>t.signal,()=>w=!0)},_=uE(t.options,t.fetchOptions),R=async(A,I,$)=>{if(w)return Promise.reject();if(I==null&&A.pages.length)return Promise.resolve(A);const P=(()=>{const K={client:t.client,queryKey:t.queryKey,pageParam:I,direction:$?"backward":"forward",meta:t.options.meta};return k(K),K})(),z=await _(P),{maxPages:Z}=t.options,L=$?aN:iN;return{pages:L(A.pages,z,Z),pageParams:L(A.pageParams,I,Z)}};if(l&&o.length){const A=l==="backward",I=A?pN:_v,$={pages:o,pageParams:c},T=I(r,$);f=await R($,T,A)}else{const A=e??o.length;do{const I=d===0?c[0]??r.initialPageParam:_v(r,f);if(d>0&&I==null)break;f=await R(f,I),d++}while(d<A)}return f};t.options.persister?t.fetchFn=()=>{var w,k;return(k=(w=t.options).persister)==null?void 0:k.call(w,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},i)}:t.fetchFn=h}}}function _v(e,{pages:t,pageParams:i}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,i[r],i):void 0}function pN(e,{pages:t,pageParams:i}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,i[0],i):void 0}var dc,Ki,pn,os,Gi,lr,iE,mN=(iE=class extends hE{constructor(t){super();_e(this,Gi);_e(this,dc);_e(this,Ki);_e(this,pn);_e(this,os);ge(this,dc,t.client),this.mutationId=t.mutationId,ge(this,pn,t.mutationCache),ge(this,Ki,[]),this.state=t.state||bE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){B(this,Ki).includes(t)||(B(this,Ki).push(t),this.clearGcTimeout(),B(this,pn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,Ki,B(this,Ki).filter(i=>i!==t)),this.scheduleGc(),B(this,pn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){B(this,Ki).length||(this.state.status==="pending"?this.scheduleGc():B(this,pn).remove(this))}continue(){var t;return((t=B(this,os))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,f,d,h,y,g,v,x,S,w,k,_,R,A,I,$,T,P;const i=()=>{Ue(this,Gi,lr).call(this,{type:"continue"})},r={client:B(this,dc),meta:this.options.meta,mutationKey:this.options.mutationKey};ge(this,os,dE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(z,Z)=>{Ue(this,Gi,lr).call(this,{type:"failed",failureCount:z,error:Z})},onPause:()=>{Ue(this,Gi,lr).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>B(this,pn).canRun(this)}));const l=this.state.status==="pending",o=!B(this,os).canStart();try{if(l)i();else{Ue(this,Gi,lr).call(this,{type:"pending",variables:t,isPaused:o}),B(this,pn).config.onMutate&&await B(this,pn).config.onMutate(t,this,r);const Z=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,t,r));Z!==this.state.context&&Ue(this,Gi,lr).call(this,{type:"pending",context:Z,variables:t,isPaused:o})}const z=await B(this,os).start();return await((h=(d=B(this,pn).config).onSuccess)==null?void 0:h.call(d,z,t,this.state.context,this,r)),await((g=(y=this.options).onSuccess)==null?void 0:g.call(y,z,t,this.state.context,r)),await((x=(v=B(this,pn).config).onSettled)==null?void 0:x.call(v,z,null,this.state.variables,this.state.context,this,r)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,z,null,t,this.state.context,r)),Ue(this,Gi,lr).call(this,{type:"success",data:z}),z}catch(z){try{await((_=(k=B(this,pn).config).onError)==null?void 0:_.call(k,z,t,this.state.context,this,r))}catch(Z){Promise.reject(Z)}try{await((A=(R=this.options).onError)==null?void 0:A.call(R,z,t,this.state.context,r))}catch(Z){Promise.reject(Z)}try{await(($=(I=B(this,pn).config).onSettled)==null?void 0:$.call(I,void 0,z,this.state.variables,this.state.context,this,r))}catch(Z){Promise.reject(Z)}try{await((P=(T=this.options).onSettled)==null?void 0:P.call(T,void 0,z,t,this.state.context,r))}catch(Z){Promise.reject(Z)}throw Ue(this,Gi,lr).call(this,{type:"error",error:z}),z}finally{B(this,pn).runNext(this)}}},dc=new WeakMap,Ki=new WeakMap,pn=new WeakMap,os=new WeakMap,Gi=new WeakSet,lr=function(t){const i=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Jt.batch(()=>{B(this,Ki).forEach(r=>{r.onMutationUpdate(t)}),B(this,pn).notify({mutation:this,type:"updated",action:t})})},iE);function bE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ea,Oi,hc,aE,gN=(aE=class extends Rl{constructor(t={}){super();_e(this,Ea);_e(this,Oi);_e(this,hc);this.config=t,ge(this,Ea,new Set),ge(this,Oi,new Map),ge(this,hc,0)}build(t,i,r){const l=new mN({client:t,mutationCache:this,mutationId:++Pu(this,hc)._,options:t.defaultMutationOptions(i),state:r});return this.add(l),l}add(t){B(this,Ea).add(t);const i=$u(t);if(typeof i=="string"){const r=B(this,Oi).get(i);r?r.push(t):B(this,Oi).set(i,[t])}this.notify({type:"added",mutation:t})}remove(t){if(B(this,Ea).delete(t)){const i=$u(t);if(typeof i=="string"){const r=B(this,Oi).get(i);if(r)if(r.length>1){const l=r.indexOf(t);l!==-1&&r.splice(l,1)}else r[0]===t&&B(this,Oi).delete(i)}}this.notify({type:"removed",mutation:t})}canRun(t){const i=$u(t);if(typeof i=="string"){const r=B(this,Oi).get(i),l=r==null?void 0:r.find(o=>o.state.status==="pending");return!l||l===t}else return!0}runNext(t){var r;const i=$u(t);if(typeof i=="string"){const l=(r=B(this,Oi).get(i))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Jt.batch(()=>{B(this,Ea).forEach(t=>{this.notify({type:"removed",mutation:t})}),B(this,Ea).clear(),B(this,Oi).clear()})}getAll(){return Array.from(B(this,Ea))}find(t){const i={exact:!0,...t};return this.getAll().find(r=>gv(i,r))}findAll(t={}){return this.getAll().filter(i=>gv(t,i))}notify(t){Jt.batch(()=>{this.listeners.forEach(i=>{i(t)})})}resumePausedMutations(){const t=this.getAll().filter(i=>i.state.isPaused);return Jt.batch(()=>Promise.all(t.map(i=>i.continue().catch(_n))))}},Ea=new WeakMap,Oi=new WeakMap,hc=new WeakMap,aE);function $u(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Sa,pr,Un,wa,Na,sf,Wp,rE,bN=(rE=class extends Rl{constructor(i,r){super();_e(this,Na);_e(this,Sa);_e(this,pr);_e(this,Un);_e(this,wa);ge(this,Sa,i),this.setOptions(r),this.bindMethods(),Ue(this,Na,sf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var l;const r=this.options;this.options=B(this,Sa).defaultMutationOptions(i),pf(this.options,r)||B(this,Sa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:B(this,Un),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&cs(r.mutationKey)!==cs(this.options.mutationKey)?this.reset():((l=B(this,Un))==null?void 0:l.state.status)==="pending"&&B(this,Un).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=B(this,Un))==null||i.removeObserver(this)}onMutationUpdate(i){Ue(this,Na,sf).call(this),Ue(this,Na,Wp).call(this,i)}getCurrentResult(){return B(this,pr)}reset(){var i;(i=B(this,Un))==null||i.removeObserver(this),ge(this,Un,void 0),Ue(this,Na,sf).call(this),Ue(this,Na,Wp).call(this)}mutate(i,r){var l;return ge(this,wa,r),(l=B(this,Un))==null||l.removeObserver(this),ge(this,Un,B(this,Sa).getMutationCache().build(B(this,Sa),this.options)),B(this,Un).addObserver(this),B(this,Un).execute(i)}},Sa=new WeakMap,pr=new WeakMap,Un=new WeakMap,wa=new WeakMap,Na=new WeakSet,sf=function(){var r;const i=((r=B(this,Un))==null?void 0:r.state)??bE();ge(this,pr,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Wp=function(i){Jt.batch(()=>{var r,l,o,c,f,d,h,y;if(B(this,wa)&&this.hasListeners()){const g=B(this,pr).variables,v=B(this,pr).context,x={client:B(this,Sa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(l=(r=B(this,wa)).onSuccess)==null||l.call(r,i.data,g,v,x)}catch(S){Promise.reject(S)}try{(c=(o=B(this,wa)).onSettled)==null||c.call(o,i.data,null,g,v,x)}catch(S){Promise.reject(S)}}else if((i==null?void 0:i.type)==="error"){try{(d=(f=B(this,wa)).onError)==null||d.call(f,i.error,g,v,x)}catch(S){Promise.reject(S)}try{(y=(h=B(this,wa)).onSettled)==null||y.call(h,void 0,i.error,g,v,x)}catch(S){Promise.reject(S)}}}this.listeners.forEach(g=>{g(B(this,pr))})})},rE),Yi,sE,yN=(sE=class extends Rl{constructor(t={}){super();_e(this,Yi);this.config=t,ge(this,Yi,new Map)}build(t,i,r){const l=i.queryKey,o=i.queryHash??km(l,i);let c=this.get(o);return c||(c=new uN({client:t,queryKey:l,queryHash:o,options:t.defaultQueryOptions(i),state:r,defaultOptions:t.getQueryDefaults(l)}),this.add(c)),c}add(t){B(this,Yi).has(t.queryHash)||(B(this,Yi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const i=B(this,Yi).get(t.queryHash);i&&(t.destroy(),i===t&&B(this,Yi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Jt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return B(this,Yi).get(t)}getAll(){return[...B(this,Yi).values()]}find(t){const i={exact:!0,...t};return this.getAll().find(r=>mv(i,r))}findAll(t={}){const i=this.getAll();return Object.keys(t).length>0?i.filter(r=>mv(t,r)):i}notify(t){Jt.batch(()=>{this.listeners.forEach(i=>{i(t)})})}onFocus(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Jt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yi=new WeakMap,sE),zt,mr,gr,_l,kl,br,Nl,Tl,lE,xN=(lE=class{constructor(e={}){_e(this,zt);_e(this,mr);_e(this,gr);_e(this,_l);_e(this,kl);_e(this,br);_e(this,Nl);_e(this,Tl);ge(this,zt,e.queryCache||new yN),ge(this,mr,e.mutationCache||new gN),ge(this,gr,e.defaultOptions||{}),ge(this,_l,new Map),ge(this,kl,new Map),ge(this,br,0)}mount(){Pu(this,br)._++,B(this,br)===1&&(ge(this,Nl,_m.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,zt).onFocus())})),ge(this,Tl,mf.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,zt).onOnline())})))}unmount(){var e,t;Pu(this,br)._--,B(this,br)===0&&((e=B(this,Nl))==null||e.call(this),ge(this,Nl,void 0),(t=B(this,Tl))==null||t.call(this),ge(this,Tl,void 0))}isFetching(e){return B(this,zt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return B(this,mr).findAll({...e,status:"pending"}).length}getQueryData(e){var i;const t=this.defaultQueryOptions({queryKey:e});return(i=B(this,zt).get(t.queryHash))==null?void 0:i.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),i=B(this,zt).build(this,t),r=i.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(yr(t.staleTime,i))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return B(this,zt).findAll(e).map(({queryKey:t,state:i})=>{const r=i.data;return[t,r]})}setQueryData(e,t,i){const r=this.defaultQueryOptions({queryKey:e}),l=B(this,zt).get(r.queryHash),o=l==null?void 0:l.state.data,c=eN(t,o);if(c!==void 0)return B(this,zt).build(this,r).setData(c,{...i,manual:!0})}setQueriesData(e,t,i){return Jt.batch(()=>B(this,zt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,i)]))}getQueryState(e){var i;const t=this.defaultQueryOptions({queryKey:e});return(i=B(this,zt).get(t.queryHash))==null?void 0:i.state}removeQueries(e){const t=B(this,zt);Jt.batch(()=>{t.findAll(e).forEach(i=>{t.remove(i)})})}resetQueries(e,t){const i=B(this,zt);return Jt.batch(()=>(i.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const i={revert:!0,...t},r=Jt.batch(()=>B(this,zt).findAll(e).map(l=>l.cancel(i)));return Promise.all(r).then(_n).catch(_n)}invalidateQueries(e,t={}){return Jt.batch(()=>(B(this,zt).findAll(e).forEach(i=>{i.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 i={...t,cancelRefetch:t.cancelRefetch??!0},r=Jt.batch(()=>B(this,zt).findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let o=l.fetch(void 0,i);return i.throwOnError||(o=o.catch(_n)),l.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(_n)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const i=B(this,zt).build(this,t);return i.isStaleByTime(yr(t.staleTime,i))?i.fetch(t):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_n).catch(_n)}fetchInfiniteQuery(e){return e.behavior=wv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_n).catch(_n)}ensureInfiniteQueryData(e){return e.behavior=wv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return mf.isOnline()?B(this,mr).resumePausedMutations():Promise.resolve()}getQueryCache(){return B(this,zt)}getMutationCache(){return B(this,mr)}getDefaultOptions(){return B(this,gr)}setDefaultOptions(e){ge(this,gr,e)}setQueryDefaults(e,t){B(this,_l).set(cs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...B(this,_l).values()],i={};return t.forEach(r=>{tc(e,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(e,t){B(this,kl).set(cs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...B(this,kl).values()],i={};return t.forEach(r=>{tc(e,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const t={...B(this,gr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=km(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===Nm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...B(this,gr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){B(this,zt).clear(),B(this,mr).clear()}},zt=new WeakMap,mr=new WeakMap,gr=new WeakMap,_l=new WeakMap,kl=new WeakMap,br=new WeakMap,Nl=new WeakMap,Tl=new WeakMap,lE),yE=M.createContext(void 0),ai=e=>{const t=M.useContext(yE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vN=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(yE.Provider,{value:e,children:t})),xE=M.createContext(!1),EN=()=>M.useContext(xE);xE.Provider;function SN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var wN=M.createContext(SN()),_N=()=>M.useContext(wN),kN=(e,t,i)=>{const r=i!=null&&i.state.error&&typeof e.throwOnError=="function"?Tm(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},NN=e=>{M.useEffect(()=>{e.clearReset()},[e])},TN=({result:e,errorResetBoundary:t,throwOnError:i,query:r,suspense:l})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(l&&e.data===void 0||Tm(i,[e.error,r])),CN=e=>{if(e.suspense){const i=l=>l==="static"?l:Math.max(l??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...l)=>i(r(...l)):i(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},AN=(e,t)=>e.isLoading&&e.isFetching&&!t,ON=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,kv=(e,t,i)=>t.fetchOptimistic(e).catch(()=>{i.clearReset()});function RN(e,t,i){var v,x,S,w;const r=EN(),l=_N(),o=ai(),c=o.defaultQueryOptions(e);(x=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||x.call(v,c);const f=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",CN(c),kN(c,l,f),NN(l);const d=!o.getQueryCache().get(c.queryHash),[h]=M.useState(()=>new t(o,c)),y=h.getOptimisticResult(c),g=!r&&e.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(k=>{const _=g?h.subscribe(Jt.batchCalls(k)):_n;return h.updateResult(),_},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),M.useEffect(()=>{h.setOptions(c)},[c,h]),ON(c,y))throw kv(c,h,l);if(TN({result:y,errorResetBoundary:l,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&&!nc.isServer()&&AN(y,r)){const k=d?kv(c,h,l):f==null?void 0:f.promise;k==null||k.catch(_n).finally(()=>{h.updateResult()})}return c.notifyOnChangeProps?y:h.trackResult(y)}function St(e,t){return RN(e,fN)}function ti(e,t){const i=ai(),[r]=M.useState(()=>new bN(i,e));M.useEffect(()=>{r.setOptions(e)},[r,e]);const l=M.useSyncExternalStore(M.useCallback(c=>r.subscribe(Jt.batchCalls(c)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=M.useCallback((c,f)=>{r.mutate(c,f).catch(_n)},[r]);if(l.error&&Tm(r.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:o,mutateAsync:l.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 Nv="popstate";function Tv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function MN(e={}){function t(r,l){var h;let o=(h=l.state)==null?void 0:h.masked,{pathname:c,search:f,hash:d}=o||r.location;return Jp("",{pathname:c,search:f,hash:d},l.state&&l.state.usr||null,l.state&&l.state.key||"default",o?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function i(r,l){return typeof l=="string"?l:ic(l)}return LN(t,i,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 DN(){return Math.random().toString(36).substring(2,10)}function Cv(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 Jp(e,t,i=null,r,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ml(t):t,state:i,key:t&&t.key||r||DN(),unstable_mask:l}}function ic({pathname:e="/",search:t="",hash:i=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Ml(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substring(i),e=e.substring(0,i));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function LN(e,t,i,r={}){let{window:l=document.defaultView,v5Compat:o=!1}=r,c=l.history,f="POP",d=null,h=y();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function y(){return(c.state||{idx:null}).idx}function g(){f="POP";let k=y(),_=k==null?null:k-h;h=k,d&&d({action:f,location:w.location,delta:_})}function v(k,_){f="PUSH";let R=Tv(k)?k:Jp(w.location,k,_);h=y()+1;let A=Cv(R,h),I=w.createHref(R.unstable_mask||R);try{c.pushState(A,"",I)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;l.location.assign(I)}o&&d&&d({action:f,location:w.location,delta:1})}function x(k,_){f="REPLACE";let R=Tv(k)?k:Jp(w.location,k,_);h=y();let A=Cv(R,h),I=w.createHref(R.unstable_mask||R);c.replaceState(A,"",I),o&&d&&d({action:f,location:w.location,delta:0})}function S(k){return jN(k)}let w={get action(){return f},get location(){return e(l,c)},listen(k){if(d)throw new Error("A history only accepts one active listener");return l.addEventListener(Nv,g),d=k,()=>{l.removeEventListener(Nv,g),d=null}},createHref(k){return t(l,k)},createURL:S,encodeLocation(k){let _=S(k);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:v,replace:x,go(k){return c.go(k)}};return w}function jN(e,t=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(i,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:ic(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=i+r),new URL(r,i)}function vE(e,t,i="/"){return IN(e,t,i,!1)}function IN(e,t,i,r){let l=typeof t=="string"?Ml(t):t,o=Ta(l.pathname||"/",i);if(o==null)return null;let c=EE(e);zN(c);let f=null;for(let d=0;f==null&&d<c.length;++d){let h=QN(o);f=GN(c[d],h,r)}return f}function EE(e,t=[],i=[],r="",l=!1){let o=(c,f,d=l,h)=>{let y={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&d)return;Ct(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let g=Ri([r,y.relativePath]),v=i.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}".`),EE(c.children,t,v,g,d)),!(c.path==null&&!c.index)&&t.push({path:g,score:HN(g,c.index),routesMeta:v})};return e.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))o(c,f);else for(let h of SE(c.path))o(c,f,!0,h)}),t}function SE(e){let t=e.split("/");if(t.length===0)return[];let[i,...r]=t,l=i.endsWith("?"),o=i.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let c=SE(r.join("/")),f=[];return f.push(...c.map(d=>d===""?o:[o,d].join("/"))),l&&f.push(...c),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function zN(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:KN(t.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var BN=/^:[\w-]+$/,UN=3,FN=2,PN=1,$N=10,qN=-2,Av=e=>e==="*";function HN(e,t){let i=e.split("/"),r=i.length;return i.some(Av)&&(r+=qN),t&&(r+=FN),i.filter(l=>!Av(l)).reduce((l,o)=>l+(BN.test(o)?UN:o===""?PN:$N),r)}function KN(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function GN(e,t,i=!1){let{routesMeta:r}=e,l={},o="/",c=[];for(let f=0;f<r.length;++f){let d=r[f],h=f===r.length-1,y=o==="/"?t:t.slice(o.length)||"/",g=gf({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},y),v=d.route;if(!g&&h&&i&&!r[r.length-1].route.index&&(g=gf({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},y)),!g)return null;Object.assign(l,g.params),c.push({params:l,pathname:Ri([o,g.pathname]),pathnameBase:WN(Ri([o,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(o=Ri([o,g.pathnameBase]))}return c}function gf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,r]=YN(e.path,e.caseSensitive,e.end),l=t.match(i);if(!l)return null;let o=l[0],c=o.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:r.reduce((h,{paramName:y,isOptional:g},v)=>{if(y==="*"){let S=f[v]||"";c=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const x=f[v];return g&&!x?h[y]=void 0:h[y]=(x||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:c,pattern:e}}function YN(e,t=!1,i=!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 r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,d,h,y)=>{if(r.push({paramName:f,isOptional:d!=null}),d){let g=y.charAt(h+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function QN(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 Ta(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,r=e.charAt(i);return r&&r!=="/"?null:e.slice(i)||"/"}var VN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function XN(e,t="/"){let{pathname:i,search:r="",hash:l=""}=typeof e=="string"?Ml(e):e,o;return i?(i=wE(i),i.startsWith("/")?o=Ov(i.substring(1),"/"):o=Ov(i,t)):o=t,{pathname:o,search:JN(r),hash:eT(l)}}function Ov(e,t){let i=bf(t).split("/");return e.split("/").forEach(l=>{l===".."?i.length>1&&i.pop():l!=="."&&i.push(l)}),i.length>1?i.join("/"):"/"}function lp(e,t,i,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ZN(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function Am(e){let t=ZN(e);return t.map((i,r)=>r===t.length-1?i.pathname:i.pathnameBase)}function Of(e,t,i,r=!1){let l;typeof e=="string"?l=Ml(e):(l={...e},Ct(!l.pathname||!l.pathname.includes("?"),lp("?","pathname","search",l)),Ct(!l.pathname||!l.pathname.includes("#"),lp("#","pathname","hash",l)),Ct(!l.search||!l.search.includes("#"),lp("#","search","hash",l)));let o=e===""||l.pathname==="",c=o?"/":l.pathname,f;if(c==null)f=i;else{let g=t.length-1;if(!r&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),g-=1;l.pathname=v.join("/")}f=g>=0?t[g]:"/"}let d=XN(l,f),h=c&&c!=="/"&&c.endsWith("/"),y=(o||c===".")&&i.endsWith("/");return!d.pathname.endsWith("/")&&(h||y)&&(d.pathname+="/"),d}var wE=e=>e.replace(/\/\/+/g,"/"),Ri=e=>wE(e.join("/")),bf=e=>e.replace(/\/+$/,""),WN=e=>bf(e).replace(/^\/*/,"/"),JN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,eT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,tT=class{constructor(e,t,i,r=!1){this.status=e,this.statusText=t||"",this.internal=r,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function nT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function iT(e){let t=e.map(i=>i.route.path).filter(Boolean);return Ri(t)||"/"}var _E=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function kE(e,t){let i=e;if(typeof i!="string"||!VN.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let r=i,l=!1;if(_E)try{let o=new URL(window.location.href),c=i.startsWith("//")?new URL(o.protocol+i):new URL(i),f=Ta(c.pathname,t);c.origin===o.origin&&f!=null?i=f+c.search+c.hash:l=!0}catch{Ei(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:l,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var NE=["POST","PUT","PATCH","DELETE"];new Set(NE);var aT=["GET",...NE];new Set(aT);var Dl=M.createContext(null);Dl.displayName="DataRouter";var Rf=M.createContext(null);Rf.displayName="DataRouterState";var TE=M.createContext(!1);function rT(){return M.useContext(TE)}var CE=M.createContext({isTransitioning:!1});CE.displayName="ViewTransition";var sT=M.createContext(new Map);sT.displayName="Fetchers";var lT=M.createContext(null);lT.displayName="Await";var ri=M.createContext(null);ri.displayName="Navigation";var pc=M.createContext(null);pc.displayName="Location";var wi=M.createContext({outlet:null,matches:[],isDataRoute:!1});wi.displayName="Route";var Om=M.createContext(null);Om.displayName="RouteError";var AE="REACT_ROUTER_ERROR",oT="REDIRECT",cT="ROUTE_ERROR_RESPONSE";function uT(e){if(e.startsWith(`${AE}:${oT}:{`))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 fT(e){if(e.startsWith(`${AE}:${cT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new tT(t.status,t.statusText,t.data)}catch{}}function dT(e,{relative:t}={}){Ct(Ll(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:r}=M.useContext(ri),{hash:l,pathname:o,search:c}=mc(e,{relative:t}),f=o;return i!=="/"&&(f=o==="/"?i:Ri([i,o])),r.createHref({pathname:f,search:c,hash:l})}function Ll(){return M.useContext(pc)!=null}function Di(){return Ct(Ll(),"useLocation() may be used only in the context of a <Router> component."),M.useContext(pc).location}var OE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function RE(e){M.useContext(ri).static||M.useLayoutEffect(e)}function Er(){let{isDataRoute:e}=M.useContext(wi);return e?TT():hT()}function hT(){Ct(Ll(),"useNavigate() may be used only in the context of a <Router> component.");let e=M.useContext(Dl),{basename:t,navigator:i}=M.useContext(ri),{matches:r}=M.useContext(wi),{pathname:l}=Di(),o=JSON.stringify(Am(r)),c=M.useRef(!1);return RE(()=>{c.current=!0}),M.useCallback((d,h={})=>{if(Ei(c.current,OE),!c.current)return;if(typeof d=="number"){i.go(d);return}let y=Of(d,JSON.parse(o),l,h.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:Ri([t,y.pathname])),(h.replace?i.replace:i.push)(y,h.state,h)},[t,i,o,l,e])}var pT=M.createContext(null);function mT(e){let t=M.useContext(wi).outlet;return M.useMemo(()=>t&&M.createElement(pT.Provider,{value:e},t),[t,e])}function ME(){let{matches:e}=M.useContext(wi),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function mc(e,{relative:t}={}){let{matches:i}=M.useContext(wi),{pathname:r}=Di(),l=JSON.stringify(Am(i));return M.useMemo(()=>Of(e,JSON.parse(l),r,t==="path"),[e,l,r,t])}function gT(e,t){return DE(e,t)}function DE(e,t,i){var k;Ct(Ll(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=M.useContext(ri),{matches:l}=M.useContext(wi),o=l[l.length-1],c=o?o.params:{},f=o?o.pathname:"/",d=o?o.pathnameBase:"/",h=o&&o.route;{let _=h&&h.path||"";jE(f,!h||_.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=Di(),g;if(t){let _=typeof t=="string"?Ml(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 v=g.pathname||"/",x=v;if(d!=="/"){let _=d.replace(/^\//,"").split("/");x="/"+v.replace(/^\//,"").split("/").slice(_.length).join("/")}let S=vE(e,{pathname:x});Ei(h||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=ET(S&&S.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:Ri([d,r.encodeLocation?r.encodeLocation(_.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?d:Ri([d,r.encodeLocation?r.encodeLocation(_.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),l,i);return t&&w?M.createElement(pc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},w):w}function bT(){let e=NT(),t=nT(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=M.createElement(M.Fragment,null,M.createElement("p",null,"💿 Hey developer 👋"),M.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",M.createElement("code",{style:o},"ErrorBoundary")," or"," ",M.createElement("code",{style:o},"errorElement")," prop on your route.")),M.createElement(M.Fragment,null,M.createElement("h2",null,"Unexpected Application Error!"),M.createElement("h3",{style:{fontStyle:"italic"}},t),i?M.createElement("pre",{style:l},i):null,c)}var yT=M.createElement(bT,null),LE=class extends M.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 i=fT(e.digest);i&&(e=i)}let t=e!==void 0?M.createElement(wi.Provider,{value:this.props.routeContext},M.createElement(Om.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?M.createElement(xT,{error:e},t):t}};LE.contextType=TE;var op=new WeakMap;function xT({children:e,error:t}){let{basename:i}=M.useContext(ri);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=uT(t.digest);if(r){let l=op.get(t);if(l)throw l;let o=kE(r.location,i);if(_E&&!op.get(t))if(o.isExternal||r.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:r.replace}));throw op.set(t,c),c}return M.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function vT({routeContext:e,match:t,children:i}){let r=M.useContext(Dl);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),M.createElement(wi.Provider,{value:e},i)}function ET(e,t=[],i){let r=i==null?void 0:i.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let l=e,o=r==null?void 0:r.errors;if(o!=null){let y=l.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(",")}`),l=l.slice(0,Math.min(l.length,y+1))}let c=!1,f=-1;if(i&&r){c=r.renderFallback;for(let y=0;y<l.length;y++){let g=l[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=y),g.route.id){let{loaderData:v,errors:x}=r,S=g.route.loader&&!v.hasOwnProperty(g.route.id)&&(!x||x[g.route.id]===void 0);if(g.route.lazy||S){i.isStatic&&(c=!0),f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}}let d=i==null?void 0:i.onError,h=r&&d?(y,g)=>{var v,x;d(y,{location:r.location,params:((x=(v=r.matches)==null?void 0:v[0])==null?void 0:x.params)??{},unstable_pattern:iT(r.matches),errorInfo:g})}:void 0;return l.reduceRight((y,g,v)=>{let x,S=!1,w=null,k=null;r&&(x=o&&g.route.id?o[g.route.id]:void 0,w=g.route.errorElement||yT,c&&(f<0&&v===0?(jE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,k=null):f===v&&(S=!0,k=g.route.hydrateFallbackElement||null)));let _=t.concat(l.slice(0,v+1)),R=()=>{let A;return x?A=w:S?A=k:g.route.Component?A=M.createElement(g.route.Component,null):g.route.element?A=g.route.element:A=y,M.createElement(vT,{match:g,routeContext:{outlet:y,matches:_,isDataRoute:r!=null},children:A})};return r&&(g.route.ErrorBoundary||g.route.errorElement||v===0)?M.createElement(LE,{location:r.location,revalidation:r.revalidation,component:w,error:x,children:R(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:h}):R()},null)}function Rm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ST(e){let t=M.useContext(Dl);return Ct(t,Rm(e)),t}function wT(e){let t=M.useContext(Rf);return Ct(t,Rm(e)),t}function _T(e){let t=M.useContext(wi);return Ct(t,Rm(e)),t}function Mm(e){let t=_T(e),i=t.matches[t.matches.length-1];return Ct(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function kT(){return Mm("useRouteId")}function NT(){var r;let e=M.useContext(Om),t=wT("useRouteError"),i=Mm("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[i]}function TT(){let{router:e}=ST("useNavigate"),t=Mm("useNavigate"),i=M.useRef(!1);return RE(()=>{i.current=!0}),M.useCallback(async(l,o={})=>{Ei(i.current,OE),i.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...o}))},[e,t])}var Rv={};function jE(e,t,i){!t&&!Rv[e]&&(Rv[e]=!0,Ei(!1,i))}M.memo(CT);function CT({routes:e,future:t,state:i,isStatic:r,onError:l}){return DE(e,void 0,{state:i,isStatic:r,onError:l})}function AT({to:e,replace:t,state:i,relative:r}){Ct(Ll(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=M.useContext(ri);Ei(!l,"<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}=M.useContext(wi),{pathname:c}=Di(),f=Er(),d=Of(e,Am(o),c,r==="path"),h=JSON.stringify(d);return M.useEffect(()=>{f(JSON.parse(h),{replace:t,state:i,relative:r})},[f,h,r,t,i]),null}function OT(e){return mT(e.context)}function In(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 RT({basename:e="/",children:t=null,location:i,navigationType:r="POP",navigator:l,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=M.useMemo(()=>({basename:f,navigator:l,static:o,unstable_useTransitions:c,future:{}}),[f,l,o,c]);typeof i=="string"&&(i=Ml(i));let{pathname:h="/",search:y="",hash:g="",state:v=null,key:x="default",unstable_mask:S}=i,w=M.useMemo(()=>{let k=Ta(h,f);return k==null?null:{location:{pathname:k,search:y,hash:g,state:v,key:x,unstable_mask:S},navigationType:r}},[f,h,y,g,v,x,r,S]);return Ei(w!=null,`<Router basename="${f}"> is not able to match the URL "${h}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:M.createElement(ri.Provider,{value:d},M.createElement(pc.Provider,{children:t,value:w}))}function MT({children:e,location:t}){return gT(em(e),t)}function em(e,t=[]){let i=[];return M.Children.forEach(e,(r,l)=>{if(!M.isValidElement(r))return;let o=[...t,l];if(r.type===M.Fragment){i.push.apply(i,em(r.props.children,o));return}Ct(r.type===In,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ct(!r.props.index||!r.props.children,"An index route cannot have child routes.");let c={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(c.children=em(r.props.children,o)),i.push(c)}),i}var lf="get",of="application/x-www-form-urlencoded";function Mf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function DT(e){return Mf(e)&&e.tagName.toLowerCase()==="button"}function LT(e){return Mf(e)&&e.tagName.toLowerCase()==="form"}function jT(e){return Mf(e)&&e.tagName.toLowerCase()==="input"}function IT(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zT(e,t){return e.button===0&&(!t||t==="_self")&&!IT(e)}function tm(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,i)=>{let r=e[i];return t.concat(Array.isArray(r)?r.map(l=>[i,l]):[[i,r]])},[]))}function BT(e,t){let i=tm(e);return t&&t.forEach((r,l)=>{i.has(l)||t.getAll(l).forEach(o=>{i.append(l,o)})}),i}var qu=null;function UT(){if(qu===null)try{new FormData(document.createElement("form"),0),qu=!1}catch{qu=!0}return qu}var FT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cp(e){return e!=null&&!FT.has(e)?(Ei(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${of}"`),null):e}function PT(e,t){let i,r,l,o,c;if(LT(e)){let f=e.getAttribute("action");r=f?Ta(f,t):null,i=e.getAttribute("method")||lf,l=cp(e.getAttribute("enctype"))||of,o=new FormData(e)}else if(DT(e)||jT(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(r=d?Ta(d,t):null,i=e.getAttribute("formmethod")||f.getAttribute("method")||lf,l=cp(e.getAttribute("formenctype"))||cp(f.getAttribute("enctype"))||of,o=new FormData(f,e),!UT()){let{name:h,type:y,value:g}=e;if(y==="image"){let v=h?`${h}.`:"";o.append(`${v}x`,"0"),o.append(`${v}y`,"0")}else h&&o.append(h,g)}}else{if(Mf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=lf,r=null,l=of,c=e}return o&&l==="text/plain"&&(c=o,o=void 0),{action:r,method:i.toLowerCase(),encType:l,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Dm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function IE(e,t,i,r){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return i?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${r}`:l.pathname=`${l.pathname}.${r}`:l.pathname==="/"?l.pathname=`_root.${r}`:t&&Ta(l.pathname,t)==="/"?l.pathname=`${bf(t)}/_root.${r}`:l.pathname=`${bf(l.pathname)}.${r}`,l}async function $T(e,t){if(e.id in t)return t[e.id];try{let i=await import(e.module);return t[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function qT(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 HT(e,t,i){let r=await Promise.all(e.map(async l=>{let o=t.routes[l.route.id];if(o){let c=await $T(o,i);return c.links?c.links():[]}return[]}));return QT(r.flat(1).filter(qT).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Mv(e,t,i,r,l,o){let c=(d,h)=>i[h]?d.route.id!==i[h].route.id:!0,f=(d,h)=>{var y;return i[h].pathname!==d.pathname||((y=i[h].route.path)==null?void 0:y.endsWith("*"))&&i[h].params["*"]!==d.params["*"]};return o==="assets"?t.filter((d,h)=>c(d,h)||f(d,h)):o==="data"?t.filter((d,h)=>{var g;let y=r.routes[d.route.id];if(!y||!y.hasLoader)return!1;if(c(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let v=d.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((g=i[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function KT(e,t,{includeHydrateFallback:i}={}){return GT(e.map(r=>{let l=t.routes[r.route.id];if(!l)return[];let o=[l.module];return l.clientActionModule&&(o=o.concat(l.clientActionModule)),l.clientLoaderModule&&(o=o.concat(l.clientLoaderModule)),i&&l.hydrateFallbackModule&&(o=o.concat(l.hydrateFallbackModule)),l.imports&&(o=o.concat(l.imports)),o}).flat(1))}function GT(e){return[...new Set(e)]}function YT(e){let t={},i=Object.keys(e).sort();for(let r of i)t[r]=e[r];return t}function QT(e,t){let i=new Set;return new Set(t),e.reduce((r,l)=>{let o=JSON.stringify(YT(l));return i.has(o)||(i.add(o),r.push({key:o,link:l})),r},[])}function Lm(){let e=M.useContext(Dl);return Dm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function VT(){let e=M.useContext(Rf);return Dm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var jm=M.createContext(void 0);jm.displayName="FrameworkContext";function Im(){let e=M.useContext(jm);return Dm(e,"You must render this element inside a <HydratedRouter> element"),e}function XT(e,t){let i=M.useContext(jm),[r,l]=M.useState(!1),[o,c]=M.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:y,onTouchStart:g}=t,v=M.useRef(null);M.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=_=>{_.forEach(R=>{c(R.isIntersecting)})},k=new IntersectionObserver(w,{threshold:.5});return v.current&&k.observe(v.current),()=>{k.disconnect()}}},[e]),M.useEffect(()=>{if(r){let w=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(w)}}},[r]);let x=()=>{l(!0)},S=()=>{l(!1),c(!1)};return i?e!=="intent"?[o,v,{}]:[o,v,{onFocus:$o(f,x),onBlur:$o(d,S),onMouseEnter:$o(h,x),onMouseLeave:$o(y,S),onTouchStart:$o(g,x)}]:[!1,v,{}]}function $o(e,t){return i=>{e&&e(i),i.defaultPrevented||t(i)}}function ZT({page:e,...t}){let i=rT(),{router:r}=Lm(),l=M.useMemo(()=>vE(r.routes,e,r.basename),[r.routes,e,r.basename]);return l?i?M.createElement(JT,{page:e,matches:l,...t}):M.createElement(eC,{page:e,matches:l,...t}):null}function WT(e){let{manifest:t,routeModules:i}=Im(),[r,l]=M.useState([]);return M.useEffect(()=>{let o=!1;return HT(e,t,i).then(c=>{o||l(c)}),()=>{o=!0}},[e,t,i]),r}function JT({page:e,matches:t,...i}){let r=Di(),{future:l}=Im(),{basename:o}=Lm(),c=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let f=IE(e,o,l.unstable_trailingSlashAwareDataRequests,"rsc"),d=!1,h=[];for(let y of t)typeof y.route.shouldRevalidate=="function"?d=!0:h.push(y.route.id);return d&&h.length>0&&f.searchParams.set("_routes",h.join(",")),[f.pathname+f.search]},[o,l.unstable_trailingSlashAwareDataRequests,e,r,t]);return M.createElement(M.Fragment,null,c.map(f=>M.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...i})))}function eC({page:e,matches:t,...i}){let r=Di(),{future:l,manifest:o,routeModules:c}=Im(),{basename:f}=Lm(),{loaderData:d,matches:h}=VT(),y=M.useMemo(()=>Mv(e,t,h,o,r,"data"),[e,t,h,o,r]),g=M.useMemo(()=>Mv(e,t,h,o,r,"assets"),[e,t,h,o,r]),v=M.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let w=new Set,k=!1;if(t.forEach(R=>{var I;let A=o.routes[R.route.id];!A||!A.hasLoader||(!y.some($=>$.route.id===R.route.id)&&R.route.id in d&&((I=c[R.route.id])!=null&&I.shouldRevalidate)||A.hasClientLoader?k=!0:w.add(R.route.id))}),w.size===0)return[];let _=IE(e,f,l.unstable_trailingSlashAwareDataRequests,"data");return k&&w.size>0&&_.searchParams.set("_routes",t.filter(R=>w.has(R.route.id)).map(R=>R.route.id).join(",")),[_.pathname+_.search]},[f,l.unstable_trailingSlashAwareDataRequests,d,r,o,y,t,e,c]),x=M.useMemo(()=>KT(g,o),[g,o]),S=WT(g);return M.createElement(M.Fragment,null,v.map(w=>M.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...i})),x.map(w=>M.createElement("link",{key:w,rel:"modulepreload",href:w,...i})),S.map(({key:w,link:k})=>M.createElement("link",{key:w,nonce:i.nonce,...k,crossOrigin:k.crossOrigin??i.crossOrigin})))}function tC(...e){return t=>{e.forEach(i=>{typeof i=="function"?i(t):i!=null&&(i.current=t)})}}var nC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{nC&&(window.__reactRouterVersion="7.14.2")}catch{}function iC({basename:e,children:t,unstable_useTransitions:i,window:r}){let l=M.useRef();l.current==null&&(l.current=MN({window:r,v5Compat:!0}));let o=l.current,[c,f]=M.useState({action:o.action,location:o.location}),d=M.useCallback(h=>{i===!1?f(h):M.startTransition(()=>f(h))},[i]);return M.useLayoutEffect(()=>o.listen(d),[o,d]),M.createElement(RT,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:i})}var zE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sr=M.forwardRef(function({onClick:t,discover:i="render",prefetch:r="none",relative:l,reloadDocument:o,replace:c,unstable_mask:f,state:d,target:h,to:y,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:x,...S},w){let{basename:k,navigator:_,unstable_useTransitions:R}=M.useContext(ri),A=typeof y=="string"&&zE.test(y),I=kE(y,k);y=I.to;let $=dT(y,{relative:l}),T=Di(),P=null;if(f){let ee=Of(f,[],T.unstable_mask?T.unstable_mask.pathname:"/",!0);k!=="/"&&(ee.pathname=ee.pathname==="/"?k:Ri([k,ee.pathname])),P=_.createHref(ee)}let[z,Z,L]=XT(r,S),K=sC(y,{replace:c,unstable_mask:f,state:d,target:h,preventScrollReset:g,relative:l,viewTransition:v,unstable_defaultShouldRevalidate:x,unstable_useTransitions:R});function X(ee){t&&t(ee),ee.defaultPrevented||K(ee)}let oe=!(I.isExternal||o),se=M.createElement("a",{...S,...L,href:(oe?P:void 0)||I.absoluteURL||$,onClick:oe?X:t,ref:tC(w,Z),target:h,"data-discover":!A&&i==="render"?"true":void 0});return z&&!A?M.createElement(M.Fragment,null,se,M.createElement(ZT,{page:$})):se});Sr.displayName="Link";var BE=M.forwardRef(function({"aria-current":t="page",caseSensitive:i=!1,className:r="",end:l=!1,style:o,to:c,viewTransition:f,children:d,...h},y){let g=mc(c,{relative:h.relative}),v=Di(),x=M.useContext(Rf),{navigator:S,basename:w}=M.useContext(ri),k=x!=null&&fC(g)&&f===!0,_=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,R=v.pathname,A=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;i||(R=R.toLowerCase(),A=A?A.toLowerCase():null,_=_.toLowerCase()),A&&w&&(A=Ta(A,w)||A);const I=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let $=R===_||!l&&R.startsWith(_)&&R.charAt(I)==="/",T=A!=null&&(A===_||!l&&A.startsWith(_)&&A.charAt(_.length)==="/"),P={isActive:$,isPending:T,isTransitioning:k},z=$?t:void 0,Z;typeof r=="function"?Z=r(P):Z=[r,$?"active":null,T?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let L=typeof o=="function"?o(P):o;return M.createElement(Sr,{...h,"aria-current":z,className:Z,ref:y,style:L,to:c,viewTransition:f},typeof d=="function"?d(P):d)});BE.displayName="NavLink";var aC=M.forwardRef(({discover:e="render",fetcherKey:t,navigate:i,reloadDocument:r,replace:l,state:o,method:c=lf,action:f,onSubmit:d,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:v,...x},S)=>{let{unstable_useTransitions:w}=M.useContext(ri),k=cC(),_=uC(f,{relative:h}),R=c.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&zE.test(f),I=$=>{if(d&&d($),$.defaultPrevented)return;$.preventDefault();let T=$.nativeEvent.submitter,P=(T==null?void 0:T.getAttribute("formmethod"))||c,z=()=>k(T||$.currentTarget,{fetcherKey:t,method:P,navigate:i,replace:l,state:o,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:v});w&&i!==!1?M.startTransition(()=>z()):z()};return M.createElement("form",{ref:S,method:R,action:_,onSubmit:r?d:I,...x,"data-discover":!A&&e==="render"?"true":void 0})});aC.displayName="Form";function rC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function UE(e){let t=M.useContext(Dl);return Ct(t,rC(e)),t}function sC(e,{target:t,replace:i,unstable_mask:r,state:l,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h}={}){let y=Er(),g=Di(),v=mc(e,{relative:c});return M.useCallback(x=>{if(zT(x,t)){x.preventDefault();let S=i!==void 0?i:ic(g)===ic(v),w=()=>y(e,{replace:S,unstable_mask:r,state:l,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d});h?M.startTransition(()=>w()):w()}},[g,y,v,i,r,l,t,e,o,c,f,d,h])}function zm(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=M.useRef(tm(e)),i=M.useRef(!1),r=Di(),l=M.useMemo(()=>BT(r.search,i.current?null:t.current),[r.search]),o=Er(),c=M.useCallback((f,d)=>{const h=tm(typeof f=="function"?f(new URLSearchParams(l)):f);i.current=!0,o("?"+h,d)},[o,l]);return[l,c]}var lC=0,oC=()=>`__${String(++lC)}__`;function cC(){let{router:e}=UE("useSubmit"),{basename:t}=M.useContext(ri),i=kT(),r=e.fetch,l=e.navigate;return M.useCallback(async(o,c={})=>{let{action:f,method:d,encType:h,formData:y,body:g}=PT(o,t);if(c.navigate===!1){let v=c.fetcherKey||oC();await r(v,i,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||h,flushSync:c.flushSync})}else await l(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||d,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:i,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,l,t,i])}function uC(e,{relative:t}={}){let{basename:i}=M.useContext(ri),r=M.useContext(wi);Ct(r,"useFormAction must be used inside a RouteContext");let[l]=r.matches.slice(-1),o={...mc(e||".",{relative:t})},c=Di();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===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(o.pathname=o.pathname==="/"?i:Ri([i,o.pathname])),ic(o)}function fC(e,{relative:t}={}){let i=M.useContext(CE);Ct(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=UE("useViewTransitionState"),l=mc(e,{relative:t});if(!i.isTransitioning)return!1;let o=Ta(i.currentLocation.pathname,r)||i.currentLocation.pathname,c=Ta(i.nextLocation.pathname,r)||i.nextLocation.pathname;return gf(l.pathname,c)!=null||gf(l.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 dC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),hC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,r)=>r?r.toUpperCase():i.toLowerCase()),Dv=e=>{const t=hC(e);return t.charAt(0).toUpperCase()+t.slice(1)},FE=(...e)=>e.filter((t,i,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===i).join(" ").trim(),pC=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 mC={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 gC=M.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:l="",children:o,iconNode:c,...f},d)=>M.createElement("svg",{ref:d,...mC,width:t,height:t,stroke:e,strokeWidth:r?Number(i)*24/Number(t):i,className:FE("lucide",l),...!o&&!pC(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,y])=>M.createElement(h,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 De=(e,t)=>{const i=M.forwardRef(({className:r,...l},o)=>M.createElement(gC,{ref:o,iconNode:t,className:FE(`lucide-${dC(Dv(e))}`,`lucide-${e}`,r),...l}));return i.displayName=Dv(e),i};/**
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 bC=[["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"}]],PE=De("activity",bC);/**
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 yC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],$E=De("arrow-left",yC);/**
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 xC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vC=De("check",xC);/**
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 EC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bm=De("chevron-down",EC);/**
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 SC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qE=De("chevron-right",SC);/**
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 wC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],_C=De("chevron-up",wC);/**
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 kC=[["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"}]],Um=De("circle-alert",kC);/**
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 NC=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],TC=De("circle-check-big",NC);/**
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 CC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],HE=De("circle-check",CC);/**
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 AC=[["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"}]],OC=De("circle-x",AC);/**
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 RC=[["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"}]],KE=De("download",RC);/**
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 MC=[["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"}]],Lv=De("file-code",MC);/**
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 DC=[["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"}]],Fm=De("file-text",DC);/**
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 LC=[["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"}]],jC=De("flame",LC);/**
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 IC=[["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"}]],zC=De("folder-git-2",IC);/**
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 BC=[["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"}]],UC=De("funnel",BC);/**
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 FC=[["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"}]],PC=De("git-branch",FC);/**
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 $C=[["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"}]],qC=De("globe",$C);/**
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 HC=[["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"}]],KC=De("history",HC);/**
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 GC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],YC=De("info",GC);/**
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 QC=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],VC=De("kanban",QC);/**
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 XC=[["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"}]],ZC=De("layout-grid",XC);/**
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 WC=[["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"}]],JC=De("link",WC);/**
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 eA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],cn=De("loader-circle",eA);/**
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 tA=[["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"}]],jv=De("message-circle",tA);/**
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 nA=[["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"}]],iA=De("message-square",nA);/**
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 aA=[["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"}]],rA=De("pause",aA);/**
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 sA=[["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"}]],GE=De("pen-line",sA);/**
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 lA=[["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"}]],Pm=De("play",lA);/**
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 oA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ca=De("plus",oA);/**
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 cA=[["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"}]],YE=De("radio",cA);/**
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 uA=[["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"}]],jl=De("refresh-cw",uA);/**
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 fA=[["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"}]],Df=De("rotate-ccw",fA);/**
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 dA=[["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"}]],$m=De("save",dA);/**
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 hA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yf=De("search",hA);/**
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 pA=[["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"}]],mA=De("send",pA);/**
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 gA=[["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"}]],QE=De("settings",gA);/**
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 bA=[["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"}]],yA=De("snowflake",bA);/**
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 xA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],VE=De("square",xA);/**
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 vA=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],EA=De("terminal",vA);/**
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 SA=[["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"}]],gc=De("trash-2",SA);/**
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 wA=[["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"}]],XE=De("users",wA);/**
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 _A=[["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"}]],ZE=De("workflow",_A);/**
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 kA=[["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"}]],NA=De("wrench",kA);/**
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 TA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ds=De("x",TA);/**
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 CA=[["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"}]],WE=De("zap",CA),AA=[{to:"/chat",label:"对话",icon:iA},{to:"/projects",label:"项目",icon:ZC},{to:"/board",label:"看板",icon:VC},{to:"/workers",label:"Workers",icon:XE},{to:"/logs",label:"Logs",icon:Fm},{to:"/skills",label:"Skills",icon:qC},{to:"/system",label:"系统",icon:QE}];function OA(){return m.jsxs(m.Fragment,{children:[m.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:[m.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",m.jsx("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] font-normal",children:"v0.44"})]}),m.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":"主导航",children:AA.map(e=>{const t=e.icon;return m.jsxs(BE,{to:e.to,className:({isActive:i})=>["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",i?"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:[m.jsx(t,{size:18,strokeWidth:2.5}),e.label]},e.to)})})]})}class RA extends Error{constructor(t,i,r){super(i),this.status=t,this.detail=r,this.name="ApiError"}}async function qt(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(!t.ok){let i;try{i=await t.json()}catch{i=await t.text()}throw new RA(t.status,`${t.status} ${t.statusText}`,i)}return await t.json()}function JE(){return qt("/api/system/info")}function MA(){return qt("/api/system/env")}function DA(){return qt("/api/system/doctor/all")}function LA(){return qt("/api/system/env/raw")}async function jA(e,t){const i=await fetch("/api/system/env",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,etag:t})});if(!i.ok){const r=await i.text(),l=new Error(`${i.status}: ${r}`);throw l.status=i.status,l}return i.json()}function IA(){return qt("/api/system/latest-version")}async function zA(){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()}function bc(){return qt("/api/projects")}function BA(e){return qt(`/api/projects/${encodeURIComponent(e)}`)}async function UA(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const i=await t.text();throw new Error(`${t.status}: ${i}`)}return t.json()}function FA(e){return qt(`/api/projects/${encodeURIComponent(e)}/conf`)}async function PA(e,t,i){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/conf`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,etag:i})});if(!r.ok){const l=await r.text(),o=new Error(`${r.status}: ${l}`);throw o.status=r.status,o}return r.json()}async function $A(e,t={}){const i=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!i.ok){const r=await i.text();throw new Error(`${i.status}: ${r}`)}return i.json()}function qA(e){return qt(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function HA(e,t){const i=await fetch(`/api/projects/${encodeURIComponent(e)}/pipeline`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({pipeline:t})});if(!i.ok){const r=await i.text();throw new Error(`${i.status}: ${r}`)}return i.json()}function KA(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function GA(e,t,i,r){const l=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:i,etag:r})});if(!l.ok){const o=await l.text(),c=new Error(`${l.status}: ${o}`);throw c.status=l.status,c}return l.json()}async function YA(e,t,i="blank"){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,template:i})});if(!r.ok){const l=await r.text();throw new Error(`${r.status}: ${l}`)}return r.json()}async function QA(e,t){const i=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"DELETE"});if(!i.ok){const r=await i.text();throw new Error(`${i.status}: ${r}`)}}function VA(){var f;const e=St({queryKey:["system-info"],queryFn:JE,refetchInterval:3e4}),t=St({queryKey:["projects"],queryFn:bc,refetchInterval:1e4}),i=ZA(),r=!e.isError,l=((f=t.data)==null?void 0:f.data)??[],o=l.filter(d=>d.pipelineStatus==="running").length,c=l.reduce((d,h)=>d+h.workers.active,0);return m.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:[m.jsx("span",{className:"nb-status",style:{background:r?"var(--color-running-bg)":"var(--color-crashed-bg)",color:r?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:r?"server":"offline"}),m.jsx(XA,{state:i}),m.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),m.jsxs("span",{className:"flex items-center gap-1",title:"活跃 pipeline 数",children:[m.jsx(PE,{size:10,strokeWidth:2.5}),m.jsx("span",{className:"font-bold text-[var(--color-text)]",children:o})," pipeline"]}),m.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),m.jsxs("span",{className:"flex items-center gap-1",title:"活跃 worker 数",children:[m.jsx(YE,{size:10,strokeWidth:2.5}),m.jsx("span",{className:"font-bold text-[var(--color-text)]",children:c})," worker"]}),m.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),m.jsxs("span",{children:["localhost:",window.location.port]}),e.data&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),m.jsxs("span",{children:["v",e.data.version]}),m.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),m.jsxs("span",{children:["node ",e.data.nodeVersion]})]})]})}function XA({state:e}){return e==="open"?m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px 2px 7px"},children:"SSE"}):e==="connecting"?m.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)",padding:"2px 8px 2px 7px"},children:"SSE·connect"}):m.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[m.jsx(Um,{size:9,strokeWidth:2.5}),"SSE·down"]})}function ZA(){const[e,t]=M.useState("connecting"),i=M.useRef(null);return M.useEffect(()=>{const r=new EventSource("/stream/heartbeat");return i.current=r,r.addEventListener("server.heartbeat",()=>t("open")),r.addEventListener("error",()=>t("closed")),r.addEventListener("open",()=>t("open")),()=>{r.close(),i.current=null}},[]),e}function WA(){return m.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] min-h-screen",children:[m.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:m.jsx(OA,{})}),m.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:m.jsx(OT,{})}),m.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:m.jsx(VA,{})})]})}function nm(e,t){try{const i=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:i,keepalive:!0}).catch(()=>{})}catch{}}function JA(){typeof window>"u"||(window.addEventListener("error",e=>{nm(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;nm(t instanceof Error?t:String(t),"unhandledrejection")}))}class e2 extends M.Component{constructor(){super(...arguments);av(this,"state",{error:null})}static getDerivedStateFromError(i){return{error:i}}componentDidCatch(i,r){var l;nm(i,`ErrorBoundary: ${((l=r.componentStack)==null?void 0:l.slice(0,200))??""}`),console.error("[ErrorBoundary]",i,r)}render(){return this.state.error?m.jsx("div",{className:"p-6",children:m.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"💥 UI 崩了"}),m.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),m.jsxs("details",{className:"text-xs mb-4",children:[m.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),m.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)"})]}),m.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:"刷新页面"})]})}):this.props.children}}function t2(){const e=Er(),{data:t,isLoading:i,isError:r,error:l,refetch:o}=St({queryKey:["projects"],queryFn:bc});return m.jsxs("div",{className:"flex flex-col gap-6 max-w-6xl",children:[m.jsxs("header",{className:"flex items-center justify-between",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"项目 🎯"}),m.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:t?`${t.data.length} 个本机项目`:i?"加载中…":"点击刷新重试"})]}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>o(),type:"button",children:[m.jsx(PE,{size:16,strokeWidth:2.5}),"刷新"]}),m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>e("/projects/new"),"aria-label":"新建项目",children:[m.jsx(Ca,{size:16,strokeWidth:3}),"新建项目"]})]})]}),i&&m.jsx(a2,{}),r&&m.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:"加载失败"}),m.jsx("p",{className:"text-sm text-[var(--color-text)]",children:l instanceof Error?l.message:String(l)}),m.jsx("button",{className:"nb-btn mt-4",onClick:()=>o(),type:"button",children:"重试"})]}),t&&t.data.length===0&&m.jsx(r2,{}),t&&t.data.length>0&&m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.data.map(c=>m.jsx(n2,{project:c},c.name))})]})}function n2({project:e}){const t=e.pipelineStatus==="running";return m.jsxs(Sr,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),m.jsx(i2,{status:e.pipelineStatus})]}),e.repoDir&&m.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),m.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:[m.jsx(up,{label:"cards",value:e.cards.total,accent:"purple"}),m.jsx(up,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),m.jsx(up,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function up({label:e,value:t,accent:i}){const r={purple:"var(--color-accent-purple)",yellow:"var(--color-accent-yellow)",mint:"var(--color-accent-mint)",idle:"var(--color-bg-cream)"};return m.jsxs("div",{className:"flex flex-col items-center justify-center py-2 rounded-lg border-2 border-[var(--color-text)]",style:{background:r[i]},children:[m.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),m.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function i2({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:i,label:r}=t[e],l=e==="running"?"var(--color-running)":e==="error"?"var(--color-crashed)":e==="stopping"?"var(--color-stuck)":"var(--color-idle)";return m.jsx("span",{className:"nb-status",style:{background:i,color:l},children:r})}function a2(){return m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>m.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[m.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),m.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),m.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function r2(){return m.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[m.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:m.jsx(XE,{size:32,strokeWidth:2.5})}),m.jsxs("div",{className:"flex-1",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"还没有项目 ✨"}),m.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:["运行 ",m.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>"})," 创建第一个项目。"]}),m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[m.jsx(Ca,{size:16,strokeWidth:3}),"新建项目"]})]})]})}function s2({title:e,body:t,confirm:i,onConfirm:r,onCancel:l,danger:o}){return M.useEffect(()=>{const c=f=>{f.key==="Escape"&&l()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[l]),m.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",onClick:l,children:m.jsxs("div",{onClick:c=>c.stopPropagation(),className:"nb-card max-w-md w-full",children:[m.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),m.jsxs("div",{className:"flex gap-3 justify-end",children:[m.jsx("button",{className:"nb-btn",onClick:l,type:"button",children:"取消"}),m.jsx("button",{className:o?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await r()},type:"button",children:i})]})]})})}const e1=M.createContext(null);function l2({children:e}){const[t,i]=M.useState(null),r=M.useCallback(c=>new Promise(f=>{i({kind:"confirm",opts:c,resolve:d=>{i(null),f(d)}})}),[]),l=M.useCallback(c=>new Promise(f=>{i({kind:"alert",opts:c,resolve:()=>{i(null),f()}})}),[]),o=M.useCallback(c=>new Promise(f=>{i({kind:"prompt",opts:c,resolve:d=>{i(null),f(d)}})}),[]);return m.jsxs(e1.Provider,{value:{confirm:r,alert:l,prompt:o},children:[e,(t==null?void 0:t.kind)==="confirm"&&m.jsx(s2,{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"&&m.jsx(o2,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"知道了",onClose:()=>t.resolve()}),(t==null?void 0:t.kind)==="prompt"&&m.jsx(c2,{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=M.useContext(e1);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function o2({title:e,body:t,confirm:i,onClose:r}){return M.useEffect(()=>{const l=o=>{(o.key==="Escape"||o.key==="Enter")&&r()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[r]),m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",onClick:r,children:m.jsxs("div",{onClick:l=>l.stopPropagation(),className:"nb-card max-w-md w-full",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),m.jsx("div",{className:"flex gap-3 justify-end",children:m.jsx("button",{className:"nb-btn nb-btn-primary",onClick:r,type:"button",autoFocus:!0,children:i})})]})})}function c2({title:e,body:t,placeholder:i,defaultValue:r,confirm:l,cancel:o,onConfirm:c,onCancel:f}){const[d,h]=M.useState(r??""),y=M.useRef(null);M.useEffect(()=>{var x,S;(x=y.current)==null||x.focus(),(S=y.current)==null||S.select();const v=w=>{w.key==="Escape"&&f()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[f]);const g=()=>{const v=d.trim();v&&c(v)};return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",onClick:f,children:m.jsxs("div",{onClick:v=>v.stopPropagation(),className:"nb-card max-w-md w-full",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),m.jsx("input",{ref:y,type:"text",className:"nb-input w-full mb-5",placeholder:i,value:d,onChange:v=>h(v.target.value),onKeyDown:v=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&(v.preventDefault(),g())}}),m.jsxs("div",{className:"flex gap-3 justify-end",children:[m.jsx("button",{className:"nb-btn",onClick:f,type:"button",children:o}),m.jsx("button",{className:"nb-btn nb-btn-primary",onClick:g,type:"button",disabled:!d.trim(),children:l})]})]})})}function u2(){const e=Er(),t=ai(),{alert:i}=si(),[r,l]=M.useState({name:"",projectDir:"",mergeBranch:"main",maxWorkers:"1"}),o=ti({mutationFn:d=>UA(d),onSuccess:d=>{t.invalidateQueries({queryKey:["projects"]}),e(`/projects/${encodeURIComponent(d.name)}`)},onError:d=>{i({title:"创建失败",body:d instanceof Error?d.message:String(d)})}}),c=/^[a-zA-Z0-9_-]+$/.test(r.name),f=c&&r.projectDir.trim()!==""&&!o.isPending;return m.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[m.jsxs("header",{className:"flex items-center gap-3",children:[m.jsxs("button",{type:"button",onClick:()=>e("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[m.jsx($E,{size:14,strokeWidth:3}),"返回"]}),m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:"新建项目"})]}),m.jsx("div",{className:"nb-card",children:m.jsxs("form",{onSubmit:d=>{d.preventDefault(),f&&o.mutate(r)},className:"flex flex-col gap-5",children:[m.jsxs(Yr,{label:"项目名",hint:"只能用字母、数字、下划线、连字符。例如 acme-web",children:[m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"例如: acme-web",value:r.name,onChange:d=>l({...r,name:d.target.value}),autoFocus:!0,required:!0}),r.name&&!c&&m.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:"名称只能包含 a-z A-Z 0-9 _ -"})]}),m.jsx(Yr,{label:"Git 仓库路径",hint:"本机绝对路径,如 /home/coral/code/acme",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"/home/coral/code/acme",value:r.projectDir,onChange:d=>l({...r,projectDir:d.target.value}),required:!0})}),m.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[m.jsx(Yr,{label:"合并分支",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:r.mergeBranch,onChange:d=>l({...r,mergeBranch:d.target.value})})}),m.jsx(Yr,{label:"最大 Worker 数",children:m.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:r.maxWorkers,onChange:d=>l({...r,maxWorkers:d.target.value})})})]}),m.jsxs("div",{className:"pt-2 border-t-2 border-[var(--color-text)] border-dashed",children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-3 text-[var(--color-text-muted)]",children:"可选配置"}),m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx(Yr,{label:"Git 远程项目路径",hint:"如 user/repo,空则跳过 Git API",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"user/repo",value:r.gitlabProject??"",onChange:d=>l({...r,gitlabProject:d.target.value})})}),r.gitlabProject&&m.jsx(Yr,{label:"GitLab 项目 ID",hint:"数字,GitHub 用户可留空",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"42",value:r.gitlabProjectId??"",onChange:d=>l({...r,gitlabProjectId:d.target.value})})}),m.jsx(Yr,{label:"Matrix 房间 ID",hint:"空则使用全局配置",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"!abc:matrix.example.com",value:r.matrixRoomId??"",onChange:d=>l({...r,matrixRoomId:d.target.value})})})]})]}),m.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[m.jsx("button",{type:"button",className:"nb-btn",onClick:()=>e("/projects"),disabled:o.isPending,children:"取消"}),m.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!f,"aria-label":"创建项目",children:o.isPending?m.jsxs(m.Fragment,{children:[m.jsx(cn,{size:14,strokeWidth:3,className:"animate-spin"}),"创建中…"]}):m.jsxs(m.Fragment,{children:[m.jsx(Ca,{size:14,strokeWidth:3}),"创建"]})})]})]})})]})}function Yr({label:e,hint:t,children:i}){return m.jsxs("label",{className:"flex flex-col gap-1.5",children:[m.jsx("span",{className:"text-sm font-bold",children:e}),i,t&&m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const qm=Symbol.for("yaml.alias"),im=Symbol.for("yaml.document"),xr=Symbol.for("yaml.map"),t1=Symbol.for("yaml.pair"),Vi=Symbol.for("yaml.scalar"),Il=Symbol.for("yaml.seq"),Si=Symbol.for("yaml.node.type"),wr=e=>!!e&&typeof e=="object"&&e[Si]===qm,hs=e=>!!e&&typeof e=="object"&&e[Si]===im,zl=e=>!!e&&typeof e=="object"&&e[Si]===xr,At=e=>!!e&&typeof e=="object"&&e[Si]===t1,xt=e=>!!e&&typeof e=="object"&&e[Si]===Vi,Bl=e=>!!e&&typeof e=="object"&&e[Si]===Il;function Mt(e){if(e&&typeof e=="object")switch(e[Si]){case xr:case Il:return!0}return!1}function Dt(e){if(e&&typeof e=="object")switch(e[Si]){case qm:case xr:case Vi:case Il:return!0}return!1}const n1=e=>(xt(e)||Mt(e))&&!!e.anchor,Fn=Symbol("break visit"),i1=Symbol("skip children"),Qi=Symbol("remove node");function ps(e,t){const i=a1(t);hs(e)?cl(null,e.contents,i,Object.freeze([e]))===Qi&&(e.contents=null):cl(null,e,i,Object.freeze([]))}ps.BREAK=Fn;ps.SKIP=i1;ps.REMOVE=Qi;function cl(e,t,i,r){const l=r1(e,t,i,r);if(Dt(l)||At(l))return s1(e,r,l),cl(e,l,i,r);if(typeof l!="symbol"){if(Mt(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){const c=cl(o,t.items[o],i,r);if(typeof c=="number")o=c-1;else{if(c===Fn)return Fn;c===Qi&&(t.items.splice(o,1),o-=1)}}}else if(At(t)){r=Object.freeze(r.concat(t));const o=cl("key",t.key,i,r);if(o===Fn)return Fn;o===Qi&&(t.key=null);const c=cl("value",t.value,i,r);if(c===Fn)return Fn;c===Qi&&(t.value=null)}}return l}async function Lf(e,t){const i=a1(t);hs(e)?await ul(null,e.contents,i,Object.freeze([e]))===Qi&&(e.contents=null):await ul(null,e,i,Object.freeze([]))}Lf.BREAK=Fn;Lf.SKIP=i1;Lf.REMOVE=Qi;async function ul(e,t,i,r){const l=await r1(e,t,i,r);if(Dt(l)||At(l))return s1(e,r,l),ul(e,l,i,r);if(typeof l!="symbol"){if(Mt(t)){r=Object.freeze(r.concat(t));for(let o=0;o<t.items.length;++o){const c=await ul(o,t.items[o],i,r);if(typeof c=="number")o=c-1;else{if(c===Fn)return Fn;c===Qi&&(t.items.splice(o,1),o-=1)}}}else if(At(t)){r=Object.freeze(r.concat(t));const o=await ul("key",t.key,i,r);if(o===Fn)return Fn;o===Qi&&(t.key=null);const c=await ul("value",t.value,i,r);if(c===Fn)return Fn;c===Qi&&(t.value=null)}}return l}function a1(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 r1(e,t,i,r){var l,o,c,f,d;if(typeof i=="function")return i(e,t,r);if(zl(t))return(l=i.Map)==null?void 0:l.call(i,e,t,r);if(Bl(t))return(o=i.Seq)==null?void 0:o.call(i,e,t,r);if(At(t))return(c=i.Pair)==null?void 0:c.call(i,e,t,r);if(xt(t))return(f=i.Scalar)==null?void 0:f.call(i,e,t,r);if(wr(t))return(d=i.Alias)==null?void 0:d.call(i,e,t,r)}function s1(e,t,i){const r=t[t.length-1];if(Mt(r))r.items[e]=i;else if(At(r))e==="key"?r.key=i:r.value=i;else if(hs(r))r.contents=i;else{const l=wr(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const f2={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},d2=e=>e.replace(/[!,[\]{}]/g,t=>f2[t]);class kn{constructor(t,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},kn.defaultYaml,t),this.tags=Object.assign({},kn.defaultTags,i)}clone(){const t=new kn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new kn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:kn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},kn.defaultTags);break}return t}add(t,i){this.atNextDocument&&(this.yaml={explicit:kn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},kn.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),l=r.shift();switch(l){case"%TAG":{if(r.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[o,c]=r;return this.tags[o]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const c=/^\d+\.\d+$/.test(o);return i(6,`Unsupported YAML version ${o}`,c),!1}}default:return i(0,`Unknown directive ${l}`,!0),!1}}tagName(t,i){if(t==="!")return"!";if(t[0]!=="!")return i(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const c=t.slice(2,-1);return c==="!"||c==="!!"?(i(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&i("Verbatim tags must end with a >"),c)}const[,r,l]=t.match(/^(.*!)([^!]*)$/s);l||i(`The ${t} tag has no suffix`);const o=this.tags[r];if(o)try{return o+decodeURIComponent(l)}catch(c){return i(String(c)),null}return r==="!"?t:(i(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[i,r]of Object.entries(this.tags))if(t.startsWith(r))return i+d2(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let l;if(t&&r.length>0&&Dt(t.contents)){const o={};ps(t.contents,(c,f)=>{Dt(f)&&f.tag&&(o[f.tag]=!0)}),l=Object.keys(o)}else l=[];for(const[o,c]of r)o==="!!"&&c==="tag:yaml.org,2002:"||(!t||l.some(f=>f.startsWith(c)))&&i.push(`%TAG ${o} ${c}`);return i.join(`
311
+ `)}}kn.defaultYaml={explicit:!1,version:"1.2"};kn.defaultTags={"!!":"tag:yaml.org,2002:"};function l1(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(i)}return!0}function o1(e){const t=new Set;return ps(e,{Value(i,r){r.anchor&&t.add(r.anchor)}}),t}function c1(e,t){for(let i=1;;++i){const r=`${e}${i}`;if(!t.has(r))return r}}function h2(e,t){const i=[],r=new Map;let l=null;return{onAnchor:o=>{i.push(o),l??(l=o1(e));const c=c1(t,l);return l.add(c),c},setAnchors:()=>{for(const o of i){const c=r.get(o);if(typeof c=="object"&&c.anchor&&(xt(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:r}}function fl(e,t,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let l=0,o=r.length;l<o;++l){const c=r[l],f=fl(e,r,String(l),c);f===void 0?delete r[l]:f!==c&&(r[l]=f)}else if(r instanceof Map)for(const l of Array.from(r.keys())){const o=r.get(l),c=fl(e,r,l,o);c===void 0?r.delete(l):c!==o&&r.set(l,c)}else if(r instanceof Set)for(const l of Array.from(r)){const o=fl(e,r,l,l);o===void 0?r.delete(l):o!==l&&(r.delete(l),r.add(o))}else for(const[l,o]of Object.entries(r)){const c=fl(e,r,l,o);c===void 0?delete r[l]:c!==o&&(r[l]=c)}return e.call(t,i,r)}function vi(e,t,i){if(Array.isArray(e))return e.map((r,l)=>vi(r,String(l),i));if(e&&typeof e.toJSON=="function"){if(!i||!n1(e))return e.toJSON(t,i);const r={aliasCount:0,count:1,res:void 0};i.anchors.set(e,r),i.onCreate=o=>{r.res=o,delete i.onCreate};const l=e.toJSON(t,i);return i.onCreate&&i.onCreate(l),l}return typeof e=="bigint"&&!(i!=null&&i.keep)?Number(e):e}class Hm{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:i,maxAliasCount:r,onAnchor:l,reviver:o}={}){if(!hs(t))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:t,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},f=vi(this,"",c);if(typeof l=="function")for(const{count:d,res:h}of c.anchors.values())l(h,d);return typeof o=="function"?fl(o,{"":f},"",f):f}}class jf extends Hm{constructor(t){super(qm),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,i){let r;i!=null&&i.aliasResolveCache?r=i.aliasResolveCache:(r=[],ps(t,{Node:(o,c)=>{(wr(c)||n1(c))&&r.push(c)}}),i&&(i.aliasResolveCache=r));let l;for(const o of r){if(o===this)break;o.anchor===this.source&&(l=o)}return l}toJSON(t,i){if(!i)return{source:this.source};const{anchors:r,doc:l,maxAliasCount:o}=i,c=this.resolve(l,i);if(!c){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=r.get(c);if(f||(vi(c,null,i),f=r.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=cf(l,c,r)),f.count*f.aliasCount>o)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(t,i,r){const l=`*${this.source}`;if(t){if(l1(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`${l} `}return l}}function cf(e,t,i){if(wr(t)){const r=t.resolve(e),l=i&&r&&i.get(r);return l?l.count*l.aliasCount:0}else if(Mt(t)){let r=0;for(const l of t.items){const o=cf(e,l,i);o>r&&(r=o)}return r}else if(At(t)){const r=cf(e,t.key,i),l=cf(e,t.value,i);return Math.max(r,l)}return 1}const u1=e=>!e||typeof e!="function"&&typeof e!="object";class je extends Hm{constructor(t){super(Vi),this.value=t}toJSON(t,i){return i!=null&&i.keep?this.value:vi(this.value,t,i)}toString(){return String(this.value)}}je.BLOCK_FOLDED="BLOCK_FOLDED";je.BLOCK_LITERAL="BLOCK_LITERAL";je.PLAIN="PLAIN";je.QUOTE_DOUBLE="QUOTE_DOUBLE";je.QUOTE_SINGLE="QUOTE_SINGLE";const p2="tag:yaml.org,2002:";function m2(e,t,i){if(t){const r=i.filter(o=>o.tag===t),l=r.find(o=>!o.format)??r[0];if(!l)throw new Error(`Tag ${t} not found`);return l}return i.find(r=>{var l;return((l=r.identify)==null?void 0:l.call(r,e))&&!r.format})}function ac(e,t,i){var g,v,x;if(hs(e)&&(e=e.contents),Dt(e))return e;if(At(e)){const S=(v=(g=i.schema[xr]).createNode)==null?void 0:v.call(g,i.schema,null,i);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:r,onAnchor:l,onTagObj:o,schema:c,sourceObjects:f}=i;let d;if(r&&e&&typeof e=="object"){if(d=f.get(e),d)return d.anchor??(d.anchor=l(e)),new jf(d.anchor);d={anchor:null,node:null},f.set(e,d)}t!=null&&t.startsWith("!!")&&(t=p2+t.slice(2));let h=m2(e,t,c.tags);if(!h){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const S=new je(e);return d&&(d.node=S),S}h=e instanceof Map?c[xr]:Symbol.iterator in Object(e)?c[Il]:c[xr]}o&&(o(h),delete i.onTagObj);const y=h!=null&&h.createNode?h.createNode(i.schema,e,i):typeof((x=h==null?void 0:h.nodeClass)==null?void 0:x.from)=="function"?h.nodeClass.from(i.schema,e,i):new je(e);return t?y.tag=t:h.default||(y.tag=h.tag),d&&(d.node=y),y}function xf(e,t,i){let r=i;for(let l=t.length-1;l>=0;--l){const o=t[l];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const c=[];c[o]=r,r=c}else r=new Map([[o,r]])}return ac(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Xo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class f1 extends Hm{constructor(t,i){super(t),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(t){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(i.schema=t),i.items=i.items.map(r=>Dt(r)||At(r)?r.clone(t):r),this.range&&(i.range=this.range.slice()),i}addIn(t,i){if(Xo(t))this.add(i);else{const[r,...l]=t,o=this.get(r,!0);if(Mt(o))o.addIn(l,i);else if(o===void 0&&this.schema)this.set(r,xf(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}deleteIn(t){const[i,...r]=t;if(r.length===0)return this.delete(i);const l=this.get(i,!0);if(Mt(l))return l.deleteIn(r);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}getIn(t,i){const[r,...l]=t,o=this.get(r,!0);return l.length===0?!i&&xt(o)?o.value:o:Mt(o)?o.getIn(l,i):void 0}hasAllNullValues(t){return this.items.every(i=>{if(!At(i))return!1;const r=i.value;return r==null||t&&xt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[i,...r]=t;if(r.length===0)return this.has(i);const l=this.get(i,!0);return Mt(l)?l.hasIn(r):!1}setIn(t,i){const[r,...l]=t;if(l.length===0)this.set(r,i);else{const o=this.get(r,!0);if(Mt(o))o.setIn(l,i);else if(o===void 0&&this.schema)this.set(r,xf(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}}const g2=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function _a(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Zr=(e,t,i)=>e.endsWith(`
312
+ `)?_a(i,t):i.includes(`
313
+ `)?`
314
+ `+_a(i,t):(e.endsWith(" ")?"":" ")+i,d1="flow",am="block",uf="quoted";function If(e,t,i="flow",{indentAtStart:r,lineWidth:l=80,minContentWidth:o=20,onFold:c,onOverflow:f}={}){if(!l||l<0)return e;l<o&&(o=0);const d=Math.max(1+o,1+l-t.length);if(e.length<=d)return e;const h=[],y={};let g=l-t.length;typeof r=="number"&&(r>l-Math.max(2,o)?h.push(0):g=l-r);let v,x,S=!1,w=-1,k=-1,_=-1;i===am&&(w=Iv(e,w,t.length),w!==-1&&(g=w+d));for(let A;A=e[w+=1];){if(i===uf&&A==="\\"){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(A===`
315
+ `)i===am&&(w=Iv(e,w,t.length)),g=w+t.length+d,v=void 0;else{if(A===" "&&x&&x!==" "&&x!==`
316
+ `&&x!==" "){const I=e[w+1];I&&I!==" "&&I!==`
317
+ `&&I!==" "&&(v=w)}if(w>=g)if(v)h.push(v),g=v+d,v=void 0;else if(i===uf){for(;x===" "||x===" ";)x=A,A=e[w+=1],S=!0;const I=w>_+1?w-2:k-1;if(y[I])return e;h.push(I),y[I]=!0,g=I+d,v=void 0}else S=!0}x=A}if(S&&f&&f(),h.length===0)return e;c&&c();let R=e.slice(0,h[0]);for(let A=0;A<h.length;++A){const I=h[A],$=h[A+1]||e.length;I===0?R=`
318
+ ${t}${e.slice(0,$)}`:(i===uf&&y[I]&&(R+=`${e[I]}\\`),R+=`
319
+ ${t}${e.slice(I+1,$)}`)}return R}function Iv(e,t,i){let r=t,l=t+1,o=e[l];for(;o===" "||o===" ";)if(t<l+i)o=e[++t];else{do o=e[++t];while(o&&o!==`
320
+ `);r=t,l=t+1,o=e[l]}return r}const zf=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Bf=e=>/^(%|---|\.\.\.)/m.test(e);function b2(e,t,i){if(!t||t<0)return!1;const r=t-i,l=e.length;if(l<=r)return!1;for(let o=0,c=0;o<l;++o)if(e[o]===`
321
+ `){if(o-c>r)return!0;if(c=o+1,l-c<=r)return!1}return!0}function Zo(e,t){const i=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return i;const{implicitKey:r}=t,l=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Bf(e)?" ":"");let c="",f=0;for(let d=0,h=i[d];h;h=i[++d])if(h===" "&&i[d+1]==="\\"&&i[d+2]==="n"&&(c+=i.slice(f,d)+"\\ ",d+=1,f=d,h="\\"),h==="\\")switch(i[d+1]){case"u":{c+=i.slice(f,d);const y=i.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+=i.substr(d,6)}d+=5,f=d+1}break;case"n":if(r||i[d+2]==='"'||i.length<l)d+=1;else{for(c+=i.slice(f,d)+`
322
+
323
+ `;i[d+2]==="\\"&&i[d+3]==="n"&&i[d+4]!=='"';)c+=`
324
+ `,d+=2;c+=o,i[d+2]===" "&&(c+="\\"),d+=1,f=d+1}break;default:d+=1}return c=f?c+i.slice(f):i,r?c:If(c,o,uf,zf(t,!1))}function rm(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
325
+ `)||/[ \t]\n|\n[ \t]/.test(e))return Zo(e,t);const i=t.indent||(Bf(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
326
+ ${i}`)+"'";return t.implicitKey?r:If(r,i,d1,zf(t,!1))}function dl(e,t){const{singleQuote:i}=t.options;let r;if(i===!1)r=Zo;else{const l=e.includes('"'),o=e.includes("'");l&&!o?r=rm:o&&!l?r=Zo:r=i?rm:Zo}return r(e,t)}let sm;try{sm=new RegExp(`(^|(?<!
327
+ ))
328
+ +(?!
329
+ |$)`,"g")}catch{sm=/\n+(?!\n|$)/g}function ff({comment:e,type:t,value:i},r,l,o){const{blockQuote:c,commentString:f,lineWidth:d}=r.options;if(!c||/\n[\t ]+$/.test(i))return dl(i,r);const h=r.indent||(r.forceBlockIndent||Bf(i)?" ":""),y=c==="literal"?!0:c==="folded"||t===je.BLOCK_FOLDED?!1:t===je.BLOCK_LITERAL?!0:!b2(i,d,h.length);if(!i)return y?`|
330
+ `:`>
331
+ `;let g,v;for(v=i.length;v>0;--v){const $=i[v-1];if($!==`
332
+ `&&$!==" "&&$!==" ")break}let x=i.substring(v);const S=x.indexOf(`
333
+ `);S===-1?g="-":i===x||S!==x.length-1?(g="+",o&&o()):g="",x&&(i=i.slice(0,-x.length),x[x.length-1]===`
334
+ `&&(x=x.slice(0,-1)),x=x.replace(sm,`$&${h}`));let w=!1,k,_=-1;for(k=0;k<i.length;++k){const $=i[k];if($===" ")w=!0;else if($===`
335
+ `)_=k;else break}let R=i.substring(0,_<k?_+1:k);R&&(i=i.substring(R.length),R=R.replace(/\n+/g,`$&${h}`));let I=(w?h?"2":"1":"")+g;if(e&&(I+=" "+f(e.replace(/ ?[\r\n]+/g," ")),l&&l()),!y){const $=i.replace(/\n+/g,`
336
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);let T=!1;const P=zf(r,!0);c!=="folded"&&t!==je.BLOCK_FOLDED&&(P.onOverflow=()=>{T=!0});const z=If(`${R}${$}${x}`,h,am,P);if(!T)return`>${I}
337
+ ${h}${z}`}return i=i.replace(/\n+/g,`$&${h}`),`|${I}
338
+ ${h}${R}${i}${x}`}function y2(e,t,i,r){const{type:l,value:o}=e,{actualString:c,implicitKey:f,indent:d,indentStep:h,inFlow:y}=t;if(f&&o.includes(`
339
+ `)||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(`
340
+ `)?dl(o,t):ff(e,t,i,r);if(!f&&!y&&l!==je.PLAIN&&o.includes(`
341
+ `))return ff(e,t,i,r);if(Bf(o)){if(d==="")return t.forceBlockIndent=!0,ff(e,t,i,r);if(f&&d===h)return dl(o,t)}const g=o.replace(/\n+/g,`$&
342
+ ${d}`);if(c){const v=w=>{var k;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((k=w.test)==null?void 0:k.test(g))},{compat:x,tags:S}=t.doc.schema;if(S.some(v)||x!=null&&x.some(v))return dl(o,t)}return f?g:If(g,d,d1,zf(t,!1))}function yc(e,t,i,r){const{implicitKey:l,inFlow:o}=t,c=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:f}=e;f!==je.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(f=je.QUOTE_DOUBLE);const d=y=>{switch(y){case je.BLOCK_FOLDED:case je.BLOCK_LITERAL:return l||o?dl(c.value,t):ff(c,t,i,r);case je.QUOTE_DOUBLE:return Zo(c.value,t);case je.QUOTE_SINGLE:return rm(c.value,t);case je.PLAIN:return y2(c,t,i,r);default:return null}};let h=d(f);if(h===null){const{defaultKeyType:y,defaultStringType:g}=t.options,v=l&&y||g;if(h=d(v),h===null)throw new Error(`Unsupported default string type ${v}`)}return h}function h1(e,t){const i=Object.assign({blockQuote:!0,commentString:g2,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 r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:r,options:i}}function x2(e,t){var l;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 i,r;if(xt(t)){r=t.value;let o=e.filter(c=>{var f;return(f=c.identify)==null?void 0:f.call(c,r)});if(o.length>1){const c=o.filter(f=>f.test);c.length>0&&(o=c)}i=o.find(c=>c.format===t.format)??o.find(c=>!c.format)}else r=t,i=e.find(o=>o.nodeClass&&r instanceof o.nodeClass);if(!i){const o=((l=r==null?void 0:r.constructor)==null?void 0:l.name)??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${o} value`)}return i}function v2(e,t,{anchors:i,doc:r}){if(!r.directives)return"";const l=[],o=(xt(e)||Mt(e))&&e.anchor;o&&l1(o)&&(i.add(o),l.push(`&${o}`));const c=e.tag??(t.default?null:t.tag);return c&&l.push(r.directives.tagString(c)),l.join(" ")}function Cl(e,t,i,r){var d;if(At(e))return e.toString(t,i,r);if(wr(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 l;const o=Dt(e)?e:t.doc.createNode(e,{onTagObj:h=>l=h});l??(l=x2(t.doc.schema.tags,o));const c=v2(o,l,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);const f=typeof l.stringify=="function"?l.stringify(o,t,i,r):xt(o)?yc(o,t,i,r):o.toString(t,i,r);return c?xt(o)||f[0]==="{"||f[0]==="["?`${c} ${f}`:`${c}
343
+ ${t.indent}${f}`:f}function E2({key:e,value:t},i,r,l){const{allNullValues:o,doc:c,indent:f,indentStep:d,options:{commentString:h,indentSeq:y,simpleKeys:g}}=i;let v=Dt(e)&&e.comment||null;if(g){if(v)throw new Error("With simple keys, key nodes cannot have comments");if(Mt(e)||!Dt(e)&&typeof e=="object"){const P="With simple keys, collection cannot be used as a key value";throw new Error(P)}}let x=!g&&(!e||v&&t==null&&!i.inFlow||Mt(e)||(xt(e)?e.type===je.BLOCK_FOLDED||e.type===je.BLOCK_LITERAL:typeof e=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!x&&(g||!o),indent:f+d});let S=!1,w=!1,k=Cl(e,i,()=>S=!0,()=>w=!0);if(!x&&!i.inFlow&&k.length>1024){if(g)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");x=!0}if(i.inFlow){if(o||t==null)return S&&r&&r(),k===""?"?":x?`? ${k}`:k}else if(o&&!g||t==null&&x)return k=`? ${k}`,v&&!S?k+=Zr(k,i.indent,h(v)):w&&l&&l(),k;S&&(v=null),x?(v&&(k+=Zr(k,i.indent,h(v))),k=`? ${k}
344
+ ${f}:`):(k=`${k}:`,v&&(k+=Zr(k,i.indent,h(v))));let _,R,A;Dt(t)?(_=!!t.spaceBefore,R=t.commentBefore,A=t.comment):(_=!1,R=null,A=null,t&&typeof t=="object"&&(t=c.createNode(t))),i.implicitKey=!1,!x&&!v&&xt(t)&&(i.indentAtStart=k.length+1),w=!1,!y&&d.length>=2&&!i.inFlow&&!x&&Bl(t)&&!t.flow&&!t.tag&&!t.anchor&&(i.indent=i.indent.substring(2));let I=!1;const $=Cl(t,i,()=>I=!0,()=>w=!0);let T=" ";if(v||_||R){if(T=_?`
345
+ `:"",R){const P=h(R);T+=`
346
+ ${_a(P,i.indent)}`}$===""&&!i.inFlow?T===`
347
+ `&&A&&(T=`
348
+
349
+ `):T+=`
350
+ ${i.indent}`}else if(!x&&Mt(t)){const P=$[0],z=$.indexOf(`
351
+ `),Z=z!==-1,L=i.inFlow??t.flow??t.items.length===0;if(Z||!L){let K=!1;if(Z&&(P==="&"||P==="!")){let X=$.indexOf(" ");P==="&"&&X!==-1&&X<z&&$[X+1]==="!"&&(X=$.indexOf(" ",X+1)),(X===-1||z<X)&&(K=!0)}K||(T=`
352
+ ${i.indent}`)}}else($===""||$[0]===`
353
+ `)&&(T="");return k+=T+$,i.inFlow?I&&r&&r():A&&!I?k+=Zr(k,i.indent,h(A)):w&&l&&l(),k}function p1(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Hu="<<",ka={identify:e=>e===Hu||typeof e=="symbol"&&e.description===Hu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new je(Symbol(Hu)),{addToJSMap:m1}),stringify:()=>Hu},S2=(e,t)=>(ka.identify(t)||xt(t)&&(!t.type||t.type===je.PLAIN)&&ka.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(i=>i.tag===ka.tag&&i.default));function m1(e,t,i){if(i=e&&wr(i)?i.resolve(e.doc):i,Bl(i))for(const r of i.items)fp(e,t,r);else if(Array.isArray(i))for(const r of i)fp(e,t,r);else fp(e,t,i)}function fp(e,t,i){const r=e&&wr(i)?i.resolve(e.doc):i;if(!zl(r))throw new Error("Merge sources must be maps or map aliases");const l=r.toJSON(null,e,Map);for(const[o,c]of l)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 g1(e,t,{key:i,value:r}){if(Dt(i)&&i.addToJSMap)i.addToJSMap(e,t,r);else if(S2(e,i))m1(e,t,r);else{const l=vi(i,"",e);if(t instanceof Map)t.set(l,vi(r,l,e));else if(t instanceof Set)t.add(l);else{const o=w2(i,l,e),c=vi(r,o,e);o in t?Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[o]=c}}return t}function w2(e,t,i){if(t===null)return"";if(typeof t!="object")return String(t);if(Dt(e)&&(i!=null&&i.doc)){const r=h1(i.doc,{});r.anchors=new Set;for(const o of i.anchors.keys())r.anchors.add(o.anchor);r.inFlow=!0,r.inStringifyKey=!0;const l=e.toString(r);if(!i.mapKeyWarned){let o=JSON.stringify(l);o.length>40&&(o=o.substring(0,36)+'..."'),p1(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return l}return JSON.stringify(t)}function Km(e,t,i){const r=ac(e,void 0,i),l=ac(t,void 0,i);return new gn(r,l)}class gn{constructor(t,i=null){Object.defineProperty(this,Si,{value:t1}),this.key=t,this.value=i}clone(t){let{key:i,value:r}=this;return Dt(i)&&(i=i.clone(t)),Dt(r)&&(r=r.clone(t)),new gn(i,r)}toJSON(t,i){const r=i!=null&&i.mapAsMap?new Map:{};return g1(i,r,this)}toString(t,i,r){return t!=null&&t.doc?E2(this,t,i,r):JSON.stringify(this)}}function b1(e,t,i){return(t.inFlow??e.flow?k2:_2)(e,t,i)}function _2({comment:e,items:t},i,{blockItemPrefix:r,flowChars:l,itemIndent:o,onChompKeep:c,onComment:f}){const{indent:d,options:{commentString:h}}=i,y=Object.assign({},i,{indent:o,type:null});let g=!1;const v=[];for(let S=0;S<t.length;++S){const w=t[S];let k=null;if(Dt(w))!g&&w.spaceBefore&&v.push(""),vf(i,v,w.commentBefore,g),w.comment&&(k=w.comment);else if(At(w)){const R=Dt(w.key)?w.key:null;R&&(!g&&R.spaceBefore&&v.push(""),vf(i,v,R.commentBefore,g))}g=!1;let _=Cl(w,y,()=>k=null,()=>g=!0);k&&(_+=Zr(_,o,h(k))),g&&k&&(g=!1),v.push(r+_)}let x;if(v.length===0)x=l.start+l.end;else{x=v[0];for(let S=1;S<v.length;++S){const w=v[S];x+=w?`
354
+ ${d}${w}`:`
355
+ `}}return e?(x+=`
356
+ `+_a(h(e),d),f&&f()):g&&c&&c(),x}function k2({items:e},t,{flowChars:i,itemIndent:r}){const{indent:l,indentStep:o,flowCollectionPadding:c,options:{commentString:f}}=t;r+=o;const d=Object.assign({},t,{indent:r,inFlow:!0,type:null});let h=!1,y=0;const g=[];for(let S=0;S<e.length;++S){const w=e[S];let k=null;if(Dt(w))w.spaceBefore&&g.push(""),vf(t,g,w.commentBefore,!1),w.comment&&(k=w.comment);else if(At(w)){const R=Dt(w.key)?w.key:null;R&&(R.spaceBefore&&g.push(""),vf(t,g,R.commentBefore,!1),R.comment&&(h=!0));const A=Dt(w.value)?w.value:null;A?(A.comment&&(k=A.comment),A.commentBefore&&(h=!0)):w.value==null&&(R!=null&&R.comment)&&(k=R.comment)}k&&(h=!0);let _=Cl(w,d,()=>k=null);h||(h=g.length>y||_.includes(`
357
+ `)),S<e.length-1?_+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(h||(h=g.reduce((R,A)=>R+A.length+2,2)+(_.length+2)>t.options.lineWidth)),h&&(_+=",")),k&&(_+=Zr(_,r,f(k))),g.push(_),y=g.length}const{start:v,end:x}=i;if(g.length===0)return v+x;if(!h){const S=g.reduce((w,k)=>w+k.length+2,2);h=t.options.lineWidth>0&&S>t.options.lineWidth}if(h){let S=v;for(const w of g)S+=w?`
358
+ ${o}${l}${w}`:`
359
+ `;return`${S}
360
+ ${l}${x}`}else return`${v}${c}${g.join(" ")}${c}${x}`}function vf({indent:e,options:{commentString:t}},i,r,l){if(r&&l&&(r=r.replace(/^\n+/,"")),r){const o=_a(t(r),e);i.push(o.trimStart())}}function Wr(e,t){const i=xt(t)?t.value:t;for(const r of e)if(At(r)&&(r.key===t||r.key===i||xt(r.key)&&r.key.value===i))return r}class ni extends f1{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(xr,t),this.items=[]}static from(t,i,r){const{keepUndefined:l,replacer:o}=r,c=new this(t),f=(d,h)=>{if(typeof o=="function")h=o.call(i,d,h);else if(Array.isArray(o)&&!o.includes(d))return;(h!==void 0||l)&&c.items.push(Km(d,h,r))};if(i instanceof Map)for(const[d,h]of i)f(d,h);else if(i&&typeof i=="object")for(const d of Object.keys(i))f(d,i[d]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,i){var c;let r;At(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new gn(t,t==null?void 0:t.value):r=new gn(t.key,t.value);const l=Wr(this.items,r.key),o=(c=this.schema)==null?void 0:c.sortMapEntries;if(l){if(!i)throw new Error(`Key ${r.key} already set`);xt(l.value)&&u1(r.value)?l.value.value=r.value:l.value=r.value}else if(o){const f=this.items.findIndex(d=>o(r,d)<0);f===-1?this.items.push(r):this.items.splice(f,0,r)}else this.items.push(r)}delete(t){const i=Wr(this.items,t);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(t,i){const r=Wr(this.items,t),l=r==null?void 0:r.value;return(!i&&xt(l)?l.value:l)??void 0}has(t){return!!Wr(this.items,t)}set(t,i){this.add(new gn(t,i),!0)}toJSON(t,i,r){const l=r?new r:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(l);for(const o of this.items)g1(i,l,o);return l}toString(t,i,r){if(!t)return JSON.stringify(this);for(const l of this.items)if(!At(l))throw new Error(`Map items must all be pairs; found ${JSON.stringify(l)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),b1(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:i})}}const Ul={collection:"map",default:!0,nodeClass:ni,tag:"tag:yaml.org,2002:map",resolve(e,t){return zl(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,i)=>ni.from(e,t,i)};class vr extends f1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Il,t),this.items=[]}add(t){this.items.push(t)}delete(t){const i=Ku(t);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(t,i){const r=Ku(t);if(typeof r!="number")return;const l=this.items[r];return!i&&xt(l)?l.value:l}has(t){const i=Ku(t);return typeof i=="number"&&i<this.items.length}set(t,i){const r=Ku(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const l=this.items[r];xt(l)&&u1(i)?l.value=i:this.items[r]=i}toJSON(t,i){const r=[];i!=null&&i.onCreate&&i.onCreate(r);let l=0;for(const o of this.items)r.push(vi(o,String(l++),i));return r}toString(t,i,r){return t?b1(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:i}):JSON.stringify(this)}static from(t,i,r){const{replacer:l}=r,o=new this(t);if(i&&Symbol.iterator in Object(i)){let c=0;for(let f of i){if(typeof l=="function"){const d=i instanceof Set?f:String(c++);f=l.call(i,d,f)}o.items.push(ac(f,void 0,r))}}return o}}function Ku(e){let t=xt(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:vr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Bl(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,i)=>vr.from(e,t,i)},Uf={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,i,r){return t=Object.assign({actualString:!0},t),yc(e,t,i,r)}},Ff={identify:e=>e==null,createNode:()=>new je(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new je(null),stringify:({source:e},t)=>typeof e=="string"&&Ff.test.test(e)?e:t.options.nullStr},Gm={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new je(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},i){if(e&&Gm.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?i.options.trueStr:i.options.falseStr}};function Li({format:e,minFractionDigits:t,tag:i,value:r}){if(typeof r=="bigint")return String(r);const l=typeof r=="number"?r:Number(r);if(!isFinite(l))return isNaN(l)?".nan":l<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!i||i==="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 y1={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},x1={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)}},v1={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 je(parseFloat(e)),i=e.indexOf(".");return i!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-i-1),t},stringify:Li},Pf=e=>typeof e=="bigint"||Number.isInteger(e),Ym=(e,t,i,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),i);function E1(e,t,i){const{value:r}=e;return Pf(r)&&r>=0?i+r.toString(t):Li(e)}const S1={identify:e=>Pf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,i)=>Ym(e,2,8,i),stringify:e=>E1(e,8,"0o")},w1={identify:Pf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,i)=>Ym(e,0,10,i),stringify:Li},_1={identify:e=>Pf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,i)=>Ym(e,2,16,i),stringify:e=>E1(e,16,"0x")},N2=[Ul,Fl,Uf,Ff,Gm,S1,w1,_1,y1,x1,v1];function zv(e){return typeof e=="bigint"||Number.isInteger(e)}const Gu=({value:e})=>JSON.stringify(e),T2=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Gu},{identify:e=>e==null,createNode:()=>new je(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Gu},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Gu},{identify:zv,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:i})=>i?BigInt(e):parseInt(e,10),stringify:({value:e})=>zv(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:Gu}],C2={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},A2=[Ul,Fl].concat(T2,C2),Qm={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const i=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(i.length);for(let l=0;l<i.length;++l)r[l]=i.charCodeAt(l);return r}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:i},r,l,o){if(!i)return"";const c=i;let f;if(typeof btoa=="function"){let d="";for(let h=0;h<c.length;++h)d+=String.fromCharCode(c[h]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=je.BLOCK_LITERAL),t!==je.QUOTE_DOUBLE){const d=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),h=Math.ceil(f.length/d),y=new Array(h);for(let g=0,v=0;g<h;++g,v+=d)y[g]=f.substr(v,d);f=y.join(t===je.BLOCK_LITERAL?`
361
+ `:" ")}return yc({comment:e,type:t,value:f},r,l,o)}};function k1(e,t){if(Bl(e))for(let i=0;i<e.items.length;++i){let r=e.items[i];if(!At(r)){if(zl(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");const l=r.items[0]||new gn(new je(null));if(r.commentBefore&&(l.key.commentBefore=l.key.commentBefore?`${r.commentBefore}
362
+ ${l.key.commentBefore}`:r.commentBefore),r.comment){const o=l.value??l.key;o.comment=o.comment?`${r.comment}
363
+ ${o.comment}`:r.comment}r=l}e.items[i]=At(r)?r:new gn(r)}}else t("Expected a sequence for this tag");return e}function N1(e,t,i){const{replacer:r}=i,l=new vr(e);l.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let c of t){typeof r=="function"&&(c=r.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 h=Object.keys(c);if(h.length===1)f=h[0],d=c[f];else throw new TypeError(`Expected tuple with one key, not ${h.length} keys`)}else f=c;l.items.push(Km(f,d,i))}return l}const Vm={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:k1,createNode:N1};class hl extends vr{constructor(){super(),this.add=ni.prototype.add.bind(this),this.delete=ni.prototype.delete.bind(this),this.get=ni.prototype.get.bind(this),this.has=ni.prototype.has.bind(this),this.set=ni.prototype.set.bind(this),this.tag=hl.tag}toJSON(t,i){if(!i)return super.toJSON(t);const r=new Map;i!=null&&i.onCreate&&i.onCreate(r);for(const l of this.items){let o,c;if(At(l)?(o=vi(l.key,"",i),c=vi(l.value,o,i)):o=vi(l,"",i),r.has(o))throw new Error("Ordered maps must not include duplicate keys");r.set(o,c)}return r}static from(t,i,r){const l=N1(t,i,r),o=new this;return o.items=l.items,o}}hl.tag="tag:yaml.org,2002:omap";const Xm={collection:"seq",identify:e=>e instanceof Map,nodeClass:hl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const i=k1(e,t),r=[];for(const{key:l}of i.items)xt(l)&&(r.includes(l.value)?t(`Ordered maps must not include duplicate keys: ${l.value}`):r.push(l.value));return Object.assign(new hl,i)},createNode:(e,t,i)=>hl.from(e,t,i)};function T1({value:e,source:t},i){return t&&(e?C1:A1).test.test(t)?t:e?i.options.trueStr:i.options.falseStr}const C1={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 je(!0),stringify:T1},A1={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 je(!1),stringify:T1},O2={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},R2={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)}},M2={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 je(parseFloat(e.replace(/_/g,""))),i=e.indexOf(".");if(i!==-1){const r=e.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:Li},xc=e=>typeof e=="bigint"||Number.isInteger(e);function $f(e,t,i,{intAsBigInt:r}){const l=e[0];if((l==="-"||l==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(i){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const c=BigInt(e);return l==="-"?BigInt(-1)*c:c}const o=parseInt(e,i);return l==="-"?-1*o:o}function Zm(e,t,i){const{value:r}=e;if(xc(r)){const l=r.toString(t);return r<0?"-"+i+l.substr(1):i+l}return Li(e)}const D2={identify:xc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,i)=>$f(e,2,2,i),stringify:e=>Zm(e,2,"0b")},L2={identify:xc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,i)=>$f(e,1,8,i),stringify:e=>Zm(e,8,"0")},j2={identify:xc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,i)=>$f(e,0,10,i),stringify:Li},I2={identify:xc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,i)=>$f(e,2,16,i),stringify:e=>Zm(e,16,"0x")};class pl extends ni{constructor(t){super(t),this.tag=pl.tag}add(t){let i;At(t)?i=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?i=new gn(t.key,null):i=new gn(t,null),Wr(this.items,i.key)||this.items.push(i)}get(t,i){const r=Wr(this.items,t);return!i&&At(r)?xt(r.key)?r.key.value:r.key:r}set(t,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);const r=Wr(this.items,t);r&&!i?this.items.splice(this.items.indexOf(r),1):!r&&i&&this.items.push(new gn(t))}toJSON(t,i){return super.toJSON(t,i,Set)}toString(t,i,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),i,r);throw new Error("Set items must all have null values")}static from(t,i,r){const{replacer:l}=r,o=new this(t);if(i&&Symbol.iterator in Object(i))for(let c of i)typeof l=="function"&&(c=l.call(i,c,c)),o.items.push(Km(c,null,r));return o}}pl.tag="tag:yaml.org,2002:set";const Wm={collection:"map",identify:e=>e instanceof Set,nodeClass:pl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,i)=>pl.from(e,t,i),resolve(e,t){if(zl(e)){if(e.hasAllNullValues(!0))return Object.assign(new pl,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function Jm(e,t){const i=e[0],r=i==="-"||i==="+"?e.substring(1):e,l=c=>t?BigInt(c):Number(c),o=r.replace(/_/g,"").split(":").reduce((c,f)=>c*l(60)+l(f),l(0));return i==="-"?l(-1)*o:o}function O1(e){let{value:t}=e,i=c=>c;if(typeof t=="bigint")i=c=>BigInt(c);else if(isNaN(t)||!isFinite(t))return Li(e);let r="";t<0&&(r="-",t*=i(-1));const l=i(60),o=[t%l];return t<60?o.unshift(0):(t=(t-o[0])/l,o.unshift(t%l),t>=60&&(t=(t-o[0])/l,o.unshift(t))),r+o.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const R1={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:i})=>Jm(e,i),stringify:O1},M1={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=>Jm(e,!1),stringify:O1},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[,i,r,l,o,c,f]=t.map(Number),d=t[7]?Number((t[7]+"00").substr(1,3)):0;let h=Date.UTC(i,r-1,l,o||0,c||0,f||0,d);const y=t[8];if(y&&y!=="Z"){let g=Jm(y,!1);Math.abs(g)<30&&(g*=60),h-=6e4*g}return new Date(h)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Bv=[Ul,Fl,Uf,Ff,C1,A1,D2,L2,j2,I2,O2,R2,M2,Qm,ka,Xm,Vm,Wm,R1,M1,qf],Uv=new Map([["core",N2],["failsafe",[Ul,Fl,Uf]],["json",A2],["yaml11",Bv],["yaml-1.1",Bv]]),Fv={binary:Qm,bool:Gm,float:v1,floatExp:x1,floatNaN:y1,floatTime:M1,int:w1,intHex:_1,intOct:S1,intTime:R1,map:Ul,merge:ka,null:Ff,omap:Xm,pairs:Vm,seq:Fl,set:Wm,timestamp:qf},z2={"tag:yaml.org,2002:binary":Qm,"tag:yaml.org,2002:merge":ka,"tag:yaml.org,2002:omap":Xm,"tag:yaml.org,2002:pairs":Vm,"tag:yaml.org,2002:set":Wm,"tag:yaml.org,2002:timestamp":qf};function dp(e,t,i){const r=Uv.get(t);if(r&&!e)return i&&!r.includes(ka)?r.concat(ka):r.slice();let l=r;if(!l)if(Array.isArray(e))l=[];else{const o=Array.from(Uv.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)l=l.concat(o);else typeof e=="function"&&(l=e(l.slice()));return i&&(l=l.concat(ka)),l.reduce((o,c)=>{const f=typeof c=="string"?Fv[c]:c;if(!f){const d=JSON.stringify(c),h=Object.keys(Fv).map(y=>JSON.stringify(y)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${h}`)}return o.includes(f)||o.push(f),o},[])}const B2=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let D1=class L1{constructor({compat:t,customTags:i,merge:r,resolveKnownTags:l,schema:o,sortMapEntries:c,toStringDefaults:f}){this.compat=Array.isArray(t)?dp(t,"compat"):t?dp(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=l?z2:{},this.tags=dp(i,this.name,r),this.toStringOptions=f??null,Object.defineProperty(this,xr,{value:Ul}),Object.defineProperty(this,Vi,{value:Uf}),Object.defineProperty(this,Il,{value:Fl}),this.sortMapEntries=typeof c=="function"?c:c===!0?B2:null}clone(){const t=Object.create(L1.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function U2(e,t){var d;const i=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const h=e.directives.toString(e);h?(i.push(h),r=!0):e.directives.docStart&&(r=!0)}r&&i.push("---");const l=h1(e,t),{commentString:o}=l.options;if(e.commentBefore){i.length!==1&&i.unshift("");const h=o(e.commentBefore);i.unshift(_a(h,""))}let c=!1,f=null;if(e.contents){if(Dt(e.contents)){if(e.contents.spaceBefore&&r&&i.push(""),e.contents.commentBefore){const g=o(e.contents.commentBefore);i.push(_a(g,""))}l.forceBlockIndent=!!e.comment,f=e.contents.comment}const h=f?void 0:()=>c=!0;let y=Cl(e.contents,l,()=>f=null,h);f&&(y+=Zr(y,"",o(f))),(y[0]==="|"||y[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${y}`:i.push(y)}else i.push(Cl(e.contents,l));if((d=e.directives)!=null&&d.docEnd)if(e.comment){const h=o(e.comment);h.includes(`
364
+ `)?(i.push("..."),i.push(_a(h,""))):i.push(`... ${h}`)}else i.push("...");else{let h=e.comment;h&&c&&(h=h.replace(/^\n+/,"")),h&&((!c||f)&&i[i.length-1]!==""&&i.push(""),i.push(_a(o(h),"")))}return i.join(`
365
+ `)+`
366
+ `}class Pl{constructor(t,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Si,{value:im});let l=null;typeof i=="function"||Array.isArray(i)?l=i:r===void 0&&i&&(r=i,i=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:c}=o;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new kn({version:c}),this.setSchema(c,r),this.contents=t===void 0?null:this.createNode(t,l,r)}clone(){const t=Object.create(Pl.prototype,{[Si]:{value:im}});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=Dt(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,i){nl(this.contents)&&this.contents.addIn(t,i)}createAlias(t,i){if(!t.anchor){const r=o1(this);t.anchor=!i||r.has(i)?c1(i||"a",r):i}return new jf(t.anchor)}createNode(t,i,r){let l;if(typeof i=="function")t=i.call({"":t},"",t),l=i;else if(Array.isArray(i)){const k=R=>typeof R=="number"||R instanceof String||R instanceof Number,_=i.filter(k).map(String);_.length>0&&(i=i.concat(_)),l=i}else r===void 0&&i&&(r=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:c,flow:f,keepUndefined:d,onTagObj:h,tag:y}=r??{},{onAnchor:g,setAnchors:v,sourceObjects:x}=h2(this,c||"a"),S={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:g,onTagObj:h,replacer:l,schema:this.schema,sourceObjects:x},w=ac(t,y,S);return f&&Mt(w)&&(w.flow=!0),v(),w}createPair(t,i,r={}){const l=this.createNode(t,null,r),o=this.createNode(i,null,r);return new gn(l,o)}delete(t){return nl(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Xo(t)?this.contents==null?!1:(this.contents=null,!0):nl(this.contents)?this.contents.deleteIn(t):!1}get(t,i){return Mt(this.contents)?this.contents.get(t,i):void 0}getIn(t,i){return Xo(t)?!i&&xt(this.contents)?this.contents.value:this.contents:Mt(this.contents)?this.contents.getIn(t,i):void 0}has(t){return Mt(this.contents)?this.contents.has(t):!1}hasIn(t){return Xo(t)?this.contents!==void 0:Mt(this.contents)?this.contents.hasIn(t):!1}set(t,i){this.contents==null?this.contents=xf(this.schema,[t],i):nl(this.contents)&&this.contents.set(t,i)}setIn(t,i){Xo(t)?this.contents=i:this.contents==null?this.contents=xf(this.schema,Array.from(t),i):nl(this.contents)&&this.contents.setIn(t,i)}setSchema(t,i={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new kn({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new kn({version:t}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const l=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${l}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(r)this.schema=new D1(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:i,mapAsMap:r,maxAliasCount:l,onAnchor:o,reviver:c}={}){const f={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},d=vi(this.contents,i??"",f);if(typeof o=="function")for(const{count:h,res:y}of f.anchors.values())o(y,h);return typeof c=="function"?fl(c,{"":d},"",d):d}toJSON(t,i){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:i})}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 i=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return U2(this,t)}}function nl(e){if(Mt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class eg extends Error{constructor(t,i,r,l){super(),this.name=t,this.code=r,this.message=l,this.pos=i}}class Jr extends eg{constructor(t,i,r){super("YAMLParseError",t,i,r)}}class j1 extends eg{constructor(t,i,r){super("YAMLWarning",t,i,r)}}const Ef=(e,t)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(f=>t.linePos(f));const{line:r,col:l}=i.linePos[0];i.message+=` at line ${r}, column ${l}`;let o=l-1,c=e.substring(t.lineStarts[r-1],t.lineStarts[r]).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)+"…"),r>1&&/^ *$/.test(c.substring(0,o))){let f=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);f.length>80&&(f=f.substring(0,79)+`…
367
+ `),c=f+c}if(/[^ ]/.test(c)){let f=1;const d=i.linePos[1];(d==null?void 0:d.line)===r&&d.col>l&&(f=Math.max(1,Math.min(d.col-l,80-o)));const h=" ".repeat(o)+"^".repeat(f);i.message+=`:
368
+
369
+ ${c}
370
+ ${h}
371
+ `}};function Al(e,{flow:t,indicator:i,next:r,offset:l,onError:o,parentIndent:c,startOnNewline:f}){let d=!1,h=f,y=f,g="",v="",x=!1,S=!1,w=null,k=null,_=null,R=null,A=null,I=null,$=null;for(const z of e)switch(S&&(z.type!=="space"&&z.type!=="newline"&&z.type!=="comma"&&o(z.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S=!1),w&&(h&&z.type!=="comment"&&z.type!=="newline"&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),z.type){case"space":!t&&(i!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&z.source.includes(" ")&&(w=z),y=!0;break;case"comment":{y||o(z,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const Z=z.source.substring(1)||" ";g?g+=v+Z:g=Z,v="",h=!1;break}case"newline":h?g?g+=z.source:(!I||i!=="seq-item-ind")&&(d=!0):v+=z.source,h=!0,x=!0,(k||_)&&(R=z),y=!0;break;case"anchor":k&&o(z,"MULTIPLE_ANCHORS","A node can have at most one anchor"),z.source.endsWith(":")&&o(z.offset+z.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=z,$??($=z.offset),h=!1,y=!1,S=!0;break;case"tag":{_&&o(z,"MULTIPLE_TAGS","A node can have at most one tag"),_=z,$??($=z.offset),h=!1,y=!1,S=!0;break}case i:(k||_)&&o(z,"BAD_PROP_ORDER",`Anchors and tags must be after the ${z.source} indicator`),I&&o(z,"UNEXPECTED_TOKEN",`Unexpected ${z.source} in ${t??"collection"}`),I=z,h=i==="seq-item-ind"||i==="explicit-key-ind",y=!1;break;case"comma":if(t){A&&o(z,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),A=z,h=!1,y=!1;break}default:o(z,"UNEXPECTED_TOKEN",`Unexpected ${z.type} token`),h=!1,y=!1}const T=e[e.length-1],P=T?T.offset+T.source.length:l;return S&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(h&&w.indent<=c||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:A,found:I,spaceBefore:d,comment:g,hasNewline:x,anchor:k,tag:_,newlineAfterProp:R,end:P,start:$??P}}function rc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
372
+ `))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 i of t.start)if(i.type==="newline")return!0;if(t.sep){for(const i of t.sep)if(i.type==="newline")return!0}if(rc(t.key)||rc(t.value))return!0}return!1;default:return!0}}function lm(e,t,i){if((t==null?void 0:t.type)==="flow-collection"){const r=t.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&rc(t)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function I1(e,t,i){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const l=typeof r=="function"?r:(o,c)=>o===c||xt(o)&&xt(c)&&o.value===c.value;return t.some(o=>l(o.key,i))}const Pv="All mapping items must start at the same column";function F2({composeNode:e,composeEmptyNode:t},i,r,l,o){var y;const c=(o==null?void 0:o.nodeClass)??ni,f=new c(i.schema);i.atRoot&&(i.atRoot=!1);let d=r.offset,h=null;for(const g of r.items){const{start:v,key:x,sep:S,value:w}=g,k=Al(v,{indicator:"explicit-key-ind",next:x??(S==null?void 0:S[0]),offset:d,onError:l,parentIndent:r.indent,startOnNewline:!0}),_=!k.found;if(_){if(x&&(x.type==="block-seq"?l(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==r.indent&&l(d,"BAD_INDENT",Pv)),!k.anchor&&!k.tag&&!S){h=k.end,k.comment&&(f.comment?f.comment+=`
373
+ `+k.comment:f.comment=k.comment);continue}(k.newlineAfterProp||rc(x))&&l(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((y=k.found)==null?void 0:y.indent)!==r.indent&&l(d,"BAD_INDENT",Pv);i.atKey=!0;const R=k.end,A=x?e(i,x,k,l):t(i,R,v,null,k,l);i.schema.compat&&lm(r.indent,x,l),i.atKey=!1,I1(i,f.items,A)&&l(R,"DUPLICATE_KEY","Map keys must be unique");const I=Al(S??[],{indicator:"map-value-ind",next:w,offset:A.range[2],onError:l,parentIndent:r.indent,startOnNewline:!x||x.type==="block-scalar"});if(d=I.end,I.found){_&&((w==null?void 0:w.type)==="block-map"&&!I.hasNewline&&l(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&k.start<I.found.offset-1024&&l(A.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const $=w?e(i,w,I,l):t(i,d,S,null,I,l);i.schema.compat&&lm(r.indent,w,l),d=$.range[2];const T=new gn(A,$);i.options.keepSourceTokens&&(T.srcToken=g),f.items.push(T)}else{_&&l(A.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),I.comment&&(A.comment?A.comment+=`
374
+ `+I.comment:A.comment=I.comment);const $=new gn(A);i.options.keepSourceTokens&&($.srcToken=g),f.items.push($)}}return h&&h<d&&l(h,"IMPOSSIBLE","Map comment with trailing content"),f.range=[r.offset,d,h??d],f}function P2({composeNode:e,composeEmptyNode:t},i,r,l,o){const c=(o==null?void 0:o.nodeClass)??vr,f=new c(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let d=r.offset,h=null;for(const{start:y,value:g}of r.items){const v=Al(y,{indicator:"seq-item-ind",next:g,offset:d,onError:l,parentIndent:r.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||g)(g==null?void 0:g.type)==="block-seq"?l(v.end,"BAD_INDENT","All sequence items must start at the same column"):l(d,"MISSING_CHAR","Sequence item without - indicator");else{h=v.end,v.comment&&(f.comment=v.comment);continue}const x=g?e(i,g,v,l):t(i,v.end,y,null,v,l);i.schema.compat&&lm(r.indent,g,l),d=x.range[2],f.items.push(x)}return f.range=[r.offset,d,h??d],f}function vc(e,t,i,r){let l="";if(e){let o=!1,c="";for(const f of e){const{source:d,type:h}=f;switch(h){case"space":o=!0;break;case"comment":{i&&!o&&r(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const y=d.substring(1)||" ";l?l+=c+y:l=y,c="";break}case"newline":l&&(c+=d),o=!0;break;default:r(f,"UNEXPECTED_TOKEN",`Unexpected ${h} at node end`)}t+=d.length}}return{comment:l,offset:t}}const hp="Block collections are not allowed within flow collections",pp=e=>e&&(e.type==="block-map"||e.type==="block-seq");function $2({composeNode:e,composeEmptyNode:t},i,r,l,o){var k;const c=r.start.source==="{",f=c?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(c?ni:vr),h=new d(i.schema);h.flow=!0;const y=i.atRoot;y&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let g=r.offset+r.start.source.length;for(let _=0;_<r.items.length;++_){const R=r.items[_],{start:A,key:I,sep:$,value:T}=R,P=Al(A,{flow:f,indicator:"explicit-key-ind",next:I??($==null?void 0:$[0]),offset:g,onError:l,parentIndent:r.indent,startOnNewline:!1});if(!P.found){if(!P.anchor&&!P.tag&&!$&&!T){_===0&&P.comma?l(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):_<r.items.length-1&&l(P.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),P.comment&&(h.comment?h.comment+=`
375
+ `+P.comment:h.comment=P.comment),g=P.end;continue}!c&&i.options.strict&&rc(I)&&l(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)P.comma&&l(P.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(P.comma||l(P.start,"MISSING_CHAR",`Missing , between ${f} items`),P.comment){let z="";e:for(const Z of A)switch(Z.type){case"comma":case"space":break;case"comment":z=Z.source.substring(1);break e;default:break e}if(z){let Z=h.items[h.items.length-1];At(Z)&&(Z=Z.value??Z.key),Z.comment?Z.comment+=`
376
+ `+z:Z.comment=z,P.comment=P.comment.substring(z.length+1)}}if(!c&&!$&&!P.found){const z=T?e(i,T,P,l):t(i,P.end,$,null,P,l);h.items.push(z),g=z.range[2],pp(T)&&l(z.range,"BLOCK_IN_FLOW",hp)}else{i.atKey=!0;const z=P.end,Z=I?e(i,I,P,l):t(i,z,A,null,P,l);pp(I)&&l(Z.range,"BLOCK_IN_FLOW",hp),i.atKey=!1;const L=Al($??[],{flow:f,indicator:"map-value-ind",next:T,offset:Z.range[2],onError:l,parentIndent:r.indent,startOnNewline:!1});if(L.found){if(!c&&!P.found&&i.options.strict){if($)for(const oe of $){if(oe===L.found)break;if(oe.type==="newline"){l(oe,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}P.start<L.found.offset-1024&&l(L.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else T&&("source"in T&&((k=T.source)==null?void 0:k[0])===":"?l(T,"MISSING_CHAR",`Missing space after : in ${f}`):l(L.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const K=T?e(i,T,L,l):L.found?t(i,L.end,$,null,L,l):null;K?pp(T)&&l(K.range,"BLOCK_IN_FLOW",hp):L.comment&&(Z.comment?Z.comment+=`
377
+ `+L.comment:Z.comment=L.comment);const X=new gn(Z,K);if(i.options.keepSourceTokens&&(X.srcToken=R),c){const oe=h;I1(i,oe.items,Z)&&l(z,"DUPLICATE_KEY","Map keys must be unique"),oe.items.push(X)}else{const oe=new ni(i.schema);oe.flow=!0,oe.items.push(X);const se=(K??Z).range;oe.range=[Z.range[0],se[1],se[2]],h.items.push(oe)}g=K?K.range[2]:L.end}}const v=c?"}":"]",[x,...S]=r.end;let w=g;if((x==null?void 0:x.source)===v)w=x.offset+x.source.length;else{const _=f[0].toUpperCase()+f.substring(1),R=y?`${_} must end with a ${v}`:`${_} in block collection must be sufficiently indented and end with a ${v}`;l(g,y?"MISSING_CHAR":"BAD_INDENT",R),x&&x.source.length!==1&&S.unshift(x)}if(S.length>0){const _=vc(S,w,i.options.strict,l);_.comment&&(h.comment?h.comment+=`
378
+ `+_.comment:h.comment=_.comment),h.range=[r.offset,w,_.offset]}else h.range=[r.offset,w,w];return h}function mp(e,t,i,r,l,o){const c=i.type==="block-map"?F2(e,t,i,r,o):i.type==="block-seq"?P2(e,t,i,r,o):$2(e,t,i,r,o),f=c.constructor;return l==="!"||l===f.tagName?(c.tag=f.tagName,c):(l&&(c.tag=l),c)}function q2(e,t,i,r,l){var v;const o=r.tag,c=o?t.directives.tagName(o.source,x=>l(o,"TAG_RESOLVE_FAILED",x)):null;if(i.type==="block-seq"){const{anchor:x,newlineAfterProp:S}=r,w=x&&o?x.offset>o.offset?x:o:x??o;w&&(!S||S.offset<w.offset)&&l(w,"MISSING_CHAR","Missing newline after block sequence props")}const f=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!o||!c||c==="!"||c===ni.tagName&&f==="map"||c===vr.tagName&&f==="seq")return mp(e,t,i,l,c);let d=t.schema.tags.find(x=>x.tag===c&&x.collection===f);if(!d){const x=t.schema.knownTags[c];if((x==null?void 0:x.collection)===f)t.schema.tags.push(Object.assign({},x,{default:!1})),d=x;else return x?l(o,"BAD_COLLECTION_TYPE",`${x.tag} used for ${f} collection, but expects ${x.collection??"scalar"}`,!0):l(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),mp(e,t,i,l,c)}const h=mp(e,t,i,l,c,d),y=((v=d.resolve)==null?void 0:v.call(d,h,x=>l(o,"TAG_RESOLVE_FAILED",x),t.options))??h,g=Dt(y)?y:new je(y);return g.range=h.range,g.tag=c,d!=null&&d.format&&(g.format=d.format),g}function z1(e,t,i){const r=t.offset,l=H2(t,e.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[r,r,r]};const o=l.mode===">"?je.BLOCK_FOLDED:je.BLOCK_LITERAL,c=t.source?K2(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=l.chomp==="+"&&c.length>0?`
379
+ `.repeat(Math.max(1,c.length-1)):"";let k=r+l.length;return t.source&&(k+=t.source.length),{value:w,type:o,comment:l.comment,range:[r,k,k]}}let d=t.indent+l.indent,h=t.offset+l.length,y=0;for(let w=0;w<f;++w){const[k,_]=c[w];if(_===""||_==="\r")l.indent===0&&k.length>d&&(d=k.length);else{k.length<d&&i(h+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),l.indent===0&&(d=k.length),y=w,d===0&&!e.atRoot&&i(h,"BAD_INDENT","Block scalar values in collections must be indented");break}h+=k.length+_.length+1}for(let w=c.length-1;w>=f;--w)c[w][0].length>d&&(f=w+1);let g="",v="",x=!1;for(let w=0;w<y;++w)g+=c[w][0].slice(d)+`
380
+ `;for(let w=y;w<f;++w){let[k,_]=c[w];h+=k.length+_.length+1;const R=_[_.length-1]==="\r";if(R&&(_=_.slice(0,-1)),_&&k.length<d){const I=`Block scalar lines must not be less indented than their ${l.indent?"explicit indentation indicator":"first line"}`;i(h-_.length-(R?2:1),"BAD_INDENT",I),k=""}o===je.BLOCK_LITERAL?(g+=v+k.slice(d)+_,v=`
381
+ `):k.length>d||_[0]===" "?(v===" "?v=`
382
+ `:!x&&v===`
383
+ `&&(v=`
384
+
385
+ `),g+=v+k.slice(d)+_,v=`
386
+ `,x=!0):_===""?v===`
387
+ `?g+=`
388
+ `:v=`
389
+ `:(g+=v+_,v=" ",x=!1)}switch(l.chomp){case"-":break;case"+":for(let w=f;w<c.length;++w)g+=`
390
+ `+c[w][0].slice(d);g[g.length-1]!==`
391
+ `&&(g+=`
392
+ `);break;default:g+=`
393
+ `}const S=r+l.length+t.source.length;return{value:g,type:o,comment:l.comment,range:[r,S,S]}}function H2({offset:e,props:t},i,r){if(t[0].type!=="block-scalar-header")return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:l}=t[0],o=l[0];let c=0,f="",d=-1;for(let v=1;v<l.length;++v){const x=l[v];if(!f&&(x==="-"||x==="+"))f=x;else{const S=Number(x);!c&&S?c=S:d===-1&&(d=e+v)}}d!==-1&&r(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let h=!1,y="",g=l.length;for(let v=1;v<t.length;++v){const x=t[v];switch(x.type){case"space":h=!0;case"newline":g+=x.source.length;break;case"comment":i&&!h&&r(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),g+=x.source.length,y=x.source.substring(1);break;case"error":r(x,"UNEXPECTED_TOKEN",x.message),g+=x.source.length;break;default:{const S=`Unexpected token in block scalar header: ${x.type}`;r(x,"UNEXPECTED_TOKEN",S);const w=x.source;w&&typeof w=="string"&&(g+=w.length)}}}return{mode:o,indent:c,chomp:f,comment:y,length:g}}function K2(e){const t=e.split(/\n( *)/),i=t[0],r=i.match(/^( *)/),o=[r!=null&&r[1]?[r[1],i.slice(r[1].length)]:["",i]];for(let c=1;c<t.length;c+=2)o.push([t[c],t[c+1]]);return o}function B1(e,t,i){const{offset:r,type:l,source:o,end:c}=e;let f,d;const h=(v,x,S)=>i(r+v,x,S);switch(l){case"scalar":f=je.PLAIN,d=G2(o,h);break;case"single-quoted-scalar":f=je.QUOTE_SINGLE,d=Y2(o,h);break;case"double-quoted-scalar":f=je.QUOTE_DOUBLE,d=Q2(o,h);break;default:return i(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[r,r+o.length,r+o.length]}}const y=r+o.length,g=vc(c,y,t,i);return{value:d,type:f,comment:g.comment,range:[r,y,g.offset]}}function G2(e,t){let i="";switch(e[0]){case" ":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${e[0]}`;break}case"@":case"`":{i=`reserved character ${e[0]}`;break}}return i&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),U1(e)}function Y2(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),U1(e.slice(1,-1)).replace(/''/g,"'")}function U1(e){let t,i;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
394
+ `,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
395
+ `,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let l=r[1],o=" ",c=t.lastIndex;for(i.lastIndex=c;r=i.exec(e);)r[1]===""?o===`
396
+ `?l+=o:o=`
397
+ `:(l+=o+r[1],o=" "),c=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=c,r=f.exec(e),l+o+((r==null?void 0:r[1])??"")}function Q2(e,t){let i="";for(let r=1;r<e.length-1;++r){const l=e[r];if(!(l==="\r"&&e[r+1]===`
398
+ `))if(l===`
399
+ `){const{fold:o,offset:c}=V2(e,r);i+=o,r=c}else if(l==="\\"){let o=e[++r];const c=X2[o];if(c)i+=c;else if(o===`
400
+ `)for(o=e[r+1];o===" "||o===" ";)o=e[++r+1];else if(o==="\r"&&e[r+1]===`
401
+ `)for(o=e[++r+1];o===" "||o===" ";)o=e[++r+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];i+=Z2(e,r+1,f,t),r+=f}else{const f=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(l===" "||l===" "){const o=r;let c=e[r+1];for(;c===" "||c===" ";)c=e[++r+1];c!==`
402
+ `&&!(c==="\r"&&e[r+2]===`
403
+ `)&&(i+=r>o?e.slice(o,r+1):l)}else i+=l}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),i}function V2(e,t){let i="",r=e[t+1];for(;(r===" "||r===" "||r===`
404
+ `||r==="\r")&&!(r==="\r"&&e[t+2]!==`
405
+ `);)r===`
406
+ `&&(i+=`
407
+ `),t+=1,r=e[t+1];return i||(i=" "),{fold:i,offset:t}}const X2={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
408
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Z2(e,t,i,r){const l=e.substr(t,i),c=l.length===i&&/^[0-9a-fA-F]+$/.test(l)?parseInt(l,16):NaN;if(isNaN(c)){const f=e.substr(t-2,i+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(c)}function F1(e,t,i,r){const{value:l,type:o,comment:c,range:f}=t.type==="block-scalar"?z1(e,t,r):B1(t,e.options.strict,r),d=i?e.directives.tagName(i.source,g=>r(i,"TAG_RESOLVE_FAILED",g)):null;let h;e.options.stringKeys&&e.atKey?h=e.schema[Vi]:d?h=W2(e.schema,l,d,i,r):t.type==="scalar"?h=J2(e,l,t,r):h=e.schema[Vi];let y;try{const g=h.resolve(l,v=>r(i??t,"TAG_RESOLVE_FAILED",v),e.options);y=xt(g)?g:new je(g)}catch(g){const v=g instanceof Error?g.message:String(g);r(i??t,"TAG_RESOLVE_FAILED",v),y=new je(l)}return y.range=f,y.source=l,o&&(y.type=o),d&&(y.tag=d),h.format&&(y.format=h.format),c&&(y.comment=c),y}function W2(e,t,i,r,l){var f;if(i==="!")return e[Vi];const o=[];for(const d of e.tags)if(!d.collection&&d.tag===i)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[i];return c&&!c.collection?(e.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(l(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),e[Vi])}function J2({atKey:e,directives:t,schema:i},r,l,o){const c=i.tags.find(f=>{var d;return(f.default===!0||e&&f.default==="key")&&((d=f.test)==null?void 0:d.test(r))})||i[Vi];if(i.compat){const f=i.compat.find(d=>{var h;return d.default&&((h=d.test)==null?void 0:h.test(r))})??i[Vi];if(c.tag!==f.tag){const d=t.tagString(c.tag),h=t.tagString(f.tag),y=`Value may be parsed as either ${d} or ${h}`;o(l,"TAG_RESOLVE_FAILED",y,!0)}}return c}function eO(e,t,i){if(t){i??(i=t.length);for(let r=i-1;r>=0;--r){let l=t[r];switch(l.type){case"space":case"comment":case"newline":e-=l.source.length;continue}for(l=t[++r];(l==null?void 0:l.type)==="space";)e+=l.source.length,l=t[++r];break}}return e}const tO={composeNode:P1,composeEmptyNode:tg};function P1(e,t,i,r){const l=e.atKey,{spaceBefore:o,comment:c,anchor:f,tag:d}=i;let h,y=!0;switch(t.type){case"alias":h=nO(e,t,r),(f||d)&&r(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":h=F1(e,t,d,r),f&&(h.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{h=q2(tO,e,t,i,r),f&&(h.anchor=f.source.substring(1))}catch(g){const v=g instanceof Error?g.message:String(g);r(t,"RESOURCE_EXHAUSTION",v)}break;default:{const g=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",g),y=!1}}return h??(h=tg(e,t.offset,void 0,null,i,r)),f&&h.anchor===""&&r(f,"BAD_ALIAS","Anchor cannot be an empty string"),l&&e.options.stringKeys&&(!xt(h)||typeof h.value!="string"||h.tag&&h.tag!=="tag:yaml.org,2002:str")&&r(d??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(h.spaceBefore=!0),c&&(t.type==="scalar"&&t.source===""?h.comment=c:h.commentBefore=c),e.options.keepSourceTokens&&y&&(h.srcToken=t),h}function tg(e,t,i,r,{spaceBefore:l,comment:o,anchor:c,tag:f,end:d},h){const y={type:"scalar",offset:eO(t,i,r),indent:-1,source:""},g=F1(e,y,f,h);return c&&(g.anchor=c.source.substring(1),g.anchor===""&&h(c,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(g.spaceBefore=!0),o&&(g.comment=o,g.range[2]=d),g}function nO({options:e},{offset:t,source:i,end:r},l){const o=new jf(i.substring(1));o.source===""&&l(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&l(t+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+i.length,f=vc(r,c,e.strict,l);return o.range=[t,c,f.offset],f.comment&&(o.comment=f.comment),o}function iO(e,t,{offset:i,start:r,value:l,end:o},c){const f=Object.assign({_directives:t},e),d=new Pl(void 0,f),h={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},y=Al(r,{indicator:"doc-start",next:l??(o==null?void 0:o[0]),offset:i,onError:c,parentIndent:0,startOnNewline:!0});y.found&&(d.directives.docStart=!0,l&&(l.type==="block-map"||l.type==="block-seq")&&!y.hasNewline&&c(y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=l?P1(h,l,y,c):tg(h,y.end,r,null,y,c);const g=d.contents.range[2],v=vc(o,g,!1,c);return v.comment&&(d.comment=v.comment),d.range=[i,g,v.offset],d}function qo(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:i}=e;return[t,t+(typeof i=="string"?i.length:1)]}function $v(e){var l;let t="",i=!1,r=!1;for(let o=0;o<e.length;++o){const c=e[o];switch(c[0]){case"#":t+=(t===""?"":r?`
409
+
410
+ `:`
411
+ `)+(c.substring(1)||" "),i=!0,r=!1;break;case"%":((l=e[o+1])==null?void 0:l[0])!=="#"&&(o+=1),i=!1;break;default:i||(r=!0),i=!1}}return{comment:t,afterEmptyLine:r}}class ng{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,l,o)=>{const c=qo(i);o?this.warnings.push(new j1(c,r,l)):this.errors.push(new Jr(c,r,l))},this.directives=new kn({version:t.version||"1.2"}),this.options=t}decorate(t,i){const{comment:r,afterEmptyLine:l}=$v(this.prelude);if(r){const o=t.contents;if(i)t.comment=t.comment?`${t.comment}
412
+ ${r}`:r;else if(l||t.directives.docStart||!o)t.commentBefore=r;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?`${r}
413
+ ${f}`:r}else{const c=o.commentBefore;o.commentBefore=c?`${r}
414
+ ${c}`:r}}i?(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:$v(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,i=!1,r=-1){for(const l of t)yield*this.next(l);yield*this.end(i,r)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(i,r,l)=>{const o=qo(t);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",r,l)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const i=iO(this.options,this.directives,t,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const i=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new Jr(qo(t),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new Jr(qo(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const i=vc(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
415
+ ${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new Jr(qo(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const r=Object.assign({_directives:this.directives},this.options),l=new Pl(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),l.range=[0,i,i],this.decorate(l,!1),yield l}}}function aO(e,t=!0,i){if(e){const r=(l,o,c)=>{const f=typeof l=="number"?l:Array.isArray(l)?l[0]:l.offset;if(i)i(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 B1(e,t,r);case"block-scalar":return z1({options:{strict:t}},e,r)}}return null}function rO(e,t){const{implicitKey:i=!1,indent:r,inFlow:l=!1,offset:o=-1,type:c="PLAIN"}=t,f=yc({type:c,value:e},{implicitKey:i,indent:r>0?" ".repeat(r):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}}),d=t.end??[{type:"newline",offset:-1,indent:r,source:`
416
+ `}];switch(f[0]){case"|":case">":{const h=f.indexOf(`
417
+ `),y=f.substring(0,h),g=f.substring(h+1)+`
418
+ `,v=[{type:"block-scalar-header",offset:o,indent:r,source:y}];return $1(v,d)||v.push({type:"newline",offset:-1,indent:r,source:`
419
+ `}),{type:"block-scalar",offset:o,indent:r,props:v,source:g}}case'"':return{type:"double-quoted-scalar",offset:o,indent:r,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:r,source:f,end:d};default:return{type:"scalar",offset:o,indent:r,source:f,end:d}}}function sO(e,t,i={}){let{afterKey:r=!1,implicitKey:l=!1,inFlow:o=!1,type:c}=i,f="indent"in e?e.indent:null;if(r&&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 h=e.props[0];if(h.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=h.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const d=yc({type:c,value:t},{implicitKey:l||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":lO(e,d);break;case'"':gp(e,d,"double-quoted-scalar");break;case"'":gp(e,d,"single-quoted-scalar");break;default:gp(e,d,"scalar")}}function lO(e,t){const i=t.indexOf(`
420
+ `),r=t.substring(0,i),l=t.substring(i+1)+`
421
+ `;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=r,e.source=l}else{const{offset:o}=e,c="indent"in e?e.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:c,source:r}];$1(f,"end"in e?e.end:void 0)||f.push({type:"newline",offset:-1,indent:c,source:`
422
+ `});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:l})}}function $1(e,t){if(t)for(const i of t)switch(i.type){case"space":case"comment":e.push(i);break;case"newline":return e.push(i),!0}return!1}function gp(e,t,i){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=i,e.source=t;break;case"block-scalar":{const r=e.props.slice(1);let l=t.length;e.props[0].type==="block-scalar-header"&&(l-=e.props[0].source.length);for(const o of r)o.offset+=l;delete e.props,Object.assign(e,{type:i,source:t,end:r});break}case"block-map":case"block-seq":{const l={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
423
+ `};delete e.items,Object.assign(e,{type:i,source:t,end:[l]});break}default:{const r="indent"in e?e.indent:-1,l="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:i,indent:r,source:t,end:l})}}}const oO=e=>"type"in e?Sf(e):df(e);function Sf(e){switch(e.type){case"block-scalar":{let t="";for(const i of e.props)t+=Sf(i);return t+e.source}case"block-map":case"block-seq":{let t="";for(const i of e.items)t+=df(i);return t}case"flow-collection":{let t=e.start.source;for(const i of e.items)t+=df(i);for(const i of e.end)t+=i.source;return t}case"document":{let t=df(e);if(e.end)for(const i of e.end)t+=i.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const i of e.end)t+=i.source;return t}}}function df({start:e,key:t,sep:i,value:r}){let l="";for(const o of e)l+=o.source;if(t&&(l+=Sf(t)),i)for(const o of i)l+=o.source;return r&&(l+=Sf(r)),l}const om=Symbol("break visit"),cO=Symbol("skip children"),q1=Symbol("remove item");function us(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),H1(Object.freeze([]),e,t)}us.BREAK=om;us.SKIP=cO;us.REMOVE=q1;us.itemAtPath=(e,t)=>{let i=e;for(const[r,l]of t){const o=i==null?void 0:i[r];if(o&&"items"in o)i=o.items[l];else return}return i};us.parentCollection=(e,t)=>{const i=us.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],l=i==null?void 0:i[r];if(l&&"items"in l)return l;throw new Error("Parent collection not found")};function H1(e,t,i){let r=i(t,e);if(typeof r=="symbol")return r;for(const l of["key","value"]){const o=t[l];if(o&&"items"in o){for(let c=0;c<o.items.length;++c){const f=H1(Object.freeze(e.concat([[l,c]])),o.items[c],i);if(typeof f=="number")c=f-1;else{if(f===om)return om;f===q1&&(o.items.splice(c,1),c-=1)}}typeof r=="function"&&l==="key"&&(r=r(t,e))}}return typeof r=="function"?r(t,e):r}const Hf="\uFEFF",Kf="",Gf="",sc="",uO=e=>!!e&&"items"in e,fO=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function dO(e){switch(e){case Hf:return"<BOM>";case Kf:return"<DOC>";case Gf:return"<FLOW_END>";case sc:return"<SCALAR>";default:return JSON.stringify(e)}}function K1(e){switch(e){case Hf:return"byte-order-mark";case Kf:return"doc-mode";case Gf:return"flow-error-end";case sc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
424
+ `:case`\r
425
+ `: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 hO=Object.freeze(Object.defineProperty({__proto__:null,BOM:Hf,DOCUMENT:Kf,FLOW_END:Gf,SCALAR:sc,createScalarToken:rO,isCollection:uO,isScalar:fO,prettyToken:dO,resolveAsScalar:aO,setScalarValue:sO,stringify:oO,tokenType:K1,visit:us},Symbol.toStringTag,{value:"Module"}));function Ai(e){switch(e){case void 0:case" ":case`
426
+ `:case"\r":case" ":return!0;default:return!1}}const qv=new Set("0123456789ABCDEFabcdef"),pO=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Yu=new Set(",[]{}"),mO=new Set(` ,[]{}
427
+ \r `),bp=e=>!e||mO.has(e);class G1{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,i=!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=!i;let r=this.next??"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,i=this.buffer[t];for(;i===" "||i===" ";)i=this.buffer[++t];return!i||i==="#"||i===`
428
+ `?!0:i==="\r"?this.buffer[t+1]===`
429
+ `:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let i=this.buffer[t];if(this.indentNext>0){let r=0;for(;i===" ";)i=this.buffer[++r+t];if(i==="\r"){const l=this.buffer[r+t+1];if(l===`
430
+ `||!l&&!this.atEnd)return t+r+1}return i===`
431
+ `||r>=this.indentNext||!i&&!this.atEnd?t+r:-1}if(i==="-"||i==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&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(`
432
+ `,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]===Hf&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let i=t.length,r=t.indexOf("#");for(;r!==-1;){const o=t[r-1];if(o===" "||o===" "){i=r-1;break}else r=t.indexOf("#",r+1)}for(;;){const o=t[i-1];if(o===" "||o===" ")i-=1;else break}const l=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-l),this.pushNewline(),"stream"}if(this.atLineEnd()){const i=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-i),yield*this.pushNewline(),"stream"}return yield Kf,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 i=this.peek(3);if((i==="---"||i==="...")&&Ai(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"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,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Ai(i)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let i=yield*this.pushIndicators();switch(t[i]){case"#":yield*this.pushCount(t.length-i);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(bp),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,i,r=-1;do t=yield*this.pushNewline(),t>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(t+i>0);const l=this.getLine();if(l===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&l[0]!=="#"||r===0&&(l.startsWith("---")||l.startsWith("..."))&&Ai(l[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(l[0]==="]"||l[0]==="}")))return this.flowLevel=0,yield Gf,yield*this.parseLineStart();let o=0;for(;l[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),l[o]){case void 0:return"flow";case"#":return yield*this.pushCount(l.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(bp),"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 i=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;i!==-1&&this.buffer[i+1]==="'";)i=this.buffer.indexOf("'",i+2);else for(;i!==-1;){let o=0;for(;this.buffer[i-1-o]==="\\";)o+=1;if(o%2===0)break;i=this.buffer.indexOf('"',i+1)}const r=this.buffer.substring(0,i);let l=r.indexOf(`
433
+ `,this.pos);if(l!==-1){for(;l!==-1;){const o=this.continueScalar(l+1);if(o===-1)break;l=r.indexOf(`
434
+ `,o)}l!==-1&&(i=l-(r[l-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const i=this.buffer[++t];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>Ai(i)||i==="#")}*parseBlockScalar(){let t=this.pos-1,i=0,r;e:for(let o=this.pos;r=this.buffer[o];++o)switch(r){case" ":i+=1;break;case`
435
+ `:t=o,i=0;break;case"\r":{const c=this.buffer[o+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
436
+ `)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i: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(`
437
+ `,o)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let l=t+1;for(r=this.buffer[l];r===" ";)r=this.buffer[++l];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
438
+ `;)r=this.buffer[++l];t=l-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===`
439
+ `&&o>=this.pos&&o+1+i>f)t=o;else break}while(!0);return yield sc,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let i=this.pos-1,r=this.pos-1,l;for(;l=this.buffer[++r];)if(l===":"){const o=this.buffer[r+1];if(Ai(o)||t&&Yu.has(o))break;i=r}else if(Ai(l)){let o=this.buffer[r+1];if(l==="\r"&&(o===`
440
+ `?(r+=1,l=`
441
+ `,o=this.buffer[r+1]):i=r),o==="#"||t&&Yu.has(o))break;if(l===`
442
+ `){const c=this.continueScalar(r+1);if(c===-1)break;r=Math.max(r,c-2)}}else{if(t&&Yu.has(l))break;i=r}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield sc,yield*this.pushToIndex(i+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,i){const r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(bp))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,i=this.charAt(1);if(Ai(i)||t&&Yu.has(i))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,i=this.buffer[t];for(;!Ai(i)&&i!==">";)i=this.buffer[++t];return yield*this.pushToIndex(i===">"?t+1:t,!1)}else{let t=this.pos+1,i=this.buffer[t];for(;i;)if(pO.has(i))i=this.buffer[++t];else if(i==="%"&&qv.has(this.buffer[t+1])&&qv.has(this.buffer[t+2]))i=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
443
+ `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
444
+ `?yield*this.pushCount(2):0}*pushSpaces(t){let i=this.pos-1,r;do r=this.buffer[++i];while(r===" "||t&&r===" ");const l=i-this.pos;return l>0&&(yield this.buffer.substr(this.pos,l),this.pos=i),l}*pushUntil(t){let i=this.pos,r=this.buffer[i];for(;!t(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class Y1{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let i=0,r=this.lineStarts.length;for(;i<r;){const o=i+r>>1;this.lineStarts[o]<t?i=o+1:r=o}if(this.lineStarts[i]===t)return{line:i+1,col:1};if(i===0)return{line:0,col:t};const l=this.lineStarts[i-1];return{line:i,col:t-l+1}}}}function or(e,t){for(let i=0;i<e.length;++i)if(e[i].type===t)return!0;return!1}function Hv(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 Q1(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 Qu(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 i;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(;((i=e[++t])==null?void 0:i.type)==="space";);return e.splice(t,e.length)}function Kv(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!or(t.start,"explicit-key-ind")&&!or(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,Q1(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 ig{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 G1,this.onNewLine=t}*parse(t,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(t,i))yield*this.next(r);i||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const i=K1(t);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){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 r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,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 i=t??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const r=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in r?r.indent:0:i.type==="flow-collection"&&r.type==="document"&&(i.indent=0),i.type==="flow-collection"&&Kv(i),r.type){case"document":r.value=i;break;case"block-scalar":r.props.push(i);break;case"block-map":{const l=r.items[r.items.length-1];if(l.value){r.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(l.sep)l.value=i;else{Object.assign(l,{key:i,sep:[]}),this.onKeyLine=!l.explicitKey;return}break}case"block-seq":{const l=r.items[r.items.length-1];l.value?r.items.push({start:[],value:i}):l.value=i;break}case"flow-collection":{const l=r.items[r.items.length-1];!l||l.value?r.items.push({start:[],key:i,sep:[]}):l.sep?l.value=i:Object.assign(l,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const l=i.items[i.items.length-1];l&&!l.sep&&!l.value&&l.start.length>0&&Hv(l.start)===-1&&(i.indent===0||l.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(r.type==="document"?r.end=l.start:r.items.push({start:l.start}),i.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":{Hv(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 i=this.startBlockValue(t);i?this.stack.push(i):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 i=Qu(this.peek(2)),r=il(i);let l;t.end?(l=t.end,l.push(this.sourceToken),delete t.end):l=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:r,key:t,sep:l}]};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 i=this.source.indexOf(`
445
+ `)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
446
+ `,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var r;const i=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)t.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,t.indent)){const l=t.items[t.items.length-2],o=(r=l==null?void 0:l.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),t.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const l=!this.onKeyLine&&this.indent===t.indent,o=l&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(o&&i.sep&&!i.value){const f=[];for(let d=0;d<i.sep.length;++d){const h=i.sep[d];switch(h.type){case"newline":f.push(d);break;case"space":break;case"comment":h.indent>t.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(c=i.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||i.value?(c.push(this.sourceToken),t.items.push({start:c}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):o||i.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(i.explicitKey)if(i.sep)if(i.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(or(i.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(Q1(i.key)&&!or(i.sep,"newline")){const f=il(i.start),d=i.key,h=i.sep;h.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:d,sep:h}]})}else c.length>0?i.sep=i.sep.concat(c,this.sourceToken):i.sep.push(this.sourceToken);else if(or(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=il(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||o?t.items.push({start:c,key:null,sep:[this.sourceToken]}):or(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{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||i.value?(t.items.push({start:c,key:f,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(f):(Object.assign(i,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(t);if(f){if(f.type==="block-seq"){if(!i.explicitKey&&i.sep&&!or(i.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 l&&t.items.push({start:c});this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var r;const i=t.items[t.items.length-1];switch(this.type){case"newline":if(i.value){const l="end"in i.value?i.value.end:void 0,o=Array.isArray(l)?l[l.length-1]:void 0;(o==null?void 0:o.type)==="comment"?l==null||l.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,t.indent)){const l=t.items[t.items.length-2],o=(r=l==null?void 0:l.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),t.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=t.indent)break;i.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;i.value||or(i.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>t.indent){const l=this.startBlockValue(t);if(l){this.stack.push(l);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const i=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!i||i.sep?t.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return;case"map-value-ind":!i||i.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!i||i.value?t.items.push({start:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);!i||i.value?t.items.push({start:[],key:l,sep:[]}):i.sep?this.stack.push(l):Object.assign(i,{key:l,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const l=Qu(r),o=il(l);Kv(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 i=this.source.indexOf(`
447
+ `)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
448
+ `,i)+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 i=Qu(t),r=il(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=Qu(t),r=il(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,i){return this.type!=="comment"||this.indent<=i?!1:t.every(r=>r.type==="newline"||r.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 V1(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new Y1||null,prettyErrors:t}}function gO(e,t={}){const{lineCounter:i,prettyErrors:r}=V1(t),l=new ig(i==null?void 0:i.addNewLine),o=new ng(t),c=Array.from(o.compose(l.parse(e)));if(r&&i)for(const f of c)f.errors.forEach(Ef(e,i)),f.warnings.forEach(Ef(e,i));return c.length>0?c:Object.assign([],{empty:!0},o.streamInfo())}function X1(e,t={}){const{lineCounter:i,prettyErrors:r}=V1(t),l=new ig(i==null?void 0:i.addNewLine),o=new ng(t);let c=null;for(const f of o.compose(l.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 r&&i&&(c.errors.forEach(Ef(e,i)),c.warnings.forEach(Ef(e,i))),c}function bO(e,t,i){let r;typeof t=="function"?r=t:i===void 0&&t&&typeof t=="object"&&(i=t);const l=X1(e,i);if(!l)return null;if(l.warnings.forEach(o=>p1(l.options.logLevel,o)),l.errors.length>0){if(l.options.logLevel!=="silent")throw l.errors[0];l.errors=[]}return l.toJS(Object.assign({reviver:r},i))}function yO(e,t,i){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:i===void 0&&t&&(i=t),typeof i=="string"&&(i=i.length),typeof i=="number"){const l=Math.round(i);i=l<1?void 0:l>8?{indent:8}:{indent:l}}if(e===void 0){const{keepUndefined:l}=i??t??{};if(!l)return}return hs(e)&&!r?e.toString(i):new Pl(e,r,i).toString(i)}const Gv=Object.freeze(Object.defineProperty({__proto__:null,Alias:jf,CST:hO,Composer:ng,Document:Pl,Lexer:G1,LineCounter:Y1,Pair:gn,Parser:ig,Scalar:je,Schema:D1,YAMLError:eg,YAMLMap:ni,YAMLParseError:Jr,YAMLSeq:vr,YAMLWarning:j1,isAlias:wr,isCollection:Mt,isDocument:hs,isMap:zl,isNode:Dt,isPair:At,isScalar:xt,isSeq:Bl,parse:bO,parseAllDocuments:gO,parseDocument:X1,stringify:yO,visit:ps,visitAsync:Lf},Symbol.toStringTag,{value:"Module"}));function xO({projectName:e,file:t,onClose:i,onSaved:r}){const l=ai(),{alert:o}=si(),{data:c,isLoading:f,isError:d,error:h,refetch:y}=St({queryKey:["pipeline-file",e,t],queryFn:()=>KA(e,t)}),[g,v]=M.useState("structured"),[x,S]=M.useState(null),[w,k]=M.useState(null);M.useEffect(()=>{c&&x===null&&(S(c.content),k(c.etag),c.parseError&&v("yaml"))},[c,x]),M.useEffect(()=>{const T=P=>{P.key==="Escape"&&i()};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[i]);const _=ti({mutationFn:()=>{if(x===null||w===null)throw new Error("no draft");return GA(e,t,x,w)},onSuccess:T=>{k(T.etag),l.invalidateQueries({queryKey:["pipeline-file",e,t]}),l.invalidateQueries({queryKey:["project-pipelines",e]}),r()},onError:T=>{const P=T.status;o({title:P===409?"文件已被其他地方修改":P===422?"YAML 语法错":"保存失败",body:T instanceof Error?T.message:String(T)})}}),R=x!==null&&c&&x!==c.content,{parsed:A,parseError:I}=M.useMemo(()=>{if(x===null)return{parsed:null,parseError:null};try{return{parsed:Gv.parse(x)??{},parseError:null}}catch(T){return{parsed:null,parseError:T instanceof Error?T.message:String(T)}}},[x]),$=T=>{try{const P=Gv.stringify(T,{lineWidth:0});S(P)}catch(P){o({title:"YAML 序列化失败",body:P instanceof Error?P.message:String(P)})}};return m.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",onClick:i,children:m.jsxs("div",{onClick:T=>T.stopPropagation(),className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[m.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[m.jsxs("div",{children:[m.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[m.jsx(Lv,{size:20,strokeWidth:2.5}),m.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(c==null?void 0:c.isActive)&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:"active"})]}),m.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}`]})]}),m.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:i,type:"button","aria-label":"关闭",children:m.jsx(ds,{size:14,strokeWidth:3})})]}),f&&m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),d&&m.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",h instanceof Error?h.message:String(h)]}),c&&x!==null&&m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[m.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:[m.jsxs("button",{type:"button",onClick:()=>v("structured"),"aria-pressed":g==="structured",disabled:!!I,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)]",I?"opacity-50 cursor-not-allowed":""].join(" "),title:I??void 0,children:[m.jsx(Fm,{size:11,strokeWidth:2.5}),"结构化"]}),m.jsxs("button",{type:"button",onClick:()=>v("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:[m.jsx(Lv,{size:11,strokeWidth:2.5}),"原始 YAML"]})]}),I&&m.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[m.jsx(Um,{size:12,strokeWidth:2.5}),"YAML parse: ",I]}),(c==null?void 0:c.isActive)&&m.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:"⚠ 这是当前激活的 pipeline,保存后下一轮 tick 生效"})]}),m.jsxs("div",{className:"flex-1 overflow-auto",children:[g==="structured"&&A&&m.jsx(vO,{parsed:A,onChange:$}),g==="yaml"&&m.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:x,onChange:T=>S(T.target.value),spellCheck:!1,"aria-label":"pipeline YAML 编辑器"})]}),m.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:[m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:R?m.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:"● 未保存"}):_.isSuccess?m.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[m.jsx(HE,{size:12,strokeWidth:2.5})," 已保存"]}):"无变化"}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{S(null),y()},disabled:_.isPending,type:"button",children:"重新加载"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>_.mutate(),disabled:!R||_.isPending,type:"button","aria-label":"保存 pipeline",children:[_.isPending?m.jsx(cn,{size:13,strokeWidth:3,className:"animate-spin"}):m.jsx($m,{size:13,strokeWidth:3}),"保存"]})]})]})]})]})})}function vO({parsed:e,onChange:t}){const i=e.stages??[],r=d=>{t({...e,stages:d})},l=()=>{r([...i,{name:`stage-${i.length+1}`,on_complete:"move_card Done"}])},o=d=>{r(i.filter((h,y)=>y!==d))},c=(d,h)=>{const y=[...i],g=d+h;g<0||g>=y.length||([y[d],y[g]]=[y[g],y[d]],r(y))},f=(d,h)=>{r(i.map((y,g)=>g===d?{...y,...h}:y))};return m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[m.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[m.jsx("span",{className:"font-bold",children:"mode:"}),m.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:d=>t({...e,mode:d.target.value}),children:[m.jsx("option",{value:"project",children:"project"}),m.jsx("option",{value:"steps",children:"steps"})]})]}),m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"project = 事件驱动流水线(默认) · steps = 顺序脚本"})]}),m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center justify-between mb-2",children:[m.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:["Stages (",i.length,")"]}),m.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:l,"aria-label":"添加 stage",children:[m.jsx(Ca,{size:11,strokeWidth:3})," 添加 stage"]})]}),i.length===0?m.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"开始。'}):m.jsx("div",{className:"flex flex-col gap-3",children:i.map((d,h)=>m.jsx(EO,{stage:d,index:h,total:i.length,onChange:y=>f(h,y),onRemove:()=>o(h),onMoveUp:()=>c(h,-1),onMoveDown:()=>c(h,1)},h))})]})]})}function EO({stage:e,index:t,total:i,onChange:r,onRemove:l,onMoveUp:o,onMoveDown:c}){const f=e.on_fail??{};return m.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&m.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})]}),m.jsxs("div",{className:"flex gap-1",children:[m.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:o,disabled:t===0,"aria-label":"上移",children:m.jsx(_C,{size:12,strokeWidth:3})}),m.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:c,disabled:t===i-1,"aria-label":"下移",children:m.jsx(Bm,{size:12,strokeWidth:3})}),m.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:l,"aria-label":"删除 stage",children:m.jsx(gc,{size:12,strokeWidth:3})})]})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[m.jsx(rr,{label:"name",hint:"stage 唯一名",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:d=>r({name:d.target.value}),placeholder:"develop"})}),m.jsx(rr,{label:"profile",hint:"skill 画像,可空",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:d=>r({profile:d.target.value||void 0}),placeholder:"fullstack"})}),m.jsx(rr,{label:"card_state",hint:"本 stage 期间卡片状态",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:d=>r({card_state:d.target.value||void 0}),placeholder:"Inprogress"})}),m.jsx(rr,{label:"timeout",hint:"可选,如 30m 2h",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:d=>r({timeout:d.target.value||void 0}),placeholder:"2h"})}),m.jsx(rr,{label:"trigger",hint:"触发条件,可空走默认",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:d=>r({trigger:d.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),m.jsx(rr,{label:"on_complete",hint:"成功后动作",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:d=>r({on_complete:d.target.value}),placeholder:"move_card Done"})})]}),m.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[m.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),m.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[m.jsx(rr,{label:"action",hint:"失败时动作,如 label NEEDS-FIX",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.action??"",onChange:d=>r({on_fail:{...f,action:d.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),m.jsx(rr,{label:"comment",hint:"写进卡片的注释",children:m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.comment??"",onChange:d=>r({on_fail:{...f,comment:d.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),m.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[m.jsx("input",{type:"checkbox",checked:f.halt??!0,onChange:d=>r({on_fail:{...f,halt:d.target.checked}})}),m.jsx("span",{className:"font-bold",children:"halt"}),m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(失败后停流水线;去掉则继续下一张卡)"})]})]})]})}function rr({label:e,hint:t,children:i}){return m.jsxs("label",{className:"flex flex-col gap-1",children:[m.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),i,t&&m.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t})]})}function SO({onCancel:e,onCreate:t,hasActive:i,hasSample:r,isPending:l}){const[o,c]=M.useState(""),[f,d]=M.useState("blank");M.useEffect(()=>{const x=S=>{S.key==="Escape"&&e()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[e]);const h=o.trim(),y=h.endsWith(".yaml")?h:h?`${h}.yaml`:"",g=y&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(y),v=()=>{!g||l||t(y,f)};return m.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",onClick:e,children:m.jsxs("div",{onClick:x=>x.stopPropagation(),className:"nb-card max-w-md w-full",children:[m.jsxs("header",{className:"flex items-start justify-between mb-4",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"新建 pipeline"}),m.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":"关闭",children:m.jsx(ds,{size:14,strokeWidth:3})})]}),m.jsxs("form",{onSubmit:x=>{x.preventDefault(),v()},className:"flex flex-col gap-4",children:[m.jsxs("label",{className:"flex flex-col gap-1.5",children:[m.jsx("span",{className:"text-sm font-bold",children:"文件名"}),m.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"例如 ci",value:o,onChange:x=>c(x.target.value),autoFocus:!0}),m.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["实际会保存为 ",m.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:y||"xxx.yaml"}),"。 只允许 a-z A-Z 0-9 _ -;已有同名文件会 409 报错。"]})]}),m.jsxs("fieldset",{className:"flex flex-col gap-2",children:[m.jsx("legend",{className:"text-sm font-bold mb-1",children:"初始内容"}),m.jsx(yp,{value:"blank",current:f,label:"空白模板",desc:"最简 1 stage (develop → Done)",onSelect:d}),m.jsx(yp,{value:"sample",current:f,label:"教学模板",desc:"从 sample.yaml.example 复制(带注释,讲解所有字段)",onSelect:d,disabled:!r,disabledReason:"sample.yaml.example 不存在"}),m.jsx(yp,{value:"active",current:f,label:"复制当前活动的",desc:"从 project.yaml 复制(基于目前的配置改)",onSelect:d,disabled:!i,disabledReason:"project.yaml 不存在"})]}),m.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[m.jsx("button",{className:"nb-btn",onClick:e,type:"button",disabled:l,children:"取消"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!g||l,"aria-label":"创建 pipeline",children:[l?m.jsx(cn,{size:13,strokeWidth:3,className:"animate-spin"}):m.jsx(Ca,{size:13,strokeWidth:3}),"创建"]})]})]})]})})}function yp({value:e,current:t,label:i,desc:r,onSelect:l,disabled:o,disabledReason:c}){const f=t===e;return m.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:[m.jsx("input",{type:"radio",name:"pipeline-template",value:e,checked:f,disabled:o,onChange:()=>l(e),className:"mt-1 flex-shrink-0"}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:"text-sm font-bold",children:i}),m.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:o?c:r})]})]})}function wO(){var o;const{name:e=""}=ME(),t=Er(),[i,r]=M.useState("overview"),l=St({queryKey:["project",e],queryFn:()=>BA(e),enabled:!!e});return m.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[m.jsxs("header",{className:"flex items-center gap-3",children:[m.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[m.jsx($E,{size:14,strokeWidth:3}),"返回"]}),m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:e}),m.jsx(Sr,{to:`/board?project=${encodeURIComponent(e)}`,className:"nb-btn nb-btn-mint",children:"看板"})]}),m.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[m.jsx(Vu,{current:i,value:"overview",onSelect:r,icon:zC,children:"概览"}),m.jsx(Vu,{current:i,value:"config",onSelect:r,icon:QE,children:"配置"}),m.jsx(Vu,{current:i,value:"pipelines",onSelect:r,icon:ZE,children:"Pipelines"}),m.jsx(Vu,{current:i,value:"danger",onSelect:r,icon:gc,children:"危险操作"})]}),i==="overview"&&m.jsx(_O,{name:e,data:l.data,loading:l.isLoading}),i==="config"&&m.jsx(kO,{name:e}),i==="pipelines"&&m.jsx(NO,{name:e}),i==="danger"&&m.jsx(TO,{name:e,repoDir:((o=l.data)==null?void 0:o.repoDir)??null})]})}function Vu({current:e,value:t,onSelect:i,icon:r,children:l}){const o=e===t;return m.jsxs("button",{type:"button",onClick:()=>i(t),"aria-current":o?"page":void 0,className:["nb-btn",o?"nb-btn-primary":""].join(" "),style:{padding:"6px 14px",fontSize:13},children:[m.jsx(r,{size:13,strokeWidth:2.5}),l]})}function _O({name:e,data:t,loading:i}){return i?m.jsx("div",{className:"nb-card",children:m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):t?m.jsx("div",{className:"nb-card",children:m.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[m.jsx("dt",{className:"font-bold",children:"仓库路径"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),m.jsx("dt",{className:"font-bold",children:"PM 后端"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),m.jsx("dt",{className:"font-bold",children:"Agent"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),m.jsx("dt",{className:"font-bold",children:"卡片"}),m.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.cards.total," 张 · ",t.cards.inprogress," 进行中 · ",t.cards.done," 完成"]}),m.jsx("dt",{className:"font-bold",children:"Worker"}),m.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.workers.total," 个(",t.workers.active," 活跃)"]}),m.jsx("dt",{className:"font-bold",children:"Pipeline"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),m.jsx("dt",{className:"font-bold",children:"最近活动"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):m.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:m.jsxs("p",{children:["项目 ",e," 不存在或无法读取。"]})})}function kO({name:e}){const t=ai(),{alert:i}=si(),{data:r,isLoading:l,isError:o,error:c,refetch:f}=St({queryKey:["project-conf",e],queryFn:()=>FA(e)}),[d,h]=M.useState(null),[y,g]=M.useState(null);M.useEffect(()=>{r&&d===null&&(h(r.content),g(r.etag))},[r,d]);const v=d!==null&&r!==void 0&&d!==r.content,x=ti({mutationFn:()=>{if(d===null||y===null)throw new Error("no draft");return PA(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;i({title:w===409?"配置已被其他地方修改":"保存失败",body:w===409?'conf 文件在你编辑期间被改过。点"重新加载"后再编辑。':S instanceof Error?S.message:String(S)})}});return l?m.jsx("div",{className:"nb-card",children:m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):o?m.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:m.jsxs("p",{children:["加载失败: ",c instanceof Error?c.message:String(c)]})}):m.jsxs("div",{className:"nb-card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsxs("div",{children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:m.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&&m.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",y]})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{h(null),f()},disabled:x.isPending,"aria-label":"重新加载",children:[m.jsx(jl,{size:13,strokeWidth:2.5}),"重新加载"]}),m.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>x.mutate(),disabled:!v||x.isPending,"aria-label":"保存配置",children:[x.isPending?m.jsx(cn,{size:13,strokeWidth:3,className:"animate-spin"}):x.isSuccess&&!v?m.jsx(vC,{size:13,strokeWidth:3}):m.jsx($m,{size:13,strokeWidth:3}),"保存"]})]})]}),m.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:d??"",onChange:S=>h(S.target.value),spellCheck:!1,"aria-label":"conf 文件编辑器"}),v&&m.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:"● 未保存的修改"})]})}function NO({name:e}){const t=ai(),{confirm:i,alert:r}=si(),{data:l,isLoading:o}=St({queryKey:["project-pipelines",e],queryFn:()=>qA(e)}),[c,f]=M.useState(null),[d,h]=M.useState(!1),y=ti({mutationFn:S=>HA(e,S),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:S=>{r({title:"切换失败",body:S instanceof Error?S.message:String(S)})}}),g=ti({mutationFn:S=>QA(e,S),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:S=>{r({title:"删除失败",body:S instanceof Error?S.message:String(S)})}}),v=ti({mutationFn:S=>YA(e,S.name,S.template),onSuccess:S=>{t.invalidateQueries({queryKey:["project-pipelines",e]}),h(!1),f(S.name)},onError:S=>{r({title:"创建失败",body:S instanceof Error?S.message:String(S)})}});if(o)return m.jsx("div",{className:"nb-card",children:m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})});const x=[];l!=null&&l.active&&x.push({name:l.active,isActive:!0});for(const S of(l==null?void 0:l.available)??[])x.push({name:S.name,isActive:!1});return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"nb-card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:"Pipelines"}),m.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>h(!0),disabled:v.isPending,"aria-label":"新建 pipeline",children:[m.jsx(Ca,{size:12,strokeWidth:3}),"新建 pipeline"]})]}),x.length===0?m.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"开始。'}):m.jsx("ul",{className:"flex flex-col gap-2",children:x.map(S=>m.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[m.jsx(ZE,{size:16,strokeWidth:2.5}),m.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:S.name}),S.isActive&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"active"}),m.jsxs("div",{className:"flex gap-1",children:[m.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>f(S.name),"aria-label":`编辑 ${S.name}`,children:[m.jsx(GE,{size:11,strokeWidth:2.5}),"编辑"]}),!S.isActive&&m.jsxs(m.Fragment,{children:[m.jsx("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await i({title:`切换到 ${S.name}`,body:`当前 project.yaml 会被 ${S.name} 的内容覆盖。继续?`,confirm:"切换"})&&y.mutate(S.name)},disabled:y.isPending,"aria-label":`切换到 ${S.name}`,children:"切换"}),m.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await i({title:`删除 ${S.name}`,body:"这个 pipeline 文件会被永久删除。",confirm:"删除",danger:!0})&&g.mutate(S.name)},disabled:g.isPending,"aria-label":`删除 ${S.name}`,children:m.jsx(gc,{size:11,strokeWidth:2.5})})]})]})]},S.name))})]}),c&&m.jsx(xO,{projectName:e,file:c,onClose:()=>f(null),onSaved:()=>{t.invalidateQueries({queryKey:["project-pipelines",e]})}}),d&&m.jsx(SO,{hasActive:!!(l!=null&&l.active),hasSample:!0,isPending:v.isPending,onCancel:()=>h(!1),onCreate:(S,w)=>v.mutate({name:S,template:w})})]})}function TO({name:e,repoDir:t}){const i=Er(),r=ai(),{alert:l}=si(),[o,c]=M.useState(""),[f,d]=M.useState(!0),h=ti({mutationFn:()=>$A(e,{includeClaudeDir:f}),onSuccess:y=>{r.invalidateQueries({queryKey:["projects"]});const g=y.claudeRemoved.filter(v=>v.ok).map(v=>v.path);l({title:"已删除",body:g.length>0?`项目已删除。同时清理了:
449
+ ${g.join(`
450
+ `)}`:"项目已删除。"}).then(()=>i("/projects"))},onError:y=>{l({title:"删除失败",body:y instanceof Error?y.message:String(y)})}});return m.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:"删除项目"}),m.jsxs("p",{className:"text-sm mb-4",children:["这会清理 ",m.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&&m.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:[m.jsx("input",{type:"checkbox",checked:f,onChange:y=>d(y.target.checked),className:"mt-0.5"}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:"text-sm font-bold",children:"同时清理 repo 的 .claude/"}),m.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),m.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:"repo 本身不动,只清这个目录。"})]})]}),m.jsx("div",{className:"mb-4",children:m.jsxs("label",{className:"flex flex-col gap-1.5",children:[m.jsxs("span",{className:"text-sm font-bold",children:["输入项目名 ",m.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e})," 确认:"]}),m.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})]})}),m.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:o!==e||h.isPending,onClick:()=>h.mutate(),"aria-label":"永久删除项目",children:[h.isPending?m.jsx(cn,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(gc,{size:14,strokeWidth:3}),"永久删除"]})]})}function Z1(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return qt(`/api/skills${t}`)}function CO(e){return qt(`/api/skills/${encodeURIComponent(e)}`)}function AO(e,t){return qt(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function Yf(e,t){const i=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!i.ok)throw new Error(`${i.status}: ${await i.text()}`);return i.json().catch(()=>({}))}function OO(e,t){return Yf(`/api/skills/${encodeURIComponent(e)}/link`,{project:t})}function RO(e,t){return fetch(`/api/skills/${encodeURIComponent(e)}/link?project=${encodeURIComponent(t)}`,{method:"DELETE"}).then(i=>{if(!i.ok)throw new Error(`${i.status}`);return i.json()})}function MO(e,t){return Yf(`/api/skills/${encodeURIComponent(e)}/freeze`,{project:t})}function DO(e,t){return Yf(`/api/skills/${encodeURIComponent(e)}/unfreeze`,{project:t})}function LO(){return Yf("/api/skills/sync")}function jO({project:e,isPending:t,onCancel:i,onCreate:r}){var k;const[l,o]=M.useState(""),[c,f]=M.useState(""),[d,h]=M.useState(new Set),y=St({queryKey:["skills-all",e],queryFn:()=>Z1(e)});M.useEffect(()=>{const _=R=>{R.key==="Escape"&&i()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[i]);const v=l.trim().length>0&&l.trim().length<=200&&!t,x=_=>{const R=new Set(d);R.has(_)?R.delete(_):R.add(_),h(R)},S=()=>{v&&r({title:l.trim(),description:c.trim(),skills:[...d]})},w=((k=y.data)==null?void 0:k.data)??[];return m.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",onClick:i,children:m.jsxs("div",{onClick:_=>_.stopPropagation(),className:"nb-card mt-8 w-full max-w-xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[m.jsxs("header",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:"新建卡片"}),m.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:i,type:"button","aria-label":"关闭",children:m.jsx(ds,{size:14,strokeWidth:3})})]}),m.jsxs("form",{onSubmit:_=>{_.preventDefault(),S()},className:"flex flex-col gap-4 overflow-auto",children:[m.jsxs("label",{className:"flex flex-col gap-1.5",children:[m.jsx("span",{className:"text-sm font-bold",children:"标题 *"}),m.jsx("input",{type:"text",className:"nb-input w-full",placeholder:"例如:接入 GitHub OAuth 登录",value:l,onChange:_=>o(_.target.value),maxLength:200,autoFocus:!0,required:!0}),m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"写简短明了的目标(<200 字符)"})]}),m.jsxs("label",{className:"flex flex-col gap-1.5",children:[m.jsx("span",{className:"text-sm font-bold",children:"描述"}),m.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:"用户故事、需求、验收标准、参考资料… Claude 启动时会读这里的内容",value:c,onChange:_=>f(_.target.value)}),m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"支持 markdown。空的话就只有 title,Claude 只能靠 title 推断要做啥。"})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx("span",{className:"text-sm font-bold",children:"Skills"}),m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"勾选哪些 skill 会被加载(走 frontmatter `skills:`)。不选也行,Worker 默认加载项目级 skills。"}),y.isLoading&&m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),y.isError&&m.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["skill 列表加载失败,不影响创建:",y.error instanceof Error?y.error.message:String(y.error)]}),w.length>0&&m.jsx("div",{className:"flex flex-wrap gap-2",children:w.map(_=>{const R=d.has(_.name);return m.jsx("button",{type:"button",onClick:()=>x(_.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",R?"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":R,children:_.name},_.name)})}),d.size>0&&m.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["已选 ",d.size," 个:",[...d].join(", ")]})]})]}),m.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:[m.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:i,disabled:t,type:"button",children:"取消"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:S,disabled:!v,type:"button","aria-label":"创建卡片",children:[t?m.jsx(cn,{size:13,strokeWidth:3,className:"animate-spin"}):m.jsx(Ca,{size:13,strokeWidth:3}),"创建"]})]})]})})}function IO(e){return qt(`/api/projects/${encodeURIComponent(e)}/cards`)}function zO(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function $l(e,t){const i=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!i.ok){const r=await i.text();throw new Error(`${i.status} ${i.statusText}: ${r}`)}return i.json().catch(()=>({}))}function BO(e,t){return $l(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}function UO(e,t){return $l(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function FO(e,t){const i=typeof t=="string"?{title:t}:t;return $l(`/api/projects/${encodeURIComponent(e)}/cards`,i)}async function PO(e,t,i){const r=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:i})});if(!r.ok){const l=await r.text();throw new Error(`${r.status}: ${l}`)}}function $O(e){return $l(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function qO(e){return $l(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function HO(e,t){return $l(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function W1(e){const t=ai();M.useEffect(()=>{if(!e)return;const i=`/stream/projects/${encodeURIComponent(e)}`,r=new EventSource(i),l=f=>{try{const d=JSON.parse(f.data);t.invalidateQueries({queryKey:["cards",d.project]}),d.card&&t.setQueryData(["card",d.project,d.seq],{...t.getQueryData(["card",d.project,d.seq])??{},...d.card}),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 r.addEventListener("card.created",l),r.addEventListener("card.updated",l),r.addEventListener("card.deleted",l),r.addEventListener("worker.updated",o),r.addEventListener("worker.added",o),r.addEventListener("worker.deleted",o),r.addEventListener("pipeline.status",c),()=>r.close()},[e,t])}const KO=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),GO=new Set(["frontend","backend","mobile","database","devops"]),YO=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),QO=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function VO(e){return KO.has(e)?"lang":GO.has(e)?"end":YO.has(e)?"persona":QO.has(e)?"workflow":"other"}const XO={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function J1({name:e}){const t=XO[VO(e)];return m.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function eS({label:e,kind:t="default"}){const i=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return m.jsx("span",{className:"nb-badge",style:{background:i},children:e})}function ZO({card:e,onClick:t,done:i,draggable:r}){const l=e.labels.some(o=>o.startsWith("STARTED-"))&&!i;return m.jsxs("article",{onClick:t,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),t())},draggable:r,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)]",i?"opacity-60":"",r?"active:cursor-grabbing":""].join(" "),children:[m.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[m.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]}),l&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),m.jsx("p",{className:`font-bold text-sm leading-5 mb-2 line-clamp-2 ${i?"line-through decoration-2":""}`,children:e.title}),(e.skills.length>0||e.labels.length>0)&&m.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(o=>m.jsx(J1,{name:o},o)),e.labels.filter(o=>o==="NEEDS-FIX").map(o=>m.jsx(eS,{label:o,kind:"warn"},o))]}),m.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:[m.jsx("span",{children:WO(e.updatedAt??e.createdAt)}),e.branch&&m.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function WO(e){if(!e)return"—";const t=new Date(e),i=Date.now()-t.getTime();return i<6e4?"刚才":i<36e5?`${Math.floor(i/6e4)}m ago`:i<864e5?`${Math.floor(i/36e5)}h ago`:t.toLocaleDateString()}function JO({label:e,bg:t,cards:i,onCardClick:r,onDropCard:l}){const[o,c]=M.useState(!1);return m.jsxs("div",{className:["flex flex-col gap-2 p-3 rounded-2xl border-[3px] min-h-[340px]","transition-all",o?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:f=>{!l||!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),!l)return;const d=f.dataTransfer.getData("application/x-sps-card-seq"),h=Number.parseInt(d,10);Number.isFinite(h)&&(f.preventDefault(),l(h))},children:[m.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 border-b-2 border-[var(--color-text)]",children:[m.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),m.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:i.length})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[i.length===0&&m.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:"— 空 —"}),i.map(f=>m.jsx(ZO,{card:f,onClick:()=>r(f),done:e==="Done",draggable:!!l},f.seq))]})]})}function eR({project:e,seq:t,onClose:i,onChanged:r}){const{confirm:l}=si(),{data:o,isLoading:c,isError:f,error:d}=St({queryKey:["card",e,t],queryFn:()=>zO(e,t)});return M.useEffect(()=>{const h=y=>{y.key==="Escape"&&i()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[i]),m.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",onClick:i,children:m.jsxs("div",{onClick:h=>h.stopPropagation(),className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[m.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[m.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]}),(o==null?void 0:o.state)&&m.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:o.state})]}),m.jsx("h2",{id:"card-modal-title",className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:(o==null?void 0:o.title)??"加载中…"})]}),m.jsx("button",{onClick:i,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:m.jsx(ds,{size:16,strokeWidth:3})})]}),c&&m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),f&&m.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",d instanceof Error?d.message:String(d)]}),o&&m.jsxs("div",{className:"flex flex-col gap-4",children:[o.branch&&m.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[m.jsx(PC,{size:14}),m.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:o.branch})]}),(o.skills.length>0||o.labels.length>0)&&m.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[o.skills.map(h=>m.jsx(J1,{name:h},h)),o.labels.map(h=>m.jsx(eS,{label:h,kind:h==="NEEDS-FIX"?"warn":"default"},h))]}),o.checklist.total>0&&m.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[m.jsxs("div",{className:"flex items-center justify-between mb-2",children:[m.jsxs("span",{className:"font-bold text-sm",children:["检查清单 ",o.checklist.done,"/",o.checklist.total]}),m.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:m.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${o.checklist.percent}%`}})})]}),m.jsx("ul",{className:"text-sm space-y-1",children:o.checklist.items.map((h,y)=>m.jsxs("li",{className:`flex items-start gap-2 ${h.done?"opacity-60 line-through":""}`,children:[m.jsx("span",{children:h.done?"✓":"○"}),m.jsx("span",{children:h.text})]},y))})]}),o.body&&m.jsxs("div",{children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"正文"}),m.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:o.body.trim()||"(空)"})]}),m.jsxs("div",{className:"flex gap-3 pt-2 border-t-2 border-[var(--color-border-light)]",children:[m.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:async()=>{await UO(e,t),r()},children:[m.jsx(Pm,{size:14,strokeWidth:3}),"启动 worker"]}),m.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await l({title:`重置卡片 #${t}`,body:"卡片状态会回到初始,已做的 checklist 会清空。",confirm:"重置",danger:!0})&&(await BO(e,t),r(),i())},children:[m.jsx(Df,{size:14,strokeWidth:2.5}),"重置卡片"]})]})]})]})})}function ag({current:e,onChange:t}){const[i,r]=M.useState(!1),l=M.useRef(null),{data:o}=St({queryKey:["projects"],queryFn:bc});return M.useEffect(()=>{const c=f=>{var d;(d=l.current)!=null&&d.contains(f.target)||r(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),m.jsxs("div",{className:"relative",ref:l,children:[m.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:()=>r(c=>!c),children:[e,m.jsx(Bm,{size:14,strokeWidth:2.5})]}),i&&o&&m.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=>m.jsxs("button",{type:"button",onClick:()=>{t(c.name),r(!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:[m.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:c.name}),m.jsxs("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:[c.cards.total," cards"]})]},c.name))})]})}const tR=[{state:"Backlog",label:"Backlog",bg:"var(--color-accent-purple)"},{state:"Inprogress",label:"Inprogress",bg:"var(--color-accent-yellow)"},{state:"Review",label:"Review",bg:"var(--color-accent-pink)"},{state:"Done",label:"Done",bg:"var(--color-accent-mint)"}],tS="sps-console:last-board-project";function nR(){if(typeof window>"u")return null;try{return localStorage.getItem(tS)}catch{return null}}function iR(e){if(!(typeof window>"u"))try{localStorage.setItem(tS,e)}catch{}}function aR(){var ee,H,le;const[e,t]=zm(),i=e.get("project"),[r,l]=M.useState(null),[o,c]=M.useState(""),[f,d]=M.useState(()=>new Set),[h,y]=M.useState(()=>new Set),{confirm:g,alert:v}=si();W1(i);const x=St({queryKey:["projects"],queryFn:bc}),S=St({queryKey:["cards",i],queryFn:()=>IO(i??""),enabled:!!i}),w=ai(),k=()=>{w.invalidateQueries({queryKey:["cards",i]}),w.invalidateQueries({queryKey:["projects"]}),w.invalidateQueries({queryKey:["pipeline-status",i]})},_=V=>{t({project:V})};M.useEffect(()=>{var me;if(i){iR(i);return}const V=nR();V&&((me=x.data)!=null&&me.data.some(O=>O.name===V))&&t({project:V},{replace:!0})},[i,x.data,t]);const R=ti({mutationFn:()=>$O(i),onSuccess:()=>{k()},onError:V=>{v({title:"启动 pipeline 失败",body:V instanceof Error?V.message:String(V)})}}),A=ti({mutationFn:()=>qO(i),onSuccess:()=>k(),onError:V=>{v({title:"停止 pipeline 失败",body:V instanceof Error?V.message:String(V)})}}),I=ti({mutationFn:()=>HO(i,{all:!0}),onSuccess:()=>k(),onError:V=>{v({title:"重置失败",body:V instanceof Error?V.message:String(V)})}}),[$,T]=M.useState(!1),P=ti({mutationFn:V=>FO(i,V),onSuccess:()=>{k(),T(!1)},onError:V=>{v({title:"新建卡片失败",body:V instanceof Error?V.message:String(V)})}}),z=ti({mutationFn:({seq:V,state:me})=>PO(i,V,me),onMutate:async({seq:V,state:me})=>{await w.cancelQueries({queryKey:["cards",i]});const O=w.getQueryData(["cards",i]);return O&&w.setQueryData(["cards",i],{...O,data:O.data.map(D=>D.seq===V?{...D,state:me}:D)}),{prev:O}},onError:(V,me,O)=>{O!=null&&O.prev&&w.setQueryData(["cards",i],O.prev),v({title:"移动卡片失败",body:V instanceof Error?V.message:String(V)})},onSettled:()=>{w.invalidateQueries({queryKey:["cards",i]})}}),Z=((ee=S.data)==null?void 0:ee.data)??[],{allSkills:L,allLabels:K}=M.useMemo(()=>{const V=new Set,me=new Set;for(const O of Z){for(const D of O.skills)V.add(D);for(const D of O.labels)me.add(D)}return{allSkills:[...V].sort(),allLabels:[...me].sort()}},[Z]);if(!i)return m.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"看板"}),m.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"选择一个项目 🎯"}),m.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:"看板按项目分。挑一个开始:"}),m.jsx("div",{className:"flex flex-wrap gap-2",children:(H=x.data)==null?void 0:H.data.map(V=>m.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>_(V.name),type:"button",children:V.name},V.name))})]})]});const X=Z.filter(V=>{if(o){const me=o.toLowerCase();if(!(V.title.toLowerCase().includes(me)||V.skills.some(D=>D.toLowerCase().includes(me))||V.labels.some(D=>D.toLowerCase().includes(me))))return!1}return!(f.size>0&&!V.skills.some(O=>f.has(O))||h.size>0&&!V.labels.some(O=>h.has(O)))}),oe=(le=x.data)==null?void 0:le.data.find(V=>V.name===i),se=(oe==null?void 0:oe.pipelineStatus)==="running";return m.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[m.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"看板 ✨"}),m.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:oe?`${oe.name} · ${oe.cards.total} cards · ${oe.workers.active} workers 活跃`:"加载中…"})]}),m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsx(ag,{current:i,onChange:_}),m.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:()=>R.mutate(),disabled:se||R.isPending,type:"button","aria-label":"启动 pipeline",title:se?"pipeline 正在运行":"启动 pipeline",children:[R.isPending?m.jsx(cn,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(Pm,{size:14,strokeWidth:3}),"启动"]}),m.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:()=>A.mutate(),disabled:!se||A.isPending,type:"button","aria-label":"停止 pipeline",title:se?"停止 pipeline":"pipeline 未在运行",children:[A.isPending?m.jsx(cn,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(VE,{size:14,strokeWidth:3}),"停止"]}),m.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await g({title:"重置整个流水线",body:"这会清空所有卡片的运行状态、worker marker、分支。不可撤销。",confirm:"重置全部",danger:!0})&&I.mutate()},disabled:I.isPending,children:[I.isPending?m.jsx(cn,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(Df,{size:14,strokeWidth:2.5}),"重置"]}),m.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>T(!0),disabled:P.isPending,children:[P.isPending?m.jsx(cn,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(Ca,{size:14,strokeWidth:3}),"新卡片"]})]})]}),m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsxs("div",{className:"relative flex-1 max-w-md",children:[m.jsx(yf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),m.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索标题 / skill / label…",value:o,onChange:V=>c(V.target.value),"aria-label":"搜索卡片"})]}),m.jsx(Yv,{label:"skill",options:L,selected:f,onChange:d}),m.jsx(Yv,{label:"label",options:K,selected:h,onChange:y}),(o||f.size>0||h.size>0)&&m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{c(""),d(new Set),y(new Set)},type:"button","aria-label":"清空筛选",children:[m.jsx(ds,{size:11,strokeWidth:3}),"清空"]}),m.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[m.jsx(UC,{size:12}),X.length," / ",Z.length]})]}),S.isError&&m.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[m.jsx("p",{className:"font-semibold",children:"加载卡片失败"}),m.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&&m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:tR.map(V=>m.jsx(JO,{label:V.label,bg:V.bg,cards:X.filter(rR(V.state)),onCardClick:me=>l(me.seq),onDropCard:me=>z.mutate({seq:me,state:V.state})},V.state))}),r!==null&&m.jsx(eR,{project:i,seq:r,onClose:()=>l(null),onChanged:k}),$&&m.jsx(jO,{project:i,isPending:P.isPending,onCancel:()=>T(!1),onCreate:V=>P.mutate(V)})]})}function rR(e){return t=>e==="Backlog"?t.state==="Backlog"||t.state==="Planning"||t.state==="Todo":e==="Inprogress"?t.state==="Inprogress":e==="Review"?t.state==="Review"||t.state==="QA":e==="Done"?t.state==="Done"||t.state==="Canceled":t.state===e}function Yv({label:e,options:t,selected:i,onChange:r}){const[l,o]=M.useState(!1),c=M.useRef(null);M.useEffect(()=>{if(!l)return;const y=v=>{var x;(x=c.current)!=null&&x.contains(v.target)||o(!1)},g=v=>{v.key==="Escape"&&o(!1)};return window.addEventListener("click",y),window.addEventListener("keydown",g),()=>{window.removeEventListener("click",y),window.removeEventListener("keydown",g)}},[l]);const f=y=>{const g=new Set(i);g.has(y)?g.delete(y):g.add(y),r(g)},d=t.length===0,h=i.size;return m.jsxs("div",{ref:c,className:"relative",children:[m.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":l,"aria-label":`按 ${e} 筛选`,children:[e,h>0&&m.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:h}),m.jsx(Bm,{size:11,strokeWidth:3,className:["transition-transform",l?"rotate-180":""].join(" ")})]}),l&&m.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=i.has(y);return m.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:[m.jsx("input",{type:"checkbox",checked:g,onChange:()=>f(y),className:"flex-shrink-0"}),m.jsx("span",{className:"truncate",children:y})]},y)}),h>0&&m.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:()=>r(new Set),children:"清空选择"})]})]})}function sR(e){return qt(`/api/projects/${encodeURIComponent(e)}/workers`)}function lR(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function nS(e,t){const i=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!i.ok)throw new Error(`${i.status}: ${await i.text()}`);return i.json().catch(()=>({}))}function wf(e,t){return nS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function iS(e,t,i){return nS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,i?{seq:i}:void 0)}function oR(){const[e,t]=zm(),i=e.get("project");W1(i);const r=ai(),[l,o]=M.useState(null),{data:c,isLoading:f,isError:d,error:h,refetch:y}=St({queryKey:["workers",i],queryFn:()=>sR(i??""),enabled:!!i,refetchInterval:5e3});if(!i)return m.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-accent-yellow)]",children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"Workers 👷"}),m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["在 URL 上加 ",m.jsx("code",{className:"bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"?project=xx"}),",或从",m.jsx(Sr,{to:"/projects",className:"underline font-semibold",children:" 项目列表"})," 打开看板后跳转。"]})]});const g=(c==null?void 0:c.data)??[],v=g.filter(w=>w.state==="running").length,x=g.filter(w=>w.state==="stuck").length,S=g.filter(w=>w.state==="crashed").length;return m.jsxs("div",{className:"flex flex-col gap-4 max-w-6xl",children:[m.jsxs("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Workers 👷"}),m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[g.length," 个 slot · ",v," running · ",x," stuck · ",S," crashed"]})]}),m.jsxs("div",{className:"flex gap-3 items-center",children:[m.jsx(ag,{current:i,onChange:w=>t({project:w})}),m.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>y(),type:"button",children:[m.jsx(Df,{size:14,strokeWidth:2.5})," 刷新"]})]})]}),f&&m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),d&&m.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:m.jsxs("p",{className:"font-semibold",children:["加载失败: ",h instanceof Error?h.message:String(h)]})}),!f&&g.length===0&&m.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"当前没有 worker slot。启动一次 pipeline 就会出现。"})}),g.length>0&&m.jsx("div",{className:"nb-card p-0 overflow-hidden",children:m.jsxs("table",{className:"w-full text-sm",children:[m.jsx("thead",{children:m.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[m.jsx(Qr,{w:"70px",children:"Slot"}),m.jsx(Qr,{children:"Card"}),m.jsx(Qr,{w:"110px",children:"Status"}),m.jsx(Qr,{w:"90px",children:"Stage"}),m.jsx(Qr,{w:"90px",children:"PID"}),m.jsx(Qr,{w:"120px",children:"Runtime"}),m.jsx(Qr,{w:"260px",right:!0,children:"Action"})]})}),m.jsx("tbody",{children:g.map(w=>m.jsx(cR,{project:i,worker:w,onChange:()=>r.invalidateQueries({queryKey:["workers",i]}),onDetail:()=>o(w.slot)},w.slot))})]})}),l!==null&&m.jsx(uR,{project:i,slot:l,onClose:()=>o(null),onChange:()=>r.invalidateQueries({queryKey:["workers",i]})})]})}function Qr({children:e,w:t,right:i}){return m.jsx("th",{className:["px-4 py-3 text-left font-[family-name:var(--font-heading)] font-bold text-[12px] uppercase tracking-wider text-[var(--color-text-muted)]",i?"text-right":""].join(" "),style:t?{width:t}:void 0,children:e})}function cR({project:e,worker:t,onChange:i,onDetail:r}){const{confirm:l,alert:o}=si(),c=t.state==="idle",f=t.state==="crashed"||t.state==="stuck";return m.jsxs("tr",{className:"border-b border-dashed border-[var(--color-border-light)] last:border-0 hover:bg-[var(--color-accent-yellow)] transition-colors",children:[m.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] font-bold",children:t.slot}),m.jsx("td",{className:"px-4 py-3",children:t.card?m.jsxs("span",{className:"font-semibold",children:[m.jsxs("span",{className:"inline-block px-2 py-0.5 text-xs bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full font-[family-name:var(--font-mono)] mr-2",children:["#",t.card.seq]}),t.card.title]}):m.jsx("em",{className:"text-[var(--color-text-subtle)]",children:"— 空闲 —"})}),m.jsx("td",{className:"px-4 py-3",children:m.jsx(aS,{state:t.state})}),m.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:t.stage||"—"}),m.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:t.pid??"—"}),m.jsx("td",{className:"px-4 py-3 font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:rS(t.runtimeMs)}),m.jsxs("td",{className:"px-4 py-3 text-right space-x-2",children:[m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:r,type:"button","aria-label":`查看 worker-${t.slot} 详情`,children:[m.jsx(YC,{size:12,strokeWidth:2.5})," 详情"]}),f&&t.card&&m.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await l({title:`重启 worker-${t.slot}`,body:`先杀掉当前进程,然后重新 launch 到卡 #${t.card.seq}。`,confirm:"重启"})){try{await wf(e,t.slot)}catch{}try{await iS(e,t.slot,t.card.seq),i()}catch(h){o({title:"重启失败",body:h instanceof Error?h.message:String(h)})}}},type:"button",children:[m.jsx(jl,{size:12,strokeWidth:2.5})," 重启"]}),!c&&m.jsxs(m.Fragment,{children:[m.jsxs(Sr,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"nb-btn",style:{display:"inline-flex",padding:"4px 10px",fontSize:11},children:[m.jsx(EA,{size:12,strokeWidth:2.5})," log"]}),m.jsxs("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await l({title:`终止 worker-${t.slot}`,body:"当前任务会被强制中断,未保存的工作可能丢失。",confirm:"终止",danger:!0})&&(await wf(e,t.slot),i())},type:"button",children:[m.jsx(WE,{size:12,strokeWidth:2.5})," 终止"]})]})]})]})}function uR({project:e,slot:t,onClose:i,onChange:r}){const{confirm:l,alert:o}=si(),{data:c,isLoading:f,isError:d,error:h,refetch:y}=St({queryKey:["worker-detail",e,t],queryFn:()=>lR(e,t),refetchInterval:3e3});return m.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",onClick:i,children:m.jsxs("div",{onClick:g=>g.stopPropagation(),className:"nb-card mt-8 w-full max-w-3xl",children:[m.jsxs("header",{className:"flex items-center justify-between mb-3",children:[m.jsxs("div",{children:[m.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:["worker-",t]}),m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-0.5",children:e})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>y(),type:"button","aria-label":"刷新",children:[m.jsx(Df,{size:12,strokeWidth:2.5})," 刷新"]}),m.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:i,type:"button","aria-label":"关闭",children:"✕"})]})]}),f&&m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),d&&m.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",h instanceof Error?h.message:String(h)]}),c&&m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:m.jsxs("dl",{className:"grid grid-cols-[130px_1fr] gap-y-2 text-sm",children:[m.jsx("dt",{className:"font-bold",children:"状态"}),m.jsx("dd",{children:m.jsx(aS,{state:c.state})}),m.jsx("dt",{className:"font-bold",children:"PID"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:c.pid??"—"}),m.jsx("dt",{className:"font-bold",children:"Card"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:c.card?`#${c.card.seq} · ${c.card.title}`:"—"}),m.jsx("dt",{className:"font-bold",children:"Stage"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:c.stage??"—"}),m.jsx("dt",{className:"font-bold",children:"Runtime"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:rS(c.runtimeMs)}),m.jsx("dt",{className:"font-bold",children:"Marker"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs text-[var(--color-text-muted)] break-all",children:c.markerPath}),m.jsx("dt",{className:"font-bold",children:"Marker 更新"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:c.markerUpdatedAt?`${new Date(c.markerUpdatedAt).toLocaleString()} (${fR(c.markerUpdatedAt)})`:"—"})]})}),m.jsxs("div",{children:[m.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:["最近 ",c.recentLogs.length," 行日志"]}),c.recentLogs.length===0?m.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:["没找到带 worker-",t," 标签的日志。去 Logs 页看全量。"]}):m.jsx("pre",{className:"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-64 overflow-auto whitespace-pre-wrap break-words",children:c.recentLogs.map(g=>`${g.ts??""} [${g.level}] ${g.msg}`).join(`
451
+ `)}),m.jsx(Sr,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t}`,className:"inline-block mt-2 text-xs underline text-[var(--color-running)]",children:"查看完整 log →"})]}),m.jsxs("div",{className:"flex gap-2 justify-end border-t-2 border-dashed border-[var(--color-text)] pt-3",children:[(c.state==="crashed"||c.state==="stuck")&&c.card&&m.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{if(await l({title:`重启 worker-${t}`,body:`先杀掉当前进程,重新 launch 到卡 #${c.card.seq}。`,confirm:"重启"})){try{await wf(e,t)}catch{}try{await iS(e,t,c.card.seq),r(),y()}catch(v){o({title:"重启失败",body:v instanceof Error?v.message:String(v)})}}},type:"button",children:[m.jsx(jl,{size:14,strokeWidth:2.5})," 重启"]}),c.state!=="idle"&&m.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:async()=>{if(await l({title:`终止 worker-${t}`,body:"当前任务会被强制中断。",confirm:"终止",danger:!0}))try{await wf(e,t),r(),y()}catch(v){o({title:"终止失败",body:v instanceof Error?v.message:String(v)})}},type:"button",children:[m.jsx(WE,{size:14,strokeWidth:3})," 终止"]}),c.state==="running"&&m.jsx(cn,{size:14,strokeWidth:3,className:"animate-spin self-center text-[var(--color-running)]"})]})]})]})})}function fR(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 aS({state:e}){const t={running:{bg:"var(--color-running-bg)",color:"var(--color-running)"},stuck:{bg:"var(--color-stuck-bg)",color:"var(--color-stuck)"},crashed:{bg:"var(--color-crashed-bg)",color:"var(--color-crashed)"},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)"}},{bg:i,color:r}=t[e];return m.jsx("span",{className:"nb-status",style:{background:i,color:r},children:e})}function rS(e){if(e==null||e<=0)return"—";const t=Math.floor(e/1e3),i=Math.floor(t/3600),r=Math.floor(t%3600/60),l=t%60,o=c=>c.toString().padStart(2,"0");return i>0?`${o(i)}:${o(r)}:${o(l)}`:`${o(r)}:${o(l)}`}function dR(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),t.set("limit",String(e.limit)),e.since&&t.set("since",e.since),qt(`/api/logs?${t}`)}function hR(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"],mR=["error","warn","info"];function gR(){const[e,t]=zm(),i=e.get("project"),r=e.get("worker")??"",[l,o]=M.useState([]),[c,f]=M.useState(!1),[d,h]=M.useState(!0),[y,g]=M.useState(()=>new Set(mR)),[v,x]=M.useState(""),[S,w]=M.useState("live"),[k,_]=M.useState(()=>{const T=new Date(Date.now()-36e5),P=z=>String(z).padStart(2,"0");return`${T.getFullYear()}-${P(T.getMonth()+1)}-${P(T.getDate())}T${P(T.getHours())}:${P(T.getMinutes())}`}),R=M.useRef(null),{data:A,refetch:I}=St({queryKey:["logs",i,r,S,S==="history"?k:"live"],queryFn:()=>dR({project:i??"",worker:r||void 0,limit:S==="history"?2e3:500,since:S==="history"?new Date(k).toISOString():void 0}),enabled:!!i});M.useEffect(()=>{A!=null&&A.data&&o(A.data)},[A]),M.useEffect(()=>{if(!i||S!=="live")return;const T=hR({project:i,worker:r||void 0}),P=new EventSource(T);return P.addEventListener("log.line",z=>{if(!c)try{const Z=JSON.parse(z.data);o(L=>{const K=[...L,Z];return K.length>5e3&&K.splice(0,K.length-5e3),K})}catch{}}),()=>P.close()},[i,r,c,S]),M.useEffect(()=>{if(!d)return;const T=R.current;T&&(T.scrollTop=T.scrollHeight)},[l,d]);const $=M.useMemo(()=>{const T=v.toLowerCase();return l.filter(P=>!(!y.has(P.level)||T&&!P.msg.toLowerCase().includes(T)))},[l,y,v]);return i?m.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[m.jsxs("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Logs 📜"}),m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[i,r&&` · worker-${r}`," · tail -f · ",l.length," lines",c&&m.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:"⏸ PAUSED"})]})]}),m.jsx("div",{className:"flex gap-3 items-center",children:m.jsx(ag,{current:i,onChange:T=>t({project:T})})})]}),m.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[m.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:[m.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:[m.jsx(YE,{size:11,strokeWidth:2.5}),"实时"]}),m.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:[m.jsx(KC,{size:11,strokeWidth:2.5}),"历史"]})]}),S==="history"&&m.jsxs(m.Fragment,{children:[m.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:k,onChange:T=>_(T.target.value),"aria-label":"查询起始时间"}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>I(),type:"button","aria-label":"查询",children:[m.jsx(yf,{size:11,strokeWidth:3}),"查询"]})]}),m.jsxs("div",{className:"relative flex-1 max-w-md",children:[m.jsx(yf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),m.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"过滤关键字…",value:v,onChange:T=>x(T.target.value),"aria-label":"过滤日志"})]}),m.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(T=>m.jsx(bR,{level:T,enabled:y.has(T),onToggle:()=>{g(P=>{const z=new Set(P);return z.has(T)?z.delete(T):z.add(T),z})}},T))}),m.jsxs("div",{className:"ml-auto flex gap-2",children:[S==="live"&&m.jsxs(m.Fragment,{children:[m.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>h(T=>!T),type:"button",children:d?"✓ Auto-scroll":"Auto-scroll"}),m.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(T=>!T),type:"button",children:c?m.jsxs(m.Fragment,{children:[m.jsx(Pm,{size:12,strokeWidth:3})," Resume"]}):m.jsxs(m.Fragment,{children:[m.jsx(rA,{size:12,strokeWidth:3})," Pause"]})})]}),m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const T=new Blob([$.map(Z=>Z.raw).join(`
452
+ `)],{type:"text/plain"}),P=URL.createObjectURL(T),z=document.createElement("a");z.href=P,z.download=`${i}-log-${Date.now()}.log`,z.click(),URL.revokeObjectURL(P)},type:"button",children:[m.jsx(KE,{size:12,strokeWidth:2.5})," Export"]})]})]}),m.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[m.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:[m.jsx("span",{className:"text-[var(--color-text-muted)]",children:(A==null?void 0:A.file)??"~/.coral/projects/.../logs/*.log"}),S==="live"?m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):m.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),m.jsxs("div",{ref:R,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:T=>{const P=T.currentTarget;!(P.scrollHeight-P.scrollTop-P.clientHeight<40)&&d&&h(!1)},children:[$.map((T,P)=>m.jsx(yR,{line:T},P)),$.length===0&&m.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:"没有匹配的日志"})]})]})]}):m.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-accent-yellow)]",children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"Logs 📜"}),m.jsxs("p",{className:"text-sm",children:["需要 ",m.jsx("code",{children:"?project=xx"}),"。"]})]})}function bR({level:e,enabled:t,onToggle:i}){const r={error:"var(--color-crashed-bg)",warn:"var(--color-stuck-bg)",info:"var(--color-secondary)",debug:"var(--color-accent-purple)"},l={error:"var(--color-crashed)",warn:"var(--color-stuck)",info:"var(--color-text)",debug:"var(--color-text)"};return m.jsx("button",{type:"button",onClick:i,"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:r[e],color:l[e]}:{},children:e.toUpperCase()})}function yR({line:e}){var i;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:""};return m.jsxs("div",{className:"grid grid-cols-[100px_60px_1fr] gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",children:[m.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((i=e.ts.split("T")[1])==null?void 0:i.replace("Z",""))??e.ts:"--"}),m.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),m.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function xR(e,t){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const vR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ER=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SR={};function Qv(e,t){return(SR.jsx?ER:vR).test(e)}const wR=/[ \t\n\f\r]/g;function _R(e){return typeof e=="object"?e.type==="text"?Vv(e.value):!1:Vv(e)}function Vv(e){return e.replace(wR,"")===""}class Ec{constructor(t,i,r){this.normal=i,this.property=t,r&&(this.space=r)}}Ec.prototype.normal={};Ec.prototype.property={};Ec.prototype.space=void 0;function sS(e,t){const i={},r={};for(const l of e)Object.assign(i,l.property),Object.assign(r,l.normal);return new Ec(i,r,t)}function cm(e){return e.toLowerCase()}class Pn{constructor(t,i){this.attribute=i,this.property=t}}Pn.prototype.attribute="";Pn.prototype.booleanish=!1;Pn.prototype.boolean=!1;Pn.prototype.commaOrSpaceSeparated=!1;Pn.prototype.commaSeparated=!1;Pn.prototype.defined=!1;Pn.prototype.mustUseProperty=!1;Pn.prototype.number=!1;Pn.prototype.overloadedBoolean=!1;Pn.prototype.property="";Pn.prototype.spaceSeparated=!1;Pn.prototype.space=void 0;let kR=0;const Fe=ms(),Xt=ms(),um=ms(),ue=ms(),Et=ms(),ml=ms(),Jn=ms();function ms(){return 2**++kR}const fm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Fe,booleanish:Xt,commaOrSpaceSeparated:Jn,commaSeparated:ml,number:ue,overloadedBoolean:um,spaceSeparated:Et},Symbol.toStringTag,{value:"Module"})),xp=Object.keys(fm);class rg extends Pn{constructor(t,i,r,l){let o=-1;if(super(t,i),Xv(this,"space",l),typeof r=="number")for(;++o<xp.length;){const c=xp[o];Xv(this,xp[o],(r&fm[c])===fm[c])}}}rg.prototype.defined=!0;function Xv(e,t,i){i&&(e[t]=i)}function ql(e){const t={},i={};for(const[r,l]of Object.entries(e.properties)){const o=new rg(r,e.transform(e.attributes||{},r),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,i[cm(r)]=r,i[cm(o.attribute)]=r}return new Ec(t,i,e.space)}const lS=ql({properties:{ariaActiveDescendant:null,ariaAtomic:Xt,ariaAutoComplete:null,ariaBusy:Xt,ariaChecked:Xt,ariaColCount:ue,ariaColIndex:ue,ariaColSpan:ue,ariaControls:Et,ariaCurrent:null,ariaDescribedBy:Et,ariaDetails:null,ariaDisabled:Xt,ariaDropEffect:Et,ariaErrorMessage:null,ariaExpanded:Xt,ariaFlowTo:Et,ariaGrabbed:Xt,ariaHasPopup:null,ariaHidden:Xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Et,ariaLevel:ue,ariaLive:null,ariaModal:Xt,ariaMultiLine:Xt,ariaMultiSelectable:Xt,ariaOrientation:null,ariaOwns:Et,ariaPlaceholder:null,ariaPosInSet:ue,ariaPressed:Xt,ariaReadOnly:Xt,ariaRelevant:null,ariaRequired:Xt,ariaRoleDescription:Et,ariaRowCount:ue,ariaRowIndex:ue,ariaRowSpan:ue,ariaSelected:Xt,ariaSetSize:ue,ariaSort:null,ariaValueMax:ue,ariaValueMin:ue,ariaValueNow:ue,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function oS(e,t){return t in e?e[t]:t}function cS(e,t){return oS(e,t.toLowerCase())}const NR=ql({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ml,acceptCharset:Et,accessKey:Et,action:null,allow:null,allowFullScreen:Fe,allowPaymentRequest:Fe,allowUserMedia:Fe,alt:null,as:null,async:Fe,autoCapitalize:null,autoComplete:Et,autoFocus:Fe,autoPlay:Fe,blocking:Et,capture:null,charSet:null,checked:Fe,cite:null,className:Et,cols:ue,colSpan:null,content:null,contentEditable:Xt,controls:Fe,controlsList:Et,coords:ue|ml,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Fe,defer:Fe,dir:null,dirName:null,disabled:Fe,download:um,draggable:Xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Fe,formTarget:null,headers:Et,height:ue,hidden:um,high:ue,href:null,hrefLang:null,htmlFor:Et,httpEquiv:Et,id:null,imageSizes:null,imageSrcSet:null,inert:Fe,inputMode:null,integrity:null,is:null,isMap:Fe,itemId:null,itemProp:Et,itemRef:Et,itemScope:Fe,itemType:Et,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Fe,low:ue,manifest:null,max:null,maxLength:ue,media:null,method:null,min:null,minLength:ue,multiple:Fe,muted:Fe,name:null,nonce:null,noModule:Fe,noValidate:Fe,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:Fe,optimum:ue,pattern:null,ping:Et,placeholder:null,playsInline:Fe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Fe,referrerPolicy:null,rel:Et,required:Fe,reversed:Fe,rows:ue,rowSpan:ue,sandbox:Et,scope:null,scoped:Fe,seamless:Fe,selected:Fe,shadowRootClonable:Fe,shadowRootDelegatesFocus:Fe,shadowRootMode:null,shape:null,size:ue,sizes:null,slot:null,span:ue,spellCheck:Xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ue,step:null,style:null,tabIndex:ue,target:null,title:null,translate:null,type:null,typeMustMatch:Fe,useMap:null,value:Xt,width:ue,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Et,axis:null,background:null,bgColor:null,border:ue,borderColor:null,bottomMargin:ue,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Fe,declare:Fe,event:null,face:null,frame:null,frameBorder:null,hSpace:ue,leftMargin:ue,link:null,longDesc:null,lowSrc:null,marginHeight:ue,marginWidth:ue,noResize:Fe,noHref:Fe,noShade:Fe,noWrap:Fe,object:null,profile:null,prompt:null,rev:null,rightMargin:ue,rules:null,scheme:null,scrolling:Xt,standby:null,summary:null,text:null,topMargin:ue,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ue,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Fe,disableRemotePlayback:Fe,prefix:null,property:null,results:ue,security:null,unselectable:null},space:"html",transform:cS}),TR=ql({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:Jn,accentHeight:ue,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ue,amplitude:ue,arabicForm:null,ascent:ue,attributeName:null,attributeType:null,azimuth:ue,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ue,by:null,calcMode:null,capHeight:ue,className:Et,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:ue,diffuseConstant:ue,direction:null,display:null,dur:null,divisor:ue,dominantBaseline:null,download:Fe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ue,enableBackground:null,end:null,event:null,exponent:ue,externalResourcesRequired:null,fill:null,fillOpacity:ue,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:ml,g2:ml,glyphName:ml,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ue,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ue,horizOriginX:ue,horizOriginY:ue,id:null,ideographic:ue,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ue,k:ue,k1:ue,k2:ue,k3:ue,k4:ue,kernelMatrix:Jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ue,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:ue,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:ue,overlineThickness:ue,paintOrder:null,panose1:null,path:null,pathLength:ue,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Et,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ue,pointsAtY:ue,pointsAtZ:ue,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jn,rev:Jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jn,requiredFeatures:Jn,requiredFonts:Jn,requiredFormats:Jn,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:ue,specularExponent:ue,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ue,strikethroughThickness:ue,string:null,stroke:null,strokeDashArray:Jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ue,strokeOpacity:ue,strokeWidth:null,style:null,surfaceScale:ue,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jn,tabIndex:ue,tableValues:null,target:null,targetX:ue,targetY:ue,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ue,underlineThickness:ue,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ue,values:null,vAlphabetic:ue,vMathematical:ue,vectorEffect:null,vHanging:ue,vIdeographic:ue,version:null,vertAdvY:ue,vertOriginX:ue,vertOriginY:ue,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ue,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:oS}),uS=ql({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()}}),fS=ql({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cS}),dS=ql({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),CR={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"},AR=/[A-Z]/g,Zv=/-[a-z]/g,OR=/^data[-\w.:]+$/i;function RR(e,t){const i=cm(t);let r=t,l=Pn;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&OR.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Zv,DR);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Zv.test(o)){let c=o.replace(AR,MR);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}l=rg}return new l(r,t)}function MR(e){return"-"+e.toLowerCase()}function DR(e){return e.charAt(1).toUpperCase()}const LR=sS([lS,NR,uS,fS,dS],"html"),sg=sS([lS,TR,uS,fS,dS],"svg");function jR(e){return e.join(" ").trim()}var al={},vp,Wv;function IR(){if(Wv)return vp;Wv=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
453
+ `,h="/",y="*",g="",v="comment",x="declaration";function S(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var R=1,A=1;function I(se){var ee=se.match(t);ee&&(R+=ee.length);var H=se.lastIndexOf(d);A=~H?se.length-H:A+se.length}function $(){var se={line:R,column:A};return function(ee){return ee.position=new T(se),Z(),ee}}function T(se){this.start=se,this.end={line:R,column:A},this.source=_.source}T.prototype.content=k;function P(se){var ee=new Error(_.source+":"+R+":"+A+": "+se);if(ee.reason=se,ee.filename=_.source,ee.line=R,ee.column=A,ee.source=k,!_.silent)throw ee}function z(se){var ee=se.exec(k);if(ee){var H=ee[0];return I(H),k=k.slice(H.length),ee}}function Z(){z(i)}function L(se){var ee;for(se=se||[];ee=K();)ee!==!1&&se.push(ee);return se}function K(){var se=$();if(!(h!=k.charAt(0)||y!=k.charAt(1))){for(var ee=2;g!=k.charAt(ee)&&(y!=k.charAt(ee)||h!=k.charAt(ee+1));)++ee;if(ee+=2,g===k.charAt(ee-1))return P("End of comment missing");var H=k.slice(2,ee-2);return A+=2,I(H),k=k.slice(ee),A+=2,se({type:v,comment:H})}}function X(){var se=$(),ee=z(r);if(ee){if(K(),!z(l))return P("property missing ':'");var H=z(o),le=se({type:x,property:w(ee[0].replace(e,g)),value:H?w(H[0].replace(e,g)):g});return z(c),le}}function oe(){var se=[];L(se);for(var ee;ee=X();)ee!==!1&&(se.push(ee),L(se));return se}return Z(),oe()}function w(k){return k?k.replace(f,g):g}return vp=S,vp}var Jv;function zR(){if(Jv)return al;Jv=1;var e=al&&al.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(al,"__esModule",{value:!0}),al.default=i;const t=e(IR());function i(r,l){let o=null;if(!r||typeof r!="string")return o;const c=(0,t.default)(r),f=typeof l=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:y}=d;f?l(h,y,d):y&&(o=o||{},o[h]=y)}),o}return al}var Ho={},e0;function BR(){if(e0)return Ho;e0=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(h){return!h||i.test(h)||e.test(h)},c=function(h,y){return y.toUpperCase()},f=function(h,y){return"".concat(y,"-")},d=function(h,y){return y===void 0&&(y={}),o(h)?h:(h=h.toLowerCase(),y.reactCompat?h=h.replace(l,f):h=h.replace(r,f),h.replace(t,c))};return Ho.camelCase=d,Ho}var Ko,t0;function UR(){if(t0)return Ko;t0=1;var e=Ko&&Ko.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(zR()),i=BR();function r(l,o){var c={};return!l||typeof l!="string"||(0,t.default)(l,function(f,d){f&&d&&(c[(0,i.camelCase)(f,o)]=d)}),c}return r.default=r,Ko=r,Ko}var FR=UR();const PR=Sm(FR),hS=pS("end"),lg=pS("start");function pS(e){return t;function t(i){const r=i&&i.position&&i.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function $R(e){const t=lg(e),i=hS(e);if(t&&i)return{start:t,end:i}}function Wo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?n0(e.position):"start"in e||"end"in e?n0(e):"line"in e||"column"in e?dm(e):""}function dm(e){return i0(e&&e.line)+":"+i0(e&&e.column)}function n0(e){return dm(e&&e.start)+"-"+dm(e&&e.end)}function i0(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let l="",o={},c=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o={...i}),typeof t=="string"?l=t:!o.cause&&t&&(c=!0,l=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.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=l,this.line=f?f.line:void 0,this.name=Wo(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 og={}.hasOwnProperty,qR=new Map,HR=/[A-Z]/g,KR=new Set(["table","tbody","thead","tfoot","tr"]),GR=new Set(["td","th"]),mS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function YR(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=tM(i,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");r=eM(i,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?sg:LR,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=gS(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function gS(e,t,i){if(t.type==="element")return QR(e,t,i);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return VR(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ZR(e,t,i);if(t.type==="mdxjsEsm")return XR(e,t);if(t.type==="root")return WR(e,t,i);if(t.type==="text")return JR(e,t)}function QR(e,t,i){const r=e.schema;let l=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(l=sg,e.schema=l),e.ancestors.push(t);const o=yS(e,t.tagName,!1),c=nM(e,t);let f=ug(e,t);return KR.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!_R(d):!0})),bS(e,c,o,t),cg(c,f),e.ancestors.pop(),e.schema=r,e.create(t,o,c,i)}function VR(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}lc(e,t.position)}function XR(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);lc(e,t.position)}function ZR(e,t,i){const r=e.schema;let l=r;t.name==="svg"&&r.space==="html"&&(l=sg,e.schema=l),e.ancestors.push(t);const o=t.name===null?e.Fragment:yS(e,t.name,!0),c=iM(e,t),f=ug(e,t);return bS(e,c,o,t),cg(c,f),e.ancestors.pop(),e.schema=r,e.create(t,o,c,i)}function WR(e,t,i){const r={};return cg(r,ug(e,t)),e.create(t,e.Fragment,r,i)}function JR(e,t){return t.value}function bS(e,t,i,r){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(t.node=r)}function cg(e,t){if(t.length>0){const i=t.length>1?t:t[0];i&&(e.children=i)}}function eM(e,t,i){return r;function r(l,o,c,f){const h=Array.isArray(c.children)?i:t;return f?h(o,c,f):h(o,c)}}function tM(e,t){return i;function i(r,l,o,c){const f=Array.isArray(o.children),d=lg(r);return t(l,o,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function nM(e,t){const i={};let r,l;for(l in t.properties)if(l!=="children"&&og.call(t.properties,l)){const o=aM(e,l,t.properties[l]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&GR.has(t.tagName)?r=f:i[c]=f}}if(r){const o=i.style||(i.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function iM(e,t){const i={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else lc(e,t.position);else{const l=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const f=r.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else lc(e,t.position);else o=r.value===null?!0:r.value;i[l]=o}return i}function ug(e,t){const i=[];let r=-1;const l=e.passKeys?new Map:qR;for(;++r<t.children.length;){const o=t.children[r];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 h=l.get(d)||0;c=d+"-"+h,l.set(d,h+1)}}const f=gS(e,o,c);f!==void 0&&i.push(f)}return i}function aM(e,t,i){const r=RR(e.schema,t);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?xR(i):jR(i)),r.property==="style"){let l=typeof i=="object"?i:rM(e,String(i));return e.stylePropertyNameCase==="css"&&(l=sM(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&r.space?CR[r.property]||r.property:r.attribute,i]}}function rM(e,t){try{return PR(t,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const r=i,l=new bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=mS+"#cannot-parse-style-attribute",l}}function yS(e,t,i){let r;if(!i)r={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let o=-1,c;for(;++o<l.length;){const f=Qv(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}r=c}else r=Qv(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const l=r.value;return og.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(r);lc(e)}function lc(e,t){const i=new bn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=mS+"#cannot-handle-mdx-estrees-without-createevaluater",i}function sM(e){const t={};let i;for(i in e)og.call(e,i)&&(t[lM(i)]=e[i]);return t}function lM(e){let t=e.replace(HR,oM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function oM(e){return"-"+e.toLowerCase()}const Ep={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"]},cM={};function fg(e,t){const i=cM,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,l=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return xS(e,r,l)}function xS(e,t,i){if(uM(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return a0(e.children,t,i)}return Array.isArray(e)?a0(e,t,i):""}function a0(e,t,i){const r=[];let l=-1;for(;++l<e.length;)r[l]=xS(e[l],t,i);return r.join("")}function uM(e){return!!(e&&typeof e=="object")}const r0=document.createElement("i");function dg(e){const t="&"+e+";";r0.innerHTML=t;const i=r0.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===t?!1:i}function ii(e,t,i,r){const l=e.length;let o=0,c;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,i=i>0?i:0,r.length<1e4)c=Array.from(r),c.unshift(t,i),e.splice(...c);else for(i&&e.splice(t,i);o<r.length;)c=r.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function xi(e,t){return e.length>0?(ii(e,e.length,0,t),e):t}const s0={}.hasOwnProperty;function vS(e){const t={};let i=-1;for(;++i<e.length;)fM(t,e[i]);return t}function fM(e,t){let i;for(i in t){const l=(s0.call(e,i)?e[i]:void 0)||(e[i]={}),o=t[i];let c;if(o)for(c in o){s0.call(l,c)||(l[c]=[]);const f=o[c];dM(l[c],Array.isArray(f)?f:f?[f]:[])}}}function dM(e,t){let i=-1;const r=[];for(;++i<t.length;)(t[i].add==="after"?e:r).push(t[i]);ii(e,0,0,r)}function ES(e,t){const i=Number.parseInt(e,t);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Mi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nn=_r(/[A-Za-z]/),mn=_r(/[\dA-Za-z]/),hM=_r(/[#-'*+\--9=?A-Z^-~]/);function _f(e){return e!==null&&(e<32||e===127)}const hm=_r(/\d/),pM=_r(/[\dA-Fa-f]/),mM=_r(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function yt(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const Qf=_r(new RegExp("\\p{P}|\\p{S}","u")),fs=_r(/\s/);function _r(e){return t;function t(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Hl(e){const t=[];let i=-1,r=0,l=0;for(;++i<e.length;){const o=e.charCodeAt(i);let c="";if(o===37&&mn(e.charCodeAt(i+1))&&mn(e.charCodeAt(i+2)))l=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(i+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),l=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(r,i),encodeURIComponent(c)),r=i+l+1,c=""),l&&(i+=l,l=0)}return t.join("")+e.slice(r)}function Je(e,t,i,r){const l=r?r-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(d){return Ge(d)?(e.enter(i),f(d)):t(d)}function f(d){return Ge(d)&&o++<l?(e.consume(d),f):(e.exit(i),t(d))}}const gM={tokenize:bM};function bM(e){const t=e.attempt(this.parser.constructs.contentInitial,r,l);let i;return t;function r(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Je(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),o(f)}function o(f){const d=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=d),i=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Te(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const yM={tokenize:xM},l0={tokenize:vM};function xM(e){const t=this,i=[];let r=0,l,o,c;return f;function f(A){if(r<i.length){const I=i[r];return t.containerState=I[1],e.attempt(I[0].continuation,d,h)(A)}return h(A)}function d(A){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&R();const I=t.events.length;let $=I,T;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){T=t.events[$][1].end;break}_(r);let P=I;for(;P<t.events.length;)t.events[P][1].end={...T},P++;return ii(t.events,$+1,0,t.events.slice(I)),t.events.length=P,h(A)}return f(A)}function h(A){if(r===i.length){if(!l)return v(A);if(l.currentConstruct&&l.currentConstruct.concrete)return S(A);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(l0,y,g)(A)}function y(A){return l&&R(),_(r),v(A)}function g(A){return t.parser.lazy[t.now().line]=r!==i.length,c=t.now().offset,S(A)}function v(A){return t.containerState={},e.attempt(l0,x,S)(A)}function x(A){return r++,i.push([t.currentConstruct,t.containerState]),v(A)}function S(A){if(A===null){l&&R(),_(0),e.consume(A);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),w(A)}function w(A){if(A===null){k(e.exit("chunkFlow"),!0),_(0),e.consume(A);return}return Te(A)?(e.consume(A),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,f):(e.consume(A),w)}function k(A,I){const $=t.sliceStream(A);if(I&&$.push(null),A.previous=o,o&&(o.next=A),o=A,l.defineSkip(A.start),l.write($),t.parser.lazy[A.start.line]){let T=l.events.length;for(;T--;)if(l.events[T][1].start.offset<c&&(!l.events[T][1].end||l.events[T][1].end.offset>c))return;const P=t.events.length;let z=P,Z,L;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(Z){L=t.events[z][1].end;break}Z=!0}for(_(r),T=P;T<t.events.length;)t.events[T][1].end={...L},T++;ii(t.events,z+1,0,t.events.slice(P)),t.events.length=T}}function _(A){let I=i.length;for(;I-- >A;){const $=i[I];t.containerState=$[1],$[0].exit.call(t,e)}i.length=A}function R(){l.write([null]),o=void 0,l=void 0,t.containerState._closeFlow=void 0}}function vM(e,t,i){return Je(e,e.attempt(this.parser.constructs.document,t,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ol(e){if(e===null||yt(e)||fs(e))return 1;if(Qf(e))return 2}function Vf(e,t,i){const r=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!r.includes(o)&&(t=o(t,i),r.push(o))}return t}const pm={name:"attention",resolveAll:EM,tokenize:SM};function EM(e,t){let i=-1,r,l,o,c,f,d,h,y;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(r=i;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[r][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const g={...e[r][1].end},v={...e[i][1].start};o0(g,-d),o0(v,d),c={type:d>1?"strongSequence":"emphasisSequence",start:g,end:{...e[r][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:v},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[i][1].start}},l={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[r][1].end={...c.start},e[i][1].start={...f.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=xi(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=xi(h,[["enter",l,t],["enter",c,t],["exit",c,t],["enter",o,t]]),h=xi(h,Vf(t.parser.constructs.insideSpan.null,e.slice(r+1,i),t)),h=xi(h,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[i][1].end.offset-e[i][1].start.offset?(y=2,h=xi(h,[["enter",e[i][1],t],["exit",e[i][1],t]])):y=0,ii(e,r-1,i-r+3,h),i=r+h.length-y-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function SM(e,t){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,l=Ol(r);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 h=e.exit("attentionSequence"),y=Ol(d),g=!y||y===2&&l||i.includes(d),v=!l||l===2&&y||i.includes(r);return h._open=!!(o===42?g:g&&(l||!v)),h._close=!!(o===42?v:v&&(y||!g)),t(d)}}function o0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const wM={name:"autolink",tokenize:_M};function _M(e,t,i){let r=0;return l;function l(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(x){return Nn(x)?(e.consume(x),c):x===64?i(x):h(x)}function c(x){return x===43||x===45||x===46||mn(x)?(r=1,f(x)):h(x)}function f(x){return x===58?(e.consume(x),r=0,d):(x===43||x===45||x===46||mn(x))&&r++<32?(e.consume(x),f):(r=0,h(x))}function d(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||_f(x)?i(x):(e.consume(x),d)}function h(x){return x===64?(e.consume(x),y):hM(x)?(e.consume(x),h):i(x)}function y(x){return mn(x)?g(x):i(x)}function g(x){return x===46?(e.consume(x),r=0,y):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):v(x)}function v(x){if((x===45||mn(x))&&r++<63){const S=x===45?v:g;return e.consume(x),S}return i(x)}}const Sc={partial:!0,tokenize:kM};function kM(e,t,i){return r;function r(o){return Ge(o)?Je(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||Te(o)?t(o):i(o)}}const SS={continuation:{tokenize:TM},exit:CM,name:"blockQuote",tokenize:NM};function NM(e,t,i){const r=this;return l;function l(c){if(c===62){const f=r.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 i(c)}function o(c){return Ge(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function TM(e,t,i){const r=this;return l;function l(c){return Ge(c)?Je(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(SS,t,i)(c)}}function CM(e){e.exit("blockQuote")}const wS={name:"characterEscape",tokenize:AM};function AM(e,t,i){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return mM(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):i(o)}}const _S={name:"characterReference",tokenize:OM};function OM(e,t,i){const r=this;let l=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"),h):(e.enter("characterReferenceValue"),o=31,c=mn,y(g))}function h(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=hm,y(g))}function y(g){if(g===59&&l){const v=e.exit("characterReferenceValue");return c===mn&&!dg(r.sliceSerialize(v))?i(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(g)&&l++<o?(e.consume(g),y):i(g)}}const c0={partial:!0,tokenize:MM},u0={concrete:!0,name:"codeFenced",tokenize:RM};function RM(e,t,i){const r=this,l={partial:!0,tokenize:$};let o=0,c=0,f;return d;function d(T){return h(T)}function h(T){const P=r.events[r.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,f=T,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(T)}function y(T){return T===f?(c++,e.consume(T),y):c<3?i(T):(e.exit("codeFencedFenceSequence"),Ge(T)?Je(e,g,"whitespace")(T):g(T))}function g(T){return T===null||Te(T)?(e.exit("codeFencedFence"),r.interrupt?t(T):e.check(c0,w,I)(T)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(T))}function v(T){return T===null||Te(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(T)):Ge(T)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,x,"whitespace")(T)):T===96&&T===f?i(T):(e.consume(T),v)}function x(T){return T===null||Te(T)?g(T):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(T))}function S(T){return T===null||Te(T)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(T)):T===96&&T===f?i(T):(e.consume(T),S)}function w(T){return e.attempt(l,I,k)(T)}function k(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),_}function _(T){return o>0&&Ge(T)?Je(e,R,"linePrefix",o+1)(T):R(T)}function R(T){return T===null||Te(T)?e.check(c0,w,I)(T):(e.enter("codeFlowValue"),A(T))}function A(T){return T===null||Te(T)?(e.exit("codeFlowValue"),R(T)):(e.consume(T),A)}function I(T){return e.exit("codeFenced"),t(T)}function $(T,P,z){let Z=0;return L;function L(ee){return T.enter("lineEnding"),T.consume(ee),T.exit("lineEnding"),K}function K(ee){return T.enter("codeFencedFence"),Ge(ee)?Je(T,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):X(ee)}function X(ee){return ee===f?(T.enter("codeFencedFenceSequence"),oe(ee)):z(ee)}function oe(ee){return ee===f?(Z++,T.consume(ee),oe):Z>=c?(T.exit("codeFencedFenceSequence"),Ge(ee)?Je(T,se,"whitespace")(ee):se(ee)):z(ee)}function se(ee){return ee===null||Te(ee)?(T.exit("codeFencedFence"),P(ee)):z(ee)}}}function MM(e,t,i){const r=this;return l;function l(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return r.parser.lazy[r.now().line]?i(c):t(c)}}const Sp={name:"codeIndented",tokenize:LM},DM={partial:!0,tokenize:jM};function LM(e,t,i){const r=this;return l;function l(h){return e.enter("codeIndented"),Je(e,o,"linePrefix",5)(h)}function o(h){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?d(h):Te(h)?e.attempt(DM,c,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Te(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function jM(e,t,i){const r=this;return l;function l(c){return r.parser.lazy[r.now().line]?i(c):Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):Je(e,o,"linePrefix",5)(c)}function o(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Te(c)?l(c):i(c)}}const IM={name:"codeText",previous:BM,resolve:zM,tokenize:UM};function zM(e){let t=e.length-4,i=3,r,l;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=i;++r<t;)if(e[r][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[t][1].type="codeTextPadding",i+=2,t-=2;break}}for(r=i-1,t++;++r<=t;)l===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(l=r):(r===t||e[r][1].type==="lineEnding")&&(e[l][1].type="codeTextData",r!==l+2&&(e[l][1].end=e[r-1][1].end,e.splice(l+2,r-l-2),t-=r-l-2,r=l+2),l=void 0);return e}function BM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UM(e,t,i){let r=0,l,o;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),r++,f):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?i(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(o=e.enter("codeTextSequence"),l=0,y(g)):Te(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Te(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function y(g){return g===96?(e.consume(g),l++,y):l===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(o.type="codeTextData",h(g))}}class FM{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,i){const r=i??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,i,r){const l=i||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return r&&Go(this.left,r),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),Go(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Go(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 i=this.left.splice(t,Number.POSITIVE_INFINITY);Go(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Go(this.left,i.reverse())}}}function Go(e,t){let i=0;if(t.length<1e4)e.push(...t);else for(;i<t.length;)e.push(...t.slice(i,i+1e4)),i+=1e4}function kS(e){const t={};let i=-1,r,l,o,c,f,d,h;const y=new FM(e);for(;++i<y.length;){for(;i in t;)i=t[i];if(r=y.get(i),i&&r[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(d=r[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(r[0]==="enter")r[1].contentType&&(Object.assign(t,PM(y,i)),i=t[i],h=!0);else if(r[1]._container){for(o=i,l=void 0;o--;)if(c=y.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(y.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(r[1].end={...y.get(l)[1].start},f=y.slice(l,i),f.unshift(r),y.splice(l,i-l+1,f))}}return ii(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!h}function PM(e,t){const i=e.get(t)[1],r=e.get(t)[2];let l=t-1;const o=[];let c=i._tokenizer;c||(c=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],h={};let y,g,v=-1,x=i,S=0,w=0;const k=[w];for(;x;){for(;e.get(++l)[1]!==x;);o.push(l),x._tokenizer||(y=r.sliceStream(x),x.next||y.push(null),g&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=x,x=x.next}for(x=i;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(w=v+1,k.push(w),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):k.pop(),v=k.length;v--;){const _=f.slice(k[v],k[v+1]),R=o.pop();d.push([R,R+_.length-1]),e.splice(R,2,_)}for(d.reverse(),v=-1;++v<d.length;)h[S+d[v][0]]=S+d[v][1],S+=d[v][1]-d[v][0]-1;return h}const $M={resolve:HM,tokenize:KM},qM={partial:!0,tokenize:GM};function HM(e){return kS(e),e}function KM(e,t){let i;return r;function r(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?o(f):Te(f)?e.check(qM,c,o)(f):(e.consume(f),l)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,l}}function GM(e,t,i){const r=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Je(e,o,"linePrefix")}function o(c){if(c===null||Te(c))return i(c);const f=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(r.parser.constructs.flow,i,t)(c)}}function NS(e,t,i,r,l,o,c,f,d){const h=d||Number.POSITIVE_INFINITY;let y=0;return g;function g(_){return _===60?(e.enter(r),e.enter(l),e.enter(o),e.consume(_),e.exit(o),v):_===null||_===32||_===41||_f(_)?i(_):(e.enter(r),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(_))}function v(_){return _===62?(e.enter(o),e.consume(_),e.exit(o),e.exit(l),e.exit(r),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(_))}function x(_){return _===62?(e.exit("chunkString"),e.exit(f),v(_)):_===null||_===60||Te(_)?i(_):(e.consume(_),_===92?S:x)}function S(_){return _===60||_===62||_===92?(e.consume(_),x):x(_)}function w(_){return!y&&(_===null||_===41||yt(_))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(r),t(_)):y<h&&_===40?(e.consume(_),y++,w):_===41?(e.consume(_),y--,w):_===null||_===32||_===40||_f(_)?i(_):(e.consume(_),_===92?k:w)}function k(_){return _===40||_===41||_===92?(e.consume(_),w):w(_)}}function TS(e,t,i,r,l,o){const c=this;let f=0,d;return h;function h(x){return e.enter(r),e.enter(l),e.consume(x),e.exit(l),e.enter(o),y}function y(x){return f>999||x===null||x===91||x===93&&!d||x===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(x):x===93?(e.exit(o),e.enter(l),e.consume(x),e.exit(l),e.exit(r),t):Te(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||x===91||x===93||Te(x)||f++>999?(e.exit("chunkString"),y(x)):(e.consume(x),d||(d=!Ge(x)),x===92?v:g)}function v(x){return x===91||x===92||x===93?(e.consume(x),f++,g):g(x)}}function CS(e,t,i,r,l,o){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(r),e.enter(l),e.consume(v),e.exit(l),c=v===40?41:v,d):i(v)}function d(v){return v===c?(e.enter(l),e.consume(v),e.exit(l),e.exit(r),t):(e.enter(o),h(v))}function h(v){return v===c?(e.exit(o),d(c)):v===null?i(v):Te(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===c||v===null||Te(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?g:y)}function g(v){return v===c||v===92?(e.consume(v),y):y(v)}}function Jo(e,t){let i;return r;function r(l){return Te(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i=!0,r):Ge(l)?Je(e,r,i?"linePrefix":"lineSuffix")(l):t(l)}}const YM={name:"definition",tokenize:VM},QM={partial:!0,tokenize:XM};function VM(e,t,i){const r=this;let l;return o;function o(x){return e.enter("definition"),c(x)}function c(x){return TS.call(r,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return l=Mi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),d):i(x)}function d(x){return yt(x)?Jo(e,h)(x):h(x)}function h(x){return NS(e,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function y(x){return e.attempt(QM,g,g)(x)}function g(x){return Ge(x)?Je(e,v,"whitespace")(x):v(x)}function v(x){return x===null||Te(x)?(e.exit("definition"),r.parser.defined.push(l),t(x)):i(x)}}function XM(e,t,i){return r;function r(f){return yt(f)?Jo(e,l)(f):i(f)}function l(f){return CS(e,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return Ge(f)?Je(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Te(f)?t(f):i(f)}}const ZM={name:"hardBreakEscape",tokenize:WM};function WM(e,t,i){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return Te(o)?(e.exit("hardBreakEscape"),t(o)):i(o)}}const JM={name:"headingAtx",resolve:eD,tokenize:tD};function eD(e,t){let i=e.length-2,r=3,l,o;return e[r][1].type==="whitespace"&&(r+=2),i-2>r&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&e[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(l={type:"atxHeadingText",start:e[r][1].start,end:e[i][1].end},o={type:"chunkText",start:e[r][1].start,end:e[i][1].end,contentType:"text"},ii(e,r,i-r+1,[["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t]])),e}function tD(e,t,i){let r=0;return l;function l(y){return e.enter("atxHeading"),o(y)}function o(y){return e.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&r++<6?(e.consume(y),c):y===null||yt(y)?(e.exit("atxHeadingSequence"),f(y)):i(y)}function f(y){return y===35?(e.enter("atxHeadingSequence"),d(y)):y===null||Te(y)?(e.exit("atxHeading"),t(y)):Ge(y)?Je(e,f,"whitespace")(y):(e.enter("atxHeadingText"),h(y))}function d(y){return y===35?(e.consume(y),d):(e.exit("atxHeadingSequence"),f(y))}function h(y){return y===null||y===35||yt(y)?(e.exit("atxHeadingText"),f(y)):(e.consume(y),h)}}const nD=["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"],f0=["pre","script","style","textarea"],iD={concrete:!0,name:"htmlFlow",resolveTo:sD,tokenize:lD},aD={partial:!0,tokenize:cD},rD={partial:!0,tokenize:oD};function sD(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 lD(e,t,i){const r=this;let l,o,c,f,d;return h;function h(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),v):C===47?(e.consume(C),o=!0,w):C===63?(e.consume(C),l=3,r.interrupt?t:O):Nn(C)?(e.consume(C),c=String.fromCharCode(C),k):i(C)}function v(C){return C===45?(e.consume(C),l=2,x):C===91?(e.consume(C),l=5,f=0,S):Nn(C)?(e.consume(C),l=4,r.interrupt?t:O):i(C)}function x(C){return C===45?(e.consume(C),r.interrupt?t:O):i(C)}function S(C){const he="CDATA[";return C===he.charCodeAt(f++)?(e.consume(C),f===he.length?r.interrupt?t:X:S):i(C)}function w(C){return Nn(C)?(e.consume(C),c=String.fromCharCode(C),k):i(C)}function k(C){if(C===null||C===47||C===62||yt(C)){const he=C===47,ke=c.toLowerCase();return!he&&!o&&f0.includes(ke)?(l=1,r.interrupt?t(C):X(C)):nD.includes(c.toLowerCase())?(l=6,he?(e.consume(C),_):r.interrupt?t(C):X(C)):(l=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(C):o?R(C):A(C))}return C===45||mn(C)?(e.consume(C),c+=String.fromCharCode(C),k):i(C)}function _(C){return C===62?(e.consume(C),r.interrupt?t:X):i(C)}function R(C){return Ge(C)?(e.consume(C),R):L(C)}function A(C){return C===47?(e.consume(C),L):C===58||C===95||Nn(C)?(e.consume(C),I):Ge(C)?(e.consume(C),A):L(C)}function I(C){return C===45||C===46||C===58||C===95||mn(C)?(e.consume(C),I):$(C)}function $(C){return C===61?(e.consume(C),T):Ge(C)?(e.consume(C),$):A(C)}function T(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(e.consume(C),d=C,P):Ge(C)?(e.consume(C),T):z(C)}function P(C){return C===d?(e.consume(C),d=null,Z):C===null||Te(C)?i(C):(e.consume(C),P)}function z(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||yt(C)?$(C):(e.consume(C),z)}function Z(C){return C===47||C===62||Ge(C)?A(C):i(C)}function L(C){return C===62?(e.consume(C),K):i(C)}function K(C){return C===null||Te(C)?X(C):Ge(C)?(e.consume(C),K):i(C)}function X(C){return C===45&&l===2?(e.consume(C),H):C===60&&l===1?(e.consume(C),le):C===62&&l===4?(e.consume(C),D):C===63&&l===3?(e.consume(C),O):C===93&&l===5?(e.consume(C),me):Te(C)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(aD,J,oe)(C)):C===null||Te(C)?(e.exit("htmlFlowData"),oe(C)):(e.consume(C),X)}function oe(C){return e.check(rD,se,J)(C)}function se(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),ee}function ee(C){return C===null||Te(C)?oe(C):(e.enter("htmlFlowData"),X(C))}function H(C){return C===45?(e.consume(C),O):X(C)}function le(C){return C===47?(e.consume(C),c="",V):X(C)}function V(C){if(C===62){const he=c.toLowerCase();return f0.includes(he)?(e.consume(C),D):X(C)}return Nn(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),V):X(C)}function me(C){return C===93?(e.consume(C),O):X(C)}function O(C){return C===62?(e.consume(C),D):C===45&&l===2?(e.consume(C),O):X(C)}function D(C){return C===null||Te(C)?(e.exit("htmlFlowData"),J(C)):(e.consume(C),D)}function J(C){return e.exit("htmlFlow"),t(C)}}function oD(e,t,i){const r=this;return l;function l(c){return Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):i(c)}function o(c){return r.parser.lazy[r.now().line]?i(c):t(c)}}function cD(e,t,i){return r;function r(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Sc,t,i)}}const uD={name:"htmlText",tokenize:fD};function fD(e,t,i){const r=this;let l,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),h):O===47?(e.consume(O),$):O===63?(e.consume(O),A):Nn(O)?(e.consume(O),z):i(O)}function h(O){return O===45?(e.consume(O),y):O===91?(e.consume(O),o=0,S):Nn(O)?(e.consume(O),R):i(O)}function y(O){return O===45?(e.consume(O),x):i(O)}function g(O){return O===null?i(O):O===45?(e.consume(O),v):Te(O)?(c=g,le(O)):(e.consume(O),g)}function v(O){return O===45?(e.consume(O),x):g(O)}function x(O){return O===62?H(O):O===45?v(O):g(O)}function S(O){const D="CDATA[";return O===D.charCodeAt(o++)?(e.consume(O),o===D.length?w:S):i(O)}function w(O){return O===null?i(O):O===93?(e.consume(O),k):Te(O)?(c=w,le(O)):(e.consume(O),w)}function k(O){return O===93?(e.consume(O),_):w(O)}function _(O){return O===62?H(O):O===93?(e.consume(O),_):w(O)}function R(O){return O===null||O===62?H(O):Te(O)?(c=R,le(O)):(e.consume(O),R)}function A(O){return O===null?i(O):O===63?(e.consume(O),I):Te(O)?(c=A,le(O)):(e.consume(O),A)}function I(O){return O===62?H(O):A(O)}function $(O){return Nn(O)?(e.consume(O),T):i(O)}function T(O){return O===45||mn(O)?(e.consume(O),T):P(O)}function P(O){return Te(O)?(c=P,le(O)):Ge(O)?(e.consume(O),P):H(O)}function z(O){return O===45||mn(O)?(e.consume(O),z):O===47||O===62||yt(O)?Z(O):i(O)}function Z(O){return O===47?(e.consume(O),H):O===58||O===95||Nn(O)?(e.consume(O),L):Te(O)?(c=Z,le(O)):Ge(O)?(e.consume(O),Z):H(O)}function L(O){return O===45||O===46||O===58||O===95||mn(O)?(e.consume(O),L):K(O)}function K(O){return O===61?(e.consume(O),X):Te(O)?(c=K,le(O)):Ge(O)?(e.consume(O),K):Z(O)}function X(O){return O===null||O===60||O===61||O===62||O===96?i(O):O===34||O===39?(e.consume(O),l=O,oe):Te(O)?(c=X,le(O)):Ge(O)?(e.consume(O),X):(e.consume(O),se)}function oe(O){return O===l?(e.consume(O),l=void 0,ee):O===null?i(O):Te(O)?(c=oe,le(O)):(e.consume(O),oe)}function se(O){return O===null||O===34||O===39||O===60||O===61||O===96?i(O):O===47||O===62||yt(O)?Z(O):(e.consume(O),se)}function ee(O){return O===47||O===62||yt(O)?Z(O):i(O)}function H(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):i(O)}function le(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),V}function V(O){return Ge(O)?Je(e,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):me(O)}function me(O){return e.enter("htmlTextData"),c(O)}}const hg={name:"labelEnd",resolveAll:mD,resolveTo:gD,tokenize:bD},dD={tokenize:yD},hD={tokenize:xD},pD={tokenize:vD};function mD(e){let t=-1;const i=[];for(;++t<e.length;){const r=e[t][1];if(i.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const l=r.type==="labelImage"?4:2;r.type="data",t+=l}}return e.length!==i.length&&ii(e,0,e.length,i),e}function gD(e,t){let i=e.length,r=0,l,o,c,f;for(;i--;)if(l=e[i][1],o){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[i][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(o=i,l.type!=="labelLink")){r=2;break}}else l.type==="labelEnd"&&(c=i);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},y={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=xi(f,e.slice(o+1,o+r+3)),f=xi(f,[["enter",y,t]]),f=xi(f,Vf(t.parser.constructs.insideSpan.null,e.slice(o+r+4,c-3),t)),f=xi(f,[["exit",y,t],e[c-2],e[c-1],["exit",h,t]]),f=xi(f,e.slice(c+1)),f=xi(f,[["exit",d,t]]),ii(e,o,e.length,f),e}function bD(e,t,i){const r=this;let l=r.events.length,o,c;for(;l--;)if((r.events[l][1].type==="labelImage"||r.events[l][1].type==="labelLink")&&!r.events[l][1]._balanced){o=r.events[l][1];break}return f;function f(v){return o?o._inactive?g(v):(c=r.parser.defined.includes(Mi(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),d):i(v)}function d(v){return v===40?e.attempt(dD,y,c?y:g)(v):v===91?e.attempt(hD,y,c?h:g)(v):c?y(v):g(v)}function h(v){return e.attempt(pD,y,g)(v)}function y(v){return t(v)}function g(v){return o._balanced=!0,i(v)}}function yD(e,t,i){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),l}function l(g){return yt(g)?Jo(e,o)(g):o(g)}function o(g){return g===41?y(g):NS(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return yt(g)?Jo(e,d)(g):y(g)}function f(g){return i(g)}function d(g){return g===34||g===39||g===40?CS(e,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function h(g){return yt(g)?Jo(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):i(g)}}function xD(e,t,i){const r=this;return l;function l(f){return TS.call(r,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return r.parser.defined.includes(Mi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(f):i(f)}function c(f){return i(f)}}function vD(e,t,i){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):i(o)}}const ED={name:"labelStartImage",resolveAll:hg.resolveAll,tokenize:SD};function SD(e,t,i){const r=this;return l;function l(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):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(f):t(f)}}const wD={name:"labelStartLink",resolveAll:hg.resolveAll,tokenize:_D};function _D(e,t,i){const r=this;return l;function l(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 r.parser.constructs?i(c):t(c)}}const wp={name:"lineEnding",tokenize:kD};function kD(e,t){return i;function i(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const hf={name:"thematicBreak",tokenize:ND};function ND(e,t,i){let r=0,l;return o;function o(h){return e.enter("thematicBreak"),c(h)}function c(h){return l=h,f(h)}function f(h){return h===l?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Te(h))?(e.exit("thematicBreak"),t(h)):i(h)}function d(h){return h===l?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ge(h)?Je(e,f,"whitespace")(h):f(h))}}const zn={continuation:{tokenize:OD},exit:MD,name:"list",tokenize:AD},TD={partial:!0,tokenize:DD},CD={partial:!0,tokenize:RD};function AD(e,t,i){const r=this,l=r.events[r.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(x){const S=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:hm(x)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(hf,i,h)(x):h(x);if(!r.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(x)}return i(x)}function d(x){return hm(x)&&++c<10?(e.consume(x),d):(!r.interrupt||c<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):i(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,e.check(Sc,r.interrupt?i:y,e.attempt(TD,v,g))}function y(x){return r.containerState.initialBlankLine=!0,o++,v(x)}function g(x){return Ge(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),v):i(x)}function v(x){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function OD(e,t,i){const r=this;return r.containerState._closeFlow=void 0,e.check(Sc,l,o);function l(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(e,t,"listItemIndent",r.containerState.size+1)(f)}function o(f){return r.containerState.furtherBlankLines||!Ge(f)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(f)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(CD,t,c)(f))}function c(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(e,e.attempt(zn,t,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function RD(e,t,i){const r=this;return Je(e,l,"listItemIndent",r.containerState.size+1);function l(o){const c=r.events[r.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===r.containerState.size?t(o):i(o)}}function MD(e){e.exit(this.containerState.type)}function DD(e,t,i){const r=this;return Je(e,l,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const c=r.events[r.events.length-1];return!Ge(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):i(o)}}const d0={name:"setextUnderline",resolveTo:LD,tokenize:jD};function LD(e,t){let i=e.length,r,l,o;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){r=i;break}e[i][1].type==="paragraph"&&(l=i)}else e[i][1].type==="content"&&e.splice(i,1),!o&&e[i][1].type==="definition"&&(o=i);const c={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(e.splice(l,0,["enter",c,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=c,e.push(["exit",c,t]),e}function jD(e,t,i){const r=this;let l;return o;function o(h){let y=r.events.length,g;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){g=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),l=h,c(h)):i(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===l?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Ge(h)?Je(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Te(h)?(e.exit("setextHeadingLine"),t(h)):i(h)}}const ID={tokenize:zD};function zD(e){const t=this,i=e.attempt(Sc,r,e.attempt(this.parser.constructs.flowInitial,l,Je(e,e.attempt(this.parser.constructs.flow,l,e.attempt($M,l)),"linePrefix")));return i;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,i}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,i}}const BD={resolveAll:OS()},UD=AS("string"),FD=AS("text");function AS(e){return{resolveAll:OS(e==="text"?PD:void 0),tokenize:t};function t(i){const r=this,l=this.parser.constructs[e],o=i.attempt(l,c,f);return c;function c(y){return h(y)?o(y):f(y)}function f(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),d}function d(y){return h(y)?(i.exit("data"),o(y)):(i.consume(y),d)}function h(y){if(y===null)return!0;const g=l[y];let v=-1;if(g)for(;++v<g.length;){const x=g[v];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function OS(e){return t;function t(i,r){let l=-1,o;for(;++l<=i.length;)o===void 0?i[l]&&i[l][1].type==="data"&&(o=l,l++):(!i[l]||i[l][1].type!=="data")&&(l!==o+2&&(i[o][1].end=i[l-1][1].end,i.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(i,r):i}}function PD(e,t){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const r=e[i-1][1],l=t.sliceStream(r);let o=l.length,c=-1,f=0,d;for(;o--;){const h=l[o];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)d=!0,f++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&i===e.length&&(f=0),f){const h={type:i===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:r.start._bufferIndex+c,_index:r.start._index+o,line:r.end.line,column:r.end.column-f,offset:r.end.offset-f},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(i,0,["enter",h,t],["exit",h,t]),i+=2)}i++}return e}const $D={42:zn,43:zn,45:zn,48:zn,49:zn,50:zn,51:zn,52:zn,53:zn,54:zn,55:zn,56:zn,57:zn,62:SS},qD={91:YM},HD={[-2]:Sp,[-1]:Sp,32:Sp},KD={35:JM,42:hf,45:[d0,hf],60:iD,61:d0,95:hf,96:u0,126:u0},GD={38:_S,92:wS},YD={[-5]:wp,[-4]:wp,[-3]:wp,33:ED,38:_S,42:pm,60:[wM,uD],91:wD,92:[ZM,wS],93:hg,95:pm,96:IM},QD={null:[pm,BD]},VD={null:[42,95]},XD={null:[]},ZD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:VD,contentInitial:qD,disable:XD,document:$D,flow:KD,flowInitial:HD,insideSpan:QD,string:GD,text:YD},Symbol.toStringTag,{value:"Module"}));function WD(e,t,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const l={},o=[];let c=[],f=[];const d={attempt:P($),check:P(T),consume:R,enter:A,exit:I,interrupt:P(T,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:g};let y=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function g(K){return c=xi(c,K),k(),c[c.length-1]!==null?[]:(z(t,0),h.events=Vf(o,h.events,h),h.events)}function v(K,X){return eL(x(K),X)}function x(K){return JD(c,K)}function S(){const{_bufferIndex:K,_index:X,line:oe,column:se,offset:ee}=r;return{_bufferIndex:K,_index:X,line:oe,column:se,offset:ee}}function w(K){l[K.line]=K.column,L()}function k(){let K;for(;r._index<c.length;){const X=c[r._index];if(typeof X=="string")for(K=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===K&&r._bufferIndex<X.length;)_(X.charCodeAt(r._bufferIndex));else _(X)}}function _(K){y=y(K)}function R(K){Te(K)?(r.line++,r.column=1,r.offset+=K===-3?2:1,L()):K!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=K}function A(K,X){const oe=X||{};return oe.type=K,oe.start=S(),h.events.push(["enter",oe,h]),f.push(oe),oe}function I(K){const X=f.pop();return X.end=S(),h.events.push(["exit",X,h]),X}function $(K,X){z(K,X.from)}function T(K,X){X.restore()}function P(K,X){return oe;function oe(se,ee,H){let le,V,me,O;return Array.isArray(se)?J(se):"tokenize"in se?J([se]):D(se);function D(ve){return Pe;function Pe(st){const it=st!==null&&ve[st],Zt=st!==null&&ve.null,$n=[...Array.isArray(it)?it:it?[it]:[],...Array.isArray(Zt)?Zt:Zt?[Zt]:[]];return J($n)(st)}}function J(ve){return le=ve,V=0,ve.length===0?H:C(ve[V])}function C(ve){return Pe;function Pe(st){return O=Z(),me=ve,ve.partial||(h.currentConstruct=ve),ve.name&&h.parser.constructs.disable.null.includes(ve.name)?ke():ve.tokenize.call(X?Object.assign(Object.create(h),X):h,d,he,ke)(st)}}function he(ve){return K(me,O),ee}function ke(ve){return O.restore(),++V<le.length?C(le[V]):H}}}function z(K,X){K.resolveAll&&!o.includes(K)&&o.push(K),K.resolve&&ii(h.events,X,h.events.length-X,K.resolve(h.events.slice(X),h)),K.resolveTo&&(h.events=K.resolveTo(h.events,h))}function Z(){const K=S(),X=h.previous,oe=h.currentConstruct,se=h.events.length,ee=Array.from(f);return{from:se,restore:H};function H(){r=K,h.previous=X,h.currentConstruct=oe,h.events.length=se,f=ee,L()}}function L(){r.line in l&&r.column<2&&(r.column=l[r.line],r.offset+=l[r.line]-1)}}function JD(e,t){const i=t.start._index,r=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let c;if(i===l)c=[e[i].slice(r,o)];else{if(c=e.slice(i,l),r>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(r):c.shift()}o>0&&c.push(e[l].slice(0,o))}return c}function eL(e,t){let i=-1;const r=[];let l;for(;++i<e.length;){const o=e[i];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
454
+ `;break}case-3:{c=`\r
455
+ `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&l)continue;c=" ";break}default:c=String.fromCharCode(o)}l=o===-2,r.push(c)}return r.join("")}function tL(e){const r={constructs:vS([ZD,...(e||{}).extensions||[]]),content:l(gM),defined:[],document:l(yM),flow:l(ID),lazy:{},string:l(UD),text:l(FD)};return r;function l(o){return c;function c(f){return WD(r,o,f)}}}function nL(e){for(;!kS(e););return e}const h0=/[\0\t\n\r]/g;function iL(){let e=1,t="",i=!0,r;return l;function l(o,c,f){const d=[];let h,y,g,v,x;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),g=0,t="",i&&(o.charCodeAt(0)===65279&&g++,i=void 0);g<o.length;){if(h0.lastIndex=g,h=h0.exec(o),v=h&&h.index!==void 0?h.index:o.length,x=o.charCodeAt(v),!h){t=o.slice(g);break}if(x===10&&g===v&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),g<v&&(d.push(o.slice(g,v)),e+=v-g),x){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:r=!0,e=1}g=v+1}return f&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const aL=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rL(e){return e.replace(aL,sL)}function sL(e,t,i){if(t)return t;if(i.charCodeAt(0)===35){const l=i.charCodeAt(1),o=l===120||l===88;return ES(i.slice(o?2:1),o?16:10)}return dg(i)||e}const RS={}.hasOwnProperty;function lL(e,t,i){return t&&typeof t=="object"&&(i=t,t=void 0),oL(i)(nL(tL(i).document().write(iL()(e,t,!0))))}function oL(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ii),autolinkProtocol:Z,autolinkEmail:Z,atxHeading:o(ji),blockQuote:o(Zt),characterEscape:Z,characterReference:Z,codeFenced:o($n),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o($n,c),codeText:o(Zi,c),codeTextData:Z,data:Z,codeFlowValue:Z,definition:o(Oa),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(qn),hardBreakEscape:o(Xe),hardBreakTrailing:o(Xe),htmlFlow:o(_i,c),htmlFlowData:Z,htmlText:o(_i,c),htmlTextData:Z,image:o(li),label:c,link:o(Ii),listItem:o(kr),listItemValue:v,listOrdered:o(Wi,g),listUnordered:o(Wi),paragraph:o(Kl),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(ji),strong:o(bs),thematicBreak:o(ys)},exit:{atxHeading:d(),atxHeadingSequence:$,autolink:d(),autolinkEmail:it,autolinkProtocol:st,blockQuote:d(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:ke,characterReferenceMarkerNumeric:ke,characterReferenceValue:ve,characterReference:Pe,codeFenced:d(k),codeFencedFence:w,codeFencedFenceInfo:x,codeFencedFenceMeta:S,codeFlowValue:L,codeIndented:d(_),codeText:d(ee),codeTextData:L,data:L,definition:d(),definitionDestinationString:I,definitionLabelString:R,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(X),hardBreakTrailing:d(X),htmlFlow:d(oe),htmlFlowData:L,htmlText:d(se),htmlTextData:L,image:d(le),label:me,labelText:V,lineEnding:K,link:d(H),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:he,resourceDestinationString:O,resourceTitleString:D,resource:J,setextHeading:d(z),setextHeadingLineSequence:P,setextHeadingText:T,strong:d(),thematicBreak:d()}};MS(t,(e||{}).mdastExtensions||[]);const i={};return r;function r(te){let fe={type:"root",children:[]};const Ce={stack:[fe],tokenStack:[],config:t,enter:f,exit:h,buffer:c,resume:y,data:i},$e=[];let et=-1;for(;++et<te.length;)if(te[et][1].type==="listOrdered"||te[et][1].type==="listUnordered")if(te[et][0]==="enter")$e.push(et);else{const yn=$e.pop();et=l(te,yn,et)}for(et=-1;++et<te.length;){const yn=t[te[et][0]];RS.call(yn,te[et][1].type)&&yn[te[et][1].type].call(Object.assign({sliceSerialize:te[et][2].sliceSerialize},Ce),te[et][1])}if(Ce.tokenStack.length>0){const yn=Ce.tokenStack[Ce.tokenStack.length-1];(yn[1]||p0).call(Ce,void 0,yn[0])}for(fe.position={start:sr(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:sr(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},et=-1;++et<t.transforms.length;)fe=t.transforms[et](fe)||fe;return fe}function l(te,fe,Ce){let $e=fe-1,et=-1,yn=!1,ki,nn,Lt,un;for(;++$e<=Ce;){const lt=te[$e];switch(lt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{lt[0]==="enter"?et++:et--,un=void 0;break}case"lineEndingBlank":{lt[0]==="enter"&&(ki&&!un&&!et&&!Lt&&(Lt=$e),un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:un=void 0}if(!et&&lt[0]==="enter"&&lt[1].type==="listItemPrefix"||et===-1&&lt[0]==="exit"&&(lt[1].type==="listUnordered"||lt[1].type==="listOrdered")){if(ki){let zi=$e;for(nn=void 0;zi--;){const xn=te[zi];if(xn[1].type==="lineEnding"||xn[1].type==="lineEndingBlank"){if(xn[0]==="exit")continue;nn&&(te[nn][1].type="lineEndingBlank",yn=!0),xn[1].type="lineEnding",nn=zi}else if(!(xn[1].type==="linePrefix"||xn[1].type==="blockQuotePrefix"||xn[1].type==="blockQuotePrefixWhitespace"||xn[1].type==="blockQuoteMarker"||xn[1].type==="listItemIndent"))break}Lt&&(!nn||Lt<nn)&&(ki._spread=!0),ki.end=Object.assign({},nn?te[nn][1].start:lt[1].end),te.splice(nn||$e,0,["exit",ki,lt[2]]),$e++,Ce++}if(lt[1].type==="listItemPrefix"){const zi={type:"listItem",_spread:!1,start:Object.assign({},lt[1].start),end:void 0};ki=zi,te.splice($e,0,["enter",zi,lt[2]]),$e++,Ce++,Lt=void 0,un=!0}}}return te[fe][1]._spread=yn,Ce}function o(te,fe){return Ce;function Ce($e){f.call(this,te($e),$e),fe&&fe.call(this,$e)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(te,fe,Ce){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([fe,Ce||void 0]),te.position={start:sr(fe.start),end:void 0}}function d(te){return fe;function fe(Ce){te&&te.call(this,Ce),h.call(this,Ce)}}function h(te,fe){const Ce=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==te.type&&(fe?fe.call(this,te,$e[0]):($e[1]||p0).call(this,te,$e[0]));else throw new Error("Cannot close `"+te.type+"` ("+Wo({start:te.start,end:te.end})+"): it’s not open");Ce.position.end=sr(te.end)}function y(){return fg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function v(te){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function x(){const te=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=te}function S(){const te=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=te}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const te=this.resume(),fe=this.stack[this.stack.length-1];fe.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const te=this.resume(),fe=this.stack[this.stack.length-1];fe.value=te.replace(/(\r?\n|\r)$/g,"")}function R(te){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Mi(this.sliceSerialize(te)).toLowerCase()}function A(){const te=this.resume(),fe=this.stack[this.stack.length-1];fe.title=te}function I(){const te=this.resume(),fe=this.stack[this.stack.length-1];fe.url=te}function $(te){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Ce=this.sliceSerialize(te).length;fe.depth=Ce}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function P(te){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function Z(te){const Ce=this.stack[this.stack.length-1].children;let $e=Ce[Ce.length-1];(!$e||$e.type!=="text")&&($e=Ot(),$e.position={start:sr(te.start),end:void 0},Ce.push($e)),this.stack.push($e)}function L(te){const fe=this.stack.pop();fe.value+=this.sliceSerialize(te),fe.position.end=sr(te.end)}function K(te){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=fe.children[fe.children.length-1];Ce.position.end=sr(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(Z.call(this,te),L.call(this,te))}function X(){this.data.atHardBreak=!0}function oe(){const te=this.resume(),fe=this.stack[this.stack.length-1];fe.value=te}function se(){const te=this.resume(),fe=this.stack[this.stack.length-1];fe.value=te}function ee(){const te=this.resume(),fe=this.stack[this.stack.length-1];fe.value=te}function H(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=fe,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function le(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=fe,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function V(te){const fe=this.sliceSerialize(te),Ce=this.stack[this.stack.length-2];Ce.label=rL(fe),Ce.identifier=Mi(fe).toLowerCase()}function me(){const te=this.stack[this.stack.length-1],fe=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const $e=te.children;Ce.children=$e}else Ce.alt=fe}function O(){const te=this.resume(),fe=this.stack[this.stack.length-1];fe.url=te}function D(){const te=this.resume(),fe=this.stack[this.stack.length-1];fe.title=te}function J(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function he(te){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=Mi(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function ke(te){this.data.characterReferenceType=te.type}function ve(te){const fe=this.sliceSerialize(te),Ce=this.data.characterReferenceType;let $e;Ce?($e=ES(fe,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=dg(fe);const et=this.stack[this.stack.length-1];et.value+=$e}function Pe(te){const fe=this.stack.pop();fe.position.end=sr(te.end)}function st(te){L.call(this,te);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(te)}function it(te){L.call(this,te);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(te)}function Zt(){return{type:"blockquote",children:[]}}function $n(){return{type:"code",lang:null,meta:null,value:""}}function Zi(){return{type:"inlineCode",value:""}}function Oa(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function qn(){return{type:"emphasis",children:[]}}function ji(){return{type:"heading",depth:0,children:[]}}function Xe(){return{type:"break"}}function _i(){return{type:"html",value:""}}function li(){return{type:"image",title:null,url:"",alt:null}}function Ii(){return{type:"link",title:null,url:"",children:[]}}function Wi(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function kr(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function Kl(){return{type:"paragraph",children:[]}}function bs(){return{type:"strong",children:[]}}function Ot(){return{type:"text",value:""}}function ys(){return{type:"thematicBreak"}}}function sr(e){return{line:e.line,column:e.column,offset:e.offset}}function MS(e,t){let i=-1;for(;++i<t.length;){const r=t[i];Array.isArray(r)?MS(e,r):cL(e,r)}}function cL(e,t){let i;for(i in t)if(RS.call(t,i))switch(i){case"canContainEols":{const r=t[i];r&&e[i].push(...r);break}case"transforms":{const r=t[i];r&&e[i].push(...r);break}case"enter":case"exit":{const r=t[i];r&&Object.assign(e[i],r);break}}}function p0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Wo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Wo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Wo({start:t.start,end:t.end})+") is still open")}function uL(e){const t=this;t.parser=i;function i(r){return lL(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function fL(e,t){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,i),e.applyData(t,i)}function dL(e,t){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,i),[e.applyData(t,i),{type:"text",value:`
456
+ `}]}function hL(e,t){const i=t.value?t.value+`
457
+ `:"",r={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(r.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};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 pL(e,t){const i={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function mL(e,t){const i={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function gL(e,t){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),l=Hl(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let c,f=e.footnoteCounts.get(r);f===void 0?(f=0,e.footnoteOrder.push(r),c=e.footnoteOrder.length):c=o+1,f+=1,e.footnoteCounts.set(r,f);const d={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+l,id:i+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function bL(e,t){const i={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function yL(e,t){if(e.options.allowDangerousHtml){const i={type:"raw",value:t.value};return e.patch(t,i),e.applyData(t,i)}}function DS(e,t){const i=t.referenceType;let r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const l=e.all(t),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const c=l[l.length-1];return c&&c.type==="text"?c.value+=r:l.push({type:"text",value:r}),l}function xL(e,t){const i=String(t.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return DS(e,t);const l={src:Hl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(l.title=r.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)}function vL(e,t){const i={src:Hl(t.url)};t.alt!==null&&t.alt!==void 0&&(i.alt=t.alt),t.title!==null&&t.title!==void 0&&(i.title=t.title);const r={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,r),e.applyData(t,r)}function EL(e,t){const i={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,i);const r={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(t,r),e.applyData(t,r)}function SL(e,t){const i=String(t.identifier).toUpperCase(),r=e.definitionById.get(i);if(!r)return DS(e,t);const l={href:Hl(r.url||"")};r.title!==null&&r.title!==void 0&&(l.title=r.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function wL(e,t){const i={href:Hl(t.url)};t.title!==null&&t.title!==void 0&&(i.title=t.title);const r={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _L(e,t,i){const r=e.all(t),l=i?kL(i):LS(t),o={},c=[];if(typeof t.checked=="boolean"){const y=r[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},r.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<r.length;){const y=r[f];(l||f!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
458
+ `}),y.type==="element"&&y.tagName==="p"&&!l?c.push(...y.children):c.push(y)}const d=r[r.length-1];d&&(l||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
459
+ `});const h={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,h),e.applyData(t,h)}function kL(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const i=e.children;let r=-1;for(;!t&&++r<i.length;)t=LS(i[r])}return t}function LS(e){const t=e.spread;return t??e.children.length>1}function NL(e,t){const i={},r=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(i.start=t.start);++l<r.length;){const c=r[l];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:i,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function TL(e,t){const i={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function CL(e,t){const i={type:"root",children:e.wrap(e.all(t))};return e.patch(t,i),e.applyData(t,i)}function AL(e,t){const i={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function OL(e,t){const i=e.all(t),r=i.shift(),l=[];if(r){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],c),l.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=lg(t.children[1]),d=hS(t.children[t.children.length-1]);f&&d&&(c.position={start:f,end:d}),l.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)}function RL(e,t,i){const r=i?i.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const g=t.children[d],v={},x=c?c[d]:void 0;x&&(v.align=x);let S={type:"element",tagName:o,properties:v,children:[]};g&&(S.children=e.all(g),e.patch(g,S),S=e.applyData(g,S)),h.push(S)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,y),e.applyData(t,y)}function ML(e,t){const i={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}const m0=9,g0=32;function DL(e){const t=String(e),i=/\r?\n|\r/g;let r=i.exec(t),l=0;const o=[];for(;r;)o.push(b0(t.slice(l,r.index),l>0,!0),r[0]),l=r.index+r[0].length,r=i.exec(t);return o.push(b0(t.slice(l),l>0,!1)),o.join("")}function b0(e,t,i){let r=0,l=e.length;if(t){let o=e.codePointAt(r);for(;o===m0||o===g0;)r++,o=e.codePointAt(r)}if(i){let o=e.codePointAt(l-1);for(;o===m0||o===g0;)l--,o=e.codePointAt(l-1)}return l>r?e.slice(r,l):""}function LL(e,t){const i={type:"text",value:DL(String(t.value))};return e.patch(t,i),e.applyData(t,i)}function jL(e,t){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,i),e.applyData(t,i)}const IL={blockquote:fL,break:dL,code:hL,delete:pL,emphasis:mL,footnoteReference:gL,heading:bL,html:yL,imageReference:xL,image:vL,inlineCode:EL,linkReference:SL,link:wL,listItem:_L,list:NL,paragraph:TL,root:CL,strong:AL,table:OL,tableCell:ML,tableRow:RL,text:LL,thematicBreak:jL,toml:Xu,yaml:Xu,definition:Xu,footnoteDefinition:Xu};function Xu(){}const jS=-1,Xf=0,ec=1,kf=2,pg=3,mg=4,gg=5,bg=6,IS=7,zS=8,y0=typeof self=="object"?self:globalThis,zL=(e,t)=>{const i=(l,o)=>(e.set(o,l),l),r=l=>{if(e.has(l))return e.get(l);const[o,c]=t[l];switch(o){case Xf:case jS:return i(c,l);case ec:{const f=i([],l);for(const d of c)f.push(r(d));return f}case kf:{const f=i({},l);for(const[d,h]of c)f[r(d)]=r(h);return f}case pg:return i(new Date(c),l);case mg:{const{source:f,flags:d}=c;return i(new RegExp(f,d),l)}case gg:{const f=i(new Map,l);for(const[d,h]of c)f.set(r(d),r(h));return f}case bg:{const f=i(new Set,l);for(const d of c)f.add(r(d));return f}case IS:{const{name:f,message:d}=c;return i(new y0[f](d),l)}case zS:return i(BigInt(c),l);case"BigInt":return i(Object(BigInt(c)),l);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new y0[o](c),l)};return r},x0=e=>zL(new Map,e)(0),rl="",{toString:BL}={},{keys:UL}=Object,Yo=e=>{const t=typeof e;if(t!=="object"||!e)return[Xf,t];const i=BL.call(e).slice(8,-1);switch(i){case"Array":return[ec,rl];case"Object":return[kf,rl];case"Date":return[pg,rl];case"RegExp":return[mg,rl];case"Map":return[gg,rl];case"Set":return[bg,rl];case"DataView":return[ec,i]}return i.includes("Array")?[ec,i]:i.includes("Error")?[IS,i]:[kf,i]},Zu=([e,t])=>e===Xf&&(t==="function"||t==="symbol"),FL=(e,t,i,r)=>{const l=(c,f)=>{const d=r.push(c)-1;return i.set(f,d),d},o=c=>{if(i.has(c))return i.get(c);let[f,d]=Yo(c);switch(f){case Xf:{let y=c;switch(d){case"bigint":f=zS,y=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);y=null;break;case"undefined":return l([jS],c)}return l([f,y],c)}case ec:{if(d){let v=c;return d==="DataView"?v=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(v=new Uint8Array(c)),l([d,[...v]],c)}const y=[],g=l([f,y],c);for(const v of c)y.push(o(v));return g}case kf:{if(d)switch(d){case"BigInt":return l([d,c.toString()],c);case"Boolean":case"Number":case"String":return l([d,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const y=[],g=l([f,y],c);for(const v of UL(c))(e||!Zu(Yo(c[v])))&&y.push([o(v),o(c[v])]);return g}case pg:return l([f,c.toISOString()],c);case mg:{const{source:y,flags:g}=c;return l([f,{source:y,flags:g}],c)}case gg:{const y=[],g=l([f,y],c);for(const[v,x]of c)(e||!(Zu(Yo(v))||Zu(Yo(x))))&&y.push([o(v),o(x)]);return g}case bg:{const y=[],g=l([f,y],c);for(const v of c)(e||!Zu(Yo(v)))&&y.push(o(v));return g}}const{message:h}=c;return l([f,{name:d,message:h}],c)};return o},v0=(e,{json:t,lossy:i}={})=>{const r=[];return FL(!(t||i),!!t,new Map,r)(e),r},Nf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?x0(v0(e,t)):structuredClone(e):(e,t)=>x0(v0(e,t));function PL(e,t){const i=[{type:"text",value:"↩"}];return t>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),i}function $L(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||PL,r=e.options.footnoteBackLabel||$L,l=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 h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const y=e.all(h),g=String(h.identifier).toUpperCase(),v=Hl(g.toLowerCase());let x=0;const S=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++x<=w;){S.length>0&&S.push({type:"text",value:" "});let R=typeof i=="string"?i:i(d,x);typeof R=="string"&&(R={type:"text",value:R}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,x),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const k=y[y.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const R=k.children[k.children.length-1];R&&R.type==="text"?R.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...S)}else y.push(...S);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(y,!0)};e.patch(h,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Nf(c),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
460
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
461
+ `}]}}const wc=(function(e){if(e==null)return YL;if(typeof e=="function")return Zf(e);if(typeof e=="object")return Array.isArray(e)?HL(e):KL(e);if(typeof e=="string")return GL(e);throw new Error("Expected function, string, or object as test")});function HL(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=wc(e[i]);return Zf(r);function r(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function KL(e){const t=e;return Zf(i);function i(r){const l=r;let o;for(o in e)if(l[o]!==t[o])return!1;return!0}}function GL(e){return Zf(t);function t(i){return i&&i.type===e}}function Zf(e){return t;function t(i,r,l){return!!(QL(i)&&e.call(this,i,typeof r=="number"?r:void 0,l||void 0))}}function YL(){return!0}function QL(e){return e!==null&&typeof e=="object"&&"type"in e}const BS=[],VL=!0,mm=!1,XL="skip";function US(e,t,i,r){let l;typeof t=="function"&&typeof i!="function"?(r=i,i=t):l=t;const o=wc(l),c=r?-1:1;f(e,void 0,[])();function f(d,h,y){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(d.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=BS,S,w,k;if((!t||o(d,h,y[y.length-1]||void 0))&&(x=ZL(i(d,y)),x[0]===mm))return x;if("children"in d&&d.children){const _=d;if(_.children&&x[0]!==XL)for(w=(r?_.children.length:-1)+c,k=y.concat(_);w>-1&&w<_.children.length;){const R=_.children[w];if(S=f(R,w,k)(),S[0]===mm)return S;w=typeof S[1]=="number"?S[1]:w+c}}return x}}}function ZL(e){return Array.isArray(e)?e:typeof e=="number"?[VL,e]:e==null?BS:[e]}function Wf(e,t,i,r){let l,o,c;typeof t=="function"&&typeof i!="function"?(o=void 0,c=t,l=i):(o=t,c=i,l=r),US(e,o,f,l);function f(d,h){const y=h[h.length-1],g=y?y.children.indexOf(d):void 0;return c(d,g,y)}}const gm={}.hasOwnProperty,WL={};function JL(e,t){const i=t||WL,r=new Map,l=new Map,o=new Map,c={...IL,...i.handlers},f={all:h,applyData:tj,definitionById:r,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:c,one:d,options:i,patch:ej,wrap:ij};return Wf(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?r:l,v=String(y.identifier).toUpperCase();g.has(v)||g.set(v,y)}}),f;function d(y,g){const v=y.type,x=f.handlers[v];if(gm.call(f.handlers,v)&&x)return x(f,y,g);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in y){const{children:w,...k}=y,_=Nf(k);return _.children=f.all(y),_}return Nf(y)}return(f.options.unknownHandler||nj)(f,y,g)}function h(y){const g=[];if("children"in y){const v=y.children;let x=-1;for(;++x<v.length;){const S=f.one(v[x],y);if(S){if(x&&v[x-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=E0(S.value)),!Array.isArray(S)&&S.type==="element")){const w=S.children[0];w&&w.type==="text"&&(w.value=E0(w.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function ej(e,t){e.position&&(t.position=$R(e))}function tj(e,t){let i=t;if(e&&e.data){const r=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(i.type==="element")i.tagName=r;else{const c="children"in i?i.children:[i];i={type:"element",tagName:r,properties:{},children:c}}i.type==="element"&&o&&Object.assign(i.properties,Nf(o)),"children"in i&&i.children&&l!==null&&l!==void 0&&(i.children=l)}return i}function nj(e,t){const i=t.data||{},r="value"in t&&!(gm.call(i,"hProperties")||gm.call(i,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ij(e,t){const i=[];let r=-1;for(t&&i.push({type:"text",value:`
462
+ `});++r<e.length;)r&&i.push({type:"text",value:`
463
+ `}),i.push(e[r]);return t&&e.length>0&&i.push({type:"text",value:`
464
+ `}),i}function E0(e){let t=0,i=e.charCodeAt(t);for(;i===9||i===32;)t++,i=e.charCodeAt(t);return e.slice(t)}function S0(e,t){const i=JL(e,t),r=i.one(e,void 0),l=qL(i),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
465
+ `},l),o}function aj(e,t){return e&&"run"in e?async function(i,r){const l=S0(i,{file:r,...t});await e.run(l,r)}:function(i,r){return S0(i,{file:r,...e||t})}}function w0(e){if(e)throw e}var _p,_0;function rj(){if(_0)return _p;_0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,l=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var y=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!g)return!1;var v;for(v in h);return typeof v>"u"||e.call(h,v)},c=function(h,y){i&&y.name==="__proto__"?i(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},f=function(h,y){if(y==="__proto__")if(e.call(h,y)){if(r)return r(h,y).value}else return;return h[y]};return _p=function d(){var h,y,g,v,x,S,w=arguments[0],k=1,_=arguments.length,R=!1;for(typeof w=="boolean"&&(R=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<_;++k)if(h=arguments[k],h!=null)for(y in h)g=f(w,y),v=f(h,y),w!==v&&(R&&v&&(o(v)||(x=l(v)))?(x?(x=!1,S=g&&l(g)?g:[]):S=g&&o(g)?g:{},c(w,{name:y,newValue:d(R,S,v)})):typeof v<"u"&&c(w,{name:y,newValue:v}));return w},_p}var sj=rj();const kp=Sm(sj);function bm(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 lj(){const e=[],t={run:i,use:r};return t;function i(...l){let o=-1;const c=l.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...l);function f(d,...h){const y=e[++o];let g=-1;if(d){c(d);return}for(;++g<l.length;)(h[g]===null||h[g]===void 0)&&(h[g]=l[g]);l=h,y?oj(y,f)(...h):c(null,...h)}}function r(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function oj(e,t){let i;return r;function r(...c){const f=e.length>c.length;let d;f&&c.push(l);try{d=e.apply(this,c)}catch(h){const y=h;if(f&&i)throw y;return l(y)}f||(d&&d.then&&typeof d.then=="function"?d.then(o,l):d instanceof Error?l(d):o(d))}function l(c,...f){i||(i=!0,t(c,...f))}function o(c){l(null,c)}}const Hi={basename:cj,dirname:uj,extname:fj,join:dj,sep:"/"};function cj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');_c(e);let i=0,r=-1,l=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){i=l+1;break}}else r<0&&(o=!0,r=l+1);return r<0?"":e.slice(i,r)}if(t===e)return"";let c=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){i=l+1;break}}else c<0&&(o=!0,c=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(r=l):(f=-1,r=c));return i===r?r=c:r<0&&(r=e.length),e.slice(i,r)}function uj(e){if(_c(e),e.length===0)return".";let t=-1,i=e.length,r;for(;--i;)if(e.codePointAt(i)===47){if(r){t=i;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function fj(e){_c(e);let t=e.length,i=-1,r=0,l=-1,o=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){r=t+1;break}continue}i<0&&(c=!0,i=t+1),f===46?l<0?l=t:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||i<0||o===0||o===1&&l===i-1&&l===r+1?"":e.slice(l,i)}function dj(...e){let t=-1,i;for(;++t<e.length;)_c(e[t]),e[t]&&(i=i===void 0?e[t]:i+"/"+e[t]);return i===void 0?".":hj(i)}function hj(e){_c(e);const t=e.codePointAt(0)===47;let i=pj(e,!t);return i.length===0&&!t&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),t?"/"+i:i}function pj(e,t){let i="",r=0,l=-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(!(l===c-1||o===1))if(l!==c-1&&o===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(d=i.lastIndexOf("/"),d!==i.length-1){d<0?(i="",r=0):(i=i.slice(0,d),r=i.length-1-i.lastIndexOf("/")),l=c,o=0;continue}}else if(i.length>0){i="",r=0,l=c,o=0;continue}}t&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+e.slice(l+1,c):i=e.slice(l+1,c),r=c-l-1;l=c,o=0}else f===46&&o>-1?o++:o=-1}return i}function _c(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const mj={cwd:gj};function gj(){return"/"}function ym(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function bj(e){if(typeof e=="string")e=new URL(e);else if(!ym(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 yj(e)}function yj(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let i=-1;for(;++i<t.length;)if(t.codePointAt(i)===37&&t.codePointAt(i+1)===50){const r=t.codePointAt(i+2);if(r===70||r===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Np=["history","path","basename","stem","extname","dirname"];class FS{constructor(t){let i;t?ym(t)?i={path:t}:typeof t=="string"||xj(t)?i={value:t}:i=t:i={},this.cwd="cwd"in i?"":mj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Np.length;){const o=Np[r];o in i&&i[o]!==void 0&&i[o]!==null&&(this[o]=o==="history"?[...i[o]]:i[o])}let l;for(l in i)Np.includes(l)||(this[l]=i[l])}get basename(){return typeof this.path=="string"?Hi.basename(this.path):void 0}set basename(t){Cp(t,"basename"),Tp(t,"basename"),this.path=Hi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Hi.dirname(this.path):void 0}set dirname(t){k0(this.basename,"dirname"),this.path=Hi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Hi.extname(this.path):void 0}set extname(t){if(Tp(t,"extname"),k0(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=Hi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ym(t)&&(t=bj(t)),Cp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Hi.basename(this.path,this.extname):void 0}set stem(t){Cp(t,"stem"),Tp(t,"stem"),this.path=Hi.join(this.dirname||"",t+(this.extname||""))}fail(t,i,r){const l=this.message(t,i,r);throw l.fatal=!0,l}info(t,i,r){const l=this.message(t,i,r);return l.fatal=void 0,l}message(t,i,r){const l=new bn(t,i,r);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Tp(e,t){if(e&&e.includes(Hi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Hi.sep+"`")}function Cp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function k0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function xj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vj=(function(e){const r=this.constructor.prototype,l=r[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Ej={}.hasOwnProperty;class yg extends vj{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=lj()}copy(){const t=new yg;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];t.use(...r)}return t.data(kp(!0,{},this.namespace)),t}data(t,i){return typeof t=="string"?arguments.length===2?(Rp("data",this.frozen),this.namespace[t]=i,this):Ej.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Rp("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[i,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const l=i.call(t,...r);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const i=Wu(t),r=this.parser||this.Parser;return Ap("parse",r),r(String(i),i)}process(t,i){const r=this;return this.freeze(),Ap("process",this.parser||this.Parser),Op("process",this.compiler||this.Compiler),i?l(void 0,i):new Promise(l);function l(o,c){const f=Wu(t),d=r.parse(f);r.run(d,f,function(y,g,v){if(y||!g||!v)return h(y);const x=g,S=r.stringify(x,v);_j(S)?v.value=S:v.result=S,h(y,v)});function h(y,g){y||!g?c(y):o?o(g):i(void 0,g)}}}processSync(t){let i=!1,r;return this.freeze(),Ap("processSync",this.parser||this.Parser),Op("processSync",this.compiler||this.Compiler),this.process(t,l),T0("processSync","process",i),r;function l(o,c){i=!0,w0(o),r=c}}run(t,i,r){N0(t),this.freeze();const l=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?o(void 0,r):new Promise(o);function o(c,f){const d=Wu(i);l.run(t,d,h);function h(y,g,v){const x=g||t;y?f(y):c?c(x):r(void 0,x,v)}}}runSync(t,i){let r=!1,l;return this.run(t,i,o),T0("runSync","run",r),l;function o(c,f){w0(c),l=f,r=!0}}stringify(t,i){this.freeze();const r=Wu(i),l=this.compiler||this.Compiler;return Op("stringify",l),N0(t),l(t,r)}use(t,...i){const r=this.attachers,l=this.namespace;if(Rp("use",this.frozen),t!=null)if(typeof t=="function")d(t,i);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(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[y,...g]=h;d(y,g)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(l.settings=kp(!0,l.settings,h.settings))}function f(h){let y=-1;if(h!=null)if(Array.isArray(h))for(;++y<h.length;){const g=h[y];o(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,y){let g=-1,v=-1;for(;++g<r.length;)if(r[g][0]===h){v=g;break}if(v===-1)r.push([h,...y]);else if(y.length>0){let[x,...S]=y;const w=r[v][1];bm(w)&&bm(x)&&(x=kp(!0,w,x)),r[v]=[h,x,...S]}}}}const Sj=new yg().freeze();function Ap(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Op(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Rp(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 N0(e){if(!bm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function T0(e,t,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wu(e){return wj(e)?e:new FS(e)}function wj(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _j(e){return typeof e=="string"||kj(e)}function kj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Nj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",C0=[],A0={allowDangerousHtml:!0},Tj=/^(https?|ircs?|mailto|xmpp)$/i,Cj=[{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 xg(e){const t=Aj(e),i=Oj(e);return Rj(t.runSync(t.parse(i),i),e)}function Aj(e){const t=e.rehypePlugins||C0,i=e.remarkPlugins||C0,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...A0}:A0;return Sj().use(uL).use(i).use(aj,r).use(t)}function Oj(e){const t=e.children||"",i=new FS;return typeof t=="string"&&(i.value=t),i}function Rj(e,t){const i=t.allowedElements,r=t.allowElement,l=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||Mj;for(const y of Cj)Object.hasOwn(t,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+Nj+y.id,void 0);return Wf(e,h),YR(e,{Fragment:m.Fragment,components:l,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function h(y,g,v){if(y.type==="raw"&&v&&typeof g=="number")return c?v.children.splice(g,1):v.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let x;for(x in Ep)if(Object.hasOwn(Ep,x)&&Object.hasOwn(y.properties,x)){const S=y.properties[x],w=Ep[x];(w===null||w.includes(y.tagName))&&(y.properties[x]=d(String(S||""),x,y))}}if(y.type==="element"){let x=i?!i.includes(y.tagName):o?o.includes(y.tagName):!1;if(!x&&r&&typeof g=="number"&&(x=!r(y,g,v)),x&&v&&typeof g=="number")return f&&y.children?v.children.splice(g,1,...y.children):v.children.splice(g,1),g}}}function Mj(e){const t=e.indexOf(":"),i=e.indexOf("?"),r=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||i!==-1&&t>i||r!==-1&&t>r||Tj.test(e.slice(0,t))?e:""}function O0(e,t){const i=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,l=i.indexOf(t);for(;l!==-1;)r++,l=i.indexOf(t,l+t.length);return r}function Dj(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Lj(e,t,i){const l=wc((i||{}).ignore||[]),o=jj(t);let c=-1;for(;++c<o.length;)US(e,"text",f);function f(h,y){let g=-1,v;for(;++g<y.length;){const x=y[g],S=v?v.children:void 0;if(l(x,S?S.indexOf(x):void 0,v))return;v=x}if(v)return d(h,y)}function d(h,y){const g=y[y.length-1],v=o[c][0],x=o[c][1];let S=0;const k=g.children.indexOf(h);let _=!1,R=[];v.lastIndex=0;let A=v.exec(h.value);for(;A;){const I=A.index,$={index:A.index,input:A.input,stack:[...y,h]};let T=x(...A,$);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?v.lastIndex=I+1:(S!==I&&R.push({type:"text",value:h.value.slice(S,I)}),Array.isArray(T)?R.push(...T):T&&R.push(T),S=I+A[0].length,_=!0),!v.global)break;A=v.exec(h.value)}return _?(S<h.value.length&&R.push({type:"text",value:h.value.slice(S)}),g.children.splice(k,1,...R)):R=[h],k+R.length}}function jj(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<i.length;){const l=i[r];t.push([Ij(l[0]),zj(l[1])])}return t}function Ij(e){return typeof e=="string"?new RegExp(Dj(e),"g"):e}function zj(e){return typeof e=="function"?e:function(){return e}}const Mp="phrasing",Dp=["autolink","link","image","label"];function Bj(){return{transforms:[Kj],enter:{literalAutolink:Fj,literalAutolinkEmail:Lp,literalAutolinkHttp:Lp,literalAutolinkWww:Lp},exit:{literalAutolink:Hj,literalAutolinkEmail:qj,literalAutolinkHttp:Pj,literalAutolinkWww:$j}}}function Uj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mp,notInConstruct:Dp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mp,notInConstruct:Dp},{character:":",before:"[ps]",after:"\\/",inConstruct:Mp,notInConstruct:Dp}]}}function Fj(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Lp(e){this.config.enter.autolinkProtocol.call(this,e)}function Pj(e){this.config.exit.autolinkProtocol.call(this,e)}function $j(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 qj(e){this.config.exit.autolinkEmail.call(this,e)}function Hj(e){this.exit(e)}function Kj(e){Lj(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Gj],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Yj]],{ignore:["link","linkReference"]})}function Gj(e,t,i,r,l){let o="";if(!PS(l)||(/^w/i.test(t)&&(i=t+i,t="",o="http://"),!Qj(i)))return!1;const c=Vj(i+r);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 Yj(e,t,i,r){return!PS(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+i,children:[{type:"text",value:t+"@"+i}]}}function Qj(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 Vj(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let i=t[0],r=i.indexOf(")");const l=O0(e,"(");let o=O0(e,")");for(;r!==-1&&l>o;)e+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),o++;return[e,i]}function PS(e,t){const i=e.input.charCodeAt(e.index-1);return(e.index===0||fs(i)||Qf(i))&&(!t||i!==47)}$S.peek=aI;function Xj(){this.buffer()}function Zj(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Wj(){this.buffer()}function Jj(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function eI(e){const t=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),i.label=t}function tI(e){this.exit(e)}function nI(e){const t=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),i.label=t}function iI(e){this.exit(e)}function aI(){return"["}function $S(e,t,i,r){const l=i.createTracker(r);let o=l.move("[^");const c=i.enter("footnoteReference"),f=i.enter("reference");return o+=l.move(i.safe(i.associationId(e),{after:"]",before:o})),f(),c(),o+=l.move("]"),o}function rI(){return{enter:{gfmFootnoteCallString:Xj,gfmFootnoteCall:Zj,gfmFootnoteDefinitionLabelString:Wj,gfmFootnoteDefinition:Jj},exit:{gfmFootnoteCallString:eI,gfmFootnoteCall:tI,gfmFootnoteDefinitionLabelString:nI,gfmFootnoteDefinition:iI}}}function sI(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:i,footnoteReference:$S},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,l,o,c){const f=o.createTracker(c);let d=f.move("[^");const h=o.enter("footnoteDefinition"),y=o.enter("label");return d+=f.move(o.safe(o.associationId(r),{before:d,after:"]"})),y(),d+=f.move("]:"),r.children&&r.children.length>0&&(f.shift(4),d+=f.move((t?`
466
+ `:" ")+o.indentLines(o.containerFlow(r,f.current()),t?qS:lI))),h(),d}}function lI(e,t,i){return t===0?e:qS(e,t,i)}function qS(e,t,i){return(i?"":" ")+e}const oI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];HS.peek=hI;function cI(){return{canContainEols:["delete"],enter:{strikethrough:fI},exit:{strikethrough:dI}}}function uI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:oI}],handlers:{delete:HS}}}function fI(e){this.enter({type:"delete",children:[]},e)}function dI(e){this.exit(e)}function HS(e,t,i,r){const l=i.createTracker(r),o=i.enter("strikethrough");let c=l.move("~~");return c+=i.containerPhrasing(e,{...l.current(),before:c,after:"~"}),c+=l.move("~~"),o(),c}function hI(){return"~"}function pI(e){return e.length}function mI(e,t){const i=t||{},r=(i.align||[]).concat(),l=i.stringLength||pI,o=[],c=[],f=[],d=[];let h=0,y=-1;for(;++y<e.length;){const w=[],k=[];let _=-1;for(e[y].length>h&&(h=e[y].length);++_<e[y].length;){const R=gI(e[y][_]);if(i.alignDelimiters!==!1){const A=l(R);k[_]=A,(d[_]===void 0||A>d[_])&&(d[_]=A)}w.push(R)}c[y]=w,f[y]=k}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<h;)o[g]=R0(r[g]);else{const w=R0(r);for(;++g<h;)o[g]=w}g=-1;const v=[],x=[];for(;++g<h;){const w=o[g];let k="",_="";w===99?(k=":",_=":"):w===108?k=":":w===114&&(_=":");let R=i.alignDelimiters===!1?1:Math.max(1,d[g]-k.length-_.length);const A=k+"-".repeat(R)+_;i.alignDelimiters!==!1&&(R=k.length+R+_.length,R>d[g]&&(d[g]=R),x[g]=R),v[g]=A}c.splice(1,0,v),f.splice(1,0,x),y=-1;const S=[];for(;++y<c.length;){const w=c[y],k=f[y];g=-1;const _=[];for(;++g<h;){const R=w[g]||"";let A="",I="";if(i.alignDelimiters!==!1){const $=d[g]-(k[g]||0),T=o[g];T===114?A=" ".repeat($):T===99?$%2?(A=" ".repeat($/2+.5),I=" ".repeat($/2-.5)):(A=" ".repeat($/2),I=A):I=" ".repeat($)}i.delimiterStart!==!1&&!g&&_.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&R==="")&&(i.delimiterStart!==!1||g)&&_.push(" "),i.alignDelimiters!==!1&&_.push(A),_.push(R),i.alignDelimiters!==!1&&_.push(I),i.padding!==!1&&_.push(" "),(i.delimiterEnd!==!1||g!==h-1)&&_.push("|")}S.push(i.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return S.join(`
467
+ `)}function gI(e){return e==null?"":String(e)}function R0(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 bI(e,t,i,r){const l=i.enter("blockquote"),o=i.createTracker(r);o.move("> "),o.shift(2);const c=i.indentLines(i.containerFlow(e,o.current()),yI);return l(),c}function yI(e,t,i){return">"+(i?"":" ")+e}function xI(e,t){return M0(e,t.inConstruct,!0)&&!M0(e,t.notInConstruct,!1)}function M0(e,t,i){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return i;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function D0(e,t,i,r){let l=-1;for(;++l<i.unsafe.length;)if(i.unsafe[l].character===`
468
+ `&&xI(i.stack,i.unsafe[l]))return/[ \t]/.test(r.before)?"":" ";return`\\
469
+ `}function vI(e,t){const i=String(e);let r=i.indexOf(t),l=r,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===l?++o>c&&(c=o):o=1,l=r+t.length,r=i.indexOf(t,l);return c}function EI(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 SI(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 wI(e,t,i,r){const l=SI(i),o=e.value||"",c=l==="`"?"GraveAccent":"Tilde";if(EI(e,i)){const g=i.enter("codeIndented"),v=i.indentLines(o,_I);return g(),v}const f=i.createTracker(r),d=l.repeat(Math.max(vI(o,l)+1,3)),h=i.enter("codeFenced");let y=f.move(d);if(e.lang){const g=i.enter(`codeFencedLang${c}`);y+=f.move(i.safe(e.lang,{before:y,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=i.enter(`codeFencedMeta${c}`);y+=f.move(" "),y+=f.move(i.safe(e.meta,{before:y,after:`
470
+ `,encode:["`"],...f.current()})),g()}return y+=f.move(`
471
+ `),o&&(y+=f.move(o+`
472
+ `)),y+=f.move(d),h(),y}function _I(e,t,i){return(i?"":" ")+e}function vg(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 kI(e,t,i,r){const l=vg(i),o=l==='"'?"Quote":"Apostrophe",c=i.enter("definition");let f=i.enter("label");const d=i.createTracker(r);let h=d.move("[");return h+=d.move(i.safe(i.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(i.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=i.enter("destinationRaw"),h+=d.move(i.safe(e.url,{before:h,after:e.title?" ":`
473
+ `,...d.current()}))),f(),e.title&&(f=i.enter(`title${o}`),h+=d.move(" "+l),h+=d.move(i.safe(e.title,{before:h,after:l,...d.current()})),h+=d.move(l),f()),c(),h}function NI(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 oc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Tf(e,t,i){const r=Ol(e),l=Ol(t);return r===void 0?l===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}KS.peek=TI;function KS(e,t,i,r){const l=NI(i),o=i.enter("emphasis"),c=i.createTracker(r),f=c.move(l);let d=c.move(i.containerPhrasing(e,{after:l,before:f,...c.current()}));const h=d.charCodeAt(0),y=Tf(r.before.charCodeAt(r.before.length-1),h,l);y.inside&&(d=oc(h)+d.slice(1));const g=d.charCodeAt(d.length-1),v=Tf(r.after.charCodeAt(0),g,l);v.inside&&(d=d.slice(0,-1)+oc(g));const x=c.move(l);return o(),i.attentionEncodeSurroundingInfo={after:v.outside,before:y.outside},f+d+x}function TI(e,t,i){return i.options.emphasis||"*"}function CI(e,t){let i=!1;return Wf(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,mm}),!!((!e.depth||e.depth<3)&&fg(e)&&(t.options.setext||i))}function AI(e,t,i,r){const l=Math.max(Math.min(6,e.depth||1),1),o=i.createTracker(r);if(CI(e,i)){const y=i.enter("headingSetext"),g=i.enter("phrasing"),v=i.containerPhrasing(e,{...o.current(),before:`
474
+ `,after:`
475
+ `});return g(),y(),v+`
476
+ `+(l===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
477
+ `))+1))}const c="#".repeat(l),f=i.enter("headingAtx"),d=i.enter("phrasing");o.move(c+" ");let h=i.containerPhrasing(e,{before:"# ",after:`
478
+ `,...o.current()});return/^[\t ]/.test(h)&&(h=oc(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,i.options.closeAtx&&(h+=" "+c),d(),f(),h}GS.peek=OI;function GS(e){return e.value||""}function OI(){return"<"}YS.peek=RI;function YS(e,t,i,r){const l=vg(i),o=l==='"'?"Quote":"Apostrophe",c=i.enter("image");let f=i.enter("label");const d=i.createTracker(r);let h=d.move("![");return h+=d.move(i.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(i.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=i.enter("destinationRaw"),h+=d.move(i.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=i.enter(`title${o}`),h+=d.move(" "+l),h+=d.move(i.safe(e.title,{before:h,after:l,...d.current()})),h+=d.move(l),f()),h+=d.move(")"),c(),h}function RI(){return"!"}QS.peek=MI;function QS(e,t,i,r){const l=e.referenceType,o=i.enter("imageReference");let c=i.enter("label");const f=i.createTracker(r);let d=f.move("![");const h=i.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(e),{before:d,after:"]",...f.current()});return c(),i.stack=y,o(),l==="full"||!h||h!==g?d+=f.move(g+"]"):l==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function MI(){return"!"}VS.peek=DI;function VS(e,t,i){let r=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(r);)l+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<i.unsafe.length;){const c=i.unsafe[o],f=i.compilePattern(c);let d;if(c.atBreak)for(;d=f.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return l+r+l}function DI(){return"`"}function XS(e,t){const i=fg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}ZS.peek=LI;function ZS(e,t,i,r){const l=vg(i),o=l==='"'?"Quote":"Apostrophe",c=i.createTracker(r);let f,d;if(XS(e,i)){const y=i.stack;i.stack=[],f=i.enter("autolink");let g=c.move("<");return g+=c.move(i.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),i.stack=y,g}f=i.enter("link"),d=i.enter("label");let h=c.move("[");return h+=c.move(i.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=i.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(i.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(d=i.enter("destinationRaw"),h+=c.move(i.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),d(),e.title&&(d=i.enter(`title${o}`),h+=c.move(" "+l),h+=c.move(i.safe(e.title,{before:h,after:l,...c.current()})),h+=c.move(l),d()),h+=c.move(")"),f(),h}function LI(e,t,i){return XS(e,i)?"<":"["}WS.peek=jI;function WS(e,t,i,r){const l=e.referenceType,o=i.enter("linkReference");let c=i.enter("label");const f=i.createTracker(r);let d=f.move("[");const h=i.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(e),{before:d,after:"]",...f.current()});return c(),i.stack=y,o(),l==="full"||!h||h!==g?d+=f.move(g+"]"):l==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function jI(){return"["}function Eg(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 II(e){const t=Eg(e),i=e.options.bulletOther;if(!i)return t==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+i+"`) to be different");return i}function zI(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 JS(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 BI(e,t,i,r){const l=i.enter("list"),o=i.bulletCurrent;let c=e.ordered?zI(i):Eg(i);const f=e.ordered?c==="."?")":".":II(i);let d=t&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(d=!0),JS(i)===c&&y){let g=-1;for(;++g<e.children.length;){const v=e.children[g];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(c=f),i.bulletCurrent=c;const h=i.containerFlow(e,r);return i.bulletLastUsed=c,i.bulletCurrent=o,l(),h}function UI(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 FI(e,t,i,r){const l=UI(i);let o=i.bulletCurrent||Eg(i);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(i.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=i.createTracker(r);f.move(o+" ".repeat(c-o.length)),f.shift(c);const d=i.enter("listItem"),h=i.indentLines(i.containerFlow(e,f.current()),y);return d(),h;function y(g,v,x){return v?(x?"":" ".repeat(c))+g:(x?o:o+" ".repeat(c-o.length))+g}}function PI(e,t,i,r){const l=i.enter("paragraph"),o=i.enter("phrasing"),c=i.containerPhrasing(e,r);return o(),l(),c}const $I=wc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qI(e,t,i,r){return(e.children.some(function(c){return $I(c)})?i.containerPhrasing:i.containerFlow).call(i,e,r)}function HI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ew.peek=KI;function ew(e,t,i,r){const l=HI(i),o=i.enter("strong"),c=i.createTracker(r),f=c.move(l+l);let d=c.move(i.containerPhrasing(e,{after:l,before:f,...c.current()}));const h=d.charCodeAt(0),y=Tf(r.before.charCodeAt(r.before.length-1),h,l);y.inside&&(d=oc(h)+d.slice(1));const g=d.charCodeAt(d.length-1),v=Tf(r.after.charCodeAt(0),g,l);v.inside&&(d=d.slice(0,-1)+oc(g));const x=c.move(l+l);return o(),i.attentionEncodeSurroundingInfo={after:v.outside,before:y.outside},f+d+x}function KI(e,t,i){return i.options.strong||"*"}function GI(e,t,i,r){return i.safe(e.value,r)}function YI(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 QI(e,t,i){const r=(JS(i)+(i.options.ruleSpaces?" ":"")).repeat(YI(i));return i.options.ruleSpaces?r.slice(0,-1):r}const tw={blockquote:bI,break:D0,code:wI,definition:kI,emphasis:KS,hardBreak:D0,heading:AI,html:GS,image:YS,imageReference:QS,inlineCode:VS,link:ZS,linkReference:WS,list:BI,listItem:FI,paragraph:PI,root:qI,strong:ew,text:GI,thematicBreak:QI};function VI(){return{enter:{table:XI,tableData:L0,tableHeader:L0,tableRow:WI},exit:{codeText:JI,table:ZI,tableData:jp,tableHeader:jp,tableRow:jp}}}function XI(e){const t=e._align;this.enter({type:"table",align:t.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function ZI(e){this.exit(e),this.data.inTable=void 0}function WI(e){this.enter({type:"tableRow",children:[]},e)}function jp(e){this.exit(e)}function L0(e){this.enter({type:"tableCell",children:[]},e)}function JI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,e3));const i=this.stack[this.stack.length-1];i.type,i.value=t,this.exit(e)}function e3(e,t){return t==="|"?t:e}function t3(e){const t=e||{},i=t.tableCellPadding,r=t.tablePipeAlign,l=t.stringLength,o=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
479
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:d,tableRow:f}};function c(x,S,w,k){return h(y(x,w,k),x.align)}function f(x,S,w,k){const _=g(x,w,k),R=h([_]);return R.slice(0,R.indexOf(`
480
+ `))}function d(x,S,w,k){const _=w.enter("tableCell"),R=w.enter("phrasing"),A=w.containerPhrasing(x,{...k,before:o,after:o});return R(),_(),A}function h(x,S){return mI(x,{align:S,alignDelimiters:r,padding:i,stringLength:l})}function y(x,S,w){const k=x.children;let _=-1;const R=[],A=S.enter("table");for(;++_<k.length;)R[_]=g(k[_],S,w);return A(),R}function g(x,S,w){const k=x.children;let _=-1;const R=[],A=S.enter("tableRow");for(;++_<k.length;)R[_]=d(k[_],x,S,w);return A(),R}function v(x,S,w){let k=tw.inlineCode(x,S,w);return w.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function n3(){return{exit:{taskListCheckValueChecked:j0,taskListCheckValueUnchecked:j0,paragraph:a3}}}function i3(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:r3}}}function j0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function a3(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const l=t.children;let o=-1,c;for(;++o<l.length;){const f=l[o];if(f.type==="paragraph"){c=f;break}}c===i&&(r.value=r.value.slice(1),r.value.length===0?i.children.shift():i.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,i.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function r3(e,t,i,r){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=i.createTracker(r);o&&f.move(c);let d=tw.listItem(e,t,i,{...r,...f.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(y){return y+c}}function s3(){return[Bj(),rI(),cI(),VI(),n3()]}function l3(e){return{extensions:[Uj(),sI(e),uI(),t3(e),i3()]}}const o3={tokenize:p3,partial:!0},nw={tokenize:m3,partial:!0},iw={tokenize:g3,partial:!0},aw={tokenize:b3,partial:!0},c3={tokenize:y3,partial:!0},rw={name:"wwwAutolink",tokenize:d3,previous:lw},sw={name:"protocolAutolink",tokenize:h3,previous:ow},Aa={name:"emailAutolink",tokenize:f3,previous:cw},Xi={};function u3(){return{text:Xi}}let Vr=48;for(;Vr<123;)Xi[Vr]=Aa,Vr++,Vr===58?Vr=65:Vr===91&&(Vr=97);Xi[43]=Aa;Xi[45]=Aa;Xi[46]=Aa;Xi[95]=Aa;Xi[72]=[Aa,sw];Xi[104]=[Aa,sw];Xi[87]=[Aa,rw];Xi[119]=[Aa,rw];function f3(e,t,i){const r=this;let l,o;return c;function c(g){return!xm(g)||!cw.call(r,r.previous)||Sg(r.events)?i(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return xm(g)?(e.consume(g),f):g===64?(e.consume(g),d):i(g)}function d(g){return g===46?e.check(c3,y,h)(g):g===45||g===95||mn(g)?(o=!0,e.consume(g),d):y(g)}function h(g){return e.consume(g),l=!0,d}function y(g){return o&&l&&Nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):i(g)}}function d3(e,t,i){const r=this;return l;function l(c){return c!==87&&c!==119||!lw.call(r,r.previous)||Sg(r.events)?i(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(o3,e.attempt(nw,e.attempt(iw,o),i),i)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function h3(e,t,i){const r=this;let l="",o=!1;return c;function c(g){return(g===72||g===104)&&ow.call(r,r.previous)&&!Sg(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(g),e.consume(g),f):i(g)}function f(g){if(Nn(g)&&l.length<5)return l+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const v=l.toLowerCase();if(v==="http"||v==="https")return e.consume(g),d}return i(g)}function d(g){return g===47?(e.consume(g),o?h:(o=!0,d)):i(g)}function h(g){return g===null||_f(g)||yt(g)||fs(g)||Qf(g)?i(g):e.attempt(nw,e.attempt(iw,y),i)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function p3(e,t,i){let r=0;return l;function l(c){return(c===87||c===119)&&r<3?(r++,e.consume(c),l):c===46&&r===3?(e.consume(c),o):i(c)}function o(c){return c===null?i(c):t(c)}}function m3(e,t,i){let r,l,o;return c;function c(h){return h===46||h===95?e.check(aw,d,f)(h):h===null||yt(h)||fs(h)||h!==45&&Qf(h)?d(h):(o=!0,e.consume(h),c)}function f(h){return h===95?r=!0:(l=r,r=void 0),e.consume(h),c}function d(h){return l||r||!o?i(h):t(h)}}function g3(e,t){let i=0,r=0;return l;function l(c){return c===40?(i++,e.consume(c),l):c===41&&r<i?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(aw,t,o)(c):c===null||yt(c)||fs(c)?t(c):(e.consume(c),l)}function o(c){return c===41&&r++,e.consume(c),l}}function b3(e,t,i){return r;function r(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),r):f===38?(e.consume(f),o):f===93?(e.consume(f),l):f===60||f===null||yt(f)||fs(f)?t(f):i(f)}function l(f){return f===null||f===40||f===91||yt(f)||fs(f)?t(f):r(f)}function o(f){return Nn(f)?c(f):i(f)}function c(f){return f===59?(e.consume(f),r):Nn(f)?(e.consume(f),c):i(f)}}function y3(e,t,i){return r;function r(o){return e.consume(o),l}function l(o){return mn(o)?i(o):t(o)}}function lw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function ow(e){return!Nn(e)}function cw(e){return!(e===47||xm(e))}function xm(e){return e===43||e===45||e===46||e===95||mn(e)}function Sg(e){let t=e.length,i=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){i=!0;break}if(r._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const x3={tokenize:T3,partial:!0};function v3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:_3,continuation:{tokenize:k3},exit:N3}},text:{91:{name:"gfmFootnoteCall",tokenize:w3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:E3,resolveTo:S3}}}}function E3(e,t,i){const r=this;let l=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;l--;){const d=r.events[l][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 i(d);const h=Mi(r.sliceSerialize({start:c.end,end:r.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?i(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function S3(e,t){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.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[i+1],e[i+2],["enter",r,t],e[i+3],e[i+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(i,e.length-i+1,...f),e}function w3(e,t,i){const r=this,l=r.parser.gfmFootnotes||(r.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?i(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(o>999||g===93&&!c||g===null||g===91||yt(g))return i(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return l.includes(Mi(r.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):i(g)}return yt(g)||(c=!0),o++,e.consume(g),g===92?y:h}function y(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}}function _3(e,t,i){const r=this,l=r.parser.gfmFootnotes||(r.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"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):i(S)}function y(S){if(c>999||S===93&&!f||S===null||S===91||yt(S))return i(S);if(S===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Mi(r.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return yt(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 v(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),l.includes(o)||l.push(o),Je(e,x,"gfmFootnoteDefinitionWhitespace")):i(S)}function x(S){return t(S)}}function k3(e,t,i){return e.check(Sc,t,e.attempt(x3,t,i))}function N3(e){e.exit("gfmFootnoteDefinition")}function T3(e,t,i){const r=this;return Je(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const c=r.events[r.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):i(o)}}function C3(e){let i=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:l};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function l(c,f){let d=-1;for(;++d<c.length;)if(c[d][0]==="enter"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._close){let h=d;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[d][1].end.offset-c[d][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[d][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[d][1].end)},g={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[d][1].start)},v=[["enter",y,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",g,f]],x=f.parser.constructs.insideSpan.null;x&&ii(v,v.length,0,Vf(x,c.slice(h+1,d),f)),ii(v,v.length,0,[["exit",g,f],["enter",c[d][1],f],["exit",c[d][1],f],["exit",y,f]]),ii(c,h-1,d-h+3,v),d=h+v.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 h=this.previous,y=this.events;let g=0;return v;function v(S){return h===126&&y[y.length-1][1].type!=="characterEscape"?d(S):(c.enter("strikethroughSequenceTemporary"),x(S))}function x(S){const w=Ol(h);if(S===126)return g>1?d(S):(c.consume(S),g++,x);if(g<2&&!i)return d(S);const k=c.exit("strikethroughSequenceTemporary"),_=Ol(S);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,f(S)}}}class A3{constructor(){this.map=[]}add(t,i,r){O3(this,t,i,r)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(t.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),t.length=this.map[i][0];r.push(t.slice()),t.length=0;let l=r.pop();for(;l;){for(const o of l)t.push(o);l=r.pop()}this.map.length=0}}function O3(e,t,i,r){let l=0;if(!(i===0&&r.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=i,e.map[l][2].push(...r);return}l+=1}e.map.push([t,i,r])}}function R3(e,t){let i=!1;const r=[];for(;t<e.length;){const l=e[t];if(i){if(l[0]==="enter")l[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(i=!0);t+=1}return r}function M3(){return{flow:{null:{name:"table",tokenize:D3,resolveAll:L3}}}}function D3(e,t,i){const r=this;let l=0,o=0,c;return f;function f(L){let K=r.events.length-1;for(;K>-1;){const se=r.events[K][1].type;if(se==="lineEnding"||se==="linePrefix")K--;else break}const X=K>-1?r.events[K][1].type:null,oe=X==="tableHead"||X==="tableRow"?T:d;return oe===T&&r.parser.lazy[r.now().line]?i(L):oe(L)}function d(L){return e.enter("tableHead"),e.enter("tableRow"),h(L)}function h(L){return L===124||(c=!0,o+=1),y(L)}function y(L){return L===null?i(L):Te(L)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),x):i(L):Ge(L)?Je(e,y,"whitespace")(L):(o+=1,c&&(c=!1,l+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),c=!0,y):(e.enter("data"),g(L)))}function g(L){return L===null||L===124||yt(L)?(e.exit("data"),y(L)):(e.consume(L),L===92?v:g)}function v(L){return L===92||L===124?(e.consume(L),g):g(L)}function x(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(L):(e.enter("tableDelimiterRow"),c=!1,Ge(L)?Je(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):S(L))}function S(L){return L===45||L===58?k(L):L===124?(c=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),w):$(L)}function w(L){return Ge(L)?Je(e,k,"whitespace")(L):k(L)}function k(L){return L===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),_):L===45?(o+=1,_(L)):L===null||Te(L)?I(L):$(L)}function _(L){return L===45?(e.enter("tableDelimiterFiller"),R(L)):$(L)}function R(L){return L===45?(e.consume(L),R):L===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(L))}function A(L){return Ge(L)?Je(e,I,"whitespace")(L):I(L)}function I(L){return L===124?S(L):L===null||Te(L)?!c||l!==o?$(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):$(L)}function $(L){return i(L)}function T(L){return e.enter("tableRow"),P(L)}function P(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),P):L===null||Te(L)?(e.exit("tableRow"),t(L)):Ge(L)?Je(e,P,"whitespace")(L):(e.enter("data"),z(L))}function z(L){return L===null||L===124||yt(L)?(e.exit("data"),P(L)):(e.consume(L),L===92?Z:z)}function Z(L){return L===92||L===124?(e.consume(L),z):z(L)}}function L3(e,t){let i=-1,r=!0,l=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,d=0,h,y,g;const v=new A3;for(;++i<e.length;){const x=e[i],S=x[1];x[0]==="enter"?S.type==="tableHead"?(f=!1,d!==0&&(I0(v,t,d,h,y),y=void 0,d=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(i,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(r=!0,g=void 0,o=[0,0,0,0],c=[0,i+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(i,0,[["enter",y,t]])),l=S.type==="tableDelimiterRow"?2:y?3:1):l&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],g=Ju(v,t,o,l,void 0,g),o=[0,0,0,0]),c[2]=i)):S.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(c[0]=c[1],g=Ju(v,t,o,l,void 0,g)),o=c,c=[o[1],i,0,0])):S.type==="tableHead"?(f=!0,d=i):S.type==="tableRow"||S.type==="tableDelimiterRow"?(d=i,o[1]!==0?(c[0]=c[1],g=Ju(v,t,o,l,i,g)):c[1]!==0&&(g=Ju(v,t,c,l,i,g)),l=0):l&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=i)}for(d!==0&&I0(v,t,d,h,y),v.consume(t.events),i=-1;++i<t.events.length;){const x=t.events[i];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=R3(t.events,i))}return e}function Ju(e,t,i,r,l,o){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(o.end=Object.assign({},sl(t.events,i[0])),e.add(i[0],0,[["exit",o,t]]));const d=sl(t.events,i[1]);if(o={type:c,start:Object.assign({},d),end:Object.assign({},d)},e.add(i[1],0,[["enter",o,t]]),i[2]!==0){const h=sl(t.events,i[2]),y=sl(t.events,i[3]),g={type:f,start:Object.assign({},h),end:Object.assign({},y)};if(e.add(i[2],0,[["enter",g,t]]),r!==2){const v=t.events[i[2]],x=t.events[i[3]];if(v[1].end=Object.assign({},x[1].end),v[1].type="chunkText",v[1].contentType="text",i[3]>i[2]+1){const S=i[2]+1,w=i[3]-i[2]-1;e.add(S,w,[])}}e.add(i[3]+1,0,[["exit",g,t]])}return l!==void 0&&(o.end=Object.assign({},sl(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function I0(e,t,i,r,l){const o=[],c=sl(t.events,i);l&&(l.end=Object.assign({},c),o.push(["exit",l,t])),r.end=Object.assign({},c),o.push(["exit",r,t]),e.add(i+1,0,o)}function sl(e,t){const i=e[t],r=i[0]==="enter"?"start":"end";return i[1][r]}const j3={name:"tasklistCheck",tokenize:z3};function I3(){return{text:{91:j3}}}function z3(e,t,i){const r=this;return l;function l(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return yt(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):i(d)}function c(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):i(d)}function f(d){return Te(d)?t(d):Ge(d)?e.check({tokenize:B3},t,i)(d):i(d)}}function B3(e,t,i){return Je(e,r,"whitespace");function r(l){return l===null?i(l):t(l)}}function U3(e){return vS([u3(),v3(),C3(e),M3(),I3()])}const F3={};function wg(e){const t=this,i=e||F3,r=t.data(),l=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);l.push(U3(i)),o.push(s3()),c.push(l3(i))}const z0=(function(e,t,i){const r=wc(i);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(r(e.children[t],t,e))return e.children[t]}),gs=(function(e){if(e==null)return q3;if(typeof e=="string")return $3(e);if(typeof e=="object")return P3(e);if(typeof e=="function")return _g(e);throw new Error("Expected function, string, or array as `test`")});function P3(e){const t=[];let i=-1;for(;++i<e.length;)t[i]=gs(e[i]);return _g(r);function r(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function $3(e){return _g(t);function t(i){return i.tagName===e}}function _g(e){return t;function t(i,r,l){return!!(H3(i)&&e.call(this,i,typeof r=="number"?r:void 0,l||void 0))}}function q3(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function H3(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const B0=/\n/g,U0=/[\t ]+/g,vm=gs("br"),F0=gs(W3),K3=gs("p"),P0=gs("tr"),G3=gs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Z3,J3]),uw=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 Y3(e,t){const i=t||{},r="children"in e?e.children:[],l=uw(e),o=hw(e,{whitespace:i.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...dw(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<r.length;)c.push(...fw(r[f],e,{whitespace:o,breakBefore:f?void 0:l,breakAfter:f<r.length-1?vm(r[f+1]):l}));const d=[];let h;for(f=-1;++f<c.length;){const y=c[f];typeof y=="number"?h!==void 0&&y>h&&(h=y):y&&(h!==void 0&&h>-1&&d.push(`
481
+ `.repeat(h)||" "),h=-1,d.push(y))}return d.join("")}function fw(e,t,i){return e.type==="element"?Q3(e,t,i):e.type==="text"?i.whitespace==="normal"?dw(e,i):V3(e):[]}function Q3(e,t,i){const r=hw(e,i),l=e.children||[];let o=-1,c=[];if(G3(e))return c;let f,d;for(vm(e)||P0(e)&&z0(t,e,P0)?d=`
482
+ `:K3(e)?(f=2,d=2):uw(e)&&(f=1,d=1);++o<l.length;)c=c.concat(fw(l[o],e,{whitespace:r,breakBefore:o?void 0:f,breakAfter:o<l.length-1?vm(l[o+1]):d}));return F0(e)&&z0(t,e,F0)&&c.push(" "),f&&c.unshift(f),d&&c.push(d),c}function dw(e,t){const i=String(e.value),r=[],l=[];let o=0;for(;o<=i.length;){B0.lastIndex=o;const d=B0.exec(i),h=d&&"index"in d?d.index:i.length;r.push(X3(i.slice(o,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,h===i.length?t.breakAfter:!0)),o=h+1}let c=-1,f;for(;++c<r.length;)r[c].charCodeAt(r[c].length-1)===8203||c<r.length-1&&r[c+1].charCodeAt(0)===8203?(l.push(r[c]),f=void 0):r[c]?(typeof f=="number"&&l.push(f),l.push(r[c]),f=0):(c===0||c===r.length-1)&&l.push(0);return l}function V3(e){return[String(e.value)]}function X3(e,t,i){const r=[];let l=0,o;for(;l<e.length;){U0.lastIndex=l;const c=U0.exec(e);o=c?c.index:e.length,!l&&!o&&c&&!t&&r.push(""),l!==o&&r.push(e.slice(l,o)),l=c?o+c[0].length:o}return l!==o&&!i&&r.push(""),r.join(" ")}function hw(e,t){if(e.type==="element"){const i=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return i.wrap?"pre-wrap":"pre";case"td":case"th":return i.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function Z3(e){return!!(e.properties||{}).hidden}function W3(e){return e.tagName==="td"||e.tagName==="th"}function J3(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function ez(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="(?!struct)("+r+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={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(h,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},x=t.optional(l)+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"],I={type:w,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},$={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},T=[$,g,f,i,e.C_BLOCK_COMMENT_MODE,y,h],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:I,contains:T.concat([{begin:/\(/,end:/\)/,keywords:I,contains:T.concat(["self"]),relevance:0}]),relevance:0},z={className:"function",begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:I,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:I,relevance:0},{begin:x,returnBegin:!0,contains:[v],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,i,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:I,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,z,$,T,[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:I,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:I},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function tz(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"]},i=ez(e),r=i.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,i.name="Arduino",i.aliases=["ino"],i.supersetOf="cpp",i}function nz(e){const t=e.regex,i={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[i]}]};Object.assign(i,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const l={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,i,l]};l.contains.push(f);const d={match:/\\"/},h={className:"string",begin:/'/,end:/'/},y={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,i]},v=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],x=e.SHEBANG({binary:`(${v.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._-]+)+/},R=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],A=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],I=["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"],$=["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:[...R,...A,"set","shopt",...I,...$]},contains:[x,e.SHEBANG(),S,g,o,c,_,f,d,h,y,i]}}function iz(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="("+r+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},h={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(h,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},x=t.optional(l)+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,i,e.C_BLOCK_COMMENT_MODE,y,h],R={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},A={begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:k,relevance:0},{begin:x,returnBegin:!0,contains:[e.inherit(v,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,i,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:k,disableAutodetect:!0,illegal:"</",contains:[].concat(R,A,_,[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:h,keywords:k}}}function az(e){const t=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",l="[a-zA-Z_]\\w*::",c="(?!struct)("+r+"|"+t.optional(l)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},h={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(h,{className:"string"}),{className:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(l)+e.IDENT_RE,relevance:0},x=t.optional(l)+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"],I={type:w,keyword:S,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},$={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},T=[$,g,f,i,e.C_BLOCK_COMMENT_MODE,y,h],P={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:I,contains:T.concat([{begin:/\(/,end:/\)/,keywords:I,contains:T.concat(["self"]),relevance:0}]),relevance:0},z={className:"function",begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:I,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:I,relevance:0},{begin:x,returnBegin:!0,contains:[v],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[h,y]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,h,y,f,{begin:/\(/,end:/\)/,keywords:I,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,h,y,f]}]},f,i,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:I,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(P,z,$,T,[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:I,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:I},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function rz(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],i=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],l=["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:l.concat(o),built_in:t,literal:r},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},h={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},y={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=e.inherit(y,{illegal:/\n/}),v={className:"subst",begin:/\{/,end:/\}/,keywords:c},x=e.inherit(v,{illegal:/\n/}),S={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,x]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]},k=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]});v.contains=[w,S,y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.C_BLOCK_COMMENT_MODE],x.contains=[k,S,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const _={variants:[h,w,S,y,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},R={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},A=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",I={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,R,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,R,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:"("+A+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:i.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,R],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]},I]}}const sz=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"],oz=["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"],cz=[...lz,...oz],uz=["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(),fz=["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(),dz=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),hz=["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,i=sz(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l="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:[i.BLOCK_COMMENT,r,i.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},i.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+fz.join("|")+")"},{begin:":(:)?("+dz.join("|")+")"}]},i.CSS_VARIABLE,{className:"attribute",begin:"\\b("+hz.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[i.BLOCK_COMMENT,i.HEXCOLOR,i.IMPORTANT,i.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}]},i.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:l,attribute:uz.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,i.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+cz.join("|")+")\\b"}]}}function mz(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 gz(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 bz(e){const t=e.regex,i=/[_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(i,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function yz(e){const t=e.regex,i={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const l={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:[r,o,l,c,i,"self"],relevance:0},d=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,y=/'[^']*'/,g=t.either(d,h,y),v=t.concat(g,"(\\s*\\.\\s*",g,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:v,className:"attr",starts:{end:/$/,contains:[r,f,o,l,c,i]}}]}}var ll="[0-9](_*[0-9])*",ef=`\\.(${ll})`,tf="[0-9a-fA-F](_*[0-9a-fA-F])*",$0={className:"number",variants:[{begin:`(\\b(${ll})((${ef})|\\.)?|(${ef}))[eE][+-]?(${ll})[fFdD]?\\b`},{begin:`\\b(${ll})((${ef})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ef})[fFdD]?\\b`},{begin:`\\b(${ll})[fFdD]\\b`},{begin:`\\b0[xX]((${tf})\\.?|(${tf})?\\.(${tf}))[pP][+-]?(${ll})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${tf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function pw(e,t,i){return i===-1?"":e.replace(t,r=>pw(e,t,i-1))}function xz(e){const t=e.regex,i="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=i+pw("(?:<"+i+"~~~(?:\\s*,\\s*"+i+"~~~)*>)?",/~~~/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"]},h={className:"meta",begin:"@"+i,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+/,i],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,i),/\s+/,i,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,i],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:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:d,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:d,relevance:0,contains:[h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,$0,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},$0,h]}}const q0="[A-Za-z$_][0-9A-Za-z$_]*",vz=["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"],Ez=["true","false","null","undefined","NaN","Infinity"],mw=["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"],gw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],bw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Sz=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],wz=[].concat(bw,mw,gw);function _z(e){const t=e.regex,i=(V,{after:me})=>{const O="</"+V[0].slice(1);return V.input.indexOf(O,me)!==-1},r=q0,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,me)=>{const O=V[0].length+V.index,D=V.input[O];if(D==="<"||D===","){me.ignoreMatch();return}D===">"&&(i(V,{after:O})||me.ignoreMatch());let J;const C=V.input.substring(O);if(J=C.match(/^\s*=/)){me.ignoreMatch();return}if((J=C.match(/^\s+extends\s+/))&&J.index===0){me.ignoreMatch();return}}},f={$pattern:q0,keyword:vz,literal:Ez,built_in:wz,"variable.language":Sz},d="[0-9](_?[0-9])*",h=`\\.(${d})`,y="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${y})((${h})|\\.)?|(${h}))[eE][+-]?(${d})\\b`},{begin:`\\b(${y})\\b((${h})\\b|\\.)?|(${h})\\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},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},R={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:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,S,w,k,{match:/\$\d+/},g];v.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const I=[].concat(R,v.contains),$=I.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(I)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},P={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},z={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:{_:[...mw,...gw]}},Z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function X(V){return t.concat("(?!",V.join("|"),")")}const oe={match:t.concat(/\b/,X([...bw,"super","import"].map(V=>`${V}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},se={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ee={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},T]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",le={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),Z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,S,w,k,R,{match:/\$\d+/},g,z,{scope:"attr",match:r+t.lookahead(":"),relevance:0},le,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin:H,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:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.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"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},se,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[T]},oe,K,P,ee,{match:/\$[(.]/}]}}function kz(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},i={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],l={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,i,e.QUOTE_STRING_MODE,l,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var ol="[0-9](_*[0-9])*",nf=`\\.(${ol})`,af="[0-9a-fA-F](_*[0-9a-fA-F])*",Nz={className:"number",variants:[{begin:`(\\b(${ol})((${nf})|\\.)?|(${nf}))[eE][+-]?(${ol})[fFdD]?\\b`},{begin:`\\b(${ol})((${nf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${nf})[fFdD]?\\b`},{begin:`\\b(${ol})[fFdD]\\b`},{begin:`\\b0[xX]((${af})\\.?|(${af})?\\.(${af}))[pP][+-]?(${ol})[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 Tz(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"},i={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},l={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,l]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,l]}]};l.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"]}]},h=Nz,y=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),g={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},v=g;return v.variants[1].contains=[g],g.variants[1].contains=[v],{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,i,r,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:`
483
+ `},h]}}const Cz=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_-]*/}}),Az=["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"],Oz=["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"],Rz=[...Az,...Oz],Mz=["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(),yw=["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(),xw=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Dz=["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(),Lz=yw.concat(xw).sort().reverse();function jz(e){const t=Cz(e),i=Lz,r="and or not only",l="[\\w-]+",o="("+l+"|@\\{"+l+"\\})",c=[],f=[],d=function(A){return{className:"string",begin:"~?"+A+".*?"+A}},h=function(A,I,$){return{className:A,begin:I,relevance:$}},y={$pattern:/[a-z-]+/,keyword:r,attribute:Mz.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,h("variable","@@?"+l,10),h("variable","@\\{"+l+"\\}"),h("built_in","~?`[^`]*?`"),{className:"attribute",begin:l+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const v=f.concat({begin:/\{/,end:/\}/,contains:c}),x={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("+Dz.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:"@"+l+"\\s*:",relevance:15},{begin:"@"+l}],starts:{end:"[;}]",returnEnd:!0,contains:v}},_={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,x,h("keyword","all\\b"),h("variable","@\\{"+l+"\\}"),{begin:"\\b("+Rz.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,h("selector-tag",o,0),h("selector-id","#"+o),h("selector-class","\\."+o,0),h("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+yw.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+xw.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:v},{begin:"!important"},t.FUNCTION_DISPATCH]},R={begin:l+`:(:)?(${i.join("|")})`,returnBegin:!0,contains:[_]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,k,R,S,_,x,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function Iz(e){const t="\\[=*\\[",i="\\]=*\\]",r={begin:t,end:i,contains:["self"]},l=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,i,{contains:[r],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:l.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:l}].concat(l)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:i,contains:[r],relevance:5}])}}function zz(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},i={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},r={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,i]},l={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,i,r,l,o,c]}}function Bz(e){const t=e.regex,i={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},l={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}]},h={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(h,{contains:[]}),v=e.inherit(y,{contains:[]});h.contains.push(v),y.contains.push(g);let x=[i,d];return[h,y,g,v].forEach(_=>{_.contains=_.contains.concat(x)}),x=x.concat(h,y),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:x},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:x}]}]},i,o,h,y,{className:"quote",begin:"^>\\s+",contains:x,end:"$"},l,r,d,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Uz(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+"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:i,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:i,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 Fz(e){const t=e.regex,i=["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"],r=/[dualxmsipngr]{0,12}/,l={$pattern:/[\w.]+/,keyword:i.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:l},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]},h={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=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],v=(w,k,_="\\1")=>{const R=_==="\\1"?_:t.concat(_,k);return t.concat(t.concat("(?:",w,")"),k,/(?:\\.|[^\\\/])*?/,R,/(?:\\.|[^\\\/])*?/,_,r)},x=(w,k,_)=>t.concat(t.concat("(?:",w,")"),k,/(?:\\.|[^\\\/])*?/,_,r),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}]},h,{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:v("s|tr|y",t.either(...g,{capture:!0}))},{begin:v("s|tr|y","\\(","\\)")},{begin:v("s|tr|y","\\[","\\]")},{begin:v("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:x("(?:m|qr)?",/\//,/\//)},{begin:x("m|qr",t.either(...g,{capture:!0}),/\1/)},{begin:x("m|qr",/\(/,/\)/)},{begin:x("m|qr",/\[/,/\]/)},{begin:x("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,h]},{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:l,contains:S}}function Pz(e){const t=e.regex,i=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,i),l=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,i),o=t.concat(/[A-Z]+/,i),c={scope:"variable",match:"\\$+"+r},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},d={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},h=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":(se,ee)=>{ee.data._beginMatch=se[1]||se[2]},"on:end":(se,ee)=>{ee.data._beginMatch!==se[1]&&ee.ignoreMatch()}},v=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),x=`[
484
+ ]`,S={scope:"string",variants:[y,h,g,v]},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"],R=["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"],I={keyword:_,literal:(se=>{const ee=[];return se.forEach(H=>{ee.push(H),H.toLowerCase()===H?ee.push(H.toUpperCase()):ee.push(H.toLowerCase())}),ee})(k),built_in:R},$=se=>se.map(ee=>ee.replace(/\|\d+$/,"")),T={variants:[{match:[/new/,t.concat(x,"+"),t.concat("(?!",$(R).join("\\b|"),"\\b)"),l],scope:{1:"keyword",4:"title.class"}}]},P=t.concat(r,"\\b(?!\\()"),z={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[l,t.concat(/::/,t.lookahead(/(?!class\b)/)),P],scope:{1:"title.class",3:"variable.constant"}},{match:[l,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[l,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},Z={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:I,contains:[Z,c,z,e.C_BLOCK_COMMENT_MODE,S,w,T]},K={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",$(_).join("\\b|"),"|",$(R).join("\\b|"),"\\b)"),r,t.concat(x,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(K);const X=[Z,z,e.C_BLOCK_COMMENT_MODE,S,w,T],oe={begin:t.concat(/#\[\s*\\?/,t.either(l,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:k,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:k,keyword:["new","array"]},contains:["self",...X]},...X,{scope:"meta",variants:[{match:l},{match:o}]}]};return{case_insensitive:!1,keywords:I,contains:[oe,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,K,z,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},T,{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:I,contains:["self",oe,c,z,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 $z(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 qz(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Hz(e){const t=e.regex,i=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["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:r,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:/^(>>>|\.\.\.) /},h={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,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,d,y,h]},{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,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,y,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},v="[0-9](_?[0-9])*",x=`(\\b(${v}))?\\.(${v})|\\b(${v})\\.`,S=`\\b|${r.join("|")}`,w={className:"number",relevance:0,variants:[{begin:`(\\b(${v})|(${x}))[eE][+-]?(${v})[jJ]?(?=${S})`},{begin:`(${x})[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(${v})[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 h.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+/,i],scope:{1:"keyword",3:"title.function"},contains:[_]},{variants:[{match:[/\bclass/,/\s+/,i,/\s*/,/\(\s*/,i,/\s*\)/]},{match:[/\bclass/,/\s+/,i]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[w,_,g]}]}}function Kz(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Gz(e){const t=e.regex,i=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=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]?/),l=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:i,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:i},{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:[l,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[i,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:l},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Yz(e){const t=e.regex,i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),l=t.concat(r,/(::\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:">"},h=[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]})]}]},v="[1-9](_?[0-9])*|0",x="[0-9](_?[0-9])*",S={className:"number",relevance:0,variants:[{begin:`\\b(${v})(\\.(${x}))?([eE][+-]?(${x})|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}]},T=[g,{variants:[{match:[/class\s+/,l,/\s+<\s+/,l]},{match:[/\b(class|module)\s+/,l]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,l],scope:{2:"title.class"},keywords:c},{relevance:0,match:[l,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,i],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:i}],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,h),relevance:0}].concat(d,h);y.contains=T,w.contains=T;const L=[{begin:/^\s*=>/,starts:{end:"$",contains:T}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:T}}];return h.unshift(d),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(L).concat(h).concat(T)}}function Qz(e){const t=e.regex,i=/(r#)?/,r=t.concat(i,e.UNDERSCORE_IDENT_RE),l=t.concat(i,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,l,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"],h=["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:h},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+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:h,type:y}},{className:"punctuation",begin:"->"},o]}}const Vz=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_-]*/}}),Xz=["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"],Zz=["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"],Wz=[...Xz,...Zz],Jz=["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(),e4=["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(),t4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),n4=["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 i4(e){const t=Vz(e),i=t4,r=e4,l="@[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("+Wz.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+i.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+n4.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:l,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:Jz.join(" ")},contains:[{begin:l,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 a4(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function r4(e){const t=e.regex,i=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},l={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"],h=["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"],v=["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"],x=y,S=[...h,...d].filter($=>!y.includes($)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},k={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...x),/\s*\(/),relevance:0,keywords:{built_in:x}};function R($){return t.concat(/\b/,t.either(...$.map(T=>T.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:R(v),relevance:0};function I($,{exceptions:T,when:P}={}){const z=P;return T=T||[],$.map(Z=>Z.match(/\|\d+$/)||T.includes(Z)?Z:z(Z)?`${Z}|0`:Z)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:I(S,{when:$=>$.length<3}),literal:o,type:f,built_in:g},contains:[{scope:"type",match:R(c)},A,_,w,r,l,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,i,k]}}function vw(e){return e?typeof e=="string"?e:e.source:null}function Qo(e){return mt("(?=",e,")")}function mt(...e){return e.map(i=>vw(i)).join("")}function s4(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function wn(...e){return"("+(s4(e).capture?"":"?:")+e.map(r=>vw(r)).join("|")+")"}const kg=e=>mt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),l4=["Protocol","Type"].map(kg),H0=["init","self"].map(kg),o4=["Any","Self"],Ip=["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"],K0=["false","nil","true"],c4=["assignment","associativity","higherThan","left","lowerThan","none","right"],u4=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],G0=["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"],Ew=wn(/[/=\-+!*%<>&|^~?]/,/[\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]/),Sw=wn(Ew,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),zp=mt(Ew,Sw,"*"),ww=wn(/[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]/),Cf=wn(ww,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),qi=mt(ww,Cf,"*"),rf=mt(/[A-Z]/,Cf,"*"),f4=["attached","autoclosure",mt(/convention\(/,wn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",mt(/objc\(/,qi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],d4=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function h4(e){const t={match:/\s+/,relevance:0},i=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,i],l={match:[/\./,wn(...l4,...H0)],className:{2:"keyword"}},o={match:mt(/\./,wn(...Ip)),relevance:0},c=Ip.filter(Xe=>typeof Xe=="string").concat(["_|0"]),f=Ip.filter(Xe=>typeof Xe!="string").concat(o4).map(kg),d={variants:[{className:"keyword",match:wn(...f,...H0)}]},h={$pattern:wn(/\b\w+/,/#\w+/),keyword:c.concat(u4),literal:K0},y=[l,o,d],g={match:mt(/\./,wn(...G0)),relevance:0},v={className:"built_in",match:mt(/\b/,wn(...G0),/(?=\()/)},x=[g,v],S={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:zp},{match:`\\.(\\.|${Sw})+`}]},k=[S,w],_="([0-9]_*)+",R="([0-9a-fA-F]_*)+",A={className:"number",relevance:0,variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{match:`\\b0x(${R})(\\.(${R}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},I=(Xe="")=>({className:"subst",variants:[{match:mt(/\\/,Xe,/[0\\tnr"']/)},{match:mt(/\\/,Xe,/u\{[0-9a-fA-F]{1,8}\}/)}]}),$=(Xe="")=>({className:"subst",match:mt(/\\/,Xe,/[\t ]*(?:[\r\n]|\r\n)/)}),T=(Xe="")=>({className:"subst",label:"interpol",begin:mt(/\\/,Xe,/\(/),end:/\)/}),P=(Xe="")=>({begin:mt(Xe,/"""/),end:mt(/"""/,Xe),contains:[I(Xe),$(Xe),T(Xe)]}),z=(Xe="")=>({begin:mt(Xe,/"/),end:mt(/"/,Xe),contains:[I(Xe),T(Xe)]}),Z={className:"string",variants:[P(),P("#"),P("##"),P("###"),z(),z("#"),z("##"),z("###")]},L=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],K={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},X=Xe=>{const _i=mt(Xe,/\//),li=mt(/\//,Xe);return{begin:_i,end:li,contains:[...L,{scope:"comment",begin:`#(?!.*${li})`,end:/$/}]}},oe={scope:"regexp",variants:[X("###"),X("##"),X("#"),K]},se={match:mt(/`/,qi,/`/)},ee={className:"variable",match:/\$\d+/},H={className:"variable",match:`\\$${Cf}+`},le=[se,ee,H],V={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:d4,contains:[...k,A,Z]}]}},me={scope:"keyword",match:mt(/@/,wn(...f4),Qo(wn(/\(/,/\s+/)))},O={scope:"meta",match:mt(/@/,qi)},D=[V,me,O],J={match:Qo(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:mt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Cf,"+")},{className:"type",match:rf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:mt(/\s+&\s+/,Qo(rf)),relevance:0}]},C={begin:/</,end:/>/,keywords:h,contains:[...r,...y,...D,S,J]};J.contains.push(C);const he={match:mt(qi,/\s*:/),keywords:"_|0",relevance:0},ke={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",he,...r,oe,...y,...x,...k,A,Z,...le,...D,J]},ve={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,J]},Pe={begin:wn(Qo(mt(qi,/\s*:/)),Qo(mt(qi,/\s+/,qi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:qi}]},st={begin:/\(/,end:/\)/,keywords:h,contains:[Pe,...r,...y,...k,A,Z,...D,J,ke],endsParent:!0,illegal:/["']/},it={match:[/(func|macro)/,/\s+/,wn(se.match,qi,zp)],className:{1:"keyword",3:"title.function"},contains:[ve,st,t],illegal:[/\[/,/%/]},Zt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ve,st,t],illegal:/\[|%/},$n={match:[/operator/,/\s+/,zp],className:{1:"keyword",3:"title"}},Zi={begin:[/precedencegroup/,/\s+/,rf],className:{1:"keyword",3:"title"},contains:[J],keywords:[...c4,...K0],end:/}/},Oa={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},qn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},ji={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,qi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:h,contains:[ve,...y,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:rf},...y],relevance:0}]};for(const Xe of Z.variants){const _i=Xe.contains.find(Ii=>Ii.label==="interpol");_i.keywords=h;const li=[...y,...x,...k,A,Z,...le];_i.contains=[...li,{begin:/\(/,end:/\)/,contains:["self",...li]}]}return{name:"Swift",keywords:h,contains:[...r,it,Zt,Oa,qn,ji,$n,Zi,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},oe,...y,...x,...k,A,Z,...le,...D,J,ke]}}const Af="[A-Za-z$_][0-9A-Za-z$_]*",_w=["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"],kw=["true","false","null","undefined","NaN","Infinity"],Nw=["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"],Tw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Cw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Aw=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Ow=[].concat(Cw,Nw,Tw);function p4(e){const t=e.regex,i=(V,{after:me})=>{const O="</"+V[0].slice(1);return V.input.indexOf(O,me)!==-1},r=Af,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,me)=>{const O=V[0].length+V.index,D=V.input[O];if(D==="<"||D===","){me.ignoreMatch();return}D===">"&&(i(V,{after:O})||me.ignoreMatch());let J;const C=V.input.substring(O);if(J=C.match(/^\s*=/)){me.ignoreMatch();return}if((J=C.match(/^\s+extends\s+/))&&J.index===0){me.ignoreMatch();return}}},f={$pattern:Af,keyword:_w,literal:kw,built_in:Ow,"variable.language":Aw},d="[0-9](_?[0-9])*",h=`\\.(${d})`,y="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${y})((${h})|\\.)?|(${h}))[eE][+-]?(${d})\\b`},{begin:`\\b(${y})\\b((${h})\\b|\\.)?|(${h})\\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},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},R={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:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,S,w,k,{match:/\$\d+/},g];v.contains=A.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(A)});const I=[].concat(R,v.contains),$=I.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(I)}]),T={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},P={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},z={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:{_:[...Nw,...Tw]}},Z={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[T],illegal:/%/},K={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function X(V){return t.concat("(?!",V.join("|"),")")}const oe={match:t.concat(/\b/,X([...Cw,"super","import"].map(V=>`${V}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},se={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ee={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},T]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",le={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[T]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:z},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),Z,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,S,w,k,R,{match:/\$\d+/},g,z,{scope:"attr",match:r+t.lookahead(":"),relevance:0},le,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[R,e.REGEXP_MODE,{className:"function",begin:H,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:$}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.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"]}]}]},L,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[T,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},se,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[T]},oe,K,P,ee,{match:/\$[(.]/}]}}function m4(e){const t=e.regex,i=p4(e),r=Af,l=["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:l},contains:[i.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"],h={$pattern:Af,keyword:_w.concat(d),literal:kw,built_in:Ow.concat(l),"variable.language":Aw},y={className:"meta",begin:"@"+r},g=(w,k,_)=>{const R=w.contains.findIndex(A=>A.label===k);if(R===-1)throw new Error("can not find mode to replace");w.contains.splice(R,1,_)};Object.assign(i.keywords,h),i.exports.PARAMS_CONTAINS.push(y);const v=i.contains.find(w=>w.scope==="attr"),x=Object.assign({},v,{match:t.concat(r,t.lookahead(/\s*\?:/))});i.exports.PARAMS_CONTAINS.push([i.exports.CLASS_REFERENCE,v,x]),i.contains=i.contains.concat([y,o,c,x]),g(i,"shebang",e.SHEBANG()),g(i,"use_strict",f);const S=i.contains.find(w=>w.label==="func.def");return S.relevance=0,Object.assign(i,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),i}function g4(e){const t=e.regex,i={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},l=/\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,l),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,l),/ +/,t.either(c,f),/ *#/)}]},h={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:/>/}]}),v=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:[i,r,d,h,y,g,v,{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:[v]}]}}function b4(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const i=e.COMMENT(/;;/,/$/),r=["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"],l={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"},h={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:r},contains:[i,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,c,l,e.QUOTE_STRING_MODE,d,h,f]}}function y4(e){const t=e.regex,i=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,l={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"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[l]},{begin:/'/,end:/'/,contains:[l]},{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},l,{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:[h],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[h],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(i,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:i,relevance:0,starts:h}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(i,/>/))),contains:[{className:"name",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function x4(e){const t="true false yes no null",i="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},l={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,l]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),v={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"},x={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},S={begin:/\{/,end:/\}/,contains:[x],illegal:"\\n",relevance:0},w={begin:"\\[",end:"\\]",contains:[x],illegal:"\\n",relevance:0},k=[r,{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+!"+i},{className:"type",begin:"!<"+i+">"},{className:"type",begin:"!"+i},{className:"type",begin:"!!"+i},{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}},v,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},S,w,o,c],_=[...k];return _.pop(),_.push(f),x.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}const v4={arduino:tz,bash:nz,c:iz,cpp:az,csharp:rz,css:pz,diff:mz,go:gz,graphql:bz,ini:yz,java:xz,javascript:_z,json:kz,kotlin:Tz,less:jz,lua:Iz,makefile:zz,markdown:Bz,objectivec:Uz,perl:Fz,php:Pz,"php-template":$z,plaintext:qz,python:Hz,"python-repl":Kz,r:Gz,ruby:Yz,rust:Qz,scss:i4,shell:a4,sql:r4,swift:h4,typescript:m4,vbnet:g4,wasm:b4,xml:y4,yaml:x4};var Bp,Y0;function E4(){if(Y0)return Bp;Y0=1;function e(U){return U instanceof Map?U.clear=U.delete=U.set=function(){throw new Error("map is read-only")}:U instanceof Set&&(U.add=U.clear=U.delete=function(){throw new Error("set is read-only")}),Object.freeze(U),Object.getOwnPropertyNames(U).forEach(ie=>{const pe=U[ie],Me=typeof pe;(Me==="object"||Me==="function")&&!Object.isFrozen(pe)&&e(pe)}),U}class t{constructor(ie){ie.data===void 0&&(ie.data={}),this.data=ie.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(U){return U.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(U,...ie){const pe=Object.create(null);for(const Me in U)pe[Me]=U[Me];return ie.forEach(function(Me){for(const wt in Me)pe[wt]=Me[wt]}),pe}const l="</span>",o=U=>!!U.scope,c=(U,{prefix:ie})=>{if(U.startsWith("language:"))return U.replace("language:","language-");if(U.includes(".")){const pe=U.split(".");return[`${ie}${pe.shift()}`,...pe.map((Me,wt)=>`${Me}${"_".repeat(wt+1)}`)].join(" ")}return`${ie}${U}`};class f{constructor(ie,pe){this.buffer="",this.classPrefix=pe.classPrefix,ie.walk(this)}addText(ie){this.buffer+=i(ie)}openNode(ie){if(!o(ie))return;const pe=c(ie.scope,{prefix:this.classPrefix});this.span(pe)}closeNode(ie){o(ie)&&(this.buffer+=l)}value(){return this.buffer}span(ie){this.buffer+=`<span class="${ie}">`}}const d=(U={})=>{const ie={children:[]};return Object.assign(ie,U),ie};class h{constructor(){this.rootNode=d(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ie){this.top.children.push(ie)}openNode(ie){const pe=d({scope:ie});this.add(pe),this.stack.push(pe)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ie){return this.constructor._walk(ie,this.rootNode)}static _walk(ie,pe){return typeof pe=="string"?ie.addText(pe):pe.children&&(ie.openNode(pe),pe.children.forEach(Me=>this._walk(ie,Me)),ie.closeNode(pe)),ie}static _collapse(ie){typeof ie!="string"&&ie.children&&(ie.children.every(pe=>typeof pe=="string")?ie.children=[ie.children.join("")]:ie.children.forEach(pe=>{h._collapse(pe)}))}}class y extends h{constructor(ie){super(),this.options=ie}addText(ie){ie!==""&&this.add(ie)}startScope(ie){this.openNode(ie)}endScope(){this.closeNode()}__addSublanguage(ie,pe){const Me=ie.root;pe&&(Me.scope=`language:${pe}`),this.add(Me)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(U){return U?typeof U=="string"?U:U.source:null}function v(U){return w("(?=",U,")")}function x(U){return w("(?:",U,")*")}function S(U){return w("(?:",U,")?")}function w(...U){return U.map(pe=>g(pe)).join("")}function k(U){const ie=U[U.length-1];return typeof ie=="object"&&ie.constructor===Object?(U.splice(U.length-1,1),ie):{}}function _(...U){return"("+(k(U).capture?"":"?:")+U.map(Me=>g(Me)).join("|")+")"}function R(U){return new RegExp(U.toString()+"|").exec("").length-1}function A(U,ie){const pe=U&&U.exec(ie);return pe&&pe.index===0}const I=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $(U,{joinWith:ie}){let pe=0;return U.map(Me=>{pe+=1;const wt=pe;let gt=g(Me),xe="";for(;gt.length>0;){const be=I.exec(gt);if(!be){xe+=gt;break}xe+=gt.substring(0,be.index),gt=gt.substring(be.index+be[0].length),be[0][0]==="\\"&&be[1]?xe+="\\"+String(Number(be[1])+wt):(xe+=be[0],be[0]==="("&&pe++)}return xe}).map(Me=>`(${Me})`).join(ie)}const T=/\b\B/,P="[a-zA-Z]\\w*",z="[a-zA-Z_]\\w*",Z="\\b\\d+(\\.\\d+)?",L="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",K="\\b(0b[01]+)",X="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",oe=(U={})=>{const ie=/^#![ ]*\//;return U.binary&&(U.begin=w(ie,/.*\b/,U.binary,/\b.*/)),r({scope:"meta",begin:ie,end:/$/,relevance:0,"on:begin":(pe,Me)=>{pe.index!==0&&Me.ignoreMatch()}},U)},se={begin:"\\\\[\\s\\S]",relevance:0},ee={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[se]},H={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[se]},le={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/},V=function(U,ie,pe={}){const Me=r({scope:"comment",begin:U,end:ie,contains:[]},pe);Me.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 Me.contains.push({begin:w(/[ ]+/,"(",wt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Me},me=V("//","$"),O=V("/\\*","\\*/"),D=V("#","$"),J={scope:"number",begin:Z,relevance:0},C={scope:"number",begin:L,relevance:0},he={scope:"number",begin:K,relevance:0},ke={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[se,{begin:/\[/,end:/\]/,relevance:0,contains:[se]}]},ve={scope:"title",begin:P,relevance:0},Pe={scope:"title",begin:z,relevance:0},st={begin:"\\.\\s*"+z,relevance:0};var Zt=Object.freeze({__proto__:null,APOS_STRING_MODE:ee,BACKSLASH_ESCAPE:se,BINARY_NUMBER_MODE:he,BINARY_NUMBER_RE:K,COMMENT:V,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:me,C_NUMBER_MODE:C,C_NUMBER_RE:L,END_SAME_AS_BEGIN:function(U){return Object.assign(U,{"on:begin":(ie,pe)=>{pe.data._beginMatch=ie[1]},"on:end":(ie,pe)=>{pe.data._beginMatch!==ie[1]&&pe.ignoreMatch()}})},HASH_COMMENT_MODE:D,IDENT_RE:P,MATCH_NOTHING_RE:T,METHOD_GUARD:st,NUMBER_MODE:J,NUMBER_RE:Z,PHRASAL_WORDS_MODE:le,QUOTE_STRING_MODE:H,REGEXP_MODE:ke,RE_STARTERS_RE:X,SHEBANG:oe,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:z,UNDERSCORE_TITLE_MODE:Pe});function $n(U,ie){U.input[U.index-1]==="."&&ie.ignoreMatch()}function Zi(U,ie){U.className!==void 0&&(U.scope=U.className,delete U.className)}function Oa(U,ie){ie&&U.beginKeywords&&(U.begin="\\b("+U.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",U.__beforeBegin=$n,U.keywords=U.keywords||U.beginKeywords,delete U.beginKeywords,U.relevance===void 0&&(U.relevance=0))}function qn(U,ie){Array.isArray(U.illegal)&&(U.illegal=_(...U.illegal))}function ji(U,ie){if(U.match){if(U.begin||U.end)throw new Error("begin & end are not supported with match");U.begin=U.match,delete U.match}}function Xe(U,ie){U.relevance===void 0&&(U.relevance=1)}const _i=(U,ie)=>{if(!U.beforeMatch)return;if(U.starts)throw new Error("beforeMatch cannot be used with starts");const pe=Object.assign({},U);Object.keys(U).forEach(Me=>{delete U[Me]}),U.keywords=pe.keywords,U.begin=w(pe.beforeMatch,v(pe.begin)),U.starts={relevance:0,contains:[Object.assign(pe,{endsParent:!0})]},U.relevance=0,delete pe.beforeMatch},li=["of","and","for","in","not","or","if","then","parent","list","value"],Ii="keyword";function Wi(U,ie,pe=Ii){const Me=Object.create(null);return typeof U=="string"?wt(pe,U.split(" ")):Array.isArray(U)?wt(pe,U):Object.keys(U).forEach(function(gt){Object.assign(Me,Wi(U[gt],ie,gt))}),Me;function wt(gt,xe){ie&&(xe=xe.map(be=>be.toLowerCase())),xe.forEach(function(be){const Re=be.split("|");Me[Re[0]]=[gt,kr(Re[0],Re[1])]})}}function kr(U,ie){return ie?Number(ie):Kl(U)?0:1}function Kl(U){return li.includes(U.toLowerCase())}const bs={},Ot=U=>{console.error(U)},ys=(U,...ie)=>{console.log(`WARN: ${U}`,...ie)},te=(U,ie)=>{bs[`${U}/${ie}`]||(console.log(`Deprecated as of ${U}. ${ie}`),bs[`${U}/${ie}`]=!0)},fe=new Error;function Ce(U,ie,{key:pe}){let Me=0;const wt=U[pe],gt={},xe={};for(let be=1;be<=ie.length;be++)xe[be+Me]=wt[be],gt[be+Me]=!0,Me+=R(ie[be-1]);U[pe]=xe,U[pe]._emit=gt,U[pe]._multi=!0}function $e(U){if(Array.isArray(U.begin)){if(U.skip||U.excludeBegin||U.returnBegin)throw Ot("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),fe;if(typeof U.beginScope!="object"||U.beginScope===null)throw Ot("beginScope must be object"),fe;Ce(U,U.begin,{key:"beginScope"}),U.begin=$(U.begin,{joinWith:""})}}function et(U){if(Array.isArray(U.end)){if(U.skip||U.excludeEnd||U.returnEnd)throw Ot("skip, excludeEnd, returnEnd not compatible with endScope: {}"),fe;if(typeof U.endScope!="object"||U.endScope===null)throw Ot("endScope must be object"),fe;Ce(U,U.end,{key:"endScope"}),U.end=$(U.end,{joinWith:""})}}function yn(U){U.scope&&typeof U.scope=="object"&&U.scope!==null&&(U.beginScope=U.scope,delete U.scope)}function ki(U){yn(U),typeof U.beginScope=="string"&&(U.beginScope={_wrap:U.beginScope}),typeof U.endScope=="string"&&(U.endScope={_wrap:U.endScope}),$e(U),et(U)}function nn(U){function ie(xe,be){return new RegExp(g(xe),"m"+(U.case_insensitive?"i":"")+(U.unicodeRegex?"u":"")+(be?"g":""))}class pe{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(be,Re){Re.position=this.position++,this.matchIndexes[this.matchAt]=Re,this.regexes.push([Re,be]),this.matchAt+=R(be)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const be=this.regexes.map(Re=>Re[1]);this.matcherRe=ie($(be,{joinWith:"|"}),!0),this.lastIndex=0}exec(be){this.matcherRe.lastIndex=this.lastIndex;const Re=this.matcherRe.exec(be);if(!Re)return null;const Bt=Re.findIndex((Ji,vs)=>vs>0&&Ji!==void 0),Nt=this.matchIndexes[Bt];return Re.splice(0,Bt),Object.assign(Re,Nt)}}class Me{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(be){if(this.multiRegexes[be])return this.multiRegexes[be];const Re=new pe;return this.rules.slice(be).forEach(([Bt,Nt])=>Re.addRule(Bt,Nt)),Re.compile(),this.multiRegexes[be]=Re,Re}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(be,Re){this.rules.push([be,Re]),Re.type==="begin"&&this.count++}exec(be){const Re=this.getMatcher(this.regexIndex);Re.lastIndex=this.lastIndex;let Bt=Re.exec(be);if(this.resumingScanAtSamePosition()&&!(Bt&&Bt.index===this.lastIndex)){const Nt=this.getMatcher(0);Nt.lastIndex=this.lastIndex+1,Bt=Nt.exec(be)}return Bt&&(this.regexIndex+=Bt.position+1,this.regexIndex===this.count&&this.considerAll()),Bt}}function wt(xe){const be=new Me;return xe.contains.forEach(Re=>be.addRule(Re.begin,{rule:Re,type:"begin"})),xe.terminatorEnd&&be.addRule(xe.terminatorEnd,{type:"end"}),xe.illegal&&be.addRule(xe.illegal,{type:"illegal"}),be}function gt(xe,be){const Re=xe;if(xe.isCompiled)return Re;[Zi,ji,ki,_i].forEach(Nt=>Nt(xe,be)),U.compilerExtensions.forEach(Nt=>Nt(xe,be)),xe.__beforeBegin=null,[Oa,qn,Xe].forEach(Nt=>Nt(xe,be)),xe.isCompiled=!0;let Bt=null;return typeof xe.keywords=="object"&&xe.keywords.$pattern&&(xe.keywords=Object.assign({},xe.keywords),Bt=xe.keywords.$pattern,delete xe.keywords.$pattern),Bt=Bt||/\w+/,xe.keywords&&(xe.keywords=Wi(xe.keywords,U.case_insensitive)),Re.keywordPatternRe=ie(Bt,!0),be&&(xe.begin||(xe.begin=/\B|\b/),Re.beginRe=ie(Re.begin),!xe.end&&!xe.endsWithParent&&(xe.end=/\B|\b/),xe.end&&(Re.endRe=ie(Re.end)),Re.terminatorEnd=g(Re.end)||"",xe.endsWithParent&&be.terminatorEnd&&(Re.terminatorEnd+=(xe.end?"|":"")+be.terminatorEnd)),xe.illegal&&(Re.illegalRe=ie(xe.illegal)),xe.contains||(xe.contains=[]),xe.contains=[].concat(...xe.contains.map(function(Nt){return un(Nt==="self"?xe:Nt)})),xe.contains.forEach(function(Nt){gt(Nt,Re)}),xe.starts&&gt(xe.starts,be),Re.matcher=wt(Re),Re}if(U.compilerExtensions||(U.compilerExtensions=[]),U.contains&&U.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return U.classNameAliases=r(U.classNameAliases||{}),gt(U)}function Lt(U){return U?U.endsWithParent||Lt(U.starts):!1}function un(U){return U.variants&&!U.cachedVariants&&(U.cachedVariants=U.variants.map(function(ie){return r(U,{variants:null},ie)})),U.cachedVariants?U.cachedVariants:Lt(U)?r(U,{starts:U.starts?r(U.starts):null}):Object.isFrozen(U)?r(U):U}var lt="11.11.1";class zi extends Error{constructor(ie,pe){super(ie),this.name="HTMLInjectionError",this.html=pe}}const xn=i,kc=r,Nr=Symbol("nomatch"),xs=7,Tr=function(U){const ie=Object.create(null),pe=Object.create(null),Me=[];let wt=!0;const gt="Could not find the language '{}', did you forget to load/include a language module?",xe={disableAutodetect:!0,name:"Plain text",contains:[]};let be={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:y};function Re(ce){return be.noHighlightRe.test(ce)}function Bt(ce){let we=ce.className+" ";we+=ce.parentNode?ce.parentNode.className:"";const qe=be.languageDetectRe.exec(we);if(qe){const ot=vn(qe[1]);return ot||(ys(gt.replace("{}",qe[1])),ys("Falling back to no-highlight mode for this block.",ce)),ot?qe[1]:"no-highlight"}return we.split(/\s+/).find(ot=>Re(ot)||vn(ot))}function Nt(ce,we,qe){let ot="",Ft="";typeof we=="object"?(ot=ce,qe=we.ignoreIllegals,Ft=we.language):(te("10.7.0","highlight(lang, code, ...args) has been deprecated."),te("10.7.0",`Please use highlight(code, options) instead.
485
+ https://github.com/highlightjs/highlight.js/issues/2277`),Ft=ce,ot=we),qe===void 0&&(qe=!0);const dn={code:ot,language:Ft};Ar("before:highlight",dn);const Hn=dn.result?dn.result:Ji(dn.language,dn.code,qe);return Hn.code=dn.code,Ar("after:highlight",Hn),Hn}function Ji(ce,we,qe,ot){const Ft=Object.create(null);function dn(de,Ee){return de.keywords[Ee]}function Hn(){if(!Oe.keywords){Kt.addText(ct);return}let de=0;Oe.keywordPatternRe.lastIndex=0;let Ee=Oe.keywordPatternRe.exec(ct),Ie="";for(;Ee;){Ie+=ct.substring(de,Ee.index);const Ye=an.case_insensitive?Ee[0].toLowerCase():Ee[0],Rt=dn(Oe,Ye);if(Rt){const[oi,Zl]=Rt;if(Kt.addText(Ie),Ie="",Ft[Ye]=(Ft[Ye]||0)+1,Ft[Ye]<=xs&&(La+=Zl),oi.startsWith("_"))Ie+=Ee[0];else{const Mc=an.classNameAliases[oi]||oi;Kn(Ee[0],Mc)}}else Ie+=Ee[0];de=Oe.keywordPatternRe.lastIndex,Ee=Oe.keywordPatternRe.exec(ct)}Ie+=ct.substring(de),Kt.addText(Ie)}function Cn(){if(ct==="")return;let de=null;if(typeof Oe.subLanguage=="string"){if(!ie[Oe.subLanguage]){Kt.addText(ct);return}de=Ji(Oe.subLanguage,ct,!0,Rc[Oe.subLanguage]),Rc[Oe.subLanguage]=de._top}else de=Es(ct,Oe.subLanguage.length?Oe.subLanguage:null);Oe.relevance>0&&(La+=de.relevance),Kt.__addSublanguage(de._emitter,de.language)}function vt(){Oe.subLanguage!=null?Cn():Hn(),ct=""}function Kn(de,Ee){de!==""&&(Kt.startScope(Ee),Kt.addText(de),Kt.endScope())}function Ac(de,Ee){let Ie=1;const Ye=Ee.length-1;for(;Ie<=Ye;){if(!de._emit[Ie]){Ie++;continue}const Rt=an.classNameAliases[de[Ie]]||de[Ie],oi=Ee[Ie];Rt?Kn(oi,Rt):(ct=oi,Hn(),ct=""),Ie++}}function ws(de,Ee){return de.scope&&typeof de.scope=="string"&&Kt.openNode(an.classNameAliases[de.scope]||de.scope),de.beginScope&&(de.beginScope._wrap?(Kn(ct,an.classNameAliases[de.beginScope._wrap]||de.beginScope._wrap),ct=""):de.beginScope._multi&&(Ac(de.beginScope,Ee),ct="")),Oe=Object.create(de,{parent:{value:Oe}}),Oe}function Ql(de,Ee,Ie){let Ye=A(de.endRe,Ie);if(Ye){if(de["on:end"]){const Rt=new t(de);de["on:end"](Ee,Rt),Rt.isMatchIgnored&&(Ye=!1)}if(Ye){for(;de.endsParent&&de.parent;)de=de.parent;return de}}if(de.endsWithParent)return Ql(de.parent,Ee,Ie)}function _s(de){return Oe.matcher.regexIndex===0?(ct+=de[0],1):(ja=!0,0)}function Jf(de){const Ee=de[0],Ie=de.rule,Ye=new t(Ie),Rt=[Ie.__beforeBegin,Ie["on:begin"]];for(const oi of Rt)if(oi&&(oi(de,Ye),Ye.isMatchIgnored))return _s(Ee);return Ie.skip?ct+=Ee:(Ie.excludeBegin&&(ct+=Ee),vt(),!Ie.returnBegin&&!Ie.excludeBegin&&(ct=Ee)),ws(Ie,de),Ie.returnBegin?0:Ee.length}function An(de){const Ee=de[0],Ie=we.substring(de.index),Ye=Ql(Oe,de,Ie);if(!Ye)return Nr;const Rt=Oe;Oe.endScope&&Oe.endScope._wrap?(vt(),Kn(Ee,Oe.endScope._wrap)):Oe.endScope&&Oe.endScope._multi?(vt(),Ac(Oe.endScope,de)):Rt.skip?ct+=Ee:(Rt.returnEnd||Rt.excludeEnd||(ct+=Ee),vt(),Rt.excludeEnd&&(ct=Ee));do Oe.scope&&Kt.closeNode(),!Oe.skip&&!Oe.subLanguage&&(La+=Oe.relevance),Oe=Oe.parent;while(Oe!==Ye.parent);return Ye.starts&&ws(Ye.starts,de),Rt.returnEnd?0:Ee.length}function Vl(){const de=[];for(let Ee=Oe;Ee!==an;Ee=Ee.parent)Ee.scope&&de.unshift(Ee.scope);de.forEach(Ee=>Kt.openNode(Ee))}let Or={};function ks(de,Ee){const Ie=Ee&&Ee[0];if(ct+=de,Ie==null)return vt(),0;if(Or.type==="begin"&&Ee.type==="end"&&Or.index===Ee.index&&Ie===""){if(ct+=we.slice(Ee.index,Ee.index+1),!wt){const Ye=new Error(`0 width match regex (${ce})`);throw Ye.languageName=ce,Ye.badRule=Or.rule,Ye}return 1}if(Or=Ee,Ee.type==="begin")return Jf(Ee);if(Ee.type==="illegal"&&!qe){const Ye=new Error('Illegal lexeme "'+Ie+'" for mode "'+(Oe.scope||"<unnamed>")+'"');throw Ye.mode=Oe,Ye}else if(Ee.type==="end"){const Ye=An(Ee);if(Ye!==Nr)return Ye}if(Ee.type==="illegal"&&Ie==="")return ct+=`
486
+ `,1;if(Xl>1e5&&Xl>Ee.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ct+=Ie,Ie.length}const an=vn(ce);if(!an)throw Ot(gt.replace("{}",ce)),new Error('Unknown language: "'+ce+'"');const Oc=nn(an);let Ns="",Oe=ot||Oc;const Rc={},Kt=new be.__emitter(be);Vl();let ct="",La=0,na=0,Xl=0,ja=!1;try{if(an.__emitTokens)an.__emitTokens(we,Kt);else{for(Oe.matcher.considerAll();;){Xl++,ja?ja=!1:Oe.matcher.considerAll(),Oe.matcher.lastIndex=na;const de=Oe.matcher.exec(we);if(!de)break;const Ee=we.substring(na,de.index),Ie=ks(Ee,de);na=de.index+Ie}ks(we.substring(na))}return Kt.finalize(),Ns=Kt.toHTML(),{language:ce,value:Ns,relevance:La,illegal:!1,_emitter:Kt,_top:Oe}}catch(de){if(de.message&&de.message.includes("Illegal"))return{language:ce,value:xn(we),illegal:!0,relevance:0,_illegalBy:{message:de.message,index:na,context:we.slice(na-100,na+100),mode:de.mode,resultSoFar:Ns},_emitter:Kt};if(wt)return{language:ce,value:xn(we),illegal:!1,relevance:0,errorRaised:de,_emitter:Kt,_top:Oe};throw de}}function vs(ce){const we={value:xn(ce),illegal:!1,relevance:0,_top:xe,_emitter:new be.__emitter(be)};return we._emitter.addText(ce),we}function Es(ce,we){we=we||be.languages||Object.keys(ie);const qe=vs(ce),ot=we.filter(vn).filter(Ma).map(vt=>Ji(vt,ce,!1));ot.unshift(qe);const Ft=ot.sort((vt,Kn)=>{if(vt.relevance!==Kn.relevance)return Kn.relevance-vt.relevance;if(vt.language&&Kn.language){if(vn(vt.language).supersetOf===Kn.language)return 1;if(vn(Kn.language).supersetOf===vt.language)return-1}return 0}),[dn,Hn]=Ft,Cn=dn;return Cn.secondBest=Hn,Cn}function Bi(ce,we,qe){const ot=we&&pe[we]||qe;ce.classList.add("hljs"),ce.classList.add(`language-${ot}`)}function Ut(ce){let we=null;const qe=Bt(ce);if(Re(qe))return;if(Ar("before:highlightElement",{el:ce,language:qe}),ce.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ce);return}if(ce.children.length>0&&(be.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(ce)),be.throwUnescapedHTML))throw new zi("One of your code blocks includes unescaped HTML.",ce.innerHTML);we=ce;const ot=we.textContent,Ft=qe?Nt(ot,{language:qe,ignoreIllegals:!0}):Es(ot);ce.innerHTML=Ft.value,ce.dataset.highlighted="yes",Bi(ce,qe,Ft.language),ce.result={language:Ft.language,re:Ft.relevance,relevance:Ft.relevance},Ft.secondBest&&(ce.secondBest={language:Ft.secondBest.language,relevance:Ft.secondBest.relevance}),Ar("after:highlightElement",{el:ce,result:Ft,text:ot})}function fn(ce){be=kc(be,ce)}const Ra=()=>{Ss(),te("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Gl(){Ss(),te("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Nc=!1;function Ss(){function ce(){Ss()}if(document.readyState==="loading"){Nc||window.addEventListener("DOMContentLoaded",ce,!1),Nc=!0;return}document.querySelectorAll(be.cssSelector).forEach(Ut)}function Tc(ce,we){let qe=null;try{qe=we(U)}catch(ot){if(Ot("Language definition for '{}' could not be registered.".replace("{}",ce)),wt)Ot(ot);else throw ot;qe=xe}qe.name||(qe.name=ce),ie[ce]=qe,qe.rawDefinition=we.bind(null,U),qe.aliases&&ea(qe.aliases,{languageName:ce})}function Cr(ce){delete ie[ce];for(const we of Object.keys(pe))pe[we]===ce&&delete pe[we]}function Yl(){return Object.keys(ie)}function vn(ce){return ce=(ce||"").toLowerCase(),ie[ce]||ie[pe[ce]]}function ea(ce,{languageName:we}){typeof ce=="string"&&(ce=[ce]),ce.forEach(qe=>{pe[qe.toLowerCase()]=we})}function Ma(ce){const we=vn(ce);return we&&!we.disableAutodetect}function Da(ce){ce["before:highlightBlock"]&&!ce["before:highlightElement"]&&(ce["before:highlightElement"]=we=>{ce["before:highlightBlock"](Object.assign({block:we.el},we))}),ce["after:highlightBlock"]&&!ce["after:highlightElement"]&&(ce["after:highlightElement"]=we=>{ce["after:highlightBlock"](Object.assign({block:we.el},we))})}function Ht(ce){Da(ce),Me.push(ce)}function Cc(ce){const we=Me.indexOf(ce);we!==-1&&Me.splice(we,1)}function Ar(ce,we){const qe=ce;Me.forEach(function(ot){ot[qe]&&ot[qe](we)})}function ta(ce){return te("10.7.0","highlightBlock will be removed entirely in v12.0"),te("10.7.0","Please use highlightElement now."),Ut(ce)}Object.assign(U,{highlight:Nt,highlightAuto:Es,highlightAll:Ss,highlightElement:Ut,highlightBlock:ta,configure:fn,initHighlighting:Ra,initHighlightingOnLoad:Gl,registerLanguage:Tc,unregisterLanguage:Cr,listLanguages:Yl,getLanguage:vn,registerAliases:ea,autoDetection:Ma,inherit:kc,addPlugin:Ht,removePlugin:Cc}),U.debugMode=function(){wt=!1},U.safeMode=function(){wt=!0},U.versionString=lt,U.regex={concat:w,lookahead:v,either:_,optional:S,anyNumberOfTimes:x};for(const ce in Zt)typeof Zt[ce]=="object"&&e(Zt[ce]);return Object.assign(U,Zt),U},Tn=Tr({});return Tn.newInstance=()=>Tr({}),Bp=Tn,Tn.HighlightJS=Tn,Tn.default=Tn,Bp}var S4=E4();const w4=Sm(S4),Q0={},_4="hljs-";function k4(e){const t=w4.newInstance();return e&&o(e),{highlight:i,highlightAuto:r,listLanguages:l,register:o,registerAlias:c,registered:f};function i(d,h,y){const g=y||Q0,v=typeof g.prefix=="string"?g.prefix:_4;if(!t.getLanguage(d))throw new Error("Unknown language: `"+d+"` is not registered");t.configure({__emitter:N4,classPrefix:v});const x=t.highlight(h,{ignoreIllegals:!0,language:d});if(x.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:x.errorRaised});const S=x._emitter.root,w=S.data;return w.language=x.language,w.relevance=x.relevance,S}function r(d,h){const g=(h||Q0).subset||l();let v=-1,x=0,S;for(;++v<g.length;){const w=g[v];if(!t.getLanguage(w))continue;const k=i(w,d,h);k.data&&k.data.relevance!==void 0&&k.data.relevance>x&&(x=k.data.relevance,S=k)}return S||{type:"root",children:[],data:{language:void 0,relevance:x}}}function l(){return t.listLanguages()}function o(d,h){if(typeof d=="string")t.registerLanguage(d,h);else{let y;for(y in d)Object.hasOwn(d,y)&&t.registerLanguage(y,d[y])}}function c(d,h){if(typeof d=="string")t.registerAliases(typeof h=="string"?h:[...h],{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 N4{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 i=this.stack[this.stack.length-1],r=i.children[i.children.length-1];r&&r.type==="text"?r.value+=t:i.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,i){const r=this.stack[this.stack.length-1],l=t.root.children;i?r.children.push({type:"element",tagName:"span",properties:{className:[i]},children:l}):r.children.push(...l)}openNode(t){const i=this,r=t.split(".").map(function(c,f){return f?c+"_".repeat(f):i.options.classPrefix+c}),l=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:r},children:[]};l.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const T4={};function Ng(e){const t=e||T4,i=t.aliases,r=t.detect||!1,l=t.languages||v4,o=t.plainText,c=t.prefix,f=t.subset;let d="hljs";const h=k4(l);if(i&&h.registerAlias(i),c){const y=c.indexOf("-");d=y===-1?c:c.slice(0,y)}return function(y,g){Wf(y,"element",function(v,x,S){if(v.tagName!=="code"||!S||S.type!=="element"||S.tagName!=="pre")return;const w=C4(v);if(w===!1||!w&&!r||w&&o&&o.includes(w))return;Array.isArray(v.properties.className)||(v.properties.className=[]),v.properties.className.includes(d)||v.properties.className.unshift(d);const k=Y3(v,{whitespace:"pre"});let _;try{_=w?h.highlight(w,k,{prefix:c}):h.highlightAuto(k,{prefix:c,subset:f})}catch(R){const A=R;if(w&&/Unknown language/.test(A.message)){g.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[S,v],cause:A,place:v.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw A}!w&&_.data&&_.data.language&&v.properties.className.push("language-"+_.data.language),_.children.length>0&&(v.children=_.children)})}}function C4(e){const t=e.properties.className;let i=-1;if(!Array.isArray(t))return;let r;for(;++i<t.length;){const l=String(t[i]);if(l==="no-highlight"||l==="nohighlight")return!1;!r&&l.slice(0,5)==="lang-"&&(r=l.slice(5)),!r&&l.slice(0,9)==="language-"&&(r=l.slice(9))}return r}function A4({name:e,projects:t,onClose:i,onChange:r}){const{confirm:l}=si(),{data:o,isLoading:c,isError:f,error:d,refetch:h}=St({queryKey:["skill",e],queryFn:()=>CO(e)});M.useEffect(()=>{const w=k=>{k.key==="Escape"&&i()};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[i]);const y=async w=>{await OO(e,w),h(),r()},g=async w=>{await l({title:`从 ${w} 移除 ${e}`,body:"skill 链接会被解除,项目后续运行时将无法使用该 skill。",confirm:"移除",danger:!0})&&(await RO(e,w),h(),r())},v=async w=>{await MO(e,w),h(),r()},x=async w=>{await l({title:`解冻 ${e} @ ${w}`,body:"本地对这个 skill 的改动会被覆盖,回到最新共享版本。",confirm:"解冻",danger:!0})&&(await DO(e,w),h(),r())},S=new Map(((o==null?void 0:o.linkedProjects)??[]).map(w=>[w.project,w.state]));return m.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",onClick:i,children:m.jsxs("div",{onClick:w=>w.stopPropagation(),className:"nb-card mt-8 w-full max-w-4xl",children:[m.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[m.jsxs("div",{children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),o&&m.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[o.category," · ",o.origin||"local"]})]}),m.jsx("button",{onClick:i,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:m.jsx(ds,{size:16,strokeWidth:3})})]}),c&&m.jsx("p",{children:"加载中…"}),f&&m.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",d instanceof Error?d.message:String(d)]}),o&&m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-3 uppercase tracking-wider",children:"项目链接状态"}),m.jsxs("div",{className:"flex flex-col gap-2",children:[t.map(w=>{const k=S.get(w);return m.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:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm",children:w}),k==="linked"&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),k==="frozen"&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!k&&m.jsx("span",{className:"nb-status",style:{background:"var(--color-idle-bg)",color:"var(--color-idle)"},children:"absent"})]}),m.jsxs("div",{className:"flex gap-2",children:[!k&&m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>y(w),type:"button",children:[m.jsx(JC,{size:11})," link"]}),k==="linked"&&m.jsxs(m.Fragment,{children:[m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>v(w),type:"button",children:[m.jsx(yA,{size:11})," freeze"]}),m.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>g(w),type:"button",children:"unlink"})]}),k==="frozen"&&m.jsxs(m.Fragment,{children:[m.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(w),type:"button",children:[m.jsx(jC,{size:11})," unfreeze"]}),m.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>g(w),type:"button",children:"unlink"})]})]})]},w)}),t.length===0&&m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"还没有任何项目。先去创建一个项目。"})]})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"SKILL.md 预览"}),m.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:o.body?m.jsx(xg,{remarkPlugins:[wg],rehypePlugins:[Ng],children:o.body}):m.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),o.references.length>0&&m.jsxs("div",{children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),m.jsx("ul",{className:"flex flex-col gap-2",children:o.references.map(w=>m.jsx(O4,{skillName:e,file:w.name,lines:w.lines},w.name))})]})]})]})})}function O4({skillName:e,file:t,lines:i}){const[r,l]=M.useState(!1),{data:o,isLoading:c,isError:f,error:d}=St({queryKey:["skill-ref",e,t],queryFn:()=>AO(e,t),enabled:r,staleTime:1/0});return m.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[m.jsxs("button",{type:"button",onClick:()=>l(h=>!h),"aria-label":`${r?"收起":"展开"} ${t}`,"aria-expanded":r,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:[m.jsx(qE,{size:12,strokeWidth:3,className:["transition-transform",r?"rotate-90":""].join(" ")}),m.jsx(Fm,{size:12,strokeWidth:2.5}),m.jsx("span",{className:"flex-1 text-left font-bold",children:t}),m.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[i," lines"]})]}),r&&m.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&&m.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"加载中…"}),f&&m.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["加载失败: ",d instanceof Error?d.message:String(d)]}),o&&m.jsx("div",{className:"prose-chat text-sm",children:m.jsx(xg,{remarkPlugins:[wg],rehypePlugins:[Ng],children:o.content})})]})]})}const R4=[{value:"all",label:"全部"},{value:"language",label:"language"},{value:"end",label:"end"},{value:"persona",label:"persona"},{value:"workflow",label:"workflow"},{value:"other",label:"other"}],M4={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function D4(){var v;const[e,t]=M.useState("all"),[i,r]=M.useState(""),[l,o]=M.useState(null),c=ai(),{data:f,isLoading:d}=St({queryKey:["skills"],queryFn:()=>Z1()}),h=St({queryKey:["projects"],queryFn:bc}),y=M.useMemo(()=>((f==null?void 0:f.data)??[]).filter(S=>!(e!=="all"&&S.category!==e||i&&!S.name.toLowerCase().includes(i.toLowerCase()))),[f,e,i]),g=M.useMemo(()=>{const x=(f==null?void 0:f.data)??[],S={all:x.length};for(const w of x)S[w.category]=(S[w.category]??0)+1;return S},[f]);return m.jsxs("div",{className:"flex flex-col gap-4 max-w-6xl",children:[m.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"Skills 🎯"}),m.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`})]}),m.jsx("div",{className:"flex gap-3 items-center",children:m.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await LO(),c.invalidateQueries({queryKey:["skills"]})},type:"button",children:[m.jsx(jl,{size:14,strokeWidth:2.5}),"Sync bundled"]})})]}),m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsxs("div",{className:"relative flex-1 max-w-md",children:[m.jsx(yf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),m.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索 skill…",value:i,onChange:x=>r(x.target.value),"aria-label":"搜索 skill"})]}),m.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:R4.map(x=>m.jsxs("button",{type:"button",onClick:()=>t(x.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",e===x.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[x.label," ",g[x.value]]},x.value))})]}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:y.map(x=>{var S;return m.jsx(L4,{skill:x,projectCount:((S=h.data)==null?void 0:S.data.length)??0,onOpen:()=>o(x.name)},x.name)})}),l&&m.jsx(A4,{name:l,projects:((v=h.data)==null?void 0:v.data.map(x=>x.name))??[],onClose:()=>o(null),onChange:()=>c.invalidateQueries({queryKey:["skills"]})})]})}function L4({skill:e,projectCount:t,onOpen:i}){const r=M4[e.category];return m.jsxs("article",{onClick:i,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),i())},tabIndex:0,role:"button","aria-label":`Open ${e.name}`,className:"nb-card nb-card-interactive flex flex-col gap-3",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),m.jsx("span",{className:"nb-badge text-[10px]",style:{background:r},children:e.category})]}),m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),m.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:[m.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),m.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function j4(){var o;const e=St({queryKey:["system-info"],queryFn:JE}),t=St({queryKey:["system-env"],queryFn:MA}),i=St({queryKey:["doctor"],queryFn:DA}),[r,l]=M.useState(!1);return m.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[m.jsx("header",{children:m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"系统 ⚙️"})}),m.jsx(I4,{current:(o=e.data)==null?void 0:o.version}),m.jsxs("section",{className:"nb-card",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"运行时"}),e.data?m.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[m.jsx("dt",{className:"font-bold",children:"Node"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.nodeVersion}),m.jsx("dt",{className:"font-bold",children:"Platform"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.platform}),m.jsx("dt",{className:"font-bold",children:"PID"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.pid??"—"}),m.jsx("dt",{className:"font-bold",children:"Uptime"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:B4(e.data.uptimeMs)})]}):m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})]}),m.jsxs("section",{className:"nb-card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:["全局配置 ",m.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"})]}),r?m.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 编辑模式"}):m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>l(!0),type:"button","aria-label":"编辑 env 文件",children:[m.jsx(GE,{size:12,strokeWidth:2.5})," 编辑"]})]}),r?m.jsx(z4,{onClose:()=>{l(!1),t.refetch()}}):t.data&&t.data.exists?m.jsx("dl",{className:"grid grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:t.data.entries.map(c=>m.jsxs("div",{className:"contents",children:[m.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[c.masked&&m.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),c.key]}),m.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:c.value})]},c.key))}):m.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:['env 文件不存在。点"编辑"或者终端运行 ',m.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"}),"。"]})]}),m.jsxs("section",{className:"nb-card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"项目健康检查"}),m.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>i.refetch(),type:"button",children:[m.jsx(jl,{size:12,strokeWidth:2.5}),"重跑"]})]}),i.data&&i.data.data.length>0?m.jsx("ul",{className:"flex flex-col gap-2",children:i.data.data.map(c=>m.jsxs("li",{className:"flex items-center gap-3 px-3 py-2 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[c.ok?m.jsx(TC,{size:16,className:"text-[var(--color-running)]",strokeWidth:2.5}):m.jsx(Um,{size:16,className:"text-[var(--color-stuck)]",strokeWidth:2.5}),m.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:c.project}),c.issues.length>0?m.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:c.issues.join("; ")}):m.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"})]},c.project))}):m.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:"还没有项目。"})]})]})}function I4({current:e}){const{confirm:t,alert:i}=si(),[r,l]=M.useState(!1),[o,c]=M.useState(null),f=St({queryKey:["latest-version"],queryFn:IA,enabled:!1}),d=async()=>{var y;if(await t({title:"升级 sps-cli",body:`当前 ${e},升级到 ${(y=f.data)==null?void 0:y.latest}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。`,confirm:"升级"})){l(!0),c(null);try{const g=await zA();c(g.output),g.ok?i({title:"升级完成",body:'请手动 `pkill -f "sps console"` 再重新启动以生效。'}):i({title:"升级失败",body:g.output.slice(-500)})}catch(g){c(g.message),i({title:"升级失败",body:g.message})}finally{l(!1)}}};return m.jsxs("section",{className:"nb-card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-3",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"版本"}),m.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?m.jsx(cn,{size:12,strokeWidth:3,className:"animate-spin"}):m.jsx(jl,{size:12,strokeWidth:2.5}),"检查更新"]})]}),m.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[m.jsx("dt",{className:"font-bold",children:"sps-cli (当前)"}),m.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),f.data&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{className:"font-bold",children:"npm (最新)"}),m.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[f.data.latest,f.data.upToDate?m.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"最新"}):m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:d,disabled:r,type:"button","aria-label":"升级到最新版本",children:[r?m.jsx(cn,{size:11,strokeWidth:3,className:"animate-spin"}):m.jsx(KE,{size:11,strokeWidth:2.5}),"升级"]})]})]}),f.isError&&m.jsxs(m.Fragment,{children:[m.jsx("dt",{className:"font-bold",children:"检查"}),m.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:f.error instanceof Error?f.error.message:String(f.error)})]})]}),o&&m.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 z4({onClose:e}){const t=ai(),{alert:i}=si(),r=St({queryKey:["system-env-raw"],queryFn:LA}),[l,o]=M.useState(null),[c,f]=M.useState(null);M.useEffect(()=>{r.data&&l===null&&(o(r.data.content),f(r.data.etag))},[r.data,l]);const d=l!==null&&r.data&&l!==r.data.content,h=ti({mutationFn:()=>{if(l===null)throw new Error("no draft");return jA(l,c??"")},onSuccess:()=>{t.invalidateQueries({queryKey:["system-env"]}),t.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:y=>{const g=y.status;i({title:g===409?"env 被其他地方修改了":"保存失败",body:g===409?"请点取消后重开编辑。":y instanceof Error?y.message:String(y)})}});return r.isLoading?m.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}):m.jsxs("div",{children:[m.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:"⚠ 文件包含凭证明文。保存时保持 0600 权限。"}),m.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:l??"",onChange:y=>o(y.target.value),spellCheck:!1,"aria-label":"env 文件编辑器"}),m.jsxs("div",{className:"flex items-center justify-between mt-3",children:[m.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[c?`etag: ${c}`:"",d?" · ● 未保存":""]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:h.isPending,type:"button",children:[m.jsx(ds,{size:12,strokeWidth:3})," 取消"]}),m.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>h.mutate(),disabled:!d||h.isPending,type:"button","aria-label":"保存 env",children:[h.isPending?m.jsx(cn,{size:12,strokeWidth:3,className:"animate-spin"}):m.jsx($m,{size:12,strokeWidth:3}),"保存"]})]})]})]})}function B4(e){const t=Math.floor(e/1e3),i=Math.floor(t/3600),r=Math.floor(t%3600/60),l=t%60;return i>0?`${i}h ${r}m ${l}s`:r>0?`${r}m ${l}s`:`${l}s`}function U4(){return qt("/api/chat/sessions")}function F4(e){return qt(`/api/chat/sessions/${e}`)}async function V0(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 P4(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function $4(e,t){const i=await fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});if(!i.ok)throw new Error(`${i.status}: ${await i.text()}`);return await i.json()}async function q4(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 H4(e,t){const i=t?`?since=${encodeURIComponent(t)}`:"";return qt(`/api/chat/sessions/${e}/messages${i}`)}function X0(){var R,A,I,$,T,P;const{sessionId:e}=ME(),t=Er(),i=ai(),{confirm:r,alert:l}=si(),o=St({queryKey:["chat-sessions"],queryFn:U4}),c=St({queryKey:["chat-session",e],queryFn:()=>F4(e??""),enabled:!!e}),[f,d]=M.useState(null),[h,y]=M.useState(""),[g,v]=M.useState(!1),x=M.useRef(null);M.useEffect(()=>{if(!e)return;const z=new EventSource(`/stream/chat/${encodeURIComponent(e)}`);let Z=!0;return z.addEventListener("open",()=>{if(Z){Z=!1;return}const L=i.getQueryData(["chat-session",e]),K=L!=null&&L.messages.length?L.messages[L.messages.length-1].ts:void 0;H4(e,K).then(X=>{X.data.length!==0&&i.setQueryData(["chat-session",e],oe=>{if(!oe)return oe;const se=new Set(oe.messages.map(H=>H.id)),ee=X.data.filter(H=>!se.has(H.id));return ee.length===0?oe:{...oe,messages:[...oe.messages,...ee],lastMessageAt:ee[ee.length-1].ts,messageCount:oe.messageCount+ee.length}})}).catch(()=>{})}),z.addEventListener("chat.message",L=>{try{const K=JSON.parse(L.data);i.setQueryData(["chat-session",e],X=>{if(!X||X.messages.some(ee=>ee.id===K.message.id))return X;const se=X.messages.findIndex(ee=>ee.role==="user"&&ee.id.startsWith("optim-")&&ee.content===K.message.content);if(se>=0){const ee=[...X.messages];return ee[se]=K.message,{...X,messages:ee}}return{...X,messages:[...X.messages,K.message]}})}catch{}}),z.addEventListener("chat.message.pending",L=>{try{const K=JSON.parse(L.data);d({id:K.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),z.addEventListener("chat.message.chunk.text",L=>{try{const K=JSON.parse(L.data);d(X=>{if(!X||X.id!==K.assistantId)return X;const oe=[...X.blocks],se=oe[oe.length-1];return se&&se.type==="text"?oe[oe.length-1]={...se,target:se.target+K.text}:oe.push({type:"text",target:K.text,displayed:""}),{...X,blocks:oe}})}catch{}}),z.addEventListener("chat.message.chunk.tool_use",L=>{try{const K=JSON.parse(L.data);d(X=>!X||X.id!==K.assistantId?X:{...X,blocks:[...X.blocks,{type:"tool_use",id:K.id,title:K.title,kind:K.kind,status:K.status}]})}catch{}}),z.addEventListener("chat.message.chunk.tool_update",L=>{try{const K=JSON.parse(L.data);d(X=>!X||X.id!==K.assistantId?X:{...X,blocks:X.blocks.map(oe=>oe.type==="tool_use"&&oe.id===K.id?{...oe,status:K.status}:oe)})}catch{}}),z.addEventListener("chat.message.complete",L=>{try{const K=JSON.parse(L.data);d(X=>X&&X.id===K.assistantId?{...X,done:!0,finalMessage:K.message}:X)}catch{}}),()=>z.close()},[e,i]),M.useEffect(()=>{if(!f)return;const z=f.blocks.reduce((L,K)=>K.type==="text"?L+(K.target.length-K.displayed.length):L,0);if(z<=0){if(f.done&&f.finalMessage){const L=f.finalMessage;i.setQueryData(["chat-session",e],K=>!K||K.messages.some(X=>X.id===L.id)?K:{...K,messages:[...K.messages,L],lastMessageAt:L.ts,messageCount:K.messageCount+1}),i.invalidateQueries({queryKey:["chat-sessions"]}),d(null),v(!1)}return}const Z=setTimeout(()=>{d(L=>{if(!L)return L;let K=Math.max(1,Math.ceil(z/40));const X=L.blocks.map(oe=>{if(oe.type!=="text"||K<=0)return oe;const se=oe.target.length-oe.displayed.length;if(se<=0)return oe;const ee=Math.min(se,K);return K-=ee,{...oe,displayed:oe.target.slice(0,oe.displayed.length+ee)}});return{...L,blocks:X}})},25);return()=>clearTimeout(Z)},[f,i,e]),M.useEffect(()=>{const z=x.current;z&&(z.scrollTop=z.scrollHeight)},[c.data,f]);const S=M.useCallback(async()=>{const z=await V0();i.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${z.id}`)},[i,t]),w=M.useCallback(async()=>{const z=h.trim();if(!z||g)return;let Z=e;if(!Z){const K=await V0();i.invalidateQueries({queryKey:["chat-sessions"]}),Z=K.id,t(`/chat/${Z}`,{replace:!0})}const L={id:`optim-${Date.now()}`,role:"user",content:z,ts:new Date().toISOString(),status:"complete"};i.setQueryData(["chat-session",Z],K=>K?{...K,messages:[...K.messages,L],lastMessageAt:L.ts,messageCount:K.messageCount+1}:{id:Z,createdAt:L.ts,lastMessageAt:L.ts,title:z.slice(0,60),project:null,messageCount:1,messages:[L]}),y(""),v(!0);try{await $4(Z,z)}catch(K){v(!1),console.error("sendMessage failed",K),l({title:"发送失败",body:K instanceof Error?K.message:String(K)})}},[h,g,e,i,t,l]),k=M.useCallback(async z=>{await r({title:"删除对话",body:"对话记录会永久删除,不可恢复。",confirm:"删除",danger:!0})&&(await P4(z),i.invalidateQueries({queryKey:["chat-sessions"]}),e===z&&t("/chat"))},[i,e,t,r]),_=M.useCallback(async()=>{if(e)try{await q4(e)}catch(z){l({title:"中断失败",body:z instanceof Error?z.message:String(z)})}},[e,l]);return m.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[m.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[m.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:S,type:"button",children:[m.jsx(Ca,{size:14,strokeWidth:3}),"新建对话"]}),m.jsxs("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:["历史 ",((R=o.data)==null?void 0:R.data.length)??0]}),m.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((A=o.data)==null?void 0:A.data)??[]).map(z=>m.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",e===z.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:[m.jsxs("button",{type:"button","aria-label":`打开对话 ${z.title}`,onClick:()=>t(`/chat/${z.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[m.jsx(jv,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("p",{className:"text-sm font-semibold truncate",children:z.title}),m.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[z.messageCount," msg · ",Dw(z.lastMessageAt??z.createdAt)]})]})]}),m.jsx("button",{type:"button","aria-label":"删除对话",className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:Z=>{Z.stopPropagation(),k(z.id)},children:m.jsx(gc,{size:12})})]},z.id)),(((I=o.data)==null?void 0:I.data)??[]).length===0&&m.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:"还没对话。点上面新建。"})]})]}),m.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:e?m.jsxs(m.Fragment,{children:[m.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[m.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:(($=c.data)==null?void 0:$.title)??"新对话"}),m.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:e})]}),m.jsxs("div",{ref:x,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((T=c.data)==null?void 0:T.messages)??[]).map(z=>m.jsx(K4,{msg:z},z.id)),f&&m.jsx(G4,{pending:f}),!c.isLoading&&(((P=c.data)==null?void 0:P.messages)??[]).length===0&&!f&&!g&&m.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行"})]}),m.jsx("div",{className:"border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)]",children:m.jsxs("div",{className:"flex gap-2 items-end",children:[m.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:"说点什么… (Enter 发送,Shift+Enter 换行)",rows:2,value:h,onChange:z=>y(z.target.value),onKeyDown:z=>{z.key==="Enter"&&!z.shiftKey&&!z.nativeEvent.isComposing&&(z.preventDefault(),w())},"aria-label":"消息输入"}),f?m.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:_,type:"button","aria-label":"中断生成",children:[m.jsx(VE,{size:14,strokeWidth:3}),"中断"]}):m.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:w,disabled:!h.trim()||g,type:"button","aria-label":"发送",children:[g?m.jsx(cn,{size:14,strokeWidth:3,className:"animate-spin"}):m.jsx(mA,{size:14,strokeWidth:3}),"发送"]})]})})]}):m.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:m.jsxs("div",{className:"text-center max-w-md",children:[m.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:m.jsx(jv,{size:32,strokeWidth:2.5})}),m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"对话 💬"}),m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。'}),m.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:"Enter 发送 · Shift+Enter 换行 · 内容流式返回"})]})})})]})}function K4({msg:e}){const t=e.role==="user",i=e.role==="error",r=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}];return m.jsx("div",{className:t?"self-end max-w-3xl":"self-start max-w-3xl",children:m.jsxs("div",{className:["nb-card",t?"bg-[var(--color-secondary)]":i?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[m.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:[t?"你":i?"错误":"assistant",m.jsx("span",{className:"font-normal",children:"·"}),m.jsx("span",{className:"font-normal",children:Dw(e.ts)})]}),m.jsx("div",{className:"flex flex-col gap-2",children:r.map((l,o)=>m.jsx(Y4,{block:l},o))}),e.truncated&&m.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 G4({pending:e}){const t=(()=>{for(let i=e.blocks.length-1;i>=0;i--)if(e.blocks[i].type==="text")return i;return-1})();return m.jsx("div",{className:"self-start max-w-3xl",children:m.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[m.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",m.jsx("span",{className:"font-normal",children:"·"}),m.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[m.jsx(cn,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&m.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"…"}),e.blocks.map((i,r)=>{if(i.type==="text"){const l=r===t;return m.jsxs("div",{className:"relative",children:[m.jsx(Rw,{text:i.displayed}),l&&m.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},r)}return m.jsx(Mw,{tool:i},r)})]})]})})}function Y4({block:e}){return e.type==="text"?m.jsx(Rw,{text:e.text}):m.jsx(Mw,{tool:e})}function Rw({text:e}){return e?m.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:m.jsx(xg,{remarkPlugins:[wg],rehypePlugins:[Ng],children:e})}):null}function Mw({tool:e}){const[t,i]=M.useState(!1),r=e.status==="completed",l=e.status==="failed",o=!r&&!l;return m.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[m.jsxs("button",{type:"button",onClick:()=>i(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:[m.jsx(qE,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),m.jsx(NA,{size:12,strokeWidth:2.5}),m.jsx("span",{className:"font-bold",children:e.kind}),m.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",children:e.title}),o&&m.jsx(cn,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),r&&m.jsx(HE,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),l&&m.jsx(OC,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)]"})]}),t&&m.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:[m.jsxs("div",{children:["id: ",m.jsx("span",{className:"text-[var(--color-text)]",children:e.id})]}),m.jsxs("div",{children:["status: ",m.jsx("span",{className:"text-[var(--color-text)]",children:e.status})]})]})]})}function Dw(e){if(!e)return"";const t=new Date(e),i=Date.now()-t.getTime();return i<6e4?"刚才":i<36e5?`${Math.floor(i/6e4)}m`:i<864e5?`${Math.floor(i/36e5)}h`:t.toLocaleDateString()}function Q4(){return m.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[m.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:"404 · 页面不存在"}),m.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:"没找到这个页面。可能是链接过期了。"}),m.jsx(Sr,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:"返回首页"})]})}function V4(){return m.jsx(e2,{children:m.jsx(MT,{children:m.jsxs(In,{element:m.jsx(WA,{}),children:[m.jsx(In,{index:!0,element:m.jsx(AT,{to:"/projects",replace:!0})}),m.jsx(In,{path:"/projects",element:m.jsx(t2,{})}),m.jsx(In,{path:"/projects/new",element:m.jsx(u2,{})}),m.jsx(In,{path:"/projects/:name",element:m.jsx(wO,{})}),m.jsx(In,{path:"/board",element:m.jsx(aR,{})}),m.jsx(In,{path:"/workers",element:m.jsx(oR,{})}),m.jsx(In,{path:"/logs",element:m.jsx(gR,{})}),m.jsx(In,{path:"/skills",element:m.jsx(D4,{})}),m.jsx(In,{path:"/system",element:m.jsx(j4,{})}),m.jsx(In,{path:"/chat",element:m.jsx(X0,{})}),m.jsx(In,{path:"/chat/:sessionId",element:m.jsx(X0,{})}),m.jsx(In,{path:"*",element:m.jsx(Q4,{})})]})})})}JA();const X4=new xN({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),Lw=document.getElementById("root");if(!Lw)throw new Error("#root not found");Qk.createRoot(Lw).render(m.jsx(M.StrictMode,{children:m.jsx(vN,{client:X4,children:m.jsx(iC,{children:m.jsx(l2,{children:m.jsx(V4,{})})})})}));