vskill 0.2.89 → 0.2.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))o(m);new MutationObserver(m=>{for(const j of m)if(j.type==="childList")for(const g of j.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).observe(document,{childList:!0,subtree:!0});function f(m){const j={};return m.integrity&&(j.integrity=m.integrity),m.referrerPolicy&&(j.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?j.credentials="include":m.crossOrigin==="anonymous"?j.credentials="omit":j.credentials="same-origin",j}function o(m){if(m.ep)return;m.ep=!0;const j=f(m);fetch(m.href,j)}})();var fc={exports:{}},Cn={};/**
|
|
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 kf;function _v(){if(kf)return Cn;kf=1;var c=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function f(o,m,j){var g=null;if(j!==void 0&&(g=""+j),m.key!==void 0&&(g=""+m.key),"key"in m){j={};for(var T in m)T!=="key"&&(j[T]=m[T])}else j=m;return m=j.ref,{$$typeof:c,type:o,key:g,ref:m!==void 0?m:null,props:j}}return Cn.Fragment=u,Cn.jsx=f,Cn.jsxs=f,Cn}var Rf;function Mv(){return Rf||(Rf=1,fc.exports=_v()),fc.exports}var s=Mv(),mc={exports:{}},ce={};/**
|
|
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 Of;function zv(){if(Of)return ce;Of=1;var c=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),g=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),R=Symbol.iterator;function H(y){return y===null||typeof y!="object"?null:(y=R&&y[R]||y["@@iterator"],typeof y=="function"?y:null)}var q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,Y={};function V(y,U,X){this.props=y,this.context=U,this.refs=Y,this.updater=X||q}V.prototype.isReactComponent={},V.prototype.setState=function(y,U){if(typeof y!="object"&&typeof y!="function"&&y!=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,y,U,"setState")},V.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function P(){}P.prototype=V.prototype;function le(y,U,X){this.props=y,this.context=U,this.refs=Y,this.updater=X||q}var G=le.prototype=new P;G.constructor=le,B(G,V.prototype),G.isPureReactComponent=!0;var ne=Array.isArray;function ie(){}var I={H:null,A:null,T:null,S:null},fe=Object.prototype.hasOwnProperty;function Se(y,U,X){var W=X.ref;return{$$typeof:c,type:y,key:U,ref:W!==void 0?W:null,props:X}}function ee(y,U){return Se(y.type,U,y.props)}function O(y){return typeof y=="object"&&y!==null&&y.$$typeof===c}function K(y){var U={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(X){return U[X]})}var z=/\/+/g;function J(y,U){return typeof y=="object"&&y!==null&&y.key!=null?K(""+y.key):U.toString(36)}function re(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(ie,ie):(y.status="pending",y.then(function(U){y.status==="pending"&&(y.status="fulfilled",y.value=U)},function(U){y.status==="pending"&&(y.status="rejected",y.reason=U)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function k(y,U,X,W,ue){var me=typeof y;(me==="undefined"||me==="boolean")&&(y=null);var Te=!1;if(y===null)Te=!0;else switch(me){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(y.$$typeof){case c:case u:Te=!0;break;case E:return Te=y._init,k(Te(y._payload),U,X,W,ue)}}if(Te)return ue=ue(y),Te=W===""?"."+J(y,0):W,ne(ue)?(X="",Te!=null&&(X=Te.replace(z,"$&/")+"/"),k(ue,U,X,"",function(Ra){return Ra})):ue!=null&&(O(ue)&&(ue=ee(ue,X+(ue.key==null||y&&y.key===ue.key?"":(""+ue.key).replace(z,"$&/")+"/")+Te)),U.push(ue)),1;Te=0;var et=W===""?".":W+":";if(ne(y))for(var Ue=0;Ue<y.length;Ue++)W=y[Ue],me=et+J(W,Ue),Te+=k(W,U,X,me,ue);else if(Ue=H(y),typeof Ue=="function")for(y=Ue.call(y),Ue=0;!(W=y.next()).done;)W=W.value,me=et+J(W,Ue++),Te+=k(W,U,X,me,ue);else if(me==="object"){if(typeof y.then=="function")return k(re(y),U,X,W,ue);throw U=String(y),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Te}function Q(y,U,X){if(y==null)return y;var W=[],ue=0;return k(y,W,"","",function(me){return U.call(X,me,ue++)}),W}function ae(y){if(y._status===-1){var U=y._result;U=U(),U.then(function(X){(y._status===0||y._status===-1)&&(y._status=1,y._result=X)},function(X){(y._status===0||y._status===-1)&&(y._status=2,y._result=X)}),y._status===-1&&(y._status=0,y._result=U)}if(y._status===1)return y._result.default;throw y._result}var Ee=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)},Z={map:Q,forEach:function(y,U,X){Q(y,function(){U.apply(this,arguments)},X)},count:function(y){var U=0;return Q(y,function(){U++}),U},toArray:function(y){return Q(y,function(U){return U})||[]},only:function(y){if(!O(y))throw Error("React.Children.only expected to receive a single React element child.");return y}};return ce.Activity=h,ce.Children=Z,ce.Component=V,ce.Fragment=f,ce.Profiler=m,ce.PureComponent=le,ce.StrictMode=o,ce.Suspense=b,ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,ce.__COMPILER_RUNTIME={__proto__:null,c:function(y){return I.H.useMemoCache(y)}},ce.cache=function(y){return function(){return y.apply(null,arguments)}},ce.cacheSignal=function(){return null},ce.cloneElement=function(y,U,X){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var W=B({},y.props),ue=y.key;if(U!=null)for(me in U.key!==void 0&&(ue=""+U.key),U)!fe.call(U,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&U.ref===void 0||(W[me]=U[me]);var me=arguments.length-2;if(me===1)W.children=X;else if(1<me){for(var Te=Array(me),et=0;et<me;et++)Te[et]=arguments[et+2];W.children=Te}return Se(y.type,ue,W)},ce.createContext=function(y){return y={$$typeof:g,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:j,_context:y},y},ce.createElement=function(y,U,X){var W,ue={},me=null;if(U!=null)for(W in U.key!==void 0&&(me=""+U.key),U)fe.call(U,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ue[W]=U[W]);var Te=arguments.length-2;if(Te===1)ue.children=X;else if(1<Te){for(var et=Array(Te),Ue=0;Ue<Te;Ue++)et[Ue]=arguments[Ue+2];ue.children=et}if(y&&y.defaultProps)for(W in Te=y.defaultProps,Te)ue[W]===void 0&&(ue[W]=Te[W]);return Se(y,me,ue)},ce.createRef=function(){return{current:null}},ce.forwardRef=function(y){return{$$typeof:T,render:y}},ce.isValidElement=O,ce.lazy=function(y){return{$$typeof:E,_payload:{_status:-1,_result:y},_init:ae}},ce.memo=function(y,U){return{$$typeof:x,type:y,compare:U===void 0?null:U}},ce.startTransition=function(y){var U=I.T,X={};I.T=X;try{var W=y(),ue=I.S;ue!==null&&ue(X,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(ie,Ee)}catch(me){Ee(me)}finally{U!==null&&X.types!==null&&(U.types=X.types),I.T=U}},ce.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},ce.use=function(y){return I.H.use(y)},ce.useActionState=function(y,U,X){return I.H.useActionState(y,U,X)},ce.useCallback=function(y,U){return I.H.useCallback(y,U)},ce.useContext=function(y){return I.H.useContext(y)},ce.useDebugValue=function(){},ce.useDeferredValue=function(y,U){return I.H.useDeferredValue(y,U)},ce.useEffect=function(y,U){return I.H.useEffect(y,U)},ce.useEffectEvent=function(y){return I.H.useEffectEvent(y)},ce.useId=function(){return I.H.useId()},ce.useImperativeHandle=function(y,U,X){return I.H.useImperativeHandle(y,U,X)},ce.useInsertionEffect=function(y,U){return I.H.useInsertionEffect(y,U)},ce.useLayoutEffect=function(y,U){return I.H.useLayoutEffect(y,U)},ce.useMemo=function(y,U){return I.H.useMemo(y,U)},ce.useOptimistic=function(y,U){return I.H.useOptimistic(y,U)},ce.useReducer=function(y,U,X){return I.H.useReducer(y,U,X)},ce.useRef=function(y){return I.H.useRef(y)},ce.useState=function(y){return I.H.useState(y)},ce.useSyncExternalStore=function(y,U,X){return I.H.useSyncExternalStore(y,U,X)},ce.useTransition=function(){return I.H.useTransition()},ce.version="19.2.4",ce}var Df;function Ac(){return Df||(Df=1,mc.exports=zv()),mc.exports}var N=Ac(),xc={exports:{}},An={},vc={exports:{}},hc={};/**
|
|
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 wf;function kv(){return wf||(wf=1,(function(c){function u(k,Q){var ae=k.length;k.push(Q);e:for(;0<ae;){var Ee=ae-1>>>1,Z=k[Ee];if(0<m(Z,Q))k[Ee]=Q,k[ae]=Z,ae=Ee;else break e}}function f(k){return k.length===0?null:k[0]}function o(k){if(k.length===0)return null;var Q=k[0],ae=k.pop();if(ae!==Q){k[0]=ae;e:for(var Ee=0,Z=k.length,y=Z>>>1;Ee<y;){var U=2*(Ee+1)-1,X=k[U],W=U+1,ue=k[W];if(0>m(X,ae))W<Z&&0>m(ue,X)?(k[Ee]=ue,k[W]=ae,Ee=W):(k[Ee]=X,k[U]=ae,Ee=U);else if(W<Z&&0>m(ue,ae))k[Ee]=ue,k[W]=ae,Ee=W;else break e}}return Q}function m(k,Q){var ae=k.sortIndex-Q.sortIndex;return ae!==0?ae:k.id-Q.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var j=performance;c.unstable_now=function(){return j.now()}}else{var g=Date,T=g.now();c.unstable_now=function(){return g.now()-T}}var b=[],x=[],E=1,h=null,R=3,H=!1,q=!1,B=!1,Y=!1,V=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null;function G(k){for(var Q=f(x);Q!==null;){if(Q.callback===null)o(x);else if(Q.startTime<=k)o(x),Q.sortIndex=Q.expirationTime,u(b,Q);else break;Q=f(x)}}function ne(k){if(B=!1,G(k),!q)if(f(b)!==null)q=!0,ie||(ie=!0,K());else{var Q=f(x);Q!==null&&re(ne,Q.startTime-k)}}var ie=!1,I=-1,fe=5,Se=-1;function ee(){return Y?!0:!(c.unstable_now()-Se<fe)}function O(){if(Y=!1,ie){var k=c.unstable_now();Se=k;var Q=!0;try{e:{q=!1,B&&(B=!1,P(I),I=-1),H=!0;var ae=R;try{t:{for(G(k),h=f(b);h!==null&&!(h.expirationTime>k&&ee());){var Ee=h.callback;if(typeof Ee=="function"){h.callback=null,R=h.priorityLevel;var Z=Ee(h.expirationTime<=k);if(k=c.unstable_now(),typeof Z=="function"){h.callback=Z,G(k),Q=!0;break t}h===f(b)&&o(b),G(k)}else o(b);h=f(b)}if(h!==null)Q=!0;else{var y=f(x);y!==null&&re(ne,y.startTime-k),Q=!1}}break e}finally{h=null,R=ae,H=!1}Q=void 0}}finally{Q?K():ie=!1}}}var K;if(typeof le=="function")K=function(){le(O)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,J=z.port2;z.port1.onmessage=O,K=function(){J.postMessage(null)}}else K=function(){V(O,0)};function re(k,Q){I=V(function(){k(c.unstable_now())},Q)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(k){k.callback=null},c.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"):fe=0<k?Math.floor(1e3/k):5},c.unstable_getCurrentPriorityLevel=function(){return R},c.unstable_next=function(k){switch(R){case 1:case 2:case 3:var Q=3;break;default:Q=R}var ae=R;R=Q;try{return k()}finally{R=ae}},c.unstable_requestPaint=function(){Y=!0},c.unstable_runWithPriority=function(k,Q){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var ae=R;R=k;try{return Q()}finally{R=ae}},c.unstable_scheduleCallback=function(k,Q,ae){var Ee=c.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Ee+ae:Ee):ae=Ee,k){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=ae+Z,k={id:E++,callback:Q,priorityLevel:k,startTime:ae,expirationTime:Z,sortIndex:-1},ae>Ee?(k.sortIndex=ae,u(x,k),f(b)===null&&k===f(x)&&(B?(P(I),I=-1):B=!0,re(ne,ae-Ee))):(k.sortIndex=Z,u(b,k),q||H||(q=!0,ie||(ie=!0,K()))),k},c.unstable_shouldYield=ee,c.unstable_wrapCallback=function(k){var Q=R;return function(){var ae=R;R=Q;try{return k.apply(this,arguments)}finally{R=ae}}}})(hc)),hc}var Lf;function Rv(){return Lf||(Lf=1,vc.exports=kv()),vc.exports}var pc={exports:{}},Pe={};/**
|
|
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 Uf;function Ov(){if(Uf)return Pe;Uf=1;var c=Ac();function u(b){var x="https://react.dev/errors/"+b;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)x+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+b+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var o={d:{f,r:function(){throw Error(u(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},m=Symbol.for("react.portal");function j(b,x,E){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:h==null?null:""+h,children:b,containerInfo:x,implementation:E}}var g=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function T(b,x){if(b==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Pe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Pe.createPortal=function(b,x){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(u(299));return j(b,x,null,E)},Pe.flushSync=function(b){var x=g.T,E=o.p;try{if(g.T=null,o.p=2,b)return b()}finally{g.T=x,o.p=E,o.d.f()}},Pe.preconnect=function(b,x){typeof b=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(b,x))},Pe.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},Pe.preinit=function(b,x){if(typeof b=="string"&&x&&typeof x.as=="string"){var E=x.as,h=T(E,x.crossOrigin),R=typeof x.integrity=="string"?x.integrity:void 0,H=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;E==="style"?o.d.S(b,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:h,integrity:R,fetchPriority:H}):E==="script"&&o.d.X(b,{crossOrigin:h,integrity:R,fetchPriority:H,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Pe.preinitModule=function(b,x){if(typeof b=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var E=T(x.as,x.crossOrigin);o.d.M(b,{crossOrigin:E,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(b)},Pe.preload=function(b,x){if(typeof b=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var E=x.as,h=T(E,x.crossOrigin);o.d.L(b,E,{crossOrigin:h,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})}},Pe.preloadModule=function(b,x){if(typeof b=="string")if(x){var E=T(x.as,x.crossOrigin);o.d.m(b,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:E,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(b)},Pe.requestFormReset=function(b){o.d.r(b)},Pe.unstable_batchedUpdates=function(b,x){return b(x)},Pe.useFormState=function(b,x,E){return g.H.useFormState(b,x,E)},Pe.useFormStatus=function(){return g.H.useHostTransitionStatus()},Pe.version="19.2.4",Pe}var Bf;function Dv(){if(Bf)return pc.exports;Bf=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(u){console.error(u)}}return c(),pc.exports=Ov(),pc.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 Hf;function wv(){if(Hf)return An;Hf=1;var c=Rv(),u=Ac(),f=Dv();function o(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 m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function j(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 g(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 T(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 b(e){if(j(e)!==e)throw Error(o(188))}function x(e){var t=e.alternate;if(!t){if(t=j(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return b(n),e;if(i===a)return b(n),t;i=i.sibling}throw Error(o(188))}if(l.return!==a.return)l=n,a=i;else{for(var r=!1,d=n.child;d;){if(d===l){r=!0,l=n,a=i;break}if(d===a){r=!0,a=n,l=i;break}d=d.sibling}if(!r){for(d=i.child;d;){if(d===l){r=!0,l=i,a=n;break}if(d===a){r=!0,a=i,l=n;break}d=d.sibling}if(!r)throw Error(o(189))}}if(l.alternate!==a)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:t}function E(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=E(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,R=Symbol.for("react.element"),H=Symbol.for("react.transitional.element"),q=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),le=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),ie=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),Se=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),O=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=O&&e[O]||e["@@iterator"],typeof e=="function"?e:null)}var z=Symbol.for("react.client.reference");function J(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===z?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case V:return"Profiler";case Y:return"StrictMode";case ne:return"Suspense";case ie:return"SuspenseList";case Se:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case q:return"Portal";case le:return e.displayName||"Context";case P:return(e._context.displayName||"Context")+".Consumer";case G:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:J(e.type)||"Memo";case fe:t=e._payload,e=e._init;try{return J(e(t))}catch{}}return null}var re=Array.isArray,k=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Ee=[],Z=-1;function y(e){return{current:e}}function U(e){0>Z||(e.current=Ee[Z],Ee[Z]=null,Z--)}function X(e,t){Z++,Ee[Z]=e.current,e.current=t}var W=y(null),ue=y(null),me=y(null),Te=y(null);function et(e,t){switch(X(me,t),X(ue,e),X(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Pd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Pd(t),e=ef(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(W),X(W,e)}function Ue(){U(W),U(ue),U(me)}function Ra(e){e.memoizedState!==null&&X(Te,e);var t=W.current,l=ef(t,e.type);t!==l&&(X(ue,e),X(W,l))}function _n(e){ue.current===e&&(U(W),U(ue)),Te.current===e&&(U(Te),Sn._currentValue=ae)}var Js,_c;function _l(e){if(Js===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Js=t&&t[1]||"",_c=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Js+e+_c}var $s=!1;function Ws(e,t){if(!e||$s)return"";$s=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(M){var _=M}Reflect.construct(e,[],L)}else{try{L.call()}catch(M){_=M}e.call(L.prototype)}}else{try{throw Error()}catch(M){_=M}(L=e())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(M){if(M&&_&&typeof M.stack=="string")return[M.stack,_.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),r=i[0],d=i[1];if(r&&d){var v=r.split(`
|
|
44
|
+
`),A=d.split(`
|
|
45
|
+
`);for(n=a=0;a<v.length&&!v[a].includes("DetermineComponentFrameRoot");)a++;for(;n<A.length&&!A[n].includes("DetermineComponentFrameRoot");)n++;if(a===v.length||n===A.length)for(a=v.length-1,n=A.length-1;1<=a&&0<=n&&v[a]!==A[n];)n--;for(;1<=a&&0<=n;a--,n--)if(v[a]!==A[n]){if(a!==1||n!==1)do if(a--,n--,0>n||v[a]!==A[n]){var D=`
|
|
46
|
+
`+v[a].replace(" at new "," at ");return e.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",e.displayName)),D}while(1<=a&&0<=n);break}}}finally{$s=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?_l(l):""}function sm(e,t){switch(e.tag){case 26:case 27:case 5:return _l(e.type);case 16:return _l("Lazy");case 13:return e.child!==t&&t!==null?_l("Suspense Fallback"):_l("Suspense");case 19:return _l("SuspenseList");case 0:case 15:return Ws(e.type,!1);case 11:return Ws(e.type.render,!1);case 1:return Ws(e.type,!0);case 31:return _l("Activity");default:return""}}function Mc(e){try{var t="",l=null;do t+=sm(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var Fs=Object.prototype.hasOwnProperty,Is=c.unstable_scheduleCallback,Ps=c.unstable_cancelCallback,im=c.unstable_shouldYield,rm=c.unstable_requestPaint,ot=c.unstable_now,cm=c.unstable_getCurrentPriorityLevel,zc=c.unstable_ImmediatePriority,kc=c.unstable_UserBlockingPriority,Mn=c.unstable_NormalPriority,um=c.unstable_LowPriority,Rc=c.unstable_IdlePriority,om=c.log,dm=c.unstable_setDisableYieldValue,Oa=null,dt=null;function tl(e){if(typeof om=="function"&&dm(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(Oa,e)}catch{}}var ft=Math.clz32?Math.clz32:xm,fm=Math.log,mm=Math.LN2;function xm(e){return e>>>=0,e===0?32:31-(fm(e)/mm|0)|0}var zn=256,kn=262144,Rn=4194304;function Ml(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 On(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var d=a&134217727;return d!==0?(a=d&~i,a!==0?n=Ml(a):(r&=d,r!==0?n=Ml(r):l||(l=d&~e,l!==0&&(n=Ml(l))))):(d=a&~i,d!==0?n=Ml(d):r!==0?n=Ml(r):l||(l=a&~e,l!==0&&(n=Ml(l)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function Da(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vm(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 Oc(){var e=Rn;return Rn<<=1,(Rn&62914560)===0&&(Rn=4194304),e}function ei(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function wa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function hm(e,t,l,a,n,i){var r=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 d=e.entanglements,v=e.expirationTimes,A=e.hiddenUpdates;for(l=r&~l;0<l;){var D=31-ft(l),L=1<<D;d[D]=0,v[D]=-1;var _=A[D];if(_!==null)for(A[D]=null,D=0;D<_.length;D++){var M=_[D];M!==null&&(M.lane&=-536870913)}l&=~L}a!==0&&Dc(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(r&~t))}function Dc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-ft(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function wc(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-ft(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function Lc(e,t){var l=t&-t;return l=(l&42)!==0?1:ti(l),(l&(e.suspendedLanes|t))!==0?0:l}function ti(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 li(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Uc(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Ef(e.type))}function Bc(e,t){var l=Q.p;try{return Q.p=e,t()}finally{Q.p=l}}var ll=Math.random().toString(36).slice(2),Je="__reactFiber$"+ll,at="__reactProps$"+ll,Jl="__reactContainer$"+ll,ai="__reactEvents$"+ll,pm="__reactListeners$"+ll,ym="__reactHandles$"+ll,Hc="__reactResources$"+ll,La="__reactMarker$"+ll;function ni(e){delete e[Je],delete e[at],delete e[ai],delete e[pm],delete e[ym]}function $l(e){var t=e[Je];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Jl]||l[Je]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=cf(e);e!==null;){if(l=e[Je])return l;e=cf(e)}return t}e=l,l=e.parentNode}return null}function Wl(e){if(e=e[Je]||e[Jl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ua(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Fl(e){var t=e[Hc];return t||(t=e[Hc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ze(e){e[La]=!0}var qc=new Set,Yc={};function zl(e,t){Il(e,t),Il(e+"Capture",t)}function Il(e,t){for(Yc[e]=t,e=0;e<t.length;e++)qc.add(t[e])}var gm=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]*$"),Gc={},Qc={};function bm(e){return Fs.call(Qc,e)?!0:Fs.call(Gc,e)?!1:gm.test(e)?Qc[e]=!0:(Gc[e]=!0,!1)}function Dn(e,t,l){if(bm(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 wn(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 Ut(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 bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jm(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 n=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(r){l=""+r,i.call(this,r)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(r){l=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function si(e){if(!e._valueTracker){var t=Xc(e)?"checked":"value";e._valueTracker=jm(e,t,""+e[t])}}function Vc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Xc(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Ln(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 Sm=/[\n"\\]/g;function jt(e){return e.replace(Sm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ii(e,t,l,a,n,i,r,d){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+bt(t)):e.value!==""+bt(t)&&(e.value=""+bt(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?ri(e,r,bt(t)):l!=null?ri(e,r,bt(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+bt(d):e.removeAttribute("name")}function Zc(e,t,l,a,n,i,r,d){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){si(e);return}l=l!=null?""+bt(l):"",t=t!=null?""+bt(t):l,d||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=d?e.checked:!!a,e.defaultChecked=!!a,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),si(e)}function ri(e,t,l){t==="number"&&Ln(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Pl(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+bt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Kc(e,t,l){if(t!=null&&(t=""+bt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+bt(l):""}function Jc(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(o(92));if(re(a)){if(1<a.length)throw Error(o(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=bt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),si(e)}function ea(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Nm=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 $c(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||Nm.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Wc(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(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 n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&$c(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&$c(e,i,t[i])}function ci(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 Em=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"]]),Tm=/^[\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 Un(e){return Tm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Bt(){}var ui=null;function oi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ta=null,la=null;function Fc(e){var t=Wl(e);if(t&&(e=t.stateNode)){var l=e[at]||null;e:switch(e=t.stateNode,t.type){case"input":if(ii(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="'+jt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[at]||null;if(!n)throw Error(o(90));ii(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Vc(a)}break e;case"textarea":Kc(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Pl(e,!!l.multiple,t,!1)}}}var di=!1;function Ic(e,t,l){if(di)return e(t,l);di=!0;try{var a=e(t);return a}finally{if(di=!1,(ta!==null||la!==null)&&(Es(),ta&&(t=ta,e=la,la=ta=null,Fc(t),e)))for(t=0;t<e.length;t++)Fc(e[t])}}function Ba(e,t){var l=e.stateNode;if(l===null)return null;var a=l[at]||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(o(231,t,typeof l));return l}var Ht=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fi=!1;if(Ht)try{var Ha={};Object.defineProperty(Ha,"passive",{get:function(){fi=!0}}),window.addEventListener("test",Ha,Ha),window.removeEventListener("test",Ha,Ha)}catch{fi=!1}var al=null,mi=null,Bn=null;function Pc(){if(Bn)return Bn;var e,t=mi,l=t.length,a,n="value"in al?al.value:al.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var r=l-e;for(a=1;a<=r&&t[l-a]===n[i-a];a++);return Bn=n.slice(e,1<a?1-a:void 0)}function Hn(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 qn(){return!0}function eu(){return!1}function nt(e){function t(l,a,n,i,r){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=r,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(l=e[d],this[d]=l?l(i):i[d]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?qn:eu,this.isPropagationStopped=eu,this}return h(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=qn)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=qn)},persist:function(){},isPersistent:qn}),t}var kl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yn=nt(kl),qa=h({},kl,{view:0,detail:0}),Cm=nt(qa),xi,vi,Ya,Gn=h({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pi,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!==Ya&&(Ya&&e.type==="mousemove"?(xi=e.screenX-Ya.screenX,vi=e.screenY-Ya.screenY):vi=xi=0,Ya=e),xi)},movementY:function(e){return"movementY"in e?e.movementY:vi}}),tu=nt(Gn),Am=h({},Gn,{dataTransfer:0}),_m=nt(Am),Mm=h({},qa,{relatedTarget:0}),hi=nt(Mm),zm=h({},kl,{animationName:0,elapsedTime:0,pseudoElement:0}),km=nt(zm),Rm=h({},kl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Om=nt(Rm),Dm=h({},kl,{data:0}),lu=nt(Dm),wm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lm={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"},Um={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Um[e])?!!t[e]:!1}function pi(){return Bm}var Hm=h({},qa,{key:function(e){if(e.key){var t=wm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Hn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Lm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pi,charCode:function(e){return e.type==="keypress"?Hn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Hn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),qm=nt(Hm),Ym=h({},Gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),au=nt(Ym),Gm=h({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pi}),Qm=nt(Gm),Xm=h({},kl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vm=nt(Xm),Zm=h({},Gn,{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}),Km=nt(Zm),Jm=h({},kl,{newState:0,oldState:0}),$m=nt(Jm),Wm=[9,13,27,32],yi=Ht&&"CompositionEvent"in window,Ga=null;Ht&&"documentMode"in document&&(Ga=document.documentMode);var Fm=Ht&&"TextEvent"in window&&!Ga,nu=Ht&&(!yi||Ga&&8<Ga&&11>=Ga),su=" ",iu=!1;function ru(e,t){switch(e){case"keyup":return Wm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var aa=!1;function Im(e,t){switch(e){case"compositionend":return cu(t);case"keypress":return t.which!==32?null:(iu=!0,su);case"textInput":return e=t.data,e===su&&iu?null:e;default:return null}}function Pm(e,t){if(aa)return e==="compositionend"||!yi&&ru(e,t)?(e=Pc(),Bn=mi=al=null,aa=!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 nu&&t.locale!=="ko"?null:t.data;default:return null}}var ex={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 uu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ex[e.type]:t==="textarea"}function ou(e,t,l,a){ta?la?la.push(a):la=[a]:ta=a,t=ks(t,"onChange"),0<t.length&&(l=new Yn("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Qa=null,Xa=null;function tx(e){Kd(e,0)}function Qn(e){var t=Ua(e);if(Vc(t))return e}function du(e,t){if(e==="change")return t}var fu=!1;if(Ht){var gi;if(Ht){var bi="oninput"in document;if(!bi){var mu=document.createElement("div");mu.setAttribute("oninput","return;"),bi=typeof mu.oninput=="function"}gi=bi}else gi=!1;fu=gi&&(!document.documentMode||9<document.documentMode)}function xu(){Qa&&(Qa.detachEvent("onpropertychange",vu),Xa=Qa=null)}function vu(e){if(e.propertyName==="value"&&Qn(Xa)){var t=[];ou(t,Xa,e,oi(e)),Ic(tx,t)}}function lx(e,t,l){e==="focusin"?(xu(),Qa=t,Xa=l,Qa.attachEvent("onpropertychange",vu)):e==="focusout"&&xu()}function ax(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qn(Xa)}function nx(e,t){if(e==="click")return Qn(t)}function sx(e,t){if(e==="input"||e==="change")return Qn(t)}function ix(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:ix;function Va(e,t){if(mt(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 n=l[a];if(!Fs.call(t,n)||!mt(e[n],t[n]))return!1}return!0}function hu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pu(e,t){var l=hu(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=hu(l)}}function yu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ln(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=Ln(e.document)}return t}function ji(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 rx=Ht&&"documentMode"in document&&11>=document.documentMode,na=null,Si=null,Za=null,Ni=!1;function bu(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ni||na==null||na!==Ln(a)||(a=na,"selectionStart"in a&&ji(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}),Za&&Va(Za,a)||(Za=a,a=ks(Si,"onSelect"),0<a.length&&(t=new Yn("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=na)))}function Rl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var sa={animationend:Rl("Animation","AnimationEnd"),animationiteration:Rl("Animation","AnimationIteration"),animationstart:Rl("Animation","AnimationStart"),transitionrun:Rl("Transition","TransitionRun"),transitionstart:Rl("Transition","TransitionStart"),transitioncancel:Rl("Transition","TransitionCancel"),transitionend:Rl("Transition","TransitionEnd")},Ei={},ju={};Ht&&(ju=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function Ol(e){if(Ei[e])return Ei[e];if(!sa[e])return e;var t=sa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in ju)return Ei[e]=t[l];return e}var Su=Ol("animationend"),Nu=Ol("animationiteration"),Eu=Ol("animationstart"),cx=Ol("transitionrun"),ux=Ol("transitionstart"),ox=Ol("transitioncancel"),Tu=Ol("transitionend"),Cu=new Map,Ti="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(" ");Ti.push("scrollEnd");function zt(e,t){Cu.set(e,t),zl(t,[e])}var Xn=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)},St=[],ia=0,Ci=0;function Vn(){for(var e=ia,t=Ci=ia=0;t<e;){var l=St[t];St[t++]=null;var a=St[t];St[t++]=null;var n=St[t];St[t++]=null;var i=St[t];if(St[t++]=null,a!==null&&n!==null){var r=a.pending;r===null?n.next=n:(n.next=r.next,r.next=n),a.pending=n}i!==0&&Au(l,n,i)}}function Zn(e,t,l,a){St[ia++]=e,St[ia++]=t,St[ia++]=l,St[ia++]=a,Ci|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ai(e,t,l,a){return Zn(e,t,l,a),Kn(e)}function Dl(e,t){return Zn(e,null,null,t),Kn(e)}function Au(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-ft(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function Kn(e){if(50<vn)throw vn=0,Lr=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ra={};function dx(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 xt(e,t,l,a){return new dx(e,t,l,a)}function _i(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qt(e,t){var l=e.alternate;return l===null?(l=xt(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 _u(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 Jn(e,t,l,a,n,i){var r=0;if(a=e,typeof e=="function")_i(e)&&(r=1);else if(typeof e=="string")r=hv(e,l,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Se:return e=xt(31,l,t,n),e.elementType=Se,e.lanes=i,e;case B:return wl(l.children,n,i,t);case Y:r=8,n|=24;break;case V:return e=xt(12,l,t,n|2),e.elementType=V,e.lanes=i,e;case ne:return e=xt(13,l,t,n),e.elementType=ne,e.lanes=i,e;case ie:return e=xt(19,l,t,n),e.elementType=ie,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case le:r=10;break e;case P:r=9;break e;case G:r=11;break e;case I:r=14;break e;case fe:r=16,a=null;break e}r=29,l=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=xt(r,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function wl(e,t,l,a){return e=xt(7,e,a,t),e.lanes=l,e}function Mi(e,t,l){return e=xt(6,e,null,t),e.lanes=l,e}function Mu(e){var t=xt(18,null,null,0);return t.stateNode=e,t}function zi(e,t,l){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zu=new WeakMap;function Nt(e,t){if(typeof e=="object"&&e!==null){var l=zu.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Mc(t)},zu.set(e,t),t)}return{value:e,source:t,stack:Mc(t)}}var ca=[],ua=0,$n=null,Ka=0,Et=[],Tt=0,nl=null,Ot=1,Dt="";function Yt(e,t){ca[ua++]=Ka,ca[ua++]=$n,$n=e,Ka=t}function ku(e,t,l){Et[Tt++]=Ot,Et[Tt++]=Dt,Et[Tt++]=nl,nl=e;var a=Ot;e=Dt;var n=32-ft(a)-1;a&=~(1<<n),l+=1;var i=32-ft(t)+n;if(30<i){var r=n-n%5;i=(a&(1<<r)-1).toString(32),a>>=r,n-=r,Ot=1<<32-ft(t)+n|l<<n|a,Dt=i+e}else Ot=1<<i|l<<n|a,Dt=e}function ki(e){e.return!==null&&(Yt(e,1),ku(e,1,0))}function Ri(e){for(;e===$n;)$n=ca[--ua],ca[ua]=null,Ka=ca[--ua],ca[ua]=null;for(;e===nl;)nl=Et[--Tt],Et[Tt]=null,Dt=Et[--Tt],Et[Tt]=null,Ot=Et[--Tt],Et[Tt]=null}function Ru(e,t){Et[Tt++]=Ot,Et[Tt++]=Dt,Et[Tt++]=nl,Ot=t.id,Dt=t.overflow,nl=e}var $e=null,Re=null,ye=!1,sl=null,Ct=!1,Oi=Error(o(519));function il(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ja(Nt(t,e)),Oi}function Ou(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Je]=e,t[at]=a,l){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(l=0;l<pn.length;l++)ve(pn[l],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),Zc(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),Jc(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||Fd(t.textContent,l)?(a.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),a.onScroll!=null&&ve("scroll",t),a.onScrollEnd!=null&&ve("scrollend",t),a.onClick!=null&&(t.onclick=Bt),t=!0):t=!1,t||il(e,!0)}function Du(e){for($e=e.return;$e;)switch($e.tag){case 5:case 31:case 13:Ct=!1;return;case 27:case 3:Ct=!0;return;default:$e=$e.return}}function oa(e){if(e!==$e)return!1;if(!ye)return Du(e),ye=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Fr(e.type,e.memoizedProps)),l=!l),l&&Re&&il(e),Du(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Re=rf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Re=rf(e)}else t===27?(t=Re,bl(e.type)?(e=lc,lc=null,Re=e):Re=t):Re=$e?_t(e.stateNode.nextSibling):null;return!0}function Ll(){Re=$e=null,ye=!1}function Di(){var e=sl;return e!==null&&(ct===null?ct=e:ct.push.apply(ct,e),sl=null),e}function Ja(e){sl===null?sl=[e]:sl.push(e)}var wi=y(null),Ul=null,Gt=null;function rl(e,t,l){X(wi,t._currentValue),t._currentValue=l}function Qt(e){e._currentValue=wi.current,U(wi)}function Li(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 Ui(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var r=n.child;i=i.firstContext;e:for(;i!==null;){var d=i;i=n;for(var v=0;v<t.length;v++)if(d.context===t[v]){i.lanes|=l,d=i.alternate,d!==null&&(d.lanes|=l),Li(i.return,l,e),a||(r=null);break e}i=d.next}}else if(n.tag===18){if(r=n.return,r===null)throw Error(o(341));r.lanes|=l,i=r.alternate,i!==null&&(i.lanes|=l),Li(r,l,e),r=null}else r=n.child;if(r!==null)r.return=n;else for(r=n;r!==null;){if(r===e){r=null;break}if(n=r.sibling,n!==null){n.return=r.return,r=n;break}r=r.return}n=r}}function da(e,t,l,a){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var r=n.alternate;if(r===null)throw Error(o(387));if(r=r.memoizedProps,r!==null){var d=n.type;mt(n.pendingProps.value,r.value)||(e!==null?e.push(d):e=[d])}}else if(n===Te.current){if(r=n.alternate,r===null)throw Error(o(387));r.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Sn):e=[Sn])}n=n.return}e!==null&&Ui(t,e,l,a),t.flags|=262144}function Wn(e){for(e=e.firstContext;e!==null;){if(!mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Bl(e){Ul=e,Gt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function We(e){return wu(Ul,e)}function Fn(e,t){return Ul===null&&Bl(e),wu(e,t)}function wu(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Gt===null){if(e===null)throw Error(o(308));Gt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gt=Gt.next=t;return l}var fx=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()})}},mx=c.unstable_scheduleCallback,xx=c.unstable_NormalPriority,qe={$$typeof:le,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bi(){return{controller:new fx,data:new Map,refCount:0}}function $a(e){e.refCount--,e.refCount===0&&mx(xx,function(){e.controller.abort()})}var Wa=null,Hi=0,fa=0,ma=null;function vx(e,t){if(Wa===null){var l=Wa=[];Hi=0,fa=Gr(),ma={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Hi++,t.then(Lu,Lu),t}function Lu(){if(--Hi===0&&Wa!==null){ma!==null&&(ma.status="fulfilled");var e=Wa;Wa=null,fa=0,ma=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function hx(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var Uu=k.S;k.S=function(e,t){jd=ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&vx(e,t),Uu!==null&&Uu(e,t)};var Hl=y(null);function qi(){var e=Hl.current;return e!==null?e:ke.pooledCache}function In(e,t){t===null?X(Hl,Hl.current):X(Hl,t.pool)}function Bu(){var e=qi();return e===null?null:{parent:qe._currentValue,pool:e}}var xa=Error(o(460)),Yi=Error(o(474)),Pn=Error(o(542)),es={then:function(){}};function Hu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function qu(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Bt,Bt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Gu(e),e;default:if(typeof t.status=="string")t.then(Bt,Bt);else{if(e=ke,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Gu(e),e}throw Yl=t,xa}}function ql(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Yl=l,xa):l}}var Yl=null;function Yu(){if(Yl===null)throw Error(o(459));var e=Yl;return Yl=null,e}function Gu(e){if(e===xa||e===Pn)throw Error(o(483))}var va=null,Fa=0;function ts(e){var t=Fa;return Fa+=1,va===null&&(va=[]),qu(va,e,t)}function Ia(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ls(e,t){throw t.$$typeof===R?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Qu(e){function t(S,p){if(e){var C=S.deletions;C===null?(S.deletions=[p],S.flags|=16):C.push(p)}}function l(S,p){if(!e)return null;for(;p!==null;)t(S,p),p=p.sibling;return null}function a(S){for(var p=new Map;S!==null;)S.key!==null?p.set(S.key,S):p.set(S.index,S),S=S.sibling;return p}function n(S,p){return S=qt(S,p),S.index=0,S.sibling=null,S}function i(S,p,C){return S.index=C,e?(C=S.alternate,C!==null?(C=C.index,C<p?(S.flags|=67108866,p):C):(S.flags|=67108866,p)):(S.flags|=1048576,p)}function r(S){return e&&S.alternate===null&&(S.flags|=67108866),S}function d(S,p,C,w){return p===null||p.tag!==6?(p=Mi(C,S.mode,w),p.return=S,p):(p=n(p,C),p.return=S,p)}function v(S,p,C,w){var te=C.type;return te===B?D(S,p,C.props.children,w,C.key):p!==null&&(p.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===fe&&ql(te)===p.type)?(p=n(p,C.props),Ia(p,C),p.return=S,p):(p=Jn(C.type,C.key,C.props,null,S.mode,w),Ia(p,C),p.return=S,p)}function A(S,p,C,w){return p===null||p.tag!==4||p.stateNode.containerInfo!==C.containerInfo||p.stateNode.implementation!==C.implementation?(p=zi(C,S.mode,w),p.return=S,p):(p=n(p,C.children||[]),p.return=S,p)}function D(S,p,C,w,te){return p===null||p.tag!==7?(p=wl(C,S.mode,w,te),p.return=S,p):(p=n(p,C),p.return=S,p)}function L(S,p,C){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return p=Mi(""+p,S.mode,C),p.return=S,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case H:return C=Jn(p.type,p.key,p.props,null,S.mode,C),Ia(C,p),C.return=S,C;case q:return p=zi(p,S.mode,C),p.return=S,p;case fe:return p=ql(p),L(S,p,C)}if(re(p)||K(p))return p=wl(p,S.mode,C,null),p.return=S,p;if(typeof p.then=="function")return L(S,ts(p),C);if(p.$$typeof===le)return L(S,Fn(S,p),C);ls(S,p)}return null}function _(S,p,C,w){var te=p!==null?p.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return te!==null?null:d(S,p,""+C,w);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case H:return C.key===te?v(S,p,C,w):null;case q:return C.key===te?A(S,p,C,w):null;case fe:return C=ql(C),_(S,p,C,w)}if(re(C)||K(C))return te!==null?null:D(S,p,C,w,null);if(typeof C.then=="function")return _(S,p,ts(C),w);if(C.$$typeof===le)return _(S,p,Fn(S,C),w);ls(S,C)}return null}function M(S,p,C,w,te){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return S=S.get(C)||null,d(p,S,""+w,te);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case H:return S=S.get(w.key===null?C:w.key)||null,v(p,S,w,te);case q:return S=S.get(w.key===null?C:w.key)||null,A(p,S,w,te);case fe:return w=ql(w),M(S,p,C,w,te)}if(re(w)||K(w))return S=S.get(C)||null,D(p,S,w,te,null);if(typeof w.then=="function")return M(S,p,C,ts(w),te);if(w.$$typeof===le)return M(S,p,C,Fn(p,w),te);ls(p,w)}return null}function $(S,p,C,w){for(var te=null,be=null,F=p,de=p=0,pe=null;F!==null&&de<C.length;de++){F.index>de?(pe=F,F=null):pe=F.sibling;var je=_(S,F,C[de],w);if(je===null){F===null&&(F=pe);break}e&&F&&je.alternate===null&&t(S,F),p=i(je,p,de),be===null?te=je:be.sibling=je,be=je,F=pe}if(de===C.length)return l(S,F),ye&&Yt(S,de),te;if(F===null){for(;de<C.length;de++)F=L(S,C[de],w),F!==null&&(p=i(F,p,de),be===null?te=F:be.sibling=F,be=F);return ye&&Yt(S,de),te}for(F=a(F);de<C.length;de++)pe=M(F,S,de,C[de],w),pe!==null&&(e&&pe.alternate!==null&&F.delete(pe.key===null?de:pe.key),p=i(pe,p,de),be===null?te=pe:be.sibling=pe,be=pe);return e&&F.forEach(function(Tl){return t(S,Tl)}),ye&&Yt(S,de),te}function se(S,p,C,w){if(C==null)throw Error(o(151));for(var te=null,be=null,F=p,de=p=0,pe=null,je=C.next();F!==null&&!je.done;de++,je=C.next()){F.index>de?(pe=F,F=null):pe=F.sibling;var Tl=_(S,F,je.value,w);if(Tl===null){F===null&&(F=pe);break}e&&F&&Tl.alternate===null&&t(S,F),p=i(Tl,p,de),be===null?te=Tl:be.sibling=Tl,be=Tl,F=pe}if(je.done)return l(S,F),ye&&Yt(S,de),te;if(F===null){for(;!je.done;de++,je=C.next())je=L(S,je.value,w),je!==null&&(p=i(je,p,de),be===null?te=je:be.sibling=je,be=je);return ye&&Yt(S,de),te}for(F=a(F);!je.done;de++,je=C.next())je=M(F,S,de,je.value,w),je!==null&&(e&&je.alternate!==null&&F.delete(je.key===null?de:je.key),p=i(je,p,de),be===null?te=je:be.sibling=je,be=je);return e&&F.forEach(function(Av){return t(S,Av)}),ye&&Yt(S,de),te}function ze(S,p,C,w){if(typeof C=="object"&&C!==null&&C.type===B&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case H:e:{for(var te=C.key;p!==null;){if(p.key===te){if(te=C.type,te===B){if(p.tag===7){l(S,p.sibling),w=n(p,C.props.children),w.return=S,S=w;break e}}else if(p.elementType===te||typeof te=="object"&&te!==null&&te.$$typeof===fe&&ql(te)===p.type){l(S,p.sibling),w=n(p,C.props),Ia(w,C),w.return=S,S=w;break e}l(S,p);break}else t(S,p);p=p.sibling}C.type===B?(w=wl(C.props.children,S.mode,w,C.key),w.return=S,S=w):(w=Jn(C.type,C.key,C.props,null,S.mode,w),Ia(w,C),w.return=S,S=w)}return r(S);case q:e:{for(te=C.key;p!==null;){if(p.key===te)if(p.tag===4&&p.stateNode.containerInfo===C.containerInfo&&p.stateNode.implementation===C.implementation){l(S,p.sibling),w=n(p,C.children||[]),w.return=S,S=w;break e}else{l(S,p);break}else t(S,p);p=p.sibling}w=zi(C,S.mode,w),w.return=S,S=w}return r(S);case fe:return C=ql(C),ze(S,p,C,w)}if(re(C))return $(S,p,C,w);if(K(C)){if(te=K(C),typeof te!="function")throw Error(o(150));return C=te.call(C),se(S,p,C,w)}if(typeof C.then=="function")return ze(S,p,ts(C),w);if(C.$$typeof===le)return ze(S,p,Fn(S,C),w);ls(S,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,p!==null&&p.tag===6?(l(S,p.sibling),w=n(p,C),w.return=S,S=w):(l(S,p),w=Mi(C,S.mode,w),w.return=S,S=w),r(S)):l(S,p)}return function(S,p,C,w){try{Fa=0;var te=ze(S,p,C,w);return va=null,te}catch(F){if(F===xa||F===Pn)throw F;var be=xt(29,F,null,S.mode);return be.lanes=w,be.return=S,be}finally{}}}var Gl=Qu(!0),Xu=Qu(!1),cl=!1;function Gi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qi(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 ul(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ol(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ne&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Kn(e),Au(e,null,l),t}return Zn(e,a,t,l),Kn(e)}function Pa(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,wc(e,l)}}function Xi(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var r={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=r:i=i.next=r,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:i,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 Vi=!1;function en(){if(Vi){var e=ma;if(e!==null)throw e}}function tn(e,t,l,a){Vi=!1;var n=e.updateQueue;cl=!1;var i=n.firstBaseUpdate,r=n.lastBaseUpdate,d=n.shared.pending;if(d!==null){n.shared.pending=null;var v=d,A=v.next;v.next=null,r===null?i=A:r.next=A,r=v;var D=e.alternate;D!==null&&(D=D.updateQueue,d=D.lastBaseUpdate,d!==r&&(d===null?D.firstBaseUpdate=A:d.next=A,D.lastBaseUpdate=v))}if(i!==null){var L=n.baseState;r=0,D=A=v=null,d=i;do{var _=d.lane&-536870913,M=_!==d.lane;if(M?(he&_)===_:(a&_)===_){_!==0&&_===fa&&(Vi=!0),D!==null&&(D=D.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var $=e,se=d;_=t;var ze=l;switch(se.tag){case 1:if($=se.payload,typeof $=="function"){L=$.call(ze,L,_);break e}L=$;break e;case 3:$.flags=$.flags&-65537|128;case 0:if($=se.payload,_=typeof $=="function"?$.call(ze,L,_):$,_==null)break e;L=h({},L,_);break e;case 2:cl=!0}}_=d.callback,_!==null&&(e.flags|=64,M&&(e.flags|=8192),M=n.callbacks,M===null?n.callbacks=[_]:M.push(_))}else M={lane:_,tag:d.tag,payload:d.payload,callback:d.callback,next:null},D===null?(A=D=M,v=L):D=D.next=M,r|=_;if(d=d.next,d===null){if(d=n.shared.pending,d===null)break;M=d,d=M.next,M.next=null,n.lastBaseUpdate=M,n.shared.pending=null}}while(!0);D===null&&(v=L),n.baseState=v,n.firstBaseUpdate=A,n.lastBaseUpdate=D,i===null&&(n.shared.lanes=0),vl|=r,e.lanes=r,e.memoizedState=L}}function Vu(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Zu(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Vu(l[e],t)}var ha=y(null),as=y(0);function Ku(e,t){e=It,X(as,e),X(ha,t),It=e|t.baseLanes}function Zi(){X(as,It),X(ha,ha.current)}function Ki(){It=as.current,U(ha),U(as)}var vt=y(null),At=null;function dl(e){var t=e.alternate;X(Be,Be.current&1),X(vt,e),At===null&&(t===null||ha.current!==null||t.memoizedState!==null)&&(At=e)}function Ji(e){X(Be,Be.current),X(vt,e),At===null&&(At=e)}function Ju(e){e.tag===22?(X(Be,Be.current),X(vt,e),At===null&&(At=e)):fl()}function fl(){X(Be,Be.current),X(vt,vt.current)}function ht(e){U(vt),At===e&&(At=null),U(Be)}var Be=y(0);function ns(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ec(l)||tc(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 Xt=0,oe=null,_e=null,Ye=null,ss=!1,pa=!1,Ql=!1,is=0,ln=0,ya=null,px=0;function we(){throw Error(o(321))}function $i(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!mt(e[l],t[l]))return!1;return!0}function Wi(e,t,l,a,n,i){return Xt=i,oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Ro:dr,Ql=!1,i=l(a,n),Ql=!1,pa&&(i=Wu(t,l,a,n)),$u(e),i}function $u(e){k.H=sn;var t=_e!==null&&_e.next!==null;if(Xt=0,Ye=_e=oe=null,ss=!1,ln=0,ya=null,t)throw Error(o(300));e===null||Ge||(e=e.dependencies,e!==null&&Wn(e)&&(Ge=!0))}function Wu(e,t,l,a){oe=e;var n=0;do{if(pa&&(ya=null),ln=0,pa=!1,25<=n)throw Error(o(301));if(n+=1,Ye=_e=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}k.H=Oo,i=t(l,a)}while(pa);return i}function yx(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?an(t):t,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(oe.flags|=1024),t}function Fi(){var e=is!==0;return is=0,e}function Ii(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Pi(e){if(ss){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ss=!1}Xt=0,Ye=_e=oe=null,pa=!1,ln=is=0,ya=null}function tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?oe.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function He(){if(_e===null){var e=oe.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Ye===null?oe.memoizedState:Ye.next;if(t!==null)Ye=t,_e=e;else{if(e===null)throw oe.alternate===null?Error(o(467)):Error(o(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Ye===null?oe.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function an(e){var t=ln;return ln+=1,ya===null&&(ya=[]),e=qu(ya,e,t),t=oe,(Ye===null?t.memoizedState:Ye.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Ro:dr),e}function cs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return an(e);if(e.$$typeof===le)return We(e)}throw Error(o(438,String(e)))}function er(e){var t=null,l=oe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=oe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=rs(),oe.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]=ee;return t.index++,l}function Vt(e,t){return typeof t=="function"?t(e):t}function us(e){var t=He();return tr(t,_e,e)}function tr(e,t,l){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var r=n.next;n.next=i.next,i.next=r}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var d=r=null,v=null,A=t,D=!1;do{var L=A.lane&-536870913;if(L!==A.lane?(he&L)===L:(Xt&L)===L){var _=A.revertLane;if(_===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),L===fa&&(D=!0);else if((Xt&_)===_){A=A.next,_===fa&&(D=!0);continue}else L={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},v===null?(d=v=L,r=i):v=v.next=L,oe.lanes|=_,vl|=_;L=A.action,Ql&&l(i,L),i=A.hasEagerState?A.eagerState:l(i,L)}else _={lane:L,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},v===null?(d=v=_,r=i):v=v.next=_,oe.lanes|=L,vl|=L;A=A.next}while(A!==null&&A!==t);if(v===null?r=i:v.next=d,!mt(i,e.memoizedState)&&(Ge=!0,D&&(l=ma,l!==null)))throw l;e.memoizedState=i,e.baseState=r,e.baseQueue=v,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function lr(e){var t=He(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var r=n=n.next;do i=e(i,r.action),r=r.next;while(r!==n);mt(i,t.memoizedState)||(Ge=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function Fu(e,t,l){var a=oe,n=He(),i=ye;if(i){if(l===void 0)throw Error(o(407));l=l()}else l=t();var r=!mt((_e||n).memoizedState,l);if(r&&(n.memoizedState=l,Ge=!0),n=n.queue,sr(eo.bind(null,a,n,e),[e]),n.getSnapshot!==t||r||Ye!==null&&Ye.memoizedState.tag&1){if(a.flags|=2048,ga(9,{destroy:void 0},Pu.bind(null,a,n,l,t),null),ke===null)throw Error(o(349));i||(Xt&127)!==0||Iu(a,t,l)}return l}function Iu(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=oe.updateQueue,t===null?(t=rs(),oe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Pu(e,t,l,a){t.value=l,t.getSnapshot=a,to(t)&&lo(e)}function eo(e,t,l){return l(function(){to(t)&&lo(e)})}function to(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!mt(e,l)}catch{return!0}}function lo(e){var t=Dl(e,2);t!==null&&ut(t,e,2)}function ar(e){var t=tt();if(typeof e=="function"){var l=e;if(e=l(),Ql){tl(!0);try{l()}finally{tl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vt,lastRenderedState:e},t}function ao(e,t,l,a){return e.baseState=l,tr(e,_e,typeof a=="function"?a:Vt)}function gx(e,t,l,a,n){if(fs(e))throw Error(o(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){i.listeners.push(r)}};k.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,no(t,i)):(i.next=l.next,t.pending=l.next=i)}}function no(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=k.T,r={};k.T=r;try{var d=l(n,a),v=k.S;v!==null&&v(r,d),so(e,t,d)}catch(A){nr(e,t,A)}finally{i!==null&&r.types!==null&&(i.types=r.types),k.T=i}}else try{i=l(n,a),so(e,t,i)}catch(A){nr(e,t,A)}}function so(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){io(e,t,a)},function(a){return nr(e,t,a)}):io(e,t,l)}function io(e,t,l){t.status="fulfilled",t.value=l,ro(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,no(e,l)))}function nr(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,ro(t),t=t.next;while(t!==a)}e.action=null}function ro(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function co(e,t){return t}function uo(e,t){if(ye){var l=ke.formState;if(l!==null){e:{var a=oe;if(ye){if(Re){t:{for(var n=Re,i=Ct;n.nodeType!==8;){if(!i){n=null;break t}if(n=_t(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){Re=_t(n.nextSibling),a=n.data==="F!";break e}}il(a)}a=!1}a&&(t=l[0])}}return l=tt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:t},l.queue=a,l=Mo.bind(null,oe,a),a.dispatch=l,a=ar(!1),i=or.bind(null,oe,!1,a.queue),a=tt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=gx.bind(null,oe,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function oo(e){var t=He();return fo(t,_e,e)}function fo(e,t,l){if(t=tr(e,t,co)[0],e=us(Vt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=an(t)}catch(r){throw r===xa?Pn:r}else a=t;t=He();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(oe.flags|=2048,ga(9,{destroy:void 0},bx.bind(null,n,l),null)),[a,i,e]}function bx(e,t){e.action=t}function mo(e){var t=He(),l=_e;if(l!==null)return fo(t,l,e);He(),t=t.memoizedState,l=He();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function ga(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=oe.updateQueue,t===null&&(t=rs(),oe.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 xo(){return He().memoizedState}function os(e,t,l,a){var n=tt();oe.flags|=e,n.memoizedState=ga(1|t,{destroy:void 0},l,a===void 0?null:a)}function ds(e,t,l,a){var n=He();a=a===void 0?null:a;var i=n.memoizedState.inst;_e!==null&&a!==null&&$i(a,_e.memoizedState.deps)?n.memoizedState=ga(t,i,l,a):(oe.flags|=e,n.memoizedState=ga(1|t,i,l,a))}function vo(e,t){os(8390656,8,e,t)}function sr(e,t){ds(2048,8,e,t)}function jx(e){oe.flags|=4;var t=oe.updateQueue;if(t===null)t=rs(),oe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function ho(e){var t=He().memoizedState;return jx({ref:t,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function po(e,t){return ds(4,2,e,t)}function yo(e,t){return ds(4,4,e,t)}function go(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 bo(e,t,l){l=l!=null?l.concat([e]):null,ds(4,4,go.bind(null,t,e),l)}function ir(){}function jo(e,t){var l=He();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&$i(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function So(e,t){var l=He();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&$i(t,a[1]))return a[0];if(a=e(),Ql){tl(!0);try{e()}finally{tl(!1)}}return l.memoizedState=[a,t],a}function rr(e,t,l){return l===void 0||(Xt&1073741824)!==0&&(he&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Nd(),oe.lanes|=e,vl|=e,l)}function No(e,t,l,a){return mt(l,t)?l:ha.current!==null?(e=rr(e,l,a),mt(e,t)||(Ge=!0),e):(Xt&42)===0||(Xt&1073741824)!==0&&(he&261930)===0?(Ge=!0,e.memoizedState=l):(e=Nd(),oe.lanes|=e,vl|=e,t)}function Eo(e,t,l,a,n){var i=Q.p;Q.p=i!==0&&8>i?i:8;var r=k.T,d={};k.T=d,or(e,!1,t,l);try{var v=n(),A=k.S;if(A!==null&&A(d,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var D=hx(v,a);nn(e,t,D,gt(e))}else nn(e,t,a,gt(e))}catch(L){nn(e,t,{then:function(){},status:"rejected",reason:L},gt())}finally{Q.p=i,r!==null&&d.types!==null&&(r.types=d.types),k.T=r}}function Sx(){}function cr(e,t,l,a){if(e.tag!==5)throw Error(o(476));var n=To(e).queue;Eo(e,n,t,ae,l===null?Sx:function(){return Co(e),l(a)})}function To(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vt,lastRenderedState:ae},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vt,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Co(e){var t=To(e);t.next===null&&(t=e.alternate.memoizedState),nn(e,t.next.queue,{},gt())}function ur(){return We(Sn)}function Ao(){return He().memoizedState}function _o(){return He().memoizedState}function Nx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=gt();e=ul(l);var a=ol(t,e,l);a!==null&&(ut(a,t,l),Pa(a,t,l)),t={cache:Bi()},e.payload=t;return}t=t.return}}function Ex(e,t,l){var a=gt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fs(e)?zo(t,l):(l=Ai(e,t,l,a),l!==null&&(ut(l,e,a),ko(l,t,a)))}function Mo(e,t,l){var a=gt();nn(e,t,l,a)}function nn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(fs(e))zo(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var r=t.lastRenderedState,d=i(r,l);if(n.hasEagerState=!0,n.eagerState=d,mt(d,r))return Zn(e,t,n,0),ke===null&&Vn(),!1}catch{}finally{}if(l=Ai(e,t,n,a),l!==null)return ut(l,e,a),ko(l,t,a),!0}return!1}function or(e,t,l,a){if(a={lane:2,revertLane:Gr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},fs(e)){if(t)throw Error(o(479))}else t=Ai(e,l,a,2),t!==null&&ut(t,e,2)}function fs(e){var t=e.alternate;return e===oe||t!==null&&t===oe}function zo(e,t){pa=ss=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function ko(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,wc(e,l)}}var sn={readContext:We,use:cs,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useLayoutEffect:we,useInsertionEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useSyncExternalStore:we,useId:we,useHostTransitionStatus:we,useFormState:we,useActionState:we,useOptimistic:we,useMemoCache:we,useCacheRefresh:we};sn.useEffectEvent=we;var Ro={readContext:We,use:cs,useCallback:function(e,t){return tt().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:vo,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,os(4194308,4,go.bind(null,t,e),l)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var l=tt();t=t===void 0?null:t;var a=e();if(Ql){tl(!0);try{e()}finally{tl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=tt();if(l!==void 0){var n=l(t);if(Ql){tl(!0);try{l(t)}finally{tl(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Ex.bind(null,oe,e),[a.memoizedState,e]},useRef:function(e){var t=tt();return e={current:e},t.memoizedState=e},useState:function(e){e=ar(e);var t=e.queue,l=Mo.bind(null,oe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:ir,useDeferredValue:function(e,t){var l=tt();return rr(l,e,t)},useTransition:function(){var e=ar(!1);return e=Eo.bind(null,oe,e.queue,!0,!1),tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=oe,n=tt();if(ye){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),ke===null)throw Error(o(349));(he&127)!==0||Iu(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,vo(eo.bind(null,a,i,e),[e]),a.flags|=2048,ga(9,{destroy:void 0},Pu.bind(null,a,i,l,t),null),l},useId:function(){var e=tt(),t=ke.identifierPrefix;if(ye){var l=Dt,a=Ot;l=(a&~(1<<32-ft(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=is++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=px++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ur,useFormState:uo,useActionState:uo,useOptimistic:function(e){var t=tt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=or.bind(null,oe,!0,l),l.dispatch=t,[e,t]},useMemoCache:er,useCacheRefresh:function(){return tt().memoizedState=Nx.bind(null,oe)},useEffectEvent:function(e){var t=tt(),l={impl:e};return t.memoizedState=l,function(){if((Ne&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},dr={readContext:We,use:cs,useCallback:jo,useContext:We,useEffect:sr,useImperativeHandle:bo,useInsertionEffect:po,useLayoutEffect:yo,useMemo:So,useReducer:us,useRef:xo,useState:function(){return us(Vt)},useDebugValue:ir,useDeferredValue:function(e,t){var l=He();return No(l,_e.memoizedState,e,t)},useTransition:function(){var e=us(Vt)[0],t=He().memoizedState;return[typeof e=="boolean"?e:an(e),t]},useSyncExternalStore:Fu,useId:Ao,useHostTransitionStatus:ur,useFormState:oo,useActionState:oo,useOptimistic:function(e,t){var l=He();return ao(l,_e,e,t)},useMemoCache:er,useCacheRefresh:_o};dr.useEffectEvent=ho;var Oo={readContext:We,use:cs,useCallback:jo,useContext:We,useEffect:sr,useImperativeHandle:bo,useInsertionEffect:po,useLayoutEffect:yo,useMemo:So,useReducer:lr,useRef:xo,useState:function(){return lr(Vt)},useDebugValue:ir,useDeferredValue:function(e,t){var l=He();return _e===null?rr(l,e,t):No(l,_e.memoizedState,e,t)},useTransition:function(){var e=lr(Vt)[0],t=He().memoizedState;return[typeof e=="boolean"?e:an(e),t]},useSyncExternalStore:Fu,useId:Ao,useHostTransitionStatus:ur,useFormState:mo,useActionState:mo,useOptimistic:function(e,t){var l=He();return _e!==null?ao(l,_e,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:er,useCacheRefresh:_o};Oo.useEffectEvent=ho;function fr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:h({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var mr={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=gt(),n=ul(a);n.payload=t,l!=null&&(n.callback=l),t=ol(e,n,a),t!==null&&(ut(t,e,a),Pa(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=gt(),n=ul(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=ol(e,n,a),t!==null&&(ut(t,e,a),Pa(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=gt(),a=ul(l);a.tag=2,t!=null&&(a.callback=t),t=ol(e,a,l),t!==null&&(ut(t,e,l),Pa(t,e,l))}};function Do(e,t,l,a,n,i,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,r):t.prototype&&t.prototype.isPureReactComponent?!Va(l,a)||!Va(n,i):!0}function wo(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&&mr.enqueueReplaceState(t,t.state,null)}function Xl(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=h({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function Lo(e){Xn(e)}function Uo(e){console.error(e)}function Bo(e){Xn(e)}function ms(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Ho(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function xr(e,t,l){return l=ul(l),l.tag=3,l.payload={element:null},l.callback=function(){ms(e,t)},l}function qo(e){return e=ul(e),e.tag=3,e}function Yo(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){Ho(t,l,a)}}var r=l.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Ho(t,l,a),typeof n!="function"&&(hl===null?hl=new Set([this]):hl.add(this));var d=a.stack;this.componentDidCatch(a.value,{componentStack:d!==null?d:""})})}function Tx(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&da(t,l,n,!0),l=vt.current,l!==null){switch(l.tag){case 31:case 13:return At===null?Ts():l.alternate===null&&Le===0&&(Le=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===es?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Hr(e,a,n)),!1;case 22:return l.flags|=65536,a===es?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)),Hr(e,a,n)),!1}throw Error(o(435,l.tag))}return Hr(e,a,n),Ts(),!1}if(ye)return t=vt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Oi&&(e=Error(o(422),{cause:a}),Ja(Nt(e,l)))):(a!==Oi&&(t=Error(o(423),{cause:a}),Ja(Nt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Nt(a,l),n=xr(e.stateNode,a,n),Xi(e,n),Le!==4&&(Le=2)),!1;var i=Error(o(520),{cause:a});if(i=Nt(i,l),xn===null?xn=[i]:xn.push(i),Le!==4&&(Le=2),t===null)return!0;a=Nt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=xr(l.stateNode,a,e),Xi(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(hl===null||!hl.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=qo(n),Yo(n,e,l,a),Xi(l,n),!1}l=l.return}while(l!==null);return!1}var vr=Error(o(461)),Ge=!1;function Fe(e,t,l,a){t.child=e===null?Xu(t,null,l,a):Gl(t,e.child,l,a)}function Go(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var r={};for(var d in a)d!=="ref"&&(r[d]=a[d])}else r=a;return Bl(t),a=Wi(e,t,l,r,i,n),d=Fi(),e!==null&&!Ge?(Ii(e,t,n),Zt(e,t,n)):(ye&&d&&ki(t),t.flags|=1,Fe(e,t,a,n),t.child)}function Qo(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!_i(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Xo(e,t,i,a,n)):(e=Jn(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Nr(e,n)){var r=i.memoizedProps;if(l=l.compare,l=l!==null?l:Va,l(r,a)&&e.ref===t.ref)return Zt(e,t,n)}return t.flags|=1,e=qt(i,a),e.ref=t.ref,e.return=t,t.child=e}function Xo(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(Va(i,a)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=a=i,Nr(e,n))(e.flags&131072)!==0&&(Ge=!0);else return t.lanes=e.lanes,Zt(e,t,n)}return hr(e,t,l,a,n)}function Vo(e,t,l,a){var n=a.children,i=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(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,t.child=null;return Zo(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&In(t,i!==null?i.cachePool:null),i!==null?Ku(t,i):Zi(),Ju(t);else return a=t.lanes=536870912,Zo(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(In(t,i.cachePool),Ku(t,i),fl(),t.memoizedState=null):(e!==null&&In(t,null),Zi(),fl());return Fe(e,t,n,l),t.child}function rn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Zo(e,t,l,a,n){var i=qi();return i=i===null?null:{parent:qe._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&In(t,null),Zi(),Ju(t),e!==null&&da(e,t,a,!0),t.childLanes=n,null}function xs(e,t){return t=hs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ko(e,t,l){return Gl(t,e.child,null,l),e=xs(t,t.pendingProps),e.flags|=2,ht(t),t.memoizedState=null,e}function Cx(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ye){if(a.mode==="hidden")return e=xs(t,a),t.lanes=536870912,rn(null,e);if(Ji(t),(e=Re)?(e=sf(e,Ct),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:nl!==null?{id:Ot,overflow:Dt}:null,retryLane:536870912,hydrationErrors:null},l=Mu(e),l.return=t,t.child=l,$e=t,Re=null)):e=null,e===null)throw il(t);return t.lanes=536870912,null}return xs(t,a)}var i=e.memoizedState;if(i!==null){var r=i.dehydrated;if(Ji(t),n)if(t.flags&256)t.flags&=-257,t=Ko(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ge||da(e,t,l,!1),n=(l&e.childLanes)!==0,Ge||n){if(a=ke,a!==null&&(r=Lc(a,l),r!==0&&r!==i.retryLane))throw i.retryLane=r,Dl(e,r),ut(a,e,r),vr;Ts(),t=Ko(e,t,l)}else e=i.treeContext,Re=_t(r.nextSibling),$e=t,ye=!0,sl=null,Ct=!1,e!==null&&Ru(t,e),t=xs(t,a),t.flags|=4096;return t}return e=qt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vs(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(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function hr(e,t,l,a,n){return Bl(t),l=Wi(e,t,l,a,void 0,n),a=Fi(),e!==null&&!Ge?(Ii(e,t,n),Zt(e,t,n)):(ye&&a&&ki(t),t.flags|=1,Fe(e,t,l,n),t.child)}function Jo(e,t,l,a,n,i){return Bl(t),t.updateQueue=null,l=Wu(t,a,l,n),$u(e),a=Fi(),e!==null&&!Ge?(Ii(e,t,i),Zt(e,t,i)):(ye&&a&&ki(t),t.flags|=1,Fe(e,t,l,i),t.child)}function $o(e,t,l,a,n){if(Bl(t),t.stateNode===null){var i=ra,r=l.contextType;typeof r=="object"&&r!==null&&(i=We(r)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=mr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Gi(t),r=l.contextType,i.context=typeof r=="object"&&r!==null?We(r):ra,i.state=t.memoizedState,r=l.getDerivedStateFromProps,typeof r=="function"&&(fr(t,l,r,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(r=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),r!==i.state&&mr.enqueueReplaceState(i,i.state,null),tn(t,a,i,n),en(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var d=t.memoizedProps,v=Xl(l,d);i.props=v;var A=i.context,D=l.contextType;r=ra,typeof D=="object"&&D!==null&&(r=We(D));var L=l.getDerivedStateFromProps;D=typeof L=="function"||typeof i.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,D||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(d||A!==r)&&wo(t,i,a,r),cl=!1;var _=t.memoizedState;i.state=_,tn(t,a,i,n),en(),A=t.memoizedState,d||_!==A||cl?(typeof L=="function"&&(fr(t,l,L,a),A=t.memoizedState),(v=cl||Do(t,l,v,a,_,A,r))?(D||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=A),i.props=a,i.state=A,i.context=r,a=v):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Qi(e,t),r=t.memoizedProps,D=Xl(l,r),i.props=D,L=t.pendingProps,_=i.context,A=l.contextType,v=ra,typeof A=="object"&&A!==null&&(v=We(A)),d=l.getDerivedStateFromProps,(A=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(r!==L||_!==v)&&wo(t,i,a,v),cl=!1,_=t.memoizedState,i.state=_,tn(t,a,i,n),en();var M=t.memoizedState;r!==L||_!==M||cl||e!==null&&e.dependencies!==null&&Wn(e.dependencies)?(typeof d=="function"&&(fr(t,l,d,a),M=t.memoizedState),(D=cl||Do(t,l,D,a,_,M,v)||e!==null&&e.dependencies!==null&&Wn(e.dependencies))?(A||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,M,v),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,M,v)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=M),i.props=a,i.state=M,i.context=v,a=D):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,vs(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Gl(t,e.child,null,n),t.child=Gl(t,null,l,n)):Fe(e,t,l,n),t.memoizedState=i.state,e=t.child):e=Zt(e,t,n),e}function Wo(e,t,l,a){return Ll(),t.flags|=256,Fe(e,t,l,a),t.child}var pr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yr(e){return{baseLanes:e,cachePool:Bu()}}function gr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=yt),e}function Fo(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,r;if((r=i)||(r=e!==null&&e.memoizedState===null?!1:(Be.current&2)!==0),r&&(n=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(ye){if(n?dl(t):fl(),(e=Re)?(e=sf(e,Ct),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:nl!==null?{id:Ot,overflow:Dt}:null,retryLane:536870912,hydrationErrors:null},l=Mu(e),l.return=t,t.child=l,$e=t,Re=null)):e=null,e===null)throw il(t);return tc(e)?t.lanes=32:t.lanes=536870912,null}var d=a.children;return a=a.fallback,n?(fl(),n=t.mode,d=hs({mode:"hidden",children:d},n),a=wl(a,n,l,null),d.return=t,a.return=t,d.sibling=a,t.child=d,a=t.child,a.memoizedState=yr(l),a.childLanes=gr(e,r,l),t.memoizedState=pr,rn(null,a)):(dl(t),br(t,d))}var v=e.memoizedState;if(v!==null&&(d=v.dehydrated,d!==null)){if(i)t.flags&256?(dl(t),t.flags&=-257,t=jr(e,t,l)):t.memoizedState!==null?(fl(),t.child=e.child,t.flags|=128,t=null):(fl(),d=a.fallback,n=t.mode,a=hs({mode:"visible",children:a.children},n),d=wl(d,n,l,null),d.flags|=2,a.return=t,d.return=t,a.sibling=d,t.child=a,Gl(t,e.child,null,l),a=t.child,a.memoizedState=yr(l),a.childLanes=gr(e,r,l),t.memoizedState=pr,t=rn(null,a));else if(dl(t),tc(d)){if(r=d.nextSibling&&d.nextSibling.dataset,r)var A=r.dgst;r=A,a=Error(o(419)),a.stack="",a.digest=r,Ja({value:a,source:null,stack:null}),t=jr(e,t,l)}else if(Ge||da(e,t,l,!1),r=(l&e.childLanes)!==0,Ge||r){if(r=ke,r!==null&&(a=Lc(r,l),a!==0&&a!==v.retryLane))throw v.retryLane=a,Dl(e,a),ut(r,e,a),vr;ec(d)||Ts(),t=jr(e,t,l)}else ec(d)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,Re=_t(d.nextSibling),$e=t,ye=!0,sl=null,Ct=!1,e!==null&&Ru(t,e),t=br(t,a.children),t.flags|=4096);return t}return n?(fl(),d=a.fallback,n=t.mode,v=e.child,A=v.sibling,a=qt(v,{mode:"hidden",children:a.children}),a.subtreeFlags=v.subtreeFlags&65011712,A!==null?d=qt(A,d):(d=wl(d,n,l,null),d.flags|=2),d.return=t,a.return=t,a.sibling=d,t.child=a,rn(null,a),a=t.child,d=e.child.memoizedState,d===null?d=yr(l):(n=d.cachePool,n!==null?(v=qe._currentValue,n=n.parent!==v?{parent:v,pool:v}:n):n=Bu(),d={baseLanes:d.baseLanes|l,cachePool:n}),a.memoizedState=d,a.childLanes=gr(e,r,l),t.memoizedState=pr,rn(e.child,a)):(dl(t),l=e.child,e=l.sibling,l=qt(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=l,t.memoizedState=null,l)}function br(e,t){return t=hs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function hs(e,t){return e=xt(22,e,null,t),e.lanes=0,e}function jr(e,t,l){return Gl(t,e.child,null,l),e=br(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Io(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Li(e.return,t,l)}function Sr(e,t,l,a,n,i){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=a,r.tail=l,r.tailMode=n,r.treeForkCount=i)}function Po(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var r=Be.current,d=(r&2)!==0;if(d?(r=r&1|2,t.flags|=128):r&=1,X(Be,r),Fe(e,t,a,l),a=ye?Ka:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Io(e,l,t);else if(e.tag===19)Io(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(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&ns(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),Sr(t,!1,n,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&ns(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}Sr(t,!0,l,null,i,a);break;case"together":Sr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Zt(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),vl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(da(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=qt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=qt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Nr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Wn(e)))}function Ax(e,t,l){switch(t.tag){case 3:et(t,t.stateNode.containerInfo),rl(t,qe,e.memoizedState.cache),Ll();break;case 27:case 5:Ra(t);break;case 4:et(t,t.stateNode.containerInfo);break;case 10:rl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ji(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(dl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Fo(e,t,l):(dl(t),e=Zt(e,t,l),e!==null?e.sibling:null);dl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(da(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return Po(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),X(Be,Be.current),a)break;return null;case 22:return t.lanes=0,Vo(e,t,l,t.pendingProps);case 24:rl(t,qe,e.memoizedState.cache)}return Zt(e,t,l)}function ed(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ge=!0;else{if(!Nr(e,l)&&(t.flags&128)===0)return Ge=!1,Ax(e,t,l);Ge=(e.flags&131072)!==0}else Ge=!1,ye&&(t.flags&1048576)!==0&&ku(t,Ka,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ql(t.elementType),t.type=e,typeof e=="function")_i(e)?(a=Xl(e,a),t.tag=1,t=$o(null,t,e,a,l)):(t.tag=0,t=hr(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===G){t.tag=11,t=Go(null,t,e,a,l);break e}else if(n===I){t.tag=14,t=Qo(null,t,e,a,l);break e}}throw t=J(e)||e,Error(o(306,t,""))}}return t;case 0:return hr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=Xl(a,t.pendingProps),$o(e,t,a,n,l);case 3:e:{if(et(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,Qi(e,t),tn(t,a,null,l);var r=t.memoizedState;if(a=r.cache,rl(t,qe,a),a!==i.cache&&Ui(t,[qe],l,!0),en(),a=r.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Wo(e,t,a,l);break e}else if(a!==n){n=Nt(Error(o(424)),t),Ja(n),t=Wo(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(Re=_t(e.firstChild),$e=t,ye=!0,sl=null,Ct=!0,l=Xu(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ll(),a===n){t=Zt(e,t,l);break e}Fe(e,t,a,l)}t=t.child}return t;case 26:return vs(e,t),e===null?(l=ff(t.type,null,t.pendingProps,null))?t.memoizedState=l:ye||(l=t.type,e=t.pendingProps,a=Rs(me.current).createElement(l),a[Je]=t,a[at]=e,Ie(a,l,e),Ze(a),t.stateNode=a):t.memoizedState=ff(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ra(t),e===null&&ye&&(a=t.stateNode=uf(t.type,t.pendingProps,me.current),$e=t,Ct=!0,n=Re,bl(t.type)?(lc=n,Re=_t(a.firstChild)):Re=n),Fe(e,t,t.pendingProps.children,l),vs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ye&&((n=a=Re)&&(a=av(a,t.type,t.pendingProps,Ct),a!==null?(t.stateNode=a,$e=t,Re=_t(a.firstChild),Ct=!1,n=!0):n=!1),n||il(t)),Ra(t),n=t.type,i=t.pendingProps,r=e!==null?e.memoizedProps:null,a=i.children,Fr(n,i)?a=null:r!==null&&Fr(n,r)&&(t.flags|=32),t.memoizedState!==null&&(n=Wi(e,t,yx,null,null,l),Sn._currentValue=n),vs(e,t),Fe(e,t,a,l),t.child;case 6:return e===null&&ye&&((e=l=Re)&&(l=nv(l,t.pendingProps,Ct),l!==null?(t.stateNode=l,$e=t,Re=null,e=!0):e=!1),e||il(t)),null;case 13:return Fo(e,t,l);case 4:return et(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Gl(t,null,a,l):Fe(e,t,a,l),t.child;case 11:return Go(e,t,t.type,t.pendingProps,l);case 7:return Fe(e,t,t.pendingProps,l),t.child;case 8:return Fe(e,t,t.pendingProps.children,l),t.child;case 12:return Fe(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,rl(t,t.type,a.value),Fe(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,Bl(t),n=We(n),a=a(n),t.flags|=1,Fe(e,t,a,l),t.child;case 14:return Qo(e,t,t.type,t.pendingProps,l);case 15:return Xo(e,t,t.type,t.pendingProps,l);case 19:return Po(e,t,l);case 31:return Cx(e,t,l);case 22:return Vo(e,t,l,t.pendingProps);case 24:return Bl(t),a=We(qe),e===null?(n=qi(),n===null&&(n=ke,i=Bi(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},Gi(t),rl(t,qe,n)):((e.lanes&l)!==0&&(Qi(e,t),tn(t,null,null,l),en()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),rl(t,qe,a)):(a=i.cache,rl(t,qe,a),a!==n.cache&&Ui(t,[qe],l,!0))),Fe(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Kt(e){e.flags|=4}function Er(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Ad())e.flags|=8192;else throw Yl=es,Yi}else e.flags&=-16777217}function td(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!pf(t))if(Ad())e.flags|=8192;else throw Yl=es,Yi}function ps(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Oc():536870912,e.lanes|=t,Na|=t)}function cn(e,t){if(!ye)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 Oe(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function _x(e,t,l){var a=t.pendingProps;switch(Ri(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oe(t),null;case 1:return Oe(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Qt(qe),Ue(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(oa(t)?Kt(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Di())),Oe(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(Kt(t),i!==null?(Oe(t),td(t,i)):(Oe(t),Er(t,n,null,a,l))):i?i!==e.memoizedState?(Kt(t),Oe(t),td(t,i)):(Oe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Kt(t),Oe(t),Er(t,n,e,a,l)),null;case 27:if(_n(t),l=me.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Kt(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Oe(t),null}e=W.current,oa(t)?Ou(t):(e=uf(n,a,l),t.stateNode=e,Kt(t))}return Oe(t),null;case 5:if(_n(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Kt(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return Oe(t),null}if(i=W.current,oa(t))Ou(t);else{var r=Rs(me.current);switch(i){case 1:i=r.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=r.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=r.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?r.createElement("select",{is:a.is}):r.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?r.createElement(n,{is:a.is}):r.createElement(n)}}i[Je]=t,i[at]=a;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)i.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=i;e:switch(Ie(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Kt(t)}}return Oe(t),Er(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Kt(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=me.current,oa(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=$e,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Je]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Fd(e.nodeValue,l)),e||il(t,!0)}else e=Rs(e).createTextNode(a),e[Je]=t,t.stateNode=e}return Oe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=oa(t),l!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Je]=t}else Ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),e=!1}else l=Di(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(ht(t),t):(ht(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Oe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=oa(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(o(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));n[Je]=t}else Ll(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),n=!1}else n=Di(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(ht(t),t):(ht(t),null)}return ht(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),ps(t,t.updateQueue),Oe(t),null);case 4:return Ue(),e===null&&Zr(t.stateNode.containerInfo),Oe(t),null;case 10:return Qt(t.type),Oe(t),null;case 19:if(U(Be),a=t.memoizedState,a===null)return Oe(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)cn(a,!1);else{if(Le!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=ns(e),i!==null){for(t.flags|=128,cn(a,!1),e=i.updateQueue,t.updateQueue=e,ps(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)_u(l,e),l=l.sibling;return X(Be,Be.current&1|2),ye&&Yt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ot()>Ss&&(t.flags|=128,n=!0,cn(a,!1),t.lanes=4194304)}else{if(!n)if(e=ns(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,ps(t,e),cn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!ye)return Oe(t),null}else 2*ot()-a.renderingStartTime>Ss&&l!==536870912&&(t.flags|=128,n=!0,cn(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ot(),e.sibling=null,l=Be.current,X(Be,n?l&1|2:l&1),ye&&Yt(t,a.treeForkCount),e):(Oe(t),null);case 22:case 23:return ht(t),Ki(),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&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),l=t.updateQueue,l!==null&&ps(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&&U(Hl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Qt(qe),Oe(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Mx(e,t){switch(Ri(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qt(qe),Ue(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _n(t),null;case 31:if(t.memoizedState!==null){if(ht(t),t.alternate===null)throw Error(o(340));Ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ll()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(Be),null;case 4:return Ue(),null;case 10:return Qt(t.type),null;case 22:case 23:return ht(t),Ki(),e!==null&&U(Hl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qt(qe),null;case 25:return null;default:return null}}function ld(e,t){switch(Ri(t),t.tag){case 3:Qt(qe),Ue();break;case 26:case 27:case 5:_n(t);break;case 4:Ue();break;case 31:t.memoizedState!==null&&ht(t);break;case 13:ht(t);break;case 19:U(Be);break;case 10:Qt(t.type);break;case 22:case 23:ht(t),Ki(),e!==null&&U(Hl);break;case 24:Qt(qe)}}function un(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var i=l.create,r=l.inst;a=i(),r.destroy=a}l=l.next}while(l!==n)}}catch(d){Ae(t,t.return,d)}}function ml(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){var r=a.inst,d=r.destroy;if(d!==void 0){r.destroy=void 0,n=t;var v=l,A=d;try{A()}catch(D){Ae(n,v,D)}}}a=a.next}while(a!==i)}}catch(D){Ae(t,t.return,D)}}function ad(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Zu(t,l)}catch(a){Ae(e,e.return,a)}}}function nd(e,t,l){l.props=Xl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Ae(e,t,a)}}function on(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(n){Ae(e,t,n)}}function wt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Ae(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){Ae(e,t,n)}else l.current=null}function sd(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(n){Ae(e,e.return,n)}}function Tr(e,t,l){try{var a=e.stateNode;Fx(a,e.type,l,t),a[at]=t}catch(n){Ae(e,e.return,n)}}function id(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&bl(e.type)||e.tag===4}function Cr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||id(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&&bl(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 Ar(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=Bt));else if(a!==4&&(a===27&&bl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Ar(e,t,l),e=e.sibling;e!==null;)Ar(e,t,l),e=e.sibling}function ys(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&&bl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(ys(e,t,l),e=e.sibling;e!==null;)ys(e,t,l),e=e.sibling}function rd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ie(t,a,l),t[Je]=e,t[at]=l}catch(i){Ae(e,e.return,i)}}var Jt=!1,Qe=!1,_r=!1,cd=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function zx(e,t){if(e=e.containerInfo,$r=Hs,e=gu(e),ji(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 n=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var r=0,d=-1,v=-1,A=0,D=0,L=e,_=null;t:for(;;){for(var M;L!==l||n!==0&&L.nodeType!==3||(d=r+n),L!==i||a!==0&&L.nodeType!==3||(v=r+a),L.nodeType===3&&(r+=L.nodeValue.length),(M=L.firstChild)!==null;)_=L,L=M;for(;;){if(L===e)break t;if(_===l&&++A===n&&(d=r),_===i&&++D===a&&(v=r),(M=L.nextSibling)!==null)break;L=_,_=L.parentNode}L=M}l=d===-1||v===-1?null:{start:d,end:v}}else l=null}l=l||{start:0,end:0}}else l=null;for(Wr={focusedElem:e,selectionRange:l},Hs=!1,Ke=t;Ke!==null;)if(t=Ke,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ke=e;else for(;Ke!==null;){switch(t=Ke,i=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++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var $=Xl(l.type,n);e=a.getSnapshotBeforeUpdate($,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(se){Ae(l,l.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Pr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pr(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Ke=e;break}Ke=t.return}}function ud(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Wt(e,l),a&4&&un(5,l);break;case 1:if(Wt(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(r){Ae(l,l.return,r)}else{var n=Xl(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){Ae(l,l.return,r)}}a&64&&ad(l),a&512&&on(l,l.return);break;case 3:if(Wt(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{Zu(e,t)}catch(r){Ae(l,l.return,r)}}break;case 27:t===null&&a&4&&rd(l);case 26:case 5:Wt(e,l),t===null&&a&4&&sd(l),a&512&&on(l,l.return);break;case 12:Wt(e,l);break;case 31:Wt(e,l),a&4&&fd(e,l);break;case 13:Wt(e,l),a&4&&md(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Hx.bind(null,l),sv(e,l))));break;case 22:if(a=l.memoizedState!==null||Jt,!a){t=t!==null&&t.memoizedState!==null||Qe,n=Jt;var i=Qe;Jt=a,(Qe=t)&&!i?Ft(e,l,(l.subtreeFlags&8772)!==0):Wt(e,l),Jt=n,Qe=i}break;case 30:break;default:Wt(e,l)}}function od(e){var t=e.alternate;t!==null&&(e.alternate=null,od(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ni(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 De=null,st=!1;function $t(e,t,l){for(l=l.child;l!==null;)dd(e,t,l),l=l.sibling}function dd(e,t,l){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Oa,l)}catch{}switch(l.tag){case 26:Qe||wt(l,t),$t(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Qe||wt(l,t);var a=De,n=st;bl(l.type)&&(De=l.stateNode,st=!1),$t(e,t,l),gn(l.stateNode),De=a,st=n;break;case 5:Qe||wt(l,t);case 6:if(a=De,n=st,De=null,$t(e,t,l),De=a,st=n,De!==null)if(st)try{(De.nodeType===9?De.body:De.nodeName==="HTML"?De.ownerDocument.body:De).removeChild(l.stateNode)}catch(i){Ae(l,t,i)}else try{De.removeChild(l.stateNode)}catch(i){Ae(l,t,i)}break;case 18:De!==null&&(st?(e=De,af(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ka(e)):af(De,l.stateNode));break;case 4:a=De,n=st,De=l.stateNode.containerInfo,st=!0,$t(e,t,l),De=a,st=n;break;case 0:case 11:case 14:case 15:ml(2,l,t),Qe||ml(4,l,t),$t(e,t,l);break;case 1:Qe||(wt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&nd(l,t,a)),$t(e,t,l);break;case 21:$t(e,t,l);break;case 22:Qe=(a=Qe)||l.memoizedState!==null,$t(e,t,l),Qe=a;break;default:$t(e,t,l)}}function fd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ka(e)}catch(l){Ae(t,t.return,l)}}}function md(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ka(e)}catch(l){Ae(t,t.return,l)}}function kx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cd),t;default:throw Error(o(435,e.tag))}}function gs(e,t){var l=kx(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=qx.bind(null,e,a);a.then(n,n)}})}function it(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,r=t,d=r;e:for(;d!==null;){switch(d.tag){case 27:if(bl(d.type)){De=d.stateNode,st=!1;break e}break;case 5:De=d.stateNode,st=!1;break e;case 3:case 4:De=d.stateNode.containerInfo,st=!0;break e}d=d.return}if(De===null)throw Error(o(160));dd(i,r,n),De=null,st=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xd(t,e),t=t.sibling}var kt=null;function xd(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:it(t,e),rt(e),a&4&&(ml(3,e,e.return),un(3,e),ml(5,e,e.return));break;case 1:it(t,e),rt(e),a&512&&(Qe||l===null||wt(l,l.return)),a&64&&Jt&&(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 n=kt;if(it(t,e),rt(e),a&512&&(Qe||l===null||wt(l,l.return)),a&4){var i=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,n=n.ownerDocument||n;t:switch(a){case"title":i=n.getElementsByTagName("title")[0],(!i||i[La]||i[Je]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),Ie(i,a,l),i[Je]=e,Ze(i),a=i;break e;case"link":var r=vf("link","href",n).get(a+(l.href||""));if(r){for(var d=0;d<r.length;d++)if(i=r[d],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){r.splice(d,1);break t}}i=n.createElement(a),Ie(i,a,l),n.head.appendChild(i);break;case"meta":if(r=vf("meta","content",n).get(a+(l.content||""))){for(d=0;d<r.length;d++)if(i=r[d],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){r.splice(d,1);break t}}i=n.createElement(a),Ie(i,a,l),n.head.appendChild(i);break;default:throw Error(o(468,a))}i[Je]=e,Ze(i),a=i}e.stateNode=a}else hf(n,e.type,e.stateNode);else e.stateNode=xf(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?hf(n,e.type,e.stateNode):xf(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Tr(e,e.memoizedProps,l.memoizedProps)}break;case 27:it(t,e),rt(e),a&512&&(Qe||l===null||wt(l,l.return)),l!==null&&a&4&&Tr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(it(t,e),rt(e),a&512&&(Qe||l===null||wt(l,l.return)),e.flags&32){n=e.stateNode;try{ea(n,"")}catch($){Ae(e,e.return,$)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Tr(e,n,l!==null?l.memoizedProps:n)),a&1024&&(_r=!0);break;case 6:if(it(t,e),rt(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch($){Ae(e,e.return,$)}}break;case 3:if(ws=null,n=kt,kt=Os(t.containerInfo),it(t,e),kt=n,rt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{ka(t.containerInfo)}catch($){Ae(e,e.return,$)}_r&&(_r=!1,vd(e));break;case 4:a=kt,kt=Os(e.stateNode.containerInfo),it(t,e),rt(e),kt=a;break;case 12:it(t,e),rt(e);break;case 31:it(t,e),rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 13:it(t,e),rt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(js=ot()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 22:n=e.memoizedState!==null;var v=l!==null&&l.memoizedState!==null,A=Jt,D=Qe;if(Jt=A||n,Qe=D||v,it(t,e),Qe=D,Jt=A,rt(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||v||Jt||Qe||Vl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){v=l=t;try{if(i=v.stateNode,n)r=i.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{d=v.stateNode;var L=v.memoizedProps.style,_=L!=null&&L.hasOwnProperty("display")?L.display:null;d.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch($){Ae(v,v.return,$)}}}else if(t.tag===6){if(l===null){v=t;try{v.stateNode.nodeValue=n?"":v.memoizedProps}catch($){Ae(v,v.return,$)}}}else if(t.tag===18){if(l===null){v=t;try{var M=v.stateNode;n?nf(M,!0):nf(v.stateNode,!1)}catch($){Ae(v,v.return,$)}}}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,gs(e,l))));break;case 19:it(t,e),rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,gs(e,a)));break;case 30:break;case 21:break;default:it(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(id(a)){l=a;break}a=a.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var n=l.stateNode,i=Cr(e);ys(e,i,n);break;case 5:var r=l.stateNode;l.flags&32&&(ea(r,""),l.flags&=-33);var d=Cr(e);ys(e,d,r);break;case 3:case 4:var v=l.stateNode.containerInfo,A=Cr(e);Ar(e,A,v);break;default:throw Error(o(161))}}catch(D){Ae(e,e.return,D)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;vd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Wt(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ud(e,t.alternate,t),t=t.sibling}function Vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ml(4,t,t.return),Vl(t);break;case 1:wt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&nd(t,t.return,l),Vl(t);break;case 27:gn(t.stateNode);case 26:case 5:wt(t,t.return),Vl(t);break;case 22:t.memoizedState===null&&Vl(t);break;case 30:Vl(t);break;default:Vl(t)}e=e.sibling}}function Ft(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,r=i.flags;switch(i.tag){case 0:case 11:case 15:Ft(n,i,l),un(4,i);break;case 1:if(Ft(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(A){Ae(a,a.return,A)}if(a=i,n=a.updateQueue,n!==null){var d=a.stateNode;try{var v=n.shared.hiddenCallbacks;if(v!==null)for(n.shared.hiddenCallbacks=null,n=0;n<v.length;n++)Vu(v[n],d)}catch(A){Ae(a,a.return,A)}}l&&r&64&&ad(i),on(i,i.return);break;case 27:rd(i);case 26:case 5:Ft(n,i,l),l&&a===null&&r&4&&sd(i),on(i,i.return);break;case 12:Ft(n,i,l);break;case 31:Ft(n,i,l),l&&r&4&&fd(n,i);break;case 13:Ft(n,i,l),l&&r&4&&md(n,i);break;case 22:i.memoizedState===null&&Ft(n,i,l),on(i,i.return);break;case 30:break;default:Ft(n,i,l)}t=t.sibling}}function Mr(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&&$a(l))}function zr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$a(e))}function Rt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hd(e,t,l,a),t=t.sibling}function hd(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Rt(e,t,l,a),n&2048&&un(9,t);break;case 1:Rt(e,t,l,a);break;case 3:Rt(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$a(e)));break;case 12:if(n&2048){Rt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,r=i.id,d=i.onPostCommit;typeof d=="function"&&d(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){Ae(t,t.return,v)}}else Rt(e,t,l,a);break;case 31:Rt(e,t,l,a);break;case 13:Rt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,r=t.alternate,t.memoizedState!==null?i._visibility&2?Rt(e,t,l,a):dn(e,t):i._visibility&2?Rt(e,t,l,a):(i._visibility|=2,ba(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Mr(r,t);break;case 24:Rt(e,t,l,a),n&2048&&zr(t.alternate,t);break;default:Rt(e,t,l,a)}}function ba(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,r=t,d=l,v=a,A=r.flags;switch(r.tag){case 0:case 11:case 15:ba(i,r,d,v,n),un(8,r);break;case 23:break;case 22:var D=r.stateNode;r.memoizedState!==null?D._visibility&2?ba(i,r,d,v,n):dn(i,r):(D._visibility|=2,ba(i,r,d,v,n)),n&&A&2048&&Mr(r.alternate,r);break;case 24:ba(i,r,d,v,n),n&&A&2048&&zr(r.alternate,r);break;default:ba(i,r,d,v,n)}t=t.sibling}}function dn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:dn(l,a),n&2048&&Mr(a.alternate,a);break;case 24:dn(l,a),n&2048&&zr(a.alternate,a);break;default:dn(l,a)}t=t.sibling}}var fn=8192;function ja(e,t,l){if(e.subtreeFlags&fn)for(e=e.child;e!==null;)pd(e,t,l),e=e.sibling}function pd(e,t,l){switch(e.tag){case 26:ja(e,t,l),e.flags&fn&&e.memoizedState!==null&&pv(l,kt,e.memoizedState,e.memoizedProps);break;case 5:ja(e,t,l);break;case 3:case 4:var a=kt;kt=Os(e.stateNode.containerInfo),ja(e,t,l),kt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=fn,fn=16777216,ja(e,t,l),fn=a):ja(e,t,l));break;default:ja(e,t,l)}}function yd(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 mn(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];Ke=a,bd(a,e)}yd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gd(e),e=e.sibling}function gd(e){switch(e.tag){case 0:case 11:case 15:mn(e),e.flags&2048&&ml(9,e,e.return);break;case 3:mn(e);break;case 12:mn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,bs(e)):mn(e);break;default:mn(e)}}function bs(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];Ke=a,bd(a,e)}yd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ml(8,t,t.return),bs(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,bs(t));break;default:bs(t)}e=e.sibling}}function bd(e,t){for(;Ke!==null;){var l=Ke;switch(l.tag){case 0:case 11:case 15:ml(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:$a(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Ke=a;else e:for(l=e;Ke!==null;){a=Ke;var n=a.sibling,i=a.return;if(od(a),a===l){Ke=null;break e}if(n!==null){n.return=i,Ke=n;break e}Ke=i}}}var Rx={getCacheForType:function(e){var t=We(qe),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return We(qe).controller.signal}},Ox=typeof WeakMap=="function"?WeakMap:Map,Ne=0,ke=null,xe=null,he=0,Ce=0,pt=null,xl=!1,Sa=!1,kr=!1,It=0,Le=0,vl=0,Zl=0,Rr=0,yt=0,Na=0,xn=null,ct=null,Or=!1,js=0,jd=0,Ss=1/0,Ns=null,hl=null,Ve=0,pl=null,Ea=null,Pt=0,Dr=0,wr=null,Sd=null,vn=0,Lr=null;function gt(){return(Ne&2)!==0&&he!==0?he&-he:k.T!==null?Gr():Uc()}function Nd(){if(yt===0)if((he&536870912)===0||ye){var e=kn;kn<<=1,(kn&3932160)===0&&(kn=262144),yt=e}else yt=536870912;return e=vt.current,e!==null&&(e.flags|=32),yt}function ut(e,t,l){(e===ke&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Ta(e,0),yl(e,he,yt,!1)),wa(e,l),((Ne&2)===0||e!==ke)&&(e===ke&&((Ne&2)===0&&(Zl|=l),Le===4&&yl(e,he,yt,!1)),Lt(e))}function Ed(e,t,l){if((Ne&6)!==0)throw Error(o(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Da(e,t),n=a?Lx(e,t):Br(e,t,!0),i=a;do{if(n===0){Sa&&!a&&yl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Dx(l)){n=Br(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var d=e;n=xn;var v=d.current.memoizedState.isDehydrated;if(v&&(Ta(d,r).flags|=256),r=Br(d,r,!1),r!==2){if(kr&&!v){d.errorRecoveryDisabledLanes|=i,Zl|=i,n=4;break e}i=ct,ct=n,i!==null&&(ct===null?ct=i:ct.push.apply(ct,i))}n=r}if(i=!1,n!==2)continue}}if(n===1){Ta(e,0),yl(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:yl(a,t,yt,!xl);break e;case 2:ct=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(n=js+300-ot(),10<n)){if(yl(a,t,yt,!xl),On(a,0,!0)!==0)break e;Pt=t,a.timeoutHandle=tf(Td.bind(null,a,l,ct,Ns,Or,t,yt,Zl,Na,xl,i,"Throttled",-0,0),n);break e}Td(a,l,ct,Ns,Or,t,yt,Zl,Na,xl,i,null,-0,0)}}break}while(!0);Lt(e)}function Td(e,t,l,a,n,i,r,d,v,A,D,L,_,M){if(e.timeoutHandle=-1,L=t.subtreeFlags,L&8192||(L&16785408)===16785408){L={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Bt},pd(t,i,L);var $=(i&62914560)===i?js-ot():(i&4194048)===i?jd-ot():0;if($=yv(L,$),$!==null){Pt=i,e.cancelPendingCommit=$(Od.bind(null,e,t,i,l,a,n,r,d,v,D,L,null,_,M)),yl(e,i,r,!A);return}}Od(e,t,i,l,a,n,r,d,v)}function Dx(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 n=l[a],i=n.getSnapshot;n=n.value;try{if(!mt(i(),n))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 yl(e,t,l,a){t&=~Rr,t&=~Zl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-ft(n),r=1<<i;a[i]=-1,n&=~r}l!==0&&Dc(e,l,t)}function Es(){return(Ne&6)===0?(hn(0),!1):!0}function Ur(){if(xe!==null){if(Ce===0)var e=xe.return;else e=xe,Gt=Ul=null,Pi(e),va=null,Fa=0,e=xe;for(;e!==null;)ld(e.alternate,e),e=e.return;xe=null}}function Ta(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,ev(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Pt=0,Ur(),ke=e,xe=l=qt(e.current,null),he=t,Ce=0,pt=null,xl=!1,Sa=Da(e,t),kr=!1,Na=yt=Rr=Zl=vl=Le=0,ct=xn=null,Or=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-ft(a),i=1<<n;t|=e[n],a&=~i}return It=t,Vn(),l}function Cd(e,t){oe=null,k.H=sn,t===xa||t===Pn?(t=Yu(),Ce=3):t===Yi?(t=Yu(),Ce=4):Ce=t===vr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pt=t,xe===null&&(Le=1,ms(e,Nt(t,e.current)))}function Ad(){var e=vt.current;return e===null?!0:(he&4194048)===he?At===null:(he&62914560)===he||(he&536870912)!==0?e===At:!1}function _d(){var e=k.H;return k.H=sn,e===null?sn:e}function Md(){var e=k.A;return k.A=Rx,e}function Ts(){Le=4,xl||(he&4194048)!==he&&vt.current!==null||(Sa=!0),(vl&134217727)===0&&(Zl&134217727)===0||ke===null||yl(ke,he,yt,!1)}function Br(e,t,l){var a=Ne;Ne|=2;var n=_d(),i=Md();(ke!==e||he!==t)&&(Ns=null,Ta(e,t)),t=!1;var r=Le;e:do try{if(Ce!==0&&xe!==null){var d=xe,v=pt;switch(Ce){case 8:Ur(),r=6;break e;case 3:case 2:case 9:case 6:vt.current===null&&(t=!0);var A=Ce;if(Ce=0,pt=null,Ca(e,d,v,A),l&&Sa){r=0;break e}break;default:A=Ce,Ce=0,pt=null,Ca(e,d,v,A)}}wx(),r=Le;break}catch(D){Cd(e,D)}while(!0);return t&&e.shellSuspendCounter++,Gt=Ul=null,Ne=a,k.H=n,k.A=i,xe===null&&(ke=null,he=0,Vn()),r}function wx(){for(;xe!==null;)zd(xe)}function Lx(e,t){var l=Ne;Ne|=2;var a=_d(),n=Md();ke!==e||he!==t?(Ns=null,Ss=ot()+500,Ta(e,t)):Sa=Da(e,t);e:do try{if(Ce!==0&&xe!==null){t=xe;var i=pt;t:switch(Ce){case 1:Ce=0,pt=null,Ca(e,t,i,1);break;case 2:case 9:if(Hu(i)){Ce=0,pt=null,kd(t);break}t=function(){Ce!==2&&Ce!==9||ke!==e||(Ce=7),Lt(e)},i.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:Hu(i)?(Ce=0,pt=null,kd(t)):(Ce=0,pt=null,Ca(e,t,i,7));break;case 5:var r=null;switch(xe.tag){case 26:r=xe.memoizedState;case 5:case 27:var d=xe;if(r?pf(r):d.stateNode.complete){Ce=0,pt=null;var v=d.sibling;if(v!==null)xe=v;else{var A=d.return;A!==null?(xe=A,Cs(A)):xe=null}break t}}Ce=0,pt=null,Ca(e,t,i,5);break;case 6:Ce=0,pt=null,Ca(e,t,i,6);break;case 8:Ur(),Le=6;break e;default:throw Error(o(462))}}Ux();break}catch(D){Cd(e,D)}while(!0);return Gt=Ul=null,k.H=a,k.A=n,Ne=l,xe!==null?0:(ke=null,he=0,Vn(),Le)}function Ux(){for(;xe!==null&&!im();)zd(xe)}function zd(e){var t=ed(e.alternate,e,It);e.memoizedProps=e.pendingProps,t===null?Cs(e):xe=t}function kd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Jo(l,t,t.pendingProps,t.type,void 0,he);break;case 11:t=Jo(l,t,t.pendingProps,t.type.render,t.ref,he);break;case 5:Pi(t);default:ld(l,t),t=xe=_u(t,It),t=ed(l,t,It)}e.memoizedProps=e.pendingProps,t===null?Cs(e):xe=t}function Ca(e,t,l,a){Gt=Ul=null,Pi(t),va=null,Fa=0;var n=t.return;try{if(Tx(e,n,t,l,he)){Le=1,ms(e,Nt(l,e.current)),xe=null;return}}catch(i){if(n!==null)throw xe=n,i;Le=1,ms(e,Nt(l,e.current)),xe=null;return}t.flags&32768?(ye||a===1?e=!0:Sa||(he&536870912)!==0?e=!1:(xl=e=!0,(a===2||a===9||a===3||a===6)&&(a=vt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Rd(t,e)):Cs(t)}function Cs(e){var t=e;do{if((t.flags&32768)!==0){Rd(t,xl);return}e=t.return;var l=_x(t.alternate,t,It);if(l!==null){xe=l;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);Le===0&&(Le=5)}function Rd(e,t){do{var l=Mx(e.alternate,e);if(l!==null){l.flags&=32767,xe=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){xe=e;return}xe=e=l}while(e!==null);Le=6,xe=null}function Od(e,t,l,a,n,i,r,d,v){e.cancelPendingCommit=null;do As();while(Ve!==0);if((Ne&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(i=t.lanes|t.childLanes,i|=Ci,hm(e,l,i,r,d,v),e===ke&&(xe=ke=null,he=0),Ea=t,pl=e,Pt=l,Dr=i,wr=n,Sd=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Yx(Mn,function(){return Bd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null,n=Q.p,Q.p=2,r=Ne,Ne|=4;try{zx(e,t,l)}finally{Ne=r,Q.p=n,k.T=a}}Ve=1,Dd(),wd(),Ld()}}function Dd(){if(Ve===1){Ve=0;var e=pl,t=Ea,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var a=Q.p;Q.p=2;var n=Ne;Ne|=4;try{xd(t,e);var i=Wr,r=gu(e.containerInfo),d=i.focusedElem,v=i.selectionRange;if(r!==d&&d&&d.ownerDocument&&yu(d.ownerDocument.documentElement,d)){if(v!==null&&ji(d)){var A=v.start,D=v.end;if(D===void 0&&(D=A),"selectionStart"in d)d.selectionStart=A,d.selectionEnd=Math.min(D,d.value.length);else{var L=d.ownerDocument||document,_=L&&L.defaultView||window;if(_.getSelection){var M=_.getSelection(),$=d.textContent.length,se=Math.min(v.start,$),ze=v.end===void 0?se:Math.min(v.end,$);!M.extend&&se>ze&&(r=ze,ze=se,se=r);var S=pu(d,se),p=pu(d,ze);if(S&&p&&(M.rangeCount!==1||M.anchorNode!==S.node||M.anchorOffset!==S.offset||M.focusNode!==p.node||M.focusOffset!==p.offset)){var C=L.createRange();C.setStart(S.node,S.offset),M.removeAllRanges(),se>ze?(M.addRange(C),M.extend(p.node,p.offset)):(C.setEnd(p.node,p.offset),M.addRange(C))}}}}for(L=[],M=d;M=M.parentNode;)M.nodeType===1&&L.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<L.length;d++){var w=L[d];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}Hs=!!$r,Wr=$r=null}finally{Ne=n,Q.p=a,k.T=l}}e.current=t,Ve=2}}function wd(){if(Ve===2){Ve=0;var e=pl,t=Ea,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var a=Q.p;Q.p=2;var n=Ne;Ne|=4;try{ud(e,t.alternate,t)}finally{Ne=n,Q.p=a,k.T=l}}Ve=3}}function Ld(){if(Ve===4||Ve===3){Ve=0,rm();var e=pl,t=Ea,l=Pt,a=Sd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ve=5:(Ve=0,Ea=pl=null,Ud(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(hl=null),li(l),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Oa,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=k.T,n=Q.p,Q.p=2,k.T=null;try{for(var i=e.onRecoverableError,r=0;r<a.length;r++){var d=a[r];i(d.value,{componentStack:d.stack})}}finally{k.T=t,Q.p=n}}(Pt&3)!==0&&As(),Lt(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===Lr?vn++:(vn=0,Lr=e):vn=0,hn(0)}}function Ud(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$a(t)))}function As(){return Dd(),wd(),Ld(),Bd()}function Bd(){if(Ve!==5)return!1;var e=pl,t=Dr;Dr=0;var l=li(Pt),a=k.T,n=Q.p;try{Q.p=32>l?32:l,k.T=null,l=wr,wr=null;var i=pl,r=Pt;if(Ve=0,Ea=pl=null,Pt=0,(Ne&6)!==0)throw Error(o(331));var d=Ne;if(Ne|=4,gd(i.current),hd(i,i.current,r,l),Ne=d,hn(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Oa,i)}catch{}return!0}finally{Q.p=n,k.T=a,Ud(e,t)}}function Hd(e,t,l){t=Nt(l,t),t=xr(e.stateNode,t,2),e=ol(e,t,2),e!==null&&(wa(e,2),Lt(e))}function Ae(e,t,l){if(e.tag===3)Hd(e,e,l);else for(;t!==null;){if(t.tag===3){Hd(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(hl===null||!hl.has(a))){e=Nt(l,e),l=qo(2),a=ol(t,l,2),a!==null&&(Yo(l,a,t,e),wa(a,2),Lt(a));break}}t=t.return}}function Hr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Ox;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(kr=!0,n.add(l),e=Bx.bind(null,e,t,l),t.then(e,e))}function Bx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,ke===e&&(he&l)===l&&(Le===4||Le===3&&(he&62914560)===he&&300>ot()-js?(Ne&2)===0&&Ta(e,0):Rr|=l,Na===he&&(Na=0)),Lt(e)}function qd(e,t){t===0&&(t=Oc()),e=Dl(e,t),e!==null&&(wa(e,t),Lt(e))}function Hx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),qd(e,l)}function qx(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),qd(e,l)}function Yx(e,t){return Is(e,t)}var _s=null,Aa=null,qr=!1,Ms=!1,Yr=!1,gl=0;function Lt(e){e!==Aa&&e.next===null&&(Aa===null?_s=Aa=e:Aa=Aa.next=e),Ms=!0,qr||(qr=!0,Qx())}function hn(e,t){if(!Yr&&Ms){Yr=!0;do for(var l=!1,a=_s;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var r=a.suspendedLanes,d=a.pingedLanes;i=(1<<31-ft(42|e)+1)-1,i&=n&~(r&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Xd(a,i))}else i=he,i=On(a,a===ke?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Da(a,i)||(l=!0,Xd(a,i));a=a.next}while(l);Yr=!1}}function Gx(){Yd()}function Yd(){Ms=qr=!1;var e=0;gl!==0&&Px()&&(e=gl);for(var t=ot(),l=null,a=_s;a!==null;){var n=a.next,i=Gd(a,t);i===0?(a.next=null,l===null?_s=n:l.next=n,n===null&&(Aa=l)):(l=a,(e!==0||(i&3)!==0)&&(Ms=!0)),a=n}Ve!==0&&Ve!==5||hn(e),gl!==0&&(gl=0)}function Gd(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var r=31-ft(i),d=1<<r,v=n[r];v===-1?((d&l)===0||(d&a)!==0)&&(n[r]=vm(d,t)):v<=t&&(e.expiredLanes|=d),i&=~d}if(t=ke,l=he,l=On(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ps(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Da(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ps(a),li(l)){case 2:case 8:l=kc;break;case 32:l=Mn;break;case 268435456:l=Rc;break;default:l=Mn}return a=Qd.bind(null,e),l=Is(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Ps(a),e.callbackPriority=2,e.callbackNode=null,2}function Qd(e,t){if(Ve!==0&&Ve!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(As()&&e.callbackNode!==l)return null;var a=he;return a=On(e,e===ke?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Ed(e,a,t),Gd(e,ot()),e.callbackNode!=null&&e.callbackNode===l?Qd.bind(null,e):null)}function Xd(e,t){if(As())return null;Ed(e,t,!0)}function Qx(){tv(function(){(Ne&6)!==0?Is(zc,Gx):Yd()})}function Gr(){if(gl===0){var e=fa;e===0&&(e=zn,zn<<=1,(zn&261888)===0&&(zn=256)),gl=e}return gl}function Vd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Un(""+e)}function Zd(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 Xx(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=Vd((n[at]||null).action),r=a.submitter;r&&(t=(t=r[at]||null)?Vd(t.formAction):r.getAttribute("formAction"),t!==null&&(i=t,r=null));var d=new Yn("action","action",null,a,n);e.push({event:d,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(gl!==0){var v=r?Zd(n,r):new FormData(n);cr(l,{pending:!0,data:v,method:n.method,action:i},null,v)}}else typeof i=="function"&&(d.preventDefault(),v=r?Zd(n,r):new FormData(n),cr(l,{pending:!0,data:v,method:n.method,action:i},i,v))},currentTarget:n}]})}}for(var Qr=0;Qr<Ti.length;Qr++){var Xr=Ti[Qr],Vx=Xr.toLowerCase(),Zx=Xr[0].toUpperCase()+Xr.slice(1);zt(Vx,"on"+Zx)}zt(Su,"onAnimationEnd"),zt(Nu,"onAnimationIteration"),zt(Eu,"onAnimationStart"),zt("dblclick","onDoubleClick"),zt("focusin","onFocus"),zt("focusout","onBlur"),zt(cx,"onTransitionRun"),zt(ux,"onTransitionStart"),zt(ox,"onTransitionCancel"),zt(Tu,"onTransitionEnd"),Il("onMouseEnter",["mouseout","mouseover"]),Il("onMouseLeave",["mouseout","mouseover"]),Il("onPointerEnter",["pointerout","pointerover"]),Il("onPointerLeave",["pointerout","pointerover"]),zl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zl("onBeforeInput",["compositionend","keypress","textInput","paste"]),zl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pn="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(" "),Kx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pn));function Kd(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var r=a.length-1;0<=r;r--){var d=a[r],v=d.instance,A=d.currentTarget;if(d=d.listener,v!==i&&n.isPropagationStopped())break e;i=d,n.currentTarget=A;try{i(n)}catch(D){Xn(D)}n.currentTarget=null,i=v}else for(r=0;r<a.length;r++){if(d=a[r],v=d.instance,A=d.currentTarget,d=d.listener,v!==i&&n.isPropagationStopped())break e;i=d,n.currentTarget=A;try{i(n)}catch(D){Xn(D)}n.currentTarget=null,i=v}}}}function ve(e,t){var l=t[ai];l===void 0&&(l=t[ai]=new Set);var a=e+"__bubble";l.has(a)||(Jd(t,e,2,!1),l.add(a))}function Vr(e,t,l){var a=0;t&&(a|=4),Jd(l,e,a,t)}var zs="_reactListening"+Math.random().toString(36).slice(2);function Zr(e){if(!e[zs]){e[zs]=!0,qc.forEach(function(l){l!=="selectionchange"&&(Kx.has(l)||Vr(l,!1,e),Vr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[zs]||(t[zs]=!0,Vr("selectionchange",!1,t))}}function Jd(e,t,l,a){switch(Ef(t)){case 2:var n=jv;break;case 8:n=Sv;break;default:n=rc}l=n.bind(null,t,l,e),n=void 0,!fi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function Kr(e,t,l,a,n){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var r=a.tag;if(r===3||r===4){var d=a.stateNode.containerInfo;if(d===n)break;if(r===4)for(r=a.return;r!==null;){var v=r.tag;if((v===3||v===4)&&r.stateNode.containerInfo===n)return;r=r.return}for(;d!==null;){if(r=$l(d),r===null)return;if(v=r.tag,v===5||v===6||v===26||v===27){a=i=r;continue e}d=d.parentNode}}a=a.return}Ic(function(){var A=i,D=oi(l),L=[];e:{var _=Cu.get(e);if(_!==void 0){var M=Yn,$=e;switch(e){case"keypress":if(Hn(l)===0)break e;case"keydown":case"keyup":M=qm;break;case"focusin":$="focus",M=hi;break;case"focusout":$="blur",M=hi;break;case"beforeblur":case"afterblur":M=hi;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":M=tu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=_m;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=Qm;break;case Su:case Nu:case Eu:M=km;break;case Tu:M=Vm;break;case"scroll":case"scrollend":M=Cm;break;case"wheel":M=Km;break;case"copy":case"cut":case"paste":M=Om;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=au;break;case"toggle":case"beforetoggle":M=$m}var se=(t&4)!==0,ze=!se&&(e==="scroll"||e==="scrollend"),S=se?_!==null?_+"Capture":null:_;se=[];for(var p=A,C;p!==null;){var w=p;if(C=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||C===null||S===null||(w=Ba(p,S),w!=null&&se.push(yn(p,w,C))),ze)break;p=p.return}0<se.length&&(_=new M(_,$,null,l,D),L.push({event:_,listeners:se}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",_&&l!==ui&&($=l.relatedTarget||l.fromElement)&&($l($)||$[Jl]))break e;if((M||_)&&(_=D.window===D?D:(_=D.ownerDocument)?_.defaultView||_.parentWindow:window,M?($=l.relatedTarget||l.toElement,M=A,$=$?$l($):null,$!==null&&(ze=j($),se=$.tag,$!==ze||se!==5&&se!==27&&se!==6)&&($=null)):(M=null,$=A),M!==$)){if(se=tu,w="onMouseLeave",S="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(se=au,w="onPointerLeave",S="onPointerEnter",p="pointer"),ze=M==null?_:Ua(M),C=$==null?_:Ua($),_=new se(w,p+"leave",M,l,D),_.target=ze,_.relatedTarget=C,w=null,$l(D)===A&&(se=new se(S,p+"enter",$,l,D),se.target=C,se.relatedTarget=ze,w=se),ze=w,M&&$)t:{for(se=Jx,S=M,p=$,C=0,w=S;w;w=se(w))C++;w=0;for(var te=p;te;te=se(te))w++;for(;0<C-w;)S=se(S),C--;for(;0<w-C;)p=se(p),w--;for(;C--;){if(S===p||p!==null&&S===p.alternate){se=S;break t}S=se(S),p=se(p)}se=null}else se=null;M!==null&&$d(L,_,M,se,!1),$!==null&&ze!==null&&$d(L,ze,$,se,!0)}}e:{if(_=A?Ua(A):window,M=_.nodeName&&_.nodeName.toLowerCase(),M==="select"||M==="input"&&_.type==="file")var be=du;else if(uu(_))if(fu)be=sx;else{be=ax;var F=lx}else M=_.nodeName,!M||M.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?A&&ci(A.elementType)&&(be=du):be=nx;if(be&&(be=be(e,A))){ou(L,be,l,D);break e}F&&F(e,_,A),e==="focusout"&&A&&_.type==="number"&&A.memoizedProps.value!=null&&ri(_,"number",_.value)}switch(F=A?Ua(A):window,e){case"focusin":(uu(F)||F.contentEditable==="true")&&(na=F,Si=A,Za=null);break;case"focusout":Za=Si=na=null;break;case"mousedown":Ni=!0;break;case"contextmenu":case"mouseup":case"dragend":Ni=!1,bu(L,l,D);break;case"selectionchange":if(rx)break;case"keydown":case"keyup":bu(L,l,D)}var de;if(yi)e:{switch(e){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else aa?ru(e,l)&&(pe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(pe="onCompositionStart");pe&&(nu&&l.locale!=="ko"&&(aa||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&aa&&(de=Pc()):(al=D,mi="value"in al?al.value:al.textContent,aa=!0)),F=ks(A,pe),0<F.length&&(pe=new lu(pe,e,null,l,D),L.push({event:pe,listeners:F}),de?pe.data=de:(de=cu(l),de!==null&&(pe.data=de)))),(de=Fm?Im(e,l):Pm(e,l))&&(pe=ks(A,"onBeforeInput"),0<pe.length&&(F=new lu("onBeforeInput","beforeinput",null,l,D),L.push({event:F,listeners:pe}),F.data=de)),Xx(L,e,A,l,D)}Kd(L,t)})}function yn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function ks(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=Ba(e,l),n!=null&&a.unshift(yn(e,n,i)),n=Ba(e,t),n!=null&&a.push(yn(e,n,i))),e.tag===3)return a;e=e.return}return[]}function Jx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $d(e,t,l,a,n){for(var i=t._reactName,r=[];l!==null&&l!==a;){var d=l,v=d.alternate,A=d.stateNode;if(d=d.tag,v!==null&&v===a)break;d!==5&&d!==26&&d!==27||A===null||(v=A,n?(A=Ba(l,i),A!=null&&r.unshift(yn(l,A,v))):n||(A=Ba(l,i),A!=null&&r.push(yn(l,A,v)))),l=l.return}r.length!==0&&e.push({event:t,listeners:r})}var $x=/\r\n?/g,Wx=/\u0000|\uFFFD/g;function Wd(e){return(typeof e=="string"?e:""+e).replace($x,`
|
|
49
|
+
`).replace(Wx,"")}function Fd(e,t){return t=Wd(t),Wd(e)===t}function Me(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ea(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ea(e,""+a);break;case"className":wn(e,"class",a);break;case"tabIndex":wn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":wn(e,l,a);break;case"style":Wc(e,a,i);break;case"data":if(t!=="object"){wn(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=Un(""+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 i=="function"&&(l==="formAction"?(t!=="input"&&Me(e,t,"name",n.name,n,null),Me(e,t,"formEncType",n.formEncType,n,null),Me(e,t,"formMethod",n.formMethod,n,null),Me(e,t,"formTarget",n.formTarget,n,null)):(Me(e,t,"encType",n.encType,n,null),Me(e,t,"method",n.method,n,null),Me(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Un(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Bt);break;case"onScroll":a!=null&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(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=Un(""+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":ve("beforetoggle",e),ve("toggle",e),Dn(e,"popover",a);break;case"xlinkActuate":Ut(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Ut(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Ut(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Ut(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Ut(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Ut(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Ut(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Ut(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Ut(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Dn(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=Em.get(l)||l,Dn(e,l,a))}}function Jr(e,t,l,a,n,i){switch(l){case"style":Wc(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ea(e,a):(typeof a=="number"||typeof a=="bigint")&&ea(e,""+a);break;case"onScroll":a!=null&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Bt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yc.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),i=e[at]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Dn(e,l,a)}}}function Ie(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var a=!1,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var r=l[i];if(r!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Me(e,t,i,r,l,null)}}n&&Me(e,t,"srcSet",l.srcSet,l,null),a&&Me(e,t,"src",l.src,l,null);return;case"input":ve("invalid",e);var d=i=r=n=null,v=null,A=null;for(a in l)if(l.hasOwnProperty(a)){var D=l[a];if(D!=null)switch(a){case"name":n=D;break;case"type":r=D;break;case"checked":v=D;break;case"defaultChecked":A=D;break;case"value":i=D;break;case"defaultValue":d=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(o(137,t));break;default:Me(e,t,a,D,l,null)}}Zc(e,i,d,v,A,r,n,!1);return;case"select":ve("invalid",e),a=r=i=null;for(n in l)if(l.hasOwnProperty(n)&&(d=l[n],d!=null))switch(n){case"value":i=d;break;case"defaultValue":r=d;break;case"multiple":a=d;default:Me(e,t,n,d,l,null)}t=i,l=r,e.multiple=!!a,t!=null?Pl(e,!!a,t,!1):l!=null&&Pl(e,!!a,l,!0);return;case"textarea":ve("invalid",e),i=n=a=null;for(r in l)if(l.hasOwnProperty(r)&&(d=l[r],d!=null))switch(r){case"value":a=d;break;case"defaultValue":n=d;break;case"children":i=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:Me(e,t,r,d,l,null)}Jc(e,a,n,i);return;case"option":for(v in l)if(l.hasOwnProperty(v)&&(a=l[v],a!=null))switch(v){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Me(e,t,v,a,l,null)}return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(a=0;a<pn.length;a++)ve(pn[a],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("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(o(137,t));default:Me(e,t,A,a,l,null)}return;default:if(ci(t)){for(D in l)l.hasOwnProperty(D)&&(a=l[D],a!==void 0&&Jr(e,t,D,a,l,void 0));return}}for(d in l)l.hasOwnProperty(d)&&(a=l[d],a!=null&&Me(e,t,d,a,l,null))}function Fx(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 n=null,i=null,r=null,d=null,v=null,A=null,D=null;for(M in l){var L=l[M];if(l.hasOwnProperty(M)&&L!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":v=L;default:a.hasOwnProperty(M)||Me(e,t,M,null,a,L)}}for(var _ in a){var M=a[_];if(L=l[_],a.hasOwnProperty(_)&&(M!=null||L!=null))switch(_){case"type":i=M;break;case"name":n=M;break;case"checked":A=M;break;case"defaultChecked":D=M;break;case"value":r=M;break;case"defaultValue":d=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,t));break;default:M!==L&&Me(e,t,_,M,a,L)}}ii(e,r,d,v,A,D,i,n);return;case"select":M=r=d=_=null;for(i in l)if(v=l[i],l.hasOwnProperty(i)&&v!=null)switch(i){case"value":break;case"multiple":M=v;default:a.hasOwnProperty(i)||Me(e,t,i,null,a,v)}for(n in a)if(i=a[n],v=l[n],a.hasOwnProperty(n)&&(i!=null||v!=null))switch(n){case"value":_=i;break;case"defaultValue":d=i;break;case"multiple":r=i;default:i!==v&&Me(e,t,n,i,a,v)}t=d,l=r,a=M,_!=null?Pl(e,!!l,_,!1):!!a!=!!l&&(t!=null?Pl(e,!!l,t,!0):Pl(e,!!l,l?[]:"",!1));return;case"textarea":M=_=null;for(d in l)if(n=l[d],l.hasOwnProperty(d)&&n!=null&&!a.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:Me(e,t,d,null,a,n)}for(r in a)if(n=a[r],i=l[r],a.hasOwnProperty(r)&&(n!=null||i!=null))switch(r){case"value":_=n;break;case"defaultValue":M=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(o(91));break;default:n!==i&&Me(e,t,r,n,a,i)}Kc(e,_,M);return;case"option":for(var $ in l)if(_=l[$],l.hasOwnProperty($)&&_!=null&&!a.hasOwnProperty($))switch($){case"selected":e.selected=!1;break;default:Me(e,t,$,null,a,_)}for(v in a)if(_=a[v],M=l[v],a.hasOwnProperty(v)&&_!==M&&(_!=null||M!=null))switch(v){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:Me(e,t,v,_,a,M)}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 se in l)_=l[se],l.hasOwnProperty(se)&&_!=null&&!a.hasOwnProperty(se)&&Me(e,t,se,null,a,_);for(A in a)if(_=a[A],M=l[A],a.hasOwnProperty(A)&&_!==M&&(_!=null||M!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(137,t));break;default:Me(e,t,A,_,a,M)}return;default:if(ci(t)){for(var ze in l)_=l[ze],l.hasOwnProperty(ze)&&_!==void 0&&!a.hasOwnProperty(ze)&&Jr(e,t,ze,void 0,a,_);for(D in a)_=a[D],M=l[D],!a.hasOwnProperty(D)||_===M||_===void 0&&M===void 0||Jr(e,t,D,_,a,M);return}}for(var S in l)_=l[S],l.hasOwnProperty(S)&&_!=null&&!a.hasOwnProperty(S)&&Me(e,t,S,null,a,_);for(L in a)_=a[L],M=l[L],!a.hasOwnProperty(L)||_===M||_==null&&M==null||Me(e,t,L,_,a,M)}function Id(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ix(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,r=n.initiatorType,d=n.duration;if(i&&d&&Id(r)){for(r=0,d=n.responseEnd,a+=1;a<l.length;a++){var v=l[a],A=v.startTime;if(A>d)break;var D=v.transferSize,L=v.initiatorType;D&&Id(L)&&(v=v.responseEnd,r+=D*(v<d?1:(d-A)/(v-A)))}if(--a,t+=8*(i+r)/(n.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 $r=null,Wr=null;function Rs(e){return e.nodeType===9?e:e.ownerDocument}function Pd(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 ef(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 Fr(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 Ir=null;function Px(){var e=window.event;return e&&e.type==="popstate"?e===Ir?!1:(Ir=e,!0):(Ir=null,!1)}var tf=typeof setTimeout=="function"?setTimeout:void 0,ev=typeof clearTimeout=="function"?clearTimeout:void 0,lf=typeof Promise=="function"?Promise:void 0,tv=typeof queueMicrotask=="function"?queueMicrotask:typeof lf<"u"?function(e){return lf.resolve(null).then(e).catch(lv)}:tf;function lv(e){setTimeout(function(){throw e})}function bl(e){return e==="head"}function af(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),ka(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")gn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,gn(l);for(var i=l.firstChild;i;){var r=i.nextSibling,d=i.nodeName;i[La]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=r}}else l==="body"&&gn(e.ownerDocument.body);l=n}while(l);ka(t)}function nf(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 Pr(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":Pr(l),ni(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function av(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[La])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=_t(e.nextSibling),e===null)break}return null}function nv(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=_t(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_t(e.nextSibling),e===null))return null;return e}function ec(e){return e.data==="$?"||e.data==="$~"}function tc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function sv(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 _t(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 lc=null;function rf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return _t(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function cf(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 uf(e,t,l){switch(t=Rs(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function gn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ni(e)}var Mt=new Map,of=new Set;function Os(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var el=Q.d;Q.d={f:iv,r:rv,D:cv,C:uv,L:ov,m:dv,X:mv,S:fv,M:xv};function iv(){var e=el.f(),t=Es();return e||t}function rv(e){var t=Wl(e);t!==null&&t.tag===5&&t.type==="form"?Co(t):el.r(e)}var _a=typeof document>"u"?null:document;function df(e,t,l){var a=_a;if(a&&typeof t=="string"&&t){var n=jt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),of.has(n)||(of.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),Ie(t,"link",e),Ze(t),a.head.appendChild(t)))}}function cv(e){el.D(e),df("dns-prefetch",e,null)}function uv(e,t){el.C(e,t),df("preconnect",e,t)}function ov(e,t,l){el.L(e,t,l);var a=_a;if(a&&e&&t){var n='link[rel="preload"][as="'+jt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+jt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+jt(l.imageSizes)+'"]')):n+='[href="'+jt(e)+'"]';var i=n;switch(t){case"style":i=Ma(e);break;case"script":i=za(e)}Mt.has(i)||(e=h({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Mt.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(bn(i))||t==="script"&&a.querySelector(jn(i))||(t=a.createElement("link"),Ie(t,"link",e),Ze(t),a.head.appendChild(t)))}}function dv(e,t){el.m(e,t);var l=_a;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+jt(a)+'"][href="'+jt(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=za(e)}if(!Mt.has(i)&&(e=h({rel:"modulepreload",href:e},t),Mt.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(jn(i)))return}a=l.createElement("link"),Ie(a,"link",e),Ze(a),l.head.appendChild(a)}}}function fv(e,t,l){el.S(e,t,l);var a=_a;if(a&&e){var n=Fl(a).hoistableStyles,i=Ma(e);t=t||"default";var r=n.get(i);if(!r){var d={loading:0,preload:null};if(r=a.querySelector(bn(i)))d.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Mt.get(i))&&ac(e,l);var v=r=a.createElement("link");Ze(v),Ie(v,"link",e),v._p=new Promise(function(A,D){v.onload=A,v.onerror=D}),v.addEventListener("load",function(){d.loading|=1}),v.addEventListener("error",function(){d.loading|=2}),d.loading|=4,Ds(r,t,a)}r={type:"stylesheet",instance:r,count:1,state:d},n.set(i,r)}}}function mv(e,t){el.X(e,t);var l=_a;if(l&&e){var a=Fl(l).hoistableScripts,n=za(e),i=a.get(n);i||(i=l.querySelector(jn(n)),i||(e=h({src:e,async:!0},t),(t=Mt.get(n))&&nc(e,t),i=l.createElement("script"),Ze(i),Ie(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function xv(e,t){el.M(e,t);var l=_a;if(l&&e){var a=Fl(l).hoistableScripts,n=za(e),i=a.get(n);i||(i=l.querySelector(jn(n)),i||(e=h({src:e,async:!0,type:"module"},t),(t=Mt.get(n))&&nc(e,t),i=l.createElement("script"),Ze(i),Ie(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function ff(e,t,l,a){var n=(n=me.current)?Os(n):null;if(!n)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Ma(l.href),l=Fl(n).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=Ma(l.href);var i=Fl(n).hoistableStyles,r=i.get(e);if(r||(n=n.ownerDocument||n,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,r),(i=n.querySelector(bn(e)))&&!i._p&&(r.instance=i,r.state.loading=5),Mt.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},Mt.set(e,l),i||vv(n,e,l,r.state))),t&&a===null)throw Error(o(528,""));return r}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=za(l),l=Fl(n).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(o(444,e))}}function Ma(e){return'href="'+jt(e)+'"'}function bn(e){return'link[rel="stylesheet"]['+e+"]"}function mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function vv(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}),Ie(t,"link",l),Ze(t),e.head.appendChild(t))}function za(e){return'[src="'+jt(e)+'"]'}function jn(e){return"script[async]"+e}function xf(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+jt(l.href)+'"]');if(a)return t.instance=a,Ze(a),a;var n=h({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ze(a),Ie(a,"style",n),Ds(a,l.precedence,e),t.instance=a;case"stylesheet":n=Ma(l.href);var i=e.querySelector(bn(n));if(i)return t.state.loading|=4,t.instance=i,Ze(i),i;a=mf(l),(n=Mt.get(n))&&ac(a,n),i=(e.ownerDocument||e).createElement("link"),Ze(i);var r=i;return r._p=new Promise(function(d,v){r.onload=d,r.onerror=v}),Ie(i,"link",a),t.state.loading|=4,Ds(i,l.precedence,e),t.instance=i;case"script":return i=za(l.src),(n=e.querySelector(jn(i)))?(t.instance=n,Ze(n),n):(a=l,(n=Mt.get(i))&&(a=h({},l),nc(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),Ze(n),Ie(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ds(a,l.precedence,e));return t.instance}function Ds(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,r=0;r<a.length;r++){var d=a[r];if(d.dataset.precedence===t)i=d;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function ac(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function nc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ws=null;function vf(e,t,l){if(ws===null){var a=new Map,n=ws=new Map;n.set(l,a)}else n=ws,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var i=l[n];if(!(i[La]||i[Je]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var r=i.getAttribute(t)||"";r=e+r;var d=a.get(r);d?d.push(i):a.set(r,[i])}}return a}function hf(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function hv(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 pf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function pv(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 n=Ma(a.href),i=t.querySelector(bn(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ls.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Ze(i);return}i=t.ownerDocument||t,a=mf(a),(n=Mt.get(n))&&ac(a,n),i=i.createElement("link"),Ze(i);var r=i;r._p=new Promise(function(d,v){r.onload=d,r.onerror=v}),Ie(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Ls.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var sc=0;function yv(e,t){return e.stylesheets&&e.count===0&&Bs(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Bs(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&sc===0&&(sc=62500*Ix());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Bs(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>sc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Ls(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Us=null;function Bs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Us=new Map,t.forEach(gv,e),Us=null,Ls.call(e))}function gv(e,t){if(!(t.state.loading&4)){var l=Us.get(e);if(l)var a=l.get(null);else{l=new Map,Us.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var r=n[i];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(l.set(r.dataset.precedence,r),a=r)}a&&l.set(null,a)}n=t.instance,r=n.getAttribute("data-precedence"),i=l.get(r)||a,i===a&&l.set(null,n),l.set(r,n),this.count++,a=Ls.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Sn={$$typeof:le,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function bv(e,t,l,a,n,i,r,d,v){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=ei(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ei(0),this.hiddenUpdates=ei(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function yf(e,t,l,a,n,i,r,d,v,A,D,L){return e=new bv(e,t,l,r,v,A,D,L,d),t=1,i===!0&&(t|=24),i=xt(3,null,null,t),e.current=i,i.stateNode=e,t=Bi(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Gi(i),e}function gf(e){return e?(e=ra,e):ra}function bf(e,t,l,a,n,i){n=gf(n),a.context===null?a.context=n:a.pendingContext=n,a=ul(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=ol(e,a,t),l!==null&&(ut(l,e,t),Pa(l,e,t))}function jf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function ic(e,t){jf(e,t),(e=e.alternate)&&jf(e,t)}function Sf(e){if(e.tag===13||e.tag===31){var t=Dl(e,67108864);t!==null&&ut(t,e,67108864),ic(e,67108864)}}function Nf(e){if(e.tag===13||e.tag===31){var t=gt();t=ti(t);var l=Dl(e,t);l!==null&&ut(l,e,t),ic(e,t)}}var Hs=!0;function jv(e,t,l,a){var n=k.T;k.T=null;var i=Q.p;try{Q.p=2,rc(e,t,l,a)}finally{Q.p=i,k.T=n}}function Sv(e,t,l,a){var n=k.T;k.T=null;var i=Q.p;try{Q.p=8,rc(e,t,l,a)}finally{Q.p=i,k.T=n}}function rc(e,t,l,a){if(Hs){var n=cc(a);if(n===null)Kr(e,t,a,qs,l),Tf(e,a);else if(Ev(n,e,t,l,a))a.stopPropagation();else if(Tf(e,a),t&4&&-1<Nv.indexOf(e)){for(;n!==null;){var i=Wl(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var r=Ml(i.pendingLanes);if(r!==0){var d=i;for(d.pendingLanes|=2,d.entangledLanes|=2;r;){var v=1<<31-ft(r);d.entanglements[1]|=v,r&=~v}Lt(i),(Ne&6)===0&&(Ss=ot()+500,hn(0))}}break;case 31:case 13:d=Dl(i,2),d!==null&&ut(d,i,2),Es(),ic(i,2)}if(i=cc(a),i===null&&Kr(e,t,a,qs,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else Kr(e,t,a,null,l)}}function cc(e){return e=oi(e),uc(e)}var qs=null;function uc(e){if(qs=null,e=$l(e),e!==null){var t=j(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=g(t),e!==null)return e;e=null}else if(l===31){if(e=T(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 qs=e,null}function Ef(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(cm()){case zc:return 2;case kc:return 8;case Mn:case um:return 32;case Rc:return 268435456;default:return 32}default:return 32}}var oc=!1,jl=null,Sl=null,Nl=null,Nn=new Map,En=new Map,El=[],Nv="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 Tf(e,t){switch(e){case"focusin":case"focusout":jl=null;break;case"dragenter":case"dragleave":Sl=null;break;case"mouseover":case"mouseout":Nl=null;break;case"pointerover":case"pointerout":Nn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":En.delete(t.pointerId)}}function Tn(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=Wl(t),t!==null&&Sf(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Ev(e,t,l,a,n){switch(t){case"focusin":return jl=Tn(jl,e,t,l,a,n),!0;case"dragenter":return Sl=Tn(Sl,e,t,l,a,n),!0;case"mouseover":return Nl=Tn(Nl,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return Nn.set(i,Tn(Nn.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,En.set(i,Tn(En.get(i)||null,e,t,l,a,n)),!0}return!1}function Cf(e){var t=$l(e.target);if(t!==null){var l=j(t);if(l!==null){if(t=l.tag,t===13){if(t=g(l),t!==null){e.blockedOn=t,Bc(e.priority,function(){Nf(l)});return}}else if(t===31){if(t=T(l),t!==null){e.blockedOn=t,Bc(e.priority,function(){Nf(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 Ys(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=cc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);ui=a,l.target.dispatchEvent(a),ui=null}else return t=Wl(l),t!==null&&Sf(t),e.blockedOn=l,!1;t.shift()}return!0}function Af(e,t,l){Ys(e)&&l.delete(t)}function Tv(){oc=!1,jl!==null&&Ys(jl)&&(jl=null),Sl!==null&&Ys(Sl)&&(Sl=null),Nl!==null&&Ys(Nl)&&(Nl=null),Nn.forEach(Af),En.forEach(Af)}function Gs(e,t){e.blockedOn===t&&(e.blockedOn=null,oc||(oc=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,Tv)))}var Qs=null;function _f(e){Qs!==e&&(Qs=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){Qs===e&&(Qs=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(uc(a||l)===null)continue;break}var i=Wl(l);i!==null&&(e.splice(t,3),t-=3,cr(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function ka(e){function t(v){return Gs(v,e)}jl!==null&&Gs(jl,e),Sl!==null&&Gs(Sl,e),Nl!==null&&Gs(Nl,e),Nn.forEach(t),En.forEach(t);for(var l=0;l<El.length;l++){var a=El[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<El.length&&(l=El[0],l.blockedOn===null);)Cf(l),l.blockedOn===null&&El.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],r=n[at]||null;if(typeof i=="function")r||_f(l);else if(r){var d=null;if(i&&i.hasAttribute("formAction")){if(n=i,r=i[at]||null)d=r.formAction;else if(uc(n)!==null)continue}else d=r.action;typeof d=="function"?l[a+1]=d:(l.splice(a,3),a-=3),_f(l)}}}function Mf(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(r){return n=r})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=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),n!==null&&(n(),n=null)}}}function dc(e){this._internalRoot=e}Xs.prototype.render=dc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,a=gt();bf(l,a,e,t,null,null)},Xs.prototype.unmount=dc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;bf(e.current,2,null,e,null,null),Es(),t[Jl]=null}};function Xs(e){this._internalRoot=e}Xs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Uc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<El.length&&t!==0&&t<El[l].priority;l++);El.splice(l,0,e),l===0&&Cf(e)}};var zf=u.version;if(zf!=="19.2.4")throw Error(o(527,zf,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=x(t),e=e!==null?E(e):null,e=e===null?null:e.stateNode,e};var Cv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vs.isDisabled&&Vs.supportsFiber)try{Oa=Vs.inject(Cv),dt=Vs}catch{}}return An.createRoot=function(e,t){if(!m(e))throw Error(o(299));var l=!1,a="",n=Lo,i=Uo,r=Bo;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=yf(e,1,!1,null,null,l,a,null,n,i,r,Mf),e[Jl]=t.current,Zr(e),new dc(t)},An.hydrateRoot=function(e,t,l){if(!m(e))throw Error(o(299));var a=!1,n="",i=Lo,r=Uo,d=Bo,v=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(r=l.onCaughtError),l.onRecoverableError!==void 0&&(d=l.onRecoverableError),l.formState!==void 0&&(v=l.formState)),t=yf(e,1,!0,t,l??null,a,n,v,i,r,d,Mf),t.context=gf(null),l=t.current,a=gt(),a=ti(a),n=ul(a),n.callback=null,ol(l,n,a),l=a,t.current.lanes=l,wa(t,l),Lt(t),e[Jl]=t.current,Zr(e),new Xs(t)},An.version="19.2.4",An}var qf;function Lv(){if(qf)return xc.exports;qf=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(u){console.error(u)}}return c(),xc.exports=wv(),xc.exports}var Uv=Lv();const Bv="";class Hv extends Error{constructor(u,f){super(u),this.name="ApiError",this.status=f}}async function Xe(c,u){const f=await fetch(`${Bv}${c}`,u);if(!f.ok){const o=await f.json().catch(()=>({error:f.statusText}));throw new Hv(o.error||`HTTP ${f.status}`,f.status)}return f.json()}const ge={getConfig(){return Xe("/api/config")},setConfig(c,u){return Xe("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:c,model:u})})},getSkills(){return Xe("/api/skills")},getSkillDetail(c,u){return Xe(`/api/skills/${c}/${u}`)},getEvals(c,u){return Xe(`/api/skills/${c}/${u}/evals`)},saveEvals(c,u,f){return Xe(`/api/skills/${c}/${u}/evals`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)})},generateEvals(c,u){return Xe(`/api/skills/${c}/${u}/generate-evals`,{method:"POST"})},getLatestBenchmark(c,u){return Xe(`/api/skills/${c}/${u}/benchmark/latest`)},getHistory(c,u,f){const o=new URLSearchParams;f!=null&&f.model&&o.set("model",f.model),f!=null&&f.type&&o.set("type",f.type),f!=null&&f.from&&o.set("from",f.from),f!=null&&f.to&&o.set("to",f.to);const m=o.toString();return Xe(`/api/skills/${c}/${u}/history${m?"?"+m:""}`)},getHistoryEntry(c,u,f){return Xe(`/api/skills/${c}/${u}/history/${encodeURIComponent(f)}`)},compareRuns(c,u,f,o){return Xe(`/api/skills/${c}/${u}/history-compare?a=${encodeURIComponent(f)}&b=${encodeURIComponent(o)}`)},getCaseHistory(c,u,f,o){const m=new URLSearchParams;o&&m.set("model",o);const j=m.toString();return Xe(`/api/skills/${c}/${u}/history/case/${f}${j?"?"+j:""}`)},deleteHistoryEntry(c,u,f){return Xe(`/api/skills/${c}/${u}/history/${encodeURIComponent(f)}`,{method:"DELETE"})},improveSkill(c,u,f){return Xe(`/api/skills/${c}/${u}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)})},applyImprovement(c,u,f){return Xe(`/api/skills/${c}/${u}/apply-improvement`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:f})})},getStats(c,u){return Xe(`/api/skills/${c}/${u}/stats`)},getDependencies(c,u){return Xe(`/api/skills/${c}/${u}/dependencies`)},getProjectLayout(){return Xe("/api/project-layout")},createSkill(c){return Xe("/api/skills/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})},getSkillCreatorStatus(){return Xe("/api/skill-creator-status")}};function qv(c){const[u,f]=N.useState(()=>typeof window>"u"?!1:window.matchMedia(c).matches);return N.useEffect(()=>{const o=window.matchMedia(c);f(o.matches);const m=j=>f(j.matches);return o.addEventListener("change",m),()=>o.removeEventListener("change",m)},[c]),u}const Yv={selectedSkill:null,mode:"browse",searchQuery:"",skills:[],skillsLoading:!0,skillsError:null,isMobile:!1,mobileView:"list"};function Gv(c,u){switch(u.type){case"SELECT_SKILL":return{...c,selectedSkill:u.skill,mode:"browse",mobileView:c.isMobile?"detail":c.mobileView};case"CLEAR_SELECTION":return{...c,selectedSkill:null};case"SET_MODE":return{...c,mode:u.mode,selectedSkill:u.mode==="create"?null:c.selectedSkill};case"SET_SEARCH":return{...c,searchQuery:u.query};case"SET_SKILLS":return{...c,skills:u.skills,skillsLoading:!1,skillsError:null};case"SET_SKILLS_ERROR":return{...c,skillsError:u.error,skillsLoading:!1};case"SET_SKILLS_LOADING":return{...c,skillsLoading:u.loading};case"SET_MOBILE":return{...c,isMobile:u.isMobile};case"SET_MOBILE_VIEW":return{...c,mobileView:u.view};default:return c}}const Wf=N.createContext(null);function Kl(){const c=N.useContext(Wf);if(!c)throw new Error("useStudio must be used within StudioProvider");return c}function Qv({children:c}){const[u,f]=N.useReducer(Gv,Yv),o=qv("(max-width: 767px)");N.useEffect(()=>{f({type:"SET_MOBILE",isMobile:o})},[o]);const m=N.useCallback(()=>{f({type:"SET_SKILLS_LOADING",loading:!0}),ge.getSkills().then(h=>f({type:"SET_SKILLS",skills:h})).catch(h=>f({type:"SET_SKILLS_ERROR",error:h.message}))},[]);N.useEffect(()=>{m()},[m]);const j=N.useCallback(h=>{f({type:"SELECT_SKILL",skill:h})},[]),g=N.useCallback(()=>{f({type:"CLEAR_SELECTION"})},[]),T=N.useCallback(h=>{f({type:"SET_MODE",mode:h})},[]),b=N.useCallback(h=>{f({type:"SET_SEARCH",query:h})},[]),x=N.useCallback(h=>{f({type:"SET_MOBILE_VIEW",view:h})},[]),E=N.useMemo(()=>({state:u,selectSkill:j,clearSelection:g,setMode:T,setSearch:b,setMobileView:x,refreshSkills:m}),[u,j,g,T,b,x,m]);return s.jsx(Wf.Provider,{value:E,children:c})}function Xv({left:c,right:u}){const{state:f}=Kl();return f.isMobile?s.jsx("div",{style:{height:"100vh",overflow:"hidden",background:"var(--surface-0)"},children:f.mobileView==="list"?s.jsx("div",{style:{height:"100%",overflowY:"auto",background:"var(--surface-1)"},children:c}):s.jsx("div",{style:{height:"100%",overflowY:"auto"},children:u})}):s.jsxs("div",{className:"studio-grid",style:{display:"grid",gridTemplateColumns:"280px 1px 1fr",height:"100vh",overflow:"hidden"},children:[s.jsx("div",{style:{overflowY:"auto",background:"var(--surface-1)"},children:c}),s.jsx("div",{style:{background:"var(--border-subtle)"}}),s.jsx("div",{style:{overflowY:"auto",background:"var(--surface-0)"},children:u})]})}function Vv(){const{state:c,setSearch:u}=Kl(),[f,o]=N.useState(c.searchQuery),m=N.useRef(null);N.useEffect(()=>(m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{u(f)},200),()=>{m.current&&clearTimeout(m.current)}),[f,u]),N.useEffect(()=>{c.searchQuery===""&&f!==""&&o("")},[c.searchQuery]);const j=new Set(c.skills.map(g=>g.plugin)).size;return s.jsxs("div",{className:"px-3 py-2",children:[s.jsxs("div",{className:"relative",children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{position:"absolute",left:10,top:"50%",transform:"translateY(-50%)"},children:[s.jsx("circle",{cx:"11",cy:"11",r:"8"}),s.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),s.jsx("input",{type:"text",value:f,onChange:g=>o(g.target.value),placeholder:"Search skills...",className:"w-full py-2 pl-8 pr-3 rounded-lg text-[13px] transition-colors duration-150",style:{background:"var(--surface-2)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)",outline:"none"},onFocus:g=>{g.currentTarget.style.borderColor="var(--accent)"},onBlur:g=>{g.currentTarget.style.borderColor="var(--border-subtle)"}}),f&&s.jsx("button",{onClick:()=>{o(""),u("")},style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",color:"var(--text-tertiary)",padding:2},children:s.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),!c.skillsLoading&&s.jsxs("div",{className:"text-[11px] mt-1.5 px-1",style:{color:"var(--text-tertiary)"},children:[c.skills.length," skill",c.skills.length!==1?"s":""," across ",j," plugin",j!==1?"s":""]})]})}const Yf={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 Zv({skill:c,isSelected:u,onSelect:f}){const o=Yf[c.benchmarkStatus]||Yf.missing;return s.jsxs("button",{onClick:f,className:"w-full text-left px-3 py-2.5 transition-all duration-150",style:{background:u?"var(--surface-2)":"transparent",cursor:"pointer",borderTop:"none",borderRight:"none",borderBottom:"1px solid var(--border-subtle)",borderLeft:u?"2px solid var(--accent)":"2px solid transparent",display:"block"},onMouseEnter:m=>{u||(m.currentTarget.style.background="var(--surface-2)")},onMouseLeave:m=>{u||(m.currentTarget.style.background="transparent")},children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("span",{className:"text-[13px] font-medium truncate",style:{color:"var(--text-primary)"},children:c.skill}),s.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-medium px-1.5 py-0.5 rounded-full flex-shrink-0 ml-2",style:{background:o.bg,color:o.text},children:[s.jsx("span",{className:"rounded-full",style:{width:5,height:5,background:o.dot}}),o.label]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-[11px]",style:{color:"var(--text-tertiary)"},children:[s.jsxs("span",{children:[c.evalCount," eval",c.evalCount!==1?"s":""]}),s.jsx("span",{style:{color:"var(--border-subtle)"},children:"|"}),s.jsxs("span",{children:[c.assertionCount," assert",c.assertionCount!==1?"s":""]}),c.lastBenchmark&&s.jsxs(s.Fragment,{children:[s.jsx("span",{style:{color:"var(--border-subtle)"},children:"|"}),s.jsx("span",{children:new Date(c.lastBenchmark).toLocaleDateString()})]})]})]})}function Kv(){const{state:c,selectSkill:u}=Kl(),{skills:f,searchQuery:o,selectedSkill:m}=c,j=N.useMemo(()=>{var E;const T=o.toLowerCase(),b=T?f.filter(h=>h.skill.toLowerCase().includes(T)||h.plugin.toLowerCase().includes(T)):f,x={};for(const h of b)(x[E=h.plugin]||(x[E]=[])).push(h);return x},[f,o]),g=Object.entries(j);return c.skillsLoading?s.jsx("div",{className:"px-3 py-4 space-y-3",children:[1,2,3].map(T=>s.jsx("div",{className:"skeleton h-14 w-full rounded-lg"},T))}):g.length===0?s.jsx("div",{className:"px-4 py-8 text-center",children:s.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No skills match your search"})}):s.jsx("div",{className:"flex-1",children:g.map(([T,b])=>s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),s.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:T}),s.jsxs("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:["(",b.length,")"]}),s.jsx("div",{className:"flex-1 h-px",style:{background:"var(--border-subtle)"}})]}),b.map(x=>{const E=(m==null?void 0:m.plugin)===x.plugin&&(m==null?void 0:m.skill)===x.skill;return s.jsx(Zv,{skill:x,isSelected:E,onSelect:()=>u({plugin:x.plugin,skill:x.skill})},`${x.plugin}/${x.skill}`)})]},T))})}function Jv(){const[c,u]=N.useState(null),[f,o]=N.useState(!1),[m,j]=N.useState(!1),g=N.useRef(null);N.useEffect(()=>{ge.getConfig().then(u).catch(()=>{})},[]),N.useEffect(()=>{function E(h){g.current&&!g.current.contains(h.target)&&o(!1)}return f&&document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[f]);async function T(E,h){j(!0);try{const R=await ge.setConfig(E.id,h.id);u(R),o(!1)}catch{const R=await ge.getConfig();u(R)}finally{j(!1)}}if(!c)return null;const b=Wv(c),x=$v(c);return s.jsxs("div",{ref:g,className:"relative",children:[s.jsxs("button",{onClick:()=>o(!f),className:"w-full flex items-center gap-2 px-2.5 py-1.5 rounded-lg text-[11px] transition-all duration-150",style:{background:f?"var(--surface-3)":"var(--surface-2)",border:`1px solid ${f?"var(--accent)":"var(--border-subtle)"}`,cursor:"pointer"},onMouseEnter:E=>{f||(E.currentTarget.style.borderColor="var(--accent)")},onMouseLeave:E=>{f||(E.currentTarget.style.borderColor="var(--border-subtle)")},children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:x!=null&&x.available?"var(--green)":"var(--text-tertiary)"}}),s.jsx("span",{className:"flex-1 text-left font-medium truncate",style:{color:"var(--text-primary)"},children:b}),s.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:f?"rotate(180deg)":"rotate(0)",transition:"transform 0.15s ease",flexShrink:0},children:s.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),f&&s.jsxs("div",{className:"absolute top-full mt-1 left-0 right-0 rounded-xl shadow-xl z-50 overflow-hidden animate-fade-in",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)",minWidth:"240px"},children:[s.jsx("div",{className:"px-3 py-2",style:{borderBottom:"1px solid var(--border-subtle)"},children:s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Select Model"})}),s.jsx("div",{className:"py-1 max-h-72 overflow-y-auto",children:c.providers.map(E=>s.jsxs("div",{children:[s.jsxs("div",{className:"px-3 py-1.5 flex items-center gap-2",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:E.available?"var(--green)":"var(--text-tertiary)",opacity:E.available?1:.3}}),s.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",opacity:E.available?1:.5},children:E.label})]}),E.models.map(h=>{const R=Ff(c,E.id,h.id),H=!E.available||m;return s.jsxs("button",{onClick:()=>!H&&T(E,h),disabled:H,className:"w-full px-3 py-1.5 flex items-center gap-2.5 text-left transition-all duration-100",style:{background:R?"var(--accent-muted)":"transparent",color:H?"var(--text-tertiary)":"var(--text-primary)",opacity:H?.4:1,cursor:H?"not-allowed":"pointer"},onMouseEnter:q=>{!H&&!R&&(q.currentTarget.style.background="var(--surface-3)")},onMouseLeave:q=>{R||(q.currentTarget.style.background="transparent")},children:[s.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0 flex items-center justify-center",style:{border:`2px solid ${R?"var(--accent)":"var(--border-subtle)"}`},children:R&&s.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}})}),s.jsx("span",{className:"text-[12px]",style:{fontWeight:R?600:400},title:h.id,children:h.label})]},`${E.id}-${h.id}`)})]},E.id))})]})]})}function Ff(c,u,f){return c.provider!==u?!1:u==="claude-cli"?c.model===`claude-${f}`:c.model===f}function $v(c){return c.providers.find(u=>u.id===c.provider)}function Wv(c){for(const u of c.providers)for(const f of u.models)if(Ff(c,u.id,f.id))return f.label;return c.model}function Fv(){const{state:c,setMode:u}=Kl(),[f,o]=N.useState(null);return N.useEffect(()=>{ge.getConfig().then(m=>o(m.projectName)).catch(()=>{})},[]),s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"px-4 py-4 flex-shrink-0",style:{borderBottom:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0",style:{background:"var(--accent-muted)"},children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("div",{className:"text-[14px] font-semibold truncate",style:{color:"var(--text-primary)",letterSpacing:"-0.01em"},children:"Skill Studio"}),s.jsx("div",{className:"text-[11px] truncate",style:{color:"var(--text-tertiary)"},children:f||"vskill"})]})]}),s.jsx("div",{className:"mt-3",children:s.jsx(Jv,{})})]}),s.jsx(Vv,{}),s.jsx("div",{className:"px-3 pb-2 flex-shrink-0",children:s.jsxs("button",{onClick:()=>u("create"),className:"w-full flex items-center justify-center gap-2 px-3 py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:c.mode==="create"?"var(--accent)":"var(--surface-3)",color:c.mode==="create"?"#fff":"var(--text-secondary)",border:"none",cursor:"pointer"},onMouseEnter:m=>{c.mode!=="create"&&(m.currentTarget.style.background="var(--surface-4)",m.currentTarget.style.color="var(--text-primary)")},onMouseLeave:m=>{c.mode!=="create"&&(m.currentTarget.style.background="var(--surface-3)",m.currentTarget.style.color="var(--text-secondary)")},children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),s.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"New Skill"]})}),s.jsx("div",{className:"flex-1 overflow-y-auto",style:{borderTop:"1px solid var(--border-subtle)"},children:s.jsx(Kv,{})})]})}function Iv(){const[c,u]=N.useState([]),[f,o]=N.useState(!1),[m,j]=N.useState(!1),[g,T]=N.useState(null),b=N.useRef(null),x=N.useCallback(async(h,R)=>{u([]),o(!0),j(!1),T(null);const H=new AbortController;b.current=H;try{const q=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:R?JSON.stringify(R):void 0,signal:H.signal});if(!q.ok||!q.body)throw new Error(`HTTP ${q.status}`);const B=q.body.getReader(),Y=new TextDecoder;let V="",P="";for(;;){const{done:le,value:G}=await B.read();if(le)break;V+=Y.decode(G,{stream:!0});const ne=V.split(`
|
|
50
|
+
`);V=ne.pop()||"";for(const ie of ne)if(ie.startsWith("event: "))P=ie.slice(7).trim();else if(ie.startsWith("data: ")){try{const I=JSON.parse(ie.slice(6)),fe={event:P,data:I};P==="done"?(j(!0),u(Se=>[...Se,fe])):u(Se=>[...Se,fe])}catch{}P=""}}}catch(q){q.name!=="AbortError"&&T(q.message)}finally{o(!1),b.current=null}},[]),E=N.useCallback(()=>{var h;(h=b.current)==null||h.abort()},[]);return{events:c,running:f,done:m,error:g,start:x,stop:E}}function Pv(c){const u=N.useRef(c);u.current=c;const[f,o]=N.useState(new Set),m=N.useRef(new Map),j=N.useCallback(async(x,E,h)=>{var H;(H=m.current.get(x))==null||H.abort();const R=new AbortController;m.current.set(x,R),o(q=>{const B=new Set(q);return B.add(x),B});try{const q=await fetch(E,{method:"POST",headers:{"Content-Type":"application/json"},body:h?JSON.stringify(h):void 0,signal:R.signal});if(!q.ok||!q.body)throw new Error(`HTTP ${q.status}`);const B=q.body.getReader(),Y=new TextDecoder;let V="",P="";for(;;){const{done:le,value:G}=await B.read();if(le)break;V+=Y.decode(G,{stream:!0});const ne=V.split(`
|
|
51
|
+
`);V=ne.pop()||"";for(const ie of ne)if(ie.startsWith("event: "))P=ie.slice(7).trim();else if(ie.startsWith("data: ")){try{const I=JSON.parse(ie.slice(6)),fe={event:P,data:I};u.current.onEvent(x,fe)}catch{}P=""}}u.current.onDone(x)}catch(q){q.name!=="AbortError"&&u.current.onError(x,q.message)}finally{o(q=>{const B=new Set(q);return B.delete(x),B}),m.current.delete(x)}},[]),g=N.useCallback(x=>{var E;(E=m.current.get(x))==null||E.abort()},[]),T=N.useCallback(()=>{for(const x of m.current.values())x.abort()},[]),b=f.size>0;return{runningSet:f,startCase:j,stopCase:g,stopAll:T,isAnyCaseRunning:b}}const eh={plugin:"",skill:"",skillContent:"",savedContent:"",isDirty:!1,evals:null,activePanel:"tests",selectedCaseId:null,caseRunStates:new Map,bulkRunActive:!1,runMode:null,latestBenchmark:null,inlineResults:new Map,improveTarget:null,regressions:[],iterationCount:0,activationPrompts:"",activationResults:[],activationSummary:null,activationRunning:!1,activationError:null,loading:!0,error:null};function th(c,u){var f,o;switch(u.type){case"SET_LOADING":return{...c,loading:u.loading};case"SET_ERROR":return{...c,error:u.error};case"INIT_DATA":{const m=new Map;if(u.benchmark)for(const g of u.benchmark.cases)m.set(g.eval_id,{status:g.status,passRate:g.pass_rate,errorMessage:g.error_message||void 0,durationMs:g.durationMs,tokens:g.tokens,output:g.output,assertions:g.assertions.map(T=>({assertion_id:T.id,text:T.text,pass:T.pass,reasoning:T.reasoning}))});const j=((o=(f=u.evals)==null?void 0:f.evals[0])==null?void 0:o.id)??null;return{...c,skillContent:u.skillContent,savedContent:u.skillContent,isDirty:!1,evals:u.evals,latestBenchmark:u.benchmark,inlineResults:m,selectedCaseId:j,loading:!1,error:null}}case"SET_PANEL":return{...c,activePanel:u.panel};case"SET_CONTENT":return{...c,skillContent:u.content,isDirty:u.content!==c.savedContent};case"CONTENT_SAVED":return{...c,savedContent:c.skillContent,isDirty:!1};case"SET_EVALS":return{...c,evals:u.evals};case"SELECT_CASE":return{...c,selectedCaseId:u.caseId};case"CASE_RUN_START":{const m=new Map(c.caseRunStates);return m.set(u.caseId,{status:"running",startedAt:Date.now()}),{...c,caseRunStates:m,runMode:u.mode,activePanel:"run"}}case"CASE_RUN_COMPLETE":{const m=new Map(c.caseRunStates);m.set(u.caseId,{status:"complete"});const j=new Map(c.inlineResults);return j.set(u.caseId,u.result),{...c,caseRunStates:m,inlineResults:j}}case"CASE_RUN_ERROR":{const m=new Map(c.caseRunStates);m.set(u.caseId,{status:"error"});const j=new Map(c.inlineResults);return j.set(u.caseId,{status:"error",errorMessage:u.error,assertions:[]}),{...c,caseRunStates:m,inlineResults:j}}case"CASE_RUN_CANCEL":{const m=new Map(c.caseRunStates);return m.set(u.caseId,{status:"cancelled"}),{...c,caseRunStates:m}}case"BULK_RUN_START":{const m=new Map(c.caseRunStates);for(const j of u.caseIds)m.set(j,{status:"queued"});return{...c,caseRunStates:m,bulkRunActive:!0,runMode:u.mode,activePanel:"run"}}case"BULK_RUN_COMPLETE":return{...c,bulkRunActive:!1,latestBenchmark:u.benchmark??c.latestBenchmark,iterationCount:c.iterationCount+1};case"CANCEL_ALL":{const m=new Map(c.caseRunStates);for(const[j,g]of m)(g.status==="running"||g.status==="queued")&&m.set(j,{status:"cancelled"});return{...c,caseRunStates:m,bulkRunActive:!1}}case"UPDATE_INLINE_RESULT":{const m=new Map(c.inlineResults);return m.set(u.evalId,u.result),{...c,inlineResults:m}}case"OPEN_IMPROVE":return{...c,improveTarget:u.evalId,activePanel:"editor"};case"CLOSE_IMPROVE":return{...c,improveTarget:null};case"SET_REGRESSIONS":return{...c,regressions:u.regressions};case"INCREMENT_ITERATION":return{...c,iterationCount:c.iterationCount+1};case"SET_ACTIVATION_PROMPTS":return{...c,activationPrompts:u.prompts};case"ACTIVATION_START":return{...c,activationRunning:!0,activationResults:[],activationSummary:null,activationError:null};case"ACTIVATION_RESULT":return{...c,activationResults:[...c.activationResults,u.result]};case"ACTIVATION_DONE":return{...c,activationRunning:!1,activationSummary:u.summary};case"ACTIVATION_ERROR":return{...c,activationRunning:!1,activationError:u.error};case"ACTIVATION_RESET":return{...c,activationResults:[],activationSummary:null,activationError:null};default:return c}}const If=N.createContext(null);function Al(){const c=N.useContext(If);if(!c)throw new Error("useWorkspace must be used within WorkspaceProvider");return c}function lh({plugin:c,skill:u,children:f}){const[o,m]=N.useReducer(th,{...eh,plugin:c,skill:u}),j=N.useRef(new Set),g=N.useRef(new Set),T=N.useRef(new Map),b=N.useCallback((O,K)=>{const z=K.data;let J=T.current.get(O);if(J||(J={assertions:[]},T.current.set(O,J)),K.event==="output_ready"&&(J.output=z.output,z.durationMs!=null&&(J.durationMs=z.durationMs),z.tokens!=null&&(J.tokens=z.tokens)),K.event==="assertion_result"){const re={assertion_id:z.assertion_id,text:z.text,pass:z.pass,reasoning:z.reasoning};J.assertions.find(k=>k.assertion_id===re.assertion_id)||J.assertions.push(re)}K.event==="case_complete"&&(J.status=z.status,J.passRate=z.pass_rate,J.errorMessage=z.error_message||void 0),m({type:"UPDATE_INLINE_RESULT",evalId:O,result:{...J,assertions:[...J.assertions]}})},[]),x=N.useCallback(O=>{if(g.current.has(O))return;g.current.add(O);const K=T.current.get(O)??{assertions:[]};m({type:"CASE_RUN_COMPLETE",caseId:O,result:{...K,assertions:[...K.assertions]}}),j.current.has(O)&&(j.current.delete(O),j.current.size===0&&ge.getLatestBenchmark(c,u).then(z=>m({type:"BULK_RUN_COMPLETE",benchmark:z})).catch(()=>m({type:"BULK_RUN_COMPLETE",benchmark:null})))},[c,u]),E=N.useCallback((O,K)=>{g.current.has(O)||(g.current.add(O),m({type:"CASE_RUN_ERROR",caseId:O,error:K}),j.current.has(O)&&(j.current.delete(O),j.current.size===0&&ge.getLatestBenchmark(c,u).then(z=>m({type:"BULK_RUN_COMPLETE",benchmark:z})).catch(()=>m({type:"BULK_RUN_COMPLETE",benchmark:null}))))},[c,u]),{startCase:h,stopCase:R,stopAll:H}=Pv({onEvent:b,onDone:x,onError:E});N.useEffect(()=>()=>{H()},[H]),N.useEffect(()=>{let O=!1;async function K(){try{const[z,J,re]=await Promise.allSettled([ge.getSkillDetail(c,u),ge.getEvals(c,u),ge.getLatestBenchmark(c,u)]);if(O)return;m({type:"INIT_DATA",skillContent:z.status==="fulfilled"?z.value.skillContent:"",evals:J.status==="fulfilled"?J.value:null,benchmark:re.status==="fulfilled"?re.value:null})}catch(z){O||m({type:"SET_ERROR",error:z.message})}}return K(),()=>{O=!0}},[c,u]);const q=N.useCallback(async()=>{try{await ge.applyImprovement(c,u,o.skillContent),m({type:"CONTENT_SAVED"})}catch(O){m({type:"SET_ERROR",error:O.message})}},[c,u,o.skillContent]),B=N.useCallback(async O=>{try{const K=await ge.saveEvals(c,u,O);m({type:"SET_EVALS",evals:K})}catch(K){m({type:"SET_ERROR",error:K.message})}},[c,u]),Y=N.useCallback((O,K="benchmark")=>{const z=o.caseRunStates.get(O);if((z==null?void 0:z.status)!=="running")if(T.current.delete(O),g.current.delete(O),m({type:"CASE_RUN_START",caseId:O,mode:K}),K==="comparison"){const J=`/api/skills/${c}/${u}/compare`;h(O,J,{eval_ids:[O]})}else{const J=`/api/skills/${c}/${u}/benchmark/case/${O}`;h(O,J,K==="baseline"?{baseline_only:!0}:void 0)}},[c,u,o.caseRunStates,h]),V=N.useCallback((O="benchmark")=>{var J;const K=((J=o.evals)==null?void 0:J.evals)??[];if(K.length===0)return;const z=K.map(re=>re.id);for(const re of z)T.current.delete(re),g.current.delete(re);m({type:"BULK_RUN_START",caseIds:z,mode:O}),j.current=new Set(z);for(const re of z)if(O==="comparison")h(re,`/api/skills/${c}/${u}/compare`,{eval_ids:[re]});else{const k=`/api/skills/${c}/${u}/benchmark/case/${re}`;h(re,k,O==="baseline"?{baseline_only:!0}:void 0)}},[c,u,o.evals,h]),P=N.useCallback(O=>{R(O),m({type:"CASE_RUN_CANCEL",caseId:O}),j.current.delete(O),g.current.add(O)},[R]),le=N.useCallback(()=>{H(),m({type:"CANCEL_ALL"}),j.current.clear()},[H]),G=N.useCallback(async(O,K)=>{m({type:"OPEN_IMPROVE",evalId:O})},[]),ne=N.useCallback(async(O,K)=>{try{await ge.applyImprovement(c,u,K),m({type:"SET_CONTENT",content:K}),m({type:"CONTENT_SAVED"}),m({type:"CLOSE_IMPROVE"}),Y(O,"benchmark")}catch(z){m({type:"SET_ERROR",error:z.message})}},[c,u,Y]),ie=N.useCallback(async()=>{try{const O=await ge.getSkillDetail(c,u);m({type:"SET_CONTENT",content:O.skillContent}),m({type:"CONTENT_SAVED"})}catch{}},[c,u]),I=N.useCallback(async()=>{try{const O=await ge.generateEvals(c,u),K=await ge.saveEvals(c,u,O);m({type:"SET_EVALS",evals:K})}catch(O){m({type:"SET_ERROR",error:O.message})}},[c,u]),fe=Iv();N.useEffect(()=>()=>{fe.stop()},[fe.stop]),N.useEffect(()=>{if(fe.events.length)for(const O of fe.events)O.event==="prompt_result"&&m({type:"ACTIVATION_RESULT",result:O.data}),O.event==="done"&&m({type:"ACTIVATION_DONE",summary:O.data})},[fe.events]),N.useEffect(()=>{fe.error&&m({type:"ACTIVATION_ERROR",error:fe.error})},[fe.error]);const Se=N.useCallback(O=>{const z=O.trim().split(`
|
|
52
|
+
`).filter(Boolean).map(J=>J.startsWith("!")?{prompt:J.slice(1).trim(),expected:"should_not_activate"}:J.startsWith("+")?{prompt:J.slice(1).trim(),expected:"should_activate"}:{prompt:J.trim(),expected:"auto"});m({type:"ACTIVATION_START"}),fe.start(`/api/skills/${c}/${u}/activation-test`,{prompts:z})},[c,u,fe]),ee=N.useMemo(()=>({state:o,dispatch:m,saveContent:q,saveEvals:B,runCase:Y,runAll:V,cancelCase:P,cancelAll:le,improveForCase:G,applyImproveAndRerun:ne,refreshSkillContent:ie,generateEvals:I,runActivationTest:Se}),[o,q,B,Y,V,P,le,G,ne,ie,I,Se]);return s.jsx(If.Provider,{value:ee,children:f})}function ah({state:c}){const{plugin:u,skill:f,evals:o,latestBenchmark:m,isDirty:j,caseRunStates:g,regressions:T,iterationCount:b}=c,x=Array.from(g.values()).some(B=>B.status==="running"||B.status==="queued"),E=m==null?void 0:m.overall_pass_rate,h=(o==null?void 0:o.evals.reduce((B,Y)=>B+Y.assertions.length,0))??0,R=(o==null?void 0:o.evals.length)??0,H=E!=null?E>=80?"var(--green)":E>=50?"var(--yellow)":"var(--red)":"var(--text-tertiary)",q=E!=null?E>=80?"var(--green-muted)":E>=50?"var(--yellow-muted)":"var(--red-muted)":"var(--surface-3)";return s.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)",flexShrink:0},children:[s.jsxs("div",{className:"flex items-center gap-2 text-[13px]",children:[s.jsx("span",{style:{color:"var(--text-tertiary)"},children:u}),s.jsx(nh,{}),s.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:f}),j&&s.jsx("span",{className:"ml-2 text-[10px] font-semibold uppercase tracking-wider px-1.5 py-0.5 rounded",style:{background:"var(--yellow-muted)",color:"var(--yellow)"},children:"unsaved"}),x&&s.jsxs("span",{className:"ml-2 flex items-center gap-1.5 text-[11px]",style:{color:"var(--accent)"},children:[s.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}}),"Running..."]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[T.length>0&&s.jsxs("span",{className:"pill",style:{background:"var(--red-muted)",color:"var(--red)"},children:[s.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[s.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),s.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),s.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),T.length," regression",T.length>1?"s":""]}),b>0&&s.jsxs("span",{className:"pill",style:{background:"var(--purple-muted)",color:"var(--purple)"},children:["Iter ",b]}),s.jsx("span",{className:"pill",style:{background:q,color:H},children:E!=null?`${Math.round(E*100)}%`:"--"}),s.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[R," case",R!==1?"s":""," / ",h," assert",h!==1?"s":""]})]})]})}function nh(){return s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:s.jsx("polyline",{points:"9 18 15 12 9 6"})})}const sh=[{label:"Build",tabs:[{id:"editor",label:"Editor",shortcut:"1"},{id:"tests",label:"Tests",shortcut:"2"}]},{label:"Evaluate",tabs:[{id:"run",label:"Run",shortcut:"3"},{id:"activation",label:"Activation",shortcut:"4"}]},{label:"Insights",tabs:[{id:"history",label:"History",shortcut:"5"},{id:"deps",label:"Deps",shortcut:"6"}]}];function ih({id:c}){const u={width:14,height:14,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"};switch(c){case"editor":return s.jsxs("svg",{...u,children:[s.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),s.jsx("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]});case"tests":return s.jsxs("svg",{...u,children:[s.jsx("path",{d:"M9 11l3 3L22 4"}),s.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]});case"run":return s.jsx("svg",{...u,children:s.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})});case"activation":return s.jsxs("svg",{...u,children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("circle",{cx:"12",cy:"12",r:"6"}),s.jsx("circle",{cx:"12",cy:"12",r:"2"})]});case"history":return s.jsxs("svg",{...u,children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("polyline",{points:"12 6 12 12 16 14"})]});case"deps":return s.jsxs("svg",{...u,children:[s.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"}),s.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"})]})}}function rh({activePanel:c,onPanelChange:u,isDirty:f,isRunning:o,hasRegressions:m,isActivationRunning:j}){return s.jsx("div",{className:"flex items-center gap-0.5 px-3 overflow-x-auto",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)",flexShrink:0},children:sh.map((g,T)=>s.jsxs("div",{className:"flex items-center",children:[T>0&&s.jsx("div",{style:{width:1,height:20,background:"var(--border-subtle)",margin:"0 6px",flexShrink:0}}),g.tabs.map(b=>{const x=c===b.id,E=b.id==="editor"&&f||b.id==="run"&&o||b.id==="activation"&&j||b.id==="history"&&m,h=b.id==="run"||b.id==="activation"?"var(--accent)":b.id==="history"?"var(--red)":"var(--yellow)";return s.jsxs("button",{onClick:()=>u(b.id),title:`${b.label} (Ctrl+${b.shortcut})`,className:"relative flex items-center gap-1.5 px-3 py-2.5 text-[12px] font-medium transition-colors duration-150",style:{background:"transparent",color:x?"var(--text-primary)":"var(--text-tertiary)",borderBottom:x?"2px solid var(--accent)":"2px solid transparent",cursor:"pointer",border:"none",borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:x?"var(--accent)":"transparent",whiteSpace:"nowrap"},onMouseEnter:R=>{x||(R.currentTarget.style.color="var(--text-secondary)")},onMouseLeave:R=>{x||(R.currentTarget.style.color="var(--text-tertiary)")},children:[s.jsx(ih,{id:b.id}),b.label,E&&s.jsx("span",{className:"absolute top-1.5 right-1 rounded-full",style:{width:5,height:5,background:h}})]},b.id)})]},g.label))})}function ch(c){const u=c.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);if(!u)return{metadata:{},body:c};const f=u[1],o=u[2].trim(),m={},j=f.split(`
|
|
53
|
+
`);let g="",T=!1;for(const b of j){const x=b.match(/^[ \t]+([\w-]+):\s*(.*)$/);if(x&&g&&T){const R=x[1],H=x[2].trim();let q=m[g];if((typeof q!="object"||Array.isArray(q))&&(q={},m[g]=q),!H)q[R]=[];else{const B=H.match(/^\[(.+)\]$/);B?q[R]=B[1].split(",").map(Y=>Y.trim().replace(/^["']|["']$/g,"")).filter(Boolean):q[R]=H.replace(/^["']|["']$/g,"")}continue}const E=b.match(/^\s+-\s+(.+)$/);if(E&&g){T=!1;const R=m[g];Array.isArray(R)?R.push(E[1].trim().replace(/^["']|["']$/g,"")):m[g]=[E[1].trim().replace(/^["']|["']$/g,"")];continue}const h=b.match(/^([\w-]+):\s*(.*)$/);if(h){g=h[1];const R=h[2].trim();if(T=!1,!R){m[g]={},T=!0;continue}const H=R.match(/^\[(.+)\]$/);if(H){m[g]=H[1].split(",").map(q=>q.trim().replace(/^["']|["']$/g,"")).filter(Boolean);continue}m[g]=R.replace(/^["']|["']$/g,"")}}return{metadata:m,body:o}}function Pf(c){if(!c)return"";let u=uh(c);return u=u.replace(/```(\w*)\n([\s\S]*?)```/g,'<pre style="background:var(--surface-2);padding:0.75rem;border-radius:6px;overflow-x:auto;font-size:12px;line-height:1.5;margin:0.5rem 0;border:1px solid var(--border-subtle)"><code>$2</code></pre>'),u=u.replace(/^### (.+)$/gm,'<div style="font-weight:600;font-size:14px;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),u=u.replace(/^## (.+)$/gm,'<div style="font-weight:700;font-size:15px;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),u=u.replace(/^# (.+)$/gm,'<div style="font-weight:700;font-size:1rem;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),u=u.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:var(--accent);text-decoration:underline">$1</a>'),u=u.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),u=u.replace(/\*([^*]+)\*/g,"<em>$1</em>"),u=u.replace(/`([^`]+)`/g,'<code style="background:var(--surface-3);padding:0.1rem 0.3rem;border-radius:3px;font-size:0.85em">$1</code>'),u=u.replace(/^- (.+)$/gm,'<div style="padding-left:1rem;margin:0.15rem 0">• $1</div>'),u=u.replace(/^(\d+)\. (.+)$/gm,'<div style="padding-left:1rem;margin:0.15rem 0">$1. $2</div>'),u=u.replace(/\n\n/g,'<div style="height:0.5rem"></div>'),u=u.replace(/\n/g,"<br/>"),u}function uh(c){const u=c.split(`
|
|
54
|
+
`),f=[];let o=0;for(;o<u.length;)if(u[o].trim().startsWith("|")&&o+1<u.length&&u[o+1].trim().startsWith("|")&&/\|[\s-:]+\|/.test(u[o+1])){const m=Gf(u[o]);o+=2;const j=[];for(;o<u.length&&u[o].trim().startsWith("|");)j.push(Gf(u[o])),o++;const g='style="text-align:left;padding:0.4rem 0.6rem;font-weight:600;font-size:12px;color:var(--text-primary);border-bottom:1px solid var(--border-default)"',T='style="padding:0.4rem 0.6rem;font-size:12px;color:var(--text-secondary);border-bottom:1px solid var(--border-subtle)"';let b='<table style="width:100%;border-collapse:collapse;margin:0.5rem 0;border:1px solid var(--border-subtle);border-radius:6px;overflow:hidden">';b+="<thead><tr>";for(const x of m)b+=`<th ${g}>${x}</th>`;b+="</tr></thead><tbody>";for(const x of j){b+="<tr>";for(const E of x)b+=`<td ${T}>${E}</td>`;b+="</tr>"}b+="</tbody></table>",f.push(b)}else f.push(u[o]),o++;return f.join(`
|
|
55
|
+
`)}function Gf(c){return c.split("|").map(u=>u.trim()).filter(u=>u.length>0)}function em(c,u){const f=c.split(`
|
|
56
|
+
`),o=u.split(`
|
|
57
|
+
`);if(f.length>1e3||o.length>1e3)return[...f.map(E=>({type:"unchanged",content:E}))];const m=f.length,j=o.length,g=Array.from({length:m+1},()=>new Array(j+1).fill(0));for(let E=1;E<=m;E++)for(let h=1;h<=j;h++)f[E-1]===o[h-1]?g[E][h]=g[E-1][h-1]+1:g[E][h]=Math.max(g[E-1][h],g[E][h-1]);const T=[];let b=m,x=j;for(;b>0||x>0;)b>0&&x>0&&f[b-1]===o[x-1]?(T.push({type:"unchanged",content:f[b-1]}),b--,x--):x>0&&(b===0||g[b][x-1]>=g[b-1][x])?(T.push({type:"added",content:o[x-1]}),x--):(T.push({type:"removed",content:f[b-1]}),b--);return T.reverse()}function oh({plugin:c,skill:u,skillContent:f,onApplied:o}){const[m,j]=N.useState("closed"),[g,T]=N.useState(null),[b,x]=N.useState("claude-cli"),[E,h]=N.useState("opus"),[R,H]=N.useState([]),[q,B]=N.useState(""),[Y,V]=N.useState(""),[P,le]=N.useState(null),[G,ne]=N.useState(!1);N.useEffect(()=>{ge.getConfig().then(O=>{T(O),O.providers.find(z=>z.id==="claude-cli"&&z.available)&&(x("claude-cli"),h("opus"))}).catch(()=>{})},[]);function ie(){return g==null?void 0:g.providers.find(O=>O.id===b&&O.available)}async function I(){j("loading"),le(null);try{const O=await ge.improveSkill(c,u,{provider:b,model:E});B(O.improved),V(O.reasoning),H(em(O.original,O.improved)),j("diff_shown")}catch(O){le(O.message),j("open")}}async function fe(){ne(!0);try{await ge.applyImprovement(c,u,q),o(q),j("closed")}catch(O){le(O.message)}finally{ne(!1)}}function Se(){j("closed"),H([]),B(""),V(""),le(null)}if(m==="closed")return s.jsxs("button",{onClick:()=>j("open"),className:"btn btn-secondary mb-5",disabled:!f,children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),s.jsx("path",{d:"M2 17l10 5 10-5"}),s.jsx("path",{d:"M2 12l10 5 10-5"})]}),"Improve Skill"]});const ee=ie();return s.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden animate-fade-in",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[s.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:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),s.jsx("path",{d:"M2 17l10 5 10-5"}),s.jsx("path",{d:"M2 12l10 5 10-5"})]})}),s.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"AI Skill Improvement"})]}),s.jsx("button",{onClick:Se,className:"w-7 h-7 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:O=>{O.currentTarget.style.background="var(--surface-3)"},onMouseLeave:O=>{O.currentTarget.style.background="transparent"},children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),s.jsxs("div",{className:"px-5 py-4",children:[(m==="open"||m==="loading")&&s.jsxs("div",{className:"flex items-end gap-3 mb-4",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Provider"}),s.jsx("select",{className:"input-field text-[12px] py-1.5",value:b,onChange:O=>{x(O.target.value);const K=g==null?void 0:g.providers.find(z=>z.id===O.target.value);K!=null&&K.models[0]&&h(K.models[0].id)},disabled:m==="loading",children:g==null?void 0:g.providers.filter(O=>O.available).map(O=>s.jsx("option",{value:O.id,children:O.label},O.id))})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-[11px] font-medium mb-1 block",style:{color:"var(--text-tertiary)"},children:"Model"}),s.jsx("select",{className:"input-field text-[12px] py-1.5",value:E,onChange:O=>h(O.target.value),disabled:m==="loading",children:ee==null?void 0:ee.models.map(O=>s.jsx("option",{value:O.id,children:O.label},O.id))})]}),s.jsx("button",{onClick:I,disabled:m==="loading",className:"btn btn-primary flex-shrink-0",children:m==="loading"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"spinner",style:{width:12,height:12}})," Improving..."]}):"Improve"})]}),P&&s.jsx("div",{className:"mb-4 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:P}),m==="diff_shown"&&s.jsxs(s.Fragment,{children:[Y&&s.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:[s.jsx("span",{className:"font-semibold",style:{color:"#a855f7"},children:"AI Reasoning: "}),Y]}),s.jsx("div",{className:"rounded-lg overflow-hidden mb-4",style:{border:"1px solid var(--border-subtle)",maxHeight:"400px",overflowY:"auto"},children:R.map((O,K)=>s.jsxs("div",{className:"px-3 py-0.5 text-[11px] font-mono",style:{background:O.type==="added"?"rgba(34,197,94,0.1)":O.type==="removed"?"rgba(239,68,68,0.1)":"transparent",color:O.type==="added"?"var(--green)":O.type==="removed"?"var(--red)":"var(--text-secondary)",borderLeft:O.type==="added"?"3px solid var(--green)":O.type==="removed"?"3px solid var(--red)":"3px solid transparent"},children:[s.jsx("span",{style:{userSelect:"none",opacity:.5,marginRight:8},children:O.type==="added"?"+":O.type==="removed"?"-":" "}),O.content]},K))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:fe,disabled:G,className:"btn btn-primary",children:G?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"spinner",style:{width:12,height:12}})," Applying..."]}):s.jsxs(s.Fragment,{children:[s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})})," Apply"]})}),s.jsx("button",{onClick:Se,className:"btn btn-secondary",children:"Discard"})]})]})]})]})}function dh({size:c=15}){return s.jsxs("svg",{width:c,height:c,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("polyline",{points:"16 18 22 12 16 6"}),s.jsx("polyline",{points:"8 6 2 12 8 18"})]})}function fh({size:c=15}){return s.jsxs("svg",{width:c,height:c,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"3"}),s.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"21"})]})}function mh({size:c=15}){return s.jsxs("svg",{width:c,height:c,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),s.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function xh(){const{state:c,dispatch:u,saveContent:f}=Al(),{plugin:o,skill:m,skillContent:j,isDirty:g,improveTarget:T}=c,[b,x]=N.useState("split"),[E,h]=N.useState(!1),R=N.useRef(null),{metadata:H,body:q}=ch(j),B=H["allowed-tools"],Y=Array.isArray(B)?B:typeof B=="string"?[B]:[],V=H.name,P=H.description,le=H.metadata,G=typeof le=="object"&&!Array.isArray(le)?le:null,ne=H.version||(G==null?void 0:G.version),ie=H.tags||(G==null?void 0:G.tags),I=Array.isArray(ie)?ie:typeof ie=="string"?ie.split(",").map(z=>z.trim()).filter(Boolean):[],fe=new Set(["name","description","metadata","allowed-tools","version","tags"]),Se=Object.entries(H).filter(([z])=>!fe.has(z)),ee=N.useCallback(async()=>{h(!0),await f(),h(!1)},[f]),O=N.useCallback(z=>{(z.ctrlKey||z.metaKey)&&z.key==="s"&&(z.preventDefault(),z.stopPropagation(),g&&ee())},[g,ee]),K=[{mode:"raw",icon:s.jsx(dh,{}),label:"Editor"},{mode:"split",icon:s.jsx(fh,{}),label:"Split"},{mode:"preview",icon:s.jsx(mh,{}),label:"Preview"}];return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[s.jsx("div",{className:"flex items-center",style:{background:"var(--surface-2)",borderRadius:8,padding:2,gap:1},children:K.map(({mode:z,icon:J,label:re})=>s.jsxs("button",{onClick:()=>x(z),title:re,className:"flex items-center gap-1.5 rounded-md transition-all duration-150",style:{padding:"5px 10px",background:b===z?"var(--surface-4)":"transparent",color:b===z?"var(--text-primary)":"var(--text-tertiary)",fontSize:11,fontWeight:b===z?600:400,border:"none",cursor:"pointer"},children:[J,s.jsx("span",{style:{letterSpacing:"0.01em"},children:re})]},z))}),s.jsxs("div",{className:"flex items-center gap-2",children:[g&&s.jsx("button",{onClick:()=>u({type:"SET_CONTENT",content:c.savedContent}),className:"btn btn-ghost text-[11px]",style:{padding:"4px 8px"},children:"Discard"}),s.jsx("button",{onClick:ee,disabled:!g||E,className:"btn btn-primary text-[11px]",style:{padding:"5px 14px"},children:E?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner",style:{width:11,height:11,borderWidth:1.5}})," Saving..."]}):"Save"})]})]}),s.jsxs("div",{className:"flex-1 overflow-hidden",style:{display:"grid",gridTemplateColumns:b==="raw"||b==="preview"?"1fr":"1fr 1fr"},children:[b!=="preview"&&s.jsx("div",{className:"flex flex-col overflow-hidden",style:{borderRight:b==="split"?"1px solid var(--border-subtle)":"none"},children:s.jsx("textarea",{ref:R,value:j,onChange:z=>u({type:"SET_CONTENT",content:z.target.value}),onKeyDown:O,spellCheck:!1,className:"flex-1 w-full resize-none outline-none",style:{background:"var(--surface-0)",color:"var(--text-primary)",fontFamily:"var(--font-mono, 'JetBrains Mono', ui-monospace, monospace)",fontSize:12.5,lineHeight:1.7,tabSize:2,border:"none",padding:"16px 20px"}})}),b!=="raw"&&s.jsx("div",{className:"overflow-auto",style:{background:"var(--surface-0)"},children:s.jsxs("div",{className:"animate-fade-in",style:{padding:"20px 24px",maxWidth:720},children:[(V||ne||P)&&s.jsxs("div",{style:{marginBottom:20},children:[s.jsxs("div",{className:"flex items-baseline gap-3",style:{marginBottom:8},children:[V&&s.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"var(--text-primary)",letterSpacing:"-0.02em",lineHeight:1.2,margin:0},children:V}),ne&&s.jsxs("span",{style:{fontSize:10,fontWeight:600,color:"var(--accent)",background:"var(--accent-muted)",padding:"2px 7px",borderRadius:4,letterSpacing:"0.03em",fontFamily:"var(--font-mono, ui-monospace, monospace)"},children:["v",ne]})]}),P&&s.jsx("p",{style:{fontSize:12.5,lineHeight:1.65,color:"var(--text-secondary)",margin:0,paddingLeft:12,borderLeft:"2px solid var(--accent)",maxWidth:600},children:P})]}),I.length>0&&s.jsx("div",{className:"flex flex-wrap items-center gap-1.5",style:{marginBottom:16},children:I.map(z=>s.jsx("span",{style:{fontSize:10,fontWeight:500,color:"var(--text-tertiary)",background:"var(--surface-2)",padding:"3px 8px",borderRadius:4,letterSpacing:"0.02em"},children:z},z))}),Y.length>0&&s.jsx("div",{style:{marginBottom:16},children:s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.jsx("span",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--text-tertiary)",marginRight:4},children:"Tools"}),Y.map(z=>s.jsx("span",{style:{fontSize:10.5,fontFamily:"var(--font-mono, ui-monospace, monospace)",color:"var(--accent)",background:"var(--accent-muted)",padding:"2px 7px",borderRadius:4},children:z},z))]})}),Se.length>0&&s.jsx("div",{style:{marginBottom:16,padding:"8px 0",borderTop:"1px solid var(--border-subtle)",borderBottom:"1px solid var(--border-subtle)"},children:Se.map(([z,J],re)=>{const k=Array.isArray(J)?J.join(", "):typeof J=="object"?Object.entries(J).map(([Q,ae])=>`${Q}: ${Array.isArray(ae)?ae.join(", "):ae}`).join(" | "):J;return s.jsxs("div",{className:"flex items-baseline gap-3",style:{padding:"4px 0",borderTop:re>0?"1px solid var(--border-subtle)":"none"},children:[s.jsx("span",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.06em",color:"var(--text-tertiary)",minWidth:80,flexShrink:0},children:z}),s.jsx("span",{style:{fontSize:12,color:"var(--text-secondary)"},children:k})]},z)})}),(V||P||I.length>0||Y.length>0||Se.length>0)&&q&&s.jsx("div",{style:{height:1,background:"linear-gradient(90deg, var(--accent) 0%, var(--border-subtle) 40%, transparent 100%)",marginBottom:20,opacity:.5}}),q&&s.jsx("div",{className:"text-[13px] leading-relaxed overflow-x-auto",style:{color:"var(--text-secondary)",wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:Pf(q)}})]})})]}),T!==null&&o&&m&&s.jsx("div",{style:{borderTop:"1px solid var(--border-subtle)"},children:s.jsx(oh,{plugin:o,skill:m,skillContent:j,onApplied:z=>{u({type:"SET_CONTENT",content:z}),u({type:"CONTENT_SAVED"}),u({type:"CLOSE_IMPROVE"})}})})]})}function Ec(c){return c>=.8?"var(--green)":c>=.5?"var(--yellow)":"var(--red)"}function tm(c){const u=new Date(c);return u.toLocaleDateString(void 0,{month:"short",day:"numeric"})+", "+u.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function lm(c){return c==null?"--":c>=1e3?`${(c/1e3).toFixed(1)}s`:`${c}ms`}function am({entries:c}){if(c.length<2)return null;const u=80,f=24,o=2,m=c.slice().reverse(),j=m.length,g=m.map((T,b)=>{const x=o+b/(j-1)*(u-o*2),E=o+(f-o*2)-T.pass_rate*(f-o*2);return`${x},${E}`});return s.jsxs("svg",{width:u,height:f,style:{display:"block",flexShrink:0},children:[s.jsx("polyline",{points:g.join(" "),fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),g.length>0&&s.jsx("circle",{cx:parseFloat(g[g.length-1].split(",")[0]),cy:parseFloat(g[g.length-1].split(",")[1]),r:2.5,fill:"var(--accent)"})]})}function vh(){var le;const{state:c,dispatch:u,saveEvals:f,runCase:o,cancelCase:m,generateEvals:j}=Al(),{evals:g,selectedCaseId:T,inlineResults:b,caseRunStates:x}=c,[E,h]=N.useState(!1),[R,H]=N.useState(!1),q={skill_name:c.skill,evals:[]},B=g??q,Y=B.evals,V=Y.find(G=>G.id===T)??null,P=N.useCallback(async()=>{H(!0),await j(),H(!1)},[j]);return!g||Y.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 px-8",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center",style:{background:"var(--accent-muted)"},children:s.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M9 11l3 3L22 4"}),s.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]})}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-[14px] font-medium mb-1",style:{color:"var(--text-primary)"},children:"No test cases yet"}),s.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Create test cases to start evaluating your skill"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:()=>h(!0),className:"btn btn-primary text-[12px]",children:"Create Test Case"}),s.jsx("button",{onClick:P,disabled:R,className:"btn btn-secondary text-[12px]",children:R?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}})," Generating..."]}):"Generate with AI"})]}),E&&s.jsx(Qf,{evals:B,onSave:G=>{f(G),h(!1)},onCancel:()=>h(!1)})]}):s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"280px 1fr",height:"100%",overflow:"hidden"},children:[s.jsxs("div",{className:"overflow-auto",style:{borderRight:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[s.jsxs("div",{className:"px-3 py-2 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",borderBottom:"1px solid var(--border-subtle)"},children:["Test Cases (",Y.length,")"]}),s.jsx("div",{className:"py-1",children:Y.map(G=>{const ne=b.get(G.id),ie=T===G.id;return s.jsxs("button",{onClick:()=>u({type:"SELECT_CASE",caseId:G.id}),className:"w-full text-left px-3 py-2.5 transition-all duration-150",style:{background:ie?"var(--accent-muted)":"transparent",borderLeft:ie?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:I=>{ie||(I.currentTarget.style.background="var(--surface-2)")},onMouseLeave:I=>{ie||(I.currentTarget.style.background="transparent")},children:[s.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[s.jsxs("span",{className:"text-[12px] font-medium truncate",style:{color:ie?"var(--text-primary)":"var(--text-secondary)"},children:["#",G.id," ",G.name]}),s.jsx(nm,{result:ne})]}),s.jsxs("div",{className:"text-[11px] flex items-center gap-2",style:{color:"var(--text-tertiary)"},children:[G.assertions.length," assertion",G.assertions.length!==1?"s":"",(ne==null?void 0:ne.passRate)!=null&&s.jsx(yh,{passRate:ne.passRate})]})]},G.id)})}),s.jsx("div",{className:"px-3 py-2",children:s.jsx("button",{onClick:()=>h(!0),className:"w-full py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{border:"1px dashed var(--border-default)",color:"var(--text-tertiary)",background:"transparent"},onMouseEnter:G=>{G.currentTarget.style.borderColor="var(--accent)",G.currentTarget.style.color="var(--accent)"},onMouseLeave:G=>{G.currentTarget.style.borderColor="var(--border-default)",G.currentTarget.style.color="var(--text-tertiary)"},children:"+ Add Test Case"})})]}),s.jsx("div",{className:"overflow-auto",children:V?s.jsx(hh,{evalCase:V,result:b.get(V.id),evals:g,caseStatus:((le=x.get(V.id))==null?void 0:le.status)??"idle",onSaveEvals:f,onRun:G=>o(G,"benchmark"),onCompare:G=>o(G,"comparison"),onCancel:G=>m(G),onImprove:G=>u({type:"OPEN_IMPROVE",evalId:G})}):s.jsx("div",{className:"flex items-center justify-center h-full text-[13px]",style:{color:"var(--text-tertiary)"},children:"Select a test case"})}),E&&s.jsx(Qf,{evals:B,onSave:G=>{f(G),h(!1)},onCancel:()=>h(!1)})]})}function hh({evalCase:c,result:u,evals:f,caseStatus:o,onSaveEvals:m,onRun:j,onCompare:g,onCancel:T,onImprove:b}){const[x,E]=N.useState(!1),[h,R]=N.useState(c.prompt),[H,q]=N.useState(!1),[B,Y]=N.useState(c.expected_output);N.useState(()=>{R(c.prompt),Y(c.expected_output)});const V=N.useCallback(ee=>{m({...f,evals:f.evals.map(O=>O.id===ee.id?ee:O)})},[f,m]),P=N.useCallback(()=>{V({...c,prompt:h}),E(!1)},[c,h,V]),le=N.useCallback(()=>{V({...c,expected_output:B}),q(!1)},[c,B,V]),G=N.useCallback(()=>{V({...c,assertions:[...c.assertions,{id:`assert-${Date.now()}`,text:"New assertion",type:"boolean"}]})},[c,V]),ne=N.useCallback((ee,O)=>{V({...c,assertions:c.assertions.map(K=>K.id===ee?{...K,text:O}:K)})},[c,V]),ie=N.useCallback(ee=>{V({...c,assertions:c.assertions.filter(O=>O.id!==ee)})},[c,V]),I=N.useCallback(()=>{confirm("Delete this test case?")&&m({...f,evals:f.evals.filter(ee=>ee.id!==c.id)})},[f,c.id,m]),fe=u&&u.assertions.length>0&&u.assertions.every(ee=>ee.pass),Se=u&&u.assertions.some(ee=>!ee.pass);return s.jsxs("div",{className:"p-5 animate-fade-in",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-[16px] font-semibold",style:{color:"var(--text-primary)"},children:["#",c.id," ",c.name]}),s.jsx(nm,{result:u})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[o==="running"||o==="queued"?s.jsxs("button",{onClick:()=>T(c.id),className:"btn text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:4},children:s.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1"})}),"Cancel"]}):s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>j(c.id),className:"btn btn-primary text-[12px]",children:"Run"}),s.jsx("button",{onClick:()=>g(c.id),className:"btn btn-purple text-[12px]",children:"A/B Compare"})]}),Se&&o!=="running"&&o!=="queued"&&s.jsx("button",{onClick:()=>b(c.id),className:"btn btn-secondary text-[12px]",children:"Fix with AI"}),o!=="running"&&o!=="queued"&&s.jsx("button",{onClick:I,className:"btn btn-ghost text-[12px]",style:{color:"var(--red)"},children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("polyline",{points:"3 6 5 6 21 6"}),s.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})]}),fe&&s.jsxs("div",{className:"mb-4 px-4 py-3 rounded-xl flex items-center gap-3",style:{background:"var(--green-muted)",border:"1px solid rgba(52, 211, 153, 0.2)"},children:[s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"2.5",children:[s.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),s.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),s.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--green)"},children:"All assertions passing"})]}),s.jsx(yc,{title:"Prompt",children:x?s.jsxs("div",{children:[s.jsx("textarea",{value:h,onChange:ee=>R(ee.target.value),className:"input-field w-full",rows:4,style:{fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:12},autoFocus:!0}),s.jsxs("div",{className:"flex gap-2 mt-2",children:[s.jsx("button",{onClick:P,className:"btn btn-primary text-[12px]",children:"Save"}),s.jsx("button",{onClick:()=>{R(c.prompt),E(!1)},className:"btn btn-ghost text-[12px]",children:"Cancel"})]})]}):s.jsx("div",{className:"p-3 rounded-lg text-[12px] cursor-pointer transition-all duration-150",style:{background:"var(--surface-2)",color:"var(--text-secondary)",fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap",border:"1px solid var(--border-subtle)"},onClick:()=>E(!0),onMouseEnter:ee=>{ee.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:ee=>{ee.currentTarget.style.borderColor="var(--border-subtle)"},children:c.prompt||s.jsx("span",{style:{color:"var(--text-tertiary)",fontStyle:"italic"},children:"Click to edit prompt..."})})}),s.jsx(yc,{title:"Expected Output",children:H?s.jsxs("div",{children:[s.jsx("textarea",{value:B,onChange:ee=>Y(ee.target.value),className:"input-field w-full",rows:3,style:{fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:12},autoFocus:!0}),s.jsxs("div",{className:"flex gap-2 mt-2",children:[s.jsx("button",{onClick:le,className:"btn btn-primary text-[12px]",children:"Save"}),s.jsx("button",{onClick:()=>{Y(c.expected_output),q(!1)},className:"btn btn-ghost text-[12px]",children:"Cancel"})]})]}):s.jsx("div",{className:"p-3 rounded-lg text-[12px] cursor-pointer transition-all duration-150",style:{background:"var(--surface-2)",color:"var(--text-tertiary)",fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap",border:"1px solid var(--border-subtle)"},onClick:()=>q(!0),onMouseEnter:ee=>{ee.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:ee=>{ee.currentTarget.style.borderColor="var(--border-subtle)"},children:c.expected_output||s.jsx("span",{style:{fontStyle:"italic"},children:"Click to edit expected output..."})})}),s.jsx(yc,{title:`Assertions (${c.assertions.length})`,action:s.jsx("button",{onClick:G,className:"btn btn-ghost text-[11px]",children:"+ Add"}),children:c.assertions.length===0?s.jsx("div",{className:"text-[12px] text-center py-4",style:{color:"var(--text-tertiary)"},children:'No assertions. Click "+ Add" to create one.'}):s.jsx("div",{className:"space-y-2",children:c.assertions.map(ee=>{const O=u==null?void 0:u.assertions.find(K=>K.assertion_id===ee.id);return s.jsx(ph,{assertion:ee,result:O,onUpdate:K=>ne(ee.id,K),onDelete:()=>ie(ee.id)},ee.id)})})}),(u==null?void 0:u.output)&&s.jsx(gh,{output:u.output,durationMs:u.durationMs,tokens:u.tokens}),s.jsx(bh,{evalId:c.id})]},c.id)}function ph({assertion:c,result:u,onUpdate:f,onDelete:o}){const[m,j]=N.useState(!1),[g,T]=N.useState(c.text),[b,x]=N.useState(!1),E=()=>{f(g),j(!1)};return s.jsx("div",{className:"rounded-lg px-3 py-2.5 transition-all duration-150",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:s.jsxs("div",{className:"flex items-start gap-2",children:[u?s.jsx("span",{className:"mt-0.5 rounded-full flex-shrink-0",style:{width:18,height:18,display:"flex",alignItems:"center",justifyContent:"center",background:u.pass?"var(--green-muted)":"var(--red-muted)"},children:u.pass?s.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"3",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})}):s.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"3",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):s.jsx("span",{className:"mt-0.5 w-[18px] h-[18px] rounded-full flex-shrink-0",style:{background:"var(--surface-4)"}}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"flex items-center gap-2 mb-0.5",children:s.jsx("span",{className:"text-[10px] font-mono font-semibold",style:{color:"var(--text-tertiary)"},children:c.id})}),m?s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{value:g,onChange:h=>T(h.target.value),onKeyDown:h=>{h.key==="Enter"&&E(),h.key==="Escape"&&j(!1)},className:"input-field flex-1 text-[12px]",autoFocus:!0}),s.jsx("button",{onClick:E,className:"btn btn-primary text-[11px]",children:"Save"})]}):s.jsx("div",{className:"text-[12px] cursor-pointer",style:{color:"var(--text-secondary)"},onClick:()=>{T(c.text),j(!0)},children:c.text}),(u==null?void 0:u.reasoning)&&s.jsx("button",{onClick:()=>x(!b),className:"text-[11px] mt-1 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:b?"Hide reasoning":"Show reasoning"}),b&&(u==null?void 0:u.reasoning)&&s.jsx("div",{className:"mt-1 text-[11px] p-2 rounded",style:{background:"var(--surface-1)",color:"var(--text-tertiary)"},children:u.reasoning})]}),s.jsx("button",{onClick:o,className:"btn btn-ghost p-1 opacity-0 group-hover:opacity-100",style:{color:"var(--text-tertiary)"},onMouseEnter:h=>{h.currentTarget.style.color="var(--red)",h.currentTarget.style.opacity="1"},onMouseLeave:h=>{h.currentTarget.style.color="var(--text-tertiary)",h.currentTarget.style.opacity=""},children:s.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})}function yc({title:c,action:u,children:f}){return s.jsxs("div",{className:"mb-5",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:c}),u]}),f]})}function nm({result:c}){if(!c||c.status==null)return s.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:"--"});const u=c.status==="pass";return s.jsx("span",{className:"pill text-[10px]",style:{background:u?"var(--green-muted)":"var(--red-muted)",color:u?"var(--green)":"var(--red)"},children:c.passRate!=null?`${Math.round(c.passRate*100)}%`:c.status})}function yh({passRate:c}){const u=Math.round(c*100);return s.jsx("div",{className:"flex items-center gap-1",children:s.jsx("div",{className:"rounded-full overflow-hidden",style:{width:32,height:4,background:"var(--surface-4)"},children:s.jsx("div",{className:"h-full rounded-full",style:{width:`${u}%`,background:u>=80?"var(--green)":u>=50?"var(--yellow)":"var(--red)"}})})})}function gh({output:c,durationMs:u,tokens:f}){const[o,m]=N.useState(!1);return s.jsxs("div",{className:"mb-5",children:[s.jsxs("button",{onClick:()=>m(!o),className:"flex items-center gap-2 text-[11px] font-semibold uppercase tracking-wider mb-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:o?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease"},children:s.jsx("polyline",{points:"9 18 15 12 9 6"})}),"LLM Output",u!=null&&s.jsxs("span",{style:{fontWeight:400},children:["(",(u/1e3).toFixed(1),"s)"]}),f!=null&&s.jsxs("span",{style:{fontWeight:400},children:["(",f," tokens)"]})]}),o&&s.jsx("pre",{className:"text-[12px] p-4 rounded-lg overflow-auto animate-fade-in",style:{background:"var(--surface-1)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",maxHeight:400,fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:c})]})}function bh({evalId:c}){const{state:u,dispatch:f}=Al(),{plugin:o,skill:m}=u,[j,g]=N.useState(!0),[T,b]=N.useState(!1),[x,E]=N.useState({}),h=x[c]??null,R=N.useCallback(async B=>{b(!0);try{const Y=await ge.getCaseHistory(o,m,B);E(V=>({...V,[B]:Y}))}catch{E(Y=>({...Y,[B]:[]}))}finally{b(!1)}},[o,m]);N.useEffect(()=>{j&&!x[c]&&R(c)},[c,o,m]);const H=N.useCallback(()=>{const B=!j;g(B),B&&!x[c]&&R(c)},[j,c,x,R]),q=h?h.slice(0,10):[];return s.jsxs("div",{className:"mb-5",children:[s.jsxs("button",{onClick:H,className:"flex items-center gap-2 text-[11px] font-semibold uppercase tracking-wider mb-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:j?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease"},children:s.jsx("polyline",{points:"9 18 15 12 9 6"})}),"Execution History",h&&h.length>0&&s.jsxs("span",{style:{fontWeight:400},children:["(",h.length," run",h.length!==1?"s":"",")"]})]}),j&&s.jsx("div",{className:"animate-fade-in",children:T?s.jsxs("div",{className:"flex items-center gap-2 py-3",children:[s.jsx("div",{className:"spinner",style:{width:14,height:14,borderWidth:1.5}}),s.jsx("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading history..."})]}):!h||h.length===0?s.jsx("div",{className:"text-[12px] py-3",style:{color:"var(--text-tertiary)"},children:"No history for this case"}):s.jsxs("div",{children:[q.length>=2&&s.jsx("div",{className:"mb-2",children:s.jsx(am,{entries:q})}),s.jsx("div",{className:"space-y-2",children:q.map((B,Y)=>s.jsxs("div",{className:"rounded-lg px-3 py-2.5",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[s.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:tm(B.timestamp)}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:B.model}),s.jsx("span",{className:"pill",style:{fontSize:9,padding:"1px 6px",background:B.type==="benchmark"?"rgba(99,131,255,0.15)":B.type==="comparison"?"var(--purple-muted)":"rgba(251,146,60,0.15)",color:B.type==="benchmark"?"#6383ff":B.type==="comparison"?"var(--purple)":"#fb923c"},children:B.type}),s.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:Ec(B.pass_rate)},children:[Math.round(B.pass_rate*100),"%"]})]}),s.jsxs("div",{className:"flex items-center gap-4 mb-1.5 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[B.durationMs!=null&&s.jsx("span",{children:lm(B.durationMs)}),B.tokens!=null&&s.jsxs("span",{children:[B.tokens>=1e3?`${(B.tokens/1e3).toFixed(1)}k`:B.tokens," tok"]})]}),s.jsx("div",{className:"space-y-0.5",children:B.assertions.map(V=>s.jsxs("div",{className:"flex items-start gap-1.5",children:[s.jsx("span",{className:"mt-0.5 rounded-full flex-shrink-0",style:{width:14,height:14,display:"flex",alignItems:"center",justifyContent:"center",background:V.pass?"var(--green-muted)":"var(--red-muted)"},children:V.pass?s.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"3",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})}):s.jsxs("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"3",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:V.text})]},V.id))})]},Y))}),s.jsx("button",{onClick:()=>f({type:"SET_PANEL",panel:"history"}),className:"mt-2 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--accent)"},onMouseEnter:B=>{B.currentTarget.style.textDecoration="underline"},onMouseLeave:B=>{B.currentTarget.style.textDecoration="none"},children:"View full history →"})]})})]})}function Qf({evals:c,onSave:u,onCancel:f}){const[o,m]=N.useState(""),[j,g]=N.useState(""),[T,b]=N.useState(""),[x,E]=N.useState([{id:`assert-${Date.now()}`,text:"",type:"boolean"}]),h=Math.max(0,...c.evals.map(H=>H.id))+1,R=()=>{if(!o.trim()||!j.trim())return;const H={id:h,name:o.trim(),prompt:j.trim(),expected_output:T.trim(),files:[],assertions:x.filter(q=>q.text.trim())};u({...c,evals:[...c.evals,H]})};return s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center animate-overlay-in",style:{background:"rgba(0,0,0,0.6)"},children:s.jsxs("div",{className:"w-full max-w-lg rounded-xl p-6 animate-modal-in",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"text-[15px] font-semibold mb-4",style:{color:"var(--text-primary)"},children:"New Test Case"}),s.jsxs("label",{className:"block mb-3",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Name"}),s.jsx("input",{value:o,onChange:H=>m(H.target.value),className:"input-field",placeholder:"e.g., auth-check",autoFocus:!0})]}),s.jsxs("label",{className:"block mb-3",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Prompt"}),s.jsx("textarea",{value:j,onChange:H=>g(H.target.value),className:"input-field",rows:3,placeholder:"User prompt to test..."})]}),s.jsxs("label",{className:"block mb-3",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Expected Output"}),s.jsx("textarea",{value:T,onChange:H=>b(H.target.value),className:"input-field",rows:2,placeholder:"Description of expected behavior..."})]}),s.jsxs("div",{className:"mb-4",children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Assertions"}),x.map((H,q)=>s.jsxs("div",{className:"flex gap-2 mb-2",children:[s.jsx("input",{value:H.text,onChange:B=>E(x.map((Y,V)=>V===q?{...Y,text:B.target.value}:Y)),className:"input-field flex-1 text-[12px]",placeholder:"e.g., Output includes a greeting"}),x.length>1&&s.jsx("button",{onClick:()=>E(x.filter((B,Y)=>Y!==q)),className:"btn btn-ghost p-1",style:{color:"var(--text-tertiary)"},children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},H.id)),s.jsx("button",{onClick:()=>E([...x,{id:`assert-${Date.now()}`,text:"",type:"boolean"}]),className:"text-[11px] mt-1 transition-colors duration-150",style:{color:"var(--accent)"},children:"+ Add Assertion"})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{onClick:f,className:"btn btn-secondary text-[12px]",children:"Cancel"}),s.jsx("button",{onClick:R,disabled:!o.trim()||!j.trim(),className:"btn btn-primary text-[12px]",children:"Save"})]})]})})}function jh(){const{state:c,runCase:u,runAll:f,cancelCase:o,cancelAll:m}=Al(),{evals:j,caseRunStates:g,bulkRunActive:T,runMode:b,latestBenchmark:x,inlineResults:E}=c,h=(j==null?void 0:j.evals)??[],R=N.useMemo(()=>{for(const B of g.values())if(B.status==="running"||B.status==="queued")return!0;return!1},[g]),H=h.filter(B=>{const Y=g.get(B.id);return Y&&(Y.status==="complete"||Y.status==="error"||Y.status==="cancelled")}).length,q=h.filter(B=>{const Y=g.get(B.id);return Y&&(Y.status==="running"||Y.status==="queued")}).length;return s.jsxs("div",{className:"p-5",children:[s.jsxs("div",{className:"rounded-xl p-4 mb-5",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Benchmark"}),R&&s.jsxs("span",{className:"text-[11px] font-medium",style:{color:"var(--accent)"},children:[q," running"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[R&&s.jsxs("button",{onClick:m,className:"btn text-[12px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"currentColor",style:{marginRight:4},children:s.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"1"})}),"Cancel All"]}),s.jsx("button",{onClick:()=>f("comparison"),disabled:h.length===0||R,className:"btn btn-primary text-[12px]",children:"Compare All"}),s.jsx("button",{onClick:()=>f("benchmark"),disabled:h.length===0||R,className:"btn btn-secondary text-[12px]",children:"Skill Only"}),s.jsx("button",{onClick:()=>f("baseline"),disabled:h.length===0||R,className:"btn btn-secondary text-[12px]",children:"Baseline Only"})]})]}),R&&h.length>0&&s.jsxs("div",{className:"mb-5",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("span",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:["Progress: ",H,"/",h.length," cases"]}),s.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[Math.round(H/h.length*100),"%"]})]}),s.jsx("div",{className:"rounded-full overflow-hidden",style:{height:6,background:"var(--surface-3)"},children:s.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${H/h.length*100}%`,background:"var(--accent)"}})})]}),s.jsx("div",{className:"space-y-3 stagger-children",children:h.map(B=>{var P;const Y=E.get(B.id),V=((P=g.get(B.id))==null?void 0:P.status)??"idle";return s.jsx(Nh,{name:B.name,evalId:B.id,result:Y,caseStatus:V,runMode:b,onRun:le=>u(le,"benchmark"),onBaseline:le=>u(le,"baseline"),onCompare:le=>u(le,"comparison"),onCancel:le=>o(le)},B.id)})}),!R&&x&&x.cases.length>0&&s.jsxs("div",{className:"mt-5",children:[s.jsxs("div",{className:"rounded-xl p-4 mb-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Overall Pass Rate"}),s.jsx("span",{className:"text-[20px] font-bold",style:{color:(x.overall_pass_rate??0)>=.8?"var(--green)":(x.overall_pass_rate??0)>=.5?"var(--yellow)":"var(--red)"},children:x.overall_pass_rate!=null?`${Math.round(x.overall_pass_rate*100)}%`:"--"})]}),x.totalDurationMs!=null&&s.jsxs("div",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:["Total: ",(x.totalDurationMs/1e3).toFixed(1),"s",x.model&&` | Model: ${x.model}`]})]}),x.comparison&&s.jsxs("div",{className:"rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"Skill vs Baseline"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx(Xf,{label:"Skill",value:x.comparison.skillPassRate,color:"var(--accent)"}),s.jsx(Xf,{label:"Baseline",value:x.comparison.baselinePassRate,color:"var(--text-tertiary)"})]}),s.jsxs("div",{className:"mt-3 text-[12px] font-medium",style:{color:x.comparison.delta>0?"var(--green)":x.comparison.delta<0?"var(--red)":"var(--text-tertiary)"},children:["Delta: ",x.comparison.delta>0?"+":"",(x.comparison.delta*100).toFixed(1),"%",x.verdict&&` | ${x.verdict}`]})]})]})]})}const Sh={benchmark:{label:"Skill",bg:"var(--accent-muted)",color:"var(--accent)"},baseline:{label:"Baseline",bg:"var(--surface-3)",color:"var(--text-tertiary)"},comparison:{label:"Compare",bg:"rgba(168,85,247,0.12)",color:"rgb(168,85,247)"}};function Nh({name:c,evalId:u,result:f,caseStatus:o,runMode:m,onRun:j,onBaseline:g,onCompare:T,onCancel:b}){const[x,E]=N.useState(!1),h=o==="running"||o==="queued",R=o==="complete"||o==="error";return s.jsxs("div",{className:"rounded-xl overflow-hidden transition-all duration-200",style:{background:"var(--surface-1)",border:h?"1px solid var(--accent)":"1px solid var(--border-subtle)",boxShadow:h?"0 0 12px rgba(99, 131, 255, 0.15)":"none"},children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[o==="running"&&s.jsx("span",{className:"spinner",style:{width:14,height:14,borderWidth:1.5}}),o==="queued"&&s.jsx("span",{className:"text-[10px] font-medium",style:{color:"var(--text-tertiary)"},children:"queued"}),s.jsxs("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:["#",u," ",c]}),m&&(h||R)&&(()=>{const H=Sh[m];return H?s.jsx("span",{className:"pill text-[9px] font-semibold",style:{background:H.bg,color:H.color,padding:"1px 6px"},children:H.label}):null})()]}),s.jsxs("div",{className:"flex items-center gap-2",children:[h?s.jsx("button",{onClick:()=>b(u),className:"btn text-[10px] px-2 py-1",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(239,68,68,0.3)"},children:"Cancel"}):s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>T(u),className:"btn btn-primary text-[10px] px-2 py-1",children:"Compare"}),s.jsx("button",{onClick:()=>j(u),className:"btn btn-secondary text-[10px] px-2 py-1",children:"Skill"}),s.jsx("button",{onClick:()=>g(u),className:"btn btn-secondary text-[10px] px-2 py-1",children:"Base"})]}),f&&f.status!=null&&s.jsx("span",{className:"pill text-[10px]",style:{background:f.status==="pass"?"var(--green-muted)":(f.status==="error","var(--red-muted)"),color:f.status==="pass"?"var(--green)":"var(--red)"},children:f.passRate!=null?`${Math.round(f.passRate*100)}%`:f.status}),o==="cancelled"&&s.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:"cancelled"})]})]}),f&&f.assertions.length>0&&s.jsxs("div",{className:"px-4 pb-3",children:[s.jsx("div",{className:"space-y-1",children:f.assertions.map(H=>s.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[s.jsx("span",{style:{color:H.pass?"var(--green)":"var(--red)"},children:H.pass?"PASS":"FAIL"}),s.jsx("span",{style:{color:"var(--text-secondary)"},children:H.text})]},H.assertion_id))}),f.output&&s.jsx("button",{onClick:()=>E(!x),className:"text-[11px] mt-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:x?"Hide output":"Show output"}),x&&f.output&&s.jsx("pre",{className:"text-[11px] mt-2 p-3 rounded-lg overflow-auto",style:{background:"var(--surface-0)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",maxHeight:200,fontFamily:"var(--font-mono, ui-monospace, monospace)",whiteSpace:"pre-wrap"},children:f.output})]}),f&&f.errorMessage&&s.jsx("div",{className:"px-4 pb-3",children:s.jsx("div",{className:"text-[11px] p-2 rounded-lg",style:{background:"var(--red-muted)",color:"var(--red)"},children:f.errorMessage})})]})}function Xf({label:c,value:u,color:f}){return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:c}),s.jsxs("span",{className:"text-[12px] font-semibold",style:{color:f},children:[Math.round(u*100),"%"]})]}),s.jsx("div",{className:"rounded-full overflow-hidden",style:{height:6,background:"var(--surface-3)"},children:s.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${u*100}%`,background:f}})})]})}const Vf={TP:{bg:"var(--green-muted)",text:"var(--green)"},TN:{bg:"rgba(52,211,153,0.06)",text:"rgba(52,211,153,0.6)"},FP:{bg:"var(--red-muted)",text:"var(--red)"},FN:{bg:"rgba(248,113,113,0.06)",text:"rgba(248,113,113,0.6)"}},Eh=[{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 Th(){const{state:c,dispatch:u,runActivationTest:f}=Al(),{plugin:o,skill:m,activationPrompts:j,activationResults:g,activationSummary:T,activationRunning:b,activationError:x}=c,[E,h]=N.useState(j),[R,H]=N.useState(null),[q,B]=N.useState(!1);N.useEffect(()=>{u({type:"SET_ACTIVATION_PROMPTS",prompts:E})},[E,u]),N.useEffect(()=>{fetch(`/api/skills/${o}/${m}/description`).then(G=>G.json()).then(G=>H(G.rawContent||G.description||null)).catch(()=>H(null))},[o,m]);function Y(){f(E)}function V(G){const ne=E.trim(),ie=ne?`${ne}
|
|
58
|
+
${G.join(`
|
|
59
|
+
`)}`:G.join(`
|
|
60
|
+
`);h(ie)}const P=g.filter(G=>G.classification==="TP"||G.classification==="TN"),le=g.filter(G=>G.classification==="FP"||G.classification==="FN");return s.jsxs("div",{className:"p-5",children:[s.jsxs("div",{className:"mb-5",children:[s.jsx("div",{className:"text-[14px] font-semibold",style:{color:"var(--text-primary)"},children:"Activation Test"}),s.jsx("div",{className:"text-[12px] mt-1",style:{color:"var(--text-tertiary)"},children:"Test whether this skill's description activates for relevant prompts and stays silent for irrelevant ones."})]}),s.jsxs("div",{className:"grid grid-cols-5 gap-4 mb-5",children:[s.jsxs("div",{className:"col-span-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsx("label",{className:"text-[12px] font-medium",style:{color:"var(--text-secondary)"},children:"Test Prompts"}),s.jsx("div",{className:"flex gap-1.5",children:Eh.map(G=>s.jsxs("button",{onClick:()=>V(G.prompts),className:"text-[10px] px-2 py-1 rounded-md transition-colors duration-150",style:{background:"var(--surface-2)",color:"var(--text-tertiary)"},onMouseEnter:ne=>{ne.currentTarget.style.color="var(--text-primary)",ne.currentTarget.style.background="var(--surface-3)"},onMouseLeave:ne=>{ne.currentTarget.style.color="var(--text-tertiary)",ne.currentTarget.style.background="var(--surface-2)"},children:["+ ",G.label]},G.label))})]}),s.jsx("textarea",{className:"input-field h-32 resize-y font-mono text-[12px]",value:E,onChange:G=>h(G.target.value),placeholder:`How do I write a unit test?
|
|
61
|
+
What edge cases should I test?
|
|
62
|
+
+Deploy this to production
|
|
63
|
+
!What's the weather like today?
|
|
64
|
+
!Write me a poem about flowers`}),s.jsxs("div",{className:"flex items-center gap-4 mt-1.5 text-[11px]",style:{color:"var(--text-tertiary)"},children:[s.jsx("span",{children:"One prompt per line"}),s.jsx("span",{children:"No prefix = auto-classify"}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("code",{className:"px-1 rounded",style:{background:"var(--surface-2)"},children:"+"})," = must activate"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("code",{className:"px-1 rounded",style:{background:"var(--surface-2)"},children:"!"})," = must NOT activate"]}),s.jsxs("span",{children:[E.trim().split(`
|
|
65
|
+
`).filter(Boolean).length," prompt",E.trim().split(`
|
|
66
|
+
`).filter(Boolean).length!==1?"s":""]})]})]}),s.jsx("div",{className:"col-span-2 flex flex-col",children:s.jsxs("div",{className:`glass-card flex flex-col ${q?"flex-1":""}`,children:[s.jsxs("button",{onClick:()=>B(!q),className:"w-full p-3 flex items-center justify-between text-left flex-shrink-0",style:{borderBottom:q?"1px solid var(--border-subtle)":void 0},children:[s.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Skill Description"}),s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:q?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:s.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),q&&R&&s.jsx("div",{className:"p-3 flex-1 overflow-auto animate-fade-in",style:{maxHeight:320},children:s.jsx("div",{className:"text-[12px] leading-relaxed",style:{color:"var(--text-secondary)"},dangerouslySetInnerHTML:{__html:Pf(R)}})}),!q&&R&&s.jsx("div",{className:"px-3 pb-3 pt-1",children:s.jsx("div",{className:"text-[11px] line-clamp-2 leading-relaxed",style:{color:"var(--text-tertiary)"},children:R.replace(/^---[\s\S]*?---\s*/,"").trim().slice(0,150)})})]})})]}),s.jsx("button",{onClick:Y,disabled:b||!E.trim(),className:"btn btn-primary mb-5",children:b?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"spinner",style:{borderTopColor:"#fff",borderColor:"rgba(255,255,255,0.2)",width:14,height:14}})," Testing..."]}):s.jsxs(s.Fragment,{children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("circle",{cx:"12",cy:"12",r:"6"}),s.jsx("circle",{cx:"12",cy:"12",r:"2"})]})," Run Activation Test"]})}),x&&s.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:x}),g.length>0&&s.jsxs("div",{className:"space-y-5 mb-5",children:[le.length>0&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),s.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),s.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--red)"},children:["Incorrect (",le.length,")"]}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:"— These need attention"})]}),s.jsx("div",{className:"space-y-1.5 stagger-children",children:le.map((G,ne)=>s.jsx(Zf,{result:G},`incorrect-${ne}`))})]}),P.length>0&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("polyline",{points:"16 10 11 15 8 12"})]}),s.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--green)"},children:["Correct (",P.length,")"]})]}),s.jsx("div",{className:"space-y-1.5 stagger-children",children:P.map((G,ne)=>s.jsx(Zf,{result:G},`correct-${ne}`))})]})]}),T&&s.jsxs("div",{className:"glass-card p-6 animate-fade-in-scale",style:{borderColor:"var(--border-active)",borderWidth:2},children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-2",style:{color:"var(--text-tertiary)"},children:"Summary"}),T.autoClassifiedCount!=null&&T.autoClassifiedCount>0&&s.jsxs("div",{className:"text-[11px] mb-3",style:{color:"var(--text-tertiary)"},children:[T.autoClassifiedCount," of ",T.total," prompts auto-classified from skill name and tags"]}),s.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-5",children:[s.jsx(gc,{label:"Precision",value:T.precision,description:"Of all activations, how many were correct?",detail:`${T.tp} true / ${T.tp+T.fp} total activations`}),s.jsx(gc,{label:"Recall",value:T.recall,description:"Of expected activations, how many fired?",detail:`${T.tp} activated / ${T.tp+T.fn} expected`}),s.jsx(gc,{label:"Reliability",value:T.reliability,description:"Overall correct classification rate",detail:`${T.tp+T.tn} correct / ${T.total} total`})]}),s.jsxs("div",{className:"pt-4",style:{borderTop:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest mb-3 text-center",style:{color:"var(--text-tertiary)"},children:"Confusion Matrix"}),s.jsxs("div",{className:"grid grid-cols-2 gap-2 max-w-xs mx-auto",children:[s.jsx(Zs,{label:"True Positive",abbr:"TP",count:T.tp,bg:"var(--green-muted)",color:"var(--green)",description:"Correctly activated"}),s.jsx(Zs,{label:"False Positive",abbr:"FP",count:T.fp,bg:"var(--red-muted)",color:"var(--red)",description:"Wrongly activated"}),s.jsx(Zs,{label:"False Negative",abbr:"FN",count:T.fn,bg:"rgba(248,113,113,0.06)",color:"rgba(248,113,113,0.6)",description:"Missed activation"}),s.jsx(Zs,{label:"True Negative",abbr:"TN",count:T.tn,bg:"rgba(52,211,153,0.06)",color:"rgba(52,211,153,0.6)",description:"Correctly silent"})]})]})]}),b&&g.length===0&&s.jsxs("div",{className:"text-center py-16 animate-fade-in",children:[s.jsx("div",{className:"spinner-lg mx-auto mb-4"}),s.jsx("p",{className:"text-[14px]",style:{color:"var(--text-secondary)"},children:"Testing activation against skill description..."})]})]})}function Zf({result:c}){const u=Vf[c.classification]||Vf.FN,f=c.classification==="TP"||c.classification==="TN";return s.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-xl transition-all duration-200",style:{background:u.bg,border:"1px solid transparent"},children:[s.jsx("div",{className:"flex-shrink-0 mt-0.5",children:s.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:`color-mix(in srgb, ${u.text} 20%, transparent)`},children:f?s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:u.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})}):s.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:u.text,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:c.prompt})}),s.jsxs("div",{className:"flex items-center gap-3 text-[12px]",children:[s.jsx("span",{className:"pill",style:{background:"rgba(0,0,0,0.1)",color:u.text,fontWeight:700,fontSize:"10px",padding:"1px 6px"},children:c.classification}),s.jsx("span",{style:{color:c.activate?"var(--green)":"var(--text-tertiary)"},children:c.activate?"Activated":"Silent"}),s.jsxs("span",{style:{color:"var(--text-tertiary)"},children:["Expected: ",c.expected==="should_activate"?"activate":"stay silent"]}),s.jsxs("span",{style:{color:"var(--text-tertiary)"},children:[c.confidence," confidence"]}),c.autoClassified&&s.jsx("span",{className:"pill",style:{background:"rgba(139,92,246,0.1)",color:"rgba(139,92,246,0.8)",fontSize:"9px",padding:"1px 5px"},children:"auto"})]}),c.reasoning&&s.jsx("div",{className:"text-[11px] mt-1.5",style:{color:"var(--text-tertiary)"},children:c.reasoning})]})]})}function gc({label:c,value:u,description:f,detail:o}){const m=Math.round(u*100),j=m>=80?"var(--green)":m>=60?"var(--yellow)":"var(--red)";return s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"text-[28px] font-bold tracking-tight",style:{color:j},children:[m,"%"]}),s.jsx("div",{className:"text-[12px] font-medium mt-0.5",style:{color:"var(--text-secondary)"},children:c}),s.jsx("div",{className:"text-[10px] mt-1",style:{color:"var(--text-tertiary)"},children:f}),s.jsx("div",{className:"text-[10px] mt-0.5 font-mono",style:{color:"var(--text-tertiary)"},children:o})]})}function Zs({abbr:c,count:u,bg:f,color:o,description:m}){return s.jsxs("div",{className:"text-center p-3 rounded-lg",style:{background:f},children:[s.jsx("div",{className:"text-[20px] font-bold",style:{color:o},children:u}),s.jsx("div",{className:"text-[11px] font-semibold",style:{color:o},children:c}),s.jsx("div",{className:"text-[9px] mt-0.5",style:{color:"var(--text-tertiary)"},children:m})]})}const bc={benchmark:"#6383ff",comparison:"#a78bfa",baseline:"#fb923c"},Kf={benchmark:"Benchmark",comparison:"Comparison",baseline:"Baseline"},Tc=600,Cc=180,lt=40,jc=Tc-lt*2,Cl=Cc-lt*2,Ch=[25,50,75,100];function Jf(c){return new Date(c).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Ah({entries:c}){const[u,f]=N.useState(null);if(c.length<2)return null;const o=c.length,m=c.map((T,b)=>{const x=lt+b/(o-1)*jc,E=T.passRate*100,h=lt+Cl-E/100*Cl;return{x,y:h,pct:E,entry:T}}),j=m.map(T=>`${T.x},${T.y}`).join(" "),g=Array.from(new Set(c.map(T=>T.type)));return s.jsxs("div",{className:"glass-card p-5 animate-fade-in",style:{position:"relative"},children:[s.jsx("div",{className:"text-[13px] font-semibold mb-2",style:{color:"var(--text-primary)"},children:"Pass Rate Trend"}),s.jsx("div",{className:"flex items-center gap-5 mb-3",children:g.map(T=>s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-3 h-3 rounded-full",style:{background:bc[T]??"var(--text-tertiary)"}}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:Kf[T]??T})]},T))}),s.jsxs("svg",{width:Tc,height:Cc,viewBox:`0 0 ${Tc} ${Cc}`,style:{display:"block",overflow:"visible"},children:[Ch.map(T=>{const b=lt+Cl-T/100*Cl;return s.jsxs("g",{children:[s.jsx("line",{x1:lt,y1:b,x2:lt+jc,y2:b,stroke:"var(--border-subtle)",strokeWidth:.5,strokeDasharray:"4 4"}),s.jsxs("text",{x:lt-8,y:b+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:[T,"%"]})]},T)}),s.jsx("line",{x1:lt,y1:lt+Cl,x2:lt+jc,y2:lt+Cl,stroke:"var(--border-subtle)",strokeWidth:1}),s.jsx("text",{x:lt-8,y:lt+Cl+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:"0%"}),s.jsx("polyline",{points:j,fill:"none",stroke:"var(--border-subtle)",strokeWidth:1.5,strokeLinejoin:"round"}),m.map((T,b)=>s.jsx("circle",{cx:T.x,cy:T.y,r:5,fill:bc[T.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"),f({x:T.x,y:T.y,entry:T.entry})},onMouseLeave:x=>{x.currentTarget.setAttribute("r","5"),f(null)}},b)),_h(o).map(T=>s.jsx("text",{x:m[T].x,y:lt+Cl+16,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:10},children:Jf(c[T].timestamp)},T))]}),u&&s.jsxs("div",{style:{position:"absolute",left:u.x,top:u.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:[s.jsx("div",{className:"text-[11px] font-medium",style:{color:"var(--text-primary)"},children:Jf(u.entry.timestamp)}),s.jsx("div",{className:"text-[11px] mt-0.5",style:{color:"var(--text-tertiary)"},children:u.entry.model}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("span",{className:"text-[9px] font-semibold px-1.5 py-0.5 rounded-full",style:{background:bc[u.entry.type]??"var(--text-tertiary)",color:"#fff"},children:Kf[u.entry.type]??u.entry.type}),s.jsxs("span",{className:"text-[12px] font-semibold",style:{color:"var(--text-primary)"},children:[Math.round(u.entry.passRate*100),"%"]})]})]})]})}function _h(c){return c<=3?Array.from({length:c},(u,f)=>f):c<=6?[0,Math.floor(c/2),c-1]:[0,Math.floor(c/3),Math.floor(2*c/3),c-1]}function Ks(c){return c>=.8?"var(--green)":c>=.5?"var(--yellow)":"var(--red)"}function Mh(c){return c>=1e3?`${(c/1e3).toFixed(1)}s`:`${Math.round(c)}ms`}function zh({rate:c,label:u}){const f=Math.round(c*100);return s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("span",{className:"text-[11px] truncate",style:{color:"var(--text-primary)",maxWidth:"70%"},children:u}),s.jsxs("span",{className:"text-[11px] font-semibold",style:{color:Ks(c)},children:[f,"%"]})]}),s.jsx("div",{className:"h-1.5 rounded-full overflow-hidden",style:{background:"var(--surface-3)"},children:s.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${f}%`,background:Ks(c)}})})]})})}function kh({points:c}){if(c.length<2)return null;const u=200,f=48,o=4,m=c.length,j=c.map((b,x)=>{const E=o+x/(m-1)*(u-o*2),h=o+(f-o*2)-b.passRate*(f-o*2);return{x:E,y:h}}),g=`M ${j[0].x},${f-o} `+j.map(b=>`L ${b.x},${b.y}`).join(" ")+` L ${j[j.length-1].x},${f-o} Z`,T=j.map((b,x)=>`${x===0?"M":"L"} ${b.x},${b.y}`).join(" ");return s.jsxs("svg",{width:u,height:f,style:{display:"block"},children:[s.jsx("path",{d:g,fill:"var(--accent-muted)"}),s.jsx("path",{d:T,fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),s.jsx("circle",{cx:j[j.length-1].x,cy:j[j.length-1].y,r:3,fill:"var(--accent)"})]})}function Rh({plugin:c,skill:u}){const[f,o]=N.useState(null),[m,j]=N.useState(!0);if(N.useEffect(()=>{j(!0),ge.getStats(c,u).then(o).catch(()=>o(null)).finally(()=>j(!1))},[c,u]),m)return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"skeleton h-24 rounded-xl"}),s.jsx("div",{className:"skeleton h-48 rounded-xl"}),s.jsx("div",{className:"skeleton h-36 rounded-xl"})]});if(!f||f.totalRuns===0)return s.jsxs("div",{className:"text-center py-12",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center mx-auto mb-3",style:{background:"var(--surface-2)"},children:s.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",children:[s.jsx("path",{d:"M18 20V10"}),s.jsx("path",{d:"M12 20V4"}),s.jsx("path",{d:"M6 20v-6"})]})}),s.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark data yet"}),s.jsx("p",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:"Run some benchmarks to see statistics"})]});const g=f.trendPoints.length>0?f.trendPoints[f.trendPoints.length-1].passRate:0,T=f.trendPoints.length>0?f.trendPoints[0].passRate:0,b=g-T,x=f.assertionStats.slice(0,10);return s.jsxs("div",{className:"space-y-4 stagger-children",children:[s.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Total Runs"}),s.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:f.totalRuns})]}),s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Latest Pass Rate"}),s.jsxs("div",{className:"text-[24px] font-bold",style:{color:Ks(g)},children:[Math.round(g*100),"%"]})]}),s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Trend"}),s.jsxs("div",{className:"text-[24px] font-bold",style:{color:b>=0?"var(--green)":"var(--red)"},children:[b>=0?"+":"",Math.round(b*100),"%"]})]}),s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("div",{className:"text-[10px] uppercase tracking-widest font-semibold mb-1",style:{color:"var(--text-tertiary)"},children:"Models Tested"}),s.jsx("div",{className:"text-[24px] font-bold",style:{color:"var(--text-primary)"},children:f.modelStats.length})]})]}),f.trendPoints.length>=2&&s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Pass Rate Over Time"}),s.jsx(kh,{points:f.trendPoints})]}),f.modelStats.length>0&&s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Model Performance"}),s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12},children:[s.jsx("thead",{children:s.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[s.jsx("th",{style:{textAlign:"left",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Model"}),s.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Runs"}),s.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Pass Rate"}),s.jsx("th",{style:{textAlign:"center",padding:"6px 8px",color:"var(--text-tertiary)",fontWeight:600,fontSize:11},children:"Avg Duration"})]})}),s.jsx("tbody",{children:f.modelStats.map(E=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[s.jsx("td",{style:{padding:"8px",color:"var(--text-primary)",fontWeight:500},children:E.model}),s.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:E.runs}),s.jsx("td",{style:{padding:"8px",textAlign:"center"},children:s.jsxs("span",{className:"font-semibold",style:{color:Ks(E.avgPassRate)},children:[Math.round(E.avgPassRate*100),"%"]})}),s.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:Mh(E.avgDurationMs)})]},E.model))})]})]}),x.length>0&&s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Weakest Assertions"}),s.jsx("div",{className:"space-y-3",children:x.map(E=>s.jsxs("button",{className:"block w-full text-left rounded-lg p-2 -mx-2 transition-colors duration-150",style:{background:"transparent"},onMouseEnter:h=>{h.currentTarget.style.background="var(--surface-2)"},onMouseLeave:h=>{h.currentTarget.style.background="transparent"},onClick:()=>{},children:[s.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[s.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:["#",E.evalId]}),s.jsx("span",{className:"text-[10px] truncate",style:{color:"var(--text-tertiary)"},children:E.evalName}),s.jsxs("span",{className:"text-[10px] ml-auto flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[E.totalRuns," runs"]})]}),s.jsx(zh,{rate:E.passRate,label:E.text})]},`${E.evalId}:${E.id}`))})]})]})}function Oh({plugin:c,skill:u}){const[f,o]=N.useState(null),[m,j]=N.useState(null),[g,T]=N.useState({}),[b,x]=N.useState({});N.useEffect(()=>{ge.getEvals(c,u).then(o).catch(()=>o(null))},[c,u]);async function E(h){if(m===h){j(null);return}if(j(h),!g[h]){x(R=>({...R,[h]:!0}));try{const R=await ge.getCaseHistory(c,u,h);T(H=>({...H,[h]:R}))}catch{T(R=>({...R,[h]:[]}))}finally{x(R=>({...R,[h]:!1}))}}}return f?s.jsx("div",{className:"space-y-2 stagger-children",children:f.evals.map(h=>{const R=g[h.id]||[],H=m===h.id,q=b[h.id],B=R.length>0?R[0].pass_rate:null;return s.jsxs("div",{className:"glass-card overflow-hidden",children:[s.jsxs("button",{onClick:()=>E(h.id),className:"w-full text-left p-4 flex items-center gap-3 transition-colors duration-150",style:{background:H?"var(--surface-2)":"transparent"},onMouseEnter:Y=>{H||(Y.currentTarget.style.background="var(--surface-2)")},onMouseLeave:Y=>{H||(Y.currentTarget.style.background="transparent")},children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",strokeLinecap:"round",style:{transform:H?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease",flexShrink:0},children:s.jsx("polyline",{points:"9 18 15 12 9 6"})}),s.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:["#",h.id]}),s.jsx("span",{className:"text-[13px] font-medium flex-1 truncate",style:{color:"var(--text-primary)"},children:h.name}),R.length>=2&&s.jsx(am,{entries:R}),B!=null&&s.jsxs("span",{className:"text-[12px] font-semibold flex-shrink-0",style:{color:Ec(B)},children:[Math.round(B*100),"%"]}),R.length>0&&s.jsxs("span",{className:"text-[10px] flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[R.length," runs"]})]}),H&&s.jsx("div",{className:"border-t animate-fade-in",style:{borderColor:"var(--border-subtle)"},children:q?s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx("div",{className:"spinner",style:{width:14,height:14}}),s.jsx("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading history..."})]}):R.length===0?s.jsx("div",{className:"p-4",children:s.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"No history for this eval case"})}):s.jsx("div",{className:"divide-y",style:{borderColor:"var(--border-subtle)"},children:R.map((Y,V)=>s.jsxs("div",{className:"p-4",style:{background:V===0?"var(--surface-2)":"transparent"},children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:tm(Y.timestamp)}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:Y.model}),s.jsx("span",{className:"pill",style:{fontSize:9,padding:"1px 6px",background:Y.type==="benchmark"?"rgba(99,131,255,0.15)":Y.type==="comparison"?"var(--purple-muted)":"rgba(251,146,60,0.15)",color:Y.type==="benchmark"?"#6383ff":Y.type==="comparison"?"var(--purple)":"#fb923c"},children:Y.type}),s.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:Ec(Y.pass_rate)},children:[Math.round(Y.pass_rate*100),"%"]})]}),s.jsxs("div",{className:"flex items-center gap-4 mb-2 text-[10px]",style:{fontFamily:"var(--font-mono, monospace)",color:"var(--text-tertiary)"},children:[Y.durationMs!=null&&s.jsx("span",{children:lm(Y.durationMs)}),Y.tokens!=null&&s.jsxs("span",{children:[Y.tokens>=1e3?`${(Y.tokens/1e3).toFixed(1)}k`:Y.tokens," tok"]})]}),s.jsx("div",{className:"space-y-1",children:Y.assertions.map(P=>s.jsxs("div",{className:"flex items-start gap-2 py-0.5",children:[s.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:s.jsx("svg",{width:"7",height:"7",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round",children:P.pass?s.jsx("polyline",{points:"20 6 9 17 4 12"}):s.jsxs(s.Fragment,{children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-[11px]",style:{color:"var(--text-primary)"},children:P.text}),P.reasoning&&s.jsx("div",{className:"text-[10px] mt-0.5",style:{color:"var(--text-tertiary)"},children:P.reasoning})]})]},P.id))})]},V))})})]},h.id)})}):s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No eval cases found"})})}function Dh(){const{state:c,dispatch:u}=Al(),{plugin:f,skill:o}=c,[m,j]=N.useState("timeline"),[g,T]=N.useState([]),[b,x]=N.useState(!0),[E,h]=N.useState(""),[R,H]=N.useState(""),[q,B]=N.useState(!1),[Y,V]=N.useState([]),[P,le]=N.useState(null),[G,ne]=N.useState(!1),[ie,I]=N.useState(null),[fe,Se]=N.useState(!1);N.useEffect(()=>{x(!0),ge.getHistory(f,o,{model:E||void 0,type:R||void 0}).then(z=>{T(z),z.length>=2&&ge.compareRuns(f,o,z[0].timestamp,z[1].timestamp).then(J=>{const re=J.regressions.filter(k=>k.change==="regression");u({type:"SET_REGRESSIONS",regressions:re})}).catch(()=>{})}).catch(()=>{}).finally(()=>x(!1))},[f,o,E,R]);const ee=N.useCallback(async z=>{if(q){V(J=>J.includes(z)?J.filter(re=>re!==z):J.length>=2?[J[1],z]:[...J,z]);return}Se(!0);try{const J=await ge.getHistoryEntry(f,o,z);I(J)}catch{}finally{Se(!1)}},[f,o,q]),O=N.useCallback(async()=>{if(Y.length===2){ne(!0);try{const z=await ge.compareRuns(f,o,Y[0],Y[1]);le(z)}catch{}finally{ne(!1)}}},[f,o,Y]),K=[...new Set(g.map(z=>z.model))];return b?s.jsxs("div",{className:"p-5",children:[s.jsx("div",{className:"skeleton h-5 w-32 mb-4"}),s.jsx("div",{className:"skeleton h-48 rounded-xl mb-4"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"skeleton h-12 rounded-lg"}),s.jsx("div",{className:"skeleton h-12 rounded-lg"})]})]}):s.jsxs("div",{className:"p-5",children:[s.jsx("div",{className:"flex items-center gap-1 mb-4",children:["timeline","per-eval","statistics"].map(z=>s.jsx("button",{onClick:()=>j(z),className:"px-4 py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:m===z?"var(--accent-muted)":"transparent",color:m===z?"var(--accent)":"var(--text-tertiary)"},children:z==="timeline"?"Timeline":z==="per-eval"?"Per Eval":"Statistics"},z))}),m==="timeline"&&s.jsxs("div",{children:[g.length>0&&s.jsx("div",{className:"mb-5 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:s.jsx(Ah,{entries:g})}),s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsxs("select",{value:E,onChange:z=>h(z.target.value),className:"input-field text-[12px]",style:{width:150},children:[s.jsx("option",{value:"",children:"All Models"}),K.map(z=>s.jsx("option",{value:z,children:z},z))]}),s.jsxs("select",{value:R,onChange:z=>H(z.target.value),className:"input-field text-[12px]",style:{width:150},children:[s.jsx("option",{value:"",children:"All Types"}),s.jsx("option",{value:"benchmark",children:"Benchmark"}),s.jsx("option",{value:"comparison",children:"Comparison"}),s.jsx("option",{value:"baseline",children:"Baseline"}),s.jsx("option",{value:"model-compare",children:"Model Compare"}),s.jsx("option",{value:"improve",children:"AI Improve"})]}),s.jsx("div",{className:"flex-1"}),s.jsx("button",{onClick:()=>{B(!q),V([]),le(null)},className:`btn text-[12px] ${q?"btn-primary":"btn-secondary"}`,children:q?"Exit Compare":"Compare Runs"}),q&&Y.length===2&&s.jsx("button",{onClick:O,disabled:G,className:"btn btn-primary text-[12px]",children:G?"Comparing...":"Compare"})]}),s.jsx("div",{className:"space-y-2",children:g.length===0?s.jsx("div",{className:"text-center py-8 text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark runs yet"}):g.map(z=>{const J=Y.includes(z.timestamp);return s.jsx("button",{onClick:()=>ee(z.timestamp),className:"w-full text-left rounded-lg px-4 py-3 transition-all duration-150",style:{background:J?"var(--accent-muted)":"var(--surface-1)",border:J?"1px solid var(--accent)":"1px solid var(--border-subtle)"},onMouseEnter:re=>{J||(re.currentTarget.style.borderColor="var(--border-hover)")},onMouseLeave:re=>{J||(re.currentTarget.style.borderColor="var(--border-subtle)")},children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[q&&s.jsx("span",{className:"w-4 h-4 rounded border flex items-center justify-center",style:{borderColor:J?"var(--accent)":"var(--border-default)",background:J?"var(--accent)":"transparent"},children:J&&s.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})})}),s.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:new Date(z.timestamp).toLocaleString()}),s.jsx("span",{className:"pill text-[9px]",style:{background:z.type==="comparison"?"var(--purple-muted)":z.type==="baseline"?"var(--surface-3)":z.type==="model-compare"?"rgba(56,189,248,0.15)":z.type==="improve"?"rgba(168,85,247,0.15)":"var(--accent-muted)",color:z.type==="comparison"?"var(--purple)":z.type==="baseline"?"var(--text-tertiary)":z.type==="model-compare"?"#38bdf8":z.type==="improve"?"#a855f7":"var(--accent)"},children:z.type==="model-compare"?"model compare":z.type==="improve"?"ai improve":z.type})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:z.model}),s.jsxs("span",{className:"text-[12px] font-semibold",style:{color:z.passRate>=.8?"var(--green)":z.passRate>=.5?"var(--yellow)":"var(--red)"},children:[Math.round(z.passRate*100),"%"]})]})]})},z.timestamp)})}),P&&s.jsx(wh,{result:P}),ie&&!q&&s.jsx(Lh,{run:ie,onClose:()=>I(null)})]}),m==="per-eval"&&s.jsx(Oh,{plugin:f,skill:o}),m==="statistics"&&s.jsx(Rh,{plugin:f,skill:o})]})}function wh({result:c}){const u=c.regressions.filter(o=>o.change==="regression"),f=c.regressions.filter(o=>o.change==="improvement");return s.jsxs("div",{className:"mt-4 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:["Comparison: ",new Date(c.runA.timestamp).toLocaleDateString()," vs ",new Date(c.runB.timestamp).toLocaleDateString()]}),u.length>0&&s.jsxs("div",{className:"mb-3",children:[s.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--red)"},children:["Regressions (",u.length,")"]}),u.map(o=>s.jsxs("div",{className:"text-[12px] py-1",style:{color:"var(--text-secondary)"},children:["#",o.evalId," ",o.evalName,": ",s.jsx("span",{style:{color:"var(--red)"},children:o.assertionId})," (was passing, now failing)"]},`${o.evalId}-${o.assertionId}`))]}),f.length>0&&s.jsxs("div",{className:"mb-3",children:[s.jsxs("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-1",style:{color:"var(--green)"},children:["Improvements (",f.length,")"]}),f.map(o=>s.jsxs("div",{className:"text-[12px] py-1",style:{color:"var(--text-secondary)"},children:["#",o.evalId," ",o.evalName,": ",s.jsx("span",{style:{color:"var(--green)"},children:o.assertionId})," (was failing, now passing)"]},`${o.evalId}-${o.assertionId}`))]}),s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wider mb-2 mt-3",style:{color:"var(--text-tertiary)"},children:"Case Diffs"}),s.jsx("div",{className:"rounded-lg overflow-hidden",style:{border:"1px solid var(--border-subtle)"},children:s.jsxs("table",{className:"w-full text-[12px]",children:[s.jsx("thead",{children:s.jsxs("tr",{style:{background:"var(--surface-2)"},children:[s.jsx("th",{className:"text-left px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Case"}),s.jsx("th",{className:"text-right px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Run A"}),s.jsx("th",{className:"text-right px-3 py-2 font-medium",style:{color:"var(--text-tertiary)"},children:"Run B"})]})}),s.jsx("tbody",{children:c.caseDiffs.map(o=>s.jsxs("tr",{style:{borderTop:"1px solid var(--border-subtle)"},children:[s.jsxs("td",{className:"px-3 py-2",style:{color:"var(--text-secondary)"},children:["#",o.eval_id," ",o.eval_name]}),s.jsx("td",{className:"text-right px-3 py-2",style:{color:o.passRateA!=null?o.passRateA>=.8?"var(--green)":o.passRateA>=.5?"var(--yellow)":"var(--red)":"var(--text-tertiary)"},children:o.passRateA!=null?`${Math.round(o.passRateA*100)}%`:o.statusA}),s.jsx("td",{className:"text-right px-3 py-2",style:{color:o.passRateB!=null?o.passRateB>=.8?"var(--green)":o.passRateB>=.5?"var(--yellow)":"var(--red)":"var(--text-tertiary)"},children:o.passRateB!=null?`${Math.round(o.passRateB*100)}%`:o.statusB})]},o.eval_id))})]})})]})}function Lh({run:c,onClose:u}){return c.type==="improve"&&c.improve?s.jsx(Uh,{run:c,onClose:u}):s.jsxs("div",{className:"mt-4 rounded-xl p-4",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:["Run: ",new Date(c.timestamp).toLocaleString()]}),s.jsx("button",{onClick:u,className:"btn btn-ghost text-[11px]",children:"Close"})]}),s.jsxs("div",{className:"text-[11px] mb-3",style:{color:"var(--text-tertiary)"},children:["Model: ",c.model," | Cases: ",c.cases.length," | Pass Rate: ",c.overall_pass_rate!=null?`${Math.round(c.overall_pass_rate*100)}%`:"--"]}),s.jsx("div",{className:"space-y-2",children:c.cases.map(f=>s.jsx("div",{className:"rounded-lg px-3 py-2",style:{background:"var(--surface-2)"},children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-secondary)"},children:["#",f.eval_id," ",f.eval_name]}),s.jsx("span",{className:"text-[11px] font-semibold",style:{color:f.status==="pass"?"var(--green)":"var(--red)"},children:f.pass_rate!=null?`${Math.round(f.pass_rate*100)}%`:f.status})]})},f.eval_id))})]})}function Uh({run:c,onClose:u}){var j;const f=N.useMemo(()=>c.improve?em(c.improve.original,c.improve.improved):[],[c.improve]),o=N.useMemo(()=>{const g=f.filter(b=>b.type==="added").length,T=f.filter(b=>b.type==="removed").length;return{added:g,removed:T}},[f]),m=N.useMemo(()=>{let g=0,T=0;return f.map(b=>b.type==="removed"?(g++,{...b,origNum:g,newNum:null}):b.type==="added"?(T++,{...b,origNum:null,newNum:T}):(g++,T++,{...b,origNum:g,newNum:T}))},[f]);return s.jsxs("div",{className:"mt-4 rounded-xl overflow-hidden animate-fade-in",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[s.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:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#a855f7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),s.jsx("path",{d:"M2 17l10 5 10-5"}),s.jsx("path",{d:"M2 12l10 5 10-5"})]})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"SKILL.md Changes"}),s.jsxs("div",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:[new Date(c.timestamp).toLocaleString()," · ",c.model]})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[s.jsxs("span",{style:{color:"var(--green)"},children:["+",o.added]}),s.jsxs("span",{style:{color:"var(--red)"},children:["-",o.removed]})]}),s.jsx("button",{onClick:u,className:"w-7 h-7 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:g=>{g.currentTarget.style.background="var(--surface-3)"},onMouseLeave:g=>{g.currentTarget.style.background="transparent"},children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[s.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})]}),((j=c.improve)==null?void 0:j.reasoning)&&s.jsxs("div",{className:"mx-4 mt-4 px-4 py-3 rounded-lg text-[12px]",style:{background:"rgba(168,85,247,0.06)",border:"1px solid rgba(168,85,247,0.15)",color:"var(--text-secondary)"},children:[s.jsx("span",{className:"font-semibold",style:{color:"#a855f7"},children:"AI Reasoning: "}),c.improve.reasoning]}),s.jsx("div",{className:"mx-4 my-4 rounded-lg overflow-hidden",style:{border:"1px solid var(--border-subtle)",maxHeight:480,overflowY:"auto"},children:s.jsx("table",{className:"w-full",style:{borderCollapse:"collapse",fontFamily:"var(--font-mono, monospace)"},children:s.jsx("tbody",{children:m.map((g,T)=>s.jsxs("tr",{style:{background:g.type==="added"?"rgba(34,197,94,0.08)":g.type==="removed"?"rgba(239,68,68,0.08)":"transparent"},children:[s.jsx("td",{className:"text-right select-none px-2",style:{width:40,fontSize:10,color:g.type==="removed"?"rgba(239,68,68,0.5)":"var(--text-tertiary)",opacity:g.origNum?.6:.2,borderRight:"1px solid var(--border-subtle)"},children:g.origNum??""}),s.jsx("td",{className:"text-right select-none px-2",style:{width:40,fontSize:10,color:g.type==="added"?"rgba(34,197,94,0.5)":"var(--text-tertiary)",opacity:g.newNum?.6:.2,borderRight:"1px solid var(--border-subtle)"},children:g.newNum??""}),s.jsx("td",{className:"select-none text-center",style:{width:20,fontSize:11,fontWeight:700,color:g.type==="added"?"var(--green)":g.type==="removed"?"var(--red)":"transparent",borderRight:g.type==="added"?"2px solid var(--green)":g.type==="removed"?"2px solid var(--red)":"2px solid transparent"},children:g.type==="added"?"+":g.type==="removed"?"-":" "}),s.jsx("td",{className:"px-3 py-px whitespace-pre-wrap",style:{fontSize:11,lineHeight:1.6,color:g.type==="added"?"var(--green)":g.type==="removed"?"var(--red)":"var(--text-secondary)"},children:g.content||""})]},T))})})})]})}function Bh({plugin:c,skill:u}){const[f,o]=N.useState([]),[m,j]=N.useState([]),[g,T]=N.useState(!0),[b,x]=N.useState(null);N.useEffect(()=>{ge.getDependencies(c,u).then(h=>{o(h.mcpDependencies),j(h.skillDependencies)}).catch(()=>{}).finally(()=>T(!1))},[c,u]);async function E(h,R){try{await navigator.clipboard.writeText(R),x(h),setTimeout(()=>x(null),2e3)}catch{}}return g?null:f.length===0&&m.length===0?s.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"}):s.jsxs("div",{className:"mb-5 rounded-xl overflow-hidden",style:{border:"1px solid var(--border-subtle)",background:"var(--surface-1)"},children:[s.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:[s.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"rgba(234,179,8,0.15)"},children:s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#eab308",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.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"}),s.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"})]})}),s.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"Dependencies"}),s.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:f.length+m.length})]}),s.jsxs("div",{className:"px-5 py-4",children:[f.length>0&&s.jsxs("div",{className:"space-y-3 mb-4",children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"MCP Servers"}),f.map(h=>s.jsxs("div",{className:"p-3 rounded-lg",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:h.server}),s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:h.transport})]}),s.jsx("button",{onClick:()=>E(h.server,h.configSnippet),className:"btn btn-ghost text-[11px] py-1 px-2",style:{color:b===h.server?"var(--green)":"var(--accent)"},children:b===h.server?s.jsxs(s.Fragment,{children:[s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"20 6 9 17 4 12"})})," Copied!"]}):s.jsxs(s.Fragment,{children:[s.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),s.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"]})})]}),s.jsx("div",{className:"text-[11px] mb-2 font-mono",style:{color:"var(--text-tertiary)"},children:h.url}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:h.matchedTools.map(R=>s.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--surface-3)",color:"var(--text-secondary)"},children:R},R))})]},h.server))]}),m.length>0&&s.jsxs("div",{children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider mb-2",style:{color:"var(--text-tertiary)"},children:"Skill Dependencies"}),s.jsx("div",{className:"space-y-1.5",children:m.map(h=>s.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:[s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.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"})}),s.jsx("span",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:h.name}),s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:h.source==="frontmatter"?"frontmatter":"referenced"})]},h.name))})]})]})]})}function Hh(){const{state:c}=Al(),{plugin:u,skill:f}=c,[o,m]=N.useState(null),[j,g]=N.useState(!0);return N.useEffect(()=>{ge.getDependencies(u,f).then(m).catch(()=>{}).finally(()=>g(!1))},[u,f]),j?s.jsxs("div",{className:"p-5",children:[s.jsx("div",{className:"skeleton h-5 w-32 mb-4"}),s.jsx("div",{className:"skeleton h-32 rounded-xl"})]}):o?s.jsx("div",{className:"p-5 max-w-3xl",children:s.jsx(Bh,{plugin:u,skill:f})}):s.jsx("div",{className:"flex items-center justify-center h-full text-[13px]",style:{color:"var(--text-tertiary)"},children:"No dependency information available"})}function qh(){const{state:c,dispatch:u,saveContent:f}=Al(),o=N.useCallback(j=>{const g=j.ctrlKey||j.metaKey;if(g&&j.key>="1"&&j.key<="6"){j.preventDefault(),u({type:"SET_PANEL",panel:["editor","tests","run","activation","history","deps"][parseInt(j.key)-1]});return}if(g&&j.key==="s"&&!j.shiftKey){j.preventDefault(),c.isDirty&&f();return}},[c.isDirty,f,u]);if(N.useEffect(()=>(window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)),[o]),c.loading)return s.jsx("div",{className:"flex items-center justify-center h-full",style:{background:"var(--surface-0)"},children:s.jsxs("div",{className:"flex flex-col items-center gap-3",children:[s.jsx("div",{className:"spinner spinner-lg"}),s.jsx("span",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"Loading workspace..."})]})});const m=Array.from(c.caseRunStates.values()).some(j=>j.status==="running"||j.status==="queued");return s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[s.jsx(ah,{state:c}),s.jsx(rh,{activePanel:c.activePanel,onPanelChange:j=>u({type:"SET_PANEL",panel:j}),isDirty:c.isDirty,isRunning:m,hasRegressions:c.regressions.length>0,isActivationRunning:c.activationRunning}),s.jsx("div",{className:"flex-1 overflow-hidden",style:{background:"var(--surface-0)"},children:s.jsxs("div",{className:"animate-fade-in",style:{height:"100%",overflow:"auto"},children:[c.activePanel==="editor"&&s.jsx(xh,{}),c.activePanel==="tests"&&s.jsx(vh,{}),c.activePanel==="run"&&s.jsx(jh,{}),c.activePanel==="activation"&&s.jsx(Th,{}),c.activePanel==="history"&&s.jsx(Dh,{}),c.activePanel==="deps"&&s.jsx(Hh,{})]},c.activePanel)})]})}function Sc(c){return c.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function Yh(c,u,f,o){const j=`.../${c.split("/").slice(-2).join("/")}`;switch(u){case 1:return`${j}/${f}/skills/${o}/SKILL.md`;case 2:return`${j}/plugins/${f}/skills/${o}/SKILL.md`;case 3:return`${j}/skills/${o}/SKILL.md`}}function Gh({onCreated:c,onCancel:u}){const[f,o]=N.useState(null),[m,j]=N.useState(!0),[g,T]=N.useState(null),[b,x]=N.useState(null),[E,h]=N.useState(""),[R,H]=N.useState(3),[q,B]=N.useState(""),[Y,V]=N.useState(""),[P,le]=N.useState(""),[G,ne]=N.useState(""),[ie,I]=N.useState(""),[fe,Se]=N.useState(""),[ee,O]=N.useState(!1),[K,z]=N.useState(null);N.useEffect(()=>{ge.getProjectLayout().then(Z=>{o(Z),H(Z.suggestedLayout);const y=Z.detectedLayouts.find(U=>U.layout===Z.suggestedLayout);y!=null&&y.existingPlugins.length&&B(y.existingPlugins[0])}).catch(()=>{}).finally(()=>j(!1)),ge.getConfig().then(x).catch(()=>{}),ge.getSkillCreatorStatus().then(T).catch(()=>{})},[]);const J=N.useMemo(()=>{var Z;return f?((Z=f.detectedLayouts.find(y=>y.layout===R))==null?void 0:Z.existingPlugins)||[]:[]},[f,R]),re=q==="__new__"?Y:q,k=f?Yh(f.root,R,re||"{plugin}",E||"{skill}"):"",Q=N.useMemo(()=>f?f.detectedLayouts.filter(Z=>Z.layout!==4):[],[f]),ae=(b==null?void 0:b.provider)==="claude-cli"&&g!==null;async function Ee(){if(z(null),!E.trim()){z("Skill name is required");return}if(!P.trim()){z("Description is required");return}if(R!==3&&!re.trim()){z("Plugin name is required");return}O(!0);try{const Z=await ge.createSkill({name:Sc(E),plugin:re||"",layout:R,description:P,model:G||void 0,allowedTools:ie||void 0,body:fe});c(Z.plugin,Z.skill)}catch(Z){z(Z.message)}finally{O(!1)}}return s.jsxs("div",{className:"px-8 py-6 max-w-4xl animate-fade-in overflow-auto h-full",children:[s.jsxs("div",{className:"mb-5",children:[s.jsx("h2",{className:"text-[20px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Create a New Skill"}),s.jsx("p",{className:"text-[13px] mt-1",style:{color:"var(--text-tertiary)"},children:"Define your skill's metadata, content, and placement"})]}),ae&&s.jsx("div",{className:"mb-5 px-4 py-3 rounded-lg text-[13px]",style:{background:g.installed?"var(--accent-muted)":"var(--surface-2)",border:g.installed?"1px solid var(--accent)":"1px solid var(--border-subtle)",color:"var(--text-primary)"},children:g.installed?s.jsxs("span",{children:[s.jsx("span",{className:"font-medium",children:"AI-Assisted Authoring Available"}),s.jsxs("span",{className:"ml-1",style:{color:"var(--text-secondary)"},children:["— Run ",s.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 creation."]})]}):s.jsxs("span",{style:{color:"var(--text-secondary)"},children:["Tip: Install the Skill Creator — ",s.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-3)"},children:g.installCommand})]})}),m?s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"skeleton h-10 w-full rounded-lg"}),s.jsx("div",{className:"skeleton h-10 w-full rounded-lg"})]}):f?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Location"}),Q.length>1&&s.jsxs("div",{className:"mb-3",children:[s.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Layout"}),s.jsx("div",{className:"flex gap-2",children:Q.map(Z=>s.jsx("button",{onClick:()=>{H(Z.layout),B(Z.existingPlugins[0]||""),V("")},className:"px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:R===Z.layout?"var(--accent)":"var(--surface-3)",color:R===Z.layout?"#fff":"var(--text-secondary)",border:`1px solid ${R===Z.layout?"var(--accent)":"var(--border-subtle)"}`,cursor:"pointer"},children:Z.label},Z.layout))})]}),R!==3&&s.jsxs("div",{className:"mb-3",children:[s.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Plugin"}),s.jsxs("select",{value:q,onChange:Z=>{B(Z.target.value),V("")},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:[J.map(Z=>s.jsx("option",{value:Z,children:Z},Z)),s.jsx("option",{value:"__new__",children:"+ New plugin..."})]}),q==="__new__"&&s.jsx("input",{type:"text",value:Y,onChange:Z=>V(Sc(Z.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)"}})]}),s.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:k})]}),s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Skill Details"}),s.jsxs("div",{className:"mb-3",children:[s.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:["Name ",s.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),s.jsx("input",{type:"text",value:E,onChange:Z=>h(Sc(Z.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)"}})]}),s.jsxs("div",{className:"mb-3",children:[s.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:["Description ",s.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),s.jsx("textarea",{value:P,onChange:Z=>le(Z.target.value),placeholder:"Brief description",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)"}})]}),s.jsxs("div",{className:"flex gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Model"}),s.jsxs("select",{value:G,onChange:Z=>ne(Z.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:[s.jsx("option",{value:"",children:"Any"}),s.jsx("option",{value:"opus",children:"Opus"}),s.jsx("option",{value:"sonnet",children:"Sonnet"}),s.jsx("option",{value:"haiku",children:"Haiku"})]})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Allowed Tools"}),s.jsx("input",{type:"text",value:ie,onChange:Z=>I(Z.target.value),placeholder:"Read, Write, Edit...",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)"}})]})]})]}),s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"System Prompt"}),s.jsx("textarea",{value:fe,onChange:Z=>Se(Z.target.value),placeholder:`# /my-skill
|
|
67
|
+
|
|
68
|
+
You are an expert at...
|
|
69
|
+
`,rows:8,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:"150px"}})]}),K&&s.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:K}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:Ee,disabled:ee||!E||!P,className:"px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:ee||!E||!P?"var(--surface-3)":"var(--accent)",color:ee||!E||!P?"var(--text-tertiary)":"#fff",cursor:ee||!E||!P?"not-allowed":"pointer",border:"none"},children:ee?"Creating...":"Create Skill"}),s.jsx("button",{onClick:u,className:"px-4 py-2.5 rounded-lg text-[13px] font-medium",style:{color:"var(--text-secondary)",background:"none",border:"none",cursor:"pointer"},children:"Cancel"})]})]}):null]})}function Nc({variant:c,message:u,onRetry:f}){const{setMode:o,setSearch:m}=Kl();return c==="no-selection"?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-8 animate-fade-in",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mb-5",style:{background:"var(--surface-2)"},children:s.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.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"}),s.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),s.jsx("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})]})}),s.jsx("p",{className:"text-[14px] font-medium mb-1",style:{color:"var(--text-secondary)"},children:"Select a skill to view details"}),s.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Choose a skill from the list to edit, test, and evaluate"})]}):c==="no-skills"?s.jsxs("div",{className:"text-center py-12 px-4 animate-fade-in-scale",children:[s.jsx("div",{className:"w-14 h-14 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:"var(--surface-2)"},children:s.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:s.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"})})}),s.jsx("p",{className:"text-[14px] font-medium",style:{color:"var(--text-secondary)"},children:"No skills found"}),s.jsxs("p",{className:"text-[12px] mt-1 mb-4",style:{color:"var(--text-tertiary)"},children:["Check your ",s.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"]}),s.jsxs("button",{onClick:()=>o("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",border:"none",cursor:"pointer"},onMouseEnter:j=>{j.currentTarget.style.opacity="0.9"},onMouseLeave:j=>{j.currentTarget.style.opacity="1"},children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),s.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Create Your First Skill"]})]}):c==="error"?s.jsx("div",{className:"flex flex-col items-center justify-center h-full px-8 animate-fade-in",children:s.jsxs("div",{className:"px-5 py-4 rounded-lg text-center max-w-sm",style:{background:"var(--red-muted)",border:"1px solid rgba(248,113,113,0.2)"},children:[s.jsx("p",{className:"text-[13px] mb-3",style:{color:"var(--red)"},children:u||"Failed to load skill data"}),f&&s.jsx("button",{onClick:f,className:"px-4 py-2 rounded-lg text-[12px] font-medium",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"none",cursor:"pointer"},children:"Retry"})]})}):s.jsxs("div",{className:"px-4 py-8 text-center animate-fade-in",children:[s.jsx("p",{className:"text-[13px] mb-2",style:{color:"var(--text-tertiary)"},children:"No skills match your search"}),s.jsx("button",{onClick:()=>m(""),className:"text-[12px] font-medium",style:{color:"var(--accent)",background:"none",border:"none",cursor:"pointer",textDecoration:"underline"},children:"Clear search"})]})}function $f(){const{state:c,setMobileView:u}=Kl();return c.isMobile?s.jsxs("button",{onClick:()=>u("list"),className:"flex items-center gap-1.5 px-3 py-2 text-[12px] font-medium",style:{background:"var(--surface-1)",color:"var(--text-secondary)",border:"none",borderBottom:"1px solid var(--border-subtle)",cursor:"pointer",width:"100%"},children:[s.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("polyline",{points:"15 18 9 12 15 6"})}),"Back to skills"]}):null}function Qh(){const{state:c,selectSkill:u,setMode:f,refreshSkills:o}=Kl();if(c.mode==="create")return s.jsxs("div",{className:"h-full overflow-auto animate-fade-in",children:[s.jsx($f,{}),s.jsx(Gh,{onCreated:(g,T)=>{f("browse"),o(),u({plugin:g,skill:T})},onCancel:()=>f("browse")})]});if(!c.selectedSkill)return c.skillsError?s.jsx(Nc,{variant:"error",message:c.skillsError,onRetry:o}):!c.skillsLoading&&c.skills.length===0?s.jsx(Nc,{variant:"no-skills"}):s.jsx(Nc,{variant:"no-selection"});const{plugin:m,skill:j}=c.selectedSkill;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsx($f,{}),s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(lh,{plugin:m,skill:j,children:s.jsx(qh,{})},`${m}/${j}`)})]})}function Xh(){return s.jsx(Qv,{children:s.jsx(Xv,{left:s.jsx(Fv,{}),right:s.jsx(Qh,{})})})}Uv.createRoot(document.getElementById("root")).render(s.jsx(N.StrictMode,{children:s.jsx(Xh,{})}));
|