vskill 0.5.82 → 0.5.84

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.
Files changed (40) hide show
  1. package/dist/agents/agents-registry.d.ts +4 -0
  2. package/dist/agents/agents-registry.js +1 -0
  3. package/dist/agents/agents-registry.js.map +1 -1
  4. package/dist/bin.d.ts +2 -0
  5. package/dist/bin.js +30 -0
  6. package/dist/bin.js.map +1 -0
  7. package/dist/commands/eval/serve.js +3 -3
  8. package/dist/commands/eval/serve.js.map +1 -1
  9. package/dist/eval-server/api-routes.d.ts +33 -0
  10. package/dist/eval-server/api-routes.js +202 -0
  11. package/dist/eval-server/api-routes.js.map +1 -1
  12. package/dist/eval-ui/assets/CommandPalette-eD24lhFu.js +1 -0
  13. package/dist/eval-ui/assets/fonts-i7Lkz2zN.css +1 -0
  14. package/dist/eval-ui/assets/index-Bi2n8mTB.js +65 -0
  15. package/dist/eval-ui/assets/index-EnxOcJMr.css +1 -0
  16. package/dist/eval-ui/assets/inter-tight-cyrillic-ext-wght-normal-okcGN4Nq.woff2 +0 -0
  17. package/dist/eval-ui/assets/inter-tight-cyrillic-wght-normal-BS41q_Tv.woff2 +0 -0
  18. package/dist/eval-ui/assets/inter-tight-greek-ext-wght-normal-DQgQPNk4.woff2 +0 -0
  19. package/dist/eval-ui/assets/inter-tight-greek-wght-normal-sS1B39LI.woff2 +0 -0
  20. package/dist/eval-ui/assets/inter-tight-latin-ext-wght-normal-B4u9PlvR.woff2 +0 -0
  21. package/dist/eval-ui/assets/inter-tight-latin-wght-normal-DX-nOvPD.woff2 +0 -0
  22. package/dist/eval-ui/assets/inter-tight-vietnamese-wght-normal-TKKdAiBA.woff2 +0 -0
  23. package/dist/eval-ui/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  24. package/dist/eval-ui/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  25. package/dist/eval-ui/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  26. package/dist/eval-ui/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  27. package/dist/eval-ui/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  28. package/dist/eval-ui/assets/source-serif-4-cyrillic-ext-wght-normal-cHuGMAiY.woff2 +0 -0
  29. package/dist/eval-ui/assets/source-serif-4-cyrillic-wght-normal-DwHjdM4S.woff2 +0 -0
  30. package/dist/eval-ui/assets/source-serif-4-greek-wght-normal-ece1310W.woff2 +0 -0
  31. package/dist/eval-ui/assets/source-serif-4-latin-ext-wght-normal-CxNHBx-q.woff2 +0 -0
  32. package/dist/eval-ui/assets/source-serif-4-latin-wght-normal-D9elroTD.woff2 +0 -0
  33. package/dist/eval-ui/assets/source-serif-4-vietnamese-wght-normal-D-yuW59g.woff2 +0 -0
  34. package/dist/eval-ui/index.html +45 -2
  35. package/dist/utils/skill-creator-detection.d.ts +5 -1
  36. package/dist/utils/skill-creator-detection.js +33 -2
  37. package/dist/utils/skill-creator-detection.js.map +1 -1
  38. package/package.json +17 -4
  39. package/dist/eval-ui/assets/index-D2OKy2AG.js +0 -74
  40. package/dist/eval-ui/assets/index-tEmr_c8l.css +0 -1
@@ -0,0 +1,65 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CommandPalette-eD24lhFu.js","assets/fonts-i7Lkz2zN.css"])))=>i.map(i=>d[i]);
2
+ /* empty css */(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const p of m.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&u(p)}).observe(document,{childList:!0,subtree:!0});function o(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function u(d){if(d.ep)return;d.ep=!0;const m=o(d);fetch(d.href,m)}})();function kh(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var lc={exports:{}},Pi={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var Lp;function Xv(){if(Lp)return Pi;Lp=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(u,d,m){var p=null;if(m!==void 0&&(p=""+m),d.key!==void 0&&(p=""+d.key),"key"in d){m={};for(var y in d)y!=="key"&&(m[y]=d[y])}else m=d;return d=m.ref,{$$typeof:a,type:u,key:p,ref:d!==void 0?d:null,props:m}}return Pi.Fragment=i,Pi.jsx=o,Pi.jsxs=o,Pi}var Hp;function Qv(){return Hp||(Hp=1,lc.exports=Xv()),lc.exports}var c=Qv(),nc={exports:{}},Ae={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var Up;function Kv(){if(Up)return Ae;Up=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),p=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),k=Symbol.iterator;function w(S){return S===null||typeof S!="object"?null:(S=k&&S[k]||S["@@iterator"],typeof S=="function"?S:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,z={};function E(S,q,te){this.props=S,this.context=q,this.refs=z,this.updater=te||R}E.prototype.isReactComponent={},E.prototype.setState=function(S,q){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,q,"setState")},E.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function A(){}A.prototype=E.prototype;function G(S,q,te){this.props=S,this.context=q,this.refs=z,this.updater=te||R}var $=G.prototype=new A;$.constructor=G,B($,E.prototype),$.isPureReactComponent=!0;var O=Array.isArray;function J(){}var T={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function D(S,q,te){var oe=te.ref;return{$$typeof:a,type:S,key:q,ref:oe!==void 0?oe:null,props:te}}function W(S,q){return D(S.type,q,S.props)}function F(S){return typeof S=="object"&&S!==null&&S.$$typeof===a}function de(S){var q={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(te){return q[te]})}var ce=/\/+/g;function P(S,q){return typeof S=="object"&&S!==null&&S.key!=null?de(""+S.key):q.toString(36)}function re(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(J,J):(S.status="pending",S.then(function(q){S.status==="pending"&&(S.status="fulfilled",S.value=q)},function(q){S.status==="pending"&&(S.status="rejected",S.reason=q)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function _(S,q,te,oe,he){var be=typeof S;(be==="undefined"||be==="boolean")&&(S=null);var Ee=!1;if(S===null)Ee=!0;else switch(be){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(S.$$typeof){case a:case i:Ee=!0;break;case C:return Ee=S._init,_(Ee(S._payload),q,te,oe,he)}}if(Ee)return he=he(S),Ee=oe===""?"."+P(S,0):oe,O(he)?(te="",Ee!=null&&(te=Ee.replace(ce,"$&/")+"/"),_(he,q,te,"",function(Xe){return Xe})):he!=null&&(F(he)&&(he=W(he,te+(he.key==null||S&&S.key===he.key?"":(""+he.key).replace(ce,"$&/")+"/")+Ee)),q.push(he)),1;Ee=0;var le=oe===""?".":oe+":";if(O(S))for(var xe=0;xe<S.length;xe++)oe=S[xe],be=le+P(oe,xe),Ee+=_(oe,q,te,be,he);else if(xe=w(S),typeof xe=="function")for(S=xe.call(S),xe=0;!(oe=S.next()).done;)oe=oe.value,be=le+P(oe,xe++),Ee+=_(oe,q,te,be,he);else if(be==="object"){if(typeof S.then=="function")return _(re(S),q,te,oe,he);throw q=String(S),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function Y(S,q,te){if(S==null)return S;var oe=[],he=0;return _(S,oe,"","",function(be){return q.call(te,be,he++)}),oe}function se(S){if(S._status===-1){var q=S._result;q=q(),q.then(function(te){(S._status===0||S._status===-1)&&(S._status=1,S._result=te)},function(te){(S._status===0||S._status===-1)&&(S._status=2,S._result=te)}),S._status===-1&&(S._status=0,S._result=q)}if(S._status===1)return S._result.default;throw S._result}var Ce=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},je={map:Y,forEach:function(S,q,te){Y(S,function(){q.apply(this,arguments)},te)},count:function(S){var q=0;return Y(S,function(){q++}),q},toArray:function(S){return Y(S,function(q){return q})||[]},only:function(S){if(!F(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return Ae.Activity=b,Ae.Children=je,Ae.Component=E,Ae.Fragment=o,Ae.Profiler=d,Ae.PureComponent=G,Ae.StrictMode=u,Ae.Suspense=g,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(S){return T.H.useMemoCache(S)}},Ae.cache=function(S){return function(){return S.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(S,q,te){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var oe=B({},S.props),he=S.key;if(q!=null)for(be in q.key!==void 0&&(he=""+q.key),q)!L.call(q,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&q.ref===void 0||(oe[be]=q[be]);var be=arguments.length-2;if(be===1)oe.children=te;else if(1<be){for(var Ee=Array(be),le=0;le<be;le++)Ee[le]=arguments[le+2];oe.children=Ee}return D(S.type,he,oe)},Ae.createContext=function(S){return S={$$typeof:p,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:m,_context:S},S},Ae.createElement=function(S,q,te){var oe,he={},be=null;if(q!=null)for(oe in q.key!==void 0&&(be=""+q.key),q)L.call(q,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(he[oe]=q[oe]);var Ee=arguments.length-2;if(Ee===1)he.children=te;else if(1<Ee){for(var le=Array(Ee),xe=0;xe<Ee;xe++)le[xe]=arguments[xe+2];he.children=le}if(S&&S.defaultProps)for(oe in Ee=S.defaultProps,Ee)he[oe]===void 0&&(he[oe]=Ee[oe]);return D(S,be,he)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(S){return{$$typeof:y,render:S}},Ae.isValidElement=F,Ae.lazy=function(S){return{$$typeof:C,_payload:{_status:-1,_result:S},_init:se}},Ae.memo=function(S,q){return{$$typeof:h,type:S,compare:q===void 0?null:q}},Ae.startTransition=function(S){var q=T.T,te={};T.T=te;try{var oe=S(),he=T.S;he!==null&&he(te,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(J,Ce)}catch(be){Ce(be)}finally{q!==null&&te.types!==null&&(q.types=te.types),T.T=q}},Ae.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},Ae.use=function(S){return T.H.use(S)},Ae.useActionState=function(S,q,te){return T.H.useActionState(S,q,te)},Ae.useCallback=function(S,q){return T.H.useCallback(S,q)},Ae.useContext=function(S){return T.H.useContext(S)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(S,q){return T.H.useDeferredValue(S,q)},Ae.useEffect=function(S,q){return T.H.useEffect(S,q)},Ae.useEffectEvent=function(S){return T.H.useEffectEvent(S)},Ae.useId=function(){return T.H.useId()},Ae.useImperativeHandle=function(S,q,te){return T.H.useImperativeHandle(S,q,te)},Ae.useInsertionEffect=function(S,q){return T.H.useInsertionEffect(S,q)},Ae.useLayoutEffect=function(S,q){return T.H.useLayoutEffect(S,q)},Ae.useMemo=function(S,q){return T.H.useMemo(S,q)},Ae.useOptimistic=function(S,q){return T.H.useOptimistic(S,q)},Ae.useReducer=function(S,q,te){return T.H.useReducer(S,q,te)},Ae.useRef=function(S){return T.H.useRef(S)},Ae.useState=function(S){return T.H.useState(S)},Ae.useSyncExternalStore=function(S,q,te){return T.H.useSyncExternalStore(S,q,te)},Ae.useTransition=function(){return T.H.useTransition()},Ae.version="19.2.4",Ae}var Bp;function Cc(){return Bp||(Bp=1,nc.exports=Kv()),nc.exports}var x=Cc();const ge=kh(x);var ac={exports:{}},er={},ic={exports:{}},rc={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var Vp;function Zv(){return Vp||(Vp=1,(function(a){function i(_,Y){var se=_.length;_.push(Y);e:for(;0<se;){var Ce=se-1>>>1,je=_[Ce];if(0<d(je,Y))_[Ce]=Y,_[se]=je,se=Ce;else break e}}function o(_){return _.length===0?null:_[0]}function u(_){if(_.length===0)return null;var Y=_[0],se=_.pop();if(se!==Y){_[0]=se;e:for(var Ce=0,je=_.length,S=je>>>1;Ce<S;){var q=2*(Ce+1)-1,te=_[q],oe=q+1,he=_[oe];if(0>d(te,se))oe<je&&0>d(he,te)?(_[Ce]=he,_[oe]=se,Ce=oe):(_[Ce]=te,_[q]=se,Ce=q);else if(oe<je&&0>d(he,se))_[Ce]=he,_[oe]=se,Ce=oe;else break e}}return Y}function d(_,Y){var se=_.sortIndex-Y.sortIndex;return se!==0?se:_.id-Y.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;a.unstable_now=function(){return m.now()}}else{var p=Date,y=p.now();a.unstable_now=function(){return p.now()-y}}var g=[],h=[],C=1,b=null,k=3,w=!1,R=!1,B=!1,z=!1,E=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function $(_){for(var Y=o(h);Y!==null;){if(Y.callback===null)u(h);else if(Y.startTime<=_)u(h),Y.sortIndex=Y.expirationTime,i(g,Y);else break;Y=o(h)}}function O(_){if(B=!1,$(_),!R)if(o(g)!==null)R=!0,J||(J=!0,de());else{var Y=o(h);Y!==null&&re(O,Y.startTime-_)}}var J=!1,T=-1,L=5,D=-1;function W(){return z?!0:!(a.unstable_now()-D<L)}function F(){if(z=!1,J){var _=a.unstable_now();D=_;var Y=!0;try{e:{R=!1,B&&(B=!1,A(T),T=-1),w=!0;var se=k;try{t:{for($(_),b=o(g);b!==null&&!(b.expirationTime>_&&W());){var Ce=b.callback;if(typeof Ce=="function"){b.callback=null,k=b.priorityLevel;var je=Ce(b.expirationTime<=_);if(_=a.unstable_now(),typeof je=="function"){b.callback=je,$(_),Y=!0;break t}b===o(g)&&u(g),$(_)}else u(g);b=o(g)}if(b!==null)Y=!0;else{var S=o(h);S!==null&&re(O,S.startTime-_),Y=!1}}break e}finally{b=null,k=se,w=!1}Y=void 0}}finally{Y?de():J=!1}}}var de;if(typeof G=="function")de=function(){G(F)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,P=ce.port2;ce.port1.onmessage=F,de=function(){P.postMessage(null)}}else de=function(){E(F,0)};function re(_,Y){T=E(function(){_(a.unstable_now())},Y)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(_){_.callback=null},a.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<_?Math.floor(1e3/_):5},a.unstable_getCurrentPriorityLevel=function(){return k},a.unstable_next=function(_){switch(k){case 1:case 2:case 3:var Y=3;break;default:Y=k}var se=k;k=Y;try{return _()}finally{k=se}},a.unstable_requestPaint=function(){z=!0},a.unstable_runWithPriority=function(_,Y){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var se=k;k=_;try{return Y()}finally{k=se}},a.unstable_scheduleCallback=function(_,Y,se){var Ce=a.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?Ce+se:Ce):se=Ce,_){case 1:var je=-1;break;case 2:je=250;break;case 5:je=1073741823;break;case 4:je=1e4;break;default:je=5e3}return je=se+je,_={id:C++,callback:Y,priorityLevel:_,startTime:se,expirationTime:je,sortIndex:-1},se>Ce?(_.sortIndex=se,i(h,_),o(g)===null&&_===o(h)&&(B?(A(T),T=-1):B=!0,re(O,se-Ce))):(_.sortIndex=je,i(g,_),R||w||(R=!0,J||(J=!0,de()))),_},a.unstable_shouldYield=W,a.unstable_wrapCallback=function(_){var Y=k;return function(){var se=k;k=Y;try{return _.apply(this,arguments)}finally{k=se}}}})(rc)),rc}var Gp;function Jv(){return Gp||(Gp=1,ic.exports=Zv()),ic.exports}var sc={exports:{}},It={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var Ip;function $v(){if(Ip)return It;Ip=1;var a=Cc();function i(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var C=2;C<arguments.length;C++)h+="&args[]="+encodeURIComponent(arguments[C])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var u={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},d=Symbol.for("react.portal");function m(g,h,C){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:b==null?null:""+b,children:g,containerInfo:h,implementation:C}}var p=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return It.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,It.createPortal=function(g,h){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(i(299));return m(g,h,null,C)},It.flushSync=function(g){var h=p.T,C=u.p;try{if(p.T=null,u.p=2,g)return g()}finally{p.T=h,u.p=C,u.d.f()}},It.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,u.d.C(g,h))},It.prefetchDNS=function(g){typeof g=="string"&&u.d.D(g)},It.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var C=h.as,b=y(C,h.crossOrigin),k=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;C==="style"?u.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:b,integrity:k,fetchPriority:w}):C==="script"&&u.d.X(g,{crossOrigin:b,integrity:k,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},It.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var C=y(h.as,h.crossOrigin);u.d.M(g,{crossOrigin:C,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&u.d.M(g)},It.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var C=h.as,b=y(C,h.crossOrigin);u.d.L(g,C,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},It.preloadModule=function(g,h){if(typeof g=="string")if(h){var C=y(h.as,h.crossOrigin);u.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:C,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else u.d.m(g)},It.requestFormReset=function(g){u.d.r(g)},It.unstable_batchedUpdates=function(g,h){return g(h)},It.useFormState=function(g,h,C){return p.H.useFormState(g,h,C)},It.useFormStatus=function(){return p.H.useHostTransitionStatus()},It.version="19.2.4",It}var qp;function wh(){if(qp)return sc.exports;qp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),sc.exports=$v(),sc.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var Yp;function Wv(){if(Yp)return er;Yp=1;var a=Jv(),i=Cc(),o=wh();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(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 g(e){if(m(e)!==e)throw Error(u(188))}function h(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(u(188));return t!==e?null:e}for(var l=e,n=t;;){var r=l.return;if(r===null)break;var s=r.alternate;if(s===null){if(n=r.return,n!==null){l=n;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===l)return g(r),e;if(s===n)return g(r),t;s=s.sibling}throw Error(u(188))}if(l.return!==n.return)l=r,n=s;else{for(var f=!1,v=r.child;v;){if(v===l){f=!0,l=r,n=s;break}if(v===n){f=!0,n=r,l=s;break}v=v.sibling}if(!f){for(v=s.child;v;){if(v===l){f=!0,l=s,n=r;break}if(v===n){f=!0,n=s,l=r;break}v=v.sibling}if(!f)throw Error(u(189))}}if(l.alternate!==n)throw Error(u(190))}if(l.tag!==3)throw Error(u(188));return l.stateNode.current===l?e:t}function C(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=C(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,k=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),G=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function de(e){return e===null||typeof e!="object"?null:(e=F&&e[F]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Symbol.for("react.client.reference");function P(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case E:return"Profiler";case z:return"StrictMode";case O:return"Suspense";case J:return"SuspenseList";case D:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case G:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case T:return t=e.displayName||null,t!==null?t:P(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var re=Array.isArray,_=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},Ce=[],je=-1;function S(e){return{current:e}}function q(e){0>je||(e.current=Ce[je],Ce[je]=null,je--)}function te(e,t){je++,Ce[je]=e.current,e.current=t}var oe=S(null),he=S(null),be=S(null),Ee=S(null);function le(e,t){switch(te(be,t),te(he,e),te(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ip(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ip(t),e=rp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(oe),te(oe,e)}function xe(){q(oe),q(he),q(be)}function Xe(e){e.memoizedState!==null&&te(Ee,e);var t=oe.current,l=rp(t,e.type);t!==l&&(te(he,e),te(oe,l))}function Be(e){he.current===e&&(q(oe),q(he)),Ee.current===e&&(q(Ee),Ji._currentValue=se)}var Q,ie;function ae(e){if(Q===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Q=t&&t[1]||"",ie=-1<l.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+Q+e+ie}var ue=!1;function me(e,t){if(!e||ue)return"";ue=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(I){var V=I}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(I){V=I}e.call(Z.prototype)}}else{try{throw Error()}catch(I){V=I}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(I){if(I&&V&&typeof I.stack=="string")return[I.stack,V.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=n.DetermineComponentFrameRoot(),f=s[0],v=s[1];if(f&&v){var j=f.split(`
45
+ `),U=v.split(`
46
+ `);for(r=n=0;n<j.length&&!j[n].includes("DetermineComponentFrameRoot");)n++;for(;r<U.length&&!U[r].includes("DetermineComponentFrameRoot");)r++;if(n===j.length||r===U.length)for(n=j.length-1,r=U.length-1;1<=n&&0<=r&&j[n]!==U[r];)r--;for(;1<=n&&0<=r;n--,r--)if(j[n]!==U[r]){if(n!==1||r!==1)do if(n--,r--,0>r||j[n]!==U[r]){var X=`
47
+ `+j[n].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=n&&0<=r);break}}}finally{ue=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?ae(l):""}function De(e,t){switch(e.tag){case 26:case 27:case 5:return ae(e.type);case 16:return ae("Lazy");case 13:return e.child!==t&&t!==null?ae("Suspense Fallback"):ae("Suspense");case 19:return ae("SuspenseList");case 0:case 15:return me(e.type,!1);case 11:return me(e.type.render,!1);case 1:return me(e.type,!0);case 31:return ae("Activity");default:return""}}function Re(e){try{var t="",l=null;do t+=De(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
48
+ Error generating stack: `+n.message+`
49
+ `+n.stack}}var vt=Object.prototype.hasOwnProperty,fl=a.unstable_scheduleCallback,ht=a.unstable_cancelCallback,Xt=a.unstable_shouldYield,wl=a.unstable_requestPaint,at=a.unstable_now,Et=a.unstable_getCurrentPriorityLevel,Hn=a.unstable_ImmediatePriority,Un=a.unstable_UserBlockingPriority,Le=a.unstable_NormalPriority,Ot=a.unstable_LowPriority,ml=a.unstable_IdlePriority,At=a.log,si=a.unstable_setDisableYieldValue,Bn=null,Lt=null;function Qt(e){if(typeof At=="function"&&si(e),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(Bn,e)}catch{}}var _t=Math.clz32?Math.clz32:ca,ua=Math.log,hr=Math.LN2;function ca(e){return e>>>=0,e===0?32:31-(ua(e)/hr|0)|0}var rt=256,Vl=262144,da=4194304;function xt(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 oi(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var v=n&134217727;return v!==0?(n=v&~s,n!==0?r=xt(n):(f&=v,f!==0?r=xt(f):l||(l=v&~e,l!==0&&(r=xt(l))))):(v=n&~s,v!==0?r=xt(v):f!==0?r=xt(f):l||(l=n&~e,l!==0&&(r=xt(l)))),r===0?0:t!==0&&t!==r&&(t&s)===0&&(s=r&-r,l=t&-t,s>=l||s===32&&(l&4194048)!==0)?t:r}function pl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Is(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 Bc(){var e=da;return da<<=1,(da&62914560)===0&&(da=4194304),e}function qs(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function ui(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function My(e,t,l,n,r,s){var f=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 v=e.entanglements,j=e.expirationTimes,U=e.hiddenUpdates;for(l=f&~l;0<l;){var X=31-_t(l),Z=1<<X;v[X]=0,j[X]=-1;var V=U[X];if(V!==null)for(U[X]=null,X=0;X<V.length;X++){var I=V[X];I!==null&&(I.lane&=-536870913)}l&=~Z}n!==0&&Vc(e,n,0),s!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=s&~(f&~t))}function Vc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-_t(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function Gc(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-_t(l),r=1<<n;r&t|e[n]&t&&(e[n]|=t),l&=~r}}function Ic(e,t){var l=t&-t;return l=(l&42)!==0?1:Ys(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ys(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 Xs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function qc(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:Np(e.type))}function Yc(e,t){var l=Y.p;try{return Y.p=e,t()}finally{Y.p=l}}var on=Math.random().toString(36).slice(2),Ht="__reactFiber$"+on,Jt="__reactProps$"+on,fa="__reactContainer$"+on,Qs="__reactEvents$"+on,Dy="__reactListeners$"+on,Oy="__reactHandles$"+on,Xc="__reactResources$"+on,ci="__reactMarker$"+on;function Ks(e){delete e[Ht],delete e[Jt],delete e[Qs],delete e[Dy],delete e[Oy]}function ma(e){var t=e[Ht];if(t)return t;for(var l=e.parentNode;l;){if(t=l[fa]||l[Ht]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=mp(e);e!==null;){if(l=e[Ht])return l;e=mp(e)}return t}e=l,l=e.parentNode}return null}function pa(e){if(e=e[Ht]||e[fa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function di(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function ha(e){var t=e[Xc];return t||(t=e[Xc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Mt(e){e[ci]=!0}var Qc=new Set,Kc={};function Vn(e,t){ya(e,t),ya(e+"Capture",t)}function ya(e,t){for(Kc[e]=t,e=0;e<t.length;e++)Qc.add(t[e])}var Ly=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Zc={},Jc={};function Hy(e){return vt.call(Jc,e)?!0:vt.call(Zc,e)?!1:Ly.test(e)?Jc[e]=!0:(Zc[e]=!0,!1)}function yr(e,t,l){if(Hy(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function gr(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 Gl(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+n)}}function hl(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $c(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Uy(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(f){l=""+f,s.call(this,f)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(f){l=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zs(e){if(!e._valueTracker){var t=$c(e)?"checked":"value";e._valueTracker=Uy(e,t,""+e[t])}}function Wc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=$c(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}function vr(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 By=/[\n"\\]/g;function yl(e){return e.replace(By,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Js(e,t,l,n,r,s,f,v){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+hl(t)):e.value!==""+hl(t)&&(e.value=""+hl(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?$s(e,f,hl(t)):l!=null?$s(e,f,hl(l)):n!=null&&e.removeAttribute("value"),r==null&&s!=null&&(e.defaultChecked=!!s),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+hl(v):e.removeAttribute("name")}function Fc(e,t,l,n,r,s,f,v){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||l!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Zs(e);return}l=l!=null?""+hl(l):"",t=t!=null?""+hl(t):l,v||t===e.value||(e.value=t),e.defaultValue=t}n=n??r,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=v?e.checked:!!n,e.defaultChecked=!!n,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),Zs(e)}function $s(e,t,l){t==="number"&&vr(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ga(e,t,l,n){if(e=e.options,t){t={};for(var r=0;r<l.length;r++)t["$"+l[r]]=!0;for(l=0;l<e.length;l++)r=t.hasOwnProperty("$"+e[l].value),e[l].selected!==r&&(e[l].selected=r),r&&n&&(e[l].defaultSelected=!0)}else{for(l=""+hl(l),t=null,r=0;r<e.length;r++){if(e[r].value===l){e[r].selected=!0,n&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Pc(e,t,l){if(t!=null&&(t=""+hl(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+hl(l):""}function ed(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(u(92));if(re(n)){if(1<n.length)throw Error(u(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=hl(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),Zs(e)}function va(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Vy=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 td(e,t,l){var n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||Vy.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function ld(e,t,l){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var r in t)n=t[r],t.hasOwnProperty(r)&&l[r]!==n&&td(e,r,n)}else for(var s in t)t.hasOwnProperty(s)&&td(e,s,t[s])}function Ws(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 Gy=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"]]),Iy=/^[\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 xr(e){return Iy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Il(){}var Fs=null;function Ps(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xa=null,ba=null;function nd(e){var t=pa(e);if(t&&(e=t.stateNode)){var l=e[Jt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Js(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="'+yl(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var r=n[Jt]||null;if(!r)throw Error(u(90));Js(n,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&Wc(n)}break e;case"textarea":Pc(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ga(e,!!l.multiple,t,!1)}}}var eo=!1;function ad(e,t,l){if(eo)return e(t,l);eo=!0;try{var n=e(t);return n}finally{if(eo=!1,(xa!==null||ba!==null)&&(rs(),xa&&(t=xa,e=ba,ba=xa=null,nd(t),e)))for(t=0;t<e.length;t++)nd(e[t])}}function fi(e,t){var l=e.stateNode;if(l===null)return null;var n=l[Jt]||null;if(n===null)return null;l=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(u(231,t,typeof l));return l}var ql=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),to=!1;if(ql)try{var mi={};Object.defineProperty(mi,"passive",{get:function(){to=!0}}),window.addEventListener("test",mi,mi),window.removeEventListener("test",mi,mi)}catch{to=!1}var un=null,lo=null,br=null;function id(){if(br)return br;var e,t=lo,l=t.length,n,r="value"in un?un.value:un.textContent,s=r.length;for(e=0;e<l&&t[e]===r[e];e++);var f=l-e;for(n=1;n<=f&&t[l-n]===r[s-n];n++);return br=r.slice(e,1<n?1-n:void 0)}function Sr(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 Er(){return!0}function rd(){return!1}function $t(e){function t(l,n,r,s,f){this._reactName=l,this._targetInst=r,this.type=n,this.nativeEvent=s,this.target=f,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(l=e[v],this[v]=l?l(s):s[v]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Er:rd,this.isPropagationStopped=rd,this}return b(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=Er)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Er)},persist:function(){},isPersistent:Er}),t}var Gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tr=$t(Gn),pi=b({},Gn,{view:0,detail:0}),qy=$t(pi),no,ao,hi,Cr=b({},pi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ro,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!==hi&&(hi&&e.type==="mousemove"?(no=e.screenX-hi.screenX,ao=e.screenY-hi.screenY):ao=no=0,hi=e),no)},movementY:function(e){return"movementY"in e?e.movementY:ao}}),sd=$t(Cr),Yy=b({},Cr,{dataTransfer:0}),Xy=$t(Yy),Qy=b({},pi,{relatedTarget:0}),io=$t(Qy),Ky=b({},Gn,{animationName:0,elapsedTime:0,pseudoElement:0}),Zy=$t(Ky),Jy=b({},Gn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$y=$t(Jy),Wy=b({},Gn,{data:0}),od=$t(Wy),Fy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Py={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"},eg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=eg[e])?!!t[e]:!1}function ro(){return tg}var lg=b({},pi,{key:function(e){if(e.key){var t=Fy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Sr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Py[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ro,charCode:function(e){return e.type==="keypress"?Sr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Sr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ng=$t(lg),ag=b({},Cr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ud=$t(ag),ig=b({},pi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ro}),rg=$t(ig),sg=b({},Gn,{propertyName:0,elapsedTime:0,pseudoElement:0}),og=$t(sg),ug=b({},Cr,{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}),cg=$t(ug),dg=b({},Gn,{newState:0,oldState:0}),fg=$t(dg),mg=[9,13,27,32],so=ql&&"CompositionEvent"in window,yi=null;ql&&"documentMode"in document&&(yi=document.documentMode);var pg=ql&&"TextEvent"in window&&!yi,cd=ql&&(!so||yi&&8<yi&&11>=yi),dd=" ",fd=!1;function md(e,t){switch(e){case"keyup":return mg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sa=!1;function hg(e,t){switch(e){case"compositionend":return pd(t);case"keypress":return t.which!==32?null:(fd=!0,dd);case"textInput":return e=t.data,e===dd&&fd?null:e;default:return null}}function yg(e,t){if(Sa)return e==="compositionend"||!so&&md(e,t)?(e=id(),br=lo=un=null,Sa=!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 cd&&t.locale!=="ko"?null:t.data;default:return null}}var gg={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 hd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gg[e.type]:t==="textarea"}function yd(e,t,l,n){xa?ba?ba.push(n):ba=[n]:xa=n,t=ms(t,"onChange"),0<t.length&&(l=new Tr("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var gi=null,vi=null;function vg(e){Pm(e,0)}function jr(e){var t=di(e);if(Wc(t))return e}function gd(e,t){if(e==="change")return t}var vd=!1;if(ql){var oo;if(ql){var uo="oninput"in document;if(!uo){var xd=document.createElement("div");xd.setAttribute("oninput","return;"),uo=typeof xd.oninput=="function"}oo=uo}else oo=!1;vd=oo&&(!document.documentMode||9<document.documentMode)}function bd(){gi&&(gi.detachEvent("onpropertychange",Sd),vi=gi=null)}function Sd(e){if(e.propertyName==="value"&&jr(vi)){var t=[];yd(t,vi,e,Ps(e)),ad(vg,t)}}function xg(e,t,l){e==="focusin"?(bd(),gi=t,vi=l,gi.attachEvent("onpropertychange",Sd)):e==="focusout"&&bd()}function bg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return jr(vi)}function Sg(e,t){if(e==="click")return jr(t)}function Eg(e,t){if(e==="input"||e==="change")return jr(t)}function Tg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ll=typeof Object.is=="function"?Object.is:Tg;function xi(e,t){if(ll(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var r=l[n];if(!vt.call(t,r)||!ll(e[r],t[r]))return!1}return!0}function Ed(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Td(e,t){var l=Ed(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ed(l)}}function Cd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=vr(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=vr(e.document)}return t}function co(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 Cg=ql&&"documentMode"in document&&11>=document.documentMode,Ea=null,fo=null,bi=null,mo=!1;function kd(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;mo||Ea==null||Ea!==vr(n)||(n=Ea,"selectionStart"in n&&co(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),bi&&xi(bi,n)||(bi=n,n=ms(fo,"onSelect"),0<n.length&&(t=new Tr("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=Ea)))}function In(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ta={animationend:In("Animation","AnimationEnd"),animationiteration:In("Animation","AnimationIteration"),animationstart:In("Animation","AnimationStart"),transitionrun:In("Transition","TransitionRun"),transitionstart:In("Transition","TransitionStart"),transitioncancel:In("Transition","TransitionCancel"),transitionend:In("Transition","TransitionEnd")},po={},wd={};ql&&(wd=document.createElement("div").style,"AnimationEvent"in window||(delete Ta.animationend.animation,delete Ta.animationiteration.animation,delete Ta.animationstart.animation),"TransitionEvent"in window||delete Ta.transitionend.transition);function qn(e){if(po[e])return po[e];if(!Ta[e])return e;var t=Ta[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in wd)return po[e]=t[l];return e}var Ad=qn("animationend"),Nd=qn("animationiteration"),Rd=qn("animationstart"),jg=qn("transitionrun"),kg=qn("transitionstart"),wg=qn("transitioncancel"),zd=qn("transitionend"),_d=new Map,ho="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(" ");ho.push("scrollEnd");function Al(e,t){_d.set(e,t),Vn(t,[e])}var kr=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)},gl=[],Ca=0,yo=0;function wr(){for(var e=Ca,t=yo=Ca=0;t<e;){var l=gl[t];gl[t++]=null;var n=gl[t];gl[t++]=null;var r=gl[t];gl[t++]=null;var s=gl[t];if(gl[t++]=null,n!==null&&r!==null){var f=n.pending;f===null?r.next=r:(r.next=f.next,f.next=r),n.pending=r}s!==0&&Md(l,r,s)}}function Ar(e,t,l,n){gl[Ca++]=e,gl[Ca++]=t,gl[Ca++]=l,gl[Ca++]=n,yo|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function go(e,t,l,n){return Ar(e,t,l,n),Nr(e)}function Yn(e,t){return Ar(e,null,null,t),Nr(e)}function Md(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var r=!1,s=e.return;s!==null;)s.childLanes|=l,n=s.alternate,n!==null&&(n.childLanes|=l),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(r=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,r&&t!==null&&(r=31-_t(l),e=s.hiddenUpdates,n=e[r],n===null?e[r]=[t]:n.push(t),t.lane=l|536870912),s):null}function Nr(e){if(50<Ii)throw Ii=0,ku=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ja={};function Ag(e,t,l,n){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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nl(e,t,l,n){return new Ag(e,t,l,n)}function vo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yl(e,t){var l=e.alternate;return l===null?(l=nl(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 Dd(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 Rr(e,t,l,n,r,s){var f=0;if(n=e,typeof e=="function")vo(e)&&(f=1);else if(typeof e=="string")f=Mv(e,l,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case D:return e=nl(31,l,t,r),e.elementType=D,e.lanes=s,e;case B:return Xn(l.children,r,s,t);case z:f=8,r|=24;break;case E:return e=nl(12,l,t,r|2),e.elementType=E,e.lanes=s,e;case O:return e=nl(13,l,t,r),e.elementType=O,e.lanes=s,e;case J:return e=nl(19,l,t,r),e.elementType=J,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:f=10;break e;case A:f=9;break e;case $:f=11;break e;case T:f=14;break e;case L:f=16,n=null;break e}f=29,l=Error(u(130,e===null?"null":typeof e,"")),n=null}return t=nl(f,l,t,r),t.elementType=e,t.type=n,t.lanes=s,t}function Xn(e,t,l,n){return e=nl(7,e,n,t),e.lanes=l,e}function xo(e,t,l){return e=nl(6,e,null,t),e.lanes=l,e}function Od(e){var t=nl(18,null,null,0);return t.stateNode=e,t}function bo(e,t,l){return t=nl(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ld=new WeakMap;function vl(e,t){if(typeof e=="object"&&e!==null){var l=Ld.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Re(t)},Ld.set(e,t),t)}return{value:e,source:t,stack:Re(t)}}var ka=[],wa=0,zr=null,Si=0,xl=[],bl=0,cn=null,Ml=1,Dl="";function Xl(e,t){ka[wa++]=Si,ka[wa++]=zr,zr=e,Si=t}function Hd(e,t,l){xl[bl++]=Ml,xl[bl++]=Dl,xl[bl++]=cn,cn=e;var n=Ml;e=Dl;var r=32-_t(n)-1;n&=~(1<<r),l+=1;var s=32-_t(t)+r;if(30<s){var f=r-r%5;s=(n&(1<<f)-1).toString(32),n>>=f,r-=f,Ml=1<<32-_t(t)+r|l<<r|n,Dl=s+e}else Ml=1<<s|l<<r|n,Dl=e}function So(e){e.return!==null&&(Xl(e,1),Hd(e,1,0))}function Eo(e){for(;e===zr;)zr=ka[--wa],ka[wa]=null,Si=ka[--wa],ka[wa]=null;for(;e===cn;)cn=xl[--bl],xl[bl]=null,Dl=xl[--bl],xl[bl]=null,Ml=xl[--bl],xl[bl]=null}function Ud(e,t){xl[bl++]=Ml,xl[bl++]=Dl,xl[bl++]=cn,Ml=t.id,Dl=t.overflow,cn=e}var Ut=null,st=null,Ie=!1,dn=null,Sl=!1,To=Error(u(519));function fn(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ei(vl(t,e)),To}function Bd(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[Ht]=e,t[Jt]=n,l){case"dialog":Ue("cancel",t),Ue("close",t);break;case"iframe":case"object":case"embed":Ue("load",t);break;case"video":case"audio":for(l=0;l<Yi.length;l++)Ue(Yi[l],t);break;case"source":Ue("error",t);break;case"img":case"image":case"link":Ue("error",t),Ue("load",t);break;case"details":Ue("toggle",t);break;case"input":Ue("invalid",t),Fc(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ue("invalid",t);break;case"textarea":Ue("invalid",t),ed(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||np(t.textContent,l)?(n.popover!=null&&(Ue("beforetoggle",t),Ue("toggle",t)),n.onScroll!=null&&Ue("scroll",t),n.onScrollEnd!=null&&Ue("scrollend",t),n.onClick!=null&&(t.onclick=Il),t=!0):t=!1,t||fn(e,!0)}function Vd(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:Sl=!1;return;case 27:case 3:Sl=!0;return;default:Ut=Ut.return}}function Aa(e){if(e!==Ut)return!1;if(!Ie)return Vd(e),Ie=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Gu(e.type,e.memoizedProps)),l=!l),l&&st&&fn(e),Vd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));st=fp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));st=fp(e)}else t===27?(t=st,kn(e.type)?(e=Qu,Qu=null,st=e):st=t):st=Ut?Tl(e.stateNode.nextSibling):null;return!0}function Qn(){st=Ut=null,Ie=!1}function Co(){var e=dn;return e!==null&&(el===null?el=e:el.push.apply(el,e),dn=null),e}function Ei(e){dn===null?dn=[e]:dn.push(e)}var jo=S(null),Kn=null,Ql=null;function mn(e,t,l){te(jo,t._currentValue),t._currentValue=l}function Kl(e){e._currentValue=jo.current,q(jo)}function ko(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function wo(e,t,l,n){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var s=r.dependencies;if(s!==null){var f=r.child;s=s.firstContext;e:for(;s!==null;){var v=s;s=r;for(var j=0;j<t.length;j++)if(v.context===t[j]){s.lanes|=l,v=s.alternate,v!==null&&(v.lanes|=l),ko(s.return,l,e),n||(f=null);break e}s=v.next}}else if(r.tag===18){if(f=r.return,f===null)throw Error(u(341));f.lanes|=l,s=f.alternate,s!==null&&(s.lanes|=l),ko(f,l,e),f=null}else f=r.child;if(f!==null)f.return=r;else for(f=r;f!==null;){if(f===e){f=null;break}if(r=f.sibling,r!==null){r.return=f.return,f=r;break}f=f.return}r=f}}function Na(e,t,l,n){e=null;for(var r=t,s=!1;r!==null;){if(!s){if((r.flags&524288)!==0)s=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var f=r.alternate;if(f===null)throw Error(u(387));if(f=f.memoizedProps,f!==null){var v=r.type;ll(r.pendingProps.value,f.value)||(e!==null?e.push(v):e=[v])}}else if(r===Ee.current){if(f=r.alternate,f===null)throw Error(u(387));f.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Ji):e=[Ji])}r=r.return}e!==null&&wo(t,e,l,n),t.flags|=262144}function _r(e){for(e=e.firstContext;e!==null;){if(!ll(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zn(e){Kn=e,Ql=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Bt(e){return Gd(Kn,e)}function Mr(e,t){return Kn===null&&Zn(e),Gd(e,t)}function Gd(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Ql===null){if(e===null)throw Error(u(308));Ql=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ql=Ql.next=t;return l}var Ng=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Rg=a.unstable_scheduleCallback,zg=a.unstable_NormalPriority,Tt={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ao(){return{controller:new Ng,data:new Map,refCount:0}}function Ti(e){e.refCount--,e.refCount===0&&Rg(zg,function(){e.controller.abort()})}var Ci=null,No=0,Ra=0,za=null;function _g(e,t){if(Ci===null){var l=Ci=[];No=0,Ra=_u(),za={status:"pending",value:void 0,then:function(n){l.push(n)}}}return No++,t.then(Id,Id),t}function Id(){if(--No===0&&Ci!==null){za!==null&&(za.status="fulfilled");var e=Ci;Ci=null,Ra=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Mg(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(r){l.push(r)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var r=0;r<l.length;r++)(0,l[r])(t)},function(r){for(n.status="rejected",n.reason=r,r=0;r<l.length;r++)(0,l[r])(void 0)}),n}var qd=_.S;_.S=function(e,t){wm=at(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&_g(e,t),qd!==null&&qd(e,t)};var Jn=S(null);function Ro(){var e=Jn.current;return e!==null?e:it.pooledCache}function Dr(e,t){t===null?te(Jn,Jn.current):te(Jn,t.pool)}function Yd(){var e=Ro();return e===null?null:{parent:Tt._currentValue,pool:e}}var _a=Error(u(460)),zo=Error(u(474)),Or=Error(u(542)),Lr={then:function(){}};function Xd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Qd(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Il,Il),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zd(e),e;default:if(typeof t.status=="string")t.then(Il,Il);else{if(e=it,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=n}},function(n){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zd(e),e}throw Wn=t,_a}}function $n(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Wn=l,_a):l}}var Wn=null;function Kd(){if(Wn===null)throw Error(u(459));var e=Wn;return Wn=null,e}function Zd(e){if(e===_a||e===Or)throw Error(u(483))}var Ma=null,ji=0;function Hr(e){var t=ji;return ji+=1,Ma===null&&(Ma=[]),Qd(Ma,e,t)}function ki(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ur(e,t){throw t.$$typeof===k?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Jd(e){function t(M,N){if(e){var H=M.deletions;H===null?(M.deletions=[N],M.flags|=16):H.push(N)}}function l(M,N){if(!e)return null;for(;N!==null;)t(M,N),N=N.sibling;return null}function n(M){for(var N=new Map;M!==null;)M.key!==null?N.set(M.key,M):N.set(M.index,M),M=M.sibling;return N}function r(M,N){return M=Yl(M,N),M.index=0,M.sibling=null,M}function s(M,N,H){return M.index=H,e?(H=M.alternate,H!==null?(H=H.index,H<N?(M.flags|=67108866,N):H):(M.flags|=67108866,N)):(M.flags|=1048576,N)}function f(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function v(M,N,H,K){return N===null||N.tag!==6?(N=xo(H,M.mode,K),N.return=M,N):(N=r(N,H),N.return=M,N)}function j(M,N,H,K){var Se=H.type;return Se===B?X(M,N,H.props.children,K,H.key):N!==null&&(N.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===L&&$n(Se)===N.type)?(N=r(N,H.props),ki(N,H),N.return=M,N):(N=Rr(H.type,H.key,H.props,null,M.mode,K),ki(N,H),N.return=M,N)}function U(M,N,H,K){return N===null||N.tag!==4||N.stateNode.containerInfo!==H.containerInfo||N.stateNode.implementation!==H.implementation?(N=bo(H,M.mode,K),N.return=M,N):(N=r(N,H.children||[]),N.return=M,N)}function X(M,N,H,K,Se){return N===null||N.tag!==7?(N=Xn(H,M.mode,K,Se),N.return=M,N):(N=r(N,H),N.return=M,N)}function Z(M,N,H){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=xo(""+N,M.mode,H),N.return=M,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case w:return H=Rr(N.type,N.key,N.props,null,M.mode,H),ki(H,N),H.return=M,H;case R:return N=bo(N,M.mode,H),N.return=M,N;case L:return N=$n(N),Z(M,N,H)}if(re(N)||de(N))return N=Xn(N,M.mode,H,null),N.return=M,N;if(typeof N.then=="function")return Z(M,Hr(N),H);if(N.$$typeof===G)return Z(M,Mr(M,N),H);Ur(M,N)}return null}function V(M,N,H,K){var Se=N!==null?N.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return Se!==null?null:v(M,N,""+H,K);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case w:return H.key===Se?j(M,N,H,K):null;case R:return H.key===Se?U(M,N,H,K):null;case L:return H=$n(H),V(M,N,H,K)}if(re(H)||de(H))return Se!==null?null:X(M,N,H,K,null);if(typeof H.then=="function")return V(M,N,Hr(H),K);if(H.$$typeof===G)return V(M,N,Mr(M,H),K);Ur(M,H)}return null}function I(M,N,H,K,Se){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return M=M.get(H)||null,v(N,M,""+K,Se);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case w:return M=M.get(K.key===null?H:K.key)||null,j(N,M,K,Se);case R:return M=M.get(K.key===null?H:K.key)||null,U(N,M,K,Se);case L:return K=$n(K),I(M,N,H,K,Se)}if(re(K)||de(K))return M=M.get(H)||null,X(N,M,K,Se,null);if(typeof K.then=="function")return I(M,N,H,Hr(K),Se);if(K.$$typeof===G)return I(M,N,H,Mr(N,K),Se);Ur(N,K)}return null}function pe(M,N,H,K){for(var Se=null,Qe=null,ye=N,_e=N=0,Ge=null;ye!==null&&_e<H.length;_e++){ye.index>_e?(Ge=ye,ye=null):Ge=ye.sibling;var Ke=V(M,ye,H[_e],K);if(Ke===null){ye===null&&(ye=Ge);break}e&&ye&&Ke.alternate===null&&t(M,ye),N=s(Ke,N,_e),Qe===null?Se=Ke:Qe.sibling=Ke,Qe=Ke,ye=Ge}if(_e===H.length)return l(M,ye),Ie&&Xl(M,_e),Se;if(ye===null){for(;_e<H.length;_e++)ye=Z(M,H[_e],K),ye!==null&&(N=s(ye,N,_e),Qe===null?Se=ye:Qe.sibling=ye,Qe=ye);return Ie&&Xl(M,_e),Se}for(ye=n(ye);_e<H.length;_e++)Ge=I(ye,M,_e,H[_e],K),Ge!==null&&(e&&Ge.alternate!==null&&ye.delete(Ge.key===null?_e:Ge.key),N=s(Ge,N,_e),Qe===null?Se=Ge:Qe.sibling=Ge,Qe=Ge);return e&&ye.forEach(function(zn){return t(M,zn)}),Ie&&Xl(M,_e),Se}function Te(M,N,H,K){if(H==null)throw Error(u(151));for(var Se=null,Qe=null,ye=N,_e=N=0,Ge=null,Ke=H.next();ye!==null&&!Ke.done;_e++,Ke=H.next()){ye.index>_e?(Ge=ye,ye=null):Ge=ye.sibling;var zn=V(M,ye,Ke.value,K);if(zn===null){ye===null&&(ye=Ge);break}e&&ye&&zn.alternate===null&&t(M,ye),N=s(zn,N,_e),Qe===null?Se=zn:Qe.sibling=zn,Qe=zn,ye=Ge}if(Ke.done)return l(M,ye),Ie&&Xl(M,_e),Se;if(ye===null){for(;!Ke.done;_e++,Ke=H.next())Ke=Z(M,Ke.value,K),Ke!==null&&(N=s(Ke,N,_e),Qe===null?Se=Ke:Qe.sibling=Ke,Qe=Ke);return Ie&&Xl(M,_e),Se}for(ye=n(ye);!Ke.done;_e++,Ke=H.next())Ke=I(ye,M,_e,Ke.value,K),Ke!==null&&(e&&Ke.alternate!==null&&ye.delete(Ke.key===null?_e:Ke.key),N=s(Ke,N,_e),Qe===null?Se=Ke:Qe.sibling=Ke,Qe=Ke);return e&&ye.forEach(function(Yv){return t(M,Yv)}),Ie&&Xl(M,_e),Se}function tt(M,N,H,K){if(typeof H=="object"&&H!==null&&H.type===B&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case w:e:{for(var Se=H.key;N!==null;){if(N.key===Se){if(Se=H.type,Se===B){if(N.tag===7){l(M,N.sibling),K=r(N,H.props.children),K.return=M,M=K;break e}}else if(N.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===L&&$n(Se)===N.type){l(M,N.sibling),K=r(N,H.props),ki(K,H),K.return=M,M=K;break e}l(M,N);break}else t(M,N);N=N.sibling}H.type===B?(K=Xn(H.props.children,M.mode,K,H.key),K.return=M,M=K):(K=Rr(H.type,H.key,H.props,null,M.mode,K),ki(K,H),K.return=M,M=K)}return f(M);case R:e:{for(Se=H.key;N!==null;){if(N.key===Se)if(N.tag===4&&N.stateNode.containerInfo===H.containerInfo&&N.stateNode.implementation===H.implementation){l(M,N.sibling),K=r(N,H.children||[]),K.return=M,M=K;break e}else{l(M,N);break}else t(M,N);N=N.sibling}K=bo(H,M.mode,K),K.return=M,M=K}return f(M);case L:return H=$n(H),tt(M,N,H,K)}if(re(H))return pe(M,N,H,K);if(de(H)){if(Se=de(H),typeof Se!="function")throw Error(u(150));return H=Se.call(H),Te(M,N,H,K)}if(typeof H.then=="function")return tt(M,N,Hr(H),K);if(H.$$typeof===G)return tt(M,N,Mr(M,H),K);Ur(M,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,N!==null&&N.tag===6?(l(M,N.sibling),K=r(N,H),K.return=M,M=K):(l(M,N),K=xo(H,M.mode,K),K.return=M,M=K),f(M)):l(M,N)}return function(M,N,H,K){try{ji=0;var Se=tt(M,N,H,K);return Ma=null,Se}catch(ye){if(ye===_a||ye===Or)throw ye;var Qe=nl(29,ye,null,M.mode);return Qe.lanes=K,Qe.return=M,Qe}finally{}}}var Fn=Jd(!0),$d=Jd(!1),pn=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mo(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 hn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yn(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Je&2)!==0){var r=n.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),n.pending=t,t=Nr(e),Md(e,null,l),t}return Ar(e,n,t,l),Nr(e)}function wi(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Gc(e,l)}}function Do(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var r=null,s=null;if(l=l.firstBaseUpdate,l!==null){do{var f={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};s===null?r=s=f:s=s.next=f,l=l.next}while(l!==null);s===null?r=s=t:s=s.next=t}else r=s=t;l={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Oo=!1;function Ai(){if(Oo){var e=za;if(e!==null)throw e}}function Ni(e,t,l,n){Oo=!1;var r=e.updateQueue;pn=!1;var s=r.firstBaseUpdate,f=r.lastBaseUpdate,v=r.shared.pending;if(v!==null){r.shared.pending=null;var j=v,U=j.next;j.next=null,f===null?s=U:f.next=U,f=j;var X=e.alternate;X!==null&&(X=X.updateQueue,v=X.lastBaseUpdate,v!==f&&(v===null?X.firstBaseUpdate=U:v.next=U,X.lastBaseUpdate=j))}if(s!==null){var Z=r.baseState;f=0,X=U=j=null,v=s;do{var V=v.lane&-536870913,I=V!==v.lane;if(I?(Ve&V)===V:(n&V)===V){V!==0&&V===Ra&&(Oo=!0),X!==null&&(X=X.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var pe=e,Te=v;V=t;var tt=l;switch(Te.tag){case 1:if(pe=Te.payload,typeof pe=="function"){Z=pe.call(tt,Z,V);break e}Z=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Te.payload,V=typeof pe=="function"?pe.call(tt,Z,V):pe,V==null)break e;Z=b({},Z,V);break e;case 2:pn=!0}}V=v.callback,V!==null&&(e.flags|=64,I&&(e.flags|=8192),I=r.callbacks,I===null?r.callbacks=[V]:I.push(V))}else I={lane:V,tag:v.tag,payload:v.payload,callback:v.callback,next:null},X===null?(U=X=I,j=Z):X=X.next=I,f|=V;if(v=v.next,v===null){if(v=r.shared.pending,v===null)break;I=v,v=I.next,I.next=null,r.lastBaseUpdate=I,r.shared.pending=null}}while(!0);X===null&&(j=Z),r.baseState=j,r.firstBaseUpdate=U,r.lastBaseUpdate=X,s===null&&(r.shared.lanes=0),Sn|=f,e.lanes=f,e.memoizedState=Z}}function Wd(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Fd(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Wd(l[e],t)}var Da=S(null),Br=S(0);function Pd(e,t){e=ln,te(Br,e),te(Da,t),ln=e|t.baseLanes}function Lo(){te(Br,ln),te(Da,Da.current)}function Ho(){ln=Br.current,q(Da),q(Br)}var al=S(null),El=null;function gn(e){var t=e.alternate;te(bt,bt.current&1),te(al,e),El===null&&(t===null||Da.current!==null||t.memoizedState!==null)&&(El=e)}function Uo(e){te(bt,bt.current),te(al,e),El===null&&(El=e)}function ef(e){e.tag===22?(te(bt,bt.current),te(al,e),El===null&&(El=e)):vn()}function vn(){te(bt,bt.current),te(al,al.current)}function il(e){q(al),El===e&&(El=null),q(bt)}var bt=S(0);function Vr(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Yu(l)||Xu(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 Zl=0,ze=null,Pe=null,Ct=null,Gr=!1,Oa=!1,Pn=!1,Ir=0,Ri=0,La=null,Dg=0;function yt(){throw Error(u(321))}function Bo(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!ll(e[l],t[l]))return!1;return!0}function Vo(e,t,l,n,r,s){return Zl=s,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_.H=e===null||e.memoizedState===null?Uf:tu,Pn=!1,s=l(n,r),Pn=!1,Oa&&(s=lf(t,l,n,r)),tf(e),s}function tf(e){_.H=Mi;var t=Pe!==null&&Pe.next!==null;if(Zl=0,Ct=Pe=ze=null,Gr=!1,Ri=0,La=null,t)throw Error(u(300));e===null||jt||(e=e.dependencies,e!==null&&_r(e)&&(jt=!0))}function lf(e,t,l,n){ze=e;var r=0;do{if(Oa&&(La=null),Ri=0,Oa=!1,25<=r)throw Error(u(301));if(r+=1,Ct=Pe=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}_.H=Bf,s=t(l,n)}while(Oa);return s}function Og(){var e=_.H,t=e.useState()[0];return t=typeof t.then=="function"?zi(t):t,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(ze.flags|=1024),t}function Go(){var e=Ir!==0;return Ir=0,e}function Io(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function qo(e){if(Gr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Gr=!1}Zl=0,Ct=Pe=ze=null,Oa=!1,Ri=Ir=0,La=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?ze.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function St(){if(Pe===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=Ct===null?ze.memoizedState:Ct.next;if(t!==null)Ct=t,Pe=e;else{if(e===null)throw ze.alternate===null?Error(u(467)):Error(u(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},Ct===null?ze.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function qr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zi(e){var t=Ri;return Ri+=1,La===null&&(La=[]),e=Qd(La,e,t),t=ze,(Ct===null?t.memoizedState:Ct.next)===null&&(t=t.alternate,_.H=t===null||t.memoizedState===null?Uf:tu),e}function Yr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return zi(e);if(e.$$typeof===G)return Bt(e)}throw Error(u(438,String(e)))}function Yo(e){var t=null,l=ze.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=ze.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=qr(),ze.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=W;return t.index++,l}function Jl(e,t){return typeof t=="function"?t(e):t}function Xr(e){var t=St();return Xo(t,Pe,e)}function Xo(e,t,l){var n=e.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=l;var r=e.baseQueue,s=n.pending;if(s!==null){if(r!==null){var f=r.next;r.next=s.next,s.next=f}t.baseQueue=r=s,n.pending=null}if(s=e.baseState,r===null)e.memoizedState=s;else{t=r.next;var v=f=null,j=null,U=t,X=!1;do{var Z=U.lane&-536870913;if(Z!==U.lane?(Ve&Z)===Z:(Zl&Z)===Z){var V=U.revertLane;if(V===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),Z===Ra&&(X=!0);else if((Zl&V)===V){U=U.next,V===Ra&&(X=!0);continue}else Z={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},j===null?(v=j=Z,f=s):j=j.next=Z,ze.lanes|=V,Sn|=V;Z=U.action,Pn&&l(s,Z),s=U.hasEagerState?U.eagerState:l(s,Z)}else V={lane:Z,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},j===null?(v=j=V,f=s):j=j.next=V,ze.lanes|=Z,Sn|=Z;U=U.next}while(U!==null&&U!==t);if(j===null?f=s:j.next=v,!ll(s,e.memoizedState)&&(jt=!0,X&&(l=za,l!==null)))throw l;e.memoizedState=s,e.baseState=f,e.baseQueue=j,n.lastRenderedState=s}return r===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Qo(e){var t=St(),l=t.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=e;var n=l.dispatch,r=l.pending,s=t.memoizedState;if(r!==null){l.pending=null;var f=r=r.next;do s=e(s,f.action),f=f.next;while(f!==r);ll(s,t.memoizedState)||(jt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),l.lastRenderedState=s}return[s,n]}function nf(e,t,l){var n=ze,r=St(),s=Ie;if(s){if(l===void 0)throw Error(u(407));l=l()}else l=t();var f=!ll((Pe||r).memoizedState,l);if(f&&(r.memoizedState=l,jt=!0),r=r.queue,Jo(sf.bind(null,n,r,e),[e]),r.getSnapshot!==t||f||Ct!==null&&Ct.memoizedState.tag&1){if(n.flags|=2048,Ha(9,{destroy:void 0},rf.bind(null,n,r,l,t),null),it===null)throw Error(u(349));s||(Zl&127)!==0||af(n,t,l)}return l}function af(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ze.updateQueue,t===null?(t=qr(),ze.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function rf(e,t,l,n){t.value=l,t.getSnapshot=n,of(t)&&uf(e)}function sf(e,t,l){return l(function(){of(t)&&uf(e)})}function of(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!ll(e,l)}catch{return!0}}function uf(e){var t=Yn(e,2);t!==null&&tl(t,e,2)}function Ko(e){var t=Kt();if(typeof e=="function"){var l=e;if(e=l(),Pn){Qt(!0);try{l()}finally{Qt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jl,lastRenderedState:e},t}function cf(e,t,l,n){return e.baseState=l,Xo(e,Pe,typeof n=="function"?n:Jl)}function Lg(e,t,l,n,r){if(Zr(e))throw Error(u(485));if(e=t.action,e!==null){var s={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){s.listeners.push(f)}};_.T!==null?l(!0):s.isTransition=!1,n(s),l=t.pending,l===null?(s.next=t.pending=s,df(t,s)):(s.next=l.next,t.pending=l.next=s)}}function df(e,t){var l=t.action,n=t.payload,r=e.state;if(t.isTransition){var s=_.T,f={};_.T=f;try{var v=l(r,n),j=_.S;j!==null&&j(f,v),ff(e,t,v)}catch(U){Zo(e,t,U)}finally{s!==null&&f.types!==null&&(s.types=f.types),_.T=s}}else try{s=l(r,n),ff(e,t,s)}catch(U){Zo(e,t,U)}}function ff(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){mf(e,t,n)},function(n){return Zo(e,t,n)}):mf(e,t,l)}function mf(e,t,l){t.status="fulfilled",t.value=l,pf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,df(e,l)))}function Zo(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,pf(t),t=t.next;while(t!==n)}e.action=null}function pf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function hf(e,t){return t}function yf(e,t){if(Ie){var l=it.formState;if(l!==null){e:{var n=ze;if(Ie){if(st){t:{for(var r=st,s=Sl;r.nodeType!==8;){if(!s){r=null;break t}if(r=Tl(r.nextSibling),r===null){r=null;break t}}s=r.data,r=s==="F!"||s==="F"?r:null}if(r){st=Tl(r.nextSibling),n=r.data==="F!";break e}}fn(n)}n=!1}n&&(t=l[0])}}return l=Kt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hf,lastRenderedState:t},l.queue=n,l=Of.bind(null,ze,n),n.dispatch=l,n=Ko(!1),s=eu.bind(null,ze,!1,n.queue),n=Kt(),r={state:t,dispatch:null,action:e,pending:null},n.queue=r,l=Lg.bind(null,ze,r,s,l),r.dispatch=l,n.memoizedState=e,[t,l,!1]}function gf(e){var t=St();return vf(t,Pe,e)}function vf(e,t,l){if(t=Xo(e,t,hf)[0],e=Xr(Jl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=zi(t)}catch(f){throw f===_a?Or:f}else n=t;t=St();var r=t.queue,s=r.dispatch;return l!==t.memoizedState&&(ze.flags|=2048,Ha(9,{destroy:void 0},Hg.bind(null,r,l),null)),[n,s,e]}function Hg(e,t){e.action=t}function xf(e){var t=St(),l=Pe;if(l!==null)return vf(t,l,e);St(),t=t.memoizedState,l=St();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function Ha(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=ze.updateQueue,t===null&&(t=qr(),ze.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function bf(){return St().memoizedState}function Qr(e,t,l,n){var r=Kt();ze.flags|=e,r.memoizedState=Ha(1|t,{destroy:void 0},l,n===void 0?null:n)}function Kr(e,t,l,n){var r=St();n=n===void 0?null:n;var s=r.memoizedState.inst;Pe!==null&&n!==null&&Bo(n,Pe.memoizedState.deps)?r.memoizedState=Ha(t,s,l,n):(ze.flags|=e,r.memoizedState=Ha(1|t,s,l,n))}function Sf(e,t){Qr(8390656,8,e,t)}function Jo(e,t){Kr(2048,8,e,t)}function Ug(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=qr(),ze.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Ef(e){var t=St().memoizedState;return Ug({ref:t,nextImpl:e}),function(){if((Je&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Tf(e,t){return Kr(4,2,e,t)}function Cf(e,t){return Kr(4,4,e,t)}function jf(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 kf(e,t,l){l=l!=null?l.concat([e]):null,Kr(4,4,jf.bind(null,t,e),l)}function $o(){}function wf(e,t){var l=St();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Bo(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function Af(e,t){var l=St();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Bo(t,n[1]))return n[0];if(n=e(),Pn){Qt(!0);try{e()}finally{Qt(!1)}}return l.memoizedState=[n,t],n}function Wo(e,t,l){return l===void 0||(Zl&1073741824)!==0&&(Ve&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Nm(),ze.lanes|=e,Sn|=e,l)}function Nf(e,t,l,n){return ll(l,t)?l:Da.current!==null?(e=Wo(e,l,n),ll(e,t)||(jt=!0),e):(Zl&42)===0||(Zl&1073741824)!==0&&(Ve&261930)===0?(jt=!0,e.memoizedState=l):(e=Nm(),ze.lanes|=e,Sn|=e,t)}function Rf(e,t,l,n,r){var s=Y.p;Y.p=s!==0&&8>s?s:8;var f=_.T,v={};_.T=v,eu(e,!1,t,l);try{var j=r(),U=_.S;if(U!==null&&U(v,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var X=Mg(j,n);_i(e,t,X,ol(e))}else _i(e,t,n,ol(e))}catch(Z){_i(e,t,{then:function(){},status:"rejected",reason:Z},ol())}finally{Y.p=s,f!==null&&v.types!==null&&(f.types=v.types),_.T=f}}function Bg(){}function Fo(e,t,l,n){if(e.tag!==5)throw Error(u(476));var r=zf(e).queue;Rf(e,r,t,se,l===null?Bg:function(){return _f(e),l(n)})}function zf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jl,lastRenderedState:se},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _f(e){var t=zf(e);t.next===null&&(t=e.alternate.memoizedState),_i(e,t.next.queue,{},ol())}function Po(){return Bt(Ji)}function Mf(){return St().memoizedState}function Df(){return St().memoizedState}function Vg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=ol();e=hn(l);var n=yn(t,e,l);n!==null&&(tl(n,t,l),wi(n,t,l)),t={cache:Ao()},e.payload=t;return}t=t.return}}function Gg(e,t,l){var n=ol();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Zr(e)?Lf(t,l):(l=go(e,t,l,n),l!==null&&(tl(l,e,n),Hf(l,t,n)))}function Of(e,t,l){var n=ol();_i(e,t,l,n)}function _i(e,t,l,n){var r={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Zr(e))Lf(t,r);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var f=t.lastRenderedState,v=s(f,l);if(r.hasEagerState=!0,r.eagerState=v,ll(v,f))return Ar(e,t,r,0),it===null&&wr(),!1}catch{}finally{}if(l=go(e,t,r,n),l!==null)return tl(l,e,n),Hf(l,t,n),!0}return!1}function eu(e,t,l,n){if(n={lane:2,revertLane:_u(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Zr(e)){if(t)throw Error(u(479))}else t=go(e,l,n,2),t!==null&&tl(t,e,2)}function Zr(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function Lf(e,t){Oa=Gr=!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 n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Gc(e,l)}}var Mi={readContext:Bt,use:Yr,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};Mi.useEffectEvent=yt;var Uf={readContext:Bt,use:Yr,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Bt,useEffect:Sf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Qr(4194308,4,jf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Qr(4194308,4,e,t)},useInsertionEffect:function(e,t){Qr(4,2,e,t)},useMemo:function(e,t){var l=Kt();t=t===void 0?null:t;var n=e();if(Pn){Qt(!0);try{e()}finally{Qt(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=Kt();if(l!==void 0){var r=l(t);if(Pn){Qt(!0);try{l(t)}finally{Qt(!1)}}}else r=t;return n.memoizedState=n.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},n.queue=e,e=e.dispatch=Gg.bind(null,ze,e),[n.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,l=Of.bind(null,ze,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:$o,useDeferredValue:function(e,t){var l=Kt();return Wo(l,e,t)},useTransition:function(){var e=Ko(!1);return e=Rf.bind(null,ze,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=ze,r=Kt();if(Ie){if(l===void 0)throw Error(u(407));l=l()}else{if(l=t(),it===null)throw Error(u(349));(Ve&127)!==0||af(n,t,l)}r.memoizedState=l;var s={value:l,getSnapshot:t};return r.queue=s,Sf(sf.bind(null,n,s,e),[e]),n.flags|=2048,Ha(9,{destroy:void 0},rf.bind(null,n,s,l,t),null),l},useId:function(){var e=Kt(),t=it.identifierPrefix;if(Ie){var l=Dl,n=Ml;l=(n&~(1<<32-_t(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Ir++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Dg++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Po,useFormState:yf,useActionState:yf,useOptimistic:function(e){var t=Kt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=eu.bind(null,ze,!0,l),l.dispatch=t,[e,t]},useMemoCache:Yo,useCacheRefresh:function(){return Kt().memoizedState=Vg.bind(null,ze)},useEffectEvent:function(e){var t=Kt(),l={impl:e};return t.memoizedState=l,function(){if((Je&2)!==0)throw Error(u(440));return l.impl.apply(void 0,arguments)}}},tu={readContext:Bt,use:Yr,useCallback:wf,useContext:Bt,useEffect:Jo,useImperativeHandle:kf,useInsertionEffect:Tf,useLayoutEffect:Cf,useMemo:Af,useReducer:Xr,useRef:bf,useState:function(){return Xr(Jl)},useDebugValue:$o,useDeferredValue:function(e,t){var l=St();return Nf(l,Pe.memoizedState,e,t)},useTransition:function(){var e=Xr(Jl)[0],t=St().memoizedState;return[typeof e=="boolean"?e:zi(e),t]},useSyncExternalStore:nf,useId:Mf,useHostTransitionStatus:Po,useFormState:gf,useActionState:gf,useOptimistic:function(e,t){var l=St();return cf(l,Pe,e,t)},useMemoCache:Yo,useCacheRefresh:Df};tu.useEffectEvent=Ef;var Bf={readContext:Bt,use:Yr,useCallback:wf,useContext:Bt,useEffect:Jo,useImperativeHandle:kf,useInsertionEffect:Tf,useLayoutEffect:Cf,useMemo:Af,useReducer:Qo,useRef:bf,useState:function(){return Qo(Jl)},useDebugValue:$o,useDeferredValue:function(e,t){var l=St();return Pe===null?Wo(l,e,t):Nf(l,Pe.memoizedState,e,t)},useTransition:function(){var e=Qo(Jl)[0],t=St().memoizedState;return[typeof e=="boolean"?e:zi(e),t]},useSyncExternalStore:nf,useId:Mf,useHostTransitionStatus:Po,useFormState:xf,useActionState:xf,useOptimistic:function(e,t){var l=St();return Pe!==null?cf(l,Pe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Yo,useCacheRefresh:Df};Bf.useEffectEvent=Ef;function lu(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:b({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var nu={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=ol(),r=hn(n);r.payload=t,l!=null&&(r.callback=l),t=yn(e,r,n),t!==null&&(tl(t,e,n),wi(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=ol(),r=hn(n);r.tag=1,r.payload=t,l!=null&&(r.callback=l),t=yn(e,r,n),t!==null&&(tl(t,e,n),wi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=ol(),n=hn(l);n.tag=2,t!=null&&(n.callback=t),t=yn(e,n,l),t!==null&&(tl(t,e,l),wi(t,e,l))}};function Vf(e,t,l,n,r,s,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,f):t.prototype&&t.prototype.isPureReactComponent?!xi(l,n)||!xi(r,s):!0}function Gf(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&nu.enqueueReplaceState(t,t.state,null)}function ea(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=b({},l));for(var r in e)l[r]===void 0&&(l[r]=e[r])}return l}function If(e){kr(e)}function qf(e){console.error(e)}function Yf(e){kr(e)}function Jr(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Xf(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function au(e,t,l){return l=hn(l),l.tag=3,l.payload={element:null},l.callback=function(){Jr(e,t)},l}function Qf(e){return e=hn(e),e.tag=3,e}function Kf(e,t,l,n){var r=l.type.getDerivedStateFromError;if(typeof r=="function"){var s=n.value;e.payload=function(){return r(s)},e.callback=function(){Xf(t,l,n)}}var f=l.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Xf(t,l,n),typeof r!="function"&&(En===null?En=new Set([this]):En.add(this));var v=n.stack;this.componentDidCatch(n.value,{componentStack:v!==null?v:""})})}function Ig(e,t,l,n,r){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&Na(t,l,r,!0),l=al.current,l!==null){switch(l.tag){case 31:case 13:return El===null?ss():l.alternate===null&&gt===0&&(gt=3),l.flags&=-257,l.flags|=65536,l.lanes=r,n===Lr?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),Nu(e,n,r)),!1;case 22:return l.flags|=65536,n===Lr?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),Nu(e,n,r)),!1}throw Error(u(435,l.tag))}return Nu(e,n,r),ss(),!1}if(Ie)return t=al.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,n!==To&&(e=Error(u(422),{cause:n}),Ei(vl(e,l)))):(n!==To&&(t=Error(u(423),{cause:n}),Ei(vl(t,l))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,n=vl(n,l),r=au(e.stateNode,n,r),Do(e,r),gt!==4&&(gt=2)),!1;var s=Error(u(520),{cause:n});if(s=vl(s,l),Gi===null?Gi=[s]:Gi.push(s),gt!==4&&(gt=2),t===null)return!0;n=vl(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=r&-r,l.lanes|=e,e=au(l.stateNode,n,e),Do(l,e),!1;case 1:if(t=l.type,s=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(En===null||!En.has(s))))return l.flags|=65536,r&=-r,l.lanes|=r,r=Qf(r),Kf(r,e,l,n),Do(l,r),!1}l=l.return}while(l!==null);return!1}var iu=Error(u(461)),jt=!1;function Vt(e,t,l,n){t.child=e===null?$d(t,null,l,n):Fn(t,e.child,l,n)}function Zf(e,t,l,n,r){l=l.render;var s=t.ref;if("ref"in n){var f={};for(var v in n)v!=="ref"&&(f[v]=n[v])}else f=n;return Zn(t),n=Vo(e,t,l,f,s,r),v=Go(),e!==null&&!jt?(Io(e,t,r),$l(e,t,r)):(Ie&&v&&So(t),t.flags|=1,Vt(e,t,n,r),t.child)}function Jf(e,t,l,n,r){if(e===null){var s=l.type;return typeof s=="function"&&!vo(s)&&s.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=s,$f(e,t,s,n,r)):(e=Rr(l.type,null,n,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!mu(e,r)){var f=s.memoizedProps;if(l=l.compare,l=l!==null?l:xi,l(f,n)&&e.ref===t.ref)return $l(e,t,r)}return t.flags|=1,e=Yl(s,n),e.ref=t.ref,e.return=t,t.child=e}function $f(e,t,l,n,r){if(e!==null){var s=e.memoizedProps;if(xi(s,n)&&e.ref===t.ref)if(jt=!1,t.pendingProps=n=s,mu(e,r))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,$l(e,t,r)}return ru(e,t,l,n,r)}function Wf(e,t,l,n){var r=n.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|l:l,e!==null){for(n=t.child=e.child,r=0;n!==null;)r=r|n.lanes|n.childLanes,n=n.sibling;n=r&~s}else n=0,t.child=null;return Ff(e,t,s,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Dr(t,s!==null?s.cachePool:null),s!==null?Pd(t,s):Lo(),ef(t);else return n=t.lanes=536870912,Ff(e,t,s!==null?s.baseLanes|l:l,l,n)}else s!==null?(Dr(t,s.cachePool),Pd(t,s),vn(),t.memoizedState=null):(e!==null&&Dr(t,null),Lo(),vn());return Vt(e,t,r,l),t.child}function Di(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ff(e,t,l,n,r){var s=Ro();return s=s===null?null:{parent:Tt._currentValue,pool:s},t.memoizedState={baseLanes:l,cachePool:s},e!==null&&Dr(t,null),Lo(),ef(t),e!==null&&Na(e,t,n,!0),t.childLanes=r,null}function $r(e,t){return t=Fr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Pf(e,t,l){return Fn(t,e.child,null,l),e=$r(t,t.pendingProps),e.flags|=2,il(t),t.memoizedState=null,e}function qg(e,t,l){var n=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ie){if(n.mode==="hidden")return e=$r(t,n),t.lanes=536870912,Di(null,e);if(Uo(t),(e=st)?(e=dp(e,Sl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:cn!==null?{id:Ml,overflow:Dl}:null,retryLane:536870912,hydrationErrors:null},l=Od(e),l.return=t,t.child=l,Ut=t,st=null)):e=null,e===null)throw fn(t);return t.lanes=536870912,null}return $r(t,n)}var s=e.memoizedState;if(s!==null){var f=s.dehydrated;if(Uo(t),r)if(t.flags&256)t.flags&=-257,t=Pf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(jt||Na(e,t,l,!1),r=(l&e.childLanes)!==0,jt||r){if(n=it,n!==null&&(f=Ic(n,l),f!==0&&f!==s.retryLane))throw s.retryLane=f,Yn(e,f),tl(n,e,f),iu;ss(),t=Pf(e,t,l)}else e=s.treeContext,st=Tl(f.nextSibling),Ut=t,Ie=!0,dn=null,Sl=!1,e!==null&&Ud(t,e),t=$r(t,n),t.flags|=4096;return t}return e=Yl(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wr(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(u(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function ru(e,t,l,n,r){return Zn(t),l=Vo(e,t,l,n,void 0,r),n=Go(),e!==null&&!jt?(Io(e,t,r),$l(e,t,r)):(Ie&&n&&So(t),t.flags|=1,Vt(e,t,l,r),t.child)}function em(e,t,l,n,r,s){return Zn(t),t.updateQueue=null,l=lf(t,n,l,r),tf(e),n=Go(),e!==null&&!jt?(Io(e,t,s),$l(e,t,s)):(Ie&&n&&So(t),t.flags|=1,Vt(e,t,l,s),t.child)}function tm(e,t,l,n,r){if(Zn(t),t.stateNode===null){var s=ja,f=l.contextType;typeof f=="object"&&f!==null&&(s=Bt(f)),s=new l(n,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=nu,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=n,s.state=t.memoizedState,s.refs={},_o(t),f=l.contextType,s.context=typeof f=="object"&&f!==null?Bt(f):ja,s.state=t.memoizedState,f=l.getDerivedStateFromProps,typeof f=="function"&&(lu(t,l,f,n),s.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(f=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),f!==s.state&&nu.enqueueReplaceState(s,s.state,null),Ni(t,n,s,r),Ai(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){s=t.stateNode;var v=t.memoizedProps,j=ea(l,v);s.props=j;var U=s.context,X=l.contextType;f=ja,typeof X=="object"&&X!==null&&(f=Bt(X));var Z=l.getDerivedStateFromProps;X=typeof Z=="function"||typeof s.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,X||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(v||U!==f)&&Gf(t,s,n,f),pn=!1;var V=t.memoizedState;s.state=V,Ni(t,n,s,r),Ai(),U=t.memoizedState,v||V!==U||pn?(typeof Z=="function"&&(lu(t,l,Z,n),U=t.memoizedState),(j=pn||Vf(t,l,j,n,V,U,f))?(X||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=U),s.props=n,s.state=U,s.context=f,n=j):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,Mo(e,t),f=t.memoizedProps,X=ea(l,f),s.props=X,Z=t.pendingProps,V=s.context,U=l.contextType,j=ja,typeof U=="object"&&U!==null&&(j=Bt(U)),v=l.getDerivedStateFromProps,(U=typeof v=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(f!==Z||V!==j)&&Gf(t,s,n,j),pn=!1,V=t.memoizedState,s.state=V,Ni(t,n,s,r),Ai();var I=t.memoizedState;f!==Z||V!==I||pn||e!==null&&e.dependencies!==null&&_r(e.dependencies)?(typeof v=="function"&&(lu(t,l,v,n),I=t.memoizedState),(X=pn||Vf(t,l,X,n,V,I,j)||e!==null&&e.dependencies!==null&&_r(e.dependencies))?(U||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,I,j),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,I,j)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||f===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=I),s.props=n,s.state=I,s.context=j,n=X):(typeof s.componentDidUpdate!="function"||f===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),n=!1)}return s=n,Wr(e,t),n=(t.flags&128)!==0,s||n?(s=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&n?(t.child=Fn(t,e.child,null,r),t.child=Fn(t,null,l,r)):Vt(e,t,l,r),t.memoizedState=s.state,e=t.child):e=$l(e,t,r),e}function lm(e,t,l,n){return Qn(),t.flags|=256,Vt(e,t,l,n),t.child}var su={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ou(e){return{baseLanes:e,cachePool:Yd()}}function uu(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=sl),e}function nm(e,t,l){var n=t.pendingProps,r=!1,s=(t.flags&128)!==0,f;if((f=s)||(f=e!==null&&e.memoizedState===null?!1:(bt.current&2)!==0),f&&(r=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ie){if(r?gn(t):vn(),(e=st)?(e=dp(e,Sl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:cn!==null?{id:Ml,overflow:Dl}:null,retryLane:536870912,hydrationErrors:null},l=Od(e),l.return=t,t.child=l,Ut=t,st=null)):e=null,e===null)throw fn(t);return Xu(e)?t.lanes=32:t.lanes=536870912,null}var v=n.children;return n=n.fallback,r?(vn(),r=t.mode,v=Fr({mode:"hidden",children:v},r),n=Xn(n,r,l,null),v.return=t,n.return=t,v.sibling=n,t.child=v,n=t.child,n.memoizedState=ou(l),n.childLanes=uu(e,f,l),t.memoizedState=su,Di(null,n)):(gn(t),cu(t,v))}var j=e.memoizedState;if(j!==null&&(v=j.dehydrated,v!==null)){if(s)t.flags&256?(gn(t),t.flags&=-257,t=du(e,t,l)):t.memoizedState!==null?(vn(),t.child=e.child,t.flags|=128,t=null):(vn(),v=n.fallback,r=t.mode,n=Fr({mode:"visible",children:n.children},r),v=Xn(v,r,l,null),v.flags|=2,n.return=t,v.return=t,n.sibling=v,t.child=n,Fn(t,e.child,null,l),n=t.child,n.memoizedState=ou(l),n.childLanes=uu(e,f,l),t.memoizedState=su,t=Di(null,n));else if(gn(t),Xu(v)){if(f=v.nextSibling&&v.nextSibling.dataset,f)var U=f.dgst;f=U,n=Error(u(419)),n.stack="",n.digest=f,Ei({value:n,source:null,stack:null}),t=du(e,t,l)}else if(jt||Na(e,t,l,!1),f=(l&e.childLanes)!==0,jt||f){if(f=it,f!==null&&(n=Ic(f,l),n!==0&&n!==j.retryLane))throw j.retryLane=n,Yn(e,n),tl(f,e,n),iu;Yu(v)||ss(),t=du(e,t,l)}else Yu(v)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,st=Tl(v.nextSibling),Ut=t,Ie=!0,dn=null,Sl=!1,e!==null&&Ud(t,e),t=cu(t,n.children),t.flags|=4096);return t}return r?(vn(),v=n.fallback,r=t.mode,j=e.child,U=j.sibling,n=Yl(j,{mode:"hidden",children:n.children}),n.subtreeFlags=j.subtreeFlags&65011712,U!==null?v=Yl(U,v):(v=Xn(v,r,l,null),v.flags|=2),v.return=t,n.return=t,n.sibling=v,t.child=n,Di(null,n),n=t.child,v=e.child.memoizedState,v===null?v=ou(l):(r=v.cachePool,r!==null?(j=Tt._currentValue,r=r.parent!==j?{parent:j,pool:j}:r):r=Yd(),v={baseLanes:v.baseLanes|l,cachePool:r}),n.memoizedState=v,n.childLanes=uu(e,f,l),t.memoizedState=su,Di(e.child,n)):(gn(t),l=e.child,e=l.sibling,l=Yl(l,{mode:"visible",children:n.children}),l.return=t,l.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=l,t.memoizedState=null,l)}function cu(e,t){return t=Fr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Fr(e,t){return e=nl(22,e,null,t),e.lanes=0,e}function du(e,t,l){return Fn(t,e.child,null,l),e=cu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function am(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ko(e.return,t,l)}function fu(e,t,l,n,r,s){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:r,treeForkCount:s}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=n,f.tail=l,f.tailMode=r,f.treeForkCount=s)}function im(e,t,l){var n=t.pendingProps,r=n.revealOrder,s=n.tail;n=n.children;var f=bt.current,v=(f&2)!==0;if(v?(f=f&1|2,t.flags|=128):f&=1,te(bt,f),Vt(e,t,n,l),n=Ie?Si:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&am(e,l,t);else if(e.tag===19)am(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(r){case"forwards":for(l=t.child,r=null;l!==null;)e=l.alternate,e!==null&&Vr(e)===null&&(r=l),l=l.sibling;l=r,l===null?(r=t.child,t.child=null):(r=l.sibling,l.sibling=null),fu(t,!1,r,l,s,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Vr(e)===null){t.child=r;break}e=r.sibling,r.sibling=l,l=r,r=e}fu(t,!0,l,null,s,n);break;case"together":fu(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function $l(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Sn|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Na(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,l=Yl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Yl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function mu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_r(e)))}function Yg(e,t,l){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),mn(t,Tt,e.memoizedState.cache),Qn();break;case 27:case 5:Xe(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:mn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Uo(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(gn(t),t.flags|=128,null):(l&t.child.childLanes)!==0?nm(e,t,l):(gn(t),e=$l(e,t,l),e!==null?e.sibling:null);gn(t);break;case 19:var r=(e.flags&128)!==0;if(n=(l&t.childLanes)!==0,n||(Na(e,t,l,!1),n=(l&t.childLanes)!==0),r){if(n)return im(e,t,l);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),te(bt,bt.current),n)break;return null;case 22:return t.lanes=0,Wf(e,t,l,t.pendingProps);case 24:mn(t,Tt,e.memoizedState.cache)}return $l(e,t,l)}function rm(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!mu(e,l)&&(t.flags&128)===0)return jt=!1,Yg(e,t,l);jt=(e.flags&131072)!==0}else jt=!1,Ie&&(t.flags&1048576)!==0&&Hd(t,Si,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=$n(t.elementType),t.type=e,typeof e=="function")vo(e)?(n=ea(e,n),t.tag=1,t=tm(null,t,e,n,l)):(t.tag=0,t=ru(null,t,e,n,l));else{if(e!=null){var r=e.$$typeof;if(r===$){t.tag=11,t=Zf(null,t,e,n,l);break e}else if(r===T){t.tag=14,t=Jf(null,t,e,n,l);break e}}throw t=P(e)||e,Error(u(306,t,""))}}return t;case 0:return ru(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,r=ea(n,t.pendingProps),tm(e,t,n,r,l);case 3:e:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(u(387));n=t.pendingProps;var s=t.memoizedState;r=s.element,Mo(e,t),Ni(t,n,null,l);var f=t.memoizedState;if(n=f.cache,mn(t,Tt,n),n!==s.cache&&wo(t,[Tt],l,!0),Ai(),n=f.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=lm(e,t,n,l);break e}else if(n!==r){r=vl(Error(u(424)),t),Ei(r),t=lm(e,t,n,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(st=Tl(e.firstChild),Ut=t,Ie=!0,dn=null,Sl=!0,l=$d(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Qn(),n===r){t=$l(e,t,l);break e}Vt(e,t,n,l)}t=t.child}return t;case 26:return Wr(e,t),e===null?(l=gp(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ie||(l=t.type,e=t.pendingProps,n=ps(be.current).createElement(l),n[Ht]=t,n[Jt]=e,Gt(n,l,e),Mt(n),t.stateNode=n):t.memoizedState=gp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xe(t),e===null&&Ie&&(n=t.stateNode=pp(t.type,t.pendingProps,be.current),Ut=t,Sl=!0,r=st,kn(t.type)?(Qu=r,st=Tl(n.firstChild)):st=r),Vt(e,t,t.pendingProps.children,l),Wr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ie&&((r=n=st)&&(n=bv(n,t.type,t.pendingProps,Sl),n!==null?(t.stateNode=n,Ut=t,st=Tl(n.firstChild),Sl=!1,r=!0):r=!1),r||fn(t)),Xe(t),r=t.type,s=t.pendingProps,f=e!==null?e.memoizedProps:null,n=s.children,Gu(r,s)?n=null:f!==null&&Gu(r,f)&&(t.flags|=32),t.memoizedState!==null&&(r=Vo(e,t,Og,null,null,l),Ji._currentValue=r),Wr(e,t),Vt(e,t,n,l),t.child;case 6:return e===null&&Ie&&((e=l=st)&&(l=Sv(l,t.pendingProps,Sl),l!==null?(t.stateNode=l,Ut=t,st=null,e=!0):e=!1),e||fn(t)),null;case 13:return nm(e,t,l);case 4:return le(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Fn(t,null,n,l):Vt(e,t,n,l),t.child;case 11:return Zf(e,t,t.type,t.pendingProps,l);case 7:return Vt(e,t,t.pendingProps,l),t.child;case 8:return Vt(e,t,t.pendingProps.children,l),t.child;case 12:return Vt(e,t,t.pendingProps.children,l),t.child;case 10:return n=t.pendingProps,mn(t,t.type,n.value),Vt(e,t,n.children,l),t.child;case 9:return r=t.type._context,n=t.pendingProps.children,Zn(t),r=Bt(r),n=n(r),t.flags|=1,Vt(e,t,n,l),t.child;case 14:return Jf(e,t,t.type,t.pendingProps,l);case 15:return $f(e,t,t.type,t.pendingProps,l);case 19:return im(e,t,l);case 31:return qg(e,t,l);case 22:return Wf(e,t,l,t.pendingProps);case 24:return Zn(t),n=Bt(Tt),e===null?(r=Ro(),r===null&&(r=it,s=Ao(),r.pooledCache=s,s.refCount++,s!==null&&(r.pooledCacheLanes|=l),r=s),t.memoizedState={parent:n,cache:r},_o(t),mn(t,Tt,r)):((e.lanes&l)!==0&&(Mo(e,t),Ni(t,null,null,l),Ai()),r=e.memoizedState,s=t.memoizedState,r.parent!==n?(r={parent:n,cache:n},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),mn(t,Tt,n)):(n=s.cache,mn(t,Tt,n),n!==r.cache&&wo(t,[Tt],l,!0))),Vt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Wl(e){e.flags|=4}function pu(e,t,l,n,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Mm())e.flags|=8192;else throw Wn=Lr,zo}else e.flags&=-16777217}function sm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ep(t))if(Mm())e.flags|=8192;else throw Wn=Lr,zo}function Pr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Bc():536870912,e.lanes|=t,Ga|=t)}function Oi(e,t){if(!Ie)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 n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ot(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var r=e.child;r!==null;)l|=r.lanes|r.childLanes,n|=r.subtreeFlags&65011712,n|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)l|=r.lanes|r.childLanes,n|=r.subtreeFlags,n|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function Xg(e,t,l){var n=t.pendingProps;switch(Eo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(t),null;case 1:return ot(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Kl(Tt),xe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Aa(t)?Wl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Co())),ot(t),null;case 26:var r=t.type,s=t.memoizedState;return e===null?(Wl(t),s!==null?(ot(t),sm(t,s)):(ot(t),pu(t,r,null,n,l))):s?s!==e.memoizedState?(Wl(t),ot(t),sm(t,s)):(ot(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Wl(t),ot(t),pu(t,r,e,n,l)),null;case 27:if(Be(t),l=be.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Wl(t);else{if(!n){if(t.stateNode===null)throw Error(u(166));return ot(t),null}e=oe.current,Aa(t)?Bd(t):(e=pp(r,n,l),t.stateNode=e,Wl(t))}return ot(t),null;case 5:if(Be(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Wl(t);else{if(!n){if(t.stateNode===null)throw Error(u(166));return ot(t),null}if(s=oe.current,Aa(t))Bd(t);else{var f=ps(be.current);switch(s){case 1:s=f.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:s=f.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":s=f.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":s=f.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":s=f.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof n.is=="string"?f.createElement("select",{is:n.is}):f.createElement("select"),n.multiple?s.multiple=!0:n.size&&(s.size=n.size);break;default:s=typeof n.is=="string"?f.createElement(r,{is:n.is}):f.createElement(r)}}s[Ht]=t,s[Jt]=n;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)s.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=s;e:switch(Gt(s,r,n),r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Wl(t)}}return ot(t),pu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Wl(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(u(166));if(e=be.current,Aa(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,r=Ut,r!==null)switch(r.tag){case 27:case 5:n=r.memoizedProps}e[Ht]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||np(e.nodeValue,l)),e||fn(t,!0)}else e=ps(e).createTextNode(n),e[Ht]=t,t.stateNode=e}return ot(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=Aa(t),l!==null){if(e===null){if(!n)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Ht]=t}else Qn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),e=!1}else l=Co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(il(t),t):(il(t),null);if((t.flags&128)!==0)throw Error(u(558))}return ot(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Aa(t),n!==null&&n.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[Ht]=t}else Qn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ot(t),r=!1}else r=Co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(il(t),t):(il(t),null)}return il(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,r=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(r=n.alternate.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==r&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Pr(t,t.updateQueue),ot(t),null);case 4:return xe(),e===null&&Lu(t.stateNode.containerInfo),ot(t),null;case 10:return Kl(t.type),ot(t),null;case 19:if(q(bt),n=t.memoizedState,n===null)return ot(t),null;if(r=(t.flags&128)!==0,s=n.rendering,s===null)if(r)Oi(n,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Vr(e),s!==null){for(t.flags|=128,Oi(n,!1),e=s.updateQueue,t.updateQueue=e,Pr(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Dd(l,e),l=l.sibling;return te(bt,bt.current&1|2),Ie&&Xl(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&at()>as&&(t.flags|=128,r=!0,Oi(n,!1),t.lanes=4194304)}else{if(!r)if(e=Vr(s),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Pr(t,e),Oi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!s.alternate&&!Ie)return ot(t),null}else 2*at()-n.renderingStartTime>as&&l!==536870912&&(t.flags|=128,r=!0,Oi(n,!1),t.lanes=4194304);n.isBackwards?(s.sibling=t.child,t.child=s):(e=n.last,e!==null?e.sibling=s:t.child=s,n.last=s)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=at(),e.sibling=null,l=bt.current,te(bt,r?l&1|2:l&1),Ie&&Xl(t,n.treeForkCount),e):(ot(t),null);case 22:case 23:return il(t),Ho(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(ot(t),t.subtreeFlags&6&&(t.flags|=8192)):ot(t),l=t.updateQueue,l!==null&&Pr(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&q(Jn),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Kl(Tt),ot(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Qg(e,t){switch(Eo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kl(Tt),xe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Be(t),null;case 31:if(t.memoizedState!==null){if(il(t),t.alternate===null)throw Error(u(340));Qn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(il(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Qn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(bt),null;case 4:return xe(),null;case 10:return Kl(t.type),null;case 22:case 23:return il(t),Ho(),e!==null&&q(Jn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Kl(Tt),null;case 25:return null;default:return null}}function om(e,t){switch(Eo(t),t.tag){case 3:Kl(Tt),xe();break;case 26:case 27:case 5:Be(t);break;case 4:xe();break;case 31:t.memoizedState!==null&&il(t);break;case 13:il(t);break;case 19:q(bt);break;case 10:Kl(t.type);break;case 22:case 23:il(t),Ho(),e!==null&&q(Jn);break;case 24:Kl(Tt)}}function Li(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var r=n.next;l=r;do{if((l.tag&e)===e){n=void 0;var s=l.create,f=l.inst;n=s(),f.destroy=n}l=l.next}while(l!==r)}}catch(v){Fe(t,t.return,v)}}function xn(e,t,l){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var s=r.next;n=s;do{if((n.tag&e)===e){var f=n.inst,v=f.destroy;if(v!==void 0){f.destroy=void 0,r=t;var j=l,U=v;try{U()}catch(X){Fe(r,j,X)}}}n=n.next}while(n!==s)}}catch(X){Fe(t,t.return,X)}}function um(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Fd(t,l)}catch(n){Fe(e,e.return,n)}}}function cm(e,t,l){l.props=ea(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){Fe(e,t,n)}}function Hi(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(r){Fe(e,t,r)}}function Ol(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(r){Fe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(r){Fe(e,t,r)}else l.current=null}function dm(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(r){Fe(e,e.return,r)}}function hu(e,t,l){try{var n=e.stateNode;pv(n,e.type,l,t),n[Jt]=t}catch(r){Fe(e,e.return,r)}}function fm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&kn(e.type)||e.tag===4}function yu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fm(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&&kn(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 gu(e,t,l){var n=e.tag;if(n===5||n===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=Il));else if(n!==4&&(n===27&&kn(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(gu(e,t,l),e=e.sibling;e!==null;)gu(e,t,l),e=e.sibling}function es(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(n!==4&&(n===27&&kn(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(es(e,t,l),e=e.sibling;e!==null;)es(e,t,l),e=e.sibling}function mm(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Gt(t,n,l),t[Ht]=e,t[Jt]=l}catch(s){Fe(e,e.return,s)}}var Fl=!1,kt=!1,vu=!1,pm=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function Kg(e,t){if(e=e.containerInfo,Bu=Ss,e=jd(e),co(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var r=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{l.nodeType,s.nodeType}catch{l=null;break e}var f=0,v=-1,j=-1,U=0,X=0,Z=e,V=null;t:for(;;){for(var I;Z!==l||r!==0&&Z.nodeType!==3||(v=f+r),Z!==s||n!==0&&Z.nodeType!==3||(j=f+n),Z.nodeType===3&&(f+=Z.nodeValue.length),(I=Z.firstChild)!==null;)V=Z,Z=I;for(;;){if(Z===e)break t;if(V===l&&++U===r&&(v=f),V===s&&++X===n&&(j=f),(I=Z.nextSibling)!==null)break;Z=V,V=Z.parentNode}Z=I}l=v===-1||j===-1?null:{start:v,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(Vu={focusedElem:e,selectionRange:l},Ss=!1,Dt=t;Dt!==null;)if(t=Dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Dt=e;else for(;Dt!==null;){switch(t=Dt,s=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++)r=e[l],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,l=t,r=s.memoizedProps,s=s.memoizedState,n=l.stateNode;try{var pe=ea(l.type,r);e=n.getSnapshotBeforeUpdate(pe,s),n.__reactInternalSnapshotBeforeUpdate=e}catch(Te){Fe(l,l.return,Te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)qu(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":qu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,Dt=e;break}Dt=t.return}}function hm(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:en(e,l),n&4&&Li(5,l);break;case 1:if(en(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(f){Fe(l,l.return,f)}else{var r=ea(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Fe(l,l.return,f)}}n&64&&um(l),n&512&&Hi(l,l.return);break;case 3:if(en(e,l),n&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{Fd(e,t)}catch(f){Fe(l,l.return,f)}}break;case 27:t===null&&n&4&&mm(l);case 26:case 5:en(e,l),t===null&&n&4&&dm(l),n&512&&Hi(l,l.return);break;case 12:en(e,l);break;case 31:en(e,l),n&4&&vm(e,l);break;case 13:en(e,l),n&4&&xm(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=lv.bind(null,l),Ev(e,l))));break;case 22:if(n=l.memoizedState!==null||Fl,!n){t=t!==null&&t.memoizedState!==null||kt,r=Fl;var s=kt;Fl=n,(kt=t)&&!s?tn(e,l,(l.subtreeFlags&8772)!==0):en(e,l),Fl=r,kt=s}break;case 30:break;default:en(e,l)}}function ym(e){var t=e.alternate;t!==null&&(e.alternate=null,ym(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ks(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 ft=null,Wt=!1;function Pl(e,t,l){for(l=l.child;l!==null;)gm(e,t,l),l=l.sibling}function gm(e,t,l){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(Bn,l)}catch{}switch(l.tag){case 26:kt||Ol(l,t),Pl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:kt||Ol(l,t);var n=ft,r=Wt;kn(l.type)&&(ft=l.stateNode,Wt=!1),Pl(e,t,l),Qi(l.stateNode),ft=n,Wt=r;break;case 5:kt||Ol(l,t);case 6:if(n=ft,r=Wt,ft=null,Pl(e,t,l),ft=n,Wt=r,ft!==null)if(Wt)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(l.stateNode)}catch(s){Fe(l,t,s)}else try{ft.removeChild(l.stateNode)}catch(s){Fe(l,t,s)}break;case 18:ft!==null&&(Wt?(e=ft,up(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Ja(e)):up(ft,l.stateNode));break;case 4:n=ft,r=Wt,ft=l.stateNode.containerInfo,Wt=!0,Pl(e,t,l),ft=n,Wt=r;break;case 0:case 11:case 14:case 15:xn(2,l,t),kt||xn(4,l,t),Pl(e,t,l);break;case 1:kt||(Ol(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&cm(l,t,n)),Pl(e,t,l);break;case 21:Pl(e,t,l);break;case 22:kt=(n=kt)||l.memoizedState!==null,Pl(e,t,l),kt=n;break;default:Pl(e,t,l)}}function vm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ja(e)}catch(l){Fe(t,t.return,l)}}}function xm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ja(e)}catch(l){Fe(t,t.return,l)}}function Zg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pm),t;default:throw Error(u(435,e.tag))}}function ts(e,t){var l=Zg(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var r=nv.bind(null,e,n);n.then(r,r)}})}function Ft(e,t){var l=t.deletions;if(l!==null)for(var n=0;n<l.length;n++){var r=l[n],s=e,f=t,v=f;e:for(;v!==null;){switch(v.tag){case 27:if(kn(v.type)){ft=v.stateNode,Wt=!1;break e}break;case 5:ft=v.stateNode,Wt=!1;break e;case 3:case 4:ft=v.stateNode.containerInfo,Wt=!0;break e}v=v.return}if(ft===null)throw Error(u(160));gm(s,f,r),ft=null,Wt=!1,s=r.alternate,s!==null&&(s.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bm(t,e),t=t.sibling}var Nl=null;function bm(e,t){var l=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ft(t,e),Pt(e),n&4&&(xn(3,e,e.return),Li(3,e),xn(5,e,e.return));break;case 1:Ft(t,e),Pt(e),n&512&&(kt||l===null||Ol(l,l.return)),n&64&&Fl&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var r=Nl;if(Ft(t,e),Pt(e),n&512&&(kt||l===null||Ol(l,l.return)),n&4){var s=l!==null?l.memoizedState:null;if(n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null){e:{n=e.type,l=e.memoizedProps,r=r.ownerDocument||r;t:switch(n){case"title":s=r.getElementsByTagName("title")[0],(!s||s[ci]||s[Ht]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(n),r.head.insertBefore(s,r.querySelector("head > title"))),Gt(s,n,l),s[Ht]=e,Mt(s),n=s;break e;case"link":var f=bp("link","href",r).get(n+(l.href||""));if(f){for(var v=0;v<f.length;v++)if(s=f[v],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){f.splice(v,1);break t}}s=r.createElement(n),Gt(s,n,l),r.head.appendChild(s);break;case"meta":if(f=bp("meta","content",r).get(n+(l.content||""))){for(v=0;v<f.length;v++)if(s=f[v],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){f.splice(v,1);break t}}s=r.createElement(n),Gt(s,n,l),r.head.appendChild(s);break;default:throw Error(u(468,n))}s[Ht]=e,Mt(s),n=s}e.stateNode=n}else Sp(r,e.type,e.stateNode);else e.stateNode=xp(r,n,e.memoizedProps);else s!==n?(s===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):s.count--,n===null?Sp(r,e.type,e.stateNode):xp(r,n,e.memoizedProps)):n===null&&e.stateNode!==null&&hu(e,e.memoizedProps,l.memoizedProps)}break;case 27:Ft(t,e),Pt(e),n&512&&(kt||l===null||Ol(l,l.return)),l!==null&&n&4&&hu(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Ft(t,e),Pt(e),n&512&&(kt||l===null||Ol(l,l.return)),e.flags&32){r=e.stateNode;try{va(r,"")}catch(pe){Fe(e,e.return,pe)}}n&4&&e.stateNode!=null&&(r=e.memoizedProps,hu(e,r,l!==null?l.memoizedProps:r)),n&1024&&(vu=!0);break;case 6:if(Ft(t,e),Pt(e),n&4){if(e.stateNode===null)throw Error(u(162));n=e.memoizedProps,l=e.stateNode;try{l.nodeValue=n}catch(pe){Fe(e,e.return,pe)}}break;case 3:if(gs=null,r=Nl,Nl=hs(t.containerInfo),Ft(t,e),Nl=r,Pt(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{Ja(t.containerInfo)}catch(pe){Fe(e,e.return,pe)}vu&&(vu=!1,Sm(e));break;case 4:n=Nl,Nl=hs(e.stateNode.containerInfo),Ft(t,e),Pt(e),Nl=n;break;case 12:Ft(t,e),Pt(e);break;case 31:Ft(t,e),Pt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ts(e,n)));break;case 13:Ft(t,e),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ns=at()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ts(e,n)));break;case 22:r=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,U=Fl,X=kt;if(Fl=U||r,kt=X||j,Ft(t,e),kt=X,Fl=U,Pt(e),n&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(l===null||j||Fl||kt||ta(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){j=l=t;try{if(s=j.stateNode,r)f=s.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{v=j.stateNode;var Z=j.memoizedProps.style,V=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;v.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(pe){Fe(j,j.return,pe)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=r?"":j.memoizedProps}catch(pe){Fe(j,j.return,pe)}}}else if(t.tag===18){if(l===null){j=t;try{var I=j.stateNode;r?cp(I,!0):cp(j.stateNode,!1)}catch(pe){Fe(j,j.return,pe)}}}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}n&4&&(n=e.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,ts(e,l))));break;case 19:Ft(t,e),Pt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,ts(e,n)));break;case 30:break;case 21:break;default:Ft(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(fm(n)){l=n;break}n=n.return}if(l==null)throw Error(u(160));switch(l.tag){case 27:var r=l.stateNode,s=yu(e);es(e,s,r);break;case 5:var f=l.stateNode;l.flags&32&&(va(f,""),l.flags&=-33);var v=yu(e);es(e,v,f);break;case 3:case 4:var j=l.stateNode.containerInfo,U=yu(e);gu(e,U,j);break;default:throw Error(u(161))}}catch(X){Fe(e,e.return,X)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Sm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Sm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function en(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hm(e,t.alternate,t),t=t.sibling}function ta(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xn(4,t,t.return),ta(t);break;case 1:Ol(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&cm(t,t.return,l),ta(t);break;case 27:Qi(t.stateNode);case 26:case 5:Ol(t,t.return),ta(t);break;case 22:t.memoizedState===null&&ta(t);break;case 30:ta(t);break;default:ta(t)}e=e.sibling}}function tn(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,r=e,s=t,f=s.flags;switch(s.tag){case 0:case 11:case 15:tn(r,s,l),Li(4,s);break;case 1:if(tn(r,s,l),n=s,r=n.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(U){Fe(n,n.return,U)}if(n=s,r=n.updateQueue,r!==null){var v=n.stateNode;try{var j=r.shared.hiddenCallbacks;if(j!==null)for(r.shared.hiddenCallbacks=null,r=0;r<j.length;r++)Wd(j[r],v)}catch(U){Fe(n,n.return,U)}}l&&f&64&&um(s),Hi(s,s.return);break;case 27:mm(s);case 26:case 5:tn(r,s,l),l&&n===null&&f&4&&dm(s),Hi(s,s.return);break;case 12:tn(r,s,l);break;case 31:tn(r,s,l),l&&f&4&&vm(r,s);break;case 13:tn(r,s,l),l&&f&4&&xm(r,s);break;case 22:s.memoizedState===null&&tn(r,s,l),Hi(s,s.return);break;case 30:break;default:tn(r,s,l)}t=t.sibling}}function xu(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&&Ti(l))}function bu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ti(e))}function Rl(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Em(e,t,l,n),t=t.sibling}function Em(e,t,l,n){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Rl(e,t,l,n),r&2048&&Li(9,t);break;case 1:Rl(e,t,l,n);break;case 3:Rl(e,t,l,n),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ti(e)));break;case 12:if(r&2048){Rl(e,t,l,n),e=t.stateNode;try{var s=t.memoizedProps,f=s.id,v=s.onPostCommit;typeof v=="function"&&v(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Fe(t,t.return,j)}}else Rl(e,t,l,n);break;case 31:Rl(e,t,l,n);break;case 13:Rl(e,t,l,n);break;case 23:break;case 22:s=t.stateNode,f=t.alternate,t.memoizedState!==null?s._visibility&2?Rl(e,t,l,n):Ui(e,t):s._visibility&2?Rl(e,t,l,n):(s._visibility|=2,Ua(e,t,l,n,(t.subtreeFlags&10256)!==0||!1)),r&2048&&xu(f,t);break;case 24:Rl(e,t,l,n),r&2048&&bu(t.alternate,t);break;default:Rl(e,t,l,n)}}function Ua(e,t,l,n,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,f=t,v=l,j=n,U=f.flags;switch(f.tag){case 0:case 11:case 15:Ua(s,f,v,j,r),Li(8,f);break;case 23:break;case 22:var X=f.stateNode;f.memoizedState!==null?X._visibility&2?Ua(s,f,v,j,r):Ui(s,f):(X._visibility|=2,Ua(s,f,v,j,r)),r&&U&2048&&xu(f.alternate,f);break;case 24:Ua(s,f,v,j,r),r&&U&2048&&bu(f.alternate,f);break;default:Ua(s,f,v,j,r)}t=t.sibling}}function Ui(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,r=n.flags;switch(n.tag){case 22:Ui(l,n),r&2048&&xu(n.alternate,n);break;case 24:Ui(l,n),r&2048&&bu(n.alternate,n);break;default:Ui(l,n)}t=t.sibling}}var Bi=8192;function Ba(e,t,l){if(e.subtreeFlags&Bi)for(e=e.child;e!==null;)Tm(e,t,l),e=e.sibling}function Tm(e,t,l){switch(e.tag){case 26:Ba(e,t,l),e.flags&Bi&&e.memoizedState!==null&&Dv(l,Nl,e.memoizedState,e.memoizedProps);break;case 5:Ba(e,t,l);break;case 3:case 4:var n=Nl;Nl=hs(e.stateNode.containerInfo),Ba(e,t,l),Nl=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Bi,Bi=16777216,Ba(e,t,l),Bi=n):Ba(e,t,l));break;default:Ba(e,t,l)}}function Cm(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 Vi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];Dt=n,km(n,e)}Cm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jm(e),e=e.sibling}function jm(e){switch(e.tag){case 0:case 11:case 15:Vi(e),e.flags&2048&&xn(9,e,e.return);break;case 3:Vi(e);break;case 12:Vi(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)):Vi(e);break;default:Vi(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 n=t[l];Dt=n,km(n,e)}Cm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xn(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 km(e,t){for(;Dt!==null;){var l=Dt;switch(l.tag){case 0:case 11:case 15:xn(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Ti(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,Dt=n;else e:for(l=e;Dt!==null;){n=Dt;var r=n.sibling,s=n.return;if(ym(n),n===l){Dt=null;break e}if(r!==null){r.return=s,Dt=r;break e}Dt=s}}}var Jg={getCacheForType:function(e){var t=Bt(Tt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Bt(Tt).controller.signal}},$g=typeof WeakMap=="function"?WeakMap:Map,Je=0,it=null,He=null,Ve=0,We=0,rl=null,bn=!1,Va=!1,Su=!1,ln=0,gt=0,Sn=0,la=0,Eu=0,sl=0,Ga=0,Gi=null,el=null,Tu=!1,ns=0,wm=0,as=1/0,is=null,En=null,Nt=0,Tn=null,Ia=null,nn=0,Cu=0,ju=null,Am=null,Ii=0,ku=null;function ol(){return(Je&2)!==0&&Ve!==0?Ve&-Ve:_.T!==null?_u():qc()}function Nm(){if(sl===0)if((Ve&536870912)===0||Ie){var e=Vl;Vl<<=1,(Vl&3932160)===0&&(Vl=262144),sl=e}else sl=536870912;return e=al.current,e!==null&&(e.flags|=32),sl}function tl(e,t,l){(e===it&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(qa(e,0),Cn(e,Ve,sl,!1)),ui(e,l),((Je&2)===0||e!==it)&&(e===it&&((Je&2)===0&&(la|=l),gt===4&&Cn(e,Ve,sl,!1)),Ll(e))}function Rm(e,t,l){if((Je&6)!==0)throw Error(u(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||pl(e,t),r=n?Pg(e,t):Au(e,t,!0),s=n;do{if(r===0){Va&&!n&&Cn(e,t,0,!1);break}else{if(l=e.current.alternate,s&&!Wg(l)){r=Au(e,t,!1),s=!1;continue}if(r===2){if(s=t,e.errorRecoveryDisabledLanes&s)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var v=e;r=Gi;var j=v.current.memoizedState.isDehydrated;if(j&&(qa(v,f).flags|=256),f=Au(v,f,!1),f!==2){if(Su&&!j){v.errorRecoveryDisabledLanes|=s,la|=s,r=4;break e}s=el,el=r,s!==null&&(el===null?el=s:el.push.apply(el,s))}r=f}if(s=!1,r!==2)continue}}if(r===1){qa(e,0),Cn(e,t,0,!0);break}e:{switch(n=e,s=r,s){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Cn(n,t,sl,!bn);break e;case 2:el=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(r=ns+300-at(),10<r)){if(Cn(n,t,sl,!bn),oi(n,0,!0)!==0)break e;nn=t,n.timeoutHandle=sp(zm.bind(null,n,l,el,is,Tu,t,sl,la,Ga,bn,s,"Throttled",-0,0),r);break e}zm(n,l,el,is,Tu,t,sl,la,Ga,bn,s,null,-0,0)}}break}while(!0);Ll(e)}function zm(e,t,l,n,r,s,f,v,j,U,X,Z,V,I){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Il},Tm(t,s,Z);var pe=(s&62914560)===s?ns-at():(s&4194048)===s?wm-at():0;if(pe=Ov(Z,pe),pe!==null){nn=s,e.cancelPendingCommit=pe(Bm.bind(null,e,t,s,l,n,r,f,v,j,X,Z,null,V,I)),Cn(e,s,f,!U);return}}Bm(e,t,s,l,n,r,f,v,j)}function Wg(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 n=0;n<l.length;n++){var r=l[n],s=r.getSnapshot;r=r.value;try{if(!ll(s(),r))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 Cn(e,t,l,n){t&=~Eu,t&=~la,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var r=t;0<r;){var s=31-_t(r),f=1<<s;n[s]=-1,r&=~f}l!==0&&Vc(e,l,t)}function rs(){return(Je&6)===0?(qi(0),!1):!0}function wu(){if(He!==null){if(We===0)var e=He.return;else e=He,Ql=Kn=null,qo(e),Ma=null,ji=0,e=He;for(;e!==null;)om(e.alternate,e),e=e.return;He=null}}function qa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,gv(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),nn=0,wu(),it=e,He=l=Yl(e.current,null),Ve=t,We=0,rl=null,bn=!1,Va=pl(e,t),Su=!1,Ga=sl=Eu=la=Sn=gt=0,el=Gi=null,Tu=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-_t(n),s=1<<r;t|=e[r],n&=~s}return ln=t,wr(),l}function _m(e,t){ze=null,_.H=Mi,t===_a||t===Or?(t=Kd(),We=3):t===zo?(t=Kd(),We=4):We=t===iu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,rl=t,He===null&&(gt=1,Jr(e,vl(t,e.current)))}function Mm(){var e=al.current;return e===null?!0:(Ve&4194048)===Ve?El===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?e===El:!1}function Dm(){var e=_.H;return _.H=Mi,e===null?Mi:e}function Om(){var e=_.A;return _.A=Jg,e}function ss(){gt=4,bn||(Ve&4194048)!==Ve&&al.current!==null||(Va=!0),(Sn&134217727)===0&&(la&134217727)===0||it===null||Cn(it,Ve,sl,!1)}function Au(e,t,l){var n=Je;Je|=2;var r=Dm(),s=Om();(it!==e||Ve!==t)&&(is=null,qa(e,t)),t=!1;var f=gt;e:do try{if(We!==0&&He!==null){var v=He,j=rl;switch(We){case 8:wu(),f=6;break e;case 3:case 2:case 9:case 6:al.current===null&&(t=!0);var U=We;if(We=0,rl=null,Ya(e,v,j,U),l&&Va){f=0;break e}break;default:U=We,We=0,rl=null,Ya(e,v,j,U)}}Fg(),f=gt;break}catch(X){_m(e,X)}while(!0);return t&&e.shellSuspendCounter++,Ql=Kn=null,Je=n,_.H=r,_.A=s,He===null&&(it=null,Ve=0,wr()),f}function Fg(){for(;He!==null;)Lm(He)}function Pg(e,t){var l=Je;Je|=2;var n=Dm(),r=Om();it!==e||Ve!==t?(is=null,as=at()+500,qa(e,t)):Va=pl(e,t);e:do try{if(We!==0&&He!==null){t=He;var s=rl;t:switch(We){case 1:We=0,rl=null,Ya(e,t,s,1);break;case 2:case 9:if(Xd(s)){We=0,rl=null,Hm(t);break}t=function(){We!==2&&We!==9||it!==e||(We=7),Ll(e)},s.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Xd(s)?(We=0,rl=null,Hm(t)):(We=0,rl=null,Ya(e,t,s,7));break;case 5:var f=null;switch(He.tag){case 26:f=He.memoizedState;case 5:case 27:var v=He;if(f?Ep(f):v.stateNode.complete){We=0,rl=null;var j=v.sibling;if(j!==null)He=j;else{var U=v.return;U!==null?(He=U,os(U)):He=null}break t}}We=0,rl=null,Ya(e,t,s,5);break;case 6:We=0,rl=null,Ya(e,t,s,6);break;case 8:wu(),gt=6;break e;default:throw Error(u(462))}}ev();break}catch(X){_m(e,X)}while(!0);return Ql=Kn=null,_.H=n,_.A=r,Je=l,He!==null?0:(it=null,Ve=0,wr(),gt)}function ev(){for(;He!==null&&!Xt();)Lm(He)}function Lm(e){var t=rm(e.alternate,e,ln);e.memoizedProps=e.pendingProps,t===null?os(e):He=t}function Hm(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=em(l,t,t.pendingProps,t.type,void 0,Ve);break;case 11:t=em(l,t,t.pendingProps,t.type.render,t.ref,Ve);break;case 5:qo(t);default:om(l,t),t=He=Dd(t,ln),t=rm(l,t,ln)}e.memoizedProps=e.pendingProps,t===null?os(e):He=t}function Ya(e,t,l,n){Ql=Kn=null,qo(t),Ma=null,ji=0;var r=t.return;try{if(Ig(e,r,t,l,Ve)){gt=1,Jr(e,vl(l,e.current)),He=null;return}}catch(s){if(r!==null)throw He=r,s;gt=1,Jr(e,vl(l,e.current)),He=null;return}t.flags&32768?(Ie||n===1?e=!0:Va||(Ve&536870912)!==0?e=!1:(bn=e=!0,(n===2||n===9||n===3||n===6)&&(n=al.current,n!==null&&n.tag===13&&(n.flags|=16384))),Um(t,e)):os(t)}function os(e){var t=e;do{if((t.flags&32768)!==0){Um(t,bn);return}e=t.return;var l=Xg(t.alternate,t,ln);if(l!==null){He=l;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);gt===0&&(gt=5)}function Um(e,t){do{var l=Qg(e.alternate,e);if(l!==null){l.flags&=32767,He=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=l}while(e!==null);gt=6,He=null}function Bm(e,t,l,n,r,s,f,v,j){e.cancelPendingCommit=null;do us();while(Nt!==0);if((Je&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(s=t.lanes|t.childLanes,s|=yo,My(e,l,s,f,v,j),e===it&&(He=it=null,Ve=0),Ia=t,Tn=e,nn=l,Cu=s,ju=r,Am=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,av(Le,function(){return Ym(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=_.T,_.T=null,r=Y.p,Y.p=2,f=Je,Je|=4;try{Kg(e,t,l)}finally{Je=f,Y.p=r,_.T=n}}Nt=1,Vm(),Gm(),Im()}}function Vm(){if(Nt===1){Nt=0;var e=Tn,t=Ia,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=_.T,_.T=null;var n=Y.p;Y.p=2;var r=Je;Je|=4;try{bm(t,e);var s=Vu,f=jd(e.containerInfo),v=s.focusedElem,j=s.selectionRange;if(f!==v&&v&&v.ownerDocument&&Cd(v.ownerDocument.documentElement,v)){if(j!==null&&co(v)){var U=j.start,X=j.end;if(X===void 0&&(X=U),"selectionStart"in v)v.selectionStart=U,v.selectionEnd=Math.min(X,v.value.length);else{var Z=v.ownerDocument||document,V=Z&&Z.defaultView||window;if(V.getSelection){var I=V.getSelection(),pe=v.textContent.length,Te=Math.min(j.start,pe),tt=j.end===void 0?Te:Math.min(j.end,pe);!I.extend&&Te>tt&&(f=tt,tt=Te,Te=f);var M=Td(v,Te),N=Td(v,tt);if(M&&N&&(I.rangeCount!==1||I.anchorNode!==M.node||I.anchorOffset!==M.offset||I.focusNode!==N.node||I.focusOffset!==N.offset)){var H=Z.createRange();H.setStart(M.node,M.offset),I.removeAllRanges(),Te>tt?(I.addRange(H),I.extend(N.node,N.offset)):(H.setEnd(N.node,N.offset),I.addRange(H))}}}}for(Z=[],I=v;I=I.parentNode;)I.nodeType===1&&Z.push({element:I,left:I.scrollLeft,top:I.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<Z.length;v++){var K=Z[v];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Ss=!!Bu,Vu=Bu=null}finally{Je=r,Y.p=n,_.T=l}}e.current=t,Nt=2}}function Gm(){if(Nt===2){Nt=0;var e=Tn,t=Ia,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=_.T,_.T=null;var n=Y.p;Y.p=2;var r=Je;Je|=4;try{hm(e,t.alternate,t)}finally{Je=r,Y.p=n,_.T=l}}Nt=3}}function Im(){if(Nt===4||Nt===3){Nt=0,wl();var e=Tn,t=Ia,l=nn,n=Am;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Nt=5:(Nt=0,Ia=Tn=null,qm(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(En=null),Xs(l),t=t.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(Bn,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=_.T,r=Y.p,Y.p=2,_.T=null;try{for(var s=e.onRecoverableError,f=0;f<n.length;f++){var v=n[f];s(v.value,{componentStack:v.stack})}}finally{_.T=t,Y.p=r}}(nn&3)!==0&&us(),Ll(e),r=e.pendingLanes,(l&261930)!==0&&(r&42)!==0?e===ku?Ii++:(Ii=0,ku=e):Ii=0,qi(0)}}function qm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ti(t)))}function us(){return Vm(),Gm(),Im(),Ym()}function Ym(){if(Nt!==5)return!1;var e=Tn,t=Cu;Cu=0;var l=Xs(nn),n=_.T,r=Y.p;try{Y.p=32>l?32:l,_.T=null,l=ju,ju=null;var s=Tn,f=nn;if(Nt=0,Ia=Tn=null,nn=0,(Je&6)!==0)throw Error(u(331));var v=Je;if(Je|=4,jm(s.current),Em(s,s.current,f,l),Je=v,qi(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(Bn,s)}catch{}return!0}finally{Y.p=r,_.T=n,qm(e,t)}}function Xm(e,t,l){t=vl(l,t),t=au(e.stateNode,t,2),e=yn(e,t,2),e!==null&&(ui(e,2),Ll(e))}function Fe(e,t,l){if(e.tag===3)Xm(e,e,l);else for(;t!==null;){if(t.tag===3){Xm(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(En===null||!En.has(n))){e=vl(l,e),l=Qf(2),n=yn(t,l,2),n!==null&&(Kf(l,n,t,e),ui(n,2),Ll(n));break}}t=t.return}}function Nu(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new $g;var r=new Set;n.set(t,r)}else r=n.get(t),r===void 0&&(r=new Set,n.set(t,r));r.has(l)||(Su=!0,r.add(l),e=tv.bind(null,e,t,l),t.then(e,e))}function tv(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,it===e&&(Ve&l)===l&&(gt===4||gt===3&&(Ve&62914560)===Ve&&300>at()-ns?(Je&2)===0&&qa(e,0):Eu|=l,Ga===Ve&&(Ga=0)),Ll(e)}function Qm(e,t){t===0&&(t=Bc()),e=Yn(e,t),e!==null&&(ui(e,t),Ll(e))}function lv(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Qm(e,l)}function nv(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,r=e.memoizedState;r!==null&&(l=r.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(u(314))}n!==null&&n.delete(t),Qm(e,l)}function av(e,t){return fl(e,t)}var cs=null,Xa=null,Ru=!1,ds=!1,zu=!1,jn=0;function Ll(e){e!==Xa&&e.next===null&&(Xa===null?cs=Xa=e:Xa=Xa.next=e),ds=!0,Ru||(Ru=!0,rv())}function qi(e,t){if(!zu&&ds){zu=!0;do for(var l=!1,n=cs;n!==null;){if(e!==0){var r=n.pendingLanes;if(r===0)var s=0;else{var f=n.suspendedLanes,v=n.pingedLanes;s=(1<<31-_t(42|e)+1)-1,s&=r&~(f&~v),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(l=!0,$m(n,s))}else s=Ve,s=oi(n,n===it?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(s&3)===0||pl(n,s)||(l=!0,$m(n,s));n=n.next}while(l);zu=!1}}function iv(){Km()}function Km(){ds=Ru=!1;var e=0;jn!==0&&yv()&&(e=jn);for(var t=at(),l=null,n=cs;n!==null;){var r=n.next,s=Zm(n,t);s===0?(n.next=null,l===null?cs=r:l.next=r,r===null&&(Xa=l)):(l=n,(e!==0||(s&3)!==0)&&(ds=!0)),n=r}Nt!==0&&Nt!==5||qi(e),jn!==0&&(jn=0)}function Zm(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,r=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var f=31-_t(s),v=1<<f,j=r[f];j===-1?((v&l)===0||(v&n)!==0)&&(r[f]=Is(v,t)):j<=t&&(e.expiredLanes|=v),s&=~v}if(t=it,l=Ve,l=oi(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&ht(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||pl(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&ht(n),Xs(l)){case 2:case 8:l=Un;break;case 32:l=Le;break;case 268435456:l=ml;break;default:l=Le}return n=Jm.bind(null,e),l=fl(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&ht(n),e.callbackPriority=2,e.callbackNode=null,2}function Jm(e,t){if(Nt!==0&&Nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(us()&&e.callbackNode!==l)return null;var n=Ve;return n=oi(e,e===it?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Rm(e,n,t),Zm(e,at()),e.callbackNode!=null&&e.callbackNode===l?Jm.bind(null,e):null)}function $m(e,t){if(us())return null;Rm(e,t,!0)}function rv(){vv(function(){(Je&6)!==0?fl(Hn,iv):Km()})}function _u(){if(jn===0){var e=Ra;e===0&&(e=rt,rt<<=1,(rt&261888)===0&&(rt=256)),jn=e}return jn}function Wm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xr(""+e)}function Fm(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 sv(e,t,l,n,r){if(t==="submit"&&l&&l.stateNode===r){var s=Wm((r[Jt]||null).action),f=n.submitter;f&&(t=(t=f[Jt]||null)?Wm(t.formAction):f.getAttribute("formAction"),t!==null&&(s=t,f=null));var v=new Tr("action","action",null,n,r);e.push({event:v,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(jn!==0){var j=f?Fm(r,f):new FormData(r);Fo(l,{pending:!0,data:j,method:r.method,action:s},null,j)}}else typeof s=="function"&&(v.preventDefault(),j=f?Fm(r,f):new FormData(r),Fo(l,{pending:!0,data:j,method:r.method,action:s},s,j))},currentTarget:r}]})}}for(var Mu=0;Mu<ho.length;Mu++){var Du=ho[Mu],ov=Du.toLowerCase(),uv=Du[0].toUpperCase()+Du.slice(1);Al(ov,"on"+uv)}Al(Ad,"onAnimationEnd"),Al(Nd,"onAnimationIteration"),Al(Rd,"onAnimationStart"),Al("dblclick","onDoubleClick"),Al("focusin","onFocus"),Al("focusout","onBlur"),Al(jg,"onTransitionRun"),Al(kg,"onTransitionStart"),Al(wg,"onTransitionCancel"),Al(zd,"onTransitionEnd"),ya("onMouseEnter",["mouseout","mouseover"]),ya("onMouseLeave",["mouseout","mouseover"]),ya("onPointerEnter",["pointerout","pointerover"]),ya("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yi="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(" "),cv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yi));function Pm(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],r=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var f=n.length-1;0<=f;f--){var v=n[f],j=v.instance,U=v.currentTarget;if(v=v.listener,j!==s&&r.isPropagationStopped())break e;s=v,r.currentTarget=U;try{s(r)}catch(X){kr(X)}r.currentTarget=null,s=j}else for(f=0;f<n.length;f++){if(v=n[f],j=v.instance,U=v.currentTarget,v=v.listener,j!==s&&r.isPropagationStopped())break e;s=v,r.currentTarget=U;try{s(r)}catch(X){kr(X)}r.currentTarget=null,s=j}}}}function Ue(e,t){var l=t[Qs];l===void 0&&(l=t[Qs]=new Set);var n=e+"__bubble";l.has(n)||(ep(t,e,2,!1),l.add(n))}function Ou(e,t,l){var n=0;t&&(n|=4),ep(l,e,n,t)}var fs="_reactListening"+Math.random().toString(36).slice(2);function Lu(e){if(!e[fs]){e[fs]=!0,Qc.forEach(function(l){l!=="selectionchange"&&(cv.has(l)||Ou(l,!1,e),Ou(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fs]||(t[fs]=!0,Ou("selectionchange",!1,t))}}function ep(e,t,l,n){switch(Np(t)){case 2:var r=Uv;break;case 8:r=Bv;break;default:r=Wu}l=r.bind(null,t,l,e),r=void 0,!to||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),n?r!==void 0?e.addEventListener(t,l,{capture:!0,passive:r}):e.addEventListener(t,l,!0):r!==void 0?e.addEventListener(t,l,{passive:r}):e.addEventListener(t,l,!1)}function Hu(e,t,l,n,r){var s=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var f=n.tag;if(f===3||f===4){var v=n.stateNode.containerInfo;if(v===r)break;if(f===4)for(f=n.return;f!==null;){var j=f.tag;if((j===3||j===4)&&f.stateNode.containerInfo===r)return;f=f.return}for(;v!==null;){if(f=ma(v),f===null)return;if(j=f.tag,j===5||j===6||j===26||j===27){n=s=f;continue e}v=v.parentNode}}n=n.return}ad(function(){var U=s,X=Ps(l),Z=[];e:{var V=_d.get(e);if(V!==void 0){var I=Tr,pe=e;switch(e){case"keypress":if(Sr(l)===0)break e;case"keydown":case"keyup":I=ng;break;case"focusin":pe="focus",I=io;break;case"focusout":pe="blur",I=io;break;case"beforeblur":case"afterblur":I=io;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":I=sd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":I=Xy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":I=rg;break;case Ad:case Nd:case Rd:I=Zy;break;case zd:I=og;break;case"scroll":case"scrollend":I=qy;break;case"wheel":I=cg;break;case"copy":case"cut":case"paste":I=$y;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":I=ud;break;case"toggle":case"beforetoggle":I=fg}var Te=(t&4)!==0,tt=!Te&&(e==="scroll"||e==="scrollend"),M=Te?V!==null?V+"Capture":null:V;Te=[];for(var N=U,H;N!==null;){var K=N;if(H=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||H===null||M===null||(K=fi(N,M),K!=null&&Te.push(Xi(N,K,H))),tt)break;N=N.return}0<Te.length&&(V=new I(V,pe,null,l,X),Z.push({event:V,listeners:Te}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",I=e==="mouseout"||e==="pointerout",V&&l!==Fs&&(pe=l.relatedTarget||l.fromElement)&&(ma(pe)||pe[fa]))break e;if((I||V)&&(V=X.window===X?X:(V=X.ownerDocument)?V.defaultView||V.parentWindow:window,I?(pe=l.relatedTarget||l.toElement,I=U,pe=pe?ma(pe):null,pe!==null&&(tt=m(pe),Te=pe.tag,pe!==tt||Te!==5&&Te!==27&&Te!==6)&&(pe=null)):(I=null,pe=U),I!==pe)){if(Te=sd,K="onMouseLeave",M="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(Te=ud,K="onPointerLeave",M="onPointerEnter",N="pointer"),tt=I==null?V:di(I),H=pe==null?V:di(pe),V=new Te(K,N+"leave",I,l,X),V.target=tt,V.relatedTarget=H,K=null,ma(X)===U&&(Te=new Te(M,N+"enter",pe,l,X),Te.target=H,Te.relatedTarget=tt,K=Te),tt=K,I&&pe)t:{for(Te=dv,M=I,N=pe,H=0,K=M;K;K=Te(K))H++;K=0;for(var Se=N;Se;Se=Te(Se))K++;for(;0<H-K;)M=Te(M),H--;for(;0<K-H;)N=Te(N),K--;for(;H--;){if(M===N||N!==null&&M===N.alternate){Te=M;break t}M=Te(M),N=Te(N)}Te=null}else Te=null;I!==null&&tp(Z,V,I,Te,!1),pe!==null&&tt!==null&&tp(Z,tt,pe,Te,!0)}}e:{if(V=U?di(U):window,I=V.nodeName&&V.nodeName.toLowerCase(),I==="select"||I==="input"&&V.type==="file")var Qe=gd;else if(hd(V))if(vd)Qe=Eg;else{Qe=bg;var ye=xg}else I=V.nodeName,!I||I.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?U&&Ws(U.elementType)&&(Qe=gd):Qe=Sg;if(Qe&&(Qe=Qe(e,U))){yd(Z,Qe,l,X);break e}ye&&ye(e,V,U),e==="focusout"&&U&&V.type==="number"&&U.memoizedProps.value!=null&&$s(V,"number",V.value)}switch(ye=U?di(U):window,e){case"focusin":(hd(ye)||ye.contentEditable==="true")&&(Ea=ye,fo=U,bi=null);break;case"focusout":bi=fo=Ea=null;break;case"mousedown":mo=!0;break;case"contextmenu":case"mouseup":case"dragend":mo=!1,kd(Z,l,X);break;case"selectionchange":if(Cg)break;case"keydown":case"keyup":kd(Z,l,X)}var _e;if(so)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else Sa?md(e,l)&&(Ge="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ge="onCompositionStart");Ge&&(cd&&l.locale!=="ko"&&(Sa||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&Sa&&(_e=id()):(un=X,lo="value"in un?un.value:un.textContent,Sa=!0)),ye=ms(U,Ge),0<ye.length&&(Ge=new od(Ge,e,null,l,X),Z.push({event:Ge,listeners:ye}),_e?Ge.data=_e:(_e=pd(l),_e!==null&&(Ge.data=_e)))),(_e=pg?hg(e,l):yg(e,l))&&(Ge=ms(U,"onBeforeInput"),0<Ge.length&&(ye=new od("onBeforeInput","beforeinput",null,l,X),Z.push({event:ye,listeners:Ge}),ye.data=_e)),sv(Z,e,U,l,X)}Pm(Z,t)})}function Xi(e,t,l){return{instance:e,listener:t,currentTarget:l}}function ms(e,t){for(var l=t+"Capture",n=[];e!==null;){var r=e,s=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||s===null||(r=fi(e,l),r!=null&&n.unshift(Xi(e,r,s)),r=fi(e,t),r!=null&&n.push(Xi(e,r,s))),e.tag===3)return n;e=e.return}return[]}function dv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tp(e,t,l,n,r){for(var s=t._reactName,f=[];l!==null&&l!==n;){var v=l,j=v.alternate,U=v.stateNode;if(v=v.tag,j!==null&&j===n)break;v!==5&&v!==26&&v!==27||U===null||(j=U,r?(U=fi(l,s),U!=null&&f.unshift(Xi(l,U,j))):r||(U=fi(l,s),U!=null&&f.push(Xi(l,U,j)))),l=l.return}f.length!==0&&e.push({event:t,listeners:f})}var fv=/\r\n?/g,mv=/\u0000|\uFFFD/g;function lp(e){return(typeof e=="string"?e:""+e).replace(fv,`
50
+ `).replace(mv,"")}function np(e,t){return t=lp(t),lp(e)===t}function et(e,t,l,n,r,s){switch(l){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||va(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&va(e,""+n);break;case"className":gr(e,"class",n);break;case"tabIndex":gr(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":gr(e,l,n);break;case"style":ld(e,n,s);break;case"data":if(t!=="object"){gr(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=xr(""+n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="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 s=="function"&&(l==="formAction"?(t!=="input"&&et(e,t,"name",r.name,r,null),et(e,t,"formEncType",r.formEncType,r,null),et(e,t,"formMethod",r.formMethod,r,null),et(e,t,"formTarget",r.formTarget,r,null)):(et(e,t,"encType",r.encType,r,null),et(e,t,"method",r.method,r,null),et(e,t,"target",r.target,r,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=xr(""+n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=Il);break;case"onScroll":n!=null&&Ue("scroll",e);break;case"onScrollEnd":n!=null&&Ue("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(u(61));if(l=n.__html,l!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=xr(""+n),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":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""+n):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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":Ue("beforetoggle",e),Ue("toggle",e),yr(e,"popover",n);break;case"xlinkActuate":Gl(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Gl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Gl(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Gl(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Gl(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Gl(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Gl(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Gl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Gl(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":yr(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Gy.get(l)||l,yr(e,l,n))}}function Uu(e,t,l,n,r,s){switch(l){case"style":ld(e,n,s);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(u(61));if(l=n.__html,l!=null){if(r.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"children":typeof n=="string"?va(e,n):(typeof n=="number"||typeof n=="bigint")&&va(e,""+n);break;case"onScroll":n!=null&&Ue("scroll",e);break;case"onScrollEnd":n!=null&&Ue("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Il);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kc.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(r=l.endsWith("Capture"),t=l.slice(2,r?l.length-7:void 0),s=e[Jt]||null,s=s!=null?s[l]:null,typeof s=="function"&&e.removeEventListener(t,s,r),typeof n=="function")){typeof s!="function"&&s!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,n,r);break e}l in e?e[l]=n:n===!0?e.setAttribute(l,""):yr(e,l,n)}}}function Gt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",e),Ue("load",e);var n=!1,r=!1,s;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];if(f!=null)switch(s){case"src":n=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:et(e,t,s,f,l,null)}}r&&et(e,t,"srcSet",l.srcSet,l,null),n&&et(e,t,"src",l.src,l,null);return;case"input":Ue("invalid",e);var v=s=f=r=null,j=null,U=null;for(n in l)if(l.hasOwnProperty(n)){var X=l[n];if(X!=null)switch(n){case"name":r=X;break;case"type":f=X;break;case"checked":j=X;break;case"defaultChecked":U=X;break;case"value":s=X;break;case"defaultValue":v=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(u(137,t));break;default:et(e,t,n,X,l,null)}}Fc(e,s,v,j,U,f,r,!1);return;case"select":Ue("invalid",e),n=f=s=null;for(r in l)if(l.hasOwnProperty(r)&&(v=l[r],v!=null))switch(r){case"value":s=v;break;case"defaultValue":f=v;break;case"multiple":n=v;default:et(e,t,r,v,l,null)}t=s,l=f,e.multiple=!!n,t!=null?ga(e,!!n,t,!1):l!=null&&ga(e,!!n,l,!0);return;case"textarea":Ue("invalid",e),s=r=n=null;for(f in l)if(l.hasOwnProperty(f)&&(v=l[f],v!=null))switch(f){case"value":n=v;break;case"defaultValue":r=v;break;case"children":s=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(u(91));break;default:et(e,t,f,v,l,null)}ed(e,n,r,s);return;case"option":for(j in l)if(l.hasOwnProperty(j)&&(n=l[j],n!=null))switch(j){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:et(e,t,j,n,l,null)}return;case"dialog":Ue("beforetoggle",e),Ue("toggle",e),Ue("cancel",e),Ue("close",e);break;case"iframe":case"object":Ue("load",e);break;case"video":case"audio":for(n=0;n<Yi.length;n++)Ue(Yi[n],e);break;case"image":Ue("error",e),Ue("load",e);break;case"details":Ue("toggle",e);break;case"embed":case"source":case"link":Ue("error",e),Ue("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(U in l)if(l.hasOwnProperty(U)&&(n=l[U],n!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:et(e,t,U,n,l,null)}return;default:if(Ws(t)){for(X in l)l.hasOwnProperty(X)&&(n=l[X],n!==void 0&&Uu(e,t,X,n,l,void 0));return}}for(v in l)l.hasOwnProperty(v)&&(n=l[v],n!=null&&et(e,t,v,n,l,null))}function pv(e,t,l,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,s=null,f=null,v=null,j=null,U=null,X=null;for(I in l){var Z=l[I];if(l.hasOwnProperty(I)&&Z!=null)switch(I){case"checked":break;case"value":break;case"defaultValue":j=Z;default:n.hasOwnProperty(I)||et(e,t,I,null,n,Z)}}for(var V in n){var I=n[V];if(Z=l[V],n.hasOwnProperty(V)&&(I!=null||Z!=null))switch(V){case"type":s=I;break;case"name":r=I;break;case"checked":U=I;break;case"defaultChecked":X=I;break;case"value":f=I;break;case"defaultValue":v=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(u(137,t));break;default:I!==Z&&et(e,t,V,I,n,Z)}}Js(e,f,v,j,U,X,s,r);return;case"select":I=f=v=V=null;for(s in l)if(j=l[s],l.hasOwnProperty(s)&&j!=null)switch(s){case"value":break;case"multiple":I=j;default:n.hasOwnProperty(s)||et(e,t,s,null,n,j)}for(r in n)if(s=n[r],j=l[r],n.hasOwnProperty(r)&&(s!=null||j!=null))switch(r){case"value":V=s;break;case"defaultValue":v=s;break;case"multiple":f=s;default:s!==j&&et(e,t,r,s,n,j)}t=v,l=f,n=I,V!=null?ga(e,!!l,V,!1):!!n!=!!l&&(t!=null?ga(e,!!l,t,!0):ga(e,!!l,l?[]:"",!1));return;case"textarea":I=V=null;for(v in l)if(r=l[v],l.hasOwnProperty(v)&&r!=null&&!n.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:et(e,t,v,null,n,r)}for(f in n)if(r=n[f],s=l[f],n.hasOwnProperty(f)&&(r!=null||s!=null))switch(f){case"value":V=r;break;case"defaultValue":I=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(u(91));break;default:r!==s&&et(e,t,f,r,n,s)}Pc(e,V,I);return;case"option":for(var pe in l)if(V=l[pe],l.hasOwnProperty(pe)&&V!=null&&!n.hasOwnProperty(pe))switch(pe){case"selected":e.selected=!1;break;default:et(e,t,pe,null,n,V)}for(j in n)if(V=n[j],I=l[j],n.hasOwnProperty(j)&&V!==I&&(V!=null||I!=null))switch(j){case"selected":e.selected=V&&typeof V!="function"&&typeof V!="symbol";break;default:et(e,t,j,V,n,I)}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 Te in l)V=l[Te],l.hasOwnProperty(Te)&&V!=null&&!n.hasOwnProperty(Te)&&et(e,t,Te,null,n,V);for(U in n)if(V=n[U],I=l[U],n.hasOwnProperty(U)&&V!==I&&(V!=null||I!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(u(137,t));break;default:et(e,t,U,V,n,I)}return;default:if(Ws(t)){for(var tt in l)V=l[tt],l.hasOwnProperty(tt)&&V!==void 0&&!n.hasOwnProperty(tt)&&Uu(e,t,tt,void 0,n,V);for(X in n)V=n[X],I=l[X],!n.hasOwnProperty(X)||V===I||V===void 0&&I===void 0||Uu(e,t,X,V,n,I);return}}for(var M in l)V=l[M],l.hasOwnProperty(M)&&V!=null&&!n.hasOwnProperty(M)&&et(e,t,M,null,n,V);for(Z in n)V=n[Z],I=l[Z],!n.hasOwnProperty(Z)||V===I||V==null&&I==null||et(e,t,Z,V,n,I)}function ap(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var r=l[n],s=r.transferSize,f=r.initiatorType,v=r.duration;if(s&&v&&ap(f)){for(f=0,v=r.responseEnd,n+=1;n<l.length;n++){var j=l[n],U=j.startTime;if(U>v)break;var X=j.transferSize,Z=j.initiatorType;X&&ap(Z)&&(j=j.responseEnd,f+=X*(j<v?1:(v-U)/(j-U)))}if(--n,t+=8*(s+f)/(r.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 Bu=null,Vu=null;function ps(e){return e.nodeType===9?e:e.ownerDocument}function ip(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 rp(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 Gu(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 Iu=null;function yv(){var e=window.event;return e&&e.type==="popstate"?e===Iu?!1:(Iu=e,!0):(Iu=null,!1)}var sp=typeof setTimeout=="function"?setTimeout:void 0,gv=typeof clearTimeout=="function"?clearTimeout:void 0,op=typeof Promise=="function"?Promise:void 0,vv=typeof queueMicrotask=="function"?queueMicrotask:typeof op<"u"?function(e){return op.resolve(null).then(e).catch(xv)}:sp;function xv(e){setTimeout(function(){throw e})}function kn(e){return e==="head"}function up(e,t){var l=t,n=0;do{var r=l.nextSibling;if(e.removeChild(l),r&&r.nodeType===8)if(l=r.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(r),Ja(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Qi(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Qi(l);for(var s=l.firstChild;s;){var f=s.nextSibling,v=s.nodeName;s[ci]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&s.rel.toLowerCase()==="stylesheet"||l.removeChild(s),s=f}}else l==="body"&&Qi(e.ownerDocument.body);l=r}while(l);Ja(t)}function cp(e,t){var l=e;e=0;do{var n=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||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function qu(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":qu(l),Ks(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function bv(e,t,l,n){for(;e.nodeType===1;){var r=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[ci])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Tl(e.nextSibling),e===null)break}return null}function Sv(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Tl(e.nextSibling),e===null))return null;return e}function dp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Tl(e.nextSibling),e===null))return null;return e}function Yu(e){return e.data==="$?"||e.data==="$~"}function Xu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ev(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Tl(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 Qu=null;function fp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Tl(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function mp(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 pp(e,t,l){switch(t=ps(l),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Qi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ks(e)}var Cl=new Map,hp=new Set;function hs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var an=Y.d;Y.d={f:Tv,r:Cv,D:jv,C:kv,L:wv,m:Av,X:Rv,S:Nv,M:zv};function Tv(){var e=an.f(),t=rs();return e||t}function Cv(e){var t=pa(e);t!==null&&t.tag===5&&t.type==="form"?_f(t):an.r(e)}var Qa=typeof document>"u"?null:document;function yp(e,t,l){var n=Qa;if(n&&typeof t=="string"&&t){var r=yl(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof l=="string"&&(r+='[crossorigin="'+l+'"]'),hp.has(r)||(hp.add(r),e={rel:e,crossOrigin:l,href:t},n.querySelector(r)===null&&(t=n.createElement("link"),Gt(t,"link",e),Mt(t),n.head.appendChild(t)))}}function jv(e){an.D(e),yp("dns-prefetch",e,null)}function kv(e,t){an.C(e,t),yp("preconnect",e,t)}function wv(e,t,l){an.L(e,t,l);var n=Qa;if(n&&e&&t){var r='link[rel="preload"][as="'+yl(t)+'"]';t==="image"&&l&&l.imageSrcSet?(r+='[imagesrcset="'+yl(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(r+='[imagesizes="'+yl(l.imageSizes)+'"]')):r+='[href="'+yl(e)+'"]';var s=r;switch(t){case"style":s=Ka(e);break;case"script":s=Za(e)}Cl.has(s)||(e=b({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Cl.set(s,e),n.querySelector(r)!==null||t==="style"&&n.querySelector(Ki(s))||t==="script"&&n.querySelector(Zi(s))||(t=n.createElement("link"),Gt(t,"link",e),Mt(t),n.head.appendChild(t)))}}function Av(e,t){an.m(e,t);var l=Qa;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+yl(n)+'"][href="'+yl(e)+'"]',s=r;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Za(e)}if(!Cl.has(s)&&(e=b({rel:"modulepreload",href:e},t),Cl.set(s,e),l.querySelector(r)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Zi(s)))return}n=l.createElement("link"),Gt(n,"link",e),Mt(n),l.head.appendChild(n)}}}function Nv(e,t,l){an.S(e,t,l);var n=Qa;if(n&&e){var r=ha(n).hoistableStyles,s=Ka(e);t=t||"default";var f=r.get(s);if(!f){var v={loading:0,preload:null};if(f=n.querySelector(Ki(s)))v.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Cl.get(s))&&Ku(e,l);var j=f=n.createElement("link");Mt(j),Gt(j,"link",e),j._p=new Promise(function(U,X){j.onload=U,j.onerror=X}),j.addEventListener("load",function(){v.loading|=1}),j.addEventListener("error",function(){v.loading|=2}),v.loading|=4,ys(f,t,n)}f={type:"stylesheet",instance:f,count:1,state:v},r.set(s,f)}}}function Rv(e,t){an.X(e,t);var l=Qa;if(l&&e){var n=ha(l).hoistableScripts,r=Za(e),s=n.get(r);s||(s=l.querySelector(Zi(r)),s||(e=b({src:e,async:!0},t),(t=Cl.get(r))&&Zu(e,t),s=l.createElement("script"),Mt(s),Gt(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(r,s))}}function zv(e,t){an.M(e,t);var l=Qa;if(l&&e){var n=ha(l).hoistableScripts,r=Za(e),s=n.get(r);s||(s=l.querySelector(Zi(r)),s||(e=b({src:e,async:!0,type:"module"},t),(t=Cl.get(r))&&Zu(e,t),s=l.createElement("script"),Mt(s),Gt(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(r,s))}}function gp(e,t,l,n){var r=(r=be.current)?hs(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Ka(l.href),l=ha(r).hoistableStyles,n=l.get(t),n||(n={type:"style",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Ka(l.href);var s=ha(r).hoistableStyles,f=s.get(e);if(f||(r=r.ownerDocument||r,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,f),(s=r.querySelector(Ki(e)))&&!s._p&&(f.instance=s,f.state.loading=5),Cl.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},Cl.set(e,l),s||_v(r,e,l,f.state))),t&&n===null)throw Error(u(528,""));return f}if(t&&n!==null)throw Error(u(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Za(l),l=ha(r).hoistableScripts,n=l.get(t),n||(n={type:"script",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Ka(e){return'href="'+yl(e)+'"'}function Ki(e){return'link[rel="stylesheet"]['+e+"]"}function vp(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function _v(e,t,l,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Gt(t,"link",l),Mt(t),e.head.appendChild(t))}function Za(e){return'[src="'+yl(e)+'"]'}function Zi(e){return"script[async]"+e}function xp(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+yl(l.href)+'"]');if(n)return t.instance=n,Mt(n),n;var r=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Mt(n),Gt(n,"style",r),ys(n,l.precedence,e),t.instance=n;case"stylesheet":r=Ka(l.href);var s=e.querySelector(Ki(r));if(s)return t.state.loading|=4,t.instance=s,Mt(s),s;n=vp(l),(r=Cl.get(r))&&Ku(n,r),s=(e.ownerDocument||e).createElement("link"),Mt(s);var f=s;return f._p=new Promise(function(v,j){f.onload=v,f.onerror=j}),Gt(s,"link",n),t.state.loading|=4,ys(s,l.precedence,e),t.instance=s;case"script":return s=Za(l.src),(r=e.querySelector(Zi(s)))?(t.instance=r,Mt(r),r):(n=l,(r=Cl.get(s))&&(n=b({},l),Zu(n,r)),e=e.ownerDocument||e,r=e.createElement("script"),Mt(r),Gt(r,"link",n),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,ys(n,l.precedence,e));return t.instance}function ys(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=n.length?n[n.length-1]:null,s=r,f=0;f<n.length;f++){var v=n[f];if(v.dataset.precedence===t)s=v;else if(s!==r)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Ku(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Zu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var gs=null;function bp(e,t,l){if(gs===null){var n=new Map,r=gs=new Map;r.set(l,n)}else r=gs,n=r.get(l),n||(n=new Map,r.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),r=0;r<l.length;r++){var s=l[r];if(!(s[ci]||s[Ht]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var f=s.getAttribute(t)||"";f=e+f;var v=n.get(f);v?v.push(s):n.set(f,[s])}}return n}function Sp(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Mv(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 Ep(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Dv(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var r=Ka(n.href),s=t.querySelector(Ki(r));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=vs.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=s,Mt(s);return}s=t.ownerDocument||t,n=vp(n),(r=Cl.get(r))&&Ku(n,r),s=s.createElement("link"),Mt(s);var f=s;f._p=new Promise(function(v,j){f.onload=v,f.onerror=j}),Gt(s,"link",n),l.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=vs.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Ju=0;function Ov(e,t){return e.stylesheets&&e.count===0&&bs(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&bs(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Ju===0&&(Ju=62500*hv());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&bs(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Ju?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(r)}}:null}function vs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)bs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xs=null;function bs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xs=new Map,t.forEach(Lv,e),xs=null,vs.call(e))}function Lv(e,t){if(!(t.state.loading&4)){var l=xs.get(e);if(l)var n=l.get(null);else{l=new Map,xs.set(e,l);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<r.length;s++){var f=r[s];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(l.set(f.dataset.precedence,f),n=f)}n&&l.set(null,n)}r=t.instance,f=r.getAttribute("data-precedence"),s=l.get(f)||n,s===n&&l.set(null,r),l.set(f,r),this.count++,n=vs.bind(this),r.addEventListener("load",n),r.addEventListener("error",n),s?s.parentNode.insertBefore(r,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Ji={$$typeof:G,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Hv(e,t,l,n,r,s,f,v,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=qs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qs(0),this.hiddenUpdates=qs(null),this.identifierPrefix=n,this.onUncaughtError=r,this.onCaughtError=s,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Tp(e,t,l,n,r,s,f,v,j,U,X,Z){return e=new Hv(e,t,l,f,j,U,X,Z,v),t=1,s===!0&&(t|=24),s=nl(3,null,null,t),e.current=s,s.stateNode=e,t=Ao(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:n,isDehydrated:l,cache:t},_o(s),e}function Cp(e){return e?(e=ja,e):ja}function jp(e,t,l,n,r,s){r=Cp(r),n.context===null?n.context=r:n.pendingContext=r,n=hn(t),n.payload={element:l},s=s===void 0?null:s,s!==null&&(n.callback=s),l=yn(e,n,t),l!==null&&(tl(l,e,t),wi(l,e,t))}function kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function $u(e,t){kp(e,t),(e=e.alternate)&&kp(e,t)}function wp(e){if(e.tag===13||e.tag===31){var t=Yn(e,67108864);t!==null&&tl(t,e,67108864),$u(e,67108864)}}function Ap(e){if(e.tag===13||e.tag===31){var t=ol();t=Ys(t);var l=Yn(e,t);l!==null&&tl(l,e,t),$u(e,t)}}var Ss=!0;function Uv(e,t,l,n){var r=_.T;_.T=null;var s=Y.p;try{Y.p=2,Wu(e,t,l,n)}finally{Y.p=s,_.T=r}}function Bv(e,t,l,n){var r=_.T;_.T=null;var s=Y.p;try{Y.p=8,Wu(e,t,l,n)}finally{Y.p=s,_.T=r}}function Wu(e,t,l,n){if(Ss){var r=Fu(n);if(r===null)Hu(e,t,n,Es,l),Rp(e,n);else if(Gv(r,e,t,l,n))n.stopPropagation();else if(Rp(e,n),t&4&&-1<Vv.indexOf(e)){for(;r!==null;){var s=pa(r);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var f=xt(s.pendingLanes);if(f!==0){var v=s;for(v.pendingLanes|=2,v.entangledLanes|=2;f;){var j=1<<31-_t(f);v.entanglements[1]|=j,f&=~j}Ll(s),(Je&6)===0&&(as=at()+500,qi(0))}}break;case 31:case 13:v=Yn(s,2),v!==null&&tl(v,s,2),rs(),$u(s,2)}if(s=Fu(n),s===null&&Hu(e,t,n,Es,l),s===r)break;r=s}r!==null&&n.stopPropagation()}else Hu(e,t,n,null,l)}}function Fu(e){return e=Ps(e),Pu(e)}var Es=null;function Pu(e){if(Es=null,e=ma(e),e!==null){var t=m(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=p(t),e!==null)return e;e=null}else if(l===31){if(e=y(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 Es=e,null}function Np(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(Et()){case Hn:return 2;case Un:return 8;case Le:case Ot:return 32;case ml:return 268435456;default:return 32}default:return 32}}var ec=!1,wn=null,An=null,Nn=null,$i=new Map,Wi=new Map,Rn=[],Vv="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 Rp(e,t){switch(e){case"focusin":case"focusout":wn=null;break;case"dragenter":case"dragleave":An=null;break;case"mouseover":case"mouseout":Nn=null;break;case"pointerover":case"pointerout":$i.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wi.delete(t.pointerId)}}function Fi(e,t,l,n,r,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:s,targetContainers:[r]},t!==null&&(t=pa(t),t!==null&&wp(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Gv(e,t,l,n,r){switch(t){case"focusin":return wn=Fi(wn,e,t,l,n,r),!0;case"dragenter":return An=Fi(An,e,t,l,n,r),!0;case"mouseover":return Nn=Fi(Nn,e,t,l,n,r),!0;case"pointerover":var s=r.pointerId;return $i.set(s,Fi($i.get(s)||null,e,t,l,n,r)),!0;case"gotpointercapture":return s=r.pointerId,Wi.set(s,Fi(Wi.get(s)||null,e,t,l,n,r)),!0}return!1}function zp(e){var t=ma(e.target);if(t!==null){var l=m(t);if(l!==null){if(t=l.tag,t===13){if(t=p(l),t!==null){e.blockedOn=t,Yc(e.priority,function(){Ap(l)});return}}else if(t===31){if(t=y(l),t!==null){e.blockedOn=t,Yc(e.priority,function(){Ap(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 Ts(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Fu(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);Fs=n,l.target.dispatchEvent(n),Fs=null}else return t=pa(l),t!==null&&wp(t),e.blockedOn=l,!1;t.shift()}return!0}function _p(e,t,l){Ts(e)&&l.delete(t)}function Iv(){ec=!1,wn!==null&&Ts(wn)&&(wn=null),An!==null&&Ts(An)&&(An=null),Nn!==null&&Ts(Nn)&&(Nn=null),$i.forEach(_p),Wi.forEach(_p)}function Cs(e,t){e.blockedOn===t&&(e.blockedOn=null,ec||(ec=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Iv)))}var js=null;function Mp(e){js!==e&&(js=e,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){js===e&&(js=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],r=e[t+2];if(typeof n!="function"){if(Pu(n||l)===null)continue;break}var s=pa(l);s!==null&&(e.splice(t,3),t-=3,Fo(s,{pending:!0,data:r,method:l.method,action:n},n,r))}}))}function Ja(e){function t(j){return Cs(j,e)}wn!==null&&Cs(wn,e),An!==null&&Cs(An,e),Nn!==null&&Cs(Nn,e),$i.forEach(t),Wi.forEach(t);for(var l=0;l<Rn.length;l++){var n=Rn[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Rn.length&&(l=Rn[0],l.blockedOn===null);)zp(l),l.blockedOn===null&&Rn.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var r=l[n],s=l[n+1],f=r[Jt]||null;if(typeof s=="function")f||Mp(l);else if(f){var v=null;if(s&&s.hasAttribute("formAction")){if(r=s,f=s[Jt]||null)v=f.formAction;else if(Pu(r)!==null)continue}else v=f.action;typeof v=="function"?l[n+1]=v:(l.splice(n,3),n-=3),Mp(l)}}}function Dp(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(f){return r=f})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function tc(e){this._internalRoot=e}ks.prototype.render=tc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var l=t.current,n=ol();jp(l,n,e,t,null,null)},ks.prototype.unmount=tc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jp(e.current,2,null,e,null,null),rs(),t[fa]=null}};function ks(e){this._internalRoot=e}ks.prototype.unstable_scheduleHydration=function(e){if(e){var t=qc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Rn.length&&t!==0&&t<Rn[l].priority;l++);Rn.splice(l,0,e),l===0&&zp(e)}};var Op=i.version;if(Op!=="19.2.4")throw Error(u(527,Op,"19.2.4"));Y.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=h(t),e=e!==null?C(e):null,e=e===null?null:e.stateNode,e};var qv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:_,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ws=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ws.isDisabled&&ws.supportsFiber)try{Bn=ws.inject(qv),Lt=ws}catch{}}return er.createRoot=function(e,t){if(!d(e))throw Error(u(299));var l=!1,n="",r=If,s=qf,f=Yf;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=Tp(e,1,!1,null,null,l,n,null,r,s,f,Dp),e[fa]=t.current,Lu(e),new tc(t)},er.hydrateRoot=function(e,t,l){if(!d(e))throw Error(u(299));var n=!1,r="",s=If,f=qf,v=Yf,j=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(r=l.identifierPrefix),l.onUncaughtError!==void 0&&(s=l.onUncaughtError),l.onCaughtError!==void 0&&(f=l.onCaughtError),l.onRecoverableError!==void 0&&(v=l.onRecoverableError),l.formState!==void 0&&(j=l.formState)),t=Tp(e,1,!0,t,l??null,n,r,j,s,f,v,Dp),t.context=Cp(null),l=t.current,n=ol(),n=Ys(n),r=hn(n),r.callback=null,yn(l,r,n),l=n,t.current.lanes=l,ui(t,l),Ll(t),e[fa]=t.current,Lu(e),new ks(t)},er.version="19.2.4",er}var Xp;function Fv(){if(Xp)return ac.exports;Xp=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),ac.exports=Wv(),ac.exports}var Pv=Fv();const e0="modulepreload",t0=function(a){return"/"+a},Qp={},Ah=function(i,o,u){let d=Promise.resolve();if(o&&o.length>0){let p=function(h){return Promise.all(h.map(C=>Promise.resolve(C).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const y=document.querySelector("meta[property=csp-nonce]"),g=(y==null?void 0:y.nonce)||(y==null?void 0:y.getAttribute("nonce"));d=p(o.map(h=>{if(h=t0(h),h in Qp)return;Qp[h]=!0;const C=h.endsWith(".css"),b=C?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${b}`))return;const k=document.createElement("link");if(k.rel=C?"stylesheet":e0,C||(k.as="script"),k.crossOrigin="",k.href=h,g&&k.setAttribute("nonce",g),document.head.appendChild(k),C)return new Promise((w,R)=>{k.addEventListener("load",w),k.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${h}`)))})}))}function m(p){const y=new Event("vite:preloadError",{cancelable:!0});if(y.payload=p,window.dispatchEvent(y),!y.defaultPrevented)throw p}return d.then(p=>{for(const y of p||[])y.status==="rejected"&&m(y.reason);return i().catch(m)})},$a="";class Nh extends Error{constructor(i,o){super(i),this.name="ApiError",this.status=o}}async function qe(a,i){const o=await fetch(`${$a}${a}`,i);if(!o.ok){const u=await o.json().catch(()=>({error:o.statusText}));throw new Nh(u.error||`HTTP ${o.status}`,o.status)}return o.json()}function rn(a){return typeof a=="string"&&a.length>0?a:null}function l0(a){return typeof a=="number"&&Number.isFinite(a)?a:null}function oc(a){if(!Array.isArray(a))return null;const i=a.filter(o=>typeof o=="string"&&o.length>0);return i.length>0?i:null}function n0(a){const i=a??{};let o;i.origin==="source"||i.origin==="installed"?o=i.origin:(o="source",console.warn(`[api.getSkills] skill ${String(i.plugin)}/${String(i.skill)} has invalid origin=${JSON.stringify(i.origin)}; defaulting to 'source'`));const u={plugin:typeof i.plugin=="string"?i.plugin:"",skill:typeof i.skill=="string"?i.skill:"",dir:typeof i.dir=="string"?i.dir:"",hasEvals:!!i.hasEvals,hasBenchmark:!!i.hasBenchmark,evalCount:typeof i.evalCount=="number"?i.evalCount:0,assertionCount:typeof i.assertionCount=="number"?i.assertionCount:0,benchmarkStatus:i.benchmarkStatus==="pass"||i.benchmarkStatus==="fail"||i.benchmarkStatus==="pending"||i.benchmarkStatus==="stale"||i.benchmarkStatus==="missing"?i.benchmarkStatus:"missing",lastBenchmark:typeof i.lastBenchmark=="string"?i.lastBenchmark:null,origin:o,description:rn(i.description),version:rn(i.version),category:rn(i.category),author:rn(i.author),license:rn(i.license),homepage:rn(i.homepage),tags:oc(i.tags),deps:oc(i.deps),mcpDeps:oc(i.mcpDeps),entryPoint:rn(i.entryPoint),lastModified:rn(i.lastModified),sizeBytes:l0(i.sizeBytes),sourceAgent:rn(i.sourceAgent)};return typeof i.updateAvailable=="boolean"&&(u.updateAvailable=i.updateAvailable),typeof i.currentVersion=="string"&&(u.currentVersion=i.currentVersion),typeof i.latestVersion=="string"&&(u.latestVersion=i.latestVersion),typeof i.pinnedVersion=="string"&&(u.pinnedVersion=i.pinnedVersion),u}const lt={getConfig(){return qe("/api/config")},setConfig(a,i){return qe("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:a,model:i})})},async getSkills(){const a=await qe("/api/skills");return Array.isArray(a)?a.map(n0):[]},getSkillDetail(a,i){return qe(`/api/skills/${a}/${i}`)},getEvals(a,i){return qe(`/api/skills/${a}/${i}/evals`)},saveEvals(a,i,o){return qe(`/api/skills/${a}/${i}/evals`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},generateEvals(a,i){return qe(`/api/skills/${a}/${i}/generate-evals`,{method:"POST"})},async getLatestBenchmark(a,i){const o=await fetch(`${$a}/api/skills/${a}/${i}/benchmark/latest`);if(o.status===404)return null;if(!o.ok){const u=await o.json().catch(()=>({error:o.statusText}));throw new Nh(u.error||`HTTP ${o.status}`,o.status)}return o.json()},getHistory(a,i,o){const u=new URLSearchParams;o!=null&&o.model&&u.set("model",o.model),o!=null&&o.type&&u.set("type",o.type),o!=null&&o.from&&u.set("from",o.from),o!=null&&o.to&&u.set("to",o.to);const d=u.toString();return qe(`/api/skills/${a}/${i}/history${d?"?"+d:""}`)},getHistoryEntry(a,i,o){return qe(`/api/skills/${a}/${i}/history/${encodeURIComponent(o)}`)},compareRuns(a,i,o,u){return qe(`/api/skills/${a}/${i}/history-compare?a=${encodeURIComponent(o)}&b=${encodeURIComponent(u)}`)},getCaseHistory(a,i,o,u){const d=new URLSearchParams;u&&d.set("model",u);const m=d.toString();return qe(`/api/skills/${a}/${i}/history/case/${o}${m?"?"+m:""}`)},deleteHistoryEntry(a,i,o){return qe(`/api/skills/${a}/${i}/history/${encodeURIComponent(o)}`,{method:"DELETE"})},deleteSkill(a,i){return qe(`/api/skills/${a}/${i}`,{method:"DELETE"})},improveSkill(a,i,o){return qe(`/api/skills/${a}/${i}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})},instructEdit(a,i,o){return qe(`/api/skills/${a}/${i}/improve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:"instruct",...o})})},applyImprovement(a,i,o){return qe(`/api/skills/${a}/${i}/apply-improvement`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:o})})},getStats(a,i){return qe(`/api/skills/${a}/${i}/stats`)},getDependencies(a,i){return qe(`/api/skills/${a}/${i}/dependencies`)},getProjectLayout(){return qe("/api/project-layout")},createSkill(a){return qe("/api/skills/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},saveDraft(a){return qe("/api/skills/save-draft",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},getSkillCreatorStatus(){return qe("/api/skill-creator-status")},generateSkill(a){return qe("/api/skills/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})},getSkillFiles(a,i){return qe(`/api/skills/${a}/${i}/files`)},getSkillFile(a,i,o){return qe(`/api/skills/${a}/${i}/file?path=${encodeURIComponent(o)}`)},saveSkillFile(a,i,o,u){return qe(`/api/skills/${a}/${i}/file`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:o,content:u})})},getLeaderboard(a,i){return qe(`/api/skills/${a}/${i}/leaderboard`)},getLeaderboardEntry(a,i,o){return qe(`/api/skills/${a}/${i}/leaderboard/${encodeURIComponent(o)}`)},startSweep(a,i,o){const u=`${$a}/api/skills/${a}/${i}/sweep`,d=new EventSource(u);return fetch(u,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(o)}),d},getCredentials(a,i){return qe(`/api/credentials/${a}/${i}`)},setCredential(a,i,o,u){return qe(`/api/credentials/${a}/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:o,value:u})})},getParams(a,i){return qe(`/api/credentials/${a}/${i}/params`)},getParamsRevealed(a,i,o){const u=o?`reveal=true&key=${encodeURIComponent(o)}`:"reveal=true";return qe(`/api/credentials/${a}/${i}/params?${u}`)},searchModels(){return qe("/api/openrouter/models")},getSkillVersions(a,i){return qe(`/api/skills/${a}/${i}/versions`)},getVersionDiff(a,i,o,u){return qe(`/api/skills/${a}/${i}/versions/diff?from=${o}&to=${u}`)},startBatchUpdate(a){const i=`${$a}/api/skills/batch-update`,o=new EventSource(i);return fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({skills:a})}),o},startSkillUpdate(a,i){const o=`${$a}/api/skills/${a}/${i}/update`,u=new EventSource(o);return fetch(o,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"}}),u},async getSkillUpdates(){try{const a=await fetch(`${$a}/api/skills/updates`);return a.ok?await a.json():[]}catch{return[]}}};function a0(a,i){if(!i.length)return a;const o=new Map;for(const u of i){const d=u.name.split("/").pop()||u.name;o.set(d,u)}return a.map(u=>{const d=o.get(u.skill);return d?{...u,updateAvailable:d.updateAvailable,currentVersion:d.installed,latestVersion:d.latest??void 0}:u})}function i0(a){const[i,o]=x.useState(()=>typeof window>"u"?!1:window.matchMedia(a).matches);return x.useEffect(()=>{const u=window.matchMedia(a);o(u.matches);const d=m=>o(m.matches);return u.addEventListener("change",d),()=>u.removeEventListener("change",d)},[a]),i}const r0={selectedSkill:null,mode:"browse",searchQuery:"",skills:[],skillsLoading:!0,skillsError:null,isMobile:!1,mobileView:"list",updateNotificationDismissed:!1};function s0(a,i){switch(i.type){case"SELECT_SKILL":return{...a,selectedSkill:i.skill,mode:"browse",mobileView:a.isMobile?"detail":a.mobileView};case"CLEAR_SELECTION":return{...a,selectedSkill:null};case"SET_MODE":return{...a,mode:i.mode,selectedSkill:i.mode==="create"?null:a.selectedSkill};case"SET_SEARCH":return{...a,searchQuery:i.query};case"SET_SKILLS":return{...a,skills:i.skills,skillsLoading:!1,skillsError:null};case"SET_SKILLS_ERROR":return{...a,skillsError:i.error,skillsLoading:!1};case"SET_SKILLS_LOADING":return{...a,skillsLoading:i.loading};case"SET_MOBILE":return{...a,isMobile:i.isMobile};case"SET_MOBILE_VIEW":return{...a,mobileView:i.view};case"DISMISS_UPDATE_NOTIFICATION":return{...a,updateNotificationDismissed:!0};default:return a}}const Rh=x.createContext(null);function li(){const a=x.useContext(Rh);if(!a)throw new Error("useStudio must be used within StudioProvider");return a}function o0({children:a}){const[i,o]=x.useReducer(s0,r0),u=i0("(max-width: 767px)");x.useEffect(()=>{o({type:"SET_MOBILE",isMobile:u})},[u]);const d=x.useCallback(()=>{o({type:"SET_SKILLS_LOADING",loading:!0}),lt.getSkills().then(w=>{o({type:"SET_SKILLS",skills:w});const B=window.location.hash.match(/^#\/skills\/([^/]+)\/([^/?]+)/);if(B){const[,z,E]=B,A=w.find(G=>G.plugin===z&&G.skill===E);A&&o({type:"SELECT_SKILL",skill:{plugin:z,skill:E,origin:A.origin}})}lt.getSkillUpdates().then(z=>{z.length>0&&o({type:"SET_SKILLS",skills:a0(w,z)})}).catch(()=>{})}).catch(w=>o({type:"SET_SKILLS_ERROR",error:w.message}))},[]);x.useEffect(()=>{d()},[d]);const m=x.useCallback(w=>{o({type:"SELECT_SKILL",skill:w}),window.location.hash=`/skills/${w.plugin}/${w.skill}`},[]),p=x.useCallback(()=>{o({type:"CLEAR_SELECTION"}),window.location.hash.startsWith("#/skills/")&&history.replaceState(null,"",window.location.pathname+window.location.search)},[]),y=x.useCallback(w=>{o({type:"SET_MODE",mode:w})},[]),g=x.useCallback(w=>{o({type:"SET_SEARCH",query:w})},[]),h=x.useCallback(w=>{o({type:"SET_MOBILE_VIEW",view:w})},[]),C=x.useCallback(()=>{o({type:"DISMISS_UPDATE_NOTIFICATION"})},[]),b=x.useMemo(()=>i.skills.filter(w=>w.updateAvailable).length,[i.skills]),k=x.useMemo(()=>({state:i,selectSkill:m,clearSelection:p,setMode:y,setSearch:g,setMobileView:h,refreshSkills:d,updateCount:b,dismissUpdateNotification:C}),[i,m,p,y,g,h,d,b,C]);return c.jsx(Rh.Provider,{value:k,children:a})}const u0={config:null,loading:!0};function c0(a,i){switch(i.type){case"SET_CONFIG":return{config:i.config,loading:!1};case"SET_LOADING":return{...a,loading:!0};default:return a}}const zh=x.createContext(null);function Hs(){const a=x.useContext(zh);if(!a)throw new Error("useConfig must be used within ConfigProvider");return a}function d0({children:a}){const[i,o]=x.useReducer(c0,u0),u=x.useCallback(()=>{lt.getConfig().then(p=>o({type:"SET_CONFIG",config:p})).catch(()=>{})},[]);x.useEffect(()=>{u()},[u]);const d=x.useCallback(async(p,y)=>{const g=await lt.setConfig(p,y);return o({type:"SET_CONFIG",config:g}),g},[]),m=x.useMemo(()=>({config:i.config,loading:i.loading,updateConfig:d,refreshConfig:u}),[i,d,u]);return c.jsx(zh.Provider,{value:m,children:a})}function f0({topRail:a,sidebar:i,main:o,statusBar:u,resizeHandle:d,banner:m,liveMessage:p,sidebarWidth:y=320,sidebarHidden:g=!1}){const h={"--top-rail-height":"48px","--status-bar-height":"28px","--sidebar-width":`${y}px`,display:"grid",gridTemplateRows:"var(--top-rail-height) 1fr var(--status-bar-height)",height:"100vh",overflow:"hidden",background:"var(--bg-canvas)",color:"var(--text-primary)"},C={display:"grid",gridTemplateColumns:g?"1fr":"var(--sidebar-width) auto 1fr",minHeight:0,overflow:"hidden"};return c.jsxs("div",{className:"studio-shell",style:h,children:[m,c.jsx("header",{style:{borderBottom:"1px solid var(--border-default)",background:"var(--bg-canvas)",display:"flex",alignItems:"center",minHeight:0},children:a}),c.jsxs("div",{style:C,children:[!g&&c.jsx("aside",{"aria-label":"Skills sidebar",style:{minHeight:0,overflow:"hidden",borderRight:d?"none":"1px solid var(--border-default)",background:"var(--bg-canvas)",display:"flex",flexDirection:"column"},children:i}),!g&&d,c.jsx("main",{style:{minHeight:0,overflow:"auto",background:"var(--bg-canvas)"},children:o})]}),c.jsx("footer",{role:"contentinfo",style:{borderTop:"1px solid var(--border-default)",background:"var(--bg-canvas)",display:"flex",alignItems:"center",minHeight:0},children:u}),c.jsx("div",{"aria-live":"polite",role:"status",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},children:p??""})]})}function m0({value:a,onChange:i}){const[o,u]=x.useState([]),[d,m]=x.useState(!1),[p,y]=x.useState(null),[g,h]=x.useState(a),[C,b]=x.useState(!1),k=x.useRef(null),w=x.useRef(void 0);x.useEffect(()=>{m(!0),lt.searchModels().then(E=>u(E.models)).catch(E=>y(E instanceof Error?E.message:String(E))).finally(()=>m(!1))},[]);const R=x.useCallback(E=>{h(E),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>b(!0),300)},[]),B=x.useMemo(()=>{if(!g.trim())return o.slice(0,50);const E=g.toLowerCase();return o.filter(A=>A.id.toLowerCase().includes(E)||A.name.toLowerCase().includes(E)).slice(0,50)},[o,g]);x.useEffect(()=>{function E(A){k.current&&!k.current.contains(A.target)&&b(!1)}return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[]);function z(E){var $;const A=($=E.pricing)==null?void 0:$.prompt;return A==null||A===0?"Free":`$${(A*1e6).toFixed(2)}/1M`}return c.jsxs("div",{ref:k,style:{position:"relative"},children:[c.jsx("input",{type:"text",value:g,onChange:E=>R(E.target.value),onFocus:()=>b(!0),placeholder:d?"Loading models...":"Search OpenRouter models...",className:"input-field w-full",style:{fontSize:12}}),C&&!d&&c.jsxs("div",{style:{position:"absolute",top:"100%",left:0,right:0,maxHeight:280,overflowY:"auto",background:"var(--surface-2)",border:"1px solid var(--border-default)",borderRadius:8,marginTop:4,zIndex:20,boxShadow:"0 8px 24px rgba(0,0,0,0.4)"},children:[p&&c.jsxs("div",{className:"px-3 py-2 text-[11px]",style:{color:"var(--red)"},children:["Failed to load models: ",p]}),B.length===0&&!p&&c.jsx("div",{className:"px-3 py-3 text-[11px]",style:{color:"var(--text-tertiary)"},children:"No models found"}),B.map(E=>c.jsxs("button",{onClick:()=>{i(E.id),h(E.id),b(!1)},className:"w-full text-left px-3 py-2 flex items-center justify-between transition-colors duration-100",style:{background:E.id===a?"var(--accent-muted)":"transparent",border:"none",cursor:"pointer",borderBottom:"1px solid var(--border-subtle)"},onMouseEnter:A=>{A.currentTarget.style.background="var(--surface-3)"},onMouseLeave:A=>{A.currentTarget.style.background=E.id===a?"var(--accent-muted)":"transparent"},children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-[12px] font-medium",style:{color:"var(--text-primary)"},children:E.name}),c.jsx("div",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:E.id})]}),c.jsx("span",{className:"text-[10px] font-mono",style:{color:"var(--text-tertiary)",whiteSpace:"nowrap"},children:z(E)})]},E.id))]})]})}function p0(){const{config:a,updateConfig:i,refreshConfig:o}=Hs(),[u,d]=x.useState(!1),[m,p]=x.useState(!1),y=x.useRef(null);x.useEffect(()=>{function b(k){y.current&&!y.current.contains(k.target)&&d(!1)}return u&&document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[u]);async function g(b,k){p(!0);try{await i(b.id,k.id),d(!1)}catch{o()}finally{p(!1)}}if(!a)return null;const h=y0(a),C=h0(a);return c.jsxs("div",{ref:y,className:"relative",children:[c.jsxs("button",{onClick:()=>d(!u),className:"w-full flex items-center gap-2 px-2.5 py-1.5 rounded-lg text-[11px] transition-all duration-150",style:{background:u?"var(--surface-3)":"var(--surface-2)",border:`1px solid ${u?"var(--accent)":"var(--border-subtle)"}`,cursor:"pointer"},onMouseEnter:b=>{u||(b.currentTarget.style.borderColor="var(--accent)")},onMouseLeave:b=>{u||(b.currentTarget.style.borderColor="var(--border-subtle)")},children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:C!=null&&C.available?"var(--green)":"var(--text-tertiary)"}}),c.jsx("span",{className:"flex-1 text-left font-medium truncate",style:{color:"var(--text-primary)"},children:h}),c.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2.5",style:{transform:u?"rotate(180deg)":"rotate(0)",transition:"transform 0.15s ease",flexShrink:0},children:c.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),u&&c.jsxs("div",{className:"absolute top-full mt-1 left-0 right-0 rounded-xl shadow-xl z-50 overflow-hidden animate-fade-in",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)",minWidth:"240px"},children:[c.jsx("div",{className:"px-3 py-2",style:{borderBottom:"1px solid var(--border-subtle)"},children:c.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest",style:{color:"var(--text-tertiary)"},children:"Select Model"})}),c.jsx("div",{className:"py-1 max-h-72 overflow-y-auto",children:a.providers.map(b=>c.jsxs("div",{children:[c.jsxs("div",{className:"px-3 py-1.5 flex items-center gap-2",children:[c.jsx("span",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:b.available?"var(--green)":"var(--text-tertiary)",opacity:b.available?1:.3}}),c.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-tertiary)",opacity:b.available?1:.5},children:b.label})]}),b.id==="openrouter"&&b.available?c.jsx("div",{className:"px-3 py-1.5",children:c.jsx(m0,{value:a.provider==="openrouter"?a.model:"",onChange:k=>{m||g(b,{id:k,label:k})}})}):b.models.map(k=>{const w=_h(a,b.id,k.id),R=!b.available||m;return c.jsxs("button",{onClick:()=>!R&&g(b,k),disabled:R,className:"w-full px-3 py-1.5 flex items-center gap-2.5 text-left transition-all duration-100",style:{background:w?"var(--accent-muted)":"transparent",color:R?"var(--text-tertiary)":"var(--text-primary)",opacity:R?.4:1,cursor:R?"not-allowed":"pointer"},onMouseEnter:B=>{!R&&!w&&(B.currentTarget.style.background="var(--surface-3)")},onMouseLeave:B=>{w||(B.currentTarget.style.background="transparent")},children:[c.jsx("div",{className:"w-3 h-3 rounded-full flex-shrink-0 flex items-center justify-center",style:{border:`2px solid ${w?"var(--accent)":"var(--border-subtle)"}`},children:w&&c.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"var(--accent)"}})}),c.jsx("span",{className:"text-[12px]",style:{fontWeight:w?600:400},title:k.id,children:k.label})]},`${b.id}-${k.id}`)})]},b.id))})]})]})}function _h(a,i,o){return a.provider!==i?!1:a.model===o}function h0(a){return a.providers.find(i=>i.id===a.provider)}function y0(a){for(const i of a.providers)for(const o of i.models)if(_h(a,i.id,o.id))return o.label;return a.model}function Kp(a){typeof window>"u"||window.dispatchEvent(new CustomEvent("studio:navigate-scope",{detail:a}))}function g0({projectName:a,selected:i,onOpenPalette:o}){const u=i?i.origin==="installed"?"Installed":"Own":null;return c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,height:"100%",width:"100%",padding:"0 16px",fontFamily:"var(--font-sans)"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,flexShrink:0},children:[c.jsx("div",{"aria-hidden":"true",style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,background:"color-mix(in srgb, var(--accent-surface) 20%, transparent)"},children:c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent-surface)",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})})}),c.jsx("span",{style:{fontSize:13,fontWeight:600,letterSpacing:"-0.01em",color:"var(--text-primary)"},children:"Skill Studio"}),a&&c.jsx("span",{title:a,style:{fontSize:12,color:"var(--text-secondary)",borderLeft:"1px solid var(--border-default)",paddingLeft:10,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a})]}),c.jsx("nav",{"aria-label":"Breadcrumb",style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--text-secondary)"},children:i&&u&&c.jsxs(c.Fragment,{children:[c.jsx(Zp,{segment:"origin",onClick:()=>Kp({scope:"origin",origin:i.origin}),style:{textTransform:"uppercase",letterSpacing:"0.06em",fontWeight:600,color:i.origin==="installed"?"var(--status-installed)":"var(--status-own)"},children:u}),c.jsx(Jp,{}),c.jsx(Zp,{segment:"plugin",onClick:()=>Kp({scope:"plugin",plugin:i.plugin}),style:{fontFamily:"var(--font-mono)",fontSize:11},children:i.plugin}),c.jsx(Jp,{}),c.jsx("span",{"data-breadcrumb-segment":"skill","aria-current":"page",style:{color:"var(--text-primary)",fontWeight:500,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.skill})]})}),c.jsxs("div",{"data-toprail-right":"true",style:{display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[c.jsx("span",{"data-slot":"model-selector",style:{minWidth:140},children:c.jsx(p0,{})}),c.jsx("button",{type:"button",onClick:o,"aria-label":"Open command palette",title:"Command palette (⌘K)",style:{display:"inline-flex",alignItems:"center",gap:6,height:26,padding:"0 10px",borderRadius:4,border:"1px solid var(--border-default)",background:"transparent",color:"var(--text-secondary)",fontSize:11,fontFamily:"var(--font-mono)",cursor:"pointer"},children:c.jsx("span",{children:"⌘K"})})]})]})}function Zp({segment:a,onClick:i,style:o,children:u}){return c.jsx("button",{type:"button","data-breadcrumb-segment":a,onClick:i,style:{background:"transparent",border:"none",padding:0,cursor:"pointer",color:"var(--text-secondary)",fontFamily:"inherit",...o},onMouseEnter:d=>{d.currentTarget.style.color="var(--color-accent-ink)"},onMouseLeave:d=>{const m=(o==null?void 0:o.color)??"var(--text-secondary)";d.currentTarget.style.color=m},children:u})}function Jp(){return c.jsx("span",{"aria-hidden":"true",style:{color:"var(--border-default)",fontSize:10},children:"›"})}const jc="vskill-theme";function Mh(a){return a==="light"||a==="dark"||a==="auto"?a:"auto"}function v0(a,i){return a==="light"||a==="dark"?a:i?"dark":"light"}function x0(a){try{const i=a.getItem(jc);return Mh(i)}catch{return"auto"}}function b0(a,i){try{a.setItem(jc,i)}catch{}}function S0(a,i,o){a.dataset.theme=o,a.dataset.themeMode=i}function E0(a){if(!a)return!1;try{return a("(prefers-color-scheme: dark)").matches}catch{return!1}}const Dh=x.createContext(null);function T0({storage:a,matchMedia:i,target:o,children:u}){const d=a??(typeof window<"u"?window.localStorage:void 0),m=i??(typeof window<"u"?window.matchMedia.bind(window):void 0),p=o??(typeof document<"u"?document.documentElement:void 0),[y,g]=x.useState(()=>d?x0(d):"auto"),[h,C]=x.useState(()=>E0(m)),b=x.useMemo(()=>v0(y,h),[y,h]);x.useEffect(()=>{p&&S0(p,y,b)},[p,y,b]),x.useEffect(()=>{if(!m)return;const R=m("(prefers-color-scheme: dark)"),B=E=>C(E.matches);if(typeof R.addEventListener=="function")return R.addEventListener("change",B),()=>R.removeEventListener("change",B);const z=R;return z.addListener(B),()=>z.removeListener(B)},[m]),x.useEffect(()=>{if(typeof window>"u")return;const R=B=>{B.key===jc&&g(Mh(B.newValue))};return window.addEventListener("storage",R),()=>window.removeEventListener("storage",R)},[]),x.useEffect(()=>{if(!m||!p)return;let R;try{R=m("(prefers-contrast: more)")}catch{return}const B=A=>{A?p.dataset.contrast="more":p.dataset.contrast==="more"&&delete p.dataset.contrast};B(R.matches);const z=A=>B(A.matches);if(typeof R.addEventListener=="function")return R.addEventListener("change",z),()=>R.removeEventListener("change",z);const E=R;return E.addListener(z),()=>E.removeListener(z)},[m,p]);const k=x.useCallback(R=>{g(R),d&&b0(d,R)},[d]),w=x.useMemo(()=>({mode:y,resolvedTheme:b,setTheme:k}),[y,b,k]);return c.jsx(Dh.Provider,{value:w,children:u})}function Oh(){const a=x.useContext(Dh);if(!a)throw new Error("useTheme must be used inside <ThemeProvider>. Wrap the app root in main.tsx.");return a}function C0({projectPath:a,modelName:i,health:o="ok",onPathClick:u}){const{mode:d,setTheme:m}=Oh(),p=j0(d),y=o==="down"||o==="degraded"?"var(--status-own)":"var(--status-installed)";return c.jsxs("div",{role:"contentinfo",style:{display:"flex",alignItems:"center",gap:12,height:"100%",width:"100%",padding:"0 12px",fontSize:11,fontFamily:"var(--font-sans)",color:"var(--text-secondary)",fontVariantNumeric:"tabular-nums"},children:[c.jsxs("button",{type:"button",onClick:u,"aria-label":a?`Project path ${a}`:"No project path",style:{display:"inline-flex",alignItems:"center",gap:6,background:"transparent",border:"none",padding:0,color:"var(--text-secondary)",fontFamily:"var(--font-mono)",cursor:u?"pointer":"default",maxWidth:360,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:a??"",children:[c.jsx($p,{color:"var(--text-secondary)"}),c.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:a??"—"})]}),c.jsx(Wp,{}),c.jsx("span",{title:i??"",style:{fontFamily:"var(--font-mono)"},children:i??"—"}),c.jsx(Wp,{}),c.jsxs("span",{"aria-label":`Health: ${o}`,style:{display:"inline-flex",alignItems:"center",gap:6},children:[c.jsx($p,{color:y}),c.jsx("span",{style:{textTransform:"capitalize"},children:o})]}),c.jsx("div",{style:{flex:1}}),c.jsxs("button",{type:"button","data-testid":"theme-toggle",onClick:()=>m(p),"aria-label":`Switch to ${p} theme`,title:`Theme: ${d} — click for ${p}`,style:{display:"inline-flex",alignItems:"center",gap:6,background:"transparent",border:"1px solid var(--border-default)",padding:"2px 8px",borderRadius:4,color:"var(--text-secondary)",cursor:"pointer",fontSize:11,height:20},children:[c.jsx(k0,{mode:d}),c.jsx("span",{style:{textTransform:"capitalize"},children:d})]})]})}function j0(a){return a==="light"?"dark":a==="dark"?"auto":"light"}function $p({color:a}){return c.jsx("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:a,display:"inline-block",flexShrink:0}})}function Wp(){return c.jsx("span",{"aria-hidden":"true",style:{color:"var(--border-default)"},children:"|"})}function k0({mode:a}){return a==="dark"?c.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}):a==="light"?c.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("circle",{cx:"12",cy:"12",r:"4"}),c.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}):c.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("circle",{cx:"12",cy:"12",r:"9"}),c.jsx("path",{d:"M12 3a9 9 0 0 0 0 18z",fill:"currentColor"})]})}var w0=wh();const A0=kh(w0),Us=0,Dn=1,ni=2,Lh=4;function Fp(a){return()=>a}function N0(a){a()}function Hh(a,i){return o=>a(i(o))}function Pp(a,i){return()=>a(i)}function R0(a,i){return o=>a(i,o)}function kc(a){return a!==void 0}function z0(...a){return()=>{a.map(N0)}}function ai(){}function Bs(a,i){return i(a),a}function _0(a,i){return i(a)}function dt(...a){return a}function $e(a,i){return a(Dn,i)}function Me(a,i){a(Us,i)}function wc(a){a(ni)}function pt(a){return a(Lh)}function ve(a,i){return $e(a,R0(i,Us))}function zl(a,i){const o=a(Dn,u=>{o(),i(u)});return o}function eh(a){let i,o;return u=>d=>{i=d,o&&clearTimeout(o),o=setTimeout(()=>{u(i)},a)}}function Uh(a,i){return a===i}function ct(a=Uh){let i;return o=>u=>{a(i,u)||(i=u,o(u))}}function we(a){return i=>o=>{a(o)&&i(o)}}function fe(a){return i=>Hh(i,a)}function Hl(a){return i=>()=>{i(a)}}function ee(a,...i){const o=M0(...i);return((u,d)=>{switch(u){case ni:wc(a);return;case Dn:return $e(a,o(d))}})}function Ul(a,i){return o=>u=>{o(i=a(i,u))}}function ra(a){return i=>o=>{a>0?a--:i(o)}}function sn(a){let i=null,o;return u=>d=>{i=d,!o&&(o=setTimeout(()=>{o=void 0,u(i)},a))}}function Oe(...a){const i=new Array(a.length);let o=0,u=null;const d=2**a.length-1;return a.forEach((m,p)=>{const y=2**p;$e(m,g=>{const h=o;o|=y,i[p]=g,h!==d&&o===d&&u&&(u(),u=null)})}),m=>p=>{const y=()=>{m([p].concat(i))};o===d?y():u=y}}function M0(...a){return i=>a.reduceRight(_0,i)}function D0(a){let i,o;const u=()=>i==null?void 0:i();return function(d,m){switch(d){case Dn:return m?o===m?void 0:(u(),o=m,i=$e(a,m),i):(u(),ai);case ni:u(),o=null;return}}}function ne(a){let i=a;const o=Ye();return((u,d)=>{switch(u){case Us:i=d;break;case Dn:{d(i);break}case Lh:return i}return o(u,d)})}function Yt(a,i){return Bs(ne(i),o=>ve(a,o))}function Ye(){const a=[];return((i,o)=>{switch(i){case Us:a.slice().forEach(u=>{u(o)});return;case ni:a.splice(0,a.length);return;case Dn:return a.push(o),()=>{const u=a.indexOf(o);u>-1&&a.splice(u,1)}}})}function dl(a){return Bs(Ye(),i=>ve(a,i))}function Ze(a,i=[],{singleton:o}={singleton:!0}){return{constructor:a,dependencies:i,id:O0(),singleton:o}}const O0=()=>Symbol();function L0(a){const i=new Map,o=({constructor:u,dependencies:d,id:m,singleton:p})=>{if(p&&i.has(m))return i.get(m);const y=u(d.map(g=>o(g)));return p&&i.set(m,y),y};return o(a)}function wt(...a){const i=Ye(),o=new Array(a.length);let u=0;const d=2**a.length-1;return a.forEach((m,p)=>{const y=2**p;$e(m,g=>{o[p]=g,u|=y,u===d&&Me(i,o)})}),function(m,p){switch(m){case ni:{wc(i);return}case Dn:return u===d&&p(o),$e(i,p)}}}function ke(a,i=Uh){return ee(a,ct(i))}function gc(...a){return function(i,o){switch(i){case ni:return;case Dn:return z0(...a.map(u=>$e(u,o)))}}}const zt={DEBUG:0,INFO:1,WARN:2,ERROR:3},H0={[zt.DEBUG]:"debug",[zt.ERROR]:"error",[zt.INFO]:"log",[zt.WARN]:"warn"},U0=()=>typeof globalThis>"u"?window:globalThis,On=Ze(()=>{const a=ne(zt.ERROR);return{log:ne((i,o,u=zt.INFO)=>{const d=U0().VIRTUOSO_LOG_LEVEL??pt(a);u>=d&&console[H0[u]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",i,o)}),logLevel:a}},[],{singleton:!0});function sa(a,i,o){return Ac(a,i,o).callbackRef}function Ac(a,i,o){const u=ge.useRef(null);let d=p=>{};const m=ge.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(p=>{const y=()=>{const g=p[0].target;g.offsetParent!==null&&a(g)};o?y():requestAnimationFrame(y)}):null,[a,o]);return d=p=>{p&&i?(m==null||m.observe(p),u.current=p):(u.current&&(m==null||m.unobserve(u.current)),u.current=null)},{callbackRef:d,ref:u}}function B0(a,i,o,u,d,m,p,y,g){const h=ge.useCallback(C=>{const b=V0(C.children,i,y?"offsetWidth":"offsetHeight",d);let k=C.parentElement;for(;k.dataset.virtuosoScroller===void 0;)k=k.parentElement;const w=k.lastElementChild.dataset.viewportType==="window";let R;w&&(R=k.ownerDocument.defaultView);const B=p?y?p.scrollLeft:p.scrollTop:w?y?R.scrollX||R.document.documentElement.scrollLeft:R.scrollY||R.document.documentElement.scrollTop:y?k.scrollLeft:k.scrollTop,z=p?y?p.scrollWidth:p.scrollHeight:w?y?R.document.documentElement.scrollWidth:R.document.documentElement.scrollHeight:y?k.scrollWidth:k.scrollHeight,E=p?y?p.offsetWidth:p.offsetHeight:w?y?R.innerWidth:R.innerHeight:y?k.offsetWidth:k.offsetHeight;u({scrollHeight:z,scrollTop:Math.max(B,0),viewportHeight:E}),m==null||m(y?th("column-gap",getComputedStyle(C).columnGap,d):th("row-gap",getComputedStyle(C).rowGap,d)),b!==null&&a(b)},[a,i,d,m,p,u,y]);return Ac(h,o,g)}function V0(a,i,o,u){const d=a.length;if(d===0)return null;const m=[];for(let p=0;p<d;p++){const y=a.item(p);if(y.dataset.index===void 0)continue;const g=parseInt(y.dataset.index),h=parseFloat(y.dataset.knownSize),C=i(y,o);if(C===0&&u("Zero-sized element, this should not happen",{child:y},zt.ERROR),C===h)continue;const b=m[m.length-1];m.length===0||b.size!==C||b.endIndex!==g-1?m.push({endIndex:g,size:C,startIndex:g}):m[m.length-1].endIndex++}return m}function th(a,i,o){return i!=="normal"&&(i==null?void 0:i.endsWith("px"))!==!0&&o(`${a} was not resolved to pixel value correctly`,i,zt.WARN),i==="normal"?0:parseInt(i??"0",10)}function Bh(a,i,o){const u=ge.useRef(null),d=ge.useCallback(g=>{if(!(g!=null&&g.offsetParent))return;const h=g.getBoundingClientRect(),C=h.width;let b,k;if(i){const w=i.getBoundingClientRect(),R=h.top-w.top;k=w.height-Math.max(0,R),b=R+i.scrollTop}else{const w=p.current.ownerDocument.defaultView;k=w.innerHeight-Math.max(0,h.top),b=h.top+w.scrollY}u.current={listHeight:h.height,offsetTop:b,visibleHeight:k,visibleWidth:C},a(u.current)},[a,i]),{callbackRef:m,ref:p}=Ac(d,!0,o),y=ge.useCallback(()=>{d(p.current)},[d,p]);return ge.useEffect(()=>{var h;if(i){i.addEventListener("scroll",y);const C=new ResizeObserver(()=>{requestAnimationFrame(y)});return C.observe(i),()=>{i.removeEventListener("scroll",y),C.unobserve(i)}}const g=(h=p.current)==null?void 0:h.ownerDocument.defaultView;return g==null||g.addEventListener("scroll",y),g==null||g.addEventListener("resize",y),()=>{g==null||g.removeEventListener("scroll",y),g==null||g.removeEventListener("resize",y)}},[y,i,p]),m}const Zt=Ze(()=>{const a=Ye(),i=Ye(),o=ne(0),u=Ye(),d=ne(0),m=Ye(),p=Ye(),y=ne(0),g=ne(0),h=ne(0),C=ne(0),b=Ye(),k=Ye(),w=ne(!1),R=ne(!1),B=ne(!1);return ve(ee(a,fe(({scrollTop:z})=>z)),i),ve(ee(a,fe(({scrollHeight:z})=>z)),p),ve(i,d),{deviation:o,fixedFooterHeight:h,fixedHeaderHeight:g,footerHeight:C,headerHeight:y,horizontalDirection:R,scrollBy:k,scrollContainerState:a,scrollHeight:p,scrollingInProgress:w,scrollTo:b,scrollTop:i,skipAnimationFrameInResizeObserver:B,smoothScrollTargetReached:u,statefulScrollTop:d,viewportHeight:m}},[],{singleton:!0}),ir={lvl:0};function Vh(a,i){const o=a.length;if(o===0)return[];let{index:u,value:d}=i(a[0]);const m=[];for(let p=1;p<o;p++){const{index:y,value:g}=i(a[p]);m.push({end:y-1,start:u,value:d}),u=y,d=g}return m.push({end:1/0,start:u,value:d}),m}function nt(a){return a===ir}function rr(a,i){if(!nt(a))return i===a.k?a.v:i<a.k?rr(a.l,i):rr(a.r,i)}function _l(a,i,o="k"){if(nt(a))return[-1/0,void 0];if(Number(a[o])===i)return[a.k,a.v];if(Number(a[o])<i){const u=_l(a.r,i,o);return u[0]===-1/0?[a.k,a.v]:u}return _l(a.l,i,o)}function ul(a,i,o){return nt(a)?qh(i,o,1):i===a.k?Rt(a,{k:i,v:o}):i<a.k?lh(Rt(a,{l:ul(a.l,i,o)})):lh(Rt(a,{r:ul(a.r,i,o)}))}function Fa(){return ir}function Pa(a,i,o){if(nt(a))return[];const u=_l(a,i)[0];return G0(xc(a,u,o))}function vc(a,i){if(nt(a))return ir;const{k:o,l:u,r:d}=a;if(i===o){if(nt(u))return d;if(nt(d))return u;const[m,p]=Ih(u);return Rs(Rt(a,{k:m,l:Gh(u),v:p}))}return i<o?Rs(Rt(a,{l:vc(u,i)})):Rs(Rt(a,{r:vc(d,i)}))}function ia(a){return nt(a)?[]:[...ia(a.l),{k:a.k,v:a.v},...ia(a.r)]}function xc(a,i,o){if(nt(a))return[];const{k:u,l:d,r:m,v:p}=a;let y=[];return u>i&&(y=y.concat(xc(d,i,o))),u>=i&&u<=o&&y.push({k:u,v:p}),u<=o&&(y=y.concat(xc(m,i,o))),y}function Rs(a){const{l:i,lvl:o,r:u}=a;if(u.lvl>=o-1&&i.lvl>=o-1)return a;if(o>u.lvl+1){if(uc(i))return Yh(Rt(a,{lvl:o-1}));if(!nt(i)&&!nt(i.r))return Rt(i.r,{l:Rt(i,{r:i.r.l}),lvl:o,r:Rt(a,{l:i.r.r,lvl:o-1})});throw new Error("Unexpected empty nodes")}if(uc(a))return bc(Rt(a,{lvl:o-1}));if(!nt(u)&&!nt(u.l)){const d=u.l,m=uc(d)?u.lvl-1:u.lvl;return Rt(d,{l:Rt(a,{lvl:o-1,r:d.l}),lvl:d.lvl+1,r:bc(Rt(u,{l:d.r,lvl:m}))})}throw new Error("Unexpected empty nodes")}function Rt(a,i){return qh(i.k!==void 0?i.k:a.k,i.v!==void 0?i.v:a.v,i.lvl!==void 0?i.lvl:a.lvl,i.l!==void 0?i.l:a.l,i.r!==void 0?i.r:a.r)}function Gh(a){return nt(a.r)?a.l:Rs(Rt(a,{r:Gh(a.r)}))}function uc(a){return nt(a)||a.lvl>a.r.lvl}function Ih(a){return nt(a.r)?[a.k,a.v]:Ih(a.r)}function qh(a,i,o,u=ir,d=ir){return{k:a,l:u,lvl:o,r:d,v:i}}function lh(a){return bc(Yh(a))}function Yh(a){const{l:i}=a;return!nt(i)&&i.lvl===a.lvl?Rt(i,{r:Rt(a,{l:i.r})}):a}function bc(a){const{lvl:i,r:o}=a;return!nt(o)&&!nt(o.r)&&o.lvl===i&&o.r.lvl===i?Rt(o,{l:Rt(a,{r:o.l}),lvl:i+1}):a}function G0(a){return Vh(a,({k:i,v:o})=>({index:i,value:o}))}function Xh(a,i){return!!(a&&a.startIndex===i.startIndex&&a.endIndex===i.endIndex)}function sr(a,i){return!!(a&&a[0]===i[0]&&a[1]===i[1])}const Nc=Ze(()=>({recalcInProgress:ne(!1)}),[],{singleton:!0});function Qh(a,i,o){return a[Ds(a,i,o)]}function Ds(a,i,o,u=0){let d=a.length-1;for(;u<=d;){const m=Math.floor((u+d)/2),p=a[m],y=o(p,i);if(y===0)return m;if(y===-1){if(d-u<2)return m-1;d=m-1}else{if(d===u)return m;u=m+1}}throw new Error(`Failed binary finding record in array - ${a.join(",")}, searched for ${i}`)}function I0(a,i,o,u){const d=Ds(a,i,u),m=Ds(a,o,u,d);return a.slice(d,m+1)}function Mn(a,i){return Math.round(a.getBoundingClientRect()[i])}function Vs(a){return!nt(a.groupOffsetTree)}function Rc({index:a},i){return i===a?0:i<a?-1:1}function q0(){return{groupIndices:[],groupOffsetTree:Fa(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Fa()}}function Y0(a,i){let o=nt(a)?0:1/0;for(const u of i){const{endIndex:d,size:m,startIndex:p}=u;if(o=Math.min(o,p),nt(a)){a=ul(a,0,m);continue}const y=Pa(a,p-1,d+1);if(y.some(W0(u)))continue;let g=!1,h=!1;for(const{end:C,start:b,value:k}of y)g?(d>=b||m===k)&&(a=vc(a,b)):(h=k!==m,g=!0),C>d&&d>=b&&k!==m&&(a=ul(a,d+1,k));h&&(a=ul(a,p,m))}return[a,o]}function X0(a){return typeof a.groupIndex<"u"}function Q0({offset:a},i){return i===a?0:i<a?-1:1}function or(a,i,o){if(i.length===0)return 0;const{index:u,offset:d,size:m}=Qh(i,a,Rc),p=a-u,y=m*p+(p-1)*o+d;return y>0?y+o:y}function Kh(a,i){if(!Vs(i))return a;let o=0;for(;i.groupIndices[o]<=a+o;)o++;return a+o}function Zh(a,i,o){if(X0(a))return i.groupIndices[a.groupIndex]+1;const u=a.index==="LAST"?o:a.index;let d=Kh(u,i);return d=Math.max(0,d,Math.min(o,d)),d}function K0(a,i,o,u=0){return u>0&&(i=Math.max(i,Qh(a,u,Rc).offset)),Vh(I0(a,i,o,Q0),$0)}function Z0(a,[i,o,u,d]){i.length>0&&u("received item sizes",i,zt.DEBUG);const m=a.sizeTree;let p=m,y=0;if(o.length>0&&nt(m)&&i.length===2){const k=i[0].size,w=i[1].size;p=o.reduce((R,B)=>ul(ul(R,B,k),B+1,w),p)}else[p,y]=Y0(p,i);if(p===m)return a;const{lastIndex:g,lastOffset:h,lastSize:C,offsetTree:b}=Sc(a.offsetTree,y,p,d);return{groupIndices:o,groupOffsetTree:o.reduce((k,w)=>ul(k,w,or(w,b,d)),Fa()),lastIndex:g,lastOffset:h,lastSize:C,offsetTree:b,sizeTree:p}}function J0(a){return ia(a).map(({k:i,v:o},u,d)=>{const m=d[u+1];return{endIndex:m!==void 0?m.k-1:1/0,size:o,startIndex:i}})}function nh(a,i){let o=0,u=0;for(;o<a;)o+=i[u+1]-i[u]-1,u++;return u-(o===a?0:1)}function Sc(a,i,o,u){let d=a,m=0,p=0,y=0,g=0;if(i!==0){g=Ds(d,i-1,Rc),y=d[g].offset;const h=_l(o,i-1);m=h[0],p=h[1],d.length&&d[g].size===_l(o,i)[1]&&(g-=1),d=d.slice(0,g+1)}else d=[];for(const{start:h,value:C}of Pa(o,i,1/0)){const b=h-m,k=b*p+y+b*u;d.push({index:h,offset:k,size:C}),m=h,y=k,p=C}return{lastIndex:m,lastOffset:y,lastSize:p,offsetTree:d}}function $0(a){return{index:a.index,value:a}}function W0(a){const{endIndex:i,size:o,startIndex:u}=a;return d=>d.start===u&&(d.end===i||d.end===1/0)&&d.value===o}const F0={offsetHeight:"height",offsetWidth:"width"},Bl=Ze(([{log:a},{recalcInProgress:i}])=>{const o=Ye(),u=Ye(),d=Yt(u,0),m=Ye(),p=Ye(),y=ne(0),g=ne([]),h=ne(void 0),C=ne(void 0),b=ne(void 0),k=ne(void 0),w=ne((T,L)=>Mn(T,F0[L])),R=ne(void 0),B=ne(0),z=q0(),E=Yt(ee(o,Oe(g,a,B),Ul(Z0,z),ct()),z),A=Yt(ee(g,ct(),Ul((T,L)=>({current:L,prev:T.current}),{current:[],prev:[]}),fe(({prev:T})=>T)),[]);ve(ee(g,we(T=>T.length>0),Oe(E,B),fe(([T,L,D])=>{const W=T.reduce((F,de,ce)=>ul(F,de,or(de,L.offsetTree,D)||ce),Fa());return{...L,groupIndices:T,groupOffsetTree:W}})),E),ve(ee(u,Oe(E),we(([T,{lastIndex:L}])=>T<L),fe(([T,{lastIndex:L,lastSize:D}])=>[{endIndex:L,size:D,startIndex:T}])),o),ve(h,C);const G=Yt(ee(h,fe(T=>T===void 0)),!0);ve(ee(C,we(T=>T!==void 0&&nt(pt(E).sizeTree)),fe(T=>{const L=pt(b),D=pt(g).length>0;return L!==void 0&&L!==0?D?[{endIndex:0,size:L,startIndex:0},{endIndex:1,size:T,startIndex:1}]:[]:[{endIndex:0,size:T,startIndex:0}]})),o),ve(ee(k,we(T=>T!==void 0&&T.length>0&&nt(pt(E).sizeTree)),fe(T=>{const L=[];let D=T[0],W=0;for(let F=1;F<T.length;F++){const de=T[F];de!==D&&(L.push({endIndex:F-1,size:D,startIndex:W}),D=de,W=F)}return L.push({endIndex:T.length-1,size:D,startIndex:W}),L})),o),ve(ee(g,Oe(b,C),we(([,T,L])=>T!==void 0&&L!==void 0),fe(([T,L,D])=>{const W=[];for(let F=0;F<T.length;F++){const de=T[F],ce=T[F+1];W.push({startIndex:de,endIndex:de,size:L}),ce!==void 0&&W.push({startIndex:de+1,endIndex:ce-1,size:D})}return W})),o);const $=dl(ee(o,Oe(E),Ul(({sizes:T},[L,D])=>({changed:D!==T,sizes:D}),{changed:!1,sizes:z}),fe(T=>T.changed)));$e(ee(y,Ul((T,L)=>({diff:T.prev-L,prev:L}),{diff:0,prev:0}),fe(T=>T.diff)),T=>{const{groupIndices:L}=pt(E);if(T>0)Me(i,!0),Me(m,T+nh(T,L));else if(T<0){const D=pt(A);D.length>0&&(T-=nh(-T,D)),Me(p,T)}}),$e(ee(y,Oe(a)),([T,L])=>{T<0&&L("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:y},zt.ERROR)});const O=dl(m);ve(ee(m,Oe(E),fe(([T,L])=>{const D=L.groupIndices.length>0,W=[],F=L.lastSize;if(D){const de=rr(L.sizeTree,0);let ce=0,P=0;for(;ce<T;){const _=L.groupIndices[P],Y=L.groupIndices.length===P+1?1/0:L.groupIndices[P+1]-_-1;W.push({endIndex:_,size:de,startIndex:_}),W.push({endIndex:_+1+Y-1,size:F,startIndex:_+1}),P++,ce+=Y+1}const re=ia(L.sizeTree);return ce!==T&&re.shift(),re.reduce((_,{k:Y,v:se})=>{let Ce=_.ranges;return _.prevSize!==0&&(Ce=[..._.ranges,{endIndex:Y+T-1,size:_.prevSize,startIndex:_.prevIndex}]),{prevIndex:Y+T,prevSize:se,ranges:Ce}},{prevIndex:T,prevSize:0,ranges:W}).ranges}return ia(L.sizeTree).reduce((de,{k:ce,v:P})=>({prevIndex:ce+T,prevSize:P,ranges:[...de.ranges,{endIndex:ce+T-1,size:de.prevSize,startIndex:de.prevIndex}]}),{prevIndex:0,prevSize:F,ranges:[]}).ranges})),o);const J=dl(ee(p,Oe(E,B),fe(([T,{offsetTree:L},D])=>{const W=-T;return or(W,L,D)})));return ve(ee(p,Oe(E,B),fe(([T,L,D])=>{if(L.groupIndices.length>0){if(nt(L.sizeTree))return L;let F=Fa();const de=pt(A);let ce=0,P=0,re=0;for(;ce<-T;){re=de[P];const _=de[P+1]-re-1;P++,ce+=_+1}if(F=ia(L.sizeTree).reduce((_,{k:Y,v:se})=>ul(_,Math.max(0,Y+T),se),F),ce!==-T){const _=rr(L.sizeTree,re);F=ul(F,0,_);const Y=_l(L.sizeTree,-T+1)[1];F=ul(F,1,Y)}return{...L,sizeTree:F,...Sc(L.offsetTree,0,F,D)}}const W=ia(L.sizeTree).reduce((F,{k:de,v:ce})=>ul(F,Math.max(0,de+T),ce),Fa());return{...L,sizeTree:W,...Sc(L.offsetTree,0,W,D)}})),E),{beforeUnshiftWith:O,data:R,defaultItemSize:C,firstItemIndex:y,fixedItemSize:h,fixedGroupSize:b,gap:B,groupIndices:g,heightEstimates:k,itemSize:w,listRefresh:$,shiftWith:p,shiftWithOffset:J,sizeRanges:o,sizes:E,statefulTotalCount:d,totalCount:u,trackItemSizes:G,unshiftWith:m}},dt(On,Nc),{singleton:!0});function P0(a){return a.reduce((i,o)=>(i.groupIndices.push(i.totalCount),i.totalCount+=o+1,i),{groupIndices:[],totalCount:0})}const Jh=Ze(([{groupIndices:a,sizes:i,totalCount:o},{headerHeight:u,scrollTop:d}])=>{const m=Ye(),p=Ye(),y=dl(ee(m,fe(P0)));return ve(ee(y,fe(g=>g.totalCount)),o),ve(ee(y,fe(g=>g.groupIndices)),a),ve(ee(wt(d,i,u),we(([g,h])=>Vs(h)),fe(([g,h,C])=>_l(h.groupOffsetTree,Math.max(g-C,0),"v")[0]),ct(),fe(g=>[g])),p),{groupCounts:m,topItemsIndexes:p}},dt(Bl,Zt)),Ln=Ze(([{log:a}])=>{const i=ne(!1),o=dl(ee(i,we(u=>u),ct()));return $e(i,u=>{u&&pt(a)("props updated",{},zt.DEBUG)}),{didMount:o,propsReady:i}},dt(On),{singleton:!0}),ex=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function $h(a){const i=typeof a=="number"?{index:a}:a;return i.align||(i.align="start"),(!i.behavior||!ex)&&(i.behavior="auto"),i.offset===void 0&&(i.offset=0),i}const fr=Ze(([{gap:a,listRefresh:i,sizes:o,totalCount:u},{fixedFooterHeight:d,fixedHeaderHeight:m,footerHeight:p,headerHeight:y,scrollingInProgress:g,scrollTo:h,smoothScrollTargetReached:C,viewportHeight:b},{log:k}])=>{const w=Ye(),R=Ye(),B=ne(0);let z=null,E=null,A=null;function G(){z!==null&&(z(),z=null),A!==null&&(A(),A=null),E&&(clearTimeout(E),E=null),Me(g,!1)}return ve(ee(w,Oe(o,b,u,B,y,p,k),Oe(a,m,d),fe(([[$,O,J,T,L,D,W,F],de,ce,P])=>{const re=$h($),{align:_,behavior:Y,offset:se}=re,Ce=T-1,je=Zh(re,O,Ce);let S=or(je,O.offsetTree,de)+D;_==="end"?(S+=ce+_l(O.sizeTree,je)[1]-J+P,je===Ce&&(S+=W)):_==="center"?S+=(ce+_l(O.sizeTree,je)[1]-J+P)/2:S-=L,se!==void 0&&se!==0&&(S+=se);const q=te=>{G(),te?(F("retrying to scroll to",{location:$},zt.DEBUG),Me(w,$)):(Me(R,!0),F("list did not change, scroll successful",{},zt.DEBUG))};if(G(),Y==="smooth"){let te=!1;A=$e(i,oe=>{te=te||oe}),z=zl(C,()=>{q(te)})}else z=zl(ee(i,tx(150)),q);return E=setTimeout(()=>{G()},1200),Me(g,!0),F("scrolling from index to",{behavior:Y,index:je,top:S},zt.DEBUG),{behavior:Y,top:S}})),h),{scrollTargetReached:R,scrollToIndex:w,topListHeight:B}},dt(Bl,Zt,On),{singleton:!0});function tx(a){return i=>{const o=setTimeout(()=>{i(!1)},a);return u=>{u&&(i(!0),clearTimeout(o))}}}function zc(a,i){a===0?i():requestAnimationFrame(()=>{zc(a-1,i)})}function _c(a,i){const o=i-1;return typeof a=="number"?a:a.index==="LAST"?o:a.index}const mr=Ze(([{defaultItemSize:a,listRefresh:i,sizes:o},{scrollTop:u},{scrollTargetReached:d,scrollToIndex:m},{didMount:p}])=>{const y=ne(!0),g=ne(0),h=ne(!0);return ve(ee(p,Oe(g),we(([C,b])=>b!==0),Hl(!1)),y),ve(ee(p,Oe(g),we(([C,b])=>b!==0),Hl(!1)),h),$e(ee(wt(i,p),Oe(y,o,a,h),we(([[,C],b,{sizeTree:k},w,R])=>C&&(!nt(k)||kc(w))&&!b&&!R),Oe(g)),([,C])=>{zl(d,()=>{Me(h,!0)}),zc(4,()=>{zl(u,()=>{Me(y,!0)}),Me(m,C)})}),{initialItemFinalLocationReached:h,initialTopMostItemIndex:g,scrolledToInitialItem:y}},dt(Bl,Zt,fr,Ln),{singleton:!0});function Wh(a,i){return Math.abs(a-i)<1.01}const ur="up",lr="down",lx="none",nx={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},ax=0,pr=Ze(([{footerHeight:a,headerHeight:i,scrollBy:o,scrollContainerState:u,scrollTop:d,viewportHeight:m}])=>{const p=ne(!1),y=ne(!0),g=Ye(),h=Ye(),C=ne(4),b=ne(ax),k=Yt(ee(gc(ee(ke(d),ra(1),Hl(!0)),ee(ke(d),ra(1),Hl(!1),eh(100))),ct()),!1),w=Yt(ee(gc(ee(o,Hl(!0)),ee(o,Hl(!1),eh(200))),ct()),!1);ve(ee(wt(ke(d),ke(b)),fe(([A,G])=>A<=G),ct()),y),ve(ee(y,sn(50)),h);const R=dl(ee(wt(u,ke(m),ke(i),ke(a),ke(C)),Ul((A,[{scrollHeight:G,scrollTop:$},O,J,T,L])=>{const D=$+O-G>-L,W={scrollHeight:G,scrollTop:$,viewportHeight:O};if(D){let de,ce;return $>A.state.scrollTop?(de="SCROLLED_DOWN",ce=A.state.scrollTop-$):(de="SIZE_DECREASED",ce=A.state.scrollTop-$||A.scrollTopDelta),{atBottom:!0,atBottomBecause:de,scrollTopDelta:ce,state:W}}let F;return W.scrollHeight>A.state.scrollHeight?F="SIZE_INCREASED":O<A.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":$<A.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:W}},nx),ct((A,G)=>A!==void 0&&A.atBottom===G.atBottom))),B=Yt(ee(u,Ul((A,{scrollHeight:G,scrollTop:$,viewportHeight:O})=>{if(!Wh(A.scrollHeight,G)){const J=G-($+O)<1;return A.scrollTop!==$&&J?{changed:!0,jump:A.scrollTop-$,scrollHeight:G,scrollTop:$}:{changed:!0,jump:0,scrollHeight:G,scrollTop:$}}return{changed:!1,jump:0,scrollHeight:G,scrollTop:$}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),we(A=>A.changed),fe(A=>A.jump)),0);ve(ee(R,fe(A=>A.atBottom)),p),ve(ee(p,sn(50)),g);const z=ne(lr);ve(ee(u,fe(({scrollTop:A})=>A),ct(),Ul((A,G)=>pt(w)?{direction:A.direction,prevScrollTop:G}:{direction:G<A.prevScrollTop?ur:lr,prevScrollTop:G},{direction:lr,prevScrollTop:0}),fe(A=>A.direction)),z),ve(ee(u,sn(50),Hl(lx)),z);const E=ne(0);return ve(ee(k,we(A=>!A),Hl(0)),E),ve(ee(d,sn(100),Oe(k),we(([A,G])=>G),Ul(([A,G],[$])=>[G,$],[0,0]),fe(([A,G])=>G-A)),E),{atBottomState:R,atBottomStateChange:g,atBottomThreshold:C,atTopStateChange:h,atTopThreshold:b,isAtBottom:p,isAtTop:y,isScrolling:k,lastJumpDueToItemResize:B,scrollDirection:z,scrollVelocity:E}},dt(Zt)),cr="top",dr="bottom",ah="none";function ih(a,i,o){return typeof a=="number"?o===ur&&i===cr||o===lr&&i===dr?a:0:o===ur?i===cr?a.main:a.reverse:i===dr?a.main:a.reverse}function rh(a,i){return typeof a=="number"?a:a[i]??0}const Mc=Ze(([{deviation:a,fixedHeaderHeight:i,headerHeight:o,scrollTop:u,viewportHeight:d}])=>{const m=Ye(),p=ne(0),y=ne(0),g=ne(0),h=Yt(ee(wt(ke(u),ke(d),ke(o),ke(m,sr),ke(g),ke(p),ke(i),ke(a),ke(y)),fe(([C,b,k,[w,R],B,z,E,A,G])=>{const $=C-A,O=z+E,J=Math.max(k-$,0);let T=ah;const L=rh(G,cr),D=rh(G,dr);return w-=A,w+=k+E,R+=k+E,R-=A,w>C+O-L&&(T=ur),R<C-J+b+D&&(T=lr),T!==ah?[Math.max($-k-ih(B,cr,T)-L,0),$-J-E+b+ih(B,dr,T)+D]:null}),we(C=>C!==null),ct(sr)),[0,0]);return{increaseViewportBy:y,listBoundary:m,overscan:g,topListHeight:p,visibleRange:h}},dt(Zt),{singleton:!0});function ix(a,i,o){if(Vs(i)){const u=Kh(a,i);return[{index:_l(i.groupOffsetTree,u)[0],offset:0,size:0},{data:o==null?void 0:o[0],index:u,offset:0,size:0}]}return[{data:o==null?void 0:o[0],index:a,offset:0,size:0}]}const cc={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function zs(a,i,o,u,d,m){const{lastIndex:p,lastOffset:y,lastSize:g}=d;let h=0,C=0;if(a.length>0){h=a[0].offset;const B=a[a.length-1];C=B.offset+B.size}const b=o-p,k=y+b*g+(b-1)*u,w=h,R=k-C;return{bottom:C,firstItemIndex:m,items:sh(a,d,m),offsetBottom:R,offsetTop:h,top:w,topItems:sh(i,d,m),topListHeight:i.reduce((B,z)=>z.size+B,0),totalCount:o}}function Fh(a,i,o,u,d,m){let p=0;if(o.groupIndices.length>0)for(const C of o.groupIndices){if(C-p>=a)break;p++}const y=a+p,g=_c(i,y),h=Array.from({length:y}).map((C,b)=>({data:m[b+g],index:b+g,offset:0,size:0}));return zs(h,[],y,d,o,u)}function sh(a,i,o){if(a.length===0)return[];if(!Vs(i))return a.map(h=>({...h,index:h.index+o,originalIndex:h.index}));const u=a[0].index,d=a[a.length-1].index,m=[],p=Pa(i.groupOffsetTree,u,d);let y,g=0;for(const h of a){(!y||y.end<h.index)&&(y=p.shift(),g=i.groupIndices.indexOf(y.start));let C;h.index===y.start?C={index:g,type:"group"}:C={groupIndex:g,index:h.index-(g+1)+o},m.push({...C,data:h.data,offset:h.offset,originalIndex:h.index,size:h.size})}return m}function oh(a,i){return a===void 0?0:typeof a=="number"?a:a[i]??0}const oa=Ze(([{data:a,firstItemIndex:i,gap:o,sizes:u,totalCount:d},m,{listBoundary:p,topListHeight:y,visibleRange:g},{initialTopMostItemIndex:h,scrolledToInitialItem:C},{topListHeight:b},k,{didMount:w},{recalcInProgress:R}])=>{const B=ne([]),z=ne(0),E=Ye(),A=ne(0);ve(m.topItemsIndexes,B);const G=Yt(ee(wt(w,R,ke(g,sr),ke(d),ke(u),ke(h),C,ke(B),ke(i),ke(o),ke(A),a),we(([T,L,,D,,,,,,,,W])=>{const F=W!==void 0&&W.length!==D;return T&&!L&&!F}),fe(([,,[T,L],D,W,F,de,ce,P,re,_,Y])=>{var xe,Xe;const se=W,{offsetTree:Ce,sizeTree:je}=se,S=pt(z);if(D===0)return{...cc,totalCount:D};if(T===0&&L===0)return S===0?{...cc,totalCount:D}:Fh(S,F,W,P,re,Y||[]);if(nt(je))return S>0?null:zs(ix(_c(F,D),se,Y),[],D,re,se,P);const q=[];if(ce.length>0){const Be=ce[0],Q=ce[ce.length-1];let ie=0;for(const ae of Pa(je,Be,Q)){const ue=ae.value,me=Math.max(ae.start,Be),De=Math.min(ae.end,Q);for(let Re=me;Re<=De;Re++)q.push({data:Y==null?void 0:Y[Re],index:Re,offset:ie,size:ue}),ie+=ue}}if(!de)return zs([],q,D,re,se,P);const te=ce.length>0?ce[ce.length-1]+1:0,oe=K0(Ce,T,L,te);if(oe.length===0)return null;const he=D-1,be=Bs([],Be=>{for(const Q of oe){const ie=Q.value;let ae=ie.offset,ue=Q.start;const me=ie.size;if(ie.offset<T){ue+=Math.floor((T-ie.offset+re)/(me+re));const Re=ue-Q.start;ae+=Re*me+Re*re}ue<te&&(ae+=(te-ue)*me,ue=te);const De=Math.min(Q.end,he);for(let Re=ue;Re<=De&&!(ae>=L);Re++)Be.push({data:Y==null?void 0:Y[Re],index:Re,offset:ae,size:me}),ae+=me+re}}),Ee=oh(_,cr),le=oh(_,dr);if(be.length>0&&(Ee>0||le>0)){const Be=be[0],Q=be[be.length-1];if(Ee>0&&Be.index>te){const ie=Math.min(Ee,Be.index-te),ae=[];let ue=Be.offset;for(let me=Be.index-1;me>=Be.index-ie;me--){const De=((xe=Pa(je,me,me)[0])==null?void 0:xe.value)??Be.size;ue-=De+re,ae.unshift({data:Y==null?void 0:Y[me],index:me,offset:ue,size:De})}be.unshift(...ae)}if(le>0&&Q.index<he){const ie=Math.min(le,he-Q.index);let ae=Q.offset+Q.size+re;for(let ue=Q.index+1;ue<=Q.index+ie;ue++){const me=((Xe=Pa(je,ue,ue)[0])==null?void 0:Xe.value)??Q.size;be.push({data:Y==null?void 0:Y[ue],index:ue,offset:ae,size:me}),ae+=me+re}}}return zs(be,q,D,re,se,P)}),we(T=>T!==null),ct()),cc);ve(ee(a,we(kc),fe(T=>T==null?void 0:T.length)),d),ve(ee(G,fe(T=>T.topListHeight)),b),ve(b,y),ve(ee(G,fe(T=>[T.top,T.bottom])),p),ve(ee(G,fe(T=>T.items)),E);const $=dl(ee(G,we(({items:T})=>T.length>0),Oe(d,a),we(([{items:T},L])=>T[T.length-1].originalIndex===L-1),fe(([,T,L])=>[T-1,L]),ct(sr),fe(([T])=>T))),O=dl(ee(G,sn(200),we(({items:T,topItems:L})=>T.length>0&&T[0].originalIndex===L.length),fe(({items:T})=>T[0].index),ct())),J=dl(ee(G,we(({items:T})=>T.length>0),fe(({items:T})=>{let L=0,D=T.length-1;for(;T[L].type==="group"&&L<D;)L++;for(;T[D].type==="group"&&D>L;)D--;return{endIndex:T[D].index,startIndex:T[L].index}}),ct(Xh)));return{endReached:$,initialItemCount:z,itemsRendered:E,listState:G,minOverscanItemCount:A,rangeChanged:J,startReached:O,topItemsIndexes:B,...k}},dt(Bl,Jh,Mc,mr,fr,pr,Ln,Nc),{singleton:!0}),Ph=Ze(([{fixedFooterHeight:a,fixedHeaderHeight:i,footerHeight:o,headerHeight:u},{listState:d}])=>{const m=Ye(),p=Yt(ee(wt(o,a,u,i,d),fe(([y,g,h,C,b])=>y+g+h+C+b.offsetBottom+b.bottom)),0);return ve(ke(p),m),{totalListHeight:p,totalListHeightChanged:m}},dt(Zt,oa),{singleton:!0}),rx=Ze(([{viewportHeight:a},{totalListHeight:i}])=>{const o=ne(!1),u=Yt(ee(wt(o,a,i),we(([d])=>d),fe(([,d,m])=>Math.max(0,d-m)),sn(0),ct()),0);return{alignToBottom:o,paddingTopAddition:u}},dt(Zt,Ph),{singleton:!0}),ey=Ze(()=>({context:ne(null)})),sx=({itemBottom:a,itemTop:i,locationParams:{align:o,behavior:u,...d},viewportBottom:m,viewportTop:p})=>i<p?{...d,align:o??"start",...u!==void 0?{behavior:u}:{}}:a>m?{...d,align:o??"end",...u!==void 0?{behavior:u}:{}}:null,ty=Ze(([{gap:a,sizes:i,totalCount:o},{fixedFooterHeight:u,fixedHeaderHeight:d,headerHeight:m,scrollingInProgress:p,scrollTop:y,viewportHeight:g},{scrollToIndex:h}])=>{const C=Ye();return ve(ee(C,Oe(i,g,o,m,d,u,y),Oe(a),fe(([[b,k,w,R,B,z,E,A],G])=>{const{calculateViewLocation:$=sx,done:O,...J}=b,T=Zh(b,k,R-1),L=or(T,k.offsetTree,G)+B+z,D=L+_l(k.sizeTree,T)[1],W=A+z,F=A+w-E,de=$({itemBottom:D,itemTop:L,locationParams:J,viewportBottom:F,viewportTop:W});return de!==null?O&&zl(ee(p,we(ce=>!ce),ra(pt(p)?1:2)),O):O==null||O(),de}),we(b=>b!==null)),h),{scrollIntoView:C}},dt(Bl,Zt,fr,oa,On),{singleton:!0});function uh(a){return a===!1?!1:a==="smooth"?"smooth":"auto"}const ox=(a,i)=>typeof a=="function"?uh(a(i)):i&&uh(a),ux=Ze(([{listRefresh:a,totalCount:i,fixedItemSize:o,data:u},{atBottomState:d,isAtBottom:m},{scrollToIndex:p},{scrolledToInitialItem:y},{didMount:g,propsReady:h},{log:C},{scrollingInProgress:b},{context:k},{scrollIntoView:w}])=>{const R=ne(!1),B=Ye();let z=null;function E(O){Me(p,{align:"end",behavior:O,index:"LAST"})}$e(ee(wt(ee(ke(i),ra(1)),g),Oe(ke(R),m,y,b),fe(([[O,J],T,L,D,W])=>{let F=J&&D,de="auto";return F&&(de=ox(T,L||W),F=F&&de!==!1),{followOutputBehavior:de,shouldFollow:F,totalCount:O}}),we(({shouldFollow:O})=>O)),({followOutputBehavior:O,totalCount:J})=>{z!==null&&(z(),z=null),pt(o)!==void 0?requestAnimationFrame(()=>{pt(C)("following output to ",{totalCount:J},zt.DEBUG),E(O)}):z=zl(a,()=>{pt(C)("following output to ",{totalCount:J},zt.DEBUG),E(O),z=null})});function A(O){const J=zl(d,T=>{O&&!T.atBottom&&T.notAtBottomBecause==="SIZE_INCREASED"&&z===null&&(pt(C)("scrolling to bottom due to increased size",{},zt.DEBUG),E("auto"))});setTimeout(J,100)}$e(ee(wt(ke(R),i,h),we(([O,,J])=>O!==!1&&J),Ul(({value:O},[,J])=>({refreshed:O===J,value:J}),{refreshed:!1,value:0}),we(({refreshed:O})=>O),Oe(R,i)),([,O])=>{pt(y)&&A(O!==!1)}),$e(B,()=>{A(pt(R)!==!1)}),$e(wt(ke(R),d),([O,J])=>{O!==!1&&!J.atBottom&&J.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&E("auto")});const G=ne(null),$=Ye();return ve(gc(ee(ke(u),fe(O=>(O==null?void 0:O.length)??0)),ee(ke(i))),$),$e(ee(wt(ee($,ra(1)),g),Oe(ke(G),y,b,k),fe(([[O,J],T,L,D,W])=>J&&L&&(T==null?void 0:T({context:W,totalCount:O,scrollingInProgress:D}))),we(O=>!!O),sn(0)),O=>{z!==null&&(z(),z=null),pt(o)!==void 0?requestAnimationFrame(()=>{pt(C)("scrolling into view",{}),Me(w,O)}):z=zl(a,()=>{pt(C)("scrolling into view",{}),Me(w,O),z=null})}),{autoscrollToBottom:B,followOutput:R,scrollIntoViewOnChange:G}},dt(Bl,pr,fr,mr,Ln,On,Zt,ey,ty)),cx=Ze(([{data:a,firstItemIndex:i,gap:o,sizes:u},{initialTopMostItemIndex:d},{initialItemCount:m,listState:p},{didMount:y}])=>(ve(ee(y,Oe(m),we(([,g])=>g!==0),Oe(d,u,i,o,a),fe(([[,g],h,C,b,k,w=[]])=>Fh(g,h,C,b,k,w))),p),{}),dt(Bl,mr,oa,Ln),{singleton:!0}),dx=Ze(([{didMount:a},{scrollTo:i},{listState:o}])=>{const u=ne(0);return $e(ee(a,Oe(u),we(([,d])=>d!==0),fe(([,d])=>({top:d}))),d=>{zl(ee(o,ra(1),we(m=>m.items.length>1)),()=>{requestAnimationFrame(()=>{Me(i,d)})})}),{initialScrollTop:u}},dt(Ln,Zt,oa),{singleton:!0}),ly=Ze(([{scrollVelocity:a}])=>{const i=ne(!1),o=Ye(),u=ne(!1);return ve(ee(a,Oe(u,i,o),we(([d,m])=>m!==!1&&m!==void 0),fe(([d,m,p,y])=>{const{enter:g,exit:h}=m;if(p){if(h(d,y))return!1}else if(g(d,y))return!0;return p}),ct()),i),$e(ee(wt(i,a,o),Oe(u)),([[d,m,p],y])=>{d&&y!==!1&&y!==void 0&&y.change&&y.change(m,p)}),{isSeeking:i,scrollSeekConfiguration:u,scrollSeekRangeChanged:o,scrollVelocity:a}},dt(pr),{singleton:!0}),Dc=Ze(([{scrollContainerState:a,scrollTo:i}])=>{const o=Ye(),u=Ye(),d=Ye(),m=ne(!1),p=ne(void 0);return ve(ee(wt(o,u),fe(([{scrollTop:y,viewportHeight:g},{offsetTop:h,listHeight:C}])=>({scrollHeight:C,scrollTop:Math.max(0,y-h),viewportHeight:g}))),a),ve(ee(i,Oe(u),fe(([y,{offsetTop:g}])=>({...y,top:y.top+g}))),d),{customScrollParent:p,useWindowScroll:m,windowScrollContainerState:o,windowScrollTo:d,windowViewportRect:u}},dt(Zt)),fx=Ze(([{sizeRanges:a,sizes:i},{headerHeight:o,scrollTop:u},{initialTopMostItemIndex:d},{didMount:m},{useWindowScroll:p,windowScrollContainerState:y,windowViewportRect:g}])=>{const h=Ye(),C=ne(void 0),b=ne(null),k=ne(null);return ve(y,b),ve(g,k),$e(ee(h,Oe(i,u,p,b,k,o)),([w,R,B,z,E,A,G])=>{const $=J0(R.sizeTree);z&&E!==null&&A!==null&&(B=E.scrollTop-A.offsetTop),B-=G,w({ranges:$,scrollTop:B})}),ve(ee(C,we(kc),fe(mx)),d),ve(ee(m,Oe(C),we(([,w])=>w!==void 0),ct(),fe(([,w])=>w.ranges)),a),{getState:h,restoreStateFrom:C}},dt(Bl,Zt,mr,Ln,Dc));function mx(a){return{align:"start",index:0,offset:a.scrollTop}}const px=Ze(([{topItemsIndexes:a}])=>{const i=ne(0);return ve(ee(i,we(o=>o>=0),fe(o=>Array.from({length:o}).map((u,d)=>d))),a),{topItemCount:i}},dt(oa));function ny(a){let i=!1,o;return(()=>(i||(i=!0,o=a()),o))}const hx=ny(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),yx=Ze(([{deviation:a,scrollBy:i,scrollingInProgress:o,scrollTop:u},{isAtBottom:d,isScrolling:m,lastJumpDueToItemResize:p,scrollDirection:y},{listState:g},{beforeUnshiftWith:h,gap:C,shiftWithOffset:b,sizes:k},{log:w},{recalcInProgress:R}])=>{const B=dl(ee(g,Oe(p),Ul(([,E,A,G],[{bottom:$,items:O,offsetBottom:J,totalCount:T},L])=>{const D=$+J;let W=0;return A===T&&E.length>0&&O.length>0&&(O[0].originalIndex===0&&E[0].originalIndex===0||(W=D-G,W!==0&&(W+=L))),[W,O,T,D]},[0,[],0,0]),we(([E])=>E!==0),Oe(u,y,o,d,w,R),we(([,E,A,G,,,$])=>!$&&!G&&E!==0&&A===ur),fe(([[E],,,,,A])=>(A("Upward scrolling compensation",{amount:E},zt.DEBUG),E))));function z(E){E>0?(Me(i,{behavior:"auto",top:-E}),Me(a,0)):(Me(a,0),Me(i,{behavior:"auto",top:-E}))}return $e(ee(B,Oe(a,m)),([E,A,G])=>{G&&hx()?Me(a,A-E):z(-E)}),$e(ee(wt(Yt(m,!1),a,R),we(([E,A,G])=>!E&&!G&&A!==0),fe(([E,A])=>A),sn(1)),z),ve(ee(b,fe(E=>({top:-E}))),i),$e(ee(h,Oe(k,C),fe(([E,{groupIndices:A,lastSize:G,sizeTree:$},O])=>{function J(F){return F*(G+O)}if(A.length===0)return J(E);let T=0;const L=rr($,0);let D=0,W=0;for(;D<E;){D++,T+=L;let F=A.length===W+1?1/0:A[W+1]-A[W]-1;D+F>E&&(T-=L,F=E-D+1),D+=F,T+=J(F),W++}return T})),E=>{Me(a,E),requestAnimationFrame(()=>{Me(i,{top:E}),requestAnimationFrame(()=>{Me(a,0),Me(R,!1)})})}),{deviation:a}},dt(Zt,pr,oa,Bl,On,Nc)),gx=Ze(([a,i,o,u,d,m,p,y,g,h,C])=>({...a,...i,...o,...u,...d,...m,...p,...y,...g,...h,...C}),dt(Mc,cx,Ln,ly,Ph,dx,rx,Dc,ty,On,ey)),ay=Ze(([{data:a,defaultItemSize:i,firstItemIndex:o,fixedItemSize:u,fixedGroupSize:d,gap:m,groupIndices:p,heightEstimates:y,itemSize:g,sizeRanges:h,sizes:C,statefulTotalCount:b,totalCount:k,trackItemSizes:w},{initialItemFinalLocationReached:R,initialTopMostItemIndex:B,scrolledToInitialItem:z},E,A,G,$,{scrollToIndex:O},J,{topItemCount:T},{groupCounts:L},D])=>{const{listState:W,minOverscanItemCount:F,topItemsIndexes:de,rangeChanged:ce,...P}=$;return ve(ce,D.scrollSeekRangeChanged),ve(ee(D.windowViewportRect,fe(re=>re.visibleHeight)),E.viewportHeight),{data:a,defaultItemHeight:i,firstItemIndex:o,fixedItemHeight:u,fixedGroupHeight:d,gap:m,groupCounts:L,heightEstimates:y,initialItemFinalLocationReached:R,initialTopMostItemIndex:B,scrolledToInitialItem:z,sizeRanges:h,topItemCount:T,topItemsIndexes:de,totalCount:k,...G,groupIndices:p,itemSize:g,listState:W,minOverscanItemCount:F,scrollToIndex:O,statefulTotalCount:b,trackItemSizes:w,rangeChanged:ce,...P,...D,...E,sizes:C,...A}},dt(Bl,mr,Zt,fx,ux,oa,fr,yx,px,Jh,gx));function vx(a,i){const o={},u={};let d=0;const m=a.length;for(;d<m;)u[a[d]]=1,d+=1;for(const p in i)Object.hasOwn(u,p)||(o[p]=i[p]);return o}const As=typeof document<"u"?ge.useLayoutEffect:ge.useEffect;function iy(a,i,o){const u=Object.keys(i.required||{}),d=Object.keys(i.optional||{}),m=Object.keys(i.methods||{}),p=Object.keys(i.events||{}),y=ge.createContext({});function g(z,E){z.propsReady!==void 0&&Me(z.propsReady,!1);for(const A of u){const G=z[i.required[A]];Me(G,E[A])}for(const A of d)if(A in E){const G=z[i.optional[A]];Me(G,E[A])}z.propsReady!==void 0&&Me(z.propsReady,!0)}function h(z){return m.reduce((E,A)=>(E[A]=G=>{const $=z[i.methods[A]];Me($,G)},E),{})}function C(z){return p.reduce((E,A)=>(E[A]=D0(z[i.events[A]]),E),{})}const b=ge.forwardRef(function(z,E){const{children:A,...G}=z,[$]=ge.useState(()=>Bs(L0(a),T=>{g(T,G)})),[O]=ge.useState(Pp(C,$));As(()=>{for(const T of p)T in G&&$e(O[T],G[T]);return()=>{Object.values(O).map(wc)}},[G,O,$]),As(()=>{g($,G)}),ge.useImperativeHandle(E,Fp(h($)));const J=o;return c.jsx(y.Provider,{value:$,children:o!==void 0?c.jsx(J,{...vx([...u,...d,...p],G),children:A}):A})}),k=z=>{const E=ge.useContext(y);return ge.useCallback(A=>{Me(E[z],A)},[E,z])},w=z=>{const E=ge.useContext(y)[z],A=ge.useCallback(G=>$e(E,G),[E]);return ge.useSyncExternalStore(A,()=>pt(E),()=>pt(E))},R=z=>{const E=ge.useContext(y)[z],[A,G]=ge.useState(Pp(pt,E));return As(()=>$e(E,$=>{$!==A&&G(Fp($))}),[E,A]),A},B=parseInt(ge.version)>=18?w:R;return{Component:b,useEmitter:(z,E)=>{const A=ge.useContext(y)[z];As(()=>$e(A,E),[E,A])},useEmitterValue:B,usePublisher:k}}const ry=ge.createContext(void 0),sy=ge.createContext(void 0),dc="-webkit-sticky",ch="sticky",Oc=ny(()=>{if(typeof document>"u")return ch;const a=document.createElement("div");return a.style.position=dc,a.style.position===dc?dc:ch}),oy=typeof document<"u"?ge.useLayoutEffect:ge.useEffect;function fc(a){return"self"in a}function xx(a){return"body"in a}function uy(a,i,o,u=ai,d,m){const p=ge.useRef(null),y=ge.useRef(null),g=ge.useRef(null),h=ge.useCallback(k=>{let w,R,B;const z=k.target;if(xx(z)||fc(z)){const A=fc(z)?z:z.defaultView;B=m===!0?A.scrollX:A.scrollY,w=m===!0?A.document.documentElement.scrollWidth:A.document.documentElement.scrollHeight,R=m===!0?A.innerWidth:A.innerHeight}else B=m===!0?z.scrollLeft:z.scrollTop,w=m===!0?z.scrollWidth:z.scrollHeight,R=m===!0?z.offsetWidth:z.offsetHeight;const E=()=>{a({scrollHeight:w,scrollTop:Math.max(B,0),viewportHeight:R})};k.suppressFlushSync===!0?E():A0.flushSync(E),y.current!==null&&(B===y.current||B<=0||B===w-R)&&(y.current=null,i(!0),g.current&&(clearTimeout(g.current),g.current=null))},[a,i,m]);ge.useEffect(()=>{const k=d||p.current;return u(d||p.current),h({suppressFlushSync:!0,target:k}),k.addEventListener("scroll",h,{passive:!0}),()=>{u(null),k.removeEventListener("scroll",h)}},[p,h,o,u,d]);function C(k){const w=p.current;if(!w||(m===!0?"offsetWidth"in w&&w.offsetWidth===0:"offsetHeight"in w&&w.offsetHeight===0))return;const R=k.behavior==="smooth";let B,z,E;fc(w)?(z=Math.max(Mn(w.document.documentElement,m===!0?"width":"height"),m===!0?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight),B=m===!0?w.innerWidth:w.innerHeight,E=m===!0?window.scrollX:window.scrollY):(z=w[m===!0?"scrollWidth":"scrollHeight"],B=Mn(w,m===!0?"width":"height"),E=w[m===!0?"scrollLeft":"scrollTop"]);const A=z-B;if(k.top=Math.ceil(Math.max(Math.min(A,k.top),0)),Wh(B,z)||k.top===E){a({scrollHeight:z,scrollTop:E,viewportHeight:B}),R&&i(!0);return}R?(y.current=k.top,g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{g.current=null,y.current=null,i(!0)},1e3)):y.current=null,m===!0&&(k={...k.behavior!==void 0?{behavior:k.behavior}:{},left:k.top}),w.scrollTo(k)}function b(k){m===!0&&(k={...k.behavior!==void 0?{behavior:k.behavior}:{},...k.top!==void 0?{left:k.top}:{}}),p.current.scrollBy(k)}return{scrollByCallback:b,scrollerRef:p,scrollToCallback:C}}function Lc(a){return a}const bx=Ze(()=>{const a=ne(y=>`Item ${y}`),i=ne(y=>`Group ${y}`),o=ne({}),u=ne(Lc),d=ne("div"),m=ne(ai),p=(y,g=null)=>Yt(ee(o,fe(h=>h[y]),ct()),g);return{components:o,computeItemKey:u,EmptyPlaceholder:p("EmptyPlaceholder"),FooterComponent:p("Footer"),GroupComponent:p("Group","div"),groupContent:i,HeaderComponent:p("Header"),HeaderFooterTag:d,ItemComponent:p("Item","div"),itemContent:a,ListComponent:p("List","div"),ScrollerComponent:p("Scroller","div"),scrollerRef:m,ScrollSeekPlaceholder:p("ScrollSeekPlaceholder"),TopItemListComponent:p("TopItemList")}}),Sx=Ze(([a,i])=>({...a,...i}),dt(ay,bx)),Ex=({height:a})=>c.jsx("div",{style:{height:a}}),Tx={overflowAnchor:"none",position:Oc(),zIndex:1},cy={overflowAnchor:"none"},Cx={...cy,display:"inline-block",height:"100%"},dh=ge.memo(function({showTopList:a=!1}){const i=Ne("listState"),o=jl("sizeRanges"),u=Ne("useWindowScroll"),d=Ne("customScrollParent"),m=jl("windowScrollContainerState"),p=jl("scrollContainerState"),y=d||u?m:p,g=Ne("itemContent"),h=Ne("context"),C=Ne("groupContent"),b=Ne("trackItemSizes"),k=Ne("itemSize"),w=Ne("log"),R=jl("gap"),B=Ne("horizontalDirection"),{callbackRef:z}=B0(o,k,b,a?ai:y,w,R,d,B,Ne("skipAnimationFrameInResizeObserver")),[E,A]=ge.useState(0);Hc("deviation",P=>{E!==P&&A(P)});const G=Ne("EmptyPlaceholder"),$=Ne("ScrollSeekPlaceholder")??Ex,O=Ne("ListComponent"),J=Ne("ItemComponent"),T=Ne("GroupComponent"),L=Ne("computeItemKey"),D=Ne("isSeeking"),W=Ne("groupIndices").length>0,F=Ne("alignToBottom"),de=Ne("initialItemFinalLocationReached"),ce=a?{}:{boxSizing:"border-box",...B?{display:"inline-block",height:"100%",marginLeft:E!==0?E:F?"auto":0,paddingLeft:i.offsetTop,paddingRight:i.offsetBottom,whiteSpace:"nowrap"}:{marginTop:E!==0?E:F?"auto":0,paddingBottom:i.offsetBottom,paddingTop:i.offsetTop},...de?{}:{visibility:"hidden"}};return!a&&i.totalCount===0&&G!==null&&G!==void 0?c.jsx(G,{...qt(G,h)}):c.jsx(O,{...qt(O,h),"data-testid":a?"virtuoso-top-item-list":"virtuoso-item-list",ref:z,style:ce,children:(a?i.topItems:i.items).map(P=>{const re=P.originalIndex,_=L(re+i.firstItemIndex,P.data,h);return D?x.createElement($,{...qt($,h),height:P.size,index:P.index,key:_,type:P.type||"item",...P.type==="group"?{}:{groupIndex:P.groupIndex}}):P.type==="group"?x.createElement(T,{...qt(T,h),"data-index":re,"data-item-index":P.index,"data-known-size":P.size,key:_,style:Tx},C(P.index,h)):x.createElement(J,{...qt(J,h),...Ax(J,P.data),"data-index":re,"data-item-group-index":P.groupIndex,"data-item-index":P.index,"data-known-size":P.size,key:_,style:B?Cx:cy},W?g(P.index,P.groupIndex,P.data,h):g(P.index,P.data,h))})})}),jx={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},kx={outline:"none",overflowX:"auto",position:"relative"},Gs=a=>({height:"100%",position:"absolute",top:0,width:"100%",...a?{display:"flex",flexDirection:"column"}:void 0}),wx={position:Oc(),top:0,width:"100%",zIndex:1};function qt(a,i){if(typeof a!="string")return{context:i}}function Ax(a,i){return{item:typeof a=="string"?void 0:i}}const Nx=ge.memo(function(){const a=Ne("HeaderComponent"),i=jl("headerHeight"),o=Ne("HeaderFooterTag"),u=sa(ge.useMemo(()=>m=>{i(Mn(m,"height"))},[i]),!0,Ne("skipAnimationFrameInResizeObserver")),d=Ne("context");return a!=null?c.jsx(o,{ref:u,children:c.jsx(a,{...qt(a,d)})}):null}),Rx=ge.memo(function(){const a=Ne("FooterComponent"),i=jl("footerHeight"),o=Ne("HeaderFooterTag"),u=sa(ge.useMemo(()=>m=>{i(Mn(m,"height"))},[i]),!0,Ne("skipAnimationFrameInResizeObserver")),d=Ne("context");return a!=null?c.jsx(o,{ref:u,children:c.jsx(a,{...qt(a,d)})}):null});function dy({useEmitter:a,useEmitterValue:i,usePublisher:o}){return ge.memo(function({children:u,style:d,context:m,...p}){const y=o("scrollContainerState"),g=i("ScrollerComponent"),h=o("smoothScrollTargetReached"),C=i("scrollerRef"),b=i("horizontalDirection")||!1,{scrollByCallback:k,scrollerRef:w,scrollToCallback:R}=uy(y,h,g,C,void 0,b);return a("scrollTo",R),a("scrollBy",k),c.jsx(g,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:w,style:{...b?kx:jx,...d},tabIndex:0,...p,...qt(g,m),children:u})})}function fy({useEmitter:a,useEmitterValue:i,usePublisher:o}){return ge.memo(function({children:u,style:d,context:m,...p}){const y=o("windowScrollContainerState"),g=i("ScrollerComponent"),h=o("smoothScrollTargetReached"),C=i("totalListHeight"),b=i("deviation"),k=i("customScrollParent"),w=ge.useRef(null),R=i("scrollerRef"),{scrollByCallback:B,scrollerRef:z,scrollToCallback:E}=uy(y,h,g,R,k);return oy(()=>{var A;return z.current=k||((A=w.current)==null?void 0:A.ownerDocument.defaultView),()=>{z.current=null}},[z,k]),a("windowScrollTo",E),a("scrollBy",B),c.jsx(g,{ref:w,"data-virtuoso-scroller":!0,style:{position:"relative",...d,...C!==0?{height:C+b}:void 0},...p,...qt(g,m),children:u})})}const zx=({children:a})=>{const i=ge.useContext(ry),o=jl("viewportHeight"),u=jl("fixedItemHeight"),d=Ne("alignToBottom"),m=Ne("horizontalDirection"),p=ge.useMemo(()=>Hh(o,g=>Mn(g,m?"width":"height")),[o,m]),y=sa(p,!0,Ne("skipAnimationFrameInResizeObserver"));return ge.useEffect(()=>{i&&(o(i.viewportHeight),u(i.itemHeight))},[i,o,u]),c.jsx("div",{"data-viewport-type":"element",ref:y,style:Gs(d),children:a})},_x=({children:a})=>{const i=ge.useContext(ry),o=jl("windowViewportRect"),u=jl("fixedItemHeight"),d=Ne("customScrollParent"),m=Bh(o,d,Ne("skipAnimationFrameInResizeObserver")),p=Ne("alignToBottom");return ge.useEffect(()=>{i&&(u(i.itemHeight),o({listHeight:0,offsetTop:0,visibleHeight:i.viewportHeight,visibleWidth:100}))},[i,o,u]),c.jsx("div",{"data-viewport-type":"window",ref:m,style:Gs(p),children:a})},Mx=({children:a})=>{const i=Ne("TopItemListComponent")??"div",o=Ne("headerHeight"),u={...wx,marginTop:`${o}px`},d=Ne("context");return c.jsx(i,{style:u,...qt(i,d),children:a})},Dx=ge.memo(function(a){const i=Ne("useWindowScroll"),o=Ne("topItemsIndexes").length>0,u=Ne("customScrollParent"),d=Ne("context");return c.jsxs(u||i?Hx:Lx,{...a,context:d,children:[o&&c.jsx(Mx,{children:c.jsx(dh,{showTopList:!0})}),c.jsxs(u||i?_x:zx,{children:[c.jsx(Nx,{}),c.jsx(dh,{}),c.jsx(Rx,{})]})]})}),{Component:Ox,useEmitter:Hc,useEmitterValue:Ne,usePublisher:jl}=iy(Sx,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Dx),Lx=dy({useEmitter:Hc,useEmitterValue:Ne,usePublisher:jl}),Hx=fy({useEmitter:Hc,useEmitterValue:Ne,usePublisher:jl}),Ux=Ox,Bx=Ze(()=>{const a=ne(h=>c.jsxs("td",{children:["Item $",h]})),i=ne(null),o=ne(h=>c.jsxs("td",{colSpan:1e3,children:["Group ",h]})),u=ne(null),d=ne(null),m=ne({}),p=ne(Lc),y=ne(ai),g=(h,C=null)=>Yt(ee(m,fe(b=>b[h]),ct()),C);return{components:m,computeItemKey:p,context:i,EmptyPlaceholder:g("EmptyPlaceholder"),FillerRow:g("FillerRow"),fixedFooterContent:d,fixedHeaderContent:u,itemContent:a,groupContent:o,ScrollerComponent:g("Scroller","div"),scrollerRef:y,ScrollSeekPlaceholder:g("ScrollSeekPlaceholder"),TableBodyComponent:g("TableBody","tbody"),TableComponent:g("Table","table"),TableFooterComponent:g("TableFoot","tfoot"),TableHeadComponent:g("TableHead","thead"),TableRowComponent:g("TableRow","tr"),GroupComponent:g("Group","tr")}});dt(ay,Bx);Oc();const fh={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},Vx={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:mh,floor:Os,max:nr,min:mc,round:ph}=Math;function hh(a,i,o){return Array.from({length:i-a+1}).map((u,d)=>({data:o===null?null:o[d+a],index:d+a}))}function Gx(a){return{...Vx,items:a}}function Ns(a,i){return a!==void 0&&a.width===i.width&&a.height===i.height}function Ix(a,i){return a!==void 0&&a.column===i.column&&a.row===i.row}const qx=Ze(([{increaseViewportBy:a,listBoundary:i,overscan:o,visibleRange:u},{footerHeight:d,headerHeight:m,scrollBy:p,scrollContainerState:y,scrollTo:g,scrollTop:h,smoothScrollTargetReached:C,viewportHeight:b},k,w,{didMount:R,propsReady:B},{customScrollParent:z,useWindowScroll:E,windowScrollContainerState:A,windowScrollTo:G,windowViewportRect:$},O])=>{const J=ne(0),T=ne(0),L=ne(fh),D=ne({height:0,width:0}),W=ne({height:0,width:0}),F=Ye(),de=Ye(),ce=ne(0),P=ne(null),re=ne({column:0,row:0}),_=Ye(),Y=Ye(),se=ne(!1),Ce=ne(0),je=ne(!0),S=ne(!1),q=ne(!1);$e(ee(R,Oe(Ce),we(([le,xe])=>xe!==0)),()=>{Me(je,!1)}),$e(ee(wt(R,je,W,D,Ce,S),we(([le,xe,Xe,Be,,Q])=>le&&!xe&&Xe.height!==0&&Be.height!==0&&!Q)),([,,,,le])=>{Me(S,!0),zc(1,()=>{Me(F,le)}),zl(ee(h),()=>{Me(i,[0,0]),Me(je,!0)})}),ve(ee(Y,we(le=>le!=null&&le.scrollTop>0),Hl(0)),T),$e(ee(R,Oe(Y),we(([,le])=>le!=null)),([,le])=>{le&&(Me(D,le.viewport),Me(W,le.item),Me(re,le.gap),le.scrollTop>0&&(Me(se,!0),zl(ee(h,ra(1)),xe=>{Me(se,!1)}),Me(g,{top:le.scrollTop})))}),ve(ee(D,fe(({height:le})=>le)),b),ve(ee(wt(ke(D,Ns),ke(W,Ns),ke(re,(le,xe)=>le!==void 0&&le.column===xe.column&&le.row===xe.row),ke(h)),fe(([le,xe,Xe,Be])=>({gap:Xe,item:xe,scrollTop:Be,viewport:le}))),_),ve(ee(wt(ke(J),u,ke(re,Ix),ke(W,Ns),ke(D,Ns),ke(P),ke(T),ke(se),ke(je),ke(Ce)),we(([,,,,,,,le])=>!le),fe(([le,[xe,Xe],Be,Q,ie,ae,ue,,me,De])=>{const{column:Re,row:vt}=Be,{height:fl,width:ht}=Q,{width:Xt}=ie;if(ue===0&&(le===0||Xt===0))return fh;if(ht===0){const At=_c(De,le),si=At+Math.max(ue-1,0);return Gx(hh(At,si,ae))}const wl=my(Xt,ht,Re);let at,Et;me?xe===0&&Xe===0&&ue>0?(at=0,Et=ue-1):(at=wl*Os((xe+vt)/(fl+vt)),Et=wl*mh((Xe+vt)/(fl+vt))-1,Et=mc(le-1,nr(Et,wl-1)),at=mc(Et,nr(0,at))):(at=0,Et=-1);const Hn=hh(at,Et,ae),{bottom:Un,top:Le}=yh(ie,Be,Q,Hn),Ot=mh(le/wl),ml=Ot*fl+(Ot-1)*vt-Un;return{bottom:Un,itemHeight:fl,items:Hn,itemWidth:ht,offsetBottom:ml,offsetTop:Le,top:Le}})),L),ve(ee(P,we(le=>le!==null),fe(le=>le.length)),J),ve(ee(wt(D,W,L,re),we(([le,xe,{items:Xe}])=>Xe.length>0&&xe.height!==0&&le.height!==0),fe(([le,xe,{items:Xe},Be])=>{const{bottom:Q,top:ie}=yh(le,Be,xe,Xe);return[ie,Q]}),ct(sr)),i);const te=ne(!1);ve(ee(h,Oe(te),fe(([le,xe])=>xe||le!==0)),te);const oe=dl(ee(wt(L,J),we(([{items:le}])=>le.length>0),Oe(te),we(([[le,xe],Xe])=>{const Be=le.items[le.items.length-1].index===xe-1;return(Xe||le.bottom>0&&le.itemHeight>0&&le.offsetBottom===0&&le.items.length===xe)&&Be}),fe(([[,le]])=>le-1),ct())),he=dl(ee(ke(L),we(({items:le})=>le.length>0&&le[0].index===0),Hl(0),ct())),be=dl(ee(ke(L),Oe(se),we(([{items:le},xe])=>le.length>0&&!xe),fe(([{items:le}])=>({endIndex:le[le.length-1].index,startIndex:le[0].index})),ct(Xh),sn(0)));ve(be,w.scrollSeekRangeChanged),ve(ee(F,Oe(D,W,J,re),fe(([le,xe,Xe,Be,Q])=>{const ie=$h(le),{align:ae,behavior:ue,offset:me}=ie;let De=ie.index;De==="LAST"&&(De=Be-1),De=nr(0,De,mc(Be-1,De));let Re=Ec(xe,Q,Xe,De);return ae==="end"?Re=ph(Re-xe.height+Xe.height):ae==="center"&&(Re=ph(Re-xe.height/2+Xe.height/2)),me!==void 0&&me!==0&&(Re+=me),{behavior:ue,top:Re}})),g);const Ee=Yt(ee(L,fe(le=>le.offsetBottom+le.bottom)),0);return ve(ee($,fe(le=>({height:le.visibleHeight,width:le.visibleWidth}))),D),{customScrollParent:z,data:P,deviation:ce,footerHeight:d,gap:re,headerHeight:m,increaseViewportBy:a,initialItemCount:T,itemDimensions:W,overscan:o,restoreStateFrom:Y,scrollBy:p,scrollContainerState:y,scrollHeight:de,scrollTo:g,scrollToIndex:F,scrollTop:h,smoothScrollTargetReached:C,totalCount:J,useWindowScroll:E,viewportDimensions:D,windowScrollContainerState:A,windowScrollTo:G,windowViewportRect:$,...w,gridState:L,horizontalDirection:q,initialTopMostItemIndex:Ce,totalListHeight:Ee,...k,endReached:oe,propsReady:B,rangeChanged:be,startReached:he,stateChanged:_,stateRestoreInProgress:se,...O}},dt(Mc,Zt,pr,ly,Ln,Dc,On));function my(a,i,o){return nr(1,Os((a+o)/(Os(i)+o)))}function yh(a,i,o,u){const{height:d}=o;if(d===void 0||u.length===0)return{bottom:0,top:0};const m=Ec(a,i,o,u[0].index);return{bottom:Ec(a,i,o,u[u.length-1].index)+d,top:m}}function Ec(a,i,o,u){const d=my(a.width,o.width,i.column),m=Os(u/d),p=m*o.height+nr(0,m-1)*i.row;return p>0?p+i.row:p}const Yx=Ze(()=>{const a=ne(b=>`Item ${b}`),i=ne({}),o=ne(null),u=ne("virtuoso-grid-item"),d=ne("virtuoso-grid-list"),m=ne(Lc),p=ne("div"),y=ne(ai),g=(b,k=null)=>Yt(ee(i,fe(w=>w[b]),ct()),k),h=ne(!1),C=ne(!1);return ve(ke(C),h),{components:i,computeItemKey:m,context:o,FooterComponent:g("Footer"),HeaderComponent:g("Header"),headerFooterTag:p,itemClassName:u,ItemComponent:g("Item","div"),itemContent:a,listClassName:d,ListComponent:g("List","div"),readyStateChanged:h,reportReadyState:C,ScrollerComponent:g("Scroller","div"),scrollerRef:y,ScrollSeekPlaceholder:g("ScrollSeekPlaceholder","div")}}),Xx=Ze(([a,i])=>({...a,...i}),dt(qx,Yx)),Qx=ge.memo(function(){const a=mt("gridState"),i=mt("listClassName"),o=mt("itemClassName"),u=mt("itemContent"),d=mt("computeItemKey"),m=mt("isSeeking"),p=kl("scrollHeight"),y=mt("ItemComponent"),g=mt("ListComponent"),h=mt("ScrollSeekPlaceholder"),C=mt("context"),b=kl("itemDimensions"),k=kl("gap"),w=mt("log"),R=mt("stateRestoreInProgress"),B=kl("reportReadyState"),z=sa(ge.useMemo(()=>E=>{const A=E.parentElement.parentElement.scrollHeight;p(A);const G=E.firstChild;if(G!==null){const{height:$,width:O}=G.getBoundingClientRect();b({height:$,width:O})}k({column:gh("column-gap",getComputedStyle(E).columnGap,w),row:gh("row-gap",getComputedStyle(E).rowGap,w)})},[p,b,k,w]),!0,!1);return oy(()=>{a.itemHeight>0&&a.itemWidth>0&&B(!0)},[a]),R?null:c.jsx(g,{className:i,ref:z,...qt(g,C),"data-testid":"virtuoso-item-list",style:{paddingBottom:a.offsetBottom,paddingTop:a.offsetTop},children:a.items.map(E=>{const A=d(E.index,E.data,C);return m?c.jsx(h,{...qt(h,C),height:a.itemHeight,index:E.index,width:a.itemWidth},A):x.createElement(y,{...qt(y,C),className:o,"data-index":E.index,key:A},u(E.index,E.data,C))})})}),Kx=ge.memo(function(){const a=mt("HeaderComponent"),i=kl("headerHeight"),o=mt("headerFooterTag"),u=sa(ge.useMemo(()=>m=>{i(Mn(m,"height"))},[i]),!0,!1),d=mt("context");return a!=null?c.jsx(o,{ref:u,children:c.jsx(a,{...qt(a,d)})}):null}),Zx=ge.memo(function(){const a=mt("FooterComponent"),i=kl("footerHeight"),o=mt("headerFooterTag"),u=sa(ge.useMemo(()=>m=>{i(Mn(m,"height"))},[i]),!0,!1),d=mt("context");return a!=null?c.jsx(o,{ref:u,children:c.jsx(a,{...qt(a,d)})}):null}),Jx=({children:a})=>{const i=ge.useContext(sy),o=kl("itemDimensions"),u=kl("viewportDimensions"),d=sa(ge.useMemo(()=>m=>{u(m.getBoundingClientRect())},[u]),!0,!1);return ge.useEffect(()=>{i&&(u({height:i.viewportHeight,width:i.viewportWidth}),o({height:i.itemHeight,width:i.itemWidth}))},[i,u,o]),c.jsx("div",{ref:d,style:Gs(!1),children:a})},$x=({children:a})=>{const i=ge.useContext(sy),o=kl("windowViewportRect"),u=kl("itemDimensions"),d=mt("customScrollParent"),m=Bh(o,d,!1);return ge.useEffect(()=>{i&&(u({height:i.itemHeight,width:i.itemWidth}),o({listHeight:0,offsetTop:0,visibleHeight:i.viewportHeight,visibleWidth:i.viewportWidth}))},[i,o,u]),c.jsx("div",{ref:m,style:Gs(!1),children:a})},Wx=ge.memo(function({...a}){const i=mt("useWindowScroll"),o=mt("customScrollParent"),u=o||i?Px:Fx,d=o||i?$x:Jx,m=mt("context");return c.jsx(u,{...a,...qt(u,m),children:c.jsxs(d,{children:[c.jsx(Kx,{}),c.jsx(Qx,{}),c.jsx(Zx,{})]})})}),{useEmitter:py,useEmitterValue:mt,usePublisher:kl}=iy(Xx,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},Wx),Fx=dy({useEmitter:py,useEmitterValue:mt,usePublisher:kl}),Px=fy({useEmitter:py,useEmitterValue:mt,usePublisher:kl});function gh(a,i,o){return i!=="normal"&&(i==null?void 0:i.endsWith("px"))!==!0&&o(`${a} was not resolved to pixel value correctly`,i,zt.WARN),i==="normal"?0:parseInt(i??"0",10)}const e1={source:"vskill-sidebar-own-collapsed",installed:"vskill-sidebar-installed-collapsed"},t1={source:"Own",installed:"Installed"};function l1(a){try{return localStorage.getItem(a)==="true"}catch{return!1}}function n1(a,i){try{localStorage.setItem(a,i?"true":"false")}catch{}}function vh({origin:a,count:i,filteredCount:o,children:u}){const d=e1[a],[m,p]=x.useState(()=>l1(d)),y=x.useCallback(()=>{p(b=>{const k=!b;return n1(d,k),k})},[d]),g=t1[a],h=`sidebar-section-${a}-header`,C=`sidebar-section-${a}-group`;return c.jsxs("section",{"aria-labelledby":h,style:{display:"flex",flexDirection:"column",minHeight:0},children:[c.jsxs("button",{id:h,type:"button","data-testid":"sidebar-section-header","aria-expanded":!m,"aria-controls":C,onClick:y,style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"8px 12px 6px 14px",background:"transparent",border:"none",cursor:"pointer",color:"var(--text-primary)",fontFamily:"var(--font-sans)",textAlign:"left"},children:[c.jsx(a1,{collapsed:m}),c.jsx("h2",{"aria-level":2,style:{fontSize:11,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--text-primary)",margin:0},children:g}),c.jsx("span",{style:{fontSize:10,color:"var(--text-secondary)",fontVariantNumeric:"tabular-nums",fontFamily:"var(--font-mono)"},children:o!=null&&o!==i?`(${o} of ${i})`:`(${i})`})]}),!m&&c.jsx("div",{id:C,role:"group","aria-labelledby":h,style:{display:"flex",flexDirection:"column",minHeight:0},children:u})]})}function a1({collapsed:a}){return c.jsx("svg",{"aria-hidden":"true",width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:a?"rotate(0deg)":"rotate(90deg)",transition:"transform var(--duration-fast, 120ms) var(--ease-standard, ease)",flexShrink:0},children:c.jsx("polyline",{points:"9 18 15 12 9 6"})})}function i1(a,i){const o=i.trim().toLowerCase();return o?a.skill.toLowerCase().includes(o)||a.plugin.toLowerCase().includes(o)||a.dir.toLowerCase().includes(o):!0}function r1({value:a,onChange:i,placeholder:o="Filter skills…",validationPattern:u,validationMessage:d="Invalid filter expression"}){const m=x.useRef(null),p=x.useId(),y=!!u&&a.trim()!==""&&!u.test(a);return x.useEffect(()=>{function g(h){var k;if(h.key!=="/")return;const C=h.target;if(!C)return;const b=C.tagName;b==="INPUT"||b==="TEXTAREA"||C.isContentEditable||(h.preventDefault(),(k=m.current)==null||k.focus())}return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[]),c.jsxs("div",{role:"search",style:{display:"flex",alignItems:"center",gap:6,padding:"6px 12px",borderBottom:"1px solid var(--border-default)"},children:[c.jsxs("svg",{"aria-hidden":"true",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[c.jsx("circle",{cx:"11",cy:"11",r:"8"}),c.jsx("path",{d:"M21 21l-4.35-4.35"})]}),c.jsx("input",{ref:m,type:"search","aria-label":"Filter skills","aria-invalid":y?!0:void 0,"aria-describedby":y?p:void 0,value:a,placeholder:o,onChange:g=>i(g.currentTarget.value),onKeyDown:g=>{g.key==="Escape"&&(i(""),g.currentTarget.blur())},style:{flex:1,minWidth:0,border:"none",outline:"none",background:"transparent",color:"var(--text-primary)",fontFamily:"var(--font-sans)",fontSize:12,padding:"2px 0"}}),y&&c.jsx("span",{id:p,role:"alert","aria-live":"polite",style:{fontFamily:"var(--font-sans)",fontSize:10,color:"var(--text-error, #B42318)",marginLeft:4,whiteSpace:"nowrap"},children:d}),c.jsx("kbd",{"aria-hidden":"true",style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--text-secondary)",border:"1px solid var(--border-default)",padding:"1px 5px",borderRadius:3,display:a?"none":"inline-block"},children:"/"})]})}function hy({skill:a,isSelected:i,onSelect:o,onContextMenu:u}){const d=a.origin==="installed"?"var(--status-installed)":"var(--status-own)";return c.jsxs("button",{type:"button",onClick:o,onContextMenu:u?m=>{m.preventDefault(),u(m,a)}:void 0,"aria-current":i?"true":void 0,"data-selected":i,"data-origin":a.origin,style:{display:"flex",alignItems:"center",gap:8,width:"100%",height:36,padding:"0 12px 0 14px",background:i?"color-mix(in srgb, var(--accent-surface) 10%, transparent)":"transparent",boxShadow:i?"inset 2px 0 0 var(--color-accent, var(--accent-surface))":"none",border:"none",borderRadius:0,color:"var(--text-primary)",cursor:"pointer",fontFamily:"var(--font-sans)",fontSize:13,textAlign:"left",transition:"background-color var(--duration-fast, 120ms) var(--ease-standard, ease), box-shadow var(--duration-base, 180ms) var(--ease-standard, ease)"},children:[c.jsx("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:d,display:"inline-block",flexShrink:0}}),c.jsx("span",{title:a.skill,style:{minWidth:0,flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.skill}),a.version&&c.jsx("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--text-secondary)",fontVariantNumeric:"tabular-nums",flexShrink:0},children:a.version}),a.updateAvailable&&c.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:3,fontSize:10,fontFamily:"var(--font-mono)",fontVariantNumeric:"tabular-nums",color:"var(--accent-surface)",padding:"1px 6px",border:"1px solid var(--accent-surface)",borderRadius:4,flexShrink:0,textTransform:"lowercase"},title:a.latestVersion?`Update available: ${a.latestVersion}`:"Update available",children:[c.jsxs("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M12 19V5"}),c.jsx("path",{d:"M5 12l7-7 7 7"})]}),"update"]})]})}function s1({plugin:a,skills:i,selectedKey:o,onSelect:u,onContextMenu:d}){const m=[...i].sort((p,y)=>p.skill.localeCompare(y.skill));return c.jsxs("div",{role:"group","aria-label":`${a} (${i.length})`,children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px 4px 14px"},children:[c.jsx("span",{style:{fontSize:10,fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--text-secondary)",fontFamily:"var(--font-sans)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:a,children:a}),c.jsxs("span",{style:{fontSize:10,color:"var(--text-secondary)",fontVariantNumeric:"tabular-nums",fontFamily:"var(--font-mono)"},children:["(",i.length,")"]})]}),c.jsx("div",{role:"list",children:m.map(p=>{const y=!!o&&o.plugin===p.plugin&&o.skill===p.skill;return c.jsx("div",{role:"listitem",children:c.jsx(hy,{skill:p,isSelected:y,onSelect:()=>u(p),onContextMenu:d})},`${p.plugin}/${p.skill}`)})})]})}function o1(){return c.jsxs("div",{"aria-hidden":"true",role:"presentation",style:{display:"flex",alignItems:"center",gap:8,height:36,padding:"0 12px 0 14px"},children:[c.jsx("span",{className:"placeholder",style:{width:6,height:6,borderRadius:"50%",flexShrink:0}}),c.jsx("span",{className:"placeholder",style:{height:10,flex:1,borderRadius:3,maxWidth:180}})]})}function u1(a){const i=a.key.split("+").map(y=>y.trim()).filter(Boolean);let o=!!a.meta,u=!!a.ctrl,d=!!a.shift,m=!!a.alt,p=a.key;if(i.length>1){for(const y of i.slice(0,-1)){const g=y.toLowerCase();g==="cmd"||g==="meta"||g==="⌘"?o=!0:g==="ctrl"||g==="control"?u=!0:g==="shift"?d=!0:(g==="alt"||g==="option")&&(m=!0)}p=i[i.length-1]}return{key:p.length===1?p.toLowerCase():p,meta:o,ctrl:u,shift:d,alt:m,allowInInputs:!!a.allowInInputs,handler:a.handler}}function c1(a){if(!a||!(a instanceof HTMLElement))return!1;const i=a.tagName;if(i==="INPUT"||i==="TEXTAREA"||a.isContentEditable)return!0;const o=a.getAttribute("contenteditable");return o!=null&&o!=="false"||a.getAttribute("role")==="textbox"}function d1(a,i){const o=!!a.metaKey,u=!!a.ctrlKey,d=!!a.shiftKey,m=!!a.altKey;return o!==i.meta||u!==i.ctrl||d!==i.shift||m!==i.alt?!1:(a.key.length===1?a.key.toLowerCase():a.key)===i.key}function yy(a,i={}){const{enabled:o=!0,target:u}=i,d=x.useRef([]),m=Array.isArray(a)?a:[a];d.current=m.map(u1),x.useEffect(()=>{if(!o)return;const p=u??(typeof window<"u"?window:void 0);if(!p)return;function y(g){const h=g,C=c1(h.target);for(const b of d.current){if(!d1(h,b))continue;const k=b.meta||b.ctrl||b.alt;if(!(C&&!b.allowInInputs&&!k)){b.handler(h);return}}}return p.addEventListener("keydown",y),()=>{p.removeEventListener("keydown",y)}},[o,u])}const f1=200;function m1(a,i){const o=[],u=[];for(const m of a)(m.origin==="installed"?u:o).push(m);function d(m){var h;const p=m.filter(C=>i1(C,i)),y={};for(const C of p)(y[h=C.plugin]||(y[h]=[])).push(C);const g=Object.entries(y).sort((C,b)=>C[0].localeCompare(b[0]));return{total:m.length,filtered:p.length,byPlugin:g}}return{own:d(o),installed:d(u)}}function p1({skills:a,selectedKey:i,onSelect:o,isLoading:u,error:d,onRetry:m,onContextMenu:p}){const[y,g]=x.useState(""),{own:h,installed:C}=x.useMemo(()=>m1(a,y),[a,y]),k=h.filtered+C.filtered>=f1,w=x.useMemo(()=>{const z=E=>{const A=[];for(const[,G]of E){const $=[...G].sort((O,J)=>O.skill.localeCompare(J.skill));A.push(...$)}return A};return[...z(h.byPlugin),...z(C.byPlugin)]},[h.byPlugin,C.byPlugin]),R=x.useMemo(()=>i?w.findIndex(z=>z.plugin===i.plugin&&z.skill===i.skill):-1,[w,i]),B=x.useCallback(z=>{if(w.length===0)return;const E=R<0?z>0?0:w.length-1:Math.min(Math.max(R+z,0),w.length-1);o(w[E])},[w,R,o]);return yy([{key:"j",handler:()=>B(1)},{key:"k",handler:()=>B(-1)},{key:"Enter",handler:()=>{R>=0&&o(w[R])}}],{enabled:!u&&!d}),c.jsxs("div",{"data-testid":"sidebar",style:{display:"flex",flexDirection:"column",minHeight:0,height:"100%",fontFamily:"var(--font-sans)"},children:[c.jsx(r1,{value:y,onChange:g}),u&&c.jsx(x1,{}),!u&&d&&c.jsx(b1,{error:d,onRetry:m}),!u&&!d&&c.jsxs("div",{style:{flex:1,overflowY:"auto",minHeight:0},children:[c.jsx(vh,{origin:"source",count:h.total,filteredCount:y?h.filtered:null,children:h.filtered===0?c.jsx(y1,{queryActive:!!y}):c.jsx(xh,{items:h.byPlugin,selectedKey:i,onSelect:o,onContextMenu:p,useVirtual:k})}),c.jsx(v1,{}),c.jsx(vh,{origin:"installed",count:C.total,filteredCount:y?C.filtered:null,children:C.filtered===0?c.jsx(g1,{queryActive:!!y}):c.jsx(xh,{items:C.byPlugin,selectedKey:i,onSelect:o,onContextMenu:p,useVirtual:k})})]})]})}function h1(a){const i=[];for(const[o,u]of a){const d=[...u].sort((m,p)=>m.skill.localeCompare(p.skill));i.push({kind:"header",plugin:o,count:d.length});for(const m of d)i.push({kind:"row",skill:m})}return i}function xh({items:a,selectedKey:i,onSelect:o,onContextMenu:u,useVirtual:d}){if(d){const m=h1(a);return c.jsx("div",{"data-virtualized":"true",style:{height:420,minHeight:200},children:c.jsx(Ux,{overscan:4,totalCount:m.length,itemContent:p=>{const y=m[p];if(!y)return null;if(y.kind==="header")return c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px 4px 14px"},children:[c.jsx("span",{style:{fontSize:10,fontWeight:600,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--text-secondary)",fontFamily:"var(--font-sans)"},children:y.plugin}),c.jsxs("span",{style:{fontSize:10,color:"var(--text-secondary)",fontVariantNumeric:"tabular-nums",fontFamily:"var(--font-mono)"},children:["(",y.count,")"]})]});const g=y.skill,h=!!i&&i.plugin===g.plugin&&i.skill===g.skill;return c.jsx(hy,{skill:g,isSelected:h,onSelect:()=>o(g),onContextMenu:u})}})})}return c.jsx("div",{"data-virtualized":"false",children:a.map(([m,p])=>c.jsx(s1,{plugin:m,skills:p,selectedKey:i,onSelect:o,onContextMenu:u},m))})}function y1({queryActive:a}){return a?c.jsx(Ls,{headline:"No matches in this section.",body:"Adjust the filter or press Escape to clear."}):c.jsx(Ls,{headline:"No skills yet.",body:c.jsxs(c.Fragment,{children:["Create one with ",c.jsx(gy,{children:"vskill new"})," or the"," ",c.jsx("strong",{style:{color:"var(--text-primary)"},children:"New skill"})," action in the top rail."]})})}function g1({queryActive:a}){return a?c.jsx(Ls,{headline:"No matches in this section.",body:"Adjust the filter or press Escape to clear."}):c.jsx(Ls,{headline:"No installed skills.",body:c.jsxs(c.Fragment,{children:["Run ",c.jsx(gy,{children:"vskill install <plugin>"})," to add one."]})})}function Ls({headline:a,body:i}){return c.jsxs("div",{style:{padding:"12px 14px 16px",fontSize:12,color:"var(--text-secondary)",lineHeight:1.5},children:[c.jsx("div",{style:{fontWeight:500,color:"var(--text-primary)",marginBottom:4},children:a}),c.jsx("div",{children:i})]})}function gy({children:a}){return c.jsx("code",{style:{fontFamily:"var(--font-mono)",fontSize:11,color:"var(--text-primary)",background:"color-mix(in srgb, var(--border-default) 45%, transparent)",padding:"1px 4px",borderRadius:3},children:a})}function v1(){return c.jsx("div",{"aria-hidden":"true",style:{height:1,background:"var(--border-default)",margin:"4px 14px"}})}function x1(){return c.jsx("div",{style:{padding:"8px 0"},children:[0,1,2,3,4,5].map(a=>c.jsx(o1,{},a))})}function b1({error:a,onRetry:i}){return c.jsxs("div",{role:"alert",style:{margin:"12px 14px",padding:12,border:"1px solid var(--border-default)",borderRadius:6,background:"var(--bg-canvas)",color:"var(--text-primary)",fontSize:12},children:[c.jsx("div",{style:{fontWeight:600,marginBottom:4},children:"Couldn't load skills."}),c.jsxs("details",{children:[c.jsx("summary",{style:{cursor:"pointer",color:"var(--text-secondary)",fontSize:11,marginBottom:4},children:S1(a)}),c.jsx("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-word",fontFamily:"var(--font-mono)",fontSize:10,color:"var(--text-secondary)",margin:"6px 0 0"},children:a})]}),i&&c.jsx("button",{type:"button",onClick:i,style:{marginTop:8,background:"transparent",border:"1px solid var(--border-default)",borderRadius:4,padding:"4px 10px",color:"var(--text-primary)",cursor:"pointer",fontSize:11,fontFamily:"var(--font-sans)"},children:"Retry"})]})}function S1(a){const i=a.split(`
51
+ `)[0]??a;return i.length>80?i.slice(0,77)+"…":i}const vy=240,xy=480,by="vskill-sidebar-width",ar=320;function Uc(a){return Number.isFinite(a)?Math.round(Math.max(vy,Math.min(xy,a))):ar}function E1(){try{const a=localStorage.getItem(by);if(!a)return ar;const i=Number(a);return Number.isFinite(i)?Uc(i):ar}catch{return ar}}function T1(a){try{localStorage.setItem(by,String(Uc(a)))}catch{}}function C1({initialWidth:a,onChange:i}){const o=x.useRef({startX:0,startWidth:a,pointerId:null}),u=x.useRef(a);return x.useEffect(()=>{u.current=a},[a]),x.useEffect(()=>{function d(p){if(o.current.pointerId==null||p.pointerId!==o.current.pointerId)return;const y=p.clientX-o.current.startX,g=Uc(o.current.startWidth+y);u.current=g,i(g)}function m(p){o.current.pointerId==null||p.pointerId!==o.current.pointerId||(o.current.pointerId=null,T1(u.current))}return window.addEventListener("pointermove",d),window.addEventListener("pointerup",m),window.addEventListener("pointercancel",m),()=>{window.removeEventListener("pointermove",d),window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m)}},[i]),c.jsx("div",{role:"separator","aria-orientation":"vertical","aria-valuemin":vy,"aria-valuemax":xy,"aria-valuenow":a,"aria-label":"Resize sidebar",title:"Drag to resize sidebar",onPointerDown:d=>{const m=d.currentTarget;o.current.startX=d.clientX,o.current.startWidth=u.current,o.current.pointerId=d.pointerId;try{m.setPointerCapture(d.pointerId)}catch{}},style:{width:4,alignSelf:"stretch",cursor:"col-resize",background:"var(--border-default)",userSelect:"none",touchAction:"none"}})}function j1({connected:a,hint:i,onRetry:o}){return a?null:c.jsxs("aside",{"aria-live":"assertive",role:"alert",style:{display:"flex",alignItems:"center",gap:10,padding:"6px 12px",background:"color-mix(in srgb, var(--status-own) 15%, transparent)",borderBottom:"1px solid var(--border-default)",color:"var(--text-primary)",fontFamily:"var(--font-sans)",fontSize:12},children:[c.jsx("span",{"aria-hidden":"true",style:{width:6,height:6,borderRadius:"50%",background:"var(--status-own)",display:"inline-block",flexShrink:0}}),c.jsx("span",{style:{fontWeight:500},children:"Disconnected — reconnecting…"}),i&&c.jsx("span",{style:{color:"var(--text-secondary)",fontSize:11},children:i}),c.jsx("div",{style:{flex:1}}),o&&c.jsx("button",{type:"button",onClick:o,style:{background:"transparent",border:"1px solid var(--border-default)",borderRadius:4,padding:"2px 8px",color:"var(--text-primary)",cursor:"pointer",fontSize:11,fontFamily:"var(--font-sans)"},children:"Retry now"})]})}function Sy(a){if(a!==void 0)try{return JSON.stringify(a)}catch(i){console.error("Failed to serialize request body:",i);try{const o=new WeakSet;return JSON.stringify(a,(u,d)=>{if(typeof d=="object"&&d!==null){if(o.has(d))return"[Circular]";o.add(d)}return d})}catch{return JSON.stringify({error:"Request body could not be serialized"})}}}function pc(){const[a,i]=x.useState([]),[o,u]=x.useState(!1),[d,m]=x.useState(!1),[p,y]=x.useState(null),g=x.useRef(null),h=x.useCallback(async(b,k)=>{i([]),u(!0),m(!1),y(null);const w=new AbortController;g.current=w;try{const R=Sy(k),B=await fetch(b,{method:"POST",headers:{"Content-Type":"application/json"},body:R,signal:w.signal});if(!B.ok||!B.body){let $=`HTTP ${B.status}`;try{const O=await B.json();O.error&&($=O.error)}catch{}throw new Error($)}const z=B.body.getReader(),E=new TextDecoder;let A="",G="";for(;;){const{done:$,value:O}=await z.read();if($)break;A+=E.decode(O,{stream:!0});const J=A.split(`
52
+ `);A=J.pop()||"";for(const T of J)if(T.startsWith("event: "))G=T.slice(7).trim();else if(T.startsWith("data: ")){try{const L=JSON.parse(T.slice(6)),D={event:G,data:L};G==="done"?(m(!0),i(W=>[...W,D])):i(W=>[...W,D])}catch{}G=""}}}catch(R){R.name!=="AbortError"&&y(R.message)}finally{u(!1),g.current=null}},[]),C=x.useCallback(()=>{var b;(b=g.current)==null||b.abort()},[]);return{events:a,running:o,done:d,error:p,start:h,stop:C}}function k1(a){const i=x.useRef(a);i.current=a;const[o,u]=x.useState(new Set),d=x.useRef(new Map),m=x.useCallback(async(h,C,b)=>{var w;(w=d.current.get(h))==null||w.abort();const k=new AbortController;d.current.set(h,k),u(R=>{const B=new Set(R);return B.add(h),B});try{const R=Sy(b),B=await fetch(C,{method:"POST",headers:{"Content-Type":"application/json"},body:R,signal:k.signal});if(!B.ok||!B.body){let $=`HTTP ${B.status}`;try{const O=await B.json();O.error&&($=O.error)}catch{}throw new Error($)}const z=B.body.getReader(),E=new TextDecoder;let A="",G="";for(;;){const{done:$,value:O}=await z.read();if($)break;A+=E.decode(O,{stream:!0});const J=A.split(`
53
+ `);A=J.pop()||"";for(const T of J)if(T.startsWith("event: "))G=T.slice(7).trim();else if(T.startsWith("data: ")){try{const L=JSON.parse(T.slice(6)),D={event:G,data:L};i.current.onEvent(h,D)}catch{}G=""}}i.current.onDone(h)}catch(R){R.name!=="AbortError"&&i.current.onError(h,R.message)}finally{u(R=>{const B=new Set(R);return B.delete(h),B}),d.current.delete(h)}},[]),p=x.useCallback(h=>{var C;(C=d.current.get(h))==null||C.abort()},[]),y=x.useCallback(()=>{for(const h of d.current.values())h.abort()},[]),g=o.size>0;return{runningSet:o,startCase:m,stopCase:p,stopAll:y,isAnyCaseRunning:g}}const w1={plugin:"",skill:"",skillContent:"",savedContent:"",isDirty:!1,evals:null,evalsError:null,activePanel:"tests",selectedCaseId:null,caseRunStates:new Map,bulkRunActive:!1,runMode:null,latestBenchmark:null,inlineResults:new Map,improveTarget:null,aiEditOpen:!1,aiEditLoading:!1,aiEditResult:null,aiEditError:null,aiEditClassifiedError:null,aiEditProgress:[],aiEditEvalChanges:[],aiEditEvalSelections:new Map,aiEditEvalsRetry:null,generateEvalsLoading:!1,generateEvalsProgress:[],generateEvalsError:null,regressions:[],iterationCount:0,activationPrompts:"",activationResults:[],activationSummary:null,activationRunning:!1,activationError:null,activationTotalPrompts:0,activationStartedAt:null,activationClassifyingStatus:null,generatingPrompts:!1,generatingPromptsError:null,activationHistory:null,activationHistoryLoading:!1,loading:!0,error:null};function A1(a,i){var o,u;switch(i.type){case"SET_LOADING":return{...a,loading:i.loading};case"SET_ERROR":return{...a,error:i.error};case"INIT_DATA":{const d=new Map;if(i.benchmark)for(const p of i.benchmark.cases)d.set(p.eval_id,{status:p.status,passRate:p.pass_rate,errorMessage:p.error_message||void 0,durationMs:p.durationMs,tokens:p.tokens,output:p.output,assertions:p.assertions.map(y=>({assertion_id:y.id,text:y.text,pass:y.pass,reasoning:y.reasoning}))});const m=((u=(o=i.evals)==null?void 0:o.evals[0])==null?void 0:u.id)??null;return{...a,skillContent:i.skillContent,savedContent:i.skillContent,isDirty:!1,evals:i.evals,evalsError:i.evalsError??null,latestBenchmark:i.benchmark,inlineResults:d,selectedCaseId:m,loading:!1,error:null}}case"SET_PANEL":return{...a,activePanel:i.panel};case"SET_CONTENT":return{...a,skillContent:i.content,isDirty:i.content!==a.savedContent};case"CONTENT_SAVED":return{...a,savedContent:a.skillContent,isDirty:!1};case"SET_EVALS":return{...a,evals:i.evals};case"SELECT_CASE":return{...a,selectedCaseId:i.caseId};case"CASE_RUN_START":{const d=new Map(a.caseRunStates);return d.set(i.caseId,{status:"running",startedAt:Date.now(),mode:i.mode}),{...a,caseRunStates:d,runMode:i.mode,activePanel:"run"}}case"CASE_RUN_COMPLETE":{const d=new Map(a.caseRunStates),m=d.get(i.caseId);d.set(i.caseId,{status:"complete",mode:m==null?void 0:m.mode});const p=new Map(a.inlineResults);return p.set(i.caseId,i.result),{...a,caseRunStates:d,inlineResults:p}}case"CASE_RUN_ERROR":{const d=new Map(a.caseRunStates),m=d.get(i.caseId);d.set(i.caseId,{status:"error",mode:m==null?void 0:m.mode});const p=new Map(a.inlineResults);return p.set(i.caseId,{status:"error",errorMessage:i.error,assertions:[]}),{...a,caseRunStates:d,inlineResults:p}}case"CASE_RUN_CANCEL":{const d=new Map(a.caseRunStates),m=d.get(i.caseId);return d.set(i.caseId,{status:"cancelled",mode:m==null?void 0:m.mode}),{...a,caseRunStates:d}}case"BULK_RUN_START":{const d=new Map(a.caseRunStates);for(const m of i.caseIds)d.set(m,{status:"queued",mode:i.mode});return{...a,caseRunStates:d,bulkRunActive:!0,runMode:i.mode,activePanel:"run"}}case"BULK_RUN_COMPLETE":return{...a,bulkRunActive:!1,latestBenchmark:i.benchmark??a.latestBenchmark,iterationCount:a.iterationCount+1};case"CANCEL_ALL":{const d=new Map(a.caseRunStates);for(const[m,p]of d)(p.status==="running"||p.status==="queued")&&d.set(m,{status:"cancelled"});return{...a,caseRunStates:d,bulkRunActive:!1}}case"UPDATE_INLINE_RESULT":{const d=new Map(a.inlineResults);return d.set(i.evalId,i.result),{...a,inlineResults:d}}case"OPEN_IMPROVE":return{...a,improveTarget:i.evalId,activePanel:"editor"};case"CLOSE_IMPROVE":return{...a,improveTarget:null};case"OPEN_AI_EDIT":return{...a,aiEditOpen:!0,aiEditResult:null,aiEditError:null,aiEditClassifiedError:null,aiEditProgress:[],aiEditEvalChanges:[],aiEditEvalSelections:new Map,aiEditEvalsRetry:null};case"CLOSE_AI_EDIT":return{...a,aiEditOpen:!1,aiEditLoading:!1,aiEditResult:null,aiEditError:null,aiEditClassifiedError:null,aiEditProgress:[],aiEditEvalChanges:[],aiEditEvalSelections:new Map,aiEditEvalsRetry:null};case"AI_EDIT_LOADING":return{...a,aiEditLoading:!0,aiEditError:null,aiEditClassifiedError:null,aiEditProgress:[]};case"AI_EDIT_PROGRESS":return{...a,aiEditProgress:[...a.aiEditProgress,i.entry]};case"AI_EDIT_RESULT":{const d=i.evalChanges??[],m=new Map;for(let p=0;p<d.length;p++)m.set(p,!0);return{...a,aiEditLoading:!1,aiEditResult:{improved:i.improved,reasoning:i.reasoning,evalChanges:d},aiEditEvalChanges:d,aiEditEvalSelections:m}}case"AI_EDIT_ERROR":return{...a,aiEditLoading:!1,aiEditError:i.message,aiEditClassifiedError:i.classified??null};case"GENERATE_EVALS_START":return{...a,generateEvalsLoading:!0,generateEvalsProgress:[],generateEvalsError:null};case"GENERATE_EVALS_PROGRESS":return{...a,generateEvalsProgress:[...a.generateEvalsProgress,i.entry]};case"GENERATE_EVALS_DONE":return{...a,generateEvalsLoading:!1,evals:i.evals};case"GENERATE_EVALS_ERROR":return{...a,generateEvalsLoading:!1,generateEvalsError:i.classified};case"TOGGLE_EVAL_CHANGE":{const d=new Map(a.aiEditEvalSelections);return d.set(i.index,!d.get(i.index)),{...a,aiEditEvalSelections:d}}case"SELECT_ALL_EVAL_CHANGES":{const d=new Map(a.aiEditEvalSelections);for(const m of d.keys())d.set(m,!0);return{...a,aiEditEvalSelections:d}}case"DESELECT_ALL_EVAL_CHANGES":{const d=new Map(a.aiEditEvalSelections);for(const m of d.keys())d.set(m,!1);return{...a,aiEditEvalSelections:d}}case"SET_EVALS_RETRY":return{...a,aiEditEvalsRetry:i.evalsFile};case"SET_REGRESSIONS":return{...a,regressions:i.regressions};case"INCREMENT_ITERATION":return{...a,iterationCount:a.iterationCount+1};case"SET_ACTIVATION_PROMPTS":return{...a,activationPrompts:i.prompts};case"ACTIVATION_START":return{...a,activationRunning:!0,activationResults:[],activationSummary:null,activationError:null,activationClassifyingStatus:null,activationStartedAt:Date.now()};case"ACTIVATION_RESULT":return{...a,activationResults:[...a.activationResults,i.result]};case"ACTIVATION_DONE":return{...a,activationRunning:!1,activationSummary:i.summary,activationClassifyingStatus:null};case"ACTIVATION_CLASSIFYING":return{...a,activationClassifyingStatus:`Classifying prompt ${i.index}/${i.total}...`};case"ACTIVATION_ERROR":return{...a,activationRunning:!1,activationError:i.error,activationClassifyingStatus:null};case"ACTIVATION_RESET":return{...a,activationResults:[],activationSummary:null,activationError:null};case"ACTIVATION_TIMEOUT":return{...a,activationRunning:!1,activationError:"Activation test timed out after 120 seconds"};case"ACTIVATION_CANCEL":return{...a,activationRunning:!1};case"GENERATE_PROMPTS_START":return{...a,generatingPrompts:!0,generatingPromptsError:null};case"GENERATE_PROMPTS_DONE":return{...a,generatingPrompts:!1};case"GENERATE_PROMPTS_ERROR":return{...a,generatingPrompts:!1,generatingPromptsError:i.error};case"ACTIVATION_HISTORY_LOADED":return{...a,activationHistory:i.runs,activationHistoryLoading:!1};default:return a}}function N1(a){if(a==="unit"||a==="integration")return a}function R1(a,i){const o=i.data;if(i.event==="output_ready"&&(a.output=o.output,o.durationMs!=null&&(a.durationMs=o.durationMs),o.tokens!=null&&(a.tokens=o.tokens)),i.event==="outputs_ready"&&(a.output=o.skillOutput,o.skillDurationMs!=null&&(a.durationMs=o.skillDurationMs),o.skillTokens!=null&&(a.tokens=o.skillTokens)),i.event==="assertion_result"){const u={assertion_id:o.assertion_id,text:o.text,pass:o.pass,reasoning:o.reasoning};a.assertions.find(d=>d.assertion_id===u.assertion_id)||a.assertions.push(u)}i.event==="case_complete"&&(a.status=o.status,a.passRate=o.pass_rate,a.errorMessage=o.error_message||void 0,a.classifiedError=o.classified_error||void 0)}const Ey=x.createContext(null);function z1(){const a=x.useContext(Ey);if(!a)throw new Error("useWorkspace must be used within WorkspaceProvider");return a}function _1({plugin:a,skill:i,origin:o,children:u}){const d=o==="installed",[m,p]=x.useReducer(A1,{...w1,plugin:a,skill:i}),y=x.useRef(new Set),g=x.useRef(new Set),h=x.useRef(new Map),C=x.useCallback((Q,ie)=>{let ae=h.current.get(Q);ae||(ae={assertions:[]},h.current.set(Q,ae)),R1(ae,ie),p({type:"UPDATE_INLINE_RESULT",evalId:Q,result:{...ae,assertions:[...ae.assertions]}})},[]),b=x.useCallback(Q=>{if(g.current.has(Q))return;g.current.add(Q);const ie=h.current.get(Q)??{assertions:[]};p({type:"CASE_RUN_COMPLETE",caseId:Q,result:{...ie,assertions:[...ie.assertions]}}),y.current.has(Q)&&(y.current.delete(Q),y.current.size===0&&lt.getLatestBenchmark(a,i).then(ae=>p({type:"BULK_RUN_COMPLETE",benchmark:ae})).catch(()=>p({type:"BULK_RUN_COMPLETE",benchmark:null})))},[a,i]),k=x.useCallback((Q,ie)=>{g.current.has(Q)||(g.current.add(Q),p({type:"CASE_RUN_ERROR",caseId:Q,error:ie}),y.current.has(Q)&&(y.current.delete(Q),y.current.size===0&&lt.getLatestBenchmark(a,i).then(ae=>p({type:"BULK_RUN_COMPLETE",benchmark:ae})).catch(()=>p({type:"BULK_RUN_COMPLETE",benchmark:null}))))},[a,i]),{startCase:w,stopCase:R,stopAll:B}=k1({onEvent:C,onDone:b,onError:k});x.useEffect(()=>()=>{B()},[B]);const z=x.useCallback(async()=>{try{const Q=await fetch(`/api/skills/${a}/${i}/activation-history`);if(!Q.ok){if(Q.status===404){p({type:"ACTIVATION_HISTORY_LOADED",runs:[]});return}return}const ie=await Q.json();p({type:"ACTIVATION_HISTORY_LOADED",runs:ie.runs||[]})}catch{}},[a,i]);x.useEffect(()=>{let Q=!1;async function ie(){try{const[ae,ue,me]=await Promise.allSettled([lt.getSkillDetail(a,i),lt.getEvals(a,i),lt.getLatestBenchmark(a,i)]);if(Q)return;let De=null,Re=null;if(ue.status==="fulfilled")De=ue.value;else{const vt=ue.reason;(vt==null?void 0:vt.status)!==404&&(Re=(vt==null?void 0:vt.message)??"Failed to load test cases")}p({type:"INIT_DATA",skillContent:ae.status==="fulfilled"?ae.value.skillContent:"",evals:De,evalsError:Re,benchmark:me.status==="fulfilled"?me.value:null})}catch(ae){Q||p({type:"SET_ERROR",error:ae.message})}}return ie(),z(),()=>{Q=!0}},[a,i,z]);const E=x.useCallback(async()=>{if(!d)try{await lt.applyImprovement(a,i,m.skillContent),p({type:"CONTENT_SAVED"})}catch(Q){p({type:"SET_ERROR",error:Q.message})}},[d,a,i,m.skillContent]),A=x.useCallback(async Q=>{if(!d)try{const ie=await lt.saveEvals(a,i,Q);p({type:"SET_EVALS",evals:ie})}catch(ie){p({type:"SET_ERROR",error:ie.message})}},[d,a,i]),G=x.useCallback((Q,ie="benchmark")=>{if(d)return;const ae=m.caseRunStates.get(Q);if((ae==null?void 0:ae.status)!=="running")if(h.current.delete(Q),g.current.delete(Q),p({type:"CASE_RUN_START",caseId:Q,mode:ie}),ie==="comparison"){const ue=`/api/skills/${a}/${i}/compare`;w(Q,ue,{eval_ids:[Q]})}else{const ue=`/api/skills/${a}/${i}/benchmark/case/${Q}`;w(Q,ue,ie==="baseline"?{baseline_only:!0}:void 0)}},[d,a,i,m.caseRunStates,w]),$=x.useCallback((Q="benchmark")=>{var ue;if(d)return;const ie=((ue=m.evals)==null?void 0:ue.evals)??[];if(ie.length===0)return;const ae=ie.map(me=>me.id);for(const me of ae)h.current.delete(me),g.current.delete(me);p({type:"BULK_RUN_START",caseIds:ae,mode:Q}),y.current=new Set(ae);for(const me of ae)if(Q==="comparison")w(me,`/api/skills/${a}/${i}/compare`,{eval_ids:[me]});else{const De=`/api/skills/${a}/${i}/benchmark/case/${me}`;w(me,De,Q==="baseline"?{baseline_only:!0}:void 0)}},[d,a,i,m.evals,w]),O=x.useCallback(Q=>{R(Q),p({type:"CASE_RUN_CANCEL",caseId:Q}),y.current.delete(Q),g.current.add(Q)},[R]),J=x.useCallback(()=>{B(),p({type:"CANCEL_ALL"}),y.current.clear()},[B]),T=x.useCallback(async(Q,ie)=>{p({type:"OPEN_IMPROVE",evalId:Q})},[]),L=x.useCallback(async(Q,ie)=>{try{await lt.applyImprovement(a,i,ie),p({type:"SET_CONTENT",content:ie}),p({type:"CONTENT_SAVED"}),p({type:"CLOSE_IMPROVE"}),G(Q,"benchmark")}catch(ae){p({type:"SET_ERROR",error:ae.message})}},[a,i,G]),D=pc(),W=x.useRef(null),F=x.useRef(0);x.useEffect(()=>{const Q=D.events;for(let ie=F.current;ie<Q.length;ie++){const ae=Q[ie],ue=ae.data;if(ae.event==="progress"&&p({type:"AI_EDIT_PROGRESS",entry:{timestamp:Date.now(),phase:ue.phase,message:ue.message}}),ae.event==="done"){const me=ue.improved,De=ue.reasoning,Re=ue.evalChanges??[];p({type:"AI_EDIT_RESULT",improved:me,reasoning:De,evalChanges:Re})}if(ae.event==="error"){const me=ue;p({type:"AI_EDIT_ERROR",message:me.description||"Unknown error",classified:me})}}F.current=Q.length},[D.events]),x.useEffect(()=>{D.error&&p({type:"AI_EDIT_ERROR",message:D.error})},[D.error]),x.useEffect(()=>()=>{D.stop()},[D.stop]);const de=x.useCallback(async(Q,ie,ae)=>{d||(F.current=0,p({type:"AI_EDIT_LOADING"}),W.current=D.stop,D.start(`/api/skills/${a}/${i}/improve?sse`,{mode:"instruct",instruction:Q,content:m.skillContent,evals:m.evals??{skill_name:i,evals:[]},provider:ie,model:ae}))},[d,a,i,m.skillContent,m.evals,D]),ce=x.useCallback(()=>{D.stop(),p({type:"AI_EDIT_ERROR",message:"Cancelled"})},[D]),P=x.useCallback(async()=>{const Q=m.aiEditResult;if(Q!=null&&Q.improved)try{if(await lt.applyImprovement(a,i,Q.improved),p({type:"SET_CONTENT",content:Q.improved}),p({type:"CONTENT_SAVED"}),m.aiEditEvalChanges.length>0&&Array.from(m.aiEditEvalSelections.values()).some(Boolean)){const{mergeEvalChanges:ae}=await Ah(async()=>{const{mergeEvalChanges:De}=await import("./mergeEvalChanges-Dpbbs4d4.js");return{mergeEvalChanges:De}},[]),ue=m.evals??{skill_name:i,evals:[]},me=ae(ue,m.aiEditEvalChanges,m.aiEditEvalSelections);try{const De=await lt.saveEvals(a,i,me);p({type:"SET_EVALS",evals:De})}catch(De){p({type:"SET_EVALS_RETRY",evalsFile:me}),p({type:"SET_ERROR",error:`SKILL.md saved, but test cases failed to save: ${De.message}. You can retry from the AI Edit panel.`});return}}p({type:"CLOSE_AI_EDIT"})}catch(ie){p({type:"SET_ERROR",error:ie.message})}},[a,i,m.aiEditResult,m.evals,m.aiEditEvalChanges,m.aiEditEvalSelections]),re=x.useCallback(()=>{p({type:"CLOSE_AI_EDIT"})},[]),_=x.useCallback(Q=>{p({type:"TOGGLE_EVAL_CHANGE",index:Q})},[]),Y=x.useCallback(()=>{p({type:"SELECT_ALL_EVAL_CHANGES"})},[]),se=x.useCallback(()=>{p({type:"DESELECT_ALL_EVAL_CHANGES"})},[]),Ce=x.useCallback(async()=>{const Q=m.aiEditEvalsRetry;if(Q)try{const ie=await lt.saveEvals(a,i,Q);p({type:"SET_EVALS",evals:ie}),p({type:"SET_ERROR",error:null}),p({type:"CLOSE_AI_EDIT"})}catch(ie){p({type:"SET_ERROR",error:`Retry failed: ${ie.message}`})}},[a,i,m.aiEditEvalsRetry]),je=x.useCallback(async()=>{try{const Q=await lt.getSkillDetail(a,i);p({type:"SET_CONTENT",content:Q.skillContent}),p({type:"CONTENT_SAVED"})}catch{}},[a,i]),{config:S}=Hs(),q=pc(),te=x.useRef(0);x.useEffect(()=>{const Q=q.events;for(let ie=te.current;ie<Q.length;ie++){const ae=Q[ie],ue=ae.data;if(ae.event==="progress"&&p({type:"GENERATE_EVALS_PROGRESS",entry:{timestamp:Date.now(),phase:ue.phase,message:ue.message}}),ae.event==="done"){const me=ue;lt.saveEvals(a,i,me).then(De=>p({type:"GENERATE_EVALS_DONE",evals:De})).catch(De=>p({type:"SET_ERROR",error:De.message}))}ae.event==="error"&&p({type:"GENERATE_EVALS_ERROR",classified:ue})}te.current=Q.length},[q.events,a,i]),x.useEffect(()=>{q.error&&p({type:"SET_ERROR",error:q.error})},[q.error]),x.useEffect(()=>()=>{q.stop()},[q.stop]);const oe=x.useCallback(async Q=>{if(d)return;te.current=0,p({type:"GENERATE_EVALS_START"});const ie={};S!=null&&S.provider&&(ie.provider=S.provider),S!=null&&S.model&&(ie.model=S.model);const ae=N1(Q==null?void 0:Q.testType);ae&&(ie.testType=ae),q.start(`/api/skills/${a}/${i}/generate-evals?sse`,Object.keys(ie).length>0?ie:void 0)},[d,a,i,q,S]),he=pc(),be=x.useRef(0);x.useEffect(()=>()=>{he.stop()},[he.stop]),x.useEffect(()=>{const Q=he.events;for(let ie=be.current;ie<Q.length;ie++){const ae=Q[ie];if(ae.event==="classifying"){const ue=ae.data;p({type:"ACTIVATION_CLASSIFYING",index:ue.index,total:ue.total})}if(ae.event==="prompt_result"&&p({type:"ACTIVATION_RESULT",result:ae.data}),ae.event==="done"){Ee.current&&(clearTimeout(Ee.current),Ee.current=null);const ue=ae.data;if(ue.error)p({type:"ACTIVATION_ERROR",error:ue.error});else{p({type:"ACTIVATION_DONE",summary:ue});const me={id:`run-${Date.now()}`,timestamp:new Date().toISOString(),model:(S==null?void 0:S.model)||"unknown",provider:(S==null?void 0:S.provider)||"unknown",promptCount:ue.total,summary:{precision:ue.precision,recall:ue.recall,reliability:ue.reliability,tp:ue.tp,tn:ue.tn,fp:ue.fp,fn:ue.fn}};p({type:"ACTIVATION_HISTORY_LOADED",runs:[me,...m.activationHistory??[]]})}}}be.current=Q.length},[he.events,S,m.activationHistory]),x.useEffect(()=>{he.error&&(Ee.current&&(clearTimeout(Ee.current),Ee.current=null),p({type:"ACTIVATION_ERROR",error:he.error}))},[he.error]);const Ee=x.useRef(null),le=x.useCallback(()=>{Ee.current&&(clearTimeout(Ee.current),Ee.current=null),he.stop(),p({type:"ACTIVATION_CANCEL",totalPrompts:0})},[he]),xe=x.useCallback(Q=>{const ae=Q.trim().split(`
54
+ `).filter(Boolean).map(me=>me.startsWith("!")?{prompt:me.slice(1).trim(),expected:"should_not_activate"}:me.startsWith("+")?{prompt:me.slice(1).trim(),expected:"should_activate"}:{prompt:me.trim(),expected:"auto"});be.current=0,p({type:"ACTIVATION_START"}),p({type:"SET_ACTIVATION_PROMPTS",prompts:Q});const ue={prompts:ae};S!=null&&S.provider&&(ue.provider=S.provider),S!=null&&S.model&&(ue.model=S.model),he.start(`/api/skills/${a}/${i}/activation-test`,ue),Ee.current&&clearTimeout(Ee.current),Ee.current=setTimeout(()=>{he.stop(),p({type:"ACTIVATION_TIMEOUT"}),Ee.current=null},12e4)},[a,i,he,S]),Xe=x.useCallback(async(Q=8)=>{p({type:"GENERATE_PROMPTS_START"});try{const ie={count:Q};S!=null&&S.provider&&(ie.provider=S.provider),S!=null&&S.model&&(ie.model=S.model);const ae=await fetch(`/api/skills/${a}/${i}/activation-prompts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ie)});if(!ae.ok){let ht=`HTTP ${ae.status}`;try{const Xt=await ae.json();Xt.error&&(ht=Xt.error)}catch{}throw new Error(ht)}const ue=ae.body.getReader(),me=new TextDecoder;let De="",Re="",vt=[];for(;;){const{done:ht,value:Xt}=await ue.read();if(ht)break;De+=me.decode(Xt,{stream:!0});const wl=De.split(`
55
+ `);De=wl.pop()||"";for(const at of wl)if(at.startsWith("event: "))Re=at.slice(7).trim();else if(at.startsWith("data: ")){try{const Et=JSON.parse(at.slice(6));if(Re==="done"){if(Et.error)throw new Error(Et.error);vt=Et.prompts||[]}if(Re==="error")throw new Error(Et.message||Et.description||"Generation failed")}catch(Et){if(!(Et instanceof SyntaxError))throw Et}Re=""}}const fl=vt.map(ht=>`${ht.expected==="should_activate"?"+":"!"}${ht.prompt}`).join(`
56
+ `);p({type:"SET_ACTIVATION_PROMPTS",prompts:fl}),p({type:"GENERATE_PROMPTS_DONE"})}catch(ie){p({type:"GENERATE_PROMPTS_ERROR",error:ie.message})}},[a,i,S]),Be=x.useMemo(()=>({state:m,dispatch:p,isReadOnly:d,saveContent:E,saveEvals:A,runCase:G,runAll:$,cancelCase:O,cancelAll:J,improveForCase:T,applyImproveAndRerun:L,refreshSkillContent:je,generateEvals:oe,runActivationTest:xe,cancelActivation:le,generateActivationPrompts:Xe,fetchActivationHistory:z,submitAiEdit:de,cancelAiEdit:ce,applyAiEdit:P,discardAiEdit:re,toggleEvalChange:_,selectAllEvalChanges:Y,deselectAllEvalChanges:se,retryEvalsSave:Ce}),[m,d,E,A,G,$,O,J,T,L,je,oe,xe,le,Xe,z,de,ce,P,re,_,Y,se,Ce]);return c.jsx(Ey.Provider,{value:Be,children:u})}const _s=new Map,aa=new Map,tr=new Map;function Ty(a){_s.delete(a),aa.delete(a);const i=tr.get(a);if(i)for(const o of i)o()}function M1(a,i,o={}){const{ttl:u=3e4,enabled:d=!0}=o,[,m]=x.useState(0),p=x.useRef(!0),y=x.useRef(a);y.current=a;const g=()=>Ty(a);x.useEffect(()=>(p.current=!0,()=>{p.current=!1}),[]),x.useEffect(()=>{if(!d)return;const k=()=>{p.current&&m(w=>w+1)};return tr.has(a)||tr.set(a,new Set),tr.get(a).add(k),()=>{var w;(w=tr.get(a))==null||w.delete(k)}},[a,d]),x.useEffect(()=>{if(!d)return;const k=_s.get(a);if(!(!k||Date.now()-k.fetchedAt>u))return;if(aa.has(a)){const z=aa.get(a),E=()=>{p.current&&y.current===a&&m(A=>A+1)};z.subscribers.push(E);return}const R={promise:Promise.resolve(),subscribers:[]},B=i().then(z=>{_s.set(a,{data:z,fetchedAt:Date.now()}),aa.delete(a),p.current&&y.current===a&&m(E=>E+1);for(const E of R.subscribers)E()},z=>{aa.delete(a),p.current&&y.current===a&&m(E=>E+1);for(const E of R.subscribers)E();throw z});R.promise=B,aa.set(a,R)},[a,i,u,d]);const h=_s.get(a),C=d&&!h&&aa.has(a);return{data:h==null?void 0:h.data,loading:C||d&&!h,error:void 0,revalidate:g}}function D1(a){if(!a)return[];const i=a.split(`
57
+ `),o=[];for(const u of i)if(!(u.startsWith("--- ")||u.startsWith("+++ "))){if(u.startsWith("@@")){o.push({type:"header",content:u});continue}if(u.startsWith("+")){o.push({type:"add",content:u.slice(1)});continue}if(u.startsWith("-")){o.push({type:"remove",content:u.slice(1)});continue}(u.startsWith(" ")||u===""&&o.length>0)&&o.push({type:"context",content:u.startsWith(" ")?u.slice(1):""})}return o}function Cy({contentDiff:a,fromLabel:i,toLabel:o,diffSummary:u,maxHeight:d=480,collapsible:m=!1,renderContext:p="inline",onRetry:y}){const[g,h]=x.useState(m),[C,b]=x.useState("unified"),k=x.useRef(null),w=x.useRef(null),R=x.useMemo(()=>D1(a),[a]),B=x.useMemo(()=>{const O=R.filter(T=>T.type==="add").length,J=R.filter(T=>T.type==="remove").length;return{added:O,removed:J}},[R]),z=x.useMemo(()=>{let O=0,J=0;return R.filter(T=>T.type!=="header").map(T=>T.type==="remove"?(O++,{...T,origNum:O,newNum:null}):T.type==="add"?(J++,{...T,origNum:null,newNum:J}):(O++,J++,{...T,origNum:O,newNum:J}))},[R]),E=x.useMemo(()=>{const O=[],J=[];for(const T of z)if(T.type==="remove")O.push(T);else if(T.type==="add")J.push(T);else{for(;O.length<J.length;)O.push({type:"context",content:"",origNum:null,newNum:null});for(;J.length<O.length;)J.push({type:"context",content:"",origNum:null,newNum:null});O.push(T),J.push(T)}for(;O.length<J.length;)O.push({type:"context",content:"",origNum:null,newNum:null});for(;J.length<O.length;)J.push({type:"context",content:"",origNum:null,newNum:null});return{left:O,right:J}},[z]),A=x.useCallback(O=>{const J=O==="left"?k.current:w.current,T=O==="left"?w.current:k.current;J&&T&&(T.scrollTop=J.scrollTop)},[]);if(!a||R.length===0)return c.jsxs("div",{className:"rounded-lg p-6 text-center",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[c.jsx("div",{className:"text-[13px] mb-2",style:{color:"var(--text-tertiary)"},children:"Unable to load diff. Try again."}),y&&c.jsx("button",{onClick:y,className:"btn btn-secondary text-[12px]",children:"Retry"})]});const G=p==="modal"?"fixed inset-0 z-50 flex items-center justify-center bg-black/50":"",$=c.jsxs("div",{className:"rounded-xl overflow-hidden animate-fade-in",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)"},children:[c.jsxs("div",{className:"flex items-center justify-between px-5 py-3",style:{background:"var(--surface-2)",borderBottom:"1px solid var(--border-subtle)"},children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("div",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:[i," → ",o]}),c.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[c.jsxs("span",{style:{color:"var(--green)"},children:["+",B.added]}),c.jsxs("span",{style:{color:"var(--red)"},children:["-",B.removed]})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{onClick:()=>b(C==="unified"?"side-by-side":"unified"),className:"btn btn-ghost text-[11px]",children:C==="unified"?"Side-by-side":"Unified"}),m&&c.jsx("button",{onClick:()=>h(!g),className:"btn btn-ghost text-[11px]",children:g?"Expand":"Collapse"})]})]}),u&&c.jsx("div",{className:"mx-4 mt-3 px-4 py-2 rounded-lg text-[12px]",style:{background:"var(--accent-muted)",color:"var(--text-secondary)"},children:u}),!g&&(C==="unified"?c.jsx("div",{className:"mx-4 my-4 rounded-lg overflow-hidden",style:{border:"1px solid var(--border-subtle)",maxHeight:d,overflowY:"auto"},children:c.jsx("table",{className:"w-full",style:{borderCollapse:"collapse",fontFamily:"var(--font-mono, monospace)"},children:c.jsx("tbody",{children:z.map((O,J)=>c.jsxs("tr",{style:{background:O.type==="add"?"rgba(34,197,94,0.08)":O.type==="remove"?"rgba(239,68,68,0.08)":"transparent"},children:[c.jsx("td",{className:"text-right select-none px-2",style:{width:40,fontSize:10,color:O.type==="remove"?"rgba(239,68,68,0.5)":"var(--text-tertiary)",opacity:O.origNum?.6:.2,borderRight:"1px solid var(--border-subtle)"},children:O.origNum??""}),c.jsx("td",{className:"text-right select-none px-2",style:{width:40,fontSize:10,color:O.type==="add"?"rgba(34,197,94,0.5)":"var(--text-tertiary)",opacity:O.newNum?.6:.2,borderRight:"1px solid var(--border-subtle)"},children:O.newNum??""}),c.jsx("td",{className:"select-none text-center",style:{width:20,fontSize:11,fontWeight:700,color:O.type==="add"?"var(--green)":O.type==="remove"?"var(--red)":"transparent",borderRight:O.type==="add"?"2px solid var(--green)":O.type==="remove"?"2px solid var(--red)":"2px solid transparent"},children:O.type==="add"?"+":O.type==="remove"?"-":" "}),c.jsx("td",{className:"px-3 py-px whitespace-pre-wrap",style:{fontSize:11,lineHeight:1.6,color:O.type==="add"?"var(--green)":O.type==="remove"?"var(--red)":"var(--text-secondary)"},children:O.content||"​"})]},J))})})}):c.jsxs("div",{className:"mx-4 my-4 grid grid-cols-2 gap-0 rounded-lg overflow-hidden",style:{border:"1px solid var(--border-subtle)"},children:[c.jsx("div",{ref:k,style:{maxHeight:d,overflowY:"auto",borderRight:"1px solid var(--border-subtle)"},onScroll:()=>A("left"),children:c.jsx("table",{className:"w-full",style:{borderCollapse:"collapse",fontFamily:"var(--font-mono, monospace)"},children:c.jsx("tbody",{children:E.left.map((O,J)=>c.jsxs("tr",{style:{background:O.type==="remove"?"rgba(239,68,68,0.08)":"transparent"},children:[c.jsx("td",{className:"text-right select-none px-2",style:{width:35,fontSize:10,color:"var(--text-tertiary)",opacity:.6,borderRight:"1px solid var(--border-subtle)"},children:O.origNum??""}),c.jsx("td",{className:"px-3 py-px whitespace-pre-wrap",style:{fontSize:11,lineHeight:1.6,color:O.type==="remove"?"var(--red)":"var(--text-secondary)"},children:O.content||"​"})]},J))})})}),c.jsx("div",{ref:w,style:{maxHeight:d,overflowY:"auto"},onScroll:()=>A("right"),children:c.jsx("table",{className:"w-full",style:{borderCollapse:"collapse",fontFamily:"var(--font-mono, monospace)"},children:c.jsx("tbody",{children:E.right.map((O,J)=>c.jsxs("tr",{style:{background:O.type==="add"?"rgba(34,197,94,0.08)":"transparent"},children:[c.jsx("td",{className:"text-right select-none px-2",style:{width:35,fontSize:10,color:"var(--text-tertiary)",opacity:.6,borderRight:"1px solid var(--border-subtle)"},children:O.newNum??""}),c.jsx("td",{className:"px-3 py-px whitespace-pre-wrap",style:{fontSize:11,lineHeight:1.6,color:O.type==="add"?"var(--green)":"var(--text-secondary)"},children:O.content||"​"})]},J))})})})]}))]});return p==="modal"?c.jsx("div",{className:G,children:c.jsx("div",{style:{width:"80%",maxWidth:900},children:$})}):$}const bh={CERTIFIED:{bg:"var(--yellow-muted)",text:"var(--yellow)"},VERIFIED:{bg:"var(--accent-muted)",text:"var(--accent)"},COMMUNITY:{bg:"var(--surface-3)",text:"var(--text-tertiary)"}};function O1(a,i){return a?a.length>i?a.slice(0,i)+"…":a:""}function L1(){const{state:a}=z1(),{plugin:i,skill:o}=a,{refreshSkills:u,updateCount:d}=li(),m=`versions/${i}/${o}`,p=x.useCallback(()=>lt.getSkillVersions(i,o),[i,o]),{data:y,loading:g}=M1(m,p),[h,C]=x.useState(null),[b,k]=x.useState(null),[w,R]=x.useState(null),[B,z]=x.useState(!1),[E,A]=x.useState("idle"),[G,$]=x.useState(null),O=x.useRef(null),J=x.useRef(null),T=x.useMemo(()=>(y==null?void 0:y.find(P=>P.isInstalled))??null,[y]),L=x.useMemo(()=>(y==null?void 0:y[0])??null,[y]),D=T&&L&&T.version!==L.version,W=x.useCallback(P=>{h?!b&&P!==h?k(P):(C(P),k(null),R(null)):(C(P),R(null))},[h,b]),F=x.useCallback(async(P,re)=>{z(!0);try{const _=await lt.getVersionDiff(i,o,P,re);R(_)}catch{R(null)}finally{z(!1)}},[i,o]);x.useEffect(()=>{if(h&&b){const P=y||[],re=P.findIndex(Ce=>Ce.version===h),_=P.findIndex(Ce=>Ce.version===b),[Y,se]=re>_?[h,b]:[b,h];F(Y,se)}},[h,b,y,F]);const de=x.useCallback(()=>{!T||!L||(C(T.version),k(L.version))},[T,L]),ce=x.useCallback(()=>{A("updating"),$(null);const P=lt.startSkillUpdate(i,o);O.current=P,P.addEventListener("progress",re=>{try{switch(JSON.parse(re.data).status){case"scanning":A("scanning");break;case"installing":A("installing");break;case"done":A("done");break}}catch{A("error"),$("Unexpected response from server")}}),P.addEventListener("done",()=>{P.close(),O.current=null,u(),Ty(m),A("done")}),P.addEventListener("error",re=>{const _=re;let Y="Connection lost";if(_.data)try{Y=JSON.parse(_.data).error||"Update failed"}catch{}A("error"),$(Y),P.close(),O.current=null})},[i,o,m,u]);return x.useEffect(()=>()=>{O.current&&(O.current.close(),O.current=null)},[]),g?c.jsxs("div",{className:"p-5",children:[c.jsx("div",{className:"skeleton h-5 w-40 mb-4"}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("div",{className:"skeleton h-14 rounded-lg"}),c.jsx("div",{className:"skeleton h-14 rounded-lg"}),c.jsx("div",{className:"skeleton h-14 rounded-lg"})]})]}):!y||y.length===0?c.jsx("div",{className:"flex flex-col items-center justify-center h-full py-16",children:c.jsx("div",{className:"text-[13px]",style:{color:"var(--text-tertiary)"},children:"No version history available"})}):c.jsxs("div",{className:"p-5",children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsx("div",{className:"text-[14px] font-semibold",style:{color:"var(--text-primary)"},children:"Version History"}),c.jsxs("div",{className:"flex items-center gap-2",children:[D&&c.jsx("button",{onClick:de,className:"btn btn-secondary text-[11px]",children:"View changes since installed"}),D&&E!=="done"&&(E==="error"?c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"text-[11px]",style:{color:"var(--red)"},children:G||"Update failed"}),c.jsx("button",{onClick:ce,className:"btn btn-secondary text-[11px]",children:"Retry"})]}):c.jsx("button",{onClick:ce,disabled:E!=="idle",className:"btn btn-primary text-[11px]",children:E==="idle"?`Update to ${L==null?void 0:L.version}`:E==="updating"?"Starting update...":E==="scanning"?"Scanning...":"Installing..."})),d>1&&c.jsxs("button",{onClick:()=>{window.location.hash="#/updates"},className:"text-[11px] hover:underline",style:{color:"var(--text-tertiary)",background:"transparent",border:"none",cursor:"pointer"},children:["Manage all updates (",d,")"]})]})]}),h&&!b&&c.jsxs("div",{className:"text-[11px] mb-3 px-3 py-2 rounded-lg",style:{background:"var(--accent-muted)",color:"var(--accent)"},children:["Click another version to compare with ",h]}),c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"absolute left-3 top-0 bottom-0",style:{width:2,background:"var(--border-subtle)"}}),c.jsx("div",{className:"space-y-1",children:y.map(P=>{const re=bh[P.certTier]||bh.COMMUNITY,_=P.version===h||P.version===b,Y=P.isInstalled;return c.jsxs("button",{onClick:()=>W(P.version),className:"w-full text-left pl-8 pr-4 py-3 relative rounded-lg transition-all duration-150",style:{background:_?"var(--accent-muted)":"transparent",border:_?"1px solid var(--accent)":"1px solid transparent",cursor:"pointer"},onMouseEnter:se=>{_||(se.currentTarget.style.background="var(--surface-1)")},onMouseLeave:se=>{_||(se.currentTarget.style.background="transparent")},children:[c.jsx("span",{className:"absolute left-1.5 top-4 rounded-full",style:{width:Y?10:8,height:Y?10:8,background:Y?"var(--accent)":"var(--surface-3)",border:Y?"2px solid var(--accent)":"2px solid var(--border-default)"}}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:P.version}),c.jsx("span",{className:"text-[9px] font-medium px-1.5 py-0.5 rounded-full",style:{background:re.bg,color:re.text},children:P.certTier}),Y&&c.jsx("span",{className:"text-[9px] font-medium px-1.5 py-0.5 rounded-full",style:{background:"var(--accent-muted)",color:"var(--accent)"},children:"installed"})]}),c.jsx("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:new Date(P.createdAt).toLocaleDateString()})]}),P.diffSummary&&c.jsx("div",{className:"text-[11px] mt-1",style:{color:"var(--text-tertiary)"},children:O1(P.diffSummary,80)})]},P.version)})}),c.jsx("div",{ref:J,style:{height:1}})]}),B&&c.jsx("div",{className:"mt-4",children:c.jsx("div",{className:"skeleton h-48 rounded-xl"})}),w&&!B&&c.jsx("div",{className:"mt-4",children:c.jsx(Cy,{contentDiff:w.contentDiff,fromLabel:w.from,toLabel:w.to,diffSummary:w.diffSummary,renderContext:"inline",onRetry:()=>h&&b&&F(w.from,w.to)})})]})}function H1(a){const i={prompt:a.prompt,provider:a.provider,model:a.model};return a.targetAgents&&a.targetAgents.length>0&&(i.targetAgents=a.targetAgents),i}function Tc(a,i=!0){let o=a.toLowerCase().replace(/[^a-z0-9]+/g,"-");return i&&(o=o.replace(/^-+|-+$/g,"")),o}function U1(a,i,o,u){const m=`.../${a.split("/").slice(-2).join("/")}`;switch(i){case 1:return`${m}/${o}/skills/${u}/SKILL.md`;case 2:return`${m}/plugins/${o}/skills/${u}/SKILL.md`;case 3:return`${m}/skills/${u}/SKILL.md`}}function B1({onCreated:a,resolveAiConfigOverride:i}){const[o,u]=x.useState("ai"),[d,m]=x.useState(null),[p,y]=x.useState(!0),{config:g}=Hs(),[h,C]=x.useState(""),[b,k]=x.useState(3),[w,R]=x.useState(""),[B,z]=x.useState(""),[E,A]=x.useState(""),[G,$]=x.useState(""),[O,J]=x.useState(""),[T,L]=x.useState(""),[D,W]=x.useState("write"),[F,de]=x.useState([]),[ce,P]=x.useState(!1),[re,_]=x.useState(null),[Y,se]=x.useState(""),[Ce,je]=x.useState(!1),[S,q]=x.useState(!1),[te,oe]=x.useState(null),[he,be]=x.useState(null),[Ee,le]=x.useState([]),xe=x.useRef(null),Xe=x.useRef(null),Be=x.useRef(null),Q=x.useRef(null),[ie,ae]=x.useState(!1),[ue,me]=x.useState(!1);x.useEffect(()=>{lt.getProjectLayout().then(Le=>{m(Le),k(Le.suggestedLayout);const Ot=Le.detectedLayouts.find(ml=>ml.layout===Le.suggestedLayout);Ot!=null&&Ot.existingPlugins.length&&R(Ot.existingPlugins[0])}).catch(()=>{}).finally(()=>y(!1))},[]),x.useEffect(()=>{var Le;o==="ai"&&((Le=xe.current)==null||Le.focus())},[o]),x.useEffect(()=>()=>{var Le;(Le=Xe.current)==null||Le.abort()},[]);const De=x.useMemo(()=>{var Le;return d?((Le=d.detectedLayouts.find(Ot=>Ot.layout===b))==null?void 0:Le.existingPlugins)||[]:[]},[d,b]),Re=w==="__new__"?B:w,vt=d?U1(d.root,b,Re||"{plugin}",h||"{skill}"):"",fl=x.useMemo(()=>d?d.detectedLayouts.filter(Le=>Le.layout!==4):[],[d]),ht=x.useMemo(()=>{if(!d)return null;const Le=d.detectedLayouts.find(At=>At.layout===2&&At.existingPlugins.length>0),Ot=d.detectedLayouts.find(At=>At.layout===1&&At.existingPlugins.length>0),ml=Le||Ot;return ml?{layout:ml.layout,plugins:ml.existingPlugins}:null},[d]),Xt=x.useCallback(()=>{if(i)return i();if(!g)return{provider:"claude-cli",model:"sonnet"};const Le=g.provider||"claude-cli",Ot=g.model||"sonnet";return{provider:Le,model:Ot}},[g,i]),wl=x.useCallback(()=>{var Le;(Le=Xe.current)==null||Le.abort(),je(!1)},[]),at=x.useCallback(()=>{oe(null),be(null)},[]),Et=x.useCallback(async()=>{if(oe(null),be(null),le([]),Be.current=null,!Y.trim()){oe("Describe what your skill should do");return}je(!0);const Le=new AbortController;Xe.current=Le;const{provider:Ot,model:ml}=Xt();try{const At=await fetch("/api/skills/generate?sse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(H1({prompt:Y.trim(),provider:Ot,model:ml,targetAgents:F})),signal:Le.signal});if(!At.ok||!At.body){let _t=`HTTP ${At.status}`;try{const ua=await At.json();ua.error&&(_t=ua.error)}catch{}throw new Error(_t)}const si=At.body.getReader(),Bn=new TextDecoder;let Lt="",Qt="";for(;;){const{done:_t,value:ua}=await si.read();if(_t)break;Lt+=Bn.decode(ua,{stream:!0});const hr=Lt.split(`
58
+ `);Lt=hr.pop()||"";for(const ca of hr)if(ca.startsWith("event: "))Qt=ca.slice(7).trim();else if(ca.startsWith("data: ")){try{const rt=JSON.parse(ca.slice(6));if(Qt==="progress")le(Vl=>[...Vl,{phase:rt.phase,message:rt.message,timestamp:Date.now()}]);else if(Qt==="done"||Qt==="complete"){const Vl={prompt:Y.trim(),provider:Xt().provider,model:Xt().model,reasoning:rt.reasoning||""};if(C(rt.name),A(rt.description),$(rt.model||""),J(rt.allowedTools||""),L(rt.body),q(!0),Be.current=Vl,u("manual"),rt.suggestedPlugin&&typeof rt.suggestedPlugin=="object"&&rt.suggestedPlugin.plugin){const xt=rt.suggestedPlugin;if(((d==null?void 0:d.detectedLayouts.flatMap(pl=>pl.existingPlugins))??[]).includes(xt.plugin))if(R(xt.plugin),xt.layout&&(xt.layout===1||xt.layout===2))k(xt.layout);else{const pl=d==null?void 0:d.detectedLayouts.find(Is=>Is.existingPlugins.includes(xt.plugin));pl&&(pl.layout===1||pl.layout===2)&&k(pl.layout)}else R("__new__"),z(xt.plugin)}else b===3&&ht&&me(!0);const da={name:rt.name,plugin:Re||"",layout:b,description:rt.description,model:rt.model||void 0,allowedTools:rt.allowedTools||void 0,body:rt.body,aiMeta:Vl};lt.saveDraft(da).then(xt=>{ae(!0),xt!=null&&xt.dir&&(Q.current=xt.dir)}).catch(()=>{})}else Qt==="error"&&(oe(rt.message||rt.description||"Unknown error"),rt.category&&be(rt))}catch{}Qt=""}}}catch(At){At.name!=="AbortError"&&oe(At.message)}finally{je(!1),Xe.current=null}},[Y,Xt,b,ht,Re,d,F]),Hn=x.useCallback(async()=>{if(_(null),!h.trim()){_("Skill name is required");return}if(!E.trim()){_("Description is required");return}if(b!==3&&!Re.trim()){_("Plugin name is required");return}P(!0);try{const Le=await lt.createSkill({name:Tc(h),plugin:Re||"",layout:b,description:E,model:G||void 0,allowedTools:O||void 0,body:T,aiMeta:Be.current||void 0,draftDir:Q.current||void 0});Q.current=null,a(Le.plugin,Le.skill)}catch(Le){_(Le.message)}finally{P(!1)}},[h,E,b,Re,G,O,T,a]),Un=x.useCallback(()=>{ht&&(k(ht.layout),R(ht.plugins[0]),me(!1))},[ht]);return{mode:o,setMode:u,layout:d,layoutLoading:p,selectedLayout:b,setSelectedLayout:k,creatableLayouts:fl,availablePlugins:De,pathPreview:vt,plugin:w,setPlugin:R,newPlugin:B,setNewPlugin:z,effectivePlugin:Re,name:h,setName:C,description:E,setDescription:A,model:G,setModel:$,allowedTools:O,setAllowedTools:J,body:T,setBody:L,bodyViewMode:D,setBodyViewMode:W,aiPrompt:Y,setAiPrompt:se,generating:Ce,aiGenerated:S,aiError:te,aiClassifiedError:he,aiProgress:Ee,promptRef:xe,handleGenerate:Et,handleCancelGenerate:wl,clearAiError:at,targetAgents:F,setTargetAgents:de,draftSaved:ie,showPluginRecommendation:ue,setShowPluginRecommendation:me,pluginLayoutInfo:ht,applyPluginRecommendation:Un,creating:ce,error:re,handleCreate:Hn}}function V1(a,i){if(i&&new Set(["generating","comparing","judging","judging_assertion","preparing","parsing","generating_skill","generating_baseline","scoring","action_items"]).has(a))return c.jsx("div",{className:"spinner",style:{width:10,height:10,flexShrink:0}});const u=new Set(["generating","comparing","preparing","generating_skill","generating_baseline","scoring","action_items"]);return c.jsx("div",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{background:u.has(a)?"var(--accent)":"var(--green)"}})}function G1({entries:a,isRunning:i}){const[o,u]=x.useState(!1),d=x.useRef(null);return x.useEffect(()=>{d.current&&!o&&(d.current.scrollTop=d.current.scrollHeight)},[a,o]),a.length===0&&!i?null:c.jsxs("div",{className:"mt-2 animate-fade-in",style:{borderTop:"1px solid var(--border-subtle)"},children:[c.jsxs("button",{onClick:()=>u(!o),className:"w-full flex items-center justify-between px-3 py-2 text-[11px] font-medium transition-colors duration-150",style:{color:"var(--text-tertiary)"},onMouseEnter:m=>{m.currentTarget.style.color="var(--text-primary)"},onMouseLeave:m=>{m.currentTarget.style.color="var(--text-tertiary)"},children:[c.jsxs("span",{className:"flex items-center gap-2",children:[i&&c.jsx("div",{className:"spinner",style:{width:10,height:10}}),"Progress Log (",a.length,")"]}),c.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",style:{transform:o?"rotate(0)":"rotate(180deg)",transition:"transform 0.2s ease"},children:c.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),!o&&c.jsx("div",{ref:d,className:"px-3 pb-3 space-y-1 max-h-48 overflow-y-auto",children:a.map((m,p)=>{const y=p===a.length-1&&i,g=p===0?"0s":`+${((m.timestamp-a[0].timestamp)/1e3).toFixed(1)}s`;return c.jsxs("div",{className:"flex items-center gap-2 text-[11px] animate-fade-in",style:{opacity:y?1:.7},children:[V1(m.phase,y),c.jsx("span",{className:"font-mono flex-shrink-0",style:{color:"var(--text-tertiary)",width:40},children:g}),c.jsx("span",{style:{color:y?"var(--text-primary)":"var(--text-secondary)"},children:m.message}),m.current!=null&&m.total!=null&&c.jsxs("span",{className:"font-mono flex-shrink-0",style:{color:"var(--text-tertiary)"},children:["[",m.current,"/",m.total,"]"]})]},p)})})]})}const Sh={rate_limit:{icon:"⏱",color:"var(--amber, #f59e0b)"},context_window:{icon:"⚠",color:"var(--amber, #f59e0b)"},auth:{icon:"🔒",color:"var(--red, #ef4444)"},timeout:{icon:"⌛",color:"var(--amber, #f59e0b)"},model_not_found:{icon:"🔍",color:"var(--red, #ef4444)"},provider_unavailable:{icon:"⚡",color:"var(--red, #ef4444)"},parse_error:{icon:"❓",color:"var(--amber, #f59e0b)"},unknown:{icon:"❌",color:"var(--red, #ef4444)"}};function I1({error:a,onRetry:i,onDismiss:o}){const[u,d]=x.useState(null),m=x.useRef(null);x.useEffect(()=>(a.category==="rate_limit"&&a.retryAfterMs?d(Math.ceil(a.retryAfterMs/1e3)):d(null),()=>{m.current&&clearInterval(m.current)}),[a]),x.useEffect(()=>{if(!(u==null||u<=0))return m.current=setInterval(()=>{d(g=>g==null||g<=1?(m.current&&clearInterval(m.current),0):g-1)},1e3),()=>{m.current&&clearInterval(m.current)}},[u!=null&&u>0]);const p=Sh[a.category]||Sh.unknown,y=u!=null&&u>0;return c.jsxs("div",{className:"rounded-lg overflow-hidden animate-fade-in",style:{border:`1px solid color-mix(in srgb, ${p.color} 30%, transparent)`,background:`color-mix(in srgb, ${p.color} 6%, var(--surface-1))`},children:[c.jsxs("div",{className:"flex items-center justify-between px-3.5 py-2.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{style:{fontSize:14},children:p.icon}),c.jsx("span",{className:"text-[12px] font-semibold",style:{color:p.color},children:a.title})]}),o&&c.jsx("button",{onClick:o,className:"w-5 h-5 rounded flex items-center justify-center",style:{color:"var(--text-tertiary)"},children:c.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),c.jsxs("div",{className:"px-3.5 pb-3",children:[c.jsx("p",{className:"text-[11.5px] mb-1.5",style:{color:"var(--text-secondary)"},children:a.description}),c.jsx("p",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:a.hint}),(i||u!=null)&&c.jsx("div",{className:"flex items-center gap-2 mt-2.5",children:i&&c.jsx("button",{onClick:i,disabled:y,className:"btn btn-secondary text-[11px]",style:{padding:"4px 10px",opacity:y?.5:1},children:y?`Retry in ${u}s`:"Retry"})})]})]})}function q1(a){if(!a)return"";try{let i=a.replace(/^---\n[\s\S]*?\n---\n?/,""),o=Y1(i);return o=o.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>'),o=o.replace(/^### (.+)$/gm,'<div style="font-weight:600;font-size:14px;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),o=o.replace(/^## (.+)$/gm,'<div style="font-weight:700;font-size:15px;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),o=o.replace(/^# (.+)$/gm,'<div style="font-weight:700;font-size:1rem;margin:0.75rem 0 0.25rem;color:var(--text-primary)">$1</div>'),o=o.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer" style="color:var(--accent);text-decoration:underline">$1</a>'),o=o.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),o=o.replace(/\*([^*]+)\*/g,"<em>$1</em>"),o=o.replace(/`([^`]+)`/g,'<code style="background:var(--surface-3);padding:0.1rem 0.3rem;border-radius:3px;font-size:0.85em">$1</code>'),o=o.replace(/^- (.+)$/gm,'<div style="padding-left:1rem;margin:0.15rem 0">• $1</div>'),o=o.replace(/^(\d+)\. (.+)$/gm,'<div style="padding-left:1rem;margin:0.15rem 0">$1. $2</div>'),o=o.replace(/\n\n/g,'<div style="height:0.5rem"></div>'),o=o.replace(/\n/g,"<br/>"),o}catch{return`<pre style="white-space:pre-wrap;font-size:12px;line-height:1.5">${a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</pre>`}}function Y1(a){const i=a.split(`
59
+ `),o=[];let u=0;for(;u<i.length;)if(i[u].trim().startsWith("|")&&u+1<i.length&&i[u+1].trim().startsWith("|")&&/\|[\s-:]+\|/.test(i[u+1])){const d=Eh(i[u]);u+=2;const m=[];for(;u<i.length&&i[u].trim().startsWith("|");)m.push(Eh(i[u])),u++;const p='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)"',y='style="padding:0.4rem 0.6rem;font-size:12px;color:var(--text-secondary);border-bottom:1px solid var(--border-subtle)"';let g='<table style="width:100%;border-collapse:collapse;margin:0.5rem 0;border:1px solid var(--border-subtle);border-radius:6px;overflow:hidden">';g+="<thead><tr>";for(const h of d)g+=`<th ${p}>${h}</th>`;g+="</tr></thead><tbody>";for(const h of m){g+="<tr>";for(const C of h)g+=`<td ${y}>${C}</td>`;g+="</tr>"}g+="</tbody></table>",o.push(g)}else o.push(i[u]),u++;return o.join(`
60
+ `)}function Eh(a){return a.split("|").map(i=>i.trim()).filter(i=>i.length>0)}function jy(){return c.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function X1(){return c.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),c.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function ky({node:a,depth:i=0}){var o;return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",style:{paddingLeft:`${i*16}px`,color:a.type==="dir"?"var(--text-secondary)":"var(--text-tertiary)",fontSize:12,fontFamily:"var(--font-mono, monospace)"},children:[a.type==="dir"?c.jsx(jy,{}):c.jsx(X1,{}),c.jsxs("span",{children:[a.name,a.type==="dir"?"/":""]})]}),(o=a.children)==null?void 0:o.map(u=>c.jsx(ky,{node:u,depth:i+1},u.name))]})}function Q1(a,i,o){const u=[];i&&u.push({name:"evals.json",type:"file"}),u.push({name:"history",type:"dir"});const d=[{name:"SKILL.md",type:"file"},{name:"evals",type:"dir",children:u}];return o&&d.push({name:"draft.json",type:"file"}),{name:a||"{skill}",type:"dir",children:d}}function K1({skillName:a,hasEvals:i,isDraft:o}){const u=Q1(a,i,o);return c.jsxs("div",{className:"glass-card p-4",children:[c.jsxs("h3",{className:"text-[13px] font-semibold mb-3 flex items-center gap-2",style:{color:"var(--text-primary)"},children:[c.jsx("div",{className:"w-5 h-5 rounded-md flex items-center justify-center",style:{background:"var(--accent-muted)"},children:c.jsx(jy,{})}),"Skill Structure"]}),c.jsx("div",{className:"rounded-lg px-3 py-2",style:{background:"var(--surface-0)",border:"1px solid var(--border-subtle)"},children:c.jsx(ky,{node:u})})]})}const _n={background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"};function hc({size:a=14,color:i="currentColor"}){return c.jsx("svg",{width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M12 3l1.912 5.813a2 2 0 001.275 1.275L21 12l-5.813 1.912a2 2 0 00-1.275 1.275L12 21l-1.912-5.813a2 2 0 00-1.275-1.275L3 12l5.813-1.912a2 2 0 001.275-1.275L12 3z"})})}function Z1({onCreated:a,onCancel:i}){const o=B1({onCreated:a});return c.jsxs("div",{className:"px-8 py-6 max-w-4xl animate-fade-in overflow-auto h-full",children:[c.jsxs("div",{className:"mb-5",children:[c.jsx("h2",{className:"text-[20px] font-semibold tracking-tight",style:{color:"var(--text-primary)"},children:"Create a New Skill"}),c.jsx("div",{className:"flex items-center justify-between mt-2",children:c.jsxs("div",{className:"inline-flex rounded-lg p-0.5",style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)"},children:[c.jsx("button",{onClick:()=>o.setMode("ai"),className:"px-3 py-1.5 rounded-md text-[12px] font-medium transition-all duration-200",style:{background:o.mode==="ai"?"rgba(168,85,247,0.15)":"transparent",color:o.mode==="ai"?"#a855f7":"var(--text-tertiary)",boxShadow:o.mode==="ai"?"0 1px 3px rgba(168,85,247,0.15)":"none",cursor:"pointer",border:"none"},children:c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx(hc,{size:12}),"AI-Assisted"]})}),c.jsx("button",{onClick:()=>o.setMode("manual"),className:"px-3 py-1.5 rounded-md text-[12px] font-medium transition-all duration-200",style:{background:o.mode==="manual"?"var(--surface-4, var(--surface-3))":"transparent",color:o.mode==="manual"?"var(--text-primary)":"var(--text-tertiary)",boxShadow:o.mode==="manual"?"0 1px 3px rgba(0,0,0,0.1)":"none",cursor:"pointer",border:"none"},children:"Manual"})]})})]}),o.layoutLoading&&c.jsxs("div",{className:"space-y-3",children:[c.jsx("div",{className:"skeleton h-10 w-full rounded-lg"}),c.jsx("div",{className:"skeleton h-10 w-full rounded-lg"})]}),!o.layoutLoading&&o.layout&&o.mode==="ai"&&c.jsxs("div",{className:"space-y-4 animate-fade-in",children:[c.jsxs("div",{className:"glass-card p-4",children:[c.jsxs("h3",{className:"text-[13px] font-semibold mb-3 flex items-center gap-2",style:{color:"var(--text-primary)"},children:[c.jsx("div",{className:"w-5 h-5 rounded-md flex items-center justify-center",style:{background:"rgba(168,85,247,0.15)"},children:c.jsx(hc,{size:11,color:"#a855f7"})}),"Describe Your Skill"]}),c.jsx("textarea",{ref:o.promptRef,value:o.aiPrompt,onChange:u=>o.setAiPrompt(u.target.value),placeholder:`e.g., A skill that helps format SQL queries, optimize them for performance, and explain query execution plans.
61
+
62
+ Include any specific behaviors, constraints, or output formats you want.`,rows:5,disabled:o.generating,className:"w-full px-3 py-2.5 rounded-lg text-[13px] resize-y",style:{..._n,minHeight:"120px"},onKeyDown:u=>{u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),o.handleGenerate())}}),c.jsx("p",{className:"text-[11px] mt-2",style:{color:"var(--text-quaternary, var(--text-tertiary))"},children:"Cmd+Enter to generate"})]}),o.generating&&o.aiProgress.length>0&&c.jsx(G1,{entries:o.aiProgress,isRunning:!0}),o.aiError&&c.jsx("div",{children:o.aiClassifiedError?c.jsx(I1,{error:o.aiClassifiedError,onRetry:o.handleGenerate,onDismiss:o.clearAiError}):c.jsxs("div",{children:[c.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:o.aiError}),c.jsx("button",{onClick:o.handleGenerate,className:"mt-2 text-[12px] font-medium",style:{color:"#a855f7",background:"none",border:"none",cursor:"pointer"},children:"Retry"})]})}),c.jsxs("div",{className:"flex items-center gap-3",children:[o.generating?c.jsx("button",{onClick:o.handleCancelGenerate,className:"px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150 flex items-center gap-2",style:{background:"var(--surface-3)",color:"var(--text-secondary)",border:"none",cursor:"pointer"},children:"Cancel Generation"}):c.jsxs("button",{onClick:o.handleGenerate,disabled:!o.aiPrompt.trim(),className:"px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150 flex items-center gap-2",style:{background:o.aiPrompt.trim()?"#a855f7":"var(--surface-3)",color:o.aiPrompt.trim()?"#fff":"var(--text-tertiary)",cursor:o.aiPrompt.trim()?"pointer":"not-allowed",border:"none"},children:[c.jsx(hc,{size:14}),"Generate"]}),c.jsx("button",{onClick:i,className:"px-4 py-2.5 rounded-lg text-[13px] font-medium",style:{color:"var(--text-secondary)",background:"none",border:"none",cursor:"pointer"},children:"Cancel"}),!o.generating&&c.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:["or fill in the form manually",c.jsx("button",{onClick:()=>o.setMode("manual"),className:"ml-1 font-medium",style:{color:"var(--accent)",background:"none",border:"none",cursor:"pointer"},children:"below"})]})]})]}),!o.layoutLoading&&o.layout&&o.mode==="manual"&&c.jsxs("div",{className:"space-y-4 animate-fade-in",children:[c.jsxs("div",{className:"glass-card p-4",children:[c.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Location"}),o.creatableLayouts.length>1&&c.jsxs("div",{className:"mb-3",children:[c.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Layout"}),c.jsx("div",{className:"flex gap-2",children:o.creatableLayouts.map(u=>c.jsx("button",{onClick:()=>{o.setSelectedLayout(u.layout),o.setPlugin(u.existingPlugins[0]||""),o.setNewPlugin("")},className:"px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all duration-150",style:{background:o.selectedLayout===u.layout?"var(--accent)":"var(--surface-3)",color:o.selectedLayout===u.layout?"#fff":"var(--text-secondary)",border:`1px solid ${o.selectedLayout===u.layout?"var(--accent)":"var(--border-subtle)"}`,cursor:"pointer"},children:u.label},u.layout))})]}),o.selectedLayout!==3&&c.jsxs("div",{className:"mb-3",children:[c.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-2 block",style:{color:"var(--text-tertiary)"},children:"Plugin"}),c.jsxs("select",{value:o.plugin,onChange:u=>{o.setPlugin(u.target.value),o.setNewPlugin("")},className:"w-full px-3 py-2 rounded-lg text-[13px]",style:_n,children:[o.availablePlugins.map(u=>c.jsx("option",{value:u,children:u},u)),c.jsx("option",{value:"__new__",children:"+ New plugin..."})]}),o.plugin==="__new__"&&c.jsx("input",{type:"text",value:o.newPlugin,onChange:u=>o.setNewPlugin(Tc(u.target.value)),placeholder:"my-plugin",className:"w-full mt-2 px-3 py-2 rounded-lg text-[13px]",style:_n})]}),c.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:o.pathPreview})]}),o.showPluginRecommendation&&o.pluginLayoutInfo&&o.selectedLayout===3&&c.jsxs("div",{className:"px-4 py-3 rounded-lg text-[12px] animate-fade-in flex items-center justify-between gap-3",style:{background:"rgba(59,130,246,0.08)",color:"var(--text-secondary)",border:"1px solid rgba(59,130,246,0.2)"},children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#3b82f6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("circle",{cx:"12",cy:"12",r:"10"}),c.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),c.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),c.jsxs("span",{children:["Plugins detected (",c.jsx("strong",{children:o.pluginLayoutInfo.plugins.slice(0,3).join(", ")}),"). Add this skill to a plugin for better organization."]})]}),c.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[c.jsx("button",{onClick:o.applyPluginRecommendation,className:"px-3 py-1 rounded-md text-[11px] font-medium",style:{background:"#3b82f6",color:"#fff",border:"none",cursor:"pointer"},children:"Use plugin"}),c.jsx("button",{onClick:()=>o.setShowPluginRecommendation(!1),className:"w-5 h-5 rounded flex items-center justify-center",style:{color:"var(--text-tertiary)",background:"none",border:"none",cursor:"pointer"},children:c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[c.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})]}),c.jsxs("div",{className:"glass-card p-4",children:[c.jsx("h3",{className:"text-[13px] font-semibold mb-3",style:{color:"var(--text-primary)"},children:"Skill Details"}),c.jsxs("div",{className:"mb-3",children:[c.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:["Name ",c.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),c.jsx("input",{type:"text",value:o.name,onChange:u=>o.setName(Tc(u.target.value,!1)),placeholder:"my-skill",className:"w-full px-3 py-2 rounded-lg text-[13px]",style:_n})]}),c.jsxs("div",{className:"mb-3",children:[c.jsxs("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:["Description ",c.jsx("span",{style:{color:"var(--red)"},children:"*"})]}),c.jsx("textarea",{value:o.description,onChange:u=>o.setDescription(u.target.value),placeholder:"Brief description",rows:3,className:"w-full px-3 py-2 rounded-lg text-[13px] resize-y",style:{..._n,minHeight:"72px"}})]}),c.jsxs("div",{className:"flex gap-3",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Model"}),c.jsxs("select",{value:o.model,onChange:u=>o.setModel(u.target.value),className:"w-full px-3 py-2 rounded-lg text-[13px]",style:_n,children:[c.jsx("option",{value:"",children:"Any"}),c.jsx("option",{value:"opus",children:"Opus"}),c.jsx("option",{value:"sonnet",children:"Sonnet"}),c.jsx("option",{value:"haiku",children:"Haiku"})]})]}),c.jsxs("div",{className:"flex-1",children:[c.jsx("label",{className:"text-[11px] font-medium uppercase tracking-wider mb-1 block",style:{color:"var(--text-tertiary)"},children:"Allowed Tools"}),c.jsx("input",{type:"text",value:o.allowedTools,onChange:u=>o.setAllowedTools(u.target.value),placeholder:"Read, Write, Edit...",className:"w-full px-3 py-2 rounded-lg text-[13px]",style:_n})]})]})]}),c.jsxs("div",{className:"glass-card p-4",children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center",style:{background:"var(--accent-muted)"},children:c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),c.jsx("polyline",{points:"14 2 14 8 20 8"}),c.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),c.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]})}),c.jsxs("div",{children:[c.jsx("span",{className:"text-[13px] font-semibold",style:{color:"var(--text-primary)"},children:"SKILL.md"}),c.jsx("span",{className:"text-[11px] ml-2",style:{color:"var(--text-tertiary)"},children:"Skill Definition"})]})]}),c.jsx("div",{className:"flex items-center",style:{background:"var(--surface-2)",borderRadius:8,padding:2,gap:1},children:["write","preview"].map(u=>c.jsxs("button",{onClick:()=>o.setBodyViewMode(u),className:"flex items-center gap-1 rounded-md transition-all duration-150",style:{padding:"4px 10px",background:o.bodyViewMode===u?"var(--surface-4)":"transparent",color:o.bodyViewMode===u?"var(--text-primary)":"var(--text-tertiary)",fontSize:11,fontWeight:o.bodyViewMode===u?600:400,border:"none",cursor:"pointer"},children:[u==="write"?c.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("polyline",{points:"16 18 22 12 16 6"}),c.jsx("polyline",{points:"8 6 2 12 8 18"})]}):c.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),c.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),c.jsx("span",{children:u==="write"?"Write":"Preview"})]},u))})]}),o.bodyViewMode==="write"?c.jsx("textarea",{value:o.body,onChange:u=>o.setBody(u.target.value),placeholder:`# /my-skill
63
+
64
+ You are an expert at...
65
+ `,rows:8,className:"w-full px-3 py-2 rounded-lg text-[13px] font-mono resize-y",style:{..._n,minHeight:"150px"}}):o.body.trim()?c.jsx("div",{className:"text-[13px] leading-relaxed overflow-x-auto rounded-lg px-4 py-3",style:{background:"var(--surface-0)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",minHeight:"150px",maxHeight:"400px",overflowY:"auto"},dangerouslySetInnerHTML:{__html:q1(o.body)}}):c.jsx("div",{className:"text-[13px] leading-relaxed overflow-x-auto rounded-lg px-4 py-3",style:{background:"var(--surface-0)",color:"var(--text-secondary)",border:"1px solid var(--border-subtle)",minHeight:"150px",maxHeight:"400px",overflowY:"auto"},children:c.jsx("span",{style:{color:"var(--text-tertiary)"},children:"Start writing to see preview"})})]}),c.jsx(K1,{skillName:o.name||"{skill}",hasEvals:!1,isDraft:o.draftSaved}),o.error&&c.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:o.error}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("button",{onClick:o.handleCreate,disabled:o.creating||!o.name||!o.description,className:"px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:o.creating||!o.name||!o.description?"var(--surface-3)":"var(--accent)",color:o.creating||!o.name||!o.description?"var(--text-tertiary)":"#fff",cursor:o.creating||!o.name||!o.description?"not-allowed":"pointer",border:"none"},children:o.creating?"Creating...":"Create Skill"}),c.jsx("button",{onClick:i,className:"px-4 py-2.5 rounded-lg text-[13px] font-medium",style:{color:"var(--text-secondary)",background:"none",border:"none",cursor:"pointer"},children:"Cancel"})]})]})]})}function J1(){return c.jsx("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center",style:{background:"var(--surface-2)"},children:c.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[c.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"}),c.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"}),c.jsx("line",{x1:"12",y1:"22.08",x2:"12",y2:"12"})]})})}function Ms({variant:a,message:i,onRetry:o}){const{setMode:u,setSearch:d}=li(),[m,p]=x.useState(!1);return a==="no-selection"?c.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-8 animate-fade-in",children:[c.jsx("div",{className:"mb-5",children:m?c.jsx(J1,{}):c.jsx("img",{src:"/images/empty-studio.webp",width:128,height:128,alt:"",onError:()=>p(!0),style:{objectFit:"contain"}})}),c.jsx("p",{className:"text-[14px] font-medium mb-1",style:{color:"var(--text-secondary)"},children:"Select a skill to view details"}),c.jsx("p",{className:"text-[12px]",style:{color:"var(--text-tertiary)"},children:"Choose a skill from the list to edit, test, and evaluate"})]}):a==="no-skills"?c.jsxs("div",{className:"text-center py-12 px-4 animate-fade-in-scale",children:[c.jsx("div",{className:"w-14 h-14 rounded-2xl flex items-center justify-center mx-auto mb-4",style:{background:"var(--surface-2)"},children:c.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:c.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"})})}),c.jsx("p",{className:"text-[14px] font-medium",style:{color:"var(--text-secondary)"},children:"No skills found"}),c.jsxs("p",{className:"text-[12px] mt-1 mb-4",style:{color:"var(--text-tertiary)"},children:["Check your ",c.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"]}),c.jsxs("button",{onClick:()=>u("create"),className:"inline-flex items-center gap-2 px-5 py-2.5 rounded-lg text-[13px] font-medium transition-all duration-150",style:{background:"var(--accent)",color:"#fff",border:"none",cursor:"pointer"},onMouseEnter:y=>{y.currentTarget.style.opacity="0.9"},onMouseLeave:y=>{y.currentTarget.style.opacity="1"},children:[c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),c.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),"Create Your First Skill"]})]}):a==="error"?c.jsx("div",{className:"flex flex-col items-center justify-center h-full px-8 animate-fade-in",children:c.jsxs("div",{className:"px-5 py-4 rounded-lg text-center max-w-sm",style:{background:"var(--red-muted)",border:"1px solid rgba(248,113,113,0.2)"},children:[c.jsx("p",{className:"text-[13px] mb-3",style:{color:"var(--red)"},children:i||"Failed to load skill data"}),o&&c.jsx("button",{onClick:o,className:"px-4 py-2 rounded-lg text-[12px] font-medium",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"none",cursor:"pointer"},children:"Retry"})]})}):c.jsxs("div",{className:"px-4 py-8 text-center animate-fade-in",children:[c.jsx("p",{className:"text-[13px] mb-2",style:{color:"var(--text-tertiary)"},children:"No skills match your search"}),c.jsx("button",{onClick:()=>d(""),className:"text-[12px] font-medium",style:{color:"var(--accent)",background:"none",border:"none",cursor:"pointer",textDecoration:"underline"},children:"Clear search"})]})}function $1(a,i){const[o,u]=a.split(".").map(Number),[d,m]=i.split(".").map(Number);return d>o?"major":m>u?"minor":"patch"}const W1={major:{bg:"var(--red-muted)",text:"var(--red)"},minor:{bg:"var(--yellow-muted)",text:"var(--yellow)"},patch:{bg:"var(--green-muted)",text:"var(--green)"}};function F1(){const[a,i]=x.useState([]),[o,u]=x.useState(!0),[d,m]=x.useState(new Set),[p,y]=x.useState(new Map),[g,h]=x.useState(!1),[C,b]=x.useState(new Set),[k,w]=x.useState(null),[R,B]=x.useState(null),[z,E]=x.useState(!1),A=x.useCallback(async()=>{u(!0);try{const D=await lt.getSkillUpdates();i(D.filter(W=>W.updateAvailable))}catch{i([])}finally{u(!1)}},[]);x.useEffect(()=>{A()},[A]);const G=x.useMemo(()=>a.filter(D=>!D.pinned),[a]),$=x.useCallback(D=>{m(W=>{const F=new Set(W);return F.has(D)?F.delete(D):F.add(D),F})},[]),O=x.useCallback(()=>{d.size===G.length?m(new Set):m(new Set(G.map(D=>D.name)))},[d,G]),J=x.useCallback(()=>{const D=[...d];if(!D.length)return;h(!0),y(new Map(D.map(F=>[F,{skill:F,status:"pending"}])));const W=lt.startBatchUpdate(D);W.addEventListener("progress",F=>{try{const de=JSON.parse(F.data);y(ce=>new Map(ce).set(de.skill,de))}catch{}}),W.addEventListener("done",F=>{W.close(),h(!1);try{const de=JSON.parse(F.data);w(`Updated ${de.updated??0} skills, ${de.failed??0} failed`),setTimeout(()=>w(null),5e3)}catch{}A()}),W.addEventListener("error",()=>{W.close(),h(!1),w("Batch update failed"),setTimeout(()=>w(null),5e3)})},[d,A]),T=x.useCallback(D=>{D.name.split("/").pop()||D.name;const W=D.name.split("/"),F=W.length>=3?W[W.length-2]:W[0],de=W[W.length-1];b(P=>new Set(P).add(D.name));const ce=lt.startSkillUpdate(F,de);ce.addEventListener("done",()=>{ce.close(),b(P=>{const re=new Set(P);return re.delete(D.name),re}),A()}),ce.addEventListener("error",()=>{ce.close(),b(P=>{const re=new Set(P);return re.delete(D.name),re})})},[A]),L=x.useCallback(async D=>{if(!D.latest)return;const W=D.name.split("/"),F=W.length>=3?W[W.length-2]:W[0],de=W[W.length-1];E(!0);try{const ce=await lt.getVersionDiff(F,de,D.installed,D.latest);B({skill:D,diff:ce})}catch{B(null)}finally{E(!1)}},[]);return o?c.jsxs("div",{className:"p-6",children:[c.jsx("div",{className:"skeleton h-6 w-48 mb-4"}),c.jsxs("div",{className:"space-y-3",children:[c.jsx("div",{className:"skeleton h-16 rounded-lg"}),c.jsx("div",{className:"skeleton h-16 rounded-lg"})]})]}):a.length===0?c.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-16",children:[c.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"mb-4",children:[c.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),c.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}),c.jsx("div",{className:"text-[15px] font-semibold mb-2",style:{color:"var(--text-primary)"},children:"All skills are up to date"}),c.jsx("div",{className:"text-[12px] mb-4",style:{color:"var(--text-tertiary)"},children:"No updates available for installed skills."}),c.jsx("button",{onClick:A,className:"btn btn-secondary text-[12px]",children:"Refresh"})]}):c.jsxs("div",{className:"p-6",children:[k&&c.jsx("div",{className:"fixed top-4 right-4 z-50 px-4 py-3 rounded-lg text-[13px] font-medium animate-fade-in",style:{background:"var(--surface-3)",color:"var(--text-primary)",border:"1px solid var(--border-subtle)"},children:k}),c.jsxs("div",{className:"flex items-center justify-between mb-5",children:[c.jsxs("div",{className:"text-[16px] font-semibold",style:{color:"var(--text-primary)"},children:["Available Updates (",G.length,")"]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{onClick:A,className:"btn btn-ghost text-[12px]",disabled:g,children:"Refresh"}),c.jsx("button",{onClick:J,disabled:d.size===0||g,className:"btn btn-primary text-[12px]",children:g?"Updating...":`Update Selected (${d.size})`})]})]}),c.jsx("div",{className:"flex items-center gap-2 mb-3",children:c.jsxs("button",{onClick:O,className:"flex items-center gap-2 text-[12px] font-medium",style:{color:"var(--text-secondary)",background:"transparent",border:"none",cursor:"pointer"},children:[c.jsx("span",{className:"w-4 h-4 rounded border flex items-center justify-center",style:{borderColor:d.size===G.length&&G.length>0?"var(--accent)":"var(--border-default)",background:d.size===G.length&&G.length>0?"var(--accent)":"transparent"},children:d.size===G.length&&G.length>0&&c.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--color-paper)",strokeWidth:"3",children:c.jsx("polyline",{points:"20 6 9 17 4 12"})})}),"Select All"]})}),c.jsx("div",{className:"space-y-2",children:a.map(D=>{const W=D.name.split("/").pop()||D.name,F=D.latest?$1(D.installed,D.latest):"patch",de=W1[F],ce=!!D.pinned,P=C.has(D.name),re=p.get(D.name),_=d.has(D.name);return c.jsx("div",{className:"rounded-lg px-4 py-3 transition-all duration-150",style:{background:"var(--surface-1)",border:"1px solid var(--border-subtle)",opacity:ce?.7:1},children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("button",{onClick:()=>!ce&&$(D.name),disabled:ce,className:"flex-shrink-0",style:{background:"transparent",border:"none",cursor:ce?"not-allowed":"pointer"},children:c.jsx("span",{className:"w-4 h-4 rounded border flex items-center justify-center",style:{borderColor:_?"var(--accent)":"var(--border-default)",background:_?"var(--accent)":"transparent",opacity:ce?.4:1},children:_&&c.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"var(--color-paper)",strokeWidth:"3",children:c.jsx("polyline",{points:"20 6 9 17 4 12"})})})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[c.jsx("span",{className:"text-[13px] font-medium",style:{color:"var(--text-primary)"},children:W}),ce&&c.jsx("span",{className:"text-[10px]",title:"Pinned — unpin from CLI to update",children:"📌"}),c.jsx("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded-full",style:{background:de.bg,color:de.text},children:F})]}),c.jsxs("div",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[D.installed," → ",D.latest||"?",ce&&` (pinned at ${D.pinnedVersion||D.installed})`]})]}),re&&c.jsxs("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded-full",style:{background:re.status==="done"?"var(--green-muted)":re.status==="error"?"var(--red-muted)":"var(--yellow-muted)",color:re.status==="done"?"var(--green)":re.status==="error"?"var(--red)":"var(--yellow)"},children:[re.status,re.error&&`: ${re.error}`]}),c.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[c.jsx("button",{onClick:()=>L(D),className:"btn btn-ghost text-[11px]",disabled:z,children:"View Changes"}),c.jsx("button",{onClick:()=>T(D),disabled:ce||P||g,title:ce?"Pinned — unpin from CLI to update":"",className:`btn ${ce?"btn-ghost":"btn-primary"} text-[11px]`,children:P?c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"spinner spinner-sm"})," Updating"]}):(re==null?void 0:re.status)==="done"?c.jsx("span",{style:{color:"var(--green)"},children:"✓"}):"Update"})]})]})},D.name)})}),R&&c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{background:"rgba(0,0,0,0.5)"},onClick:()=>B(null),children:c.jsxs("div",{style:{width:"80%",maxWidth:900},onClick:D=>D.stopPropagation(),children:[c.jsx("div",{className:"mb-2 flex justify-end",children:c.jsx("button",{onClick:()=>B(null),className:"btn btn-ghost text-[12px]",children:"Close"})}),c.jsx(Cy,{contentDiff:R.diff.contentDiff,fromLabel:R.diff.from,toLabel:R.diff.to,diffSummary:R.diff.diffSummary,renderContext:"inline"})]})})]})}function P1(a){return a==null?"var(--text-tertiary)":a>=.7?"var(--green)":a>=.4?"var(--yellow)":"var(--red)"}function eb(a){return a==null?"var(--surface-3)":a>=.7?"var(--green-muted)":a>=.4?"var(--yellow-muted)":"var(--red-muted)"}const tb={sectionOwn:"Own",sectionInstalled:"Installed",searchPlaceholder:"Search skills",searchShortcutHint:"Press / to search",emptyOwnHeadline:"No skills yet.",emptyOwnBody:"Run vskill new <name> to create one.",emptyInstalledHeadline:"No installed skills.",emptyInstalledBody:"Run vskill install <plugin> to add one.",emptyFilteredHeadline:"No matches in this section.",emptyFilteredBody:"Clear the search or try another query.",loadErrorHeadline:"Couldn't load skills.",loadErrorRetry:"Retry",duplicateBadge:"synced from Own",updateAvailableBadge:"Update available",countBadgeFiltered:(a,i)=>`${a} of ${i}`},lb={appTitle:"Skill Studio",commandPaletteButtonLabel:"Open command palette",commandPaletteHint:"⌘K",themeToggleLight:"Switch to light theme",themeToggleDark:"Switch to dark theme",themeToggleAuto:"Switch to auto theme",projectPathLabel:"Project",modelLabel:"Model",healthLabel:"Health"},nb={tabOverview:"Overview",tabVersions:"Versions",tabBenchmark:"Benchmark",emptyHeadline:"Select a skill to see details.",emptyBody:"Pick one from the sidebar.",loadErrorHeadline:a=>`Couldn't load SKILL.md for ${a}.`,loadErrorBody:"Check the file path and your workspace permissions.",openInEditor:"Open in editor",copyPath:"Copy path",copyConfigSnippet:"Copy config snippet",depNotInstalledTooltip:"Not installed",missingValue:"—",announceViewingOwn:a=>`Viewing ${a} (Own)`,announceViewingInstalled:a=>`Viewing ${a} (Installed)`,moreFields:"More fields",sourceAgent:"Source agent",noMcpDependencies:"No MCP dependencies.",filesystemGroup:"Filesystem",benchmarkGroup:"Benchmark",metadataGroup:"Frontmatter"},ab={open:"Open",copyPath:"Copy Path",revealInEditor:"Reveal in Editor",edit:"Edit",duplicate:"Duplicate",runBenchmark:"Run Benchmark",update:"Update",uninstall:"Uninstall",retry:"Retry",editPlaceholder:"Edit lands with 0675. Open the file in your editor."},ib={inputPlaceholder:"Type a command or search",emptyResults:"No matches. Try a different query.",groupNavigation:"Navigation",groupActions:"Actions",groupTheme:"Theme",actionSelectSkill:"Select skill",actionRunBenchmark:"Run benchmark",actionSwitchTheme:"Switch theme",actionNewSkill:"New skill",closeLabel:"Close palette"},rb={title:"Keyboard shortcuts",closeLabel:"Close shortcuts",groupNavigation:"Navigation",groupActions:"Actions",groupTheme:"Theme",search:"Focus search",moveDown:"Move selection down",moveUp:"Move selection up",openSelected:"Open selected skill",openPalette:"Open command palette",openShortcuts:"Open this cheatsheet",toggleSidebar:"Toggle sidebar",toggleTheme:"Toggle theme"},sb={pathCopied:"Path copied.",configCopied:"Config copied.",skillDuplicated:"Skill duplicated.",benchmarkQueued:"Benchmark queued.",themeUpdated:"Theme updated.",skillUpdated:"Skill updated.",actionFailed:"Action failed. Retry or check logs.",networkError:"Network error. Check your connection.",permissionDenied:"Permission denied. Check file access.",unknownError:"Something went wrong. Retry or check logs."},ob={disconnected:"Disconnected — reconnecting…",reconnected:"Reconnected.",loading:"Loading skills…",loadingPlaceholderCount:"—"},ub={fieldRequired:"This field is required.",nameInvalid:"Use letters, numbers, and hyphens.",descriptionRequired:"Description is required.",saveFailed:"Save failed. Check the form for errors."},cb={boundaryHeadline:"Something broke in this view.",boundaryBody:"Reload the page to recover.",boundaryAction:"Reload"},ut={sidebar:tb,shell:lb,detail:nb,actions:ab,palette:ib,shortcuts:rb,toasts:sb,connection:ob,forms:ub,errors:cb};function Th(a,i="info"){typeof window>"u"||window.dispatchEvent(new CustomEvent("studio:toast",{detail:{message:a,severity:i}}))}function wy(a){return a.skill?fb({skill:a.skill}):mb({state:a.state,isReadOnly:a.isReadOnly,onDelete:a.onDelete})}function db(a,i=48){if(a.length<=i)return a;const o=a.slice(0,12),u=a.slice(a.length-(i-12-1));return`${o}…${u}`}function fb({skill:a}){const[i,o]=x.useState(!1),u=x.useCallback(async()=>{var p;try{await((p=navigator.clipboard)==null?void 0:p.writeText(a.dir)),o(!0),setTimeout(()=>o(!1),1500),Th(ut.toasts.pathCopied,"info")}catch{Th(ut.toasts.permissionDenied,"error")}},[a.dir]),d=a.origin==="installed"?"Installed":"Own",m=a.origin==="installed"?"var(--status-installed)":"var(--status-own)";return c.jsxs("div",{"data-testid":"detail-header",style:{background:"var(--bg-surface)",border:"1px solid var(--border-default)",borderRadius:8,padding:"14px 16px",boxShadow:"none"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--font-sans)",fontSize:12,color:"var(--text-secondary)",marginBottom:4},children:[c.jsx("span",{"data-testid":"detail-header-plugin",children:a.plugin}),c.jsx("span",{"aria-hidden":"true",style:{color:"var(--text-secondary)"},children:"›"}),c.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--text-secondary)",fontSize:11,letterSpacing:.3,textTransform:"uppercase"},children:[c.jsx("span",{"data-origin-dot":a.origin,"aria-label":`Origin: ${d}`,style:{display:"inline-block",width:7,height:7,borderRadius:999,background:m}}),d]})]}),c.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,marginBottom:8},children:[c.jsx("h2",{"data-testid":"detail-header-name",style:{fontFamily:"var(--font-serif)",fontSize:20,fontWeight:500,lineHeight:1.25,color:"var(--text-primary)",margin:0},children:a.skill}),c.jsx("span",{"data-testid":"detail-header-version",style:{fontFamily:"var(--font-sans)",fontVariantNumeric:"tabular-nums",fontSize:12,color:"var(--text-secondary)",whiteSpace:"nowrap"},children:a.version??"—"})]}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[c.jsx("button",{type:"button","data-testid":"detail-header-path-chip",title:a.dir,"aria-label":`Copy path ${a.dir} to clipboard`,onClick:u,style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",border:"1px solid var(--border-default)",borderRadius:4,background:"transparent",fontFamily:"var(--font-mono)",fontSize:11,color:"var(--text-secondary)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"pointer"},children:db(a.dir||"—")}),c.jsxs("button",{"data-testid":"detail-header-copy-path",type:"button",onClick:u,"aria-label":"Copy skill path to clipboard",style:{display:"inline-flex",alignItems:"center",gap:4,padding:"2px 8px",background:"transparent",border:"1px solid var(--border-default)",borderRadius:4,color:"var(--text-secondary)",fontFamily:"var(--font-sans)",fontSize:11,cursor:"pointer"},children:[c.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),c.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),i?"Copied":"Copy"]})]})]})}function mb({state:a,isReadOnly:i,onDelete:o}){const{plugin:u,skill:d,evals:m,latestBenchmark:p,isDirty:y,caseRunStates:g,regressions:h,iterationCount:C}=a,b=Array.from(g.values()).some(E=>E.status==="running"||E.status==="queued"),k=p==null?void 0:p.overall_pass_rate,w=(m==null?void 0:m.evals.reduce((E,A)=>E+A.assertions.length,0))??0,R=(m==null?void 0:m.evals.length)??0,B=P1(k),z=eb(k);return c.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",style:{borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)",flexShrink:0},children:[c.jsxs("div",{className:"flex items-center gap-2 text-[13px]",children:[c.jsx("span",{style:{color:"var(--text-tertiary)"},children:u}),c.jsx(pb,{}),c.jsx("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:d}),i&&c.jsxs("span",{className:"ml-2 flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wider px-1.5 py-0.5 rounded",style:{background:"var(--surface-3)",color:"var(--text-tertiary)"},children:[c.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),c.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}),"installed"]}),y&&c.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"}),b&&c.jsxs("span",{className:"ml-2 flex items-center gap-1.5 text-[11px]",style:{color:"var(--accent)"},children:[c.jsx("span",{className:"spinner",style:{width:12,height:12,borderWidth:1.5}}),"Running..."]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[!i&&o&&c.jsx("button",{disabled:b,onClick:()=>{window.confirm(`Delete skill "${d}"? This cannot be undone.`)&&o()},title:"Delete skill",className:"flex items-center justify-center transition-colors duration-150",style:{background:"none",border:"none",cursor:b?"not-allowed":"pointer",color:"var(--text-tertiary)",padding:4,opacity:b?.4:1,borderRadius:4},onMouseEnter:E=>{b||(E.currentTarget.style.color="var(--red)")},onMouseLeave:E=>{E.currentTarget.style.color="var(--text-tertiary)"},children:c.jsx(hb,{})}),h.length>0&&c.jsxs("span",{className:"pill",style:{background:"var(--red-muted)",color:"var(--red)"},children:[c.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[c.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"}),c.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),c.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),h.length," regression",h.length>1?"s":""]}),C>0&&c.jsxs("span",{className:"pill",style:{background:"var(--purple-muted)",color:"var(--purple)"},children:["Iter ",C]}),c.jsx("span",{className:"pill",style:{background:z,color:B},children:k!=null?`${Math.round(k*100)}%`:"--"}),c.jsxs("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:[R," case",R!==1?"s":""," / ",w," assert",w!==1?"s":""]})]})]})}function pb(){return c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",children:c.jsx("polyline",{points:"9 18 15 12 9 6"})})}function hb(){return c.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("polyline",{points:"3 6 5 6 21 6"}),c.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"}),c.jsx("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),c.jsx("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]})}const yb=[{id:"amp",displayName:"Amp",localSkillsDir:".amp/skills",globalSkillsDir:"~/.config/agents/skills",isUniversal:!0,detectInstalled:"which amp",parentCompany:"Sourcegraph",featureSupport:{slashCommands:!0,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"cline",displayName:"Cline",localSkillsDir:".cline/skills",globalSkillsDir:"~/.cline/skills",isUniversal:!0,detectInstalled:"which cline",parentCompany:"Cline",featureSupport:{slashCommands:!0,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"codex",displayName:"Codex CLI",localSkillsDir:".codex/skills",globalSkillsDir:"~/.codex/skills",isUniversal:!0,detectInstalled:"which codex",parentCompany:"OpenAI",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"cursor",displayName:"Cursor",localSkillsDir:".cursor/skills",globalSkillsDir:"~/.cursor/skills",isUniversal:!0,detectInstalled:"which cursor",parentCompany:"Anysphere",featureSupport:{slashCommands:!0,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"gemini-cli",displayName:"Gemini CLI",localSkillsDir:".gemini/skills",globalSkillsDir:"~/.gemini/skills",isUniversal:!0,detectInstalled:"which gemini",parentCompany:"Google",featureSupport:{slashCommands:!1,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"github-copilot",displayName:"GitHub Copilot",localSkillsDir:".github/copilot/skills",globalSkillsDir:"~/.copilot/skills",isUniversal:!0,detectInstalled:"which github-copilot",parentCompany:"GitHub (Microsoft)",featureSupport:{slashCommands:!0,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"kimi-cli",displayName:"Kimi CLI",localSkillsDir:".kimi/skills",globalSkillsDir:"~/.config/agents/skills",isUniversal:!0,detectInstalled:"which kimi",parentCompany:"Moonshot AI",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"opencode",displayName:"OpenCode",localSkillsDir:".opencode/skills",globalSkillsDir:"~/.config/opencode/skills",isUniversal:!0,detectInstalled:"which opencode",parentCompany:"Community",featureSupport:{slashCommands:!1,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"antigravity",displayName:"Antigravity",localSkillsDir:".agent/skills",globalSkillsDir:"~/.gemini/antigravity/skills",isUniversal:!1,detectInstalled:"which antigravity",parentCompany:"Google",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"augment",displayName:"Augment Code",localSkillsDir:".augment/skills",globalSkillsDir:"~/.augment/skills",isUniversal:!1,detectInstalled:"which augment",parentCompany:"Augment",featureSupport:{slashCommands:!0,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"claude-code",displayName:"Claude Code",localSkillsDir:".claude/skills",globalSkillsDir:"~/.claude/skills",isUniversal:!1,detectInstalled:"which claude",parentCompany:"Anthropic",featureSupport:{slashCommands:!0,hooks:!0,mcp:!0,customSystemPrompt:!0},pluginCacheDir:"~/.claude/plugins/cache",pluginMarketplaceDir:"~/.claude/plugins/marketplaces"},{id:"openclaw",displayName:"OpenClaw",localSkillsDir:".openclaw/skills",globalSkillsDir:"~/.openclaw/skills",isUniversal:!1,detectInstalled:"which openclaw",parentCompany:"Community",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"replit",displayName:"Replit Agent",localSkillsDir:".replit/skills",globalSkillsDir:"~/.config/agents/skills",isUniversal:!1,detectInstalled:"which replit",parentCompany:"Replit",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"codebuddy",displayName:"CodeBuddy",localSkillsDir:".codebuddy/skills",globalSkillsDir:"~/.codebuddy/skills",isUniversal:!1,detectInstalled:"which codebuddy",parentCompany:"CodeBuddy",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"command-code",displayName:"Command Code",localSkillsDir:".commandcode/skills",globalSkillsDir:"~/.commandcode/skills",isUniversal:!1,detectInstalled:"which command-code",parentCompany:"Command",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"continue",displayName:"Continue",localSkillsDir:".continue/skills",globalSkillsDir:"~/.continue/skills",isUniversal:!1,detectInstalled:"which continue",parentCompany:"Continue",featureSupport:{slashCommands:!0,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"crush",displayName:"Crush",localSkillsDir:".crush/skills",globalSkillsDir:"~/.config/crush/skills",isUniversal:!1,detectInstalled:"which crush",parentCompany:"Crush",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"droid",displayName:"Droid (Factory)",localSkillsDir:".factory/skills",globalSkillsDir:"~/.factory/skills",isUniversal:!1,detectInstalled:"which droid",parentCompany:"Factory",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"goose",displayName:"Goose",localSkillsDir:".goose/skills",globalSkillsDir:"~/.config/goose/skills",isUniversal:!1,detectInstalled:"which goose",parentCompany:"Block",featureSupport:{slashCommands:!1,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"junie",displayName:"Junie",localSkillsDir:".junie/skills",globalSkillsDir:"~/.junie/skills",isUniversal:!1,detectInstalled:"which junie",parentCompany:"JetBrains",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"iflow-cli",displayName:"iFlow CLI",localSkillsDir:".iflow/skills",globalSkillsDir:"~/.iflow/skills",isUniversal:!1,detectInstalled:"which iflow",parentCompany:"iFlow",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"kilo",displayName:"Kilo Code",localSkillsDir:".kilocode/skills",globalSkillsDir:"~/.kilocode/skills",isUniversal:!1,detectInstalled:"which kilocode",parentCompany:"Kilo Code",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"kiro-cli",displayName:"Kiro CLI",localSkillsDir:".kiro/skills",globalSkillsDir:"~/.kiro/skills",isUniversal:!1,detectInstalled:"which kiro",parentCompany:"Amazon",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"kode",displayName:"Kode",localSkillsDir:".kode/skills",globalSkillsDir:"~/.kode/skills",isUniversal:!1,detectInstalled:"which kode",parentCompany:"Kode",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"mcpjam",displayName:"MCPJam",localSkillsDir:".mcpjam/skills",globalSkillsDir:"~/.mcpjam/skills",isUniversal:!1,detectInstalled:"which mcpjam",parentCompany:"MCPJam",featureSupport:{slashCommands:!1,hooks:!1,mcp:!0,customSystemPrompt:!1}},{id:"mistral-vibe",displayName:"Mistral Vibe",localSkillsDir:".vibe/skills",globalSkillsDir:"~/.vibe/skills",isUniversal:!1,detectInstalled:"which vibe",parentCompany:"Mistral AI",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"mux",displayName:"Mux",localSkillsDir:".mux/skills",globalSkillsDir:"~/.mux/skills",isUniversal:!1,detectInstalled:"which mux",parentCompany:"Mux",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"openhands",displayName:"OpenHands",localSkillsDir:".openhands/skills",globalSkillsDir:"~/.openhands/skills",isUniversal:!1,detectInstalled:"which openhands",parentCompany:"All Hands AI",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"pi",displayName:"Pi",localSkillsDir:".pi/skills",globalSkillsDir:"~/.pi/agent/skills",isUniversal:!1,detectInstalled:"which pi",parentCompany:"Pi",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"qoder",displayName:"Qoder",localSkillsDir:".qoder/skills",globalSkillsDir:"~/.qoder/skills",isUniversal:!1,detectInstalled:"which qoder",parentCompany:"Qoder",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"qwen-code",displayName:"Qwen Code",localSkillsDir:".qwen/skills",globalSkillsDir:"~/.qwen/skills",isUniversal:!1,detectInstalled:"which qwen-code",parentCompany:"Alibaba",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"roo",displayName:"Roo Code",localSkillsDir:".roo/skills",globalSkillsDir:"~/.roo/skills",isUniversal:!1,detectInstalled:"which roo",parentCompany:"Roo",featureSupport:{slashCommands:!0,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"trae",displayName:"Trae",localSkillsDir:".trae/skills",globalSkillsDir:"~/.trae/skills",isUniversal:!1,detectInstalled:"which trae",parentCompany:"ByteDance",featureSupport:{slashCommands:!1,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"trae-cn",displayName:"Trae CN",localSkillsDir:".trae-cn/skills",globalSkillsDir:"~/.trae-cn/skills",isUniversal:!1,detectInstalled:"which trae-cn",parentCompany:"ByteDance",featureSupport:{slashCommands:!1,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"windsurf",displayName:"Windsurf",localSkillsDir:".windsurf/skills",globalSkillsDir:"~/.codeium/windsurf/skills",isUniversal:!1,detectInstalled:"which windsurf",parentCompany:"Codeium",featureSupport:{slashCommands:!0,hooks:!1,mcp:!0,customSystemPrompt:!0}},{id:"zencoder",displayName:"ZenCoder",localSkillsDir:".zencoder/skills",globalSkillsDir:"~/.zencoder/skills",isUniversal:!1,detectInstalled:"which zencoder",parentCompany:"ZenCoder",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"neovate",displayName:"Neovate",localSkillsDir:".neovate/skills",globalSkillsDir:"~/.neovate/skills",isUniversal:!1,detectInstalled:"which neovate",parentCompany:"Neovate",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"pochi",displayName:"Pochi",localSkillsDir:".pochi/skills",globalSkillsDir:"~/.pochi/skills",isUniversal:!1,detectInstalled:"which pochi",parentCompany:"Pochi",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"adal",displayName:"Adal",localSkillsDir:".adal/skills",globalSkillsDir:"~/.adal/skills",isUniversal:!1,detectInstalled:"which adal",parentCompany:"Adal",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"cortex",displayName:"Cortex",localSkillsDir:".cortex/skills",globalSkillsDir:"~/.snowflake/cortex/skills",isUniversal:!1,detectInstalled:"which cortex",parentCompany:"Cortex",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"aider",displayName:"Aider",localSkillsDir:".aider/skills",globalSkillsDir:"~/.aider/skills",isUniversal:!1,detectInstalled:"which aider",parentCompany:"Aider",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"tabnine",displayName:"Tabnine Chat",localSkillsDir:".tabnine/skills",globalSkillsDir:"~/.tabnine/skills",isUniversal:!1,detectInstalled:"which tabnine",parentCompany:"Tabnine",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"devin",displayName:"Devin",localSkillsDir:".devin/skills",globalSkillsDir:"~/.devin/skills",isUniversal:!1,detectInstalled:"which devin",parentCompany:"Cognition",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"bolt-new",displayName:"bolt.new",localSkillsDir:".bolt/skills",globalSkillsDir:"~/.bolt/skills",isUniversal:!1,detectInstalled:"which bolt",parentCompany:"StackBlitz",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"v0",displayName:"v0",localSkillsDir:".v0/skills",globalSkillsDir:"~/.v0/skills",isUniversal:!1,detectInstalled:"which v0",parentCompany:"Vercel",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"gpt-pilot",displayName:"GPT Pilot",localSkillsDir:".gpt-pilot/skills",globalSkillsDir:"~/.gpt-pilot/skills",isUniversal:!1,detectInstalled:"which gpt-pilot",parentCompany:"Pythagora",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"plandex",displayName:"Plandex",localSkillsDir:".plandex/skills",globalSkillsDir:"~/.plandex/skills",isUniversal:!1,detectInstalled:"which plandex",parentCompany:"Plandex",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"sweep",displayName:"Sweep",localSkillsDir:".sweep/skills",globalSkillsDir:"~/.sweep/skills",isUniversal:!1,detectInstalled:"which sweep",parentCompany:"Sweep AI",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}},{id:"mentat",displayName:"Mentat",localSkillsDir:".mentat/skills",globalSkillsDir:"~/.mentat/skills",isUniversal:!1,detectInstalled:"which mentat",parentCompany:"AbanteAI",featureSupport:{slashCommands:!1,hooks:!1,mcp:!1,customSystemPrompt:!0}}],ii={fontFamily:"var(--font-serif)",fontSize:15,fontWeight:500,color:"var(--text-primary)",margin:"0 0 8px",letterSpacing:.1},ri={background:"var(--bg-surface)",border:"1px solid var(--border-default)",borderRadius:8,padding:"14px 16px",boxShadow:"none"},gb={fontFamily:"var(--font-sans)",fontSize:11,color:"var(--text-secondary)",textTransform:"uppercase",letterSpacing:.4},Ay={fontFamily:"var(--font-sans)",fontSize:13,color:"var(--text-primary)"},Ny={fontFamily:"var(--font-mono)",fontSize:12,color:"var(--text-primary)",wordBreak:"break-all"},ei={fontFamily:"var(--font-sans)",fontSize:13,color:"var(--text-primary)",fontVariantNumeric:"tabular-nums"},vb={fontFamily:"var(--font-sans)",fontSize:13,color:"var(--text-secondary)"},xb={fontFamily:"var(--font-mono)",fontSize:12,color:"var(--text-primary)",overflowWrap:"anywhere",wordBreak:"break-word"},bb={Description:"Add `description:` to the SKILL.md frontmatter to display a value here.",Version:"Add `version:` to the SKILL.md frontmatter to display a value here.",Category:"Add `category:` to the SKILL.md frontmatter to display a value here.",Author:"Add `author:` to the SKILL.md frontmatter to display a value here.",License:"Add `license:` to the SKILL.md frontmatter to display a value here.",Homepage:"Add `homepage:` to the SKILL.md frontmatter to display a value here.",Tags:"Add `tags:` to the SKILL.md frontmatter to display a value here.",Directory:"Filesystem location of this skill — not configurable via SKILL.md.","Entry point":"Add `entry-point:` to the SKILL.md frontmatter to customize; defaults to SKILL.md.","Last modified":"Filesystem mtime — updates automatically on save.","Last benchmark":"Shown after the first benchmark run completes."};function Sb(a){if(a==null||!Number.isFinite(a))return"—";if(a<1024)return`${a} B`;const i=a/1024;if(i<1024)return i>=10?`${Math.round(i)} KB`:`${i.toFixed(1).replace(/\.0$/,"")} KB`;const o=i/1024;return o>=10?`${Math.round(o)} MB`:`${o.toFixed(1).replace(/\.0$/,"")} MB`}function Ry(a){if(!a)return"—";const i=new Date(a);if(Number.isNaN(i.getTime()))return a;const o=Date.now()-i.getTime(),u=Math.floor(o/1e3);if(u<60)return"just now";const d=Math.floor(u/60);if(d<60)return`${d} min ago`;const m=Math.floor(d/60);if(m<24)return`${m} hr ago`;const p=Math.floor(m/24);if(p<30)return`${p} day${p===1?"":"s"} ago`;const y=Math.floor(p/30);if(y<12)return`${y} month${y===1?"":"s"} ago`;const g=Math.floor(y/12);return`${g} year${g===1?"":"s"} ago`}function Eb(a){const i=yb.find(o=>o.id===a);return(i==null?void 0:i.displayName)??a}function ti(a){const i=a?bb[a]:void 0;return c.jsx("span",{style:vb,title:i,children:"—"})}function cl(a,i,o){return c.jsxs("div",{style:{display:"grid",gridTemplateColumns:"130px 1fr",alignItems:"baseline",gap:12,padding:"6px 0"},children:[c.jsx("span",{style:gb,children:a}),c.jsx("span",{style:{minWidth:0},children:i})]},a)}function Wa(a,i,o={}){if(i==null||i==="")return cl(a,ti(a));if(o.path)return cl(a,c.jsx("span",{"data-path-value":"true",style:xb,children:i}));const u=o.tabular?ei:o.mono?Ny:Ay;return cl(a,c.jsx("span",{style:u,children:i}))}function Tb({skill:a,allSkills:i=[],onSelectSkill:o}){return c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,padding:16},children:[Cb(a),a.origin==="installed"?jb(a):null,kb(a),Ab(a),Nb(a),zb(a,i,o)]})}function Cb(a){const i=a.homepage?c.jsxs("a",{href:a.homepage,target:"_blank",rel:"noopener noreferrer","data-external-link":"homepage",style:{...Ny,color:"var(--text-accent)",textDecoration:"none",display:"inline-flex",alignItems:"center",gap:4},onMouseEnter:u=>{u.currentTarget.style.textDecoration="underline"},onMouseLeave:u=>{u.currentTarget.style.textDecoration="none"},children:[c.jsx("span",{children:a.homepage}),c.jsx("span",{"aria-hidden":"true",style:{fontSize:11,color:"var(--text-accent)"},children:"↗"})]}):ti("Homepage"),o=a.tags&&a.tags.length>0?c.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:a.tags.map(u=>c.jsx("span",{"data-chip":"tag",style:{fontFamily:"var(--font-sans)",fontSize:11,padding:"2px 8px",border:"1px solid var(--border-default)",borderRadius:999,color:"var(--text-secondary)",background:"transparent"},children:u},u))}):ti("Tags");return c.jsxs("section",{style:ri,"aria-labelledby":"md-frontmatter",children:[c.jsx("h3",{id:"md-frontmatter",style:ii,children:"Frontmatter"}),Wa("Description",a.description??null),Wa("Version",a.version??null,{tabular:!0}),Wa("Category",a.category??null),Wa("Author",a.author??null),Wa("License",a.license??null),cl("Homepage",i),cl("Tags",o)]},"frontmatter")}function jb(a){const i=a.sourceAgent,o=i?c.jsx("span",{style:Ay,"data-agent-id":i,children:Eb(i)}):ti("Agent");return c.jsxs("section",{style:ri,"aria-labelledby":"md-source-agent",children:[c.jsx("h3",{id:"md-source-agent",style:ii,children:"Source agent"}),cl("Agent",o)]},"source-agent")}function kb(a){const i=a.lastModified?c.jsx("span",{style:ei,title:a.lastModified,children:Ry(a.lastModified)}):ti("Last modified"),o=a.entryPoint??"SKILL.md",u=a.dir?`${a.dir.replace(/\/$/,"")}/${o}`:o,d=c.jsx("button",{type:"button","data-entry-chip":"true",title:`Copy ${u}`,"aria-label":`Copy entry-point path ${u} to clipboard`,onClick:()=>wb(u),style:{display:"inline-flex",alignItems:"center",padding:"2px 8px",border:"1px solid var(--border-default)",borderRadius:4,background:"transparent",fontFamily:"var(--font-mono)",fontSize:12,color:"var(--text-primary)",cursor:"pointer",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o});return c.jsxs("section",{style:ri,"aria-labelledby":"md-fs",children:[c.jsx("h3",{id:"md-fs",style:ii,children:"Filesystem"}),Wa("Directory",a.dir||null,{path:!0}),cl("Entry point",d),cl("Size",c.jsx("span",{style:ei,children:Sb(a.sizeBytes)})),cl("Last modified",i)]},"filesystem")}function wb(a){var i;try{(i=navigator.clipboard)==null||i.writeText(a)}catch{}typeof window<"u"&&window.dispatchEvent(new CustomEvent("studio:toast",{detail:{message:`Copied ${a}`,severity:"info"}}))}function Ab(a){const i=a.benchmarkStatus==="pass"?"var(--status-installed)":a.benchmarkStatus==="fail"?"var(--red, #b54444)":"var(--status-own)",o=c.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6,fontFamily:"var(--font-sans)",fontSize:13,color:"var(--text-primary)"},children:[c.jsx("span",{"aria-hidden":"true",style:{display:"inline-block",width:7,height:7,borderRadius:999,background:i}}),a.benchmarkStatus]}),u=a.lastBenchmark?c.jsx("span",{style:ei,title:a.lastBenchmark,children:Ry(a.lastBenchmark)}):ti("Last benchmark");return c.jsxs("section",{style:ri,"aria-labelledby":"md-bench",children:[c.jsx("h3",{id:"md-bench",style:ii,children:"Benchmark"}),cl("Eval count",c.jsx("span",{style:ei,children:a.evalCount})),cl("Assertions",c.jsx("span",{style:ei,children:a.assertionCount})),cl("Status",o),cl("Last benchmark",u)]},"benchmark")}function Nb(a){const i=a.mcpDeps??[];return c.jsxs("section",{style:ri,"aria-labelledby":"md-mcp",children:[c.jsx("h3",{id:"md-mcp",style:ii,children:"MCP dependencies"}),i.length===0?c.jsx("p",{style:{fontFamily:"var(--font-sans)",fontSize:12,color:"var(--text-secondary)",margin:0},children:"No MCP dependencies"}):c.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:i.map(o=>c.jsxs("li",{"data-mcp-dep":o,style:{display:"flex",alignItems:"center",gap:8,padding:"6px 0",borderBottom:"1px solid var(--border-default)"},children:[c.jsx(Rb,{}),c.jsx("span",{style:{fontFamily:"var(--font-sans)",fontSize:13,color:"var(--text-primary)"},children:o})]},o))})]},"mcp-deps")}function Rb(){return c.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",style:{color:"var(--text-secondary)",flexShrink:0},"aria-hidden":"true",children:[c.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"}),c.jsx("polyline",{points:"3.27 6.96 12 12.01 20.73 6.96"})]})}function zb(a,i,o){const u=a.deps??[];return c.jsxs("section",{style:ri,"aria-labelledby":"md-skill-deps",children:[c.jsx("h3",{id:"md-skill-deps",style:ii,children:"Skill dependencies"}),u.length===0?c.jsx("p",{style:{fontFamily:"var(--font-sans)",fontSize:12,color:"var(--text-secondary)",margin:0},children:"No skill dependencies"}):c.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:u.map(d=>{const m=_b(d,i),p=m!=null,y={fontFamily:"var(--font-sans)",fontSize:12,padding:"3px 10px",border:"1px solid var(--border-default)",borderRadius:999,color:p?"var(--text-primary)":"var(--text-secondary)",background:"transparent",cursor:p?"pointer":"help"},g=p&&o?()=>o({plugin:m.plugin,skill:m.skill,origin:m.origin}):void 0,h=p&&o?C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),o({plugin:m.plugin,skill:m.skill,origin:m.origin}))}:void 0;return c.jsx("button",{type:"button","data-chip":"skill-dep","data-present":p?"true":"false",title:p?`Open ${d}`:"Not installed",onClick:g,onKeyDown:h,style:y,children:d},d)})})]},"skill-deps")}function _b(a,i){const[o,u]=a.includes("/")?a.split("/"):["",a];for(const d of i)if(o&&d.plugin===o&&d.skill===u||!o&&d.skill===u)return d;return null}function yc(){const{state:a,setMobileView:i}=li();return a.isMobile?c.jsxs("button",{onClick:()=>i("list"),className:"flex items-center gap-1.5 px-3 py-2 text-[12px] font-medium",style:{background:"var(--surface-1)",color:"var(--text-secondary)",border:"none",borderBottom:"1px solid var(--border-subtle)",cursor:"pointer",width:"100%"},children:[c.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("polyline",{points:"15 18 9 12 15 6"})}),"Back to skills"]}):null}function Mb(a={}){if(a.selectedSkillInfo!==void 0||a.loadError!==void 0)return Db(a);const{state:i,selectSkill:o,setMode:u,refreshSkills:d}=li(),[m,p]=x.useState(typeof window<"u"?window.location.hash:"");if(x.useEffect(()=>{const h=()=>p(window.location.hash);return window.addEventListener("hashchange",h),()=>window.removeEventListener("hashchange",h)},[]),m==="#/updates")return c.jsxs("div",{className:"h-full overflow-auto animate-fade-in",children:[c.jsx(yc,{}),c.jsx(F1,{})]});if(i.mode==="create")return c.jsxs("div",{className:"h-full overflow-auto animate-fade-in",children:[c.jsx(yc,{}),c.jsx(Z1,{onCreated:(h,C)=>{u("browse"),d(),o({plugin:h,skill:C,origin:"source"})},onCancel:()=>u("browse")})]});if(!i.selectedSkill)return i.skillsError?c.jsx(Ms,{variant:"error",message:i.skillsError,onRetry:d}):!i.skillsLoading&&i.skills.length===0?c.jsx(Ms,{variant:"no-skills"}):c.jsx(Ms,{variant:"no-selection"});const y=i.selectedSkill,g=i.skills.find(h=>h.plugin===y.plugin&&h.skill===y.skill)??null;return c.jsxs("div",{className:"flex flex-col h-full",children:[c.jsx(yc,{}),c.jsx(Ob,{skillInfo:g,allSkills:i.skills,onSelectSkill:h=>o(h)})]})}function Db(a){const i=a.selectedSkillInfo??null,o=a.activeDetailTab??"overview";if(i==null)return Ub();if(a.loadError)return Bb(i,a.loadError);const u=a.allSkills&&a.onSelectSkill?{allSkills:a.allSkills,onSelectSkill:a.onSelectSkill}:void 0;return zy(i,o,a.onDetailTabChange,u)}function Ob({skillInfo:a,allSkills:i,onSelectSkill:o}){const[u,d]=x.useState("overview"),m=x.useMemo(()=>a?zy(a,u,d,{allSkills:i,onSelectSkill:o}):c.jsx(Ms,{variant:"no-selection"}),[a,u,i,o]);return c.jsx("div",{className:"flex flex-col h-full",style:{background:"var(--bg-canvas)"},children:m})}const Lb=[{id:"overview",label:"Overview"},{id:"versions",label:"Versions"}];function Hb(a,i){return c.jsx("div",{role:"tablist","aria-label":"Detail sections",style:{display:"flex",alignItems:"stretch",gap:4,borderBottom:"1px solid var(--border-default)",padding:"0 16px",background:"var(--bg-canvas)"},children:Lb.map(o=>{const u=o.id===a;return c.jsx("button",{type:"button",role:"tab","aria-selected":u,tabIndex:u?0:-1,id:`detail-tab-${o.id}`,"aria-controls":`detail-panel-${o.id}`,onClick:()=>i==null?void 0:i(o.id),style:{background:"transparent",border:"none",borderBottom:u?"2px solid var(--text-primary)":"2px solid transparent",padding:"10px 4px",marginBottom:-1,fontFamily:"var(--font-sans)",fontSize:13,fontWeight:u?500:400,color:u?"var(--text-primary)":"var(--text-secondary)",cursor:"pointer"},children:o.label},o.id)})})}function Ub(){return c.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:32,background:"var(--bg-canvas)"},children:[c.jsx("h2",{style:{fontFamily:"var(--font-serif)",fontSize:20,fontWeight:500,color:"var(--text-primary)",margin:0,marginBottom:8},children:"Select a skill to view details"}),c.jsx("p",{style:{fontFamily:"var(--font-sans)",fontSize:13,color:"var(--text-secondary)",margin:0,maxWidth:420,textAlign:"center"},children:"Choose a skill from the sidebar — its frontmatter, filesystem info, and benchmark status will appear here."})]})}function Bb(a,i){return c.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,padding:24,background:"var(--bg-canvas)",height:"100%"},children:[wy({skill:a}),c.jsxs("section",{role:"alert",style:{background:"var(--bg-surface)",border:"1px solid var(--border-default)",borderRadius:8,padding:"14px 16px"},children:[c.jsxs("h3",{style:{fontFamily:"var(--font-serif)",fontSize:15,fontWeight:500,color:"var(--text-primary)",margin:"0 0 8px"},children:["Couldn't load SKILL.md for ",a.skill]}),c.jsx("p",{style:{fontFamily:"var(--font-sans)",fontSize:12,color:"var(--text-secondary)",margin:"0 0 12px",wordBreak:"break-word"},children:i}),c.jsxs("div",{style:{display:"flex",gap:8},children:[c.jsx("button",{type:"button",style:{fontFamily:"var(--font-sans)",fontSize:12,padding:"4px 10px",border:"1px solid var(--border-default)",borderRadius:4,background:"transparent",color:"var(--text-primary)",cursor:"pointer"},children:"Open in editor"}),c.jsx("button",{type:"button",onClick:()=>{var o;return(o=navigator.clipboard)==null?void 0:o.writeText(a.dir)},style:{fontFamily:"var(--font-sans)",fontSize:12,padding:"4px 10px",border:"1px solid var(--border-default)",borderRadius:4,background:"transparent",color:"var(--text-primary)",cursor:"pointer"},children:"Copy path"})]})]})]})}function zy(a,i,o,u){return c.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"var(--bg-canvas)"},children:[c.jsx("div",{style:{padding:16,paddingBottom:12},children:wy({skill:a})}),Hb(i,o),c.jsxs("div",{role:"tabpanel",id:`detail-panel-${i}`,"aria-labelledby":`detail-tab-${i}`,style:{flex:1,minHeight:0,overflow:"auto"},children:[i==="overview"&&Tb({skill:a,allSkills:(u==null?void 0:u.allSkills)??[],onSelectSkill:u==null?void 0:u.onSelectSkill}),i==="versions"&&u!=null&&c.jsx(_1,{plugin:a.plugin,skill:a.skill,origin:a.origin,children:c.jsx("div",{style:{padding:16},children:c.jsx(L1,{})})},`${a.plugin}/${a.skill}-versions`),i==="versions"&&u==null&&c.jsx("div",{style:{padding:16,fontFamily:"var(--font-sans)",color:"var(--text-secondary)",fontSize:13},children:"Select a skill from the sidebar to load its version history."})]})]})}function Vb(){const{updateCount:a,state:i,dismissUpdateNotification:o}=li(),u=a>0&&!i.updateNotificationDismissed;return x.useEffect(()=>{if(!u)return;const d=setTimeout(()=>o(),1e4);return()=>clearTimeout(d)},[u,o]),u?c.jsxs("div",{className:"fixed bottom-4 right-4 z-50 flex items-center gap-3 px-4 py-3 rounded-lg text-[13px] font-medium animate-fade-in",style:{background:"var(--yellow-muted)",border:"1px solid var(--yellow)",color:"var(--text-primary)"},children:[c.jsxs("span",{children:[a," update",a===1?"":"s"," available"]}),c.jsx("button",{onClick:()=>{window.location.hash="#/updates"},className:"px-2 py-0.5 rounded text-[12px] font-semibold",style:{background:"var(--yellow)",color:"var(--surface-0)",border:"none",cursor:"pointer"},children:"View Updates"}),c.jsx("button",{onClick:o,className:"text-[14px] leading-none",style:{background:"transparent",border:"none",color:"var(--text-secondary)",cursor:"pointer",padding:"0 2px"},"aria-label":"Dismiss",children:"✕"})]}):null}const Ch=x.memo(function({message:i,politeness:o="polite",role:u}){const d=u??(o==="assertive"?"alert":"status");return c.jsx("div",{"aria-live":o,"aria-atomic":"true",role:d,"data-testid":"aria-live","data-politeness":o,style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0,padding:0,margin:-1},children:i})});function Gb({toast:a,onDismiss:i}){const[o,u]=x.useState(!0),d=x.useRef(null);x.useEffect(()=>(d.current=requestAnimationFrame(()=>{d.current=requestAnimationFrame(()=>u(!1))}),()=>{d.current!=null&&cancelAnimationFrame(d.current)}),[]);const m={success:"var(--status-installed)",info:"var(--text-secondary)",error:"var(--color-accent, var(--accent-surface))"};return c.jsxs("div",{role:a.severity==="error"?"alert":"status","data-testid":"toast-item","data-severity":a.severity,style:{display:"flex",alignItems:"center",gap:12,padding:"10px 12px",minWidth:240,maxWidth:360,background:"var(--bg-canvas)",color:"var(--text-primary)",border:"1px solid var(--border-default)",borderLeft:`3px solid ${m[a.severity]}`,borderRadius:6,boxShadow:"0 8px 24px rgba(0,0,0,0.12)",fontFamily:"var(--font-sans)",fontSize:12,transform:o?"translateY(8px)":"translateY(0)",opacity:o?0:1,transition:"transform var(--duration-base, 180ms) var(--ease-standard, ease), opacity var(--duration-base, 180ms) var(--ease-standard, ease)"},children:[c.jsx("span",{style:{flex:1,minWidth:0},children:a.message}),a.action&&c.jsx("button",{type:"button",onClick:()=>{a.action.onInvoke(),i(a.id)},style:{background:"transparent",border:"1px solid var(--border-default)",borderRadius:4,padding:"3px 8px",color:"var(--text-primary)",cursor:"pointer",fontSize:11,fontFamily:"var(--font-sans)"},children:a.action.label}),c.jsx("button",{type:"button","aria-label":"Dismiss",onClick:()=>i(a.id),style:{background:"transparent",border:"none",padding:2,color:"var(--text-secondary)",cursor:"pointer",fontSize:14,lineHeight:1},children:"×"})]})}function Ib({toasts:a,onDismiss:i,liveMessage:o,liveAssertiveMessage:u}){return c.jsxs(c.Fragment,{children:[c.jsx(Ch,{politeness:"polite",message:o}),c.jsx(Ch,{politeness:"assertive",message:u}),c.jsx("div",{"data-testid":"toast-stack",style:{position:"fixed",right:16,bottom:16,display:"flex",flexDirection:"column-reverse",gap:8,zIndex:50,pointerEvents:"none"},children:a.map(d=>c.jsx("div",{style:{pointerEvents:"auto"},children:c.jsx(Gb,{toast:d,onDismiss:i})},d.id))})]})}const _y=x.createContext(null);function qb(){const a=x.useContext(_y);if(!a)throw new Error("useToast must be used inside <ToastProvider>.");return a}function Yb({children:a,maxVisible:i=4,defaultDurationMs:o=4e3}){const[u,d]=x.useState([]),[m,p]=x.useState(""),[y,g]=x.useState(""),h=x.useRef(new Map),C=x.useCallback(z=>{const E=h.current.get(z);E&&(clearTimeout(E),h.current.delete(z)),d(A=>A.filter(G=>G.id!==z))},[]),b=x.useCallback((z,E)=>{if(E<=0)return;const A=setTimeout(()=>{C(z)},E);h.current.set(z,A)},[C]),k=x.useCallback(z=>{const E=z.id??`toast-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,A={id:E,message:z.message,severity:z.severity??"info",durationMs:z.durationMs??o,action:z.action};return d(G=>[...G,A]),A.severity==="error"?g(A.message):p(A.message),b(E,A.durationMs),E},[o,b]),w=x.useCallback(()=>{for(const z of h.current.values())clearTimeout(z);h.current.clear(),d([])},[]);x.useEffect(()=>{function z(E){E.key==="Escape"&&d(A=>{if(A.length===0)return A;const G=A.slice(0,i),$=G[G.length-1],O=h.current.get($.id);return O&&(clearTimeout(O),h.current.delete($.id)),A.filter(J=>J.id!==$.id)})}return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[i]),x.useEffect(()=>()=>{for(const z of h.current.values())clearTimeout(z);h.current.clear()},[]);const R=u.slice(0,i),B=x.useMemo(()=>({toast:k,dismiss:C,clear:w}),[k,C,w]);return c.jsxs(_y.Provider,{value:B,children:[a,c.jsx(Ib,{toasts:R,onDismiss:C,liveMessage:m,liveAssertiveMessage:y})]})}const Xb=[{name:ut.shortcuts.groupNavigation,items:[{keys:"/",label:ut.shortcuts.search},{keys:"j",label:ut.shortcuts.moveDown},{keys:"k",label:ut.shortcuts.moveUp},{keys:"Enter",label:ut.shortcuts.openSelected},{keys:"Esc",label:"Close / clear"}]},{name:ut.shortcuts.groupActions,items:[{keys:"⌘K",label:ut.shortcuts.openPalette},{keys:"?",label:ut.shortcuts.openShortcuts},{keys:"⌘B",label:ut.shortcuts.toggleSidebar},{keys:"E",label:ut.actions.edit}]},{name:ut.shortcuts.groupTheme,items:[{keys:"⌘⇧D",label:ut.shortcuts.toggleTheme}]}];function Qb({open:a,onClose:i,groups:o=Xb,title:u=ut.shortcuts.title}){const d=x.useRef(null),m=x.useRef(null);return x.useEffect(()=>{var p;if(a)return d.current=document.activeElement??null,(p=m.current)==null||p.focus(),()=>{var y,g;(g=(y=d.current)==null?void 0:y.focus)==null||g.call(y),d.current=null}},[a]),x.useEffect(()=>{if(!a)return;function p(y){var g;if(y.key==="Escape"){y.preventDefault(),i();return}y.key==="Tab"&&(y.preventDefault(),(g=m.current)==null||g.focus())}return window.addEventListener("keydown",p,!0),()=>window.removeEventListener("keydown",p,!0)},[a,i]),a?c.jsx("div",{role:"presentation","data-testid":"shortcut-modal",style:{position:"fixed",inset:0,background:"color-mix(in srgb, var(--bg-canvas) 70%, transparent)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:60},onClick:p=>{p.target===p.currentTarget&&i()},children:c.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"shortcut-modal-title",style:{width:"min(480px, 92vw)",maxHeight:"80vh",overflow:"auto",background:"var(--bg-canvas)",border:"1px solid var(--border-default)",borderRadius:8,boxShadow:"0 16px 48px rgba(0,0,0,0.18)",padding:"16px 20px",fontFamily:"var(--font-sans)",color:"var(--text-primary)"},children:[c.jsxs("header",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},children:[c.jsx("h2",{id:"shortcut-modal-title",style:{margin:0,fontFamily:"var(--font-serif)",fontWeight:500,fontSize:18},children:u}),c.jsx("button",{ref:m,type:"button","aria-label":"Close",onClick:i,style:{background:"transparent",border:"1px solid var(--border-default)",borderRadius:4,padding:"2px 8px",color:"var(--text-secondary)",cursor:"pointer",fontSize:13},children:"Esc"})]}),o.map(p=>c.jsxs("section",{style:{marginBottom:12},children:[c.jsx("h3",{style:{fontSize:10,fontWeight:600,textTransform:"uppercase",letterSpacing:"0.08em",color:"var(--text-secondary)",margin:"0 0 6px"},children:p.name}),c.jsx("ul",{style:{listStyle:"none",margin:0,padding:0},children:p.items.map(y=>c.jsxs("li",{style:{display:"flex",justifyContent:"space-between",padding:"4px 0",borderTop:"1px solid var(--border-default)",fontSize:13},children:[c.jsx("span",{children:y.label}),c.jsx("kbd",{style:{fontFamily:"var(--font-mono)",fontSize:12,color:"var(--text-secondary)",border:"1px solid var(--border-default)",borderRadius:3,padding:"1px 6px"},children:y.keys})]},`${p.name}:${y.keys}`))})]},p.name))]})}):null}function Kb(a){const i=ut.actions,o=[{action:"open",label:i.open},{action:"copy-path",label:i.copyPath},{action:"reveal",label:i.revealInEditor},{action:"run-benchmark",label:i.runBenchmark}];if(a.origin==="source")return[...o,{action:"edit",label:i.edit},{action:"duplicate",label:i.duplicate}];const u=[...o];return a.updateAvailable&&u.push({action:"update",label:i.update}),u.push({action:"uninstall",label:i.uninstall}),u}function Zb({state:a,onClose:i,onAction:o,itemsOverride:u}){const d=x.useRef(null),m=x.useRef(null),[p,y]=x.useState(0),g=x.useMemo(()=>a.skill?u??Kb(a.skill):[],[a.skill,u]),h=x.useMemo(()=>{if(typeof window>"u")return{left:a.x,top:a.y};const b=8,k=220,w=44+g.length*28;let R=a.x,B=a.y;return R+k+b>window.innerWidth&&(R=Math.max(b,a.x-k)),B+w+b>window.innerHeight&&(B=Math.max(b,a.y-w)),{left:R,top:B}},[a.x,a.y,g.length]);x.useEffect(()=>{if(a.open)return m.current=document.activeElement??null,y(0),requestAnimationFrame(()=>{var b;(b=d.current)==null||b.focus()}),()=>{var b,k;(k=(b=m.current)==null?void 0:b.focus)==null||k.call(b),m.current=null}},[a.open]);const C=x.useCallback(()=>{if(!a.skill)return;const b=g[p];!b||b.disabled||(o(b.action,a.skill),i())},[g,p,a.skill,o,i]);return x.useEffect(()=>{if(!a.open)return;function b(w){if(w.key==="Escape"){w.preventDefault(),i();return}if(w.key==="ArrowDown"){w.preventDefault(),y(R=>Math.min(R+1,Math.max(g.length-1,0)));return}if(w.key==="ArrowUp"){w.preventDefault(),y(R=>Math.max(R-1,0));return}if(w.key==="Enter"||w.key===" "){w.preventDefault(),C();return}}function k(w){d.current&&w.target instanceof Node&&(d.current.contains(w.target)||i())}return window.addEventListener("keydown",b,!0),window.addEventListener("mousedown",k,!0),()=>{window.removeEventListener("keydown",b,!0),window.removeEventListener("mousedown",k,!0)}},[a.open,i,g.length,C]),!a.open||!a.skill?null:c.jsx("div",{ref:d,role:"menu",tabIndex:-1,"data-testid":"context-menu",style:{position:"fixed",left:h.left,top:h.top,zIndex:70,minWidth:200,padding:4,background:"var(--bg-canvas)",border:"1px solid var(--border-default)",borderRadius:6,boxShadow:"0 12px 32px rgba(0,0,0,0.16)",fontFamily:"var(--font-sans)",fontSize:13,color:"var(--text-primary)",outline:"none"},children:g.map((b,k)=>c.jsx("div",{role:"menuitem","aria-disabled":b.disabled||void 0,"data-action":b.action,"data-selected":k===p||void 0,onMouseEnter:()=>y(k),onClick:()=>{b.disabled||(o(b.action,a.skill),i())},style:{padding:"5px 10px",borderRadius:4,cursor:b.disabled?"default":"pointer",opacity:b.disabled?.5:1,background:k===p?"color-mix(in srgb, var(--accent-surface) 10%, transparent)":"transparent"},children:b.label},b.action))})}const jh={open:!1,x:0,y:0,skill:null};function Jb(a,i){return{open:!0,x:a.clientX,y:a.clientY,skill:i}}function na(a,i="info"){typeof window>"u"||window.dispatchEvent(new CustomEvent("studio:toast",{detail:{message:a,severity:i}}))}function $b(a,i){var o;switch(a){case"copy-path":try{(o=navigator.clipboard)==null||o.writeText(i.dir)}catch{na(ut.toasts.permissionDenied,"error");return}na(ut.toasts.pathCopied,"info");return;case"open":case"reveal":case"edit":na(ut.actions.editPlaceholder,"info");return;case"run-benchmark":na(ut.toasts.benchmarkQueued,"info");return;case"duplicate":na(ut.toasts.skillDuplicated,"info");return;case"update":na(ut.toasts.skillUpdated,"info");return;case"uninstall":na(ut.actions.editPlaceholder,"info");return;default:return}}const Wb=x.lazy(()=>Ah(()=>import("./CommandPalette-eD24lhFu.js"),__vite__mapDeps([0,1])));function Fb(){return c.jsx(d0,{children:c.jsx(o0,{children:c.jsxs(Yb,{children:[c.jsx(Pb,{}),c.jsx(Vb,{})]})})})}function Pb(){const{state:a,selectSkill:i,refreshSkills:o}=li(),{config:u}=Hs(),{mode:d,setTheme:m}=Oh(),{toast:p}=qb(),[y,g]=x.useState(()=>E1()),[h]=x.useState(!0),[C,b]=x.useState(!1),[k,w]=x.useState(!1),[R,B]=x.useState("overview"),[z,E]=x.useState(jh),A=x.useCallback((L,D)=>{E(Jb(L,D))},[]),G=x.useCallback(()=>{E(jh)},[]);x.useEffect(()=>{function L(D){if(!(D instanceof CustomEvent))return;const W=D.detail;W!=null&&W.message&&p({message:W.message,severity:W.severity??"info"})}return window.addEventListener("studio:toast",L),()=>window.removeEventListener("studio:toast",L)},[p]),x.useEffect(()=>{document.documentElement.style.setProperty("--sidebar-width",`${y}px`)},[y]);const $=x.useMemo(()=>a.selectedSkill?a.skills.find(L=>L.plugin===a.selectedSkill.plugin&&L.skill===a.selectedSkill.skill)??null:null,[a.skills,a.selectedSkill]),O=x.useCallback(L=>{i({plugin:L.plugin,skill:L.skill,origin:L.origin})},[i]),J=x.useMemo(()=>{if(!a.selectedSkill)return"";const L=a.selectedSkill.origin==="installed"?"Installed":"Own";return`Viewing ${a.selectedSkill.skill} (${L})`},[a.selectedSkill]),T=x.useMemo(()=>[{id:"switch-theme",label:ut.palette.actionSwitchTheme,description:"Cycle light / dark / auto",keywords:["theme","dark","light","mode"],onInvoke:()=>m(d==="light"?"dark":d==="dark"?"auto":"light")},{id:"show-shortcuts",label:"Show keyboard shortcuts",description:"Open the cheatsheet",keywords:["help","keys"],onInvoke:()=>w(!0)},{id:"refresh-skills",label:"Refresh skills",description:"Re-scan local + installed",keywords:["reload","scan"],onInvoke:()=>o()}],[d,m,o]);return yy([{key:"cmd+k",handler:()=>b(L=>!L)},{key:"ctrl+k",handler:()=>b(L=>!L)},{key:"?",handler:()=>w(L=>!L)},{key:"cmd+shift+d",handler:()=>m(d==="light"?"dark":"light")},{key:"ctrl+shift+d",handler:()=>m(d==="light"?"dark":"light")},{key:"e",handler:()=>p({message:ut.actions.editPlaceholder,severity:"info"})}]),c.jsxs(c.Fragment,{children:[c.jsx(f0,{sidebarWidth:y,sidebarHidden:a.isMobile&&a.mobileView==="detail",banner:c.jsx(j1,{connected:h}),liveMessage:J,topRail:c.jsx(g0,{projectName:(u==null?void 0:u.projectName)??null,selected:a.selectedSkill,onOpenPalette:()=>b(!0)}),sidebar:c.jsx(p1,{skills:a.skills,selectedKey:a.selectedSkill?{plugin:a.selectedSkill.plugin,skill:a.selectedSkill.skill}:null,onSelect:O,isLoading:a.skillsLoading,error:a.skillsError??null,onRetry:o,onContextMenu:A}),resizeHandle:c.jsx(C1,{initialWidth:y??ar,onChange:g}),main:c.jsx(Mb,{selectedSkillInfo:$,activeDetailTab:R,onDetailTabChange:B,allSkills:a.skills,onSelectSkill:O}),statusBar:c.jsx(C0,{projectPath:(u==null?void 0:u.root)??null,modelName:(u==null?void 0:u.model)??null,health:u!=null&&u.error?"degraded":"ok"})}),c.jsx(Qb,{open:k,onClose:()=>w(!1)}),c.jsx(Zb,{state:z,onClose:G,onAction:(L,D)=>$b(L,D)}),C&&c.jsx(x.Suspense,{fallback:null,children:c.jsx(Wb,{open:C,onClose:()=>b(!1),commands:T})})]})}Pv.createRoot(document.getElementById("root")).render(c.jsx(x.StrictMode,{children:c.jsx(T0,{children:c.jsx(Fb,{})})}));export{c as j,x as r,ut as s};