specweave 1.0.270 → 1.0.271

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +0,0 @@
1
- (function(){const f=document.createElement("link").relList;if(f&&f.supports&&f.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))c(m);new MutationObserver(m=>{for(const x of m)if(x.type==="childList")for(const g of x.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&c(g)}).observe(document,{childList:!0,subtree:!0});function u(m){const x={};return m.integrity&&(x.integrity=m.integrity),m.referrerPolicy&&(x.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?x.credentials="include":m.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function c(m){if(m.ep)return;m.ep=!0;const x=u(m);fetch(m.href,x)}})();var Xc={exports:{}},Xn={};var g0;function Bh(){if(g0)return Xn;g0=1;var r=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function u(c,m,x){var g=null;if(x!==void 0&&(g=""+x),m.key!==void 0&&(g=""+m.key),"key"in m){x={};for(var b in m)b!=="key"&&(x[b]=m[b])}else x=m;return m=x.ref,{$$typeof:r,type:c,key:g,ref:m!==void 0?m:null,props:x}}return Xn.Fragment=f,Xn.jsx=u,Xn.jsxs=u,Xn}var y0;function qh(){return y0||(y0=1,Xc.exports=Bh()),Xc.exports}var n=qh(),Qc={exports:{}},ie={};var p0;function Yh(){if(p0)return ie;p0=1;var r=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),g=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),T=Symbol.iterator;function A(E){return E===null||typeof E!="object"?null:(E=T&&E[T]||E["@@iterator"],typeof E=="function"?E:null)}var X={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,_={};function D(E,Y,$){this.props=E,this.context=Y,this.refs=_,this.updater=$||X}D.prototype.isReactComponent={},D.prototype.setState=function(E,Y){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,Y,"setState")},D.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function O(){}O.prototype=D.prototype;function Q(E,Y,$){this.props=E,this.context=Y,this.refs=_,this.updater=$||X}var re=Q.prototype=new O;re.constructor=Q,G(re,D.prototype),re.isPureReactComponent=!0;var ne=Array.isArray;function P(){}var Z={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function B(E,Y,$){var J=$.ref;return{$$typeof:r,type:E,key:Y,ref:J!==void 0?J:null,props:$}}function I(E,Y){return B(E.type,Y,E.props)}function te(E){return typeof E=="object"&&E!==null&&E.$$typeof===r}function De(E){var Y={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function($){return Y[$]})}var dt=/\/+/g;function Ze(E,Y){return typeof E=="object"&&E!==null&&E.key!=null?De(""+E.key):Y.toString(36)}function Je(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then(P,P):(E.status="pending",E.then(function(Y){E.status==="pending"&&(E.status="fulfilled",E.value=Y)},function(Y){E.status==="pending"&&(E.status="rejected",E.reason=Y)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function U(E,Y,$,J,se){var fe=typeof E;(fe==="undefined"||fe==="boolean")&&(E=null);var W=!1;if(E===null)W=!0;else switch(fe){case"bigint":case"string":case"number":W=!0;break;case"object":switch(E.$$typeof){case r:case f:W=!0;break;case v:return W=E._init,U(W(E._payload),Y,$,J,se)}}if(W)return se=se(E),W=J===""?"."+Ze(E,0):J,ne(se)?($="",W!=null&&($=W.replace(dt,"$&/")+"/"),U(se,Y,$,"",function(Kl){return Kl})):se!=null&&(te(se)&&(se=I(se,$+(se.key==null||E&&E.key===se.key?"":(""+se.key).replace(dt,"$&/")+"/")+W)),Y.push(se)),1;W=0;var Ve=J===""?".":J+":";if(ne(E))for(var He=0;He<E.length;He++)J=E[He],fe=Ve+Ze(J,He),W+=U(J,Y,$,fe,se);else if(He=A(E),typeof He=="function")for(E=He.call(E),He=0;!(J=E.next()).done;)J=J.value,fe=Ve+Ze(J,He++),W+=U(J,Y,$,fe,se);else if(fe==="object"){if(typeof E.then=="function")return U(Je(E),Y,$,J,se);throw Y=String(E),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return W}function V(E,Y,$){if(E==null)return E;var J=[],se=0;return U(E,J,"","",function(fe){return Y.call($,fe,se++)}),J}function le(E){if(E._status===-1){var Y=E._result;Y=Y(),Y.then(function($){(E._status===0||E._status===-1)&&(E._status=1,E._result=$)},function($){(E._status===0||E._status===-1)&&(E._status=2,E._result=$)}),E._status===-1&&(E._status=0,E._result=Y)}if(E._status===1)return E._result.default;throw E._result}var je=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=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(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},Ne={map:V,forEach:function(E,Y,$){V(E,function(){Y.apply(this,arguments)},$)},count:function(E){var Y=0;return V(E,function(){Y++}),Y},toArray:function(E){return V(E,function(Y){return Y})||[]},only:function(E){if(!te(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return ie.Activity=p,ie.Children=Ne,ie.Component=D,ie.Fragment=u,ie.Profiler=m,ie.PureComponent=Q,ie.StrictMode=c,ie.Suspense=y,ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,ie.__COMPILER_RUNTIME={__proto__:null,c:function(E){return Z.H.useMemoCache(E)}},ie.cache=function(E){return function(){return E.apply(null,arguments)}},ie.cacheSignal=function(){return null},ie.cloneElement=function(E,Y,$){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var J=G({},E.props),se=E.key;if(Y!=null)for(fe in Y.key!==void 0&&(se=""+Y.key),Y)!k.call(Y,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Y.ref===void 0||(J[fe]=Y[fe]);var fe=arguments.length-2;if(fe===1)J.children=$;else if(1<fe){for(var W=Array(fe),Ve=0;Ve<fe;Ve++)W[Ve]=arguments[Ve+2];J.children=W}return B(E.type,se,J)},ie.createContext=function(E){return E={$$typeof:g,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:x,_context:E},E},ie.createElement=function(E,Y,$){var J,se={},fe=null;if(Y!=null)for(J in Y.key!==void 0&&(fe=""+Y.key),Y)k.call(Y,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(se[J]=Y[J]);var W=arguments.length-2;if(W===1)se.children=$;else if(1<W){for(var Ve=Array(W),He=0;He<W;He++)Ve[He]=arguments[He+2];se.children=Ve}if(E&&E.defaultProps)for(J in W=E.defaultProps,W)se[J]===void 0&&(se[J]=W[J]);return B(E,fe,se)},ie.createRef=function(){return{current:null}},ie.forwardRef=function(E){return{$$typeof:b,render:E}},ie.isValidElement=te,ie.lazy=function(E){return{$$typeof:v,_payload:{_status:-1,_result:E},_init:le}},ie.memo=function(E,Y){return{$$typeof:d,type:E,compare:Y===void 0?null:Y}},ie.startTransition=function(E){var Y=Z.T,$={};Z.T=$;try{var J=E(),se=Z.S;se!==null&&se($,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(P,je)}catch(fe){je(fe)}finally{Y!==null&&$.types!==null&&(Y.types=$.types),Z.T=Y}},ie.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},ie.use=function(E){return Z.H.use(E)},ie.useActionState=function(E,Y,$){return Z.H.useActionState(E,Y,$)},ie.useCallback=function(E,Y){return Z.H.useCallback(E,Y)},ie.useContext=function(E){return Z.H.useContext(E)},ie.useDebugValue=function(){},ie.useDeferredValue=function(E,Y){return Z.H.useDeferredValue(E,Y)},ie.useEffect=function(E,Y){return Z.H.useEffect(E,Y)},ie.useEffectEvent=function(E){return Z.H.useEffectEvent(E)},ie.useId=function(){return Z.H.useId()},ie.useImperativeHandle=function(E,Y,$){return Z.H.useImperativeHandle(E,Y,$)},ie.useInsertionEffect=function(E,Y){return Z.H.useInsertionEffect(E,Y)},ie.useLayoutEffect=function(E,Y){return Z.H.useLayoutEffect(E,Y)},ie.useMemo=function(E,Y){return Z.H.useMemo(E,Y)},ie.useOptimistic=function(E,Y){return Z.H.useOptimistic(E,Y)},ie.useReducer=function(E,Y,$){return Z.H.useReducer(E,Y,$)},ie.useRef=function(E){return Z.H.useRef(E)},ie.useState=function(E){return Z.H.useState(E)},ie.useSyncExternalStore=function(E,Y,$){return Z.H.useSyncExternalStore(E,Y,$)},ie.useTransition=function(){return Z.H.useTransition()},ie.version="19.2.4",ie}var v0;function au(){return v0||(v0=1,Qc.exports=Yh()),Qc.exports}var N=au(),Vc={exports:{}},Qn={},$c={exports:{}},Zc={};var b0;function Gh(){return b0||(b0=1,(function(r){function f(U,V){var le=U.length;U.push(V);e:for(;0<le;){var je=le-1>>>1,Ne=U[je];if(0<m(Ne,V))U[je]=V,U[le]=Ne,le=je;else break e}}function u(U){return U.length===0?null:U[0]}function c(U){if(U.length===0)return null;var V=U[0],le=U.pop();if(le!==V){U[0]=le;e:for(var je=0,Ne=U.length,E=Ne>>>1;je<E;){var Y=2*(je+1)-1,$=U[Y],J=Y+1,se=U[J];if(0>m($,le))J<Ne&&0>m(se,$)?(U[je]=se,U[J]=le,je=J):(U[je]=$,U[Y]=le,je=Y);else if(J<Ne&&0>m(se,le))U[je]=se,U[J]=le,je=J;else break e}}return V}function m(U,V){var le=U.sortIndex-V.sortIndex;return le!==0?le:U.id-V.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;r.unstable_now=function(){return x.now()}}else{var g=Date,b=g.now();r.unstable_now=function(){return g.now()-b}}var y=[],d=[],v=1,p=null,T=3,A=!1,X=!1,G=!1,_=!1,D=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function re(U){for(var V=u(d);V!==null;){if(V.callback===null)c(d);else if(V.startTime<=U)c(d),V.sortIndex=V.expirationTime,f(y,V);else break;V=u(d)}}function ne(U){if(G=!1,re(U),!X)if(u(y)!==null)X=!0,P||(P=!0,De());else{var V=u(d);V!==null&&Je(ne,V.startTime-U)}}var P=!1,Z=-1,k=5,B=-1;function I(){return _?!0:!(r.unstable_now()-B<k)}function te(){if(_=!1,P){var U=r.unstable_now();B=U;var V=!0;try{e:{X=!1,G&&(G=!1,O(Z),Z=-1),A=!0;var le=T;try{t:{for(re(U),p=u(y);p!==null&&!(p.expirationTime>U&&I());){var je=p.callback;if(typeof je=="function"){p.callback=null,T=p.priorityLevel;var Ne=je(p.expirationTime<=U);if(U=r.unstable_now(),typeof Ne=="function"){p.callback=Ne,re(U),V=!0;break t}p===u(y)&&c(y),re(U)}else c(y);p=u(y)}if(p!==null)V=!0;else{var E=u(d);E!==null&&Je(ne,E.startTime-U),V=!1}}break e}finally{p=null,T=le,A=!1}V=void 0}}finally{V?De():P=!1}}}var De;if(typeof Q=="function")De=function(){Q(te)};else if(typeof MessageChannel<"u"){var dt=new MessageChannel,Ze=dt.port2;dt.port1.onmessage=te,De=function(){Ze.postMessage(null)}}else De=function(){D(te,0)};function Je(U,V){Z=D(function(){U(r.unstable_now())},V)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(U){U.callback=null},r.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<U?Math.floor(1e3/U):5},r.unstable_getCurrentPriorityLevel=function(){return T},r.unstable_next=function(U){switch(T){case 1:case 2:case 3:var V=3;break;default:V=T}var le=T;T=V;try{return U()}finally{T=le}},r.unstable_requestPaint=function(){_=!0},r.unstable_runWithPriority=function(U,V){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var le=T;T=U;try{return V()}finally{T=le}},r.unstable_scheduleCallback=function(U,V,le){var je=r.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?je+le:je):le=je,U){case 1:var Ne=-1;break;case 2:Ne=250;break;case 5:Ne=1073741823;break;case 4:Ne=1e4;break;default:Ne=5e3}return Ne=le+Ne,U={id:v++,callback:V,priorityLevel:U,startTime:le,expirationTime:Ne,sortIndex:-1},le>je?(U.sortIndex=le,f(d,U),u(y)===null&&U===u(d)&&(G?(O(Z),Z=-1):G=!0,Je(ne,le-je))):(U.sortIndex=Ne,f(y,U),X||A||(X=!0,P||(P=!0,De()))),U},r.unstable_shouldYield=I,r.unstable_wrapCallback=function(U){var V=T;return function(){var le=T;T=V;try{return U.apply(this,arguments)}finally{T=le}}}})(Zc)),Zc}var j0;function Xh(){return j0||(j0=1,$c.exports=Gh()),$c.exports}var kc={exports:{}},tt={};var N0;function Qh(){if(N0)return tt;N0=1;var r=au();function f(y){var d="https://react.dev/errors/"+y;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)d+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+y+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var c={d:{f:u,r:function(){throw Error(f(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},m=Symbol.for("react.portal");function x(y,d,v){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:p==null?null:""+p,children:y,containerInfo:d,implementation:v}}var g=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(y,d){if(y==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,tt.createPortal=function(y,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(f(299));return x(y,d,null,v)},tt.flushSync=function(y){var d=g.T,v=c.p;try{if(g.T=null,c.p=2,y)return y()}finally{g.T=d,c.p=v,c.d.f()}},tt.preconnect=function(y,d){typeof y=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,c.d.C(y,d))},tt.prefetchDNS=function(y){typeof y=="string"&&c.d.D(y)},tt.preinit=function(y,d){if(typeof y=="string"&&d&&typeof d.as=="string"){var v=d.as,p=b(v,d.crossOrigin),T=typeof d.integrity=="string"?d.integrity:void 0,A=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;v==="style"?c.d.S(y,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:T,fetchPriority:A}):v==="script"&&c.d.X(y,{crossOrigin:p,integrity:T,fetchPriority:A,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},tt.preinitModule=function(y,d){if(typeof y=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var v=b(d.as,d.crossOrigin);c.d.M(y,{crossOrigin:v,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&c.d.M(y)},tt.preload=function(y,d){if(typeof y=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var v=d.as,p=b(v,d.crossOrigin);c.d.L(y,v,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},tt.preloadModule=function(y,d){if(typeof y=="string")if(d){var v=b(d.as,d.crossOrigin);c.d.m(y,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:v,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else c.d.m(y)},tt.requestFormReset=function(y){c.d.r(y)},tt.unstable_batchedUpdates=function(y,d){return y(d)},tt.useFormState=function(y,d,v){return g.H.useFormState(y,d,v)},tt.useFormStatus=function(){return g.H.useHostTransitionStatus()},tt.version="19.2.4",tt}var S0;function Vh(){if(S0)return kc.exports;S0=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(f){console.error(f)}}return r(),kc.exports=Qh(),kc.exports}var E0;function $h(){if(E0)return Qn;E0=1;var r=Xh(),f=au(),u=Vh();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function x(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function g(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(x(e)!==e)throw Error(c(188))}function d(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(c(188));return t!==e?null:e}for(var a=e,l=t;;){var s=a.return;if(s===null)break;var i=s.alternate;if(i===null){if(l=s.return,l!==null){a=l;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===a)return y(s),e;if(i===l)return y(s),t;i=i.sibling}throw Error(c(188))}if(a.return!==l.return)a=s,l=i;else{for(var o=!1,h=s.child;h;){if(h===a){o=!0,a=s,l=i;break}if(h===l){o=!0,l=s,a=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===a){o=!0,a=i,l=s;break}if(h===l){o=!0,l=i,a=s;break}h=h.sibling}if(!o)throw Error(c(189))}}if(a.alternate!==l)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,T=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),re=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function De(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var dt=Symbol.for("react.client.reference");function Ze(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===dt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case D:return"Profiler";case _:return"StrictMode";case ne:return"Suspense";case P:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case X:return"Portal";case Q:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case re:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:Ze(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return Ze(e(t))}catch{}}return null}var Je=Array.isArray,U=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},je=[],Ne=-1;function E(e){return{current:e}}function Y(e){0>Ne||(e.current=je[Ne],je[Ne]=null,Ne--)}function $(e,t){Ne++,je[Ne]=e.current,e.current=t}var J=E(null),se=E(null),fe=E(null),W=E(null);function Ve(e,t){switch($(fe,t),$(se,e),$(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qd(t),e=Yd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(J),$(J,e)}function He(){Y(J),Y(se),Y(fe)}function Kl(e){e.memoizedState!==null&&$(W,e);var t=J.current,a=Yd(t,e.type);t!==a&&($(se,e),$(J,a))}function Fn(e){se.current===e&&(Y(J),Y(se)),W.current===e&&(Y(W),Bn._currentValue=le)}var Ei,mu;function qa(e){if(Ei===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ei=t&&t[1]||"",mu=-1<a.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Ei+e+mu}var Ci=!1;function Ti(e,t){if(!e||Ci)return"";Ci=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(w){var R=w}Reflect.construct(e,[],q)}else{try{q.call()}catch(w){R=w}e.call(q.prototype)}}else{try{throw Error()}catch(w){R=w}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(w){if(w&&R&&typeof w.stack=="string")return[w.stack,R.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var j=o.split(`
4
- `),z=h.split(`
5
- `);for(s=l=0;l<j.length&&!j[l].includes("DetermineComponentFrameRoot");)l++;for(;s<z.length&&!z[s].includes("DetermineComponentFrameRoot");)s++;if(l===j.length||s===z.length)for(l=j.length-1,s=z.length-1;1<=l&&0<=s&&j[l]!==z[s];)s--;for(;1<=l&&0<=s;l--,s--)if(j[l]!==z[s]){if(l!==1||s!==1)do if(l--,s--,0>s||j[l]!==z[s]){var L=`
6
- `+j[l].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=l&&0<=s);break}}}finally{Ci=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?qa(a):""}function hm(e,t){switch(e.tag){case 26:case 27:case 5:return qa(e.type);case 16:return qa("Lazy");case 13:return e.child!==t&&t!==null?qa("Suspense Fallback"):qa("Suspense");case 19:return qa("SuspenseList");case 0:case 15:return Ti(e.type,!1);case 11:return Ti(e.type.render,!1);case 1:return Ti(e.type,!0);case 31:return qa("Activity");default:return""}}function xu(e){try{var t="",a=null;do t+=hm(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
7
- Error generating stack: `+l.message+`
8
- `+l.stack}}var Ai=Object.prototype.hasOwnProperty,Mi=r.unstable_scheduleCallback,zi=r.unstable_cancelCallback,gm=r.unstable_shouldYield,ym=r.unstable_requestPaint,mt=r.unstable_now,pm=r.unstable_getCurrentPriorityLevel,hu=r.unstable_ImmediatePriority,gu=r.unstable_UserBlockingPriority,Pn=r.unstable_NormalPriority,vm=r.unstable_LowPriority,yu=r.unstable_IdlePriority,bm=r.log,jm=r.unstable_setDisableYieldValue,Jl=null,xt=null;function fa(e){if(typeof bm=="function"&&jm(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(Jl,e)}catch{}}var ht=Math.clz32?Math.clz32:Em,Nm=Math.log,Sm=Math.LN2;function Em(e){return e>>>=0,e===0?32:31-(Nm(e)/Sm|0)|0}var In=256,es=262144,ts=4194304;function Ya(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 as(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var s=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~i,l!==0?s=Ya(l):(o&=h,o!==0?s=Ya(o):a||(a=h&~e,a!==0&&(s=Ya(a))))):(h=l&~i,h!==0?s=Ya(h):o!==0?s=Ya(o):a||(a=l&~e,a!==0&&(s=Ya(a)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:s}function Wl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Cm(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 pu(){var e=ts;return ts<<=1,(ts&62914560)===0&&(ts=4194304),e}function Ri(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Fl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Tm(e,t,a,l,s,i){var o=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var h=e.entanglements,j=e.expirationTimes,z=e.hiddenUpdates;for(a=o&~a;0<a;){var L=31-ht(a),q=1<<L;h[L]=0,j[L]=-1;var R=z[L];if(R!==null)for(z[L]=null,L=0;L<R.length;L++){var w=R[L];w!==null&&(w.lane&=-536870913)}a&=~q}l!==0&&vu(e,l,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function vu(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ht(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function bu(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-ht(a),s=1<<l;s&t|e[l]&t&&(e[l]|=t),a&=~s}}function ju(e,t){var a=t&-t;return a=(a&42)!==0?1:_i(a),(a&(e.suspendedLanes|t))!==0?0:a}function _i(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 wi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Nu(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:u0(e.type))}function Su(e,t){var a=V.p;try{return V.p=e,t()}finally{V.p=a}}var da=Math.random().toString(36).slice(2),We="__reactFiber$"+da,nt="__reactProps$"+da,nl="__reactContainer$"+da,Di="__reactEvents$"+da,Am="__reactListeners$"+da,Mm="__reactHandles$"+da,Eu="__reactResources$"+da,Pl="__reactMarker$"+da;function Oi(e){delete e[We],delete e[nt],delete e[Di],delete e[Am],delete e[Mm]}function sl(e){var t=e[We];if(t)return t;for(var a=e.parentNode;a;){if(t=a[nl]||a[We]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=kd(e);e!==null;){if(a=e[We])return a;e=kd(e)}return t}e=a,a=e.parentNode}return null}function il(e){if(e=e[We]||e[nl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Il(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function rl(e){var t=e[Eu];return t||(t=e[Eu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ke(e){e[Pl]=!0}var Cu=new Set,Tu={};function Ga(e,t){cl(e,t),cl(e+"Capture",t)}function cl(e,t){for(Tu[e]=t,e=0;e<t.length;e++)Cu.add(t[e])}var zm=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]*$"),Au={},Mu={};function Rm(e){return Ai.call(Mu,e)?!0:Ai.call(Au,e)?!1:zm.test(e)?Mu[e]=!0:(Au[e]=!0,!1)}function ls(e,t,a){if(Rm(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ns(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function $t(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _m(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var s=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){a=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ui(e){if(!e._valueTracker){var t=zu(e)?"checked":"value";e._valueTracker=_m(e,t,""+e[t])}}function Ru(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=zu(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ss(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 wm=/[\n"\\]/g;function Tt(e){return e.replace(wm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Li(e,t,a,l,s,i,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ct(t)):e.value!==""+Ct(t)&&(e.value=""+Ct(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?Hi(e,o,Ct(t)):a!=null?Hi(e,o,Ct(a)):l!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+Ct(h):e.removeAttribute("name")}function _u(e,t,a,l,s,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Ui(e);return}a=a!=null?""+Ct(a):"",t=t!=null?""+Ct(t):a,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??s,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),Ui(e)}function Hi(e,t,a){t==="number"&&ss(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ul(e,t,a,l){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Ct(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,l&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function wu(e,t,a){if(t!=null&&(t=""+Ct(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ct(a):""}function Du(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(c(92));if(Je(l)){if(1<l.length)throw Error(c(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Ct(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Ui(e)}function ol(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Dm=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 Ou(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Dm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Uu(e,t,a){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var s in t)l=t[s],t.hasOwnProperty(s)&&a[s]!==l&&Ou(e,s,l)}else for(var i in t)t.hasOwnProperty(i)&&Ou(e,i,t[i])}function Bi(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 Om=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"]]),Um=/^[\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 is(e){return Um.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var qi=null;function Yi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var fl=null,dl=null;function Lu(e){var t=il(e);if(t&&(e=t.stateNode)){var a=e[nt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Li(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Tt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var s=l[nt]||null;if(!s)throw Error(c(90));Li(l,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Ru(l)}break e;case"textarea":wu(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ul(e,!!a.multiple,t,!1)}}}var Gi=!1;function Hu(e,t,a){if(Gi)return e(t,a);Gi=!0;try{var l=e(t);return l}finally{if(Gi=!1,(fl!==null||dl!==null)&&(ks(),fl&&(t=fl,e=dl,dl=fl=null,Lu(t),e)))for(t=0;t<e.length;t++)Lu(e[t])}}function en(e,t){var a=e.stateNode;if(a===null)return null;var l=a[nt]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(c(231,t,typeof a));return a}var kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xi=!1;if(kt)try{var tn={};Object.defineProperty(tn,"passive",{get:function(){Xi=!0}}),window.addEventListener("test",tn,tn),window.removeEventListener("test",tn,tn)}catch{Xi=!1}var ma=null,Qi=null,rs=null;function Bu(){if(rs)return rs;var e,t=Qi,a=t.length,l,s="value"in ma?ma.value:ma.textContent,i=s.length;for(e=0;e<a&&t[e]===s[e];e++);var o=a-e;for(l=1;l<=o&&t[a-l]===s[i-l];l++);return rs=s.slice(e,1<l?1-l:void 0)}function cs(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 us(){return!0}function qu(){return!1}function st(e){function t(a,l,s,i,o){this._reactName=a,this._targetInst=s,this.type=l,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(a=e[h],this[h]=a?a(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?us:qu,this.isPropagationStopped=qu,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=us)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=us)},persist:function(){},isPersistent:us}),t}var Xa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},os=st(Xa),an=p({},Xa,{view:0,detail:0}),Lm=st(an),Vi,$i,ln,fs=p({},an,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ki,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!==ln&&(ln&&e.type==="mousemove"?(Vi=e.screenX-ln.screenX,$i=e.screenY-ln.screenY):$i=Vi=0,ln=e),Vi)},movementY:function(e){return"movementY"in e?e.movementY:$i}}),Yu=st(fs),Hm=p({},fs,{dataTransfer:0}),Bm=st(Hm),qm=p({},an,{relatedTarget:0}),Zi=st(qm),Ym=p({},Xa,{animationName:0,elapsedTime:0,pseudoElement:0}),Gm=st(Ym),Xm=p({},Xa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qm=st(Xm),Vm=p({},Xa,{data:0}),Gu=st(Vm),$m={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zm={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"},km={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Km(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=km[e])?!!t[e]:!1}function ki(){return Km}var Jm=p({},an,{key:function(e){if(e.key){var t=$m[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ki,charCode:function(e){return e.type==="keypress"?cs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Wm=st(Jm),Fm=p({},fs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xu=st(Fm),Pm=p({},an,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ki}),Im=st(Pm),ex=p({},Xa,{propertyName:0,elapsedTime:0,pseudoElement:0}),tx=st(ex),ax=p({},fs,{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}),lx=st(ax),nx=p({},Xa,{newState:0,oldState:0}),sx=st(nx),ix=[9,13,27,32],Ki=kt&&"CompositionEvent"in window,nn=null;kt&&"documentMode"in document&&(nn=document.documentMode);var rx=kt&&"TextEvent"in window&&!nn,Qu=kt&&(!Ki||nn&&8<nn&&11>=nn),Vu=" ",$u=!1;function Zu(e,t){switch(e){case"keyup":return ix.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ku(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ml=!1;function cx(e,t){switch(e){case"compositionend":return ku(t);case"keypress":return t.which!==32?null:($u=!0,Vu);case"textInput":return e=t.data,e===Vu&&$u?null:e;default:return null}}function ux(e,t){if(ml)return e==="compositionend"||!Ki&&Zu(e,t)?(e=Bu(),rs=Qi=ma=null,ml=!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 Qu&&t.locale!=="ko"?null:t.data;default:return null}}var ox={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 Ku(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ox[e.type]:t==="textarea"}function Ju(e,t,a,l){fl?dl?dl.push(l):dl=[l]:fl=l,t=ei(t,"onChange"),0<t.length&&(a=new os("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var sn=null,rn=null;function fx(e){Dd(e,0)}function ds(e){var t=Il(e);if(Ru(t))return e}function Wu(e,t){if(e==="change")return t}var Fu=!1;if(kt){var Ji;if(kt){var Wi="oninput"in document;if(!Wi){var Pu=document.createElement("div");Pu.setAttribute("oninput","return;"),Wi=typeof Pu.oninput=="function"}Ji=Wi}else Ji=!1;Fu=Ji&&(!document.documentMode||9<document.documentMode)}function Iu(){sn&&(sn.detachEvent("onpropertychange",eo),rn=sn=null)}function eo(e){if(e.propertyName==="value"&&ds(rn)){var t=[];Ju(t,rn,e,Yi(e)),Hu(fx,t)}}function dx(e,t,a){e==="focusin"?(Iu(),sn=t,rn=a,sn.attachEvent("onpropertychange",eo)):e==="focusout"&&Iu()}function mx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ds(rn)}function xx(e,t){if(e==="click")return ds(t)}function hx(e,t){if(e==="input"||e==="change")return ds(t)}function gx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:gx;function cn(e,t){if(gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var s=a[l];if(!Ai.call(t,s)||!gt(e[s],t[s]))return!1}return!0}function to(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ao(e,t){var a=to(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=to(a)}}function lo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function no(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ss(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ss(e.document)}return t}function Fi(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 yx=kt&&"documentMode"in document&&11>=document.documentMode,xl=null,Pi=null,un=null,Ii=!1;function so(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ii||xl==null||xl!==ss(l)||(l=xl,"selectionStart"in l&&Fi(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),un&&cn(un,l)||(un=l,l=ei(Pi,"onSelect"),0<l.length&&(t=new os("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=xl)))}function Qa(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var hl={animationend:Qa("Animation","AnimationEnd"),animationiteration:Qa("Animation","AnimationIteration"),animationstart:Qa("Animation","AnimationStart"),transitionrun:Qa("Transition","TransitionRun"),transitionstart:Qa("Transition","TransitionStart"),transitioncancel:Qa("Transition","TransitionCancel"),transitionend:Qa("Transition","TransitionEnd")},er={},io={};kt&&(io=document.createElement("div").style,"AnimationEvent"in window||(delete hl.animationend.animation,delete hl.animationiteration.animation,delete hl.animationstart.animation),"TransitionEvent"in window||delete hl.transitionend.transition);function Va(e){if(er[e])return er[e];if(!hl[e])return e;var t=hl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in io)return er[e]=t[a];return e}var ro=Va("animationend"),co=Va("animationiteration"),uo=Va("animationstart"),px=Va("transitionrun"),vx=Va("transitionstart"),bx=Va("transitioncancel"),oo=Va("transitionend"),fo=new Map,tr="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(" ");tr.push("scrollEnd");function Lt(e,t){fo.set(e,t),Ga(t,[e])}var ms=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)},At=[],gl=0,ar=0;function xs(){for(var e=gl,t=ar=gl=0;t<e;){var a=At[t];At[t++]=null;var l=At[t];At[t++]=null;var s=At[t];At[t++]=null;var i=At[t];if(At[t++]=null,l!==null&&s!==null){var o=l.pending;o===null?s.next=s:(s.next=o.next,o.next=s),l.pending=s}i!==0&&mo(a,s,i)}}function hs(e,t,a,l){At[gl++]=e,At[gl++]=t,At[gl++]=a,At[gl++]=l,ar|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function lr(e,t,a,l){return hs(e,t,a,l),gs(e)}function $a(e,t){return hs(e,null,null,t),gs(e)}function mo(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var s=!1,i=e.return;i!==null;)i.childLanes|=a,l=i.alternate,l!==null&&(l.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-ht(a),e=i.hiddenUpdates,l=e[s],l===null?e[s]=[t]:l.push(t),t.lane=a|536870912),i):null}function gs(e){if(50<_n)throw _n=0,dc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yl={};function jx(e,t,a,l){this.tag=e,this.key=a,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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,a,l){return new jx(e,t,a,l)}function nr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(e,t){var a=e.alternate;return a===null?(a=yt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function xo(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ys(e,t,a,l,s,i){var o=0;if(l=e,typeof e=="function")nr(e)&&(o=1);else if(typeof e=="string")o=Th(e,a,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=yt(31,a,t,s),e.elementType=B,e.lanes=i,e;case G:return Za(a.children,s,i,t);case _:o=8,s|=24;break;case D:return e=yt(12,a,t,s|2),e.elementType=D,e.lanes=i,e;case ne:return e=yt(13,a,t,s),e.elementType=ne,e.lanes=i,e;case P:return e=yt(19,a,t,s),e.elementType=P,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:o=10;break e;case O:o=9;break e;case re:o=11;break e;case Z:o=14;break e;case k:o=16,l=null;break e}o=29,a=Error(c(130,e===null?"null":typeof e,"")),l=null}return t=yt(o,a,t,s),t.elementType=e,t.type=l,t.lanes=i,t}function Za(e,t,a,l){return e=yt(7,e,l,t),e.lanes=a,e}function sr(e,t,a){return e=yt(6,e,null,t),e.lanes=a,e}function ho(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function ir(e,t,a){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var go=new WeakMap;function Mt(e,t){if(typeof e=="object"&&e!==null){var a=go.get(e);return a!==void 0?a:(t={value:e,source:t,stack:xu(t)},go.set(e,t),t)}return{value:e,source:t,stack:xu(t)}}var pl=[],vl=0,ps=null,on=0,zt=[],Rt=0,xa=null,Yt=1,Gt="";function Jt(e,t){pl[vl++]=on,pl[vl++]=ps,ps=e,on=t}function yo(e,t,a){zt[Rt++]=Yt,zt[Rt++]=Gt,zt[Rt++]=xa,xa=e;var l=Yt;e=Gt;var s=32-ht(l)-1;l&=~(1<<s),a+=1;var i=32-ht(t)+s;if(30<i){var o=s-s%5;i=(l&(1<<o)-1).toString(32),l>>=o,s-=o,Yt=1<<32-ht(t)+s|a<<s|l,Gt=i+e}else Yt=1<<i|a<<s|l,Gt=e}function rr(e){e.return!==null&&(Jt(e,1),yo(e,1,0))}function cr(e){for(;e===ps;)ps=pl[--vl],pl[vl]=null,on=pl[--vl],pl[vl]=null;for(;e===xa;)xa=zt[--Rt],zt[Rt]=null,Gt=zt[--Rt],zt[Rt]=null,Yt=zt[--Rt],zt[Rt]=null}function po(e,t){zt[Rt++]=Yt,zt[Rt++]=Gt,zt[Rt++]=xa,Yt=t.id,Gt=t.overflow,xa=e}var Fe=null,ze=null,ye=!1,ha=null,_t=!1,ur=Error(c(519));function ga(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fn(Mt(t,e)),ur}function vo(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[We]=e,t[nt]=l,a){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(a=0;a<Dn.length;a++)xe(Dn[a],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),_u(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),Du(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Hd(t.textContent,a)?(l.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),l.onScroll!=null&&xe("scroll",t),l.onScrollEnd!=null&&xe("scrollend",t),l.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||ga(e,!0)}function bo(e){for(Fe=e.return;Fe;)switch(Fe.tag){case 5:case 31:case 13:_t=!1;return;case 27:case 3:_t=!0;return;default:Fe=Fe.return}}function bl(e){if(e!==Fe)return!1;if(!ye)return bo(e),ye=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Ac(e.type,e.memoizedProps)),a=!a),a&&ze&&ga(e),bo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ze=Zd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ze=Zd(e)}else t===27?(t=ze,Ra(e.type)?(e=wc,wc=null,ze=e):ze=t):ze=Fe?Dt(e.stateNode.nextSibling):null;return!0}function ka(){ze=Fe=null,ye=!1}function or(){var e=ha;return e!==null&&(ut===null?ut=e:ut.push.apply(ut,e),ha=null),e}function fn(e){ha===null?ha=[e]:ha.push(e)}var fr=E(null),Ka=null,Wt=null;function ya(e,t,a){$(fr,t._currentValue),t._currentValue=a}function Ft(e){e._currentValue=fr.current,Y(fr)}function dr(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function mr(e,t,a,l){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var o=s.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=s;for(var j=0;j<t.length;j++)if(h.context===t[j]){i.lanes|=a,h=i.alternate,h!==null&&(h.lanes|=a),dr(i.return,a,e),l||(o=null);break e}i=h.next}}else if(s.tag===18){if(o=s.return,o===null)throw Error(c(341));o.lanes|=a,i=o.alternate,i!==null&&(i.lanes|=a),dr(o,a,e),o=null}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}}function jl(e,t,a,l){e=null;for(var s=t,i=!1;s!==null;){if(!i){if((s.flags&524288)!==0)i=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var o=s.alternate;if(o===null)throw Error(c(387));if(o=o.memoizedProps,o!==null){var h=s.type;gt(s.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(s===W.current){if(o=s.alternate,o===null)throw Error(c(387));o.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Bn):e=[Bn])}s=s.return}e!==null&&mr(t,e,a,l),t.flags|=262144}function vs(e){for(e=e.firstContext;e!==null;){if(!gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ja(e){Ka=e,Wt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pe(e){return jo(Ka,e)}function bs(e,t){return Ka===null&&Ja(e),jo(e,t)}function jo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Wt===null){if(e===null)throw Error(c(308));Wt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wt=Wt.next=t;return a}var Nx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Sx=r.unstable_scheduleCallback,Ex=r.unstable_NormalPriority,Ye={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xr(){return{controller:new Nx,data:new Map,refCount:0}}function dn(e){e.refCount--,e.refCount===0&&Sx(Ex,function(){e.controller.abort()})}var mn=null,hr=0,Nl=0,Sl=null;function Cx(e,t){if(mn===null){var a=mn=[];hr=0,Nl=pc(),Sl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return hr++,t.then(No,No),t}function No(){if(--hr===0&&mn!==null){Sl!==null&&(Sl.status="fulfilled");var e=mn;mn=null,Nl=0,Sl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Tx(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(l.status="rejected",l.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),l}var So=U.S;U.S=function(e,t){rd=mt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Cx(e,t),So!==null&&So(e,t)};var Wa=E(null);function gr(){var e=Wa.current;return e!==null?e:Me.pooledCache}function js(e,t){t===null?$(Wa,Wa.current):$(Wa,t.pool)}function Eo(){var e=gr();return e===null?null:{parent:Ye._currentValue,pool:e}}var El=Error(c(460)),yr=Error(c(474)),Ns=Error(c(542)),Ss={then:function(){}};function Co(e){return e=e.status,e==="fulfilled"||e==="rejected"}function To(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zt,Zt),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mo(e),e;default:if(typeof t.status=="string")t.then(Zt,Zt);else{if(e=Me,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=l}},function(l){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mo(e),e}throw Pa=t,El}}function Fa(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Pa=a,El):a}}var Pa=null;function Ao(){if(Pa===null)throw Error(c(459));var e=Pa;return Pa=null,e}function Mo(e){if(e===El||e===Ns)throw Error(c(483))}var Cl=null,xn=0;function Es(e){var t=xn;return xn+=1,Cl===null&&(Cl=[]),To(Cl,e,t)}function hn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Cs(e,t){throw t.$$typeof===T?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function zo(e){function t(C,S){if(e){var M=C.deletions;M===null?(C.deletions=[S],C.flags|=16):M.push(S)}}function a(C,S){if(!e)return null;for(;S!==null;)t(C,S),S=S.sibling;return null}function l(C){for(var S=new Map;C!==null;)C.key!==null?S.set(C.key,C):S.set(C.index,C),C=C.sibling;return S}function s(C,S){return C=Kt(C,S),C.index=0,C.sibling=null,C}function i(C,S,M){return C.index=M,e?(M=C.alternate,M!==null?(M=M.index,M<S?(C.flags|=67108866,S):M):(C.flags|=67108866,S)):(C.flags|=1048576,S)}function o(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function h(C,S,M,H){return S===null||S.tag!==6?(S=sr(M,C.mode,H),S.return=C,S):(S=s(S,M),S.return=C,S)}function j(C,S,M,H){var ee=M.type;return ee===G?L(C,S,M.props.children,H,M.key):S!==null&&(S.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===k&&Fa(ee)===S.type)?(S=s(S,M.props),hn(S,M),S.return=C,S):(S=ys(M.type,M.key,M.props,null,C.mode,H),hn(S,M),S.return=C,S)}function z(C,S,M,H){return S===null||S.tag!==4||S.stateNode.containerInfo!==M.containerInfo||S.stateNode.implementation!==M.implementation?(S=ir(M,C.mode,H),S.return=C,S):(S=s(S,M.children||[]),S.return=C,S)}function L(C,S,M,H,ee){return S===null||S.tag!==7?(S=Za(M,C.mode,H,ee),S.return=C,S):(S=s(S,M),S.return=C,S)}function q(C,S,M){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=sr(""+S,C.mode,M),S.return=C,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case A:return M=ys(S.type,S.key,S.props,null,C.mode,M),hn(M,S),M.return=C,M;case X:return S=ir(S,C.mode,M),S.return=C,S;case k:return S=Fa(S),q(C,S,M)}if(Je(S)||De(S))return S=Za(S,C.mode,M,null),S.return=C,S;if(typeof S.then=="function")return q(C,Es(S),M);if(S.$$typeof===Q)return q(C,bs(C,S),M);Cs(C,S)}return null}function R(C,S,M,H){var ee=S!==null?S.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ee!==null?null:h(C,S,""+M,H);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case A:return M.key===ee?j(C,S,M,H):null;case X:return M.key===ee?z(C,S,M,H):null;case k:return M=Fa(M),R(C,S,M,H)}if(Je(M)||De(M))return ee!==null?null:L(C,S,M,H,null);if(typeof M.then=="function")return R(C,S,Es(M),H);if(M.$$typeof===Q)return R(C,S,bs(C,M),H);Cs(C,M)}return null}function w(C,S,M,H,ee){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return C=C.get(M)||null,h(S,C,""+H,ee);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case A:return C=C.get(H.key===null?M:H.key)||null,j(S,C,H,ee);case X:return C=C.get(H.key===null?M:H.key)||null,z(S,C,H,ee);case k:return H=Fa(H),w(C,S,M,H,ee)}if(Je(H)||De(H))return C=C.get(M)||null,L(S,C,H,ee,null);if(typeof H.then=="function")return w(C,S,M,Es(H),ee);if(H.$$typeof===Q)return w(C,S,M,bs(S,H),ee);Cs(S,H)}return null}function K(C,S,M,H){for(var ee=null,pe=null,F=S,oe=S=0,ge=null;F!==null&&oe<M.length;oe++){F.index>oe?(ge=F,F=null):ge=F.sibling;var ve=R(C,F,M[oe],H);if(ve===null){F===null&&(F=ge);break}e&&F&&ve.alternate===null&&t(C,F),S=i(ve,S,oe),pe===null?ee=ve:pe.sibling=ve,pe=ve,F=ge}if(oe===M.length)return a(C,F),ye&&Jt(C,oe),ee;if(F===null){for(;oe<M.length;oe++)F=q(C,M[oe],H),F!==null&&(S=i(F,S,oe),pe===null?ee=F:pe.sibling=F,pe=F);return ye&&Jt(C,oe),ee}for(F=l(F);oe<M.length;oe++)ge=w(F,C,oe,M[oe],H),ge!==null&&(e&&ge.alternate!==null&&F.delete(ge.key===null?oe:ge.key),S=i(ge,S,oe),pe===null?ee=ge:pe.sibling=ge,pe=ge);return e&&F.forEach(function(Ua){return t(C,Ua)}),ye&&Jt(C,oe),ee}function ae(C,S,M,H){if(M==null)throw Error(c(151));for(var ee=null,pe=null,F=S,oe=S=0,ge=null,ve=M.next();F!==null&&!ve.done;oe++,ve=M.next()){F.index>oe?(ge=F,F=null):ge=F.sibling;var Ua=R(C,F,ve.value,H);if(Ua===null){F===null&&(F=ge);break}e&&F&&Ua.alternate===null&&t(C,F),S=i(Ua,S,oe),pe===null?ee=Ua:pe.sibling=Ua,pe=Ua,F=ge}if(ve.done)return a(C,F),ye&&Jt(C,oe),ee;if(F===null){for(;!ve.done;oe++,ve=M.next())ve=q(C,ve.value,H),ve!==null&&(S=i(ve,S,oe),pe===null?ee=ve:pe.sibling=ve,pe=ve);return ye&&Jt(C,oe),ee}for(F=l(F);!ve.done;oe++,ve=M.next())ve=w(F,C,oe,ve.value,H),ve!==null&&(e&&ve.alternate!==null&&F.delete(ve.key===null?oe:ve.key),S=i(ve,S,oe),pe===null?ee=ve:pe.sibling=ve,pe=ve);return e&&F.forEach(function(Hh){return t(C,Hh)}),ye&&Jt(C,oe),ee}function Ae(C,S,M,H){if(typeof M=="object"&&M!==null&&M.type===G&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case A:e:{for(var ee=M.key;S!==null;){if(S.key===ee){if(ee=M.type,ee===G){if(S.tag===7){a(C,S.sibling),H=s(S,M.props.children),H.return=C,C=H;break e}}else if(S.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===k&&Fa(ee)===S.type){a(C,S.sibling),H=s(S,M.props),hn(H,M),H.return=C,C=H;break e}a(C,S);break}else t(C,S);S=S.sibling}M.type===G?(H=Za(M.props.children,C.mode,H,M.key),H.return=C,C=H):(H=ys(M.type,M.key,M.props,null,C.mode,H),hn(H,M),H.return=C,C=H)}return o(C);case X:e:{for(ee=M.key;S!==null;){if(S.key===ee)if(S.tag===4&&S.stateNode.containerInfo===M.containerInfo&&S.stateNode.implementation===M.implementation){a(C,S.sibling),H=s(S,M.children||[]),H.return=C,C=H;break e}else{a(C,S);break}else t(C,S);S=S.sibling}H=ir(M,C.mode,H),H.return=C,C=H}return o(C);case k:return M=Fa(M),Ae(C,S,M,H)}if(Je(M))return K(C,S,M,H);if(De(M)){if(ee=De(M),typeof ee!="function")throw Error(c(150));return M=ee.call(M),ae(C,S,M,H)}if(typeof M.then=="function")return Ae(C,S,Es(M),H);if(M.$$typeof===Q)return Ae(C,S,bs(C,M),H);Cs(C,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,S!==null&&S.tag===6?(a(C,S.sibling),H=s(S,M),H.return=C,C=H):(a(C,S),H=sr(M,C.mode,H),H.return=C,C=H),o(C)):a(C,S)}return function(C,S,M,H){try{xn=0;var ee=Ae(C,S,M,H);return Cl=null,ee}catch(F){if(F===El||F===Ns)throw F;var pe=yt(29,F,null,C.mode);return pe.lanes=H,pe.return=C,pe}}}var Ia=zo(!0),Ro=zo(!1),pa=!1;function pr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vr(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 va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ba(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(be&2)!==0){var s=l.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),l.pending=t,t=gs(e),mo(e,null,a),t}return hs(e,l,t,a),gs(e)}function gn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,bu(e,a)}}function br(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var s=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var o={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?s=i=o:i=i.next=o,a=a.next}while(a!==null);i===null?s=i=t:i=i.next=t}else s=i=t;a={baseState:l.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var jr=!1;function yn(){if(jr){var e=Sl;if(e!==null)throw e}}function pn(e,t,a,l){jr=!1;var s=e.updateQueue;pa=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,h=s.shared.pending;if(h!==null){s.shared.pending=null;var j=h,z=j.next;j.next=null,o===null?i=z:o.next=z,o=j;var L=e.alternate;L!==null&&(L=L.updateQueue,h=L.lastBaseUpdate,h!==o&&(h===null?L.firstBaseUpdate=z:h.next=z,L.lastBaseUpdate=j))}if(i!==null){var q=s.baseState;o=0,L=z=j=null,h=i;do{var R=h.lane&-536870913,w=R!==h.lane;if(w?(he&R)===R:(l&R)===R){R!==0&&R===Nl&&(jr=!0),L!==null&&(L=L.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var K=e,ae=h;R=t;var Ae=a;switch(ae.tag){case 1:if(K=ae.payload,typeof K=="function"){q=K.call(Ae,q,R);break e}q=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=ae.payload,R=typeof K=="function"?K.call(Ae,q,R):K,R==null)break e;q=p({},q,R);break e;case 2:pa=!0}}R=h.callback,R!==null&&(e.flags|=64,w&&(e.flags|=8192),w=s.callbacks,w===null?s.callbacks=[R]:w.push(R))}else w={lane:R,tag:h.tag,payload:h.payload,callback:h.callback,next:null},L===null?(z=L=w,j=q):L=L.next=w,o|=R;if(h=h.next,h===null){if(h=s.shared.pending,h===null)break;w=h,h=w.next,w.next=null,s.lastBaseUpdate=w,s.shared.pending=null}}while(!0);L===null&&(j=q),s.baseState=j,s.firstBaseUpdate=z,s.lastBaseUpdate=L,i===null&&(s.shared.lanes=0),Ca|=o,e.lanes=o,e.memoizedState=q}}function _o(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function wo(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)_o(a[e],t)}var Tl=E(null),Ts=E(0);function Do(e,t){e=ia,$(Ts,e),$(Tl,t),ia=e|t.baseLanes}function Nr(){$(Ts,ia),$(Tl,Tl.current)}function Sr(){ia=Ts.current,Y(Tl),Y(Ts)}var pt=E(null),wt=null;function ja(e){var t=e.alternate;$(Be,Be.current&1),$(pt,e),wt===null&&(t===null||Tl.current!==null||t.memoizedState!==null)&&(wt=e)}function Er(e){$(Be,Be.current),$(pt,e),wt===null&&(wt=e)}function Oo(e){e.tag===22?($(Be,Be.current),$(pt,e),wt===null&&(wt=e)):Na()}function Na(){$(Be,Be.current),$(pt,pt.current)}function vt(e){Y(pt),wt===e&&(wt=null),Y(Be)}var Be=E(0);function As(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Rc(a)||_c(a)))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 Pt=0,ue=null,Ce=null,Ge=null,Ms=!1,Al=!1,el=!1,zs=0,vn=0,Ml=null,Ax=0;function Oe(){throw Error(c(321))}function Cr(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!gt(e[a],t[a]))return!1;return!0}function Tr(e,t,a,l,s,i){return Pt=i,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?pf:Gr,el=!1,i=a(l,s),el=!1,Al&&(i=Lo(t,a,l,s)),Uo(e),i}function Uo(e){U.H=Nn;var t=Ce!==null&&Ce.next!==null;if(Pt=0,Ge=Ce=ue=null,Ms=!1,vn=0,Ml=null,t)throw Error(c(300));e===null||Xe||(e=e.dependencies,e!==null&&vs(e)&&(Xe=!0))}function Lo(e,t,a,l){ue=e;var s=0;do{if(Al&&(Ml=null),vn=0,Al=!1,25<=s)throw Error(c(301));if(s+=1,Ge=Ce=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}U.H=vf,i=t(a,l)}while(Al);return i}function Mx(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?bn(t):t,e=e.useState()[0],(Ce!==null?Ce.memoizedState:null)!==e&&(ue.flags|=1024),t}function Ar(){var e=zs!==0;return zs=0,e}function Mr(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function zr(e){if(Ms){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ms=!1}Pt=0,Ge=Ce=ue=null,Al=!1,vn=zs=0,Ml=null}function at(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?ue.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function qe(){if(Ce===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=Ce.next;var t=Ge===null?ue.memoizedState:Ge.next;if(t!==null)Ge=t,Ce=e;else{if(e===null)throw ue.alternate===null?Error(c(467)):Error(c(310));Ce=e,e={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},Ge===null?ue.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function Rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bn(e){var t=vn;return vn+=1,Ml===null&&(Ml=[]),e=To(Ml,e,t),t=ue,(Ge===null?t.memoizedState:Ge.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?pf:Gr),e}function _s(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bn(e);if(e.$$typeof===Q)return Pe(e)}throw Error(c(438,String(e)))}function Rr(e){var t=null,a=ue.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ue.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Rs(),ue.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=I;return t.index++,a}function It(e,t){return typeof t=="function"?t(e):t}function ws(e){var t=qe();return _r(t,Ce,e)}function _r(e,t,a){var l=e.queue;if(l===null)throw Error(c(311));l.lastRenderedReducer=a;var s=e.baseQueue,i=l.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}t.baseQueue=s=i,l.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var h=o=null,j=null,z=t,L=!1;do{var q=z.lane&-536870913;if(q!==z.lane?(he&q)===q:(Pt&q)===q){var R=z.revertLane;if(R===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),q===Nl&&(L=!0);else if((Pt&R)===R){z=z.next,R===Nl&&(L=!0);continue}else q={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},j===null?(h=j=q,o=i):j=j.next=q,ue.lanes|=R,Ca|=R;q=z.action,el&&a(i,q),i=z.hasEagerState?z.eagerState:a(i,q)}else R={lane:q,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},j===null?(h=j=R,o=i):j=j.next=R,ue.lanes|=q,Ca|=q;z=z.next}while(z!==null&&z!==t);if(j===null?o=i:j.next=h,!gt(i,e.memoizedState)&&(Xe=!0,L&&(a=Sl,a!==null)))throw a;e.memoizedState=i,e.baseState=o,e.baseQueue=j,l.lastRenderedState=i}return s===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function wr(e){var t=qe(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var l=a.dispatch,s=a.pending,i=t.memoizedState;if(s!==null){a.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);gt(i,t.memoizedState)||(Xe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function Ho(e,t,a){var l=ue,s=qe(),i=ye;if(i){if(a===void 0)throw Error(c(407));a=a()}else a=t();var o=!gt((Ce||s).memoizedState,a);if(o&&(s.memoizedState=a,Xe=!0),s=s.queue,Ur(Yo.bind(null,l,s,e),[e]),s.getSnapshot!==t||o||Ge!==null&&Ge.memoizedState.tag&1){if(l.flags|=2048,zl(9,{destroy:void 0},qo.bind(null,l,s,a,t),null),Me===null)throw Error(c(349));i||(Pt&127)!==0||Bo(l,t,a)}return a}function Bo(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ue.updateQueue,t===null?(t=Rs(),ue.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function qo(e,t,a,l){t.value=a,t.getSnapshot=l,Go(t)&&Xo(e)}function Yo(e,t,a){return a(function(){Go(t)&&Xo(e)})}function Go(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!gt(e,a)}catch{return!0}}function Xo(e){var t=$a(e,2);t!==null&&ot(t,e,2)}function Dr(e){var t=at();if(typeof e=="function"){var a=e;if(e=a(),el){fa(!0);try{a()}finally{fa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:e},t}function Qo(e,t,a,l){return e.baseState=a,_r(e,Ce,typeof l=="function"?l:It)}function zx(e,t,a,l,s){if(Us(e))throw Error(c(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};U.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,Vo(t,i)):(i.next=a.next,t.pending=a.next=i)}}function Vo(e,t){var a=t.action,l=t.payload,s=e.state;if(t.isTransition){var i=U.T,o={};U.T=o;try{var h=a(s,l),j=U.S;j!==null&&j(o,h),$o(e,t,h)}catch(z){Or(e,t,z)}finally{i!==null&&o.types!==null&&(i.types=o.types),U.T=i}}else try{i=a(s,l),$o(e,t,i)}catch(z){Or(e,t,z)}}function $o(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Zo(e,t,l)},function(l){return Or(e,t,l)}):Zo(e,t,a)}function Zo(e,t,a){t.status="fulfilled",t.value=a,ko(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Vo(e,a)))}function Or(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,ko(t),t=t.next;while(t!==l)}e.action=null}function ko(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ko(e,t){return t}function Jo(e,t){if(ye){var a=Me.formState;if(a!==null){e:{var l=ue;if(ye){if(ze){t:{for(var s=ze,i=_t;s.nodeType!==8;){if(!i){s=null;break t}if(s=Dt(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){ze=Dt(s.nextSibling),l=s.data==="F!";break e}}ga(l)}l=!1}l&&(t=a[0])}}return a=at(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:t},a.queue=l,a=hf.bind(null,ue,l),l.dispatch=a,l=Dr(!1),i=Yr.bind(null,ue,!1,l.queue),l=at(),s={state:t,dispatch:null,action:e,pending:null},l.queue=s,a=zx.bind(null,ue,s,i,a),s.dispatch=a,l.memoizedState=e,[t,a,!1]}function Wo(e){var t=qe();return Fo(t,Ce,e)}function Fo(e,t,a){if(t=_r(e,t,Ko)[0],e=ws(It)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=bn(t)}catch(o){throw o===El?Ns:o}else l=t;t=qe();var s=t.queue,i=s.dispatch;return a!==t.memoizedState&&(ue.flags|=2048,zl(9,{destroy:void 0},Rx.bind(null,s,a),null)),[l,i,e]}function Rx(e,t){e.action=t}function Po(e){var t=qe(),a=Ce;if(a!==null)return Fo(t,a,e);qe(),t=t.memoizedState,a=qe();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function zl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ue.updateQueue,t===null&&(t=Rs(),ue.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Io(){return qe().memoizedState}function Ds(e,t,a,l){var s=at();ue.flags|=e,s.memoizedState=zl(1|t,{destroy:void 0},a,l===void 0?null:l)}function Os(e,t,a,l){var s=qe();l=l===void 0?null:l;var i=s.memoizedState.inst;Ce!==null&&l!==null&&Cr(l,Ce.memoizedState.deps)?s.memoizedState=zl(t,i,a,l):(ue.flags|=e,s.memoizedState=zl(1|t,i,a,l))}function ef(e,t){Ds(8390656,8,e,t)}function Ur(e,t){Os(2048,8,e,t)}function _x(e){ue.flags|=4;var t=ue.updateQueue;if(t===null)t=Rs(),ue.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function tf(e){var t=qe().memoizedState;return _x({ref:t,nextImpl:e}),function(){if((be&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function af(e,t){return Os(4,2,e,t)}function lf(e,t){return Os(4,4,e,t)}function nf(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function sf(e,t,a){a=a!=null?a.concat([e]):null,Os(4,4,nf.bind(null,t,e),a)}function Lr(){}function rf(e,t){var a=qe();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Cr(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function cf(e,t){var a=qe();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Cr(t,l[1]))return l[0];if(l=e(),el){fa(!0);try{e()}finally{fa(!1)}}return a.memoizedState=[l,t],l}function Hr(e,t,a){return a===void 0||(Pt&1073741824)!==0&&(he&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=ud(),ue.lanes|=e,Ca|=e,a)}function uf(e,t,a,l){return gt(a,t)?a:Tl.current!==null?(e=Hr(e,a,l),gt(e,t)||(Xe=!0),e):(Pt&42)===0||(Pt&1073741824)!==0&&(he&261930)===0?(Xe=!0,e.memoizedState=a):(e=ud(),ue.lanes|=e,Ca|=e,t)}function of(e,t,a,l,s){var i=V.p;V.p=i!==0&&8>i?i:8;var o=U.T,h={};U.T=h,Yr(e,!1,t,a);try{var j=s(),z=U.S;if(z!==null&&z(h,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var L=Tx(j,l);jn(e,t,L,Nt(e))}else jn(e,t,l,Nt(e))}catch(q){jn(e,t,{then:function(){},status:"rejected",reason:q},Nt())}finally{V.p=i,o!==null&&h.types!==null&&(o.types=h.types),U.T=o}}function wx(){}function Br(e,t,a,l){if(e.tag!==5)throw Error(c(476));var s=ff(e).queue;of(e,s,t,le,a===null?wx:function(){return df(e),a(l)})}function ff(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:le},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:It,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function df(e){var t=ff(e);t.next===null&&(t=e.alternate.memoizedState),jn(e,t.next.queue,{},Nt())}function qr(){return Pe(Bn)}function mf(){return qe().memoizedState}function xf(){return qe().memoizedState}function Dx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Nt();e=va(a);var l=ba(t,e,a);l!==null&&(ot(l,t,a),gn(l,t,a)),t={cache:xr()},e.payload=t;return}t=t.return}}function Ox(e,t,a){var l=Nt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Us(e)?gf(t,a):(a=lr(e,t,a,l),a!==null&&(ot(a,e,l),yf(a,t,l)))}function hf(e,t,a){var l=Nt();jn(e,t,a,l)}function jn(e,t,a,l){var s={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Us(e))gf(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,a);if(s.hasEagerState=!0,s.eagerState=h,gt(h,o))return hs(e,t,s,0),Me===null&&xs(),!1}catch{}if(a=lr(e,t,s,l),a!==null)return ot(a,e,l),yf(a,t,l),!0}return!1}function Yr(e,t,a,l){if(l={lane:2,revertLane:pc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Us(e)){if(t)throw Error(c(479))}else t=lr(e,a,l,2),t!==null&&ot(t,e,2)}function Us(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function gf(e,t){Al=Ms=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function yf(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,bu(e,a)}}var Nn={readContext:Pe,use:_s,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useLayoutEffect:Oe,useInsertionEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useSyncExternalStore:Oe,useId:Oe,useHostTransitionStatus:Oe,useFormState:Oe,useActionState:Oe,useOptimistic:Oe,useMemoCache:Oe,useCacheRefresh:Oe};Nn.useEffectEvent=Oe;var pf={readContext:Pe,use:_s,useCallback:function(e,t){return at().memoizedState=[e,t===void 0?null:t],e},useContext:Pe,useEffect:ef,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ds(4194308,4,nf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ds(4194308,4,e,t)},useInsertionEffect:function(e,t){Ds(4,2,e,t)},useMemo:function(e,t){var a=at();t=t===void 0?null:t;var l=e();if(el){fa(!0);try{e()}finally{fa(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=at();if(a!==void 0){var s=a(t);if(el){fa(!0);try{a(t)}finally{fa(!1)}}}else s=t;return l.memoizedState=l.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},l.queue=e,e=e.dispatch=Ox.bind(null,ue,e),[l.memoizedState,e]},useRef:function(e){var t=at();return e={current:e},t.memoizedState=e},useState:function(e){e=Dr(e);var t=e.queue,a=hf.bind(null,ue,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Lr,useDeferredValue:function(e,t){var a=at();return Hr(a,e,t)},useTransition:function(){var e=Dr(!1);return e=of.bind(null,ue,e.queue,!0,!1),at().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ue,s=at();if(ye){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),Me===null)throw Error(c(349));(he&127)!==0||Bo(l,t,a)}s.memoizedState=a;var i={value:a,getSnapshot:t};return s.queue=i,ef(Yo.bind(null,l,i,e),[e]),l.flags|=2048,zl(9,{destroy:void 0},qo.bind(null,l,i,a,t),null),a},useId:function(){var e=at(),t=Me.identifierPrefix;if(ye){var a=Gt,l=Yt;a=(l&~(1<<32-ht(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=zs++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ax++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qr,useFormState:Jo,useActionState:Jo,useOptimistic:function(e){var t=at();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Yr.bind(null,ue,!0,a),a.dispatch=t,[e,t]},useMemoCache:Rr,useCacheRefresh:function(){return at().memoizedState=Dx.bind(null,ue)},useEffectEvent:function(e){var t=at(),a={impl:e};return t.memoizedState=a,function(){if((be&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},Gr={readContext:Pe,use:_s,useCallback:rf,useContext:Pe,useEffect:Ur,useImperativeHandle:sf,useInsertionEffect:af,useLayoutEffect:lf,useMemo:cf,useReducer:ws,useRef:Io,useState:function(){return ws(It)},useDebugValue:Lr,useDeferredValue:function(e,t){var a=qe();return uf(a,Ce.memoizedState,e,t)},useTransition:function(){var e=ws(It)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:bn(e),t]},useSyncExternalStore:Ho,useId:mf,useHostTransitionStatus:qr,useFormState:Wo,useActionState:Wo,useOptimistic:function(e,t){var a=qe();return Qo(a,Ce,e,t)},useMemoCache:Rr,useCacheRefresh:xf};Gr.useEffectEvent=tf;var vf={readContext:Pe,use:_s,useCallback:rf,useContext:Pe,useEffect:Ur,useImperativeHandle:sf,useInsertionEffect:af,useLayoutEffect:lf,useMemo:cf,useReducer:wr,useRef:Io,useState:function(){return wr(It)},useDebugValue:Lr,useDeferredValue:function(e,t){var a=qe();return Ce===null?Hr(a,e,t):uf(a,Ce.memoizedState,e,t)},useTransition:function(){var e=wr(It)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:bn(e),t]},useSyncExternalStore:Ho,useId:mf,useHostTransitionStatus:qr,useFormState:Po,useActionState:Po,useOptimistic:function(e,t){var a=qe();return Ce!==null?Qo(a,Ce,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Rr,useCacheRefresh:xf};vf.useEffectEvent=tf;function Xr(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:p({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Qr={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Nt(),s=va(l);s.payload=t,a!=null&&(s.callback=a),t=ba(e,s,l),t!==null&&(ot(t,e,l),gn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Nt(),s=va(l);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=ba(e,s,l),t!==null&&(ot(t,e,l),gn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Nt(),l=va(a);l.tag=2,t!=null&&(l.callback=t),t=ba(e,l,a),t!==null&&(ot(t,e,a),gn(t,e,a))}};function bf(e,t,a,l,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,o):t.prototype&&t.prototype.isPureReactComponent?!cn(a,l)||!cn(s,i):!0}function jf(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Qr.enqueueReplaceState(t,t.state,null)}function tl(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=p({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function Nf(e){ms(e)}function Sf(e){console.error(e)}function Ef(e){ms(e)}function Ls(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Cf(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Vr(e,t,a){return a=va(a),a.tag=3,a.payload={element:null},a.callback=function(){Ls(e,t)},a}function Tf(e){return e=va(e),e.tag=3,e}function Af(e,t,a,l){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var i=l.value;e.payload=function(){return s(i)},e.callback=function(){Cf(t,a,l)}}var o=a.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Cf(t,a,l),typeof s!="function"&&(Ta===null?Ta=new Set([this]):Ta.add(this));var h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function Ux(e,t,a,l,s){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&jl(t,a,s,!0),a=pt.current,a!==null){switch(a.tag){case 31:case 13:return wt===null?Ks():a.alternate===null&&Ue===0&&(Ue=3),a.flags&=-257,a.flags|=65536,a.lanes=s,l===Ss?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),hc(e,l,s)),!1;case 22:return a.flags|=65536,l===Ss?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),hc(e,l,s)),!1}throw Error(c(435,a.tag))}return hc(e,l,s),Ks(),!1}if(ye)return t=pt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,l!==ur&&(e=Error(c(422),{cause:l}),fn(Mt(e,a)))):(l!==ur&&(t=Error(c(423),{cause:l}),fn(Mt(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,l=Mt(l,a),s=Vr(e.stateNode,l,s),br(e,s),Ue!==4&&(Ue=2)),!1;var i=Error(c(520),{cause:l});if(i=Mt(i,a),Rn===null?Rn=[i]:Rn.push(i),Ue!==4&&(Ue=2),t===null)return!0;l=Mt(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Vr(a.stateNode,l,e),br(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Ta===null||!Ta.has(i))))return a.flags|=65536,s&=-s,a.lanes|=s,s=Tf(s),Af(s,e,a,l),br(a,s),!1}a=a.return}while(a!==null);return!1}var $r=Error(c(461)),Xe=!1;function Ie(e,t,a,l){t.child=e===null?Ro(t,null,a,l):Ia(t,e.child,a,l)}function Mf(e,t,a,l,s){a=a.render;var i=t.ref;if("ref"in l){var o={};for(var h in l)h!=="ref"&&(o[h]=l[h])}else o=l;return Ja(t),l=Tr(e,t,a,o,i,s),h=Ar(),e!==null&&!Xe?(Mr(e,t,s),ea(e,t,s)):(ye&&h&&rr(t),t.flags|=1,Ie(e,t,l,s),t.child)}function zf(e,t,a,l,s){if(e===null){var i=a.type;return typeof i=="function"&&!nr(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,Rf(e,t,i,l,s)):(e=ys(a.type,null,l,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Ir(e,s)){var o=i.memoizedProps;if(a=a.compare,a=a!==null?a:cn,a(o,l)&&e.ref===t.ref)return ea(e,t,s)}return t.flags|=1,e=Kt(i,l),e.ref=t.ref,e.return=t,t.child=e}function Rf(e,t,a,l,s){if(e!==null){var i=e.memoizedProps;if(cn(i,l)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=l=i,Ir(e,s))(e.flags&131072)!==0&&(Xe=!0);else return t.lanes=e.lanes,ea(e,t,s)}return Zr(e,t,a,l,s)}function _f(e,t,a,l){var s=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,e!==null){for(l=t.child=e.child,s=0;l!==null;)s=s|l.lanes|l.childLanes,l=l.sibling;l=s&~i}else l=0,t.child=null;return wf(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&js(t,i!==null?i.cachePool:null),i!==null?Do(t,i):Nr(),Oo(t);else return l=t.lanes=536870912,wf(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(js(t,i.cachePool),Do(t,i),Na(),t.memoizedState=null):(e!==null&&js(t,null),Nr(),Na());return Ie(e,t,s,a),t.child}function Sn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function wf(e,t,a,l,s){var i=gr();return i=i===null?null:{parent:Ye._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&js(t,null),Nr(),Oo(t),e!==null&&jl(e,t,l,!0),t.childLanes=s,null}function Hs(e,t){return t=qs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Df(e,t,a){return Ia(t,e.child,null,a),e=Hs(t,t.pendingProps),e.flags|=2,vt(t),t.memoizedState=null,e}function Lx(e,t,a){var l=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ye){if(l.mode==="hidden")return e=Hs(t,l),t.lanes=536870912,Sn(null,e);if(Er(t),(e=ze)?(e=$d(e,_t),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Yt,overflow:Gt}:null,retryLane:536870912,hydrationErrors:null},a=ho(e),a.return=t,t.child=a,Fe=t,ze=null)):e=null,e===null)throw ga(t);return t.lanes=536870912,null}return Hs(t,l)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Er(t),s)if(t.flags&256)t.flags&=-257,t=Df(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Xe||jl(e,t,a,!1),s=(a&e.childLanes)!==0,Xe||s){if(l=Me,l!==null&&(o=ju(l,a),o!==0&&o!==i.retryLane))throw i.retryLane=o,$a(e,o),ot(l,e,o),$r;Ks(),t=Df(e,t,a)}else e=i.treeContext,ze=Dt(o.nextSibling),Fe=t,ye=!0,ha=null,_t=!1,e!==null&&po(t,e),t=Hs(t,l),t.flags|=4096;return t}return e=Kt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Zr(e,t,a,l,s){return Ja(t),a=Tr(e,t,a,l,void 0,s),l=Ar(),e!==null&&!Xe?(Mr(e,t,s),ea(e,t,s)):(ye&&l&&rr(t),t.flags|=1,Ie(e,t,a,s),t.child)}function Of(e,t,a,l,s,i){return Ja(t),t.updateQueue=null,a=Lo(t,l,a,s),Uo(e),l=Ar(),e!==null&&!Xe?(Mr(e,t,i),ea(e,t,i)):(ye&&l&&rr(t),t.flags|=1,Ie(e,t,a,i),t.child)}function Uf(e,t,a,l,s){if(Ja(t),t.stateNode===null){var i=yl,o=a.contextType;typeof o=="object"&&o!==null&&(i=Pe(o)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Qr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},pr(t),o=a.contextType,i.context=typeof o=="object"&&o!==null?Pe(o):yl,i.state=t.memoizedState,o=a.getDerivedStateFromProps,typeof o=="function"&&(Xr(t,a,o,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&Qr.enqueueReplaceState(i,i.state,null),pn(t,l,i,s),yn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,j=tl(a,h);i.props=j;var z=i.context,L=a.contextType;o=yl,typeof L=="object"&&L!==null&&(o=Pe(L));var q=a.getDerivedStateFromProps;L=typeof q=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,L||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||z!==o)&&jf(t,i,l,o),pa=!1;var R=t.memoizedState;i.state=R,pn(t,l,i,s),yn(),z=t.memoizedState,h||R!==z||pa?(typeof q=="function"&&(Xr(t,a,q,l),z=t.memoizedState),(j=pa||bf(t,a,j,l,R,z,o))?(L||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=z),i.props=l,i.state=z,i.context=o,l=j):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,vr(e,t),o=t.memoizedProps,L=tl(a,o),i.props=L,q=t.pendingProps,R=i.context,z=a.contextType,j=yl,typeof z=="object"&&z!==null&&(j=Pe(z)),h=a.getDerivedStateFromProps,(z=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==q||R!==j)&&jf(t,i,l,j),pa=!1,R=t.memoizedState,i.state=R,pn(t,l,i,s),yn();var w=t.memoizedState;o!==q||R!==w||pa||e!==null&&e.dependencies!==null&&vs(e.dependencies)?(typeof h=="function"&&(Xr(t,a,h,l),w=t.memoizedState),(L=pa||bf(t,a,L,l,R,w,j)||e!==null&&e.dependencies!==null&&vs(e.dependencies))?(z||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,w,j),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,w,j)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=w),i.props=l,i.state=w,i.context=j,l=L):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,Bs(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=Ia(t,e.child,null,s),t.child=Ia(t,null,a,s)):Ie(e,t,a,s),t.memoizedState=i.state,e=t.child):e=ea(e,t,s),e}function Lf(e,t,a,l){return ka(),t.flags|=256,Ie(e,t,a,l),t.child}var kr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kr(e){return{baseLanes:e,cachePool:Eo()}}function Jr(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=jt),e}function Hf(e,t,a){var l=t.pendingProps,s=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(Be.current&2)!==0),o&&(s=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(ye){if(s?ja(t):Na(),(e=ze)?(e=$d(e,_t),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Yt,overflow:Gt}:null,retryLane:536870912,hydrationErrors:null},a=ho(e),a.return=t,t.child=a,Fe=t,ze=null)):e=null,e===null)throw ga(t);return _c(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,s?(Na(),s=t.mode,h=qs({mode:"hidden",children:h},s),l=Za(l,s,a,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=Kr(a),l.childLanes=Jr(e,o,a),t.memoizedState=kr,Sn(null,l)):(ja(t),Wr(t,h))}var j=e.memoizedState;if(j!==null&&(h=j.dehydrated,h!==null)){if(i)t.flags&256?(ja(t),t.flags&=-257,t=Fr(e,t,a)):t.memoizedState!==null?(Na(),t.child=e.child,t.flags|=128,t=null):(Na(),h=l.fallback,s=t.mode,l=qs({mode:"visible",children:l.children},s),h=Za(h,s,a,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,Ia(t,e.child,null,a),l=t.child,l.memoizedState=Kr(a),l.childLanes=Jr(e,o,a),t.memoizedState=kr,t=Sn(null,l));else if(ja(t),_c(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var z=o.dgst;o=z,l=Error(c(419)),l.stack="",l.digest=o,fn({value:l,source:null,stack:null}),t=Fr(e,t,a)}else if(Xe||jl(e,t,a,!1),o=(a&e.childLanes)!==0,Xe||o){if(o=Me,o!==null&&(l=ju(o,a),l!==0&&l!==j.retryLane))throw j.retryLane=l,$a(e,l),ot(o,e,l),$r;Rc(h)||Ks(),t=Fr(e,t,a)}else Rc(h)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,ze=Dt(h.nextSibling),Fe=t,ye=!0,ha=null,_t=!1,e!==null&&po(t,e),t=Wr(t,l.children),t.flags|=4096);return t}return s?(Na(),h=l.fallback,s=t.mode,j=e.child,z=j.sibling,l=Kt(j,{mode:"hidden",children:l.children}),l.subtreeFlags=j.subtreeFlags&65011712,z!==null?h=Kt(z,h):(h=Za(h,s,a,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,Sn(null,l),l=t.child,h=e.child.memoizedState,h===null?h=Kr(a):(s=h.cachePool,s!==null?(j=Ye._currentValue,s=s.parent!==j?{parent:j,pool:j}:s):s=Eo(),h={baseLanes:h.baseLanes|a,cachePool:s}),l.memoizedState=h,l.childLanes=Jr(e,o,a),t.memoizedState=kr,Sn(e.child,l)):(ja(t),a=e.child,e=a.sibling,a=Kt(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=a,t.memoizedState=null,a)}function Wr(e,t){return t=qs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function qs(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function Fr(e,t,a){return Ia(t,e.child,null,a),e=Wr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Bf(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),dr(e.return,t,a)}function Pr(e,t,a,l,s,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:s,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=a,o.tailMode=s,o.treeForkCount=i)}function qf(e,t,a){var l=t.pendingProps,s=l.revealOrder,i=l.tail;l=l.children;var o=Be.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,$(Be,o),Ie(e,t,l,a),l=ye?on:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bf(e,a,t);else if(e.tag===19)Bf(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&As(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),Pr(t,!1,s,a,i,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&As(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}Pr(t,!0,a,null,i,l);break;case"together":Pr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ea(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ca|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(jl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,a=Kt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Kt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Ir(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vs(e)))}function Hx(e,t,a){switch(t.tag){case 3:Ve(t,t.stateNode.containerInfo),ya(t,Ye,e.memoizedState.cache),ka();break;case 27:case 5:Kl(t);break;case 4:Ve(t,t.stateNode.containerInfo);break;case 10:ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Er(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ja(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Hf(e,t,a):(ja(t),e=ea(e,t,a),e!==null?e.sibling:null);ja(t);break;case 19:var s=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(jl(e,t,a,!1),l=(a&t.childLanes)!==0),s){if(l)return qf(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),$(Be,Be.current),l)break;return null;case 22:return t.lanes=0,_f(e,t,a,t.pendingProps);case 24:ya(t,Ye,e.memoizedState.cache)}return ea(e,t,a)}function Yf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xe=!0;else{if(!Ir(e,a)&&(t.flags&128)===0)return Xe=!1,Hx(e,t,a);Xe=(e.flags&131072)!==0}else Xe=!1,ye&&(t.flags&1048576)!==0&&yo(t,on,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Fa(t.elementType),t.type=e,typeof e=="function")nr(e)?(l=tl(e,l),t.tag=1,t=Uf(null,t,e,l,a)):(t.tag=0,t=Zr(null,t,e,l,a));else{if(e!=null){var s=e.$$typeof;if(s===re){t.tag=11,t=Mf(null,t,e,l,a);break e}else if(s===Z){t.tag=14,t=zf(null,t,e,l,a);break e}}throw t=Ze(e)||e,Error(c(306,t,""))}}return t;case 0:return Zr(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,s=tl(l,t.pendingProps),Uf(e,t,l,s,a);case 3:e:{if(Ve(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var i=t.memoizedState;s=i.element,vr(e,t),pn(t,l,null,a);var o=t.memoizedState;if(l=o.cache,ya(t,Ye,l),l!==i.cache&&mr(t,[Ye],a,!0),yn(),l=o.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Lf(e,t,l,a);break e}else if(l!==s){s=Mt(Error(c(424)),t),fn(s),t=Lf(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ze=Dt(e.firstChild),Fe=t,ye=!0,ha=null,_t=!0,a=Ro(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ka(),l===s){t=ea(e,t,a);break e}Ie(e,t,l,a)}t=t.child}return t;case 26:return Bs(e,t),e===null?(a=Fd(t.type,null,t.pendingProps,null))?t.memoizedState=a:ye||(a=t.type,e=t.pendingProps,l=ti(fe.current).createElement(a),l[We]=t,l[nt]=e,et(l,a,e),ke(l),t.stateNode=l):t.memoizedState=Fd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kl(t),e===null&&ye&&(l=t.stateNode=Kd(t.type,t.pendingProps,fe.current),Fe=t,_t=!0,s=ze,Ra(t.type)?(wc=s,ze=Dt(l.firstChild)):ze=s),Ie(e,t,t.pendingProps.children,a),Bs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ye&&((s=l=ze)&&(l=mh(l,t.type,t.pendingProps,_t),l!==null?(t.stateNode=l,Fe=t,ze=Dt(l.firstChild),_t=!1,s=!0):s=!1),s||ga(t)),Kl(t),s=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Ac(s,i)?l=null:o!==null&&Ac(s,o)&&(t.flags|=32),t.memoizedState!==null&&(s=Tr(e,t,Mx,null,null,a),Bn._currentValue=s),Bs(e,t),Ie(e,t,l,a),t.child;case 6:return e===null&&ye&&((e=a=ze)&&(a=xh(a,t.pendingProps,_t),a!==null?(t.stateNode=a,Fe=t,ze=null,e=!0):e=!1),e||ga(t)),null;case 13:return Hf(e,t,a);case 4:return Ve(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Ia(t,null,l,a):Ie(e,t,l,a),t.child;case 11:return Mf(e,t,t.type,t.pendingProps,a);case 7:return Ie(e,t,t.pendingProps,a),t.child;case 8:return Ie(e,t,t.pendingProps.children,a),t.child;case 12:return Ie(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,ya(t,t.type,l.value),Ie(e,t,l.children,a),t.child;case 9:return s=t.type._context,l=t.pendingProps.children,Ja(t),s=Pe(s),l=l(s),t.flags|=1,Ie(e,t,l,a),t.child;case 14:return zf(e,t,t.type,t.pendingProps,a);case 15:return Rf(e,t,t.type,t.pendingProps,a);case 19:return qf(e,t,a);case 31:return Lx(e,t,a);case 22:return _f(e,t,a,t.pendingProps);case 24:return Ja(t),l=Pe(Ye),e===null?(s=gr(),s===null&&(s=Me,i=xr(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=a),s=i),t.memoizedState={parent:l,cache:s},pr(t),ya(t,Ye,s)):((e.lanes&a)!==0&&(vr(e,t),pn(t,null,null,a),yn()),s=e.memoizedState,i=t.memoizedState,s.parent!==l?(s={parent:l,cache:l},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),ya(t,Ye,l)):(l=i.cache,ya(t,Ye,l),l!==s.cache&&mr(t,[Ye],a,!0))),Ie(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function ta(e){e.flags|=4}function ec(e,t,a,l,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(md())e.flags|=8192;else throw Pa=Ss,yr}else e.flags&=-16777217}function Gf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!a0(t))if(md())e.flags|=8192;else throw Pa=Ss,yr}function Ys(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?pu():536870912,e.lanes|=t,Dl|=t)}function En(e,t){if(!ye)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,l|=s.subtreeFlags&65011712,l|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,l|=s.subtreeFlags,l|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Bx(e,t,a){var l=t.pendingProps;switch(cr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Re(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ft(Ye),He(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(bl(t)?ta(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,or())),Re(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(ta(t),i!==null?(Re(t),Gf(t,i)):(Re(t),ec(t,s,null,l,a))):i?i!==e.memoizedState?(ta(t),Re(t),Gf(t,i)):(Re(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ta(t),Re(t),ec(t,s,e,l,a)),null;case 27:if(Fn(t),a=fe.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ta(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}e=J.current,bl(t)?vo(t):(e=Kd(s,l,a),t.stateNode=e,ta(t))}return Re(t),null;case 5:if(Fn(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ta(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}if(i=J.current,bl(t))vo(t);else{var o=ti(fe.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?o.createElement(s,{is:l.is}):o.createElement(s)}}i[We]=t,i[nt]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(et(i,s,l),s){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ta(t)}}return Re(t),ec(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ta(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=fe.current,bl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,s=Fe,s!==null)switch(s.tag){case 27:case 5:l=s.memoizedProps}e[We]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Hd(e.nodeValue,a)),e||ga(t,!0)}else e=ti(e).createTextNode(l),e[We]=t,t.stateNode=e}return Re(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=bl(t),a!==null){if(e===null){if(!l)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[We]=t}else ka(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),e=!1}else a=or(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(vt(t),t):(vt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Re(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=bl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!s)throw Error(c(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(c(317));s[We]=t}else ka(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),s=!1}else s=or(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(vt(t),t):(vt(t),null)}return vt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,s=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(s=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==s&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Ys(t,t.updateQueue),Re(t),null);case 4:return He(),e===null&&Nc(t.stateNode.containerInfo),Re(t),null;case 10:return Ft(t.type),Re(t),null;case 19:if(Y(Be),l=t.memoizedState,l===null)return Re(t),null;if(s=(t.flags&128)!==0,i=l.rendering,i===null)if(s)En(l,!1);else{if(Ue!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=As(e),i!==null){for(t.flags|=128,En(l,!1),e=i.updateQueue,t.updateQueue=e,Ys(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)xo(a,e),a=a.sibling;return $(Be,Be.current&1|2),ye&&Jt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&mt()>$s&&(t.flags|=128,s=!0,En(l,!1),t.lanes=4194304)}else{if(!s)if(e=As(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Ys(t,e),En(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!ye)return Re(t),null}else 2*mt()-l.renderingStartTime>$s&&a!==536870912&&(t.flags|=128,s=!0,En(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=mt(),e.sibling=null,a=Be.current,$(Be,s?a&1|2:a&1),ye&&Jt(t,l.treeForkCount),e):(Re(t),null);case 22:case 23:return vt(t),Sr(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),a=t.updateQueue,a!==null&&Ys(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&Y(Wa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ft(Ye),Re(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function qx(e,t){switch(cr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ft(Ye),He(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Fn(t),null;case 31:if(t.memoizedState!==null){if(vt(t),t.alternate===null)throw Error(c(340));ka()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));ka()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Be),null;case 4:return He(),null;case 10:return Ft(t.type),null;case 22:case 23:return vt(t),Sr(),e!==null&&Y(Wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ft(Ye),null;case 25:return null;default:return null}}function Xf(e,t){switch(cr(t),t.tag){case 3:Ft(Ye),He();break;case 26:case 27:case 5:Fn(t);break;case 4:He();break;case 31:t.memoizedState!==null&&vt(t);break;case 13:vt(t);break;case 19:Y(Be);break;case 10:Ft(t.type);break;case 22:case 23:vt(t),Sr(),e!==null&&Y(Wa);break;case 24:Ft(Ye)}}function Cn(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var s=l.next;a=s;do{if((a.tag&e)===e){l=void 0;var i=a.create,o=a.inst;l=i(),o.destroy=l}a=a.next}while(a!==s)}}catch(h){Ee(t,t.return,h)}}function Sa(e,t,a){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var i=s.next;l=i;do{if((l.tag&e)===e){var o=l.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,s=t;var j=a,z=h;try{z()}catch(L){Ee(s,j,L)}}}l=l.next}while(l!==i)}}catch(L){Ee(t,t.return,L)}}function Qf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{wo(t,a)}catch(l){Ee(e,e.return,l)}}}function Vf(e,t,a){a.props=tl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ee(e,t,l)}}function Tn(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(s){Ee(e,t,s)}}function Xt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(s){Ee(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){Ee(e,t,s)}else a.current=null}function $f(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(s){Ee(e,e.return,s)}}function tc(e,t,a){try{var l=e.stateNode;rh(l,e.type,a,t),l[nt]=t}catch(s){Ee(e,e.return,s)}}function Zf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ra(e.type)||e.tag===4}function ac(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zf(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&&Ra(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 lc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Zt));else if(l!==4&&(l===27&&Ra(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(lc(e,t,a),e=e.sibling;e!==null;)lc(e,t,a),e=e.sibling}function Gs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Ra(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Gs(e,t,a),e=e.sibling;e!==null;)Gs(e,t,a),e=e.sibling}function kf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);et(t,l,a),t[We]=e,t[nt]=a}catch(i){Ee(e,e.return,i)}}var aa=!1,Qe=!1,nc=!1,Kf=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function Yx(e,t){if(e=e.containerInfo,Cc=ci,e=no(e),Fi(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var s=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var o=0,h=-1,j=-1,z=0,L=0,q=e,R=null;t:for(;;){for(var w;q!==a||s!==0&&q.nodeType!==3||(h=o+s),q!==i||l!==0&&q.nodeType!==3||(j=o+l),q.nodeType===3&&(o+=q.nodeValue.length),(w=q.firstChild)!==null;)R=q,q=w;for(;;){if(q===e)break t;if(R===a&&++z===s&&(h=o),R===i&&++L===l&&(j=o),(w=q.nextSibling)!==null)break;q=R,R=q.parentNode}q=w}a=h===-1||j===-1?null:{start:h,end:j}}else a=null}a=a||{start:0,end:0}}else a=null;for(Tc={focusedElem:e,selectionRange:a},ci=!1,Ke=t;Ke!==null;)if(t=Ke,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ke=e;else for(;Ke!==null;){switch(t=Ke,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,a=t,s=i.memoizedProps,i=i.memoizedState,l=a.stateNode;try{var K=tl(a.type,s);e=l.getSnapshotBeforeUpdate(K,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(ae){Ee(a,a.return,ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)zc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":zc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,Ke=e;break}Ke=t.return}}function Jf(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:na(e,a),l&4&&Cn(5,a);break;case 1:if(na(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(o){Ee(a,a.return,o)}else{var s=tl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ee(a,a.return,o)}}l&64&&Qf(a),l&512&&Tn(a,a.return);break;case 3:if(na(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{wo(e,t)}catch(o){Ee(a,a.return,o)}}break;case 27:t===null&&l&4&&kf(a);case 26:case 5:na(e,a),t===null&&l&4&&$f(a),l&512&&Tn(a,a.return);break;case 12:na(e,a);break;case 31:na(e,a),l&4&&Pf(e,a);break;case 13:na(e,a),l&4&&If(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Jx.bind(null,a),hh(e,a))));break;case 22:if(l=a.memoizedState!==null||aa,!l){t=t!==null&&t.memoizedState!==null||Qe,s=aa;var i=Qe;aa=l,(Qe=t)&&!i?sa(e,a,(a.subtreeFlags&8772)!==0):na(e,a),aa=s,Qe=i}break;case 30:break;default:na(e,a)}}function Wf(e){var t=e.alternate;t!==null&&(e.alternate=null,Wf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Oi(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 _e=null,it=!1;function la(e,t,a){for(a=a.child;a!==null;)Ff(e,t,a),a=a.sibling}function Ff(e,t,a){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(Jl,a)}catch{}switch(a.tag){case 26:Qe||Xt(a,t),la(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Qe||Xt(a,t);var l=_e,s=it;Ra(a.type)&&(_e=a.stateNode,it=!1),la(e,t,a),Un(a.stateNode),_e=l,it=s;break;case 5:Qe||Xt(a,t);case 6:if(l=_e,s=it,_e=null,la(e,t,a),_e=l,it=s,_e!==null)if(it)try{(_e.nodeType===9?_e.body:_e.nodeName==="HTML"?_e.ownerDocument.body:_e).removeChild(a.stateNode)}catch(i){Ee(a,t,i)}else try{_e.removeChild(a.stateNode)}catch(i){Ee(a,t,i)}break;case 18:_e!==null&&(it?(e=_e,Qd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Gl(e)):Qd(_e,a.stateNode));break;case 4:l=_e,s=it,_e=a.stateNode.containerInfo,it=!0,la(e,t,a),_e=l,it=s;break;case 0:case 11:case 14:case 15:Sa(2,a,t),Qe||Sa(4,a,t),la(e,t,a);break;case 1:Qe||(Xt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Vf(a,t,l)),la(e,t,a);break;case 21:la(e,t,a);break;case 22:Qe=(l=Qe)||a.memoizedState!==null,la(e,t,a),Qe=l;break;default:la(e,t,a)}}function Pf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gl(e)}catch(a){Ee(t,t.return,a)}}}function If(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gl(e)}catch(a){Ee(t,t.return,a)}}function Gx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Kf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Kf),t;default:throw Error(c(435,e.tag))}}function Xs(e,t){var a=Gx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var s=Wx.bind(null,e,l);l.then(s,s)}})}function rt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var s=a[l],i=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(Ra(h.type)){_e=h.stateNode,it=!1;break e}break;case 5:_e=h.stateNode,it=!1;break e;case 3:case 4:_e=h.stateNode.containerInfo,it=!0;break e}h=h.return}if(_e===null)throw Error(c(160));Ff(i,o,s),_e=null,it=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ed(t,e),t=t.sibling}var Ht=null;function ed(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:rt(t,e),ct(e),l&4&&(Sa(3,e,e.return),Cn(3,e),Sa(5,e,e.return));break;case 1:rt(t,e),ct(e),l&512&&(Qe||a===null||Xt(a,a.return)),l&64&&aa&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var s=Ht;if(rt(t,e),ct(e),l&512&&(Qe||a===null||Xt(a,a.return)),l&4){var i=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,s=s.ownerDocument||s;t:switch(l){case"title":i=s.getElementsByTagName("title")[0],(!i||i[Pl]||i[We]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(l),s.head.insertBefore(i,s.querySelector("head > title"))),et(i,l,a),i[We]=e,ke(i),l=i;break e;case"link":var o=e0("link","href",s).get(l+(a.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&i.getAttribute("rel")===(a.rel==null?null:a.rel)&&i.getAttribute("title")===(a.title==null?null:a.title)&&i.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){o.splice(h,1);break t}}i=s.createElement(l),et(i,l,a),s.head.appendChild(i);break;case"meta":if(o=e0("meta","content",s).get(l+(a.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(a.content==null?null:""+a.content)&&i.getAttribute("name")===(a.name==null?null:a.name)&&i.getAttribute("property")===(a.property==null?null:a.property)&&i.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&i.getAttribute("charset")===(a.charSet==null?null:a.charSet)){o.splice(h,1);break t}}i=s.createElement(l),et(i,l,a),s.head.appendChild(i);break;default:throw Error(c(468,l))}i[We]=e,ke(i),l=i}e.stateNode=l}else t0(s,e.type,e.stateNode);else e.stateNode=Id(s,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?t0(s,e.type,e.stateNode):Id(s,l,e.memoizedProps)):l===null&&e.stateNode!==null&&tc(e,e.memoizedProps,a.memoizedProps)}break;case 27:rt(t,e),ct(e),l&512&&(Qe||a===null||Xt(a,a.return)),a!==null&&l&4&&tc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(rt(t,e),ct(e),l&512&&(Qe||a===null||Xt(a,a.return)),e.flags&32){s=e.stateNode;try{ol(s,"")}catch(K){Ee(e,e.return,K)}}l&4&&e.stateNode!=null&&(s=e.memoizedProps,tc(e,s,a!==null?a.memoizedProps:s)),l&1024&&(nc=!0);break;case 6:if(rt(t,e),ct(e),l&4){if(e.stateNode===null)throw Error(c(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(K){Ee(e,e.return,K)}}break;case 3:if(ni=null,s=Ht,Ht=ai(t.containerInfo),rt(t,e),Ht=s,ct(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Gl(t.containerInfo)}catch(K){Ee(e,e.return,K)}nc&&(nc=!1,td(e));break;case 4:l=Ht,Ht=ai(e.stateNode.containerInfo),rt(t,e),ct(e),Ht=l;break;case 12:rt(t,e),ct(e);break;case 31:rt(t,e),ct(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xs(e,l)));break;case 13:rt(t,e),ct(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Vs=mt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xs(e,l)));break;case 22:s=e.memoizedState!==null;var j=a!==null&&a.memoizedState!==null,z=aa,L=Qe;if(aa=z||s,Qe=L||j,rt(t,e),Qe=L,aa=z,ct(e),l&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||j||aa||Qe||al(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){j=a=t;try{if(i=j.stateNode,s)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=j.stateNode;var q=j.memoizedProps.style,R=q!=null&&q.hasOwnProperty("display")?q.display:null;h.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(K){Ee(j,j.return,K)}}}else if(t.tag===6){if(a===null){j=t;try{j.stateNode.nodeValue=s?"":j.memoizedProps}catch(K){Ee(j,j.return,K)}}}else if(t.tag===18){if(a===null){j=t;try{var w=j.stateNode;s?Vd(w,!0):Vd(j.stateNode,!1)}catch(K){Ee(j,j.return,K)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Xs(e,a))));break;case 19:rt(t,e),ct(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xs(e,l)));break;case 30:break;case 21:break;default:rt(t,e),ct(e)}}function ct(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Zf(l)){a=l;break}l=l.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var s=a.stateNode,i=ac(e);Gs(e,i,s);break;case 5:var o=a.stateNode;a.flags&32&&(ol(o,""),a.flags&=-33);var h=ac(e);Gs(e,h,o);break;case 3:case 4:var j=a.stateNode.containerInfo,z=ac(e);lc(e,z,j);break;default:throw Error(c(161))}}catch(L){Ee(e,e.return,L)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function td(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;td(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function na(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Jf(e,t.alternate,t),t=t.sibling}function al(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Sa(4,t,t.return),al(t);break;case 1:Xt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Vf(t,t.return,a),al(t);break;case 27:Un(t.stateNode);case 26:case 5:Xt(t,t.return),al(t);break;case 22:t.memoizedState===null&&al(t);break;case 30:al(t);break;default:al(t)}e=e.sibling}}function sa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,s=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:sa(s,i,a),Cn(4,i);break;case 1:if(sa(s,i,a),l=i,s=l.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(z){Ee(l,l.return,z)}if(l=i,s=l.updateQueue,s!==null){var h=l.stateNode;try{var j=s.shared.hiddenCallbacks;if(j!==null)for(s.shared.hiddenCallbacks=null,s=0;s<j.length;s++)_o(j[s],h)}catch(z){Ee(l,l.return,z)}}a&&o&64&&Qf(i),Tn(i,i.return);break;case 27:kf(i);case 26:case 5:sa(s,i,a),a&&l===null&&o&4&&$f(i),Tn(i,i.return);break;case 12:sa(s,i,a);break;case 31:sa(s,i,a),a&&o&4&&Pf(s,i);break;case 13:sa(s,i,a),a&&o&4&&If(s,i);break;case 22:i.memoizedState===null&&sa(s,i,a),Tn(i,i.return);break;case 30:break;default:sa(s,i,a)}t=t.sibling}}function sc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&dn(a))}function ic(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dn(e))}function Bt(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ad(e,t,a,l),t=t.sibling}function ad(e,t,a,l){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Bt(e,t,a,l),s&2048&&Cn(9,t);break;case 1:Bt(e,t,a,l);break;case 3:Bt(e,t,a,l),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dn(e)));break;case 12:if(s&2048){Bt(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){Ee(t,t.return,j)}}else Bt(e,t,a,l);break;case 31:Bt(e,t,a,l);break;case 13:Bt(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?Bt(e,t,a,l):An(e,t):i._visibility&2?Bt(e,t,a,l):(i._visibility|=2,Rl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),s&2048&&sc(o,t);break;case 24:Bt(e,t,a,l),s&2048&&ic(t.alternate,t);break;default:Bt(e,t,a,l)}}function Rl(e,t,a,l,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,h=a,j=l,z=o.flags;switch(o.tag){case 0:case 11:case 15:Rl(i,o,h,j,s),Cn(8,o);break;case 23:break;case 22:var L=o.stateNode;o.memoizedState!==null?L._visibility&2?Rl(i,o,h,j,s):An(i,o):(L._visibility|=2,Rl(i,o,h,j,s)),s&&z&2048&&sc(o.alternate,o);break;case 24:Rl(i,o,h,j,s),s&&z&2048&&ic(o.alternate,o);break;default:Rl(i,o,h,j,s)}t=t.sibling}}function An(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,s=l.flags;switch(l.tag){case 22:An(a,l),s&2048&&sc(l.alternate,l);break;case 24:An(a,l),s&2048&&ic(l.alternate,l);break;default:An(a,l)}t=t.sibling}}var Mn=8192;function _l(e,t,a){if(e.subtreeFlags&Mn)for(e=e.child;e!==null;)ld(e,t,a),e=e.sibling}function ld(e,t,a){switch(e.tag){case 26:_l(e,t,a),e.flags&Mn&&e.memoizedState!==null&&Ah(a,Ht,e.memoizedState,e.memoizedProps);break;case 5:_l(e,t,a);break;case 3:case 4:var l=Ht;Ht=ai(e.stateNode.containerInfo),_l(e,t,a),Ht=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Mn,Mn=16777216,_l(e,t,a),Mn=l):_l(e,t,a));break;default:_l(e,t,a)}}function nd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function zn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Ke=l,id(l,e)}nd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)sd(e),e=e.sibling}function sd(e){switch(e.tag){case 0:case 11:case 15:zn(e),e.flags&2048&&Sa(9,e,e.return);break;case 3:zn(e);break;case 12:zn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qs(e)):zn(e);break;default:zn(e)}}function Qs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Ke=l,id(l,e)}nd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Sa(8,t,t.return),Qs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Qs(t));break;default:Qs(t)}e=e.sibling}}function id(e,t){for(;Ke!==null;){var a=Ke;switch(a.tag){case 0:case 11:case 15:Sa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:dn(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Ke=l;else e:for(a=e;Ke!==null;){l=Ke;var s=l.sibling,i=l.return;if(Wf(l),l===a){Ke=null;break e}if(s!==null){s.return=i,Ke=s;break e}Ke=i}}}var Xx={getCacheForType:function(e){var t=Pe(Ye),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Pe(Ye).controller.signal}},Qx=typeof WeakMap=="function"?WeakMap:Map,be=0,Me=null,me=null,he=0,Se=0,bt=null,Ea=!1,wl=!1,rc=!1,ia=0,Ue=0,Ca=0,ll=0,cc=0,jt=0,Dl=0,Rn=null,ut=null,uc=!1,Vs=0,rd=0,$s=1/0,Zs=null,Ta=null,$e=0,Aa=null,Ol=null,ra=0,oc=0,fc=null,cd=null,_n=0,dc=null;function Nt(){return(be&2)!==0&&he!==0?he&-he:U.T!==null?pc():Nu()}function ud(){if(jt===0)if((he&536870912)===0||ye){var e=es;es<<=1,(es&3932160)===0&&(es=262144),jt=e}else jt=536870912;return e=pt.current,e!==null&&(e.flags|=32),jt}function ot(e,t,a){(e===Me&&(Se===2||Se===9)||e.cancelPendingCommit!==null)&&(Ul(e,0),Ma(e,he,jt,!1)),Fl(e,a),((be&2)===0||e!==Me)&&(e===Me&&((be&2)===0&&(ll|=a),Ue===4&&Ma(e,he,jt,!1)),Qt(e))}function od(e,t,a){if((be&6)!==0)throw Error(c(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Wl(e,t),s=l?Zx(e,t):xc(e,t,!0),i=l;do{if(s===0){wl&&!l&&Ma(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!Vx(a)){s=xc(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;s=Rn;var j=h.current.memoizedState.isDehydrated;if(j&&(Ul(h,o).flags|=256),o=xc(h,o,!1),o!==2){if(rc&&!j){h.errorRecoveryDisabledLanes|=i,ll|=i,s=4;break e}i=ut,ut=s,i!==null&&(ut===null?ut=i:ut.push.apply(ut,i))}s=o}if(i=!1,s!==2)continue}}if(s===1){Ul(e,0),Ma(e,t,0,!0);break}e:{switch(l=e,i=s,i){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Ma(l,t,jt,!Ea);break e;case 2:ut=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(s=Vs+300-mt(),10<s)){if(Ma(l,t,jt,!Ea),as(l,0,!0)!==0)break e;ra=t,l.timeoutHandle=Gd(fd.bind(null,l,a,ut,Zs,uc,t,jt,ll,Dl,Ea,i,"Throttled",-0,0),s);break e}fd(l,a,ut,Zs,uc,t,jt,ll,Dl,Ea,i,null,-0,0)}}break}while(!0);Qt(e)}function fd(e,t,a,l,s,i,o,h,j,z,L,q,R,w){if(e.timeoutHandle=-1,q=t.subtreeFlags,q&8192||(q&16785408)===16785408){q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},ld(t,i,q);var K=(i&62914560)===i?Vs-mt():(i&4194048)===i?rd-mt():0;if(K=Mh(q,K),K!==null){ra=i,e.cancelPendingCommit=K(vd.bind(null,e,t,i,a,l,s,o,h,j,L,q,null,R,w)),Ma(e,i,o,!z);return}}vd(e,t,i,a,l,s,o,h,j)}function Vx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var s=a[l],i=s.getSnapshot;s=s.value;try{if(!gt(i(),s))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Ma(e,t,a,l){t&=~cc,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var s=t;0<s;){var i=31-ht(s),o=1<<i;l[i]=-1,s&=~o}a!==0&&vu(e,a,t)}function ks(){return(be&6)===0?(wn(0),!1):!0}function mc(){if(me!==null){if(Se===0)var e=me.return;else e=me,Wt=Ka=null,zr(e),Cl=null,xn=0,e=me;for(;e!==null;)Xf(e.alternate,e),e=e.return;me=null}}function Ul(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,oh(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ra=0,mc(),Me=e,me=a=Kt(e.current,null),he=t,Se=0,bt=null,Ea=!1,wl=Wl(e,t),rc=!1,Dl=jt=cc=ll=Ca=Ue=0,ut=Rn=null,uc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var s=31-ht(l),i=1<<s;t|=e[s],l&=~i}return ia=t,xs(),a}function dd(e,t){ue=null,U.H=Nn,t===El||t===Ns?(t=Ao(),Se=3):t===yr?(t=Ao(),Se=4):Se=t===$r?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bt=t,me===null&&(Ue=1,Ls(e,Mt(t,e.current)))}function md(){var e=pt.current;return e===null?!0:(he&4194048)===he?wt===null:(he&62914560)===he||(he&536870912)!==0?e===wt:!1}function xd(){var e=U.H;return U.H=Nn,e===null?Nn:e}function hd(){var e=U.A;return U.A=Xx,e}function Ks(){Ue=4,Ea||(he&4194048)!==he&&pt.current!==null||(wl=!0),(Ca&134217727)===0&&(ll&134217727)===0||Me===null||Ma(Me,he,jt,!1)}function xc(e,t,a){var l=be;be|=2;var s=xd(),i=hd();(Me!==e||he!==t)&&(Zs=null,Ul(e,t)),t=!1;var o=Ue;e:do try{if(Se!==0&&me!==null){var h=me,j=bt;switch(Se){case 8:mc(),o=6;break e;case 3:case 2:case 9:case 6:pt.current===null&&(t=!0);var z=Se;if(Se=0,bt=null,Ll(e,h,j,z),a&&wl){o=0;break e}break;default:z=Se,Se=0,bt=null,Ll(e,h,j,z)}}$x(),o=Ue;break}catch(L){dd(e,L)}while(!0);return t&&e.shellSuspendCounter++,Wt=Ka=null,be=l,U.H=s,U.A=i,me===null&&(Me=null,he=0,xs()),o}function $x(){for(;me!==null;)gd(me)}function Zx(e,t){var a=be;be|=2;var l=xd(),s=hd();Me!==e||he!==t?(Zs=null,$s=mt()+500,Ul(e,t)):wl=Wl(e,t);e:do try{if(Se!==0&&me!==null){t=me;var i=bt;t:switch(Se){case 1:Se=0,bt=null,Ll(e,t,i,1);break;case 2:case 9:if(Co(i)){Se=0,bt=null,yd(t);break}t=function(){Se!==2&&Se!==9||Me!==e||(Se=7),Qt(e)},i.then(t,t);break e;case 3:Se=7;break e;case 4:Se=5;break e;case 7:Co(i)?(Se=0,bt=null,yd(t)):(Se=0,bt=null,Ll(e,t,i,7));break;case 5:var o=null;switch(me.tag){case 26:o=me.memoizedState;case 5:case 27:var h=me;if(o?a0(o):h.stateNode.complete){Se=0,bt=null;var j=h.sibling;if(j!==null)me=j;else{var z=h.return;z!==null?(me=z,Js(z)):me=null}break t}}Se=0,bt=null,Ll(e,t,i,5);break;case 6:Se=0,bt=null,Ll(e,t,i,6);break;case 8:mc(),Ue=6;break e;default:throw Error(c(462))}}kx();break}catch(L){dd(e,L)}while(!0);return Wt=Ka=null,U.H=l,U.A=s,be=a,me!==null?0:(Me=null,he=0,xs(),Ue)}function kx(){for(;me!==null&&!gm();)gd(me)}function gd(e){var t=Yf(e.alternate,e,ia);e.memoizedProps=e.pendingProps,t===null?Js(e):me=t}function yd(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Of(a,t,t.pendingProps,t.type,void 0,he);break;case 11:t=Of(a,t,t.pendingProps,t.type.render,t.ref,he);break;case 5:zr(t);default:Xf(a,t),t=me=xo(t,ia),t=Yf(a,t,ia)}e.memoizedProps=e.pendingProps,t===null?Js(e):me=t}function Ll(e,t,a,l){Wt=Ka=null,zr(t),Cl=null,xn=0;var s=t.return;try{if(Ux(e,s,t,a,he)){Ue=1,Ls(e,Mt(a,e.current)),me=null;return}}catch(i){if(s!==null)throw me=s,i;Ue=1,Ls(e,Mt(a,e.current)),me=null;return}t.flags&32768?(ye||l===1?e=!0:wl||(he&536870912)!==0?e=!1:(Ea=e=!0,(l===2||l===9||l===3||l===6)&&(l=pt.current,l!==null&&l.tag===13&&(l.flags|=16384))),pd(t,e)):Js(t)}function Js(e){var t=e;do{if((t.flags&32768)!==0){pd(t,Ea);return}e=t.return;var a=Bx(t.alternate,t,ia);if(a!==null){me=a;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);Ue===0&&(Ue=5)}function pd(e,t){do{var a=qx(e.alternate,e);if(a!==null){a.flags&=32767,me=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){me=e;return}me=e=a}while(e!==null);Ue=6,me=null}function vd(e,t,a,l,s,i,o,h,j){e.cancelPendingCommit=null;do Ws();while($e!==0);if((be&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(i=t.lanes|t.childLanes,i|=ar,Tm(e,a,i,o,h,j),e===Me&&(me=Me=null,he=0),Ol=t,Aa=e,ra=a,oc=i,fc=s,cd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Fx(Pn,function(){return Ed(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,s=V.p,V.p=2,o=be,be|=4;try{Yx(e,t,a)}finally{be=o,V.p=s,U.T=l}}$e=1,bd(),jd(),Nd()}}function bd(){if($e===1){$e=0;var e=Aa,t=Ol,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var l=V.p;V.p=2;var s=be;be|=4;try{ed(t,e);var i=Tc,o=no(e.containerInfo),h=i.focusedElem,j=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&lo(h.ownerDocument.documentElement,h)){if(j!==null&&Fi(h)){var z=j.start,L=j.end;if(L===void 0&&(L=z),"selectionStart"in h)h.selectionStart=z,h.selectionEnd=Math.min(L,h.value.length);else{var q=h.ownerDocument||document,R=q&&q.defaultView||window;if(R.getSelection){var w=R.getSelection(),K=h.textContent.length,ae=Math.min(j.start,K),Ae=j.end===void 0?ae:Math.min(j.end,K);!w.extend&&ae>Ae&&(o=Ae,Ae=ae,ae=o);var C=ao(h,ae),S=ao(h,Ae);if(C&&S&&(w.rangeCount!==1||w.anchorNode!==C.node||w.anchorOffset!==C.offset||w.focusNode!==S.node||w.focusOffset!==S.offset)){var M=q.createRange();M.setStart(C.node,C.offset),w.removeAllRanges(),ae>Ae?(w.addRange(M),w.extend(S.node,S.offset)):(M.setEnd(S.node,S.offset),w.addRange(M))}}}}for(q=[],w=h;w=w.parentNode;)w.nodeType===1&&q.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<q.length;h++){var H=q[h];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}ci=!!Cc,Tc=Cc=null}finally{be=s,V.p=l,U.T=a}}e.current=t,$e=2}}function jd(){if($e===2){$e=0;var e=Aa,t=Ol,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var l=V.p;V.p=2;var s=be;be|=4;try{Jf(e,t.alternate,t)}finally{be=s,V.p=l,U.T=a}}$e=3}}function Nd(){if($e===4||$e===3){$e=0,ym();var e=Aa,t=Ol,a=ra,l=cd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?$e=5:($e=0,Ol=Aa=null,Sd(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ta=null),wi(a),t=t.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(Jl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=U.T,s=V.p,V.p=2,U.T=null;try{for(var i=e.onRecoverableError,o=0;o<l.length;o++){var h=l[o];i(h.value,{componentStack:h.stack})}}finally{U.T=t,V.p=s}}(ra&3)!==0&&Ws(),Qt(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===dc?_n++:(_n=0,dc=e):_n=0,wn(0)}}function Sd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,dn(t)))}function Ws(){return bd(),jd(),Nd(),Ed()}function Ed(){if($e!==5)return!1;var e=Aa,t=oc;oc=0;var a=wi(ra),l=U.T,s=V.p;try{V.p=32>a?32:a,U.T=null,a=fc,fc=null;var i=Aa,o=ra;if($e=0,Ol=Aa=null,ra=0,(be&6)!==0)throw Error(c(331));var h=be;if(be|=4,sd(i.current),ad(i,i.current,o,a),be=h,wn(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(Jl,i)}catch{}return!0}finally{V.p=s,U.T=l,Sd(e,t)}}function Cd(e,t,a){t=Mt(a,t),t=Vr(e.stateNode,t,2),e=ba(e,t,2),e!==null&&(Fl(e,2),Qt(e))}function Ee(e,t,a){if(e.tag===3)Cd(e,e,a);else for(;t!==null;){if(t.tag===3){Cd(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ta===null||!Ta.has(l))){e=Mt(a,e),a=Tf(2),l=ba(t,a,2),l!==null&&(Af(a,l,t,e),Fl(l,2),Qt(l));break}}t=t.return}}function hc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Qx;var s=new Set;l.set(t,s)}else s=l.get(t),s===void 0&&(s=new Set,l.set(t,s));s.has(a)||(rc=!0,s.add(a),e=Kx.bind(null,e,t,a),t.then(e,e))}function Kx(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Me===e&&(he&a)===a&&(Ue===4||Ue===3&&(he&62914560)===he&&300>mt()-Vs?(be&2)===0&&Ul(e,0):cc|=a,Dl===he&&(Dl=0)),Qt(e)}function Td(e,t){t===0&&(t=pu()),e=$a(e,t),e!==null&&(Fl(e,t),Qt(e))}function Jx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Td(e,a)}function Wx(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(c(314))}l!==null&&l.delete(t),Td(e,a)}function Fx(e,t){return Mi(e,t)}var Fs=null,Hl=null,gc=!1,Ps=!1,yc=!1,za=0;function Qt(e){e!==Hl&&e.next===null&&(Hl===null?Fs=Hl=e:Hl=Hl.next=e),Ps=!0,gc||(gc=!0,Ix())}function wn(e,t){if(!yc&&Ps){yc=!0;do for(var a=!1,l=Fs;l!==null;){if(e!==0){var s=l.pendingLanes;if(s===0)var i=0;else{var o=l.suspendedLanes,h=l.pingedLanes;i=(1<<31-ht(42|e)+1)-1,i&=s&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Rd(l,i))}else i=he,i=as(l,l===Me?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Wl(l,i)||(a=!0,Rd(l,i));l=l.next}while(a);yc=!1}}function Px(){Ad()}function Ad(){Ps=gc=!1;var e=0;za!==0&&uh()&&(e=za);for(var t=mt(),a=null,l=Fs;l!==null;){var s=l.next,i=Md(l,t);i===0?(l.next=null,a===null?Fs=s:a.next=s,s===null&&(Hl=a)):(a=l,(e!==0||(i&3)!==0)&&(Ps=!0)),l=s}$e!==0&&$e!==5||wn(e),za!==0&&(za=0)}function Md(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-ht(i),h=1<<o,j=s[o];j===-1?((h&a)===0||(h&l)!==0)&&(s[o]=Cm(h,t)):j<=t&&(e.expiredLanes|=h),i&=~h}if(t=Me,a=he,a=as(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Se===2||Se===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&zi(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Wl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&zi(l),wi(a)){case 2:case 8:a=gu;break;case 32:a=Pn;break;case 268435456:a=yu;break;default:a=Pn}return l=zd.bind(null,e),a=Mi(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&zi(l),e.callbackPriority=2,e.callbackNode=null,2}function zd(e,t){if($e!==0&&$e!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ws()&&e.callbackNode!==a)return null;var l=he;return l=as(e,e===Me?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(od(e,l,t),Md(e,mt()),e.callbackNode!=null&&e.callbackNode===a?zd.bind(null,e):null)}function Rd(e,t){if(Ws())return null;od(e,t,!0)}function Ix(){fh(function(){(be&6)!==0?Mi(hu,Px):Ad()})}function pc(){if(za===0){var e=Nl;e===0&&(e=In,In<<=1,(In&261888)===0&&(In=256)),za=e}return za}function _d(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:is(""+e)}function wd(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function eh(e,t,a,l,s){if(t==="submit"&&a&&a.stateNode===s){var i=_d((s[nt]||null).action),o=l.submitter;o&&(t=(t=o[nt]||null)?_d(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new os("action","action",null,l,s);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(za!==0){var j=o?wd(s,o):new FormData(s);Br(a,{pending:!0,data:j,method:s.method,action:i},null,j)}}else typeof i=="function"&&(h.preventDefault(),j=o?wd(s,o):new FormData(s),Br(a,{pending:!0,data:j,method:s.method,action:i},i,j))},currentTarget:s}]})}}for(var vc=0;vc<tr.length;vc++){var bc=tr[vc],th=bc.toLowerCase(),ah=bc[0].toUpperCase()+bc.slice(1);Lt(th,"on"+ah)}Lt(ro,"onAnimationEnd"),Lt(co,"onAnimationIteration"),Lt(uo,"onAnimationStart"),Lt("dblclick","onDoubleClick"),Lt("focusin","onFocus"),Lt("focusout","onBlur"),Lt(px,"onTransitionRun"),Lt(vx,"onTransitionStart"),Lt(bx,"onTransitionCancel"),Lt(oo,"onTransitionEnd"),cl("onMouseEnter",["mouseout","mouseover"]),cl("onMouseLeave",["mouseout","mouseover"]),cl("onPointerEnter",["pointerout","pointerover"]),cl("onPointerLeave",["pointerout","pointerover"]),Ga("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ga("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ga("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ga("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ga("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ga("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dn="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(" "),lh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dn));function Dd(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],s=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var o=l.length-1;0<=o;o--){var h=l[o],j=h.instance,z=h.currentTarget;if(h=h.listener,j!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=z;try{i(s)}catch(L){ms(L)}s.currentTarget=null,i=j}else for(o=0;o<l.length;o++){if(h=l[o],j=h.instance,z=h.currentTarget,h=h.listener,j!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=z;try{i(s)}catch(L){ms(L)}s.currentTarget=null,i=j}}}}function xe(e,t){var a=t[Di];a===void 0&&(a=t[Di]=new Set);var l=e+"__bubble";a.has(l)||(Od(t,e,2,!1),a.add(l))}function jc(e,t,a){var l=0;t&&(l|=4),Od(a,e,l,t)}var Is="_reactListening"+Math.random().toString(36).slice(2);function Nc(e){if(!e[Is]){e[Is]=!0,Cu.forEach(function(a){a!=="selectionchange"&&(lh.has(a)||jc(a,!1,e),jc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Is]||(t[Is]=!0,jc("selectionchange",!1,t))}}function Od(e,t,a,l){switch(u0(t)){case 2:var s=_h;break;case 8:s=wh;break;default:s=Hc}a=s.bind(null,t,a,e),s=void 0,!Xi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),l?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function Sc(e,t,a,l,s){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var h=l.stateNode.containerInfo;if(h===s)break;if(o===4)for(o=l.return;o!==null;){var j=o.tag;if((j===3||j===4)&&o.stateNode.containerInfo===s)return;o=o.return}for(;h!==null;){if(o=sl(h),o===null)return;if(j=o.tag,j===5||j===6||j===26||j===27){l=i=o;continue e}h=h.parentNode}}l=l.return}Hu(function(){var z=i,L=Yi(a),q=[];e:{var R=fo.get(e);if(R!==void 0){var w=os,K=e;switch(e){case"keypress":if(cs(a)===0)break e;case"keydown":case"keyup":w=Wm;break;case"focusin":K="focus",w=Zi;break;case"focusout":K="blur",w=Zi;break;case"beforeblur":case"afterblur":w=Zi;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":w=Yu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=Bm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=Im;break;case ro:case co:case uo:w=Gm;break;case oo:w=tx;break;case"scroll":case"scrollend":w=Lm;break;case"wheel":w=lx;break;case"copy":case"cut":case"paste":w=Qm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=Xu;break;case"toggle":case"beforetoggle":w=sx}var ae=(t&4)!==0,Ae=!ae&&(e==="scroll"||e==="scrollend"),C=ae?R!==null?R+"Capture":null:R;ae=[];for(var S=z,M;S!==null;){var H=S;if(M=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||M===null||C===null||(H=en(S,C),H!=null&&ae.push(On(S,H,M))),Ae)break;S=S.return}0<ae.length&&(R=new w(R,K,null,a,L),q.push({event:R,listeners:ae}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",R&&a!==qi&&(K=a.relatedTarget||a.fromElement)&&(sl(K)||K[nl]))break e;if((w||R)&&(R=L.window===L?L:(R=L.ownerDocument)?R.defaultView||R.parentWindow:window,w?(K=a.relatedTarget||a.toElement,w=z,K=K?sl(K):null,K!==null&&(Ae=x(K),ae=K.tag,K!==Ae||ae!==5&&ae!==27&&ae!==6)&&(K=null)):(w=null,K=z),w!==K)){if(ae=Yu,H="onMouseLeave",C="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(ae=Xu,H="onPointerLeave",C="onPointerEnter",S="pointer"),Ae=w==null?R:Il(w),M=K==null?R:Il(K),R=new ae(H,S+"leave",w,a,L),R.target=Ae,R.relatedTarget=M,H=null,sl(L)===z&&(ae=new ae(C,S+"enter",K,a,L),ae.target=M,ae.relatedTarget=Ae,H=ae),Ae=H,w&&K)t:{for(ae=nh,C=w,S=K,M=0,H=C;H;H=ae(H))M++;H=0;for(var ee=S;ee;ee=ae(ee))H++;for(;0<M-H;)C=ae(C),M--;for(;0<H-M;)S=ae(S),H--;for(;M--;){if(C===S||S!==null&&C===S.alternate){ae=C;break t}C=ae(C),S=ae(S)}ae=null}else ae=null;w!==null&&Ud(q,R,w,ae,!1),K!==null&&Ae!==null&&Ud(q,Ae,K,ae,!0)}}e:{if(R=z?Il(z):window,w=R.nodeName&&R.nodeName.toLowerCase(),w==="select"||w==="input"&&R.type==="file")var pe=Wu;else if(Ku(R))if(Fu)pe=hx;else{pe=mx;var F=dx}else w=R.nodeName,!w||w.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?z&&Bi(z.elementType)&&(pe=Wu):pe=xx;if(pe&&(pe=pe(e,z))){Ju(q,pe,a,L);break e}F&&F(e,R,z),e==="focusout"&&z&&R.type==="number"&&z.memoizedProps.value!=null&&Hi(R,"number",R.value)}switch(F=z?Il(z):window,e){case"focusin":(Ku(F)||F.contentEditable==="true")&&(xl=F,Pi=z,un=null);break;case"focusout":un=Pi=xl=null;break;case"mousedown":Ii=!0;break;case"contextmenu":case"mouseup":case"dragend":Ii=!1,so(q,a,L);break;case"selectionchange":if(yx)break;case"keydown":case"keyup":so(q,a,L)}var oe;if(Ki)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 ml?Zu(e,a)&&(ge="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ge="onCompositionStart");ge&&(Qu&&a.locale!=="ko"&&(ml||ge!=="onCompositionStart"?ge==="onCompositionEnd"&&ml&&(oe=Bu()):(ma=L,Qi="value"in ma?ma.value:ma.textContent,ml=!0)),F=ei(z,ge),0<F.length&&(ge=new Gu(ge,e,null,a,L),q.push({event:ge,listeners:F}),oe?ge.data=oe:(oe=ku(a),oe!==null&&(ge.data=oe)))),(oe=rx?cx(e,a):ux(e,a))&&(ge=ei(z,"onBeforeInput"),0<ge.length&&(F=new Gu("onBeforeInput","beforeinput",null,a,L),q.push({event:F,listeners:ge}),F.data=oe)),eh(q,e,z,a,L)}Dd(q,t)})}function On(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ei(e,t){for(var a=t+"Capture",l=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=en(e,a),s!=null&&l.unshift(On(e,s,i)),s=en(e,t),s!=null&&l.push(On(e,s,i))),e.tag===3)return l;e=e.return}return[]}function nh(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ud(e,t,a,l,s){for(var i=t._reactName,o=[];a!==null&&a!==l;){var h=a,j=h.alternate,z=h.stateNode;if(h=h.tag,j!==null&&j===l)break;h!==5&&h!==26&&h!==27||z===null||(j=z,s?(z=en(a,i),z!=null&&o.unshift(On(a,z,j))):s||(z=en(a,i),z!=null&&o.push(On(a,z,j)))),a=a.return}o.length!==0&&e.push({event:t,listeners:o})}var sh=/\r\n?/g,ih=/\u0000|\uFFFD/g;function Ld(e){return(typeof e=="string"?e:""+e).replace(sh,`
9
- `).replace(ih,"")}function Hd(e,t){return t=Ld(t),Ld(e)===t}function Te(e,t,a,l,s,i){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||ol(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&ol(e,""+l);break;case"className":ns(e,"class",l);break;case"tabIndex":ns(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ns(e,a,l);break;case"style":Uu(e,l,i);break;case"data":if(t!=="object"){ns(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=is(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(t!=="input"&&Te(e,t,"name",s.name,s,null),Te(e,t,"formEncType",s.formEncType,s,null),Te(e,t,"formMethod",s.formMethod,s,null),Te(e,t,"formTarget",s.formTarget,s,null)):(Te(e,t,"encType",s.encType,s,null),Te(e,t,"method",s.method,s,null),Te(e,t,"target",s.target,s,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=is(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"onScroll":l!=null&&xe("scroll",e);break;case"onScrollEnd":l!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(a=l.__html,a!=null){if(s.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=is(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":xe("beforetoggle",e),xe("toggle",e),ls(e,"popover",l);break;case"xlinkActuate":$t(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":$t(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":$t(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":$t(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":$t(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":$t(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":$t(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":$t(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":$t(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ls(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Om.get(a)||a,ls(e,a,l))}}function Ec(e,t,a,l,s,i){switch(a){case"style":Uu(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(c(61));if(a=l.__html,a!=null){if(s.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"children":typeof l=="string"?ol(e,l):(typeof l=="number"||typeof l=="bigint")&&ol(e,""+l);break;case"onScroll":l!=null&&xe("scroll",e);break;case"onScrollEnd":l!=null&&xe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Tu.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),i=e[nt]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof l=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,s);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ls(e,a,l)}}}function et(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var l=!1,s=!1,i;for(i in a)if(a.hasOwnProperty(i)){var o=a[i];if(o!=null)switch(i){case"src":l=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Te(e,t,i,o,a,null)}}s&&Te(e,t,"srcSet",a.srcSet,a,null),l&&Te(e,t,"src",a.src,a,null);return;case"input":xe("invalid",e);var h=i=o=s=null,j=null,z=null;for(l in a)if(a.hasOwnProperty(l)){var L=a[l];if(L!=null)switch(l){case"name":s=L;break;case"type":o=L;break;case"checked":j=L;break;case"defaultChecked":z=L;break;case"value":i=L;break;case"defaultValue":h=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(c(137,t));break;default:Te(e,t,l,L,a,null)}}_u(e,i,h,j,z,o,s,!1);return;case"select":xe("invalid",e),l=o=i=null;for(s in a)if(a.hasOwnProperty(s)&&(h=a[s],h!=null))switch(s){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":l=h;default:Te(e,t,s,h,a,null)}t=i,a=o,e.multiple=!!l,t!=null?ul(e,!!l,t,!1):a!=null&&ul(e,!!l,a,!0);return;case"textarea":xe("invalid",e),i=s=l=null;for(o in a)if(a.hasOwnProperty(o)&&(h=a[o],h!=null))switch(o){case"value":l=h;break;case"defaultValue":s=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(c(91));break;default:Te(e,t,o,h,a,null)}Du(e,l,s,i);return;case"option":for(j in a)a.hasOwnProperty(j)&&(l=a[j],l!=null)&&(j==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Te(e,t,j,l,a,null));return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(l=0;l<Dn.length;l++)xe(Dn[l],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(z in a)if(a.hasOwnProperty(z)&&(l=a[z],l!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Te(e,t,z,l,a,null)}return;default:if(Bi(t)){for(L in a)a.hasOwnProperty(L)&&(l=a[L],l!==void 0&&Ec(e,t,L,l,a,void 0));return}}for(h in a)a.hasOwnProperty(h)&&(l=a[h],l!=null&&Te(e,t,h,l,a,null))}function rh(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,o=null,h=null,j=null,z=null,L=null;for(w in a){var q=a[w];if(a.hasOwnProperty(w)&&q!=null)switch(w){case"checked":break;case"value":break;case"defaultValue":j=q;default:l.hasOwnProperty(w)||Te(e,t,w,null,l,q)}}for(var R in l){var w=l[R];if(q=a[R],l.hasOwnProperty(R)&&(w!=null||q!=null))switch(R){case"type":i=w;break;case"name":s=w;break;case"checked":z=w;break;case"defaultChecked":L=w;break;case"value":o=w;break;case"defaultValue":h=w;break;case"children":case"dangerouslySetInnerHTML":if(w!=null)throw Error(c(137,t));break;default:w!==q&&Te(e,t,R,w,l,q)}}Li(e,o,h,j,z,L,i,s);return;case"select":w=o=h=R=null;for(i in a)if(j=a[i],a.hasOwnProperty(i)&&j!=null)switch(i){case"value":break;case"multiple":w=j;default:l.hasOwnProperty(i)||Te(e,t,i,null,l,j)}for(s in l)if(i=l[s],j=a[s],l.hasOwnProperty(s)&&(i!=null||j!=null))switch(s){case"value":R=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==j&&Te(e,t,s,i,l,j)}t=h,a=o,l=w,R!=null?ul(e,!!a,R,!1):!!l!=!!a&&(t!=null?ul(e,!!a,t,!0):ul(e,!!a,a?[]:"",!1));return;case"textarea":w=R=null;for(h in a)if(s=a[h],a.hasOwnProperty(h)&&s!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Te(e,t,h,null,l,s)}for(o in l)if(s=l[o],i=a[o],l.hasOwnProperty(o)&&(s!=null||i!=null))switch(o){case"value":R=s;break;case"defaultValue":w=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(c(91));break;default:s!==i&&Te(e,t,o,s,l,i)}wu(e,R,w);return;case"option":for(var K in a)R=a[K],a.hasOwnProperty(K)&&R!=null&&!l.hasOwnProperty(K)&&(K==="selected"?e.selected=!1:Te(e,t,K,null,l,R));for(j in l)R=l[j],w=a[j],l.hasOwnProperty(j)&&R!==w&&(R!=null||w!=null)&&(j==="selected"?e.selected=R&&typeof R!="function"&&typeof R!="symbol":Te(e,t,j,R,l,w));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 ae in a)R=a[ae],a.hasOwnProperty(ae)&&R!=null&&!l.hasOwnProperty(ae)&&Te(e,t,ae,null,l,R);for(z in l)if(R=l[z],w=a[z],l.hasOwnProperty(z)&&R!==w&&(R!=null||w!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(c(137,t));break;default:Te(e,t,z,R,l,w)}return;default:if(Bi(t)){for(var Ae in a)R=a[Ae],a.hasOwnProperty(Ae)&&R!==void 0&&!l.hasOwnProperty(Ae)&&Ec(e,t,Ae,void 0,l,R);for(L in l)R=l[L],w=a[L],!l.hasOwnProperty(L)||R===w||R===void 0&&w===void 0||Ec(e,t,L,R,l,w);return}}for(var C in a)R=a[C],a.hasOwnProperty(C)&&R!=null&&!l.hasOwnProperty(C)&&Te(e,t,C,null,l,R);for(q in l)R=l[q],w=a[q],!l.hasOwnProperty(q)||R===w||R==null&&w==null||Te(e,t,q,R,l,w)}function Bd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ch(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var s=a[l],i=s.transferSize,o=s.initiatorType,h=s.duration;if(i&&h&&Bd(o)){for(o=0,h=s.responseEnd,l+=1;l<a.length;l++){var j=a[l],z=j.startTime;if(z>h)break;var L=j.transferSize,q=j.initiatorType;L&&Bd(q)&&(j=j.responseEnd,o+=L*(j<h?1:(h-z)/(j-z)))}if(--l,t+=8*(i+o)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Cc=null,Tc=null;function ti(e){return e.nodeType===9?e:e.ownerDocument}function qd(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 Yd(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 Ac(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 Mc=null;function uh(){var e=window.event;return e&&e.type==="popstate"?e===Mc?!1:(Mc=e,!0):(Mc=null,!1)}var Gd=typeof setTimeout=="function"?setTimeout:void 0,oh=typeof clearTimeout=="function"?clearTimeout:void 0,Xd=typeof Promise=="function"?Promise:void 0,fh=typeof queueMicrotask=="function"?queueMicrotask:typeof Xd<"u"?function(e){return Xd.resolve(null).then(e).catch(dh)}:Gd;function dh(e){setTimeout(function(){throw e})}function Ra(e){return e==="head"}function Qd(e,t){var a=t,l=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(s),Gl(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Un(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Un(a);for(var i=a.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[Pl]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=o}}else a==="body"&&Un(e.ownerDocument.body);a=s}while(a);Gl(t)}function Vd(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function zc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":zc(a),Oi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function mh(e,t,a,l){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Pl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Dt(e.nextSibling),e===null)break}return null}function xh(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Dt(e.nextSibling),e===null))return null;return e}function $d(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Dt(e.nextSibling),e===null))return null;return e}function Rc(e){return e.data==="$?"||e.data==="$~"}function _c(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function hh(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Dt(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 wc=null;function Zd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Dt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function kd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Kd(e,t,a){switch(t=ti(a),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function Un(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Oi(e)}var Ot=new Map,Jd=new Set;function ai(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ca=V.d;V.d={f:gh,r:yh,D:ph,C:vh,L:bh,m:jh,X:Sh,S:Nh,M:Eh};function gh(){var e=ca.f(),t=ks();return e||t}function yh(e){var t=il(e);t!==null&&t.tag===5&&t.type==="form"?df(t):ca.r(e)}var Bl=typeof document>"u"?null:document;function Wd(e,t,a){var l=Bl;if(l&&typeof t=="string"&&t){var s=Tt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),Jd.has(s)||(Jd.add(s),e={rel:e,crossOrigin:a,href:t},l.querySelector(s)===null&&(t=l.createElement("link"),et(t,"link",e),ke(t),l.head.appendChild(t)))}}function ph(e){ca.D(e),Wd("dns-prefetch",e,null)}function vh(e,t){ca.C(e,t),Wd("preconnect",e,t)}function bh(e,t,a){ca.L(e,t,a);var l=Bl;if(l&&e&&t){var s='link[rel="preload"][as="'+Tt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Tt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Tt(a.imageSizes)+'"]')):s+='[href="'+Tt(e)+'"]';var i=s;switch(t){case"style":i=ql(e);break;case"script":i=Yl(e)}Ot.has(i)||(e=p({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ot.set(i,e),l.querySelector(s)!==null||t==="style"&&l.querySelector(Ln(i))||t==="script"&&l.querySelector(Hn(i))||(t=l.createElement("link"),et(t,"link",e),ke(t),l.head.appendChild(t)))}}function jh(e,t){ca.m(e,t);var a=Bl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Tt(l)+'"][href="'+Tt(e)+'"]',i=s;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Yl(e)}if(!Ot.has(i)&&(e=p({rel:"modulepreload",href:e},t),Ot.set(i,e),a.querySelector(s)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Hn(i)))return}l=a.createElement("link"),et(l,"link",e),ke(l),a.head.appendChild(l)}}}function Nh(e,t,a){ca.S(e,t,a);var l=Bl;if(l&&e){var s=rl(l).hoistableStyles,i=ql(e);t=t||"default";var o=s.get(i);if(!o){var h={loading:0,preload:null};if(o=l.querySelector(Ln(i)))h.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ot.get(i))&&Dc(e,a);var j=o=l.createElement("link");ke(j),et(j,"link",e),j._p=new Promise(function(z,L){j.onload=z,j.onerror=L}),j.addEventListener("load",function(){h.loading|=1}),j.addEventListener("error",function(){h.loading|=2}),h.loading|=4,li(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:h},s.set(i,o)}}}function Sh(e,t){ca.X(e,t);var a=Bl;if(a&&e){var l=rl(a).hoistableScripts,s=Yl(e),i=l.get(s);i||(i=a.querySelector(Hn(s)),i||(e=p({src:e,async:!0},t),(t=Ot.get(s))&&Oc(e,t),i=a.createElement("script"),ke(i),et(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function Eh(e,t){ca.M(e,t);var a=Bl;if(a&&e){var l=rl(a).hoistableScripts,s=Yl(e),i=l.get(s);i||(i=a.querySelector(Hn(s)),i||(e=p({src:e,async:!0,type:"module"},t),(t=Ot.get(s))&&Oc(e,t),i=a.createElement("script"),ke(i),et(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function Fd(e,t,a,l){var s=(s=fe.current)?ai(s):null;if(!s)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=ql(a.href),a=rl(s).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ql(a.href);var i=rl(s).hoistableStyles,o=i.get(e);if(o||(s=s.ownerDocument||s,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=s.querySelector(Ln(e)))&&!i._p&&(o.instance=i,o.state.loading=5),Ot.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ot.set(e,a),i||Ch(s,e,a,o.state))),t&&l===null)throw Error(c(528,""));return o}if(t&&l!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Yl(a),a=rl(s).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function ql(e){return'href="'+Tt(e)+'"'}function Ln(e){return'link[rel="stylesheet"]['+e+"]"}function Pd(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Ch(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),et(t,"link",a),ke(t),e.head.appendChild(t))}function Yl(e){return'[src="'+Tt(e)+'"]'}function Hn(e){return"script[async]"+e}function Id(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Tt(a.href)+'"]');if(l)return t.instance=l,ke(l),l;var s=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ke(l),et(l,"style",s),li(l,a.precedence,e),t.instance=l;case"stylesheet":s=ql(a.href);var i=e.querySelector(Ln(s));if(i)return t.state.loading|=4,t.instance=i,ke(i),i;l=Pd(a),(s=Ot.get(s))&&Dc(l,s),i=(e.ownerDocument||e).createElement("link"),ke(i);var o=i;return o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),et(i,"link",l),t.state.loading|=4,li(i,a.precedence,e),t.instance=i;case"script":return i=Yl(a.src),(s=e.querySelector(Hn(i)))?(t.instance=s,ke(s),s):(l=a,(s=Ot.get(i))&&(l=p({},a),Oc(l,s)),e=e.ownerDocument||e,s=e.createElement("script"),ke(s),et(s,"link",l),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,li(l,a.precedence,e));return t.instance}function li(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=l.length?l[l.length-1]:null,i=s,o=0;o<l.length;o++){var h=l[o];if(h.dataset.precedence===t)i=h;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Dc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Oc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ni=null;function e0(e,t,a){if(ni===null){var l=new Map,s=ni=new Map;s.set(a,l)}else s=ni,l=s.get(a),l||(l=new Map,s.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var i=a[s];if(!(i[Pl]||i[We]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var h=l.get(o);h?h.push(i):l.set(o,[i])}}return l}function t0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Th(e,t,a){if(a===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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 a0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ah(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var s=ql(l.href),i=t.querySelector(Ln(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=si.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,ke(i);return}i=t.ownerDocument||t,l=Pd(l),(s=Ot.get(s))&&Dc(l,s),i=i.createElement("link"),ke(i);var o=i;o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),et(i,"link",l),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=si.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Uc=0;function Mh(e,t){return e.stylesheets&&e.count===0&&ri(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&ri(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Uc===0&&(Uc=62500*ch());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ri(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Uc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(s)}}:null}function si(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ri(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ii=null;function ri(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ii=new Map,t.forEach(zh,e),ii=null,si.call(e))}function zh(e,t){if(!(t.state.loading&4)){var a=ii.get(e);if(a)var l=a.get(null);else{a=new Map,ii.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var o=s[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(a.set(o.dataset.precedence,o),l=o)}l&&a.set(null,l)}s=t.instance,o=s.getAttribute("data-precedence"),i=a.get(o)||l,i===l&&a.set(null,s),a.set(o,s),this.count++,l=si.bind(this),s.addEventListener("load",l),s.addEventListener("error",l),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Bn={$$typeof:Q,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function Rh(e,t,a,l,s,i,o,h,j){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ri(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ri(0),this.hiddenUpdates=Ri(null),this.identifierPrefix=l,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function l0(e,t,a,l,s,i,o,h,j,z,L,q){return e=new Rh(e,t,a,o,j,z,L,q,h),t=1,i===!0&&(t|=24),i=yt(3,null,null,t),e.current=i,i.stateNode=e,t=xr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},pr(i),e}function n0(e){return e?(e=yl,e):yl}function s0(e,t,a,l,s,i){s=n0(s),l.context===null?l.context=s:l.pendingContext=s,l=va(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=ba(e,l,t),a!==null&&(ot(a,e,t),gn(a,e,t))}function i0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Lc(e,t){i0(e,t),(e=e.alternate)&&i0(e,t)}function r0(e){if(e.tag===13||e.tag===31){var t=$a(e,67108864);t!==null&&ot(t,e,67108864),Lc(e,67108864)}}function c0(e){if(e.tag===13||e.tag===31){var t=Nt();t=_i(t);var a=$a(e,t);a!==null&&ot(a,e,t),Lc(e,t)}}var ci=!0;function _h(e,t,a,l){var s=U.T;U.T=null;var i=V.p;try{V.p=2,Hc(e,t,a,l)}finally{V.p=i,U.T=s}}function wh(e,t,a,l){var s=U.T;U.T=null;var i=V.p;try{V.p=8,Hc(e,t,a,l)}finally{V.p=i,U.T=s}}function Hc(e,t,a,l){if(ci){var s=Bc(l);if(s===null)Sc(e,t,l,ui,a),o0(e,l);else if(Oh(s,e,t,a,l))l.stopPropagation();else if(o0(e,l),t&4&&-1<Dh.indexOf(e)){for(;s!==null;){var i=il(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Ya(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var j=1<<31-ht(o);h.entanglements[1]|=j,o&=~j}Qt(i),(be&6)===0&&($s=mt()+500,wn(0))}}break;case 31:case 13:h=$a(i,2),h!==null&&ot(h,i,2),ks(),Lc(i,2)}if(i=Bc(l),i===null&&Sc(e,t,l,ui,a),i===s)break;s=i}s!==null&&l.stopPropagation()}else Sc(e,t,l,null,a)}}function Bc(e){return e=Yi(e),qc(e)}var ui=null;function qc(e){if(ui=null,e=sl(e),e!==null){var t=x(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=g(t),e!==null)return e;e=null}else if(a===31){if(e=b(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ui=e,null}function u0(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(pm()){case hu:return 2;case gu:return 8;case Pn:case vm:return 32;case yu:return 268435456;default:return 32}default:return 32}}var Yc=!1,_a=null,wa=null,Da=null,qn=new Map,Yn=new Map,Oa=[],Dh="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 o0(e,t){switch(e){case"focusin":case"focusout":_a=null;break;case"dragenter":case"dragleave":wa=null;break;case"mouseover":case"mouseout":Da=null;break;case"pointerover":case"pointerout":qn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yn.delete(t.pointerId)}}function Gn(e,t,a,l,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:i,targetContainers:[s]},t!==null&&(t=il(t),t!==null&&r0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Oh(e,t,a,l,s){switch(t){case"focusin":return _a=Gn(_a,e,t,a,l,s),!0;case"dragenter":return wa=Gn(wa,e,t,a,l,s),!0;case"mouseover":return Da=Gn(Da,e,t,a,l,s),!0;case"pointerover":var i=s.pointerId;return qn.set(i,Gn(qn.get(i)||null,e,t,a,l,s)),!0;case"gotpointercapture":return i=s.pointerId,Yn.set(i,Gn(Yn.get(i)||null,e,t,a,l,s)),!0}return!1}function f0(e){var t=sl(e.target);if(t!==null){var a=x(t);if(a!==null){if(t=a.tag,t===13){if(t=g(a),t!==null){e.blockedOn=t,Su(e.priority,function(){c0(a)});return}}else if(t===31){if(t=b(a),t!==null){e.blockedOn=t,Su(e.priority,function(){c0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function oi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Bc(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);qi=l,a.target.dispatchEvent(l),qi=null}else return t=il(a),t!==null&&r0(t),e.blockedOn=a,!1;t.shift()}return!0}function d0(e,t,a){oi(e)&&a.delete(t)}function Uh(){Yc=!1,_a!==null&&oi(_a)&&(_a=null),wa!==null&&oi(wa)&&(wa=null),Da!==null&&oi(Da)&&(Da=null),qn.forEach(d0),Yn.forEach(d0)}function fi(e,t){e.blockedOn===t&&(e.blockedOn=null,Yc||(Yc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Uh)))}var di=null;function m0(e){di!==e&&(di=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){di===e&&(di=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],s=e[t+2];if(typeof l!="function"){if(qc(l||a)===null)continue;break}var i=il(a);i!==null&&(e.splice(t,3),t-=3,Br(i,{pending:!0,data:s,method:a.method,action:l},l,s))}}))}function Gl(e){function t(j){return fi(j,e)}_a!==null&&fi(_a,e),wa!==null&&fi(wa,e),Da!==null&&fi(Da,e),qn.forEach(t),Yn.forEach(t);for(var a=0;a<Oa.length;a++){var l=Oa[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Oa.length&&(a=Oa[0],a.blockedOn===null);)f0(a),a.blockedOn===null&&Oa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var s=a[l],i=a[l+1],o=s[nt]||null;if(typeof i=="function")o||m0(a);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(s=i,o=i[nt]||null)h=o.formAction;else if(qc(s)!==null)continue}else h=o.action;typeof h=="function"?a[l+1]=h:(a.splice(l,3),l-=3),m0(a)}}}function x0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return s=o})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Gc(e){this._internalRoot=e}mi.prototype.render=Gc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,l=Nt();s0(a,l,e,t,null,null)},mi.prototype.unmount=Gc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;s0(e.current,2,null,e,null,null),ks(),t[nl]=null}};function mi(e){this._internalRoot=e}mi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Nu();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Oa.length&&t!==0&&t<Oa[a].priority;a++);Oa.splice(a,0,e),a===0&&f0(e)}};var h0=f.version;if(h0!=="19.2.4")throw Error(c(527,h0,"19.2.4"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=d(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var Lh={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xi.isDisabled&&xi.supportsFiber)try{Jl=xi.inject(Lh),xt=xi}catch{}}return Qn.createRoot=function(e,t){if(!m(e))throw Error(c(299));var a=!1,l="",s=Nf,i=Sf,o=Ef;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=l0(e,1,!1,null,null,a,l,null,s,i,o,x0),e[nl]=t.current,Nc(e),new Gc(t)},Qn.hydrateRoot=function(e,t,a){if(!m(e))throw Error(c(299));var l=!1,s="",i=Nf,o=Sf,h=Ef,j=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(o=a.onCaughtError),a.onRecoverableError!==void 0&&(h=a.onRecoverableError),a.formState!==void 0&&(j=a.formState)),t=l0(e,1,!0,t,a??null,l,s,j,i,o,h,x0),t.context=n0(null),a=t.current,l=Nt(),l=_i(l),s=va(l),s.callback=null,ba(a,s,l),a=l,t.current.lanes=a,Fl(t,a),Qt(t),e[nl]=t.current,Nc(e),new mi(t)},Qn.version="19.2.4",Qn}var C0;function Zh(){if(C0)return Vc.exports;C0=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(f){console.error(f)}}return r(),Vc.exports=$h(),Vc.exports}var kh=Zh();var T0="popstate";function Kh(r={}){function f(c,m){let{pathname:x,search:g,hash:b}=c.location;return Ic("",{pathname:x,search:g,hash:b},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function u(c,m){return typeof m=="string"?m:Zn(m)}return Wh(f,u,null,r)}function we(r,f){if(r===!1||r===null||typeof r>"u")throw new Error(f)}function qt(r,f){if(!r){typeof console<"u"&&console.warn(f);try{throw new Error(f)}catch{}}}function Jh(){return Math.random().toString(36).substring(2,10)}function A0(r,f){return{usr:r.state,key:r.key,idx:f}}function Ic(r,f,u=null,c){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof f=="string"?$l(f):f,state:u,key:f&&f.key||c||Jh()}}function Zn({pathname:r="/",search:f="",hash:u=""}){return f&&f!=="?"&&(r+=f.charAt(0)==="?"?f:"?"+f),u&&u!=="#"&&(r+=u.charAt(0)==="#"?u:"#"+u),r}function $l(r){let f={};if(r){let u=r.indexOf("#");u>=0&&(f.hash=r.substring(u),r=r.substring(0,u));let c=r.indexOf("?");c>=0&&(f.search=r.substring(c),r=r.substring(0,c)),r&&(f.pathname=r)}return f}function Wh(r,f,u,c={}){let{window:m=document.defaultView,v5Compat:x=!1}=c,g=m.history,b="POP",y=null,d=v();d==null&&(d=0,g.replaceState({...g.state,idx:d},""));function v(){return(g.state||{idx:null}).idx}function p(){b="POP";let _=v(),D=_==null?null:_-d;d=_,y&&y({action:b,location:G.location,delta:D})}function T(_,D){b="PUSH";let O=Ic(G.location,_,D);d=v()+1;let Q=A0(O,d),re=G.createHref(O);try{g.pushState(Q,"",re)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;m.location.assign(re)}x&&y&&y({action:b,location:G.location,delta:1})}function A(_,D){b="REPLACE";let O=Ic(G.location,_,D);d=v();let Q=A0(O,d),re=G.createHref(O);g.replaceState(Q,"",re),x&&y&&y({action:b,location:G.location,delta:0})}function X(_){return Fh(_)}let G={get action(){return b},get location(){return r(m,g)},listen(_){if(y)throw new Error("A history only accepts one active listener");return m.addEventListener(T0,p),y=_,()=>{m.removeEventListener(T0,p),y=null}},createHref(_){return f(m,_)},createURL:X,encodeLocation(_){let D=X(_);return{pathname:D.pathname,search:D.search,hash:D.hash}},push:T,replace:A,go(_){return g.go(_)}};return G}function Fh(r,f=!1){let u="http://localhost";typeof window<"u"&&(u=window.location.origin!=="null"?window.location.origin:window.location.href),we(u,"No window.location.(origin|href) available to create URL");let c=typeof r=="string"?r:Zn(r);return c=c.replace(/ $/,"%20"),!f&&c.startsWith("//")&&(c=u+c),new URL(c,u)}function Y0(r,f,u="/"){return Ph(r,f,u,!1)}function Ph(r,f,u,c){let m=typeof f=="string"?$l(f):f,x=oa(m.pathname||"/",u);if(x==null)return null;let g=G0(r);Ih(g);let b=null;for(let y=0;b==null&&y<g.length;++y){let d=og(x);b=cg(g[y],d,c)}return b}function G0(r,f=[],u=[],c="",m=!1){let x=(g,b,y=m,d)=>{let v={relativePath:d===void 0?g.path||"":d,caseSensitive:g.caseSensitive===!0,childrenIndex:b,route:g};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(c)&&y)return;we(v.relativePath.startsWith(c),`Absolute route path "${v.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(c.length)}let p=ua([c,v.relativePath]),T=u.concat(v);g.children&&g.children.length>0&&(we(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),G0(g.children,f,T,p,y)),!(g.path==null&&!g.index)&&f.push({path:p,score:ig(p,g.index),routesMeta:T})};return r.forEach((g,b)=>{if(g.path===""||!g.path?.includes("?"))x(g,b);else for(let y of X0(g.path))x(g,b,!0,y)}),f}function X0(r){let f=r.split("/");if(f.length===0)return[];let[u,...c]=f,m=u.endsWith("?"),x=u.replace(/\?$/,"");if(c.length===0)return m?[x,""]:[x];let g=X0(c.join("/")),b=[];return b.push(...g.map(y=>y===""?x:[x,y].join("/"))),m&&b.push(...g),b.map(y=>r.startsWith("/")&&y===""?"/":y)}function Ih(r){r.sort((f,u)=>f.score!==u.score?u.score-f.score:rg(f.routesMeta.map(c=>c.childrenIndex),u.routesMeta.map(c=>c.childrenIndex)))}var eg=/^:[\w-]+$/,tg=3,ag=2,lg=1,ng=10,sg=-2,M0=r=>r==="*";function ig(r,f){let u=r.split("/"),c=u.length;return u.some(M0)&&(c+=sg),f&&(c+=ag),u.filter(m=>!M0(m)).reduce((m,x)=>m+(eg.test(x)?tg:x===""?lg:ng),c)}function rg(r,f){return r.length===f.length&&r.slice(0,-1).every((c,m)=>c===f[m])?r[r.length-1]-f[f.length-1]:0}function cg(r,f,u=!1){let{routesMeta:c}=r,m={},x="/",g=[];for(let b=0;b<c.length;++b){let y=c[b],d=b===c.length-1,v=x==="/"?f:f.slice(x.length)||"/",p=bi({path:y.relativePath,caseSensitive:y.caseSensitive,end:d},v),T=y.route;if(!p&&d&&u&&!c[c.length-1].route.index&&(p=bi({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},v)),!p)return null;Object.assign(m,p.params),g.push({params:m,pathname:ua([x,p.pathname]),pathnameBase:xg(ua([x,p.pathnameBase])),route:T}),p.pathnameBase!=="/"&&(x=ua([x,p.pathnameBase]))}return g}function bi(r,f){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[u,c]=ug(r.path,r.caseSensitive,r.end),m=f.match(u);if(!m)return null;let x=m[0],g=x.replace(/(.)\/+$/,"$1"),b=m.slice(1);return{params:c.reduce((d,{paramName:v,isOptional:p},T)=>{if(v==="*"){let X=b[T]||"";g=x.slice(0,x.length-X.length).replace(/(.)\/+$/,"$1")}const A=b[T];return p&&!A?d[v]=void 0:d[v]=(A||"").replace(/%2F/g,"/"),d},{}),pathname:x,pathnameBase:g,pattern:r}}function ug(r,f=!1,u=!0){qt(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let c=[],m="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,b,y)=>(c.push({paramName:b,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(c.push({paramName:"*"}),m+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?m+="\\/*$":r!==""&&r!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,f?void 0:"i"),c]}function og(r){try{return r.split("/").map(f=>decodeURIComponent(f).replace(/\//g,"%2F")).join("/")}catch(f){return qt(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${f}).`),r}}function oa(r,f){if(f==="/")return r;if(!r.toLowerCase().startsWith(f.toLowerCase()))return null;let u=f.endsWith("/")?f.length-1:f.length,c=r.charAt(u);return c&&c!=="/"?null:r.slice(u)||"/"}var fg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function dg(r,f="/"){let{pathname:u,search:c="",hash:m=""}=typeof r=="string"?$l(r):r,x;return u?(u=u.replace(/\/\/+/g,"/"),u.startsWith("/")?x=z0(u.substring(1),"/"):x=z0(u,f)):x=f,{pathname:x,search:hg(c),hash:gg(m)}}function z0(r,f){let u=f.replace(/\/+$/,"").split("/");return r.split("/").forEach(m=>{m===".."?u.length>1&&u.pop():m!=="."&&u.push(m)}),u.length>1?u.join("/"):"/"}function Kc(r,f,u,c){return`Cannot include a '${r}' character in a manually specified \`to.${f}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${u}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function mg(r){return r.filter((f,u)=>u===0||f.route.path&&f.route.path.length>0)}function Q0(r){let f=mg(r);return f.map((u,c)=>c===f.length-1?u.pathname:u.pathnameBase)}function V0(r,f,u,c=!1){let m;typeof r=="string"?m=$l(r):(m={...r},we(!m.pathname||!m.pathname.includes("?"),Kc("?","pathname","search",m)),we(!m.pathname||!m.pathname.includes("#"),Kc("#","pathname","hash",m)),we(!m.search||!m.search.includes("#"),Kc("#","search","hash",m)));let x=r===""||m.pathname==="",g=x?"/":m.pathname,b;if(g==null)b=u;else{let p=f.length-1;if(!c&&g.startsWith("..")){let T=g.split("/");for(;T[0]==="..";)T.shift(),p-=1;m.pathname=T.join("/")}b=p>=0?f[p]:"/"}let y=dg(m,b),d=g&&g!=="/"&&g.endsWith("/"),v=(x||g===".")&&u.endsWith("/");return!y.pathname.endsWith("/")&&(d||v)&&(y.pathname+="/"),y}var ua=r=>r.join("/").replace(/\/\/+/g,"/"),xg=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),hg=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,gg=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,yg=class{constructor(r,f,u,c=!1){this.status=r,this.statusText=f||"",this.internal=c,u instanceof Error?(this.data=u.toString(),this.error=u):this.data=u}};function pg(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function vg(r){return r.map(f=>f.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var $0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Z0(r,f){let u=r;if(typeof u!="string"||!fg.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let c=u,m=!1;if($0)try{let x=new URL(window.location.href),g=u.startsWith("//")?new URL(x.protocol+u):new URL(u),b=oa(g.pathname,f);g.origin===x.origin&&b!=null?u=b+g.search+g.hash:m=!0}catch{qt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:m,to:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var k0=["POST","PUT","PATCH","DELETE"];new Set(k0);var bg=["GET",...k0];new Set(bg);var Zl=N.createContext(null);Zl.displayName="DataRouter";var ji=N.createContext(null);ji.displayName="DataRouterState";var jg=N.createContext(!1),K0=N.createContext({isTransitioning:!1});K0.displayName="ViewTransition";var Ng=N.createContext(new Map);Ng.displayName="Fetchers";var Sg=N.createContext(null);Sg.displayName="Await";var Ut=N.createContext(null);Ut.displayName="Navigation";var kn=N.createContext(null);kn.displayName="Location";var Vt=N.createContext({outlet:null,matches:[],isDataRoute:!1});Vt.displayName="Route";var lu=N.createContext(null);lu.displayName="RouteError";var J0="REACT_ROUTER_ERROR",Eg="REDIRECT",Cg="ROUTE_ERROR_RESPONSE";function Tg(r){if(r.startsWith(`${J0}:${Eg}:{`))try{let f=JSON.parse(r.slice(28));if(typeof f=="object"&&f&&typeof f.status=="number"&&typeof f.statusText=="string"&&typeof f.location=="string"&&typeof f.reloadDocument=="boolean"&&typeof f.replace=="boolean")return f}catch{}}function Ag(r){if(r.startsWith(`${J0}:${Cg}:{`))try{let f=JSON.parse(r.slice(40));if(typeof f=="object"&&f&&typeof f.status=="number"&&typeof f.statusText=="string")return new yg(f.status,f.statusText,f.data)}catch{}}function Mg(r,{relative:f}={}){we(Kn(),"useHref() may be used only in the context of a <Router> component.");let{basename:u,navigator:c}=N.useContext(Ut),{hash:m,pathname:x,search:g}=Jn(r,{relative:f}),b=x;return u!=="/"&&(b=x==="/"?u:ua([u,x])),c.createHref({pathname:b,search:g,hash:m})}function Kn(){return N.useContext(kn)!=null}function Ba(){return we(Kn(),"useLocation() may be used only in the context of a <Router> component."),N.useContext(kn).location}var W0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function F0(r){N.useContext(Ut).static||N.useLayoutEffect(r)}function nu(){let{isDataRoute:r}=N.useContext(Vt);return r?Xg():zg()}function zg(){we(Kn(),"useNavigate() may be used only in the context of a <Router> component.");let r=N.useContext(Zl),{basename:f,navigator:u}=N.useContext(Ut),{matches:c}=N.useContext(Vt),{pathname:m}=Ba(),x=JSON.stringify(Q0(c)),g=N.useRef(!1);return F0(()=>{g.current=!0}),N.useCallback((y,d={})=>{if(qt(g.current,W0),!g.current)return;if(typeof y=="number"){u.go(y);return}let v=V0(y,JSON.parse(x),m,d.relative==="path");r==null&&f!=="/"&&(v.pathname=v.pathname==="/"?f:ua([f,v.pathname])),(d.replace?u.replace:u.push)(v,d.state,d)},[f,u,x,m,r])}N.createContext(null);function Rg(){let{matches:r}=N.useContext(Vt),f=r[r.length-1];return f?f.params:{}}function Jn(r,{relative:f}={}){let{matches:u}=N.useContext(Vt),{pathname:c}=Ba(),m=JSON.stringify(Q0(u));return N.useMemo(()=>V0(r,JSON.parse(m),c,f==="path"),[r,m,c,f])}function _g(r,f){return P0(r,f)}function P0(r,f,u,c,m){we(Kn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=N.useContext(Ut),{matches:g}=N.useContext(Vt),b=g[g.length-1],y=b?b.params:{},d=b?b.pathname:"/",v=b?b.pathnameBase:"/",p=b&&b.route;{let O=p&&p.path||"";em(d,!p||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
-
11
- Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let T=Ba(),A;if(f){let O=typeof f=="string"?$l(f):f;we(v==="/"||O.pathname?.startsWith(v),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${v}" but pathname "${O.pathname}" was given in the \`location\` prop.`),A=O}else A=T;let X=A.pathname||"/",G=X;if(v!=="/"){let O=v.replace(/^\//,"").split("/");G="/"+X.replace(/^\//,"").split("/").slice(O.length).join("/")}let _=Y0(r,{pathname:G});qt(p||_!=null,`No routes matched location "${A.pathname}${A.search}${A.hash}" `),qt(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${A.pathname}${A.search}${A.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let D=Lg(_&&_.map(O=>Object.assign({},O,{params:Object.assign({},y,O.params),pathname:ua([v,x.encodeLocation?x.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?v:ua([v,x.encodeLocation?x.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),g,u,c,m);return f&&D?N.createElement(kn.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...A},navigationType:"POP"}},D):D}function wg(){let r=Gg(),f=pg(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),u=r instanceof Error?r.stack:null,c="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:c},x={padding:"2px 4px",backgroundColor:c},g=null;return console.error("Error handled by React Router default ErrorBoundary:",r),g=N.createElement(N.Fragment,null,N.createElement("p",null,"💿 Hey developer 👋"),N.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",N.createElement("code",{style:x},"ErrorBoundary")," or"," ",N.createElement("code",{style:x},"errorElement")," prop on your route.")),N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},f),u?N.createElement("pre",{style:m},u):null,g)}var Dg=N.createElement(wg,null),I0=class extends N.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,f){return f.location!==r.location||f.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:f.error,location:f.location,revalidation:r.revalidation||f.revalidation}}componentDidCatch(r,f){this.props.onError?this.props.onError(r,f):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const u=Ag(r.digest);u&&(r=u)}let f=r!==void 0?N.createElement(Vt.Provider,{value:this.props.routeContext},N.createElement(lu.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?N.createElement(Og,{error:r},f):f}};I0.contextType=jg;var Jc=new WeakMap;function Og({children:r,error:f}){let{basename:u}=N.useContext(Ut);if(typeof f=="object"&&f&&"digest"in f&&typeof f.digest=="string"){let c=Tg(f.digest);if(c){let m=Jc.get(f);if(m)throw m;let x=Z0(c.location,u);if($0&&!Jc.get(f))if(x.isExternal||c.reloadDocument)window.location.href=x.absoluteURL||x.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(x.to,{replace:c.replace}));throw Jc.set(f,g),g}return N.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return r}function Ug({routeContext:r,match:f,children:u}){let c=N.useContext(Zl);return c&&c.static&&c.staticContext&&(f.route.errorElement||f.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=f.route.id),N.createElement(Vt.Provider,{value:r},u)}function Lg(r,f=[],u=null,c=null,m=null){if(r==null){if(!u)return null;if(u.errors)r=u.matches;else if(f.length===0&&!u.initialized&&u.matches.length>0)r=u.matches;else return null}let x=r,g=u?.errors;if(g!=null){let v=x.findIndex(p=>p.route.id&&g?.[p.route.id]!==void 0);we(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(g).join(",")}`),x=x.slice(0,Math.min(x.length,v+1))}let b=!1,y=-1;if(u)for(let v=0;v<x.length;v++){let p=x[v];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(y=v),p.route.id){let{loaderData:T,errors:A}=u,X=p.route.loader&&!T.hasOwnProperty(p.route.id)&&(!A||A[p.route.id]===void 0);if(p.route.lazy||X){b=!0,y>=0?x=x.slice(0,y+1):x=[x[0]];break}}}let d=u&&c?(v,p)=>{c(v,{location:u.location,params:u.matches?.[0]?.params??{},unstable_pattern:vg(u.matches),errorInfo:p})}:void 0;return x.reduceRight((v,p,T)=>{let A,X=!1,G=null,_=null;u&&(A=g&&p.route.id?g[p.route.id]:void 0,G=p.route.errorElement||Dg,b&&(y<0&&T===0?(em("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),X=!0,_=null):y===T&&(X=!0,_=p.route.hydrateFallbackElement||null)));let D=f.concat(x.slice(0,T+1)),O=()=>{let Q;return A?Q=G:X?Q=_:p.route.Component?Q=N.createElement(p.route.Component,null):p.route.element?Q=p.route.element:Q=v,N.createElement(Ug,{match:p,routeContext:{outlet:v,matches:D,isDataRoute:u!=null},children:Q})};return u&&(p.route.ErrorBoundary||p.route.errorElement||T===0)?N.createElement(I0,{location:u.location,revalidation:u.revalidation,component:G,error:A,children:O(),routeContext:{outlet:null,matches:D,isDataRoute:!0},onError:d}):O()},null)}function su(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hg(r){let f=N.useContext(Zl);return we(f,su(r)),f}function Bg(r){let f=N.useContext(ji);return we(f,su(r)),f}function qg(r){let f=N.useContext(Vt);return we(f,su(r)),f}function iu(r){let f=qg(r),u=f.matches[f.matches.length-1];return we(u.route.id,`${r} can only be used on routes that contain a unique "id"`),u.route.id}function Yg(){return iu("useRouteId")}function Gg(){let r=N.useContext(lu),f=Bg("useRouteError"),u=iu("useRouteError");return r!==void 0?r:f.errors?.[u]}function Xg(){let{router:r}=Hg("useNavigate"),f=iu("useNavigate"),u=N.useRef(!1);return F0(()=>{u.current=!0}),N.useCallback(async(m,x={})=>{qt(u.current,W0),u.current&&(typeof m=="number"?await r.navigate(m):await r.navigate(m,{fromRouteId:f,...x}))},[r,f])}var R0={};function em(r,f,u){!f&&!R0[r]&&(R0[r]=!0,qt(!1,u))}N.memo(Qg);function Qg({routes:r,future:f,state:u,onError:c}){return P0(r,void 0,u,c,f)}function lt(r){we(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Vg({basename:r="/",children:f=null,location:u,navigationType:c="POP",navigator:m,static:x=!1,unstable_useTransitions:g}){we(!Kn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let b=r.replace(/^\/*/,"/"),y=N.useMemo(()=>({basename:b,navigator:m,static:x,unstable_useTransitions:g,future:{}}),[b,m,x,g]);typeof u=="string"&&(u=$l(u));let{pathname:d="/",search:v="",hash:p="",state:T=null,key:A="default"}=u,X=N.useMemo(()=>{let G=oa(d,b);return G==null?null:{location:{pathname:G,search:v,hash:p,state:T,key:A},navigationType:c}},[b,d,v,p,T,A,c]);return qt(X!=null,`<Router basename="${b}"> is not able to match the URL "${d}${v}${p}" because it does not start with the basename, so the <Router> won't render anything.`),X==null?null:N.createElement(Ut.Provider,{value:y},N.createElement(kn.Provider,{children:f,value:X}))}function $g({children:r,location:f}){return _g(eu(r),f)}function eu(r,f=[]){let u=[];return N.Children.forEach(r,(c,m)=>{if(!N.isValidElement(c))return;let x=[...f,m];if(c.type===N.Fragment){u.push.apply(u,eu(c.props.children,x));return}we(c.type===lt,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),we(!c.props.index||!c.props.children,"An index route cannot have child routes.");let g={id:c.props.id||x.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(g.children=eu(c.props.children,x)),u.push(g)}),u}var pi="get",vi="application/x-www-form-urlencoded";function Ni(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function Zg(r){return Ni(r)&&r.tagName.toLowerCase()==="button"}function kg(r){return Ni(r)&&r.tagName.toLowerCase()==="form"}function Kg(r){return Ni(r)&&r.tagName.toLowerCase()==="input"}function Jg(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function Wg(r,f){return r.button===0&&(!f||f==="_self")&&!Jg(r)}function tu(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((f,u)=>{let c=r[u];return f.concat(Array.isArray(c)?c.map(m=>[u,m]):[[u,c]])},[]))}function Fg(r,f){let u=tu(r);return f&&f.forEach((c,m)=>{u.has(m)||f.getAll(m).forEach(x=>{u.append(m,x)})}),u}var hi=null;function Pg(){if(hi===null)try{new FormData(document.createElement("form"),0),hi=!1}catch{hi=!0}return hi}var Ig=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wc(r){return r!=null&&!Ig.has(r)?(qt(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vi}"`),null):r}function ey(r,f){let u,c,m,x,g;if(kg(r)){let b=r.getAttribute("action");c=b?oa(b,f):null,u=r.getAttribute("method")||pi,m=Wc(r.getAttribute("enctype"))||vi,x=new FormData(r)}else if(Zg(r)||Kg(r)&&(r.type==="submit"||r.type==="image")){let b=r.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=r.getAttribute("formaction")||b.getAttribute("action");if(c=y?oa(y,f):null,u=r.getAttribute("formmethod")||b.getAttribute("method")||pi,m=Wc(r.getAttribute("formenctype"))||Wc(b.getAttribute("enctype"))||vi,x=new FormData(b,r),!Pg()){let{name:d,type:v,value:p}=r;if(v==="image"){let T=d?`${d}.`:"";x.append(`${T}x`,"0"),x.append(`${T}y`,"0")}else d&&x.append(d,p)}}else{if(Ni(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');u=pi,c=null,m=vi,g=r}return x&&m==="text/plain"&&(g=x,x=void 0),{action:c,method:u.toLowerCase(),encType:m,formData:x,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ru(r,f){if(r===!1||r===null||typeof r>"u")throw new Error(f)}function ty(r,f,u,c){let m=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return u?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${c}`:m.pathname=`${m.pathname}.${c}`:m.pathname==="/"?m.pathname=`_root.${c}`:f&&oa(m.pathname,f)==="/"?m.pathname=`${f.replace(/\/$/,"")}/_root.${c}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${c}`,m}async function ay(r,f){if(r.id in f)return f[r.id];try{let u=await import(r.module);return f[r.id]=u,u}catch(u){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(u),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ly(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function ny(r,f,u){let c=await Promise.all(r.map(async m=>{let x=f.routes[m.route.id];if(x){let g=await ay(x,u);return g.links?g.links():[]}return[]}));return cy(c.flat(1).filter(ly).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function _0(r,f,u,c,m,x){let g=(y,d)=>u[d]?y.route.id!==u[d].route.id:!0,b=(y,d)=>u[d].pathname!==y.pathname||u[d].route.path?.endsWith("*")&&u[d].params["*"]!==y.params["*"];return x==="assets"?f.filter((y,d)=>g(y,d)||b(y,d)):x==="data"?f.filter((y,d)=>{let v=c.routes[y.route.id];if(!v||!v.hasLoader)return!1;if(g(y,d)||b(y,d))return!0;if(y.route.shouldRevalidate){let p=y.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:u[0]?.params||{},nextUrl:new URL(r,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function sy(r,f,{includeHydrateFallback:u}={}){return iy(r.map(c=>{let m=f.routes[c.route.id];if(!m)return[];let x=[m.module];return m.clientActionModule&&(x=x.concat(m.clientActionModule)),m.clientLoaderModule&&(x=x.concat(m.clientLoaderModule)),u&&m.hydrateFallbackModule&&(x=x.concat(m.hydrateFallbackModule)),m.imports&&(x=x.concat(m.imports)),x}).flat(1))}function iy(r){return[...new Set(r)]}function ry(r){let f={},u=Object.keys(r).sort();for(let c of u)f[c]=r[c];return f}function cy(r,f){let u=new Set;return new Set(f),r.reduce((c,m)=>{let x=JSON.stringify(ry(m));return u.has(x)||(u.add(x),c.push({key:x,link:m})),c},[])}function tm(){let r=N.useContext(Zl);return ru(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function uy(){let r=N.useContext(ji);return ru(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var cu=N.createContext(void 0);cu.displayName="FrameworkContext";function am(){let r=N.useContext(cu);return ru(r,"You must render this element inside a <HydratedRouter> element"),r}function oy(r,f){let u=N.useContext(cu),[c,m]=N.useState(!1),[x,g]=N.useState(!1),{onFocus:b,onBlur:y,onMouseEnter:d,onMouseLeave:v,onTouchStart:p}=f,T=N.useRef(null);N.useEffect(()=>{if(r==="render"&&g(!0),r==="viewport"){let G=D=>{D.forEach(O=>{g(O.isIntersecting)})},_=new IntersectionObserver(G,{threshold:.5});return T.current&&_.observe(T.current),()=>{_.disconnect()}}},[r]),N.useEffect(()=>{if(c){let G=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(G)}}},[c]);let A=()=>{m(!0)},X=()=>{m(!1),g(!1)};return u?r!=="intent"?[x,T,{}]:[x,T,{onFocus:Vn(b,A),onBlur:Vn(y,X),onMouseEnter:Vn(d,A),onMouseLeave:Vn(v,X),onTouchStart:Vn(p,A)}]:[!1,T,{}]}function Vn(r,f){return u=>{r&&r(u),u.defaultPrevented||f(u)}}function fy({page:r,...f}){let{router:u}=tm(),c=N.useMemo(()=>Y0(u.routes,r,u.basename),[u.routes,r,u.basename]);return c?N.createElement(my,{page:r,matches:c,...f}):null}function dy(r){let{manifest:f,routeModules:u}=am(),[c,m]=N.useState([]);return N.useEffect(()=>{let x=!1;return ny(r,f,u).then(g=>{x||m(g)}),()=>{x=!0}},[r,f,u]),c}function my({page:r,matches:f,...u}){let c=Ba(),{future:m,manifest:x,routeModules:g}=am(),{basename:b}=tm(),{loaderData:y,matches:d}=uy(),v=N.useMemo(()=>_0(r,f,d,x,c,"data"),[r,f,d,x,c]),p=N.useMemo(()=>_0(r,f,d,x,c,"assets"),[r,f,d,x,c]),T=N.useMemo(()=>{if(r===c.pathname+c.search+c.hash)return[];let G=new Set,_=!1;if(f.forEach(O=>{let Q=x.routes[O.route.id];!Q||!Q.hasLoader||(!v.some(re=>re.route.id===O.route.id)&&O.route.id in y&&g[O.route.id]?.shouldRevalidate||Q.hasClientLoader?_=!0:G.add(O.route.id))}),G.size===0)return[];let D=ty(r,b,m.unstable_trailingSlashAwareDataRequests,"data");return _&&G.size>0&&D.searchParams.set("_routes",f.filter(O=>G.has(O.route.id)).map(O=>O.route.id).join(",")),[D.pathname+D.search]},[b,m.unstable_trailingSlashAwareDataRequests,y,c,x,v,f,r,g]),A=N.useMemo(()=>sy(p,x),[p,x]),X=dy(p);return N.createElement(N.Fragment,null,T.map(G=>N.createElement("link",{key:G,rel:"prefetch",as:"fetch",href:G,...u})),A.map(G=>N.createElement("link",{key:G,rel:"modulepreload",href:G,...u})),X.map(({key:G,link:_})=>N.createElement("link",{key:G,nonce:u.nonce,..._,crossOrigin:_.crossOrigin??u.crossOrigin})))}function xy(...r){return f=>{r.forEach(u=>{typeof u=="function"?u(f):u!=null&&(u.current=f)})}}var hy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{hy&&(window.__reactRouterVersion="7.13.0")}catch{}function gy({basename:r,children:f,unstable_useTransitions:u,window:c}){let m=N.useRef();m.current==null&&(m.current=Kh({window:c,v5Compat:!0}));let x=m.current,[g,b]=N.useState({action:x.action,location:x.location}),y=N.useCallback(d=>{u===!1?b(d):N.startTransition(()=>b(d))},[u]);return N.useLayoutEffect(()=>x.listen(y),[x,y]),N.createElement(Vg,{basename:r,children:f,location:g.location,navigationType:g.action,navigator:x,unstable_useTransitions:u})}var lm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ft=N.forwardRef(function({onClick:f,discover:u="render",prefetch:c="none",relative:m,reloadDocument:x,replace:g,state:b,target:y,to:d,preventScrollReset:v,viewTransition:p,unstable_defaultShouldRevalidate:T,...A},X){let{basename:G,unstable_useTransitions:_}=N.useContext(Ut),D=typeof d=="string"&&lm.test(d),O=Z0(d,G);d=O.to;let Q=Mg(d,{relative:m}),[re,ne,P]=oy(c,A),Z=vy(d,{replace:g,state:b,target:y,preventScrollReset:v,relative:m,viewTransition:p,unstable_defaultShouldRevalidate:T,unstable_useTransitions:_});function k(I){f&&f(I),I.defaultPrevented||Z(I)}let B=N.createElement("a",{...A,...P,href:O.absoluteURL||Q,onClick:O.isExternal||x?f:k,ref:xy(X,ne),target:y,"data-discover":!D&&u==="render"?"true":void 0});return re&&!D?N.createElement(N.Fragment,null,B,N.createElement(fy,{page:Q})):B});ft.displayName="Link";var nm=N.forwardRef(function({"aria-current":f="page",caseSensitive:u=!1,className:c="",end:m=!1,style:x,to:g,viewTransition:b,children:y,...d},v){let p=Jn(g,{relative:d.relative}),T=Ba(),A=N.useContext(ji),{navigator:X,basename:G}=N.useContext(Ut),_=A!=null&&Ey(p)&&b===!0,D=X.encodeLocation?X.encodeLocation(p).pathname:p.pathname,O=T.pathname,Q=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;u||(O=O.toLowerCase(),Q=Q?Q.toLowerCase():null,D=D.toLowerCase()),Q&&G&&(Q=oa(Q,G)||Q);const re=D!=="/"&&D.endsWith("/")?D.length-1:D.length;let ne=O===D||!m&&O.startsWith(D)&&O.charAt(re)==="/",P=Q!=null&&(Q===D||!m&&Q.startsWith(D)&&Q.charAt(D.length)==="/"),Z={isActive:ne,isPending:P,isTransitioning:_},k=ne?f:void 0,B;typeof c=="function"?B=c(Z):B=[c,ne?"active":null,P?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let I=typeof x=="function"?x(Z):x;return N.createElement(ft,{...d,"aria-current":k,className:B,ref:v,style:I,to:g,viewTransition:b},typeof y=="function"?y(Z):y)});nm.displayName="NavLink";var yy=N.forwardRef(({discover:r="render",fetcherKey:f,navigate:u,reloadDocument:c,replace:m,state:x,method:g=pi,action:b,onSubmit:y,relative:d,preventScrollReset:v,viewTransition:p,unstable_defaultShouldRevalidate:T,...A},X)=>{let{unstable_useTransitions:G}=N.useContext(Ut),_=Ny(),D=Sy(b,{relative:d}),O=g.toLowerCase()==="get"?"get":"post",Q=typeof b=="string"&&lm.test(b),re=ne=>{if(y&&y(ne),ne.defaultPrevented)return;ne.preventDefault();let P=ne.nativeEvent.submitter,Z=P?.getAttribute("formmethod")||g,k=()=>_(P||ne.currentTarget,{fetcherKey:f,method:Z,navigate:u,replace:m,state:x,relative:d,preventScrollReset:v,viewTransition:p,unstable_defaultShouldRevalidate:T});G&&u!==!1?N.startTransition(()=>k()):k()};return N.createElement("form",{ref:X,method:O,action:D,onSubmit:c?y:re,...A,"data-discover":!Q&&r==="render"?"true":void 0})});yy.displayName="Form";function py(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sm(r){let f=N.useContext(Zl);return we(f,py(r)),f}function vy(r,{target:f,replace:u,state:c,preventScrollReset:m,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:y}={}){let d=nu(),v=Ba(),p=Jn(r,{relative:x});return N.useCallback(T=>{if(Wg(T,f)){T.preventDefault();let A=u!==void 0?u:Zn(v)===Zn(p),X=()=>d(r,{replace:A,state:c,preventScrollReset:m,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:b});y?N.startTransition(()=>X()):X()}},[v,d,p,u,c,f,r,m,x,g,b,y])}function uu(r){qt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let f=N.useRef(tu(r)),u=N.useRef(!1),c=Ba(),m=N.useMemo(()=>Fg(c.search,u.current?null:f.current),[c.search]),x=nu(),g=N.useCallback((b,y)=>{const d=tu(typeof b=="function"?b(new URLSearchParams(m)):b);u.current=!0,x("?"+d,y)},[x,m]);return[m,g]}var by=0,jy=()=>`__${String(++by)}__`;function Ny(){let{router:r}=sm("useSubmit"),{basename:f}=N.useContext(Ut),u=Yg(),c=r.fetch,m=r.navigate;return N.useCallback(async(x,g={})=>{let{action:b,method:y,encType:d,formData:v,body:p}=ey(x,f);if(g.navigate===!1){let T=g.fetcherKey||jy();await c(T,u,g.action||b,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:v,body:p,formMethod:g.method||y,formEncType:g.encType||d,flushSync:g.flushSync})}else await m(g.action||b,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:v,body:p,formMethod:g.method||y,formEncType:g.encType||d,replace:g.replace,state:g.state,fromRouteId:u,flushSync:g.flushSync,viewTransition:g.viewTransition})},[c,m,f,u])}function Sy(r,{relative:f}={}){let{basename:u}=N.useContext(Ut),c=N.useContext(Vt);we(c,"useFormAction must be used inside a RouteContext");let[m]=c.matches.slice(-1),x={...Jn(r||".",{relative:f})},g=Ba();if(r==null){x.search=g.search;let b=new URLSearchParams(x.search),y=b.getAll("index");if(y.some(v=>v==="")){b.delete("index"),y.filter(p=>p).forEach(p=>b.append("index",p));let v=b.toString();x.search=v?`?${v}`:""}}return(!r||r===".")&&m.route.index&&(x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index"),u!=="/"&&(x.pathname=x.pathname==="/"?u:ua([u,x.pathname])),Zn(x)}function Ey(r,{relative:f}={}){let u=N.useContext(K0);we(u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=sm("useViewTransitionState"),m=Jn(r,{relative:f});if(!u.isTransitioning)return!1;let x=oa(u.currentLocation.pathname,c)||u.currentLocation.pathname,g=oa(u.nextLocation.pathname,c)||u.nextLocation.pathname;return bi(m.pathname,g)!=null||bi(m.pathname,x)!=null}const im=N.createContext({projects:[],activeProject:null,setActiveProject:()=>{},refreshProjects:()=>{}});function kl(){return N.useContext(im)}function Cy(){const[r,f]=N.useState([]),[u,c]=uu(),m=N.useCallback(async()=>{try{const d=await(await fetch("/api/projects")).json();d.ok&&f(d.data||[])}catch{}},[]);N.useEffect(()=>{m()},[m]);const x=u.get("project"),g=x?r.find(y=>y.id===x)||r[0]||null:r[0]||null,b=N.useCallback(y=>{c(d=>(d.set("project",y),d))},[c]);return{projects:r,activeProject:g,setActiveProject:b,refreshProjects:m}}function rm(r){const[f,u]=N.useState(null),[c,m]=N.useState(!0),[x,g]=N.useState(null),[b,y]=N.useState(0),[d,v]=N.useState(null),p=N.useCallback(()=>y(T=>T+1),[]);return N.useEffect(()=>{if(!r){m(!1),u(null);return}let T=!1;m(!0);const A=new AbortController,X=setTimeout(()=>A.abort(),15e3);return fetch(r,{signal:A.signal}).then(G=>{if(!G.ok)throw new Error(`HTTP ${G.status}`);return G.json()}).then(G=>{T||(u(G.data??G),g(null),v(new Date))}).catch(G=>{T||(G.name==="AbortError"?g("Request timed out (15s)"):g(String(G.message||G)))}).finally(()=>{clearTimeout(X),T||m(!1)}),()=>{T=!0,A.abort(),clearTimeout(X)}},[r,b]),{data:f,loading:c,error:x,refetch:p,fetchedAt:d}}function Le(r){const{activeProject:f}=kl(),u=r.includes("?")?"&":"?",c=f?`${r}${u}project=${f.id}`:r;return rm(c)}const ou=N.createContext(null),Ty=["heartbeat","increment-update","analytics-event","cost-update","notification","sync-update","sync-audit","error-detected","config-changed","activity","command-output","command-complete","job-progress"];function Ay({url:r="/api/events",children:f}){const[u,c]=N.useState("connecting"),m=N.useRef(null),x=N.useRef(null),g=N.useRef(new Map),b=N.useCallback(()=>{m.current&&m.current.close(),c("connecting");const d=new EventSource(r);m.current=d;for(const v of Ty)d.addEventListener(v,p=>{try{const T=JSON.parse(p.data),A=g.current.get(v);if(A)for(const X of A)X(T)}catch{}});d.onopen=()=>c("connected"),d.onerror=()=>{d.close(),c("disconnected"),x.current=setTimeout(()=>{m.current===d&&b()},3e3)}},[r]);N.useEffect(()=>(b(),()=>{x.current&&(clearTimeout(x.current),x.current=null),m.current?.close(),m.current=null}),[b]);const y=N.useCallback((d,v)=>(g.current.has(d)||g.current.set(d,new Set),g.current.get(d).add(v),()=>{const p=g.current.get(d);p&&(p.delete(v),p.size===0&&g.current.delete(d))}),[]);return n.jsx(ou.Provider,{value:{status:u,subscribe:y},children:f})}function St(r,f){const u=N.useContext(ou),c=N.useRef(f);c.current=f,N.useEffect(()=>{if(!u)return;const m=x=>c.current(x);return u.subscribe(r,m)},[u,r])}function My(){return N.useContext(ou)?.status??"disconnected"}const zy=[{path:"/",label:"Overview",icon:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-4 0a1 1 0 01-1-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 01-1 1"},{path:"/increments",label:"Increments",icon:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"},{path:"/analytics",label:"Analytics",icon:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"},{path:"/costs",label:"Costs",icon:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},{path:"/sync",label:"Sync",icon:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"},{path:"/errors",label:"Errors",icon:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"},{path:"/activity",label:"Activity",icon:"M13 10V3L4 14h7v7l9-11h-7z"},{path:"/notifications",label:"Notifications",icon:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",badge:!0},{path:"/config",label:"Config",icon:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z"},{path:"/plugins",label:"Plugins",icon:"M17 14v6m-3-3h6M6 10h2a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2zm10 0h2a2 2 0 002-2V6a2 2 0 00-2-2h-2a2 2 0 00-2 2v2a2 2 0 002 2zM6 20h2a2 2 0 002-2v-2a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2z"},{path:"/repos",label:"Repos",icon:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},{path:"/services",label:"Services",icon:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"}];function Ry({d:r}){return n.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:r})})}function _y(){const{projects:r,activeProject:f,setActiveProject:u}=kl(),[c]=uu(),{data:m}=Le("/api/overview"),[x,g]=N.useState(null),b=N.useCallback(T=>{const A=T;A?.pendingCount!=null&&g(A.pendingCount)},[]);St("notification",b);const y=My(),d=x??m?.notifications?.pendingCount??0,v=c.get("project"),p=T=>v?`${T}?project=${v}`:T;return n.jsxs("aside",{className:"w-56 bg-gray-900 border-r border-gray-800 flex flex-col h-screen sticky top-0",children:[n.jsx("div",{className:"px-4 py-5 border-b border-gray-800",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-8 h-8 bg-indigo-500 rounded-lg flex items-center justify-center",children:n.jsx("span",{className:"text-white font-bold text-sm",children:"SW"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-semibold text-sm",children:"SpecWeave"}),n.jsx("div",{className:"text-gray-500 text-xs",children:"Dashboard"})]})]})}),(r.length>0||v)&&n.jsxs("div",{className:"px-3 py-3 border-b border-gray-800",children:[n.jsx("label",{className:"text-[10px] text-gray-500 uppercase tracking-wider mb-1 block",children:"Project"}),n.jsxs("select",{value:f?.id||v||"",onChange:T=>{T.target.value==="__add__"?window.location.href=p("/config"):u(T.target.value)},className:"w-full bg-gray-800 border border-gray-700 text-gray-300 text-xs rounded-lg px-2 py-1.5 focus:ring-indigo-500 focus:border-indigo-500",children:[r.map(T=>n.jsx("option",{value:T.id,children:T.name},T.id)),v&&!r.find(T=>T.id===v)&&n.jsxs("option",{value:v,children:[decodeURIComponent(v).split(/[-/]/).pop()||v," (not registered)"]}),n.jsx("option",{value:"__add__",children:"+ Add project..."})]})]}),n.jsx("nav",{className:"flex-1 overflow-y-auto py-3 px-2",children:zy.map(T=>n.jsxs(nm,{to:p(T.path),end:T.path==="/",className:({isActive:A})=>`flex items-center gap-3 px-3 py-2 rounded-lg text-sm mb-0.5 transition-colors ${A?"bg-indigo-500/10 text-indigo-400":"text-gray-400 hover:bg-gray-800 hover:text-gray-200"}`,children:[n.jsx(Ry,{d:T.icon}),n.jsx("span",{className:"flex-1",children:T.label}),T.badge&&d>0&&n.jsx("span",{className:"min-w-[18px] h-[18px] px-1 bg-rose-500 text-white text-[10px] font-bold rounded-full flex items-center justify-center",children:d>99?"99+":d})]},T.path))}),n.jsx("div",{className:"px-4 py-3 border-t border-gray-800",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${y==="connected"?"bg-emerald-400 pulse-dot":y==="connecting"?"bg-amber-400 pulse-dot":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-500",children:y==="connected"?"Connected":y==="connecting"?"Connecting...":"Disconnected"})]}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[r.length," project",r.length!==1?"s":""]})]})})]})}function wy(){const{data:r}=rm("/api/health"),{activeProject:f}=kl(),u=f?.name||"Project",c=r?.uptime?Dy(r.uptime):"...";return n.jsxs("header",{className:"h-14 bg-gray-900/50 backdrop-blur border-b border-gray-800 flex items-center justify-between px-6",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("h1",{className:"text-gray-200 font-medium text-sm",children:u}),n.jsx("span",{className:"text-gray-600 text-xs",children:"|"}),n.jsxs("span",{className:"text-gray-500 text-xs",children:["Uptime: ",c]})]}),n.jsx("div",{className:"flex items-center gap-4",children:n.jsxs("span",{className:"text-gray-500 text-xs",children:[r?.connections??0," client",(r?.connections??0)!==1?"s":""]})})]})}function Dy(r){if(r<60)return`${Math.floor(r)}s`;if(r<3600)return`${Math.floor(r/60)}m`;const f=Math.floor(r/3600),u=Math.floor(r%3600/60);return`${f}h ${u}m`}const Oy={indigo:"from-indigo-500/10 to-indigo-500/5 border-indigo-500/20",emerald:"from-emerald-500/10 to-emerald-500/5 border-emerald-500/20",amber:"from-amber-500/10 to-amber-500/5 border-amber-500/20",rose:"from-rose-500/10 to-rose-500/5 border-rose-500/20",cyan:"from-cyan-500/10 to-cyan-500/5 border-cyan-500/20"},Uy={indigo:"text-indigo-400",emerald:"text-emerald-400",amber:"text-amber-400",rose:"text-rose-400",cyan:"text-cyan-400"};function ce({title:r,value:f,subtitle:u,tooltip:c,color:m="indigo"}){return n.jsxs("div",{className:`bg-gradient-to-br ${Oy[m]} border rounded-xl p-4 relative group`,title:c,children:[n.jsx("div",{className:"text-gray-400 text-xs font-medium uppercase tracking-wider mb-2",children:r}),n.jsx("div",{className:`text-2xl font-bold ${Uy[m]}`,children:f}),u&&n.jsx("div",{className:"text-gray-500 text-xs mt-1",children:u}),c&&n.jsxs("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2.5 py-1.5 bg-gray-800 border border-gray-700 rounded-lg text-[10px] text-gray-300 whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none z-10 shadow-lg",children:[c,n.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-px border-4 border-transparent border-t-gray-800"})]})]})}const Ly={active:"#6366f1",completed:"#10b981",paused:"#f59e0b",planning:"#06b6d4",abandoned:"#ef4444",backlog:"#6b7280",ready_for_review:"#8b5cf6"};function Hy(r){return Ly[r]||"#6b7280"}function By({segments:r,size:f=160,centerLabel:u,centerValue:c}){const m=r.reduce((y,d)=>y+d.value,0);if(m===0)return n.jsx("div",{className:"flex items-center justify-center",style:{width:f,height:f},children:n.jsx("span",{className:"text-gray-600 text-xs",children:"No data"})});const x=52,g=2*Math.PI*x;let b=0;return n.jsxs("div",{className:"relative inline-flex items-center justify-center",style:{width:f,height:f},children:[n.jsx("svg",{viewBox:"0 0 128 128",className:"w-full h-full -rotate-90",children:r.map((y,d)=>{const p=y.value/m*g,T=b;return b+=p,n.jsx("circle",{cx:"64",cy:"64",r:x,fill:"none",stroke:y.color,strokeWidth:"12",strokeDasharray:`${p} ${g-p}`,strokeDashoffset:-T,className:"transition-all duration-500"},d)})}),n.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[c!=null&&n.jsx("span",{className:"text-xl font-bold text-white",children:c}),u&&n.jsx("span",{className:"text-[10px] text-gray-500 uppercase tracking-wider",children:u})]})]})}function qy(r){return Object.entries(r).filter(([f,u])=>u>0).map(([f,u])=>({label:f,value:u,color:Hy(f)}))}const Yy={default:"bg-gray-800 text-gray-300",success:"bg-emerald-500/15 text-emerald-400",warning:"bg-amber-500/15 text-amber-400",error:"bg-rose-500/15 text-rose-400",info:"bg-cyan-500/15 text-cyan-400"};function de({label:r,variant:f="default"}){return n.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-md text-xs font-medium ${Yy[f]}`,children:r})}function Si(r){switch(r){case"active":case"running":return"info";case"completed":case"success":return"success";case"paused":case"pending":case"planning":return"warning";case"failed":case"abandoned":case"error":return"error";default:return"default"}}function Gy({size:r="md"}){const f={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"};return n.jsxs("svg",{className:`${f[r]} animate-spin text-indigo-400`,viewBox:"0 0 24 24",fill:"none",children:[n.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),n.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}function Et(){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsx(Gy,{size:"lg"})})}function w0(r){switch(r){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function Xy(r){switch(r){case"connected":return"Connected";case"sync_failed":return"Sync Failed";case"configured_never_synced":return"Ready";case"not_configured":return"Not Configured";default:return r||"Unknown"}}const Fc=r=>r.billingContext?.planType==="subscription";function Qy(){const{data:r,loading:f,error:u}=Le("/api/overview"),[c,m]=N.useState([]),{activeProject:x}=kl(),g=N.useRef(null);N.useEffect(()=>{if(!x||g.current===x.id)return;g.current=x.id;const d=`project=${x.id}`;fetch(`/api/activity/stream?limit=20&${d}`).then(v=>v.json()).then(v=>{v.ok&&Array.isArray(v.data)&&m(v.data)}).catch(()=>{})},[x]);const b=N.useCallback(d=>{m(v=>[d,...v].slice(0,20))},[]);if(St("activity",b),f)return n.jsx(Et,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});if(!r)return null;const y=qy(r.project.statusBreakdown);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("h2",{className:"text-lg font-semibold text-gray-200",children:[r.project.name||"Project"," Overview"]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ft,{to:"/increments?status=active",className:"group",children:n.jsx(ce,{title:"Active Increments",value:r.project.activeIncrements,subtitle:`${r.project.totalIncrements} total`,color:"indigo"})}),n.jsx(ft,{to:"/increments?status=completed",className:"group",children:n.jsx(ce,{title:"Completed",value:r.project.completedIncrements,subtitle:`${Math.round(r.project.completedIncrements/Math.max(r.project.totalIncrements,1)*100)}% done`,color:"emerald"})}),n.jsx(ft,{to:"/costs",className:"group",children:n.jsx(ce,{title:Fc(r.costs)?"Usage Value":"Total Cost",value:`$${r.costs.totalCost.toFixed(2)}`,subtitle:Fc(r.costs)?`$${r.costs.billingContext?.monthlyAmount??"?"}/mo plan`:`${r.costs.sessionCount.toLocaleString()} sessions`,color:"amber"})}),n.jsx(ft,{to:"/analytics",className:"group",children:n.jsx(ce,{title:"Events Today",value:r.analytics.last24hEvents,subtitle:`${r.analytics.totalEvents.toLocaleString()} total`,color:"cyan"})})]}),n.jsx(Vy,{}),Fc(r.costs)&&n.jsxs("div",{className:"bg-indigo-500/10 border border-indigo-500/20 rounded-xl px-4 py-3 flex items-center gap-3",children:[n.jsx(de,{label:"Subscription",variant:"info"}),n.jsx("span",{className:"text-xs text-gray-300",children:"Costs shown as API-equivalent usage value."})]}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Increment Status"}),n.jsx("div",{className:"flex items-center justify-center",children:n.jsx(By,{segments:y,centerValue:r.project.totalIncrements,centerLabel:"total"})}),n.jsx("div",{className:"flex flex-wrap gap-2 mt-4 justify-center",children:y.map(d=>n.jsxs(ft,{to:`/increments?status=${d.label.toLowerCase()}`,className:"flex items-center gap-1.5 hover:opacity-80 transition-opacity",children:[n.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:d.color}}),n.jsxs("span",{className:"text-xs text-gray-500 hover:text-gray-300",children:[d.label," (",d.value,")"]})]},d.label))})]}),n.jsxs(ft,{to:"/sync",className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5 hover:border-gray-700 transition-colors block",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Sync Health"}),n.jsx("div",{className:"space-y-3",children:Object.entries(r.sync.platforms).length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No sync platforms configured"}):Object.entries(r.sync.platforms).map(([d,v])=>n.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-sm text-gray-300 capitalize",children:d}),v.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:v.configDetail}),!v.configDetail&&v.lastImport&&n.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:["Last: ",new Date(v.lastImport).toLocaleDateString()]})]}),n.jsx(de,{label:Xy(v.connectionStatus||v.lastSyncResult),variant:w0(v.connectionStatus)!=="default"?w0(v.connectionStatus):Si(v.lastSyncResult||"")})]},d))}),n.jsx("div",{className:"mt-4 pt-4 border-t border-gray-800",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:"Notifications"}),n.jsxs("div",{className:"flex gap-2",children:[r.notifications.criticalCount>0&&n.jsx(ft,{to:"/notifications",onClick:d=>d.stopPropagation(),children:n.jsx(de,{label:`${r.notifications.criticalCount} critical`,variant:"error"})}),n.jsx(ft,{to:"/notifications",onClick:d=>d.stopPropagation(),children:n.jsx(de,{label:`${r.notifications.pendingCount} pending`,variant:r.notifications.pendingCount>0?"warning":"default"})})]})]})})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Live Activity"}),n.jsx(ft,{to:"/activity",className:"text-[10px] text-indigo-400 hover:text-indigo-300",children:"View all"})]}),n.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto custom-scrollbar",children:c.length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No recent activity"}):c.map((d,v)=>n.jsxs("div",{className:"flex items-start gap-2 py-1 slide-in",children:[n.jsx("div",{className:`w-1.5 h-1.5 rounded-full mt-1.5 ${d.severity==="error"?"bg-rose-400":d.severity==="warning"?"bg-amber-400":"bg-gray-600"}`}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("div",{className:"text-xs text-gray-400 truncate",children:d.title}),n.jsxs("div",{className:"text-[10px] text-gray-600",children:[d.category,d.timestamp&&` · ${$y(d.timestamp)}`]})]})]},v))})]})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Increment Types"}),n.jsx("div",{className:"flex gap-4 flex-wrap",children:Object.entries(r.project.typeBreakdown).map(([d,v])=>n.jsxs(ft,{to:`/increments?type=${d}`,className:"flex items-center gap-2 px-3 py-2 bg-gray-800/50 rounded-lg hover:bg-gray-800/80 transition-colors",children:[n.jsx("span",{className:"text-sm text-gray-300 capitalize",children:d}),n.jsx("span",{className:"text-xs text-gray-500 bg-gray-800 px-2 py-0.5 rounded",children:v})]},d))})]})]})}function Vy(){const{data:r}=Le("/api/prompt-health");if(!r?.health||r.health.warningLevel==="normal")return null;const{health:f,alert:u}=r,c=u?.level==="emergency",m=f.warningLevel==="critical"||c,x=m?"border-rose-500/30":"border-amber-500/20",g=m?"bg-rose-500/10":"bg-amber-500/10",b=m?"text-rose-400":"text-amber-400",y=Math.round(f.baseline/1e3),d=Math.min(Math.round(f.baseline/2e5*100),100),v=m?"bg-rose-500":"bg-amber-500";return n.jsxs("div",{className:`${g} border ${x} rounded-xl px-4 py-3 space-y-2`,children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(de,{label:m?"Critical":"Warning",variant:m?"error":"warning"}),n.jsxs("span",{className:`text-xs ${b}`,children:["Prompt baseline: ",y,"KB (",d,"% of context window)"]})]}),n.jsx(ft,{to:"/errors",className:"text-[10px] text-gray-500 hover:text-gray-300",children:"Details"})]}),n.jsx("div",{className:"w-full bg-gray-800 rounded-full h-1.5",children:n.jsx("div",{className:`${v} h-1.5 rounded-full`,style:{width:`${d}%`}})}),n.jsxs("div",{className:"flex gap-4 text-[10px] text-gray-500",children:[n.jsxs("span",{children:["CLAUDE.md: ",Math.round(f.claudeMdSize/1e3),"KB"]}),n.jsxs("span",{children:["MEMORY.md: ",Math.round(f.memoryMdSize/1e3),"KB"]}),n.jsxs("span",{children:["Skills: ",Math.round(f.skillBudget/1e3),"KB"]}),u&&n.jsxs("span",{className:b,children:["Compactions: ",u.compactionCount]})]})]})}function $y(r){try{const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return""}}function Ha(r,f=""){const[u,c]=uu(),m=u.get(r)??f,x=N.useCallback(g=>{c(b=>{const y=new URLSearchParams(b);return g&&g!==f?y.set(r,g):y.delete(r),y})},[r,f,c]);return[m,x]}function fu({title:r,description:f}){return n.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[n.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-800 flex items-center justify-center mb-4",children:n.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})})}),n.jsx("h3",{className:"text-gray-400 text-sm font-medium",children:r}),f&&n.jsx("p",{className:"text-gray-600 text-xs mt-1 max-w-xs",children:f})]})}function Zy(){const[r,f]=N.useState(0);St("increment-update",()=>f(A=>A+1));const{data:u,loading:c,error:m}=Le(`/api/increments?_r=${r}`),[x,g]=Ha("status","all"),[b,y]=Ha("type","all"),d=nu();if(c)return n.jsx(Et,{});if(m)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",m]});if(!u)return null;const v=u.increments.filter(A=>!(x!=="all"&&A.status!==x||b!=="all"&&A.type!==b)),p=[...new Set(u.increments.map(A=>A.status))],T=[...new Set(u.increments.map(A=>A.type))];return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Increments"}),n.jsxs("span",{className:"text-sm text-gray-500",children:[u.increments.length," total"]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{className:"text-xs text-gray-500 w-14",children:"Status:"}),n.jsxs("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[n.jsx(gi,{label:"All",active:x==="all",onClick:()=>g("all")}),p.map(A=>n.jsx(gi,{label:A,active:x===A,onClick:()=>g(A),count:u.increments.filter(X=>X.status===A).length},A))]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{className:"text-xs text-gray-500 w-14",children:"Type:"}),n.jsxs("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[n.jsx(gi,{label:"All",active:b==="all",onClick:()=>y("all")}),T.map(A=>n.jsx(gi,{label:A,active:b===A,onClick:()=>y(A),count:u.increments.filter(X=>X.type===A).length},A))]})]}),n.jsxs("span",{className:"text-xs text-gray-500",children:[v.length," matching"]})]}),v.length===0?n.jsx(fu,{title:"No increments match filters",description:"Try adjusting your filters"}):n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"ID"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Title"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Status"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Type"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Priority"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Tasks"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"ACs"}),n.jsx("th",{className:"text-left px-4 py-3 text-xs text-gray-500 font-medium uppercase",children:"Last Activity"})]})}),n.jsx("tbody",{children:v.map(A=>n.jsxs("tr",{onClick:()=>d(`/increments/${A.id}`),className:"border-b border-gray-800/50 hover:bg-gray-800/30 transition-colors cursor-pointer",children:[n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-indigo-400 font-mono",children:A.id})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-sm text-gray-300",children:A.title})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(de,{label:A.status,variant:Si(A.status)})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:A.type})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(ky,{priority:A.priority})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(D0,{completed:A.tasks.completed,total:A.tasks.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(D0,{completed:A.acs.completed,total:A.acs.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-500",children:A.lastActivity?Ky(A.lastActivity):"-"})})]},A.id))})]})})]})}function gi({label:r,active:f,onClick:u,count:c}){return n.jsxs("button",{onClick:u,className:`px-3 py-1 text-xs rounded-md transition-colors capitalize ${f?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:[r,c!==void 0&&n.jsx("span",{className:"ml-1 text-[10px] text-gray-500",children:c})]})}function D0({completed:r,total:f}){const u=f>0?Math.round(r/f*100):0;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-16 h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full bg-indigo-500 rounded-full transition-all",style:{width:`${u}%`}})}),n.jsxs("span",{className:"text-xs text-gray-500",children:[r,"/",f]})]})}function ky({priority:r}){const f={P0:"text-rose-400 bg-rose-500/10",P1:"text-amber-400 bg-amber-500/10",P2:"text-cyan-400 bg-cyan-500/10",P3:"text-gray-400 bg-gray-500/10"};return n.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${f[r]||f.P2}`,children:r})}function Ky(r){try{const f=new Date(r),c=new Date().getTime()-f.getTime(),m=Math.floor(c/6e4);if(m<1)return"Just now";if(m<60)return`${m}m ago`;const x=Math.floor(m/60);if(x<24)return`${x}h ago`;const g=Math.floor(x/24);return g<7?`${g}d ago`:f.toLocaleDateString()}catch{return r}}function Jy(){const[r,f]=N.useState("commands"),[u,c]=N.useState(!1),[m,x]=N.useState(0);St("analytics-event",()=>x(D=>D+1));const{data:g,loading:b,error:y,refetch:d,fetchedAt:v}=Le(`/api/analytics/summary?_r=${m}`),{data:p,loading:T,refetch:A}=Le(`/api/analytics/skills?_r=${m}`);if(b||T)return n.jsx(Et,{});if(y)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",y]});if(!g)return null;const X=g.topCommands?.reduce((D,O)=>D+O.count,0)||0,G=g.topSkills?.reduce((D,O)=>D+O.count,0)||0,_=g.topAgents?.reduce((D,O)=>D+O.count,0)||0;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Analytics"}),n.jsxs("div",{className:"flex items-center gap-3",children:[v&&n.jsxs("span",{className:"text-[10px] text-gray-600",children:["Updated ",v.toLocaleTimeString()]}),n.jsxs("span",{className:"text-sm text-gray-500",children:[g.totalEvents.toLocaleString()," total events"]}),n.jsx("button",{onClick:()=>{c(!0),d(),A(),setTimeout(()=>c(!1),600)},disabled:u,className:"p-1.5 text-gray-500 hover:text-gray-300 hover:bg-gray-800 rounded-lg transition-colors disabled:opacity-50",title:"Refresh analytics",children:n.jsx("svg",{className:`w-4 h-4 ${u?"animate-spin":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Total Events",value:g.totalEvents.toLocaleString(),subtitle:`${g.successRate}% success rate`,color:"indigo",tooltip:`${g.totalEvents} events tracked from analytics JSONL`}),n.jsx(ce,{title:"Commands",value:X.toLocaleString(),subtitle:`${g.topCommands?.length||0} unique`,color:"cyan",tooltip:`${X} total command invocations across ${g.topCommands?.length||0} distinct commands`}),n.jsx(ce,{title:"Skills",value:G.toLocaleString(),subtitle:`${g.topSkills?.length||0} unique`,color:"emerald",tooltip:`${G} total skill activations across ${g.topSkills?.length||0} distinct skills`}),n.jsx(ce,{title:"Agents",value:_.toLocaleString(),subtitle:`${g.topAgents?.length||0} unique`,color:"amber",tooltip:`${_} agent spawns across ${g.topAgents?.length||0} distinct agent types`})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[{key:"commands",label:"Commands"},{key:"skills",label:"Skills"},{key:"agents",label:"Agents"},{key:"daily",label:"Daily Trends"}].map(D=>n.jsx("button",{onClick:()=>f(D.key),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===D.key?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:D.label},D.key))}),r==="commands"&&n.jsx(Wy,{commands:g.topCommands||[]}),r==="skills"&&n.jsx(Fy,{skills:p||[]}),r==="agents"&&n.jsx(Py,{agents:g.topAgents||[]}),r==="daily"&&n.jsx(Iy,{days:g.dailySummaries||[]})]})}function Wy({commands:r}){if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No command data available"})});const f=[...r].sort((c,m)=>m.count-c.count),u=f[0]?.count||1;return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Top Commands"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Command"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Usage"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"})]})}),n.jsx("tbody",{children:f.map((c,m)=>{const x=Math.max(2,c.count/u*100);return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",m+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-sm text-gray-300 font-mono",children:c.name})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"w-full h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-indigo-500/60 transition-all",style:{width:`${x}%`}})})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:c.count.toLocaleString()})]},c.name)})})]})]})}function Fy({skills:r}){const f=[...r].sort((u,c)=>c.count-u.count);return f.length===0?n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No skill usage data available"})}):n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Skill Usage Leaderboard"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Skill Name"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Plugin"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Invocations"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Success Rate"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Last Used"})]})}),n.jsx("tbody",{children:f.map((u,c)=>{const m=u.count>0?Math.round(u.successCount/u.count*100):100,x=m>=90?"success":m>=70?"warning":"error";return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",c+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-sm text-gray-300 font-mono",children:u.name})}),n.jsx("td",{className:"px-4 py-2.5",children:u.plugin&&n.jsx("span",{className:"text-[10px] text-gray-600 bg-gray-800 px-1.5 py-0.5 rounded",children:u.plugin})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:u.count.toLocaleString()}),n.jsx("td",{className:"px-4 py-2.5 text-right",children:n.jsx(de,{label:`${m}%`,variant:x})}),n.jsx("td",{className:"px-4 py-2.5 text-xs text-gray-600 text-right whitespace-nowrap",children:u.lastUsed?ep(u.lastUsed):"-"})]},u.name)})})]})]})}function Py({agents:r}){if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No agent data available"})});const f=[...r].sort((c,m)=>m.count-c.count),u=f[0]?.count||1;return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Top Agents"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-12",children:"Rank"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Agent"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Usage"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"})]})}),n.jsx("tbody",{children:f.map((c,m)=>{const x=Math.max(2,c.count/u*100);return n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsxs("td",{className:"px-4 py-2.5 text-xs text-gray-600",children:["#",m+1]}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("span",{className:"text-sm text-gray-300",children:c.name})}),n.jsx("td",{className:"px-4 py-2.5",children:n.jsx("div",{className:"w-full h-1.5 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-cyan-500/60 transition-all",style:{width:`${x}%`}})})}),n.jsx("td",{className:"px-4 py-2.5 text-sm font-mono text-gray-400 text-right",children:c.count.toLocaleString()})]},c.name)})})]})]})}function Iy({days:r}){const f=r.slice(-14);if(f.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No daily data available"})});const u=Math.max(...f.map(x=>x.totalEvents),1),c=f.reduce((x,g)=>x+g.totalEvents,0),m=Math.round(c/f.length);return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsx(ce,{title:"Period Total",value:c.toLocaleString(),subtitle:`Last ${f.length} days`,color:"indigo"}),n.jsx(ce,{title:"Daily Average",value:m.toLocaleString(),color:"cyan"}),n.jsx(ce,{title:"Peak Day",value:u.toLocaleString(),subtitle:f.find(x=>x.totalEvents===u)?.date||"",color:"emerald"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:["Daily Events (Last ",f.length," Days)"]}),n.jsx("div",{className:"flex items-end gap-1.5 h-40",children:f.map(x=>{const g=Math.max(2,x.totalEvents/u*100),b=x.date.slice(5);return n.jsxs("div",{className:"flex-1 flex flex-col items-center gap-1",children:[n.jsx("span",{className:"text-[9px] text-gray-500",children:x.totalEvents}),n.jsx("div",{className:"w-full bg-indigo-500/40 rounded-t hover:bg-indigo-500/60 transition-colors cursor-default",style:{height:`${g}%`},title:`${x.date}: ${x.totalEvents} events`}),n.jsx("span",{className:"text-[8px] text-gray-700",children:b})]},x.date)})})]})]})}function ep(r){if(!r)return"";try{const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return""}}function cm({items:r,maxBars:f=10}){const u=[...r].sort((m,x)=>x.value-m.value).slice(0,f),c=Math.max(...u.map(m=>m.value),1);return n.jsx("div",{className:"space-y-2",children:u.map((m,x)=>n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"text-xs text-gray-400 w-28 truncate text-right",title:m.label,children:m.label}),n.jsx("div",{className:"flex-1 h-5 bg-gray-800 rounded overflow-hidden",children:n.jsx("div",{className:"h-full rounded transition-all duration-500",style:{width:`${m.value/c*100}%`,backgroundColor:m.color||"#6366f1"}})}),n.jsx("span",{className:"text-xs text-gray-500 w-10 text-right",children:m.value})]},x))})}function tp(){const[r,f]=N.useState("overview"),[u,c]=N.useState(null),[m,x]=N.useState(0);St("cost-update",()=>x(D=>D+1));const{data:g,loading:b,error:y}=Le(`/api/costs/summary?_r=${m}`);if(b)return n.jsx(Et,{});if(y)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",y]});if(!g)return null;const d=g.sessions||[],v=g.billingContext?.planType==="subscription",p=g.modelBreakdown?Object.entries(g.modelBreakdown).map(([D,O])=>({model:D,...O})).sort((D,O)=>O.cost-D.cost):lp(d),T=d.reduce((D,O)=>D+(O.inputTokens||0),0),A=d.reduce((D,O)=>D+(O.outputTokens||0),0),X=d.reduce((D,O)=>D+(O.cacheReadTokens||0),0),G=d.reduce((D,O)=>D+(O.cacheWriteTokens||0),0),_=T+A+X+G;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Token Usage & Costs"}),v&&n.jsxs("div",{className:"bg-indigo-500/10 border border-indigo-500/20 rounded-xl px-4 py-3 flex items-center gap-3",children:[n.jsx(de,{label:"Subscription",variant:"info"}),n.jsxs("span",{className:"text-xs text-gray-300",children:[g.billingContext?.monthlyAmount?`$${g.billingContext.monthlyAmount}/mo plan. `:"","Costs shown as API-equivalent value for usage analytics."]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:v?"API-Equivalent Value":"Total Cost",value:`$${g.totalCost.toFixed(2)}`,subtitle:v&&g.billingContext?.monthlyAmount?`Your plan: $${g.billingContext.monthlyAmount}/mo`:void 0,color:"amber"}),n.jsx(ce,{title:v?"Cache Efficiency":"Cache Savings",value:`$${g.totalSavings.toFixed(2)}`,subtitle:v?"API-equivalent savings from cache":void 0,color:"emerald"}),n.jsx(ce,{title:"Total Tokens",value:Ql(g.totalTokens),subtitle:np(g.totalTokens),color:"indigo"}),n.jsx(ce,{title:"Sessions",value:g.sessionCount.toLocaleString(),color:"cyan"})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["overview","sessions"].map(D=>n.jsx("button",{onClick:()=>f(D),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===D?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:D==="overview"?"Breakdown":`Sessions (${d.length})`},D))}),r==="overview"&&n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:v?"Usage Value by Model":"Cost by Model"}),p.length>0?n.jsx(cm,{items:p.map(D=>({label:D.model,value:parseFloat(D.cost.toFixed(2)),color:"#f59e0b"}))}):n.jsx("p",{className:"text-gray-600 text-xs",children:"No model data"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Token Breakdown"}),n.jsxs("div",{className:"space-y-3",children:[n.jsx(yi,{label:"Input",value:T,total:_,color:"bg-indigo-500"}),n.jsx(yi,{label:"Output",value:A,total:_,color:"bg-cyan-500"}),X>0&&n.jsx(yi,{label:"Cache Read",value:X,total:_,color:"bg-emerald-500"}),G>0&&n.jsx(yi,{label:"Cache Write",value:G,total:_,color:"bg-amber-500"})]})]}),p.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden lg:col-span-2",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Model Details"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Model"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Sessions"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Tokens"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cost"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Avg/Session"})]})}),n.jsx("tbody",{children:p.map(D=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2 text-sm text-gray-300",children:D.model}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:D.sessions.toLocaleString()}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Ql(D.tokens)}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",D.cost.toFixed(2)]}),n.jsxs("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:["$",D.sessions>0?(D.cost/D.sessions).toFixed(4):"0"]})]},D.model))})]})]})]}),r==="sessions"&&n.jsx(ap,{sessions:d,expandedSession:u,onToggle:D=>c(u===D?null:D)})]})}const Pc=30;function ap({sessions:r,expandedSession:f,onToggle:u}){const[c,m]=N.useState(0);if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No session data available"})});const x=Math.ceil(r.length/Pc),g=c*Pc,b=g+Pc,y=r.slice(g,b);return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("div",{className:"px-5 py-3 border-b border-gray-800 flex items-center justify-between",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Recent Sessions"}),n.jsxs("span",{className:"text-xs text-gray-500",children:[g+1,"-",Math.min(b,r.length)," of ",r.length]})]}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500 w-8"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Session"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Model"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Input"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Output"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cache"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Cost"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Duration"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"When"})]})}),n.jsx("tbody",{children:y.map(d=>{const v=d.sessionId||"-",p=f===v,T=(d.cacheReadTokens||0)+(d.cacheWriteTokens||0);return n.jsxs(N.Fragment,{children:[n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30 cursor-pointer",onClick:()=>u(v),children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-600",children:n.jsx("span",{className:`inline-block transition-transform ${p?"rotate-90":""}`,children:"▸"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400 font-mono",children:v.slice(0,8)}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(de,{label:d.model||"unknown",variant:"default"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Ql(d.inputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Ql(d.outputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:T>0?Ql(T):"-"}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",d.cost?.toFixed(4)||"0.0000"]}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:d.duration?O0(d.duration):"-"}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:sp(d.timestamp)})]}),p&&n.jsx("tr",{className:"border-b border-gray-800/50",children:n.jsx("td",{colSpan:9,className:"px-6 py-3 bg-gray-800/20",children:n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-xs",children:[n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Input Tokens"}),n.jsx("span",{className:"text-gray-300 font-mono",children:d.inputTokens.toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Output Tokens"}),n.jsx("span",{className:"text-gray-300 font-mono",children:d.outputTokens.toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Write"}),n.jsx("span",{className:"text-gray-300 font-mono",children:(d.cacheWriteTokens||0).toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Read"}),n.jsx("span",{className:"text-gray-300 font-mono",children:(d.cacheReadTokens||0).toLocaleString()})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cost"}),n.jsxs("span",{className:"text-amber-400 font-mono",children:["$",d.cost?.toFixed(6)||"0"]})]}),d.savings!=null&&d.savings>0&&n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Cache Savings"}),n.jsxs("span",{className:"text-emerald-400 font-mono",children:["$",d.savings.toFixed(6)]})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Duration"}),n.jsx("span",{className:"text-gray-300",children:d.duration?O0(d.duration):"-"})]}),n.jsxs("div",{children:[n.jsx("span",{className:"text-gray-500 block mb-1",children:"Session ID"}),n.jsx("span",{className:"text-gray-400 font-mono text-[10px]",children:d.sessionId})]})]})})})]},v)})})]}),x>1&&n.jsxs("div",{className:"px-5 py-3 border-t border-gray-800 flex items-center justify-between",children:[n.jsx("button",{onClick:()=>m(d=>Math.max(0,d-1)),disabled:c===0,className:"px-3 py-1 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:"Previous"}),n.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(x,7)},(d,v)=>{let p;return x<=7||c<3?p=v:c>x-4?p=x-7+v:p=c-3+v,n.jsx("button",{onClick:()=>m(p),className:`w-7 h-7 text-xs rounded transition-colors ${c===p?"bg-indigo-600 text-white":"text-gray-500 hover:text-gray-300 hover:bg-gray-800"}`,children:p+1},p)})}),n.jsx("button",{onClick:()=>m(d=>Math.min(x-1,d+1)),disabled:c>=x-1,className:"px-3 py-1 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:"Next"})]})]})}function yi({label:r,value:f,total:u,color:c}){const m=u>0?f/u*100:0,x={"bg-indigo-500":"rgb(99 102 241 / 0.6)","bg-cyan-500":"rgb(6 182 212 / 0.6)","bg-emerald-500":"rgb(16 185 129 / 0.6)","bg-amber-500":"rgb(245 158 11 / 0.6)"};return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1",children:[n.jsx("span",{className:"text-xs text-gray-400",children:r}),n.jsxs("span",{className:"text-xs text-gray-500",children:[Ql(f)," (",m.toFixed(1),"%)"]})]}),n.jsx("div",{className:"h-2 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full",style:{width:`${m}%`,backgroundColor:x[c]||c}})})]})}function lp(r){const f=new Map;for(const u of r){const c=u.model||"unknown",m=f.get(c)||{cost:0,tokens:0,sessions:0};m.cost+=u.cost||0,m.tokens+=(u.inputTokens||0)+(u.outputTokens||0),m.sessions++,f.set(c,m)}return Array.from(f.entries()).map(([u,c])=>({model:u,...c})).sort((u,c)=>c.cost-u.cost)}function Ql(r){return r?r>=1e6?`${(r/1e6).toFixed(1)}M`:r>=1e3?`${(r/1e3).toFixed(1)}K`:String(r):"0"}function np(r){return r?r.toLocaleString():"0"}function O0(r){const f=Math.round(r);if(f<60)return`${f}s`;const u=Math.floor(f/60),c=f%60;return u<60?`${u}m ${c}s`:`${Math.floor(u/60)}h ${u%60}m`}function sp(r){if(!r)return"-";try{const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return"-"}}function du(){const[r,f]=N.useState(!1),[u,c]=N.useState(null),[m,x]=N.useState(null),[g,b]=N.useState([]),[y,d]=N.useState("idle"),v=N.useRef(null),p=N.useRef(null);St("command-output",X=>{const G=X;p.current&&G.executionId===p.current&&G.line&&b(_=>[..._,G.line])}),St("command-complete",X=>{const G=X;if(p.current&&G.executionId===p.current){if(v.current&&(clearTimeout(v.current),v.current=null),f(!1),G.exitCode===0)d("success"),b(_=>[..._,"Command completed successfully."]);else{d("error");const _=`Command failed (exit code ${G.exitCode??"unknown"})`;x(_),b(D=>[...D,_])}p.current=null}}),N.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]);const T=N.useCallback(async X=>{f(!0),x(null),b([`> specweave ${X}`]),d("running");try{const _=await(await fetch(`/api/commands/${X}`,{method:"POST"})).json();return _.ok?(c(_.data),p.current=_.data?.id||null,v.current=setTimeout(()=>{p.current&&(p.current=null,f(!1),d("error"),x("Command timed out after 60 seconds"),b(D=>[...D,"Timed out after 60 seconds."]))},6e4),_.data):(x(_.error||"Command failed"),d("error"),b(D=>[...D,`Error: ${_.error||"Command failed"}`]),f(!1),null)}catch(G){return x(String(G)),d("error"),b(_=>[..._,`Error: ${String(G)}`]),f(!1),null}},[]),A=N.useCallback(()=>{f(!1),c(null),x(null),b([]),d("idle"),p.current=null,v.current&&(clearTimeout(v.current),v.current=null)},[]);return{execute:T,running:r,result:u,error:m,output:g,status:y,reset:A}}function ip(r){switch(r){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function rp(r){switch(r){case"connected":return"Connected";case"sync_failed":return"Sync Failed";case"configured_never_synced":return"Ready";case"not_configured":return"Not Configured";default:return r||"Unknown"}}function cp(){const[r,f]=N.useState("health"),[u,c]=N.useState(null),[m,x]=N.useState(0);St("sync-update",()=>x(P=>P+1));const{data:g,loading:b,error:y,refetch:d}=Le(`/api/sync/status?_r=${m}`),{data:v,loading:p}=Le(`/api/sync/audit?limit=100&_r=${m}`),{data:T,loading:A}=Le(`/api/sync/audit/summary?_r=${m}`),{execute:X,running:G}=du(),_=async P=>{c(P);try{const Z=new URLSearchParams(window.location.search).get("project")||"",k=Z?`?platform=${P}&project=${Z}`:`?platform=${P}`;await fetch(`/api/sync/verify${k}`,{method:"POST"}),d()}catch{}c(null)};if(b||p||A)return n.jsx(Et,{});if(y)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",y]});if(!g)return null;const D=Object.entries(g.platforms).filter(([P])=>["github","jira","ado"].includes(P)),O=v?.length||0,Q=v?.filter(P=>P.result==="error").length||0,re=v?.filter(P=>P.conflict)||[],ne=D.filter(([,P])=>P.connectionStatus==="connected").length;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Sync Health"}),n.jsx("button",{onClick:()=>X("sync-push"),disabled:G,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:G?"Syncing...":"Sync Now"})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Platforms",value:D.length,subtitle:`${ne} connected`,color:"indigo"}),n.jsx(ce,{title:"Audit Entries",value:O,color:"cyan"}),n.jsx(ce,{title:"Errors",value:Q,color:"rose"}),n.jsx(ce,{title:"Conflicts",value:re.length,color:"amber"})]}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["health","audit","conflicts"].map(P=>n.jsx("button",{onClick:()=>f(P),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===P?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:P==="health"?"Platform Health":P==="audit"?"Audit Log":`Conflicts (${re.length})`},P))}),r==="health"&&n.jsx(n.Fragment,{children:D.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No sync platforms configured"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"Configure GitHub, JIRA, or ADO in your config"})]}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:D.map(([P,Z])=>{const k=T?.[P],B=Z.connectionStatus||"unknown";return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(um,{platform:P}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm font-medium text-gray-300 capitalize",children:P}),Z.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:Z.configDetail})]})]}),n.jsx(de,{label:rp(B),variant:ip(B)})]}),Z.diagnosticMessage&&n.jsx("div",{className:"text-xs text-gray-500 mb-3 p-2 bg-gray-800/30 rounded-lg",children:Z.diagnosticMessage}),B==="not_configured"&&n.jsx(ft,{to:"/config",className:"block text-center text-xs text-indigo-400 hover:text-indigo-300 py-2 border border-gray-800 rounded-lg hover:border-indigo-500/30 transition-colors",children:"Configure in Settings"}),B==="configured_never_synced"&&n.jsx("button",{onClick:()=>_(P),disabled:u===P,className:"w-full text-xs text-indigo-400 hover:text-indigo-300 py-2 border border-gray-800 rounded-lg hover:border-indigo-500/30 transition-colors disabled:opacity-50",children:u===P?"Verifying...":"Verify Connection"}),B==="sync_failed"&&n.jsx("button",{onClick:()=>_(P),disabled:u===P,className:"w-full text-xs text-amber-400 hover:text-amber-300 py-2 border border-amber-500/20 rounded-lg hover:border-amber-500/40 transition-colors disabled:opacity-50",children:u===P?"Verifying...":"Retry Sync"}),n.jsxs("div",{className:"space-y-2 mt-3",children:[Z.lastImport&&n.jsx(Xl,{label:"Last Import",value:new Date(Z.lastImport).toLocaleString()}),B==="connected"&&!Z.lastImport&&n.jsx(Xl,{label:"Status",value:"Connected, no imports yet"}),Z.lastImportCount!=null&&n.jsx(Xl,{label:"Items Imported",value:Z.lastImportCount.toLocaleString()}),Z.lastSkippedCount!=null&&Z.lastSkippedCount>0&&n.jsx(Xl,{label:"Skipped",value:Z.lastSkippedCount.toLocaleString()}),k&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"border-t border-gray-800 my-2"}),n.jsx(Xl,{label:"Total Ops",value:k.total.toLocaleString()}),n.jsx(Xl,{label:"Success",value:k.success.toLocaleString()}),k.errors>0&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:"Errors"}),n.jsx(de,{label:String(k.errors),variant:"error"})]})]})]})]},P)})})}),r==="audit"&&n.jsx(U0,{entries:v||[]}),r==="conflicts"&&n.jsx(U0,{entries:re}),g.lastUpdated&&n.jsxs("p",{className:"text-xs text-gray-600",children:["Last metadata update: ",new Date(g.lastUpdated).toLocaleString()]})]})}function U0({entries:r}){if(r.length===0)return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:n.jsx("p",{className:"text-gray-500 text-sm",children:"No audit entries"})});const f={success:"success",error:"error",denied:"warning",skipped:"default"};return n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Time"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Platform"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Operation"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Item"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Direction"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Result"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Duration"})]})}),n.jsx("tbody",{children:r.map((u,c)=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:up(u.timestamp)}),n.jsx("td",{className:"px-4 py-2",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(um,{platform:u.platform}),n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:u.platform})]})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400",children:u.operation}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 font-mono max-w-[120px] truncate",children:u.itemId||"-"}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(de,{label:u.direction,variant:u.direction==="push"?"info":"default"})}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(de,{label:u.result,variant:f[u.result]||"default"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-600 text-right",children:u.duration?`${u.duration}ms`:"-"})]},c))})]})})}function Xl({label:r,value:f}){return n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500",children:r}),n.jsx("span",{className:"text-xs text-gray-400",children:f})]})}function um({platform:r}){const f={github:"bg-gray-700",jira:"bg-blue-700",ado:"bg-blue-600"};return n.jsx("div",{className:`w-5 h-5 rounded ${f[r]||"bg-gray-700"} flex items-center justify-center`,children:n.jsx("span",{className:"text-[9px] text-white font-bold",children:r[0]?.toUpperCase()})})}function up(r){if(!r)return"-";try{const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return"-"}}const om={prompt_too_long:"error",api_error:"warning",tool_failure:"info",hook_error:"default",rate_limit:"warning",unknown:"default"},$n=50;function op(){const[r,f]=Ha("tab","groups"),[u,c]=Ha("type",""),[m,x]=Ha("q",""),[g,b]=Ha("session",""),[y,d]=N.useState(0),[v,p]=N.useState(m),T=y*$n,A=u?`&type=${encodeURIComponent(u)}`:"",X=m?`&search=${encodeURIComponent(m)}`:"",[G,_]=N.useState(0);St("error-detected",()=>_(W=>W+1));const{data:D,loading:O,error:Q}=Le(r==="groups"?`/api/errors/groups?_r=${G}`:""),{data:re,loading:ne,error:P}=Le(r==="errors"||r==="groups"?`/api/errors/recent?limit=${$n}&offset=${T}${A}${X}&_r=${G}`:""),{data:Z,loading:k,error:B}=Le(r==="sessions"||g?`/api/errors/sessions?limit=50&_r=${G}`:""),{data:I,loading:te,error:De}=Le(r==="timeline"?`/api/errors/timeline?bucket=60&_r=${G}`:""),dt=N.useCallback(()=>{x(v.trim()),d(0),v.trim()&&f("errors")},[v,x,f]);N.useEffect(()=>{g&&Z&&!Z.find(W=>W.sessionId===g)&&b("")},[g,Z,b]);const Ze=r==="groups"&&O||r==="errors"&&ne||r==="timeline"&&te||r==="sessions"&&k,Je=Q||P||B||De,U=re?.total||0,V=re?.errors||[],le=D?.length||0,je=D?.reduce((W,Ve)=>W+Ve.sessions,0)||0,Ne=D?.[0]?.type||"-",E=g?Z?.find(W=>W.sessionId===g):null,Y=u?(Z||[]).filter(W=>W.errors.some(Ve=>Ve.type===u)):Z||[],$=Math.ceil(U/$n),J=W=>{c(W),f("errors"),b(""),d(0)},se=W=>{f(W),b(""),W!=="errors"&&d(0)},fe=()=>{c(""),x(""),p(""),d(0)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Error Tracing"}),n.jsx("span",{className:"text-xs text-gray-500",children:"Observability for Claude Code sessions"})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx("input",{type:"text",value:v,onChange:W=>p(W.target.value),onKeyDown:W=>W.key==="Enter"&&dt(),placeholder:"Search errors by message, tool name, or context...",className:"w-full px-3 py-2 text-sm bg-gray-900/50 border border-gray-700 rounded-lg text-gray-300 placeholder-gray-600 focus:outline-none focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500/30"}),m&&n.jsx("button",{onClick:()=>{x(""),p(""),d(0)},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-300 text-xs",children:"clear"})]}),n.jsx("button",{onClick:dt,className:"px-4 py-2 text-sm bg-indigo-600 hover:bg-indigo-500 text-white rounded-lg transition-colors",children:"Search"})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Total Errors",value:U,color:"rose"}),n.jsx(ce,{title:"Error Types",value:le,color:"amber"}),n.jsx(ce,{title:"Affected Sessions",value:je,color:"indigo"}),n.jsx(ce,{title:"Most Common",value:Ne,color:"cyan"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:["groups","errors","timeline","sessions"].map(W=>n.jsx("button",{onClick:()=>se(W),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===W?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:W==="groups"?"Error Groups":W==="errors"?"All Errors":W==="timeline"?"Timeline":"Sessions"},W))}),(u||m)&&n.jsxs("div",{className:"flex items-center gap-2",children:[u&&n.jsx(de,{label:`type: ${u.replace(/_/g," ")}`,variant:"info"}),m&&n.jsx(de,{label:`search: ${m.slice(0,20)}`,variant:"default"}),n.jsx("button",{onClick:fe,className:"text-xs text-gray-500 hover:text-gray-300 transition-colors",children:"clear all"})]})]}),Je&&n.jsxs("div",{className:"bg-rose-900/30 border border-rose-700 rounded-lg px-4 py-3 flex items-center justify-between",children:[n.jsx("div",{className:"text-sm text-rose-300",children:Je}),n.jsx("button",{onClick:()=>window.location.reload(),className:"text-xs text-rose-400 hover:text-rose-200 px-2 py-1 border border-rose-700 rounded transition-colors",children:"Retry"})]}),g&&E&&n.jsx(hp,{session:E,onClose:()=>b("")}),Ze&&!g&&n.jsx(Et,{}),!g&&!Ze&&r==="groups"&&n.jsx(fp,{groups:D||[],onGroupClick:J}),!g&&!Ze&&r==="errors"&&n.jsx(dp,{errors:V,total:U,page:y,totalPages:$,onPageChange:d,onSessionClick:W=>{b(W),f("sessions")}}),!g&&!Ze&&r==="timeline"&&n.jsx(mp,{buckets:I||[],errors:V,onSessionClick:W=>b(W)}),!g&&!Ze&&r==="sessions"&&n.jsx(xp,{sessions:Y,onSelect:W=>b(W)}),!Ze&&!Je&&U===0&&!g&&n.jsx(fu,{title:"No errors detected",description:"Claude Code session logs are clean"})]})}function fp({groups:r,onGroupClick:f}){return r.length===0?null:n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Error Groups"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Type"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Count"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Sessions"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Last Seen"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Sample Message"})]})}),n.jsx("tbody",{children:r.map(u=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30",children:[n.jsx("td",{className:"px-4 py-2",children:n.jsx(de,{label:u.type.replace(/_/g," "),variant:om[u.type]||"default"})}),n.jsx("td",{className:"px-4 py-2 text-right",children:n.jsx("button",{onClick:()=>f(u.type),className:"text-sm text-indigo-400 hover:text-indigo-300 font-mono transition-colors",title:`View all ${u.count} errors of this type`,children:u.count})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:u.sessions}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-300 font-mono",title:Vl(u.lastSeen),children:Wn(u.lastSeen)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 max-w-xs truncate",children:u.recentMessages[0]||"-"})]},u.type))})]})]})}function dp({errors:r,total:f,page:u,totalPages:c,onPageChange:m,onSessionClick:x}){const[g,b]=N.useState(new Set),y=N.useCallback(p=>{b(T=>{const A=new Set(T);return A.has(p)?A.delete(p):A.add(p),A})},[]);if(r.length===0)return n.jsx(fu,{title:"No errors",description:"No errors match the current filter"});const d=u*$n+1,v=Math.min(u*$n+r.length,f);return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("div",{className:"px-5 py-3 border-b border-gray-800 flex items-center justify-between",children:[n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Errors ",d,"–",v," of ",f]}),c>1&&n.jsx(L0,{page:u,totalPages:c,onChange:m})]}),n.jsx("div",{className:"divide-y divide-gray-800/50",children:r.map((p,T)=>{const A=g.has(T),X=p.message.length>120;return n.jsx("div",{className:"px-4 py-3 hover:bg-gray-800/20 transition-colors",children:n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("div",{className:"flex-shrink-0 mt-0.5",children:n.jsx(de,{label:p.type.replace(/_/g," "),variant:om[p.type]||"default"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:`text-xs text-gray-300 ${A?"whitespace-pre-wrap break-words":"truncate"} ${X?"cursor-pointer":""}`,onClick:()=>X&&y(T),title:X?A?"Click to collapse":"Click to expand details":void 0,children:[X&&n.jsx("span",{className:"text-indigo-400 mr-1 text-[10px] inline-block w-3",children:A?"▼":"▶"}),A?p.message:p.message.slice(0,200),!A&&X&&n.jsx("span",{className:"text-indigo-400 ml-1",children:"...more"})]}),p.context?.toolName&&n.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[n.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 bg-gray-800 border border-gray-700 rounded text-amber-400",children:p.context.toolName}),p.context.toolInput&&n.jsx("span",{className:"text-[10px] text-gray-500 font-mono truncate max-w-md",children:p.context.toolInput})]}),A&&n.jsx(fm,{context:p.context})]}),n.jsxs("div",{className:"flex-shrink-0 text-right",children:[n.jsx("div",{className:"text-[10px] text-gray-300 font-mono",title:Vl(p.timestamp),children:Wn(p.timestamp)}),n.jsx("div",{className:"text-[10px] text-gray-600",children:Vl(p.timestamp)}),n.jsx("button",{onClick:()=>x(p.sessionId),className:"text-[10px] text-indigo-400 hover:text-indigo-300 font-mono mt-0.5 transition-colors",title:"View full session",children:p.sessionId.slice(0,8)}),p.context?.messageIndex!=null&&n.jsxs("div",{className:"text-[10px] text-gray-600",children:["msg #",p.context.messageIndex]})]})]})},`${p.sessionId}-${p.timestamp}-${T}`)})}),c>1&&n.jsx("div",{className:"px-5 py-3 border-t border-gray-800 flex justify-end",children:n.jsx(L0,{page:u,totalPages:c,onChange:m})})]})}function fm({context:r}){if(!r)return null;const{precedingAction:f,recentTools:u}=r;return!f&&(!u||u.length===0)?null:n.jsxs("div",{className:"mt-2 p-2 bg-gray-900/60 border border-gray-800 rounded-lg space-y-1.5",children:[f&&n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase tracking-wider",children:"What preceded this error:"}),n.jsx("div",{className:"text-[11px] text-gray-400 font-mono mt-0.5",children:f})]}),u&&u.length>0&&n.jsxs("div",{children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase tracking-wider",children:"Recent tool chain:"}),n.jsx("div",{className:"flex flex-col gap-0.5 mt-0.5",children:u.map((c,m)=>n.jsxs("div",{className:"flex items-center gap-1.5 text-[10px]",children:[n.jsxs("span",{className:"text-gray-600",children:[u.length-m,"."]}),n.jsx("span",{className:"font-mono text-amber-400/80",children:c.name}),c.input&&n.jsx("span",{className:"text-gray-600 font-mono truncate max-w-sm",children:c.input})]},m))})]})]})}function L0({page:r,totalPages:f,onChange:u}){return n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("button",{onClick:()=>u(Math.max(0,r-1)),disabled:r===0,className:"px-2 py-1 text-xs rounded transition-colors disabled:text-gray-700 text-gray-400 hover:text-white hover:bg-gray-700",children:"Prev"}),n.jsxs("span",{className:"text-[10px] text-gray-500 px-2",children:[r+1," / ",f]}),n.jsx("button",{onClick:()=>u(Math.min(f-1,r+1)),disabled:r>=f-1,className:"px-2 py-1 text-xs rounded transition-colors disabled:text-gray-700 text-gray-400 hover:text-white hover:bg-gray-700",children:"Next"})]})}function mp({buckets:r,errors:f,onSessionClick:u}){const[c,m]=N.useState(null),x=Math.max(...r.map(d=>d.count),1),g={tool_failure:"bg-blue-500",prompt_too_long:"bg-rose-500",api_error:"bg-amber-500",hook_error:"bg-gray-500",rate_limit:"bg-amber-400",unknown:"bg-gray-600"},b=c?f.filter(d=>{const v=new Date(d.timestamp).getTime();return v>=new Date(c.start).getTime()&&v<new Date(c.end).getTime()}):f,y=d=>{try{return new Date(d).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return d}};return n.jsxs("div",{className:"space-y-4",children:[r.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Error Density (per hour)"}),c&&n.jsx("button",{onClick:()=>m(null),className:"text-[10px] text-indigo-400 hover:text-indigo-300",children:"Clear filter"})]}),n.jsx("div",{className:"flex items-end gap-px h-24",children:r.map((d,v)=>{const p=d.count/x*100,T=c?.start===d.start;return n.jsx("div",{className:"flex-1 flex flex-col items-center justify-end cursor-pointer group relative",onClick:()=>m(T?null:d),title:`${y(d.start)}: ${d.count} errors`,children:n.jsx("div",{className:`w-full min-h-[2px] rounded-t transition-all ${T?"bg-indigo-400":"bg-rose-500/70 group-hover:bg-rose-400"}`,style:{height:`${Math.max(p,2)}%`}})},v)})}),n.jsxs("div",{className:"flex justify-between mt-1",children:[n.jsx("span",{className:"text-[9px] text-gray-600",children:r.length>0?y(r[0].start):""}),n.jsx("span",{className:"text-[9px] text-gray-600",children:r.length>0?y(r[r.length-1].start):""})]}),n.jsx("div",{className:"flex gap-3 mt-2",children:Object.entries(g).map(([d,v])=>n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${v}`}),n.jsx("span",{className:"text-[9px] text-gray-600",children:d.replace(/_/g," ")})]},d))})]}),c&&n.jsxs("div",{className:"text-xs text-gray-400 px-1",children:["Showing ",b.length," errors from ",y(c.start)]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:c?"Filtered Errors":"Recent Errors"}),n.jsxs("div",{className:"space-y-1 max-h-[400px] overflow-y-auto custom-scrollbar",children:[b.length===0&&n.jsx("p",{className:"text-xs text-gray-600",children:"No errors in this time range"}),b.slice(0,100).map((d,v)=>n.jsxs("div",{className:"flex items-start gap-3 py-2 px-2 hover:bg-gray-800/30 rounded cursor-pointer",onClick:()=>u(d.sessionId),children:[n.jsx("div",{className:`w-2 h-2 rounded-full mt-1.5 flex-shrink-0 ${g[d.type]||"bg-gray-500"}`}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs text-gray-400 font-mono",children:d.type.replace(/_/g," ")}),d.context?.toolName&&n.jsx("span",{className:"text-[10px] font-mono px-1 py-0.5 bg-gray-800 border border-gray-700 rounded text-amber-400",children:d.context.toolName}),n.jsx("span",{className:"text-[10px] text-gray-300 font-mono",children:Wn(d.timestamp)}),n.jsx("span",{className:"text-[10px] text-gray-600",children:Vl(d.timestamp)})]}),n.jsx("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:d.message}),d.context?.precedingAction&&n.jsxs("div",{className:"text-[10px] text-gray-600 mt-0.5 truncate",children:["After: ",d.context.precedingAction]})]})]},v))]})]})]})}function xp({sessions:r,onSelect:f}){return r.length===0?null:n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Recent Sessions"})}),n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-gray-800",children:[n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Session"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Branch"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Messages"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Tool Calls"}),n.jsx("th",{className:"text-right px-4 py-2 text-xs text-gray-500",children:"Errors"}),n.jsx("th",{className:"text-left px-4 py-2 text-xs text-gray-500",children:"Started"})]})}),n.jsx("tbody",{children:r.map(u=>n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30 cursor-pointer",onClick:()=>f(u.sessionId),children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400 font-mono",children:u.sessionId.slice(0,8)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:u.gitBranch||"-"}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:u.messageCount}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:u.toolCallCount}),n.jsx("td",{className:"px-4 py-2 text-right",children:u.errors.length>0?n.jsx(de,{label:String(u.errors.length),variant:"error"}):n.jsx("span",{className:"text-xs text-gray-600",children:"0"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-300 font-mono",title:Vl(u.startTime),children:Wn(u.startTime)})]},u.sessionId))})]})]})}function hp({session:r,onClose:f}){const[u,c]=N.useState(new Set),m=x=>{c(g=>{const b=new Set(g);return b.has(x)?b.delete(x):b.add(x),b})};return n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{children:[n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Session: ",n.jsx("span",{className:"font-mono",children:r.sessionId.slice(0,12)})]}),n.jsxs("div",{className:"text-[10px] text-gray-600 mt-0.5",children:["v",r.version," | ",r.gitBranch," | ",r.messageCount," messages | ",r.toolCallCount," tool calls"]})]}),n.jsx("button",{onClick:f,className:"px-2 py-1 text-xs text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors",children:"Back"})]}),n.jsxs("div",{className:"flex gap-3 mb-4",children:[n.jsxs("div",{className:"text-xs text-gray-500",children:["Started: ",new Date(r.startTime).toLocaleString()]}),r.endTime&&n.jsxs("div",{className:"text-xs text-gray-500",children:["Ended: ",new Date(r.endTime).toLocaleString()]})]}),r.errors.length===0?n.jsx("p",{className:"text-gray-600 text-xs",children:"No errors in this session"}):n.jsx("div",{className:"space-y-2",children:r.errors.map((x,g)=>{const b=u.has(g),y=x.message.length>150;return n.jsxs("div",{className:"p-3 bg-gray-800/50 rounded-lg border-l-2 border-rose-500/50",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx(de,{label:x.type.replace(/_/g," "),variant:"error"}),x.context?.toolName&&n.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 bg-gray-800 border border-gray-700 rounded text-amber-400",children:x.context.toolName}),n.jsx("span",{className:"text-[10px] text-gray-300 font-mono",children:Wn(x.timestamp)}),n.jsx("span",{className:"text-[10px] text-gray-600",children:Vl(x.timestamp)})]}),n.jsxs("div",{className:`text-xs text-gray-400 ${b?"whitespace-pre-wrap break-words":""} ${y?"cursor-pointer":""}`,onClick:()=>y&&m(g),title:y?b?"Click to collapse":"Click to expand":void 0,children:[y&&n.jsx("span",{className:"text-indigo-400 mr-1 text-[10px] inline-block w-3",children:b?"▼":"▶"}),b?x.message:x.message.slice(0,300),!b&&y&&n.jsx("span",{className:"text-indigo-400 ml-1",children:"...more"})]}),x.context?.toolInput&&n.jsx("div",{className:"text-[10px] text-gray-500 font-mono mt-1.5 bg-gray-900/50 px-2 py-1 rounded",children:x.context.toolInput}),x.context?.messageIndex!=null&&n.jsxs("div",{className:"text-[10px] text-gray-600 mt-1",children:["At message #",x.context.messageIndex]}),b&&n.jsx(fm,{context:x.context})]},g)})})]})}function Vl(r){if(!r)return"-";const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function Wn(r){if(!r)return"-";try{return new Date(r).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return r}}const gp=[{value:"all",label:"All"},{value:"command",label:"Commands"},{value:"hook",label:"Hooks"},{value:"notification",label:"Notifications"},{value:"cost",label:"Cost"}],yp=[{value:"all",label:"All Levels"},{value:"error",label:"Errors"},{value:"warning",label:"Warnings"},{value:"info",label:"Info"}];function pp(){const[r,f]=Ha("category","all"),[u,c]=Ha("severity","all"),m=r||"all",x=u||"all",[g,b]=N.useState([]),[y,d]=N.useState(200),[v,p]=N.useState(null),T=new URLSearchParams;T.set("limit",String(y)),m!=="all"&&T.set("categories",m),x!=="all"&&T.set("severity",x);const{data:A,loading:X}=Le(`/api/activity/stream?${T.toString()}`),G=N.useCallback(B=>{b(I=>[B,...I].slice(0,50))},[]);if(St("activity",G),X)return n.jsx(Et,{});const _=[...g,...A||[]],D=new Set,O=[];for(const B of _){const I=`${B.timestamp}:${B.title}`;D.has(I)||(D.add(I),O.push(B))}const Q=O.filter(B=>!(m!=="all"&&B.category!==m||x!=="all"&&B.severity!==x)),re=O.filter(B=>B.severity==="error").length,ne=O.filter(B=>B.severity==="warning").length,P=new Set(O.map(B=>B.source)),Z=B=>{p(I=>I===B?null:B)},k=()=>{d(B=>B+200)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Activity Stream"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400 pulse-dot"}),n.jsx("span",{className:"text-xs text-gray-500",children:"Live"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Total Events",value:O.length,color:"indigo"}),n.jsx(ce,{title:"Errors",value:re,color:"rose"}),n.jsx(ce,{title:"Warnings",value:ne,color:"amber"}),n.jsx(ce,{title:"Sources",value:P.size,color:"cyan"})]}),n.jsxs("div",{className:"flex flex-wrap gap-4",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:gp.map(B=>n.jsx("button",{onClick:()=>f(B.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${m===B.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:B.label},B.value))}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:yp.map(B=>n.jsx("button",{onClick:()=>c(B.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${x===B.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:B.label},B.value))}),n.jsxs("span",{className:"text-xs text-gray-500 self-center",children:[Q.length," events"]})]}),n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl divide-y divide-gray-800/50",children:Q.length===0?n.jsxs("div",{className:"p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No events match filters"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"Try adjusting category or severity filters"})]}):n.jsxs(n.Fragment,{children:[Q.slice(0,y).map((B,I)=>{const te=`${B.timestamp}-${I}`,De=v===te;return n.jsx(vp,{event:B,isExpanded:De,onToggle:()=>Z(te)},te)}),Q.length>=y&&n.jsx("div",{className:"p-4 text-center",children:n.jsx("button",{onClick:k,className:"px-4 py-2 text-xs text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded-lg transition-colors",children:"Load more events"})})]})})]})}function vp({event:r,isExpanded:f,onToggle:u}){const c=r.severity==="error"?"bg-rose-400":r.severity==="warning"?"bg-amber-400":"bg-gray-600",m={command:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",hook:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101",notification:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",cost:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1",sync:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581"},x=r.detail||r.metadata&&Object.keys(r.metadata).length>0;return n.jsxs("div",{children:[n.jsxs("div",{className:`px-4 py-3 flex items-start gap-3 transition-colors ${x?"cursor-pointer hover:bg-gray-800/20":""}`,onClick:x?u:void 0,children:[n.jsx("div",{className:`w-1.5 h-1.5 rounded-full mt-2 flex-shrink-0 ${c}`}),n.jsx("div",{className:"w-5 h-5 flex-shrink-0 mt-0.5 text-gray-500",children:n.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:m[r.category]||m.command})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-sm text-gray-300",children:r.title}),n.jsx(de,{label:r.category,variant:Si(r.severity)})]}),r.detail&&!f&&n.jsx("p",{className:"text-xs text-gray-500 mt-0.5 truncate",children:r.detail}),r.source&&n.jsxs("span",{className:"text-[10px] text-gray-600 mt-0.5 block",children:["via ",r.source]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[r.timestamp&&n.jsx("span",{className:"text-[10px] text-gray-600 whitespace-nowrap",children:bp(r.timestamp)}),x&&n.jsx("svg",{className:`w-4 h-4 text-gray-600 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),f&&n.jsxs("div",{className:"px-4 pb-3 ml-10 space-y-2",children:[r.detail&&n.jsxs("div",{className:"bg-gray-800/50 rounded p-3",children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase block mb-1",children:"Detail"}),n.jsx("p",{className:"text-xs text-gray-300 whitespace-pre-wrap",children:r.detail})]}),r.metadata&&Object.keys(r.metadata).length>0&&n.jsxs("div",{className:"bg-gray-800/50 rounded p-3",children:[n.jsx("span",{className:"text-[10px] text-gray-500 uppercase block mb-1",children:"Metadata"}),n.jsx("pre",{className:"text-xs text-gray-400 font-mono whitespace-pre-wrap overflow-x-auto",children:JSON.stringify(r.metadata,null,2)})]})]})]})}function bp(r){if(!r)return"-";const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function jp(){const[r,f]=N.useState(0);St("config-changed",()=>f(k=>k+1));const{data:u,loading:c,error:m,refetch:x}=Le(`/api/config?_r=${r}`),{activeProject:g}=kl(),[b,y]=N.useState(new Set),[d,v]=N.useState({}),[p,T]=N.useState(!1),[A,X]=N.useState(null),[G,_]=N.useState([]);if(c)return n.jsx(Et,{});if(m)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",m]});if(!u)return null;const D=k=>{y(B=>{const I=new Set(B);return I.has(k)?I.delete(k):I.add(k),I})},O=Object.keys(d).length>0,Q=(k,B)=>{v(I=>({...I,[k]:B})),_(I=>I.filter(te=>te.path!==k))},re=async()=>{if(O){T(!0),X(null),_([]);try{const k={};for(const[Ze,Je]of Object.entries(d))Sp(k,Ze,Je);const B=g?`?project=${g.id}`:"",te=await(await fetch(`/api/config/validate${B}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})).json();if(te.errors&&te.errors.length>0){_(te.errors),X("Validation failed. Fix errors before saving."),T(!1);return}const dt=await(await fetch(`/api/config${B}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(k)})).json();dt.ok?(X("Saved successfully"),v({}),_([]),x(),setTimeout(()=>X(null),3e3)):X(`Error: ${dt.error}`)}catch(k){X(`Error: ${k}`)}finally{T(!1)}}},ne=()=>{v({}),X(null),_([])},P=Object.entries(u).filter(([k,B])=>typeof B=="object"&&B!==null),Z=Object.entries(u).filter(([k,B])=>typeof B!="object"||B===null);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Configuration"}),n.jsx("span",{className:"text-xs text-gray-500",children:".specweave/config.json"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[A&&n.jsx("span",{className:`text-xs ${A.startsWith("Error")||A.startsWith("Validation")?"text-rose-400":"text-emerald-400"}`,children:A}),O&&n.jsxs(n.Fragment,{children:[n.jsx(de,{label:`${Object.keys(d).length} changes`,variant:"warning"}),n.jsx("button",{onClick:ne,className:"px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded-lg transition-colors",children:"Discard"}),n.jsx("button",{onClick:re,disabled:p,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:p?"Saving...":"Save Changes"})]})]})]}),A&&!O&&A==="Saved successfully"&&n.jsxs("div",{className:"bg-emerald-500/10 border border-emerald-500/30 rounded-lg px-4 py-2 flex items-center gap-2",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-400"}),n.jsx("span",{className:"text-xs text-emerald-400",children:"Configuration saved successfully"})]}),G.length>0&&n.jsxs("div",{className:"bg-rose-500/10 border border-rose-500/30 rounded-lg px-4 py-3 space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("div",{className:"w-2 h-2 rounded-full bg-rose-400"}),n.jsx("span",{className:"text-xs text-rose-400 font-medium",children:"Validation errors"})]}),G.map((k,B)=>n.jsxs("div",{className:"text-xs text-rose-300 pl-4",children:[n.jsx("span",{className:"font-mono text-rose-400",children:k.path}),": ",k.message]},B))]}),Z.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-3",children:"General"}),n.jsx("div",{className:"space-y-3",children:Z.map(([k,B])=>n.jsx(mm,{path:k,label:k,value:d[k]!==void 0?d[k]:B,original:B,onChange:I=>Q(k,I),edited:d[k]!==void 0,validationError:G.find(I=>I.path===k)?.message},k))})]}),P.map(([k,B])=>n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("button",{onClick:()=>D(k),className:"w-full px-5 py-3 flex items-center justify-between hover:bg-gray-800/30 transition-colors",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 capitalize",children:k}),H0(d,k)>0&&n.jsx(de,{label:`${H0(d,k)} edited`,variant:"warning"}),G.some(I=>I.path.startsWith(k+"."))&&n.jsx(de,{label:"errors",variant:"error"})]}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${b.has(k)?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b.has(k)&&n.jsx("div",{className:"px-5 py-3 border-t border-gray-800",children:n.jsx(dm,{data:B,path:k,edits:d,onChange:Q,validationErrors:G,depth:0})})]},k))]})}function dm({data:r,path:f,edits:u,onChange:c,validationErrors:m,depth:x}){return x>4?n.jsx("span",{className:"text-xs text-gray-600",children:"..."}):n.jsx("div",{className:"space-y-3",style:{marginLeft:x>0?16:0},children:Object.entries(r).map(([g,b])=>{const y=`${f}.${g}`;return b&&typeof b=="object"&&!Array.isArray(b)?n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-gray-400 font-mono font-medium",children:g}),n.jsx(dm,{data:b,path:y,edits:u,onChange:c,validationErrors:m,depth:x+1})]},g):n.jsx(mm,{path:y,label:g,value:u[y]!==void 0?u[y]:b,original:b,onChange:d=>c(y,d),edited:u[y]!==void 0,validationError:m.find(d=>d.path===y)?.message},g)})})}function mm({path:r,label:f,value:u,original:c,onChange:m,edited:x,validationError:g}){return typeof c=="boolean"||typeof u=="boolean"?n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:f}),n.jsx("button",{onClick:()=>m(!u),className:`relative w-9 h-5 rounded-full transition-colors ${u?"bg-indigo-600":"bg-gray-700"} ${x?"ring-1 ring-amber-500/50":""}`,children:n.jsx("div",{className:`absolute top-0.5 w-4 h-4 bg-white rounded-full transition-transform ${u?"left-[18px]":"left-0.5"}`})})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5",children:g})]}):typeof c=="number"||typeof u=="number"?n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:f}),n.jsx("input",{type:"number",value:String(u??""),onChange:b=>m(b.target.value?Number(b.target.value):0),className:`bg-gray-800 border text-xs text-amber-400 font-mono rounded px-2 py-1 w-24 text-right ${g?"border-rose-500":x?"border-amber-500/50":"border-gray-700"} focus:ring-indigo-500 focus:border-indigo-500`})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5 text-right",children:g})]}):Array.isArray(c)||Array.isArray(u)?n.jsx(Np,{path:r,label:f,value:Array.isArray(u)?u:Array.isArray(c)?c:[],edited:x,onChange:m,validationError:g}):n.jsxs("div",{className:"py-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:f}),n.jsx("input",{type:"text",value:String(u??""),onChange:b=>m(b.target.value),className:`bg-gray-800 border text-xs text-gray-300 rounded px-2 py-1 w-48 text-right ${g?"border-rose-500":x?"border-amber-500/50":"border-gray-700"} focus:ring-indigo-500 focus:border-indigo-500`})]}),g&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5 text-right",children:g})]})}function Np({path:r,label:f,value:u,edited:c,onChange:m,validationError:x}){const[g,b]=N.useState(!1),[y,d]=N.useState(""),v=A=>{const X=[...u];X.splice(A,1),m(X)},p=()=>{const A=y.trim();A&&(m([...u,A]),d(""))},T=A=>{A.key==="Enter"&&(A.preventDefault(),p())};return n.jsxs("div",{className:"py-1",children:[n.jsxs("button",{onClick:()=>b(A=>!A),className:"flex items-center justify-between w-full group",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:f}),n.jsxs("div",{className:"flex items-center gap-2",children:[c&&n.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-500"}),n.jsxs("span",{className:"text-xs text-gray-400 font-mono",children:["[",u.length," items]"]}),n.jsx("svg",{className:`w-3 h-3 text-gray-500 transition-transform duration-200 ${g?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),g&&n.jsxs("div",{className:"mt-2 ml-4 space-y-1",children:[u.length===0&&n.jsx("p",{className:"text-[10px] text-gray-600",children:"No items"}),u.map((A,X)=>n.jsxs("div",{className:"flex items-center gap-2 group/item",children:[n.jsx("span",{className:"text-xs text-gray-300 font-mono flex-1 truncate",children:String(A)}),n.jsx("button",{onClick:()=>v(X),className:"text-[10px] text-gray-600 hover:text-rose-400 opacity-0 group-hover/item:opacity-100 transition-opacity",children:"remove"})]},X)),n.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[n.jsx("input",{type:"text",value:y,onChange:A=>d(A.target.value),onKeyDown:T,placeholder:"Add item...",className:"bg-gray-800 border border-gray-700 text-xs text-gray-300 rounded px-2 py-1 flex-1 focus:ring-indigo-500 focus:border-indigo-500"}),n.jsx("button",{onClick:p,disabled:!y.trim(),className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded disabled:opacity-50 transition-colors",children:"Add"})]})]}),x&&n.jsx("p",{className:"text-[10px] text-rose-400 mt-0.5",children:x})]})}function H0(r,f){return Object.keys(r).filter(u=>u.startsWith(f+".")).length}function Sp(r,f,u){const c=f.split(".");let m=r;for(let x=0;x<c.length-1;x++)(!m[c[x]]||typeof m[c[x]]!="object")&&(m[c[x]]={}),m=m[c[x]];m[c[c.length-1]]=u}function xm({lines:r,status:f,onDismiss:u}){const c=N.useRef(null);return N.useEffect(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[r]),r.length===0&&f==="idle"?null:n.jsxs("div",{className:"mt-4 rounded-lg bg-gray-950 border border-gray-700 overflow-hidden",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-gray-900 border-b border-gray-700",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${f==="running"?"bg-yellow-400 animate-pulse":f==="success"?"bg-green-400":f==="error"?"bg-red-400":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-400 font-mono",children:f==="running"?"Running...":f==="success"?"Completed":f==="error"?"Failed":"Output"})]}),f!=="running"&&u&&n.jsx("button",{onClick:u,className:"text-gray-500 hover:text-gray-300 text-xs",children:"Dismiss"})]}),n.jsxs("div",{className:"p-3 max-h-48 overflow-y-auto font-mono text-xs text-gray-300 whitespace-pre-wrap",children:[r.map((m,x)=>n.jsx("div",{children:m},x)),n.jsx("div",{ref:c})]})]})}function Ep(){const{data:r,loading:f}=Le("/api/plugins/full"),{execute:u,running:c,output:m,status:x,reset:g}=du(),[b,y]=N.useState(null);if(f)return n.jsx(Et,{});const d=r?.plugins||[],v=r?.skills||[],p=r?.lsp,T=r?.warmup,A=r?.triggerCount||0,X=d.reduce((O,Q)=>O+Q.skillCount,0),G=d.reduce((O,Q)=>O+Q.commandCount,0),_=O=>v.filter(Q=>Q.plugin===O).sort((Q,re)=>re.count-Q.count),D=O=>{y(Q=>Q===O?null:O)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Plugins & LSP"}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("button",{onClick:()=>u("lsp-status"),disabled:c,className:"px-3 py-1.5 bg-gray-700 hover:bg-gray-600 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:"Check LSP"}),n.jsx("button",{onClick:()=>u("refresh-marketplace"),disabled:c,className:"px-3 py-1.5 bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white text-xs rounded-lg transition-colors",children:c?"Running...":"Refresh Marketplace"})]})]}),n.jsx(xm,{lines:m,status:x,onDismiss:g}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[n.jsx(La,{label:"Plugins",value:d.length}),n.jsx(La,{label:"Total Skills",value:X}),n.jsx(La,{label:"Total Commands",value:G}),n.jsx(La,{label:"Trigger Keywords",value:A})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Installed Plugins"})}),d.length===0?n.jsx("div",{className:"p-5 text-gray-500 text-xs",children:"No plugins installed"}):n.jsx("div",{className:"divide-y divide-gray-800/50",children:d.map(O=>{const Q=b===O.name,re=_(O.name);return n.jsxs("div",{children:[n.jsxs("button",{onClick:()=>D(O.name),className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-800/30 transition-colors text-left",children:[n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("span",{className:"text-sm text-gray-300",children:O.name}),n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:O.version})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(de,{label:`${O.skillCount} skills`,variant:"info"}),n.jsx(de,{label:`${O.commandCount} cmds`,variant:"default"}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${Q?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),Q&&n.jsx("div",{className:"px-4 pb-4 bg-gray-800/20",children:re.length===0?n.jsx("p",{className:"text-xs text-gray-600 py-2",children:"No skill usage data for this plugin"}):n.jsxs("div",{className:"space-y-1 mt-1",children:[n.jsxs("div",{className:"grid grid-cols-[1fr,80px,80px,120px] gap-2 px-2 py-1",children:[n.jsx("span",{className:"text-[10px] text-gray-600 uppercase",children:"Skill"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Invocations"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Success"}),n.jsx("span",{className:"text-[10px] text-gray-600 uppercase text-right",children:"Last Used"})]}),re.map(ne=>n.jsxs("div",{className:"grid grid-cols-[1fr,80px,80px,120px] gap-2 px-2 py-1.5 bg-gray-800/40 rounded",children:[n.jsx("span",{className:"text-xs text-gray-300 font-mono truncate",children:ne.name}),n.jsx("span",{className:"text-xs text-gray-400 text-right font-mono",children:ne.count}),n.jsxs("span",{className:"text-xs text-right font-mono",children:[n.jsx("span",{className:"text-emerald-400",children:ne.successCount}),ne.failureCount>0&&n.jsxs("span",{className:"text-rose-400",children:["/",ne.failureCount]})]}),n.jsx("span",{className:"text-[10px] text-gray-500 text-right",children:ne.lastUsed?Cp(ne.lastUsed):"-"})]},ne.name))]})})]},O.name)})})]}),v.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Skill Usage Leaderboard"}),n.jsx(cm,{items:v.sort((O,Q)=>Q.count-O.count).slice(0,20).map(O=>({label:O.name,value:O.count,color:"#10b981"})),maxBars:20})]}),p&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"LSP Status"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(de,{label:p.status,variant:p.status==="ok"?"success":"warning"}),p.checked&&n.jsxs("span",{className:"text-[10px] text-gray-600",children:["Checked: ",new Date(p.checked).toLocaleDateString()]})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-4",children:[n.jsx(La,{label:"Total Languages",value:p.stats.totalLanguages}),n.jsx(La,{label:"Checked",value:p.stats.checkedLanguages}),n.jsx(La,{label:"Binary Missing",value:p.stats.binaryMissing}),n.jsx(La,{label:"Plugin Missing",value:p.stats.pluginMissing})]}),p.missing.length>0&&n.jsxs("div",{className:"space-y-2",children:[n.jsx("h4",{className:"text-xs text-gray-500",children:"Missing Languages"}),p.missing.map((O,Q)=>n.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-800/50 rounded",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(de,{label:O.type,variant:O.type==="binary"?"warning":"default"}),n.jsx("span",{className:"text-xs text-gray-300",children:O.language})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("code",{className:"text-[10px] text-gray-500",children:O.binaryInstall}),O.message&&n.jsx("span",{className:"text-[10px] text-gray-600 max-w-[200px] truncate",children:O.message})]})]},Q))]})]}),T&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"LSP Warmup Status"}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[T.elapsed?`${(T.elapsed/1e3).toFixed(1)}s`:""," |"," ",T.timestamp?new Date(T.timestamp).toLocaleString():""]})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[T.warmedUp.map(O=>n.jsx(de,{label:O,variant:"success"},O)),T.failed.map(O=>n.jsx(de,{label:O,variant:"error"},O))]}),T.warmedUp.length===0&&T.failed.length===0&&n.jsx("p",{className:"text-gray-600 text-xs",children:"No warmup data"})]})]})}function La({label:r,value:f}){return n.jsxs("div",{className:"bg-gray-800/50 rounded-lg p-3 text-center",children:[n.jsx("div",{className:"text-lg font-bold text-gray-300",children:f}),n.jsx("div",{className:"text-[10px] text-gray-500",children:r})]})}function Cp(r){if(!r)return"-";const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}function Tp(){const{data:r,loading:f}=Le("/api/links"),{data:u,loading:c,refetch:m}=Le("/api/services"),{execute:x,running:g,output:b,status:y,reset:d}=du();if(f||c)return n.jsx(Et,{});const v=(u||[]).filter(_=>_.status==="running").length,p=(u||[]).length,T=new Map;for(const _ of u||[])if(_.port>0&&_.status==="running"){const D=T.get(_.port)||[];D.push(_.name),T.set(_.port,D)}const A=Array.from(T.entries()).filter(([,_])=>_.length>1),X=async _=>{await x(_),setTimeout(()=>m(),3e3)},G=async _=>{await x(_),setTimeout(()=>m(),2e3)};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Services & Links"}),n.jsx(xm,{lines:b,status:y,onDismiss:d}),A.length>0&&n.jsxs("div",{className:"bg-amber-500/10 border border-amber-500/30 rounded-xl p-4 flex items-start gap-3",children:[n.jsx("svg",{className:"w-5 h-5 text-amber-400 flex-shrink-0 mt-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm font-medium text-amber-300",children:"Port Conflict Detected"}),n.jsx("div",{className:"text-xs text-amber-400/80 mt-1",children:A.map(([_,D])=>n.jsxs("span",{className:"block",children:["Port ",_," is used by: ",D.join(", ")]},_))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Services",value:p,color:"indigo",tooltip:`${p} managed services`}),n.jsx(ce,{title:"Running",value:v,color:"emerald",tooltip:`${v} services currently active`}),n.jsx(ce,{title:"External Links",value:(r||[]).length,color:"cyan",tooltip:"Configured external links (docs, repos, etc.)"}),n.jsx(ce,{title:"Stopped",value:p-v,color:"rose",tooltip:`${p-v} services not running`})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"Service Status"}),n.jsx("div",{className:"space-y-3",children:(u||[]).map((_,D)=>n.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${_.status==="running"?"bg-emerald-400":"bg-gray-600"}`}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm text-gray-300",children:_.name}),n.jsx("div",{className:"text-[10px] text-gray-600",children:_.status==="running"&&_.detail?n.jsx("a",{href:_.detail,target:"_blank",rel:"noopener noreferrer",className:"text-indigo-400 hover:text-indigo-300 underline transition-colors",children:_.detail}):_.detail})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[_.status==="running"&&_.port>0&&n.jsx(de,{label:`Port ${_.port}`,variant:"info"}),_.status==="running"?n.jsx(de,{label:"Running",variant:"success"}):n.jsx(de,{label:"Stopped",variant:"default"}),_.name==="Docs Preview"&&(_.status==="running"?n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("a",{href:_.detail,target:"_blank",rel:"noopener noreferrer",className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded transition-colors",children:"Open"}),n.jsx("button",{onClick:()=>G("docs-preview-stop"),disabled:g,className:"px-2 py-1 text-[10px] text-rose-400 hover:text-rose-300 border border-rose-500/30 rounded transition-colors disabled:opacity-50",children:"Stop"})]}):n.jsx("button",{onClick:()=>X("docs-preview-start"),disabled:g,className:"px-2 py-1 text-[10px] text-emerald-400 hover:text-emerald-300 border border-emerald-500/30 rounded transition-colors disabled:opacity-50",children:g?"Starting...":"Start"})),_.status==="running"&&_.name!=="Docs Preview"&&n.jsx("a",{href:_.detail,target:"_blank",rel:"noopener noreferrer",className:"px-2 py-1 text-[10px] text-indigo-400 hover:text-indigo-300 border border-indigo-500/30 rounded transition-colors",children:"Open"})]})]},D))})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-4",children:"External Links"}),(r||[]).length===0?n.jsx("p",{className:"text-xs text-gray-500",children:"No external links configured"}):n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:(r||[]).map((_,D)=>n.jsxs("a",{href:_.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between p-3 bg-gray-800/50 rounded-lg hover:bg-gray-800 transition-colors group",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(Ap,{type:_.type}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-gray-300 group-hover:text-white transition-colors",children:_.name}),n.jsx("div",{className:"text-[10px] text-gray-600 truncate max-w-[200px]",children:_.url})]})]}),n.jsx("svg",{className:"w-4 h-4 text-gray-600 group-hover:text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]},D))})]})]})}function Ap({type:r}){const f={docs:"bg-indigo-600",github:"bg-gray-700",jira:"bg-blue-700",ado:"bg-blue-600"};return n.jsx("div",{className:`w-8 h-8 rounded-lg ${f[r]||"bg-gray-700"} flex items-center justify-center`,children:n.jsx("span",{className:"text-xs text-white font-bold",children:r[0]?.toUpperCase()})})}const B0={critical:0,warning:1,info:2};function Mp(){const[r,f]=N.useState("pending"),[u,c]=N.useState(null),[m,x]=N.useState(0);St("notification",()=>x(B=>B+1));const{activeProject:g}=kl(),{data:b,loading:y,error:d,refetch:v}=Le(`/api/notifications?_r=${m}`);if(y)return n.jsx(Et,{});if(d)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",d]});const p=b||[],T=p.filter(B=>!B.dismissedAt),A=p.filter(B=>!!B.dismissedAt),X=T.filter(B=>B.severity==="critical"),G=T.filter(B=>B.severity==="warning"),D=[...r==="pending"?T:r==="dismissed"?A:p].sort((B,I)=>{const te=B0[B.severity]??3,De=B0[I.severity]??3;return te!==De?te-De:new Date(I.createdAt).getTime()-new Date(B.createdAt).getTime()}),O=async B=>{c(B);try{const I=g?`?project=${g.id}`:"";(await fetch(`/api/notifications/${B}/dismiss${I}`,{method:"POST"})).ok&&v()}finally{c(null)}},Q=async()=>{c("__all__");try{const B=g?`?project=${g.id}`:"";for(const I of T)await fetch(`/api/notifications/${I.id}/dismiss${B}`,{method:"POST"});v()}finally{c(null)}},re=B=>B==="critical"?"error":B==="warning"?"warning":"info",ne=B=>B==="critical"?"border-l-rose-500":B==="warning"?"border-l-amber-500":"border-l-blue-500",Z=(B=>{const I={};for(const te of B)I[te.severity]||(I[te.severity]=[]),I[te.severity].push(te);return I})(D),k={critical:"Critical",warning:"Warnings",info:"Informational"};return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Notifications"}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Pending",value:T.length,color:"indigo"}),n.jsx(ce,{title:"Critical",value:X.length,color:"rose"}),n.jsx(ce,{title:"Warnings",value:G.length,color:"amber"}),n.jsx(ce,{title:"Dismissed",value:A.length,color:"cyan"})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:[{value:"pending",label:`Pending (${T.length})`},{value:"dismissed",label:`Dismissed (${A.length})`},{value:"all",label:`All (${p.length})`}].map(B=>n.jsx("button",{onClick:()=>f(B.value),className:`px-3 py-1.5 text-xs rounded-md transition-colors ${r===B.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:B.label},B.value))}),T.length>0&&n.jsx("button",{onClick:Q,disabled:u==="__all__",className:"px-3 py-1.5 text-xs text-gray-400 hover:text-gray-200 border border-gray-700 rounded-lg transition-colors disabled:opacity-50",children:u==="__all__"?"Dismissing...":"Dismiss All"})]}),D.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-800 flex items-center justify-center mx-auto mb-4",children:n.jsx("svg",{className:"w-6 h-6 text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})})}),n.jsx("p",{className:"text-gray-400 text-sm font-medium",children:r==="pending"?"No pending notifications":"No notifications"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1 max-w-xs mx-auto",children:"Notifications appear here when imports complete, discrepancies are found, or syncs fail"})]}):n.jsx("div",{className:"space-y-4",children:["critical","warning","info"].map(B=>{const I=Z[B];return!I||I.length===0?null:n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[n.jsx("h3",{className:"text-xs font-medium text-gray-400 uppercase",children:k[B]||B}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:["(",I.length,")"]})]}),n.jsx("div",{className:"space-y-2",children:I.map(te=>n.jsxs("div",{className:`bg-gray-900/50 border border-gray-800 border-l-4 ${ne(te.severity)} rounded-xl p-4 flex items-start gap-4 ${te.dismissedAt?"opacity-60":""}`,children:[n.jsx(zp,{severity:te.severity}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-sm font-medium text-gray-200",children:te.title}),n.jsx(de,{label:te.severity,variant:re(te.severity)}),te.type&&n.jsx(de,{label:te.type,variant:"default"})]}),te.message&&n.jsx("p",{className:"text-xs text-gray-400 mb-2",children:te.message}),n.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-gray-600",children:[n.jsx("span",{children:new Date(te.createdAt).toLocaleString()}),te.source&&n.jsxs("span",{children:["via ",te.source]}),te.dismissedAt&&n.jsxs("span",{children:["Dismissed ",new Date(te.dismissedAt).toLocaleString()]})]})]}),!te.dismissedAt&&n.jsx("button",{onClick:()=>O(te.id),disabled:u===te.id,className:"px-2 py-1 text-xs text-gray-500 hover:text-gray-300 hover:bg-gray-800 rounded transition-colors disabled:opacity-50 flex-shrink-0",children:u===te.id?"...":"Dismiss"})]},te.id))})]},B)})})]})}function zp({severity:r}){return r==="critical"?n.jsx("div",{className:"w-8 h-8 rounded-full bg-rose-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-rose-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4.5c-.77-.833-2.694-.833-3.464 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z"})})}):r==="warning"?n.jsx("div",{className:"w-8 h-8 rounded-full bg-amber-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-amber-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}):n.jsx("div",{className:"w-8 h-8 rounded-full bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx("svg",{className:"w-4 h-4 text-blue-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}function Rp(r){if(!r)return null;if(r.startsWith("https://"))return r.replace(/\.git$/,"");const f=r.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(f)return`https://${f[1]}/${f[2]}`;const u=r.match(/^ssh:\/\/git@([^/]+)\/(.+?)(?:\.git)?$/);return u?`https://${u[1]}/${u[2]}`:null}function _p(){const{data:r,loading:f,error:u}=Le("/api/repos");if(f)return n.jsx(Et,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});const c=r||[],m=[...new Set(c.map(b=>b.org))],x=c.filter(b=>b.hasSpecweave).length,g=c.find(b=>b.isCurrent);return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:"Repositories"}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Repositories",value:c.length,color:"indigo"}),n.jsx(ce,{title:"Organizations",value:m.length,color:"cyan"}),n.jsx(ce,{title:"With SpecWeave",value:x,color:"emerald"}),n.jsx(ce,{title:"Current",value:g?g.name:"-",subtitle:g?`${g.org}/${g.name}`:"No current project",color:"amber"})]}),c.length===0?n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-8 text-center",children:[n.jsx("p",{className:"text-gray-500 text-sm",children:"No repositories found"}),n.jsx("p",{className:"text-gray-600 text-xs mt-1",children:"This project doesn't use multi-repo mode, or the repositories/ directory hasn't been set up yet"})]}):n.jsx(n.Fragment,{children:m.map(b=>{const y=c.filter(d=>d.org===b);return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(wp,{}),n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:b}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[y.length," ",y.length===1?"repo":"repos"]})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:y.map(d=>{const v=Rp(d.remote);return n.jsxs("div",{className:`bg-gray-900/50 border rounded-xl p-4 ${d.isCurrent?"border-indigo-500/30":"border-gray-800"}`,children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Dp,{}),n.jsx("span",{className:"text-sm font-medium text-gray-300",children:d.name})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[d.isCurrent&&n.jsx(de,{label:"Current Project",variant:"info"}),n.jsx(de,{label:d.hasSpecweave?"SpecWeave":"No SpecWeave",variant:d.hasSpecweave?"success":"default"})]})]}),n.jsxs("div",{className:"space-y-1.5 mt-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Organization"}),n.jsx("span",{className:"text-[10px] text-gray-400",children:d.org})]}),d.branch&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Branch"}),n.jsx(de,{label:d.branch,variant:"default"})]}),v&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Remote"}),n.jsx("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-indigo-400 hover:text-indigo-300 hover:underline truncate max-w-[180px]",title:v,children:v.replace("https://","")})]}),!v&&d.remote&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Remote"}),n.jsx("span",{className:"text-[10px] text-gray-600 font-mono truncate max-w-[180px]",title:d.remote,children:d.remote})]}),d.path&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Path"}),n.jsx("span",{className:"text-[10px] text-gray-600 font-mono truncate max-w-[180px]",title:d.path,children:d.path.split("/").slice(-3).join("/")})]}),d.lastModified&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Last Modified"}),n.jsx("span",{className:"text-[10px] text-gray-400",children:Up(d.lastModified)})]})]}),v&&n.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"mt-3 flex items-center justify-center gap-1.5 text-xs text-gray-400 hover:text-gray-200 py-2 border border-gray-800 rounded-lg hover:border-gray-700 transition-colors",children:[n.jsx(Op,{}),"Open on GitHub"]})]},d.path||`${d.org}/${d.name}`)})})]},b)})})]})}function wp(){return n.jsx("div",{className:"w-6 h-6 rounded bg-gray-700 flex items-center justify-center",children:n.jsx("svg",{className:"w-3.5 h-3.5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})})})}function Dp(){return n.jsx("svg",{className:"w-4 h-4 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})})}function Op(){return n.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"currentColor",children:n.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}function Up(r){if(!r)return"-";try{const f=Date.now()-new Date(r).getTime(),u=Math.floor(f/6e4);if(u<1)return"just now";if(u<60)return`${u}m ago`;const c=Math.floor(u/60);return c<24?`${c}h ago`:`${Math.floor(c/24)}d ago`}catch{return"-"}}function Lp(){const{id:r}=Rg(),[f,u]=N.useState(0);St("increment-update",()=>u(y=>y+1));const{data:c,loading:m,error:x}=Le(`/api/increments/${r||"_none"}?_r=${f}`);if(!r)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"No increment ID specified"});if(m)return n.jsx(Et,{});if(x)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",x]});if(!c)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"Increment not found"});const g=c.taskSummary.total>0?Math.round(c.taskSummary.completed/c.taskSummary.total*100):0,b=c.acSummary.total>0?Math.round(c.acSummary.completed/c.acSummary.total*100):0;return n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[n.jsx("span",{className:"text-xs text-indigo-400 font-mono",children:c.dirName}),n.jsx(de,{label:c.metadata.status||"unknown",variant:Si(c.metadata.status||"")}),c.metadata.type&&n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:c.metadata.type}),c.metadata.priority&&n.jsx(Hp,{priority:c.metadata.priority})]}),n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:c.metadata.title||c.id}),c.metadata.project&&n.jsxs("span",{className:"text-xs text-gray-500",children:["Project: ",c.metadata.project]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ce,{title:"Tasks",value:`${c.taskSummary.completed}/${c.taskSummary.total}`,color:"indigo"}),n.jsx(ce,{title:"Task Progress",value:`${g}%`,color:"cyan"}),n.jsx(ce,{title:"ACs",value:`${c.acSummary.completed}/${c.acSummary.total}`,color:"emerald"}),n.jsx(ce,{title:"AC Progress",value:`${b}%`,color:"amber"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5 space-y-4",children:[n.jsx(q0,{label:"Tasks",completed:c.taskSummary.completed,total:c.taskSummary.total,color:"indigo"}),n.jsx(q0,{label:"Acceptance Criteria",completed:c.acSummary.completed,total:c.acSummary.total,color:"emerald"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Tasks (",c.tasks.length,")"]})}),c.tasks.length===0?n.jsx("div",{className:"p-5 text-center text-gray-500 text-xs",children:"No tasks found in tasks.md"}):n.jsx("div",{className:"divide-y divide-gray-800/50",children:c.tasks.map(y=>n.jsxs("div",{className:"px-5 py-3 flex items-center gap-3",children:[n.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center flex-shrink-0 ${y.status==="completed"?"bg-indigo-500/20 border-indigo-500 text-indigo-400":"border-gray-600"}`,children:y.status==="completed"&&n.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:y.id}),n.jsx("span",{className:`text-sm ${y.status==="completed"?"text-gray-500 line-through":"text-gray-300"}`,children:y.title})]}),(y.userStory||y.acs)&&n.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[y.userStory&&n.jsx("span",{className:"text-[10px] text-indigo-400",children:y.userStory}),y.acs?.map(d=>n.jsx("span",{className:"text-[10px] text-emerald-500",children:d},d))]})]})]},y.id))})]}),c.acs.length>0&&n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsx("div",{className:"px-5 py-3 border-b border-gray-800",children:n.jsxs("h3",{className:"text-sm font-medium text-gray-300",children:["Acceptance Criteria (",c.acs.length,")"]})}),n.jsx("div",{className:"divide-y divide-gray-800/50",children:c.acs.map(y=>n.jsxs("div",{className:"px-5 py-3 flex items-start gap-3",children:[n.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center flex-shrink-0 mt-0.5 ${y.completed?"bg-emerald-500/20 border-emerald-500 text-emerald-400":"border-gray-600"}`,children:y.completed&&n.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:n.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}),n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-emerald-500 font-mono",children:y.id}),n.jsx("span",{className:`text-sm ml-2 ${y.completed?"text-gray-500 line-through":"text-gray-300"}`,children:y.text})]})]},y.id))})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5",children:[n.jsx("h3",{className:"text-sm font-medium text-gray-300 mb-3",children:"Metadata"}),n.jsx("div",{className:"space-y-1.5",children:Object.entries(c.metadata).filter(([y])=>!["title"].includes(y)).map(([y,d])=>n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:y}),n.jsx("span",{className:"text-xs text-gray-400",children:typeof d=="object"?JSON.stringify(d):String(d??"")})]},y))})]})]})}function q0({label:r,completed:f,total:u,color:c}){const m=u>0?Math.round(f/u*100):0,x=c==="emerald"?"bg-emerald-500":"bg-indigo-500";return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[n.jsx("span",{className:"text-xs text-gray-400",children:r}),n.jsxs("span",{className:"text-xs text-gray-500",children:[f,"/",u," (",m,"%)"]})]}),n.jsx("div",{className:"w-full h-2 bg-gray-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full ${x} rounded-full transition-all`,style:{width:`${m}%`}})})]})}function Hp({priority:r}){const f={P0:"text-rose-400 bg-rose-500/10",P1:"text-amber-400 bg-amber-500/10",P2:"text-cyan-400 bg-cyan-500/10",P3:"text-gray-400 bg-gray-500/10"};return n.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${f[r]||f.P2}`,children:r})}function Bp(){const r=Cy();return n.jsx(im.Provider,{value:r,children:n.jsx(Ay,{children:n.jsxs("div",{className:"flex min-h-screen bg-gray-950 text-gray-100",children:[n.jsx(_y,{}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[n.jsx(wy,{}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsxs($g,{children:[n.jsx(lt,{path:"/",element:n.jsx(Qy,{})}),n.jsx(lt,{path:"/increments",element:n.jsx(Zy,{})}),n.jsx(lt,{path:"/increments/:id",element:n.jsx(Lp,{})}),n.jsx(lt,{path:"/analytics",element:n.jsx(Jy,{})}),n.jsx(lt,{path:"/costs",element:n.jsx(tp,{})}),n.jsx(lt,{path:"/sync",element:n.jsx(cp,{})}),n.jsx(lt,{path:"/errors",element:n.jsx(op,{})}),n.jsx(lt,{path:"/activity",element:n.jsx(pp,{})}),n.jsx(lt,{path:"/config",element:n.jsx(jp,{})}),n.jsx(lt,{path:"/plugins",element:n.jsx(Ep,{})}),n.jsx(lt,{path:"/services",element:n.jsx(Tp,{})}),n.jsx(lt,{path:"/notifications",element:n.jsx(Mp,{})}),n.jsx(lt,{path:"/repos",element:n.jsx(_p,{})}),n.jsx(lt,{path:"*",element:n.jsxs("div",{className:"p-6 text-center",children:[n.jsx("h2",{className:"text-lg font-semibold text-gray-200 mb-2",children:"Page Not Found"}),n.jsx("p",{className:"text-sm text-gray-500",children:"The page you're looking for doesn't exist."})]})})]})})]})]})})})}kh.createRoot(document.getElementById("root")).render(n.jsx(N.StrictMode,{children:n.jsx(gy,{children:n.jsx(Bp,{})})}));