diff --git a/areno/dashboard/dist/assets/index-BJq-UqM2.js b/areno/dashboard/dist/assets/index-BJq-UqM2.js new file mode 100644 index 00000000..afd81748 --- /dev/null +++ b/areno/dashboard/dist/assets/index-BJq-UqM2.js @@ -0,0 +1,197 @@ +(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))u(s);new MutationObserver(s=>{for(const h of s)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&u(f)}).observe(document,{childList:!0,subtree:!0});function r(s){const h={};return s.integrity&&(h.integrity=s.integrity),s.referrerPolicy&&(h.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?h.credentials="include":s.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function u(s){if(s.ep)return;s.ep=!0;const h=r(s);fetch(s.href,h)}})();function Yp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Rs={exports:{}},Oa={};/** + * @license React + * react-jsx-runtime.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Bm;function g0(){if(Bm)return Oa;Bm=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(u,s,h){var f=null;if(h!==void 0&&(f=""+h),s.key!==void 0&&(f=""+s.key),"key"in s){h={};for(var m in s)m!=="key"&&(h[m]=s[m])}else h=s;return s=h.ref,{$$typeof:n,type:u,key:f,ref:s!==void 0?s:null,props:h}}return Oa.Fragment=a,Oa.jsx=r,Oa.jsxs=r,Oa}var Um;function y0(){return Um||(Um=1,Rs.exports=g0()),Rs.exports}var v=y0(),Ls={exports:{}},ke={};/** + * @license React + * react.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Hm;function x0(){if(Hm)return ke;Hm=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function k(T){return T===null||typeof T!="object"?null:(T=S&&T[S]||T["@@iterator"],typeof T=="function"?T:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,V={};function D(T,U,_){this.props=T,this.context=U,this.refs=V,this.updater=_||C}D.prototype.isReactComponent={},D.prototype.setState=function(T,U){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,U,"setState")},D.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function K(){}K.prototype=D.prototype;function X(T,U,_){this.props=T,this.context=U,this.refs=V,this.updater=_||C}var ie=X.prototype=new K;ie.constructor=X,H(ie,D.prototype),ie.isPureReactComponent=!0;var te=Array.isArray;function L(){}var J={H:null,A:null,T:null,S:null},de=Object.prototype.hasOwnProperty;function be(T,U,_){var ee=_.ref;return{$$typeof:n,type:T,key:U,ref:ee!==void 0?ee:null,props:_}}function R(T,U){return be(T.type,U,T.props)}function le(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function ne(T){var U={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(_){return U[_]})}var Te=/\/+/g;function re(T,U){return typeof T=="object"&&T!==null&&T.key!=null?ne(""+T.key):U.toString(36)}function $(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(L,L):(T.status="pending",T.then(function(U){T.status==="pending"&&(T.status="fulfilled",T.value=U)},function(U){T.status==="pending"&&(T.status="rejected",T.reason=U)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function O(T,U,_,ee,oe){var fe=typeof T;(fe==="undefined"||fe==="boolean")&&(T=null);var ae=!1;if(T===null)ae=!0;else switch(fe){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(T.$$typeof){case n:case a:ae=!0;break;case x:return ae=T._init,O(ae(T._payload),U,_,ee,oe)}}if(ae)return oe=oe(T),ae=ee===""?"."+re(T,0):ee,te(oe)?(_="",ae!=null&&(_=ae.replace(Te,"$&/")+"/"),O(oe,U,_,"",function(Nt){return Nt})):oe!=null&&(le(oe)&&(oe=R(oe,_+(oe.key==null||T&&T.key===oe.key?"":(""+oe.key).replace(Te,"$&/")+"/")+ae)),U.push(oe)),1;ae=0;var Qe=ee===""?".":ee+":";if(te(T))for(var Le=0;Le>>1,E=O[Se];if(0>>1;Ses(_,ce))ees(oe,_)?(O[Se]=oe,O[ee]=ce,Se=ee):(O[Se]=_,O[U]=ce,Se=U);else if(ees(oe,ce))O[Se]=oe,O[ee]=ce,Se=ee;else break e}}return F}function s(O,F){var ce=O.sortIndex-F.sortIndex;return ce!==0?ce:O.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var f=Date,m=f.now();n.unstable_now=function(){return f.now()-m}}var p=[],d=[],x=1,y=null,S=3,k=!1,C=!1,H=!1,V=!1,D=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;function ie(O){for(var F=r(d);F!==null;){if(F.callback===null)u(d);else if(F.startTime<=O)u(d),F.sortIndex=F.expirationTime,a(p,F);else break;F=r(d)}}function te(O){if(H=!1,ie(O),!C)if(r(p)!==null)C=!0,L||(L=!0,ne());else{var F=r(d);F!==null&&$(te,F.startTime-O)}}var L=!1,J=-1,de=5,be=-1;function R(){return V?!0:!(n.unstable_now()-beO&&R());){var Se=y.callback;if(typeof Se=="function"){y.callback=null,S=y.priorityLevel;var E=Se(y.expirationTime<=O);if(O=n.unstable_now(),typeof E=="function"){y.callback=E,ie(O),F=!0;break t}y===r(p)&&u(p),ie(O)}else u(p);y=r(p)}if(y!==null)F=!0;else{var T=r(d);T!==null&&$(te,T.startTime-O),F=!1}}break e}finally{y=null,S=ce,k=!1}F=void 0}}finally{F?ne():L=!1}}}var ne;if(typeof X=="function")ne=function(){X(le)};else if(typeof MessageChannel<"u"){var Te=new MessageChannel,re=Te.port2;Te.port1.onmessage=le,ne=function(){re.postMessage(null)}}else ne=function(){D(le,0)};function $(O,F){J=D(function(){O(n.unstable_now())},F)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125Se?(O.sortIndex=ce,a(d,O),r(p)===null&&O===r(d)&&(H?(K(J),J=-1):H=!0,$(te,ce-Se))):(O.sortIndex=E,a(p,O),C||k||(C=!0,L||(L=!0,ne()))),O},n.unstable_shouldYield=R,n.unstable_wrapCallback=function(O){var F=S;return function(){var ce=S;S=F;try{return O.apply(this,arguments)}finally{S=ce}}}})(Hs)),Hs}var Gm;function v0(){return Gm||(Gm=1,Us.exports=b0()),Us.exports}var qs={exports:{}},Tt={};/** + * @license React + * react-dom.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Vm;function S0(){if(Vm)return Tt;Vm=1;var n=vo();function a(p){var d="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),qs.exports=S0(),qs.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Xm;function _0(){if(Xm)return ja;Xm=1;var n=v0(),a=vo(),r=k0();function u(e){var t="https://react.dev/errors/"+e;if(1E||(e.current=Se[E],Se[E]=null,E--)}function _(e,t){E++,Se[E]=e.current,e.current=t}var ee=T(null),oe=T(null),fe=T(null),ae=T(null);function Qe(e,t){switch(_(fe,t),_(oe,e),_(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?rm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=rm(t),e=um(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(ee),_(ee,e)}function Le(){U(ee),U(oe),U(fe)}function Nt(e){e.memoizedState!==null&&_(ae,e);var t=ee.current,l=um(t,e.type);t!==l&&(_(oe,e),_(ee,l))}function It(e){oe.current===e&&(U(ee),U(oe)),ae.current===e&&(U(ae),wa._currentValue=ce)}var gn,Fl;function on(e){if(gn===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);gn=t&&t[1]||"",Fl=-1)":-1c||A[i]!==N[c]){var q=` +`+A[i].replace(" at new "," at ");return e.displayName&&q.includes("")&&(q=q.replace("",e.displayName)),q}while(1<=i&&0<=c);break}}}finally{Zn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?on(l):""}function kl(e,t){switch(e.tag){case 26:case 27:case 5:return on(e.type);case 16:return on("Lazy");case 13:return e.child!==t&&t!==null?on("Suspense Fallback"):on("Suspense");case 19:return on("SuspenseList");case 0:case 15:return _n(e.type,!1);case 11:return _n(e.type.render,!1);case 1:return _n(e.type,!0);case 31:return on("Activity");default:return""}}function _l(e){try{var t="",l=null;do t+=kl(e,l),l=e,e=e.return;while(e);return t}catch(i){return` +Error generating stack: `+i.message+` +`+i.stack}}var Kn=Object.prototype.hasOwnProperty,Fn=n.unstable_scheduleCallback,El=n.unstable_cancelCallback,Gi=n.unstable_shouldYield,Al=n.unstable_requestPaint,ot=n.unstable_now,Jl=n.unstable_getCurrentPriorityLevel,Y=n.unstable_ImmediatePriority,W=n.unstable_UserBlockingPriority,xe=n.unstable_NormalPriority,ze=n.unstable_LowPriority,Be=n.unstable_IdlePriority,At=n.log,$t=n.unstable_setDisableYieldValue,mt=null,et=null;function xt(e){if(typeof At=="function"&&$t(e),et&&typeof et.setStrictMode=="function")try{et.setStrictMode(mt,e)}catch{}}var Ye=Math.clz32?Math.clz32:Oe,P=Math.log,Z=Math.LN2;function Oe(e){return e>>>=0,e===0?32:31-(P(e)/Z|0)|0}var _e=256,ft=262144,pt=4194304;function En(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Il(e,t,l){var i=e.pendingLanes;if(i===0)return 0;var c=0,o=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var b=i&134217727;return b!==0?(i=b&~o,i!==0?c=En(i):(g&=b,g!==0?c=En(g):l||(l=b&~e,l!==0&&(c=En(l))))):(b=i&~o,b!==0?c=En(b):g!==0?c=En(g):l||(l=i&~e,l!==0&&(c=En(l)))),c===0?0:t!==0&&t!==c&&(t&o)===0&&(o=c&-c,l=t&-t,o>=l||o===32&&(l&4194048)!==0)?t:c}function fn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Vi(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ka(){var e=pt;return pt<<=1,(pt&62914560)===0&&(pt=4194304),e}function $l(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Jn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function iy(e,t,l,i,c,o){var g=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var b=e.entanglements,A=e.expirationTimes,N=e.hiddenUpdates;for(l=g&~l;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var oy=/[\n"\\]/g;function Pt(e){return e.replace(oy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function wu(e,t,l,i,c,o,g,b){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Wt(t)):e.value!==""+Wt(t)&&(e.value=""+Wt(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?Mu(e,g,Wt(t)):l!=null?Mu(e,g,Wt(l)):i!=null&&e.removeAttribute("value"),c==null&&o!=null&&(e.defaultChecked=!!o),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Wt(b):e.removeAttribute("name")}function Po(e,t,l,i,c,o,g,b){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||l!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Cu(e);return}l=l!=null?""+Wt(l):"",t=t!=null?""+Wt(t):l,b||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=b?e.checked:!!i,e.defaultChecked=!!i,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Cu(e)}function Mu(e,t,l){t==="number"&&Ia(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function li(e,t,l,i){if(e=e.options,t){t={};for(var c=0;c"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ru=!1;if(zn)try{var Ki={};Object.defineProperty(Ki,"passive",{get:function(){Ru=!0}}),window.addEventListener("test",Ki,Ki),window.removeEventListener("test",Ki,Ki)}catch{Ru=!1}var $n=null,Lu=null,Wa=null;function uf(){if(Wa)return Wa;var e,t=Lu,l=t.length,i,c="value"in $n?$n.value:$n.textContent,o=c.length;for(e=0;e=Ii),df=" ",mf=!1;function pf(e,t){switch(e){case"keyup":return Uy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ui=!1;function qy(e,t){switch(e){case"compositionend":return gf(t);case"keypress":return t.which!==32?null:(mf=!0,df);case"textInput":return e=t.data,e===df&&mf?null:e;default:return null}}function Yy(e,t){if(ui)return e==="compositionend"||!Yu&&pf(e,t)?(e=uf(),Wa=Lu=$n=null,ui=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:l,offset:t-e};e=i}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ef(l)}}function Tf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ia(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Ia(e.document)}return t}function Qu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Jy=zn&&"documentMode"in document&&11>=document.documentMode,ci=null,Xu=null,ea=null,Zu=!1;function Cf(e,t,l){var i=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Zu||ci==null||ci!==Ia(i)||(i=ci,"selectionStart"in i&&Qu(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ea&&Pi(ea,i)||(ea=i,i=Xr(Xu,"onSelect"),0>=g,c-=g,yn=1<<32-Ye(t)+c|l<Ae?(De=se,se=null):De=se.sibling;var He=j(w,se,M[Ae],G);if(He===null){se===null&&(se=De);break}e&&se&&He.alternate===null&&t(w,se),z=o(He,z,Ae),Ue===null?he=He:Ue.sibling=He,Ue=He,se=De}if(Ae===M.length)return l(w,se),je&&wn(w,Ae),he;if(se===null){for(;AeAe?(De=se,se=null):De=se.sibling;var bl=j(w,se,He.value,G);if(bl===null){se===null&&(se=De);break}e&&se&&bl.alternate===null&&t(w,se),z=o(bl,z,Ae),Ue===null?he=bl:Ue.sibling=bl,Ue=bl,se=De}if(He.done)return l(w,se),je&&wn(w,Ae),he;if(se===null){for(;!He.done;Ae++,He=M.next())He=Q(w,He.value,G),He!==null&&(z=o(He,z,Ae),Ue===null?he=He:Ue.sibling=He,Ue=He);return je&&wn(w,Ae),he}for(se=i(se);!He.done;Ae++,He=M.next())He=B(se,w,Ae,He.value,G),He!==null&&(e&&He.alternate!==null&&se.delete(He.key===null?Ae:He.key),z=o(He,z,Ae),Ue===null?he=He:Ue.sibling=He,Ue=He);return e&&se.forEach(function(p0){return t(w,p0)}),je&&wn(w,Ae),he}function Ke(w,z,M,G){if(typeof M=="object"&&M!==null&&M.type===H&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case k:e:{for(var he=M.key;z!==null;){if(z.key===he){if(he=M.type,he===H){if(z.tag===7){l(w,z.sibling),G=c(z,M.props.children),G.return=w,w=G;break e}}else if(z.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===de&&Ll(he)===z.type){l(w,z.sibling),G=c(z,M.props),ra(G,M),G.return=w,w=G;break e}l(w,z);break}else t(w,z);z=z.sibling}M.type===H?(G=Nl(M.props.children,w.mode,G,M.key),G.return=w,w=G):(G=cr(M.type,M.key,M.props,null,w.mode,G),ra(G,M),G.return=w,w=G)}return g(w);case C:e:{for(he=M.key;z!==null;){if(z.key===he)if(z.tag===4&&z.stateNode.containerInfo===M.containerInfo&&z.stateNode.implementation===M.implementation){l(w,z.sibling),G=c(z,M.children||[]),G.return=w,w=G;break e}else{l(w,z);break}else t(w,z);z=z.sibling}G=Pu(M,w.mode,G),G.return=w,w=G}return g(w);case de:return M=Ll(M),Ke(w,z,M,G)}if($(M))return ue(w,z,M,G);if(ne(M)){if(he=ne(M),typeof he!="function")throw Error(u(150));return M=he.call(M),ge(w,z,M,G)}if(typeof M.then=="function")return Ke(w,z,pr(M),G);if(M.$$typeof===X)return Ke(w,z,fr(w,M),G);gr(w,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,z!==null&&z.tag===6?(l(w,z.sibling),G=c(z,M),G.return=w,w=G):(l(w,z),G=Wu(M,w.mode,G),G.return=w,w=G),g(w)):l(w,z)}return function(w,z,M,G){try{aa=0;var he=Ke(w,z,M,G);return bi=null,he}catch(se){if(se===xi||se===dr)throw se;var Ue=Gt(29,se,null,w.mode);return Ue.lanes=G,Ue.return=w,Ue}finally{}}}var Ul=$f(!0),Wf=$f(!1),nl=!1;function fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ll(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function il(e,t,l){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(qe&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,t=ur(e),Rf(e,null,l),t}return rr(e,i,t,l),ur(e)}function ua(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,l|=i,t.lanes=l,Go(e,l)}}function dc(e,t){var l=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,l===i)){var c=null,o=null;if(l=l.firstBaseUpdate,l!==null){do{var g={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};o===null?c=o=g:o=o.next=g,l=l.next}while(l!==null);o===null?c=o=t:o=o.next=t}else c=o=t;l={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:o,shared:i.shared,callbacks:i.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var mc=!1;function ca(){if(mc){var e=yi;if(e!==null)throw e}}function sa(e,t,l,i){mc=!1;var c=e.updateQueue;nl=!1;var o=c.firstBaseUpdate,g=c.lastBaseUpdate,b=c.shared.pending;if(b!==null){c.shared.pending=null;var A=b,N=A.next;A.next=null,g===null?o=N:g.next=N,g=A;var q=e.alternate;q!==null&&(q=q.updateQueue,b=q.lastBaseUpdate,b!==g&&(b===null?q.firstBaseUpdate=N:b.next=N,q.lastBaseUpdate=A))}if(o!==null){var Q=c.baseState;g=0,q=N=A=null,b=o;do{var j=b.lane&-536870913,B=j!==b.lane;if(B?(Ne&j)===j:(i&j)===j){j!==0&&j===gi&&(mc=!0),q!==null&&(q=q.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ue=e,ge=b;j=t;var Ke=l;switch(ge.tag){case 1:if(ue=ge.payload,typeof ue=="function"){Q=ue.call(Ke,Q,j);break e}Q=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=ge.payload,j=typeof ue=="function"?ue.call(Ke,Q,j):ue,j==null)break e;Q=y({},Q,j);break e;case 2:nl=!0}}j=b.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=c.callbacks,B===null?c.callbacks=[j]:B.push(j))}else B={lane:j,tag:b.tag,payload:b.payload,callback:b.callback,next:null},q===null?(N=q=B,A=Q):q=q.next=B,g|=j;if(b=b.next,b===null){if(b=c.shared.pending,b===null)break;B=b,b=B.next,B.next=null,c.lastBaseUpdate=B,c.shared.pending=null}}while(!0);q===null&&(A=Q),c.baseState=A,c.firstBaseUpdate=N,c.lastBaseUpdate=q,o===null&&(c.shared.lanes=0),sl|=g,e.lanes=g,e.memoizedState=Q}}function Pf(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function eh(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;eo?o:8;var g=O.T,b={};O.T=b,Oc(e,!1,t,l);try{var A=c(),N=O.S;if(N!==null&&N(b,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var q=i1(A,i);ha(e,t,q,Kt(e))}else ha(e,t,i,Kt(e))}catch(Q){ha(e,t,{then:function(){},status:"rejected",reason:Q},Kt())}finally{F.p=o,g!==null&&b.types!==null&&(g.types=b.types),O.T=g}}function o1(){}function Nc(e,t,l,i){if(e.tag!==5)throw Error(u(476));var c=Dh(e).queue;Nh(e,c,t,ce,l===null?o1:function(){return Oh(e),l(i)})}function Dh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:ce},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:On,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Oh(e){var t=Dh(e);t.next===null&&(t=e.alternate.memoizedState),ha(e,t.next.queue,{},Kt())}function Dc(){return St(wa)}function jh(){return it().memoizedState}function Rh(){return it().memoizedState}function f1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Kt();e=ll(l);var i=il(t,e,l);i!==null&&(Ut(i,t,l),ua(i,t,l)),t={cache:uc()},e.payload=t;return}t=t.return}}function h1(e,t,l){var i=Kt();l={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Tr(e)?Bh(t,l):(l=Iu(e,t,l,i),l!==null&&(Ut(l,e,i),Uh(l,t,i)))}function Lh(e,t,l){var i=Kt();ha(e,t,l,i)}function ha(e,t,l,i){var c={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Tr(e))Bh(t,c);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var g=t.lastRenderedState,b=o(g,l);if(c.hasEagerState=!0,c.eagerState=b,Yt(b,g))return rr(e,t,c,0),Fe===null&&ar(),!1}catch{}finally{}if(l=Iu(e,t,c,i),l!==null)return Ut(l,e,i),Uh(l,t,i),!0}return!1}function Oc(e,t,l,i){if(i={lane:2,revertLane:fs(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Tr(e)){if(t)throw Error(u(479))}else t=Iu(e,l,i,2),t!==null&&Ut(t,e,2)}function Tr(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Bh(e,t){Si=br=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Uh(e,t,l){if((l&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,l|=i,t.lanes=l,Go(e,l)}}var da={readContext:St,use:kr,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};da.useEffectEvent=tt;var Hh={readContext:St,use:kr,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:kh,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Er(4194308,4,Th.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Er(4194308,4,e,t)},useInsertionEffect:function(e,t){Er(4,2,e,t)},useMemo:function(e,t){var l=wt();t=t===void 0?null:t;var i=e();if(Hl){xt(!0);try{e()}finally{xt(!1)}}return l.memoizedState=[i,t],i},useReducer:function(e,t,l){var i=wt();if(l!==void 0){var c=l(t);if(Hl){xt(!0);try{l(t)}finally{xt(!1)}}}else c=t;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=h1.bind(null,Ee,e),[i.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:function(e){e=Tc(e);var t=e.queue,l=Lh.bind(null,Ee,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:wc,useDeferredValue:function(e,t){var l=wt();return Mc(l,e,t)},useTransition:function(){var e=Tc(!1);return e=Nh.bind(null,Ee,e.queue,!0,!1),wt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var i=Ee,c=wt();if(je){if(l===void 0)throw Error(u(407));l=l()}else{if(l=t(),Fe===null)throw Error(u(349));(Ne&127)!==0||rh(i,t,l)}c.memoizedState=l;var o={value:l,getSnapshot:t};return c.queue=o,kh(ch.bind(null,i,o,e),[e]),i.flags|=2048,_i(9,{destroy:void 0},uh.bind(null,i,o,l,t),null),l},useId:function(){var e=wt(),t=Fe.identifierPrefix;if(je){var l=xn,i=yn;l=(i&~(1<<32-Ye(i)-1)).toString(32)+l,t="_"+t+"R_"+l,l=vr++,0<\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof i.is=="string"?g.createElement("select",{is:i.is}):g.createElement("select"),i.multiple?o.multiple=!0:i.size&&(o.size=i.size);break;default:o=typeof i.is=="string"?g.createElement(c,{is:i.is}):g.createElement(c)}}o[bt]=t,o[Dt]=i;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)o.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=o;e:switch(_t(o,c,i),c){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Rn(t)}}return We(t),Kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Rn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(u(166));if(e=fe.current,mi(t)){if(e=t.stateNode,l=t.memoizedProps,i=null,c=vt,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[bt]=t,e=!!(e.nodeValue===l||i!==null&&i.suppressHydrationWarning===!0||im(e.nodeValue,l)),e||el(t,!0)}else e=Zr(e).createTextNode(i),e[bt]=t,t.stateNode=e}return We(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(i=mi(t),l!==null){if(e===null){if(!i)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[bt]=t}else Dl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),e=!1}else l=lc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Qt(t),t):(Qt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return We(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=mi(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(u(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(u(317));c[bt]=t}else Dl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),c=!1}else c=lc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Qt(t),t):(Qt(t),null)}return Qt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=i!==null,e=e!==null&&e.memoizedState!==null,l&&(i=t.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==c&&(i.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Nr(t,t.updateQueue),We(t),null);case 4:return Le(),e===null&&ps(t.stateNode.containerInfo),We(t),null;case 10:return Nn(t.type),We(t),null;case 19:if(U(lt),i=t.memoizedState,i===null)return We(t),null;if(c=(t.flags&128)!==0,o=i.rendering,o===null)if(c)pa(i,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=xr(e),o!==null){for(t.flags|=128,pa(i,!1),e=o.updateQueue,t.updateQueue=e,Nr(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Lf(l,e),l=l.sibling;return _(lt,lt.current&1|2),je&&wn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&ot()>Lr&&(t.flags|=128,c=!0,pa(i,!1),t.lanes=4194304)}else{if(!c)if(e=xr(o),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Nr(t,e),pa(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!je)return We(t),null}else 2*ot()-i.renderingStartTime>Lr&&l!==536870912&&(t.flags|=128,c=!0,pa(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(e=i.last,e!==null?e.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=ot(),e.sibling=null,l=lt.current,_(lt,c?l&1|2:l&1),je&&wn(t,i.treeForkCount),e):(We(t),null);case 22:case 23:return Qt(t),gc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(l&536870912)!==0&&(t.flags&128)===0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),l=t.updateQueue,l!==null&&Nr(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==l&&(t.flags|=2048),e!==null&&U(Rl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Nn(at),We(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function y1(e,t){switch(tc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nn(at),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return It(t),null;case 31:if(t.memoizedState!==null){if(Qt(t),t.alternate===null)throw Error(u(340));Dl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Dl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(lt),null;case 4:return Le(),null;case 10:return Nn(t.type),null;case 22:case 23:return Qt(t),gc(),e!==null&&U(Rl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Nn(at),null;case 25:return null;default:return null}}function sd(e,t){switch(tc(t),t.tag){case 3:Nn(at),Le();break;case 26:case 27:case 5:It(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&Qt(t);break;case 13:Qt(t);break;case 19:U(lt);break;case 10:Nn(t.type);break;case 22:case 23:Qt(t),gc(),e!==null&&U(Rl);break;case 24:Nn(at)}}function ga(e,t){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var c=i.next;l=c;do{if((l.tag&e)===e){i=void 0;var o=l.create,g=l.inst;i=o(),g.destroy=i}l=l.next}while(l!==c)}}catch(b){Ve(t,t.return,b)}}function ul(e,t,l){try{var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var o=c.next;i=o;do{if((i.tag&e)===e){var g=i.inst,b=g.destroy;if(b!==void 0){g.destroy=void 0,c=t;var A=l,N=b;try{N()}catch(q){Ve(c,A,q)}}}i=i.next}while(i!==o)}}catch(q){Ve(t,t.return,q)}}function od(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{eh(t,l)}catch(i){Ve(e,e.return,i)}}}function fd(e,t,l){l.props=ql(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(i){Ve(e,t,i)}}function ya(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof l=="function"?e.refCleanup=l(i):l.current=i}}catch(c){Ve(e,t,c)}}function bn(e,t){var l=e.ref,i=e.refCleanup;if(l!==null)if(typeof i=="function")try{i()}catch(c){Ve(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(c){Ve(e,t,c)}else l.current=null}function hd(e){var t=e.type,l=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&i.focus();break e;case"img":l.src?i.src=l.src:l.srcSet&&(i.srcset=l.srcSet)}}catch(c){Ve(e,e.return,c)}}function Fc(e,t,l){try{var i=e.stateNode;H1(i,e.type,l,t),i[Dt]=t}catch(c){Ve(e,e.return,c)}}function dd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ml(e.type)||e.tag===4}function Jc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||dd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ml(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ic(e,t,l){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Tn));else if(i!==4&&(i===27&&ml(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Ic(e,t,l),e=e.sibling;e!==null;)Ic(e,t,l),e=e.sibling}function Dr(e,t,l){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(i!==4&&(i===27&&ml(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Dr(e,t,l),e=e.sibling;e!==null;)Dr(e,t,l),e=e.sibling}function md(e){var t=e.stateNode,l=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);_t(t,i,l),t[bt]=e,t[Dt]=l}catch(o){Ve(e,e.return,o)}}var Ln=!1,ct=!1,$c=!1,pd=typeof WeakSet=="function"?WeakSet:Set,yt=null;function x1(e,t){if(e=e.containerInfo,xs=Pr,e=zf(e),Qu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var i=l.getSelection&&l.getSelection();if(i&&i.rangeCount!==0){l=i.anchorNode;var c=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{l.nodeType,o.nodeType}catch{l=null;break e}var g=0,b=-1,A=-1,N=0,q=0,Q=e,j=null;t:for(;;){for(var B;Q!==l||c!==0&&Q.nodeType!==3||(b=g+c),Q!==o||i!==0&&Q.nodeType!==3||(A=g+i),Q.nodeType===3&&(g+=Q.nodeValue.length),(B=Q.firstChild)!==null;)j=Q,Q=B;for(;;){if(Q===e)break t;if(j===l&&++N===c&&(b=g),j===o&&++q===i&&(A=g),(B=Q.nextSibling)!==null)break;Q=j,j=Q.parentNode}Q=B}l=b===-1||A===-1?null:{start:b,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(bs={focusedElem:e,selectionRange:l},Pr=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){switch(t=yt,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l title"))),_t(o,i,l),o[bt]=e,gt(o),i=o;break e;case"link":var g=Sm("link","href",c).get(i+(l.href||""));if(g){for(var b=0;bKe&&(g=Ke,Ke=ge,ge=g);var w=Af(b,ge),z=Af(b,Ke);if(w&&z&&(B.rangeCount!==1||B.anchorNode!==w.node||B.anchorOffset!==w.offset||B.focusNode!==z.node||B.focusOffset!==z.offset)){var M=Q.createRange();M.setStart(w.node,w.offset),B.removeAllRanges(),ge>Ke?(B.addRange(M),B.extend(z.node,z.offset)):(M.setEnd(z.node,z.offset),B.addRange(M))}}}}for(Q=[],B=b;B=B.parentNode;)B.nodeType===1&&Q.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;bl?32:l,O.T=null,l=is,is=null;var o=fl,g=Yn;if(ht=0,Ci=fl=null,Yn=0,(qe&6)!==0)throw Error(u(331));var b=qe;if(qe|=4,Td(o.current),_d(o,o.current,g,l),qe=b,_a(0,!1),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(mt,o)}catch{}return!0}finally{F.p=c,O.T=i,Qd(e,t)}}function Zd(e,t,l){t=tn(l,t),t=Bc(e.stateNode,t,2),e=il(e,t,2),e!==null&&(Jn(e,2),vn(e))}function Ve(e,t,l){if(e.tag===3)Zd(e,e,l);else for(;t!==null;){if(t.tag===3){Zd(t,e,l);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(ol===null||!ol.has(i))){e=tn(l,e),l=Kh(2),i=il(t,l,2),i!==null&&(Fh(l,i,t,e),Jn(i,2),vn(i));break}}t=t.return}}function cs(e,t,l){var i=e.pingCache;if(i===null){i=e.pingCache=new S1;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(l)||(es=!0,c.add(l),e=T1.bind(null,e,t,l),t.then(e,e))}function T1(e,t,l){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Fe===e&&(Ne&l)===l&&(nt===4||nt===3&&(Ne&62914560)===Ne&&300>ot()-Rr?(qe&2)===0&&wi(e,0):ts|=l,zi===Ne&&(zi=0)),vn(e)}function Kd(e,t){t===0&&(t=Ka()),e=Ml(e,t),e!==null&&(Jn(e,t),vn(e))}function z1(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Kd(e,l)}function C1(e,t){var l=0;switch(e.tag){case 31:case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(l=c.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(u(314))}i!==null&&i.delete(t),Kd(e,l)}function w1(e,t){return Fn(e,t)}var Gr=null,Ni=null,ss=!1,Vr=!1,os=!1,dl=0;function vn(e){e!==Ni&&e.next===null&&(Ni===null?Gr=Ni=e:Ni=Ni.next=e),Vr=!0,ss||(ss=!0,N1())}function _a(e,t){if(!os&&Vr){os=!0;do for(var l=!1,i=Gr;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var o=0;else{var g=i.suspendedLanes,b=i.pingedLanes;o=(1<<31-Ye(42|e)+1)-1,o&=c&~(g&~b),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(l=!0,$d(i,o))}else o=Ne,o=Il(i,i===Fe?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(o&3)===0||fn(i,o)||(l=!0,$d(i,o));i=i.next}while(l);os=!1}}function M1(){Fd()}function Fd(){Vr=ss=!1;var e=0;dl!==0&&Y1()&&(e=dl);for(var t=ot(),l=null,i=Gr;i!==null;){var c=i.next,o=Jd(i,t);o===0?(i.next=null,l===null?Gr=c:l.next=c,c===null&&(Ni=l)):(l=i,(e!==0||(o&3)!==0)&&(Vr=!0)),i=c}ht!==0&&ht!==5||_a(e),dl!==0&&(dl=0)}function Jd(e,t){for(var l=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,o=e.pendingLanes&-62914561;0b)break;var q=A.transferSize,Q=A.initiatorType;q&&am(Q)&&(A=A.responseEnd,g+=q*(A"u"?null:document;function ym(e,t,l){var i=Di;if(i&&typeof t=="string"&&t){var c=Pt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof l=="string"&&(c+='[crossorigin="'+l+'"]'),gm.has(c)||(gm.add(c),e={rel:e,crossOrigin:l,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),_t(t,"link",e),gt(t),i.head.appendChild(t)))}}function I1(e){Gn.D(e),ym("dns-prefetch",e,null)}function $1(e,t){Gn.C(e,t),ym("preconnect",e,t)}function W1(e,t,l){Gn.L(e,t,l);var i=Di;if(i&&e&&t){var c='link[rel="preload"][as="'+Pt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(c+='[imagesrcset="'+Pt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(c+='[imagesizes="'+Pt(l.imageSizes)+'"]')):c+='[href="'+Pt(e)+'"]';var o=c;switch(t){case"style":o=Oi(e);break;case"script":o=ji(e)}cn.has(o)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),cn.set(o,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(za(o))||t==="script"&&i.querySelector(Ca(o))||(t=i.createElement("link"),_t(t,"link",e),gt(t),i.head.appendChild(t)))}}function P1(e,t){Gn.m(e,t);var l=Di;if(l&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Pt(i)+'"][href="'+Pt(e)+'"]',o=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=ji(e)}if(!cn.has(o)&&(e=y({rel:"modulepreload",href:e},t),cn.set(o,e),l.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ca(o)))return}i=l.createElement("link"),_t(i,"link",e),gt(i),l.head.appendChild(i)}}}function e0(e,t,l){Gn.S(e,t,l);var i=Di;if(i&&e){var c=ti(i).hoistableStyles,o=Oi(e);t=t||"default";var g=c.get(o);if(!g){var b={loading:0,preload:null};if(g=i.querySelector(za(o)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=cn.get(o))&&Ts(e,l);var A=g=i.createElement("link");gt(A),_t(A,"link",e),A._p=new Promise(function(N,q){A.onload=N,A.onerror=q}),A.addEventListener("load",function(){b.loading|=1}),A.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Fr(g,t,i)}g={type:"stylesheet",instance:g,count:1,state:b},c.set(o,g)}}}function t0(e,t){Gn.X(e,t);var l=Di;if(l&&e){var i=ti(l).hoistableScripts,c=ji(e),o=i.get(c);o||(o=l.querySelector(Ca(c)),o||(e=y({src:e,async:!0},t),(t=cn.get(c))&&zs(e,t),o=l.createElement("script"),gt(o),_t(o,"link",e),l.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(c,o))}}function n0(e,t){Gn.M(e,t);var l=Di;if(l&&e){var i=ti(l).hoistableScripts,c=ji(e),o=i.get(c);o||(o=l.querySelector(Ca(c)),o||(e=y({src:e,async:!0,type:"module"},t),(t=cn.get(c))&&zs(e,t),o=l.createElement("script"),gt(o),_t(o,"link",e),l.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(c,o))}}function xm(e,t,l,i){var c=(c=fe.current)?Kr(c):null;if(!c)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Oi(l.href),l=ti(c).hoistableStyles,i=l.get(t),i||(i={type:"style",instance:null,count:0,state:null},l.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Oi(l.href);var o=ti(c).hoistableStyles,g=o.get(e);if(g||(c=c.ownerDocument||c,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,g),(o=c.querySelector(za(e)))&&!o._p&&(g.instance=o,g.state.loading=5),cn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},cn.set(e,l),o||l0(c,e,l,g.state))),t&&i===null)throw Error(u(528,""));return g}if(t&&i!==null)throw Error(u(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ji(l),l=ti(c).hoistableScripts,i=l.get(t),i||(i={type:"script",instance:null,count:0,state:null},l.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Oi(e){return'href="'+Pt(e)+'"'}function za(e){return'link[rel="stylesheet"]['+e+"]"}function bm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function l0(e,t,l,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),_t(t,"link",l),gt(t),e.head.appendChild(t))}function ji(e){return'[src="'+Pt(e)+'"]'}function Ca(e){return"script[async]"+e}function vm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Pt(l.href)+'"]');if(i)return t.instance=i,gt(i),i;var c=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),gt(i),_t(i,"style",c),Fr(i,l.precedence,e),t.instance=i;case"stylesheet":c=Oi(l.href);var o=e.querySelector(za(c));if(o)return t.state.loading|=4,t.instance=o,gt(o),o;i=bm(l),(c=cn.get(c))&&Ts(i,c),o=(e.ownerDocument||e).createElement("link"),gt(o);var g=o;return g._p=new Promise(function(b,A){g.onload=b,g.onerror=A}),_t(o,"link",i),t.state.loading|=4,Fr(o,l.precedence,e),t.instance=o;case"script":return o=ji(l.src),(c=e.querySelector(Ca(o)))?(t.instance=c,gt(c),c):(i=l,(c=cn.get(o))&&(i=y({},l),zs(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),gt(c),_t(c,"link",i),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Fr(i,l.precedence,e));return t.instance}function Fr(e,t,l){for(var i=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,o=c,g=0;g title"):null)}function i0(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function _m(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function a0(e,t,l,i){if(l.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var c=Oi(i.href),o=t.querySelector(za(c));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ir.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=o,gt(o);return}o=t.ownerDocument||t,i=bm(i),(c=cn.get(c))&&Ts(i,c),o=o.createElement("link"),gt(o);var g=o;g._p=new Promise(function(b,A){g.onload=b,g.onerror=A}),_t(o,"link",i),l.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Ir.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Cs=0;function r0(e,t){return e.stylesheets&&e.count===0&&Wr(e,e.stylesheets),0Cs?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(c)}}:null}function Ir(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Wr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $r=null;function Wr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$r=new Map,t.forEach(u0,e),$r=null,Ir.call(e))}function u0(e,t){if(!(t.state.loading&4)){var l=$r.get(e);if(l)var i=l.get(null);else{l=new Map,$r.set(e,l);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Bs.exports=_0(),Bs.exports}var A0=E0();function T0(n,a){const r={};return(n[n.length-1]===""?[...n,""]:n).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const z0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,C0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w0={};function Km(n,a){return(w0.jsx?C0:z0).test(n)}const M0=/[ \t\n\f\r]/g;function N0(n){return typeof n=="object"?n.type==="text"?Fm(n.value):!1:Fm(n)}function Fm(n){return n.replace(M0,"")===""}class Qa{constructor(a,r,u){this.normal=r,this.property=a,u&&(this.space=u)}}Qa.prototype.normal={};Qa.prototype.property={};Qa.prototype.space=void 0;function Gp(n,a){const r={},u={};for(const s of n)Object.assign(r,s.property),Object.assign(u,s.normal);return new Qa(r,u,a)}function ro(n){return n.toLowerCase()}class qt{constructor(a,r){this.attribute=r,this.property=a}}qt.prototype.attribute="";qt.prototype.booleanish=!1;qt.prototype.boolean=!1;qt.prototype.commaOrSpaceSeparated=!1;qt.prototype.commaSeparated=!1;qt.prototype.defined=!1;qt.prototype.mustUseProperty=!1;qt.prototype.number=!1;qt.prototype.overloadedBoolean=!1;qt.prototype.property="";qt.prototype.spaceSeparated=!1;qt.prototype.space=void 0;let D0=0;const ve=Kl(),st=Kl(),uo=Kl(),I=Kl(),Je=Kl(),Xl=Kl(),Ft=Kl();function Kl(){return 2**++D0}const co=Object.freeze(Object.defineProperty({__proto__:null,boolean:ve,booleanish:st,commaOrSpaceSeparated:Ft,commaSeparated:Xl,number:I,overloadedBoolean:uo,spaceSeparated:Je},Symbol.toStringTag,{value:"Module"})),Ys=Object.keys(co);class So extends qt{constructor(a,r,u,s){let h=-1;if(super(a,r),Jm(this,"space",s),typeof u=="number")for(;++h4&&r.slice(0,4)==="data"&&B0.test(a)){if(a.charAt(4)==="-"){const h=a.slice(5).replace(Im,q0);u="data"+h.charAt(0).toUpperCase()+h.slice(1)}else{const h=a.slice(4);if(!Im.test(h)){let f=h.replace(L0,H0);f.charAt(0)!=="-"&&(f="-"+f),a="data"+f}}s=So}return new s(u,a)}function H0(n){return"-"+n.toLowerCase()}function q0(n){return n.charAt(1).toUpperCase()}const Y0=Gp([Vp,O0,Zp,Kp,Fp],"html"),ko=Gp([Vp,j0,Zp,Kp,Fp],"svg");function G0(n){return n.join(" ").trim()}var Li={},Gs,$m;function V0(){if($m)return Gs;$m=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,r=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,h=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,m=/^\s+|\s+$/g,p=` +`,d="/",x="*",y="",S="comment",k="declaration";function C(V,D){if(typeof V!="string")throw new TypeError("First argument must be a string");if(!V)return[];D=D||{};var K=1,X=1;function ie(re){var $=re.match(a);$&&(K+=$.length);var O=re.lastIndexOf(p);X=~O?re.length-O:X+re.length}function te(){var re={line:K,column:X};return function($){return $.position=new L(re),be(),$}}function L(re){this.start=re,this.end={line:K,column:X},this.source=D.source}L.prototype.content=V;function J(re){var $=new Error(D.source+":"+K+":"+X+": "+re);if($.reason=re,$.filename=D.source,$.line=K,$.column=X,$.source=V,!D.silent)throw $}function de(re){var $=re.exec(V);if($){var O=$[0];return ie(O),V=V.slice(O.length),$}}function be(){de(r)}function R(re){var $;for(re=re||[];$=le();)$!==!1&&re.push($);return re}function le(){var re=te();if(!(d!=V.charAt(0)||x!=V.charAt(1))){for(var $=2;y!=V.charAt($)&&(x!=V.charAt($)||d!=V.charAt($+1));)++$;if($+=2,y===V.charAt($-1))return J("End of comment missing");var O=V.slice(2,$-2);return X+=2,ie(O),V=V.slice($),X+=2,re({type:S,comment:O})}}function ne(){var re=te(),$=de(u);if($){if(le(),!de(s))return J("property missing ':'");var O=de(h),F=re({type:k,property:H($[0].replace(n,y)),value:O?H(O[0].replace(n,y)):y});return de(f),F}}function Te(){var re=[];R(re);for(var $;$=ne();)$!==!1&&(re.push($),R(re));return re}return be(),Te()}function H(V){return V?V.replace(m,y):y}return Gs=C,Gs}var Wm;function Q0(){if(Wm)return Li;Wm=1;var n=Li&&Li.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Li,"__esModule",{value:!0}),Li.default=r;const a=n(V0());function r(u,s){let h=null;if(!u||typeof u!="string")return h;const f=(0,a.default)(u),m=typeof s=="function";return f.forEach(p=>{if(p.type!=="declaration")return;const{property:d,value:x}=p;m?s(d,x,p):x&&(h=h||{},h[d]=x)}),h}return Li}var Ra={},Pm;function X0(){if(Pm)return Ra;Pm=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,r=/^[^-]+$/,u=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,h=function(d){return!d||r.test(d)||n.test(d)},f=function(d,x){return x.toUpperCase()},m=function(d,x){return"".concat(x,"-")},p=function(d,x){return x===void 0&&(x={}),h(d)?d:(d=d.toLowerCase(),x.reactCompat?d=d.replace(s,m):d=d.replace(u,m),d.replace(a,f))};return Ra.camelCase=p,Ra}var La,ep;function Z0(){if(ep)return La;ep=1;var n=La&&La.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},a=n(Q0()),r=X0();function u(s,h){var f={};return!s||typeof s!="string"||(0,a.default)(s,function(m,p){m&&p&&(f[(0,r.camelCase)(m,h)]=p)}),f}return u.default=u,La=u,La}var K0=Z0();const F0=Yp(K0),Jp=Ip("end"),_o=Ip("start");function Ip(n){return a;function a(r){const u=r&&r.position&&r.position[n]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function J0(n){const a=_o(n),r=Jp(n);if(a&&r)return{start:a,end:r}}function Ha(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?tp(n.position):"start"in n||"end"in n?tp(n):"line"in n||"column"in n?so(n):""}function so(n){return np(n&&n.line)+":"+np(n&&n.column)}function tp(n){return so(n&&n.start)+"-"+so(n&&n.end)}function np(n){return n&&typeof n=="number"?n:1}class Ct extends Error{constructor(a,r,u){super(),typeof r=="string"&&(u=r,r=void 0);let s="",h={},f=!1;if(r&&("line"in r&&"column"in r?h={place:r}:"start"in r&&"end"in r?h={place:r}:"type"in r?h={ancestors:[r],place:r.position}:h={...r}),typeof a=="string"?s=a:!h.cause&&a&&(f=!0,s=a.message,h.cause=a),!h.ruleId&&!h.source&&typeof u=="string"){const p=u.indexOf(":");p===-1?h.ruleId=u:(h.source=u.slice(0,p),h.ruleId=u.slice(p+1))}if(!h.place&&h.ancestors&&h.ancestors){const p=h.ancestors[h.ancestors.length-1];p&&(h.place=p.position)}const m=h.place&&"start"in h.place?h.place.start:h.place;this.ancestors=h.ancestors||void 0,this.cause=h.cause||void 0,this.column=m?m.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=m?m.line:void 0,this.name=Ha(h.place)||"1:1",this.place=h.place||void 0,this.reason=this.message,this.ruleId=h.ruleId||void 0,this.source=h.source||void 0,this.stack=f&&h.cause&&typeof h.cause.stack=="string"?h.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ct.prototype.file="";Ct.prototype.name="";Ct.prototype.reason="";Ct.prototype.message="";Ct.prototype.stack="";Ct.prototype.column=void 0;Ct.prototype.line=void 0;Ct.prototype.ancestors=void 0;Ct.prototype.cause=void 0;Ct.prototype.fatal=void 0;Ct.prototype.place=void 0;Ct.prototype.ruleId=void 0;Ct.prototype.source=void 0;const Eo={}.hasOwnProperty,I0=new Map,$0=/[A-Z]/g,W0=new Set(["table","tbody","thead","tfoot","tr"]),P0=new Set(["td","th"]),$p="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ex(n,a){if(!a||a.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=a.filePath||void 0;let u;if(a.development){if(typeof a.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");u=cx(r,a.jsxDEV)}else{if(typeof a.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof a.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");u=ux(r,a.jsx,a.jsxs)}const s={Fragment:a.Fragment,ancestors:[],components:a.components||{},create:u,elementAttributeNameCase:a.elementAttributeNameCase||"react",evaluater:a.createEvaluater?a.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:a.ignoreInvalidStyle||!1,passKeys:a.passKeys!==!1,passNode:a.passNode||!1,schema:a.space==="svg"?ko:Y0,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},h=Wp(s,n,void 0);return h&&typeof h!="string"?h:s.create(n,s.Fragment,{children:h||void 0},void 0)}function Wp(n,a,r){if(a.type==="element")return tx(n,a,r);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return nx(n,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return ix(n,a,r);if(a.type==="mdxjsEsm")return lx(n,a);if(a.type==="root")return ax(n,a,r);if(a.type==="text")return rx(n,a)}function tx(n,a,r){const u=n.schema;let s=u;a.tagName.toLowerCase()==="svg"&&u.space==="html"&&(s=ko,n.schema=s),n.ancestors.push(a);const h=eg(n,a.tagName,!1),f=sx(n,a);let m=To(n,a);return W0.has(a.tagName)&&(m=m.filter(function(p){return typeof p=="string"?!N0(p):!0})),Pp(n,f,h,a),Ao(f,m),n.ancestors.pop(),n.schema=u,n.create(a,h,f,r)}function nx(n,a){if(a.data&&a.data.estree&&n.evaluater){const u=a.data.estree.body[0];return u.type,n.evaluater.evaluateExpression(u.expression)}Ga(n,a.position)}function lx(n,a){if(a.data&&a.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(a.data.estree);Ga(n,a.position)}function ix(n,a,r){const u=n.schema;let s=u;a.name==="svg"&&u.space==="html"&&(s=ko,n.schema=s),n.ancestors.push(a);const h=a.name===null?n.Fragment:eg(n,a.name,!0),f=ox(n,a),m=To(n,a);return Pp(n,f,h,a),Ao(f,m),n.ancestors.pop(),n.schema=u,n.create(a,h,f,r)}function ax(n,a,r){const u={};return Ao(u,To(n,a)),n.create(a,n.Fragment,u,r)}function rx(n,a){return a.value}function Pp(n,a,r,u){typeof r!="string"&&r!==n.Fragment&&n.passNode&&(a.node=u)}function Ao(n,a){if(a.length>0){const r=a.length>1?a:a[0];r&&(n.children=r)}}function ux(n,a,r){return u;function u(s,h,f,m){const d=Array.isArray(f.children)?r:a;return m?d(h,f,m):d(h,f)}}function cx(n,a){return r;function r(u,s,h,f){const m=Array.isArray(h.children),p=_o(u);return a(s,h,f,m,{columnNumber:p?p.column-1:void 0,fileName:n,lineNumber:p?p.line:void 0},void 0)}}function sx(n,a){const r={};let u,s;for(s in a.properties)if(s!=="children"&&Eo.call(a.properties,s)){const h=fx(n,s,a.properties[s]);if(h){const[f,m]=h;n.tableCellAlignToStyle&&f==="align"&&typeof m=="string"&&P0.has(a.tagName)?u=m:r[f]=m}}if(u){const h=r.style||(r.style={});h[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return r}function ox(n,a){const r={};for(const u of a.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&n.evaluater){const h=u.data.estree.body[0];h.type;const f=h.expression;f.type;const m=f.properties[0];m.type,Object.assign(r,n.evaluater.evaluateExpression(m.argument))}else Ga(n,a.position);else{const s=u.name;let h;if(u.value&&typeof u.value=="object")if(u.value.data&&u.value.data.estree&&n.evaluater){const m=u.value.data.estree.body[0];m.type,h=n.evaluater.evaluateExpression(m.expression)}else Ga(n,a.position);else h=u.value===null?!0:u.value;r[s]=h}return r}function To(n,a){const r=[];let u=-1;const s=n.passKeys?new Map:I0;for(;++us?0:s+a:a=a>s?s:a,r=r>0?r:0,u.length<1e4)f=Array.from(u),f.unshift(a,r),n.splice(...f);else for(r&&n.splice(a,r);h0?(Jt(n,n.length,0,a),n):a}const ap={}.hasOwnProperty;function ng(n){const a={};let r=-1;for(;++r13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function pn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mt=Sl(/[A-Za-z]/),zt=Sl(/[\dA-Za-z]/),vx=Sl(/[#-'*+\--9=?A-Z^-~]/);function du(n){return n!==null&&(n<32||n===127)}const oo=Sl(/\d/),Sx=Sl(/[\dA-Fa-f]/),kx=Sl(/[!-/:-@[-`{-~]/);function pe(n){return n!==null&&n<-2}function Ie(n){return n!==null&&(n<0||n===32)}function Me(n){return n===-2||n===-1||n===32}const xu=Sl(new RegExp("\\p{P}|\\p{S}","u")),Zl=Sl(/\s/);function Sl(n){return a;function a(r){return r!==null&&r>-1&&n.test(String.fromCharCode(r))}}function Yi(n){const a=[];let r=-1,u=0,s=0;for(;++r55295&&h<57344){const m=n.charCodeAt(r+1);h<56320&&m>56319&&m<57344?(f=String.fromCharCode(h,m),s=1):f="�"}else f=String.fromCharCode(h);f&&(a.push(n.slice(u,r),encodeURIComponent(f)),u=r+s+1,f=""),s&&(r+=s,s=0)}return a.join("")+n.slice(u)}function Re(n,a,r,u){const s=u?u-1:Number.POSITIVE_INFINITY;let h=0;return f;function f(p){return Me(p)?(n.enter(r),m(p)):a(p)}function m(p){return Me(p)&&h++f))return;const J=a.events.length;let de=J,be,R;for(;de--;)if(a.events[de][0]==="exit"&&a.events[de][1].type==="chunkFlow"){if(be){R=a.events[de][1].end;break}be=!0}for(D(u),L=J;LX;){const te=r[ie];a.containerState=te[1],te[0].exit.call(a,n)}r.length=X}function K(){s.write([null]),h=void 0,s=void 0,a.containerState._closeFlow=void 0}}function zx(n,a,r){return Re(n,n.attempt(this.parser.constructs.document,a,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ui(n){if(n===null||Ie(n)||Zl(n))return 1;if(xu(n))return 2}function bu(n,a,r){const u=[];let s=-1;for(;++s1&&n[r][1].end.offset-n[r][1].start.offset>1?2:1;const y={...n[u][1].end},S={...n[r][1].start};up(y,-p),up(S,p),f={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...n[u][1].end}},m={type:p>1?"strongSequence":"emphasisSequence",start:{...n[r][1].start},end:S},h={type:p>1?"strongText":"emphasisText",start:{...n[u][1].end},end:{...n[r][1].start}},s={type:p>1?"strong":"emphasis",start:{...f.start},end:{...m.end}},n[u][1].end={...f.start},n[r][1].start={...m.end},d=[],n[u][1].end.offset-n[u][1].start.offset&&(d=sn(d,[["enter",n[u][1],a],["exit",n[u][1],a]])),d=sn(d,[["enter",s,a],["enter",f,a],["exit",f,a],["enter",h,a]]),d=sn(d,bu(a.parser.constructs.insideSpan.null,n.slice(u+1,r),a)),d=sn(d,[["exit",h,a],["enter",m,a],["exit",m,a],["exit",s,a]]),n[r][1].end.offset-n[r][1].start.offset?(x=2,d=sn(d,[["enter",n[r][1],a],["exit",n[r][1],a]])):x=0,Jt(n,u-1,r-u+3,d),r=u+d.length-x-2;break}}for(r=-1;++r0&&Me(L)?Re(n,K,"linePrefix",h+1)(L):K(L)}function K(L){return L===null||pe(L)?n.check(cp,H,ie)(L):(n.enter("codeFlowValue"),X(L))}function X(L){return L===null||pe(L)?(n.exit("codeFlowValue"),K(L)):(n.consume(L),X)}function ie(L){return n.exit("codeFenced"),a(L)}function te(L,J,de){let be=0;return R;function R($){return L.enter("lineEnding"),L.consume($),L.exit("lineEnding"),le}function le($){return L.enter("codeFencedFence"),Me($)?Re(L,ne,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):ne($)}function ne($){return $===m?(L.enter("codeFencedFenceSequence"),Te($)):de($)}function Te($){return $===m?(be++,L.consume($),Te):be>=f?(L.exit("codeFencedFenceSequence"),Me($)?Re(L,re,"whitespace")($):re($)):de($)}function re($){return $===null||pe($)?(L.exit("codeFencedFence"),J($)):de($)}}}function Hx(n,a,r){const u=this;return s;function s(f){return f===null?r(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),h)}function h(f){return u.parser.lazy[u.now().line]?r(f):a(f)}}const Qs={name:"codeIndented",tokenize:Yx},qx={partial:!0,tokenize:Gx};function Yx(n,a,r){const u=this;return s;function s(d){return n.enter("codeIndented"),Re(n,h,"linePrefix",5)(d)}function h(d){const x=u.events[u.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?f(d):r(d)}function f(d){return d===null?p(d):pe(d)?n.attempt(qx,f,p)(d):(n.enter("codeFlowValue"),m(d))}function m(d){return d===null||pe(d)?(n.exit("codeFlowValue"),f(d)):(n.consume(d),m)}function p(d){return n.exit("codeIndented"),a(d)}}function Gx(n,a,r){const u=this;return s;function s(f){return u.parser.lazy[u.now().line]?r(f):pe(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),s):Re(n,h,"linePrefix",5)(f)}function h(f){const m=u.events[u.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(f):pe(f)?s(f):r(f)}}const Vx={name:"codeText",previous:Xx,resolve:Qx,tokenize:Zx};function Qx(n){let a=n.length-4,r=3,u,s;if((n[r][1].type==="lineEnding"||n[r][1].type==="space")&&(n[a][1].type==="lineEnding"||n[a][1].type==="space")){for(u=r;++u=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+a+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return athis.left.length?this.right.slice(this.right.length-u+this.left.length,this.right.length-a+this.left.length).reverse():this.left.slice(a).concat(this.right.slice(this.right.length-u+this.left.length).reverse())}splice(a,r,u){const s=r||0;this.setCursor(Math.trunc(a));const h=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return u&&Ba(this.left,u),h.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(a){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(a)}pushMany(a){this.setCursor(Number.POSITIVE_INFINITY),Ba(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),Ba(this.right,a.reverse())}setCursor(a){if(!(a===this.left.length||a>this.left.length&&this.right.length===0||a<0&&this.left.length===0))if(a=4?a(f):n.interrupt(u.parser.constructs.flow,r,a)(f)}}function cg(n,a,r,u,s,h,f,m,p){const d=p||Number.POSITIVE_INFINITY;let x=0;return y;function y(D){return D===60?(n.enter(u),n.enter(s),n.enter(h),n.consume(D),n.exit(h),S):D===null||D===32||D===41||du(D)?r(D):(n.enter(u),n.enter(f),n.enter(m),n.enter("chunkString",{contentType:"string"}),H(D))}function S(D){return D===62?(n.enter(h),n.consume(D),n.exit(h),n.exit(s),n.exit(u),a):(n.enter(m),n.enter("chunkString",{contentType:"string"}),k(D))}function k(D){return D===62?(n.exit("chunkString"),n.exit(m),S(D)):D===null||D===60||pe(D)?r(D):(n.consume(D),D===92?C:k)}function C(D){return D===60||D===62||D===92?(n.consume(D),k):k(D)}function H(D){return!x&&(D===null||D===41||Ie(D))?(n.exit("chunkString"),n.exit(m),n.exit(f),n.exit(u),a(D)):x999||k===null||k===91||k===93&&!p||k===94&&!m&&"_hiddenFootnoteSupport"in f.parser.constructs?r(k):k===93?(n.exit(h),n.enter(s),n.consume(k),n.exit(s),n.exit(u),a):pe(k)?(n.enter("lineEnding"),n.consume(k),n.exit("lineEnding"),x):(n.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===null||k===91||k===93||pe(k)||m++>999?(n.exit("chunkString"),x(k)):(n.consume(k),p||(p=!Me(k)),k===92?S:y)}function S(k){return k===91||k===92||k===93?(n.consume(k),m++,y):y(k)}}function og(n,a,r,u,s,h){let f;return m;function m(S){return S===34||S===39||S===40?(n.enter(u),n.enter(s),n.consume(S),n.exit(s),f=S===40?41:S,p):r(S)}function p(S){return S===f?(n.enter(s),n.consume(S),n.exit(s),n.exit(u),a):(n.enter(h),d(S))}function d(S){return S===f?(n.exit(h),p(f)):S===null?r(S):pe(S)?(n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),Re(n,d,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),x(S))}function x(S){return S===f||S===null||pe(S)?(n.exit("chunkString"),d(S)):(n.consume(S),S===92?y:x)}function y(S){return S===f||S===92?(n.consume(S),x):x(S)}}function qa(n,a){let r;return u;function u(s){return pe(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),r=!0,u):Me(s)?Re(n,u,r?"linePrefix":"lineSuffix")(s):a(s)}}const eb={name:"definition",tokenize:nb},tb={partial:!0,tokenize:lb};function nb(n,a,r){const u=this;let s;return h;function h(k){return n.enter("definition"),f(k)}function f(k){return sg.call(u,n,m,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(k)}function m(k){return s=pn(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),p):r(k)}function p(k){return Ie(k)?qa(n,d)(k):d(k)}function d(k){return cg(n,x,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(k)}function x(k){return n.attempt(tb,y,y)(k)}function y(k){return Me(k)?Re(n,S,"whitespace")(k):S(k)}function S(k){return k===null||pe(k)?(n.exit("definition"),u.parser.defined.push(s),a(k)):r(k)}}function lb(n,a,r){return u;function u(m){return Ie(m)?qa(n,s)(m):r(m)}function s(m){return og(n,h,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(m)}function h(m){return Me(m)?Re(n,f,"whitespace")(m):f(m)}function f(m){return m===null||pe(m)?a(m):r(m)}}const ib={name:"hardBreakEscape",tokenize:ab};function ab(n,a,r){return u;function u(h){return n.enter("hardBreakEscape"),n.consume(h),s}function s(h){return pe(h)?(n.exit("hardBreakEscape"),a(h)):r(h)}}const rb={name:"headingAtx",resolve:ub,tokenize:cb};function ub(n,a){let r=n.length-2,u=3,s,h;return n[u][1].type==="whitespace"&&(u+=2),r-2>u&&n[r][1].type==="whitespace"&&(r-=2),n[r][1].type==="atxHeadingSequence"&&(u===r-1||r-4>u&&n[r-2][1].type==="whitespace")&&(r-=u+1===r?2:4),r>u&&(s={type:"atxHeadingText",start:n[u][1].start,end:n[r][1].end},h={type:"chunkText",start:n[u][1].start,end:n[r][1].end,contentType:"text"},Jt(n,u,r-u+1,[["enter",s,a],["enter",h,a],["exit",h,a],["exit",s,a]])),n}function cb(n,a,r){let u=0;return s;function s(x){return n.enter("atxHeading"),h(x)}function h(x){return n.enter("atxHeadingSequence"),f(x)}function f(x){return x===35&&u++<6?(n.consume(x),f):x===null||Ie(x)?(n.exit("atxHeadingSequence"),m(x)):r(x)}function m(x){return x===35?(n.enter("atxHeadingSequence"),p(x)):x===null||pe(x)?(n.exit("atxHeading"),a(x)):Me(x)?Re(n,m,"whitespace")(x):(n.enter("atxHeadingText"),d(x))}function p(x){return x===35?(n.consume(x),p):(n.exit("atxHeadingSequence"),m(x))}function d(x){return x===null||x===35||Ie(x)?(n.exit("atxHeadingText"),m(x)):(n.consume(x),d)}}const sb=["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"],op=["pre","script","style","textarea"],ob={concrete:!0,name:"htmlFlow",resolveTo:db,tokenize:mb},fb={partial:!0,tokenize:gb},hb={partial:!0,tokenize:pb};function db(n){let a=n.length;for(;a--&&!(n[a][0]==="enter"&&n[a][1].type==="htmlFlow"););return a>1&&n[a-2][1].type==="linePrefix"&&(n[a][1].start=n[a-2][1].start,n[a+1][1].start=n[a-2][1].start,n.splice(a-2,2)),n}function mb(n,a,r){const u=this;let s,h,f,m,p;return d;function d(_){return x(_)}function x(_){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(_),y}function y(_){return _===33?(n.consume(_),S):_===47?(n.consume(_),h=!0,H):_===63?(n.consume(_),s=3,u.interrupt?a:E):Mt(_)?(n.consume(_),f=String.fromCharCode(_),V):r(_)}function S(_){return _===45?(n.consume(_),s=2,k):_===91?(n.consume(_),s=5,m=0,C):Mt(_)?(n.consume(_),s=4,u.interrupt?a:E):r(_)}function k(_){return _===45?(n.consume(_),u.interrupt?a:E):r(_)}function C(_){const ee="CDATA[";return _===ee.charCodeAt(m++)?(n.consume(_),m===ee.length?u.interrupt?a:ne:C):r(_)}function H(_){return Mt(_)?(n.consume(_),f=String.fromCharCode(_),V):r(_)}function V(_){if(_===null||_===47||_===62||Ie(_)){const ee=_===47,oe=f.toLowerCase();return!ee&&!h&&op.includes(oe)?(s=1,u.interrupt?a(_):ne(_)):sb.includes(f.toLowerCase())?(s=6,ee?(n.consume(_),D):u.interrupt?a(_):ne(_)):(s=7,u.interrupt&&!u.parser.lazy[u.now().line]?r(_):h?K(_):X(_))}return _===45||zt(_)?(n.consume(_),f+=String.fromCharCode(_),V):r(_)}function D(_){return _===62?(n.consume(_),u.interrupt?a:ne):r(_)}function K(_){return Me(_)?(n.consume(_),K):R(_)}function X(_){return _===47?(n.consume(_),R):_===58||_===95||Mt(_)?(n.consume(_),ie):Me(_)?(n.consume(_),X):R(_)}function ie(_){return _===45||_===46||_===58||_===95||zt(_)?(n.consume(_),ie):te(_)}function te(_){return _===61?(n.consume(_),L):Me(_)?(n.consume(_),te):X(_)}function L(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(n.consume(_),p=_,J):Me(_)?(n.consume(_),L):de(_)}function J(_){return _===p?(n.consume(_),p=null,be):_===null||pe(_)?r(_):(n.consume(_),J)}function de(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Ie(_)?te(_):(n.consume(_),de)}function be(_){return _===47||_===62||Me(_)?X(_):r(_)}function R(_){return _===62?(n.consume(_),le):r(_)}function le(_){return _===null||pe(_)?ne(_):Me(_)?(n.consume(_),le):r(_)}function ne(_){return _===45&&s===2?(n.consume(_),O):_===60&&s===1?(n.consume(_),F):_===62&&s===4?(n.consume(_),T):_===63&&s===3?(n.consume(_),E):_===93&&s===5?(n.consume(_),Se):pe(_)&&(s===6||s===7)?(n.exit("htmlFlowData"),n.check(fb,U,Te)(_)):_===null||pe(_)?(n.exit("htmlFlowData"),Te(_)):(n.consume(_),ne)}function Te(_){return n.check(hb,re,U)(_)}function re(_){return n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),$}function $(_){return _===null||pe(_)?Te(_):(n.enter("htmlFlowData"),ne(_))}function O(_){return _===45?(n.consume(_),E):ne(_)}function F(_){return _===47?(n.consume(_),f="",ce):ne(_)}function ce(_){if(_===62){const ee=f.toLowerCase();return op.includes(ee)?(n.consume(_),T):ne(_)}return Mt(_)&&f.length<8?(n.consume(_),f+=String.fromCharCode(_),ce):ne(_)}function Se(_){return _===93?(n.consume(_),E):ne(_)}function E(_){return _===62?(n.consume(_),T):_===45&&s===2?(n.consume(_),E):ne(_)}function T(_){return _===null||pe(_)?(n.exit("htmlFlowData"),U(_)):(n.consume(_),T)}function U(_){return n.exit("htmlFlow"),a(_)}}function pb(n,a,r){const u=this;return s;function s(f){return pe(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),h):r(f)}function h(f){return u.parser.lazy[u.now().line]?r(f):a(f)}}function gb(n,a,r){return u;function u(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),n.attempt(Xa,a,r)}}const yb={name:"htmlText",tokenize:xb};function xb(n,a,r){const u=this;let s,h,f;return m;function m(E){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(E),p}function p(E){return E===33?(n.consume(E),d):E===47?(n.consume(E),te):E===63?(n.consume(E),X):Mt(E)?(n.consume(E),de):r(E)}function d(E){return E===45?(n.consume(E),x):E===91?(n.consume(E),h=0,C):Mt(E)?(n.consume(E),K):r(E)}function x(E){return E===45?(n.consume(E),k):r(E)}function y(E){return E===null?r(E):E===45?(n.consume(E),S):pe(E)?(f=y,F(E)):(n.consume(E),y)}function S(E){return E===45?(n.consume(E),k):y(E)}function k(E){return E===62?O(E):E===45?S(E):y(E)}function C(E){const T="CDATA[";return E===T.charCodeAt(h++)?(n.consume(E),h===T.length?H:C):r(E)}function H(E){return E===null?r(E):E===93?(n.consume(E),V):pe(E)?(f=H,F(E)):(n.consume(E),H)}function V(E){return E===93?(n.consume(E),D):H(E)}function D(E){return E===62?O(E):E===93?(n.consume(E),D):H(E)}function K(E){return E===null||E===62?O(E):pe(E)?(f=K,F(E)):(n.consume(E),K)}function X(E){return E===null?r(E):E===63?(n.consume(E),ie):pe(E)?(f=X,F(E)):(n.consume(E),X)}function ie(E){return E===62?O(E):X(E)}function te(E){return Mt(E)?(n.consume(E),L):r(E)}function L(E){return E===45||zt(E)?(n.consume(E),L):J(E)}function J(E){return pe(E)?(f=J,F(E)):Me(E)?(n.consume(E),J):O(E)}function de(E){return E===45||zt(E)?(n.consume(E),de):E===47||E===62||Ie(E)?be(E):r(E)}function be(E){return E===47?(n.consume(E),O):E===58||E===95||Mt(E)?(n.consume(E),R):pe(E)?(f=be,F(E)):Me(E)?(n.consume(E),be):O(E)}function R(E){return E===45||E===46||E===58||E===95||zt(E)?(n.consume(E),R):le(E)}function le(E){return E===61?(n.consume(E),ne):pe(E)?(f=le,F(E)):Me(E)?(n.consume(E),le):be(E)}function ne(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(n.consume(E),s=E,Te):pe(E)?(f=ne,F(E)):Me(E)?(n.consume(E),ne):(n.consume(E),re)}function Te(E){return E===s?(n.consume(E),s=void 0,$):E===null?r(E):pe(E)?(f=Te,F(E)):(n.consume(E),Te)}function re(E){return E===null||E===34||E===39||E===60||E===61||E===96?r(E):E===47||E===62||Ie(E)?be(E):(n.consume(E),re)}function $(E){return E===47||E===62||Ie(E)?be(E):r(E)}function O(E){return E===62?(n.consume(E),n.exit("htmlTextData"),n.exit("htmlText"),a):r(E)}function F(E){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(E),n.exit("lineEnding"),ce}function ce(E){return Me(E)?Re(n,Se,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Se(E)}function Se(E){return n.enter("htmlTextData"),f(E)}}const wo={name:"labelEnd",resolveAll:kb,resolveTo:_b,tokenize:Eb},bb={tokenize:Ab},vb={tokenize:Tb},Sb={tokenize:zb};function kb(n){let a=-1;const r=[];for(;++a=3&&(d===null||pe(d))?(n.exit("thematicBreak"),a(d)):r(d)}function p(d){return d===s?(n.consume(d),u++,p):(n.exit("thematicBreakSequence"),Me(d)?Re(n,m,"whitespace")(d):m(d))}}const Ht={continuation:{tokenize:Bb},exit:Hb,name:"list",tokenize:Lb},jb={partial:!0,tokenize:qb},Rb={partial:!0,tokenize:Ub};function Lb(n,a,r){const u=this,s=u.events[u.events.length-1];let h=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return m;function m(k){const C=u.containerState.type||(k===42||k===43||k===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!u.containerState.marker||k===u.containerState.marker:oo(k)){if(u.containerState.type||(u.containerState.type=C,n.enter(C,{_container:!0})),C==="listUnordered")return n.enter("listItemPrefix"),k===42||k===45?n.check(fu,r,d)(k):d(k);if(!u.interrupt||k===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),p(k)}return r(k)}function p(k){return oo(k)&&++f<10?(n.consume(k),p):(!u.interrupt||f<2)&&(u.containerState.marker?k===u.containerState.marker:k===41||k===46)?(n.exit("listItemValue"),d(k)):r(k)}function d(k){return n.enter("listItemMarker"),n.consume(k),n.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||k,n.check(Xa,u.interrupt?r:x,n.attempt(jb,S,y))}function x(k){return u.containerState.initialBlankLine=!0,h++,S(k)}function y(k){return Me(k)?(n.enter("listItemPrefixWhitespace"),n.consume(k),n.exit("listItemPrefixWhitespace"),S):r(k)}function S(k){return u.containerState.size=h+u.sliceSerialize(n.exit("listItemPrefix"),!0).length,a(k)}}function Bb(n,a,r){const u=this;return u.containerState._closeFlow=void 0,n.check(Xa,s,h);function s(m){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,Re(n,a,"listItemIndent",u.containerState.size+1)(m)}function h(m){return u.containerState.furtherBlankLines||!Me(m)?(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,f(m)):(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,n.attempt(Rb,a,f)(m))}function f(m){return u.containerState._closeFlow=!0,u.interrupt=void 0,Re(n,n.attempt(Ht,a,r),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m)}}function Ub(n,a,r){const u=this;return Re(n,s,"listItemIndent",u.containerState.size+1);function s(h){const f=u.events[u.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===u.containerState.size?a(h):r(h)}}function Hb(n){n.exit(this.containerState.type)}function qb(n,a,r){const u=this;return Re(n,s,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(h){const f=u.events[u.events.length-1];return!Me(h)&&f&&f[1].type==="listItemPrefixWhitespace"?a(h):r(h)}}const fp={name:"setextUnderline",resolveTo:Yb,tokenize:Gb};function Yb(n,a){let r=n.length,u,s,h;for(;r--;)if(n[r][0]==="enter"){if(n[r][1].type==="content"){u=r;break}n[r][1].type==="paragraph"&&(s=r)}else n[r][1].type==="content"&&n.splice(r,1),!h&&n[r][1].type==="definition"&&(h=r);const f={type:"setextHeading",start:{...n[u][1].start},end:{...n[n.length-1][1].end}};return n[s][1].type="setextHeadingText",h?(n.splice(s,0,["enter",f,a]),n.splice(h+1,0,["exit",n[u][1],a]),n[u][1].end={...n[h][1].end}):n[u][1]=f,n.push(["exit",f,a]),n}function Gb(n,a,r){const u=this;let s;return h;function h(d){let x=u.events.length,y;for(;x--;)if(u.events[x][1].type!=="lineEnding"&&u.events[x][1].type!=="linePrefix"&&u.events[x][1].type!=="content"){y=u.events[x][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||y)?(n.enter("setextHeadingLine"),s=d,f(d)):r(d)}function f(d){return n.enter("setextHeadingLineSequence"),m(d)}function m(d){return d===s?(n.consume(d),m):(n.exit("setextHeadingLineSequence"),Me(d)?Re(n,p,"lineSuffix")(d):p(d))}function p(d){return d===null||pe(d)?(n.exit("setextHeadingLine"),a(d)):r(d)}}const Vb={tokenize:Qb};function Qb(n){const a=this,r=n.attempt(Xa,u,n.attempt(this.parser.constructs.flowInitial,s,Re(n,n.attempt(this.parser.constructs.flow,s,n.attempt(Jx,s)),"linePrefix")));return r;function u(h){if(h===null){n.consume(h);return}return n.enter("lineEndingBlank"),n.consume(h),n.exit("lineEndingBlank"),a.currentConstruct=void 0,r}function s(h){if(h===null){n.consume(h);return}return n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),a.currentConstruct=void 0,r}}const Xb={resolveAll:hg()},Zb=fg("string"),Kb=fg("text");function fg(n){return{resolveAll:hg(n==="text"?Fb:void 0),tokenize:a};function a(r){const u=this,s=this.parser.constructs[n],h=r.attempt(s,f,m);return f;function f(x){return d(x)?h(x):m(x)}function m(x){if(x===null){r.consume(x);return}return r.enter("data"),r.consume(x),p}function p(x){return d(x)?(r.exit("data"),h(x)):(r.consume(x),p)}function d(x){if(x===null)return!0;const y=s[x];let S=-1;if(y)for(;++S-1){const m=f[0];typeof m=="string"?f[0]=m.slice(u):f.shift()}h>0&&f.push(n[s].slice(0,h))}return f}function uv(n,a){let r=-1;const u=[];let s;for(;++r0){const At=xe.tokenStack[xe.tokenStack.length-1];(At[1]||dp).call(xe,void 0,At[0])}for(W.position={start:vl(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:vl(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be0&&(u.className=["language-"+s[0]]);let h={type:"element",tagName:"code",properties:u,children:[{type:"text",value:r}]};return a.meta&&(h.data={meta:a.meta}),n.patch(a,h),h=n.applyData(a,h),h={type:"element",tagName:"pre",properties:{},children:[h]},n.patch(a,h),h}function Sv(n,a){const r={type:"element",tagName:"del",properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}function kv(n,a){const r={type:"element",tagName:"em",properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}function _v(n,a){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",u=String(a.identifier).toUpperCase(),s=Yi(u.toLowerCase()),h=n.footnoteOrder.indexOf(u);let f,m=n.footnoteCounts.get(u);m===void 0?(m=0,n.footnoteOrder.push(u),f=n.footnoteOrder.length):f=h+1,m+=1,n.footnoteCounts.set(u,m);const p={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(m>1?"-"+m:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(a,p);const d={type:"element",tagName:"sup",properties:{},children:[p]};return n.patch(a,d),n.applyData(a,d)}function Ev(n,a){const r={type:"element",tagName:"h"+a.depth,properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}function Av(n,a){if(n.options.allowDangerousHtml){const r={type:"raw",value:a.value};return n.patch(a,r),n.applyData(a,r)}}function pg(n,a){const r=a.referenceType;let u="]";if(r==="collapsed"?u+="[]":r==="full"&&(u+="["+(a.label||a.identifier)+"]"),a.type==="imageReference")return[{type:"text",value:"!["+a.alt+u}];const s=n.all(a),h=s[0];h&&h.type==="text"?h.value="["+h.value:s.unshift({type:"text",value:"["});const f=s[s.length-1];return f&&f.type==="text"?f.value+=u:s.push({type:"text",value:u}),s}function Tv(n,a){const r=String(a.identifier).toUpperCase(),u=n.definitionById.get(r);if(!u)return pg(n,a);const s={src:Yi(u.url||""),alt:a.alt};u.title!==null&&u.title!==void 0&&(s.title=u.title);const h={type:"element",tagName:"img",properties:s,children:[]};return n.patch(a,h),n.applyData(a,h)}function zv(n,a){const r={src:Yi(a.url)};a.alt!==null&&a.alt!==void 0&&(r.alt=a.alt),a.title!==null&&a.title!==void 0&&(r.title=a.title);const u={type:"element",tagName:"img",properties:r,children:[]};return n.patch(a,u),n.applyData(a,u)}function Cv(n,a){const r={type:"text",value:a.value.replace(/\r?\n|\r/g," ")};n.patch(a,r);const u={type:"element",tagName:"code",properties:{},children:[r]};return n.patch(a,u),n.applyData(a,u)}function wv(n,a){const r=String(a.identifier).toUpperCase(),u=n.definitionById.get(r);if(!u)return pg(n,a);const s={href:Yi(u.url||"")};u.title!==null&&u.title!==void 0&&(s.title=u.title);const h={type:"element",tagName:"a",properties:s,children:n.all(a)};return n.patch(a,h),n.applyData(a,h)}function Mv(n,a){const r={href:Yi(a.url)};a.title!==null&&a.title!==void 0&&(r.title=a.title);const u={type:"element",tagName:"a",properties:r,children:n.all(a)};return n.patch(a,u),n.applyData(a,u)}function Nv(n,a,r){const u=n.all(a),s=r?Dv(r):gg(a),h={},f=[];if(typeof a.checked=="boolean"){const x=u[0];let y;x&&x.type==="element"&&x.tagName==="p"?y=x:(y={type:"element",tagName:"p",properties:{},children:[]},u.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:a.checked,disabled:!0},children:[]}),h.className=["task-list-item"]}let m=-1;for(;++m1}function Ov(n,a){const r={},u=n.all(a);let s=-1;for(typeof a.start=="number"&&a.start!==1&&(r.start=a.start);++s0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(r,!0)},m=_o(a.children[1]),p=Jp(a.children[a.children.length-1]);m&&p&&(f.position={start:m,end:p}),s.push(f)}const h={type:"element",tagName:"table",properties:{},children:n.wrap(s,!0)};return n.patch(a,h),n.applyData(a,h)}function Uv(n,a,r){const u=r?r.children:void 0,h=(u?u.indexOf(a):1)===0?"th":"td",f=r&&r.type==="table"?r.align:void 0,m=f?f.length:a.children.length;let p=-1;const d=[];for(;++p0,!0),u[0]),s=u.index+u[0].length,u=r.exec(a);return h.push(gp(a.slice(s),s>0,!1)),h.join("")}function gp(n,a,r){let u=0,s=n.length;if(a){let h=n.codePointAt(u);for(;h===mp||h===pp;)u++,h=n.codePointAt(u)}if(r){let h=n.codePointAt(s-1);for(;h===mp||h===pp;)s--,h=n.codePointAt(s-1)}return s>u?n.slice(u,s):""}function Yv(n,a){const r={type:"text",value:qv(String(a.value))};return n.patch(a,r),n.applyData(a,r)}function Gv(n,a){const r={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(a,r),n.applyData(a,r)}const Vv={blockquote:xv,break:bv,code:vv,delete:Sv,emphasis:kv,footnoteReference:_v,heading:Ev,html:Av,imageReference:Tv,image:zv,inlineCode:Cv,linkReference:wv,link:Mv,listItem:Nv,list:Ov,paragraph:jv,root:Rv,strong:Lv,table:Bv,tableCell:Hv,tableRow:Uv,text:Yv,thematicBreak:Gv,toml:ru,yaml:ru,definition:ru,footnoteDefinition:ru};function ru(){}const yg=-1,vu=0,Ya=1,mu=2,Mo=3,No=4,Do=5,Oo=6,xg=7,bg=8,vg=typeof self=="object"?self:globalThis,yp=(n,a)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new vg[n](a)},Qv=(n,a)=>{const r=(s,h)=>(n.set(h,s),s),u=s=>{if(n.has(s))return n.get(s);const[h,f]=a[s];switch(h){case vu:case yg:return r(f,s);case Ya:{const m=r([],s);for(const p of f)m.push(u(p));return m}case mu:{const m=r({},s);for(const[p,d]of f)m[u(p)]=u(d);return m}case Mo:return r(new Date(f),s);case No:{const{source:m,flags:p}=f;return r(new RegExp(m,p),s)}case Do:{const m=r(new Map,s);for(const[p,d]of f)m.set(u(p),u(d));return m}case Oo:{const m=r(new Set,s);for(const p of f)m.add(u(p));return m}case xg:{const{name:m,message:p}=f;return r(typeof vg[m]=="function"?yp(m,p):new Error(p),s)}case bg:return r(BigInt(f),s);case"BigInt":return r(Object(BigInt(f)),s);case"ArrayBuffer":return r(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:m}=new Uint8Array(f);return r(new DataView(m),f)}}return r(yp(h,f),s)};return u},xp=n=>Qv(new Map,n)(0),Ql="",{toString:Xv}={},{keys:Zv}=Object,Ua=n=>{const a=typeof n;if(a!=="object"||!n)return[vu,a];const r=Xv.call(n).slice(8,-1);switch(r){case"Array":return[Ya,Ql];case"Object":return[mu,Ql];case"Date":return[Mo,Ql];case"RegExp":return[No,Ql];case"Map":return[Do,Ql];case"Set":return[Oo,Ql];case"DataView":return[Ya,r]}return r.includes("Array")?[Ya,r]:n instanceof Error?[xg,n.name||"Error"]:[mu,r]},uu=([n,a])=>n===vu&&(a==="function"||a==="symbol"),Kv=(n,a,r,u)=>{const s=(f,m)=>{const p=u.push(f)-1;return r.set(m,p),p},h=f=>{if(r.has(f))return r.get(f);let[m,p]=Ua(f);switch(m){case vu:{let x=f;switch(p){case"bigint":m=bg,x=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+p);x=null;break;case"undefined":return s([yg],f)}return s([m,x],f)}case Ya:{if(p){let S=f;return p==="DataView"?S=new Uint8Array(f.buffer):p==="ArrayBuffer"&&(S=new Uint8Array(f)),s([p,[...S]],f)}const x=[],y=s([m,x],f);for(const S of f)x.push(h(S));return y}case mu:{if(p)switch(p){case"BigInt":return s([p,f.toString()],f);case"Boolean":case"Number":case"String":return s([p,f.valueOf()],f)}if(a&&"toJSON"in f)return h(f.toJSON());const x=[],y=s([m,x],f);for(const S of Zv(f))(n||!uu(Ua(f[S])))&&x.push([h(S),h(f[S])]);return y}case Mo:return s([m,isNaN(f.getTime())?Ql:f.toISOString()],f);case No:{const{source:x,flags:y}=f;return s([m,{source:x,flags:y}],f)}case Do:{const x=[],y=s([m,x],f);for(const[S,k]of f)(n||!(uu(Ua(S))||uu(Ua(k))))&&x.push([h(S),h(k)]);return y}case Oo:{const x=[],y=s([m,x],f);for(const S of f)(n||!uu(Ua(S)))&&x.push(h(S));return y}}const{message:d}=f;return s([m,{name:p,message:d}],f)};return h},bp=(n,{json:a,lossy:r}={})=>{const u=[];return Kv(!(a||r),!!a,new Map,u)(n),u},pu=typeof structuredClone=="function"?(n,a)=>a&&("json"in a||"lossy"in a)?xp(bp(n,a)):structuredClone(n):(n,a)=>xp(bp(n,a));function Fv(n,a){const r=[{type:"text",value:"↩"}];return a>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(a)}]}),r}function Jv(n,a){return"Back to reference "+(n+1)+(a>1?"-"+a:"")}function Iv(n){const a=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",r=n.options.footnoteBackContent||Fv,u=n.options.footnoteBackLabel||Jv,s=n.options.footnoteLabel||"Footnotes",h=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},m=[];let p=-1;for(;++p0&&C.push({type:"text",value:" "});let K=typeof r=="string"?r:r(p,k);typeof K=="string"&&(K={type:"text",value:K}),C.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+S+(k>1?"-"+k:""),dataFootnoteBackref:"",ariaLabel:typeof u=="string"?u:u(p,k),className:["data-footnote-backref"]},children:Array.isArray(K)?K:[K]})}const V=x[x.length-1];if(V&&V.type==="element"&&V.tagName==="p"){const K=V.children[V.children.length-1];K&&K.type==="text"?K.value+=" ":V.children.push({type:"text",value:" "}),V.children.push(...C)}else x.push(...C);const D={type:"element",tagName:"li",properties:{id:a+"fn-"+S},children:n.wrap(x,!0)};n.patch(d,D),m.push(D)}if(m.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:h,properties:{...pu(f),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:n.wrap(m,!0)},{type:"text",value:` +`}]}}const Su=(function(n){if(n==null)return eS;if(typeof n=="function")return ku(n);if(typeof n=="object")return Array.isArray(n)?$v(n):Wv(n);if(typeof n=="string")return Pv(n);throw new Error("Expected function, string, or object as test")});function $v(n){const a=[];let r=-1;for(;++r":""))+")"})}return S;function S(){let k=Sg,C,H,V;if((!a||h(p,d,x[x.length-1]||void 0))&&(k=iS(r(p,x)),k[0]===ho))return k;if("children"in p&&p.children){const D=p;if(D.children&&k[0]!==lS)for(H=(u?D.children.length:-1)+f,V=x.concat(D);H>-1&&H0&&r.push({type:"text",value:` +`}),r}function vp(n){let a=0,r=n.charCodeAt(a);for(;r===9||r===32;)a++,r=n.charCodeAt(a);return n.slice(a)}function Sp(n,a){const r=rS(n,a),u=r.one(n,void 0),s=Iv(r),h=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return s&&h.children.push({type:"text",value:` +`},s),h}function fS(n,a){return n&&"run"in n?async function(r,u){const s=Sp(r,{file:u,...a});await n.run(s,u)}:function(r,u){return Sp(r,{file:u,...n||a})}}function kp(n){if(n)throw n}var Zs,_p;function hS(){if(_p)return Zs;_p=1;var n=Object.prototype.hasOwnProperty,a=Object.prototype.toString,r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):a.call(d)==="[object Array]"},h=function(d){if(!d||a.call(d)!=="[object Object]")return!1;var x=n.call(d,"constructor"),y=d.constructor&&d.constructor.prototype&&n.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!x&&!y)return!1;var S;for(S in d);return typeof S>"u"||n.call(d,S)},f=function(d,x){r&&x.name==="__proto__"?r(d,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):d[x.name]=x.newValue},m=function(d,x){if(x==="__proto__")if(n.call(d,x)){if(u)return u(d,x).value}else return;return d[x]};return Zs=function p(){var d,x,y,S,k,C,H=arguments[0],V=1,D=arguments.length,K=!1;for(typeof H=="boolean"&&(K=H,H=arguments[1]||{},V=2),(H==null||typeof H!="object"&&typeof H!="function")&&(H={});Vf.length;let p;m&&f.push(s);try{p=n.apply(this,f)}catch(d){const x=d;if(m&&r)throw x;return s(x)}m||(p&&p.then&&typeof p.then=="function"?p.then(h,s):p instanceof Error?s(p):h(p))}function s(f,...m){r||(r=!0,a(f,...m))}function h(f){s(null,f)}}const Sn={basename:gS,dirname:yS,extname:xS,join:bS,sep:"/"};function gS(n,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Za(n);let r=0,u=-1,s=n.length,h;if(a===void 0||a.length===0||a.length>n.length){for(;s--;)if(n.codePointAt(s)===47){if(h){r=s+1;break}}else u<0&&(h=!0,u=s+1);return u<0?"":n.slice(r,u)}if(a===n)return"";let f=-1,m=a.length-1;for(;s--;)if(n.codePointAt(s)===47){if(h){r=s+1;break}}else f<0&&(h=!0,f=s+1),m>-1&&(n.codePointAt(s)===a.codePointAt(m--)?m<0&&(u=s):(m=-1,u=f));return r===u?u=f:u<0&&(u=n.length),n.slice(r,u)}function yS(n){if(Za(n),n.length===0)return".";let a=-1,r=n.length,u;for(;--r;)if(n.codePointAt(r)===47){if(u){a=r;break}}else u||(u=!0);return a<0?n.codePointAt(0)===47?"/":".":a===1&&n.codePointAt(0)===47?"//":n.slice(0,a)}function xS(n){Za(n);let a=n.length,r=-1,u=0,s=-1,h=0,f;for(;a--;){const m=n.codePointAt(a);if(m===47){if(f){u=a+1;break}continue}r<0&&(f=!0,r=a+1),m===46?s<0?s=a:h!==1&&(h=1):s>-1&&(h=-1)}return s<0||r<0||h===0||h===1&&s===r-1&&s===u+1?"":n.slice(s,r)}function bS(...n){let a=-1,r;for(;++a0&&n.codePointAt(n.length-1)===47&&(r+="/"),a?"/"+r:r}function SS(n,a){let r="",u=0,s=-1,h=0,f=-1,m,p;for(;++f<=n.length;){if(f2){if(p=r.lastIndexOf("/"),p!==r.length-1){p<0?(r="",u=0):(r=r.slice(0,p),u=r.length-1-r.lastIndexOf("/")),s=f,h=0;continue}}else if(r.length>0){r="",u=0,s=f,h=0;continue}}a&&(r=r.length>0?r+"/..":"..",u=2)}else r.length>0?r+="/"+n.slice(s+1,f):r=n.slice(s+1,f),u=f-s-1;s=f,h=0}else m===46&&h>-1?h++:h=-1}return r}function Za(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const kS={cwd:_S};function _S(){return"/"}function go(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function ES(n){if(typeof n=="string")n=new URL(n);else if(!go(n)){const a=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw a.code="ERR_INVALID_ARG_TYPE",a}if(n.protocol!=="file:"){const a=new TypeError("The URL must be of scheme file");throw a.code="ERR_INVALID_URL_SCHEME",a}return AS(n)}function AS(n){if(n.hostname!==""){const u=new TypeError('File URL host must be "localhost" or empty on darwin');throw u.code="ERR_INVALID_FILE_URL_HOST",u}const a=n.pathname;let r=-1;for(;++r0){let[k,...C]=x;const H=u[S][1];po(H)&&po(k)&&(k=Ks(!0,H,k)),u[S]=[d,k,...C]}}}}const wS=new Ro().freeze();function $s(n,a){if(typeof a!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Ws(n,a){if(typeof a!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function Ps(n,a){if(a)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ap(n){if(!po(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Tp(n,a,r){if(!r)throw new Error("`"+n+"` finished async. Use `"+a+"` instead")}function cu(n){return MS(n)?n:new _g(n)}function MS(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function NS(n){return typeof n=="string"||DS(n)}function DS(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const OS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",zp=[],Cp={allowDangerousHtml:!0},jS=/^(https?|ircs?|mailto|xmpp)$/i,RS=[{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 LS(n){const a=BS(n),r=US(n);return HS(a.runSync(a.parse(r),r),n)}function BS(n){const a=n.rehypePlugins||zp,r=n.remarkPlugins||zp,u=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Cp}:Cp;return wS().use(yv).use(r).use(fS,u).use(a)}function US(n){const a=n.children||"",r=new _g;return typeof a=="string"&&(r.value=a),r}function HS(n,a){const r=a.allowedElements,u=a.allowElement,s=a.components,h=a.disallowedElements,f=a.skipHtml,m=a.unwrapDisallowed,p=a.urlTransform||qS;for(const x of RS)Object.hasOwn(a,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+OS+x.id,void 0);return jo(n,d),ex(n,{Fragment:v.Fragment,components:s,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function d(x,y,S){if(x.type==="raw"&&S&&typeof y=="number")return f?S.children.splice(y,1):S.children[y]={type:"text",value:x.value},y;if(x.type==="element"){let k;for(k in Vs)if(Object.hasOwn(Vs,k)&&Object.hasOwn(x.properties,k)){const C=x.properties[k],H=Vs[k];(H===null||H.includes(x.tagName))&&(x.properties[k]=p(String(C||""),k,x))}}if(x.type==="element"){let k=r?!r.includes(x.tagName):h?h.includes(x.tagName):!1;if(!k&&u&&typeof y=="number"&&(k=!u(x,y,S)),k&&S&&typeof y=="number")return m&&x.children?S.children.splice(y,1,...x.children):S.children.splice(y,1),y}}}function qS(n){const a=n.indexOf(":"),r=n.indexOf("?"),u=n.indexOf("#"),s=n.indexOf("/");return a===-1||s!==-1&&a>s||r!==-1&&a>r||u!==-1&&a>u||jS.test(n.slice(0,a))?n:""}function wp(n,a){const r=String(n);if(typeof a!="string")throw new TypeError("Expected character");let u=0,s=r.indexOf(a);for(;s!==-1;)u++,s=r.indexOf(a,s+a.length);return u}function YS(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function GS(n,a,r){const s=Su((r||{}).ignore||[]),h=VS(a);let f=-1;for(;++f0?{type:"text",value:L}:void 0),L===!1?S.lastIndex=ie+1:(C!==ie&&K.push({type:"text",value:d.value.slice(C,ie)}),Array.isArray(L)?K.push(...L):L&&K.push(L),C=ie+X[0].length,D=!0),!S.global)break;X=S.exec(d.value)}return D?(C?\]}]+$/.exec(n);if(!a)return[n,void 0];n=n.slice(0,a.index);let r=a[0],u=r.indexOf(")");const s=wp(n,"(");let h=wp(n,")");for(;u!==-1&&s>h;)n+=r.slice(0,u+1),r=r.slice(u+1),u=r.indexOf(")"),h++;return[n,r]}function Eg(n,a){const r=n.input.charCodeAt(n.index-1);return(n.index===0||Zl(r)||xu(r))&&(!a||r!==47)}Ag.peek=h2;function i2(){this.buffer()}function a2(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function r2(){this.buffer()}function u2(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function c2(n){const a=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=pn(this.sliceSerialize(n)).toLowerCase(),r.label=a}function s2(n){this.exit(n)}function o2(n){const a=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=pn(this.sliceSerialize(n)).toLowerCase(),r.label=a}function f2(n){this.exit(n)}function h2(){return"["}function Ag(n,a,r,u){const s=r.createTracker(u);let h=s.move("[^");const f=r.enter("footnoteReference"),m=r.enter("reference");return h+=s.move(r.safe(r.associationId(n),{after:"]",before:h})),m(),f(),h+=s.move("]"),h}function d2(){return{enter:{gfmFootnoteCallString:i2,gfmFootnoteCall:a2,gfmFootnoteDefinitionLabelString:r2,gfmFootnoteDefinition:u2},exit:{gfmFootnoteCallString:c2,gfmFootnoteCall:s2,gfmFootnoteDefinitionLabelString:o2,gfmFootnoteDefinition:f2}}}function m2(n){let a=!1;return n&&n.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:r,footnoteReference:Ag},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(u,s,h,f){const m=h.createTracker(f);let p=m.move("[^");const d=h.enter("footnoteDefinition"),x=h.enter("label");return p+=m.move(h.safe(h.associationId(u),{before:p,after:"]"})),x(),p+=m.move("]:"),u.children&&u.children.length>0&&(m.shift(4),p+=m.move((a?` +`:" ")+h.indentLines(h.containerFlow(u,m.current()),a?Tg:p2))),d(),p}}function p2(n,a,r){return a===0?n:Tg(n,a,r)}function Tg(n,a,r){return(r?"":" ")+n}const g2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];zg.peek=S2;function y2(){return{canContainEols:["delete"],enter:{strikethrough:b2},exit:{strikethrough:v2}}}function x2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:g2}],handlers:{delete:zg}}}function b2(n){this.enter({type:"delete",children:[]},n)}function v2(n){this.exit(n)}function zg(n,a,r,u){const s=r.createTracker(u),h=r.enter("strikethrough");let f=s.move("~~");return f+=r.containerPhrasing(n,{...s.current(),before:f,after:"~"}),f+=s.move("~~"),h(),f}function S2(){return"~"}function k2(n){return n.length}function _2(n,a){const r=a||{},u=(r.align||[]).concat(),s=r.stringLength||k2,h=[],f=[],m=[],p=[];let d=0,x=-1;for(;++xd&&(d=n[x].length);++Dp[D])&&(p[D]=X)}H.push(K)}f[x]=H,m[x]=V}let y=-1;if(typeof u=="object"&&"length"in u)for(;++yp[y]&&(p[y]=K),k[y]=K),S[y]=X}f.splice(1,0,S),m.splice(1,0,k),x=-1;const C=[];for(;++x "),h.shift(2);const f=r.indentLines(r.containerFlow(n,h.current()),T2);return s(),f}function T2(n,a,r){return">"+(r?"":" ")+n}function z2(n,a){return Np(n,a.inConstruct,!0)&&!Np(n,a.notInConstruct,!1)}function Np(n,a,r){if(typeof a=="string"&&(a=[a]),!a||a.length===0)return r;let u=-1;for(;++uf&&(f=h):h=1,s=u+a.length,u=r.indexOf(a,s);return f}function w2(n,a){return!!(a.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function M2(n){const a=n.options.fence||"`";if(a!=="`"&&a!=="~")throw new Error("Cannot serialize code with `"+a+"` for `options.fence`, expected `` ` `` or `~`");return a}function N2(n,a,r,u){const s=M2(r),h=n.value||"",f=s==="`"?"GraveAccent":"Tilde";if(w2(n,r)){const y=r.enter("codeIndented"),S=r.indentLines(h,D2);return y(),S}const m=r.createTracker(u),p=s.repeat(Math.max(C2(h,s)+1,3)),d=r.enter("codeFenced");let x=m.move(p);if(n.lang){const y=r.enter(`codeFencedLang${f}`);x+=m.move(r.safe(n.lang,{before:x,after:" ",encode:["`"],...m.current()})),y()}if(n.lang&&n.meta){const y=r.enter(`codeFencedMeta${f}`);x+=m.move(" "),x+=m.move(r.safe(n.meta,{before:x,after:` +`,encode:["`"],...m.current()})),y()}return x+=m.move(` +`),h&&(x+=m.move(h+` +`)),x+=m.move(p),d(),x}function D2(n,a,r){return(r?"":" ")+n}function Lo(n){const a=n.options.quote||'"';if(a!=='"'&&a!=="'")throw new Error("Cannot serialize title with `"+a+"` for `options.quote`, expected `\"`, or `'`");return a}function O2(n,a,r,u){const s=Lo(r),h=s==='"'?"Quote":"Apostrophe",f=r.enter("definition");let m=r.enter("label");const p=r.createTracker(u);let d=p.move("[");return d+=p.move(r.safe(r.associationId(n),{before:d,after:"]",...p.current()})),d+=p.move("]: "),m(),!n.url||/[\0- \u007F]/.test(n.url)?(m=r.enter("destinationLiteral"),d+=p.move("<"),d+=p.move(r.safe(n.url,{before:d,after:">",...p.current()})),d+=p.move(">")):(m=r.enter("destinationRaw"),d+=p.move(r.safe(n.url,{before:d,after:n.title?" ":` +`,...p.current()}))),m(),n.title&&(m=r.enter(`title${h}`),d+=p.move(" "+s),d+=p.move(r.safe(n.title,{before:d,after:s,...p.current()})),d+=p.move(s),m()),f(),d}function j2(n){const a=n.options.emphasis||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize emphasis with `"+a+"` for `options.emphasis`, expected `*`, or `_`");return a}function Va(n){return"&#x"+n.toString(16).toUpperCase()+";"}function gu(n,a,r){const u=Ui(n),s=Ui(a);return u===void 0?s===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:u===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Cg.peek=R2;function Cg(n,a,r,u){const s=j2(r),h=r.enter("emphasis"),f=r.createTracker(u),m=f.move(s);let p=f.move(r.containerPhrasing(n,{after:s,before:m,...f.current()}));const d=p.charCodeAt(0),x=gu(u.before.charCodeAt(u.before.length-1),d,s);x.inside&&(p=Va(d)+p.slice(1));const y=p.charCodeAt(p.length-1),S=gu(u.after.charCodeAt(0),y,s);S.inside&&(p=p.slice(0,-1)+Va(y));const k=f.move(s);return h(),r.attentionEncodeSurroundingInfo={after:S.outside,before:x.outside},m+p+k}function R2(n,a,r){return r.options.emphasis||"*"}function L2(n,a){let r=!1;return jo(n,function(u){if("value"in u&&/\r?\n|\r/.test(u.value)||u.type==="break")return r=!0,ho}),!!((!n.depth||n.depth<3)&&zo(n)&&(a.options.setext||r))}function B2(n,a,r,u){const s=Math.max(Math.min(6,n.depth||1),1),h=r.createTracker(u);if(L2(n,r)){const x=r.enter("headingSetext"),y=r.enter("phrasing"),S=r.containerPhrasing(n,{...h.current(),before:` +`,after:` +`});return y(),x(),S+` +`+(s===1?"=":"-").repeat(S.length-(Math.max(S.lastIndexOf("\r"),S.lastIndexOf(` +`))+1))}const f="#".repeat(s),m=r.enter("headingAtx"),p=r.enter("phrasing");h.move(f+" ");let d=r.containerPhrasing(n,{before:"# ",after:` +`,...h.current()});return/^[\t ]/.test(d)&&(d=Va(d.charCodeAt(0))+d.slice(1)),d=d?f+" "+d:f,r.options.closeAtx&&(d+=" "+f),p(),m(),d}wg.peek=U2;function wg(n){return n.value||""}function U2(){return"<"}Mg.peek=H2;function Mg(n,a,r,u){const s=Lo(r),h=s==='"'?"Quote":"Apostrophe",f=r.enter("image");let m=r.enter("label");const p=r.createTracker(u);let d=p.move("![");return d+=p.move(r.safe(n.alt,{before:d,after:"]",...p.current()})),d+=p.move("]("),m(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(m=r.enter("destinationLiteral"),d+=p.move("<"),d+=p.move(r.safe(n.url,{before:d,after:">",...p.current()})),d+=p.move(">")):(m=r.enter("destinationRaw"),d+=p.move(r.safe(n.url,{before:d,after:n.title?" ":")",...p.current()}))),m(),n.title&&(m=r.enter(`title${h}`),d+=p.move(" "+s),d+=p.move(r.safe(n.title,{before:d,after:s,...p.current()})),d+=p.move(s),m()),d+=p.move(")"),f(),d}function H2(){return"!"}Ng.peek=q2;function Ng(n,a,r,u){const s=n.referenceType,h=r.enter("imageReference");let f=r.enter("label");const m=r.createTracker(u);let p=m.move("![");const d=r.safe(n.alt,{before:p,after:"]",...m.current()});p+=m.move(d+"]["),f();const x=r.stack;r.stack=[],f=r.enter("reference");const y=r.safe(r.associationId(n),{before:p,after:"]",...m.current()});return f(),r.stack=x,h(),s==="full"||!d||d!==y?p+=m.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=m.move("]"),p}function q2(){return"!"}Dg.peek=Y2;function Dg(n,a,r){let u=n.value||"",s="`",h=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(u);)s+="`";for(/[^ \r\n]/.test(u)&&(/^[ \r\n]/.test(u)&&/[ \r\n]$/.test(u)||/^`|`$/.test(u))&&(u=" "+u+" ");++h\u007F]/.test(n.url))}jg.peek=G2;function jg(n,a,r,u){const s=Lo(r),h=s==='"'?"Quote":"Apostrophe",f=r.createTracker(u);let m,p;if(Og(n,r)){const x=r.stack;r.stack=[],m=r.enter("autolink");let y=f.move("<");return y+=f.move(r.containerPhrasing(n,{before:y,after:">",...f.current()})),y+=f.move(">"),m(),r.stack=x,y}m=r.enter("link"),p=r.enter("label");let d=f.move("[");return d+=f.move(r.containerPhrasing(n,{before:d,after:"](",...f.current()})),d+=f.move("]("),p(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(p=r.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(r.safe(n.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(p=r.enter("destinationRaw"),d+=f.move(r.safe(n.url,{before:d,after:n.title?" ":")",...f.current()}))),p(),n.title&&(p=r.enter(`title${h}`),d+=f.move(" "+s),d+=f.move(r.safe(n.title,{before:d,after:s,...f.current()})),d+=f.move(s),p()),d+=f.move(")"),m(),d}function G2(n,a,r){return Og(n,r)?"<":"["}Rg.peek=V2;function Rg(n,a,r,u){const s=n.referenceType,h=r.enter("linkReference");let f=r.enter("label");const m=r.createTracker(u);let p=m.move("[");const d=r.containerPhrasing(n,{before:p,after:"]",...m.current()});p+=m.move(d+"]["),f();const x=r.stack;r.stack=[],f=r.enter("reference");const y=r.safe(r.associationId(n),{before:p,after:"]",...m.current()});return f(),r.stack=x,h(),s==="full"||!d||d!==y?p+=m.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=m.move("]"),p}function V2(){return"["}function Bo(n){const a=n.options.bullet||"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bullet`, expected `*`, `+`, or `-`");return a}function Q2(n){const a=Bo(n),r=n.options.bulletOther;if(!r)return a==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===a)throw new Error("Expected `bullet` (`"+a+"`) and `bulletOther` (`"+r+"`) to be different");return r}function X2(n){const a=n.options.bulletOrdered||".";if(a!=="."&&a!==")")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOrdered`, expected `.` or `)`");return a}function Lg(n){const a=n.options.rule||"*";if(a!=="*"&&a!=="-"&&a!=="_")throw new Error("Cannot serialize rules with `"+a+"` for `options.rule`, expected `*`, `-`, or `_`");return a}function Z2(n,a,r,u){const s=r.enter("list"),h=r.bulletCurrent;let f=n.ordered?X2(r):Bo(r);const m=n.ordered?f==="."?")":".":Q2(r);let p=a&&r.bulletLastUsed?f===r.bulletLastUsed:!1;if(!n.ordered){const x=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&x&&(!x.children||!x.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(p=!0),Lg(r)===f&&x){let y=-1;for(;++y-1?a.start:1)+(r.options.incrementListMarker===!1?0:a.children.indexOf(n))+h);let f=h.length+1;(s==="tab"||s==="mixed"&&(a&&a.type==="list"&&a.spread||n.spread))&&(f=Math.ceil(f/4)*4);const m=r.createTracker(u);m.move(h+" ".repeat(f-h.length)),m.shift(f);const p=r.enter("listItem"),d=r.indentLines(r.containerFlow(n,m.current()),x);return p(),d;function x(y,S,k){return S?(k?"":" ".repeat(f))+y:(k?h:h+" ".repeat(f-h.length))+y}}function J2(n,a,r,u){const s=r.enter("paragraph"),h=r.enter("phrasing"),f=r.containerPhrasing(n,u);return h(),s(),f}const I2=Su(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $2(n,a,r,u){return(n.children.some(function(f){return I2(f)})?r.containerPhrasing:r.containerFlow).call(r,n,u)}function W2(n){const a=n.options.strong||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize strong with `"+a+"` for `options.strong`, expected `*`, or `_`");return a}Bg.peek=P2;function Bg(n,a,r,u){const s=W2(r),h=r.enter("strong"),f=r.createTracker(u),m=f.move(s+s);let p=f.move(r.containerPhrasing(n,{after:s,before:m,...f.current()}));const d=p.charCodeAt(0),x=gu(u.before.charCodeAt(u.before.length-1),d,s);x.inside&&(p=Va(d)+p.slice(1));const y=p.charCodeAt(p.length-1),S=gu(u.after.charCodeAt(0),y,s);S.inside&&(p=p.slice(0,-1)+Va(y));const k=f.move(s+s);return h(),r.attentionEncodeSurroundingInfo={after:S.outside,before:x.outside},m+p+k}function P2(n,a,r){return r.options.strong||"*"}function ek(n,a,r,u){return r.safe(n.value,u)}function tk(n){const a=n.options.ruleRepetition||3;if(a<3)throw new Error("Cannot serialize rules with repetition `"+a+"` for `options.ruleRepetition`, expected `3` or more");return a}function nk(n,a,r){const u=(Lg(r)+(r.options.ruleSpaces?" ":"")).repeat(tk(r));return r.options.ruleSpaces?u.slice(0,-1):u}const Ug={blockquote:A2,break:Dp,code:N2,definition:O2,emphasis:Cg,hardBreak:Dp,heading:B2,html:wg,image:Mg,imageReference:Ng,inlineCode:Dg,link:jg,linkReference:Rg,list:Z2,listItem:F2,paragraph:J2,root:$2,strong:Bg,text:ek,thematicBreak:nk};function lk(){return{enter:{table:ik,tableData:Op,tableHeader:Op,tableRow:rk},exit:{codeText:uk,table:ak,tableData:lo,tableHeader:lo,tableRow:lo}}}function ik(n){const a=n._align;this.enter({type:"table",align:a.map(function(r){return r==="none"?null:r}),children:[]},n),this.data.inTable=!0}function ak(n){this.exit(n),this.data.inTable=void 0}function rk(n){this.enter({type:"tableRow",children:[]},n)}function lo(n){this.exit(n)}function Op(n){this.enter({type:"tableCell",children:[]},n)}function uk(n){let a=this.resume();this.data.inTable&&(a=a.replace(/\\([\\|])/g,ck));const r=this.stack[this.stack.length-1];r.type,r.value=a,this.exit(n)}function ck(n,a){return a==="|"?a:n}function sk(n){const a=n||{},r=a.tableCellPadding,u=a.tablePipeAlign,s=a.stringLength,h=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:S,table:f,tableCell:p,tableRow:m}};function f(k,C,H,V){return d(x(k,H,V),k.align)}function m(k,C,H,V){const D=y(k,H,V),K=d([D]);return K.slice(0,K.indexOf(` +`))}function p(k,C,H,V){const D=H.enter("tableCell"),K=H.enter("phrasing"),X=H.containerPhrasing(k,{...V,before:h,after:h});return K(),D(),X}function d(k,C){return _2(k,{align:C,alignDelimiters:u,padding:r,stringLength:s})}function x(k,C,H){const V=k.children;let D=-1;const K=[],X=C.enter("table");for(;++D0&&!r&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const zk={tokenize:Rk,partial:!0};function Ck(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Dk,continuation:{tokenize:Ok},exit:jk}},text:{91:{name:"gfmFootnoteCall",tokenize:Nk},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:wk,resolveTo:Mk}}}}function wk(n,a,r){const u=this;let s=u.events.length;const h=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let f;for(;s--;){const p=u.events[s][1];if(p.type==="labelImage"){f=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return m;function m(p){if(!f||!f._balanced)return r(p);const d=pn(u.sliceSerialize({start:f.end,end:u.now()}));return d.codePointAt(0)!==94||!h.includes(d.slice(1))?r(p):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(p),n.exit("gfmFootnoteCallLabelMarker"),a(p))}}function Mk(n,a){let r=n.length;for(;r--;)if(n[r][1].type==="labelImage"&&n[r][0]==="enter"){n[r][1];break}n[r+1][1].type="data",n[r+3][1].type="gfmFootnoteCallLabelMarker";const u={type:"gfmFootnoteCall",start:Object.assign({},n[r+3][1].start),end:Object.assign({},n[n.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},n[r+3][1].end),end:Object.assign({},n[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const h={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},h.start),end:Object.assign({},h.end)},m=[n[r+1],n[r+2],["enter",u,a],n[r+3],n[r+4],["enter",s,a],["exit",s,a],["enter",h,a],["enter",f,a],["exit",f,a],["exit",h,a],n[n.length-2],n[n.length-1],["exit",u,a]];return n.splice(r,n.length-r+1,...m),n}function Nk(n,a,r){const u=this,s=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let h=0,f;return m;function m(y){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?r(y):(n.enter("gfmFootnoteCallMarker"),n.consume(y),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",d)}function d(y){if(h>999||y===93&&!f||y===null||y===91||Ie(y))return r(y);if(y===93){n.exit("chunkString");const S=n.exit("gfmFootnoteCallString");return s.includes(pn(u.sliceSerialize(S)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),a):r(y)}return Ie(y)||(f=!0),h++,n.consume(y),y===92?x:d}function x(y){return y===91||y===92||y===93?(n.consume(y),h++,d):d(y)}}function Dk(n,a,r){const u=this,s=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let h,f=0,m;return p;function p(C){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(C),n.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(C){return C===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(C),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",x):r(C)}function x(C){if(f>999||C===93&&!m||C===null||C===91||Ie(C))return r(C);if(C===93){n.exit("chunkString");const H=n.exit("gfmFootnoteDefinitionLabelString");return h=pn(u.sliceSerialize(H)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(C),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),S}return Ie(C)||(m=!0),f++,n.consume(C),C===92?y:x}function y(C){return C===91||C===92||C===93?(n.consume(C),f++,x):x(C)}function S(C){return C===58?(n.enter("definitionMarker"),n.consume(C),n.exit("definitionMarker"),s.includes(h)||s.push(h),Re(n,k,"gfmFootnoteDefinitionWhitespace")):r(C)}function k(C){return a(C)}}function Ok(n,a,r){return n.check(Xa,a,n.attempt(zk,a,r))}function jk(n){n.exit("gfmFootnoteDefinition")}function Rk(n,a,r){const u=this;return Re(n,s,"gfmFootnoteDefinitionIndent",5);function s(h){const f=u.events[u.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?a(h):r(h)}}function Lk(n){let r=(n||{}).singleTilde;const u={name:"strikethrough",tokenize:h,resolveAll:s};return r==null&&(r=!0),{text:{126:u},insideSpan:{null:[u]},attentionMarkers:{null:[126]}};function s(f,m){let p=-1;for(;++p1?p(C):(f.consume(C),y++,k);if(y<2&&!r)return p(C);const V=f.exit("strikethroughSequenceTemporary"),D=Ui(C);return V._open=!D||D===2&&!!H,V._close=!H||H===2&&!!D,m(C)}}}class Bk{constructor(){this.map=[]}add(a,r,u){Uk(this,a,r,u)}consume(a){if(this.map.sort(function(h,f){return h[0]-f[0]}),this.map.length===0)return;let r=this.map.length;const u=[];for(;r>0;)r-=1,u.push(a.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),a.length=this.map[r][0];u.push(a.slice()),a.length=0;let s=u.pop();for(;s;){for(const h of s)a.push(h);s=u.pop()}this.map.length=0}}function Uk(n,a,r,u){let s=0;if(!(r===0&&u.length===0)){for(;s-1;){const re=u.events[le][1].type;if(re==="lineEnding"||re==="linePrefix")le--;else break}const ne=le>-1?u.events[le][1].type:null,Te=ne==="tableHead"||ne==="tableRow"?L:p;return Te===L&&u.parser.lazy[u.now().line]?r(R):Te(R)}function p(R){return n.enter("tableHead"),n.enter("tableRow"),d(R)}function d(R){return R===124||(f=!0,h+=1),x(R)}function x(R){return R===null?r(R):pe(R)?h>1?(h=0,u.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(R),n.exit("lineEnding"),k):r(R):Me(R)?Re(n,x,"whitespace")(R):(h+=1,f&&(f=!1,s+=1),R===124?(n.enter("tableCellDivider"),n.consume(R),n.exit("tableCellDivider"),f=!0,x):(n.enter("data"),y(R)))}function y(R){return R===null||R===124||Ie(R)?(n.exit("data"),x(R)):(n.consume(R),R===92?S:y)}function S(R){return R===92||R===124?(n.consume(R),y):y(R)}function k(R){return u.interrupt=!1,u.parser.lazy[u.now().line]?r(R):(n.enter("tableDelimiterRow"),f=!1,Me(R)?Re(n,C,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):C(R))}function C(R){return R===45||R===58?V(R):R===124?(f=!0,n.enter("tableCellDivider"),n.consume(R),n.exit("tableCellDivider"),H):te(R)}function H(R){return Me(R)?Re(n,V,"whitespace")(R):V(R)}function V(R){return R===58?(h+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(R),n.exit("tableDelimiterMarker"),D):R===45?(h+=1,D(R)):R===null||pe(R)?ie(R):te(R)}function D(R){return R===45?(n.enter("tableDelimiterFiller"),K(R)):te(R)}function K(R){return R===45?(n.consume(R),K):R===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(R),n.exit("tableDelimiterMarker"),X):(n.exit("tableDelimiterFiller"),X(R))}function X(R){return Me(R)?Re(n,ie,"whitespace")(R):ie(R)}function ie(R){return R===124?C(R):R===null||pe(R)?!f||s!==h?te(R):(n.exit("tableDelimiterRow"),n.exit("tableHead"),a(R)):te(R)}function te(R){return r(R)}function L(R){return n.enter("tableRow"),J(R)}function J(R){return R===124?(n.enter("tableCellDivider"),n.consume(R),n.exit("tableCellDivider"),J):R===null||pe(R)?(n.exit("tableRow"),a(R)):Me(R)?Re(n,J,"whitespace")(R):(n.enter("data"),de(R))}function de(R){return R===null||R===124||Ie(R)?(n.exit("data"),J(R)):(n.consume(R),R===92?be:de)}function be(R){return R===92||R===124?(n.consume(R),de):de(R)}}function Gk(n,a){let r=-1,u=!0,s=0,h=[0,0,0,0],f=[0,0,0,0],m=!1,p=0,d,x,y;const S=new Bk;for(;++rr[2]+1){const C=r[2]+1,H=r[3]-r[2]-1;n.add(C,H,[])}}n.add(r[3]+1,0,[["exit",y,a]])}return s!==void 0&&(h.end=Object.assign({},Bi(a.events,s)),n.add(s,0,[["exit",h,a]]),h=void 0),h}function Rp(n,a,r,u,s){const h=[],f=Bi(a.events,r);s&&(s.end=Object.assign({},f),h.push(["exit",s,a])),u.end=Object.assign({},f),h.push(["exit",u,a]),n.add(r+1,0,h)}function Bi(n,a){const r=n[a],u=r[0]==="enter"?"start":"end";return r[1][u]}const Vk={name:"tasklistCheck",tokenize:Xk};function Qk(){return{text:{91:Vk}}}function Xk(n,a,r){const u=this;return s;function s(p){return u.previous!==null||!u._gfmTasklistFirstContentOfListItem?r(p):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),h)}function h(p){return Ie(p)?(n.enter("taskListCheckValueUnchecked"),n.consume(p),n.exit("taskListCheckValueUnchecked"),f):p===88||p===120?(n.enter("taskListCheckValueChecked"),n.consume(p),n.exit("taskListCheckValueChecked"),f):r(p)}function f(p){return p===93?(n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),m):r(p)}function m(p){return pe(p)?a(p):Me(p)?n.check({tokenize:Zk},a,r)(p):r(p)}}function Zk(n,a,r){return Re(n,u,"whitespace");function u(s){return s===null?r(s):a(s)}}function Kk(n){return ng([xk(),Ck(),Lk(n),qk(),Qk()])}const Fk={};function Jk(n){const a=this,r=n||Fk,u=a.data(),s=u.micromarkExtensions||(u.micromarkExtensions=[]),h=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),f=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);s.push(Kk(r)),h.push(mk()),f.push(pk(r))}/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ik=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kg=(...n)=>n.filter((a,r,u)=>!!a&&a.trim()!==""&&u.indexOf(a)===r).join(" ").trim();/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var $k={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"};/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wk=ye.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:r=2,absoluteStrokeWidth:u,className:s="",children:h,iconNode:f,...m},p)=>ye.createElement("svg",{ref:p,...$k,width:a,height:a,stroke:n,strokeWidth:u?Number(r)*24/Number(a):r,className:Kg("lucide",s),...m},[...f.map(([d,x])=>ye.createElement(d,x)),...Array.isArray(h)?h:[h]]));/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dt=(n,a)=>{const r=ye.forwardRef(({className:u,...s},h)=>ye.createElement(Wk,{ref:h,iconNode:a,className:Kg(`lucide-${Ik(n)}`,u),...s}));return r.displayName=`${n}`,r};/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fg=dt("Activity",[["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"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pk=dt("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jg=dt("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const e_=dt("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t_=dt("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ig=dt("FileText",[["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"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const n_=dt("History",[["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"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const l_=dt("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const i_=dt("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a_=dt("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ho=dt("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $g=dt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r_=dt("RefreshCw",[["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"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const u_=dt("Send",[["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"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xo=dt("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wg=dt("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _u=dt("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const c_=dt("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const s_=dt("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),Pg=new URL(".",window.location.href).pathname;async function Qn(n,a){const r=await fetch(`${Pg}${n.replace(/^\//,"")}`,{headers:{"Content-Type":"application/json",...(a==null?void 0:a.headers)||{}},...a}),u=await r.text(),s=u?JSON.parse(u):{};if(!r.ok)throw new Error(s.error||r.statusText);return s}function Et(...n){return n.filter(Boolean).join(" ")}function io(n,a=2500,r=[]){const[u,s]=ye.useState(null),h=async()=>{try{const f=await n();s(f)}catch{}};return ye.useEffect(()=>{h();const f=setInterval(h,a);return()=>clearInterval(f)},r),{data:u,refresh:h}}const Hi=[{role:"assistant",content:"Select a job, then ask about metrics, runtime, logs, or how to start the next AReno task."}],o_="areno-dashboard-agent-chat",ey="areno-dashboard-agent-chat-sessions",Lp="areno-dashboard-agent-active-chat",Bp="areno-dashboard-agent-draft";function f_(){try{const n=JSON.parse(localStorage.getItem(o_)||"[]");return Array.isArray(n)&&n.length?n:Hi}catch{return Hi}}function hu(n=Hi,a="New chat"){const r=Date.now();return{id:`chat-${r}-${Math.random().toString(16).slice(2)}`,title:a,createdAt:r,updatedAt:r,messages:n}}function h_(){try{const n=JSON.parse(localStorage.getItem(ey)||"[]");if(Array.isArray(n)&&n.length)return n.map(a=>{var r;return{...a,messages:(r=a.messages)!=null&&r.length?a.messages:Hi}})}catch{}return[hu(f_(),"Default chat")]}function d_(n,a="New chat"){const r=n.find(s=>s.role==="user"&&s.content);if(!r)return a;const u=r.content.replace(/\s+/g," ").trim();return u.length>42?`${u.slice(0,42)}...`:u}const m_={ckpt:"Qwen/Qwen3-0.6B",dataset_path:"yahma/alpaca-cleaned:train",dataset_loader_fn:"examples/sft/alpaca/dataset_loader.py",reward_fn_path:"",ref_ckpt:"",reward_ckpt:"",critic_ckpt:"",agent_fn:"",algo:"sft",model_hub:"modelscope",epochs:10,max_steps:5,world_size:1,tp_size:1,attn_backend:"flash",activation_checkpointing:!0,drop_rollout_state:!1,eager_decode:!1,disable_thinking:!1,batch_size:8,n_samples:8,mini_bs:1,score_micro_bs:8,gradient_accumulation_steps:"",max_prompt_tokens:1024,max_context_len:2048,max_new_tokens:1024,max_running_prompts:"",temperature:1,top_k:-1,top_p:1,greedy:!1,agent_timeout_s:300,train_tool_results:!1,lr:1e-6,min_lr:1e-7,lr_decay_steps:1e3,lr_decay_style:"cosine",adam_beta1:.9,adam_beta2:.999,adam_8bit:!1,weight_decay:.01,grad_clip_norm:1,gspo_clip_eps:3e-4,grpo_clip_eps:.2,dpo_beta:.1,critic_warmup_steps:20,critic_lr:1e-5,use_kl_loss:!0,kl_loss_coef:.001,kl_loss_type:"low_var_kl",clip_eps:.2,clip_ratio_c:3,value_clip_eps:.5,value_loss_coef:.5,gamma:1,lam:.95,tune_params:!1,mem_frac:.9,tune_max_samples:256,save_path:"outputs/dashboard-run",save_interval:100,metrics_dir:"outputs/dashboard-run/metrics",extra_args:""},p_={model_path:"Qwen/Qwen3-0.6B",model_hub:"modelscope",host:"0.0.0.0",port:8e3,world_size:1,tp_size:1,max_running_prompts:16,default_max_tokens:1024,decode_progress_interval_s:0,attn_backend:"flash",eager_decode:!1,disable_thinking:!1,extra_args:""};function g_(){var At,$t,mt,et,xt,Ye;const[n,a]=ye.useState(null),[r,u]=ye.useState(m_),[s,h]=ye.useState(p_),[f,m]=ye.useState(()=>localStorage.getItem(Bp)||""),[p,d]=ye.useState(()=>h_()),[x,y]=ye.useState(()=>localStorage.getItem(Lp)||""),[S,k]=ye.useState("chat"),[C,H]=ye.useState(()=>{try{return JSON.parse(localStorage.getItem("areno-dashboard-agent-provider")||"{}")}catch{return{}}}),[V,D]=ye.useState("jobs"),[K,X]=ye.useState("train"),[ie,te]=ye.useState(()=>localStorage.getItem("areno-dashboard-theme")||"dark"),[L,J]=ye.useState(""),[de,be]=ye.useState(null),[R,le]=ye.useState(!1),[ne,Te]=ye.useState(!1),[re,$]=ye.useState(1),[O,F]=ye.useState(0),ce=ye.useRef(null),Se=io(()=>Qn("/api/env"),5e3),E=io(()=>Qn("/api/jobs"),2e3),T=io(()=>n?Qn(`/api/jobs/${n}`):Promise.resolve(null),3e3,[n]),U=((At=E.data)==null?void 0:At.jobs)||[],_=10,ee=Math.max(1,Math.ceil(U.length/_)),oe=Math.min(re,ee),fe=U.slice((oe-1)*_,oe*_),ae=(($t=T.data)==null?void 0:$t.job)||(n?U.find(P=>P.id===n):null)||null,Qe=ye.useMemo(()=>p.find(P=>P.id===x)||p[0]||hu(),[p,x]),Le=Qe.messages||Hi;ye.useEffect(()=>{n&&U.length&&!U.some(P=>P.id===n)&&a(null)},[U.length,n]),ye.useEffect(()=>{re>ee&&$(ee)},[re,ee]),ye.useEffect(()=>{be(null),le(!1)},[r,s,K]),ye.useEffect(()=>{document.documentElement.dataset.theme=ie,localStorage.setItem("areno-dashboard-theme",ie)},[ie]),ye.useEffect(()=>{localStorage.setItem("areno-dashboard-agent-provider",JSON.stringify(C))},[C]),ye.useEffect(()=>{localStorage.setItem(ey,JSON.stringify(p.slice(-40)))},[p]),ye.useEffect(()=>{if(!p.length){const P=hu();d([P]),y(P.id);return}p.some(P=>P.id===x)||y(p[0].id)},[p,x]),ye.useEffect(()=>{x&&localStorage.setItem(Lp,x)},[x]),ye.useEffect(()=>{localStorage.setItem(Bp,f)},[f]),ye.useEffect(()=>{const P=ce.current;P&&(P.scrollTop=P.scrollHeight)},[Le,S]);const Nt=[{id:"jobs",label:"Jobs",icon:v.jsx(Fg,{size:16})},{id:"runtime",label:"Runtime",icon:v.jsx(xo,{size:16})},{id:"launcher",label:"Launcher",icon:v.jsx(Ho,{size:16})},{id:"agent",label:"Agent",icon:v.jsx(Pk,{size:16})}],It={jobs:ae?[ae.name,`${ae.kind} · ${ae.status} · step ${ae.step??0}`]:["Jobs","Open an AReno train or serve task to inspect metrics, samples, config, and logs."],runtime:["Runtime Environment","Review areno check, areno env, dependencies, GPU state, and repository context."],launcher:["Task Launcher","Start low-intrusion AReno train or serve subprocesses from explicit configs."],agent:["Agent Console","Chat with an operations agent using the selected job context."]};async function gn(P,Z){const Oe=await Qn("/api/launcher/preview",{method:"POST",body:JSON.stringify({kind:P,config:Z,acknowledge_warnings:R})});return be(Oe),Oe}async function Fl(){J("Validating train job...");try{if(!(await gn("train",r)).ok)return;const Z={...r,acknowledge_warnings:!0},Oe=await Qn("/api/jobs/train",{method:"POST",body:JSON.stringify(Z)});a(Oe.job.id),await E.refresh()}finally{J("")}}async function on(){J("Validating serve job...");try{if(!(await gn("serve",s)).ok)return;const Z={...s,acknowledge_warnings:!0},Oe=await Qn("/api/jobs/serve",{method:"POST",body:JSON.stringify(Z)});a(Oe.job.id),await E.refresh()}finally{J("")}}async function Zn(P){J("Stopping job...");try{await Qn(`/api/jobs/${P}/stop`,{method:"POST",body:"{}"}),await E.refresh()}finally{J("")}}async function _n(){const P=f.trim();if(!P)return;m("");const Z=`assistant-${Date.now()}`;kl(Oe=>[...Oe,{role:"user",content:P},{id:Z,role:"assistant",content:"",events:[],streaming:!0}]),J("Agent analyzing...");try{await Gi({prompt:P,job_id:(ae==null?void 0:ae.id)||null,provider:C,history:Fn(Le),onEvent:Oe=>Al(Z,Oe)})}catch(Oe){Al(Z,{type:"error",content:`Agent request failed: ${Oe.message||Oe}`})}finally{Al(Z,{type:"done"}),J("")}}function kl(P){const Z=Qe.id;d(Oe=>Oe.map(_e=>{if(_e.id!==Z)return _e;const ft=_e.messages||Hi,pt=typeof P=="function"?P(ft):P;return{..._e,messages:pt,updatedAt:Date.now(),title:d_(pt,_e.title)}}))}function _l(){const P=hu();d(Z=>[P,...Z]),y(P.id),m(""),k("chat")}function Kn(P){y(P),k("chat")}function Fn(P){return P.filter(Z=>(Z.role==="user"||Z.role==="assistant")&&!Z.streaming).map(Z=>({role:Z.role,content:El(Z)})).filter(Z=>Z.content).slice(-10)}function El(P){return P.content?P.content:(P.events||[]).filter(Z=>Z.type==="content"||Z.type==="reasoning").map(Z=>Z.text||"").join(` +`).trim()}async function Gi({prompt:P,job_id:Z,provider:Oe,history:_e,onEvent:ft}){const pt=await fetch(`${Pg}api/agent/stream`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:P,job_id:Z,provider:Oe,history:_e})});if(!pt.ok||!pt.body){const Vi=await pt.text();throw new Error(Vi||pt.statusText)}const En=pt.body.getReader(),Il=new TextDecoder;let fn="";for(;;){const{value:Vi,done:Ka}=await En.read();if(Ka)break;fn+=Il.decode(Vi,{stream:!0});const $l=fn.split(` +`);fn=$l.pop()||"";for(const Jn of $l)Jn.trim()&&ft(JSON.parse(Jn))}fn.trim()&&ft(JSON.parse(fn))}function Al(P,Z){kl(Oe=>Oe.map(_e=>_e.id!==P?_e:Z.type==="content_delta"?ot(_e,"content",Z.content||""):Z.type==="reasoning_delta"?ot(_e,"reasoning",Z.content||""):Z.type==="tool_calls"?W(_e,Z.tool_calls||[]):Z.type==="tool_call_delta"?Jl(_e,Z.tool_call,!0):Z.type==="tool_result"?{..._e,events:[..._e.events||[],{type:"tool_result",result:Z.tool_result}]}:Z.type==="error"?{...ot(_e,"content",Z.content||""),streaming:!1}:Z.type==="done"?{..._e,streaming:!1}:_e))}function ot(P,Z,Oe){if(!Oe)return P;const _e=[...P.events||[]],ft=_e[_e.length-1];(ft==null?void 0:ft.type)===Z?_e[_e.length-1]={...ft,text:`${ft.text||""}${Oe}`}:_e.push({type:Z,text:Oe});const pt=Z==="content"?`${P.content||""}${Oe}`:P.content;return{...P,content:pt,events:_e}}function Jl(P,Z,Oe=!1){if(!Z)return P;const _e=[...P.events||[]],ft=_e.findIndex(pt=>pt.type==="tool_call"&&Y(pt.call,Z));return ft>=0?_e[ft]={..._e[ft],call:Z,live:Oe}:_e.push({type:"tool_call",call:Z,live:Oe}),{...P,events:_e}}function Y(P,Z){return!P||!Z?!1:!!(P.id&&Z.id&&P.id===Z.id||P.round!==void 0&&Z.round!==void 0&&P.index!==void 0&&Z.index!==void 0&&P.round===Z.round&&P.index===Z.index)}function W(P,Z){let Oe=P;for(const _e of Z)Oe=Jl(Oe,_e,!1);return Oe}function xe(){var P;return V==="runtime"?v.jsxs("div",{className:"tabGrid",children:[v.jsx(C_,{env:Se.data}),v.jsx(w_,{gpus:((P=Se.data)==null?void 0:P.gpus)||[]})]}):V==="launcher"?v.jsxs("section",{className:"panel launcher",children:[v.jsxs("div",{className:"panelHeader",children:[v.jsxs("div",{children:[v.jsx("h2",{children:"Task Launcher"}),v.jsx("p",{children:"Builds AReno CLI commands without importing training internals."})]}),v.jsxs("div",{className:"tabs",children:[v.jsx("button",{className:Et(K==="train"&&"active"),onClick:()=>X("train"),children:"Train"}),v.jsx("button",{className:Et(K==="serve"&&"active"),onClick:()=>X("serve"),children:"Serve"})]})]}),K==="train"?v.jsx(K_,{config:r,setConfig:u,onStart:Fl,onPreview:()=>gn("train",r)}):v.jsx(J_,{config:s,setConfig:h,onStart:on,onPreview:()=>gn("serve",s)}),v.jsx(Z_,{result:de,acknowledged:R,onAcknowledge:le})]}):V==="agent"?v.jsxs("section",{className:"panel chatPanel",children:[v.jsxs("div",{className:"panelHeader",children:[v.jsxs("div",{children:[v.jsx("h2",{children:"Agent Chat"}),v.jsx("p",{children:ae?`Context: ${ae.name}`:"No job selected. The agent will use runtime context only."})]}),v.jsxs("div",{className:"agentHeaderActions",children:[v.jsxs("button",{className:"secondaryButton",onClick:_l,children:[v.jsx($g,{size:15})," New Chat"]}),v.jsxs("button",{className:"secondaryButton",onClick:()=>Te(!0),children:[v.jsx(Wg,{size:15})," Settings"]})]})]}),v.jsxs("div",{className:"agentTabs",children:[v.jsxs("button",{className:Et(S==="chat"&&"active"),onClick:()=>k("chat"),children:[v.jsx(i_,{size:15})," Chat"]}),v.jsxs("button",{className:Et(S==="history"&&"active"),onClick:()=>k("history"),children:[v.jsx(n_,{size:15})," History"]})]}),S==="history"?v.jsx(x_,{sessions:p,activeId:Qe.id,onOpen:Kn,onNew:_l}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"chatMessages",ref:ce,children:Le.map((Z,Oe)=>{var _e;return v.jsxs("div",{className:Et("chatBubble",Z.role),children:[v.jsx("span",{children:Z.role}),(_e=Z.events)!=null&&_e.length?v.jsx(S_,{events:Z.events}):v.jsx(qo,{text:Z.content}),Z.streaming&&v.jsx("div",{className:"streamingHint",children:"thinking..."})]},`${Z.id||Z.role}-${Oe}`)})}),v.jsxs("div",{className:"chatComposer",children:[v.jsx("textarea",{value:f,onChange:Z=>m(Z.target.value),onKeyDown:Z=>{Z.key==="Enter"&&!Z.shiftKey&&(Z.preventDefault(),_n())}}),v.jsxs("button",{className:"primaryButton",onClick:_n,children:[v.jsx(u_,{size:16})," Send"]})]})]}),ne&&v.jsx(b_,{title:"Agent Settings",onClose:()=>Te(!1),children:v.jsx(y_,{provider:C,setProvider:H})})]}):ae?v.jsxs("section",{className:"panel detailPanel",children:[v.jsxs("div",{className:"panelHeader",children:[v.jsxs("div",{children:[v.jsx("h2",{children:ae.name}),v.jsxs("p",{children:[ae.kind," · ",ae.status]})]}),v.jsxs("div",{className:"detailActions",children:[v.jsx("button",{className:"secondaryButton",onClick:()=>a(null),children:"Back"}),ae.status==="running"&&v.jsxs("button",{className:"dangerButton",onClick:()=>Zn(ae.id),children:[v.jsx(e_,{size:16})," Stop"]})]})]}),v.jsx(M_,{job:ae}),v.jsx(v_,{job:ae,refreshNonce:O}),v.jsx(q_,{samples:(ae==null?void 0:ae.samples)||[]}),v.jsxs("div",{className:"split",children:[v.jsx(G_,{config:ae==null?void 0:ae.config,launch:ae==null?void 0:ae.launch}),v.jsx(X_,{logs:(ae==null?void 0:ae.logs)||[]})]})]}):v.jsxs("section",{className:"panel jobListPage",children:[v.jsxs("div",{className:"panelHeader",children:[v.jsxs("div",{children:[v.jsx("h2",{children:"Jobs"}),v.jsx("p",{children:"Registered AReno train/serve processes. Select a row to open job details."})]}),v.jsxs("div",{className:"pagerControls",children:[v.jsx("button",{className:"secondaryButton",disabled:oe<=1,onClick:()=>$(Z=>Math.max(1,Z-1)),children:"Prev"}),v.jsxs("span",{children:[oe," / ",ee]}),v.jsx("button",{className:"secondaryButton",disabled:oe>=ee,onClick:()=>$(Z=>Math.min(ee,Z+1)),children:"Next"})]})]}),v.jsxs("div",{className:"jobList",children:[U.length===0&&v.jsx(ly,{title:"No jobs yet",text:"Start a train or serve task from the launcher."}),fe.map(Z=>v.jsxs("button",{className:"jobRow large",onClick:()=>a(Z.id),children:[v.jsx("div",{className:"jobIcon",children:Z.kind==="serve"?v.jsx(xo,{size:16}):v.jsx(l_,{size:16})}),v.jsxs("div",{className:"jobInfo",children:[v.jsx("div",{className:"jobTitle",children:Z.name}),v.jsxs("div",{className:"jobMeta",children:[Z.kind," · ",Z.status," · step ",Z.step??0]})]}),v.jsx("span",{className:Et("statusDot",Z.status)})]},Z.id))]}),U.length>_&&v.jsxs("div",{className:"listFooter",children:["Showing ",(oe-1)*_+1,"-",Math.min(oe*_,U.length)," of ",U.length," jobs"]})]})}const[ze,Be]=It[V]||It.jobs;return v.jsxs("div",{className:"shell",children:[v.jsxs("aside",{className:"rail",children:[v.jsxs("div",{className:"brand",children:[v.jsx("div",{className:"brandMark",children:"A"}),v.jsxs("div",{children:[v.jsx("div",{className:"brandName",children:"AReno Ops"}),v.jsx("div",{className:"brandMeta",children:"runtime workbench"})]})]}),v.jsx("nav",{className:"nav",children:Nt.map(P=>v.jsxs("button",{className:Et("navItem",V===P.id&&"active"),onClick:()=>D(P.id),children:[P.icon," ",P.label]},P.id))}),v.jsxs("div",{className:"railFooter",children:[v.jsx("div",{className:"tinyLabel",children:"Repo"}),v.jsxs("div",{className:"monoLine",children:[((et=(mt=Se.data)==null?void 0:mt.repo)==null?void 0:et.branch)||"unknown"," · ",((Ye=(xt=Se.data)==null?void 0:xt.repo)==null?void 0:Ye.commit)||"no git"]})]})]}),v.jsxs("main",{className:"main",children:[v.jsxs("header",{className:"topbar",children:[v.jsxs("div",{children:[v.jsx("h1",{children:ze}),v.jsx("p",{children:Be})]}),v.jsxs("div",{className:"topActions",children:[v.jsx("button",{className:"iconButton",onClick:()=>te(ie==="dark"?"light":"dark"),title:"Toggle theme",children:ie==="dark"?v.jsx(c_,{size:16}):v.jsx(a_,{size:16})}),v.jsx("button",{className:"iconButton",onClick:()=>{Se.refresh(),E.refresh(),T.refresh(),F(P=>P+1)},title:"Refresh",children:v.jsx(r_,{size:16})})]})]}),L&&v.jsx("div",{className:"notice",children:L}),xe()]})]})}function y_({provider:n,setProvider:a}){return v.jsxs("div",{className:"agentConfig modalForm",children:[v.jsx(yu,{label:"Base URL",value:n.base_url||"",onChange:r=>a({...n,base_url:r}),compact:!0}),v.jsx(yu,{label:"Model",value:n.model||"",onChange:r=>a({...n,model:r}),compact:!0}),v.jsxs("label",{className:"field compact",children:[v.jsx("span",{children:"API key"}),v.jsx("input",{type:"password",value:n.api_key||"",onChange:r=>a({...n,api_key:r.target.value})})]})]})}function x_({sessions:n,activeId:a,onOpen:r,onNew:u}){return v.jsxs("div",{className:"agentHistory",children:[v.jsxs("div",{className:"agentHistoryHeader",children:[v.jsxs("div",{children:[v.jsx("h3",{children:"Chat History"}),v.jsxs("p",{children:[n.length," saved conversations in this browser."]})]}),v.jsxs("button",{className:"secondaryButton",onClick:u,children:[v.jsx($g,{size:15})," New Chat"]})]}),v.jsx("div",{className:"agentHistoryList",children:n.map(s=>{const h=[...s.messages||[]].reverse().find(f=>f.role==="user"||f.content);return v.jsxs("button",{className:Et("agentHistoryItem",s.id===a&&"active"),onClick:()=>r(s.id),children:[v.jsx("strong",{children:s.title||"New chat"}),v.jsx("span",{children:(h==null?void 0:h.content)||"No messages yet."}),v.jsx("small",{children:new Date(s.updatedAt||s.createdAt||Date.now()).toLocaleString()})]},s.id)})})]})}function b_({title:n,children:a,onClose:r}){return v.jsx("div",{className:"modalOverlay",role:"presentation",onMouseDown:r,children:v.jsxs("div",{className:"modalCard",role:"dialog","aria-modal":"true","aria-label":n,onMouseDown:u=>u.stopPropagation(),children:[v.jsxs("div",{className:"modalHeader",children:[v.jsxs("div",{children:[v.jsx("h2",{children:n}),v.jsx("p",{children:"Stored locally in this browser."})]}),v.jsx("button",{className:"iconButton",onClick:r,children:"×"})]}),a]})})}function v_({job:n,refreshNonce:a}){return v.jsxs("div",{className:"jobMetricsGrid",children:[v.jsx("div",{className:"panel insetPanel",children:v.jsx(R_,{jobId:n==null?void 0:n.id,metricsDir:n==null?void 0:n.metrics_dir,refreshNonce:a})}),v.jsx("div",{className:"panel insetPanel",children:v.jsx(U_,{rows:(n==null?void 0:n.timeperf)||[]})})]})}function S_({events:n}){return v.jsx("div",{className:"agentEventList",children:n.map((a,r)=>a.type==="reasoning"?v.jsx(k_,{text:a.text},r):a.type==="content"?v.jsx(qo,{text:a.text},r):a.type==="tool_call"?v.jsx(__,{call:a.call,live:a.live},r):a.type==="tool_result"?v.jsx(T_,{result:a.result},r):null)})}function qo({text:n}){return v.jsx("div",{className:"markdownBlock",children:v.jsx(LS,{remarkPlugins:[Jk],children:n||""})})}function k_({text:n}){return v.jsxs("details",{className:"reasoningBlock",children:[v.jsxs("summary",{children:[v.jsx("span",{children:"✓"}),v.jsx("strong",{children:"Completed thinking"})]}),v.jsx(qo,{text:n})]})}function __({call:n,live:a=!1}){const u=((n==null?void 0:n.function)||{}).name||(n==null?void 0:n.name)||"tool",s=A_(n);return v.jsxs("details",{className:Et("toolCallCard","toolCallDetails",a&&"live"),children:[v.jsxs("summary",{className:"toolCallHead",children:[v.jsx("span",{children:a?"calling":"tool call"}),v.jsx("b",{children:E_(u,s)}),v.jsx("em",{children:a?"running":""})]}),v.jsx("pre",{children:s})]})}function E_(n,a){const r=ty(a);return!r||r==="{}"?`${n}()`:`${n}(${r})`}function A_(n){return(n.function||{}).arguments||n.arguments||JSON.stringify(n,null,2)}function T_({result:n}){const a=z_(n);return v.jsxs("details",{className:Et("toolCallCard","toolResultDetails",n.ok?"ok":"failed"),children:[v.jsxs("summary",{children:[v.jsx("span",{children:n.ok?"result":"error"}),v.jsxs("b",{children:[n.name||"unknown"," · ",n.ok?"ok":"failed"]}),v.jsx("em",{children:ty(a)||"No output."})]}),v.jsx("pre",{children:a})]})}function ty(n){return String(n||"").replace(/\s+/g," ").trim()}function z_(n){return n.error?n.error:Array.isArray(n.jobs)?n.jobs.map(a=>`${a.id} · ${a.kind} · ${a.status} · step ${a.step??0} · ${a.name}`).join(` +`)||"No jobs.":n.job?`${n.job.id} · ${n.job.kind} · ${n.job.status} · step ${n.job.step??0} +${n.job.name}`:n.env?`ready=${n.env.ready} · gpu=${n.env.gpu_summary||"n/a"} · cwd=${n.env.cwd||"n/a"}`:JSON.stringify(n,null,2)}function C_({env:n}){var m,p,d,x;const a=(n==null?void 0:n.checks)||[],r=(n==null?void 0:n.report)||{},u=r.dependencies||{},s=r.torch||{},h=r.platform||{},f=a.slice(0,12);return v.jsxs("section",{className:"runtimeDeck",children:[v.jsxs("div",{className:"runtimeHero",children:[v.jsx("div",{className:Et("readinessOrb",n!=null&&n.ready?"ready":"blocked"),children:n!=null&&n.ready?"OK":"!"}),v.jsxs("div",{children:[v.jsx("div",{className:"tinyLabel",children:"AReno check"}),v.jsx("h2",{children:n!=null&&n.ready?"Runtime ready for AReno tasks":"Runtime needs attention before heavy jobs"}),v.jsxs("p",{children:[((m=n==null?void 0:n.check_counts)==null?void 0:m.ok)??0," OK · ",((p=n==null?void 0:n.check_counts)==null?void 0:p.warn)??0," WARN · ",((d=n==null?void 0:n.check_counts)==null?void 0:d.fail)??0," FAIL"]})]})]}),v.jsxs("div",{className:"envFacts",children:[v.jsx(ou,{icon:v.jsx(Ig,{size:15}),label:"AReno",value:((x=r.areno)==null?void 0:x.version)||"unknown"}),v.jsx(ou,{icon:v.jsx(t_,{size:15}),label:"PyTorch",value:s.version||"missing"}),v.jsx(ou,{icon:v.jsx(xo,{size:15}),label:"CUDA",value:s.cuda_build||"none"}),v.jsx(ou,{icon:v.jsx(Jg,{size:15}),label:"Platform",value:`${h.system||"unknown"} ${h.machine||""}`})]}),v.jsx("div",{className:"checkMatrix",children:f.map(y=>v.jsxs("div",{className:Et("checkItem",y.status.toLowerCase()),children:[v.jsx("span",{children:y.status}),v.jsx("strong",{children:y.name}),v.jsx("small",{children:y.detail||y.next_step||"no detail"})]},y.name))}),v.jsx("div",{className:"dependencyStrip",children:Object.entries(u).map(([y,S])=>v.jsxs("div",{className:Et("depPill",S.imported?"ok":"warn"),children:[y,": ",S.imported?S.version||"imported":"missing"]},y))})]})}function w_({gpus:n}){return n.length?v.jsx("section",{className:"gpuDeck",children:n.map((a,r)=>{const u=Math.min(100,Math.max(0,Number(a.memory_used_mb||0)/Math.max(Number(a.memory_total_mb||1),1)*100)),s=Math.min(100,Math.max(0,Number(a.utilization||0)));return v.jsxs("div",{className:"gpuCard",children:[v.jsxs("div",{className:"gpuHead",children:[v.jsxs("strong",{children:["GPU ",r]}),v.jsx("span",{children:a.name})]}),v.jsxs("div",{className:"gpuMeter",children:[v.jsxs("div",{className:"gpuMeterLabel",children:[v.jsx("span",{children:"Memory"}),v.jsxs("b",{children:[a.memory_used_mb,"/",a.memory_total_mb," MB"]})]}),v.jsx("div",{className:"meterTrack",children:v.jsx("i",{style:{width:`${u}%`}})})]}),v.jsxs("div",{className:"gpuMeter",children:[v.jsxs("div",{className:"gpuMeterLabel",children:[v.jsx("span",{children:"Utilization"}),v.jsxs("b",{children:[s,"%"]})]}),v.jsx("div",{className:"meterTrack util",children:v.jsx("i",{style:{width:`${s}%`}})})]})]},`${a.name}-${r}`)})}):v.jsx("section",{className:"gpuDeck",children:v.jsx("div",{className:"panel",children:v.jsx(ly,{title:"No GPU detected",text:"nvidia-smi did not return device utilization."})})})}function ou({icon:n,label:a,value:r}){return v.jsxs("div",{className:"envFact",children:[v.jsx("span",{children:n}),v.jsxs("div",{children:[v.jsx("label",{children:a}),v.jsx("strong",{children:r})]})]})}function M_({job:n}){const a=ny(n),r=N_(n),u=Math.max(0,a.findIndex(s=>bo(s,r,n)));return v.jsx("div",{className:"timeline",children:a.map((s,h)=>v.jsxs("div",{className:Et("timelineItem",h<=u&&"done",bo(s,r,n)&&"current"),children:[v.jsx("span",{children:h+1}),v.jsx("label",{children:s.label})]},s.id))})}function ny(n){if((n==null?void 0:n.kind)==="serve")return[{id:"created",label:"created"},{id:"load",label:"load",aliases:["registered"]},{id:"serve",label:"serve",aliases:["running"]},{id:"exit",label:"exit",aliases:["exited","failed","succeeded","stopped"]}];const a=D_(n,"algo");return a==="sft"?[{id:"created",label:"created",aliases:["registered","epoch_start"]},{id:"train",label:"train",aliases:["train_start","train_end","train_skip"]},{id:"save",label:"save",aliases:["save_checkpoint_start","save_checkpoint_end"]},{id:"done",label:"done",aliases:["max_steps_reached","epoch_end","exited","failed","succeeded","stopped"]}]:a==="dpo"?[{id:"created",label:"created",aliases:["registered","epoch_start"]},{id:"ref_score",label:"ref score",aliases:["logprob_score_start","logprob_score_end"],roles:["ref"]},{id:"train",label:"train",aliases:["train_start","train_end","train_skip"]},{id:"save",label:"save",aliases:["save_checkpoint_start","save_checkpoint_end"]},{id:"done",label:"done",aliases:["max_steps_reached","epoch_end","exited","failed","succeeded","stopped"]}]:a==="ppo"?[{id:"created",label:"created",aliases:["registered","epoch_start"]},{id:"rollout",label:"rollout",aliases:["rollout_start","rollout_end"],roles:["actor"]},{id:"reward",label:"reward",aliases:["score_start","score_end"],roles:["reward"]},{id:"ref_score",label:"ref score",aliases:["logprob_score_start","logprob_score_end"],roles:["ref"]},{id:"old_logprob",label:"old logprob",aliases:["old_logprob_score_start","old_logprob_score_end"],roles:["actor"]},{id:"critic_value",label:"value",aliases:["value_score_start","value_score_end"],roles:["critic"]},{id:"advantage",label:"advantage",aliases:["advantage_start","advantage_end"],roles:["critic"]},{id:"critic_train",label:"critic train",aliases:["train_start","train_end"],roles:["critic"]},{id:"actor_train",label:"actor train",aliases:["train_start","train_end","train_skip"],roles:["actor"]},{id:"save",label:"save",aliases:["save_checkpoint_start","save_checkpoint_end"]},{id:"done",label:"done",aliases:["max_steps_reached","epoch_end","exited","failed","succeeded","stopped"]}]:[{id:"created",label:"created",aliases:["registered","epoch_start"]},{id:"rollout",label:"rollout",aliases:["rollout_start","rollout_end"]},{id:"score",label:"score",aliases:["score_start","score_end","reward_score_start","reward_score_end","logprob_score_start","logprob_score_end","old_logprob_score_start","old_logprob_score_end","value_score_start","value_score_end"]},{id:"train",label:"train",aliases:["train_start","train_end","train_skip"]},{id:"save",label:"save",aliases:["save_checkpoint_start","save_checkpoint_end"]},{id:"done",label:"done",aliases:["max_steps_reached","epoch_end","exited","failed","succeeded","stopped"]}]}function N_(n){if(n!=null&&n.status&&["succeeded","failed","stopped","exited"].includes(n.status))return"done";const a=String((n==null?void 0:n.stage)||"created"),u=ny(n).find(s=>bo(s,a,n));return(u==null?void 0:u.id)||a}function bo(n,a,r){var s,h;return n.id===a||((s=n.aliases)==null?void 0:s.includes(a))?(h=n.roles)!=null&&h.length?n.roles.includes(String((r==null?void 0:r.role)||"")):!0:!1}function D_(n,a){const r=n!=null&&n.config&&Object.keys(n.config).length?n.config:(n==null?void 0:n.launch)||{};if(r[a]!==void 0)return r[a];for(const u of r.sections||[]){const s=(u.items||[]).find(h=>h.key===a);if(s)return s.value}}function O_(n){return(n||[]).map(a=>a.name).sort()}function j_(n,a){return a&&n.includes(a)?a:n[0]||""}function R_({jobId:n,metricsDir:a,refreshNonce:r}){const[u,s]=ye.useState(""),[h,f]=ye.useState(.6),[m,p]=ye.useState([]),[d,x]=ye.useState([]),[y,S]=ye.useState(!1),[k,C]=ye.useState(n);n!==k&&(C(n),s(""),p([]),x([]),S(!1));const H=O_(m),V=j_(H,u);ye.useEffect(()=>{let te=!1;if(n)return Qn(`/api/jobs/${n}/metrics`).then(L=>{if(te)return;const J=L.metrics||[];p(J),s(de=>{var be;return de||((be=J[0])==null?void 0:be.name)||""})}).catch(()=>{te||p([])}),()=>{te=!0}},[n,r]),ye.useEffect(()=>{let te=!1;if(!n||!V){x([]),S(!1);return}return S(!0),Qn(`/api/jobs/${n}/metric?name=${encodeURIComponent(V)}&limit=500`).then(L=>{te||x((L.points||[]).filter(J=>Number.isFinite(Number(J.value))).map(J=>({...J,step:Number(J.step||0),value:Number(J.value)})))}).catch(()=>{te||x([])}).finally(()=>{te||S(!1)}),()=>{te=!0}},[n,V,r]);const D=V,K=d.slice(-240),X=L_(K,h),ie=B_(K,X);return v.jsxs("div",{className:"chart",children:[v.jsxs("div",{className:"chartHeader",children:[v.jsxs("span",{children:[v.jsx(Fg,{size:14})," TensorBoard scalars"]}),v.jsxs("div",{className:"chartControls",children:[v.jsx("select",{value:D,onChange:te=>s(te.target.value),children:H.length===0?v.jsx("option",{value:"",children:"no metrics"}):H.map(te=>v.jsx("option",{children:te},te))}),v.jsxs("label",{children:["smooth ",h.toFixed(2),v.jsx("input",{type:"range",min:"0",max:"0.99",step:"0.01",value:h,onChange:te=>f(Number(te.target.value))})]})]})]}),K.length===0?v.jsx("div",{className:"plotEmpty",children:y?"Loading selected metric...":"No TensorBoard scalar points loaded yet."}):v.jsxs("svg",{className:"metricPlot",viewBox:"0 0 720 180",role:"img",children:[v.jsx("g",{className:"plotGrid",children:[0,1,2,3].map(te=>v.jsx("line",{x1:"0",x2:"720",y1:30+te*42,y2:30+te*42},te))}),v.jsx("polyline",{className:"rawLine",points:ie.raw}),v.jsx("polyline",{className:"smoothLine",points:ie.smooth}),K.slice(-24).map((te,L)=>{var J,de;return v.jsx("circle",{cx:((J=ie.coords[L+Math.max(0,K.length-24)])==null?void 0:J.x)||0,cy:((de=ie.coords[L+Math.max(0,K.length-24)])==null?void 0:de.y)||0,r:"2.2",children:v.jsx("title",{children:`${D} step ${te.step}: ${te.value}`})},`${te.step}-${L}`)})]}),v.jsxs("div",{className:"plotFooter",children:[v.jsxs("span",{children:[D||"metric"," · ",d.length," points"]}),v.jsxs("span",{children:[a||"no metrics dir"," · ",ie.minLabel," to ",ie.maxLabel]})]})]})}function L_(n,a){if(!n.length)return[];const r=Math.min(Math.max(Number(a)||0,0),.999);let u=n[0].value;return n.map(s=>(u=u*r+s.value*(1-r),{...s,value:u}))}function B_(n,a){if(!n.length)return{raw:"",smooth:"",coords:[],minLabel:"n/a",maxLabel:"n/a"};const r=[...n,...a].map(S=>S.value),u=Math.min(...r),s=Math.max(...r),h=Math.max(s-u,1e-9),f=n[0].step,m=n[n.length-1].step,p=Math.max(m-f,1),d=S=>({x:(S.step-f)/p*700+10,y:168-(S.value-u)/h*146}),x=n.map(d),y=a.map(d);return{raw:x.map(S=>`${S.x.toFixed(1)},${S.y.toFixed(1)}`).join(" "),smooth:y.map(S=>`${S.x.toFixed(1)},${S.y.toFixed(1)}`).join(" "),coords:x,minLabel:Up(u),maxLabel:Up(s)}}function Up(n){return Number.isFinite(n)?Math.abs(n)>=1e3||Math.abs(n)<.001?n.toExponential(2):n.toFixed(4).replace(/0+$/,"").replace(/\.$/,""):"n/a"}function U_({rows:n}){const a=H_(n||[],7).reverse(),r=n!=null&&n.length?n.reduce((h,f)=>h+Number(f.total_s||0),0)/n.length:0,u=Math.max(1,...a.map(h=>Number(h.total_s||0))),s=Array.from(new Set((n||[]).flatMap(h=>(h.segments||[]).map(f=>f.name)))).slice(0,8);return v.jsxs("div",{className:"timePerf",children:[v.jsxs("div",{className:"timePerfHeader",children:[v.jsx("div",{children:v.jsxs("div",{className:"codeTitle inline",children:[v.jsx(s_,{size:14})," Runtime timeperf"]})}),v.jsxs("div",{className:"legend",children:[s.map(h=>v.jsxs("span",{children:[v.jsx("i",{className:Hp(h)})," ",h]},h)),v.jsxs("b",{children:["avg ",r?`${r.toFixed(1)}s`:"n/a"]})]})]}),a.length===0?v.jsx("div",{className:"sampleEmpty",children:"No step timing captured yet."}):v.jsx("div",{className:"timeRows",children:a.map(h=>{var d;const f=Number(h.total_s||0),m=Math.max(10,f/u*100),p=(d=h.segments)!=null&&d.length?h.segments:[];return v.jsxs("div",{className:"timeRow",children:[v.jsxs("label",{children:["step ",h.step]}),v.jsx("div",{className:"timeTrack",children:v.jsx("div",{className:"timeStack",style:{width:`${m}%`},children:p.map(x=>{const y=Number(x.seconds||0),S=y/Math.max(f,1)*100;return v.jsx("span",{className:Hp(x.name),style:{width:`${S}%`},title:`${x.name}: ${y.toFixed(1)}s`,children:S>11?`${y.toFixed(1)}s`:""},x.name)})})}),v.jsxs("strong",{children:[f.toFixed(1),"s"]})]},`${h.step}-${h.time}`)})})]})}function H_(n,a){if(n.length<=a)return n.slice();const r=n.length-1,u=new Set;for(let s=0;ss-h).slice(-a).map(s=>n[s])}function Hp(n){return`seg-${String(n||"other").replace(/[^a-zA-Z0-9]+/g,"-")}`}function q_({samples:n}){const a=ye.useMemo(()=>[...n||[]].sort((y,S)=>Number(y.step||0)-Number(S.step||0)||Number(y.prompt_idx||0)-Number(S.prompt_idx||0)||Number(y.sample_idx||0)-Number(S.sample_idx||0)),[n]),r=ye.useMemo(()=>Array.from(new Set(a.map(y=>Number(y.step||0)))).sort((y,S)=>S-y),[a]),[u,s]=ye.useState(""),[h,f]=ye.useState("");ye.useEffect(()=>{if(!r.length){s(""),f("");return}(u===""||!r.includes(Number(u)))&&(s(String(r[0])),f(""))},[u,r]);const p=(u===""?[]:a.filter(y=>Number(y.step||0)===Number(u))).map((y,S)=>({key:Y_(y,S),label:`prompt ${y.prompt_idx??"?"} · sample ${y.sample_idx??"?"}`,sample:y})),d=p.find(y=>y.key===h)||p[p.length-1]||null,x=(d==null?void 0:d.sample)||null;return v.jsxs("div",{className:"sampleCard",children:[v.jsxs("div",{className:"codeTitle sampleTitle",children:[v.jsxs("span",{children:[v.jsx(Ig,{size:14})," Rollout sample"]}),!!a.length&&v.jsxs("div",{className:"sampleControls",children:[v.jsx("select",{value:u,onChange:y=>{s(y.target.value),f("")},children:r.map(y=>v.jsxs("option",{value:y,children:["step ",y]},y))}),v.jsx("select",{value:(d==null?void 0:d.key)||"",onChange:y=>f(y.target.value),children:p.map(y=>v.jsx("option",{value:y.key,children:y.label},y.key))})]})]}),x?v.jsxs("div",{className:"sampleGrid",children:[v.jsxs("div",{children:[v.jsx("span",{children:"Prompt"}),v.jsx("p",{children:x.prompt||"n/a"})]}),v.jsxs("div",{children:[v.jsx("span",{children:"Completion"}),v.jsx("p",{children:x.completion||"n/a"})]})]}):v.jsx("div",{className:"sampleEmpty",children:"No rollout sample captured yet."})]})}function Y_(n,a){return`${n.step??"x"}-${n.prompt_idx??"x"}-${n.sample_idx??"x"}-${a}`}function G_({config:n,launch:a}){const r=n&&Object.keys(n).length?n:a||{},u=V_(r);return v.jsxs("div",{className:"codeCard",children:[v.jsxs("div",{className:"codeTitle",children:[v.jsx(Wg,{size:14})," Config"]}),u.length>0?v.jsx("div",{className:"configSections",children:u.map(s=>v.jsxs("div",{className:"configSection",children:[v.jsx("h3",{children:s.title}),v.jsx("div",{className:"configGrid",children:s.items.map(({key:h,value:f})=>v.jsxs("div",{className:"configItem",children:[v.jsx("span",{children:h.replace(/_/g," ")}),v.jsx("strong",{children:Q_(f)})]},h))})]},s.title))}):v.jsx("pre",{children:"No config captured yet."})]})}function V_(n){if(Array.isArray(n==null?void 0:n.sections))return n.sections.map(r=>({title:r.title||"Config",items:(r.items||[]).filter(({value:u})=>u!=null&&u!=="")})).filter(r=>r.items.length>0);const a=Object.entries(n||{}).filter(([,r])=>r!=null&&r!=="").map(([r,u])=>({key:r,value:u}));return a.length?[{title:"Launch",items:a}]:[]}function Q_(n){return Array.isArray(n)?n.join(" "):typeof n=="object"?JSON.stringify(n):String(n)}function X_({logs:n}){const a=ye.useRef(null);return ye.useEffect(()=>{const r=a.current;r&&(r.scrollTop=r.scrollHeight)},[n.length]),v.jsxs("div",{className:"codeCard",ref:a,children:[v.jsxs("div",{className:"codeTitle",children:[v.jsx(_u,{size:14})," Logs"]}),v.jsx("pre",{children:n.slice(-80).join(` +`)||"No logs yet."})]})}function Z_({result:n,acknowledged:a,onAcknowledge:r}){if(!n)return null;const u=[...n.errors.map(s=>({...s,level:"error"})),...n.warnings.map(s=>({...s,level:"warning"}))];return v.jsxs("div",{className:"launcherPreview",children:[v.jsxs("div",{className:"launcherSectionHeader",children:[v.jsx("strong",{children:"Validation"}),v.jsx("span",{children:n.errors.length?"Blocked":n.requires_acknowledgement?"Acknowledgement required":"Ready"})]}),u.length>0&&v.jsx("div",{className:"validationIssues",children:u.map((s,h)=>v.jsxs("div",{className:Et("validationIssue",s.level),children:[v.jsx("strong",{children:s.field}),v.jsx("span",{children:s.message})]},s.field+"-"+h))}),n.warnings.length>0&&v.jsxs("label",{className:"warningAck",children:[v.jsx("input",{type:"checkbox",checked:a,onChange:s=>r(s.target.checked)}),v.jsx("span",{children:"Acknowledge warnings"})]}),n.shell_command&&v.jsxs("div",{className:"codeCard",children:[v.jsxs("div",{className:"codeTitle",children:[v.jsx(_u,{size:14})," Final command"]}),v.jsx("pre",{children:n.shell_command})]}),v.jsxs("details",{className:"resolvedArgs",children:[v.jsx("summary",{children:"Resolved arguments"}),v.jsx("pre",{children:JSON.stringify(n.resolved_args,null,2)})]})]})}function K_({config:n,setConfig:a,onStart:r,onPreview:u}){const s=String(n.algo||"sft").toLowerCase(),h=F_(s),f=(m,p)=>a({...n,[m]:p});return v.jsxs("div",{className:"launcherSections",children:[h.map(m=>v.jsxs("div",{className:"launcherSection",children:[v.jsxs("div",{className:"launcherSectionHeader",children:[v.jsx("strong",{children:m.title}),m.note&&v.jsx("span",{children:m.note})]}),v.jsx("div",{className:"formGrid",children:m.fields.map(p=>v.jsx(yu,{label:p.label,value:n[p.key],onChange:d=>f(p.key,d),compact:p.compact,type:p.type,options:p.options},p.key))})]},m.title)),v.jsxs("div",{className:"launcherActions",children:[v.jsxs("button",{className:"secondaryButton",onClick:u,children:[v.jsx(_u,{size:15})," Preview command"]}),v.jsxs("button",{className:"primaryButton launchButton",onClick:r,children:[v.jsx(Ho,{size:16})," Start train"]})]})]})}function F_(n){const a=["gspo","grpo","ppo"].includes(n),r=a,u=n==="dpo",s=n==="ppo",h=n==="gspo",f=n==="grpo",m=[{title:"Basic",note:"model, data, and trainer loop",fields:[ao("algo","Algorithm",["sft","dpo","gspo","grpo","ppo"],!0),me("ckpt","Checkpoint"),ao("model_hub","Model hub",["modelscope","hf"],!0),me("dataset_path","Dataset path"),me("dataset_loader_fn","Dataset loader"),me("epochs","Epochs",!0),me("max_steps","Max steps",!0)]},{title:"Runtime",note:"parallelism, memory, and kernels",fields:[me("world_size","World",!0),me("tp_size","TP",!0),ao("attn_backend","Attention",["flash","native"],!0),Vn("activation_checkpointing","Activation ckpt"),Vn("drop_rollout_state","Drop rollout state"),Vn("eager_decode","Eager decode"),Vn("disable_thinking","Disable thinking")]},{title:"Batching",note:"controls train and rollout memory",fields:[me("batch_size","Batch",!0),...a?[me("n_samples","Samples",!0),me("max_running_prompts","Running prompts",!0)]:[],me("mini_bs","Mini BS",!0),me("score_micro_bs","Score micro BS",!0),me("gradient_accumulation_steps","Grad accum",!0)]},{title:a?"Rollout":"Sequence",note:a?"generation and sampling":"token limits for supervised data",fields:[me("max_prompt_tokens","Prompt tokens",!0),me("max_new_tokens","New tokens",!0),...r?[me("max_context_len","Context",!0),me("agent_fn","Agent fn"),me("agent_timeout_s","Agent timeout",!0),Vn("train_tool_results","Train tool results")]:[],...a?[me("temperature","Temp",!0),me("top_k","Top K",!0),me("top_p","Top P",!0),Vn("greedy","Greedy")]:[]]},{title:"Optimizer",note:"policy optimizer settings",fields:[me("lr","LR",!0),me("min_lr","Min LR",!0),me("lr_decay_steps","Decay steps",!0),me("lr_decay_style","Decay style",!0),me("adam_beta1","Adam beta1",!0),me("adam_beta2","Adam beta2",!0),me("weight_decay","Weight decay",!0),me("grad_clip_norm","Grad clip",!0),Vn("adam_8bit","8-bit Adam")]}],p=[];return(u||s)&&p.push(me("ref_ckpt","Reference ckpt")),a&&p.push(me("reward_fn_path","Reward fn")),s&&p.push(me("reward_ckpt","Reward ckpt"),me("critic_ckpt","Critic ckpt"),me("critic_lr","Critic LR",!0),me("critic_warmup_steps","Critic warmup",!0)),h&&p.push(me("gspo_clip_eps","GSPO clip",!0)),f&&p.push(me("grpo_clip_eps","GRPO clip",!0)),u&&p.push(me("dpo_beta","DPO beta",!0)),s&&p.push(Vn("use_kl_loss","Use KL loss"),me("kl_loss_coef","KL coef",!0),me("kl_loss_type","KL type",!0),me("clip_eps","Clip eps",!0),me("clip_ratio_c","Clip ratio C",!0),me("value_clip_eps","Value clip",!0),me("value_loss_coef","Value coef",!0),me("gamma","Gamma",!0),me("lam","Lambda",!0)),p.length>0&&m.push({title:"Algorithm",note:`${n.toUpperCase()}-specific roles and loss`,fields:p}),m.push({title:"Probe",note:"optional smoke and auto tune helpers",fields:[Vn("tune_params","Tune params"),me("mem_frac","Memory frac",!0),me("tune_max_samples","Tune samples",!0)]},{title:"Output",note:"checkpointing, metrics, and escape hatch",fields:[me("save_path","Save path"),me("save_interval","Save interval",!0),me("metrics_dir","Metrics dir"),me("extra_args","Extra args")]}),m}function me(n,a,r=!1){return{key:n,label:a,compact:r}}function ao(n,a,r,u=!1){return{key:n,label:a,compact:u,type:"select",options:r}}function Vn(n,a){return{key:n,label:a,compact:!0,type:"checkbox"}}function J_({config:n,setConfig:a,onStart:r,onPreview:u}){return v.jsxs("div",{className:"formGrid",children:[[["model_path","Model path"],["model_hub","Model hub"],["host","Host"],["port","Port"],["world_size","World"],["tp_size","TP"],["max_running_prompts","Running prompts"],["default_max_tokens","Default max tokens"],["decode_progress_interval_s","Progress interval"],["attn_backend","Attention backend"],["eager_decode","Eager decode"],["disable_thinking","Disable thinking"],["extra_args","Extra args"]].map(([s,h])=>v.jsx(yu,{label:h,value:n[s],onChange:f=>a({...n,[s]:f}),compact:s!=="model_path"},s)),v.jsxs("div",{className:"launcherActions",children:[v.jsxs("button",{className:"secondaryButton",onClick:u,children:[v.jsx(_u,{size:15})," Preview command"]}),v.jsxs("button",{className:"primaryButton launchButton",onClick:r,children:[v.jsx(Ho,{size:16})," Start serve"]})]})]})}function yu({label:n,value:a,onChange:r,compact:u,type:s="text",options:h=[]}){return s==="checkbox"?v.jsxs("label",{className:Et("field","compact","checkField"),children:[v.jsx("input",{type:"checkbox",checked:!!a,onChange:f=>r(f.target.checked)}),v.jsx("span",{children:n})]}):v.jsxs("label",{className:Et("field",u&&"compact"),children:[v.jsx("span",{children:n}),s==="select"?v.jsx("select",{value:a??"",onChange:f=>r(f.target.value),children:h.map(f=>v.jsx("option",{value:f,children:f},f))}):v.jsx("input",{value:a??"",onChange:f=>r(f.target.value)})]})}function ly({title:n,text:a}){return v.jsxs("div",{className:"empty",children:[v.jsx(Jg,{size:18}),v.jsx("strong",{children:n}),v.jsx("span",{children:a})]})}const qp=typeof document<"u"?document.getElementById("root"):null;qp&&A0.createRoot(qp).render(v.jsx(g_,{})); diff --git a/areno/dashboard/dist/assets/index-CIfovKBG.css b/areno/dashboard/dist/assets/index-CFWsMZvS.css similarity index 51% rename from areno/dashboard/dist/assets/index-CIfovKBG.css rename to areno/dashboard/dist/assets/index-CFWsMZvS.css index 125fbd22..64118e53 100644 --- a/areno/dashboard/dist/assets/index-CIfovKBG.css +++ b/areno/dashboard/dist/assets/index-CFWsMZvS.css @@ -1 +1 @@ -:root{color-scheme:dark;--deck-canvas: #0b0f14;--deck-rail: #0f151c;--deck-panel: #121923;--deck-panel-2: #151f2b;--deck-line: rgba(167, 186, 210, .14);--deck-line-strong: rgba(167, 186, 210, .24);--deck-ink: #edf4ff;--deck-text: #b8c6d8;--deck-muted: #728196;--deck-cyan: #38d7ff;--deck-green: #57e39b;--deck-amber: #ffc857;--deck-red: #ff6b7a;--deck-violet: #a993ff;--radius-sm: 7px;--radius-md: 10px;--radius-lg: 14px;--shadow-panel: 0 0 0 1px rgba(167, 186, 210, .08), 0 18px 40px rgba(0, 0, 0, .26);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--deck-canvas);color:var(--deck-ink);-webkit-font-smoothing:antialiased}:root[data-theme=light]{color-scheme:light;--deck-canvas: #f5f7fb;--deck-rail: #ffffff;--deck-panel: #ffffff;--deck-panel-2: #eef4fb;--deck-line: rgba(25, 44, 68, .13);--deck-line-strong: rgba(25, 44, 68, .24);--deck-ink: #142033;--deck-text: #43566f;--deck-muted: #728096;--deck-cyan: #007ea7;--deck-green: #168a57;--deck-amber: #a56a00;--deck-red: #c73446;--deck-violet: #6e56cf;--shadow-panel: 0 0 0 1px rgba(25, 44, 68, .06), 0 16px 36px rgba(34, 56, 83, .1)}*{box-sizing:border-box}body{margin:0;width:100%;overflow-x:hidden;background:var(--deck-canvas)}button,input,select,textarea{font:inherit}button{cursor:pointer}.shell{display:grid;grid-template-columns:272px minmax(0,1fr);min-height:100vh;width:100%}.rail{display:flex;flex-direction:column;border-right:1px solid var(--deck-line);background:var(--deck-rail);padding:18px 14px}.brand{display:flex;align-items:center;gap:12px;padding:8px 8px 20px}.brandMark{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#101f2c;border:1px solid rgba(56,215,255,.3);color:var(--deck-cyan);font-weight:700}.brandName{font-size:14px;font-weight:650;letter-spacing:0}.brandMeta,.tinyLabel{color:var(--deck-muted);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em}.nav{display:grid;gap:5px}.navItem{display:flex;align-items:center;gap:10px;width:100%;height:36px;border:0;padding:0 10px;background:transparent;color:var(--deck-text);border-radius:var(--radius-sm);text-decoration:none;font-size:13px;font-weight:560}.navItem.active,.navItem:hover{background:#38d7ff14;color:var(--deck-ink)}.railFooter{margin-top:auto;border-top:1px solid var(--deck-line);padding:14px 8px 4px}.monoLine{margin-top:6px;color:var(--deck-text);font-family:SFMono-Regular,Roboto Mono,ui-monospace,monospace;font-size:12px;overflow-wrap:anywhere}.main{min-width:0;max-width:100%;overflow-x:hidden;padding:20px}.topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:16px}.topActions{display:inline-flex;gap:8px}h1,h2,p{margin:0}h1{font-size:25px;line-height:1.15;font-weight:680;letter-spacing:0}h2{font-size:15px;line-height:1.3;font-weight:650}p{color:var(--deck-muted);font-size:13px;line-height:1.45;margin-top:5px}.panel{background:var(--deck-panel);border:1px solid var(--deck-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-panel)}.workspace{min-height:560px}.tabGrid{display:grid;gap:12px}.metricsGrid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:12px;align-items:start}.jobMetricsGrid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:12px;margin-bottom:12px}.insetPanel{box-shadow:none;background:#a7bad208}.runtimeDeck{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:12px;margin-bottom:12px}.gpuDeck{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.gpuCard{background:var(--deck-panel);border:1px solid var(--deck-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-panel);padding:14px}.gpuHead{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:14px}.gpuHead strong{color:var(--deck-ink);font-size:13px}.gpuHead span{color:var(--deck-muted);font-size:12px;text-align:right;overflow-wrap:anywhere}.gpuMeter{display:grid;gap:7px;margin-top:10px}.gpuMeterLabel{display:flex;justify-content:space-between;gap:12px;color:var(--deck-muted);font-size:11px;font-weight:700}.gpuMeterLabel b{color:var(--deck-text);font-variant-numeric:tabular-nums}.meterTrack{height:9px;border-radius:999px;background:#a7bad21f;overflow:hidden}.meterTrack i{display:block;height:100%;border-radius:inherit;background:var(--deck-violet)}.meterTrack.util i{background:var(--deck-cyan)}.runtimeHero,.envFacts,.checkMatrix,.dependencyStrip{background:var(--deck-panel);border:1px solid var(--deck-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-panel)}.runtimeHero{display:flex;align-items:center;gap:16px;min-height:116px;padding:16px}.readinessOrb{display:grid;place-items:center;width:58px;height:58px;border-radius:18px;font-weight:800;font-size:17px;border:1px solid var(--deck-line);background:#0b1118}.readinessOrb.ready{color:var(--deck-green);border-color:#57e39b59;box-shadow:inset 0 0 24px #57e39b0f}.readinessOrb.blocked{color:var(--deck-amber);border-color:#ffc85759;box-shadow:inset 0 0 24px #ffc8570f}.envFacts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;overflow:hidden;background:var(--deck-line)}.envFact{display:flex;align-items:center;gap:10px;min-height:57px;padding:12px;background:var(--deck-panel)}.envFact>span{display:grid;place-items:center;width:28px;height:28px;color:var(--deck-cyan);border:1px solid var(--deck-line);border-radius:8px;background:#0b1118}.envFact label{display:block;color:var(--deck-muted);font-size:11px;font-weight:650;margin-bottom:3px}.envFact strong{display:block;color:var(--deck-ink);font-size:13px;font-weight:650;overflow-wrap:anywhere}.checkMatrix{grid-column:1 / -1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;overflow:hidden;background:var(--deck-line)}.checkItem{min-height:76px;padding:11px;background:var(--deck-panel)}.checkItem span{display:inline-flex;align-items:center;height:20px;border-radius:999px;padding:0 7px;font-size:10px;font-weight:800;margin-bottom:8px}.checkItem.ok span{color:var(--deck-green);background:#57e39b1a}.checkItem.warn span{color:var(--deck-amber);background:#ffc8571a}.checkItem.fail span{color:var(--deck-red);background:#ff6b7a1a}.checkItem strong,.checkItem small{display:block}.checkItem strong{color:var(--deck-ink);font-size:12px;font-weight:650}.checkItem small{margin-top:5px;color:var(--deck-muted);font-size:11px;line-height:1.35;overflow-wrap:anywhere}.dependencyStrip{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:8px;padding:10px}.depPill{display:inline-flex;align-items:center;min-height:26px;padding:0 9px;border-radius:999px;border:1px solid var(--deck-line);color:var(--deck-text);background:#0b1118;font-size:12px;font-weight:600}.depPill.ok{border-color:#57e39b40}.depPill.warn{border-color:#ffc85740}.panel{min-width:0;padding:14px}.panelHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px;min-width:0}.panelHeader>div{min-width:0}.jobList{display:grid;gap:7px}.jobListPage .jobList{gap:10px}.pagerControls{display:inline-flex;align-items:center;gap:8px;flex-shrink:0}.pagerControls span,.listFooter{color:var(--deck-muted);font-size:12px;font-variant-numeric:tabular-nums}.pagerControls button:disabled{cursor:not-allowed;opacity:.42}.listFooter{margin-top:12px;text-align:right}.jobRow{display:grid;grid-template-columns:34px 1fr 10px;align-items:center;gap:10px;width:100%;min-height:56px;border:1px solid transparent;border-radius:var(--radius-md);background:transparent;color:inherit;padding:7px;text-align:left}.jobRow.large{grid-template-columns:42px 1fr 10px;min-height:72px;padding:11px}.jobRow.large .jobIcon{width:42px;height:42px}.detailActions{display:inline-flex;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end;gap:8px}.jobRow:hover,.jobRow.selected{background:var(--deck-panel-2);border-color:var(--deck-line)}.jobIcon{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#0b1119;color:var(--deck-cyan);border:1px solid var(--deck-line)}.jobTitle{font-size:13px;font-weight:620}.jobMeta{margin-top:4px;color:var(--deck-muted);font-size:12px}.statusDot{width:8px;height:8px;border-radius:50%;background:var(--deck-muted)}.statusDot.running{background:var(--deck-green);box-shadow:0 0 0 4px #57e39b1a}.statusDot.failed{background:var(--deck-red)}.statusDot.stopped{background:var(--deck-amber)}.timeline{display:flex;gap:8px;margin-bottom:12px;overflow-x:auto;padding-bottom:4px}.timelineItem{flex:0 0 136px;min-width:136px;display:flex;align-items:center;gap:8px;height:38px;padding:0 10px;border-radius:var(--radius-md);background:#0c121a;border:1px solid var(--deck-line);color:var(--deck-muted)}.timelineItem span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#ffffff0d;font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}.timelineItem.done{color:var(--deck-text)}.timelineItem.current{border-color:#38d7ff73;color:var(--deck-cyan)}.chart{min-height:272px;border:1px solid var(--deck-line);border-radius:var(--radius-lg);background:#0c121a;padding:12px;margin-bottom:12px}.chartControls{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:10px;min-width:0}.chartControls select{height:28px;width:min(230px,100%);min-width:0;border:1px solid var(--deck-line);border-radius:var(--radius-sm);background:#0b1118;color:var(--deck-text);padding:0 8px;outline:none}.chartControls label{display:flex;align-items:center;gap:7px;color:var(--deck-muted);font-size:11px;white-space:nowrap}.chartControls input[type=range]{width:92px;height:4px;accent-color:var(--deck-cyan)}.sampleCard{margin-bottom:12px;border:1px solid var(--deck-line);border-radius:var(--radius-lg);background:#0b1118;overflow:hidden}.sampleGrid{display:grid;grid-template-columns:.9fr 1.1fr;gap:1px;background:var(--deck-line)}.sampleGrid>div,.sampleEmpty{min-height:116px;padding:11px;background:#0b1118}.sampleGrid span{display:block;color:var(--deck-muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;margin-bottom:7px}.sampleGrid p,.sampleEmpty{color:var(--deck-text);font-size:12px;line-height:1.5;max-height:150px;overflow:auto;white-space:pre-wrap}.sampleEmpty{color:var(--deck-muted)}.chartHeader{display:flex;align-items:center;justify-content:space-between;color:var(--deck-muted);font-size:12px;margin-bottom:12px}.chartHeader span{display:flex;align-items:center;gap:6px}.metricPlot{display:block;width:100%;height:180px;overflow:visible}.plotGrid line{stroke:#a7bad21a;stroke-width:1}.rawLine,.smoothLine{fill:none;stroke-linejoin:round;stroke-linecap:round}.rawLine{stroke:#728196bf;stroke-width:1.3}.smoothLine{stroke:var(--deck-cyan);stroke-width:2.7;filter:drop-shadow(0 0 8px rgba(56,215,255,.2))}.metricPlot circle{fill:var(--deck-ink);stroke:var(--deck-canvas);stroke-width:1.2}.plotFooter{display:flex;flex-wrap:wrap;gap:6px 12px;justify-content:space-between;margin-top:8px;color:var(--deck-muted);font-size:11px;font-variant-numeric:tabular-nums}.plotEmpty{display:grid;place-items:center;height:180px;color:var(--deck-muted);border:1px dashed var(--deck-line-strong);border-radius:var(--radius-md)}.timePerf{margin-bottom:12px;border:1px solid var(--deck-line);border-radius:var(--radius-lg);background:#0b1118;padding:12px}.timePerfHeader{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.codeTitle.inline{position:static;height:auto;padding:0;border:0;background:transparent}.legend{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:9px 12px;color:var(--deck-muted);font-size:11px}.legend span{display:inline-flex;align-items:center;gap:5px}.legend i{width:8px;height:8px;border-radius:50%}.legend b{color:var(--deck-text);font-weight:700;font-variant-numeric:tabular-nums}.timeRows{display:grid;gap:8px}.timeRow{display:grid;grid-template-columns:64px minmax(0,1fr) 70px;align-items:center;gap:10px}.timeRow label,.timeRow strong{color:var(--deck-text);font-size:12px;font-weight:650;font-variant-numeric:tabular-nums}.timeRow strong{text-align:right}.timeTrack{height:28px;border-radius:6px;background:#141b25;border:1px solid rgba(167,186,210,.1);overflow:hidden}.timeStack{display:flex;height:100%;min-width:18px}.timeStack span{display:flex;align-items:center;justify-content:center;min-width:3px;color:#ffffffeb;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums;overflow:hidden;white-space:nowrap}.seg-rollout,.legend .seg-rollout{background:#20c997}.seg-train,.legend .seg-train{background:#bf2bd9}.seg-other,.legend .seg-other{background:#2851f5}.seg-reward,.legend .seg-reward{background:#d33672}.seg-advantages,.legend .seg-advantages{background:#5a3ee6}.seg-actor-log-probs,.legend .seg-actor-log-probs{background:#e243d2}.seg-ref-log-probs,.legend .seg-ref-log-probs,.seg-old-policy-log-probs,.legend .seg-old-policy-log-probs{background:#c43f66}.seg-value,.legend .seg-value{background:#8b5cf6}.seg-sync-weight,.legend .seg-sync-weight,.seg-save,.legend .seg-save{background:#83b81a}.seg-make-sample,.legend .seg-make-sample{background:#b96a19}.split{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:12px}.codeCard{min-width:0;min-height:250px;max-height:360px;overflow:auto;border:1px solid var(--deck-line);border-radius:var(--radius-lg);background:#0b1118}.codeTitle{position:sticky;top:0;display:flex;align-items:center;gap:7px;height:34px;padding:0 11px;border-bottom:1px solid var(--deck-line);background:#0d131b;color:var(--deck-text);font-size:12px;font-weight:650}.sampleTitle{justify-content:space-between;gap:10px;min-height:34px;height:auto;padding-top:4px;padding-bottom:4px}.sampleTitle>span{display:inline-flex;align-items:center;gap:7px}.sampleControls{display:inline-flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.sampleControls select{height:26px;max-width:170px;border:1px solid var(--deck-line);border-radius:var(--radius-sm);background:#0b1118;color:var(--deck-text);padding:0 8px;font-size:11px;outline:none}pre{margin:0;padding:11px;color:#d2deee;font-family:SFMono-Regular,Roboto Mono,ui-monospace,monospace;font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.configSections{display:grid;gap:12px;padding:11px}.configSection{min-width:0}.configSection h3{margin:0 0 8px;color:var(--deck-text);font-size:12px;font-weight:750;letter-spacing:0}.configGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}.configItem{min-width:0;border:1px solid var(--deck-line);border-radius:var(--radius-sm);background:#a7bad20d;padding:9px}.configItem span{display:block;color:var(--deck-muted);font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.05em;margin-bottom:5px}.configItem strong{display:block;color:var(--deck-ink);font-size:12px;font-weight:620;line-height:1.35;overflow-wrap:anywhere}.lowerGrid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:12px;margin-top:12px}.tabs{display:flex;gap:3px;padding:3px;border-radius:var(--radius-md);border:1px solid var(--deck-line);background:#0c121a}.tabs button{height:28px;border:0;border-radius:7px;background:transparent;color:var(--deck-muted);padding:0 12px;font-size:12px;font-weight:650}.tabs button.active{color:var(--deck-ink);background:var(--deck-panel-2)}.secondaryButton{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:34px;border:1px solid var(--deck-line);border-radius:var(--radius-sm);padding:0 12px;color:var(--deck-text);background:transparent;font-size:12px;font-weight:700}.launcherSections{display:grid;gap:14px}.launcherSection{display:grid;gap:10px;border:1px solid var(--deck-line);border-radius:var(--radius-md);padding:14px;background:var(--deck-panel-2)}.launcherSectionHeader{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.launcherSectionHeader strong{color:var(--deck-ink);font-size:13px;font-weight:760}.launcherSectionHeader span{color:var(--deck-faint);font-size:11px;font-weight:600;text-align:right}.formGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.field{display:grid;gap:6px;grid-column:span 2}.field.compact{grid-column:span 1}.field span{color:var(--deck-muted);font-size:11px;font-weight:650}input,select,textarea{width:100%;border:1px solid var(--deck-line);border-radius:var(--radius-sm);background:#0b1118;color:var(--deck-ink);outline:none}input,select{height:34px;padding:0 10px;font-size:13px}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--deck-muted) 50%),linear-gradient(135deg,var(--deck-muted) 50%,transparent 50%);background-position:calc(100% - 14px) 14px,calc(100% - 9px) 14px;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:28px}.checkField{display:flex;min-height:34px;align-items:center;gap:9px;align-self:end;border:1px solid var(--deck-line);border-radius:var(--radius-sm);padding:0 10px;background:#0b1118}.checkField input{width:15px;height:15px;padding:0;accent-color:var(--deck-cyan)}.checkField span{color:var(--deck-text);font-size:12px;font-weight:650}textarea{min-height:96px;resize:vertical;padding:10px;line-height:1.45}input:focus,select:focus,textarea:focus{border-color:#38d7ff85;box-shadow:0 0 0 3px #38d7ff1a}.primaryButton,.dangerButton,.iconButton{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;border-radius:var(--radius-sm);border:1px solid var(--deck-line);padding:0 12px;font-weight:650;font-size:13px}.primaryButton{color:#001018;border-color:#38d7ffcc;background:var(--deck-cyan)}.primaryButton.wide{grid-column:1 / -1}.launchButton{min-height:44px;border-radius:var(--radius-md);letter-spacing:0;width:100%}.dangerButton{color:var(--deck-red);background:#ff6b7a1a;border-color:#ff6b7a57}.dangerButton:hover{background:#ff6b7a29;border-color:#ff6b7a7a}.iconButton{width:36px;padding:0;color:var(--deck-text);background:var(--deck-panel)}.notice,.error{min-height:38px;display:flex;align-items:center;border-radius:var(--radius-md);padding:0 12px;margin-bottom:12px;font-size:13px;border:1px solid var(--deck-line)}.notice{color:var(--deck-cyan);background:#38d7ff14}.error{color:#ffd6db;background:#ff6b7a1a}.agentPanel{display:flex;flex-direction:column;gap:12px}.agentConfig{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:10px;align-items:end;margin-bottom:12px}.agentConfig.modalForm{grid-template-columns:1fr;margin-bottom:0}.modalOverlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;display:grid;place-items:center;background:#03080fa8;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:24px}.modalCard{width:min(560px,100%);border:1px solid var(--deck-line);border-radius:16px;background:var(--deck-panel);box-shadow:0 24px 80px #0000006b;padding:16px}.modalHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.chatPanel{display:grid;grid-template-rows:auto auto minmax(360px,1fr) auto;min-height:650px}.agentHeaderActions{display:inline-flex;align-items:center;gap:8px}.agentTabs{display:inline-flex;align-items:center;gap:6px;width:max-content;margin:4px 0 0 clamp(28px,5vw,112px);padding:4px;border:1px solid var(--deck-line);border-radius:999px;background:var(--deck-soft)}.agentTabs button{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:999px;padding:7px 12px;background:transparent;color:var(--deck-muted);font-size:12px;font-weight:750}.agentTabs button.active{background:var(--deck-panel);color:var(--deck-ink);box-shadow:0 8px 22px #00000024}.chatMessages{display:flex;flex-direction:column;gap:24px;min-height:360px;max-height:56vh;overflow:auto;border:0;border-radius:var(--radius-lg);background:transparent;padding:48px clamp(28px,5vw,112px) 18px}.chatBubble{max-width:min(1280px,100%);border:0;border-radius:0;background:transparent;padding:0;color:var(--deck-text)}.chatBubble.user{align-self:flex-end;max-width:min(680px,72%);border-radius:14px;background:#1a86ff;color:#fff;box-shadow:0 12px 28px #1a86ff29;padding:13px 20px}.chatBubble.assistant{align-self:flex-start;width:min(1280px,100%)}.chatBubble>span{display:block;margin-bottom:5px;color:var(--deck-muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.chatBubble.user>span{display:none}.chatBubble.assistant>span{display:none}.chatBubble p{margin:0;white-space:pre-wrap;color:var(--deck-text)}.chatBubble.user p,.chatBubble.user .markdownBlock{color:#fff;font-size:13px;font-weight:650}.reasoningBlock{position:relative;margin:4px 0 18px;padding-left:34px;color:var(--deck-muted);background:transparent}.reasoningBlock:before{content:"";position:absolute;top:28px;bottom:0;left:15px;width:2px;border-radius:999px;background:var(--deck-line)}.reasoningBlock summary{display:inline-flex;align-items:center;gap:9px;cursor:pointer;list-style:none;min-height:28px}.reasoningBlock summary::-webkit-details-marker{display:none}.reasoningBlock summary span{display:inline-grid;place-items:center;width:18px;height:18px;border:1px solid var(--deck-line-strong);border-radius:999px;color:var(--deck-muted);font-size:11px}.reasoningBlock summary strong{color:var(--deck-muted);font-size:12px;font-weight:650}.reasoningBlock summary:after{content:"⌄";color:var(--deck-muted);font-size:15px}.agentEventList{display:grid;gap:16px}.agentEventList>.markdownBlock{width:min(780px,calc(100% - 64px));margin-left:34px}.markdownBlock{color:var(--deck-text);font-size:13px;line-height:1.58;overflow-wrap:anywhere}.markdownBlock>*:first-child{margin-top:0}.markdownBlock>*:last-child{margin-bottom:0}.markdownBlock p,.markdownBlock ul,.markdownBlock ol{margin:0 0 8px}.markdownBlock ul,.markdownBlock ol{padding-left:20px}.markdownBlock code{border:1px solid var(--deck-line);border-radius:5px;padding:1px 4px;background:#38d7ff14;color:var(--deck-ink)}.markdownBlock pre{max-height:220px;overflow:auto;border:1px solid var(--deck-line);border-radius:8px;padding:10px;background:#04080d38}.markdownBlock table{display:block;width:100%;max-width:100%;margin:10px 0;overflow:auto;border-collapse:collapse;border:1px solid var(--deck-line);border-radius:8px}.markdownBlock th,.markdownBlock td{padding:7px 9px;border-bottom:1px solid var(--deck-line);text-align:left;white-space:nowrap}.markdownBlock th{color:var(--deck-ink);background:#38d7ff14;font-size:11px;font-weight:750}.markdownBlock tr:last-child td{border-bottom:0}.reasoningBlock .markdownBlock{width:min(780px,calc(100% - 64px));max-height:160px;overflow:auto;margin-left:34px;padding:14px 0 2px;color:var(--deck-muted)}.toolCallList{display:grid;gap:8px;margin-top:0}.toolCallCard{width:min(780px,calc(100% - 64px));margin-left:34px;border:1px solid rgba(148,163,184,.24);border-radius:11px;background:var(--deck-panel);box-shadow:none;overflow:hidden}.toolCallCard.ok{border-color:var(--deck-line-strong);background:var(--deck-panel)}.toolCallCard.failed{border-color:#ff6b7a47;background:#ff6b7a14}.toolCallCard.live{border-color:#57e39b6b;background:#57e39b12}.toolCallDetails summary,.toolResultDetails summary{display:grid;grid-template-columns:auto minmax(96px,auto) minmax(0,1fr);align-items:center;gap:8px;min-height:36px;padding:0 12px;cursor:pointer;border-bottom:1px solid var(--deck-line);list-style-position:outside}.toolCallDetails:not([open]) summary,.toolResultDetails:not([open]) summary{border-bottom:0}.toolCallDetails summary::marker,.toolResultDetails summary::marker{color:var(--deck-muted)}.toolResultDetails summary span{display:inline-flex;align-items:center;justify-content:center;min-width:58px;height:19px;border:1px solid rgba(87,227,155,.28);border-radius:999px;background:#57e39b1a;color:var(--deck-green);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.toolCallDetails summary span{position:relative;width:14px;min-width:14px;height:14px;overflow:hidden;color:transparent}.toolCallDetails summary span:before{content:"";position:absolute;top:2px;right:2px;bottom:2px;left:2px;border-radius:999px;background:#35c737}.toolResultDetails.ok summary span{border-color:#57e39b38;background:#57e39b17;color:var(--deck-green)}.toolResultDetails.failed summary span{border-color:#ff6b7a47;background:#ff6b7a1a;color:var(--deck-red)}.toolCallDetails summary b,.toolResultDetails summary b{color:var(--deck-ink);font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Monaco,Consolas,monospace;font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toolCallDetails summary em,.toolResultDetails summary em{min-width:0;overflow:hidden;color:var(--deck-muted);font-size:11px;font-style:normal;text-overflow:ellipsis;white-space:nowrap}.toolCallHead{border-bottom:1px solid var(--deck-line)}.toolCallHead span{margin:0;color:var(--deck-cyan)}.toolCallHead b{color:var(--deck-ink);font-size:11px}.toolCallCard pre{max-height:140px;overflow:auto;background:transparent;border-top:1px solid var(--deck-line);padding:10px 12px;font-size:11px}.toolResultDetails pre{max-height:240px}.streamingHint{margin-top:8px;color:var(--deck-cyan);font-size:11px;font-weight:700}.chatComposer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;margin-top:12px;border:1px solid var(--deck-line);border-radius:var(--radius-lg);background:var(--deck-panel);padding:10px}.chatComposer textarea{min-height:72px;border:0;padding:8px;background:transparent;resize:none;font-size:13px}.agentHistory{min-height:360px;max-height:56vh;overflow:auto;padding:28px clamp(28px,5vw,112px) 18px}.agentHistoryHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.agentHistoryHeader h3{margin:0 0 4px;font-size:16px}.agentHistoryHeader p{margin:0;color:var(--deck-muted);font-size:12px}.agentHistoryList{display:grid;gap:10px}.agentHistoryItem{display:grid;gap:5px;width:min(840px,100%);border:1px solid var(--deck-line);border-radius:13px;background:var(--deck-panel);padding:13px 15px;text-align:left}.agentHistoryItem.active{border-color:#38d7ff7a;box-shadow:0 0 0 1px #38d7ff2e}.agentHistoryItem strong{color:var(--deck-ink);font-size:13px}.agentHistoryItem span{overflow:hidden;color:var(--deck-muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.agentHistoryItem small{color:var(--deck-subtle);font-size:11px}.agentOutput{min-height:152px;border-radius:var(--radius-lg);border:1px solid var(--deck-line);background:#0b1118;color:var(--deck-text);padding:12px;font-size:13px;line-height:1.5;white-space:pre-wrap}.empty{display:grid;place-items:center;gap:8px;min-height:180px;color:var(--deck-muted);border:1px dashed var(--deck-line-strong);border-radius:var(--radius-lg);text-align:center;padding:16px}.empty strong{color:var(--deck-text);font-size:13px}.empty span{font-size:12px}:root[data-theme=light] .brandMark,:root[data-theme=light] .readinessOrb,:root[data-theme=light] .envFact,:root[data-theme=light] .envFact>span,:root[data-theme=light] .checkItem,:root[data-theme=light] .depPill,:root[data-theme=light] .timelineItem,:root[data-theme=light] .chart,:root[data-theme=light] .sampleCard,:root[data-theme=light] .sampleGrid>div,:root[data-theme=light] .sampleEmpty,:root[data-theme=light] .timePerf,:root[data-theme=light] .codeCard,:root[data-theme=light] .codeTitle,:root[data-theme=light] input,:root[data-theme=light] textarea,:root[data-theme=light] select,:root[data-theme=light] .checkField,:root[data-theme=light] .agentOutput,:root[data-theme=light] .chatComposer,:root[data-theme=light] .timeTrack,:root[data-theme=light] .tabs{background:var(--deck-panel)}:root[data-theme=light] .chartControls select,:root[data-theme=light] .configItem{background:#fff;color:var(--deck-ink)}:root[data-theme=light] .dangerButton{color:#a51d2d;background:#fff1f3;border-color:#c7344647}:root[data-theme=light] .primaryButton{color:#fff;background:#007ea7;border-color:#007ea7;box-shadow:0 8px 18px #007ea72e}:root[data-theme=light] .launchButton{background:#006d94;border-color:#006d94}:root[data-theme=light] .jobIcon{background:#f3f7fb}:root[data-theme=light] .chatBubble.user{background:#1683ff;color:#fff}:root[data-theme=light] .chatMessages{background:transparent}:root[data-theme=light] .toolCallCard{box-shadow:0 6px 18px #1420330f}:root[data-theme=light] .rawLine{stroke:#55657aa6}:root[data-theme=light] pre{color:#25344a}@media(max-width:980px){.shell{grid-template-columns:1fr}.rail{position:sticky;top:0;z-index:20;border-right:0;border-bottom:1px solid var(--deck-line);padding:10px}.brand,.railFooter{display:none}.nav{display:flex;gap:6px;overflow-x:auto}.navItem{width:auto;flex:0 0 auto}.main{padding:12px}.topbar,.panelHeader,.timePerfHeader{flex-direction:column;align-items:stretch}.runtimeDeck,.jobMetricsGrid,.metricsGrid,.split,.sampleGrid,.formGrid{grid-template-columns:1fr}.field,.field.compact{grid-column:span 1}.checkMatrix,.envFacts{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.checkMatrix,.envFacts{grid-template-columns:1fr}.jobRow.large{grid-template-columns:34px minmax(0,1fr)}.jobRow.large .statusDot{display:none}.timeRow{grid-template-columns:52px minmax(0,1fr)}.timeRow strong{grid-column:2;text-align:left}} +:root{color-scheme:dark;--deck-canvas: #0b0f14;--deck-rail: #0f151c;--deck-panel: #121923;--deck-panel-2: #151f2b;--deck-line: rgba(167, 186, 210, .14);--deck-line-strong: rgba(167, 186, 210, .24);--deck-ink: #edf4ff;--deck-text: #b8c6d8;--deck-muted: #728196;--deck-cyan: #38d7ff;--deck-green: #57e39b;--deck-amber: #ffc857;--deck-red: #ff6b7a;--deck-violet: #a993ff;--radius-sm: 7px;--radius-md: 10px;--radius-lg: 14px;--shadow-panel: 0 0 0 1px rgba(167, 186, 210, .08), 0 18px 40px rgba(0, 0, 0, .26);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:var(--deck-canvas);color:var(--deck-ink);-webkit-font-smoothing:antialiased}:root[data-theme=light]{color-scheme:light;--deck-canvas: #f5f7fb;--deck-rail: #ffffff;--deck-panel: #ffffff;--deck-panel-2: #eef4fb;--deck-line: rgba(25, 44, 68, .13);--deck-line-strong: rgba(25, 44, 68, .24);--deck-ink: #142033;--deck-text: #43566f;--deck-muted: #728096;--deck-cyan: #007ea7;--deck-green: #168a57;--deck-amber: #a56a00;--deck-red: #c73446;--deck-violet: #6e56cf;--shadow-panel: 0 0 0 1px rgba(25, 44, 68, .06), 0 16px 36px rgba(34, 56, 83, .1)}*{box-sizing:border-box}body{margin:0;width:100%;overflow-x:hidden;background:var(--deck-canvas)}button,input,select,textarea{font:inherit}button{cursor:pointer}.shell{display:grid;grid-template-columns:272px minmax(0,1fr);min-height:100vh;width:100%}.rail{display:flex;flex-direction:column;border-right:1px solid var(--deck-line);background:var(--deck-rail);padding:18px 14px}.brand{display:flex;align-items:center;gap:12px;padding:8px 8px 20px}.brandMark{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#101f2c;border:1px solid rgba(56,215,255,.3);color:var(--deck-cyan);font-weight:700}.brandName{font-size:14px;font-weight:650;letter-spacing:0}.brandMeta,.tinyLabel{color:var(--deck-muted);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em}.nav{display:grid;gap:5px}.navItem{display:flex;align-items:center;gap:10px;width:100%;height:36px;border:0;padding:0 10px;background:transparent;color:var(--deck-text);border-radius:var(--radius-sm);text-decoration:none;font-size:13px;font-weight:560}.navItem.active,.navItem:hover{background:#38d7ff14;color:var(--deck-ink)}.railFooter{margin-top:auto;border-top:1px solid var(--deck-line);padding:14px 8px 4px}.monoLine{margin-top:6px;color:var(--deck-text);font-family:SFMono-Regular,Roboto Mono,ui-monospace,monospace;font-size:12px;overflow-wrap:anywhere}.main{min-width:0;max-width:100%;overflow-x:hidden;padding:20px}.topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:16px}.topActions{display:inline-flex;gap:8px}h1,h2,p{margin:0}h1{font-size:25px;line-height:1.15;font-weight:680;letter-spacing:0}h2{font-size:15px;line-height:1.3;font-weight:650}p{color:var(--deck-muted);font-size:13px;line-height:1.45;margin-top:5px}.panel{background:var(--deck-panel);border:1px solid var(--deck-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-panel)}.workspace{min-height:560px}.tabGrid{display:grid;gap:12px}.metricsGrid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:12px;align-items:start}.jobMetricsGrid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:12px;margin-bottom:12px}.insetPanel{box-shadow:none;background:#a7bad208}.runtimeDeck{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:12px;margin-bottom:12px}.gpuDeck{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.gpuCard{background:var(--deck-panel);border:1px solid var(--deck-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-panel);padding:14px}.gpuHead{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:14px}.gpuHead strong{color:var(--deck-ink);font-size:13px}.gpuHead span{color:var(--deck-muted);font-size:12px;text-align:right;overflow-wrap:anywhere}.gpuMeter{display:grid;gap:7px;margin-top:10px}.gpuMeterLabel{display:flex;justify-content:space-between;gap:12px;color:var(--deck-muted);font-size:11px;font-weight:700}.gpuMeterLabel b{color:var(--deck-text);font-variant-numeric:tabular-nums}.meterTrack{height:9px;border-radius:999px;background:#a7bad21f;overflow:hidden}.meterTrack i{display:block;height:100%;border-radius:inherit;background:var(--deck-violet)}.meterTrack.util i{background:var(--deck-cyan)}.runtimeHero,.envFacts,.checkMatrix,.dependencyStrip{background:var(--deck-panel);border:1px solid var(--deck-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-panel)}.runtimeHero{display:flex;align-items:center;gap:16px;min-height:116px;padding:16px}.readinessOrb{display:grid;place-items:center;width:58px;height:58px;border-radius:18px;font-weight:800;font-size:17px;border:1px solid var(--deck-line);background:#0b1118}.readinessOrb.ready{color:var(--deck-green);border-color:#57e39b59;box-shadow:inset 0 0 24px #57e39b0f}.readinessOrb.blocked{color:var(--deck-amber);border-color:#ffc85759;box-shadow:inset 0 0 24px #ffc8570f}.envFacts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;overflow:hidden;background:var(--deck-line)}.envFact{display:flex;align-items:center;gap:10px;min-height:57px;padding:12px;background:var(--deck-panel)}.envFact>span{display:grid;place-items:center;width:28px;height:28px;color:var(--deck-cyan);border:1px solid var(--deck-line);border-radius:8px;background:#0b1118}.envFact label{display:block;color:var(--deck-muted);font-size:11px;font-weight:650;margin-bottom:3px}.envFact strong{display:block;color:var(--deck-ink);font-size:13px;font-weight:650;overflow-wrap:anywhere}.checkMatrix{grid-column:1 / -1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;overflow:hidden;background:var(--deck-line)}.checkItem{min-height:76px;padding:11px;background:var(--deck-panel)}.checkItem span{display:inline-flex;align-items:center;height:20px;border-radius:999px;padding:0 7px;font-size:10px;font-weight:800;margin-bottom:8px}.checkItem.ok span{color:var(--deck-green);background:#57e39b1a}.checkItem.warn span{color:var(--deck-amber);background:#ffc8571a}.checkItem.fail span{color:var(--deck-red);background:#ff6b7a1a}.checkItem strong,.checkItem small{display:block}.checkItem strong{color:var(--deck-ink);font-size:12px;font-weight:650}.checkItem small{margin-top:5px;color:var(--deck-muted);font-size:11px;line-height:1.35;overflow-wrap:anywhere}.dependencyStrip{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:8px;padding:10px}.depPill{display:inline-flex;align-items:center;min-height:26px;padding:0 9px;border-radius:999px;border:1px solid var(--deck-line);color:var(--deck-text);background:#0b1118;font-size:12px;font-weight:600}.depPill.ok{border-color:#57e39b40}.depPill.warn{border-color:#ffc85740}.panel{min-width:0;padding:14px}.panelHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px;min-width:0}.panelHeader>div{min-width:0}.jobList{display:grid;gap:7px}.jobListPage .jobList{gap:10px}.pagerControls{display:inline-flex;align-items:center;gap:8px;flex-shrink:0}.pagerControls span,.listFooter{color:var(--deck-muted);font-size:12px;font-variant-numeric:tabular-nums}.pagerControls button:disabled{cursor:not-allowed;opacity:.42}.listFooter{margin-top:12px;text-align:right}.jobRow{display:grid;grid-template-columns:34px 1fr 10px;align-items:center;gap:10px;width:100%;min-height:56px;border:1px solid transparent;border-radius:var(--radius-md);background:transparent;color:inherit;padding:7px;text-align:left}.jobRow.large{grid-template-columns:42px 1fr 10px;min-height:72px;padding:11px}.jobRow.large .jobIcon{width:42px;height:42px}.detailActions{display:inline-flex;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end;gap:8px}.jobRow:hover,.jobRow.selected{background:var(--deck-panel-2);border-color:var(--deck-line)}.jobIcon{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#0b1119;color:var(--deck-cyan);border:1px solid var(--deck-line)}.jobTitle{font-size:13px;font-weight:620}.jobMeta{margin-top:4px;color:var(--deck-muted);font-size:12px}.statusDot{width:8px;height:8px;border-radius:50%;background:var(--deck-muted)}.statusDot.running{background:var(--deck-green);box-shadow:0 0 0 4px #57e39b1a}.statusDot.failed{background:var(--deck-red)}.statusDot.stopped{background:var(--deck-amber)}.timeline{display:flex;gap:8px;margin-bottom:12px;overflow-x:auto;padding-bottom:4px}.timelineItem{flex:0 0 136px;min-width:136px;display:flex;align-items:center;gap:8px;height:38px;padding:0 10px;border-radius:var(--radius-md);background:#0c121a;border:1px solid var(--deck-line);color:var(--deck-muted)}.timelineItem span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#ffffff0d;font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}.timelineItem.done{color:var(--deck-text)}.timelineItem.current{border-color:#38d7ff73;color:var(--deck-cyan)}.chart{min-height:272px;border:1px solid var(--deck-line);border-radius:var(--radius-lg);background:#0c121a;padding:12px;margin-bottom:12px}.chartControls{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:10px;min-width:0}.chartControls select{height:28px;width:min(230px,100%);min-width:0;border:1px solid var(--deck-line);border-radius:var(--radius-sm);background:#0b1118;color:var(--deck-text);padding:0 8px;outline:none}.chartControls label{display:flex;align-items:center;gap:7px;color:var(--deck-muted);font-size:11px;white-space:nowrap}.chartControls input[type=range]{width:92px;height:4px;accent-color:var(--deck-cyan)}.sampleCard{margin-bottom:12px;border:1px solid var(--deck-line);border-radius:var(--radius-lg);background:#0b1118;overflow:hidden}.sampleGrid{display:grid;grid-template-columns:.9fr 1.1fr;gap:1px;background:var(--deck-line)}.sampleGrid>div,.sampleEmpty{min-height:116px;padding:11px;background:#0b1118}.sampleGrid span{display:block;color:var(--deck-muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;margin-bottom:7px}.sampleGrid p,.sampleEmpty{color:var(--deck-text);font-size:12px;line-height:1.5;max-height:150px;overflow:auto;white-space:pre-wrap}.sampleEmpty{color:var(--deck-muted)}.chartHeader{display:flex;align-items:center;justify-content:space-between;color:var(--deck-muted);font-size:12px;margin-bottom:12px}.chartHeader span{display:flex;align-items:center;gap:6px}.metricPlot{display:block;width:100%;height:180px;overflow:visible}.plotGrid line{stroke:#a7bad21a;stroke-width:1}.rawLine,.smoothLine{fill:none;stroke-linejoin:round;stroke-linecap:round}.rawLine{stroke:#728196bf;stroke-width:1.3}.smoothLine{stroke:var(--deck-cyan);stroke-width:2.7;filter:drop-shadow(0 0 8px rgba(56,215,255,.2))}.metricPlot circle{fill:var(--deck-ink);stroke:var(--deck-canvas);stroke-width:1.2}.plotFooter{display:flex;flex-wrap:wrap;gap:6px 12px;justify-content:space-between;margin-top:8px;color:var(--deck-muted);font-size:11px;font-variant-numeric:tabular-nums}.plotEmpty{display:grid;place-items:center;height:180px;color:var(--deck-muted);border:1px dashed var(--deck-line-strong);border-radius:var(--radius-md)}.timePerf{margin-bottom:12px;border:1px solid var(--deck-line);border-radius:var(--radius-lg);background:#0b1118;padding:12px}.timePerfHeader{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.codeTitle.inline{position:static;height:auto;padding:0;border:0;background:transparent}.legend{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:9px 12px;color:var(--deck-muted);font-size:11px}.legend span{display:inline-flex;align-items:center;gap:5px}.legend i{width:8px;height:8px;border-radius:50%}.legend b{color:var(--deck-text);font-weight:700;font-variant-numeric:tabular-nums}.timeRows{display:grid;gap:8px}.timeRow{display:grid;grid-template-columns:64px minmax(0,1fr) 70px;align-items:center;gap:10px}.timeRow label,.timeRow strong{color:var(--deck-text);font-size:12px;font-weight:650;font-variant-numeric:tabular-nums}.timeRow strong{text-align:right}.timeTrack{height:28px;border-radius:6px;background:#141b25;border:1px solid rgba(167,186,210,.1);overflow:hidden}.timeStack{display:flex;height:100%;min-width:18px}.timeStack span{display:flex;align-items:center;justify-content:center;min-width:3px;color:#ffffffeb;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums;overflow:hidden;white-space:nowrap}.seg-rollout,.legend .seg-rollout{background:#20c997}.seg-train,.legend .seg-train{background:#bf2bd9}.seg-other,.legend .seg-other{background:#2851f5}.seg-reward,.legend .seg-reward{background:#d33672}.seg-advantages,.legend .seg-advantages{background:#5a3ee6}.seg-actor-log-probs,.legend .seg-actor-log-probs{background:#e243d2}.seg-ref-log-probs,.legend .seg-ref-log-probs,.seg-old-policy-log-probs,.legend .seg-old-policy-log-probs{background:#c43f66}.seg-value,.legend .seg-value{background:#8b5cf6}.seg-sync-weight,.legend .seg-sync-weight,.seg-save,.legend .seg-save{background:#83b81a}.seg-make-sample,.legend .seg-make-sample{background:#b96a19}.split{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:12px}.codeCard{min-width:0;min-height:250px;max-height:360px;overflow:auto;border:1px solid var(--deck-line);border-radius:var(--radius-lg);background:#0b1118}.codeTitle{position:sticky;top:0;display:flex;align-items:center;gap:7px;height:34px;padding:0 11px;border-bottom:1px solid var(--deck-line);background:#0d131b;color:var(--deck-text);font-size:12px;font-weight:650}.sampleTitle{justify-content:space-between;gap:10px;min-height:34px;height:auto;padding-top:4px;padding-bottom:4px}.sampleTitle>span{display:inline-flex;align-items:center;gap:7px}.sampleControls{display:inline-flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.sampleControls select{height:26px;max-width:170px;border:1px solid var(--deck-line);border-radius:var(--radius-sm);background:#0b1118;color:var(--deck-text);padding:0 8px;font-size:11px;outline:none}pre{margin:0;padding:11px;color:#d2deee;font-family:SFMono-Regular,Roboto Mono,ui-monospace,monospace;font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.configSections{display:grid;gap:12px;padding:11px}.configSection{min-width:0}.configSection h3{margin:0 0 8px;color:var(--deck-text);font-size:12px;font-weight:750;letter-spacing:0}.configGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}.configItem{min-width:0;border:1px solid var(--deck-line);border-radius:var(--radius-sm);background:#a7bad20d;padding:9px}.configItem span{display:block;color:var(--deck-muted);font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.05em;margin-bottom:5px}.configItem strong{display:block;color:var(--deck-ink);font-size:12px;font-weight:620;line-height:1.35;overflow-wrap:anywhere}.lowerGrid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:12px;margin-top:12px}.tabs{display:flex;gap:3px;padding:3px;border-radius:var(--radius-md);border:1px solid var(--deck-line);background:#0c121a}.tabs button{height:28px;border:0;border-radius:7px;background:transparent;color:var(--deck-muted);padding:0 12px;font-size:12px;font-weight:650}.tabs button.active{color:var(--deck-ink);background:var(--deck-panel-2)}.secondaryButton{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:34px;border:1px solid var(--deck-line);border-radius:var(--radius-sm);padding:0 12px;color:var(--deck-text);background:transparent;font-size:12px;font-weight:700}.launcherPreview{display:grid;gap:12px;padding-top:16px;border-top:1px solid var(--deck-line)}.launcherActions{display:flex;justify-content:flex-end;gap:8px;grid-column:1 / -1}.validationIssues{display:grid;gap:6px}.validationIssue{display:grid;grid-template-columns:minmax(120px,.25fr) 1fr;gap:12px;padding:8px 10px;border-left:3px solid var(--deck-muted);background:var(--deck-panel-2);color:var(--deck-text);font-size:12px}.validationIssue.error{border-left-color:#ef6262}.validationIssue.warning{border-left-color:#e9b949}.validationIssue span{overflow-wrap:anywhere}.warningAck{display:inline-flex;align-items:center;gap:8px;color:var(--deck-text);font-size:12px}.warningAck input{width:auto}.resolvedArgs summary{cursor:pointer;color:var(--deck-muted);font-size:12px;font-weight:700}.resolvedArgs pre{max-height:260px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--deck-text)}.launcherSections{display:grid;gap:14px}.launcherSection{display:grid;gap:10px;border:1px solid var(--deck-line);border-radius:var(--radius-md);padding:14px;background:var(--deck-panel-2)}.launcherSectionHeader{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.launcherSectionHeader strong{color:var(--deck-ink);font-size:13px;font-weight:760}.launcherSectionHeader span{color:var(--deck-faint);font-size:11px;font-weight:600;text-align:right}.formGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.field{display:grid;gap:6px;grid-column:span 2}.field.compact{grid-column:span 1}.field span{color:var(--deck-muted);font-size:11px;font-weight:650}input,select,textarea{width:100%;border:1px solid var(--deck-line);border-radius:var(--radius-sm);background:#0b1118;color:var(--deck-ink);outline:none}input,select{height:34px;padding:0 10px;font-size:13px}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--deck-muted) 50%),linear-gradient(135deg,var(--deck-muted) 50%,transparent 50%);background-position:calc(100% - 14px) 14px,calc(100% - 9px) 14px;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:28px}.checkField{display:flex;min-height:34px;align-items:center;gap:9px;align-self:end;border:1px solid var(--deck-line);border-radius:var(--radius-sm);padding:0 10px;background:#0b1118}.checkField input{width:15px;height:15px;padding:0;accent-color:var(--deck-cyan)}.checkField span{color:var(--deck-text);font-size:12px;font-weight:650}textarea{min-height:96px;resize:vertical;padding:10px;line-height:1.45}input:focus,select:focus,textarea:focus{border-color:#38d7ff85;box-shadow:0 0 0 3px #38d7ff1a}.primaryButton,.dangerButton,.iconButton{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;border-radius:var(--radius-sm);border:1px solid var(--deck-line);padding:0 12px;font-weight:650;font-size:13px}.primaryButton{color:#001018;border-color:#38d7ffcc;background:var(--deck-cyan)}.primaryButton.wide{grid-column:1 / -1}.launchButton{min-height:44px;border-radius:var(--radius-md);letter-spacing:0;width:100%}.dangerButton{color:var(--deck-red);background:#ff6b7a1a;border-color:#ff6b7a57}.dangerButton:hover{background:#ff6b7a29;border-color:#ff6b7a7a}.iconButton{width:36px;padding:0;color:var(--deck-text);background:var(--deck-panel)}.notice,.error{min-height:38px;display:flex;align-items:center;border-radius:var(--radius-md);padding:0 12px;margin-bottom:12px;font-size:13px;border:1px solid var(--deck-line)}.notice{color:var(--deck-cyan);background:#38d7ff14}.error{color:#ffd6db;background:#ff6b7a1a}.agentPanel{display:flex;flex-direction:column;gap:12px}.agentConfig{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:10px;align-items:end;margin-bottom:12px}.agentConfig.modalForm{grid-template-columns:1fr;margin-bottom:0}.modalOverlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;display:grid;place-items:center;background:#03080fa8;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:24px}.modalCard{width:min(560px,100%);border:1px solid var(--deck-line);border-radius:16px;background:var(--deck-panel);box-shadow:0 24px 80px #0000006b;padding:16px}.modalHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.chatPanel{display:grid;grid-template-rows:auto auto minmax(360px,1fr) auto;min-height:650px}.agentHeaderActions{display:inline-flex;align-items:center;gap:8px}.agentTabs{display:inline-flex;align-items:center;gap:6px;width:max-content;margin:4px 0 0 clamp(28px,5vw,112px);padding:4px;border:1px solid var(--deck-line);border-radius:999px;background:var(--deck-soft)}.agentTabs button{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:999px;padding:7px 12px;background:transparent;color:var(--deck-muted);font-size:12px;font-weight:750}.agentTabs button.active{background:var(--deck-panel);color:var(--deck-ink);box-shadow:0 8px 22px #00000024}.chatMessages{display:flex;flex-direction:column;gap:24px;min-height:360px;max-height:56vh;overflow:auto;border:0;border-radius:var(--radius-lg);background:transparent;padding:48px clamp(28px,5vw,112px) 18px}.chatBubble{max-width:min(1280px,100%);border:0;border-radius:0;background:transparent;padding:0;color:var(--deck-text)}.chatBubble.user{align-self:flex-end;max-width:min(680px,72%);border-radius:14px;background:#1a86ff;color:#fff;box-shadow:0 12px 28px #1a86ff29;padding:13px 20px}.chatBubble.assistant{align-self:flex-start;width:min(1280px,100%)}.chatBubble>span{display:block;margin-bottom:5px;color:var(--deck-muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.chatBubble.user>span{display:none}.chatBubble.assistant>span{display:none}.chatBubble p{margin:0;white-space:pre-wrap;color:var(--deck-text)}.chatBubble.user p,.chatBubble.user .markdownBlock{color:#fff;font-size:13px;font-weight:650}.reasoningBlock{position:relative;margin:4px 0 18px;padding-left:34px;color:var(--deck-muted);background:transparent}.reasoningBlock:before{content:"";position:absolute;top:28px;bottom:0;left:15px;width:2px;border-radius:999px;background:var(--deck-line)}.reasoningBlock summary{display:inline-flex;align-items:center;gap:9px;cursor:pointer;list-style:none;min-height:28px}.reasoningBlock summary::-webkit-details-marker{display:none}.reasoningBlock summary span{display:inline-grid;place-items:center;width:18px;height:18px;border:1px solid var(--deck-line-strong);border-radius:999px;color:var(--deck-muted);font-size:11px}.reasoningBlock summary strong{color:var(--deck-muted);font-size:12px;font-weight:650}.reasoningBlock summary:after{content:"⌄";color:var(--deck-muted);font-size:15px}.agentEventList{display:grid;gap:16px}.agentEventList>.markdownBlock{width:min(780px,calc(100% - 64px));margin-left:34px}.markdownBlock{color:var(--deck-text);font-size:13px;line-height:1.58;overflow-wrap:anywhere}.markdownBlock>*:first-child{margin-top:0}.markdownBlock>*:last-child{margin-bottom:0}.markdownBlock p,.markdownBlock ul,.markdownBlock ol{margin:0 0 8px}.markdownBlock ul,.markdownBlock ol{padding-left:20px}.markdownBlock code{border:1px solid var(--deck-line);border-radius:5px;padding:1px 4px;background:#38d7ff14;color:var(--deck-ink)}.markdownBlock pre{max-height:220px;overflow:auto;border:1px solid var(--deck-line);border-radius:8px;padding:10px;background:#04080d38}.markdownBlock table{display:block;width:100%;max-width:100%;margin:10px 0;overflow:auto;border-collapse:collapse;border:1px solid var(--deck-line);border-radius:8px}.markdownBlock th,.markdownBlock td{padding:7px 9px;border-bottom:1px solid var(--deck-line);text-align:left;white-space:nowrap}.markdownBlock th{color:var(--deck-ink);background:#38d7ff14;font-size:11px;font-weight:750}.markdownBlock tr:last-child td{border-bottom:0}.reasoningBlock .markdownBlock{width:min(780px,calc(100% - 64px));max-height:160px;overflow:auto;margin-left:34px;padding:14px 0 2px;color:var(--deck-muted)}.toolCallList{display:grid;gap:8px;margin-top:0}.toolCallCard{width:min(780px,calc(100% - 64px));margin-left:34px;border:1px solid rgba(148,163,184,.24);border-radius:11px;background:var(--deck-panel);box-shadow:none;overflow:hidden}.toolCallCard.ok{border-color:var(--deck-line-strong);background:var(--deck-panel)}.toolCallCard.failed{border-color:#ff6b7a47;background:#ff6b7a14}.toolCallCard.live{border-color:#57e39b6b;background:#57e39b12}.toolCallDetails summary,.toolResultDetails summary{display:grid;grid-template-columns:auto minmax(96px,auto) minmax(0,1fr);align-items:center;gap:8px;min-height:36px;padding:0 12px;cursor:pointer;border-bottom:1px solid var(--deck-line);list-style-position:outside}.toolCallDetails:not([open]) summary,.toolResultDetails:not([open]) summary{border-bottom:0}.toolCallDetails summary::marker,.toolResultDetails summary::marker{color:var(--deck-muted)}.toolResultDetails summary span{display:inline-flex;align-items:center;justify-content:center;min-width:58px;height:19px;border:1px solid rgba(87,227,155,.28);border-radius:999px;background:#57e39b1a;color:var(--deck-green);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}.toolCallDetails summary span{position:relative;width:14px;min-width:14px;height:14px;overflow:hidden;color:transparent}.toolCallDetails summary span:before{content:"";position:absolute;top:2px;right:2px;bottom:2px;left:2px;border-radius:999px;background:#35c737}.toolResultDetails.ok summary span{border-color:#57e39b38;background:#57e39b17;color:var(--deck-green)}.toolResultDetails.failed summary span{border-color:#ff6b7a47;background:#ff6b7a1a;color:var(--deck-red)}.toolCallDetails summary b,.toolResultDetails summary b{color:var(--deck-ink);font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Monaco,Consolas,monospace;font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toolCallDetails summary em,.toolResultDetails summary em{min-width:0;overflow:hidden;color:var(--deck-muted);font-size:11px;font-style:normal;text-overflow:ellipsis;white-space:nowrap}.toolCallHead{border-bottom:1px solid var(--deck-line)}.toolCallHead span{margin:0;color:var(--deck-cyan)}.toolCallHead b{color:var(--deck-ink);font-size:11px}.toolCallCard pre{max-height:140px;overflow:auto;background:transparent;border-top:1px solid var(--deck-line);padding:10px 12px;font-size:11px}.toolResultDetails pre{max-height:240px}.streamingHint{margin-top:8px;color:var(--deck-cyan);font-size:11px;font-weight:700}.chatComposer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;margin-top:12px;border:1px solid var(--deck-line);border-radius:var(--radius-lg);background:var(--deck-panel);padding:10px}.chatComposer textarea{min-height:72px;border:0;padding:8px;background:transparent;resize:none;font-size:13px}.agentHistory{min-height:360px;max-height:56vh;overflow:auto;padding:28px clamp(28px,5vw,112px) 18px}.agentHistoryHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.agentHistoryHeader h3{margin:0 0 4px;font-size:16px}.agentHistoryHeader p{margin:0;color:var(--deck-muted);font-size:12px}.agentHistoryList{display:grid;gap:10px}.agentHistoryItem{display:grid;gap:5px;width:min(840px,100%);border:1px solid var(--deck-line);border-radius:13px;background:var(--deck-panel);padding:13px 15px;text-align:left}.agentHistoryItem.active{border-color:#38d7ff7a;box-shadow:0 0 0 1px #38d7ff2e}.agentHistoryItem strong{color:var(--deck-ink);font-size:13px}.agentHistoryItem span{overflow:hidden;color:var(--deck-muted);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.agentHistoryItem small{color:var(--deck-subtle);font-size:11px}.agentOutput{min-height:152px;border-radius:var(--radius-lg);border:1px solid var(--deck-line);background:#0b1118;color:var(--deck-text);padding:12px;font-size:13px;line-height:1.5;white-space:pre-wrap}.empty{display:grid;place-items:center;gap:8px;min-height:180px;color:var(--deck-muted);border:1px dashed var(--deck-line-strong);border-radius:var(--radius-lg);text-align:center;padding:16px}.empty strong{color:var(--deck-text);font-size:13px}.empty span{font-size:12px}:root[data-theme=light] .brandMark,:root[data-theme=light] .readinessOrb,:root[data-theme=light] .envFact,:root[data-theme=light] .envFact>span,:root[data-theme=light] .checkItem,:root[data-theme=light] .depPill,:root[data-theme=light] .timelineItem,:root[data-theme=light] .chart,:root[data-theme=light] .sampleCard,:root[data-theme=light] .sampleGrid>div,:root[data-theme=light] .sampleEmpty,:root[data-theme=light] .timePerf,:root[data-theme=light] .codeCard,:root[data-theme=light] .codeTitle,:root[data-theme=light] input,:root[data-theme=light] textarea,:root[data-theme=light] select,:root[data-theme=light] .checkField,:root[data-theme=light] .agentOutput,:root[data-theme=light] .chatComposer,:root[data-theme=light] .timeTrack,:root[data-theme=light] .tabs{background:var(--deck-panel)}:root[data-theme=light] .chartControls select,:root[data-theme=light] .configItem{background:#fff;color:var(--deck-ink)}:root[data-theme=light] .dangerButton{color:#a51d2d;background:#fff1f3;border-color:#c7344647}:root[data-theme=light] .primaryButton{color:#fff;background:#007ea7;border-color:#007ea7;box-shadow:0 8px 18px #007ea72e}:root[data-theme=light] .launchButton{background:#006d94;border-color:#006d94}:root[data-theme=light] .jobIcon{background:#f3f7fb}:root[data-theme=light] .chatBubble.user{background:#1683ff;color:#fff}:root[data-theme=light] .chatMessages{background:transparent}:root[data-theme=light] .toolCallCard{box-shadow:0 6px 18px #1420330f}:root[data-theme=light] .rawLine{stroke:#55657aa6}:root[data-theme=light] pre{color:#25344a}@media(max-width:980px){.shell{grid-template-columns:1fr}.rail{position:sticky;top:0;z-index:20;border-right:0;border-bottom:1px solid var(--deck-line);padding:10px}.brand,.railFooter{display:none}.nav{display:flex;gap:6px;overflow-x:auto}.navItem{width:auto;flex:0 0 auto}.main{padding:12px}.topbar,.panelHeader,.timePerfHeader{flex-direction:column;align-items:stretch}.runtimeDeck,.jobMetricsGrid,.metricsGrid,.split,.sampleGrid,.formGrid{grid-template-columns:1fr}.field,.field.compact{grid-column:span 1}.checkMatrix,.envFacts{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.checkMatrix,.envFacts{grid-template-columns:1fr}.jobRow.large{grid-template-columns:34px minmax(0,1fr)}.jobRow.large .statusDot{display:none}.timeRow{grid-template-columns:52px minmax(0,1fr)}.timeRow strong{grid-column:2;text-align:left}} diff --git a/areno/dashboard/dist/assets/index-DF61sRZi.js b/areno/dashboard/dist/assets/index-DF61sRZi.js deleted file mode 100644 index f2cf5a86..00000000 --- a/areno/dashboard/dist/assets/index-DF61sRZi.js +++ /dev/null @@ -1,197 +0,0 @@ -(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))u(s);new MutationObserver(s=>{for(const h of s)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&u(f)}).observe(document,{childList:!0,subtree:!0});function r(s){const h={};return s.integrity&&(h.integrity=s.integrity),s.referrerPolicy&&(h.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?h.credentials="include":s.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function u(s){if(s.ep)return;s.ep=!0;const h=r(s);fetch(s.href,h)}})();function Hp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Oo={exports:{}},Ma={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Rm;function p0(){if(Rm)return Ma;Rm=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(u,s,h){var f=null;if(h!==void 0&&(f=""+h),s.key!==void 0&&(f=""+s.key),"key"in s){h={};for(var m in s)m!=="key"&&(h[m]=s[m])}else h=s;return s=h.ref,{$$typeof:n,type:u,key:f,ref:s!==void 0?s:null,props:h}}return Ma.Fragment=a,Ma.jsx=r,Ma.jsxs=r,Ma}var Lm;function g0(){return Lm||(Lm=1,Oo.exports=p0()),Oo.exports}var k=g0(),jo={exports:{}},_e={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Bm;function y0(){if(Bm)return _e;Bm=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function S(T){return T===null||typeof T!="object"?null:(T=v&&T[v]||T["@@iterator"],typeof T=="function"?T:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,V={};function O(T,q,_){this.props=T,this.context=q,this.refs=V,this.updater=_||C}O.prototype.isReactComponent={},O.prototype.setState=function(T,q){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,q,"setState")},O.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function K(){}K.prototype=O.prototype;function X(T,q,_){this.props=T,this.context=q,this.refs=V,this.updater=_||C}var ae=X.prototype=new K;ae.constructor=X,U(ae,O.prototype),ae.isPureReactComponent=!0;var ee=Array.isArray;function L(){}var J={H:null,A:null,T:null,S:null},he=Object.prototype.hasOwnProperty;function xe(T,q,_){var te=_.ref;return{$$typeof:n,type:T,key:q,ref:te!==void 0?te:null,props:_}}function R(T,q){return xe(T.type,q,T.props)}function ne(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function le(T){var q={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(_){return q[_]})}var Ce=/\/+/g;function ue(T,q){return typeof T=="object"&&T!==null&&T.key!=null?le(""+T.key):q.toString(36)}function $(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(L,L):(T.status="pending",T.then(function(q){T.status==="pending"&&(T.status="fulfilled",T.value=q)},function(q){T.status==="pending"&&(T.status="rejected",T.reason=q)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function D(T,q,_,te,fe){var oe=typeof T;(oe==="undefined"||oe==="boolean")&&(T=null);var we=!1;if(T===null)we=!0;else switch(oe){case"bigint":case"string":case"number":we=!0;break;case"object":switch(T.$$typeof){case n:case a:we=!0;break;case x:return we=T._init,D(we(T._payload),q,_,te,fe)}}if(we)return fe=fe(T),we=te===""?"."+ue(T,0):te,ee(fe)?(_="",we!=null&&(_=we.replace(Ce,"$&/")+"/"),D(fe,q,_,"",function(zt){return zt})):fe!=null&&(ne(fe)&&(fe=R(fe,_+(fe.key==null||T&&T.key===fe.key?"":(""+fe.key).replace(Ce,"$&/")+"/")+we)),q.push(fe)),1;we=0;var Ie=te===""?".":te+":";if(ee(T))for(var Ye=0;Ye>>1,E=D[Se];if(0>>1;Ses(_,ie))tes(fe,_)?(D[Se]=fe,D[te]=ie,Se=te):(D[Se]=_,D[q]=ie,Se=q);else if(tes(fe,ie))D[Se]=fe,D[te]=ie,Se=te;else break e}}return F}function s(D,F){var ie=D.sortIndex-F.sortIndex;return ie!==0?ie:D.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var f=Date,m=f.now();n.unstable_now=function(){return f.now()-m}}var p=[],d=[],x=1,y=null,v=3,S=!1,C=!1,U=!1,V=!1,O=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;function ae(D){for(var F=r(d);F!==null;){if(F.callback===null)u(d);else if(F.startTime<=D)u(d),F.sortIndex=F.expirationTime,a(p,F);else break;F=r(d)}}function ee(D){if(U=!1,ae(D),!C)if(r(p)!==null)C=!0,L||(L=!0,le());else{var F=r(d);F!==null&&$(ee,F.startTime-D)}}var L=!1,J=-1,he=5,xe=-1;function R(){return V?!0:!(n.unstable_now()-xeD&&R());){var Se=y.callback;if(typeof Se=="function"){y.callback=null,v=y.priorityLevel;var E=Se(y.expirationTime<=D);if(D=n.unstable_now(),typeof E=="function"){y.callback=E,ae(D),F=!0;break t}y===r(p)&&u(p),ae(D)}else u(p);y=r(p)}if(y!==null)F=!0;else{var T=r(d);T!==null&&$(ee,T.startTime-D),F=!1}}break e}finally{y=null,v=ie,S=!1}F=void 0}}finally{F?le():L=!1}}}var le;if(typeof X=="function")le=function(){X(ne)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,ue=Ce.port2;Ce.port1.onmessage=ne,le=function(){ue.postMessage(null)}}else le=function(){O(ne,0)};function $(D,F){J=O(function(){D(n.unstable_now())},F)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(D){D.callback=null},n.unstable_forceFrameRate=function(D){0>D||125Se?(D.sortIndex=ie,a(d,D),r(p)===null&&D===r(d)&&(U?(K(J),J=-1):U=!0,$(ee,ie-Se))):(D.sortIndex=E,a(p,D),C||S||(C=!0,L||(L=!0,le()))),D},n.unstable_shouldYield=R,n.unstable_wrapCallback=function(D){var F=v;return function(){var ie=v;v=F;try{return D.apply(this,arguments)}finally{v=ie}}}})(Bo)),Bo}var qm;function b0(){return qm||(qm=1,Lo.exports=x0()),Lo.exports}var Uo={exports:{}},St={};/** - * @license React - * react-dom.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ym;function v0(){if(Ym)return St;Ym=1;var n=ys();function a(p){var d="https://react.dev/errors/"+p;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Uo.exports=v0(),Uo.exports}/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Vm;function k0(){if(Vm)return Na;Vm=1;var n=b0(),a=ys(),r=S0();function u(e){var t="https://react.dev/errors/"+e;if(1E||(e.current=Se[E],Se[E]=null,E--)}function _(e,t){E++,Se[E]=e.current,e.current=t}var te=T(null),fe=T(null),oe=T(null),we=T(null);function Ie(e,t){switch(_(oe,t),_(fe,e),_(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?im(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=im(t),e=am(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(te),_(te,e)}function Ye(){q(te),q(fe),q(oe)}function zt(e){e.memoizedState!==null&&_(we,e);var t=te.current,l=am(t,e.type);t!==l&&(_(fe,e),_(te,l))}function Kt(e){fe.current===e&&(q(te),q(fe)),we.current===e&&(q(we),Ta._currentValue=ie)}var Yn,bl;function rn(e){if(Yn===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Yn=t&&t[1]||"",bl=-1)":-1c||A[i]!==N[c]){var H=` -`+A[i].replace(" at new "," at ");return e.displayName&&H.includes("")&&(H=H.replace("",e.displayName)),H}while(1<=i&&0<=c);break}}}finally{Gn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?rn(l):""}function Ql(e,t){switch(e.tag){case 26:case 27:case 5:return rn(e.type);case 16:return rn("Lazy");case 13:return e.child!==t&&t!==null?rn("Suspense Fallback"):rn("Suspense");case 19:return rn("SuspenseList");case 0:case 15:return Vn(e.type,!1);case 11:return Vn(e.type.render,!1);case 1:return Vn(e.type,!0);case 31:return rn("Activity");default:return""}}function Qn(e){try{var t="",l=null;do t+=Ql(e,l),l=e,e=e.return;while(e);return t}catch(i){return` -Error generating stack: `+i.message+` -`+i.stack}}var fn=Object.prototype.hasOwnProperty,vn=n.unstable_scheduleCallback,vl=n.unstable_cancelCallback,Li=n.unstable_shouldYield,Bi=n.unstable_requestPaint,mt=n.unstable_now,Ui=n.unstable_getCurrentPriorityLevel,Y=n.unstable_ImmediatePriority,W=n.unstable_UserBlockingPriority,ge=n.unstable_NormalPriority,ze=n.unstable_LowPriority,Be=n.unstable_IdlePriority,vt=n.log,P=n.unstable_setDisableYieldValue,Z=null,ve=null;function de(e){if(typeof vt=="function"&&P(e),ve&&typeof ve.setStrictMode=="function")try{ve.setStrictMode(Z,e)}catch{}}var Ee=Math.clz32?Math.clz32:bu,et=Math.log,Bt=Math.LN2;function bu(e){return e>>>=0,e===0?32:31-(et(e)/Bt|0)|0}var hn=256,Xn=262144,Xl=4194304;function dn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Sl(e,t,l){var i=e.pendingLanes;if(i===0)return 0;var c=0,o=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var b=i&134217727;return b!==0?(i=b&~o,i!==0?c=dn(i):(g&=b,g!==0?c=dn(g):l||(l=b&~e,l!==0&&(c=dn(l))))):(b=i&~o,b!==0?c=dn(b):g!==0?c=dn(g):l||(l=i&~e,l!==0&&(c=dn(l)))),c===0?0:t!==0&&t!==c&&(t&o)===0&&(o=c&-c,l=t&-t,o>=l||o===32&&(l&4194048)!==0)?t:c}function Hi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ny(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Us(){var e=Xl;return Xl<<=1,(Xl&62914560)===0&&(Xl=4194304),e}function vu(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function qi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ly(e,t,l,i,c,o){var g=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var b=e.entanglements,A=e.expirationTimes,N=e.hiddenUpdates;for(l=g&~l;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var oy=/[\n"\\]/g;function Jt(e){return e.replace(oy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Tu(e,t,l,i,c,o,g,b){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ft(t)):e.value!==""+Ft(t)&&(e.value=""+Ft(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?zu(e,g,Ft(t)):l!=null?zu(e,g,Ft(l)):i!=null&&e.removeAttribute("value"),c==null&&o!=null&&(e.defaultChecked=!!o),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Ft(b):e.removeAttribute("name")}function $s(e,t,l,i,c,o,g,b){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||l!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Au(e);return}l=l!=null?""+Ft(l):"",t=t!=null?""+Ft(t):l,b||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=b?e.checked:!!i,e.defaultChecked=!!i,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Au(e)}function zu(e,t,l){t==="number"&&Za(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function $l(e,t,l,i){if(e=e.options,t){t={};for(var c=0;c"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Du=!1;if(_n)try{var Qi={};Object.defineProperty(Qi,"passive",{get:function(){Du=!0}}),window.addEventListener("test",Qi,Qi),window.removeEventListener("test",Qi,Qi)}catch{Du=!1}var Kn=null,Ou=null,Fa=null;function af(){if(Fa)return Fa;var e,t=Ou,l=t.length,i,c="value"in Kn?Kn.value:Kn.textContent,o=c.length;for(e=0;e=Ki),ff=" ",hf=!1;function df(e,t){switch(e){case"keyup":return By.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ti=!1;function Hy(e,t){switch(e){case"compositionend":return mf(t);case"keypress":return t.which!==32?null:(hf=!0,ff);case"textInput":return e=t.data,e===ff&&hf?null:e;default:return null}}function qy(e,t){if(ti)return e==="compositionend"||!Uu&&df(e,t)?(e=af(),Fa=Ou=Kn=null,ti=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:l,offset:t-e};e=i}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=kf(l)}}function Ef(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ef(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Af(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Za(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Za(e.document)}return t}function Yu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Fy=_n&&"documentMode"in document&&11>=document.documentMode,ni=null,Gu=null,$i=null,Vu=!1;function Tf(e,t,l){var i=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Vu||ni==null||ni!==Za(i)||(i=ni,"selectionStart"in i&&Yu(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),$i&&Ii($i,i)||($i=i,i=Yr(Gu,"onSelect"),0>=g,c-=g,mn=1<<32-Ee(t)+c|l<Te?(je=ce,ce=null):je=ce.sibling;var He=j(w,ce,M[Te],G);if(He===null){ce===null&&(ce=je);break}e&&ce&&He.alternate===null&&t(w,ce),z=o(He,z,Te),Ue===null?se=He:Ue.sibling=He,Ue=He,ce=je}if(Te===M.length)return l(w,ce),Re&&An(w,Te),se;if(ce===null){for(;TeTe?(je=ce,ce=null):je=ce.sibling;var pl=j(w,ce,He.value,G);if(pl===null){ce===null&&(ce=je);break}e&&ce&&pl.alternate===null&&t(w,ce),z=o(pl,z,Te),Ue===null?se=pl:Ue.sibling=pl,Ue=pl,ce=je}if(He.done)return l(w,ce),Re&&An(w,Te),se;if(ce===null){for(;!He.done;Te++,He=M.next())He=Q(w,He.value,G),He!==null&&(z=o(He,z,Te),Ue===null?se=He:Ue.sibling=He,Ue=He);return Re&&An(w,Te),se}for(ce=i(ce);!He.done;Te++,He=M.next())He=B(ce,w,Te,He.value,G),He!==null&&(e&&He.alternate!==null&&ce.delete(He.key===null?Te:He.key),z=o(He,z,Te),Ue===null?se=He:Ue.sibling=He,Ue=He);return e&&ce.forEach(function(m0){return t(w,m0)}),Re&&An(w,Te),se}function Ze(w,z,M,G){if(typeof M=="object"&&M!==null&&M.type===U&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case S:e:{for(var se=M.key;z!==null;){if(z.key===se){if(se=M.type,se===U){if(z.tag===7){l(w,z.sibling),G=c(z,M.props.children),G.return=w,w=G;break e}}else if(z.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===he&&Dl(se)===z.type){l(w,z.sibling),G=c(z,M.props),la(G,M),G.return=w,w=G;break e}l(w,z);break}else t(w,z);z=z.sibling}M.type===U?(G=zl(M.props.children,w.mode,G,M.key),G.return=w,w=G):(G=ir(M.type,M.key,M.props,null,w.mode,G),la(G,M),G.return=w,w=G)}return g(w);case C:e:{for(se=M.key;z!==null;){if(z.key===se)if(z.tag===4&&z.stateNode.containerInfo===M.containerInfo&&z.stateNode.implementation===M.implementation){l(w,z.sibling),G=c(z,M.children||[]),G.return=w,w=G;break e}else{l(w,z);break}else t(w,z);z=z.sibling}G=Iu(M,w.mode,G),G.return=w,w=G}return g(w);case he:return M=Dl(M),Ze(w,z,M,G)}if($(M))return re(w,z,M,G);if(le(M)){if(se=le(M),typeof se!="function")throw Error(u(150));return M=se.call(M),ye(w,z,M,G)}if(typeof M.then=="function")return Ze(w,z,fr(M),G);if(M.$$typeof===X)return Ze(w,z,ur(w,M),G);hr(w,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,z!==null&&z.tag===6?(l(w,z.sibling),G=c(z,M),G.return=w,w=G):(l(w,z),G=Ju(M,w.mode,G),G.return=w,w=G),g(w)):l(w,z)}return function(w,z,M,G){try{na=0;var se=Ze(w,z,M,G);return di=null,se}catch(ce){if(ce===hi||ce===or)throw ce;var Ue=Ht(29,ce,null,w.mode);return Ue.lanes=G,Ue.return=w,Ue}finally{}}}var jl=Jf(!0),If=Jf(!1),Wn=!1;function cc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Pn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function el(e,t,l){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(qe&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,t=lr(e),Of(e,null,l),t}return nr(e,i,t,l),lr(e)}function ia(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,l|=i,t.lanes=l,qs(e,l)}}function sc(e,t){var l=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,l===i)){var c=null,o=null;if(l=l.firstBaseUpdate,l!==null){do{var g={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};o===null?c=o=g:o=o.next=g,l=l.next}while(l!==null);o===null?c=o=t:o=o.next=t}else c=o=t;l={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:o,shared:i.shared,callbacks:i.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var fc=!1;function aa(){if(fc){var e=fi;if(e!==null)throw e}}function ra(e,t,l,i){fc=!1;var c=e.updateQueue;Wn=!1;var o=c.firstBaseUpdate,g=c.lastBaseUpdate,b=c.shared.pending;if(b!==null){c.shared.pending=null;var A=b,N=A.next;A.next=null,g===null?o=N:g.next=N,g=A;var H=e.alternate;H!==null&&(H=H.updateQueue,b=H.lastBaseUpdate,b!==g&&(b===null?H.firstBaseUpdate=N:b.next=N,H.lastBaseUpdate=A))}if(o!==null){var Q=c.baseState;g=0,H=N=A=null,b=o;do{var j=b.lane&-536870913,B=j!==b.lane;if(B?(Oe&j)===j:(i&j)===j){j!==0&&j===si&&(fc=!0),H!==null&&(H=H.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var re=e,ye=b;j=t;var Ze=l;switch(ye.tag){case 1:if(re=ye.payload,typeof re=="function"){Q=re.call(Ze,Q,j);break e}Q=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=ye.payload,j=typeof re=="function"?re.call(Ze,Q,j):re,j==null)break e;Q=y({},Q,j);break e;case 2:Wn=!0}}j=b.callback,j!==null&&(e.flags|=64,B&&(e.flags|=8192),B=c.callbacks,B===null?c.callbacks=[j]:B.push(j))}else B={lane:j,tag:b.tag,payload:b.payload,callback:b.callback,next:null},H===null?(N=H=B,A=Q):H=H.next=B,g|=j;if(b=b.next,b===null){if(b=c.shared.pending,b===null)break;B=b,b=B.next,B.next=null,c.lastBaseUpdate=B,c.shared.pending=null}}while(!0);H===null&&(A=Q),c.baseState=A,c.firstBaseUpdate=N,c.lastBaseUpdate=H,o===null&&(c.shared.lanes=0),al|=g,e.lanes=g,e.memoizedState=Q}}function $f(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Wf(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;eo?o:8;var g=D.T,b={};D.T=b,Mc(e,!1,t,l);try{var A=c(),N=D.S;if(N!==null&&N(b,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var H=l1(A,i);oa(e,t,H,Qt(e))}else oa(e,t,i,Qt(e))}catch(Q){oa(e,t,{then:function(){},status:"rejected",reason:Q},Qt())}finally{F.p=o,g!==null&&b.types!==null&&(g.types=b.types),D.T=g}}function o1(){}function Cc(e,t,l,i){if(e.tag!==5)throw Error(u(476));var c=Mh(e).queue;wh(e,c,t,ie,l===null?o1:function(){return Nh(e),l(i)})}function Mh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wn,lastRenderedState:ie},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wn,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Nh(e){var t=Mh(e);t.next===null&&(t=e.alternate.memoizedState),oa(e,t.next.queue,{},Qt())}function wc(){return yt(Ta)}function Dh(){return it().memoizedState}function Oh(){return it().memoizedState}function s1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Qt();e=Pn(l);var i=el(t,e,l);i!==null&&(jt(i,t,l),ia(i,t,l)),t={cache:ic()},e.payload=t;return}t=t.return}}function f1(e,t,l){var i=Qt();l={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},kr(e)?Rh(t,l):(l=Ku(e,t,l,i),l!==null&&(jt(l,e,i),Lh(l,t,i)))}function jh(e,t,l){var i=Qt();oa(e,t,l,i)}function oa(e,t,l,i){var c={lane:i,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(kr(e))Rh(t,c);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var g=t.lastRenderedState,b=o(g,l);if(c.hasEagerState=!0,c.eagerState=b,Ut(b,g))return nr(e,t,c,0),Ke===null&&tr(),!1}catch{}finally{}if(l=Ku(e,t,c,i),l!==null)return jt(l,e,i),Lh(l,t,i),!0}return!1}function Mc(e,t,l,i){if(i={lane:2,revertLane:co(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},kr(e)){if(t)throw Error(u(479))}else t=Ku(e,l,i,2),t!==null&&jt(t,e,2)}function kr(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function Rh(e,t){pi=pr=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Lh(e,t,l){if((l&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,l|=i,t.lanes=l,qs(e,l)}}var sa={readContext:yt,use:xr,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};sa.useEffectEvent=tt;var Bh={readContext:yt,use:xr,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:vh,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,vr(4194308,4,Eh.bind(null,t,e),l)},useLayoutEffect:function(e,t){return vr(4194308,4,e,t)},useInsertionEffect:function(e,t){vr(4,2,e,t)},useMemo:function(e,t){var l=At();t=t===void 0?null:t;var i=e();if(Rl){de(!0);try{e()}finally{de(!1)}}return l.memoizedState=[i,t],i},useReducer:function(e,t,l){var i=At();if(l!==void 0){var c=l(t);if(Rl){de(!0);try{l(t)}finally{de(!1)}}}else c=t;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=f1.bind(null,Ae,e),[i.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:function(e){e=_c(e);var t=e.queue,l=jh.bind(null,Ae,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Tc,useDeferredValue:function(e,t){var l=At();return zc(l,e,t)},useTransition:function(){var e=_c(!1);return e=wh.bind(null,Ae,e.queue,!0,!1),At().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var i=Ae,c=At();if(Re){if(l===void 0)throw Error(u(407));l=l()}else{if(l=t(),Ke===null)throw Error(u(349));(Oe&127)!==0||ih(i,t,l)}c.memoizedState=l;var o={value:l,getSnapshot:t};return c.queue=o,vh(rh.bind(null,i,o,e),[e]),i.flags|=2048,yi(9,{destroy:void 0},ah.bind(null,i,o,l,t),null),l},useId:function(){var e=At(),t=Ke.identifierPrefix;if(Re){var l=pn,i=mn;l=(i&~(1<<32-Ee(i)-1)).toString(32)+l,t="_"+t+"R_"+l,l=gr++,0<\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof i.is=="string"?g.createElement("select",{is:i.is}):g.createElement("select"),i.multiple?o.multiple=!0:i.size&&(o.size=i.size);break;default:o=typeof i.is=="string"?g.createElement(c,{is:i.is}):g.createElement(c)}}o[pt]=t,o[Ct]=i;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)o.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=o;e:switch(bt(o,c,i),c){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Nn(t)}}return We(t),Qc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Nn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(u(166));if(e=oe.current,ci(t)){if(e=t.stateNode,l=t.memoizedProps,i=null,c=gt,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[pt]=t,e=!!(e.nodeValue===l||i!==null&&i.suppressHydrationWarning===!0||nm(e.nodeValue,l)),e||In(t,!0)}else e=Gr(e).createTextNode(i),e[pt]=t,t.stateNode=e}return We(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(i=ci(t),l!==null){if(e===null){if(!i)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[pt]=t}else Cl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),e=!1}else l=ec(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Yt(t),t):(Yt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return We(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ci(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(u(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(u(317));c[pt]=t}else Cl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),c=!1}else c=ec(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Yt(t),t):(Yt(t),null)}return Yt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=i!==null,e=e!==null&&e.memoizedState!==null,l&&(i=t.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==c&&(i.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),zr(t,t.updateQueue),We(t),null);case 4:return Ye(),e===null&&ho(t.stateNode.containerInfo),We(t),null;case 10:return zn(t.type),We(t),null;case 19:if(q(lt),i=t.memoizedState,i===null)return We(t),null;if(c=(t.flags&128)!==0,o=i.rendering,o===null)if(c)ha(i,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=mr(e),o!==null){for(t.flags|=128,ha(i,!1),e=o.updateQueue,t.updateQueue=e,zr(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)jf(l,e),l=l.sibling;return _(lt,lt.current&1|2),Re&&An(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&mt()>Dr&&(t.flags|=128,c=!0,ha(i,!1),t.lanes=4194304)}else{if(!c)if(e=mr(o),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,zr(t,e),ha(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Re)return We(t),null}else 2*mt()-i.renderingStartTime>Dr&&l!==536870912&&(t.flags|=128,c=!0,ha(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(e=i.last,e!==null?e.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=mt(),e.sibling=null,l=lt.current,_(lt,c?l&1|2:l&1),Re&&An(t,i.treeForkCount),e):(We(t),null);case 22:case 23:return Yt(t),dc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(l&536870912)!==0&&(t.flags&128)===0&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),l=t.updateQueue,l!==null&&zr(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==l&&(t.flags|=2048),e!==null&&q(Nl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),zn(at),We(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function g1(e,t){switch(Wu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zn(at),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Kt(t),null;case 31:if(t.memoizedState!==null){if(Yt(t),t.alternate===null)throw Error(u(340));Cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Yt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(lt),null;case 4:return Ye(),null;case 10:return zn(t.type),null;case 22:case 23:return Yt(t),dc(),e!==null&&q(Nl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zn(at),null;case 25:return null;default:return null}}function ud(e,t){switch(Wu(t),t.tag){case 3:zn(at),Ye();break;case 26:case 27:case 5:Kt(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&Yt(t);break;case 13:Yt(t);break;case 19:q(lt);break;case 10:zn(t.type);break;case 22:case 23:Yt(t),dc(),e!==null&&q(Nl);break;case 24:zn(at)}}function da(e,t){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var c=i.next;l=c;do{if((l.tag&e)===e){i=void 0;var o=l.create,g=l.inst;i=o(),g.destroy=i}l=l.next}while(l!==c)}}catch(b){Ve(t,t.return,b)}}function ll(e,t,l){try{var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var o=c.next;i=o;do{if((i.tag&e)===e){var g=i.inst,b=g.destroy;if(b!==void 0){g.destroy=void 0,c=t;var A=l,N=b;try{N()}catch(H){Ve(c,A,H)}}}i=i.next}while(i!==o)}}catch(H){Ve(t,t.return,H)}}function cd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Wf(t,l)}catch(i){Ve(e,e.return,i)}}}function od(e,t,l){l.props=Ll(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(i){Ve(e,t,i)}}function ma(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof l=="function"?e.refCleanup=l(i):l.current=i}}catch(c){Ve(e,t,c)}}function gn(e,t){var l=e.ref,i=e.refCleanup;if(l!==null)if(typeof i=="function")try{i()}catch(c){Ve(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(c){Ve(e,t,c)}else l.current=null}function sd(e){var t=e.type,l=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&i.focus();break e;case"img":l.src?i.src=l.src:l.srcSet&&(i.srcset=l.srcSet)}}catch(c){Ve(e,e.return,c)}}function Xc(e,t,l){try{var i=e.stateNode;U1(i,e.type,l,t),i[Ct]=t}catch(c){Ve(e,e.return,c)}}function fd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sl(e.type)||e.tag===4}function Zc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&sl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Kc(e,t,l){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=kn));else if(i!==4&&(i===27&&sl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Kc(e,t,l),e=e.sibling;e!==null;)Kc(e,t,l),e=e.sibling}function Cr(e,t,l){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(i!==4&&(i===27&&sl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Cr(e,t,l),e=e.sibling;e!==null;)Cr(e,t,l),e=e.sibling}function hd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);bt(t,i,l),t[pt]=e,t[Ct]=l}catch(o){Ve(e,e.return,o)}}var Dn=!1,ct=!1,Fc=!1,dd=typeof WeakSet=="function"?WeakSet:Set,dt=null;function y1(e,t){if(e=e.containerInfo,go=Jr,e=Af(e),Yu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var i=l.getSelection&&l.getSelection();if(i&&i.rangeCount!==0){l=i.anchorNode;var c=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{l.nodeType,o.nodeType}catch{l=null;break e}var g=0,b=-1,A=-1,N=0,H=0,Q=e,j=null;t:for(;;){for(var B;Q!==l||c!==0&&Q.nodeType!==3||(b=g+c),Q!==o||i!==0&&Q.nodeType!==3||(A=g+i),Q.nodeType===3&&(g+=Q.nodeValue.length),(B=Q.firstChild)!==null;)j=Q,Q=B;for(;;){if(Q===e)break t;if(j===l&&++N===c&&(b=g),j===o&&++H===i&&(A=g),(B=Q.nextSibling)!==null)break;Q=j,j=Q.parentNode}Q=B}l=b===-1||A===-1?null:{start:b,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(yo={focusedElem:e,selectionRange:l},Jr=!1,dt=t;dt!==null;)if(t=dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,dt=e;else for(;dt!==null;){switch(t=dt,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l title"))),bt(o,i,l),o[pt]=e,ht(o),i=o;break e;case"link":var g=bm("link","href",c).get(i+(l.href||""));if(g){for(var b=0;bZe&&(g=Ze,Ze=ye,ye=g);var w=_f(b,ye),z=_f(b,Ze);if(w&&z&&(B.rangeCount!==1||B.anchorNode!==w.node||B.anchorOffset!==w.offset||B.focusNode!==z.node||B.focusOffset!==z.offset)){var M=Q.createRange();M.setStart(w.node,w.offset),B.removeAllRanges(),ye>Ze?(B.addRange(M),B.extend(z.node,z.offset)):(M.setEnd(z.node,z.offset),B.addRange(M))}}}}for(Q=[],B=b;B=B.parentNode;)B.nodeType===1&&Q.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;bl?32:l,D.T=null,l=to,to=null;var o=ul,g=Bn;if(st=0,ki=ul=null,Bn=0,(qe&6)!==0)throw Error(u(331));var b=qe;if(qe|=4,Ed(o.current),Sd(o,o.current,g,l),qe=b,va(0,!1),ve&&typeof ve.onPostCommitFiberRoot=="function")try{ve.onPostCommitFiberRoot(Z,o)}catch{}return!0}finally{F.p=c,D.T=i,Gd(e,t)}}function Qd(e,t,l){t=$t(l,t),t=jc(e.stateNode,t,2),e=el(e,t,2),e!==null&&(qi(e,2),yn(e))}function Ve(e,t,l){if(e.tag===3)Qd(e,e,l);else for(;t!==null;){if(t.tag===3){Qd(t,e,l);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(rl===null||!rl.has(i))){e=$t(l,e),l=Xh(2),i=el(t,l,2),i!==null&&(Zh(l,i,t,e),qi(i,2),yn(i));break}}t=t.return}}function ao(e,t,l){var i=e.pingCache;if(i===null){i=e.pingCache=new v1;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(l)||($c=!0,c.add(l),e=A1.bind(null,e,t,l),t.then(e,e))}function A1(e,t,l){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ke===e&&(Oe&l)===l&&(nt===4||nt===3&&(Oe&62914560)===Oe&&300>mt()-Nr?(qe&2)===0&&_i(e,0):Wc|=l,Si===Oe&&(Si=0)),yn(e)}function Xd(e,t){t===0&&(t=Us()),e=Tl(e,t),e!==null&&(qi(e,t),yn(e))}function T1(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Xd(e,l)}function z1(e,t){var l=0;switch(e.tag){case 31:case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(l=c.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(u(314))}i!==null&&i.delete(t),Xd(e,l)}function C1(e,t){return vn(e,t)}var Ur=null,Ai=null,ro=!1,Hr=!1,uo=!1,ol=0;function yn(e){e!==Ai&&e.next===null&&(Ai===null?Ur=Ai=e:Ai=Ai.next=e),Hr=!0,ro||(ro=!0,M1())}function va(e,t){if(!uo&&Hr){uo=!0;do for(var l=!1,i=Ur;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var o=0;else{var g=i.suspendedLanes,b=i.pingedLanes;o=(1<<31-Ee(42|e)+1)-1,o&=c&~(g&~b),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(l=!0,Jd(i,o))}else o=Oe,o=Sl(i,i===Ke?o:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(o&3)===0||Hi(i,o)||(l=!0,Jd(i,o));i=i.next}while(l);uo=!1}}function w1(){Zd()}function Zd(){Hr=ro=!1;var e=0;ol!==0&&q1()&&(e=ol);for(var t=mt(),l=null,i=Ur;i!==null;){var c=i.next,o=Kd(i,t);o===0?(i.next=null,l===null?Ur=c:l.next=c,c===null&&(Ai=l)):(l=i,(e!==0||(o&3)!==0)&&(Hr=!0)),i=c}st!==0&&st!==5||va(e),ol!==0&&(ol=0)}function Kd(e,t){for(var l=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,o=e.pendingLanes&-62914561;0b)break;var H=A.transferSize,Q=A.initiatorType;H&&lm(Q)&&(A=A.responseEnd,g+=H*(A"u"?null:document;function pm(e,t,l){var i=Ti;if(i&&typeof t=="string"&&t){var c=Jt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof l=="string"&&(c+='[crossorigin="'+l+'"]'),mm.has(c)||(mm.add(c),e={rel:e,crossOrigin:l,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),bt(t,"link",e),ht(t),i.head.appendChild(t)))}}function J1(e){Un.D(e),pm("dns-prefetch",e,null)}function I1(e,t){Un.C(e,t),pm("preconnect",e,t)}function $1(e,t,l){Un.L(e,t,l);var i=Ti;if(i&&e&&t){var c='link[rel="preload"][as="'+Jt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(c+='[imagesrcset="'+Jt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(c+='[imagesizes="'+Jt(l.imageSizes)+'"]')):c+='[href="'+Jt(e)+'"]';var o=c;switch(t){case"style":o=zi(e);break;case"script":o=Ci(e)}ln.has(o)||(e=y({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),ln.set(o,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(Ea(o))||t==="script"&&i.querySelector(Aa(o))||(t=i.createElement("link"),bt(t,"link",e),ht(t),i.head.appendChild(t)))}}function W1(e,t){Un.m(e,t);var l=Ti;if(l&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Jt(i)+'"][href="'+Jt(e)+'"]',o=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Ci(e)}if(!ln.has(o)&&(e=y({rel:"modulepreload",href:e},t),ln.set(o,e),l.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Aa(o)))return}i=l.createElement("link"),bt(i,"link",e),ht(i),l.head.appendChild(i)}}}function P1(e,t,l){Un.S(e,t,l);var i=Ti;if(i&&e){var c=Jl(i).hoistableStyles,o=zi(e);t=t||"default";var g=c.get(o);if(!g){var b={loading:0,preload:null};if(g=i.querySelector(Ea(o)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},l),(l=ln.get(o))&&Eo(e,l);var A=g=i.createElement("link");ht(A),bt(A,"link",e),A._p=new Promise(function(N,H){A.onload=N,A.onerror=H}),A.addEventListener("load",function(){b.loading|=1}),A.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Qr(g,t,i)}g={type:"stylesheet",instance:g,count:1,state:b},c.set(o,g)}}}function e0(e,t){Un.X(e,t);var l=Ti;if(l&&e){var i=Jl(l).hoistableScripts,c=Ci(e),o=i.get(c);o||(o=l.querySelector(Aa(c)),o||(e=y({src:e,async:!0},t),(t=ln.get(c))&&Ao(e,t),o=l.createElement("script"),ht(o),bt(o,"link",e),l.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(c,o))}}function t0(e,t){Un.M(e,t);var l=Ti;if(l&&e){var i=Jl(l).hoistableScripts,c=Ci(e),o=i.get(c);o||(o=l.querySelector(Aa(c)),o||(e=y({src:e,async:!0,type:"module"},t),(t=ln.get(c))&&Ao(e,t),o=l.createElement("script"),ht(o),bt(o,"link",e),l.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},i.set(c,o))}}function gm(e,t,l,i){var c=(c=oe.current)?Vr(c):null;if(!c)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=zi(l.href),l=Jl(c).hoistableStyles,i=l.get(t),i||(i={type:"style",instance:null,count:0,state:null},l.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=zi(l.href);var o=Jl(c).hoistableStyles,g=o.get(e);if(g||(c=c.ownerDocument||c,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,g),(o=c.querySelector(Ea(e)))&&!o._p&&(g.instance=o,g.state.loading=5),ln.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},ln.set(e,l),o||n0(c,e,l,g.state))),t&&i===null)throw Error(u(528,""));return g}if(t&&i!==null)throw Error(u(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ci(l),l=Jl(c).hoistableScripts,i=l.get(t),i||(i={type:"script",instance:null,count:0,state:null},l.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function zi(e){return'href="'+Jt(e)+'"'}function Ea(e){return'link[rel="stylesheet"]['+e+"]"}function ym(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function n0(e,t,l,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),bt(t,"link",l),ht(t),e.head.appendChild(t))}function Ci(e){return'[src="'+Jt(e)+'"]'}function Aa(e){return"script[async]"+e}function xm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+Jt(l.href)+'"]');if(i)return t.instance=i,ht(i),i;var c=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),ht(i),bt(i,"style",c),Qr(i,l.precedence,e),t.instance=i;case"stylesheet":c=zi(l.href);var o=e.querySelector(Ea(c));if(o)return t.state.loading|=4,t.instance=o,ht(o),o;i=ym(l),(c=ln.get(c))&&Eo(i,c),o=(e.ownerDocument||e).createElement("link"),ht(o);var g=o;return g._p=new Promise(function(b,A){g.onload=b,g.onerror=A}),bt(o,"link",i),t.state.loading|=4,Qr(o,l.precedence,e),t.instance=o;case"script":return o=Ci(l.src),(c=e.querySelector(Aa(o)))?(t.instance=c,ht(c),c):(i=l,(c=ln.get(o))&&(i=y({},l),Ao(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),ht(c),bt(c,"link",i),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Qr(i,l.precedence,e));return t.instance}function Qr(e,t,l){for(var i=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,o=c,g=0;g title"):null)}function l0(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Sm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function i0(e,t,l,i){if(l.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var c=zi(i.href),o=t.querySelector(Ea(c));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Zr.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=o,ht(o);return}o=t.ownerDocument||t,i=ym(i),(c=ln.get(c))&&Eo(i,c),o=o.createElement("link"),ht(o);var g=o;g._p=new Promise(function(b,A){g.onload=b,g.onerror=A}),bt(o,"link",i),l.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Zr.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var To=0;function a0(e,t){return e.stylesheets&&e.count===0&&Fr(e,e.stylesheets),0To?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(c)}}:null}function Zr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Kr=null;function Fr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Kr=new Map,t.forEach(r0,e),Kr=null,Zr.call(e))}function r0(e,t){if(!(t.state.loading&4)){var l=Kr.get(e);if(l)var i=l.get(null);else{l=new Map,Kr.set(e,l);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Ro.exports=k0(),Ro.exports}var E0=_0();function A0(n,a){const r={};return(n[n.length-1]===""?[...n,""]:n).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const T0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,z0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,C0={};function Xm(n,a){return(C0.jsx?z0:T0).test(n)}const w0=/[ \t\n\f\r]/g;function M0(n){return typeof n=="object"?n.type==="text"?Zm(n.value):!1:Zm(n)}function Zm(n){return n.replace(w0,"")===""}class Ya{constructor(a,r,u){this.normal=r,this.property=a,u&&(this.space=u)}}Ya.prototype.normal={};Ya.prototype.property={};Ya.prototype.space=void 0;function qp(n,a){const r={},u={};for(const s of n)Object.assign(r,s.property),Object.assign(u,s.normal);return new Ya(r,u,a)}function is(n){return n.toLowerCase()}class Lt{constructor(a,r){this.attribute=r,this.property=a}}Lt.prototype.attribute="";Lt.prototype.booleanish=!1;Lt.prototype.boolean=!1;Lt.prototype.commaOrSpaceSeparated=!1;Lt.prototype.commaSeparated=!1;Lt.prototype.defined=!1;Lt.prototype.mustUseProperty=!1;Lt.prototype.number=!1;Lt.prototype.overloadedBoolean=!1;Lt.prototype.property="";Lt.prototype.spaceSeparated=!1;Lt.prototype.space=void 0;let N0=0;const ke=Vl(),ot=Vl(),as=Vl(),I=Vl(),Fe=Vl(),Yl=Vl(),Xt=Vl();function Vl(){return 2**++N0}const rs=Object.freeze(Object.defineProperty({__proto__:null,boolean:ke,booleanish:ot,commaOrSpaceSeparated:Xt,commaSeparated:Yl,number:I,overloadedBoolean:as,spaceSeparated:Fe},Symbol.toStringTag,{value:"Module"})),Ho=Object.keys(rs);class xs extends Lt{constructor(a,r,u,s){let h=-1;if(super(a,r),Km(this,"space",s),typeof u=="number")for(;++h4&&r.slice(0,4)==="data"&&L0.test(a)){if(a.charAt(4)==="-"){const h=a.slice(5).replace(Fm,H0);u="data"+h.charAt(0).toUpperCase()+h.slice(1)}else{const h=a.slice(4);if(!Fm.test(h)){let f=h.replace(R0,U0);f.charAt(0)!=="-"&&(f="-"+f),a="data"+f}}s=xs}return new s(u,a)}function U0(n){return"-"+n.toLowerCase()}function H0(n){return n.charAt(1).toUpperCase()}const q0=qp([Yp,D0,Qp,Xp,Zp],"html"),bs=qp([Yp,O0,Qp,Xp,Zp],"svg");function Y0(n){return n.join(" ").trim()}var Mi={},qo,Jm;function G0(){if(Jm)return qo;Jm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,r=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,h=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,m=/^\s+|\s+$/g,p=` -`,d="/",x="*",y="",v="comment",S="declaration";function C(V,O){if(typeof V!="string")throw new TypeError("First argument must be a string");if(!V)return[];O=O||{};var K=1,X=1;function ae(ue){var $=ue.match(a);$&&(K+=$.length);var D=ue.lastIndexOf(p);X=~D?ue.length-D:X+ue.length}function ee(){var ue={line:K,column:X};return function($){return $.position=new L(ue),xe(),$}}function L(ue){this.start=ue,this.end={line:K,column:X},this.source=O.source}L.prototype.content=V;function J(ue){var $=new Error(O.source+":"+K+":"+X+": "+ue);if($.reason=ue,$.filename=O.source,$.line=K,$.column=X,$.source=V,!O.silent)throw $}function he(ue){var $=ue.exec(V);if($){var D=$[0];return ae(D),V=V.slice(D.length),$}}function xe(){he(r)}function R(ue){var $;for(ue=ue||[];$=ne();)$!==!1&&ue.push($);return ue}function ne(){var ue=ee();if(!(d!=V.charAt(0)||x!=V.charAt(1))){for(var $=2;y!=V.charAt($)&&(x!=V.charAt($)||d!=V.charAt($+1));)++$;if($+=2,y===V.charAt($-1))return J("End of comment missing");var D=V.slice(2,$-2);return X+=2,ae(D),V=V.slice($),X+=2,ue({type:v,comment:D})}}function le(){var ue=ee(),$=he(u);if($){if(ne(),!he(s))return J("property missing ':'");var D=he(h),F=ue({type:S,property:U($[0].replace(n,y)),value:D?U(D[0].replace(n,y)):y});return he(f),F}}function Ce(){var ue=[];R(ue);for(var $;$=le();)$!==!1&&(ue.push($),R(ue));return ue}return xe(),Ce()}function U(V){return V?V.replace(m,y):y}return qo=C,qo}var Im;function V0(){if(Im)return Mi;Im=1;var n=Mi&&Mi.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.default=r;const a=n(G0());function r(u,s){let h=null;if(!u||typeof u!="string")return h;const f=(0,a.default)(u),m=typeof s=="function";return f.forEach(p=>{if(p.type!=="declaration")return;const{property:d,value:x}=p;m?s(d,x,p):x&&(h=h||{},h[d]=x)}),h}return Mi}var Da={},$m;function Q0(){if($m)return Da;$m=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,r=/^[^-]+$/,u=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,h=function(d){return!d||r.test(d)||n.test(d)},f=function(d,x){return x.toUpperCase()},m=function(d,x){return"".concat(x,"-")},p=function(d,x){return x===void 0&&(x={}),h(d)?d:(d=d.toLowerCase(),x.reactCompat?d=d.replace(s,m):d=d.replace(u,m),d.replace(a,f))};return Da.camelCase=p,Da}var Oa,Wm;function X0(){if(Wm)return Oa;Wm=1;var n=Oa&&Oa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},a=n(V0()),r=Q0();function u(s,h){var f={};return!s||typeof s!="string"||(0,a.default)(s,function(m,p){m&&p&&(f[(0,r.camelCase)(m,h)]=p)}),f}return u.default=u,Oa=u,Oa}var Z0=X0();const K0=Hp(Z0),Kp=Fp("end"),vs=Fp("start");function Fp(n){return a;function a(r){const u=r&&r.position&&r.position[n]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function F0(n){const a=vs(n),r=Kp(n);if(a&&r)return{start:a,end:r}}function La(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Pm(n.position):"start"in n||"end"in n?Pm(n):"line"in n||"column"in n?us(n):""}function us(n){return ep(n&&n.line)+":"+ep(n&&n.column)}function Pm(n){return us(n&&n.start)+"-"+us(n&&n.end)}function ep(n){return n&&typeof n=="number"?n:1}class Et extends Error{constructor(a,r,u){super(),typeof r=="string"&&(u=r,r=void 0);let s="",h={},f=!1;if(r&&("line"in r&&"column"in r?h={place:r}:"start"in r&&"end"in r?h={place:r}:"type"in r?h={ancestors:[r],place:r.position}:h={...r}),typeof a=="string"?s=a:!h.cause&&a&&(f=!0,s=a.message,h.cause=a),!h.ruleId&&!h.source&&typeof u=="string"){const p=u.indexOf(":");p===-1?h.ruleId=u:(h.source=u.slice(0,p),h.ruleId=u.slice(p+1))}if(!h.place&&h.ancestors&&h.ancestors){const p=h.ancestors[h.ancestors.length-1];p&&(h.place=p.position)}const m=h.place&&"start"in h.place?h.place.start:h.place;this.ancestors=h.ancestors||void 0,this.cause=h.cause||void 0,this.column=m?m.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=m?m.line:void 0,this.name=La(h.place)||"1:1",this.place=h.place||void 0,this.reason=this.message,this.ruleId=h.ruleId||void 0,this.source=h.source||void 0,this.stack=f&&h.cause&&typeof h.cause.stack=="string"?h.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Et.prototype.file="";Et.prototype.name="";Et.prototype.reason="";Et.prototype.message="";Et.prototype.stack="";Et.prototype.column=void 0;Et.prototype.line=void 0;Et.prototype.ancestors=void 0;Et.prototype.cause=void 0;Et.prototype.fatal=void 0;Et.prototype.place=void 0;Et.prototype.ruleId=void 0;Et.prototype.source=void 0;const Ss={}.hasOwnProperty,J0=new Map,I0=/[A-Z]/g,$0=new Set(["table","tbody","thead","tfoot","tr"]),W0=new Set(["td","th"]),Jp="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function P0(n,a){if(!a||a.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=a.filePath||void 0;let u;if(a.development){if(typeof a.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");u=ux(r,a.jsxDEV)}else{if(typeof a.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof a.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");u=rx(r,a.jsx,a.jsxs)}const s={Fragment:a.Fragment,ancestors:[],components:a.components||{},create:u,elementAttributeNameCase:a.elementAttributeNameCase||"react",evaluater:a.createEvaluater?a.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:a.ignoreInvalidStyle||!1,passKeys:a.passKeys!==!1,passNode:a.passNode||!1,schema:a.space==="svg"?bs:q0,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},h=Ip(s,n,void 0);return h&&typeof h!="string"?h:s.create(n,s.Fragment,{children:h||void 0},void 0)}function Ip(n,a,r){if(a.type==="element")return ex(n,a,r);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return tx(n,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return lx(n,a,r);if(a.type==="mdxjsEsm")return nx(n,a);if(a.type==="root")return ix(n,a,r);if(a.type==="text")return ax(n,a)}function ex(n,a,r){const u=n.schema;let s=u;a.tagName.toLowerCase()==="svg"&&u.space==="html"&&(s=bs,n.schema=s),n.ancestors.push(a);const h=Wp(n,a.tagName,!1),f=cx(n,a);let m=_s(n,a);return $0.has(a.tagName)&&(m=m.filter(function(p){return typeof p=="string"?!M0(p):!0})),$p(n,f,h,a),ks(f,m),n.ancestors.pop(),n.schema=u,n.create(a,h,f,r)}function tx(n,a){if(a.data&&a.data.estree&&n.evaluater){const u=a.data.estree.body[0];return u.type,n.evaluater.evaluateExpression(u.expression)}Ha(n,a.position)}function nx(n,a){if(a.data&&a.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(a.data.estree);Ha(n,a.position)}function lx(n,a,r){const u=n.schema;let s=u;a.name==="svg"&&u.space==="html"&&(s=bs,n.schema=s),n.ancestors.push(a);const h=a.name===null?n.Fragment:Wp(n,a.name,!0),f=ox(n,a),m=_s(n,a);return $p(n,f,h,a),ks(f,m),n.ancestors.pop(),n.schema=u,n.create(a,h,f,r)}function ix(n,a,r){const u={};return ks(u,_s(n,a)),n.create(a,n.Fragment,u,r)}function ax(n,a){return a.value}function $p(n,a,r,u){typeof r!="string"&&r!==n.Fragment&&n.passNode&&(a.node=u)}function ks(n,a){if(a.length>0){const r=a.length>1?a:a[0];r&&(n.children=r)}}function rx(n,a,r){return u;function u(s,h,f,m){const d=Array.isArray(f.children)?r:a;return m?d(h,f,m):d(h,f)}}function ux(n,a){return r;function r(u,s,h,f){const m=Array.isArray(h.children),p=vs(u);return a(s,h,f,m,{columnNumber:p?p.column-1:void 0,fileName:n,lineNumber:p?p.line:void 0},void 0)}}function cx(n,a){const r={};let u,s;for(s in a.properties)if(s!=="children"&&Ss.call(a.properties,s)){const h=sx(n,s,a.properties[s]);if(h){const[f,m]=h;n.tableCellAlignToStyle&&f==="align"&&typeof m=="string"&&W0.has(a.tagName)?u=m:r[f]=m}}if(u){const h=r.style||(r.style={});h[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return r}function ox(n,a){const r={};for(const u of a.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&n.evaluater){const h=u.data.estree.body[0];h.type;const f=h.expression;f.type;const m=f.properties[0];m.type,Object.assign(r,n.evaluater.evaluateExpression(m.argument))}else Ha(n,a.position);else{const s=u.name;let h;if(u.value&&typeof u.value=="object")if(u.value.data&&u.value.data.estree&&n.evaluater){const m=u.value.data.estree.body[0];m.type,h=n.evaluater.evaluateExpression(m.expression)}else Ha(n,a.position);else h=u.value===null?!0:u.value;r[s]=h}return r}function _s(n,a){const r=[];let u=-1;const s=n.passKeys?new Map:J0;for(;++us?0:s+a:a=a>s?s:a,r=r>0?r:0,u.length<1e4)f=Array.from(u),f.unshift(a,r),n.splice(...f);else for(r&&n.splice(a,r);h0?(Zt(n,n.length,0,a),n):a}const lp={}.hasOwnProperty;function eg(n){const a={};let r=-1;for(;++r13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function sn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tt=xl(/[A-Za-z]/),_t=xl(/[\dA-Za-z]/),bx=xl(/[#-'*+\--9=?A-Z^-~]/);function ou(n){return n!==null&&(n<32||n===127)}const cs=xl(/\d/),vx=xl(/[\dA-Fa-f]/),Sx=xl(/[!-/:-@[-`{-~]/);function pe(n){return n!==null&&n<-2}function Je(n){return n!==null&&(n<0||n===32)}function De(n){return n===-2||n===-1||n===32}const mu=xl(new RegExp("\\p{P}|\\p{S}","u")),Gl=xl(/\s/);function xl(n){return a;function a(r){return r!==null&&r>-1&&n.test(String.fromCharCode(r))}}function Ri(n){const a=[];let r=-1,u=0,s=0;for(;++r55295&&h<57344){const m=n.charCodeAt(r+1);h<56320&&m>56319&&m<57344?(f=String.fromCharCode(h,m),s=1):f="�"}else f=String.fromCharCode(h);f&&(a.push(n.slice(u,r),encodeURIComponent(f)),u=r+s+1,f=""),s&&(r+=s,s=0)}return a.join("")+n.slice(u)}function Le(n,a,r,u){const s=u?u-1:Number.POSITIVE_INFINITY;let h=0;return f;function f(p){return De(p)?(n.enter(r),m(p)):a(p)}function m(p){return De(p)&&h++f))return;const J=a.events.length;let he=J,xe,R;for(;he--;)if(a.events[he][0]==="exit"&&a.events[he][1].type==="chunkFlow"){if(xe){R=a.events[he][1].end;break}xe=!0}for(O(u),L=J;LX;){const ee=r[ae];a.containerState=ee[1],ee[0].exit.call(a,n)}r.length=X}function K(){s.write([null]),h=void 0,s=void 0,a.containerState._closeFlow=void 0}}function Tx(n,a,r){return Le(n,n.attempt(this.parser.constructs.document,a,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Di(n){if(n===null||Je(n)||Gl(n))return 1;if(mu(n))return 2}function pu(n,a,r){const u=[];let s=-1;for(;++s1&&n[r][1].end.offset-n[r][1].start.offset>1?2:1;const y={...n[u][1].end},v={...n[r][1].start};ap(y,-p),ap(v,p),f={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...n[u][1].end}},m={type:p>1?"strongSequence":"emphasisSequence",start:{...n[r][1].start},end:v},h={type:p>1?"strongText":"emphasisText",start:{...n[u][1].end},end:{...n[r][1].start}},s={type:p>1?"strong":"emphasis",start:{...f.start},end:{...m.end}},n[u][1].end={...f.start},n[r][1].start={...m.end},d=[],n[u][1].end.offset-n[u][1].start.offset&&(d=an(d,[["enter",n[u][1],a],["exit",n[u][1],a]])),d=an(d,[["enter",s,a],["enter",f,a],["exit",f,a],["enter",h,a]]),d=an(d,pu(a.parser.constructs.insideSpan.null,n.slice(u+1,r),a)),d=an(d,[["exit",h,a],["enter",m,a],["exit",m,a],["exit",s,a]]),n[r][1].end.offset-n[r][1].start.offset?(x=2,d=an(d,[["enter",n[r][1],a],["exit",n[r][1],a]])):x=0,Zt(n,u-1,r-u+3,d),r=u+d.length-x-2;break}}for(r=-1;++r0&&De(L)?Le(n,K,"linePrefix",h+1)(L):K(L)}function K(L){return L===null||pe(L)?n.check(rp,U,ae)(L):(n.enter("codeFlowValue"),X(L))}function X(L){return L===null||pe(L)?(n.exit("codeFlowValue"),K(L)):(n.consume(L),X)}function ae(L){return n.exit("codeFenced"),a(L)}function ee(L,J,he){let xe=0;return R;function R($){return L.enter("lineEnding"),L.consume($),L.exit("lineEnding"),ne}function ne($){return L.enter("codeFencedFence"),De($)?Le(L,le,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):le($)}function le($){return $===m?(L.enter("codeFencedFenceSequence"),Ce($)):he($)}function Ce($){return $===m?(xe++,L.consume($),Ce):xe>=f?(L.exit("codeFencedFenceSequence"),De($)?Le(L,ue,"whitespace")($):ue($)):he($)}function ue($){return $===null||pe($)?(L.exit("codeFencedFence"),J($)):he($)}}}function Ux(n,a,r){const u=this;return s;function s(f){return f===null?r(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),h)}function h(f){return u.parser.lazy[u.now().line]?r(f):a(f)}}const Go={name:"codeIndented",tokenize:qx},Hx={partial:!0,tokenize:Yx};function qx(n,a,r){const u=this;return s;function s(d){return n.enter("codeIndented"),Le(n,h,"linePrefix",5)(d)}function h(d){const x=u.events[u.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?f(d):r(d)}function f(d){return d===null?p(d):pe(d)?n.attempt(Hx,f,p)(d):(n.enter("codeFlowValue"),m(d))}function m(d){return d===null||pe(d)?(n.exit("codeFlowValue"),f(d)):(n.consume(d),m)}function p(d){return n.exit("codeIndented"),a(d)}}function Yx(n,a,r){const u=this;return s;function s(f){return u.parser.lazy[u.now().line]?r(f):pe(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),s):Le(n,h,"linePrefix",5)(f)}function h(f){const m=u.events[u.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(f):pe(f)?s(f):r(f)}}const Gx={name:"codeText",previous:Qx,resolve:Vx,tokenize:Xx};function Vx(n){let a=n.length-4,r=3,u,s;if((n[r][1].type==="lineEnding"||n[r][1].type==="space")&&(n[a][1].type==="lineEnding"||n[a][1].type==="space")){for(u=r;++u=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+a+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return athis.left.length?this.right.slice(this.right.length-u+this.left.length,this.right.length-a+this.left.length).reverse():this.left.slice(a).concat(this.right.slice(this.right.length-u+this.left.length).reverse())}splice(a,r,u){const s=r||0;this.setCursor(Math.trunc(a));const h=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return u&&ja(this.left,u),h.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(a){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(a)}pushMany(a){this.setCursor(Number.POSITIVE_INFINITY),ja(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),ja(this.right,a.reverse())}setCursor(a){if(!(a===this.left.length||a>this.left.length&&this.right.length===0||a<0&&this.left.length===0))if(a=4?a(f):n.interrupt(u.parser.constructs.flow,r,a)(f)}}function rg(n,a,r,u,s,h,f,m,p){const d=p||Number.POSITIVE_INFINITY;let x=0;return y;function y(O){return O===60?(n.enter(u),n.enter(s),n.enter(h),n.consume(O),n.exit(h),v):O===null||O===32||O===41||ou(O)?r(O):(n.enter(u),n.enter(f),n.enter(m),n.enter("chunkString",{contentType:"string"}),U(O))}function v(O){return O===62?(n.enter(h),n.consume(O),n.exit(h),n.exit(s),n.exit(u),a):(n.enter(m),n.enter("chunkString",{contentType:"string"}),S(O))}function S(O){return O===62?(n.exit("chunkString"),n.exit(m),v(O)):O===null||O===60||pe(O)?r(O):(n.consume(O),O===92?C:S)}function C(O){return O===60||O===62||O===92?(n.consume(O),S):S(O)}function U(O){return!x&&(O===null||O===41||Je(O))?(n.exit("chunkString"),n.exit(m),n.exit(f),n.exit(u),a(O)):x999||S===null||S===91||S===93&&!p||S===94&&!m&&"_hiddenFootnoteSupport"in f.parser.constructs?r(S):S===93?(n.exit(h),n.enter(s),n.consume(S),n.exit(s),n.exit(u),a):pe(S)?(n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),x):(n.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===null||S===91||S===93||pe(S)||m++>999?(n.exit("chunkString"),x(S)):(n.consume(S),p||(p=!De(S)),S===92?v:y)}function v(S){return S===91||S===92||S===93?(n.consume(S),m++,y):y(S)}}function cg(n,a,r,u,s,h){let f;return m;function m(v){return v===34||v===39||v===40?(n.enter(u),n.enter(s),n.consume(v),n.exit(s),f=v===40?41:v,p):r(v)}function p(v){return v===f?(n.enter(s),n.consume(v),n.exit(s),n.exit(u),a):(n.enter(h),d(v))}function d(v){return v===f?(n.exit(h),p(f)):v===null?r(v):pe(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),Le(n,d,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===f||v===null||pe(v)?(n.exit("chunkString"),d(v)):(n.consume(v),v===92?y:x)}function y(v){return v===f||v===92?(n.consume(v),x):x(v)}}function Ba(n,a){let r;return u;function u(s){return pe(s)?(n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),r=!0,u):De(s)?Le(n,u,r?"linePrefix":"lineSuffix")(s):a(s)}}const Px={name:"definition",tokenize:tb},eb={partial:!0,tokenize:nb};function tb(n,a,r){const u=this;let s;return h;function h(S){return n.enter("definition"),f(S)}function f(S){return ug.call(u,n,m,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function m(S){return s=sn(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),S===58?(n.enter("definitionMarker"),n.consume(S),n.exit("definitionMarker"),p):r(S)}function p(S){return Je(S)?Ba(n,d)(S):d(S)}function d(S){return rg(n,x,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function x(S){return n.attempt(eb,y,y)(S)}function y(S){return De(S)?Le(n,v,"whitespace")(S):v(S)}function v(S){return S===null||pe(S)?(n.exit("definition"),u.parser.defined.push(s),a(S)):r(S)}}function nb(n,a,r){return u;function u(m){return Je(m)?Ba(n,s)(m):r(m)}function s(m){return cg(n,h,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(m)}function h(m){return De(m)?Le(n,f,"whitespace")(m):f(m)}function f(m){return m===null||pe(m)?a(m):r(m)}}const lb={name:"hardBreakEscape",tokenize:ib};function ib(n,a,r){return u;function u(h){return n.enter("hardBreakEscape"),n.consume(h),s}function s(h){return pe(h)?(n.exit("hardBreakEscape"),a(h)):r(h)}}const ab={name:"headingAtx",resolve:rb,tokenize:ub};function rb(n,a){let r=n.length-2,u=3,s,h;return n[u][1].type==="whitespace"&&(u+=2),r-2>u&&n[r][1].type==="whitespace"&&(r-=2),n[r][1].type==="atxHeadingSequence"&&(u===r-1||r-4>u&&n[r-2][1].type==="whitespace")&&(r-=u+1===r?2:4),r>u&&(s={type:"atxHeadingText",start:n[u][1].start,end:n[r][1].end},h={type:"chunkText",start:n[u][1].start,end:n[r][1].end,contentType:"text"},Zt(n,u,r-u+1,[["enter",s,a],["enter",h,a],["exit",h,a],["exit",s,a]])),n}function ub(n,a,r){let u=0;return s;function s(x){return n.enter("atxHeading"),h(x)}function h(x){return n.enter("atxHeadingSequence"),f(x)}function f(x){return x===35&&u++<6?(n.consume(x),f):x===null||Je(x)?(n.exit("atxHeadingSequence"),m(x)):r(x)}function m(x){return x===35?(n.enter("atxHeadingSequence"),p(x)):x===null||pe(x)?(n.exit("atxHeading"),a(x)):De(x)?Le(n,m,"whitespace")(x):(n.enter("atxHeadingText"),d(x))}function p(x){return x===35?(n.consume(x),p):(n.exit("atxHeadingSequence"),m(x))}function d(x){return x===null||x===35||Je(x)?(n.exit("atxHeadingText"),m(x)):(n.consume(x),d)}}const cb=["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"],cp=["pre","script","style","textarea"],ob={concrete:!0,name:"htmlFlow",resolveTo:hb,tokenize:db},sb={partial:!0,tokenize:pb},fb={partial:!0,tokenize:mb};function hb(n){let a=n.length;for(;a--&&!(n[a][0]==="enter"&&n[a][1].type==="htmlFlow"););return a>1&&n[a-2][1].type==="linePrefix"&&(n[a][1].start=n[a-2][1].start,n[a+1][1].start=n[a-2][1].start,n.splice(a-2,2)),n}function db(n,a,r){const u=this;let s,h,f,m,p;return d;function d(_){return x(_)}function x(_){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(_),y}function y(_){return _===33?(n.consume(_),v):_===47?(n.consume(_),h=!0,U):_===63?(n.consume(_),s=3,u.interrupt?a:E):Tt(_)?(n.consume(_),f=String.fromCharCode(_),V):r(_)}function v(_){return _===45?(n.consume(_),s=2,S):_===91?(n.consume(_),s=5,m=0,C):Tt(_)?(n.consume(_),s=4,u.interrupt?a:E):r(_)}function S(_){return _===45?(n.consume(_),u.interrupt?a:E):r(_)}function C(_){const te="CDATA[";return _===te.charCodeAt(m++)?(n.consume(_),m===te.length?u.interrupt?a:le:C):r(_)}function U(_){return Tt(_)?(n.consume(_),f=String.fromCharCode(_),V):r(_)}function V(_){if(_===null||_===47||_===62||Je(_)){const te=_===47,fe=f.toLowerCase();return!te&&!h&&cp.includes(fe)?(s=1,u.interrupt?a(_):le(_)):cb.includes(f.toLowerCase())?(s=6,te?(n.consume(_),O):u.interrupt?a(_):le(_)):(s=7,u.interrupt&&!u.parser.lazy[u.now().line]?r(_):h?K(_):X(_))}return _===45||_t(_)?(n.consume(_),f+=String.fromCharCode(_),V):r(_)}function O(_){return _===62?(n.consume(_),u.interrupt?a:le):r(_)}function K(_){return De(_)?(n.consume(_),K):R(_)}function X(_){return _===47?(n.consume(_),R):_===58||_===95||Tt(_)?(n.consume(_),ae):De(_)?(n.consume(_),X):R(_)}function ae(_){return _===45||_===46||_===58||_===95||_t(_)?(n.consume(_),ae):ee(_)}function ee(_){return _===61?(n.consume(_),L):De(_)?(n.consume(_),ee):X(_)}function L(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(n.consume(_),p=_,J):De(_)?(n.consume(_),L):he(_)}function J(_){return _===p?(n.consume(_),p=null,xe):_===null||pe(_)?r(_):(n.consume(_),J)}function he(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||Je(_)?ee(_):(n.consume(_),he)}function xe(_){return _===47||_===62||De(_)?X(_):r(_)}function R(_){return _===62?(n.consume(_),ne):r(_)}function ne(_){return _===null||pe(_)?le(_):De(_)?(n.consume(_),ne):r(_)}function le(_){return _===45&&s===2?(n.consume(_),D):_===60&&s===1?(n.consume(_),F):_===62&&s===4?(n.consume(_),T):_===63&&s===3?(n.consume(_),E):_===93&&s===5?(n.consume(_),Se):pe(_)&&(s===6||s===7)?(n.exit("htmlFlowData"),n.check(sb,q,Ce)(_)):_===null||pe(_)?(n.exit("htmlFlowData"),Ce(_)):(n.consume(_),le)}function Ce(_){return n.check(fb,ue,q)(_)}function ue(_){return n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),$}function $(_){return _===null||pe(_)?Ce(_):(n.enter("htmlFlowData"),le(_))}function D(_){return _===45?(n.consume(_),E):le(_)}function F(_){return _===47?(n.consume(_),f="",ie):le(_)}function ie(_){if(_===62){const te=f.toLowerCase();return cp.includes(te)?(n.consume(_),T):le(_)}return Tt(_)&&f.length<8?(n.consume(_),f+=String.fromCharCode(_),ie):le(_)}function Se(_){return _===93?(n.consume(_),E):le(_)}function E(_){return _===62?(n.consume(_),T):_===45&&s===2?(n.consume(_),E):le(_)}function T(_){return _===null||pe(_)?(n.exit("htmlFlowData"),q(_)):(n.consume(_),T)}function q(_){return n.exit("htmlFlow"),a(_)}}function mb(n,a,r){const u=this;return s;function s(f){return pe(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),h):r(f)}function h(f){return u.parser.lazy[u.now().line]?r(f):a(f)}}function pb(n,a,r){return u;function u(s){return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),n.attempt(Ga,a,r)}}const gb={name:"htmlText",tokenize:yb};function yb(n,a,r){const u=this;let s,h,f;return m;function m(E){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(E),p}function p(E){return E===33?(n.consume(E),d):E===47?(n.consume(E),ee):E===63?(n.consume(E),X):Tt(E)?(n.consume(E),he):r(E)}function d(E){return E===45?(n.consume(E),x):E===91?(n.consume(E),h=0,C):Tt(E)?(n.consume(E),K):r(E)}function x(E){return E===45?(n.consume(E),S):r(E)}function y(E){return E===null?r(E):E===45?(n.consume(E),v):pe(E)?(f=y,F(E)):(n.consume(E),y)}function v(E){return E===45?(n.consume(E),S):y(E)}function S(E){return E===62?D(E):E===45?v(E):y(E)}function C(E){const T="CDATA[";return E===T.charCodeAt(h++)?(n.consume(E),h===T.length?U:C):r(E)}function U(E){return E===null?r(E):E===93?(n.consume(E),V):pe(E)?(f=U,F(E)):(n.consume(E),U)}function V(E){return E===93?(n.consume(E),O):U(E)}function O(E){return E===62?D(E):E===93?(n.consume(E),O):U(E)}function K(E){return E===null||E===62?D(E):pe(E)?(f=K,F(E)):(n.consume(E),K)}function X(E){return E===null?r(E):E===63?(n.consume(E),ae):pe(E)?(f=X,F(E)):(n.consume(E),X)}function ae(E){return E===62?D(E):X(E)}function ee(E){return Tt(E)?(n.consume(E),L):r(E)}function L(E){return E===45||_t(E)?(n.consume(E),L):J(E)}function J(E){return pe(E)?(f=J,F(E)):De(E)?(n.consume(E),J):D(E)}function he(E){return E===45||_t(E)?(n.consume(E),he):E===47||E===62||Je(E)?xe(E):r(E)}function xe(E){return E===47?(n.consume(E),D):E===58||E===95||Tt(E)?(n.consume(E),R):pe(E)?(f=xe,F(E)):De(E)?(n.consume(E),xe):D(E)}function R(E){return E===45||E===46||E===58||E===95||_t(E)?(n.consume(E),R):ne(E)}function ne(E){return E===61?(n.consume(E),le):pe(E)?(f=ne,F(E)):De(E)?(n.consume(E),ne):xe(E)}function le(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(n.consume(E),s=E,Ce):pe(E)?(f=le,F(E)):De(E)?(n.consume(E),le):(n.consume(E),ue)}function Ce(E){return E===s?(n.consume(E),s=void 0,$):E===null?r(E):pe(E)?(f=Ce,F(E)):(n.consume(E),Ce)}function ue(E){return E===null||E===34||E===39||E===60||E===61||E===96?r(E):E===47||E===62||Je(E)?xe(E):(n.consume(E),ue)}function $(E){return E===47||E===62||Je(E)?xe(E):r(E)}function D(E){return E===62?(n.consume(E),n.exit("htmlTextData"),n.exit("htmlText"),a):r(E)}function F(E){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(E),n.exit("lineEnding"),ie}function ie(E){return De(E)?Le(n,Se,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Se(E)}function Se(E){return n.enter("htmlTextData"),f(E)}}const Ts={name:"labelEnd",resolveAll:Sb,resolveTo:kb,tokenize:_b},xb={tokenize:Eb},bb={tokenize:Ab},vb={tokenize:Tb};function Sb(n){let a=-1;const r=[];for(;++a=3&&(d===null||pe(d))?(n.exit("thematicBreak"),a(d)):r(d)}function p(d){return d===s?(n.consume(d),u++,p):(n.exit("thematicBreakSequence"),De(d)?Le(n,m,"whitespace")(d):m(d))}}const Rt={continuation:{tokenize:Lb},exit:Ub,name:"list",tokenize:Rb},Ob={partial:!0,tokenize:Hb},jb={partial:!0,tokenize:Bb};function Rb(n,a,r){const u=this,s=u.events[u.events.length-1];let h=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return m;function m(S){const C=u.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!u.containerState.marker||S===u.containerState.marker:cs(S)){if(u.containerState.type||(u.containerState.type=C,n.enter(C,{_container:!0})),C==="listUnordered")return n.enter("listItemPrefix"),S===42||S===45?n.check(uu,r,d)(S):d(S);if(!u.interrupt||S===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),p(S)}return r(S)}function p(S){return cs(S)&&++f<10?(n.consume(S),p):(!u.interrupt||f<2)&&(u.containerState.marker?S===u.containerState.marker:S===41||S===46)?(n.exit("listItemValue"),d(S)):r(S)}function d(S){return n.enter("listItemMarker"),n.consume(S),n.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||S,n.check(Ga,u.interrupt?r:x,n.attempt(Ob,v,y))}function x(S){return u.containerState.initialBlankLine=!0,h++,v(S)}function y(S){return De(S)?(n.enter("listItemPrefixWhitespace"),n.consume(S),n.exit("listItemPrefixWhitespace"),v):r(S)}function v(S){return u.containerState.size=h+u.sliceSerialize(n.exit("listItemPrefix"),!0).length,a(S)}}function Lb(n,a,r){const u=this;return u.containerState._closeFlow=void 0,n.check(Ga,s,h);function s(m){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,Le(n,a,"listItemIndent",u.containerState.size+1)(m)}function h(m){return u.containerState.furtherBlankLines||!De(m)?(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,f(m)):(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,n.attempt(jb,a,f)(m))}function f(m){return u.containerState._closeFlow=!0,u.interrupt=void 0,Le(n,n.attempt(Rt,a,r),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m)}}function Bb(n,a,r){const u=this;return Le(n,s,"listItemIndent",u.containerState.size+1);function s(h){const f=u.events[u.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===u.containerState.size?a(h):r(h)}}function Ub(n){n.exit(this.containerState.type)}function Hb(n,a,r){const u=this;return Le(n,s,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(h){const f=u.events[u.events.length-1];return!De(h)&&f&&f[1].type==="listItemPrefixWhitespace"?a(h):r(h)}}const op={name:"setextUnderline",resolveTo:qb,tokenize:Yb};function qb(n,a){let r=n.length,u,s,h;for(;r--;)if(n[r][0]==="enter"){if(n[r][1].type==="content"){u=r;break}n[r][1].type==="paragraph"&&(s=r)}else n[r][1].type==="content"&&n.splice(r,1),!h&&n[r][1].type==="definition"&&(h=r);const f={type:"setextHeading",start:{...n[u][1].start},end:{...n[n.length-1][1].end}};return n[s][1].type="setextHeadingText",h?(n.splice(s,0,["enter",f,a]),n.splice(h+1,0,["exit",n[u][1],a]),n[u][1].end={...n[h][1].end}):n[u][1]=f,n.push(["exit",f,a]),n}function Yb(n,a,r){const u=this;let s;return h;function h(d){let x=u.events.length,y;for(;x--;)if(u.events[x][1].type!=="lineEnding"&&u.events[x][1].type!=="linePrefix"&&u.events[x][1].type!=="content"){y=u.events[x][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||y)?(n.enter("setextHeadingLine"),s=d,f(d)):r(d)}function f(d){return n.enter("setextHeadingLineSequence"),m(d)}function m(d){return d===s?(n.consume(d),m):(n.exit("setextHeadingLineSequence"),De(d)?Le(n,p,"lineSuffix")(d):p(d))}function p(d){return d===null||pe(d)?(n.exit("setextHeadingLine"),a(d)):r(d)}}const Gb={tokenize:Vb};function Vb(n){const a=this,r=n.attempt(Ga,u,n.attempt(this.parser.constructs.flowInitial,s,Le(n,n.attempt(this.parser.constructs.flow,s,n.attempt(Fx,s)),"linePrefix")));return r;function u(h){if(h===null){n.consume(h);return}return n.enter("lineEndingBlank"),n.consume(h),n.exit("lineEndingBlank"),a.currentConstruct=void 0,r}function s(h){if(h===null){n.consume(h);return}return n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),a.currentConstruct=void 0,r}}const Qb={resolveAll:sg()},Xb=og("string"),Zb=og("text");function og(n){return{resolveAll:sg(n==="text"?Kb:void 0),tokenize:a};function a(r){const u=this,s=this.parser.constructs[n],h=r.attempt(s,f,m);return f;function f(x){return d(x)?h(x):m(x)}function m(x){if(x===null){r.consume(x);return}return r.enter("data"),r.consume(x),p}function p(x){return d(x)?(r.exit("data"),h(x)):(r.consume(x),p)}function d(x){if(x===null)return!0;const y=s[x];let v=-1;if(y)for(;++v-1){const m=f[0];typeof m=="string"?f[0]=m.slice(u):f.shift()}h>0&&f.push(n[s].slice(0,h))}return f}function rv(n,a){let r=-1;const u=[];let s;for(;++r0){const vt=ge.tokenStack[ge.tokenStack.length-1];(vt[1]||fp).call(ge,void 0,vt[0])}for(W.position={start:gl(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:gl(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be0&&(u.className=["language-"+s[0]]);let h={type:"element",tagName:"code",properties:u,children:[{type:"text",value:r}]};return a.meta&&(h.data={meta:a.meta}),n.patch(a,h),h=n.applyData(a,h),h={type:"element",tagName:"pre",properties:{},children:[h]},n.patch(a,h),h}function vv(n,a){const r={type:"element",tagName:"del",properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}function Sv(n,a){const r={type:"element",tagName:"em",properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}function kv(n,a){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",u=String(a.identifier).toUpperCase(),s=Ri(u.toLowerCase()),h=n.footnoteOrder.indexOf(u);let f,m=n.footnoteCounts.get(u);m===void 0?(m=0,n.footnoteOrder.push(u),f=n.footnoteOrder.length):f=h+1,m+=1,n.footnoteCounts.set(u,m);const p={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(m>1?"-"+m:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(a,p);const d={type:"element",tagName:"sup",properties:{},children:[p]};return n.patch(a,d),n.applyData(a,d)}function _v(n,a){const r={type:"element",tagName:"h"+a.depth,properties:{},children:n.all(a)};return n.patch(a,r),n.applyData(a,r)}function Ev(n,a){if(n.options.allowDangerousHtml){const r={type:"raw",value:a.value};return n.patch(a,r),n.applyData(a,r)}}function dg(n,a){const r=a.referenceType;let u="]";if(r==="collapsed"?u+="[]":r==="full"&&(u+="["+(a.label||a.identifier)+"]"),a.type==="imageReference")return[{type:"text",value:"!["+a.alt+u}];const s=n.all(a),h=s[0];h&&h.type==="text"?h.value="["+h.value:s.unshift({type:"text",value:"["});const f=s[s.length-1];return f&&f.type==="text"?f.value+=u:s.push({type:"text",value:u}),s}function Av(n,a){const r=String(a.identifier).toUpperCase(),u=n.definitionById.get(r);if(!u)return dg(n,a);const s={src:Ri(u.url||""),alt:a.alt};u.title!==null&&u.title!==void 0&&(s.title=u.title);const h={type:"element",tagName:"img",properties:s,children:[]};return n.patch(a,h),n.applyData(a,h)}function Tv(n,a){const r={src:Ri(a.url)};a.alt!==null&&a.alt!==void 0&&(r.alt=a.alt),a.title!==null&&a.title!==void 0&&(r.title=a.title);const u={type:"element",tagName:"img",properties:r,children:[]};return n.patch(a,u),n.applyData(a,u)}function zv(n,a){const r={type:"text",value:a.value.replace(/\r?\n|\r/g," ")};n.patch(a,r);const u={type:"element",tagName:"code",properties:{},children:[r]};return n.patch(a,u),n.applyData(a,u)}function Cv(n,a){const r=String(a.identifier).toUpperCase(),u=n.definitionById.get(r);if(!u)return dg(n,a);const s={href:Ri(u.url||"")};u.title!==null&&u.title!==void 0&&(s.title=u.title);const h={type:"element",tagName:"a",properties:s,children:n.all(a)};return n.patch(a,h),n.applyData(a,h)}function wv(n,a){const r={href:Ri(a.url)};a.title!==null&&a.title!==void 0&&(r.title=a.title);const u={type:"element",tagName:"a",properties:r,children:n.all(a)};return n.patch(a,u),n.applyData(a,u)}function Mv(n,a,r){const u=n.all(a),s=r?Nv(r):mg(a),h={},f=[];if(typeof a.checked=="boolean"){const x=u[0];let y;x&&x.type==="element"&&x.tagName==="p"?y=x:(y={type:"element",tagName:"p",properties:{},children:[]},u.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:a.checked,disabled:!0},children:[]}),h.className=["task-list-item"]}let m=-1;for(;++m1}function Dv(n,a){const r={},u=n.all(a);let s=-1;for(typeof a.start=="number"&&a.start!==1&&(r.start=a.start);++s0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(r,!0)},m=vs(a.children[1]),p=Kp(a.children[a.children.length-1]);m&&p&&(f.position={start:m,end:p}),s.push(f)}const h={type:"element",tagName:"table",properties:{},children:n.wrap(s,!0)};return n.patch(a,h),n.applyData(a,h)}function Bv(n,a,r){const u=r?r.children:void 0,h=(u?u.indexOf(a):1)===0?"th":"td",f=r&&r.type==="table"?r.align:void 0,m=f?f.length:a.children.length;let p=-1;const d=[];for(;++p0,!0),u[0]),s=u.index+u[0].length,u=r.exec(a);return h.push(mp(a.slice(s),s>0,!1)),h.join("")}function mp(n,a,r){let u=0,s=n.length;if(a){let h=n.codePointAt(u);for(;h===hp||h===dp;)u++,h=n.codePointAt(u)}if(r){let h=n.codePointAt(s-1);for(;h===hp||h===dp;)s--,h=n.codePointAt(s-1)}return s>u?n.slice(u,s):""}function qv(n,a){const r={type:"text",value:Hv(String(a.value))};return n.patch(a,r),n.applyData(a,r)}function Yv(n,a){const r={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(a,r),n.applyData(a,r)}const Gv={blockquote:yv,break:xv,code:bv,delete:vv,emphasis:Sv,footnoteReference:kv,heading:_v,html:Ev,imageReference:Av,image:Tv,inlineCode:zv,linkReference:Cv,link:wv,listItem:Mv,list:Dv,paragraph:Ov,root:jv,strong:Rv,table:Lv,tableCell:Uv,tableRow:Bv,text:qv,thematicBreak:Yv,toml:nu,yaml:nu,definition:nu,footnoteDefinition:nu};function nu(){}const pg=-1,gu=0,Ua=1,su=2,zs=3,Cs=4,ws=5,Ms=6,gg=7,yg=8,xg=typeof self=="object"?self:globalThis,pp=(n,a)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new xg[n](a)},Vv=(n,a)=>{const r=(s,h)=>(n.set(h,s),s),u=s=>{if(n.has(s))return n.get(s);const[h,f]=a[s];switch(h){case gu:case pg:return r(f,s);case Ua:{const m=r([],s);for(const p of f)m.push(u(p));return m}case su:{const m=r({},s);for(const[p,d]of f)m[u(p)]=u(d);return m}case zs:return r(new Date(f),s);case Cs:{const{source:m,flags:p}=f;return r(new RegExp(m,p),s)}case ws:{const m=r(new Map,s);for(const[p,d]of f)m.set(u(p),u(d));return m}case Ms:{const m=r(new Set,s);for(const p of f)m.add(u(p));return m}case gg:{const{name:m,message:p}=f;return r(typeof xg[m]=="function"?pp(m,p):new Error(p),s)}case yg:return r(BigInt(f),s);case"BigInt":return r(Object(BigInt(f)),s);case"ArrayBuffer":return r(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:m}=new Uint8Array(f);return r(new DataView(m),f)}}return r(pp(h,f),s)};return u},gp=n=>Vv(new Map,n)(0),ql="",{toString:Qv}={},{keys:Xv}=Object,Ra=n=>{const a=typeof n;if(a!=="object"||!n)return[gu,a];const r=Qv.call(n).slice(8,-1);switch(r){case"Array":return[Ua,ql];case"Object":return[su,ql];case"Date":return[zs,ql];case"RegExp":return[Cs,ql];case"Map":return[ws,ql];case"Set":return[Ms,ql];case"DataView":return[Ua,r]}return r.includes("Array")?[Ua,r]:n instanceof Error?[gg,n.name||"Error"]:[su,r]},lu=([n,a])=>n===gu&&(a==="function"||a==="symbol"),Zv=(n,a,r,u)=>{const s=(f,m)=>{const p=u.push(f)-1;return r.set(m,p),p},h=f=>{if(r.has(f))return r.get(f);let[m,p]=Ra(f);switch(m){case gu:{let x=f;switch(p){case"bigint":m=yg,x=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+p);x=null;break;case"undefined":return s([pg],f)}return s([m,x],f)}case Ua:{if(p){let v=f;return p==="DataView"?v=new Uint8Array(f.buffer):p==="ArrayBuffer"&&(v=new Uint8Array(f)),s([p,[...v]],f)}const x=[],y=s([m,x],f);for(const v of f)x.push(h(v));return y}case su:{if(p)switch(p){case"BigInt":return s([p,f.toString()],f);case"Boolean":case"Number":case"String":return s([p,f.valueOf()],f)}if(a&&"toJSON"in f)return h(f.toJSON());const x=[],y=s([m,x],f);for(const v of Xv(f))(n||!lu(Ra(f[v])))&&x.push([h(v),h(f[v])]);return y}case zs:return s([m,isNaN(f.getTime())?ql:f.toISOString()],f);case Cs:{const{source:x,flags:y}=f;return s([m,{source:x,flags:y}],f)}case ws:{const x=[],y=s([m,x],f);for(const[v,S]of f)(n||!(lu(Ra(v))||lu(Ra(S))))&&x.push([h(v),h(S)]);return y}case Ms:{const x=[],y=s([m,x],f);for(const v of f)(n||!lu(Ra(v)))&&x.push(h(v));return y}}const{message:d}=f;return s([m,{name:p,message:d}],f)};return h},yp=(n,{json:a,lossy:r}={})=>{const u=[];return Zv(!(a||r),!!a,new Map,u)(n),u},fu=typeof structuredClone=="function"?(n,a)=>a&&("json"in a||"lossy"in a)?gp(yp(n,a)):structuredClone(n):(n,a)=>gp(yp(n,a));function Kv(n,a){const r=[{type:"text",value:"↩"}];return a>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(a)}]}),r}function Fv(n,a){return"Back to reference "+(n+1)+(a>1?"-"+a:"")}function Jv(n){const a=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",r=n.options.footnoteBackContent||Kv,u=n.options.footnoteBackLabel||Fv,s=n.options.footnoteLabel||"Footnotes",h=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},m=[];let p=-1;for(;++p0&&C.push({type:"text",value:" "});let K=typeof r=="string"?r:r(p,S);typeof K=="string"&&(K={type:"text",value:K}),C.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+v+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof u=="string"?u:u(p,S),className:["data-footnote-backref"]},children:Array.isArray(K)?K:[K]})}const V=x[x.length-1];if(V&&V.type==="element"&&V.tagName==="p"){const K=V.children[V.children.length-1];K&&K.type==="text"?K.value+=" ":V.children.push({type:"text",value:" "}),V.children.push(...C)}else x.push(...C);const O={type:"element",tagName:"li",properties:{id:a+"fn-"+v},children:n.wrap(x,!0)};n.patch(d,O),m.push(O)}if(m.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:h,properties:{...fu(f),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:n.wrap(m,!0)},{type:"text",value:` -`}]}}const yu=(function(n){if(n==null)return Pv;if(typeof n=="function")return xu(n);if(typeof n=="object")return Array.isArray(n)?Iv(n):$v(n);if(typeof n=="string")return Wv(n);throw new Error("Expected function, string, or object as test")});function Iv(n){const a=[];let r=-1;for(;++r":""))+")"})}return v;function v(){let S=bg,C,U,V;if((!a||h(p,d,x[x.length-1]||void 0))&&(S=lS(r(p,x)),S[0]===ss))return S;if("children"in p&&p.children){const O=p;if(O.children&&S[0]!==nS)for(U=(u?O.children.length:-1)+f,V=x.concat(O);U>-1&&U0&&r.push({type:"text",value:` -`}),r}function xp(n){let a=0,r=n.charCodeAt(a);for(;r===9||r===32;)a++,r=n.charCodeAt(a);return n.slice(a)}function bp(n,a){const r=aS(n,a),u=r.one(n,void 0),s=Jv(r),h=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return s&&h.children.push({type:"text",value:` -`},s),h}function sS(n,a){return n&&"run"in n?async function(r,u){const s=bp(r,{file:u,...a});await n.run(s,u)}:function(r,u){return bp(r,{file:u,...n||a})}}function vp(n){if(n)throw n}var Qo,Sp;function fS(){if(Sp)return Qo;Sp=1;var n=Object.prototype.hasOwnProperty,a=Object.prototype.toString,r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):a.call(d)==="[object Array]"},h=function(d){if(!d||a.call(d)!=="[object Object]")return!1;var x=n.call(d,"constructor"),y=d.constructor&&d.constructor.prototype&&n.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!x&&!y)return!1;var v;for(v in d);return typeof v>"u"||n.call(d,v)},f=function(d,x){r&&x.name==="__proto__"?r(d,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):d[x.name]=x.newValue},m=function(d,x){if(x==="__proto__")if(n.call(d,x)){if(u)return u(d,x).value}else return;return d[x]};return Qo=function p(){var d,x,y,v,S,C,U=arguments[0],V=1,O=arguments.length,K=!1;for(typeof U=="boolean"&&(K=U,U=arguments[1]||{},V=2),(U==null||typeof U!="object"&&typeof U!="function")&&(U={});Vf.length;let p;m&&f.push(s);try{p=n.apply(this,f)}catch(d){const x=d;if(m&&r)throw x;return s(x)}m||(p&&p.then&&typeof p.then=="function"?p.then(h,s):p instanceof Error?s(p):h(p))}function s(f,...m){r||(r=!0,a(f,...m))}function h(f){s(null,f)}}const xn={basename:pS,dirname:gS,extname:yS,join:xS,sep:"/"};function pS(n,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Va(n);let r=0,u=-1,s=n.length,h;if(a===void 0||a.length===0||a.length>n.length){for(;s--;)if(n.codePointAt(s)===47){if(h){r=s+1;break}}else u<0&&(h=!0,u=s+1);return u<0?"":n.slice(r,u)}if(a===n)return"";let f=-1,m=a.length-1;for(;s--;)if(n.codePointAt(s)===47){if(h){r=s+1;break}}else f<0&&(h=!0,f=s+1),m>-1&&(n.codePointAt(s)===a.codePointAt(m--)?m<0&&(u=s):(m=-1,u=f));return r===u?u=f:u<0&&(u=n.length),n.slice(r,u)}function gS(n){if(Va(n),n.length===0)return".";let a=-1,r=n.length,u;for(;--r;)if(n.codePointAt(r)===47){if(u){a=r;break}}else u||(u=!0);return a<0?n.codePointAt(0)===47?"/":".":a===1&&n.codePointAt(0)===47?"//":n.slice(0,a)}function yS(n){Va(n);let a=n.length,r=-1,u=0,s=-1,h=0,f;for(;a--;){const m=n.codePointAt(a);if(m===47){if(f){u=a+1;break}continue}r<0&&(f=!0,r=a+1),m===46?s<0?s=a:h!==1&&(h=1):s>-1&&(h=-1)}return s<0||r<0||h===0||h===1&&s===r-1&&s===u+1?"":n.slice(s,r)}function xS(...n){let a=-1,r;for(;++a0&&n.codePointAt(n.length-1)===47&&(r+="/"),a?"/"+r:r}function vS(n,a){let r="",u=0,s=-1,h=0,f=-1,m,p;for(;++f<=n.length;){if(f2){if(p=r.lastIndexOf("/"),p!==r.length-1){p<0?(r="",u=0):(r=r.slice(0,p),u=r.length-1-r.lastIndexOf("/")),s=f,h=0;continue}}else if(r.length>0){r="",u=0,s=f,h=0;continue}}a&&(r=r.length>0?r+"/..":"..",u=2)}else r.length>0?r+="/"+n.slice(s+1,f):r=n.slice(s+1,f),u=f-s-1;s=f,h=0}else m===46&&h>-1?h++:h=-1}return r}function Va(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const SS={cwd:kS};function kS(){return"/"}function ds(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function _S(n){if(typeof n=="string")n=new URL(n);else if(!ds(n)){const a=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw a.code="ERR_INVALID_ARG_TYPE",a}if(n.protocol!=="file:"){const a=new TypeError("The URL must be of scheme file");throw a.code="ERR_INVALID_URL_SCHEME",a}return ES(n)}function ES(n){if(n.hostname!==""){const u=new TypeError('File URL host must be "localhost" or empty on darwin');throw u.code="ERR_INVALID_FILE_URL_HOST",u}const a=n.pathname;let r=-1;for(;++r0){let[S,...C]=x;const U=u[v][1];hs(U)&&hs(S)&&(S=Xo(!0,U,S)),u[v]=[d,S,...C]}}}}const CS=new Ds().freeze();function Jo(n,a){if(typeof a!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Io(n,a){if(typeof a!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function $o(n,a){if(a)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function _p(n){if(!hs(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Ep(n,a,r){if(!r)throw new Error("`"+n+"` finished async. Use `"+a+"` instead")}function iu(n){return wS(n)?n:new Sg(n)}function wS(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function MS(n){return typeof n=="string"||NS(n)}function NS(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const DS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ap=[],Tp={allowDangerousHtml:!0},OS=/^(https?|ircs?|mailto|xmpp)$/i,jS=[{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 RS(n){const a=LS(n),r=BS(n);return US(a.runSync(a.parse(r),r),n)}function LS(n){const a=n.rehypePlugins||Ap,r=n.remarkPlugins||Ap,u=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Tp}:Tp;return CS().use(gv).use(r).use(sS,u).use(a)}function BS(n){const a=n.children||"",r=new Sg;return typeof a=="string"&&(r.value=a),r}function US(n,a){const r=a.allowedElements,u=a.allowElement,s=a.components,h=a.disallowedElements,f=a.skipHtml,m=a.unwrapDisallowed,p=a.urlTransform||HS;for(const x of jS)Object.hasOwn(a,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+DS+x.id,void 0);return Ns(n,d),P0(n,{Fragment:k.Fragment,components:s,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function d(x,y,v){if(x.type==="raw"&&v&&typeof y=="number")return f?v.children.splice(y,1):v.children[y]={type:"text",value:x.value},y;if(x.type==="element"){let S;for(S in Yo)if(Object.hasOwn(Yo,S)&&Object.hasOwn(x.properties,S)){const C=x.properties[S],U=Yo[S];(U===null||U.includes(x.tagName))&&(x.properties[S]=p(String(C||""),S,x))}}if(x.type==="element"){let S=r?!r.includes(x.tagName):h?h.includes(x.tagName):!1;if(!S&&u&&typeof y=="number"&&(S=!u(x,y,v)),S&&v&&typeof y=="number")return m&&x.children?v.children.splice(y,1,...x.children):v.children.splice(y,1),y}}}function HS(n){const a=n.indexOf(":"),r=n.indexOf("?"),u=n.indexOf("#"),s=n.indexOf("/");return a===-1||s!==-1&&a>s||r!==-1&&a>r||u!==-1&&a>u||OS.test(n.slice(0,a))?n:""}function zp(n,a){const r=String(n);if(typeof a!="string")throw new TypeError("Expected character");let u=0,s=r.indexOf(a);for(;s!==-1;)u++,s=r.indexOf(a,s+a.length);return u}function qS(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function YS(n,a,r){const s=yu((r||{}).ignore||[]),h=GS(a);let f=-1;for(;++f0?{type:"text",value:L}:void 0),L===!1?v.lastIndex=ae+1:(C!==ae&&K.push({type:"text",value:d.value.slice(C,ae)}),Array.isArray(L)?K.push(...L):L&&K.push(L),C=ae+X[0].length,O=!0),!v.global)break;X=v.exec(d.value)}return O?(C?\]}]+$/.exec(n);if(!a)return[n,void 0];n=n.slice(0,a.index);let r=a[0],u=r.indexOf(")");const s=zp(n,"(");let h=zp(n,")");for(;u!==-1&&s>h;)n+=r.slice(0,u+1),r=r.slice(u+1),u=r.indexOf(")"),h++;return[n,r]}function kg(n,a){const r=n.input.charCodeAt(n.index-1);return(n.index===0||Gl(r)||mu(r))&&(!a||r!==47)}_g.peek=f2;function l2(){this.buffer()}function i2(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function a2(){this.buffer()}function r2(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function u2(n){const a=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=sn(this.sliceSerialize(n)).toLowerCase(),r.label=a}function c2(n){this.exit(n)}function o2(n){const a=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=sn(this.sliceSerialize(n)).toLowerCase(),r.label=a}function s2(n){this.exit(n)}function f2(){return"["}function _g(n,a,r,u){const s=r.createTracker(u);let h=s.move("[^");const f=r.enter("footnoteReference"),m=r.enter("reference");return h+=s.move(r.safe(r.associationId(n),{after:"]",before:h})),m(),f(),h+=s.move("]"),h}function h2(){return{enter:{gfmFootnoteCallString:l2,gfmFootnoteCall:i2,gfmFootnoteDefinitionLabelString:a2,gfmFootnoteDefinition:r2},exit:{gfmFootnoteCallString:u2,gfmFootnoteCall:c2,gfmFootnoteDefinitionLabelString:o2,gfmFootnoteDefinition:s2}}}function d2(n){let a=!1;return n&&n.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:r,footnoteReference:_g},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(u,s,h,f){const m=h.createTracker(f);let p=m.move("[^");const d=h.enter("footnoteDefinition"),x=h.enter("label");return p+=m.move(h.safe(h.associationId(u),{before:p,after:"]"})),x(),p+=m.move("]:"),u.children&&u.children.length>0&&(m.shift(4),p+=m.move((a?` -`:" ")+h.indentLines(h.containerFlow(u,m.current()),a?Eg:m2))),d(),p}}function m2(n,a,r){return a===0?n:Eg(n,a,r)}function Eg(n,a,r){return(r?"":" ")+n}const p2=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ag.peek=v2;function g2(){return{canContainEols:["delete"],enter:{strikethrough:x2},exit:{strikethrough:b2}}}function y2(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:p2}],handlers:{delete:Ag}}}function x2(n){this.enter({type:"delete",children:[]},n)}function b2(n){this.exit(n)}function Ag(n,a,r,u){const s=r.createTracker(u),h=r.enter("strikethrough");let f=s.move("~~");return f+=r.containerPhrasing(n,{...s.current(),before:f,after:"~"}),f+=s.move("~~"),h(),f}function v2(){return"~"}function S2(n){return n.length}function k2(n,a){const r=a||{},u=(r.align||[]).concat(),s=r.stringLength||S2,h=[],f=[],m=[],p=[];let d=0,x=-1;for(;++xd&&(d=n[x].length);++Op[O])&&(p[O]=X)}U.push(K)}f[x]=U,m[x]=V}let y=-1;if(typeof u=="object"&&"length"in u)for(;++yp[y]&&(p[y]=K),S[y]=K),v[y]=X}f.splice(1,0,v),m.splice(1,0,S),x=-1;const C=[];for(;++x "),h.shift(2);const f=r.indentLines(r.containerFlow(n,h.current()),A2);return s(),f}function A2(n,a,r){return">"+(r?"":" ")+n}function T2(n,a){return wp(n,a.inConstruct,!0)&&!wp(n,a.notInConstruct,!1)}function wp(n,a,r){if(typeof a=="string"&&(a=[a]),!a||a.length===0)return r;let u=-1;for(;++uf&&(f=h):h=1,s=u+a.length,u=r.indexOf(a,s);return f}function C2(n,a){return!!(a.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function w2(n){const a=n.options.fence||"`";if(a!=="`"&&a!=="~")throw new Error("Cannot serialize code with `"+a+"` for `options.fence`, expected `` ` `` or `~`");return a}function M2(n,a,r,u){const s=w2(r),h=n.value||"",f=s==="`"?"GraveAccent":"Tilde";if(C2(n,r)){const y=r.enter("codeIndented"),v=r.indentLines(h,N2);return y(),v}const m=r.createTracker(u),p=s.repeat(Math.max(z2(h,s)+1,3)),d=r.enter("codeFenced");let x=m.move(p);if(n.lang){const y=r.enter(`codeFencedLang${f}`);x+=m.move(r.safe(n.lang,{before:x,after:" ",encode:["`"],...m.current()})),y()}if(n.lang&&n.meta){const y=r.enter(`codeFencedMeta${f}`);x+=m.move(" "),x+=m.move(r.safe(n.meta,{before:x,after:` -`,encode:["`"],...m.current()})),y()}return x+=m.move(` -`),h&&(x+=m.move(h+` -`)),x+=m.move(p),d(),x}function N2(n,a,r){return(r?"":" ")+n}function Os(n){const a=n.options.quote||'"';if(a!=='"'&&a!=="'")throw new Error("Cannot serialize title with `"+a+"` for `options.quote`, expected `\"`, or `'`");return a}function D2(n,a,r,u){const s=Os(r),h=s==='"'?"Quote":"Apostrophe",f=r.enter("definition");let m=r.enter("label");const p=r.createTracker(u);let d=p.move("[");return d+=p.move(r.safe(r.associationId(n),{before:d,after:"]",...p.current()})),d+=p.move("]: "),m(),!n.url||/[\0- \u007F]/.test(n.url)?(m=r.enter("destinationLiteral"),d+=p.move("<"),d+=p.move(r.safe(n.url,{before:d,after:">",...p.current()})),d+=p.move(">")):(m=r.enter("destinationRaw"),d+=p.move(r.safe(n.url,{before:d,after:n.title?" ":` -`,...p.current()}))),m(),n.title&&(m=r.enter(`title${h}`),d+=p.move(" "+s),d+=p.move(r.safe(n.title,{before:d,after:s,...p.current()})),d+=p.move(s),m()),f(),d}function O2(n){const a=n.options.emphasis||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize emphasis with `"+a+"` for `options.emphasis`, expected `*`, or `_`");return a}function qa(n){return"&#x"+n.toString(16).toUpperCase()+";"}function hu(n,a,r){const u=Di(n),s=Di(a);return u===void 0?s===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:u===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Tg.peek=j2;function Tg(n,a,r,u){const s=O2(r),h=r.enter("emphasis"),f=r.createTracker(u),m=f.move(s);let p=f.move(r.containerPhrasing(n,{after:s,before:m,...f.current()}));const d=p.charCodeAt(0),x=hu(u.before.charCodeAt(u.before.length-1),d,s);x.inside&&(p=qa(d)+p.slice(1));const y=p.charCodeAt(p.length-1),v=hu(u.after.charCodeAt(0),y,s);v.inside&&(p=p.slice(0,-1)+qa(y));const S=f.move(s);return h(),r.attentionEncodeSurroundingInfo={after:v.outside,before:x.outside},m+p+S}function j2(n,a,r){return r.options.emphasis||"*"}function R2(n,a){let r=!1;return Ns(n,function(u){if("value"in u&&/\r?\n|\r/.test(u.value)||u.type==="break")return r=!0,ss}),!!((!n.depth||n.depth<3)&&Es(n)&&(a.options.setext||r))}function L2(n,a,r,u){const s=Math.max(Math.min(6,n.depth||1),1),h=r.createTracker(u);if(R2(n,r)){const x=r.enter("headingSetext"),y=r.enter("phrasing"),v=r.containerPhrasing(n,{...h.current(),before:` -`,after:` -`});return y(),x(),v+` -`+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(` -`))+1))}const f="#".repeat(s),m=r.enter("headingAtx"),p=r.enter("phrasing");h.move(f+" ");let d=r.containerPhrasing(n,{before:"# ",after:` -`,...h.current()});return/^[\t ]/.test(d)&&(d=qa(d.charCodeAt(0))+d.slice(1)),d=d?f+" "+d:f,r.options.closeAtx&&(d+=" "+f),p(),m(),d}zg.peek=B2;function zg(n){return n.value||""}function B2(){return"<"}Cg.peek=U2;function Cg(n,a,r,u){const s=Os(r),h=s==='"'?"Quote":"Apostrophe",f=r.enter("image");let m=r.enter("label");const p=r.createTracker(u);let d=p.move("![");return d+=p.move(r.safe(n.alt,{before:d,after:"]",...p.current()})),d+=p.move("]("),m(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(m=r.enter("destinationLiteral"),d+=p.move("<"),d+=p.move(r.safe(n.url,{before:d,after:">",...p.current()})),d+=p.move(">")):(m=r.enter("destinationRaw"),d+=p.move(r.safe(n.url,{before:d,after:n.title?" ":")",...p.current()}))),m(),n.title&&(m=r.enter(`title${h}`),d+=p.move(" "+s),d+=p.move(r.safe(n.title,{before:d,after:s,...p.current()})),d+=p.move(s),m()),d+=p.move(")"),f(),d}function U2(){return"!"}wg.peek=H2;function wg(n,a,r,u){const s=n.referenceType,h=r.enter("imageReference");let f=r.enter("label");const m=r.createTracker(u);let p=m.move("![");const d=r.safe(n.alt,{before:p,after:"]",...m.current()});p+=m.move(d+"]["),f();const x=r.stack;r.stack=[],f=r.enter("reference");const y=r.safe(r.associationId(n),{before:p,after:"]",...m.current()});return f(),r.stack=x,h(),s==="full"||!d||d!==y?p+=m.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=m.move("]"),p}function H2(){return"!"}Mg.peek=q2;function Mg(n,a,r){let u=n.value||"",s="`",h=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(u);)s+="`";for(/[^ \r\n]/.test(u)&&(/^[ \r\n]/.test(u)&&/[ \r\n]$/.test(u)||/^`|`$/.test(u))&&(u=" "+u+" ");++h\u007F]/.test(n.url))}Dg.peek=Y2;function Dg(n,a,r,u){const s=Os(r),h=s==='"'?"Quote":"Apostrophe",f=r.createTracker(u);let m,p;if(Ng(n,r)){const x=r.stack;r.stack=[],m=r.enter("autolink");let y=f.move("<");return y+=f.move(r.containerPhrasing(n,{before:y,after:">",...f.current()})),y+=f.move(">"),m(),r.stack=x,y}m=r.enter("link"),p=r.enter("label");let d=f.move("[");return d+=f.move(r.containerPhrasing(n,{before:d,after:"](",...f.current()})),d+=f.move("]("),p(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(p=r.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(r.safe(n.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(p=r.enter("destinationRaw"),d+=f.move(r.safe(n.url,{before:d,after:n.title?" ":")",...f.current()}))),p(),n.title&&(p=r.enter(`title${h}`),d+=f.move(" "+s),d+=f.move(r.safe(n.title,{before:d,after:s,...f.current()})),d+=f.move(s),p()),d+=f.move(")"),m(),d}function Y2(n,a,r){return Ng(n,r)?"<":"["}Og.peek=G2;function Og(n,a,r,u){const s=n.referenceType,h=r.enter("linkReference");let f=r.enter("label");const m=r.createTracker(u);let p=m.move("[");const d=r.containerPhrasing(n,{before:p,after:"]",...m.current()});p+=m.move(d+"]["),f();const x=r.stack;r.stack=[],f=r.enter("reference");const y=r.safe(r.associationId(n),{before:p,after:"]",...m.current()});return f(),r.stack=x,h(),s==="full"||!d||d!==y?p+=m.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=m.move("]"),p}function G2(){return"["}function js(n){const a=n.options.bullet||"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bullet`, expected `*`, `+`, or `-`");return a}function V2(n){const a=js(n),r=n.options.bulletOther;if(!r)return a==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===a)throw new Error("Expected `bullet` (`"+a+"`) and `bulletOther` (`"+r+"`) to be different");return r}function Q2(n){const a=n.options.bulletOrdered||".";if(a!=="."&&a!==")")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOrdered`, expected `.` or `)`");return a}function jg(n){const a=n.options.rule||"*";if(a!=="*"&&a!=="-"&&a!=="_")throw new Error("Cannot serialize rules with `"+a+"` for `options.rule`, expected `*`, `-`, or `_`");return a}function X2(n,a,r,u){const s=r.enter("list"),h=r.bulletCurrent;let f=n.ordered?Q2(r):js(r);const m=n.ordered?f==="."?")":".":V2(r);let p=a&&r.bulletLastUsed?f===r.bulletLastUsed:!1;if(!n.ordered){const x=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&x&&(!x.children||!x.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(p=!0),jg(r)===f&&x){let y=-1;for(;++y-1?a.start:1)+(r.options.incrementListMarker===!1?0:a.children.indexOf(n))+h);let f=h.length+1;(s==="tab"||s==="mixed"&&(a&&a.type==="list"&&a.spread||n.spread))&&(f=Math.ceil(f/4)*4);const m=r.createTracker(u);m.move(h+" ".repeat(f-h.length)),m.shift(f);const p=r.enter("listItem"),d=r.indentLines(r.containerFlow(n,m.current()),x);return p(),d;function x(y,v,S){return v?(S?"":" ".repeat(f))+y:(S?h:h+" ".repeat(f-h.length))+y}}function F2(n,a,r,u){const s=r.enter("paragraph"),h=r.enter("phrasing"),f=r.containerPhrasing(n,u);return h(),s(),f}const J2=yu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function I2(n,a,r,u){return(n.children.some(function(f){return J2(f)})?r.containerPhrasing:r.containerFlow).call(r,n,u)}function $2(n){const a=n.options.strong||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize strong with `"+a+"` for `options.strong`, expected `*`, or `_`");return a}Rg.peek=W2;function Rg(n,a,r,u){const s=$2(r),h=r.enter("strong"),f=r.createTracker(u),m=f.move(s+s);let p=f.move(r.containerPhrasing(n,{after:s,before:m,...f.current()}));const d=p.charCodeAt(0),x=hu(u.before.charCodeAt(u.before.length-1),d,s);x.inside&&(p=qa(d)+p.slice(1));const y=p.charCodeAt(p.length-1),v=hu(u.after.charCodeAt(0),y,s);v.inside&&(p=p.slice(0,-1)+qa(y));const S=f.move(s+s);return h(),r.attentionEncodeSurroundingInfo={after:v.outside,before:x.outside},m+p+S}function W2(n,a,r){return r.options.strong||"*"}function P2(n,a,r,u){return r.safe(n.value,u)}function ek(n){const a=n.options.ruleRepetition||3;if(a<3)throw new Error("Cannot serialize rules with repetition `"+a+"` for `options.ruleRepetition`, expected `3` or more");return a}function tk(n,a,r){const u=(jg(r)+(r.options.ruleSpaces?" ":"")).repeat(ek(r));return r.options.ruleSpaces?u.slice(0,-1):u}const Lg={blockquote:E2,break:Mp,code:M2,definition:D2,emphasis:Tg,hardBreak:Mp,heading:L2,html:zg,image:Cg,imageReference:wg,inlineCode:Mg,link:Dg,linkReference:Og,list:X2,listItem:K2,paragraph:F2,root:I2,strong:Rg,text:P2,thematicBreak:tk};function nk(){return{enter:{table:lk,tableData:Np,tableHeader:Np,tableRow:ak},exit:{codeText:rk,table:ik,tableData:ts,tableHeader:ts,tableRow:ts}}}function lk(n){const a=n._align;this.enter({type:"table",align:a.map(function(r){return r==="none"?null:r}),children:[]},n),this.data.inTable=!0}function ik(n){this.exit(n),this.data.inTable=void 0}function ak(n){this.enter({type:"tableRow",children:[]},n)}function ts(n){this.exit(n)}function Np(n){this.enter({type:"tableCell",children:[]},n)}function rk(n){let a=this.resume();this.data.inTable&&(a=a.replace(/\\([\\|])/g,uk));const r=this.stack[this.stack.length-1];r.type,r.value=a,this.exit(n)}function uk(n,a){return a==="|"?a:n}function ck(n){const a=n||{},r=a.tableCellPadding,u=a.tablePipeAlign,s=a.stringLength,h=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:f,tableCell:p,tableRow:m}};function f(S,C,U,V){return d(x(S,U,V),S.align)}function m(S,C,U,V){const O=y(S,U,V),K=d([O]);return K.slice(0,K.indexOf(` -`))}function p(S,C,U,V){const O=U.enter("tableCell"),K=U.enter("phrasing"),X=U.containerPhrasing(S,{...V,before:h,after:h});return K(),O(),X}function d(S,C){return k2(S,{align:C,alignDelimiters:u,padding:r,stringLength:s})}function x(S,C,U){const V=S.children;let O=-1;const K=[],X=C.enter("table");for(;++O0&&!r&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const Tk={tokenize:jk,partial:!0};function zk(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Nk,continuation:{tokenize:Dk},exit:Ok}},text:{91:{name:"gfmFootnoteCall",tokenize:Mk},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ck,resolveTo:wk}}}}function Ck(n,a,r){const u=this;let s=u.events.length;const h=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let f;for(;s--;){const p=u.events[s][1];if(p.type==="labelImage"){f=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return m;function m(p){if(!f||!f._balanced)return r(p);const d=sn(u.sliceSerialize({start:f.end,end:u.now()}));return d.codePointAt(0)!==94||!h.includes(d.slice(1))?r(p):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(p),n.exit("gfmFootnoteCallLabelMarker"),a(p))}}function wk(n,a){let r=n.length;for(;r--;)if(n[r][1].type==="labelImage"&&n[r][0]==="enter"){n[r][1];break}n[r+1][1].type="data",n[r+3][1].type="gfmFootnoteCallLabelMarker";const u={type:"gfmFootnoteCall",start:Object.assign({},n[r+3][1].start),end:Object.assign({},n[n.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},n[r+3][1].end),end:Object.assign({},n[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const h={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},h.start),end:Object.assign({},h.end)},m=[n[r+1],n[r+2],["enter",u,a],n[r+3],n[r+4],["enter",s,a],["exit",s,a],["enter",h,a],["enter",f,a],["exit",f,a],["exit",h,a],n[n.length-2],n[n.length-1],["exit",u,a]];return n.splice(r,n.length-r+1,...m),n}function Mk(n,a,r){const u=this,s=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let h=0,f;return m;function m(y){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?r(y):(n.enter("gfmFootnoteCallMarker"),n.consume(y),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",d)}function d(y){if(h>999||y===93&&!f||y===null||y===91||Je(y))return r(y);if(y===93){n.exit("chunkString");const v=n.exit("gfmFootnoteCallString");return s.includes(sn(u.sliceSerialize(v)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(y),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),a):r(y)}return Je(y)||(f=!0),h++,n.consume(y),y===92?x:d}function x(y){return y===91||y===92||y===93?(n.consume(y),h++,d):d(y)}}function Nk(n,a,r){const u=this,s=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let h,f=0,m;return p;function p(C){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(C),n.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(C){return C===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(C),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",x):r(C)}function x(C){if(f>999||C===93&&!m||C===null||C===91||Je(C))return r(C);if(C===93){n.exit("chunkString");const U=n.exit("gfmFootnoteDefinitionLabelString");return h=sn(u.sliceSerialize(U)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(C),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),v}return Je(C)||(m=!0),f++,n.consume(C),C===92?y:x}function y(C){return C===91||C===92||C===93?(n.consume(C),f++,x):x(C)}function v(C){return C===58?(n.enter("definitionMarker"),n.consume(C),n.exit("definitionMarker"),s.includes(h)||s.push(h),Le(n,S,"gfmFootnoteDefinitionWhitespace")):r(C)}function S(C){return a(C)}}function Dk(n,a,r){return n.check(Ga,a,n.attempt(Tk,a,r))}function Ok(n){n.exit("gfmFootnoteDefinition")}function jk(n,a,r){const u=this;return Le(n,s,"gfmFootnoteDefinitionIndent",5);function s(h){const f=u.events[u.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?a(h):r(h)}}function Rk(n){let r=(n||{}).singleTilde;const u={name:"strikethrough",tokenize:h,resolveAll:s};return r==null&&(r=!0),{text:{126:u},insideSpan:{null:[u]},attentionMarkers:{null:[126]}};function s(f,m){let p=-1;for(;++p1?p(C):(f.consume(C),y++,S);if(y<2&&!r)return p(C);const V=f.exit("strikethroughSequenceTemporary"),O=Di(C);return V._open=!O||O===2&&!!U,V._close=!U||U===2&&!!O,m(C)}}}class Lk{constructor(){this.map=[]}add(a,r,u){Bk(this,a,r,u)}consume(a){if(this.map.sort(function(h,f){return h[0]-f[0]}),this.map.length===0)return;let r=this.map.length;const u=[];for(;r>0;)r-=1,u.push(a.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),a.length=this.map[r][0];u.push(a.slice()),a.length=0;let s=u.pop();for(;s;){for(const h of s)a.push(h);s=u.pop()}this.map.length=0}}function Bk(n,a,r,u){let s=0;if(!(r===0&&u.length===0)){for(;s-1;){const ue=u.events[ne][1].type;if(ue==="lineEnding"||ue==="linePrefix")ne--;else break}const le=ne>-1?u.events[ne][1].type:null,Ce=le==="tableHead"||le==="tableRow"?L:p;return Ce===L&&u.parser.lazy[u.now().line]?r(R):Ce(R)}function p(R){return n.enter("tableHead"),n.enter("tableRow"),d(R)}function d(R){return R===124||(f=!0,h+=1),x(R)}function x(R){return R===null?r(R):pe(R)?h>1?(h=0,u.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(R),n.exit("lineEnding"),S):r(R):De(R)?Le(n,x,"whitespace")(R):(h+=1,f&&(f=!1,s+=1),R===124?(n.enter("tableCellDivider"),n.consume(R),n.exit("tableCellDivider"),f=!0,x):(n.enter("data"),y(R)))}function y(R){return R===null||R===124||Je(R)?(n.exit("data"),x(R)):(n.consume(R),R===92?v:y)}function v(R){return R===92||R===124?(n.consume(R),y):y(R)}function S(R){return u.interrupt=!1,u.parser.lazy[u.now().line]?r(R):(n.enter("tableDelimiterRow"),f=!1,De(R)?Le(n,C,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):C(R))}function C(R){return R===45||R===58?V(R):R===124?(f=!0,n.enter("tableCellDivider"),n.consume(R),n.exit("tableCellDivider"),U):ee(R)}function U(R){return De(R)?Le(n,V,"whitespace")(R):V(R)}function V(R){return R===58?(h+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(R),n.exit("tableDelimiterMarker"),O):R===45?(h+=1,O(R)):R===null||pe(R)?ae(R):ee(R)}function O(R){return R===45?(n.enter("tableDelimiterFiller"),K(R)):ee(R)}function K(R){return R===45?(n.consume(R),K):R===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(R),n.exit("tableDelimiterMarker"),X):(n.exit("tableDelimiterFiller"),X(R))}function X(R){return De(R)?Le(n,ae,"whitespace")(R):ae(R)}function ae(R){return R===124?C(R):R===null||pe(R)?!f||s!==h?ee(R):(n.exit("tableDelimiterRow"),n.exit("tableHead"),a(R)):ee(R)}function ee(R){return r(R)}function L(R){return n.enter("tableRow"),J(R)}function J(R){return R===124?(n.enter("tableCellDivider"),n.consume(R),n.exit("tableCellDivider"),J):R===null||pe(R)?(n.exit("tableRow"),a(R)):De(R)?Le(n,J,"whitespace")(R):(n.enter("data"),he(R))}function he(R){return R===null||R===124||Je(R)?(n.exit("data"),J(R)):(n.consume(R),R===92?xe:he)}function xe(R){return R===92||R===124?(n.consume(R),he):he(R)}}function Yk(n,a){let r=-1,u=!0,s=0,h=[0,0,0,0],f=[0,0,0,0],m=!1,p=0,d,x,y;const v=new Lk;for(;++rr[2]+1){const C=r[2]+1,U=r[3]-r[2]-1;n.add(C,U,[])}}n.add(r[3]+1,0,[["exit",y,a]])}return s!==void 0&&(h.end=Object.assign({},Ni(a.events,s)),n.add(s,0,[["exit",h,a]]),h=void 0),h}function Op(n,a,r,u,s){const h=[],f=Ni(a.events,r);s&&(s.end=Object.assign({},f),h.push(["exit",s,a])),u.end=Object.assign({},f),h.push(["exit",u,a]),n.add(r+1,0,h)}function Ni(n,a){const r=n[a],u=r[0]==="enter"?"start":"end";return r[1][u]}const Gk={name:"tasklistCheck",tokenize:Qk};function Vk(){return{text:{91:Gk}}}function Qk(n,a,r){const u=this;return s;function s(p){return u.previous!==null||!u._gfmTasklistFirstContentOfListItem?r(p):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),h)}function h(p){return Je(p)?(n.enter("taskListCheckValueUnchecked"),n.consume(p),n.exit("taskListCheckValueUnchecked"),f):p===88||p===120?(n.enter("taskListCheckValueChecked"),n.consume(p),n.exit("taskListCheckValueChecked"),f):r(p)}function f(p){return p===93?(n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),m):r(p)}function m(p){return pe(p)?a(p):De(p)?n.check({tokenize:Xk},a,r)(p):r(p)}}function Xk(n,a,r){return Le(n,u,"whitespace");function u(s){return s===null?r(s):a(s)}}function Zk(n){return eg([yk(),zk(),Rk(n),Hk(),Vk()])}const Kk={};function Fk(n){const a=this,r=n||Kk,u=a.data(),s=u.micromarkExtensions||(u.micromarkExtensions=[]),h=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),f=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);s.push(Zk(r)),h.push(dk()),f.push(mk(r))}/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Jk=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xg=(...n)=>n.filter((a,r,u)=>!!a&&a.trim()!==""&&u.indexOf(a)===r).join(" ").trim();/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var Ik={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"};/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $k=be.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:r=2,absoluteStrokeWidth:u,className:s="",children:h,iconNode:f,...m},p)=>be.createElement("svg",{ref:p,...Ik,width:a,height:a,stroke:n,strokeWidth:u?Number(r)*24/Number(a):r,className:Xg("lucide",s),...m},[...f.map(([d,x])=>be.createElement(d,x)),...Array.isArray(h)?h:[h]]));/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ft=(n,a)=>{const r=be.forwardRef(({className:u,...s},h)=>be.createElement($k,{ref:h,iconNode:a,className:Xg(`lucide-${Jk(n)}`,u),...s}));return r.displayName=`${n}`,r};/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zg=ft("Activity",[["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"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Wk=ft("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kg=ft("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pk=ft("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const e_=ft("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Fg=ft("FileText",[["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"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const t_=ft("History",[["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"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const n_=ft("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const l_=ft("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const i_=ft("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ls=ft("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Jg=ft("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const a_=ft("RefreshCw",[["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"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r_=ft("Send",[["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"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ps=ft("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ig=ft("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const u_=ft("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const c_=ft("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const o_=ft("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),$g=new URL(".",window.location.href).pathname;async function yl(n,a){const r=await fetch(`${$g}${n.replace(/^\//,"")}`,{headers:{"Content-Type":"application/json",...(a==null?void 0:a.headers)||{}},...a}),u=await r.text(),s=u?JSON.parse(u):{};if(!r.ok)throw new Error(s.error||r.statusText);return s}function kt(...n){return n.filter(Boolean).join(" ")}function ns(n,a=2500,r=[]){const[u,s]=be.useState(null),h=async()=>{try{const f=await n();s(f)}catch{}};return be.useEffect(()=>{h();const f=setInterval(h,a);return()=>clearInterval(f)},r),{data:u,refresh:h}}const Oi=[{role:"assistant",content:"Select a job, then ask about metrics, runtime, logs, or how to start the next AReno task."}],s_="areno-dashboard-agent-chat",Wg="areno-dashboard-agent-chat-sessions",jp="areno-dashboard-agent-active-chat",Rp="areno-dashboard-agent-draft";function f_(){try{const n=JSON.parse(localStorage.getItem(s_)||"[]");return Array.isArray(n)&&n.length?n:Oi}catch{return Oi}}function cu(n=Oi,a="New chat"){const r=Date.now();return{id:`chat-${r}-${Math.random().toString(16).slice(2)}`,title:a,createdAt:r,updatedAt:r,messages:n}}function h_(){try{const n=JSON.parse(localStorage.getItem(Wg)||"[]");if(Array.isArray(n)&&n.length)return n.map(a=>{var r;return{...a,messages:(r=a.messages)!=null&&r.length?a.messages:Oi}})}catch{}return[cu(f_(),"Default chat")]}function d_(n,a="New chat"){const r=n.find(s=>s.role==="user"&&s.content);if(!r)return a;const u=r.content.replace(/\s+/g," ").trim();return u.length>42?`${u.slice(0,42)}...`:u}const m_={ckpt:"Qwen/Qwen3-0.6B",dataset_path:"yahma/alpaca-cleaned:train",dataset_loader_fn:"examples/sft/alpaca/dataset_loader.py",reward_fn_path:"",ref_ckpt:"",reward_ckpt:"",critic_ckpt:"",agent_fn:"",algo:"sft",model_hub:"modelscope",epochs:10,max_steps:5,world_size:1,tp_size:1,attn_backend:"flash",activation_checkpointing:!0,drop_rollout_state:!1,eager_decode:!1,disable_thinking:!1,batch_size:8,n_samples:8,mini_bs:1,score_micro_bs:8,gradient_accumulation_steps:"",max_prompt_tokens:1024,max_context_len:2048,max_new_tokens:1024,max_running_prompts:"",temperature:1,top_k:-1,top_p:1,greedy:!1,agent_timeout_s:300,train_tool_results:!1,lr:1e-6,min_lr:1e-7,lr_decay_steps:1e3,lr_decay_style:"cosine",adam_beta1:.9,adam_beta2:.999,adam_8bit:!1,weight_decay:.01,grad_clip_norm:1,gspo_clip_eps:3e-4,grpo_clip_eps:.2,dpo_beta:.1,critic_warmup_steps:20,critic_lr:1e-5,use_kl_loss:!0,kl_loss_coef:.001,kl_loss_type:"low_var_kl",clip_eps:.2,clip_ratio_c:3,value_clip_eps:.5,value_loss_coef:.5,gamma:1,lam:.95,tune_params:!1,mem_frac:.9,tune_max_samples:256,save_path:"outputs/dashboard-run",save_interval:100,metrics_dir:"outputs/dashboard-run/metrics",extra_args:""},p_={model_path:"Qwen/Qwen3-0.6B",model_hub:"modelscope",host:"0.0.0.0",port:8e3,world_size:1,tp_size:1,max_running_prompts:16,default_max_tokens:1024,decode_progress_interval_s:0,attn_backend:"flash",eager_decode:!1,disable_thinking:!1,extra_args:""};function g_(){var Y,W,ge,ze,Be,vt;const[n,a]=be.useState(null),[r,u]=be.useState(m_),[s,h]=be.useState(p_),[f,m]=be.useState(()=>localStorage.getItem(Rp)||""),[p,d]=be.useState(()=>h_()),[x,y]=be.useState(()=>localStorage.getItem(jp)||""),[v,S]=be.useState("chat"),[C,U]=be.useState(()=>{try{return JSON.parse(localStorage.getItem("areno-dashboard-agent-provider")||"{}")}catch{return{}}}),[V,O]=be.useState("jobs"),[K,X]=be.useState("train"),[ae,ee]=be.useState(()=>localStorage.getItem("areno-dashboard-theme")||"dark"),[L,J]=be.useState(""),[he,xe]=be.useState(!1),[R,ne]=be.useState(1),[le,Ce]=be.useState(0),ue=be.useRef(null),$=ns(()=>yl("/api/env"),5e3),D=ns(()=>yl("/api/jobs"),2e3),F=ns(()=>n?yl(`/api/jobs/${n}`):Promise.resolve(null),3e3,[n]),ie=((Y=D.data)==null?void 0:Y.jobs)||[],Se=10,E=Math.max(1,Math.ceil(ie.length/Se)),T=Math.min(R,E),q=ie.slice((T-1)*Se,T*Se),_=((W=F.data)==null?void 0:W.job)||(n?ie.find(P=>P.id===n):null)||null,te=be.useMemo(()=>p.find(P=>P.id===x)||p[0]||cu(),[p,x]),fe=te.messages||Oi;be.useEffect(()=>{n&&ie.length&&!ie.some(P=>P.id===n)&&a(null)},[ie.length,n]),be.useEffect(()=>{R>E&&ne(E)},[R,E]),be.useEffect(()=>{document.documentElement.dataset.theme=ae,localStorage.setItem("areno-dashboard-theme",ae)},[ae]),be.useEffect(()=>{localStorage.setItem("areno-dashboard-agent-provider",JSON.stringify(C))},[C]),be.useEffect(()=>{localStorage.setItem(Wg,JSON.stringify(p.slice(-40)))},[p]),be.useEffect(()=>{if(!p.length){const P=cu();d([P]),y(P.id);return}p.some(P=>P.id===x)||y(p[0].id)},[p,x]),be.useEffect(()=>{x&&localStorage.setItem(jp,x)},[x]),be.useEffect(()=>{localStorage.setItem(Rp,f)},[f]),be.useEffect(()=>{const P=ue.current;P&&(P.scrollTop=P.scrollHeight)},[fe,v]);const oe=[{id:"jobs",label:"Jobs",icon:k.jsx(Zg,{size:16})},{id:"runtime",label:"Runtime",icon:k.jsx(ps,{size:16})},{id:"launcher",label:"Launcher",icon:k.jsx(Ls,{size:16})},{id:"agent",label:"Agent",icon:k.jsx(Wk,{size:16})}],we={jobs:_?[_.name,`${_.kind} · ${_.status} · step ${_.step??0}`]:["Jobs","Open an AReno train or serve task to inspect metrics, samples, config, and logs."],runtime:["Runtime Environment","Review areno check, areno env, dependencies, GPU state, and repository context."],launcher:["Task Launcher","Start low-intrusion AReno train or serve subprocesses from explicit configs."],agent:["Agent Console","Chat with an operations agent using the selected job context."]};async function Ie(){J("Starting train job...");try{const P=await yl("/api/jobs/train",{method:"POST",body:JSON.stringify(r)});a(P.job.id),await D.refresh()}finally{J("")}}async function Ye(){J("Starting serve job...");try{const P=await yl("/api/jobs/serve",{method:"POST",body:JSON.stringify(s)});a(P.job.id),await D.refresh()}finally{J("")}}async function zt(P){J("Stopping job...");try{await yl(`/api/jobs/${P}/stop`,{method:"POST",body:"{}"}),await D.refresh()}finally{J("")}}async function Kt(){const P=f.trim();if(!P)return;m("");const Z=`assistant-${Date.now()}`;Yn(ve=>[...ve,{role:"user",content:P},{id:Z,role:"assistant",content:"",events:[],streaming:!0}]),J("Agent analyzing...");try{await Ql({prompt:P,job_id:(_==null?void 0:_.id)||null,provider:C,history:Gn(fe),onEvent:ve=>Qn(Z,ve)})}catch(ve){Qn(Z,{type:"error",content:`Agent request failed: ${ve.message||ve}`})}finally{Qn(Z,{type:"done"}),J("")}}function Yn(P){const Z=te.id;d(ve=>ve.map(de=>{if(de.id!==Z)return de;const Ee=de.messages||Oi,et=typeof P=="function"?P(Ee):P;return{...de,messages:et,updatedAt:Date.now(),title:d_(et,de.title)}}))}function bl(){const P=cu();d(Z=>[P,...Z]),y(P.id),m(""),S("chat")}function rn(P){y(P),S("chat")}function Gn(P){return P.filter(Z=>(Z.role==="user"||Z.role==="assistant")&&!Z.streaming).map(Z=>({role:Z.role,content:Vn(Z)})).filter(Z=>Z.content).slice(-10)}function Vn(P){return P.content?P.content:(P.events||[]).filter(Z=>Z.type==="content"||Z.type==="reasoning").map(Z=>Z.text||"").join(` -`).trim()}async function Ql({prompt:P,job_id:Z,provider:ve,history:de,onEvent:Ee}){const et=await fetch(`${$g}api/agent/stream`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:P,job_id:Z,provider:ve,history:de})});if(!et.ok||!et.body){const Xn=await et.text();throw new Error(Xn||et.statusText)}const Bt=et.body.getReader(),bu=new TextDecoder;let hn="";for(;;){const{value:Xn,done:Xl}=await Bt.read();if(Xl)break;hn+=bu.decode(Xn,{stream:!0});const dn=hn.split(` -`);hn=dn.pop()||"";for(const Sl of dn)Sl.trim()&&Ee(JSON.parse(Sl))}hn.trim()&&Ee(JSON.parse(hn))}function Qn(P,Z){Yn(ve=>ve.map(de=>de.id!==P?de:Z.type==="content_delta"?fn(de,"content",Z.content||""):Z.type==="reasoning_delta"?fn(de,"reasoning",Z.content||""):Z.type==="tool_calls"?Li(de,Z.tool_calls||[]):Z.type==="tool_call_delta"?vn(de,Z.tool_call,!0):Z.type==="tool_result"?{...de,events:[...de.events||[],{type:"tool_result",result:Z.tool_result}]}:Z.type==="error"?{...fn(de,"content",Z.content||""),streaming:!1}:Z.type==="done"?{...de,streaming:!1}:de))}function fn(P,Z,ve){if(!ve)return P;const de=[...P.events||[]],Ee=de[de.length-1];(Ee==null?void 0:Ee.type)===Z?de[de.length-1]={...Ee,text:`${Ee.text||""}${ve}`}:de.push({type:Z,text:ve});const et=Z==="content"?`${P.content||""}${ve}`:P.content;return{...P,content:et,events:de}}function vn(P,Z,ve=!1){if(!Z)return P;const de=[...P.events||[]],Ee=de.findIndex(et=>et.type==="tool_call"&&vl(et.call,Z));return Ee>=0?de[Ee]={...de[Ee],call:Z,live:ve}:de.push({type:"tool_call",call:Z,live:ve}),{...P,events:de}}function vl(P,Z){return!P||!Z?!1:!!(P.id&&Z.id&&P.id===Z.id||P.round!==void 0&&Z.round!==void 0&&P.index!==void 0&&Z.index!==void 0&&P.round===Z.round&&P.index===Z.index)}function Li(P,Z){let ve=P;for(const de of Z)ve=vn(ve,de,!1);return ve}function Bi(){var P;return V==="runtime"?k.jsxs("div",{className:"tabGrid",children:[k.jsx(C_,{env:$.data}),k.jsx(w_,{gpus:((P=$.data)==null?void 0:P.gpus)||[]})]}):V==="launcher"?k.jsxs("section",{className:"panel launcher",children:[k.jsxs("div",{className:"panelHeader",children:[k.jsxs("div",{children:[k.jsx("h2",{children:"Task Launcher"}),k.jsx("p",{children:"Builds AReno CLI commands without importing training internals."})]}),k.jsxs("div",{className:"tabs",children:[k.jsx("button",{className:kt(K==="train"&&"active"),onClick:()=>X("train"),children:"Train"}),k.jsx("button",{className:kt(K==="serve"&&"active"),onClick:()=>X("serve"),children:"Serve"})]})]}),K==="train"?k.jsx(Z_,{config:r,setConfig:u,onStart:Ie}):k.jsx(F_,{config:s,setConfig:h,onStart:Ye})]}):V==="agent"?k.jsxs("section",{className:"panel chatPanel",children:[k.jsxs("div",{className:"panelHeader",children:[k.jsxs("div",{children:[k.jsx("h2",{children:"Agent Chat"}),k.jsx("p",{children:_?`Context: ${_.name}`:"No job selected. The agent will use runtime context only."})]}),k.jsxs("div",{className:"agentHeaderActions",children:[k.jsxs("button",{className:"secondaryButton",onClick:bl,children:[k.jsx(Jg,{size:15})," New Chat"]}),k.jsxs("button",{className:"secondaryButton",onClick:()=>xe(!0),children:[k.jsx(Ig,{size:15})," Settings"]})]})]}),k.jsxs("div",{className:"agentTabs",children:[k.jsxs("button",{className:kt(v==="chat"&&"active"),onClick:()=>S("chat"),children:[k.jsx(l_,{size:15})," Chat"]}),k.jsxs("button",{className:kt(v==="history"&&"active"),onClick:()=>S("history"),children:[k.jsx(t_,{size:15})," History"]})]}),v==="history"?k.jsx(x_,{sessions:p,activeId:te.id,onOpen:rn,onNew:bl}):k.jsxs(k.Fragment,{children:[k.jsx("div",{className:"chatMessages",ref:ue,children:fe.map((Z,ve)=>{var de;return k.jsxs("div",{className:kt("chatBubble",Z.role),children:[k.jsx("span",{children:Z.role}),(de=Z.events)!=null&&de.length?k.jsx(S_,{events:Z.events}):k.jsx(Bs,{text:Z.content}),Z.streaming&&k.jsx("div",{className:"streamingHint",children:"thinking..."})]},`${Z.id||Z.role}-${ve}`)})}),k.jsxs("div",{className:"chatComposer",children:[k.jsx("textarea",{value:f,onChange:Z=>m(Z.target.value),onKeyDown:Z=>{Z.key==="Enter"&&!Z.shiftKey&&(Z.preventDefault(),Kt())}}),k.jsxs("button",{className:"primaryButton",onClick:Kt,children:[k.jsx(r_,{size:16})," Send"]})]})]}),he&&k.jsx(b_,{title:"Agent Settings",onClose:()=>xe(!1),children:k.jsx(y_,{provider:C,setProvider:U})})]}):_?k.jsxs("section",{className:"panel detailPanel",children:[k.jsxs("div",{className:"panelHeader",children:[k.jsxs("div",{children:[k.jsx("h2",{children:_.name}),k.jsxs("p",{children:[_.kind," · ",_.status]})]}),k.jsxs("div",{className:"detailActions",children:[k.jsx("button",{className:"secondaryButton",onClick:()=>a(null),children:"Back"}),_.status==="running"&&k.jsxs("button",{className:"dangerButton",onClick:()=>zt(_.id),children:[k.jsx(Pk,{size:16})," Stop"]})]})]}),k.jsx(M_,{job:_}),k.jsx(v_,{job:_,refreshNonce:le}),k.jsx(q_,{samples:(_==null?void 0:_.samples)||[]}),k.jsxs("div",{className:"split",children:[k.jsx(G_,{config:_==null?void 0:_.config,launch:_==null?void 0:_.launch}),k.jsx(X_,{logs:(_==null?void 0:_.logs)||[]})]})]}):k.jsxs("section",{className:"panel jobListPage",children:[k.jsxs("div",{className:"panelHeader",children:[k.jsxs("div",{children:[k.jsx("h2",{children:"Jobs"}),k.jsx("p",{children:"Registered AReno train/serve processes. Select a row to open job details."})]}),k.jsxs("div",{className:"pagerControls",children:[k.jsx("button",{className:"secondaryButton",disabled:T<=1,onClick:()=>ne(Z=>Math.max(1,Z-1)),children:"Prev"}),k.jsxs("span",{children:[T," / ",E]}),k.jsx("button",{className:"secondaryButton",disabled:T>=E,onClick:()=>ne(Z=>Math.min(E,Z+1)),children:"Next"})]})]}),k.jsxs("div",{className:"jobList",children:[ie.length===0&&k.jsx(ty,{title:"No jobs yet",text:"Start a train or serve task from the launcher."}),q.map(Z=>k.jsxs("button",{className:"jobRow large",onClick:()=>a(Z.id),children:[k.jsx("div",{className:"jobIcon",children:Z.kind==="serve"?k.jsx(ps,{size:16}):k.jsx(n_,{size:16})}),k.jsxs("div",{className:"jobInfo",children:[k.jsx("div",{className:"jobTitle",children:Z.name}),k.jsxs("div",{className:"jobMeta",children:[Z.kind," · ",Z.status," · step ",Z.step??0]})]}),k.jsx("span",{className:kt("statusDot",Z.status)})]},Z.id))]}),ie.length>Se&&k.jsxs("div",{className:"listFooter",children:["Showing ",(T-1)*Se+1,"-",Math.min(T*Se,ie.length)," of ",ie.length," jobs"]})]})}const[mt,Ui]=we[V]||we.jobs;return k.jsxs("div",{className:"shell",children:[k.jsxs("aside",{className:"rail",children:[k.jsxs("div",{className:"brand",children:[k.jsx("div",{className:"brandMark",children:"A"}),k.jsxs("div",{children:[k.jsx("div",{className:"brandName",children:"AReno Ops"}),k.jsx("div",{className:"brandMeta",children:"runtime workbench"})]})]}),k.jsx("nav",{className:"nav",children:oe.map(P=>k.jsxs("button",{className:kt("navItem",V===P.id&&"active"),onClick:()=>O(P.id),children:[P.icon," ",P.label]},P.id))}),k.jsxs("div",{className:"railFooter",children:[k.jsx("div",{className:"tinyLabel",children:"Repo"}),k.jsxs("div",{className:"monoLine",children:[((ze=(ge=$.data)==null?void 0:ge.repo)==null?void 0:ze.branch)||"unknown"," · ",((vt=(Be=$.data)==null?void 0:Be.repo)==null?void 0:vt.commit)||"no git"]})]})]}),k.jsxs("main",{className:"main",children:[k.jsxs("header",{className:"topbar",children:[k.jsxs("div",{children:[k.jsx("h1",{children:mt}),k.jsx("p",{children:Ui})]}),k.jsxs("div",{className:"topActions",children:[k.jsx("button",{className:"iconButton",onClick:()=>ee(ae==="dark"?"light":"dark"),title:"Toggle theme",children:ae==="dark"?k.jsx(c_,{size:16}):k.jsx(i_,{size:16})}),k.jsx("button",{className:"iconButton",onClick:()=>{$.refresh(),D.refresh(),F.refresh(),Ce(P=>P+1)},title:"Refresh",children:k.jsx(a_,{size:16})})]})]}),L&&k.jsx("div",{className:"notice",children:L}),Bi()]})]})}function y_({provider:n,setProvider:a}){return k.jsxs("div",{className:"agentConfig modalForm",children:[k.jsx(du,{label:"Base URL",value:n.base_url||"",onChange:r=>a({...n,base_url:r}),compact:!0}),k.jsx(du,{label:"Model",value:n.model||"",onChange:r=>a({...n,model:r}),compact:!0}),k.jsxs("label",{className:"field compact",children:[k.jsx("span",{children:"API key"}),k.jsx("input",{type:"password",value:n.api_key||"",onChange:r=>a({...n,api_key:r.target.value})})]})]})}function x_({sessions:n,activeId:a,onOpen:r,onNew:u}){return k.jsxs("div",{className:"agentHistory",children:[k.jsxs("div",{className:"agentHistoryHeader",children:[k.jsxs("div",{children:[k.jsx("h3",{children:"Chat History"}),k.jsxs("p",{children:[n.length," saved conversations in this browser."]})]}),k.jsxs("button",{className:"secondaryButton",onClick:u,children:[k.jsx(Jg,{size:15})," New Chat"]})]}),k.jsx("div",{className:"agentHistoryList",children:n.map(s=>{const h=[...s.messages||[]].reverse().find(f=>f.role==="user"||f.content);return k.jsxs("button",{className:kt("agentHistoryItem",s.id===a&&"active"),onClick:()=>r(s.id),children:[k.jsx("strong",{children:s.title||"New chat"}),k.jsx("span",{children:(h==null?void 0:h.content)||"No messages yet."}),k.jsx("small",{children:new Date(s.updatedAt||s.createdAt||Date.now()).toLocaleString()})]},s.id)})})]})}function b_({title:n,children:a,onClose:r}){return k.jsx("div",{className:"modalOverlay",role:"presentation",onMouseDown:r,children:k.jsxs("div",{className:"modalCard",role:"dialog","aria-modal":"true","aria-label":n,onMouseDown:u=>u.stopPropagation(),children:[k.jsxs("div",{className:"modalHeader",children:[k.jsxs("div",{children:[k.jsx("h2",{children:n}),k.jsx("p",{children:"Stored locally in this browser."})]}),k.jsx("button",{className:"iconButton",onClick:r,children:"×"})]}),a]})})}function v_({job:n,refreshNonce:a}){return k.jsxs("div",{className:"jobMetricsGrid",children:[k.jsx("div",{className:"panel insetPanel",children:k.jsx(R_,{jobId:n==null?void 0:n.id,metricsDir:n==null?void 0:n.metrics_dir,refreshNonce:a})}),k.jsx("div",{className:"panel insetPanel",children:k.jsx(U_,{rows:(n==null?void 0:n.timeperf)||[]})})]})}function S_({events:n}){return k.jsx("div",{className:"agentEventList",children:n.map((a,r)=>a.type==="reasoning"?k.jsx(k_,{text:a.text},r):a.type==="content"?k.jsx(Bs,{text:a.text},r):a.type==="tool_call"?k.jsx(__,{call:a.call,live:a.live},r):a.type==="tool_result"?k.jsx(T_,{result:a.result},r):null)})}function Bs({text:n}){return k.jsx("div",{className:"markdownBlock",children:k.jsx(RS,{remarkPlugins:[Fk],children:n||""})})}function k_({text:n}){return k.jsxs("details",{className:"reasoningBlock",children:[k.jsxs("summary",{children:[k.jsx("span",{children:"✓"}),k.jsx("strong",{children:"Completed thinking"})]}),k.jsx(Bs,{text:n})]})}function __({call:n,live:a=!1}){const u=((n==null?void 0:n.function)||{}).name||(n==null?void 0:n.name)||"tool",s=A_(n);return k.jsxs("details",{className:kt("toolCallCard","toolCallDetails",a&&"live"),children:[k.jsxs("summary",{className:"toolCallHead",children:[k.jsx("span",{children:a?"calling":"tool call"}),k.jsx("b",{children:E_(u,s)}),k.jsx("em",{children:a?"running":""})]}),k.jsx("pre",{children:s})]})}function E_(n,a){const r=Pg(a);return!r||r==="{}"?`${n}()`:`${n}(${r})`}function A_(n){return(n.function||{}).arguments||n.arguments||JSON.stringify(n,null,2)}function T_({result:n}){const a=z_(n);return k.jsxs("details",{className:kt("toolCallCard","toolResultDetails",n.ok?"ok":"failed"),children:[k.jsxs("summary",{children:[k.jsx("span",{children:n.ok?"result":"error"}),k.jsxs("b",{children:[n.name||"unknown"," · ",n.ok?"ok":"failed"]}),k.jsx("em",{children:Pg(a)||"No output."})]}),k.jsx("pre",{children:a})]})}function Pg(n){return String(n||"").replace(/\s+/g," ").trim()}function z_(n){return n.error?n.error:Array.isArray(n.jobs)?n.jobs.map(a=>`${a.id} · ${a.kind} · ${a.status} · step ${a.step??0} · ${a.name}`).join(` -`)||"No jobs.":n.job?`${n.job.id} · ${n.job.kind} · ${n.job.status} · step ${n.job.step??0} -${n.job.name}`:n.env?`ready=${n.env.ready} · gpu=${n.env.gpu_summary||"n/a"} · cwd=${n.env.cwd||"n/a"}`:JSON.stringify(n,null,2)}function C_({env:n}){var m,p,d,x;const a=(n==null?void 0:n.checks)||[],r=(n==null?void 0:n.report)||{},u=r.dependencies||{},s=r.torch||{},h=r.platform||{},f=a.slice(0,12);return k.jsxs("section",{className:"runtimeDeck",children:[k.jsxs("div",{className:"runtimeHero",children:[k.jsx("div",{className:kt("readinessOrb",n!=null&&n.ready?"ready":"blocked"),children:n!=null&&n.ready?"OK":"!"}),k.jsxs("div",{children:[k.jsx("div",{className:"tinyLabel",children:"AReno check"}),k.jsx("h2",{children:n!=null&&n.ready?"Runtime ready for AReno tasks":"Runtime needs attention before heavy jobs"}),k.jsxs("p",{children:[((m=n==null?void 0:n.check_counts)==null?void 0:m.ok)??0," OK · ",((p=n==null?void 0:n.check_counts)==null?void 0:p.warn)??0," WARN · ",((d=n==null?void 0:n.check_counts)==null?void 0:d.fail)??0," FAIL"]})]})]}),k.jsxs("div",{className:"envFacts",children:[k.jsx(ru,{icon:k.jsx(Fg,{size:15}),label:"AReno",value:((x=r.areno)==null?void 0:x.version)||"unknown"}),k.jsx(ru,{icon:k.jsx(e_,{size:15}),label:"PyTorch",value:s.version||"missing"}),k.jsx(ru,{icon:k.jsx(ps,{size:15}),label:"CUDA",value:s.cuda_build||"none"}),k.jsx(ru,{icon:k.jsx(Kg,{size:15}),label:"Platform",value:`${h.system||"unknown"} ${h.machine||""}`})]}),k.jsx("div",{className:"checkMatrix",children:f.map(y=>k.jsxs("div",{className:kt("checkItem",y.status.toLowerCase()),children:[k.jsx("span",{children:y.status}),k.jsx("strong",{children:y.name}),k.jsx("small",{children:y.detail||y.next_step||"no detail"})]},y.name))}),k.jsx("div",{className:"dependencyStrip",children:Object.entries(u).map(([y,v])=>k.jsxs("div",{className:kt("depPill",v.imported?"ok":"warn"),children:[y,": ",v.imported?v.version||"imported":"missing"]},y))})]})}function w_({gpus:n}){return n.length?k.jsx("section",{className:"gpuDeck",children:n.map((a,r)=>{const u=Math.min(100,Math.max(0,Number(a.memory_used_mb||0)/Math.max(Number(a.memory_total_mb||1),1)*100)),s=Math.min(100,Math.max(0,Number(a.utilization||0)));return k.jsxs("div",{className:"gpuCard",children:[k.jsxs("div",{className:"gpuHead",children:[k.jsxs("strong",{children:["GPU ",r]}),k.jsx("span",{children:a.name})]}),k.jsxs("div",{className:"gpuMeter",children:[k.jsxs("div",{className:"gpuMeterLabel",children:[k.jsx("span",{children:"Memory"}),k.jsxs("b",{children:[a.memory_used_mb,"/",a.memory_total_mb," MB"]})]}),k.jsx("div",{className:"meterTrack",children:k.jsx("i",{style:{width:`${u}%`}})})]}),k.jsxs("div",{className:"gpuMeter",children:[k.jsxs("div",{className:"gpuMeterLabel",children:[k.jsx("span",{children:"Utilization"}),k.jsxs("b",{children:[s,"%"]})]}),k.jsx("div",{className:"meterTrack util",children:k.jsx("i",{style:{width:`${s}%`}})})]})]},`${a.name}-${r}`)})}):k.jsx("section",{className:"gpuDeck",children:k.jsx("div",{className:"panel",children:k.jsx(ty,{title:"No GPU detected",text:"nvidia-smi did not return device utilization."})})})}function ru({icon:n,label:a,value:r}){return k.jsxs("div",{className:"envFact",children:[k.jsx("span",{children:n}),k.jsxs("div",{children:[k.jsx("label",{children:a}),k.jsx("strong",{children:r})]})]})}function M_({job:n}){const a=ey(n),r=N_(n),u=Math.max(0,a.findIndex(s=>gs(s,r,n)));return k.jsx("div",{className:"timeline",children:a.map((s,h)=>k.jsxs("div",{className:kt("timelineItem",h<=u&&"done",gs(s,r,n)&&"current"),children:[k.jsx("span",{children:h+1}),k.jsx("label",{children:s.label})]},s.id))})}function ey(n){if((n==null?void 0:n.kind)==="serve")return[{id:"created",label:"created"},{id:"load",label:"load",aliases:["registered"]},{id:"serve",label:"serve",aliases:["running"]},{id:"exit",label:"exit",aliases:["exited","failed","succeeded","stopped"]}];const a=D_(n,"algo");return a==="sft"?[{id:"created",label:"created",aliases:["registered","epoch_start"]},{id:"train",label:"train",aliases:["train_start","train_end","train_skip"]},{id:"save",label:"save",aliases:["save_checkpoint_start","save_checkpoint_end"]},{id:"done",label:"done",aliases:["max_steps_reached","epoch_end","exited","failed","succeeded","stopped"]}]:a==="dpo"?[{id:"created",label:"created",aliases:["registered","epoch_start"]},{id:"ref_score",label:"ref score",aliases:["logprob_score_start","logprob_score_end"],roles:["ref"]},{id:"train",label:"train",aliases:["train_start","train_end","train_skip"]},{id:"save",label:"save",aliases:["save_checkpoint_start","save_checkpoint_end"]},{id:"done",label:"done",aliases:["max_steps_reached","epoch_end","exited","failed","succeeded","stopped"]}]:a==="ppo"?[{id:"created",label:"created",aliases:["registered","epoch_start"]},{id:"rollout",label:"rollout",aliases:["rollout_start","rollout_end"],roles:["actor"]},{id:"reward",label:"reward",aliases:["score_start","score_end"],roles:["reward"]},{id:"ref_score",label:"ref score",aliases:["logprob_score_start","logprob_score_end"],roles:["ref"]},{id:"old_logprob",label:"old logprob",aliases:["old_logprob_score_start","old_logprob_score_end"],roles:["actor"]},{id:"critic_value",label:"value",aliases:["value_score_start","value_score_end"],roles:["critic"]},{id:"advantage",label:"advantage",aliases:["advantage_start","advantage_end"],roles:["critic"]},{id:"critic_train",label:"critic train",aliases:["train_start","train_end"],roles:["critic"]},{id:"actor_train",label:"actor train",aliases:["train_start","train_end","train_skip"],roles:["actor"]},{id:"save",label:"save",aliases:["save_checkpoint_start","save_checkpoint_end"]},{id:"done",label:"done",aliases:["max_steps_reached","epoch_end","exited","failed","succeeded","stopped"]}]:[{id:"created",label:"created",aliases:["registered","epoch_start"]},{id:"rollout",label:"rollout",aliases:["rollout_start","rollout_end"]},{id:"score",label:"score",aliases:["score_start","score_end","reward_score_start","reward_score_end","logprob_score_start","logprob_score_end","old_logprob_score_start","old_logprob_score_end","value_score_start","value_score_end"]},{id:"train",label:"train",aliases:["train_start","train_end","train_skip"]},{id:"save",label:"save",aliases:["save_checkpoint_start","save_checkpoint_end"]},{id:"done",label:"done",aliases:["max_steps_reached","epoch_end","exited","failed","succeeded","stopped"]}]}function N_(n){if(n!=null&&n.status&&["succeeded","failed","stopped","exited"].includes(n.status))return"done";const a=String((n==null?void 0:n.stage)||"created"),u=ey(n).find(s=>gs(s,a,n));return(u==null?void 0:u.id)||a}function gs(n,a,r){var s,h;return n.id===a||((s=n.aliases)==null?void 0:s.includes(a))?(h=n.roles)!=null&&h.length?n.roles.includes(String((r==null?void 0:r.role)||"")):!0:!1}function D_(n,a){const r=n!=null&&n.config&&Object.keys(n.config).length?n.config:(n==null?void 0:n.launch)||{};if(r[a]!==void 0)return r[a];for(const u of r.sections||[]){const s=(u.items||[]).find(h=>h.key===a);if(s)return s.value}}function O_(n){return(n||[]).map(a=>a.name).sort()}function j_(n,a){return a&&n.includes(a)?a:n[0]||""}function R_({jobId:n,metricsDir:a,refreshNonce:r}){const[u,s]=be.useState(""),[h,f]=be.useState(.6),[m,p]=be.useState([]),[d,x]=be.useState([]),[y,v]=be.useState(!1),[S,C]=be.useState(n);n!==S&&(C(n),s(""),p([]),x([]),v(!1));const U=O_(m),V=j_(U,u);be.useEffect(()=>{let ee=!1;if(n)return yl(`/api/jobs/${n}/metrics`).then(L=>{if(ee)return;const J=L.metrics||[];p(J),s(he=>{var xe;return he||((xe=J[0])==null?void 0:xe.name)||""})}).catch(()=>{ee||p([])}),()=>{ee=!0}},[n,r]),be.useEffect(()=>{let ee=!1;if(!n||!V){x([]),v(!1);return}return v(!0),yl(`/api/jobs/${n}/metric?name=${encodeURIComponent(V)}&limit=500`).then(L=>{ee||x((L.points||[]).filter(J=>Number.isFinite(Number(J.value))).map(J=>({...J,step:Number(J.step||0),value:Number(J.value)})))}).catch(()=>{ee||x([])}).finally(()=>{ee||v(!1)}),()=>{ee=!0}},[n,V,r]);const O=V,K=d.slice(-240),X=L_(K,h),ae=B_(K,X);return k.jsxs("div",{className:"chart",children:[k.jsxs("div",{className:"chartHeader",children:[k.jsxs("span",{children:[k.jsx(Zg,{size:14})," TensorBoard scalars"]}),k.jsxs("div",{className:"chartControls",children:[k.jsx("select",{value:O,onChange:ee=>s(ee.target.value),children:U.length===0?k.jsx("option",{value:"",children:"no metrics"}):U.map(ee=>k.jsx("option",{children:ee},ee))}),k.jsxs("label",{children:["smooth ",h.toFixed(2),k.jsx("input",{type:"range",min:"0",max:"0.99",step:"0.01",value:h,onChange:ee=>f(Number(ee.target.value))})]})]})]}),K.length===0?k.jsx("div",{className:"plotEmpty",children:y?"Loading selected metric...":"No TensorBoard scalar points loaded yet."}):k.jsxs("svg",{className:"metricPlot",viewBox:"0 0 720 180",role:"img",children:[k.jsx("g",{className:"plotGrid",children:[0,1,2,3].map(ee=>k.jsx("line",{x1:"0",x2:"720",y1:30+ee*42,y2:30+ee*42},ee))}),k.jsx("polyline",{className:"rawLine",points:ae.raw}),k.jsx("polyline",{className:"smoothLine",points:ae.smooth}),K.slice(-24).map((ee,L)=>{var J,he;return k.jsx("circle",{cx:((J=ae.coords[L+Math.max(0,K.length-24)])==null?void 0:J.x)||0,cy:((he=ae.coords[L+Math.max(0,K.length-24)])==null?void 0:he.y)||0,r:"2.2",children:k.jsx("title",{children:`${O} step ${ee.step}: ${ee.value}`})},`${ee.step}-${L}`)})]}),k.jsxs("div",{className:"plotFooter",children:[k.jsxs("span",{children:[O||"metric"," · ",d.length," points"]}),k.jsxs("span",{children:[a||"no metrics dir"," · ",ae.minLabel," to ",ae.maxLabel]})]})]})}function L_(n,a){if(!n.length)return[];const r=Math.min(Math.max(Number(a)||0,0),.999);let u=n[0].value;return n.map(s=>(u=u*r+s.value*(1-r),{...s,value:u}))}function B_(n,a){if(!n.length)return{raw:"",smooth:"",coords:[],minLabel:"n/a",maxLabel:"n/a"};const r=[...n,...a].map(v=>v.value),u=Math.min(...r),s=Math.max(...r),h=Math.max(s-u,1e-9),f=n[0].step,m=n[n.length-1].step,p=Math.max(m-f,1),d=v=>({x:(v.step-f)/p*700+10,y:168-(v.value-u)/h*146}),x=n.map(d),y=a.map(d);return{raw:x.map(v=>`${v.x.toFixed(1)},${v.y.toFixed(1)}`).join(" "),smooth:y.map(v=>`${v.x.toFixed(1)},${v.y.toFixed(1)}`).join(" "),coords:x,minLabel:Lp(u),maxLabel:Lp(s)}}function Lp(n){return Number.isFinite(n)?Math.abs(n)>=1e3||Math.abs(n)<.001?n.toExponential(2):n.toFixed(4).replace(/0+$/,"").replace(/\.$/,""):"n/a"}function U_({rows:n}){const a=H_(n||[],7).reverse(),r=n!=null&&n.length?n.reduce((h,f)=>h+Number(f.total_s||0),0)/n.length:0,u=Math.max(1,...a.map(h=>Number(h.total_s||0))),s=Array.from(new Set((n||[]).flatMap(h=>(h.segments||[]).map(f=>f.name)))).slice(0,8);return k.jsxs("div",{className:"timePerf",children:[k.jsxs("div",{className:"timePerfHeader",children:[k.jsx("div",{children:k.jsxs("div",{className:"codeTitle inline",children:[k.jsx(o_,{size:14})," Runtime timeperf"]})}),k.jsxs("div",{className:"legend",children:[s.map(h=>k.jsxs("span",{children:[k.jsx("i",{className:Bp(h)})," ",h]},h)),k.jsxs("b",{children:["avg ",r?`${r.toFixed(1)}s`:"n/a"]})]})]}),a.length===0?k.jsx("div",{className:"sampleEmpty",children:"No step timing captured yet."}):k.jsx("div",{className:"timeRows",children:a.map(h=>{var d;const f=Number(h.total_s||0),m=Math.max(10,f/u*100),p=(d=h.segments)!=null&&d.length?h.segments:[];return k.jsxs("div",{className:"timeRow",children:[k.jsxs("label",{children:["step ",h.step]}),k.jsx("div",{className:"timeTrack",children:k.jsx("div",{className:"timeStack",style:{width:`${m}%`},children:p.map(x=>{const y=Number(x.seconds||0),v=y/Math.max(f,1)*100;return k.jsx("span",{className:Bp(x.name),style:{width:`${v}%`},title:`${x.name}: ${y.toFixed(1)}s`,children:v>11?`${y.toFixed(1)}s`:""},x.name)})})}),k.jsxs("strong",{children:[f.toFixed(1),"s"]})]},`${h.step}-${h.time}`)})})]})}function H_(n,a){if(n.length<=a)return n.slice();const r=n.length-1,u=new Set;for(let s=0;ss-h).slice(-a).map(s=>n[s])}function Bp(n){return`seg-${String(n||"other").replace(/[^a-zA-Z0-9]+/g,"-")}`}function q_({samples:n}){const a=be.useMemo(()=>[...n||[]].sort((y,v)=>Number(y.step||0)-Number(v.step||0)||Number(y.prompt_idx||0)-Number(v.prompt_idx||0)||Number(y.sample_idx||0)-Number(v.sample_idx||0)),[n]),r=be.useMemo(()=>Array.from(new Set(a.map(y=>Number(y.step||0)))).sort((y,v)=>v-y),[a]),[u,s]=be.useState(""),[h,f]=be.useState("");be.useEffect(()=>{if(!r.length){s(""),f("");return}(u===""||!r.includes(Number(u)))&&(s(String(r[0])),f(""))},[u,r]);const p=(u===""?[]:a.filter(y=>Number(y.step||0)===Number(u))).map((y,v)=>({key:Y_(y,v),label:`prompt ${y.prompt_idx??"?"} · sample ${y.sample_idx??"?"}`,sample:y})),d=p.find(y=>y.key===h)||p[p.length-1]||null,x=(d==null?void 0:d.sample)||null;return k.jsxs("div",{className:"sampleCard",children:[k.jsxs("div",{className:"codeTitle sampleTitle",children:[k.jsxs("span",{children:[k.jsx(Fg,{size:14})," Rollout sample"]}),!!a.length&&k.jsxs("div",{className:"sampleControls",children:[k.jsx("select",{value:u,onChange:y=>{s(y.target.value),f("")},children:r.map(y=>k.jsxs("option",{value:y,children:["step ",y]},y))}),k.jsx("select",{value:(d==null?void 0:d.key)||"",onChange:y=>f(y.target.value),children:p.map(y=>k.jsx("option",{value:y.key,children:y.label},y.key))})]})]}),x?k.jsxs("div",{className:"sampleGrid",children:[k.jsxs("div",{children:[k.jsx("span",{children:"Prompt"}),k.jsx("p",{children:x.prompt||"n/a"})]}),k.jsxs("div",{children:[k.jsx("span",{children:"Completion"}),k.jsx("p",{children:x.completion||"n/a"})]})]}):k.jsx("div",{className:"sampleEmpty",children:"No rollout sample captured yet."})]})}function Y_(n,a){return`${n.step??"x"}-${n.prompt_idx??"x"}-${n.sample_idx??"x"}-${a}`}function G_({config:n,launch:a}){const r=n&&Object.keys(n).length?n:a||{},u=V_(r);return k.jsxs("div",{className:"codeCard",children:[k.jsxs("div",{className:"codeTitle",children:[k.jsx(Ig,{size:14})," Config"]}),u.length>0?k.jsx("div",{className:"configSections",children:u.map(s=>k.jsxs("div",{className:"configSection",children:[k.jsx("h3",{children:s.title}),k.jsx("div",{className:"configGrid",children:s.items.map(({key:h,value:f})=>k.jsxs("div",{className:"configItem",children:[k.jsx("span",{children:h.replace(/_/g," ")}),k.jsx("strong",{children:Q_(f)})]},h))})]},s.title))}):k.jsx("pre",{children:"No config captured yet."})]})}function V_(n){if(Array.isArray(n==null?void 0:n.sections))return n.sections.map(r=>({title:r.title||"Config",items:(r.items||[]).filter(({value:u})=>u!=null&&u!=="")})).filter(r=>r.items.length>0);const a=Object.entries(n||{}).filter(([,r])=>r!=null&&r!=="").map(([r,u])=>({key:r,value:u}));return a.length?[{title:"Launch",items:a}]:[]}function Q_(n){return Array.isArray(n)?n.join(" "):typeof n=="object"?JSON.stringify(n):String(n)}function X_({logs:n}){const a=be.useRef(null);return be.useEffect(()=>{const r=a.current;r&&(r.scrollTop=r.scrollHeight)},[n.length]),k.jsxs("div",{className:"codeCard",ref:a,children:[k.jsxs("div",{className:"codeTitle",children:[k.jsx(u_,{size:14})," Logs"]}),k.jsx("pre",{children:n.slice(-80).join(` -`)||"No logs yet."})]})}function Z_({config:n,setConfig:a,onStart:r}){const u=String(n.algo||"sft").toLowerCase(),s=K_(u),h=(f,m)=>a({...n,[f]:m});return k.jsxs("div",{className:"launcherSections",children:[s.map(f=>k.jsxs("div",{className:"launcherSection",children:[k.jsxs("div",{className:"launcherSectionHeader",children:[k.jsx("strong",{children:f.title}),f.note&&k.jsx("span",{children:f.note})]}),k.jsx("div",{className:"formGrid",children:f.fields.map(m=>k.jsx(du,{label:m.label,value:n[m.key],onChange:p=>h(m.key,p),compact:m.compact,type:m.type,options:m.options},m.key))})]},f.title)),k.jsxs("button",{className:"primaryButton launchButton wide",onClick:r,children:[k.jsx(Ls,{size:16})," Start train"]})]})}function K_(n){const a=["gspo","grpo","ppo"].includes(n),r=a,u=n==="dpo",s=n==="ppo",h=n==="gspo",f=n==="grpo",m=[{title:"Basic",note:"model, data, and trainer loop",fields:[ls("algo","Algorithm",["sft","dpo","gspo","grpo","ppo"],!0),me("ckpt","Checkpoint"),ls("model_hub","Model hub",["modelscope","hf"],!0),me("dataset_path","Dataset path"),me("dataset_loader_fn","Dataset loader"),me("epochs","Epochs",!0),me("max_steps","Max steps",!0)]},{title:"Runtime",note:"parallelism, memory, and kernels",fields:[me("world_size","World",!0),me("tp_size","TP",!0),ls("attn_backend","Attention",["flash","native"],!0),Hn("activation_checkpointing","Activation ckpt"),Hn("drop_rollout_state","Drop rollout state"),Hn("eager_decode","Eager decode"),Hn("disable_thinking","Disable thinking")]},{title:"Batching",note:"controls train and rollout memory",fields:[me("batch_size","Batch",!0),...a?[me("n_samples","Samples",!0),me("max_running_prompts","Running prompts",!0)]:[],me("mini_bs","Mini BS",!0),me("score_micro_bs","Score micro BS",!0),me("gradient_accumulation_steps","Grad accum",!0)]},{title:a?"Rollout":"Sequence",note:a?"generation and sampling":"token limits for supervised data",fields:[me("max_prompt_tokens","Prompt tokens",!0),me("max_new_tokens","New tokens",!0),...r?[me("max_context_len","Context",!0),me("agent_fn","Agent fn"),me("agent_timeout_s","Agent timeout",!0),Hn("train_tool_results","Train tool results")]:[],...a?[me("temperature","Temp",!0),me("top_k","Top K",!0),me("top_p","Top P",!0),Hn("greedy","Greedy")]:[]]},{title:"Optimizer",note:"policy optimizer settings",fields:[me("lr","LR",!0),me("min_lr","Min LR",!0),me("lr_decay_steps","Decay steps",!0),me("lr_decay_style","Decay style",!0),me("adam_beta1","Adam beta1",!0),me("adam_beta2","Adam beta2",!0),me("weight_decay","Weight decay",!0),me("grad_clip_norm","Grad clip",!0),Hn("adam_8bit","8-bit Adam")]}],p=[];return(u||s)&&p.push(me("ref_ckpt","Reference ckpt")),a&&p.push(me("reward_fn_path","Reward fn")),s&&p.push(me("reward_ckpt","Reward ckpt"),me("critic_ckpt","Critic ckpt"),me("critic_lr","Critic LR",!0),me("critic_warmup_steps","Critic warmup",!0)),h&&p.push(me("gspo_clip_eps","GSPO clip",!0)),f&&p.push(me("grpo_clip_eps","GRPO clip",!0)),u&&p.push(me("dpo_beta","DPO beta",!0)),s&&p.push(Hn("use_kl_loss","Use KL loss"),me("kl_loss_coef","KL coef",!0),me("kl_loss_type","KL type",!0),me("clip_eps","Clip eps",!0),me("clip_ratio_c","Clip ratio C",!0),me("value_clip_eps","Value clip",!0),me("value_loss_coef","Value coef",!0),me("gamma","Gamma",!0),me("lam","Lambda",!0)),p.length>0&&m.push({title:"Algorithm",note:`${n.toUpperCase()}-specific roles and loss`,fields:p}),m.push({title:"Probe",note:"optional smoke and auto tune helpers",fields:[Hn("tune_params","Tune params"),me("mem_frac","Memory frac",!0),me("tune_max_samples","Tune samples",!0)]},{title:"Output",note:"checkpointing, metrics, and escape hatch",fields:[me("save_path","Save path"),me("save_interval","Save interval",!0),me("metrics_dir","Metrics dir"),me("extra_args","Extra args")]}),m}function me(n,a,r=!1){return{key:n,label:a,compact:r}}function ls(n,a,r,u=!1){return{key:n,label:a,compact:u,type:"select",options:r}}function Hn(n,a){return{key:n,label:a,compact:!0,type:"checkbox"}}function F_({config:n,setConfig:a,onStart:r}){return k.jsxs("div",{className:"formGrid",children:[[["model_path","Model path"],["model_hub","Model hub"],["host","Host"],["port","Port"],["world_size","World"],["tp_size","TP"],["max_running_prompts","Running prompts"],["default_max_tokens","Default max tokens"],["decode_progress_interval_s","Progress interval"],["attn_backend","Attention backend"],["eager_decode","Eager decode"],["disable_thinking","Disable thinking"],["extra_args","Extra args"]].map(([u,s])=>k.jsx(du,{label:s,value:n[u],onChange:h=>a({...n,[u]:h}),compact:u!=="model_path"},u)),k.jsxs("button",{className:"primaryButton launchButton wide",onClick:r,children:[k.jsx(Ls,{size:16})," Start serve"]})]})}function du({label:n,value:a,onChange:r,compact:u,type:s="text",options:h=[]}){return s==="checkbox"?k.jsxs("label",{className:kt("field","compact","checkField"),children:[k.jsx("input",{type:"checkbox",checked:!!a,onChange:f=>r(f.target.checked)}),k.jsx("span",{children:n})]}):k.jsxs("label",{className:kt("field",u&&"compact"),children:[k.jsx("span",{children:n}),s==="select"?k.jsx("select",{value:a??"",onChange:f=>r(f.target.value),children:h.map(f=>k.jsx("option",{value:f,children:f},f))}):k.jsx("input",{value:a??"",onChange:f=>r(f.target.value)})]})}function ty({title:n,text:a}){return k.jsxs("div",{className:"empty",children:[k.jsx(Kg,{size:18}),k.jsx("strong",{children:n}),k.jsx("span",{children:a})]})}const Up=typeof document<"u"?document.getElementById("root"):null;Up&&E0.createRoot(Up).render(k.jsx(g_,{})); diff --git a/areno/dashboard/dist/index.html b/areno/dashboard/dist/index.html index b3a17010..0e75e175 100644 --- a/areno/dashboard/dist/index.html +++ b/areno/dashboard/dist/index.html @@ -4,8 +4,8 @@ AReno Dashboard - - + +
diff --git a/areno/dashboard/launcher.py b/areno/dashboard/launcher.py new file mode 100644 index 00000000..5a692c30 --- /dev/null +++ b/areno/dashboard/launcher.py @@ -0,0 +1,266 @@ +"""Validation and preview helpers for dashboard launcher submissions.""" + +from __future__ import annotations + +import shlex +from pathlib import Path +from typing import Any, Callable + +CommandBuilder = Callable[[dict[str, Any]], list[str]] + + +def preview_launcher( + kind: str, + config: dict[str, Any], + command_builder: CommandBuilder, + *, + acknowledge_warnings: bool = False, +) -> dict[str, Any]: + """Resolve a launcher config without starting a process or loading weights.""" + + normalized = dict(config) + errors: list[dict[str, str]] = [] + warnings: list[dict[str, str]] = [] + if kind not in {"train", "serve"}: + errors.append({"field": "kind", "message": "must be train or serve"}) + if kind == "train": + _validate_train(normalized, errors, warnings) + elif kind == "serve": + _validate_serve(normalized, errors, warnings) + try: + command = command_builder(normalized) + except (TypeError, ValueError) as exc: + errors.append( + {"field": "extra_args", "message": f"invalid shell arguments: {exc}"} + ) + command = [] + shell_command = shlex.join(command) if not errors else "" + return { + "ok": not errors and (acknowledge_warnings or not warnings), + "kind": kind, + "resolved_args": normalized, + "command": command, + "shell_command": shell_command, + "errors": errors, + "warnings": warnings, + "requires_acknowledgement": bool(warnings) and not acknowledge_warnings, + } + + +def _validate_train( + config: dict[str, Any], errors: list[dict[str, str]], warnings: list[dict[str, str]] +) -> None: + _required(config, "ckpt", errors) + _required(config, "dataset_path", errors) + _validate_local_reference(config.get("ckpt"), "ckpt", errors, warnings) + _validate_local_reference( + config.get("dataset_path"), "dataset_path", errors, warnings + ) + _validate_positive_fields( + config, + ( + "epochs", + "max_steps", + "world_size", + "tp_size", + "batch_size", + "mini_bs", + "score_micro_bs", + "gradient_accumulation_steps", + "max_prompt_tokens", + "max_new_tokens", + "save_interval", + "tune_max_samples", + ), + errors, + ) + _validate_positive_fields(config, ("n_samples", "max_running_prompts"), errors) + _validate_positive_fields( + config, ("lr", "temperature", "top_p", "agent_timeout_s"), errors + ) + _validate_gpu_topology(config, errors) + _validate_parallelism(config, errors) + if config.get("model_hub", "modelscope") not in {"hf", "modelscope"}: + errors.append({"field": "model_hub", "message": "must be hf or modelscope"}) + if config.get("algo", "sft").lower() == "sft" and not config.get( + "dataset_loader_fn" + ): + errors.append({"field": "dataset_loader_fn", "message": "is required for sft"}) + if config.get("algo", "sft").lower() in {"gspo", "grpo", "ppo"} and not ( + config.get("reward_fn_path") or config.get("reward_ckpt") + ): + errors.append( + { + "field": "reward_fn_path", + "message": "a reward function or reward checkpoint is required", + } + ) + if config.get("smoke_infer") and config.get("smoke_train"): + errors.append( + { + "field": "smoke_train", + "message": "smoke_infer and smoke_train are mutually exclusive", + } + ) + _validate_range( + config, "top_p", errors, minimum=0, maximum=1, minimum_inclusive=False + ) + _validate_range( + config, "mem_frac", errors, minimum=0, maximum=1, minimum_inclusive=False + ) + if config.get("greedy") and config.get("temperature") not in (None, "", 0, 1, 1.0): + warnings.append( + {"field": "temperature", "message": "greedy decoding ignores temperature"} + ) + if not config.get("save_path") and not config.get("save_dir"): + warnings.append( + {"field": "save_path", "message": "no checkpoint output path is configured"} + ) + + +def _validate_serve( + config: dict[str, Any], errors: list[dict[str, str]], warnings: list[dict[str, str]] +) -> None: + _required(config, "model_path", errors) + _validate_local_reference(config.get("model_path"), "model_path", errors, warnings) + _validate_positive_fields( + config, + ("port", "world_size", "tp_size", "max_running_prompts", "default_max_tokens"), + errors, + ) + _validate_gpu_topology(config, errors) + _validate_parallelism(config, errors) + _validate_range(config, "port", errors, minimum=1, maximum=65535) + if config.get("model_hub", "modelscope") not in {"hf", "modelscope"}: + errors.append({"field": "model_hub", "message": "must be hf or modelscope"}) + if config.get("host") in {"", None}: + errors.append({"field": "host", "message": "must not be empty"}) + + +def _required(config: dict[str, Any], field: str, errors: list[dict[str, str]]) -> None: + if config.get(field) in (None, ""): + errors.append({"field": field, "message": "is required"}) + + +def _validate_positive_fields( + config: dict[str, Any], fields: tuple[str, ...], errors: list[dict[str, str]] +) -> None: + for field in fields: + value = config.get(field) + if value in (None, ""): + continue + try: + if float(value) <= 0: + raise ValueError + except (TypeError, ValueError): + errors.append({"field": field, "message": "must be positive"}) + + +def _validate_gpu_topology( + config: dict[str, Any], errors: list[dict[str, str]] +) -> None: + devices = config.get("train_devices") + if devices in (None, ""): + return + if isinstance(devices, str): + try: + devices = [part.strip() for part in devices.split(",") if part.strip()] + devices = [int(item) for item in devices] + except ValueError: + errors.append( + { + "field": "train_devices", + "message": "must contain integer GPU indices", + } + ) + return + if not isinstance(devices, list) or any( + not isinstance(item, int) or item < 0 for item in devices + ): + errors.append( + { + "field": "train_devices", + "message": "must contain non-negative GPU indices", + } + ) + return + if len(devices) != len(set(devices)): + errors.append( + { + "field": "train_devices", + "message": "must not contain duplicate GPU indices", + } + ) + try: + world_size = int(config.get("world_size", 1)) + except (TypeError, ValueError): + return + if len(devices) != world_size: + errors.append( + {"field": "world_size", "message": "must equal the number of train_devices"} + ) + + +def _validate_parallelism(config: dict[str, Any], errors: list[dict[str, str]]) -> None: + raw_world_size = config.get("world_size", 1) + raw_tp_size = config.get("tp_size", 1) + try: + world_size = int(raw_world_size) + tp_size = int(raw_tp_size) + world_size_number = float(raw_world_size) + tp_size_number = float(raw_tp_size) + except (TypeError, ValueError): + return + if world_size != world_size_number: + errors.append({"field": "world_size", "message": "must be an integer"}) + return + if tp_size != tp_size_number: + errors.append({"field": "tp_size", "message": "must be an integer"}) + return + if world_size > 0 and tp_size > 0 and world_size % tp_size != 0: + errors.append({"field": "tp_size", "message": "must divide world_size"}) + + +def _validate_range( + config: dict[str, Any], + field: str, + errors: list[dict[str, str]], + *, + minimum: float, + maximum: float, + minimum_inclusive: bool = True, +) -> None: + value = config.get(field) + if value in (None, ""): + return + try: + number = float(value) + except (TypeError, ValueError): + return + minimum_ok = number >= minimum if minimum_inclusive else number > minimum + if not minimum_ok or number > maximum: + left = "[" if minimum_inclusive else "(" + errors.append( + {"field": field, "message": f"must be in {left}{minimum}, {maximum}]"} + ) + + +def _validate_local_reference( + value: Any, field: str, errors: list[dict[str, str]], warnings: list[dict[str, str]] +) -> None: + if value in (None, ""): + return + text = str(value) + path = Path(text).expanduser() + if path.is_absolute() or text.startswith(".") or path.exists(): + if not path.exists(): + errors.append( + {"field": field, "message": f"local path does not exist: {text}"} + ) + else: + warnings.append( + { + "field": field, + "message": "remote reference is not resolved during preview", + } + ) diff --git a/areno/dashboard/server.py b/areno/dashboard/server.py index 9bb8b4d4..a62fd620 100644 --- a/areno/dashboard/server.py +++ b/areno/dashboard/server.py @@ -27,6 +27,7 @@ from areno.cli.diagnostics import collect_env, run_checks from areno.dashboard.agent_context import agent_system_prompt from areno.dashboard.agent_files import AgentFileBrowser +from areno.dashboard.launcher import preview_launcher ROOT = Path(os.environ.get("ARENO_DASHBOARD_ROOT", Path.cwd())).resolve() STATIC_DIR = Path(__file__).resolve().parent / "dist" @@ -592,6 +593,12 @@ def _save_state(self) -> None: STATE = DashboardState() +def _format_devices(value: Any) -> Any: + if isinstance(value, list): + return ",".join(str(device) for device in value) + return value + + def build_train_command(config: dict[str, Any]) -> list[str]: command = ["areno", "train"] pairs = { @@ -607,6 +614,7 @@ def build_train_command(config: dict[str, Any]) -> list[str]: "--agent-fn": config.get("agent_fn"), "--world-size": config.get("world_size"), "--tp-size": config.get("tp_size"), + "--train-devices": _format_devices(config.get("train_devices")), "--batch-size": config.get("batch_size"), "--n-samples": config.get("n_samples"), "--mini-bs": config.get("mini_bs"), @@ -673,7 +681,7 @@ def build_train_command(config: dict[str, Any]) -> list[str]: for key, value in flags.items(): if bool_like(value): command.append(key) - command.extend(str(config.get("extra_args") or "").split()) + command.extend(shlex.split(str(config.get("extra_args") or ""))) return command @@ -721,10 +729,21 @@ def build_serve_command(config: dict[str, Any]) -> list[str]: command.append("--eager-decode") if bool_like(config.get("disable_thinking")): command.append("--disable-thinking") - command.extend(str(config.get("extra_args") or "").split()) + command.extend(shlex.split(str(config.get("extra_args") or ""))) return command +def launcher_preview(kind: str, payload: dict[str, Any]) -> dict[str, Any]: + config = payload.get("config") if isinstance(payload.get("config"), dict) else payload + builder = build_train_command if kind == "train" else build_serve_command + return preview_launcher( + kind, + config, + builder, + acknowledge_warnings=bool(payload.get("acknowledge_warnings")), + ) + + def detect_areno_job_kind(command: str) -> str | None: """Detect train/serve AReno commands started outside the dashboard server.""" @@ -1515,7 +1534,18 @@ def do_POST(self) -> None: try: path = self.route_path() payload = self.read_json() - if path == "/api/jobs/train": + if path == "/api/launcher/preview": + kind = str(payload.get("kind") or "") + result = launcher_preview(kind, payload) + self.json(result) + elif path == "/api/jobs/train": + result = launcher_preview("train", payload) + if result["errors"]: + self.json({"preview": result}, HTTPStatus.BAD_REQUEST) + return + if result["requires_acknowledgement"]: + self.json({"preview": result}, HTTPStatus.CONFLICT) + return job = Job( kind="train", name=f"train {payload.get('algo', 'sft')} {payload.get('ckpt', '')}", @@ -1525,6 +1555,13 @@ def do_POST(self) -> None: ) self.json({"job": STATE.start(job).to_json()}) elif path == "/api/jobs/serve": + result = launcher_preview("serve", payload) + if result["errors"]: + self.json({"preview": result}, HTTPStatus.BAD_REQUEST) + return + if result["requires_acknowledgement"]: + self.json({"preview": result}, HTTPStatus.CONFLICT) + return model_path = payload.get("model_path") or payload.get("ckpt", "") job = Job( kind="serve", diff --git a/dashboard/src/main.jsx b/dashboard/src/main.jsx index e5c110fd..fc7b2303 100644 --- a/dashboard/src/main.jsx +++ b/dashboard/src/main.jsx @@ -213,6 +213,8 @@ function App() { const [launcherMode, setLauncherMode] = useState("train"); const [theme, setTheme] = useState(() => localStorage.getItem("areno-dashboard-theme") || "dark"); const [busy, setBusy] = useState(""); + const [launcherPreview, setLauncherPreview] = useState(null); + const [launcherWarningsAcknowledged, setLauncherWarningsAcknowledged] = useState(false); const [agentSettingsOpen, setAgentSettingsOpen] = useState(false); const [jobPage, setJobPage] = useState(1); const [refreshNonce, setRefreshNonce] = useState(0); @@ -242,6 +244,11 @@ function App() { if (jobPage > jobPageCount) setJobPage(jobPageCount); }, [jobPage, jobPageCount]); + useEffect(() => { + setLauncherPreview(null); + setLauncherWarningsAcknowledged(false); + }, [trainConfig, serveConfig, launcherMode]); + useEffect(() => { document.documentElement.dataset.theme = theme; localStorage.setItem("areno-dashboard-theme", theme); @@ -299,10 +306,22 @@ function App() { agent: ["Agent Console", "Chat with an operations agent using the selected job context."], }; + async function previewLaunch(kind, config) { + const result = await api("/api/launcher/preview", { + method: "POST", + body: JSON.stringify({ kind, config, acknowledge_warnings: launcherWarningsAcknowledged }), + }); + setLauncherPreview(result); + return result; + } + async function startTrain() { - setBusy("Starting train job..."); + setBusy("Validating train job..."); try { - const result = await api("/api/jobs/train", { method: "POST", body: JSON.stringify(trainConfig) }); + const preview = await previewLaunch("train", trainConfig); + if (!preview.ok) return; + const payload = { ...trainConfig, acknowledge_warnings: true }; + const result = await api("/api/jobs/train", { method: "POST", body: JSON.stringify(payload) }); setSelectedJobId(result.job.id); await jobs.refresh(); } finally { @@ -311,9 +330,12 @@ function App() { } async function startServe() { - setBusy("Starting serve job..."); + setBusy("Validating serve job..."); try { - const result = await api("/api/jobs/serve", { method: "POST", body: JSON.stringify(serveConfig) }); + const preview = await previewLaunch("serve", serveConfig); + if (!preview.ok) return; + const payload = { ...serveConfig, acknowledge_warnings: true }; + const result = await api("/api/jobs/serve", { method: "POST", body: JSON.stringify(payload) }); setSelectedJobId(result.job.id); await jobs.refresh(); } finally { @@ -534,10 +556,11 @@ function App() { {launcherMode === "train" ? ( - + previewLaunch("train", trainConfig)} /> ) : ( - + previewLaunch("serve", serveConfig)} /> )} + ); } @@ -1490,7 +1513,21 @@ function LogView({ logs }) { ); } -function TrainForm({ config, setConfig, onStart }) { +function LauncherPreview({ result, acknowledged, onAcknowledge }) { + if (!result) return null; + const issues = [...result.errors.map((item) => ({ ...item, level: "error" })), ...result.warnings.map((item) => ({ ...item, level: "warning" }))]; + return ( +
+
Validation{result.errors.length ? "Blocked" : result.requires_acknowledgement ? "Acknowledgement required" : "Ready"}
+ {issues.length > 0 &&
{issues.map((item, index) =>
{item.field}{item.message}
)}
} + {result.warnings.length > 0 && } + {result.shell_command &&
Final command
{result.shell_command}
} +
Resolved arguments
{JSON.stringify(result.resolved_args, null, 2)}
+
+ ); +} + +function TrainForm({ config, setConfig, onStart, onPreview }) { const algo = String(config.algo || "sft").toLowerCase(); const sections = trainLauncherSections(algo); const updateField = (key, value) => setConfig({ ...config, [key]: value }); @@ -1517,7 +1554,7 @@ function TrainForm({ config, setConfig, onStart }) { ))} - +
); } @@ -1654,7 +1691,7 @@ function checkField(key, label) { return { key, label, compact: true, type: "checkbox" }; } -function ServeForm({ config, setConfig, onStart }) { +function ServeForm({ config, setConfig, onStart, onPreview }) { return (
{[ @@ -1672,7 +1709,7 @@ function ServeForm({ config, setConfig, onStart }) { ["disable_thinking", "Disable thinking"], ["extra_args", "Extra args"], ].map(([key, label]) => setConfig({ ...config, [key]: value })} compact={key !== "model_path"} />)} - +
); } diff --git a/dashboard/src/styles.css b/dashboard/src/styles.css index 6511695d..7c2f3e19 100644 --- a/dashboard/src/styles.css +++ b/dashboard/src/styles.css @@ -1160,6 +1160,65 @@ pre { font-weight: 700; } +.launcherPreview { + display: grid; + gap: 12px; + padding-top: 16px; + border-top: 1px solid var(--deck-line); +} + +.launcherActions { + display: flex; + justify-content: flex-end; + gap: 8px; + grid-column: 1 / -1; +} + +.validationIssues { + display: grid; + gap: 6px; +} + +.validationIssue { + display: grid; + grid-template-columns: minmax(120px, 0.25fr) 1fr; + gap: 12px; + padding: 8px 10px; + border-left: 3px solid var(--deck-muted); + background: var(--deck-panel-2); + color: var(--deck-text); + font-size: 12px; +} + +.validationIssue.error { border-left-color: #ef6262; } +.validationIssue.warning { border-left-color: #e9b949; } +.validationIssue span { overflow-wrap: anywhere; } + +.warningAck { + display: inline-flex; + align-items: center; + gap: 8px; + color: var(--deck-text); + font-size: 12px; +} + +.warningAck input { width: auto; } + +.resolvedArgs summary { + cursor: pointer; + color: var(--deck-muted); + font-size: 12px; + font-weight: 700; +} + +.resolvedArgs pre { + max-height: 260px; + overflow: auto; + white-space: pre-wrap; + overflow-wrap: anywhere; + color: var(--deck-text); +} + .launcherSections { display: grid; gap: 14px; diff --git a/docs/cli/dashboard.rst b/docs/cli/dashboard.rst new file mode 100644 index 00000000..7f628e43 --- /dev/null +++ b/docs/cli/dashboard.rst @@ -0,0 +1,58 @@ +Dashboard launcher preview +========================== + +Start the local dashboard with ``areno dashboard --start`` and open the +Launcher page. ``Preview command`` validates the form without initializing a +model, starting workers, or writing artifacts. ``Start`` runs the same preview +and only submits when it succeeds. + +Validation covers required model and dataset references, local path existence, +positive numeric fields, tensor-parallel divisibility, explicit GPU-list +counts, option conflicts, ports, and malformed ``extra_args`` quoting. Remote +ModelScope and Hugging Face references produce warnings because preview does +not contact either service. Warnings must be acknowledged in the launcher +before submission. + +The preview response contains: + +* ``ok`` and ``requires_acknowledgement`` status flags +* field-scoped ``errors`` and ``warnings`` +* the tokenized ``command`` used for submission +* a shell-safe ``shell_command`` rendered with Python ``shlex`` rules +* ``resolved_args``, the structured launcher inputs + +Local API example +----------------- + +This fixture exercises the successful path without a database, network +service, model weights, or GPU initialization: + +.. code-block:: bash + + mkdir -p /tmp/areno-preview/model + printf '{"prompt":"2 + 2"}\n' > /tmp/areno-preview/data.jsonl + curl -s http://127.0.0.1:8765/api/launcher/preview \ + -H 'Content-Type: application/json' \ + -d '{ + "kind": "train", + "config": { + "algo": "sft", + "ckpt": "/tmp/areno-preview/model", + "dataset_path": "/tmp/areno-preview/data.jsonl", + "dataset_loader_fn": "examples/sft/alpaca/dataset_loader.py", + "world_size": 1, + "tp_size": 1, + "epochs": 1, + "batch_size": 1, + "mini_bs": 1, + "score_micro_bs": 1, + "max_prompt_tokens": 32, + "max_new_tokens": 16, + "save_path": "/tmp/areno-preview/output" + } + }' + +For a deterministic invalid boundary, change ``tp_size`` to ``2`` while +leaving ``world_size`` at ``1``. The response contains a ``tp_size`` error and +an empty ``shell_command``. Preview never checks remote repository contents or +available device memory; those remain runtime checks. diff --git a/docs/reference/cli.rst b/docs/reference/cli.rst index 7e7b7e88..fae9899f 100644 --- a/docs/reference/cli.rst +++ b/docs/reference/cli.rst @@ -12,3 +12,4 @@ Command pages: * :doc:`/cli/dataset_loaders` * :doc:`/cli/observability` * :doc:`/cli/diagnostics` +* :doc:`/cli/dashboard` diff --git a/tests/test_dashboard_launcher_cpu.py b/tests/test_dashboard_launcher_cpu.py new file mode 100644 index 00000000..b075ac6f --- /dev/null +++ b/tests/test_dashboard_launcher_cpu.py @@ -0,0 +1,120 @@ +import shlex + +from areno.dashboard.launcher import preview_launcher +from areno.dashboard.server import build_serve_command, build_train_command + + +def _train_config(tmp_path): + model = tmp_path / "model" + model.mkdir() + dataset = tmp_path / "data.jsonl" + dataset.write_text('{"prompt": "2 + 2"}\n', encoding="utf-8") + return { + "algo": "sft", + "ckpt": str(model), + "dataset_path": str(dataset), + "dataset_loader_fn": "examples/sft/alpaca/dataset_loader.py", + "world_size": 2, + "tp_size": 1, + "epochs": 1, + "batch_size": 2, + "mini_bs": 1, + "score_micro_bs": 1, + "max_prompt_tokens": 32, + "max_new_tokens": 16, + "save_path": str(tmp_path / "output path"), + "extra_args": "--metrics-log-dir 'metrics with spaces'", + } + + +def test_train_preview_is_shell_safe_and_matches_submitted_arguments(tmp_path): + config = _train_config(tmp_path) + + result = preview_launcher("train", config, build_train_command) + + assert result["ok"] is True + assert result["errors"] == [] + assert result["warnings"] == [] + assert result["command"] == build_train_command(result["resolved_args"]) + assert shlex.split(result["shell_command"]) == result["command"] + assert "'metrics with spaces'" in result["shell_command"] + + +def test_preview_reports_field_errors_without_building_or_modifying_inputs(tmp_path): + config = _train_config(tmp_path) + config.update( + { + "ckpt": str(tmp_path / "missing"), + "world_size": 3, + "tp_size": 2, + "batch_size": 0, + } + ) + original = dict(config) + + result = preview_launcher("train", config, build_train_command) + + assert result["ok"] is False + assert result["shell_command"] == "" + assert config == original + assert {item["field"] for item in result["errors"]} == { + "ckpt", + "tp_size", + "batch_size", + } + + +def test_explicit_gpu_count_is_validated_and_rendered(tmp_path): + config = _train_config(tmp_path) + config["train_devices"] = [0, 1] + + valid = preview_launcher("train", config, build_train_command) + config["world_size"] = 1 + invalid = preview_launcher("train", config, build_train_command) + + assert "--train-devices" in valid["command"] + assert valid["command"][valid["command"].index("--train-devices") + 1] == "0,1" + assert {item["field"] for item in invalid["errors"]} == {"world_size"} + + +def test_remote_reference_warnings_require_explicit_acknowledgement(): + config = { + "model_path": "Qwen/Qwen3-0.6B", + "model_hub": "modelscope", + "host": "127.0.0.1", + "port": 8000, + "world_size": 1, + "tp_size": 1, + "max_running_prompts": 1, + "default_max_tokens": 1, + } + + blocked = preview_launcher("serve", config, build_serve_command) + accepted = preview_launcher( + "serve", config, build_serve_command, acknowledge_warnings=True + ) + + assert blocked["errors"] == [] + assert blocked["requires_acknowledgement"] is True + assert blocked["ok"] is False + assert accepted["ok"] is True + assert accepted["command"] == blocked["command"] + assert accepted["resolved_args"] == blocked["resolved_args"] + + +def test_serve_preview_validates_port_boundary_and_malformed_extra_args(tmp_path): + config = { + "model_path": str(tmp_path), + "host": "127.0.0.1", + "port": 65536, + "world_size": 1, + "tp_size": 1, + "max_running_prompts": 1, + "default_max_tokens": 1, + "extra_args": "--served-model-name 'unterminated", + } + + result = preview_launcher("serve", config, build_serve_command) + + assert {item["field"] for item in result["errors"]} == {"port", "extra_args"} + assert result["command"] == []