@agent-team-foundation/first-tree-hub 0.8.5 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,361 +0,0 @@
1
- var Vb=e=>{throw TypeError(e)};var om=(e,t,r)=>t.has(e)||Vb("Cannot "+r);var M=(e,t,r)=>(om(e,t,"read from private field"),r?r.call(e):t.get(e)),Ne=(e,t,r)=>t.has(e)?Vb("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ge=(e,t,r,a)=>(om(e,t,"write to private field"),a?a.call(e,r):t.set(e,r),r),Be=(e,t,r)=>(om(e,t,"access private method"),r);var Mc=(e,t,r,a)=>({set _(l){ge(e,t,l,r)},get _(){return M(e,t,a)}});function s_(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const l in a)if(l!=="default"&&!(l in e)){const o=Object.getOwnPropertyDescriptor(a,l);o&&Object.defineProperty(e,l,o.get?o:{enumerable:!0,get:()=>a[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function r(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(l){if(l.ep)return;l.ep=!0;const o=r(l);fetch(l.href,o)}})();function kd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var um={exports:{}},Oo={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Qb;function o_(){if(Qb)return Oo;Qb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,l,o){var u=null;if(o!==void 0&&(u=""+o),l.key!==void 0&&(u=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:e,type:a,key:u,ref:l!==void 0?l:null,props:o}}return Oo.Fragment=t,Oo.jsx=r,Oo.jsxs=r,Oo}var Gb;function u_(){return Gb||(Gb=1,um.exports=o_()),um.exports}var d=u_(),cm={exports:{}},Le={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Kb;function c_(){if(Kb)return Le;Kb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function b(U){return U===null||typeof U!="object"?null:(U=x&&U[x]||U["@@iterator"],typeof U=="function"?U:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,N={};function E(U,L,_){this.props=U,this.context=L,this.refs=N,this.updater=_||j}E.prototype.isReactComponent={},E.prototype.setState=function(U,L){if(typeof U!="object"&&typeof U!="function"&&U!=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,U,L,"setState")},E.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function R(){}R.prototype=E.prototype;function A(U,L,_){this.props=U,this.context=L,this.refs=N,this.updater=_||j}var I=A.prototype=new R;I.constructor=A,k(I,E.prototype),I.isPureReactComponent=!0;var q=Array.isArray;function z(){}var $={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function W(U,L,_){var se=_.ref;return{$$typeof:e,type:U,key:L,ref:se!==void 0?se:null,props:_}}function F(U,L){return W(U.type,L,U.props)}function re(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function le(U){var L={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(_){return L[_]})}var X=/\/+/g;function de(U,L){return typeof U=="object"&&U!==null&&U.key!=null?le(""+U.key):L.toString(36)}function te(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(z,z):(U.status="pending",U.then(function(L){U.status==="pending"&&(U.status="fulfilled",U.value=L)},function(L){U.status==="pending"&&(U.status="rejected",U.reason=L)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function B(U,L,_,se,G){var ce=typeof U;(ce==="undefined"||ce==="boolean")&&(U=null);var ye=!1;if(U===null)ye=!0;else switch(ce){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(U.$$typeof){case e:case t:ye=!0;break;case v:return ye=U._init,B(ye(U._payload),L,_,se,G)}}if(ye)return G=G(U),ye=se===""?"."+de(U,0):se,q(G)?(_="",ye!=null&&(_=ye.replace(X,"$&/")+"/"),B(G,L,_,"",function(jt){return jt})):G!=null&&(re(G)&&(G=F(G,_+(G.key==null||U&&U.key===G.key?"":(""+G.key).replace(X,"$&/")+"/")+ye)),L.push(G)),1;ye=0;var De=se===""?".":se+":";if(q(U))for(var ve=0;ve<U.length;ve++)se=U[ve],ce=De+de(se,ve),ye+=B(se,L,_,ce,G);else if(ve=b(U),typeof ve=="function")for(U=ve.call(U),ve=0;!(se=U.next()).done;)se=se.value,ce=De+de(se,ve++),ye+=B(se,L,_,ce,G);else if(ce==="object"){if(typeof U.then=="function")return B(te(U),L,_,se,G);throw L=String(U),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return ye}function J(U,L,_){if(U==null)return U;var se=[],G=0;return B(U,se,"","",function(ce){return L.call(_,ce,G++)}),se}function pe(U){if(U._status===-1){var L=U._result;L=L(),L.then(function(_){(U._status===0||U._status===-1)&&(U._status=1,U._result=_)},function(_){(U._status===0||U._status===-1)&&(U._status=2,U._result=_)}),U._status===-1&&(U._status=0,U._result=L)}if(U._status===1)return U._result.default;throw U._result}var Ae=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},T={map:J,forEach:function(U,L,_){J(U,function(){L.apply(this,arguments)},_)},count:function(U){var L=0;return J(U,function(){L++}),L},toArray:function(U){return J(U,function(L){return L})||[]},only:function(U){if(!re(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return Le.Activity=y,Le.Children=T,Le.Component=E,Le.Fragment=r,Le.Profiler=l,Le.PureComponent=A,Le.StrictMode=a,Le.Suspense=m,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Le.__COMPILER_RUNTIME={__proto__:null,c:function(U){return $.H.useMemoCache(U)}},Le.cache=function(U){return function(){return U.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(U,L,_){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var se=k({},U.props),G=U.key;if(L!=null)for(ce in L.key!==void 0&&(G=""+L.key),L)!Z.call(L,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&L.ref===void 0||(se[ce]=L[ce]);var ce=arguments.length-2;if(ce===1)se.children=_;else if(1<ce){for(var ye=Array(ce),De=0;De<ce;De++)ye[De]=arguments[De+2];se.children=ye}return W(U.type,G,se)},Le.createContext=function(U){return U={$$typeof:u,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:o,_context:U},U},Le.createElement=function(U,L,_){var se,G={},ce=null;if(L!=null)for(se in L.key!==void 0&&(ce=""+L.key),L)Z.call(L,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(G[se]=L[se]);var ye=arguments.length-2;if(ye===1)G.children=_;else if(1<ye){for(var De=Array(ye),ve=0;ve<ye;ve++)De[ve]=arguments[ve+2];G.children=De}if(U&&U.defaultProps)for(se in ye=U.defaultProps,ye)G[se]===void 0&&(G[se]=ye[se]);return W(U,ce,G)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(U){return{$$typeof:f,render:U}},Le.isValidElement=re,Le.lazy=function(U){return{$$typeof:v,_payload:{_status:-1,_result:U},_init:pe}},Le.memo=function(U,L){return{$$typeof:h,type:U,compare:L===void 0?null:L}},Le.startTransition=function(U){var L=$.T,_={};$.T=_;try{var se=U(),G=$.S;G!==null&&G(_,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(z,Ae)}catch(ce){Ae(ce)}finally{L!==null&&_.types!==null&&(L.types=_.types),$.T=L}},Le.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Le.use=function(U){return $.H.use(U)},Le.useActionState=function(U,L,_){return $.H.useActionState(U,L,_)},Le.useCallback=function(U,L){return $.H.useCallback(U,L)},Le.useContext=function(U){return $.H.useContext(U)},Le.useDebugValue=function(){},Le.useDeferredValue=function(U,L){return $.H.useDeferredValue(U,L)},Le.useEffect=function(U,L){return $.H.useEffect(U,L)},Le.useEffectEvent=function(U){return $.H.useEffectEvent(U)},Le.useId=function(){return $.H.useId()},Le.useImperativeHandle=function(U,L,_){return $.H.useImperativeHandle(U,L,_)},Le.useInsertionEffect=function(U,L){return $.H.useInsertionEffect(U,L)},Le.useLayoutEffect=function(U,L){return $.H.useLayoutEffect(U,L)},Le.useMemo=function(U,L){return $.H.useMemo(U,L)},Le.useOptimistic=function(U,L){return $.H.useOptimistic(U,L)},Le.useReducer=function(U,L,_){return $.H.useReducer(U,L,_)},Le.useRef=function(U){return $.H.useRef(U)},Le.useState=function(U){return $.H.useState(U)},Le.useSyncExternalStore=function(U,L,_){return $.H.useSyncExternalStore(U,L,_)},Le.useTransition=function(){return $.H.useTransition()},Le.version="19.2.4",Le}var Yb;function Vp(){return Yb||(Yb=1,cm.exports=c_()),cm.exports}var S=Vp();const d_=kd(S),Qp=s_({__proto__:null,default:d_},[S]);var dm={exports:{}},Do={},fm={exports:{}},hm={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var Xb;function f_(){return Xb||(Xb=1,(function(e){function t(B,J){var pe=B.length;B.push(J);e:for(;0<pe;){var Ae=pe-1>>>1,T=B[Ae];if(0<l(T,J))B[Ae]=J,B[pe]=T,pe=Ae;else break e}}function r(B){return B.length===0?null:B[0]}function a(B){if(B.length===0)return null;var J=B[0],pe=B.pop();if(pe!==J){B[0]=pe;e:for(var Ae=0,T=B.length,U=T>>>1;Ae<U;){var L=2*(Ae+1)-1,_=B[L],se=L+1,G=B[se];if(0>l(_,pe))se<T&&0>l(G,_)?(B[Ae]=G,B[se]=pe,Ae=se):(B[Ae]=_,B[L]=pe,Ae=L);else if(se<T&&0>l(G,pe))B[Ae]=G,B[se]=pe,Ae=se;else break e}}return J}function l(B,J){var pe=B.sortIndex-J.sortIndex;return pe!==0?pe:B.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var m=[],h=[],v=1,y=null,x=3,b=!1,j=!1,k=!1,N=!1,E=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function I(B){for(var J=r(h);J!==null;){if(J.callback===null)a(h);else if(J.startTime<=B)a(h),J.sortIndex=J.expirationTime,t(m,J);else break;J=r(h)}}function q(B){if(k=!1,I(B),!j)if(r(m)!==null)j=!0,z||(z=!0,le());else{var J=r(h);J!==null&&te(q,J.startTime-B)}}var z=!1,$=-1,Z=5,W=-1;function F(){return N?!0:!(e.unstable_now()-W<Z)}function re(){if(N=!1,z){var B=e.unstable_now();W=B;var J=!0;try{e:{j=!1,k&&(k=!1,R($),$=-1),b=!0;var pe=x;try{t:{for(I(B),y=r(m);y!==null&&!(y.expirationTime>B&&F());){var Ae=y.callback;if(typeof Ae=="function"){y.callback=null,x=y.priorityLevel;var T=Ae(y.expirationTime<=B);if(B=e.unstable_now(),typeof T=="function"){y.callback=T,I(B),J=!0;break t}y===r(m)&&a(m),I(B)}else a(m);y=r(m)}if(y!==null)J=!0;else{var U=r(h);U!==null&&te(q,U.startTime-B),J=!1}}break e}finally{y=null,x=pe,b=!1}J=void 0}}finally{J?le():z=!1}}}var le;if(typeof A=="function")le=function(){A(re)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,de=X.port2;X.port1.onmessage=re,le=function(){de.postMessage(null)}}else le=function(){E(re,0)};function te(B,J){$=E(function(){B(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(B){switch(x){case 1:case 2:case 3:var J=3;break;default:J=x}var pe=x;x=J;try{return B()}finally{x=pe}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(B,J){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var pe=x;x=B;try{return J()}finally{x=pe}},e.unstable_scheduleCallback=function(B,J,pe){var Ae=e.unstable_now();switch(typeof pe=="object"&&pe!==null?(pe=pe.delay,pe=typeof pe=="number"&&0<pe?Ae+pe:Ae):pe=Ae,B){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=pe+T,B={id:v++,callback:J,priorityLevel:B,startTime:pe,expirationTime:T,sortIndex:-1},pe>Ae?(B.sortIndex=pe,t(h,B),r(m)===null&&B===r(h)&&(k?(R($),$=-1):k=!0,te(q,pe-Ae))):(B.sortIndex=T,t(m,B),j||b||(j=!0,z||(z=!0,le()))),B},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(B){var J=x;return function(){var pe=x;x=J;try{return B.apply(this,arguments)}finally{x=pe}}}})(hm)),hm}var Jb;function h_(){return Jb||(Jb=1,fm.exports=f_()),fm.exports}var mm={exports:{}},cn={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Wb;function m_(){if(Wb)return cn;Wb=1;var e=Vp();function t(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},l=Symbol.for("react.portal");function o(m,h,v){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:m,containerInfo:h,implementation:v}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return cn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,cn.createPortal=function(m,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(m,h,null,v)},cn.flushSync=function(m){var h=u.T,v=a.p;try{if(u.T=null,a.p=2,m)return m()}finally{u.T=h,a.p=v,a.d.f()}},cn.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(m,h))},cn.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},cn.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var v=h.as,y=f(v,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?a.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:b}):v==="script"&&a.d.X(m,{crossOrigin:y,integrity:x,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},cn.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=f(h.as,h.crossOrigin);a.d.M(m,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(m)},cn.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,y=f(v,h.crossOrigin);a.d.L(m,v,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},cn.preloadModule=function(m,h){if(typeof m=="string")if(h){var v=f(h.as,h.crossOrigin);a.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(m)},cn.requestFormReset=function(m){a.d.r(m)},cn.unstable_batchedUpdates=function(m,h){return m(h)},cn.useFormState=function(m,h,v){return u.H.useFormState(m,h,v)},cn.useFormStatus=function(){return u.H.useHostTransitionStatus()},cn.version="19.2.4",cn}var e0;function TS(){if(e0)return mm.exports;e0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),mm.exports=m_(),mm.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var t0;function p_(){if(t0)return Do;t0=1;var e=h_(),t=Vp(),r=TS();function a(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var i=n,s=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(s=i.return),n=i.return;while(n)}return i.tag===3?s:null}function u(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function f(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function m(n){if(o(n)!==n)throw Error(a(188))}function h(n){var i=n.alternate;if(!i){if(i=o(n),i===null)throw Error(a(188));return i!==n?null:n}for(var s=n,c=i;;){var p=s.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){s=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===s)return m(p),n;if(g===c)return m(p),i;g=g.sibling}throw Error(a(188))}if(s.return!==c.return)s=p,c=g;else{for(var w=!1,C=p.child;C;){if(C===s){w=!0,s=p,c=g;break}if(C===c){w=!0,c=p,s=g;break}C=C.sibling}if(!w){for(C=g.child;C;){if(C===s){w=!0,s=g,c=p;break}if(C===c){w=!0,c=g,s=p;break}C=C.sibling}if(!w)throw Error(a(189))}}if(s.alternate!==c)throw Error(a(190))}if(s.tag!==3)throw Error(a(188));return s.stateNode.current===s?n:i}function v(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=v(n),i!==null)return i;n=n.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),A=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function le(n){return n===null||typeof n!="object"?null:(n=re&&n[re]||n["@@iterator"],typeof n=="function"?n:null)}var X=Symbol.for("react.client.reference");function de(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===X?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case k:return"Fragment";case E:return"Profiler";case N:return"StrictMode";case q:return"Suspense";case z:return"SuspenseList";case W:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case j:return"Portal";case A:return n.displayName||"Context";case R:return(n._context.displayName||"Context")+".Consumer";case I:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case $:return i=n.displayName||null,i!==null?i:de(n.type)||"Memo";case Z:i=n._payload,n=n._init;try{return de(n(i))}catch{}}return null}var te=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},Ae=[],T=-1;function U(n){return{current:n}}function L(n){0>T||(n.current=Ae[T],Ae[T]=null,T--)}function _(n,i){T++,Ae[T]=n.current,n.current=i}var se=U(null),G=U(null),ce=U(null),ye=U(null);function De(n,i){switch(_(ce,i),_(G,n),_(se,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?pb(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=pb(i),n=gb(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}L(se),_(se,n)}function ve(){L(se),L(G),L(ce)}function jt(n){n.memoizedState!==null&&_(ye,n);var i=se.current,s=gb(i,n.type);i!==s&&(_(G,n),_(se,s))}function Wt(n){G.current===n&&(L(se),L(G)),ye.current===n&&(L(ye),Ao._currentValue=pe)}var wn,xr;function en(n){if(wn===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);wn=i&&i[1]||"",xr=-1<s.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+wn+n+xr}var Gr=!1;function _r(n,i){if(!n||Gr)return"";Gr=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(Y){var K=Y}Reflect.construct(n,[],oe)}else{try{oe.call()}catch(Y){K=Y}n.call(oe.prototype)}}else{try{throw Error()}catch(Y){K=Y}(oe=n())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(Y){if(Y&&K&&typeof Y.stack=="string")return[Y.stack,K.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),w=g[0],C=g[1];if(w&&C){var D=w.split(`
44
- `),Q=C.split(`
45
- `);for(p=c=0;c<D.length&&!D[c].includes("DetermineComponentFrameRoot");)c++;for(;p<Q.length&&!Q[p].includes("DetermineComponentFrameRoot");)p++;if(c===D.length||p===Q.length)for(c=D.length-1,p=Q.length-1;1<=c&&0<=p&&D[c]!==Q[p];)p--;for(;1<=c&&0<=p;c--,p--)if(D[c]!==Q[p]){if(c!==1||p!==1)do if(c--,p--,0>p||D[c]!==Q[p]){var ee=`
46
- `+D[c].replace(" at new "," at ");return n.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",n.displayName)),ee}while(1<=c&&0<=p);break}}}finally{Gr=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?en(s):""}function Et(n,i){switch(n.tag){case 26:case 27:case 5:return en(n.type);case 16:return en("Lazy");case 13:return n.child!==i&&i!==null?en("Suspense Fallback"):en("Suspense");case 19:return en("SuspenseList");case 0:case 15:return _r(n.type,!1);case 11:return _r(n.type.render,!1);case 1:return _r(n.type,!0);case 31:return en("Activity");default:return""}}function Kt(n){try{var i="",s=null;do i+=Et(n,s),s=n,n=n.return;while(n);return i}catch(c){return`
47
- Error generating stack: `+c.message+`
48
- `+c.stack}}var kn=Object.prototype.hasOwnProperty,Kr=e.unstable_scheduleCallback,_i=e.unstable_cancelCallback,$s=e.unstable_shouldYield,yl=e.unstable_requestPaint,tn=e.unstable_now,qs=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,$e=e.unstable_LowPriority,nt=e.unstable_IdlePriority,mn=e.log,br=e.unstable_setDisableYieldValue,nn=null,Mt=null;function un(n){if(typeof mn=="function"&&br(n),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(nn,n)}catch{}}var ct=Math.clz32?Math.clz32:bu,Ar=Math.log,jn=Math.LN2;function bu(n){return n>>>=0,n===0?32:31-(Ar(n)/jn|0)|0}var Ca=256,Na=262144,_a=4194304;function Tr(n){var i=n&42;if(i!==0)return i;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Aa(n,i,s){var c=n.pendingLanes;if(c===0)return 0;var p=0,g=n.suspendedLanes,w=n.pingedLanes;n=n.warmLanes;var C=c&134217727;return C!==0?(c=C&~g,c!==0?p=Tr(c):(w&=C,w!==0?p=Tr(w):s||(s=C&~n,s!==0&&(p=Tr(s))))):(C=c&~g,C!==0?p=Tr(C):w!==0?p=Tr(w):s||(s=c&~n,s!==0&&(p=Tr(s)))),p===0?0:i!==0&&i!==p&&(i&g)===0&&(g=p&-p,s=i&-i,g>=s||g===32&&(s&4194048)!==0)?i:p}function Ai(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Su(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 ue(){var n=_a;return _a<<=1,(_a&62914560)===0&&(_a=4194304),n}function Qe(n){for(var i=[],s=0;31>s;s++)i.push(n);return i}function pn(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function wu(n,i,s,c,p,g){var w=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var C=n.entanglements,D=n.expirationTimes,Q=n.hiddenUpdates;for(s=w&~s;0<s;){var ee=31-ct(s),oe=1<<ee;C[ee]=0,D[ee]=-1;var K=Q[ee];if(K!==null)for(Q[ee]=null,ee=0;ee<K.length;ee++){var Y=K[ee];Y!==null&&(Y.lane&=-536870913)}s&=~oe}c!==0&&Kd(n,c,0),g!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=g&~(w&~i))}function Kd(n,i,s){n.pendingLanes|=i,n.suspendedLanes&=~i;var c=31-ct(i);n.entangledLanes|=i,n.entanglements[c]=n.entanglements[c]|1073741824|s&261930}function Jg(n,i){var s=n.entangledLanes|=i;for(n=n.entanglements;s;){var c=31-ct(s),p=1<<c;p&i|n[c]&i&&(n[c]|=i),s&=~p}}function Wg(n,i){var s=i&-i;return s=(s&42)!==0?1:Yd(s),(s&(n.suspendedLanes|i))!==0?0:s}function Yd(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Xd(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function ey(){var n=J.p;return n!==0?n:(n=window.event,n===void 0?32:Bb(n.type))}function ty(n,i){var s=J.p;try{return J.p=n,i()}finally{J.p=s}}var Ti=Math.random().toString(36).slice(2),rn="__reactFiber$"+Ti,En="__reactProps$"+Ti,vl="__reactContainer$"+Ti,Jd="__reactEvents$"+Ti,YE="__reactListeners$"+Ti,XE="__reactHandles$"+Ti,ny="__reactResources$"+Ti,Fs="__reactMarker$"+Ti;function Wd(n){delete n[rn],delete n[En],delete n[Jd],delete n[YE],delete n[XE]}function xl(n){var i=n[rn];if(i)return i;for(var s=n.parentNode;s;){if(i=s[vl]||s[rn]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(n=kb(n);n!==null;){if(s=n[rn])return s;n=kb(n)}return i}n=s,s=n.parentNode}return null}function bl(n){if(n=n[rn]||n[vl]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function Hs(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(a(33))}function Sl(n){var i=n[ny];return i||(i=n[ny]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Yt(n){n[Fs]=!0}var ry=new Set,iy={};function Ta(n,i){wl(n,i),wl(n+"Capture",i)}function wl(n,i){for(iy[n]=i,n=0;n<i.length;n++)ry.add(i[n])}var JE=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ay={},ly={};function WE(n){return kn.call(ly,n)?!0:kn.call(ay,n)?!1:JE.test(n)?ly[n]=!0:(ay[n]=!0,!1)}function ku(n,i,s){if(WE(i))if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+s)}}function ju(n,i,s){if(s===null)n.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+s)}}function Yr(n,i,s,c){if(c===null)n.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(s);return}n.setAttributeNS(i,s,""+c)}}function nr(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function sy(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function eC(n,i,s){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,g=c.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return p.call(this)},set:function(w){s=""+w,g.call(this,w)}}),Object.defineProperty(n,i,{enumerable:c.enumerable}),{getValue:function(){return s},setValue:function(w){s=""+w},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function ef(n){if(!n._valueTracker){var i=sy(n)?"checked":"value";n._valueTracker=eC(n,i,""+n[i])}}function oy(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var s=i.getValue(),c="";return n&&(c=sy(n)?n.checked?"true":"false":n.value),n=c,n!==s?(i.setValue(n),!0):!1}function Eu(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var tC=/[\n"\\]/g;function rr(n){return n.replace(tC,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function tf(n,i,s,c,p,g,w,C){n.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.type=w:n.removeAttribute("type"),i!=null?w==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+nr(i)):n.value!==""+nr(i)&&(n.value=""+nr(i)):w!=="submit"&&w!=="reset"||n.removeAttribute("value"),i!=null?nf(n,w,nr(i)):s!=null?nf(n,w,nr(s)):c!=null&&n.removeAttribute("value"),p==null&&g!=null&&(n.defaultChecked=!!g),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?n.name=""+nr(C):n.removeAttribute("name")}function uy(n,i,s,c,p,g,w,C){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(n.type=g),i!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||i!=null)){ef(n);return}s=s!=null?""+nr(s):"",i=i!=null?""+nr(i):s,C||i===n.value||(n.value=i),n.defaultValue=i}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=C?n.checked:!!c,n.defaultChecked=!!c,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(n.name=w),ef(n)}function nf(n,i,s){i==="number"&&Eu(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function kl(n,i,s,c){if(n=n.options,i){i={};for(var p=0;p<s.length;p++)i["$"+s[p]]=!0;for(s=0;s<n.length;s++)p=i.hasOwnProperty("$"+n[s].value),n[s].selected!==p&&(n[s].selected=p),p&&c&&(n[s].defaultSelected=!0)}else{for(s=""+nr(s),i=null,p=0;p<n.length;p++){if(n[p].value===s){n[p].selected=!0,c&&(n[p].defaultSelected=!0);return}i!==null||n[p].disabled||(i=n[p])}i!==null&&(i.selected=!0)}}function cy(n,i,s){if(i!=null&&(i=""+nr(i),i!==n.value&&(n.value=i),s==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=s!=null?""+nr(s):""}function dy(n,i,s,c){if(i==null){if(c!=null){if(s!=null)throw Error(a(92));if(te(c)){if(1<c.length)throw Error(a(93));c=c[0]}s=c}s==null&&(s=""),i=s}s=nr(i),n.defaultValue=s,c=n.textContent,c===s&&c!==""&&c!==null&&(n.value=c),ef(n)}function jl(n,i){if(i){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=i;return}}n.textContent=i}var nC=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function fy(n,i,s){var c=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?c?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":c?n.setProperty(i,s):typeof s!="number"||s===0||nC.has(i)?i==="float"?n.cssFloat=s:n[i]=(""+s).trim():n[i]=s+"px"}function hy(n,i,s){if(i!=null&&typeof i!="object")throw Error(a(62));if(n=n.style,s!=null){for(var c in s)!s.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var p in i)c=i[p],i.hasOwnProperty(p)&&s[p]!==c&&fy(n,p,c)}else for(var g in i)i.hasOwnProperty(g)&&fy(n,g,i[g])}function rf(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var rC=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),iC=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Cu(n){return iC.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Xr(){}var af=null;function lf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var El=null,Cl=null;function my(n){var i=bl(n);if(i&&(n=i.stateNode)){var s=n[En]||null;e:switch(n=i.stateNode,i.type){case"input":if(tf(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+rr(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var c=s[i];if(c!==n&&c.form===n.form){var p=c[En]||null;if(!p)throw Error(a(90));tf(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(i=0;i<s.length;i++)c=s[i],c.form===n.form&&oy(c)}break e;case"textarea":cy(n,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&kl(n,!!s.multiple,i,!1)}}}var sf=!1;function py(n,i,s){if(sf)return n(i,s);sf=!0;try{var c=n(i);return c}finally{if(sf=!1,(El!==null||Cl!==null)&&(hc(),El&&(i=El,n=Cl,Cl=El=null,my(i),n)))for(i=0;i<n.length;i++)my(n[i])}}function Zs(n,i){var s=n.stateNode;if(s===null)return null;var c=s[En]||null;if(c===null)return null;s=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(a(231,i,typeof s));return s}var Jr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),of=!1;if(Jr)try{var Vs={};Object.defineProperty(Vs,"passive",{get:function(){of=!0}}),window.addEventListener("test",Vs,Vs),window.removeEventListener("test",Vs,Vs)}catch{of=!1}var zi=null,uf=null,Nu=null;function gy(){if(Nu)return Nu;var n,i=uf,s=i.length,c,p="value"in zi?zi.value:zi.textContent,g=p.length;for(n=0;n<s&&i[n]===p[n];n++);var w=s-n;for(c=1;c<=w&&i[s-c]===p[g-c];c++);return Nu=p.slice(n,1<c?1-c:void 0)}function _u(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function Au(){return!0}function yy(){return!1}function Cn(n){function i(s,c,p,g,w){this._reactName=s,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var C in n)n.hasOwnProperty(C)&&(s=n[C],this[C]=s?s(g):g[C]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Au:yy,this.isPropagationStopped=yy,this}return y(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Au)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Au)},persist:function(){},isPersistent:Au}),i}var za={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tu=Cn(za),Qs=y({},za,{view:0,detail:0}),aC=Cn(Qs),cf,df,Gs,zu=y({},Qs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Gs&&(Gs&&n.type==="mousemove"?(cf=n.screenX-Gs.screenX,df=n.screenY-Gs.screenY):df=cf=0,Gs=n),cf)},movementY:function(n){return"movementY"in n?n.movementY:df}}),vy=Cn(zu),lC=y({},zu,{dataTransfer:0}),sC=Cn(lC),oC=y({},Qs,{relatedTarget:0}),ff=Cn(oC),uC=y({},za,{animationName:0,elapsedTime:0,pseudoElement:0}),cC=Cn(uC),dC=y({},za,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),fC=Cn(dC),hC=y({},za,{data:0}),xy=Cn(hC),mC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pC={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},gC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yC(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=gC[n])?!!i[n]:!1}function hf(){return yC}var vC=y({},Qs,{key:function(n){if(n.key){var i=mC[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=_u(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?pC[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hf,charCode:function(n){return n.type==="keypress"?_u(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?_u(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),xC=Cn(vC),bC=y({},zu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),by=Cn(bC),SC=y({},Qs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hf}),wC=Cn(SC),kC=y({},za,{propertyName:0,elapsedTime:0,pseudoElement:0}),jC=Cn(kC),EC=y({},zu,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),CC=Cn(EC),NC=y({},za,{newState:0,oldState:0}),_C=Cn(NC),AC=[9,13,27,32],mf=Jr&&"CompositionEvent"in window,Ks=null;Jr&&"documentMode"in document&&(Ks=document.documentMode);var TC=Jr&&"TextEvent"in window&&!Ks,Sy=Jr&&(!mf||Ks&&8<Ks&&11>=Ks),wy=" ",ky=!1;function jy(n,i){switch(n){case"keyup":return AC.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ey(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Nl=!1;function zC(n,i){switch(n){case"compositionend":return Ey(i);case"keypress":return i.which!==32?null:(ky=!0,wy);case"textInput":return n=i.data,n===wy&&ky?null:n;default:return null}}function RC(n,i){if(Nl)return n==="compositionend"||!mf&&jy(n,i)?(n=gy(),Nu=uf=zi=null,Nl=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Sy&&i.locale!=="ko"?null:i.data;default:return null}}var OC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Cy(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!OC[n.type]:i==="textarea"}function Ny(n,i,s,c){El?Cl?Cl.push(c):Cl=[c]:El=c,i=bc(i,"onChange"),0<i.length&&(s=new Tu("onChange","change",null,s,c),n.push({event:s,listeners:i}))}var Ys=null,Xs=null;function DC(n){ub(n,0)}function Ru(n){var i=Hs(n);if(oy(i))return n}function _y(n,i){if(n==="change")return i}var Ay=!1;if(Jr){var pf;if(Jr){var gf="oninput"in document;if(!gf){var Ty=document.createElement("div");Ty.setAttribute("oninput","return;"),gf=typeof Ty.oninput=="function"}pf=gf}else pf=!1;Ay=pf&&(!document.documentMode||9<document.documentMode)}function zy(){Ys&&(Ys.detachEvent("onpropertychange",Ry),Xs=Ys=null)}function Ry(n){if(n.propertyName==="value"&&Ru(Xs)){var i=[];Ny(i,Xs,n,lf(n)),py(DC,i)}}function MC(n,i,s){n==="focusin"?(zy(),Ys=i,Xs=s,Ys.attachEvent("onpropertychange",Ry)):n==="focusout"&&zy()}function LC(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ru(Xs)}function UC(n,i){if(n==="click")return Ru(i)}function IC(n,i){if(n==="input"||n==="change")return Ru(i)}function BC(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var $n=typeof Object.is=="function"?Object.is:BC;function Js(n,i){if($n(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var s=Object.keys(n),c=Object.keys(i);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var p=s[c];if(!kn.call(i,p)||!$n(n[p],i[p]))return!1}return!0}function Oy(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Dy(n,i){var s=Oy(n);n=0;for(var c;s;){if(s.nodeType===3){if(c=n+s.textContent.length,n<=i&&c>=i)return{node:s,offset:i-n};n=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Oy(s)}}function My(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?My(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function Ly(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=Eu(n.document);i instanceof n.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)n=i.contentWindow;else break;i=Eu(n.document)}return i}function yf(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var PC=Jr&&"documentMode"in document&&11>=document.documentMode,_l=null,vf=null,Ws=null,xf=!1;function Uy(n,i,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;xf||_l==null||_l!==Eu(c)||(c=_l,"selectionStart"in c&&yf(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ws&&Js(Ws,c)||(Ws=c,c=bc(vf,"onSelect"),0<c.length&&(i=new Tu("onSelect","select",null,i,s),n.push({event:i,listeners:c}),i.target=_l)))}function Ra(n,i){var s={};return s[n.toLowerCase()]=i.toLowerCase(),s["Webkit"+n]="webkit"+i,s["Moz"+n]="moz"+i,s}var Al={animationend:Ra("Animation","AnimationEnd"),animationiteration:Ra("Animation","AnimationIteration"),animationstart:Ra("Animation","AnimationStart"),transitionrun:Ra("Transition","TransitionRun"),transitionstart:Ra("Transition","TransitionStart"),transitioncancel:Ra("Transition","TransitionCancel"),transitionend:Ra("Transition","TransitionEnd")},bf={},Iy={};Jr&&(Iy=document.createElement("div").style,"AnimationEvent"in window||(delete Al.animationend.animation,delete Al.animationiteration.animation,delete Al.animationstart.animation),"TransitionEvent"in window||delete Al.transitionend.transition);function Oa(n){if(bf[n])return bf[n];if(!Al[n])return n;var i=Al[n],s;for(s in i)if(i.hasOwnProperty(s)&&s in Iy)return bf[n]=i[s];return n}var By=Oa("animationend"),Py=Oa("animationiteration"),$y=Oa("animationstart"),$C=Oa("transitionrun"),qC=Oa("transitionstart"),FC=Oa("transitioncancel"),qy=Oa("transitionend"),Fy=new Map,Sf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Sf.push("scrollEnd");function Sr(n,i){Fy.set(n,i),Ta(i,[n])}var Ou=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},ir=[],Tl=0,wf=0;function Du(){for(var n=Tl,i=wf=Tl=0;i<n;){var s=ir[i];ir[i++]=null;var c=ir[i];ir[i++]=null;var p=ir[i];ir[i++]=null;var g=ir[i];if(ir[i++]=null,c!==null&&p!==null){var w=c.pending;w===null?p.next=p:(p.next=w.next,w.next=p),c.pending=p}g!==0&&Hy(s,p,g)}}function Mu(n,i,s,c){ir[Tl++]=n,ir[Tl++]=i,ir[Tl++]=s,ir[Tl++]=c,wf|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function kf(n,i,s,c){return Mu(n,i,s,c),Lu(n)}function Da(n,i){return Mu(n,null,null,i),Lu(n)}function Hy(n,i,s){n.lanes|=s;var c=n.alternate;c!==null&&(c.lanes|=s);for(var p=!1,g=n.return;g!==null;)g.childLanes|=s,c=g.alternate,c!==null&&(c.childLanes|=s),g.tag===22&&(n=g.stateNode,n===null||n._visibility&1||(p=!0)),n=g,g=g.return;return n.tag===3?(g=n.stateNode,p&&i!==null&&(p=31-ct(s),n=g.hiddenUpdates,c=n[p],c===null?n[p]=[i]:c.push(i),i.lane=s|536870912),g):null}function Lu(n){if(50<wo)throw wo=0,Rh=null,Error(a(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var zl={};function HC(n,i,s,c){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qn(n,i,s,c){return new HC(n,i,s,c)}function jf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Wr(n,i){var s=n.alternate;return s===null?(s=qn(n.tag,i,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=i,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&65011712,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,i=n.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s.refCleanup=n.refCleanup,s}function Zy(n,i){n.flags&=65011714;var s=n.alternate;return s===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=s.childLanes,n.lanes=s.lanes,n.child=s.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=s.memoizedProps,n.memoizedState=s.memoizedState,n.updateQueue=s.updateQueue,n.type=s.type,i=s.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function Uu(n,i,s,c,p,g){var w=0;if(c=n,typeof n=="function")jf(n)&&(w=1);else if(typeof n=="string")w=KN(n,s,se.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case W:return n=qn(31,s,i,p),n.elementType=W,n.lanes=g,n;case k:return Ma(s.children,p,g,i);case N:w=8,p|=24;break;case E:return n=qn(12,s,i,p|2),n.elementType=E,n.lanes=g,n;case q:return n=qn(13,s,i,p),n.elementType=q,n.lanes=g,n;case z:return n=qn(19,s,i,p),n.elementType=z,n.lanes=g,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case A:w=10;break e;case R:w=9;break e;case I:w=11;break e;case $:w=14;break e;case Z:w=16,c=null;break e}w=29,s=Error(a(130,n===null?"null":typeof n,"")),c=null}return i=qn(w,s,i,p),i.elementType=n,i.type=c,i.lanes=g,i}function Ma(n,i,s,c){return n=qn(7,n,c,i),n.lanes=s,n}function Ef(n,i,s){return n=qn(6,n,null,i),n.lanes=s,n}function Vy(n){var i=qn(18,null,null,0);return i.stateNode=n,i}function Cf(n,i,s){return i=qn(4,n.children!==null?n.children:[],n.key,i),i.lanes=s,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var Qy=new WeakMap;function ar(n,i){if(typeof n=="object"&&n!==null){var s=Qy.get(n);return s!==void 0?s:(i={value:n,source:i,stack:Kt(i)},Qy.set(n,i),i)}return{value:n,source:i,stack:Kt(i)}}var Rl=[],Ol=0,Iu=null,eo=0,lr=[],sr=0,Ri=null,zr=1,Rr="";function ei(n,i){Rl[Ol++]=eo,Rl[Ol++]=Iu,Iu=n,eo=i}function Gy(n,i,s){lr[sr++]=zr,lr[sr++]=Rr,lr[sr++]=Ri,Ri=n;var c=zr;n=Rr;var p=32-ct(c)-1;c&=~(1<<p),s+=1;var g=32-ct(i)+p;if(30<g){var w=p-p%5;g=(c&(1<<w)-1).toString(32),c>>=w,p-=w,zr=1<<32-ct(i)+p|s<<p|c,Rr=g+n}else zr=1<<g|s<<p|c,Rr=n}function Nf(n){n.return!==null&&(ei(n,1),Gy(n,1,0))}function _f(n){for(;n===Iu;)Iu=Rl[--Ol],Rl[Ol]=null,eo=Rl[--Ol],Rl[Ol]=null;for(;n===Ri;)Ri=lr[--sr],lr[sr]=null,Rr=lr[--sr],lr[sr]=null,zr=lr[--sr],lr[sr]=null}function Ky(n,i){lr[sr++]=zr,lr[sr++]=Rr,lr[sr++]=Ri,zr=i.id,Rr=i.overflow,Ri=n}var an=null,wt=null,Xe=!1,Oi=null,or=!1,Af=Error(a(519));function Di(n){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw to(ar(i,n)),Af}function Yy(n){var i=n.stateNode,s=n.type,c=n.memoizedProps;switch(i[rn]=n,i[En]=c,s){case"dialog":Ze("cancel",i),Ze("close",i);break;case"iframe":case"object":case"embed":Ze("load",i);break;case"video":case"audio":for(s=0;s<jo.length;s++)Ze(jo[s],i);break;case"source":Ze("error",i);break;case"img":case"image":case"link":Ze("error",i),Ze("load",i);break;case"details":Ze("toggle",i);break;case"input":Ze("invalid",i),uy(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Ze("invalid",i);break;case"textarea":Ze("invalid",i),dy(i,c.value,c.defaultValue,c.children)}s=c.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||c.suppressHydrationWarning===!0||hb(i.textContent,s)?(c.popover!=null&&(Ze("beforetoggle",i),Ze("toggle",i)),c.onScroll!=null&&Ze("scroll",i),c.onScrollEnd!=null&&Ze("scrollend",i),c.onClick!=null&&(i.onclick=Xr),i=!0):i=!1,i||Di(n,!0)}function Xy(n){for(an=n.return;an;)switch(an.tag){case 5:case 31:case 13:or=!1;return;case 27:case 3:or=!0;return;default:an=an.return}}function Dl(n){if(n!==an)return!1;if(!Xe)return Xy(n),Xe=!0,!1;var i=n.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=n.type,s=!(s!=="form"&&s!=="button")||Qh(n.type,n.memoizedProps)),s=!s),s&&wt&&Di(n),Xy(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));wt=wb(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));wt=wb(n)}else i===27?(i=wt,Gi(n.type)?(n=Jh,Jh=null,wt=n):wt=i):wt=an?cr(n.stateNode.nextSibling):null;return!0}function La(){wt=an=null,Xe=!1}function Tf(){var n=Oi;return n!==null&&(Tn===null?Tn=n:Tn.push.apply(Tn,n),Oi=null),n}function to(n){Oi===null?Oi=[n]:Oi.push(n)}var zf=U(null),Ua=null,ti=null;function Mi(n,i,s){_(zf,i._currentValue),i._currentValue=s}function ni(n){n._currentValue=zf.current,L(zf)}function Rf(n,i,s){for(;n!==null;){var c=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),n===s)break;n=n.return}}function Of(n,i,s,c){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var g=p.dependencies;if(g!==null){var w=p.child;g=g.firstContext;e:for(;g!==null;){var C=g;g=p;for(var D=0;D<i.length;D++)if(C.context===i[D]){g.lanes|=s,C=g.alternate,C!==null&&(C.lanes|=s),Rf(g.return,s,n),c||(w=null);break e}g=C.next}}else if(p.tag===18){if(w=p.return,w===null)throw Error(a(341));w.lanes|=s,g=w.alternate,g!==null&&(g.lanes|=s),Rf(w,s,n),w=null}else w=p.child;if(w!==null)w.return=p;else for(w=p;w!==null;){if(w===n){w=null;break}if(p=w.sibling,p!==null){p.return=w.return,w=p;break}w=w.return}p=w}}function Ml(n,i,s,c){n=null;for(var p=i,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var w=p.alternate;if(w===null)throw Error(a(387));if(w=w.memoizedProps,w!==null){var C=p.type;$n(p.pendingProps.value,w.value)||(n!==null?n.push(C):n=[C])}}else if(p===ye.current){if(w=p.alternate,w===null)throw Error(a(387));w.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Ao):n=[Ao])}p=p.return}n!==null&&Of(i,n,s,c),i.flags|=262144}function Bu(n){for(n=n.firstContext;n!==null;){if(!$n(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Ia(n){Ua=n,ti=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function ln(n){return Jy(Ua,n)}function Pu(n,i){return Ua===null&&Ia(n),Jy(n,i)}function Jy(n,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},ti===null){if(n===null)throw Error(a(308));ti=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else ti=ti.next=i;return s}var ZC=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(s,c){n.push(c)}};this.abort=function(){i.aborted=!0,n.forEach(function(s){return s()})}},VC=e.unstable_scheduleCallback,QC=e.unstable_NormalPriority,It={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Df(){return{controller:new ZC,data:new Map,refCount:0}}function no(n){n.refCount--,n.refCount===0&&VC(QC,function(){n.controller.abort()})}var ro=null,Mf=0,Ll=0,Ul=null;function GC(n,i){if(ro===null){var s=ro=[];Mf=0,Ll=Ih(),Ul={status:"pending",value:void 0,then:function(c){s.push(c)}}}return Mf++,i.then(Wy,Wy),i}function Wy(){if(--Mf===0&&ro!==null){Ul!==null&&(Ul.status="fulfilled");var n=ro;ro=null,Ll=0,Ul=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function KC(n,i){var s=[],c={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return n.then(function(){c.status="fulfilled",c.value=i;for(var p=0;p<s.length;p++)(0,s[p])(i)},function(p){for(c.status="rejected",c.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),c}var ev=B.S;B.S=function(n,i){Ux=tn(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&GC(n,i),ev!==null&&ev(n,i)};var Ba=U(null);function Lf(){var n=Ba.current;return n!==null?n:yt.pooledCache}function $u(n,i){i===null?_(Ba,Ba.current):_(Ba,i.pool)}function tv(){var n=Lf();return n===null?null:{parent:It._currentValue,pool:n}}var Il=Error(a(460)),Uf=Error(a(474)),qu=Error(a(542)),Fu={then:function(){}};function nv(n){return n=n.status,n==="fulfilled"||n==="rejected"}function rv(n,i,s){switch(s=n[s],s===void 0?n.push(i):s!==i&&(i.then(Xr,Xr),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,av(n),n;default:if(typeof i.status=="string")i.then(Xr,Xr);else{if(n=yt,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=i,n.status="pending",n.then(function(c){if(i.status==="pending"){var p=i;p.status="fulfilled",p.value=c}},function(c){if(i.status==="pending"){var p=i;p.status="rejected",p.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,av(n),n}throw $a=i,Il}}function Pa(n){try{var i=n._init;return i(n._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?($a=s,Il):s}}var $a=null;function iv(){if($a===null)throw Error(a(459));var n=$a;return $a=null,n}function av(n){if(n===Il||n===qu)throw Error(a(483))}var Bl=null,io=0;function Hu(n){var i=io;return io+=1,Bl===null&&(Bl=[]),rv(Bl,n,i)}function ao(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function Zu(n,i){throw i.$$typeof===x?Error(a(525)):(n=Object.prototype.toString.call(i),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function lv(n){function i(H,P){if(n){var V=H.deletions;V===null?(H.deletions=[P],H.flags|=16):V.push(P)}}function s(H,P){if(!n)return null;for(;P!==null;)i(H,P),P=P.sibling;return null}function c(H){for(var P=new Map;H!==null;)H.key!==null?P.set(H.key,H):P.set(H.index,H),H=H.sibling;return P}function p(H,P){return H=Wr(H,P),H.index=0,H.sibling=null,H}function g(H,P,V){return H.index=V,n?(V=H.alternate,V!==null?(V=V.index,V<P?(H.flags|=67108866,P):V):(H.flags|=67108866,P)):(H.flags|=1048576,P)}function w(H){return n&&H.alternate===null&&(H.flags|=67108866),H}function C(H,P,V,ae){return P===null||P.tag!==6?(P=Ef(V,H.mode,ae),P.return=H,P):(P=p(P,V),P.return=H,P)}function D(H,P,V,ae){var _e=V.type;return _e===k?ee(H,P,V.props.children,ae,V.key):P!==null&&(P.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===Z&&Pa(_e)===P.type)?(P=p(P,V.props),ao(P,V),P.return=H,P):(P=Uu(V.type,V.key,V.props,null,H.mode,ae),ao(P,V),P.return=H,P)}function Q(H,P,V,ae){return P===null||P.tag!==4||P.stateNode.containerInfo!==V.containerInfo||P.stateNode.implementation!==V.implementation?(P=Cf(V,H.mode,ae),P.return=H,P):(P=p(P,V.children||[]),P.return=H,P)}function ee(H,P,V,ae,_e){return P===null||P.tag!==7?(P=Ma(V,H.mode,ae,_e),P.return=H,P):(P=p(P,V),P.return=H,P)}function oe(H,P,V){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=Ef(""+P,H.mode,V),P.return=H,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case b:return V=Uu(P.type,P.key,P.props,null,H.mode,V),ao(V,P),V.return=H,V;case j:return P=Cf(P,H.mode,V),P.return=H,P;case Z:return P=Pa(P),oe(H,P,V)}if(te(P)||le(P))return P=Ma(P,H.mode,V,null),P.return=H,P;if(typeof P.then=="function")return oe(H,Hu(P),V);if(P.$$typeof===A)return oe(H,Pu(H,P),V);Zu(H,P)}return null}function K(H,P,V,ae){var _e=P!==null?P.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return _e!==null?null:C(H,P,""+V,ae);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case b:return V.key===_e?D(H,P,V,ae):null;case j:return V.key===_e?Q(H,P,V,ae):null;case Z:return V=Pa(V),K(H,P,V,ae)}if(te(V)||le(V))return _e!==null?null:ee(H,P,V,ae,null);if(typeof V.then=="function")return K(H,P,Hu(V),ae);if(V.$$typeof===A)return K(H,P,Pu(H,V),ae);Zu(H,V)}return null}function Y(H,P,V,ae,_e){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return H=H.get(V)||null,C(P,H,""+ae,_e);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return H=H.get(ae.key===null?V:ae.key)||null,D(P,H,ae,_e);case j:return H=H.get(ae.key===null?V:ae.key)||null,Q(P,H,ae,_e);case Z:return ae=Pa(ae),Y(H,P,V,ae,_e)}if(te(ae)||le(ae))return H=H.get(V)||null,ee(P,H,ae,_e,null);if(typeof ae.then=="function")return Y(H,P,V,Hu(ae),_e);if(ae.$$typeof===A)return Y(H,P,V,Pu(P,ae),_e);Zu(P,ae)}return null}function Se(H,P,V,ae){for(var _e=null,rt=null,je=P,Ie=P=0,Ke=null;je!==null&&Ie<V.length;Ie++){je.index>Ie?(Ke=je,je=null):Ke=je.sibling;var it=K(H,je,V[Ie],ae);if(it===null){je===null&&(je=Ke);break}n&&je&&it.alternate===null&&i(H,je),P=g(it,P,Ie),rt===null?_e=it:rt.sibling=it,rt=it,je=Ke}if(Ie===V.length)return s(H,je),Xe&&ei(H,Ie),_e;if(je===null){for(;Ie<V.length;Ie++)je=oe(H,V[Ie],ae),je!==null&&(P=g(je,P,Ie),rt===null?_e=je:rt.sibling=je,rt=je);return Xe&&ei(H,Ie),_e}for(je=c(je);Ie<V.length;Ie++)Ke=Y(je,H,Ie,V[Ie],ae),Ke!==null&&(n&&Ke.alternate!==null&&je.delete(Ke.key===null?Ie:Ke.key),P=g(Ke,P,Ie),rt===null?_e=Ke:rt.sibling=Ke,rt=Ke);return n&&je.forEach(function(Wi){return i(H,Wi)}),Xe&&ei(H,Ie),_e}function Re(H,P,V,ae){if(V==null)throw Error(a(151));for(var _e=null,rt=null,je=P,Ie=P=0,Ke=null,it=V.next();je!==null&&!it.done;Ie++,it=V.next()){je.index>Ie?(Ke=je,je=null):Ke=je.sibling;var Wi=K(H,je,it.value,ae);if(Wi===null){je===null&&(je=Ke);break}n&&je&&Wi.alternate===null&&i(H,je),P=g(Wi,P,Ie),rt===null?_e=Wi:rt.sibling=Wi,rt=Wi,je=Ke}if(it.done)return s(H,je),Xe&&ei(H,Ie),_e;if(je===null){for(;!it.done;Ie++,it=V.next())it=oe(H,it.value,ae),it!==null&&(P=g(it,P,Ie),rt===null?_e=it:rt.sibling=it,rt=it);return Xe&&ei(H,Ie),_e}for(je=c(je);!it.done;Ie++,it=V.next())it=Y(je,H,Ie,it.value,ae),it!==null&&(n&&it.alternate!==null&&je.delete(it.key===null?Ie:it.key),P=g(it,P,Ie),rt===null?_e=it:rt.sibling=it,rt=it);return n&&je.forEach(function(l_){return i(H,l_)}),Xe&&ei(H,Ie),_e}function pt(H,P,V,ae){if(typeof V=="object"&&V!==null&&V.type===k&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case b:e:{for(var _e=V.key;P!==null;){if(P.key===_e){if(_e=V.type,_e===k){if(P.tag===7){s(H,P.sibling),ae=p(P,V.props.children),ae.return=H,H=ae;break e}}else if(P.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===Z&&Pa(_e)===P.type){s(H,P.sibling),ae=p(P,V.props),ao(ae,V),ae.return=H,H=ae;break e}s(H,P);break}else i(H,P);P=P.sibling}V.type===k?(ae=Ma(V.props.children,H.mode,ae,V.key),ae.return=H,H=ae):(ae=Uu(V.type,V.key,V.props,null,H.mode,ae),ao(ae,V),ae.return=H,H=ae)}return w(H);case j:e:{for(_e=V.key;P!==null;){if(P.key===_e)if(P.tag===4&&P.stateNode.containerInfo===V.containerInfo&&P.stateNode.implementation===V.implementation){s(H,P.sibling),ae=p(P,V.children||[]),ae.return=H,H=ae;break e}else{s(H,P);break}else i(H,P);P=P.sibling}ae=Cf(V,H.mode,ae),ae.return=H,H=ae}return w(H);case Z:return V=Pa(V),pt(H,P,V,ae)}if(te(V))return Se(H,P,V,ae);if(le(V)){if(_e=le(V),typeof _e!="function")throw Error(a(150));return V=_e.call(V),Re(H,P,V,ae)}if(typeof V.then=="function")return pt(H,P,Hu(V),ae);if(V.$$typeof===A)return pt(H,P,Pu(H,V),ae);Zu(H,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,P!==null&&P.tag===6?(s(H,P.sibling),ae=p(P,V),ae.return=H,H=ae):(s(H,P),ae=Ef(V,H.mode,ae),ae.return=H,H=ae),w(H)):s(H,P)}return function(H,P,V,ae){try{io=0;var _e=pt(H,P,V,ae);return Bl=null,_e}catch(je){if(je===Il||je===qu)throw je;var rt=qn(29,je,null,H.mode);return rt.lanes=ae,rt.return=H,rt}finally{}}}var qa=lv(!0),sv=lv(!1),Li=!1;function If(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bf(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Ui(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Ii(n,i,s){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(lt&2)!==0){var p=c.pending;return p===null?i.next=i:(i.next=p.next,p.next=i),c.pending=i,i=Lu(n),Hy(n,null,s),i}return Mu(n,c,i,s),Lu(n)}function lo(n,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var c=i.lanes;c&=n.pendingLanes,s|=c,i.lanes=s,Jg(n,s)}}function Pf(n,i){var s=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var p=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var w={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?p=g=w:g=g.next=w,s=s.next}while(s!==null);g===null?p=g=i:g=g.next=i}else p=g=i;s={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=i:n.next=i,s.lastBaseUpdate=i}var $f=!1;function so(){if($f){var n=Ul;if(n!==null)throw n}}function oo(n,i,s,c){$f=!1;var p=n.updateQueue;Li=!1;var g=p.firstBaseUpdate,w=p.lastBaseUpdate,C=p.shared.pending;if(C!==null){p.shared.pending=null;var D=C,Q=D.next;D.next=null,w===null?g=Q:w.next=Q,w=D;var ee=n.alternate;ee!==null&&(ee=ee.updateQueue,C=ee.lastBaseUpdate,C!==w&&(C===null?ee.firstBaseUpdate=Q:C.next=Q,ee.lastBaseUpdate=D))}if(g!==null){var oe=p.baseState;w=0,ee=Q=D=null,C=g;do{var K=C.lane&-536870913,Y=K!==C.lane;if(Y?(Ge&K)===K:(c&K)===K){K!==0&&K===Ll&&($f=!0),ee!==null&&(ee=ee.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var Se=n,Re=C;K=i;var pt=s;switch(Re.tag){case 1:if(Se=Re.payload,typeof Se=="function"){oe=Se.call(pt,oe,K);break e}oe=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Re.payload,K=typeof Se=="function"?Se.call(pt,oe,K):Se,K==null)break e;oe=y({},oe,K);break e;case 2:Li=!0}}K=C.callback,K!==null&&(n.flags|=64,Y&&(n.flags|=8192),Y=p.callbacks,Y===null?p.callbacks=[K]:Y.push(K))}else Y={lane:K,tag:C.tag,payload:C.payload,callback:C.callback,next:null},ee===null?(Q=ee=Y,D=oe):ee=ee.next=Y,w|=K;if(C=C.next,C===null){if(C=p.shared.pending,C===null)break;Y=C,C=Y.next,Y.next=null,p.lastBaseUpdate=Y,p.shared.pending=null}}while(!0);ee===null&&(D=oe),p.baseState=D,p.firstBaseUpdate=Q,p.lastBaseUpdate=ee,g===null&&(p.shared.lanes=0),Fi|=w,n.lanes=w,n.memoizedState=oe}}function ov(n,i){if(typeof n!="function")throw Error(a(191,n));n.call(i)}function uv(n,i){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;n<s.length;n++)ov(s[n],i)}var Pl=U(null),Vu=U(0);function cv(n,i){n=di,_(Vu,n),_(Pl,i),di=n|i.baseLanes}function qf(){_(Vu,di),_(Pl,Pl.current)}function Ff(){di=Vu.current,L(Pl),L(Vu)}var Fn=U(null),ur=null;function Bi(n){var i=n.alternate;_(Lt,Lt.current&1),_(Fn,n),ur===null&&(i===null||Pl.current!==null||i.memoizedState!==null)&&(ur=n)}function Hf(n){_(Lt,Lt.current),_(Fn,n),ur===null&&(ur=n)}function dv(n){n.tag===22?(_(Lt,Lt.current),_(Fn,n),ur===null&&(ur=n)):Pi()}function Pi(){_(Lt,Lt.current),_(Fn,Fn.current)}function Hn(n){L(Fn),ur===n&&(ur=null),L(Lt)}var Lt=U(0);function Qu(n){for(var i=n;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Yh(s)||Xh(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var ri=0,Ue=null,ht=null,Bt=null,Gu=!1,$l=!1,Fa=!1,Ku=0,uo=0,ql=null,YC=0;function Rt(){throw Error(a(321))}function Zf(n,i){if(i===null)return!1;for(var s=0;s<i.length&&s<n.length;s++)if(!$n(n[s],i[s]))return!1;return!0}function Vf(n,i,s,c,p,g){return ri=g,Ue=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,B.H=n===null||n.memoizedState===null?Gv:sh,Fa=!1,g=s(c,p),Fa=!1,$l&&(g=hv(i,s,c,p)),fv(n),g}function fv(n){B.H=ho;var i=ht!==null&&ht.next!==null;if(ri=0,Bt=ht=Ue=null,Gu=!1,uo=0,ql=null,i)throw Error(a(300));n===null||Pt||(n=n.dependencies,n!==null&&Bu(n)&&(Pt=!0))}function hv(n,i,s,c){Ue=n;var p=0;do{if($l&&(ql=null),uo=0,$l=!1,25<=p)throw Error(a(301));if(p+=1,Bt=ht=null,n.updateQueue!=null){var g=n.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}B.H=Kv,g=i(s,c)}while($l);return g}function XC(){var n=B.H,i=n.useState()[0];return i=typeof i.then=="function"?co(i):i,n=n.useState()[0],(ht!==null?ht.memoizedState:null)!==n&&(Ue.flags|=1024),i}function Qf(){var n=Ku!==0;return Ku=0,n}function Gf(n,i,s){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~s}function Kf(n){if(Gu){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Gu=!1}ri=0,Bt=ht=Ue=null,$l=!1,uo=Ku=0,ql=null}function gn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?Ue.memoizedState=Bt=n:Bt=Bt.next=n,Bt}function Ut(){if(ht===null){var n=Ue.alternate;n=n!==null?n.memoizedState:null}else n=ht.next;var i=Bt===null?Ue.memoizedState:Bt.next;if(i!==null)Bt=i,ht=n;else{if(n===null)throw Ue.alternate===null?Error(a(467)):Error(a(310));ht=n,n={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Bt===null?Ue.memoizedState=Bt=n:Bt=Bt.next=n}return Bt}function Yu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function co(n){var i=uo;return uo+=1,ql===null&&(ql=[]),n=rv(ql,n,i),i=Ue,(Bt===null?i.memoizedState:Bt.next)===null&&(i=i.alternate,B.H=i===null||i.memoizedState===null?Gv:sh),n}function Xu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return co(n);if(n.$$typeof===A)return ln(n)}throw Error(a(438,String(n)))}function Yf(n){var i=null,s=Ue.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var c=Ue.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(p){return p.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=Yu(),Ue.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(n),c=0;c<n;c++)s[c]=F;return i.index++,s}function ii(n,i){return typeof i=="function"?i(n):i}function Ju(n){var i=Ut();return Xf(i,ht,n)}function Xf(n,i,s){var c=n.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=s;var p=n.baseQueue,g=c.pending;if(g!==null){if(p!==null){var w=p.next;p.next=g.next,g.next=w}i.baseQueue=p=g,c.pending=null}if(g=n.baseState,p===null)n.memoizedState=g;else{i=p.next;var C=w=null,D=null,Q=i,ee=!1;do{var oe=Q.lane&-536870913;if(oe!==Q.lane?(Ge&oe)===oe:(ri&oe)===oe){var K=Q.revertLane;if(K===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),oe===Ll&&(ee=!0);else if((ri&K)===K){Q=Q.next,K===Ll&&(ee=!0);continue}else oe={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},D===null?(C=D=oe,w=g):D=D.next=oe,Ue.lanes|=K,Fi|=K;oe=Q.action,Fa&&s(g,oe),g=Q.hasEagerState?Q.eagerState:s(g,oe)}else K={lane:oe,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},D===null?(C=D=K,w=g):D=D.next=K,Ue.lanes|=oe,Fi|=oe;Q=Q.next}while(Q!==null&&Q!==i);if(D===null?w=g:D.next=C,!$n(g,n.memoizedState)&&(Pt=!0,ee&&(s=Ul,s!==null)))throw s;n.memoizedState=g,n.baseState=w,n.baseQueue=D,c.lastRenderedState=g}return p===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function Jf(n){var i=Ut(),s=i.queue;if(s===null)throw Error(a(311));s.lastRenderedReducer=n;var c=s.dispatch,p=s.pending,g=i.memoizedState;if(p!==null){s.pending=null;var w=p=p.next;do g=n(g,w.action),w=w.next;while(w!==p);$n(g,i.memoizedState)||(Pt=!0),i.memoizedState=g,i.baseQueue===null&&(i.baseState=g),s.lastRenderedState=g}return[g,c]}function mv(n,i,s){var c=Ue,p=Ut(),g=Xe;if(g){if(s===void 0)throw Error(a(407));s=s()}else s=i();var w=!$n((ht||p).memoizedState,s);if(w&&(p.memoizedState=s,Pt=!0),p=p.queue,th(yv.bind(null,c,p,n),[n]),p.getSnapshot!==i||w||Bt!==null&&Bt.memoizedState.tag&1){if(c.flags|=2048,Fl(9,{destroy:void 0},gv.bind(null,c,p,s,i),null),yt===null)throw Error(a(349));g||(ri&127)!==0||pv(c,i,s)}return s}function pv(n,i,s){n.flags|=16384,n={getSnapshot:i,value:s},i=Ue.updateQueue,i===null?(i=Yu(),Ue.updateQueue=i,i.stores=[n]):(s=i.stores,s===null?i.stores=[n]:s.push(n))}function gv(n,i,s,c){i.value=s,i.getSnapshot=c,vv(i)&&xv(n)}function yv(n,i,s){return s(function(){vv(i)&&xv(n)})}function vv(n){var i=n.getSnapshot;n=n.value;try{var s=i();return!$n(n,s)}catch{return!0}}function xv(n){var i=Da(n,2);i!==null&&zn(i,n,2)}function Wf(n){var i=gn();if(typeof n=="function"){var s=n;if(n=s(),Fa){un(!0);try{s()}finally{un(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:n},i}function bv(n,i,s,c){return n.baseState=s,Xf(n,ht,typeof c=="function"?c:ii)}function JC(n,i,s,c,p){if(tc(n))throw Error(a(485));if(n=i.action,n!==null){var g={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){g.listeners.push(w)}};B.T!==null?s(!0):g.isTransition=!1,c(g),s=i.pending,s===null?(g.next=i.pending=g,Sv(i,g)):(g.next=s.next,i.pending=s.next=g)}}function Sv(n,i){var s=i.action,c=i.payload,p=n.state;if(i.isTransition){var g=B.T,w={};B.T=w;try{var C=s(p,c),D=B.S;D!==null&&D(w,C),wv(n,i,C)}catch(Q){eh(n,i,Q)}finally{g!==null&&w.types!==null&&(g.types=w.types),B.T=g}}else try{g=s(p,c),wv(n,i,g)}catch(Q){eh(n,i,Q)}}function wv(n,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(c){kv(n,i,c)},function(c){return eh(n,i,c)}):kv(n,i,s)}function kv(n,i,s){i.status="fulfilled",i.value=s,jv(i),n.state=s,i=n.pending,i!==null&&(s=i.next,s===i?n.pending=null:(s=s.next,i.next=s,Sv(n,s)))}function eh(n,i,s){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=s,jv(i),i=i.next;while(i!==c)}n.action=null}function jv(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function Ev(n,i){return i}function Cv(n,i){if(Xe){var s=yt.formState;if(s!==null){e:{var c=Ue;if(Xe){if(wt){t:{for(var p=wt,g=or;p.nodeType!==8;){if(!g){p=null;break t}if(p=cr(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g==="F!"||g==="F"?p:null}if(p){wt=cr(p.nextSibling),c=p.data==="F!";break e}}Di(c)}c=!1}c&&(i=s[0])}}return s=gn(),s.memoizedState=s.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ev,lastRenderedState:i},s.queue=c,s=Zv.bind(null,Ue,c),c.dispatch=s,c=Wf(!1),g=lh.bind(null,Ue,!1,c.queue),c=gn(),p={state:i,dispatch:null,action:n,pending:null},c.queue=p,s=JC.bind(null,Ue,p,g,s),p.dispatch=s,c.memoizedState=n,[i,s,!1]}function Nv(n){var i=Ut();return _v(i,ht,n)}function _v(n,i,s){if(i=Xf(n,i,Ev)[0],n=Ju(ii)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=co(i)}catch(w){throw w===Il?qu:w}else c=i;i=Ut();var p=i.queue,g=p.dispatch;return s!==i.memoizedState&&(Ue.flags|=2048,Fl(9,{destroy:void 0},WC.bind(null,p,s),null)),[c,g,n]}function WC(n,i){n.action=i}function Av(n){var i=Ut(),s=ht;if(s!==null)return _v(i,s,n);Ut(),i=i.memoizedState,s=Ut();var c=s.queue.dispatch;return s.memoizedState=n,[i,c,!1]}function Fl(n,i,s,c){return n={tag:n,create:s,deps:c,inst:i,next:null},i=Ue.updateQueue,i===null&&(i=Yu(),Ue.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=n.next=n:(c=s.next,s.next=n,n.next=c,i.lastEffect=n),n}function Tv(){return Ut().memoizedState}function Wu(n,i,s,c){var p=gn();Ue.flags|=n,p.memoizedState=Fl(1|i,{destroy:void 0},s,c===void 0?null:c)}function ec(n,i,s,c){var p=Ut();c=c===void 0?null:c;var g=p.memoizedState.inst;ht!==null&&c!==null&&Zf(c,ht.memoizedState.deps)?p.memoizedState=Fl(i,g,s,c):(Ue.flags|=n,p.memoizedState=Fl(1|i,g,s,c))}function zv(n,i){Wu(8390656,8,n,i)}function th(n,i){ec(2048,8,n,i)}function eN(n){Ue.flags|=4;var i=Ue.updateQueue;if(i===null)i=Yu(),Ue.updateQueue=i,i.events=[n];else{var s=i.events;s===null?i.events=[n]:s.push(n)}}function Rv(n){var i=Ut().memoizedState;return eN({ref:i,nextImpl:n}),function(){if((lt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function Ov(n,i){return ec(4,2,n,i)}function Dv(n,i){return ec(4,4,n,i)}function Mv(n,i){if(typeof i=="function"){n=n();var s=i(n);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function Lv(n,i,s){s=s!=null?s.concat([n]):null,ec(4,4,Mv.bind(null,i,n),s)}function nh(){}function Uv(n,i){var s=Ut();i=i===void 0?null:i;var c=s.memoizedState;return i!==null&&Zf(i,c[1])?c[0]:(s.memoizedState=[n,i],n)}function Iv(n,i){var s=Ut();i=i===void 0?null:i;var c=s.memoizedState;if(i!==null&&Zf(i,c[1]))return c[0];if(c=n(),Fa){un(!0);try{n()}finally{un(!1)}}return s.memoizedState=[c,i],c}function rh(n,i,s){return s===void 0||(ri&1073741824)!==0&&(Ge&261930)===0?n.memoizedState=i:(n.memoizedState=s,n=Bx(),Ue.lanes|=n,Fi|=n,s)}function Bv(n,i,s,c){return $n(s,i)?s:Pl.current!==null?(n=rh(n,s,c),$n(n,i)||(Pt=!0),n):(ri&42)===0||(ri&1073741824)!==0&&(Ge&261930)===0?(Pt=!0,n.memoizedState=s):(n=Bx(),Ue.lanes|=n,Fi|=n,i)}function Pv(n,i,s,c,p){var g=J.p;J.p=g!==0&&8>g?g:8;var w=B.T,C={};B.T=C,lh(n,!1,i,s);try{var D=p(),Q=B.S;if(Q!==null&&Q(C,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var ee=KC(D,c);fo(n,i,ee,Qn(n))}else fo(n,i,c,Qn(n))}catch(oe){fo(n,i,{then:function(){},status:"rejected",reason:oe},Qn())}finally{J.p=g,w!==null&&C.types!==null&&(w.types=C.types),B.T=w}}function tN(){}function ih(n,i,s,c){if(n.tag!==5)throw Error(a(476));var p=$v(n).queue;Pv(n,p,i,pe,s===null?tN:function(){return qv(n),s(c)})}function $v(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:pe},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:s},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function qv(n){var i=$v(n);i.next===null&&(i=n.alternate.memoizedState),fo(n,i.next.queue,{},Qn())}function ah(){return ln(Ao)}function Fv(){return Ut().memoizedState}function Hv(){return Ut().memoizedState}function nN(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var s=Qn();n=Ui(s);var c=Ii(i,n,s);c!==null&&(zn(c,i,s),lo(c,i,s)),i={cache:Df()},n.payload=i;return}i=i.return}}function rN(n,i,s){var c=Qn();s={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},tc(n)?Vv(i,s):(s=kf(n,i,s,c),s!==null&&(zn(s,n,c),Qv(s,i,c)))}function Zv(n,i,s){var c=Qn();fo(n,i,s,c)}function fo(n,i,s,c){var p={lane:c,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(tc(n))Vv(i,p);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=i.lastRenderedReducer,g!==null))try{var w=i.lastRenderedState,C=g(w,s);if(p.hasEagerState=!0,p.eagerState=C,$n(C,w))return Mu(n,i,p,0),yt===null&&Du(),!1}catch{}finally{}if(s=kf(n,i,p,c),s!==null)return zn(s,n,c),Qv(s,i,c),!0}return!1}function lh(n,i,s,c){if(c={lane:2,revertLane:Ih(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},tc(n)){if(i)throw Error(a(479))}else i=kf(n,s,c,2),i!==null&&zn(i,n,2)}function tc(n){var i=n.alternate;return n===Ue||i!==null&&i===Ue}function Vv(n,i){$l=Gu=!0;var s=n.pending;s===null?i.next=i:(i.next=s.next,s.next=i),n.pending=i}function Qv(n,i,s){if((s&4194048)!==0){var c=i.lanes;c&=n.pendingLanes,s|=c,i.lanes=s,Jg(n,s)}}var ho={readContext:ln,use:Xu,useCallback:Rt,useContext:Rt,useEffect:Rt,useImperativeHandle:Rt,useLayoutEffect:Rt,useInsertionEffect:Rt,useMemo:Rt,useReducer:Rt,useRef:Rt,useState:Rt,useDebugValue:Rt,useDeferredValue:Rt,useTransition:Rt,useSyncExternalStore:Rt,useId:Rt,useHostTransitionStatus:Rt,useFormState:Rt,useActionState:Rt,useOptimistic:Rt,useMemoCache:Rt,useCacheRefresh:Rt};ho.useEffectEvent=Rt;var Gv={readContext:ln,use:Xu,useCallback:function(n,i){return gn().memoizedState=[n,i===void 0?null:i],n},useContext:ln,useEffect:zv,useImperativeHandle:function(n,i,s){s=s!=null?s.concat([n]):null,Wu(4194308,4,Mv.bind(null,i,n),s)},useLayoutEffect:function(n,i){return Wu(4194308,4,n,i)},useInsertionEffect:function(n,i){Wu(4,2,n,i)},useMemo:function(n,i){var s=gn();i=i===void 0?null:i;var c=n();if(Fa){un(!0);try{n()}finally{un(!1)}}return s.memoizedState=[c,i],c},useReducer:function(n,i,s){var c=gn();if(s!==void 0){var p=s(i);if(Fa){un(!0);try{s(i)}finally{un(!1)}}}else p=i;return c.memoizedState=c.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},c.queue=n,n=n.dispatch=rN.bind(null,Ue,n),[c.memoizedState,n]},useRef:function(n){var i=gn();return n={current:n},i.memoizedState=n},useState:function(n){n=Wf(n);var i=n.queue,s=Zv.bind(null,Ue,i);return i.dispatch=s,[n.memoizedState,s]},useDebugValue:nh,useDeferredValue:function(n,i){var s=gn();return rh(s,n,i)},useTransition:function(){var n=Wf(!1);return n=Pv.bind(null,Ue,n.queue,!0,!1),gn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,s){var c=Ue,p=gn();if(Xe){if(s===void 0)throw Error(a(407));s=s()}else{if(s=i(),yt===null)throw Error(a(349));(Ge&127)!==0||pv(c,i,s)}p.memoizedState=s;var g={value:s,getSnapshot:i};return p.queue=g,zv(yv.bind(null,c,g,n),[n]),c.flags|=2048,Fl(9,{destroy:void 0},gv.bind(null,c,g,s,i),null),s},useId:function(){var n=gn(),i=yt.identifierPrefix;if(Xe){var s=Rr,c=zr;s=(c&~(1<<32-ct(c)-1)).toString(32)+s,i="_"+i+"R_"+s,s=Ku++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=YC++,i="_"+i+"r_"+s.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:ah,useFormState:Cv,useActionState:Cv,useOptimistic:function(n){var i=gn();i.memoizedState=i.baseState=n;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=lh.bind(null,Ue,!0,s),s.dispatch=i,[n,i]},useMemoCache:Yf,useCacheRefresh:function(){return gn().memoizedState=nN.bind(null,Ue)},useEffectEvent:function(n){var i=gn(),s={impl:n};return i.memoizedState=s,function(){if((lt&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}},sh={readContext:ln,use:Xu,useCallback:Uv,useContext:ln,useEffect:th,useImperativeHandle:Lv,useInsertionEffect:Ov,useLayoutEffect:Dv,useMemo:Iv,useReducer:Ju,useRef:Tv,useState:function(){return Ju(ii)},useDebugValue:nh,useDeferredValue:function(n,i){var s=Ut();return Bv(s,ht.memoizedState,n,i)},useTransition:function(){var n=Ju(ii)[0],i=Ut().memoizedState;return[typeof n=="boolean"?n:co(n),i]},useSyncExternalStore:mv,useId:Fv,useHostTransitionStatus:ah,useFormState:Nv,useActionState:Nv,useOptimistic:function(n,i){var s=Ut();return bv(s,ht,n,i)},useMemoCache:Yf,useCacheRefresh:Hv};sh.useEffectEvent=Rv;var Kv={readContext:ln,use:Xu,useCallback:Uv,useContext:ln,useEffect:th,useImperativeHandle:Lv,useInsertionEffect:Ov,useLayoutEffect:Dv,useMemo:Iv,useReducer:Jf,useRef:Tv,useState:function(){return Jf(ii)},useDebugValue:nh,useDeferredValue:function(n,i){var s=Ut();return ht===null?rh(s,n,i):Bv(s,ht.memoizedState,n,i)},useTransition:function(){var n=Jf(ii)[0],i=Ut().memoizedState;return[typeof n=="boolean"?n:co(n),i]},useSyncExternalStore:mv,useId:Fv,useHostTransitionStatus:ah,useFormState:Av,useActionState:Av,useOptimistic:function(n,i){var s=Ut();return ht!==null?bv(s,ht,n,i):(s.baseState=n,[n,s.queue.dispatch])},useMemoCache:Yf,useCacheRefresh:Hv};Kv.useEffectEvent=Rv;function oh(n,i,s,c){i=n.memoizedState,s=s(c,i),s=s==null?i:y({},i,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var uh={enqueueSetState:function(n,i,s){n=n._reactInternals;var c=Qn(),p=Ui(c);p.payload=i,s!=null&&(p.callback=s),i=Ii(n,p,c),i!==null&&(zn(i,n,c),lo(i,n,c))},enqueueReplaceState:function(n,i,s){n=n._reactInternals;var c=Qn(),p=Ui(c);p.tag=1,p.payload=i,s!=null&&(p.callback=s),i=Ii(n,p,c),i!==null&&(zn(i,n,c),lo(i,n,c))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var s=Qn(),c=Ui(s);c.tag=2,i!=null&&(c.callback=i),i=Ii(n,c,s),i!==null&&(zn(i,n,s),lo(i,n,s))}};function Yv(n,i,s,c,p,g,w){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,g,w):i.prototype&&i.prototype.isPureReactComponent?!Js(s,c)||!Js(p,g):!0}function Xv(n,i,s,c){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,c),i.state!==n&&uh.enqueueReplaceState(i,i.state,null)}function Ha(n,i){var s=i;if("ref"in i){s={};for(var c in i)c!=="ref"&&(s[c]=i[c])}if(n=n.defaultProps){s===i&&(s=y({},s));for(var p in n)s[p]===void 0&&(s[p]=n[p])}return s}function Jv(n){Ou(n)}function Wv(n){console.error(n)}function ex(n){Ou(n)}function nc(n,i){try{var s=n.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function tx(n,i,s){try{var c=n.onCaughtError;c(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function ch(n,i,s){return s=Ui(s),s.tag=3,s.payload={element:null},s.callback=function(){nc(n,i)},s}function nx(n){return n=Ui(n),n.tag=3,n}function rx(n,i,s,c){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var g=c.value;n.payload=function(){return p(g)},n.callback=function(){tx(i,s,c)}}var w=s.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(n.callback=function(){tx(i,s,c),typeof p!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var C=c.stack;this.componentDidCatch(c.value,{componentStack:C!==null?C:""})})}function iN(n,i,s,c,p){if(s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=s.alternate,i!==null&&Ml(i,s,p,!0),s=Fn.current,s!==null){switch(s.tag){case 31:case 13:return ur===null?mc():s.alternate===null&&Ot===0&&(Ot=3),s.flags&=-257,s.flags|=65536,s.lanes=p,c===Fu?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([c]):i.add(c),Mh(n,c,p)),!1;case 22:return s.flags|=65536,c===Fu?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([c]):s.add(c)),Mh(n,c,p)),!1}throw Error(a(435,s.tag))}return Mh(n,c,p),mc(),!1}if(Xe)return i=Fn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=p,c!==Af&&(n=Error(a(422),{cause:c}),to(ar(n,s)))):(c!==Af&&(i=Error(a(423),{cause:c}),to(ar(i,s))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,c=ar(c,s),p=ch(n.stateNode,c,p),Pf(n,p),Ot!==4&&(Ot=2)),!1;var g=Error(a(520),{cause:c});if(g=ar(g,s),So===null?So=[g]:So.push(g),Ot!==4&&(Ot=2),i===null)return!0;c=ar(c,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,n=p&-p,s.lanes|=n,n=ch(s.stateNode,c,n),Pf(s,n),!1;case 1:if(i=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Hi===null||!Hi.has(g))))return s.flags|=65536,p&=-p,s.lanes|=p,p=nx(p),rx(p,n,s,c),Pf(s,p),!1}s=s.return}while(s!==null);return!1}var dh=Error(a(461)),Pt=!1;function sn(n,i,s,c){i.child=n===null?sv(i,null,s,c):qa(i,n.child,s,c)}function ix(n,i,s,c,p){s=s.render;var g=i.ref;if("ref"in c){var w={};for(var C in c)C!=="ref"&&(w[C]=c[C])}else w=c;return Ia(i),c=Vf(n,i,s,w,g,p),C=Qf(),n!==null&&!Pt?(Gf(n,i,p),ai(n,i,p)):(Xe&&C&&Nf(i),i.flags|=1,sn(n,i,c,p),i.child)}function ax(n,i,s,c,p){if(n===null){var g=s.type;return typeof g=="function"&&!jf(g)&&g.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=g,lx(n,i,g,c,p)):(n=Uu(s.type,null,c,i,i.mode,p),n.ref=i.ref,n.return=i,i.child=n)}if(g=n.child,!xh(n,p)){var w=g.memoizedProps;if(s=s.compare,s=s!==null?s:Js,s(w,c)&&n.ref===i.ref)return ai(n,i,p)}return i.flags|=1,n=Wr(g,c),n.ref=i.ref,n.return=i,i.child=n}function lx(n,i,s,c,p){if(n!==null){var g=n.memoizedProps;if(Js(g,c)&&n.ref===i.ref)if(Pt=!1,i.pendingProps=c=g,xh(n,p))(n.flags&131072)!==0&&(Pt=!0);else return i.lanes=n.lanes,ai(n,i,p)}return fh(n,i,s,c,p)}function sx(n,i,s,c){var p=c.children,g=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,n!==null){for(c=i.child=n.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~g}else c=0,i.child=null;return ox(n,i,g,s,c)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&$u(i,g!==null?g.cachePool:null),g!==null?cv(i,g):qf(),dv(i);else return c=i.lanes=536870912,ox(n,i,g!==null?g.baseLanes|s:s,s,c)}else g!==null?($u(i,g.cachePool),cv(i,g),Pi(),i.memoizedState=null):(n!==null&&$u(i,null),qf(),Pi());return sn(n,i,p,s),i.child}function mo(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function ox(n,i,s,c,p){var g=Lf();return g=g===null?null:{parent:It._currentValue,pool:g},i.memoizedState={baseLanes:s,cachePool:g},n!==null&&$u(i,null),qf(),dv(i),n!==null&&Ml(n,i,c,!0),i.childLanes=p,null}function rc(n,i){return i=ac({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function ux(n,i,s){return qa(i,n.child,null,s),n=rc(i,i.pendingProps),n.flags|=2,Hn(i),i.memoizedState=null,n}function aN(n,i,s){var c=i.pendingProps,p=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(Xe){if(c.mode==="hidden")return n=rc(i,c),i.lanes=536870912,mo(null,n);if(Hf(i),(n=wt)?(n=Sb(n,or),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Ri!==null?{id:zr,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},s=Vy(n),s.return=i,i.child=s,an=i,wt=null)):n=null,n===null)throw Di(i);return i.lanes=536870912,null}return rc(i,c)}var g=n.memoizedState;if(g!==null){var w=g.dehydrated;if(Hf(i),p)if(i.flags&256)i.flags&=-257,i=ux(n,i,s);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(a(558));else if(Pt||Ml(n,i,s,!1),p=(s&n.childLanes)!==0,Pt||p){if(c=yt,c!==null&&(w=Wg(c,s),w!==0&&w!==g.retryLane))throw g.retryLane=w,Da(n,w),zn(c,n,w),dh;mc(),i=ux(n,i,s)}else n=g.treeContext,wt=cr(w.nextSibling),an=i,Xe=!0,Oi=null,or=!1,n!==null&&Ky(i,n),i=rc(i,c),i.flags|=4096;return i}return n=Wr(n.child,{mode:c.mode,children:c.children}),n.ref=i.ref,i.child=n,n.return=i,n}function ic(n,i){var s=i.ref;if(s===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(a(284));(n===null||n.ref!==s)&&(i.flags|=4194816)}}function fh(n,i,s,c,p){return Ia(i),s=Vf(n,i,s,c,void 0,p),c=Qf(),n!==null&&!Pt?(Gf(n,i,p),ai(n,i,p)):(Xe&&c&&Nf(i),i.flags|=1,sn(n,i,s,p),i.child)}function cx(n,i,s,c,p,g){return Ia(i),i.updateQueue=null,s=hv(i,c,s,p),fv(n),c=Qf(),n!==null&&!Pt?(Gf(n,i,g),ai(n,i,g)):(Xe&&c&&Nf(i),i.flags|=1,sn(n,i,s,g),i.child)}function dx(n,i,s,c,p){if(Ia(i),i.stateNode===null){var g=zl,w=s.contextType;typeof w=="object"&&w!==null&&(g=ln(w)),g=new s(c,g),i.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=uh,i.stateNode=g,g._reactInternals=i,g=i.stateNode,g.props=c,g.state=i.memoizedState,g.refs={},If(i),w=s.contextType,g.context=typeof w=="object"&&w!==null?ln(w):zl,g.state=i.memoizedState,w=s.getDerivedStateFromProps,typeof w=="function"&&(oh(i,s,w,c),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(w=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),w!==g.state&&uh.enqueueReplaceState(g,g.state,null),oo(i,c,g,p),so(),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(n===null){g=i.stateNode;var C=i.memoizedProps,D=Ha(s,C);g.props=D;var Q=g.context,ee=s.contextType;w=zl,typeof ee=="object"&&ee!==null&&(w=ln(ee));var oe=s.getDerivedStateFromProps;ee=typeof oe=="function"||typeof g.getSnapshotBeforeUpdate=="function",C=i.pendingProps!==C,ee||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(C||Q!==w)&&Xv(i,g,c,w),Li=!1;var K=i.memoizedState;g.state=K,oo(i,c,g,p),so(),Q=i.memoizedState,C||K!==Q||Li?(typeof oe=="function"&&(oh(i,s,oe,c),Q=i.memoizedState),(D=Li||Yv(i,s,D,c,K,Q,w))?(ee||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(i.flags|=4194308)):(typeof g.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=Q),g.props=c,g.state=Q,g.context=w,c=D):(typeof g.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{g=i.stateNode,Bf(n,i),w=i.memoizedProps,ee=Ha(s,w),g.props=ee,oe=i.pendingProps,K=g.context,Q=s.contextType,D=zl,typeof Q=="object"&&Q!==null&&(D=ln(Q)),C=s.getDerivedStateFromProps,(Q=typeof C=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w!==oe||K!==D)&&Xv(i,g,c,D),Li=!1,K=i.memoizedState,g.state=K,oo(i,c,g,p),so();var Y=i.memoizedState;w!==oe||K!==Y||Li||n!==null&&n.dependencies!==null&&Bu(n.dependencies)?(typeof C=="function"&&(oh(i,s,C,c),Y=i.memoizedState),(ee=Li||Yv(i,s,ee,c,K,Y,D)||n!==null&&n.dependencies!==null&&Bu(n.dependencies))?(Q||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,Y,D),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,Y,D)),typeof g.componentDidUpdate=="function"&&(i.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof g.componentDidUpdate!="function"||w===n.memoizedProps&&K===n.memoizedState||(i.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&K===n.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=Y),g.props=c,g.state=Y,g.context=D,c=ee):(typeof g.componentDidUpdate!="function"||w===n.memoizedProps&&K===n.memoizedState||(i.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&K===n.memoizedState||(i.flags|=1024),c=!1)}return g=c,ic(n,i),c=(i.flags&128)!==0,g||c?(g=i.stateNode,s=c&&typeof s.getDerivedStateFromError!="function"?null:g.render(),i.flags|=1,n!==null&&c?(i.child=qa(i,n.child,null,p),i.child=qa(i,null,s,p)):sn(n,i,s,p),i.memoizedState=g.state,n=i.child):n=ai(n,i,p),n}function fx(n,i,s,c){return La(),i.flags|=256,sn(n,i,s,c),i.child}var hh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mh(n){return{baseLanes:n,cachePool:tv()}}function ph(n,i,s){return n=n!==null?n.childLanes&~s:0,i&&(n|=Vn),n}function hx(n,i,s){var c=i.pendingProps,p=!1,g=(i.flags&128)!==0,w;if((w=g)||(w=n!==null&&n.memoizedState===null?!1:(Lt.current&2)!==0),w&&(p=!0,i.flags&=-129),w=(i.flags&32)!==0,i.flags&=-33,n===null){if(Xe){if(p?Bi(i):Pi(),(n=wt)?(n=Sb(n,or),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Ri!==null?{id:zr,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},s=Vy(n),s.return=i,i.child=s,an=i,wt=null)):n=null,n===null)throw Di(i);return Xh(n)?i.lanes=32:i.lanes=536870912,null}var C=c.children;return c=c.fallback,p?(Pi(),p=i.mode,C=ac({mode:"hidden",children:C},p),c=Ma(c,p,s,null),C.return=i,c.return=i,C.sibling=c,i.child=C,c=i.child,c.memoizedState=mh(s),c.childLanes=ph(n,w,s),i.memoizedState=hh,mo(null,c)):(Bi(i),gh(i,C))}var D=n.memoizedState;if(D!==null&&(C=D.dehydrated,C!==null)){if(g)i.flags&256?(Bi(i),i.flags&=-257,i=yh(n,i,s)):i.memoizedState!==null?(Pi(),i.child=n.child,i.flags|=128,i=null):(Pi(),C=c.fallback,p=i.mode,c=ac({mode:"visible",children:c.children},p),C=Ma(C,p,s,null),C.flags|=2,c.return=i,C.return=i,c.sibling=C,i.child=c,qa(i,n.child,null,s),c=i.child,c.memoizedState=mh(s),c.childLanes=ph(n,w,s),i.memoizedState=hh,i=mo(null,c));else if(Bi(i),Xh(C)){if(w=C.nextSibling&&C.nextSibling.dataset,w)var Q=w.dgst;w=Q,c=Error(a(419)),c.stack="",c.digest=w,to({value:c,source:null,stack:null}),i=yh(n,i,s)}else if(Pt||Ml(n,i,s,!1),w=(s&n.childLanes)!==0,Pt||w){if(w=yt,w!==null&&(c=Wg(w,s),c!==0&&c!==D.retryLane))throw D.retryLane=c,Da(n,c),zn(w,n,c),dh;Yh(C)||mc(),i=yh(n,i,s)}else Yh(C)?(i.flags|=192,i.child=n.child,i=null):(n=D.treeContext,wt=cr(C.nextSibling),an=i,Xe=!0,Oi=null,or=!1,n!==null&&Ky(i,n),i=gh(i,c.children),i.flags|=4096);return i}return p?(Pi(),C=c.fallback,p=i.mode,D=n.child,Q=D.sibling,c=Wr(D,{mode:"hidden",children:c.children}),c.subtreeFlags=D.subtreeFlags&65011712,Q!==null?C=Wr(Q,C):(C=Ma(C,p,s,null),C.flags|=2),C.return=i,c.return=i,c.sibling=C,i.child=c,mo(null,c),c=i.child,C=n.child.memoizedState,C===null?C=mh(s):(p=C.cachePool,p!==null?(D=It._currentValue,p=p.parent!==D?{parent:D,pool:D}:p):p=tv(),C={baseLanes:C.baseLanes|s,cachePool:p}),c.memoizedState=C,c.childLanes=ph(n,w,s),i.memoizedState=hh,mo(n.child,c)):(Bi(i),s=n.child,n=s.sibling,s=Wr(s,{mode:"visible",children:c.children}),s.return=i,s.sibling=null,n!==null&&(w=i.deletions,w===null?(i.deletions=[n],i.flags|=16):w.push(n)),i.child=s,i.memoizedState=null,s)}function gh(n,i){return i=ac({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function ac(n,i){return n=qn(22,n,null,i),n.lanes=0,n}function yh(n,i,s){return qa(i,n.child,null,s),n=gh(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function mx(n,i,s){n.lanes|=i;var c=n.alternate;c!==null&&(c.lanes|=i),Rf(n.return,i,s)}function vh(n,i,s,c,p,g){var w=n.memoizedState;w===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:p,treeForkCount:g}:(w.isBackwards=i,w.rendering=null,w.renderingStartTime=0,w.last=c,w.tail=s,w.tailMode=p,w.treeForkCount=g)}function px(n,i,s){var c=i.pendingProps,p=c.revealOrder,g=c.tail;c=c.children;var w=Lt.current,C=(w&2)!==0;if(C?(w=w&1|2,i.flags|=128):w&=1,_(Lt,w),sn(n,i,c,s),c=Xe?eo:0,!C&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&mx(n,s,i);else if(n.tag===19)mx(n,s,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(s=i.child,p=null;s!==null;)n=s.alternate,n!==null&&Qu(n)===null&&(p=s),s=s.sibling;s=p,s===null?(p=i.child,i.child=null):(p=s.sibling,s.sibling=null),vh(i,!1,p,s,g,c);break;case"backwards":case"unstable_legacy-backwards":for(s=null,p=i.child,i.child=null;p!==null;){if(n=p.alternate,n!==null&&Qu(n)===null){i.child=p;break}n=p.sibling,p.sibling=s,s=p,p=n}vh(i,!0,s,null,g,c);break;case"together":vh(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function ai(n,i,s){if(n!==null&&(i.dependencies=n.dependencies),Fi|=i.lanes,(s&i.childLanes)===0)if(n!==null){if(Ml(n,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(a(153));if(i.child!==null){for(n=i.child,s=Wr(n,n.pendingProps),i.child=s,s.return=i;n.sibling!==null;)n=n.sibling,s=s.sibling=Wr(n,n.pendingProps),s.return=i;s.sibling=null}return i.child}function xh(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Bu(n)))}function lN(n,i,s){switch(i.tag){case 3:De(i,i.stateNode.containerInfo),Mi(i,It,n.memoizedState.cache),La();break;case 27:case 5:jt(i);break;case 4:De(i,i.stateNode.containerInfo);break;case 10:Mi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Hf(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(Bi(i),i.flags|=128,null):(s&i.child.childLanes)!==0?hx(n,i,s):(Bi(i),n=ai(n,i,s),n!==null?n.sibling:null);Bi(i);break;case 19:var p=(n.flags&128)!==0;if(c=(s&i.childLanes)!==0,c||(Ml(n,i,s,!1),c=(s&i.childLanes)!==0),p){if(c)return px(n,i,s);i.flags|=128}if(p=i.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),_(Lt,Lt.current),c)break;return null;case 22:return i.lanes=0,sx(n,i,s,i.pendingProps);case 24:Mi(i,It,n.memoizedState.cache)}return ai(n,i,s)}function gx(n,i,s){if(n!==null)if(n.memoizedProps!==i.pendingProps)Pt=!0;else{if(!xh(n,s)&&(i.flags&128)===0)return Pt=!1,lN(n,i,s);Pt=(n.flags&131072)!==0}else Pt=!1,Xe&&(i.flags&1048576)!==0&&Gy(i,eo,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(n=Pa(i.elementType),i.type=n,typeof n=="function")jf(n)?(c=Ha(n,c),i.tag=1,i=dx(null,i,n,c,s)):(i.tag=0,i=fh(null,i,n,c,s));else{if(n!=null){var p=n.$$typeof;if(p===I){i.tag=11,i=ix(null,i,n,c,s);break e}else if(p===$){i.tag=14,i=ax(null,i,n,c,s);break e}}throw i=de(n)||n,Error(a(306,i,""))}}return i;case 0:return fh(n,i,i.type,i.pendingProps,s);case 1:return c=i.type,p=Ha(c,i.pendingProps),dx(n,i,c,p,s);case 3:e:{if(De(i,i.stateNode.containerInfo),n===null)throw Error(a(387));c=i.pendingProps;var g=i.memoizedState;p=g.element,Bf(n,i),oo(i,c,null,s);var w=i.memoizedState;if(c=w.cache,Mi(i,It,c),c!==g.cache&&Of(i,[It],s,!0),so(),c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache},i.updateQueue.baseState=g,i.memoizedState=g,i.flags&256){i=fx(n,i,c,s);break e}else if(c!==p){p=ar(Error(a(424)),i),to(p),i=fx(n,i,c,s);break e}else{switch(n=i.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(wt=cr(n.firstChild),an=i,Xe=!0,Oi=null,or=!0,s=sv(i,null,c,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(La(),c===p){i=ai(n,i,s);break e}sn(n,i,c,s)}i=i.child}return i;case 26:return ic(n,i),n===null?(s=Nb(i.type,null,i.pendingProps,null))?i.memoizedState=s:Xe||(s=i.type,n=i.pendingProps,c=Sc(ce.current).createElement(s),c[rn]=i,c[En]=n,on(c,s,n),Yt(c),i.stateNode=c):i.memoizedState=Nb(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return jt(i),n===null&&Xe&&(c=i.stateNode=jb(i.type,i.pendingProps,ce.current),an=i,or=!0,p=wt,Gi(i.type)?(Jh=p,wt=cr(c.firstChild)):wt=p),sn(n,i,i.pendingProps.children,s),ic(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&Xe&&((p=c=wt)&&(c=LN(c,i.type,i.pendingProps,or),c!==null?(i.stateNode=c,an=i,wt=cr(c.firstChild),or=!1,p=!0):p=!1),p||Di(i)),jt(i),p=i.type,g=i.pendingProps,w=n!==null?n.memoizedProps:null,c=g.children,Qh(p,g)?c=null:w!==null&&Qh(p,w)&&(i.flags|=32),i.memoizedState!==null&&(p=Vf(n,i,XC,null,null,s),Ao._currentValue=p),ic(n,i),sn(n,i,c,s),i.child;case 6:return n===null&&Xe&&((n=s=wt)&&(s=UN(s,i.pendingProps,or),s!==null?(i.stateNode=s,an=i,wt=null,n=!0):n=!1),n||Di(i)),null;case 13:return hx(n,i,s);case 4:return De(i,i.stateNode.containerInfo),c=i.pendingProps,n===null?i.child=qa(i,null,c,s):sn(n,i,c,s),i.child;case 11:return ix(n,i,i.type,i.pendingProps,s);case 7:return sn(n,i,i.pendingProps,s),i.child;case 8:return sn(n,i,i.pendingProps.children,s),i.child;case 12:return sn(n,i,i.pendingProps.children,s),i.child;case 10:return c=i.pendingProps,Mi(i,i.type,c.value),sn(n,i,c.children,s),i.child;case 9:return p=i.type._context,c=i.pendingProps.children,Ia(i),p=ln(p),c=c(p),i.flags|=1,sn(n,i,c,s),i.child;case 14:return ax(n,i,i.type,i.pendingProps,s);case 15:return lx(n,i,i.type,i.pendingProps,s);case 19:return px(n,i,s);case 31:return aN(n,i,s);case 22:return sx(n,i,s,i.pendingProps);case 24:return Ia(i),c=ln(It),n===null?(p=Lf(),p===null&&(p=yt,g=Df(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=s),p=g),i.memoizedState={parent:c,cache:p},If(i),Mi(i,It,p)):((n.lanes&s)!==0&&(Bf(n,i),oo(i,null,null,s),so()),p=n.memoizedState,g=i.memoizedState,p.parent!==c?(p={parent:c,cache:c},i.memoizedState=p,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=p),Mi(i,It,c)):(c=g.cache,Mi(i,It,c),c!==p.cache&&Of(i,[It],s,!0))),sn(n,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function li(n){n.flags|=4}function bh(n,i,s,c,p){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(Fx())n.flags|=8192;else throw $a=Fu,Uf}else n.flags&=-16777217}function yx(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Rb(i))if(Fx())n.flags|=8192;else throw $a=Fu,Uf}function lc(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?ue():536870912,n.lanes|=i,Ql|=i)}function po(n,i){if(!Xe)switch(n.tailMode){case"hidden":i=n.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function kt(n){var i=n.alternate!==null&&n.alternate.child===n.child,s=0,c=0;if(i)for(var p=n.child;p!==null;)s|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)s|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=c,n.childLanes=s,i}function sN(n,i,s){var c=i.pendingProps;switch(_f(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(i),null;case 1:return kt(i),null;case 3:return s=i.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),ni(It),ve(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(n===null||n.child===null)&&(Dl(i)?li(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Tf())),kt(i),null;case 26:var p=i.type,g=i.memoizedState;return n===null?(li(i),g!==null?(kt(i),yx(i,g)):(kt(i),bh(i,p,null,c,s))):g?g!==n.memoizedState?(li(i),kt(i),yx(i,g)):(kt(i),i.flags&=-16777217):(n=n.memoizedProps,n!==c&&li(i),kt(i),bh(i,p,n,c,s)),null;case 27:if(Wt(i),s=ce.current,p=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&li(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return kt(i),null}n=se.current,Dl(i)?Yy(i):(n=jb(p,c,s),i.stateNode=n,li(i))}return kt(i),null;case 5:if(Wt(i),p=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==c&&li(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return kt(i),null}if(g=se.current,Dl(i))Yy(i);else{var w=Sc(ce.current);switch(g){case 1:g=w.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:g=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":g=w.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":g=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":g=w.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?w.createElement("select",{is:c.is}):w.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?w.createElement(p,{is:c.is}):w.createElement(p)}}g[rn]=i,g[En]=c;e:for(w=i.child;w!==null;){if(w.tag===5||w.tag===6)g.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===i)break e;for(;w.sibling===null;){if(w.return===null||w.return===i)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}i.stateNode=g;e:switch(on(g,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&li(i)}}return kt(i),bh(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,s),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==c&&li(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(n=ce.current,Dl(i)){if(n=i.stateNode,s=i.memoizedProps,c=null,p=an,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}n[rn]=i,n=!!(n.nodeValue===s||c!==null&&c.suppressHydrationWarning===!0||hb(n.nodeValue,s)),n||Di(i,!0)}else n=Sc(n).createTextNode(c),n[rn]=i,i.stateNode=n}return kt(i),null;case 31:if(s=i.memoizedState,n===null||n.memoizedState!==null){if(c=Dl(i),s!==null){if(n===null){if(!c)throw Error(a(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[rn]=i}else La(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;kt(i),n=!1}else s=Tf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return i.flags&256?(Hn(i),i):(Hn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return kt(i),null;case 13:if(c=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=Dl(i),c!==null&&c.dehydrated!==null){if(n===null){if(!p)throw Error(a(318));if(p=i.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[rn]=i}else La(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;kt(i),p=!1}else p=Tf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return i.flags&256?(Hn(i),i):(Hn(i),null)}return Hn(i),(i.flags&128)!==0?(i.lanes=s,i):(s=c!==null,n=n!==null&&n.memoizedState!==null,s&&(c=i.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==p&&(c.flags|=2048)),s!==n&&s&&(i.child.flags|=8192),lc(i,i.updateQueue),kt(i),null);case 4:return ve(),n===null&&qh(i.stateNode.containerInfo),kt(i),null;case 10:return ni(i.type),kt(i),null;case 19:if(L(Lt),c=i.memoizedState,c===null)return kt(i),null;if(p=(i.flags&128)!==0,g=c.rendering,g===null)if(p)po(c,!1);else{if(Ot!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(g=Qu(n),g!==null){for(i.flags|=128,po(c,!1),n=g.updateQueue,i.updateQueue=n,lc(i,n),i.subtreeFlags=0,n=s,s=i.child;s!==null;)Zy(s,n),s=s.sibling;return _(Lt,Lt.current&1|2),Xe&&ei(i,c.treeForkCount),i.child}n=n.sibling}c.tail!==null&&tn()>dc&&(i.flags|=128,p=!0,po(c,!1),i.lanes=4194304)}else{if(!p)if(n=Qu(g),n!==null){if(i.flags|=128,p=!0,n=n.updateQueue,i.updateQueue=n,lc(i,n),po(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!Xe)return kt(i),null}else 2*tn()-c.renderingStartTime>dc&&s!==536870912&&(i.flags|=128,p=!0,po(c,!1),i.lanes=4194304);c.isBackwards?(g.sibling=i.child,i.child=g):(n=c.last,n!==null?n.sibling=g:i.child=g,c.last=g)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=tn(),n.sibling=null,s=Lt.current,_(Lt,p?s&1|2:s&1),Xe&&ei(i,c.treeForkCount),n):(kt(i),null);case 22:case 23:return Hn(i),Ff(),c=i.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(s&536870912)!==0&&(i.flags&128)===0&&(kt(i),i.subtreeFlags&6&&(i.flags|=8192)):kt(i),s=i.updateQueue,s!==null&&lc(i,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==s&&(i.flags|=2048),n!==null&&L(Ba),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),ni(It),kt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function oN(n,i){switch(_f(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return ni(It),ve(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return Wt(i),null;case 31:if(i.memoizedState!==null){if(Hn(i),i.alternate===null)throw Error(a(340));La()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(Hn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(a(340));La()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return L(Lt),null;case 4:return ve(),null;case 10:return ni(i.type),null;case 22:case 23:return Hn(i),Ff(),n!==null&&L(Ba),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return ni(It),null;case 25:return null;default:return null}}function vx(n,i){switch(_f(i),i.tag){case 3:ni(It),ve();break;case 26:case 27:case 5:Wt(i);break;case 4:ve();break;case 31:i.memoizedState!==null&&Hn(i);break;case 13:Hn(i);break;case 19:L(Lt);break;case 10:ni(i.type);break;case 22:case 23:Hn(i),Ff(),n!==null&&L(Ba);break;case 24:ni(It)}}function go(n,i){try{var s=i.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var p=c.next;s=p;do{if((s.tag&n)===n){c=void 0;var g=s.create,w=s.inst;c=g(),w.destroy=c}s=s.next}while(s!==p)}}catch(C){ft(i,i.return,C)}}function $i(n,i,s){try{var c=i.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var g=p.next;c=g;do{if((c.tag&n)===n){var w=c.inst,C=w.destroy;if(C!==void 0){w.destroy=void 0,p=i;var D=s,Q=C;try{Q()}catch(ee){ft(p,D,ee)}}}c=c.next}while(c!==g)}}catch(ee){ft(i,i.return,ee)}}function xx(n){var i=n.updateQueue;if(i!==null){var s=n.stateNode;try{uv(i,s)}catch(c){ft(n,n.return,c)}}}function bx(n,i,s){s.props=Ha(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(c){ft(n,i,c)}}function yo(n,i){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof s=="function"?n.refCleanup=s(c):s.current=c}}catch(p){ft(n,i,p)}}function Or(n,i){var s=n.ref,c=n.refCleanup;if(s!==null)if(typeof c=="function")try{c()}catch(p){ft(n,i,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){ft(n,i,p)}else s.current=null}function Sx(n){var i=n.type,s=n.memoizedProps,c=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&c.focus();break e;case"img":s.src?c.src=s.src:s.srcSet&&(c.srcset=s.srcSet)}}catch(p){ft(n,n.return,p)}}function Sh(n,i,s){try{var c=n.stateNode;TN(c,n.type,s,i),c[En]=i}catch(p){ft(n,n.return,p)}}function wx(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Gi(n.type)||n.tag===4}function wh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||wx(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Gi(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function kh(n,i,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(n),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Xr));else if(c!==4&&(c===27&&Gi(n.type)&&(s=n.stateNode,i=null),n=n.child,n!==null))for(kh(n,i,s),n=n.sibling;n!==null;)kh(n,i,s),n=n.sibling}function sc(n,i,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,i?s.insertBefore(n,i):s.appendChild(n);else if(c!==4&&(c===27&&Gi(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(sc(n,i,s),n=n.sibling;n!==null;)sc(n,i,s),n=n.sibling}function kx(n){var i=n.stateNode,s=n.memoizedProps;try{for(var c=n.type,p=i.attributes;p.length;)i.removeAttributeNode(p[0]);on(i,c,s),i[rn]=n,i[En]=s}catch(g){ft(n,n.return,g)}}var si=!1,$t=!1,jh=!1,jx=typeof WeakSet=="function"?WeakSet:Set,Xt=null;function uN(n,i){if(n=n.containerInfo,Zh=_c,n=Ly(n),yf(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var w=0,C=-1,D=-1,Q=0,ee=0,oe=n,K=null;t:for(;;){for(var Y;oe!==s||p!==0&&oe.nodeType!==3||(C=w+p),oe!==g||c!==0&&oe.nodeType!==3||(D=w+c),oe.nodeType===3&&(w+=oe.nodeValue.length),(Y=oe.firstChild)!==null;)K=oe,oe=Y;for(;;){if(oe===n)break t;if(K===s&&++Q===p&&(C=w),K===g&&++ee===c&&(D=w),(Y=oe.nextSibling)!==null)break;oe=K,K=oe.parentNode}oe=Y}s=C===-1||D===-1?null:{start:C,end:D}}else s=null}s=s||{start:0,end:0}}else s=null;for(Vh={focusedElem:n,selectionRange:s},_c=!1,Xt=i;Xt!==null;)if(i=Xt,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,Xt=n;else for(;Xt!==null;){switch(i=Xt,g=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s<n.length;s++)p=n[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&g!==null){n=void 0,s=i,p=g.memoizedProps,g=g.memoizedState,c=s.stateNode;try{var Se=Ha(s.type,p);n=c.getSnapshotBeforeUpdate(Se,g),c.__reactInternalSnapshotBeforeUpdate=n}catch(Re){ft(s,s.return,Re)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,s=n.nodeType,s===9)Kh(n);else if(s===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Kh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=i.sibling,n!==null){n.return=i.return,Xt=n;break}Xt=i.return}}function Ex(n,i,s){var c=s.flags;switch(s.tag){case 0:case 11:case 15:ui(n,s),c&4&&go(5,s);break;case 1:if(ui(n,s),c&4)if(n=s.stateNode,i===null)try{n.componentDidMount()}catch(w){ft(s,s.return,w)}else{var p=Ha(s.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(p,i,n.__reactInternalSnapshotBeforeUpdate)}catch(w){ft(s,s.return,w)}}c&64&&xx(s),c&512&&yo(s,s.return);break;case 3:if(ui(n,s),c&64&&(n=s.updateQueue,n!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{uv(n,i)}catch(w){ft(s,s.return,w)}}break;case 27:i===null&&c&4&&kx(s);case 26:case 5:ui(n,s),i===null&&c&4&&Sx(s),c&512&&yo(s,s.return);break;case 12:ui(n,s);break;case 31:ui(n,s),c&4&&_x(n,s);break;case 13:ui(n,s),c&4&&Ax(n,s),c&64&&(n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(s=vN.bind(null,s),IN(n,s))));break;case 22:if(c=s.memoizedState!==null||si,!c){i=i!==null&&i.memoizedState!==null||$t,p=si;var g=$t;si=c,($t=i)&&!g?ci(n,s,(s.subtreeFlags&8772)!==0):ui(n,s),si=p,$t=g}break;case 30:break;default:ui(n,s)}}function Cx(n){var i=n.alternate;i!==null&&(n.alternate=null,Cx(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&Wd(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Ct=null,Nn=!1;function oi(n,i,s){for(s=s.child;s!==null;)Nx(n,i,s),s=s.sibling}function Nx(n,i,s){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(nn,s)}catch{}switch(s.tag){case 26:$t||Or(s,i),oi(n,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:$t||Or(s,i);var c=Ct,p=Nn;Gi(s.type)&&(Ct=s.stateNode,Nn=!1),oi(n,i,s),Co(s.stateNode),Ct=c,Nn=p;break;case 5:$t||Or(s,i);case 6:if(c=Ct,p=Nn,Ct=null,oi(n,i,s),Ct=c,Nn=p,Ct!==null)if(Nn)try{(Ct.nodeType===9?Ct.body:Ct.nodeName==="HTML"?Ct.ownerDocument.body:Ct).removeChild(s.stateNode)}catch(g){ft(s,i,g)}else try{Ct.removeChild(s.stateNode)}catch(g){ft(s,i,g)}break;case 18:Ct!==null&&(Nn?(n=Ct,xb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,s.stateNode),ts(n)):xb(Ct,s.stateNode));break;case 4:c=Ct,p=Nn,Ct=s.stateNode.containerInfo,Nn=!0,oi(n,i,s),Ct=c,Nn=p;break;case 0:case 11:case 14:case 15:$i(2,s,i),$t||$i(4,s,i),oi(n,i,s);break;case 1:$t||(Or(s,i),c=s.stateNode,typeof c.componentWillUnmount=="function"&&bx(s,i,c)),oi(n,i,s);break;case 21:oi(n,i,s);break;case 22:$t=(c=$t)||s.memoizedState!==null,oi(n,i,s),$t=c;break;default:oi(n,i,s)}}function _x(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ts(n)}catch(s){ft(i,i.return,s)}}}function Ax(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ts(n)}catch(s){ft(i,i.return,s)}}function cN(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new jx),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new jx),i;default:throw Error(a(435,n.tag))}}function oc(n,i){var s=cN(n);i.forEach(function(c){if(!s.has(c)){s.add(c);var p=xN.bind(null,n,c);c.then(p,p)}})}function _n(n,i){var s=i.deletions;if(s!==null)for(var c=0;c<s.length;c++){var p=s[c],g=n,w=i,C=w;e:for(;C!==null;){switch(C.tag){case 27:if(Gi(C.type)){Ct=C.stateNode,Nn=!1;break e}break;case 5:Ct=C.stateNode,Nn=!1;break e;case 3:case 4:Ct=C.stateNode.containerInfo,Nn=!0;break e}C=C.return}if(Ct===null)throw Error(a(160));Nx(g,w,p),Ct=null,Nn=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Tx(i,n),i=i.sibling}var wr=null;function Tx(n,i){var s=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:_n(i,n),An(n),c&4&&($i(3,n,n.return),go(3,n),$i(5,n,n.return));break;case 1:_n(i,n),An(n),c&512&&($t||s===null||Or(s,s.return)),c&64&&si&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(s=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=s===null?c:s.concat(c))));break;case 26:var p=wr;if(_n(i,n),An(n),c&512&&($t||s===null||Or(s,s.return)),c&4){var g=s!==null?s.memoizedState:null;if(c=n.memoizedState,s===null)if(c===null)if(n.stateNode===null){e:{c=n.type,s=n.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":g=p.getElementsByTagName("title")[0],(!g||g[Fs]||g[rn]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=p.createElement(c),p.head.insertBefore(g,p.querySelector("head > title"))),on(g,c,s),g[rn]=n,Yt(g),c=g;break e;case"link":var w=Tb("link","href",p).get(c+(s.href||""));if(w){for(var C=0;C<w.length;C++)if(g=w[C],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){w.splice(C,1);break t}}g=p.createElement(c),on(g,c,s),p.head.appendChild(g);break;case"meta":if(w=Tb("meta","content",p).get(c+(s.content||""))){for(C=0;C<w.length;C++)if(g=w[C],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){w.splice(C,1);break t}}g=p.createElement(c),on(g,c,s),p.head.appendChild(g);break;default:throw Error(a(468,c))}g[rn]=n,Yt(g),c=g}n.stateNode=c}else zb(p,n.type,n.stateNode);else n.stateNode=Ab(p,c,n.memoizedProps);else g!==c?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,c===null?zb(p,n.type,n.stateNode):Ab(p,c,n.memoizedProps)):c===null&&n.stateNode!==null&&Sh(n,n.memoizedProps,s.memoizedProps)}break;case 27:_n(i,n),An(n),c&512&&($t||s===null||Or(s,s.return)),s!==null&&c&4&&Sh(n,n.memoizedProps,s.memoizedProps);break;case 5:if(_n(i,n),An(n),c&512&&($t||s===null||Or(s,s.return)),n.flags&32){p=n.stateNode;try{jl(p,"")}catch(Se){ft(n,n.return,Se)}}c&4&&n.stateNode!=null&&(p=n.memoizedProps,Sh(n,p,s!==null?s.memoizedProps:p)),c&1024&&(jh=!0);break;case 6:if(_n(i,n),An(n),c&4){if(n.stateNode===null)throw Error(a(162));c=n.memoizedProps,s=n.stateNode;try{s.nodeValue=c}catch(Se){ft(n,n.return,Se)}}break;case 3:if(jc=null,p=wr,wr=wc(i.containerInfo),_n(i,n),wr=p,An(n),c&4&&s!==null&&s.memoizedState.isDehydrated)try{ts(i.containerInfo)}catch(Se){ft(n,n.return,Se)}jh&&(jh=!1,zx(n));break;case 4:c=wr,wr=wc(n.stateNode.containerInfo),_n(i,n),An(n),wr=c;break;case 12:_n(i,n),An(n);break;case 31:_n(i,n),An(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,oc(n,c)));break;case 13:_n(i,n),An(n),n.child.flags&8192&&n.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(cc=tn()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,oc(n,c)));break;case 22:p=n.memoizedState!==null;var D=s!==null&&s.memoizedState!==null,Q=si,ee=$t;if(si=Q||p,$t=ee||D,_n(i,n),$t=ee,si=Q,An(n),c&8192)e:for(i=n.stateNode,i._visibility=p?i._visibility&-2:i._visibility|1,p&&(s===null||D||si||$t||Za(n)),s=null,i=n;;){if(i.tag===5||i.tag===26){if(s===null){D=s=i;try{if(g=D.stateNode,p)w=g.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{C=D.stateNode;var oe=D.memoizedProps.style,K=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;C.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(Se){ft(D,D.return,Se)}}}else if(i.tag===6){if(s===null){D=i;try{D.stateNode.nodeValue=p?"":D.memoizedProps}catch(Se){ft(D,D.return,Se)}}}else if(i.tag===18){if(s===null){D=i;try{var Y=D.stateNode;p?bb(Y,!0):bb(D.stateNode,!1)}catch(Se){ft(D,D.return,Se)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=n.updateQueue,c!==null&&(s=c.retryQueue,s!==null&&(c.retryQueue=null,oc(n,s))));break;case 19:_n(i,n),An(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,oc(n,c)));break;case 30:break;case 21:break;default:_n(i,n),An(n)}}function An(n){var i=n.flags;if(i&2){try{for(var s,c=n.return;c!==null;){if(wx(c)){s=c;break}c=c.return}if(s==null)throw Error(a(160));switch(s.tag){case 27:var p=s.stateNode,g=wh(n);sc(n,g,p);break;case 5:var w=s.stateNode;s.flags&32&&(jl(w,""),s.flags&=-33);var C=wh(n);sc(n,C,w);break;case 3:case 4:var D=s.stateNode.containerInfo,Q=wh(n);kh(n,Q,D);break;default:throw Error(a(161))}}catch(ee){ft(n,n.return,ee)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function zx(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;zx(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function ui(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Ex(n,i.alternate,i),i=i.sibling}function Za(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:$i(4,i,i.return),Za(i);break;case 1:Or(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&bx(i,i.return,s),Za(i);break;case 27:Co(i.stateNode);case 26:case 5:Or(i,i.return),Za(i);break;case 22:i.memoizedState===null&&Za(i);break;case 30:Za(i);break;default:Za(i)}n=n.sibling}}function ci(n,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,p=n,g=i,w=g.flags;switch(g.tag){case 0:case 11:case 15:ci(p,g,s),go(4,g);break;case 1:if(ci(p,g,s),c=g,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(Q){ft(c,c.return,Q)}if(c=g,p=c.updateQueue,p!==null){var C=c.stateNode;try{var D=p.shared.hiddenCallbacks;if(D!==null)for(p.shared.hiddenCallbacks=null,p=0;p<D.length;p++)ov(D[p],C)}catch(Q){ft(c,c.return,Q)}}s&&w&64&&xx(g),yo(g,g.return);break;case 27:kx(g);case 26:case 5:ci(p,g,s),s&&c===null&&w&4&&Sx(g),yo(g,g.return);break;case 12:ci(p,g,s);break;case 31:ci(p,g,s),s&&w&4&&_x(p,g);break;case 13:ci(p,g,s),s&&w&4&&Ax(p,g);break;case 22:g.memoizedState===null&&ci(p,g,s),yo(g,g.return);break;case 30:break;default:ci(p,g,s)}i=i.sibling}}function Eh(n,i){var s=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==s&&(n!=null&&n.refCount++,s!=null&&no(s))}function Ch(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&no(n))}function kr(n,i,s,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Rx(n,i,s,c),i=i.sibling}function Rx(n,i,s,c){var p=i.flags;switch(i.tag){case 0:case 11:case 15:kr(n,i,s,c),p&2048&&go(9,i);break;case 1:kr(n,i,s,c);break;case 3:kr(n,i,s,c),p&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&no(n)));break;case 12:if(p&2048){kr(n,i,s,c),n=i.stateNode;try{var g=i.memoizedProps,w=g.id,C=g.onPostCommit;typeof C=="function"&&C(w,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(D){ft(i,i.return,D)}}else kr(n,i,s,c);break;case 31:kr(n,i,s,c);break;case 13:kr(n,i,s,c);break;case 23:break;case 22:g=i.stateNode,w=i.alternate,i.memoizedState!==null?g._visibility&2?kr(n,i,s,c):vo(n,i):g._visibility&2?kr(n,i,s,c):(g._visibility|=2,Hl(n,i,s,c,(i.subtreeFlags&10256)!==0||!1)),p&2048&&Eh(w,i);break;case 24:kr(n,i,s,c),p&2048&&Ch(i.alternate,i);break;default:kr(n,i,s,c)}}function Hl(n,i,s,c,p){for(p=p&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var g=n,w=i,C=s,D=c,Q=w.flags;switch(w.tag){case 0:case 11:case 15:Hl(g,w,C,D,p),go(8,w);break;case 23:break;case 22:var ee=w.stateNode;w.memoizedState!==null?ee._visibility&2?Hl(g,w,C,D,p):vo(g,w):(ee._visibility|=2,Hl(g,w,C,D,p)),p&&Q&2048&&Eh(w.alternate,w);break;case 24:Hl(g,w,C,D,p),p&&Q&2048&&Ch(w.alternate,w);break;default:Hl(g,w,C,D,p)}i=i.sibling}}function vo(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=n,c=i,p=c.flags;switch(c.tag){case 22:vo(s,c),p&2048&&Eh(c.alternate,c);break;case 24:vo(s,c),p&2048&&Ch(c.alternate,c);break;default:vo(s,c)}i=i.sibling}}var xo=8192;function Zl(n,i,s){if(n.subtreeFlags&xo)for(n=n.child;n!==null;)Ox(n,i,s),n=n.sibling}function Ox(n,i,s){switch(n.tag){case 26:Zl(n,i,s),n.flags&xo&&n.memoizedState!==null&&YN(s,wr,n.memoizedState,n.memoizedProps);break;case 5:Zl(n,i,s);break;case 3:case 4:var c=wr;wr=wc(n.stateNode.containerInfo),Zl(n,i,s),wr=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=xo,xo=16777216,Zl(n,i,s),xo=c):Zl(n,i,s));break;default:Zl(n,i,s)}}function Dx(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function bo(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Xt=c,Lx(c,n)}Dx(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Mx(n),n=n.sibling}function Mx(n){switch(n.tag){case 0:case 11:case 15:bo(n),n.flags&2048&&$i(9,n,n.return);break;case 3:bo(n);break;case 12:bo(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,uc(n)):bo(n);break;default:bo(n)}}function uc(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];Xt=c,Lx(c,n)}Dx(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:$i(8,i,i.return),uc(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,uc(i));break;default:uc(i)}n=n.sibling}}function Lx(n,i){for(;Xt!==null;){var s=Xt;switch(s.tag){case 0:case 11:case 15:$i(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var c=s.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:no(s.memoizedState.cache)}if(c=s.child,c!==null)c.return=s,Xt=c;else e:for(s=n;Xt!==null;){c=Xt;var p=c.sibling,g=c.return;if(Cx(c),c===s){Xt=null;break e}if(p!==null){p.return=g,Xt=p;break e}Xt=g}}}var dN={getCacheForType:function(n){var i=ln(It),s=i.data.get(n);return s===void 0&&(s=n(),i.data.set(n,s)),s},cacheSignal:function(){return ln(It).controller.signal}},fN=typeof WeakMap=="function"?WeakMap:Map,lt=0,yt=null,He=null,Ge=0,dt=0,Zn=null,qi=!1,Vl=!1,Nh=!1,di=0,Ot=0,Fi=0,Va=0,_h=0,Vn=0,Ql=0,So=null,Tn=null,Ah=!1,cc=0,Ux=0,dc=1/0,fc=null,Hi=null,Zt=0,Zi=null,Gl=null,fi=0,Th=0,zh=null,Ix=null,wo=0,Rh=null;function Qn(){return(lt&2)!==0&&Ge!==0?Ge&-Ge:B.T!==null?Ih():ey()}function Bx(){if(Vn===0)if((Ge&536870912)===0||Xe){var n=Na;Na<<=1,(Na&3932160)===0&&(Na=262144),Vn=n}else Vn=536870912;return n=Fn.current,n!==null&&(n.flags|=32),Vn}function zn(n,i,s){(n===yt&&(dt===2||dt===9)||n.cancelPendingCommit!==null)&&(Kl(n,0),Vi(n,Ge,Vn,!1)),pn(n,s),((lt&2)===0||n!==yt)&&(n===yt&&((lt&2)===0&&(Va|=s),Ot===4&&Vi(n,Ge,Vn,!1)),Dr(n))}function Px(n,i,s){if((lt&6)!==0)throw Error(a(327));var c=!s&&(i&127)===0&&(i&n.expiredLanes)===0||Ai(n,i),p=c?pN(n,i):Dh(n,i,!0),g=c;do{if(p===0){Vl&&!c&&Vi(n,i,0,!1);break}else{if(s=n.current.alternate,g&&!hN(s)){p=Dh(n,i,!1),g=!1;continue}if(p===2){if(g=i,n.errorRecoveryDisabledLanes&g)var w=0;else w=n.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){i=w;e:{var C=n;p=So;var D=C.current.memoizedState.isDehydrated;if(D&&(Kl(C,w).flags|=256),w=Dh(C,w,!1),w!==2){if(Nh&&!D){C.errorRecoveryDisabledLanes|=g,Va|=g,p=4;break e}g=Tn,Tn=p,g!==null&&(Tn===null?Tn=g:Tn.push.apply(Tn,g))}p=w}if(g=!1,p!==2)continue}}if(p===1){Kl(n,0),Vi(n,i,0,!0);break}e:{switch(c=n,g=p,g){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:Vi(c,i,Vn,!qi);break e;case 2:Tn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(p=cc+300-tn(),10<p)){if(Vi(c,i,Vn,!qi),Aa(c,0,!0)!==0)break e;fi=i,c.timeoutHandle=yb($x.bind(null,c,s,Tn,fc,Ah,i,Vn,Va,Ql,qi,g,"Throttled",-0,0),p);break e}$x(c,s,Tn,fc,Ah,i,Vn,Va,Ql,qi,g,null,-0,0)}}break}while(!0);Dr(n)}function $x(n,i,s,c,p,g,w,C,D,Q,ee,oe,K,Y){if(n.timeoutHandle=-1,oe=i.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xr},Ox(i,g,oe);var Se=(g&62914560)===g?cc-tn():(g&4194048)===g?Ux-tn():0;if(Se=XN(oe,Se),Se!==null){fi=g,n.cancelPendingCommit=Se(Kx.bind(null,n,i,g,s,c,p,w,C,D,ee,oe,null,K,Y)),Vi(n,g,w,!Q);return}}Kx(n,i,g,s,c,p,w,C,D)}function hN(n){for(var i=n;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var c=0;c<s.length;c++){var p=s[c],g=p.getSnapshot;p=p.value;try{if(!$n(g(),p))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Vi(n,i,s,c){i&=~_h,i&=~Va,n.suspendedLanes|=i,n.pingedLanes&=~i,c&&(n.warmLanes|=i),c=n.expirationTimes;for(var p=i;0<p;){var g=31-ct(p),w=1<<g;c[g]=-1,p&=~w}s!==0&&Kd(n,s,i)}function hc(){return(lt&6)===0?(ko(0),!1):!0}function Oh(){if(He!==null){if(dt===0)var n=He.return;else n=He,ti=Ua=null,Kf(n),Bl=null,io=0,n=He;for(;n!==null;)vx(n.alternate,n),n=n.return;He=null}}function Kl(n,i){var s=n.timeoutHandle;s!==-1&&(n.timeoutHandle=-1,ON(s)),s=n.cancelPendingCommit,s!==null&&(n.cancelPendingCommit=null,s()),fi=0,Oh(),yt=n,He=s=Wr(n.current,null),Ge=i,dt=0,Zn=null,qi=!1,Vl=Ai(n,i),Nh=!1,Ql=Vn=_h=Va=Fi=Ot=0,Tn=So=null,Ah=!1,(i&8)!==0&&(i|=i&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=i;0<c;){var p=31-ct(c),g=1<<p;i|=n[p],c&=~g}return di=i,Du(),s}function qx(n,i){Ue=null,B.H=ho,i===Il||i===qu?(i=iv(),dt=3):i===Uf?(i=iv(),dt=4):dt=i===dh?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Zn=i,He===null&&(Ot=1,nc(n,ar(i,n.current)))}function Fx(){var n=Fn.current;return n===null?!0:(Ge&4194048)===Ge?ur===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?n===ur:!1}function Hx(){var n=B.H;return B.H=ho,n===null?ho:n}function Zx(){var n=B.A;return B.A=dN,n}function mc(){Ot=4,qi||(Ge&4194048)!==Ge&&Fn.current!==null||(Vl=!0),(Fi&134217727)===0&&(Va&134217727)===0||yt===null||Vi(yt,Ge,Vn,!1)}function Dh(n,i,s){var c=lt;lt|=2;var p=Hx(),g=Zx();(yt!==n||Ge!==i)&&(fc=null,Kl(n,i)),i=!1;var w=Ot;e:do try{if(dt!==0&&He!==null){var C=He,D=Zn;switch(dt){case 8:Oh(),w=6;break e;case 3:case 2:case 9:case 6:Fn.current===null&&(i=!0);var Q=dt;if(dt=0,Zn=null,Yl(n,C,D,Q),s&&Vl){w=0;break e}break;default:Q=dt,dt=0,Zn=null,Yl(n,C,D,Q)}}mN(),w=Ot;break}catch(ee){qx(n,ee)}while(!0);return i&&n.shellSuspendCounter++,ti=Ua=null,lt=c,B.H=p,B.A=g,He===null&&(yt=null,Ge=0,Du()),w}function mN(){for(;He!==null;)Vx(He)}function pN(n,i){var s=lt;lt|=2;var c=Hx(),p=Zx();yt!==n||Ge!==i?(fc=null,dc=tn()+500,Kl(n,i)):Vl=Ai(n,i);e:do try{if(dt!==0&&He!==null){i=He;var g=Zn;t:switch(dt){case 1:dt=0,Zn=null,Yl(n,i,g,1);break;case 2:case 9:if(nv(g)){dt=0,Zn=null,Qx(i);break}i=function(){dt!==2&&dt!==9||yt!==n||(dt=7),Dr(n)},g.then(i,i);break e;case 3:dt=7;break e;case 4:dt=5;break e;case 7:nv(g)?(dt=0,Zn=null,Qx(i)):(dt=0,Zn=null,Yl(n,i,g,7));break;case 5:var w=null;switch(He.tag){case 26:w=He.memoizedState;case 5:case 27:var C=He;if(w?Rb(w):C.stateNode.complete){dt=0,Zn=null;var D=C.sibling;if(D!==null)He=D;else{var Q=C.return;Q!==null?(He=Q,pc(Q)):He=null}break t}}dt=0,Zn=null,Yl(n,i,g,5);break;case 6:dt=0,Zn=null,Yl(n,i,g,6);break;case 8:Oh(),Ot=6;break e;default:throw Error(a(462))}}gN();break}catch(ee){qx(n,ee)}while(!0);return ti=Ua=null,B.H=c,B.A=p,lt=s,He!==null?0:(yt=null,Ge=0,Du(),Ot)}function gN(){for(;He!==null&&!$s();)Vx(He)}function Vx(n){var i=gx(n.alternate,n,di);n.memoizedProps=n.pendingProps,i===null?pc(n):He=i}function Qx(n){var i=n,s=i.alternate;switch(i.tag){case 15:case 0:i=cx(s,i,i.pendingProps,i.type,void 0,Ge);break;case 11:i=cx(s,i,i.pendingProps,i.type.render,i.ref,Ge);break;case 5:Kf(i);default:vx(s,i),i=He=Zy(i,di),i=gx(s,i,di)}n.memoizedProps=n.pendingProps,i===null?pc(n):He=i}function Yl(n,i,s,c){ti=Ua=null,Kf(i),Bl=null,io=0;var p=i.return;try{if(iN(n,p,i,s,Ge)){Ot=1,nc(n,ar(s,n.current)),He=null;return}}catch(g){if(p!==null)throw He=p,g;Ot=1,nc(n,ar(s,n.current)),He=null;return}i.flags&32768?(Xe||c===1?n=!0:Vl||(Ge&536870912)!==0?n=!1:(qi=n=!0,(c===2||c===9||c===3||c===6)&&(c=Fn.current,c!==null&&c.tag===13&&(c.flags|=16384))),Gx(i,n)):pc(i)}function pc(n){var i=n;do{if((i.flags&32768)!==0){Gx(i,qi);return}n=i.return;var s=sN(i.alternate,i,di);if(s!==null){He=s;return}if(i=i.sibling,i!==null){He=i;return}He=i=n}while(i!==null);Ot===0&&(Ot=5)}function Gx(n,i){do{var s=oN(n.alternate,n);if(s!==null){s.flags&=32767,He=s;return}if(s=n.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(n=n.sibling,n!==null)){He=n;return}He=n=s}while(n!==null);Ot=6,He=null}function Kx(n,i,s,c,p,g,w,C,D){n.cancelPendingCommit=null;do gc();while(Zt!==0);if((lt&6)!==0)throw Error(a(327));if(i!==null){if(i===n.current)throw Error(a(177));if(g=i.lanes|i.childLanes,g|=wf,wu(n,s,g,w,C,D),n===yt&&(He=yt=null,Ge=0),Gl=i,Zi=n,fi=s,Th=g,zh=p,Ix=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,bN(Oe,function(){return eb(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=B.T,B.T=null,p=J.p,J.p=2,w=lt,lt|=4;try{uN(n,i,s)}finally{lt=w,J.p=p,B.T=c}}Zt=1,Yx(),Xx(),Jx()}}function Yx(){if(Zt===1){Zt=0;var n=Zi,i=Gl,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=B.T,B.T=null;var c=J.p;J.p=2;var p=lt;lt|=4;try{Tx(i,n);var g=Vh,w=Ly(n.containerInfo),C=g.focusedElem,D=g.selectionRange;if(w!==C&&C&&C.ownerDocument&&My(C.ownerDocument.documentElement,C)){if(D!==null&&yf(C)){var Q=D.start,ee=D.end;if(ee===void 0&&(ee=Q),"selectionStart"in C)C.selectionStart=Q,C.selectionEnd=Math.min(ee,C.value.length);else{var oe=C.ownerDocument||document,K=oe&&oe.defaultView||window;if(K.getSelection){var Y=K.getSelection(),Se=C.textContent.length,Re=Math.min(D.start,Se),pt=D.end===void 0?Re:Math.min(D.end,Se);!Y.extend&&Re>pt&&(w=pt,pt=Re,Re=w);var H=Dy(C,Re),P=Dy(C,pt);if(H&&P&&(Y.rangeCount!==1||Y.anchorNode!==H.node||Y.anchorOffset!==H.offset||Y.focusNode!==P.node||Y.focusOffset!==P.offset)){var V=oe.createRange();V.setStart(H.node,H.offset),Y.removeAllRanges(),Re>pt?(Y.addRange(V),Y.extend(P.node,P.offset)):(V.setEnd(P.node,P.offset),Y.addRange(V))}}}}for(oe=[],Y=C;Y=Y.parentNode;)Y.nodeType===1&&oe.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<oe.length;C++){var ae=oe[C];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}_c=!!Zh,Vh=Zh=null}finally{lt=p,J.p=c,B.T=s}}n.current=i,Zt=2}}function Xx(){if(Zt===2){Zt=0;var n=Zi,i=Gl,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=B.T,B.T=null;var c=J.p;J.p=2;var p=lt;lt|=4;try{Ex(n,i.alternate,i)}finally{lt=p,J.p=c,B.T=s}}Zt=3}}function Jx(){if(Zt===4||Zt===3){Zt=0,yl();var n=Zi,i=Gl,s=fi,c=Ix;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Zt=5:(Zt=0,Gl=Zi=null,Wx(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Hi=null),Xd(s),i=i.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(nn,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=B.T,p=J.p,J.p=2,B.T=null;try{for(var g=n.onRecoverableError,w=0;w<c.length;w++){var C=c[w];g(C.value,{componentStack:C.stack})}}finally{B.T=i,J.p=p}}(fi&3)!==0&&gc(),Dr(n),p=n.pendingLanes,(s&261930)!==0&&(p&42)!==0?n===Rh?wo++:(wo=0,Rh=n):wo=0,ko(0)}}function Wx(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,no(i)))}function gc(){return Yx(),Xx(),Jx(),eb()}function eb(){if(Zt!==5)return!1;var n=Zi,i=Th;Th=0;var s=Xd(fi),c=B.T,p=J.p;try{J.p=32>s?32:s,B.T=null,s=zh,zh=null;var g=Zi,w=fi;if(Zt=0,Gl=Zi=null,fi=0,(lt&6)!==0)throw Error(a(331));var C=lt;if(lt|=4,Mx(g.current),Rx(g,g.current,w,s),lt=C,ko(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(nn,g)}catch{}return!0}finally{J.p=p,B.T=c,Wx(n,i)}}function tb(n,i,s){i=ar(s,i),i=ch(n.stateNode,i,2),n=Ii(n,i,2),n!==null&&(pn(n,2),Dr(n))}function ft(n,i,s){if(n.tag===3)tb(n,n,s);else for(;i!==null;){if(i.tag===3){tb(i,n,s);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Hi===null||!Hi.has(c))){n=ar(s,n),s=nx(2),c=Ii(i,s,2),c!==null&&(rx(s,c,i,n),pn(c,2),Dr(c));break}}i=i.return}}function Mh(n,i,s){var c=n.pingCache;if(c===null){c=n.pingCache=new fN;var p=new Set;c.set(i,p)}else p=c.get(i),p===void 0&&(p=new Set,c.set(i,p));p.has(s)||(Nh=!0,p.add(s),n=yN.bind(null,n,i,s),i.then(n,n))}function yN(n,i,s){var c=n.pingCache;c!==null&&c.delete(i),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,yt===n&&(Ge&s)===s&&(Ot===4||Ot===3&&(Ge&62914560)===Ge&&300>tn()-cc?(lt&2)===0&&Kl(n,0):_h|=s,Ql===Ge&&(Ql=0)),Dr(n)}function nb(n,i){i===0&&(i=ue()),n=Da(n,i),n!==null&&(pn(n,i),Dr(n))}function vN(n){var i=n.memoizedState,s=0;i!==null&&(s=i.retryLane),nb(n,s)}function xN(n,i){var s=0;switch(n.tag){case 31:case 13:var c=n.stateNode,p=n.memoizedState;p!==null&&(s=p.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),nb(n,s)}function bN(n,i){return Kr(n,i)}var yc=null,Xl=null,Lh=!1,vc=!1,Uh=!1,Qi=0;function Dr(n){n!==Xl&&n.next===null&&(Xl===null?yc=Xl=n:Xl=Xl.next=n),vc=!0,Lh||(Lh=!0,wN())}function ko(n,i){if(!Uh&&vc){Uh=!0;do for(var s=!1,c=yc;c!==null;){if(n!==0){var p=c.pendingLanes;if(p===0)var g=0;else{var w=c.suspendedLanes,C=c.pingedLanes;g=(1<<31-ct(42|n)+1)-1,g&=p&~(w&~C),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,lb(c,g))}else g=Ge,g=Aa(c,c===yt?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||Ai(c,g)||(s=!0,lb(c,g));c=c.next}while(s);Uh=!1}}function SN(){rb()}function rb(){vc=Lh=!1;var n=0;Qi!==0&&RN()&&(n=Qi);for(var i=tn(),s=null,c=yc;c!==null;){var p=c.next,g=ib(c,i);g===0?(c.next=null,s===null?yc=p:s.next=p,p===null&&(Xl=s)):(s=c,(n!==0||(g&3)!==0)&&(vc=!0)),c=p}Zt!==0&&Zt!==5||ko(n),Qi!==0&&(Qi=0)}function ib(n,i){for(var s=n.suspendedLanes,c=n.pingedLanes,p=n.expirationTimes,g=n.pendingLanes&-62914561;0<g;){var w=31-ct(g),C=1<<w,D=p[w];D===-1?((C&s)===0||(C&c)!==0)&&(p[w]=Su(C,i)):D<=i&&(n.expiredLanes|=C),g&=~C}if(i=yt,s=Ge,s=Aa(n,n===i?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,s===0||n===i&&(dt===2||dt===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&_i(c),n.callbackNode=null,n.callbackPriority=0;if((s&3)===0||Ai(n,s)){if(i=s&-s,i===n.callbackPriority)return i;switch(c!==null&&_i(c),Xd(s)){case 2:case 8:s=me;break;case 32:s=Oe;break;case 268435456:s=nt;break;default:s=Oe}return c=ab.bind(null,n),s=Kr(s,c),n.callbackPriority=i,n.callbackNode=s,i}return c!==null&&c!==null&&_i(c),n.callbackPriority=2,n.callbackNode=null,2}function ab(n,i){if(Zt!==0&&Zt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var s=n.callbackNode;if(gc()&&n.callbackNode!==s)return null;var c=Ge;return c=Aa(n,n===yt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(Px(n,c,i),ib(n,tn()),n.callbackNode!=null&&n.callbackNode===s?ab.bind(null,n):null)}function lb(n,i){if(gc())return null;Px(n,i,!0)}function wN(){DN(function(){(lt&6)!==0?Kr(ne,SN):rb()})}function Ih(){if(Qi===0){var n=Ll;n===0&&(n=Ca,Ca<<=1,(Ca&261888)===0&&(Ca=256)),Qi=n}return Qi}function sb(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Cu(""+n)}function ob(n,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,n.id&&s.setAttribute("form",n.id),i.parentNode.insertBefore(s,i),n=new FormData(n),s.parentNode.removeChild(s),n}function kN(n,i,s,c,p){if(i==="submit"&&s&&s.stateNode===p){var g=sb((p[En]||null).action),w=c.submitter;w&&(i=(i=w[En]||null)?sb(i.formAction):w.getAttribute("formAction"),i!==null&&(g=i,w=null));var C=new Tu("action","action",null,c,p);n.push({event:C,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Qi!==0){var D=w?ob(p,w):new FormData(p);ih(s,{pending:!0,data:D,method:p.method,action:g},null,D)}}else typeof g=="function"&&(C.preventDefault(),D=w?ob(p,w):new FormData(p),ih(s,{pending:!0,data:D,method:p.method,action:g},g,D))},currentTarget:p}]})}}for(var Bh=0;Bh<Sf.length;Bh++){var Ph=Sf[Bh],jN=Ph.toLowerCase(),EN=Ph[0].toUpperCase()+Ph.slice(1);Sr(jN,"on"+EN)}Sr(By,"onAnimationEnd"),Sr(Py,"onAnimationIteration"),Sr($y,"onAnimationStart"),Sr("dblclick","onDoubleClick"),Sr("focusin","onFocus"),Sr("focusout","onBlur"),Sr($C,"onTransitionRun"),Sr(qC,"onTransitionStart"),Sr(FC,"onTransitionCancel"),Sr(qy,"onTransitionEnd"),wl("onMouseEnter",["mouseout","mouseover"]),wl("onMouseLeave",["mouseout","mouseover"]),wl("onPointerEnter",["pointerout","pointerover"]),wl("onPointerLeave",["pointerout","pointerover"]),Ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ta("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ta("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),CN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(jo));function ub(n,i){i=(i&4)!==0;for(var s=0;s<n.length;s++){var c=n[s],p=c.event;c=c.listeners;e:{var g=void 0;if(i)for(var w=c.length-1;0<=w;w--){var C=c[w],D=C.instance,Q=C.currentTarget;if(C=C.listener,D!==g&&p.isPropagationStopped())break e;g=C,p.currentTarget=Q;try{g(p)}catch(ee){Ou(ee)}p.currentTarget=null,g=D}else for(w=0;w<c.length;w++){if(C=c[w],D=C.instance,Q=C.currentTarget,C=C.listener,D!==g&&p.isPropagationStopped())break e;g=C,p.currentTarget=Q;try{g(p)}catch(ee){Ou(ee)}p.currentTarget=null,g=D}}}}function Ze(n,i){var s=i[Jd];s===void 0&&(s=i[Jd]=new Set);var c=n+"__bubble";s.has(c)||(cb(i,n,2,!1),s.add(c))}function $h(n,i,s){var c=0;i&&(c|=4),cb(s,n,c,i)}var xc="_reactListening"+Math.random().toString(36).slice(2);function qh(n){if(!n[xc]){n[xc]=!0,ry.forEach(function(s){s!=="selectionchange"&&(CN.has(s)||$h(s,!1,n),$h(s,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[xc]||(i[xc]=!0,$h("selectionchange",!1,i))}}function cb(n,i,s,c){switch(Bb(i)){case 2:var p=e_;break;case 8:p=t_;break;default:p=rm}s=p.bind(null,i,s,n),p=void 0,!of||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(p=!0),c?p!==void 0?n.addEventListener(i,s,{capture:!0,passive:p}):n.addEventListener(i,s,!0):p!==void 0?n.addEventListener(i,s,{passive:p}):n.addEventListener(i,s,!1)}function Fh(n,i,s,c,p){var g=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var C=c.stateNode.containerInfo;if(C===p)break;if(w===4)for(w=c.return;w!==null;){var D=w.tag;if((D===3||D===4)&&w.stateNode.containerInfo===p)return;w=w.return}for(;C!==null;){if(w=xl(C),w===null)return;if(D=w.tag,D===5||D===6||D===26||D===27){c=g=w;continue e}C=C.parentNode}}c=c.return}py(function(){var Q=g,ee=lf(s),oe=[];e:{var K=Fy.get(n);if(K!==void 0){var Y=Tu,Se=n;switch(n){case"keypress":if(_u(s)===0)break e;case"keydown":case"keyup":Y=xC;break;case"focusin":Se="focus",Y=ff;break;case"focusout":Se="blur",Y=ff;break;case"beforeblur":case"afterblur":Y=ff;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=vy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=sC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=wC;break;case By:case Py:case $y:Y=cC;break;case qy:Y=jC;break;case"scroll":case"scrollend":Y=aC;break;case"wheel":Y=CC;break;case"copy":case"cut":case"paste":Y=fC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=by;break;case"toggle":case"beforetoggle":Y=_C}var Re=(i&4)!==0,pt=!Re&&(n==="scroll"||n==="scrollend"),H=Re?K!==null?K+"Capture":null:K;Re=[];for(var P=Q,V;P!==null;){var ae=P;if(V=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||V===null||H===null||(ae=Zs(P,H),ae!=null&&Re.push(Eo(P,ae,V))),pt)break;P=P.return}0<Re.length&&(K=new Y(K,Se,null,s,ee),oe.push({event:K,listeners:Re}))}}if((i&7)===0){e:{if(K=n==="mouseover"||n==="pointerover",Y=n==="mouseout"||n==="pointerout",K&&s!==af&&(Se=s.relatedTarget||s.fromElement)&&(xl(Se)||Se[vl]))break e;if((Y||K)&&(K=ee.window===ee?ee:(K=ee.ownerDocument)?K.defaultView||K.parentWindow:window,Y?(Se=s.relatedTarget||s.toElement,Y=Q,Se=Se?xl(Se):null,Se!==null&&(pt=o(Se),Re=Se.tag,Se!==pt||Re!==5&&Re!==27&&Re!==6)&&(Se=null)):(Y=null,Se=Q),Y!==Se)){if(Re=vy,ae="onMouseLeave",H="onMouseEnter",P="mouse",(n==="pointerout"||n==="pointerover")&&(Re=by,ae="onPointerLeave",H="onPointerEnter",P="pointer"),pt=Y==null?K:Hs(Y),V=Se==null?K:Hs(Se),K=new Re(ae,P+"leave",Y,s,ee),K.target=pt,K.relatedTarget=V,ae=null,xl(ee)===Q&&(Re=new Re(H,P+"enter",Se,s,ee),Re.target=V,Re.relatedTarget=pt,ae=Re),pt=ae,Y&&Se)t:{for(Re=NN,H=Y,P=Se,V=0,ae=H;ae;ae=Re(ae))V++;ae=0;for(var _e=P;_e;_e=Re(_e))ae++;for(;0<V-ae;)H=Re(H),V--;for(;0<ae-V;)P=Re(P),ae--;for(;V--;){if(H===P||P!==null&&H===P.alternate){Re=H;break t}H=Re(H),P=Re(P)}Re=null}else Re=null;Y!==null&&db(oe,K,Y,Re,!1),Se!==null&&pt!==null&&db(oe,pt,Se,Re,!0)}}e:{if(K=Q?Hs(Q):window,Y=K.nodeName&&K.nodeName.toLowerCase(),Y==="select"||Y==="input"&&K.type==="file")var rt=_y;else if(Cy(K))if(Ay)rt=IC;else{rt=LC;var je=MC}else Y=K.nodeName,!Y||Y.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?Q&&rf(Q.elementType)&&(rt=_y):rt=UC;if(rt&&(rt=rt(n,Q))){Ny(oe,rt,s,ee);break e}je&&je(n,K,Q),n==="focusout"&&Q&&K.type==="number"&&Q.memoizedProps.value!=null&&nf(K,"number",K.value)}switch(je=Q?Hs(Q):window,n){case"focusin":(Cy(je)||je.contentEditable==="true")&&(_l=je,vf=Q,Ws=null);break;case"focusout":Ws=vf=_l=null;break;case"mousedown":xf=!0;break;case"contextmenu":case"mouseup":case"dragend":xf=!1,Uy(oe,s,ee);break;case"selectionchange":if(PC)break;case"keydown":case"keyup":Uy(oe,s,ee)}var Ie;if(mf)e:{switch(n){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Nl?jy(n,s)&&(Ke="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(Ke="onCompositionStart");Ke&&(Sy&&s.locale!=="ko"&&(Nl||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Nl&&(Ie=gy()):(zi=ee,uf="value"in zi?zi.value:zi.textContent,Nl=!0)),je=bc(Q,Ke),0<je.length&&(Ke=new xy(Ke,n,null,s,ee),oe.push({event:Ke,listeners:je}),Ie?Ke.data=Ie:(Ie=Ey(s),Ie!==null&&(Ke.data=Ie)))),(Ie=TC?zC(n,s):RC(n,s))&&(Ke=bc(Q,"onBeforeInput"),0<Ke.length&&(je=new xy("onBeforeInput","beforeinput",null,s,ee),oe.push({event:je,listeners:Ke}),je.data=Ie)),kN(oe,n,Q,s,ee)}ub(oe,i)})}function Eo(n,i,s){return{instance:n,listener:i,currentTarget:s}}function bc(n,i){for(var s=i+"Capture",c=[];n!==null;){var p=n,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=Zs(n,s),p!=null&&c.unshift(Eo(n,p,g)),p=Zs(n,i),p!=null&&c.push(Eo(n,p,g))),n.tag===3)return c;n=n.return}return[]}function NN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function db(n,i,s,c,p){for(var g=i._reactName,w=[];s!==null&&s!==c;){var C=s,D=C.alternate,Q=C.stateNode;if(C=C.tag,D!==null&&D===c)break;C!==5&&C!==26&&C!==27||Q===null||(D=Q,p?(Q=Zs(s,g),Q!=null&&w.unshift(Eo(s,Q,D))):p||(Q=Zs(s,g),Q!=null&&w.push(Eo(s,Q,D)))),s=s.return}w.length!==0&&n.push({event:i,listeners:w})}var _N=/\r\n?/g,AN=/\u0000|\uFFFD/g;function fb(n){return(typeof n=="string"?n:""+n).replace(_N,`
49
- `).replace(AN,"")}function hb(n,i){return i=fb(i),fb(n)===i}function mt(n,i,s,c,p,g){switch(s){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||jl(n,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&jl(n,""+c);break;case"className":ju(n,"class",c);break;case"tabIndex":ju(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":ju(n,s,c);break;case"style":hy(n,c,g);break;case"data":if(i!=="object"){ju(n,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||s!=="href")){n.removeAttribute(s);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(s);break}c=Cu(""+c),n.setAttribute(s,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(s==="formAction"?(i!=="input"&&mt(n,i,"name",p.name,p,null),mt(n,i,"formEncType",p.formEncType,p,null),mt(n,i,"formMethod",p.formMethod,p,null),mt(n,i,"formTarget",p.formTarget,p,null)):(mt(n,i,"encType",p.encType,p,null),mt(n,i,"method",p.method,p,null),mt(n,i,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(s);break}c=Cu(""+c),n.setAttribute(s,c);break;case"onClick":c!=null&&(n.onclick=Xr);break;case"onScroll":c!=null&&Ze("scroll",n);break;case"onScrollEnd":c!=null&&Ze("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(p.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}s=Cu(""+c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,""+c):n.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,""):n.removeAttribute(s);break;case"capture":case"download":c===!0?n.setAttribute(s,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(s,c):n.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(s,c):n.removeAttribute(s);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(s):n.setAttribute(s,c);break;case"popover":Ze("beforetoggle",n),Ze("toggle",n),ku(n,"popover",c);break;case"xlinkActuate":Yr(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Yr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Yr(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Yr(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Yr(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Yr(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Yr(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Yr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Yr(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":ku(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=rC.get(s)||s,ku(n,s,c))}}function Hh(n,i,s,c,p,g){switch(s){case"style":hy(n,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(s=c.__html,s!=null){if(p.children!=null)throw Error(a(60));n.innerHTML=s}}break;case"children":typeof c=="string"?jl(n,c):(typeof c=="number"||typeof c=="bigint")&&jl(n,""+c);break;case"onScroll":c!=null&&Ze("scroll",n);break;case"onScrollEnd":c!=null&&Ze("scrollend",n);break;case"onClick":c!=null&&(n.onclick=Xr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!iy.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),i=s.slice(2,p?s.length-7:void 0),g=n[En]||null,g=g!=null?g[s]:null,typeof g=="function"&&n.removeEventListener(i,g,p),typeof c=="function")){typeof g!="function"&&g!==null&&(s in n?n[s]=null:n.hasAttribute(s)&&n.removeAttribute(s)),n.addEventListener(i,c,p);break e}s in n?n[s]=c:c===!0?n.setAttribute(s,""):ku(n,s,c)}}}function on(n,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",n),Ze("load",n);var c=!1,p=!1,g;for(g in s)if(s.hasOwnProperty(g)){var w=s[g];if(w!=null)switch(g){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:mt(n,i,g,w,s,null)}}p&&mt(n,i,"srcSet",s.srcSet,s,null),c&&mt(n,i,"src",s.src,s,null);return;case"input":Ze("invalid",n);var C=g=w=p=null,D=null,Q=null;for(c in s)if(s.hasOwnProperty(c)){var ee=s[c];if(ee!=null)switch(c){case"name":p=ee;break;case"type":w=ee;break;case"checked":D=ee;break;case"defaultChecked":Q=ee;break;case"value":g=ee;break;case"defaultValue":C=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,i));break;default:mt(n,i,c,ee,s,null)}}uy(n,g,C,D,Q,w,p,!1);return;case"select":Ze("invalid",n),c=w=g=null;for(p in s)if(s.hasOwnProperty(p)&&(C=s[p],C!=null))switch(p){case"value":g=C;break;case"defaultValue":w=C;break;case"multiple":c=C;default:mt(n,i,p,C,s,null)}i=g,s=w,n.multiple=!!c,i!=null?kl(n,!!c,i,!1):s!=null&&kl(n,!!c,s,!0);return;case"textarea":Ze("invalid",n),g=p=c=null;for(w in s)if(s.hasOwnProperty(w)&&(C=s[w],C!=null))switch(w){case"value":c=C;break;case"defaultValue":p=C;break;case"children":g=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(a(91));break;default:mt(n,i,w,C,s,null)}dy(n,c,p,g);return;case"option":for(D in s)if(s.hasOwnProperty(D)&&(c=s[D],c!=null))switch(D){case"selected":n.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:mt(n,i,D,c,s,null)}return;case"dialog":Ze("beforetoggle",n),Ze("toggle",n),Ze("cancel",n),Ze("close",n);break;case"iframe":case"object":Ze("load",n);break;case"video":case"audio":for(c=0;c<jo.length;c++)Ze(jo[c],n);break;case"image":Ze("error",n),Ze("load",n);break;case"details":Ze("toggle",n);break;case"embed":case"source":case"link":Ze("error",n),Ze("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in s)if(s.hasOwnProperty(Q)&&(c=s[Q],c!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:mt(n,i,Q,c,s,null)}return;default:if(rf(i)){for(ee in s)s.hasOwnProperty(ee)&&(c=s[ee],c!==void 0&&Hh(n,i,ee,c,s,void 0));return}}for(C in s)s.hasOwnProperty(C)&&(c=s[C],c!=null&&mt(n,i,C,c,s,null))}function TN(n,i,s,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,w=null,C=null,D=null,Q=null,ee=null;for(Y in s){var oe=s[Y];if(s.hasOwnProperty(Y)&&oe!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":D=oe;default:c.hasOwnProperty(Y)||mt(n,i,Y,null,c,oe)}}for(var K in c){var Y=c[K];if(oe=s[K],c.hasOwnProperty(K)&&(Y!=null||oe!=null))switch(K){case"type":g=Y;break;case"name":p=Y;break;case"checked":Q=Y;break;case"defaultChecked":ee=Y;break;case"value":w=Y;break;case"defaultValue":C=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(a(137,i));break;default:Y!==oe&&mt(n,i,K,Y,c,oe)}}tf(n,w,C,D,Q,ee,g,p);return;case"select":Y=w=C=K=null;for(g in s)if(D=s[g],s.hasOwnProperty(g)&&D!=null)switch(g){case"value":break;case"multiple":Y=D;default:c.hasOwnProperty(g)||mt(n,i,g,null,c,D)}for(p in c)if(g=c[p],D=s[p],c.hasOwnProperty(p)&&(g!=null||D!=null))switch(p){case"value":K=g;break;case"defaultValue":C=g;break;case"multiple":w=g;default:g!==D&&mt(n,i,p,g,c,D)}i=C,s=w,c=Y,K!=null?kl(n,!!s,K,!1):!!c!=!!s&&(i!=null?kl(n,!!s,i,!0):kl(n,!!s,s?[]:"",!1));return;case"textarea":Y=K=null;for(C in s)if(p=s[C],s.hasOwnProperty(C)&&p!=null&&!c.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:mt(n,i,C,null,c,p)}for(w in c)if(p=c[w],g=s[w],c.hasOwnProperty(w)&&(p!=null||g!=null))switch(w){case"value":K=p;break;case"defaultValue":Y=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==g&&mt(n,i,w,p,c,g)}cy(n,K,Y);return;case"option":for(var Se in s)if(K=s[Se],s.hasOwnProperty(Se)&&K!=null&&!c.hasOwnProperty(Se))switch(Se){case"selected":n.selected=!1;break;default:mt(n,i,Se,null,c,K)}for(D in c)if(K=c[D],Y=s[D],c.hasOwnProperty(D)&&K!==Y&&(K!=null||Y!=null))switch(D){case"selected":n.selected=K&&typeof K!="function"&&typeof K!="symbol";break;default:mt(n,i,D,K,c,Y)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in s)K=s[Re],s.hasOwnProperty(Re)&&K!=null&&!c.hasOwnProperty(Re)&&mt(n,i,Re,null,c,K);for(Q in c)if(K=c[Q],Y=s[Q],c.hasOwnProperty(Q)&&K!==Y&&(K!=null||Y!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(a(137,i));break;default:mt(n,i,Q,K,c,Y)}return;default:if(rf(i)){for(var pt in s)K=s[pt],s.hasOwnProperty(pt)&&K!==void 0&&!c.hasOwnProperty(pt)&&Hh(n,i,pt,void 0,c,K);for(ee in c)K=c[ee],Y=s[ee],!c.hasOwnProperty(ee)||K===Y||K===void 0&&Y===void 0||Hh(n,i,ee,K,c,Y);return}}for(var H in s)K=s[H],s.hasOwnProperty(H)&&K!=null&&!c.hasOwnProperty(H)&&mt(n,i,H,null,c,K);for(oe in c)K=c[oe],Y=s[oe],!c.hasOwnProperty(oe)||K===Y||K==null&&Y==null||mt(n,i,oe,K,c,Y)}function mb(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function zN(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,s=performance.getEntriesByType("resource"),c=0;c<s.length;c++){var p=s[c],g=p.transferSize,w=p.initiatorType,C=p.duration;if(g&&C&&mb(w)){for(w=0,C=p.responseEnd,c+=1;c<s.length;c++){var D=s[c],Q=D.startTime;if(Q>C)break;var ee=D.transferSize,oe=D.initiatorType;ee&&mb(oe)&&(D=D.responseEnd,w+=ee*(D<C?1:(C-Q)/(D-Q)))}if(--c,i+=8*(g+w)/(p.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Zh=null,Vh=null;function Sc(n){return n.nodeType===9?n:n.ownerDocument}function pb(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function gb(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function Qh(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Gh=null;function RN(){var n=window.event;return n&&n.type==="popstate"?n===Gh?!1:(Gh=n,!0):(Gh=null,!1)}var yb=typeof setTimeout=="function"?setTimeout:void 0,ON=typeof clearTimeout=="function"?clearTimeout:void 0,vb=typeof Promise=="function"?Promise:void 0,DN=typeof queueMicrotask=="function"?queueMicrotask:typeof vb<"u"?function(n){return vb.resolve(null).then(n).catch(MN)}:yb;function MN(n){setTimeout(function(){throw n})}function Gi(n){return n==="head"}function xb(n,i){var s=i,c=0;do{var p=s.nextSibling;if(n.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(c===0){n.removeChild(p),ts(i);return}c--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")c++;else if(s==="html")Co(n.ownerDocument.documentElement);else if(s==="head"){s=n.ownerDocument.head,Co(s);for(var g=s.firstChild;g;){var w=g.nextSibling,C=g.nodeName;g[Fs]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=w}}else s==="body"&&Co(n.ownerDocument.body);s=p}while(s);ts(i)}function bb(n,i){var s=n;n=0;do{var c=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(n===0)break;n--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||n++;s=c}while(s)}function Kh(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Kh(s),Wd(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}n.removeChild(s)}}function LN(n,i,s,c){for(;n.nodeType===1;){var p=s;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[Fs])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(g=n.getAttribute("rel"),g==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(g!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(g=n.getAttribute("src"),(g!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===g)return n}else return n;if(n=cr(n.nextSibling),n===null)break}return null}function UN(n,i,s){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!s||(n=cr(n.nextSibling),n===null))return null;return n}function Sb(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=cr(n.nextSibling),n===null))return null;return n}function Yh(n){return n.data==="$?"||n.data==="$~"}function Xh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function IN(n,i){var s=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||s.readyState!=="loading")i();else{var c=function(){i(),s.removeEventListener("DOMContentLoaded",c)};s.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function cr(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var Jh=null;function wb(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"||s==="/&"){if(i===0)return cr(n.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}n=n.nextSibling}return null}function kb(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return n;i--}else s!=="/$"&&s!=="/&"||i++}n=n.previousSibling}return null}function jb(n,i,s){switch(i=Sc(s),n){case"html":if(n=i.documentElement,!n)throw Error(a(452));return n;case"head":if(n=i.head,!n)throw Error(a(453));return n;case"body":if(n=i.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function Co(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);Wd(n)}var dr=new Map,Eb=new Set;function wc(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var hi=J.d;J.d={f:BN,r:PN,D:$N,C:qN,L:FN,m:HN,X:VN,S:ZN,M:QN};function BN(){var n=hi.f(),i=hc();return n||i}function PN(n){var i=bl(n);i!==null&&i.tag===5&&i.type==="form"?qv(i):hi.r(n)}var Jl=typeof document>"u"?null:document;function Cb(n,i,s){var c=Jl;if(c&&typeof i=="string"&&i){var p=rr(i);p='link[rel="'+n+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),Eb.has(p)||(Eb.add(p),n={rel:n,crossOrigin:s,href:i},c.querySelector(p)===null&&(i=c.createElement("link"),on(i,"link",n),Yt(i),c.head.appendChild(i)))}}function $N(n){hi.D(n),Cb("dns-prefetch",n,null)}function qN(n,i){hi.C(n,i),Cb("preconnect",n,i)}function FN(n,i,s){hi.L(n,i,s);var c=Jl;if(c&&n&&i){var p='link[rel="preload"][as="'+rr(i)+'"]';i==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+rr(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+rr(s.imageSizes)+'"]')):p+='[href="'+rr(n)+'"]';var g=p;switch(i){case"style":g=Wl(n);break;case"script":g=es(n)}dr.has(g)||(n=y({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:n,as:i},s),dr.set(g,n),c.querySelector(p)!==null||i==="style"&&c.querySelector(No(g))||i==="script"&&c.querySelector(_o(g))||(i=c.createElement("link"),on(i,"link",n),Yt(i),c.head.appendChild(i)))}}function HN(n,i){hi.m(n,i);var s=Jl;if(s&&n){var c=i&&typeof i.as=="string"?i.as:"script",p='link[rel="modulepreload"][as="'+rr(c)+'"][href="'+rr(n)+'"]',g=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=es(n)}if(!dr.has(g)&&(n=y({rel:"modulepreload",href:n},i),dr.set(g,n),s.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(_o(g)))return}c=s.createElement("link"),on(c,"link",n),Yt(c),s.head.appendChild(c)}}}function ZN(n,i,s){hi.S(n,i,s);var c=Jl;if(c&&n){var p=Sl(c).hoistableStyles,g=Wl(n);i=i||"default";var w=p.get(g);if(!w){var C={loading:0,preload:null};if(w=c.querySelector(No(g)))C.loading=5;else{n=y({rel:"stylesheet",href:n,"data-precedence":i},s),(s=dr.get(g))&&Wh(n,s);var D=w=c.createElement("link");Yt(D),on(D,"link",n),D._p=new Promise(function(Q,ee){D.onload=Q,D.onerror=ee}),D.addEventListener("load",function(){C.loading|=1}),D.addEventListener("error",function(){C.loading|=2}),C.loading|=4,kc(w,i,c)}w={type:"stylesheet",instance:w,count:1,state:C},p.set(g,w)}}}function VN(n,i){hi.X(n,i);var s=Jl;if(s&&n){var c=Sl(s).hoistableScripts,p=es(n),g=c.get(p);g||(g=s.querySelector(_o(p)),g||(n=y({src:n,async:!0},i),(i=dr.get(p))&&em(n,i),g=s.createElement("script"),Yt(g),on(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function QN(n,i){hi.M(n,i);var s=Jl;if(s&&n){var c=Sl(s).hoistableScripts,p=es(n),g=c.get(p);g||(g=s.querySelector(_o(p)),g||(n=y({src:n,async:!0,type:"module"},i),(i=dr.get(p))&&em(n,i),g=s.createElement("script"),Yt(g),on(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function Nb(n,i,s,c){var p=(p=ce.current)?wc(p):null;if(!p)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=Wl(s.href),s=Sl(p).hoistableStyles,c=s.get(i),c||(c={type:"style",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=Wl(s.href);var g=Sl(p).hoistableStyles,w=g.get(n);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(n,w),(g=p.querySelector(No(n)))&&!g._p&&(w.instance=g,w.state.loading=5),dr.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},dr.set(n,s),g||GN(p,n,s,w.state))),i&&c===null)throw Error(a(528,""));return w}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=es(s),s=Sl(p).hoistableScripts,c=s.get(i),c||(c={type:"script",instance:null,count:0,state:null},s.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Wl(n){return'href="'+rr(n)+'"'}function No(n){return'link[rel="stylesheet"]['+n+"]"}function _b(n){return y({},n,{"data-precedence":n.precedence,precedence:null})}function GN(n,i,s,c){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=n.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),on(i,"link",s),Yt(i),n.head.appendChild(i))}function es(n){return'[src="'+rr(n)+'"]'}function _o(n){return"script[async]"+n}function Ab(n,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var c=n.querySelector('style[data-href~="'+rr(s.href)+'"]');if(c)return i.instance=c,Yt(c),c;var p=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),Yt(c),on(c,"style",p),kc(c,s.precedence,n),i.instance=c;case"stylesheet":p=Wl(s.href);var g=n.querySelector(No(p));if(g)return i.state.loading|=4,i.instance=g,Yt(g),g;c=_b(s),(p=dr.get(p))&&Wh(c,p),g=(n.ownerDocument||n).createElement("link"),Yt(g);var w=g;return w._p=new Promise(function(C,D){w.onload=C,w.onerror=D}),on(g,"link",c),i.state.loading|=4,kc(g,s.precedence,n),i.instance=g;case"script":return g=es(s.src),(p=n.querySelector(_o(g)))?(i.instance=p,Yt(p),p):(c=s,(p=dr.get(g))&&(c=y({},s),em(c,p)),n=n.ownerDocument||n,p=n.createElement("script"),Yt(p),on(p,"link",c),n.head.appendChild(p),i.instance=p);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,kc(c,s.precedence,n));return i.instance}function kc(n,i,s){for(var c=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,g=p,w=0;w<c.length;w++){var C=c[w];if(C.dataset.precedence===i)g=C;else if(g!==p)break}g?g.parentNode.insertBefore(n,g.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(n,i.firstChild))}function Wh(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function em(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var jc=null;function Tb(n,i,s){if(jc===null){var c=new Map,p=jc=new Map;p.set(s,c)}else p=jc,c=p.get(s),c||(c=new Map,p.set(s,c));if(c.has(n))return c;for(c.set(n,null),s=s.getElementsByTagName(n),p=0;p<s.length;p++){var g=s[p];if(!(g[Fs]||g[rn]||n==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var w=g.getAttribute(i)||"";w=n+w;var C=c.get(w);C?C.push(g):c.set(w,[g])}}return c}function zb(n,i,s){n=n.ownerDocument||n,n.head.insertBefore(s,i==="title"?n.querySelector("head > title"):null)}function KN(n,i,s){if(s===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return n=i.disabled,typeof i.precedence=="string"&&n==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Rb(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function YN(n,i,s,c){if(s.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=Wl(c.href),g=i.querySelector(No(p));if(g){i=g._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Ec.bind(n),i.then(n,n)),s.state.loading|=4,s.instance=g,Yt(g);return}g=i.ownerDocument||i,c=_b(c),(p=dr.get(p))&&Wh(c,p),g=g.createElement("link"),Yt(g);var w=g;w._p=new Promise(function(C,D){w.onload=C,w.onerror=D}),on(g,"link",c),s.instance=g}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=Ec.bind(n),i.addEventListener("load",s),i.addEventListener("error",s))}}var tm=0;function XN(n,i){return n.stylesheets&&n.count===0&&Nc(n,n.stylesheets),0<n.count||0<n.imgCount?function(s){var c=setTimeout(function(){if(n.stylesheets&&Nc(n,n.stylesheets),n.unsuspend){var g=n.unsuspend;n.unsuspend=null,g()}},6e4+i);0<n.imgBytes&&tm===0&&(tm=62500*zN());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Nc(n,n.stylesheets),n.unsuspend)){var g=n.unsuspend;n.unsuspend=null,g()}},(n.imgBytes>tm?50:800)+i);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function Ec(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Nc(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Cc=null;function Nc(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Cc=new Map,i.forEach(JN,n),Cc=null,Ec.call(n))}function JN(n,i){if(!(i.state.loading&4)){var s=Cc.get(n);if(s)var c=s.get(null);else{s=new Map,Cc.set(n,s);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var w=p[g];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(s.set(w.dataset.precedence,w),c=w)}c&&s.set(null,c)}p=i.instance,w=p.getAttribute("data-precedence"),g=s.get(w)||c,g===c&&s.set(null,p),s.set(w,p),this.count++,c=Ec.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),g?g.parentNode.insertBefore(p,g.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),i.state.loading|=4}}var Ao={$$typeof:A,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function WN(n,i,s,c,p,g,w,C,D){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qe(0),this.hiddenUpdates=Qe(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function Ob(n,i,s,c,p,g,w,C,D,Q,ee,oe){return n=new WN(n,i,s,w,D,Q,ee,oe,C),i=1,g===!0&&(i|=24),g=qn(3,null,null,i),n.current=g,g.stateNode=n,i=Df(),i.refCount++,n.pooledCache=i,i.refCount++,g.memoizedState={element:c,isDehydrated:s,cache:i},If(g),n}function Db(n){return n?(n=zl,n):zl}function Mb(n,i,s,c,p,g){p=Db(p),c.context===null?c.context=p:c.pendingContext=p,c=Ui(i),c.payload={element:s},g=g===void 0?null:g,g!==null&&(c.callback=g),s=Ii(n,c,i),s!==null&&(zn(s,n,i),lo(s,n,i))}function Lb(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<i?s:i}}function nm(n,i){Lb(n,i),(n=n.alternate)&&Lb(n,i)}function Ub(n){if(n.tag===13||n.tag===31){var i=Da(n,67108864);i!==null&&zn(i,n,67108864),nm(n,67108864)}}function Ib(n){if(n.tag===13||n.tag===31){var i=Qn();i=Yd(i);var s=Da(n,i);s!==null&&zn(s,n,i),nm(n,i)}}var _c=!0;function e_(n,i,s,c){var p=B.T;B.T=null;var g=J.p;try{J.p=2,rm(n,i,s,c)}finally{J.p=g,B.T=p}}function t_(n,i,s,c){var p=B.T;B.T=null;var g=J.p;try{J.p=8,rm(n,i,s,c)}finally{J.p=g,B.T=p}}function rm(n,i,s,c){if(_c){var p=im(c);if(p===null)Fh(n,i,c,Ac,s),Pb(n,c);else if(r_(p,n,i,s,c))c.stopPropagation();else if(Pb(n,c),i&4&&-1<n_.indexOf(n)){for(;p!==null;){var g=bl(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var w=Tr(g.pendingLanes);if(w!==0){var C=g;for(C.pendingLanes|=2,C.entangledLanes|=2;w;){var D=1<<31-ct(w);C.entanglements[1]|=D,w&=~D}Dr(g),(lt&6)===0&&(dc=tn()+500,ko(0))}}break;case 31:case 13:C=Da(g,2),C!==null&&zn(C,g,2),hc(),nm(g,2)}if(g=im(c),g===null&&Fh(n,i,c,Ac,s),g===p)break;p=g}p!==null&&c.stopPropagation()}else Fh(n,i,c,null,s)}}function im(n){return n=lf(n),am(n)}var Ac=null;function am(n){if(Ac=null,n=xl(n),n!==null){var i=o(n);if(i===null)n=null;else{var s=i.tag;if(s===13){if(n=u(i),n!==null)return n;n=null}else if(s===31){if(n=f(i),n!==null)return n;n=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return Ac=n,null}function Bb(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(qs()){case ne:return 2;case me:return 8;case Oe:case $e:return 32;case nt:return 268435456;default:return 32}default:return 32}}var lm=!1,Ki=null,Yi=null,Xi=null,To=new Map,zo=new Map,Ji=[],n_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Pb(n,i){switch(n){case"focusin":case"focusout":Ki=null;break;case"dragenter":case"dragleave":Yi=null;break;case"mouseover":case"mouseout":Xi=null;break;case"pointerover":case"pointerout":To.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":zo.delete(i.pointerId)}}function Ro(n,i,s,c,p,g){return n===null||n.nativeEvent!==g?(n={blockedOn:i,domEventName:s,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},i!==null&&(i=bl(i),i!==null&&Ub(i)),n):(n.eventSystemFlags|=c,i=n.targetContainers,p!==null&&i.indexOf(p)===-1&&i.push(p),n)}function r_(n,i,s,c,p){switch(i){case"focusin":return Ki=Ro(Ki,n,i,s,c,p),!0;case"dragenter":return Yi=Ro(Yi,n,i,s,c,p),!0;case"mouseover":return Xi=Ro(Xi,n,i,s,c,p),!0;case"pointerover":var g=p.pointerId;return To.set(g,Ro(To.get(g)||null,n,i,s,c,p)),!0;case"gotpointercapture":return g=p.pointerId,zo.set(g,Ro(zo.get(g)||null,n,i,s,c,p)),!0}return!1}function $b(n){var i=xl(n.target);if(i!==null){var s=o(i);if(s!==null){if(i=s.tag,i===13){if(i=u(s),i!==null){n.blockedOn=i,ty(n.priority,function(){Ib(s)});return}}else if(i===31){if(i=f(s),i!==null){n.blockedOn=i,ty(n.priority,function(){Ib(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Tc(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var s=im(n.nativeEvent);if(s===null){s=n.nativeEvent;var c=new s.constructor(s.type,s);af=c,s.target.dispatchEvent(c),af=null}else return i=bl(s),i!==null&&Ub(i),n.blockedOn=s,!1;i.shift()}return!0}function qb(n,i,s){Tc(n)&&s.delete(i)}function i_(){lm=!1,Ki!==null&&Tc(Ki)&&(Ki=null),Yi!==null&&Tc(Yi)&&(Yi=null),Xi!==null&&Tc(Xi)&&(Xi=null),To.forEach(qb),zo.forEach(qb)}function zc(n,i){n.blockedOn===i&&(n.blockedOn=null,lm||(lm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,i_)))}var Rc=null;function Fb(n){Rc!==n&&(Rc=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Rc===n&&(Rc=null);for(var i=0;i<n.length;i+=3){var s=n[i],c=n[i+1],p=n[i+2];if(typeof c!="function"){if(am(c||s)===null)continue;break}var g=bl(s);g!==null&&(n.splice(i,3),i-=3,ih(g,{pending:!0,data:p,method:s.method,action:c},c,p))}}))}function ts(n){function i(D){return zc(D,n)}Ki!==null&&zc(Ki,n),Yi!==null&&zc(Yi,n),Xi!==null&&zc(Xi,n),To.forEach(i),zo.forEach(i);for(var s=0;s<Ji.length;s++){var c=Ji[s];c.blockedOn===n&&(c.blockedOn=null)}for(;0<Ji.length&&(s=Ji[0],s.blockedOn===null);)$b(s),s.blockedOn===null&&Ji.shift();if(s=(n.ownerDocument||n).$$reactFormReplay,s!=null)for(c=0;c<s.length;c+=3){var p=s[c],g=s[c+1],w=p[En]||null;if(typeof g=="function")w||Fb(s);else if(w){var C=null;if(g&&g.hasAttribute("formAction")){if(p=g,w=g[En]||null)C=w.formAction;else if(am(p)!==null)continue}else C=w.action;typeof C=="function"?s[c+1]=C:(s.splice(c,3),c-=3),Fb(s)}}}function Hb(){function n(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(w){return p=w})},focusReset:"manual",scroll:"manual"})}function i(){p!==null&&(p(),p=null),c||setTimeout(s,20)}function s(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),p!==null&&(p(),p=null)}}}function sm(n){this._internalRoot=n}Oc.prototype.render=sm.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(a(409));var s=i.current,c=Qn();Mb(s,c,n,i,null,null)},Oc.prototype.unmount=sm.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Mb(n.current,2,null,n,null,null),hc(),i[vl]=null}};function Oc(n){this._internalRoot=n}Oc.prototype.unstable_scheduleHydration=function(n){if(n){var i=ey();n={blockedOn:null,target:n,priority:i};for(var s=0;s<Ji.length&&i!==0&&i<Ji[s].priority;s++);Ji.splice(s,0,n),s===0&&$b(n)}};var Zb=t.version;if(Zb!=="19.2.4")throw Error(a(527,Zb,"19.2.4"));J.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=h(i),n=n!==null?v(n):null,n=n===null?null:n.stateNode,n};var a_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dc.isDisabled&&Dc.supportsFiber)try{nn=Dc.inject(a_),Mt=Dc}catch{}}return Do.createRoot=function(n,i){if(!l(n))throw Error(a(299));var s=!1,c="",p=Jv,g=Wv,w=ex;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError)),i=Ob(n,1,!1,null,null,s,c,null,p,g,w,Hb),n[vl]=i.current,qh(n),new sm(i)},Do.hydrateRoot=function(n,i,s){if(!l(n))throw Error(a(299));var c=!1,p="",g=Jv,w=Wv,C=ex,D=null;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(w=s.onCaughtError),s.onRecoverableError!==void 0&&(C=s.onRecoverableError),s.formState!==void 0&&(D=s.formState)),i=Ob(n,1,!0,i,s??null,c,p,D,g,w,C,Hb),i.context=Db(null),s=i.current,c=Qn(),c=Yd(c),p=Ui(c),p.callback=null,Ii(s,p,c),s=c,i.current.lanes=s,pn(i,s),Dr(i),n[vl]=i.current,qh(n),new Oc(i)},Do.version="19.2.4",Do}var n0;function g_(){if(n0)return dm.exports;n0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),dm.exports=p_(),dm.exports}var y_=g_(),Os=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Xa,la,gs,xS,v_=(xS=class extends Os{constructor(){super();Ne(this,Xa);Ne(this,la);Ne(this,gs);ge(this,gs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){M(this,la)||this.setEventListener(M(this,gs))}onUnsubscribe(){var t;this.hasListeners()||((t=M(this,la))==null||t.call(this),ge(this,la,void 0))}setEventListener(t){var r;ge(this,gs,t),(r=M(this,la))==null||r.call(this),ge(this,la,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){M(this,Xa)!==t&&(ge(this,Xa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof M(this,Xa)=="boolean"?M(this,Xa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Xa=new WeakMap,la=new WeakMap,gs=new WeakMap,xS),Gp=new v_,x_={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sa,Zp,bS,b_=(bS=class{constructor(){Ne(this,sa,x_);Ne(this,Zp,!1)}setTimeoutProvider(e){ge(this,sa,e)}setTimeout(e,t){return M(this,sa).setTimeout(e,t)}clearTimeout(e){M(this,sa).clearTimeout(e)}setInterval(e,t){return M(this,sa).setInterval(e,t)}clearInterval(e){M(this,sa).clearInterval(e)}},sa=new WeakMap,Zp=new WeakMap,bS),Ya=new b_;function S_(e){setTimeout(e,0)}var w_=typeof window>"u"||"Deno"in globalThis;function xn(){}function k_(e,t){return typeof e=="function"?e(t):e}function np(e){return typeof e=="number"&&e>=0&&e!==1/0}function zS(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pa(e,t){return typeof e=="function"?e(t):e}function hr(e,t){return typeof e=="function"?e(t):e}function r0(e,t){const{type:r="all",exact:a,fetchStatus:l,predicate:o,queryKey:u,stale:f}=e;if(u){if(a){if(t.queryHash!==Kp(u,t.options))return!1}else if(!Yo(t.queryKey,u))return!1}if(r!=="all"){const m=t.isActive();if(r==="active"&&!m||r==="inactive"&&m)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||l&&l!==t.state.fetchStatus||o&&!o(t))}function i0(e,t){const{exact:r,status:a,predicate:l,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(ll(t.options.mutationKey)!==ll(o))return!1}else if(!Yo(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||l&&!l(t))}function Kp(e,t){return((t==null?void 0:t.queryKeyHashFn)||ll)(e)}function ll(e){return JSON.stringify(e,(t,r)=>rp(r)?Object.keys(r).sort().reduce((a,l)=>(a[l]=r[l],a),{}):r)}function Yo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Yo(e[r],t[r])):!1}var j_=Object.prototype.hasOwnProperty;function RS(e,t,r=0){if(e===t)return e;if(r>500)return t;const a=a0(e)&&a0(t);if(!a&&!(rp(e)&&rp(t)))return t;const o=(a?e:Object.keys(e)).length,u=a?t:Object.keys(t),f=u.length,m=a?new Array(f):{};let h=0;for(let v=0;v<f;v++){const y=a?v:u[v],x=e[y],b=t[y];if(x===b){m[y]=x,(a?v<o:j_.call(e,y))&&h++;continue}if(x===null||b===null||typeof x!="object"||typeof b!="object"){m[y]=b;continue}const j=RS(x,b,r+1);m[y]=j,j===x&&h++}return o===f&&h===o?e:m}function od(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function a0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rp(e){if(!l0(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!l0(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function l0(e){return Object.prototype.toString.call(e)==="[object Object]"}function E_(e){return new Promise(t=>{Ya.setTimeout(t,e)})}function ip(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?RS(e,t):t}function C_(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function N_(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var Yp=Symbol();function OS(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Yp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Xp(e,t){return typeof e=="function"?e(...t):!!e}function __(e,t,r){let a=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??(l=t()),a||(a=!0,l.aborted?r():l.addEventListener("abort",r,{once:!0})),l)}),e}var Xo=(()=>{let e=()=>w_;return{isServer(){return e()},setIsServer(t){e=t}}})();function ap(){let e,t;const r=new Promise((l,o)=>{e=l,t=o});r.status="pending",r.catch(()=>{});function a(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{a({status:"fulfilled",value:l}),e(l)},r.reject=l=>{a({status:"rejected",reason:l}),t(l)},r}var A_=S_;function T_(){let e=[],t=0,r=f=>{f()},a=f=>{f()},l=A_;const o=f=>{t?e.push(f):l(()=>{r(f)})},u=()=>{const f=e;e=[],f.length&&l(()=>{a(()=>{f.forEach(m=>{r(m)})})})};return{batch:f=>{let m;t++;try{m=f()}finally{t--,t||u()}return m},batchCalls:f=>(...m)=>{o(()=>{f(...m)})},schedule:o,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{l=f}}}var Qt=T_(),ys,oa,vs,SS,z_=(SS=class extends Os{constructor(){super();Ne(this,ys,!0);Ne(this,oa);Ne(this,vs);ge(this,vs,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",a)}}})}onSubscribe(){M(this,oa)||this.setEventListener(M(this,vs))}onUnsubscribe(){var t;this.hasListeners()||((t=M(this,oa))==null||t.call(this),ge(this,oa,void 0))}setEventListener(t){var r;ge(this,vs,t),(r=M(this,oa))==null||r.call(this),ge(this,oa,t(this.setOnline.bind(this)))}setOnline(t){M(this,ys)!==t&&(ge(this,ys,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return M(this,ys)}},ys=new WeakMap,oa=new WeakMap,vs=new WeakMap,SS),ud=new z_;function R_(e){return Math.min(1e3*2**e,3e4)}function DS(e){return(e??"online")==="online"?ud.isOnline():!0}var lp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function MS(e){let t=!1,r=0,a;const l=ap(),o=()=>l.status!=="pending",u=k=>{var N;if(!o()){const E=new lp(k);x(E),(N=e.onCancel)==null||N.call(e,E)}},f=()=>{t=!0},m=()=>{t=!1},h=()=>Gp.isFocused()&&(e.networkMode==="always"||ud.isOnline())&&e.canRun(),v=()=>DS(e.networkMode)&&e.canRun(),y=k=>{o()||(a==null||a(),l.resolve(k))},x=k=>{o()||(a==null||a(),l.reject(k))},b=()=>new Promise(k=>{var N;a=E=>{(o()||h())&&k(E)},(N=e.onPause)==null||N.call(e)}).then(()=>{var k;a=void 0,o()||(k=e.onContinue)==null||k.call(e)}),j=()=>{if(o())return;let k;const N=r===0?e.initialPromise:void 0;try{k=N??e.fn()}catch(E){k=Promise.reject(E)}Promise.resolve(k).then(y).catch(E=>{var z;if(o())return;const R=e.retry??(Xo.isServer()?0:3),A=e.retryDelay??R_,I=typeof A=="function"?A(r,E):A,q=R===!0||typeof R=="number"&&r<R||typeof R=="function"&&R(r,E);if(t||!q){x(E);return}r++,(z=e.onFail)==null||z.call(e,r,E),E_(I).then(()=>h()?void 0:b()).then(()=>{t?x(E):j()})})};return{promise:l,status:()=>l.status,cancel:u,continue:()=>(a==null||a(),l),cancelRetry:f,continueRetry:m,canStart:v,start:()=>(v()?j():b().then(j),l)}}var Ja,wS,LS=(wS=class{constructor(){Ne(this,Ja)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),np(this.gcTime)&&ge(this,Ja,Ya.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xo.isServer()?1/0:300*1e3))}clearGcTimeout(){M(this,Ja)&&(Ya.clearTimeout(M(this,Ja)),ge(this,Ja,void 0))}},Ja=new WeakMap,wS),Wa,xs,fr,el,Jt,ou,tl,Kn,US,pi,kS,O_=(kS=class extends LS{constructor(t){super();Ne(this,Kn);Ne(this,Wa);Ne(this,xs);Ne(this,fr);Ne(this,el);Ne(this,Jt);Ne(this,ou);Ne(this,tl);ge(this,tl,!1),ge(this,ou,t.defaultOptions),this.setOptions(t.options),this.observers=[],ge(this,el,t.client),ge(this,fr,M(this,el).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ge(this,Wa,o0(this.options)),this.state=t.state??M(this,Wa),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=M(this,Jt))==null?void 0:t.promise}setOptions(t){if(this.options={...M(this,ou),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=o0(this.options);r.data!==void 0&&(this.setState(s0(r.data,r.dataUpdatedAt)),ge(this,Wa,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&M(this,fr).remove(this)}setData(t,r){const a=ip(this.state.data,t,this.options);return Be(this,Kn,pi).call(this,{data:a,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),a}setState(t,r){Be(this,Kn,pi).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var a,l;const r=(a=M(this,Jt))==null?void 0:a.promise;return(l=M(this,Jt))==null||l.cancel(t),r?r.then(xn).catch(xn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return M(this,Wa)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>hr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yp||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>pa(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!zS(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=M(this,Jt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=M(this,Jt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),M(this,fr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(M(this,Jt)&&(M(this,tl)||Be(this,Kn,US).call(this)?M(this,Jt).cancel({revert:!0}):M(this,Jt).cancelRetry()),this.scheduleGc()),M(this,fr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Be(this,Kn,pi).call(this,{type:"invalidate"})}async fetch(t,r){var m,h,v,y,x,b,j,k,N,E,R,A;if(this.state.fetchStatus!=="idle"&&((m=M(this,Jt))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(M(this,Jt))return M(this,Jt).continueRetry(),M(this,Jt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const I=this.observers.find(q=>q.options.queryFn);I&&this.setOptions(I.options)}const a=new AbortController,l=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(ge(this,tl,!0),a.signal)})},o=()=>{const I=OS(this.options,r),z=(()=>{const $={client:M(this,el),queryKey:this.queryKey,meta:this.meta};return l($),$})();return ge(this,tl,!1),this.options.persister?this.options.persister(I,z,this):I(z)},f=(()=>{const I={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:M(this,el),state:this.state,fetchFn:o};return l(I),I})();(h=this.options.behavior)==null||h.onFetch(f,this),ge(this,xs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=f.fetchOptions)==null?void 0:v.meta))&&Be(this,Kn,pi).call(this,{type:"fetch",meta:(y=f.fetchOptions)==null?void 0:y.meta}),ge(this,Jt,MS({initialPromise:r==null?void 0:r.initialPromise,fn:f.fetchFn,onCancel:I=>{I instanceof lp&&I.revert&&this.setState({...M(this,xs),fetchStatus:"idle"}),a.abort()},onFail:(I,q)=>{Be(this,Kn,pi).call(this,{type:"failed",failureCount:I,error:q})},onPause:()=>{Be(this,Kn,pi).call(this,{type:"pause"})},onContinue:()=>{Be(this,Kn,pi).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const I=await M(this,Jt).start();if(I===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(I),(b=(x=M(this,fr).config).onSuccess)==null||b.call(x,I,this),(k=(j=M(this,fr).config).onSettled)==null||k.call(j,I,this.state.error,this),I}catch(I){if(I instanceof lp){if(I.silent)return M(this,Jt).promise;if(I.revert){if(this.state.data===void 0)throw I;return this.state.data}}throw Be(this,Kn,pi).call(this,{type:"error",error:I}),(E=(N=M(this,fr).config).onError)==null||E.call(N,I,this),(A=(R=M(this,fr).config).onSettled)==null||A.call(R,this.state.data,I,this),I}finally{this.scheduleGc()}}},Wa=new WeakMap,xs=new WeakMap,fr=new WeakMap,el=new WeakMap,Jt=new WeakMap,ou=new WeakMap,tl=new WeakMap,Kn=new WeakSet,US=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},pi=function(t){const r=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...IS(a.data,this.options),fetchMeta:t.meta??null};case"success":const l={...a,...s0(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ge(this,xs,t.manual?l:void 0),l;case"error":const o=t.error;return{...a,error:o,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=r(this.state),Qt.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),M(this,fr).notify({query:this,type:"updated",action:t})})},kS);function IS(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:DS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function s0(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function o0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var On,Je,uu,vn,nl,bs,gi,ua,cu,Ss,ws,rl,il,ca,ks,ot,Fo,sp,op,up,cp,dp,fp,hp,BS,jS,D_=(jS=class extends Os{constructor(t,r){super();Ne(this,ot);Ne(this,On);Ne(this,Je);Ne(this,uu);Ne(this,vn);Ne(this,nl);Ne(this,bs);Ne(this,gi);Ne(this,ua);Ne(this,cu);Ne(this,Ss);Ne(this,ws);Ne(this,rl);Ne(this,il);Ne(this,ca);Ne(this,ks,new Set);this.options=r,ge(this,On,t),ge(this,ua,null),ge(this,gi,ap()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(M(this,Je).addObserver(this),u0(M(this,Je),this.options)?Be(this,ot,Fo).call(this):this.updateResult(),Be(this,ot,cp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return mp(M(this,Je),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mp(M(this,Je),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Be(this,ot,dp).call(this),Be(this,ot,fp).call(this),M(this,Je).removeObserver(this)}setOptions(t){const r=this.options,a=M(this,Je);if(this.options=M(this,On).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof hr(this.options.enabled,M(this,Je))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Be(this,ot,hp).call(this),M(this,Je).setOptions(this.options),r._defaulted&&!od(this.options,r)&&M(this,On).getQueryCache().notify({type:"observerOptionsUpdated",query:M(this,Je),observer:this});const l=this.hasListeners();l&&c0(M(this,Je),a,this.options,r)&&Be(this,ot,Fo).call(this),this.updateResult(),l&&(M(this,Je)!==a||hr(this.options.enabled,M(this,Je))!==hr(r.enabled,M(this,Je))||pa(this.options.staleTime,M(this,Je))!==pa(r.staleTime,M(this,Je)))&&Be(this,ot,sp).call(this);const o=Be(this,ot,op).call(this);l&&(M(this,Je)!==a||hr(this.options.enabled,M(this,Je))!==hr(r.enabled,M(this,Je))||o!==M(this,ca))&&Be(this,ot,up).call(this,o)}getOptimisticResult(t){const r=M(this,On).getQueryCache().build(M(this,On),t),a=this.createResult(r,t);return L_(this,a)&&(ge(this,vn,a),ge(this,bs,this.options),ge(this,nl,M(this,Je).state)),a}getCurrentResult(){return M(this,vn)}trackResult(t,r){return new Proxy(t,{get:(a,l)=>(this.trackProp(l),r==null||r(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&M(this,gi).status==="pending"&&M(this,gi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,l))})}trackProp(t){M(this,ks).add(t)}getCurrentQuery(){return M(this,Je)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=M(this,On).defaultQueryOptions(t),a=M(this,On).getQueryCache().build(M(this,On),r);return a.fetch().then(()=>this.createResult(a,r))}fetch(t){return Be(this,ot,Fo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),M(this,vn)))}createResult(t,r){var W;const a=M(this,Je),l=this.options,o=M(this,vn),u=M(this,nl),f=M(this,bs),h=t!==a?t.state:M(this,uu),{state:v}=t;let y={...v},x=!1,b;if(r._optimisticResults){const F=this.hasListeners(),re=!F&&u0(t,r),le=F&&c0(t,a,r,l);(re||le)&&(y={...y,...IS(v.data,t.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:j,errorUpdatedAt:k,status:N}=y;b=y.data;let E=!1;if(r.placeholderData!==void 0&&b===void 0&&N==="pending"){let F;o!=null&&o.isPlaceholderData&&r.placeholderData===(f==null?void 0:f.placeholderData)?(F=o.data,E=!0):F=typeof r.placeholderData=="function"?r.placeholderData((W=M(this,ws))==null?void 0:W.state.data,M(this,ws)):r.placeholderData,F!==void 0&&(N="success",b=ip(o==null?void 0:o.data,F,r),x=!0)}if(r.select&&b!==void 0&&!E)if(o&&b===(u==null?void 0:u.data)&&r.select===M(this,cu))b=M(this,Ss);else try{ge(this,cu,r.select),b=r.select(b),b=ip(o==null?void 0:o.data,b,r),ge(this,Ss,b),ge(this,ua,null)}catch(F){ge(this,ua,F)}M(this,ua)&&(j=M(this,ua),b=M(this,Ss),k=Date.now(),N="error");const R=y.fetchStatus==="fetching",A=N==="pending",I=N==="error",q=A&&R,z=b!==void 0,Z={status:N,fetchStatus:y.fetchStatus,isPending:A,isSuccess:N==="success",isError:I,isInitialLoading:q,isLoading:q,data:b,dataUpdatedAt:y.dataUpdatedAt,error:j,errorUpdatedAt:k,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:y.dataUpdateCount>h.dataUpdateCount||y.errorUpdateCount>h.errorUpdateCount,isFetching:R,isRefetching:R&&!A,isLoadingError:I&&!z,isPaused:y.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:I&&z,isStale:Jp(t,r),refetch:this.refetch,promise:M(this,gi),isEnabled:hr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const F=Z.data!==void 0,re=Z.status==="error"&&!F,le=te=>{re?te.reject(Z.error):F&&te.resolve(Z.data)},X=()=>{const te=ge(this,gi,Z.promise=ap());le(te)},de=M(this,gi);switch(de.status){case"pending":t.queryHash===a.queryHash&&le(de);break;case"fulfilled":(re||Z.data!==de.value)&&X();break;case"rejected":(!re||Z.error!==de.reason)&&X();break}}return Z}updateResult(){const t=M(this,vn),r=this.createResult(M(this,Je),this.options);if(ge(this,nl,M(this,Je).state),ge(this,bs,this.options),M(this,nl).data!==void 0&&ge(this,ws,M(this,Je)),od(r,t))return;ge(this,vn,r);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,o=typeof l=="function"?l():l;if(o==="all"||!o&&!M(this,ks).size)return!0;const u=new Set(o??M(this,ks));return this.options.throwOnError&&u.add("error"),Object.keys(M(this,vn)).some(f=>{const m=f;return M(this,vn)[m]!==t[m]&&u.has(m)})};Be(this,ot,BS).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Be(this,ot,cp).call(this)}},On=new WeakMap,Je=new WeakMap,uu=new WeakMap,vn=new WeakMap,nl=new WeakMap,bs=new WeakMap,gi=new WeakMap,ua=new WeakMap,cu=new WeakMap,Ss=new WeakMap,ws=new WeakMap,rl=new WeakMap,il=new WeakMap,ca=new WeakMap,ks=new WeakMap,ot=new WeakSet,Fo=function(t){Be(this,ot,hp).call(this);let r=M(this,Je).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(xn)),r},sp=function(){Be(this,ot,dp).call(this);const t=pa(this.options.staleTime,M(this,Je));if(Xo.isServer()||M(this,vn).isStale||!np(t))return;const a=zS(M(this,vn).dataUpdatedAt,t)+1;ge(this,rl,Ya.setTimeout(()=>{M(this,vn).isStale||this.updateResult()},a))},op=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(M(this,Je)):this.options.refetchInterval)??!1},up=function(t){Be(this,ot,fp).call(this),ge(this,ca,t),!(Xo.isServer()||hr(this.options.enabled,M(this,Je))===!1||!np(M(this,ca))||M(this,ca)===0)&&ge(this,il,Ya.setInterval(()=>{(this.options.refetchIntervalInBackground||Gp.isFocused())&&Be(this,ot,Fo).call(this)},M(this,ca)))},cp=function(){Be(this,ot,sp).call(this),Be(this,ot,up).call(this,Be(this,ot,op).call(this))},dp=function(){M(this,rl)&&(Ya.clearTimeout(M(this,rl)),ge(this,rl,void 0))},fp=function(){M(this,il)&&(Ya.clearInterval(M(this,il)),ge(this,il,void 0))},hp=function(){const t=M(this,On).getQueryCache().build(M(this,On),this.options);if(t===M(this,Je))return;const r=M(this,Je);ge(this,Je,t),ge(this,uu,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},BS=function(t){Qt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(M(this,vn))}),M(this,On).getQueryCache().notify({query:M(this,Je),type:"observerResultsUpdated"})})},jS);function M_(e,t){return hr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function u0(e,t){return M_(e,t)||e.state.data!==void 0&&mp(e,t,t.refetchOnMount)}function mp(e,t,r){if(hr(t.enabled,e)!==!1&&pa(t.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&Jp(e,t)}return!1}function c0(e,t,r,a){return(e!==t||hr(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Jp(e,r)}function Jp(e,t){return hr(t.enabled,e)!==!1&&e.isStaleByTime(pa(t.staleTime,e))}function L_(e,t){return!od(e.getCurrentResult(),t)}function d0(e){return{onFetch:(t,r)=>{var v,y,x,b,j;const a=t.options,l=(x=(y=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:y.fetchMore)==null?void 0:x.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],u=((j=t.state.data)==null?void 0:j.pageParams)||[];let f={pages:[],pageParams:[]},m=0;const h=async()=>{let k=!1;const N=A=>{__(A,()=>t.signal,()=>k=!0)},E=OS(t.options,t.fetchOptions),R=async(A,I,q)=>{if(k)return Promise.reject();if(I==null&&A.pages.length)return Promise.resolve(A);const $=(()=>{const re={client:t.client,queryKey:t.queryKey,pageParam:I,direction:q?"backward":"forward",meta:t.options.meta};return N(re),re})(),Z=await E($),{maxPages:W}=t.options,F=q?N_:C_;return{pages:F(A.pages,Z,W),pageParams:F(A.pageParams,I,W)}};if(l&&o.length){const A=l==="backward",I=A?U_:f0,q={pages:o,pageParams:u},z=I(a,q);f=await R(q,z,A)}else{const A=e??o.length;do{const I=m===0?u[0]??a.initialPageParam:f0(a,f);if(m>0&&I==null)break;f=await R(f,I),m++}while(m<A)}return f};t.options.persister?t.fetchFn=()=>{var k,N;return(N=(k=t.options).persister)==null?void 0:N.call(k,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function f0(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function U_(e,{pages:t,pageParams:r}){var a;return t.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,t[0],t,r[0],r):void 0}var du,Ur,dn,al,Ir,ra,ES,I_=(ES=class extends LS{constructor(t){super();Ne(this,Ir);Ne(this,du);Ne(this,Ur);Ne(this,dn);Ne(this,al);ge(this,du,t.client),this.mutationId=t.mutationId,ge(this,dn,t.mutationCache),ge(this,Ur,[]),this.state=t.state||PS(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){M(this,Ur).includes(t)||(M(this,Ur).push(t),this.clearGcTimeout(),M(this,dn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ge(this,Ur,M(this,Ur).filter(r=>r!==t)),this.scheduleGc(),M(this,dn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){M(this,Ur).length||(this.state.status==="pending"?this.scheduleGc():M(this,dn).remove(this))}continue(){var t;return((t=M(this,al))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,f,m,h,v,y,x,b,j,k,N,E,R,A,I,q,z,$;const r=()=>{Be(this,Ir,ra).call(this,{type:"continue"})},a={client:M(this,du),meta:this.options.meta,mutationKey:this.options.mutationKey};ge(this,al,MS({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(Z,W)=>{Be(this,Ir,ra).call(this,{type:"failed",failureCount:Z,error:W})},onPause:()=>{Be(this,Ir,ra).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>M(this,dn).canRun(this)}));const l=this.state.status==="pending",o=!M(this,al).canStart();try{if(l)r();else{Be(this,Ir,ra).call(this,{type:"pending",variables:t,isPaused:o}),M(this,dn).config.onMutate&&await M(this,dn).config.onMutate(t,this,a);const W=await((f=(u=this.options).onMutate)==null?void 0:f.call(u,t,a));W!==this.state.context&&Be(this,Ir,ra).call(this,{type:"pending",context:W,variables:t,isPaused:o})}const Z=await M(this,al).start();return await((h=(m=M(this,dn).config).onSuccess)==null?void 0:h.call(m,Z,t,this.state.context,this,a)),await((y=(v=this.options).onSuccess)==null?void 0:y.call(v,Z,t,this.state.context,a)),await((b=(x=M(this,dn).config).onSettled)==null?void 0:b.call(x,Z,null,this.state.variables,this.state.context,this,a)),await((k=(j=this.options).onSettled)==null?void 0:k.call(j,Z,null,t,this.state.context,a)),Be(this,Ir,ra).call(this,{type:"success",data:Z}),Z}catch(Z){try{await((E=(N=M(this,dn).config).onError)==null?void 0:E.call(N,Z,t,this.state.context,this,a))}catch(W){Promise.reject(W)}try{await((A=(R=this.options).onError)==null?void 0:A.call(R,Z,t,this.state.context,a))}catch(W){Promise.reject(W)}try{await((q=(I=M(this,dn).config).onSettled)==null?void 0:q.call(I,void 0,Z,this.state.variables,this.state.context,this,a))}catch(W){Promise.reject(W)}try{await(($=(z=this.options).onSettled)==null?void 0:$.call(z,void 0,Z,t,this.state.context,a))}catch(W){Promise.reject(W)}throw Be(this,Ir,ra).call(this,{type:"error",error:Z}),Z}finally{M(this,dn).runNext(this)}}},du=new WeakMap,Ur=new WeakMap,dn=new WeakMap,al=new WeakMap,Ir=new WeakSet,ra=function(t){const r=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Qt.batch(()=>{M(this,Ur).forEach(a=>{a.onMutationUpdate(t)}),M(this,dn).notify({mutation:this,type:"updated",action:t})})},ES);function PS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var yi,jr,fu,CS,B_=(CS=class extends Os{constructor(t={}){super();Ne(this,yi);Ne(this,jr);Ne(this,fu);this.config=t,ge(this,yi,new Set),ge(this,jr,new Map),ge(this,fu,0)}build(t,r,a){const l=new I_({client:t,mutationCache:this,mutationId:++Mc(this,fu)._,options:t.defaultMutationOptions(r),state:a});return this.add(l),l}add(t){M(this,yi).add(t);const r=Lc(t);if(typeof r=="string"){const a=M(this,jr).get(r);a?a.push(t):M(this,jr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(M(this,yi).delete(t)){const r=Lc(t);if(typeof r=="string"){const a=M(this,jr).get(r);if(a)if(a.length>1){const l=a.indexOf(t);l!==-1&&a.splice(l,1)}else a[0]===t&&M(this,jr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Lc(t);if(typeof r=="string"){const a=M(this,jr).get(r),l=a==null?void 0:a.find(o=>o.state.status==="pending");return!l||l===t}else return!0}runNext(t){var a;const r=Lc(t);if(typeof r=="string"){const l=(a=M(this,jr).get(r))==null?void 0:a.find(o=>o!==t&&o.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qt.batch(()=>{M(this,yi).forEach(t=>{this.notify({type:"removed",mutation:t})}),M(this,yi).clear(),M(this,jr).clear()})}getAll(){return Array.from(M(this,yi))}find(t){const r={exact:!0,...t};return this.getAll().find(a=>i0(r,a))}findAll(t={}){return this.getAll().filter(r=>i0(t,r))}notify(t){Qt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Qt.batch(()=>Promise.all(t.map(r=>r.continue().catch(xn))))}},yi=new WeakMap,jr=new WeakMap,fu=new WeakMap,CS);function Lc(e){var t;return(t=e.options.scope)==null?void 0:t.id}var vi,da,Dn,xi,wi,ed,pp,NS,P_=(NS=class extends Os{constructor(r,a){super();Ne(this,wi);Ne(this,vi);Ne(this,da);Ne(this,Dn);Ne(this,xi);ge(this,vi,r),this.setOptions(a),this.bindMethods(),Be(this,wi,ed).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var l;const a=this.options;this.options=M(this,vi).defaultMutationOptions(r),od(this.options,a)||M(this,vi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:M(this,Dn),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&ll(a.mutationKey)!==ll(this.options.mutationKey)?this.reset():((l=M(this,Dn))==null?void 0:l.state.status)==="pending"&&M(this,Dn).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=M(this,Dn))==null||r.removeObserver(this)}onMutationUpdate(r){Be(this,wi,ed).call(this),Be(this,wi,pp).call(this,r)}getCurrentResult(){return M(this,da)}reset(){var r;(r=M(this,Dn))==null||r.removeObserver(this),ge(this,Dn,void 0),Be(this,wi,ed).call(this),Be(this,wi,pp).call(this)}mutate(r,a){var l;return ge(this,xi,a),(l=M(this,Dn))==null||l.removeObserver(this),ge(this,Dn,M(this,vi).getMutationCache().build(M(this,vi),this.options)),M(this,Dn).addObserver(this),M(this,Dn).execute(r)}},vi=new WeakMap,da=new WeakMap,Dn=new WeakMap,xi=new WeakMap,wi=new WeakSet,ed=function(){var a;const r=((a=M(this,Dn))==null?void 0:a.state)??PS();ge(this,da,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},pp=function(r){Qt.batch(()=>{var a,l,o,u,f,m,h,v;if(M(this,xi)&&this.hasListeners()){const y=M(this,da).variables,x=M(this,da).context,b={client:M(this,vi),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(l=(a=M(this,xi)).onSuccess)==null||l.call(a,r.data,y,x,b)}catch(j){Promise.reject(j)}try{(u=(o=M(this,xi)).onSettled)==null||u.call(o,r.data,null,y,x,b)}catch(j){Promise.reject(j)}}else if((r==null?void 0:r.type)==="error"){try{(m=(f=M(this,xi)).onError)==null||m.call(f,r.error,y,x,b)}catch(j){Promise.reject(j)}try{(v=(h=M(this,xi)).onSettled)==null||v.call(h,void 0,r.error,y,x,b)}catch(j){Promise.reject(j)}}}this.listeners.forEach(y=>{y(M(this,da))})})},NS),Br,_S,$_=(_S=class extends Os{constructor(t={}){super();Ne(this,Br);this.config=t,ge(this,Br,new Map)}build(t,r,a){const l=r.queryKey,o=r.queryHash??Kp(l,r);let u=this.get(o);return u||(u=new O_({client:t,queryKey:l,queryHash:o,options:t.defaultQueryOptions(r),state:a,defaultOptions:t.getQueryDefaults(l)}),this.add(u)),u}add(t){M(this,Br).has(t.queryHash)||(M(this,Br).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=M(this,Br).get(t.queryHash);r&&(t.destroy(),r===t&&M(this,Br).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return M(this,Br).get(t)}getAll(){return[...M(this,Br).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(a=>r0(r,a))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(a=>r0(t,a)):r}notify(t){Qt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Qt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Br=new WeakMap,_S),Dt,fa,ha,js,Es,ma,Cs,Ns,AS,q_=(AS=class{constructor(e={}){Ne(this,Dt);Ne(this,fa);Ne(this,ha);Ne(this,js);Ne(this,Es);Ne(this,ma);Ne(this,Cs);Ne(this,Ns);ge(this,Dt,e.queryCache||new $_),ge(this,fa,e.mutationCache||new B_),ge(this,ha,e.defaultOptions||{}),ge(this,js,new Map),ge(this,Es,new Map),ge(this,ma,0)}mount(){Mc(this,ma)._++,M(this,ma)===1&&(ge(this,Cs,Gp.subscribe(async e=>{e&&(await this.resumePausedMutations(),M(this,Dt).onFocus())})),ge(this,Ns,ud.subscribe(async e=>{e&&(await this.resumePausedMutations(),M(this,Dt).onOnline())})))}unmount(){var e,t;Mc(this,ma)._--,M(this,ma)===0&&((e=M(this,Cs))==null||e.call(this),ge(this,Cs,void 0),(t=M(this,Ns))==null||t.call(this),ge(this,Ns,void 0))}isFetching(e){return M(this,Dt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return M(this,fa).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=M(this,Dt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=M(this,Dt).build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(pa(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return M(this,Dt).findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),l=M(this,Dt).get(a.queryHash),o=l==null?void 0:l.state.data,u=k_(t,o);if(u!==void 0)return M(this,Dt).build(this,a).setData(u,{...r,manual:!0})}setQueriesData(e,t,r){return Qt.batch(()=>M(this,Dt).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=M(this,Dt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=M(this,Dt);Qt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=M(this,Dt);return Qt.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=Qt.batch(()=>M(this,Dt).findAll(e).map(l=>l.cancel(r)));return Promise.all(a).then(xn).catch(xn)}invalidateQueries(e,t={}){return Qt.batch(()=>(M(this,Dt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},a=Qt.batch(()=>M(this,Dt).findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let o=l.fetch(void 0,r);return r.throwOnError||(o=o.catch(xn)),l.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(xn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=M(this,Dt).build(this,t);return r.isStaleByTime(pa(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(xn).catch(xn)}fetchInfiniteQuery(e){return e.behavior=d0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(xn).catch(xn)}ensureInfiniteQueryData(e){return e.behavior=d0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ud.isOnline()?M(this,fa).resumePausedMutations():Promise.resolve()}getQueryCache(){return M(this,Dt)}getMutationCache(){return M(this,fa)}getDefaultOptions(){return M(this,ha)}setDefaultOptions(e){ge(this,ha,e)}setQueryDefaults(e,t){M(this,js).set(ll(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...M(this,js).values()],r={};return t.forEach(a=>{Yo(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){M(this,Es).set(ll(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...M(this,Es).values()],r={};return t.forEach(a=>{Yo(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...M(this,ha).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Kp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Yp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...M(this,ha).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){M(this,Dt).clear(),M(this,fa).clear()}},Dt=new WeakMap,fa=new WeakMap,ha=new WeakMap,js=new WeakMap,Es=new WeakMap,ma=new WeakMap,Cs=new WeakMap,Ns=new WeakMap,AS),$S=S.createContext(void 0),er=e=>{const t=S.useContext($S);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},F_=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx($S.Provider,{value:e,children:t})),qS=S.createContext(!1),H_=()=>S.useContext(qS);qS.Provider;function Z_(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var V_=S.createContext(Z_()),Q_=()=>S.useContext(V_),G_=(e,t,r)=>{const a=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Xp(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},K_=e=>{S.useEffect(()=>{e.clearReset()},[e])},Y_=({result:e,errorResetBoundary:t,throwOnError:r,query:a,suspense:l})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(l&&e.data===void 0||Xp(r,[e.error,a])),X_=e=>{if(e.suspense){const r=l=>l==="static"?l:Math.max(l??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...l)=>r(a(...l)):r(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},J_=(e,t)=>e.isLoading&&e.isFetching&&!t,W_=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,h0=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function e2(e,t,r){var x,b,j,k;const a=H_(),l=Q_(),o=er(),u=o.defaultQueryOptions(e);(b=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||b.call(x,u);const f=o.getQueryCache().get(u.queryHash);u._optimisticResults=a?"isRestoring":"optimistic",X_(u),G_(u,l,f),K_(l);const m=!o.getQueryCache().get(u.queryHash),[h]=S.useState(()=>new t(o,u)),v=h.getOptimisticResult(u),y=!a&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(N=>{const E=y?h.subscribe(Qt.batchCalls(N)):xn;return h.updateResult(),E},[h,y]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),S.useEffect(()=>{h.setOptions(u)},[u,h]),W_(u,v))throw h0(u,h,l);if(Y_({result:v,errorResetBoundary:l,throwOnError:u.throwOnError,query:f,suspense:u.suspense}))throw v.error;if((k=(j=o.getDefaultOptions().queries)==null?void 0:j._experimental_afterQuery)==null||k.call(j,u,v),u.experimental_prefetchInRender&&!Xo.isServer()&&J_(v,a)){const N=m?h0(u,h,l):f==null?void 0:f.promise;N==null||N.catch(xn).finally(()=>{h.updateResult()})}return u.notifyOnChangeProps?v:h.trackResult(v)}function Fe(e,t){return e2(e,D_)}function vt(e,t){const r=er(),[a]=S.useState(()=>new P_(r,e));S.useEffect(()=>{a.setOptions(e)},[a,e]);const l=S.useSyncExternalStore(S.useCallback(u=>a.subscribe(Qt.batchCalls(u)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=S.useCallback((u,f)=>{a.mutate(u,f).catch(xn)},[a]);if(l.error&&Xp(a.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:o,mutateAsync:l.mutate}}/**
50
- * react-router v7.13.1
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */var m0="popstate";function p0(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function t2(e={}){function t(a,l){var h;let o=(h=l.state)==null?void 0:h.masked,{pathname:u,search:f,hash:m}=o||a.location;return gp("",{pathname:u,search:f,hash:m},l.state&&l.state.usr||null,l.state&&l.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,l){return typeof l=="string"?l:Jo(l)}return r2(t,r,null,e)}function Nt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function pr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function n2(){return Math.random().toString(36).substring(2,10)}function g0(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function gp(e,t,r=null,a,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ds(t):t,state:r,key:t&&t.key||a||n2(),unstable_mask:l}}function Jo({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ds(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function r2(e,t,r,a={}){let{window:l=document.defaultView,v5Compat:o=!1}=a,u=l.history,f="POP",m=null,h=v();h==null&&(h=0,u.replaceState({...u.state,idx:h},""));function v(){return(u.state||{idx:null}).idx}function y(){f="POP";let N=v(),E=N==null?null:N-h;h=N,m&&m({action:f,location:k.location,delta:E})}function x(N,E){f="PUSH";let R=p0(N)?N:gp(k.location,N,E);h=v()+1;let A=g0(R,h),I=k.createHref(R.unstable_mask||R);try{u.pushState(A,"",I)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;l.location.assign(I)}o&&m&&m({action:f,location:k.location,delta:1})}function b(N,E){f="REPLACE";let R=p0(N)?N:gp(k.location,N,E);h=v();let A=g0(R,h),I=k.createHref(R.unstable_mask||R);u.replaceState(A,"",I),o&&m&&m({action:f,location:k.location,delta:0})}function j(N){return i2(N)}let k={get action(){return f},get location(){return e(l,u)},listen(N){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(m0,y),m=N,()=>{l.removeEventListener(m0,y),m=null}},createHref(N){return t(l,N)},createURL:j,encodeLocation(N){let E=j(N);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:x,replace:b,go(N){return u.go(N)}};return k}function i2(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Nt(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Jo(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function FS(e,t,r="/"){return a2(e,t,r,!1)}function a2(e,t,r,a){let l=typeof t=="string"?Ds(t):t,o=ki(l.pathname||"/",r);if(o==null)return null;let u=HS(e);l2(u);let f=null;for(let m=0;f==null&&m<u.length;++m){let h=y2(o);f=p2(u[m],h,a)}return f}function HS(e,t=[],r=[],a="",l=!1){let o=(u,f,m=l,h)=>{let v={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(a)&&m)return;Nt(v.relativePath.startsWith(a),`Absolute route path "${v.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(a.length)}let y=qr([a,v.relativePath]),x=r.concat(v);u.children&&u.children.length>0&&(Nt(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),HS(u.children,t,x,y,m)),!(u.path==null&&!u.index)&&t.push({path:y,score:h2(y,u.index),routesMeta:x})};return e.forEach((u,f)=>{var m;if(u.path===""||!((m=u.path)!=null&&m.includes("?")))o(u,f);else for(let h of ZS(u.path))o(u,f,!0,h)}),t}function ZS(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,l=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return l?[o,""]:[o];let u=ZS(a.join("/")),f=[];return f.push(...u.map(m=>m===""?o:[o,m].join("/"))),l&&f.push(...u),f.map(m=>e.startsWith("/")&&m===""?"/":m)}function l2(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:m2(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var s2=/^:[\w-]+$/,o2=3,u2=2,c2=1,d2=10,f2=-2,y0=e=>e==="*";function h2(e,t){let r=e.split("/"),a=r.length;return r.some(y0)&&(a+=f2),t&&(a+=u2),r.filter(l=>!y0(l)).reduce((l,o)=>l+(s2.test(o)?o2:o===""?c2:d2),a)}function m2(e,t){return e.length===t.length&&e.slice(0,-1).every((a,l)=>a===t[l])?e[e.length-1]-t[t.length-1]:0}function p2(e,t,r=!1){let{routesMeta:a}=e,l={},o="/",u=[];for(let f=0;f<a.length;++f){let m=a[f],h=f===a.length-1,v=o==="/"?t:t.slice(o.length)||"/",y=cd({path:m.relativePath,caseSensitive:m.caseSensitive,end:h},v),x=m.route;if(!y&&h&&r&&!a[a.length-1].route.index&&(y=cd({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},v)),!y)return null;Object.assign(l,y.params),u.push({params:l,pathname:qr([o,y.pathname]),pathnameBase:S2(qr([o,y.pathnameBase])),route:x}),y.pathnameBase!=="/"&&(o=qr([o,y.pathnameBase]))}return u}function cd(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=g2(e.path,e.caseSensitive,e.end),l=t.match(r);if(!l)return null;let o=l[0],u=o.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:a.reduce((h,{paramName:v,isOptional:y},x)=>{if(v==="*"){let j=f[x]||"";u=o.slice(0,o.length-j.length).replace(/(.)\/+$/,"$1")}const b=f[x];return y&&!b?h[v]=void 0:h[v]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:u,pattern:e}}function g2(e,t=!1,r=!0){pr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,f,m,h,v)=>{if(a.push({paramName:f,isOptional:m!=null}),m){let y=v.charAt(h+u.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),a]}function y2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return pr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ki(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}var v2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function x2(e,t="/"){let{pathname:r,search:a="",hash:l=""}=typeof e=="string"?Ds(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=v0(r.substring(1),"/"):o=v0(r,t)):o=t,{pathname:o,search:w2(a),hash:k2(l)}}function v0(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function pm(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function b2(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Wp(e){let t=b2(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function jd(e,t,r,a=!1){let l;typeof e=="string"?l=Ds(e):(l={...e},Nt(!l.pathname||!l.pathname.includes("?"),pm("?","pathname","search",l)),Nt(!l.pathname||!l.pathname.includes("#"),pm("#","pathname","hash",l)),Nt(!l.search||!l.search.includes("#"),pm("#","search","hash",l)));let o=e===""||l.pathname==="",u=o?"/":l.pathname,f;if(u==null)f=r;else{let y=t.length-1;if(!a&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),y-=1;l.pathname=x.join("/")}f=y>=0?t[y]:"/"}let m=x2(l,f),h=u&&u!=="/"&&u.endsWith("/"),v=(o||u===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(h||v)&&(m.pathname+="/"),m}var qr=e=>e.join("/").replace(/\/\/+/g,"/"),S2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),w2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,k2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,j2=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function E2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function C2(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var VS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function QS(e,t){let r=e;if(typeof r!="string"||!v2.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,l=!1;if(VS)try{let o=new URL(window.location.href),u=r.startsWith("//")?new URL(o.protocol+r):new URL(r),f=ki(u.pathname,t);u.origin===o.origin&&f!=null?r=f+u.search+u.hash:l=!0}catch{pr(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:l,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var GS=["POST","PUT","PATCH","DELETE"];new Set(GS);var N2=["GET",...GS];new Set(N2);var Ms=S.createContext(null);Ms.displayName="DataRouter";var Ed=S.createContext(null);Ed.displayName="DataRouterState";var _2=S.createContext(!1),KS=S.createContext({isTransitioning:!1});KS.displayName="ViewTransition";var A2=S.createContext(new Map);A2.displayName="Fetchers";var T2=S.createContext(null);T2.displayName="Await";var tr=S.createContext(null);tr.displayName="Navigation";var hu=S.createContext(null);hu.displayName="Location";var gr=S.createContext({outlet:null,matches:[],isDataRoute:!1});gr.displayName="Route";var eg=S.createContext(null);eg.displayName="RouteError";var YS="REACT_ROUTER_ERROR",z2="REDIRECT",R2="ROUTE_ERROR_RESPONSE";function O2(e){if(e.startsWith(`${YS}:${z2}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function D2(e){if(e.startsWith(`${YS}:${R2}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new j2(t.status,t.statusText,t.data)}catch{}}function M2(e,{relative:t}={}){Nt(Ls(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=S.useContext(tr),{hash:l,pathname:o,search:u}=mu(e,{relative:t}),f=o;return r!=="/"&&(f=o==="/"?r:qr([r,o])),a.createHref({pathname:f,search:u,hash:l})}function Ls(){return S.useContext(hu)!=null}function yr(){return Nt(Ls(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(hu).location}var XS="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function JS(e){S.useContext(tr).static||S.useLayoutEffect(e)}function Vr(){let{isDataRoute:e}=S.useContext(gr);return e?X2():L2()}function L2(){Nt(Ls(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(Ms),{basename:t,navigator:r}=S.useContext(tr),{matches:a}=S.useContext(gr),{pathname:l}=yr(),o=JSON.stringify(Wp(a)),u=S.useRef(!1);return JS(()=>{u.current=!0}),S.useCallback((m,h={})=>{if(pr(u.current,XS),!u.current)return;if(typeof m=="number"){r.go(m);return}let v=jd(m,JSON.parse(o),l,h.relative==="path");e==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:qr([t,v.pathname])),(h.replace?r.replace:r.push)(v,h.state,h)},[t,r,o,l,e])}var U2=S.createContext(null);function I2(e){let t=S.useContext(gr).outlet;return S.useMemo(()=>t&&S.createElement(U2.Provider,{value:e},t),[t,e])}function B2(){let{matches:e}=S.useContext(gr),t=e[e.length-1];return t?t.params:{}}function mu(e,{relative:t}={}){let{matches:r}=S.useContext(gr),{pathname:a}=yr(),l=JSON.stringify(Wp(r));return S.useMemo(()=>jd(e,JSON.parse(l),a,t==="path"),[e,l,a,t])}function P2(e,t){return WS(e,t)}function WS(e,t,r){var N;Nt(Ls(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=S.useContext(tr),{matches:l}=S.useContext(gr),o=l[l.length-1],u=o?o.params:{},f=o?o.pathname:"/",m=o?o.pathnameBase:"/",h=o&&o.route;{let E=h&&h.path||"";tw(f,!h||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
-
60
- Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let v=yr(),y;if(t){let E=typeof t=="string"?Ds(t):t;Nt(m==="/"||((N=E.pathname)==null?void 0:N.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${E.pathname}" was given in the \`location\` prop.`),y=E}else y=v;let x=y.pathname||"/",b=x;if(m!=="/"){let E=m.replace(/^\//,"").split("/");b="/"+x.replace(/^\//,"").split("/").slice(E.length).join("/")}let j=FS(e,{pathname:b});pr(h||j!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),pr(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=Z2(j&&j.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:qr([m,a.encodeLocation?a.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?m:qr([m,a.encodeLocation?a.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),l,r);return t&&k?S.createElement(hu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},k):k}function $2(){let e=Y2(),t=E2(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:o},"ErrorBoundary")," or"," ",S.createElement("code",{style:o},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),r?S.createElement("pre",{style:l},r):null,u)}var q2=S.createElement($2,null),ew=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=D2(e.digest);r&&(e=r)}let t=e!==void 0?S.createElement(gr.Provider,{value:this.props.routeContext},S.createElement(eg.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(F2,{error:e},t):t}};ew.contextType=_2;var gm=new WeakMap;function F2({children:e,error:t}){let{basename:r}=S.useContext(tr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=O2(t.digest);if(a){let l=gm.get(t);if(l)throw l;let o=QS(a.location,r);if(VS&&!gm.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw gm.set(t,u),u}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function H2({routeContext:e,match:t,children:r}){let a=S.useContext(Ms);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(gr.Provider,{value:e},r)}function Z2(e,t=[],r){let a=r==null?void 0:r.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let l=e,o=a==null?void 0:a.errors;if(o!=null){let v=l.findIndex(y=>y.route.id&&(o==null?void 0:o[y.route.id])!==void 0);Nt(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),l=l.slice(0,Math.min(l.length,v+1))}let u=!1,f=-1;if(r&&a){u=a.renderFallback;for(let v=0;v<l.length;v++){let y=l[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(f=v),y.route.id){let{loaderData:x,errors:b}=a,j=y.route.loader&&!x.hasOwnProperty(y.route.id)&&(!b||b[y.route.id]===void 0);if(y.route.lazy||j){r.isStatic&&(u=!0),f>=0?l=l.slice(0,f+1):l=[l[0]];break}}}}let m=r==null?void 0:r.onError,h=a&&m?(v,y)=>{var x,b;m(v,{location:a.location,params:((b=(x=a.matches)==null?void 0:x[0])==null?void 0:b.params)??{},unstable_pattern:C2(a.matches),errorInfo:y})}:void 0;return l.reduceRight((v,y,x)=>{let b,j=!1,k=null,N=null;a&&(b=o&&y.route.id?o[y.route.id]:void 0,k=y.route.errorElement||q2,u&&(f<0&&x===0?(tw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,N=null):f===x&&(j=!0,N=y.route.hydrateFallbackElement||null)));let E=t.concat(l.slice(0,x+1)),R=()=>{let A;return b?A=k:j?A=N:y.route.Component?A=S.createElement(y.route.Component,null):y.route.element?A=y.route.element:A=v,S.createElement(H2,{match:y,routeContext:{outlet:v,matches:E,isDataRoute:a!=null},children:A})};return a&&(y.route.ErrorBoundary||y.route.errorElement||x===0)?S.createElement(ew,{location:a.location,revalidation:a.revalidation,component:k,error:b,children:R(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:h}):R()},null)}function tg(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function V2(e){let t=S.useContext(Ms);return Nt(t,tg(e)),t}function Q2(e){let t=S.useContext(Ed);return Nt(t,tg(e)),t}function G2(e){let t=S.useContext(gr);return Nt(t,tg(e)),t}function ng(e){let t=G2(e),r=t.matches[t.matches.length-1];return Nt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function K2(){return ng("useRouteId")}function Y2(){var a;let e=S.useContext(eg),t=Q2("useRouteError"),r=ng("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[r]}function X2(){let{router:e}=V2("useNavigate"),t=ng("useNavigate"),r=S.useRef(!1);return JS(()=>{r.current=!0}),S.useCallback(async(l,o={})=>{pr(r.current,XS),r.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...o}))},[e,t])}var x0={};function tw(e,t,r){!t&&!x0[e]&&(x0[e]=!0,pr(!1,r))}S.memo(J2);function J2({routes:e,future:t,state:r,isStatic:a,onError:l}){return WS(e,void 0,{state:r,isStatic:a,onError:l})}function rg({to:e,replace:t,state:r,relative:a}){Nt(Ls(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=S.useContext(tr);pr(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=S.useContext(gr),{pathname:u}=yr(),f=Vr(),m=jd(e,Wp(o),u,a==="path"),h=JSON.stringify(m);return S.useEffect(()=>{f(JSON.parse(h),{replace:t,state:r,relative:a})},[f,h,a,t,r]),null}function yp(e){return I2(e.context)}function Mr(e){Nt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function W2({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:l,static:o=!1,unstable_useTransitions:u}){Nt(!Ls(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),m=S.useMemo(()=>({basename:f,navigator:l,static:o,unstable_useTransitions:u,future:{}}),[f,l,o,u]);typeof r=="string"&&(r=Ds(r));let{pathname:h="/",search:v="",hash:y="",state:x=null,key:b="default",unstable_mask:j}=r,k=S.useMemo(()=>{let N=ki(h,f);return N==null?null:{location:{pathname:N,search:v,hash:y,state:x,key:b,unstable_mask:j},navigationType:a}},[f,h,v,y,x,b,a,j]);return pr(k!=null,`<Router basename="${f}"> is not able to match the URL "${h}${v}${y}" because it does not start with the basename, so the <Router> won't render anything.`),k==null?null:S.createElement(tr.Provider,{value:m},S.createElement(hu.Provider,{children:t,value:k}))}function eA({children:e,location:t}){return P2(vp(e),t)}function vp(e,t=[]){let r=[];return S.Children.forEach(e,(a,l)=>{if(!S.isValidElement(a))return;let o=[...t,l];if(a.type===S.Fragment){r.push.apply(r,vp(a.props.children,o));return}Nt(a.type===Mr,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Nt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let u={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(u.children=vp(a.props.children,o)),r.push(u)}),r}var td="get",nd="application/x-www-form-urlencoded";function Cd(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function tA(e){return Cd(e)&&e.tagName.toLowerCase()==="button"}function nA(e){return Cd(e)&&e.tagName.toLowerCase()==="form"}function rA(e){return Cd(e)&&e.tagName.toLowerCase()==="input"}function iA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function aA(e,t){return e.button===0&&(!t||t==="_self")&&!iA(e)}function xp(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(l=>[r,l]):[[r,a]])},[]))}function lA(e,t){let r=xp(e);return t&&t.forEach((a,l)=>{r.has(l)||t.getAll(l).forEach(o=>{r.append(l,o)})}),r}var Uc=null;function sA(){if(Uc===null)try{new FormData(document.createElement("form"),0),Uc=!1}catch{Uc=!0}return Uc}var oA=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ym(e){return e!=null&&!oA.has(e)?(pr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nd}"`),null):e}function uA(e,t){let r,a,l,o,u;if(nA(e)){let f=e.getAttribute("action");a=f?ki(f,t):null,r=e.getAttribute("method")||td,l=ym(e.getAttribute("enctype"))||nd,o=new FormData(e)}else if(tA(e)||rA(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=e.getAttribute("formaction")||f.getAttribute("action");if(a=m?ki(m,t):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||td,l=ym(e.getAttribute("formenctype"))||ym(f.getAttribute("enctype"))||nd,o=new FormData(f,e),!sA()){let{name:h,type:v,value:y}=e;if(v==="image"){let x=h?`${h}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else h&&o.append(h,y)}}else{if(Cd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=td,a=null,l=nd,u=e}return o&&l==="text/plain"&&(u=o,o=void 0),{action:a,method:r.toLowerCase(),encType:l,formData:o,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ig(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cA(e,t,r,a){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${a}`:l.pathname=`${l.pathname}.${a}`:l.pathname==="/"?l.pathname=`_root.${a}`:t&&ki(l.pathname,t)==="/"?l.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${a}`,l}async function dA(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fA(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function hA(e,t,r){let a=await Promise.all(e.map(async l=>{let o=t.routes[l.route.id];if(o){let u=await dA(o,r);return u.links?u.links():[]}return[]}));return yA(a.flat(1).filter(fA).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function b0(e,t,r,a,l,o){let u=(m,h)=>r[h]?m.route.id!==r[h].route.id:!0,f=(m,h)=>{var v;return r[h].pathname!==m.pathname||((v=r[h].route.path)==null?void 0:v.endsWith("*"))&&r[h].params["*"]!==m.params["*"]};return o==="assets"?t.filter((m,h)=>u(m,h)||f(m,h)):o==="data"?t.filter((m,h)=>{var y;let v=a.routes[m.route.id];if(!v||!v.hasLoader)return!1;if(u(m,h)||f(m,h))return!0;if(m.route.shouldRevalidate){let x=m.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((y=r[0])==null?void 0:y.params)||{},nextUrl:new URL(e,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function mA(e,t,{includeHydrateFallback:r}={}){return pA(e.map(a=>{let l=t.routes[a.route.id];if(!l)return[];let o=[l.module];return l.clientActionModule&&(o=o.concat(l.clientActionModule)),l.clientLoaderModule&&(o=o.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(o=o.concat(l.hydrateFallbackModule)),l.imports&&(o=o.concat(l.imports)),o}).flat(1))}function pA(e){return[...new Set(e)]}function gA(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function yA(e,t){let r=new Set;return new Set(t),e.reduce((a,l)=>{let o=JSON.stringify(gA(l));return r.has(o)||(r.add(o),a.push({key:o,link:l})),a},[])}function nw(){let e=S.useContext(Ms);return ig(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vA(){let e=S.useContext(Ed);return ig(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ag=S.createContext(void 0);ag.displayName="FrameworkContext";function rw(){let e=S.useContext(ag);return ig(e,"You must render this element inside a <HydratedRouter> element"),e}function xA(e,t){let r=S.useContext(ag),[a,l]=S.useState(!1),[o,u]=S.useState(!1),{onFocus:f,onBlur:m,onMouseEnter:h,onMouseLeave:v,onTouchStart:y}=t,x=S.useRef(null);S.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let k=E=>{E.forEach(R=>{u(R.isIntersecting)})},N=new IntersectionObserver(k,{threshold:.5});return x.current&&N.observe(x.current),()=>{N.disconnect()}}},[e]),S.useEffect(()=>{if(a){let k=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(k)}}},[a]);let b=()=>{l(!0)},j=()=>{l(!1),u(!1)};return r?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Mo(f,b),onBlur:Mo(m,j),onMouseEnter:Mo(h,b),onMouseLeave:Mo(v,j),onTouchStart:Mo(y,b)}]:[!1,x,{}]}function Mo(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function bA({page:e,...t}){let{router:r}=nw(),a=S.useMemo(()=>FS(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?S.createElement(wA,{page:e,matches:a,...t}):null}function SA(e){let{manifest:t,routeModules:r}=rw(),[a,l]=S.useState([]);return S.useEffect(()=>{let o=!1;return hA(e,t,r).then(u=>{o||l(u)}),()=>{o=!0}},[e,t,r]),a}function wA({page:e,matches:t,...r}){let a=yr(),{future:l,manifest:o,routeModules:u}=rw(),{basename:f}=nw(),{loaderData:m,matches:h}=vA(),v=S.useMemo(()=>b0(e,t,h,o,a,"data"),[e,t,h,o,a]),y=S.useMemo(()=>b0(e,t,h,o,a,"assets"),[e,t,h,o,a]),x=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let k=new Set,N=!1;if(t.forEach(R=>{var I;let A=o.routes[R.route.id];!A||!A.hasLoader||(!v.some(q=>q.route.id===R.route.id)&&R.route.id in m&&((I=u[R.route.id])!=null&&I.shouldRevalidate)||A.hasClientLoader?N=!0:k.add(R.route.id))}),k.size===0)return[];let E=cA(e,f,l.unstable_trailingSlashAwareDataRequests,"data");return N&&k.size>0&&E.searchParams.set("_routes",t.filter(R=>k.has(R.route.id)).map(R=>R.route.id).join(",")),[E.pathname+E.search]},[f,l.unstable_trailingSlashAwareDataRequests,m,a,o,v,t,e,u]),b=S.useMemo(()=>mA(y,o),[y,o]),j=SA(y);return S.createElement(S.Fragment,null,x.map(k=>S.createElement("link",{key:k,rel:"prefetch",as:"fetch",href:k,...r})),b.map(k=>S.createElement("link",{key:k,rel:"modulepreload",href:k,...r})),j.map(({key:k,link:N})=>S.createElement("link",{key:k,nonce:r.nonce,...N,crossOrigin:N.crossOrigin??r.crossOrigin})))}function kA(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var jA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{jA&&(window.__reactRouterVersion="7.13.1")}catch{}function EA({basename:e,children:t,unstable_useTransitions:r,window:a}){let l=S.useRef();l.current==null&&(l.current=t2({window:a,v5Compat:!0}));let o=l.current,[u,f]=S.useState({action:o.action,location:o.location}),m=S.useCallback(h=>{r===!1?f(h):S.startTransition(()=>f(h))},[r]);return S.useLayoutEffect(()=>o.listen(m),[o,m]),S.createElement(W2,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:o,unstable_useTransitions:r})}var iw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,aw=S.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:l,reloadDocument:o,replace:u,unstable_mask:f,state:m,target:h,to:v,preventScrollReset:y,viewTransition:x,unstable_defaultShouldRevalidate:b,...j},k){let{basename:N,navigator:E,unstable_useTransitions:R}=S.useContext(tr),A=typeof v=="string"&&iw.test(v),I=QS(v,N);v=I.to;let q=M2(v,{relative:l}),z=yr(),$=null;if(f){let te=jd(f,[],z.unstable_mask?z.unstable_mask.pathname:"/",!0);N!=="/"&&(te.pathname=te.pathname==="/"?N:qr([N,te.pathname])),$=E.createHref(te)}let[Z,W,F]=xA(a,j),re=_A(v,{replace:u,unstable_mask:f,state:m,target:h,preventScrollReset:y,relative:l,viewTransition:x,unstable_defaultShouldRevalidate:b,unstable_useTransitions:R});function le(te){t&&t(te),te.defaultPrevented||re(te)}let X=!(I.isExternal||o),de=S.createElement("a",{...j,...F,href:(X?$:void 0)||I.absoluteURL||q,onClick:X?le:t,ref:kA(k,W),target:h,"data-discover":!A&&r==="render"?"true":void 0});return Z&&!A?S.createElement(S.Fragment,null,de,S.createElement(bA,{page:q})):de});aw.displayName="Link";var lw=S.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:l=!1,style:o,to:u,viewTransition:f,children:m,...h},v){let y=mu(u,{relative:h.relative}),x=yr(),b=S.useContext(Ed),{navigator:j,basename:k}=S.useContext(tr),N=b!=null&&OA(y)&&f===!0,E=j.encodeLocation?j.encodeLocation(y).pathname:y.pathname,R=x.pathname,A=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;r||(R=R.toLowerCase(),A=A?A.toLowerCase():null,E=E.toLowerCase()),A&&k&&(A=ki(A,k)||A);const I=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let q=R===E||!l&&R.startsWith(E)&&R.charAt(I)==="/",z=A!=null&&(A===E||!l&&A.startsWith(E)&&A.charAt(E.length)==="/"),$={isActive:q,isPending:z,isTransitioning:N},Z=q?t:void 0,W;typeof a=="function"?W=a($):W=[a,q?"active":null,z?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let F=typeof o=="function"?o($):o;return S.createElement(aw,{...h,"aria-current":Z,className:W,ref:v,style:F,to:u,viewTransition:f},typeof m=="function"?m($):m)});lw.displayName="NavLink";var CA=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:l,state:o,method:u=td,action:f,onSubmit:m,relative:h,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:x,...b},j)=>{let{unstable_useTransitions:k}=S.useContext(tr),N=zA(),E=RA(f,{relative:h}),R=u.toLowerCase()==="get"?"get":"post",A=typeof f=="string"&&iw.test(f),I=q=>{if(m&&m(q),q.defaultPrevented)return;q.preventDefault();let z=q.nativeEvent.submitter,$=(z==null?void 0:z.getAttribute("formmethod"))||u,Z=()=>N(z||q.currentTarget,{fetcherKey:t,method:$,navigate:r,replace:l,state:o,relative:h,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:x});k&&r!==!1?S.startTransition(()=>Z()):Z()};return S.createElement("form",{ref:j,method:R,action:E,onSubmit:a?m:I,...b,"data-discover":!A&&e==="render"?"true":void 0})});CA.displayName="Form";function NA(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sw(e){let t=S.useContext(Ms);return Nt(t,NA(e)),t}function _A(e,{target:t,replace:r,unstable_mask:a,state:l,preventScrollReset:o,relative:u,viewTransition:f,unstable_defaultShouldRevalidate:m,unstable_useTransitions:h}={}){let v=Vr(),y=yr(),x=mu(e,{relative:u});return S.useCallback(b=>{if(aA(b,t)){b.preventDefault();let j=r!==void 0?r:Jo(y)===Jo(x),k=()=>v(e,{replace:j,unstable_mask:a,state:l,preventScrollReset:o,relative:u,viewTransition:f,unstable_defaultShouldRevalidate:m});h?S.startTransition(()=>k()):k()}},[y,v,x,r,a,l,t,e,o,u,f,m,h])}function lg(e){pr(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=S.useRef(xp(e)),r=S.useRef(!1),a=yr(),l=S.useMemo(()=>lA(a.search,r.current?null:t.current),[a.search]),o=Vr(),u=S.useCallback((f,m)=>{const h=xp(typeof f=="function"?f(new URLSearchParams(l)):f);r.current=!0,o("?"+h,m)},[o,l]);return[l,u]}var AA=0,TA=()=>`__${String(++AA)}__`;function zA(){let{router:e}=sw("useSubmit"),{basename:t}=S.useContext(tr),r=K2(),a=e.fetch,l=e.navigate;return S.useCallback(async(o,u={})=>{let{action:f,method:m,encType:h,formData:v,body:y}=uA(o,t);if(u.navigate===!1){let x=u.fetcherKey||TA();await a(x,r,u.action||f,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:v,body:y,formMethod:u.method||m,formEncType:u.encType||h,flushSync:u.flushSync})}else await l(u.action||f,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:v,body:y,formMethod:u.method||m,formEncType:u.encType||h,replace:u.replace,state:u.state,fromRouteId:r,flushSync:u.flushSync,viewTransition:u.viewTransition})},[a,l,t,r])}function RA(e,{relative:t}={}){let{basename:r}=S.useContext(tr),a=S.useContext(gr);Nt(a,"useFormAction must be used inside a RouteContext");let[l]=a.matches.slice(-1),o={...mu(e||".",{relative:t})},u=yr();if(e==null){o.search=u.search;let f=new URLSearchParams(o.search),m=f.getAll("index");if(m.some(v=>v==="")){f.delete("index"),m.filter(y=>y).forEach(y=>f.append("index",y));let v=f.toString();o.search=v?`?${v}`:""}}return(!e||e===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:qr([r,o.pathname])),Jo(o)}function OA(e,{relative:t}={}){let r=S.useContext(KS);Nt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=sw("useViewTransitionState"),l=mu(e,{relative:t});if(!r.isTransitioning)return!1;let o=ki(r.currentLocation.pathname,a)||r.currentLocation.pathname,u=ki(r.nextLocation.pathname,a)||r.nextLocation.pathname;return cd(l.pathname,u)!=null||cd(l.pathname,o)!=null}const DA="/api/v1";async function MA(e,t){const r=await fetch(`${DA}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:t})});if(!r.ok){const a=await r.text();let l;try{l=JSON.parse(a).error??a}catch{l=a}throw new Error(l)}return await r.json()}const ow="/api/v1",sg="first-tree-hub:tokens";function og(){const e=localStorage.getItem(sg);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function uw(e){localStorage.setItem(sg,JSON.stringify(e))}function cw(){localStorage.removeItem(sg)}class Nd extends Error{constructor(t,r,a){super(r),this.status=t,this.issues=a,this.name="ApiError"}}let Lo=null;async function LA(e){return Lo||(Lo=(async()=>{try{const t=await fetch(`${ow}/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:e})});if(!t.ok)return null;const r=await t.json(),a={accessToken:r.accessToken,refreshToken:r.refreshToken??e};return uw(a),a}catch{return null}finally{Lo=null}})(),Lo)}async function Ic(e,t){const{method:r="GET",body:a}=t??{},l=f=>{const m={};return f&&(m.Authorization=`Bearer ${f}`),a!==void 0&&(m["Content-Type"]="application/json"),fetch(`${ow}${e}`,{method:r,headers:m,body:a!==void 0?JSON.stringify(a):void 0})},o=og();let u=await l(o==null?void 0:o.accessToken);if(u.status===401&&(o!=null&&o.refreshToken)){const f=await LA(o.refreshToken);f&&(u=await l(f.accessToken))}if(!u.ok){u.status===401&&(cw(),window.dispatchEvent(new CustomEvent("auth:logout")));const f=await u.text();let m,h;try{const v=JSON.parse(f);m=v.error??f,Array.isArray(v.details)&&(h=v.details.filter(y=>typeof y=="object"&&y!==null&&Array.isArray(y.path)))}catch{m=f}throw new Nd(u.status,m,h)}if(u.status!==204)return await u.json()}const Me={get:e=>Ic(e),post:(e,t)=>Ic(e,{method:"POST",body:t}),patch:(e,t)=>Ic(e,{method:"PATCH",body:t}),delete:e=>Ic(e,{method:"DELETE"})},dw=S.createContext(null);function UA({children:e}){const[t,r]=S.useState(()=>!!og()),[a,l]=S.useState(null),[o,u]=S.useState(null),[f,m]=S.useState(null),h=S.useCallback(()=>{cw(),r(!1),l(null),u(null),m(null)},[]),v=S.useCallback(async()=>{try{const x=await Me.get("/me");l(x.member.role),u(x.member.id),m(x.member.agentId)}catch{}},[]),y=S.useCallback(async(x,b)=>{const j=await MA(x,b);uw({accessToken:j.accessToken,refreshToken:j.refreshToken}),r(!0),await Me.get("/me").then(k=>{l(k.member.role),u(k.member.id),m(k.member.agentId)}).catch(()=>{})},[]);return S.useEffect(()=>{t&&!a&&v()},[t,a,v]),S.useEffect(()=>{const x=()=>h();return window.addEventListener("auth:logout",x),()=>window.removeEventListener("auth:logout",x)},[h]),d.jsx(dw.Provider,{value:{isAuthenticated:t,role:a,memberId:o,agentId:f,login:y,logout:h},children:e})}function Sa(){const e=S.useContext(dw);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}function IA(){const{isAuthenticated:e}=Sa();return e?d.jsx(yp,{}):d.jsx(rg,{to:"/login",replace:!0})}/**
61
- * @license lucide-react v0.577.0 - ISC
62
- *
63
- * This source code is licensed under the ISC license.
64
- * See the LICENSE file in the root directory of this source tree.
65
- */const fw=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();/**
66
- * @license lucide-react v0.577.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */const BA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
71
- * @license lucide-react v0.577.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const PA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase());/**
76
- * @license lucide-react v0.577.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const S0=e=>{const t=PA(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
81
- * @license lucide-react v0.577.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */var $A={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"};/**
86
- * @license lucide-react v0.577.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const qA=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
91
- * @license lucide-react v0.577.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const FA=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:l="",children:o,iconNode:u,...f},m)=>S.createElement("svg",{ref:m,...$A,width:t,height:t,stroke:e,strokeWidth:a?Number(r)*24/Number(t):r,className:fw("lucide",l),...!o&&!qA(f)&&{"aria-hidden":"true"},...f},[...u.map(([h,v])=>S.createElement(h,v)),...Array.isArray(o)?o:[o]]));/**
96
- * @license lucide-react v0.577.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const ut=(e,t)=>{const r=S.forwardRef(({className:a,...l},o)=>S.createElement(FA,{ref:o,iconNode:t,className:fw(`lucide-${BA(S0(e))}`,`lucide-${e}`,a),...l}));return r.displayName=S0(e),r};/**
101
- * @license lucide-react v0.577.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const HA=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ZA=ut("arrow-left",HA);/**
106
- * @license lucide-react v0.577.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const VA=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],QA=ut("bell",VA);/**
111
- * @license lucide-react v0.577.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const GA=[["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"}]],KA=ut("bot",GA);/**
116
- * @license lucide-react v0.577.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const YA=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],XA=ut("cable",YA);/**
121
- * @license lucide-react v0.577.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const JA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ug=ut("check",JA);/**
126
- * @license lucide-react v0.577.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const WA=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],eT=ut("chevron-down",WA);/**
131
- * @license lucide-react v0.577.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const tT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],nT=ut("chevron-right",tT);/**
136
- * @license lucide-react v0.577.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const rT=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],cg=ut("copy",rT);/**
141
- * @license lucide-react v0.577.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const iT=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],hw=ut("ellipsis",iT);/**
146
- * @license lucide-react v0.577.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const aT=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],lT=ut("layout-dashboard",aT);/**
151
- * @license lucide-react v0.577.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const sT=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],_d=ut("leaf",sT);/**
156
- * @license lucide-react v0.577.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const oT=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],w0=ut("link-2",oT);/**
161
- * @license lucide-react v0.577.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const uT=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],cT=ut("lock",uT);/**
166
- * @license lucide-react v0.577.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const dT=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],fT=ut("log-out",dT);/**
171
- * @license lucide-react v0.577.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const hT=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],mw=ut("message-square",hT);/**
176
- * @license lucide-react v0.577.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const mT=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],pT=ut("moon",mT);/**
181
- * @license lucide-react v0.577.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const gT=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],yT=ut("pause",gT);/**
186
- * @license lucide-react v0.577.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const vT=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Ad=ut("pencil",vT);/**
191
- * @license lucide-react v0.577.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const xT=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],bT=ut("play",xT);/**
196
- * @license lucide-react v0.577.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const ST=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],fl=ut("plus",ST);/**
201
- * @license lucide-react v0.577.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const wT=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],dg=ut("search",wT);/**
206
- * @license lucide-react v0.577.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const kT=[["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"}]],jT=ut("send",kT);/**
211
- * @license lucide-react v0.577.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const ET=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],CT=ut("square",ET);/**
216
- * @license lucide-react v0.577.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const NT=[["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"}]],_T=ut("sun",NT);/**
221
- * @license lucide-react v0.577.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const AT=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],k0=ut("terminal",AT);/**
226
- * @license lucide-react v0.577.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const TT=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Wo=ut("trash-2",TT);/**
231
- * @license lucide-react v0.577.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const zT=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],RT=ut("triangle-alert",zT);/**
236
- * @license lucide-react v0.577.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const OT=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],DT=ut("undo-2",OT);/**
241
- * @license lucide-react v0.577.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const MT=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],LT=ut("unplug",MT);/**
246
- * @license lucide-react v0.577.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const UT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],pw=ut("x",UT);function gw(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(r=gw(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function yw(){for(var e,t,r=0,a="",l=arguments.length;r<l;r++)(e=arguments[r])&&(t=gw(e))&&(a&&(a+=" "),a+=t);return a}const IT=(e,t)=>{const r=new Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},BT=(e,t)=>({classGroupId:e,validator:t}),vw=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),dd="-",j0=[],PT="arbitrary..",$T=e=>{const t=FT(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return qT(u);const f=u.split(dd),m=f[0]===""&&f.length>1?1:0;return xw(f,m,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const m=a[u],h=r[u];return m?h?IT(h,m):m:h||j0}return r[u]||j0}}},xw=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const l=e[t],o=r.nextPart.get(l);if(o){const h=xw(e,t+1,o);if(h)return h}const u=r.validators;if(u===null)return;const f=t===0?e.join(dd):e.slice(t).join(dd),m=u.length;for(let h=0;h<m;h++){const v=u[h];if(v.validator(f))return v.classGroupId}},qT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?PT+a:void 0})(),FT=e=>{const{theme:t,classGroups:r}=e;return HT(r,t)},HT=(e,t)=>{const r=vw();for(const a in e){const l=e[a];fg(l,r,a,t)}return r},fg=(e,t,r,a)=>{const l=e.length;for(let o=0;o<l;o++){const u=e[o];ZT(u,t,r,a)}},ZT=(e,t,r,a)=>{if(typeof e=="string"){VT(e,t,r);return}if(typeof e=="function"){QT(e,t,r,a);return}GT(e,t,r,a)},VT=(e,t,r)=>{const a=e===""?t:bw(t,e);a.classGroupId=r},QT=(e,t,r,a)=>{if(KT(e)){fg(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(BT(r,e))},GT=(e,t,r,a)=>{const l=Object.entries(e),o=l.length;for(let u=0;u<o;u++){const[f,m]=l[u];fg(m,bw(t,f),r,a)}},bw=(e,t)=>{let r=e;const a=t.split(dd),l=a.length;for(let o=0;o<l;o++){const u=a[o];let f=r.nextPart.get(u);f||(f=vw(),r.nextPart.set(u,f)),r=f}return r},KT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,YT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const l=(o,u)=>{r[o]=u,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(o){let u=r[o];if(u!==void 0)return u;if((u=a[o])!==void 0)return l(o,u),u},set(o,u){o in r?r[o]=u:l(o,u)}}},bp="!",E0=":",XT=[],C0=(e,t,r,a,l)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:l}),JT=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=l=>{const o=[];let u=0,f=0,m=0,h;const v=l.length;for(let k=0;k<v;k++){const N=l[k];if(u===0&&f===0){if(N===E0){o.push(l.slice(m,k)),m=k+1;continue}if(N==="/"){h=k;continue}}N==="["?u++:N==="]"?u--:N==="("?f++:N===")"&&f--}const y=o.length===0?l:l.slice(m);let x=y,b=!1;y.endsWith(bp)?(x=y.slice(0,-1),b=!0):y.startsWith(bp)&&(x=y.slice(1),b=!0);const j=h&&h>m?h-m:void 0;return C0(o,b,x,j)};if(t){const l=t+E0,o=a;a=u=>u.startsWith(l)?o(u.slice(l.length)):C0(XT,!1,u,void 0,!0)}if(r){const l=a;a=o=>r({className:o,parseClassName:l})}return a},WT=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let l=[];for(let o=0;o<r.length;o++){const u=r[o],f=u[0]==="[",m=t.has(u);f||m?(l.length>0&&(l.sort(),a.push(...l),l=[]),a.push(u)):l.push(u)}return l.length>0&&(l.sort(),a.push(...l)),a}},ez=e=>({cache:YT(e.cacheSize),parseClassName:JT(e),sortModifiers:WT(e),...$T(e)}),tz=/\s+/,nz=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:l,sortModifiers:o}=t,u=[],f=e.trim().split(tz);let m="";for(let h=f.length-1;h>=0;h-=1){const v=f[h],{isExternal:y,modifiers:x,hasImportantModifier:b,baseClassName:j,maybePostfixModifierPosition:k}=r(v);if(y){m=v+(m.length>0?" "+m:m);continue}let N=!!k,E=a(N?j.substring(0,k):j);if(!E){if(!N){m=v+(m.length>0?" "+m:m);continue}if(E=a(j),!E){m=v+(m.length>0?" "+m:m);continue}N=!1}const R=x.length===0?"":x.length===1?x[0]:o(x).join(":"),A=b?R+bp:R,I=A+E;if(u.indexOf(I)>-1)continue;u.push(I);const q=l(E,N);for(let z=0;z<q.length;++z){const $=q[z];u.push(A+$)}m=v+(m.length>0?" "+m:m)}return m},rz=(...e)=>{let t=0,r,a,l="";for(;t<e.length;)(r=e[t++])&&(a=Sw(r))&&(l&&(l+=" "),l+=a);return l},Sw=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=Sw(e[a]))&&(r&&(r+=" "),r+=t);return r},iz=(e,...t)=>{let r,a,l,o;const u=m=>{const h=t.reduce((v,y)=>y(v),e());return r=ez(h),a=r.cache.get,l=r.cache.set,o=f,f(m)},f=m=>{const h=a(m);if(h)return h;const v=nz(m,r);return l(m,v),v};return o=u,(...m)=>o(rz(...m))},az=[],Vt=e=>{const t=r=>r[e]||az;return t.isThemeGetter=!0,t},ww=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,kw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lz=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,sz=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oz=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,uz=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cz=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dz=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ea=e=>lz.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),ta=e=>!!e&&Number.isInteger(Number(e)),vm=e=>e.endsWith("%")&&qe(e.slice(0,-1)),mi=e=>sz.test(e),jw=()=>!0,fz=e=>oz.test(e)&&!uz.test(e),hg=()=>!1,hz=e=>cz.test(e),mz=e=>dz.test(e),pz=e=>!we(e)&&!ke(e),gz=e=>wa(e,Nw,hg),we=e=>ww.test(e),Qa=e=>wa(e,_w,fz),N0=e=>wa(e,jz,qe),yz=e=>wa(e,Tw,jw),vz=e=>wa(e,Aw,hg),_0=e=>wa(e,Ew,hg),xz=e=>wa(e,Cw,mz),Bc=e=>wa(e,zw,hz),ke=e=>kw.test(e),Uo=e=>hl(e,_w),bz=e=>hl(e,Aw),A0=e=>hl(e,Ew),Sz=e=>hl(e,Nw),wz=e=>hl(e,Cw),Pc=e=>hl(e,zw,!0),kz=e=>hl(e,Tw,!0),wa=(e,t,r)=>{const a=ww.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},hl=(e,t,r=!1)=>{const a=kw.exec(e);return a?a[1]?t(a[1]):r:!1},Ew=e=>e==="position"||e==="percentage",Cw=e=>e==="image"||e==="url",Nw=e=>e==="length"||e==="size"||e==="bg-size",_w=e=>e==="length",jz=e=>e==="number",Aw=e=>e==="family-name",Tw=e=>e==="number"||e==="weight",zw=e=>e==="shadow",Ez=()=>{const e=Vt("color"),t=Vt("font"),r=Vt("text"),a=Vt("font-weight"),l=Vt("tracking"),o=Vt("leading"),u=Vt("breakpoint"),f=Vt("container"),m=Vt("spacing"),h=Vt("radius"),v=Vt("shadow"),y=Vt("inset-shadow"),x=Vt("text-shadow"),b=Vt("drop-shadow"),j=Vt("blur"),k=Vt("perspective"),N=Vt("aspect"),E=Vt("ease"),R=Vt("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...I(),ke,we],z=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],Z=()=>[ke,we,m],W=()=>[ea,"full","auto",...Z()],F=()=>[ta,"none","subgrid",ke,we],re=()=>["auto",{span:["full",ta,ke,we]},ta,ke,we],le=()=>[ta,"auto",ke,we],X=()=>["auto","min","max","fr",ke,we],de=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...Z()],J=()=>[ea,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Z()],pe=()=>[ea,"screen","full","dvw","lvw","svw","min","max","fit",...Z()],Ae=()=>[ea,"screen","full","lh","dvh","lvh","svh","min","max","fit",...Z()],T=()=>[e,ke,we],U=()=>[...I(),A0,_0,{position:[ke,we]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",Sz,gz,{size:[ke,we]}],se=()=>[vm,Uo,Qa],G=()=>["","none","full",h,ke,we],ce=()=>["",qe,Uo,Qa],ye=()=>["solid","dashed","dotted","double"],De=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>[qe,vm,A0,_0],jt=()=>["","none",j,ke,we],Wt=()=>["none",qe,ke,we],wn=()=>["none",qe,ke,we],xr=()=>[qe,ke,we],en=()=>[ea,"full",...Z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mi],breakpoint:[mi],color:[jw],container:[mi],"drop-shadow":[mi],ease:["in","out","in-out"],font:[pz],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[mi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[mi],shadow:[mi],spacing:["px",qe],text:[mi],"text-shadow":[mi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ea,we,ke,N]}],container:["container"],columns:[{columns:[qe,we,ke,f]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:q()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{"inset-s":W(),start:W()}],end:[{"inset-e":W(),end:W()}],"inset-bs":[{"inset-bs":W()}],"inset-be":[{"inset-be":W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[ta,"auto",ke,we]}],basis:[{basis:[ea,"full","auto",f,...Z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,ea,"auto","initial","none",we]}],grow:[{grow:["",qe,ke,we]}],shrink:[{shrink:["",qe,ke,we]}],order:[{order:[ta,"first","last","none",ke,we]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:Z()}],"gap-x":[{"gap-x":Z()}],"gap-y":[{"gap-y":Z()}],"justify-content":[{justify:[...de(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...de()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":de()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:Z()}],px:[{px:Z()}],py:[{py:Z()}],ps:[{ps:Z()}],pe:[{pe:Z()}],pbs:[{pbs:Z()}],pbe:[{pbe:Z()}],pt:[{pt:Z()}],pr:[{pr:Z()}],pb:[{pb:Z()}],pl:[{pl:Z()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":Z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Z()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...pe()]}],"min-inline-size":[{"min-inline":["auto",...pe()]}],"max-inline-size":[{"max-inline":["none",...pe()]}],"block-size":[{block:["auto",...Ae()]}],"min-block-size":[{"min-block":["auto",...Ae()]}],"max-block-size":[{"max-block":["none",...Ae()]}],w:[{w:[f,"screen",...J()]}],"min-w":[{"min-w":[f,"screen","none",...J()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,Uo,Qa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,kz,yz]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vm,we]}],"font-family":[{font:[bz,vz,t]}],"font-features":[{"font-features":[we]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,ke,we]}],"line-clamp":[{"line-clamp":[qe,"none",ke,N0]}],leading:[{leading:[o,...Z()]}],"list-image":[{"list-image":["none",ke,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",ke,Qa]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[qe,"auto",ke,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:U()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ta,ke,we],radial:["",ke,we],conic:[ta,ke,we]},wz,xz]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ye(),"hidden","none"]}],"divide-style":[{divide:[...ye(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...ye(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,ke,we]}],"outline-w":[{outline:["",qe,Uo,Qa]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",v,Pc,Bc]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",y,Pc,Bc]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[qe,Qa]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",x,Pc,Bc]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[qe,ke,we]}],"mix-blend":[{"mix-blend":[...De(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":De()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[ke,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":I()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:U()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,we]}],filter:[{filter:["","none",ke,we]}],blur:[{blur:jt()}],brightness:[{brightness:[qe,ke,we]}],contrast:[{contrast:[qe,ke,we]}],"drop-shadow":[{"drop-shadow":["","none",b,Pc,Bc]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",qe,ke,we]}],"hue-rotate":[{"hue-rotate":[qe,ke,we]}],invert:[{invert:["",qe,ke,we]}],saturate:[{saturate:[qe,ke,we]}],sepia:[{sepia:["",qe,ke,we]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,we]}],"backdrop-blur":[{"backdrop-blur":jt()}],"backdrop-brightness":[{"backdrop-brightness":[qe,ke,we]}],"backdrop-contrast":[{"backdrop-contrast":[qe,ke,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,ke,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,ke,we]}],"backdrop-invert":[{"backdrop-invert":["",qe,ke,we]}],"backdrop-opacity":[{"backdrop-opacity":[qe,ke,we]}],"backdrop-saturate":[{"backdrop-saturate":[qe,ke,we]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,ke,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Z()}],"border-spacing-x":[{"border-spacing-x":Z()}],"border-spacing-y":[{"border-spacing-y":Z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",ke,we]}],ease:[{ease:["linear","initial",E,ke,we]}],delay:[{delay:[qe,ke,we]}],animate:[{animate:["none",R,ke,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ke,we]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:Wt()}],"rotate-x":[{"rotate-x":Wt()}],"rotate-y":[{"rotate-y":Wt()}],"rotate-z":[{"rotate-z":Wt()}],scale:[{scale:wn()}],"scale-x":[{"scale-x":wn()}],"scale-y":[{"scale-y":wn()}],"scale-z":[{"scale-z":wn()}],"scale-3d":["scale-3d"],skew:[{skew:xr()}],"skew-x":[{"skew-x":xr()}],"skew-y":[{"skew-y":xr()}],transform:[{transform:[ke,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:en()}],"translate-x":[{"translate-x":en()}],"translate-y":[{"translate-y":en()}],"translate-z":[{"translate-z":en()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mbs":[{"scroll-mbs":Z()}],"scroll-mbe":[{"scroll-mbe":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pbs":[{"scroll-pbs":Z()}],"scroll-pbe":[{"scroll-pbe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke,we]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[qe,Uo,Qa,N0]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Cz=iz(Ez);function Te(...e){return Cz(yw(e))}function Cr(e){return e?new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(e)):"—"}function Nz(e){return Me.delete(`/clients/${encodeURIComponent(e)}`)}function Td(){return Me.get("/admin/agents/activity")}function zd(){return Me.get("/clients")}function _z(e){return Me.post(`/clients/${e}/disconnect`)}function Rw(){return Me.post("/connect-tokens")}const Ow=(e,t)=>["session",e,t],Sp=e=>["agent-sessions",e];function Az(e){if(typeof e!="object"||e===null)return null;const t=e;return typeof t.toolUseId!="string"||typeof t.name!="string"||t.status!=="pending"&&t.status!=="ok"&&t.status!=="error"?null:{toolUseId:t.toolUseId,name:t.name,args:t.args,status:t.status,durationMs:typeof t.durationMs=="number"?t.durationMs:void 0,resultPreview:typeof t.resultPreview=="string"?t.resultPreview:void 0}}function Tz(e){if(typeof e!="object"||e===null)return null;const t=e;return t.source!=="sdk"&&t.source!=="runtime"&&t.source!=="tool"||typeof t.message!="string"?null:{source:t.source,message:t.message}}function zz(e){if(typeof e!="object"||e===null)return null;const t=e;return typeof t.text!="string"?null:{text:t.text}}function Us(e,t){const r=new URLSearchParams;t!=null&&t.state&&r.set("state",t.state),t!=null&&t.runtimeState&&r.set("runtimeState",t.runtimeState);const a=r.toString();return Me.get(`/admin/sessions/agents/${e}${a?`?${a}`:""}`)}function Rz(e,t,r){const a=new URLSearchParams;a.set("limit",String(r.limit)),(r==null?void 0:r.cursor)!==void 0&&a.set("cursor",String(r.cursor)),r!=null&&r.direction&&a.set("direction",r.direction);const l=a.toString();return Me.get(`/admin/sessions/agents/${e}/${t}/events${l?`?${l}`:""}`)}function Oz(e,t){return Me.post(`/admin/sessions/agents/${e}/${t}/suspend`)}function Dz(e,t){return Me.post(`/admin/sessions/agents/${e}/${t}/terminate`)}var T0=1,Mz=.9,Lz=.8,Uz=.17,xm=.1,bm=.999,Iz=.9999,Bz=.99,Pz=/[\\\/_+.#"@\[\(\{&]/,$z=/[\\\/_+.#"@\[\(\{&]/g,qz=/[\s-]/,Dw=/[\s-]/g;function wp(e,t,r,a,l,o,u){if(o===t.length)return l===e.length?T0:Bz;var f=`${l},${o}`;if(u[f]!==void 0)return u[f];for(var m=a.charAt(o),h=r.indexOf(m,l),v=0,y,x,b,j;h>=0;)y=wp(e,t,r,a,h+1,o+1,u),y>v&&(h===l?y*=T0:Pz.test(e.charAt(h-1))?(y*=Lz,b=e.slice(l,h-1).match($z),b&&l>0&&(y*=Math.pow(bm,b.length))):qz.test(e.charAt(h-1))?(y*=Mz,j=e.slice(l,h-1).match(Dw),j&&l>0&&(y*=Math.pow(bm,j.length))):(y*=Uz,l>0&&(y*=Math.pow(bm,h-l))),e.charAt(h)!==t.charAt(o)&&(y*=Iz)),(y<xm&&r.charAt(h-1)===a.charAt(o+1)||a.charAt(o+1)===a.charAt(o)&&r.charAt(h-1)!==a.charAt(o))&&(x=wp(e,t,r,a,h+1,o+2,u),x*xm>y&&(y=x*xm)),y>v&&(v=y),h=r.indexOf(m,h+1);return u[f]=v,v}function z0(e){return e.toLowerCase().replace(Dw," ")}function Fz(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,wp(e,t,z0(e),z0(t),0,0,{})}function ga(e,t,{checkForDefaultPrevented:r=!0}={}){return function(l){if(e==null||e(l),r===!1||!l.defaultPrevented)return t==null?void 0:t(l)}}function R0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ya(...e){return t=>{let r=!1;const a=e.map(l=>{const o=R0(l,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let l=0;l<a.length;l++){const o=a[l];typeof o=="function"?o():R0(e[l],null)}}}}function ml(...e){return S.useCallback(ya(...e),e)}function Hz(e,t){const r=S.createContext(t),a=o=>{const{children:u,...f}=o,m=S.useMemo(()=>f,Object.values(f));return d.jsx(r.Provider,{value:m,children:u})};a.displayName=e+"Provider";function l(o){const u=S.useContext(r);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[a,l]}function Zz(e,t=[]){let r=[];function a(o,u){const f=S.createContext(u),m=r.length;r=[...r,u];const h=y=>{var E;const{scope:x,children:b,...j}=y,k=((E=x==null?void 0:x[e])==null?void 0:E[m])||f,N=S.useMemo(()=>j,Object.values(j));return d.jsx(k.Provider,{value:N,children:b})};h.displayName=o+"Provider";function v(y,x){var k;const b=((k=x==null?void 0:x[e])==null?void 0:k[m])||f,j=S.useContext(b);if(j)return j;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${o}\``)}return[h,v]}const l=()=>{const o=r.map(u=>S.createContext(u));return function(f){const m=(f==null?void 0:f[e])||o;return S.useMemo(()=>({[`__scope${e}`]:{...f,[e]:m}}),[f,m])}};return l.scopeName=e,[a,Vz(l,...t)]}function Vz(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const a=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(o){const u=a.reduce((f,{useScope:m,scopeName:h})=>{const y=m(o)[`__scope${h}`];return{...f,...y}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var eu=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{},Qz=Qp[" useId ".trim().toString()]||(()=>{}),Gz=0;function Si(e){const[t,r]=S.useState(Qz());return eu(()=>{r(a=>a??String(Gz++))},[e]),t?`radix-${t}`:""}var Kz=Qp[" useInsertionEffect ".trim().toString()]||eu;function Yz({prop:e,defaultProp:t,onChange:r=()=>{},caller:a}){const[l,o,u]=Xz({defaultProp:t,onChange:r}),f=e!==void 0,m=f?e:l;{const v=S.useRef(e!==void 0);S.useEffect(()=>{const y=v.current;y!==f&&console.warn(`${a} is changing from ${y?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=f},[f,a])}const h=S.useCallback(v=>{var y;if(f){const x=Jz(v)?v(e):v;x!==e&&((y=u.current)==null||y.call(u,x))}else o(v)},[f,e,o,u]);return[m,h]}function Xz({defaultProp:e,onChange:t}){const[r,a]=S.useState(e),l=S.useRef(r),o=S.useRef(t);return Kz(()=>{o.current=t},[t]),S.useEffect(()=>{var u;l.current!==r&&((u=o.current)==null||u.call(o,r),l.current=r)},[r,l]),[r,a,o]}function Jz(e){return typeof e=="function"}var Mw=TS();const Wz=kd(Mw);function Lw(e){const t=eR(e),r=S.forwardRef((a,l)=>{const{children:o,...u}=a,f=S.Children.toArray(o),m=f.find(nR);if(m){const h=m.props.children,v=f.map(y=>y===m?S.Children.count(h)>1?S.Children.only(null):S.isValidElement(h)?h.props.children:null:y);return d.jsx(t,{...u,ref:l,children:S.isValidElement(h)?S.cloneElement(h,void 0,v):null})}return d.jsx(t,{...u,ref:l,children:o})});return r.displayName=`${e}.Slot`,r}function eR(e){const t=S.forwardRef((r,a)=>{const{children:l,...o}=r;if(S.isValidElement(l)){const u=iR(l),f=rR(o,l.props);return l.type!==S.Fragment&&(f.ref=a?ya(a,u):u),S.cloneElement(l,f)}return S.Children.count(l)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tR=Symbol("radix.slottable");function nR(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tR}function rR(e,t){const r={...t};for(const a in t){const l=e[a],o=t[a];/^on[A-Z]/.test(a)?l&&o?r[a]=(...f)=>{const m=o(...f);return l(...f),m}:l&&(r[a]=l):a==="style"?r[a]={...l,...o}:a==="className"&&(r[a]=[l,o].filter(Boolean).join(" "))}return{...e,...r}}function iR(e){var a,l;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var aR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ji=aR.reduce((e,t)=>{const r=Lw(`Primitive.${t}`),a=S.forwardRef((l,o)=>{const{asChild:u,...f}=l,m=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(m,{...f,ref:o})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function lR(e,t){e&&Mw.flushSync(()=>e.dispatchEvent(t))}function tu(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...r)=>{var a;return(a=t.current)==null?void 0:a.call(t,...r)},[])}function sR(e,t=globalThis==null?void 0:globalThis.document){const r=tu(e);S.useEffect(()=>{const a=l=>{l.key==="Escape"&&r(l)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[r,t])}var oR="DismissableLayer",kp="dismissableLayer.update",uR="dismissableLayer.pointerDownOutside",cR="dismissableLayer.focusOutside",O0,Uw=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Iw=S.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:o,onInteractOutside:u,onDismiss:f,...m}=e,h=S.useContext(Uw),[v,y]=S.useState(null),x=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=S.useState({}),j=ml(t,$=>y($)),k=Array.from(h.layers),[N]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),E=k.indexOf(N),R=v?k.indexOf(v):-1,A=h.layersWithOutsidePointerEventsDisabled.size>0,I=R>=E,q=hR($=>{const Z=$.target,W=[...h.branches].some(F=>F.contains(Z));!I||W||(l==null||l($),u==null||u($),$.defaultPrevented||f==null||f())},x),z=mR($=>{const Z=$.target;[...h.branches].some(F=>F.contains(Z))||(o==null||o($),u==null||u($),$.defaultPrevented||f==null||f())},x);return sR($=>{R===h.layers.size-1&&(a==null||a($),!$.defaultPrevented&&f&&($.preventDefault(),f()))},x),S.useEffect(()=>{if(v)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(O0=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),D0(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=O0)}},[v,x,r,h]),S.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),D0())},[v,h]),S.useEffect(()=>{const $=()=>b({});return document.addEventListener(kp,$),()=>document.removeEventListener(kp,$)},[]),d.jsx(ji.div,{...m,ref:j,style:{pointerEvents:A?I?"auto":"none":void 0,...e.style},onFocusCapture:ga(e.onFocusCapture,z.onFocusCapture),onBlurCapture:ga(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:ga(e.onPointerDownCapture,q.onPointerDownCapture)})});Iw.displayName=oR;var dR="DismissableLayerBranch",fR=S.forwardRef((e,t)=>{const r=S.useContext(Uw),a=S.useRef(null),l=ml(t,a);return S.useEffect(()=>{const o=a.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),d.jsx(ji.div,{...e,ref:l})});fR.displayName=dR;function hR(e,t=globalThis==null?void 0:globalThis.document){const r=tu(e),a=S.useRef(!1),l=S.useRef(()=>{});return S.useEffect(()=>{const o=f=>{if(f.target&&!a.current){let m=function(){Bw(uR,r,h,{discrete:!0})};const h={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",l.current),l.current=m,t.addEventListener("click",l.current,{once:!0})):m()}else t.removeEventListener("click",l.current);a.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",o),t.removeEventListener("click",l.current)}},[t,r]),{onPointerDownCapture:()=>a.current=!0}}function mR(e,t=globalThis==null?void 0:globalThis.document){const r=tu(e),a=S.useRef(!1);return S.useEffect(()=>{const l=o=>{o.target&&!a.current&&Bw(cR,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",l),()=>t.removeEventListener("focusin",l)},[t,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function D0(){const e=new CustomEvent(kp);document.dispatchEvent(e)}function Bw(e,t,r,{discrete:a}){const l=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&l.addEventListener(e,t,{once:!0}),a?lR(l,o):l.dispatchEvent(o)}var Sm="focusScope.autoFocusOnMount",wm="focusScope.autoFocusOnUnmount",M0={bubbles:!1,cancelable:!0},pR="FocusScope",Pw=S.forwardRef((e,t)=>{const{loop:r=!1,trapped:a=!1,onMountAutoFocus:l,onUnmountAutoFocus:o,...u}=e,[f,m]=S.useState(null),h=tu(l),v=tu(o),y=S.useRef(null),x=ml(t,k=>m(k)),b=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(a){let k=function(A){if(b.paused||!f)return;const I=A.target;f.contains(I)?y.current=I:ia(y.current,{select:!0})},N=function(A){if(b.paused||!f)return;const I=A.relatedTarget;I!==null&&(f.contains(I)||ia(y.current,{select:!0}))},E=function(A){if(document.activeElement===document.body)for(const q of A)q.removedNodes.length>0&&ia(f)};document.addEventListener("focusin",k),document.addEventListener("focusout",N);const R=new MutationObserver(E);return f&&R.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",N),R.disconnect()}}},[a,f,b.paused]),S.useEffect(()=>{if(f){U0.add(b);const k=document.activeElement;if(!f.contains(k)){const E=new CustomEvent(Sm,M0);f.addEventListener(Sm,h),f.dispatchEvent(E),E.defaultPrevented||(gR(SR($w(f)),{select:!0}),document.activeElement===k&&ia(f))}return()=>{f.removeEventListener(Sm,h),setTimeout(()=>{const E=new CustomEvent(wm,M0);f.addEventListener(wm,v),f.dispatchEvent(E),E.defaultPrevented||ia(k??document.body,{select:!0}),f.removeEventListener(wm,v),U0.remove(b)},0)}}},[f,h,v,b]);const j=S.useCallback(k=>{if(!r&&!a||b.paused)return;const N=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,E=document.activeElement;if(N&&E){const R=k.currentTarget,[A,I]=yR(R);A&&I?!k.shiftKey&&E===I?(k.preventDefault(),r&&ia(A,{select:!0})):k.shiftKey&&E===A&&(k.preventDefault(),r&&ia(I,{select:!0})):E===R&&k.preventDefault()}},[r,a,b.paused]);return d.jsx(ji.div,{tabIndex:-1,...u,ref:x,onKeyDown:j})});Pw.displayName=pR;function gR(e,{select:t=!1}={}){const r=document.activeElement;for(const a of e)if(ia(a,{select:t}),document.activeElement!==r)return}function yR(e){const t=$w(e),r=L0(t,e),a=L0(t.reverse(),e);return[r,a]}function $w(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const l=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||l?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function L0(e,t){for(const r of e)if(!vR(r,{upTo:t}))return r}function vR(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function xR(e){return e instanceof HTMLInputElement&&"select"in e}function ia(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&xR(e)&&t&&e.select()}}var U0=bR();function bR(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=I0(e,t),e.unshift(t)},remove(t){var r;e=I0(e,t),(r=e[0])==null||r.resume()}}}function I0(e,t){const r=[...e],a=r.indexOf(t);return a!==-1&&r.splice(a,1),r}function SR(e){return e.filter(t=>t.tagName!=="A")}var wR="Portal",qw=S.forwardRef((e,t)=>{var f;const{container:r,...a}=e,[l,o]=S.useState(!1);eu(()=>o(!0),[]);const u=r||l&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return u?Wz.createPortal(d.jsx(ji.div,{...a,ref:t}),u):null});qw.displayName=wR;function kR(e,t){return S.useReducer((r,a)=>t[r][a]??r,e)}var Rd=e=>{const{present:t,children:r}=e,a=jR(t),l=typeof r=="function"?r({present:a.isPresent}):S.Children.only(r),o=ml(a.ref,ER(l));return typeof r=="function"||a.isPresent?S.cloneElement(l,{ref:o}):null};Rd.displayName="Presence";function jR(e){const[t,r]=S.useState(),a=S.useRef(null),l=S.useRef(e),o=S.useRef("none"),u=e?"mounted":"unmounted",[f,m]=kR(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const h=$c(a.current);o.current=f==="mounted"?h:"none"},[f]),eu(()=>{const h=a.current,v=l.current;if(v!==e){const x=o.current,b=$c(h);e?m("MOUNT"):b==="none"||(h==null?void 0:h.display)==="none"?m("UNMOUNT"):m(v&&x!==b?"ANIMATION_OUT":"UNMOUNT"),l.current=e}},[e,m]),eu(()=>{if(t){let h;const v=t.ownerDocument.defaultView??window,y=b=>{const k=$c(a.current).includes(CSS.escape(b.animationName));if(b.target===t&&k&&(m("ANIMATION_END"),!l.current)){const N=t.style.animationFillMode;t.style.animationFillMode="forwards",h=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=N)})}},x=b=>{b.target===t&&(o.current=$c(a.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{v.clearTimeout(h),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else m("ANIMATION_END")},[t,m]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:S.useCallback(h=>{a.current=h?getComputedStyle(h):null,r(h)},[])}}function $c(e){return(e==null?void 0:e.animationName)||"none"}function ER(e){var a,l;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var km=0;function CR(){S.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??B0()),document.body.insertAdjacentElement("beforeend",e[1]??B0()),km++,()=>{km===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),km--}},[])}function B0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Pr=function(){return Pr=Object.assign||function(t){for(var r,a=1,l=arguments.length;a<l;a++){r=arguments[a];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Pr.apply(this,arguments)};function Fw(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r}function NR(e,t,r){if(r||arguments.length===2)for(var a=0,l=t.length,o;a<l;a++)(o||!(a in t))&&(o||(o=Array.prototype.slice.call(t,0,a)),o[a]=t[a]);return e.concat(o||Array.prototype.slice.call(t))}var rd="right-scroll-bar-position",id="width-before-scroll-bar",_R="with-scroll-bars-hidden",AR="--removed-body-scroll-bar-size";function jm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function TR(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(a){var l=r.value;l!==a&&(r.value=a,r.callback(a,l))}}}})[0];return r.callback=t,r.facade}var zR=typeof window<"u"?S.useLayoutEffect:S.useEffect,P0=new WeakMap;function RR(e,t){var r=TR(null,function(a){return e.forEach(function(l){return jm(l,a)})});return zR(function(){var a=P0.get(r);if(a){var l=new Set(a),o=new Set(e),u=r.current;l.forEach(function(f){o.has(f)||jm(f,null)}),o.forEach(function(f){l.has(f)||jm(f,u)})}P0.set(r,e)},[e]),r}function OR(e){return e}function DR(e,t){t===void 0&&(t=OR);var r=[],a=!1,l={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var u=t(o,a);return r.push(u),function(){r=r.filter(function(f){return f!==u})}},assignSyncMedium:function(o){for(a=!0;r.length;){var u=r;r=[],u.forEach(o)}r={push:function(f){return o(f)},filter:function(){return r}}},assignMedium:function(o){a=!0;var u=[];if(r.length){var f=r;r=[],f.forEach(o),u=r}var m=function(){var v=u;u=[],v.forEach(o)},h=function(){return Promise.resolve().then(m)};h(),r={push:function(v){u.push(v),h()},filter:function(v){return u=u.filter(v),r}}}};return l}function MR(e){e===void 0&&(e={});var t=DR(null);return t.options=Pr({async:!0,ssr:!1},e),t}var Hw=function(e){var t=e.sideCar,r=Fw(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return S.createElement(a,Pr({},r))};Hw.isSideCarExport=!0;function LR(e,t){return e.useMedium(t),Hw}var Zw=MR(),Em=function(){},Od=S.forwardRef(function(e,t){var r=S.useRef(null),a=S.useState({onScrollCapture:Em,onWheelCapture:Em,onTouchMoveCapture:Em}),l=a[0],o=a[1],u=e.forwardProps,f=e.children,m=e.className,h=e.removeScrollBar,v=e.enabled,y=e.shards,x=e.sideCar,b=e.noRelative,j=e.noIsolation,k=e.inert,N=e.allowPinchZoom,E=e.as,R=E===void 0?"div":E,A=e.gapMode,I=Fw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),q=x,z=RR([r,t]),$=Pr(Pr({},I),l);return S.createElement(S.Fragment,null,v&&S.createElement(q,{sideCar:Zw,removeScrollBar:h,shards:y,noRelative:b,noIsolation:j,inert:k,setCallbacks:o,allowPinchZoom:!!N,lockRef:r,gapMode:A}),u?S.cloneElement(S.Children.only(f),Pr(Pr({},$),{ref:z})):S.createElement(R,Pr({},$,{className:m,ref:z}),f))});Od.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Od.classNames={fullWidth:id,zeroRight:rd};var UR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function IR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=UR();return t&&e.setAttribute("nonce",t),e}function BR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function PR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $R=function(){var e=0,t=null;return{add:function(r){e==0&&(t=IR())&&(BR(t,r),PR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},qR=function(){var e=$R();return function(t,r){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Vw=function(){var e=qR(),t=function(r){var a=r.styles,l=r.dynamic;return e(a,l),null};return t},FR={left:0,top:0,right:0,gap:0},Cm=function(e){return parseInt(e||"",10)||0},HR=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],l=t[e==="padding"?"paddingRight":"marginRight"];return[Cm(r),Cm(a),Cm(l)]},ZR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return FR;var t=HR(e),r=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-r+t[2]-t[0])}},VR=Vw(),hs="data-scroll-locked",QR=function(e,t,r,a){var l=e.left,o=e.top,u=e.right,f=e.gap;return r===void 0&&(r="margin"),`
251
- .`.concat(_R,` {
252
- overflow: hidden `).concat(a,`;
253
- padding-right: `).concat(f,"px ").concat(a,`;
254
- }
255
- body[`).concat(hs,`] {
256
- overflow: hidden `).concat(a,`;
257
- overscroll-behavior: contain;
258
- `).concat([t&&"position: relative ".concat(a,";"),r==="margin"&&`
259
- padding-left: `.concat(l,`px;
260
- padding-top: `).concat(o,`px;
261
- padding-right: `).concat(u,`px;
262
- margin-left:0;
263
- margin-top:0;
264
- margin-right: `).concat(f,"px ").concat(a,`;
265
- `),r==="padding"&&"padding-right: ".concat(f,"px ").concat(a,";")].filter(Boolean).join(""),`
266
- }
267
-
268
- .`).concat(rd,` {
269
- right: `).concat(f,"px ").concat(a,`;
270
- }
271
-
272
- .`).concat(id,` {
273
- margin-right: `).concat(f,"px ").concat(a,`;
274
- }
275
-
276
- .`).concat(rd," .").concat(rd,` {
277
- right: 0 `).concat(a,`;
278
- }
279
-
280
- .`).concat(id," .").concat(id,` {
281
- margin-right: 0 `).concat(a,`;
282
- }
283
-
284
- body[`).concat(hs,`] {
285
- `).concat(AR,": ").concat(f,`px;
286
- }
287
- `)},$0=function(){var e=parseInt(document.body.getAttribute(hs)||"0",10);return isFinite(e)?e:0},GR=function(){S.useEffect(function(){return document.body.setAttribute(hs,($0()+1).toString()),function(){var e=$0()-1;e<=0?document.body.removeAttribute(hs):document.body.setAttribute(hs,e.toString())}},[])},KR=function(e){var t=e.noRelative,r=e.noImportant,a=e.gapMode,l=a===void 0?"margin":a;GR();var o=S.useMemo(function(){return ZR(l)},[l]);return S.createElement(VR,{styles:QR(o,!t,l,r?"":"!important")})},jp=!1;if(typeof window<"u")try{var qc=Object.defineProperty({},"passive",{get:function(){return jp=!0,!0}});window.addEventListener("test",qc,qc),window.removeEventListener("test",qc,qc)}catch{jp=!1}var ns=jp?{passive:!1}:!1,YR=function(e){return e.tagName==="TEXTAREA"},Qw=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!YR(e)&&r[t]==="visible")},XR=function(e){return Qw(e,"overflowY")},JR=function(e){return Qw(e,"overflowX")},q0=function(e,t){var r=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var l=Gw(e,a);if(l){var o=Kw(e,a),u=o[1],f=o[2];if(u>f)return!0}a=a.parentNode}while(a&&a!==r.body);return!1},WR=function(e){var t=e.scrollTop,r=e.scrollHeight,a=e.clientHeight;return[t,r,a]},eO=function(e){var t=e.scrollLeft,r=e.scrollWidth,a=e.clientWidth;return[t,r,a]},Gw=function(e,t){return e==="v"?XR(t):JR(t)},Kw=function(e,t){return e==="v"?WR(t):eO(t)},tO=function(e,t){return e==="h"&&t==="rtl"?-1:1},nO=function(e,t,r,a,l){var o=tO(e,window.getComputedStyle(t).direction),u=o*a,f=r.target,m=t.contains(f),h=!1,v=u>0,y=0,x=0;do{if(!f)break;var b=Kw(e,f),j=b[0],k=b[1],N=b[2],E=k-N-o*j;(j||E)&&Gw(e,f)&&(y+=E,x+=j);var R=f.parentNode;f=R&&R.nodeType===Node.DOCUMENT_FRAGMENT_NODE?R.host:R}while(!m&&f!==document.body||m&&(t.contains(f)||t===f));return(v&&Math.abs(y)<1||!v&&Math.abs(x)<1)&&(h=!0),h},Fc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},F0=function(e){return[e.deltaX,e.deltaY]},H0=function(e){return e&&"current"in e?e.current:e},rO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},iO=function(e){return`
288
- .block-interactivity-`.concat(e,` {pointer-events: none;}
289
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
290
- `)},aO=0,rs=[];function lO(e){var t=S.useRef([]),r=S.useRef([0,0]),a=S.useRef(),l=S.useState(aO++)[0],o=S.useState(Vw)[0],u=S.useRef(e);S.useEffect(function(){u.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var k=NR([e.lockRef.current],(e.shards||[]).map(H0),!0).filter(Boolean);return k.forEach(function(N){return N.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),k.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var f=S.useCallback(function(k,N){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!u.current.allowPinchZoom;var E=Fc(k),R=r.current,A="deltaX"in k?k.deltaX:R[0]-E[0],I="deltaY"in k?k.deltaY:R[1]-E[1],q,z=k.target,$=Math.abs(A)>Math.abs(I)?"h":"v";if("touches"in k&&$==="h"&&z.type==="range")return!1;var Z=window.getSelection(),W=Z&&Z.anchorNode,F=W?W===z||W.contains(z):!1;if(F)return!1;var re=q0($,z);if(!re)return!0;if(re?q=$:(q=$==="v"?"h":"v",re=q0($,z)),!re)return!1;if(!a.current&&"changedTouches"in k&&(A||I)&&(a.current=q),!q)return!0;var le=a.current||q;return nO(le,N,k,le==="h"?A:I)},[]),m=S.useCallback(function(k){var N=k;if(!(!rs.length||rs[rs.length-1]!==o)){var E="deltaY"in N?F0(N):Fc(N),R=t.current.filter(function(q){return q.name===N.type&&(q.target===N.target||N.target===q.shadowParent)&&rO(q.delta,E)})[0];if(R&&R.should){N.cancelable&&N.preventDefault();return}if(!R){var A=(u.current.shards||[]).map(H0).filter(Boolean).filter(function(q){return q.contains(N.target)}),I=A.length>0?f(N,A[0]):!u.current.noIsolation;I&&N.cancelable&&N.preventDefault()}}},[]),h=S.useCallback(function(k,N,E,R){var A={name:k,delta:N,target:E,should:R,shadowParent:sO(E)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(I){return I!==A})},1)},[]),v=S.useCallback(function(k){r.current=Fc(k),a.current=void 0},[]),y=S.useCallback(function(k){h(k.type,F0(k),k.target,f(k,e.lockRef.current))},[]),x=S.useCallback(function(k){h(k.type,Fc(k),k.target,f(k,e.lockRef.current))},[]);S.useEffect(function(){return rs.push(o),e.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:x}),document.addEventListener("wheel",m,ns),document.addEventListener("touchmove",m,ns),document.addEventListener("touchstart",v,ns),function(){rs=rs.filter(function(k){return k!==o}),document.removeEventListener("wheel",m,ns),document.removeEventListener("touchmove",m,ns),document.removeEventListener("touchstart",v,ns)}},[]);var b=e.removeScrollBar,j=e.inert;return S.createElement(S.Fragment,null,j?S.createElement(o,{styles:iO(l)}):null,b?S.createElement(KR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function sO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const oO=LR(Zw,lO);var Yw=S.forwardRef(function(e,t){return S.createElement(Od,Pr({},e,{ref:t,sideCar:oO}))});Yw.classNames=Od.classNames;var uO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},is=new WeakMap,Hc=new WeakMap,Zc={},Nm=0,Xw=function(e){return e&&(e.host||Xw(e.parentNode))},cO=function(e,t){return t.map(function(r){if(e.contains(r))return r;var a=Xw(r);return a&&e.contains(a)?a:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},dO=function(e,t,r,a){var l=cO(t,Array.isArray(e)?e:[e]);Zc[r]||(Zc[r]=new WeakMap);var o=Zc[r],u=[],f=new Set,m=new Set(l),h=function(y){!y||f.has(y)||(f.add(y),h(y.parentNode))};l.forEach(h);var v=function(y){!y||m.has(y)||Array.prototype.forEach.call(y.children,function(x){if(f.has(x))v(x);else try{var b=x.getAttribute(a),j=b!==null&&b!=="false",k=(is.get(x)||0)+1,N=(o.get(x)||0)+1;is.set(x,k),o.set(x,N),u.push(x),k===1&&j&&Hc.set(x,!0),N===1&&x.setAttribute(r,"true"),j||x.setAttribute(a,"true")}catch(E){console.error("aria-hidden: cannot operate on ",x,E)}})};return v(t),f.clear(),Nm++,function(){u.forEach(function(y){var x=is.get(y)-1,b=o.get(y)-1;is.set(y,x),o.set(y,b),x||(Hc.has(y)||y.removeAttribute(a),Hc.delete(y)),b||y.removeAttribute(r)}),Nm--,Nm||(is=new WeakMap,is=new WeakMap,Hc=new WeakMap,Zc={})}},fO=function(e,t,r){r===void 0&&(r="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),l=uO(e);return l?(a.push.apply(a,Array.from(l.querySelectorAll("[aria-live], script"))),dO(a,l,r,"aria-hidden")):function(){return null}},Dd="Dialog",[Jw]=Zz(Dd),[hO,Nr]=Jw(Dd),Ww=e=>{const{__scopeDialog:t,children:r,open:a,defaultOpen:l,onOpenChange:o,modal:u=!0}=e,f=S.useRef(null),m=S.useRef(null),[h,v]=Yz({prop:a,defaultProp:l??!1,onChange:o,caller:Dd});return d.jsx(hO,{scope:t,triggerRef:f,contentRef:m,contentId:Si(),titleId:Si(),descriptionId:Si(),open:h,onOpenChange:v,onOpenToggle:S.useCallback(()=>v(y=>!y),[v]),modal:u,children:r})};Ww.displayName=Dd;var ek="DialogTrigger",tk=S.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,l=Nr(ek,r),o=ml(t,l.triggerRef);return d.jsx(ji.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":gg(l.open),...a,ref:o,onClick:ga(e.onClick,l.onOpenToggle)})});tk.displayName=ek;var mg="DialogPortal",[mO,nk]=Jw(mg,{forceMount:void 0}),rk=e=>{const{__scopeDialog:t,forceMount:r,children:a,container:l}=e,o=Nr(mg,t);return d.jsx(mO,{scope:t,forceMount:r,children:S.Children.map(a,u=>d.jsx(Rd,{present:r||o.open,children:d.jsx(qw,{asChild:!0,container:l,children:u})}))})};rk.displayName=mg;var fd="DialogOverlay",ik=S.forwardRef((e,t)=>{const r=nk(fd,e.__scopeDialog),{forceMount:a=r.forceMount,...l}=e,o=Nr(fd,e.__scopeDialog);return o.modal?d.jsx(Rd,{present:a||o.open,children:d.jsx(gO,{...l,ref:t})}):null});ik.displayName=fd;var pO=Lw("DialogOverlay.RemoveScroll"),gO=S.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,l=Nr(fd,r);return d.jsx(Yw,{as:pO,allowPinchZoom:!0,shards:[l.contentRef],children:d.jsx(ji.div,{"data-state":gg(l.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),sl="DialogContent",ak=S.forwardRef((e,t)=>{const r=nk(sl,e.__scopeDialog),{forceMount:a=r.forceMount,...l}=e,o=Nr(sl,e.__scopeDialog);return d.jsx(Rd,{present:a||o.open,children:o.modal?d.jsx(yO,{...l,ref:t}):d.jsx(vO,{...l,ref:t})})});ak.displayName=sl;var yO=S.forwardRef((e,t)=>{const r=Nr(sl,e.__scopeDialog),a=S.useRef(null),l=ml(t,r.contentRef,a);return S.useEffect(()=>{const o=a.current;if(o)return fO(o)},[]),d.jsx(lk,{...e,ref:l,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ga(e.onCloseAutoFocus,o=>{var u;o.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:ga(e.onPointerDownOutside,o=>{const u=o.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0;(u.button===2||f)&&o.preventDefault()}),onFocusOutside:ga(e.onFocusOutside,o=>o.preventDefault())})}),vO=S.forwardRef((e,t)=>{const r=Nr(sl,e.__scopeDialog),a=S.useRef(!1),l=S.useRef(!1);return d.jsx(lk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var u,f;(u=e.onCloseAutoFocus)==null||u.call(e,o),o.defaultPrevented||(a.current||(f=r.triggerRef.current)==null||f.focus(),o.preventDefault()),a.current=!1,l.current=!1},onInteractOutside:o=>{var m,h;(m=e.onInteractOutside)==null||m.call(e,o),o.defaultPrevented||(a.current=!0,o.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const u=o.target;((h=r.triggerRef.current)==null?void 0:h.contains(u))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&l.current&&o.preventDefault()}})}),lk=S.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:l,onCloseAutoFocus:o,...u}=e,f=Nr(sl,r),m=S.useRef(null),h=ml(t,m);return CR(),d.jsxs(d.Fragment,{children:[d.jsx(Pw,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:l,onUnmountAutoFocus:o,children:d.jsx(Iw,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":gg(f.open),...u,ref:h,onDismiss:()=>f.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(xO,{titleId:f.titleId}),d.jsx(SO,{contentRef:m,descriptionId:f.descriptionId})]})]})}),pg="DialogTitle",sk=S.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,l=Nr(pg,r);return d.jsx(ji.h2,{id:l.titleId,...a,ref:t})});sk.displayName=pg;var ok="DialogDescription",uk=S.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,l=Nr(ok,r);return d.jsx(ji.p,{id:l.descriptionId,...a,ref:t})});uk.displayName=ok;var ck="DialogClose",dk=S.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,l=Nr(ck,r);return d.jsx(ji.button,{type:"button",...a,ref:t,onClick:ga(e.onClick,()=>l.onOpenChange(!1))})});dk.displayName=ck;function gg(e){return e?"open":"closed"}var fk="DialogTitleWarning",[pq,hk]=Hz(fk,{contentName:sl,titleName:pg,docsSlug:"dialog"}),xO=({titleId:e})=>{const t=hk(fk),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
291
-
292
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
293
-
294
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return S.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},bO="DialogDescriptionWarning",SO=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${hk(bO).contentName}}.`;return S.useEffect(()=>{var o;const l=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&l&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},mk=Ww,wO=tk,pk=rk,gk=ik,yk=ak,kO=sk,jO=uk,EO=dk,CO=Symbol.for("react.lazy"),hd=Qp[" use ".trim().toString()];function NO(e){return typeof e=="object"&&e!==null&&"then"in e}function vk(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===CO&&"_payload"in e&&NO(e._payload)}function xk(e){const t=AO(e),r=S.forwardRef((a,l)=>{let{children:o,...u}=a;vk(o)&&typeof hd=="function"&&(o=hd(o._payload));const f=S.Children.toArray(o),m=f.find(zO);if(m){const h=m.props.children,v=f.map(y=>y===m?S.Children.count(h)>1?S.Children.only(null):S.isValidElement(h)?h.props.children:null:y);return d.jsx(t,{...u,ref:l,children:S.isValidElement(h)?S.cloneElement(h,void 0,v):null})}return d.jsx(t,{...u,ref:l,children:o})});return r.displayName=`${e}.Slot`,r}var _O=xk("Slot");function AO(e){const t=S.forwardRef((r,a)=>{let{children:l,...o}=r;if(vk(l)&&typeof hd=="function"&&(l=hd(l._payload)),S.isValidElement(l)){const u=OO(l),f=RO(o,l.props);return l.type!==S.Fragment&&(f.ref=a?ya(a,u):u),S.cloneElement(l,f)}return S.Children.count(l)>1?S.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var TO=Symbol("radix.slottable");function zO(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===TO}function RO(e,t){const r={...t};for(const a in t){const l=e[a],o=t[a];/^on[A-Z]/.test(a)?l&&o?r[a]=(...f)=>{const m=o(...f);return l(...f),m}:l&&(r[a]=l):a==="style"?r[a]={...l,...o}:a==="className"&&(r[a]=[l,o].filter(Boolean).join(" "))}return{...e,...r}}function OO(e){var a,l;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var DO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ei=DO.reduce((e,t)=>{const r=xk(`Primitive.${t}`),a=S.forwardRef((l,o)=>{const{asChild:u,...f}=l,m=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(m,{...f,ref:o})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),Io='[cmdk-group=""]',_m='[cmdk-group-items=""]',MO='[cmdk-group-heading=""]',bk='[cmdk-item=""]',Z0=`${bk}:not([aria-disabled="true"])`,Ep="cmdk-item-select",ss="data-value",LO=(e,t,r)=>Fz(e,t,r),Sk=S.createContext(void 0),pu=()=>S.useContext(Sk),wk=S.createContext(void 0),yg=()=>S.useContext(wk),kk=S.createContext(void 0),jk=S.forwardRef((e,t)=>{let r=os(()=>{var L,_;return{search:"",value:(_=(L=e.value)!=null?L:e.defaultValue)!=null?_:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),a=os(()=>new Set),l=os(()=>new Map),o=os(()=>new Map),u=os(()=>new Set),f=Ek(e),{label:m,children:h,value:v,onValueChange:y,filter:x,shouldFilter:b,loop:j,disablePointerSelection:k=!1,vimBindings:N=!0,...E}=e,R=Si(),A=Si(),I=Si(),q=S.useRef(null),z=QO();ol(()=>{if(v!==void 0){let L=v.trim();r.current.value=L,$.emit()}},[v]),ol(()=>{z(6,X)},[]);let $=S.useMemo(()=>({subscribe:L=>(u.current.add(L),()=>u.current.delete(L)),snapshot:()=>r.current,setState:(L,_,se)=>{var G,ce,ye,De;if(!Object.is(r.current[L],_)){if(r.current[L]=_,L==="search")le(),F(),z(1,re);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ve=document.getElementById(I);ve?ve.focus():(G=document.getElementById(R))==null||G.focus()}if(z(7,()=>{var ve;r.current.selectedItemId=(ve=de())==null?void 0:ve.id,$.emit()}),se||z(5,X),((ce=f.current)==null?void 0:ce.value)!==void 0){let ve=_??"";(De=(ye=f.current).onValueChange)==null||De.call(ye,ve);return}}$.emit()}},emit:()=>{u.current.forEach(L=>L())}}),[]),Z=S.useMemo(()=>({value:(L,_,se)=>{var G;_!==((G=o.current.get(L))==null?void 0:G.value)&&(o.current.set(L,{value:_,keywords:se}),r.current.filtered.items.set(L,W(_,se)),z(2,()=>{F(),$.emit()}))},item:(L,_)=>(a.current.add(L),_&&(l.current.has(_)?l.current.get(_).add(L):l.current.set(_,new Set([L]))),z(3,()=>{le(),F(),r.current.value||re(),$.emit()}),()=>{o.current.delete(L),a.current.delete(L),r.current.filtered.items.delete(L);let se=de();z(4,()=>{le(),(se==null?void 0:se.getAttribute("id"))===L&&re(),$.emit()})}),group:L=>(l.current.has(L)||l.current.set(L,new Set),()=>{o.current.delete(L),l.current.delete(L)}),filter:()=>f.current.shouldFilter,label:m||e["aria-label"],getDisablePointerSelection:()=>f.current.disablePointerSelection,listId:R,inputId:I,labelId:A,listInnerRef:q}),[]);function W(L,_){var se,G;let ce=(G=(se=f.current)==null?void 0:se.filter)!=null?G:LO;return L?ce(L,r.current.search,_):0}function F(){if(!r.current.search||f.current.shouldFilter===!1)return;let L=r.current.filtered.items,_=[];r.current.filtered.groups.forEach(G=>{let ce=l.current.get(G),ye=0;ce.forEach(De=>{let ve=L.get(De);ye=Math.max(ve,ye)}),_.push([G,ye])});let se=q.current;te().sort((G,ce)=>{var ye,De;let ve=G.getAttribute("id"),jt=ce.getAttribute("id");return((ye=L.get(jt))!=null?ye:0)-((De=L.get(ve))!=null?De:0)}).forEach(G=>{let ce=G.closest(_m);ce?ce.appendChild(G.parentElement===ce?G:G.closest(`${_m} > *`)):se.appendChild(G.parentElement===se?G:G.closest(`${_m} > *`))}),_.sort((G,ce)=>ce[1]-G[1]).forEach(G=>{var ce;let ye=(ce=q.current)==null?void 0:ce.querySelector(`${Io}[${ss}="${encodeURIComponent(G[0])}"]`);ye==null||ye.parentElement.appendChild(ye)})}function re(){let L=te().find(se=>se.getAttribute("aria-disabled")!=="true"),_=L==null?void 0:L.getAttribute(ss);$.setState("value",_||void 0)}function le(){var L,_,se,G;if(!r.current.search||f.current.shouldFilter===!1){r.current.filtered.count=a.current.size;return}r.current.filtered.groups=new Set;let ce=0;for(let ye of a.current){let De=(_=(L=o.current.get(ye))==null?void 0:L.value)!=null?_:"",ve=(G=(se=o.current.get(ye))==null?void 0:se.keywords)!=null?G:[],jt=W(De,ve);r.current.filtered.items.set(ye,jt),jt>0&&ce++}for(let[ye,De]of l.current)for(let ve of De)if(r.current.filtered.items.get(ve)>0){r.current.filtered.groups.add(ye);break}r.current.filtered.count=ce}function X(){var L,_,se;let G=de();G&&(((L=G.parentElement)==null?void 0:L.firstChild)===G&&((se=(_=G.closest(Io))==null?void 0:_.querySelector(MO))==null||se.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function de(){var L;return(L=q.current)==null?void 0:L.querySelector(`${bk}[aria-selected="true"]`)}function te(){var L;return Array.from(((L=q.current)==null?void 0:L.querySelectorAll(Z0))||[])}function B(L){let _=te()[L];_&&$.setState("value",_.getAttribute(ss))}function J(L){var _;let se=de(),G=te(),ce=G.findIndex(De=>De===se),ye=G[ce+L];(_=f.current)!=null&&_.loop&&(ye=ce+L<0?G[G.length-1]:ce+L===G.length?G[0]:G[ce+L]),ye&&$.setState("value",ye.getAttribute(ss))}function pe(L){let _=de(),se=_==null?void 0:_.closest(Io),G;for(;se&&!G;)se=L>0?ZO(se,Io):VO(se,Io),G=se==null?void 0:se.querySelector(Z0);G?$.setState("value",G.getAttribute(ss)):J(L)}let Ae=()=>B(te().length-1),T=L=>{L.preventDefault(),L.metaKey?Ae():L.altKey?pe(1):J(1)},U=L=>{L.preventDefault(),L.metaKey?B(0):L.altKey?pe(-1):J(-1)};return S.createElement(Ei.div,{ref:t,tabIndex:-1,...E,"cmdk-root":"",onKeyDown:L=>{var _;(_=E.onKeyDown)==null||_.call(E,L);let se=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||se))switch(L.key){case"n":case"j":{N&&L.ctrlKey&&T(L);break}case"ArrowDown":{T(L);break}case"p":case"k":{N&&L.ctrlKey&&U(L);break}case"ArrowUp":{U(L);break}case"Home":{L.preventDefault(),B(0);break}case"End":{L.preventDefault(),Ae();break}case"Enter":{L.preventDefault();let G=de();if(G){let ce=new Event(Ep);G.dispatchEvent(ce)}}}}},S.createElement("label",{"cmdk-label":"",htmlFor:Z.inputId,id:Z.labelId,style:KO},m),Md(e,L=>S.createElement(wk.Provider,{value:$},S.createElement(Sk.Provider,{value:Z},L))))}),UO=S.forwardRef((e,t)=>{var r,a;let l=Si(),o=S.useRef(null),u=S.useContext(kk),f=pu(),m=Ek(e),h=(a=(r=m.current)==null?void 0:r.forceMount)!=null?a:u==null?void 0:u.forceMount;ol(()=>{if(!h)return f.item(l,u==null?void 0:u.id)},[h]);let v=Ck(l,o,[e.value,e.children,o],e.keywords),y=yg(),x=va(z=>z.value&&z.value===v.current),b=va(z=>h||f.filter()===!1?!0:z.search?z.filtered.items.get(l)>0:!0);S.useEffect(()=>{let z=o.current;if(!(!z||e.disabled))return z.addEventListener(Ep,j),()=>z.removeEventListener(Ep,j)},[b,e.onSelect,e.disabled]);function j(){var z,$;k(),($=(z=m.current).onSelect)==null||$.call(z,v.current)}function k(){y.setState("value",v.current,!0)}if(!b)return null;let{disabled:N,value:E,onSelect:R,forceMount:A,keywords:I,...q}=e;return S.createElement(Ei.div,{ref:ya(o,t),...q,id:l,"cmdk-item":"",role:"option","aria-disabled":!!N,"aria-selected":!!x,"data-disabled":!!N,"data-selected":!!x,onPointerMove:N||f.getDisablePointerSelection()?void 0:k,onClick:N?void 0:j},e.children)}),IO=S.forwardRef((e,t)=>{let{heading:r,children:a,forceMount:l,...o}=e,u=Si(),f=S.useRef(null),m=S.useRef(null),h=Si(),v=pu(),y=va(b=>l||v.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);ol(()=>v.group(u),[]),Ck(u,f,[e.value,e.heading,m]);let x=S.useMemo(()=>({id:u,forceMount:l}),[l]);return S.createElement(Ei.div,{ref:ya(f,t),...o,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},r&&S.createElement("div",{ref:m,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),Md(e,b=>S.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},S.createElement(kk.Provider,{value:x},b))))}),BO=S.forwardRef((e,t)=>{let{alwaysRender:r,...a}=e,l=S.useRef(null),o=va(u=>!u.search);return!r&&!o?null:S.createElement(Ei.div,{ref:ya(l,t),...a,"cmdk-separator":"",role:"separator"})}),PO=S.forwardRef((e,t)=>{let{onValueChange:r,...a}=e,l=e.value!=null,o=yg(),u=va(h=>h.search),f=va(h=>h.selectedItemId),m=pu();return S.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),S.createElement(Ei.input,{ref:t,...a,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":m.listId,"aria-labelledby":m.labelId,"aria-activedescendant":f,id:m.inputId,type:"text",value:l?e.value:u,onChange:h=>{l||o.setState("search",h.target.value),r==null||r(h.target.value)}})}),$O=S.forwardRef((e,t)=>{let{children:r,label:a="Suggestions",...l}=e,o=S.useRef(null),u=S.useRef(null),f=va(h=>h.selectedItemId),m=pu();return S.useEffect(()=>{if(u.current&&o.current){let h=u.current,v=o.current,y,x=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let b=h.offsetHeight;v.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return x.observe(h),()=>{cancelAnimationFrame(y),x.unobserve(h)}}},[]),S.createElement(Ei.div,{ref:ya(o,t),...l,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":f,"aria-label":a,id:m.listId},Md(e,h=>S.createElement("div",{ref:ya(u,m.listInnerRef),"cmdk-list-sizer":""},h)))}),qO=S.forwardRef((e,t)=>{let{open:r,onOpenChange:a,overlayClassName:l,contentClassName:o,container:u,...f}=e;return S.createElement(mk,{open:r,onOpenChange:a},S.createElement(pk,{container:u},S.createElement(gk,{"cmdk-overlay":"",className:l}),S.createElement(yk,{"aria-label":e.label,"cmdk-dialog":"",className:o},S.createElement(jk,{ref:t,...f}))))}),FO=S.forwardRef((e,t)=>va(r=>r.filtered.count===0)?S.createElement(Ei.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),HO=S.forwardRef((e,t)=>{let{progress:r,children:a,label:l="Loading...",...o}=e;return S.createElement(Ei.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":l},Md(e,u=>S.createElement("div",{"aria-hidden":!0},u)))}),In=Object.assign(jk,{List:$O,Item:UO,Input:PO,Group:IO,Separator:BO,Dialog:qO,Empty:FO,Loading:HO});function ZO(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function VO(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function Ek(e){let t=S.useRef(e);return ol(()=>{t.current=e}),t}var ol=typeof window>"u"?S.useEffect:S.useLayoutEffect;function os(e){let t=S.useRef();return t.current===void 0&&(t.current=e()),t}function va(e){let t=yg(),r=()=>e(t.snapshot());return S.useSyncExternalStore(t.subscribe,r,r)}function Ck(e,t,r,a=[]){let l=S.useRef(),o=pu();return ol(()=>{var u;let f=(()=>{var h;for(let v of r){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(h=v.current.textContent)==null?void 0:h.trim():l.current}})(),m=a.map(h=>h.trim());o.value(e,f,m),(u=t.current)==null||u.setAttribute(ss,f),l.current=f}),l}var QO=()=>{let[e,t]=S.useState(),r=os(()=>new Map);return ol(()=>{r.current.forEach(a=>a()),r.current=new Map},[e]),(a,l)=>{r.current.set(a,l),t({})}};function GO(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Md({asChild:e,children:t},r){return e&&S.isValidElement(t)?S.cloneElement(GO(t),{ref:t.ref},r(t.props.children)):r(t)}var KO={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Mn=mk,YO=wO,XO=pk,Nk=S.forwardRef(({className:e,...t},r)=>d.jsx(gk,{ref:r,className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Nk.displayName="DialogOverlay";const Sn=S.forwardRef(({className:e,children:t,...r},a)=>d.jsxs(XO,{children:[d.jsx(Nk,{}),d.jsxs(yk,{ref:a,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...r,children:[t,d.jsxs(EO,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(pw,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Sn.displayName="DialogContent";function Wn({className:e,...t}){return d.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}function Ln({className:e,...t}){return d.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t})}const Un=S.forwardRef(({className:e,...t},r)=>d.jsx(kO,{ref:r,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));Un.displayName="DialogTitle";const JO=S.forwardRef(({className:e,...t},r)=>d.jsx(jO,{ref:r,className:Te("text-sm text-muted-foreground",e),...t}));JO.displayName="DialogDescription";const _k=S.forwardRef(({className:e,...t},r)=>d.jsx(In,{ref:r,className:Te("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));_k.displayName=In.displayName;function WO({open:e,onOpenChange:t,children:r}){return d.jsx(Mn,{open:e,onOpenChange:t,children:d.jsx(Sn,{className:"overflow-hidden p-0 shadow-lg",children:d.jsx(_k,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:r})})})}const Ak=S.forwardRef(({className:e,...t},r)=>d.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[d.jsx(dg,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),d.jsx(In.Input,{ref:r,className:Te("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Ak.displayName=In.Input.displayName;const Tk=S.forwardRef(({className:e,...t},r)=>d.jsx(In.List,{ref:r,className:Te("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Tk.displayName=In.List.displayName;const zk=S.forwardRef((e,t)=>d.jsx(In.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));zk.displayName=In.Empty.displayName;const ad=S.forwardRef(({className:e,...t},r)=>d.jsx(In.Group,{ref:r,className:Te("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));ad.displayName=In.Group.displayName;const Cp=S.forwardRef(({className:e,...t},r)=>d.jsx(In.Separator,{ref:r,className:Te("-mx-1 h-px bg-border",e),...t}));Cp.displayName=In.Separator.displayName;const ld=S.forwardRef(({className:e,...t},r)=>d.jsx(In.Item,{ref:r,className:Te("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));ld.displayName=In.Item.displayName;function vg(e){const t=new URLSearchParams;e!=null&&e.limit&&t.set("limit",String(e.limit)),e!=null&&e.cursor&&t.set("cursor",e.cursor),e!=null&&e.type&&t.set("type",e.type);const r=t.toString();return Me.get(`/admin/agents${r?`?${r}`:""}`)}function eD(e){const t=new URLSearchParams;t.set("limit",String(e.limit)),e!=null&&e.cursor&&t.set("cursor",e.cursor);const r=t.toString();return Me.get(`/admin/agents/all${r?`?${r}`:""}`)}function Rk(e){return Me.get(`/admin/agents/${encodeURIComponent(e)}`)}function tD(e){return Me.post("/admin/agents",e)}function V0(e,t){return Me.patch(`/admin/agents/${encodeURIComponent(e)}`,t)}function nD(e){return Me.delete(`/admin/agents/${encodeURIComponent(e)}`)}function rD(e){return Me.post(`/admin/agents/${encodeURIComponent(e)}/suspend`,{})}function iD(e){return Me.post(`/admin/agents/${encodeURIComponent(e)}/reactivate`,{})}function aD(e){return Me.post(`/admin/agents/${encodeURIComponent(e)}/test`,{})}function Ci(){const{data:e}=Fe({queryKey:["agents","name-map"],queryFn:()=>vg({limit:100}),staleTime:3e4});return S.useMemo(()=>{const t=new Map;if(e!=null&&e.items)for(const r of e.items)t.set(r.uuid,r.displayName??r.name??r.uuid);return r=>r?t.get(r)??r:"—"},[e])}const lD=[{path:"/",label:"Workspace"},{path:"/agents",label:"Agents"},{path:"/clients",label:"Computers"},{path:"/settings",label:"Settings"},{path:"/admin",label:"Admin"}];function sD({open:e,onOpenChange:t}){const r=Vr(),a=Ci(),{data:l}=Fe({queryKey:["activity"],queryFn:Td,enabled:e,staleTime:3e4}),o=(l==null?void 0:l.agents)??[],f=Fe({queryKey:["palette-sessions",o.map(h=>h.agentId).join(",")],queryFn:async()=>{const h=[];for(const v of o)try{const y=await Us(v.agentId);for(const x of y)h.push({agentId:v.agentId,session:x})}catch{}return h},enabled:e&&o.length>0,staleTime:3e4}).data??[],m=h=>{t(!1),r(h)};return d.jsxs(WO,{open:e,onOpenChange:t,children:[d.jsx(Ak,{placeholder:"Jump to agent, chat, or page…"}),d.jsxs(Tk,{children:[d.jsx(zk,{children:"No results"}),o.length>0&&d.jsx(ad,{heading:"Agents",children:o.map(h=>{const v=a(h.agentId);return d.jsxs(ld,{value:`agent ${v} ${h.agentId}`,onSelect:()=>m(`/?a=${h.agentId}`),children:[d.jsx(KA,{className:"mr-2 h-4 w-4 shrink-0 opacity-70"}),d.jsx("span",{className:"flex-1 truncate",children:v}),d.jsx("span",{className:"text-xs text-muted-foreground font-mono ml-2",children:h.agentId.slice(0,8)})]},h.agentId)})}),f.length>0&&d.jsxs(d.Fragment,{children:[d.jsx(Cp,{}),d.jsx(ad,{heading:"Chats",children:f.map(({agentId:h,session:v})=>{const y=a(h);return d.jsxs(ld,{value:`chat ${y} ${v.chatId}`,onSelect:()=>m(`/?a=${h}&c=${v.chatId}`),children:[d.jsx(mw,{className:"mr-2 h-4 w-4 shrink-0 opacity-70"}),d.jsx("span",{className:"flex-1 truncate",children:y}),d.jsx("span",{className:"text-xs text-muted-foreground font-mono ml-2",children:v.chatId.slice(0,8)})]},`${h}-${v.chatId}`)})})]}),d.jsx(Cp,{}),d.jsx(ad,{heading:"Pages",children:lD.map(h=>d.jsxs(ld,{value:`page ${h.label}`,onSelect:()=>m(h.path),children:[d.jsx(lT,{className:"mr-2 h-4 w-4 shrink-0 opacity-70"}),d.jsx("span",{children:h.label})]},h.path))})]})]})}function Np(e){const t=new URLSearchParams;e!=null&&e.limit&&t.set("limit",String(e.limit)),e!=null&&e.cursor&&t.set("cursor",e.cursor),e!=null&&e.severity&&t.set("severity",e.severity),(e==null?void 0:e.read)!==void 0&&t.set("read",String(e.read)),e!=null&&e.agentId&&t.set("agentId",e.agentId);const r=t.toString();return Me.get(`/admin/notifications${r?`?${r}`:""}`)}function Ok(e){return Me.post(`/admin/notifications/${e}/read`)}function oD(){return Me.post("/admin/notifications/read-all")}function uD(e){switch(e){case"high":return"bg-red-500";case"medium":return"bg-yellow-500";default:return"bg-gray-400"}}function cD(e){const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<1)return"just now";if(r<60)return`${r}m`;const a=Math.floor(r/60);return a<24?`${a}h`:`${Math.floor(a/24)}d`}function dD(){var j;const[e,t]=S.useState(!1),[r,a]=S.useState(null),l=S.useRef(null),o=Vr(),u=Ci(),f=er(),{data:m}=Fe({queryKey:["notifications","bell"],queryFn:()=>Np({limit:5}),refetchInterval:1e4}),{data:h}=Fe({queryKey:["notifications","unread-count"],queryFn:()=>Np({read:!1,limit:100}),refetchInterval:1e4}),v=((j=h==null?void 0:h.items)==null?void 0:j.length)??0,y=v>0,x=S.useCallback(async k=>{k.read||Ok(k.id).catch(()=>{}),t(!1),k.agentId&&k.chatId?o(`/?a=${k.agentId}&c=${k.chatId}`):k.agentId&&o(`/?a=${k.agentId}`)},[o]),b=S.useCallback(async()=>{a(null);try{await oD(),await f.invalidateQueries({queryKey:["notifications"]})}catch(k){a(k instanceof Error?k.message:"Failed to mark all as read")}},[f]);return d.jsxs("div",{className:"relative",children:[d.jsxs("button",{type:"button",onClick:()=>t(!e),className:"relative flex items-center justify-center rounded-md p-1.5 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",children:[d.jsx(QA,{className:"h-4 w-4"}),y&&d.jsx("span",{className:"absolute -top-0.5 -right-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white",children:v>99?"99+":v})]}),e&&d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:"fixed inset-0 z-40 cursor-default",onClick:()=>t(!1)}),d.jsxs("div",{ref:l,className:"absolute right-0 top-full mt-1 z-50 w-80 rounded-md border border-border bg-card shadow-lg",children:[d.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[d.jsx("span",{className:"text-sm font-medium",children:"Notifications"}),y&&d.jsx("button",{type:"button",onClick:b,className:"text-xs text-muted-foreground hover:text-foreground",children:"Mark all"})]}),r&&d.jsx("div",{className:"border-b border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:r}),d.jsx("div",{className:"max-h-80 overflow-y-auto",children:!(m!=null&&m.items)||m.items.length===0?d.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"No notifications"}):m.items.map(k=>d.jsxs("button",{type:"button",onClick:()=>x(k),className:Te("w-full flex items-start gap-2 px-3 py-2 text-left hover:bg-accent/50 transition-colors",!k.read&&"bg-accent/20"),children:[d.jsx("span",{className:Te("mt-1.5 h-2 w-2 shrink-0 rounded-full",uD(k.severity))}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("p",{className:Te("text-sm truncate",!k.read&&"font-medium"),children:k.message}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:[k.agentId?u(k.agentId):""," ",cD(k.createdAt)]})]})]},k.id))})]})]})]})}function fD(){if(typeof window>"u")return"light";const e=window.localStorage.getItem("theme");return e==="light"||e==="dark"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function hD(){const[e,t]=S.useState(fD);return S.useEffect(()=>{document.documentElement.classList.toggle("dark",e==="dark"),window.localStorage.setItem("theme",e)},[e]),d.jsx("button",{type:"button",onClick:()=>t(e==="dark"?"light":"dark"),"aria-label":e==="dark"?"Switch to light theme":"Switch to dark theme",className:"flex items-center gap-1.5 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",children:e==="dark"?d.jsx(_T,{className:"h-4 w-4"}):d.jsx(pT,{className:"h-4 w-4"})})}const Q0=[{to:"/",label:"Workspace",end:!0,kbd:"⌘1"},{to:"/agents",label:"Agents",end:!1,kbd:"⌘2"},{to:"/clients",label:"Computers",end:!1,kbd:"⌘3"},{to:"/settings",label:"Settings",end:!1,kbd:"⌘4"}],mD={to:"/admin",label:"Admin",end:!1,kbd:"⌘5"};function pD(){const{role:e,logout:t}=Sa(),r=e==="admin",[a,l]=S.useState(!1),o=r?[...Q0,mD]:Q0,u=yr(),f=u.pathname==="/"||u.search.includes("a=");return S.useEffect(()=>{const m=h=>{(h.metaKey||h.ctrlKey)&&h.key.toLowerCase()==="k"&&(h.preventDefault(),l(v=>!v))};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[]),d.jsxs("div",{className:"flex flex-col overflow-hidden",style:{height:"100vh",background:"var(--bg)"},children:[d.jsxs("header",{className:"relative shrink-0 grid items-center",style:{height:40,gridTemplateColumns:"auto 1fr auto",padding:"0 12px",borderBottom:"1px solid var(--border)",background:"var(--bg-raised)"},children:[d.jsxs("div",{className:"flex items-center",style:{gap:10},children:[d.jsx(_d,{className:"h-4 w-4",style:{color:"var(--accent)"}}),d.jsxs("span",{style:{fontWeight:600,fontSize:13,letterSpacing:-.1,color:"var(--fg)"},children:["First Tree ",d.jsx("span",{style:{color:"var(--fg-3)",fontWeight:400},children:"Hub"})]})]}),d.jsx("nav",{className:"flex justify-center",style:{gap:2,pointerEvents:"none"},children:o.map(m=>d.jsx(lw,{to:m.to,end:m.end,style:{pointerEvents:"auto"},className:({isActive:h})=>Te("inline-flex items-center transition-colors",h?"":"hover:text-[var(--fg)]"),children:({isActive:h})=>d.jsxs("span",{className:"inline-flex items-center",style:{padding:"5px 12px",fontSize:12,fontWeight:500,gap:6,borderRadius:5,color:h?"var(--fg)":"var(--fg-3)",background:h?"var(--bg-hover)":"transparent"},children:[m.label,h&&d.jsx("span",{className:"kbd",children:m.kbd})]})},m.to))}),d.jsxs("div",{className:"flex items-center",style:{gap:6},children:[d.jsxs("button",{type:"button",onClick:()=>l(!0),"aria-label":"Open command palette",className:"inline-flex items-center transition-colors",style:{gap:8,padding:"4px 8px",fontSize:11,color:"var(--fg-3)",border:"1px solid var(--border)",borderRadius:4,background:"var(--bg-sunken)"},onMouseEnter:m=>{m.currentTarget.style.color="var(--fg)"},onMouseLeave:m=>{m.currentTarget.style.color="var(--fg-3)"},children:[d.jsx(dg,{className:"h-3.5 w-3.5"}),d.jsx("span",{children:"Jump to…"}),d.jsx("span",{className:"kbd",children:"⌘K"})]}),d.jsx("span",{style:{width:1,height:18,background:"var(--border)",margin:"0 4px"}}),d.jsx(dD,{}),d.jsx(hD,{}),d.jsx("span",{style:{width:1,height:18,background:"var(--border)",margin:"0 4px"}}),d.jsx("button",{type:"button",onClick:t,className:"inline-flex items-center transition-colors hover:text-[var(--fg)]",style:{padding:"4px 8px",color:"var(--fg-3)",borderRadius:4,gap:6,fontSize:11},"aria-label":"Log out",children:d.jsx(fT,{className:"h-3.5 w-3.5"})})]})]}),d.jsx(sD,{open:a,onOpenChange:l}),f?d.jsx(yp,{}):d.jsx("main",{className:"flex-1 overflow-auto",children:d.jsx("div",{className:"p-6 max-w-5xl mx-auto",children:d.jsx(yp,{})})})]})}function ie(e,t,r){function a(f,m){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:m,constr:u,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,m);const h=u.prototype,v=Object.keys(h);for(let y=0;y<v.length;y++){const x=v[y];x in f||(f[x]=h[x].bind(f))}}const l=(r==null?void 0:r.Parent)??Object;class o extends l{}Object.defineProperty(o,"name",{value:e});function u(f){var m;const h=r!=null&&r.Parent?new o:this;a(h,f),(m=h._zod).deferred??(m.deferred=[]);for(const v of h._zod.deferred)v();return h}return Object.defineProperty(u,"init",{value:a}),Object.defineProperty(u,Symbol.hasInstance,{value:f=>{var m,h;return r!=null&&r.Parent&&f instanceof r.Parent?!0:(h=(m=f==null?void 0:f._zod)==null?void 0:m.traits)==null?void 0:h.has(e)}}),Object.defineProperty(u,"name",{value:e}),u}class ms extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Dk extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Mk={};function xa(e){return Mk}function Lk(e){const t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,l])=>t.indexOf(+a)===-1).map(([a,l])=>l)}function _p(e,t){return typeof t=="bigint"?t.toString():t}function Ld(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function xg(e){return e==null}function bg(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function gD(e,t){const r=(e.toString().split(".")[1]||"").length,a=t.toString();let l=(a.split(".")[1]||"").length;if(l===0&&/\d?e-\d?/.test(a)){const m=a.match(/\d?e-(\d?)/);m!=null&&m[1]&&(l=Number.parseInt(m[1]))}const o=r>l?r:l,u=Number.parseInt(e.toFixed(o).replace(".","")),f=Number.parseInt(t.toFixed(o).replace(".",""));return u%f/10**o}const G0=Symbol("evaluating");function st(e,t,r){let a;Object.defineProperty(e,t,{get(){if(a!==G0)return a===void 0&&(a=G0,a=r()),a},set(l){Object.defineProperty(e,t,{value:l})},configurable:!0})}function pl(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function ka(...e){const t={};for(const r of e){const a=Object.getOwnPropertyDescriptors(r);Object.assign(t,a)}return Object.defineProperties({},t)}function K0(e){return JSON.stringify(e)}function yD(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Uk="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function nu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const vD=Ld(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function _s(e){if(nu(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(nu(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ik(e){return _s(e)?{...e}:Array.isArray(e)?[...e]:e}const xD=new Set(["string","number","symbol"]);function As(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ja(e,t,r){const a=new e._zod.constr(t??e._zod.def);return(!t||r!=null&&r.parent)&&(a._zod.parent=e),a}function Ce(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function bD(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const SD={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function wD(e,t){const r=e._zod.def,a=r.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=ka(e._zod.def,{get shape(){const u={};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(u[f]=r.shape[f])}return pl(this,"shape",u),u},checks:[]});return ja(e,o)}function kD(e,t){const r=e._zod.def,a=r.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=ka(e._zod.def,{get shape(){const u={...e._zod.def.shape};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete u[f]}return pl(this,"shape",u),u},checks:[]});return ja(e,o)}function jD(e,t){if(!_s(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const o=e._zod.def.shape;for(const u in t)if(Object.getOwnPropertyDescriptor(o,u)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const l=ka(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return pl(this,"shape",o),o}});return ja(e,l)}function ED(e,t){if(!_s(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=ka(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return pl(this,"shape",a),a}});return ja(e,r)}function CD(e,t){const r=ka(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return pl(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:[]});return ja(e,r)}function ND(e,t,r){const l=t._zod.def.checks;if(l&&l.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const u=ka(t._zod.def,{get shape(){const f=t._zod.def.shape,m={...f};if(r)for(const h in r){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);r[h]&&(m[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)m[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return pl(this,"shape",m),m},checks:[]});return ja(t,u)}function _D(e,t,r){const a=ka(t._zod.def,{get shape(){const l=t._zod.def.shape,o={...l};if(r)for(const u in r){if(!(u in o))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(o[u]=new e({type:"nonoptional",innerType:l[u]}))}else for(const u in l)o[u]=new e({type:"nonoptional",innerType:l[u]});return pl(this,"shape",o),o}});return ja(t,a)}function cs(e,t=0){var r;if(e.aborted===!0)return!0;for(let a=t;a<e.issues.length;a++)if(((r=e.issues[a])==null?void 0:r.continue)!==!0)return!0;return!1}function ds(e,t){return t.map(r=>{var a;return(a=r).path??(a.path=[]),r.path.unshift(e),r})}function Vc(e){return typeof e=="string"?e:e==null?void 0:e.message}function ba(e,t,r){var l,o,u,f,m,h;const a={...e,path:e.path??[]};if(!e.message){const v=Vc((u=(o=(l=e.inst)==null?void 0:l._zod.def)==null?void 0:o.error)==null?void 0:u.call(o,e))??Vc((f=t==null?void 0:t.error)==null?void 0:f.call(t,e))??Vc((m=r.customError)==null?void 0:m.call(r,e))??Vc((h=r.localeError)==null?void 0:h.call(r,e))??"Invalid input";a.message=v}return delete a.inst,delete a.continue,t!=null&&t.reportInput||delete a.input,a}function Sg(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ru(...e){const[t,r,a]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:a}:{...t}}const Bk=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,_p,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Pk=ie("$ZodError",Bk),$k=ie("$ZodError",Bk,{Parent:Error});function AD(e,t=r=>r.message){const r={},a=[];for(const l of e.issues)l.path.length>0?(r[l.path[0]]=r[l.path[0]]||[],r[l.path[0]].push(t(l))):a.push(t(l));return{formErrors:a,fieldErrors:r}}function TD(e,t=r=>r.message){const r={_errors:[]},a=l=>{for(const o of l.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(u=>a({issues:u}));else if(o.code==="invalid_key")a({issues:o.issues});else if(o.code==="invalid_element")a({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let u=r,f=0;for(;f<o.path.length;){const m=o.path[f];f===o.path.length-1?(u[m]=u[m]||{_errors:[]},u[m]._errors.push(t(o))):u[m]=u[m]||{_errors:[]},u=u[m],f++}}};return a(e),r}const wg=e=>(t,r,a,l)=>{const o=a?Object.assign(a,{async:!1}):{async:!1},u=t._zod.run({value:r,issues:[]},o);if(u instanceof Promise)throw new ms;if(u.issues.length){const f=new((l==null?void 0:l.Err)??e)(u.issues.map(m=>ba(m,o,xa())));throw Uk(f,l==null?void 0:l.callee),f}return u.value},kg=e=>async(t,r,a,l)=>{const o=a?Object.assign(a,{async:!0}):{async:!0};let u=t._zod.run({value:r,issues:[]},o);if(u instanceof Promise&&(u=await u),u.issues.length){const f=new((l==null?void 0:l.Err)??e)(u.issues.map(m=>ba(m,o,xa())));throw Uk(f,l==null?void 0:l.callee),f}return u.value},Ud=e=>(t,r,a)=>{const l=a?{...a,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},l);if(o instanceof Promise)throw new ms;return o.issues.length?{success:!1,error:new(e??Pk)(o.issues.map(u=>ba(u,l,xa())))}:{success:!0,data:o.value}},zD=Ud($k),Id=e=>async(t,r,a)=>{const l=a?Object.assign(a,{async:!0}):{async:!0};let o=t._zod.run({value:r,issues:[]},l);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(u=>ba(u,l,xa())))}:{success:!0,data:o.value}},RD=Id($k),OD=e=>(t,r,a)=>{const l=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return wg(e)(t,r,l)},DD=e=>(t,r,a)=>wg(e)(t,r,a),MD=e=>async(t,r,a)=>{const l=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return kg(e)(t,r,l)},LD=e=>async(t,r,a)=>kg(e)(t,r,a),UD=e=>(t,r,a)=>{const l=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Ud(e)(t,r,l)},ID=e=>(t,r,a)=>Ud(e)(t,r,a),BD=e=>async(t,r,a)=>{const l=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Id(e)(t,r,l)},PD=e=>async(t,r,a)=>Id(e)(t,r,a),$D=/^[cC][^\s-]{8,}$/,qD=/^[0-9a-z]+$/,FD=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,HD=/^[0-9a-vA-V]{20}$/,ZD=/^[A-Za-z0-9]{27}$/,VD=/^[a-zA-Z0-9_-]{21}$/,QD=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,GD=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Y0=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,KD=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,YD="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function XD(){return new RegExp(YD,"u")}const JD=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,WD=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,e4=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,t4=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,n4=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,qk=/^[A-Za-z0-9_-]*$/,r4=/^\+[1-9]\d{6,14}$/,Fk="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",i4=new RegExp(`^${Fk}$`);function Hk(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function a4(e){return new RegExp(`^${Hk(e)}$`)}function l4(e){const t=Hk({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${t}(?:${r.join("|")})`;return new RegExp(`^${Fk}T(?:${a})$`)}const s4=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},o4=/^-?\d+$/,Zk=/^-?\d+(?:\.\d+)?$/,u4=/^(?:true|false)$/i,c4=/^[^A-Z]*$/,d4=/^[^a-z]*$/,Bn=ie("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Vk={number:"number",bigint:"bigint",object:"date"},Qk=ie("$ZodCheckLessThan",(e,t)=>{Bn.init(e,t);const r=Vk[typeof t.value];e._zod.onattach.push(a=>{const l=a._zod.bag,o=(t.inclusive?l.maximum:l.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?l.maximum=t.value:l.exclusiveMaximum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value<=t.value:a.value<t.value)||a.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Gk=ie("$ZodCheckGreaterThan",(e,t)=>{Bn.init(e,t);const r=Vk[typeof t.value];e._zod.onattach.push(a=>{const l=a._zod.bag,o=(t.inclusive?l.minimum:l.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?l.minimum=t.value:l.exclusiveMinimum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value>=t.value:a.value>t.value)||a.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),f4=ie("$ZodCheckMultipleOf",(e,t)=>{Bn.init(e,t),e._zod.onattach.push(r=>{var a;(a=r._zod.bag).multipleOf??(a.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):gD(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),h4=ie("$ZodCheckNumberFormat",(e,t)=>{var u;Bn.init(e,t),t.format=t.format||"float64";const r=(u=t.format)==null?void 0:u.includes("int"),a=r?"int":"number",[l,o]=SD[t.format];e._zod.onattach.push(f=>{const m=f._zod.bag;m.format=t.format,m.minimum=l,m.maximum=o,r&&(m.pattern=o4)}),e._zod.check=f=>{const m=f.value;if(r){if(!Number.isInteger(m)){f.issues.push({expected:a,format:t.format,code:"invalid_type",continue:!1,input:m,inst:e});return}if(!Number.isSafeInteger(m)){m>0?f.issues.push({input:m,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort}):f.issues.push({input:m,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort});return}}m<l&&f.issues.push({origin:"number",input:m,code:"too_small",minimum:l,inclusive:!0,inst:e,continue:!t.abort}),m>o&&f.issues.push({origin:"number",input:m,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),m4=ie("$ZodCheckMaxLength",(e,t)=>{var r;Bn.init(e,t),(r=e._zod.def).when??(r.when=a=>{const l=a.value;return!xg(l)&&l.length!==void 0}),e._zod.onattach.push(a=>{const l=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<l&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const l=a.value;if(l.length<=t.maximum)return;const u=Sg(l);a.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:l,inst:e,continue:!t.abort})}}),p4=ie("$ZodCheckMinLength",(e,t)=>{var r;Bn.init(e,t),(r=e._zod.def).when??(r.when=a=>{const l=a.value;return!xg(l)&&l.length!==void 0}),e._zod.onattach.push(a=>{const l=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>l&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const l=a.value;if(l.length>=t.minimum)return;const u=Sg(l);a.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:l,inst:e,continue:!t.abort})}}),g4=ie("$ZodCheckLengthEquals",(e,t)=>{var r;Bn.init(e,t),(r=e._zod.def).when??(r.when=a=>{const l=a.value;return!xg(l)&&l.length!==void 0}),e._zod.onattach.push(a=>{const l=a._zod.bag;l.minimum=t.length,l.maximum=t.length,l.length=t.length}),e._zod.check=a=>{const l=a.value,o=l.length;if(o===t.length)return;const u=Sg(l),f=o>t.length;a.issues.push({origin:u,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),Bd=ie("$ZodCheckStringFormat",(e,t)=>{var r,a;Bn.init(e,t),e._zod.onattach.push(l=>{const o=l._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=l=>{t.pattern.lastIndex=0,!t.pattern.test(l.value)&&l.issues.push({origin:"string",code:"invalid_format",format:t.format,input:l.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(a=e._zod).check??(a.check=()=>{})}),y4=ie("$ZodCheckRegex",(e,t)=>{Bd.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),v4=ie("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=c4),Bd.init(e,t)}),x4=ie("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=d4),Bd.init(e,t)}),b4=ie("$ZodCheckIncludes",(e,t)=>{Bn.init(e,t);const r=As(t.includes),a=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=a,e._zod.onattach.push(l=>{const o=l._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(a)}),e._zod.check=l=>{l.value.includes(t.includes,t.position)||l.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:l.value,inst:e,continue:!t.abort})}}),S4=ie("$ZodCheckStartsWith",(e,t)=>{Bn.init(e,t);const r=new RegExp(`^${As(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(a=>{const l=a._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=a=>{a.value.startsWith(t.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:a.value,inst:e,continue:!t.abort})}}),w4=ie("$ZodCheckEndsWith",(e,t)=>{Bn.init(e,t);const r=new RegExp(`.*${As(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(a=>{const l=a._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(r)}),e._zod.check=a=>{a.value.endsWith(t.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:a.value,inst:e,continue:!t.abort})}}),k4=ie("$ZodCheckOverwrite",(e,t)=>{Bn.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class j4{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const a=t.split(`
295
- `).filter(u=>u),l=Math.min(...a.map(u=>u.length-u.trimStart().length)),o=a.map(u=>u.slice(l)).map(u=>" ".repeat(this.indent*2)+u);for(const u of o)this.content.push(u)}compile(){const t=Function,r=this==null?void 0:this.args,l=[...((this==null?void 0:this.content)??[""]).map(o=>` ${o}`)];return new t(...r,l.join(`
296
- `))}}const E4={major:4,minor:3,patch:6},At=ie("$ZodType",(e,t)=>{var l;var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=E4;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const o of a)for(const u of o._zod.onattach)u(e);if(a.length===0)(r=e._zod).deferred??(r.deferred=[]),(l=e._zod.deferred)==null||l.push(()=>{e._zod.run=e._zod.parse});else{const o=(f,m,h)=>{let v=cs(f),y;for(const x of m){if(x._zod.def.when){if(!x._zod.def.when(f))continue}else if(v)continue;const b=f.issues.length,j=x._zod.check(f);if(j instanceof Promise&&(h==null?void 0:h.async)===!1)throw new ms;if(y||j instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await j,f.issues.length!==b&&(v||(v=cs(f,b)))});else{if(f.issues.length===b)continue;v||(v=cs(f,b))}}return y?y.then(()=>f):f},u=(f,m,h)=>{if(cs(f))return f.aborted=!0,f;const v=o(m,a,h);if(v instanceof Promise){if(h.async===!1)throw new ms;return v.then(y=>e._zod.parse(y,h))}return e._zod.parse(v,h)};e._zod.run=(f,m)=>{if(m.skipChecks)return e._zod.parse(f,m);if(m.direction==="backward"){const v=e._zod.parse({value:f.value,issues:[]},{...m,skipChecks:!0});return v instanceof Promise?v.then(y=>u(y,f,m)):u(v,f,m)}const h=e._zod.parse(f,m);if(h instanceof Promise){if(m.async===!1)throw new ms;return h.then(v=>o(v,a,m))}return o(h,a,m)}}st(e,"~standard",()=>({validate:o=>{var u;try{const f=zD(e,o);return f.success?{value:f.data}:{issues:(u=f.error)==null?void 0:u.issues}}catch{return RD(e,o).then(m=>{var h;return m.success?{value:m.data}:{issues:(h=m.error)==null?void 0:h.issues}})}},vendor:"zod",version:1}))}),jg=ie("$ZodString",(e,t)=>{var r;At.init(e,t),e._zod.pattern=[...((r=e==null?void 0:e._zod.bag)==null?void 0:r.patterns)??[]].pop()??s4(e._zod.bag),e._zod.parse=(a,l)=>{if(t.coerce)try{a.value=String(a.value)}catch{}return typeof a.value=="string"||a.issues.push({expected:"string",code:"invalid_type",input:a.value,inst:e}),a}}),_t=ie("$ZodStringFormat",(e,t)=>{Bd.init(e,t),jg.init(e,t)}),C4=ie("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=GD),_t.init(e,t)}),N4=ie("$ZodUUID",(e,t)=>{if(t.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(a===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Y0(a))}else t.pattern??(t.pattern=Y0());_t.init(e,t)}),_4=ie("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=KD),_t.init(e,t)}),A4=ie("$ZodURL",(e,t)=>{_t.init(e,t),e._zod.check=r=>{try{const a=r.value.trim(),l=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(l.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(l.protocol.endsWith(":")?l.protocol.slice(0,-1):l.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=l.href:r.value=a;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),T4=ie("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=XD()),_t.init(e,t)}),z4=ie("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=VD),_t.init(e,t)}),R4=ie("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=$D),_t.init(e,t)}),O4=ie("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=qD),_t.init(e,t)}),D4=ie("$ZodULID",(e,t)=>{t.pattern??(t.pattern=FD),_t.init(e,t)}),M4=ie("$ZodXID",(e,t)=>{t.pattern??(t.pattern=HD),_t.init(e,t)}),L4=ie("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ZD),_t.init(e,t)}),U4=ie("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=l4(t)),_t.init(e,t)}),I4=ie("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=i4),_t.init(e,t)}),B4=ie("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=a4(t)),_t.init(e,t)}),P4=ie("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=QD),_t.init(e,t)}),$4=ie("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=JD),_t.init(e,t),e._zod.bag.format="ipv4"}),q4=ie("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=WD),_t.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),F4=ie("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=e4),_t.init(e,t)}),H4=ie("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=t4),_t.init(e,t),e._zod.check=r=>{const a=r.value.split("/");try{if(a.length!==2)throw new Error;const[l,o]=a;if(!o)throw new Error;const u=Number(o);if(`${u}`!==o)throw new Error;if(u<0||u>128)throw new Error;new URL(`http://[${l}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Kk(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Z4=ie("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=n4),_t.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Kk(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function V4(e){if(!qk.test(e))return!1;const t=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Kk(r)}const Q4=ie("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=qk),_t.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{V4(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),G4=ie("$ZodE164",(e,t)=>{t.pattern??(t.pattern=r4),_t.init(e,t)});function K4(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[a]=r;if(!a)return!1;const l=JSON.parse(atob(a));return!("typ"in l&&(l==null?void 0:l.typ)!=="JWT"||!l.alg||t&&(!("alg"in l)||l.alg!==t))}catch{return!1}}const Y4=ie("$ZodJWT",(e,t)=>{_t.init(e,t),e._zod.check=r=>{K4(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Yk=ie("$ZodNumber",(e,t)=>{At.init(e,t),e._zod.pattern=e._zod.bag.pattern??Zk,e._zod.parse=(r,a)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const l=r.value;if(typeof l=="number"&&!Number.isNaN(l)&&Number.isFinite(l))return r;const o=typeof l=="number"?Number.isNaN(l)?"NaN":Number.isFinite(l)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:l,inst:e,...o?{received:o}:{}}),r}}),X4=ie("$ZodNumberFormat",(e,t)=>{h4.init(e,t),Yk.init(e,t)}),J4=ie("$ZodBoolean",(e,t)=>{At.init(e,t),e._zod.pattern=u4,e._zod.parse=(r,a)=>{if(t.coerce)try{r.value=!!r.value}catch{}const l=r.value;return typeof l=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:l,inst:e}),r}}),W4=ie("$ZodUnknown",(e,t)=>{At.init(e,t),e._zod.parse=r=>r}),eM=ie("$ZodNever",(e,t)=>{At.init(e,t),e._zod.parse=(r,a)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function X0(e,t,r){e.issues.length&&t.issues.push(...ds(r,e.issues)),t.value[r]=e.value}const tM=ie("$ZodArray",(e,t)=>{At.init(e,t),e._zod.parse=(r,a)=>{const l=r.value;if(!Array.isArray(l))return r.issues.push({expected:"array",code:"invalid_type",input:l,inst:e}),r;r.value=Array(l.length);const o=[];for(let u=0;u<l.length;u++){const f=l[u],m=t.element._zod.run({value:f,issues:[]},a);m instanceof Promise?o.push(m.then(h=>X0(h,r,u))):X0(m,r,u)}return o.length?Promise.all(o).then(()=>r):r}});function md(e,t,r,a,l){if(e.issues.length){if(l&&!(r in a))return;t.issues.push(...ds(r,e.issues))}e.value===void 0?r in a&&(t.value[r]=void 0):t.value[r]=e.value}function Xk(e){var a,l,o,u;const t=Object.keys(e.shape);for(const f of t)if(!((u=(o=(l=(a=e.shape)==null?void 0:a[f])==null?void 0:l._zod)==null?void 0:o.traits)!=null&&u.has("$ZodType")))throw new Error(`Invalid element at key "${f}": expected a Zod schema`);const r=bD(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Jk(e,t,r,a,l,o){const u=[],f=l.keySet,m=l.catchall._zod,h=m.def.type,v=m.optout==="optional";for(const y in t){if(f.has(y))continue;if(h==="never"){u.push(y);continue}const x=m.run({value:t[y],issues:[]},a);x instanceof Promise?e.push(x.then(b=>md(b,r,y,t,v))):md(x,r,y,t,v)}return u.length&&r.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}const nM=ie("$ZodObject",(e,t)=>{At.init(e,t);const r=Object.getOwnPropertyDescriptor(t,"shape");if(!(r!=null&&r.get)){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const m={...f};return Object.defineProperty(t,"shape",{value:m}),m}})}const a=Ld(()=>Xk(t));st(e._zod,"propValues",()=>{const f=t.shape,m={};for(const h in f){const v=f[h]._zod;if(v.values){m[h]??(m[h]=new Set);for(const y of v.values)m[h].add(y)}}return m});const l=nu,o=t.catchall;let u;e._zod.parse=(f,m)=>{u??(u=a.value);const h=f.value;if(!l(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const v=[],y=u.shape;for(const x of u.keys){const b=y[x],j=b._zod.optout==="optional",k=b._zod.run({value:h[x],issues:[]},m);k instanceof Promise?v.push(k.then(N=>md(N,f,x,h,j))):md(k,f,x,h,j)}return o?Jk(v,h,f,m,a.value,e):v.length?Promise.all(v).then(()=>f):f}}),rM=ie("$ZodObjectJIT",(e,t)=>{nM.init(e,t);const r=e._zod.parse,a=Ld(()=>Xk(t)),l=x=>{var A;const b=new j4(["shape","payload","ctx"]),j=a.value,k=I=>{const q=K0(I);return`shape[${q}]._zod.run({ value: input[${q}], issues: [] }, ctx)`};b.write("const input = payload.value;");const N=Object.create(null);let E=0;for(const I of j.keys)N[I]=`key_${E++}`;b.write("const newResult = {};");for(const I of j.keys){const q=N[I],z=K0(I),$=x[I],Z=((A=$==null?void 0:$._zod)==null?void 0:A.optout)==="optional";b.write(`const ${q} = ${k(I)};`),Z?b.write(`
297
- if (${q}.issues.length) {
298
- if (${z} in input) {
299
- payload.issues = payload.issues.concat(${q}.issues.map(iss => ({
300
- ...iss,
301
- path: iss.path ? [${z}, ...iss.path] : [${z}]
302
- })));
303
- }
304
- }
305
-
306
- if (${q}.value === undefined) {
307
- if (${z} in input) {
308
- newResult[${z}] = undefined;
309
- }
310
- } else {
311
- newResult[${z}] = ${q}.value;
312
- }
313
-
314
- `):b.write(`
315
- if (${q}.issues.length) {
316
- payload.issues = payload.issues.concat(${q}.issues.map(iss => ({
317
- ...iss,
318
- path: iss.path ? [${z}, ...iss.path] : [${z}]
319
- })));
320
- }
321
-
322
- if (${q}.value === undefined) {
323
- if (${z} in input) {
324
- newResult[${z}] = undefined;
325
- }
326
- } else {
327
- newResult[${z}] = ${q}.value;
328
- }
329
-
330
- `)}b.write("payload.value = newResult;"),b.write("return payload;");const R=b.compile();return(I,q)=>R(x,I,q)};let o;const u=nu,f=!Mk.jitless,h=f&&vD.value,v=t.catchall;let y;e._zod.parse=(x,b)=>{y??(y=a.value);const j=x.value;return u(j)?f&&h&&(b==null?void 0:b.async)===!1&&b.jitless!==!0?(o||(o=l(t.shape)),x=o(x,b),v?Jk([],j,x,b,y,e):x):r(x,b):(x.issues.push({expected:"object",code:"invalid_type",input:j,inst:e}),x)}});function J0(e,t,r,a){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const l=e.filter(o=>!cs(o));return l.length===1?(t.value=l[0].value,l[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(u=>ba(u,a,xa())))}),t)}const Wk=ie("$ZodUnion",(e,t)=>{At.init(e,t),st(e._zod,"optin",()=>t.options.some(l=>l._zod.optin==="optional")?"optional":void 0),st(e._zod,"optout",()=>t.options.some(l=>l._zod.optout==="optional")?"optional":void 0),st(e._zod,"values",()=>{if(t.options.every(l=>l._zod.values))return new Set(t.options.flatMap(l=>Array.from(l._zod.values)))}),st(e._zod,"pattern",()=>{if(t.options.every(l=>l._zod.pattern)){const l=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${l.map(o=>bg(o.source)).join("|")})$`)}});const r=t.options.length===1,a=t.options[0]._zod.run;e._zod.parse=(l,o)=>{if(r)return a(l,o);let u=!1;const f=[];for(const m of t.options){const h=m._zod.run({value:l.value,issues:[]},o);if(h instanceof Promise)f.push(h),u=!0;else{if(h.issues.length===0)return h;f.push(h)}}return u?Promise.all(f).then(m=>J0(m,l,e,o)):J0(f,l,e,o)}}),iM=ie("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Wk.init(e,t);const r=e._zod.parse;st(e._zod,"propValues",()=>{const l={};for(const o of t.options){const u=o._zod.propValues;if(!u||Object.keys(u).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[f,m]of Object.entries(u)){l[f]||(l[f]=new Set);for(const h of m)l[f].add(h)}}return l});const a=Ld(()=>{var u;const l=t.options,o=new Map;for(const f of l){const m=(u=f._zod.propValues)==null?void 0:u[t.discriminator];if(!m||m.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(f)}"`);for(const h of m){if(o.has(h))throw new Error(`Duplicate discriminator value "${String(h)}"`);o.set(h,f)}}return o});e._zod.parse=(l,o)=>{const u=l.value;if(!nu(u))return l.issues.push({code:"invalid_type",expected:"object",input:u,inst:e}),l;const f=a.value.get(u==null?void 0:u[t.discriminator]);return f?f._zod.run(l,o):t.unionFallback?r(l,o):(l.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:u,path:[t.discriminator],inst:e}),l)}}),aM=ie("$ZodIntersection",(e,t)=>{At.init(e,t),e._zod.parse=(r,a)=>{const l=r.value,o=t.left._zod.run({value:l,issues:[]},a),u=t.right._zod.run({value:l,issues:[]},a);return o instanceof Promise||u instanceof Promise?Promise.all([o,u]).then(([m,h])=>W0(r,m,h)):W0(r,o,u)}});function Ap(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(_s(e)&&_s(t)){const r=Object.keys(t),a=Object.keys(e).filter(o=>r.indexOf(o)!==-1),l={...e,...t};for(const o of a){const u=Ap(e[o],t[o]);if(!u.valid)return{valid:!1,mergeErrorPath:[o,...u.mergeErrorPath]};l[o]=u.data}return{valid:!0,data:l}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let a=0;a<e.length;a++){const l=e[a],o=t[a],u=Ap(l,o);if(!u.valid)return{valid:!1,mergeErrorPath:[a,...u.mergeErrorPath]};r.push(u.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function W0(e,t,r){const a=new Map;let l;for(const f of t.issues)if(f.code==="unrecognized_keys"){l??(l=f);for(const m of f.keys)a.has(m)||a.set(m,{}),a.get(m).l=!0}else e.issues.push(f);for(const f of r.issues)if(f.code==="unrecognized_keys")for(const m of f.keys)a.has(m)||a.set(m,{}),a.get(m).r=!0;else e.issues.push(f);const o=[...a].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(o.length&&l&&e.issues.push({...l,keys:o}),cs(e))return e;const u=Ap(t.value,r.value);if(!u.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return e.value=u.data,e}const lM=ie("$ZodRecord",(e,t)=>{At.init(e,t),e._zod.parse=(r,a)=>{const l=r.value;if(!_s(l))return r.issues.push({expected:"record",code:"invalid_type",input:l,inst:e}),r;const o=[],u=t.keyType._zod.values;if(u){r.value={};const f=new Set;for(const h of u)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){f.add(typeof h=="number"?h.toString():h);const v=t.valueType._zod.run({value:l[h],issues:[]},a);v instanceof Promise?o.push(v.then(y=>{y.issues.length&&r.issues.push(...ds(h,y.issues)),r.value[h]=y.value})):(v.issues.length&&r.issues.push(...ds(h,v.issues)),r.value[h]=v.value)}let m;for(const h in l)f.has(h)||(m=m??[],m.push(h));m&&m.length>0&&r.issues.push({code:"unrecognized_keys",input:l,inst:e,keys:m})}else{r.value={};for(const f of Reflect.ownKeys(l)){if(f==="__proto__")continue;let m=t.keyType._zod.run({value:f,issues:[]},a);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&Zk.test(f)&&m.issues.length){const y=t.keyType._zod.run({value:Number(f),issues:[]},a);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(m=y)}if(m.issues.length){t.mode==="loose"?r.value[f]=l[f]:r.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(y=>ba(y,a,xa())),input:f,path:[f],inst:e});continue}const v=t.valueType._zod.run({value:l[f],issues:[]},a);v instanceof Promise?o.push(v.then(y=>{y.issues.length&&r.issues.push(...ds(f,y.issues)),r.value[m.value]=y.value})):(v.issues.length&&r.issues.push(...ds(f,v.issues)),r.value[m.value]=v.value)}}return o.length?Promise.all(o).then(()=>r):r}}),sM=ie("$ZodEnum",(e,t)=>{At.init(e,t);const r=Lk(t.entries),a=new Set(r);e._zod.values=a,e._zod.pattern=new RegExp(`^(${r.filter(l=>xD.has(typeof l)).map(l=>typeof l=="string"?As(l):l.toString()).join("|")})$`),e._zod.parse=(l,o)=>{const u=l.value;return a.has(u)||l.issues.push({code:"invalid_value",values:r,input:u,inst:e}),l}}),oM=ie("$ZodLiteral",(e,t)=>{if(At.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(a=>typeof a=="string"?As(a):a?As(a.toString()):String(a)).join("|")})$`),e._zod.parse=(a,l)=>{const o=a.value;return r.has(o)||a.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),a}}),uM=ie("$ZodTransform",(e,t)=>{At.init(e,t),e._zod.parse=(r,a)=>{if(a.direction==="backward")throw new Dk(e.constructor.name);const l=t.transform(r.value,r);if(a.async)return(l instanceof Promise?l:Promise.resolve(l)).then(u=>(r.value=u,r));if(l instanceof Promise)throw new ms;return r.value=l,r}});function e1(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const ej=ie("$ZodOptional",(e,t)=>{At.init(e,t),e._zod.optin="optional",e._zod.optout="optional",st(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),st(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${bg(r.source)})?$`):void 0}),e._zod.parse=(r,a)=>{if(t.innerType._zod.optin==="optional"){const l=t.innerType._zod.run(r,a);return l instanceof Promise?l.then(o=>e1(o,r.value)):e1(l,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,a)}}),cM=ie("$ZodExactOptional",(e,t)=>{ej.init(e,t),st(e._zod,"values",()=>t.innerType._zod.values),st(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,a)=>t.innerType._zod.run(r,a)}),dM=ie("$ZodNullable",(e,t)=>{At.init(e,t),st(e._zod,"optin",()=>t.innerType._zod.optin),st(e._zod,"optout",()=>t.innerType._zod.optout),st(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${bg(r.source)}|null)$`):void 0}),st(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,a)=>r.value===null?r:t.innerType._zod.run(r,a)}),fM=ie("$ZodDefault",(e,t)=>{At.init(e,t),e._zod.optin="optional",st(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,a)=>{if(a.direction==="backward")return t.innerType._zod.run(r,a);if(r.value===void 0)return r.value=t.defaultValue,r;const l=t.innerType._zod.run(r,a);return l instanceof Promise?l.then(o=>t1(o,t)):t1(l,t)}});function t1(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const hM=ie("$ZodPrefault",(e,t)=>{At.init(e,t),e._zod.optin="optional",st(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,a)=>(a.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,a))}),mM=ie("$ZodNonOptional",(e,t)=>{At.init(e,t),st(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(a=>a!==void 0)):void 0}),e._zod.parse=(r,a)=>{const l=t.innerType._zod.run(r,a);return l instanceof Promise?l.then(o=>n1(o,e)):n1(l,e)}});function n1(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const pM=ie("$ZodCatch",(e,t)=>{At.init(e,t),st(e._zod,"optin",()=>t.innerType._zod.optin),st(e._zod,"optout",()=>t.innerType._zod.optout),st(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,a)=>{if(a.direction==="backward")return t.innerType._zod.run(r,a);const l=t.innerType._zod.run(r,a);return l instanceof Promise?l.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(u=>ba(u,a,xa()))},input:r.value}),r.issues=[]),r)):(r.value=l.value,l.issues.length&&(r.value=t.catchValue({...r,error:{issues:l.issues.map(o=>ba(o,a,xa()))},input:r.value}),r.issues=[]),r)}}),gM=ie("$ZodPipe",(e,t)=>{At.init(e,t),st(e._zod,"values",()=>t.in._zod.values),st(e._zod,"optin",()=>t.in._zod.optin),st(e._zod,"optout",()=>t.out._zod.optout),st(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,a)=>{if(a.direction==="backward"){const o=t.out._zod.run(r,a);return o instanceof Promise?o.then(u=>Qc(u,t.in,a)):Qc(o,t.in,a)}const l=t.in._zod.run(r,a);return l instanceof Promise?l.then(o=>Qc(o,t.out,a)):Qc(l,t.out,a)}});function Qc(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const yM=ie("$ZodReadonly",(e,t)=>{At.init(e,t),st(e._zod,"propValues",()=>t.innerType._zod.propValues),st(e._zod,"values",()=>t.innerType._zod.values),st(e._zod,"optin",()=>{var r,a;return(a=(r=t.innerType)==null?void 0:r._zod)==null?void 0:a.optin}),st(e._zod,"optout",()=>{var r,a;return(a=(r=t.innerType)==null?void 0:r._zod)==null?void 0:a.optout}),e._zod.parse=(r,a)=>{if(a.direction==="backward")return t.innerType._zod.run(r,a);const l=t.innerType._zod.run(r,a);return l instanceof Promise?l.then(r1):r1(l)}});function r1(e){return e.value=Object.freeze(e.value),e}const vM=ie("$ZodCustom",(e,t)=>{Bn.init(e,t),At.init(e,t),e._zod.parse=(r,a)=>r,e._zod.check=r=>{const a=r.value,l=t.fn(a);if(l instanceof Promise)return l.then(o=>i1(o,r,a,e));i1(l,r,a,e)}});function i1(e,t,r,a){if(!e){const l={code:"custom",input:r,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(l.params=a._zod.def.params),t.issues.push(ru(l))}}var a1;class xM{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const a=r[0];return this._map.set(t,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const a={...this.get(r)??{}};delete a.id;const l={...a,...this._map.get(t)};return Object.keys(l).length?l:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function bM(){return new xM}(a1=globalThis).__zod_globalRegistry??(a1.__zod_globalRegistry=bM());const Ho=globalThis.__zod_globalRegistry;function SM(e,t){return new e({type:"string",...Ce(t)})}function wM(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ce(t)})}function l1(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ce(t)})}function kM(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ce(t)})}function jM(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ce(t)})}function EM(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ce(t)})}function CM(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ce(t)})}function NM(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ce(t)})}function _M(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ce(t)})}function AM(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ce(t)})}function TM(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ce(t)})}function zM(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ce(t)})}function RM(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ce(t)})}function OM(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ce(t)})}function DM(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ce(t)})}function MM(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ce(t)})}function LM(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ce(t)})}function UM(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ce(t)})}function IM(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ce(t)})}function BM(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ce(t)})}function PM(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ce(t)})}function $M(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ce(t)})}function qM(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ce(t)})}function FM(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ce(t)})}function HM(e,t){return new e({type:"string",format:"date",check:"string_format",...Ce(t)})}function ZM(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ce(t)})}function VM(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ce(t)})}function QM(e,t){return new e({type:"number",checks:[],...Ce(t)})}function GM(e,t){return new e({type:"number",coerce:!0,checks:[],...Ce(t)})}function KM(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ce(t)})}function YM(e,t){return new e({type:"boolean",...Ce(t)})}function XM(e){return new e({type:"unknown"})}function JM(e,t){return new e({type:"never",...Ce(t)})}function s1(e,t){return new Qk({check:"less_than",...Ce(t),value:e,inclusive:!1})}function Am(e,t){return new Qk({check:"less_than",...Ce(t),value:e,inclusive:!0})}function o1(e,t){return new Gk({check:"greater_than",...Ce(t),value:e,inclusive:!1})}function Tm(e,t){return new Gk({check:"greater_than",...Ce(t),value:e,inclusive:!0})}function u1(e,t){return new f4({check:"multiple_of",...Ce(t),value:e})}function tj(e,t){return new m4({check:"max_length",...Ce(t),maximum:e})}function pd(e,t){return new p4({check:"min_length",...Ce(t),minimum:e})}function nj(e,t){return new g4({check:"length_equals",...Ce(t),length:e})}function WM(e,t){return new y4({check:"string_format",format:"regex",...Ce(t),pattern:e})}function e3(e){return new v4({check:"string_format",format:"lowercase",...Ce(e)})}function t3(e){return new x4({check:"string_format",format:"uppercase",...Ce(e)})}function n3(e,t){return new b4({check:"string_format",format:"includes",...Ce(t),includes:e})}function r3(e,t){return new S4({check:"string_format",format:"starts_with",...Ce(t),prefix:e})}function i3(e,t){return new w4({check:"string_format",format:"ends_with",...Ce(t),suffix:e})}function Is(e){return new k4({check:"overwrite",tx:e})}function a3(e){return Is(t=>t.normalize(e))}function l3(){return Is(e=>e.trim())}function s3(){return Is(e=>e.toLowerCase())}function o3(){return Is(e=>e.toUpperCase())}function u3(){return Is(e=>yD(e))}function c3(e,t,r){return new e({type:"array",element:t,...Ce(r)})}function d3(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Ce(r)})}function f3(e){const t=h3(r=>(r.addIssue=a=>{if(typeof a=="string")r.issues.push(ru(a,r.value,t._zod.def));else{const l=a;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=r.value),l.inst??(l.inst=t),l.continue??(l.continue=!t._zod.def.abort),r.issues.push(ru(l))}},e(r.value,r)));return t}function h3(e,t){const r=new Bn({check:"custom",...Ce(t)});return r._zod.check=e,r}function rj(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Ho,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function Ft(e,t,r={path:[],schemaPath:[]}){var v,y;var a;const l=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;const u={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,u);const f=(y=(v=e._zod).toJSONSchema)==null?void 0:y.call(v);if(f)u.schema=f;else{const x={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,u.schema,x);else{const j=u.schema,k=t.processors[l.type];if(!k)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${l.type}`);k(e,t,j,x)}const b=e._zod.parent;b&&(u.ref||(u.ref=b),Ft(b,t,x),t.seen.get(b).isParent=!0)}const m=t.metadataRegistry.get(e);return m&&Object.assign(u.schema,m),t.io==="input"&&yn(e)&&(delete u.schema.examples,delete u.schema.default),t.io==="input"&&u.schema._prefault&&((a=u.schema).default??(a.default=u.schema._prefault)),delete u.schema._prefault,t.seen.get(e).schema}function ij(e,t){var u,f,m,h;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=new Map;for(const v of e.seen.entries()){const y=(u=e.metadataRegistry.get(v[0]))==null?void 0:u.id;if(y){const x=a.get(y);if(x&&x!==v[0])throw new Error(`Duplicate schema id "${y}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(y,v[0])}}const l=v=>{var k;const y=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const N=(k=e.external.registry.get(v[0]))==null?void 0:k.id,E=e.external.uri??(A=>A);if(N)return{ref:E(N)};const R=v[1].defId??v[1].schema.id??`schema${e.counter++}`;return v[1].defId=R,{defId:R,ref:`${E("__shared")}#/${y}/${R}`}}if(v[1]===r)return{ref:"#"};const b=`#/${y}/`,j=v[1].schema.id??`__schema${e.counter++}`;return{defId:j,ref:b+j}},o=v=>{if(v[1].schema.$ref)return;const y=v[1],{ref:x,defId:b}=l(v);y.def={...y.schema},b&&(y.defId=b);const j=y.schema;for(const k in j)delete j[k];j.$ref=x};if(e.cycles==="throw")for(const v of e.seen.entries()){const y=v[1];if(y.cycle)throw new Error(`Cycle detected: #/${(f=y.cycle)==null?void 0:f.join("/")}/<root>
331
-
332
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const v of e.seen.entries()){const y=v[1];if(t===v[0]){o(v);continue}if(e.external){const b=(m=e.external.registry.get(v[0]))==null?void 0:m.id;if(t!==v[0]&&b){o(v);continue}}if((h=e.metadataRegistry.get(v[0]))==null?void 0:h.id){o(v);continue}if(y.cycle){o(v);continue}if(y.count>1&&e.reused==="ref"){o(v);continue}}}function aj(e,t){var u,f,m;const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=h=>{const v=e.seen.get(h);if(v.ref===null)return;const y=v.def??v.schema,x={...y},b=v.ref;if(v.ref=null,b){a(b);const k=e.seen.get(b),N=k.schema;if(N.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(y.allOf=y.allOf??[],y.allOf.push(N)):Object.assign(y,N),Object.assign(y,x),h._zod.parent===b)for(const R in y)R==="$ref"||R==="allOf"||R in x||delete y[R];if(N.$ref&&k.def)for(const R in y)R==="$ref"||R==="allOf"||R in k.def&&JSON.stringify(y[R])===JSON.stringify(k.def[R])&&delete y[R]}const j=h._zod.parent;if(j&&j!==b){a(j);const k=e.seen.get(j);if(k!=null&&k.schema.$ref&&(y.$ref=k.schema.$ref,k.def))for(const N in y)N==="$ref"||N==="allOf"||N in k.def&&JSON.stringify(y[N])===JSON.stringify(k.def[N])&&delete y[N]}e.override({zodSchema:h,jsonSchema:y,path:v.path??[]})};for(const h of[...e.seen.entries()].reverse())a(h[0]);const l={};if(e.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?l.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?l.$schema="http://json-schema.org/draft-04/schema#":e.target,(u=e.external)!=null&&u.uri){const h=(f=e.external.registry.get(t))==null?void 0:f.id;if(!h)throw new Error("Schema is missing an `id` property");l.$id=e.external.uri(h)}Object.assign(l,r.def??r.schema);const o=((m=e.external)==null?void 0:m.defs)??{};for(const h of e.seen.entries()){const v=h[1];v.def&&v.defId&&(o[v.defId]=v.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?l.$defs=o:l.definitions=o);try{const h=JSON.parse(JSON.stringify(l));return Object.defineProperty(h,"~standard",{value:{...t["~standard"],jsonSchema:{input:gd(t,"input",e.processors),output:gd(t,"output",e.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function yn(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return yn(a.element,r);if(a.type==="set")return yn(a.valueType,r);if(a.type==="lazy")return yn(a.getter(),r);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return yn(a.innerType,r);if(a.type==="intersection")return yn(a.left,r)||yn(a.right,r);if(a.type==="record"||a.type==="map")return yn(a.keyType,r)||yn(a.valueType,r);if(a.type==="pipe")return yn(a.in,r)||yn(a.out,r);if(a.type==="object"){for(const l in a.shape)if(yn(a.shape[l],r))return!0;return!1}if(a.type==="union"){for(const l of a.options)if(yn(l,r))return!0;return!1}if(a.type==="tuple"){for(const l of a.items)if(yn(l,r))return!0;return!!(a.rest&&yn(a.rest,r))}return!1}const m3=(e,t={})=>r=>{const a=rj({...r,processors:t});return Ft(e,a),ij(a,e),aj(a,e)},gd=(e,t,r={})=>a=>{const{libraryOptions:l,target:o}=a??{},u=rj({...l??{},target:o,io:t,processors:r});return Ft(e,u),ij(u,e),aj(u,e)},p3={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},g3=(e,t,r,a)=>{const l=r;l.type="string";const{minimum:o,maximum:u,format:f,patterns:m,contentEncoding:h}=e._zod.bag;if(typeof o=="number"&&(l.minLength=o),typeof u=="number"&&(l.maxLength=u),f&&(l.format=p3[f]??f,l.format===""&&delete l.format,f==="time"&&delete l.format),h&&(l.contentEncoding=h),m&&m.size>0){const v=[...m];v.length===1?l.pattern=v[0].source:v.length>1&&(l.allOf=[...v.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},y3=(e,t,r,a)=>{const l=r,{minimum:o,maximum:u,format:f,multipleOf:m,exclusiveMaximum:h,exclusiveMinimum:v}=e._zod.bag;typeof f=="string"&&f.includes("int")?l.type="integer":l.type="number",typeof v=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(l.minimum=v,l.exclusiveMinimum=!0):l.exclusiveMinimum=v),typeof o=="number"&&(l.minimum=o,typeof v=="number"&&t.target!=="draft-04"&&(v>=o?delete l.minimum:delete l.exclusiveMinimum)),typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(l.maximum=h,l.exclusiveMaximum=!0):l.exclusiveMaximum=h),typeof u=="number"&&(l.maximum=u,typeof h=="number"&&t.target!=="draft-04"&&(h<=u?delete l.maximum:delete l.exclusiveMaximum)),typeof m=="number"&&(l.multipleOf=m)},v3=(e,t,r,a)=>{r.type="boolean"},x3=(e,t,r,a)=>{r.not={}},b3=(e,t,r,a)=>{},S3=(e,t,r,a)=>{const l=e._zod.def,o=Lk(l.entries);o.every(u=>typeof u=="number")&&(r.type="number"),o.every(u=>typeof u=="string")&&(r.type="string"),r.enum=o},w3=(e,t,r,a)=>{const l=e._zod.def,o=[];for(const u of l.values)if(u===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof u=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(u))}else o.push(u);if(o.length!==0)if(o.length===1){const u=o[0];r.type=u===null?"null":typeof u,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[u]:r.const=u}else o.every(u=>typeof u=="number")&&(r.type="number"),o.every(u=>typeof u=="string")&&(r.type="string"),o.every(u=>typeof u=="boolean")&&(r.type="boolean"),o.every(u=>u===null)&&(r.type="null"),r.enum=o},k3=(e,t,r,a)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},j3=(e,t,r,a)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},E3=(e,t,r,a)=>{const l=r,o=e._zod.def,{minimum:u,maximum:f}=e._zod.bag;typeof u=="number"&&(l.minItems=u),typeof f=="number"&&(l.maxItems=f),l.type="array",l.items=Ft(o.element,t,{...a,path:[...a.path,"items"]})},C3=(e,t,r,a)=>{var h;const l=r,o=e._zod.def;l.type="object",l.properties={};const u=o.shape;for(const v in u)l.properties[v]=Ft(u[v],t,{...a,path:[...a.path,"properties",v]});const f=new Set(Object.keys(u)),m=new Set([...f].filter(v=>{const y=o.shape[v]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));m.size>0&&(l.required=Array.from(m)),((h=o.catchall)==null?void 0:h._zod.def.type)==="never"?l.additionalProperties=!1:o.catchall?o.catchall&&(l.additionalProperties=Ft(o.catchall,t,{...a,path:[...a.path,"additionalProperties"]})):t.io==="output"&&(l.additionalProperties=!1)},N3=(e,t,r,a)=>{const l=e._zod.def,o=l.inclusive===!1,u=l.options.map((f,m)=>Ft(f,t,{...a,path:[...a.path,o?"oneOf":"anyOf",m]}));o?r.oneOf=u:r.anyOf=u},_3=(e,t,r,a)=>{const l=e._zod.def,o=Ft(l.left,t,{...a,path:[...a.path,"allOf",0]}),u=Ft(l.right,t,{...a,path:[...a.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,m=[...f(o)?o.allOf:[o],...f(u)?u.allOf:[u]];r.allOf=m},A3=(e,t,r,a)=>{const l=r,o=e._zod.def;l.type="object";const u=o.keyType,f=u._zod.bag,m=f==null?void 0:f.patterns;if(o.mode==="loose"&&m&&m.size>0){const v=Ft(o.valueType,t,{...a,path:[...a.path,"patternProperties","*"]});l.patternProperties={};for(const y of m)l.patternProperties[y.source]=v}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(l.propertyNames=Ft(o.keyType,t,{...a,path:[...a.path,"propertyNames"]})),l.additionalProperties=Ft(o.valueType,t,{...a,path:[...a.path,"additionalProperties"]});const h=u._zod.values;if(h){const v=[...h].filter(y=>typeof y=="string"||typeof y=="number");v.length>0&&(l.required=v)}},T3=(e,t,r,a)=>{const l=e._zod.def,o=Ft(l.innerType,t,a),u=t.seen.get(e);t.target==="openapi-3.0"?(u.ref=l.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},z3=(e,t,r,a)=>{const l=e._zod.def;Ft(l.innerType,t,a);const o=t.seen.get(e);o.ref=l.innerType},R3=(e,t,r,a)=>{const l=e._zod.def;Ft(l.innerType,t,a);const o=t.seen.get(e);o.ref=l.innerType,r.default=JSON.parse(JSON.stringify(l.defaultValue))},O3=(e,t,r,a)=>{const l=e._zod.def;Ft(l.innerType,t,a);const o=t.seen.get(e);o.ref=l.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(l.defaultValue)))},D3=(e,t,r,a)=>{const l=e._zod.def;Ft(l.innerType,t,a);const o=t.seen.get(e);o.ref=l.innerType;let u;try{u=l.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=u},M3=(e,t,r,a)=>{const l=e._zod.def,o=t.io==="input"?l.in._zod.def.type==="transform"?l.out:l.in:l.out;Ft(o,t,a);const u=t.seen.get(e);u.ref=o},L3=(e,t,r,a)=>{const l=e._zod.def;Ft(l.innerType,t,a);const o=t.seen.get(e);o.ref=l.innerType,r.readOnly=!0},lj=(e,t,r,a)=>{const l=e._zod.def;Ft(l.innerType,t,a);const o=t.seen.get(e);o.ref=l.innerType},U3=ie("ZodISODateTime",(e,t)=>{U4.init(e,t),zt.init(e,t)});function I3(e){return FM(U3,e)}const B3=ie("ZodISODate",(e,t)=>{I4.init(e,t),zt.init(e,t)});function P3(e){return HM(B3,e)}const $3=ie("ZodISOTime",(e,t)=>{B4.init(e,t),zt.init(e,t)});function q3(e){return ZM($3,e)}const F3=ie("ZodISODuration",(e,t)=>{P4.init(e,t),zt.init(e,t)});function H3(e){return VM(F3,e)}const Z3=(e,t)=>{Pk.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>TD(e,r)},flatten:{value:r=>AD(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,_p,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,_p,2)}},isEmpty:{get(){return e.issues.length===0}}})},vr=ie("ZodError",Z3,{Parent:Error}),V3=wg(vr),Q3=kg(vr),G3=Ud(vr),K3=Id(vr),Y3=OD(vr),X3=DD(vr),J3=MD(vr),W3=LD(vr),e5=UD(vr),t5=ID(vr),n5=BD(vr),r5=PD(vr),Tt=ie("ZodType",(e,t)=>(At.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:gd(e,"input"),output:gd(e,"output")}}),e.toJSONSchema=m3(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(ka(t,{checks:[...t.checks??[],...r.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0}),e.with=e.check,e.clone=(r,a)=>ja(e,r,a),e.brand=()=>e,e.register=((r,a)=>(r.add(e,a),e)),e.parse=(r,a)=>V3(e,r,a,{callee:e.parse}),e.safeParse=(r,a)=>G3(e,r,a),e.parseAsync=async(r,a)=>Q3(e,r,a,{callee:e.parseAsync}),e.safeParseAsync=async(r,a)=>K3(e,r,a),e.spa=e.safeParseAsync,e.encode=(r,a)=>Y3(e,r,a),e.decode=(r,a)=>X3(e,r,a),e.encodeAsync=async(r,a)=>J3(e,r,a),e.decodeAsync=async(r,a)=>W3(e,r,a),e.safeEncode=(r,a)=>e5(e,r,a),e.safeDecode=(r,a)=>t5(e,r,a),e.safeEncodeAsync=async(r,a)=>n5(e,r,a),e.safeDecodeAsync=async(r,a)=>r5(e,r,a),e.refine=(r,a)=>e.check(Y5(r,a)),e.superRefine=r=>e.check(X5(r)),e.overwrite=r=>e.check(Is(r)),e.optional=()=>f1(e),e.exactOptional=()=>U5(e),e.nullable=()=>h1(e),e.nullish=()=>f1(h1(e)),e.nonoptional=r=>F5(e,r),e.array=()=>Xn(e),e.or=r=>uj([e,r]),e.and=r=>z5(e,r),e.transform=r=>m1(e,M5(r)),e.default=r=>P5(e,r),e.prefault=r=>q5(e,r),e.catch=r=>Z5(e,r),e.pipe=r=>m1(e,r),e.readonly=()=>G5(e),e.describe=r=>{const a=e.clone();return Ho.add(a,{description:r}),a},Object.defineProperty(e,"description",{get(){var r;return(r=Ho.get(e))==null?void 0:r.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Ho.get(e);const a=e.clone();return Ho.add(a,r[0]),a},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),sj=ie("_ZodString",(e,t)=>{jg.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(a,l,o)=>g3(e,a,l);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...a)=>e.check(WM(...a)),e.includes=(...a)=>e.check(n3(...a)),e.startsWith=(...a)=>e.check(r3(...a)),e.endsWith=(...a)=>e.check(i3(...a)),e.min=(...a)=>e.check(pd(...a)),e.max=(...a)=>e.check(tj(...a)),e.length=(...a)=>e.check(nj(...a)),e.nonempty=(...a)=>e.check(pd(1,...a)),e.lowercase=a=>e.check(e3(a)),e.uppercase=a=>e.check(t3(a)),e.trim=()=>e.check(l3()),e.normalize=(...a)=>e.check(a3(...a)),e.toLowerCase=()=>e.check(s3()),e.toUpperCase=()=>e.check(o3()),e.slugify=()=>e.check(u3())}),i5=ie("ZodString",(e,t)=>{jg.init(e,t),sj.init(e,t),e.email=r=>e.check(wM(a5,r)),e.url=r=>e.check(NM(l5,r)),e.jwt=r=>e.check(qM(S5,r)),e.emoji=r=>e.check(_M(s5,r)),e.guid=r=>e.check(l1(c1,r)),e.uuid=r=>e.check(kM(Gc,r)),e.uuidv4=r=>e.check(jM(Gc,r)),e.uuidv6=r=>e.check(EM(Gc,r)),e.uuidv7=r=>e.check(CM(Gc,r)),e.nanoid=r=>e.check(AM(o5,r)),e.guid=r=>e.check(l1(c1,r)),e.cuid=r=>e.check(TM(u5,r)),e.cuid2=r=>e.check(zM(c5,r)),e.ulid=r=>e.check(RM(d5,r)),e.base64=r=>e.check(BM(v5,r)),e.base64url=r=>e.check(PM(x5,r)),e.xid=r=>e.check(OM(f5,r)),e.ksuid=r=>e.check(DM(h5,r)),e.ipv4=r=>e.check(MM(m5,r)),e.ipv6=r=>e.check(LM(p5,r)),e.cidrv4=r=>e.check(UM(g5,r)),e.cidrv6=r=>e.check(IM(y5,r)),e.e164=r=>e.check($M(b5,r)),e.datetime=r=>e.check(I3(r)),e.date=r=>e.check(P3(r)),e.time=r=>e.check(q3(r)),e.duration=r=>e.check(H3(r))});function O(e){return SM(i5,e)}const zt=ie("ZodStringFormat",(e,t)=>{_t.init(e,t),sj.init(e,t)}),a5=ie("ZodEmail",(e,t)=>{_4.init(e,t),zt.init(e,t)}),c1=ie("ZodGUID",(e,t)=>{C4.init(e,t),zt.init(e,t)}),Gc=ie("ZodUUID",(e,t)=>{N4.init(e,t),zt.init(e,t)}),l5=ie("ZodURL",(e,t)=>{A4.init(e,t),zt.init(e,t)}),s5=ie("ZodEmoji",(e,t)=>{T4.init(e,t),zt.init(e,t)}),o5=ie("ZodNanoID",(e,t)=>{z4.init(e,t),zt.init(e,t)}),u5=ie("ZodCUID",(e,t)=>{R4.init(e,t),zt.init(e,t)}),c5=ie("ZodCUID2",(e,t)=>{O4.init(e,t),zt.init(e,t)}),d5=ie("ZodULID",(e,t)=>{D4.init(e,t),zt.init(e,t)}),f5=ie("ZodXID",(e,t)=>{M4.init(e,t),zt.init(e,t)}),h5=ie("ZodKSUID",(e,t)=>{L4.init(e,t),zt.init(e,t)}),m5=ie("ZodIPv4",(e,t)=>{$4.init(e,t),zt.init(e,t)}),p5=ie("ZodIPv6",(e,t)=>{q4.init(e,t),zt.init(e,t)}),g5=ie("ZodCIDRv4",(e,t)=>{F4.init(e,t),zt.init(e,t)}),y5=ie("ZodCIDRv6",(e,t)=>{H4.init(e,t),zt.init(e,t)}),v5=ie("ZodBase64",(e,t)=>{Z4.init(e,t),zt.init(e,t)}),x5=ie("ZodBase64URL",(e,t)=>{Q4.init(e,t),zt.init(e,t)}),b5=ie("ZodE164",(e,t)=>{G4.init(e,t),zt.init(e,t)}),S5=ie("ZodJWT",(e,t)=>{Y4.init(e,t),zt.init(e,t)}),Eg=ie("ZodNumber",(e,t)=>{Yk.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(a,l,o)=>y3(e,a,l),e.gt=(a,l)=>e.check(o1(a,l)),e.gte=(a,l)=>e.check(Tm(a,l)),e.min=(a,l)=>e.check(Tm(a,l)),e.lt=(a,l)=>e.check(s1(a,l)),e.lte=(a,l)=>e.check(Am(a,l)),e.max=(a,l)=>e.check(Am(a,l)),e.int=a=>e.check(d1(a)),e.safe=a=>e.check(d1(a)),e.positive=a=>e.check(o1(0,a)),e.nonnegative=a=>e.check(Tm(0,a)),e.negative=a=>e.check(s1(0,a)),e.nonpositive=a=>e.check(Am(0,a)),e.multipleOf=(a,l)=>e.check(u1(a,l)),e.step=(a,l)=>e.check(u1(a,l)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function We(e){return QM(Eg,e)}const w5=ie("ZodNumberFormat",(e,t)=>{X4.init(e,t),Eg.init(e,t)});function d1(e){return KM(w5,e)}const k5=ie("ZodBoolean",(e,t)=>{J4.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>v3(e,r,a)});function gu(e){return YM(k5,e)}const j5=ie("ZodUnknown",(e,t)=>{W4.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>b3()});function St(){return XM(j5)}const E5=ie("ZodNever",(e,t)=>{eM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>x3(e,r,a)});function C5(e){return JM(E5,e)}const N5=ie("ZodArray",(e,t)=>{tM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>E3(e,r,a,l),e.element=t.element,e.min=(r,a)=>e.check(pd(r,a)),e.nonempty=r=>e.check(pd(1,r)),e.max=(r,a)=>e.check(tj(r,a)),e.length=(r,a)=>e.check(nj(r,a)),e.unwrap=()=>e.element});function Xn(e,t){return c3(N5,e,t)}const _5=ie("ZodObject",(e,t)=>{rM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>C3(e,r,a,l),st(e,"shape",()=>t.shape),e.keyof=()=>tt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:St()}),e.loose=()=>e.clone({...e._zod.def,catchall:St()}),e.strict=()=>e.clone({...e._zod.def,catchall:C5()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>jD(e,r),e.safeExtend=r=>ED(e,r),e.merge=r=>CD(e,r),e.pick=r=>wD(e,r),e.omit=r=>kD(e,r),e.partial=(...r)=>ND(dj,e,r[0]),e.required=(...r)=>_D(fj,e,r[0])});function he(e,t){const r={type:"object",shape:e??{},...Ce(t)};return new _5(r)}const oj=ie("ZodUnion",(e,t)=>{Wk.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>N3(e,r,a,l),e.options=t.options});function uj(e,t){return new oj({type:"union",options:e,...Ce(t)})}const A5=ie("ZodDiscriminatedUnion",(e,t)=>{oj.init(e,t),iM.init(e,t)});function cj(e,t,r){return new A5({type:"union",options:t,discriminator:e,...Ce(r)})}const T5=ie("ZodIntersection",(e,t)=>{aM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>_3(e,r,a,l)});function z5(e,t){return new T5({type:"intersection",left:e,right:t})}const R5=ie("ZodRecord",(e,t)=>{lM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>A3(e,r,a,l),e.keyType=t.keyType,e.valueType=t.valueType});function Ht(e,t,r){return new R5({type:"record",keyType:e,valueType:t,...Ce(r)})}const Tp=ie("ZodEnum",(e,t)=>{sM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(a,l,o)=>S3(e,a,l),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(a,l)=>{const o={};for(const u of a)if(r.has(u))o[u]=t.entries[u];else throw new Error(`Key ${u} not found in enum`);return new Tp({...t,checks:[],...Ce(l),entries:o})},e.exclude=(a,l)=>{const o={...t.entries};for(const u of a)if(r.has(u))delete o[u];else throw new Error(`Key ${u} not found in enum`);return new Tp({...t,checks:[],...Ce(l),entries:o})}});function tt(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new Tp({type:"enum",entries:r,...Ce(t)})}const O5=ie("ZodLiteral",(e,t)=>{oM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>w3(e,r,a),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Yn(e,t){return new O5({type:"literal",values:Array.isArray(e)?e:[e],...Ce(t)})}const D5=ie("ZodTransform",(e,t)=>{uM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>j3(e,r),e._zod.parse=(r,a)=>{if(a.direction==="backward")throw new Dk(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(ru(o,r.value,t));else{const u=o;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=r.value),u.inst??(u.inst=e),r.issues.push(ru(u))}};const l=t.transform(r.value,r);return l instanceof Promise?l.then(o=>(r.value=o,r)):(r.value=l,r)}});function M5(e){return new D5({type:"transform",transform:e})}const dj=ie("ZodOptional",(e,t)=>{ej.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>lj(e,r,a,l),e.unwrap=()=>e._zod.def.innerType});function f1(e){return new dj({type:"optional",innerType:e})}const L5=ie("ZodExactOptional",(e,t)=>{cM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>lj(e,r,a,l),e.unwrap=()=>e._zod.def.innerType});function U5(e){return new L5({type:"optional",innerType:e})}const I5=ie("ZodNullable",(e,t)=>{dM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>T3(e,r,a,l),e.unwrap=()=>e._zod.def.innerType});function h1(e){return new I5({type:"nullable",innerType:e})}const B5=ie("ZodDefault",(e,t)=>{fM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>R3(e,r,a,l),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function P5(e,t){return new B5({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ik(t)}})}const $5=ie("ZodPrefault",(e,t)=>{hM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>O3(e,r,a,l),e.unwrap=()=>e._zod.def.innerType});function q5(e,t){return new $5({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ik(t)}})}const fj=ie("ZodNonOptional",(e,t)=>{mM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>z3(e,r,a,l),e.unwrap=()=>e._zod.def.innerType});function F5(e,t){return new fj({type:"nonoptional",innerType:e,...Ce(t)})}const H5=ie("ZodCatch",(e,t)=>{pM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>D3(e,r,a,l),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Z5(e,t){return new H5({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const V5=ie("ZodPipe",(e,t)=>{gM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>M3(e,r,a,l),e.in=t.in,e.out=t.out});function m1(e,t){return new V5({type:"pipe",in:e,out:t})}const Q5=ie("ZodReadonly",(e,t)=>{yM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>L3(e,r,a,l),e.unwrap=()=>e._zod.def.innerType});function G5(e){return new Q5({type:"readonly",innerType:e})}const K5=ie("ZodCustom",(e,t)=>{vM.init(e,t),Tt.init(e,t),e._zod.processJSONSchema=(r,a,l)=>k3(e,r)});function Y5(e,t={}){return d3(K5,e,t)}function X5(e){return f3(e)}const zm={custom:"custom"};function Pd(e){return GM(Eg,e)}const J5={FEISHU:"feishu",SLACK:"slack",KAEL:"kael"},hj=tt(["feishu","slack","kael"]),mj=tt(["active","inactive"]);he({platform:hj,agentId:O().min(1),credentials:Ht(O(),St()),status:mj.default("active")});he({agentId:O().min(1).optional(),credentials:Ht(O(),St()).optional(),status:mj.optional()});he({id:We(),platform:O(),agentId:O(),hasCredentials:gu(),status:O(),createdAt:O(),updatedAt:O()});const W5=tt(["code","reverse_token","oauth","manual"]);he({appId:O().min(1),appSecret:O().min(1)});he({platform:hj,externalUserId:O().min(1),agentId:O().min(1),boundVia:W5.default("manual"),displayName:O().max(200).optional()});he({id:We(),platform:O(),externalUserId:O(),agentId:O(),boundVia:O().nullable(),displayName:O().nullable(),createdAt:O()});he({feishuUserId:O().min(1),displayName:O().max(200).optional()});he({configId:We(),platform:O(),agentId:O(),appId:O(),connected:gu(),lastActiveAt:O().nullable()});const pj=tt(["online","offline"]),gj=tt(["idle","working","blocked","error"]);tt(["active","suspended","evicted"]);const eL=tt(["active","suspended"]);he({chatId:O().min(1),state:eL});he({runtimeState:gj});he({agentId:O().min(1),runtimeType:O().max(50),runtimeVersion:O().max(50).optional()});tt(["wrong_client","not_owned","agent_suspended","wrong_org","unknown_agent"]);he({agentId:O(),status:pj,connectedAt:O().nullable(),lastSeenAt:O(),clientId:O().nullable().optional(),runtimeType:O().nullable().optional(),runtimeVersion:O().nullable().optional(),runtimeState:gj.nullable().optional(),activeSessions:We().int().nullable().optional(),totalSessions:We().int().nullable().optional(),runtimeUpdatedAt:O().nullable().optional()});he({total:We().int(),running:We().int(),byState:he({idle:We().int(),working:We().int(),blocked:We().int(),error:We().int()}),clients:We().int()});const tL={HUMAN:"human",PERSONAL_ASSISTANT:"personal_assistant",AUTONOMOUS_AGENT:"autonomous_agent"},$d=tt(["human","personal_assistant","autonomous_agent"]),p1={PRIVATE:"private",ORGANIZATION:"organization"},Cg=tt(["private","organization"]),nL=tt(["admin-api","portal"]);tt(["active","suspended"]);he({name:O().min(1).max(100).regex(/^[a-z0-9_-]+$/,"Only lowercase alphanumeric, hyphens, and underscores").optional(),type:$d,displayName:O().max(200).optional(),delegateMention:O().max(100).optional(),organizationId:O().max(100).optional(),source:nL.optional(),visibility:Cg.optional(),metadata:Ht(O(),St()).optional(),managerId:O().optional(),clientId:O().min(1).max(100).optional()});he({type:$d.optional(),displayName:O().max(200).nullable().optional(),delegateMention:O().max(100).nullable().optional(),visibility:Cg.optional(),metadata:Ht(O(),St()).optional(),managerId:O().nullable().optional(),clientId:O().min(1).max(100).nullable().optional()});he({uuid:O(),name:O().nullable(),organizationId:O(),type:$d,displayName:O().nullable(),delegateMention:O().nullable(),inboxId:O(),status:O(),source:O().nullable().optional(),cloudUserId:O().nullable().optional(),visibility:Cg,metadata:Ht(O(),St()),managerId:O().nullable(),clientId:O().nullable(),presenceStatus:pj.optional(),createdAt:O(),updatedAt:O()});he({repo:O().nullable(),branch:O().nullable()});he({type:Yn("agent:pinned"),agentId:O(),name:O().nullable(),displayName:O().nullable(),agentType:$d});const rL=32e3,Ng=/^[a-z0-9][a-z0-9_-]{0,63}$/i,iL=/^[A-Z][A-Z0-9_]*$/,aL=he({append:O().max(rL).default("")}),lL=he({name:O().regex(Ng,"MCP name must match /^[a-z0-9][a-z0-9_-]{0,63}$/i"),transport:Yn("stdio"),command:O().min(1),args:Xn(O()).optional()}),sL=he({name:O().regex(Ng,"MCP name must match /^[a-z0-9][a-z0-9_-]{0,63}$/i"),transport:Yn("http"),url:O().url(),headers:Ht(O(),O()).optional()}),oL=he({name:O().regex(Ng,"MCP name must match /^[a-z0-9][a-z0-9_-]{0,63}$/i"),transport:Yn("sse"),url:O().url(),headers:Ht(O(),O()).optional()}),uL=cj("transport",[lL,sL,oL]),cL=he({key:O().regex(iL,"Env key must match /^[A-Z][A-Z0-9_]*$/"),value:O(),sensitive:gu().default(!1)}),dL=he({url:O().min(1),ref:O().min(1).optional(),localPath:O().min(1).optional()}),_g=he({prompt:aL.default({append:""}),model:O().default(""),mcpServers:Xn(uL).default([]),env:Xn(cL).default([]),gitRepos:Xn(dL).default([])}),fL=(e,t)=>{const r=new Set;e.mcpServers.forEach((o,u)=>{const f=o.name.toLowerCase();r.has(f)&&t.addIssue({code:zm.custom,path:["mcpServers",u,"name"],message:`Duplicate MCP server name "${o.name}"`}),r.add(f)});const a=new Set;e.env.forEach((o,u)=>{a.has(o.key)&&t.addIssue({code:zm.custom,path:["env",u,"key"],message:`Duplicate env key "${o.key}"`}),a.add(o.key)});const l=new Set;e.gitRepos.forEach((o,u)=>{const f=o.localPath??yd(o.url);f&&(l.has(f)&&t.addIssue({code:zm.custom,path:["gitRepos",u,"localPath"],message:`Duplicate git repo local path "${f}"`}),l.add(f))})},yj=_g.superRefine(fL),hL=he({agentId:O(),version:We().int().positive(),payload:yj,updatedAt:O(),updatedBy:O()});he({expectedVersion:We().int().positive(),payload:_g.partial()});he({payload:_g.partial()});he({current:hL,next:yj,diff:Xn(he({path:O(),op:tt(["add","remove","replace"]),before:St().optional(),after:St().optional()}))});const zp="***";function yd(e){const t=e.trim();return t?((t.split(/[?#]/)[0]??"").split(/[/:]/).filter(Boolean).pop()??"").replace(/\.git$/i,""):""}he({username:O().min(1),password:O().min(1)});he({accessToken:O(),refreshToken:O()});he({refreshToken:O().min(1)});he({token:O().min(1)});he({token:O(),expiresIn:We(),command:O()});const mL=tt(["direct","group","thread"]);he({type:mL,topic:O().max(500).optional(),participantIds:Xn(O()).min(1),metadata:Ht(O(),St()).optional()});const pL=he({agentId:O(),role:O(),mode:O(),joinedAt:O()}),gL=he({id:O(),organizationId:O(),type:O(),topic:O().nullable(),lifecyclePolicy:O().nullable().optional(),metadata:Ht(O(),St()),createdAt:O(),updatedAt:O()});gL.extend({participants:Xn(pL)});he({topic:O().trim().max(500).nullable()});he({agentId:O().min(1),mode:tt(["full","mention_only"]).default("full")});he({agentId:O().min(1)});const yL=tt(["connected","disconnected"]);he({id:O(),userId:O().nullable(),status:yL,sdkVersion:O().max(50).nullable(),hostname:O().max(100).nullable(),os:O().max(50).nullable(),agentCount:We().int().min(0),connectedAt:O().nullable(),lastSeenAt:O(),metadata:Ht(O(),St()).nullable()});he({clientId:O().min(1).max(100),hostname:O().max(100).optional(),os:O().max(50).optional(),sdkVersion:O().max(50).optional()});he({limit:Pd().int().min(1).max(100).default(20),cursor:O().optional()});const Ag=tt(["hub_ui","cli","feishu","github","api"]),vj=tt(["text","markdown","card","reference","file","task"]);he({format:vj.default("text"),content:St(),metadata:Ht(O(),St()).optional(),inReplyTo:O().optional(),replyToInbox:O().optional(),replyToChat:O().optional(),source:Ag.optional()});he({format:vj.default("text"),content:St(),metadata:Ht(O(),St()).optional(),replyToInbox:O().optional(),replyToChat:O().optional(),source:Ag.optional()});const vL=he({id:O(),chatId:O(),senderId:O(),format:O(),content:St(),metadata:Ht(O(),St()),replyToInbox:O().nullable(),replyToChat:O().nullable(),inReplyTo:O().nullable(),source:Ag.nullable(),createdAt:O()}),xL=vL.extend({configVersion:We().int().positive()});tt(["pending","delivered","acked","failed"]);const bL=he({id:We(),inboxId:O(),messageId:O(),chatId:O().nullable(),status:O(),retryCount:We(),createdAt:O(),deliveredAt:O().nullable(),ackedAt:O().nullable()});bL.extend({message:xL});he({limit:Pd().int().min(1).max(50).default(10)});const SL={ADMIN:"admin",MEMBER:"member"},Tg=tt(["admin","member"]),wL=he({id:O(),userId:O(),organizationId:O(),agentId:O(),role:Tg,createdAt:O()});he({username:O().min(1).max(100),displayName:O().min(1).max(200),role:Tg.default("member")});he({role:Tg.optional(),displayName:O().min(1).max(200).optional()});wL.extend({username:O(),displayName:O(),password:O()});const kL=tt(["agent_error","session_error","agent_needs_decision","agent_blocked","agent_stale","agent_disconnected","agent_connected","session_completed"]),xj=tt(["high","medium","low"]);he({id:O(),organizationId:O(),type:kL,severity:xj,agentId:O().nullable(),chatId:O().nullable(),message:O(),read:gu(),createdAt:O()});he({limit:Pd().int().min(1).max(100).default(20),cursor:O().optional(),severity:xj.optional(),read:tt(["true","false"]).transform(e=>e==="true").optional(),agentId:O().optional()});const bj=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;he({name:O().min(2).max(50).regex(/^[a-z0-9][a-z0-9-]*$/,"Must start with a letter or digit and contain only lowercase alphanumeric and hyphens").refine(e=>!bj.test(e),"Name must not be a UUID format"),displayName:O().min(1).max(200),maxAgents:We().int().min(0).default(0),maxMessagesPerMinute:We().int().min(0).default(0),features:Ht(O(),St()).default({})});he({name:O().min(2).max(50).regex(/^[a-z0-9][a-z0-9-]*$/,"Must start with a letter or digit and contain only lowercase alphanumeric and hyphens").refine(e=>!bj.test(e),"Name must not be a UUID format").optional(),displayName:O().min(1).max(200).optional(),maxAgents:We().int().min(0).optional(),maxMessagesPerMinute:We().int().min(0).optional(),features:Ht(O(),St()).optional()});he({id:O(),name:O(),displayName:O(),maxAgents:We(),maxMessagesPerMinute:We(),features:Ht(O(),St()),createdAt:O(),updatedAt:O()});const jL=he({workingCount:We().int().nonnegative(),errorMask:gu()}),EL=he({type:Yn("pulse:tick"),organizationId:O(),agents:Ht(O(),Xn(jL).length(32))}),CL=tt(["tool_call","error","assistant_text","thinking","turn_end"]),Sj=he({toolUseId:O(),name:O(),args:St(),status:tt(["pending","ok","error"]),durationMs:We().int().nonnegative().optional(),resultPreview:O().max(400).optional()}),wj=he({source:tt(["sdk","runtime","tool"]),message:O().max(2e3)}),kj=he({text:O().max(8e3)}),jj=he({}),Ej=he({status:tt(["success","error"])}),NL=cj("kind",[he({kind:Yn("tool_call"),payload:Sj}),he({kind:Yn("error"),payload:wj}),he({kind:Yn("assistant_text"),payload:kj}),he({kind:Yn("thinking"),payload:jj}),he({kind:Yn("turn_end"),payload:Ej})]);he({id:O(),agentId:O(),chatId:O(),seq:We().int().positive(),kind:CL,payload:uj([Sj,wj,kj,jj,Ej]),createdAt:O()});he({agentId:O(),chatId:O(),event:NL});he({agentId:O(),chatId:O()});he({type:Yn("session:reconcile"),agentId:O().min(1),chatIds:Xn(O().min(1)).max(500)});he({type:Yn("session:reconcile:result"),agentId:O().min(1),staleChatIds:Xn(O().min(1))});const _L=he({organizationId:O(),agentCount:We(),chatCount:We(),messageCount:We()});he({totalAgents:We(),totalChats:We(),totalMessages:We(),byOrganization:Xn(_L)});he({key:O(),value:St(),updatedAt:O()});Ht(O(),St());const bi={INBOX_TIMEOUT_SECONDS:"inbox_timeout_seconds",MAX_RETRY_COUNT:"max_retry_count",POLLING_INTERVAL_SECONDS:"polling_interval_seconds",PRESENCE_CLEANUP_SECONDS:"presence_cleanup_seconds"},Rm={[bi.INBOX_TIMEOUT_SECONDS]:300,[bi.MAX_RETRY_COUNT]:3,[bi.POLLING_INTERVAL_SECONDS]:5,[bi.PRESENCE_CLEANUP_SECONDS]:60},iu=tt(["pending","assigned","working","completed","failed","cancelled"]),g1=tt(["agent","admin"]),AL=tt(["assigned","status_changed","cancelled"]);he({taskId:O(),event:AL,title:O(),body:O().default(""),status:iu,fromStatus:iu.optional(),originRef:O().nullable().optional()});const TL=he({title:O().min(1).max(500),body:O().optional(),assigneeAgentId:O().optional(),originRef:O().max(500).optional(),metadata:Ht(O(),St()).optional()});TL.extend({organizationId:O().optional()});he({status:tt(["working","completed","failed"]),result:O().optional()});he({assigneeAgentId:O().nullable().optional(),status:iu.optional(),result:O().optional()});he({chatId:O().min(1)});const zL=he({id:O(),organizationId:O(),title:O(),body:O(),status:iu,assigneeAgentId:O().nullable(),createdByType:g1,createdById:O(),originRef:O().nullable(),result:O().nullable(),metadata:Ht(O(),St()),createdAt:O(),updatedAt:O(),cancelledAt:O().nullable(),cancelledByType:g1.nullable(),cancelledById:O().nullable()}),RL=he({taskId:O(),chatId:O(),linkedByAgentId:O().nullable(),linkedAt:O()});zL.extend({chats:Xn(RL)});he({status:iu.optional(),assigneeAgentId:O().optional(),originRef:O().optional(),limit:Pd().int().min(1).max(100).default(20),cursor:O().optional()});const OL=tt(["normal","idle_island","awaiting_reply","no_chat","not_applicable"]);he({taskId:O(),signal:OL,reason:O()});const DL=tt(["active","suspended"]);he({id:O(),username:O(),displayName:O(),avatarUrl:O().nullable(),status:DL,createdAt:O(),updatedAt:O()});he({username:O().min(1).max(100),displayName:O().min(1).max(200),password:O().min(8).max(200)});he({displayName:O().min(1).max(200).optional(),password:O().min(8).max(200).optional()});he({type:Yn("auth"),token:O().min(1)});const Cj=Array.from({length:32},()=>({workingCount:0,errorMask:!1}));function ML(e){const t=Array.from({length:32},()=>({workingCount:0,errorMask:!1}));for(const r of Object.values(e))for(let a=0;a<32&&a<r.length;a++){const l=r[a],o=t[a];!l||!o||(o.workingCount+=l.workingCount,o.errorMask=o.errorMask||l.errorMask)}return t}const LL=2e3,UL=3e4;let aa=null,vd=!1,Om=0,Vo=null;const Rp=new Set;let Zo=null,fs=0;function IL(e){for(const t of Rp)try{t(e)}catch{}Zo&&(e.type==="notification"?Zo.invalidateQueries({queryKey:["notifications"]}):e.type==="session:state"&&(Zo.invalidateQueries({queryKey:["activity"]}),Zo.invalidateQueries({queryKey:["sessions"]})))}function Nj(){const e=og();if(!(e!=null&&e.accessToken))return;const r=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/v1/ws/admin?token=${e.accessToken}`,a=new WebSocket(r);aa=a,a.onmessage=l=>{if(a===aa)try{const o=JSON.parse(l.data);IL(o)}catch{}},a.onopen=()=>{a===aa&&(Om=0)},a.onclose=()=>{if(a!==aa||(aa=null,vd||fs===0))return;Om++;const l=Math.min(LL*2**(Om-1),UL);Vo=setTimeout(()=>{Vo=null,!vd&&fs>0&&Nj()},l)}}function BL(){vd=!0,Vo&&(clearTimeout(Vo),Vo=null),aa&&(aa.close(1e3,"unmount"),aa=null)}function _j(e){const{onMessage:t,enabled:r=!0}=e??{},a=er(),l=S.useRef(t);l.current=t,S.useEffect(()=>{Zo=a},[a]),S.useEffect(()=>{if(!r)return;const o=u=>{var f;return(f=l.current)==null?void 0:f.call(l,u)};return Rp.add(o),fs++,fs===1&&(vd=!1,Nj()),()=>{Rp.delete(o),fs--,fs===0&&BL()}},[r])}const Aj=S.createContext({aggregated:Cj,agents:{},receivedAtMs:null,stale:!0});function PL({children:e}){const[t,r]=S.useState({aggregated:Cj,agents:{},receivedAtMs:null}),[a,l]=S.useState(()=>Date.now());_j({onMessage:u=>{const f=EL.safeParse(u);f.success&&r({aggregated:ML(f.data.agents),agents:f.data.agents,receivedAtMs:Date.now()})}}),S.useEffect(()=>{const u=setInterval(()=>l(Date.now()),1e4);return()=>clearInterval(u)},[]);const o=S.useMemo(()=>({...t,stale:t.receivedAtMs===null||a-t.receivedAtMs>3e4}),[t,a]);return d.jsx(Aj.Provider,{value:o,children:e})}function $L(){return S.useContext(Aj)}const y1=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,v1=yw,Tj=(e,t)=>r=>{var a;if((t==null?void 0:t.variants)==null)return v1(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:l,defaultVariants:o}=t,u=Object.keys(l).map(h=>{const v=r==null?void 0:r[h],y=o==null?void 0:o[h];if(v===null)return null;const x=y1(v)||y1(y);return l[h][x]}),f=r&&Object.entries(r).reduce((h,v)=>{let[y,x]=v;return x===void 0||(h[y]=x),h},{}),m=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,v)=>{let{class:y,className:x,...b}=v;return Object.entries(b).every(j=>{let[k,N]=j;return Array.isArray(N)?N.includes({...o,...f}[k]):{...o,...f}[k]===N})?[...h,y,x]:h},[]);return v1(e,u,m,r==null?void 0:r.class,r==null?void 0:r.className)},qL=Tj("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive/10 text-destructive",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Gt({className:e,variant:t,...r}){return d.jsx("div",{className:Te(qL({variant:t}),e),...r})}const Fr=S.forwardRef(({className:e,...t},r)=>d.jsx("div",{className:"relative w-full overflow-auto",children:d.jsx("table",{ref:r,className:Te("w-full caption-bottom text-sm",e),...t})}));Fr.displayName="Table";const Hr=S.forwardRef(({className:e,...t},r)=>d.jsx("thead",{ref:r,className:Te("[&_tr]:border-b",e),...t}));Hr.displayName="TableHeader";const Zr=S.forwardRef(({className:e,...t},r)=>d.jsx("tbody",{ref:r,className:Te("[&_tr:last-child]:border-0",e),...t}));Zr.displayName="TableBody";const at=S.forwardRef(({className:e,...t},r)=>d.jsx("tr",{ref:r,className:Te("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));at.displayName="TableRow";const Ee=S.forwardRef(({className:e,...t},r)=>d.jsx("th",{ref:r,className:Te("h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Ee.displayName="TableHead";const xe=S.forwardRef(({className:e,...t},r)=>d.jsx("td",{ref:r,className:Te("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));xe.displayName="TableCell";function zg(){return Me.get("/members")}function FL(e){return Me.post("/members",e)}function HL(e,t){return Me.patch(`/members/${encodeURIComponent(e)}`,t)}function ZL(e){return Me.delete(`/members/${encodeURIComponent(e)}`)}function Rg(){const{data:e}=Fe({queryKey:["members","name-map"],queryFn:zg,staleTime:3e4});return S.useMemo(()=>{const t=new Map;if(e)for(const r of e)t.set(r.id,r.displayName||r.username);return r=>r?t.get(r)??r:"—"},[e])}function VL(){const e=Vr(),t=Rg(),{data:r,isLoading:a,error:l}=Fe({queryKey:["admin-all-agents"],queryFn:()=>eD({limit:100})});return d.jsxs("div",{className:"space-y-4",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"Every agent in the organization, including private agents owned by other members. Use this view to troubleshoot or reassign — the regular Agents page still hides private agents you don't manage."}),d.jsx("div",{className:"border rounded-lg",children:d.jsxs(Fr,{children:[d.jsx(Hr,{children:d.jsxs(at,{children:[d.jsx(Ee,{children:"Name"}),d.jsx(Ee,{children:"Display Name"}),d.jsx(Ee,{children:"Type"}),d.jsx(Ee,{children:"Visibility"}),d.jsx(Ee,{children:"Owner"}),d.jsx(Ee,{children:"Status"}),d.jsx(Ee,{children:"Created"})]})}),d.jsx(Zr,{children:a?d.jsx(at,{children:d.jsx(xe,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"Loading..."})}):l?d.jsx(at,{children:d.jsxs(xe,{colSpan:7,className:"text-center py-8 text-destructive",children:["Failed to load agents: ",l instanceof Error?l.message:"Unknown error"]})}):!r||r.items.length===0?d.jsx(at,{children:d.jsx(xe,{colSpan:7,className:"text-center py-8 text-muted-foreground",children:"No agents"})}):r.items.map(o=>d.jsxs(at,{className:"cursor-pointer",onClick:()=>e(`/agents/${encodeURIComponent(o.uuid)}`),children:[d.jsx(xe,{className:"font-mono text-sm",children:o.name??o.uuid.slice(0,8)}),d.jsx(xe,{children:o.displayName??"—"}),d.jsx(xe,{children:d.jsx(Gt,{variant:"secondary",children:o.type})}),d.jsx(xe,{children:d.jsx(Gt,{variant:o.visibility==="organization"?"default":"outline",children:o.visibility})}),d.jsx(xe,{className:"text-sm",children:o.managerId?t(o.managerId):"—"}),d.jsx(xe,{children:d.jsx(Gt,{variant:o.status==="active"?"default":"secondary",children:o.status})}),d.jsx(xe,{className:"text-muted-foreground text-sm",children:Cr(o.createdAt)})]},o.uuid))})]})})]})}const QL=Tj("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-white shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),be=S.forwardRef(({className:e,variant:t,size:r,asChild:a=!1,...l},o)=>{const u=a?_O:"button";return d.jsx(u,{className:Te(QL({variant:t,size:r,className:e})),ref:o,...l})});be.displayName="Button";const gt=S.forwardRef(({className:e,type:t,...r},a)=>d.jsx("input",{type:t,className:Te("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...r}));gt.displayName="Input";var GL="Label",zj=S.forwardRef((e,t)=>d.jsx(Ei.label,{...e,ref:t,onMouseDown:r=>{var l;r.target.closest("button, input, select, textarea")||((l=e.onMouseDown)==null||l.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));zj.displayName=GL;var KL=zj;const Ye=S.forwardRef(({className:e,...t},r)=>d.jsx(KL,{ref:r,className:Te("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));Ye.displayName="Label";const Rj=Object.values(SL);function YL(){const e=er(),[t,r]=S.useState(!1),[a,l]=S.useState({username:"",displayName:"",role:"member"}),[o,u]=S.useState(null),[f,m]=S.useState(null),{data:h,isLoading:v,error:y}=Fe({queryKey:["members"],queryFn:zg}),x=vt({mutationFn:()=>FL({username:a.username,displayName:a.displayName,role:a.role}),onSuccess:E=>{e.invalidateQueries({queryKey:["members"]}),u(E.password)}}),b=vt({mutationFn:ZL,onSuccess:()=>e.invalidateQueries({queryKey:["members"]})});function j(){r(!1),l({username:"",displayName:"",role:"member"}),u(null)}function k(E){E.preventDefault(),x.mutate()}function N(E){window.confirm("Delete this member? Their human agent will also be deactivated.")&&b.mutate(E)}return d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between mb-6",children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Members"}),d.jsxs(Mn,{open:t,onOpenChange:E=>E?r(!0):j(),children:[d.jsx(YO,{asChild:!0,children:d.jsxs(be,{children:[d.jsx(fl,{className:"h-4 w-4 mr-2"}),"Add Member"]})}),d.jsxs(Sn,{children:[d.jsx(Wn,{children:d.jsx(Un,{children:o?"Member Created":"Create Member"})}),o?d.jsxs("div",{className:"space-y-4",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"Member created. Share the password below — it will only be shown once."}),d.jsxs("div",{className:"flex items-center gap-2 rounded-md border p-3 bg-muted",children:[d.jsx("code",{className:"flex-1 text-sm font-mono",children:o}),d.jsx(be,{variant:"ghost",size:"icon",onClick:()=>navigator.clipboard.writeText(o),title:"Copy password",children:d.jsx(cg,{className:"h-4 w-4"})})]}),d.jsx(Ln,{children:d.jsx(be,{onClick:j,children:"Done"})})]}):d.jsxs("form",{onSubmit:k,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"member-username",children:"Username"}),d.jsx(gt,{id:"member-username",type:"text",value:a.username,onChange:E=>l({...a,username:E.target.value}),required:!0})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"member-name",children:"Display Name"}),d.jsx(gt,{id:"member-name",value:a.displayName,onChange:E=>l({...a,displayName:E.target.value}),required:!0})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"member-role",children:"Role"}),d.jsx("select",{id:"member-role",value:a.role,onChange:E=>l({...a,role:E.target.value}),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:Rj.map(E=>d.jsx("option",{value:E,children:E},E))})]}),x.error instanceof Error&&d.jsx("div",{className:"text-sm text-destructive",children:x.error.message}),d.jsx(Ln,{children:d.jsx(be,{type:"submit",disabled:x.isPending,children:x.isPending?"Creating...":"Create"})})]})]})]})]}),d.jsx(XL,{target:f,onClose:()=>m(null),onSaved:()=>{m(null),e.invalidateQueries({queryKey:["members"]})}}),d.jsx("div",{className:"border rounded-lg",children:d.jsxs(Fr,{children:[d.jsx(Hr,{children:d.jsxs(at,{children:[d.jsx(Ee,{children:"Username"}),d.jsx(Ee,{children:"Name"}),d.jsx(Ee,{children:"Role"}),d.jsx(Ee,{children:"Created"}),d.jsx(Ee,{className:"w-16"})]})}),d.jsx(Zr,{children:v?d.jsx(at,{children:d.jsx(xe,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"Loading..."})}):y?d.jsx(at,{children:d.jsxs(xe,{colSpan:5,className:"text-center py-8 text-destructive",children:["Failed to load members: ",y instanceof Error?y.message:"Unknown error"]})}):(h==null?void 0:h.length)===0?d.jsx(at,{children:d.jsx(xe,{colSpan:5,className:"text-center py-8 text-muted-foreground",children:"No members"})}):h==null?void 0:h.map(E=>d.jsxs(at,{children:[d.jsx(xe,{className:"font-medium",children:E.username}),d.jsx(xe,{children:E.displayName}),d.jsx(xe,{children:d.jsx(Gt,{variant:E.role==="admin"?"default":"secondary",children:E.role})}),d.jsx(xe,{className:"text-muted-foreground",children:Cr(E.createdAt)}),d.jsx(xe,{children:d.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[d.jsx(be,{variant:"ghost",size:"icon",onClick:()=>m({id:E.id,username:E.username,displayName:E.displayName,role:E.role}),title:"Edit",children:d.jsx(Ad,{className:"h-4 w-4"})}),d.jsx(be,{variant:"ghost",size:"icon",onClick:()=>N(E.id),disabled:b.isPending,title:"Delete",children:d.jsx(Wo,{className:"h-4 w-4"})})]})})]},E.id))})]})})]})}function XL({target:e,onClose:t,onSaved:r}){const[a,l]=S.useState(""),[o,u]=S.useState("member"),[f,m]=S.useState(null);S.useEffect(()=>{e&&(l(e.displayName),u(e.role),m(null))},[e]);const h=vt({mutationFn:async()=>{if(!e)throw new Error("No target");const x={};return a.trim()&&a!==e.displayName&&(x.displayName=a.trim()),o!==e.role&&(x.role=o),Object.keys(x).length===0?e:HL(e.id,x)},onSuccess:()=>{m(null),r()},onError:x=>{m(x instanceof Error?x.message:String(x))}});function v(x){x.preventDefault(),h.mutate()}const y=e!==null;return d.jsx(Mn,{open:y,onOpenChange:x=>x?void 0:t(),children:d.jsxs(Sn,{children:[d.jsx(Wn,{children:d.jsx(Un,{children:"Edit Member"})}),e&&d.jsxs("form",{onSubmit:v,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{children:"Username"}),d.jsx(gt,{value:e.username,disabled:!0,className:"font-mono"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Username is permanent after creation."})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"edit-member-display",children:"Display Name"}),d.jsx(gt,{id:"edit-member-display",value:a,onChange:x=>l(x.target.value),required:!0,maxLength:200})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"edit-member-role",children:"Role"}),d.jsx("select",{id:"edit-member-role",value:o,onChange:x=>u(x.target.value),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:Rj.map(x=>d.jsx("option",{value:x,children:x},x))}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Demoting the last admin is blocked — every org needs at least one admin to manage members."})]}),f&&d.jsx("p",{className:"text-sm text-destructive",children:f}),d.jsxs(Ln,{children:[d.jsx(be,{type:"button",variant:"ghost",onClick:t,disabled:h.isPending,children:"Cancel"}),d.jsx(be,{type:"submit",disabled:h.isPending,children:h.isPending?"Saving…":"Save"})]})]})]})})}function JL(){return Me.get("/admin/system/config")}function WL(e){return Me.patch("/admin/system/config",e)}const ul=S.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Te("rounded-xl border bg-card text-card-foreground shadow-sm",e),...t}));ul.displayName="Card";const Ts=S.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Te("flex flex-col space-y-1.5 p-6",e),...t}));Ts.displayName="CardHeader";const zs=S.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Te("font-semibold leading-none tracking-tight",e),...t}));zs.displayName="CardTitle";const Oj=S.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Te("text-sm text-muted-foreground",e),...t}));Oj.displayName="CardDescription";const cl=S.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Te("p-6 pt-0",e),...t}));cl.displayName="CardContent";const e6=S.forwardRef(({className:e,...t},r)=>d.jsx("div",{ref:r,className:Te("flex items-center p-6 pt-0",e),...t}));e6.displayName="CardFooter";const t6={[bi.INBOX_TIMEOUT_SECONDS]:"Inbox Timeout (seconds)",[bi.MAX_RETRY_COUNT]:"Max Retry Count",[bi.POLLING_INTERVAL_SECONDS]:"Polling Interval (seconds)",[bi.PRESENCE_CLEANUP_SECONDS]:"Presence Cleanup (seconds)"},x1=Object.values(bi);function n6(){const e=er(),{data:t,isLoading:r}=Fe({queryKey:["system-config"],queryFn:JL}),[a,l]=S.useState({}),[o,u]=S.useState(!1);S.useEffect(()=>{if(!t)return;const h={};for(const v of x1){const y=t[v]??Rm[v]??"";h[v]=String(y)}l(h)},[t]);const f=vt({mutationFn:()=>{const h={};for(const[v,y]of Object.entries(a)){const x=y.trim();if(x==="")h[v]=Rm[v]??0;else{const b=Number(x);h[v]=Number.isNaN(b)?x:b}}return WL(h)},onSuccess:()=>{e.invalidateQueries({queryKey:["system-config"]}),u(!0),setTimeout(()=>u(!1),2e3)}}),m=h=>{h.preventDefault(),f.mutate()};return r?d.jsx("div",{className:"text-muted-foreground",children:"Loading..."}):d.jsxs(ul,{children:[d.jsx(Ts,{children:d.jsx(zs,{children:"System Configuration"})}),d.jsx(cl,{children:d.jsxs("form",{onSubmit:m,className:"space-y-4",children:[x1.map(h=>d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:h,children:t6[h]??h}),d.jsx(gt,{id:h,value:a[h]??"",onChange:v=>l({...a,[h]:v.target.value})}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:["Default: ",String(Rm[h]??"—")]})]},h)),f.error instanceof Error&&d.jsx("div",{className:"text-sm text-destructive",children:f.error.message}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(be,{type:"submit",disabled:f.isPending,children:f.isPending?"Saving...":"Save Changes"}),o&&d.jsx("span",{className:"text-sm text-green-600",children:"Saved!"})]})]})})]})}const b1=[{key:"members",label:"Members"},{key:"all-agents",label:"All Agents"},{key:"settings",label:"Org Settings"}];function r6(){const{role:e}=Sa(),t=yr(),r=Vr();if(e===null)return d.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading…"});if(e!=="admin")return d.jsx(rg,{to:"/settings",replace:!0});const a=t.hash.replace("#",""),l=b1.some(u=>u.key===a)?a:"members",o=u=>{r({hash:u},{replace:!0})};return d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold mb-4",children:"Admin"}),d.jsx("div",{className:"flex gap-1 border-b border-border mb-6",children:b1.map(u=>d.jsx("button",{type:"button",onClick:()=>o(u.key),className:Te("px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors",l===u.key?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:u.label},u.key))}),l==="members"&&d.jsx(YL,{}),l==="all-agents"&&d.jsx(VL,{}),l==="settings"&&d.jsx(n6,{})]})}function Dj(){return Me.get("/admin/adapter-mappings")}function i6(e){return Me.post("/admin/adapter-mappings",e)}function a6(e){return Me.delete(`/admin/adapter-mappings/${e}`)}function Mj(){return Me.get("/admin/adapters/status")}function Lj(){return Me.get("/admin/adapters")}function l6(e){return Me.post("/admin/adapters",e)}function s6(e,t){return Me.patch(`/admin/adapters/${e}`,t)}function o6(e){return Me.delete(`/admin/adapters/${e}`)}function u6(e){return Me.get(`/admin/agents/${e}/config`)}function c6(e,t){return Me.patch(`/admin/agents/${e}/config`,t)}function d6(e,t){return Me.post(`/admin/agents/${e}/config/dry-run`,{payload:t})}function f6(e){return Me.get(`/admin/agents/${e}/client-status`)}function h6(e){const{agent:t}=e,[r,a]=S.useState(!1),l=t.displayName||t.name||t.uuid;return d.jsxs("section",{className:"rounded-md border border-red-200 bg-red-50/40",children:[d.jsxs("header",{className:"flex items-center gap-2 border-b border-red-200 px-4 py-2",children:[d.jsx(RT,{className:"h-4 w-4 text-red-700"}),d.jsx("h3",{className:"text-sm font-medium text-red-800",children:"Danger Zone"})]}),d.jsxs("div",{className:"divide-y divide-red-200",children:[t.status==="active"?d.jsx(Dm,{title:"Suspend agent",body:"Pause all active sessions. You can reactivate later; tokens stay revoked until then.",action:d.jsx(be,{variant:"outline",size:"sm",onClick:e.onSuspend,disabled:e.suspendPending,children:e.suspendPending?"Suspending…":"Suspend"})}):d.jsx(Dm,{title:"Reactivate agent",body:"Resume sessions. Tokens must be recreated — they are not restored.",action:d.jsx(be,{variant:"outline",size:"sm",onClick:e.onReactivate,disabled:e.reactivatePending,children:e.reactivatePending?"Reactivating…":"Reactivate"})}),d.jsx(Dm,{title:"Delete agent",body:"Permanent. Configuration, bindings, tokens, and session history are all dropped.",action:d.jsxs(be,{variant:"destructive",size:"sm",onClick:()=>a(!0),disabled:e.deletePending,children:[d.jsx(Wo,{className:"h-3.5 w-3.5 mr-1.5"}),"Delete"]})})]}),d.jsx(m6,{open:r,onOpenChange:a,expected:l,onDelete:()=>{a(!1),e.onDelete()},deleting:e.deletePending})]})}function Dm(e){return d.jsxs("div",{className:"flex items-start justify-between gap-4 px-4 py-3 text-sm",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-red-900",children:e.title}),d.jsx("p",{className:"text-xs text-red-800/80",children:e.body})]}),d.jsx("div",{children:e.action})]})}function m6({open:e,onOpenChange:t,expected:r,onDelete:a,deleting:l}){const[o,u]=S.useState("");function f(m){m.preventDefault(),o===r&&a()}return d.jsx(Mn,{open:e,onOpenChange:m=>{t(m),m||u("")},children:d.jsxs(Sn,{children:[d.jsx(Wn,{children:d.jsxs(Un,{children:['Delete "',r,'"?']})}),d.jsxs("form",{onSubmit:f,className:"space-y-4",children:[d.jsxs("p",{className:"text-sm text-muted-foreground",children:["This action cannot be undone. Type ",d.jsx("span",{className:"font-mono font-medium text-gray-900",children:r})," ","to confirm."]}),d.jsx(gt,{value:o,onChange:m=>u(m.target.value),autoFocus:!0,placeholder:r,className:"font-mono"}),d.jsxs(Ln,{children:[d.jsx(be,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:l,children:"Cancel"}),d.jsx(be,{type:"submit",variant:"destructive",disabled:o!==r||l,children:l?"Deleting…":"Delete"})]})]})]})})}const p6={unchanged:{label:"",tone:""},added:{label:"new",tone:"bg-green-100 text-green-900"},modified:{label:"changed",tone:"bg-amber-100 text-amber-900"},deleted:{label:"will be removed on save",tone:"bg-red-100 text-red-900"}};function Og({status:e,onEdit:t,onDelete:r,onUndo:a,children:l,disabled:o}){const u=p6[e],f=e==="deleted";return d.jsxs("div",{className:Te("flex items-center gap-2 rounded border px-3 py-2 text-sm",f?"bg-red-50 border-red-200 text-red-900 line-through decoration-red-300":"bg-white"),children:[d.jsx("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:l}),u.label&&d.jsx("span",{className:Te("text-xs rounded px-1.5 py-0.5 whitespace-nowrap",u.tone),children:u.label}),!o&&(f?d.jsxs(be,{size:"sm",variant:"ghost",onClick:a,children:[d.jsx(DT,{className:"h-3.5 w-3.5 mr-1"}),"Undo"]}):d.jsx(g6,{onEdit:t,onDelete:r}))]})}function g6({onEdit:e,onDelete:t}){return d.jsxs("div",{className:"flex gap-1",children:[d.jsx(be,{size:"sm",variant:"ghost",onClick:e,title:"Edit",children:"Edit"}),d.jsxs(be,{size:"sm",variant:"ghost",onClick:t,title:"Delete",children:[d.jsx(hw,{className:"sr-only h-3.5 w-3.5","aria-hidden":!0}),"Delete"]})]})}function y6(e){const[t,r]=S.useState(null),a=e.items.filter(l=>l.status!=="deleted").length;return d.jsxs("section",{className:"rounded-md border bg-white",children:[d.jsxs("header",{className:"flex items-center justify-between border-b px-4 py-2",children:[d.jsxs("h3",{className:"text-sm font-medium",children:["Environment Variables (",a,")"]}),!e.disabled&&d.jsxs(be,{size:"sm",variant:"outline",onClick:()=>r({mode:"add"}),children:[d.jsx(fl,{className:"h-3.5 w-3.5 mr-1.5"})," Add"]})]}),d.jsx("div",{className:"px-4 py-3 space-y-2",children:e.items.length===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"No environment variables."}):e.items.map(l=>d.jsxs(Og,{status:l.status,onEdit:()=>r({mode:"edit",key:l.key,initial:l.value}),onDelete:()=>e.onDelete(l.key),onUndo:()=>e.onUndoDelete(l.key),disabled:e.disabled,children:[d.jsx("span",{className:"font-mono font-medium",children:l.value.key}),d.jsx("span",{className:"font-mono text-xs text-muted-foreground truncate max-w-xs",children:l.value.sensitive?"••••••":l.value.value||d.jsx("em",{children:"(empty)"})}),l.value.sensitive&&d.jsx(cT,{className:"h-3 w-3 text-muted-foreground"})]},l.key))}),t&&d.jsx(v6,{open:!!t,onOpenChange:l=>!l&&r(null),initial:t.mode==="edit"?t.initial:null,forbiddenKeys:e.otherKeys(t.mode==="edit"?t.key:null),onSubmit:l=>{t.mode==="edit"?e.onUpdate(t.key,l):e.onAdd(l),r(null)}})]})}function v6({open:e,onOpenChange:t,initial:r,forbiddenKeys:a,onSubmit:l}){const[o,u]=S.useState((r==null?void 0:r.key)??""),[f,m]=S.useState(r!=null&&r.sensitive?"":(r==null?void 0:r.value)??""),[h,v]=S.useState((r==null?void 0:r.sensitive)??!1),[y,x]=S.useState(null);S.useEffect(()=>{e&&(u((r==null?void 0:r.key)??""),m(r!=null&&r.sensitive?"":(r==null?void 0:r.value)??""),v((r==null?void 0:r.sensitive)??!1),x(null))},[e,r]);function b(j){if(j.preventDefault(),!o.match(/^[A-Z][A-Z0-9_]*$/)){x("Key must match /^[A-Z][A-Z0-9_]*$/.");return}if(a.has(o)){x(`Another entry already uses key "${o}".`);return}let k=f;if(h&&(r!=null&&r.sensitive)&&!f&&(k=zp),!h&&!r&&!f){x("Value is required for non-sensitive entries.");return}l({key:o,value:k,sensitive:h})}return d.jsx(Mn,{open:e,onOpenChange:t,children:d.jsxs(Sn,{children:[d.jsx(Wn,{children:d.jsx(Un,{children:r?"Edit environment variable":"Add environment variable"})}),d.jsxs("form",{onSubmit:b,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"env-key",children:"Key"}),d.jsx(gt,{id:"env-key",value:o,onChange:j=>u(j.target.value.toUpperCase()),placeholder:"OPENAI_API_KEY",className:"font-mono",disabled:!!r}),r&&d.jsx("p",{className:"text-xs text-muted-foreground",children:"Key can't be renamed — delete and re-add."})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"env-value",children:"Value"}),d.jsx(gt,{id:"env-value",type:h?"password":"text",autoComplete:"new-password",value:f,onChange:j=>m(j.target.value),placeholder:r!=null&&r.sensitive?"Leave empty to keep existing value":h?"new secret":"value",className:"font-mono"})]}),d.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[d.jsx("input",{type:"checkbox",checked:h,onChange:j=>v(j.target.checked),className:"h-4 w-4",disabled:!!r&&r.sensitive}),"Mark as sensitive (encrypted at rest, never displayed again)"]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Sensitive values cannot be viewed after saving. If you need to verify, save a new value."}),y&&d.jsx("p",{className:"text-sm text-destructive",children:y}),d.jsxs(Ln,{children:[d.jsx(be,{type:"button",variant:"ghost",onClick:()=>t(!1),children:"Cancel"}),d.jsx(be,{type:"submit",children:r?"Done":"Add"})]})]})]})})}function x6(e){const[t,r]=S.useState(null),a=e.items.filter(l=>l.status!=="deleted").length;return d.jsxs("section",{className:"rounded-md border bg-white",children:[d.jsxs("header",{className:"flex items-center justify-between border-b px-4 py-2",children:[d.jsxs("h3",{className:"text-sm font-medium",children:["Git Repositories (",a,")"]}),!e.disabled&&d.jsxs(be,{size:"sm",variant:"outline",onClick:()=>r({mode:"add"}),children:[d.jsx(fl,{className:"h-3.5 w-3.5 mr-1.5"})," Add"]})]}),d.jsx("div",{className:"px-4 py-3 space-y-2",children:e.items.length===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"No Git repositories."}):e.items.map(l=>{const o=l.value.localPath??yd(l.value.url);return d.jsxs(Og,{status:l.status,onEdit:()=>r({mode:"edit",key:l.key,initial:l.value}),onDelete:()=>e.onDelete(l.key),onUndo:()=>e.onUndoDelete(l.key),disabled:e.disabled,children:[d.jsx("span",{className:"font-mono text-xs",children:l.value.url}),l.value.ref&&d.jsxs("span",{className:"text-xs text-muted-foreground",children:["@ ",l.value.ref]}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:["→ ",o||"./"]})]},l.key)})}),t&&d.jsx(b6,{open:!!t,onOpenChange:l=>!l&&r(null),initial:t.mode==="edit"?t.initial:null,forbiddenPaths:e.otherPaths(t.mode==="edit"?t.key:null),onSubmit:l=>{t.mode==="edit"?e.onUpdate(t.key,l):e.onAdd(l),r(null)}})]})}function b6({open:e,onOpenChange:t,initial:r,forbiddenPaths:a,onSubmit:l}){const[o,u]=S.useState((r==null?void 0:r.url)??""),[f,m]=S.useState((r==null?void 0:r.ref)??""),[h,v]=S.useState((r==null?void 0:r.localPath)??""),[y,x]=S.useState(null);S.useEffect(()=>{e&&(u((r==null?void 0:r.url)??""),m((r==null?void 0:r.ref)??""),v((r==null?void 0:r.localPath)??""),x(null))},[e,r]);function b(j){j.preventDefault();const k=o.trim();if(!k){x("URL is required.");return}const N=h.trim()||yd(k);if(N&&a.has(N)){x(`Another repo already occupies local path "${N}".`);return}const E={url:k,...f.trim()?{ref:f.trim()}:{},...h.trim()?{localPath:h.trim()}:{}};l(E)}return d.jsx(Mn,{open:e,onOpenChange:t,children:d.jsxs(Sn,{children:[d.jsx(Wn,{children:d.jsx(Un,{children:r?"Edit Git repository":"Add Git repository"})}),d.jsxs("form",{onSubmit:b,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"git-url",children:"URL"}),d.jsx(gt,{id:"git-url",value:o,onChange:j=>u(j.target.value),placeholder:"git@github.com:org/repo.git",className:"font-mono"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"git-ref",children:"Ref (branch / tag / sha, optional)"}),d.jsx(gt,{id:"git-ref",value:f,onChange:j=>m(j.target.value),placeholder:"main",className:"font-mono"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"git-path",children:"Local path (optional)"}),d.jsx(gt,{id:"git-path",value:h,onChange:j=>v(j.target.value),placeholder:yd(o)||"repo-name",className:"font-mono"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Relative to the session working directory. Leave empty to derive from the URL."})]}),y&&d.jsx("p",{className:"text-sm text-destructive",children:y}),d.jsxs(Ln,{children:[d.jsx(be,{type:"button",variant:"ghost",onClick:()=>t(!1),children:"Cancel"}),d.jsx(be,{type:"submit",children:r?"Done":"Add"})]})]})]})})}function S6({agent:e,onSave:t}){const[r,a]=S.useState(!1),l=Ci(),o=Rg(),u=e.metadata,f=u==null?void 0:u.tree,m=typeof(f==null?void 0:f.role)=="string"?f.role:null,h=Array.isArray(f==null?void 0:f.domains)?(f==null?void 0:f.domains).filter(x=>typeof x=="string"):[],v=e.managerId?o(e.managerId):null,y=e.delegateMention?l(e.delegateMention):null;return d.jsxs("section",{className:"rounded-md border bg-white",children:[d.jsxs("header",{className:"flex items-center justify-between border-b px-4 py-2",children:[d.jsx("h2",{className:"text-sm font-medium",children:"Identity"}),e.status==="active"&&d.jsxs(be,{size:"sm",variant:"outline",onClick:()=>a(!0),children:[d.jsx(Ad,{className:"h-3.5 w-3.5 mr-1.5"})," Edit"]})]}),d.jsxs("div",{className:"px-4 py-3 text-sm space-y-1",children:[d.jsxs("div",{children:[d.jsx("span",{className:"font-mono",children:e.name??e.uuid}),d.jsx("span",{className:"mx-2 text-muted-foreground",children:"·"}),d.jsx("span",{children:e.displayName??d.jsx("span",{className:"text-muted-foreground italic",children:"no display name"})}),y&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"mx-2 text-muted-foreground",children:"·"}),d.jsxs("span",{className:"text-muted-foreground",children:["delegate ",d.jsx("span",{className:"font-mono",children:y})]})]})]}),d.jsxs("div",{className:"text-xs text-muted-foreground flex flex-wrap items-center gap-x-3 gap-y-1",children:[d.jsxs("span",{children:["owner ",d.jsx("span",{className:"text-gray-900",children:v??"—"})]}),m&&d.jsxs("span",{children:["role ",d.jsx("span",{className:"text-gray-900",children:m})]}),d.jsxs("span",{children:["type ",d.jsx(Gt,{variant:"secondary",children:e.type})]}),d.jsxs("span",{children:["visibility"," ",d.jsx(Gt,{variant:e.visibility==="organization"?"default":"outline",children:e.visibility})]}),h.length>0&&d.jsxs("span",{children:["domains"," ",d.jsx("span",{className:"inline-flex flex-wrap gap-1 align-middle",children:h.map(x=>d.jsx(Gt,{variant:"outline",children:x},x))})]})]})]}),d.jsx(w6,{agent:e,open:r,onOpenChange:a,onSave:t})]})}function w6({agent:e,open:t,onOpenChange:r,onSave:a}){var I;const{memberId:l,role:o}=Sa(),[u,f]=S.useState(e.displayName??""),[m,h]=S.useState(e.delegateMention??""),[v,y]=S.useState(e.visibility),[x,b]=S.useState(!1),[j,k]=S.useState(null);S.useEffect(()=>{t&&(f(e.displayName??""),h(e.delegateMention??""),y(e.visibility),k(null))},[t,e]);const N=e.type==="human",E=o==="admin"||e.managerId===l,R=Fe({queryKey:["agents-for-delegate"],queryFn:async()=>(await vg({limit:100})).items.filter(z=>z.type==="personal_assistant"&&z.status==="active"),enabled:t&&N});async function A(q){q.preventDefault(),k(null),b(!0);try{const z={displayName:u||null,delegateMention:m||null};v!==e.visibility&&(z.visibility=v),await a(z),r(!1)}catch(z){k(z instanceof Error?z.message:String(z))}finally{b(!1)}}return d.jsx(Mn,{open:t,onOpenChange:r,children:d.jsxs(Sn,{children:[d.jsx(Wn,{children:d.jsx(Un,{children:"Edit Identity"})}),d.jsxs("form",{onSubmit:A,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{children:"Name (mention)"}),d.jsx(gt,{value:e.name??"",disabled:!0,className:"font-mono"}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Name is permanent after creation."})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"id-display",children:"Display Name"}),d.jsx(gt,{id:"id-display",value:u,onChange:q=>f(q.target.value),placeholder:"How teammates see this agent",maxLength:200})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"id-visibility",children:"Visibility"}),d.jsxs("select",{id:"id-visibility",value:v,onChange:q=>y(q.target.value),disabled:!E,className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:[d.jsx("option",{value:p1.PRIVATE,children:"Private — only the manager"}),d.jsx("option",{value:p1.ORGANIZATION,children:"Organization — all members"})]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:E?"Private agents are only visible to their manager; organization agents appear in every member's list.":"Only the manager or an admin can change this agent's visibility."})]}),N&&d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"id-delegate",children:"Delegate Mention"}),d.jsxs("select",{id:"id-delegate",value:m,onChange:q=>h(q.target.value),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[d.jsx("option",{value:"",children:"None"}),(I=R.data)==null?void 0:I.map(q=>d.jsx("option",{value:q.uuid,children:q.displayName?`${q.displayName} (${q.name??q.uuid})`:q.name??q.uuid},q.uuid))]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Assistant that acts on behalf of this agent."})]}),j&&d.jsx("p",{className:"text-sm text-destructive",children:j}),d.jsxs(Ln,{children:[d.jsx(be,{type:"button",variant:"ghost",onClick:()=>r(!1),disabled:x,children:"Cancel"}),d.jsx(be,{type:"submit",disabled:x,children:x?"Saving…":"Save"})]})]})]})})}function k6(e){const[t,r]=S.useState(null),a=e.items.filter(l=>l.status!=="deleted").length;return d.jsxs("section",{className:"rounded-md border bg-white",children:[d.jsxs("header",{className:"flex items-center justify-between border-b px-4 py-2",children:[d.jsxs("h3",{className:"text-sm font-medium",children:["MCP Servers (",a,")"]}),!e.disabled&&d.jsxs(be,{size:"sm",variant:"outline",onClick:()=>r({mode:"add"}),children:[d.jsx(fl,{className:"h-3.5 w-3.5 mr-1.5"})," Add"]})]}),d.jsx("div",{className:"px-4 py-3 space-y-2",children:e.items.length===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"No MCP servers. Add one to extend the agent's tools."}):e.items.map(l=>d.jsxs(Og,{status:l.status,onEdit:()=>r({mode:"edit",key:l.key,initial:l.value}),onDelete:()=>e.onDelete(l.key),onUndo:()=>e.onUndoDelete(l.key),disabled:e.disabled,children:[d.jsx("span",{className:"text-xs rounded bg-gray-100 px-1.5 py-0.5 font-mono",children:l.value.transport}),d.jsx("span",{className:"font-medium font-mono",children:l.value.name}),d.jsx("span",{className:"text-xs text-muted-foreground truncate",children:j6(l.value)})]},l.key))}),t&&d.jsx(E6,{open:!!t,onOpenChange:l=>!l&&r(null),initial:t.mode==="edit"?t.initial:null,forbiddenNames:e.otherNames(t.mode==="edit"?t.key:null),onSubmit:l=>{t.mode==="edit"?e.onUpdate(t.key,l):e.onAdd(l),r(null)}})]})}function j6(e){var t;if(e.transport==="stdio"){const r=(t=e.args)!=null&&t.length?` ${e.args.join(" ")}`:"";return`${e.command}${r}`}return e.url}function E6({open:e,onOpenChange:t,initial:r,forbiddenNames:a,onSubmit:l}){const[o,u]=S.useState((r==null?void 0:r.transport)??"stdio"),[f,m]=S.useState((r==null?void 0:r.name)??""),[h,v]=S.useState((r==null?void 0:r.transport)==="stdio"?r.command:""),[y,x]=S.useState((r==null?void 0:r.transport)==="stdio"&&r.args?r.args.join(" "):""),[b,j]=S.useState(r&&(r.transport==="http"||r.transport==="sse")?r.url:""),[k,N]=S.useState(null);S.useEffect(()=>{e&&(u((r==null?void 0:r.transport)??"stdio"),m((r==null?void 0:r.name)??""),v((r==null?void 0:r.transport)==="stdio"?r.command:""),x((r==null?void 0:r.transport)==="stdio"&&r.args?r.args.join(" "):""),j(r&&(r.transport==="http"||r.transport==="sse")?r.url:""),N(null))},[e,r]);function E(R){if(R.preventDefault(),!f.match(/^[a-z0-9][a-z0-9_-]{0,63}$/i)){N("Name must start alphanumeric and contain only a-z0-9_-.");return}if(a.has(f.toLowerCase())){N(`Another MCP server is already named "${f}".`);return}let A;if(o==="stdio"){if(!h.trim()){N("stdio transport requires a command.");return}const I=y.trim().split(/\s+/).filter(q=>q.length>0);A={name:f,transport:"stdio",command:h.trim(),...I.length?{args:I}:{}}}else{const I=b.trim();try{new URL(I)}catch{N("URL is not valid.");return}A={name:f,transport:o,url:I}}l(A)}return d.jsx(Mn,{open:e,onOpenChange:t,children:d.jsxs(Sn,{children:[d.jsx(Wn,{children:d.jsx(Un,{children:r?"Edit MCP server":"Add MCP server"})}),d.jsxs("form",{onSubmit:E,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"mcp-transport",children:"Transport"}),d.jsxs("select",{id:"mcp-transport",value:o,onChange:R=>u(R.target.value),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[d.jsx("option",{value:"stdio",children:"stdio (local subprocess)"}),d.jsx("option",{value:"http",children:"http"}),d.jsx("option",{value:"sse",children:"sse"})]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"mcp-name",children:"Name"}),d.jsx(gt,{id:"mcp-name",value:f,onChange:R=>m(R.target.value),placeholder:"playwright",className:"font-mono"})]}),o==="stdio"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"mcp-command",children:"Command"}),d.jsx(gt,{id:"mcp-command",value:h,onChange:R=>v(R.target.value),placeholder:"/usr/local/bin/playwright-mcp",className:"font-mono"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"mcp-args",children:"Args (space-separated, optional)"}),d.jsx(gt,{id:"mcp-args",value:y,onChange:R=>x(R.target.value),placeholder:"--port 3000",className:"font-mono"})]})]}):d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"mcp-url",children:"URL"}),d.jsx(gt,{id:"mcp-url",value:b,onChange:R=>j(R.target.value),placeholder:"https://internal.api/mcp",className:"font-mono"})]}),k&&d.jsx("p",{className:"text-sm text-destructive",children:k}),d.jsxs(Ln,{children:[d.jsx(be,{type:"button",variant:"ghost",onClick:()=>t(!1),children:"Cancel"}),d.jsx(be,{type:"submit",children:r?"Done":"Add"})]})]})]})})}const S1=[{value:"claude-opus-4-6",label:"claude-opus-4-6",hint:"most capable"},{value:"claude-sonnet-4-6",label:"claude-sonnet-4-6",hint:"default"},{value:"claude-haiku-4-5",label:"claude-haiku-4-5",hint:"fastest"}];function C6({value:e,baseline:t,onChange:r,onRevert:a,disabled:l}){const o=e!==t,u=!S1.some(f=>f.value===e)&&e!=="";return d.jsxs("section",{className:`rounded-md border bg-white ${o?"border-amber-300":"border-gray-200"}`,children:[d.jsxs("header",{className:"flex items-center justify-between border-b px-4 py-2",children:[d.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:["Model",o&&d.jsx("span",{className:"text-xs rounded bg-amber-100 px-1.5 py-0.5 text-amber-900",children:"changed"})]}),o&&d.jsx(be,{size:"sm",variant:"ghost",onClick:a,disabled:l,children:"Revert"})]}),d.jsxs("div",{className:"px-4 py-3 space-y-2",children:[d.jsxs("select",{value:e,onChange:f=>r(f.target.value),disabled:l,className:"flex h-9 w-full max-w-md rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50",children:[d.jsx("option",{value:"",children:"(agent default)"}),S1.map(f=>d.jsxs("option",{value:f.value,children:[f.label,f.hint?` — ${f.hint}`:""]},f.value)),u&&d.jsxs("option",{value:e,children:[e," — custom"]})]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Choose which Claude model powers this agent. Applies to new sessions immediately; active sessions switch on their next message."})]})]})}function N6(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const _6=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,A6=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,T6={};function w1(e,t){return(T6.jsx?A6:_6).test(e)}const z6=/[ \t\n\f\r]/g;function R6(e){return typeof e=="object"?e.type==="text"?k1(e.value):!1:k1(e)}function k1(e){return e.replace(z6,"")===""}class yu{constructor(t,r,a){this.normal=r,this.property=t,a&&(this.space=a)}}yu.prototype.normal={};yu.prototype.property={};yu.prototype.space=void 0;function Uj(e,t){const r={},a={};for(const l of e)Object.assign(r,l.property),Object.assign(a,l.normal);return new yu(r,a,t)}function Op(e){return e.toLowerCase()}class Pn{constructor(t,r){this.attribute=r,this.property=t}}Pn.prototype.attribute="";Pn.prototype.booleanish=!1;Pn.prototype.boolean=!1;Pn.prototype.commaOrSpaceSeparated=!1;Pn.prototype.commaSeparated=!1;Pn.prototype.defined=!1;Pn.prototype.mustUseProperty=!1;Pn.prototype.number=!1;Pn.prototype.overloadedBoolean=!1;Pn.prototype.property="";Pn.prototype.spaceSeparated=!1;Pn.prototype.space=void 0;let O6=0;const Pe=gl(),qt=gl(),Dp=gl(),fe=gl(),bt=gl(),ps=gl(),Gn=gl();function gl(){return 2**++O6}const Mp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pe,booleanish:qt,commaOrSpaceSeparated:Gn,commaSeparated:ps,number:fe,overloadedBoolean:Dp,spaceSeparated:bt},Symbol.toStringTag,{value:"Module"})),Mm=Object.keys(Mp);class Dg extends Pn{constructor(t,r,a,l){let o=-1;if(super(t,r),j1(this,"space",l),typeof a=="number")for(;++o<Mm.length;){const u=Mm[o];j1(this,Mm[o],(a&Mp[u])===Mp[u])}}}Dg.prototype.defined=!0;function j1(e,t,r){r&&(e[t]=r)}function Bs(e){const t={},r={};for(const[a,l]of Object.entries(e.properties)){const o=new Dg(a,e.transform(e.attributes||{},a),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,r[Op(a)]=a,r[Op(o.attribute)]=a}return new yu(t,r,e.space)}const Ij=Bs({properties:{ariaActiveDescendant:null,ariaAtomic:qt,ariaAutoComplete:null,ariaBusy:qt,ariaChecked:qt,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:qt,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:qt,ariaFlowTo:bt,ariaGrabbed:qt,ariaHasPopup:null,ariaHidden:qt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:fe,ariaLive:null,ariaModal:qt,ariaMultiLine:qt,ariaMultiSelectable:qt,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:qt,ariaReadOnly:qt,ariaRelevant:null,ariaRequired:qt,ariaRoleDescription:bt,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:qt,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Bj(e,t){return t in e?e[t]:t}function Pj(e,t){return Bj(e,t.toLowerCase())}const D6=Bs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ps,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:Pe,allowPaymentRequest:Pe,allowUserMedia:Pe,alt:null,as:null,async:Pe,autoCapitalize:null,autoComplete:bt,autoFocus:Pe,autoPlay:Pe,blocking:bt,capture:null,charSet:null,checked:Pe,cite:null,className:bt,cols:fe,colSpan:null,content:null,contentEditable:qt,controls:Pe,controlsList:bt,coords:fe|ps,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pe,defer:Pe,dir:null,dirName:null,disabled:Pe,download:Dp,draggable:qt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pe,formTarget:null,headers:bt,height:fe,hidden:Dp,high:fe,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:Pe,inputMode:null,integrity:null,is:null,isMap:Pe,itemId:null,itemProp:bt,itemRef:bt,itemScope:Pe,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pe,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:Pe,muted:Pe,name:null,nonce:null,noModule:Pe,noValidate:Pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Pe,optimum:fe,pattern:null,ping:bt,placeholder:null,playsInline:Pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pe,referrerPolicy:null,rel:bt,required:Pe,reversed:Pe,rows:fe,rowSpan:fe,sandbox:bt,scope:null,scoped:Pe,seamless:Pe,selected:Pe,shadowRootClonable:Pe,shadowRootDelegatesFocus:Pe,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:qt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:Pe,useMap:null,value:qt,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Pe,declare:Pe,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:Pe,noHref:Pe,noShade:Pe,noWrap:Pe,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:qt,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pe,disableRemotePlayback:Pe,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:Pj}),M6=Bs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Gn,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:bt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:Pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ps,g2:ps,glyphName:ps,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:Gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gn,rev:Gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gn,requiredFeatures:Gn,requiredFonts:Gn,requiredFormats:Gn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:Gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Gn,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Bj}),$j=Bs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),qj=Bs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Pj}),Fj=Bs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),L6={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},U6=/[A-Z]/g,E1=/-[a-z]/g,I6=/^data[-\w.:]+$/i;function B6(e,t){const r=Op(t);let a=t,l=Pn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&I6.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(E1,$6);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!E1.test(o)){let u=o.replace(U6,P6);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}l=Dg}return new l(a,t)}function P6(e){return"-"+e.toLowerCase()}function $6(e){return e.charAt(1).toUpperCase()}const q6=Uj([Ij,D6,$j,qj,Fj],"html"),Mg=Uj([Ij,M6,$j,qj,Fj],"svg");function F6(e){return e.join(" ").trim()}var as={},Lm,C1;function H6(){if(C1)return Lm;C1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
333
- `,h="/",v="*",y="",x="comment",b="declaration";function j(N,E){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];E=E||{};var R=1,A=1;function I(de){var te=de.match(t);te&&(R+=te.length);var B=de.lastIndexOf(m);A=~B?de.length-B:A+de.length}function q(){var de={line:R,column:A};return function(te){return te.position=new z(de),W(),te}}function z(de){this.start=de,this.end={line:R,column:A},this.source=E.source}z.prototype.content=N;function $(de){var te=new Error(E.source+":"+R+":"+A+": "+de);if(te.reason=de,te.filename=E.source,te.line=R,te.column=A,te.source=N,!E.silent)throw te}function Z(de){var te=de.exec(N);if(te){var B=te[0];return I(B),N=N.slice(B.length),te}}function W(){Z(r)}function F(de){var te;for(de=de||[];te=re();)te!==!1&&de.push(te);return de}function re(){var de=q();if(!(h!=N.charAt(0)||v!=N.charAt(1))){for(var te=2;y!=N.charAt(te)&&(v!=N.charAt(te)||h!=N.charAt(te+1));)++te;if(te+=2,y===N.charAt(te-1))return $("End of comment missing");var B=N.slice(2,te-2);return A+=2,I(B),N=N.slice(te),A+=2,de({type:x,comment:B})}}function le(){var de=q(),te=Z(a);if(te){if(re(),!Z(l))return $("property missing ':'");var B=Z(o),J=de({type:b,property:k(te[0].replace(e,y)),value:B?k(B[0].replace(e,y)):y});return Z(u),J}}function X(){var de=[];F(de);for(var te;te=le();)te!==!1&&(de.push(te),F(de));return de}return W(),X()}function k(N){return N?N.replace(f,y):y}return Lm=j,Lm}var N1;function Z6(){if(N1)return as;N1=1;var e=as&&as.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(as,"__esModule",{value:!0}),as.default=r;const t=e(H6());function r(a,l){let o=null;if(!a||typeof a!="string")return o;const u=(0,t.default)(a),f=typeof l=="function";return u.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:v}=m;f?l(h,v,m):v&&(o=o||{},o[h]=v)}),o}return as}var Bo={},_1;function V6(){if(_1)return Bo;_1=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,o=function(h){return!h||r.test(h)||e.test(h)},u=function(h,v){return v.toUpperCase()},f=function(h,v){return"".concat(v,"-")},m=function(h,v){return v===void 0&&(v={}),o(h)?h:(h=h.toLowerCase(),v.reactCompat?h=h.replace(l,f):h=h.replace(a,f),h.replace(t,u))};return Bo.camelCase=m,Bo}var Po,A1;function Q6(){if(A1)return Po;A1=1;var e=Po&&Po.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(Z6()),r=V6();function a(l,o){var u={};return!l||typeof l!="string"||(0,t.default)(l,function(f,m){f&&m&&(u[(0,r.camelCase)(f,o)]=m)}),u}return a.default=a,Po=a,Po}var G6=Q6();const K6=kd(G6),Hj=Zj("end"),Lg=Zj("start");function Zj(e){return t;function t(r){const a=r&&r.position&&r.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function Y6(e){const t=Lg(e),r=Hj(e);if(t&&r)return{start:t,end:r}}function Qo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?T1(e.position):"start"in e||"end"in e?T1(e):"line"in e||"column"in e?Lp(e):""}function Lp(e){return z1(e&&e.line)+":"+z1(e&&e.column)}function T1(e){return Lp(e&&e.start)+"-"+Lp(e&&e.end)}function z1(e){return e&&typeof e=="number"?e:1}class hn extends Error{constructor(t,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let l="",o={},u=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof t=="string"?l=t:!o.cause&&t&&(u=!0,l=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const m=a.indexOf(":");m===-1?o.ruleId=a:(o.source=a.slice(0,m),o.ruleId=a.slice(m+1))}if(!o.place&&o.ancestors&&o.ancestors){const m=o.ancestors[o.ancestors.length-1];m&&(o.place=m.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=Qo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=u&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}hn.prototype.file="";hn.prototype.name="";hn.prototype.reason="";hn.prototype.message="";hn.prototype.stack="";hn.prototype.column=void 0;hn.prototype.line=void 0;hn.prototype.ancestors=void 0;hn.prototype.cause=void 0;hn.prototype.fatal=void 0;hn.prototype.place=void 0;hn.prototype.ruleId=void 0;hn.prototype.source=void 0;const Ug={}.hasOwnProperty,X6=new Map,J6=/[A-Z]/g,W6=new Set(["table","tbody","thead","tfoot","tr"]),eU=new Set(["td","th"]),Vj="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tU(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=uU(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=oU(r,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Mg:q6,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Qj(l,e,void 0);return o&&typeof o!="string"?o:l.create(e,l.Fragment,{children:o||void 0},void 0)}function Qj(e,t,r){if(t.type==="element")return nU(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return rU(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return aU(e,t,r);if(t.type==="mdxjsEsm")return iU(e,t);if(t.type==="root")return lU(e,t,r);if(t.type==="text")return sU(e,t)}function nU(e,t,r){const a=e.schema;let l=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(l=Mg,e.schema=l),e.ancestors.push(t);const o=Kj(e,t.tagName,!1),u=cU(e,t);let f=Bg(e,t);return W6.has(t.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!R6(m):!0})),Gj(e,u,o,t),Ig(u,f),e.ancestors.pop(),e.schema=a,e.create(t,o,u,r)}function rU(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}au(e,t.position)}function iU(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);au(e,t.position)}function aU(e,t,r){const a=e.schema;let l=a;t.name==="svg"&&a.space==="html"&&(l=Mg,e.schema=l),e.ancestors.push(t);const o=t.name===null?e.Fragment:Kj(e,t.name,!0),u=dU(e,t),f=Bg(e,t);return Gj(e,u,o,t),Ig(u,f),e.ancestors.pop(),e.schema=a,e.create(t,o,u,r)}function lU(e,t,r){const a={};return Ig(a,Bg(e,t)),e.create(t,e.Fragment,a,r)}function sU(e,t){return t.value}function Gj(e,t,r,a){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=a)}function Ig(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function oU(e,t,r){return a;function a(l,o,u,f){const h=Array.isArray(u.children)?r:t;return f?h(o,u,f):h(o,u)}}function uU(e,t){return r;function r(a,l,o,u){const f=Array.isArray(o.children),m=Lg(a);return t(l,o,u,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function cU(e,t){const r={};let a,l;for(l in t.properties)if(l!=="children"&&Ug.call(t.properties,l)){const o=fU(e,l,t.properties[l]);if(o){const[u,f]=o;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&eU.has(t.tagName)?a=f:r[u]=f}}if(a){const o=r.style||(r.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function dU(e,t){const r={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const u=o.expression;u.type;const f=u.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else au(e,t.position);else{const l=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else au(e,t.position);else o=a.value===null?!0:a.value;r[l]=o}return r}function Bg(e,t){const r=[];let a=-1;const l=e.passKeys?new Map:X6;for(;++a<t.children.length;){const o=t.children[a];let u;if(e.passKeys){const m=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(m){const h=l.get(m)||0;u=m+"-"+h,l.set(m,h+1)}}const f=Qj(e,o,u);f!==void 0&&r.push(f)}return r}function fU(e,t,r){const a=B6(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?N6(r):F6(r)),a.property==="style"){let l=typeof r=="object"?r:hU(e,String(r));return e.stylePropertyNameCase==="css"&&(l=mU(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&a.space?L6[a.property]||a.property:a.attribute,r]}}function hU(e,t){try{return K6(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const a=r,l=new hn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=Vj+"#cannot-parse-style-attribute",l}}function Kj(e,t,r){let a;if(!r)a={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let o=-1,u;for(;++o<l.length;){const f=w1(l[o])?{type:"Identifier",name:l[o]}:{type:"Literal",value:l[o]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}a=u}else a=w1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const l=a.value;return Ug.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(a);au(e)}function au(e,t){const r=new hn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Vj+"#cannot-handle-mdx-estrees-without-createevaluater",r}function mU(e){const t={};let r;for(r in e)Ug.call(e,r)&&(t[pU(r)]=e[r]);return t}function pU(e){let t=e.replace(J6,gU);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function gU(e){return"-"+e.toLowerCase()}const Um={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},yU={};function Pg(e,t){const r=yU,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Yj(e,a,l)}function Yj(e,t,r){if(vU(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return R1(e.children,t,r)}return Array.isArray(e)?R1(e,t,r):""}function R1(e,t,r){const a=[];let l=-1;for(;++l<e.length;)a[l]=Yj(e[l],t,r);return a.join("")}function vU(e){return!!(e&&typeof e=="object")}const O1=document.createElement("i");function $g(e){const t="&"+e+";";O1.innerHTML=t;const r=O1.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Jn(e,t,r,a){const l=e.length;let o=0,u;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,r=r>0?r:0,a.length<1e4)u=Array.from(a),u.unshift(t,r),e.splice(...u);else for(r&&e.splice(t,r);o<a.length;)u=a.slice(o,o+1e4),u.unshift(t,0),e.splice(...u),o+=1e4,t+=1e4}function mr(e,t){return e.length>0?(Jn(e,e.length,0,t),e):t}const D1={}.hasOwnProperty;function Xj(e){const t={};let r=-1;for(;++r<e.length;)xU(t,e[r]);return t}function xU(e,t){let r;for(r in t){const l=(D1.call(e,r)?e[r]:void 0)||(e[r]={}),o=t[r];let u;if(o)for(u in o){D1.call(l,u)||(l[u]=[]);const f=o[u];bU(l[u],Array.isArray(f)?f:f?[f]:[])}}}function bU(e,t){let r=-1;const a=[];for(;++r<t.length;)(t[r].add==="after"?e:a).push(t[r]);Jn(e,0,0,a)}function Jj(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&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 Er(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const bn=Ea(/[A-Za-z]/),fn=Ea(/[\dA-Za-z]/),SU=Ea(/[#-'*+\--9=?A-Z^-~]/);function xd(e){return e!==null&&(e<32||e===127)}const Up=Ea(/\d/),wU=Ea(/[\dA-Fa-f]/),kU=Ea(/[!-/:-@[-`{-~]/);function ze(e){return e!==null&&e<-2}function xt(e){return e!==null&&(e<0||e===32)}function Ve(e){return e===-2||e===-1||e===32}const qd=Ea(new RegExp("\\p{P}|\\p{S}","u")),dl=Ea(/\s/);function Ea(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Ps(e){const t=[];let r=-1,a=0,l=0;for(;++r<e.length;){const o=e.charCodeAt(r);let u="";if(o===37&&fn(e.charCodeAt(r+1))&&fn(e.charCodeAt(r+2)))l=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(u=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(r+1);o<56320&&f>56319&&f<57344?(u=String.fromCharCode(o,f),l=1):u="�"}else u=String.fromCharCode(o);u&&(t.push(e.slice(a,r),encodeURIComponent(u)),a=r+l+1,u=""),l&&(r+=l,l=0)}return t.join("")+e.slice(a)}function et(e,t,r,a){const l=a?a-1:Number.POSITIVE_INFINITY;let o=0;return u;function u(m){return Ve(m)?(e.enter(r),f(m)):t(m)}function f(m){return Ve(m)&&o++<l?(e.consume(m),f):(e.exit(r),t(m))}}const jU={tokenize:EU};function EU(e){const t=e.attempt(this.parser.constructs.contentInitial,a,l);let r;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),et(e,t,"linePrefix")}function l(f){return e.enter("paragraph"),o(f)}function o(f){const m=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return ze(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),u)}}const CU={tokenize:NU},M1={tokenize:_U};function NU(e){const t=this,r=[];let a=0,l,o,u;return f;function f(A){if(a<r.length){const I=r[a];return t.containerState=I[1],e.attempt(I[0].continuation,m,h)(A)}return h(A)}function m(A){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&R();const I=t.events.length;let q=I,z;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){z=t.events[q][1].end;break}E(a);let $=I;for(;$<t.events.length;)t.events[$][1].end={...z},$++;return Jn(t.events,q+1,0,t.events.slice(I)),t.events.length=$,h(A)}return f(A)}function h(A){if(a===r.length){if(!l)return x(A);if(l.currentConstruct&&l.currentConstruct.concrete)return j(A);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(M1,v,y)(A)}function v(A){return l&&R(),E(a),x(A)}function y(A){return t.parser.lazy[t.now().line]=a!==r.length,u=t.now().offset,j(A)}function x(A){return t.containerState={},e.attempt(M1,b,j)(A)}function b(A){return a++,r.push([t.currentConstruct,t.containerState]),x(A)}function j(A){if(A===null){l&&R(),E(0),e.consume(A);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:o}),k(A)}function k(A){if(A===null){N(e.exit("chunkFlow"),!0),E(0),e.consume(A);return}return ze(A)?(e.consume(A),N(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(A),k)}function N(A,I){const q=t.sliceStream(A);if(I&&q.push(null),A.previous=o,o&&(o.next=A),o=A,l.defineSkip(A.start),l.write(q),t.parser.lazy[A.start.line]){let z=l.events.length;for(;z--;)if(l.events[z][1].start.offset<u&&(!l.events[z][1].end||l.events[z][1].end.offset>u))return;const $=t.events.length;let Z=$,W,F;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(W){F=t.events[Z][1].end;break}W=!0}for(E(a),z=$;z<t.events.length;)t.events[z][1].end={...F},z++;Jn(t.events,Z+1,0,t.events.slice($)),t.events.length=z}}function E(A){let I=r.length;for(;I-- >A;){const q=r[I];t.containerState=q[1],q[0].exit.call(t,e)}r.length=A}function R(){l.write([null]),o=void 0,l=void 0,t.containerState._closeFlow=void 0}}function _U(e,t,r){return et(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rs(e){if(e===null||xt(e)||dl(e))return 1;if(qd(e))return 2}function Fd(e,t,r){const a=[];let l=-1;for(;++l<e.length;){const o=e[l].resolveAll;o&&!a.includes(o)&&(t=o(t,r),a.push(o))}return t}const Ip={name:"attention",resolveAll:AU,tokenize:TU};function AU(e,t){let r=-1,a,l,o,u,f,m,h,v;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(a=r;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[a][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;m=e[a][1].end.offset-e[a][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const y={...e[a][1].end},x={...e[r][1].start};L1(y,-m),L1(x,m),u={type:m>1?"strongSequence":"emphasisSequence",start:y,end:{...e[a][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:x},o={type:m>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[r][1].start}},l={type:m>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[a][1].end={...u.start},e[r][1].start={...f.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=mr(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=mr(h,[["enter",l,t],["enter",u,t],["exit",u,t],["enter",o,t]]),h=mr(h,Fd(t.parser.constructs.insideSpan.null,e.slice(a+1,r),t)),h=mr(h,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",l,t]]),e[r][1].end.offset-e[r][1].start.offset?(v=2,h=mr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])):v=0,Jn(e,a-1,r-a+3,h),r=a+h.length-v-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function TU(e,t){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,l=Rs(a);let o;return u;function u(m){return o=m,e.enter("attentionSequence"),f(m)}function f(m){if(m===o)return e.consume(m),f;const h=e.exit("attentionSequence"),v=Rs(m),y=!v||v===2&&l||r.includes(m),x=!l||l===2&&v||r.includes(a);return h._open=!!(o===42?y:y&&(l||!x)),h._close=!!(o===42?x:x&&(v||!y)),t(m)}}function L1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const zU={name:"autolink",tokenize:RU};function RU(e,t,r){let a=0;return l;function l(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(b){return bn(b)?(e.consume(b),u):b===64?r(b):h(b)}function u(b){return b===43||b===45||b===46||fn(b)?(a=1,f(b)):h(b)}function f(b){return b===58?(e.consume(b),a=0,m):(b===43||b===45||b===46||fn(b))&&a++<32?(e.consume(b),f):(a=0,h(b))}function m(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||xd(b)?r(b):(e.consume(b),m)}function h(b){return b===64?(e.consume(b),v):SU(b)?(e.consume(b),h):r(b)}function v(b){return fn(b)?y(b):r(b)}function y(b){return b===46?(e.consume(b),a=0,v):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):x(b)}function x(b){if((b===45||fn(b))&&a++<63){const j=b===45?x:y;return e.consume(b),j}return r(b)}}const vu={partial:!0,tokenize:OU};function OU(e,t,r){return a;function a(o){return Ve(o)?et(e,l,"linePrefix")(o):l(o)}function l(o){return o===null||ze(o)?t(o):r(o)}}const Wj={continuation:{tokenize:MU},exit:LU,name:"blockQuote",tokenize:DU};function DU(e,t,r){const a=this;return l;function l(u){if(u===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return r(u)}function o(u){return Ve(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function MU(e,t,r){const a=this;return l;function l(u){return Ve(u)?et(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(Wj,t,r)(u)}}function LU(e){e.exit("blockQuote")}const eE={name:"characterEscape",tokenize:UU};function UU(e,t,r){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),l}function l(o){return kU(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(o)}}const tE={name:"characterReference",tokenize:IU};function IU(e,t,r){const a=this;let l=0,o,u;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),m}function m(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,u=fn,v(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=wU,v):(e.enter("characterReferenceValue"),o=7,u=Up,v(y))}function v(y){if(y===59&&l){const x=e.exit("characterReferenceValue");return u===fn&&!$g(a.sliceSerialize(x))?r(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(y)&&l++<o?(e.consume(y),v):r(y)}}const U1={partial:!0,tokenize:PU},I1={concrete:!0,name:"codeFenced",tokenize:BU};function BU(e,t,r){const a=this,l={partial:!0,tokenize:q};let o=0,u=0,f;return m;function m(z){return h(z)}function h(z){const $=a.events[a.events.length-1];return o=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,f=z,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),v(z)}function v(z){return z===f?(u++,e.consume(z),v):u<3?r(z):(e.exit("codeFencedFenceSequence"),Ve(z)?et(e,y,"whitespace")(z):y(z))}function y(z){return z===null||ze(z)?(e.exit("codeFencedFence"),a.interrupt?t(z):e.check(U1,k,I)(z)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(z))}function x(z){return z===null||ze(z)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(z)):Ve(z)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),et(e,b,"whitespace")(z)):z===96&&z===f?r(z):(e.consume(z),x)}function b(z){return z===null||ze(z)?y(z):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),j(z))}function j(z){return z===null||ze(z)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(z)):z===96&&z===f?r(z):(e.consume(z),j)}function k(z){return e.attempt(l,I,N)(z)}function N(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),E}function E(z){return o>0&&Ve(z)?et(e,R,"linePrefix",o+1)(z):R(z)}function R(z){return z===null||ze(z)?e.check(U1,k,I)(z):(e.enter("codeFlowValue"),A(z))}function A(z){return z===null||ze(z)?(e.exit("codeFlowValue"),R(z)):(e.consume(z),A)}function I(z){return e.exit("codeFenced"),t(z)}function q(z,$,Z){let W=0;return F;function F(te){return z.enter("lineEnding"),z.consume(te),z.exit("lineEnding"),re}function re(te){return z.enter("codeFencedFence"),Ve(te)?et(z,le,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):le(te)}function le(te){return te===f?(z.enter("codeFencedFenceSequence"),X(te)):Z(te)}function X(te){return te===f?(W++,z.consume(te),X):W>=u?(z.exit("codeFencedFenceSequence"),Ve(te)?et(z,de,"whitespace")(te):de(te)):Z(te)}function de(te){return te===null||ze(te)?(z.exit("codeFencedFence"),$(te)):Z(te)}}}function PU(e,t,r){const a=this;return l;function l(u){return u===null?r(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return a.parser.lazy[a.now().line]?r(u):t(u)}}const Im={name:"codeIndented",tokenize:qU},$U={partial:!0,tokenize:FU};function qU(e,t,r){const a=this;return l;function l(h){return e.enter("codeIndented"),et(e,o,"linePrefix",5)(h)}function o(h){const v=a.events[a.events.length-1];return v&&v[1].type==="linePrefix"&&v[2].sliceSerialize(v[1],!0).length>=4?u(h):r(h)}function u(h){return h===null?m(h):ze(h)?e.attempt($U,u,m)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||ze(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),f)}function m(h){return e.exit("codeIndented"),t(h)}}function FU(e,t,r){const a=this;return l;function l(u){return a.parser.lazy[a.now().line]?r(u):ze(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):et(e,o,"linePrefix",5)(u)}function o(u){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):ze(u)?l(u):r(u)}}const HU={name:"codeText",previous:VU,resolve:ZU,tokenize:QU};function ZU(e){let t=e.length-4,r=3,a,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=r;++a<t;)if(e[a][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(a=r-1,t++;++a<=t;)l===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(l=a):(a===t||e[a][1].type==="lineEnding")&&(e[l][1].type="codeTextData",a!==l+2&&(e[l][1].end=e[a-1][1].end,e.splice(l+2,a-l-2),t-=a-l-2,a=l+2),l=void 0);return e}function VU(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function QU(e,t,r){let a=0,l,o;return u;function u(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),a++,f):(e.exit("codeTextSequence"),m(y))}function m(y){return y===null?r(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),m):y===96?(o=e.enter("codeTextSequence"),l=0,v(y)):ze(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),m):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||ze(y)?(e.exit("codeTextData"),m(y)):(e.consume(y),h)}function v(y){return y===96?(e.consume(y),l++,v):l===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(o.type="codeTextData",h(y))}}class GU{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,r,a){const l=r||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return a&&$o(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),$o(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),$o(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);$o(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);$o(this.left,r.reverse())}}}function $o(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function nE(e){const t={};let r=-1,a,l,o,u,f,m,h;const v=new GU(e);for(;++r<v.length;){for(;r in t;)r=t[r];if(a=v.get(r),r&&a[1].type==="chunkFlow"&&v.get(r-1)[1].type==="listItemPrefix"&&(m=a[1]._tokenizer.events,o=0,o<m.length&&m[o][1].type==="lineEndingBlank"&&(o+=2),o<m.length&&m[o][1].type==="content"))for(;++o<m.length&&m[o][1].type!=="content";)m[o][1].type==="chunkText"&&(m[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,KU(v,r)),r=t[r],h=!0);else if(a[1]._container){for(o=r,l=void 0;o--;)if(u=v.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(l&&(v.get(l)[1].type="lineEndingBlank"),u[1].type="lineEnding",l=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;l&&(a[1].end={...v.get(l)[1].start},f=v.slice(l,r),f.unshift(a),v.splice(l,r-l+1,f))}}return Jn(e,0,Number.POSITIVE_INFINITY,v.slice(0)),!h}function KU(e,t){const r=e.get(t)[1],a=e.get(t)[2];let l=t-1;const o=[];let u=r._tokenizer;u||(u=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,m=[],h={};let v,y,x=-1,b=r,j=0,k=0;const N=[k];for(;b;){for(;e.get(++l)[1]!==b;);o.push(l),b._tokenizer||(v=a.sliceStream(b),b.next||v.push(null),y&&u.defineSkip(b.start),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(v),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=r;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(k=x+1,N.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(u.events=[],b?(b._tokenizer=void 0,b.previous=void 0):N.pop(),x=N.length;x--;){const E=f.slice(N[x],N[x+1]),R=o.pop();m.push([R,R+E.length-1]),e.splice(R,2,E)}for(m.reverse(),x=-1;++x<m.length;)h[j+m[x][0]]=j+m[x][1],j+=m[x][1]-m[x][0]-1;return h}const YU={resolve:JU,tokenize:WU},XU={partial:!0,tokenize:e9};function JU(e){return nE(e),e}function WU(e,t){let r;return a;function a(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?o(f):ze(f)?e.check(XU,u,o)(f):(e.consume(f),l)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function u(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function e9(e,t,r){const a=this;return l;function l(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),et(e,o,"linePrefix")}function o(u){if(u===null||ze(u))return r(u);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):e.interrupt(a.parser.constructs.flow,r,t)(u)}}function rE(e,t,r,a,l,o,u,f,m){const h=m||Number.POSITIVE_INFINITY;let v=0;return y;function y(E){return E===60?(e.enter(a),e.enter(l),e.enter(o),e.consume(E),e.exit(o),x):E===null||E===32||E===41||xd(E)?r(E):(e.enter(a),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(E))}function x(E){return E===62?(e.enter(o),e.consume(E),e.exit(o),e.exit(l),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===62?(e.exit("chunkString"),e.exit(f),x(E)):E===null||E===60||ze(E)?r(E):(e.consume(E),E===92?j:b)}function j(E){return E===60||E===62||E===92?(e.consume(E),b):b(E)}function k(E){return!v&&(E===null||E===41||xt(E))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(a),t(E)):v<h&&E===40?(e.consume(E),v++,k):E===41?(e.consume(E),v--,k):E===null||E===32||E===40||xd(E)?r(E):(e.consume(E),E===92?N:k)}function N(E){return E===40||E===41||E===92?(e.consume(E),k):k(E)}}function iE(e,t,r,a,l,o){const u=this;let f=0,m;return h;function h(b){return e.enter(a),e.enter(l),e.consume(b),e.exit(l),e.enter(o),v}function v(b){return f>999||b===null||b===91||b===93&&!m||b===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?r(b):b===93?(e.exit(o),e.enter(l),e.consume(b),e.exit(l),e.exit(a),t):ze(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),v):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||ze(b)||f++>999?(e.exit("chunkString"),v(b)):(e.consume(b),m||(m=!Ve(b)),b===92?x:y)}function x(b){return b===91||b===92||b===93?(e.consume(b),f++,y):y(b)}}function aE(e,t,r,a,l,o){let u;return f;function f(x){return x===34||x===39||x===40?(e.enter(a),e.enter(l),e.consume(x),e.exit(l),u=x===40?41:x,m):r(x)}function m(x){return x===u?(e.enter(l),e.consume(x),e.exit(l),e.exit(a),t):(e.enter(o),h(x))}function h(x){return x===u?(e.exit(o),m(u)):x===null?r(x):ze(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),et(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),v(x))}function v(x){return x===u||x===null||ze(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?y:v)}function y(x){return x===u||x===92?(e.consume(x),v):v(x)}}function Go(e,t){let r;return a;function a(l){return ze(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,a):Ve(l)?et(e,a,r?"linePrefix":"lineSuffix")(l):t(l)}}const t9={name:"definition",tokenize:r9},n9={partial:!0,tokenize:i9};function r9(e,t,r){const a=this;let l;return o;function o(b){return e.enter("definition"),u(b)}function u(b){return iE.call(a,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return l=Er(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),m):r(b)}function m(b){return xt(b)?Go(e,h)(b):h(b)}function h(b){return rE(e,v,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function v(b){return e.attempt(n9,y,y)(b)}function y(b){return Ve(b)?et(e,x,"whitespace")(b):x(b)}function x(b){return b===null||ze(b)?(e.exit("definition"),a.parser.defined.push(l),t(b)):r(b)}}function i9(e,t,r){return a;function a(f){return xt(f)?Go(e,l)(f):r(f)}function l(f){return aE(e,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return Ve(f)?et(e,u,"whitespace")(f):u(f)}function u(f){return f===null||ze(f)?t(f):r(f)}}const a9={name:"hardBreakEscape",tokenize:l9};function l9(e,t,r){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),l}function l(o){return ze(o)?(e.exit("hardBreakEscape"),t(o)):r(o)}}const s9={name:"headingAtx",resolve:o9,tokenize:u9};function o9(e,t){let r=e.length-2,a=3,l,o;return e[a][1].type==="whitespace"&&(a+=2),r-2>a&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&e[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(l={type:"atxHeadingText",start:e[a][1].start,end:e[r][1].end},o={type:"chunkText",start:e[a][1].start,end:e[r][1].end,contentType:"text"},Jn(e,a,r-a+1,[["enter",l,t],["enter",o,t],["exit",o,t],["exit",l,t]])),e}function u9(e,t,r){let a=0;return l;function l(v){return e.enter("atxHeading"),o(v)}function o(v){return e.enter("atxHeadingSequence"),u(v)}function u(v){return v===35&&a++<6?(e.consume(v),u):v===null||xt(v)?(e.exit("atxHeadingSequence"),f(v)):r(v)}function f(v){return v===35?(e.enter("atxHeadingSequence"),m(v)):v===null||ze(v)?(e.exit("atxHeading"),t(v)):Ve(v)?et(e,f,"whitespace")(v):(e.enter("atxHeadingText"),h(v))}function m(v){return v===35?(e.consume(v),m):(e.exit("atxHeadingSequence"),f(v))}function h(v){return v===null||v===35||xt(v)?(e.exit("atxHeadingText"),f(v)):(e.consume(v),h)}}const c9=["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"],B1=["pre","script","style","textarea"],d9={concrete:!0,name:"htmlFlow",resolveTo:m9,tokenize:p9},f9={partial:!0,tokenize:y9},h9={partial:!0,tokenize:g9};function m9(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function p9(e,t,r){const a=this;let l,o,u,f,m;return h;function h(_){return v(_)}function v(_){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(_),y}function y(_){return _===33?(e.consume(_),x):_===47?(e.consume(_),o=!0,k):_===63?(e.consume(_),l=3,a.interrupt?t:T):bn(_)?(e.consume(_),u=String.fromCharCode(_),N):r(_)}function x(_){return _===45?(e.consume(_),l=2,b):_===91?(e.consume(_),l=5,f=0,j):bn(_)?(e.consume(_),l=4,a.interrupt?t:T):r(_)}function b(_){return _===45?(e.consume(_),a.interrupt?t:T):r(_)}function j(_){const se="CDATA[";return _===se.charCodeAt(f++)?(e.consume(_),f===se.length?a.interrupt?t:le:j):r(_)}function k(_){return bn(_)?(e.consume(_),u=String.fromCharCode(_),N):r(_)}function N(_){if(_===null||_===47||_===62||xt(_)){const se=_===47,G=u.toLowerCase();return!se&&!o&&B1.includes(G)?(l=1,a.interrupt?t(_):le(_)):c9.includes(u.toLowerCase())?(l=6,se?(e.consume(_),E):a.interrupt?t(_):le(_)):(l=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(_):o?R(_):A(_))}return _===45||fn(_)?(e.consume(_),u+=String.fromCharCode(_),N):r(_)}function E(_){return _===62?(e.consume(_),a.interrupt?t:le):r(_)}function R(_){return Ve(_)?(e.consume(_),R):F(_)}function A(_){return _===47?(e.consume(_),F):_===58||_===95||bn(_)?(e.consume(_),I):Ve(_)?(e.consume(_),A):F(_)}function I(_){return _===45||_===46||_===58||_===95||fn(_)?(e.consume(_),I):q(_)}function q(_){return _===61?(e.consume(_),z):Ve(_)?(e.consume(_),q):A(_)}function z(_){return _===null||_===60||_===61||_===62||_===96?r(_):_===34||_===39?(e.consume(_),m=_,$):Ve(_)?(e.consume(_),z):Z(_)}function $(_){return _===m?(e.consume(_),m=null,W):_===null||ze(_)?r(_):(e.consume(_),$)}function Z(_){return _===null||_===34||_===39||_===47||_===60||_===61||_===62||_===96||xt(_)?q(_):(e.consume(_),Z)}function W(_){return _===47||_===62||Ve(_)?A(_):r(_)}function F(_){return _===62?(e.consume(_),re):r(_)}function re(_){return _===null||ze(_)?le(_):Ve(_)?(e.consume(_),re):r(_)}function le(_){return _===45&&l===2?(e.consume(_),B):_===60&&l===1?(e.consume(_),J):_===62&&l===4?(e.consume(_),U):_===63&&l===3?(e.consume(_),T):_===93&&l===5?(e.consume(_),Ae):ze(_)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(f9,L,X)(_)):_===null||ze(_)?(e.exit("htmlFlowData"),X(_)):(e.consume(_),le)}function X(_){return e.check(h9,de,L)(_)}function de(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),te}function te(_){return _===null||ze(_)?X(_):(e.enter("htmlFlowData"),le(_))}function B(_){return _===45?(e.consume(_),T):le(_)}function J(_){return _===47?(e.consume(_),u="",pe):le(_)}function pe(_){if(_===62){const se=u.toLowerCase();return B1.includes(se)?(e.consume(_),U):le(_)}return bn(_)&&u.length<8?(e.consume(_),u+=String.fromCharCode(_),pe):le(_)}function Ae(_){return _===93?(e.consume(_),T):le(_)}function T(_){return _===62?(e.consume(_),U):_===45&&l===2?(e.consume(_),T):le(_)}function U(_){return _===null||ze(_)?(e.exit("htmlFlowData"),L(_)):(e.consume(_),U)}function L(_){return e.exit("htmlFlow"),t(_)}}function g9(e,t,r){const a=this;return l;function l(u){return ze(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):r(u)}function o(u){return a.parser.lazy[a.now().line]?r(u):t(u)}}function y9(e,t,r){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(vu,t,r)}}const v9={name:"htmlText",tokenize:x9};function x9(e,t,r){const a=this;let l,o,u;return f;function f(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),m}function m(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),q):T===63?(e.consume(T),A):bn(T)?(e.consume(T),Z):r(T)}function h(T){return T===45?(e.consume(T),v):T===91?(e.consume(T),o=0,j):bn(T)?(e.consume(T),R):r(T)}function v(T){return T===45?(e.consume(T),b):r(T)}function y(T){return T===null?r(T):T===45?(e.consume(T),x):ze(T)?(u=y,J(T)):(e.consume(T),y)}function x(T){return T===45?(e.consume(T),b):y(T)}function b(T){return T===62?B(T):T===45?x(T):y(T)}function j(T){const U="CDATA[";return T===U.charCodeAt(o++)?(e.consume(T),o===U.length?k:j):r(T)}function k(T){return T===null?r(T):T===93?(e.consume(T),N):ze(T)?(u=k,J(T)):(e.consume(T),k)}function N(T){return T===93?(e.consume(T),E):k(T)}function E(T){return T===62?B(T):T===93?(e.consume(T),E):k(T)}function R(T){return T===null||T===62?B(T):ze(T)?(u=R,J(T)):(e.consume(T),R)}function A(T){return T===null?r(T):T===63?(e.consume(T),I):ze(T)?(u=A,J(T)):(e.consume(T),A)}function I(T){return T===62?B(T):A(T)}function q(T){return bn(T)?(e.consume(T),z):r(T)}function z(T){return T===45||fn(T)?(e.consume(T),z):$(T)}function $(T){return ze(T)?(u=$,J(T)):Ve(T)?(e.consume(T),$):B(T)}function Z(T){return T===45||fn(T)?(e.consume(T),Z):T===47||T===62||xt(T)?W(T):r(T)}function W(T){return T===47?(e.consume(T),B):T===58||T===95||bn(T)?(e.consume(T),F):ze(T)?(u=W,J(T)):Ve(T)?(e.consume(T),W):B(T)}function F(T){return T===45||T===46||T===58||T===95||fn(T)?(e.consume(T),F):re(T)}function re(T){return T===61?(e.consume(T),le):ze(T)?(u=re,J(T)):Ve(T)?(e.consume(T),re):W(T)}function le(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),l=T,X):ze(T)?(u=le,J(T)):Ve(T)?(e.consume(T),le):(e.consume(T),de)}function X(T){return T===l?(e.consume(T),l=void 0,te):T===null?r(T):ze(T)?(u=X,J(T)):(e.consume(T),X)}function de(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||xt(T)?W(T):(e.consume(T),de)}function te(T){return T===47||T===62||xt(T)?W(T):r(T)}function B(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):r(T)}function J(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),pe}function pe(T){return Ve(T)?et(e,Ae,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):Ae(T)}function Ae(T){return e.enter("htmlTextData"),u(T)}}const qg={name:"labelEnd",resolveAll:k9,resolveTo:j9,tokenize:E9},b9={tokenize:C9},S9={tokenize:N9},w9={tokenize:_9};function k9(e){let t=-1;const r=[];for(;++t<e.length;){const a=e[t][1];if(r.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const l=a.type==="labelImage"?4:2;a.type="data",t+=l}}return e.length!==r.length&&Jn(e,0,e.length,r),e}function j9(e,t){let r=e.length,a=0,l,o,u,f;for(;r--;)if(l=e[r][1],o){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(u){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(o=r,l.type!=="labelLink")){a=2;break}}else l.type==="labelEnd"&&(u=r);const m={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[u][1].end}},v={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",m,t],["enter",h,t]],f=mr(f,e.slice(o+1,o+a+3)),f=mr(f,[["enter",v,t]]),f=mr(f,Fd(t.parser.constructs.insideSpan.null,e.slice(o+a+4,u-3),t)),f=mr(f,[["exit",v,t],e[u-2],e[u-1],["exit",h,t]]),f=mr(f,e.slice(u+1)),f=mr(f,[["exit",m,t]]),Jn(e,o,e.length,f),e}function E9(e,t,r){const a=this;let l=a.events.length,o,u;for(;l--;)if((a.events[l][1].type==="labelImage"||a.events[l][1].type==="labelLink")&&!a.events[l][1]._balanced){o=a.events[l][1];break}return f;function f(x){return o?o._inactive?y(x):(u=a.parser.defined.includes(Er(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),m):r(x)}function m(x){return x===40?e.attempt(b9,v,u?v:y)(x):x===91?e.attempt(S9,v,u?h:y)(x):u?v(x):y(x)}function h(x){return e.attempt(w9,v,y)(x)}function v(x){return t(x)}function y(x){return o._balanced=!0,r(x)}}function C9(e,t,r){return a;function a(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),l}function l(y){return xt(y)?Go(e,o)(y):o(y)}function o(y){return y===41?v(y):rE(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function u(y){return xt(y)?Go(e,m)(y):v(y)}function f(y){return r(y)}function m(y){return y===34||y===39||y===40?aE(e,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):v(y)}function h(y){return xt(y)?Go(e,v)(y):v(y)}function v(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):r(y)}}function N9(e,t,r){const a=this;return l;function l(f){return iE.call(a,e,o,u,"reference","referenceMarker","referenceString")(f)}function o(f){return a.parser.defined.includes(Er(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):r(f)}function u(f){return r(f)}}function _9(e,t,r){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),l}function l(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):r(o)}}const A9={name:"labelStartImage",resolveAll:qg.resolveAll,tokenize:T9};function T9(e,t,r){const a=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),u):r(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):t(f)}}const z9={name:"labelStartLink",resolveAll:qg.resolveAll,tokenize:R9};function R9(e,t,r){const a=this;return l;function l(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),o}function o(u){return u===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(u):t(u)}}const Bm={name:"lineEnding",tokenize:O9};function O9(e,t){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),et(e,t,"linePrefix")}}const sd={name:"thematicBreak",tokenize:D9};function D9(e,t,r){let a=0,l;return o;function o(h){return e.enter("thematicBreak"),u(h)}function u(h){return l=h,f(h)}function f(h){return h===l?(e.enter("thematicBreakSequence"),m(h)):a>=3&&(h===null||ze(h))?(e.exit("thematicBreak"),t(h)):r(h)}function m(h){return h===l?(e.consume(h),a++,m):(e.exit("thematicBreakSequence"),Ve(h)?et(e,f,"whitespace")(h):f(h))}}const Rn={continuation:{tokenize:I9},exit:P9,name:"list",tokenize:U9},M9={partial:!0,tokenize:$9},L9={partial:!0,tokenize:B9};function U9(e,t,r){const a=this,l=a.events[a.events.length-1];let o=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,u=0;return f;function f(b){const j=a.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(j==="listUnordered"?!a.containerState.marker||b===a.containerState.marker:Up(b)){if(a.containerState.type||(a.containerState.type=j,e.enter(j,{_container:!0})),j==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(sd,r,h)(b):h(b);if(!a.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(b)}return r(b)}function m(b){return Up(b)&&++u<10?(e.consume(b),m):(!a.interrupt||u<2)&&(a.containerState.marker?b===a.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):r(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||b,e.check(vu,a.interrupt?r:v,e.attempt(M9,x,y))}function v(b){return a.containerState.initialBlankLine=!0,o++,x(b)}function y(b){return Ve(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),x):r(b)}function x(b){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function I9(e,t,r){const a=this;return a.containerState._closeFlow=void 0,e.check(vu,l,o);function l(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,et(e,t,"listItemIndent",a.containerState.size+1)(f)}function o(f){return a.containerState.furtherBlankLines||!Ve(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,u(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(L9,t,u)(f))}function u(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,et(e,e.attempt(Rn,t,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function B9(e,t,r){const a=this;return et(e,l,"listItemIndent",a.containerState.size+1);function l(o){const u=a.events[a.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===a.containerState.size?t(o):r(o)}}function P9(e){e.exit(this.containerState.type)}function $9(e,t,r){const a=this;return et(e,l,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(o){const u=a.events[a.events.length-1];return!Ve(o)&&u&&u[1].type==="listItemPrefixWhitespace"?t(o):r(o)}}const P1={name:"setextUnderline",resolveTo:q9,tokenize:F9};function q9(e,t){let r=e.length,a,l,o;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){a=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!o&&e[r][1].type==="definition"&&(o=r);const u={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",o?(e.splice(l,0,["enter",u,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=u,e.push(["exit",u,t]),e}function F9(e,t,r){const a=this;let l;return o;function o(h){let v=a.events.length,y;for(;v--;)if(a.events[v][1].type!=="lineEnding"&&a.events[v][1].type!=="linePrefix"&&a.events[v][1].type!=="content"){y=a.events[v][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(e.enter("setextHeadingLine"),l=h,u(h)):r(h)}function u(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===l?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Ve(h)?et(e,m,"lineSuffix")(h):m(h))}function m(h){return h===null||ze(h)?(e.exit("setextHeadingLine"),t(h)):r(h)}}const H9={tokenize:Z9};function Z9(e){const t=this,r=e.attempt(vu,a,e.attempt(this.parser.constructs.flowInitial,l,et(e,e.attempt(this.parser.constructs.flow,l,e.attempt(YU,l)),"linePrefix")));return r;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function l(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const V9={resolveAll:sE()},Q9=lE("string"),G9=lE("text");function lE(e){return{resolveAll:sE(e==="text"?K9:void 0),tokenize:t};function t(r){const a=this,l=this.parser.constructs[e],o=r.attempt(l,u,f);return u;function u(v){return h(v)?o(v):f(v)}function f(v){if(v===null){r.consume(v);return}return r.enter("data"),r.consume(v),m}function m(v){return h(v)?(r.exit("data"),o(v)):(r.consume(v),m)}function h(v){if(v===null)return!0;const y=l[v];let x=-1;if(y)for(;++x<y.length;){const b=y[x];if(!b.previous||b.previous.call(a,a.previous))return!0}return!1}}}function sE(e){return t;function t(r,a){let l=-1,o;for(;++l<=r.length;)o===void 0?r[l]&&r[l][1].type==="data"&&(o=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==o+2&&(r[o][1].end=r[l-1][1].end,r.splice(o+2,l-o-2),l=o+2),o=void 0);return e?e(r,a):r}}function K9(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const a=e[r-1][1],l=t.sliceStream(a);let o=l.length,u=-1,f=0,m;for(;o--;){const h=l[o];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(h===-2)m=!0,f++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(f=0),f){const h={type:r===e.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?u:a.start._bufferIndex+u,_index:a.start._index+o,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(r,0,["enter",h,t],["exit",h,t]),r+=2)}r++}return e}const Y9={42:Rn,43:Rn,45:Rn,48:Rn,49:Rn,50:Rn,51:Rn,52:Rn,53:Rn,54:Rn,55:Rn,56:Rn,57:Rn,62:Wj},X9={91:t9},J9={[-2]:Im,[-1]:Im,32:Im},W9={35:s9,42:sd,45:[P1,sd],60:d9,61:P1,95:sd,96:I1,126:I1},eI={38:tE,92:eE},tI={[-5]:Bm,[-4]:Bm,[-3]:Bm,33:A9,38:tE,42:Ip,60:[zU,v9],91:z9,92:[a9,eE],93:qg,95:Ip,96:HU},nI={null:[Ip,V9]},rI={null:[42,95]},iI={null:[]},aI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:rI,contentInitial:X9,disable:iI,document:Y9,flow:W9,flowInitial:J9,insideSpan:nI,string:eI,text:tI},Symbol.toStringTag,{value:"Module"}));function lI(e,t,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},o=[];let u=[],f=[];const m={attempt:$(q),check:$(z),consume:R,enter:A,exit:I,interrupt:$(z,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:j,parser:e,previous:null,sliceSerialize:x,sliceStream:b,write:y};let v=t.tokenize.call(h,m);return t.resolveAll&&o.push(t),h;function y(re){return u=mr(u,re),N(),u[u.length-1]!==null?[]:(Z(t,0),h.events=Fd(o,h.events,h),h.events)}function x(re,le){return oI(b(re),le)}function b(re){return sI(u,re)}function j(){const{_bufferIndex:re,_index:le,line:X,column:de,offset:te}=a;return{_bufferIndex:re,_index:le,line:X,column:de,offset:te}}function k(re){l[re.line]=re.column,F()}function N(){let re;for(;a._index<u.length;){const le=u[a._index];if(typeof le=="string")for(re=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===re&&a._bufferIndex<le.length;)E(le.charCodeAt(a._bufferIndex));else E(le)}}function E(re){v=v(re)}function R(re){ze(re)?(a.line++,a.column=1,a.offset+=re===-3?2:1,F()):re!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===u[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=re}function A(re,le){const X=le||{};return X.type=re,X.start=j(),h.events.push(["enter",X,h]),f.push(X),X}function I(re){const le=f.pop();return le.end=j(),h.events.push(["exit",le,h]),le}function q(re,le){Z(re,le.from)}function z(re,le){le.restore()}function $(re,le){return X;function X(de,te,B){let J,pe,Ae,T;return Array.isArray(de)?L(de):"tokenize"in de?L([de]):U(de);function U(ce){return ye;function ye(De){const ve=De!==null&&ce[De],jt=De!==null&&ce.null,Wt=[...Array.isArray(ve)?ve:ve?[ve]:[],...Array.isArray(jt)?jt:jt?[jt]:[]];return L(Wt)(De)}}function L(ce){return J=ce,pe=0,ce.length===0?B:_(ce[pe])}function _(ce){return ye;function ye(De){return T=W(),Ae=ce,ce.partial||(h.currentConstruct=ce),ce.name&&h.parser.constructs.disable.null.includes(ce.name)?G():ce.tokenize.call(le?Object.assign(Object.create(h),le):h,m,se,G)(De)}}function se(ce){return re(Ae,T),te}function G(ce){return T.restore(),++pe<J.length?_(J[pe]):B}}}function Z(re,le){re.resolveAll&&!o.includes(re)&&o.push(re),re.resolve&&Jn(h.events,le,h.events.length-le,re.resolve(h.events.slice(le),h)),re.resolveTo&&(h.events=re.resolveTo(h.events,h))}function W(){const re=j(),le=h.previous,X=h.currentConstruct,de=h.events.length,te=Array.from(f);return{from:de,restore:B};function B(){a=re,h.previous=le,h.currentConstruct=X,h.events.length=de,f=te,F()}}function F(){a.line in l&&a.column<2&&(a.column=l[a.line],a.offset+=l[a.line]-1)}}function sI(e,t){const r=t.start._index,a=t.start._bufferIndex,l=t.end._index,o=t.end._bufferIndex;let u;if(r===l)u=[e[r].slice(a,o)];else{if(u=e.slice(r,l),a>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(a):u.shift()}o>0&&u.push(e[l].slice(0,o))}return u}function oI(e,t){let r=-1;const a=[];let l;for(;++r<e.length;){const o=e[r];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
334
- `;break}case-3:{u=`\r
335
- `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&l)continue;u=" ";break}default:u=String.fromCharCode(o)}l=o===-2,a.push(u)}return a.join("")}function uI(e){const a={constructs:Xj([aI,...(e||{}).extensions||[]]),content:l(jU),defined:[],document:l(CU),flow:l(H9),lazy:{},string:l(Q9),text:l(G9)};return a;function l(o){return u;function u(f){return lI(a,o,f)}}}function cI(e){for(;!nE(e););return e}const $1=/[\0\t\n\r]/g;function dI(){let e=1,t="",r=!0,a;return l;function l(o,u,f){const m=[];let h,v,y,x,b;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o)),y=0,t="",r&&(o.charCodeAt(0)===65279&&y++,r=void 0);y<o.length;){if($1.lastIndex=y,h=$1.exec(o),x=h&&h.index!==void 0?h.index:o.length,b=o.charCodeAt(x),!h){t=o.slice(y);break}if(b===10&&y===x&&a)m.push(-3),a=void 0;else switch(a&&(m.push(-5),a=void 0),y<x&&(m.push(o.slice(y,x)),e+=x-y),b){case 0:{m.push(65533),e++;break}case 9:{for(v=Math.ceil(e/4)*4,m.push(-2);e++<v;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:a=!0,e=1}y=x+1}return f&&(a&&m.push(-5),t&&m.push(t),m.push(null)),m}}const fI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hI(e){return e.replace(fI,mI)}function mI(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),o=l===120||l===88;return Jj(r.slice(o?2:1),o?16:10)}return $g(r)||e}const oE={}.hasOwnProperty;function pI(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),gI(r)(cI(uI(r).document().write(dI()(e,t,!0))))}function gI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(kn),autolinkProtocol:W,autolinkEmail:W,atxHeading:o(Gr),blockQuote:o(jt),characterEscape:W,characterReference:W,codeFenced:o(Wt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(Wt,u),codeText:o(wn,u),codeTextData:W,data:W,codeFlowValue:W,definition:o(xr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(en),hardBreakEscape:o(_r),hardBreakTrailing:o(_r),htmlFlow:o(Et,u),htmlFlowData:W,htmlText:o(Et,u),htmlTextData:W,image:o(Kt),label:u,link:o(kn),listItem:o(_i),listItemValue:x,listOrdered:o(Kr,y),listUnordered:o(Kr),paragraph:o($s),reference:_,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(Gr),strong:o(yl),thematicBreak:o(qs)},exit:{atxHeading:m(),atxHeadingSequence:q,autolink:m(),autolinkEmail:ve,autolinkProtocol:De,blockQuote:m(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:G,characterReferenceMarkerNumeric:G,characterReferenceValue:ce,characterReference:ye,codeFenced:m(N),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:j,codeFlowValue:F,codeIndented:m(E),codeText:m(te),codeTextData:F,data:F,definition:m(),definitionDestinationString:I,definitionLabelString:R,definitionTitleString:A,emphasis:m(),hardBreakEscape:m(le),hardBreakTrailing:m(le),htmlFlow:m(X),htmlFlowData:F,htmlText:m(de),htmlTextData:F,image:m(J),label:Ae,labelText:pe,lineEnding:re,link:m(B),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:se,resourceDestinationString:T,resourceTitleString:U,resource:L,setextHeading:m(Z),setextHeadingLineSequence:$,setextHeadingText:z,strong:m(),thematicBreak:m()}};uE(t,(e||{}).mdastExtensions||[]);const r={};return a;function a(ne){let me={type:"root",children:[]};const Oe={stack:[me],tokenStack:[],config:t,enter:f,exit:h,buffer:u,resume:v,data:r},$e=[];let nt=-1;for(;++nt<ne.length;)if(ne[nt][1].type==="listOrdered"||ne[nt][1].type==="listUnordered")if(ne[nt][0]==="enter")$e.push(nt);else{const mn=$e.pop();nt=l(ne,mn,nt)}for(nt=-1;++nt<ne.length;){const mn=t[ne[nt][0]];oE.call(mn,ne[nt][1].type)&&mn[ne[nt][1].type].call(Object.assign({sliceSerialize:ne[nt][2].sliceSerialize},Oe),ne[nt][1])}if(Oe.tokenStack.length>0){const mn=Oe.tokenStack[Oe.tokenStack.length-1];(mn[1]||q1).call(Oe,void 0,mn[0])}for(me.position={start:na(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:na(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)me=t.transforms[nt](me)||me;return me}function l(ne,me,Oe){let $e=me-1,nt=-1,mn=!1,br,nn,Mt,un;for(;++$e<=Oe;){const ct=ne[$e];switch(ct[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ct[0]==="enter"?nt++:nt--,un=void 0;break}case"lineEndingBlank":{ct[0]==="enter"&&(br&&!un&&!nt&&!Mt&&(Mt=$e),un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:un=void 0}if(!nt&&ct[0]==="enter"&&ct[1].type==="listItemPrefix"||nt===-1&&ct[0]==="exit"&&(ct[1].type==="listUnordered"||ct[1].type==="listOrdered")){if(br){let Ar=$e;for(nn=void 0;Ar--;){const jn=ne[Ar];if(jn[1].type==="lineEnding"||jn[1].type==="lineEndingBlank"){if(jn[0]==="exit")continue;nn&&(ne[nn][1].type="lineEndingBlank",mn=!0),jn[1].type="lineEnding",nn=Ar}else if(!(jn[1].type==="linePrefix"||jn[1].type==="blockQuotePrefix"||jn[1].type==="blockQuotePrefixWhitespace"||jn[1].type==="blockQuoteMarker"||jn[1].type==="listItemIndent"))break}Mt&&(!nn||Mt<nn)&&(br._spread=!0),br.end=Object.assign({},nn?ne[nn][1].start:ct[1].end),ne.splice(nn||$e,0,["exit",br,ct[2]]),$e++,Oe++}if(ct[1].type==="listItemPrefix"){const Ar={type:"listItem",_spread:!1,start:Object.assign({},ct[1].start),end:void 0};br=Ar,ne.splice($e,0,["enter",Ar,ct[2]]),$e++,Oe++,Mt=void 0,un=!0}}}return ne[me][1]._spread=mn,Oe}function o(ne,me){return Oe;function Oe($e){f.call(this,ne($e),$e),me&&me.call(this,$e)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(ne,me,Oe){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([me,Oe||void 0]),ne.position={start:na(me.start),end:void 0}}function m(ne){return me;function me(Oe){ne&&ne.call(this,Oe),h.call(this,Oe)}}function h(ne,me){const Oe=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==ne.type&&(me?me.call(this,ne,$e[0]):($e[1]||q1).call(this,ne,$e[0]));else throw new Error("Cannot close `"+ne.type+"` ("+Qo({start:ne.start,end:ne.end})+"): it’s not open");Oe.position.end=na(ne.end)}function v(){return Pg(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function x(ne){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function b(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.lang=ne}function j(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.meta=ne}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne.replace(/(\r?\n|\r)$/g,"")}function R(ne){const me=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=me,Oe.identifier=Er(this.sliceSerialize(ne)).toLowerCase()}function A(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.title=ne}function I(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.url=ne}function q(ne){const me=this.stack[this.stack.length-1];if(!me.depth){const Oe=this.sliceSerialize(ne).length;me.depth=Oe}}function z(){this.data.setextHeadingSlurpLineEnding=!0}function $(ne){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function W(ne){const Oe=this.stack[this.stack.length-1].children;let $e=Oe[Oe.length-1];(!$e||$e.type!=="text")&&($e=tn(),$e.position={start:na(ne.start),end:void 0},Oe.push($e)),this.stack.push($e)}function F(ne){const me=this.stack.pop();me.value+=this.sliceSerialize(ne),me.position.end=na(ne.end)}function re(ne){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=me.children[me.children.length-1];Oe.position.end=na(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(me.type)&&(W.call(this,ne),F.call(this,ne))}function le(){this.data.atHardBreak=!0}function X(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne}function de(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne}function te(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne}function B(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=me,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function J(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=me,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function pe(ne){const me=this.sliceSerialize(ne),Oe=this.stack[this.stack.length-2];Oe.label=hI(me),Oe.identifier=Er(me).toLowerCase()}function Ae(){const ne=this.stack[this.stack.length-1],me=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const $e=ne.children;Oe.children=$e}else Oe.alt=me}function T(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.url=ne}function U(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.title=ne}function L(){this.data.inReference=void 0}function _(){this.data.referenceType="collapsed"}function se(ne){const me=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=me,Oe.identifier=Er(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function G(ne){this.data.characterReferenceType=ne.type}function ce(ne){const me=this.sliceSerialize(ne),Oe=this.data.characterReferenceType;let $e;Oe?($e=Jj(me,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=$g(me);const nt=this.stack[this.stack.length-1];nt.value+=$e}function ye(ne){const me=this.stack.pop();me.position.end=na(ne.end)}function De(ne){F.call(this,ne);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(ne)}function ve(ne){F.call(this,ne);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(ne)}function jt(){return{type:"blockquote",children:[]}}function Wt(){return{type:"code",lang:null,meta:null,value:""}}function wn(){return{type:"inlineCode",value:""}}function xr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function en(){return{type:"emphasis",children:[]}}function Gr(){return{type:"heading",depth:0,children:[]}}function _r(){return{type:"break"}}function Et(){return{type:"html",value:""}}function Kt(){return{type:"image",title:null,url:"",alt:null}}function kn(){return{type:"link",title:null,url:"",children:[]}}function Kr(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function _i(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function $s(){return{type:"paragraph",children:[]}}function yl(){return{type:"strong",children:[]}}function tn(){return{type:"text",value:""}}function qs(){return{type:"thematicBreak"}}}function na(e){return{line:e.line,column:e.column,offset:e.offset}}function uE(e,t){let r=-1;for(;++r<t.length;){const a=t[r];Array.isArray(a)?uE(e,a):yI(e,a)}}function yI(e,t){let r;for(r in t)if(oE.call(t,r))switch(r){case"canContainEols":{const a=t[r];a&&e[r].push(...a);break}case"transforms":{const a=t[r];a&&e[r].push(...a);break}case"enter":case"exit":{const a=t[r];a&&Object.assign(e[r],a);break}}}function q1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qo({start:t.start,end:t.end})+") is still open")}function vI(e){const t=this;t.parser=r;function r(a){return pI(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xI(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function bI(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
336
- `}]}function SI(e,t){const r=t.value?t.value+`
337
- `:"",a={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(a.className=["language-"+l[0]]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function wI(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function kI(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function jI(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),l=Ps(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let u,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),u=e.footnoteOrder.length):u=o+1,f+=1,e.footnoteCounts.set(a,f);const m={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(t,h),e.applyData(t,h)}function EI(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function CI(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function cE(e,t){const r=t.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const l=e.all(t),o=l[0];o&&o.type==="text"?o.value="["+o.value:l.unshift({type:"text",value:"["});const u=l[l.length-1];return u&&u.type==="text"?u.value+=a:l.push({type:"text",value:a}),l}function NI(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return cE(e,t);const l={src:Ps(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,o),e.applyData(t,o)}function _I(e,t){const r={src:Ps(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,a),e.applyData(t,a)}function AI(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,a),e.applyData(t,a)}function TI(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return cE(e,t);const l={href:Ps(a.url||"")};a.title!==null&&a.title!==void 0&&(l.title=a.title);const o={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function zI(e,t){const r={href:Ps(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function RI(e,t,r){const a=e.all(t),l=r?OI(r):dE(t),o={},u=[];if(typeof t.checked=="boolean"){const v=a[0];let y;v&&v.type==="element"&&v.tagName==="p"?y=v:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const v=a[f];(l||f!==0||v.type!=="element"||v.tagName!=="p")&&u.push({type:"text",value:`
338
- `}),v.type==="element"&&v.tagName==="p"&&!l?u.push(...v.children):u.push(v)}const m=a[a.length-1];m&&(l||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
339
- `});const h={type:"element",tagName:"li",properties:o,children:u};return e.patch(t,h),e.applyData(t,h)}function OI(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let a=-1;for(;!t&&++a<r.length;)t=dE(r[a])}return t}function dE(e){const t=e.spread;return t??e.children.length>1}function DI(e,t){const r={},a=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++l<a.length;){const u=a[l];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function MI(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function LI(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function UI(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function II(e,t){const r=e.all(t),a=r.shift(),l=[];if(a){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],u),l.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=Lg(t.children[1]),m=Hj(t.children[t.children.length-1]);f&&m&&(u.position={start:f,end:m}),l.push(u)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,o),e.applyData(t,o)}function BI(e,t,r){const a=r?r.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,f=u?u.length:t.children.length;let m=-1;const h=[];for(;++m<f;){const y=t.children[m],x={},b=u?u[m]:void 0;b&&(x.align=b);let j={type:"element",tagName:o,properties:x,children:[]};y&&(j.children=e.all(y),e.patch(y,j),j=e.applyData(y,j)),h.push(j)}const v={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,v),e.applyData(t,v)}function PI(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const F1=9,H1=32;function $I(e){const t=String(e),r=/\r?\n|\r/g;let a=r.exec(t),l=0;const o=[];for(;a;)o.push(Z1(t.slice(l,a.index),l>0,!0),a[0]),l=a.index+a[0].length,a=r.exec(t);return o.push(Z1(t.slice(l),l>0,!1)),o.join("")}function Z1(e,t,r){let a=0,l=e.length;if(t){let o=e.codePointAt(a);for(;o===F1||o===H1;)a++,o=e.codePointAt(a)}if(r){let o=e.codePointAt(l-1);for(;o===F1||o===H1;)l--,o=e.codePointAt(l-1)}return l>a?e.slice(a,l):""}function qI(e,t){const r={type:"text",value:$I(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function FI(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const HI={blockquote:xI,break:bI,code:SI,delete:wI,emphasis:kI,footnoteReference:jI,heading:EI,html:CI,imageReference:NI,image:_I,inlineCode:AI,linkReference:TI,link:zI,listItem:RI,list:DI,paragraph:MI,root:LI,strong:UI,table:II,tableCell:PI,tableRow:BI,text:qI,thematicBreak:FI,toml:Kc,yaml:Kc,definition:Kc,footnoteDefinition:Kc};function Kc(){}const fE=-1,Hd=0,Ko=1,bd=2,Fg=3,Hg=4,Zg=5,Vg=6,hE=7,mE=8,V1=typeof self=="object"?self:globalThis,ZI=(e,t)=>{const r=(l,o)=>(e.set(o,l),l),a=l=>{if(e.has(l))return e.get(l);const[o,u]=t[l];switch(o){case Hd:case fE:return r(u,l);case Ko:{const f=r([],l);for(const m of u)f.push(a(m));return f}case bd:{const f=r({},l);for(const[m,h]of u)f[a(m)]=a(h);return f}case Fg:return r(new Date(u),l);case Hg:{const{source:f,flags:m}=u;return r(new RegExp(f,m),l)}case Zg:{const f=r(new Map,l);for(const[m,h]of u)f.set(a(m),a(h));return f}case Vg:{const f=r(new Set,l);for(const m of u)f.add(a(m));return f}case hE:{const{name:f,message:m}=u;return r(new V1[f](m),l)}case mE:return r(BigInt(u),l);case"BigInt":return r(Object(BigInt(u)),l);case"ArrayBuffer":return r(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return r(new DataView(f),u)}}return r(new V1[o](u),l)};return a},Q1=e=>ZI(new Map,e)(0),ls="",{toString:VI}={},{keys:QI}=Object,qo=e=>{const t=typeof e;if(t!=="object"||!e)return[Hd,t];const r=VI.call(e).slice(8,-1);switch(r){case"Array":return[Ko,ls];case"Object":return[bd,ls];case"Date":return[Fg,ls];case"RegExp":return[Hg,ls];case"Map":return[Zg,ls];case"Set":return[Vg,ls];case"DataView":return[Ko,r]}return r.includes("Array")?[Ko,r]:r.includes("Error")?[hE,r]:[bd,r]},Yc=([e,t])=>e===Hd&&(t==="function"||t==="symbol"),GI=(e,t,r,a)=>{const l=(u,f)=>{const m=a.push(u)-1;return r.set(f,m),m},o=u=>{if(r.has(u))return r.get(u);let[f,m]=qo(u);switch(f){case Hd:{let v=u;switch(m){case"bigint":f=mE,v=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);v=null;break;case"undefined":return l([fE],u)}return l([f,v],u)}case Ko:{if(m){let x=u;return m==="DataView"?x=new Uint8Array(u.buffer):m==="ArrayBuffer"&&(x=new Uint8Array(u)),l([m,[...x]],u)}const v=[],y=l([f,v],u);for(const x of u)v.push(o(x));return y}case bd:{if(m)switch(m){case"BigInt":return l([m,u.toString()],u);case"Boolean":case"Number":case"String":return l([m,u.valueOf()],u)}if(t&&"toJSON"in u)return o(u.toJSON());const v=[],y=l([f,v],u);for(const x of QI(u))(e||!Yc(qo(u[x])))&&v.push([o(x),o(u[x])]);return y}case Fg:return l([f,u.toISOString()],u);case Hg:{const{source:v,flags:y}=u;return l([f,{source:v,flags:y}],u)}case Zg:{const v=[],y=l([f,v],u);for(const[x,b]of u)(e||!(Yc(qo(x))||Yc(qo(b))))&&v.push([o(x),o(b)]);return y}case Vg:{const v=[],y=l([f,v],u);for(const x of u)(e||!Yc(qo(x)))&&v.push(o(x));return y}}const{message:h}=u;return l([f,{name:m,message:h}],u)};return o},G1=(e,{json:t,lossy:r}={})=>{const a=[];return GI(!(t||r),!!t,new Map,a)(e),a},Sd=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Q1(G1(e,t)):structuredClone(e):(e,t)=>Q1(G1(e,t));function KI(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function YI(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function XI(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||KI,a=e.options.footnoteBackLabel||YI,l=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let m=-1;for(;++m<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[m]);if(!h)continue;const v=e.all(h),y=String(h.identifier).toUpperCase(),x=Ps(y.toLowerCase());let b=0;const j=[],k=e.footnoteCounts.get(y);for(;k!==void 0&&++b<=k;){j.length>0&&j.push({type:"text",value:" "});let R=typeof r=="string"?r:r(m,b);typeof R=="string"&&(R={type:"text",value:R}),j.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(m,b),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const N=v[v.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const R=N.children[N.children.length-1];R&&R.type==="text"?R.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...j)}else v.push(...j);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(v,!0)};e.patch(h,E),f.push(E)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Sd(u),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
340
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
341
- `}]}}const Zd=(function(e){if(e==null)return t8;if(typeof e=="function")return Vd(e);if(typeof e=="object")return Array.isArray(e)?JI(e):WI(e);if(typeof e=="string")return e8(e);throw new Error("Expected function, string, or object as test")});function JI(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Zd(e[r]);return Vd(a);function a(...l){let o=-1;for(;++o<t.length;)if(t[o].apply(this,l))return!0;return!1}}function WI(e){const t=e;return Vd(r);function r(a){const l=a;let o;for(o in e)if(l[o]!==t[o])return!1;return!0}}function e8(e){return Vd(t);function t(r){return r&&r.type===e}}function Vd(e){return t;function t(r,a,l){return!!(n8(r)&&e.call(this,r,typeof a=="number"?a:void 0,l||void 0))}}function t8(){return!0}function n8(e){return e!==null&&typeof e=="object"&&"type"in e}const pE=[],r8=!0,Bp=!1,i8="skip";function gE(e,t,r,a){let l;typeof t=="function"&&typeof r!="function"?(a=r,r=t):l=t;const o=Zd(l),u=a?-1:1;f(e,void 0,[])();function f(m,h,v){const y=m&&typeof m=="object"?m:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=pE,j,k,N;if((!t||o(m,h,v[v.length-1]||void 0))&&(b=a8(r(m,v)),b[0]===Bp))return b;if("children"in m&&m.children){const E=m;if(E.children&&b[0]!==i8)for(k=(a?E.children.length:-1)+u,N=v.concat(E);k>-1&&k<E.children.length;){const R=E.children[k];if(j=f(R,k,N)(),j[0]===Bp)return j;k=typeof j[1]=="number"?j[1]:k+u}}return b}}}function a8(e){return Array.isArray(e)?e:typeof e=="number"?[r8,e]:e==null?pE:[e]}function Qg(e,t,r,a){let l,o,u;typeof t=="function"&&typeof r!="function"?(o=void 0,u=t,l=r):(o=t,u=r,l=a),gE(e,o,f,l);function f(m,h){const v=h[h.length-1],y=v?v.children.indexOf(m):void 0;return u(m,y,v)}}const Pp={}.hasOwnProperty,l8={};function s8(e,t){const r=t||l8,a=new Map,l=new Map,o=new Map,u={...HI,...r.handlers},f={all:h,applyData:u8,definitionById:a,footnoteById:l,footnoteCounts:o,footnoteOrder:[],handlers:u,one:m,options:r,patch:o8,wrap:d8};return Qg(e,function(v){if(v.type==="definition"||v.type==="footnoteDefinition"){const y=v.type==="definition"?a:l,x=String(v.identifier).toUpperCase();y.has(x)||y.set(x,v)}}),f;function m(v,y){const x=v.type,b=f.handlers[x];if(Pp.call(f.handlers,x)&&b)return b(f,v,y);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in v){const{children:k,...N}=v,E=Sd(N);return E.children=f.all(v),E}return Sd(v)}return(f.options.unknownHandler||c8)(f,v,y)}function h(v){const y=[];if("children"in v){const x=v.children;let b=-1;for(;++b<x.length;){const j=f.one(x[b],v);if(j){if(b&&x[b-1].type==="break"&&(!Array.isArray(j)&&j.type==="text"&&(j.value=K1(j.value)),!Array.isArray(j)&&j.type==="element")){const k=j.children[0];k&&k.type==="text"&&(k.value=K1(k.value))}Array.isArray(j)?y.push(...j):y.push(j)}}}return y}}function o8(e,t){e.position&&(t.position=Y6(e))}function u8(e,t){let r=t;if(e&&e.data){const a=e.data.hName,l=e.data.hChildren,o=e.data.hProperties;if(typeof a=="string")if(r.type==="element")r.tagName=a;else{const u="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:u}}r.type==="element"&&o&&Object.assign(r.properties,Sd(o)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function c8(e,t){const r=t.data||{},a="value"in t&&!(Pp.call(r,"hProperties")||Pp.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function d8(e,t){const r=[];let a=-1;for(t&&r.push({type:"text",value:`
342
- `});++a<e.length;)a&&r.push({type:"text",value:`
343
- `}),r.push(e[a]);return t&&e.length>0&&r.push({type:"text",value:`
344
- `}),r}function K1(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Y1(e,t){const r=s8(e,t),a=r.one(e,void 0),l=XI(r),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return l&&o.children.push({type:"text",value:`
345
- `},l),o}function f8(e,t){return e&&"run"in e?async function(r,a){const l=Y1(r,{file:a,...t});await e.run(l,a)}:function(r,a){return Y1(r,{file:a,...e||t})}}function X1(e){if(e)throw e}var Pm,J1;function h8(){if(J1)return Pm;J1=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var v=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!v&&!y)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},u=function(h,v){r&&v.name==="__proto__"?r(h,v.name,{enumerable:!0,configurable:!0,value:v.newValue,writable:!0}):h[v.name]=v.newValue},f=function(h,v){if(v==="__proto__")if(e.call(h,v)){if(a)return a(h,v).value}else return;return h[v]};return Pm=function m(){var h,v,y,x,b,j,k=arguments[0],N=1,E=arguments.length,R=!1;for(typeof k=="boolean"&&(R=k,k=arguments[1]||{},N=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});N<E;++N)if(h=arguments[N],h!=null)for(v in h)y=f(k,v),x=f(h,v),k!==x&&(R&&x&&(o(x)||(b=l(x)))?(b?(b=!1,j=y&&l(y)?y:[]):j=y&&o(y)?y:{},u(k,{name:v,newValue:m(R,j,x)})):typeof x<"u"&&u(k,{name:v,newValue:x}));return k},Pm}var m8=h8();const $m=kd(m8);function $p(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function p8(){const e=[],t={run:r,use:a};return t;function r(...l){let o=-1;const u=l.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...l);function f(m,...h){const v=e[++o];let y=-1;if(m){u(m);return}for(;++y<l.length;)(h[y]===null||h[y]===void 0)&&(h[y]=l[y]);l=h,v?g8(v,f)(...h):u(null,...h)}}function a(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function g8(e,t){let r;return a;function a(...u){const f=e.length>u.length;let m;f&&u.push(l);try{m=e.apply(this,u)}catch(h){const v=h;if(f&&r)throw v;return l(v)}f||(m&&m.then&&typeof m.then=="function"?m.then(o,l):m instanceof Error?l(m):o(m))}function l(u,...f){r||(r=!0,t(u,...f))}function o(u){l(null,u)}}const Lr={basename:y8,dirname:v8,extname:x8,join:b8,sep:"/"};function y8(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');xu(e);let r=0,a=-1,l=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(o){r=l+1;break}}else a<0&&(o=!0,a=l+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let u=-1,f=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(o){r=l+1;break}}else u<0&&(o=!0,u=l+1),f>-1&&(e.codePointAt(l)===t.codePointAt(f--)?f<0&&(a=l):(f=-1,a=u));return r===a?a=u:a<0&&(a=e.length),e.slice(r,a)}function v8(e){if(xu(e),e.length===0)return".";let t=-1,r=e.length,a;for(;--r;)if(e.codePointAt(r)===47){if(a){t=r;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function x8(e){xu(e);let t=e.length,r=-1,a=0,l=-1,o=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){a=t+1;break}continue}r<0&&(u=!0,r=t+1),f===46?l<0?l=t:o!==1&&(o=1):l>-1&&(o=-1)}return l<0||r<0||o===0||o===1&&l===r-1&&l===a+1?"":e.slice(l,r)}function b8(...e){let t=-1,r;for(;++t<e.length;)xu(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":S8(r)}function S8(e){xu(e);const t=e.codePointAt(0)===47;let r=w8(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function w8(e,t){let r="",a=0,l=-1,o=0,u=-1,f,m;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(l===u-1||o===1))if(l!==u-1&&o===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",a=0):(r=r.slice(0,m),a=r.length-1-r.lastIndexOf("/")),l=u,o=0;continue}}else if(r.length>0){r="",a=0,l=u,o=0;continue}}t&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+e.slice(l+1,u):r=e.slice(l+1,u),a=u-l-1;l=u,o=0}else f===46&&o>-1?o++:o=-1}return r}function xu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const k8={cwd:j8};function j8(){return"/"}function qp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function E8(e){if(typeof e=="string")e=new URL(e);else if(!qp(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return C8(e)}function C8(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const a=t.codePointAt(r+2);if(a===70||a===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const qm=["history","path","basename","stem","extname","dirname"];class yE{constructor(t){let r;t?qp(t)?r={path:t}:typeof t=="string"||N8(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":k8.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<qm.length;){const o=qm[a];o in r&&r[o]!==void 0&&r[o]!==null&&(this[o]=o==="history"?[...r[o]]:r[o])}let l;for(l in r)qm.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?Lr.basename(this.path):void 0}set basename(t){Hm(t,"basename"),Fm(t,"basename"),this.path=Lr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Lr.dirname(this.path):void 0}set dirname(t){W1(this.basename,"dirname"),this.path=Lr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Lr.extname(this.path):void 0}set extname(t){if(Fm(t,"extname"),W1(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Lr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){qp(t)&&(t=E8(t)),Hm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Lr.basename(this.path,this.extname):void 0}set stem(t){Hm(t,"stem"),Fm(t,"stem"),this.path=Lr.join(this.dirname||"",t+(this.extname||""))}fail(t,r,a){const l=this.message(t,r,a);throw l.fatal=!0,l}info(t,r,a){const l=this.message(t,r,a);return l.fatal=void 0,l}message(t,r,a){const l=new hn(t,r,a);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Fm(e,t){if(e&&e.includes(Lr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Lr.sep+"`")}function Hm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function W1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function N8(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _8=(function(e){const a=this.constructor.prototype,l=a[e],o=function(){return l.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),A8={}.hasOwnProperty;class Gg extends _8{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=p8()}copy(){const t=new Gg;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];t.use(...a)}return t.data($m(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Qm("data",this.frozen),this.namespace[t]=r,this):A8.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Qm("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const l=r.call(t,...a);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Xc(t),a=this.parser||this.Parser;return Zm("parse",a),a(String(r),r)}process(t,r){const a=this;return this.freeze(),Zm("process",this.parser||this.Parser),Vm("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(o,u){const f=Xc(t),m=a.parse(f);a.run(m,f,function(v,y,x){if(v||!y||!x)return h(v);const b=y,j=a.stringify(b,x);R8(j)?x.value=j:x.result=j,h(v,x)});function h(v,y){v||!y?u(v):o?o(y):r(void 0,y)}}}processSync(t){let r=!1,a;return this.freeze(),Zm("processSync",this.parser||this.Parser),Vm("processSync",this.compiler||this.Compiler),this.process(t,l),tS("processSync","process",r),a;function l(o,u){r=!0,X1(o),a=u}}run(t,r,a){eS(t),this.freeze();const l=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?o(void 0,a):new Promise(o);function o(u,f){const m=Xc(r);l.run(t,m,h);function h(v,y,x){const b=y||t;v?f(v):u?u(b):a(void 0,b,x)}}}runSync(t,r){let a=!1,l;return this.run(t,r,o),tS("runSync","run",a),l;function o(u,f){X1(u),l=f,a=!0}}stringify(t,r){this.freeze();const a=Xc(r),l=this.compiler||this.Compiler;return Vm("stringify",l),eS(t),l(t,a)}use(t,...r){const a=this.attachers,l=this.namespace;if(Qm("use",this.frozen),t!=null)if(typeof t=="function")m(t,r);else if(typeof t=="object")Array.isArray(t)?f(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[v,...y]=h;m(v,y)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(l.settings=$m(!0,l.settings,h.settings))}function f(h){let v=-1;if(h!=null)if(Array.isArray(h))for(;++v<h.length;){const y=h[v];o(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,v){let y=-1,x=-1;for(;++y<a.length;)if(a[y][0]===h){x=y;break}if(x===-1)a.push([h,...v]);else if(v.length>0){let[b,...j]=v;const k=a[x][1];$p(k)&&$p(b)&&(b=$m(!0,k,b)),a[x]=[h,b,...j]}}}}const T8=new Gg().freeze();function Zm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Qm(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function eS(e){if(!$p(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function tS(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xc(e){return z8(e)?e:new yE(e)}function z8(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function R8(e){return typeof e=="string"||O8(e)}function O8(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const D8="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",nS=[],rS={allowDangerousHtml:!0},M8=/^(https?|ircs?|mailto|xmpp)$/i,L8=[{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 U8(e){const t=I8(e),r=B8(e);return P8(t.runSync(t.parse(r),r),e)}function I8(e){const t=e.rehypePlugins||nS,r=e.remarkPlugins||nS,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rS}:rS;return T8().use(vI).use(r).use(f8,a).use(t)}function B8(e){const t=e.children||"",r=new yE;return typeof t=="string"&&(r.value=t),r}function P8(e,t){const r=t.allowedElements,a=t.allowElement,l=t.components,o=t.disallowedElements,u=t.skipHtml,f=t.unwrapDisallowed,m=t.urlTransform||$8;for(const v of L8)Object.hasOwn(t,v.from)&&(""+v.from+(v.to?"use `"+v.to+"` instead":"remove it")+D8+v.id,void 0);return Qg(e,h),tU(e,{Fragment:d.Fragment,components:l,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function h(v,y,x){if(v.type==="raw"&&x&&typeof y=="number")return u?x.children.splice(y,1):x.children[y]={type:"text",value:v.value},y;if(v.type==="element"){let b;for(b in Um)if(Object.hasOwn(Um,b)&&Object.hasOwn(v.properties,b)){const j=v.properties[b],k=Um[b];(k===null||k.includes(v.tagName))&&(v.properties[b]=m(String(j||""),b,v))}}if(v.type==="element"){let b=r?!r.includes(v.tagName):o?o.includes(v.tagName):!1;if(!b&&a&&typeof y=="number"&&(b=!a(v,y,x)),b&&x&&typeof y=="number")return f&&v.children?x.children.splice(y,1,...v.children):x.children.splice(y,1),y}}}function $8(e){const t=e.indexOf(":"),r=e.indexOf("?"),a=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||r!==-1&&t>r||a!==-1&&t>a||M8.test(e.slice(0,t))?e:""}function q8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vE(e,t,r){const l=Zd((r||{}).ignore||[]),o=F8(t);let u=-1;for(;++u<o.length;)gE(e,"text",f);function f(h,v){let y=-1,x;for(;++y<v.length;){const b=v[y],j=x?x.children:void 0;if(l(b,j?j.indexOf(b):void 0,x))return;x=b}if(x)return m(h,v)}function m(h,v){const y=v[v.length-1],x=o[u][0],b=o[u][1];let j=0;const N=y.children.indexOf(h);let E=!1,R=[];x.lastIndex=0;let A=x.exec(h.value);for(;A;){const I=A.index,q={index:A.index,input:A.input,stack:[...v,h]};let z=b(...A,q);if(typeof z=="string"&&(z=z.length>0?{type:"text",value:z}:void 0),z===!1?x.lastIndex=I+1:(j!==I&&R.push({type:"text",value:h.value.slice(j,I)}),Array.isArray(z)?R.push(...z):z&&R.push(z),j=I+A[0].length,E=!0),!x.global)break;A=x.exec(h.value)}return E?(j<h.value.length&&R.push({type:"text",value:h.value.slice(j)}),y.children.splice(N,1,...R)):R=[h],N+R.length}}function F8(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<r.length;){const l=r[a];t.push([H8(l[0]),Z8(l[1])])}return t}function H8(e){return typeof e=="string"?new RegExp(q8(e),"g"):e}function Z8(e){return typeof e=="function"?e:function(){return e}}function V8(e){vE(e,[/\r?\n|\r/g,Q8])}function Q8(){return{type:"break"}}function G8(){return function(e){V8(e)}}function iS(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,l=r.indexOf(t);for(;l!==-1;)a++,l=r.indexOf(t,l+t.length);return a}const Gm="phrasing",Km=["autolink","link","image","label"];function K8(){return{transforms:[nB],enter:{literalAutolink:X8,literalAutolinkEmail:Ym,literalAutolinkHttp:Ym,literalAutolinkWww:Ym},exit:{literalAutolink:tB,literalAutolinkEmail:eB,literalAutolinkHttp:J8,literalAutolinkWww:W8}}}function Y8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Gm,notInConstruct:Km},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Gm,notInConstruct:Km},{character:":",before:"[ps]",after:"\\/",inConstruct:Gm,notInConstruct:Km}]}}function X8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ym(e){this.config.enter.autolinkProtocol.call(this,e)}function J8(e){this.config.exit.autolinkProtocol.call(this,e)}function W8(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function eB(e){this.config.exit.autolinkEmail.call(this,e)}function tB(e){this.exit(e)}function nB(e){vE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rB],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),iB]],{ignore:["link","linkReference"]})}function rB(e,t,r,a,l){let o="";if(!xE(l)||(/^w/i.test(t)&&(r=t+r,t="",o="http://"),!aB(r)))return!1;const u=lB(r+a);if(!u[0])return!1;const f={type:"link",title:null,url:o+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[f,{type:"text",value:u[1]}]:f}function iB(e,t,r,a){return!xE(a,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function aB(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function lB(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],a=r.indexOf(")");const l=iS(e,"(");let o=iS(e,")");for(;a!==-1&&l>o;)e+=r.slice(0,a+1),r=r.slice(a+1),a=r.indexOf(")"),o++;return[e,r]}function xE(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||dl(r)||qd(r))&&(!t||r!==47)}bE.peek=pB;function sB(){this.buffer()}function oB(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function uB(){this.buffer()}function cB(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function dB(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Er(this.sliceSerialize(e)).toLowerCase(),r.label=t}function fB(e){this.exit(e)}function hB(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Er(this.sliceSerialize(e)).toLowerCase(),r.label=t}function mB(e){this.exit(e)}function pB(){return"["}function bE(e,t,r,a){const l=r.createTracker(a);let o=l.move("[^");const u=r.enter("footnoteReference"),f=r.enter("reference");return o+=l.move(r.safe(r.associationId(e),{after:"]",before:o})),f(),u(),o+=l.move("]"),o}function gB(){return{enter:{gfmFootnoteCallString:sB,gfmFootnoteCall:oB,gfmFootnoteDefinitionLabelString:uB,gfmFootnoteDefinition:cB},exit:{gfmFootnoteCallString:dB,gfmFootnoteCall:fB,gfmFootnoteDefinitionLabelString:hB,gfmFootnoteDefinition:mB}}}function yB(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:bE},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(a,l,o,u){const f=o.createTracker(u);let m=f.move("[^");const h=o.enter("footnoteDefinition"),v=o.enter("label");return m+=f.move(o.safe(o.associationId(a),{before:m,after:"]"})),v(),m+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),m+=f.move((t?`
346
- `:" ")+o.indentLines(o.containerFlow(a,f.current()),t?SE:vB))),h(),m}}function vB(e,t,r){return t===0?e:SE(e,t,r)}function SE(e,t,r){return(r?"":" ")+e}const xB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];wE.peek=jB;function bB(){return{canContainEols:["delete"],enter:{strikethrough:wB},exit:{strikethrough:kB}}}function SB(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xB}],handlers:{delete:wE}}}function wB(e){this.enter({type:"delete",children:[]},e)}function kB(e){this.exit(e)}function wE(e,t,r,a){const l=r.createTracker(a),o=r.enter("strikethrough");let u=l.move("~~");return u+=r.containerPhrasing(e,{...l.current(),before:u,after:"~"}),u+=l.move("~~"),o(),u}function jB(){return"~"}function EB(e){return e.length}function CB(e,t){const r=t||{},a=(r.align||[]).concat(),l=r.stringLength||EB,o=[],u=[],f=[],m=[];let h=0,v=-1;for(;++v<e.length;){const k=[],N=[];let E=-1;for(e[v].length>h&&(h=e[v].length);++E<e[v].length;){const R=NB(e[v][E]);if(r.alignDelimiters!==!1){const A=l(R);N[E]=A,(m[E]===void 0||A>m[E])&&(m[E]=A)}k.push(R)}u[v]=k,f[v]=N}let y=-1;if(typeof a=="object"&&"length"in a)for(;++y<h;)o[y]=aS(a[y]);else{const k=aS(a);for(;++y<h;)o[y]=k}y=-1;const x=[],b=[];for(;++y<h;){const k=o[y];let N="",E="";k===99?(N=":",E=":"):k===108?N=":":k===114&&(E=":");let R=r.alignDelimiters===!1?1:Math.max(1,m[y]-N.length-E.length);const A=N+"-".repeat(R)+E;r.alignDelimiters!==!1&&(R=N.length+R+E.length,R>m[y]&&(m[y]=R),b[y]=R),x[y]=A}u.splice(1,0,x),f.splice(1,0,b),v=-1;const j=[];for(;++v<u.length;){const k=u[v],N=f[v];y=-1;const E=[];for(;++y<h;){const R=k[y]||"";let A="",I="";if(r.alignDelimiters!==!1){const q=m[y]-(N[y]||0),z=o[y];z===114?A=" ".repeat(q):z===99?q%2?(A=" ".repeat(q/2+.5),I=" ".repeat(q/2-.5)):(A=" ".repeat(q/2),I=A):I=" ".repeat(q)}r.delimiterStart!==!1&&!y&&E.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&R==="")&&(r.delimiterStart!==!1||y)&&E.push(" "),r.alignDelimiters!==!1&&E.push(A),E.push(R),r.alignDelimiters!==!1&&E.push(I),r.padding!==!1&&E.push(" "),(r.delimiterEnd!==!1||y!==h-1)&&E.push("|")}j.push(r.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return j.join(`
347
- `)}function NB(e){return e==null?"":String(e)}function aS(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function _B(e,t,r,a){const l=r.enter("blockquote"),o=r.createTracker(a);o.move("> "),o.shift(2);const u=r.indentLines(r.containerFlow(e,o.current()),AB);return l(),u}function AB(e,t,r){return">"+(r?"":" ")+e}function TB(e,t){return lS(e,t.inConstruct,!0)&&!lS(e,t.notInConstruct,!1)}function lS(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function sS(e,t,r,a){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
348
- `&&TB(r.stack,r.unsafe[l]))return/[ \t]/.test(a.before)?"":" ";return`\\
349
- `}function zB(e,t){const r=String(e);let a=r.indexOf(t),l=a,o=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===l?++o>u&&(u=o):o=1,l=a+t.length,a=r.indexOf(t,l);return u}function RB(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function OB(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function DB(e,t,r,a){const l=OB(r),o=e.value||"",u=l==="`"?"GraveAccent":"Tilde";if(RB(e,r)){const y=r.enter("codeIndented"),x=r.indentLines(o,MB);return y(),x}const f=r.createTracker(a),m=l.repeat(Math.max(zB(o,l)+1,3)),h=r.enter("codeFenced");let v=f.move(m);if(e.lang){const y=r.enter(`codeFencedLang${u}`);v+=f.move(r.safe(e.lang,{before:v,after:" ",encode:["`"],...f.current()})),y()}if(e.lang&&e.meta){const y=r.enter(`codeFencedMeta${u}`);v+=f.move(" "),v+=f.move(r.safe(e.meta,{before:v,after:`
350
- `,encode:["`"],...f.current()})),y()}return v+=f.move(`
351
- `),o&&(v+=f.move(o+`
352
- `)),v+=f.move(m),h(),v}function MB(e,t,r){return(r?"":" ")+e}function Kg(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function LB(e,t,r,a){const l=Kg(r),o=l==='"'?"Quote":"Apostrophe",u=r.enter("definition");let f=r.enter("label");const m=r.createTracker(a);let h=m.move("[");return h+=m.move(r.safe(r.associationId(e),{before:h,after:"]",...m.current()})),h+=m.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(r.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(f=r.enter("destinationRaw"),h+=m.move(r.safe(e.url,{before:h,after:e.title?" ":`
353
- `,...m.current()}))),f(),e.title&&(f=r.enter(`title${o}`),h+=m.move(" "+l),h+=m.move(r.safe(e.title,{before:h,after:l,...m.current()})),h+=m.move(l),f()),u(),h}function UB(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function lu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wd(e,t,r){const a=Rs(e),l=Rs(t);return a===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}kE.peek=IB;function kE(e,t,r,a){const l=UB(r),o=r.enter("emphasis"),u=r.createTracker(a),f=u.move(l);let m=u.move(r.containerPhrasing(e,{after:l,before:f,...u.current()}));const h=m.charCodeAt(0),v=wd(a.before.charCodeAt(a.before.length-1),h,l);v.inside&&(m=lu(h)+m.slice(1));const y=m.charCodeAt(m.length-1),x=wd(a.after.charCodeAt(0),y,l);x.inside&&(m=m.slice(0,-1)+lu(y));const b=u.move(l);return o(),r.attentionEncodeSurroundingInfo={after:x.outside,before:v.outside},f+m+b}function IB(e,t,r){return r.options.emphasis||"*"}function BB(e,t){let r=!1;return Qg(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return r=!0,Bp}),!!((!e.depth||e.depth<3)&&Pg(e)&&(t.options.setext||r))}function PB(e,t,r,a){const l=Math.max(Math.min(6,e.depth||1),1),o=r.createTracker(a);if(BB(e,r)){const v=r.enter("headingSetext"),y=r.enter("phrasing"),x=r.containerPhrasing(e,{...o.current(),before:`
354
- `,after:`
355
- `});return y(),v(),x+`
356
- `+(l===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
357
- `))+1))}const u="#".repeat(l),f=r.enter("headingAtx"),m=r.enter("phrasing");o.move(u+" ");let h=r.containerPhrasing(e,{before:"# ",after:`
358
- `,...o.current()});return/^[\t ]/.test(h)&&(h=lu(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,r.options.closeAtx&&(h+=" "+u),m(),f(),h}jE.peek=$B;function jE(e){return e.value||""}function $B(){return"<"}EE.peek=qB;function EE(e,t,r,a){const l=Kg(r),o=l==='"'?"Quote":"Apostrophe",u=r.enter("image");let f=r.enter("label");const m=r.createTracker(a);let h=m.move("![");return h+=m.move(r.safe(e.alt,{before:h,after:"]",...m.current()})),h+=m.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(r.safe(e.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(f=r.enter("destinationRaw"),h+=m.move(r.safe(e.url,{before:h,after:e.title?" ":")",...m.current()}))),f(),e.title&&(f=r.enter(`title${o}`),h+=m.move(" "+l),h+=m.move(r.safe(e.title,{before:h,after:l,...m.current()})),h+=m.move(l),f()),h+=m.move(")"),u(),h}function qB(){return"!"}CE.peek=FB;function CE(e,t,r,a){const l=e.referenceType,o=r.enter("imageReference");let u=r.enter("label");const f=r.createTracker(a);let m=f.move("![");const h=r.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(h+"]["),u();const v=r.stack;r.stack=[],u=r.enter("reference");const y=r.safe(r.associationId(e),{before:m,after:"]",...f.current()});return u(),r.stack=v,o(),l==="full"||!h||h!==y?m+=f.move(y+"]"):l==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function FB(){return"!"}NE.peek=HB;function NE(e,t,r){let a=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(a);)l+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<r.unsafe.length;){const u=r.unsafe[o],f=r.compilePattern(u);let m;if(u.atBreak)for(;m=f.exec(a);){let h=m.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(m.index+1)}}return l+a+l}function HB(){return"`"}function _E(e,t){const r=Pg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}AE.peek=ZB;function AE(e,t,r,a){const l=Kg(r),o=l==='"'?"Quote":"Apostrophe",u=r.createTracker(a);let f,m;if(_E(e,r)){const v=r.stack;r.stack=[],f=r.enter("autolink");let y=u.move("<");return y+=u.move(r.containerPhrasing(e,{before:y,after:">",...u.current()})),y+=u.move(">"),f(),r.stack=v,y}f=r.enter("link"),m=r.enter("label");let h=u.move("[");return h+=u.move(r.containerPhrasing(e,{before:h,after:"](",...u.current()})),h+=u.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=r.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(r.safe(e.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(m=r.enter("destinationRaw"),h+=u.move(r.safe(e.url,{before:h,after:e.title?" ":")",...u.current()}))),m(),e.title&&(m=r.enter(`title${o}`),h+=u.move(" "+l),h+=u.move(r.safe(e.title,{before:h,after:l,...u.current()})),h+=u.move(l),m()),h+=u.move(")"),f(),h}function ZB(e,t,r){return _E(e,r)?"<":"["}TE.peek=VB;function TE(e,t,r,a){const l=e.referenceType,o=r.enter("linkReference");let u=r.enter("label");const f=r.createTracker(a);let m=f.move("[");const h=r.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(h+"]["),u();const v=r.stack;r.stack=[],u=r.enter("reference");const y=r.safe(r.associationId(e),{before:m,after:"]",...f.current()});return u(),r.stack=v,o(),l==="full"||!h||h!==y?m+=f.move(y+"]"):l==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function VB(){return"["}function Yg(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function QB(e){const t=Yg(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function GB(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function zE(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function KB(e,t,r,a){const l=r.enter("list"),o=r.bulletCurrent;let u=e.ordered?GB(r):Yg(r);const f=e.ordered?u==="."?")":".":QB(r);let m=t&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!e.ordered){const v=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&v&&(!v.children||!v.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&&(m=!0),zE(r)===u&&v){let y=-1;for(;++y<e.children.length;){const x=e.children[y];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(u=f),r.bulletCurrent=u;const h=r.containerFlow(e,a);return r.bulletLastUsed=u,r.bulletCurrent=o,l(),h}function YB(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function XB(e,t,r,a){const l=YB(r);let o=r.bulletCurrent||Yg(r);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let u=o.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const f=r.createTracker(a);f.move(o+" ".repeat(u-o.length)),f.shift(u);const m=r.enter("listItem"),h=r.indentLines(r.containerFlow(e,f.current()),v);return m(),h;function v(y,x,b){return x?(b?"":" ".repeat(u))+y:(b?o:o+" ".repeat(u-o.length))+y}}function JB(e,t,r,a){const l=r.enter("paragraph"),o=r.enter("phrasing"),u=r.containerPhrasing(e,a);return o(),l(),u}const WB=Zd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function eP(e,t,r,a){return(e.children.some(function(u){return WB(u)})?r.containerPhrasing:r.containerFlow).call(r,e,a)}function tP(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}RE.peek=nP;function RE(e,t,r,a){const l=tP(r),o=r.enter("strong"),u=r.createTracker(a),f=u.move(l+l);let m=u.move(r.containerPhrasing(e,{after:l,before:f,...u.current()}));const h=m.charCodeAt(0),v=wd(a.before.charCodeAt(a.before.length-1),h,l);v.inside&&(m=lu(h)+m.slice(1));const y=m.charCodeAt(m.length-1),x=wd(a.after.charCodeAt(0),y,l);x.inside&&(m=m.slice(0,-1)+lu(y));const b=u.move(l+l);return o(),r.attentionEncodeSurroundingInfo={after:x.outside,before:v.outside},f+m+b}function nP(e,t,r){return r.options.strong||"*"}function rP(e,t,r,a){return r.safe(e.value,a)}function iP(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function aP(e,t,r){const a=(zE(r)+(r.options.ruleSpaces?" ":"")).repeat(iP(r));return r.options.ruleSpaces?a.slice(0,-1):a}const OE={blockquote:_B,break:sS,code:DB,definition:LB,emphasis:kE,hardBreak:sS,heading:PB,html:jE,image:EE,imageReference:CE,inlineCode:NE,link:AE,linkReference:TE,list:KB,listItem:XB,paragraph:JB,root:eP,strong:RE,text:rP,thematicBreak:aP};function lP(){return{enter:{table:sP,tableData:oS,tableHeader:oS,tableRow:uP},exit:{codeText:cP,table:oP,tableData:Xm,tableHeader:Xm,tableRow:Xm}}}function sP(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function oP(e){this.exit(e),this.data.inTable=void 0}function uP(e){this.enter({type:"tableRow",children:[]},e)}function Xm(e){this.exit(e)}function oS(e){this.enter({type:"tableCell",children:[]},e)}function cP(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,dP));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function dP(e,t){return t==="|"?t:e}function fP(e){const t=e||{},r=t.tableCellPadding,a=t.tablePipeAlign,l=t.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
359
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:u,tableCell:m,tableRow:f}};function u(b,j,k,N){return h(v(b,k,N),b.align)}function f(b,j,k,N){const E=y(b,k,N),R=h([E]);return R.slice(0,R.indexOf(`
360
- `))}function m(b,j,k,N){const E=k.enter("tableCell"),R=k.enter("phrasing"),A=k.containerPhrasing(b,{...N,before:o,after:o});return R(),E(),A}function h(b,j){return CB(b,{align:j,alignDelimiters:a,padding:r,stringLength:l})}function v(b,j,k){const N=b.children;let E=-1;const R=[],A=j.enter("table");for(;++E<N.length;)R[E]=y(N[E],j,k);return A(),R}function y(b,j,k){const N=b.children;let E=-1;const R=[],A=j.enter("tableRow");for(;++E<N.length;)R[E]=m(N[E],b,j,k);return A(),R}function x(b,j,k){let N=OE.inlineCode(b,j,k);return k.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function hP(){return{exit:{taskListCheckValueChecked:uS,taskListCheckValueUnchecked:uS,paragraph:pP}}}function mP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:gP}}}function uS(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function pP(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const a=r.children[0];if(a&&a.type==="text"){const l=t.children;let o=-1,u;for(;++o<l.length;){const f=l[o];if(f.type==="paragraph"){u=f;break}}u===r&&(a.value=a.value.slice(1),a.value.length===0?r.children.shift():r.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,r.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function gP(e,t,r,a){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",f=r.createTracker(a);o&&f.move(u);let m=OE.listItem(e,t,r,{...a,...f.current()});return o&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),m;function h(v){return v+u}}function yP(){return[K8(),gB(),bB(),lP(),hP()]}function vP(e){return{extensions:[Y8(),yB(e),SB(),fP(e),mP()]}}const xP={tokenize:EP,partial:!0},DE={tokenize:CP,partial:!0},ME={tokenize:NP,partial:!0},LE={tokenize:_P,partial:!0},bP={tokenize:AP,partial:!0},UE={name:"wwwAutolink",tokenize:kP,previous:BE},IE={name:"protocolAutolink",tokenize:jP,previous:PE},Ni={name:"emailAutolink",tokenize:wP,previous:$E},Qr={};function SP(){return{text:Qr}}let Ga=48;for(;Ga<123;)Qr[Ga]=Ni,Ga++,Ga===58?Ga=65:Ga===91&&(Ga=97);Qr[43]=Ni;Qr[45]=Ni;Qr[46]=Ni;Qr[95]=Ni;Qr[72]=[Ni,IE];Qr[104]=[Ni,IE];Qr[87]=[Ni,UE];Qr[119]=[Ni,UE];function wP(e,t,r){const a=this;let l,o;return u;function u(y){return!Fp(y)||!$E.call(a,a.previous)||Xg(a.events)?r(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(y))}function f(y){return Fp(y)?(e.consume(y),f):y===64?(e.consume(y),m):r(y)}function m(y){return y===46?e.check(bP,v,h)(y):y===45||y===95||fn(y)?(o=!0,e.consume(y),m):v(y)}function h(y){return e.consume(y),l=!0,m}function v(y){return o&&l&&bn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(y)):r(y)}}function kP(e,t,r){const a=this;return l;function l(u){return u!==87&&u!==119||!BE.call(a,a.previous)||Xg(a.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(xP,e.attempt(DE,e.attempt(ME,o),r),r)(u))}function o(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function jP(e,t,r){const a=this;let l="",o=!1;return u;function u(y){return(y===72||y===104)&&PE.call(a,a.previous)&&!Xg(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(y),e.consume(y),f):r(y)}function f(y){if(bn(y)&&l.length<5)return l+=String.fromCodePoint(y),e.consume(y),f;if(y===58){const x=l.toLowerCase();if(x==="http"||x==="https")return e.consume(y),m}return r(y)}function m(y){return y===47?(e.consume(y),o?h:(o=!0,m)):r(y)}function h(y){return y===null||xd(y)||xt(y)||dl(y)||qd(y)?r(y):e.attempt(DE,e.attempt(ME,v),r)(y)}function v(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(y)}}function EP(e,t,r){let a=0;return l;function l(u){return(u===87||u===119)&&a<3?(a++,e.consume(u),l):u===46&&a===3?(e.consume(u),o):r(u)}function o(u){return u===null?r(u):t(u)}}function CP(e,t,r){let a,l,o;return u;function u(h){return h===46||h===95?e.check(LE,m,f)(h):h===null||xt(h)||dl(h)||h!==45&&qd(h)?m(h):(o=!0,e.consume(h),u)}function f(h){return h===95?a=!0:(l=a,a=void 0),e.consume(h),u}function m(h){return l||a||!o?r(h):t(h)}}function NP(e,t){let r=0,a=0;return l;function l(u){return u===40?(r++,e.consume(u),l):u===41&&a<r?o(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(LE,t,o)(u):u===null||xt(u)||dl(u)?t(u):(e.consume(u),l)}function o(u){return u===41&&a++,e.consume(u),l}}function _P(e,t,r){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),o):f===93?(e.consume(f),l):f===60||f===null||xt(f)||dl(f)?t(f):r(f)}function l(f){return f===null||f===40||f===91||xt(f)||dl(f)?t(f):a(f)}function o(f){return bn(f)?u(f):r(f)}function u(f){return f===59?(e.consume(f),a):bn(f)?(e.consume(f),u):r(f)}}function AP(e,t,r){return a;function a(o){return e.consume(o),l}function l(o){return fn(o)?r(o):t(o)}}function BE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xt(e)}function PE(e){return!bn(e)}function $E(e){return!(e===47||Fp(e))}function Fp(e){return e===43||e===45||e===46||e===95||fn(e)}function Xg(e){let t=e.length,r=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){r=!0;break}if(a._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const TP={tokenize:IP,partial:!0};function zP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:MP,continuation:{tokenize:LP},exit:UP}},text:{91:{name:"gfmFootnoteCall",tokenize:DP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:RP,resolveTo:OP}}}}function RP(e,t,r){const a=this;let l=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u;for(;l--;){const m=a.events[l][1];if(m.type==="labelImage"){u=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return f;function f(m){if(!u||!u._balanced)return r(m);const h=Er(a.sliceSerialize({start:u.end,end:a.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?r(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),t(m))}}function OP(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[r+1],e[r+2],["enter",a,t],e[r+3],e[r+4],["enter",l,t],["exit",l,t],["enter",o,t],["enter",u,t],["exit",u,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(r,e.length-r+1,...f),e}function DP(e,t,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,u;return f;function f(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),m}function m(y){return y!==94?r(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(y){if(o>999||y===93&&!u||y===null||y===91||xt(y))return r(y);if(y===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return l.includes(Er(a.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(y)}return xt(y)||(u=!0),o++,e.consume(y),y===92?v:h}function v(y){return y===91||y===92||y===93?(e.consume(y),o++,h):h(y)}}function MP(e,t,r){const a=this,l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,u=0,f;return m;function m(j){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(j),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(j){return j===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(j),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",v):r(j)}function v(j){if(u>999||j===93&&!f||j===null||j===91||xt(j))return r(j);if(j===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return o=Er(a.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(j),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return xt(j)||(f=!0),u++,e.consume(j),j===92?y:v}function y(j){return j===91||j===92||j===93?(e.consume(j),u++,v):v(j)}function x(j){return j===58?(e.enter("definitionMarker"),e.consume(j),e.exit("definitionMarker"),l.includes(o)||l.push(o),et(e,b,"gfmFootnoteDefinitionWhitespace")):r(j)}function b(j){return t(j)}}function LP(e,t,r){return e.check(vu,t,e.attempt(TP,t,r))}function UP(e){e.exit("gfmFootnoteDefinition")}function IP(e,t,r){const a=this;return et(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const u=a.events[a.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(o):r(o)}}function BP(e){let r=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:l};return r==null&&(r=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function l(u,f){let m=-1;for(;++m<u.length;)if(u[m][0]==="enter"&&u[m][1].type==="strikethroughSequenceTemporary"&&u[m][1]._close){let h=m;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[m][1].end.offset-u[m][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[m][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const v={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[m][1].end)},y={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[m][1].start)},x=[["enter",v,f],["enter",u[h][1],f],["exit",u[h][1],f],["enter",y,f]],b=f.parser.constructs.insideSpan.null;b&&Jn(x,x.length,0,Fd(b,u.slice(h+1,m),f)),Jn(x,x.length,0,[["exit",y,f],["enter",u[m][1],f],["exit",u[m][1],f],["exit",v,f]]),Jn(u,h-1,m-h+3,x),m=h+x.length-2;break}}for(m=-1;++m<u.length;)u[m][1].type==="strikethroughSequenceTemporary"&&(u[m][1].type="data");return u}function o(u,f,m){const h=this.previous,v=this.events;let y=0;return x;function x(j){return h===126&&v[v.length-1][1].type!=="characterEscape"?m(j):(u.enter("strikethroughSequenceTemporary"),b(j))}function b(j){const k=Rs(h);if(j===126)return y>1?m(j):(u.consume(j),y++,b);if(y<2&&!r)return m(j);const N=u.exit("strikethroughSequenceTemporary"),E=Rs(j);return N._open=!E||E===2&&!!k,N._close=!k||k===2&&!!E,f(j)}}}class PP{constructor(){this.map=[]}add(t,r,a){$P(this,t,r,a)}consume(t){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const a=[];for(;r>0;)r-=1,a.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];a.push(t.slice()),t.length=0;let l=a.pop();for(;l;){for(const o of l)t.push(o);l=a.pop()}this.map.length=0}}function $P(e,t,r,a){let l=0;if(!(r===0&&a.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=r,e.map[l][2].push(...a);return}l+=1}e.map.push([t,r,a])}}function qP(e,t){let r=!1;const a=[];for(;t<e.length;){const l=e[t];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return a}function FP(){return{flow:{null:{name:"table",tokenize:HP,resolveAll:ZP}}}}function HP(e,t,r){const a=this;let l=0,o=0,u;return f;function f(F){let re=a.events.length-1;for(;re>-1;){const de=a.events[re][1].type;if(de==="lineEnding"||de==="linePrefix")re--;else break}const le=re>-1?a.events[re][1].type:null,X=le==="tableHead"||le==="tableRow"?z:m;return X===z&&a.parser.lazy[a.now().line]?r(F):X(F)}function m(F){return e.enter("tableHead"),e.enter("tableRow"),h(F)}function h(F){return F===124||(u=!0,o+=1),v(F)}function v(F){return F===null?r(F):ze(F)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),b):r(F):Ve(F)?et(e,v,"whitespace")(F):(o+=1,u&&(u=!1,l+=1),F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),u=!0,v):(e.enter("data"),y(F)))}function y(F){return F===null||F===124||xt(F)?(e.exit("data"),v(F)):(e.consume(F),F===92?x:y)}function x(F){return F===92||F===124?(e.consume(F),y):y(F)}function b(F){return a.interrupt=!1,a.parser.lazy[a.now().line]?r(F):(e.enter("tableDelimiterRow"),u=!1,Ve(F)?et(e,j,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):j(F))}function j(F){return F===45||F===58?N(F):F===124?(u=!0,e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),k):q(F)}function k(F){return Ve(F)?et(e,N,"whitespace")(F):N(F)}function N(F){return F===58?(o+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),E):F===45?(o+=1,E(F)):F===null||ze(F)?I(F):q(F)}function E(F){return F===45?(e.enter("tableDelimiterFiller"),R(F)):q(F)}function R(F){return F===45?(e.consume(F),R):F===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(F))}function A(F){return Ve(F)?et(e,I,"whitespace")(F):I(F)}function I(F){return F===124?j(F):F===null||ze(F)?!u||l!==o?q(F):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(F)):q(F)}function q(F){return r(F)}function z(F){return e.enter("tableRow"),$(F)}function $(F){return F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),$):F===null||ze(F)?(e.exit("tableRow"),t(F)):Ve(F)?et(e,$,"whitespace")(F):(e.enter("data"),Z(F))}function Z(F){return F===null||F===124||xt(F)?(e.exit("data"),$(F)):(e.consume(F),F===92?W:Z)}function W(F){return F===92||F===124?(e.consume(F),Z):Z(F)}}function ZP(e,t){let r=-1,a=!0,l=0,o=[0,0,0,0],u=[0,0,0,0],f=!1,m=0,h,v,y;const x=new PP;for(;++r<e.length;){const b=e[r],j=b[1];b[0]==="enter"?j.type==="tableHead"?(f=!1,m!==0&&(cS(x,t,m,h,v),v=void 0,m=0),h={type:"table",start:Object.assign({},j.start),end:Object.assign({},j.end)},x.add(r,0,[["enter",h,t]])):j.type==="tableRow"||j.type==="tableDelimiterRow"?(a=!0,y=void 0,o=[0,0,0,0],u=[0,r+1,0,0],f&&(f=!1,v={type:"tableBody",start:Object.assign({},j.start),end:Object.assign({},j.end)},x.add(r,0,[["enter",v,t]])),l=j.type==="tableDelimiterRow"?2:v?3:1):l&&(j.type==="data"||j.type==="tableDelimiterMarker"||j.type==="tableDelimiterFiller")?(a=!1,u[2]===0&&(o[1]!==0&&(u[0]=u[1],y=Jc(x,t,o,l,void 0,y),o=[0,0,0,0]),u[2]=r)):j.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(u[0]=u[1],y=Jc(x,t,o,l,void 0,y)),o=u,u=[o[1],r,0,0])):j.type==="tableHead"?(f=!0,m=r):j.type==="tableRow"||j.type==="tableDelimiterRow"?(m=r,o[1]!==0?(u[0]=u[1],y=Jc(x,t,o,l,r,y)):u[1]!==0&&(y=Jc(x,t,u,l,r,y)),l=0):l&&(j.type==="data"||j.type==="tableDelimiterMarker"||j.type==="tableDelimiterFiller")&&(u[3]=r)}for(m!==0&&cS(x,t,m,h,v),x.consume(t.events),r=-1;++r<t.events.length;){const b=t.events[r];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=qP(t.events,r))}return e}function Jc(e,t,r,a,l,o){const u=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(o.end=Object.assign({},us(t.events,r[0])),e.add(r[0],0,[["exit",o,t]]));const m=us(t.events,r[1]);if(o={type:u,start:Object.assign({},m),end:Object.assign({},m)},e.add(r[1],0,[["enter",o,t]]),r[2]!==0){const h=us(t.events,r[2]),v=us(t.events,r[3]),y={type:f,start:Object.assign({},h),end:Object.assign({},v)};if(e.add(r[2],0,[["enter",y,t]]),a!==2){const x=t.events[r[2]],b=t.events[r[3]];if(x[1].end=Object.assign({},b[1].end),x[1].type="chunkText",x[1].contentType="text",r[3]>r[2]+1){const j=r[2]+1,k=r[3]-r[2]-1;e.add(j,k,[])}}e.add(r[3]+1,0,[["exit",y,t]])}return l!==void 0&&(o.end=Object.assign({},us(t.events,l)),e.add(l,0,[["exit",o,t]]),o=void 0),o}function cS(e,t,r,a,l){const o=[],u=us(t.events,r);l&&(l.end=Object.assign({},u),o.push(["exit",l,t])),a.end=Object.assign({},u),o.push(["exit",a,t]),e.add(r+1,0,o)}function us(e,t){const r=e[t],a=r[0]==="enter"?"start":"end";return r[1][a]}const VP={name:"tasklistCheck",tokenize:GP};function QP(){return{text:{91:VP}}}function GP(e,t,r){const a=this;return l;function l(m){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?r(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),o)}function o(m){return xt(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),u):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),u):r(m)}function u(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(m)}function f(m){return ze(m)?t(m):Ve(m)?e.check({tokenize:KP},t,r)(m):r(m)}}function KP(e,t,r){return et(e,a,"whitespace");function a(l){return l===null?r(l):t(l)}}function YP(e){return Xj([SP(),zP(),BP(e),FP(),QP()])}const XP={};function JP(e){const t=this,r=e||XP,a=t.data(),l=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),u=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);l.push(YP(r)),o.push(yP()),u.push(vP(r))}function qE({children:e,className:t}){return d.jsx("div",{className:Te("prose prose-sm max-w-none","prose-headings:text-current prose-p:text-current prose-li:text-current prose-strong:text-current prose-em:text-current prose-blockquote:text-current","prose-a:text-[color:var(--accent)] prose-a:no-underline hover:prose-a:underline","prose-code:text-current prose-code:bg-[color:var(--bg-sunken)] prose-code:rounded prose-code:px-1 prose-code:py-0.5 prose-code:text-[0.9em] prose-code:before:content-none prose-code:after:content-none","prose-pre:bg-[color:var(--bg-sunken)] prose-pre:text-current prose-pre:border prose-pre:border-[color:var(--border)]","prose-hr:border-[color:var(--border)]","prose-blockquote:border-l-[color:var(--border-strong)] prose-blockquote:text-[color:var(--fg-2)]","prose-th:border-[color:var(--border)] prose-td:border-[color:var(--border)]",t),children:d.jsx(U8,{remarkPlugins:[JP,G8],children:e})})}function WP({value:e,baseline:t,onChange:r,onRevert:a,disabled:l}){const[o,u]=S.useState(!1),f=S.useRef(null),m=e!==t;return S.useEffect(()=>{var h;o&&((h=f.current)==null||h.focus())},[o]),d.jsxs("section",{className:`rounded-md border bg-white ${m?"border-amber-300":"border-gray-200"}`,children:[d.jsxs("header",{className:"flex items-center justify-between border-b px-4 py-2",children:[d.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:["System Prompt Append",m&&d.jsx("span",{className:"text-xs rounded bg-amber-100 px-1.5 py-0.5 text-amber-900",children:"changed"})]}),d.jsx("div",{className:"flex gap-2",children:!o&&!l&&d.jsxs(be,{size:"sm",variant:"outline",onClick:()=>u(!0),children:[d.jsx(Ad,{className:"h-3.5 w-3.5 mr-1.5"})," Edit"]})})]}),d.jsx("div",{className:"px-4 py-3",children:o?d.jsxs("div",{className:"space-y-2",children:[d.jsx("textarea",{ref:f,value:e,onChange:h=>r(h.target.value),onKeyDown:h=>{h.key==="Escape"&&(h.preventDefault(),u(!1))},rows:10,className:"w-full rounded border bg-transparent p-2 font-mono text-sm shadow-sm focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Appended to Claude Code's default system prompt.",maxLength:32e3,spellCheck:!1}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(be,{size:"sm",variant:"ghost",onClick:()=>{a(),u(!1)},disabled:!m,children:"Revert"}),d.jsx(be,{size:"sm",onClick:()=>u(!1),children:"Done"})]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"`Done` collapses this editor. The change is saved only when you click Save in the bar at the bottom of the page."})]}):d.jsx("div",{className:"rounded bg-muted p-3 text-sm max-h-64 overflow-auto min-h-8",children:e?d.jsx(qE,{children:e}):d.jsx("span",{className:"text-muted-foreground italic",children:"No prompt append."})})})]})}const e$={prompt:"Prompt",model:"Model",mcp:"MCP",env:"Env",git:"Git"};function t$(e){return!e.summary.anyDirty&&!e.conflictMessage&&!e.errorMessage?null:d.jsx("div",{className:"sticky bottom-0 z-30 -mx-6 border-t bg-yellow-50/95 px-6 py-3 backdrop-blur",children:d.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[d.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[e.summary.anyDirty&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{"aria-hidden":!0,children:"🟡"}),d.jsxs("span",{className:"font-medium",children:[e.summary.dirtySections.length," section",e.summary.dirtySections.length===1?"":"s"," with unsaved changes"]}),d.jsx("span",{className:"text-muted-foreground",children:"·"}),d.jsx("span",{className:"flex flex-wrap gap-1",children:e.summary.dirtySections.map(t=>d.jsx("button",{type:"button",className:"rounded bg-white px-2 py-0.5 text-xs border hover:bg-amber-100",onClick:()=>e.onJumpTo(t),children:e$[t]},t))})]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:e.saveHint}),e.conflictMessage&&d.jsx("p",{className:"text-xs text-amber-900 font-medium",children:e.conflictMessage}),e.errorMessage&&d.jsx("p",{className:"text-xs text-red-800 font-medium",children:e.errorMessage})]}),d.jsxs("div",{className:"flex gap-2",children:[e.conflictMessage&&d.jsx(be,{variant:"outline",size:"sm",onClick:e.onReloadRemote,children:"Discard mine, load latest"}),d.jsx(be,{variant:"ghost",size:"sm",onClick:e.onDiscard,disabled:e.saving,children:"Discard changes"}),d.jsx(be,{size:"sm",onClick:e.onSave,disabled:e.saving||!e.summary.anyDirty,children:e.saving?"Saving…":"Save"})]})]})})}function Ka(e){return`agent-cfg-${e}`}function n$(e){switch(e){case"danger":return"border-red-300 bg-red-50 text-red-900";case"warning":return"border-amber-300 bg-amber-50 text-amber-900";case"muted":return"border-gray-300 bg-gray-50 text-gray-700";default:return"border-gray-200 bg-white text-gray-800"}}function r$(e){switch(e){case"danger":return"bg-red-500";case"warning":return"bg-amber-500";case"muted":return"bg-gray-400";default:return"bg-green-500"}}function i$(e){const{agent:t,clientStatus:r,runtimeState:a,isHuman:l}=e;return t.status==="suspended"?{tone:"muted",symbol:"◌",label:"Suspended"}:l?{tone:"neutral",symbol:"●",label:"Active"}:r!=null&&r.offlineSince&&!r.clientId?{tone:"muted",symbol:"○",label:"Unclaimed"}:r&&!r.online?{tone:"warning",symbol:"⚠",label:"Computer offline"}:a==="error"?{tone:"danger",symbol:"●",label:"Error"}:a==="working"?{tone:"neutral",symbol:"●",label:"Working"}:a==="idle"?{tone:"neutral",symbol:"●",label:"Idle"}:{tone:"neutral",symbol:"●",label:"Online"}}function a$(e){if(!e)return"—";const t=new Date(e).getTime(),r=Date.now()-t;if(!Number.isFinite(r)||r<0)return Cr(e);const a=Math.floor(r/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;const l=Math.floor(a/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function l$(e){const{agent:t,cfg:r,clientStatus:a,runtimeType:l,activeSessions:o,isHuman:u}=e,f=i$(e),m=[];!u&&l&&m.push(l),!u&&typeof o=="number"&&m.push(`${o} session${o===1?"":"s"}`),r&&m.push(`config v${r.version}`);const h=a==null?void 0:a.offlineSince,v=!u&&a&&!a.online;return d.jsxs("div",{className:Te("rounded-md border px-4 py-3 text-sm space-y-1",n$(f.tone)),children:[d.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[d.jsx("span",{className:Te("inline-block h-2 w-2 rounded-full",r$(f.tone)),"aria-hidden":!0}),d.jsx("span",{children:f.symbol==="⚠"?f.symbol:null}),d.jsx("span",{children:f.label}),m.length>0&&d.jsxs("span",{className:"text-muted-foreground font-normal",children:["· ",m.join(" · ")]})]}),!u&&d.jsx("div",{className:"text-xs text-muted-foreground",children:a!=null&&a.clientId?d.jsxs(d.Fragment,{children:["Computer ",d.jsx("span",{className:"font-mono",children:a.clientId}),a.online?null:d.jsxs(d.Fragment,{children:[" · offline since ",d.jsx("span",{children:Cr(h)})]})]}):d.jsx("span",{children:"No computer bound yet"})}),r&&d.jsxs("div",{className:"text-xs text-muted-foreground",children:["Config updated by ",d.jsx("span",{className:"font-medium",children:r.updatedBy||"—"})," · ",a$(r.updatedAt)]}),v&&d.jsx("p",{className:"mt-1 text-xs text-amber-900",children:"Changes saved here won't take effect until the computer reconnects."}),!u&&!(a!=null&&a.clientId)&&t.status==="active"&&d.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Configure now; it will apply when a computer claims this agent."})]})}function s$(e){return e.isUnclaimed?"Saving: configuration stored; will apply when a computer claims this agent.":e.isOffline?"Saving: configuration stored; will apply when the computer reconnects.":e.activeSessions>0?`Saving: new chats use this immediately; ${e.activeSessions} active chat${e.activeSessions===1?"":"s"} switch on their next message.`:"Saving: new chats use this immediately."}function o$(e,t){let r=t.size+1;for(;t.has(`${e}-${r}`);)r++;return`${e}-${r}`}function u$(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Jm(e,t){return e.map((r,a)=>({key:`${t}-${a+1}`,value:r,baseline:r,status:"unchanged"}))}function dS(e){return e.map(t=>t.status==="deleted"?t:t.baseline==null?{...t,status:"added"}:u$(t.value,t.baseline)?{...t,status:"unchanged"}:{...t,status:"modified"})}function Wm(e,t){const r=e;return{add:a=>t(l=>{const o=l[e],u=new Set(o.map(h=>h.key)),f=o$(r,u),m=[...o,{key:f,value:a,baseline:null,status:"added"}];return{...l,[e]:dS(m)}}),update:(a,l)=>t(o=>{const f=o[e].map(m=>m.key===a?{...m,value:l}:m);return{...o,[e]:dS(f)}}),remove:a=>t(l=>{const u=l[e].map(f=>f.key!==a?f:f.baseline==null?null:{...f,status:"deleted"}).filter(f=>f!==null);return{...l,[e]:u}}),undo:a=>t(l=>{const u=l[e].map(f=>f.key!==a||f.baseline==null?f:{...f,value:f.baseline,status:"unchanged"});return{...l,[e]:u}})}}function c$(e){return{promptAppend:e.payload.prompt.append,model:e.payload.model,mcp:Jm(e.payload.mcpServers,"mcp"),env:Jm(e.payload.env,"env"),git:Jm(e.payload.gitRepos,"git")}}function d$(e){const[t,r]=S.useState(null);S.useEffect(()=>{e&&t===null&&r(c$(e))},[e,t]);const a=t??{promptAppend:"",model:"",mcp:[],env:[],git:[]},l=(e==null?void 0:e.payload.prompt.append)??"",o=(e==null?void 0:e.payload.model)??"",u=a.promptAppend!==l,f=a.model!==o,m=S.useMemo(()=>{const A=[],I=Z=>Z.reduce((W,F)=>F.status==="unchanged"?W:W+1,0),q=I(a.mcp),z=I(a.env),$=I(a.git);return u&&A.push("prompt"),f&&A.push("model"),q>0&&A.push("mcp"),z>0&&A.push("env"),$>0&&A.push("git"),{anyDirty:A.length>0,dirtySections:A,counts:{prompt:u?1:0,model:f?1:0,mcp:q,env:z,git:$}}},[a,u,f]),h=S.useCallback(A=>{r(I=>I&&A(I))},[]),v=S.useCallback(A=>h(I=>({...I,promptAppend:A})),[h]),y=S.useCallback(()=>h(A=>({...A,promptAppend:l})),[h,l]),x=S.useCallback(A=>h(I=>({...I,model:A})),[h]),b=S.useCallback(()=>h(A=>({...A,model:o})),[h,o]),j=S.useMemo(()=>Wm("mcp",h),[h]),k=S.useMemo(()=>Wm("env",h),[h]),N=S.useMemo(()=>Wm("git",h),[h]),E=S.useCallback(()=>{r(null)},[]),R=S.useCallback(()=>{if(!t||!e)return{};const A={};u&&(A.prompt={append:t.promptAppend}),f&&(A.model=t.model);const I=m.counts.mcp>0,q=m.counts.env>0,z=m.counts.git>0;return I&&(A.mcpServers=t.mcp.filter($=>$.status!=="deleted").map($=>$.value)),q&&(A.env=t.env.filter($=>$.status!=="deleted").map($=>{const Z=$.value;return Z.sensitive&&Z.value===zp?{key:Z.key,value:zp,sensitive:!0}:Z})),z&&(A.gitRepos=t.git.filter($=>$.status!=="deleted").map($=>$.value)),A},[t,e,u,f,m]);return{draft:a,summary:m,promptDirty:u,modelDirty:f,setPromptAppend:v,revertPrompt:y,setModel:x,revertModel:b,addMcp:j.add,updateMcp:j.update,deleteMcp:j.remove,undoDeleteMcp:j.undo,addEnv:k.add,updateEnv:k.update,deleteEnv:k.remove,undoDeleteEnv:k.undo,addGit:N.add,updateGit:N.update,deleteGit:N.remove,undoDeleteGit:N.undo,resetAll:E,buildPayloadPatch:R}}const f$=Object.values(J5);function h$(){var jn,bu,Ca,Na,_a,Tr,Aa,Ai,Su;const t=B2().uuid??"",r=Vr(),a=er(),l=Fe({queryKey:["agent",t],queryFn:()=>Rk(t),enabled:!!t}),o=Fe({queryKey:["agent-config",t],queryFn:()=>u6(t),enabled:!!t&&((jn=l.data)==null?void 0:jn.type)!=="human"}),u=Fe({queryKey:["agent-client-status",t],queryFn:()=>f6(t),enabled:!!t&&((bu=l.data)==null?void 0:bu.type)!=="human"}),f=Fe({queryKey:["agent-sessions-active",t],queryFn:()=>Us(t,{state:"active"}),enabled:!!t&&((Ca=l.data)==null?void 0:Ca.type)!=="human"}),m=Fe({queryKey:["adapters"],queryFn:Lj}),h=Fe({queryKey:["adapter-mappings"],queryFn:Dj}),{data:v}=Fe({queryKey:["adapter-statuses"],queryFn:Mj,refetchInterval:15e3}),y=((Na=m.data)==null?void 0:Na.filter(ue=>ue.agentId===t))??[],x=((_a=h.data)==null?void 0:_a.filter(ue=>ue.agentId===t))??[],b=d$(o.data),[j,k]=S.useState(null),[N,E]=S.useState(null),R=vt({mutationFn:async()=>{if(!o.data)throw new Error("config not loaded");const ue=b.buildPayloadPatch();return c6(t,{expectedVersion:o.data.version,payload:ue})},onSuccess:ue=>{a.setQueryData(["agent-config",t],ue),k(null),E(null)},onError:ue=>{if(ue instanceof Nd&&ue.status===409){E("Someone else saved a newer version while you were editing."),k(null);return}k(ue instanceof Error?ue.message:String(ue))}}),A=S.useCallback(()=>{E(null),k(null),a.invalidateQueries({queryKey:["agent-config",t]}),b.resetAll()},[a,t,b]),I=S.useCallback(ue=>{const Qe=document.getElementById(Ka(ue));Qe&&Qe.scrollIntoView({behavior:"smooth",block:"start"})},[]),q=vt({mutationFn:ue=>V0(t,ue),onSuccess:()=>{a.invalidateQueries({queryKey:["agent",t]}),a.invalidateQueries({queryKey:["agents"]})}}),z=vt({mutationFn:()=>rD(t),onSuccess:()=>a.invalidateQueries({queryKey:["agent",t]})}),$=vt({mutationFn:()=>iD(t),onSuccess:()=>a.invalidateQueries({queryKey:["agent",t]})}),Z=vt({mutationFn:()=>nD(t),onSuccess:()=>r("/agents")}),W=vt({mutationFn:()=>aD(t)}),[F,re]=S.useState(!1),le=S.useRef(null);S.useEffect(()=>{if(!F)return;function ue(Qe){le.current&&!le.current.contains(Qe.target)&&re(!1)}return window.addEventListener("mousedown",ue),()=>window.removeEventListener("mousedown",ue)},[F]);const[X,de]=S.useState(!1),[te,B]=S.useState(""),[J,pe]=S.useState(null),Ae=Fe({queryKey:["clients"],queryFn:zd,enabled:X}),T=vt({mutationFn:ue=>V0(t,{clientId:ue}),onSuccess:()=>{a.invalidateQueries({queryKey:["agent",t]}),a.invalidateQueries({queryKey:["agent-client-status",t]}),a.invalidateQueries({queryKey:["agents"]}),de(!1),B(""),pe(null)},onError:ue=>pe(ue instanceof Error?ue.message:String(ue))}),[U,L]=S.useState(!1),[_,se]=S.useState(null),[G,ce]=S.useState(ep),[ye,De]=S.useState(""),ve=vt({mutationFn:async()=>{const ue=fS(G);if(!ue)throw new Error("Credentials are required");return l6({platform:G.platform,agentId:t,credentials:ue,status:G.status})},onSuccess:()=>{a.invalidateQueries({queryKey:["adapters"]}),ne()}}),jt=vt({mutationFn:()=>{if(!_)throw new Error("No adapter selected");const ue={status:G.status},Qe=fS(G);return Qe&&(ue.credentials=Qe),s6(_,ue)},onSuccess:()=>{a.invalidateQueries({queryKey:["adapters"]}),ne()}}),Wt=vt({mutationFn:o6,onSuccess:()=>a.invalidateQueries({queryKey:["adapters"]})}),wn=vt({mutationFn:()=>i6({platform:G.platform,externalUserId:G.externalUserId,agentId:t,boundVia:"manual",displayName:G.displayName||void 0}),onSuccess:()=>{a.invalidateQueries({queryKey:["adapter-mappings"]}),ne()}}),xr=vt({mutationFn:a6,onSuccess:()=>a.invalidateQueries({queryKey:["adapter-mappings"]})}),[en,Gr]=S.useState(null),_r=vt({mutationFn:()=>d6(t,b.buildPayloadPatch()),onSuccess:ue=>{const Qe=ue.diff.length?ue.diff.map(pn=>`${pn.op} ${pn.path}`).join(`
361
- `):"(no changes)";Gr(Qe)},onError:ue=>Gr(`Dry run failed: ${ue instanceof Error?ue.message:String(ue)}`)});if(S.useEffect(()=>{if(!b.summary.anyDirty)return;const ue=Qe=>{Qe.preventDefault(),Qe.returnValue=""};return window.addEventListener("beforeunload",ue),()=>window.removeEventListener("beforeunload",ue)},[b.summary.anyDirty]),l.isLoading)return d.jsx("div",{className:"text-muted-foreground",children:"Loading..."});if(l.error)return d.jsxs("div",{className:"text-destructive",children:["Failed to load agent: ",l.error instanceof Error?l.error.message:"Unknown error"]});const Et=l.data;if(!Et)return d.jsx("div",{className:"text-muted-foreground",children:"Agent not found"});const Kt=Et.type==="human",kn=u.data,Kr=((Tr=f.data)==null?void 0:Tr.length)??0,_i=!Kt&&!(kn!=null&&kn.clientId),$s=!Kt&&kn?!kn.online&&!!kn.clientId:!1,yl=Et,tn=yl.runtimeState??null,qs=yl.runtimeType??null;function ne(){L(!1),se(null),ce(ep),De("")}function me(ue){se(ue.id),ce({...ep,platform:ue.platform,status:ue.status}),L(!0)}function Oe(ue){if(ue.preventDefault(),De(""),Kt){if(!G.externalUserId)return;wn.mutate();return}if(G.platform==="feishu"){if(!_&&(!G.feishuAppId||!G.feishuAppSecret)){De("App ID and App Secret are required");return}}else if(G.platform==="kael"){if(!_&&(!G.kaelUserId||!G.kaelProjectId)){De("User ID and Project ID are required");return}}else{const Qe=G.credentialsJson.trim();if(!_&&!Qe){De("Credentials are required");return}if(Qe)try{JSON.parse(Qe)}catch{De("Invalid JSON");return}}_?jt.mutate():ve.mutate()}const $e=ve.error??jt.error??wn.error,nt=ve.isPending||jt.isPending||wn.isPending,mn=s$({activeSessions:Kr,isUnclaimed:_i,isOffline:$s}),br=b.draft.mcp.filter(ue=>ue.status!=="deleted"),nn=b.draft.env.filter(ue=>ue.status!=="deleted"),Mt=b.draft.git.filter(ue=>ue.status!=="deleted"),un=ue=>new Set(br.filter(Qe=>Qe.key!==ue).map(Qe=>Qe.value.name.toLowerCase())),ct=ue=>new Set(nn.filter(Qe=>Qe.key!==ue).map(Qe=>Qe.value.key)),Ar=ue=>new Set(Mt.filter(Qe=>Qe.key!==ue).map(Qe=>{const{value:pn}=Qe;return pn.localPath?pn.localPath:((pn.url.split(/[?#]/)[0]??"").split(/[/:]/).filter(Boolean).pop()??"").replace(/\.git$/i,"")}).filter(Boolean));return d.jsxs("div",{className:"space-y-5 pb-24",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(be,{variant:"ghost",size:"icon",onClick:()=>r("/agents"),children:d.jsx(ZA,{className:"h-4 w-4"})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("h1",{className:"text-2xl font-semibold truncate",children:Et.displayName??Et.name}),d.jsxs("p",{className:"text-xs text-muted-foreground font-mono truncate",children:["@",Et.name??Et.uuid," · ",Et.type]})]}),d.jsxs("div",{className:"relative",ref:le,children:[d.jsx(be,{variant:"outline",size:"icon",onClick:()=>re(ue=>!ue),title:"More actions",children:d.jsx(hw,{className:"h-4 w-4"})}),F&&d.jsx("div",{className:"absolute right-0 mt-1 z-40 min-w-48 rounded-md border bg-white shadow-lg text-sm",children:d.jsxs("ul",{className:"py-1",children:[!Kt&&Et.status==="active"&&d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>{re(!1),W.reset(),W.mutate()},className:"w-full text-left px-3 py-1.5 hover:bg-gray-50 flex items-center gap-2",disabled:W.isPending,children:[d.jsx(bT,{className:"h-3.5 w-3.5"}),W.isPending?"Testing…":"Test connection"]})}),Et.status==="active"?d.jsx("li",{children:d.jsx("button",{type:"button",onClick:()=>{re(!1),confirm("Suspend this agent? All tokens will be revoked.")&&z.mutate()},className:"w-full text-left px-3 py-1.5 hover:bg-gray-50",children:"Suspend"})}):d.jsx("li",{children:d.jsx("button",{type:"button",onClick:()=>{re(!1),$.mutate()},className:"w-full text-left px-3 py-1.5 hover:bg-gray-50",children:"Reactivate"})}),d.jsx("li",{className:"border-t",children:d.jsx("a",{href:`#${Ka("prompt")}`,onClick:()=>re(!1),className:"block px-3 py-1.5 text-xs text-muted-foreground hover:bg-gray-50",children:"Jump to Behavior"})})]})})]})]}),(W.data||W.error)&&d.jsx(v$,{result:W.data??{status:"error",message:"Failed to reach server"},onDismiss:()=>W.reset()}),d.jsx(l$,{agent:Et,cfg:o.data,clientStatus:kn,runtimeState:tn,runtimeType:qs,activeSessions:Kr,isHuman:Kt}),_i&&Et.status==="active"&&d.jsxs("div",{className:"rounded-md border border-amber-300 bg-amber-50 px-4 py-3 flex items-center justify-between gap-3",children:[d.jsxs("div",{className:"text-sm text-amber-900",children:[d.jsx("div",{className:"font-medium",children:"No computer bound"}),d.jsx("div",{className:"text-xs text-amber-800/80",children:"Bind this agent to a computer so it can run. A computer will also claim it on first WebSocket connect."})]}),d.jsxs(be,{size:"sm",variant:"outline",onClick:()=>de(!0),children:[d.jsx(w0,{className:"h-4 w-4 mr-2"}),"Bind Computer"]})]}),d.jsx(S6,{agent:Et,onSave:async ue=>{await q.mutateAsync(ue)}}),!Kt&&d.jsxs(m$,{loaded:!!o.data,loading:o.isLoading,error:o.error?String(o.error):null,version:((Aa=o.data)==null?void 0:Aa.version)??null,dirty:b.summary.anyDirty,children:[d.jsx("div",{id:Ka("prompt"),children:d.jsx(WP,{value:b.draft.promptAppend,baseline:((Ai=o.data)==null?void 0:Ai.payload.prompt.append)??"",onChange:b.setPromptAppend,onRevert:b.revertPrompt,disabled:Et.status!=="active"})}),d.jsx("div",{id:Ka("model"),children:d.jsx(C6,{value:b.draft.model,baseline:((Su=o.data)==null?void 0:Su.payload.model)??"",onChange:b.setModel,onRevert:b.revertModel,disabled:Et.status!=="active"})}),d.jsx("div",{id:Ka("mcp"),children:d.jsx(k6,{items:b.draft.mcp,otherNames:un,onAdd:b.addMcp,onUpdate:b.updateMcp,onDelete:b.deleteMcp,onUndoDelete:b.undoDeleteMcp,disabled:Et.status!=="active"})}),d.jsx("div",{id:Ka("env"),children:d.jsx(y6,{items:b.draft.env,otherKeys:ct,onAdd:b.addEnv,onUpdate:b.updateEnv,onDelete:b.deleteEnv,onUndoDelete:b.undoDeleteEnv,disabled:Et.status!=="active"})}),d.jsx("div",{id:Ka("git"),children:d.jsx(x6,{items:b.draft.git,otherPaths:Ar,onAdd:b.addGit,onUpdate:b.updateGit,onDelete:b.deleteGit,onUndoDelete:b.undoDeleteGit,disabled:Et.status!=="active"})}),en&&d.jsx("pre",{className:"whitespace-pre-wrap rounded border bg-gray-50 p-2 text-xs",children:en})]}),d.jsxs(ul,{children:[d.jsxs(Ts,{className:"flex flex-row items-center justify-between",children:[d.jsxs(zs,{className:"flex items-center gap-2 text-base",children:[Kt?d.jsx(w0,{className:"h-4 w-4"}):d.jsx(XA,{className:"h-4 w-4"}),"Platform Bindings"]}),d.jsxs(be,{size:"sm",variant:"outline",onClick:()=>L(!0),children:[d.jsx(fl,{className:"h-4 w-4 mr-2"}),Kt?"Bind User":"Bind Bot"]})]}),d.jsx(cl,{children:Kt?d.jsxs(Fr,{children:[d.jsx(Hr,{children:d.jsxs(at,{children:[d.jsx(Ee,{children:"Platform"}),d.jsx(Ee,{children:"External User ID"}),d.jsx(Ee,{children:"Display Name"}),d.jsx(Ee,{children:"Bound Via"}),d.jsx(Ee,{children:"Created"}),d.jsx(Ee,{className:"w-16"})]})}),d.jsx(Zr,{children:x.length===0?d.jsx(at,{children:d.jsx(xe,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"No platform bindings"})}):x.map(ue=>d.jsxs(at,{children:[d.jsx(xe,{children:d.jsx(Gt,{variant:"secondary",children:ue.platform})}),d.jsx(xe,{className:"font-mono text-sm",children:ue.externalUserId}),d.jsx(xe,{children:ue.displayName??"—"}),d.jsx(xe,{children:d.jsx(Gt,{variant:"outline",children:ue.boundVia??"—"})}),d.jsx(xe,{className:"text-muted-foreground",children:Cr(ue.createdAt)}),d.jsx(xe,{children:d.jsx(be,{variant:"ghost",size:"icon",onClick:()=>{confirm("Remove this binding?")&&xr.mutate(ue.id)},disabled:xr.isPending,children:d.jsx(Wo,{className:"h-4 w-4"})})})]},ue.id))})]}):d.jsxs(Fr,{children:[d.jsx(Hr,{children:d.jsxs(at,{children:[d.jsx(Ee,{children:"Platform"}),d.jsx(Ee,{children:"Status"}),d.jsx(Ee,{children:"Connection"}),d.jsx(Ee,{children:"Created"}),d.jsx(Ee,{className:"w-24"})]})}),d.jsx(Zr,{children:y.length===0?d.jsx(at,{children:d.jsx(xe,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"No platform bindings"})}):y.map(ue=>{const Qe=v==null?void 0:v.find(wu=>wu.configId===ue.id),pn=ue.platform==="kael"?ue.status==="active":!!(Qe!=null&&Qe.connected);return d.jsxs(at,{children:[d.jsx(xe,{children:d.jsx(Gt,{variant:"secondary",children:ue.platform})}),d.jsx(xe,{children:d.jsx(Gt,{variant:ue.status==="active"?"default":"destructive",children:ue.status})}),d.jsx(xe,{children:d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:Te("inline-block h-2 w-2 rounded-full",pn?"bg-green-500":"bg-gray-300")}),d.jsx("span",{className:"text-xs text-muted-foreground",children:pn?"Online":"Offline"})]})}),d.jsx(xe,{className:"text-muted-foreground",children:Cr(ue.createdAt)}),d.jsx(xe,{children:d.jsxs("div",{className:"flex gap-1",children:[d.jsx(be,{variant:"ghost",size:"icon",onClick:()=>me(ue),title:"Edit",children:"…"}),d.jsx(be,{variant:"ghost",size:"icon",onClick:()=>{confirm("Remove this bot binding?")&&Wt.mutate(ue.id)},disabled:Wt.isPending,title:"Delete",children:d.jsx(Wo,{className:"h-4 w-4"})})]})})]},ue.id)})})]})})]}),d.jsx(h6,{agent:Et,suspendPending:z.isPending,reactivatePending:$.isPending,deletePending:Z.isPending,onSuspend:()=>{confirm("Suspend this agent? Runtime binds and HTTP calls will be refused.")&&z.mutate()},onReactivate:()=>$.mutate(),onDelete:()=>Z.mutate()}),!Kt&&d.jsx(t$,{summary:b.summary,saveHint:mn,conflictMessage:N,errorMessage:j,saving:R.isPending,onSave:()=>R.mutate(),onDiscard:()=>{(!b.summary.anyDirty||confirm("Discard all unsaved changes?"))&&(b.resetAll(),k(null),E(null))},onReloadRemote:A,onJumpTo:I}),!Kt&&b.summary.anyDirty&&d.jsx("div",{className:"text-xs text-muted-foreground",children:d.jsx("button",{type:"button",onClick:()=>_r.mutate(),className:"underline hover:text-gray-900",disabled:_r.isPending,children:_r.isPending?"Computing dry-run…":"Preview server-side diff"})}),d.jsx(Mn,{open:X,onOpenChange:ue=>{de(ue),ue||(B(""),pe(null),T.reset())},children:d.jsxs(Sn,{children:[d.jsx(Wn,{children:d.jsx(Un,{children:"Bind computer"})}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"Pick a computer you own to pin this agent to. The bind is one-shot — once set, moving the agent requires deleting and re-creating it on the target computer."}),Ae.isLoading?d.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading computers…"}):Ae.error?d.jsxs("div",{className:"text-sm text-destructive",children:["Failed to load computers: ",Ae.error instanceof Error?Ae.error.message:"Unknown"]}):d.jsx(p$,{clients:Ae.data??[],selected:te,onSelect:B}),J&&d.jsx("div",{className:"text-sm text-destructive",children:J})]}),d.jsxs(Ln,{children:[d.jsx(be,{variant:"outline",onClick:()=>de(!1),children:"Cancel"}),d.jsx(be,{disabled:!te||T.isPending,onClick:()=>{pe(null),T.mutate(te)},children:T.isPending?"Binding…":"Bind"})]})]})}),d.jsx(Mn,{open:U,onOpenChange:ue=>ue?L(!0):ne(),children:d.jsxs(Sn,{children:[d.jsx(Wn,{children:d.jsx(Un,{children:Kt?"Bind External User":_?"Edit Bot Binding":"Bind Bot"})}),d.jsxs("form",{onSubmit:Oe,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"binding-platform",children:"Platform"}),d.jsx("select",{id:"binding-platform",value:G.platform,onChange:ue=>ce({...G,platform:ue.target.value}),disabled:!!_,className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50",children:f$.map(ue=>d.jsx("option",{value:ue,children:ue},ue))})]}),Kt?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"binding-ext-id",children:"External User ID"}),d.jsx(gt,{id:"binding-ext-id",value:G.externalUserId,onChange:ue=>ce({...G,externalUserId:ue.target.value}),placeholder:"ou_xxxxxxxx...",className:"font-mono",required:!0})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"binding-name",children:"Display Name (optional)"}),d.jsx(gt,{id:"binding-name",value:G.displayName,onChange:ue=>ce({...G,displayName:ue.target.value})})]})]}):d.jsxs(d.Fragment,{children:[G.platform==="feishu"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Ye,{htmlFor:"feishu-app-id",children:["App ID",_?" — leave empty to keep existing":""]}),d.jsx(gt,{id:"feishu-app-id",value:G.feishuAppId,onChange:ue=>ce({...G,feishuAppId:ue.target.value}),placeholder:"cli_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Ye,{htmlFor:"feishu-app-secret",children:["App Secret",_?" — leave empty to keep existing":""]}),d.jsx(gt,{id:"feishu-app-secret",type:"password",autoComplete:"new-password",value:G.feishuAppSecret,onChange:ue=>ce({...G,feishuAppSecret:ue.target.value}),placeholder:"••••••••"})]})]}):G.platform==="kael"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Ye,{htmlFor:"kael-user-id",children:["User ID",_?" — leave empty to keep existing":""]}),d.jsx(gt,{id:"kael-user-id",value:G.kaelUserId,onChange:ue=>ce({...G,kaelUserId:ue.target.value}),placeholder:"user_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Ye,{htmlFor:"kael-project-id",children:["Project ID",_?" — leave empty to keep existing":""]}),d.jsx(gt,{id:"kael-project-id",value:G.kaelProjectId,onChange:ue=>ce({...G,kaelProjectId:ue.target.value}),placeholder:"proj_xxxxxxxx",className:"font-mono",autoComplete:"off"})]}),!_&&d.jsx("p",{className:"text-sm text-muted-foreground",children:"Agent Token will be created automatically when you save."})]}):d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Ye,{htmlFor:"binding-creds",children:["Credentials (JSON)",_?" — leave empty to keep existing":""]}),d.jsx("textarea",{id:"binding-creds",value:G.credentialsJson,onChange:ue=>ce({...G,credentialsJson:ue.target.value}),rows:4,className:"flex w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm font-mono focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",placeholder:'{"bot_token": "xoxb-...", "signing_secret": "..."}'})]}),ye&&d.jsx("p",{className:"text-sm text-destructive",children:ye}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"binding-status",children:"Status"}),d.jsxs("select",{id:"binding-status",value:G.status,onChange:ue=>ce({...G,status:ue.target.value}),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[d.jsx("option",{value:"active",children:"active"}),d.jsx("option",{value:"inactive",children:"inactive"})]})]})]}),$e instanceof Error&&d.jsx("div",{className:"text-sm text-destructive",children:$e.message}),d.jsx(Ln,{children:d.jsx(be,{type:"submit",disabled:nt,children:nt?"Saving...":_?"Update":"Create"})})]})]})})]})}function m$(e){return d.jsxs("section",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h2",{className:"text-base font-semibold",children:"Behavior"}),d.jsxs("div",{className:"text-xs text-muted-foreground",children:[e.version!=null&&d.jsxs("span",{children:["v",e.version]}),e.dirty&&d.jsx("span",{className:"ml-2 text-amber-700",children:"· draft"})]})]}),e.loading&&d.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading configuration…"}),e.error&&d.jsxs("div",{className:"text-sm text-destructive",children:["Failed to load configuration: ",e.error]}),e.loaded&&d.jsx("div",{className:"space-y-3",children:e.children})]})}const ep={platform:"feishu",feishuAppId:"",feishuAppSecret:"",credentialsJson:"{}",status:"active",externalUserId:"",displayName:"",kaelUserId:"",kaelProjectId:"",kaelAgentToken:""};function fS(e){if(e.platform==="feishu"){if(!e.feishuAppId&&!e.feishuAppSecret)return null;if(!e.feishuAppId||!e.feishuAppSecret)throw new Error("Both App ID and App Secret are required");return{app_id:e.feishuAppId,app_secret:e.feishuAppSecret}}if(e.platform==="kael"){if(!e.kaelUserId&&!e.kaelProjectId)return null;if(!e.kaelUserId||!e.kaelProjectId)throw new Error("User ID and Project ID are required");return{kaelUserId:e.kaelUserId,kaelProjectId:e.kaelProjectId}}const t=e.credentialsJson.trim();return t?JSON.parse(t):null}function p$({clients:e,selected:t,onSelect:r}){const a=e.filter(l=>l.status==="connected");return a.length===0?d.jsxs("div",{className:"rounded border bg-muted/40 px-3 py-4 text-sm text-muted-foreground",children:["No connected computers available. Run"," ",d.jsx("code",{className:"font-mono text-xs",children:"first-tree-hub client connect <url>"})," on the computer that should run this agent, then reopen this dialog."]}):d.jsx("ul",{className:"divide-y rounded border max-h-64 overflow-y-auto",children:a.map(l=>{const o=l.id===t,u=l.status==="online"||l.status==="active";return d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>r(l.id),className:Te("w-full text-left px-3 py-2 flex items-center gap-3 hover:bg-gray-50",o&&"bg-blue-50"),children:[d.jsx("span",{className:Te("inline-block h-2 w-2 rounded-full",u?"bg-green-500":"bg-gray-400"),"aria-hidden":!0}),d.jsxs("span",{className:"flex-1 min-w-0",children:[d.jsx("span",{className:"block text-sm font-medium truncate",children:l.hostname??l.id}),d.jsxs("span",{className:"block text-xs text-muted-foreground font-mono truncate",children:[l.id,l.os?` · ${l.os}`:"",l.sdkVersion?` · SDK ${l.sdkVersion}`:""]})]}),d.jsx("span",{className:"text-xs text-muted-foreground",children:l.status})]})},l.id)})})}const g$={success:"Connected",timeout:"Timed out",offline:"Offline",stale:"Stale",error:"Error"},y$={connected:{icon:"●",color:"text-green-500",label:"Connected"},stale:{icon:"◐",color:"text-yellow-500",label:"Stale"},disconnected:{icon:"○",color:"text-gray-400",label:"Disconnected"}};function v$({result:e,onDismiss:t}){const r={success:"border-l-green-500",timeout:"border-l-yellow-500",offline:"border-l-gray-400",stale:"border-l-yellow-500",error:"border-l-red-500"}[e.status],a=e.status==="success"?"default":e.status==="timeout"||e.status==="stale"?"secondary":"destructive",l=e.connection,o=l?y$[l.health]:null;return d.jsx(ul,{className:Te("border-l-4",r),children:d.jsx(cl,{className:"pt-4",children:d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Gt,{variant:a,children:g$[e.status]}),e.responseTime!=null&&d.jsxs("span",{className:"text-xs text-muted-foreground",children:[(e.responseTime/1e3).toFixed(1),"s"]})]}),e.message&&d.jsx("p",{className:"text-sm text-muted-foreground",children:e.message}),l&&d.jsxs("div",{className:"text-xs space-y-1 border-t pt-2 mt-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[o&&d.jsxs("span",{className:o.color,children:[o.icon," ",o.label]}),l.runtimeState&&d.jsxs("span",{className:"text-muted-foreground",children:["runtime: ",l.runtimeState]})]}),l.client?d.jsxs("div",{className:"text-muted-foreground",children:["Computer: ",l.client.hostname??l.client.id,l.client.os&&` (${l.client.os})`,l.client.sdkVersion&&` · SDK ${l.client.sdkVersion}`]}):d.jsx("div",{className:"text-muted-foreground",children:"No computer bound"}),l.lastSeenAt&&d.jsxs("div",{className:"text-muted-foreground",children:["Last seen: ",new Date(l.lastSeenAt).toLocaleString()]})]}),e.responseContent&&d.jsx("p",{className:"text-sm mt-2 whitespace-pre-wrap bg-muted rounded p-2 max-h-40 overflow-auto",children:e.responseContent})]}),d.jsx(be,{variant:"ghost",size:"sm",onClick:t,children:"Dismiss"})]})})})}function su({state:e,size:t=8,className:r}){const a={width:t,height:t,display:"inline-block",position:"relative",flexShrink:0};return e==="working"?d.jsxs("span",{className:Te("shrink-0",r),style:a,role:"img","aria-label":"working",children:[d.jsx("span",{style:{position:"absolute",inset:0,borderRadius:"50%",background:"var(--state-working)"}}),d.jsx("span",{style:{position:"absolute",inset:-3,borderRadius:"50%",border:"1px solid var(--state-working)",animation:"ring-pulse 1.8s infinite",opacity:.6}})]}):e==="blocked"?d.jsx("span",{className:Te("shrink-0",r),style:{...a,border:"1.5px dashed var(--state-blocked)",borderRadius:"50%",animation:"dash-spin 4s linear infinite"},role:"img","aria-label":"blocked",children:d.jsx("span",{style:{position:"absolute",inset:2,borderRadius:"50%",background:"var(--state-blocked)"}})}):e==="error"?d.jsx("span",{className:Te("shrink-0",r),style:{...a,background:"var(--state-error)",clipPath:"polygon(50% 0%, 100% 100%, 0% 100%)",borderRadius:1},role:"img","aria-label":"error"}):e==="idle"?d.jsx("span",{className:Te("shrink-0",r),style:{...a,borderRadius:"50%",background:"var(--state-idle)"},role:"img","aria-label":"idle"}):d.jsx("span",{className:Te("shrink-0",r),style:{...a,borderRadius:"50%",border:"1px solid var(--state-offline)",background:"transparent"},role:"img","aria-label":"offline"})}function x$(e){return/^[A-Za-z0-9_./:=-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}function b$({agent:e,open:t,onClose:r,onBound:a}){var y;const[l,o]=S.useState(!1),u=Fe({queryKey:["connect-token",e.uuid],queryFn:()=>Rw(),enabled:t,staleTime:6e4}),f=Fe({queryKey:["agent-poll",e.uuid],queryFn:()=>Rk(e.uuid),enabled:t&&!e.clientId,refetchInterval:2e3});S.useEffect(()=>{const x=f.data;x!=null&&x.clientId&&a(x)},[f.data,a]);const m=((y=u.data)==null?void 0:y.command)??"",h=m&&e.name?`npm install -g @agent-team-foundation/first-tree-hub && first-tree-hub agent add ${x$(e.name)} --agent-id ${e.uuid} && `+m:m;function v(){h&&(navigator.clipboard.writeText(h),o(!0),setTimeout(()=>o(!1),2e3))}return d.jsx(Mn,{open:t,onOpenChange:x=>!x&&r(),children:d.jsxs(Sn,{className:"max-w-lg",children:[d.jsx(Wn,{children:d.jsx(Un,{children:"Last step — connect your computer"})}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"Open a terminal on your computer and run this command. It installs the First Tree Hub CLI, signs your computer in, and keeps it online in the background."}),d.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-border bg-muted p-3",children:[d.jsx("code",{className:"flex-1 text-xs font-mono break-all select-all",children:h||"Generating command…"}),d.jsx(be,{variant:"outline",size:"icon",className:"shrink-0",onClick:v,disabled:!h,children:l?d.jsx(ug,{className:"h-4 w-4",style:{color:"var(--state-idle)"}}):d.jsx(cg,{className:"h-4 w-4"})})]}),d.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[d.jsx(su,{state:"working",size:8}),d.jsx("span",{children:"Waiting for your computer to connect…"})]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"The command is good for 10 minutes. After it runs once, your computer stays online automatically — no need to keep this terminal open."})]}),d.jsx(Ln,{children:d.jsx(be,{variant:"outline",onClick:r,children:"Skip for now"})})]})})}const S$=/^[a-z0-9_-]+$/,Wc=100;function w$(e){if(!e||e.length===0)return{};const t={},r=["name","displayName","clientId"];for(const a of e){const l=a.path[0];if(typeof l=="string"&&r.includes(l)){const o=l;t[o]||(t[o]=a.message)}else t._root=a.message}return t}function k$(e){return e.toLowerCase().replace(/[^a-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,100)}function j$({open:e,onOpenChange:t,onCreated:r}){const a=er(),[l,o]=S.useState(""),[u,f]=S.useState(!1),[m,h]=S.useState(""),[v,y]=S.useState(!1),[x,b]=S.useState("claude-code"),[j,k]=S.useState("form"),[N,E]=S.useState([]),[R,A]=S.useState(null),[I,q]=S.useState(!1),[z,$]=S.useState({});S.useEffect(()=>{e&&(o(""),f(!1),h(""),y(!1),b("claude-code"),k("form"),E([]),A(null),q(!1),$({}))},[e]);const Z=k$(l),W=vt({mutationFn:async B=>{const J=m.trim()||l.trim()||"Untitled assistant";return tD({name:Z||void 0,type:"personal_assistant",displayName:J,clientId:B.clientId})},onSuccess:B=>{a.invalidateQueries({queryKey:["agents"]}),a.invalidateQueries({queryKey:["activity"]}),r(B,x)}}),re={...S.useMemo(()=>{const B=W.error;if(!B)return{};if(B instanceof Nd){const J=w$(B.issues);return Object.keys(J).length>0?J:B.status===409?{name:"That hub ID is already in use in this organization. Pick a different one."}:{_root:B.message}}return B instanceof Error?{_root:B.message}:{}},[W.error]),...z};function le(){const B={};return Z?Z.length>Wc?B.name=`Hub ID must be at most ${Wc} characters (got ${Z.length}).`:S$.test(Z)||(B.name="Hub ID must contain only lowercase letters, digits, hyphens (-), and underscores (_)."):l.trim().length>0&&(B.name="Name must contain at least one letter or digit (e.g. a-z, 0-9)."),m.length>200&&(B.displayName=`Display name must be at most 200 characters (got ${m.length}).`),B}async function X(B){var pe,Ae;B.preventDefault();const J=le();if($(J),!(Object.keys(J).length>0)){if(x!=="claude-code"){W.mutate({clientId:void 0});return}q(!0);try{const U=(await zd()).filter(_=>_.status==="connected");if(U.length===0){W.mutate({clientId:void 0});return}if(U.length===1){W.mutate({clientId:(pe=U[0])==null?void 0:pe.id});return}const L=[...U].sort((_,se)=>se.lastSeenAt.localeCompare(_.lastSeenAt));E(L),A(((Ae=L[0])==null?void 0:Ae.id)??null),k("pick-computer")}catch{W.mutate({clientId:void 0})}finally{q(!1)}}}function de(){R&&W.mutate({clientId:R})}const te=l.trim().length>0&&!W.isPending&&!I;return j==="pick-computer"?d.jsx(Mn,{open:e,onOpenChange:t,children:d.jsxs(Sn,{className:"max-w-lg",children:[d.jsx(Wn,{children:d.jsx(Un,{children:"Choose a computer"})}),d.jsxs("div",{className:"space-y-4",children:[d.jsxs("p",{className:"text-sm text-muted-foreground",children:["Multiple computers are online. Pick where ",d.jsx("span",{className:"font-medium",children:l})," should run:"]}),d.jsx("div",{className:"space-y-2",children:N.map(B=>{const J=R===B.id;return d.jsxs("label",{className:J?"flex items-start gap-3 rounded-md border border-primary bg-primary/5 p-3 cursor-pointer":"flex items-start gap-3 rounded-md border border-border p-3 cursor-pointer hover:bg-accent/30",children:[d.jsx("input",{type:"radio",name:"target-computer",checked:J,onChange:()=>A(B.id),className:"mt-1"}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("div",{className:"text-sm font-medium truncate",children:B.hostname??B.id}),d.jsxs("div",{className:"text-xs text-muted-foreground",children:[B.os??"unknown OS"," · last seen ",new Date(B.lastSeenAt).toLocaleString()]})]})]},B.id)})}),re.clientId&&d.jsx("p",{className:"text-sm text-destructive",children:re.clientId}),re._root&&d.jsx("div",{className:"rounded-md border border-destructive/50 bg-destructive/5 px-3 py-2 text-sm text-destructive",children:re._root})]}),d.jsxs(Ln,{children:[d.jsx(be,{variant:"outline",onClick:()=>k("form"),disabled:W.isPending,children:"Back"}),d.jsx(be,{onClick:de,disabled:!R||W.isPending,children:W.isPending?"Creating…":"Create"})]})]})}):d.jsx(Mn,{open:e,onOpenChange:t,children:d.jsxs(Sn,{className:"max-w-lg",children:[d.jsx(Wn,{children:d.jsx(Un,{children:"New Agent"})}),d.jsxs("form",{onSubmit:X,className:"space-y-5",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"new-agent-name",children:"Name"}),d.jsx(gt,{id:"new-agent-name",value:l,onChange:B=>{const J=B.target.value;o(J),f(!0),v||h(J),z.name&&$(pe=>({...pe,name:void 0}))},placeholder:"My Dev Assistant",autoFocus:!0,maxLength:Wc,"aria-invalid":re.name?!0:void 0,"aria-describedby":"new-agent-name-help new-agent-name-error"}),d.jsxs("p",{id:"new-agent-name-help",className:"text-xs text-muted-foreground",children:["Hub ID: lowercase letters, digits, hyphens (-), and underscores (_). Up to ",Wc," characters. Permanent after creation — you can't rename the agent later."]}),u&&Z&&d.jsxs("p",{className:"text-xs text-muted-foreground",children:["ID on hub: ",d.jsx("span",{className:"font-mono",children:Z})]}),re.name&&d.jsx("p",{id:"new-agent-name-error",className:"text-xs text-destructive",children:re.name})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"new-agent-display-name",children:"Display name"}),d.jsx(gt,{id:"new-agent-display-name",value:m,onChange:B=>{h(B.target.value),y(!0),z.displayName&&$(J=>({...J,displayName:void 0}))},placeholder:"How teammates see this agent",maxLength:200,"aria-invalid":re.displayName?!0:void 0,"aria-describedby":"new-agent-display-name-help new-agent-display-name-error"}),d.jsx("p",{id:"new-agent-display-name-help",className:"text-xs text-muted-foreground",children:"Shown in chats and lists. Defaults to the Name above; you can change it anytime later."}),re.displayName&&d.jsx("p",{id:"new-agent-display-name-error",className:"text-xs text-destructive",children:re.displayName})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{children:"Where it runs"}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs("label",{className:x==="claude-code"?"flex items-start gap-3 rounded-md border border-primary bg-primary/5 p-3 cursor-pointer":"flex items-start gap-3 rounded-md border border-border p-3 cursor-pointer hover:bg-accent/30",children:[d.jsx("input",{type:"radio",name:"runtime",checked:x==="claude-code",onChange:()=>b("claude-code"),className:"mt-1"}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-medium",children:"Claude Code"}),d.jsx("div",{className:"text-xs text-muted-foreground",children:"Runs on your computer, can access your local files. (default)"})]})]}),d.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-border p-3 cursor-not-allowed opacity-60",title:"Coming soon",children:[d.jsx("input",{type:"radio",name:"runtime",disabled:!0,className:"mt-1"}),d.jsxs("div",{children:[d.jsxs("div",{className:"text-sm font-medium",children:["Kael ",d.jsx("span",{className:"ml-1 text-xs font-normal text-muted-foreground",children:"— coming soon"})]}),d.jsx("div",{className:"text-xs text-muted-foreground",children:"Ready to go, runs in the cloud."})]})]})]})]}),re._root&&d.jsx("div",{className:"rounded-md border border-destructive/50 bg-destructive/5 px-3 py-2 text-sm text-destructive",children:re._root}),d.jsx(Ln,{children:d.jsx(be,{type:"submit",disabled:!te,children:I?"Checking computers…":W.isPending?"Creating…":"Create"})})]})]})})}const E$=Object.values(tL);function hS(e){return[...e].sort((t,r)=>{const a=(t.name??t.displayName??"").toLowerCase(),l=(r.name??r.displayName??"").toLowerCase();return a.localeCompare(l)})}function C$(){const e=Vr(),{memberId:t}=Sa(),[r,a]=S.useState(),[l,o]=S.useState(""),[u,f]=S.useState(!1),[m,h]=S.useState(null),v=Ci(),y=Rg(),{data:x,isLoading:b,error:j}=Fe({queryKey:["agents",r,l],queryFn:()=>vg({limit:100,cursor:r,type:l||void 0})}),{myAgents:k,teamAgents:N}=S.useMemo(()=>{if(!(x!=null&&x.items))return{myAgents:[],teamAgents:[]};const A=[],I=[];for(const q of x.items)t&&q.managerId===t?A.push(q):I.push(q);return{myAgents:hS(A),teamAgents:hS(I)}},[x,t]);function E(A,I){if(f(!1),A.clientId){e(`/?a=${A.uuid}`);return}if(I==="claude-code"){h(A);return}e(`/?a=${A.uuid}`)}function R(A){const q=A.runtimeState,z={idle:"bg-green-500",working:"bg-blue-500",error:"bg-red-500"};return d.jsxs(at,{className:"cursor-pointer",onClick:()=>e(`/agents/${A.uuid}`),children:[d.jsx(xe,{className:"font-mono text-sm",children:A.name}),d.jsx(xe,{children:A.displayName??"—"}),d.jsx(xe,{children:d.jsx(Gt,{variant:"secondary",children:A.type})}),d.jsx(xe,{className:"font-mono text-sm text-muted-foreground",children:A.delegateMention?v(A.delegateMention):"—"}),d.jsx(xe,{className:"text-sm text-muted-foreground",children:y(A.managerId)}),d.jsx(xe,{children:q?d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:Te("inline-block h-2 w-2 rounded-full",z[q]??"bg-gray-300")}),d.jsx("span",{className:"text-xs text-muted-foreground",children:q})]}):d.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-gray-300",title:"not running"})}),d.jsx(xe,{children:d.jsx(Gt,{variant:A.status==="active"?"default":"destructive",children:A.status})}),d.jsx(xe,{className:"text-muted-foreground",children:Cr(A.createdAt)})]},A.uuid)}return d.jsxs("div",{className:"space-y-8",children:[d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("h1",{className:"text-2xl font-semibold",children:"Agents"}),d.jsxs("select",{value:l,onChange:A=>{o(A.target.value),a(void 0)},className:"h-8 rounded-md border border-input bg-transparent px-2 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[d.jsx("option",{value:"",children:"All types"}),E$.map(A=>d.jsx("option",{value:A,children:A},A))]})]}),b?d.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Loading..."}):j?d.jsxs("div",{className:"text-center py-8 text-destructive",children:["Failed to load agents: ",j instanceof Error?j.message:"Unknown error"]}):d.jsxs(d.Fragment,{children:[d.jsxs("section",{children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h2",{className:"text-lg font-medium",children:"My Agents"}),d.jsxs(be,{size:"sm",onClick:()=>f(!0),children:[d.jsx(fl,{className:"h-4 w-4 mr-2"}),"New Agent"]})]}),d.jsx("div",{className:"border rounded-lg",children:d.jsxs(Fr,{children:[d.jsx(Hr,{children:d.jsxs(at,{children:[d.jsx(Ee,{children:"Name"}),d.jsx(Ee,{children:"Display Name"}),d.jsx(Ee,{children:"Type"}),d.jsx(Ee,{children:"Delegate"}),d.jsx(Ee,{children:"Owner"}),d.jsx(Ee,{children:"Runtime"}),d.jsx(Ee,{children:"Status"}),d.jsx(Ee,{children:"Created"})]})}),d.jsx(Zr,{children:k.length===0?d.jsx(at,{children:d.jsx(xe,{colSpan:8,className:"text-center py-8 text-muted-foreground",children:"No agents yet — create one to get started"})}):k.map(A=>R(A))})]})})]}),N.length>0&&d.jsxs("section",{children:[d.jsx("h2",{className:"text-lg font-medium mb-3",children:"Team Agents"}),d.jsx("div",{className:"border rounded-lg",children:d.jsxs(Fr,{children:[d.jsx(Hr,{children:d.jsxs(at,{children:[d.jsx(Ee,{children:"Name"}),d.jsx(Ee,{children:"Display Name"}),d.jsx(Ee,{children:"Type"}),d.jsx(Ee,{children:"Delegate"}),d.jsx(Ee,{children:"Owner"}),d.jsx(Ee,{children:"Runtime"}),d.jsx(Ee,{children:"Status"}),d.jsx(Ee,{children:"Created"})]})}),d.jsx(Zr,{children:N.map(A=>R(A))})]})})]})]}),(x==null?void 0:x.nextCursor)&&d.jsx("div",{className:"flex justify-end",children:d.jsx(be,{variant:"outline",onClick:()=>a(x.nextCursor??void 0),children:"Next Page"})}),d.jsx(j$,{open:u,onOpenChange:f,onCreated:E}),m&&d.jsx(b$,{agent:m,open:m!==null,onClose:()=>{const A=m.uuid;h(null),e(`/?a=${A}`)},onBound:A=>{h(null),e(`/?a=${A.uuid}`)}})]})}function N$(e){return e==="idle"||e==="working"||e==="blocked"||e==="error"||e==="offline"}function Qd({state:e,className:t}){const r=e!==null&&N$(e)?e:"offline",a=r==="offline"?"var(--fg-3)":`var(--state-${r})`;return d.jsxs("span",{className:Te("mono inline-flex items-center gap-1.5 uppercase tracking-wider",t),style:{fontSize:10,letterSpacing:.06,color:a},children:[d.jsx(su,{state:r,size:7}),r]})}function _$(){const{data:e}=Fe({queryKey:["members","user-name-map"],queryFn:zg,staleTime:3e4});return S.useMemo(()=>{const t=new Map;if(e)for(const r of e)t.set(r.userId,r.displayName||r.username);return r=>r?t.get(r)??r:"—"},[e])}function A$(){const[e,t]=S.useState(null),[r,a]=S.useState(!1),l=vt({mutationFn:Rw,onSuccess:u=>{t(u),a(!1)}}),o=async()=>{e&&(await navigator.clipboard.writeText(e.command),a(!0),setTimeout(()=>a(!1),2e3))};return e?d.jsxs("div",{className:"mb-4 p-3 border border-border rounded-lg bg-muted/30 space-y-2",children:[d.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[d.jsx(k0,{className:"h-4 w-4 shrink-0"}),d.jsxs("span",{children:["Run this command in your terminal (expires in ",e.expiresIn/60," min):"]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("code",{className:"flex-1 text-xs bg-background border border-border rounded px-3 py-2 font-mono break-all select-all",children:e.command}),d.jsxs(be,{variant:"outline",size:"sm",onClick:o,className:"shrink-0",children:[r?d.jsx(ug,{className:"h-3 w-3 mr-1"}):d.jsx(cg,{className:"h-3 w-3 mr-1"}),r?"Copied":"Copy"]})]}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"This token is single-use. Generate a new one if it expires."})]}):d.jsxs("div",{className:"flex items-center gap-3 mb-4 p-3 border border-border rounded-lg bg-muted/30",children:[d.jsx(k0,{className:"h-4 w-4 text-muted-foreground shrink-0"}),d.jsx("span",{className:"text-sm text-muted-foreground",children:"Connect a new computer to this Hub"}),d.jsx(be,{variant:"outline",size:"sm",onClick:()=>l.mutate(),disabled:l.isPending,children:l.isPending?"Generating...":"Generate Connect Command"})]})}function T$(){const e=er(),t=Ci(),r=_$(),{role:a}=Sa(),l=a==="admin",[o,u]=S.useState(null),[f,m]=S.useState(null),[h,v]=S.useState(null),[y,x]=S.useState(null),{data:b}=Fe({queryKey:["clients"],queryFn:zd,refetchInterval:1e4}),{data:j}=Fe({queryKey:["activity"],queryFn:Td,refetchInterval:1e4}),k=vt({mutationFn:_z,onSuccess:()=>{m(null),e.invalidateQueries({queryKey:["clients"]}),e.invalidateQueries({queryKey:["activity"]})}}),N=vt({mutationFn:Nz,onSuccess:()=>{v(null),x(null),e.invalidateQueries({queryKey:["clients"]}),e.invalidateQueries({queryKey:["activity"]})},onError:A=>{A instanceof Nd?x(A.message):x(A instanceof Error?A.message:String(A))}}),E=S.useMemo(()=>{const A=new Map;for(const I of(j==null?void 0:j.agents)??[]){if(!I.clientId)continue;const q=A.get(I.clientId)??[];q.push(I),A.set(I.clientId,q)}return A},[j==null?void 0:j.agents]),R=A=>E.get(A)??[];return d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold mb-4",children:"Computers"}),d.jsx(A$,{}),h&&d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:d.jsxs("div",{className:"bg-card border border-border rounded-lg p-6 max-w-md w-full shadow-lg",children:[d.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Retire Computer"}),d.jsxs("p",{className:"text-sm text-muted-foreground mb-3",children:["Permanently remove"," ",d.jsx("span",{className:"font-medium text-foreground",children:h.hostname??h.id.slice(0,8)}),". Retire refuses if any agent is still pinned to this computer — you must delete those agents first (reassign is not available in this milestone)."]}),R(h.id).length>0&&d.jsxs("div",{className:"mb-3 p-2 rounded bg-yellow-50 dark:bg-yellow-950/30 border border-yellow-200 dark:border-yellow-900",children:[d.jsx("div",{className:"text-xs font-medium text-yellow-900 dark:text-yellow-200 mb-1",children:"Agents currently bound to this computer (delete them first):"}),d.jsx("ul",{className:"text-sm space-y-0.5",children:R(h.id).map(A=>d.jsx("li",{className:"font-medium",children:t(A.agentId)},A.agentId))})]}),y&&d.jsx("div",{className:"mb-3 p-2 rounded bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-900 text-sm text-red-900 dark:text-red-200",children:y}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(be,{variant:"outline",size:"sm",onClick:()=>{v(null),x(null)},children:"Cancel"}),d.jsx(be,{variant:"destructive",size:"sm",onClick:()=>N.mutate(h.id),disabled:N.isPending,children:N.isPending?"Retiring...":"Retire"})]})]})}),f&&d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:d.jsxs("div",{className:"bg-card border border-border rounded-lg p-6 max-w-md w-full shadow-lg",children:[d.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Disconnect Computer"}),d.jsxs("p",{className:"text-sm text-muted-foreground mb-3",children:["This will disconnect"," ",d.jsx("span",{className:"font-medium text-foreground",children:f.hostname??f.id.slice(0,8)})," ","and affect all bound agents:"]}),d.jsx("ul",{className:"mb-4 space-y-1",children:R(f.id).length===0?d.jsx("li",{className:"text-sm text-muted-foreground",children:"No bound agents"}):R(f.id).map(A=>d.jsxs("li",{className:"text-sm flex items-center gap-2",children:[d.jsx("span",{className:"font-medium",children:t(A.agentId)}),d.jsx(Qd,{state:A.runtimeState})]},A.agentId))}),d.jsxs("div",{className:"flex justify-end gap-2",children:[d.jsx(be,{variant:"outline",size:"sm",onClick:()=>m(null),children:"Cancel"}),d.jsx(be,{variant:"destructive",size:"sm",onClick:()=>k.mutate(f.id),disabled:k.isPending,children:k.isPending?"Disconnecting...":"Disconnect"})]})]})}),!b||b.length===0?d.jsx("div",{className:"text-center text-muted-foreground py-12",children:"No computers. Use the button above to generate a connect command."}):d.jsx("div",{className:"border rounded-lg overflow-hidden",children:d.jsxs(Fr,{children:[d.jsx(Hr,{children:d.jsxs(at,{children:[d.jsx(Ee,{className:"w-8"}),d.jsx(Ee,{children:"Hostname"}),l&&d.jsx(Ee,{children:"Owner"}),d.jsx(Ee,{children:"OS"}),d.jsx(Ee,{children:"SDK"}),d.jsx(Ee,{children:"Agents"}),d.jsx(Ee,{children:"Connected"}),d.jsx(Ee,{children:"Status"}),d.jsx(Ee,{})]})}),d.jsx(Zr,{children:b.map(A=>{const I=o===A.id,q=R(A.id);return d.jsx(z$,{client:A,boundAgents:q,isExpanded:I,agentName:t,showOwner:l,ownerName:r,onToggle:()=>u(I?null:A.id),onDisconnect:()=>m(A),onRetire:()=>{x(null),v(A)}},A.id)})})]})})]})}function z$({client:e,boundAgents:t,isExpanded:r,agentName:a,showOwner:l,ownerName:o,onToggle:u,onDisconnect:f,onRetire:m}){return d.jsxs(d.Fragment,{children:[d.jsxs(at,{className:"cursor-pointer hover:bg-accent/50",onClick:u,children:[d.jsx(xe,{className:"px-2",children:r?d.jsx(eT,{className:"h-4 w-4"}):d.jsx(nT,{className:"h-4 w-4"})}),d.jsx(xe,{className:"font-medium",children:e.hostname??"—"}),l&&d.jsx(xe,{className:"text-sm",children:o(e.userId)}),d.jsx(xe,{className:"text-muted-foreground",children:e.os??"—"}),d.jsx(xe,{className:"font-mono text-xs text-muted-foreground",children:e.sdkVersion??"—"}),d.jsx(xe,{children:e.agentCount}),d.jsx(xe,{className:"text-muted-foreground text-sm",children:e.connectedAt?Cr(e.connectedAt):"—"}),d.jsx(xe,{children:d.jsx(Gt,{variant:e.status==="connected"?"default":"secondary",children:e.status})}),d.jsx(xe,{children:d.jsxs("div",{className:"flex gap-2 justify-end",children:[d.jsxs(be,{variant:"outline",size:"sm",onClick:h=>{h.stopPropagation(),f()},children:[d.jsx(LT,{className:"h-3 w-3 mr-1"}),"Disconnect"]}),d.jsxs(be,{variant:"outline",size:"sm",onClick:h=>{h.stopPropagation(),m()},children:[d.jsx(Wo,{className:"h-3 w-3 mr-1"}),"Retire"]})]})})]}),r&&d.jsx(at,{children:d.jsxs(xe,{colSpan:l?9:8,className:"bg-muted/30 px-8 py-3",children:[d.jsxs("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:["Bound Agents (",t.length,")"]}),t.length===0?d.jsx("div",{className:"text-sm text-muted-foreground",children:"No agents bound to this computer"}):d.jsx("div",{className:"space-y-1",children:t.map(h=>d.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[d.jsx("span",{className:"font-medium",children:a(h.agentId)}),d.jsx(Qd,{state:h.runtimeState}),d.jsx("span",{className:"text-xs text-muted-foreground",children:h.activeSessions!==null?`${h.activeSessions}/${h.totalSessions??0} sessions`:""})]},h.agentId))})]})})]})}function R$(){const{isAuthenticated:e,login:t}=Sa(),[r,a]=S.useState(""),[l,o]=S.useState(""),[u,f]=S.useState(null),[m,h]=S.useState(!1);if(e)return d.jsx(rg,{to:"/",replace:!0});const v=async y=>{y.preventDefault(),f(null),h(!0);try{await t(r,l)}catch(x){f(x instanceof Error?x.message:"Login failed")}finally{h(!1)}};return d.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:d.jsxs(ul,{className:"w-full max-w-sm",children:[d.jsxs(Ts,{className:"text-center",children:[d.jsx(zs,{className:"text-2xl",children:"First Tree"}),d.jsx(Oj,{children:"Sign in to your workspace"})]}),d.jsx(cl,{children:d.jsxs("form",{onSubmit:v,className:"space-y-4",children:[u&&d.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive",children:u}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"username",children:"Username"}),d.jsx(gt,{id:"username",value:r,onChange:y=>a(y.target.value),required:!0,autoFocus:!0})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Ye,{htmlFor:"password",children:"Password"}),d.jsx(gt,{id:"password",type:"password",value:l,onChange:y=>o(y.target.value),required:!0})]}),d.jsx(be,{type:"submit",className:"w-full",disabled:m,children:m?"Signing in...":"Sign in"})]})})]})})}function O$(){const e=Vr(),t=Ci(),{data:r,isLoading:a}=Fe({queryKey:["adapters"],queryFn:Lj}),{data:l,isLoading:o}=Fe({queryKey:["adapter-mappings"],queryFn:Dj}),{data:u}=Fe({queryKey:["adapter-statuses"],queryFn:Mj,refetchInterval:15e3}),f=a||o;return d.jsxs("div",{className:"space-y-6",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"Overview of platform bindings for agents you can manage. Configure each binding from the Agent detail page."}),d.jsxs(ul,{children:[d.jsx(Ts,{children:d.jsx(zs,{children:"Bot Bindings"})}),d.jsx(cl,{children:d.jsxs(Fr,{children:[d.jsx(Hr,{children:d.jsxs(at,{children:[d.jsx(Ee,{children:"Agent"}),d.jsx(Ee,{children:"Platform"}),d.jsx(Ee,{children:"Status"}),d.jsx(Ee,{children:"Connection"}),d.jsx(Ee,{children:"Created"})]})}),d.jsx(Zr,{children:f?d.jsx(at,{children:d.jsx(xe,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"Loading..."})}):r!=null&&r.length?r.map(m=>{const h=u==null?void 0:u.find(v=>v.configId===m.id);return d.jsxs(at,{className:"cursor-pointer",onClick:()=>e(`/agents/${m.agentId}`),children:[d.jsx(xe,{className:"font-mono text-sm",children:t(m.agentId)}),d.jsx(xe,{children:d.jsx(Gt,{variant:"secondary",children:m.platform})}),d.jsx(xe,{children:d.jsx(Gt,{variant:m.status==="active"?"default":"destructive",children:m.status})}),d.jsx(xe,{children:d.jsxs("span",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:Te("inline-block h-2 w-2 rounded-full",h!=null&&h.connected?"bg-green-500":"bg-gray-300")}),d.jsx("span",{className:"text-xs text-muted-foreground",children:h!=null&&h.connected?"Online":"Offline"})]})}),d.jsx(xe,{className:"text-muted-foreground",children:Cr(m.createdAt)})]},m.id)}):d.jsx(at,{children:d.jsx(xe,{colSpan:5,className:"text-center py-4 text-muted-foreground",children:"No bot bindings"})})})]})})]}),d.jsxs(ul,{children:[d.jsx(Ts,{children:d.jsx(zs,{children:"User Bindings"})}),d.jsx(cl,{children:d.jsxs(Fr,{children:[d.jsx(Hr,{children:d.jsxs(at,{children:[d.jsx(Ee,{children:"Agent"}),d.jsx(Ee,{children:"Platform"}),d.jsx(Ee,{children:"External User ID"}),d.jsx(Ee,{children:"Display Name"}),d.jsx(Ee,{children:"Bound Via"}),d.jsx(Ee,{children:"Created"})]})}),d.jsx(Zr,{children:f?d.jsx(at,{children:d.jsx(xe,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"Loading..."})}):l!=null&&l.length?l.map(m=>d.jsxs(at,{className:"cursor-pointer",onClick:()=>e(`/agents/${m.agentId}`),children:[d.jsx(xe,{className:"font-mono text-sm",children:t(m.agentId)}),d.jsx(xe,{children:d.jsx(Gt,{variant:"secondary",children:m.platform})}),d.jsx(xe,{className:"font-mono text-sm",children:m.externalUserId}),d.jsx(xe,{children:m.displayName??"—"}),d.jsx(xe,{children:d.jsx(Gt,{variant:"outline",children:m.boundVia??"—"})}),d.jsx(xe,{className:"text-muted-foreground",children:Cr(m.createdAt)})]},m.id)):d.jsx(at,{children:d.jsx(xe,{colSpan:6,className:"text-center py-4 text-muted-foreground",children:"No user bindings"})})})]})})]})]})}function D$(){return d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold mb-6",children:"Settings"}),d.jsx(O$,{})]})}function M$(e){return Me.get(`/admin/chats/${encodeURIComponent(e)}`)}function L$(e,t){return Me.patch(`/admin/chats/${encodeURIComponent(e)}`,{topic:t})}function U$(e,t){return Me.post(`/admin/chats/${encodeURIComponent(e)}/messages`,{format:"text",content:t})}function I$(e){return Me.post(`/admin/agents/${encodeURIComponent(e)}/chats`,{})}function B$(e,t){const r=new URLSearchParams;r.set("limit",String(t.limit)),t!=null&&t.cursor&&r.set("cursor",t.cursor);const a=r.toString();return Me.get(`/admin/chats/${encodeURIComponent(e)}/messages${a?`?${a}`:""}`)}function FE(e,t){return t&&(e==="idle"||e==="working"||e==="blocked"||e==="error")?e:"offline"}function P$(e){let t=-1;for(const l of e)l.kind==="turn_end"&&l.seq>t&&(t=l.seq);const r=e.filter(l=>l.kind==="turn_end"?!1:l.kind==="error"?!0:l.seq>t),a=new Map;for(const l of r){if(l.kind!=="tool_call")continue;const o=mS(l.payload);if(!o)continue;const u=a.get(o)??-1;l.seq>u&&a.set(o,l.seq)}return r.filter(l=>{if(l.kind!=="tool_call")return!0;const o=mS(l.payload);return o?a.get(o)===l.seq:!0})}function mS(e){if(typeof e!="object"||e===null)return;const t=e.toolUseId;return typeof t=="string"?t:void 0}function Gd(e){const t=new Date(e),r=new Intl.DateTimeFormat("en-GB",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(t),a=l=>{var o;return((o=r.find(u=>u.type===l))==null?void 0:o.value)??""};return`${a("month")}/${a("day")} ${a("hour")}:${a("minute")}`}function HE(e){if(!e)return"—";const t=Date.now()-new Date(e).getTime(),r=Math.round(t/1e3);if(r<60)return`${r}s ago`;const a=Math.round(r/60);if(a<60)return`${a}m ago`;const l=Math.round(a/60);return l<24?`${l}h ago`:`${Math.round(l/24)}d ago`}function $$(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`}function pS(e){if(e==null)return"";if(typeof e=="string")return e.length>200?`${e.slice(0,200)}…`:e;try{const t=JSON.stringify(e);return t.length>200?`${t.slice(0,200)}…`:t}catch{return"…"}}function q$({msg:e,myAgentId:t}){if(!t||e.senderId!==t)return null;const r=e.deliveryStatus??"sent";return r==="acked"?d.jsx("span",{className:"mono",style:{fontSize:9,color:"var(--accent)"},title:"Agent has started processing",children:"✓✓ read"}):r==="delivered"?d.jsx("span",{className:"mono",style:{fontSize:9,color:"var(--fg-3)"},title:"Delivered to agent inbox",children:"✓✓"}):d.jsx("span",{className:"mono",style:{fontSize:9,color:"var(--fg-4)"},title:"Sent",children:"✓ sent"})}function F$({agentId:e,chatId:t,session:r}){const a=er(),[,l]=lg(),[o,u]=S.useState(!1),[f,m]=S.useState(null),h=Ow(e,t),v=Sp(e),y=N=>{a.setQueryData(h,E=>E&&{...E,state:N}),a.setQueryData(v,E=>E&&E.map(R=>R.chatId===t?{...R,state:N}:R))},x=vt({mutationFn:()=>Oz(e,t),onMutate:async()=>{await a.cancelQueries({queryKey:h}),await a.cancelQueries({queryKey:v});const N=a.getQueryData(h),E=a.getQueryData(v);return y("suspended"),{previousSession:N,previousList:E}},onError:(N,E,R)=>{R!=null&&R.previousSession&&a.setQueryData(h,R.previousSession),R!=null&&R.previousList&&a.setQueryData(v,R.previousList)},onSuccess:N=>{y(N.state)}}),b=vt({mutationFn:()=>Dz(e,t),onMutate:async()=>{await a.cancelQueries({queryKey:h}),await a.cancelQueries({queryKey:v});const N=a.getQueryData(h),E=a.getQueryData(v);return a.setQueryData(v,R=>R&&R.filter(A=>A.chatId!==t)),{previousSession:N,previousList:E}},onError:(N,E,R)=>{R!=null&&R.previousSession&&a.setQueryData(h,R.previousSession),R!=null&&R.previousList&&a.setQueryData(v,R.previousList),m(N instanceof Error?N.message:"Terminate failed")},onSuccess:(N,E,R)=>{if(N.state!=="evicted"){R!=null&&R.previousList&&a.setQueryData(v,R.previousList),y(N.state),m(`Session is ${N.state}; terminate only applies to suspended sessions.`);return}m(null),u(!1),l({a:e})}}),j=(r==null?void 0:r.state)==="active",k=(r==null?void 0:r.state)==="suspended";return!j&&!k?null:d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"inline-flex items-center",style:{gap:4,padding:4,border:"1px solid var(--border)",borderRadius:6,background:"var(--bg-sunken)"},children:[j&&d.jsxs("button",{type:"button",onClick:()=>x.mutate(),disabled:x.isPending,className:"inline-flex items-center transition-colors",style:{gap:6,padding:"4px 10px",fontSize:11,fontWeight:500,color:"var(--fg-2)",borderRadius:4},onMouseEnter:N=>N.currentTarget.style.background="var(--bg-hover)",onMouseLeave:N=>N.currentTarget.style.background="transparent",children:[d.jsx(yT,{className:"h-3 w-3"})," Suspend",d.jsx("span",{className:"kbd",style:{marginLeft:2},children:"⌘⇧P"})]}),k&&d.jsxs("button",{type:"button",onClick:()=>{m(null),u(!0)},disabled:b.isPending,className:"inline-flex items-center transition-colors",style:{gap:6,padding:"4px 10px",fontSize:11,fontWeight:600,color:"var(--state-error)",background:"color-mix(in oklch, var(--state-error) 18%, transparent)",borderRadius:4},onMouseEnter:N=>N.currentTarget.style.background="color-mix(in oklch, var(--state-error) 28%, transparent)",onMouseLeave:N=>N.currentTarget.style.background="color-mix(in oklch, var(--state-error) 18%, transparent)",children:[d.jsx(CT,{className:"h-3 w-3"})," Terminate"]})]}),d.jsx(H$,{open:o,onOpenChange:N=>{b.isPending||u(N),N||m(null)},session:r,chatId:t,error:f,pending:b.isPending,onConfirm:()=>b.mutate()})]})}function H$(e){const{open:t,onOpenChange:r,session:a,chatId:l,pending:o,error:u,onConfirm:f}=e;function m(v){v.preventDefault(),o||f()}const h=l.slice(0,8);return d.jsx(Mn,{open:t,onOpenChange:r,children:d.jsxs(Sn,{children:[d.jsx(Wn,{children:d.jsx(Un,{children:"Terminate session?"})}),d.jsxs("form",{onSubmit:m,className:"space-y-4",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"Ending this session is permanent. It is removed from the workspace and cannot be resumed. Chat history is preserved; a new message will start a fresh session."}),d.jsxs("div",{className:"mono",style:{fontSize:11,padding:"8px 10px",borderRadius:4,background:"var(--bg-sunken)",border:"1px solid var(--border)",color:"var(--fg-2)",display:"grid",gap:4},children:[d.jsxs("span",{children:["chat: ",d.jsxs("span",{className:"font-medium",children:[h,"…"]})]}),(a==null?void 0:a.lastActivityAt)&&d.jsxs("span",{children:["last activity: ",HE(a.lastActivityAt)]}),typeof(a==null?void 0:a.messageCount)=="number"&&d.jsxs("span",{children:["messages: ",a.messageCount]})]}),u&&d.jsx("p",{className:"mono",style:{fontSize:11,color:"var(--state-error)"},children:u}),d.jsxs(Ln,{children:[d.jsx(be,{type:"button",variant:"ghost",onClick:()=>r(!1),disabled:o,children:"Cancel"}),d.jsx(be,{type:"submit",variant:"destructive",disabled:o,children:o?"Terminating…":"Terminate"})]})]})]})})}function Z$({event:e}){const t=Az(e.payload);if(!t)return null;const r=t.status==="error",a=t.status==="pending",l=r?"var(--state-error)":a?"var(--state-blocked)":"var(--fg-3)",o=r?"failed":a?"using":"used";return d.jsxs("div",{className:"mono flex items-center",style:{gap:8,fontSize:11,padding:"2px 8px",color:"var(--fg-3)"},children:[a?d.jsx("span",{"aria-hidden":!0,style:{width:6,height:6,borderRadius:"50%",background:l,animation:"heartbeat-pulse 1.2s ease-in-out infinite",flexShrink:0,marginTop:5}}):d.jsx("span",{"aria-hidden":!0,style:{color:l,flexShrink:0},children:r?"⚠":"↳"}),d.jsxs("span",{style:{color:"var(--fg-3)",minWidth:0,flex:1,whiteSpace:"pre-wrap",wordBreak:"break-word"},title:t.args!==void 0&&t.args!==null?pS(t.args):void 0,children:[o," ",d.jsx("span",{style:{color:"var(--fg-2)"},children:t.name}),t.args!==void 0&&t.args!==null?d.jsxs("span",{style:{color:"var(--fg-4)"},children:["(",pS(t.args),")"]}):null,t.durationMs!==void 0&&!a?d.jsxs("span",{style:{color:"var(--fg-4)",marginLeft:6,fontSize:10},children:["· ",$$(t.durationMs)]}):null]})]})}function V$({event:e,agentNameFn:t,agentId:r}){const a=zz(e.payload);if(!a||a.text.length===0)return null;const l=t(r);return d.jsxs("div",{className:"grid",style:{gridTemplateColumns:"20px 1fr",columnGap:8,padding:"4px 0",opacity:.85},children:[d.jsx(ZE,{name:l,isSelf:!1}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-baseline",style:{gap:8},children:[d.jsx("span",{className:"mono",style:{fontSize:11,fontWeight:600,color:"var(--accent)"},children:l}),d.jsx("span",{className:"mono",style:{fontSize:10,color:"var(--fg-4)"},children:Gd(e.createdAt)}),d.jsx("span",{className:"mono",style:{fontSize:9,color:"var(--fg-4)"},children:"· streaming"})]}),d.jsx("div",{style:{fontSize:12.5,color:"var(--fg-2)",whiteSpace:"pre-wrap",marginTop:2,lineHeight:1.55},children:a.text})]})]})}function Q$({event:e}){return d.jsxs("div",{className:"mono flex items-center",style:{gap:8,fontSize:11,padding:"2px 8px",color:"var(--fg-3)"},children:[d.jsx("span",{"aria-hidden":!0,style:{width:6,height:6,borderRadius:"50%",background:"var(--accent)",animation:"heartbeat-pulse 1.2s ease-in-out infinite",flexShrink:0}}),d.jsx("span",{style:{color:"var(--fg-3)"},children:"thinking…"}),d.jsx("span",{className:"mono",style:{fontSize:10,color:"var(--fg-4)"},children:Gd(e.createdAt)})]})}function G$({event:e}){const t=Tz(e.payload),r=Gd(e.createdAt);return d.jsxs("div",{style:{padding:"6px 10px",borderLeft:"2px solid var(--state-error)",background:"color-mix(in oklch, var(--state-error) 6%, transparent)",borderRadius:"0 4px 4px 0"},children:[d.jsxs("div",{className:"mono uppercase",style:{fontSize:10,letterSpacing:.08,color:"var(--state-error)"},children:["error · ",(t==null?void 0:t.source)??"unknown"," · ",r]}),d.jsx("div",{style:{marginTop:2,fontSize:11.5,color:"var(--fg-2)",whiteSpace:"pre-wrap"},children:(t==null?void 0:t.message)??"(invalid error payload)"})]})}function ZE({name:e,isSelf:t}){const r=e.slice(0,2).toUpperCase();return d.jsx("div",{className:"mono",style:{width:20,height:20,borderRadius:4,display:"flex",alignItems:"center",justifyContent:"center",fontSize:9,fontWeight:700,flexShrink:0,background:t?"linear-gradient(135deg, var(--accent), oklch(0.58 0.14 170))":"var(--bg-active)",border:t?"none":"1px solid var(--border-strong)",color:t?"oklch(0.14 0.01 150)":"var(--fg-2)"},children:t?r:d.jsx(_d,{className:"h-3 w-3",style:{color:"var(--accent)"}})})}function K$({msg:e,myAgentId:t,agentNameFn:r}){const a=r(e.senderId),l=t===e.senderId;return d.jsxs("div",{className:"grid",style:{gridTemplateColumns:"20px 1fr",columnGap:8,padding:"6px 0"},children:[d.jsx(ZE,{name:a,isSelf:l}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-baseline",style:{gap:8},children:[d.jsx("span",{className:"mono",style:{fontSize:12,fontWeight:600,color:l?"var(--fg)":"var(--accent)"},children:a}),d.jsx("span",{className:"mono",style:{fontSize:10,color:"var(--fg-4)"},children:Gd(e.createdAt)}),d.jsx("span",{style:{marginLeft:"auto"},children:d.jsx(q$,{msg:e,myAgentId:t})})]}),d.jsx("div",{style:{fontSize:12.5,color:"var(--fg)",marginTop:2,lineHeight:1.55},children:e.format==="text"?d.jsx(qE,{children:typeof e.content=="string"?e.content:JSON.stringify(e.content)}):d.jsx("pre",{className:"mono",style:{fontSize:11,background:"var(--bg-sunken)",padding:8,borderRadius:4,overflow:"auto",maxHeight:160},children:JSON.stringify(e.content,null,2)})})]})]})}function Y$({agentId:e,chatId:t}){var le;const r=er(),a=Ci(),{agentId:l}=Sa(),[o,u]=S.useState(""),f=S.useRef(null),{data:m}=Fe({queryKey:["chat-messages",t],queryFn:()=>B$(t,{limit:50}),refetchInterval:5e3}),{data:h}=Fe({queryKey:["session-events",e,t],queryFn:()=>Rz(e,t,{limit:200,direction:"desc"}),refetchInterval:5e3}),{data:v}=Fe({queryKey:Ow(e,t),queryFn:()=>Us(e).then(X=>X.find(de=>de.chatId===t)??null),refetchInterval:5e3}),{data:y}=Fe({queryKey:["chat-detail",t],queryFn:()=>M$(t),enabled:!!t}),x=vt({mutationFn:X=>U$(t,X),onSuccess:()=>{u(""),r.invalidateQueries({queryKey:["chat-messages",t]})}}),b=()=>{const X=o.trim();X&&x.mutate(X)},[j,k]=S.useState(!1),[N,E]=S.useState(""),R=S.useRef(null);S.useEffect(()=>{var X;j&&((X=R.current)==null||X.focus())},[j]);const A=vt({mutationFn:X=>L$(t,X),onSuccess:()=>{k(!1),r.invalidateQueries({queryKey:["chat-detail",t]}),r.invalidateQueries({queryKey:["agent-sessions",e]}),r.invalidateQueries({queryKey:["session",e,t]})}}),I=()=>{const X=N.trim();A.mutate(X.length>0?X:null)},q=S.useMemo(()=>{const X=(m==null?void 0:m.items)??[],de=P$((h==null?void 0:h.items)??[]),te=[...X.map(B=>({kind:"message",at:B.createdAt,key:`m-${B.id}`,data:B})),...de.map(B=>({kind:"event",at:B.createdAt,key:`e-${B.id}`,data:B}))];return te.sort((B,J)=>B.at.localeCompare(J.at)),te},[m,h]),z=q.length;S.useEffect(()=>{var X;z>0&&((X=f.current)==null||X.scrollIntoView({behavior:"smooth"}))},[z]);const $=y!=null&&y.participants?y.participants.map(X=>{const de=a(X.agentId);return`@${de.length>20?`${de.slice(0,17)}…`:de}`}).join(" "):`@${a(e)}`,Z=a(e),W=(v==null?void 0:v.runtimeState)??"idle",F=FE((v==null?void 0:v.runtimeState)??null,e?"connected":null),re=(v==null?void 0:v.messageCount)??((le=m==null?void 0:m.items)==null?void 0:le.length)??0;return d.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[d.jsxs("div",{className:"grid items-center shrink-0",style:{gridTemplateColumns:"1fr auto",gap:10,padding:"10px 14px",borderBottom:"1px solid var(--border)"},children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center",style:{gap:8},children:[d.jsx(su,{state:F,size:8}),j?d.jsxs(d.Fragment,{children:[d.jsx("input",{ref:R,value:N,onChange:X=>E(X.target.value),onKeyDown:X=>{X.key==="Enter"?(X.preventDefault(),I()):X.key==="Escape"&&(X.preventDefault(),k(!1))},disabled:A.isPending,maxLength:500,placeholder:"Chat name",className:"outline-none",style:{flex:1,minWidth:0,fontSize:13,fontWeight:600,color:"var(--fg)",background:"var(--bg-sunken)",border:"1px solid var(--border)",borderRadius:4,padding:"2px 6px"}}),d.jsx("button",{type:"button",onClick:I,disabled:A.isPending,title:"Save",className:"inline-flex items-center",style:{color:"var(--accent)",padding:2},children:d.jsx(ug,{className:"h-3.5 w-3.5"})}),d.jsx("button",{type:"button",onClick:()=>k(!1),disabled:A.isPending,title:"Cancel",className:"inline-flex items-center",style:{color:"var(--fg-3)",padding:2},children:d.jsx(pw,{className:"h-3.5 w-3.5"})})]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"truncate",style:{fontSize:13,fontWeight:600,color:"var(--fg)"},children:(y==null?void 0:y.topic)||(v==null?void 0:v.summary)||`Chat · ${t.slice(0,8)}`}),d.jsx("button",{type:"button",onClick:()=>{E((y==null?void 0:y.topic)??""),k(!0)},title:"Rename chat",className:"inline-flex items-center transition-colors",style:{color:"var(--fg-4)",padding:2},onMouseEnter:X=>X.currentTarget.style.color="var(--fg-2)",onMouseLeave:X=>X.currentTarget.style.color="var(--fg-4)",children:d.jsx(Ad,{className:"h-3 w-3"})})]}),d.jsx("span",{className:"mono",style:{fontSize:10,color:"var(--fg-4)",padding:"1px 5px",border:"1px solid var(--border)",borderRadius:2},children:t})]}),d.jsxs("div",{className:"flex items-center",style:{fontSize:10.5,color:"var(--fg-3)",marginTop:4,gap:10},children:[d.jsx("span",{className:"mono",children:$}),d.jsx("span",{children:"·"}),d.jsxs("span",{children:["started ",HE((v==null?void 0:v.startedAt)??null)]}),d.jsx("span",{children:"·"}),d.jsxs("span",{children:[re," msgs"]}),d.jsx("span",{children:"·"}),d.jsxs("span",{children:["runtime"," ",d.jsx("span",{className:"mono",style:{color:F==="error"?"var(--state-error)":"var(--fg-2)"},children:W})]})]})]}),d.jsx(F$,{agentId:e,chatId:t,session:v??null})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto",style:{padding:"10px 14px"},children:[z===0&&d.jsxs("div",{className:"flex flex-col items-center",style:{color:"var(--fg-3)",fontSize:13,padding:"32px 0",gap:6},children:[d.jsx(mw,{className:"h-8 w-8",style:{opacity:.3}}),"Send a message to start the conversation"]}),d.jsx("div",{className:"flex flex-col",style:{gap:4},children:q.map(X=>{if(X.kind==="event"){const de=X.data;switch(de.kind){case"tool_call":return d.jsx(Z$,{event:de},X.key);case"assistant_text":return d.jsx(V$,{event:de,agentId:e,agentNameFn:a},X.key);case"thinking":return d.jsx(Q$,{event:de},X.key);case"error":return d.jsx(G$,{event:de},X.key);default:return null}}return d.jsx(K$,{msg:X.data,myAgentId:l,agentNameFn:a},X.key)})}),d.jsx("div",{ref:f})]}),d.jsxs("div",{className:"shrink-0",style:{padding:"10px 14px",borderTop:"1px solid var(--border)"},children:[d.jsxs("div",{style:{position:"relative",border:"1px solid var(--border)",borderRadius:6,background:"var(--bg-sunken)"},children:[d.jsx("textarea",{value:o,onChange:X=>u(X.target.value),placeholder:`Message @${Z} · / for commands · @ to mention`,rows:2,onKeyDown:X=>{X.key==="Enter"&&!X.shiftKey&&(X.preventDefault(),b())},disabled:x.isPending,className:"w-full outline-none",style:{padding:"9px 12px 30px",fontSize:12.5,background:"transparent",border:"none",resize:"none",fontFamily:"var(--font-sans)",color:"var(--fg)"}}),d.jsxs("div",{className:"flex items-center justify-between",style:{position:"absolute",bottom:6,left:10,right:10,fontSize:10,color:"var(--fg-4)"},children:[d.jsxs("span",{className:"mono flex",style:{gap:8},children:[d.jsx("span",{children:"/suspend"}),d.jsx("span",{children:"/resume"}),d.jsx("span",{children:"/branch"}),d.jsx("span",{children:"/promote"})]}),d.jsxs("span",{className:"flex items-center",style:{gap:8},children:[d.jsxs("span",{children:[d.jsx("span",{className:"kbd",children:"⏎"})," send ",d.jsx("span",{className:"kbd",children:"⇧⏎"})," new line"]}),d.jsxs("button",{type:"button",onClick:b,disabled:x.isPending||!o.trim(),className:Te("inline-flex items-center transition-colors",(x.isPending||!o.trim())&&"opacity-50 cursor-not-allowed"),style:{gap:6,padding:"4px 10px",fontSize:11,fontWeight:600,color:"oklch(0.14 0.01 150)",background:"var(--accent)",border:"1px solid var(--accent)",borderRadius:5},children:[d.jsx(jT,{className:"h-3 w-3"})," Send"]})]})]})]}),x.isError&&d.jsx("p",{className:"mono",style:{fontSize:11,color:"var(--state-error)",padding:"6px 2px 0"},children:x.error instanceof Error?x.error.message:"Failed to send"})]})]})}function X$(){return d.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:d.jsxs("div",{className:"text-center max-w-sm",children:[d.jsx(_d,{className:"h-10 w-10 mx-auto mb-3 text-primary opacity-60"}),d.jsx("div",{className:"text-sm font-medium mb-1",children:"Select a chat"}),d.jsx("div",{className:"text-xs text-muted-foreground",children:"Pick an agent from the roster to view its sessions, or open a chat to start collaborating."})]})})}function J$({selectedAgentId:e,selectedChatId:t}){return t&&e?d.jsx(Y$,{agentId:e,chatId:t}):d.jsx(X$,{})}function VE(){const{data:e}=Fe({queryKey:["clients"],queryFn:zd,staleTime:1e4,refetchInterval:1e4});return S.useMemo(()=>{const t=e??[],r=new Map;for(const a of t)r.set(a.id,a);return{resolve:a=>a?r.get(a)??null:null,clients:t,connectedClients:t.filter(a=>a.status==="connected")}},[e])}function Hp({children:e}){return d.jsx("div",{className:"mono uppercase",style:{fontSize:9,letterSpacing:.1,color:"var(--fg-4)",marginBottom:8},children:e})}function QE({children:e}){return d.jsx("div",{className:"grid",style:{gridTemplateColumns:"auto 1fr",columnGap:10,rowGap:4,fontSize:11.5},children:e})}function $r({label:e,children:t}){return d.jsxs(d.Fragment,{children:[d.jsx("div",{style:{color:"var(--fg-3)"},children:e}),d.jsx("div",{className:"text-right truncate",style:{color:"var(--fg)",overflow:"hidden",textOverflow:"ellipsis"},children:t})]})}function gS(e){if(!e)return"—";const t=Date.now()-new Date(e).getTime(),r=Math.round(t/1e3);if(r<60)return`${r}s ago`;const a=Math.round(r/60);if(a<60)return`${a}m ago`;const l=Math.round(a/60);return l<24?`${l}h ago`:`${Math.round(l/24)}d ago`}function yS(e){if(!e)return"—";const t=Date.now()-new Date(e).getTime(),r=Math.floor(t/6e4);if(r<60)return`${r}m`;const a=Math.floor(r/60);return a<24?`${a}h ${r%60}m`:`${Math.floor(a/24)}d ${a%24}h`}const W$={agent_error:"Error",session_error:"Error",agent_blocked:"Blocked",agent_stale:"Stale",agent_disconnected:"Disconnected",agent_connected:"Connected",agent_needs_decision:"Decision",session_completed:"Completed"};function tp({label:e,value:t,accent:r}){return d.jsxs("div",{style:{padding:"6px 8px",background:"var(--bg-sunken)",borderRadius:4},children:[d.jsx("div",{className:"mono uppercase",style:{fontSize:9,color:"var(--fg-4)",letterSpacing:.08},children:e}),d.jsx("div",{className:"mono",style:{fontSize:13,fontWeight:600,color:r??"var(--fg)"},children:t})]})}function eq({notifications:e,agentId:t}){const[,r]=lg(),a=er(),l=vt({mutationFn:o=>Ok(o),onSuccess:()=>{a.invalidateQueries({queryKey:["notifications","agent",t]})}});return d.jsx("div",{className:"flex flex-col",style:{gap:4},children:e.map(o=>{const u=!!o.chatId,f=(W$[o.type]??o.type).toString(),m=o.severity==="high"?"var(--state-error)":o.severity==="medium"?"var(--state-blocked)":"var(--accent-dim)";return d.jsxs("button",{type:"button",className:Te("w-full text-left transition-colors",u&&"cursor-pointer"),style:{padding:"6px 8px",background:o.read?"transparent":"var(--bg-sunken)",borderLeft:`2px solid ${m}`,borderRadius:"0 3px 3px 0",fontSize:11},onMouseEnter:h=>{u&&(h.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:h=>{h.currentTarget.style.background=o.read?"transparent":"var(--bg-sunken)"},onClick:()=>{o.read||l.mutate(o.id),o.chatId&&r({a:t,c:o.chatId})},children:[d.jsxs("div",{className:"flex items-baseline justify-between",children:[d.jsx("span",{className:"mono uppercase",style:{fontSize:9,letterSpacing:.08,color:o.severity==="high"?"var(--state-error)":"var(--fg-3)"},children:f.replace("_"," ")}),d.jsx("span",{className:"mono",style:{fontSize:9,color:"var(--fg-4)"},children:Cr(o.createdAt)})]}),d.jsx("div",{style:{color:"var(--fg-2)",marginTop:1},children:o.message})]},o.id)})})}function GE({agentId:e}){var h;const t=Ci(),{resolve:r}=VE(),{data:a}=Fe({queryKey:["activity"],queryFn:Td,refetchInterval:1e4}),l=(h=a==null?void 0:a.agents)==null?void 0:h.find(v=>v.agentId===e),o=r(l==null?void 0:l.clientId),{data:u}=Fe({queryKey:["notifications","agent",e],queryFn:()=>Np({agentId:e,limit:3}),refetchInterval:3e4}),f=t(e),m=(l==null?void 0:l.runtimeState)??"offline";return d.jsxs("div",{className:"flex-1 overflow-y-auto",children:[d.jsxs("div",{style:{padding:"12px 14px",borderBottom:"1px solid var(--border-faint)"},children:[d.jsxs("div",{className:"flex items-center",style:{gap:10},children:[d.jsx("div",{className:"flex items-center justify-center",style:{width:32,height:32,borderRadius:5,background:"var(--bg-active)",border:"1px solid var(--border-strong)"},children:d.jsx(_d,{className:"h-4 w-4",style:{color:"var(--accent)"}})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("div",{style:{fontSize:13,fontWeight:600,color:"var(--fg)"},children:f}),d.jsx("div",{className:"mono truncate",style:{fontSize:10,color:"var(--fg-4)"},children:e})]}),d.jsx(Qd,{state:m})]}),d.jsxs("div",{className:"grid",style:{gridTemplateColumns:"repeat(3, 1fr)",gap:4,marginTop:10},children:[d.jsx(tp,{label:"sessions",value:(l==null?void 0:l.totalSessions)??0,accent:((l==null?void 0:l.totalSessions)??0)>0?"var(--fg)":"var(--fg-4)"}),d.jsx(tp,{label:"active",value:(l==null?void 0:l.activeSessions)??0,accent:((l==null?void 0:l.activeSessions)??0)>0?"var(--accent)":"var(--fg-4)"}),d.jsx(tp,{label:"uptime",value:yS((o==null?void 0:o.connectedAt)??null)})]})]}),d.jsxs("div",{style:{padding:"12px 14px",borderBottom:"1px solid var(--border-faint)"},children:[d.jsx(Hp,{children:"Computer · runtime"}),d.jsxs(QE,{children:[d.jsx($r,{label:"host",children:d.jsx("span",{className:"mono",style:{fontSize:11},children:(o==null?void 0:o.hostname)??"—"})}),d.jsx($r,{label:"os",children:d.jsx("span",{className:"mono",style:{fontSize:11},children:(o==null?void 0:o.os)??"—"})}),d.jsx($r,{label:"runtime",children:d.jsx("span",{className:"mono",children:(l==null?void 0:l.runtimeType)??"—"})}),d.jsx($r,{label:"sdk",children:d.jsx("span",{className:"mono",style:{fontSize:11},children:(o==null?void 0:o.sdkVersion)??"—"})}),d.jsx($r,{label:"connected",children:d.jsx("span",{className:"mono",style:{fontSize:11},children:yS((o==null?void 0:o.connectedAt)??null)})})]})]}),d.jsxs("div",{style:{padding:"10px 14px",borderBottom:"1px solid var(--border-faint)"},className:"flex flex-col",children:[d.jsx("a",{href:`/agents/${e}`,style:{fontSize:11,color:"var(--accent)"},className:"hover:underline",children:"Manage agent →"}),d.jsx("a",{href:"/clients",style:{fontSize:11,color:"var(--accent)",marginTop:4},className:"hover:underline",children:"Computers →"})]}),d.jsxs("div",{style:{padding:"12px 14px"},children:[d.jsx(Hp,{children:"Notifications"}),!(u!=null&&u.items)||u.items.length===0?d.jsx("div",{className:"text-center",style:{fontSize:11,color:"var(--fg-3)",padding:"12px 0"},children:"No notifications for this agent"}):d.jsx(eq,{notifications:u.items,agentId:e})]})]})}function tq({agentId:e,chatId:t}){const{data:r}=Fe({queryKey:["session",e,t],queryFn:()=>Us(e).then(a=>a.find(l=>l.chatId===t)??null),refetchInterval:5e3});return d.jsxs("div",{className:"flex flex-col overflow-hidden flex-1",children:[d.jsxs("div",{style:{padding:"12px 14px",borderBottom:"1px solid var(--border-faint)"},children:[d.jsx(Hp,{children:"Session"}),d.jsxs(QE,{children:[d.jsx($r,{label:"state",children:d.jsx(Qd,{state:(r==null?void 0:r.runtimeState)??(r==null?void 0:r.state)??null})}),d.jsx($r,{label:"chat",children:d.jsx("span",{className:"mono",style:{fontSize:10.5},children:t.slice(0,12)})}),d.jsx($r,{label:"started",children:gS((r==null?void 0:r.startedAt)??null)}),d.jsx($r,{label:"last",children:gS((r==null?void 0:r.lastActivityAt)??null)}),d.jsx($r,{label:"messages",children:d.jsx("span",{className:"mono",children:(r==null?void 0:r.messageCount)??0})})]})]}),d.jsx(GE,{agentId:e})]})}function nq({selectedAgentId:e,selectedChatId:t}){return t&&e?d.jsx(tq,{agentId:e,chatId:t}):e?d.jsx(GE,{agentId:e}):null}const rq=32;function iq({aggregated:e,stale:t,className:r}){const a=Math.max(1,...e.map(l=>l.workingCount));return d.jsx("div",{className:Te("flex items-end gap-[2px]",t&&"opacity-40",r),style:{height:22},"aria-hidden":!0,children:Array.from({length:rq}).map((l,o)=>{const u=e[o]??{workingCount:0,errorMask:!1},f=u.workingCount===0?.08:u.workingCount/a,m=.25+f*.7,h=u.errorMask?"var(--state-error)":"var(--accent)";return d.jsx("span",{className:"flex-1",style:{height:`${Math.max(12,f*100)}%`,background:h,opacity:m,borderRadius:.5}},o)})})}const aq={error:0,blocked:1,working:2,idle:3};function lq(e,t){return t?e?aq[e]??4:4:5}function sq(e,t){return t==="all"?!0:t==="active"?e.runtimeState==="working":e.runtimeState==="blocked"||e.runtimeState==="error"}function oq({selectedAgentId:e,selectedChatId:t,onSelectAgent:r,onSelectChat:a}){const l=Ci(),{resolve:o}=VE(),u=er(),f=$L(),[m,h]=S.useState(""),[v,y]=S.useState("all"),{data:x}=Fe({queryKey:["activity"],queryFn:Td,refetchInterval:1e4}),{data:b}=Fe({queryKey:e?Sp(e):["agent-sessions",null],queryFn:()=>e?Us(e):Promise.resolve([]),enabled:!!e,refetchInterval:1e4}),j=vt({mutationFn:z=>I$(z),onSuccess:(z,$)=>{u.invalidateQueries({queryKey:Sp($)}),a($,z.id)}}),{humans:k,agents:N,totalAll:E}=S.useMemo(()=>{const z=(x==null?void 0:x.agents)??[],$=m.trim().toLowerCase(),Z=z.filter(le=>{var te;if(!sq(le,v))return!1;if(!$)return!0;const X=l(le.agentId).toLowerCase(),de=le.clientId?(((te=o(le.clientId))==null?void 0:te.hostname)??"").toLowerCase():"";return X.includes($)||de.includes($)||le.agentId.toLowerCase().includes($)}),W=le=>lq(le.runtimeState,le.clientId),F=[],re=[];for(const le of Z)(le.type==="human"?F:re).push(le);return F.sort((le,X)=>W(le)-W(X)),re.sort((le,X)=>W(le)-W(X)),{humans:F,agents:re,totalAll:z.length}},[x,m,v,l,o]),R=S.useMemo(()=>{const z=(x==null?void 0:x.agents)??[];return{working:z.filter($=>$.runtimeState==="working").length,blocked:z.filter($=>$.runtimeState==="blocked").length,error:z.filter($=>$.runtimeState==="error").length}},[x]),A=[{value:"all",label:"all",count:E},{value:"active",label:"active",count:R.working},{value:"attn",label:"attn",count:R.blocked+R.error,warn:R.blocked+R.error>0}],I=z=>{var le;const $=e===z.agentId,Z=FE(z.runtimeState,z.clientId),W=z.clientId?((le=o(z.clientId))==null?void 0:le.hostname)??z.clientId.slice(0,8):null,F=z.activeSessions??0,re=z.totalSessions??0;return d.jsxs("div",{style:{borderBottom:"1px solid var(--border-faint)"},children:[d.jsxs("button",{type:"button",onClick:()=>r($?null:z.agentId),className:Te("w-full text-left transition-colors grid items-center","hover:bg-[var(--bg-hover)]"),style:{gridTemplateColumns:"14px 1fr auto",columnGap:8,padding:"7px 10px 7px 12px",background:$?"var(--bg-active)":"transparent",borderLeft:`2px solid ${$?"var(--accent)":"transparent"}`},children:[d.jsx(su,{state:Z,size:8}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("span",{className:"mono truncate",style:{fontSize:12,fontWeight:500,color:"var(--fg)",letterSpacing:-.1},children:l(z.agentId)}),z.type==="human"&&d.jsx("span",{className:"mono",style:{fontSize:9,padding:"1px 5px",borderRadius:2,textTransform:"uppercase",letterSpacing:.08,color:"var(--accent)",background:"color-mix(in oklch, var(--accent) 15%, transparent)"},children:"human"})]}),d.jsx("div",{className:"truncate",style:{fontSize:10.5,color:"var(--fg-3)"},children:Z==="offline"?"disconnected":W||"—"})]}),d.jsx("div",{className:"flex flex-col items-end gap-0.5",children:re>0&&d.jsxs("span",{className:"mono tnum",style:{fontSize:9,color:"var(--fg-3)"},children:[F,d.jsxs("span",{style:{color:"var(--fg-4)"},children:[" / ",re]})]})})]}),$&&d.jsxs("div",{style:{background:"var(--bg-sunken)",paddingBottom:4},children:[(!b||b.length===0)&&d.jsx("div",{style:{padding:"4px 10px 4px 28px",fontSize:10.5,color:"var(--fg-4)"},children:"No sessions yet"}),b==null?void 0:b.filter(X=>X.state!=="evicted").map(X=>{const de=X.state==="active"?"working":"idle";return d.jsxs("button",{type:"button",onClick:()=>a(z.agentId,X.chatId),className:"w-full grid items-center text-left transition-colors",style:{gridTemplateColumns:"14px 1fr",columnGap:6,padding:"4px 10px 4px 28px",background:t===X.chatId?"var(--bg-hover)":"transparent",color:X.state==="active"?"var(--fg-2)":"var(--fg-3)"},onMouseEnter:te=>{t!==X.chatId&&(te.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:te=>{t!==X.chatId&&(te.currentTarget.style.background="transparent")},children:[d.jsx(su,{state:de,size:6}),d.jsx("span",{className:"truncate",style:{fontSize:11,color:X.topic||X.summary?"var(--fg-2)":"var(--fg-4)"},children:X.topic||X.summary||`Chat · ${X.chatId.slice(0,8)}`})]},X.chatId)}),d.jsxs("button",{type:"button",onClick:()=>j.mutate(z.agentId),disabled:j.isPending,className:"w-full flex items-center text-left transition-colors",style:{gap:6,padding:"4px 10px 4px 28px",fontSize:10.5,color:"var(--fg-3)"},onMouseEnter:X=>{X.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:X=>{X.currentTarget.style.background="transparent"},children:[d.jsx(fl,{className:"h-3 w-3"}),"New chat"]})]})]},z.agentId)},q=k.length+N.length;return d.jsxs("aside",{className:"shrink-0 flex flex-col overflow-hidden",style:{width:268,background:"var(--bg-raised)",borderRight:"1px solid var(--border)"},children:[d.jsxs("div",{className:"shrink-0",style:{padding:"10px 12px 8px",borderBottom:"1px solid var(--border-faint)"},children:[d.jsx("div",{style:{marginBottom:8},children:d.jsxs("span",{className:"mono uppercase",style:{fontSize:10,color:"var(--fg-3)",letterSpacing:.08},children:[E," members"]})}),d.jsxs("div",{className:"relative",children:[d.jsx(dg,{className:"h-3.5 w-3.5 absolute pointer-events-none",style:{left:8,top:"50%",transform:"translateY(-50%)",color:"var(--fg-4)"}}),d.jsx("input",{value:m,onChange:z=>h(z.target.value),placeholder:"Filter…",className:"w-full outline-none",style:{padding:"5px 8px 5px 26px",fontSize:12,background:"var(--bg-sunken)",border:"1px solid var(--border)",borderRadius:4,color:"var(--fg)"}})]}),d.jsx("div",{className:"flex gap-1",style:{marginTop:8},children:A.map(z=>{const $=v===z.value;return d.jsxs("button",{type:"button",onClick:()=>y(z.value),className:"inline-flex items-center",style:{fontSize:10,padding:"3px 7px",borderRadius:3,gap:4,color:$?"var(--fg)":"var(--fg-3)",background:$?"var(--bg-active)":"transparent",border:`1px solid ${$?"var(--border-strong)":"var(--border)"}`},children:[z.label,d.jsx("span",{className:"mono",style:{color:z.warn&&z.count>0?"var(--state-error)":"var(--fg-4)"},children:z.count})]},z.value)})})]}),d.jsxs("div",{className:"shrink-0",style:{padding:"8px 12px",borderBottom:"1px solid var(--border-faint)"},children:[d.jsxs("div",{className:"flex items-center justify-between",style:{marginBottom:4},children:[d.jsxs("span",{className:"mono uppercase flex items-center gap-1.5",style:{fontSize:10,color:"var(--fg-3)",letterSpacing:.08},children:[d.jsx(uq,{}),"Pulse · 5m"]}),d.jsx("span",{className:"mono",style:{fontSize:10,color:"var(--fg-4)"},children:f.stale?"stale":"live"})]}),d.jsx(iq,{aggregated:f.aggregated,stale:f.stale}),d.jsxs("div",{className:"flex",style:{gap:10,marginTop:6,fontSize:10},children:[d.jsxs("span",{className:"mono",style:{color:"var(--state-working)"},children:["●",R.working," working"]}),d.jsxs("span",{className:"mono",style:{color:"var(--state-blocked)"},children:["●",R.blocked," blocked"]}),d.jsxs("span",{className:"mono",style:{color:"var(--state-error)"},children:["●",R.error," error"]})]})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto",children:[q===0&&d.jsx("div",{className:"text-center",style:{padding:"24px 12px",fontSize:12,color:"var(--fg-3)"},children:m||v!=="all"?"No matches":"No agents"}),N.length>0&&d.jsxs("div",{children:[d.jsx(vS,{label:"Agents",count:N.length}),N.map(I)]}),k.length>0&&d.jsxs("div",{children:[d.jsx(vS,{label:"Humans",count:k.length}),k.map(I)]})]})]})}function vS({label:e,count:t}){return d.jsxs("div",{className:"mono uppercase sticky top-0 z-10",style:{padding:"5px 12px",fontSize:9,letterSpacing:.12,color:"var(--fg-4)",background:"var(--bg-raised)",borderBottom:"1px solid var(--border-faint)"},children:[e," · ",t]})}function uq(){return d.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",focusable:"false",style:{color:"var(--accent)"},children:[d.jsx("title",{children:"pulse"}),d.jsx("path",{d:"M1 8 h3 l1.5 -4 l3 8 l2 -4 h4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function cq(){const[e,t]=lg(),r=e.get("a"),a=e.get("c");_j();const l=S.useCallback(f=>{t(f?{a:f}:{})},[t]),o=S.useCallback((f,m)=>{t({a:f,c:m})},[t]),{data:u}=Fe({queryKey:["agent-sessions",r],queryFn:()=>r?Us(r):Promise.resolve([]),enabled:!!r&&!a});return S.useEffect(()=>{if(!r||a||!u||u.length===0)return;const f=[...u].filter(m=>m.state!=="evicted").sort((m,h)=>(h.lastActivityAt??"").localeCompare(m.lastActivityAt??""))[0];f&&t({a:r,c:f.chatId},{replace:!0})},[r,a,u,t]),d.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[d.jsx(oq,{selectedAgentId:r,selectedChatId:a,onSelectAgent:l,onSelectChat:o}),d.jsx("main",{className:"flex-1 flex flex-col overflow-hidden min-w-0",style:{background:"var(--bg)"},children:d.jsx(J$,{selectedAgentId:r,selectedChatId:a})}),r&&d.jsx("aside",{className:"shrink-0 flex flex-col overflow-hidden",style:{width:290,borderLeft:"1px solid var(--border)",background:"var(--bg-raised)"},children:d.jsx(nq,{selectedAgentId:r,selectedChatId:a})})]})}const dq=new q_({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1}}});function fq(){return d.jsx(F_,{client:dq,children:d.jsx(UA,{children:d.jsx(EA,{children:d.jsxs(eA,{children:[d.jsx(Mr,{path:"/login",element:d.jsx(R$,{})}),d.jsx(Mr,{element:d.jsx(IA,{}),children:d.jsxs(Mr,{element:d.jsx(PL,{children:d.jsx(pD,{})}),children:[d.jsx(Mr,{index:!0,element:d.jsx(cq,{})}),d.jsx(Mr,{path:"agents",element:d.jsx(C$,{})}),d.jsx(Mr,{path:"agents/:uuid",element:d.jsx(h$,{})}),d.jsx(Mr,{path:"clients",element:d.jsx(T$,{})}),d.jsx(Mr,{path:"settings",element:d.jsx(D$,{})}),d.jsx(Mr,{path:"admin",element:d.jsx(r6,{})})]})})]})})})})}const KE=document.getElementById("root");if(!KE)throw new Error("Root element not found");y_.createRoot(KE).render(d.jsx(S.StrictMode,{children:d.jsx(fq,{})}));