vskill 0.2.85 → 0.2.86

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,88 @@
1
+ (function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const x of h.addedNodes)x.tagName==="LINK"&&x.rel==="modulepreload"&&c(x)}).observe(document,{childList:!0,subtree:!0});function f(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function c(d){if(d.ep)return;d.ep=!0;const h=f(d);fetch(d.href,h)}})();var Lu={exports:{}},Ln={};/**
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 mm;function kx(){if(mm)return Ln;mm=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function f(c,d,h){var x=null;if(h!==void 0&&(x=""+h),d.key!==void 0&&(x=""+d.key),"key"in d){h={};for(var b in d)b!=="key"&&(h[b]=d[b])}else h=d;return d=h.ref,{$$typeof:r,type:c,key:x,ref:d!==void 0?d:null,props:h}}return Ln.Fragment=u,Ln.jsx=f,Ln.jsxs=f,Ln}var hm;function zx(){return hm||(hm=1,Lu.exports=kx()),Lu.exports}var s=zx(),Uu={exports:{}},oe={};/**
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 pm;function Dx(){if(pm)return oe;pm=1;var r=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),x=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),T=Symbol.iterator;function z(N){return N===null||typeof N!="object"?null:(N=T&&N[T]||N["@@iterator"],typeof N=="function"?N:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,_={};function U(N,X,W){this.props=N,this.context=X,this.refs=_,this.updater=W||k}U.prototype.isReactComponent={},U.prototype.setState=function(N,X){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,X,"setState")},U.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function G(){}G.prototype=U.prototype;function Q(N,X,W){this.props=N,this.context=X,this.refs=_,this.updater=W||k}var te=Q.prototype=new G;te.constructor=Q,R(te,U.prototype),te.isPureReactComponent=!0;var K=Array.isArray;function se(){}var F={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function ne(N,X,W){var le=W.ref;return{$$typeof:r,type:N,key:X,ref:le!==void 0?le:null,props:W}}function I(N,X){return ne(N.type,X,N.props)}function L(N){return typeof N=="object"&&N!==null&&N.$$typeof===r}function J(N){var X={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(W){return X[W]})}var B=/\/+/g;function P(N,X){return typeof N=="object"&&N!==null&&N.key!=null?J(""+N.key):X.toString(36)}function ue(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(se,se):(N.status="pending",N.then(function(X){N.status==="pending"&&(N.status="fulfilled",N.value=X)},function(X){N.status==="pending"&&(N.status="rejected",N.reason=X)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function O(N,X,W,le,fe){var he=typeof N;(he==="undefined"||he==="boolean")&&(N=null);var Te=!1;if(N===null)Te=!0;else switch(he){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(N.$$typeof){case r:case u:Te=!0;break;case S:return Te=N._init,O(Te(N._payload),X,W,le,fe)}}if(Te)return fe=fe(N),Te=le===""?"."+P(N,0):le,K(fe)?(W="",Te!=null&&(W=Te.replace(B,"$&/")+"/"),O(fe,X,W,"",function(Ga){return Ga})):fe!=null&&(L(fe)&&(fe=I(fe,W+(fe.key==null||N&&N.key===fe.key?"":(""+fe.key).replace(B,"$&/")+"/")+Te)),X.push(fe)),1;Te=0;var tt=le===""?".":le+":";if(K(N))for(var Be=0;Be<N.length;Be++)le=N[Be],he=tt+P(le,Be),Te+=O(le,X,W,he,fe);else if(Be=z(N),typeof Be=="function")for(N=Be.call(N),Be=0;!(le=N.next()).done;)le=le.value,he=tt+P(le,Be++),Te+=O(le,X,W,he,fe);else if(he==="object"){if(typeof N.then=="function")return O(ue(N),X,W,le,fe);throw X=String(N),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Te}function $(N,X,W){if(N==null)return N;var le=[],fe=0;return O(N,le,"","",function(he){return X.call(W,he,fe++)}),le}function re(N){if(N._status===-1){var X=N._result;X=X(),X.then(function(W){(N._status===0||N._status===-1)&&(N._status=1,N._result=W)},function(W){(N._status===0||N._status===-1)&&(N._status=2,N._result=W)}),N._status===-1&&(N._status=0,N._result=X)}if(N._status===1)return N._result.default;throw N._result}var Ee=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},Z={map:$,forEach:function(N,X,W){$(N,function(){X.apply(this,arguments)},W)},count:function(N){var X=0;return $(N,function(){X++}),X},toArray:function(N){return $(N,function(X){return X})||[]},only:function(N){if(!L(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return oe.Activity=v,oe.Children=Z,oe.Component=U,oe.Fragment=f,oe.Profiler=d,oe.PureComponent=Q,oe.StrictMode=c,oe.Suspense=y,oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,oe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return F.H.useMemoCache(N)}},oe.cache=function(N){return function(){return N.apply(null,arguments)}},oe.cacheSignal=function(){return null},oe.cloneElement=function(N,X,W){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var le=R({},N.props),fe=N.key;if(X!=null)for(he in X.key!==void 0&&(fe=""+X.key),X)!V.call(X,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&X.ref===void 0||(le[he]=X[he]);var he=arguments.length-2;if(he===1)le.children=W;else if(1<he){for(var Te=Array(he),tt=0;tt<he;tt++)Te[tt]=arguments[tt+2];le.children=Te}return ne(N.type,fe,le)},oe.createContext=function(N){return N={$$typeof:x,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},oe.createElement=function(N,X,W){var le,fe={},he=null;if(X!=null)for(le in X.key!==void 0&&(he=""+X.key),X)V.call(X,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(fe[le]=X[le]);var Te=arguments.length-2;if(Te===1)fe.children=W;else if(1<Te){for(var tt=Array(Te),Be=0;Be<Te;Be++)tt[Be]=arguments[Be+2];fe.children=tt}if(N&&N.defaultProps)for(le in Te=N.defaultProps,Te)fe[le]===void 0&&(fe[le]=Te[le]);return ne(N,he,fe)},oe.createRef=function(){return{current:null}},oe.forwardRef=function(N){return{$$typeof:b,render:N}},oe.isValidElement=L,oe.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:re}},oe.memo=function(N,X){return{$$typeof:m,type:N,compare:X===void 0?null:X}},oe.startTransition=function(N){var X=F.T,W={};F.T=W;try{var le=N(),fe=F.S;fe!==null&&fe(W,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(se,Ee)}catch(he){Ee(he)}finally{X!==null&&W.types!==null&&(X.types=W.types),F.T=X}},oe.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},oe.use=function(N){return F.H.use(N)},oe.useActionState=function(N,X,W){return F.H.useActionState(N,X,W)},oe.useCallback=function(N,X){return F.H.useCallback(N,X)},oe.useContext=function(N){return F.H.useContext(N)},oe.useDebugValue=function(){},oe.useDeferredValue=function(N,X){return F.H.useDeferredValue(N,X)},oe.useEffect=function(N,X){return F.H.useEffect(N,X)},oe.useEffectEvent=function(N){return F.H.useEffectEvent(N)},oe.useId=function(){return F.H.useId()},oe.useImperativeHandle=function(N,X,W){return F.H.useImperativeHandle(N,X,W)},oe.useInsertionEffect=function(N,X){return F.H.useInsertionEffect(N,X)},oe.useLayoutEffect=function(N,X){return F.H.useLayoutEffect(N,X)},oe.useMemo=function(N,X){return F.H.useMemo(N,X)},oe.useOptimistic=function(N,X){return F.H.useOptimistic(N,X)},oe.useReducer=function(N,X,W){return F.H.useReducer(N,X,W)},oe.useRef=function(N){return F.H.useRef(N)},oe.useState=function(N){return F.H.useState(N)},oe.useSyncExternalStore=function(N,X,W){return F.H.useSyncExternalStore(N,X,W)},oe.useTransition=function(){return F.H.useTransition()},oe.version="19.2.4",oe}var xm;function ac(){return xm||(xm=1,Uu.exports=Dx()),Uu.exports}var g=ac(),Bu={exports:{}},Un={},Hu={exports:{}},qu={};/**
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 vm;function Ox(){return vm||(vm=1,(function(r){function u(O,$){var re=O.length;O.push($);e:for(;0<re;){var Ee=re-1>>>1,Z=O[Ee];if(0<d(Z,$))O[Ee]=$,O[re]=Z,re=Ee;else break e}}function f(O){return O.length===0?null:O[0]}function c(O){if(O.length===0)return null;var $=O[0],re=O.pop();if(re!==$){O[0]=re;e:for(var Ee=0,Z=O.length,N=Z>>>1;Ee<N;){var X=2*(Ee+1)-1,W=O[X],le=X+1,fe=O[le];if(0>d(W,re))le<Z&&0>d(fe,W)?(O[Ee]=fe,O[le]=re,Ee=le):(O[Ee]=W,O[X]=re,Ee=X);else if(le<Z&&0>d(fe,re))O[Ee]=fe,O[le]=re,Ee=le;else break e}}return $}function d(O,$){var re=O.sortIndex-$.sortIndex;return re!==0?re:O.id-$.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;r.unstable_now=function(){return h.now()}}else{var x=Date,b=x.now();r.unstable_now=function(){return x.now()-b}}var y=[],m=[],S=1,v=null,T=3,z=!1,k=!1,R=!1,_=!1,U=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function te(O){for(var $=f(m);$!==null;){if($.callback===null)c(m);else if($.startTime<=O)c(m),$.sortIndex=$.expirationTime,u(y,$);else break;$=f(m)}}function K(O){if(R=!1,te(O),!k)if(f(y)!==null)k=!0,se||(se=!0,J());else{var $=f(m);$!==null&&ue(K,$.startTime-O)}}var se=!1,F=-1,V=5,ne=-1;function I(){return _?!0:!(r.unstable_now()-ne<V)}function L(){if(_=!1,se){var O=r.unstable_now();ne=O;var $=!0;try{e:{k=!1,R&&(R=!1,G(F),F=-1),z=!0;var re=T;try{t:{for(te(O),v=f(y);v!==null&&!(v.expirationTime>O&&I());){var Ee=v.callback;if(typeof Ee=="function"){v.callback=null,T=v.priorityLevel;var Z=Ee(v.expirationTime<=O);if(O=r.unstable_now(),typeof Z=="function"){v.callback=Z,te(O),$=!0;break t}v===f(y)&&c(y),te(O)}else c(y);v=f(y)}if(v!==null)$=!0;else{var N=f(m);N!==null&&ue(K,N.startTime-O),$=!1}}break e}finally{v=null,T=re,z=!1}$=void 0}}finally{$?J():se=!1}}}var J;if(typeof Q=="function")J=function(){Q(L)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,P=B.port2;B.port1.onmessage=L,J=function(){P.postMessage(null)}}else J=function(){U(L,0)};function ue(O,$){F=U(function(){O(r.unstable_now())},$)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(O){O.callback=null},r.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<O?Math.floor(1e3/O):5},r.unstable_getCurrentPriorityLevel=function(){return T},r.unstable_next=function(O){switch(T){case 1:case 2:case 3:var $=3;break;default:$=T}var re=T;T=$;try{return O()}finally{T=re}},r.unstable_requestPaint=function(){_=!0},r.unstable_runWithPriority=function(O,$){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var re=T;T=O;try{return $()}finally{T=re}},r.unstable_scheduleCallback=function(O,$,re){var Ee=r.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?Ee+re:Ee):re=Ee,O){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=re+Z,O={id:S++,callback:$,priorityLevel:O,startTime:re,expirationTime:Z,sortIndex:-1},re>Ee?(O.sortIndex=re,u(m,O),f(y)===null&&O===f(m)&&(R?(G(F),F=-1):R=!0,ue(K,re-Ee))):(O.sortIndex=Z,u(y,O),k||z||(k=!0,se||(se=!0,J()))),O},r.unstable_shouldYield=I,r.unstable_wrapCallback=function(O){var $=T;return function(){var re=T;T=$;try{return O.apply(this,arguments)}finally{T=re}}}})(qu)),qu}var ym;function Lx(){return ym||(ym=1,Hu.exports=Ox()),Hu.exports}var Yu={exports:{}},et={};/**
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 gm;function Ux(){if(gm)return et;gm=1;var r=ac();function u(y){var m="https://react.dev/errors/"+y;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)m+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+y+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var c={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},d=Symbol.for("react.portal");function h(y,m,S){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:v==null?null:""+v,children:y,containerInfo:m,implementation:S}}var x=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(y,m){if(y==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,et.createPortal=function(y,m){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(u(299));return h(y,m,null,S)},et.flushSync=function(y){var m=x.T,S=c.p;try{if(x.T=null,c.p=2,y)return y()}finally{x.T=m,c.p=S,c.d.f()}},et.preconnect=function(y,m){typeof y=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,c.d.C(y,m))},et.prefetchDNS=function(y){typeof y=="string"&&c.d.D(y)},et.preinit=function(y,m){if(typeof y=="string"&&m&&typeof m.as=="string"){var S=m.as,v=b(S,m.crossOrigin),T=typeof m.integrity=="string"?m.integrity:void 0,z=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;S==="style"?c.d.S(y,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:T,fetchPriority:z}):S==="script"&&c.d.X(y,{crossOrigin:v,integrity:T,fetchPriority:z,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},et.preinitModule=function(y,m){if(typeof y=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var S=b(m.as,m.crossOrigin);c.d.M(y,{crossOrigin:S,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&c.d.M(y)},et.preload=function(y,m){if(typeof y=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var S=m.as,v=b(S,m.crossOrigin);c.d.L(y,S,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},et.preloadModule=function(y,m){if(typeof y=="string")if(m){var S=b(m.as,m.crossOrigin);c.d.m(y,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:S,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else c.d.m(y)},et.requestFormReset=function(y){c.d.r(y)},et.unstable_batchedUpdates=function(y,m){return y(m)},et.useFormState=function(y,m,S){return x.H.useFormState(y,m,S)},et.useFormStatus=function(){return x.H.useHostTransitionStatus()},et.version="19.2.4",et}var bm;function Bx(){if(bm)return Yu.exports;bm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),Yu.exports=Ux(),Yu.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 jm;function Hx(){if(jm)return Un;jm=1;var r=Lx(),u=ac(),f=Bx();function c(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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(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 x(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(h(e)!==e)throw Error(c(188))}function m(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(c(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 y(n),e;if(i===a)return y(n),t;i=i.sibling}throw Error(c(188))}if(l.return!==a.return)l=n,a=i;else{for(var o=!1,p=n.child;p;){if(p===l){o=!0,l=n,a=i;break}if(p===a){o=!0,a=n,l=i;break}p=p.sibling}if(!o){for(p=i.child;p;){if(p===l){o=!0,l=i,a=n;break}if(p===a){o=!0,a=i,l=n;break}p=p.sibling}if(!o)throw Error(c(189))}}if(l.alternate!==a)throw Error(c(190))}if(l.tag!==3)throw Error(c(188));return l.stateNode.current===l?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,T=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),U=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function J(e){return e===null||typeof e!="object"?null:(e=L&&e[L]||e["@@iterator"],typeof e=="function"?e:null)}var B=Symbol.for("react.client.reference");function P(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===B?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case U:return"Profiler";case _:return"StrictMode";case K:return"Suspense";case se:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case Q:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:P(e.type)||"Memo";case V:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ue=Array.isArray,O=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},Ee=[],Z=-1;function N(e){return{current:e}}function X(e){0>Z||(e.current=Ee[Z],Ee[Z]=null,Z--)}function W(e,t){Z++,Ee[Z]=e.current,e.current=t}var le=N(null),fe=N(null),he=N(null),Te=N(null);function tt(e,t){switch(W(he,t),W(fe,e),W(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ld(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ld(t),e=Ud(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}X(le),W(le,e)}function Be(){X(le),X(fe),X(he)}function Ga(e){e.memoizedState!==null&&W(Te,e);var t=le.current,l=Ud(t,e.type);t!==l&&(W(fe,e),W(le,l))}function Qn(e){fe.current===e&&(X(le),X(fe)),Te.current===e&&(X(Te),kn._currentValue=re)}var yi,oc;function Ol(e){if(yi===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);yi=t&&t[1]||"",oc=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+yi+e+oc}var gi=!1;function bi(e,t){if(!e||gi)return"";gi=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(D){var w=D}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(D){w=D}e.call(Y.prototype)}}else{try{throw Error()}catch(D){w=D}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(D){if(D&&w&&typeof D.stack=="string")return[D.stack,w.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(),o=i[0],p=i[1];if(o&&p){var j=o.split(`
44
+ `),M=p.split(`
45
+ `);for(n=a=0;a<j.length&&!j[a].includes("DetermineComponentFrameRoot");)a++;for(;n<M.length&&!M[n].includes("DetermineComponentFrameRoot");)n++;if(a===j.length||n===M.length)for(a=j.length-1,n=M.length-1;1<=a&&0<=n&&j[a]!==M[n];)n--;for(;1<=a&&0<=n;a--,n--)if(j[a]!==M[n]){if(a!==1||n!==1)do if(a--,n--,0>n||j[a]!==M[n]){var H=`
46
+ `+j[a].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=a&&0<=n);break}}}finally{gi=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ol(l):""}function ch(e,t){switch(e.tag){case 26:case 27:case 5:return Ol(e.type);case 16:return Ol("Lazy");case 13:return e.child!==t&&t!==null?Ol("Suspense Fallback"):Ol("Suspense");case 19:return Ol("SuspenseList");case 0:case 15:return bi(e.type,!1);case 11:return bi(e.type.render,!1);case 1:return bi(e.type,!0);case 31:return Ol("Activity");default:return""}}function fc(e){try{var t="",l=null;do t+=ch(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
+ Error generating stack: `+a.message+`
48
+ `+a.stack}}var ji=Object.prototype.hasOwnProperty,Si=r.unstable_scheduleCallback,Ni=r.unstable_cancelCallback,oh=r.unstable_shouldYield,fh=r.unstable_requestPaint,ft=r.unstable_now,dh=r.unstable_getCurrentPriorityLevel,dc=r.unstable_ImmediatePriority,mc=r.unstable_UserBlockingPriority,Vn=r.unstable_NormalPriority,mh=r.unstable_LowPriority,hc=r.unstable_IdlePriority,hh=r.log,ph=r.unstable_setDisableYieldValue,Xa=null,dt=null;function cl(e){if(typeof hh=="function"&&ph(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(Xa,e)}catch{}}var mt=Math.clz32?Math.clz32:yh,xh=Math.log,vh=Math.LN2;function yh(e){return e>>>=0,e===0?32:31-(xh(e)/vh|0)|0}var Zn=256,Kn=262144,$n=4194304;function Ll(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 Jn(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~i,a!==0?n=Ll(a):(o&=p,o!==0?n=Ll(o):l||(l=p&~e,l!==0&&(n=Ll(l))))):(p=a&~i,p!==0?n=Ll(p):o!==0?n=Ll(o):l||(l=a&~e,l!==0&&(n=Ll(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 Qa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function gh(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 pc(){var e=$n;return $n<<=1,($n&62914560)===0&&($n=4194304),e}function Ei(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Va(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bh(e,t,l,a,n,i){var o=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var p=e.entanglements,j=e.expirationTimes,M=e.hiddenUpdates;for(l=o&~l;0<l;){var H=31-mt(l),Y=1<<H;p[H]=0,j[H]=-1;var w=M[H];if(w!==null)for(M[H]=null,H=0;H<w.length;H++){var D=w[H];D!==null&&(D.lane&=-536870913)}l&=~Y}a!==0&&xc(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function xc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-mt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function vc(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-mt(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function yc(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 Ci(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function gc(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:im(e.type))}function bc(e,t){var l=$.p;try{return $.p=e,t()}finally{$.p=l}}var ol=Math.random().toString(36).slice(2),Je="__reactFiber$"+ol,nt="__reactProps$"+ol,aa="__reactContainer$"+ol,Ri="__reactEvents$"+ol,jh="__reactListeners$"+ol,Sh="__reactHandles$"+ol,jc="__reactResources$"+ol,Za="__reactMarker$"+ol;function Ai(e){delete e[Je],delete e[nt],delete e[Ri],delete e[jh],delete e[Sh]}function na(e){var t=e[Je];if(t)return t;for(var l=e.parentNode;l;){if(t=l[aa]||l[Je]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Qd(e);e!==null;){if(l=e[Je])return l;e=Qd(e)}return t}e=l,l=e.parentNode}return null}function sa(e){if(e=e[Je]||e[aa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ka(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function ia(e){var t=e[jc];return t||(t=e[jc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[Za]=!0}var Sc=new Set,Nc={};function Ul(e,t){ra(e,t),ra(e+"Capture",t)}function ra(e,t){for(Nc[e]=t,e=0;e<t.length;e++)Sc.add(t[e])}var Nh=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]*$"),Ec={},Tc={};function Eh(e){return ji.call(Tc,e)?!0:ji.call(Ec,e)?!1:Nh.test(e)?Tc[e]=!0:(Ec[e]=!0,!1)}function Wn(e,t,l){if(Eh(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 Fn(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 Xt(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 jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Th(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(o){l=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mi(e){if(!e._valueTracker){var t=Cc(e)?"checked":"value";e._valueTracker=Th(e,t,""+e[t])}}function Rc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Cc(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Pn(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 Ch=/[\n"\\]/g;function St(e){return e.replace(Ch,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function wi(e,t,l,a,n,i,o,p){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?_i(e,o,jt(t)):l!=null?_i(e,o,jt(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+jt(p):e.removeAttribute("name")}function Ac(e,t,l,a,n,i,o,p){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)){Mi(e);return}l=l!=null?""+jt(l):"",t=t!=null?""+jt(t):l,p||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=p?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Mi(e)}function _i(e,t,l){t==="number"&&Pn(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ua(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=""+jt(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 Mc(e,t,l){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+jt(l):""}function wc(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(c(92));if(ue(a)){if(1<a.length)throw Error(c(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=jt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Mi(e)}function ca(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Rh=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||Rh.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function kc(e,t,l){if(t!=null&&typeof t!="object")throw Error(c(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 ki(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 Ah=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"]]),Mh=/^[\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 In(e){return Mh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qt(){}var zi=null;function Di(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oa=null,fa=null;function zc(e){var t=sa(e);if(t&&(e=t.stateNode)){var l=e[nt]||null;e:switch(e=t.stateNode,t.type){case"input":if(wi(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="'+St(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[nt]||null;if(!n)throw Error(c(90));wi(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&&Rc(a)}break e;case"textarea":Mc(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ua(e,!!l.multiple,t,!1)}}}var Oi=!1;function Dc(e,t,l){if(Oi)return e(t,l);Oi=!0;try{var a=e(t);return a}finally{if(Oi=!1,(oa!==null||fa!==null)&&(qs(),oa&&(t=oa,e=fa,fa=oa=null,zc(t),e)))for(t=0;t<e.length;t++)zc(e[t])}}function $a(e,t){var l=e.stateNode;if(l===null)return null;var a=l[nt]||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(c(231,t,typeof l));return l}var Vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Li=!1;if(Vt)try{var Ja={};Object.defineProperty(Ja,"passive",{get:function(){Li=!0}}),window.addEventListener("test",Ja,Ja),window.removeEventListener("test",Ja,Ja)}catch{Li=!1}var fl=null,Ui=null,es=null;function Oc(){if(es)return es;var e,t=Ui,l=t.length,a,n="value"in fl?fl.value:fl.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var o=l-e;for(a=1;a<=o&&t[l-a]===n[i-a];a++);return es=n.slice(e,1<a?1-a:void 0)}function ts(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 ls(){return!0}function Lc(){return!1}function st(e){function t(l,a,n,i,o){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(l=e[p],this[p]=l?l(i):i[p]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ls:Lc,this.isPropagationStopped=Lc,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ls)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ls)},persist:function(){},isPersistent:ls}),t}var Bl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},as=st(Bl),Wa=v({},Bl,{view:0,detail:0}),wh=st(Wa),Bi,Hi,Fa,ns=v({},Wa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yi,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!==Fa&&(Fa&&e.type==="mousemove"?(Bi=e.screenX-Fa.screenX,Hi=e.screenY-Fa.screenY):Hi=Bi=0,Fa=e),Bi)},movementY:function(e){return"movementY"in e?e.movementY:Hi}}),Uc=st(ns),_h=v({},ns,{dataTransfer:0}),kh=st(_h),zh=v({},Wa,{relatedTarget:0}),qi=st(zh),Dh=v({},Bl,{animationName:0,elapsedTime:0,pseudoElement:0}),Oh=st(Dh),Lh=v({},Bl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Uh=st(Lh),Bh=v({},Bl,{data:0}),Bc=st(Bh),Hh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qh={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"},Yh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yh[e])?!!t[e]:!1}function Yi(){return Gh}var Xh=v({},Wa,{key:function(e){if(e.key){var t=Hh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ts(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?qh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yi,charCode:function(e){return e.type==="keypress"?ts(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ts(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qh=st(Xh),Vh=v({},ns,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hc=st(Vh),Zh=v({},Wa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yi}),Kh=st(Zh),$h=v({},Bl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jh=st($h),Wh=v({},ns,{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}),Fh=st(Wh),Ph=v({},Bl,{newState:0,oldState:0}),Ih=st(Ph),ep=[9,13,27,32],Gi=Vt&&"CompositionEvent"in window,Pa=null;Vt&&"documentMode"in document&&(Pa=document.documentMode);var tp=Vt&&"TextEvent"in window&&!Pa,qc=Vt&&(!Gi||Pa&&8<Pa&&11>=Pa),Yc=" ",Gc=!1;function Xc(e,t){switch(e){case"keyup":return ep.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var da=!1;function lp(e,t){switch(e){case"compositionend":return Qc(t);case"keypress":return t.which!==32?null:(Gc=!0,Yc);case"textInput":return e=t.data,e===Yc&&Gc?null:e;default:return null}}function ap(e,t){if(da)return e==="compositionend"||!Gi&&Xc(e,t)?(e=Oc(),es=Ui=fl=null,da=!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 qc&&t.locale!=="ko"?null:t.data;default:return null}}var np={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 Vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!np[e.type]:t==="textarea"}function Zc(e,t,l,a){oa?fa?fa.push(a):fa=[a]:oa=a,t=Ks(t,"onChange"),0<t.length&&(l=new as("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Ia=null,en=null;function sp(e){wd(e,0)}function ss(e){var t=Ka(e);if(Rc(t))return e}function Kc(e,t){if(e==="change")return t}var $c=!1;if(Vt){var Xi;if(Vt){var Qi="oninput"in document;if(!Qi){var Jc=document.createElement("div");Jc.setAttribute("oninput","return;"),Qi=typeof Jc.oninput=="function"}Xi=Qi}else Xi=!1;$c=Xi&&(!document.documentMode||9<document.documentMode)}function Wc(){Ia&&(Ia.detachEvent("onpropertychange",Fc),en=Ia=null)}function Fc(e){if(e.propertyName==="value"&&ss(en)){var t=[];Zc(t,en,e,Di(e)),Dc(sp,t)}}function ip(e,t,l){e==="focusin"?(Wc(),Ia=t,en=l,Ia.attachEvent("onpropertychange",Fc)):e==="focusout"&&Wc()}function rp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ss(en)}function up(e,t){if(e==="click")return ss(t)}function cp(e,t){if(e==="input"||e==="change")return ss(t)}function op(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ht=typeof Object.is=="function"?Object.is:op;function tn(e,t){if(ht(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(!ji.call(t,n)||!ht(e[n],t[n]))return!1}return!0}function Pc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ic(e,t){var l=Pc(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=Pc(l)}}function eo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function to(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pn(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=Pn(e.document)}return t}function Vi(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 fp=Vt&&"documentMode"in document&&11>=document.documentMode,ma=null,Zi=null,ln=null,Ki=!1;function lo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ki||ma==null||ma!==Pn(a)||(a=ma,"selectionStart"in a&&Vi(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}),ln&&tn(ln,a)||(ln=a,a=Ks(Zi,"onSelect"),0<a.length&&(t=new as("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=ma)))}function Hl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ha={animationend:Hl("Animation","AnimationEnd"),animationiteration:Hl("Animation","AnimationIteration"),animationstart:Hl("Animation","AnimationStart"),transitionrun:Hl("Transition","TransitionRun"),transitionstart:Hl("Transition","TransitionStart"),transitioncancel:Hl("Transition","TransitionCancel"),transitionend:Hl("Transition","TransitionEnd")},$i={},ao={};Vt&&(ao=document.createElement("div").style,"AnimationEvent"in window||(delete ha.animationend.animation,delete ha.animationiteration.animation,delete ha.animationstart.animation),"TransitionEvent"in window||delete ha.transitionend.transition);function ql(e){if($i[e])return $i[e];if(!ha[e])return e;var t=ha[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in ao)return $i[e]=t[l];return e}var no=ql("animationend"),so=ql("animationiteration"),io=ql("animationstart"),dp=ql("transitionrun"),mp=ql("transitionstart"),hp=ql("transitioncancel"),ro=ql("transitionend"),uo=new Map,Ji="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(" ");Ji.push("scrollEnd");function zt(e,t){uo.set(e,t),Ul(t,[e])}var is=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)},Nt=[],pa=0,Wi=0;function rs(){for(var e=pa,t=Wi=pa=0;t<e;){var l=Nt[t];Nt[t++]=null;var a=Nt[t];Nt[t++]=null;var n=Nt[t];Nt[t++]=null;var i=Nt[t];if(Nt[t++]=null,a!==null&&n!==null){var o=a.pending;o===null?n.next=n:(n.next=o.next,o.next=n),a.pending=n}i!==0&&co(l,n,i)}}function us(e,t,l,a){Nt[pa++]=e,Nt[pa++]=t,Nt[pa++]=l,Nt[pa++]=a,Wi|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Fi(e,t,l,a){return us(e,t,l,a),cs(e)}function Yl(e,t){return us(e,null,null,t),cs(e)}function co(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-mt(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function cs(e){if(50<Tn)throw Tn=0,iu=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xa={};function pp(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 pt(e,t,l,a){return new pp(e,t,l,a)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zt(e,t){var l=e.alternate;return l===null?(l=pt(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 oo(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 os(e,t,l,a,n,i){var o=0;if(a=e,typeof e=="function")Pi(e)&&(o=1);else if(typeof e=="string")o=bx(e,l,le.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=pt(31,l,t,n),e.elementType=ne,e.lanes=i,e;case R:return Gl(l.children,n,i,t);case _:o=8,n|=24;break;case U:return e=pt(12,l,t,n|2),e.elementType=U,e.lanes=i,e;case K:return e=pt(13,l,t,n),e.elementType=K,e.lanes=i,e;case se:return e=pt(19,l,t,n),e.elementType=se,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:o=10;break e;case G:o=9;break e;case te:o=11;break e;case F:o=14;break e;case V:o=16,a=null;break e}o=29,l=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=pt(o,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function Gl(e,t,l,a){return e=pt(7,e,a,t),e.lanes=l,e}function Ii(e,t,l){return e=pt(6,e,null,t),e.lanes=l,e}function fo(e){var t=pt(18,null,null,0);return t.stateNode=e,t}function er(e,t,l){return t=pt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mo=new WeakMap;function Et(e,t){if(typeof e=="object"&&e!==null){var l=mo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:fc(t)},mo.set(e,t),t)}return{value:e,source:t,stack:fc(t)}}var va=[],ya=0,fs=null,an=0,Tt=[],Ct=0,dl=null,Lt=1,Ut="";function Kt(e,t){va[ya++]=an,va[ya++]=fs,fs=e,an=t}function ho(e,t,l){Tt[Ct++]=Lt,Tt[Ct++]=Ut,Tt[Ct++]=dl,dl=e;var a=Lt;e=Ut;var n=32-mt(a)-1;a&=~(1<<n),l+=1;var i=32-mt(t)+n;if(30<i){var o=n-n%5;i=(a&(1<<o)-1).toString(32),a>>=o,n-=o,Lt=1<<32-mt(t)+n|l<<n|a,Ut=i+e}else Lt=1<<i|l<<n|a,Ut=e}function tr(e){e.return!==null&&(Kt(e,1),ho(e,1,0))}function lr(e){for(;e===fs;)fs=va[--ya],va[ya]=null,an=va[--ya],va[ya]=null;for(;e===dl;)dl=Tt[--Ct],Tt[Ct]=null,Ut=Tt[--Ct],Tt[Ct]=null,Lt=Tt[--Ct],Tt[Ct]=null}function po(e,t){Tt[Ct++]=Lt,Tt[Ct++]=Ut,Tt[Ct++]=dl,Lt=t.id,Ut=t.overflow,dl=e}var We=null,ke=null,ge=!1,ml=null,Rt=!1,ar=Error(c(519));function hl(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw nn(Et(t,e)),ar}function xo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Je]=e,t[nt]=a,l){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(l=0;l<Rn.length;l++)xe(Rn[l],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),Ac(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),wc(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||Dd(t.textContent,l)?(a.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),a.onScroll!=null&&xe("scroll",t),a.onScrollEnd!=null&&xe("scrollend",t),a.onClick!=null&&(t.onclick=Qt),t=!0):t=!1,t||hl(e,!0)}function vo(e){for(We=e.return;We;)switch(We.tag){case 5:case 31:case 13:Rt=!1;return;case 27:case 3:Rt=!0;return;default:We=We.return}}function ga(e){if(e!==We)return!1;if(!ge)return vo(e),ge=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||ju(e.type,e.memoizedProps)),l=!l),l&&ke&&hl(e),vo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ke=Xd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ke=Xd(e)}else t===27?(t=ke,Al(e.type)?(e=Cu,Cu=null,ke=e):ke=t):ke=We?Mt(e.stateNode.nextSibling):null;return!0}function Xl(){ke=We=null,ge=!1}function nr(){var e=ml;return e!==null&&(ct===null?ct=e:ct.push.apply(ct,e),ml=null),e}function nn(e){ml===null?ml=[e]:ml.push(e)}var sr=N(null),Ql=null,$t=null;function pl(e,t,l){W(sr,t._currentValue),t._currentValue=l}function Jt(e){e._currentValue=sr.current,X(sr)}function ir(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 rr(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var o=n.child;i=i.firstContext;e:for(;i!==null;){var p=i;i=n;for(var j=0;j<t.length;j++)if(p.context===t[j]){i.lanes|=l,p=i.alternate,p!==null&&(p.lanes|=l),ir(i.return,l,e),a||(o=null);break e}i=p.next}}else if(n.tag===18){if(o=n.return,o===null)throw Error(c(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),ir(o,l,e),o=null}else o=n.child;if(o!==null)o.return=n;else for(o=n;o!==null;){if(o===e){o=null;break}if(n=o.sibling,n!==null){n.return=o.return,o=n;break}o=o.return}n=o}}function ba(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 o=n.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var p=n.type;ht(n.pendingProps.value,o.value)||(e!==null?e.push(p):e=[p])}}else if(n===Te.current){if(o=n.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(kn):e=[kn])}n=n.return}e!==null&&rr(t,e,l,a),t.flags|=262144}function ds(e){for(e=e.firstContext;e!==null;){if(!ht(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vl(e){Ql=e,$t=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Fe(e){return yo(Ql,e)}function ms(e,t){return Ql===null&&Vl(e),yo(e,t)}function yo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},$t===null){if(e===null)throw Error(c(308));$t=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $t=$t.next=t;return l}var xp=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()})}},vp=r.unstable_scheduleCallback,yp=r.unstable_NormalPriority,Ye={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ur(){return{controller:new xp,data:new Map,refCount:0}}function sn(e){e.refCount--,e.refCount===0&&vp(yp,function(){e.controller.abort()})}var rn=null,cr=0,ja=0,Sa=null;function gp(e,t){if(rn===null){var l=rn=[];cr=0,ja=du(),Sa={status:"pending",value:void 0,then:function(a){l.push(a)}}}return cr++,t.then(go,go),t}function go(){if(--cr===0&&rn!==null){Sa!==null&&(Sa.status="fulfilled");var e=rn;rn=null,ja=0,Sa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function bp(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 bo=O.S;O.S=function(e,t){nd=ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&gp(e,t),bo!==null&&bo(e,t)};var Zl=N(null);function or(){var e=Zl.current;return e!==null?e:_e.pooledCache}function hs(e,t){t===null?W(Zl,Zl.current):W(Zl,t.pool)}function jo(){var e=or();return e===null?null:{parent:Ye._currentValue,pool:e}}var Na=Error(c(460)),fr=Error(c(474)),ps=Error(c(542)),xs={then:function(){}};function So(e){return e=e.status,e==="fulfilled"||e==="rejected"}function No(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Qt,Qt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,To(e),e;default:if(typeof t.status=="string")t.then(Qt,Qt);else{if(e=_e,e!==null&&100<e.shellSuspendCounter)throw Error(c(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,To(e),e}throw $l=t,Na}}function Kl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?($l=l,Na):l}}var $l=null;function Eo(){if($l===null)throw Error(c(459));var e=$l;return $l=null,e}function To(e){if(e===Na||e===ps)throw Error(c(483))}var Ea=null,un=0;function vs(e){var t=un;return un+=1,Ea===null&&(Ea=[]),No(Ea,e,t)}function cn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ys(e,t){throw t.$$typeof===T?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Co(e){function t(C,E){if(e){var A=C.deletions;A===null?(C.deletions=[E],C.flags|=16):A.push(E)}}function l(C,E){if(!e)return null;for(;E!==null;)t(C,E),E=E.sibling;return null}function a(C){for(var E=new Map;C!==null;)C.key!==null?E.set(C.key,C):E.set(C.index,C),C=C.sibling;return E}function n(C,E){return C=Zt(C,E),C.index=0,C.sibling=null,C}function i(C,E,A){return C.index=A,e?(A=C.alternate,A!==null?(A=A.index,A<E?(C.flags|=67108866,E):A):(C.flags|=67108866,E)):(C.flags|=1048576,E)}function o(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function p(C,E,A,q){return E===null||E.tag!==6?(E=Ii(A,C.mode,q),E.return=C,E):(E=n(E,A),E.return=C,E)}function j(C,E,A,q){var ie=A.type;return ie===R?H(C,E,A.props.children,q,A.key):E!==null&&(E.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===V&&Kl(ie)===E.type)?(E=n(E,A.props),cn(E,A),E.return=C,E):(E=os(A.type,A.key,A.props,null,C.mode,q),cn(E,A),E.return=C,E)}function M(C,E,A,q){return E===null||E.tag!==4||E.stateNode.containerInfo!==A.containerInfo||E.stateNode.implementation!==A.implementation?(E=er(A,C.mode,q),E.return=C,E):(E=n(E,A.children||[]),E.return=C,E)}function H(C,E,A,q,ie){return E===null||E.tag!==7?(E=Gl(A,C.mode,q,ie),E.return=C,E):(E=n(E,A),E.return=C,E)}function Y(C,E,A){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Ii(""+E,C.mode,A),E.return=C,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case z:return A=os(E.type,E.key,E.props,null,C.mode,A),cn(A,E),A.return=C,A;case k:return E=er(E,C.mode,A),E.return=C,E;case V:return E=Kl(E),Y(C,E,A)}if(ue(E)||J(E))return E=Gl(E,C.mode,A,null),E.return=C,E;if(typeof E.then=="function")return Y(C,vs(E),A);if(E.$$typeof===Q)return Y(C,ms(C,E),A);ys(C,E)}return null}function w(C,E,A,q){var ie=E!==null?E.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ie!==null?null:p(C,E,""+A,q);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case z:return A.key===ie?j(C,E,A,q):null;case k:return A.key===ie?M(C,E,A,q):null;case V:return A=Kl(A),w(C,E,A,q)}if(ue(A)||J(A))return ie!==null?null:H(C,E,A,q,null);if(typeof A.then=="function")return w(C,E,vs(A),q);if(A.$$typeof===Q)return w(C,E,ms(C,A),q);ys(C,A)}return null}function D(C,E,A,q,ie){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return C=C.get(A)||null,p(E,C,""+q,ie);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case z:return C=C.get(q.key===null?A:q.key)||null,j(E,C,q,ie);case k:return C=C.get(q.key===null?A:q.key)||null,M(E,C,q,ie);case V:return q=Kl(q),D(C,E,A,q,ie)}if(ue(q)||J(q))return C=C.get(A)||null,H(E,C,q,ie,null);if(typeof q.then=="function")return D(C,E,A,vs(q),ie);if(q.$$typeof===Q)return D(C,E,A,ms(E,q),ie);ys(E,q)}return null}function ee(C,E,A,q){for(var ie=null,je=null,ae=E,me=E=0,ye=null;ae!==null&&me<A.length;me++){ae.index>me?(ye=ae,ae=null):ye=ae.sibling;var Se=w(C,ae,A[me],q);if(Se===null){ae===null&&(ae=ye);break}e&&ae&&Se.alternate===null&&t(C,ae),E=i(Se,E,me),je===null?ie=Se:je.sibling=Se,je=Se,ae=ye}if(me===A.length)return l(C,ae),ge&&Kt(C,me),ie;if(ae===null){for(;me<A.length;me++)ae=Y(C,A[me],q),ae!==null&&(E=i(ae,E,me),je===null?ie=ae:je.sibling=ae,je=ae);return ge&&Kt(C,me),ie}for(ae=a(ae);me<A.length;me++)ye=D(ae,C,me,A[me],q),ye!==null&&(e&&ye.alternate!==null&&ae.delete(ye.key===null?me:ye.key),E=i(ye,E,me),je===null?ie=ye:je.sibling=ye,je=ye);return e&&ae.forEach(function(zl){return t(C,zl)}),ge&&Kt(C,me),ie}function ce(C,E,A,q){if(A==null)throw Error(c(151));for(var ie=null,je=null,ae=E,me=E=0,ye=null,Se=A.next();ae!==null&&!Se.done;me++,Se=A.next()){ae.index>me?(ye=ae,ae=null):ye=ae.sibling;var zl=w(C,ae,Se.value,q);if(zl===null){ae===null&&(ae=ye);break}e&&ae&&zl.alternate===null&&t(C,ae),E=i(zl,E,me),je===null?ie=zl:je.sibling=zl,je=zl,ae=ye}if(Se.done)return l(C,ae),ge&&Kt(C,me),ie;if(ae===null){for(;!Se.done;me++,Se=A.next())Se=Y(C,Se.value,q),Se!==null&&(E=i(Se,E,me),je===null?ie=Se:je.sibling=Se,je=Se);return ge&&Kt(C,me),ie}for(ae=a(ae);!Se.done;me++,Se=A.next())Se=D(ae,C,me,Se.value,q),Se!==null&&(e&&Se.alternate!==null&&ae.delete(Se.key===null?me:Se.key),E=i(Se,E,me),je===null?ie=Se:je.sibling=Se,je=Se);return e&&ae.forEach(function(_x){return t(C,_x)}),ge&&Kt(C,me),ie}function we(C,E,A,q){if(typeof A=="object"&&A!==null&&A.type===R&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case z:e:{for(var ie=A.key;E!==null;){if(E.key===ie){if(ie=A.type,ie===R){if(E.tag===7){l(C,E.sibling),q=n(E,A.props.children),q.return=C,C=q;break e}}else if(E.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===V&&Kl(ie)===E.type){l(C,E.sibling),q=n(E,A.props),cn(q,A),q.return=C,C=q;break e}l(C,E);break}else t(C,E);E=E.sibling}A.type===R?(q=Gl(A.props.children,C.mode,q,A.key),q.return=C,C=q):(q=os(A.type,A.key,A.props,null,C.mode,q),cn(q,A),q.return=C,C=q)}return o(C);case k:e:{for(ie=A.key;E!==null;){if(E.key===ie)if(E.tag===4&&E.stateNode.containerInfo===A.containerInfo&&E.stateNode.implementation===A.implementation){l(C,E.sibling),q=n(E,A.children||[]),q.return=C,C=q;break e}else{l(C,E);break}else t(C,E);E=E.sibling}q=er(A,C.mode,q),q.return=C,C=q}return o(C);case V:return A=Kl(A),we(C,E,A,q)}if(ue(A))return ee(C,E,A,q);if(J(A)){if(ie=J(A),typeof ie!="function")throw Error(c(150));return A=ie.call(A),ce(C,E,A,q)}if(typeof A.then=="function")return we(C,E,vs(A),q);if(A.$$typeof===Q)return we(C,E,ms(C,A),q);ys(C,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,E!==null&&E.tag===6?(l(C,E.sibling),q=n(E,A),q.return=C,C=q):(l(C,E),q=Ii(A,C.mode,q),q.return=C,C=q),o(C)):l(C,E)}return function(C,E,A,q){try{un=0;var ie=we(C,E,A,q);return Ea=null,ie}catch(ae){if(ae===Na||ae===ps)throw ae;var je=pt(29,ae,null,C.mode);return je.lanes=q,je.return=C,je}finally{}}}var Jl=Co(!0),Ro=Co(!1),xl=!1;function dr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mr(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 vl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yl(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=cs(e),co(e,null,l),t}return us(e,a,t,l),cs(e)}function on(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,vc(e,l)}}function hr(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 o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=o:i=i.next=o,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 pr=!1;function fn(){if(pr){var e=Sa;if(e!==null)throw e}}function dn(e,t,l,a){pr=!1;var n=e.updateQueue;xl=!1;var i=n.firstBaseUpdate,o=n.lastBaseUpdate,p=n.shared.pending;if(p!==null){n.shared.pending=null;var j=p,M=j.next;j.next=null,o===null?i=M:o.next=M,o=j;var H=e.alternate;H!==null&&(H=H.updateQueue,p=H.lastBaseUpdate,p!==o&&(p===null?H.firstBaseUpdate=M:p.next=M,H.lastBaseUpdate=j))}if(i!==null){var Y=n.baseState;o=0,H=M=j=null,p=i;do{var w=p.lane&-536870913,D=w!==p.lane;if(D?(ve&w)===w:(a&w)===w){w!==0&&w===ja&&(pr=!0),H!==null&&(H=H.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ee=e,ce=p;w=t;var we=l;switch(ce.tag){case 1:if(ee=ce.payload,typeof ee=="function"){Y=ee.call(we,Y,w);break e}Y=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ce.payload,w=typeof ee=="function"?ee.call(we,Y,w):ee,w==null)break e;Y=v({},Y,w);break e;case 2:xl=!0}}w=p.callback,w!==null&&(e.flags|=64,D&&(e.flags|=8192),D=n.callbacks,D===null?n.callbacks=[w]:D.push(w))}else D={lane:w,tag:p.tag,payload:p.payload,callback:p.callback,next:null},H===null?(M=H=D,j=Y):H=H.next=D,o|=w;if(p=p.next,p===null){if(p=n.shared.pending,p===null)break;D=p,p=D.next,D.next=null,n.lastBaseUpdate=D,n.shared.pending=null}}while(!0);H===null&&(j=Y),n.baseState=j,n.firstBaseUpdate=M,n.lastBaseUpdate=H,i===null&&(n.shared.lanes=0),Nl|=o,e.lanes=o,e.memoizedState=Y}}function Ao(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Mo(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Ao(l[e],t)}var Ta=N(null),gs=N(0);function wo(e,t){e=nl,W(gs,e),W(Ta,t),nl=e|t.baseLanes}function xr(){W(gs,nl),W(Ta,Ta.current)}function vr(){nl=gs.current,X(Ta),X(gs)}var xt=N(null),At=null;function gl(e){var t=e.alternate;W(He,He.current&1),W(xt,e),At===null&&(t===null||Ta.current!==null||t.memoizedState!==null)&&(At=e)}function yr(e){W(He,He.current),W(xt,e),At===null&&(At=e)}function _o(e){e.tag===22?(W(He,He.current),W(xt,e),At===null&&(At=e)):bl()}function bl(){W(He,He.current),W(xt,xt.current)}function vt(e){X(xt),At===e&&(At=null),X(He)}var He=N(0);function bs(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Eu(l)||Tu(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 Wt=0,de=null,Ae=null,Ge=null,js=!1,Ca=!1,Wl=!1,Ss=0,mn=0,Ra=null,jp=0;function Le(){throw Error(c(321))}function gr(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!ht(e[l],t[l]))return!1;return!0}function br(e,t,l,a,n,i){return Wt=i,de=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?pf:Or,Wl=!1,i=l(a,n),Wl=!1,Ca&&(i=zo(t,l,a,n)),ko(e),i}function ko(e){O.H=xn;var t=Ae!==null&&Ae.next!==null;if(Wt=0,Ge=Ae=de=null,js=!1,mn=0,Ra=null,t)throw Error(c(300));e===null||Xe||(e=e.dependencies,e!==null&&ds(e)&&(Xe=!0))}function zo(e,t,l,a){de=e;var n=0;do{if(Ca&&(Ra=null),mn=0,Ca=!1,25<=n)throw Error(c(301));if(n+=1,Ge=Ae=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}O.H=xf,i=t(l,a)}while(Ca);return i}function Sp(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?hn(t):t,e=e.useState()[0],(Ae!==null?Ae.memoizedState:null)!==e&&(de.flags|=1024),t}function jr(){var e=Ss!==0;return Ss=0,e}function Sr(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Nr(e){if(js){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}js=!1}Wt=0,Ge=Ae=de=null,Ca=!1,mn=Ss=0,Ra=null}function lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?de.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function qe(){if(Ae===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=Ge===null?de.memoizedState:Ge.next;if(t!==null)Ge=t,Ae=e;else{if(e===null)throw de.alternate===null?Error(c(467)):Error(c(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},Ge===null?de.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function Ns(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hn(e){var t=mn;return mn+=1,Ra===null&&(Ra=[]),e=No(Ra,e,t),t=de,(Ge===null?t.memoizedState:Ge.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?pf:Or),e}function Es(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return hn(e);if(e.$$typeof===Q)return Fe(e)}throw Error(c(438,String(e)))}function Er(e){var t=null,l=de.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=de.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=Ns(),de.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]=I;return t.index++,l}function Ft(e,t){return typeof t=="function"?t(e):t}function Ts(e){var t=qe();return Tr(t,Ae,e)}function Tr(e,t,l){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var o=n.next;n.next=i.next,i.next=o}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var p=o=null,j=null,M=t,H=!1;do{var Y=M.lane&-536870913;if(Y!==M.lane?(ve&Y)===Y:(Wt&Y)===Y){var w=M.revertLane;if(w===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),Y===ja&&(H=!0);else if((Wt&w)===w){M=M.next,w===ja&&(H=!0);continue}else Y={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},j===null?(p=j=Y,o=i):j=j.next=Y,de.lanes|=w,Nl|=w;Y=M.action,Wl&&l(i,Y),i=M.hasEagerState?M.eagerState:l(i,Y)}else w={lane:Y,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},j===null?(p=j=w,o=i):j=j.next=w,de.lanes|=Y,Nl|=Y;M=M.next}while(M!==null&&M!==t);if(j===null?o=i:j.next=p,!ht(i,e.memoizedState)&&(Xe=!0,H&&(l=Sa,l!==null)))throw l;e.memoizedState=i,e.baseState=o,e.baseQueue=j,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Cr(e){var t=qe(),l=t.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var o=n=n.next;do i=e(i,o.action),o=o.next;while(o!==n);ht(i,t.memoizedState)||(Xe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function Do(e,t,l){var a=de,n=qe(),i=ge;if(i){if(l===void 0)throw Error(c(407));l=l()}else l=t();var o=!ht((Ae||n).memoizedState,l);if(o&&(n.memoizedState=l,Xe=!0),n=n.queue,Mr(Uo.bind(null,a,n,e),[e]),n.getSnapshot!==t||o||Ge!==null&&Ge.memoizedState.tag&1){if(a.flags|=2048,Aa(9,{destroy:void 0},Lo.bind(null,a,n,l,t),null),_e===null)throw Error(c(349));i||(Wt&127)!==0||Oo(a,t,l)}return l}function Oo(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=de.updateQueue,t===null?(t=Ns(),de.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Lo(e,t,l,a){t.value=l,t.getSnapshot=a,Bo(t)&&Ho(e)}function Uo(e,t,l){return l(function(){Bo(t)&&Ho(e)})}function Bo(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!ht(e,l)}catch{return!0}}function Ho(e){var t=Yl(e,2);t!==null&&ot(t,e,2)}function Rr(e){var t=lt();if(typeof e=="function"){var l=e;if(e=l(),Wl){cl(!0);try{l()}finally{cl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:e},t}function qo(e,t,l,a){return e.baseState=l,Tr(e,Ae,typeof a=="function"?a:Ft)}function Np(e,t,l,a,n){if(As(e))throw Error(c(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(o){i.listeners.push(o)}};O.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,Yo(t,i)):(i.next=l.next,t.pending=l.next=i)}}function Yo(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=O.T,o={};O.T=o;try{var p=l(n,a),j=O.S;j!==null&&j(o,p),Go(e,t,p)}catch(M){Ar(e,t,M)}finally{i!==null&&o.types!==null&&(i.types=o.types),O.T=i}}else try{i=l(n,a),Go(e,t,i)}catch(M){Ar(e,t,M)}}function Go(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Xo(e,t,a)},function(a){return Ar(e,t,a)}):Xo(e,t,l)}function Xo(e,t,l){t.status="fulfilled",t.value=l,Qo(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Yo(e,l)))}function Ar(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Qo(t),t=t.next;while(t!==a)}e.action=null}function Qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Vo(e,t){return t}function Zo(e,t){if(ge){var l=_e.formState;if(l!==null){e:{var a=de;if(ge){if(ke){t:{for(var n=ke,i=Rt;n.nodeType!==8;){if(!i){n=null;break t}if(n=Mt(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){ke=Mt(n.nextSibling),a=n.data==="F!";break e}}hl(a)}a=!1}a&&(t=l[0])}}return l=lt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:t},l.queue=a,l=df.bind(null,de,a),a.dispatch=l,a=Rr(!1),i=Dr.bind(null,de,!1,a.queue),a=lt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=Np.bind(null,de,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function Ko(e){var t=qe();return $o(t,Ae,e)}function $o(e,t,l){if(t=Tr(e,t,Vo)[0],e=Ts(Ft)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=hn(t)}catch(o){throw o===Na?ps:o}else a=t;t=qe();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(de.flags|=2048,Aa(9,{destroy:void 0},Ep.bind(null,n,l),null)),[a,i,e]}function Ep(e,t){e.action=t}function Jo(e){var t=qe(),l=Ae;if(l!==null)return $o(t,l,e);qe(),t=t.memoizedState,l=qe();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Aa(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=de.updateQueue,t===null&&(t=Ns(),de.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 Wo(){return qe().memoizedState}function Cs(e,t,l,a){var n=lt();de.flags|=e,n.memoizedState=Aa(1|t,{destroy:void 0},l,a===void 0?null:a)}function Rs(e,t,l,a){var n=qe();a=a===void 0?null:a;var i=n.memoizedState.inst;Ae!==null&&a!==null&&gr(a,Ae.memoizedState.deps)?n.memoizedState=Aa(t,i,l,a):(de.flags|=e,n.memoizedState=Aa(1|t,i,l,a))}function Fo(e,t){Cs(8390656,8,e,t)}function Mr(e,t){Rs(2048,8,e,t)}function Tp(e){de.flags|=4;var t=de.updateQueue;if(t===null)t=Ns(),de.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Po(e){var t=qe().memoizedState;return Tp({ref:t,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function Io(e,t){return Rs(4,2,e,t)}function ef(e,t){return Rs(4,4,e,t)}function tf(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 lf(e,t,l){l=l!=null?l.concat([e]):null,Rs(4,4,tf.bind(null,t,e),l)}function wr(){}function af(e,t){var l=qe();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&gr(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function nf(e,t){var l=qe();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&gr(t,a[1]))return a[0];if(a=e(),Wl){cl(!0);try{e()}finally{cl(!1)}}return l.memoizedState=[a,t],a}function _r(e,t,l){return l===void 0||(Wt&1073741824)!==0&&(ve&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=id(),de.lanes|=e,Nl|=e,l)}function sf(e,t,l,a){return ht(l,t)?l:Ta.current!==null?(e=_r(e,l,a),ht(e,t)||(Xe=!0),e):(Wt&42)===0||(Wt&1073741824)!==0&&(ve&261930)===0?(Xe=!0,e.memoizedState=l):(e=id(),de.lanes|=e,Nl|=e,t)}function rf(e,t,l,a,n){var i=$.p;$.p=i!==0&&8>i?i:8;var o=O.T,p={};O.T=p,Dr(e,!1,t,l);try{var j=n(),M=O.S;if(M!==null&&M(p,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var H=bp(j,a);pn(e,t,H,bt(e))}else pn(e,t,a,bt(e))}catch(Y){pn(e,t,{then:function(){},status:"rejected",reason:Y},bt())}finally{$.p=i,o!==null&&p.types!==null&&(o.types=p.types),O.T=o}}function Cp(){}function kr(e,t,l,a){if(e.tag!==5)throw Error(c(476));var n=uf(e).queue;rf(e,n,t,re,l===null?Cp:function(){return cf(e),l(a)})}function uf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:re},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function cf(e){var t=uf(e);t.next===null&&(t=e.alternate.memoizedState),pn(e,t.next.queue,{},bt())}function zr(){return Fe(kn)}function of(){return qe().memoizedState}function ff(){return qe().memoizedState}function Rp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=bt();e=vl(l);var a=yl(t,e,l);a!==null&&(ot(a,t,l),on(a,t,l)),t={cache:ur()},e.payload=t;return}t=t.return}}function Ap(e,t,l){var a=bt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},As(e)?mf(t,l):(l=Fi(e,t,l,a),l!==null&&(ot(l,e,a),hf(l,t,a)))}function df(e,t,l){var a=bt();pn(e,t,l,a)}function pn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(As(e))mf(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,p=i(o,l);if(n.hasEagerState=!0,n.eagerState=p,ht(p,o))return us(e,t,n,0),_e===null&&rs(),!1}catch{}finally{}if(l=Fi(e,t,n,a),l!==null)return ot(l,e,a),hf(l,t,a),!0}return!1}function Dr(e,t,l,a){if(a={lane:2,revertLane:du(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},As(e)){if(t)throw Error(c(479))}else t=Fi(e,l,a,2),t!==null&&ot(t,e,2)}function As(e){var t=e.alternate;return e===de||t!==null&&t===de}function mf(e,t){Ca=js=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function hf(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,vc(e,l)}}var xn={readContext:Fe,use:Es,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useLayoutEffect:Le,useInsertionEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useSyncExternalStore:Le,useId:Le,useHostTransitionStatus:Le,useFormState:Le,useActionState:Le,useOptimistic:Le,useMemoCache:Le,useCacheRefresh:Le};xn.useEffectEvent=Le;var pf={readContext:Fe,use:Es,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Fe,useEffect:Fo,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Cs(4194308,4,tf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Cs(4194308,4,e,t)},useInsertionEffect:function(e,t){Cs(4,2,e,t)},useMemo:function(e,t){var l=lt();t=t===void 0?null:t;var a=e();if(Wl){cl(!0);try{e()}finally{cl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=lt();if(l!==void 0){var n=l(t);if(Wl){cl(!0);try{l(t)}finally{cl(!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=Ap.bind(null,de,e),[a.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:function(e){e=Rr(e);var t=e.queue,l=df.bind(null,de,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:wr,useDeferredValue:function(e,t){var l=lt();return _r(l,e,t)},useTransition:function(){var e=Rr(!1);return e=rf.bind(null,de,e.queue,!0,!1),lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=de,n=lt();if(ge){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),_e===null)throw Error(c(349));(ve&127)!==0||Oo(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,Fo(Uo.bind(null,a,i,e),[e]),a.flags|=2048,Aa(9,{destroy:void 0},Lo.bind(null,a,i,l,t),null),l},useId:function(){var e=lt(),t=_e.identifierPrefix;if(ge){var l=Ut,a=Lt;l=(a&~(1<<32-mt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ss++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=jp++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:zr,useFormState:Zo,useActionState:Zo,useOptimistic:function(e){var t=lt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Dr.bind(null,de,!0,l),l.dispatch=t,[e,t]},useMemoCache:Er,useCacheRefresh:function(){return lt().memoizedState=Rp.bind(null,de)},useEffectEvent:function(e){var t=lt(),l={impl:e};return t.memoizedState=l,function(){if((Ne&2)!==0)throw Error(c(440));return l.impl.apply(void 0,arguments)}}},Or={readContext:Fe,use:Es,useCallback:af,useContext:Fe,useEffect:Mr,useImperativeHandle:lf,useInsertionEffect:Io,useLayoutEffect:ef,useMemo:nf,useReducer:Ts,useRef:Wo,useState:function(){return Ts(Ft)},useDebugValue:wr,useDeferredValue:function(e,t){var l=qe();return sf(l,Ae.memoizedState,e,t)},useTransition:function(){var e=Ts(Ft)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:hn(e),t]},useSyncExternalStore:Do,useId:of,useHostTransitionStatus:zr,useFormState:Ko,useActionState:Ko,useOptimistic:function(e,t){var l=qe();return qo(l,Ae,e,t)},useMemoCache:Er,useCacheRefresh:ff};Or.useEffectEvent=Po;var xf={readContext:Fe,use:Es,useCallback:af,useContext:Fe,useEffect:Mr,useImperativeHandle:lf,useInsertionEffect:Io,useLayoutEffect:ef,useMemo:nf,useReducer:Cr,useRef:Wo,useState:function(){return Cr(Ft)},useDebugValue:wr,useDeferredValue:function(e,t){var l=qe();return Ae===null?_r(l,e,t):sf(l,Ae.memoizedState,e,t)},useTransition:function(){var e=Cr(Ft)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:hn(e),t]},useSyncExternalStore:Do,useId:of,useHostTransitionStatus:zr,useFormState:Jo,useActionState:Jo,useOptimistic:function(e,t){var l=qe();return Ae!==null?qo(l,Ae,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Er,useCacheRefresh:ff};xf.useEffectEvent=Po;function Lr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:v({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Ur={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=bt(),n=vl(a);n.payload=t,l!=null&&(n.callback=l),t=yl(e,n,a),t!==null&&(ot(t,e,a),on(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=bt(),n=vl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=yl(e,n,a),t!==null&&(ot(t,e,a),on(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=bt(),a=vl(l);a.tag=2,t!=null&&(a.callback=t),t=yl(e,a,l),t!==null&&(ot(t,e,l),on(t,e,l))}};function vf(e,t,l,a,n,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,o):t.prototype&&t.prototype.isPureReactComponent?!tn(l,a)||!tn(n,i):!0}function yf(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&&Ur.enqueueReplaceState(t,t.state,null)}function Fl(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=v({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function gf(e){is(e)}function bf(e){console.error(e)}function jf(e){is(e)}function Ms(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Sf(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 Br(e,t,l){return l=vl(l),l.tag=3,l.payload={element:null},l.callback=function(){Ms(e,t)},l}function Nf(e){return e=vl(e),e.tag=3,e}function Ef(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(){Sf(t,l,a)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Sf(t,l,a),typeof n!="function"&&(El===null?El=new Set([this]):El.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function Mp(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&ba(t,l,n,!0),l=xt.current,l!==null){switch(l.tag){case 31:case 13:return At===null?Ys():l.alternate===null&&Ue===0&&(Ue=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===xs?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),cu(e,a,n)),!1;case 22:return l.flags|=65536,a===xs?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)),cu(e,a,n)),!1}throw Error(c(435,l.tag))}return cu(e,a,n),Ys(),!1}if(ge)return t=xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==ar&&(e=Error(c(422),{cause:a}),nn(Et(e,l)))):(a!==ar&&(t=Error(c(423),{cause:a}),nn(Et(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Et(a,l),n=Br(e.stateNode,a,n),hr(e,n),Ue!==4&&(Ue=2)),!1;var i=Error(c(520),{cause:a});if(i=Et(i,l),En===null?En=[i]:En.push(i),Ue!==4&&(Ue=2),t===null)return!0;a=Et(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=Br(l.stateNode,a,e),hr(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"&&(El===null||!El.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Nf(n),Ef(n,e,l,a),hr(l,n),!1}l=l.return}while(l!==null);return!1}var Hr=Error(c(461)),Xe=!1;function Pe(e,t,l,a){t.child=e===null?Ro(t,null,l,a):Jl(t,e.child,l,a)}function Tf(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var o={};for(var p in a)p!=="ref"&&(o[p]=a[p])}else o=a;return Vl(t),a=br(e,t,l,o,i,n),p=jr(),e!==null&&!Xe?(Sr(e,t,n),Pt(e,t,n)):(ge&&p&&tr(t),t.flags|=1,Pe(e,t,a,n),t.child)}function Cf(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!Pi(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Rf(e,t,i,a,n)):(e=os(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Kr(e,n)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:tn,l(o,a)&&e.ref===t.ref)return Pt(e,t,n)}return t.flags|=1,e=Zt(i,a),e.ref=t.ref,e.return=t,t.child=e}function Rf(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(tn(i,a)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=a=i,Kr(e,n))(e.flags&131072)!==0&&(Xe=!0);else return t.lanes=e.lanes,Pt(e,t,n)}return qr(e,t,l,a,n)}function Af(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 Mf(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&hs(t,i!==null?i.cachePool:null),i!==null?wo(t,i):xr(),_o(t);else return a=t.lanes=536870912,Mf(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(hs(t,i.cachePool),wo(t,i),bl(),t.memoizedState=null):(e!==null&&hs(t,null),xr(),bl());return Pe(e,t,n,l),t.child}function vn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mf(e,t,l,a,n){var i=or();return i=i===null?null:{parent:Ye._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&hs(t,null),xr(),_o(t),e!==null&&ba(e,t,a,!0),t.childLanes=n,null}function ws(e,t){return t=ks({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function wf(e,t,l){return Jl(t,e.child,null,l),e=ws(t,t.pendingProps),e.flags|=2,vt(t),t.memoizedState=null,e}function wp(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ge){if(a.mode==="hidden")return e=ws(t,a),t.lanes=536870912,vn(null,e);if(yr(t),(e=ke)?(e=Gd(e,Rt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:dl!==null?{id:Lt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},l=fo(e),l.return=t,t.child=l,We=t,ke=null)):e=null,e===null)throw hl(t);return t.lanes=536870912,null}return ws(t,a)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(yr(t),n)if(t.flags&256)t.flags&=-257,t=wf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Xe||ba(e,t,l,!1),n=(l&e.childLanes)!==0,Xe||n){if(a=_e,a!==null&&(o=yc(a,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,Yl(e,o),ot(a,e,o),Hr;Ys(),t=wf(e,t,l)}else e=i.treeContext,ke=Mt(o.nextSibling),We=t,ge=!0,ml=null,Rt=!1,e!==null&&po(t,e),t=ws(t,a),t.flags|=4096;return t}return e=Zt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function _s(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(c(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function qr(e,t,l,a,n){return Vl(t),l=br(e,t,l,a,void 0,n),a=jr(),e!==null&&!Xe?(Sr(e,t,n),Pt(e,t,n)):(ge&&a&&tr(t),t.flags|=1,Pe(e,t,l,n),t.child)}function _f(e,t,l,a,n,i){return Vl(t),t.updateQueue=null,l=zo(t,a,l,n),ko(e),a=jr(),e!==null&&!Xe?(Sr(e,t,i),Pt(e,t,i)):(ge&&a&&tr(t),t.flags|=1,Pe(e,t,l,i),t.child)}function kf(e,t,l,a,n){if(Vl(t),t.stateNode===null){var i=xa,o=l.contextType;typeof o=="object"&&o!==null&&(i=Fe(o)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Ur,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},dr(t),o=l.contextType,i.context=typeof o=="object"&&o!==null?Fe(o):xa,i.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(Lr(t,l,o,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&Ur.enqueueReplaceState(i,i.state,null),dn(t,a,i,n),fn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var p=t.memoizedProps,j=Fl(l,p);i.props=j;var M=i.context,H=l.contextType;o=xa,typeof H=="object"&&H!==null&&(o=Fe(H));var Y=l.getDerivedStateFromProps;H=typeof Y=="function"||typeof i.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,H||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(p||M!==o)&&yf(t,i,a,o),xl=!1;var w=t.memoizedState;i.state=w,dn(t,a,i,n),fn(),M=t.memoizedState,p||w!==M||xl?(typeof Y=="function"&&(Lr(t,l,Y,a),M=t.memoizedState),(j=xl||vf(t,l,j,a,w,M,o))?(H||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=M),i.props=a,i.state=M,i.context=o,a=j):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,mr(e,t),o=t.memoizedProps,H=Fl(l,o),i.props=H,Y=t.pendingProps,w=i.context,M=l.contextType,j=xa,typeof M=="object"&&M!==null&&(j=Fe(M)),p=l.getDerivedStateFromProps,(M=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==Y||w!==j)&&yf(t,i,a,j),xl=!1,w=t.memoizedState,i.state=w,dn(t,a,i,n),fn();var D=t.memoizedState;o!==Y||w!==D||xl||e!==null&&e.dependencies!==null&&ds(e.dependencies)?(typeof p=="function"&&(Lr(t,l,p,a),D=t.memoizedState),(H=xl||vf(t,l,H,a,w,D,j)||e!==null&&e.dependencies!==null&&ds(e.dependencies))?(M||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,D,j),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,D,j)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=D),i.props=a,i.state=D,i.context=j,a=H):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,_s(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=Jl(t,e.child,null,n),t.child=Jl(t,null,l,n)):Pe(e,t,l,n),t.memoizedState=i.state,e=t.child):e=Pt(e,t,n),e}function zf(e,t,l,a){return Xl(),t.flags|=256,Pe(e,t,l,a),t.child}var Yr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gr(e){return{baseLanes:e,cachePool:jo()}}function Xr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=gt),e}function Df(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(He.current&2)!==0),o&&(n=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(ge){if(n?gl(t):bl(),(e=ke)?(e=Gd(e,Rt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:dl!==null?{id:Lt,overflow:Ut}:null,retryLane:536870912,hydrationErrors:null},l=fo(e),l.return=t,t.child=l,We=t,ke=null)):e=null,e===null)throw hl(t);return Tu(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,n?(bl(),n=t.mode,p=ks({mode:"hidden",children:p},n),a=Gl(a,n,l,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=Gr(l),a.childLanes=Xr(e,o,l),t.memoizedState=Yr,vn(null,a)):(gl(t),Qr(t,p))}var j=e.memoizedState;if(j!==null&&(p=j.dehydrated,p!==null)){if(i)t.flags&256?(gl(t),t.flags&=-257,t=Vr(e,t,l)):t.memoizedState!==null?(bl(),t.child=e.child,t.flags|=128,t=null):(bl(),p=a.fallback,n=t.mode,a=ks({mode:"visible",children:a.children},n),p=Gl(p,n,l,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,Jl(t,e.child,null,l),a=t.child,a.memoizedState=Gr(l),a.childLanes=Xr(e,o,l),t.memoizedState=Yr,t=vn(null,a));else if(gl(t),Tu(p)){if(o=p.nextSibling&&p.nextSibling.dataset,o)var M=o.dgst;o=M,a=Error(c(419)),a.stack="",a.digest=o,nn({value:a,source:null,stack:null}),t=Vr(e,t,l)}else if(Xe||ba(e,t,l,!1),o=(l&e.childLanes)!==0,Xe||o){if(o=_e,o!==null&&(a=yc(o,l),a!==0&&a!==j.retryLane))throw j.retryLane=a,Yl(e,a),ot(o,e,a),Hr;Eu(p)||Ys(),t=Vr(e,t,l)}else Eu(p)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,ke=Mt(p.nextSibling),We=t,ge=!0,ml=null,Rt=!1,e!==null&&po(t,e),t=Qr(t,a.children),t.flags|=4096);return t}return n?(bl(),p=a.fallback,n=t.mode,j=e.child,M=j.sibling,a=Zt(j,{mode:"hidden",children:a.children}),a.subtreeFlags=j.subtreeFlags&65011712,M!==null?p=Zt(M,p):(p=Gl(p,n,l,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,vn(null,a),a=t.child,p=e.child.memoizedState,p===null?p=Gr(l):(n=p.cachePool,n!==null?(j=Ye._currentValue,n=n.parent!==j?{parent:j,pool:j}:n):n=jo(),p={baseLanes:p.baseLanes|l,cachePool:n}),a.memoizedState=p,a.childLanes=Xr(e,o,l),t.memoizedState=Yr,vn(e.child,a)):(gl(t),l=e.child,e=l.sibling,l=Zt(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=l,t.memoizedState=null,l)}function Qr(e,t){return t=ks({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ks(e,t){return e=pt(22,e,null,t),e.lanes=0,e}function Vr(e,t,l){return Jl(t,e.child,null,l),e=Qr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Of(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ir(e.return,t,l)}function Zr(e,t,l,a,n,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=l,o.tailMode=n,o.treeForkCount=i)}function Lf(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var o=He.current,p=(o&2)!==0;if(p?(o=o&1|2,t.flags|=128):o&=1,W(He,o),Pe(e,t,a,l),a=ge?an:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Of(e,l,t);else if(e.tag===19)Of(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&&bs(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),Zr(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&&bs(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}Zr(t,!0,l,null,i,a);break;case"together":Zr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Pt(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Nl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ba(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,l=Zt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Zt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Kr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ds(e)))}function _p(e,t,l){switch(t.tag){case 3:tt(t,t.stateNode.containerInfo),pl(t,Ye,e.memoizedState.cache),Xl();break;case 27:case 5:Ga(t);break;case 4:tt(t,t.stateNode.containerInfo);break;case 10:pl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,yr(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(gl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Df(e,t,l):(gl(t),e=Pt(e,t,l),e!==null?e.sibling:null);gl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(ba(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return Lf(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),W(He,He.current),a)break;return null;case 22:return t.lanes=0,Af(e,t,l,t.pendingProps);case 24:pl(t,Ye,e.memoizedState.cache)}return Pt(e,t,l)}function Uf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xe=!0;else{if(!Kr(e,l)&&(t.flags&128)===0)return Xe=!1,_p(e,t,l);Xe=(e.flags&131072)!==0}else Xe=!1,ge&&(t.flags&1048576)!==0&&ho(t,an,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Kl(t.elementType),t.type=e,typeof e=="function")Pi(e)?(a=Fl(e,a),t.tag=1,t=kf(null,t,e,a,l)):(t.tag=0,t=qr(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===te){t.tag=11,t=Tf(null,t,e,a,l);break e}else if(n===F){t.tag=14,t=Cf(null,t,e,a,l);break e}}throw t=P(e)||e,Error(c(306,t,""))}}return t;case 0:return qr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=Fl(a,t.pendingProps),kf(e,t,a,n,l);case 3:e:{if(tt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,mr(e,t),dn(t,a,null,l);var o=t.memoizedState;if(a=o.cache,pl(t,Ye,a),a!==i.cache&&rr(t,[Ye],l,!0),fn(),a=o.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=zf(e,t,a,l);break e}else if(a!==n){n=Et(Error(c(424)),t),nn(n),t=zf(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(ke=Mt(e.firstChild),We=t,ge=!0,ml=null,Rt=!0,l=Ro(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Xl(),a===n){t=Pt(e,t,l);break e}Pe(e,t,a,l)}t=t.child}return t;case 26:return _s(e,t),e===null?(l=$d(t.type,null,t.pendingProps,null))?t.memoizedState=l:ge||(l=t.type,e=t.pendingProps,a=$s(he.current).createElement(l),a[Je]=t,a[nt]=e,Ie(a,l,e),Ke(a),t.stateNode=a):t.memoizedState=$d(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ga(t),e===null&&ge&&(a=t.stateNode=Vd(t.type,t.pendingProps,he.current),We=t,Rt=!0,n=ke,Al(t.type)?(Cu=n,ke=Mt(a.firstChild)):ke=n),Pe(e,t,t.pendingProps.children,l),_s(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ge&&((n=a=ke)&&(a=rx(a,t.type,t.pendingProps,Rt),a!==null?(t.stateNode=a,We=t,ke=Mt(a.firstChild),Rt=!1,n=!0):n=!1),n||hl(t)),Ga(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,ju(n,i)?a=null:o!==null&&ju(n,o)&&(t.flags|=32),t.memoizedState!==null&&(n=br(e,t,Sp,null,null,l),kn._currentValue=n),_s(e,t),Pe(e,t,a,l),t.child;case 6:return e===null&&ge&&((e=l=ke)&&(l=ux(l,t.pendingProps,Rt),l!==null?(t.stateNode=l,We=t,ke=null,e=!0):e=!1),e||hl(t)),null;case 13:return Df(e,t,l);case 4:return tt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Jl(t,null,a,l):Pe(e,t,a,l),t.child;case 11:return Tf(e,t,t.type,t.pendingProps,l);case 7:return Pe(e,t,t.pendingProps,l),t.child;case 8:return Pe(e,t,t.pendingProps.children,l),t.child;case 12:return Pe(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,pl(t,t.type,a.value),Pe(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,Vl(t),n=Fe(n),a=a(n),t.flags|=1,Pe(e,t,a,l),t.child;case 14:return Cf(e,t,t.type,t.pendingProps,l);case 15:return Rf(e,t,t.type,t.pendingProps,l);case 19:return Lf(e,t,l);case 31:return wp(e,t,l);case 22:return Af(e,t,l,t.pendingProps);case 24:return Vl(t),a=Fe(Ye),e===null?(n=or(),n===null&&(n=_e,i=ur(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},dr(t),pl(t,Ye,n)):((e.lanes&l)!==0&&(mr(e,t),dn(t,null,null,l),fn()),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),pl(t,Ye,a)):(a=i.cache,pl(t,Ye,a),a!==n.cache&&rr(t,[Ye],l,!0))),Pe(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function It(e){e.flags|=4}function $r(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(od())e.flags|=8192;else throw $l=xs,fr}else e.flags&=-16777217}function Bf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Id(t))if(od())e.flags|=8192;else throw $l=xs,fr}function zs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?pc():536870912,e.lanes|=t,ka|=t)}function yn(e,t){if(!ge)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 ze(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 kp(e,t,l){var a=t.pendingProps;switch(lr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Jt(Ye),Be(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ga(t)?It(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,nr())),ze(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(It(t),i!==null?(ze(t),Bf(t,i)):(ze(t),$r(t,n,null,a,l))):i?i!==e.memoizedState?(It(t),ze(t),Bf(t,i)):(ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&It(t),ze(t),$r(t,n,e,a,l)),null;case 27:if(Qn(t),l=he.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&It(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return ze(t),null}e=le.current,ga(t)?xo(t):(e=Vd(n,a,l),t.stateNode=e,It(t))}return ze(t),null;case 5:if(Qn(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&It(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return ze(t),null}if(i=le.current,ga(t))xo(t);else{var o=$s(he.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?o.createElement(n,{is:a.is}):o.createElement(n)}}i[Je]=t,i[nt]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=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&&It(t)}}return ze(t),$r(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&It(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=he.current,ga(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=We,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Je]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Dd(e.nodeValue,l)),e||hl(t,!0)}else e=$s(e).createTextNode(a),e[Je]=t,t.stateNode=e}return ze(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=ga(t),l!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[Je]=t}else Xl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else l=nr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(vt(t),t):(vt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return ze(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=ga(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(c(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));n[Je]=t}else Xl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),n=!1}else n=nr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(vt(t),t):(vt(t),null)}return vt(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),zs(t,t.updateQueue),ze(t),null);case 4:return Be(),e===null&&xu(t.stateNode.containerInfo),ze(t),null;case 10:return Jt(t.type),ze(t),null;case 19:if(X(He),a=t.memoizedState,a===null)return ze(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)yn(a,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=bs(e),i!==null){for(t.flags|=128,yn(a,!1),e=i.updateQueue,t.updateQueue=e,zs(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)oo(l,e),l=l.sibling;return W(He,He.current&1|2),ge&&Kt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ft()>Bs&&(t.flags|=128,n=!0,yn(a,!1),t.lanes=4194304)}else{if(!n)if(e=bs(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,zs(t,e),yn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!ge)return ze(t),null}else 2*ft()-a.renderingStartTime>Bs&&l!==536870912&&(t.flags|=128,n=!0,yn(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=ft(),e.sibling=null,l=He.current,W(He,n?l&1|2:l&1),ge&&Kt(t,a.treeForkCount),e):(ze(t),null);case 22:case 23:return vt(t),vr(),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&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),l=t.updateQueue,l!==null&&zs(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&&X(Zl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Jt(Ye),ze(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function zp(e,t){switch(lr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jt(Ye),Be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Qn(t),null;case 31:if(t.memoizedState!==null){if(vt(t),t.alternate===null)throw Error(c(340));Xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return X(He),null;case 4:return Be(),null;case 10:return Jt(t.type),null;case 22:case 23:return vt(t),vr(),e!==null&&X(Zl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jt(Ye),null;case 25:return null;default:return null}}function Hf(e,t){switch(lr(t),t.tag){case 3:Jt(Ye),Be();break;case 26:case 27:case 5:Qn(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&vt(t);break;case 13:vt(t);break;case 19:X(He);break;case 10:Jt(t.type);break;case 22:case 23:vt(t),vr(),e!==null&&X(Zl);break;case 24:Jt(Ye)}}function gn(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,o=l.inst;a=i(),o.destroy=a}l=l.next}while(l!==n)}}catch(p){Re(t,t.return,p)}}function jl(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 o=a.inst,p=o.destroy;if(p!==void 0){o.destroy=void 0,n=t;var j=l,M=p;try{M()}catch(H){Re(n,j,H)}}}a=a.next}while(a!==i)}}catch(H){Re(t,t.return,H)}}function qf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Mo(t,l)}catch(a){Re(e,e.return,a)}}}function Yf(e,t,l){l.props=Fl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Re(e,t,a)}}function bn(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){Re(e,t,n)}}function Bt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){Re(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){Re(e,t,n)}else l.current=null}function Gf(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){Re(e,e.return,n)}}function Jr(e,t,l){try{var a=e.stateNode;tx(a,e.type,l,t),a[nt]=t}catch(n){Re(e,e.return,n)}}function Xf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Al(e.type)||e.tag===4}function Wr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xf(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&&Al(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 Fr(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=Qt));else if(a!==4&&(a===27&&Al(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Fr(e,t,l),e=e.sibling;e!==null;)Fr(e,t,l),e=e.sibling}function Ds(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&&Al(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Ds(e,t,l),e=e.sibling;e!==null;)Ds(e,t,l),e=e.sibling}function Qf(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[nt]=l}catch(i){Re(e,e.return,i)}}var el=!1,Qe=!1,Pr=!1,Vf=typeof WeakSet=="function"?WeakSet:Set,$e=null;function Dp(e,t){if(e=e.containerInfo,gu=ti,e=to(e),Vi(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 o=0,p=-1,j=-1,M=0,H=0,Y=e,w=null;t:for(;;){for(var D;Y!==l||n!==0&&Y.nodeType!==3||(p=o+n),Y!==i||a!==0&&Y.nodeType!==3||(j=o+a),Y.nodeType===3&&(o+=Y.nodeValue.length),(D=Y.firstChild)!==null;)w=Y,Y=D;for(;;){if(Y===e)break t;if(w===l&&++M===n&&(p=o),w===i&&++H===a&&(j=o),(D=Y.nextSibling)!==null)break;Y=w,w=Y.parentNode}Y=D}l=p===-1||j===-1?null:{start:p,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(bu={focusedElem:e,selectionRange:l},ti=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){switch(t=$e,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 ee=Fl(l.type,n);e=a.getSnapshotBeforeUpdate(ee,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ce){Re(l,l.return,ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Nu(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Nu(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(c(163))}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}}function Zf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ll(e,l),a&4&&gn(5,l);break;case 1:if(ll(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){Re(l,l.return,o)}else{var n=Fl(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Re(l,l.return,o)}}a&64&&qf(l),a&512&&bn(l,l.return);break;case 3:if(ll(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{Mo(e,t)}catch(o){Re(l,l.return,o)}}break;case 27:t===null&&a&4&&Qf(l);case 26:case 5:ll(e,l),t===null&&a&4&&Gf(l),a&512&&bn(l,l.return);break;case 12:ll(e,l);break;case 31:ll(e,l),a&4&&Jf(e,l);break;case 13:ll(e,l),a&4&&Wf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Xp.bind(null,l),cx(e,l))));break;case 22:if(a=l.memoizedState!==null||el,!a){t=t!==null&&t.memoizedState!==null||Qe,n=el;var i=Qe;el=a,(Qe=t)&&!i?al(e,l,(l.subtreeFlags&8772)!==0):ll(e,l),el=n,Qe=i}break;case 30:break;default:ll(e,l)}}function Kf(e){var t=e.alternate;t!==null&&(e.alternate=null,Kf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ai(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,it=!1;function tl(e,t,l){for(l=l.child;l!==null;)$f(e,t,l),l=l.sibling}function $f(e,t,l){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Xa,l)}catch{}switch(l.tag){case 26:Qe||Bt(l,t),tl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Qe||Bt(l,t);var a=De,n=it;Al(l.type)&&(De=l.stateNode,it=!1),tl(e,t,l),Mn(l.stateNode),De=a,it=n;break;case 5:Qe||Bt(l,t);case 6:if(a=De,n=it,De=null,tl(e,t,l),De=a,it=n,De!==null)if(it)try{(De.nodeType===9?De.body:De.nodeName==="HTML"?De.ownerDocument.body:De).removeChild(l.stateNode)}catch(i){Re(l,t,i)}else try{De.removeChild(l.stateNode)}catch(i){Re(l,t,i)}break;case 18:De!==null&&(it?(e=De,qd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),qa(e)):qd(De,l.stateNode));break;case 4:a=De,n=it,De=l.stateNode.containerInfo,it=!0,tl(e,t,l),De=a,it=n;break;case 0:case 11:case 14:case 15:jl(2,l,t),Qe||jl(4,l,t),tl(e,t,l);break;case 1:Qe||(Bt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Yf(l,t,a)),tl(e,t,l);break;case 21:tl(e,t,l);break;case 22:Qe=(a=Qe)||l.memoizedState!==null,tl(e,t,l),Qe=a;break;default:tl(e,t,l)}}function Jf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{qa(e)}catch(l){Re(t,t.return,l)}}}function Wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{qa(e)}catch(l){Re(t,t.return,l)}}function Op(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Vf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Vf),t;default:throw Error(c(435,e.tag))}}function Os(e,t){var l=Op(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=Qp.bind(null,e,a);a.then(n,n)}})}function rt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,o=t,p=o;e:for(;p!==null;){switch(p.tag){case 27:if(Al(p.type)){De=p.stateNode,it=!1;break e}break;case 5:De=p.stateNode,it=!1;break e;case 3:case 4:De=p.stateNode.containerInfo,it=!0;break e}p=p.return}if(De===null)throw Error(c(160));$f(i,o,n),De=null,it=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ff(t,e),t=t.sibling}var Dt=null;function Ff(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:rt(t,e),ut(e),a&4&&(jl(3,e,e.return),gn(3,e),jl(5,e,e.return));break;case 1:rt(t,e),ut(e),a&512&&(Qe||l===null||Bt(l,l.return)),a&64&&el&&(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=Dt;if(rt(t,e),ut(e),a&512&&(Qe||l===null||Bt(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[Za]||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,Ke(i),a=i;break e;case"link":var o=Fd("link","href",n).get(a+(l.href||""));if(o){for(var p=0;p<o.length;p++)if(i=o[p],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)){o.splice(p,1);break t}}i=n.createElement(a),Ie(i,a,l),n.head.appendChild(i);break;case"meta":if(o=Fd("meta","content",n).get(a+(l.content||""))){for(p=0;p<o.length;p++)if(i=o[p],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)){o.splice(p,1);break t}}i=n.createElement(a),Ie(i,a,l),n.head.appendChild(i);break;default:throw Error(c(468,a))}i[Je]=e,Ke(i),a=i}e.stateNode=a}else Pd(n,e.type,e.stateNode);else e.stateNode=Wd(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Pd(n,e.type,e.stateNode):Wd(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Jr(e,e.memoizedProps,l.memoizedProps)}break;case 27:rt(t,e),ut(e),a&512&&(Qe||l===null||Bt(l,l.return)),l!==null&&a&4&&Jr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(rt(t,e),ut(e),a&512&&(Qe||l===null||Bt(l,l.return)),e.flags&32){n=e.stateNode;try{ca(n,"")}catch(ee){Re(e,e.return,ee)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Jr(e,n,l!==null?l.memoizedProps:n)),a&1024&&(Pr=!0);break;case 6:if(rt(t,e),ut(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ee){Re(e,e.return,ee)}}break;case 3:if(Fs=null,n=Dt,Dt=Js(t.containerInfo),rt(t,e),Dt=n,ut(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{qa(t.containerInfo)}catch(ee){Re(e,e.return,ee)}Pr&&(Pr=!1,Pf(e));break;case 4:a=Dt,Dt=Js(e.stateNode.containerInfo),rt(t,e),ut(e),Dt=a;break;case 12:rt(t,e),ut(e);break;case 31:rt(t,e),ut(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Os(e,a)));break;case 13:rt(t,e),ut(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Us=ft()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Os(e,a)));break;case 22:n=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,M=el,H=Qe;if(el=M||n,Qe=H||j,rt(t,e),Qe=H,el=M,ut(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||j||el||Qe||Pl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){j=l=t;try{if(i=j.stateNode,n)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{p=j.stateNode;var Y=j.memoizedProps.style,w=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;p.style.display=w==null||typeof w=="boolean"?"":(""+w).trim()}}catch(ee){Re(j,j.return,ee)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=n?"":j.memoizedProps}catch(ee){Re(j,j.return,ee)}}}else if(t.tag===18){if(l===null){j=t;try{var D=j.stateNode;n?Yd(D,!0):Yd(j.stateNode,!1)}catch(ee){Re(j,j.return,ee)}}}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,Os(e,l))));break;case 19:rt(t,e),ut(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Os(e,a)));break;case 30:break;case 21:break;default:rt(t,e),ut(e)}}function ut(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Xf(a)){l=a;break}a=a.return}if(l==null)throw Error(c(160));switch(l.tag){case 27:var n=l.stateNode,i=Wr(e);Ds(e,i,n);break;case 5:var o=l.stateNode;l.flags&32&&(ca(o,""),l.flags&=-33);var p=Wr(e);Ds(e,p,o);break;case 3:case 4:var j=l.stateNode.containerInfo,M=Wr(e);Fr(e,M,j);break;default:throw Error(c(161))}}catch(H){Re(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Pf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ll(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Zf(e,t.alternate,t),t=t.sibling}function Pl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:jl(4,t,t.return),Pl(t);break;case 1:Bt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Yf(t,t.return,l),Pl(t);break;case 27:Mn(t.stateNode);case 26:case 5:Bt(t,t.return),Pl(t);break;case 22:t.memoizedState===null&&Pl(t);break;case 30:Pl(t);break;default:Pl(t)}e=e.sibling}}function al(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:al(n,i,l),gn(4,i);break;case 1:if(al(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(M){Re(a,a.return,M)}if(a=i,n=a.updateQueue,n!==null){var p=a.stateNode;try{var j=n.shared.hiddenCallbacks;if(j!==null)for(n.shared.hiddenCallbacks=null,n=0;n<j.length;n++)Ao(j[n],p)}catch(M){Re(a,a.return,M)}}l&&o&64&&qf(i),bn(i,i.return);break;case 27:Qf(i);case 26:case 5:al(n,i,l),l&&a===null&&o&4&&Gf(i),bn(i,i.return);break;case 12:al(n,i,l);break;case 31:al(n,i,l),l&&o&4&&Jf(n,i);break;case 13:al(n,i,l),l&&o&4&&Wf(n,i);break;case 22:i.memoizedState===null&&al(n,i,l),bn(i,i.return);break;case 30:break;default:al(n,i,l)}t=t.sibling}}function Ir(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&&sn(l))}function eu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sn(e))}function Ot(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)If(e,t,l,a),t=t.sibling}function If(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Ot(e,t,l,a),n&2048&&gn(9,t);break;case 1:Ot(e,t,l,a);break;case 3:Ot(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&&sn(e)));break;case 12:if(n&2048){Ot(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,p=i.onPostCommit;typeof p=="function"&&p(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Re(t,t.return,j)}}else Ot(e,t,l,a);break;case 31:Ot(e,t,l,a);break;case 13:Ot(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?Ot(e,t,l,a):jn(e,t):i._visibility&2?Ot(e,t,l,a):(i._visibility|=2,Ma(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Ir(o,t);break;case 24:Ot(e,t,l,a),n&2048&&eu(t.alternate,t);break;default:Ot(e,t,l,a)}}function Ma(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,p=l,j=a,M=o.flags;switch(o.tag){case 0:case 11:case 15:Ma(i,o,p,j,n),gn(8,o);break;case 23:break;case 22:var H=o.stateNode;o.memoizedState!==null?H._visibility&2?Ma(i,o,p,j,n):jn(i,o):(H._visibility|=2,Ma(i,o,p,j,n)),n&&M&2048&&Ir(o.alternate,o);break;case 24:Ma(i,o,p,j,n),n&&M&2048&&eu(o.alternate,o);break;default:Ma(i,o,p,j,n)}t=t.sibling}}function jn(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:jn(l,a),n&2048&&Ir(a.alternate,a);break;case 24:jn(l,a),n&2048&&eu(a.alternate,a);break;default:jn(l,a)}t=t.sibling}}var Sn=8192;function wa(e,t,l){if(e.subtreeFlags&Sn)for(e=e.child;e!==null;)ed(e,t,l),e=e.sibling}function ed(e,t,l){switch(e.tag){case 26:wa(e,t,l),e.flags&Sn&&e.memoizedState!==null&&jx(l,Dt,e.memoizedState,e.memoizedProps);break;case 5:wa(e,t,l);break;case 3:case 4:var a=Dt;Dt=Js(e.stateNode.containerInfo),wa(e,t,l),Dt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Sn,Sn=16777216,wa(e,t,l),Sn=a):wa(e,t,l));break;default:wa(e,t,l)}}function td(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 Nn(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];$e=a,ad(a,e)}td(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ld(e),e=e.sibling}function ld(e){switch(e.tag){case 0:case 11:case 15:Nn(e),e.flags&2048&&jl(9,e,e.return);break;case 3:Nn(e);break;case 12:Nn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ls(e)):Nn(e);break;default:Nn(e)}}function Ls(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];$e=a,ad(a,e)}td(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:jl(8,t,t.return),Ls(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ls(t));break;default:Ls(t)}e=e.sibling}}function ad(e,t){for(;$e!==null;){var l=$e;switch(l.tag){case 0:case 11:case 15:jl(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:sn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,$e=a;else e:for(l=e;$e!==null;){a=$e;var n=a.sibling,i=a.return;if(Kf(a),a===l){$e=null;break e}if(n!==null){n.return=i,$e=n;break e}$e=i}}}var Lp={getCacheForType:function(e){var t=Fe(Ye),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Fe(Ye).controller.signal}},Up=typeof WeakMap=="function"?WeakMap:Map,Ne=0,_e=null,pe=null,ve=0,Ce=0,yt=null,Sl=!1,_a=!1,tu=!1,nl=0,Ue=0,Nl=0,Il=0,lu=0,gt=0,ka=0,En=null,ct=null,au=!1,Us=0,nd=0,Bs=1/0,Hs=null,El=null,Ze=0,Tl=null,za=null,sl=0,nu=0,su=null,sd=null,Tn=0,iu=null;function bt(){return(Ne&2)!==0&&ve!==0?ve&-ve:O.T!==null?du():gc()}function id(){if(gt===0)if((ve&536870912)===0||ge){var e=Kn;Kn<<=1,(Kn&3932160)===0&&(Kn=262144),gt=e}else gt=536870912;return e=xt.current,e!==null&&(e.flags|=32),gt}function ot(e,t,l){(e===_e&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Da(e,0),Cl(e,ve,gt,!1)),Va(e,l),((Ne&2)===0||e!==_e)&&(e===_e&&((Ne&2)===0&&(Il|=l),Ue===4&&Cl(e,ve,gt,!1)),Ht(e))}function rd(e,t,l){if((Ne&6)!==0)throw Error(c(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Qa(e,t),n=a?qp(e,t):uu(e,t,!0),i=a;do{if(n===0){_a&&!a&&Cl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Bp(l)){n=uu(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var p=e;n=En;var j=p.current.memoizedState.isDehydrated;if(j&&(Da(p,o).flags|=256),o=uu(p,o,!1),o!==2){if(tu&&!j){p.errorRecoveryDisabledLanes|=i,Il|=i,n=4;break e}i=ct,ct=n,i!==null&&(ct===null?ct=i:ct.push.apply(ct,i))}n=o}if(i=!1,n!==2)continue}}if(n===1){Da(e,0),Cl(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Cl(a,t,gt,!Sl);break e;case 2:ct=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(n=Us+300-ft(),10<n)){if(Cl(a,t,gt,!Sl),Jn(a,0,!0)!==0)break e;sl=t,a.timeoutHandle=Bd(ud.bind(null,a,l,ct,Hs,au,t,gt,Il,ka,Sl,i,"Throttled",-0,0),n);break e}ud(a,l,ct,Hs,au,t,gt,Il,ka,Sl,i,null,-0,0)}}break}while(!0);Ht(e)}function ud(e,t,l,a,n,i,o,p,j,M,H,Y,w,D){if(e.timeoutHandle=-1,Y=t.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qt},ed(t,i,Y);var ee=(i&62914560)===i?Us-ft():(i&4194048)===i?nd-ft():0;if(ee=Sx(Y,ee),ee!==null){sl=i,e.cancelPendingCommit=ee(xd.bind(null,e,t,i,l,a,n,o,p,j,H,Y,null,w,D)),Cl(e,i,o,!M);return}}xd(e,t,i,l,a,n,o,p,j)}function Bp(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(!ht(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 Cl(e,t,l,a){t&=~lu,t&=~Il,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-mt(n),o=1<<i;a[i]=-1,n&=~o}l!==0&&xc(e,l,t)}function qs(){return(Ne&6)===0?(Cn(0),!1):!0}function ru(){if(pe!==null){if(Ce===0)var e=pe.return;else e=pe,$t=Ql=null,Nr(e),Ea=null,un=0,e=pe;for(;e!==null;)Hf(e.alternate,e),e=e.return;pe=null}}function Da(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,nx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),sl=0,ru(),_e=e,pe=l=Zt(e.current,null),ve=t,Ce=0,yt=null,Sl=!1,_a=Qa(e,t),tu=!1,ka=gt=lu=Il=Nl=Ue=0,ct=En=null,au=!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-mt(a),i=1<<n;t|=e[n],a&=~i}return nl=t,rs(),l}function cd(e,t){de=null,O.H=xn,t===Na||t===ps?(t=Eo(),Ce=3):t===fr?(t=Eo(),Ce=4):Ce=t===Hr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yt=t,pe===null&&(Ue=1,Ms(e,Et(t,e.current)))}function od(){var e=xt.current;return e===null?!0:(ve&4194048)===ve?At===null:(ve&62914560)===ve||(ve&536870912)!==0?e===At:!1}function fd(){var e=O.H;return O.H=xn,e===null?xn:e}function dd(){var e=O.A;return O.A=Lp,e}function Ys(){Ue=4,Sl||(ve&4194048)!==ve&&xt.current!==null||(_a=!0),(Nl&134217727)===0&&(Il&134217727)===0||_e===null||Cl(_e,ve,gt,!1)}function uu(e,t,l){var a=Ne;Ne|=2;var n=fd(),i=dd();(_e!==e||ve!==t)&&(Hs=null,Da(e,t)),t=!1;var o=Ue;e:do try{if(Ce!==0&&pe!==null){var p=pe,j=yt;switch(Ce){case 8:ru(),o=6;break e;case 3:case 2:case 9:case 6:xt.current===null&&(t=!0);var M=Ce;if(Ce=0,yt=null,Oa(e,p,j,M),l&&_a){o=0;break e}break;default:M=Ce,Ce=0,yt=null,Oa(e,p,j,M)}}Hp(),o=Ue;break}catch(H){cd(e,H)}while(!0);return t&&e.shellSuspendCounter++,$t=Ql=null,Ne=a,O.H=n,O.A=i,pe===null&&(_e=null,ve=0,rs()),o}function Hp(){for(;pe!==null;)md(pe)}function qp(e,t){var l=Ne;Ne|=2;var a=fd(),n=dd();_e!==e||ve!==t?(Hs=null,Bs=ft()+500,Da(e,t)):_a=Qa(e,t);e:do try{if(Ce!==0&&pe!==null){t=pe;var i=yt;t:switch(Ce){case 1:Ce=0,yt=null,Oa(e,t,i,1);break;case 2:case 9:if(So(i)){Ce=0,yt=null,hd(t);break}t=function(){Ce!==2&&Ce!==9||_e!==e||(Ce=7),Ht(e)},i.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:So(i)?(Ce=0,yt=null,hd(t)):(Ce=0,yt=null,Oa(e,t,i,7));break;case 5:var o=null;switch(pe.tag){case 26:o=pe.memoizedState;case 5:case 27:var p=pe;if(o?Id(o):p.stateNode.complete){Ce=0,yt=null;var j=p.sibling;if(j!==null)pe=j;else{var M=p.return;M!==null?(pe=M,Gs(M)):pe=null}break t}}Ce=0,yt=null,Oa(e,t,i,5);break;case 6:Ce=0,yt=null,Oa(e,t,i,6);break;case 8:ru(),Ue=6;break e;default:throw Error(c(462))}}Yp();break}catch(H){cd(e,H)}while(!0);return $t=Ql=null,O.H=a,O.A=n,Ne=l,pe!==null?0:(_e=null,ve=0,rs(),Ue)}function Yp(){for(;pe!==null&&!oh();)md(pe)}function md(e){var t=Uf(e.alternate,e,nl);e.memoizedProps=e.pendingProps,t===null?Gs(e):pe=t}function hd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=_f(l,t,t.pendingProps,t.type,void 0,ve);break;case 11:t=_f(l,t,t.pendingProps,t.type.render,t.ref,ve);break;case 5:Nr(t);default:Hf(l,t),t=pe=oo(t,nl),t=Uf(l,t,nl)}e.memoizedProps=e.pendingProps,t===null?Gs(e):pe=t}function Oa(e,t,l,a){$t=Ql=null,Nr(t),Ea=null,un=0;var n=t.return;try{if(Mp(e,n,t,l,ve)){Ue=1,Ms(e,Et(l,e.current)),pe=null;return}}catch(i){if(n!==null)throw pe=n,i;Ue=1,Ms(e,Et(l,e.current)),pe=null;return}t.flags&32768?(ge||a===1?e=!0:_a||(ve&536870912)!==0?e=!1:(Sl=e=!0,(a===2||a===9||a===3||a===6)&&(a=xt.current,a!==null&&a.tag===13&&(a.flags|=16384))),pd(t,e)):Gs(t)}function Gs(e){var t=e;do{if((t.flags&32768)!==0){pd(t,Sl);return}e=t.return;var l=kp(t.alternate,t,nl);if(l!==null){pe=l;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);Ue===0&&(Ue=5)}function pd(e,t){do{var l=zp(e.alternate,e);if(l!==null){l.flags&=32767,pe=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){pe=e;return}pe=e=l}while(e!==null);Ue=6,pe=null}function xd(e,t,l,a,n,i,o,p,j){e.cancelPendingCommit=null;do Xs();while(Ze!==0);if((Ne&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(i=t.lanes|t.childLanes,i|=Wi,bh(e,l,i,o,p,j),e===_e&&(pe=_e=null,ve=0),za=t,Tl=e,sl=l,nu=i,su=n,sd=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Vp(Vn,function(){return jd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null,n=$.p,$.p=2,o=Ne,Ne|=4;try{Dp(e,t,l)}finally{Ne=o,$.p=n,O.T=a}}Ze=1,vd(),yd(),gd()}}function vd(){if(Ze===1){Ze=0;var e=Tl,t=za,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=O.T,O.T=null;var a=$.p;$.p=2;var n=Ne;Ne|=4;try{Ff(t,e);var i=bu,o=to(e.containerInfo),p=i.focusedElem,j=i.selectionRange;if(o!==p&&p&&p.ownerDocument&&eo(p.ownerDocument.documentElement,p)){if(j!==null&&Vi(p)){var M=j.start,H=j.end;if(H===void 0&&(H=M),"selectionStart"in p)p.selectionStart=M,p.selectionEnd=Math.min(H,p.value.length);else{var Y=p.ownerDocument||document,w=Y&&Y.defaultView||window;if(w.getSelection){var D=w.getSelection(),ee=p.textContent.length,ce=Math.min(j.start,ee),we=j.end===void 0?ce:Math.min(j.end,ee);!D.extend&&ce>we&&(o=we,we=ce,ce=o);var C=Ic(p,ce),E=Ic(p,we);if(C&&E&&(D.rangeCount!==1||D.anchorNode!==C.node||D.anchorOffset!==C.offset||D.focusNode!==E.node||D.focusOffset!==E.offset)){var A=Y.createRange();A.setStart(C.node,C.offset),D.removeAllRanges(),ce>we?(D.addRange(A),D.extend(E.node,E.offset)):(A.setEnd(E.node,E.offset),D.addRange(A))}}}}for(Y=[],D=p;D=D.parentNode;)D.nodeType===1&&Y.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<Y.length;p++){var q=Y[p];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}ti=!!gu,bu=gu=null}finally{Ne=n,$.p=a,O.T=l}}e.current=t,Ze=2}}function yd(){if(Ze===2){Ze=0;var e=Tl,t=za,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=O.T,O.T=null;var a=$.p;$.p=2;var n=Ne;Ne|=4;try{Zf(e,t.alternate,t)}finally{Ne=n,$.p=a,O.T=l}}Ze=3}}function gd(){if(Ze===4||Ze===3){Ze=0,fh();var e=Tl,t=za,l=sl,a=sd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ze=5:(Ze=0,za=Tl=null,bd(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(El=null),Ci(l),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Xa,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=O.T,n=$.p,$.p=2,O.T=null;try{for(var i=e.onRecoverableError,o=0;o<a.length;o++){var p=a[o];i(p.value,{componentStack:p.stack})}}finally{O.T=t,$.p=n}}(sl&3)!==0&&Xs(),Ht(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===iu?Tn++:(Tn=0,iu=e):Tn=0,Cn(0)}}function bd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sn(t)))}function Xs(){return vd(),yd(),gd(),jd()}function jd(){if(Ze!==5)return!1;var e=Tl,t=nu;nu=0;var l=Ci(sl),a=O.T,n=$.p;try{$.p=32>l?32:l,O.T=null,l=su,su=null;var i=Tl,o=sl;if(Ze=0,za=Tl=null,sl=0,(Ne&6)!==0)throw Error(c(331));var p=Ne;if(Ne|=4,ld(i.current),If(i,i.current,o,l),Ne=p,Cn(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Xa,i)}catch{}return!0}finally{$.p=n,O.T=a,bd(e,t)}}function Sd(e,t,l){t=Et(l,t),t=Br(e.stateNode,t,2),e=yl(e,t,2),e!==null&&(Va(e,2),Ht(e))}function Re(e,t,l){if(e.tag===3)Sd(e,e,l);else for(;t!==null;){if(t.tag===3){Sd(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(El===null||!El.has(a))){e=Et(l,e),l=Nf(2),a=yl(t,l,2),a!==null&&(Ef(l,a,t,e),Va(a,2),Ht(a));break}}t=t.return}}function cu(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Up;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)||(tu=!0,n.add(l),e=Gp.bind(null,e,t,l),t.then(e,e))}function Gp(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,_e===e&&(ve&l)===l&&(Ue===4||Ue===3&&(ve&62914560)===ve&&300>ft()-Us?(Ne&2)===0&&Da(e,0):lu|=l,ka===ve&&(ka=0)),Ht(e)}function Nd(e,t){t===0&&(t=pc()),e=Yl(e,t),e!==null&&(Va(e,t),Ht(e))}function Xp(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Nd(e,l)}function Qp(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(c(314))}a!==null&&a.delete(t),Nd(e,l)}function Vp(e,t){return Si(e,t)}var Qs=null,La=null,ou=!1,Vs=!1,fu=!1,Rl=0;function Ht(e){e!==La&&e.next===null&&(La===null?Qs=La=e:La=La.next=e),Vs=!0,ou||(ou=!0,Kp())}function Cn(e,t){if(!fu&&Vs){fu=!0;do for(var l=!1,a=Qs;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var o=a.suspendedLanes,p=a.pingedLanes;i=(1<<31-mt(42|e)+1)-1,i&=n&~(o&~p),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Rd(a,i))}else i=ve,i=Jn(a,a===_e?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Qa(a,i)||(l=!0,Rd(a,i));a=a.next}while(l);fu=!1}}function Zp(){Ed()}function Ed(){Vs=ou=!1;var e=0;Rl!==0&&ax()&&(e=Rl);for(var t=ft(),l=null,a=Qs;a!==null;){var n=a.next,i=Td(a,t);i===0?(a.next=null,l===null?Qs=n:l.next=n,n===null&&(La=l)):(l=a,(e!==0||(i&3)!==0)&&(Vs=!0)),a=n}Ze!==0&&Ze!==5||Cn(e),Rl!==0&&(Rl=0)}function Td(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-mt(i),p=1<<o,j=n[o];j===-1?((p&l)===0||(p&a)!==0)&&(n[o]=gh(p,t)):j<=t&&(e.expiredLanes|=p),i&=~p}if(t=_e,l=ve,l=Jn(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&&Ni(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Qa(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Ni(a),Ci(l)){case 2:case 8:l=mc;break;case 32:l=Vn;break;case 268435456:l=hc;break;default:l=Vn}return a=Cd.bind(null,e),l=Si(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Ni(a),e.callbackPriority=2,e.callbackNode=null,2}function Cd(e,t){if(Ze!==0&&Ze!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Xs()&&e.callbackNode!==l)return null;var a=ve;return a=Jn(e,e===_e?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(rd(e,a,t),Td(e,ft()),e.callbackNode!=null&&e.callbackNode===l?Cd.bind(null,e):null)}function Rd(e,t){if(Xs())return null;rd(e,t,!0)}function Kp(){sx(function(){(Ne&6)!==0?Si(dc,Zp):Ed()})}function du(){if(Rl===0){var e=ja;e===0&&(e=Zn,Zn<<=1,(Zn&261888)===0&&(Zn=256)),Rl=e}return Rl}function Ad(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:In(""+e)}function Md(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 $p(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=Ad((n[nt]||null).action),o=a.submitter;o&&(t=(t=o[nt]||null)?Ad(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var p=new as("action","action",null,a,n);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Rl!==0){var j=o?Md(n,o):new FormData(n);kr(l,{pending:!0,data:j,method:n.method,action:i},null,j)}}else typeof i=="function"&&(p.preventDefault(),j=o?Md(n,o):new FormData(n),kr(l,{pending:!0,data:j,method:n.method,action:i},i,j))},currentTarget:n}]})}}for(var mu=0;mu<Ji.length;mu++){var hu=Ji[mu],Jp=hu.toLowerCase(),Wp=hu[0].toUpperCase()+hu.slice(1);zt(Jp,"on"+Wp)}zt(no,"onAnimationEnd"),zt(so,"onAnimationIteration"),zt(io,"onAnimationStart"),zt("dblclick","onDoubleClick"),zt("focusin","onFocus"),zt("focusout","onBlur"),zt(dp,"onTransitionRun"),zt(mp,"onTransitionStart"),zt(hp,"onTransitionCancel"),zt(ro,"onTransitionEnd"),ra("onMouseEnter",["mouseout","mouseover"]),ra("onMouseLeave",["mouseout","mouseover"]),ra("onPointerEnter",["pointerout","pointerover"]),ra("onPointerLeave",["pointerout","pointerover"]),Ul("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ul("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ul("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ul("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ul("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ul("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rn="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(" "),Fp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rn));function wd(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 o=a.length-1;0<=o;o--){var p=a[o],j=p.instance,M=p.currentTarget;if(p=p.listener,j!==i&&n.isPropagationStopped())break e;i=p,n.currentTarget=M;try{i(n)}catch(H){is(H)}n.currentTarget=null,i=j}else for(o=0;o<a.length;o++){if(p=a[o],j=p.instance,M=p.currentTarget,p=p.listener,j!==i&&n.isPropagationStopped())break e;i=p,n.currentTarget=M;try{i(n)}catch(H){is(H)}n.currentTarget=null,i=j}}}}function xe(e,t){var l=t[Ri];l===void 0&&(l=t[Ri]=new Set);var a=e+"__bubble";l.has(a)||(_d(t,e,2,!1),l.add(a))}function pu(e,t,l){var a=0;t&&(a|=4),_d(l,e,a,t)}var Zs="_reactListening"+Math.random().toString(36).slice(2);function xu(e){if(!e[Zs]){e[Zs]=!0,Sc.forEach(function(l){l!=="selectionchange"&&(Fp.has(l)||pu(l,!1,e),pu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zs]||(t[Zs]=!0,pu("selectionchange",!1,t))}}function _d(e,t,l,a){switch(im(t)){case 2:var n=Tx;break;case 8:n=Cx;break;default:n=_u}l=n.bind(null,t,l,e),n=void 0,!Li||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 vu(e,t,l,a,n){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var p=a.stateNode.containerInfo;if(p===n)break;if(o===4)for(o=a.return;o!==null;){var j=o.tag;if((j===3||j===4)&&o.stateNode.containerInfo===n)return;o=o.return}for(;p!==null;){if(o=na(p),o===null)return;if(j=o.tag,j===5||j===6||j===26||j===27){a=i=o;continue e}p=p.parentNode}}a=a.return}Dc(function(){var M=i,H=Di(l),Y=[];e:{var w=uo.get(e);if(w!==void 0){var D=as,ee=e;switch(e){case"keypress":if(ts(l)===0)break e;case"keydown":case"keyup":D=Qh;break;case"focusin":ee="focus",D=qi;break;case"focusout":ee="blur",D=qi;break;case"beforeblur":case"afterblur":D=qi;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":D=Uc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=kh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=Kh;break;case no:case so:case io:D=Oh;break;case ro:D=Jh;break;case"scroll":case"scrollend":D=wh;break;case"wheel":D=Fh;break;case"copy":case"cut":case"paste":D=Uh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=Hc;break;case"toggle":case"beforetoggle":D=Ih}var ce=(t&4)!==0,we=!ce&&(e==="scroll"||e==="scrollend"),C=ce?w!==null?w+"Capture":null:w;ce=[];for(var E=M,A;E!==null;){var q=E;if(A=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||A===null||C===null||(q=$a(E,C),q!=null&&ce.push(An(E,q,A))),we)break;E=E.return}0<ce.length&&(w=new D(w,ee,null,l,H),Y.push({event:w,listeners:ce}))}}if((t&7)===0){e:{if(w=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",w&&l!==zi&&(ee=l.relatedTarget||l.fromElement)&&(na(ee)||ee[aa]))break e;if((D||w)&&(w=H.window===H?H:(w=H.ownerDocument)?w.defaultView||w.parentWindow:window,D?(ee=l.relatedTarget||l.toElement,D=M,ee=ee?na(ee):null,ee!==null&&(we=h(ee),ce=ee.tag,ee!==we||ce!==5&&ce!==27&&ce!==6)&&(ee=null)):(D=null,ee=M),D!==ee)){if(ce=Uc,q="onMouseLeave",C="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(ce=Hc,q="onPointerLeave",C="onPointerEnter",E="pointer"),we=D==null?w:Ka(D),A=ee==null?w:Ka(ee),w=new ce(q,E+"leave",D,l,H),w.target=we,w.relatedTarget=A,q=null,na(H)===M&&(ce=new ce(C,E+"enter",ee,l,H),ce.target=A,ce.relatedTarget=we,q=ce),we=q,D&&ee)t:{for(ce=Pp,C=D,E=ee,A=0,q=C;q;q=ce(q))A++;q=0;for(var ie=E;ie;ie=ce(ie))q++;for(;0<A-q;)C=ce(C),A--;for(;0<q-A;)E=ce(E),q--;for(;A--;){if(C===E||E!==null&&C===E.alternate){ce=C;break t}C=ce(C),E=ce(E)}ce=null}else ce=null;D!==null&&kd(Y,w,D,ce,!1),ee!==null&&we!==null&&kd(Y,we,ee,ce,!0)}}e:{if(w=M?Ka(M):window,D=w.nodeName&&w.nodeName.toLowerCase(),D==="select"||D==="input"&&w.type==="file")var je=Kc;else if(Vc(w))if($c)je=cp;else{je=rp;var ae=ip}else D=w.nodeName,!D||D.toLowerCase()!=="input"||w.type!=="checkbox"&&w.type!=="radio"?M&&ki(M.elementType)&&(je=Kc):je=up;if(je&&(je=je(e,M))){Zc(Y,je,l,H);break e}ae&&ae(e,w,M),e==="focusout"&&M&&w.type==="number"&&M.memoizedProps.value!=null&&_i(w,"number",w.value)}switch(ae=M?Ka(M):window,e){case"focusin":(Vc(ae)||ae.contentEditable==="true")&&(ma=ae,Zi=M,ln=null);break;case"focusout":ln=Zi=ma=null;break;case"mousedown":Ki=!0;break;case"contextmenu":case"mouseup":case"dragend":Ki=!1,lo(Y,l,H);break;case"selectionchange":if(fp)break;case"keydown":case"keyup":lo(Y,l,H)}var me;if(Gi)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else da?Xc(e,l)&&(ye="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ye="onCompositionStart");ye&&(qc&&l.locale!=="ko"&&(da||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&da&&(me=Oc()):(fl=H,Ui="value"in fl?fl.value:fl.textContent,da=!0)),ae=Ks(M,ye),0<ae.length&&(ye=new Bc(ye,e,null,l,H),Y.push({event:ye,listeners:ae}),me?ye.data=me:(me=Qc(l),me!==null&&(ye.data=me)))),(me=tp?lp(e,l):ap(e,l))&&(ye=Ks(M,"onBeforeInput"),0<ye.length&&(ae=new Bc("onBeforeInput","beforeinput",null,l,H),Y.push({event:ae,listeners:ye}),ae.data=me)),$p(Y,e,M,l,H)}wd(Y,t)})}function An(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=$a(e,l),n!=null&&a.unshift(An(e,n,i)),n=$a(e,t),n!=null&&a.push(An(e,n,i))),e.tag===3)return a;e=e.return}return[]}function Pp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kd(e,t,l,a,n){for(var i=t._reactName,o=[];l!==null&&l!==a;){var p=l,j=p.alternate,M=p.stateNode;if(p=p.tag,j!==null&&j===a)break;p!==5&&p!==26&&p!==27||M===null||(j=M,n?(M=$a(l,i),M!=null&&o.unshift(An(l,M,j))):n||(M=$a(l,i),M!=null&&o.push(An(l,M,j)))),l=l.return}o.length!==0&&e.push({event:t,listeners:o})}var Ip=/\r\n?/g,ex=/\u0000|\uFFFD/g;function zd(e){return(typeof e=="string"?e:""+e).replace(Ip,`
49
+ `).replace(ex,"")}function Dd(e,t){return t=zd(t),zd(e)===t}function Me(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ca(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ca(e,""+a);break;case"className":Fn(e,"class",a);break;case"tabIndex":Fn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Fn(e,l,a);break;case"style":kc(e,a,i);break;case"data":if(t!=="object"){Fn(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=In(""+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=In(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Qt);break;case"onScroll":a!=null&&xe("scroll",e);break;case"onScrollEnd":a!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(c(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=In(""+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":xe("beforetoggle",e),xe("toggle",e),Wn(e,"popover",a);break;case"xlinkActuate":Xt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Xt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Xt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Xt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Xt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Xt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Wn(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=Ah.get(l)||l,Wn(e,l,a))}}function yu(e,t,l,a,n,i){switch(l){case"style":kc(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(c(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ca(e,a):(typeof a=="number"||typeof a=="bigint")&&ca(e,""+a);break;case"onScroll":a!=null&&xe("scroll",e);break;case"onScrollEnd":a!=null&&xe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Qt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nc.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[nt]||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,""):Wn(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":xe("error",e),xe("load",e);var a=!1,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var o=l[i];if(o!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Me(e,t,i,o,l,null)}}n&&Me(e,t,"srcSet",l.srcSet,l,null),a&&Me(e,t,"src",l.src,l,null);return;case"input":xe("invalid",e);var p=i=o=n=null,j=null,M=null;for(a in l)if(l.hasOwnProperty(a)){var H=l[a];if(H!=null)switch(a){case"name":n=H;break;case"type":o=H;break;case"checked":j=H;break;case"defaultChecked":M=H;break;case"value":i=H;break;case"defaultValue":p=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(c(137,t));break;default:Me(e,t,a,H,l,null)}}Ac(e,i,p,j,M,o,n,!1);return;case"select":xe("invalid",e),a=o=i=null;for(n in l)if(l.hasOwnProperty(n)&&(p=l[n],p!=null))switch(n){case"value":i=p;break;case"defaultValue":o=p;break;case"multiple":a=p;default:Me(e,t,n,p,l,null)}t=i,l=o,e.multiple=!!a,t!=null?ua(e,!!a,t,!1):l!=null&&ua(e,!!a,l,!0);return;case"textarea":xe("invalid",e),i=n=a=null;for(o in l)if(l.hasOwnProperty(o)&&(p=l[o],p!=null))switch(o){case"value":a=p;break;case"defaultValue":n=p;break;case"children":i=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(c(91));break;default:Me(e,t,o,p,l,null)}wc(e,a,n,i);return;case"option":for(j in l)if(l.hasOwnProperty(j)&&(a=l[j],a!=null))switch(j){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Me(e,t,j,a,l,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(a=0;a<Rn.length;a++)xe(Rn[a],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("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(M in l)if(l.hasOwnProperty(M)&&(a=l[M],a!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Me(e,t,M,a,l,null)}return;default:if(ki(t)){for(H in l)l.hasOwnProperty(H)&&(a=l[H],a!==void 0&&yu(e,t,H,a,l,void 0));return}}for(p in l)l.hasOwnProperty(p)&&(a=l[p],a!=null&&Me(e,t,p,a,l,null))}function tx(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,o=null,p=null,j=null,M=null,H=null;for(D in l){var Y=l[D];if(l.hasOwnProperty(D)&&Y!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":j=Y;default:a.hasOwnProperty(D)||Me(e,t,D,null,a,Y)}}for(var w in a){var D=a[w];if(Y=l[w],a.hasOwnProperty(w)&&(D!=null||Y!=null))switch(w){case"type":i=D;break;case"name":n=D;break;case"checked":M=D;break;case"defaultChecked":H=D;break;case"value":o=D;break;case"defaultValue":p=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(c(137,t));break;default:D!==Y&&Me(e,t,w,D,a,Y)}}wi(e,o,p,j,M,H,i,n);return;case"select":D=o=p=w=null;for(i in l)if(j=l[i],l.hasOwnProperty(i)&&j!=null)switch(i){case"value":break;case"multiple":D=j;default:a.hasOwnProperty(i)||Me(e,t,i,null,a,j)}for(n in a)if(i=a[n],j=l[n],a.hasOwnProperty(n)&&(i!=null||j!=null))switch(n){case"value":w=i;break;case"defaultValue":p=i;break;case"multiple":o=i;default:i!==j&&Me(e,t,n,i,a,j)}t=p,l=o,a=D,w!=null?ua(e,!!l,w,!1):!!a!=!!l&&(t!=null?ua(e,!!l,t,!0):ua(e,!!l,l?[]:"",!1));return;case"textarea":D=w=null;for(p in l)if(n=l[p],l.hasOwnProperty(p)&&n!=null&&!a.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:Me(e,t,p,null,a,n)}for(o in a)if(n=a[o],i=l[o],a.hasOwnProperty(o)&&(n!=null||i!=null))switch(o){case"value":w=n;break;case"defaultValue":D=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(c(91));break;default:n!==i&&Me(e,t,o,n,a,i)}Mc(e,w,D);return;case"option":for(var ee in l)if(w=l[ee],l.hasOwnProperty(ee)&&w!=null&&!a.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:Me(e,t,ee,null,a,w)}for(j in a)if(w=a[j],D=l[j],a.hasOwnProperty(j)&&w!==D&&(w!=null||D!=null))switch(j){case"selected":e.selected=w&&typeof w!="function"&&typeof w!="symbol";break;default:Me(e,t,j,w,a,D)}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 ce in l)w=l[ce],l.hasOwnProperty(ce)&&w!=null&&!a.hasOwnProperty(ce)&&Me(e,t,ce,null,a,w);for(M in a)if(w=a[M],D=l[M],a.hasOwnProperty(M)&&w!==D&&(w!=null||D!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(c(137,t));break;default:Me(e,t,M,w,a,D)}return;default:if(ki(t)){for(var we in l)w=l[we],l.hasOwnProperty(we)&&w!==void 0&&!a.hasOwnProperty(we)&&yu(e,t,we,void 0,a,w);for(H in a)w=a[H],D=l[H],!a.hasOwnProperty(H)||w===D||w===void 0&&D===void 0||yu(e,t,H,w,a,D);return}}for(var C in l)w=l[C],l.hasOwnProperty(C)&&w!=null&&!a.hasOwnProperty(C)&&Me(e,t,C,null,a,w);for(Y in a)w=a[Y],D=l[Y],!a.hasOwnProperty(Y)||w===D||w==null&&D==null||Me(e,t,Y,w,a,D)}function Od(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lx(){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,o=n.initiatorType,p=n.duration;if(i&&p&&Od(o)){for(o=0,p=n.responseEnd,a+=1;a<l.length;a++){var j=l[a],M=j.startTime;if(M>p)break;var H=j.transferSize,Y=j.initiatorType;H&&Od(Y)&&(j=j.responseEnd,o+=H*(j<p?1:(p-M)/(j-M)))}if(--a,t+=8*(i+o)/(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 gu=null,bu=null;function $s(e){return e.nodeType===9?e:e.ownerDocument}function Ld(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 Ud(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 ju(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 Su=null;function ax(){var e=window.event;return e&&e.type==="popstate"?e===Su?!1:(Su=e,!0):(Su=null,!1)}var Bd=typeof setTimeout=="function"?setTimeout:void 0,nx=typeof clearTimeout=="function"?clearTimeout:void 0,Hd=typeof Promise=="function"?Promise:void 0,sx=typeof queueMicrotask=="function"?queueMicrotask:typeof Hd<"u"?function(e){return Hd.resolve(null).then(e).catch(ix)}:Bd;function ix(e){setTimeout(function(){throw e})}function Al(e){return e==="head"}function qd(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),qa(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Mn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Mn(l);for(var i=l.firstChild;i;){var o=i.nextSibling,p=i.nodeName;i[Za]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&Mn(e.ownerDocument.body);l=n}while(l);qa(t)}function Yd(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 Nu(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":Nu(l),Ai(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function rx(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[Za])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=Mt(e.nextSibling),e===null)break}return null}function ux(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Mt(e.nextSibling),e===null))return null;return e}function Gd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Mt(e.nextSibling),e===null))return null;return e}function Eu(e){return e.data==="$?"||e.data==="$~"}function Tu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function cx(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 Mt(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 Cu=null;function Xd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Mt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Qd(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 Vd(e,t,l){switch(t=$s(l),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Mn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ai(e)}var wt=new Map,Zd=new Set;function Js(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var il=$.d;$.d={f:ox,r:fx,D:dx,C:mx,L:hx,m:px,X:vx,S:xx,M:yx};function ox(){var e=il.f(),t=qs();return e||t}function fx(e){var t=sa(e);t!==null&&t.tag===5&&t.type==="form"?cf(t):il.r(e)}var Ua=typeof document>"u"?null:document;function Kd(e,t,l){var a=Ua;if(a&&typeof t=="string"&&t){var n=St(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Zd.has(n)||(Zd.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),Ie(t,"link",e),Ke(t),a.head.appendChild(t)))}}function dx(e){il.D(e),Kd("dns-prefetch",e,null)}function mx(e,t){il.C(e,t),Kd("preconnect",e,t)}function hx(e,t,l){il.L(e,t,l);var a=Ua;if(a&&e&&t){var n='link[rel="preload"][as="'+St(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+St(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+St(l.imageSizes)+'"]')):n+='[href="'+St(e)+'"]';var i=n;switch(t){case"style":i=Ba(e);break;case"script":i=Ha(e)}wt.has(i)||(e=v({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),wt.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(wn(i))||t==="script"&&a.querySelector(_n(i))||(t=a.createElement("link"),Ie(t,"link",e),Ke(t),a.head.appendChild(t)))}}function px(e,t){il.m(e,t);var l=Ua;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+St(a)+'"][href="'+St(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ha(e)}if(!wt.has(i)&&(e=v({rel:"modulepreload",href:e},t),wt.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(_n(i)))return}a=l.createElement("link"),Ie(a,"link",e),Ke(a),l.head.appendChild(a)}}}function xx(e,t,l){il.S(e,t,l);var a=Ua;if(a&&e){var n=ia(a).hoistableStyles,i=Ba(e);t=t||"default";var o=n.get(i);if(!o){var p={loading:0,preload:null};if(o=a.querySelector(wn(i)))p.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},l),(l=wt.get(i))&&Ru(e,l);var j=o=a.createElement("link");Ke(j),Ie(j,"link",e),j._p=new Promise(function(M,H){j.onload=M,j.onerror=H}),j.addEventListener("load",function(){p.loading|=1}),j.addEventListener("error",function(){p.loading|=2}),p.loading|=4,Ws(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:p},n.set(i,o)}}}function vx(e,t){il.X(e,t);var l=Ua;if(l&&e){var a=ia(l).hoistableScripts,n=Ha(e),i=a.get(n);i||(i=l.querySelector(_n(n)),i||(e=v({src:e,async:!0},t),(t=wt.get(n))&&Au(e,t),i=l.createElement("script"),Ke(i),Ie(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function yx(e,t){il.M(e,t);var l=Ua;if(l&&e){var a=ia(l).hoistableScripts,n=Ha(e),i=a.get(n);i||(i=l.querySelector(_n(n)),i||(e=v({src:e,async:!0,type:"module"},t),(t=wt.get(n))&&Au(e,t),i=l.createElement("script"),Ke(i),Ie(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function $d(e,t,l,a){var n=(n=he.current)?Js(n):null;if(!n)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Ba(l.href),l=ia(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=Ba(l.href);var i=ia(n).hoistableStyles,o=i.get(e);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=n.querySelector(wn(e)))&&!i._p&&(o.instance=i,o.state.loading=5),wt.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},wt.set(e,l),i||gx(n,e,l,o.state))),t&&a===null)throw Error(c(528,""));return o}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ha(l),l=ia(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(c(444,e))}}function Ba(e){return'href="'+St(e)+'"'}function wn(e){return'link[rel="stylesheet"]['+e+"]"}function Jd(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function gx(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),Ke(t),e.head.appendChild(t))}function Ha(e){return'[src="'+St(e)+'"]'}function _n(e){return"script[async]"+e}function Wd(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+St(l.href)+'"]');if(a)return t.instance=a,Ke(a),a;var n=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ke(a),Ie(a,"style",n),Ws(a,l.precedence,e),t.instance=a;case"stylesheet":n=Ba(l.href);var i=e.querySelector(wn(n));if(i)return t.state.loading|=4,t.instance=i,Ke(i),i;a=Jd(l),(n=wt.get(n))&&Ru(a,n),i=(e.ownerDocument||e).createElement("link"),Ke(i);var o=i;return o._p=new Promise(function(p,j){o.onload=p,o.onerror=j}),Ie(i,"link",a),t.state.loading|=4,Ws(i,l.precedence,e),t.instance=i;case"script":return i=Ha(l.src),(n=e.querySelector(_n(i)))?(t.instance=n,Ke(n),n):(a=l,(n=wt.get(i))&&(a=v({},l),Au(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),Ke(n),Ie(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ws(a,l.precedence,e));return t.instance}function Ws(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,o=0;o<a.length;o++){var p=a[o];if(p.dataset.precedence===t)i=p;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 Ru(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Au(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Fs=null;function Fd(e,t,l){if(Fs===null){var a=new Map,n=Fs=new Map;n.set(l,a)}else n=Fs,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[Za]||i[Je]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var p=a.get(o);p?p.push(i):a.set(o,[i])}}return a}function Pd(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function bx(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 Id(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function jx(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=Ba(a.href),i=t.querySelector(wn(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ps.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Ke(i);return}i=t.ownerDocument||t,a=Jd(a),(n=wt.get(n))&&Ru(a,n),i=i.createElement("link"),Ke(i);var o=i;o._p=new Promise(function(p,j){o.onload=p,o.onerror=j}),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=Ps.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Mu=0;function Sx(e,t){return e.stylesheets&&e.count===0&&ei(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&ei(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Mu===0&&(Mu=62500*lx());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ei(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Mu?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Ps(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ei(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Is=null;function ei(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Is=new Map,t.forEach(Nx,e),Is=null,Ps.call(e))}function Nx(e,t){if(!(t.state.loading&4)){var l=Is.get(e);if(l)var a=l.get(null);else{l=new Map,Is.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var o=n[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),a=o)}a&&l.set(null,a)}n=t.instance,o=n.getAttribute("data-precedence"),i=l.get(o)||a,i===a&&l.set(null,n),l.set(o,n),this.count++,a=Ps.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 kn={$$typeof:Q,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function Ex(e,t,l,a,n,i,o,p,j){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=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=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function em(e,t,l,a,n,i,o,p,j,M,H,Y){return e=new Ex(e,t,l,o,j,M,H,Y,p),t=1,i===!0&&(t|=24),i=pt(3,null,null,t),e.current=i,i.stateNode=e,t=ur(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},dr(i),e}function tm(e){return e?(e=xa,e):xa}function lm(e,t,l,a,n,i){n=tm(n),a.context===null?a.context=n:a.pendingContext=n,a=vl(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=yl(e,a,t),l!==null&&(ot(l,e,t),on(l,e,t))}function am(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function wu(e,t){am(e,t),(e=e.alternate)&&am(e,t)}function nm(e){if(e.tag===13||e.tag===31){var t=Yl(e,67108864);t!==null&&ot(t,e,67108864),wu(e,67108864)}}function sm(e){if(e.tag===13||e.tag===31){var t=bt();t=Ti(t);var l=Yl(e,t);l!==null&&ot(l,e,t),wu(e,t)}}var ti=!0;function Tx(e,t,l,a){var n=O.T;O.T=null;var i=$.p;try{$.p=2,_u(e,t,l,a)}finally{$.p=i,O.T=n}}function Cx(e,t,l,a){var n=O.T;O.T=null;var i=$.p;try{$.p=8,_u(e,t,l,a)}finally{$.p=i,O.T=n}}function _u(e,t,l,a){if(ti){var n=ku(a);if(n===null)vu(e,t,a,li,l),rm(e,a);else if(Ax(n,e,t,l,a))a.stopPropagation();else if(rm(e,a),t&4&&-1<Rx.indexOf(e)){for(;n!==null;){var i=sa(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Ll(i.pendingLanes);if(o!==0){var p=i;for(p.pendingLanes|=2,p.entangledLanes|=2;o;){var j=1<<31-mt(o);p.entanglements[1]|=j,o&=~j}Ht(i),(Ne&6)===0&&(Bs=ft()+500,Cn(0))}}break;case 31:case 13:p=Yl(i,2),p!==null&&ot(p,i,2),qs(),wu(i,2)}if(i=ku(a),i===null&&vu(e,t,a,li,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else vu(e,t,a,null,l)}}function ku(e){return e=Di(e),zu(e)}var li=null;function zu(e){if(li=null,e=na(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=x(t),e!==null)return e;e=null}else if(l===31){if(e=b(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return li=e,null}function im(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(dh()){case dc:return 2;case mc:return 8;case Vn:case mh:return 32;case hc:return 268435456;default:return 32}default:return 32}}var Du=!1,Ml=null,wl=null,_l=null,zn=new Map,Dn=new Map,kl=[],Rx="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 rm(e,t){switch(e){case"focusin":case"focusout":Ml=null;break;case"dragenter":case"dragleave":wl=null;break;case"mouseover":case"mouseout":_l=null;break;case"pointerover":case"pointerout":zn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dn.delete(t.pointerId)}}function On(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=sa(t),t!==null&&nm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Ax(e,t,l,a,n){switch(t){case"focusin":return Ml=On(Ml,e,t,l,a,n),!0;case"dragenter":return wl=On(wl,e,t,l,a,n),!0;case"mouseover":return _l=On(_l,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return zn.set(i,On(zn.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,Dn.set(i,On(Dn.get(i)||null,e,t,l,a,n)),!0}return!1}function um(e){var t=na(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=x(l),t!==null){e.blockedOn=t,bc(e.priority,function(){sm(l)});return}}else if(t===31){if(t=b(l),t!==null){e.blockedOn=t,bc(e.priority,function(){sm(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 ai(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=ku(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);zi=a,l.target.dispatchEvent(a),zi=null}else return t=sa(l),t!==null&&nm(t),e.blockedOn=l,!1;t.shift()}return!0}function cm(e,t,l){ai(e)&&l.delete(t)}function Mx(){Du=!1,Ml!==null&&ai(Ml)&&(Ml=null),wl!==null&&ai(wl)&&(wl=null),_l!==null&&ai(_l)&&(_l=null),zn.forEach(cm),Dn.forEach(cm)}function ni(e,t){e.blockedOn===t&&(e.blockedOn=null,Du||(Du=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Mx)))}var si=null;function om(e){si!==e&&(si=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){si===e&&(si=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(zu(a||l)===null)continue;break}var i=sa(l);i!==null&&(e.splice(t,3),t-=3,kr(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function qa(e){function t(j){return ni(j,e)}Ml!==null&&ni(Ml,e),wl!==null&&ni(wl,e),_l!==null&&ni(_l,e),zn.forEach(t),Dn.forEach(t);for(var l=0;l<kl.length;l++){var a=kl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<kl.length&&(l=kl[0],l.blockedOn===null);)um(l),l.blockedOn===null&&kl.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],o=n[nt]||null;if(typeof i=="function")o||om(l);else if(o){var p=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[nt]||null)p=o.formAction;else if(zu(n)!==null)continue}else p=o.action;typeof p=="function"?l[a+1]=p:(l.splice(a,3),a-=3),om(l)}}}function fm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return n=o})},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 Ou(e){this._internalRoot=e}ii.prototype.render=Ou.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var l=t.current,a=bt();lm(l,a,e,t,null,null)},ii.prototype.unmount=Ou.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lm(e.current,2,null,e,null,null),qs(),t[aa]=null}};function ii(e){this._internalRoot=e}ii.prototype.unstable_scheduleHydration=function(e){if(e){var t=gc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<kl.length&&t!==0&&t<kl[l].priority;l++);kl.splice(l,0,e),l===0&&um(e)}};var dm=u.version;if(dm!=="19.2.4")throw Error(c(527,dm,"19.2.4"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=m(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var wx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ri=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ri.isDisabled&&ri.supportsFiber)try{Xa=ri.inject(wx),dt=ri}catch{}}return Un.createRoot=function(e,t){if(!d(e))throw Error(c(299));var l=!1,a="",n=gf,i=bf,o=jf;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&&(o=t.onRecoverableError)),t=em(e,1,!1,null,null,l,a,null,n,i,o,fm),e[aa]=t.current,xu(e),new Ou(t)},Un.hydrateRoot=function(e,t,l){if(!d(e))throw Error(c(299));var a=!1,n="",i=gf,o=bf,p=jf,j=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&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(p=l.onRecoverableError),l.formState!==void 0&&(j=l.formState)),t=em(e,1,!0,t,l??null,a,n,j,i,o,p,fm),t.context=tm(null),l=t.current,a=bt(),a=Ti(a),n=vl(a),n.callback=null,yl(l,n,a),l=a,t.current.lanes=l,Va(t,l),Ht(t),e[aa]=t.current,xu(e),new ii(t)},Un.version="19.2.4",Un}var Sm;function qx(){if(Sm)return Bu.exports;Sm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(u){console.error(u)}}return r(),Bu.exports=Hx(),Bu.exports}var Yx=qx();/**
50
+ * react-router v7.13.1
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var Nm="popstate";function Em(r){return typeof r=="object"&&r!=null&&"pathname"in r&&"search"in r&&"hash"in r&&"state"in r&&"key"in r}function Gx(r={}){function u(d,h){let{pathname:x="/",search:b="",hash:y=""}=ta(d.location.hash.substring(1));return!x.startsWith("/")&&!x.startsWith(".")&&(x="/"+x),Fu("",{pathname:x,search:b,hash:y},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function f(d,h){let x=d.document.querySelector("base"),b="";if(x&&x.getAttribute("href")){let y=d.location.href,m=y.indexOf("#");b=m===-1?y:y.slice(0,m)}return b+"#"+(typeof h=="string"?h:qn(h))}function c(d,h){_t(d.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(h)})`)}return Qx(u,f,c,r)}function Oe(r,u){if(r===!1||r===null||typeof r>"u")throw new Error(u)}function _t(r,u){if(!r){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Xx(){return Math.random().toString(36).substring(2,10)}function Tm(r,u){return{usr:r.state,key:r.key,idx:u,masked:r.unstable_mask?{pathname:r.pathname,search:r.search,hash:r.hash}:void 0}}function Fu(r,u,f=null,c,d){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof u=="string"?ta(u):u,state:f,key:u&&u.key||c||Xx(),unstable_mask:d}}function qn({pathname:r="/",search:u="",hash:f=""}){return u&&u!=="?"&&(r+=u.charAt(0)==="?"?u:"?"+u),f&&f!=="#"&&(r+=f.charAt(0)==="#"?f:"#"+f),r}function ta(r){let u={};if(r){let f=r.indexOf("#");f>=0&&(u.hash=r.substring(f),r=r.substring(0,f));let c=r.indexOf("?");c>=0&&(u.search=r.substring(c),r=r.substring(0,c)),r&&(u.pathname=r)}return u}function Qx(r,u,f,c={}){let{window:d=document.defaultView,v5Compat:h=!1}=c,x=d.history,b="POP",y=null,m=S();m==null&&(m=0,x.replaceState({...x.state,idx:m},""));function S(){return(x.state||{idx:null}).idx}function v(){b="POP";let _=S(),U=_==null?null:_-m;m=_,y&&y({action:b,location:R.location,delta:U})}function T(_,U){b="PUSH";let G=Em(_)?_:Fu(R.location,_,U);f&&f(G,_),m=S()+1;let Q=Tm(G,m),te=R.createHref(G.unstable_mask||G);try{x.pushState(Q,"",te)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;d.location.assign(te)}h&&y&&y({action:b,location:R.location,delta:1})}function z(_,U){b="REPLACE";let G=Em(_)?_:Fu(R.location,_,U);f&&f(G,_),m=S();let Q=Tm(G,m),te=R.createHref(G.unstable_mask||G);x.replaceState(Q,"",te),h&&y&&y({action:b,location:R.location,delta:0})}function k(_){return Vx(_)}let R={get action(){return b},get location(){return r(d,x)},listen(_){if(y)throw new Error("A history only accepts one active listener");return d.addEventListener(Nm,v),y=_,()=>{d.removeEventListener(Nm,v),y=null}},createHref(_){return u(d,_)},createURL:k,encodeLocation(_){let U=k(_);return{pathname:U.pathname,search:U.search,hash:U.hash}},push:T,replace:z,go(_){return x.go(_)}};return R}function Vx(r,u=!1){let f="http://localhost";typeof window<"u"&&(f=window.location.origin!=="null"?window.location.origin:window.location.href),Oe(f,"No window.location.(origin|href) available to create URL");let c=typeof r=="string"?r:qn(r);return c=c.replace(/ $/,"%20"),!u&&c.startsWith("//")&&(c=f+c),new URL(c,f)}function Hm(r,u,f="/"){return Zx(r,u,f,!1)}function Zx(r,u,f,c){let d=typeof u=="string"?ta(u):u,h=ul(d.pathname||"/",f);if(h==null)return null;let x=qm(r);Kx(x);let b=null;for(let y=0;b==null&&y<x.length;++y){let m=nv(h);b=lv(x[y],m,c)}return b}function qm(r,u=[],f=[],c="",d=!1){let h=(x,b,y=d,m)=>{let S={relativePath:m===void 0?x.path||"":m,caseSensitive:x.caseSensitive===!0,childrenIndex:b,route:x};if(S.relativePath.startsWith("/")){if(!S.relativePath.startsWith(c)&&y)return;Oe(S.relativePath.startsWith(c),`Absolute route path "${S.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),S.relativePath=S.relativePath.slice(c.length)}let v=qt([c,S.relativePath]),T=f.concat(S);x.children&&x.children.length>0&&(Oe(x.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),qm(x.children,u,T,v,y)),!(x.path==null&&!x.index)&&u.push({path:v,score:ev(v,x.index),routesMeta:T})};return r.forEach((x,b)=>{var y;if(x.path===""||!((y=x.path)!=null&&y.includes("?")))h(x,b);else for(let m of Ym(x.path))h(x,b,!0,m)}),u}function Ym(r){let u=r.split("/");if(u.length===0)return[];let[f,...c]=u,d=f.endsWith("?"),h=f.replace(/\?$/,"");if(c.length===0)return d?[h,""]:[h];let x=Ym(c.join("/")),b=[];return b.push(...x.map(y=>y===""?h:[h,y].join("/"))),d&&b.push(...x),b.map(y=>r.startsWith("/")&&y===""?"/":y)}function Kx(r){r.sort((u,f)=>u.score!==f.score?f.score-u.score:tv(u.routesMeta.map(c=>c.childrenIndex),f.routesMeta.map(c=>c.childrenIndex)))}var $x=/^:[\w-]+$/,Jx=3,Wx=2,Fx=1,Px=10,Ix=-2,Cm=r=>r==="*";function ev(r,u){let f=r.split("/"),c=f.length;return f.some(Cm)&&(c+=Ix),u&&(c+=Wx),f.filter(d=>!Cm(d)).reduce((d,h)=>d+($x.test(h)?Jx:h===""?Fx:Px),c)}function tv(r,u){return r.length===u.length&&r.slice(0,-1).every((c,d)=>c===u[d])?r[r.length-1]-u[u.length-1]:0}function lv(r,u,f=!1){let{routesMeta:c}=r,d={},h="/",x=[];for(let b=0;b<c.length;++b){let y=c[b],m=b===c.length-1,S=h==="/"?u:u.slice(h.length)||"/",v=mi({path:y.relativePath,caseSensitive:y.caseSensitive,end:m},S),T=y.route;if(!v&&m&&f&&!c[c.length-1].route.index&&(v=mi({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},S)),!v)return null;Object.assign(d,v.params),x.push({params:d,pathname:qt([h,v.pathname]),pathnameBase:uv(qt([h,v.pathnameBase])),route:T}),v.pathnameBase!=="/"&&(h=qt([h,v.pathnameBase]))}return x}function mi(r,u){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[f,c]=av(r.path,r.caseSensitive,r.end),d=u.match(f);if(!d)return null;let h=d[0],x=h.replace(/(.)\/+$/,"$1"),b=d.slice(1);return{params:c.reduce((m,{paramName:S,isOptional:v},T)=>{if(S==="*"){let k=b[T]||"";x=h.slice(0,h.length-k.length).replace(/(.)\/+$/,"$1")}const z=b[T];return v&&!z?m[S]=void 0:m[S]=(z||"").replace(/%2F/g,"/"),m},{}),pathname:h,pathnameBase:x,pattern:r}}function av(r,u=!1,f=!0){_t(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let c=[],d="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(x,b,y,m,S)=>{if(c.push({paramName:b,isOptional:y!=null}),y){let v=S.charAt(m+x.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(c.push({paramName:"*"}),d+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):f?d+="\\/*$":r!==""&&r!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,u?void 0:"i"),c]}function nv(r){try{return r.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return _t(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),r}}function ul(r,u){if(u==="/")return r;if(!r.toLowerCase().startsWith(u.toLowerCase()))return null;let f=u.endsWith("/")?u.length-1:u.length,c=r.charAt(f);return c&&c!=="/"?null:r.slice(f)||"/"}var sv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function iv(r,u="/"){let{pathname:f,search:c="",hash:d=""}=typeof r=="string"?ta(r):r,h;return f?(f=f.replace(/\/\/+/g,"/"),f.startsWith("/")?h=Rm(f.substring(1),"/"):h=Rm(f,u)):h=u,{pathname:h,search:cv(c),hash:ov(d)}}function Rm(r,u){let f=u.replace(/\/+$/,"").split("/");return r.split("/").forEach(d=>{d===".."?f.length>1&&f.pop():d!=="."&&f.push(d)}),f.length>1?f.join("/"):"/"}function Gu(r,u,f,c){return`Cannot include a '${r}' character in a manually specified \`to.${u}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${f}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function rv(r){return r.filter((u,f)=>f===0||u.route.path&&u.route.path.length>0)}function Gm(r){let u=rv(r);return u.map((f,c)=>c===u.length-1?f.pathname:f.pathnameBase)}function nc(r,u,f,c=!1){let d;typeof r=="string"?d=ta(r):(d={...r},Oe(!d.pathname||!d.pathname.includes("?"),Gu("?","pathname","search",d)),Oe(!d.pathname||!d.pathname.includes("#"),Gu("#","pathname","hash",d)),Oe(!d.search||!d.search.includes("#"),Gu("#","search","hash",d)));let h=r===""||d.pathname==="",x=h?"/":d.pathname,b;if(x==null)b=f;else{let v=u.length-1;if(!c&&x.startsWith("..")){let T=x.split("/");for(;T[0]==="..";)T.shift(),v-=1;d.pathname=T.join("/")}b=v>=0?u[v]:"/"}let y=iv(d,b),m=x&&x!=="/"&&x.endsWith("/"),S=(h||x===".")&&f.endsWith("/");return!y.pathname.endsWith("/")&&(m||S)&&(y.pathname+="/"),y}var qt=r=>r.join("/").replace(/\/\/+/g,"/"),uv=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),cv=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,ov=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,fv=class{constructor(r,u,f,c=!1){this.status=r,this.statusText=u||"",this.internal=c,f instanceof Error?(this.data=f.toString(),this.error=f):this.data=f}};function dv(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function mv(r){return r.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Xm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qm(r,u){let f=r;if(typeof f!="string"||!sv.test(f))return{absoluteURL:void 0,isExternal:!1,to:f};let c=f,d=!1;if(Xm)try{let h=new URL(window.location.href),x=f.startsWith("//")?new URL(h.protocol+f):new URL(f),b=ul(x.pathname,u);x.origin===h.origin&&b!=null?f=b+x.search+x.hash:d=!0}catch{_t(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:d,to:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Vm=["POST","PUT","PATCH","DELETE"];new Set(Vm);var hv=["GET",...Vm];new Set(hv);var Ya=g.createContext(null);Ya.displayName="DataRouter";var pi=g.createContext(null);pi.displayName="DataRouterState";var pv=g.createContext(!1),Zm=g.createContext({isTransitioning:!1});Zm.displayName="ViewTransition";var xv=g.createContext(new Map);xv.displayName="Fetchers";var vv=g.createContext(null);vv.displayName="Await";var kt=g.createContext(null);kt.displayName="Navigation";var Yn=g.createContext(null);Yn.displayName="Location";var Yt=g.createContext({outlet:null,matches:[],isDataRoute:!1});Yt.displayName="Route";var sc=g.createContext(null);sc.displayName="RouteError";var Km="REACT_ROUTER_ERROR",yv="REDIRECT",gv="ROUTE_ERROR_RESPONSE";function bv(r){if(r.startsWith(`${Km}:${yv}:{`))try{let u=JSON.parse(r.slice(28));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.location=="string"&&typeof u.reloadDocument=="boolean"&&typeof u.replace=="boolean")return u}catch{}}function jv(r){if(r.startsWith(`${Km}:${gv}:{`))try{let u=JSON.parse(r.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new fv(u.status,u.statusText,u.data)}catch{}}function Sv(r,{relative:u}={}){Oe(Gn(),"useHref() may be used only in the context of a <Router> component.");let{basename:f,navigator:c}=g.useContext(kt),{hash:d,pathname:h,search:x}=Xn(r,{relative:u}),b=h;return f!=="/"&&(b=h==="/"?f:qt([f,h])),c.createHref({pathname:b,search:x,hash:d})}function Gn(){return g.useContext(Yn)!=null}function Gt(){return Oe(Gn(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Yn).location}var $m="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jm(r){g.useContext(kt).static||g.useLayoutEffect(r)}function xi(){let{isDataRoute:r}=g.useContext(Yt);return r?Lv():Nv()}function Nv(){Oe(Gn(),"useNavigate() may be used only in the context of a <Router> component.");let r=g.useContext(Ya),{basename:u,navigator:f}=g.useContext(kt),{matches:c}=g.useContext(Yt),{pathname:d}=Gt(),h=JSON.stringify(Gm(c)),x=g.useRef(!1);return Jm(()=>{x.current=!0}),g.useCallback((y,m={})=>{if(_t(x.current,$m),!x.current)return;if(typeof y=="number"){f.go(y);return}let S=nc(y,JSON.parse(h),d,m.relative==="path");r==null&&u!=="/"&&(S.pathname=S.pathname==="/"?u:qt([u,S.pathname])),(m.replace?f.replace:f.push)(S,m.state,m)},[u,f,h,d,r])}g.createContext(null);function Ev(){let{matches:r}=g.useContext(Yt),u=r[r.length-1];return u?u.params:{}}function Xn(r,{relative:u}={}){let{matches:f}=g.useContext(Yt),{pathname:c}=Gt(),d=JSON.stringify(Gm(f));return g.useMemo(()=>nc(r,JSON.parse(d),c,u==="path"),[r,d,c,u])}function Tv(r,u){return Wm(r,u)}function Wm(r,u,f){var _;Oe(Gn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=g.useContext(kt),{matches:d}=g.useContext(Yt),h=d[d.length-1],x=h?h.params:{},b=h?h.pathname:"/",y=h?h.pathnameBase:"/",m=h&&h.route;{let U=m&&m.path||"";Pm(b,!m||U.endsWith("*")||U.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${b}" (under <Route path="${U}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${U}"> to <Route path="${U==="/"?"*":`${U}/*`}">.`)}let S=Gt(),v;if(u){let U=typeof u=="string"?ta(u):u;Oe(y==="/"||((_=U.pathname)==null?void 0:_.startsWith(y)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${y}" but pathname "${U.pathname}" was given in the \`location\` prop.`),v=U}else v=S;let T=v.pathname||"/",z=T;if(y!=="/"){let U=y.replace(/^\//,"").split("/");z="/"+T.replace(/^\//,"").split("/").slice(U.length).join("/")}let k=Hm(r,{pathname:z});_t(m||k!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),_t(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let R=wv(k&&k.map(U=>Object.assign({},U,{params:Object.assign({},x,U.params),pathname:qt([y,c.encodeLocation?c.encodeLocation(U.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathname]),pathnameBase:U.pathnameBase==="/"?y:qt([y,c.encodeLocation?c.encodeLocation(U.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:U.pathnameBase])})),d,f);return u&&R?g.createElement(Yn.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},R):R}function Cv(){let r=Ov(),u=dv(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),f=r instanceof Error?r.stack:null,c="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:c},h={padding:"2px 4px",backgroundColor:c},x=null;return console.error("Error handled by React Router default ErrorBoundary:",r),x=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:h},"ErrorBoundary")," or"," ",g.createElement("code",{style:h},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},u),f?g.createElement("pre",{style:d},f):null,x)}var Rv=g.createElement(Cv,null),Fm=class extends g.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,u){return u.location!==r.location||u.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:u.error,location:u.location,revalidation:r.revalidation||u.revalidation}}componentDidCatch(r,u){this.props.onError?this.props.onError(r,u):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const f=jv(r.digest);f&&(r=f)}let u=r!==void 0?g.createElement(Yt.Provider,{value:this.props.routeContext},g.createElement(sc.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?g.createElement(Av,{error:r},u):u}};Fm.contextType=pv;var Xu=new WeakMap;function Av({children:r,error:u}){let{basename:f}=g.useContext(kt);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let c=bv(u.digest);if(c){let d=Xu.get(u);if(d)throw d;let h=Qm(c.location,f);if(Xm&&!Xu.get(u))if(h.isExternal||c.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const x=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:c.replace}));throw Xu.set(u,x),x}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return r}function Mv({routeContext:r,match:u,children:f}){let c=g.useContext(Ya);return c&&c.static&&c.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=u.route.id),g.createElement(Yt.Provider,{value:r},f)}function wv(r,u=[],f){let c=f==null?void 0:f.state;if(r==null){if(!c)return null;if(c.errors)r=c.matches;else if(u.length===0&&!c.initialized&&c.matches.length>0)r=c.matches;else return null}let d=r,h=c==null?void 0:c.errors;if(h!=null){let S=d.findIndex(v=>v.route.id&&(h==null?void 0:h[v.route.id])!==void 0);Oe(S>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),d=d.slice(0,Math.min(d.length,S+1))}let x=!1,b=-1;if(f&&c){x=c.renderFallback;for(let S=0;S<d.length;S++){let v=d[S];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(b=S),v.route.id){let{loaderData:T,errors:z}=c,k=v.route.loader&&!T.hasOwnProperty(v.route.id)&&(!z||z[v.route.id]===void 0);if(v.route.lazy||k){f.isStatic&&(x=!0),b>=0?d=d.slice(0,b+1):d=[d[0]];break}}}}let y=f==null?void 0:f.onError,m=c&&y?(S,v)=>{var T,z;y(S,{location:c.location,params:((z=(T=c.matches)==null?void 0:T[0])==null?void 0:z.params)??{},unstable_pattern:mv(c.matches),errorInfo:v})}:void 0;return d.reduceRight((S,v,T)=>{let z,k=!1,R=null,_=null;c&&(z=h&&v.route.id?h[v.route.id]:void 0,R=v.route.errorElement||Rv,x&&(b<0&&T===0?(Pm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,_=null):b===T&&(k=!0,_=v.route.hydrateFallbackElement||null)));let U=u.concat(d.slice(0,T+1)),G=()=>{let Q;return z?Q=R:k?Q=_:v.route.Component?Q=g.createElement(v.route.Component,null):v.route.element?Q=v.route.element:Q=S,g.createElement(Mv,{match:v,routeContext:{outlet:S,matches:U,isDataRoute:c!=null},children:Q})};return c&&(v.route.ErrorBoundary||v.route.errorElement||T===0)?g.createElement(Fm,{location:c.location,revalidation:c.revalidation,component:R,error:z,children:G(),routeContext:{outlet:null,matches:U,isDataRoute:!0},onError:m}):G()},null)}function ic(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _v(r){let u=g.useContext(Ya);return Oe(u,ic(r)),u}function kv(r){let u=g.useContext(pi);return Oe(u,ic(r)),u}function zv(r){let u=g.useContext(Yt);return Oe(u,ic(r)),u}function rc(r){let u=zv(r),f=u.matches[u.matches.length-1];return Oe(f.route.id,`${r} can only be used on routes that contain a unique "id"`),f.route.id}function Dv(){return rc("useRouteId")}function Ov(){var c;let r=g.useContext(sc),u=kv("useRouteError"),f=rc("useRouteError");return r!==void 0?r:(c=u.errors)==null?void 0:c[f]}function Lv(){let{router:r}=_v("useNavigate"),u=rc("useNavigate"),f=g.useRef(!1);return Jm(()=>{f.current=!0}),g.useCallback(async(d,h={})=>{_t(f.current,$m),f.current&&(typeof d=="number"?await r.navigate(d):await r.navigate(d,{fromRouteId:u,...h}))},[r,u])}var Am={};function Pm(r,u,f){!u&&!Am[r]&&(Am[r]=!0,_t(!1,f))}g.memo(Uv);function Uv({routes:r,future:u,state:f,isStatic:c,onError:d}){return Wm(r,void 0,{state:f,isStatic:c,onError:d})}function Hn(r){Oe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Bv({basename:r="/",children:u=null,location:f,navigationType:c="POP",navigator:d,static:h=!1,unstable_useTransitions:x}){Oe(!Gn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let b=r.replace(/^\/*/,"/"),y=g.useMemo(()=>({basename:b,navigator:d,static:h,unstable_useTransitions:x,future:{}}),[b,d,h,x]);typeof f=="string"&&(f=ta(f));let{pathname:m="/",search:S="",hash:v="",state:T=null,key:z="default",unstable_mask:k}=f,R=g.useMemo(()=>{let _=ul(m,b);return _==null?null:{location:{pathname:_,search:S,hash:v,state:T,key:z,unstable_mask:k},navigationType:c}},[b,m,S,v,T,z,c,k]);return _t(R!=null,`<Router basename="${b}"> is not able to match the URL "${m}${S}${v}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:g.createElement(kt.Provider,{value:y},g.createElement(Yn.Provider,{children:u,value:R}))}function Hv({children:r,location:u}){return Tv(Pu(r),u)}function Pu(r,u=[]){let f=[];return g.Children.forEach(r,(c,d)=>{if(!g.isValidElement(c))return;let h=[...u,d];if(c.type===g.Fragment){f.push.apply(f,Pu(c.props.children,h));return}Oe(c.type===Hn,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Oe(!c.props.index||!c.props.children,"An index route cannot have child routes.");let x={id:c.props.id||h.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(x.children=Pu(c.props.children,h)),f.push(x)}),f}var fi="get",di="application/x-www-form-urlencoded";function vi(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function qv(r){return vi(r)&&r.tagName.toLowerCase()==="button"}function Yv(r){return vi(r)&&r.tagName.toLowerCase()==="form"}function Gv(r){return vi(r)&&r.tagName.toLowerCase()==="input"}function Xv(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Qv(r,u){return r.button===0&&(!u||u==="_self")&&!Xv(r)}function Iu(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((u,f)=>{let c=r[f];return u.concat(Array.isArray(c)?c.map(d=>[f,d]):[[f,c]])},[]))}function Vv(r,u){let f=Iu(r);return u&&u.forEach((c,d)=>{f.has(d)||u.getAll(d).forEach(h=>{f.append(d,h)})}),f}var ui=null;function Zv(){if(ui===null)try{new FormData(document.createElement("form"),0),ui=!1}catch{ui=!0}return ui}var Kv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Qu(r){return r!=null&&!Kv.has(r)?(_t(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${di}"`),null):r}function $v(r,u){let f,c,d,h,x;if(Yv(r)){let b=r.getAttribute("action");c=b?ul(b,u):null,f=r.getAttribute("method")||fi,d=Qu(r.getAttribute("enctype"))||di,h=new FormData(r)}else if(qv(r)||Gv(r)&&(r.type==="submit"||r.type==="image")){let b=r.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=r.getAttribute("formaction")||b.getAttribute("action");if(c=y?ul(y,u):null,f=r.getAttribute("formmethod")||b.getAttribute("method")||fi,d=Qu(r.getAttribute("formenctype"))||Qu(b.getAttribute("enctype"))||di,h=new FormData(b,r),!Zv()){let{name:m,type:S,value:v}=r;if(S==="image"){let T=m?`${m}.`:"";h.append(`${T}x`,"0"),h.append(`${T}y`,"0")}else m&&h.append(m,v)}}else{if(vi(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');f=fi,c=null,d=di,x=r}return h&&d==="text/plain"&&(x=h,h=void 0),{action:c,method:f.toLowerCase(),encType:d,formData:h,body:x}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function uc(r,u){if(r===!1||r===null||typeof r>"u")throw new Error(u)}function Jv(r,u,f,c){let d=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return f?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${c}`:d.pathname=`${d.pathname}.${c}`:d.pathname==="/"?d.pathname=`_root.${c}`:u&&ul(d.pathname,u)==="/"?d.pathname=`${u.replace(/\/$/,"")}/_root.${c}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${c}`,d}async function Wv(r,u){if(r.id in u)return u[r.id];try{let f=await import(r.module);return u[r.id]=f,f}catch(f){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(f),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Fv(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function Pv(r,u,f){let c=await Promise.all(r.map(async d=>{let h=u.routes[d.route.id];if(h){let x=await Wv(h,f);return x.links?x.links():[]}return[]}));return ly(c.flat(1).filter(Fv).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Mm(r,u,f,c,d,h){let x=(y,m)=>f[m]?y.route.id!==f[m].route.id:!0,b=(y,m)=>{var S;return f[m].pathname!==y.pathname||((S=f[m].route.path)==null?void 0:S.endsWith("*"))&&f[m].params["*"]!==y.params["*"]};return h==="assets"?u.filter((y,m)=>x(y,m)||b(y,m)):h==="data"?u.filter((y,m)=>{var v;let S=c.routes[y.route.id];if(!S||!S.hasLoader)return!1;if(x(y,m)||b(y,m))return!0;if(y.route.shouldRevalidate){let T=y.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((v=f[0])==null?void 0:v.params)||{},nextUrl:new URL(r,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof T=="boolean")return T}return!0}):[]}function Iv(r,u,{includeHydrateFallback:f}={}){return ey(r.map(c=>{let d=u.routes[c.route.id];if(!d)return[];let h=[d.module];return d.clientActionModule&&(h=h.concat(d.clientActionModule)),d.clientLoaderModule&&(h=h.concat(d.clientLoaderModule)),f&&d.hydrateFallbackModule&&(h=h.concat(d.hydrateFallbackModule)),d.imports&&(h=h.concat(d.imports)),h}).flat(1))}function ey(r){return[...new Set(r)]}function ty(r){let u={},f=Object.keys(r).sort();for(let c of f)u[c]=r[c];return u}function ly(r,u){let f=new Set;return new Set(u),r.reduce((c,d)=>{let h=JSON.stringify(ty(d));return f.has(h)||(f.add(h),c.push({key:h,link:d})),c},[])}function Im(){let r=g.useContext(Ya);return uc(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function ay(){let r=g.useContext(pi);return uc(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var cc=g.createContext(void 0);cc.displayName="FrameworkContext";function eh(){let r=g.useContext(cc);return uc(r,"You must render this element inside a <HydratedRouter> element"),r}function ny(r,u){let f=g.useContext(cc),[c,d]=g.useState(!1),[h,x]=g.useState(!1),{onFocus:b,onBlur:y,onMouseEnter:m,onMouseLeave:S,onTouchStart:v}=u,T=g.useRef(null);g.useEffect(()=>{if(r==="render"&&x(!0),r==="viewport"){let R=U=>{U.forEach(G=>{x(G.isIntersecting)})},_=new IntersectionObserver(R,{threshold:.5});return T.current&&_.observe(T.current),()=>{_.disconnect()}}},[r]),g.useEffect(()=>{if(c){let R=setTimeout(()=>{x(!0)},100);return()=>{clearTimeout(R)}}},[c]);let z=()=>{d(!0)},k=()=>{d(!1),x(!1)};return f?r!=="intent"?[h,T,{}]:[h,T,{onFocus:Bn(b,z),onBlur:Bn(y,k),onMouseEnter:Bn(m,z),onMouseLeave:Bn(S,k),onTouchStart:Bn(v,z)}]:[!1,T,{}]}function Bn(r,u){return f=>{r&&r(f),f.defaultPrevented||u(f)}}function sy({page:r,...u}){let{router:f}=Im(),c=g.useMemo(()=>Hm(f.routes,r,f.basename),[f.routes,r,f.basename]);return c?g.createElement(ry,{page:r,matches:c,...u}):null}function iy(r){let{manifest:u,routeModules:f}=eh(),[c,d]=g.useState([]);return g.useEffect(()=>{let h=!1;return Pv(r,u,f).then(x=>{h||d(x)}),()=>{h=!0}},[r,u,f]),c}function ry({page:r,matches:u,...f}){let c=Gt(),{future:d,manifest:h,routeModules:x}=eh(),{basename:b}=Im(),{loaderData:y,matches:m}=ay(),S=g.useMemo(()=>Mm(r,u,m,h,c,"data"),[r,u,m,h,c]),v=g.useMemo(()=>Mm(r,u,m,h,c,"assets"),[r,u,m,h,c]),T=g.useMemo(()=>{if(r===c.pathname+c.search+c.hash)return[];let R=new Set,_=!1;if(u.forEach(G=>{var te;let Q=h.routes[G.route.id];!Q||!Q.hasLoader||(!S.some(K=>K.route.id===G.route.id)&&G.route.id in y&&((te=x[G.route.id])!=null&&te.shouldRevalidate)||Q.hasClientLoader?_=!0:R.add(G.route.id))}),R.size===0)return[];let U=Jv(r,b,d.unstable_trailingSlashAwareDataRequests,"data");return _&&R.size>0&&U.searchParams.set("_routes",u.filter(G=>R.has(G.route.id)).map(G=>G.route.id).join(",")),[U.pathname+U.search]},[b,d.unstable_trailingSlashAwareDataRequests,y,c,h,S,u,r,x]),z=g.useMemo(()=>Iv(v,h),[v,h]),k=iy(v);return g.createElement(g.Fragment,null,T.map(R=>g.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...f})),z.map(R=>g.createElement("link",{key:R,rel:"modulepreload",href:R,...f})),k.map(({key:R,link:_})=>g.createElement("link",{key:R,nonce:f.nonce,..._,crossOrigin:_.crossOrigin??f.crossOrigin})))}function uy(...r){return u=>{r.forEach(f=>{typeof f=="function"?f(u):f!=null&&(f.current=u)})}}var cy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{cy&&(window.__reactRouterVersion="7.13.1")}catch{}function oy({basename:r,children:u,unstable_useTransitions:f,window:c}){let d=g.useRef();d.current==null&&(d.current=Gx({window:c,v5Compat:!0}));let h=d.current,[x,b]=g.useState({action:h.action,location:h.location}),y=g.useCallback(m=>{f===!1?b(m):g.startTransition(()=>b(m))},[f]);return g.useLayoutEffect(()=>h.listen(y),[h,y]),g.createElement(Bv,{basename:r,children:u,location:x.location,navigationType:x.action,navigator:h,unstable_useTransitions:f})}var th=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rl=g.forwardRef(function({onClick:u,discover:f="render",prefetch:c="none",relative:d,reloadDocument:h,replace:x,unstable_mask:b,state:y,target:m,to:S,preventScrollReset:v,viewTransition:T,unstable_defaultShouldRevalidate:z,...k},R){let{basename:_,navigator:U,unstable_useTransitions:G}=g.useContext(kt),Q=typeof S=="string"&&th.test(S),te=Qm(S,_);S=te.to;let K=Sv(S,{relative:d}),se=Gt(),F=null;if(b){let ue=nc(b,[],se.unstable_mask?se.unstable_mask.pathname:"/",!0);_!=="/"&&(ue.pathname=ue.pathname==="/"?_:qt([_,ue.pathname])),F=U.createHref(ue)}let[V,ne,I]=ny(c,k),L=hy(S,{replace:x,unstable_mask:b,state:y,target:m,preventScrollReset:v,relative:d,viewTransition:T,unstable_defaultShouldRevalidate:z,unstable_useTransitions:G});function J(ue){u&&u(ue),ue.defaultPrevented||L(ue)}let B=!(te.isExternal||h),P=g.createElement("a",{...k,...I,href:(B?F:void 0)||te.absoluteURL||K,onClick:B?J:u,ref:uy(R,ne),target:m,"data-discover":!Q&&f==="render"?"true":void 0});return V&&!Q?g.createElement(g.Fragment,null,P,g.createElement(sy,{page:K})):P});rl.displayName="Link";var fy=g.forwardRef(function({"aria-current":u="page",caseSensitive:f=!1,className:c="",end:d=!1,style:h,to:x,viewTransition:b,children:y,...m},S){let v=Xn(x,{relative:m.relative}),T=Gt(),z=g.useContext(pi),{navigator:k,basename:R}=g.useContext(kt),_=z!=null&&by(v)&&b===!0,U=k.encodeLocation?k.encodeLocation(v).pathname:v.pathname,G=T.pathname,Q=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;f||(G=G.toLowerCase(),Q=Q?Q.toLowerCase():null,U=U.toLowerCase()),Q&&R&&(Q=ul(Q,R)||Q);const te=U!=="/"&&U.endsWith("/")?U.length-1:U.length;let K=G===U||!d&&G.startsWith(U)&&G.charAt(te)==="/",se=Q!=null&&(Q===U||!d&&Q.startsWith(U)&&Q.charAt(U.length)==="/"),F={isActive:K,isPending:se,isTransitioning:_},V=K?u:void 0,ne;typeof c=="function"?ne=c(F):ne=[c,K?"active":null,se?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let I=typeof h=="function"?h(F):h;return g.createElement(rl,{...m,"aria-current":V,className:ne,ref:S,style:I,to:x,viewTransition:b},typeof y=="function"?y(F):y)});fy.displayName="NavLink";var dy=g.forwardRef(({discover:r="render",fetcherKey:u,navigate:f,reloadDocument:c,replace:d,state:h,method:x=fi,action:b,onSubmit:y,relative:m,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:T,...z},k)=>{let{unstable_useTransitions:R}=g.useContext(kt),_=yy(),U=gy(b,{relative:m}),G=x.toLowerCase()==="get"?"get":"post",Q=typeof b=="string"&&th.test(b),te=K=>{if(y&&y(K),K.defaultPrevented)return;K.preventDefault();let se=K.nativeEvent.submitter,F=(se==null?void 0:se.getAttribute("formmethod"))||x,V=()=>_(se||K.currentTarget,{fetcherKey:u,method:F,navigate:f,replace:d,state:h,relative:m,preventScrollReset:S,viewTransition:v,unstable_defaultShouldRevalidate:T});R&&f!==!1?g.startTransition(()=>V()):V()};return g.createElement("form",{ref:k,method:G,action:U,onSubmit:c?y:te,...z,"data-discover":!Q&&r==="render"?"true":void 0})});dy.displayName="Form";function my(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lh(r){let u=g.useContext(Ya);return Oe(u,my(r)),u}function hy(r,{target:u,replace:f,unstable_mask:c,state:d,preventScrollReset:h,relative:x,viewTransition:b,unstable_defaultShouldRevalidate:y,unstable_useTransitions:m}={}){let S=xi(),v=Gt(),T=Xn(r,{relative:x});return g.useCallback(z=>{if(Qv(z,u)){z.preventDefault();let k=f!==void 0?f:qn(v)===qn(T),R=()=>S(r,{replace:k,unstable_mask:c,state:d,preventScrollReset:h,relative:x,viewTransition:b,unstable_defaultShouldRevalidate:y});m?g.startTransition(()=>R()):R()}},[v,S,T,f,c,d,u,r,h,x,b,y,m])}function py(r){_t(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let u=g.useRef(Iu(r)),f=g.useRef(!1),c=Gt(),d=g.useMemo(()=>Vv(c.search,f.current?null:u.current),[c.search]),h=xi(),x=g.useCallback((b,y)=>{const m=Iu(typeof b=="function"?b(new URLSearchParams(d)):b);f.current=!0,h("?"+m,y)},[h,d]);return[d,x]}var xy=0,vy=()=>`__${String(++xy)}__`;function yy(){let{router:r}=lh("useSubmit"),{basename:u}=g.useContext(kt),f=Dv(),c=r.fetch,d=r.navigate;return g.useCallback(async(h,x={})=>{let{action:b,method:y,encType:m,formData:S,body:v}=$v(h,u);if(x.navigate===!1){let T=x.fetcherKey||vy();await c(T,f,x.action||b,{unstable_defaultShouldRevalidate:x.unstable_defaultShouldRevalidate,preventScrollReset:x.preventScrollReset,formData:S,body:v,formMethod:x.method||y,formEncType:x.encType||m,flushSync:x.flushSync})}else await d(x.action||b,{unstable_defaultShouldRevalidate:x.unstable_defaultShouldRevalidate,preventScrollReset:x.preventScrollReset,formData:S,body:v,formMethod:x.method||y,formEncType:x.encType||m,replace:x.replace,state:x.state,fromRouteId:f,flushSync:x.flushSync,viewTransition:x.viewTransition})},[c,d,u,f])}function gy(r,{relative:u}={}){let{basename:f}=g.useContext(kt),c=g.useContext(Yt);Oe(c,"useFormAction must be used inside a RouteContext");let[d]=c.matches.slice(-1),h={...Xn(r||".",{relative:u})},x=Gt();if(r==null){h.search=x.search;let b=new URLSearchParams(h.search),y=b.getAll("index");if(y.some(S=>S==="")){b.delete("index"),y.filter(v=>v).forEach(v=>b.append("index",v));let S=b.toString();h.search=S?`?${S}`:""}}return(!r||r===".")&&d.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),f!=="/"&&(h.pathname=h.pathname==="/"?f:qt([f,h.pathname])),qn(h)}function by(r,{relative:u}={}){let f=g.useContext(Zm);Oe(f!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=lh("useViewTransitionState"),d=Xn(r,{relative:u});if(!f.isTransitioning)return!1;let h=ul(f.currentLocation.pathname,c)||f.currentLocation.pathname,x=ul(f.nextLocation.pathname,c)||f.nextLocation.pathname;return mi(d.pathname,x)!=null||mi(d.pathname,h)!=null}const jy="";async function Ve(r,u){const f=await fetch(`${jy}${r}`,u);if(!f.ok){const c=await f.json().catch(()=>({error:f.statusText}));throw new Error(c.error||`HTTP ${f.status}`)}return f.json()}const be={getConfig(){return Ve("/api/config")},setConfig(r,u){return Ve("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:u})})},getSkills(){return Ve("/api/skills")},getSkillDetail(r,u){return Ve(`/api/skills/${r}/${u}`)},getEvals(r,u){return Ve(`/api/skills/${r}/${u}/evals`)},saveEvals(r,u,f){return Ve(`/api/skills/${r}/${u}/evals`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)})},generateEvals(r,u){return Ve(`/api/skills/${r}/${u}/generate-evals`,{method:"POST"})},getLatestBenchmark(r,u){return Ve(`/api/skills/${r}/${u}/benchmark/latest`)},getHistory(r,u,f){const c=new URLSearchParams;f!=null&&f.model&&c.set("model",f.model),f!=null&&f.type&&c.set("type",f.type),f!=null&&f.from&&c.set("from",f.from),f!=null&&f.to&&c.set("to",f.to);const d=c.toString();return Ve(`/api/skills/${r}/${u}/history${d?"?"+d:""}`)},getHistoryEntry(r,u,f){return Ve(`/api/skills/${r}/${u}/history/${encodeURIComponent(f)}`)},compareRuns(r,u,f,c){return Ve(`/api/skills/${r}/${u}/history-compare?a=${encodeURIComponent(f)}&b=${encodeURIComponent(c)}`)},getCaseHistory(r,u,f,c){const d=new URLSearchParams;c&&d.set("model",c);const h=d.toString();return Ve(`/api/skills/${r}/${u}/history/case/${f}${h?"?"+h:""}`)},deleteHistoryEntry(r,u,f){return Ve(`/api/skills/${r}/${u}/history/${encodeURIComponent(f)}`,{method:"DELETE"})},improveSkill(r,u,f){return Ve(`/api/skills/${r}/${u}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)})},applyImprovement(r,u,f){return Ve(`/api/skills/${r}/${u}/apply-improvement`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:f})})},getStats(r,u){return Ve(`/api/skills/${r}/${u}/stats`)},getDependencies(r,u){return Ve(`/api/skills/${r}/${u}/dependencies`)},getProjectLayout(){return Ve("/api/project-layout")},createSkill(r){return Ve("/api/skills/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})},getSkillCreatorStatus(){return Ve("/api/skill-creator-status")}},wm={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 Vu(){return s.jsx("div",{className:"glass-card p-5",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"skeleton h-5 w-36 mb-2"}),s.jsx("div",{className:"skeleton h-3.5 w-48"})]}),s.jsx("div",{className:"skeleton h-6 w-20 rounded-full"})]})})}function Sy(){const[r,u]=g.useState([]),[f,c]=g.useState(!0),[d,h]=g.useState(null);g.useEffect(()=>{be.getSkills().then(u).catch(b=>h(b.message)).finally(()=>c(!1))},[]);const x=r.reduce((b,y)=>{var m;return(b[m=y.plugin]||(b[m]=[])).push(y),b},{});return s.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[s.jsxs("div",{className:"mb-8 flex items-start justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-[22px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Skills"}),s.jsx("p",{className:"text-[13px] mt-1",style:{color:"var(--text-tertiary)"},children:f?"Scanning plugins...":`${r.length} skill${r.length!==1?"s":""} across ${Object.keys(x).length} plugin${Object.keys(x).length!==1?"s":""}`})]}),!f&&s.jsxs(rl,{to:"/create",className:"flex items-center gap-2 px-4 py-2 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:"var(--accent)",color:"#fff"},onMouseEnter:b=>{b.currentTarget.style.opacity="0.9"},onMouseLeave:b=>{b.currentTarget.style.opacity="1"},children:[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"]})]}),d&&s.jsx("div",{className:"mb-6 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)",border:"1px solid rgba(248,113,113,0.2)"},children:d}),f&&s.jsxs("div",{className:"space-y-3",children:[s.jsx(Vu,{}),s.jsx(Vu,{}),s.jsx(Vu,{})]}),!f&&s.jsx("div",{className:"space-y-8 stagger-children",children:Object.entries(x).map(([b,y])=>s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[s.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}}),s.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:b}),s.jsx("div",{className:"flex-1 h-px",style:{background:"var(--border-subtle)"}})]}),s.jsx("div",{className:"grid gap-2",children:y.map(m=>{const S=wm[m.benchmarkStatus]||wm.missing;return s.jsxs(rl,{to:`/skills/${m.plugin}/${m.skill}`,className:"glass-card glass-card-interactive p-5 flex items-center justify-between group",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"flex items-center gap-2",children:s.jsx("span",{className:"text-[14px] font-medium",style:{color:"var(--text-primary)"},children:m.skill})}),s.jsxs("div",{className:"flex items-center gap-3 mt-1.5",children:[s.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:[m.evalCount," eval",m.evalCount!==1?"s":""]}),s.jsxs("span",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:[m.assertionCount," assertion",m.assertionCount!==1?"s":""]}),m.lastBenchmark&&s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:new Date(m.lastBenchmark).toLocaleDateString()})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("span",{className:"pill",style:{background:S.bg,color:S.text},children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:S.dot}}),S.label]}),s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"opacity-0 group-hover:opacity-100 transition-opacity duration-150",style:{transform:"translateX(0)",transition:"transform 0.15s ease"},children:s.jsx("polyline",{points:"9 18 15 12 9 6"})})]})]},`${m.plugin}/${m.skill}`)})})]},b))}),!f&&r.length===0&&!d&&s.jsxs("div",{className:"text-center py-16 animate-fade-in-scale",children:[s.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:"var(--surface-2)"},children:s.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children: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(rl,{to:"/create",className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:"var(--accent)",color:"#fff"},onMouseEnter:b=>{b.currentTarget.style.opacity="0.9"},onMouseLeave:b=>{b.currentTarget.style.opacity="1"},children:[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"]})]})]})}function Ny(){const[r,u]=g.useState([]),[f,c]=g.useState(!1),[d,h]=g.useState(!1),[x,b]=g.useState(null),y=g.useRef(null),m=g.useCallback(async(v,T)=>{u([]),c(!0),h(!1),b(null);const z=new AbortController;y.current=z;try{const k=await fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:T?JSON.stringify(T):void 0,signal:z.signal});if(!k.ok||!k.body)throw new Error(`HTTP ${k.status}`);const R=k.body.getReader(),_=new TextDecoder;let U="",G="";for(;;){const{done:Q,value:te}=await R.read();if(Q)break;U+=_.decode(te,{stream:!0});const K=U.split(`
61
+ `);U=K.pop()||"";for(const se of K)if(se.startsWith("event: "))G=se.slice(7).trim();else if(se.startsWith("data: ")){try{const F=JSON.parse(se.slice(6)),V={event:G,data:F};G==="done"?(h(!0),u(ne=>[...ne,V])):u(ne=>[...ne,V])}catch{}G=""}}}catch(k){k.name!=="AbortError"&&b(k.message)}finally{c(!1),y.current=null}},[]),S=g.useCallback(()=>{var v;(v=y.current)==null||v.abort()},[]);return{events:r,running:f,done:d,error:x,start:m,stop:S}}function Ey(r){const u=g.useRef(r);u.current=r;const[f,c]=g.useState(new Set),d=g.useRef(new Map),h=g.useCallback(async(m,S,v)=>{var z;(z=d.current.get(m))==null||z.abort();const T=new AbortController;d.current.set(m,T),c(k=>{const R=new Set(k);return R.add(m),R});try{const k=await fetch(S,{method:"POST",headers:{"Content-Type":"application/json"},body:v?JSON.stringify(v):void 0,signal:T.signal});if(!k.ok||!k.body)throw new Error(`HTTP ${k.status}`);const R=k.body.getReader(),_=new TextDecoder;let U="",G="";for(;;){const{done:Q,value:te}=await R.read();if(Q)break;U+=_.decode(te,{stream:!0});const K=U.split(`
62
+ `);U=K.pop()||"";for(const se of K)if(se.startsWith("event: "))G=se.slice(7).trim();else if(se.startsWith("data: ")){try{const F=JSON.parse(se.slice(6)),V={event:G,data:F};u.current.onEvent(m,V)}catch{}G=""}}u.current.onDone(m)}catch(k){k.name!=="AbortError"&&u.current.onError(m,k.message)}finally{c(k=>{const R=new Set(k);return R.delete(m),R}),d.current.delete(m)}},[]),x=g.useCallback(m=>{var S;(S=d.current.get(m))==null||S.abort()},[]),b=g.useCallback(()=>{for(const m of d.current.values())m.abort()},[]),y=f.size>0;return{runningSet:f,startCase:h,stopCase:x,stopAll:b,isAnyCaseRunning:y}}const Ty={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,loading:!0,error:null};function Cy(r,u){var f,c;switch(u.type){case"SET_LOADING":return{...r,loading:u.loading};case"SET_ERROR":return{...r,error:u.error};case"INIT_DATA":{const d=new Map;if(u.benchmark)for(const x of u.benchmark.cases)d.set(x.eval_id,{status:x.status,passRate:x.pass_rate,errorMessage:x.error_message||void 0,durationMs:x.durationMs,tokens:x.tokens,output:x.output,assertions:x.assertions.map(b=>({assertion_id:b.id,text:b.text,pass:b.pass,reasoning:b.reasoning}))});const h=((c=(f=u.evals)==null?void 0:f.evals[0])==null?void 0:c.id)??null;return{...r,skillContent:u.skillContent,savedContent:u.skillContent,isDirty:!1,evals:u.evals,latestBenchmark:u.benchmark,inlineResults:d,selectedCaseId:h,loading:!1,error:null}}case"SET_PANEL":return{...r,activePanel:u.panel};case"SET_CONTENT":return{...r,skillContent:u.content,isDirty:u.content!==r.savedContent};case"CONTENT_SAVED":return{...r,savedContent:r.skillContent,isDirty:!1};case"SET_EVALS":return{...r,evals:u.evals};case"SELECT_CASE":return{...r,selectedCaseId:u.caseId};case"CASE_RUN_START":{const d=new Map(r.caseRunStates);return d.set(u.caseId,{status:"running",startedAt:Date.now()}),{...r,caseRunStates:d,runMode:u.mode,activePanel:"run"}}case"CASE_RUN_COMPLETE":{const d=new Map(r.caseRunStates);d.set(u.caseId,{status:"complete"});const h=new Map(r.inlineResults);return h.set(u.caseId,u.result),{...r,caseRunStates:d,inlineResults:h}}case"CASE_RUN_ERROR":{const d=new Map(r.caseRunStates);d.set(u.caseId,{status:"error"});const h=new Map(r.inlineResults);return h.set(u.caseId,{status:"error",errorMessage:u.error,assertions:[]}),{...r,caseRunStates:d,inlineResults:h}}case"CASE_RUN_CANCEL":{const d=new Map(r.caseRunStates);return d.set(u.caseId,{status:"cancelled"}),{...r,caseRunStates:d}}case"BULK_RUN_START":{const d=new Map(r.caseRunStates);for(const h of u.caseIds)d.set(h,{status:"queued"});return{...r,caseRunStates:d,bulkRunActive:!0,runMode:u.mode,activePanel:"run"}}case"BULK_RUN_COMPLETE":return{...r,bulkRunActive:!1,latestBenchmark:u.benchmark??r.latestBenchmark,iterationCount:r.iterationCount+1};case"CANCEL_ALL":{const d=new Map(r.caseRunStates);for(const[h,x]of d)(x.status==="running"||x.status==="queued")&&d.set(h,{status:"cancelled"});return{...r,caseRunStates:d,bulkRunActive:!1}}case"UPDATE_INLINE_RESULT":{const d=new Map(r.inlineResults);return d.set(u.evalId,u.result),{...r,inlineResults:d}}case"OPEN_IMPROVE":return{...r,improveTarget:u.evalId,activePanel:"editor"};case"CLOSE_IMPROVE":return{...r,improveTarget:null};case"SET_REGRESSIONS":return{...r,regressions:u.regressions};case"INCREMENT_ITERATION":return{...r,iterationCount:r.iterationCount+1};default:return r}}const ah=g.createContext(null);function la(){const r=g.useContext(ah);if(!r)throw new Error("useWorkspace must be used within WorkspaceProvider");return r}function Ry({plugin:r,skill:u,children:f}){const[c,d]=py(),[h,x]=g.useReducer(Cy,{...Ty,plugin:r,skill:u}),b=g.useRef(new Set),y=g.useRef(new Set),m=g.useRef(new Map),S=g.useCallback((L,J)=>{const B=J.data;let P=m.current.get(L);if(P||(P={assertions:[]},m.current.set(L,P)),J.event==="output_ready"&&(P.output=B.output,B.durationMs!=null&&(P.durationMs=B.durationMs),B.tokens!=null&&(P.tokens=B.tokens)),J.event==="assertion_result"){const ue={assertion_id:B.assertion_id,text:B.text,pass:B.pass,reasoning:B.reasoning};P.assertions.find(O=>O.assertion_id===ue.assertion_id)||P.assertions.push(ue)}J.event==="case_complete"&&(P.status=B.status,P.passRate=B.pass_rate,P.errorMessage=B.error_message||void 0),x({type:"UPDATE_INLINE_RESULT",evalId:L,result:{...P,assertions:[...P.assertions]}})},[]),v=g.useCallback(L=>{if(y.current.has(L))return;y.current.add(L);const J=m.current.get(L)??{assertions:[]};x({type:"CASE_RUN_COMPLETE",caseId:L,result:{...J,assertions:[...J.assertions]}}),b.current.has(L)&&(b.current.delete(L),b.current.size===0&&be.getLatestBenchmark(r,u).then(B=>x({type:"BULK_RUN_COMPLETE",benchmark:B})).catch(()=>x({type:"BULK_RUN_COMPLETE",benchmark:null})))},[r,u]),T=g.useCallback((L,J)=>{y.current.has(L)||(y.current.add(L),x({type:"CASE_RUN_ERROR",caseId:L,error:J}),b.current.has(L)&&(b.current.delete(L),b.current.size===0&&be.getLatestBenchmark(r,u).then(B=>x({type:"BULK_RUN_COMPLETE",benchmark:B})).catch(()=>x({type:"BULK_RUN_COMPLETE",benchmark:null}))))},[r,u]),{startCase:z,stopCase:k,stopAll:R}=Ey({onEvent:S,onDone:v,onError:T});g.useEffect(()=>{const L=c.get("panel");L&&["editor","tests","run","history","deps"].includes(L)&&x({type:"SET_PANEL",panel:L})},[]),g.useEffect(()=>{c.get("panel")!==h.activePanel&&d(J=>{const B=new URLSearchParams(J);return B.set("panel",h.activePanel),B},{replace:!0})},[h.activePanel]),g.useEffect(()=>{let L=!1;async function J(){try{const[B,P,ue]=await Promise.allSettled([be.getSkillDetail(r,u),be.getEvals(r,u),be.getLatestBenchmark(r,u)]);if(L)return;x({type:"INIT_DATA",skillContent:B.status==="fulfilled"?B.value.skillContent:"",evals:P.status==="fulfilled"?P.value:null,benchmark:ue.status==="fulfilled"?ue.value:null})}catch(B){L||x({type:"SET_ERROR",error:B.message})}}return J(),()=>{L=!0}},[r,u]);const _=g.useCallback(async()=>{try{await be.applyImprovement(r,u,h.skillContent),x({type:"CONTENT_SAVED"})}catch(L){x({type:"SET_ERROR",error:L.message})}},[r,u,h.skillContent]),U=g.useCallback(async L=>{try{const J=await be.saveEvals(r,u,L);x({type:"SET_EVALS",evals:J})}catch(J){x({type:"SET_ERROR",error:J.message})}},[r,u]),G=g.useCallback((L,J="benchmark")=>{const B=h.caseRunStates.get(L);if((B==null?void 0:B.status)!=="running")if(m.current.delete(L),y.current.delete(L),x({type:"CASE_RUN_START",caseId:L,mode:J}),J==="comparison"){const P=`/api/skills/${r}/${u}/compare`;z(L,P,{eval_ids:[L]})}else{const P=`/api/skills/${r}/${u}/benchmark/case/${L}`;z(L,P,J==="baseline"?{baseline_only:!0}:void 0)}},[r,u,h.caseRunStates,z]),Q=g.useCallback((L="benchmark")=>{var P;const J=((P=h.evals)==null?void 0:P.evals)??[];if(J.length===0)return;const B=J.map(ue=>ue.id);for(const ue of B)m.current.delete(ue),y.current.delete(ue);x({type:"BULK_RUN_START",caseIds:B,mode:L}),b.current=new Set(B);for(const ue of B)if(L==="comparison")z(ue,`/api/skills/${r}/${u}/compare`,{eval_ids:[ue]});else{const O=`/api/skills/${r}/${u}/benchmark/case/${ue}`;z(ue,O,L==="baseline"?{baseline_only:!0}:void 0)}},[r,u,h.evals,z]),te=g.useCallback(L=>{k(L),x({type:"CASE_RUN_CANCEL",caseId:L}),b.current.delete(L),y.current.add(L)},[k]),K=g.useCallback(()=>{R(),x({type:"CANCEL_ALL"}),b.current.clear()},[R]),se=g.useCallback(async(L,J)=>{x({type:"OPEN_IMPROVE",evalId:L})},[]),F=g.useCallback(async(L,J)=>{try{await be.applyImprovement(r,u,J),x({type:"SET_CONTENT",content:J}),x({type:"CONTENT_SAVED"}),x({type:"CLOSE_IMPROVE"}),G(L,"benchmark")}catch(B){x({type:"SET_ERROR",error:B.message})}},[r,u,G]),V=g.useCallback(async()=>{try{const L=await be.getSkillDetail(r,u);x({type:"SET_CONTENT",content:L.skillContent}),x({type:"CONTENT_SAVED"})}catch{}},[r,u]),ne=g.useCallback(async()=>{try{const L=await be.generateEvals(r,u),J=await be.saveEvals(r,u,L);x({type:"SET_EVALS",evals:J})}catch(L){x({type:"SET_ERROR",error:L.message})}},[r,u]),I=g.useMemo(()=>({state:h,dispatch:x,saveContent:_,saveEvals:U,runCase:G,runAll:Q,cancelCase:te,cancelAll:K,improveForCase:se,applyImproveAndRerun:F,refreshSkillContent:V,generateEvals:ne}),[h,_,U,G,Q,te,K,se,F,V,ne]);return s.jsx(ah.Provider,{value:I,children:f})}function Ay({state:r}){const{plugin:u,skill:f,evals:c,latestBenchmark:d,isDirty:h,caseRunStates:x,regressions:b,iterationCount:y}=r,m=Array.from(x.values()).some(R=>R.status==="running"||R.status==="queued"),S=d==null?void 0:d.overall_pass_rate,v=(c==null?void 0:c.evals.reduce((R,_)=>R+_.assertions.length,0))??0,T=(c==null?void 0:c.evals.length)??0,z=S!=null?S>=80?"var(--green)":S>=50?"var(--yellow)":"var(--red)":"var(--text-tertiary)",k=S!=null?S>=80?"var(--green-muted)":S>=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)"},children:[s.jsxs("div",{className:"flex items-center gap-2 text-[13px]",children:[s.jsx(rl,{to:"/",className:"transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:R=>{R.currentTarget.style.color="var(--text-primary)"},onMouseLeave:R=>{R.currentTarget.style.color="var(--text-tertiary)"},children:"Skills"}),s.jsx(_m,{}),s.jsx("span",{style:{color:"var(--text-tertiary)"},children:u}),s.jsx(_m,{}),s.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:f}),h&&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"}),m&&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:[b.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"})]}),b.length," regression",b.length>1?"s":""]}),y>0&&s.jsxs("span",{className:"pill",style:{background:"var(--purple-muted)",color:"var(--purple)"},children:["Iter ",y]}),s.jsx("span",{className:"pill",style:{background:k,color:z},children:S!=null?`${Math.round(S*100)}%`:"--"}),s.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[T," case",T!==1?"s":""," / ",v," assert",v!==1?"s":""]})]})]})}function _m(){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 My=[{id:"editor",label:"Editor",shortcut:"1"},{id:"tests",label:"Tests",shortcut:"2"},{id:"run",label:"Run",shortcut:"3"},{id:"history",label:"History",shortcut:"4"},{id:"deps",label:"Deps",shortcut:"5"}];function wy({id:r,active:u}){const c={width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:u?"#fff":"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"};switch(r){case"editor":return s.jsxs("svg",{...c,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",{...c,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",{...c,children:s.jsx("polygon",{points:"5 3 19 12 5 21 5 3"})});case"history":return s.jsxs("svg",{...c,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",{...c,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 _y({activePanel:r,onPanelChange:u,isDirty:f,isRunning:c,hasRegressions:d}){return s.jsx("div",{className:"flex flex-col gap-1 py-2 px-1",style:{background:"var(--surface-1)",borderRight:"1px solid var(--border-subtle)",width:48},children:My.map(h=>{const x=r===h.id,b=h.id==="editor"&&f||h.id==="run"&&c||h.id==="history"&&d;return s.jsxs("button",{onClick:()=>u(h.id),title:`${h.label} (Ctrl+${h.shortcut})`,className:"relative flex items-center justify-center rounded-lg transition-all duration-150",style:{width:40,height:40,background:x?"var(--accent)":"transparent",color:x?"#fff":"var(--text-tertiary)"},onMouseEnter:y=>{x||(y.currentTarget.style.background="var(--surface-3)",y.currentTarget.style.color="var(--text-primary)")},onMouseLeave:y=>{x||(y.currentTarget.style.background="transparent",y.currentTarget.style.color="var(--text-tertiary)")},children:[s.jsx(wy,{id:h.id,active:x}),b&&s.jsx("span",{className:"absolute top-1 right-1 rounded-full",style:{width:6,height:6,background:h.id==="run"?"var(--accent)":h.id==="history"?"var(--red)":"var(--yellow)"}})]},h.id)})})}function ky(r){const u=r.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);if(!u)return{metadata:{},body:r};const f=u[1],c=u[2].trim(),d={},h=f.split(`
63
+ `);let x="",b=!1;for(const y of h){const m=y.match(/^[ \t]+([\w-]+):\s*(.*)$/);if(m&&x&&b){const T=m[1],z=m[2].trim();let k=d[x];if((typeof k!="object"||Array.isArray(k))&&(k={},d[x]=k),!z)k[T]=[];else{const R=z.match(/^\[(.+)\]$/);R?k[T]=R[1].split(",").map(_=>_.trim().replace(/^["']|["']$/g,"")).filter(Boolean):k[T]=z.replace(/^["']|["']$/g,"")}continue}const S=y.match(/^\s+-\s+(.+)$/);if(S&&x){b=!1;const T=d[x];Array.isArray(T)?T.push(S[1].trim().replace(/^["']|["']$/g,"")):d[x]=[S[1].trim().replace(/^["']|["']$/g,"")];continue}const v=y.match(/^([\w-]+):\s*(.*)$/);if(v){x=v[1];const T=v[2].trim();if(b=!1,!T){d[x]={},b=!0;continue}const z=T.match(/^\[(.+)\]$/);if(z){d[x]=z[1].split(",").map(k=>k.trim().replace(/^["']|["']$/g,"")).filter(Boolean);continue}d[x]=T.replace(/^["']|["']$/g,"")}}return{metadata:d,body:c}}function zy(r){if(!r)return"";let u=Dy(r);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 Dy(r){const u=r.split(`
64
+ `),f=[];let c=0;for(;c<u.length;)if(u[c].trim().startsWith("|")&&c+1<u.length&&u[c+1].trim().startsWith("|")&&/\|[\s-:]+\|/.test(u[c+1])){const d=km(u[c]);c+=2;const h=[];for(;c<u.length&&u[c].trim().startsWith("|");)h.push(km(u[c])),c++;const x='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)"',b='style="padding:0.4rem 0.6rem;font-size:12px;color:var(--text-secondary);border-bottom:1px solid var(--border-subtle)"';let y='<table style="width:100%;border-collapse:collapse;margin:0.5rem 0;border:1px solid var(--border-subtle);border-radius:6px;overflow:hidden">';y+="<thead><tr>";for(const m of d)y+=`<th ${x}>${m}</th>`;y+="</tr></thead><tbody>";for(const m of h){y+="<tr>";for(const S of m)y+=`<td ${b}>${S}</td>`;y+="</tr>"}y+="</tbody></table>",f.push(y)}else f.push(u[c]),c++;return f.join(`
65
+ `)}function km(r){return r.split("|").map(u=>u.trim()).filter(u=>u.length>0)}function Oy(r,u){const f=r.split(`
66
+ `),c=u.split(`
67
+ `);if(f.length>1e3||c.length>1e3)return[...f.map(S=>({type:"unchanged",content:S}))];const d=f.length,h=c.length,x=Array.from({length:d+1},()=>new Array(h+1).fill(0));for(let S=1;S<=d;S++)for(let v=1;v<=h;v++)f[S-1]===c[v-1]?x[S][v]=x[S-1][v-1]+1:x[S][v]=Math.max(x[S-1][v],x[S][v-1]);const b=[];let y=d,m=h;for(;y>0||m>0;)y>0&&m>0&&f[y-1]===c[m-1]?(b.push({type:"unchanged",content:f[y-1]}),y--,m--):m>0&&(y===0||x[y][m-1]>=x[y-1][m])?(b.push({type:"added",content:c[m-1]}),m--):(b.push({type:"removed",content:f[y-1]}),y--);return b.reverse()}function Ly({plugin:r,skill:u,skillContent:f,onApplied:c}){const[d,h]=g.useState("closed"),[x,b]=g.useState(null),[y,m]=g.useState("claude-cli"),[S,v]=g.useState("opus"),[T,z]=g.useState([]),[k,R]=g.useState(""),[_,U]=g.useState(""),[G,Q]=g.useState(null),[te,K]=g.useState(!1);g.useEffect(()=>{be.getConfig().then(L=>{b(L),L.providers.find(B=>B.id==="claude-cli"&&B.available)&&(m("claude-cli"),v("opus"))}).catch(()=>{})},[]);function se(){return x==null?void 0:x.providers.find(L=>L.id===y&&L.available)}async function F(){h("loading"),Q(null);try{const L=await be.improveSkill(r,u,{provider:y,model:S});R(L.improved),U(L.reasoning),z(Oy(L.original,L.improved)),h("diff_shown")}catch(L){Q(L.message),h("open")}}async function V(){K(!0);try{await be.applyImprovement(r,u,k),c(k),h("closed")}catch(L){Q(L.message)}finally{K(!1)}}function ne(){h("closed"),z([]),R(""),U(""),Q(null)}if(d==="closed")return s.jsxs("button",{onClick:()=>h("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 I=se();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:ne,className:"w-7 h-7 rounded-lg flex items-center justify-center transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:L=>{L.currentTarget.style.background="var(--surface-3)"},onMouseLeave:L=>{L.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:[(d==="open"||d==="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:y,onChange:L=>{m(L.target.value);const J=x==null?void 0:x.providers.find(B=>B.id===L.target.value);J!=null&&J.models[0]&&v(J.models[0].id)},disabled:d==="loading",children:x==null?void 0:x.providers.filter(L=>L.available).map(L=>s.jsx("option",{value:L.id,children:L.label},L.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:S,onChange:L=>v(L.target.value),disabled:d==="loading",children:I==null?void 0:I.models.map(L=>s.jsx("option",{value:L.id,children:L.label},L.id))})]}),s.jsx("button",{onClick:F,disabled:d==="loading",className:"btn btn-primary flex-shrink-0",children:d==="loading"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"spinner",style:{width:12,height:12}})," Improving..."]}):"Improve"})]}),G&&s.jsx("div",{className:"mb-4 px-4 py-3 rounded-lg text-[13px]",style:{background:"var(--red-muted)",color:"var(--red)"},children:G}),d==="diff_shown"&&s.jsxs(s.Fragment,{children:[_&&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: "}),_]}),s.jsx("div",{className:"rounded-lg overflow-hidden mb-4",style:{border:"1px solid var(--border-subtle)",maxHeight:"400px",overflowY:"auto"},children:T.map((L,J)=>s.jsxs("div",{className:"px-3 py-0.5 text-[11px] font-mono",style:{background:L.type==="added"?"rgba(34,197,94,0.1)":L.type==="removed"?"rgba(239,68,68,0.1)":"transparent",color:L.type==="added"?"var(--green)":L.type==="removed"?"var(--red)":"var(--text-secondary)",borderLeft:L.type==="added"?"3px solid var(--green)":L.type==="removed"?"3px solid var(--red)":"3px solid transparent"},children:[s.jsx("span",{style:{userSelect:"none",opacity:.5,marginRight:8},children:L.type==="added"?"+":L.type==="removed"?"-":" "}),L.content]},J))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:V,disabled:te,className:"btn btn-primary",children:te?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:ne,className:"btn btn-secondary",children:"Discard"})]})]})]})]})}function Uy({size:r=15}){return s.jsxs("svg",{width:r,height:r,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 By({size:r=15}){return s.jsxs("svg",{width:r,height:r,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 Hy({size:r=15}){return s.jsxs("svg",{width:r,height:r,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 qy(){const{state:r,dispatch:u,saveContent:f}=la(),{plugin:c,skill:d,skillContent:h,isDirty:x,improveTarget:b}=r,[y,m]=g.useState("split"),[S,v]=g.useState(!1),T=g.useRef(null),{metadata:z,body:k}=ky(h),R=z["allowed-tools"],_=Array.isArray(R)?R:typeof R=="string"?[R]:[],U=z.name,G=z.description,Q=z.metadata,te=typeof Q=="object"&&!Array.isArray(Q)?Q:null,K=z.version||(te==null?void 0:te.version),se=z.tags||(te==null?void 0:te.tags),F=Array.isArray(se)?se:typeof se=="string"?se.split(",").map(B=>B.trim()).filter(Boolean):[],V=new Set(["name","description","metadata","allowed-tools","version","tags"]),ne=Object.entries(z).filter(([B])=>!V.has(B)),I=g.useCallback(async()=>{v(!0),await f(),v(!1)},[f]),L=g.useCallback(B=>{(B.ctrlKey||B.metaKey)&&B.key==="s"&&(B.preventDefault(),B.stopPropagation(),x&&I())},[x,I]),J=[{mode:"raw",icon:s.jsx(Uy,{}),label:"Editor"},{mode:"split",icon:s.jsx(By,{}),label:"Split"},{mode:"preview",icon:s.jsx(Hy,{}),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:J.map(({mode:B,icon:P,label:ue})=>s.jsxs("button",{onClick:()=>m(B),title:ue,className:"flex items-center gap-1.5 rounded-md transition-all duration-150",style:{padding:"5px 10px",background:y===B?"var(--surface-4)":"transparent",color:y===B?"var(--text-primary)":"var(--text-tertiary)",fontSize:11,fontWeight:y===B?600:400,border:"none",cursor:"pointer"},children:[P,s.jsx("span",{style:{letterSpacing:"0.01em"},children:ue})]},B))}),s.jsxs("div",{className:"flex items-center gap-2",children:[x&&s.jsx("button",{onClick:()=>u({type:"SET_CONTENT",content:r.savedContent}),className:"btn btn-ghost text-[11px]",style:{padding:"4px 8px"},children:"Discard"}),s.jsx("button",{onClick:I,disabled:!x||S,className:"btn btn-primary text-[11px]",style:{padding:"5px 14px"},children:S?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:y==="raw"||y==="preview"?"1fr":"1fr 1fr"},children:[y!=="preview"&&s.jsx("div",{className:"flex flex-col overflow-hidden",style:{borderRight:y==="split"?"1px solid var(--border-subtle)":"none"},children:s.jsx("textarea",{ref:T,value:h,onChange:B=>u({type:"SET_CONTENT",content:B.target.value}),onKeyDown:L,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"}})}),y!=="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:[(U||K||G)&&s.jsxs("div",{style:{marginBottom:20},children:[s.jsxs("div",{className:"flex items-baseline gap-3",style:{marginBottom:8},children:[U&&s.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"var(--text-primary)",letterSpacing:"-0.02em",lineHeight:1.2,margin:0},children:U}),K&&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",K]})]}),G&&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:G})]}),F.length>0&&s.jsx("div",{className:"flex flex-wrap items-center gap-1.5",style:{marginBottom:16},children:F.map(B=>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:B},B))}),_.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"}),_.map(B=>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:B},B))]})}),ne.length>0&&s.jsx("div",{style:{marginBottom:16,padding:"8px 0",borderTop:"1px solid var(--border-subtle)",borderBottom:"1px solid var(--border-subtle)"},children:ne.map(([B,P],ue)=>{const O=Array.isArray(P)?P.join(", "):typeof P=="object"?Object.entries(P).map(([$,re])=>`${$}: ${Array.isArray(re)?re.join(", "):re}`).join(" | "):P;return s.jsxs("div",{className:"flex items-baseline gap-3",style:{padding:"4px 0",borderTop:ue>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:B}),s.jsx("span",{style:{fontSize:12,color:"var(--text-secondary)"},children:O})]},B)})}),(U||G||F.length>0||_.length>0||ne.length>0)&&k&&s.jsx("div",{style:{height:1,background:"linear-gradient(90deg, var(--accent) 0%, var(--border-subtle) 40%, transparent 100%)",marginBottom:20,opacity:.5}}),k&&s.jsx("div",{className:"text-[13px] leading-relaxed overflow-x-auto",style:{color:"var(--text-secondary)",wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:zy(k)}})]})})]}),b!==null&&c&&d&&s.jsx("div",{style:{borderTop:"1px solid var(--border-subtle)"},children:s.jsx(Ly,{plugin:c,skill:d,skillContent:h,onApplied:B=>{u({type:"SET_CONTENT",content:B}),u({type:"CONTENT_SAVED"}),u({type:"CLOSE_IMPROVE"})}})})]})}function ec(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function nh(r){const u=new Date(r);return u.toLocaleDateString(void 0,{month:"short",day:"numeric"})+", "+u.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}function sh(r){return r==null?"--":r>=1e3?`${(r/1e3).toFixed(1)}s`:`${r}ms`}function ih({entries:r}){if(r.length<2)return null;const u=80,f=24,c=2,d=r.slice().reverse(),h=d.length,x=d.map((b,y)=>{const m=c+y/(h-1)*(u-c*2),S=c+(f-c*2)-b.pass_rate*(f-c*2);return`${m},${S}`});return s.jsxs("svg",{width:u,height:f,style:{display:"block",flexShrink:0},children:[s.jsx("polyline",{points:x.join(" "),fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),x.length>0&&s.jsx("circle",{cx:parseFloat(x[x.length-1].split(",")[0]),cy:parseFloat(x[x.length-1].split(",")[1]),r:2.5,fill:"var(--accent)"})]})}function Yy(){var U;const{state:r,dispatch:u,saveEvals:f,runCase:c,cancelCase:d,generateEvals:h}=la(),{evals:x,selectedCaseId:b,inlineResults:y,caseRunStates:m}=r,[S,v]=g.useState(!1),[T,z]=g.useState(!1),k=(x==null?void 0:x.evals)??[],R=k.find(G=>G.id===b)??null,_=g.useCallback(async()=>{z(!0),await h(),z(!1)},[h]);return!x||k.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:()=>v(!0),className:"btn btn-primary text-[12px]",children:"Create Test Case"}),s.jsx("button",{onClick:_,disabled:T,className:"btn btn-secondary text-[12px]",children:T?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}})," Generating..."]}):"Generate with AI"})]}),S&&x&&s.jsx(zm,{evals:x,onSave:G=>{f(G),v(!1)},onCancel:()=>v(!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 (",k.length,")"]}),s.jsx("div",{className:"py-1",children:k.map(G=>{const Q=y.get(G.id),te=b===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:te?"var(--accent-muted)":"transparent",borderLeft:te?"3px solid var(--accent)":"3px solid transparent"},onMouseEnter:K=>{te||(K.currentTarget.style.background="var(--surface-2)")},onMouseLeave:K=>{te||(K.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:te?"var(--text-primary)":"var(--text-secondary)"},children:["#",G.id," ",G.name]}),s.jsx(rh,{result:Q})]}),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":"",(Q==null?void 0:Q.passRate)!=null&&s.jsx(Qy,{passRate:Q.passRate})]})]},G.id)})}),s.jsx("div",{className:"px-3 py-2",children:s.jsx("button",{onClick:()=>v(!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:R?s.jsx(Gy,{evalCase:R,result:y.get(R.id),evals:x,caseStatus:((U=m.get(R.id))==null?void 0:U.status)??"idle",onSaveEvals:f,onRun:G=>c(G,"benchmark"),onCompare:G=>c(G,"comparison"),onCancel:G=>d(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"})}),S&&x&&s.jsx(zm,{evals:x,onSave:G=>{f(G),v(!1)},onCancel:()=>v(!1)})]})}function Gy({evalCase:r,result:u,evals:f,caseStatus:c,onSaveEvals:d,onRun:h,onCompare:x,onCancel:b,onImprove:y}){const[m,S]=g.useState(!1),[v,T]=g.useState(r.prompt),[z,k]=g.useState(!1),[R,_]=g.useState(r.expected_output);g.useState(()=>{T(r.prompt),_(r.expected_output)});const U=g.useCallback(I=>{d({...f,evals:f.evals.map(L=>L.id===I.id?I:L)})},[f,d]),G=g.useCallback(()=>{U({...r,prompt:v}),S(!1)},[r,v,U]),Q=g.useCallback(()=>{U({...r,expected_output:R}),k(!1)},[r,R,U]),te=g.useCallback(()=>{U({...r,assertions:[...r.assertions,{id:`assert-${Date.now()}`,text:"New assertion",type:"boolean"}]})},[r,U]),K=g.useCallback((I,L)=>{U({...r,assertions:r.assertions.map(J=>J.id===I?{...J,text:L}:J)})},[r,U]),se=g.useCallback(I=>{U({...r,assertions:r.assertions.filter(L=>L.id!==I)})},[r,U]),F=g.useCallback(()=>{confirm("Delete this test case?")&&d({...f,evals:f.evals.filter(I=>I.id!==r.id)})},[f,r.id,d]),V=u&&u.assertions.length>0&&u.assertions.every(I=>I.pass),ne=u&&u.assertions.some(I=>!I.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:["#",r.id," ",r.name]}),s.jsx(rh,{result:u})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[c==="running"||c==="queued"?s.jsxs("button",{onClick:()=>b(r.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:()=>h(r.id),className:"btn btn-primary text-[12px]",children:"Run"}),s.jsx("button",{onClick:()=>x(r.id),className:"btn btn-purple text-[12px]",children:"A/B Compare"})]}),ne&&c!=="running"&&c!=="queued"&&s.jsx("button",{onClick:()=>y(r.id),className:"btn btn-secondary text-[12px]",children:"Fix with AI"}),c!=="running"&&c!=="queued"&&s.jsx("button",{onClick:F,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"})]})})]})]}),V&&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(Zu,{title:"Prompt",children:m?s.jsxs("div",{children:[s.jsx("textarea",{value:v,onChange:I=>T(I.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:G,className:"btn btn-primary text-[12px]",children:"Save"}),s.jsx("button",{onClick:()=>{T(r.prompt),S(!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:()=>S(!0),onMouseEnter:I=>{I.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:I=>{I.currentTarget.style.borderColor="var(--border-subtle)"},children:r.prompt||s.jsx("span",{style:{color:"var(--text-tertiary)",fontStyle:"italic"},children:"Click to edit prompt..."})})}),s.jsx(Zu,{title:"Expected Output",children:z?s.jsxs("div",{children:[s.jsx("textarea",{value:R,onChange:I=>_(I.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:Q,className:"btn btn-primary text-[12px]",children:"Save"}),s.jsx("button",{onClick:()=>{_(r.expected_output),k(!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:()=>k(!0),onMouseEnter:I=>{I.currentTarget.style.borderColor="var(--border-hover)"},onMouseLeave:I=>{I.currentTarget.style.borderColor="var(--border-subtle)"},children:r.expected_output||s.jsx("span",{style:{fontStyle:"italic"},children:"Click to edit expected output..."})})}),s.jsx(Zu,{title:`Assertions (${r.assertions.length})`,action:s.jsx("button",{onClick:te,className:"btn btn-ghost text-[11px]",children:"+ Add"}),children:r.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:r.assertions.map(I=>{const L=u==null?void 0:u.assertions.find(J=>J.assertion_id===I.id);return s.jsx(Xy,{assertion:I,result:L,onUpdate:J=>K(I.id,J),onDelete:()=>se(I.id)},I.id)})})}),(u==null?void 0:u.output)&&s.jsx(Vy,{output:u.output,durationMs:u.durationMs,tokens:u.tokens}),s.jsx(Zy,{evalId:r.id})]},r.id)}function Xy({assertion:r,result:u,onUpdate:f,onDelete:c}){const[d,h]=g.useState(!1),[x,b]=g.useState(r.text),[y,m]=g.useState(!1),S=()=>{f(x),h(!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:r.id})}),d?s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{value:x,onChange:v=>b(v.target.value),onKeyDown:v=>{v.key==="Enter"&&S(),v.key==="Escape"&&h(!1)},className:"input-field flex-1 text-[12px]",autoFocus:!0}),s.jsx("button",{onClick:S,className:"btn btn-primary text-[11px]",children:"Save"})]}):s.jsx("div",{className:"text-[12px] cursor-pointer",style:{color:"var(--text-secondary)"},onClick:()=>{b(r.text),h(!0)},children:r.text}),(u==null?void 0:u.reasoning)&&s.jsx("button",{onClick:()=>m(!y),className:"text-[11px] mt-1 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:y?"Hide reasoning":"Show reasoning"}),y&&(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:c,className:"btn btn-ghost p-1 opacity-0 group-hover:opacity-100",style:{color:"var(--text-tertiary)"},onMouseEnter:v=>{v.currentTarget.style.color="var(--red)",v.currentTarget.style.opacity="1"},onMouseLeave:v=>{v.currentTarget.style.color="var(--text-tertiary)",v.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 Zu({title:r,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:r}),u]}),f]})}function rh({result:r}){if(!r||r.status==null)return s.jsx("span",{className:"pill text-[10px]",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:"--"});const u=r.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:r.passRate!=null?`${Math.round(r.passRate*100)}%`:r.status})}function Qy({passRate:r}){const u=Math.round(r*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 Vy({output:r,durationMs:u,tokens:f}){const[c,d]=g.useState(!1);return s.jsxs("div",{className:"mb-5",children:[s.jsxs("button",{onClick:()=>d(!c),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:c?"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)"]})]}),c&&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:r})]})}function Zy({evalId:r}){const{state:u,dispatch:f}=la(),{plugin:c,skill:d}=u,[h,x]=g.useState(!0),[b,y]=g.useState(!1),[m,S]=g.useState({}),v=m[r]??null,T=g.useCallback(async R=>{y(!0);try{const _=await be.getCaseHistory(c,d,R);S(U=>({...U,[R]:_}))}catch{S(_=>({..._,[R]:[]}))}finally{y(!1)}},[c,d]);g.useEffect(()=>{h&&!m[r]&&T(r)},[r,c,d]);const z=g.useCallback(()=>{const R=!h;x(R),R&&!m[r]&&T(r)},[h,r,m,T]),k=v?v.slice(0,10):[];return s.jsxs("div",{className:"mb-5",children:[s.jsxs("button",{onClick:z,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:h?"rotate(90deg)":"rotate(0)",transition:"transform 0.2s ease"},children:s.jsx("polyline",{points:"9 18 15 12 9 6"})}),"Execution History",v&&v.length>0&&s.jsxs("span",{style:{fontWeight:400},children:["(",v.length," run",v.length!==1?"s":"",")"]})]}),h&&s.jsx("div",{className:"animate-fade-in",children:b?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..."})]}):!v||v.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:[k.length>=2&&s.jsx("div",{className:"mb-2",children:s.jsx(ih,{entries:k})}),s.jsx("div",{className:"space-y-2",children:k.map((R,_)=>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:nh(R.timestamp)}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:R.model}),s.jsx("span",{className:"pill",style:{fontSize:9,padding:"1px 6px",background:R.type==="benchmark"?"rgba(99,131,255,0.15)":R.type==="comparison"?"var(--purple-muted)":"rgba(251,146,60,0.15)",color:R.type==="benchmark"?"#6383ff":R.type==="comparison"?"var(--purple)":"#fb923c"},children:R.type}),s.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:ec(R.pass_rate)},children:[Math.round(R.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:[R.durationMs!=null&&s.jsx("span",{children:sh(R.durationMs)}),R.tokens!=null&&s.jsxs("span",{children:[R.tokens>=1e3?`${(R.tokens/1e3).toFixed(1)}k`:R.tokens," tok"]})]}),s.jsx("div",{className:"space-y-0.5",children:R.assertions.map(U=>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:U.pass?"var(--green-muted)":"var(--red-muted)"},children:U.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:U.text})]},U.id))})]},_))}),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:R=>{R.currentTarget.style.textDecoration="underline"},onMouseLeave:R=>{R.currentTarget.style.textDecoration="none"},children:"View full history →"})]})})]})}function zm({evals:r,onSave:u,onCancel:f}){const[c,d]=g.useState(""),[h,x]=g.useState(""),[b,y]=g.useState(""),[m,S]=g.useState([{id:`assert-${Date.now()}`,text:"",type:"boolean"}]),v=Math.max(0,...r.evals.map(z=>z.id))+1,T=()=>{if(!c.trim()||!h.trim())return;const z={id:v,name:c.trim(),prompt:h.trim(),expected_output:b.trim(),files:[],assertions:m.filter(k=>k.text.trim())};u({...r,evals:[...r.evals,z]})};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:c,onChange:z=>d(z.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:h,onChange:z=>x(z.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:b,onChange:z=>y(z.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"}),m.map((z,k)=>s.jsxs("div",{className:"flex gap-2 mb-2",children:[s.jsx("input",{value:z.text,onChange:R=>S(m.map((_,U)=>U===k?{..._,text:R.target.value}:_)),className:"input-field flex-1 text-[12px]",placeholder:"e.g., Output includes a greeting"}),m.length>1&&s.jsx("button",{onClick:()=>S(m.filter((R,_)=>_!==k)),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"})]})})]},z.id)),s.jsx("button",{onClick:()=>S([...m,{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:T,disabled:!c.trim()||!h.trim(),className:"btn btn-primary text-[12px]",children:"Save"})]})]})})}function Ky(){const{state:r,runCase:u,runAll:f,cancelCase:c,cancelAll:d}=la(),{evals:h,caseRunStates:x,bulkRunActive:b,runMode:y,latestBenchmark:m,inlineResults:S}=r,v=(h==null?void 0:h.evals)??[],T=g.useMemo(()=>{for(const R of x.values())if(R.status==="running"||R.status==="queued")return!0;return!1},[x]),z=v.filter(R=>{const _=x.get(R.id);return _&&(_.status==="complete"||_.status==="error"||_.status==="cancelled")}).length,k=v.filter(R=>{const _=x.get(R.id);return _&&(_.status==="running"||_.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"}),T&&s.jsxs("span",{className:"text-[11px] font-medium",style:{color:"var(--accent)"},children:[k," running"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[T&&s.jsxs("button",{onClick:d,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("benchmark"),disabled:v.length===0||T,className:"btn btn-primary text-[12px]",children:"Run All"}),s.jsx("button",{onClick:()=>f("baseline"),disabled:v.length===0||T,className:"btn btn-secondary text-[12px]",children:"Baseline All"}),s.jsx("button",{onClick:()=>f("comparison"),disabled:v.length===0||T,className:"btn btn-purple text-[12px]",children:"A/B All"})]})]}),T&&v.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: ",z,"/",v.length," cases"]}),s.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[Math.round(z/v.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:`${z/v.length*100}%`,background:"var(--accent)"}})})]}),s.jsx("div",{className:"space-y-3 stagger-children",children:v.map(R=>{var G;const _=S.get(R.id),U=((G=x.get(R.id))==null?void 0:G.status)??"idle";return s.jsx($y,{name:R.name,evalId:R.id,result:_,caseStatus:U,onRun:Q=>u(Q,"benchmark"),onBaseline:Q=>u(Q,"baseline"),onCompare:Q=>u(Q,"comparison"),onCancel:Q=>c(Q)},R.id)})}),!T&&m&&m.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:(m.overall_pass_rate??0)>=.8?"var(--green)":(m.overall_pass_rate??0)>=.5?"var(--yellow)":"var(--red)"},children:m.overall_pass_rate!=null?`${Math.round(m.overall_pass_rate*100)}%`:"--"})]}),m.totalDurationMs!=null&&s.jsxs("div",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:["Total: ",(m.totalDurationMs/1e3).toFixed(1),"s",m.model&&` | Model: ${m.model}`]})]}),m.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(Dm,{label:"Skill",value:m.comparison.skillPassRate,color:"var(--accent)"}),s.jsx(Dm,{label:"Baseline",value:m.comparison.baselinePassRate,color:"var(--text-tertiary)"})]}),s.jsxs("div",{className:"mt-3 text-[12px] font-medium",style:{color:m.comparison.delta>0?"var(--green)":m.comparison.delta<0?"var(--red)":"var(--text-tertiary)"},children:["Delta: ",m.comparison.delta>0?"+":"",(m.comparison.delta*100).toFixed(1),"%",m.verdict&&` | ${m.verdict}`]})]})]})]})}function $y({name:r,evalId:u,result:f,caseStatus:c,onRun:d,onBaseline:h,onCompare:x,onCancel:b}){const[y,m]=g.useState(!1),S=c==="running"||c==="queued";return s.jsxs("div",{className:"rounded-xl overflow-hidden transition-all duration-200",style:{background:"var(--surface-1)",border:S?"1px solid var(--accent)":"1px solid var(--border-subtle)",boxShadow:S?"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:[c==="running"&&s.jsx("span",{className:"spinner",style:{width:14,height:14,borderWidth:1.5}}),c==="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," ",r]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[S?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:()=>d(u),className:"btn btn-primary text-[10px] px-2 py-1",children:"Run"}),s.jsx("button",{onClick:()=>h(u),className:"btn btn-secondary text-[10px] px-2 py-1",children:"Base"}),s.jsx("button",{onClick:()=>x(u),className:"btn btn-purple text-[10px] px-2 py-1",children:"A/B"})]}),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}),c==="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(v=>s.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[s.jsx("span",{style:{color:v.pass?"var(--green)":"var(--red)"},children:v.pass?"PASS":"FAIL"}),s.jsx("span",{style:{color:"var(--text-secondary)"},children:v.text})]},v.assertion_id))}),f.output&&s.jsx("button",{onClick:()=>m(!y),className:"text-[11px] mt-2 transition-colors duration-150",style:{color:"var(--text-tertiary)"},children:y?"Hide output":"Show output"}),y&&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 Dm({label:r,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:r}),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 Ku={benchmark:"#6383ff",comparison:"#a78bfa",baseline:"#fb923c"},Om={benchmark:"Benchmark",comparison:"Comparison",baseline:"Baseline"},tc=600,lc=180,at=40,$u=tc-at*2,Dl=lc-at*2,Jy=[25,50,75,100];function Lm(r){return new Date(r).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Wy({entries:r}){const[u,f]=g.useState(null);if(r.length<2)return null;const c=r.length,d=r.map((b,y)=>{const m=at+y/(c-1)*$u,S=b.passRate*100,v=at+Dl-S/100*Dl;return{x:m,y:v,pct:S,entry:b}}),h=d.map(b=>`${b.x},${b.y}`).join(" "),x=Array.from(new Set(r.map(b=>b.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:x.map(b=>s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-3 h-3 rounded-full",style:{background:Ku[b]??"var(--text-tertiary)"}}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:Om[b]??b})]},b))}),s.jsxs("svg",{width:tc,height:lc,viewBox:`0 0 ${tc} ${lc}`,style:{display:"block",overflow:"visible"},children:[Jy.map(b=>{const y=at+Dl-b/100*Dl;return s.jsxs("g",{children:[s.jsx("line",{x1:at,y1:y,x2:at+$u,y2:y,stroke:"var(--border-subtle)",strokeWidth:.5,strokeDasharray:"4 4"}),s.jsxs("text",{x:at-8,y:y+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:[b,"%"]})]},b)}),s.jsx("line",{x1:at,y1:at+Dl,x2:at+$u,y2:at+Dl,stroke:"var(--border-subtle)",strokeWidth:1}),s.jsx("text",{x:at-8,y:at+Dl+3.5,textAnchor:"end",style:{fill:"var(--text-tertiary)",fontSize:10},children:"0%"}),s.jsx("polyline",{points:h,fill:"none",stroke:"var(--border-subtle)",strokeWidth:1.5,strokeLinejoin:"round"}),d.map((b,y)=>s.jsx("circle",{cx:b.x,cy:b.y,r:5,fill:Ku[b.entry.type]??"var(--text-tertiary)",stroke:"var(--surface-2)",strokeWidth:2,style:{cursor:"pointer",transition:"r 0.15s ease"},onMouseEnter:m=>{m.currentTarget.setAttribute("r","7"),f({x:b.x,y:b.y,entry:b.entry})},onMouseLeave:m=>{m.currentTarget.setAttribute("r","5"),f(null)}},y)),Fy(c).map(b=>s.jsx("text",{x:d[b].x,y:at+Dl+16,textAnchor:"middle",style:{fill:"var(--text-tertiary)",fontSize:10},children:Lm(r[b].timestamp)},b))]}),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:Lm(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:Ku[u.entry.type]??"var(--text-tertiary)",color:"#fff"},children:Om[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 Fy(r){return r<=3?Array.from({length:r},(u,f)=>f):r<=6?[0,Math.floor(r/2),r-1]:[0,Math.floor(r/3),Math.floor(2*r/3),r-1]}function hi(r){return r>=.8?"var(--green)":r>=.5?"var(--yellow)":"var(--red)"}function Py(r){return r>=1e3?`${(r/1e3).toFixed(1)}s`:`${Math.round(r)}ms`}function Iy({rate:r,label:u}){const f=Math.round(r*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:hi(r)},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:hi(r)}})})]})})}function e1({points:r}){if(r.length<2)return null;const u=200,f=48,c=4,d=r.length,h=r.map((y,m)=>{const S=c+m/(d-1)*(u-c*2),v=c+(f-c*2)-y.passRate*(f-c*2);return{x:S,y:v}}),x=`M ${h[0].x},${f-c} `+h.map(y=>`L ${y.x},${y.y}`).join(" ")+` L ${h[h.length-1].x},${f-c} Z`,b=h.map((y,m)=>`${m===0?"M":"L"} ${y.x},${y.y}`).join(" ");return s.jsxs("svg",{width:u,height:f,style:{display:"block"},children:[s.jsx("path",{d:x,fill:"var(--accent-muted)"}),s.jsx("path",{d:b,fill:"none",stroke:"var(--accent)",strokeWidth:1.5,strokeLinejoin:"round"}),s.jsx("circle",{cx:h[h.length-1].x,cy:h[h.length-1].y,r:3,fill:"var(--accent)"})]})}function t1({plugin:r,skill:u}){const f=xi(),[c,d]=g.useState(null),[h,x]=g.useState(!0);if(g.useEffect(()=>{x(!0),be.getStats(r,u).then(d).catch(()=>d(null)).finally(()=>x(!1))},[r,u]),h)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(!c||c.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 b=c.trendPoints.length>0?c.trendPoints[c.trendPoints.length-1].passRate:0,y=c.trendPoints.length>0?c.trendPoints[0].passRate:0,m=b-y,S=c.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:c.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:hi(b)},children:[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:"Trend"}),s.jsxs("div",{className:"text-[24px] font-bold",style:{color:m>=0?"var(--green)":"var(--red)"},children:[m>=0?"+":"",Math.round(m*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:c.modelStats.length})]})]}),c.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(e1,{points:c.trendPoints})]}),c.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:c.modelStats.map(v=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[s.jsx("td",{style:{padding:"8px",color:"var(--text-primary)",fontWeight:500},children:v.model}),s.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:v.runs}),s.jsx("td",{style:{padding:"8px",textAlign:"center"},children:s.jsxs("span",{className:"font-semibold",style:{color:hi(v.avgPassRate)},children:[Math.round(v.avgPassRate*100),"%"]})}),s.jsx("td",{style:{padding:"8px",textAlign:"center",fontFamily:"var(--font-mono, monospace)",color:"var(--text-secondary)"},children:Py(v.avgDurationMs)})]},v.model))})]})]}),S.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:S.map(v=>s.jsxs("button",{className:"block w-full text-left rounded-lg p-2 -mx-2 transition-colors duration-150",style:{background:"transparent"},onMouseEnter:T=>{T.currentTarget.style.background="var(--surface-2)"},onMouseLeave:T=>{T.currentTarget.style.background="transparent"},onClick:()=>f(`/skills/${r}/${u}/history?tab=per-eval`),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:["#",v.evalId]}),s.jsx("span",{className:"text-[10px] truncate",style:{color:"var(--text-tertiary)"},children:v.evalName}),s.jsxs("span",{className:"text-[10px] ml-auto flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[v.totalRuns," runs"]})]}),s.jsx(Iy,{rate:v.passRate,label:v.text})]},`${v.evalId}:${v.id}`))})]})]})}function l1({plugin:r,skill:u}){const[f,c]=g.useState(null),[d,h]=g.useState(null),[x,b]=g.useState({}),[y,m]=g.useState({});g.useEffect(()=>{be.getEvals(r,u).then(c).catch(()=>c(null))},[r,u]);async function S(v){if(d===v){h(null);return}if(h(v),!x[v]){m(T=>({...T,[v]:!0}));try{const T=await be.getCaseHistory(r,u,v);b(z=>({...z,[v]:T}))}catch{b(T=>({...T,[v]:[]}))}finally{m(T=>({...T,[v]:!1}))}}}return f?s.jsx("div",{className:"space-y-2 stagger-children",children:f.evals.map(v=>{const T=x[v.id]||[],z=d===v.id,k=y[v.id],R=T.length>0?T[0].pass_rate:null;return s.jsxs("div",{className:"glass-card overflow-hidden",children:[s.jsxs("button",{onClick:()=>S(v.id),className:"w-full text-left p-4 flex items-center gap-3 transition-colors duration-150",style:{background:z?"var(--surface-2)":"transparent"},onMouseEnter:_=>{z||(_.currentTarget.style.background="var(--surface-2)")},onMouseLeave:_=>{z||(_.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:z?"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:["#",v.id]}),s.jsx("span",{className:"text-[13px] font-medium flex-1 truncate",style:{color:"var(--text-primary)"},children:v.name}),T.length>=2&&s.jsx(ih,{entries:T}),R!=null&&s.jsxs("span",{className:"text-[12px] font-semibold flex-shrink-0",style:{color:ec(R)},children:[Math.round(R*100),"%"]}),T.length>0&&s.jsxs("span",{className:"text-[10px] flex-shrink-0",style:{color:"var(--text-tertiary)",fontFamily:"var(--font-mono, monospace)"},children:[T.length," runs"]})]}),z&&s.jsx("div",{className:"border-t animate-fade-in",style:{borderColor:"var(--border-subtle)"},children:k?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..."})]}):T.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:T.map((_,U)=>s.jsxs("div",{className:"p-4",style:{background:U===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:nh(_.timestamp)}),s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:_.model}),s.jsx("span",{className:"pill",style:{fontSize:9,padding:"1px 6px",background:_.type==="benchmark"?"rgba(99,131,255,0.15)":_.type==="comparison"?"var(--purple-muted)":"rgba(251,146,60,0.15)",color:_.type==="benchmark"?"#6383ff":_.type==="comparison"?"var(--purple)":"#fb923c"},children:_.type}),s.jsxs("span",{className:"text-[12px] font-semibold ml-auto",style:{color:ec(_.pass_rate)},children:[Math.round(_.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:[_.durationMs!=null&&s.jsx("span",{children:sh(_.durationMs)}),_.tokens!=null&&s.jsxs("span",{children:[_.tokens>=1e3?`${(_.tokens/1e3).toFixed(1)}k`:_.tokens," tok"]})]}),s.jsx("div",{className:"space-y-1",children:_.assertions.map(G=>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:G.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:G.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:G.text}),G.reasoning&&s.jsx("div",{className:"text-[10px] mt-0.5",style:{color:"var(--text-tertiary)"},children:G.reasoning})]})]},G.id))})]},U))})})]},v.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 a1(){const{state:r,dispatch:u}=la(),{plugin:f,skill:c}=r,[d,h]=g.useState("timeline"),[x,b]=g.useState([]),[y,m]=g.useState(!0),[S,v]=g.useState(""),[T,z]=g.useState(""),[k,R]=g.useState(!1),[_,U]=g.useState([]),[G,Q]=g.useState(null),[te,K]=g.useState(!1),[se,F]=g.useState(null),[V,ne]=g.useState(!1);g.useEffect(()=>{m(!0),be.getHistory(f,c,{model:S||void 0,type:T||void 0}).then(B=>{b(B),B.length>=2&&be.compareRuns(f,c,B[0].timestamp,B[1].timestamp).then(P=>{const ue=P.regressions.filter(O=>O.change==="regression");u({type:"SET_REGRESSIONS",regressions:ue})}).catch(()=>{})}).catch(()=>{}).finally(()=>m(!1))},[f,c,S,T]);const I=g.useCallback(async B=>{if(k){U(P=>P.includes(B)?P.filter(ue=>ue!==B):P.length>=2?[P[1],B]:[...P,B]);return}ne(!0);try{const P=await be.getHistoryEntry(f,c,B);F(P)}catch{}finally{ne(!1)}},[f,c,k]),L=g.useCallback(async()=>{if(_.length===2){K(!0);try{const B=await be.compareRuns(f,c,_[0],_[1]);Q(B)}catch{}finally{K(!1)}}},[f,c,_]),J=[...new Set(x.map(B=>B.model))];return y?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(B=>s.jsx("button",{onClick:()=>h(B),className:"px-4 py-2 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:d===B?"var(--accent-muted)":"transparent",color:d===B?"var(--accent)":"var(--text-tertiary)"},children:B==="timeline"?"Timeline":B==="per-eval"?"Per Eval":"Statistics"},B))}),d==="timeline"&&s.jsxs("div",{children:[x.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(Wy,{entries:x})}),s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsxs("select",{value:S,onChange:B=>v(B.target.value),className:"input-field text-[12px]",style:{width:150},children:[s.jsx("option",{value:"",children:"All Models"}),J.map(B=>s.jsx("option",{value:B,children:B},B))]}),s.jsxs("select",{value:T,onChange:B=>z(B.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("div",{className:"flex-1"}),s.jsx("button",{onClick:()=>{R(!k),U([]),Q(null)},className:`btn text-[12px] ${k?"btn-primary":"btn-secondary"}`,children:k?"Exit Compare":"Compare Runs"}),k&&_.length===2&&s.jsx("button",{onClick:L,disabled:te,className:"btn btn-primary text-[12px]",children:te?"Comparing...":"Compare"})]}),s.jsx("div",{className:"space-y-2",children:x.length===0?s.jsx("div",{className:"text-center py-8 text-[13px]",style:{color:"var(--text-tertiary)"},children:"No benchmark runs yet"}):x.map(B=>{const P=_.includes(B.timestamp);return s.jsx("button",{onClick:()=>I(B.timestamp),className:"w-full text-left rounded-lg px-4 py-3 transition-all duration-150",style:{background:P?"var(--accent-muted)":"var(--surface-1)",border:P?"1px solid var(--accent)":"1px solid var(--border-subtle)"},onMouseEnter:ue=>{P||(ue.currentTarget.style.borderColor="var(--border-hover)")},onMouseLeave:ue=>{P||(ue.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:[k&&s.jsx("span",{className:"w-4 h-4 rounded border flex items-center justify-center",style:{borderColor:P?"var(--accent)":"var(--border-default)",background:P?"var(--accent)":"transparent"},children:P&&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(B.timestamp).toLocaleString()}),s.jsx("span",{className:"pill text-[9px]",style:{background:B.type==="comparison"?"var(--purple-muted)":B.type==="baseline"?"var(--surface-3)":"var(--accent-muted)",color:B.type==="comparison"?"var(--purple)":B.type==="baseline"?"var(--text-tertiary)":"var(--accent)"},children:B.type})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:B.model}),s.jsxs("span",{className:"text-[12px] font-semibold",style:{color:B.passRate>=.8?"var(--green)":B.passRate>=.5?"var(--yellow)":"var(--red)"},children:[Math.round(B.passRate*100),"%"]})]})]})},B.timestamp)})}),G&&s.jsx(n1,{result:G}),se&&!k&&s.jsx(s1,{run:se,onClose:()=>F(null)})]}),d==="per-eval"&&s.jsx(l1,{plugin:f,skill:c}),d==="statistics"&&s.jsx(t1,{plugin:f,skill:c})]})}function n1({result:r}){const u=r.regressions.filter(c=>c.change==="regression"),f=r.regressions.filter(c=>c.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(r.runA.timestamp).toLocaleDateString()," vs ",new Date(r.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(c=>s.jsxs("div",{className:"text-[12px] py-1",style:{color:"var(--text-secondary)"},children:["#",c.evalId," ",c.evalName,": ",s.jsx("span",{style:{color:"var(--red)"},children:c.assertionId})," (was passing, now failing)"]},`${c.evalId}-${c.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(c=>s.jsxs("div",{className:"text-[12px] py-1",style:{color:"var(--text-secondary)"},children:["#",c.evalId," ",c.evalName,": ",s.jsx("span",{style:{color:"var(--green)"},children:c.assertionId})," (was failing, now passing)"]},`${c.evalId}-${c.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:r.caseDiffs.map(c=>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:["#",c.eval_id," ",c.eval_name]}),s.jsx("td",{className:"text-right px-3 py-2",style:{color:c.passRateA!=null?c.passRateA>=.8?"var(--green)":c.passRateA>=.5?"var(--yellow)":"var(--red)":"var(--text-tertiary)"},children:c.passRateA!=null?`${Math.round(c.passRateA*100)}%`:c.statusA}),s.jsx("td",{className:"text-right px-3 py-2",style:{color:c.passRateB!=null?c.passRateB>=.8?"var(--green)":c.passRateB>=.5?"var(--yellow)":"var(--red)":"var(--text-tertiary)"},children:c.passRateB!=null?`${Math.round(c.passRateB*100)}%`:c.statusB})]},c.eval_id))})]})})]})}function s1({run:r,onClose:u}){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:"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(r.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: ",r.model," | Cases: ",r.cases.length," | Pass Rate: ",r.overall_pass_rate!=null?`${Math.round(r.overall_pass_rate*100)}%`:"--"]}),s.jsx("div",{className:"space-y-2",children:r.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 i1({plugin:r,skill:u}){const[f,c]=g.useState([]),[d,h]=g.useState([]),[x,b]=g.useState(!0),[y,m]=g.useState(null);g.useEffect(()=>{be.getDependencies(r,u).then(v=>{c(v.mcpDependencies),h(v.skillDependencies)}).catch(()=>{}).finally(()=>b(!1))},[r,u]);async function S(v,T){try{await navigator.clipboard.writeText(T),m(v),setTimeout(()=>m(null),2e3)}catch{}}return x?null:f.length===0&&d.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+d.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(v=>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:v.server}),s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:v.transport})]}),s.jsx("button",{onClick:()=>S(v.server,v.configSnippet),className:"btn btn-ghost text-[11px] py-1 px-2",style:{color:y===v.server?"var(--green)":"var(--accent)"},children:y===v.server?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:v.url}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:v.matchedTools.map(T=>s.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-mono",style:{background:"var(--surface-3)",color:"var(--text-secondary)"},children:T},T))})]},v.server))]}),d.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:d.map(v=>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:v.name}),s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:v.source==="frontmatter"?"frontmatter":"referenced"})]},v.name))})]})]})]})}function r1(){const{state:r}=la(),{plugin:u,skill:f}=r,[c,d]=g.useState(null),[h,x]=g.useState(!0);return g.useEffect(()=>{be.getDependencies(u,f).then(d).catch(()=>{}).finally(()=>x(!1))},[u,f]),h?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"})]}):c?s.jsx("div",{className:"p-5 max-w-3xl",children:s.jsx(i1,{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 u1(){const{state:r,dispatch:u,saveContent:f}=la(),c=g.useCallback(d=>{const h=d.ctrlKey||d.metaKey;if(h&&d.key>="1"&&d.key<="5"){d.preventDefault(),u({type:"SET_PANEL",panel:["editor","tests","run","history","deps"][parseInt(d.key)-1]});return}if(h&&d.key==="s"&&!d.shiftKey){d.preventDefault(),r.isDirty&&f();return}},[r.isDirty,f,u]);return g.useEffect(()=>(window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)),[c]),r.loading?s.jsx("div",{className:"flex items-center justify-center h-screen",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..."})]})}):s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"48px 1fr",gridTemplateRows:"auto 1fr",height:"100%",overflow:"hidden"},children:[s.jsx("div",{style:{gridColumn:"1 / -1"},children:s.jsx(Ay,{state:r})}),s.jsx("div",{style:{gridRow:2},children:s.jsx(_y,{activePanel:r.activePanel,onPanelChange:d=>u({type:"SET_PANEL",panel:d}),isDirty:r.isDirty,isRunning:Array.from(r.caseRunStates.values()).some(d=>d.status==="running"||d.status==="queued"),hasRegressions:r.regressions.length>0})}),s.jsx("div",{style:{gridRow:2,overflow:"hidden",background:"var(--surface-0)"},children:s.jsxs("div",{className:"animate-fade-in",style:{height:"100%",overflow:"auto"},children:[r.activePanel==="editor"&&s.jsx(qy,{}),r.activePanel==="tests"&&s.jsx(Yy,{}),r.activePanel==="run"&&s.jsx(Ky,{}),r.activePanel==="history"&&s.jsx(a1,{}),r.activePanel==="deps"&&s.jsx(r1,{})]},r.activePanel)})]})}function c1(){const{plugin:r,skill:u}=Ev();return!r||!u?s.jsx("div",{className:"px-10 py-8",children:s.jsx("p",{style:{color:"var(--red)"},children:"Missing plugin or skill parameter."})}):s.jsx(Ry,{plugin:r,skill:u,children:s.jsx(u1,{})})}const Um={TP:{bg:"var(--green-muted)",text:"var(--green)",icon:"check"},TN:{bg:"rgba(52,211,153,0.06)",text:"rgba(52,211,153,0.6)",icon:"check"},FP:{bg:"var(--red-muted)",text:"var(--red)",icon:"x"},FN:{bg:"rgba(248,113,113,0.06)",text:"rgba(248,113,113,0.6)",icon:"x"}},o1=[{label:"Should activate",prompts:["How do I use this feature?","Show me best practices for this","What's the recommended approach?"]},{label:"Should NOT activate",prompts:["!What's the weather today?","!Write me a poem","!How do I cook pasta?"]}];function f1(){const[r,u]=g.useState([]),[f,c]=g.useState(null),[d,h]=g.useState(null),[x,b]=g.useState(null),[y,m]=g.useState(""),[S,v]=g.useState(!1),[T,z]=g.useState("preview"),{events:k,running:R,error:_,start:U}=Ny();g.useEffect(()=>{be.getSkills().then(u).catch(()=>{})},[]),g.useEffect(()=>{if(!f){h(null),b(null);return}fetch(`/api/skills/${f.plugin}/${f.skill}/description`).then(V=>V.json()).then(V=>{h(V.description),b(V.rawContent||null)}).catch(()=>{h(null),b(null)})},[f]);function G(){if(!f)return;const ne=y.trim().split(`
68
+ `).filter(Boolean).map(I=>{const L=I.startsWith("!");return{prompt:L?I.slice(1).trim():I.trim(),expected:L?"should_not_activate":"should_activate"}});U(`/api/skills/${f.plugin}/${f.skill}/activation-test`,{prompts:ne})}function Q(V){const ne=y.trim(),I=ne?`${ne}
69
+ ${V.join(`
70
+ `)}`:V.join(`
71
+ `);m(I)}const te=[];let K=null;for(const V of k)V.event==="prompt_result"&&te.push(V.data),V.event==="done"&&(K=V.data);const se=te.filter(V=>V.classification==="TP"||V.classification==="TN"),F=te.filter(V=>V.classification==="FP"||V.classification==="FN");return s.jsxs("div",{className:"px-10 py-8 max-w-5xl",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"text-[22px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Description Activation Test"}),s.jsxs("p",{className:"text-[13px] mt-1 max-w-2xl",style:{color:"var(--text-tertiary)"},children:["Tests whether a skill's description activates correctly for relevant prompts and stays silent for irrelevant ones. This validates the ",s.jsx("strong",{children:"auto-activation quality"})," of your skill description."]})]}),s.jsxs("div",{className:"grid grid-cols-5 gap-5 mb-6",children:[s.jsxs("div",{className:"col-span-3 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-[12px] font-medium mb-1.5 block",style:{color:"var(--text-secondary)"},children:"Skill"}),s.jsxs("select",{className:"input-field",value:f?`${f.plugin}/${f.skill}`:"",onChange:V=>{const[ne,I]=V.target.value.split("/");c(ne&&I?{plugin:ne,skill:I}:null)},children:[s.jsx("option",{value:"",children:"Select a skill..."}),r.map(V=>s.jsxs("option",{value:`${V.plugin}/${V.skill}`,children:[V.plugin," / ",V.skill]},`${V.plugin}/${V.skill}`))]})]}),s.jsxs("div",{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:o1.map(V=>s.jsxs("button",{onClick:()=>Q(V.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:["+ ",V.label]},V.label))})]}),s.jsx("textarea",{className:"input-field h-32 resize-y font-mono text-[12px]",value:y,onChange:V=>m(V.target.value),placeholder:`How do I write a unit test?
72
+ What edge cases should I test?
73
+ !What's the weather like today?
74
+ !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.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("code",{className:"px-1 rounded",style:{background:"var(--surface-2)"},children:"!"})," prefix = should NOT activate"]}),s.jsxs("span",{children:[y.trim().split(`
75
+ `).filter(Boolean).length," prompt",y.trim().split(`
76
+ `).filter(Boolean).length!==1?"s":""]})]})]})]}),s.jsx("div",{className:"col-span-2",children:s.jsxs("div",{className:"glass-card h-full flex flex-col",children:[s.jsxs("button",{onClick:()=>v(!S),className:"w-full p-3 flex items-center justify-between text-left flex-shrink-0",style:{borderBottom:S?"1px solid var(--border-subtle)":void 0},children:[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:S?"rotate(180deg)":"rotate(0)",transition:"transform 0.2s ease"},children:s.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),S&&s.jsxs("div",{className:"flex-1 flex flex-col min-h-0 animate-fade-in",children:[x&&s.jsx("div",{className:"flex gap-0 border-b flex-shrink-0",style:{borderColor:"var(--border-subtle)"},children:["preview","raw"].map(V=>s.jsx("button",{onClick:()=>z(V),className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider transition-colors duration-150",style:{color:T===V?"var(--text-primary)":"var(--text-tertiary)",borderBottom:T===V?"2px solid var(--accent)":"2px solid transparent"},children:V==="raw"?"Raw MD":"Preview"},V))}),s.jsx("div",{className:"p-3 flex-1 overflow-auto",style:{maxHeight:320},children:f?!d&&!x?s.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Loading description..."}):T==="raw"&&x?s.jsx("pre",{className:"text-[11px] leading-relaxed whitespace-pre-wrap break-words font-mono",style:{color:"var(--text-secondary)",margin:0},children:x}):s.jsx("div",{className:"text-[12px] leading-relaxed skill-md-preview",style:{color:"var(--text-secondary)"},dangerouslySetInnerHTML:{__html:d1(x||d||"")}}):s.jsx("div",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Select a skill to see its description"})})]}),!S&&d&&s.jsx("div",{className:"px-3 pb-3 pt-1",children:s.jsxs("div",{className:"text-[11px] truncate",style:{color:"var(--text-tertiary)"},children:[d.slice(0,100),d.length>100?"...":""]})})]})})]}),s.jsx("button",{onClick:G,disabled:R||!f||!y.trim(),className:"btn btn-primary mb-7",children:R?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"]})}),_&&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:_}),te.length>0&&s.jsxs("div",{className:"space-y-5 mb-6",children:[F.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 (",F.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:F.map((V,ne)=>s.jsx(Bm,{result:V},`incorrect-${ne}`))})]}),se.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 (",se.length,")"]})]}),s.jsx("div",{className:"space-y-1.5 stagger-children",children:se.map((V,ne)=>s.jsx(Bm,{result:V},`correct-${ne}`))})]})]}),K&&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-4",style:{color:"var(--text-tertiary)"},children:"Summary"}),s.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-5",children:[s.jsx(Ju,{label:"Precision",value:K.precision,description:"Of all activations, how many were correct?",detail:`${K.tp} true / ${K.tp+K.fp} total activations`}),s.jsx(Ju,{label:"Recall",value:K.recall,description:"Of expected activations, how many fired?",detail:`${K.tp} activated / ${K.tp+K.fn} expected`}),s.jsx(Ju,{label:"Reliability",value:K.reliability,description:"Overall correct classification rate",detail:`${K.tp+K.tn} correct / ${K.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(ci,{label:"True Positive",abbr:"TP",count:K.tp,bg:"var(--green-muted)",color:"var(--green)",description:"Correctly activated"}),s.jsx(ci,{label:"False Positive",abbr:"FP",count:K.fp,bg:"var(--red-muted)",color:"var(--red)",description:"Wrongly activated"}),s.jsx(ci,{label:"False Negative",abbr:"FN",count:K.fn,bg:"rgba(248,113,113,0.06)",color:"rgba(248,113,113,0.6)",description:"Missed activation"}),s.jsx(ci,{label:"True Negative",abbr:"TN",count:K.tn,bg:"rgba(52,211,153,0.06)",color:"rgba(52,211,153,0.6)",description:"Correctly silent"})]})]})]}),R&&te.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 Bm({result:r}){const u=Um[r.classification]||Um.FN,f=r.classification==="TP"||r.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:r.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:r.classification}),s.jsx("span",{style:{color:r.activate?"var(--green)":"var(--text-tertiary)"},children:r.activate?"Activated":"Silent"}),s.jsx("span",{style:{color:"var(--text-tertiary)"},children:"·"}),s.jsxs("span",{style:{color:"var(--text-tertiary)"},children:["Expected: ",r.expected==="should_activate"?"activate":"stay silent"]}),s.jsx("span",{style:{color:"var(--text-tertiary)"},children:"·"}),s.jsxs("span",{style:{color:"var(--text-tertiary)"},children:[r.confidence," confidence"]})]}),r.reasoning&&s.jsx("div",{className:"text-[11px] mt-1.5",style:{color:"var(--text-tertiary)"},children:r.reasoning})]})]})}function Ju({label:r,value:u,description:f,detail:c}){const d=Math.round(u*100),h=d>=80?"var(--green)":d>=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:h},children:[d,"%"]}),s.jsx("div",{className:"text-[12px] font-medium mt-0.5",style:{color:"var(--text-secondary)"},children:r}),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:c})]})}function ci({label:r,abbr:u,count:f,bg:c,color:d,description:h}){return s.jsxs("div",{className:"text-center p-3 rounded-lg",style:{background:c},children:[s.jsx("div",{className:"text-[20px] font-bold",style:{color:d},children:f}),s.jsx("div",{className:"text-[11px] font-semibold",style:{color:d},children:u}),s.jsx("div",{className:"text-[9px] mt-0.5",style:{color:"var(--text-tertiary)"},children:h})]})}function d1(r){const f=r.replace(/^---[\s\S]*?---\n?/,"").split(`
77
+ `),c=[];let d=!1,h=[],x=!1,b=[];function y(){if(!x||b.length===0)return;x=!1;const m=b.map(z=>z.split("|").slice(1,-1).map(R=>R.trim())),S=m[0],v=m.filter((z,k)=>!(k===0||k===1&&m[k].every(R=>/^[-:\s]+$/.test(R))));let T='<table style="width:100%;border-collapse:collapse;font-size:11px;margin:8px 0">';S&&(T+=`<thead><tr>${S.map(z=>`<th style="text-align:left;padding:4px 8px;border-bottom:1px solid var(--border-subtle);color:var(--text-secondary);font-weight:600">${ea(z)}</th>`).join("")}</tr></thead>`),T+=`<tbody>${v.map(z=>`<tr>${z.map(k=>`<td style="padding:4px 8px;border-bottom:1px solid var(--border-subtle);color:var(--text-tertiary)">${ea(k)}</td>`).join("")}</tr>`).join("")}</tbody></table>`,c.push(T),b=[]}for(const m of f){if(m.startsWith("```")){d?(c.push(`<pre style="background:var(--surface-2);padding:8px 12px;border-radius:6px;font-size:11px;overflow-x:auto;margin:6px 0;color:var(--text-secondary)">${ea(h.join(`
78
+ `))}</pre>`),h=[],d=!1):(y(),d=!0);continue}if(d){h.push(m);continue}if(m.trim().startsWith("|")&&m.trim().endsWith("|")){x||(x=!0),b.push(m.trim());continue}else y();if(/^---+$/.test(m.trim())){c.push('<hr style="border:none;border-top:1px solid var(--border-subtle);margin:12px 0" />');continue}const S=m.match(/^(#{1,4})\s+(.+)$/);if(S){const T=S[1].length,z=["","16px","14px","13px","12px"],k=["","700","600","600","600"],R=["","16px 0 8px","12px 0 6px","10px 0 4px","8px 0 4px"];c.push(`<div style="font-size:${z[T]};font-weight:${k[T]};margin:${R[T]};color:var(--text-primary)">${oi(ea(S[2]))}</div>`);continue}if(/^[-*]\s+/.test(m.trim())){const T=m.trim().replace(/^[-*]\s+/,"");c.push(`<div style="padding-left:16px;margin:2px 0;color:var(--text-secondary)"><span style="color:var(--text-tertiary);margin-right:6px">•</span>${oi(ea(T))}</div>`);continue}const v=m.trim().match(/^(\d+)\.\s+(.+)$/);if(v){c.push(`<div style="padding-left:16px;margin:2px 0;color:var(--text-secondary)"><span style="color:var(--text-tertiary);margin-right:6px">${v[1]}.</span>${oi(ea(v[2]))}</div>`);continue}if(!m.trim()){c.push('<div style="height:6px"></div>');continue}c.push(`<div style="margin:2px 0;color:var(--text-secondary)">${oi(ea(m))}</div>`)}return y(),c.join(`
79
+ `)}function ea(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function oi(r){return r.replace(/\*\*(.+?)\*\*/g,'<strong style="color:var(--text-primary)">$1</strong>').replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/`([^`]+)`/g,'<code style="background:var(--surface-2);padding:1px 4px;border-radius:3px;font-size:10px">$1</code>')}function Wu(r){return r.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function m1(r,u,f,c){const h=`.../${r.split("/").slice(-2).join("/")}`;switch(u){case 1:return`${h}/${f}/skills/${c}/SKILL.md`;case 2:return`${h}/plugins/${f}/skills/${c}/SKILL.md`;case 3:return`${h}/skills/${c}/SKILL.md`}}function h1(){const r=xi(),[u,f]=g.useState(null),[c,d]=g.useState(!0),[h,x]=g.useState(null),[b,y]=g.useState(null),[m,S]=g.useState(""),[v,T]=g.useState(3),[z,k]=g.useState(""),[R,_]=g.useState(""),[U,G]=g.useState(""),[Q,te]=g.useState(""),[K,se]=g.useState(""),[F,V]=g.useState(""),[ne,I]=g.useState(!1),[L,J]=g.useState(null);g.useEffect(()=>{be.getProjectLayout().then(Z=>{f(Z),T(Z.suggestedLayout);const N=Z.detectedLayouts.find(X=>X.layout===Z.suggestedLayout);N!=null&&N.existingPlugins.length&&k(N.existingPlugins[0])}).catch(()=>{}).finally(()=>d(!1)),be.getConfig().then(y).catch(()=>{}),be.getSkillCreatorStatus().then(x).catch(()=>{})},[]);const B=g.useMemo(()=>{if(!u)return[];const Z=u.detectedLayouts.find(N=>N.layout===v);return(Z==null?void 0:Z.existingPlugins)||[]},[u,v]),P=z==="__new__"?R:z,ue=u?m1(u.root,v,P||"{plugin}",m||"{skill}"):"",O=g.useMemo(()=>u?u.detectedLayouts.filter(Z=>Z.layout!==4):[],[u]),$=g.useMemo(()=>{const Z=["---"];return U?Z.push(`description: "${U.replace(/"/g,'\\"')}"`):Z.push('description: ""'),K.trim()&&Z.push(`allowed-tools: ${K.trim()}`),Q&&Z.push(`model: ${Q}`),Z.push("---"),Z.push(""),F.trim()?Z.push(F.trim()):(Z.push(`# /${m||"skill-name"}`),Z.push(""),Z.push("You are a helpful assistant.")),Z.join(`
80
+ `)},[m,U,Q,K,F]),re=(b==null?void 0:b.provider)==="claude-cli"&&h!==null;async function Ee(){if(J(null),!m.trim()){J("Skill name is required");return}if(!U.trim()){J("Description is required");return}if(v!==3&&!P.trim()){J("Plugin name is required");return}I(!0);try{const Z=await be.createSkill({name:Wu(m),plugin:P||"",layout:v,description:U,model:Q||void 0,allowedTools:K||void 0,body:F});r(`/skills/${Z.plugin}/${Z.skill}`)}catch(Z){J(Z.message)}finally{I(!1)}}return s.jsxs("div",{className:"px-10 py-8 max-w-6xl",children:[s.jsxs("div",{className:"mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[12px] mb-3",style:{color:"var(--text-tertiary)"},children:[s.jsx(rl,{to:"/",className:"hover:underline",style:{color:"var(--text-tertiary)"},children:"Skills"}),s.jsx("span",{children:"/"}),s.jsx("span",{style:{color:"var(--text-secondary)"},children:"New Skill"})]}),s.jsx("h2",{className:"text-[22px] 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"})]}),re&&s.jsx("div",{className:"mb-6 px-4 py-3 rounded-lg text-[13px]",style:{background:h.installed?"var(--accent-muted)":"var(--surface-2)",border:h.installed?"1px solid var(--accent)":"1px solid var(--border-subtle)",color:"var(--text-primary)"},children:h.installed?s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 mt-0.5",children:[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("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 skill creation with the full methodology. This form creates the basic structure."]})]})]}):s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"flex-shrink-0 mt-0.5",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),s.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),s.jsxs("div",{children:[s.jsxs("span",{style:{color:"var(--text-secondary)"},children:["Tip: Install the Skill Creator for AI-assisted authoring —"," "]}),s.jsx("code",{className:"px-1.5 py-0.5 rounded text-[11px]",style:{background:"var(--surface-3)"},children:h.installCommand})]})]})}),c&&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"}),s.jsx("div",{className:"skeleton h-10 w-full rounded-lg"})]}),!c&&u&&s.jsxs("div",{className:"flex gap-6",children:[s.jsxs("div",{className:"flex-1 min-w-0 space-y-5",children:[s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Location"}),O.length>1&&s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Layout"}),s.jsxs("div",{className:"flex gap-2",children:[O.map(Z=>s.jsx("button",{onClick:()=>{T(Z.layout);const N=Z.existingPlugins[0];k(N||""),_("")},className:"px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:v===Z.layout?"var(--accent)":"var(--surface-3)",color:v===Z.layout?"#fff":"var(--text-secondary)",border:`1px solid ${v===Z.layout?"var(--accent)":"var(--border-subtle)"}`},children:Z.label},Z.layout)),!O.find(Z=>Z.layout===3)&&s.jsx("button",{onClick:()=>{T(3),k("")},className:"px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:v===3?"var(--accent)":"var(--surface-3)",color:v===3?"#fff":"var(--text-secondary)",border:`1px solid ${v===3?"var(--accent)":"var(--border-subtle)"}`},children:"Root skills/"})]})]}),v!==3&&s.jsxs("div",{className:"mb-4",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:z,onChange:Z=>{k(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:[B.map(Z=>s.jsx("option",{value:Z,children:Z},Z)),s.jsx("option",{value:"__new__",children:"+ New plugin..."})]}),z==="__new__"&&s.jsx("input",{type:"text",value:R,onChange:Z=>_(Wu(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:ue})]}),s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Skill Details"}),s.jsxs("div",{className:"mb-4",children:[s.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:["Name ",s.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),s.jsx("input",{type:"text",value:m,onChange:Z=>S(Wu(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-4",children:[s.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:["Description ",s.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),s.jsx("textarea",{value:U,onChange:Z=>G(Z.target.value),placeholder:"Brief description — used for auto-activation keywords",rows:2,className:"w-full px-3 py-2 rounded-lg text-[13px] resize-none",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}}),s.jsx("p",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:"This text is used by Claude to decide when to activate the skill"})]}),s.jsxs("div",{className:"flex gap-4 mb-4",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Model"}),s.jsxs("select",{value:Q,onChange:Z=>te(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 (default)"}),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-2 block",style:{color:"var(--text-tertiary)"},children:"Allowed Tools"}),s.jsx("input",{type:"text",value:K,onChange:Z=>se(Z.target.value),placeholder:"Read, Write, Edit, Bash, Glob, Grep",className:"w-full px-3 py-2 rounded-lg text-[13px]",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"}})]})]})]}),s.jsxs("div",{className:"glass-card p-5",children:[s.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"System Prompt"}),s.jsx("textarea",{value:F,onChange:Z=>V(Z.target.value),placeholder:`# /my-skill
81
+
82
+ You are an expert at...
83
+
84
+ ## Workflow
85
+
86
+ 1. First, understand the request
87
+ 2. Then, implement the solution
88
+ 3. Finally, verify the result`,rows:12,className:"w-full px-3 py-2 rounded-lg text-[13px] font-mono resize-y",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)",minHeight:"200px"}})]}),L&&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:L}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:Ee,disabled:ne||!m||!U,className:"px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:ne||!m||!U?"var(--surface-3)":"var(--accent)",color:ne||!m||!U?"var(--text-tertiary)":"#fff",cursor:ne||!m||!U?"not-allowed":"pointer",opacity:ne?.7:1},children:ne?"Creating...":"Create Skill"}),s.jsx(rl,{to:"/",className:"px-4 py-2.5 rounded-lg text-[13px] font-medium",style:{color:"var(--text-secondary)"},children:"Cancel"})]})]}),s.jsx("div",{className:"w-[340px] flex-shrink-0",children:s.jsx("div",{className:"sticky top-8",children:s.jsxs("div",{className:"glass-card p-4",children:[s.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wider mb-3",style:{color:"var(--text-tertiary)"},children:"SKILL.md Preview"}),s.jsx("pre",{className:"text-[11px] font-mono leading-relaxed overflow-auto max-h-[500px] p-3 rounded-lg",style:{background:"var(--surface-0)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:$})]})})})]})]})}function p1(){const[r,u]=g.useState(null),[f,c]=g.useState(!1),[d,h]=g.useState(!1),x=g.useRef(null);g.useEffect(()=>{be.getConfig().then(u).catch(()=>{})},[]),g.useEffect(()=>{function m(S){x.current&&!x.current.contains(S.target)&&c(!1)}return f&&document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[f]);async function b(m,S){h(!0);try{const v=await be.setConfig(m.id,S.id);u(v),c(!1)}catch{const v=await be.getConfig();u(v)}finally{h(!1)}}if(!r)return null;const y=x1(r);return s.jsxs("div",{ref:x,className:"relative",children:[s.jsxs("button",{onClick:()=>c(!f),className:"w-full flex items-center gap-2 px-3 py-2 rounded-lg text-[12px] transition-all duration-150",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"},onMouseEnter:m=>{m.currentTarget.style.borderColor="var(--accent)"},onMouseLeave:m=>{m.currentTarget.style.borderColor="var(--border-subtle)"},children:[s.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"3"}),s.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),s.jsx("span",{className:"flex-1 text-left font-medium truncate",children:y}),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"},children:s.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),f&&s.jsxs("div",{className:"absolute bottom-full mb-1 left-0 w-64 rounded-xl shadow-xl z-50 overflow-hidden animate-fade-in",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"px-4 py-2.5",style:{borderBottom:"1px solid var(--border-subtle)"},children:s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Select Model"})}),s.jsx("div",{className:"py-1 max-h-80 overflow-y-auto",children:r.providers.map(m=>s.jsxs("div",{children:[s.jsxs("div",{className:"px-4 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:m.available?"var(--green)":"var(--text-tertiary)",opacity:m.available?1:.3}}),s.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",opacity:m.available?1:.5},children:m.label})]}),m.models.map(S=>{const v=uh(r,m.id,S.id),T=!m.available||d;return s.jsxs("button",{onClick:()=>!T&&b(m,S),disabled:T,className:"w-full px-4 py-2 flex items-center gap-2.5 text-left transition-all duration-100",style:{background:v?"var(--accent-muted)":"transparent",color:T?"var(--text-tertiary)":"var(--text-primary)",opacity:T?.4:1,cursor:T?"not-allowed":"pointer"},onMouseEnter:z=>{!T&&!v&&(z.currentTarget.style.background="var(--surface-3)")},onMouseLeave:z=>{v||(z.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 ${v?"var(--accent)":"var(--border-subtle)"}`},children:v&&s.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}})}),s.jsx("span",{className:"text-[12px]",style:{fontWeight:v?600:400},title:S.id,children:S.label})]},`${m.id}-${S.id}`)})]},m.id))})]})]})}function uh(r,u,f){return r.provider!==u?!1:u==="claude-cli"?r.model===`claude-${f}`:r.model===f}function x1(r){for(const u of r.providers)for(const f of u.models)if(uh(r,u.id,f.id))return f.label;return r.model}function v1({active:r}){return s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:r?"#fff":"currentColor",strokeWidth:"1.8",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"})]})}function y1({active:r}){return s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:r?"#fff":"currentColor",strokeWidth:"1.8",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"})]})}function g1({active:r}){return s.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:r?"#fff":"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"16"}),s.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"12"})]})}const b1=[{path:"/",label:"Skills",Icon:v1},{path:"/create",label:"New Skill",Icon:g1},{path:"/activation",label:"Activation Test",Icon:y1}];function j1(){const r=Gt(),[u,f]=g.useState(null);return g.useEffect(()=>{be.getConfig().then(c=>f(c.projectName)).catch(()=>{})},[]),s.jsxs("div",{className:"flex h-screen",children:[s.jsxs("nav",{className:"w-[220px] flex flex-col flex-shrink-0",style:{background:"var(--surface-1)",borderRight:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"px-5 py-5",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",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",{children:[s.jsx("div",{className:"text-[14px] font-semibold",style:{color:"var(--text-primary)",letterSpacing:"-0.01em"},children:"Skill Builder"}),s.jsx("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:u||"vskill"})]})]})}),s.jsxs("div",{className:"flex-1 px-3 py-3",children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest px-2 mb-2",style:{color:"var(--text-tertiary)"},children:"Navigation"}),b1.map(c=>{const d=r.pathname===c.path;return s.jsxs(rl,{to:c.path,className:"flex items-center gap-2.5 px-3 py-[9px] rounded-lg text-[13px] font-medium mb-0.5 transition-all duration-150",style:{background:d?"var(--accent)":"transparent",color:d?"#fff":"var(--text-secondary)"},onMouseEnter:h=>{d||(h.currentTarget.style.background="var(--surface-3)",h.currentTarget.style.color="var(--text-primary)")},onMouseLeave:h=>{d||(h.currentTarget.style.background="transparent",h.currentTarget.style.color="var(--text-secondary)")},children:[s.jsx(c.Icon,{active:d}),c.label]},c.path)})]}),s.jsxs("div",{className:"px-3 py-3",style:{borderTop:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest px-2 mb-2",style:{color:"var(--text-tertiary)"},children:"Model"}),s.jsx(p1,{})]})]}),s.jsx("main",{className:"flex-1 overflow-hidden",style:{background:"var(--surface-0)"},children:s.jsx("div",{className:"h-full",children:s.jsxs(Hv,{children:[s.jsx(Hn,{path:"/",element:s.jsx("div",{className:"overflow-auto h-full animate-fade-in",children:s.jsx(Sy,{})})}),s.jsx(Hn,{path:"/create",element:s.jsx("div",{className:"overflow-auto h-full animate-fade-in",children:s.jsx(h1,{})})}),s.jsx(Hn,{path:"/skills/:plugin/:skill",element:s.jsx(c1,{})}),s.jsx(Hn,{path:"/activation",element:s.jsx("div",{className:"overflow-auto h-full animate-fade-in",children:s.jsx(f1,{})})})]})},r.pathname)})]})}Yx.createRoot(document.getElementById("root")).render(s.jsx(g.StrictMode,{children:s.jsx(oy,{children:s.jsx(j1,{})})}));