vskill 0.2.80 → 0.2.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eval-server/api-routes.js +1 -1
- package/dist/eval-server/api-routes.js.map +1 -1
- package/dist/eval-server/eval-server.js +2 -0
- package/dist/eval-server/eval-server.js.map +1 -1
- package/dist/eval-server/skill-create-routes.d.ts +2 -0
- package/dist/eval-server/skill-create-routes.js +239 -0
- package/dist/eval-server/skill-create-routes.js.map +1 -0
- package/dist/eval-ui/assets/index-Bc_7Tmle.js +85 -0
- package/dist/eval-ui/assets/index-DgQS1GQO.css +1 -0
- package/dist/eval-ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/eval-ui/assets/index-BnKAmjEZ.js +0 -73
- package/dist/eval-ui/assets/index-CcHgd5W_.css +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const p of m.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&u(p)}).observe(document,{childList:!0,subtree:!0});function d(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function u(f){if(f.ep)return;f.ep=!0;const m=d(f);fetch(f.href,m)}})();var $u={exports:{}},Zn={};/**
|
|
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 Sm;function Qp(){if(Sm)return Zn;Sm=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function d(u,f,m){var p=null;if(m!==void 0&&(p=""+m),f.key!==void 0&&(p=""+f.key),"key"in f){m={};for(var b in f)b!=="key"&&(m[b]=f[b])}else m=f;return f=m.ref,{$$typeof:i,type:u,key:p,ref:f!==void 0?f:null,props:m}}return Zn.Fragment=c,Zn.jsx=d,Zn.jsxs=d,Zn}var Nm;function Vp(){return Nm||(Nm=1,$u.exports=Qp()),$u.exports}var n=Vp(),Ku={exports:{}},he={};/**
|
|
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 Em;function Zp(){if(Em)return he;Em=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),p=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function O(N){return N===null||typeof N!="object"?null:(N=w&&N[w]||N["@@iterator"],typeof N=="function"?N:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,z={};function q(N,L,I){this.props=N,this.context=L,this.refs=z,this.updater=I||H}q.prototype.isReactComponent={},q.prototype.setState=function(N,L){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,L,"setState")},q.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function X(){}X.prototype=q.prototype;function W(N,L,I){this.props=N,this.context=L,this.refs=z,this.updater=I||H}var te=W.prototype=new X;te.constructor=W,Y(te,q.prototype),te.isPureReactComponent=!0;var Z=Array.isArray;function Q(){}var F={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function ue(N,L,I){var D=I.ref;return{$$typeof:i,type:N,key:L,ref:D!==void 0?D:null,props:I}}function pe(N,L){return ue(N.type,L,N.props)}function ne(N){return typeof N=="object"&&N!==null&&N.$$typeof===i}function ve(N){var L={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(I){return L[I]})}var Ce=/\/+/g;function ze(N,L){return typeof N=="object"&&N!==null&&N.key!=null?ve(""+N.key):L.toString(36)}function ke(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(Q,Q):(N.status="pending",N.then(function(L){N.status==="pending"&&(N.status="fulfilled",N.value=L)},function(L){N.status==="pending"&&(N.status="rejected",N.reason=L)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function k(N,L,I,D,U){var P=typeof N;(P==="undefined"||P==="boolean")&&(N=null);var me=!1;if(N===null)me=!0;else switch(P){case"bigint":case"string":case"number":me=!0;break;case"object":switch(N.$$typeof){case i:case c:me=!0;break;case S:return me=N._init,k(me(N._payload),L,I,D,U)}}if(me)return U=U(N),me=D===""?"."+ze(N,0):D,Z(U)?(I="",me!=null&&(I=me.replace(Ce,"$&/")+"/"),k(U,L,I,"",function(J){return J})):U!=null&&(ne(U)&&(U=pe(U,I+(U.key==null||N&&N.key===U.key?"":(""+U.key).replace(Ce,"$&/")+"/")+me)),L.push(U)),1;me=0;var Te=D===""?".":D+":";if(Z(N))for(var ae=0;ae<N.length;ae++)D=N[ae],P=Te+ze(D,ae),me+=k(D,L,I,P,U);else if(ae=O(N),typeof ae=="function")for(N=ae.call(N),ae=0;!(D=N.next()).done;)D=D.value,P=Te+ze(D,ae++),me+=k(D,L,I,P,U);else if(P==="object"){if(typeof N.then=="function")return k(ke(N),L,I,D,U);throw L=String(N),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return me}function R(N,L,I){if(N==null)return N;var D=[],U=0;return k(N,D,"","",function(P){return L.call(I,P,U++)}),D}function le(N){if(N._status===-1){var L=N._result;L=L(),L.then(function(I){(N._status===0||N._status===-1)&&(N._status=1,N._result=I)},function(I){(N._status===0||N._status===-1)&&(N._status=2,N._result=I)}),N._status===-1&&(N._status=0,N._result=L)}if(N._status===1)return N._result.default;throw N._result}var se=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=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(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},K={map:R,forEach:function(N,L,I){R(N,function(){L.apply(this,arguments)},I)},count:function(N){var L=0;return R(N,function(){L++}),L},toArray:function(N){return R(N,function(L){return L})||[]},only:function(N){if(!ne(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return he.Activity=v,he.Children=K,he.Component=q,he.Fragment=d,he.Profiler=f,he.PureComponent=W,he.StrictMode=u,he.Suspense=y,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,he.__COMPILER_RUNTIME={__proto__:null,c:function(N){return F.H.useMemoCache(N)}},he.cache=function(N){return function(){return N.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(N,L,I){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var D=Y({},N.props),U=N.key;if(L!=null)for(P in L.key!==void 0&&(U=""+L.key),L)!$.call(L,P)||P==="key"||P==="__self"||P==="__source"||P==="ref"&&L.ref===void 0||(D[P]=L[P]);var P=arguments.length-2;if(P===1)D.children=I;else if(1<P){for(var me=Array(P),Te=0;Te<P;Te++)me[Te]=arguments[Te+2];D.children=me}return ue(N.type,U,D)},he.createContext=function(N){return N={$$typeof:p,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:m,_context:N},N},he.createElement=function(N,L,I){var D,U={},P=null;if(L!=null)for(D in L.key!==void 0&&(P=""+L.key),L)$.call(L,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(U[D]=L[D]);var me=arguments.length-2;if(me===1)U.children=I;else if(1<me){for(var Te=Array(me),ae=0;ae<me;ae++)Te[ae]=arguments[ae+2];U.children=Te}if(N&&N.defaultProps)for(D in me=N.defaultProps,me)U[D]===void 0&&(U[D]=me[D]);return ue(N,P,U)},he.createRef=function(){return{current:null}},he.forwardRef=function(N){return{$$typeof:b,render:N}},he.isValidElement=ne,he.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:le}},he.memo=function(N,L){return{$$typeof:x,type:N,compare:L===void 0?null:L}},he.startTransition=function(N){var L=F.T,I={};F.T=I;try{var D=N(),U=F.S;U!==null&&U(I,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(Q,se)}catch(P){se(P)}finally{L!==null&&I.types!==null&&(L.types=I.types),F.T=L}},he.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},he.use=function(N){return F.H.use(N)},he.useActionState=function(N,L,I){return F.H.useActionState(N,L,I)},he.useCallback=function(N,L){return F.H.useCallback(N,L)},he.useContext=function(N){return F.H.useContext(N)},he.useDebugValue=function(){},he.useDeferredValue=function(N,L){return F.H.useDeferredValue(N,L)},he.useEffect=function(N,L){return F.H.useEffect(N,L)},he.useEffectEvent=function(N){return F.H.useEffectEvent(N)},he.useId=function(){return F.H.useId()},he.useImperativeHandle=function(N,L,I){return F.H.useImperativeHandle(N,L,I)},he.useInsertionEffect=function(N,L){return F.H.useInsertionEffect(N,L)},he.useLayoutEffect=function(N,L){return F.H.useLayoutEffect(N,L)},he.useMemo=function(N,L){return F.H.useMemo(N,L)},he.useOptimistic=function(N,L){return F.H.useOptimistic(N,L)},he.useReducer=function(N,L,I){return F.H.useReducer(N,L,I)},he.useRef=function(N){return F.H.useRef(N)},he.useState=function(N){return F.H.useState(N)},he.useSyncExternalStore=function(N,L,I){return F.H.useSyncExternalStore(N,L,I)},he.useTransition=function(){return F.H.useTransition()},he.version="19.2.4",he}var km;function mc(){return km||(km=1,Ku.exports=Zp()),Ku.exports}var g=mc(),Ju={exports:{}},$n={},Wu={exports:{}},Fu={};/**
|
|
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 Tm;function $p(){return Tm||(Tm=1,(function(i){function c(k,R){var le=k.length;k.push(R);e:for(;0<le;){var se=le-1>>>1,K=k[se];if(0<f(K,R))k[se]=R,k[le]=K,le=se;else break e}}function d(k){return k.length===0?null:k[0]}function u(k){if(k.length===0)return null;var R=k[0],le=k.pop();if(le!==R){k[0]=le;e:for(var se=0,K=k.length,N=K>>>1;se<N;){var L=2*(se+1)-1,I=k[L],D=L+1,U=k[D];if(0>f(I,le))D<K&&0>f(U,I)?(k[se]=U,k[D]=le,se=D):(k[se]=I,k[L]=le,se=L);else if(D<K&&0>f(U,le))k[se]=U,k[D]=le,se=D;else break e}}return R}function f(k,R){var le=k.sortIndex-R.sortIndex;return le!==0?le:k.id-R.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;i.unstable_now=function(){return m.now()}}else{var p=Date,b=p.now();i.unstable_now=function(){return p.now()-b}}var y=[],x=[],S=1,v=null,w=3,O=!1,H=!1,Y=!1,z=!1,q=typeof setTimeout=="function"?setTimeout:null,X=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function te(k){for(var R=d(x);R!==null;){if(R.callback===null)u(x);else if(R.startTime<=k)u(x),R.sortIndex=R.expirationTime,c(y,R);else break;R=d(x)}}function Z(k){if(Y=!1,te(k),!H)if(d(y)!==null)H=!0,Q||(Q=!0,ve());else{var R=d(x);R!==null&&ke(Z,R.startTime-k)}}var Q=!1,F=-1,$=5,ue=-1;function pe(){return z?!0:!(i.unstable_now()-ue<$)}function ne(){if(z=!1,Q){var k=i.unstable_now();ue=k;var R=!0;try{e:{H=!1,Y&&(Y=!1,X(F),F=-1),O=!0;var le=w;try{t:{for(te(k),v=d(y);v!==null&&!(v.expirationTime>k&&pe());){var se=v.callback;if(typeof se=="function"){v.callback=null,w=v.priorityLevel;var K=se(v.expirationTime<=k);if(k=i.unstable_now(),typeof K=="function"){v.callback=K,te(k),R=!0;break t}v===d(y)&&u(y),te(k)}else u(y);v=d(y)}if(v!==null)R=!0;else{var N=d(x);N!==null&&ke(Z,N.startTime-k),R=!1}}break e}finally{v=null,w=le,O=!1}R=void 0}}finally{R?ve():Q=!1}}}var ve;if(typeof W=="function")ve=function(){W(ne)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,ze=Ce.port2;Ce.port1.onmessage=ne,ve=function(){ze.postMessage(null)}}else ve=function(){q(ne,0)};function ke(k,R){F=q(function(){k(i.unstable_now())},R)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(k){k.callback=null},i.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<k?Math.floor(1e3/k):5},i.unstable_getCurrentPriorityLevel=function(){return w},i.unstable_next=function(k){switch(w){case 1:case 2:case 3:var R=3;break;default:R=w}var le=w;w=R;try{return k()}finally{w=le}},i.unstable_requestPaint=function(){z=!0},i.unstable_runWithPriority=function(k,R){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var le=w;w=k;try{return R()}finally{w=le}},i.unstable_scheduleCallback=function(k,R,le){var se=i.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?se+le:se):le=se,k){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=le+K,k={id:S++,callback:R,priorityLevel:k,startTime:le,expirationTime:K,sortIndex:-1},le>se?(k.sortIndex=le,c(x,k),d(y)===null&&k===d(x)&&(Y?(X(F),F=-1):Y=!0,ke(Z,le-se))):(k.sortIndex=K,c(y,k),H||O||(H=!0,Q||(Q=!0,ve()))),k},i.unstable_shouldYield=pe,i.unstable_wrapCallback=function(k){var R=w;return function(){var le=w;w=R;try{return k.apply(this,arguments)}finally{w=le}}}})(Fu)),Fu}var wm;function Kp(){return wm||(wm=1,Wu.exports=$p()),Wu.exports}var Pu={exports:{}},it={};/**
|
|
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 Mm;function Jp(){if(Mm)return it;Mm=1;var i=mc();function c(y){var x="https://react.dev/errors/"+y;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)x+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+y+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var u={d:{f:d,r:function(){throw Error(c(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},f=Symbol.for("react.portal");function m(y,x,S){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:v==null?null:""+v,children:y,containerInfo:x,implementation:S}}var p=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(y,x){if(y==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return it.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,it.createPortal=function(y,x){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(c(299));return m(y,x,null,S)},it.flushSync=function(y){var x=p.T,S=u.p;try{if(p.T=null,u.p=2,y)return y()}finally{p.T=x,u.p=S,u.d.f()}},it.preconnect=function(y,x){typeof y=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,u.d.C(y,x))},it.prefetchDNS=function(y){typeof y=="string"&&u.d.D(y)},it.preinit=function(y,x){if(typeof y=="string"&&x&&typeof x.as=="string"){var S=x.as,v=b(S,x.crossOrigin),w=typeof x.integrity=="string"?x.integrity:void 0,O=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;S==="style"?u.d.S(y,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:v,integrity:w,fetchPriority:O}):S==="script"&&u.d.X(y,{crossOrigin:v,integrity:w,fetchPriority:O,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},it.preinitModule=function(y,x){if(typeof y=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var S=b(x.as,x.crossOrigin);u.d.M(y,{crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&u.d.M(y)},it.preload=function(y,x){if(typeof y=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var S=x.as,v=b(S,x.crossOrigin);u.d.L(y,S,{crossOrigin:v,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},it.preloadModule=function(y,x){if(typeof y=="string")if(x){var S=b(x.as,x.crossOrigin);u.d.m(y,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else u.d.m(y)},it.requestFormReset=function(y){u.d.r(y)},it.unstable_batchedUpdates=function(y,x){return y(x)},it.useFormState=function(y,x,S){return p.H.useFormState(y,x,S)},it.useFormStatus=function(){return p.H.useHostTransitionStatus()},it.version="19.2.4",it}var Am;function Wp(){if(Am)return Pu.exports;Am=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),Pu.exports=Jp(),Pu.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 Cm;function Fp(){if(Cm)return $n;Cm=1;var i=Kp(),c=mc(),d=Wp();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(m(e)!==e)throw Error(u(188))}function x(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(u(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var r=s.alternate;if(r===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===r.child){for(r=s.child;r;){if(r===l)return y(s),e;if(r===a)return y(s),t;r=r.sibling}throw Error(u(188))}if(l.return!==a.return)l=s,a=r;else{for(var o=!1,h=s.child;h;){if(h===l){o=!0,l=s,a=r;break}if(h===a){o=!0,a=s,l=r;break}h=h.sibling}if(!o){for(h=r.child;h;){if(h===l){o=!0,l=r,a=s;break}if(h===a){o=!0,a=r,l=s;break}h=h.sibling}if(!o)throw Error(u(189))}}if(l.alternate!==a)throw Error(u(190))}if(l.tag!==3)throw Error(u(188));return l.stateNode.current===l?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,w=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),X=Symbol.for("react.consumer"),W=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ue=Symbol.for("react.activity"),pe=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function ve(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var Ce=Symbol.for("react.client.reference");function ze(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case q:return"Profiler";case z:return"StrictMode";case Z:return"Suspense";case Q:return"SuspenseList";case ue:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case W:return e.displayName||"Context";case X:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:ze(e.type)||"Memo";case $:t=e._payload,e=e._init;try{return ze(e(t))}catch{}}return null}var ke=Array.isArray,k=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},se=[],K=-1;function N(e){return{current:e}}function L(e){0>K||(e.current=se[K],se[K]=null,K--)}function I(e,t){K++,se[K]=e.current,e.current=t}var D=N(null),U=N(null),P=N(null),me=N(null);function Te(e,t){switch(I(P,t),I(U,e),I(D,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vf(t),e=Zf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(D),I(D,e)}function ae(){L(D),L(U),L(P)}function J(e){e.memoizedState!==null&&I(me,e);var t=D.current,l=Zf(t,e.type);t!==l&&(I(U,e),I(D,l))}function ee(e){U.current===e&&(L(D),L(U)),me.current===e&&(L(me),Gn._currentValue=le)}var ie,oe;function tt(e){if(ie===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);ie=t&&t[1]||"",oe=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ie+e+oe}var Pe=!1;function Mt(e,t){if(!e||Pe)return"";Pe=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(_){var C=_}Reflect.construct(e,[],V)}else{try{V.call()}catch(_){C=_}e.call(V.prototype)}}else{try{throw Error()}catch(_){C=_}(V=e())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(_){if(_&&C&&typeof _.stack=="string")return[_.stack,C.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=a.DetermineComponentFrameRoot(),o=r[0],h=r[1];if(o&&h){var j=o.split(`
|
|
44
|
+
`),A=h.split(`
|
|
45
|
+
`);for(s=a=0;a<j.length&&!j[a].includes("DetermineComponentFrameRoot");)a++;for(;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;if(a===j.length||s===A.length)for(a=j.length-1,s=A.length-1;1<=a&&0<=s&&j[a]!==A[s];)s--;for(;1<=a&&0<=s;a--,s--)if(j[a]!==A[s]){if(a!==1||s!==1)do if(a--,s--,0>s||j[a]!==A[s]){var B=`
|
|
46
|
+
`+j[a].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=a&&0<=s);break}}}finally{Pe=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?tt(l):""}function Vl(e,t){switch(e.tag){case 26:case 27:case 5:return tt(e.type);case 16:return tt("Lazy");case 13:return e.child!==t&&t!==null?tt("Suspense Fallback"):tt("Suspense");case 19:return tt("SuspenseList");case 0:case 15:return Mt(e.type,!1);case 11:return Mt(e.type.render,!1);case 1:return Mt(e.type,!0);case 31:return tt("Activity");default:return""}}function ma(e){try{var t="",l=null;do t+=Vl(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var _r=Object.prototype.hasOwnProperty,zr=i.unstable_scheduleCallback,Dr=i.unstable_cancelCallback,Sh=i.unstable_shouldYield,Nh=i.unstable_requestPaint,yt=i.unstable_now,Eh=i.unstable_getCurrentPriorityLevel,jc=i.unstable_ImmediatePriority,Sc=i.unstable_UserBlockingPriority,ls=i.unstable_NormalPriority,kh=i.unstable_LowPriority,Nc=i.unstable_IdlePriority,Th=i.log,wh=i.unstable_setDisableYieldValue,Ia=null,gt=null;function vl(e){if(typeof Th=="function"&&wh(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Ia,e)}catch{}}var bt=Math.clz32?Math.clz32:Ch,Mh=Math.log,Ah=Math.LN2;function Ch(e){return e>>>=0,e===0?32:31-(Mh(e)/Ah|0)|0}var as=256,ns=262144,ss=4194304;function Zl(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function rs(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,r=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=a&134217727;return h!==0?(a=h&~r,a!==0?s=Zl(a):(o&=h,o!==0?s=Zl(o):l||(l=h&~e,l!==0&&(s=Zl(l))))):(h=a&~r,h!==0?s=Zl(h):o!==0?s=Zl(o):l||(l=a&~e,l!==0&&(s=Zl(l)))),s===0?0:t!==0&&t!==s&&(t&r)===0&&(r=s&-s,l=t&-t,r>=l||r===32&&(l&4194048)!==0)?t:s}function en(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Rh(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ec(){var e=ss;return ss<<=1,(ss&62914560)===0&&(ss=4194304),e}function Or(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function tn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _h(e,t,l,a,s,r){var o=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var h=e.entanglements,j=e.expirationTimes,A=e.hiddenUpdates;for(l=o&~l;0<l;){var B=31-bt(l),V=1<<B;h[B]=0,j[B]=-1;var C=A[B];if(C!==null)for(A[B]=null,B=0;B<C.length;B++){var _=C[B];_!==null&&(_.lane&=-536870913)}l&=~V}a!==0&&kc(e,a,0),r!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=r&~(o&~t))}function kc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-bt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Tc(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-bt(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function wc(e,t){var l=t&-t;return l=(l&42)!==0?1:Lr(l),(l&(e.suspendedLanes|t))!==0?0:l}function Lr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Br(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mc(){var e=R.p;return e!==0?e:(e=window.event,e===void 0?32:xm(e.type))}function Ac(e,t){var l=R.p;try{return R.p=e,t()}finally{R.p=l}}var yl=Math.random().toString(36).slice(2),lt="__reactFiber$"+yl,dt="__reactProps$"+yl,ha="__reactContainer$"+yl,Hr="__reactEvents$"+yl,zh="__reactListeners$"+yl,Dh="__reactHandles$"+yl,Cc="__reactResources$"+yl,ln="__reactMarker$"+yl;function Ur(e){delete e[lt],delete e[dt],delete e[Hr],delete e[zh],delete e[Dh]}function xa(e){var t=e[lt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ha]||l[lt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=If(e);e!==null;){if(l=e[lt])return l;e=If(e)}return t}e=l,l=e.parentNode}return null}function pa(e){if(e=e[lt]||e[ha]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function an(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function va(e){var t=e[Cc];return t||(t=e[Cc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ie(e){e[ln]=!0}var Rc=new Set,_c={};function $l(e,t){ya(e,t),ya(e+"Capture",t)}function ya(e,t){for(_c[e]=t,e=0;e<t.length;e++)Rc.add(t[e])}var Oh=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]*$"),zc={},Dc={};function Lh(e){return _r.call(Dc,e)?!0:_r.call(zc,e)?!1:Oh.test(e)?Dc[e]=!0:(zc[e]=!0,!1)}function is(e,t,l){if(Lh(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function us(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Ft(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function At(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Oc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Bh(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,r=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){l=""+o,r.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qr(e){if(!e._valueTracker){var t=Oc(e)?"checked":"value";e._valueTracker=Bh(e,t,""+e[t])}}function Lc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Oc(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function cs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Hh=/[\n"\\]/g;function Ct(e){return e.replace(Hh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Yr(e,t,l,a,s,r,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+At(t)):e.value!==""+At(t)&&(e.value=""+At(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Gr(e,o,At(t)):l!=null?Gr(e,o,At(l)):a!=null&&e.removeAttribute("value"),s==null&&r!=null&&(e.defaultChecked=!!r),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+At(h):e.removeAttribute("name")}function Bc(e,t,l,a,s,r,o,h){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||l!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){qr(e);return}l=l!=null?""+At(l):"",t=t!=null?""+At(t):l,h||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=h?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),qr(e)}function Gr(e,t,l){t==="number"&&cs(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ga(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+At(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Hc(e,t,l){if(t!=null&&(t=""+At(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+At(l):""}function Uc(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(u(92));if(ke(a)){if(1<a.length)throw Error(u(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=At(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),qr(e)}function ba(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Uh=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 qc(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Uh.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Yc(e,t,l){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&qc(e,s,a)}else for(var r in t)t.hasOwnProperty(r)&&qc(e,r,t[r])}function Xr(e){if(e.indexOf("-")===-1)return!1;switch(e){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 qh=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"]]),Yh=/^[\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 os(e){return Yh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pt(){}var Qr=null;function Vr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ja=null,Sa=null;function Gc(e){var t=pa(e);if(t&&(e=t.stateNode)){var l=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Yr(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ct(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[dt]||null;if(!s)throw Error(u(90));Yr(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Lc(a)}break e;case"textarea":Hc(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ga(e,!!l.multiple,t,!1)}}}var Zr=!1;function Xc(e,t,l){if(Zr)return e(t,l);Zr=!0;try{var a=e(t);return a}finally{if(Zr=!1,(ja!==null||Sa!==null)&&(Fs(),ja&&(t=ja,e=Sa,Sa=ja=null,Gc(t),e)))for(t=0;t<e.length;t++)Gc(e[t])}}function nn(e,t){var l=e.stateNode;if(l===null)return null;var a=l[dt]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(u(231,t,typeof l));return l}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$r=!1;if(It)try{var sn={};Object.defineProperty(sn,"passive",{get:function(){$r=!0}}),window.addEventListener("test",sn,sn),window.removeEventListener("test",sn,sn)}catch{$r=!1}var gl=null,Kr=null,ds=null;function Qc(){if(ds)return ds;var e,t=Kr,l=t.length,a,s="value"in gl?gl.value:gl.textContent,r=s.length;for(e=0;e<l&&t[e]===s[e];e++);var o=l-e;for(a=1;a<=o&&t[l-a]===s[r-a];a++);return ds=s.slice(e,1<a?1-a:void 0)}function fs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ms(){return!0}function Vc(){return!1}function ft(e){function t(l,a,s,r,o){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=r,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(l=e[h],this[h]=l?l(r):r[h]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?ms:Vc,this.isPropagationStopped=Vc,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ms)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ms)},persist:function(){},isPersistent:ms}),t}var Kl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hs=ft(Kl),rn=v({},Kl,{view:0,detail:0}),Gh=ft(rn),Jr,Wr,un,xs=v({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&e.type==="mousemove"?(Jr=e.screenX-un.screenX,Wr=e.screenY-un.screenY):Wr=Jr=0,un=e),Jr)},movementY:function(e){return"movementY"in e?e.movementY:Wr}}),Zc=ft(xs),Xh=v({},xs,{dataTransfer:0}),Qh=ft(Xh),Vh=v({},rn,{relatedTarget:0}),Fr=ft(Vh),Zh=v({},Kl,{animationName:0,elapsedTime:0,pseudoElement:0}),$h=ft(Zh),Kh=v({},Kl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jh=ft(Kh),Wh=v({},Kl,{data:0}),$c=ft(Wh),Fh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ph={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"},Ih={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ex(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ih[e])?!!t[e]:!1}function Pr(){return ex}var tx=v({},rn,{key:function(e){if(e.key){var t=Fh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ph[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pr,charCode:function(e){return e.type==="keypress"?fs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lx=ft(tx),ax=v({},xs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kc=ft(ax),nx=v({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pr}),sx=ft(nx),rx=v({},Kl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ix=ft(rx),ux=v({},xs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),cx=ft(ux),ox=v({},Kl,{newState:0,oldState:0}),dx=ft(ox),fx=[9,13,27,32],Ir=It&&"CompositionEvent"in window,cn=null;It&&"documentMode"in document&&(cn=document.documentMode);var mx=It&&"TextEvent"in window&&!cn,Jc=It&&(!Ir||cn&&8<cn&&11>=cn),Wc=" ",Fc=!1;function Pc(e,t){switch(e){case"keyup":return fx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ic(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Na=!1;function hx(e,t){switch(e){case"compositionend":return Ic(t);case"keypress":return t.which!==32?null:(Fc=!0,Wc);case"textInput":return e=t.data,e===Wc&&Fc?null:e;default:return null}}function xx(e,t){if(Na)return e==="compositionend"||!Ir&&Pc(e,t)?(e=Qc(),ds=Kr=gl=null,Na=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Jc&&t.locale!=="ko"?null:t.data;default:return null}}var px={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 eo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!px[e.type]:t==="textarea"}function to(e,t,l,a){ja?Sa?Sa.push(a):Sa=[a]:ja=a,t=nr(t,"onChange"),0<t.length&&(l=new hs("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var on=null,dn=null;function vx(e){Uf(e,0)}function ps(e){var t=an(e);if(Lc(t))return e}function lo(e,t){if(e==="change")return t}var ao=!1;if(It){var ei;if(It){var ti="oninput"in document;if(!ti){var no=document.createElement("div");no.setAttribute("oninput","return;"),ti=typeof no.oninput=="function"}ei=ti}else ei=!1;ao=ei&&(!document.documentMode||9<document.documentMode)}function so(){on&&(on.detachEvent("onpropertychange",ro),dn=on=null)}function ro(e){if(e.propertyName==="value"&&ps(dn)){var t=[];to(t,dn,e,Vr(e)),Xc(vx,t)}}function yx(e,t,l){e==="focusin"?(so(),on=t,dn=l,on.attachEvent("onpropertychange",ro)):e==="focusout"&&so()}function gx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ps(dn)}function bx(e,t){if(e==="click")return ps(t)}function jx(e,t){if(e==="input"||e==="change")return ps(t)}function Sx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jt=typeof Object.is=="function"?Object.is:Sx;function fn(e,t){if(jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!_r.call(t,s)||!jt(e[s],t[s]))return!1}return!0}function io(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uo(e,t){var l=io(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=io(l)}}function co(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?co(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function oo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=cs(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=cs(e.document)}return t}function li(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Nx=It&&"documentMode"in document&&11>=document.documentMode,Ea=null,ai=null,mn=null,ni=!1;function fo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ni||Ea==null||Ea!==cs(a)||(a=Ea,"selectionStart"in a&&li(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),mn&&fn(mn,a)||(mn=a,a=nr(ai,"onSelect"),0<a.length&&(t=new hs("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Ea)))}function Jl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ka={animationend:Jl("Animation","AnimationEnd"),animationiteration:Jl("Animation","AnimationIteration"),animationstart:Jl("Animation","AnimationStart"),transitionrun:Jl("Transition","TransitionRun"),transitionstart:Jl("Transition","TransitionStart"),transitioncancel:Jl("Transition","TransitionCancel"),transitionend:Jl("Transition","TransitionEnd")},si={},mo={};It&&(mo=document.createElement("div").style,"AnimationEvent"in window||(delete ka.animationend.animation,delete ka.animationiteration.animation,delete ka.animationstart.animation),"TransitionEvent"in window||delete ka.transitionend.transition);function Wl(e){if(si[e])return si[e];if(!ka[e])return e;var t=ka[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in mo)return si[e]=t[l];return e}var ho=Wl("animationend"),xo=Wl("animationiteration"),po=Wl("animationstart"),Ex=Wl("transitionrun"),kx=Wl("transitionstart"),Tx=Wl("transitioncancel"),vo=Wl("transitionend"),yo=new Map,ri="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(" ");ri.push("scrollEnd");function Yt(e,t){yo.set(e,t),$l(t,[e])}var vs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Rt=[],Ta=0,ii=0;function ys(){for(var e=Ta,t=ii=Ta=0;t<e;){var l=Rt[t];Rt[t++]=null;var a=Rt[t];Rt[t++]=null;var s=Rt[t];Rt[t++]=null;var r=Rt[t];if(Rt[t++]=null,a!==null&&s!==null){var o=a.pending;o===null?s.next=s:(s.next=o.next,o.next=s),a.pending=s}r!==0&&go(l,s,r)}}function gs(e,t,l,a){Rt[Ta++]=e,Rt[Ta++]=t,Rt[Ta++]=l,Rt[Ta++]=a,ii|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ui(e,t,l,a){return gs(e,t,l,a),bs(e)}function Fl(e,t){return gs(e,null,null,t),bs(e)}function go(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,r=e.return;r!==null;)r.childLanes|=l,a=r.alternate,a!==null&&(a.childLanes|=l),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(s=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,s&&t!==null&&(s=31-bt(l),e=r.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),r):null}function bs(e){if(50<On)throw On=0,vu=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var wa={};function wx(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function St(e,t,l,a){return new wx(e,t,l,a)}function ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function el(e,t){var l=e.alternate;return l===null?(l=St(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function bo(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function js(e,t,l,a,s,r){var o=0;if(a=e,typeof e=="function")ci(e)&&(o=1);else if(typeof e=="string")o=_p(e,l,D.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ue:return e=St(31,l,t,s),e.elementType=ue,e.lanes=r,e;case Y:return Pl(l.children,s,r,t);case z:o=8,s|=24;break;case q:return e=St(12,l,t,s|2),e.elementType=q,e.lanes=r,e;case Z:return e=St(13,l,t,s),e.elementType=Z,e.lanes=r,e;case Q:return e=St(19,l,t,s),e.elementType=Q,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:o=10;break e;case X:o=9;break e;case te:o=11;break e;case F:o=14;break e;case $:o=16,a=null;break e}o=29,l=Error(u(130,e===null?"null":typeof e,"")),a=null}return t=St(o,l,t,s),t.elementType=e,t.type=a,t.lanes=r,t}function Pl(e,t,l,a){return e=St(7,e,a,t),e.lanes=l,e}function oi(e,t,l){return e=St(6,e,null,t),e.lanes=l,e}function jo(e){var t=St(18,null,null,0);return t.stateNode=e,t}function di(e,t,l){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var So=new WeakMap;function _t(e,t){if(typeof e=="object"&&e!==null){var l=So.get(e);return l!==void 0?l:(t={value:e,source:t,stack:ma(t)},So.set(e,t),t)}return{value:e,source:t,stack:ma(t)}}var Ma=[],Aa=0,Ss=null,hn=0,zt=[],Dt=0,bl=null,Qt=1,Vt="";function tl(e,t){Ma[Aa++]=hn,Ma[Aa++]=Ss,Ss=e,hn=t}function No(e,t,l){zt[Dt++]=Qt,zt[Dt++]=Vt,zt[Dt++]=bl,bl=e;var a=Qt;e=Vt;var s=32-bt(a)-1;a&=~(1<<s),l+=1;var r=32-bt(t)+s;if(30<r){var o=s-s%5;r=(a&(1<<o)-1).toString(32),a>>=o,s-=o,Qt=1<<32-bt(t)+s|l<<s|a,Vt=r+e}else Qt=1<<r|l<<s|a,Vt=e}function fi(e){e.return!==null&&(tl(e,1),No(e,1,0))}function mi(e){for(;e===Ss;)Ss=Ma[--Aa],Ma[Aa]=null,hn=Ma[--Aa],Ma[Aa]=null;for(;e===bl;)bl=zt[--Dt],zt[Dt]=null,Vt=zt[--Dt],zt[Dt]=null,Qt=zt[--Dt],zt[Dt]=null}function Eo(e,t){zt[Dt++]=Qt,zt[Dt++]=Vt,zt[Dt++]=bl,Qt=t.id,Vt=t.overflow,bl=e}var at=null,He=null,Ne=!1,jl=null,Ot=!1,hi=Error(u(519));function Sl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xn(_t(t,e)),hi}function ko(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[lt]=e,t[dt]=a,l){case"dialog":be("cancel",t),be("close",t);break;case"iframe":case"object":case"embed":be("load",t);break;case"video":case"audio":for(l=0;l<Bn.length;l++)be(Bn[l],t);break;case"source":be("error",t);break;case"img":case"image":case"link":be("error",t),be("load",t);break;case"details":be("toggle",t);break;case"input":be("invalid",t),Bc(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":be("invalid",t);break;case"textarea":be("invalid",t),Uc(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||Xf(t.textContent,l)?(a.popover!=null&&(be("beforetoggle",t),be("toggle",t)),a.onScroll!=null&&be("scroll",t),a.onScrollEnd!=null&&be("scrollend",t),a.onClick!=null&&(t.onclick=Pt),t=!0):t=!1,t||Sl(e,!0)}function To(e){for(at=e.return;at;)switch(at.tag){case 5:case 31:case 13:Ot=!1;return;case 27:case 3:Ot=!0;return;default:at=at.return}}function Ca(e){if(e!==at)return!1;if(!Ne)return To(e),Ne=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||_u(e.type,e.memoizedProps)),l=!l),l&&He&&Sl(e),To(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));He=Pf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));He=Pf(e)}else t===27?(t=He,Ll(e.type)?(e=Bu,Bu=null,He=e):He=t):He=at?Bt(e.stateNode.nextSibling):null;return!0}function Il(){He=at=null,Ne=!1}function xi(){var e=jl;return e!==null&&(pt===null?pt=e:pt.push.apply(pt,e),jl=null),e}function xn(e){jl===null?jl=[e]:jl.push(e)}var pi=N(null),ea=null,ll=null;function Nl(e,t,l){I(pi,t._currentValue),t._currentValue=l}function al(e){e._currentValue=pi.current,L(pi)}function vi(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function yi(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var r=s.dependencies;if(r!==null){var o=s.child;r=r.firstContext;e:for(;r!==null;){var h=r;r=s;for(var j=0;j<t.length;j++)if(h.context===t[j]){r.lanes|=l,h=r.alternate,h!==null&&(h.lanes|=l),vi(r.return,l,e),a||(o=null);break e}r=h.next}}else if(s.tag===18){if(o=s.return,o===null)throw Error(u(341));o.lanes|=l,r=o.alternate,r!==null&&(r.lanes|=l),vi(o,l,e),o=null}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}}function Ra(e,t,l,a){e=null;for(var s=t,r=!1;s!==null;){if(!r){if((s.flags&524288)!==0)r=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var o=s.alternate;if(o===null)throw Error(u(387));if(o=o.memoizedProps,o!==null){var h=s.type;jt(s.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(s===me.current){if(o=s.alternate,o===null)throw Error(u(387));o.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Gn):e=[Gn])}s=s.return}e!==null&&yi(t,e,l,a),t.flags|=262144}function Ns(e){for(e=e.firstContext;e!==null;){if(!jt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ta(e){ea=e,ll=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function nt(e){return wo(ea,e)}function Es(e,t){return ea===null&&ta(e),wo(e,t)}function wo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},ll===null){if(e===null)throw Error(u(308));ll=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ll=ll.next=t;return l}var Mx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Ax=i.unstable_scheduleCallback,Cx=i.unstable_NormalPriority,Ze={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gi(){return{controller:new Mx,data:new Map,refCount:0}}function pn(e){e.refCount--,e.refCount===0&&Ax(Cx,function(){e.controller.abort()})}var vn=null,bi=0,_a=0,za=null;function Rx(e,t){if(vn===null){var l=vn=[];bi=0,_a=Nu(),za={status:"pending",value:void 0,then:function(a){l.push(a)}}}return bi++,t.then(Mo,Mo),t}function Mo(){if(--bi===0&&vn!==null){za!==null&&(za.status="fulfilled");var e=vn;vn=null,_a=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function _x(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var Ao=k.S;k.S=function(e,t){mf=yt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Rx(e,t),Ao!==null&&Ao(e,t)};var la=N(null);function ji(){var e=la.current;return e!==null?e:Be.pooledCache}function ks(e,t){t===null?I(la,la.current):I(la,t.pool)}function Co(){var e=ji();return e===null?null:{parent:Ze._currentValue,pool:e}}var Da=Error(u(460)),Si=Error(u(474)),Ts=Error(u(542)),ws={then:function(){}};function Ro(e){return e=e.status,e==="fulfilled"||e==="rejected"}function _o(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Pt,Pt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Do(e),e;default:if(typeof t.status=="string")t.then(Pt,Pt);else{if(e=Be,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Do(e),e}throw na=t,Da}}function aa(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(na=l,Da):l}}var na=null;function zo(){if(na===null)throw Error(u(459));var e=na;return na=null,e}function Do(e){if(e===Da||e===Ts)throw Error(u(483))}var Oa=null,yn=0;function Ms(e){var t=yn;return yn+=1,Oa===null&&(Oa=[]),_o(Oa,e,t)}function gn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function As(e,t){throw t.$$typeof===w?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Oo(e){function t(T,E){if(e){var M=T.deletions;M===null?(T.deletions=[E],T.flags|=16):M.push(E)}}function l(T,E){if(!e)return null;for(;E!==null;)t(T,E),E=E.sibling;return null}function a(T){for(var E=new Map;T!==null;)T.key!==null?E.set(T.key,T):E.set(T.index,T),T=T.sibling;return E}function s(T,E){return T=el(T,E),T.index=0,T.sibling=null,T}function r(T,E,M){return T.index=M,e?(M=T.alternate,M!==null?(M=M.index,M<E?(T.flags|=67108866,E):M):(T.flags|=67108866,E)):(T.flags|=1048576,E)}function o(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function h(T,E,M,G){return E===null||E.tag!==6?(E=oi(M,T.mode,G),E.return=T,E):(E=s(E,M),E.return=T,E)}function j(T,E,M,G){var de=M.type;return de===Y?B(T,E,M.props.children,G,M.key):E!==null&&(E.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===$&&aa(de)===E.type)?(E=s(E,M.props),gn(E,M),E.return=T,E):(E=js(M.type,M.key,M.props,null,T.mode,G),gn(E,M),E.return=T,E)}function A(T,E,M,G){return E===null||E.tag!==4||E.stateNode.containerInfo!==M.containerInfo||E.stateNode.implementation!==M.implementation?(E=di(M,T.mode,G),E.return=T,E):(E=s(E,M.children||[]),E.return=T,E)}function B(T,E,M,G,de){return E===null||E.tag!==7?(E=Pl(M,T.mode,G,de),E.return=T,E):(E=s(E,M),E.return=T,E)}function V(T,E,M){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=oi(""+E,T.mode,M),E.return=T,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case O:return M=js(E.type,E.key,E.props,null,T.mode,M),gn(M,E),M.return=T,M;case H:return E=di(E,T.mode,M),E.return=T,E;case $:return E=aa(E),V(T,E,M)}if(ke(E)||ve(E))return E=Pl(E,T.mode,M,null),E.return=T,E;if(typeof E.then=="function")return V(T,Ms(E),M);if(E.$$typeof===W)return V(T,Es(T,E),M);As(T,E)}return null}function C(T,E,M,G){var de=E!==null?E.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return de!==null?null:h(T,E,""+M,G);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case O:return M.key===de?j(T,E,M,G):null;case H:return M.key===de?A(T,E,M,G):null;case $:return M=aa(M),C(T,E,M,G)}if(ke(M)||ve(M))return de!==null?null:B(T,E,M,G,null);if(typeof M.then=="function")return C(T,E,Ms(M),G);if(M.$$typeof===W)return C(T,E,Es(T,M),G);As(T,M)}return null}function _(T,E,M,G,de){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return T=T.get(M)||null,h(E,T,""+G,de);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case O:return T=T.get(G.key===null?M:G.key)||null,j(E,T,G,de);case H:return T=T.get(G.key===null?M:G.key)||null,A(E,T,G,de);case $:return G=aa(G),_(T,E,M,G,de)}if(ke(G)||ve(G))return T=T.get(M)||null,B(E,T,G,de,null);if(typeof G.then=="function")return _(T,E,M,Ms(G),de);if(G.$$typeof===W)return _(T,E,M,Es(E,G),de);As(E,G)}return null}function re(T,E,M,G){for(var de=null,we=null,ce=E,ye=E=0,Se=null;ce!==null&&ye<M.length;ye++){ce.index>ye?(Se=ce,ce=null):Se=ce.sibling;var Me=C(T,ce,M[ye],G);if(Me===null){ce===null&&(ce=Se);break}e&&ce&&Me.alternate===null&&t(T,ce),E=r(Me,E,ye),we===null?de=Me:we.sibling=Me,we=Me,ce=Se}if(ye===M.length)return l(T,ce),Ne&&tl(T,ye),de;if(ce===null){for(;ye<M.length;ye++)ce=V(T,M[ye],G),ce!==null&&(E=r(ce,E,ye),we===null?de=ce:we.sibling=ce,we=ce);return Ne&&tl(T,ye),de}for(ce=a(ce);ye<M.length;ye++)Se=_(ce,T,ye,M[ye],G),Se!==null&&(e&&Se.alternate!==null&&ce.delete(Se.key===null?ye:Se.key),E=r(Se,E,ye),we===null?de=Se:we.sibling=Se,we=Se);return e&&ce.forEach(function(Yl){return t(T,Yl)}),Ne&&tl(T,ye),de}function fe(T,E,M,G){if(M==null)throw Error(u(151));for(var de=null,we=null,ce=E,ye=E=0,Se=null,Me=M.next();ce!==null&&!Me.done;ye++,Me=M.next()){ce.index>ye?(Se=ce,ce=null):Se=ce.sibling;var Yl=C(T,ce,Me.value,G);if(Yl===null){ce===null&&(ce=Se);break}e&&ce&&Yl.alternate===null&&t(T,ce),E=r(Yl,E,ye),we===null?de=Yl:we.sibling=Yl,we=Yl,ce=Se}if(Me.done)return l(T,ce),Ne&&tl(T,ye),de;if(ce===null){for(;!Me.done;ye++,Me=M.next())Me=V(T,Me.value,G),Me!==null&&(E=r(Me,E,ye),we===null?de=Me:we.sibling=Me,we=Me);return Ne&&tl(T,ye),de}for(ce=a(ce);!Me.done;ye++,Me=M.next())Me=_(ce,T,ye,Me.value,G),Me!==null&&(e&&Me.alternate!==null&&ce.delete(Me.key===null?ye:Me.key),E=r(Me,E,ye),we===null?de=Me:we.sibling=Me,we=Me);return e&&ce.forEach(function(Xp){return t(T,Xp)}),Ne&&tl(T,ye),de}function Le(T,E,M,G){if(typeof M=="object"&&M!==null&&M.type===Y&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case O:e:{for(var de=M.key;E!==null;){if(E.key===de){if(de=M.type,de===Y){if(E.tag===7){l(T,E.sibling),G=s(E,M.props.children),G.return=T,T=G;break e}}else if(E.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===$&&aa(de)===E.type){l(T,E.sibling),G=s(E,M.props),gn(G,M),G.return=T,T=G;break e}l(T,E);break}else t(T,E);E=E.sibling}M.type===Y?(G=Pl(M.props.children,T.mode,G,M.key),G.return=T,T=G):(G=js(M.type,M.key,M.props,null,T.mode,G),gn(G,M),G.return=T,T=G)}return o(T);case H:e:{for(de=M.key;E!==null;){if(E.key===de)if(E.tag===4&&E.stateNode.containerInfo===M.containerInfo&&E.stateNode.implementation===M.implementation){l(T,E.sibling),G=s(E,M.children||[]),G.return=T,T=G;break e}else{l(T,E);break}else t(T,E);E=E.sibling}G=di(M,T.mode,G),G.return=T,T=G}return o(T);case $:return M=aa(M),Le(T,E,M,G)}if(ke(M))return re(T,E,M,G);if(ve(M)){if(de=ve(M),typeof de!="function")throw Error(u(150));return M=de.call(M),fe(T,E,M,G)}if(typeof M.then=="function")return Le(T,E,Ms(M),G);if(M.$$typeof===W)return Le(T,E,Es(T,M),G);As(T,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,E!==null&&E.tag===6?(l(T,E.sibling),G=s(E,M),G.return=T,T=G):(l(T,E),G=oi(M,T.mode,G),G.return=T,T=G),o(T)):l(T,E)}return function(T,E,M,G){try{yn=0;var de=Le(T,E,M,G);return Oa=null,de}catch(ce){if(ce===Da||ce===Ts)throw ce;var we=St(29,ce,null,T.mode);return we.lanes=G,we.return=T,we}finally{}}}var sa=Oo(!0),Lo=Oo(!1),El=!1;function Ni(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ei(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function kl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Tl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ae&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=bs(e),go(e,null,l),t}return gs(e,a,t,l),bs(e)}function bn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Tc(e,l)}}function ki(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,r=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};r===null?s=r=o:r=r.next=o,l=l.next}while(l!==null);r===null?s=r=t:r=r.next=t}else s=r=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:r,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Ti=!1;function jn(){if(Ti){var e=za;if(e!==null)throw e}}function Sn(e,t,l,a){Ti=!1;var s=e.updateQueue;El=!1;var r=s.firstBaseUpdate,o=s.lastBaseUpdate,h=s.shared.pending;if(h!==null){s.shared.pending=null;var j=h,A=j.next;j.next=null,o===null?r=A:o.next=A,o=j;var B=e.alternate;B!==null&&(B=B.updateQueue,h=B.lastBaseUpdate,h!==o&&(h===null?B.firstBaseUpdate=A:h.next=A,B.lastBaseUpdate=j))}if(r!==null){var V=s.baseState;o=0,B=A=j=null,h=r;do{var C=h.lane&-536870913,_=C!==h.lane;if(_?(je&C)===C:(a&C)===C){C!==0&&C===_a&&(Ti=!0),B!==null&&(B=B.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var re=e,fe=h;C=t;var Le=l;switch(fe.tag){case 1:if(re=fe.payload,typeof re=="function"){V=re.call(Le,V,C);break e}V=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=fe.payload,C=typeof re=="function"?re.call(Le,V,C):re,C==null)break e;V=v({},V,C);break e;case 2:El=!0}}C=h.callback,C!==null&&(e.flags|=64,_&&(e.flags|=8192),_=s.callbacks,_===null?s.callbacks=[C]:_.push(C))}else _={lane:C,tag:h.tag,payload:h.payload,callback:h.callback,next:null},B===null?(A=B=_,j=V):B=B.next=_,o|=C;if(h=h.next,h===null){if(h=s.shared.pending,h===null)break;_=h,h=_.next,_.next=null,s.lastBaseUpdate=_,s.shared.pending=null}}while(!0);B===null&&(j=V),s.baseState=j,s.firstBaseUpdate=A,s.lastBaseUpdate=B,r===null&&(s.shared.lanes=0),Rl|=o,e.lanes=o,e.memoizedState=V}}function Bo(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Ho(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Bo(l[e],t)}var La=N(null),Cs=N(0);function Uo(e,t){e=fl,I(Cs,e),I(La,t),fl=e|t.baseLanes}function wi(){I(Cs,fl),I(La,La.current)}function Mi(){fl=Cs.current,L(La),L(Cs)}var Nt=N(null),Lt=null;function wl(e){var t=e.alternate;I(Qe,Qe.current&1),I(Nt,e),Lt===null&&(t===null||La.current!==null||t.memoizedState!==null)&&(Lt=e)}function Ai(e){I(Qe,Qe.current),I(Nt,e),Lt===null&&(Lt=e)}function qo(e){e.tag===22?(I(Qe,Qe.current),I(Nt,e),Lt===null&&(Lt=e)):Ml()}function Ml(){I(Qe,Qe.current),I(Nt,Nt.current)}function Et(e){L(Nt),Lt===e&&(Lt=null),L(Qe)}var Qe=N(0);function Rs(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Ou(l)||Lu(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nl=0,xe=null,De=null,$e=null,_s=!1,Ba=!1,ra=!1,zs=0,Nn=0,Ha=null,zx=0;function Ge(){throw Error(u(321))}function Ci(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!jt(e[l],t[l]))return!1;return!0}function Ri(e,t,l,a,s,r){return nl=r,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Nd:Zi,ra=!1,r=l(a,s),ra=!1,Ba&&(r=Go(t,l,a,s)),Yo(e),r}function Yo(e){k.H=Tn;var t=De!==null&&De.next!==null;if(nl=0,$e=De=xe=null,_s=!1,Nn=0,Ha=null,t)throw Error(u(300));e===null||Ke||(e=e.dependencies,e!==null&&Ns(e)&&(Ke=!0))}function Go(e,t,l,a){xe=e;var s=0;do{if(Ba&&(Ha=null),Nn=0,Ba=!1,25<=s)throw Error(u(301));if(s+=1,$e=De=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}k.H=Ed,r=t(l,a)}while(Ba);return r}function Dx(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?En(t):t,e=e.useState()[0],(De!==null?De.memoizedState:null)!==e&&(xe.flags|=1024),t}function _i(){var e=zs!==0;return zs=0,e}function zi(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Di(e){if(_s){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_s=!1}nl=0,$e=De=xe=null,Ba=!1,Nn=zs=0,Ha=null}function ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?xe.memoizedState=$e=e:$e=$e.next=e,$e}function Ve(){if(De===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=$e===null?xe.memoizedState:$e.next;if(t!==null)$e=t,De=e;else{if(e===null)throw xe.alternate===null?Error(u(467)):Error(u(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},$e===null?xe.memoizedState=$e=e:$e=$e.next=e}return $e}function Ds(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function En(e){var t=Nn;return Nn+=1,Ha===null&&(Ha=[]),e=_o(Ha,e,t),t=xe,($e===null?t.memoizedState:$e.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Nd:Zi),e}function Os(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return En(e);if(e.$$typeof===W)return nt(e)}throw Error(u(438,String(e)))}function Oi(e){var t=null,l=xe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=xe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Ds(),xe.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=pe;return t.index++,l}function sl(e,t){return typeof t=="function"?t(e):t}function Ls(e){var t=Ve();return Li(t,De,e)}function Li(e,t,l){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=l;var s=e.baseQueue,r=a.pending;if(r!==null){if(s!==null){var o=s.next;s.next=r.next,r.next=o}t.baseQueue=s=r,a.pending=null}if(r=e.baseState,s===null)e.memoizedState=r;else{t=s.next;var h=o=null,j=null,A=t,B=!1;do{var V=A.lane&-536870913;if(V!==A.lane?(je&V)===V:(nl&V)===V){var C=A.revertLane;if(C===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),V===_a&&(B=!0);else if((nl&C)===C){A=A.next,C===_a&&(B=!0);continue}else V={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},j===null?(h=j=V,o=r):j=j.next=V,xe.lanes|=C,Rl|=C;V=A.action,ra&&l(r,V),r=A.hasEagerState?A.eagerState:l(r,V)}else C={lane:V,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},j===null?(h=j=C,o=r):j=j.next=C,xe.lanes|=V,Rl|=V;A=A.next}while(A!==null&&A!==t);if(j===null?o=r:j.next=h,!jt(r,e.memoizedState)&&(Ke=!0,B&&(l=za,l!==null)))throw l;e.memoizedState=r,e.baseState=o,e.baseQueue=j,a.lastRenderedState=r}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Bi(e){var t=Ve(),l=t.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,r=t.memoizedState;if(s!==null){l.pending=null;var o=s=s.next;do r=e(r,o.action),o=o.next;while(o!==s);jt(r,t.memoizedState)||(Ke=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),l.lastRenderedState=r}return[r,a]}function Xo(e,t,l){var a=xe,s=Ve(),r=Ne;if(r){if(l===void 0)throw Error(u(407));l=l()}else l=t();var o=!jt((De||s).memoizedState,l);if(o&&(s.memoizedState=l,Ke=!0),s=s.queue,qi(Zo.bind(null,a,s,e),[e]),s.getSnapshot!==t||o||$e!==null&&$e.memoizedState.tag&1){if(a.flags|=2048,Ua(9,{destroy:void 0},Vo.bind(null,a,s,l,t),null),Be===null)throw Error(u(349));r||(nl&127)!==0||Qo(a,t,l)}return l}function Qo(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=xe.updateQueue,t===null?(t=Ds(),xe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Vo(e,t,l,a){t.value=l,t.getSnapshot=a,$o(t)&&Ko(e)}function Zo(e,t,l){return l(function(){$o(t)&&Ko(e)})}function $o(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!jt(e,l)}catch{return!0}}function Ko(e){var t=Fl(e,2);t!==null&&vt(t,e,2)}function Hi(e){var t=ut();if(typeof e=="function"){var l=e;if(e=l(),ra){vl(!0);try{l()}finally{vl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:e},t}function Jo(e,t,l,a){return e.baseState=l,Li(e,De,typeof a=="function"?a:sl)}function Ox(e,t,l,a,s){if(Us(e))throw Error(u(485));if(e=t.action,e!==null){var r={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){r.listeners.push(o)}};k.T!==null?l(!0):r.isTransition=!1,a(r),l=t.pending,l===null?(r.next=t.pending=r,Wo(t,r)):(r.next=l.next,t.pending=l.next=r)}}function Wo(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var r=k.T,o={};k.T=o;try{var h=l(s,a),j=k.S;j!==null&&j(o,h),Fo(e,t,h)}catch(A){Ui(e,t,A)}finally{r!==null&&o.types!==null&&(r.types=o.types),k.T=r}}else try{r=l(s,a),Fo(e,t,r)}catch(A){Ui(e,t,A)}}function Fo(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Po(e,t,a)},function(a){return Ui(e,t,a)}):Po(e,t,l)}function Po(e,t,l){t.status="fulfilled",t.value=l,Io(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Wo(e,l)))}function Ui(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Io(t),t=t.next;while(t!==a)}e.action=null}function Io(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ed(e,t){return t}function td(e,t){if(Ne){var l=Be.formState;if(l!==null){e:{var a=xe;if(Ne){if(He){t:{for(var s=He,r=Ot;s.nodeType!==8;){if(!r){s=null;break t}if(s=Bt(s.nextSibling),s===null){s=null;break t}}r=s.data,s=r==="F!"||r==="F"?s:null}if(s){He=Bt(s.nextSibling),a=s.data==="F!";break e}}Sl(a)}a=!1}a&&(t=l[0])}}return l=ut(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ed,lastRenderedState:t},l.queue=a,l=bd.bind(null,xe,a),a.dispatch=l,a=Hi(!1),r=Vi.bind(null,xe,!1,a.queue),a=ut(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=Ox.bind(null,xe,s,r,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function ld(e){var t=Ve();return ad(t,De,e)}function ad(e,t,l){if(t=Li(e,t,ed)[0],e=Ls(sl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=En(t)}catch(o){throw o===Da?Ts:o}else a=t;t=Ve();var s=t.queue,r=s.dispatch;return l!==t.memoizedState&&(xe.flags|=2048,Ua(9,{destroy:void 0},Lx.bind(null,s,l),null)),[a,r,e]}function Lx(e,t){e.action=t}function nd(e){var t=Ve(),l=De;if(l!==null)return ad(t,l,e);Ve(),t=t.memoizedState,l=Ve();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Ua(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=xe.updateQueue,t===null&&(t=Ds(),xe.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function sd(){return Ve().memoizedState}function Bs(e,t,l,a){var s=ut();xe.flags|=e,s.memoizedState=Ua(1|t,{destroy:void 0},l,a===void 0?null:a)}function Hs(e,t,l,a){var s=Ve();a=a===void 0?null:a;var r=s.memoizedState.inst;De!==null&&a!==null&&Ci(a,De.memoizedState.deps)?s.memoizedState=Ua(t,r,l,a):(xe.flags|=e,s.memoizedState=Ua(1|t,r,l,a))}function rd(e,t){Bs(8390656,8,e,t)}function qi(e,t){Hs(2048,8,e,t)}function Bx(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=Ds(),xe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function id(e){var t=Ve().memoizedState;return Bx({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function ud(e,t){return Hs(4,2,e,t)}function cd(e,t){return Hs(4,4,e,t)}function od(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dd(e,t,l){l=l!=null?l.concat([e]):null,Hs(4,4,od.bind(null,t,e),l)}function Yi(){}function fd(e,t){var l=Ve();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Ci(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function md(e,t){var l=Ve();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Ci(t,a[1]))return a[0];if(a=e(),ra){vl(!0);try{e()}finally{vl(!1)}}return l.memoizedState=[a,t],a}function Gi(e,t,l){return l===void 0||(nl&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=xf(),xe.lanes|=e,Rl|=e,l)}function hd(e,t,l,a){return jt(l,t)?l:La.current!==null?(e=Gi(e,l,a),jt(e,t)||(Ke=!0),e):(nl&42)===0||(nl&1073741824)!==0&&(je&261930)===0?(Ke=!0,e.memoizedState=l):(e=xf(),xe.lanes|=e,Rl|=e,t)}function xd(e,t,l,a,s){var r=R.p;R.p=r!==0&&8>r?r:8;var o=k.T,h={};k.T=h,Vi(e,!1,t,l);try{var j=s(),A=k.S;if(A!==null&&A(h,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var B=_x(j,a);kn(e,t,B,wt(e))}else kn(e,t,a,wt(e))}catch(V){kn(e,t,{then:function(){},status:"rejected",reason:V},wt())}finally{R.p=r,o!==null&&h.types!==null&&(o.types=h.types),k.T=o}}function Hx(){}function Xi(e,t,l,a){if(e.tag!==5)throw Error(u(476));var s=pd(e).queue;xd(e,s,t,le,l===null?Hx:function(){return vd(e),l(a)})}function pd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:le},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vd(e){var t=pd(e);t.next===null&&(t=e.alternate.memoizedState),kn(e,t.next.queue,{},wt())}function Qi(){return nt(Gn)}function yd(){return Ve().memoizedState}function gd(){return Ve().memoizedState}function Ux(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=wt();e=kl(l);var a=Tl(t,e,l);a!==null&&(vt(a,t,l),bn(a,t,l)),t={cache:gi()},e.payload=t;return}t=t.return}}function qx(e,t,l){var a=wt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Us(e)?jd(t,l):(l=ui(e,t,l,a),l!==null&&(vt(l,e,a),Sd(l,t,a)))}function bd(e,t,l){var a=wt();kn(e,t,l,a)}function kn(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Us(e))jd(t,s);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var o=t.lastRenderedState,h=r(o,l);if(s.hasEagerState=!0,s.eagerState=h,jt(h,o))return gs(e,t,s,0),Be===null&&ys(),!1}catch{}finally{}if(l=ui(e,t,s,a),l!==null)return vt(l,e,a),Sd(l,t,a),!0}return!1}function Vi(e,t,l,a){if(a={lane:2,revertLane:Nu(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Us(e)){if(t)throw Error(u(479))}else t=ui(e,l,a,2),t!==null&&vt(t,e,2)}function Us(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function jd(e,t){Ba=_s=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Sd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Tc(e,l)}}var Tn={readContext:nt,use:Os,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Tn.useEffectEvent=Ge;var Nd={readContext:nt,use:Os,useCallback:function(e,t){return ut().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:rd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Bs(4194308,4,od.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Bs(4194308,4,e,t)},useInsertionEffect:function(e,t){Bs(4,2,e,t)},useMemo:function(e,t){var l=ut();t=t===void 0?null:t;var a=e();if(ra){vl(!0);try{e()}finally{vl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=ut();if(l!==void 0){var s=l(t);if(ra){vl(!0);try{l(t)}finally{vl(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=qx.bind(null,xe,e),[a.memoizedState,e]},useRef:function(e){var t=ut();return e={current:e},t.memoizedState=e},useState:function(e){e=Hi(e);var t=e.queue,l=bd.bind(null,xe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Yi,useDeferredValue:function(e,t){var l=ut();return Gi(l,e,t)},useTransition:function(){var e=Hi(!1);return e=xd.bind(null,xe,e.queue,!0,!1),ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=xe,s=ut();if(Ne){if(l===void 0)throw Error(u(407));l=l()}else{if(l=t(),Be===null)throw Error(u(349));(je&127)!==0||Qo(a,t,l)}s.memoizedState=l;var r={value:l,getSnapshot:t};return s.queue=r,rd(Zo.bind(null,a,r,e),[e]),a.flags|=2048,Ua(9,{destroy:void 0},Vo.bind(null,a,r,l,t),null),l},useId:function(){var e=ut(),t=Be.identifierPrefix;if(Ne){var l=Vt,a=Qt;l=(a&~(1<<32-bt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=zs++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=zx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qi,useFormState:td,useActionState:td,useOptimistic:function(e){var t=ut();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Vi.bind(null,xe,!0,l),l.dispatch=t,[e,t]},useMemoCache:Oi,useCacheRefresh:function(){return ut().memoizedState=Ux.bind(null,xe)},useEffectEvent:function(e){var t=ut(),l={impl:e};return t.memoizedState=l,function(){if((Ae&2)!==0)throw Error(u(440));return l.impl.apply(void 0,arguments)}}},Zi={readContext:nt,use:Os,useCallback:fd,useContext:nt,useEffect:qi,useImperativeHandle:dd,useInsertionEffect:ud,useLayoutEffect:cd,useMemo:md,useReducer:Ls,useRef:sd,useState:function(){return Ls(sl)},useDebugValue:Yi,useDeferredValue:function(e,t){var l=Ve();return hd(l,De.memoizedState,e,t)},useTransition:function(){var e=Ls(sl)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:En(e),t]},useSyncExternalStore:Xo,useId:yd,useHostTransitionStatus:Qi,useFormState:ld,useActionState:ld,useOptimistic:function(e,t){var l=Ve();return Jo(l,De,e,t)},useMemoCache:Oi,useCacheRefresh:gd};Zi.useEffectEvent=id;var Ed={readContext:nt,use:Os,useCallback:fd,useContext:nt,useEffect:qi,useImperativeHandle:dd,useInsertionEffect:ud,useLayoutEffect:cd,useMemo:md,useReducer:Bi,useRef:sd,useState:function(){return Bi(sl)},useDebugValue:Yi,useDeferredValue:function(e,t){var l=Ve();return De===null?Gi(l,e,t):hd(l,De.memoizedState,e,t)},useTransition:function(){var e=Bi(sl)[0],t=Ve().memoizedState;return[typeof e=="boolean"?e:En(e),t]},useSyncExternalStore:Xo,useId:yd,useHostTransitionStatus:Qi,useFormState:nd,useActionState:nd,useOptimistic:function(e,t){var l=Ve();return De!==null?Jo(l,De,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Oi,useCacheRefresh:gd};Ed.useEffectEvent=id;function $i(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:v({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Ki={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=wt(),s=kl(a);s.payload=t,l!=null&&(s.callback=l),t=Tl(e,s,a),t!==null&&(vt(t,e,a),bn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=wt(),s=kl(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=Tl(e,s,a),t!==null&&(vt(t,e,a),bn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=wt(),a=kl(l);a.tag=2,t!=null&&(a.callback=t),t=Tl(e,a,l),t!==null&&(vt(t,e,l),bn(t,e,l))}};function kd(e,t,l,a,s,r,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,r,o):t.prototype&&t.prototype.isPureReactComponent?!fn(l,a)||!fn(s,r):!0}function Td(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Ki.enqueueReplaceState(t,t.state,null)}function ia(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=v({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function wd(e){vs(e)}function Md(e){console.error(e)}function Ad(e){vs(e)}function qs(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Cd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Ji(e,t,l){return l=kl(l),l.tag=3,l.payload={element:null},l.callback=function(){qs(e,t)},l}function Rd(e){return e=kl(e),e.tag=3,e}function _d(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var r=a.value;e.payload=function(){return s(r)},e.callback=function(){Cd(t,l,a)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Cd(t,l,a),typeof s!="function"&&(_l===null?_l=new Set([this]):_l.add(this));var h=a.stack;this.componentDidCatch(a.value,{componentStack:h!==null?h:""})})}function Yx(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Ra(t,l,s,!0),l=Nt.current,l!==null){switch(l.tag){case 31:case 13:return Lt===null?Ps():l.alternate===null&&Xe===0&&(Xe=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===ws?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),bu(e,a,s)),!1;case 22:return l.flags|=65536,a===ws?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),bu(e,a,s)),!1}throw Error(u(435,l.tag))}return bu(e,a,s),Ps(),!1}if(Ne)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==hi&&(e=Error(u(422),{cause:a}),xn(_t(e,l)))):(a!==hi&&(t=Error(u(423),{cause:a}),xn(_t(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=_t(a,l),s=Ji(e.stateNode,a,s),ki(e,s),Xe!==4&&(Xe=2)),!1;var r=Error(u(520),{cause:a});if(r=_t(r,l),Dn===null?Dn=[r]:Dn.push(r),Xe!==4&&(Xe=2),t===null)return!0;a=_t(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=Ji(l.stateNode,a,e),ki(l,e),!1;case 1:if(t=l.type,r=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(_l===null||!_l.has(r))))return l.flags|=65536,s&=-s,l.lanes|=s,s=Rd(s),_d(s,e,l,a),ki(l,s),!1}l=l.return}while(l!==null);return!1}var Wi=Error(u(461)),Ke=!1;function st(e,t,l,a){t.child=e===null?Lo(t,null,l,a):sa(t,e.child,l,a)}function zd(e,t,l,a,s){l=l.render;var r=t.ref;if("ref"in a){var o={};for(var h in a)h!=="ref"&&(o[h]=a[h])}else o=a;return ta(t),a=Ri(e,t,l,o,r,s),h=_i(),e!==null&&!Ke?(zi(e,t,s),rl(e,t,s)):(Ne&&h&&fi(t),t.flags|=1,st(e,t,a,s),t.child)}function Dd(e,t,l,a,s){if(e===null){var r=l.type;return typeof r=="function"&&!ci(r)&&r.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=r,Od(e,t,r,a,s)):(e=js(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!nu(e,s)){var o=r.memoizedProps;if(l=l.compare,l=l!==null?l:fn,l(o,a)&&e.ref===t.ref)return rl(e,t,s)}return t.flags|=1,e=el(r,a),e.ref=t.ref,e.return=t,t.child=e}function Od(e,t,l,a,s){if(e!==null){var r=e.memoizedProps;if(fn(r,a)&&e.ref===t.ref)if(Ke=!1,t.pendingProps=a=r,nu(e,s))(e.flags&131072)!==0&&(Ke=!0);else return t.lanes=e.lanes,rl(e,t,s)}return Fi(e,t,l,a,s)}function Ld(e,t,l,a){var s=a.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~r}else a=0,t.child=null;return Bd(e,t,r,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ks(t,r!==null?r.cachePool:null),r!==null?Uo(t,r):wi(),qo(t);else return a=t.lanes=536870912,Bd(e,t,r!==null?r.baseLanes|l:l,l,a)}else r!==null?(ks(t,r.cachePool),Uo(t,r),Ml(),t.memoizedState=null):(e!==null&&ks(t,null),wi(),Ml());return st(e,t,s,l),t.child}function wn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bd(e,t,l,a,s){var r=ji();return r=r===null?null:{parent:Ze._currentValue,pool:r},t.memoizedState={baseLanes:l,cachePool:r},e!==null&&ks(t,null),wi(),qo(t),e!==null&&Ra(e,t,a,!0),t.childLanes=s,null}function Ys(e,t){return t=Xs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hd(e,t,l){return sa(t,e.child,null,l),e=Ys(t,t.pendingProps),e.flags|=2,Et(t),t.memoizedState=null,e}function Gx(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(a.mode==="hidden")return e=Ys(t,a),t.lanes=536870912,wn(null,e);if(Ai(t),(e=He)?(e=Ff(e,Ot),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bl!==null?{id:Qt,overflow:Vt}:null,retryLane:536870912,hydrationErrors:null},l=jo(e),l.return=t,t.child=l,at=t,He=null)):e=null,e===null)throw Sl(t);return t.lanes=536870912,null}return Ys(t,a)}var r=e.memoizedState;if(r!==null){var o=r.dehydrated;if(Ai(t),s)if(t.flags&256)t.flags&=-257,t=Hd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(Ke||Ra(e,t,l,!1),s=(l&e.childLanes)!==0,Ke||s){if(a=Be,a!==null&&(o=wc(a,l),o!==0&&o!==r.retryLane))throw r.retryLane=o,Fl(e,o),vt(a,e,o),Wi;Ps(),t=Hd(e,t,l)}else e=r.treeContext,He=Bt(o.nextSibling),at=t,Ne=!0,jl=null,Ot=!1,e!==null&&Eo(t,e),t=Ys(t,a),t.flags|=4096;return t}return e=el(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Gs(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(u(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Fi(e,t,l,a,s){return ta(t),l=Ri(e,t,l,a,void 0,s),a=_i(),e!==null&&!Ke?(zi(e,t,s),rl(e,t,s)):(Ne&&a&&fi(t),t.flags|=1,st(e,t,l,s),t.child)}function Ud(e,t,l,a,s,r){return ta(t),t.updateQueue=null,l=Go(t,a,l,s),Yo(e),a=_i(),e!==null&&!Ke?(zi(e,t,r),rl(e,t,r)):(Ne&&a&&fi(t),t.flags|=1,st(e,t,l,r),t.child)}function qd(e,t,l,a,s){if(ta(t),t.stateNode===null){var r=wa,o=l.contextType;typeof o=="object"&&o!==null&&(r=nt(o)),r=new l(a,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Ki,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=a,r.state=t.memoizedState,r.refs={},Ni(t),o=l.contextType,r.context=typeof o=="object"&&o!==null?nt(o):wa,r.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&($i(t,l,o,a),r.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(o=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),o!==r.state&&Ki.enqueueReplaceState(r,r.state,null),Sn(t,a,r,s),jn(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){r=t.stateNode;var h=t.memoizedProps,j=ia(l,h);r.props=j;var A=r.context,B=l.contextType;o=wa,typeof B=="object"&&B!==null&&(o=nt(B));var V=l.getDerivedStateFromProps;B=typeof V=="function"||typeof r.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,B||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(h||A!==o)&&Td(t,r,a,o),El=!1;var C=t.memoizedState;r.state=C,Sn(t,a,r,s),jn(),A=t.memoizedState,h||C!==A||El?(typeof V=="function"&&($i(t,l,V,a),A=t.memoizedState),(j=El||kd(t,l,j,a,C,A,o))?(B||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=A),r.props=a,r.state=A,r.context=o,a=j):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{r=t.stateNode,Ei(e,t),o=t.memoizedProps,B=ia(l,o),r.props=B,V=t.pendingProps,C=r.context,A=l.contextType,j=wa,typeof A=="object"&&A!==null&&(j=nt(A)),h=l.getDerivedStateFromProps,(A=typeof h=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(o!==V||C!==j)&&Td(t,r,a,j),El=!1,C=t.memoizedState,r.state=C,Sn(t,a,r,s),jn();var _=t.memoizedState;o!==V||C!==_||El||e!==null&&e.dependencies!==null&&Ns(e.dependencies)?(typeof h=="function"&&($i(t,l,h,a),_=t.memoizedState),(B=El||kd(t,l,B,a,C,_,j)||e!==null&&e.dependencies!==null&&Ns(e.dependencies))?(A||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(a,_,j),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(a,_,j)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||o===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=_),r.props=a,r.state=_,r.context=j,a=B):(typeof r.componentDidUpdate!="function"||o===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),a=!1)}return r=a,Gs(e,t),a=(t.flags&128)!==0,r||a?(r=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&a?(t.child=sa(t,e.child,null,s),t.child=sa(t,null,l,s)):st(e,t,l,s),t.memoizedState=r.state,e=t.child):e=rl(e,t,s),e}function Yd(e,t,l,a){return Il(),t.flags|=256,st(e,t,l,a),t.child}var Pi={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ii(e){return{baseLanes:e,cachePool:Co()}}function eu(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Tt),e}function Gd(e,t,l){var a=t.pendingProps,s=!1,r=(t.flags&128)!==0,o;if((o=r)||(o=e!==null&&e.memoizedState===null?!1:(Qe.current&2)!==0),o&&(s=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(s?wl(t):Ml(),(e=He)?(e=Ff(e,Ot),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bl!==null?{id:Qt,overflow:Vt}:null,retryLane:536870912,hydrationErrors:null},l=jo(e),l.return=t,t.child=l,at=t,He=null)):e=null,e===null)throw Sl(t);return Lu(e)?t.lanes=32:t.lanes=536870912,null}var h=a.children;return a=a.fallback,s?(Ml(),s=t.mode,h=Xs({mode:"hidden",children:h},s),a=Pl(a,s,l,null),h.return=t,a.return=t,h.sibling=a,t.child=h,a=t.child,a.memoizedState=Ii(l),a.childLanes=eu(e,o,l),t.memoizedState=Pi,wn(null,a)):(wl(t),tu(t,h))}var j=e.memoizedState;if(j!==null&&(h=j.dehydrated,h!==null)){if(r)t.flags&256?(wl(t),t.flags&=-257,t=lu(e,t,l)):t.memoizedState!==null?(Ml(),t.child=e.child,t.flags|=128,t=null):(Ml(),h=a.fallback,s=t.mode,a=Xs({mode:"visible",children:a.children},s),h=Pl(h,s,l,null),h.flags|=2,a.return=t,h.return=t,a.sibling=h,t.child=a,sa(t,e.child,null,l),a=t.child,a.memoizedState=Ii(l),a.childLanes=eu(e,o,l),t.memoizedState=Pi,t=wn(null,a));else if(wl(t),Lu(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var A=o.dgst;o=A,a=Error(u(419)),a.stack="",a.digest=o,xn({value:a,source:null,stack:null}),t=lu(e,t,l)}else if(Ke||Ra(e,t,l,!1),o=(l&e.childLanes)!==0,Ke||o){if(o=Be,o!==null&&(a=wc(o,l),a!==0&&a!==j.retryLane))throw j.retryLane=a,Fl(e,a),vt(o,e,a),Wi;Ou(h)||Ps(),t=lu(e,t,l)}else Ou(h)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,He=Bt(h.nextSibling),at=t,Ne=!0,jl=null,Ot=!1,e!==null&&Eo(t,e),t=tu(t,a.children),t.flags|=4096);return t}return s?(Ml(),h=a.fallback,s=t.mode,j=e.child,A=j.sibling,a=el(j,{mode:"hidden",children:a.children}),a.subtreeFlags=j.subtreeFlags&65011712,A!==null?h=el(A,h):(h=Pl(h,s,l,null),h.flags|=2),h.return=t,a.return=t,a.sibling=h,t.child=a,wn(null,a),a=t.child,h=e.child.memoizedState,h===null?h=Ii(l):(s=h.cachePool,s!==null?(j=Ze._currentValue,s=s.parent!==j?{parent:j,pool:j}:s):s=Co(),h={baseLanes:h.baseLanes|l,cachePool:s}),a.memoizedState=h,a.childLanes=eu(e,o,l),t.memoizedState=Pi,wn(e.child,a)):(wl(t),l=e.child,e=l.sibling,l=el(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=l,t.memoizedState=null,l)}function tu(e,t){return t=Xs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Xs(e,t){return e=St(22,e,null,t),e.lanes=0,e}function lu(e,t,l){return sa(t,e.child,null,l),e=tu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xd(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),vi(e.return,t,l)}function au(e,t,l,a,s,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=l,o.tailMode=s,o.treeForkCount=r)}function Qd(e,t,l){var a=t.pendingProps,s=a.revealOrder,r=a.tail;a=a.children;var o=Qe.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,I(Qe,o),st(e,t,a,l),a=Ne?hn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xd(e,l,t);else if(e.tag===19)Xd(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&Rs(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),au(t,!1,s,l,r,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Rs(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}au(t,!0,l,null,r,a);break;case"together":au(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function rl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Rl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ra(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,l=el(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=el(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function nu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ns(e)))}function Xx(e,t,l){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),Nl(t,Ze,e.memoizedState.cache),Il();break;case 27:case 5:J(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:Nl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ai(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(wl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Gd(e,t,l):(wl(t),e=rl(e,t,l),e!==null?e.sibling:null);wl(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Ra(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return Qd(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),I(Qe,Qe.current),a)break;return null;case 22:return t.lanes=0,Ld(e,t,l,t.pendingProps);case 24:Nl(t,Ze,e.memoizedState.cache)}return rl(e,t,l)}function Vd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ke=!0;else{if(!nu(e,l)&&(t.flags&128)===0)return Ke=!1,Xx(e,t,l);Ke=(e.flags&131072)!==0}else Ke=!1,Ne&&(t.flags&1048576)!==0&&No(t,hn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=aa(t.elementType),t.type=e,typeof e=="function")ci(e)?(a=ia(e,a),t.tag=1,t=qd(null,t,e,a,l)):(t.tag=0,t=Fi(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===te){t.tag=11,t=zd(null,t,e,a,l);break e}else if(s===F){t.tag=14,t=Dd(null,t,e,a,l);break e}}throw t=ze(e)||e,Error(u(306,t,""))}}return t;case 0:return Fi(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=ia(a,t.pendingProps),qd(e,t,a,s,l);case 3:e:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(u(387));a=t.pendingProps;var r=t.memoizedState;s=r.element,Ei(e,t),Sn(t,a,null,l);var o=t.memoizedState;if(a=o.cache,Nl(t,Ze,a),a!==r.cache&&yi(t,[Ze],l,!0),jn(),a=o.element,r.isDehydrated)if(r={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Yd(e,t,a,l);break e}else if(a!==s){s=_t(Error(u(424)),t),xn(s),t=Yd(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(He=Bt(e.firstChild),at=t,Ne=!0,jl=null,Ot=!0,l=Lo(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Il(),a===s){t=rl(e,t,l);break e}st(e,t,a,l)}t=t.child}return t;case 26:return Gs(e,t),e===null?(l=am(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ne||(l=t.type,e=t.pendingProps,a=sr(P.current).createElement(l),a[lt]=t,a[dt]=e,rt(a,l,e),Ie(a),t.stateNode=a):t.memoizedState=am(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return J(t),e===null&&Ne&&(a=t.stateNode=em(t.type,t.pendingProps,P.current),at=t,Ot=!0,s=He,Ll(t.type)?(Bu=s,He=Bt(a.firstChild)):He=s),st(e,t,t.pendingProps.children,l),Gs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((s=a=He)&&(a=gp(a,t.type,t.pendingProps,Ot),a!==null?(t.stateNode=a,at=t,He=Bt(a.firstChild),Ot=!1,s=!0):s=!1),s||Sl(t)),J(t),s=t.type,r=t.pendingProps,o=e!==null?e.memoizedProps:null,a=r.children,_u(s,r)?a=null:o!==null&&_u(s,o)&&(t.flags|=32),t.memoizedState!==null&&(s=Ri(e,t,Dx,null,null,l),Gn._currentValue=s),Gs(e,t),st(e,t,a,l),t.child;case 6:return e===null&&Ne&&((e=l=He)&&(l=bp(l,t.pendingProps,Ot),l!==null?(t.stateNode=l,at=t,He=null,e=!0):e=!1),e||Sl(t)),null;case 13:return Gd(e,t,l);case 4:return Te(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=sa(t,null,a,l):st(e,t,a,l),t.child;case 11:return zd(e,t,t.type,t.pendingProps,l);case 7:return st(e,t,t.pendingProps,l),t.child;case 8:return st(e,t,t.pendingProps.children,l),t.child;case 12:return st(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Nl(t,t.type,a.value),st(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,ta(t),s=nt(s),a=a(s),t.flags|=1,st(e,t,a,l),t.child;case 14:return Dd(e,t,t.type,t.pendingProps,l);case 15:return Od(e,t,t.type,t.pendingProps,l);case 19:return Qd(e,t,l);case 31:return Gx(e,t,l);case 22:return Ld(e,t,l,t.pendingProps);case 24:return ta(t),a=nt(Ze),e===null?(s=ji(),s===null&&(s=Be,r=gi(),s.pooledCache=r,r.refCount++,r!==null&&(s.pooledCacheLanes|=l),s=r),t.memoizedState={parent:a,cache:s},Ni(t),Nl(t,Ze,s)):((e.lanes&l)!==0&&(Ei(e,t),Sn(t,null,null,l),jn()),s=e.memoizedState,r=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Nl(t,Ze,a)):(a=r.cache,Nl(t,Ze,a),a!==s.cache&&yi(t,[Ze],l,!0))),st(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function il(e){e.flags|=4}function su(e,t,l,a,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(gf())e.flags|=8192;else throw na=ws,Si}else e.flags&=-16777217}function Zd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!um(t))if(gf())e.flags|=8192;else throw na=ws,Si}function Qs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ec():536870912,e.lanes|=t,Xa|=t)}function Mn(e,t){if(!Ne)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Qx(e,t,l){var a=t.pendingProps;switch(mi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Ue(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),al(Ze),ae(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ca(t)?il(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xi())),Ue(t),null;case 26:var s=t.type,r=t.memoizedState;return e===null?(il(t),r!==null?(Ue(t),Zd(t,r)):(Ue(t),su(t,s,null,a,l))):r?r!==e.memoizedState?(il(t),Ue(t),Zd(t,r)):(Ue(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&il(t),Ue(t),su(t,s,e,a,l)),null;case 27:if(ee(t),l=P.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Ue(t),null}e=D.current,Ca(t)?ko(t):(e=em(s,a,l),t.stateNode=e,il(t))}return Ue(t),null;case 5:if(ee(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Ue(t),null}if(r=D.current,Ca(t))ko(t);else{var o=sr(P.current);switch(r){case 1:r=o.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:r=o.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":r=o.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":r=o.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":r=o.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?r.multiple=!0:a.size&&(r.size=a.size);break;default:r=typeof a.is=="string"?o.createElement(s,{is:a.is}):o.createElement(s)}}r[lt]=t,r[dt]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)r.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=r;e:switch(rt(r,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&il(t)}}return Ue(t),su(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&il(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(u(166));if(e=P.current,Ca(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=at,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[lt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Xf(e.nodeValue,l)),e||Sl(t,!0)}else e=sr(e).createTextNode(a),e[lt]=t,t.stateNode=e}return Ue(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ca(t),l!==null){if(e===null){if(!a)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[lt]=t}else Il(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),e=!1}else l=xi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Et(t),t):(Et(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Ue(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Ca(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(u(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(u(317));s[lt]=t}else Il(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),s=!1}else s=xi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Et(t),t):(Et(t),null)}return Et(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Qs(t,t.updateQueue),Ue(t),null);case 4:return ae(),e===null&&wu(t.stateNode.containerInfo),Ue(t),null;case 10:return al(t.type),Ue(t),null;case 19:if(L(Qe),a=t.memoizedState,a===null)return Ue(t),null;if(s=(t.flags&128)!==0,r=a.rendering,r===null)if(s)Mn(a,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Rs(e),r!==null){for(t.flags|=128,Mn(a,!1),e=r.updateQueue,t.updateQueue=e,Qs(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)bo(l,e),l=l.sibling;return I(Qe,Qe.current&1|2),Ne&&tl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&yt()>Js&&(t.flags|=128,s=!0,Mn(a,!1),t.lanes=4194304)}else{if(!s)if(e=Rs(r),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Qs(t,e),Mn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!r.alternate&&!Ne)return Ue(t),null}else 2*yt()-a.renderingStartTime>Js&&l!==536870912&&(t.flags|=128,s=!0,Mn(a,!1),t.lanes=4194304);a.isBackwards?(r.sibling=t.child,t.child=r):(e=a.last,e!==null?e.sibling=r:t.child=r,a.last=r)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=yt(),e.sibling=null,l=Qe.current,I(Qe,s?l&1|2:l&1),Ne&&tl(t,a.treeForkCount),e):(Ue(t),null);case 22:case 23:return Et(t),Mi(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),l=t.updateQueue,l!==null&&Qs(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&L(la),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),al(Ze),Ue(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Vx(e,t){switch(mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return al(Ze),ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ee(t),null;case 31:if(t.memoizedState!==null){if(Et(t),t.alternate===null)throw Error(u(340));Il()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Et(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Il()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(Qe),null;case 4:return ae(),null;case 10:return al(t.type),null;case 22:case 23:return Et(t),Mi(),e!==null&&L(la),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return al(Ze),null;case 25:return null;default:return null}}function $d(e,t){switch(mi(t),t.tag){case 3:al(Ze),ae();break;case 26:case 27:case 5:ee(t);break;case 4:ae();break;case 31:t.memoizedState!==null&&Et(t);break;case 13:Et(t);break;case 19:L(Qe);break;case 10:al(t.type);break;case 22:case 23:Et(t),Mi(),e!==null&&L(la);break;case 24:al(Ze)}}function An(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var r=l.create,o=l.inst;a=r(),o.destroy=a}l=l.next}while(l!==s)}}catch(h){_e(t,t.return,h)}}function Al(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var r=s.next;a=r;do{if((a.tag&e)===e){var o=a.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,s=t;var j=l,A=h;try{A()}catch(B){_e(s,j,B)}}}a=a.next}while(a!==r)}}catch(B){_e(t,t.return,B)}}function Kd(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Ho(t,l)}catch(a){_e(e,e.return,a)}}}function Jd(e,t,l){l.props=ia(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){_e(e,t,a)}}function Cn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){_e(e,t,s)}}function Zt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){_e(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){_e(e,t,s)}else l.current=null}function Wd(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){_e(e,e.return,s)}}function ru(e,t,l){try{var a=e.stateNode;mp(a,e.type,l,t),a[dt]=t}catch(s){_e(e,e.return,s)}}function Fd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ll(e.type)||e.tag===4}function iu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ll(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function uu(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Pt));else if(a!==4&&(a===27&&Ll(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(uu(e,t,l),e=e.sibling;e!==null;)uu(e,t,l),e=e.sibling}function Vs(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Ll(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Vs(e,t,l),e=e.sibling;e!==null;)Vs(e,t,l),e=e.sibling}function Pd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);rt(t,a,l),t[lt]=e,t[dt]=l}catch(r){_e(e,e.return,r)}}var ul=!1,Je=!1,cu=!1,Id=typeof WeakSet=="function"?WeakSet:Set,et=null;function Zx(e,t){if(e=e.containerInfo,Cu=fr,e=oo(e),li(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,r=a.focusNode;a=a.focusOffset;try{l.nodeType,r.nodeType}catch{l=null;break e}var o=0,h=-1,j=-1,A=0,B=0,V=e,C=null;t:for(;;){for(var _;V!==l||s!==0&&V.nodeType!==3||(h=o+s),V!==r||a!==0&&V.nodeType!==3||(j=o+a),V.nodeType===3&&(o+=V.nodeValue.length),(_=V.firstChild)!==null;)C=V,V=_;for(;;){if(V===e)break t;if(C===l&&++A===s&&(h=o),C===r&&++B===a&&(j=o),(_=V.nextSibling)!==null)break;V=C,C=V.parentNode}V=_}l=h===-1||j===-1?null:{start:h,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ru={focusedElem:e,selectionRange:l},fr=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){switch(t=et,r=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&r!==null){e=void 0,l=t,s=r.memoizedProps,r=r.memoizedState,a=l.stateNode;try{var re=ia(l.type,s);e=a.getSnapshotBeforeUpdate(re,r),a.__reactInternalSnapshotBeforeUpdate=e}catch(fe){_e(l,l.return,fe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Du(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Du(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}}function ef(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ol(e,l),a&4&&An(5,l);break;case 1:if(ol(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){_e(l,l.return,o)}else{var s=ia(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){_e(l,l.return,o)}}a&64&&Kd(l),a&512&&Cn(l,l.return);break;case 3:if(ol(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Ho(e,t)}catch(o){_e(l,l.return,o)}}break;case 27:t===null&&a&4&&Pd(l);case 26:case 5:ol(e,l),t===null&&a&4&&Wd(l),a&512&&Cn(l,l.return);break;case 12:ol(e,l);break;case 31:ol(e,l),a&4&&af(e,l);break;case 13:ol(e,l),a&4&&nf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=tp.bind(null,l),jp(e,l))));break;case 22:if(a=l.memoizedState!==null||ul,!a){t=t!==null&&t.memoizedState!==null||Je,s=ul;var r=Je;ul=a,(Je=t)&&!r?dl(e,l,(l.subtreeFlags&8772)!==0):ol(e,l),ul=s,Je=r}break;case 30:break;default:ol(e,l)}}function tf(e){var t=e.alternate;t!==null&&(e.alternate=null,tf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ur(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var qe=null,mt=!1;function cl(e,t,l){for(l=l.child;l!==null;)lf(e,t,l),l=l.sibling}function lf(e,t,l){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Ia,l)}catch{}switch(l.tag){case 26:Je||Zt(l,t),cl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Je||Zt(l,t);var a=qe,s=mt;Ll(l.type)&&(qe=l.stateNode,mt=!1),cl(e,t,l),Un(l.stateNode),qe=a,mt=s;break;case 5:Je||Zt(l,t);case 6:if(a=qe,s=mt,qe=null,cl(e,t,l),qe=a,mt=s,qe!==null)if(mt)try{(qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe).removeChild(l.stateNode)}catch(r){_e(l,t,r)}else try{qe.removeChild(l.stateNode)}catch(r){_e(l,t,r)}break;case 18:qe!==null&&(mt?(e=qe,Jf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Fa(e)):Jf(qe,l.stateNode));break;case 4:a=qe,s=mt,qe=l.stateNode.containerInfo,mt=!0,cl(e,t,l),qe=a,mt=s;break;case 0:case 11:case 14:case 15:Al(2,l,t),Je||Al(4,l,t),cl(e,t,l);break;case 1:Je||(Zt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Jd(l,t,a)),cl(e,t,l);break;case 21:cl(e,t,l);break;case 22:Je=(a=Je)||l.memoizedState!==null,cl(e,t,l),Je=a;break;default:cl(e,t,l)}}function af(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fa(e)}catch(l){_e(t,t.return,l)}}}function nf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fa(e)}catch(l){_e(t,t.return,l)}}function $x(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Id),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Id),t;default:throw Error(u(435,e.tag))}}function Zs(e,t){var l=$x(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=lp.bind(null,e,a);a.then(s,s)}})}function ht(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],r=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(Ll(h.type)){qe=h.stateNode,mt=!1;break e}break;case 5:qe=h.stateNode,mt=!1;break e;case 3:case 4:qe=h.stateNode.containerInfo,mt=!0;break e}h=h.return}if(qe===null)throw Error(u(160));lf(r,o,s),qe=null,mt=!1,r=s.alternate,r!==null&&(r.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)sf(t,e),t=t.sibling}var Gt=null;function sf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ht(t,e),xt(e),a&4&&(Al(3,e,e.return),An(3,e),Al(5,e,e.return));break;case 1:ht(t,e),xt(e),a&512&&(Je||l===null||Zt(l,l.return)),a&64&&ul&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=Gt;if(ht(t,e),xt(e),a&512&&(Je||l===null||Zt(l,l.return)),a&4){var r=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":r=s.getElementsByTagName("title")[0],(!r||r[ln]||r[lt]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=s.createElement(a),s.head.insertBefore(r,s.querySelector("head > title"))),rt(r,a,l),r[lt]=e,Ie(r),a=r;break e;case"link":var o=rm("link","href",s).get(a+(l.href||""));if(o){for(var h=0;h<o.length;h++)if(r=o[h],r.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&r.getAttribute("rel")===(l.rel==null?null:l.rel)&&r.getAttribute("title")===(l.title==null?null:l.title)&&r.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){o.splice(h,1);break t}}r=s.createElement(a),rt(r,a,l),s.head.appendChild(r);break;case"meta":if(o=rm("meta","content",s).get(a+(l.content||""))){for(h=0;h<o.length;h++)if(r=o[h],r.getAttribute("content")===(l.content==null?null:""+l.content)&&r.getAttribute("name")===(l.name==null?null:l.name)&&r.getAttribute("property")===(l.property==null?null:l.property)&&r.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&r.getAttribute("charset")===(l.charSet==null?null:l.charSet)){o.splice(h,1);break t}}r=s.createElement(a),rt(r,a,l),s.head.appendChild(r);break;default:throw Error(u(468,a))}r[lt]=e,Ie(r),a=r}e.stateNode=a}else im(s,e.type,e.stateNode);else e.stateNode=sm(s,a,e.memoizedProps);else r!==a?(r===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):r.count--,a===null?im(s,e.type,e.stateNode):sm(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&ru(e,e.memoizedProps,l.memoizedProps)}break;case 27:ht(t,e),xt(e),a&512&&(Je||l===null||Zt(l,l.return)),l!==null&&a&4&&ru(e,e.memoizedProps,l.memoizedProps);break;case 5:if(ht(t,e),xt(e),a&512&&(Je||l===null||Zt(l,l.return)),e.flags&32){s=e.stateNode;try{ba(s,"")}catch(re){_e(e,e.return,re)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,ru(e,s,l!==null?l.memoizedProps:s)),a&1024&&(cu=!0);break;case 6:if(ht(t,e),xt(e),a&4){if(e.stateNode===null)throw Error(u(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(re){_e(e,e.return,re)}}break;case 3:if(ur=null,s=Gt,Gt=rr(t.containerInfo),ht(t,e),Gt=s,xt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Fa(t.containerInfo)}catch(re){_e(e,e.return,re)}cu&&(cu=!1,rf(e));break;case 4:a=Gt,Gt=rr(e.stateNode.containerInfo),ht(t,e),xt(e),Gt=a;break;case 12:ht(t,e),xt(e);break;case 31:ht(t,e),xt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zs(e,a)));break;case 13:ht(t,e),xt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ks=yt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zs(e,a)));break;case 22:s=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,A=ul,B=Je;if(ul=A||s,Je=B||j,ht(t,e),Je=B,ul=A,xt(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||j||ul||Je||ua(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){j=l=t;try{if(r=j.stateNode,s)o=r.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=j.stateNode;var V=j.memoizedProps.style,C=V!=null&&V.hasOwnProperty("display")?V.display:null;h.style.display=C==null||typeof C=="boolean"?"":(""+C).trim()}}catch(re){_e(j,j.return,re)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=s?"":j.memoizedProps}catch(re){_e(j,j.return,re)}}}else if(t.tag===18){if(l===null){j=t;try{var _=j.stateNode;s?Wf(_,!0):Wf(j.stateNode,!1)}catch(re){_e(j,j.return,re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Zs(e,l))));break;case 19:ht(t,e),xt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Zs(e,a)));break;case 30:break;case 21:break;default:ht(t,e),xt(e)}}function xt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Fd(a)){l=a;break}a=a.return}if(l==null)throw Error(u(160));switch(l.tag){case 27:var s=l.stateNode,r=iu(e);Vs(e,r,s);break;case 5:var o=l.stateNode;l.flags&32&&(ba(o,""),l.flags&=-33);var h=iu(e);Vs(e,h,o);break;case 3:case 4:var j=l.stateNode.containerInfo,A=iu(e);uu(e,A,j);break;default:throw Error(u(161))}}catch(B){_e(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;rf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ef(e,t.alternate,t),t=t.sibling}function ua(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Al(4,t,t.return),ua(t);break;case 1:Zt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Jd(t,t.return,l),ua(t);break;case 27:Un(t.stateNode);case 26:case 5:Zt(t,t.return),ua(t);break;case 22:t.memoizedState===null&&ua(t);break;case 30:ua(t);break;default:ua(t)}e=e.sibling}}function dl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,r=t,o=r.flags;switch(r.tag){case 0:case 11:case 15:dl(s,r,l),An(4,r);break;case 1:if(dl(s,r,l),a=r,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(A){_e(a,a.return,A)}if(a=r,s=a.updateQueue,s!==null){var h=a.stateNode;try{var j=s.shared.hiddenCallbacks;if(j!==null)for(s.shared.hiddenCallbacks=null,s=0;s<j.length;s++)Bo(j[s],h)}catch(A){_e(a,a.return,A)}}l&&o&64&&Kd(r),Cn(r,r.return);break;case 27:Pd(r);case 26:case 5:dl(s,r,l),l&&a===null&&o&4&&Wd(r),Cn(r,r.return);break;case 12:dl(s,r,l);break;case 31:dl(s,r,l),l&&o&4&&af(s,r);break;case 13:dl(s,r,l),l&&o&4&&nf(s,r);break;case 22:r.memoizedState===null&&dl(s,r,l),Cn(r,r.return);break;case 30:break;default:dl(s,r,l)}t=t.sibling}}function ou(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&pn(l))}function du(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pn(e))}function Xt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)uf(e,t,l,a),t=t.sibling}function uf(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Xt(e,t,l,a),s&2048&&An(9,t);break;case 1:Xt(e,t,l,a);break;case 3:Xt(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&pn(e)));break;case 12:if(s&2048){Xt(e,t,l,a),e=t.stateNode;try{var r=t.memoizedProps,o=r.id,h=r.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){_e(t,t.return,j)}}else Xt(e,t,l,a);break;case 31:Xt(e,t,l,a);break;case 13:Xt(e,t,l,a);break;case 23:break;case 22:r=t.stateNode,o=t.alternate,t.memoizedState!==null?r._visibility&2?Xt(e,t,l,a):Rn(e,t):r._visibility&2?Xt(e,t,l,a):(r._visibility|=2,qa(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&ou(o,t);break;case 24:Xt(e,t,l,a),s&2048&&du(t.alternate,t);break;default:Xt(e,t,l,a)}}function qa(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,o=t,h=l,j=a,A=o.flags;switch(o.tag){case 0:case 11:case 15:qa(r,o,h,j,s),An(8,o);break;case 23:break;case 22:var B=o.stateNode;o.memoizedState!==null?B._visibility&2?qa(r,o,h,j,s):Rn(r,o):(B._visibility|=2,qa(r,o,h,j,s)),s&&A&2048&&ou(o.alternate,o);break;case 24:qa(r,o,h,j,s),s&&A&2048&&du(o.alternate,o);break;default:qa(r,o,h,j,s)}t=t.sibling}}function Rn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:Rn(l,a),s&2048&&ou(a.alternate,a);break;case 24:Rn(l,a),s&2048&&du(a.alternate,a);break;default:Rn(l,a)}t=t.sibling}}var _n=8192;function Ya(e,t,l){if(e.subtreeFlags&_n)for(e=e.child;e!==null;)cf(e,t,l),e=e.sibling}function cf(e,t,l){switch(e.tag){case 26:Ya(e,t,l),e.flags&_n&&e.memoizedState!==null&&zp(l,Gt,e.memoizedState,e.memoizedProps);break;case 5:Ya(e,t,l);break;case 3:case 4:var a=Gt;Gt=rr(e.stateNode.containerInfo),Ya(e,t,l),Gt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=_n,_n=16777216,Ya(e,t,l),_n=a):Ya(e,t,l));break;default:Ya(e,t,l)}}function of(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function zn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];et=a,ff(a,e)}of(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)df(e),e=e.sibling}function df(e){switch(e.tag){case 0:case 11:case 15:zn(e),e.flags&2048&&Al(9,e,e.return);break;case 3:zn(e);break;case 12:zn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,$s(e)):zn(e);break;default:zn(e)}}function $s(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];et=a,ff(a,e)}of(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Al(8,t,t.return),$s(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,$s(t));break;default:$s(t)}e=e.sibling}}function ff(e,t){for(;et!==null;){var l=et;switch(l.tag){case 0:case 11:case 15:Al(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:pn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,et=a;else e:for(l=e;et!==null;){a=et;var s=a.sibling,r=a.return;if(tf(a),a===l){et=null;break e}if(s!==null){s.return=r,et=s;break e}et=r}}}var Kx={getCacheForType:function(e){var t=nt(Ze),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return nt(Ze).controller.signal}},Jx=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Be=null,ge=null,je=0,Re=0,kt=null,Cl=!1,Ga=!1,fu=!1,fl=0,Xe=0,Rl=0,ca=0,mu=0,Tt=0,Xa=0,Dn=null,pt=null,hu=!1,Ks=0,mf=0,Js=1/0,Ws=null,_l=null,Fe=0,zl=null,Qa=null,ml=0,xu=0,pu=null,hf=null,On=0,vu=null;function wt(){return(Ae&2)!==0&&je!==0?je&-je:k.T!==null?Nu():Mc()}function xf(){if(Tt===0)if((je&536870912)===0||Ne){var e=ns;ns<<=1,(ns&3932160)===0&&(ns=262144),Tt=e}else Tt=536870912;return e=Nt.current,e!==null&&(e.flags|=32),Tt}function vt(e,t,l){(e===Be&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(Va(e,0),Dl(e,je,Tt,!1)),tn(e,l),((Ae&2)===0||e!==Be)&&(e===Be&&((Ae&2)===0&&(ca|=l),Xe===4&&Dl(e,je,Tt,!1)),$t(e))}function pf(e,t,l){if((Ae&6)!==0)throw Error(u(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||en(e,t),s=a?Px(e,t):gu(e,t,!0),r=a;do{if(s===0){Ga&&!a&&Dl(e,t,0,!1);break}else{if(l=e.current.alternate,r&&!Wx(l)){s=gu(e,t,!1),r=!1;continue}if(s===2){if(r=t,e.errorRecoveryDisabledLanes&r)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;s=Dn;var j=h.current.memoizedState.isDehydrated;if(j&&(Va(h,o).flags|=256),o=gu(h,o,!1),o!==2){if(fu&&!j){h.errorRecoveryDisabledLanes|=r,ca|=r,s=4;break e}r=pt,pt=s,r!==null&&(pt===null?pt=r:pt.push.apply(pt,r))}s=o}if(r=!1,s!==2)continue}}if(s===1){Va(e,0),Dl(e,t,0,!0);break}e:{switch(a=e,r=s,r){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Dl(a,t,Tt,!Cl);break e;case 2:pt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(s=Ks+300-yt(),10<s)){if(Dl(a,t,Tt,!Cl),rs(a,0,!0)!==0)break e;ml=t,a.timeoutHandle=$f(vf.bind(null,a,l,pt,Ws,hu,t,Tt,ca,Xa,Cl,r,"Throttled",-0,0),s);break e}vf(a,l,pt,Ws,hu,t,Tt,ca,Xa,Cl,r,null,-0,0)}}break}while(!0);$t(e)}function vf(e,t,l,a,s,r,o,h,j,A,B,V,C,_){if(e.timeoutHandle=-1,V=t.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pt},cf(t,r,V);var re=(r&62914560)===r?Ks-yt():(r&4194048)===r?mf-yt():0;if(re=Dp(V,re),re!==null){ml=r,e.cancelPendingCommit=re(kf.bind(null,e,t,r,l,a,s,o,h,j,B,V,null,C,_)),Dl(e,r,o,!A);return}}kf(e,t,r,l,a,s,o,h,j)}function Wx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],r=s.getSnapshot;s=s.value;try{if(!jt(r(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Dl(e,t,l,a){t&=~mu,t&=~ca,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var r=31-bt(s),o=1<<r;a[r]=-1,s&=~o}l!==0&&kc(e,l,t)}function Fs(){return(Ae&6)===0?(Ln(0),!1):!0}function yu(){if(ge!==null){if(Re===0)var e=ge.return;else e=ge,ll=ea=null,Di(e),Oa=null,yn=0,e=ge;for(;e!==null;)$d(e.alternate,e),e=e.return;ge=null}}function Va(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,pp(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ml=0,yu(),Be=e,ge=l=el(e.current,null),je=t,Re=0,kt=null,Cl=!1,Ga=en(e,t),fu=!1,Xa=Tt=mu=ca=Rl=Xe=0,pt=Dn=null,hu=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-bt(a),r=1<<s;t|=e[s],a&=~r}return fl=t,ys(),l}function yf(e,t){xe=null,k.H=Tn,t===Da||t===Ts?(t=zo(),Re=3):t===Si?(t=zo(),Re=4):Re=t===Wi?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,kt=t,ge===null&&(Xe=1,qs(e,_t(t,e.current)))}function gf(){var e=Nt.current;return e===null?!0:(je&4194048)===je?Lt===null:(je&62914560)===je||(je&536870912)!==0?e===Lt:!1}function bf(){var e=k.H;return k.H=Tn,e===null?Tn:e}function jf(){var e=k.A;return k.A=Kx,e}function Ps(){Xe=4,Cl||(je&4194048)!==je&&Nt.current!==null||(Ga=!0),(Rl&134217727)===0&&(ca&134217727)===0||Be===null||Dl(Be,je,Tt,!1)}function gu(e,t,l){var a=Ae;Ae|=2;var s=bf(),r=jf();(Be!==e||je!==t)&&(Ws=null,Va(e,t)),t=!1;var o=Xe;e:do try{if(Re!==0&&ge!==null){var h=ge,j=kt;switch(Re){case 8:yu(),o=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var A=Re;if(Re=0,kt=null,Za(e,h,j,A),l&&Ga){o=0;break e}break;default:A=Re,Re=0,kt=null,Za(e,h,j,A)}}Fx(),o=Xe;break}catch(B){yf(e,B)}while(!0);return t&&e.shellSuspendCounter++,ll=ea=null,Ae=a,k.H=s,k.A=r,ge===null&&(Be=null,je=0,ys()),o}function Fx(){for(;ge!==null;)Sf(ge)}function Px(e,t){var l=Ae;Ae|=2;var a=bf(),s=jf();Be!==e||je!==t?(Ws=null,Js=yt()+500,Va(e,t)):Ga=en(e,t);e:do try{if(Re!==0&&ge!==null){t=ge;var r=kt;t:switch(Re){case 1:Re=0,kt=null,Za(e,t,r,1);break;case 2:case 9:if(Ro(r)){Re=0,kt=null,Nf(t);break}t=function(){Re!==2&&Re!==9||Be!==e||(Re=7),$t(e)},r.then(t,t);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:Ro(r)?(Re=0,kt=null,Nf(t)):(Re=0,kt=null,Za(e,t,r,7));break;case 5:var o=null;switch(ge.tag){case 26:o=ge.memoizedState;case 5:case 27:var h=ge;if(o?um(o):h.stateNode.complete){Re=0,kt=null;var j=h.sibling;if(j!==null)ge=j;else{var A=h.return;A!==null?(ge=A,Is(A)):ge=null}break t}}Re=0,kt=null,Za(e,t,r,5);break;case 6:Re=0,kt=null,Za(e,t,r,6);break;case 8:yu(),Xe=6;break e;default:throw Error(u(462))}}Ix();break}catch(B){yf(e,B)}while(!0);return ll=ea=null,k.H=a,k.A=s,Ae=l,ge!==null?0:(Be=null,je=0,ys(),Xe)}function Ix(){for(;ge!==null&&!Sh();)Sf(ge)}function Sf(e){var t=Vd(e.alternate,e,fl);e.memoizedProps=e.pendingProps,t===null?Is(e):ge=t}function Nf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Ud(l,t,t.pendingProps,t.type,void 0,je);break;case 11:t=Ud(l,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:Di(t);default:$d(l,t),t=ge=bo(t,fl),t=Vd(l,t,fl)}e.memoizedProps=e.pendingProps,t===null?Is(e):ge=t}function Za(e,t,l,a){ll=ea=null,Di(t),Oa=null,yn=0;var s=t.return;try{if(Yx(e,s,t,l,je)){Xe=1,qs(e,_t(l,e.current)),ge=null;return}}catch(r){if(s!==null)throw ge=s,r;Xe=1,qs(e,_t(l,e.current)),ge=null;return}t.flags&32768?(Ne||a===1?e=!0:Ga||(je&536870912)!==0?e=!1:(Cl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Nt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Ef(t,e)):Is(t)}function Is(e){var t=e;do{if((t.flags&32768)!==0){Ef(t,Cl);return}e=t.return;var l=Qx(t.alternate,t,fl);if(l!==null){ge=l;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);Xe===0&&(Xe=5)}function Ef(e,t){do{var l=Vx(e.alternate,e);if(l!==null){l.flags&=32767,ge=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=l}while(e!==null);Xe=6,ge=null}function kf(e,t,l,a,s,r,o,h,j){e.cancelPendingCommit=null;do er();while(Fe!==0);if((Ae&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(r=t.lanes|t.childLanes,r|=ii,_h(e,l,r,o,h,j),e===Be&&(ge=Be=null,je=0),Qa=t,zl=e,ml=l,xu=r,pu=s,hf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ap(ls,function(){return Cf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null,s=R.p,R.p=2,o=Ae,Ae|=4;try{Zx(e,t,l)}finally{Ae=o,R.p=s,k.T=a}}Fe=1,Tf(),wf(),Mf()}}function Tf(){if(Fe===1){Fe=0;var e=zl,t=Qa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var a=R.p;R.p=2;var s=Ae;Ae|=4;try{sf(t,e);var r=Ru,o=oo(e.containerInfo),h=r.focusedElem,j=r.selectionRange;if(o!==h&&h&&h.ownerDocument&&co(h.ownerDocument.documentElement,h)){if(j!==null&&li(h)){var A=j.start,B=j.end;if(B===void 0&&(B=A),"selectionStart"in h)h.selectionStart=A,h.selectionEnd=Math.min(B,h.value.length);else{var V=h.ownerDocument||document,C=V&&V.defaultView||window;if(C.getSelection){var _=C.getSelection(),re=h.textContent.length,fe=Math.min(j.start,re),Le=j.end===void 0?fe:Math.min(j.end,re);!_.extend&&fe>Le&&(o=Le,Le=fe,fe=o);var T=uo(h,fe),E=uo(h,Le);if(T&&E&&(_.rangeCount!==1||_.anchorNode!==T.node||_.anchorOffset!==T.offset||_.focusNode!==E.node||_.focusOffset!==E.offset)){var M=V.createRange();M.setStart(T.node,T.offset),_.removeAllRanges(),fe>Le?(_.addRange(M),_.extend(E.node,E.offset)):(M.setEnd(E.node,E.offset),_.addRange(M))}}}}for(V=[],_=h;_=_.parentNode;)_.nodeType===1&&V.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<V.length;h++){var G=V[h];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}fr=!!Cu,Ru=Cu=null}finally{Ae=s,R.p=a,k.T=l}}e.current=t,Fe=2}}function wf(){if(Fe===2){Fe=0;var e=zl,t=Qa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var a=R.p;R.p=2;var s=Ae;Ae|=4;try{ef(e,t.alternate,t)}finally{Ae=s,R.p=a,k.T=l}}Fe=3}}function Mf(){if(Fe===4||Fe===3){Fe=0,Nh();var e=zl,t=Qa,l=ml,a=hf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Fe=5:(Fe=0,Qa=zl=null,Af(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(_l=null),Br(l),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Ia,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=k.T,s=R.p,R.p=2,k.T=null;try{for(var r=e.onRecoverableError,o=0;o<a.length;o++){var h=a[o];r(h.value,{componentStack:h.stack})}}finally{k.T=t,R.p=s}}(ml&3)!==0&&er(),$t(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===vu?On++:(On=0,vu=e):On=0,Ln(0)}}function Af(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,pn(t)))}function er(){return Tf(),wf(),Mf(),Cf()}function Cf(){if(Fe!==5)return!1;var e=zl,t=xu;xu=0;var l=Br(ml),a=k.T,s=R.p;try{R.p=32>l?32:l,k.T=null,l=pu,pu=null;var r=zl,o=ml;if(Fe=0,Qa=zl=null,ml=0,(Ae&6)!==0)throw Error(u(331));var h=Ae;if(Ae|=4,df(r.current),uf(r,r.current,o,l),Ae=h,Ln(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Ia,r)}catch{}return!0}finally{R.p=s,k.T=a,Af(e,t)}}function Rf(e,t,l){t=_t(l,t),t=Ji(e.stateNode,t,2),e=Tl(e,t,2),e!==null&&(tn(e,2),$t(e))}function _e(e,t,l){if(e.tag===3)Rf(e,e,l);else for(;t!==null;){if(t.tag===3){Rf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(_l===null||!_l.has(a))){e=_t(l,e),l=Rd(2),a=Tl(t,l,2),a!==null&&(_d(l,a,t,e),tn(a,2),$t(a));break}}t=t.return}}function bu(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Jx;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(fu=!0,s.add(l),e=ep.bind(null,e,t,l),t.then(e,e))}function ep(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Be===e&&(je&l)===l&&(Xe===4||Xe===3&&(je&62914560)===je&&300>yt()-Ks?(Ae&2)===0&&Va(e,0):mu|=l,Xa===je&&(Xa=0)),$t(e)}function _f(e,t){t===0&&(t=Ec()),e=Fl(e,t),e!==null&&(tn(e,t),$t(e))}function tp(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),_f(e,l)}function lp(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(u(314))}a!==null&&a.delete(t),_f(e,l)}function ap(e,t){return zr(e,t)}var tr=null,$a=null,ju=!1,lr=!1,Su=!1,Ol=0;function $t(e){e!==$a&&e.next===null&&($a===null?tr=$a=e:$a=$a.next=e),lr=!0,ju||(ju=!0,sp())}function Ln(e,t){if(!Su&&lr){Su=!0;do for(var l=!1,a=tr;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var r=0;else{var o=a.suspendedLanes,h=a.pingedLanes;r=(1<<31-bt(42|e)+1)-1,r&=s&~(o&~h),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(l=!0,Lf(a,r))}else r=je,r=rs(a,a===Be?r:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(r&3)===0||en(a,r)||(l=!0,Lf(a,r));a=a.next}while(l);Su=!1}}function np(){zf()}function zf(){lr=ju=!1;var e=0;Ol!==0&&xp()&&(e=Ol);for(var t=yt(),l=null,a=tr;a!==null;){var s=a.next,r=Df(a,t);r===0?(a.next=null,l===null?tr=s:l.next=s,s===null&&($a=l)):(l=a,(e!==0||(r&3)!==0)&&(lr=!0)),a=s}Fe!==0&&Fe!==5||Ln(e),Ol!==0&&(Ol=0)}function Df(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var o=31-bt(r),h=1<<o,j=s[o];j===-1?((h&l)===0||(h&a)!==0)&&(s[o]=Rh(h,t)):j<=t&&(e.expiredLanes|=h),r&=~h}if(t=Be,l=je,l=rs(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Dr(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||en(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Dr(a),Br(l)){case 2:case 8:l=Sc;break;case 32:l=ls;break;case 268435456:l=Nc;break;default:l=ls}return a=Of.bind(null,e),l=zr(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Dr(a),e.callbackPriority=2,e.callbackNode=null,2}function Of(e,t){if(Fe!==0&&Fe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(er()&&e.callbackNode!==l)return null;var a=je;return a=rs(e,e===Be?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(pf(e,a,t),Df(e,yt()),e.callbackNode!=null&&e.callbackNode===l?Of.bind(null,e):null)}function Lf(e,t){if(er())return null;pf(e,t,!0)}function sp(){vp(function(){(Ae&6)!==0?zr(jc,np):zf()})}function Nu(){if(Ol===0){var e=_a;e===0&&(e=as,as<<=1,(as&261888)===0&&(as=256)),Ol=e}return Ol}function Bf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:os(""+e)}function Hf(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function rp(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var r=Bf((s[dt]||null).action),o=a.submitter;o&&(t=(t=o[dt]||null)?Bf(t.formAction):o.getAttribute("formAction"),t!==null&&(r=t,o=null));var h=new hs("action","action",null,a,s);e.push({event:h,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ol!==0){var j=o?Hf(s,o):new FormData(s);Xi(l,{pending:!0,data:j,method:s.method,action:r},null,j)}}else typeof r=="function"&&(h.preventDefault(),j=o?Hf(s,o):new FormData(s),Xi(l,{pending:!0,data:j,method:s.method,action:r},r,j))},currentTarget:s}]})}}for(var Eu=0;Eu<ri.length;Eu++){var ku=ri[Eu],ip=ku.toLowerCase(),up=ku[0].toUpperCase()+ku.slice(1);Yt(ip,"on"+up)}Yt(ho,"onAnimationEnd"),Yt(xo,"onAnimationIteration"),Yt(po,"onAnimationStart"),Yt("dblclick","onDoubleClick"),Yt("focusin","onFocus"),Yt("focusout","onBlur"),Yt(Ex,"onTransitionRun"),Yt(kx,"onTransitionStart"),Yt(Tx,"onTransitionCancel"),Yt(vo,"onTransitionEnd"),ya("onMouseEnter",["mouseout","mouseover"]),ya("onMouseLeave",["mouseout","mouseover"]),ya("onPointerEnter",["pointerout","pointerover"]),ya("onPointerLeave",["pointerout","pointerover"]),$l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$l("onBeforeInput",["compositionend","keypress","textInput","paste"]),$l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Bn="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(" "),cp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Bn));function Uf(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var r=void 0;if(t)for(var o=a.length-1;0<=o;o--){var h=a[o],j=h.instance,A=h.currentTarget;if(h=h.listener,j!==r&&s.isPropagationStopped())break e;r=h,s.currentTarget=A;try{r(s)}catch(B){vs(B)}s.currentTarget=null,r=j}else for(o=0;o<a.length;o++){if(h=a[o],j=h.instance,A=h.currentTarget,h=h.listener,j!==r&&s.isPropagationStopped())break e;r=h,s.currentTarget=A;try{r(s)}catch(B){vs(B)}s.currentTarget=null,r=j}}}}function be(e,t){var l=t[Hr];l===void 0&&(l=t[Hr]=new Set);var a=e+"__bubble";l.has(a)||(qf(t,e,2,!1),l.add(a))}function Tu(e,t,l){var a=0;t&&(a|=4),qf(l,e,a,t)}var ar="_reactListening"+Math.random().toString(36).slice(2);function wu(e){if(!e[ar]){e[ar]=!0,Rc.forEach(function(l){l!=="selectionchange"&&(cp.has(l)||Tu(l,!1,e),Tu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ar]||(t[ar]=!0,Tu("selectionchange",!1,t))}}function qf(e,t,l,a){switch(xm(t)){case 2:var s=Bp;break;case 8:s=Hp;break;default:s=Gu}l=s.bind(null,t,l,e),s=void 0,!$r||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function Mu(e,t,l,a,s){var r=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var h=a.stateNode.containerInfo;if(h===s)break;if(o===4)for(o=a.return;o!==null;){var j=o.tag;if((j===3||j===4)&&o.stateNode.containerInfo===s)return;o=o.return}for(;h!==null;){if(o=xa(h),o===null)return;if(j=o.tag,j===5||j===6||j===26||j===27){a=r=o;continue e}h=h.parentNode}}a=a.return}Xc(function(){var A=r,B=Vr(l),V=[];e:{var C=yo.get(e);if(C!==void 0){var _=hs,re=e;switch(e){case"keypress":if(fs(l)===0)break e;case"keydown":case"keyup":_=lx;break;case"focusin":re="focus",_=Fr;break;case"focusout":re="blur",_=Fr;break;case"beforeblur":case"afterblur":_=Fr;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=Zc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=Qh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=sx;break;case ho:case xo:case po:_=$h;break;case vo:_=ix;break;case"scroll":case"scrollend":_=Gh;break;case"wheel":_=cx;break;case"copy":case"cut":case"paste":_=Jh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=Kc;break;case"toggle":case"beforetoggle":_=dx}var fe=(t&4)!==0,Le=!fe&&(e==="scroll"||e==="scrollend"),T=fe?C!==null?C+"Capture":null:C;fe=[];for(var E=A,M;E!==null;){var G=E;if(M=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||M===null||T===null||(G=nn(E,T),G!=null&&fe.push(Hn(E,G,M))),Le)break;E=E.return}0<fe.length&&(C=new _(C,re,null,l,B),V.push({event:C,listeners:fe}))}}if((t&7)===0){e:{if(C=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",C&&l!==Qr&&(re=l.relatedTarget||l.fromElement)&&(xa(re)||re[ha]))break e;if((_||C)&&(C=B.window===B?B:(C=B.ownerDocument)?C.defaultView||C.parentWindow:window,_?(re=l.relatedTarget||l.toElement,_=A,re=re?xa(re):null,re!==null&&(Le=m(re),fe=re.tag,re!==Le||fe!==5&&fe!==27&&fe!==6)&&(re=null)):(_=null,re=A),_!==re)){if(fe=Zc,G="onMouseLeave",T="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(fe=Kc,G="onPointerLeave",T="onPointerEnter",E="pointer"),Le=_==null?C:an(_),M=re==null?C:an(re),C=new fe(G,E+"leave",_,l,B),C.target=Le,C.relatedTarget=M,G=null,xa(B)===A&&(fe=new fe(T,E+"enter",re,l,B),fe.target=M,fe.relatedTarget=Le,G=fe),Le=G,_&&re)t:{for(fe=op,T=_,E=re,M=0,G=T;G;G=fe(G))M++;G=0;for(var de=E;de;de=fe(de))G++;for(;0<M-G;)T=fe(T),M--;for(;0<G-M;)E=fe(E),G--;for(;M--;){if(T===E||E!==null&&T===E.alternate){fe=T;break t}T=fe(T),E=fe(E)}fe=null}else fe=null;_!==null&&Yf(V,C,_,fe,!1),re!==null&&Le!==null&&Yf(V,Le,re,fe,!0)}}e:{if(C=A?an(A):window,_=C.nodeName&&C.nodeName.toLowerCase(),_==="select"||_==="input"&&C.type==="file")var we=lo;else if(eo(C))if(ao)we=jx;else{we=gx;var ce=yx}else _=C.nodeName,!_||_.toLowerCase()!=="input"||C.type!=="checkbox"&&C.type!=="radio"?A&&Xr(A.elementType)&&(we=lo):we=bx;if(we&&(we=we(e,A))){to(V,we,l,B);break e}ce&&ce(e,C,A),e==="focusout"&&A&&C.type==="number"&&A.memoizedProps.value!=null&&Gr(C,"number",C.value)}switch(ce=A?an(A):window,e){case"focusin":(eo(ce)||ce.contentEditable==="true")&&(Ea=ce,ai=A,mn=null);break;case"focusout":mn=ai=Ea=null;break;case"mousedown":ni=!0;break;case"contextmenu":case"mouseup":case"dragend":ni=!1,fo(V,l,B);break;case"selectionchange":if(Nx)break;case"keydown":case"keyup":fo(V,l,B)}var ye;if(Ir)e:{switch(e){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Na?Pc(e,l)&&(Se="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Se="onCompositionStart");Se&&(Jc&&l.locale!=="ko"&&(Na||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Na&&(ye=Qc()):(gl=B,Kr="value"in gl?gl.value:gl.textContent,Na=!0)),ce=nr(A,Se),0<ce.length&&(Se=new $c(Se,e,null,l,B),V.push({event:Se,listeners:ce}),ye?Se.data=ye:(ye=Ic(l),ye!==null&&(Se.data=ye)))),(ye=mx?hx(e,l):xx(e,l))&&(Se=nr(A,"onBeforeInput"),0<Se.length&&(ce=new $c("onBeforeInput","beforeinput",null,l,B),V.push({event:ce,listeners:Se}),ce.data=ye)),rp(V,e,A,l,B)}Uf(V,t)})}function Hn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function nr(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,r=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||r===null||(s=nn(e,l),s!=null&&a.unshift(Hn(e,s,r)),s=nn(e,t),s!=null&&a.push(Hn(e,s,r))),e.tag===3)return a;e=e.return}return[]}function op(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yf(e,t,l,a,s){for(var r=t._reactName,o=[];l!==null&&l!==a;){var h=l,j=h.alternate,A=h.stateNode;if(h=h.tag,j!==null&&j===a)break;h!==5&&h!==26&&h!==27||A===null||(j=A,s?(A=nn(l,r),A!=null&&o.unshift(Hn(l,A,j))):s||(A=nn(l,r),A!=null&&o.push(Hn(l,A,j)))),l=l.return}o.length!==0&&e.push({event:t,listeners:o})}var dp=/\r\n?/g,fp=/\u0000|\uFFFD/g;function Gf(e){return(typeof e=="string"?e:""+e).replace(dp,`
|
|
49
|
+
`).replace(fp,"")}function Xf(e,t){return t=Gf(t),Gf(e)===t}function Oe(e,t,l,a,s,r){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ba(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ba(e,""+a);break;case"className":us(e,"class",a);break;case"tabIndex":us(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":us(e,l,a);break;case"style":Yc(e,a,r);break;case"data":if(t!=="object"){us(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=os(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof r=="function"&&(l==="formAction"?(t!=="input"&&Oe(e,t,"name",s.name,s,null),Oe(e,t,"formEncType",s.formEncType,s,null),Oe(e,t,"formMethod",s.formMethod,s,null),Oe(e,t,"formTarget",s.formTarget,s,null)):(Oe(e,t,"encType",s.encType,s,null),Oe(e,t,"method",s.method,s,null),Oe(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=os(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Pt);break;case"onScroll":a!=null&&be("scroll",e);break;case"onScrollEnd":a!=null&&be("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=os(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":be("beforetoggle",e),be("toggle",e),is(e,"popover",a);break;case"xlinkActuate":Ft(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Ft(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Ft(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Ft(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Ft(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Ft(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Ft(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":is(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=qh.get(l)||l,is(e,l,a))}}function Au(e,t,l,a,s,r){switch(l){case"style":Yc(e,a,r);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ba(e,a):(typeof a=="number"||typeof a=="bigint")&&ba(e,""+a);break;case"onScroll":a!=null&&be("scroll",e);break;case"onScrollEnd":a!=null&&be("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Pt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_c.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),r=e[dt]||null,r=r!=null?r[l]:null,typeof r=="function"&&e.removeEventListener(t,r,s),typeof a=="function")){typeof r!="function"&&r!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):is(e,l,a)}}}function rt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",e),be("load",e);var a=!1,s=!1,r;for(r in l)if(l.hasOwnProperty(r)){var o=l[r];if(o!=null)switch(r){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Oe(e,t,r,o,l,null)}}s&&Oe(e,t,"srcSet",l.srcSet,l,null),a&&Oe(e,t,"src",l.src,l,null);return;case"input":be("invalid",e);var h=r=o=s=null,j=null,A=null;for(a in l)if(l.hasOwnProperty(a)){var B=l[a];if(B!=null)switch(a){case"name":s=B;break;case"type":o=B;break;case"checked":j=B;break;case"defaultChecked":A=B;break;case"value":r=B;break;case"defaultValue":h=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(u(137,t));break;default:Oe(e,t,a,B,l,null)}}Bc(e,r,h,j,A,o,s,!1);return;case"select":be("invalid",e),a=o=r=null;for(s in l)if(l.hasOwnProperty(s)&&(h=l[s],h!=null))switch(s){case"value":r=h;break;case"defaultValue":o=h;break;case"multiple":a=h;default:Oe(e,t,s,h,l,null)}t=r,l=o,e.multiple=!!a,t!=null?ga(e,!!a,t,!1):l!=null&&ga(e,!!a,l,!0);return;case"textarea":be("invalid",e),r=s=a=null;for(o in l)if(l.hasOwnProperty(o)&&(h=l[o],h!=null))switch(o){case"value":a=h;break;case"defaultValue":s=h;break;case"children":r=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(u(91));break;default:Oe(e,t,o,h,l,null)}Uc(e,a,s,r);return;case"option":for(j in l)if(l.hasOwnProperty(j)&&(a=l[j],a!=null))switch(j){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Oe(e,t,j,a,l,null)}return;case"dialog":be("beforetoggle",e),be("toggle",e),be("cancel",e),be("close",e);break;case"iframe":case"object":be("load",e);break;case"video":case"audio":for(a=0;a<Bn.length;a++)be(Bn[a],e);break;case"image":be("error",e),be("load",e);break;case"details":be("toggle",e);break;case"embed":case"source":case"link":be("error",e),be("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in l)if(l.hasOwnProperty(A)&&(a=l[A],a!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Oe(e,t,A,a,l,null)}return;default:if(Xr(t)){for(B in l)l.hasOwnProperty(B)&&(a=l[B],a!==void 0&&Au(e,t,B,a,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(a=l[h],a!=null&&Oe(e,t,h,a,l,null))}function mp(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,r=null,o=null,h=null,j=null,A=null,B=null;for(_ in l){var V=l[_];if(l.hasOwnProperty(_)&&V!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":j=V;default:a.hasOwnProperty(_)||Oe(e,t,_,null,a,V)}}for(var C in a){var _=a[C];if(V=l[C],a.hasOwnProperty(C)&&(_!=null||V!=null))switch(C){case"type":r=_;break;case"name":s=_;break;case"checked":A=_;break;case"defaultChecked":B=_;break;case"value":o=_;break;case"defaultValue":h=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(u(137,t));break;default:_!==V&&Oe(e,t,C,_,a,V)}}Yr(e,o,h,j,A,B,r,s);return;case"select":_=o=h=C=null;for(r in l)if(j=l[r],l.hasOwnProperty(r)&&j!=null)switch(r){case"value":break;case"multiple":_=j;default:a.hasOwnProperty(r)||Oe(e,t,r,null,a,j)}for(s in a)if(r=a[s],j=l[s],a.hasOwnProperty(s)&&(r!=null||j!=null))switch(s){case"value":C=r;break;case"defaultValue":h=r;break;case"multiple":o=r;default:r!==j&&Oe(e,t,s,r,a,j)}t=h,l=o,a=_,C!=null?ga(e,!!l,C,!1):!!a!=!!l&&(t!=null?ga(e,!!l,t,!0):ga(e,!!l,l?[]:"",!1));return;case"textarea":_=C=null;for(h in l)if(s=l[h],l.hasOwnProperty(h)&&s!=null&&!a.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Oe(e,t,h,null,a,s)}for(o in a)if(s=a[o],r=l[o],a.hasOwnProperty(o)&&(s!=null||r!=null))switch(o){case"value":C=s;break;case"defaultValue":_=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(u(91));break;default:s!==r&&Oe(e,t,o,s,a,r)}Hc(e,C,_);return;case"option":for(var re in l)if(C=l[re],l.hasOwnProperty(re)&&C!=null&&!a.hasOwnProperty(re))switch(re){case"selected":e.selected=!1;break;default:Oe(e,t,re,null,a,C)}for(j in a)if(C=a[j],_=l[j],a.hasOwnProperty(j)&&C!==_&&(C!=null||_!=null))switch(j){case"selected":e.selected=C&&typeof C!="function"&&typeof C!="symbol";break;default:Oe(e,t,j,C,a,_)}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 fe in l)C=l[fe],l.hasOwnProperty(fe)&&C!=null&&!a.hasOwnProperty(fe)&&Oe(e,t,fe,null,a,C);for(A in a)if(C=a[A],_=l[A],a.hasOwnProperty(A)&&C!==_&&(C!=null||_!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(u(137,t));break;default:Oe(e,t,A,C,a,_)}return;default:if(Xr(t)){for(var Le in l)C=l[Le],l.hasOwnProperty(Le)&&C!==void 0&&!a.hasOwnProperty(Le)&&Au(e,t,Le,void 0,a,C);for(B in a)C=a[B],_=l[B],!a.hasOwnProperty(B)||C===_||C===void 0&&_===void 0||Au(e,t,B,C,a,_);return}}for(var T in l)C=l[T],l.hasOwnProperty(T)&&C!=null&&!a.hasOwnProperty(T)&&Oe(e,t,T,null,a,C);for(V in a)C=a[V],_=l[V],!a.hasOwnProperty(V)||C===_||C==null&&_==null||Oe(e,t,V,C,a,_)}function Qf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hp(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],r=s.transferSize,o=s.initiatorType,h=s.duration;if(r&&h&&Qf(o)){for(o=0,h=s.responseEnd,a+=1;a<l.length;a++){var j=l[a],A=j.startTime;if(A>h)break;var B=j.transferSize,V=j.initiatorType;B&&Qf(V)&&(j=j.responseEnd,o+=B*(j<h?1:(h-A)/(j-A)))}if(--a,t+=8*(r+o)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Cu=null,Ru=null;function sr(e){return e.nodeType===9?e:e.ownerDocument}function Vf(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zf(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function _u(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var zu=null;function xp(){var e=window.event;return e&&e.type==="popstate"?e===zu?!1:(zu=e,!0):(zu=null,!1)}var $f=typeof setTimeout=="function"?setTimeout:void 0,pp=typeof clearTimeout=="function"?clearTimeout:void 0,Kf=typeof Promise=="function"?Promise:void 0,vp=typeof queueMicrotask=="function"?queueMicrotask:typeof Kf<"u"?function(e){return Kf.resolve(null).then(e).catch(yp)}:$f;function yp(e){setTimeout(function(){throw e})}function Ll(e){return e==="head"}function Jf(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),Fa(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Un(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Un(l);for(var r=l.firstChild;r;){var o=r.nextSibling,h=r.nodeName;r[ln]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&r.rel.toLowerCase()==="stylesheet"||l.removeChild(r),r=o}}else l==="body"&&Un(e.ownerDocument.body);l=s}while(l);Fa(t)}function Wf(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Du(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Du(l),Ur(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function gp(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[ln])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=Bt(e.nextSibling),e===null)break}return null}function bp(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Bt(e.nextSibling),e===null))return null;return e}function Ff(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Bt(e.nextSibling),e===null))return null;return e}function Ou(e){return e.data==="$?"||e.data==="$~"}function Lu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function jp(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Bt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Bu=null;function Pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Bt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function If(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function em(e,t,l){switch(t=sr(l),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Un(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ur(e)}var Ht=new Map,tm=new Set;function rr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var hl=R.d;R.d={f:Sp,r:Np,D:Ep,C:kp,L:Tp,m:wp,X:Ap,S:Mp,M:Cp};function Sp(){var e=hl.f(),t=Fs();return e||t}function Np(e){var t=pa(e);t!==null&&t.tag===5&&t.type==="form"?vd(t):hl.r(e)}var Ka=typeof document>"u"?null:document;function lm(e,t,l){var a=Ka;if(a&&typeof t=="string"&&t){var s=Ct(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),tm.has(s)||(tm.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),rt(t,"link",e),Ie(t),a.head.appendChild(t)))}}function Ep(e){hl.D(e),lm("dns-prefetch",e,null)}function kp(e,t){hl.C(e,t),lm("preconnect",e,t)}function Tp(e,t,l){hl.L(e,t,l);var a=Ka;if(a&&e&&t){var s='link[rel="preload"][as="'+Ct(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+Ct(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+Ct(l.imageSizes)+'"]')):s+='[href="'+Ct(e)+'"]';var r=s;switch(t){case"style":r=Ja(e);break;case"script":r=Wa(e)}Ht.has(r)||(e=v({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Ht.set(r,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(qn(r))||t==="script"&&a.querySelector(Yn(r))||(t=a.createElement("link"),rt(t,"link",e),Ie(t),a.head.appendChild(t)))}}function wp(e,t){hl.m(e,t);var l=Ka;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Ct(a)+'"][href="'+Ct(e)+'"]',r=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Wa(e)}if(!Ht.has(r)&&(e=v({rel:"modulepreload",href:e},t),Ht.set(r,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Yn(r)))return}a=l.createElement("link"),rt(a,"link",e),Ie(a),l.head.appendChild(a)}}}function Mp(e,t,l){hl.S(e,t,l);var a=Ka;if(a&&e){var s=va(a).hoistableStyles,r=Ja(e);t=t||"default";var o=s.get(r);if(!o){var h={loading:0,preload:null};if(o=a.querySelector(qn(r)))h.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ht.get(r))&&Hu(e,l);var j=o=a.createElement("link");Ie(j),rt(j,"link",e),j._p=new Promise(function(A,B){j.onload=A,j.onerror=B}),j.addEventListener("load",function(){h.loading|=1}),j.addEventListener("error",function(){h.loading|=2}),h.loading|=4,ir(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:h},s.set(r,o)}}}function Ap(e,t){hl.X(e,t);var l=Ka;if(l&&e){var a=va(l).hoistableScripts,s=Wa(e),r=a.get(s);r||(r=l.querySelector(Yn(s)),r||(e=v({src:e,async:!0},t),(t=Ht.get(s))&&Uu(e,t),r=l.createElement("script"),Ie(r),rt(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(s,r))}}function Cp(e,t){hl.M(e,t);var l=Ka;if(l&&e){var a=va(l).hoistableScripts,s=Wa(e),r=a.get(s);r||(r=l.querySelector(Yn(s)),r||(e=v({src:e,async:!0,type:"module"},t),(t=Ht.get(s))&&Uu(e,t),r=l.createElement("script"),Ie(r),rt(r,"link",e),l.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(s,r))}}function am(e,t,l,a){var s=(s=P.current)?rr(s):null;if(!s)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Ja(l.href),l=va(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Ja(l.href);var r=va(s).hoistableStyles,o=r.get(e);if(o||(s=s.ownerDocument||s,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,o),(r=s.querySelector(qn(e)))&&!r._p&&(o.instance=r,o.state.loading=5),Ht.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ht.set(e,l),r||Rp(s,e,l,o.state))),t&&a===null)throw Error(u(528,""));return o}if(t&&a!==null)throw Error(u(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Wa(l),l=va(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Ja(e){return'href="'+Ct(e)+'"'}function qn(e){return'link[rel="stylesheet"]['+e+"]"}function nm(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Rp(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),rt(t,"link",l),Ie(t),e.head.appendChild(t))}function Wa(e){return'[src="'+Ct(e)+'"]'}function Yn(e){return"script[async]"+e}function sm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Ct(l.href)+'"]');if(a)return t.instance=a,Ie(a),a;var s=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ie(a),rt(a,"style",s),ir(a,l.precedence,e),t.instance=a;case"stylesheet":s=Ja(l.href);var r=e.querySelector(qn(s));if(r)return t.state.loading|=4,t.instance=r,Ie(r),r;a=nm(l),(s=Ht.get(s))&&Hu(a,s),r=(e.ownerDocument||e).createElement("link"),Ie(r);var o=r;return o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),rt(r,"link",a),t.state.loading|=4,ir(r,l.precedence,e),t.instance=r;case"script":return r=Wa(l.src),(s=e.querySelector(Yn(r)))?(t.instance=s,Ie(s),s):(a=l,(s=Ht.get(r))&&(a=v({},l),Uu(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ie(s),rt(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ir(a,l.precedence,e));return t.instance}function ir(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,r=s,o=0;o<a.length;o++){var h=a[o];if(h.dataset.precedence===t)r=h;else if(r!==s)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Hu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Uu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ur=null;function rm(e,t,l){if(ur===null){var a=new Map,s=ur=new Map;s.set(l,a)}else s=ur,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var r=l[s];if(!(r[ln]||r[lt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var o=r.getAttribute(t)||"";o=e+o;var h=a.get(o);h?h.push(r):a.set(o,[r])}}return a}function im(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function _p(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function um(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function zp(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=Ja(a.href),r=t.querySelector(qn(s));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=cr.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=r,Ie(r);return}r=t.ownerDocument||t,a=nm(a),(s=Ht.get(s))&&Hu(a,s),r=r.createElement("link"),Ie(r);var o=r;o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),rt(r,"link",a),l.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=cr.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var qu=0;function Dp(e,t){return e.stylesheets&&e.count===0&&dr(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&dr(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&qu===0&&(qu=62500*hp());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&dr(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>qu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function cr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)dr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var or=null;function dr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,or=new Map,t.forEach(Op,e),or=null,cr.call(e))}function Op(e,t){if(!(t.state.loading&4)){var l=or.get(e);if(l)var a=l.get(null);else{l=new Map,or.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<s.length;r++){var o=s[r];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),a=o)}a&&l.set(null,a)}s=t.instance,o=s.getAttribute("data-precedence"),r=l.get(o)||a,r===a&&l.set(null,s),l.set(o,s),this.count++,a=cr.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),r?r.parentNode.insertBefore(s,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Gn={$$typeof:W,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function Lp(e,t,l,a,s,r,o,h,j){this.tag=1,this.containerInfo=e,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=Or(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Or(0),this.hiddenUpdates=Or(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=r,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function cm(e,t,l,a,s,r,o,h,j,A,B,V){return e=new Lp(e,t,l,o,j,A,B,V,h),t=1,r===!0&&(t|=24),r=St(3,null,null,t),e.current=r,r.stateNode=e,t=gi(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:a,isDehydrated:l,cache:t},Ni(r),e}function om(e){return e?(e=wa,e):wa}function dm(e,t,l,a,s,r){s=om(s),a.context===null?a.context=s:a.pendingContext=s,a=kl(t),a.payload={element:l},r=r===void 0?null:r,r!==null&&(a.callback=r),l=Tl(e,a,t),l!==null&&(vt(l,e,t),bn(l,e,t))}function fm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Yu(e,t){fm(e,t),(e=e.alternate)&&fm(e,t)}function mm(e){if(e.tag===13||e.tag===31){var t=Fl(e,67108864);t!==null&&vt(t,e,67108864),Yu(e,67108864)}}function hm(e){if(e.tag===13||e.tag===31){var t=wt();t=Lr(t);var l=Fl(e,t);l!==null&&vt(l,e,t),Yu(e,t)}}var fr=!0;function Bp(e,t,l,a){var s=k.T;k.T=null;var r=R.p;try{R.p=2,Gu(e,t,l,a)}finally{R.p=r,k.T=s}}function Hp(e,t,l,a){var s=k.T;k.T=null;var r=R.p;try{R.p=8,Gu(e,t,l,a)}finally{R.p=r,k.T=s}}function Gu(e,t,l,a){if(fr){var s=Xu(a);if(s===null)Mu(e,t,a,mr,l),pm(e,a);else if(qp(s,e,t,l,a))a.stopPropagation();else if(pm(e,a),t&4&&-1<Up.indexOf(e)){for(;s!==null;){var r=pa(s);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var o=Zl(r.pendingLanes);if(o!==0){var h=r;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var j=1<<31-bt(o);h.entanglements[1]|=j,o&=~j}$t(r),(Ae&6)===0&&(Js=yt()+500,Ln(0))}}break;case 31:case 13:h=Fl(r,2),h!==null&&vt(h,r,2),Fs(),Yu(r,2)}if(r=Xu(a),r===null&&Mu(e,t,a,mr,l),r===s)break;s=r}s!==null&&a.stopPropagation()}else Mu(e,t,a,null,l)}}function Xu(e){return e=Vr(e),Qu(e)}var mr=null;function Qu(e){if(mr=null,e=xa(e),e!==null){var t=m(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=p(t),e!==null)return e;e=null}else if(l===31){if(e=b(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mr=e,null}function xm(e){switch(e){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(Eh()){case jc:return 2;case Sc:return 8;case ls:case kh:return 32;case Nc:return 268435456;default:return 32}default:return 32}}var Vu=!1,Bl=null,Hl=null,Ul=null,Xn=new Map,Qn=new Map,ql=[],Up="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 pm(e,t){switch(e){case"focusin":case"focusout":Bl=null;break;case"dragenter":case"dragleave":Hl=null;break;case"mouseover":case"mouseout":Ul=null;break;case"pointerover":case"pointerout":Xn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qn.delete(t.pointerId)}}function Vn(e,t,l,a,s,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:r,targetContainers:[s]},t!==null&&(t=pa(t),t!==null&&mm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function qp(e,t,l,a,s){switch(t){case"focusin":return Bl=Vn(Bl,e,t,l,a,s),!0;case"dragenter":return Hl=Vn(Hl,e,t,l,a,s),!0;case"mouseover":return Ul=Vn(Ul,e,t,l,a,s),!0;case"pointerover":var r=s.pointerId;return Xn.set(r,Vn(Xn.get(r)||null,e,t,l,a,s)),!0;case"gotpointercapture":return r=s.pointerId,Qn.set(r,Vn(Qn.get(r)||null,e,t,l,a,s)),!0}return!1}function vm(e){var t=xa(e.target);if(t!==null){var l=m(t);if(l!==null){if(t=l.tag,t===13){if(t=p(l),t!==null){e.blockedOn=t,Ac(e.priority,function(){hm(l)});return}}else if(t===31){if(t=b(l),t!==null){e.blockedOn=t,Ac(e.priority,function(){hm(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function hr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Xu(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Qr=a,l.target.dispatchEvent(a),Qr=null}else return t=pa(l),t!==null&&mm(t),e.blockedOn=l,!1;t.shift()}return!0}function ym(e,t,l){hr(e)&&l.delete(t)}function Yp(){Vu=!1,Bl!==null&&hr(Bl)&&(Bl=null),Hl!==null&&hr(Hl)&&(Hl=null),Ul!==null&&hr(Ul)&&(Ul=null),Xn.forEach(ym),Qn.forEach(ym)}function xr(e,t){e.blockedOn===t&&(e.blockedOn=null,Vu||(Vu=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Yp)))}var pr=null;function gm(e){pr!==e&&(pr=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){pr===e&&(pr=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(Qu(a||l)===null)continue;break}var r=pa(l);r!==null&&(e.splice(t,3),t-=3,Xi(r,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function Fa(e){function t(j){return xr(j,e)}Bl!==null&&xr(Bl,e),Hl!==null&&xr(Hl,e),Ul!==null&&xr(Ul,e),Xn.forEach(t),Qn.forEach(t);for(var l=0;l<ql.length;l++){var a=ql[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ql.length&&(l=ql[0],l.blockedOn===null);)vm(l),l.blockedOn===null&&ql.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],r=l[a+1],o=s[dt]||null;if(typeof r=="function")o||gm(l);else if(o){var h=null;if(r&&r.hasAttribute("formAction")){if(s=r,o=r[dt]||null)h=o.formAction;else if(Qu(s)!==null)continue}else h=o.action;typeof h=="function"?l[a+1]=h:(l.splice(a,3),a-=3),gm(l)}}}function bm(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(o){return s=o})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Zu(e){this._internalRoot=e}vr.prototype.render=Zu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var l=t.current,a=wt();dm(l,a,e,t,null,null)},vr.prototype.unmount=Zu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dm(e.current,2,null,e,null,null),Fs(),t[ha]=null}};function vr(e){this._internalRoot=e}vr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ql.length&&t!==0&&t<ql[l].priority;l++);ql.splice(l,0,e),l===0&&vm(e)}};var jm=c.version;if(jm!=="19.2.4")throw Error(u(527,jm,"19.2.4"));R.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=x(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Gp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yr.isDisabled&&yr.supportsFiber)try{Ia=yr.inject(Gp),gt=yr}catch{}}return $n.createRoot=function(e,t){if(!f(e))throw Error(u(299));var l=!1,a="",s=wd,r=Md,o=Ad;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=cm(e,1,!1,null,null,l,a,null,s,r,o,bm),e[ha]=t.current,wu(e),new Zu(t)},$n.hydrateRoot=function(e,t,l){if(!f(e))throw Error(u(299));var a=!1,s="",r=wd,o=Md,h=Ad,j=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(r=l.onUncaughtError),l.onCaughtError!==void 0&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(j=l.formState)),t=cm(e,1,!0,t,l??null,a,s,j,r,o,h,bm),t.context=om(null),l=t.current,a=wt(),a=Lr(a),s=kl(a),s.callback=null,Tl(l,s,a),l=a,t.current.lanes=l,tn(t,l),$t(t),e[ha]=t.current,wu(e),new vr(t)},$n.version="19.2.4",$n}var Rm;function Pp(){if(Rm)return Ju.exports;Rm=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),Ju.exports=Fp(),Ju.exports}var Ip=Pp();/**
|
|
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 _m="popstate";function zm(i){return typeof i=="object"&&i!=null&&"pathname"in i&&"search"in i&&"hash"in i&&"state"in i&&"key"in i}function ev(i={}){function c(f,m){let{pathname:p="/",search:b="",hash:y=""}=fa(f.location.hash.substring(1));return!p.startsWith("/")&&!p.startsWith(".")&&(p="/"+p),uc("",{pathname:p,search:b,hash:y},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function d(f,m){let p=f.document.querySelector("base"),b="";if(p&&p.getAttribute("href")){let y=f.location.href,x=y.indexOf("#");b=x===-1?y:y.slice(0,x)}return b+"#"+(typeof m=="string"?m:Wn(m))}function u(f,m){Ut(f.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return lv(c,d,u,i)}function Ye(i,c){if(i===!1||i===null||typeof i>"u")throw new Error(c)}function Ut(i,c){if(!i){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function tv(){return Math.random().toString(36).substring(2,10)}function Dm(i,c){return{usr:i.state,key:i.key,idx:c,masked:i.unstable_mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function uc(i,c,d=null,u,f){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof c=="string"?fa(c):c,state:d,key:c&&c.key||u||tv(),unstable_mask:f}}function Wn({pathname:i="/",search:c="",hash:d=""}){return c&&c!=="?"&&(i+=c.charAt(0)==="?"?c:"?"+c),d&&d!=="#"&&(i+=d.charAt(0)==="#"?d:"#"+d),i}function fa(i){let c={};if(i){let d=i.indexOf("#");d>=0&&(c.hash=i.substring(d),i=i.substring(0,d));let u=i.indexOf("?");u>=0&&(c.search=i.substring(u),i=i.substring(0,u)),i&&(c.pathname=i)}return c}function lv(i,c,d,u={}){let{window:f=document.defaultView,v5Compat:m=!1}=u,p=f.history,b="POP",y=null,x=S();x==null&&(x=0,p.replaceState({...p.state,idx:x},""));function S(){return(p.state||{idx:null}).idx}function v(){b="POP";let z=S(),q=z==null?null:z-x;x=z,y&&y({action:b,location:Y.location,delta:q})}function w(z,q){b="PUSH";let X=zm(z)?z:uc(Y.location,z,q);d&&d(X,z),x=S()+1;let W=Dm(X,x),te=Y.createHref(X.unstable_mask||X);try{p.pushState(W,"",te)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;f.location.assign(te)}m&&y&&y({action:b,location:Y.location,delta:1})}function O(z,q){b="REPLACE";let X=zm(z)?z:uc(Y.location,z,q);d&&d(X,z),x=S();let W=Dm(X,x),te=Y.createHref(X.unstable_mask||X);p.replaceState(W,"",te),m&&y&&y({action:b,location:Y.location,delta:0})}function H(z){return av(z)}let Y={get action(){return b},get location(){return i(f,p)},listen(z){if(y)throw new Error("A history only accepts one active listener");return f.addEventListener(_m,v),y=z,()=>{f.removeEventListener(_m,v),y=null}},createHref(z){return c(f,z)},createURL:H,encodeLocation(z){let q=H(z);return{pathname:q.pathname,search:q.search,hash:q.hash}},push:w,replace:O,go(z){return p.go(z)}};return Y}function av(i,c=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),Ye(d,"No window.location.(origin|href) available to create URL");let u=typeof i=="string"?i:Wn(i);return u=u.replace(/ $/,"%20"),!c&&u.startsWith("//")&&(u=d+u),new URL(u,d)}function Im(i,c,d="/"){return nv(i,c,d,!1)}function nv(i,c,d,u){let f=typeof c=="string"?fa(c):c,m=pl(f.pathname||"/",d);if(m==null)return null;let p=eh(i);sv(p);let b=null;for(let y=0;b==null&&y<p.length;++y){let x=pv(m);b=hv(p[y],x,u)}return b}function eh(i,c=[],d=[],u="",f=!1){let m=(p,b,y=f,x)=>{let S={relativePath:x===void 0?p.path||"":x,caseSensitive:p.caseSensitive===!0,childrenIndex:b,route:p};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(u)&&y)return;Ye(S.relativePath.startsWith(u),`Absolute route path "${S.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(u.length)}let v=Kt([u,S.relativePath]),w=d.concat(S);p.children&&p.children.length>0&&(Ye(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),eh(p.children,c,w,v,y)),!(p.path==null&&!p.index)&&c.push({path:v,score:fv(v,p.index),routesMeta:w})};return i.forEach((p,b)=>{var y;if(p.path===""||!((y=p.path)!=null&&y.includes("?")))m(p,b);else for(let x of th(p.path))m(p,b,!0,x)}),c}function th(i){let c=i.split("/");if(c.length===0)return[];let[d,...u]=c,f=d.endsWith("?"),m=d.replace(/\?$/,"");if(u.length===0)return f?[m,""]:[m];let p=th(u.join("/")),b=[];return b.push(...p.map(y=>y===""?m:[m,y].join("/"))),f&&b.push(...p),b.map(y=>i.startsWith("/")&&y===""?"/":y)}function sv(i){i.sort((c,d)=>c.score!==d.score?d.score-c.score:mv(c.routesMeta.map(u=>u.childrenIndex),d.routesMeta.map(u=>u.childrenIndex)))}var rv=/^:[\w-]+$/,iv=3,uv=2,cv=1,ov=10,dv=-2,Om=i=>i==="*";function fv(i,c){let d=i.split("/"),u=d.length;return d.some(Om)&&(u+=dv),c&&(u+=uv),d.filter(f=>!Om(f)).reduce((f,m)=>f+(rv.test(m)?iv:m===""?cv:ov),u)}function mv(i,c){return i.length===c.length&&i.slice(0,-1).every((u,f)=>u===c[f])?i[i.length-1]-c[c.length-1]:0}function hv(i,c,d=!1){let{routesMeta:u}=i,f={},m="/",p=[];for(let b=0;b<u.length;++b){let y=u[b],x=b===u.length-1,S=m==="/"?c:c.slice(m.length)||"/",v=Tr({path:y.relativePath,caseSensitive:y.caseSensitive,end:x},S),w=y.route;if(!v&&x&&d&&!u[u.length-1].route.index&&(v=Tr({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},S)),!v)return null;Object.assign(f,v.params),p.push({params:f,pathname:Kt([m,v.pathname]),pathnameBase:bv(Kt([m,v.pathnameBase])),route:w}),v.pathnameBase!=="/"&&(m=Kt([m,v.pathnameBase]))}return p}function Tr(i,c){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[d,u]=xv(i.path,i.caseSensitive,i.end),f=c.match(d);if(!f)return null;let m=f[0],p=m.replace(/(.)\/+$/,"$1"),b=f.slice(1);return{params:u.reduce((x,{paramName:S,isOptional:v},w)=>{if(S==="*"){let H=b[w]||"";p=m.slice(0,m.length-H.length).replace(/(.)\/+$/,"$1")}const O=b[w];return v&&!O?x[S]=void 0:x[S]=(O||"").replace(/%2F/g,"/"),x},{}),pathname:m,pathnameBase:p,pattern:i}}function xv(i,c=!1,d=!0){Ut(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let u=[],f="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,b,y,x,S)=>{if(u.push({paramName:b,isOptional:y!=null}),y){let v=S.charAt(x+p.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(u.push({paramName:"*"}),f+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?f+="\\/*$":i!==""&&i!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,c?void 0:"i"),u]}function pv(i){try{return i.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return Ut(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),i}}function pl(i,c){if(c==="/")return i;if(!i.toLowerCase().startsWith(c.toLowerCase()))return null;let d=c.endsWith("/")?c.length-1:c.length,u=i.charAt(d);return u&&u!=="/"?null:i.slice(d)||"/"}var vv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function yv(i,c="/"){let{pathname:d,search:u="",hash:f=""}=typeof i=="string"?fa(i):i,m;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?m=Lm(d.substring(1),"/"):m=Lm(d,c)):m=c,{pathname:m,search:jv(u),hash:Sv(f)}}function Lm(i,c){let d=c.replace(/\/+$/,"").split("/");return i.split("/").forEach(f=>{f===".."?d.length>1&&d.pop():f!=="."&&d.push(f)}),d.length>1?d.join("/"):"/"}function Iu(i,c,d,u){return`Cannot include a '${i}' character in a manually specified \`to.${c}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function gv(i){return i.filter((c,d)=>d===0||c.route.path&&c.route.path.length>0)}function lh(i){let c=gv(i);return c.map((d,u)=>u===c.length-1?d.pathname:d.pathnameBase)}function hc(i,c,d,u=!1){let f;typeof i=="string"?f=fa(i):(f={...i},Ye(!f.pathname||!f.pathname.includes("?"),Iu("?","pathname","search",f)),Ye(!f.pathname||!f.pathname.includes("#"),Iu("#","pathname","hash",f)),Ye(!f.search||!f.search.includes("#"),Iu("#","search","hash",f)));let m=i===""||f.pathname==="",p=m?"/":f.pathname,b;if(p==null)b=d;else{let v=c.length-1;if(!u&&p.startsWith("..")){let w=p.split("/");for(;w[0]==="..";)w.shift(),v-=1;f.pathname=w.join("/")}b=v>=0?c[v]:"/"}let y=yv(f,b),x=p&&p!=="/"&&p.endsWith("/"),S=(m||p===".")&&d.endsWith("/");return!y.pathname.endsWith("/")&&(x||S)&&(y.pathname+="/"),y}var Kt=i=>i.join("/").replace(/\/\/+/g,"/"),bv=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),jv=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,Sv=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,Nv=class{constructor(i,c,d,u=!1){this.status=i,this.statusText=c||"",this.internal=u,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function Ev(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function kv(i){return i.map(c=>c.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ah=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nh(i,c){let d=i;if(typeof d!="string"||!vv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let u=d,f=!1;if(ah)try{let m=new URL(window.location.href),p=d.startsWith("//")?new URL(m.protocol+d):new URL(d),b=pl(p.pathname,c);p.origin===m.origin&&b!=null?d=b+p.search+p.hash:f=!0}catch{Ut(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:f,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var sh=["POST","PUT","PATCH","DELETE"];new Set(sh);var Tv=["GET",...sh];new Set(Tv);var Pa=g.createContext(null);Pa.displayName="DataRouter";var Ar=g.createContext(null);Ar.displayName="DataRouterState";var wv=g.createContext(!1),rh=g.createContext({isTransitioning:!1});rh.displayName="ViewTransition";var Mv=g.createContext(new Map);Mv.displayName="Fetchers";var Av=g.createContext(null);Av.displayName="Await";var qt=g.createContext(null);qt.displayName="Navigation";var Pn=g.createContext(null);Pn.displayName="Location";var Jt=g.createContext({outlet:null,matches:[],isDataRoute:!1});Jt.displayName="Route";var xc=g.createContext(null);xc.displayName="RouteError";var ih="REACT_ROUTER_ERROR",Cv="REDIRECT",Rv="ROUTE_ERROR_RESPONSE";function _v(i){if(i.startsWith(`${ih}:${Cv}:{`))try{let c=JSON.parse(i.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function zv(i){if(i.startsWith(`${ih}:${Rv}:{`))try{let c=JSON.parse(i.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new Nv(c.status,c.statusText,c.data)}catch{}}function Dv(i,{relative:c}={}){Ye(In(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:u}=g.useContext(qt),{hash:f,pathname:m,search:p}=es(i,{relative:c}),b=m;return d!=="/"&&(b=m==="/"?d:Kt([d,m])),u.createHref({pathname:b,search:p,hash:f})}function In(){return g.useContext(Pn)!=null}function Wt(){return Ye(In(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Pn).location}var uh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ch(i){g.useContext(qt).static||g.useLayoutEffect(i)}function Ql(){let{isDataRoute:i}=g.useContext(Jt);return i?$v():Ov()}function Ov(){Ye(In(),"useNavigate() may be used only in the context of a <Router> component.");let i=g.useContext(Pa),{basename:c,navigator:d}=g.useContext(qt),{matches:u}=g.useContext(Jt),{pathname:f}=Wt(),m=JSON.stringify(lh(u)),p=g.useRef(!1);return ch(()=>{p.current=!0}),g.useCallback((y,x={})=>{if(Ut(p.current,uh),!p.current)return;if(typeof y=="number"){d.go(y);return}let S=hc(y,JSON.parse(m),f,x.relative==="path");i==null&&c!=="/"&&(S.pathname=S.pathname==="/"?c:Kt([c,S.pathname])),(x.replace?d.replace:d.push)(S,x.state,x)},[c,d,m,f,i])}g.createContext(null);function Cr(){let{matches:i}=g.useContext(Jt),c=i[i.length-1];return c?c.params:{}}function es(i,{relative:c}={}){let{matches:d}=g.useContext(Jt),{pathname:u}=Wt(),f=JSON.stringify(lh(d));return g.useMemo(()=>hc(i,JSON.parse(f),u,c==="path"),[i,f,u,c])}function Lv(i,c){return oh(i,c)}function oh(i,c,d){var z;Ye(In(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=g.useContext(qt),{matches:f}=g.useContext(Jt),m=f[f.length-1],p=m?m.params:{},b=m?m.pathname:"/",y=m?m.pathnameBase:"/",x=m&&m.route;{let q=x&&x.path||"";fh(b,!x||q.endsWith("*")||q.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${b}" (under <Route path="${q}">) 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="${q}"> to <Route path="${q==="/"?"*":`${q}/*`}">.`)}let S=Wt(),v;if(c){let q=typeof c=="string"?fa(c):c;Ye(y==="/"||((z=q.pathname)==null?void 0:z.startsWith(y)),`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 "${y}" but pathname "${q.pathname}" was given in the \`location\` prop.`),v=q}else v=S;let w=v.pathname||"/",O=w;if(y!=="/"){let q=y.replace(/^\//,"").split("/");O="/"+w.replace(/^\//,"").split("/").slice(q.length).join("/")}let H=Im(i,{pathname:O});Ut(x||H!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Ut(H==null||H[H.length-1].route.element!==void 0||H[H.length-1].route.Component!==void 0||H[H.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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 Y=Yv(H&&H.map(q=>Object.assign({},q,{params:Object.assign({},p,q.params),pathname:Kt([y,u.encodeLocation?u.encodeLocation(q.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathname]),pathnameBase:q.pathnameBase==="/"?y:Kt([y,u.encodeLocation?u.encodeLocation(q.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathnameBase])})),f,d);return c&&Y?g.createElement(Pn.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},Y):Y}function Bv(){let i=Zv(),c=Ev(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),d=i instanceof Error?i.stack:null,u="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:u},m={padding:"2px 4px",backgroundColor:u},p=null;return console.error("Error handled by React Router default ErrorBoundary:",i),p=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:m},"ErrorBoundary")," or"," ",g.createElement("code",{style:m},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},c),d?g.createElement("pre",{style:f},d):null,p)}var Hv=g.createElement(Bv,null),dh=class extends g.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,c){return c.location!==i.location||c.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:c.error,location:c.location,revalidation:i.revalidation||c.revalidation}}componentDidCatch(i,c){this.props.onError?this.props.onError(i,c):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const d=zv(i.digest);d&&(i=d)}let c=i!==void 0?g.createElement(Jt.Provider,{value:this.props.routeContext},g.createElement(xc.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?g.createElement(Uv,{error:i},c):c}};dh.contextType=wv;var ec=new WeakMap;function Uv({children:i,error:c}){let{basename:d}=g.useContext(qt);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let u=_v(c.digest);if(u){let f=ec.get(c);if(f)throw f;let m=nh(u.location,d);if(ah&&!ec.get(c))if(m.isExternal||u.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:u.replace}));throw ec.set(c,p),p}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return i}function qv({routeContext:i,match:c,children:d}){let u=g.useContext(Pa);return u&&u.static&&u.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=c.route.id),g.createElement(Jt.Provider,{value:i},d)}function Yv(i,c=[],d){let u=d==null?void 0:d.state;if(i==null){if(!u)return null;if(u.errors)i=u.matches;else if(c.length===0&&!u.initialized&&u.matches.length>0)i=u.matches;else return null}let f=i,m=u==null?void 0:u.errors;if(m!=null){let S=f.findIndex(v=>v.route.id&&(m==null?void 0:m[v.route.id])!==void 0);Ye(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),f=f.slice(0,Math.min(f.length,S+1))}let p=!1,b=-1;if(d&&u){p=u.renderFallback;for(let S=0;S<f.length;S++){let v=f[S];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(b=S),v.route.id){let{loaderData:w,errors:O}=u,H=v.route.loader&&!w.hasOwnProperty(v.route.id)&&(!O||O[v.route.id]===void 0);if(v.route.lazy||H){d.isStatic&&(p=!0),b>=0?f=f.slice(0,b+1):f=[f[0]];break}}}}let y=d==null?void 0:d.onError,x=u&&y?(S,v)=>{var w,O;y(S,{location:u.location,params:((O=(w=u.matches)==null?void 0:w[0])==null?void 0:O.params)??{},unstable_pattern:kv(u.matches),errorInfo:v})}:void 0;return f.reduceRight((S,v,w)=>{let O,H=!1,Y=null,z=null;u&&(O=m&&v.route.id?m[v.route.id]:void 0,Y=v.route.errorElement||Hv,p&&(b<0&&w===0?(fh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),H=!0,z=null):b===w&&(H=!0,z=v.route.hydrateFallbackElement||null)));let q=c.concat(f.slice(0,w+1)),X=()=>{let W;return O?W=Y:H?W=z:v.route.Component?W=g.createElement(v.route.Component,null):v.route.element?W=v.route.element:W=S,g.createElement(qv,{match:v,routeContext:{outlet:S,matches:q,isDataRoute:u!=null},children:W})};return u&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?g.createElement(dh,{location:u.location,revalidation:u.revalidation,component:Y,error:O,children:X(),routeContext:{outlet:null,matches:q,isDataRoute:!0},onError:x}):X()},null)}function pc(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gv(i){let c=g.useContext(Pa);return Ye(c,pc(i)),c}function Xv(i){let c=g.useContext(Ar);return Ye(c,pc(i)),c}function Qv(i){let c=g.useContext(Jt);return Ye(c,pc(i)),c}function vc(i){let c=Qv(i),d=c.matches[c.matches.length-1];return Ye(d.route.id,`${i} can only be used on routes that contain a unique "id"`),d.route.id}function Vv(){return vc("useRouteId")}function Zv(){var u;let i=g.useContext(xc),c=Xv("useRouteError"),d=vc("useRouteError");return i!==void 0?i:(u=c.errors)==null?void 0:u[d]}function $v(){let{router:i}=Gv("useNavigate"),c=vc("useNavigate"),d=g.useRef(!1);return ch(()=>{d.current=!0}),g.useCallback(async(f,m={})=>{Ut(d.current,uh),d.current&&(typeof f=="number"?await i.navigate(f):await i.navigate(f,{fromRouteId:c,...m}))},[i,c])}var Bm={};function fh(i,c,d){!c&&!Bm[i]&&(Bm[i]=!0,Ut(!1,d))}g.memo(Kv);function Kv({routes:i,future:c,state:d,isStatic:u,onError:f}){return oh(i,void 0,{state:d,isStatic:u,onError:f})}function Xl(i){Ye(!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 Jv({basename:i="/",children:c=null,location:d,navigationType:u="POP",navigator:f,static:m=!1,unstable_useTransitions:p}){Ye(!In(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let b=i.replace(/^\/*/,"/"),y=g.useMemo(()=>({basename:b,navigator:f,static:m,unstable_useTransitions:p,future:{}}),[b,f,m,p]);typeof d=="string"&&(d=fa(d));let{pathname:x="/",search:S="",hash:v="",state:w=null,key:O="default",unstable_mask:H}=d,Y=g.useMemo(()=>{let z=pl(x,b);return z==null?null:{location:{pathname:z,search:S,hash:v,state:w,key:O,unstable_mask:H},navigationType:u}},[b,x,S,v,w,O,u,H]);return Ut(Y!=null,`<Router basename="${b}"> is not able to match the URL "${x}${S}${v}" because it does not start with the basename, so the <Router> won't render anything.`),Y==null?null:g.createElement(qt.Provider,{value:y},g.createElement(Pn.Provider,{children:c,value:Y}))}function Wv({children:i,location:c}){return Lv(cc(i),c)}function cc(i,c=[]){let d=[];return g.Children.forEach(i,(u,f)=>{if(!g.isValidElement(u))return;let m=[...c,f];if(u.type===g.Fragment){d.push.apply(d,cc(u.props.children,m));return}Ye(u.type===Xl,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ye(!u.props.index||!u.props.children,"An index route cannot have child routes.");let p={id:u.props.id||m.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(p.children=cc(u.props.children,m)),d.push(p)}),d}var Nr="get",Er="application/x-www-form-urlencoded";function Rr(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function Fv(i){return Rr(i)&&i.tagName.toLowerCase()==="button"}function Pv(i){return Rr(i)&&i.tagName.toLowerCase()==="form"}function Iv(i){return Rr(i)&&i.tagName.toLowerCase()==="input"}function ey(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function ty(i,c){return i.button===0&&(!c||c==="_self")&&!ey(i)}function oc(i=""){return new URLSearchParams(typeof i=="string"||Array.isArray(i)||i instanceof URLSearchParams?i:Object.keys(i).reduce((c,d)=>{let u=i[d];return c.concat(Array.isArray(u)?u.map(f=>[d,f]):[[d,u]])},[]))}function ly(i,c){let d=oc(i);return c&&c.forEach((u,f)=>{d.has(f)||c.getAll(f).forEach(m=>{d.append(f,m)})}),d}var gr=null;function ay(){if(gr===null)try{new FormData(document.createElement("form"),0),gr=!1}catch{gr=!0}return gr}var ny=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tc(i){return i!=null&&!ny.has(i)?(Ut(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Er}"`),null):i}function sy(i,c){let d,u,f,m,p;if(Pv(i)){let b=i.getAttribute("action");u=b?pl(b,c):null,d=i.getAttribute("method")||Nr,f=tc(i.getAttribute("enctype"))||Er,m=new FormData(i)}else if(Fv(i)||Iv(i)&&(i.type==="submit"||i.type==="image")){let b=i.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=i.getAttribute("formaction")||b.getAttribute("action");if(u=y?pl(y,c):null,d=i.getAttribute("formmethod")||b.getAttribute("method")||Nr,f=tc(i.getAttribute("formenctype"))||tc(b.getAttribute("enctype"))||Er,m=new FormData(b,i),!ay()){let{name:x,type:S,value:v}=i;if(S==="image"){let w=x?`${x}.`:"";m.append(`${w}x`,"0"),m.append(`${w}y`,"0")}else x&&m.append(x,v)}}else{if(Rr(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Nr,u=null,f=Er,p=i}return m&&f==="text/plain"&&(p=m,m=void 0),{action:u,method:d.toLowerCase(),encType:f,formData:m,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function yc(i,c){if(i===!1||i===null||typeof i>"u")throw new Error(c)}function ry(i,c,d,u){let f=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return d?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${u}`:f.pathname=`${f.pathname}.${u}`:f.pathname==="/"?f.pathname=`_root.${u}`:c&&pl(f.pathname,c)==="/"?f.pathname=`${c.replace(/\/$/,"")}/_root.${u}`:f.pathname=`${f.pathname.replace(/\/$/,"")}.${u}`,f}async function iy(i,c){if(i.id in c)return c[i.id];try{let d=await import(i.module);return c[i.id]=d,d}catch(d){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function uy(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function cy(i,c,d){let u=await Promise.all(i.map(async f=>{let m=c.routes[f.route.id];if(m){let p=await iy(m,d);return p.links?p.links():[]}return[]}));return my(u.flat(1).filter(uy).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Hm(i,c,d,u,f,m){let p=(y,x)=>d[x]?y.route.id!==d[x].route.id:!0,b=(y,x)=>{var S;return d[x].pathname!==y.pathname||((S=d[x].route.path)==null?void 0:S.endsWith("*"))&&d[x].params["*"]!==y.params["*"]};return m==="assets"?c.filter((y,x)=>p(y,x)||b(y,x)):m==="data"?c.filter((y,x)=>{var v;let S=u.routes[y.route.id];if(!S||!S.hasLoader)return!1;if(p(y,x)||b(y,x))return!0;if(y.route.shouldRevalidate){let w=y.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((v=d[0])==null?void 0:v.params)||{},nextUrl:new URL(i,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function oy(i,c,{includeHydrateFallback:d}={}){return dy(i.map(u=>{let f=c.routes[u.route.id];if(!f)return[];let m=[f.module];return f.clientActionModule&&(m=m.concat(f.clientActionModule)),f.clientLoaderModule&&(m=m.concat(f.clientLoaderModule)),d&&f.hydrateFallbackModule&&(m=m.concat(f.hydrateFallbackModule)),f.imports&&(m=m.concat(f.imports)),m}).flat(1))}function dy(i){return[...new Set(i)]}function fy(i){let c={},d=Object.keys(i).sort();for(let u of d)c[u]=i[u];return c}function my(i,c){let d=new Set;return new Set(c),i.reduce((u,f)=>{let m=JSON.stringify(fy(f));return d.has(m)||(d.add(m),u.push({key:m,link:f})),u},[])}function mh(){let i=g.useContext(Pa);return yc(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function hy(){let i=g.useContext(Ar);return yc(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var gc=g.createContext(void 0);gc.displayName="FrameworkContext";function hh(){let i=g.useContext(gc);return yc(i,"You must render this element inside a <HydratedRouter> element"),i}function xy(i,c){let d=g.useContext(gc),[u,f]=g.useState(!1),[m,p]=g.useState(!1),{onFocus:b,onBlur:y,onMouseEnter:x,onMouseLeave:S,onTouchStart:v}=c,w=g.useRef(null);g.useEffect(()=>{if(i==="render"&&p(!0),i==="viewport"){let Y=q=>{q.forEach(X=>{p(X.isIntersecting)})},z=new IntersectionObserver(Y,{threshold:.5});return w.current&&z.observe(w.current),()=>{z.disconnect()}}},[i]),g.useEffect(()=>{if(u){let Y=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(Y)}}},[u]);let O=()=>{f(!0)},H=()=>{f(!1),p(!1)};return d?i!=="intent"?[m,w,{}]:[m,w,{onFocus:Kn(b,O),onBlur:Kn(y,H),onMouseEnter:Kn(x,O),onMouseLeave:Kn(S,H),onTouchStart:Kn(v,O)}]:[!1,w,{}]}function Kn(i,c){return d=>{i&&i(d),d.defaultPrevented||c(d)}}function py({page:i,...c}){let{router:d}=mh(),u=g.useMemo(()=>Im(d.routes,i,d.basename),[d.routes,i,d.basename]);return u?g.createElement(yy,{page:i,matches:u,...c}):null}function vy(i){let{manifest:c,routeModules:d}=hh(),[u,f]=g.useState([]);return g.useEffect(()=>{let m=!1;return cy(i,c,d).then(p=>{m||f(p)}),()=>{m=!0}},[i,c,d]),u}function yy({page:i,matches:c,...d}){let u=Wt(),{future:f,manifest:m,routeModules:p}=hh(),{basename:b}=mh(),{loaderData:y,matches:x}=hy(),S=g.useMemo(()=>Hm(i,c,x,m,u,"data"),[i,c,x,m,u]),v=g.useMemo(()=>Hm(i,c,x,m,u,"assets"),[i,c,x,m,u]),w=g.useMemo(()=>{if(i===u.pathname+u.search+u.hash)return[];let Y=new Set,z=!1;if(c.forEach(X=>{var te;let W=m.routes[X.route.id];!W||!W.hasLoader||(!S.some(Z=>Z.route.id===X.route.id)&&X.route.id in y&&((te=p[X.route.id])!=null&&te.shouldRevalidate)||W.hasClientLoader?z=!0:Y.add(X.route.id))}),Y.size===0)return[];let q=ry(i,b,f.unstable_trailingSlashAwareDataRequests,"data");return z&&Y.size>0&&q.searchParams.set("_routes",c.filter(X=>Y.has(X.route.id)).map(X=>X.route.id).join(",")),[q.pathname+q.search]},[b,f.unstable_trailingSlashAwareDataRequests,y,u,m,S,c,i,p]),O=g.useMemo(()=>oy(v,m),[v,m]),H=vy(v);return g.createElement(g.Fragment,null,w.map(Y=>g.createElement("link",{key:Y,rel:"prefetch",as:"fetch",href:Y,...d})),O.map(Y=>g.createElement("link",{key:Y,rel:"modulepreload",href:Y,...d})),H.map(({key:Y,link:z})=>g.createElement("link",{key:Y,nonce:d.nonce,...z,crossOrigin:z.crossOrigin??d.crossOrigin})))}function gy(...i){return c=>{i.forEach(d=>{typeof d=="function"?d(c):d!=null&&(d.current=c)})}}var by=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{by&&(window.__reactRouterVersion="7.13.1")}catch{}function jy({basename:i,children:c,unstable_useTransitions:d,window:u}){let f=g.useRef();f.current==null&&(f.current=ev({window:u,v5Compat:!0}));let m=f.current,[p,b]=g.useState({action:m.action,location:m.location}),y=g.useCallback(x=>{d===!1?b(x):g.startTransition(()=>b(x))},[d]);return g.useLayoutEffect(()=>m.listen(y),[m,y]),g.createElement(Jv,{basename:i,children:c,location:p.location,navigationType:p.action,navigator:m,unstable_useTransitions:d})}var xh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ot=g.forwardRef(function({onClick:c,discover:d="render",prefetch:u="none",relative:f,reloadDocument:m,replace:p,unstable_mask:b,state:y,target:x,to:S,preventScrollReset:v,viewTransition:w,unstable_defaultShouldRevalidate:O,...H},Y){let{basename:z,navigator:q,unstable_useTransitions:X}=g.useContext(qt),W=typeof S=="string"&&xh.test(S),te=nh(S,z);S=te.to;let Z=Dv(S,{relative:f}),Q=Wt(),F=null;if(b){let ke=hc(b,[],Q.unstable_mask?Q.unstable_mask.pathname:"/",!0);z!=="/"&&(ke.pathname=ke.pathname==="/"?z:Kt([z,ke.pathname])),F=q.createHref(ke)}let[$,ue,pe]=xy(u,H),ne=ky(S,{replace:p,unstable_mask:b,state:y,target:x,preventScrollReset:v,relative:f,viewTransition:w,unstable_defaultShouldRevalidate:O,unstable_useTransitions:X});function ve(ke){c&&c(ke),ke.defaultPrevented||ne(ke)}let Ce=!(te.isExternal||m),ze=g.createElement("a",{...H,...pe,href:(Ce?F:void 0)||te.absoluteURL||Z,onClick:Ce?ve:c,ref:gy(Y,ue),target:x,"data-discover":!W&&d==="render"?"true":void 0});return $&&!W?g.createElement(g.Fragment,null,ze,g.createElement(py,{page:Z})):ze});ot.displayName="Link";var Sy=g.forwardRef(function({"aria-current":c="page",caseSensitive:d=!1,className:u="",end:f=!1,style:m,to:p,viewTransition:b,children:y,...x},S){let v=es(p,{relative:x.relative}),w=Wt(),O=g.useContext(Ar),{navigator:H,basename:Y}=g.useContext(qt),z=O!=null&&Cy(v)&&b===!0,q=H.encodeLocation?H.encodeLocation(v).pathname:v.pathname,X=w.pathname,W=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;d||(X=X.toLowerCase(),W=W?W.toLowerCase():null,q=q.toLowerCase()),W&&Y&&(W=pl(W,Y)||W);const te=q!=="/"&&q.endsWith("/")?q.length-1:q.length;let Z=X===q||!f&&X.startsWith(q)&&X.charAt(te)==="/",Q=W!=null&&(W===q||!f&&W.startsWith(q)&&W.charAt(q.length)==="/"),F={isActive:Z,isPending:Q,isTransitioning:z},$=Z?c:void 0,ue;typeof u=="function"?ue=u(F):ue=[u,Z?"active":null,Q?"pending":null,z?"transitioning":null].filter(Boolean).join(" ");let pe=typeof m=="function"?m(F):m;return g.createElement(ot,{...x,"aria-current":$,className:ue,ref:S,style:pe,to:p,viewTransition:b},typeof y=="function"?y(F):y)});Sy.displayName="NavLink";var Ny=g.forwardRef(({discover:i="render",fetcherKey:c,navigate:d,reloadDocument:u,replace:f,state:m,method:p=Nr,action:b,onSubmit:y,relative:x,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:w,...O},H)=>{let{unstable_useTransitions:Y}=g.useContext(qt),z=My(),q=Ay(b,{relative:x}),X=p.toLowerCase()==="get"?"get":"post",W=typeof b=="string"&&xh.test(b),te=Z=>{if(y&&y(Z),Z.defaultPrevented)return;Z.preventDefault();let Q=Z.nativeEvent.submitter,F=(Q==null?void 0:Q.getAttribute("formmethod"))||p,$=()=>z(Q||Z.currentTarget,{fetcherKey:c,method:F,navigate:d,replace:f,state:m,relative:x,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:w});Y&&d!==!1?g.startTransition(()=>$()):$()};return g.createElement("form",{ref:H,method:X,action:q,onSubmit:u?y:te,...O,"data-discover":!W&&i==="render"?"true":void 0})});Ny.displayName="Form";function Ey(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ph(i){let c=g.useContext(Pa);return Ye(c,Ey(i)),c}function ky(i,{target:c,replace:d,unstable_mask:u,state:f,preventScrollReset:m,relative:p,viewTransition:b,unstable_defaultShouldRevalidate:y,unstable_useTransitions:x}={}){let S=Ql(),v=Wt(),w=es(i,{relative:p});return g.useCallback(O=>{if(ty(O,c)){O.preventDefault();let H=d!==void 0?d:Wn(v)===Wn(w),Y=()=>S(i,{replace:H,unstable_mask:u,state:f,preventScrollReset:m,relative:p,viewTransition:b,unstable_defaultShouldRevalidate:y});x?g.startTransition(()=>Y()):Y()}},[v,S,w,d,u,f,c,i,m,p,b,y,x])}function bc(i){Ut(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 c=g.useRef(oc(i)),d=g.useRef(!1),u=Wt(),f=g.useMemo(()=>ly(u.search,d.current?null:c.current),[u.search]),m=Ql(),p=g.useCallback((b,y)=>{const x=oc(typeof b=="function"?b(new URLSearchParams(f)):b);d.current=!0,m("?"+x,y)},[m,f]);return[f,p]}var Ty=0,wy=()=>`__${String(++Ty)}__`;function My(){let{router:i}=ph("useSubmit"),{basename:c}=g.useContext(qt),d=Vv(),u=i.fetch,f=i.navigate;return g.useCallback(async(m,p={})=>{let{action:b,method:y,encType:x,formData:S,body:v}=sy(m,c);if(p.navigate===!1){let w=p.fetcherKey||wy();await u(w,d,p.action||b,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:S,body:v,formMethod:p.method||y,formEncType:p.encType||x,flushSync:p.flushSync})}else await f(p.action||b,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:S,body:v,formMethod:p.method||y,formEncType:p.encType||x,replace:p.replace,state:p.state,fromRouteId:d,flushSync:p.flushSync,viewTransition:p.viewTransition})},[u,f,c,d])}function Ay(i,{relative:c}={}){let{basename:d}=g.useContext(qt),u=g.useContext(Jt);Ye(u,"useFormAction must be used inside a RouteContext");let[f]=u.matches.slice(-1),m={...es(i||".",{relative:c})},p=Wt();if(i==null){m.search=p.search;let b=new URLSearchParams(m.search),y=b.getAll("index");if(y.some(S=>S==="")){b.delete("index"),y.filter(v=>v).forEach(v=>b.append("index",v));let S=b.toString();m.search=S?`?${S}`:""}}return(!i||i===".")&&f.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(m.pathname=m.pathname==="/"?d:Kt([d,m.pathname])),Wn(m)}function Cy(i,{relative:c}={}){let d=g.useContext(rh);Ye(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=ph("useViewTransitionState"),f=es(i,{relative:c});if(!d.isTransitioning)return!1;let m=pl(d.currentLocation.pathname,u)||d.currentLocation.pathname,p=pl(d.nextLocation.pathname,u)||d.nextLocation.pathname;return Tr(f.pathname,p)!=null||Tr(f.pathname,m)!=null}const Ry="";async function We(i,c){const d=await fetch(`${Ry}${i}`,c);if(!d.ok){const u=await d.json().catch(()=>({error:d.statusText}));throw new Error(u.error||`HTTP ${d.status}`)}return d.json()}const Ee={getConfig(){return We("/api/config")},setConfig(i,c){return We("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:i,model:c})})},getSkills(){return We("/api/skills")},getSkillDetail(i,c){return We(`/api/skills/${i}/${c}`)},getEvals(i,c){return We(`/api/skills/${i}/${c}/evals`)},saveEvals(i,c,d){return We(`/api/skills/${i}/${c}/evals`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)})},generateEvals(i,c){return We(`/api/skills/${i}/${c}/generate-evals`,{method:"POST"})},getLatestBenchmark(i,c){return We(`/api/skills/${i}/${c}/benchmark/latest`)},getHistory(i,c,d){const u=new URLSearchParams;d!=null&&d.model&&u.set("model",d.model),d!=null&&d.type&&u.set("type",d.type),d!=null&&d.from&&u.set("from",d.from),d!=null&&d.to&&u.set("to",d.to);const f=u.toString();return We(`/api/skills/${i}/${c}/history${f?"?"+f:""}`)},getHistoryEntry(i,c,d){return We(`/api/skills/${i}/${c}/history/${encodeURIComponent(d)}`)},compareRuns(i,c,d,u){return We(`/api/skills/${i}/${c}/history-compare?a=${encodeURIComponent(d)}&b=${encodeURIComponent(u)}`)},getCaseHistory(i,c,d,u){const f=new URLSearchParams;u&&f.set("model",u);const m=f.toString();return We(`/api/skills/${i}/${c}/history/case/${d}${m?"?"+m:""}`)},deleteHistoryEntry(i,c,d){return We(`/api/skills/${i}/${c}/history/${encodeURIComponent(d)}`,{method:"DELETE"})},improveSkill(i,c,d){return We(`/api/skills/${i}/${c}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)})},applyImprovement(i,c,d){return We(`/api/skills/${i}/${c}/apply-improvement`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:d})})},getStats(i,c){return We(`/api/skills/${i}/${c}/stats`)},getDependencies(i,c){return We(`/api/skills/${i}/${c}/dependencies`)},getProjectLayout(){return We("/api/project-layout")},createSkill(i){return We("/api/skills/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})},getSkillCreatorStatus(){return We("/api/skill-creator-status")}},Um={pass:{bg:"var(--green-muted)",text:"var(--green)",dot:"var(--green)",label:"Passing"},fail:{bg:"var(--red-muted)",text:"var(--red)",dot:"var(--red)",label:"Failing"},pending:{bg:"var(--yellow-muted)",text:"var(--yellow)",dot:"var(--yellow)",label:"Pending"},missing:{bg:"var(--surface-3)",text:"var(--text-tertiary)",dot:"var(--text-tertiary)",label:"No evals"}};function lc(){return n.jsx("div",{className:"glass-card p-5",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:"skeleton h-5 w-36 mb-2"}),n.jsx("div",{className:"skeleton h-3.5 w-48"})]}),n.jsx("div",{className:"skeleton h-6 w-20 rounded-full"})]})})}function _y(){const[i,c]=g.useState([]),[d,u]=g.useState(!0),[f,m]=g.useState(null);g.useEffect(()=>{Ee.getSkills().then(c).catch(b=>m(b.message)).finally(()=>u(!1))},[]);const p=i.reduce((b,y)=>{var x;return(b[x=y.plugin]||(b[x]=[])).push(y),b},{});return n.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[n.jsxs("div",{className:"mb-8 flex items-start justify-between",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-[22px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Skills"}),n.jsx("p",{className:"text-[13px] mt-1",style:{color:"var(--text-tertiary)"},children:d?"Scanning plugins...":`${i.length} skill${i.length!==1?"s":""} across ${Object.keys(p).length} plugin${Object.keys(p).length!==1?"s":""}`})]}),!d&&n.jsxs(ot,{to:"/create",className:"flex items-center gap-2 px-4 py-2 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:"var(--accent)",color:"#fff"},onMouseEnter:b=>{b.currentTarget.style.opacity="0.9"},onMouseLeave:b=>{b.currentTarget.style.opacity="1"},children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"New Skill"]})]}),f&&n.jsx("div",{className:"mb-6 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:f}),d&&n.jsxs("div",{className:"space-y-3",children:[n.jsx(lc,{}),n.jsx(lc,{}),n.jsx(lc,{})]}),!d&&n.jsx("div",{className:"space-y-8 stagger-children",children:Object.entries(p).map(([b,y])=>n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[n.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),n.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:b}),n.jsx("div",{className:"flex-1 h-px",style:{background:"var(--border-subtle)"}})]}),n.jsx("div",{className:"grid gap-2",children:y.map(x=>{const S=Um[x.benchmarkStatus]||Um.missing;return n.jsxs(ot,{to:`/skills/${x.plugin}/${x.skill}`,className:"glass-card glass-card-interactive p-5 flex items-center justify-between group",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"flex items-center gap-2",children:n.jsx("span",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:x.skill})}),n.jsxs("div",{className:"flex items-center gap-3 mt-1.5",children:[n.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:[x.evalCount," eval",x.evalCount!==1?"s":""]}),n.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:[x.assertionCount," assertion",x.assertionCount!==1?"s":""]}),x.lastBenchmark&&n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:new Date(x.lastBenchmark).toLocaleDateString()})]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{className:"pill",style:{background:S.bg,color:S.text},children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:S.dot}}),S.label]}),n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-0 group-hover:opacity-100 transition-opacity duration-150",style:{transform:"translateX(0)",transition:"transform 0.15s ease"},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})})]})]},`${x.plugin}/${x.skill}`)})})]},b))}),!d&&i.length===0&&!f&&n.jsxs("div",{className:"text-center py-16 animate-fade-in-scale",children:[n.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:"var(--surface-2)"},children:n.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"})})}),n.jsx("p",{className:"text-[14px] font-medium",style:{color:"var(--text-secondary)"},children:"No skills found"}),n.jsxs("p",{className:"text-[12px] mt-1 mb-4",style:{color:"var(--text-tertiary)"},children:["Check your ",n.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-2)"},children:"--root"})," directory, or create your first skill"]}),n.jsxs(ot,{to:"/create",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:"var(--accent)",color:"#fff"},onMouseEnter:b=>{b.currentTarget.style.opacity="0.9"},onMouseLeave:b=>{b.currentTarget.style.opacity="1"},children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Create Your First Skill"]})]})]})}function ts(){const[i,c]=g.useState([]),[d,u]=g.useState(!1),[f,m]=g.useState(!1),[p,b]=g.useState(null),y=g.useRef(null),x=g.useCallback(async(v,w)=>{c([]),u(!0),m(!1),b(null);const O=new AbortController;y.current=O;try{const H=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:w?JSON.stringify(w):void 0,signal:O.signal});if(!H.ok||!H.body)throw new Error(`HTTP ${H.status}`);const Y=H.body.getReader(),z=new TextDecoder;let q="",X="";for(;;){const{done:W,value:te}=await Y.read();if(W)break;q+=z.decode(te,{stream:!0});const Z=q.split(`
|
|
61
|
+
`);q=Z.pop()||"";for(const Q of Z)if(Q.startsWith("event: "))X=Q.slice(7).trim();else if(Q.startsWith("data: ")){try{const F=JSON.parse(Q.slice(6)),$={event:X,data:F};X==="done"?(m(!0),c(ue=>[...ue,$])):c(ue=>[...ue,$])}catch{}X=""}}}catch(H){H.name!=="AbortError"&&b(H.message)}finally{u(!1),y.current=null}},[]),S=g.useCallback(()=>{var v;(v=y.current)==null||v.abort()},[]);return{events:i,running:d,done:f,error:p,start:x,stop:S}}function zy(i){const c=i.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);if(!c)return{metadata:{},body:i};const d=c[1],u=c[2].trim(),f={},m=d.split(`
|
|
62
|
+
`);let p="";for(const b of m){const y=b.match(/^\s+-\s+(.+)$/);if(y&&p){const S=f[p];Array.isArray(S)?S.push(y[1].trim().replace(/^["']|["']$/g,"")):f[p]=[y[1].trim().replace(/^["']|["']$/g,"")];continue}const x=b.match(/^([\w-]+):\s*(.*)$/);if(x){p=x[1];const S=x[2].trim();if(!S){f[p]=[];continue}const v=S.match(/^\[(.+)\]$/);if(v){f[p]=v[1].split(",").map(w=>w.trim().replace(/^["']|["']$/g,"")).filter(Boolean);continue}f[p]=S.replace(/^["']|["']$/g,"")}}return{metadata:f,body:u}}function Dy({content:i,defaultExpanded:c=!0}){const[d,u]=g.useState(c),{metadata:f,body:m}=zy(i);if(!i.trim())return null;const p=Object.keys(f).length>0,b=f["allowed-tools"],y=Array.isArray(b)?b:b?[b]:[],x=Object.entries(f).filter(([S])=>S!=="allowed-tools");return n.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsxs("button",{onClick:()=>u(!d),className:"w-full flex items-center justify-between px-5 py-3.5 text-left transition-colors duration-150",style:{background:"var(--surface-2)"},onMouseEnter:S=>{S.currentTarget.style.background="var(--surface-3)"},onMouseLeave:S=>{S.currentTarget.style.background="var(--surface-2)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"var(--accent-muted)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),n.jsx("polyline",{points:"14 2 14 8 20 8"}),n.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),n.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"SKILL.md"}),n.jsx("span",{className:"text-[11px] ml-2",style:{color:"var(--text-tertiary)"},children:"Skill Definition"})]})]}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",style:{transform:d?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),d&&n.jsxs("div",{className:"px-5 py-4 animate-fade-in",children:[p&&n.jsx("div",{className:"grid grid-cols-2 gap-3 mb-4",children:x.map(([S,v])=>n.jsxs("div",{className:"px-3 py-2.5 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--text-tertiary)"},children:S}),n.jsx("div",{className:"text-[12px]",style:{color:"var(--text-primary)"},children:Array.isArray(v)?v.join(", "):v})]},S))}),y.length>0&&n.jsxs("div",{className:"mb-4",children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-2",style:{color:"var(--text-tertiary)"},children:"Allowed Tools"}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:y.map(S=>n.jsx("span",{className:"px-2 py-1 rounded-md text-[11px] font-mono",style:{background:"var(--accent-muted)",color:"var(--accent)"},children:S},S))})]}),m&&n.jsx("pre",{className:"text-[12px] leading-relaxed p-4 rounded-lg overflow-x-auto",style:{background:"var(--surface-0)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",maxHeight:"400px",overflowY:"auto",fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:m})]})]})}function Oy(i,c){const d=i.split(`
|
|
63
|
+
`),u=c.split(`
|
|
64
|
+
`);if(d.length>1e3||u.length>1e3)return[...d.map(S=>({type:"unchanged",content:S}))];const f=d.length,m=u.length,p=Array.from({length:f+1},()=>new Array(m+1).fill(0));for(let S=1;S<=f;S++)for(let v=1;v<=m;v++)d[S-1]===u[v-1]?p[S][v]=p[S-1][v-1]+1:p[S][v]=Math.max(p[S-1][v],p[S][v-1]);const b=[];let y=f,x=m;for(;y>0||x>0;)y>0&&x>0&&d[y-1]===u[x-1]?(b.push({type:"unchanged",content:d[y-1]}),y--,x--):x>0&&(y===0||p[y][x-1]>=p[y-1][x])?(b.push({type:"added",content:u[x-1]}),x--):(b.push({type:"removed",content:d[y-1]}),y--);return b.reverse()}function Ly({plugin:i,skill:c,skillContent:d,onApplied:u}){const[f,m]=g.useState("closed"),[p,b]=g.useState(null),[y,x]=g.useState("claude-cli"),[S,v]=g.useState("opus"),[w,O]=g.useState([]),[H,Y]=g.useState(""),[z,q]=g.useState(""),[X,W]=g.useState(null),[te,Z]=g.useState(!1);g.useEffect(()=>{Ee.getConfig().then(ne=>{b(ne),ne.providers.find(Ce=>Ce.id==="claude-cli"&&Ce.available)&&(x("claude-cli"),v("opus"))}).catch(()=>{})},[]);function Q(){return p==null?void 0:p.providers.find(ne=>ne.id===y&&ne.available)}async function F(){m("loading"),W(null);try{const ne=await Ee.improveSkill(i,c,{provider:y,model:S});Y(ne.improved),q(ne.reasoning),O(Oy(ne.original,ne.improved)),m("diff_shown")}catch(ne){W(ne.message),m("open")}}async function $(){Z(!0);try{await Ee.applyImprovement(i,c,H),u(H),m("closed")}catch(ne){W(ne.message)}finally{Z(!1)}}function ue(){m("closed"),O([]),Y(""),q(""),W(null)}if(f==="closed")return n.jsxs("button",{onClick:()=>m("open"),className:"btn btn-secondary mb-5",disabled:!d,children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]}),"Improve Skill"]});const pe=Q();return n.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden animate-fade-in",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5",style:{background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]})}),n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"AI Skill Improvement"})]}),n.jsx("button",{onClick:ue,className:"w-7 h-7 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:ne=>{ne.currentTarget.style.background="var(--surface-3)"},onMouseLeave:ne=>{ne.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsxs("div",{className:"px-5 py-4",children:[(f==="open"||f==="loading")&&n.jsxs("div",{className:"flex items-end gap-3 mb-4",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Provider"}),n.jsx("select",{className:"input-field text-[12px] py-1.5",value:y,onChange:ne=>{x(ne.target.value);const ve=p==null?void 0:p.providers.find(Ce=>Ce.id===ne.target.value);ve!=null&&ve.models[0]&&v(ve.models[0].id)},disabled:f==="loading",children:p==null?void 0:p.providers.filter(ne=>ne.available).map(ne=>n.jsx("option",{value:ne.id,children:ne.label},ne.id))})]}),n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Model"}),n.jsx("select",{className:"input-field text-[12px] py-1.5",value:S,onChange:ne=>v(ne.target.value),disabled:f==="loading",children:pe==null?void 0:pe.models.map(ne=>n.jsx("option",{value:ne.id,children:ne.label},ne.id))})]}),n.jsx("button",{onClick:F,disabled:f==="loading",className:"btn btn-primary flex-shrink-0",children:f==="loading"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}})," Improving..."]}):"Improve"})]}),X&&n.jsx("div",{className:"mb-4 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:X}),f==="diff_shown"&&n.jsxs(n.Fragment,{children:[z&&n.jsxs("div",{className:"mb-4 px-4 py-3 rounded-lg text-[12px]",style:{background:"rgba(168,85,247,0.08)",color:"var(--text-secondary)",border:"1px solid rgba(168,85,247,0.2)"},children:[n.jsx("span",{className:"font-semibold",style:{color:"#a855f7"},children:"AI Reasoning: "}),z]}),n.jsx("div",{className:"rounded-lg overflow-hidden mb-4",style:{border:"1px solid var(--border-subtle)",maxHeight:"400px",overflowY:"auto"},children:w.map((ne,ve)=>n.jsxs("div",{className:"px-3 py-0.5 text-[11px] font-mono",style:{background:ne.type==="added"?"rgba(34,197,94,0.1)":ne.type==="removed"?"rgba(239,68,68,0.1)":"transparent",color:ne.type==="added"?"var(--green)":ne.type==="removed"?"var(--red)":"var(--text-secondary)",borderLeft:ne.type==="added"?"3px solid var(--green)":ne.type==="removed"?"3px solid var(--red)":"3px solid transparent"},children:[n.jsx("span",{style:{userSelect:"none",opacity:.5,marginRight:8},children:ne.type==="added"?"+":ne.type==="removed"?"-":" "}),ne.content]},ve))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:$,disabled:te,className:"btn btn-primary",children:te?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}})," Applying..."]}):n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})})," Apply"]})}),n.jsx("button",{onClick:ue,className:"btn btn-secondary",children:"Discard"})]})]})]})]})}function By({plugin:i,skill:c}){const[d,u]=g.useState([]),[f,m]=g.useState([]),[p,b]=g.useState(!0),[y,x]=g.useState(null);g.useEffect(()=>{Ee.getDependencies(i,c).then(v=>{u(v.mcpDependencies),m(v.skillDependencies)}).catch(()=>{}).finally(()=>b(!1))},[i,c]);async function S(v,w){try{await navigator.clipboard.writeText(w),x(v),setTimeout(()=>x(null),2e3)}catch{}}return p?null:d.length===0&&f.length===0?n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[12px]",style:{background:"var(--surface-2)",color:"var(--text-tertiary)",border:"1px solid var(--border-subtle)"},children:"No dependencies detected"}):n.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[n.jsxs("div",{className:"flex items-center gap-2.5 px-5 py-3.5",style:{background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(234,179,8,0.15)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#eab308",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),n.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}),n.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Dependencies"}),n.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:d.length+f.length})]}),n.jsxs("div",{className:"px-5 py-4",children:[d.length>0&&n.jsxs("div",{className:"space-y-3 mb-4",children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"MCP Servers"}),d.map(v=>n.jsxs("div",{className:"p-3 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:v.server}),n.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:v.transport})]}),n.jsx("button",{onClick:()=>S(v.server,v.configSnippet),className:"btn btn-ghost text-[11px] py-1 px-2",style:{color:y===v.server?"var(--green)":"var(--accent)"},children:y===v.server?n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})})," Copied!"]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),n.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})," Copy Config"]})})]}),n.jsx("div",{className:"text-[11px] mb-2 font-mono",style:{color:"var(--text-tertiary)"},children:v.url}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:v.matchedTools.map(w=>n.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--surface-3)",color:"var(--text-secondary)"},children:w},w))})]},v.server))]}),f.length>0&&n.jsxs("div",{children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-2",style:{color:"var(--text-tertiary)"},children:"Skill Dependencies"}),n.jsx("div",{className:"space-y-1.5",children:f.map(v=>n.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"})}),n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:v.name}),n.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:v.source==="frontmatter"?"frontmatter":"referenced"})]},v.name))})]})]})]})}function Hy({plugin:i,skill:c,evalCase:d,onClose:u}){var ze,ke;const[f,m]=g.useState(null),[p,b]=g.useState("claude-cli"),[y,x]=g.useState("sonnet"),[S,v]=g.useState("claude-cli"),[w,O]=g.useState("opus"),[H,Y]=g.useState("idle"),[z,q]=g.useState(null),[X,W]=g.useState(null),[te,Z]=g.useState(null),{events:Q,running:F,start:$}=ts(),ue=g.useRef(null);g.useEffect(()=>{Ee.getConfig().then(m).catch(()=>{})},[]),g.useEffect(()=>{const k=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=k}},[]),g.useEffect(()=>{function k(R){R.key==="Escape"&&H!=="running_a"&&H!=="running_b"&&u()}return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[u,H]),g.useEffect(()=>{for(const k of Q)k.event==="model_a_start"?Y("running_a"):k.event==="model_a_result"?(q(k.data),Y("running_b")):k.event==="model_b_start"?Y("running_b"):k.event==="model_b_result"?W(k.data):k.event==="done"?Y("complete"):k.event==="error"&&(Z(k.data.error),Y("complete"))},[Q]),g.useEffect(()=>{!F&&(H==="running_a"||H==="running_b")&&Y("complete")},[F,H]);function pe(){q(null),W(null),Z(null),Y("running_a"),$(`/api/skills/${i}/${c}/compare-models`,{eval_id:d.id,modelA:{provider:p,model:y},modelB:{provider:S,model:w}})}const ne=g.useCallback(k=>{k.target===ue.current&&H!=="running_a"&&H!=="running_b"&&u()},[u,H]);function ve(k){return f==null?void 0:f.providers.find(R=>R.id===k&&R.available)}const Ce=H==="running_a"||H==="running_b";return n.jsx("div",{ref:ue,onClick:ne,className:"fixed inset-0 z-50 flex items-center justify-center p-4 animate-overlay-in",style:{background:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)"},children:n.jsxs("div",{className:"w-full max-w-4xl animate-modal-in flex flex-col",style:{background:"var(--surface-1)",border:"1px solid var(--border-default)",borderRadius:"16px",boxShadow:"0 24px 80px rgba(0,0,0,0.5)",maxHeight:"min(90vh, 800px)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4",style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"rgba(99,131,255,0.15)"},children:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M16 3h5v5"}),n.jsx("path",{d:"M8 21H3v-5"}),n.jsx("path",{d:"M21 3l-7 7"}),n.jsx("path",{d:"M3 21l7-7"})]})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-[15px] font-semibold",style:{color:"var(--text-primary)"},children:"Compare Models"}),n.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:["#",d.id," — ",d.name]})]})]}),n.jsx("button",{onClick:u,disabled:Ce,className:"w-8 h-8 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)",opacity:Ce?.3:1},onMouseEnter:k=>{Ce||(k.currentTarget.style.background="var(--surface-3)")},onMouseLeave:k=>{k.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-5",style:{minHeight:0},children:[H==="idle"&&n.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-5",children:[n.jsxs("div",{className:"p-4 rounded-xl",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"Model A"}),n.jsx("select",{className:"input-field text-[12px] py-1.5 mb-2 w-full",value:p,onChange:k=>{b(k.target.value);const R=f==null?void 0:f.providers.find(le=>le.id===k.target.value);R!=null&&R.models[0]&&x(R.models[0].id)},children:f==null?void 0:f.providers.filter(k=>k.available).map(k=>n.jsx("option",{value:k.id,children:k.label},k.id))}),n.jsx("select",{className:"input-field text-[12px] py-1.5 w-full",value:y,onChange:k=>x(k.target.value),children:(ze=ve(p))==null?void 0:ze.models.map(k=>n.jsx("option",{value:k.id,children:k.label},k.id))})]}),n.jsxs("div",{className:"p-4 rounded-xl",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"Model B"}),n.jsx("select",{className:"input-field text-[12px] py-1.5 mb-2 w-full",value:S,onChange:k=>{v(k.target.value);const R=f==null?void 0:f.providers.find(le=>le.id===k.target.value);R!=null&&R.models[0]&&O(R.models[0].id)},children:f==null?void 0:f.providers.filter(k=>k.available).map(k=>n.jsx("option",{value:k.id,children:k.label},k.id))}),n.jsx("select",{className:"input-field text-[12px] py-1.5 w-full",value:w,onChange:k=>O(k.target.value),children:(ke=ve(S))==null?void 0:ke.models.map(k=>n.jsx("option",{value:k.id,children:k.label},k.id))})]})]}),Ce&&n.jsxs("div",{className:"flex items-center justify-center gap-3 py-8",children:[n.jsx("div",{className:"spinner",style:{width:20,height:20}}),n.jsx("span",{className:"text-[13px]",style:{color:"var(--text-secondary)"},children:H==="running_a"?"Model A running...":"Model A done, Model B running..."})]}),te&&n.jsx("div",{className:"mb-4 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:te}),(z||X)&&n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsx(qm,{label:"Model A",result:z}),n.jsx(qm,{label:"Model B",result:X})]})]}),n.jsxs("div",{className:"flex items-center justify-between px-6 py-4",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"Results are ephemeral — not saved to benchmark history"}),n.jsxs("div",{className:"flex gap-2",children:[H==="idle"&&n.jsxs("button",{onClick:pe,className:"btn btn-primary",children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),"Compare"]}),H==="complete"&&n.jsx("button",{onClick:u,className:"btn btn-secondary",children:"Close"})]})]})]})})}function qm({label:i,result:c}){const[d,u]=g.useState(!1);if(!c)return n.jsxs("div",{className:"p-4 rounded-xl",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:i}),n.jsx("div",{className:"flex items-center justify-center py-6",style:{color:"var(--text-tertiary)"},children:n.jsx("span",{className:"text-[12px]",children:"Waiting..."})})]});const f=c.assertions.filter(p=>p.pass).length,m=Math.round(c.passRate*100);return n.jsxs("div",{className:"p-4 rounded-xl",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:i}),n.jsxs("span",{className:"pill",style:{background:m>=80?"var(--green-muted)":m>=50?"var(--yellow-muted)":"var(--red-muted)",color:m>=80?"var(--green)":m>=50?"var(--yellow)":"var(--red)"},children:[m,"%"]})]}),n.jsx("div",{className:"text-[12px] font-medium mb-2",style:{color:"var(--text-primary)"},children:c.model}),n.jsxs("div",{className:"flex gap-3 text-[11px] mb-3",style:{color:"var(--text-tertiary)"},children:[n.jsxs("span",{children:[(c.durationMs/1e3).toFixed(1),"s"]}),c.tokens!=null&&n.jsxs("span",{children:[c.tokens.toLocaleString()," tokens"]}),n.jsxs("span",{children:[f,"/",c.assertions.length," passed"]})]}),n.jsx("div",{className:"space-y-1.5 mb-3",children:c.assertions.map(p=>n.jsxs("div",{className:"flex items-start gap-2 p-2 rounded-lg text-[11px]",style:{background:p.pass?"var(--green-muted)":"var(--red-muted)"},children:[n.jsx("div",{className:"w-3.5 h-3.5 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:p.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"7",height:"7",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:p.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"font-medium",style:{color:"var(--text-primary)"},children:p.text}),n.jsx("div",{className:"mt-0.5",style:{color:"var(--text-secondary)"},children:p.reasoning})]})]},p.id))}),n.jsxs("button",{onClick:()=>u(!d),className:"flex items-center gap-1.5 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:p=>{p.currentTarget.style.color="var(--text-primary)"},onMouseLeave:p=>{p.currentTarget.style.color="var(--text-tertiary)"},children:[n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:d?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})}),d?"Hide Output":"Show Output"]}),d&&n.jsx("pre",{className:"mt-2 text-[11px] leading-relaxed p-3 rounded-lg max-h-40 overflow-y-auto whitespace-pre-wrap animate-fade-in",style:{background:"var(--surface-0)",color:"var(--text-secondary)",fontFamily:"var(--font-mono, monospace)"},children:c.output})]})}function Uy(i,c){return c&&(i==="generating"||i==="comparing"||i==="judging"||i==="judging_assertion")?n.jsx("div",{className:"spinner",style:{width:10,height:10,flexShrink:0}}):n.jsx("div",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{background:i==="generating"||i==="comparing"?"var(--accent)":"var(--green)"}})}function vh({entries:i,isRunning:c}){const[d,u]=g.useState(!1),f=g.useRef(null);return g.useEffect(()=>{f.current&&!d&&(f.current.scrollTop=f.current.scrollHeight)},[i,d]),i.length===0&&!c?null:n.jsxs("div",{className:"mt-2 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("button",{onClick:()=>u(!d),className:"w-full flex items-center justify-between px-3 py-2 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:m=>{m.currentTarget.style.color="var(--text-primary)"},onMouseLeave:m=>{m.currentTarget.style.color="var(--text-tertiary)"},children:[n.jsxs("span",{className:"flex items-center gap-2",children:[c&&n.jsx("div",{className:"spinner",style:{width:10,height:10}}),"Progress Log (",i.length,")"]}),n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:d?"rotate(0)":"rotate(180deg)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),!d&&n.jsx("div",{ref:f,className:"px-3 pb-3 space-y-1 max-h-48 overflow-y-auto",children:i.map((m,p)=>{const b=p===i.length-1&&c,y=p===0?"0s":`+${((m.timestamp-i[0].timestamp)/1e3).toFixed(1)}s`;return n.jsxs("div",{className:"flex items-center gap-2 text-[11px] animate-fade-in",style:{opacity:b?1:.7},children:[Uy(m.phase,b),n.jsx("span",{className:"font-mono flex-shrink-0",style:{color:"var(--text-tertiary)",width:40},children:y}),n.jsx("span",{style:{color:b?"var(--text-primary)":"var(--text-secondary)"},children:m.message}),m.current!=null&&m.total!=null&&n.jsxs("span",{className:"font-mono flex-shrink-0",style:{color:"var(--text-tertiary)"},children:["[",m.current,"/",m.total,"]"]})]},p)})})]})}function qy(){const{plugin:i,skill:c}=Cr(),d=Ql(),[u,f]=g.useState(null),[m,p]=g.useState(!0),[b,y]=g.useState(null),[x,S]=g.useState(!1),[v,w]=g.useState(null),[O,H]=g.useState(!1),{events:Y,running:z,start:q}=ts(),[X,W]=g.useState(null),[te,Z]=g.useState(new Map),[Q,F]=g.useState(new Set),[$,ue]=g.useState(null),[pe,ne]=g.useState(!1),[ve,Ce]=g.useState(null),[ze,ke]=g.useState(""),[k,R]=g.useState(null),[le,se]=g.useState([]);g.useEffect(()=>{!i||!c||(Ee.getEvals(i,c).then(f).catch(J=>y(J.message)).finally(()=>p(!1)),Ee.getSkillDetail(i,c).then(J=>ke(J.skillContent)).catch(()=>{}),Ee.getLatestBenchmark(i,c).then(J=>{ue(J);const ee=new Map;for(const ie of J.cases)ee.set(ie.eval_id,{status:ie.status,passRate:ie.pass_rate,errorMessage:ie.error_message||void 0,durationMs:ie.durationMs,tokens:ie.tokens,assertions:ie.assertions.map(oe=>({assertion_id:oe.id,text:oe.text,pass:oe.pass,reasoning:oe.reasoning}))});Z(ee)}).catch(()=>{}))},[i,c]);async function K(J){if(!(!i||!c)){S(!0);try{const ee=await Ee.saveEvals(i,c,J);f(ee),y(null)}catch(ee){y(ee.message)}finally{S(!1)}}}function N(J){u&&(K({...u,evals:[...u.evals,J]}),H(!1))}function L(J){u&&(K({...u,evals:u.evals.map(ee=>ee.id===J.id?J:ee)}),w(null))}function I(J){!u||!confirm("Delete this eval case?")||K({...u,evals:u.evals.filter(ee=>ee.id!==J)})}function D(J){if(!u)return;const ee=u.evals.find(ie=>ie.id===J);ee&&L({...ee,assertions:[...ee.assertions,{id:`assert-${Date.now()}`,text:"New assertion",type:"boolean"}]})}async function U(J,ee,ie){if(!u)return;const oe=u.evals.find(Pe=>Pe.id===J);if(!oe)return;const tt={...oe,assertions:oe.assertions.map(Pe=>Pe.id===ee?{...Pe,text:ie}:Pe)};await K({...u,evals:u.evals.map(Pe=>Pe.id===tt.id?tt:Pe)}),Te(J)}function P(J,ee){if(!u)return;const ie=u.evals.find(oe=>oe.id===J);ie&&L({...ie,assertions:ie.assertions.filter(oe=>oe.id!==ee)})}async function me(){if(!(!i||!c)){ne(!0),Ce(null);try{const J=await Ee.generateEvals(i,c),ee=await Ee.saveEvals(i,c,J);f(ee),y(null)}catch(J){Ce(J.message)}finally{ne(!1)}}}g.useEffect(()=>{if(!X)return;const J={assertions:[]},ee=[];for(const ie of Y){if(ie.event==="progress"){const oe=ie.data;oe.eval_id===X&&ee.push({timestamp:Date.now(),evalId:oe.eval_id,phase:oe.phase,message:oe.message,current:oe.current,total:oe.total})}if(ie.event==="output_ready"){const oe=ie.data;oe.eval_id===X&&(J.output=oe.output,oe.durationMs!=null&&(J.durationMs=oe.durationMs),oe.tokens!=null&&(J.tokens=oe.tokens))}if(ie.event==="assertion_result"){const oe=ie.data;oe.eval_id===X&&!J.assertions.find(tt=>tt.assertion_id===oe.assertion_id)&&J.assertions.push(oe)}if(ie.event==="case_complete"){const oe=ie.data;oe.eval_id===X&&(J.status=oe.status,J.passRate=oe.pass_rate,J.errorMessage=oe.error_message||void 0)}}se(ee),Z(ie=>new Map(ie).set(X,J))},[Y,X]),g.useEffect(()=>{!z&&X&&W(null)},[z,X]);function Te(J){W(J),se([]),F(ee=>new Set(ee).add(J)),q(`/api/skills/${i}/${c}/benchmark`,{eval_ids:[J]})}function ae(J){F(ee=>{const ie=new Set(ee);return ie.has(J)?ie.delete(J):ie.add(J),ie})}return m?n.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[n.jsx("div",{className:"skeleton h-5 w-48 mb-6"}),n.jsxs("div",{className:"flex gap-2 mb-6",children:[n.jsx("div",{className:"skeleton h-9 w-32 rounded-lg"}),n.jsx("div",{className:"skeleton h-9 w-32 rounded-lg"})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"skeleton h-32 rounded-xl"}),n.jsx("div",{className:"skeleton h-32 rounded-xl"})]})]}):n.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1 text-[13px]",children:[n.jsx(ot,{to:"/",className:"transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:J=>{J.currentTarget.style.color="var(--text-primary)"},onMouseLeave:J=>{J.currentTarget.style.color="var(--text-tertiary)"},children:"Skills"}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsx("span",{style:{color:"var(--text-tertiary)"},children:i}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:c})]}),n.jsx(Dy,{content:ze}),i&&c&&n.jsx(Ly,{plugin:i,skill:c,skillContent:ze,onApplied:J=>{ke(J)}}),i&&c&&n.jsx(By,{plugin:i,skill:c}),u&&n.jsxs("div",{className:"flex items-center gap-2 mt-4 mb-7",children:[n.jsxs(ot,{to:`/skills/${i}/${c}/benchmark`,className:"btn btn-primary",children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),"Run Benchmark"]}),n.jsxs(ot,{to:`/skills/${i}/${c}/compare`,className:"btn btn-purple",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M16 3h5v5"}),n.jsx("path",{d:"M8 21H3v-5"}),n.jsx("path",{d:"M21 3l-7 7"}),n.jsx("path",{d:"M3 21l7-7"})]}),"Compare A/B"]}),n.jsxs(ot,{to:`/skills/${i}/${c}/history`,className:"btn btn-secondary",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"12 6 12 12 16 14"})]}),"History"]})]}),$&&!z&&(()=>{const J=$.cases.filter(Mt=>Mt.status==="pass").length,ee=$.cases.length,ie=$.overall_pass_rate!==void 0?Math.round($.overall_pass_rate*100):ee>0?Math.round(J/ee*100):0,oe=$.cases.reduce((Mt,Vl)=>Mt+(Vl.durationMs??0),0),tt=new Date($.timestamp),Pe=Gy(tt);return n.jsxs("div",{className:"mb-5 px-4 py-3 rounded-lg flex items-center justify-between",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{className:"text-[20px] font-bold",style:{color:ie>=80?"var(--green)":ie>=50?"var(--yellow)":"var(--red)"},children:[ie,"%"]}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:["Last Benchmark — ",J,"/",ee," passed"]}),n.jsxs("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[$.model," · ",Pe,oe>0?` · ${(oe/1e3).toFixed(1)}s`:""]})]})]}),n.jsx("span",{className:"pill",style:{background:ie>=80?"var(--green-muted)":ie>=50?"var(--yellow-muted)":"var(--red-muted)",color:ie>=80?"var(--green)":ie>=50?"var(--yellow)":"var(--red)"},children:ie>=80?"Healthy":ie>=50?"Needs Work":"Failing"})]})})(),b&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:b}),u?n.jsxs("div",{className:"space-y-3 stagger-children",children:[u.evals.map(J=>n.jsxs("div",{className:"glass-card p-5",children:[n.jsxs("div",{className:"flex items-start justify-between mb-3",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",J.id]}),n.jsx("h4",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:J.name})]}),n.jsx("p",{className:"text-[12px] mt-1.5 line-clamp-2",style:{color:"var(--text-tertiary)"},children:J.prompt})]}),n.jsxs("div",{className:"flex gap-1 ml-3",children:[n.jsx("button",{onClick:()=>Te(J.id),disabled:z,className:"btn btn-ghost text-[12px] flex-shrink-0",style:{color:"var(--accent)"},children:X===J.id?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}})," Running..."]}):n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})})," Run"]})}),n.jsxs("button",{onClick:()=>R(J),disabled:z,className:"btn btn-ghost text-[12px]",style:{color:"var(--accent)"},children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M16 3h5v5"}),n.jsx("path",{d:"M8 21H3v-5"}),n.jsx("path",{d:"M21 3l-7 7"}),n.jsx("path",{d:"M3 21l7-7"})]}),"A/B"]}),n.jsx("button",{onClick:()=>{w(J),H(!0)},className:"btn btn-ghost text-[12px]",children:"Edit"}),n.jsx("button",{onClick:()=>I(J.id),className:"btn btn-danger text-[12px]",children:"Delete"})]})]}),n.jsxs("div",{className:"mt-3 pt-3",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Assertions"}),n.jsx("span",{className:"pill",style:{background:"var(--surface-3)",color:"var(--text-tertiary)",fontSize:"10px",padding:"1px 7px"},children:J.assertions.length})]}),n.jsx("div",{className:"space-y-1.5",children:J.assertions.map(ee=>n.jsxs("div",{className:"flex items-center gap-2 group",children:[n.jsx("span",{className:"text-[11px] font-mono w-28 truncate flex-shrink-0",style:{color:"var(--text-tertiary)"},children:ee.id}),n.jsx(Yy,{initialText:ee.text,onCommit:ie=>U(J.id,ee.id,ie),disabled:z}),n.jsx("button",{onClick:()=>P(J.id,ee.id),className:"opacity-0 group-hover:opacity-100 transition-opacity duration-150 p-1 rounded",style:{color:"var(--red)"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},ee.id))}),n.jsxs("button",{onClick:()=>D(J.id),className:"btn btn-ghost text-[12px] mt-2",style:{color:"var(--accent)"},children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Add assertion"]})]}),X===J.id&&le.length>0&&n.jsx(vh,{entries:le,isRunning:z}),(()=>{const ee=te.get(J.id);if(!ee||ee.assertions.length===0&&!ee.status)return null;const ie=Q.has(J.id);return n.jsxs("div",{className:"mt-3 pt-3",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Benchmark Result"}),ee.durationMs!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[(ee.durationMs/1e3).toFixed(1),"s"]}),ee.tokens!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[ee.tokens.toLocaleString()," tok"]})]}),ee.status?n.jsxs("span",{className:"pill",style:{background:ee.status==="pass"?"var(--green-muted)":ee.status==="error"?"var(--yellow-muted)":"var(--red-muted)",color:ee.status==="pass"?"var(--green)":ee.status==="error"?"var(--yellow)":"var(--red)"},children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:ee.status==="pass"?"var(--green)":ee.status==="error"?"var(--yellow)":"var(--red)"}}),ee.status," ",ee.passRate!==void 0?`${Math.round(ee.passRate*100)}%`:""]}):n.jsxs("div",{className:"flex items-center gap-2 text-[12px]",style:{color:"var(--accent)"},children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}}),"Evaluating..."]})]}),ee.status&&n.jsxs("button",{onClick:()=>d(`/skills/${i}/${c}/history?tab=per-eval`),className:"text-[11px] font-medium mb-2 flex items-center gap-1 transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:oe=>{oe.currentTarget.style.color="var(--accent)"},onMouseLeave:oe=>{oe.currentTarget.style.color="var(--text-tertiary)"},children:[n.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"12 6 12 12 16 14"})]}),"View History"]}),ee.errorMessage&&n.jsx("div",{className:"mb-2 p-2 rounded-lg text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:ee.errorMessage}),n.jsx("div",{className:"space-y-1.5",children:ee.assertions.map(oe=>n.jsxs("div",{className:"flex items-start gap-2 p-2 rounded-lg animate-fade-in",style:{background:oe.pass?"var(--green-muted)":"var(--red-muted)"},children:[n.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:oe.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:oe.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:oe.text||oe.assertion_id}),n.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-secondary)"},children:oe.reasoning})]})]},oe.assertion_id))}),ee.output&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{onClick:()=>ae(J.id),className:"mt-2 flex items-center gap-1.5 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:oe=>{oe.currentTarget.style.color="var(--text-primary)"},onMouseLeave:oe=>{oe.currentTarget.style.color="var(--text-tertiary)"},children:[n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:ie?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})}),ie?"Hide Output":"Show LLM Output"]}),ie&&n.jsx("div",{className:"mt-2 text-[11px] leading-relaxed p-3 rounded-lg max-h-48 overflow-y-auto whitespace-pre-wrap animate-fade-in",style:{background:"var(--surface-1)",color:"var(--text-secondary)",fontFamily:"var(--font-mono, monospace)"},children:ee.output})]})]})})()]},J.id)),n.jsx("button",{onClick:()=>{w(null),H(!0)},className:"w-full p-4 rounded-xl text-[13px] font-medium transition-all duration-150",style:{border:"2px dashed var(--border-default)",color:"var(--text-tertiary)",background:"transparent"},onMouseEnter:J=>{J.currentTarget.style.borderColor="var(--accent)",J.currentTarget.style.color="var(--accent)",J.currentTarget.style.background="var(--accent-muted)"},onMouseLeave:J=>{J.currentTarget.style.borderColor="var(--border-default)",J.currentTarget.style.color="var(--text-tertiary)",J.currentTarget.style.background="transparent"},children:"+ Add Eval Case"})]}):n.jsxs("div",{className:"text-center py-16 animate-fade-in-scale",children:[n.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:"var(--surface-2)"},children:pe?n.jsx("div",{className:"spinner",style:{width:28,height:28}}):n.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",children:[n.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),n.jsx("polyline",{points:"14 2 14 8 20 8"})]})}),pe?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[14px] font-medium",style:{color:"var(--text-secondary)"},children:"Generating eval cases..."}),n.jsx("p",{className:"text-[12px] mt-1",style:{color:"var(--text-tertiary)"},children:"This may take 10–30 seconds"})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-[14px] font-medium",style:{color:"var(--text-secondary)"},children:"No evals.json found"}),ve&&n.jsx("div",{className:"mt-3 mx-auto max-w-md px-4 py-3 rounded-lg text-[13px] text-left",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:ve}),n.jsxs("div",{className:"flex items-center justify-center gap-2 mt-3",children:[n.jsxs("button",{onClick:me,className:"btn btn-primary",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]}),"Generate with AI"]}),n.jsx("button",{onClick:()=>H(!0),className:"btn btn-secondary",children:"Create Manually"})]})]})]}),O&&n.jsx(Xy,{evalCase:v,skillName:(u==null?void 0:u.skill_name)||c||"",existingIds:(u==null?void 0:u.evals.map(J=>J.id))||[],onSave:J=>v?L(J):N(J),onCancel:()=>{H(!1),w(null)}}),k&&i&&c&&n.jsx(Hy,{plugin:i,skill:c,evalCase:k,onClose:()=>R(null)}),x&&n.jsxs("div",{className:"fixed bottom-5 right-5 flex items-center gap-2 px-4 py-2.5 rounded-lg text-[13px] animate-fade-in-scale",style:{background:"var(--accent)",color:"#fff",boxShadow:"0 8px 32px rgba(99,131,255,0.3)"},children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)"}}),"Saving..."]})]})}function Yy({initialText:i,onCommit:c,disabled:d}){const[u,f]=g.useState(i),m=g.useRef(i);g.useEffect(()=>{f(i),m.current=i},[i]);function p(){const y=u.trim();y&&y!==m.current&&(m.current=y,c(y))}function b(y){y.key==="Enter"&&(y.preventDefault(),y.target.blur())}return n.jsx("input",{className:"input-field flex-1 text-[12px] py-1.5",style:{background:"transparent",border:"1px solid transparent",borderRadius:"6px"},value:u,onChange:y=>f(y.target.value),onBlur:p,onKeyDown:b,onFocus:y=>{y.currentTarget.style.borderColor="var(--border-default)",y.currentTarget.style.background="var(--surface-2)"},disabled:d})}function Gy(i){const c=Math.floor((Date.now()-i.getTime())/1e3);if(c<60)return"just now";const d=Math.floor(c/60);if(d<60)return`${d}m ago`;const u=Math.floor(d/60);if(u<24)return`${u}h ago`;const f=Math.floor(u/24);return f<30?`${f}d ago`:i.toLocaleDateString()}function Xy({evalCase:i,skillName:c,existingIds:d,onSave:u,onCancel:f}){const[m,p]=g.useState((i==null?void 0:i.name)||""),[b,y]=g.useState((i==null?void 0:i.prompt)||""),[x,S]=g.useState((i==null?void 0:i.expected_output)||""),[v,w]=g.useState((i==null?void 0:i.assertions)||[{id:"assert-1",text:"",type:"boolean"}]),O=g.useRef(null),H=g.useRef(null),Y=g.useRef(null);g.useEffect(()=>{const X=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=X}},[]),g.useEffect(()=>{requestAnimationFrame(()=>{var X;return(X=Y.current)==null?void 0:X.focus()})},[]),g.useEffect(()=>{function X(W){W.key==="Escape"&&f()}return window.addEventListener("keydown",X),()=>window.removeEventListener("keydown",X)},[f]);const z=g.useCallback(X=>{X.target===O.current&&f()},[f]);function q(X){X.preventDefault();const W=(i==null?void 0:i.id)??(d.length>0?Math.max(...d)+1:1);u({id:W,name:m,prompt:b,expected_output:x,files:(i==null?void 0:i.files)||[],assertions:v.filter(te=>te.text.trim())})}return n.jsx("div",{ref:O,onClick:z,className:"fixed inset-0 z-50 grid place-items-center overflow-y-auto p-4 animate-overlay-in",style:{background:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)"},children:n.jsxs("form",{ref:H,onSubmit:q,className:"w-full max-w-2xl animate-modal-in flex flex-col",style:{background:"var(--surface-1)",border:"1px solid var(--border-default)",borderRadius:"16px",boxShadow:"0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04)",maxHeight:"min(85vh, 720px)"},children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 flex-shrink-0",style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"var(--accent-muted)"},children:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:i?n.jsxs(n.Fragment,{children:[n.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),n.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-[15px] font-semibold",style:{color:"var(--text-primary)"},children:i?"Edit Eval Case":"New Eval Case"}),i&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:["#",i.id]})]})]}),n.jsx("button",{type:"button",onClick:f,className:"w-8 h-8 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)",background:"transparent"},onMouseEnter:X=>{X.currentTarget.style.background="var(--surface-3)",X.currentTarget.style.color="var(--text-primary)"},onMouseLeave:X=>{X.currentTarget.style.background="transparent",X.currentTarget.style.color="var(--text-tertiary)"},"aria-label":"Close",children:n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),n.jsxs("div",{className:"overflow-y-auto flex-1 px-6 py-5",style:{minHeight:0},children:[n.jsxs("label",{className:"block mb-5",children:[n.jsx("span",{className:"text-[12px] font-medium mb-1.5 block",style:{color:"var(--text-secondary)"},children:"Name"}),n.jsx("input",{ref:Y,className:"input-field",value:m,onChange:X=>p(X.target.value),required:!0,placeholder:"e.g. basic-test-question"})]}),n.jsxs("label",{className:"block mb-5",children:[n.jsx("span",{className:"text-[12px] font-medium mb-1.5 block",style:{color:"var(--text-secondary)"},children:"Prompt"}),n.jsx("textarea",{className:"input-field resize-y",style:{minHeight:"96px"},value:b,onChange:X=>y(X.target.value),required:!0,placeholder:"The user prompt to test against..."})]}),n.jsxs("label",{className:"block mb-5",children:[n.jsx("span",{className:"text-[12px] font-medium mb-1.5 block",style:{color:"var(--text-secondary)"},children:"Expected Output"}),n.jsx("textarea",{className:"input-field resize-y",style:{minHeight:"80px"},value:x,onChange:X=>S(X.target.value),placeholder:"What a good answer should include..."})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:"Assertions"}),n.jsx("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:v.length})]}),n.jsxs("button",{type:"button",onClick:()=>w([...v,{id:`assert-${v.length+1}`,text:"",type:"boolean"}]),className:"btn btn-ghost text-[12px] py-1 px-2",style:{color:"var(--accent)"},children:[n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Add"]})]}),n.jsx("div",{className:"space-y-2",children:v.map((X,W)=>n.jsxs("div",{className:"flex items-center gap-2 p-2.5 rounded-lg group transition-colors duration-150",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("input",{className:"input-field text-[11px] font-mono py-1.5 px-2",style:{background:"var(--surface-3)",width:"120px",flexShrink:0},value:X.id,onChange:te=>{const Z=[...v];Z[W]={...Z[W],id:te.target.value},w(Z)},placeholder:"ID"}),n.jsx("input",{className:"input-field flex-1 text-[12px] py-1.5 px-2.5",style:{background:"transparent",borderColor:"transparent"},value:X.text,onChange:te=>{const Z=[...v];Z[W]={...Z[W],text:te.target.value},w(Z)},onFocus:te=>{te.currentTarget.style.borderColor="var(--border-default)",te.currentTarget.style.background="var(--surface-1)"},onBlur:te=>{te.currentTarget.style.borderColor="transparent",te.currentTarget.style.background="transparent"},placeholder:"Assertion text"}),n.jsx("button",{type:"button",onClick:()=>w(v.filter((te,Z)=>Z!==W)),className:"w-7 h-7 rounded-md flex items-center justify-center flex-shrink-0 opacity-0 group-hover:opacity-100 transition-all duration-150",style:{color:"var(--red)",background:"transparent"},onMouseEnter:te=>{te.currentTarget.style.background="var(--red-muted)"},onMouseLeave:te=>{te.currentTarget.style.background="transparent"},children:n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},W))}),v.length===0&&n.jsx("div",{className:"text-center py-6 rounded-lg text-[12px]",style:{background:"var(--surface-2)",color:"var(--text-tertiary)",border:"1px dashed var(--border-default)"},children:"No assertions yet. Add one to validate the eval output."})]})]}),n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 flex-shrink-0",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:["Press ",n.jsx("kbd",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--surface-3)",border:"1px solid var(--border-subtle)"},children:"Esc"})," to cancel"]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{type:"button",onClick:f,className:"btn btn-secondary",children:"Cancel"}),n.jsxs("button",{type:"submit",className:"btn btn-primary",children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}),i?"Save Changes":"Create Case"]})]})]})]})})}const xl=220,Jn=32,Ym=4,Gm=28,br=44,Xm=16,oa=40,Qy=52;function yh({title:i,groups:c,seriesColors:d,seriesLabels:u,maxValue:f,formatValue:m=b=>b.toFixed(1),yLabel:p}){const b=u.length,y=b*Jn+(b-1)*Ym,x=br+Xm+c.length*y+(c.length-1)*Gm,S=oa+xl+Qy,v=5,w=Array.from({length:v+1},(O,H)=>f/v*H);return n.jsxs("div",{className:"glass-card p-5 overflow-x-auto animate-fade-in",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-4",style:{color:"var(--text-primary)"},children:i}),n.jsx("div",{className:"flex items-center gap-5 mb-3",children:u.map((O,H)=>n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-3 h-3 rounded-[3px]",style:{background:d[H]}}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:O})]},O))}),n.jsxs("svg",{width:Math.max(x,300),height:S,viewBox:`0 0 ${Math.max(x,300)} ${S}`,style:{display:"block"},children:[p&&n.jsx("text",{x:12,y:oa+xl/2,transform:`rotate(-90, 12, ${oa+xl/2})`,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.05em"},children:p}),w.map(O=>{const H=oa+xl-O/f*xl;return n.jsxs("g",{children:[n.jsx("line",{x1:br,y1:H,x2:Math.max(x,300)-Xm,y2:H,stroke:"var(--border-subtle)",strokeWidth:O===0?1:.5,strokeDasharray:O===0?void 0:"4 4"}),n.jsx("text",{x:br-8,y:H+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:O%1===0?O.toFixed(0):O.toFixed(1)})]},O)}),c.map((O,H)=>{const Y=br+H*(y+Gm);return n.jsxs("g",{children:[O.values.map((z,q)=>{const X=Math.max(0,z.value/f*xl),W=Y+q*(Jn+Ym),te=oa+xl-X;return n.jsxs("g",{children:[n.jsxs("rect",{x:W,y:te,width:Jn,height:X,rx:4,ry:4,fill:d[q],opacity:.85,children:[n.jsx("animate",{attributeName:"height",from:"0",to:X,dur:"0.5s",fill:"freeze"}),n.jsx("animate",{attributeName:"y",from:oa+xl,to:te,dur:"0.5s",fill:"freeze"})]}),n.jsx("text",{x:W+Jn/2,y:te-6,textAnchor:"middle",style:{fill:"var(--text-secondary)",fontSize:10,fontWeight:600},children:m(z.value)}),z.label&&n.jsx("text",{x:W+Jn/2,y:te-17,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:9},children:z.label})]},q)}),n.jsx("text",{x:Y+y/2,y:oa+xl+18,textAnchor:"middle",style:{fill:"var(--text-secondary)",fontSize:11},children:Vy(O.label,14)})]},O.label)})]})]})}function Vy(i,c){return i.length<=c?i:i.slice(0,c-1)+"…"}function Zy(){const{plugin:i,skill:c}=Cr(),[d]=bc(),u=Ql(),{events:f,running:m,done:p,error:b,start:y}=ts(),[x,S]=g.useState(new Set),[v,w]=g.useState(null),[O,H]=g.useState(null),[Y,z]=g.useState(null),[q,X]=g.useState(null),[W,te]=g.useState(!1),[Z,Q]=g.useState(null),[F,$]=g.useState([]),[ue,pe]=g.useState(""),[ne,ve]=g.useState(!1),Ce=g.useRef(!1);g.useEffect(()=>{Ee.getConfig().then(D=>w(D.model)).catch(()=>{}),i&&c&&(Ee.getEvals(i,c).then(H).catch(()=>{}),Ee.getLatestBenchmark(i,c).then(X).catch(()=>{}))},[i,c]),g.useEffect(()=>{if(Ce.current||!i||!c)return;const D=d.get("autostart"),U=d.get("mode");D==="true"&&(Ce.current=!0,U==="baseline"?ke():ze())},[i,c,d]);function ze(D){Ee.getConfig().then(P=>w(P.model)).catch(()=>{}),S(new Set),te(!1),z((D==null?void 0:D.length)===1?D[0]:"all");const U=D?{eval_ids:D}:void 0;y(`/api/skills/${i}/${c}/benchmark`,U)}function ke(){Ee.getConfig().then(D=>w(D.model)).catch(()=>{}),S(new Set),te(!0),z("all"),y(`/api/skills/${i}/${c}/baseline`)}function k(D){if(Z===D){Q(null),$([]),pe("");return}Q(D),pe(""),R(D)}function R(D,U){!i||!c||(ve(!0),Ee.getCaseHistory(i,c,D,U||void 0).then($).catch(()=>$([])).finally(()=>ve(!1)))}function le(D){S(U=>{const P=new Set(U);return P.has(D)?P.delete(D):P.add(D),P})}const se=new Map,K=[];for(const D of f){if(D.event==="progress"){const U=D.data;K.push({timestamp:Date.now(),evalId:U.eval_id,phase:U.phase,message:U.message,current:U.current,total:U.total})}if(D.event==="case_start"){const U=D.data;se.has(U.eval_id)||se.set(U.eval_id,{name:U.eval_name,assertions:[]})}if(D.event==="output_ready"){const U=D.data,P=se.get(U.eval_id)||{assertions:[]};P.output=U.output,U.durationMs!=null&&(P.durationMs=U.durationMs),U.tokens!=null&&(P.tokens=U.tokens),se.set(U.eval_id,P)}if(D.event==="assertion_result"){const U=D.data,P=se.get(U.eval_id)||{assertions:[]};P.assertions.find(me=>me.assertion_id===U.assertion_id)||(P.assertions.push(U),se.set(U.eval_id,P))}if(D.event==="case_complete"){const U=D.data,P=se.get(U.eval_id)||{assertions:[]};P.status=U.status,P.passRate=U.pass_rate,P.errorMessage=U.error_message||void 0,se.set(U.eval_id,P)}}const N=f.find(D=>D.event==="done"),L=N==null?void 0:N.data,I=(L==null?void 0:L.overall_pass_rate)!==void 0?Math.round(L.overall_pass_rate*100):null;return n.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-5 text-[13px]",children:[n.jsx(ot,{to:`/skills/${i}/${c}`,className:"transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:D=>{D.currentTarget.style.color="var(--text-primary)"},onMouseLeave:D=>{D.currentTarget.style.color="var(--text-tertiary)"},children:c}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:W?"Baseline (no skill)":"Benchmark"})]}),n.jsx("div",{className:"mb-3",children:n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"Runs your skill against each eval case. An LLM judge grades every assertion against the actual output."})}),n.jsxs("div",{className:"flex items-center gap-2 mb-7",children:[n.jsx("button",{onClick:()=>ze(),disabled:m,className:"btn btn-primary",children:m&&Y==="all"&&!W?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)",width:14,height:14}})," Running All..."]}):n.jsxs(n.Fragment,{children:[n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})})," Run All (",(O==null?void 0:O.evals.length)??0," cases)"]})}),n.jsx("button",{onClick:()=>ke(),disabled:m,className:"btn btn-ghost",style:{color:"#f97316"},children:m&&W?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#f97316",borderColor:"rgba(249,115,22,0.2)",width:14,height:14}})," Running Baseline..."]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("line",{x1:"4.93",y1:"4.93",x2:"19.07",y2:"19.07"})]})," Run Baseline"]})}),n.jsxs("button",{onClick:()=>u(`/skills/${i}/${c}/compare`),className:"btn btn-purple",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"20",x2:"18",y2:"10"}),n.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"4"}),n.jsx("line",{x1:"6",y1:"20",x2:"6",y2:"14"})]}),"Run A/B"]})]}),b&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:b}),!m&&se.size===0&&q&&(()=>{const D=q.cases.filter(ae=>ae.status==="pass").length,U=q.cases.length,P=q.overall_pass_rate!==void 0?Math.round(q.overall_pass_rate*100):U>0?Math.round(D/U*100):0,me=q.cases.reduce((ae,J)=>ae+(J.durationMs??0),0),Te=new Date(q.timestamp);return n.jsxs("div",{className:"mb-5 px-4 py-3 rounded-lg flex items-center justify-between",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{className:"text-[20px] font-bold",style:{color:P>=80?"var(--green)":P>=50?"var(--yellow)":"var(--red)"},children:[P,"%"]}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:["Last Benchmark — ",D,"/",U," passed"]}),n.jsxs("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[q.model," · ",Te.toLocaleString(),me>0?` · ${(me/1e3).toFixed(1)}s`:""]})]})]}),n.jsx("span",{className:"pill",style:{background:P>=80?"var(--green-muted)":P>=50?"var(--yellow-muted)":"var(--red-muted)",color:P>=80?"var(--green)":P>=50?"var(--yellow)":"var(--red)"},children:P>=80?"Healthy":P>=50?"Needs Work":"Failing"})]})})(),!m&&se.size===0&&O&&O.evals.length>0&&n.jsxs("div",{className:"space-y-2 mb-6",children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-widest mb-2",style:{color:"var(--text-tertiary)"},children:"Eval Cases"}),O.evals.map(D=>{const U=q==null?void 0:q.cases.find(P=>P.eval_id===D.id);return n.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-100",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",D.id]}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[13px] font-medium truncate",style:{color:"var(--text-primary)"},children:D.name}),n.jsxs("div",{className:"text-[11px] truncate mt-0.5",style:{color:"var(--text-tertiary)"},children:[D.assertions.length," assertion",D.assertions.length!==1?"s":""]})]}),U&&n.jsxs("span",{className:"pill flex-shrink-0",style:{background:U.status==="pass"?"var(--green-muted)":U.status==="error"?"var(--yellow-muted)":"var(--red-muted)",color:U.status==="pass"?"var(--green)":U.status==="error"?"var(--yellow)":"var(--red)"},children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:U.status==="pass"?"var(--green)":U.status==="error"?"var(--yellow)":"var(--red)"}}),U.status," ",Math.round(U.pass_rate*100),"%",U.durationMs!=null&&n.jsxs("span",{className:"ml-1 opacity-70",children:[(U.durationMs/1e3).toFixed(1),"s"]})]}),n.jsxs("button",{onClick:()=>ze([D.id]),disabled:m,className:"btn btn-ghost text-[12px] flex-shrink-0",style:{color:"var(--accent)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})}),"Run"]})]},D.id)})]}),se.size>0&&n.jsxs("div",{className:"space-y-3 stagger-children",children:[Array.from(se.entries()).map(([D,U])=>{const P=x.has(D),me=!!U.status,Te=Z===D;return n.jsxs("div",{className:"glass-card overflow-hidden",children:[n.jsxs("div",{className:"p-5",style:{cursor:me?"pointer":"default"},onClick:()=>{me&&k(D)},children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",D]}),n.jsx("h4",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:U.name||"Eval Case"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[U.durationMs!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[(U.durationMs/1e3).toFixed(1),"s"]}),U.tokens!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[U.tokens.toLocaleString()," tok"]}),U.status?n.jsxs("span",{className:"pill",style:{background:U.status==="pass"?"var(--green-muted)":U.status==="error"?"var(--yellow-muted)":"var(--red-muted)",color:U.status==="pass"?"var(--green)":U.status==="error"?"var(--yellow)":"var(--red)"},children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:U.status==="pass"?"var(--green)":U.status==="error"?"var(--yellow)":"var(--red)"}}),U.status," ",U.passRate!==void 0?`${Math.round(U.passRate*100)}%`:""]}):n.jsxs("div",{className:"flex items-center gap-2 text-[12px]",style:{color:"var(--accent)"},children:[n.jsx("div",{className:"spinner",style:{width:12,height:12}}),"Evaluating..."]}),me&&n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:Te?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease",flexShrink:0},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]})]}),U.errorMessage&&n.jsx("div",{className:"mb-3 p-3 rounded-lg text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:U.errorMessage}),n.jsx("div",{className:"space-y-2",children:U.assertions.map(ae=>n.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-lg animate-fade-in",style:{background:ae.pass?"var(--green-muted)":"var(--red-muted)"},children:[n.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:ae.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:ae.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:ae.text||ae.assertion_id}),n.jsx("div",{className:"text-[12px] mt-0.5",style:{color:"var(--text-secondary)"},children:ae.reasoning})]})]},ae.assertion_id))})]}),Te&&n.jsxs("div",{className:"px-5 py-4 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)",background:"var(--surface-1)"},onClick:ae=>ae.stopPropagation(),children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Case History"}),n.jsxs("select",{value:ue,onChange:ae=>{pe(ae.target.value),R(D,ae.target.value)},className:"text-[11px] px-2 py-1 rounded",style:{background:"var(--surface-2)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)"},children:[n.jsx("option",{value:"",children:"All models"}),[...new Set(F.map(ae=>ae.model))].map(ae=>n.jsx("option",{value:ae,children:ae},ae))]})]}),ne?n.jsx("div",{className:"flex items-center justify-center py-4",children:n.jsx("div",{className:"spinner",style:{width:16,height:16}})}):F.length===0?n.jsx("div",{className:"text-[12px] py-3 text-center",style:{color:"var(--text-tertiary)"},children:"No history found for this case."}):n.jsxs(n.Fragment,{children:[F.length>=2&&(()=>{const ae=F.slice().reverse(),J=200,ee=40,ie=4,oe=1,tt=(J-ie*2)/(ae.length-1);return n.jsx("div",{className:"mb-3",children:n.jsxs("svg",{width:J,height:ee,style:{display:"block"},children:[n.jsx("polyline",{points:ae.map((Pe,Mt)=>{const Vl=ie+Mt*tt,ma=ee-ie-Pe.pass_rate/oe*(ee-ie*2);return`${Vl.toFixed(1)},${ma.toFixed(1)}`}).join(" "),fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),ae.map((Pe,Mt)=>{const Vl=ie+Mt*tt,ma=ee-ie-Pe.pass_rate/oe*(ee-ie*2);return n.jsx("circle",{cx:Vl,cy:ma,r:"2.5",fill:"var(--accent)"},Mt)})]})})})(),n.jsx("div",{className:"space-y-1.5",children:F.map((ae,J)=>{const ee=Math.round(ae.pass_rate*100),ie=new Date(ae.timestamp);return n.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg text-[12px]",style:{background:"var(--surface-2)"},children:[n.jsxs("span",{className:"text-[11px] flex-shrink-0",style:{color:"var(--text-tertiary)"},children:[ie.toLocaleDateString()," ",ie.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]}),n.jsx("span",{className:"pill flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-secondary)",fontSize:"10px"},children:ae.model}),n.jsxs("span",{className:"pill flex-shrink-0",style:{background:ee>=80?"var(--green-muted)":ee>=50?"var(--yellow-muted)":"var(--red-muted)",color:ee>=80?"var(--green)":ee>=50?"var(--yellow)":"var(--red)",fontSize:"10px"},children:[ee,"%"]}),ae.durationMs!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[(ae.durationMs/1e3).toFixed(1),"s"]}),ae.tokens!=null&&n.jsxs("span",{className:"text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[ae.tokens.toLocaleString()," tok"]})]},J)})})]})]}),U.output&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{onClick:ae=>{ae.stopPropagation(),le(D)},className:"w-full px-5 py-2.5 flex items-center justify-center gap-2 text-[12px] font-medium transition-all duration-150",style:{background:"var(--surface-2)",color:"var(--text-secondary)",borderTop:"1px solid var(--border-subtle)"},onMouseEnter:ae=>{ae.currentTarget.style.background="var(--surface-3)"},onMouseLeave:ae=>{ae.currentTarget.style.background="var(--surface-2)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:P?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})}),P?"Hide LLM Output":"Show Actual LLM Output"]}),P&&n.jsxs("div",{className:"p-4 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-2",style:{color:"var(--text-tertiary)"},children:"LLM Output"}),n.jsx("div",{className:"text-[12px] leading-relaxed p-3 rounded-lg max-h-64 overflow-y-auto whitespace-pre-wrap",style:{background:"var(--surface-1)",color:"var(--text-secondary)",fontFamily:"var(--font-mono, monospace)"},children:U.output})]})]})]},D)}),p&&se.size>1&&(()=>{const D=Array.from(se.entries());return n.jsx(yh,{title:"Benchmark Results — Pass Rate per Eval",groups:D.map(([P,me])=>{const Te=me.assertions.filter(ee=>ee.pass).length,ae=me.assertions.length,J=ae>0?Te/ae:0;return{label:me.name||`Eval #${P}`,values:[{value:J*100,label:`${Te}/${ae}`}]}}),seriesColors:[D.every(([,P])=>P.status==="pass")?"#34d399":"#6383ff"],seriesLabels:["Pass Rate"],maxValue:100,formatValue:P=>`${Math.round(P)}%`,yLabel:"Accuracy"})})(),p&&I!==null&&(()=>{const D=Array.from(se.values()),U=D.reduce((Te,ae)=>Te+(ae.durationMs??0),0),P=D.reduce((Te,ae)=>Te+(ae.tokens??0),0),me=D.some(Te=>Te.tokens!=null);return n.jsxs("div",{className:"glass-card p-6 text-center animate-fade-in-scale",style:{borderColor:I>=80?"var(--green)":I>=50?"var(--yellow)":"var(--red)",borderWidth:2},children:[n.jsxs("div",{className:"text-[36px] font-bold tracking-tight",style:{color:I>=80?"var(--green)":I>=50?"var(--yellow)":"var(--red)"},children:[I,"%"]}),n.jsx("div",{className:"text-[13px] mt-1",style:{color:"var(--text-tertiary)"},children:Y==="all"?"Overall Pass Rate":"Pass Rate"}),n.jsxs("div",{className:"flex items-center justify-center gap-4 mt-2 text-[11px] font-mono",style:{color:"var(--text-tertiary)"},children:[v&&n.jsx("span",{children:v}),U>0&&n.jsxs("span",{children:[(U/1e3).toFixed(1),"s total"]}),me&&P>0&&n.jsxs("span",{children:[P.toLocaleString()," tokens"]})]})]})})()]}),m&&se.size===0&&n.jsxs("div",{className:"text-center py-16 animate-fade-in",children:[n.jsx("div",{className:"spinner-lg mx-auto mb-4"}),n.jsx("p",{className:"text-[14px]",style:{color:"var(--text-secondary)"},children:"Generating outputs and evaluating assertions..."})]}),K.length>0&&n.jsx("div",{className:"glass-card mt-3 overflow-hidden",children:n.jsx(vh,{entries:K,isRunning:m})})]})}const Qm={EFFECTIVE:{bg:"var(--green-muted)",text:"var(--green)",border:"var(--green)",glow:"rgba(52,211,153,0.15)"},MARGINAL:{bg:"var(--yellow-muted)",text:"var(--yellow)",border:"var(--yellow)",glow:"rgba(251,191,36,0.15)"},INEFFECTIVE:{bg:"rgba(251,146,60,0.12)",text:"var(--orange)",border:"var(--orange)",glow:"rgba(251,146,60,0.15)"},DEGRADING:{bg:"var(--red-muted)",text:"var(--red)",border:"var(--red)",glow:"rgba(248,113,113,0.15)"}};function $y(){const{plugin:i,skill:c}=Cr(),{events:d,running:u,done:f,error:m,start:p}=ts(),[b,y]=g.useState(new Set),[x,S]=g.useState(null),[v]=bc(),w=g.useRef(!1);g.useEffect(()=>{Ee.getConfig().then(Q=>S(Q.model)).catch(()=>{})},[]),g.useEffect(()=>{v.get("autostart")==="true"&&!w.current&&i&&c&&(w.current=!0,y(new Set),p(`/api/skills/${i}/${c}/compare`))},[v,i,c]);function O(){y(new Set),p(`/api/skills/${i}/${c}/compare`)}function H(Q){y(F=>{const $=new Set(F);return $.has(Q)?$.delete(Q):$.add(Q),$})}const Y=[],z=[],q=[];for(const Q of d)if(Q.event==="outputs_ready"){const F=Q.data;Y.find($=>$.eval_id===F.eval_id)||Y.push(F)}else if(Q.event==="case_error"){const F=Q.data;z.find($=>$.eval_id===F.eval_id)||z.push(F)}else if(Q.event==="case_start"){const F=Q.data;q.find($=>$.eval_id===F.eval_id)||q.push(F)}const X=new Set([...Y.map(Q=>Q.eval_id),...z.map(Q=>Q.eval_id)]),W=q.filter(Q=>!X.has(Q.eval_id)).pop(),te=d.find(Q=>Q.event==="done"),Z=te==null?void 0:te.data;return n.jsxs("div",{className:"px-10 py-8 max-w-6xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-5 text-[13px]",children:[n.jsx(ot,{to:`/skills/${i}/${c}`,className:"transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:Q=>{Q.currentTarget.style.color="var(--text-primary)"},onMouseLeave:Q=>{Q.currentTarget.style.color="var(--text-tertiary)"},children:c}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"A/B Comparison"})]}),n.jsxs("div",{className:"mb-3",children:[n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"Runs each eval prompt twice: once WITH your skill, once WITHOUT. An LLM judge scores both outputs blindly on content and structure (1-5 each)."}),x&&n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5",children:[n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"Model:"}),n.jsx("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--accent)"},children:x})]})]}),n.jsx("button",{onClick:O,disabled:u,className:"btn btn-purple mb-7",children:u?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)",width:14,height:14}})," Comparing..."]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M16 3h5v5"}),n.jsx("path",{d:"M8 21H3v-5"}),n.jsx("path",{d:"M21 3l-7 7"}),n.jsx("path",{d:"M3 21l7-7"})]})," Run Comparison"]})}),m&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:m}),(Z==null?void 0:Z.error)&&n.jsxs("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:[n.jsx("span",{className:"font-semibold",children:"Error:"})," ",Z.error]}),z.length>0&&n.jsx("div",{className:"space-y-2 mb-5",children:z.map(Q=>n.jsxs("div",{className:"px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:[n.jsxs("span",{className:"font-semibold",children:["Eval #",Q.eval_id," failed:"]})," ",Q.error]},Q.eval_id))}),Y.length>0&&n.jsxs("div",{className:"space-y-4 stagger-children",children:[Y.map(Q=>{const F=b.has(Q.eval_id),$=Q.winner==="skill"?"Skill Wins":Q.winner==="baseline"?"Baseline Wins":"Tie",ue=Q.winner==="skill"?"var(--green)":Q.winner==="baseline"?"var(--red)":"var(--text-tertiary)";return n.jsxs("div",{className:"glass-card overflow-hidden",children:[n.jsxs("div",{className:"p-5 pb-4",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",Q.eval_id]}),n.jsx("h4",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:Q.eval_name||"Eval Case"})]}),n.jsx("span",{className:"pill",style:{background:Q.winner==="skill"?"var(--green-muted)":Q.winner==="baseline"?"var(--red-muted)":"var(--surface-3)",color:ue,fontWeight:700},children:$})]}),n.jsxs("div",{className:"mb-4 p-3 rounded-lg",style:{background:"var(--surface-2)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-1.5",style:{color:"var(--text-tertiary)"},children:"Prompt"}),n.jsx("div",{className:"text-[12px] leading-relaxed",style:{color:"var(--text-secondary)"},children:Q.prompt})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsx(Vm,{label:"WITH Skill",contentScore:Q.skillContentScore,structureScore:Q.skillStructureScore,isWinner:Q.winner==="skill"}),n.jsx(Vm,{label:"WITHOUT Skill",contentScore:Q.baselineContentScore,structureScore:Q.baselineStructureScore,isWinner:Q.winner==="baseline"})]})]}),n.jsxs("button",{onClick:()=>H(Q.eval_id),className:"w-full px-5 py-3 flex items-center justify-center gap-2 text-[12px] font-medium transition-all duration-150",style:{background:"var(--surface-2)",color:"var(--text-secondary)",borderTop:"1px solid var(--border-subtle)"},onMouseEnter:pe=>{pe.currentTarget.style.background="var(--surface-3)"},onMouseLeave:pe=>{pe.currentTarget.style.background="var(--surface-2)"},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:F?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})}),F?"Hide LLM Outputs":"Show Actual LLM Outputs"]}),F&&n.jsxs("div",{className:"grid grid-cols-2 gap-0 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx($m,{label:"WITH Skill",output:Q.skillOutput,accentColor:Q.winner==="skill"?"var(--green)":void 0}),n.jsx($m,{label:"WITHOUT Skill",output:Q.baselineOutput,accentColor:Q.winner==="baseline"?"var(--red)":void 0,hasBorderLeft:!0})]})]},Q.eval_id)}),f&&Y.length>1&&n.jsx(yh,{title:"Score Comparison — With Skill vs Without",groups:Y.map(Q=>({label:Q.eval_name||`Eval #${Q.eval_id}`,values:[{value:(Q.skillContentScore+Q.skillStructureScore)/2,label:`${Q.skillContentScore+Q.skillStructureScore}/10`},{value:(Q.baselineContentScore+Q.baselineStructureScore)/2,label:`${Q.baselineContentScore+Q.baselineStructureScore}/10`}]})),seriesColors:["#6383ff","#a0a0a0"],seriesLabels:["With Skill","Without Skill"],maxValue:5,yLabel:"Avg Score"}),f&&(Z==null?void 0:Z.verdict)&&(()=>{const Q=Qm[Z.verdict]||Qm.INEFFECTIVE;return n.jsxs("div",{className:"glass-card p-8 text-center animate-fade-in-scale",style:{borderColor:Q.border,borderWidth:2,boxShadow:`0 0 40px ${Q.glow}`},children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-widest mb-2",style:{color:"var(--text-tertiary)"},children:"Verdict"}),n.jsx("div",{className:"text-[32px] font-bold tracking-tight",style:{color:Q.text},children:Z.verdict}),Z.comparison&&n.jsxs("div",{className:"flex justify-center gap-8 mt-5",children:[n.jsx(ac,{label:"Skill Avg",value:Z.comparison.skillRubricAvg.toFixed(1)}),n.jsx(ac,{label:"Baseline Avg",value:Z.comparison.baselineRubricAvg.toFixed(1)}),n.jsx(ac,{label:"Delta",value:`${Z.comparison.delta>0?"+":""}${Z.comparison.delta.toFixed(1)}`,color:Z.comparison.delta>0?"var(--green)":Z.comparison.delta<0?"var(--red)":"var(--text-secondary)"})]}),Z.overall_pass_rate!==void 0&&n.jsxs("div",{className:"text-[12px] mt-3",style:{color:"var(--text-tertiary)"},children:["Assertion pass rate: ",Math.round(Z.overall_pass_rate*100),"%"]})]})})()]}),u&&Y.length===0&&z.length===0&&n.jsxs("div",{className:"text-center py-16 animate-fade-in",children:[n.jsx("div",{className:"spinner-lg mx-auto mb-4"}),n.jsx("p",{className:"text-[14px]",style:{color:"var(--text-secondary)"},children:"Generating WITH and WITHOUT outputs..."}),n.jsx("p",{className:"text-[12px] mt-1",style:{color:"var(--text-tertiary)"},children:W?`Processing: ${W.eval_name||`Eval #${W.eval_id}`}`:"Then blind-scoring both responses"})]})]})}function Vm({label:i,contentScore:c,structureScore:d,isWinner:u}){const f=((c+d)/2).toFixed(1),m=parseFloat(f),p=m>=4?"var(--green)":m>=3?"var(--yellow)":"var(--red)";return n.jsxs("div",{className:"rounded-xl p-4",style:{background:"var(--surface-2)",border:u?"1px solid var(--green)":"1px solid transparent",boxShadow:u?"0 0 20px var(--green-muted)":"none"},children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wide",style:{color:"var(--text-tertiary)"},children:i}),n.jsx("div",{className:"text-[16px] font-bold",style:{color:p},children:f})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(Zm,{label:"Content",score:c}),n.jsx(Zm,{label:"Structure",score:d})]})]})}function Zm({label:i,score:c}){const d=c/5*100,u=c>=4?"var(--green)":c>=3?"var(--yellow)":"var(--red)";return n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"text-[11px] w-16",style:{color:"var(--text-tertiary)"},children:i}),n.jsx("div",{className:"flex-1 h-1.5 rounded-full",style:{background:"var(--surface-3)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${d}%`,background:u}})}),n.jsx("div",{className:"text-[12px] font-semibold w-5 text-right",style:{color:u},children:c})]})}function $m({label:i,output:c,accentColor:d,hasBorderLeft:u}){return n.jsxs("div",{className:"p-4",style:{borderLeft:u?"1px solid var(--border-subtle)":void 0},children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d&&n.jsx("div",{className:"w-2 h-2 rounded-full",style:{background:d}}),n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:d||"var(--text-tertiary)"},children:i})]}),n.jsx("div",{className:"text-[12px] leading-relaxed p-3 rounded-lg max-h-64 overflow-y-auto whitespace-pre-wrap",style:{background:"var(--surface-1)",color:"var(--text-secondary)",fontFamily:"var(--font-mono, monospace)"},children:c||"(empty output)"})]})}function ac({label:i,value:c,color:d}){return n.jsxs("div",{className:"text-center",children:[n.jsx("div",{className:"text-[18px] font-bold",style:{color:d||"var(--text-primary)"},children:c}),n.jsx("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:i})]})}const nc={benchmark:"#6383ff",comparison:"#a78bfa",baseline:"#fb923c"},Km={benchmark:"Benchmark",comparison:"Comparison",baseline:"Baseline"},dc=600,fc=180,ct=40,sc=dc-ct*2,Gl=fc-ct*2,Ky=[25,50,75,100];function Jm(i){return new Date(i).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Jy({entries:i}){const[c,d]=g.useState(null);if(i.length<2)return null;const u=i.length,f=i.map((b,y)=>{const x=ct+y/(u-1)*sc,S=b.passRate*100,v=ct+Gl-S/100*Gl;return{x,y:v,pct:S,entry:b}}),m=f.map(b=>`${b.x},${b.y}`).join(" "),p=Array.from(new Set(i.map(b=>b.type)));return n.jsxs("div",{className:"glass-card p-5 animate-fade-in",style:{position:"relative"},children:[n.jsx("div",{className:"text-[13px] font-semibold mb-2",style:{color:"var(--text-primary)"},children:"Pass Rate Trend"}),n.jsx("div",{className:"flex items-center gap-5 mb-3",children:p.map(b=>n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("div",{className:"w-3 h-3 rounded-full",style:{background:nc[b]??"var(--text-tertiary)"}}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:Km[b]??b})]},b))}),n.jsxs("svg",{width:dc,height:fc,viewBox:`0 0 ${dc} ${fc}`,style:{display:"block",overflow:"visible"},children:[Ky.map(b=>{const y=ct+Gl-b/100*Gl;return n.jsxs("g",{children:[n.jsx("line",{x1:ct,y1:y,x2:ct+sc,y2:y,stroke:"var(--border-subtle)",strokeWidth:.5,strokeDasharray:"4 4"}),n.jsxs("text",{x:ct-8,y:y+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:[b,"%"]})]},b)}),n.jsx("line",{x1:ct,y1:ct+Gl,x2:ct+sc,y2:ct+Gl,stroke:"var(--border-subtle)",strokeWidth:1}),n.jsx("text",{x:ct-8,y:ct+Gl+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:"0%"}),n.jsx("polyline",{points:m,fill:"none",stroke:"var(--border-subtle)",strokeWidth:1.5,strokeLinejoin:"round"}),f.map((b,y)=>n.jsx("circle",{cx:b.x,cy:b.y,r:5,fill:nc[b.entry.type]??"var(--text-tertiary)",stroke:"var(--surface-2)",strokeWidth:2,style:{cursor:"pointer",transition:"r 0.15s ease"},onMouseEnter:x=>{x.currentTarget.setAttribute("r","7"),d({x:b.x,y:b.y,entry:b.entry})},onMouseLeave:x=>{x.currentTarget.setAttribute("r","5"),d(null)}},y)),Wy(u).map(b=>n.jsx("text",{x:f[b].x,y:ct+Gl+16,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:10},children:Jm(i[b].timestamp)},b))]}),c&&n.jsxs("div",{style:{position:"absolute",left:c.x,top:c.y-12,transform:"translate(-50%, -100%)",background:"var(--surface-3)",border:"1px solid var(--border-subtle)",borderRadius:8,padding:"8px 12px",pointerEvents:"none",zIndex:10,whiteSpace:"nowrap"},children:[n.jsx("div",{className:"text-[11px] font-medium",style:{color:"var(--text-primary)"},children:Jm(c.entry.timestamp)}),n.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-tertiary)"},children:c.entry.model}),n.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[n.jsx("span",{className:"text-[9px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:nc[c.entry.type]??"var(--text-tertiary)",color:"#fff"},children:Km[c.entry.type]??c.entry.type}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--text-primary)"},children:[Math.round(c.entry.passRate*100),"%"]})]})]})]})}function Wy(i){return i<=3?Array.from({length:i},(c,d)=>d):i<=6?[0,Math.floor(i/2),i-1]:[0,Math.floor(i/3),Math.floor(2*i/3),i-1]}function Wm(i){return i>=.8?"var(--green)":i>=.5?"var(--yellow)":"var(--red)"}function Fy(i){const c=new Date(i);return c.toLocaleDateString(void 0,{month:"short",day:"numeric"})+", "+c.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function Py(i){return i==null?"--":i>=1e3?`${(i/1e3).toFixed(1)}s`:`${i}ms`}function Iy({entries:i}){if(i.length<2)return null;const c=80,d=24,u=2,f=i.slice().reverse(),m=f.length,p=f.map((b,y)=>{const x=u+y/(m-1)*(c-u*2),S=u+(d-u*2)-b.pass_rate*(d-u*2);return`${x},${S}`});return n.jsxs("svg",{width:c,height:d,style:{display:"block",flexShrink:0},children:[n.jsx("polyline",{points:p.join(" "),fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),p.length>0&&n.jsx("circle",{cx:parseFloat(p[p.length-1].split(",")[0]),cy:parseFloat(p[p.length-1].split(",")[1]),r:2.5,fill:"var(--accent)"})]})}function e1({plugin:i,skill:c}){const[d,u]=g.useState(null),[f,m]=g.useState(null),[p,b]=g.useState({}),[y,x]=g.useState({});g.useEffect(()=>{Ee.getEvals(i,c).then(u).catch(()=>u(null))},[i,c]);async function S(v){if(f===v){m(null);return}if(m(v),!p[v]){x(w=>({...w,[v]:!0}));try{const w=await Ee.getCaseHistory(i,c,v);b(O=>({...O,[v]:w}))}catch{b(w=>({...w,[v]:[]}))}finally{x(w=>({...w,[v]:!1}))}}}return d?n.jsx("div",{className:"space-y-2 stagger-children",children:d.evals.map(v=>{const w=p[v.id]||[],O=f===v.id,H=y[v.id],Y=w.length>0?w[0].pass_rate:null;return n.jsxs("div",{className:"glass-card overflow-hidden",children:[n.jsxs("button",{onClick:()=>S(v.id),className:"w-full text-left p-4 flex items-center gap-3 transition-colors duration-150",style:{background:O?"var(--surface-2)":"transparent"},onMouseEnter:z=>{O||(z.currentTarget.style.background="var(--surface-2)")},onMouseLeave:z=>{O||(z.currentTarget.style.background="transparent")},children:[n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",strokeLinecap:"round",style:{transform:O?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease",flexShrink:0},children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",v.id]}),n.jsx("span",{className:"text-[13px] font-medium flex-1 truncate",style:{color:"var(--text-primary)"},children:v.name}),w.length>=2&&n.jsx(Iy,{entries:w}),Y!=null&&n.jsxs("span",{className:"text-[12px] font-semibold flex-shrink-0",style:{color:Wm(Y)},children:[Math.round(Y*100),"%"]}),w.length>0&&n.jsxs("span",{className:"text-[10px] flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[w.length," runs"]})]}),O&&n.jsx("div",{className:"border-t animate-fade-in",style:{borderColor:"var(--border-subtle)"},children:H?n.jsxs("div",{className:"p-4 flex items-center gap-2",children:[n.jsx("div",{className:"spinner",style:{width:14,height:14}}),n.jsx("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading history..."})]}):w.length===0?n.jsx("div",{className:"p-4",children:n.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"No history for this eval case"})}):n.jsx("div",{className:"divide-y",style:{borderColor:"var(--border-subtle)"},children:w.map((z,q)=>n.jsxs("div",{className:"p-4",style:{background:q===0?"var(--surface-2)":"transparent"},children:[n.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[n.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:Fy(z.timestamp)}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:z.model}),n.jsx("span",{className:"pill",style:{fontSize:9,padding:"1px 6px",background:z.type==="benchmark"?"rgba(99,131,255,0.15)":z.type==="comparison"?"var(--purple-muted)":"rgba(251,146,60,0.15)",color:z.type==="benchmark"?"#6383ff":z.type==="comparison"?"var(--purple)":"#fb923c"},children:z.type}),n.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:Wm(z.pass_rate)},children:[Math.round(z.pass_rate*100),"%"]})]}),n.jsxs("div",{className:"flex items-center gap-4 mb-2 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[z.durationMs!=null&&n.jsx("span",{children:Py(z.durationMs)}),z.tokens!=null&&n.jsxs("span",{children:[z.tokens>=1e3?`${(z.tokens/1e3).toFixed(1)}k`:z.tokens," tok"]})]}),n.jsx("div",{className:"space-y-1",children:z.assertions.map(X=>n.jsxs("div",{className:"flex items-start gap-2 py-0.5",children:[n.jsx("div",{className:"w-3.5 h-3.5 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:X.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"7",height:"7",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",children:X.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[11px]",style:{color:"var(--text-primary)"},children:X.text}),X.reasoning&&n.jsx("div",{className:"text-[10px] mt-0.5",style:{color:"var(--text-tertiary)"},children:X.reasoning})]})]},X.id))})]},q))})})]},v.id)})}):n.jsx("div",{className:"text-center py-12",children:n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No eval cases found"})})}function wr(i){return i>=.8?"var(--green)":i>=.5?"var(--yellow)":"var(--red)"}function t1(i){return i>=1e3?`${(i/1e3).toFixed(1)}s`:`${Math.round(i)}ms`}function l1({rate:i,label:c}){const d=Math.round(i*100);return n.jsx("div",{className:"flex items-center gap-3",children:n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-[11px] truncate",style:{color:"var(--text-primary)",maxWidth:"70%"},children:c}),n.jsxs("span",{className:"text-[11px] font-semibold",style:{color:wr(i)},children:[d,"%"]})]}),n.jsx("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:"var(--surface-3)"},children:n.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${d}%`,background:wr(i)}})})]})})}function a1({points:i}){if(i.length<2)return null;const c=200,d=48,u=4,f=i.length,m=i.map((y,x)=>{const S=u+x/(f-1)*(c-u*2),v=u+(d-u*2)-y.passRate*(d-u*2);return{x:S,y:v}}),p=`M ${m[0].x},${d-u} `+m.map(y=>`L ${y.x},${y.y}`).join(" ")+` L ${m[m.length-1].x},${d-u} Z`,b=m.map((y,x)=>`${x===0?"M":"L"} ${y.x},${y.y}`).join(" ");return n.jsxs("svg",{width:c,height:d,style:{display:"block"},children:[n.jsx("path",{d:p,fill:"var(--accent-muted)"}),n.jsx("path",{d:b,fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),n.jsx("circle",{cx:m[m.length-1].x,cy:m[m.length-1].y,r:3,fill:"var(--accent)"})]})}function n1({plugin:i,skill:c}){const d=Ql(),[u,f]=g.useState(null),[m,p]=g.useState(!0);if(g.useEffect(()=>{p(!0),Ee.getStats(i,c).then(f).catch(()=>f(null)).finally(()=>p(!1))},[i,c]),m)return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"skeleton h-24 rounded-xl"}),n.jsx("div",{className:"skeleton h-48 rounded-xl"}),n.jsx("div",{className:"skeleton h-36 rounded-xl"})]});if(!u||u.totalRuns===0)return n.jsxs("div",{className:"text-center py-12",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"var(--surface-2)"},children:n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",children:[n.jsx("path",{d:"M18 20V10"}),n.jsx("path",{d:"M12 20V4"}),n.jsx("path",{d:"M6 20v-6"})]})}),n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark data yet"}),n.jsx("p",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:"Run some benchmarks to see statistics"})]});const b=u.trendPoints.length>0?u.trendPoints[u.trendPoints.length-1].passRate:0,y=u.trendPoints.length>0?u.trendPoints[0].passRate:0,x=b-y,S=u.assertionStats.slice(0,10);return n.jsxs("div",{className:"space-y-4 stagger-children",children:[n.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Total Runs"}),n.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:u.totalRuns})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Latest Pass Rate"}),n.jsxs("div",{className:"text-[24px] font-bold",style:{color:wr(b)},children:[Math.round(b*100),"%"]})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Trend"}),n.jsxs("div",{className:"text-[24px] font-bold",style:{color:x>=0?"var(--green)":"var(--red)"},children:[x>=0?"+":"",Math.round(x*100),"%"]})]}),n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Models Tested"}),n.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:u.modelStats.length})]})]}),u.trendPoints.length>=2&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Pass Rate Over Time"}),n.jsx(a1,{points:u.trendPoints})]}),u.modelStats.length>0&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Model Performance"}),n.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[n.jsx("thead",{children:n.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("th",{style:{textAlign:"left",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Model"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Runs"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Pass Rate"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Duration"})]})}),n.jsx("tbody",{children:u.modelStats.map(v=>n.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("td",{style:{padding:"8px",color:"var(--text-primary)",fontWeight:500},children:v.model}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:v.runs}),n.jsx("td",{style:{padding:"8px",textAlign:"center"},children:n.jsxs("span",{className:"font-semibold",style:{color:wr(v.avgPassRate)},children:[Math.round(v.avgPassRate*100),"%"]})}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:t1(v.avgDurationMs)})]},v.model))})]})]}),S.length>0&&n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Weakest Assertions"}),n.jsx("div",{className:"space-y-3",children:S.map(v=>n.jsxs("button",{className:"block w-full text-left rounded-lg p-2 -mx-2 transition-colors duration-150",style:{background:"transparent"},onMouseEnter:w=>{w.currentTarget.style.background="var(--surface-2)"},onMouseLeave:w=>{w.currentTarget.style.background="transparent"},onClick:()=>d(`/skills/${i}/${c}/history?tab=per-eval`),children:[n.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[n.jsxs("span",{className:"text-[10px] font-mono px-1 py-0.5 rounded flex-shrink-0",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",v.evalId]}),n.jsx("span",{className:"text-[10px] truncate",style:{color:"var(--text-tertiary)"},children:v.evalName}),n.jsxs("span",{className:"text-[10px] ml-auto flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[v.totalRuns," runs"]})]}),n.jsx(l1,{rate:v.passRate,label:v.text})]},`${v.evalId}:${v.id}`))})]})]})}function gh(i){const c=new Date(i);return c.toLocaleDateString(void 0,{month:"short",day:"numeric"})+", "+c.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function Mr(i){return i==null?"--":i>=1e3?`${(i/1e3).toFixed(1)}s`:`${i}ms`}function Fn(i){return i==null?"--":i>=1e3?`${(i/1e3).toFixed(1)}k tok`:`${i} tok`}function kr(i){return i>=.8?"var(--green)":i>=.5?"var(--yellow)":"var(--red)"}const s1={benchmark:{bg:"rgba(99,131,255,0.15)",fg:"#6383ff",label:"Benchmark"},comparison:{bg:"var(--purple-muted)",fg:"var(--purple)",label:"A/B"},baseline:{bg:"rgba(251,146,60,0.15)",fg:"#fb923c",label:"Baseline"}};function bh(i){return i?i==="EFFECTIVE"?"var(--green)":i==="MARGINAL"?"var(--yellow)":i==="DEGRADING"?"var(--red)":"var(--text-secondary)":"var(--text-tertiary)"}function r1({models:i,filters:c,onChange:d}){const u=!!(c.model||c.type||c.from||c.to),f={background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:8,padding:"4px 8px",fontSize:12,color:"var(--text-primary)",outline:"none"};return n.jsxs("div",{className:"flex items-center gap-3 flex-wrap animate-fade-in",style:{marginBottom:16},children:[n.jsxs("select",{value:c.model??"",onChange:m=>d({...c,model:m.target.value||void 0}),style:f,children:[n.jsx("option",{value:"",children:"All models"}),i.map(m=>n.jsx("option",{value:m,children:m},m))]}),n.jsxs("select",{value:c.type??"",onChange:m=>d({...c,type:m.target.value||void 0}),style:f,children:[n.jsx("option",{value:"",children:"All types"}),n.jsx("option",{value:"benchmark",children:"Benchmark"}),n.jsx("option",{value:"comparison",children:"Comparison"}),n.jsx("option",{value:"baseline",children:"Baseline"})]}),n.jsx("input",{type:"date",value:c.from??"",onChange:m=>d({...c,from:m.target.value||void 0}),style:f,placeholder:"From"}),n.jsx("input",{type:"date",value:c.to??"",onChange:m=>d({...c,to:m.target.value||void 0}),style:f,placeholder:"To"}),u&&n.jsx("button",{className:"btn btn-ghost",style:{fontSize:12,padding:"4px 10px"},onClick:()=>d({}),children:"Clear Filters"})]})}function i1({result:i}){const{runA:c,runB:d,caseDiffs:u}=i;return n.jsxs("div",{className:"space-y-3 animate-slide-in-right",children:[n.jsx("div",{className:"glass-card p-4",children:n.jsx("div",{className:"grid grid-cols-2 gap-4",children:[c,d].map((f,m)=>n.jsxs("div",{children:[n.jsxs("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:["Run ",m===0?"A":"B"]}),n.jsx("div",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:gh(f.timestamp)}),n.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-tertiary)"},children:f.model}),n.jsxs("div",{className:"text-[12px] font-semibold mt-1",style:{color:kr(f.passRate)},children:[Math.round(f.passRate*100),"% pass"]})]},m))})}),n.jsx("div",{className:"glass-card p-4 overflow-x-auto",children:n.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[n.jsx("thead",{children:n.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("th",{style:{textAlign:"left",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Case"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Run A"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Run B"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Duration"}),n.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Tokens"})]})}),n.jsx("tbody",{children:u.map(f=>{const m=f.statusA==="pass"&&f.statusB!=="pass",p=f.statusA!=="pass"&&f.statusB==="pass",b=m?"var(--red-muted)":p?"var(--green-muted)":"transparent";return n.jsxs("tr",{style:{background:b,borderBottom:"1px solid var(--border-subtle)"},children:[n.jsx("td",{style:{padding:"8px",color:"var(--text-primary)",fontWeight:500},children:f.eval_name}),n.jsx("td",{style:{padding:"8px",textAlign:"center"},children:f.statusA==="missing"?n.jsx("span",{className:"pill",style:{background:"var(--surface-3)",color:"var(--text-tertiary)",fontSize:9,padding:"1px 6px"},children:"removed"}):n.jsxs("span",{style:{color:kr(f.passRateA??0),fontWeight:600,fontFamily:"var(--font-mono, monospace)"},children:[f.statusA," ",f.passRateA!=null?`${Math.round(f.passRateA*100)}%`:""]})}),n.jsx("td",{style:{padding:"8px",textAlign:"center"},children:f.statusB==="missing"?n.jsx("span",{className:"pill",style:{background:"var(--surface-3)",color:"var(--text-tertiary)",fontSize:9,padding:"1px 6px"},children:"new"}):n.jsxs("span",{style:{color:kr(f.passRateB??0),fontWeight:600,fontFamily:"var(--font-mono, monospace)"},children:[f.statusB," ",f.passRateB!=null?`${Math.round(f.passRateB*100)}%`:""]})}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",fontSize:11,color:"var(--text-secondary)"},children:f.durationMsA!=null||f.durationMsB!=null?`${Mr(f.durationMsA??void 0)} / ${Mr(f.durationMsB??void 0)}`:"--"}),n.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",fontSize:11,color:"var(--text-secondary)"},children:f.tokensA!=null||f.tokensB!=null?`${Fn(f.tokensA)} / ${Fn(f.tokensB)}`:"--"})]},f.eval_id)})})]})}),i.regressions.length>0&&n.jsxs("div",{className:"glass-card p-4",children:[n.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-widest mb-2",style:{color:"var(--text-tertiary)"},children:["Assertion Changes (",i.regressions.length,")"]}),n.jsx("div",{className:"space-y-1",children:i.regressions.map((f,m)=>n.jsxs("div",{className:"flex items-center gap-2 text-[12px]",style:{color:f.change==="regression"?"var(--red)":"var(--green)"},children:[n.jsx("span",{children:f.change==="regression"?"↓":"↑"}),n.jsxs("span",{style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)",fontSize:10},children:["#",f.evalId]}),n.jsx("span",{style:{color:"var(--text-primary)"},children:f.evalName}),n.jsx("span",{className:"pill",style:{background:f.change==="regression"?"var(--red-muted)":"var(--green-muted)",color:f.change==="regression"?"var(--red)":"var(--green)",fontSize:9,padding:"1px 6px"},children:f.change})]},m))})]})]})}function u1({run:i,plugin:c,skill:d,onDelete:u}){const f=Ql();return n.jsxs("div",{className:"space-y-3 animate-slide-in-right",children:[n.jsxs("div",{className:"glass-card p-4",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:new Date(i.timestamp).toLocaleString()}),n.jsx("div",{className:"text-[12px] mt-0.5",style:{color:"var(--text-tertiary)"},children:i.model})]}),i.verdict&&n.jsx("span",{className:"text-[14px] font-bold",style:{color:bh(i.verdict)},children:i.verdict})]}),n.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[n.jsx("button",{className:"btn btn-ghost",style:{fontSize:11,padding:"3px 10px"},onClick:()=>f(`/skills/${c}/${d}/benchmark?autostart=true`),children:"Rerun Benchmark"}),n.jsx("button",{className:"btn btn-ghost",style:{fontSize:11,padding:"3px 10px"},onClick:()=>f(`/skills/${c}/${d}/benchmark?mode=baseline&autostart=true`),children:"Run Baseline"}),n.jsx("button",{className:"btn btn-purple",style:{fontSize:11,padding:"3px 10px"},onClick:()=>f(`/skills/${c}/${d}/compare?autostart=true`),children:"Run A/B"}),n.jsx("div",{style:{flex:1}}),n.jsx("button",{className:"btn btn-ghost",style:{fontSize:11,padding:"3px 10px",color:"var(--red)"},onClick:()=>{confirm("Delete this run?")&&u(i.timestamp)},children:"Delete"})]})]}),i.cases.map(m=>n.jsxs("div",{className:"glass-card p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:["#",m.eval_id]}),n.jsx("h4",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:m.eval_name})]}),n.jsxs("span",{className:"pill",style:{background:m.status==="pass"?"var(--green-muted)":m.status==="error"?"var(--yellow-muted)":"var(--red-muted)",color:m.status==="pass"?"var(--green)":m.status==="error"?"var(--yellow)":"var(--red)"},children:[m.status," (",Math.round(m.pass_rate*100),"%)"]})]}),(m.durationMs!=null||m.inputTokens!=null||m.outputTokens!=null)&&n.jsxs("div",{className:"flex items-center gap-4 mb-3 text-[11px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[m.durationMs!=null&&n.jsx("span",{children:Mr(m.durationMs)}),m.inputTokens!=null&&n.jsxs("span",{children:[Fn(m.inputTokens)," in"]}),m.outputTokens!=null&&n.jsxs("span",{children:[Fn(m.outputTokens)," out"]})]}),m.error_message&&n.jsx("div",{className:"text-[12px] mb-3 p-2 rounded",style:{background:"var(--red-muted)",color:"var(--red)"},children:m.error_message}),n.jsx("div",{className:"space-y-1.5",children:m.assertions.map(p=>n.jsxs("div",{className:"flex items-start gap-2.5 py-1.5",children:[n.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",style:{background:p.pass?"var(--green)":"var(--red)"},children:n.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",children:p.pass?n.jsx("polyline",{points:"20 6 9 17 4 12"}):n.jsxs(n.Fragment,{children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-[12px]",style:{color:"var(--text-primary)"},children:p.text}),n.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-tertiary)"},children:p.reasoning})]})]},p.id))})]},m.eval_id))]})}function c1(){const{plugin:i,skill:c}=Cr(),d=Ql(),[u,f]=bc(),m=u.get("tab")||"timeline",[p,b]=g.useState([]),[y,x]=g.useState(!0),[S,v]=g.useState({}),[w,O]=g.useState(null),[H,Y]=g.useState(null),[z,q]=g.useState(!1),[X,W]=g.useState(new Set),[te,Z]=g.useState(null),[Q,F]=g.useState(!1),$=g.useMemo(()=>{const R=new Set(p.map(le=>le.model));return Array.from(R).sort()},[p]),ue=g.useCallback(async R=>{if(!(!i||!c)){x(!0);try{const le=await Ee.getHistory(i,c,R);b(le)}catch{b([])}finally{x(!1)}}},[i,c]);g.useEffect(()=>{ue(S)},[ue,S]);function pe(R){v(R),O(null),Y(null),Z(null),W(new Set)}async function ne(R){if(!(!i||!c)){Z(null),Y(R);try{const le=await Ee.getHistoryEntry(i,c,R);O(le)}catch{O(null)}}}async function ve(R){if(!(!i||!c))try{await Ee.deleteHistoryEntry(i,c,R),O(null),Y(null),ue(S)}catch{}}function Ce(R){W(le=>{const se=new Set(le);if(se.has(R))se.delete(R);else{if(se.size>=2)return le;se.add(R)}return se})}async function ze(){if(!i||!c)return;const[R,le]=Array.from(X);if(!(!R||!le)){F(!0);try{const se=await Ee.compareRuns(i,c,R,le);Z(se),O(null),Y(null)}catch{Z(null)}finally{F(!1)}}}function ke(){z?(q(!1),W(new Set),Z(null)):(q(!0),Z(null))}if(y&&p.length===0)return n.jsxs("div",{className:"px-10 py-8 max-w-6xl",children:[n.jsx("div",{className:"skeleton h-5 w-48 mb-6"}),n.jsx("div",{className:"skeleton h-48 rounded-xl mb-4"}),n.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[n.jsxs("div",{className:"space-y-2",children:[n.jsx("div",{className:"skeleton h-20 rounded-xl"}),n.jsx("div",{className:"skeleton h-20 rounded-xl"}),n.jsx("div",{className:"skeleton h-20 rounded-xl"})]}),n.jsx("div",{className:"col-span-2",children:n.jsx("div",{className:"skeleton h-48 rounded-xl"})})]})]});const k=!!(S.model||S.type||S.from||S.to);return n.jsxs("div",{className:"px-10 py-8 max-w-6xl",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-5 text-[13px]",children:[n.jsx(ot,{to:`/skills/${i}/${c}`,className:"transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:R=>{R.currentTarget.style.color="var(--text-primary)"},onMouseLeave:R=>{R.currentTarget.style.color="var(--text-tertiary)"},children:c}),n.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:n.jsx("polyline",{points:"9 18 15 12 9 6"})}),n.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"History"})]}),n.jsx("div",{className:"flex items-center gap-1 mb-5 p-1 rounded-lg",style:{background:"var(--surface-2)",display:"inline-flex"},children:["timeline","per-eval","statistics"].map(R=>{const le={timeline:"Timeline","per-eval":"Per Eval",statistics:"Statistics"},se=m===R;return n.jsx("button",{onClick:()=>f({tab:R}),className:"px-4 py-1.5 rounded-md text-[12px] font-medium transition-all duration-150",style:{background:se?"var(--surface-4)":"transparent",color:se?"var(--text-primary)":"var(--text-tertiary)",boxShadow:se?"0 1px 3px rgba(0,0,0,0.2)":"none"},onMouseEnter:K=>{se||(K.currentTarget.style.color="var(--text-secondary)")},onMouseLeave:K=>{se||(K.currentTarget.style.color=se?"var(--text-primary)":"var(--text-tertiary)")},children:le[R]},R)})}),m==="per-eval"&&i&&c&&n.jsx(e1,{plugin:i,skill:c}),m==="statistics"&&i&&c&&n.jsx(n1,{plugin:i,skill:c}),m==="timeline"&&n.jsxs(n.Fragment,{children:[p.length>=2&&n.jsx("div",{style:{marginBottom:16},children:n.jsx(Jy,{entries:p.slice().reverse()})}),n.jsx(r1,{models:$,filters:S,onChange:pe}),n.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[n.jsxs("div",{className:"col-span-1",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3 px-1",children:[n.jsxs("div",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:["Past Runs (",p.length,")"]}),n.jsxs("div",{className:"flex items-center gap-2",children:[z&&X.size===2&&n.jsx("button",{className:"btn btn-primary",style:{fontSize:10,padding:"2px 8px"},onClick:ze,disabled:Q,children:Q?"Comparing...":"Compare Selected"}),n.jsx("button",{className:`btn ${z?"btn-purple":"btn-ghost"}`,style:{fontSize:10,padding:"2px 8px"},onClick:ke,children:"Compare"})]})]}),p.length===0&&!k&&n.jsxs("div",{className:"text-center py-8",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"var(--surface-2)"},children:n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"12 6 12 12 16 14"})]})}),n.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"No benchmark runs yet"})]}),p.length===0&&k&&n.jsx("div",{className:"text-center py-8",children:n.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"No runs match current filters"})}),n.jsx("div",{className:"space-y-1.5 stagger-children",children:p.map(R=>{const le=H===R.timestamp,se=kr(R.passRate),K=s1[R.type],N=X.has(R.timestamp);return n.jsxs("div",{className:"flex items-start gap-2",children:[z&&n.jsx("label",{className:"flex items-center justify-center mt-3.5 flex-shrink-0 cursor-pointer",style:{width:18,height:18},children:n.jsx("input",{type:"checkbox",checked:N,onChange:()=>Ce(R.timestamp),disabled:!N&&X.size>=2,style:{accentColor:"var(--purple)"}})}),n.jsxs("button",{onClick:()=>ne(R.timestamp),className:"w-full text-left p-3.5 rounded-xl transition-all duration-150",style:{background:le?"var(--accent-muted)":"var(--surface-1)",border:le?"1px solid var(--border-active)":"1px solid var(--border-subtle)"},onMouseEnter:L=>{le||(L.currentTarget.style.borderColor="var(--border-hover)")},onMouseLeave:L=>{le||(L.currentTarget.style.borderColor="var(--border-subtle)")},children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:gh(R.timestamp)}),K&&n.jsx("span",{className:"pill",style:{background:K.bg,color:K.fg,fontSize:9,padding:"1px 6px"},children:K.label})]}),n.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:R.model}),n.jsxs("span",{className:"text-[11px] font-semibold",style:{color:se},children:[Math.round(R.passRate*100),"%"]})]}),n.jsxs("div",{className:"flex items-center gap-3 mt-1.5 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[n.jsxs("span",{children:[R.caseCount??0," cases"]}),n.jsx("span",{children:Mr(R.totalDurationMs??void 0)}),n.jsx("span",{children:Fn(R.totalTokens)})]}),R.type==="comparison"&&R.verdict&&n.jsx("div",{className:"mt-1.5",children:n.jsx("span",{className:"pill",style:{background:R.verdict==="EFFECTIVE"?"var(--green-muted)":R.verdict==="MARGINAL"?"var(--yellow-muted)":R.verdict==="DEGRADING"?"var(--red-muted)":"var(--surface-3)",color:bh(R.verdict),fontSize:9,padding:"1px 6px"},children:R.verdict})})]})]},R.timestamp)})})]}),n.jsx("div",{className:"col-span-2",children:te?n.jsx(i1,{result:te}):w&&i&&c?n.jsx(u1,{run:w,plugin:i,skill:c,onDelete:ve}):n.jsxs("div",{className:"text-center py-20",children:[n.jsx("button",{onClick:()=>d(`/skills/${i}/${c}`),className:"w-14 h-14 rounded-2xl flex items-center justify-center mx-auto mb-4 transition-all duration-150",style:{background:"var(--surface-2)"},onMouseEnter:R=>{R.currentTarget.style.background="var(--surface-3)",R.currentTarget.style.transform="scale(1.05)"},onMouseLeave:R=>{R.currentTarget.style.background="var(--surface-2)",R.currentTarget.style.transform="scale(1)"},title:"Back to skill",children:n.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"15 18 9 12 15 6"})})}),n.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:z?"Check two runs and click Compare Selected":"Select a run to view details"})]})})]})]})]})}const Fm={TP:{bg:"var(--green-muted)",text:"var(--green)",icon:"check"},TN:{bg:"rgba(52,211,153,0.06)",text:"rgba(52,211,153,0.6)",icon:"check"},FP:{bg:"var(--red-muted)",text:"var(--red)",icon:"x"},FN:{bg:"rgba(248,113,113,0.06)",text:"rgba(248,113,113,0.6)",icon:"x"}},o1=[{label:"Should activate",prompts:["How do I use this feature?","Show me best practices for this","What's the recommended approach?"]},{label:"Should NOT activate",prompts:["!What's the weather today?","!Write me a poem","!How do I cook pasta?"]}];function d1(){const[i,c]=g.useState([]),[d,u]=g.useState(null),[f,m]=g.useState(null),[p,b]=g.useState(null),[y,x]=g.useState(""),[S,v]=g.useState(!1),[w,O]=g.useState("preview"),{events:H,running:Y,error:z,start:q}=ts();g.useEffect(()=>{Ee.getSkills().then(c).catch(()=>{})},[]),g.useEffect(()=>{if(!d){m(null),b(null);return}fetch(`/api/skills/${d.plugin}/${d.skill}/description`).then($=>$.json()).then($=>{m($.description),b($.rawContent||null)}).catch(()=>{m(null),b(null)})},[d]);function X(){if(!d)return;const ue=y.trim().split(`
|
|
65
|
+
`).filter(Boolean).map(pe=>{const ne=pe.startsWith("!");return{prompt:ne?pe.slice(1).trim():pe.trim(),expected:ne?"should_not_activate":"should_activate"}});q(`/api/skills/${d.plugin}/${d.skill}/activation-test`,{prompts:ue})}function W($){const ue=y.trim(),pe=ue?`${ue}
|
|
66
|
+
${$.join(`
|
|
67
|
+
`)}`:$.join(`
|
|
68
|
+
`);x(pe)}const te=[];let Z=null;for(const $ of H)$.event==="prompt_result"&&te.push($.data),$.event==="done"&&(Z=$.data);const Q=te.filter($=>$.classification==="TP"||$.classification==="TN"),F=te.filter($=>$.classification==="FP"||$.classification==="FN");return n.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[n.jsxs("div",{className:"mb-6",children:[n.jsx("h2",{className:"text-[22px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Description Activation Test"}),n.jsxs("p",{className:"text-[13px] mt-1 max-w-2xl",style:{color:"var(--text-tertiary)"},children:["Tests whether a skill's description activates correctly for relevant prompts and stays silent for irrelevant ones. This validates the ",n.jsx("strong",{children:"auto-activation quality"})," of your skill description."]})]}),n.jsxs("div",{className:"grid grid-cols-5 gap-5 mb-6",children:[n.jsxs("div",{className:"col-span-3 space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-[12px] font-medium mb-1.5 block",style:{color:"var(--text-secondary)"},children:"Skill"}),n.jsxs("select",{className:"input-field",value:d?`${d.plugin}/${d.skill}`:"",onChange:$=>{const[ue,pe]=$.target.value.split("/");u(ue&&pe?{plugin:ue,skill:pe}:null)},children:[n.jsx("option",{value:"",children:"Select a skill..."}),i.map($=>n.jsxs("option",{value:`${$.plugin}/${$.skill}`,children:[$.plugin," / ",$.skill]},`${$.plugin}/${$.skill}`))]})]}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[n.jsx("label",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:"Test Prompts"}),n.jsx("div",{className:"flex gap-1.5",children:o1.map($=>n.jsxs("button",{onClick:()=>W($.prompts),className:"text-[10px] px-2 py-1 rounded-md transition-colors duration-150",style:{background:"var(--surface-2)",color:"var(--text-tertiary)"},onMouseEnter:ue=>{ue.currentTarget.style.color="var(--text-primary)",ue.currentTarget.style.background="var(--surface-3)"},onMouseLeave:ue=>{ue.currentTarget.style.color="var(--text-tertiary)",ue.currentTarget.style.background="var(--surface-2)"},children:["+ ",$.label]},$.label))})]}),n.jsx("textarea",{className:"input-field h-32 resize-y font-mono text-[12px]",value:y,onChange:$=>x($.target.value),placeholder:`How do I write a unit test?
|
|
69
|
+
What edge cases should I test?
|
|
70
|
+
!What's the weather like today?
|
|
71
|
+
!Write me a poem about flowers`}),n.jsxs("div",{className:"flex items-center gap-4 mt-1.5 text-[11px]",style:{color:"var(--text-tertiary)"},children:[n.jsx("span",{children:"One prompt per line"}),n.jsxs("span",{className:"flex items-center gap-1",children:[n.jsx("code",{className:"px-1 rounded",style:{background:"var(--surface-2)"},children:"!"})," prefix = should NOT activate"]}),n.jsxs("span",{children:[y.trim().split(`
|
|
72
|
+
`).filter(Boolean).length," prompt",y.trim().split(`
|
|
73
|
+
`).filter(Boolean).length!==1?"s":""]})]})]})]}),n.jsx("div",{className:"col-span-2",children:n.jsxs("div",{className:"glass-card h-full flex flex-col",children:[n.jsxs("button",{onClick:()=>v(!S),className:"w-full p-3 flex items-center justify-between text-left flex-shrink-0",style:{borderBottom:S?"1px solid var(--border-subtle)":void 0},children:[n.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Skill Description"}),n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:S?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),S&&n.jsxs("div",{className:"flex-1 flex flex-col min-h-0 animate-fade-in",children:[p&&n.jsx("div",{className:"flex gap-0 border-b flex-shrink-0",style:{borderColor:"var(--border-subtle)"},children:["preview","raw"].map($=>n.jsx("button",{onClick:()=>O($),className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider transition-colors duration-150",style:{color:w===$?"var(--text-primary)":"var(--text-tertiary)",borderBottom:w===$?"2px solid var(--accent)":"2px solid transparent"},children:$==="raw"?"Raw MD":"Preview"},$))}),n.jsx("div",{className:"p-3 flex-1 overflow-auto",style:{maxHeight:320},children:d?!f&&!p?n.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading description..."}):w==="raw"&&p?n.jsx("pre",{className:"text-[11px] leading-relaxed whitespace-pre-wrap break-words font-mono",style:{color:"var(--text-secondary)",margin:0},children:p}):n.jsx("div",{className:"text-[12px] leading-relaxed skill-md-preview",style:{color:"var(--text-secondary)"},dangerouslySetInnerHTML:{__html:f1(p||f||"")}}):n.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Select a skill to see its description"})})]}),!S&&f&&n.jsx("div",{className:"px-3 pb-3 pt-1",children:n.jsxs("div",{className:"text-[11px] truncate",style:{color:"var(--text-tertiary)"},children:[f.slice(0,100),f.length>100?"...":""]})})]})})]}),n.jsx("button",{onClick:X,disabled:Y||!d||!y.trim(),className:"btn btn-primary mb-7",children:Y?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)",width:14,height:14}})," Testing..."]}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("circle",{cx:"12",cy:"12",r:"6"}),n.jsx("circle",{cx:"12",cy:"12",r:"2"})]})," Run Activation Test"]})}),z&&n.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:z}),te.length>0&&n.jsxs("div",{className:"space-y-5 mb-6",children:[F.length>0&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),n.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--red)"},children:["Incorrect (",F.length,")"]}),n.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"— These need attention"})]}),n.jsx("div",{className:"space-y-1.5 stagger-children",children:F.map(($,ue)=>n.jsx(Pm,{result:$},`incorrect-${ue}`))})]}),Q.length>0&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("polyline",{points:"16 10 11 15 8 12"})]}),n.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--green)"},children:["Correct (",Q.length,")"]})]}),n.jsx("div",{className:"space-y-1.5 stagger-children",children:Q.map(($,ue)=>n.jsx(Pm,{result:$},`correct-${ue}`))})]})]}),Z&&n.jsxs("div",{className:"glass-card p-6 animate-fade-in-scale",style:{borderColor:"var(--border-active)",borderWidth:2},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-4",style:{color:"var(--text-tertiary)"},children:"Summary"}),n.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-5",children:[n.jsx(rc,{label:"Precision",value:Z.precision,description:"Of all activations, how many were correct?",detail:`${Z.tp} true / ${Z.tp+Z.fp} total activations`}),n.jsx(rc,{label:"Recall",value:Z.recall,description:"Of expected activations, how many fired?",detail:`${Z.tp} activated / ${Z.tp+Z.fn} expected`}),n.jsx(rc,{label:"Reliability",value:Z.reliability,description:"Overall correct classification rate",detail:`${Z.tp+Z.tn} correct / ${Z.total} total`})]}),n.jsxs("div",{className:"pt-4",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-3 text-center",style:{color:"var(--text-tertiary)"},children:"Confusion Matrix"}),n.jsxs("div",{className:"grid grid-cols-2 gap-2 max-w-xs mx-auto",children:[n.jsx(jr,{label:"True Positive",abbr:"TP",count:Z.tp,bg:"var(--green-muted)",color:"var(--green)",description:"Correctly activated"}),n.jsx(jr,{label:"False Positive",abbr:"FP",count:Z.fp,bg:"var(--red-muted)",color:"var(--red)",description:"Wrongly activated"}),n.jsx(jr,{label:"False Negative",abbr:"FN",count:Z.fn,bg:"rgba(248,113,113,0.06)",color:"rgba(248,113,113,0.6)",description:"Missed activation"}),n.jsx(jr,{label:"True Negative",abbr:"TN",count:Z.tn,bg:"rgba(52,211,153,0.06)",color:"rgba(52,211,153,0.6)",description:"Correctly silent"})]})]})]}),Y&&te.length===0&&n.jsxs("div",{className:"text-center py-16 animate-fade-in",children:[n.jsx("div",{className:"spinner-lg mx-auto mb-4"}),n.jsx("p",{className:"text-[14px]",style:{color:"var(--text-secondary)"},children:"Testing activation against skill description..."})]})]})}function Pm({result:i}){const c=Fm[i.classification]||Fm.FN,d=i.classification==="TP"||i.classification==="TN";return n.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl transition-all duration-200",style:{background:c.bg,border:"1px solid transparent"},children:[n.jsx("div",{className:"flex-shrink-0 mt-0.5",children:n.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:`color-mix(in srgb, ${c.text} 20%, transparent)`},children:d?n.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:c.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"20 6 9 17 4 12"})}):n.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:c.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"flex items-center gap-2 mb-1",children:n.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:i.prompt})}),n.jsxs("div",{className:"flex items-center gap-3 text-[12px]",children:[n.jsx("span",{className:"pill",style:{background:"rgba(0,0,0,0.1)",color:c.text,fontWeight:700,fontSize:"10px",padding:"1px 6px"},children:i.classification}),n.jsx("span",{style:{color:i.activate?"var(--green)":"var(--text-tertiary)"},children:i.activate?"Activated":"Silent"}),n.jsx("span",{style:{color:"var(--text-tertiary)"},children:"·"}),n.jsxs("span",{style:{color:"var(--text-tertiary)"},children:["Expected: ",i.expected==="should_activate"?"activate":"stay silent"]}),n.jsx("span",{style:{color:"var(--text-tertiary)"},children:"·"}),n.jsxs("span",{style:{color:"var(--text-tertiary)"},children:[i.confidence," confidence"]})]}),i.reasoning&&n.jsx("div",{className:"text-[11px] mt-1.5",style:{color:"var(--text-tertiary)"},children:i.reasoning})]})]})}function rc({label:i,value:c,description:d,detail:u}){const f=Math.round(c*100),m=f>=80?"var(--green)":f>=60?"var(--yellow)":"var(--red)";return n.jsxs("div",{className:"text-center",children:[n.jsxs("div",{className:"text-[28px] font-bold tracking-tight",style:{color:m},children:[f,"%"]}),n.jsx("div",{className:"text-[12px] font-medium mt-0.5",style:{color:"var(--text-secondary)"},children:i}),n.jsx("div",{className:"text-[10px] mt-1",style:{color:"var(--text-tertiary)"},children:d}),n.jsx("div",{className:"text-[10px] mt-0.5 font-mono",style:{color:"var(--text-tertiary)"},children:u})]})}function jr({label:i,abbr:c,count:d,bg:u,color:f,description:m}){return n.jsxs("div",{className:"text-center p-3 rounded-lg",style:{background:u},children:[n.jsx("div",{className:"text-[20px] font-bold",style:{color:f},children:d}),n.jsx("div",{className:"text-[11px] font-semibold",style:{color:f},children:c}),n.jsx("div",{className:"text-[9px] mt-0.5",style:{color:"var(--text-tertiary)"},children:m})]})}function f1(i){const d=i.replace(/^---[\s\S]*?---\n?/,"").split(`
|
|
74
|
+
`),u=[];let f=!1,m=[],p=!1,b=[];function y(){if(!p||b.length===0)return;p=!1;const x=b.map(O=>O.split("|").slice(1,-1).map(Y=>Y.trim())),S=x[0],v=x.filter((O,H)=>!(H===0||H===1&&x[H].every(Y=>/^[-:\s]+$/.test(Y))));let w='<table style="width:100%;border-collapse:collapse;font-size:11px;margin:8px 0">';S&&(w+=`<thead><tr>${S.map(O=>`<th style="text-align:left;padding:4px 8px;border-bottom:1px solid var(--border-subtle);color:var(--text-secondary);font-weight:600">${da(O)}</th>`).join("")}</tr></thead>`),w+=`<tbody>${v.map(O=>`<tr>${O.map(H=>`<td style="padding:4px 8px;border-bottom:1px solid var(--border-subtle);color:var(--text-tertiary)">${da(H)}</td>`).join("")}</tr>`).join("")}</tbody></table>`,u.push(w),b=[]}for(const x of d){if(x.startsWith("```")){f?(u.push(`<pre style="background:var(--surface-2);padding:8px 12px;border-radius:6px;font-size:11px;overflow-x:auto;margin:6px 0;color:var(--text-secondary)">${da(m.join(`
|
|
75
|
+
`))}</pre>`),m=[],f=!1):(y(),f=!0);continue}if(f){m.push(x);continue}if(x.trim().startsWith("|")&&x.trim().endsWith("|")){p||(p=!0),b.push(x.trim());continue}else y();if(/^---+$/.test(x.trim())){u.push('<hr style="border:none;border-top:1px solid var(--border-subtle);margin:12px 0" />');continue}const S=x.match(/^(#{1,4})\s+(.+)$/);if(S){const w=S[1].length,O=["","16px","14px","13px","12px"],H=["","700","600","600","600"],Y=["","16px 0 8px","12px 0 6px","10px 0 4px","8px 0 4px"];u.push(`<div style="font-size:${O[w]};font-weight:${H[w]};margin:${Y[w]};color:var(--text-primary)">${Sr(da(S[2]))}</div>`);continue}if(/^[-*]\s+/.test(x.trim())){const w=x.trim().replace(/^[-*]\s+/,"");u.push(`<div style="padding-left:16px;margin:2px 0;color:var(--text-secondary)"><span style="color:var(--text-tertiary);margin-right:6px">•</span>${Sr(da(w))}</div>`);continue}const v=x.trim().match(/^(\d+)\.\s+(.+)$/);if(v){u.push(`<div style="padding-left:16px;margin:2px 0;color:var(--text-secondary)"><span style="color:var(--text-tertiary);margin-right:6px">${v[1]}.</span>${Sr(da(v[2]))}</div>`);continue}if(!x.trim()){u.push('<div style="height:6px"></div>');continue}u.push(`<div style="margin:2px 0;color:var(--text-secondary)">${Sr(da(x))}</div>`)}return y(),u.join(`
|
|
76
|
+
`)}function da(i){return i.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Sr(i){return i.replace(/\*\*(.+?)\*\*/g,'<strong style="color:var(--text-primary)">$1</strong>').replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/`([^`]+)`/g,'<code style="background:var(--surface-2);padding:1px 4px;border-radius:3px;font-size:10px">$1</code>')}function ic(i){return i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function m1(i,c,d,u){const m=`.../${i.split("/").slice(-2).join("/")}`;switch(c){case 1:return`${m}/${d}/skills/${u}/SKILL.md`;case 2:return`${m}/plugins/${d}/skills/${u}/SKILL.md`;case 3:return`${m}/skills/${u}/SKILL.md`}}function h1(){const i=Ql(),[c,d]=g.useState(null),[u,f]=g.useState(!0),[m,p]=g.useState(null),[b,y]=g.useState(null),[x,S]=g.useState(""),[v,w]=g.useState(3),[O,H]=g.useState(""),[Y,z]=g.useState(""),[q,X]=g.useState(""),[W,te]=g.useState(""),[Z,Q]=g.useState(""),[F,$]=g.useState(""),[ue,pe]=g.useState(!1),[ne,ve]=g.useState(null);g.useEffect(()=>{Ee.getProjectLayout().then(K=>{d(K),w(K.suggestedLayout);const N=K.detectedLayouts.find(L=>L.layout===K.suggestedLayout);N!=null&&N.existingPlugins.length&&H(N.existingPlugins[0])}).catch(()=>{}).finally(()=>f(!1)),Ee.getConfig().then(y).catch(()=>{}),Ee.getSkillCreatorStatus().then(p).catch(()=>{})},[]);const Ce=g.useMemo(()=>{if(!c)return[];const K=c.detectedLayouts.find(N=>N.layout===v);return(K==null?void 0:K.existingPlugins)||[]},[c,v]),ze=O==="__new__"?Y:O,ke=c?m1(c.root,v,ze||"{plugin}",x||"{skill}"):"",k=g.useMemo(()=>c?c.detectedLayouts.filter(K=>K.layout!==4):[],[c]),R=g.useMemo(()=>{const K=["---"];return q?K.push(`description: "${q.replace(/"/g,'\\"')}"`):K.push('description: ""'),Z.trim()&&K.push(`allowed-tools: ${Z.trim()}`),W&&K.push(`model: ${W}`),K.push("---"),K.push(""),F.trim()?K.push(F.trim()):(K.push(`# /${x||"skill-name"}`),K.push(""),K.push("You are a helpful assistant.")),K.join(`
|
|
77
|
+
`)},[x,q,W,Z,F]),le=(b==null?void 0:b.provider)==="claude-cli"&&m!==null;async function se(){if(ve(null),!x.trim()){ve("Skill name is required");return}if(!q.trim()){ve("Description is required");return}if(v!==3&&!ze.trim()){ve("Plugin name is required");return}pe(!0);try{const K=await Ee.createSkill({name:ic(x),plugin:ze||"",layout:v,description:q,model:W||void 0,allowedTools:Z||void 0,body:F});i(`/skills/${K.plugin}/${K.skill}`)}catch(K){ve(K.message)}finally{pe(!1)}}return n.jsxs("div",{className:"px-10 py-8 max-w-6xl",children:[n.jsxs("div",{className:"mb-6",children:[n.jsxs("div",{className:"flex items-center gap-2 text-[12px] mb-3",style:{color:"var(--text-tertiary)"},children:[n.jsx(ot,{to:"/",className:"hover:underline",style:{color:"var(--text-tertiary)"},children:"Skills"}),n.jsx("span",{children:"/"}),n.jsx("span",{style:{color:"var(--text-secondary)"},children:"New Skill"})]}),n.jsx("h2",{className:"text-[22px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Create a New Skill"}),n.jsx("p",{className:"text-[13px] mt-1",style:{color:"var(--text-tertiary)"},children:"Define your skill's metadata, content, and placement"})]}),le&&n.jsx("div",{className:"mb-6 px-4 py-3 rounded-lg text-[13px]",style:{background:m.installed?"var(--accent-muted)":"var(--surface-2)",border:m.installed?"1px solid var(--accent)":"1px solid var(--border-subtle)",color:"var(--text-primary)"},children:m.installed?n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 mt-0.5",children:[n.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),n.jsx("path",{d:"M2 17l10 5 10-5"}),n.jsx("path",{d:"M2 12l10 5 10-5"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"font-medium",children:"AI-Assisted Authoring Available"}),n.jsxs("span",{className:"ml-1",style:{color:"var(--text-secondary)"},children:["— Run ",n.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-3)"},children:"/skill-creator"})," in Claude Code for guided skill creation with the full methodology. This form creates the basic structure."]})]})]}):n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 mt-0.5",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),n.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),n.jsxs("div",{children:[n.jsxs("span",{style:{color:"var(--text-secondary)"},children:["Tip: Install the Skill Creator for AI-assisted authoring —"," "]}),n.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-3)"},children:m.installCommand})]})]})}),u&&n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"skeleton h-10 w-full rounded-lg"}),n.jsx("div",{className:"skeleton h-10 w-full rounded-lg"}),n.jsx("div",{className:"skeleton h-10 w-full rounded-lg"})]}),!u&&c&&n.jsxs("div",{className:"flex gap-6",children:[n.jsxs("div",{className:"flex-1 min-w-0 space-y-5",children:[n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Location"}),k.length>1&&n.jsxs("div",{className:"mb-4",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Layout"}),n.jsxs("div",{className:"flex gap-2",children:[k.map(K=>n.jsx("button",{onClick:()=>{w(K.layout);const N=K.existingPlugins[0];H(N||""),z("")},className:"px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:v===K.layout?"var(--accent)":"var(--surface-3)",color:v===K.layout?"#fff":"var(--text-secondary)",border:`1px solid ${v===K.layout?"var(--accent)":"var(--border-subtle)"}`},children:K.label},K.layout)),!k.find(K=>K.layout===3)&&n.jsx("button",{onClick:()=>{w(3),H("")},className:"px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:v===3?"var(--accent)":"var(--surface-3)",color:v===3?"#fff":"var(--text-secondary)",border:`1px solid ${v===3?"var(--accent)":"var(--border-subtle)"}`},children:"Root skills/"})]})]}),v!==3&&n.jsxs("div",{className:"mb-4",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Plugin"}),n.jsxs("select",{value:O,onChange:K=>{H(K.target.value),z("")},className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"},children:[Ce.map(K=>n.jsx("option",{value:K,children:K},K)),n.jsx("option",{value:"__new__",children:"+ New plugin..."})]}),O==="__new__"&&n.jsx("input",{type:"text",value:Y,onChange:K=>z(ic(K.target.value)),placeholder:"my-plugin",className:"w-full mt-2 px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]}),n.jsx("div",{className:"px-3 py-2 rounded-lg text-[11px] font-mono",style:{background:"var(--surface-0)",color:"var(--text-tertiary)",border:"1px solid var(--border-subtle)"},children:ke})]}),n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Skill Details"}),n.jsxs("div",{className:"mb-4",children:[n.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:["Name ",n.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),n.jsx("input",{type:"text",value:x,onChange:K=>S(ic(K.target.value)),placeholder:"my-skill",className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]}),n.jsxs("div",{className:"mb-4",children:[n.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:["Description ",n.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),n.jsx("textarea",{value:q,onChange:K=>X(K.target.value),placeholder:"Brief description — used for auto-activation keywords",rows:2,className:"w-full px-3 py-2 rounded-lg text-[13px] resize-none",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}}),n.jsx("p",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:"This text is used by Claude to decide when to activate the skill"})]}),n.jsxs("div",{className:"flex gap-4 mb-4",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Model"}),n.jsxs("select",{value:W,onChange:K=>te(K.target.value),className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"},children:[n.jsx("option",{value:"",children:"Any (default)"}),n.jsx("option",{value:"opus",children:"Opus"}),n.jsx("option",{value:"sonnet",children:"Sonnet"}),n.jsx("option",{value:"haiku",children:"Haiku"})]})]}),n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Allowed Tools"}),n.jsx("input",{type:"text",value:Z,onChange:K=>Q(K.target.value),placeholder:"Read, Write, Edit, Bash, Glob, Grep",className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]})]})]}),n.jsxs("div",{className:"glass-card p-5",children:[n.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"System Prompt"}),n.jsx("textarea",{value:F,onChange:K=>$(K.target.value),placeholder:`# /my-skill
|
|
78
|
+
|
|
79
|
+
You are an expert at...
|
|
80
|
+
|
|
81
|
+
## Workflow
|
|
82
|
+
|
|
83
|
+
1. First, understand the request
|
|
84
|
+
2. Then, implement the solution
|
|
85
|
+
3. Finally, verify the result`,rows:12,className:"w-full px-3 py-2 rounded-lg text-[13px] font-mono resize-y",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)",minHeight:"200px"}})]}),ne&&n.jsx("div",{className:"px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:ne}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("button",{onClick:se,disabled:ue||!x||!q,className:"px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:ue||!x||!q?"var(--surface-3)":"var(--accent)",color:ue||!x||!q?"var(--text-tertiary)":"#fff",cursor:ue||!x||!q?"not-allowed":"pointer",opacity:ue?.7:1},children:ue?"Creating...":"Create Skill"}),n.jsx(ot,{to:"/",className:"px-4 py-2.5 rounded-lg text-[13px] font-medium",style:{color:"var(--text-secondary)"},children:"Cancel"})]})]}),n.jsx("div",{className:"w-[340px] flex-shrink-0",children:n.jsx("div",{className:"sticky top-8",children:n.jsxs("div",{className:"glass-card p-4",children:[n.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"SKILL.md Preview"}),n.jsx("pre",{className:"text-[11px] font-mono leading-relaxed overflow-auto max-h-[500px] p-3 rounded-lg",style:{background:"var(--surface-0)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:R})]})})})]})]})}function x1(){const[i,c]=g.useState(null),[d,u]=g.useState(!1),[f,m]=g.useState(!1),p=g.useRef(null);g.useEffect(()=>{Ee.getConfig().then(c).catch(()=>{})},[]),g.useEffect(()=>{function x(S){p.current&&!p.current.contains(S.target)&&u(!1)}return d&&document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[d]);async function b(x,S){m(!0);try{const v=await Ee.setConfig(x.id,S.id);c(v),u(!1)}catch{const v=await Ee.getConfig();c(v)}finally{m(!1)}}if(!i)return null;const y=p1(i);return n.jsxs("div",{ref:p,className:"relative",children:[n.jsxs("button",{onClick:()=>u(!d),className:"w-full flex items-center gap-2 px-3 py-2 rounded-lg text-[12px] transition-all duration-150",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"},onMouseEnter:x=>{x.currentTarget.style.borderColor="var(--accent)"},onMouseLeave:x=>{x.currentTarget.style.borderColor="var(--border-subtle)"},children:[n.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"3"}),n.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),n.jsx("span",{className:"flex-1 text-left font-medium truncate",children:y}),n.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:d?"rotate(180deg)":"rotate(0)",transition:"transform 0.15s ease"},children:n.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),d&&n.jsxs("div",{className:"absolute bottom-full mb-1 left-0 w-64 rounded-xl shadow-xl z-50 overflow-hidden animate-fade-in",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"px-4 py-2.5",style:{borderBottom:"1px solid var(--border-subtle)"},children:n.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Select Model"})}),n.jsx("div",{className:"py-1 max-h-80 overflow-y-auto",children:i.providers.map(x=>n.jsxs("div",{children:[n.jsxs("div",{className:"px-4 py-1.5 flex items-center gap-2",children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:x.available?"var(--green)":"var(--text-tertiary)",opacity:x.available?1:.3}}),n.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",opacity:x.available?1:.5},children:x.label})]}),x.models.map(S=>{const v=jh(i,x.id,S.id),w=!x.available||f;return n.jsxs("button",{onClick:()=>!w&&b(x,S),disabled:w,className:"w-full px-4 py-2 flex items-center gap-2.5 text-left transition-all duration-100",style:{background:v?"var(--accent-muted)":"transparent",color:w?"var(--text-tertiary)":"var(--text-primary)",opacity:w?.4:1,cursor:w?"not-allowed":"pointer"},onMouseEnter:O=>{!w&&!v&&(O.currentTarget.style.background="var(--surface-3)")},onMouseLeave:O=>{v||(O.currentTarget.style.background="transparent")},children:[n.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0 flex items-center justify-center",style:{border:`2px solid ${v?"var(--accent)":"var(--border-subtle)"}`},children:v&&n.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}})}),n.jsx("span",{className:"text-[12px]",style:{fontWeight:v?600:400},title:S.id,children:S.label})]},`${x.id}-${S.id}`)})]},x.id))})]})]})}function jh(i,c,d){return i.provider!==c?!1:c==="claude-cli"?i.model===`claude-${d}`:i.model===d}function p1(i){for(const c of i.providers)for(const d of c.models)if(jh(i,c.id,d.id))return d.label;return i.model}function v1({active:i}){return n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:i?"#fff":"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"}),n.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),n.jsx("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})]})}function y1({active:i}){return n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:i?"#fff":"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("circle",{cx:"12",cy:"12",r:"6"}),n.jsx("circle",{cx:"12",cy:"12",r:"2"})]})}function g1({active:i}){return n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:i?"#fff":"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"16"}),n.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"12"})]})}const b1=[{path:"/",label:"Skills",Icon:v1},{path:"/create",label:"New Skill",Icon:g1},{path:"/activation",label:"Activation Test",Icon:y1}];function j1(){const i=Wt(),[c,d]=g.useState(null);return g.useEffect(()=>{Ee.getConfig().then(u=>d(u.projectName)).catch(()=>{})},[]),n.jsxs("div",{className:"flex h-screen",children:[n.jsxs("nav",{className:"w-[220px] flex flex-col flex-shrink-0",style:{background:"var(--surface-1)",borderRight:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"px-5 py-5",style:{borderBottom:"1px solid var(--border-subtle)"},children:n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"var(--accent-muted)"},children:n.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[14px] font-semibold",style:{color:"var(--text-primary)",letterSpacing:"-0.01em"},children:"Skill Builder"}),n.jsx("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:c||"vskill"})]})]})}),n.jsxs("div",{className:"flex-1 px-3 py-3",children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest px-2 mb-2",style:{color:"var(--text-tertiary)"},children:"Navigation"}),b1.map(u=>{const f=i.pathname===u.path;return n.jsxs(ot,{to:u.path,className:"flex items-center gap-2.5 px-3 py-[9px] rounded-lg text-[13px] font-medium mb-0.5 transition-all duration-150",style:{background:f?"var(--accent)":"transparent",color:f?"#fff":"var(--text-secondary)"},onMouseEnter:m=>{f||(m.currentTarget.style.background="var(--surface-3)",m.currentTarget.style.color="var(--text-primary)")},onMouseLeave:m=>{f||(m.currentTarget.style.background="transparent",m.currentTarget.style.color="var(--text-secondary)")},children:[n.jsx(u.Icon,{active:f}),u.label]},u.path)})]}),n.jsxs("div",{className:"px-3 py-3",style:{borderTop:"1px solid var(--border-subtle)"},children:[n.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest px-2 mb-2",style:{color:"var(--text-tertiary)"},children:"Model"}),n.jsx(x1,{})]})]}),n.jsx("main",{className:"flex-1 overflow-auto",style:{background:"var(--surface-0)"},children:n.jsx("div",{className:"animate-fade-in",children:n.jsxs(Wv,{children:[n.jsx(Xl,{path:"/",element:n.jsx(_y,{})}),n.jsx(Xl,{path:"/create",element:n.jsx(h1,{})}),n.jsx(Xl,{path:"/skills/:plugin/:skill",element:n.jsx(qy,{})}),n.jsx(Xl,{path:"/skills/:plugin/:skill/benchmark",element:n.jsx(Zy,{})}),n.jsx(Xl,{path:"/skills/:plugin/:skill/compare",element:n.jsx($y,{})}),n.jsx(Xl,{path:"/skills/:plugin/:skill/history",element:n.jsx(c1,{})}),n.jsx(Xl,{path:"/activation",element:n.jsx(d1,{})})]})},i.pathname)})]})}Ip.createRoot(document.getElementById("root")).render(n.jsx(g.StrictMode,{children:n.jsx(jy,{children:n.jsx(j1,{})})}));
|