specweave 1.0.267 → 1.0.268
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard/assets/{index-CtZU6eML.js → index-DuSA4V_E.js} +6 -6
- package/dist/dashboard/index.html +1 -1
- package/dist/src/cli/commands/migrate-to-umbrella.d.ts +0 -4
- package/dist/src/cli/commands/migrate-to-umbrella.d.ts.map +1 -1
- package/dist/src/cli/commands/migrate-to-umbrella.js +0 -25
- package/dist/src/cli/commands/migrate-to-umbrella.js.map +1 -1
- package/dist/src/core/migration/types.d.ts +19 -0
- package/dist/src/core/migration/types.d.ts.map +1 -1
- package/dist/src/core/migration/umbrella-migrator.d.ts +4 -0
- package/dist/src/core/migration/umbrella-migrator.d.ts.map +1 -1
- package/dist/src/core/migration/umbrella-migrator.js +107 -35
- package/dist/src/core/migration/umbrella-migrator.js.map +1 -1
- package/dist/src/dashboard/server/dashboard-server.d.ts.map +1 -1
- package/dist/src/dashboard/server/dashboard-server.js +24 -0
- package/dist/src/dashboard/server/dashboard-server.js.map +1 -1
- package/dist/src/dashboard/server/file-watcher.d.ts.map +1 -1
- package/dist/src/dashboard/server/file-watcher.js +2 -0
- package/dist/src/dashboard/server/file-watcher.js.map +1 -1
- package/package.json +1 -1
- package/plugins/FINAL-AUDIT-RECOMMENDATIONS.md +1 -1
- package/plugins/specweave/hooks/pre-compact.sh +27 -1
- package/plugins/specweave/hooks/user-prompt-submit.sh +4 -0
- package/plugins/specweave/hooks/v2/dispatchers/post-tool-use.sh +1 -1
- package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +62 -0
- package/plugins/specweave/hooks/v2/handlers/ac-sync-dispatcher.sh +25 -12
- package/plugins/specweave/hooks/v2/handlers/universal-auto-create-dispatcher.sh +22 -8
- package/src/templates/CLAUDE.md.template +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const x of d)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(d){const x={};return d.integrity&&(x.integrity=d.integrity),d.referrerPolicy&&(x.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?x.credentials="include":d.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function c(d){if(d.ep)return;d.ep=!0;const x=u(d);fetch(d.href,x)}})();var Gc={exports:{}},Yn={};var x0;function Uh(){if(x0)return Yn;x0=1;var r=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function u(c,d,x){var g=null;if(x!==void 0&&(g=""+x),d.key!==void 0&&(g=""+d.key),"key"in d){x={};for(var v in d)v!=="key"&&(x[v]=d[v])}else x=d;return d=x.ref,{$$typeof:r,type:c,key:g,ref:d!==void 0?d:null,props:x}}return Yn.Fragment=o,Yn.jsx=u,Yn.jsxs=u,Yn}var h0;function Lh(){return h0||(h0=1,Gc.exports=Uh()),Gc.exports}var n=Lh(),Xc={exports:{}},le={};var g0;function Hh(){if(g0)return le;g0=1;var r=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),C=Symbol.iterator;function O(S){return S===null||typeof S!="object"?null:(S=C&&S[C]||S["@@iterator"],typeof S=="function"?S:null)}var G={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,R={};function Q(S,q,k){this.props=S,this.context=q,this.refs=R,this.updater=k||G}Q.prototype.isReactComponent={},Q.prototype.setState=function(S,q){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,q,"setState")},Q.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function H(){}H.prototype=Q.prototype;function V(S,q,k){this.props=S,this.context=q,this.refs=R,this.updater=k||G}var K=V.prototype=new H;K.constructor=V,w(K,Q.prototype),K.isPureReactComponent=!0;var F=Array.isArray;function $(){}var Y={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function X(S,q,k){var W=k.ref;return{$$typeof:r,type:S,key:q,ref:W!==void 0?W:null,props:k}}function Ce(S,q){return X(S.type,q,S.props)}function Ve(S){return typeof S=="object"&&S!==null&&S.$$typeof===r}function qe(S){var q={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(k){return q[k]})}var he=/\/+/g;function ot(S,q){return typeof S=="object"&&S!==null&&S.key!=null?qe(""+S.key):q.toString(36)}function Dt(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then($,$):(S.status="pending",S.then(function(q){S.status==="pending"&&(S.status="fulfilled",S.value=q)},function(q){S.status==="pending"&&(S.status="rejected",S.reason=q)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function U(S,q,k,W,se){var ce=typeof S;(ce==="undefined"||ce==="boolean")&&(S=null);var ve=!1;if(S===null)ve=!0;else switch(ce){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(S.$$typeof){case r:case o:ve=!0;break;case j:return ve=S._init,U(ve(S._payload),q,k,W,se)}}if(ve)return se=se(S),ve=W===""?"."+ot(S,0):W,F(se)?(k="",ve!=null&&(k=ve.replace(he,"$&/")+"/"),U(se,q,k,"",function($l){return $l})):se!=null&&(Ve(se)&&(se=Ce(se,k+(se.key==null||S&&S.key===se.key?"":(""+se.key).replace(he,"$&/")+"/")+ve)),q.push(se)),1;ve=0;var et=W===""?".":W+":";if(F(S))for(var Ue=0;Ue<S.length;Ue++)W=S[Ue],ce=et+ot(W,Ue),ve+=U(W,q,k,ce,se);else if(Ue=O(S),typeof Ue=="function")for(S=Ue.call(S),Ue=0;!(W=S.next()).done;)W=W.value,ce=et+ot(W,Ue++),ve+=U(W,q,k,ce,se);else if(ce==="object"){if(typeof S.then=="function")return U(Dt(S),q,k,W,se);throw q=String(S),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ve}function Z(S,q,k){if(S==null)return S;var W=[],se=0;return U(S,W,"","",function(ce){return q.call(k,ce,se++)}),W}function ae(S){if(S._status===-1){var q=S._result;q=q(),q.then(function(k){(S._status===0||S._status===-1)&&(S._status=1,S._result=k)},function(k){(S._status===0||S._status===-1)&&(S._status=2,S._result=k)}),S._status===-1&&(S._status=0,S._result=q)}if(S._status===1)return S._result.default;throw S._result}var Ne=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},Ae={map:Z,forEach:function(S,q,k){Z(S,function(){q.apply(this,arguments)},k)},count:function(S){var q=0;return Z(S,function(){q++}),q},toArray:function(S){return Z(S,function(q){return q})||[]},only:function(S){if(!Ve(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return le.Activity=y,le.Children=Ae,le.Component=Q,le.Fragment=u,le.Profiler=d,le.PureComponent=V,le.StrictMode=c,le.Suspense=p,le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,le.__COMPILER_RUNTIME={__proto__:null,c:function(S){return Y.H.useMemoCache(S)}},le.cache=function(S){return function(){return S.apply(null,arguments)}},le.cacheSignal=function(){return null},le.cloneElement=function(S,q,k){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var W=w({},S.props),se=S.key;if(q!=null)for(ce in q.key!==void 0&&(se=""+q.key),q)!I.call(q,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&q.ref===void 0||(W[ce]=q[ce]);var ce=arguments.length-2;if(ce===1)W.children=k;else if(1<ce){for(var ve=Array(ce),et=0;et<ce;et++)ve[et]=arguments[et+2];W.children=ve}return X(S.type,se,W)},le.createContext=function(S){return S={$$typeof:g,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:x,_context:S},S},le.createElement=function(S,q,k){var W,se={},ce=null;if(q!=null)for(W in q.key!==void 0&&(ce=""+q.key),q)I.call(q,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(se[W]=q[W]);var ve=arguments.length-2;if(ve===1)se.children=k;else if(1<ve){for(var et=Array(ve),Ue=0;Ue<ve;Ue++)et[Ue]=arguments[Ue+2];se.children=et}if(S&&S.defaultProps)for(W in ve=S.defaultProps,ve)se[W]===void 0&&(se[W]=ve[W]);return X(S,ce,se)},le.createRef=function(){return{current:null}},le.forwardRef=function(S){return{$$typeof:v,render:S}},le.isValidElement=Ve,le.lazy=function(S){return{$$typeof:j,_payload:{_status:-1,_result:S},_init:ae}},le.memo=function(S,q){return{$$typeof:m,type:S,compare:q===void 0?null:q}},le.startTransition=function(S){var q=Y.T,k={};Y.T=k;try{var W=S(),se=Y.S;se!==null&&se(k,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then($,Ne)}catch(ce){Ne(ce)}finally{q!==null&&k.types!==null&&(q.types=k.types),Y.T=q}},le.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},le.use=function(S){return Y.H.use(S)},le.useActionState=function(S,q,k){return Y.H.useActionState(S,q,k)},le.useCallback=function(S,q){return Y.H.useCallback(S,q)},le.useContext=function(S){return Y.H.useContext(S)},le.useDebugValue=function(){},le.useDeferredValue=function(S,q){return Y.H.useDeferredValue(S,q)},le.useEffect=function(S,q){return Y.H.useEffect(S,q)},le.useEffectEvent=function(S){return Y.H.useEffectEvent(S)},le.useId=function(){return Y.H.useId()},le.useImperativeHandle=function(S,q,k){return Y.H.useImperativeHandle(S,q,k)},le.useInsertionEffect=function(S,q){return Y.H.useInsertionEffect(S,q)},le.useLayoutEffect=function(S,q){return Y.H.useLayoutEffect(S,q)},le.useMemo=function(S,q){return Y.H.useMemo(S,q)},le.useOptimistic=function(S,q){return Y.H.useOptimistic(S,q)},le.useReducer=function(S,q,k){return Y.H.useReducer(S,q,k)},le.useRef=function(S){return Y.H.useRef(S)},le.useState=function(S){return Y.H.useState(S)},le.useSyncExternalStore=function(S,q,k){return Y.H.useSyncExternalStore(S,q,k)},le.useTransition=function(){return Y.H.useTransition()},le.version="19.2.4",le}var y0;function tu(){return y0||(y0=1,Xc.exports=Hh()),Xc.exports}var E=tu(),Qc={exports:{}},Gn={},Vc={exports:{}},Zc={};var p0;function Bh(){return p0||(p0=1,(function(r){function o(U,Z){var ae=U.length;U.push(Z);e:for(;0<ae;){var Ne=ae-1>>>1,Ae=U[Ne];if(0<d(Ae,Z))U[Ne]=Z,U[ae]=Ae,ae=Ne;else break e}}function u(U){return U.length===0?null:U[0]}function c(U){if(U.length===0)return null;var Z=U[0],ae=U.pop();if(ae!==Z){U[0]=ae;e:for(var Ne=0,Ae=U.length,S=Ae>>>1;Ne<S;){var q=2*(Ne+1)-1,k=U[q],W=q+1,se=U[W];if(0>d(k,ae))W<Ae&&0>d(se,k)?(U[Ne]=se,U[W]=ae,Ne=W):(U[Ne]=k,U[q]=ae,Ne=q);else if(W<Ae&&0>d(se,ae))U[Ne]=se,U[W]=ae,Ne=W;else break e}}return Z}function d(U,Z){var ae=U.sortIndex-Z.sortIndex;return ae!==0?ae:U.id-Z.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,v=g.now();r.unstable_now=function(){return g.now()-v}}var p=[],m=[],j=1,y=null,C=3,O=!1,G=!1,w=!1,R=!1,Q=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function K(U){for(var Z=u(m);Z!==null;){if(Z.callback===null)c(m);else if(Z.startTime<=U)c(m),Z.sortIndex=Z.expirationTime,o(p,Z);else break;Z=u(m)}}function F(U){if(w=!1,K(U),!G)if(u(p)!==null)G=!0,$||($=!0,qe());else{var Z=u(m);Z!==null&&Dt(F,Z.startTime-U)}}var $=!1,Y=-1,I=5,X=-1;function Ce(){return R?!0:!(r.unstable_now()-X<I)}function Ve(){if(R=!1,$){var U=r.unstable_now();X=U;var Z=!0;try{e:{G=!1,w&&(w=!1,H(Y),Y=-1),O=!0;var ae=C;try{t:{for(K(U),y=u(p);y!==null&&!(y.expirationTime>U&&Ce());){var Ne=y.callback;if(typeof Ne=="function"){y.callback=null,C=y.priorityLevel;var Ae=Ne(y.expirationTime<=U);if(U=r.unstable_now(),typeof Ae=="function"){y.callback=Ae,K(U),Z=!0;break t}y===u(p)&&c(p),K(U)}else c(p);y=u(p)}if(y!==null)Z=!0;else{var S=u(m);S!==null&&Dt(F,S.startTime-U),Z=!1}}break e}finally{y=null,C=ae,O=!1}Z=void 0}}finally{Z?qe():$=!1}}}var qe;if(typeof V=="function")qe=function(){V(Ve)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ot=he.port2;he.port1.onmessage=Ve,qe=function(){ot.postMessage(null)}}else qe=function(){Q(Ve,0)};function Dt(U,Z){Y=Q(function(){U(r.unstable_now())},Z)}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"):I=0<U?Math.floor(1e3/U):5},r.unstable_getCurrentPriorityLevel=function(){return C},r.unstable_next=function(U){switch(C){case 1:case 2:case 3:var Z=3;break;default:Z=C}var ae=C;C=Z;try{return U()}finally{C=ae}},r.unstable_requestPaint=function(){R=!0},r.unstable_runWithPriority=function(U,Z){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ae=C;C=U;try{return Z()}finally{C=ae}},r.unstable_scheduleCallback=function(U,Z,ae){var Ne=r.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Ne+ae:Ne):ae=Ne,U){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=ae+Ae,U={id:j++,callback:Z,priorityLevel:U,startTime:ae,expirationTime:Ae,sortIndex:-1},ae>Ne?(U.sortIndex=ae,o(m,U),u(p)===null&&U===u(m)&&(w?(H(Y),Y=-1):w=!0,Dt(F,ae-Ne))):(U.sortIndex=Ae,o(p,U),G||O||(G=!0,$||($=!0,qe()))),U},r.unstable_shouldYield=Ce,r.unstable_wrapCallback=function(U){var Z=C;return function(){var ae=C;C=Z;try{return U.apply(this,arguments)}finally{C=ae}}}})(Zc)),Zc}var v0;function qh(){return v0||(v0=1,Vc.exports=Bh()),Vc.exports}var $c={exports:{}},Ie={};var b0;function Yh(){if(b0)return Ie;b0=1;var r=tu();function o(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)m+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+p+"; visit "+m+" 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(o(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},d=Symbol.for("react.portal");function x(p,m,j){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:y==null?null:""+y,children:p,containerInfo:m,implementation:j}}var g=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ie.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,Ie.createPortal=function(p,m){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(o(299));return x(p,m,null,j)},Ie.flushSync=function(p){var m=g.T,j=c.p;try{if(g.T=null,c.p=2,p)return p()}finally{g.T=m,c.p=j,c.d.f()}},Ie.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,c.d.C(p,m))},Ie.prefetchDNS=function(p){typeof p=="string"&&c.d.D(p)},Ie.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var j=m.as,y=v(j,m.crossOrigin),C=typeof m.integrity=="string"?m.integrity:void 0,O=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;j==="style"?c.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:C,fetchPriority:O}):j==="script"&&c.d.X(p,{crossOrigin:y,integrity:C,fetchPriority:O,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ie.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var j=v(m.as,m.crossOrigin);c.d.M(p,{crossOrigin:j,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&c.d.M(p)},Ie.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var j=m.as,y=v(j,m.crossOrigin);c.d.L(p,j,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ie.preloadModule=function(p,m){if(typeof p=="string")if(m){var j=v(m.as,m.crossOrigin);c.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:j,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else c.d.m(p)},Ie.requestFormReset=function(p){c.d.r(p)},Ie.unstable_batchedUpdates=function(p,m){return p(m)},Ie.useFormState=function(p,m,j){return g.H.useFormState(p,m,j)},Ie.useFormStatus=function(){return g.H.useHostTransitionStatus()},Ie.version="19.2.4",Ie}var j0;function Gh(){if(j0)return $c.exports;j0=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(o){console.error(o)}}return r(),$c.exports=Yh(),$c.exports}var N0;function Xh(){if(N0)return Gn;N0=1;var r=qh(),o=tu(),u=Gh();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 d(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 v(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 p(e){if(x(e)!==e)throw Error(c(188))}function m(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 p(s),e;if(i===l)return p(s),t;i=i.sibling}throw Error(c(188))}if(a.return!==l.return)a=s,l=i;else{for(var f=!1,h=s.child;h;){if(h===a){f=!0,a=s,l=i;break}if(h===l){f=!0,l=s,a=i;break}h=h.sibling}if(!f){for(h=i.child;h;){if(h===a){f=!0,a=i,l=s;break}if(h===l){f=!0,l=i,a=s;break}h=h.sibling}if(!f)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 j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,C=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),G=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),V=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),Ce=Symbol.for("react.memo_cache_sentinel"),Ve=Symbol.iterator;function qe(e){return e===null||typeof e!="object"?null:(e=Ve&&e[Ve]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function ot(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case Q:return"Profiler";case R:return"StrictMode";case F:return"Suspense";case $:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case G:return"Portal";case V:return e.displayName||"Context";case H:return(e._context.displayName||"Context")+".Consumer";case K:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:ot(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return ot(e(t))}catch{}}return null}var Dt=Array.isArray,U=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Ne=[],Ae=-1;function S(e){return{current:e}}function q(e){0>Ae||(e.current=Ne[Ae],Ne[Ae]=null,Ae--)}function k(e,t){Ae++,Ne[Ae]=e.current,e.current=t}var W=S(null),se=S(null),ce=S(null),ve=S(null);function et(e,t){switch(k(ce,t),k(se,e),k(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Bd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(W),k(W,e)}function Ue(){q(W),q(se),q(ce)}function $l(e){e.memoizedState!==null&&k(ve,e);var t=W.current,a=Bd(t,e.type);t!==a&&(k(se,e),k(W,a))}function Jn(e){se.current===e&&(q(W),q(se)),ve.current===e&&(q(ve),Ln._currentValue=ae)}var Si,fu;function Ha(e){if(Si===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Si=t&&t[1]||"",fu=-1<a.stack.indexOf(`
|
|
1
|
+
(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))c(d);new MutationObserver(d=>{for(const x of d)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(d){const x={};return d.integrity&&(x.integrity=d.integrity),d.referrerPolicy&&(x.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?x.credentials="include":d.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function c(d){if(d.ep)return;d.ep=!0;const x=u(d);fetch(d.href,x)}})();var Gc={exports:{}},Yn={};var x0;function Uh(){if(x0)return Yn;x0=1;var r=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function u(c,d,x){var g=null;if(x!==void 0&&(g=""+x),d.key!==void 0&&(g=""+d.key),"key"in d){x={};for(var v in d)v!=="key"&&(x[v]=d[v])}else x=d;return d=x.ref,{$$typeof:r,type:c,key:g,ref:d!==void 0?d:null,props:x}}return Yn.Fragment=o,Yn.jsx=u,Yn.jsxs=u,Yn}var h0;function Lh(){return h0||(h0=1,Gc.exports=Uh()),Gc.exports}var n=Lh(),Xc={exports:{}},le={};var g0;function Hh(){if(g0)return le;g0=1;var r=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),C=Symbol.iterator;function O(S){return S===null||typeof S!="object"?null:(S=C&&S[C]||S["@@iterator"],typeof S=="function"?S:null)}var G={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,R={};function Q(S,q,k){this.props=S,this.context=q,this.refs=R,this.updater=k||G}Q.prototype.isReactComponent={},Q.prototype.setState=function(S,q){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,q,"setState")},Q.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function H(){}H.prototype=Q.prototype;function V(S,q,k){this.props=S,this.context=q,this.refs=R,this.updater=k||G}var K=V.prototype=new H;K.constructor=V,w(K,Q.prototype),K.isPureReactComponent=!0;var W=Array.isArray;function $(){}var Y={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function X(S,q,k){var F=k.ref;return{$$typeof:r,type:S,key:q,ref:F!==void 0?F:null,props:k}}function Ce(S,q){return X(S.type,q,S.props)}function Ve(S){return typeof S=="object"&&S!==null&&S.$$typeof===r}function qe(S){var q={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(k){return q[k]})}var Ot=/\/+/g;function Dt(S,q){return typeof S=="object"&&S!==null&&S.key!=null?qe(""+S.key):q.toString(36)}function ce(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then($,$):(S.status="pending",S.then(function(q){S.status==="pending"&&(S.status="fulfilled",S.value=q)},function(q){S.status==="pending"&&(S.status="rejected",S.reason=q)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function D(S,q,k,F,se){var ue=typeof S;(ue==="undefined"||ue==="boolean")&&(S=null);var ve=!1;if(S===null)ve=!0;else switch(ue){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(S.$$typeof){case r:case o:ve=!0;break;case j:return ve=S._init,D(ve(S._payload),q,k,F,se)}}if(ve)return se=se(S),ve=F===""?"."+Dt(S,0):F,W(se)?(k="",ve!=null&&(k=ve.replace(Ot,"$&/")+"/"),D(se,q,k,"",function($l){return $l})):se!=null&&(Ve(se)&&(se=Ce(se,k+(se.key==null||S&&S.key===se.key?"":(""+se.key).replace(Ot,"$&/")+"/")+ve)),q.push(se)),1;ve=0;var et=F===""?".":F+":";if(W(S))for(var Le=0;Le<S.length;Le++)F=S[Le],ue=et+Dt(F,Le),ve+=D(F,q,k,ue,se);else if(Le=O(S),typeof Le=="function")for(S=Le.call(S),Le=0;!(F=S.next()).done;)F=F.value,ue=et+Dt(F,Le++),ve+=D(F,q,k,ue,se);else if(ue==="object"){if(typeof S.then=="function")return D(ce(S),q,k,F,se);throw q=String(S),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ve}function Z(S,q,k){if(S==null)return S;var F=[],se=0;return D(S,F,"","",function(ue){return q.call(k,ue,se++)}),F}function ae(S){if(S._status===-1){var q=S._result;q=q(),q.then(function(k){(S._status===0||S._status===-1)&&(S._status=1,S._result=k)},function(k){(S._status===0||S._status===-1)&&(S._status=2,S._result=k)}),S._status===-1&&(S._status=0,S._result=q)}if(S._status===1)return S._result.default;throw S._result}var Ne=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},Ae={map:Z,forEach:function(S,q,k){Z(S,function(){q.apply(this,arguments)},k)},count:function(S){var q=0;return Z(S,function(){q++}),q},toArray:function(S){return Z(S,function(q){return q})||[]},only:function(S){if(!Ve(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return le.Activity=y,le.Children=Ae,le.Component=Q,le.Fragment=u,le.Profiler=d,le.PureComponent=V,le.StrictMode=c,le.Suspense=p,le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,le.__COMPILER_RUNTIME={__proto__:null,c:function(S){return Y.H.useMemoCache(S)}},le.cache=function(S){return function(){return S.apply(null,arguments)}},le.cacheSignal=function(){return null},le.cloneElement=function(S,q,k){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var F=w({},S.props),se=S.key;if(q!=null)for(ue in q.key!==void 0&&(se=""+q.key),q)!I.call(q,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&q.ref===void 0||(F[ue]=q[ue]);var ue=arguments.length-2;if(ue===1)F.children=k;else if(1<ue){for(var ve=Array(ue),et=0;et<ue;et++)ve[et]=arguments[et+2];F.children=ve}return X(S.type,se,F)},le.createContext=function(S){return S={$$typeof:g,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:x,_context:S},S},le.createElement=function(S,q,k){var F,se={},ue=null;if(q!=null)for(F in q.key!==void 0&&(ue=""+q.key),q)I.call(q,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(se[F]=q[F]);var ve=arguments.length-2;if(ve===1)se.children=k;else if(1<ve){for(var et=Array(ve),Le=0;Le<ve;Le++)et[Le]=arguments[Le+2];se.children=et}if(S&&S.defaultProps)for(F in ve=S.defaultProps,ve)se[F]===void 0&&(se[F]=ve[F]);return X(S,ue,se)},le.createRef=function(){return{current:null}},le.forwardRef=function(S){return{$$typeof:v,render:S}},le.isValidElement=Ve,le.lazy=function(S){return{$$typeof:j,_payload:{_status:-1,_result:S},_init:ae}},le.memo=function(S,q){return{$$typeof:m,type:S,compare:q===void 0?null:q}},le.startTransition=function(S){var q=Y.T,k={};Y.T=k;try{var F=S(),se=Y.S;se!==null&&se(k,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then($,Ne)}catch(ue){Ne(ue)}finally{q!==null&&k.types!==null&&(q.types=k.types),Y.T=q}},le.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},le.use=function(S){return Y.H.use(S)},le.useActionState=function(S,q,k){return Y.H.useActionState(S,q,k)},le.useCallback=function(S,q){return Y.H.useCallback(S,q)},le.useContext=function(S){return Y.H.useContext(S)},le.useDebugValue=function(){},le.useDeferredValue=function(S,q){return Y.H.useDeferredValue(S,q)},le.useEffect=function(S,q){return Y.H.useEffect(S,q)},le.useEffectEvent=function(S){return Y.H.useEffectEvent(S)},le.useId=function(){return Y.H.useId()},le.useImperativeHandle=function(S,q,k){return Y.H.useImperativeHandle(S,q,k)},le.useInsertionEffect=function(S,q){return Y.H.useInsertionEffect(S,q)},le.useLayoutEffect=function(S,q){return Y.H.useLayoutEffect(S,q)},le.useMemo=function(S,q){return Y.H.useMemo(S,q)},le.useOptimistic=function(S,q){return Y.H.useOptimistic(S,q)},le.useReducer=function(S,q,k){return Y.H.useReducer(S,q,k)},le.useRef=function(S){return Y.H.useRef(S)},le.useState=function(S){return Y.H.useState(S)},le.useSyncExternalStore=function(S,q,k){return Y.H.useSyncExternalStore(S,q,k)},le.useTransition=function(){return Y.H.useTransition()},le.version="19.2.4",le}var y0;function tu(){return y0||(y0=1,Xc.exports=Hh()),Xc.exports}var E=tu(),Qc={exports:{}},Gn={},Vc={exports:{}},Zc={};var p0;function Bh(){return p0||(p0=1,(function(r){function o(D,Z){var ae=D.length;D.push(Z);e:for(;0<ae;){var Ne=ae-1>>>1,Ae=D[Ne];if(0<d(Ae,Z))D[Ne]=Z,D[ae]=Ae,ae=Ne;else break e}}function u(D){return D.length===0?null:D[0]}function c(D){if(D.length===0)return null;var Z=D[0],ae=D.pop();if(ae!==Z){D[0]=ae;e:for(var Ne=0,Ae=D.length,S=Ae>>>1;Ne<S;){var q=2*(Ne+1)-1,k=D[q],F=q+1,se=D[F];if(0>d(k,ae))F<Ae&&0>d(se,k)?(D[Ne]=se,D[F]=ae,Ne=F):(D[Ne]=k,D[q]=ae,Ne=q);else if(F<Ae&&0>d(se,ae))D[Ne]=se,D[F]=ae,Ne=F;else break e}}return Z}function d(D,Z){var ae=D.sortIndex-Z.sortIndex;return ae!==0?ae:D.id-Z.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,v=g.now();r.unstable_now=function(){return g.now()-v}}var p=[],m=[],j=1,y=null,C=3,O=!1,G=!1,w=!1,R=!1,Q=typeof setTimeout=="function"?setTimeout:null,H=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function K(D){for(var Z=u(m);Z!==null;){if(Z.callback===null)c(m);else if(Z.startTime<=D)c(m),Z.sortIndex=Z.expirationTime,o(p,Z);else break;Z=u(m)}}function W(D){if(w=!1,K(D),!G)if(u(p)!==null)G=!0,$||($=!0,qe());else{var Z=u(m);Z!==null&&ce(W,Z.startTime-D)}}var $=!1,Y=-1,I=5,X=-1;function Ce(){return R?!0:!(r.unstable_now()-X<I)}function Ve(){if(R=!1,$){var D=r.unstable_now();X=D;var Z=!0;try{e:{G=!1,w&&(w=!1,H(Y),Y=-1),O=!0;var ae=C;try{t:{for(K(D),y=u(p);y!==null&&!(y.expirationTime>D&&Ce());){var Ne=y.callback;if(typeof Ne=="function"){y.callback=null,C=y.priorityLevel;var Ae=Ne(y.expirationTime<=D);if(D=r.unstable_now(),typeof Ae=="function"){y.callback=Ae,K(D),Z=!0;break t}y===u(p)&&c(p),K(D)}else c(p);y=u(p)}if(y!==null)Z=!0;else{var S=u(m);S!==null&&ce(W,S.startTime-D),Z=!1}}break e}finally{y=null,C=ae,O=!1}Z=void 0}}finally{Z?qe():$=!1}}}var qe;if(typeof V=="function")qe=function(){V(Ve)};else if(typeof MessageChannel<"u"){var Ot=new MessageChannel,Dt=Ot.port2;Ot.port1.onmessage=Ve,qe=function(){Dt.postMessage(null)}}else qe=function(){Q(Ve,0)};function ce(D,Z){Y=Q(function(){D(r.unstable_now())},Z)}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(D){D.callback=null},r.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<D?Math.floor(1e3/D):5},r.unstable_getCurrentPriorityLevel=function(){return C},r.unstable_next=function(D){switch(C){case 1:case 2:case 3:var Z=3;break;default:Z=C}var ae=C;C=Z;try{return D()}finally{C=ae}},r.unstable_requestPaint=function(){R=!0},r.unstable_runWithPriority=function(D,Z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ae=C;C=D;try{return Z()}finally{C=ae}},r.unstable_scheduleCallback=function(D,Z,ae){var Ne=r.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Ne+ae:Ne):ae=Ne,D){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=ae+Ae,D={id:j++,callback:Z,priorityLevel:D,startTime:ae,expirationTime:Ae,sortIndex:-1},ae>Ne?(D.sortIndex=ae,o(m,D),u(p)===null&&D===u(m)&&(w?(H(Y),Y=-1):w=!0,ce(W,ae-Ne))):(D.sortIndex=Ae,o(p,D),G||O||(G=!0,$||($=!0,qe()))),D},r.unstable_shouldYield=Ce,r.unstable_wrapCallback=function(D){var Z=C;return function(){var ae=C;C=Z;try{return D.apply(this,arguments)}finally{C=ae}}}})(Zc)),Zc}var v0;function qh(){return v0||(v0=1,Vc.exports=Bh()),Vc.exports}var $c={exports:{}},Ie={};var b0;function Yh(){if(b0)return Ie;b0=1;var r=tu();function o(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)m+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+p+"; visit "+m+" 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(o(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},d=Symbol.for("react.portal");function x(p,m,j){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:y==null?null:""+y,children:p,containerInfo:m,implementation:j}}var g=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ie.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,Ie.createPortal=function(p,m){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(o(299));return x(p,m,null,j)},Ie.flushSync=function(p){var m=g.T,j=c.p;try{if(g.T=null,c.p=2,p)return p()}finally{g.T=m,c.p=j,c.d.f()}},Ie.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,c.d.C(p,m))},Ie.prefetchDNS=function(p){typeof p=="string"&&c.d.D(p)},Ie.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var j=m.as,y=v(j,m.crossOrigin),C=typeof m.integrity=="string"?m.integrity:void 0,O=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;j==="style"?c.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:C,fetchPriority:O}):j==="script"&&c.d.X(p,{crossOrigin:y,integrity:C,fetchPriority:O,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ie.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var j=v(m.as,m.crossOrigin);c.d.M(p,{crossOrigin:j,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&c.d.M(p)},Ie.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var j=m.as,y=v(j,m.crossOrigin);c.d.L(p,j,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ie.preloadModule=function(p,m){if(typeof p=="string")if(m){var j=v(m.as,m.crossOrigin);c.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:j,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else c.d.m(p)},Ie.requestFormReset=function(p){c.d.r(p)},Ie.unstable_batchedUpdates=function(p,m){return p(m)},Ie.useFormState=function(p,m,j){return g.H.useFormState(p,m,j)},Ie.useFormStatus=function(){return g.H.useHostTransitionStatus()},Ie.version="19.2.4",Ie}var j0;function Gh(){if(j0)return $c.exports;j0=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(o){console.error(o)}}return r(),$c.exports=Yh(),$c.exports}var N0;function Xh(){if(N0)return Gn;N0=1;var r=qh(),o=tu(),u=Gh();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 d(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 v(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 p(e){if(x(e)!==e)throw Error(c(188))}function m(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 p(s),e;if(i===l)return p(s),t;i=i.sibling}throw Error(c(188))}if(a.return!==l.return)a=s,l=i;else{for(var f=!1,h=s.child;h;){if(h===a){f=!0,a=s,l=i;break}if(h===l){f=!0,l=s,a=i;break}h=h.sibling}if(!f){for(h=i.child;h;){if(h===a){f=!0,a=i,l=s;break}if(h===l){f=!0,l=i,a=s;break}h=h.sibling}if(!f)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 j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,C=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),G=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),H=Symbol.for("react.consumer"),V=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),Ce=Symbol.for("react.memo_cache_sentinel"),Ve=Symbol.iterator;function qe(e){return e===null||typeof e!="object"?null:(e=Ve&&e[Ve]||e["@@iterator"],typeof e=="function"?e:null)}var Ot=Symbol.for("react.client.reference");function Dt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ot?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case Q:return"Profiler";case R:return"StrictMode";case W:return"Suspense";case $:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case G:return"Portal";case V:return e.displayName||"Context";case H:return(e._context.displayName||"Context")+".Consumer";case K:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:Dt(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return Dt(e(t))}catch{}}return null}var ce=Array.isArray,D=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=u.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Ne=[],Ae=-1;function S(e){return{current:e}}function q(e){0>Ae||(e.current=Ne[Ae],Ne[Ae]=null,Ae--)}function k(e,t){Ae++,Ne[Ae]=e.current,e.current=t}var F=S(null),se=S(null),ue=S(null),ve=S(null);function et(e,t){switch(k(ue,t),k(se,e),k(F,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Bd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(F),k(F,e)}function Le(){q(F),q(se),q(ue)}function $l(e){e.memoizedState!==null&&k(ve,e);var t=F.current,a=Bd(t,e.type);t!==a&&(k(se,e),k(F,a))}function Wn(e){se.current===e&&(q(F),q(se)),ve.current===e&&(q(ve),Ln._currentValue=ae)}var Si,fu;function Ha(e){if(Si===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Si=t&&t[1]||"",fu=-1<a.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
3
|
`+Si+e+fu}var Ei=!1;function Ti(e,t){if(!e||Ei)return"";Ei=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(_){var z=_}Reflect.construct(e,[],B)}else{try{B.call()}catch(_){z=_}e.call(B.prototype)}}else{try{throw Error()}catch(_){z=_}(B=e())&&typeof B.catch=="function"&&B.catch(function(){})}}catch(_){if(_&&z&&typeof _.stack=="string")return[_.stack,z.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(),f=i[0],h=i[1];if(f&&h){var b=f.split(`
|
|
4
4
|
`),M=h.split(`
|
|
5
|
-
`);for(s=l=0;l<b.length&&!b[l].includes("DetermineComponentFrameRoot");)l++;for(;s<M.length&&!M[s].includes("DetermineComponentFrameRoot");)s++;if(l===b.length||s===M.length)for(l=b.length-1,s=M.length-1;1<=l&&0<=s&&b[l]!==M[s];)s--;for(;1<=l&&0<=s;l--,s--)if(b[l]!==M[s]){if(l!==1||s!==1)do if(l--,s--,0>s||b[l]!==M[s]){var
|
|
6
|
-
`+b[l].replace(" at new "," at ");return e.displayName&&
|
|
5
|
+
`);for(s=l=0;l<b.length&&!b[l].includes("DetermineComponentFrameRoot");)l++;for(;s<M.length&&!M[s].includes("DetermineComponentFrameRoot");)s++;if(l===b.length||s===M.length)for(l=b.length-1,s=M.length-1;1<=l&&0<=s&&b[l]!==M[s];)s--;for(;1<=l&&0<=s;l--,s--)if(b[l]!==M[s]){if(l!==1||s!==1)do if(l--,s--,0>s||b[l]!==M[s]){var U=`
|
|
6
|
+
`+b[l].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=l&&0<=s);break}}}finally{Ei=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ha(a):""}function dm(e,t){switch(e.tag){case 26:case 27:case 5:return Ha(e.type);case 16:return Ha("Lazy");case 13:return e.child!==t&&t!==null?Ha("Suspense Fallback"):Ha("Suspense");case 19:return Ha("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 Ha("Activity");default:return""}}function du(e){try{var t="",a=null;do t+=dm(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
7
|
Error generating stack: `+l.message+`
|
|
8
|
-
`+l.stack}}var Ci=Object.prototype.hasOwnProperty,Ai=r.unstable_scheduleCallback,Mi=r.unstable_cancelCallback,mm=r.unstable_shouldYield,xm=r.unstable_requestPaint,ft=r.unstable_now,hm=r.unstable_getCurrentPriorityLevel,mu=r.unstable_ImmediatePriority,xu=r.unstable_UserBlockingPriority,Wn=r.unstable_NormalPriority,gm=r.unstable_LowPriority,hu=r.unstable_IdlePriority,ym=r.log,pm=r.unstable_setDisableYieldValue,kl=null,dt=null;function oa(e){if(typeof ym=="function"&&pm(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(kl,e)}catch{}}var mt=Math.clz32?Math.clz32:jm,vm=Math.log,bm=Math.LN2;function jm(e){return e>>>=0,e===0?32:31-(vm(e)/bm|0)|0}var Fn=256,Pn=262144,In=4194304;function Ba(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 es(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var s=0,i=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~i,l!==0?s=Ba(l):(f&=h,f!==0?s=Ba(f):a||(a=h&~e,a!==0&&(s=Ba(a))))):(h=l&~i,h!==0?s=Ba(h):f!==0?s=Ba(f):a||(a=l&~e,a!==0&&(s=Ba(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 Kl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Nm(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 gu(){var e=In;return In<<=1,(In&62914560)===0&&(In=4194304),e}function zi(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Jl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Sm(e,t,a,l,s,i){var f=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,b=e.expirationTimes,M=e.hiddenUpdates;for(a=f&~a;0<a;){var D=31-mt(a),B=1<<D;h[D]=0,b[D]=-1;var z=M[D];if(z!==null)for(M[D]=null,D=0;D<z.length;D++){var _=z[D];_!==null&&(_.lane&=-536870913)}a&=~B}l!==0&&yu(e,l,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(f&~t))}function yu(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-mt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function pu(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-mt(a),s=1<<l;s&t|e[l]&t&&(e[l]|=t),a&=~s}}function vu(e,t){var a=t&-t;return a=(a&42)!==0?1:Ri(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ri(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 _i(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function bu(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:r0(e.type))}function ju(e,t){var a=Z.p;try{return Z.p=e,t()}finally{Z.p=a}}var fa=Math.random().toString(36).slice(2),Ke="__reactFiber$"+fa,lt="__reactProps$"+fa,ll="__reactContainer$"+fa,wi="__reactEvents$"+fa,Em="__reactListeners$"+fa,Tm="__reactHandles$"+fa,Nu="__reactResources$"+fa,Wl="__reactMarker$"+fa;function Oi(e){delete e[Ke],delete e[lt],delete e[wi],delete e[Em],delete e[Tm]}function nl(e){var t=e[Ke];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ll]||a[Ke]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Zd(e);e!==null;){if(a=e[Ke])return a;e=Zd(e)}return t}e=a,a=e.parentNode}return null}function sl(e){if(e=e[Ke]||e[ll]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Fl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function il(e){var t=e[Nu];return t||(t=e[Nu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function $e(e){e[Wl]=!0}var Su=new Set,Eu={};function qa(e,t){rl(e,t),rl(e+"Capture",t)}function rl(e,t){for(Eu[e]=t,e=0;e<t.length;e++)Su.add(t[e])}var Cm=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]*$"),Tu={},Cu={};function Am(e){return Ci.call(Cu,e)?!0:Ci.call(Tu,e)?!1:Cm.test(e)?Cu[e]=!0:(Tu[e]=!0,!1)}function ts(e,t,a){if(Am(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 as(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 Vt(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 St(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Au(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mm(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(f){a=""+f,i.call(this,f)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(f){a=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Di(e){if(!e._valueTracker){var t=Au(e)?"checked":"value";e._valueTracker=Mm(e,t,""+e[t])}}function Mu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Au(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ls(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 zm=/[\n"\\]/g;function Et(e){return e.replace(zm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ui(e,t,a,l,s,i,f,h){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+St(t)):e.value!==""+St(t)&&(e.value=""+St(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?Li(e,f,St(t)):a!=null?Li(e,f,St(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=""+St(h):e.removeAttribute("name")}function zu(e,t,a,l,s,i,f,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)){Di(e);return}a=a!=null?""+St(a):"",t=t!=null?""+St(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,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),Di(e)}function Li(e,t,a){t==="number"&&ls(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function cl(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=""+St(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 Ru(e,t,a){if(t!=null&&(t=""+St(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+St(a):""}function _u(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(c(92));if(Dt(l)){if(1<l.length)throw Error(c(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=St(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Di(e)}function ul(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Rm=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 wu(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||Rm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Ou(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&&wu(e,s,l)}else for(var i in t)t.hasOwnProperty(i)&&wu(e,i,t[i])}function Hi(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 _m=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"]]),wm=/^[\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 ns(e){return wm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var Bi=null;function qi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ol=null,fl=null;function Du(e){var t=sl(e);if(t&&(e=t.stateNode)){var a=e[lt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ui(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="'+Et(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var s=l[lt]||null;if(!s)throw Error(c(90));Ui(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&&Mu(l)}break e;case"textarea":Ru(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&cl(e,!!a.multiple,t,!1)}}}var Yi=!1;function Uu(e,t,a){if(Yi)return e(t,a);Yi=!0;try{var l=e(t);return l}finally{if(Yi=!1,(ol!==null||fl!==null)&&(Zs(),ol&&(t=ol,e=fl,fl=ol=null,Du(t),e)))for(t=0;t<e.length;t++)Du(e[t])}}function Pl(e,t){var a=e.stateNode;if(a===null)return null;var l=a[lt]||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 $t=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gi=!1;if($t)try{var Il={};Object.defineProperty(Il,"passive",{get:function(){Gi=!0}}),window.addEventListener("test",Il,Il),window.removeEventListener("test",Il,Il)}catch{Gi=!1}var da=null,Xi=null,ss=null;function Lu(){if(ss)return ss;var e,t=Xi,a=t.length,l,s="value"in da?da.value:da.textContent,i=s.length;for(e=0;e<a&&t[e]===s[e];e++);var f=a-e;for(l=1;l<=f&&t[a-l]===s[i-l];l++);return ss=s.slice(e,1<l?1-l:void 0)}function is(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 rs(){return!0}function Hu(){return!1}function nt(e){function t(a,l,s,i,f){this._reactName=a,this._targetInst=s,this.type=l,this.nativeEvent=i,this.target=f,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)?rs:Hu,this.isPropagationStopped=Hu,this}return y(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=rs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=rs)},persist:function(){},isPersistent:rs}),t}var Ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cs=nt(Ya),en=y({},Ya,{view:0,detail:0}),Om=nt(en),Qi,Vi,tn,us=y({},en,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$i,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!==tn&&(tn&&e.type==="mousemove"?(Qi=e.screenX-tn.screenX,Vi=e.screenY-tn.screenY):Vi=Qi=0,tn=e),Qi)},movementY:function(e){return"movementY"in e?e.movementY:Vi}}),Bu=nt(us),Dm=y({},us,{dataTransfer:0}),Um=nt(Dm),Lm=y({},en,{relatedTarget:0}),Zi=nt(Lm),Hm=y({},Ya,{animationName:0,elapsedTime:0,pseudoElement:0}),Bm=nt(Hm),qm=y({},Ya,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ym=nt(qm),Gm=y({},Ya,{data:0}),qu=nt(Gm),Xm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qm={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"},Vm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vm[e])?!!t[e]:!1}function $i(){return Zm}var $m=y({},en,{key:function(e){if(e.key){var t=Xm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=is(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Qm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$i,charCode:function(e){return e.type==="keypress"?is(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?is(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),km=nt($m),Km=y({},us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yu=nt(Km),Jm=y({},en,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$i}),Wm=nt(Jm),Fm=y({},Ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pm=nt(Fm),Im=y({},us,{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}),ex=nt(Im),tx=y({},Ya,{newState:0,oldState:0}),ax=nt(tx),lx=[9,13,27,32],ki=$t&&"CompositionEvent"in window,an=null;$t&&"documentMode"in document&&(an=document.documentMode);var nx=$t&&"TextEvent"in window&&!an,Gu=$t&&(!ki||an&&8<an&&11>=an),Xu=" ",Qu=!1;function Vu(e,t){switch(e){case"keyup":return lx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dl=!1;function sx(e,t){switch(e){case"compositionend":return Zu(t);case"keypress":return t.which!==32?null:(Qu=!0,Xu);case"textInput":return e=t.data,e===Xu&&Qu?null:e;default:return null}}function ix(e,t){if(dl)return e==="compositionend"||!ki&&Vu(e,t)?(e=Lu(),ss=Xi=da=null,dl=!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 Gu&&t.locale!=="ko"?null:t.data;default:return null}}var rx={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 $u(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rx[e.type]:t==="textarea"}function ku(e,t,a,l){ol?fl?fl.push(l):fl=[l]:ol=l,t=Ps(t,"onChange"),0<t.length&&(a=new cs("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var ln=null,nn=null;function cx(e){_d(e,0)}function os(e){var t=Fl(e);if(Mu(t))return e}function Ku(e,t){if(e==="change")return t}var Ju=!1;if($t){var Ki;if($t){var Ji="oninput"in document;if(!Ji){var Wu=document.createElement("div");Wu.setAttribute("oninput","return;"),Ji=typeof Wu.oninput=="function"}Ki=Ji}else Ki=!1;Ju=Ki&&(!document.documentMode||9<document.documentMode)}function Fu(){ln&&(ln.detachEvent("onpropertychange",Pu),nn=ln=null)}function Pu(e){if(e.propertyName==="value"&&os(nn)){var t=[];ku(t,nn,e,qi(e)),Uu(cx,t)}}function ux(e,t,a){e==="focusin"?(Fu(),ln=t,nn=a,ln.attachEvent("onpropertychange",Pu)):e==="focusout"&&Fu()}function ox(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return os(nn)}function fx(e,t){if(e==="click")return os(t)}function dx(e,t){if(e==="input"||e==="change")return os(t)}function mx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:mx;function sn(e,t){if(xt(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(!Ci.call(t,s)||!xt(e[s],t[s]))return!1}return!0}function Iu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eo(e,t){var a=Iu(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=Iu(a)}}function to(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?to(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ao(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ls(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=ls(e.document)}return t}function Wi(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 xx=$t&&"documentMode"in document&&11>=document.documentMode,ml=null,Fi=null,rn=null,Pi=!1;function lo(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Pi||ml==null||ml!==ls(l)||(l=ml,"selectionStart"in l&&Wi(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}),rn&&sn(rn,l)||(rn=l,l=Ps(Fi,"onSelect"),0<l.length&&(t=new cs("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=ml)))}function Ga(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var xl={animationend:Ga("Animation","AnimationEnd"),animationiteration:Ga("Animation","AnimationIteration"),animationstart:Ga("Animation","AnimationStart"),transitionrun:Ga("Transition","TransitionRun"),transitionstart:Ga("Transition","TransitionStart"),transitioncancel:Ga("Transition","TransitionCancel"),transitionend:Ga("Transition","TransitionEnd")},Ii={},no={};$t&&(no=document.createElement("div").style,"AnimationEvent"in window||(delete xl.animationend.animation,delete xl.animationiteration.animation,delete xl.animationstart.animation),"TransitionEvent"in window||delete xl.transitionend.transition);function Xa(e){if(Ii[e])return Ii[e];if(!xl[e])return e;var t=xl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in no)return Ii[e]=t[a];return e}var so=Xa("animationend"),io=Xa("animationiteration"),ro=Xa("animationstart"),hx=Xa("transitionrun"),gx=Xa("transitionstart"),yx=Xa("transitioncancel"),co=Xa("transitionend"),uo=new Map,er="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(" ");er.push("scrollEnd");function Ut(e,t){uo.set(e,t),qa(t,[e])}var fs=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)},Tt=[],hl=0,tr=0;function ds(){for(var e=hl,t=tr=hl=0;t<e;){var a=Tt[t];Tt[t++]=null;var l=Tt[t];Tt[t++]=null;var s=Tt[t];Tt[t++]=null;var i=Tt[t];if(Tt[t++]=null,l!==null&&s!==null){var f=l.pending;f===null?s.next=s:(s.next=f.next,f.next=s),l.pending=s}i!==0&&oo(a,s,i)}}function ms(e,t,a,l){Tt[hl++]=e,Tt[hl++]=t,Tt[hl++]=a,Tt[hl++]=l,tr|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function ar(e,t,a,l){return ms(e,t,a,l),xs(e)}function Qa(e,t){return ms(e,null,null,t),xs(e)}function oo(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-mt(a),e=i.hiddenUpdates,l=e[s],l===null?e[s]=[t]:l.push(t),t.lane=a|536870912),i):null}function xs(e){if(50<zn)throw zn=0,fc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var gl={};function px(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 ht(e,t,a,l){return new px(e,t,a,l)}function lr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kt(e,t){var a=e.alternate;return a===null?(a=ht(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 fo(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 hs(e,t,a,l,s,i){var f=0;if(l=e,typeof e=="function")lr(e)&&(f=1);else if(typeof e=="string")f=Sh(e,a,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=ht(31,a,t,s),e.elementType=X,e.lanes=i,e;case w:return Va(a.children,s,i,t);case R:f=8,s|=24;break;case Q:return e=ht(12,a,t,s|2),e.elementType=Q,e.lanes=i,e;case F:return e=ht(13,a,t,s),e.elementType=F,e.lanes=i,e;case $:return e=ht(19,a,t,s),e.elementType=$,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:f=10;break e;case H:f=9;break e;case K:f=11;break e;case Y:f=14;break e;case I:f=16,l=null;break e}f=29,a=Error(c(130,e===null?"null":typeof e,"")),l=null}return t=ht(f,a,t,s),t.elementType=e,t.type=l,t.lanes=i,t}function Va(e,t,a,l){return e=ht(7,e,l,t),e.lanes=a,e}function nr(e,t,a){return e=ht(6,e,null,t),e.lanes=a,e}function mo(e){var t=ht(18,null,null,0);return t.stateNode=e,t}function sr(e,t,a){return t=ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xo=new WeakMap;function Ct(e,t){if(typeof e=="object"&&e!==null){var a=xo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:du(t)},xo.set(e,t),t)}return{value:e,source:t,stack:du(t)}}var yl=[],pl=0,gs=null,cn=0,At=[],Mt=0,ma=null,qt=1,Yt="";function Kt(e,t){yl[pl++]=cn,yl[pl++]=gs,gs=e,cn=t}function ho(e,t,a){At[Mt++]=qt,At[Mt++]=Yt,At[Mt++]=ma,ma=e;var l=qt;e=Yt;var s=32-mt(l)-1;l&=~(1<<s),a+=1;var i=32-mt(t)+s;if(30<i){var f=s-s%5;i=(l&(1<<f)-1).toString(32),l>>=f,s-=f,qt=1<<32-mt(t)+s|a<<s|l,Yt=i+e}else qt=1<<i|a<<s|l,Yt=e}function ir(e){e.return!==null&&(Kt(e,1),ho(e,1,0))}function rr(e){for(;e===gs;)gs=yl[--pl],yl[pl]=null,cn=yl[--pl],yl[pl]=null;for(;e===ma;)ma=At[--Mt],At[Mt]=null,Yt=At[--Mt],At[Mt]=null,qt=At[--Mt],At[Mt]=null}function go(e,t){At[Mt++]=qt,At[Mt++]=Yt,At[Mt++]=ma,qt=t.id,Yt=t.overflow,ma=e}var Je=null,ze=null,xe=!1,xa=null,zt=!1,cr=Error(c(519));function ha(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw un(Ct(t,e)),cr}function yo(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Ke]=e,t[lt]=l,a){case"dialog":oe("cancel",t),oe("close",t);break;case"iframe":case"object":case"embed":oe("load",t);break;case"video":case"audio":for(a=0;a<_n.length;a++)oe(_n[a],t);break;case"source":oe("error",t);break;case"img":case"image":case"link":oe("error",t),oe("load",t);break;case"details":oe("toggle",t);break;case"input":oe("invalid",t),zu(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":oe("invalid",t);break;case"textarea":oe("invalid",t),_u(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||Ud(t.textContent,a)?(l.popover!=null&&(oe("beforetoggle",t),oe("toggle",t)),l.onScroll!=null&&oe("scroll",t),l.onScrollEnd!=null&&oe("scrollend",t),l.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||ha(e,!0)}function po(e){for(Je=e.return;Je;)switch(Je.tag){case 5:case 31:case 13:zt=!1;return;case 27:case 3:zt=!0;return;default:Je=Je.return}}function vl(e){if(e!==Je)return!1;if(!xe)return po(e),xe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Cc(e.type,e.memoizedProps)),a=!a),a&&ze&&ha(e),po(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ze=Vd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ze=Vd(e)}else t===27?(t=ze,za(e.type)?(e=_c,_c=null,ze=e):ze=t):ze=Je?_t(e.stateNode.nextSibling):null;return!0}function Za(){ze=Je=null,xe=!1}function ur(){var e=xa;return e!==null&&(ct===null?ct=e:ct.push.apply(ct,e),xa=null),e}function un(e){xa===null?xa=[e]:xa.push(e)}var or=S(null),$a=null,Jt=null;function ga(e,t,a){k(or,t._currentValue),t._currentValue=a}function Wt(e){e._currentValue=or.current,q(or)}function fr(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 dr(e,t,a,l){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var f=s.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=s;for(var b=0;b<t.length;b++)if(h.context===t[b]){i.lanes|=a,h=i.alternate,h!==null&&(h.lanes|=a),fr(i.return,a,e),l||(f=null);break e}i=h.next}}else if(s.tag===18){if(f=s.return,f===null)throw Error(c(341));f.lanes|=a,i=f.alternate,i!==null&&(i.lanes|=a),fr(f,a,e),f=null}else f=s.child;if(f!==null)f.return=s;else for(f=s;f!==null;){if(f===e){f=null;break}if(s=f.sibling,s!==null){s.return=f.return,f=s;break}f=f.return}s=f}}function bl(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 f=s.alternate;if(f===null)throw Error(c(387));if(f=f.memoizedProps,f!==null){var h=s.type;xt(s.pendingProps.value,f.value)||(e!==null?e.push(h):e=[h])}}else if(s===ve.current){if(f=s.alternate,f===null)throw Error(c(387));f.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Ln):e=[Ln])}s=s.return}e!==null&&dr(t,e,a,l),t.flags|=262144}function ys(e){for(e=e.firstContext;e!==null;){if(!xt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ka(e){$a=e,Jt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function We(e){return vo($a,e)}function ps(e,t){return $a===null&&ka(e),vo(e,t)}function vo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Jt===null){if(e===null)throw Error(c(308));Jt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jt=Jt.next=t;return a}var vx=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()})}},bx=r.unstable_scheduleCallback,jx=r.unstable_NormalPriority,Ye={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mr(){return{controller:new vx,data:new Map,refCount:0}}function on(e){e.refCount--,e.refCount===0&&bx(jx,function(){e.controller.abort()})}var fn=null,xr=0,jl=0,Nl=null;function Nx(e,t){if(fn===null){var a=fn=[];xr=0,jl=yc(),Nl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return xr++,t.then(bo,bo),t}function bo(){if(--xr===0&&fn!==null){Nl!==null&&(Nl.status="fulfilled");var e=fn;fn=null,jl=0,Nl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Sx(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 jo=U.S;U.S=function(e,t){sd=ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Nx(e,t),jo!==null&&jo(e,t)};var Ka=S(null);function hr(){var e=Ka.current;return e!==null?e:Me.pooledCache}function vs(e,t){t===null?k(Ka,Ka.current):k(Ka,t.pool)}function No(){var e=hr();return e===null?null:{parent:Ye._currentValue,pool:e}}var Sl=Error(c(460)),gr=Error(c(474)),bs=Error(c(542)),js={then:function(){}};function So(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Eo(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,Co(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,Co(e),e}throw Wa=t,Sl}}function Ja(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Wa=a,Sl):a}}var Wa=null;function To(){if(Wa===null)throw Error(c(459));var e=Wa;return Wa=null,e}function Co(e){if(e===Sl||e===bs)throw Error(c(483))}var El=null,dn=0;function Ns(e){var t=dn;return dn+=1,El===null&&(El=[]),Eo(El,e,t)}function mn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ss(e,t){throw t.$$typeof===C?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ao(e){function t(T,N){if(e){var A=T.deletions;A===null?(T.deletions=[N],T.flags|=16):A.push(N)}}function a(T,N){if(!e)return null;for(;N!==null;)t(T,N),N=N.sibling;return null}function l(T){for(var N=new Map;T!==null;)T.key!==null?N.set(T.key,T):N.set(T.index,T),T=T.sibling;return N}function s(T,N){return T=kt(T,N),T.index=0,T.sibling=null,T}function i(T,N,A){return T.index=A,e?(A=T.alternate,A!==null?(A=A.index,A<N?(T.flags|=67108866,N):A):(T.flags|=67108866,N)):(T.flags|=1048576,N)}function f(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function h(T,N,A,L){return N===null||N.tag!==6?(N=nr(A,T.mode,L),N.return=T,N):(N=s(N,A),N.return=T,N)}function b(T,N,A,L){var ee=A.type;return ee===w?D(T,N,A.props.children,L,A.key):N!==null&&(N.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===I&&Ja(ee)===N.type)?(N=s(N,A.props),mn(N,A),N.return=T,N):(N=hs(A.type,A.key,A.props,null,T.mode,L),mn(N,A),N.return=T,N)}function M(T,N,A,L){return N===null||N.tag!==4||N.stateNode.containerInfo!==A.containerInfo||N.stateNode.implementation!==A.implementation?(N=sr(A,T.mode,L),N.return=T,N):(N=s(N,A.children||[]),N.return=T,N)}function D(T,N,A,L,ee){return N===null||N.tag!==7?(N=Va(A,T.mode,L,ee),N.return=T,N):(N=s(N,A),N.return=T,N)}function B(T,N,A){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=nr(""+N,T.mode,A),N.return=T,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case O:return A=hs(N.type,N.key,N.props,null,T.mode,A),mn(A,N),A.return=T,A;case G:return N=sr(N,T.mode,A),N.return=T,N;case I:return N=Ja(N),B(T,N,A)}if(Dt(N)||qe(N))return N=Va(N,T.mode,A,null),N.return=T,N;if(typeof N.then=="function")return B(T,Ns(N),A);if(N.$$typeof===V)return B(T,ps(T,N),A);Ss(T,N)}return null}function z(T,N,A,L){var ee=N!==null?N.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ee!==null?null:h(T,N,""+A,L);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case O:return A.key===ee?b(T,N,A,L):null;case G:return A.key===ee?M(T,N,A,L):null;case I:return A=Ja(A),z(T,N,A,L)}if(Dt(A)||qe(A))return ee!==null?null:D(T,N,A,L,null);if(typeof A.then=="function")return z(T,N,Ns(A),L);if(A.$$typeof===V)return z(T,N,ps(T,A),L);Ss(T,A)}return null}function _(T,N,A,L,ee){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return T=T.get(A)||null,h(N,T,""+L,ee);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case O:return T=T.get(L.key===null?A:L.key)||null,b(N,T,L,ee);case G:return T=T.get(L.key===null?A:L.key)||null,M(N,T,L,ee);case I:return L=Ja(L),_(T,N,A,L,ee)}if(Dt(L)||qe(L))return T=T.get(A)||null,D(N,T,L,ee,null);if(typeof L.then=="function")return _(T,N,A,Ns(L),ee);if(L.$$typeof===V)return _(T,N,A,ps(N,L),ee);Ss(N,L)}return null}function J(T,N,A,L){for(var ee=null,ge=null,P=N,re=N=0,de=null;P!==null&&re<A.length;re++){P.index>re?(de=P,P=null):de=P.sibling;var ye=z(T,P,A[re],L);if(ye===null){P===null&&(P=de);break}e&&P&&ye.alternate===null&&t(T,P),N=i(ye,N,re),ge===null?ee=ye:ge.sibling=ye,ge=ye,P=de}if(re===A.length)return a(T,P),xe&&Kt(T,re),ee;if(P===null){for(;re<A.length;re++)P=B(T,A[re],L),P!==null&&(N=i(P,N,re),ge===null?ee=P:ge.sibling=P,ge=P);return xe&&Kt(T,re),ee}for(P=l(P);re<A.length;re++)de=_(P,T,re,A[re],L),de!==null&&(e&&de.alternate!==null&&P.delete(de.key===null?re:de.key),N=i(de,N,re),ge===null?ee=de:ge.sibling=de,ge=de);return e&&P.forEach(function(Da){return t(T,Da)}),xe&&Kt(T,re),ee}function te(T,N,A,L){if(A==null)throw Error(c(151));for(var ee=null,ge=null,P=N,re=N=0,de=null,ye=A.next();P!==null&&!ye.done;re++,ye=A.next()){P.index>re?(de=P,P=null):de=P.sibling;var Da=z(T,P,ye.value,L);if(Da===null){P===null&&(P=de);break}e&&P&&Da.alternate===null&&t(T,P),N=i(Da,N,re),ge===null?ee=Da:ge.sibling=Da,ge=Da,P=de}if(ye.done)return a(T,P),xe&&Kt(T,re),ee;if(P===null){for(;!ye.done;re++,ye=A.next())ye=B(T,ye.value,L),ye!==null&&(N=i(ye,N,re),ge===null?ee=ye:ge.sibling=ye,ge=ye);return xe&&Kt(T,re),ee}for(P=l(P);!ye.done;re++,ye=A.next())ye=_(P,T,re,ye.value,L),ye!==null&&(e&&ye.alternate!==null&&P.delete(ye.key===null?re:ye.key),N=i(ye,N,re),ge===null?ee=ye:ge.sibling=ye,ge=ye);return e&&P.forEach(function(Dh){return t(T,Dh)}),xe&&Kt(T,re),ee}function Te(T,N,A,L){if(typeof A=="object"&&A!==null&&A.type===w&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case O:e:{for(var ee=A.key;N!==null;){if(N.key===ee){if(ee=A.type,ee===w){if(N.tag===7){a(T,N.sibling),L=s(N,A.props.children),L.return=T,T=L;break e}}else if(N.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===I&&Ja(ee)===N.type){a(T,N.sibling),L=s(N,A.props),mn(L,A),L.return=T,T=L;break e}a(T,N);break}else t(T,N);N=N.sibling}A.type===w?(L=Va(A.props.children,T.mode,L,A.key),L.return=T,T=L):(L=hs(A.type,A.key,A.props,null,T.mode,L),mn(L,A),L.return=T,T=L)}return f(T);case G:e:{for(ee=A.key;N!==null;){if(N.key===ee)if(N.tag===4&&N.stateNode.containerInfo===A.containerInfo&&N.stateNode.implementation===A.implementation){a(T,N.sibling),L=s(N,A.children||[]),L.return=T,T=L;break e}else{a(T,N);break}else t(T,N);N=N.sibling}L=sr(A,T.mode,L),L.return=T,T=L}return f(T);case I:return A=Ja(A),Te(T,N,A,L)}if(Dt(A))return J(T,N,A,L);if(qe(A)){if(ee=qe(A),typeof ee!="function")throw Error(c(150));return A=ee.call(A),te(T,N,A,L)}if(typeof A.then=="function")return Te(T,N,Ns(A),L);if(A.$$typeof===V)return Te(T,N,ps(T,A),L);Ss(T,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,N!==null&&N.tag===6?(a(T,N.sibling),L=s(N,A),L.return=T,T=L):(a(T,N),L=nr(A,T.mode,L),L.return=T,T=L),f(T)):a(T,N)}return function(T,N,A,L){try{dn=0;var ee=Te(T,N,A,L);return El=null,ee}catch(P){if(P===Sl||P===bs)throw P;var ge=ht(29,P,null,T.mode);return ge.lanes=L,ge.return=T,ge}}}var Fa=Ao(!0),Mo=Ao(!1),ya=!1;function yr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pr(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 pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function va(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(pe&2)!==0){var s=l.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),l.pending=t,t=xs(e),oo(e,null,a),t}return ms(e,l,t,a),xs(e)}function xn(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,pu(e,a)}}function vr(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 f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?s=i=f:i=i.next=f,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 br=!1;function hn(){if(br){var e=Nl;if(e!==null)throw e}}function gn(e,t,a,l){br=!1;var s=e.updateQueue;ya=!1;var i=s.firstBaseUpdate,f=s.lastBaseUpdate,h=s.shared.pending;if(h!==null){s.shared.pending=null;var b=h,M=b.next;b.next=null,f===null?i=M:f.next=M,f=b;var D=e.alternate;D!==null&&(D=D.updateQueue,h=D.lastBaseUpdate,h!==f&&(h===null?D.firstBaseUpdate=M:h.next=M,D.lastBaseUpdate=b))}if(i!==null){var B=s.baseState;f=0,D=M=b=null,h=i;do{var z=h.lane&-536870913,_=z!==h.lane;if(_?(fe&z)===z:(l&z)===z){z!==0&&z===jl&&(br=!0),D!==null&&(D=D.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var J=e,te=h;z=t;var Te=a;switch(te.tag){case 1:if(J=te.payload,typeof J=="function"){B=J.call(Te,B,z);break e}B=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=te.payload,z=typeof J=="function"?J.call(Te,B,z):J,z==null)break e;B=y({},B,z);break e;case 2:ya=!0}}z=h.callback,z!==null&&(e.flags|=64,_&&(e.flags|=8192),_=s.callbacks,_===null?s.callbacks=[z]:_.push(z))}else _={lane:z,tag:h.tag,payload:h.payload,callback:h.callback,next:null},D===null?(M=D=_,b=B):D=D.next=_,f|=z;if(h=h.next,h===null){if(h=s.shared.pending,h===null)break;_=h,h=_.next,_.next=null,s.lastBaseUpdate=_,s.shared.pending=null}}while(!0);D===null&&(b=B),s.baseState=b,s.firstBaseUpdate=M,s.lastBaseUpdate=D,i===null&&(s.shared.lanes=0),Ea|=f,e.lanes=f,e.memoizedState=B}}function zo(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Ro(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)zo(a[e],t)}var Tl=S(null),Es=S(0);function _o(e,t){e=sa,k(Es,e),k(Tl,t),sa=e|t.baseLanes}function jr(){k(Es,sa),k(Tl,Tl.current)}function Nr(){sa=Es.current,q(Tl),q(Es)}var gt=S(null),Rt=null;function ba(e){var t=e.alternate;k(Le,Le.current&1),k(gt,e),Rt===null&&(t===null||Tl.current!==null||t.memoizedState!==null)&&(Rt=e)}function Sr(e){k(Le,Le.current),k(gt,e),Rt===null&&(Rt=e)}function wo(e){e.tag===22?(k(Le,Le.current),k(gt,e),Rt===null&&(Rt=e)):ja()}function ja(){k(Le,Le.current),k(gt,gt.current)}function yt(e){q(gt),Rt===e&&(Rt=null),q(Le)}var Le=S(0);function Ts(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||zc(a)||Rc(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 Ft=0,ie=null,Se=null,Ge=null,Cs=!1,Cl=!1,Pa=!1,As=0,yn=0,Al=null,Ex=0;function Oe(){throw Error(c(321))}function Er(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!xt(e[a],t[a]))return!1;return!0}function Tr(e,t,a,l,s,i){return Ft=i,ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?gf:Yr,Pa=!1,i=a(l,s),Pa=!1,Cl&&(i=Do(t,a,l,s)),Oo(e),i}function Oo(e){U.H=bn;var t=Se!==null&&Se.next!==null;if(Ft=0,Ge=Se=ie=null,Cs=!1,yn=0,Al=null,t)throw Error(c(300));e===null||Xe||(e=e.dependencies,e!==null&&ys(e)&&(Xe=!0))}function Do(e,t,a,l){ie=e;var s=0;do{if(Cl&&(Al=null),yn=0,Cl=!1,25<=s)throw Error(c(301));if(s+=1,Ge=Se=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=yf,i=t(a,l)}while(Cl);return i}function Tx(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?pn(t):t,e=e.useState()[0],(Se!==null?Se.memoizedState:null)!==e&&(ie.flags|=1024),t}function Cr(){var e=As!==0;return As=0,e}function Ar(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Mr(e){if(Cs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Cs=!1}Ft=0,Ge=Se=ie=null,Cl=!1,yn=As=0,Al=null}function tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?ie.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function He(){if(Se===null){var e=ie.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=Ge===null?ie.memoizedState:Ge.next;if(t!==null)Ge=t,Se=e;else{if(e===null)throw ie.alternate===null?Error(c(467)):Error(c(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},Ge===null?ie.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function Ms(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pn(e){var t=yn;return yn+=1,Al===null&&(Al=[]),e=Eo(Al,e,t),t=ie,(Ge===null?t.memoizedState:Ge.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?gf:Yr),e}function zs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pn(e);if(e.$$typeof===V)return We(e)}throw Error(c(438,String(e)))}function zr(e){var t=null,a=ie.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ie.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=Ms(),ie.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]=Ce;return t.index++,a}function Pt(e,t){return typeof t=="function"?t(e):t}function Rs(e){var t=He();return Rr(t,Se,e)}function Rr(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 f=s.next;s.next=i.next,i.next=f}t.baseQueue=s=i,l.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var h=f=null,b=null,M=t,D=!1;do{var B=M.lane&-536870913;if(B!==M.lane?(fe&B)===B:(Ft&B)===B){var z=M.revertLane;if(z===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),B===jl&&(D=!0);else if((Ft&z)===z){M=M.next,z===jl&&(D=!0);continue}else B={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},b===null?(h=b=B,f=i):b=b.next=B,ie.lanes|=z,Ea|=z;B=M.action,Pa&&a(i,B),i=M.hasEagerState?M.eagerState:a(i,B)}else z={lane:B,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},b===null?(h=b=z,f=i):b=b.next=z,ie.lanes|=B,Ea|=B;M=M.next}while(M!==null&&M!==t);if(b===null?f=i:b.next=h,!xt(i,e.memoizedState)&&(Xe=!0,D&&(a=Nl,a!==null)))throw a;e.memoizedState=i,e.baseState=f,e.baseQueue=b,l.lastRenderedState=i}return s===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function _r(e){var t=He(),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 f=s=s.next;do i=e(i,f.action),f=f.next;while(f!==s);xt(i,t.memoizedState)||(Xe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function Uo(e,t,a){var l=ie,s=He(),i=xe;if(i){if(a===void 0)throw Error(c(407));a=a()}else a=t();var f=!xt((Se||s).memoizedState,a);if(f&&(s.memoizedState=a,Xe=!0),s=s.queue,Dr(Bo.bind(null,l,s,e),[e]),s.getSnapshot!==t||f||Ge!==null&&Ge.memoizedState.tag&1){if(l.flags|=2048,Ml(9,{destroy:void 0},Ho.bind(null,l,s,a,t),null),Me===null)throw Error(c(349));i||(Ft&127)!==0||Lo(l,t,a)}return a}function Lo(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ie.updateQueue,t===null?(t=Ms(),ie.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Ho(e,t,a,l){t.value=a,t.getSnapshot=l,qo(t)&&Yo(e)}function Bo(e,t,a){return a(function(){qo(t)&&Yo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!xt(e,a)}catch{return!0}}function Yo(e){var t=Qa(e,2);t!==null&&ut(t,e,2)}function wr(e){var t=tt();if(typeof e=="function"){var a=e;if(e=a(),Pa){oa(!0);try{a()}finally{oa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:e},t}function Go(e,t,a,l){return e.baseState=a,Rr(e,Se,typeof l=="function"?l:Pt)}function Cx(e,t,a,l,s){if(Os(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(f){i.listeners.push(f)}};U.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,Xo(t,i)):(i.next=a.next,t.pending=a.next=i)}}function Xo(e,t){var a=t.action,l=t.payload,s=e.state;if(t.isTransition){var i=U.T,f={};U.T=f;try{var h=a(s,l),b=U.S;b!==null&&b(f,h),Qo(e,t,h)}catch(M){Or(e,t,M)}finally{i!==null&&f.types!==null&&(i.types=f.types),U.T=i}}else try{i=a(s,l),Qo(e,t,i)}catch(M){Or(e,t,M)}}function Qo(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Vo(e,t,l)},function(l){return Or(e,t,l)}):Vo(e,t,a)}function Vo(e,t,a){t.status="fulfilled",t.value=a,Zo(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Xo(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,Zo(t),t=t.next;while(t!==l)}e.action=null}function Zo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $o(e,t){return t}function ko(e,t){if(xe){var a=Me.formState;if(a!==null){e:{var l=ie;if(xe){if(ze){t:{for(var s=ze,i=zt;s.nodeType!==8;){if(!i){s=null;break t}if(s=_t(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){ze=_t(s.nextSibling),l=s.data==="F!";break e}}ha(l)}l=!1}l&&(t=a[0])}}return a=tt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:t},a.queue=l,a=mf.bind(null,ie,l),l.dispatch=a,l=wr(!1),i=qr.bind(null,ie,!1,l.queue),l=tt(),s={state:t,dispatch:null,action:e,pending:null},l.queue=s,a=Cx.bind(null,ie,s,i,a),s.dispatch=a,l.memoizedState=e,[t,a,!1]}function Ko(e){var t=He();return Jo(t,Se,e)}function Jo(e,t,a){if(t=Rr(e,t,$o)[0],e=Rs(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=pn(t)}catch(f){throw f===Sl?bs:f}else l=t;t=He();var s=t.queue,i=s.dispatch;return a!==t.memoizedState&&(ie.flags|=2048,Ml(9,{destroy:void 0},Ax.bind(null,s,a),null)),[l,i,e]}function Ax(e,t){e.action=t}function Wo(e){var t=He(),a=Se;if(a!==null)return Jo(t,a,e);He(),t=t.memoizedState,a=He();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Ml(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ie.updateQueue,t===null&&(t=Ms(),ie.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 Fo(){return He().memoizedState}function _s(e,t,a,l){var s=tt();ie.flags|=e,s.memoizedState=Ml(1|t,{destroy:void 0},a,l===void 0?null:l)}function ws(e,t,a,l){var s=He();l=l===void 0?null:l;var i=s.memoizedState.inst;Se!==null&&l!==null&&Er(l,Se.memoizedState.deps)?s.memoizedState=Ml(t,i,a,l):(ie.flags|=e,s.memoizedState=Ml(1|t,i,a,l))}function Po(e,t){_s(8390656,8,e,t)}function Dr(e,t){ws(2048,8,e,t)}function Mx(e){ie.flags|=4;var t=ie.updateQueue;if(t===null)t=Ms(),ie.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Io(e){var t=He().memoizedState;return Mx({ref:t,nextImpl:e}),function(){if((pe&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function ef(e,t){return ws(4,2,e,t)}function tf(e,t){return ws(4,4,e,t)}function af(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 lf(e,t,a){a=a!=null?a.concat([e]):null,ws(4,4,af.bind(null,t,e),a)}function Ur(){}function nf(e,t){var a=He();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Er(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function sf(e,t){var a=He();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Er(t,l[1]))return l[0];if(l=e(),Pa){oa(!0);try{e()}finally{oa(!1)}}return a.memoizedState=[l,t],l}function Lr(e,t,a){return a===void 0||(Ft&1073741824)!==0&&(fe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=rd(),ie.lanes|=e,Ea|=e,a)}function rf(e,t,a,l){return xt(a,t)?a:Tl.current!==null?(e=Lr(e,a,l),xt(e,t)||(Xe=!0),e):(Ft&42)===0||(Ft&1073741824)!==0&&(fe&261930)===0?(Xe=!0,e.memoizedState=a):(e=rd(),ie.lanes|=e,Ea|=e,t)}function cf(e,t,a,l,s){var i=Z.p;Z.p=i!==0&&8>i?i:8;var f=U.T,h={};U.T=h,qr(e,!1,t,a);try{var b=s(),M=U.S;if(M!==null&&M(h,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var D=Sx(b,l);vn(e,t,D,bt(e))}else vn(e,t,l,bt(e))}catch(B){vn(e,t,{then:function(){},status:"rejected",reason:B},bt())}finally{Z.p=i,f!==null&&h.types!==null&&(f.types=h.types),U.T=f}}function zx(){}function Hr(e,t,a,l){if(e.tag!==5)throw Error(c(476));var s=uf(e).queue;cf(e,s,t,ae,a===null?zx:function(){return of(e),a(l)})}function uf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:ae},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function of(e){var t=uf(e);t.next===null&&(t=e.alternate.memoizedState),vn(e,t.next.queue,{},bt())}function Br(){return We(Ln)}function ff(){return He().memoizedState}function df(){return He().memoizedState}function Rx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=bt();e=pa(a);var l=va(t,e,a);l!==null&&(ut(l,t,a),xn(l,t,a)),t={cache:mr()},e.payload=t;return}t=t.return}}function _x(e,t,a){var l=bt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Os(e)?xf(t,a):(a=ar(e,t,a,l),a!==null&&(ut(a,e,l),hf(a,t,l)))}function mf(e,t,a){var l=bt();vn(e,t,a,l)}function vn(e,t,a,l){var s={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Os(e))xf(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var f=t.lastRenderedState,h=i(f,a);if(s.hasEagerState=!0,s.eagerState=h,xt(h,f))return ms(e,t,s,0),Me===null&&ds(),!1}catch{}if(a=ar(e,t,s,l),a!==null)return ut(a,e,l),hf(a,t,l),!0}return!1}function qr(e,t,a,l){if(l={lane:2,revertLane:yc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Os(e)){if(t)throw Error(c(479))}else t=ar(e,a,l,2),t!==null&&ut(t,e,2)}function Os(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function xf(e,t){Cl=Cs=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function hf(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,pu(e,a)}}var bn={readContext:We,use:zs,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};bn.useEffectEvent=Oe;var gf={readContext:We,use:zs,useCallback:function(e,t){return tt().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:Po,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,_s(4194308,4,af.bind(null,t,e),a)},useLayoutEffect:function(e,t){return _s(4194308,4,e,t)},useInsertionEffect:function(e,t){_s(4,2,e,t)},useMemo:function(e,t){var a=tt();t=t===void 0?null:t;var l=e();if(Pa){oa(!0);try{e()}finally{oa(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=tt();if(a!==void 0){var s=a(t);if(Pa){oa(!0);try{a(t)}finally{oa(!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=_x.bind(null,ie,e),[l.memoizedState,e]},useRef:function(e){var t=tt();return e={current:e},t.memoizedState=e},useState:function(e){e=wr(e);var t=e.queue,a=mf.bind(null,ie,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Ur,useDeferredValue:function(e,t){var a=tt();return Lr(a,e,t)},useTransition:function(){var e=wr(!1);return e=cf.bind(null,ie,e.queue,!0,!1),tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ie,s=tt();if(xe){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),Me===null)throw Error(c(349));(fe&127)!==0||Lo(l,t,a)}s.memoizedState=a;var i={value:a,getSnapshot:t};return s.queue=i,Po(Bo.bind(null,l,i,e),[e]),l.flags|=2048,Ml(9,{destroy:void 0},Ho.bind(null,l,i,a,t),null),a},useId:function(){var e=tt(),t=Me.identifierPrefix;if(xe){var a=Yt,l=qt;a=(l&~(1<<32-mt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=As++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ex++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Br,useFormState:ko,useActionState:ko,useOptimistic:function(e){var t=tt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=qr.bind(null,ie,!0,a),a.dispatch=t,[e,t]},useMemoCache:zr,useCacheRefresh:function(){return tt().memoizedState=Rx.bind(null,ie)},useEffectEvent:function(e){var t=tt(),a={impl:e};return t.memoizedState=a,function(){if((pe&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},Yr={readContext:We,use:zs,useCallback:nf,useContext:We,useEffect:Dr,useImperativeHandle:lf,useInsertionEffect:ef,useLayoutEffect:tf,useMemo:sf,useReducer:Rs,useRef:Fo,useState:function(){return Rs(Pt)},useDebugValue:Ur,useDeferredValue:function(e,t){var a=He();return rf(a,Se.memoizedState,e,t)},useTransition:function(){var e=Rs(Pt)[0],t=He().memoizedState;return[typeof e=="boolean"?e:pn(e),t]},useSyncExternalStore:Uo,useId:ff,useHostTransitionStatus:Br,useFormState:Ko,useActionState:Ko,useOptimistic:function(e,t){var a=He();return Go(a,Se,e,t)},useMemoCache:zr,useCacheRefresh:df};Yr.useEffectEvent=Io;var yf={readContext:We,use:zs,useCallback:nf,useContext:We,useEffect:Dr,useImperativeHandle:lf,useInsertionEffect:ef,useLayoutEffect:tf,useMemo:sf,useReducer:_r,useRef:Fo,useState:function(){return _r(Pt)},useDebugValue:Ur,useDeferredValue:function(e,t){var a=He();return Se===null?Lr(a,e,t):rf(a,Se.memoizedState,e,t)},useTransition:function(){var e=_r(Pt)[0],t=He().memoizedState;return[typeof e=="boolean"?e:pn(e),t]},useSyncExternalStore:Uo,useId:ff,useHostTransitionStatus:Br,useFormState:Wo,useActionState:Wo,useOptimistic:function(e,t){var a=He();return Se!==null?Go(a,Se,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:zr,useCacheRefresh:df};yf.useEffectEvent=Io;function Gr(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Xr={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=bt(),s=pa(l);s.payload=t,a!=null&&(s.callback=a),t=va(e,s,l),t!==null&&(ut(t,e,l),xn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=bt(),s=pa(l);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=va(e,s,l),t!==null&&(ut(t,e,l),xn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=bt(),l=pa(a);l.tag=2,t!=null&&(l.callback=t),t=va(e,l,a),t!==null&&(ut(t,e,a),xn(t,e,a))}};function pf(e,t,a,l,s,i,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,f):t.prototype&&t.prototype.isPureReactComponent?!sn(a,l)||!sn(s,i):!0}function vf(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&&Xr.enqueueReplaceState(t,t.state,null)}function Ia(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=y({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function bf(e){fs(e)}function jf(e){console.error(e)}function Nf(e){fs(e)}function Ds(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Sf(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 Qr(e,t,a){return a=pa(a),a.tag=3,a.payload={element:null},a.callback=function(){Ds(e,t)},a}function Ef(e){return e=pa(e),e.tag=3,e}function Tf(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(){Sf(t,a,l)}}var f=a.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Sf(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 wx(e,t,a,l,s){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&bl(t,a,s,!0),a=gt.current,a!==null){switch(a.tag){case 31:case 13:return Rt===null?$s():a.alternate===null&&De===0&&(De=3),a.flags&=-257,a.flags|=65536,a.lanes=s,l===js?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),xc(e,l,s)),!1;case 22:return a.flags|=65536,l===js?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)),xc(e,l,s)),!1}throw Error(c(435,a.tag))}return xc(e,l,s),$s(),!1}if(xe)return t=gt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,l!==cr&&(e=Error(c(422),{cause:l}),un(Ct(e,a)))):(l!==cr&&(t=Error(c(423),{cause:l}),un(Ct(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,l=Ct(l,a),s=Qr(e.stateNode,l,s),vr(e,s),De!==4&&(De=2)),!1;var i=Error(c(520),{cause:l});if(i=Ct(i,a),Mn===null?Mn=[i]:Mn.push(i),De!==4&&(De=2),t===null)return!0;l=Ct(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Qr(a.stateNode,l,e),vr(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=Ef(s),Tf(s,e,a,l),vr(a,s),!1}a=a.return}while(a!==null);return!1}var Vr=Error(c(461)),Xe=!1;function Fe(e,t,a,l){t.child=e===null?Mo(t,null,a,l):Fa(t,e.child,a,l)}function Cf(e,t,a,l,s){a=a.render;var i=t.ref;if("ref"in l){var f={};for(var h in l)h!=="ref"&&(f[h]=l[h])}else f=l;return ka(t),l=Tr(e,t,a,f,i,s),h=Cr(),e!==null&&!Xe?(Ar(e,t,s),It(e,t,s)):(xe&&h&&ir(t),t.flags|=1,Fe(e,t,l,s),t.child)}function Af(e,t,a,l,s){if(e===null){var i=a.type;return typeof i=="function"&&!lr(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,Mf(e,t,i,l,s)):(e=hs(a.type,null,l,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Pr(e,s)){var f=i.memoizedProps;if(a=a.compare,a=a!==null?a:sn,a(f,l)&&e.ref===t.ref)return It(e,t,s)}return t.flags|=1,e=kt(i,l),e.ref=t.ref,e.return=t,t.child=e}function Mf(e,t,a,l,s){if(e!==null){var i=e.memoizedProps;if(sn(i,l)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=l=i,Pr(e,s))(e.flags&131072)!==0&&(Xe=!0);else return t.lanes=e.lanes,It(e,t,s)}return Zr(e,t,a,l,s)}function zf(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 Rf(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vs(t,i!==null?i.cachePool:null),i!==null?_o(t,i):jr(),wo(t);else return l=t.lanes=536870912,Rf(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(vs(t,i.cachePool),_o(t,i),ja(),t.memoizedState=null):(e!==null&&vs(t,null),jr(),ja());return Fe(e,t,s,a),t.child}function jn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rf(e,t,a,l,s){var i=hr();return i=i===null?null:{parent:Ye._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&vs(t,null),jr(),wo(t),e!==null&&bl(e,t,l,!0),t.childLanes=s,null}function Us(e,t){return t=Hs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _f(e,t,a){return Fa(t,e.child,null,a),e=Us(t,t.pendingProps),e.flags|=2,yt(t),t.memoizedState=null,e}function Ox(e,t,a){var l=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(xe){if(l.mode==="hidden")return e=Us(t,l),t.lanes=536870912,jn(null,e);if(Sr(t),(e=ze)?(e=Qd(e,zt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:qt,overflow:Yt}:null,retryLane:536870912,hydrationErrors:null},a=mo(e),a.return=t,t.child=a,Je=t,ze=null)):e=null,e===null)throw ha(t);return t.lanes=536870912,null}return Us(t,l)}var i=e.memoizedState;if(i!==null){var f=i.dehydrated;if(Sr(t),s)if(t.flags&256)t.flags&=-257,t=_f(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||bl(e,t,a,!1),s=(a&e.childLanes)!==0,Xe||s){if(l=Me,l!==null&&(f=vu(l,a),f!==0&&f!==i.retryLane))throw i.retryLane=f,Qa(e,f),ut(l,e,f),Vr;$s(),t=_f(e,t,a)}else e=i.treeContext,ze=_t(f.nextSibling),Je=t,xe=!0,xa=null,zt=!1,e!==null&&go(t,e),t=Us(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 Ls(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 ka(t),a=Tr(e,t,a,l,void 0,s),l=Cr(),e!==null&&!Xe?(Ar(e,t,s),It(e,t,s)):(xe&&l&&ir(t),t.flags|=1,Fe(e,t,a,s),t.child)}function wf(e,t,a,l,s,i){return ka(t),t.updateQueue=null,a=Do(t,l,a,s),Oo(e),l=Cr(),e!==null&&!Xe?(Ar(e,t,i),It(e,t,i)):(xe&&l&&ir(t),t.flags|=1,Fe(e,t,a,i),t.child)}function Of(e,t,a,l,s){if(ka(t),t.stateNode===null){var i=gl,f=a.contextType;typeof f=="object"&&f!==null&&(i=We(f)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Xr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},yr(t),f=a.contextType,i.context=typeof f=="object"&&f!==null?We(f):gl,i.state=t.memoizedState,f=a.getDerivedStateFromProps,typeof f=="function"&&(Gr(t,a,f,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(f=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),f!==i.state&&Xr.enqueueReplaceState(i,i.state,null),gn(t,l,i,s),hn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,b=Ia(a,h);i.props=b;var M=i.context,D=a.contextType;f=gl,typeof D=="object"&&D!==null&&(f=We(D));var B=a.getDerivedStateFromProps;D=typeof B=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,D||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||M!==f)&&vf(t,i,l,f),ya=!1;var z=t.memoizedState;i.state=z,gn(t,l,i,s),hn(),M=t.memoizedState,h||z!==M||ya?(typeof B=="function"&&(Gr(t,a,B,l),M=t.memoizedState),(b=ya||pf(t,a,b,l,z,M,f))?(D||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=M),i.props=l,i.state=M,i.context=f,l=b):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,pr(e,t),f=t.memoizedProps,D=Ia(a,f),i.props=D,B=t.pendingProps,z=i.context,M=a.contextType,b=gl,typeof M=="object"&&M!==null&&(b=We(M)),h=a.getDerivedStateFromProps,(M=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(f!==B||z!==b)&&vf(t,i,l,b),ya=!1,z=t.memoizedState,i.state=z,gn(t,l,i,s),hn();var _=t.memoizedState;f!==B||z!==_||ya||e!==null&&e.dependencies!==null&&ys(e.dependencies)?(typeof h=="function"&&(Gr(t,a,h,l),_=t.memoizedState),(D=ya||pf(t,a,D,l,z,_,b)||e!==null&&e.dependencies!==null&&ys(e.dependencies))?(M||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,_,b),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,_,b)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=_),i.props=l,i.state=_,i.context=b,l=D):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,Ls(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=Fa(t,e.child,null,s),t.child=Fa(t,null,a,s)):Fe(e,t,a,s),t.memoizedState=i.state,e=t.child):e=It(e,t,s),e}function Df(e,t,a,l){return Za(),t.flags|=256,Fe(e,t,a,l),t.child}var $r={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kr(e){return{baseLanes:e,cachePool:No()}}function Kr(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=vt),e}function Uf(e,t,a){var l=t.pendingProps,s=!1,i=(t.flags&128)!==0,f;if((f=i)||(f=e!==null&&e.memoizedState===null?!1:(Le.current&2)!==0),f&&(s=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(xe){if(s?ba(t):ja(),(e=ze)?(e=Qd(e,zt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:qt,overflow:Yt}:null,retryLane:536870912,hydrationErrors:null},a=mo(e),a.return=t,t.child=a,Je=t,ze=null)):e=null,e===null)throw ha(t);return Rc(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,s?(ja(),s=t.mode,h=Hs({mode:"hidden",children:h},s),l=Va(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=Kr(e,f,a),t.memoizedState=$r,jn(null,l)):(ba(t),Jr(t,h))}var b=e.memoizedState;if(b!==null&&(h=b.dehydrated,h!==null)){if(i)t.flags&256?(ba(t),t.flags&=-257,t=Wr(e,t,a)):t.memoizedState!==null?(ja(),t.child=e.child,t.flags|=128,t=null):(ja(),h=l.fallback,s=t.mode,l=Hs({mode:"visible",children:l.children},s),h=Va(h,s,a,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,Fa(t,e.child,null,a),l=t.child,l.memoizedState=kr(a),l.childLanes=Kr(e,f,a),t.memoizedState=$r,t=jn(null,l));else if(ba(t),Rc(h)){if(f=h.nextSibling&&h.nextSibling.dataset,f)var M=f.dgst;f=M,l=Error(c(419)),l.stack="",l.digest=f,un({value:l,source:null,stack:null}),t=Wr(e,t,a)}else if(Xe||bl(e,t,a,!1),f=(a&e.childLanes)!==0,Xe||f){if(f=Me,f!==null&&(l=vu(f,a),l!==0&&l!==b.retryLane))throw b.retryLane=l,Qa(e,l),ut(f,e,l),Vr;zc(h)||$s(),t=Wr(e,t,a)}else zc(h)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,ze=_t(h.nextSibling),Je=t,xe=!0,xa=null,zt=!1,e!==null&&go(t,e),t=Jr(t,l.children),t.flags|=4096);return t}return s?(ja(),h=l.fallback,s=t.mode,b=e.child,M=b.sibling,l=kt(b,{mode:"hidden",children:l.children}),l.subtreeFlags=b.subtreeFlags&65011712,M!==null?h=kt(M,h):(h=Va(h,s,a,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,jn(null,l),l=t.child,h=e.child.memoizedState,h===null?h=kr(a):(s=h.cachePool,s!==null?(b=Ye._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=No(),h={baseLanes:h.baseLanes|a,cachePool:s}),l.memoizedState=h,l.childLanes=Kr(e,f,a),t.memoizedState=$r,jn(e.child,l)):(ba(t),a=e.child,e=a.sibling,a=kt(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=a,t.memoizedState=null,a)}function Jr(e,t){return t=Hs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Hs(e,t){return e=ht(22,e,null,t),e.lanes=0,e}function Wr(e,t,a){return Fa(t,e.child,null,a),e=Jr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Lf(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),fr(e.return,t,a)}function Fr(e,t,a,l,s,i){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:s,treeForkCount:i}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=a,f.tailMode=s,f.treeForkCount=i)}function Hf(e,t,a){var l=t.pendingProps,s=l.revealOrder,i=l.tail;l=l.children;var f=Le.current,h=(f&2)!==0;if(h?(f=f&1|2,t.flags|=128):f&=1,k(Le,f),Fe(e,t,l,a),l=xe?cn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lf(e,a,t);else if(e.tag===19)Lf(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&&Ts(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),Fr(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&&Ts(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}Fr(t,!0,a,null,i,l);break;case"together":Fr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function It(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ea|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(bl(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 Pr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ys(e)))}function Dx(e,t,a){switch(t.tag){case 3:et(t,t.stateNode.containerInfo),ga(t,Ye,e.memoizedState.cache),Za();break;case 27:case 5:$l(t);break;case 4:et(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Sr(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ba(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Uf(e,t,a):(ba(t),e=It(e,t,a),e!==null?e.sibling:null);ba(t);break;case 19:var s=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(bl(e,t,a,!1),l=(a&t.childLanes)!==0),s){if(l)return Hf(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),k(Le,Le.current),l)break;return null;case 22:return t.lanes=0,zf(e,t,a,t.pendingProps);case 24:ga(t,Ye,e.memoizedState.cache)}return It(e,t,a)}function Bf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xe=!0;else{if(!Pr(e,a)&&(t.flags&128)===0)return Xe=!1,Dx(e,t,a);Xe=(e.flags&131072)!==0}else Xe=!1,xe&&(t.flags&1048576)!==0&&ho(t,cn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Ja(t.elementType),t.type=e,typeof e=="function")lr(e)?(l=Ia(e,l),t.tag=1,t=Of(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===K){t.tag=11,t=Cf(null,t,e,l,a);break e}else if(s===Y){t.tag=14,t=Af(null,t,e,l,a);break e}}throw t=ot(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=Ia(l,t.pendingProps),Of(e,t,l,s,a);case 3:e:{if(et(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var i=t.memoizedState;s=i.element,pr(e,t),gn(t,l,null,a);var f=t.memoizedState;if(l=f.cache,ga(t,Ye,l),l!==i.cache&&dr(t,[Ye],a,!0),hn(),l=f.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Df(e,t,l,a);break e}else if(l!==s){s=Ct(Error(c(424)),t),un(s),t=Df(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=_t(e.firstChild),Je=t,xe=!0,xa=null,zt=!0,a=Mo(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Za(),l===s){t=It(e,t,a);break e}Fe(e,t,l,a)}t=t.child}return t;case 26:return Ls(e,t),e===null?(a=Jd(t.type,null,t.pendingProps,null))?t.memoizedState=a:xe||(a=t.type,e=t.pendingProps,l=Is(ce.current).createElement(a),l[Ke]=t,l[lt]=e,Pe(l,a,e),$e(l),t.stateNode=l):t.memoizedState=Jd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $l(t),e===null&&xe&&(l=t.stateNode=$d(t.type,t.pendingProps,ce.current),Je=t,zt=!0,s=ze,za(t.type)?(_c=s,ze=_t(l.firstChild)):ze=s),Fe(e,t,t.pendingProps.children,a),Ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xe&&((s=l=ze)&&(l=oh(l,t.type,t.pendingProps,zt),l!==null?(t.stateNode=l,Je=t,ze=_t(l.firstChild),zt=!1,s=!0):s=!1),s||ha(t)),$l(t),s=t.type,i=t.pendingProps,f=e!==null?e.memoizedProps:null,l=i.children,Cc(s,i)?l=null:f!==null&&Cc(s,f)&&(t.flags|=32),t.memoizedState!==null&&(s=Tr(e,t,Tx,null,null,a),Ln._currentValue=s),Ls(e,t),Fe(e,t,l,a),t.child;case 6:return e===null&&xe&&((e=a=ze)&&(a=fh(a,t.pendingProps,zt),a!==null?(t.stateNode=a,Je=t,ze=null,e=!0):e=!1),e||ha(t)),null;case 13:return Uf(e,t,a);case 4:return et(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Fa(t,null,l,a):Fe(e,t,l,a),t.child;case 11:return Cf(e,t,t.type,t.pendingProps,a);case 7:return Fe(e,t,t.pendingProps,a),t.child;case 8:return Fe(e,t,t.pendingProps.children,a),t.child;case 12:return Fe(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,ga(t,t.type,l.value),Fe(e,t,l.children,a),t.child;case 9:return s=t.type._context,l=t.pendingProps.children,ka(t),s=We(s),l=l(s),t.flags|=1,Fe(e,t,l,a),t.child;case 14:return Af(e,t,t.type,t.pendingProps,a);case 15:return Mf(e,t,t.type,t.pendingProps,a);case 19:return Hf(e,t,a);case 31:return Ox(e,t,a);case 22:return zf(e,t,a,t.pendingProps);case 24:return ka(t),l=We(Ye),e===null?(s=hr(),s===null&&(s=Me,i=mr(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=a),s=i),t.memoizedState={parent:l,cache:s},yr(t),ga(t,Ye,s)):((e.lanes&a)!==0&&(pr(e,t),gn(t,null,null,a),hn()),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),ga(t,Ye,l)):(l=i.cache,ga(t,Ye,l),l!==s.cache&&dr(t,[Ye],a,!0))),Fe(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function ea(e){e.flags|=4}function Ir(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(fd())e.flags|=8192;else throw Wa=js,gr}else e.flags&=-16777217}function qf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!e0(t))if(fd())e.flags|=8192;else throw Wa=js,gr}function Bs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?gu():536870912,e.lanes|=t,wl|=t)}function Nn(e,t){if(!xe)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 Ux(e,t,a){var l=t.pendingProps;switch(rr(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),Wt(Ye),Ue(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(vl(t)?ea(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ur())),Re(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(ea(t),i!==null?(Re(t),qf(t,i)):(Re(t),Ir(t,s,null,l,a))):i?i!==e.memoizedState?(ea(t),Re(t),qf(t,i)):(Re(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ea(t),Re(t),Ir(t,s,e,l,a)),null;case 27:if(Jn(t),a=ce.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}e=W.current,vl(t)?yo(t):(e=$d(s,l,a),t.stateNode=e,ea(t))}return Re(t),null;case 5:if(Jn(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}if(i=W.current,vl(t))yo(t);else{var f=Is(ce.current);switch(i){case 1:i=f.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=f.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=f.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=f.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=f.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?f.createElement(s,{is:l.is}):f.createElement(s)}}i[Ke]=t,i[lt]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)i.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=i;e:switch(Pe(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&&ea(t)}}return Re(t),Ir(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=ce.current,vl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,s=Je,s!==null)switch(s.tag){case 27:case 5:l=s.memoizedProps}e[Ke]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Ud(e.nodeValue,a)),e||ha(t,!0)}else e=Is(e).createTextNode(l),e[Ke]=t,t.stateNode=e}return Re(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=vl(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[Ke]=t}else Za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),e=!1}else a=ur(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(yt(t),t):(yt(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=vl(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[Ke]=t}else Za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),s=!1}else s=ur(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(yt(t),t):(yt(t),null)}return yt(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),Bs(t,t.updateQueue),Re(t),null);case 4:return Ue(),e===null&&jc(t.stateNode.containerInfo),Re(t),null;case 10:return Wt(t.type),Re(t),null;case 19:if(q(Le),l=t.memoizedState,l===null)return Re(t),null;if(s=(t.flags&128)!==0,i=l.rendering,i===null)if(s)Nn(l,!1);else{if(De!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ts(e),i!==null){for(t.flags|=128,Nn(l,!1),e=i.updateQueue,t.updateQueue=e,Bs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)fo(a,e),a=a.sibling;return k(Le,Le.current&1|2),xe&&Kt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ft()>Qs&&(t.flags|=128,s=!0,Nn(l,!1),t.lanes=4194304)}else{if(!s)if(e=Ts(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Bs(t,e),Nn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!xe)return Re(t),null}else 2*ft()-l.renderingStartTime>Qs&&a!==536870912&&(t.flags|=128,s=!0,Nn(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=ft(),e.sibling=null,a=Le.current,k(Le,s?a&1|2:a&1),xe&&Kt(t,l.treeForkCount),e):(Re(t),null);case 22:case 23:return yt(t),Nr(),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&&Bs(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&&q(Ka),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wt(Ye),Re(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Lx(e,t){switch(rr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wt(Ye),Ue(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Jn(t),null;case 31:if(t.memoizedState!==null){if(yt(t),t.alternate===null)throw Error(c(340));Za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(yt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(Le),null;case 4:return Ue(),null;case 10:return Wt(t.type),null;case 22:case 23:return yt(t),Nr(),e!==null&&q(Ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wt(Ye),null;case 25:return null;default:return null}}function Yf(e,t){switch(rr(t),t.tag){case 3:Wt(Ye),Ue();break;case 26:case 27:case 5:Jn(t);break;case 4:Ue();break;case 31:t.memoizedState!==null&&yt(t);break;case 13:yt(t);break;case 19:q(Le);break;case 10:Wt(t.type);break;case 22:case 23:yt(t),Nr(),e!==null&&q(Ka);break;case 24:Wt(Ye)}}function Sn(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,f=a.inst;l=i(),f.destroy=l}a=a.next}while(a!==s)}}catch(h){je(t,t.return,h)}}function Na(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 f=l.inst,h=f.destroy;if(h!==void 0){f.destroy=void 0,s=t;var b=a,M=h;try{M()}catch(D){je(s,b,D)}}}l=l.next}while(l!==i)}}catch(D){je(t,t.return,D)}}function Gf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Ro(t,a)}catch(l){je(e,e.return,l)}}}function Xf(e,t,a){a.props=Ia(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){je(e,t,l)}}function En(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){je(e,t,s)}}function Gt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(s){je(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){je(e,t,s)}else a.current=null}function Qf(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){je(e,e.return,s)}}function ec(e,t,a){try{var l=e.stateNode;nh(l,e.type,a,t),l[lt]=t}catch(s){je(e,e.return,s)}}function Vf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&za(e.type)||e.tag===4}function tc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vf(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&&za(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 ac(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&&za(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(ac(e,t,a),e=e.sibling;e!==null;)ac(e,t,a),e=e.sibling}function qs(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&&za(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(qs(e,t,a),e=e.sibling;e!==null;)qs(e,t,a),e=e.sibling}function Zf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Pe(t,l,a),t[Ke]=e,t[lt]=a}catch(i){je(e,e.return,i)}}var ta=!1,Qe=!1,lc=!1,$f=typeof WeakSet=="function"?WeakSet:Set,ke=null;function Hx(e,t){if(e=e.containerInfo,Ec=ii,e=ao(e),Wi(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 f=0,h=-1,b=-1,M=0,D=0,B=e,z=null;t:for(;;){for(var _;B!==a||s!==0&&B.nodeType!==3||(h=f+s),B!==i||l!==0&&B.nodeType!==3||(b=f+l),B.nodeType===3&&(f+=B.nodeValue.length),(_=B.firstChild)!==null;)z=B,B=_;for(;;){if(B===e)break t;if(z===a&&++M===s&&(h=f),z===i&&++D===l&&(b=f),(_=B.nextSibling)!==null)break;B=z,z=B.parentNode}B=_}a=h===-1||b===-1?null:{start:h,end:b}}else a=null}a=a||{start:0,end:0}}else a=null;for(Tc={focusedElem:e,selectionRange:a},ii=!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 J=Ia(a.type,s);e=l.getSnapshotBeforeUpdate(J,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(te){je(a,a.return,te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Mc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mc(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 kf(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:la(e,a),l&4&&Sn(5,a);break;case 1:if(la(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(f){je(a,a.return,f)}else{var s=Ia(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){je(a,a.return,f)}}l&64&&Gf(a),l&512&&En(a,a.return);break;case 3:if(la(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{Ro(e,t)}catch(f){je(a,a.return,f)}}break;case 27:t===null&&l&4&&Zf(a);case 26:case 5:la(e,a),t===null&&l&4&&Qf(a),l&512&&En(a,a.return);break;case 12:la(e,a);break;case 31:la(e,a),l&4&&Wf(e,a);break;case 13:la(e,a),l&4&&Ff(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=$x.bind(null,a),dh(e,a))));break;case 22:if(l=a.memoizedState!==null||ta,!l){t=t!==null&&t.memoizedState!==null||Qe,s=ta;var i=Qe;ta=l,(Qe=t)&&!i?na(e,a,(a.subtreeFlags&8772)!==0):la(e,a),ta=s,Qe=i}break;case 30:break;default:la(e,a)}}function Kf(e){var t=e.alternate;t!==null&&(e.alternate=null,Kf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&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,st=!1;function aa(e,t,a){for(a=a.child;a!==null;)Jf(e,t,a),a=a.sibling}function Jf(e,t,a){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(kl,a)}catch{}switch(a.tag){case 26:Qe||Gt(a,t),aa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Qe||Gt(a,t);var l=_e,s=st;za(a.type)&&(_e=a.stateNode,st=!1),aa(e,t,a),On(a.stateNode),_e=l,st=s;break;case 5:Qe||Gt(a,t);case 6:if(l=_e,s=st,_e=null,aa(e,t,a),_e=l,st=s,_e!==null)if(st)try{(_e.nodeType===9?_e.body:_e.nodeName==="HTML"?_e.ownerDocument.body:_e).removeChild(a.stateNode)}catch(i){je(a,t,i)}else try{_e.removeChild(a.stateNode)}catch(i){je(a,t,i)}break;case 18:_e!==null&&(st?(e=_e,Gd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Yl(e)):Gd(_e,a.stateNode));break;case 4:l=_e,s=st,_e=a.stateNode.containerInfo,st=!0,aa(e,t,a),_e=l,st=s;break;case 0:case 11:case 14:case 15:Na(2,a,t),Qe||Na(4,a,t),aa(e,t,a);break;case 1:Qe||(Gt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Xf(a,t,l)),aa(e,t,a);break;case 21:aa(e,t,a);break;case 22:Qe=(l=Qe)||a.memoizedState!==null,aa(e,t,a),Qe=l;break;default:aa(e,t,a)}}function Wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Yl(e)}catch(a){je(t,t.return,a)}}}function Ff(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Yl(e)}catch(a){je(t,t.return,a)}}function Bx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $f),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $f),t;default:throw Error(c(435,e.tag))}}function Ys(e,t){var a=Bx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var s=kx.bind(null,e,l);l.then(s,s)}})}function it(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var s=a[l],i=e,f=t,h=f;e:for(;h!==null;){switch(h.tag){case 27:if(za(h.type)){_e=h.stateNode,st=!1;break e}break;case 5:_e=h.stateNode,st=!1;break e;case 3:case 4:_e=h.stateNode.containerInfo,st=!0;break e}h=h.return}if(_e===null)throw Error(c(160));Jf(i,f,s),_e=null,st=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Pf(t,e),t=t.sibling}var Lt=null;function Pf(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:it(t,e),rt(e),l&4&&(Na(3,e,e.return),Sn(3,e),Na(5,e,e.return));break;case 1:it(t,e),rt(e),l&512&&(Qe||a===null||Gt(a,a.return)),l&64&&ta&&(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=Lt;if(it(t,e),rt(e),l&512&&(Qe||a===null||Gt(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[Wl]||i[Ke]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(l),s.head.insertBefore(i,s.querySelector("head > title"))),Pe(i,l,a),i[Ke]=e,$e(i),l=i;break e;case"link":var f=Pd("link","href",s).get(l+(a.href||""));if(f){for(var h=0;h<f.length;h++)if(i=f[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)){f.splice(h,1);break t}}i=s.createElement(l),Pe(i,l,a),s.head.appendChild(i);break;case"meta":if(f=Pd("meta","content",s).get(l+(a.content||""))){for(h=0;h<f.length;h++)if(i=f[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)){f.splice(h,1);break t}}i=s.createElement(l),Pe(i,l,a),s.head.appendChild(i);break;default:throw Error(c(468,l))}i[Ke]=e,$e(i),l=i}e.stateNode=l}else Id(s,e.type,e.stateNode);else e.stateNode=Fd(s,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?Id(s,e.type,e.stateNode):Fd(s,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ec(e,e.memoizedProps,a.memoizedProps)}break;case 27:it(t,e),rt(e),l&512&&(Qe||a===null||Gt(a,a.return)),a!==null&&l&4&&ec(e,e.memoizedProps,a.memoizedProps);break;case 5:if(it(t,e),rt(e),l&512&&(Qe||a===null||Gt(a,a.return)),e.flags&32){s=e.stateNode;try{ul(s,"")}catch(J){je(e,e.return,J)}}l&4&&e.stateNode!=null&&(s=e.memoizedProps,ec(e,s,a!==null?a.memoizedProps:s)),l&1024&&(lc=!0);break;case 6:if(it(t,e),rt(e),l&4){if(e.stateNode===null)throw Error(c(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(J){je(e,e.return,J)}}break;case 3:if(ai=null,s=Lt,Lt=ei(t.containerInfo),it(t,e),Lt=s,rt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Yl(t.containerInfo)}catch(J){je(e,e.return,J)}lc&&(lc=!1,If(e));break;case 4:l=Lt,Lt=ei(e.stateNode.containerInfo),it(t,e),rt(e),Lt=l;break;case 12:it(t,e),rt(e);break;case 31:it(t,e),rt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ys(e,l)));break;case 13:it(t,e),rt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Xs=ft()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ys(e,l)));break;case 22:s=e.memoizedState!==null;var b=a!==null&&a.memoizedState!==null,M=ta,D=Qe;if(ta=M||s,Qe=D||b,it(t,e),Qe=D,ta=M,rt(e),l&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||b||ta||Qe||el(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){b=a=t;try{if(i=b.stateNode,s)f=i.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{h=b.stateNode;var B=b.memoizedProps.style,z=B!=null&&B.hasOwnProperty("display")?B.display:null;h.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(J){je(b,b.return,J)}}}else if(t.tag===6){if(a===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(J){je(b,b.return,J)}}}else if(t.tag===18){if(a===null){b=t;try{var _=b.stateNode;s?Xd(_,!0):Xd(b.stateNode,!1)}catch(J){je(b,b.return,J)}}}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,Ys(e,a))));break;case 19:it(t,e),rt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ys(e,l)));break;case 30:break;case 21:break;default:it(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Vf(l)){a=l;break}l=l.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var s=a.stateNode,i=tc(e);qs(e,i,s);break;case 5:var f=a.stateNode;a.flags&32&&(ul(f,""),a.flags&=-33);var h=tc(e);qs(e,h,f);break;case 3:case 4:var b=a.stateNode.containerInfo,M=tc(e);ac(e,M,b);break;default:throw Error(c(161))}}catch(D){je(e,e.return,D)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function If(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;If(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function la(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)kf(e,t.alternate,t),t=t.sibling}function el(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Na(4,t,t.return),el(t);break;case 1:Gt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Xf(t,t.return,a),el(t);break;case 27:On(t.stateNode);case 26:case 5:Gt(t,t.return),el(t);break;case 22:t.memoizedState===null&&el(t);break;case 30:el(t);break;default:el(t)}e=e.sibling}}function na(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,s=e,i=t,f=i.flags;switch(i.tag){case 0:case 11:case 15:na(s,i,a),Sn(4,i);break;case 1:if(na(s,i,a),l=i,s=l.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(M){je(l,l.return,M)}if(l=i,s=l.updateQueue,s!==null){var h=l.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)zo(b[s],h)}catch(M){je(l,l.return,M)}}a&&f&64&&Gf(i),En(i,i.return);break;case 27:Zf(i);case 26:case 5:na(s,i,a),a&&l===null&&f&4&&Qf(i),En(i,i.return);break;case 12:na(s,i,a);break;case 31:na(s,i,a),a&&f&4&&Wf(s,i);break;case 13:na(s,i,a),a&&f&4&&Ff(s,i);break;case 22:i.memoizedState===null&&na(s,i,a),En(i,i.return);break;case 30:break;default:na(s,i,a)}t=t.sibling}}function nc(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&&on(a))}function sc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&on(e))}function Ht(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ed(e,t,a,l),t=t.sibling}function ed(e,t,a,l){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Ht(e,t,a,l),s&2048&&Sn(9,t);break;case 1:Ht(e,t,a,l);break;case 3:Ht(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&&on(e)));break;case 12:if(s&2048){Ht(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,f=i.id,h=i.onPostCommit;typeof h=="function"&&h(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){je(t,t.return,b)}}else Ht(e,t,a,l);break;case 31:Ht(e,t,a,l);break;case 13:Ht(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,f=t.alternate,t.memoizedState!==null?i._visibility&2?Ht(e,t,a,l):Tn(e,t):i._visibility&2?Ht(e,t,a,l):(i._visibility|=2,zl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),s&2048&&nc(f,t);break;case 24:Ht(e,t,a,l),s&2048&&sc(t.alternate,t);break;default:Ht(e,t,a,l)}}function zl(e,t,a,l,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,f=t,h=a,b=l,M=f.flags;switch(f.tag){case 0:case 11:case 15:zl(i,f,h,b,s),Sn(8,f);break;case 23:break;case 22:var D=f.stateNode;f.memoizedState!==null?D._visibility&2?zl(i,f,h,b,s):Tn(i,f):(D._visibility|=2,zl(i,f,h,b,s)),s&&M&2048&&nc(f.alternate,f);break;case 24:zl(i,f,h,b,s),s&&M&2048&&sc(f.alternate,f);break;default:zl(i,f,h,b,s)}t=t.sibling}}function Tn(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:Tn(a,l),s&2048&&nc(l.alternate,l);break;case 24:Tn(a,l),s&2048&&sc(l.alternate,l);break;default:Tn(a,l)}t=t.sibling}}var Cn=8192;function Rl(e,t,a){if(e.subtreeFlags&Cn)for(e=e.child;e!==null;)td(e,t,a),e=e.sibling}function td(e,t,a){switch(e.tag){case 26:Rl(e,t,a),e.flags&Cn&&e.memoizedState!==null&&Eh(a,Lt,e.memoizedState,e.memoizedProps);break;case 5:Rl(e,t,a);break;case 3:case 4:var l=Lt;Lt=ei(e.stateNode.containerInfo),Rl(e,t,a),Lt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Cn,Cn=16777216,Rl(e,t,a),Cn=l):Rl(e,t,a));break;default:Rl(e,t,a)}}function ad(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 An(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,nd(l,e)}ad(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ld(e),e=e.sibling}function ld(e){switch(e.tag){case 0:case 11:case 15:An(e),e.flags&2048&&Na(9,e,e.return);break;case 3:An(e);break;case 12:An(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Gs(e)):An(e);break;default:An(e)}}function Gs(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,nd(l,e)}ad(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Na(8,t,t.return),Gs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Gs(t));break;default:Gs(t)}e=e.sibling}}function nd(e,t){for(;ke!==null;){var a=ke;switch(a.tag){case 0:case 11:case 15:Na(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:on(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(Kf(l),l===a){ke=null;break e}if(s!==null){s.return=i,ke=s;break e}ke=i}}}var qx={getCacheForType:function(e){var t=We(Ye),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return We(Ye).controller.signal}},Yx=typeof WeakMap=="function"?WeakMap:Map,pe=0,Me=null,ue=null,fe=0,be=0,pt=null,Sa=!1,_l=!1,ic=!1,sa=0,De=0,Ea=0,tl=0,rc=0,vt=0,wl=0,Mn=null,ct=null,cc=!1,Xs=0,sd=0,Qs=1/0,Vs=null,Ta=null,Ze=0,Ca=null,Ol=null,ia=0,uc=0,oc=null,id=null,zn=0,fc=null;function bt(){return(pe&2)!==0&&fe!==0?fe&-fe:U.T!==null?yc():bu()}function rd(){if(vt===0)if((fe&536870912)===0||xe){var e=Pn;Pn<<=1,(Pn&3932160)===0&&(Pn=262144),vt=e}else vt=536870912;return e=gt.current,e!==null&&(e.flags|=32),vt}function ut(e,t,a){(e===Me&&(be===2||be===9)||e.cancelPendingCommit!==null)&&(Dl(e,0),Aa(e,fe,vt,!1)),Jl(e,a),((pe&2)===0||e!==Me)&&(e===Me&&((pe&2)===0&&(tl|=a),De===4&&Aa(e,fe,vt,!1)),Xt(e))}function cd(e,t,a){if((pe&6)!==0)throw Error(c(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Kl(e,t),s=l?Qx(e,t):mc(e,t,!0),i=l;do{if(s===0){_l&&!l&&Aa(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!Gx(a)){s=mc(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var h=e;s=Mn;var b=h.current.memoizedState.isDehydrated;if(b&&(Dl(h,f).flags|=256),f=mc(h,f,!1),f!==2){if(ic&&!b){h.errorRecoveryDisabledLanes|=i,tl|=i,s=4;break e}i=ct,ct=s,i!==null&&(ct===null?ct=i:ct.push.apply(ct,i))}s=f}if(i=!1,s!==2)continue}}if(s===1){Dl(e,0),Aa(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:Aa(l,t,vt,!Sa);break e;case 2:ct=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(s=Xs+300-ft(),10<s)){if(Aa(l,t,vt,!Sa),es(l,0,!0)!==0)break e;ia=t,l.timeoutHandle=qd(ud.bind(null,l,a,ct,Vs,cc,t,vt,tl,wl,Sa,i,"Throttled",-0,0),s);break e}ud(l,a,ct,Vs,cc,t,vt,tl,wl,Sa,i,null,-0,0)}}break}while(!0);Xt(e)}function ud(e,t,a,l,s,i,f,h,b,M,D,B,z,_){if(e.timeoutHandle=-1,B=t.subtreeFlags,B&8192||(B&16785408)===16785408){B={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},td(t,i,B);var J=(i&62914560)===i?Xs-ft():(i&4194048)===i?sd-ft():0;if(J=Th(B,J),J!==null){ia=i,e.cancelPendingCommit=J(yd.bind(null,e,t,i,a,l,s,f,h,b,D,B,null,z,_)),Aa(e,i,f,!M);return}}yd(e,t,i,a,l,s,f,h,b)}function Gx(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(!xt(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 Aa(e,t,a,l){t&=~rc,t&=~tl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var s=t;0<s;){var i=31-mt(s),f=1<<i;l[i]=-1,s&=~f}a!==0&&yu(e,a,t)}function Zs(){return(pe&6)===0?(Rn(0),!1):!0}function dc(){if(ue!==null){if(be===0)var e=ue.return;else e=ue,Jt=$a=null,Mr(e),El=null,dn=0,e=ue;for(;e!==null;)Yf(e.alternate,e),e=e.return;ue=null}}function Dl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,rh(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ia=0,dc(),Me=e,ue=a=kt(e.current,null),fe=t,be=0,pt=null,Sa=!1,_l=Kl(e,t),ic=!1,wl=vt=rc=tl=Ea=De=0,ct=Mn=null,cc=!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-mt(l),i=1<<s;t|=e[s],l&=~i}return sa=t,ds(),a}function od(e,t){ie=null,U.H=bn,t===Sl||t===bs?(t=To(),be=3):t===gr?(t=To(),be=4):be=t===Vr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pt=t,ue===null&&(De=1,Ds(e,Ct(t,e.current)))}function fd(){var e=gt.current;return e===null?!0:(fe&4194048)===fe?Rt===null:(fe&62914560)===fe||(fe&536870912)!==0?e===Rt:!1}function dd(){var e=U.H;return U.H=bn,e===null?bn:e}function md(){var e=U.A;return U.A=qx,e}function $s(){De=4,Sa||(fe&4194048)!==fe&>.current!==null||(_l=!0),(Ea&134217727)===0&&(tl&134217727)===0||Me===null||Aa(Me,fe,vt,!1)}function mc(e,t,a){var l=pe;pe|=2;var s=dd(),i=md();(Me!==e||fe!==t)&&(Vs=null,Dl(e,t)),t=!1;var f=De;e:do try{if(be!==0&&ue!==null){var h=ue,b=pt;switch(be){case 8:dc(),f=6;break e;case 3:case 2:case 9:case 6:gt.current===null&&(t=!0);var M=be;if(be=0,pt=null,Ul(e,h,b,M),a&&_l){f=0;break e}break;default:M=be,be=0,pt=null,Ul(e,h,b,M)}}Xx(),f=De;break}catch(D){od(e,D)}while(!0);return t&&e.shellSuspendCounter++,Jt=$a=null,pe=l,U.H=s,U.A=i,ue===null&&(Me=null,fe=0,ds()),f}function Xx(){for(;ue!==null;)xd(ue)}function Qx(e,t){var a=pe;pe|=2;var l=dd(),s=md();Me!==e||fe!==t?(Vs=null,Qs=ft()+500,Dl(e,t)):_l=Kl(e,t);e:do try{if(be!==0&&ue!==null){t=ue;var i=pt;t:switch(be){case 1:be=0,pt=null,Ul(e,t,i,1);break;case 2:case 9:if(So(i)){be=0,pt=null,hd(t);break}t=function(){be!==2&&be!==9||Me!==e||(be=7),Xt(e)},i.then(t,t);break e;case 3:be=7;break e;case 4:be=5;break e;case 7:So(i)?(be=0,pt=null,hd(t)):(be=0,pt=null,Ul(e,t,i,7));break;case 5:var f=null;switch(ue.tag){case 26:f=ue.memoizedState;case 5:case 27:var h=ue;if(f?e0(f):h.stateNode.complete){be=0,pt=null;var b=h.sibling;if(b!==null)ue=b;else{var M=h.return;M!==null?(ue=M,ks(M)):ue=null}break t}}be=0,pt=null,Ul(e,t,i,5);break;case 6:be=0,pt=null,Ul(e,t,i,6);break;case 8:dc(),De=6;break e;default:throw Error(c(462))}}Vx();break}catch(D){od(e,D)}while(!0);return Jt=$a=null,U.H=l,U.A=s,pe=a,ue!==null?0:(Me=null,fe=0,ds(),De)}function Vx(){for(;ue!==null&&!mm();)xd(ue)}function xd(e){var t=Bf(e.alternate,e,sa);e.memoizedProps=e.pendingProps,t===null?ks(e):ue=t}function hd(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=wf(a,t,t.pendingProps,t.type,void 0,fe);break;case 11:t=wf(a,t,t.pendingProps,t.type.render,t.ref,fe);break;case 5:Mr(t);default:Yf(a,t),t=ue=fo(t,sa),t=Bf(a,t,sa)}e.memoizedProps=e.pendingProps,t===null?ks(e):ue=t}function Ul(e,t,a,l){Jt=$a=null,Mr(t),El=null,dn=0;var s=t.return;try{if(wx(e,s,t,a,fe)){De=1,Ds(e,Ct(a,e.current)),ue=null;return}}catch(i){if(s!==null)throw ue=s,i;De=1,Ds(e,Ct(a,e.current)),ue=null;return}t.flags&32768?(xe||l===1?e=!0:_l||(fe&536870912)!==0?e=!1:(Sa=e=!0,(l===2||l===9||l===3||l===6)&&(l=gt.current,l!==null&&l.tag===13&&(l.flags|=16384))),gd(t,e)):ks(t)}function ks(e){var t=e;do{if((t.flags&32768)!==0){gd(t,Sa);return}e=t.return;var a=Ux(t.alternate,t,sa);if(a!==null){ue=a;return}if(t=t.sibling,t!==null){ue=t;return}ue=t=e}while(t!==null);De===0&&(De=5)}function gd(e,t){do{var a=Lx(e.alternate,e);if(a!==null){a.flags&=32767,ue=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ue=e;return}ue=e=a}while(e!==null);De=6,ue=null}function yd(e,t,a,l,s,i,f,h,b){e.cancelPendingCommit=null;do Ks();while(Ze!==0);if((pe&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(i=t.lanes|t.childLanes,i|=tr,Sm(e,a,i,f,h,b),e===Me&&(ue=Me=null,fe=0),Ol=t,Ca=e,ia=a,uc=i,oc=s,id=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Kx(Wn,function(){return Nd(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,s=Z.p,Z.p=2,f=pe,pe|=4;try{Hx(e,t,a)}finally{pe=f,Z.p=s,U.T=l}}Ze=1,pd(),vd(),bd()}}function pd(){if(Ze===1){Ze=0;var e=Ca,t=Ol,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var l=Z.p;Z.p=2;var s=pe;pe|=4;try{Pf(t,e);var i=Tc,f=ao(e.containerInfo),h=i.focusedElem,b=i.selectionRange;if(f!==h&&h&&h.ownerDocument&&to(h.ownerDocument.documentElement,h)){if(b!==null&&Wi(h)){var M=b.start,D=b.end;if(D===void 0&&(D=M),"selectionStart"in h)h.selectionStart=M,h.selectionEnd=Math.min(D,h.value.length);else{var B=h.ownerDocument||document,z=B&&B.defaultView||window;if(z.getSelection){var _=z.getSelection(),J=h.textContent.length,te=Math.min(b.start,J),Te=b.end===void 0?te:Math.min(b.end,J);!_.extend&&te>Te&&(f=Te,Te=te,te=f);var T=eo(h,te),N=eo(h,Te);if(T&&N&&(_.rangeCount!==1||_.anchorNode!==T.node||_.anchorOffset!==T.offset||_.focusNode!==N.node||_.focusOffset!==N.offset)){var A=B.createRange();A.setStart(T.node,T.offset),_.removeAllRanges(),te>Te?(_.addRange(A),_.extend(N.node,N.offset)):(A.setEnd(N.node,N.offset),_.addRange(A))}}}}for(B=[],_=h;_=_.parentNode;)_.nodeType===1&&B.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<B.length;h++){var L=B[h];L.element.scrollLeft=L.left,L.element.scrollTop=L.top}}ii=!!Ec,Tc=Ec=null}finally{pe=s,Z.p=l,U.T=a}}e.current=t,Ze=2}}function vd(){if(Ze===2){Ze=0;var e=Ca,t=Ol,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var l=Z.p;Z.p=2;var s=pe;pe|=4;try{kf(e,t.alternate,t)}finally{pe=s,Z.p=l,U.T=a}}Ze=3}}function bd(){if(Ze===4||Ze===3){Ze=0,xm();var e=Ca,t=Ol,a=ia,l=id;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ze=5:(Ze=0,Ol=Ca=null,jd(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ta=null),_i(a),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(kl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=U.T,s=Z.p,Z.p=2,U.T=null;try{for(var i=e.onRecoverableError,f=0;f<l.length;f++){var h=l[f];i(h.value,{componentStack:h.stack})}}finally{U.T=t,Z.p=s}}(ia&3)!==0&&Ks(),Xt(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===fc?zn++:(zn=0,fc=e):zn=0,Rn(0)}}function jd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,on(t)))}function Ks(){return pd(),vd(),bd(),Nd()}function Nd(){if(Ze!==5)return!1;var e=Ca,t=uc;uc=0;var a=_i(ia),l=U.T,s=Z.p;try{Z.p=32>a?32:a,U.T=null,a=oc,oc=null;var i=Ca,f=ia;if(Ze=0,Ol=Ca=null,ia=0,(pe&6)!==0)throw Error(c(331));var h=pe;if(pe|=4,ld(i.current),ed(i,i.current,f,a),pe=h,Rn(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(kl,i)}catch{}return!0}finally{Z.p=s,U.T=l,jd(e,t)}}function Sd(e,t,a){t=Ct(a,t),t=Qr(e.stateNode,t,2),e=va(e,t,2),e!==null&&(Jl(e,2),Xt(e))}function je(e,t,a){if(e.tag===3)Sd(e,e,a);else for(;t!==null;){if(t.tag===3){Sd(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=Ct(a,e),a=Ef(2),l=va(t,a,2),l!==null&&(Tf(a,l,t,e),Jl(l,2),Xt(l));break}}t=t.return}}function xc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Yx;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)||(ic=!0,s.add(a),e=Zx.bind(null,e,t,a),t.then(e,e))}function Zx(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Me===e&&(fe&a)===a&&(De===4||De===3&&(fe&62914560)===fe&&300>ft()-Xs?(pe&2)===0&&Dl(e,0):rc|=a,wl===fe&&(wl=0)),Xt(e)}function Ed(e,t){t===0&&(t=gu()),e=Qa(e,t),e!==null&&(Jl(e,t),Xt(e))}function $x(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ed(e,a)}function kx(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),Ed(e,a)}function Kx(e,t){return Ai(e,t)}var Js=null,Ll=null,hc=!1,Ws=!1,gc=!1,Ma=0;function Xt(e){e!==Ll&&e.next===null&&(Ll===null?Js=Ll=e:Ll=Ll.next=e),Ws=!0,hc||(hc=!0,Wx())}function Rn(e,t){if(!gc&&Ws){gc=!0;do for(var a=!1,l=Js;l!==null;){if(e!==0){var s=l.pendingLanes;if(s===0)var i=0;else{var f=l.suspendedLanes,h=l.pingedLanes;i=(1<<31-mt(42|e)+1)-1,i&=s&~(f&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Md(l,i))}else i=fe,i=es(l,l===Me?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Kl(l,i)||(a=!0,Md(l,i));l=l.next}while(a);gc=!1}}function Jx(){Td()}function Td(){Ws=hc=!1;var e=0;Ma!==0&&ih()&&(e=Ma);for(var t=ft(),a=null,l=Js;l!==null;){var s=l.next,i=Cd(l,t);i===0?(l.next=null,a===null?Js=s:a.next=s,s===null&&(Ll=a)):(a=l,(e!==0||(i&3)!==0)&&(Ws=!0)),l=s}Ze!==0&&Ze!==5||Rn(e),Ma!==0&&(Ma=0)}function Cd(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var f=31-mt(i),h=1<<f,b=s[f];b===-1?((h&a)===0||(h&l)!==0)&&(s[f]=Nm(h,t)):b<=t&&(e.expiredLanes|=h),i&=~h}if(t=Me,a=fe,a=es(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(be===2||be===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Mi(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Kl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Mi(l),_i(a)){case 2:case 8:a=xu;break;case 32:a=Wn;break;case 268435456:a=hu;break;default:a=Wn}return l=Ad.bind(null,e),a=Ai(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Mi(l),e.callbackPriority=2,e.callbackNode=null,2}function Ad(e,t){if(Ze!==0&&Ze!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ks()&&e.callbackNode!==a)return null;var l=fe;return l=es(e,e===Me?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(cd(e,l,t),Cd(e,ft()),e.callbackNode!=null&&e.callbackNode===a?Ad.bind(null,e):null)}function Md(e,t){if(Ks())return null;cd(e,t,!0)}function Wx(){ch(function(){(pe&6)!==0?Ai(mu,Jx):Td()})}function yc(){if(Ma===0){var e=jl;e===0&&(e=Fn,Fn<<=1,(Fn&261888)===0&&(Fn=256)),Ma=e}return Ma}function zd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ns(""+e)}function Rd(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 Fx(e,t,a,l,s){if(t==="submit"&&a&&a.stateNode===s){var i=zd((s[lt]||null).action),f=l.submitter;f&&(t=(t=f[lt]||null)?zd(t.formAction):f.getAttribute("formAction"),t!==null&&(i=t,f=null));var h=new cs("action","action",null,l,s);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ma!==0){var b=f?Rd(s,f):new FormData(s);Hr(a,{pending:!0,data:b,method:s.method,action:i},null,b)}}else typeof i=="function"&&(h.preventDefault(),b=f?Rd(s,f):new FormData(s),Hr(a,{pending:!0,data:b,method:s.method,action:i},i,b))},currentTarget:s}]})}}for(var pc=0;pc<er.length;pc++){var vc=er[pc],Px=vc.toLowerCase(),Ix=vc[0].toUpperCase()+vc.slice(1);Ut(Px,"on"+Ix)}Ut(so,"onAnimationEnd"),Ut(io,"onAnimationIteration"),Ut(ro,"onAnimationStart"),Ut("dblclick","onDoubleClick"),Ut("focusin","onFocus"),Ut("focusout","onBlur"),Ut(hx,"onTransitionRun"),Ut(gx,"onTransitionStart"),Ut(yx,"onTransitionCancel"),Ut(co,"onTransitionEnd"),rl("onMouseEnter",["mouseout","mouseover"]),rl("onMouseLeave",["mouseout","mouseover"]),rl("onPointerEnter",["pointerout","pointerover"]),rl("onPointerLeave",["pointerout","pointerover"]),qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _n="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(" "),eh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_n));function _d(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 f=l.length-1;0<=f;f--){var h=l[f],b=h.instance,M=h.currentTarget;if(h=h.listener,b!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=M;try{i(s)}catch(D){fs(D)}s.currentTarget=null,i=b}else for(f=0;f<l.length;f++){if(h=l[f],b=h.instance,M=h.currentTarget,h=h.listener,b!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=M;try{i(s)}catch(D){fs(D)}s.currentTarget=null,i=b}}}}function oe(e,t){var a=t[wi];a===void 0&&(a=t[wi]=new Set);var l=e+"__bubble";a.has(l)||(wd(t,e,2,!1),a.add(l))}function bc(e,t,a){var l=0;t&&(l|=4),wd(a,e,l,t)}var Fs="_reactListening"+Math.random().toString(36).slice(2);function jc(e){if(!e[Fs]){e[Fs]=!0,Su.forEach(function(a){a!=="selectionchange"&&(eh.has(a)||bc(a,!1,e),bc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fs]||(t[Fs]=!0,bc("selectionchange",!1,t))}}function wd(e,t,a,l){switch(r0(t)){case 2:var s=Mh;break;case 8:s=zh;break;default:s=Lc}a=s.bind(null,t,a,e),s=void 0,!Gi||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 Nc(e,t,a,l,s){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var f=l.tag;if(f===3||f===4){var h=l.stateNode.containerInfo;if(h===s)break;if(f===4)for(f=l.return;f!==null;){var b=f.tag;if((b===3||b===4)&&f.stateNode.containerInfo===s)return;f=f.return}for(;h!==null;){if(f=nl(h),f===null)return;if(b=f.tag,b===5||b===6||b===26||b===27){l=i=f;continue e}h=h.parentNode}}l=l.return}Uu(function(){var M=i,D=qi(a),B=[];e:{var z=uo.get(e);if(z!==void 0){var _=cs,J=e;switch(e){case"keypress":if(is(a)===0)break e;case"keydown":case"keyup":_=km;break;case"focusin":J="focus",_=Zi;break;case"focusout":J="blur",_=Zi;break;case"beforeblur":case"afterblur":_=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":_=Bu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=Um;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=Wm;break;case so:case io:case ro:_=Bm;break;case co:_=Pm;break;case"scroll":case"scrollend":_=Om;break;case"wheel":_=ex;break;case"copy":case"cut":case"paste":_=Ym;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=Yu;break;case"toggle":case"beforetoggle":_=ax}var te=(t&4)!==0,Te=!te&&(e==="scroll"||e==="scrollend"),T=te?z!==null?z+"Capture":null:z;te=[];for(var N=M,A;N!==null;){var L=N;if(A=L.stateNode,L=L.tag,L!==5&&L!==26&&L!==27||A===null||T===null||(L=Pl(N,T),L!=null&&te.push(wn(N,L,A))),Te)break;N=N.return}0<te.length&&(z=new _(z,J,null,a,D),B.push({event:z,listeners:te}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",z&&a!==Bi&&(J=a.relatedTarget||a.fromElement)&&(nl(J)||J[ll]))break e;if((_||z)&&(z=D.window===D?D:(z=D.ownerDocument)?z.defaultView||z.parentWindow:window,_?(J=a.relatedTarget||a.toElement,_=M,J=J?nl(J):null,J!==null&&(Te=x(J),te=J.tag,J!==Te||te!==5&&te!==27&&te!==6)&&(J=null)):(_=null,J=M),_!==J)){if(te=Bu,L="onMouseLeave",T="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(te=Yu,L="onPointerLeave",T="onPointerEnter",N="pointer"),Te=_==null?z:Fl(_),A=J==null?z:Fl(J),z=new te(L,N+"leave",_,a,D),z.target=Te,z.relatedTarget=A,L=null,nl(D)===M&&(te=new te(T,N+"enter",J,a,D),te.target=A,te.relatedTarget=Te,L=te),Te=L,_&&J)t:{for(te=th,T=_,N=J,A=0,L=T;L;L=te(L))A++;L=0;for(var ee=N;ee;ee=te(ee))L++;for(;0<A-L;)T=te(T),A--;for(;0<L-A;)N=te(N),L--;for(;A--;){if(T===N||N!==null&&T===N.alternate){te=T;break t}T=te(T),N=te(N)}te=null}else te=null;_!==null&&Od(B,z,_,te,!1),J!==null&&Te!==null&&Od(B,Te,J,te,!0)}}e:{if(z=M?Fl(M):window,_=z.nodeName&&z.nodeName.toLowerCase(),_==="select"||_==="input"&&z.type==="file")var ge=Ku;else if($u(z))if(Ju)ge=dx;else{ge=ox;var P=ux}else _=z.nodeName,!_||_.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?M&&Hi(M.elementType)&&(ge=Ku):ge=fx;if(ge&&(ge=ge(e,M))){ku(B,ge,a,D);break e}P&&P(e,z,M),e==="focusout"&&M&&z.type==="number"&&M.memoizedProps.value!=null&&Li(z,"number",z.value)}switch(P=M?Fl(M):window,e){case"focusin":($u(P)||P.contentEditable==="true")&&(ml=P,Fi=M,rn=null);break;case"focusout":rn=Fi=ml=null;break;case"mousedown":Pi=!0;break;case"contextmenu":case"mouseup":case"dragend":Pi=!1,lo(B,a,D);break;case"selectionchange":if(xx)break;case"keydown":case"keyup":lo(B,a,D)}var re;if(ki)e:{switch(e){case"compositionstart":var de="onCompositionStart";break e;case"compositionend":de="onCompositionEnd";break e;case"compositionupdate":de="onCompositionUpdate";break e}de=void 0}else dl?Vu(e,a)&&(de="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(de="onCompositionStart");de&&(Gu&&a.locale!=="ko"&&(dl||de!=="onCompositionStart"?de==="onCompositionEnd"&&dl&&(re=Lu()):(da=D,Xi="value"in da?da.value:da.textContent,dl=!0)),P=Ps(M,de),0<P.length&&(de=new qu(de,e,null,a,D),B.push({event:de,listeners:P}),re?de.data=re:(re=Zu(a),re!==null&&(de.data=re)))),(re=nx?sx(e,a):ix(e,a))&&(de=Ps(M,"onBeforeInput"),0<de.length&&(P=new qu("onBeforeInput","beforeinput",null,a,D),B.push({event:P,listeners:de}),P.data=re)),Fx(B,e,M,a,D)}_d(B,t)})}function wn(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ps(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=Pl(e,a),s!=null&&l.unshift(wn(e,s,i)),s=Pl(e,t),s!=null&&l.push(wn(e,s,i))),e.tag===3)return l;e=e.return}return[]}function th(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,a,l,s){for(var i=t._reactName,f=[];a!==null&&a!==l;){var h=a,b=h.alternate,M=h.stateNode;if(h=h.tag,b!==null&&b===l)break;h!==5&&h!==26&&h!==27||M===null||(b=M,s?(M=Pl(a,i),M!=null&&f.unshift(wn(a,M,b))):s||(M=Pl(a,i),M!=null&&f.push(wn(a,M,b)))),a=a.return}f.length!==0&&e.push({event:t,listeners:f})}var ah=/\r\n?/g,lh=/\u0000|\uFFFD/g;function Dd(e){return(typeof e=="string"?e:""+e).replace(ah,`
|
|
9
|
-
`).replace(lh,"")}function Ud(e,t){return t=Dd(t),Dd(e)===t}function Ee(e,t,a,l,s,i){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||ul(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&ul(e,""+l);break;case"className":as(e,"class",l);break;case"tabIndex":as(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":as(e,a,l);break;case"style":Ou(e,l,i);break;case"data":if(t!=="object"){as(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=ns(""+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"&&Ee(e,t,"name",s.name,s,null),Ee(e,t,"formEncType",s.formEncType,s,null),Ee(e,t,"formMethod",s.formMethod,s,null),Ee(e,t,"formTarget",s.formTarget,s,null)):(Ee(e,t,"encType",s.encType,s,null),Ee(e,t,"method",s.method,s,null),Ee(e,t,"target",s.target,s,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ns(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"onScroll":l!=null&&oe("scroll",e);break;case"onScrollEnd":l!=null&&oe("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=ns(""+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":oe("beforetoggle",e),oe("toggle",e),ts(e,"popover",l);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ts(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=_m.get(a)||a,ts(e,a,l))}}function Sc(e,t,a,l,s,i){switch(a){case"style":Ou(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"?ul(e,l):(typeof l=="number"||typeof l=="bigint")&&ul(e,""+l);break;case"onScroll":l!=null&&oe("scroll",e);break;case"onScrollEnd":l!=null&&oe("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(!Eu.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[lt]||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,""):ts(e,a,l)}}}function Pe(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":oe("error",e),oe("load",e);var l=!1,s=!1,i;for(i in a)if(a.hasOwnProperty(i)){var f=a[i];if(f!=null)switch(i){case"src":l=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ee(e,t,i,f,a,null)}}s&&Ee(e,t,"srcSet",a.srcSet,a,null),l&&Ee(e,t,"src",a.src,a,null);return;case"input":oe("invalid",e);var h=i=f=s=null,b=null,M=null;for(l in a)if(a.hasOwnProperty(l)){var D=a[l];if(D!=null)switch(l){case"name":s=D;break;case"type":f=D;break;case"checked":b=D;break;case"defaultChecked":M=D;break;case"value":i=D;break;case"defaultValue":h=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(c(137,t));break;default:Ee(e,t,l,D,a,null)}}zu(e,i,h,b,M,f,s,!1);return;case"select":oe("invalid",e),l=f=i=null;for(s in a)if(a.hasOwnProperty(s)&&(h=a[s],h!=null))switch(s){case"value":i=h;break;case"defaultValue":f=h;break;case"multiple":l=h;default:Ee(e,t,s,h,a,null)}t=i,a=f,e.multiple=!!l,t!=null?cl(e,!!l,t,!1):a!=null&&cl(e,!!l,a,!0);return;case"textarea":oe("invalid",e),i=s=l=null;for(f in a)if(a.hasOwnProperty(f)&&(h=a[f],h!=null))switch(f){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:Ee(e,t,f,h,a,null)}_u(e,l,s,i);return;case"option":for(b in a)a.hasOwnProperty(b)&&(l=a[b],l!=null)&&(b==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ee(e,t,b,l,a,null));return;case"dialog":oe("beforetoggle",e),oe("toggle",e),oe("cancel",e),oe("close",e);break;case"iframe":case"object":oe("load",e);break;case"video":case"audio":for(l=0;l<_n.length;l++)oe(_n[l],e);break;case"image":oe("error",e),oe("load",e);break;case"details":oe("toggle",e);break;case"embed":case"source":case"link":oe("error",e),oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(M in a)if(a.hasOwnProperty(M)&&(l=a[M],l!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ee(e,t,M,l,a,null)}return;default:if(Hi(t)){for(D in a)a.hasOwnProperty(D)&&(l=a[D],l!==void 0&&Sc(e,t,D,l,a,void 0));return}}for(h in a)a.hasOwnProperty(h)&&(l=a[h],l!=null&&Ee(e,t,h,l,a,null))}function nh(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,f=null,h=null,b=null,M=null,D=null;for(_ in a){var B=a[_];if(a.hasOwnProperty(_)&&B!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":b=B;default:l.hasOwnProperty(_)||Ee(e,t,_,null,l,B)}}for(var z in l){var _=l[z];if(B=a[z],l.hasOwnProperty(z)&&(_!=null||B!=null))switch(z){case"type":i=_;break;case"name":s=_;break;case"checked":M=_;break;case"defaultChecked":D=_;break;case"value":f=_;break;case"defaultValue":h=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(c(137,t));break;default:_!==B&&Ee(e,t,z,_,l,B)}}Ui(e,f,h,b,M,D,i,s);return;case"select":_=f=h=z=null;for(i in a)if(b=a[i],a.hasOwnProperty(i)&&b!=null)switch(i){case"value":break;case"multiple":_=b;default:l.hasOwnProperty(i)||Ee(e,t,i,null,l,b)}for(s in l)if(i=l[s],b=a[s],l.hasOwnProperty(s)&&(i!=null||b!=null))switch(s){case"value":z=i;break;case"defaultValue":h=i;break;case"multiple":f=i;default:i!==b&&Ee(e,t,s,i,l,b)}t=h,a=f,l=_,z!=null?cl(e,!!a,z,!1):!!l!=!!a&&(t!=null?cl(e,!!a,t,!0):cl(e,!!a,a?[]:"",!1));return;case"textarea":_=z=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:Ee(e,t,h,null,l,s)}for(f in l)if(s=l[f],i=a[f],l.hasOwnProperty(f)&&(s!=null||i!=null))switch(f){case"value":z=s;break;case"defaultValue":_=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(c(91));break;default:s!==i&&Ee(e,t,f,s,l,i)}Ru(e,z,_);return;case"option":for(var J in a)z=a[J],a.hasOwnProperty(J)&&z!=null&&!l.hasOwnProperty(J)&&(J==="selected"?e.selected=!1:Ee(e,t,J,null,l,z));for(b in l)z=l[b],_=a[b],l.hasOwnProperty(b)&&z!==_&&(z!=null||_!=null)&&(b==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":Ee(e,t,b,z,l,_));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var te in a)z=a[te],a.hasOwnProperty(te)&&z!=null&&!l.hasOwnProperty(te)&&Ee(e,t,te,null,l,z);for(M in l)if(z=l[M],_=a[M],l.hasOwnProperty(M)&&z!==_&&(z!=null||_!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(c(137,t));break;default:Ee(e,t,M,z,l,_)}return;default:if(Hi(t)){for(var Te in a)z=a[Te],a.hasOwnProperty(Te)&&z!==void 0&&!l.hasOwnProperty(Te)&&Sc(e,t,Te,void 0,l,z);for(D in l)z=l[D],_=a[D],!l.hasOwnProperty(D)||z===_||z===void 0&&_===void 0||Sc(e,t,D,z,l,_);return}}for(var T in a)z=a[T],a.hasOwnProperty(T)&&z!=null&&!l.hasOwnProperty(T)&&Ee(e,t,T,null,l,z);for(B in l)z=l[B],_=a[B],!l.hasOwnProperty(B)||z===_||z==null&&_==null||Ee(e,t,B,z,l,_)}function Ld(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sh(){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,f=s.initiatorType,h=s.duration;if(i&&h&&Ld(f)){for(f=0,h=s.responseEnd,l+=1;l<a.length;l++){var b=a[l],M=b.startTime;if(M>h)break;var D=b.transferSize,B=b.initiatorType;D&&Ld(B)&&(b=b.responseEnd,f+=D*(b<h?1:(h-M)/(b-M)))}if(--l,t+=8*(i+f)/(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 Ec=null,Tc=null;function Is(e){return e.nodeType===9?e:e.ownerDocument}function Hd(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 Bd(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 Cc(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 Ac=null;function ih(){var e=window.event;return e&&e.type==="popstate"?e===Ac?!1:(Ac=e,!0):(Ac=null,!1)}var qd=typeof setTimeout=="function"?setTimeout:void 0,rh=typeof clearTimeout=="function"?clearTimeout:void 0,Yd=typeof Promise=="function"?Promise:void 0,ch=typeof queueMicrotask=="function"?queueMicrotask:typeof Yd<"u"?function(e){return Yd.resolve(null).then(e).catch(uh)}:qd;function uh(e){setTimeout(function(){throw e})}function za(e){return e==="head"}function Gd(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),Yl(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")On(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,On(a);for(var i=a.firstChild;i;){var f=i.nextSibling,h=i.nodeName;i[Wl]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=f}}else a==="body"&&On(e.ownerDocument.body);a=s}while(a);Yl(t)}function Xd(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 Mc(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":Mc(a),Oi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function oh(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[Wl])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=_t(e.nextSibling),e===null)break}return null}function fh(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=_t(e.nextSibling),e===null))return null;return e}function Qd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_t(e.nextSibling),e===null))return null;return e}function zc(e){return e.data==="$?"||e.data==="$~"}function Rc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function dh(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 _t(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var _c=null;function Vd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return _t(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Zd(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 $d(e,t,a){switch(t=Is(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 On(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Oi(e)}var wt=new Map,kd=new Set;function ei(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ra=Z.d;Z.d={f:mh,r:xh,D:hh,C:gh,L:yh,m:ph,X:bh,S:vh,M:jh};function mh(){var e=ra.f(),t=Zs();return e||t}function xh(e){var t=sl(e);t!==null&&t.tag===5&&t.type==="form"?of(t):ra.r(e)}var Hl=typeof document>"u"?null:document;function Kd(e,t,a){var l=Hl;if(l&&typeof t=="string"&&t){var s=Et(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),kd.has(s)||(kd.add(s),e={rel:e,crossOrigin:a,href:t},l.querySelector(s)===null&&(t=l.createElement("link"),Pe(t,"link",e),$e(t),l.head.appendChild(t)))}}function hh(e){ra.D(e),Kd("dns-prefetch",e,null)}function gh(e,t){ra.C(e,t),Kd("preconnect",e,t)}function yh(e,t,a){ra.L(e,t,a);var l=Hl;if(l&&e&&t){var s='link[rel="preload"][as="'+Et(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Et(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Et(a.imageSizes)+'"]')):s+='[href="'+Et(e)+'"]';var i=s;switch(t){case"style":i=Bl(e);break;case"script":i=ql(e)}wt.has(i)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),wt.set(i,e),l.querySelector(s)!==null||t==="style"&&l.querySelector(Dn(i))||t==="script"&&l.querySelector(Un(i))||(t=l.createElement("link"),Pe(t,"link",e),$e(t),l.head.appendChild(t)))}}function ph(e,t){ra.m(e,t);var a=Hl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Et(l)+'"][href="'+Et(e)+'"]',i=s;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ql(e)}if(!wt.has(i)&&(e=y({rel:"modulepreload",href:e},t),wt.set(i,e),a.querySelector(s)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Un(i)))return}l=a.createElement("link"),Pe(l,"link",e),$e(l),a.head.appendChild(l)}}}function vh(e,t,a){ra.S(e,t,a);var l=Hl;if(l&&e){var s=il(l).hoistableStyles,i=Bl(e);t=t||"default";var f=s.get(i);if(!f){var h={loading:0,preload:null};if(f=l.querySelector(Dn(i)))h.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=wt.get(i))&&wc(e,a);var b=f=l.createElement("link");$e(b),Pe(b,"link",e),b._p=new Promise(function(M,D){b.onload=M,b.onerror=D}),b.addEventListener("load",function(){h.loading|=1}),b.addEventListener("error",function(){h.loading|=2}),h.loading|=4,ti(f,t,l)}f={type:"stylesheet",instance:f,count:1,state:h},s.set(i,f)}}}function bh(e,t){ra.X(e,t);var a=Hl;if(a&&e){var l=il(a).hoistableScripts,s=ql(e),i=l.get(s);i||(i=a.querySelector(Un(s)),i||(e=y({src:e,async:!0},t),(t=wt.get(s))&&Oc(e,t),i=a.createElement("script"),$e(i),Pe(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function jh(e,t){ra.M(e,t);var a=Hl;if(a&&e){var l=il(a).hoistableScripts,s=ql(e),i=l.get(s);i||(i=a.querySelector(Un(s)),i||(e=y({src:e,async:!0,type:"module"},t),(t=wt.get(s))&&Oc(e,t),i=a.createElement("script"),$e(i),Pe(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function Jd(e,t,a,l){var s=(s=ce.current)?ei(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=Bl(a.href),a=il(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=Bl(a.href);var i=il(s).hoistableStyles,f=i.get(e);if(f||(s=s.ownerDocument||s,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,f),(i=s.querySelector(Dn(e)))&&!i._p&&(f.instance=i,f.state.loading=5),wt.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},wt.set(e,a),i||Nh(s,e,a,f.state))),t&&l===null)throw Error(c(528,""));return f}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=ql(a),a=il(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 Bl(e){return'href="'+Et(e)+'"'}function Dn(e){return'link[rel="stylesheet"]['+e+"]"}function Wd(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Nh(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}),Pe(t,"link",a),$e(t),e.head.appendChild(t))}function ql(e){return'[src="'+Et(e)+'"]'}function Un(e){return"script[async]"+e}function Fd(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Et(a.href)+'"]');if(l)return t.instance=l,$e(l),l;var s=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),$e(l),Pe(l,"style",s),ti(l,a.precedence,e),t.instance=l;case"stylesheet":s=Bl(a.href);var i=e.querySelector(Dn(s));if(i)return t.state.loading|=4,t.instance=i,$e(i),i;l=Wd(a),(s=wt.get(s))&&wc(l,s),i=(e.ownerDocument||e).createElement("link"),$e(i);var f=i;return f._p=new Promise(function(h,b){f.onload=h,f.onerror=b}),Pe(i,"link",l),t.state.loading|=4,ti(i,a.precedence,e),t.instance=i;case"script":return i=ql(a.src),(s=e.querySelector(Un(i)))?(t.instance=s,$e(s),s):(l=a,(s=wt.get(i))&&(l=y({},a),Oc(l,s)),e=e.ownerDocument||e,s=e.createElement("script"),$e(s),Pe(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,ti(l,a.precedence,e));return t.instance}function ti(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,f=0;f<l.length;f++){var h=l[f];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 wc(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 ai=null;function Pd(e,t,a){if(ai===null){var l=new Map,s=ai=new Map;s.set(a,l)}else s=ai,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[Wl]||i[Ke]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var f=i.getAttribute(t)||"";f=e+f;var h=l.get(f);h?h.push(i):l.set(f,[i])}}return l}function Id(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Sh(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 e0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Eh(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=Bl(l.href),i=t.querySelector(Dn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=li.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,$e(i);return}i=t.ownerDocument||t,l=Wd(l),(s=wt.get(s))&&wc(l,s),i=i.createElement("link"),$e(i);var f=i;f._p=new Promise(function(h,b){f.onload=h,f.onerror=b}),Pe(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=li.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Dc=0;function Th(e,t){return e.stylesheets&&e.count===0&&si(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&si(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Dc===0&&(Dc=62500*sh());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&si(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Dc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(s)}}:null}function li(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)si(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ni=null;function si(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ni=new Map,t.forEach(Ch,e),ni=null,li.call(e))}function Ch(e,t){if(!(t.state.loading&4)){var a=ni.get(e);if(a)var l=a.get(null);else{a=new Map,ni.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var f=s[i];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(a.set(f.dataset.precedence,f),l=f)}l&&a.set(null,l)}s=t.instance,f=s.getAttribute("data-precedence"),i=a.get(f)||l,i===l&&a.set(null,s),a.set(f,s),this.count++,l=li.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 Ln={$$typeof:V,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function Ah(e,t,a,l,s,i,f,h,b){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=zi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zi(0),this.hiddenUpdates=zi(null),this.identifierPrefix=l,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function t0(e,t,a,l,s,i,f,h,b,M,D,B){return e=new Ah(e,t,a,f,b,M,D,B,h),t=1,i===!0&&(t|=24),i=ht(3,null,null,t),e.current=i,i.stateNode=e,t=mr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},yr(i),e}function a0(e){return e?(e=gl,e):gl}function l0(e,t,a,l,s,i){s=a0(s),l.context===null?l.context=s:l.pendingContext=s,l=pa(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=va(e,l,t),a!==null&&(ut(a,e,t),xn(a,e,t))}function n0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Uc(e,t){n0(e,t),(e=e.alternate)&&n0(e,t)}function s0(e){if(e.tag===13||e.tag===31){var t=Qa(e,67108864);t!==null&&ut(t,e,67108864),Uc(e,67108864)}}function i0(e){if(e.tag===13||e.tag===31){var t=bt();t=Ri(t);var a=Qa(e,t);a!==null&&ut(a,e,t),Uc(e,t)}}var ii=!0;function Mh(e,t,a,l){var s=U.T;U.T=null;var i=Z.p;try{Z.p=2,Lc(e,t,a,l)}finally{Z.p=i,U.T=s}}function zh(e,t,a,l){var s=U.T;U.T=null;var i=Z.p;try{Z.p=8,Lc(e,t,a,l)}finally{Z.p=i,U.T=s}}function Lc(e,t,a,l){if(ii){var s=Hc(l);if(s===null)Nc(e,t,l,ri,a),c0(e,l);else if(_h(s,e,t,a,l))l.stopPropagation();else if(c0(e,l),t&4&&-1<Rh.indexOf(e)){for(;s!==null;){var i=sl(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var f=Ba(i.pendingLanes);if(f!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;f;){var b=1<<31-mt(f);h.entanglements[1]|=b,f&=~b}Xt(i),(pe&6)===0&&(Qs=ft()+500,Rn(0))}}break;case 31:case 13:h=Qa(i,2),h!==null&&ut(h,i,2),Zs(),Uc(i,2)}if(i=Hc(l),i===null&&Nc(e,t,l,ri,a),i===s)break;s=i}s!==null&&l.stopPropagation()}else Nc(e,t,l,null,a)}}function Hc(e){return e=qi(e),Bc(e)}var ri=null;function Bc(e){if(ri=null,e=nl(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=v(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 ri=e,null}function r0(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(hm()){case mu:return 2;case xu:return 8;case Wn:case gm:return 32;case hu:return 268435456;default:return 32}default:return 32}}var qc=!1,Ra=null,_a=null,wa=null,Hn=new Map,Bn=new Map,Oa=[],Rh="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 c0(e,t){switch(e){case"focusin":case"focusout":Ra=null;break;case"dragenter":case"dragleave":_a=null;break;case"mouseover":case"mouseout":wa=null;break;case"pointerover":case"pointerout":Hn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bn.delete(t.pointerId)}}function qn(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=sl(t),t!==null&&s0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function _h(e,t,a,l,s){switch(t){case"focusin":return Ra=qn(Ra,e,t,a,l,s),!0;case"dragenter":return _a=qn(_a,e,t,a,l,s),!0;case"mouseover":return wa=qn(wa,e,t,a,l,s),!0;case"pointerover":var i=s.pointerId;return Hn.set(i,qn(Hn.get(i)||null,e,t,a,l,s)),!0;case"gotpointercapture":return i=s.pointerId,Bn.set(i,qn(Bn.get(i)||null,e,t,a,l,s)),!0}return!1}function u0(e){var t=nl(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,ju(e.priority,function(){i0(a)});return}}else if(t===31){if(t=v(a),t!==null){e.blockedOn=t,ju(e.priority,function(){i0(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 ci(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Hc(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Bi=l,a.target.dispatchEvent(l),Bi=null}else return t=sl(a),t!==null&&s0(t),e.blockedOn=a,!1;t.shift()}return!0}function o0(e,t,a){ci(e)&&a.delete(t)}function wh(){qc=!1,Ra!==null&&ci(Ra)&&(Ra=null),_a!==null&&ci(_a)&&(_a=null),wa!==null&&ci(wa)&&(wa=null),Hn.forEach(o0),Bn.forEach(o0)}function ui(e,t){e.blockedOn===t&&(e.blockedOn=null,qc||(qc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,wh)))}var oi=null;function f0(e){oi!==e&&(oi=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){oi===e&&(oi=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(Bc(l||a)===null)continue;break}var i=sl(a);i!==null&&(e.splice(t,3),t-=3,Hr(i,{pending:!0,data:s,method:a.method,action:l},l,s))}}))}function Yl(e){function t(b){return ui(b,e)}Ra!==null&&ui(Ra,e),_a!==null&&ui(_a,e),wa!==null&&ui(wa,e),Hn.forEach(t),Bn.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);)u0(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],f=s[lt]||null;if(typeof i=="function")f||f0(a);else if(f){var h=null;if(i&&i.hasAttribute("formAction")){if(s=i,f=i[lt]||null)h=f.formAction;else if(Bc(s)!==null)continue}else h=f.action;typeof h=="function"?a[l+1]=h:(a.splice(l,3),l-=3),f0(a)}}}function d0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(f){return s=f})},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 Yc(e){this._internalRoot=e}fi.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,l=bt();l0(a,l,e,t,null,null)},fi.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;l0(e.current,2,null,e,null,null),Zs(),t[ll]=null}};function fi(e){this._internalRoot=e}fi.prototype.unstable_scheduleHydration=function(e){if(e){var t=bu();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&&u0(e)}};var m0=o.version;if(m0!=="19.2.4")throw Error(c(527,m0,"19.2.4"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=m(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var Oh={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var di=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!di.isDisabled&&di.supportsFiber)try{kl=di.inject(Oh),dt=di}catch{}}return Gn.createRoot=function(e,t){if(!d(e))throw Error(c(299));var a=!1,l="",s=bf,i=jf,f=Nf;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&&(f=t.onRecoverableError)),t=t0(e,1,!1,null,null,a,l,null,s,i,f,d0),e[ll]=t.current,jc(e),new Yc(t)},Gn.hydrateRoot=function(e,t,a){if(!d(e))throw Error(c(299));var l=!1,s="",i=bf,f=jf,h=Nf,b=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&&(f=a.onCaughtError),a.onRecoverableError!==void 0&&(h=a.onRecoverableError),a.formState!==void 0&&(b=a.formState)),t=t0(e,1,!0,t,a??null,l,s,b,i,f,h,d0),t.context=a0(null),a=t.current,l=bt(),l=Ri(l),s=pa(l),s.callback=null,va(a,s,l),a=l,t.current.lanes=a,Jl(t,a),Xt(t),e[ll]=t.current,jc(e),new fi(t)},Gn.version="19.2.4",Gn}var S0;function Qh(){if(S0)return Qc.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(o){console.error(o)}}return r(),Qc.exports=Xh(),Qc.exports}var Vh=Qh();var E0="popstate";function Zh(r={}){function o(c,d){let{pathname:x,search:g,hash:v}=c.location;return Pc("",{pathname:x,search:g,hash:v},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function u(c,d){return typeof d=="string"?d:Vn(d)}return kh(o,u,null,r)}function we(r,o){if(r===!1||r===null||typeof r>"u")throw new Error(o)}function Bt(r,o){if(!r){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function $h(){return Math.random().toString(36).substring(2,10)}function T0(r,o){return{usr:r.state,key:r.key,idx:o}}function Pc(r,o,u=null,c){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof o=="string"?Ql(o):o,state:u,key:o&&o.key||c||$h()}}function Vn({pathname:r="/",search:o="",hash:u=""}){return o&&o!=="?"&&(r+=o.charAt(0)==="?"?o:"?"+o),u&&u!=="#"&&(r+=u.charAt(0)==="#"?u:"#"+u),r}function Ql(r){let o={};if(r){let u=r.indexOf("#");u>=0&&(o.hash=r.substring(u),r=r.substring(0,u));let c=r.indexOf("?");c>=0&&(o.search=r.substring(c),r=r.substring(0,c)),r&&(o.pathname=r)}return o}function kh(r,o,u,c={}){let{window:d=document.defaultView,v5Compat:x=!1}=c,g=d.history,v="POP",p=null,m=j();m==null&&(m=0,g.replaceState({...g.state,idx:m},""));function j(){return(g.state||{idx:null}).idx}function y(){v="POP";let R=j(),Q=R==null?null:R-m;m=R,p&&p({action:v,location:w.location,delta:Q})}function C(R,Q){v="PUSH";let H=Pc(w.location,R,Q);m=j()+1;let V=T0(H,m),K=w.createHref(H);try{g.pushState(V,"",K)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;d.location.assign(K)}x&&p&&p({action:v,location:w.location,delta:1})}function O(R,Q){v="REPLACE";let H=Pc(w.location,R,Q);m=j();let V=T0(H,m),K=w.createHref(H);g.replaceState(V,"",K),x&&p&&p({action:v,location:w.location,delta:0})}function G(R){return Kh(R)}let w={get action(){return v},get location(){return r(d,g)},listen(R){if(p)throw new Error("A history only accepts one active listener");return d.addEventListener(E0,y),p=R,()=>{d.removeEventListener(E0,y),p=null}},createHref(R){return o(d,R)},createURL:G,encodeLocation(R){let Q=G(R);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:C,replace:O,go(R){return g.go(R)}};return w}function Kh(r,o=!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:Vn(r);return c=c.replace(/ $/,"%20"),!o&&c.startsWith("//")&&(c=u+c),new URL(c,u)}function B0(r,o,u="/"){return Jh(r,o,u,!1)}function Jh(r,o,u,c){let d=typeof o=="string"?Ql(o):o,x=ua(d.pathname||"/",u);if(x==null)return null;let g=q0(r);Wh(g);let v=null;for(let p=0;v==null&&p<g.length;++p){let m=rg(x);v=sg(g[p],m,c)}return v}function q0(r,o=[],u=[],c="",d=!1){let x=(g,v,p=d,m)=>{let j={relativePath:m===void 0?g.path||"":m,caseSensitive:g.caseSensitive===!0,childrenIndex:v,route:g};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(c)&&p)return;we(j.relativePath.startsWith(c),`Absolute route path "${j.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(c.length)}let y=ca([c,j.relativePath]),C=u.concat(j);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 "${y}".`),q0(g.children,o,C,y,p)),!(g.path==null&&!g.index)&&o.push({path:y,score:lg(y,g.index),routesMeta:C})};return r.forEach((g,v)=>{if(g.path===""||!g.path?.includes("?"))x(g,v);else for(let p of Y0(g.path))x(g,v,!0,p)}),o}function Y0(r){let o=r.split("/");if(o.length===0)return[];let[u,...c]=o,d=u.endsWith("?"),x=u.replace(/\?$/,"");if(c.length===0)return d?[x,""]:[x];let g=Y0(c.join("/")),v=[];return v.push(...g.map(p=>p===""?x:[x,p].join("/"))),d&&v.push(...g),v.map(p=>r.startsWith("/")&&p===""?"/":p)}function Wh(r){r.sort((o,u)=>o.score!==u.score?u.score-o.score:ng(o.routesMeta.map(c=>c.childrenIndex),u.routesMeta.map(c=>c.childrenIndex)))}var Fh=/^:[\w-]+$/,Ph=3,Ih=2,eg=1,tg=10,ag=-2,C0=r=>r==="*";function lg(r,o){let u=r.split("/"),c=u.length;return u.some(C0)&&(c+=ag),o&&(c+=Ih),u.filter(d=>!C0(d)).reduce((d,x)=>d+(Fh.test(x)?Ph:x===""?eg:tg),c)}function ng(r,o){return r.length===o.length&&r.slice(0,-1).every((c,d)=>c===o[d])?r[r.length-1]-o[o.length-1]:0}function sg(r,o,u=!1){let{routesMeta:c}=r,d={},x="/",g=[];for(let v=0;v<c.length;++v){let p=c[v],m=v===c.length-1,j=x==="/"?o:o.slice(x.length)||"/",y=pi({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},j),C=p.route;if(!y&&m&&u&&!c[c.length-1].route.index&&(y=pi({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},j)),!y)return null;Object.assign(d,y.params),g.push({params:d,pathname:ca([x,y.pathname]),pathnameBase:fg(ca([x,y.pathnameBase])),route:C}),y.pathnameBase!=="/"&&(x=ca([x,y.pathnameBase]))}return g}function pi(r,o){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[u,c]=ig(r.path,r.caseSensitive,r.end),d=o.match(u);if(!d)return null;let x=d[0],g=x.replace(/(.)\/+$/,"$1"),v=d.slice(1);return{params:c.reduce((m,{paramName:j,isOptional:y},C)=>{if(j==="*"){let G=v[C]||"";g=x.slice(0,x.length-G.length).replace(/(.)\/+$/,"$1")}const O=v[C];return y&&!O?m[j]=void 0:m[j]=(O||"").replace(/%2F/g,"/"),m},{}),pathname:x,pathnameBase:g,pattern:r}}function ig(r,o=!1,u=!0){Bt(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let c=[],d="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,v,p)=>(c.push({paramName:v,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(c.push({paramName:"*"}),d+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?d+="\\/*$":r!==""&&r!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,o?void 0:"i"),c]}function rg(r){try{return r.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return Bt(!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 (${o}).`),r}}function ua(r,o){if(o==="/")return r;if(!r.toLowerCase().startsWith(o.toLowerCase()))return null;let u=o.endsWith("/")?o.length-1:o.length,c=r.charAt(u);return c&&c!=="/"?null:r.slice(u)||"/"}var cg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ug(r,o="/"){let{pathname:u,search:c="",hash:d=""}=typeof r=="string"?Ql(r):r,x;return u?(u=u.replace(/\/\/+/g,"/"),u.startsWith("/")?x=A0(u.substring(1),"/"):x=A0(u,o)):x=o,{pathname:x,search:dg(c),hash:mg(d)}}function A0(r,o){let u=o.replace(/\/+$/,"").split("/");return r.split("/").forEach(d=>{d===".."?u.length>1&&u.pop():d!=="."&&u.push(d)}),u.length>1?u.join("/"):"/"}function kc(r,o,u,c){return`Cannot include a '${r}' character in a manually specified \`to.${o}\` 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 og(r){return r.filter((o,u)=>u===0||o.route.path&&o.route.path.length>0)}function G0(r){let o=og(r);return o.map((u,c)=>c===o.length-1?u.pathname:u.pathnameBase)}function X0(r,o,u,c=!1){let d;typeof r=="string"?d=Ql(r):(d={...r},we(!d.pathname||!d.pathname.includes("?"),kc("?","pathname","search",d)),we(!d.pathname||!d.pathname.includes("#"),kc("#","pathname","hash",d)),we(!d.search||!d.search.includes("#"),kc("#","search","hash",d)));let x=r===""||d.pathname==="",g=x?"/":d.pathname,v;if(g==null)v=u;else{let y=o.length-1;if(!c&&g.startsWith("..")){let C=g.split("/");for(;C[0]==="..";)C.shift(),y-=1;d.pathname=C.join("/")}v=y>=0?o[y]:"/"}let p=ug(d,v),m=g&&g!=="/"&&g.endsWith("/"),j=(x||g===".")&&u.endsWith("/");return!p.pathname.endsWith("/")&&(m||j)&&(p.pathname+="/"),p}var ca=r=>r.join("/").replace(/\/\/+/g,"/"),fg=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),dg=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,mg=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,xg=class{constructor(r,o,u,c=!1){this.status=r,this.statusText=o||"",this.internal=c,u instanceof Error?(this.data=u.toString(),this.error=u):this.data=u}};function hg(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function gg(r){return r.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Q0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function V0(r,o){let u=r;if(typeof u!="string"||!cg.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let c=u,d=!1;if(Q0)try{let x=new URL(window.location.href),g=u.startsWith("//")?new URL(x.protocol+u):new URL(u),v=ua(g.pathname,o);g.origin===x.origin&&v!=null?u=v+g.search+g.hash:d=!0}catch{Bt(!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:d,to:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Z0=["POST","PUT","PATCH","DELETE"];new Set(Z0);var yg=["GET",...Z0];new Set(yg);var Vl=E.createContext(null);Vl.displayName="DataRouter";var vi=E.createContext(null);vi.displayName="DataRouterState";var pg=E.createContext(!1),$0=E.createContext({isTransitioning:!1});$0.displayName="ViewTransition";var vg=E.createContext(new Map);vg.displayName="Fetchers";var bg=E.createContext(null);bg.displayName="Await";var Ot=E.createContext(null);Ot.displayName="Navigation";var Zn=E.createContext(null);Zn.displayName="Location";var Qt=E.createContext({outlet:null,matches:[],isDataRoute:!1});Qt.displayName="Route";var au=E.createContext(null);au.displayName="RouteError";var k0="REACT_ROUTER_ERROR",jg="REDIRECT",Ng="ROUTE_ERROR_RESPONSE";function Sg(r){if(r.startsWith(`${k0}:${jg}:{`))try{let o=JSON.parse(r.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function Eg(r){if(r.startsWith(`${k0}:${Ng}:{`))try{let o=JSON.parse(r.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new xg(o.status,o.statusText,o.data)}catch{}}function Tg(r,{relative:o}={}){we($n(),"useHref() may be used only in the context of a <Router> component.");let{basename:u,navigator:c}=E.useContext(Ot),{hash:d,pathname:x,search:g}=kn(r,{relative:o}),v=x;return u!=="/"&&(v=x==="/"?u:ca([u,x])),c.createHref({pathname:v,search:g,hash:d})}function $n(){return E.useContext(Zn)!=null}function La(){return we($n(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Zn).location}var K0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function J0(r){E.useContext(Ot).static||E.useLayoutEffect(r)}function lu(){let{isDataRoute:r}=E.useContext(Qt);return r?qg():Cg()}function Cg(){we($n(),"useNavigate() may be used only in the context of a <Router> component.");let r=E.useContext(Vl),{basename:o,navigator:u}=E.useContext(Ot),{matches:c}=E.useContext(Qt),{pathname:d}=La(),x=JSON.stringify(G0(c)),g=E.useRef(!1);return J0(()=>{g.current=!0}),E.useCallback((p,m={})=>{if(Bt(g.current,K0),!g.current)return;if(typeof p=="number"){u.go(p);return}let j=X0(p,JSON.parse(x),d,m.relative==="path");r==null&&o!=="/"&&(j.pathname=j.pathname==="/"?o:ca([o,j.pathname])),(m.replace?u.replace:u.push)(j,m.state,m)},[o,u,x,d,r])}E.createContext(null);function Ag(){let{matches:r}=E.useContext(Qt),o=r[r.length-1];return o?o.params:{}}function kn(r,{relative:o}={}){let{matches:u}=E.useContext(Qt),{pathname:c}=La(),d=JSON.stringify(G0(u));return E.useMemo(()=>X0(r,JSON.parse(d),c,o==="path"),[r,d,c,o])}function Mg(r,o){return W0(r,o)}function W0(r,o,u,c,d){we($n(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=E.useContext(Ot),{matches:g}=E.useContext(Qt),v=g[g.length-1],p=v?v.params:{},m=v?v.pathname:"/",j=v?v.pathnameBase:"/",y=v&&v.route;{let H=y&&y.path||"";P0(m,!y||H.endsWith("*")||H.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${H}">) 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.
|
|
8
|
+
`+l.stack}}var Ci=Object.prototype.hasOwnProperty,Ai=r.unstable_scheduleCallback,Mi=r.unstable_cancelCallback,mm=r.unstable_shouldYield,xm=r.unstable_requestPaint,ft=r.unstable_now,hm=r.unstable_getCurrentPriorityLevel,mu=r.unstable_ImmediatePriority,xu=r.unstable_UserBlockingPriority,Fn=r.unstable_NormalPriority,gm=r.unstable_LowPriority,hu=r.unstable_IdlePriority,ym=r.log,pm=r.unstable_setDisableYieldValue,kl=null,dt=null;function oa(e){if(typeof ym=="function"&&pm(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(kl,e)}catch{}}var mt=Math.clz32?Math.clz32:jm,vm=Math.log,bm=Math.LN2;function jm(e){return e>>>=0,e===0?32:31-(vm(e)/bm|0)|0}var Pn=256,In=262144,es=4194304;function Ba(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 ts(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var s=0,i=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~i,l!==0?s=Ba(l):(f&=h,f!==0?s=Ba(f):a||(a=h&~e,a!==0&&(s=Ba(a))))):(h=l&~i,h!==0?s=Ba(h):f!==0?s=Ba(f):a||(a=l&~e,a!==0&&(s=Ba(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 Kl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Nm(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 gu(){var e=es;return es<<=1,(es&62914560)===0&&(es=4194304),e}function zi(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Jl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Sm(e,t,a,l,s,i){var f=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,b=e.expirationTimes,M=e.hiddenUpdates;for(a=f&~a;0<a;){var U=31-mt(a),B=1<<U;h[U]=0,b[U]=-1;var z=M[U];if(z!==null)for(M[U]=null,U=0;U<z.length;U++){var _=z[U];_!==null&&(_.lane&=-536870913)}a&=~B}l!==0&&yu(e,l,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(f&~t))}function yu(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-mt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function pu(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-mt(a),s=1<<l;s&t|e[l]&t&&(e[l]|=t),a&=~s}}function vu(e,t){var a=t&-t;return a=(a&42)!==0?1:Ri(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ri(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 _i(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function bu(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:r0(e.type))}function ju(e,t){var a=Z.p;try{return Z.p=e,t()}finally{Z.p=a}}var fa=Math.random().toString(36).slice(2),Ke="__reactFiber$"+fa,lt="__reactProps$"+fa,ll="__reactContainer$"+fa,wi="__reactEvents$"+fa,Em="__reactListeners$"+fa,Tm="__reactHandles$"+fa,Nu="__reactResources$"+fa,Wl="__reactMarker$"+fa;function Oi(e){delete e[Ke],delete e[lt],delete e[wi],delete e[Em],delete e[Tm]}function nl(e){var t=e[Ke];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ll]||a[Ke]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Zd(e);e!==null;){if(a=e[Ke])return a;e=Zd(e)}return t}e=a,a=e.parentNode}return null}function sl(e){if(e=e[Ke]||e[ll]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Fl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function il(e){var t=e[Nu];return t||(t=e[Nu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function $e(e){e[Wl]=!0}var Su=new Set,Eu={};function qa(e,t){rl(e,t),rl(e+"Capture",t)}function rl(e,t){for(Eu[e]=t,e=0;e<t.length;e++)Su.add(t[e])}var Cm=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]*$"),Tu={},Cu={};function Am(e){return Ci.call(Cu,e)?!0:Ci.call(Tu,e)?!1:Cm.test(e)?Cu[e]=!0:(Tu[e]=!0,!1)}function as(e,t,a){if(Am(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 ls(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 Vt(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 Nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Au(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mm(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(f){a=""+f,i.call(this,f)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(f){a=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Di(e){if(!e._valueTracker){var t=Au(e)?"checked":"value";e._valueTracker=Mm(e,t,""+e[t])}}function Mu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Au(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ns(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 zm=/[\n"\\]/g;function St(e){return e.replace(zm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ui(e,t,a,l,s,i,f,h){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?Li(e,f,Nt(t)):a!=null?Li(e,f,Nt(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=""+Nt(h):e.removeAttribute("name")}function zu(e,t,a,l,s,i,f,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)){Di(e);return}a=a!=null?""+Nt(a):"",t=t!=null?""+Nt(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,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),Di(e)}function Li(e,t,a){t==="number"&&ns(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function cl(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=""+Nt(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 Ru(e,t,a){if(t!=null&&(t=""+Nt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Nt(a):""}function _u(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(c(92));if(ce(l)){if(1<l.length)throw Error(c(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Nt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Di(e)}function ul(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Rm=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 wu(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||Rm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Ou(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&&wu(e,s,l)}else for(var i in t)t.hasOwnProperty(i)&&wu(e,i,t[i])}function Hi(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 _m=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"]]),wm=/^[\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 ss(e){return wm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zt(){}var Bi=null;function qi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ol=null,fl=null;function Du(e){var t=sl(e);if(t&&(e=t.stateNode)){var a=e[lt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ui(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="'+St(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var s=l[lt]||null;if(!s)throw Error(c(90));Ui(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&&Mu(l)}break e;case"textarea":Ru(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&cl(e,!!a.multiple,t,!1)}}}var Yi=!1;function Uu(e,t,a){if(Yi)return e(t,a);Yi=!0;try{var l=e(t);return l}finally{if(Yi=!1,(ol!==null||fl!==null)&&($s(),ol&&(t=ol,e=fl,fl=ol=null,Du(t),e)))for(t=0;t<e.length;t++)Du(e[t])}}function Pl(e,t){var a=e.stateNode;if(a===null)return null;var l=a[lt]||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 $t=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gi=!1;if($t)try{var Il={};Object.defineProperty(Il,"passive",{get:function(){Gi=!0}}),window.addEventListener("test",Il,Il),window.removeEventListener("test",Il,Il)}catch{Gi=!1}var da=null,Xi=null,is=null;function Lu(){if(is)return is;var e,t=Xi,a=t.length,l,s="value"in da?da.value:da.textContent,i=s.length;for(e=0;e<a&&t[e]===s[e];e++);var f=a-e;for(l=1;l<=f&&t[a-l]===s[i-l];l++);return is=s.slice(e,1<l?1-l:void 0)}function rs(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 cs(){return!0}function Hu(){return!1}function nt(e){function t(a,l,s,i,f){this._reactName=a,this._targetInst=s,this.type=l,this.nativeEvent=i,this.target=f,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)?cs:Hu,this.isPropagationStopped=Hu,this}return y(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=cs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=cs)},persist:function(){},isPersistent:cs}),t}var Ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},us=nt(Ya),en=y({},Ya,{view:0,detail:0}),Om=nt(en),Qi,Vi,tn,os=y({},en,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$i,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!==tn&&(tn&&e.type==="mousemove"?(Qi=e.screenX-tn.screenX,Vi=e.screenY-tn.screenY):Vi=Qi=0,tn=e),Qi)},movementY:function(e){return"movementY"in e?e.movementY:Vi}}),Bu=nt(os),Dm=y({},os,{dataTransfer:0}),Um=nt(Dm),Lm=y({},en,{relatedTarget:0}),Zi=nt(Lm),Hm=y({},Ya,{animationName:0,elapsedTime:0,pseudoElement:0}),Bm=nt(Hm),qm=y({},Ya,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ym=nt(qm),Gm=y({},Ya,{data:0}),qu=nt(Gm),Xm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qm={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"},Vm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vm[e])?!!t[e]:!1}function $i(){return Zm}var $m=y({},en,{key:function(e){if(e.key){var t=Xm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Qm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$i,charCode:function(e){return e.type==="keypress"?rs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),km=nt($m),Km=y({},os,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yu=nt(Km),Jm=y({},en,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$i}),Wm=nt(Jm),Fm=y({},Ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pm=nt(Fm),Im=y({},os,{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}),ex=nt(Im),tx=y({},Ya,{newState:0,oldState:0}),ax=nt(tx),lx=[9,13,27,32],ki=$t&&"CompositionEvent"in window,an=null;$t&&"documentMode"in document&&(an=document.documentMode);var nx=$t&&"TextEvent"in window&&!an,Gu=$t&&(!ki||an&&8<an&&11>=an),Xu=" ",Qu=!1;function Vu(e,t){switch(e){case"keyup":return lx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dl=!1;function sx(e,t){switch(e){case"compositionend":return Zu(t);case"keypress":return t.which!==32?null:(Qu=!0,Xu);case"textInput":return e=t.data,e===Xu&&Qu?null:e;default:return null}}function ix(e,t){if(dl)return e==="compositionend"||!ki&&Vu(e,t)?(e=Lu(),is=Xi=da=null,dl=!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 Gu&&t.locale!=="ko"?null:t.data;default:return null}}var rx={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 $u(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rx[e.type]:t==="textarea"}function ku(e,t,a,l){ol?fl?fl.push(l):fl=[l]:ol=l,t=Is(t,"onChange"),0<t.length&&(a=new us("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var ln=null,nn=null;function cx(e){_d(e,0)}function fs(e){var t=Fl(e);if(Mu(t))return e}function Ku(e,t){if(e==="change")return t}var Ju=!1;if($t){var Ki;if($t){var Ji="oninput"in document;if(!Ji){var Wu=document.createElement("div");Wu.setAttribute("oninput","return;"),Ji=typeof Wu.oninput=="function"}Ki=Ji}else Ki=!1;Ju=Ki&&(!document.documentMode||9<document.documentMode)}function Fu(){ln&&(ln.detachEvent("onpropertychange",Pu),nn=ln=null)}function Pu(e){if(e.propertyName==="value"&&fs(nn)){var t=[];ku(t,nn,e,qi(e)),Uu(cx,t)}}function ux(e,t,a){e==="focusin"?(Fu(),ln=t,nn=a,ln.attachEvent("onpropertychange",Pu)):e==="focusout"&&Fu()}function ox(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fs(nn)}function fx(e,t){if(e==="click")return fs(t)}function dx(e,t){if(e==="input"||e==="change")return fs(t)}function mx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:mx;function sn(e,t){if(xt(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(!Ci.call(t,s)||!xt(e[s],t[s]))return!1}return!0}function Iu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eo(e,t){var a=Iu(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=Iu(a)}}function to(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?to(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ao(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ns(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=ns(e.document)}return t}function Wi(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 xx=$t&&"documentMode"in document&&11>=document.documentMode,ml=null,Fi=null,rn=null,Pi=!1;function lo(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Pi||ml==null||ml!==ns(l)||(l=ml,"selectionStart"in l&&Wi(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}),rn&&sn(rn,l)||(rn=l,l=Is(Fi,"onSelect"),0<l.length&&(t=new us("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=ml)))}function Ga(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var xl={animationend:Ga("Animation","AnimationEnd"),animationiteration:Ga("Animation","AnimationIteration"),animationstart:Ga("Animation","AnimationStart"),transitionrun:Ga("Transition","TransitionRun"),transitionstart:Ga("Transition","TransitionStart"),transitioncancel:Ga("Transition","TransitionCancel"),transitionend:Ga("Transition","TransitionEnd")},Ii={},no={};$t&&(no=document.createElement("div").style,"AnimationEvent"in window||(delete xl.animationend.animation,delete xl.animationiteration.animation,delete xl.animationstart.animation),"TransitionEvent"in window||delete xl.transitionend.transition);function Xa(e){if(Ii[e])return Ii[e];if(!xl[e])return e;var t=xl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in no)return Ii[e]=t[a];return e}var so=Xa("animationend"),io=Xa("animationiteration"),ro=Xa("animationstart"),hx=Xa("transitionrun"),gx=Xa("transitionstart"),yx=Xa("transitioncancel"),co=Xa("transitionend"),uo=new Map,er="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(" ");er.push("scrollEnd");function Ut(e,t){uo.set(e,t),qa(t,[e])}var ds=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)},Et=[],hl=0,tr=0;function ms(){for(var e=hl,t=tr=hl=0;t<e;){var a=Et[t];Et[t++]=null;var l=Et[t];Et[t++]=null;var s=Et[t];Et[t++]=null;var i=Et[t];if(Et[t++]=null,l!==null&&s!==null){var f=l.pending;f===null?s.next=s:(s.next=f.next,f.next=s),l.pending=s}i!==0&&oo(a,s,i)}}function xs(e,t,a,l){Et[hl++]=e,Et[hl++]=t,Et[hl++]=a,Et[hl++]=l,tr|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function ar(e,t,a,l){return xs(e,t,a,l),hs(e)}function Qa(e,t){return xs(e,null,null,t),hs(e)}function oo(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-mt(a),e=i.hiddenUpdates,l=e[s],l===null?e[s]=[t]:l.push(t),t.lane=a|536870912),i):null}function hs(e){if(50<zn)throw zn=0,fc=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var gl={};function px(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 ht(e,t,a,l){return new px(e,t,a,l)}function lr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kt(e,t){var a=e.alternate;return a===null?(a=ht(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 fo(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 gs(e,t,a,l,s,i){var f=0;if(l=e,typeof e=="function")lr(e)&&(f=1);else if(typeof e=="string")f=Sh(e,a,F.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=ht(31,a,t,s),e.elementType=X,e.lanes=i,e;case w:return Va(a.children,s,i,t);case R:f=8,s|=24;break;case Q:return e=ht(12,a,t,s|2),e.elementType=Q,e.lanes=i,e;case W:return e=ht(13,a,t,s),e.elementType=W,e.lanes=i,e;case $:return e=ht(19,a,t,s),e.elementType=$,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:f=10;break e;case H:f=9;break e;case K:f=11;break e;case Y:f=14;break e;case I:f=16,l=null;break e}f=29,a=Error(c(130,e===null?"null":typeof e,"")),l=null}return t=ht(f,a,t,s),t.elementType=e,t.type=l,t.lanes=i,t}function Va(e,t,a,l){return e=ht(7,e,l,t),e.lanes=a,e}function nr(e,t,a){return e=ht(6,e,null,t),e.lanes=a,e}function mo(e){var t=ht(18,null,null,0);return t.stateNode=e,t}function sr(e,t,a){return t=ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xo=new WeakMap;function Tt(e,t){if(typeof e=="object"&&e!==null){var a=xo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:du(t)},xo.set(e,t),t)}return{value:e,source:t,stack:du(t)}}var yl=[],pl=0,ys=null,cn=0,Ct=[],At=0,ma=null,qt=1,Yt="";function Kt(e,t){yl[pl++]=cn,yl[pl++]=ys,ys=e,cn=t}function ho(e,t,a){Ct[At++]=qt,Ct[At++]=Yt,Ct[At++]=ma,ma=e;var l=qt;e=Yt;var s=32-mt(l)-1;l&=~(1<<s),a+=1;var i=32-mt(t)+s;if(30<i){var f=s-s%5;i=(l&(1<<f)-1).toString(32),l>>=f,s-=f,qt=1<<32-mt(t)+s|a<<s|l,Yt=i+e}else qt=1<<i|a<<s|l,Yt=e}function ir(e){e.return!==null&&(Kt(e,1),ho(e,1,0))}function rr(e){for(;e===ys;)ys=yl[--pl],yl[pl]=null,cn=yl[--pl],yl[pl]=null;for(;e===ma;)ma=Ct[--At],Ct[At]=null,Yt=Ct[--At],Ct[At]=null,qt=Ct[--At],Ct[At]=null}function go(e,t){Ct[At++]=qt,Ct[At++]=Yt,Ct[At++]=ma,qt=t.id,Yt=t.overflow,ma=e}var Je=null,ze=null,he=!1,xa=null,Mt=!1,cr=Error(c(519));function ha(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw un(Tt(t,e)),cr}function yo(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Ke]=e,t[lt]=l,a){case"dialog":fe("cancel",t),fe("close",t);break;case"iframe":case"object":case"embed":fe("load",t);break;case"video":case"audio":for(a=0;a<_n.length;a++)fe(_n[a],t);break;case"source":fe("error",t);break;case"img":case"image":case"link":fe("error",t),fe("load",t);break;case"details":fe("toggle",t);break;case"input":fe("invalid",t),zu(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":fe("invalid",t);break;case"textarea":fe("invalid",t),_u(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||Ud(t.textContent,a)?(l.popover!=null&&(fe("beforetoggle",t),fe("toggle",t)),l.onScroll!=null&&fe("scroll",t),l.onScrollEnd!=null&&fe("scrollend",t),l.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||ha(e,!0)}function po(e){for(Je=e.return;Je;)switch(Je.tag){case 5:case 31:case 13:Mt=!1;return;case 27:case 3:Mt=!0;return;default:Je=Je.return}}function vl(e){if(e!==Je)return!1;if(!he)return po(e),he=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Cc(e.type,e.memoizedProps)),a=!a),a&&ze&&ha(e),po(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ze=Vd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));ze=Vd(e)}else t===27?(t=ze,za(e.type)?(e=_c,_c=null,ze=e):ze=t):ze=Je?Rt(e.stateNode.nextSibling):null;return!0}function Za(){ze=Je=null,he=!1}function ur(){var e=xa;return e!==null&&(ct===null?ct=e:ct.push.apply(ct,e),xa=null),e}function un(e){xa===null?xa=[e]:xa.push(e)}var or=S(null),$a=null,Jt=null;function ga(e,t,a){k(or,t._currentValue),t._currentValue=a}function Wt(e){e._currentValue=or.current,q(or)}function fr(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 dr(e,t,a,l){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var f=s.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=s;for(var b=0;b<t.length;b++)if(h.context===t[b]){i.lanes|=a,h=i.alternate,h!==null&&(h.lanes|=a),fr(i.return,a,e),l||(f=null);break e}i=h.next}}else if(s.tag===18){if(f=s.return,f===null)throw Error(c(341));f.lanes|=a,i=f.alternate,i!==null&&(i.lanes|=a),fr(f,a,e),f=null}else f=s.child;if(f!==null)f.return=s;else for(f=s;f!==null;){if(f===e){f=null;break}if(s=f.sibling,s!==null){s.return=f.return,f=s;break}f=f.return}s=f}}function bl(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 f=s.alternate;if(f===null)throw Error(c(387));if(f=f.memoizedProps,f!==null){var h=s.type;xt(s.pendingProps.value,f.value)||(e!==null?e.push(h):e=[h])}}else if(s===ve.current){if(f=s.alternate,f===null)throw Error(c(387));f.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Ln):e=[Ln])}s=s.return}e!==null&&dr(t,e,a,l),t.flags|=262144}function ps(e){for(e=e.firstContext;e!==null;){if(!xt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ka(e){$a=e,Jt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function We(e){return vo($a,e)}function vs(e,t){return $a===null&&ka(e),vo(e,t)}function vo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Jt===null){if(e===null)throw Error(c(308));Jt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jt=Jt.next=t;return a}var vx=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()})}},bx=r.unstable_scheduleCallback,jx=r.unstable_NormalPriority,Ye={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mr(){return{controller:new vx,data:new Map,refCount:0}}function on(e){e.refCount--,e.refCount===0&&bx(jx,function(){e.controller.abort()})}var fn=null,xr=0,jl=0,Nl=null;function Nx(e,t){if(fn===null){var a=fn=[];xr=0,jl=yc(),Nl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return xr++,t.then(bo,bo),t}function bo(){if(--xr===0&&fn!==null){Nl!==null&&(Nl.status="fulfilled");var e=fn;fn=null,jl=0,Nl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Sx(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 jo=D.S;D.S=function(e,t){sd=ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Nx(e,t),jo!==null&&jo(e,t)};var Ka=S(null);function hr(){var e=Ka.current;return e!==null?e:Me.pooledCache}function bs(e,t){t===null?k(Ka,Ka.current):k(Ka,t.pool)}function No(){var e=hr();return e===null?null:{parent:Ye._currentValue,pool:e}}var Sl=Error(c(460)),gr=Error(c(474)),js=Error(c(542)),Ns={then:function(){}};function So(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Eo(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,Co(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,Co(e),e}throw Wa=t,Sl}}function Ja(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Wa=a,Sl):a}}var Wa=null;function To(){if(Wa===null)throw Error(c(459));var e=Wa;return Wa=null,e}function Co(e){if(e===Sl||e===js)throw Error(c(483))}var El=null,dn=0;function Ss(e){var t=dn;return dn+=1,El===null&&(El=[]),Eo(El,e,t)}function mn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Es(e,t){throw t.$$typeof===C?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ao(e){function t(T,N){if(e){var A=T.deletions;A===null?(T.deletions=[N],T.flags|=16):A.push(N)}}function a(T,N){if(!e)return null;for(;N!==null;)t(T,N),N=N.sibling;return null}function l(T){for(var N=new Map;T!==null;)T.key!==null?N.set(T.key,T):N.set(T.index,T),T=T.sibling;return N}function s(T,N){return T=kt(T,N),T.index=0,T.sibling=null,T}function i(T,N,A){return T.index=A,e?(A=T.alternate,A!==null?(A=A.index,A<N?(T.flags|=67108866,N):A):(T.flags|=67108866,N)):(T.flags|=1048576,N)}function f(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function h(T,N,A,L){return N===null||N.tag!==6?(N=nr(A,T.mode,L),N.return=T,N):(N=s(N,A),N.return=T,N)}function b(T,N,A,L){var ee=A.type;return ee===w?U(T,N,A.props.children,L,A.key):N!==null&&(N.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===I&&Ja(ee)===N.type)?(N=s(N,A.props),mn(N,A),N.return=T,N):(N=gs(A.type,A.key,A.props,null,T.mode,L),mn(N,A),N.return=T,N)}function M(T,N,A,L){return N===null||N.tag!==4||N.stateNode.containerInfo!==A.containerInfo||N.stateNode.implementation!==A.implementation?(N=sr(A,T.mode,L),N.return=T,N):(N=s(N,A.children||[]),N.return=T,N)}function U(T,N,A,L,ee){return N===null||N.tag!==7?(N=Va(A,T.mode,L,ee),N.return=T,N):(N=s(N,A),N.return=T,N)}function B(T,N,A){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=nr(""+N,T.mode,A),N.return=T,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case O:return A=gs(N.type,N.key,N.props,null,T.mode,A),mn(A,N),A.return=T,A;case G:return N=sr(N,T.mode,A),N.return=T,N;case I:return N=Ja(N),B(T,N,A)}if(ce(N)||qe(N))return N=Va(N,T.mode,A,null),N.return=T,N;if(typeof N.then=="function")return B(T,Ss(N),A);if(N.$$typeof===V)return B(T,vs(T,N),A);Es(T,N)}return null}function z(T,N,A,L){var ee=N!==null?N.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ee!==null?null:h(T,N,""+A,L);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case O:return A.key===ee?b(T,N,A,L):null;case G:return A.key===ee?M(T,N,A,L):null;case I:return A=Ja(A),z(T,N,A,L)}if(ce(A)||qe(A))return ee!==null?null:U(T,N,A,L,null);if(typeof A.then=="function")return z(T,N,Ss(A),L);if(A.$$typeof===V)return z(T,N,vs(T,A),L);Es(T,A)}return null}function _(T,N,A,L,ee){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return T=T.get(A)||null,h(N,T,""+L,ee);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case O:return T=T.get(L.key===null?A:L.key)||null,b(N,T,L,ee);case G:return T=T.get(L.key===null?A:L.key)||null,M(N,T,L,ee);case I:return L=Ja(L),_(T,N,A,L,ee)}if(ce(L)||qe(L))return T=T.get(A)||null,U(N,T,L,ee,null);if(typeof L.then=="function")return _(T,N,A,Ss(L),ee);if(L.$$typeof===V)return _(T,N,A,vs(N,L),ee);Es(N,L)}return null}function J(T,N,A,L){for(var ee=null,ge=null,P=N,re=N=0,xe=null;P!==null&&re<A.length;re++){P.index>re?(xe=P,P=null):xe=P.sibling;var ye=z(T,P,A[re],L);if(ye===null){P===null&&(P=xe);break}e&&P&&ye.alternate===null&&t(T,P),N=i(ye,N,re),ge===null?ee=ye:ge.sibling=ye,ge=ye,P=xe}if(re===A.length)return a(T,P),he&&Kt(T,re),ee;if(P===null){for(;re<A.length;re++)P=B(T,A[re],L),P!==null&&(N=i(P,N,re),ge===null?ee=P:ge.sibling=P,ge=P);return he&&Kt(T,re),ee}for(P=l(P);re<A.length;re++)xe=_(P,T,re,A[re],L),xe!==null&&(e&&xe.alternate!==null&&P.delete(xe.key===null?re:xe.key),N=i(xe,N,re),ge===null?ee=xe:ge.sibling=xe,ge=xe);return e&&P.forEach(function(Da){return t(T,Da)}),he&&Kt(T,re),ee}function te(T,N,A,L){if(A==null)throw Error(c(151));for(var ee=null,ge=null,P=N,re=N=0,xe=null,ye=A.next();P!==null&&!ye.done;re++,ye=A.next()){P.index>re?(xe=P,P=null):xe=P.sibling;var Da=z(T,P,ye.value,L);if(Da===null){P===null&&(P=xe);break}e&&P&&Da.alternate===null&&t(T,P),N=i(Da,N,re),ge===null?ee=Da:ge.sibling=Da,ge=Da,P=xe}if(ye.done)return a(T,P),he&&Kt(T,re),ee;if(P===null){for(;!ye.done;re++,ye=A.next())ye=B(T,ye.value,L),ye!==null&&(N=i(ye,N,re),ge===null?ee=ye:ge.sibling=ye,ge=ye);return he&&Kt(T,re),ee}for(P=l(P);!ye.done;re++,ye=A.next())ye=_(P,T,re,ye.value,L),ye!==null&&(e&&ye.alternate!==null&&P.delete(ye.key===null?re:ye.key),N=i(ye,N,re),ge===null?ee=ye:ge.sibling=ye,ge=ye);return e&&P.forEach(function(Dh){return t(T,Dh)}),he&&Kt(T,re),ee}function Te(T,N,A,L){if(typeof A=="object"&&A!==null&&A.type===w&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case O:e:{for(var ee=A.key;N!==null;){if(N.key===ee){if(ee=A.type,ee===w){if(N.tag===7){a(T,N.sibling),L=s(N,A.props.children),L.return=T,T=L;break e}}else if(N.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===I&&Ja(ee)===N.type){a(T,N.sibling),L=s(N,A.props),mn(L,A),L.return=T,T=L;break e}a(T,N);break}else t(T,N);N=N.sibling}A.type===w?(L=Va(A.props.children,T.mode,L,A.key),L.return=T,T=L):(L=gs(A.type,A.key,A.props,null,T.mode,L),mn(L,A),L.return=T,T=L)}return f(T);case G:e:{for(ee=A.key;N!==null;){if(N.key===ee)if(N.tag===4&&N.stateNode.containerInfo===A.containerInfo&&N.stateNode.implementation===A.implementation){a(T,N.sibling),L=s(N,A.children||[]),L.return=T,T=L;break e}else{a(T,N);break}else t(T,N);N=N.sibling}L=sr(A,T.mode,L),L.return=T,T=L}return f(T);case I:return A=Ja(A),Te(T,N,A,L)}if(ce(A))return J(T,N,A,L);if(qe(A)){if(ee=qe(A),typeof ee!="function")throw Error(c(150));return A=ee.call(A),te(T,N,A,L)}if(typeof A.then=="function")return Te(T,N,Ss(A),L);if(A.$$typeof===V)return Te(T,N,vs(T,A),L);Es(T,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,N!==null&&N.tag===6?(a(T,N.sibling),L=s(N,A),L.return=T,T=L):(a(T,N),L=nr(A,T.mode,L),L.return=T,T=L),f(T)):a(T,N)}return function(T,N,A,L){try{dn=0;var ee=Te(T,N,A,L);return El=null,ee}catch(P){if(P===Sl||P===js)throw P;var ge=ht(29,P,null,T.mode);return ge.lanes=L,ge.return=T,ge}}}var Fa=Ao(!0),Mo=Ao(!1),ya=!1;function yr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pr(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 pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function va(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(pe&2)!==0){var s=l.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),l.pending=t,t=hs(e),oo(e,null,a),t}return xs(e,l,t,a),hs(e)}function xn(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,pu(e,a)}}function vr(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 f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?s=i=f:i=i.next=f,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 br=!1;function hn(){if(br){var e=Nl;if(e!==null)throw e}}function gn(e,t,a,l){br=!1;var s=e.updateQueue;ya=!1;var i=s.firstBaseUpdate,f=s.lastBaseUpdate,h=s.shared.pending;if(h!==null){s.shared.pending=null;var b=h,M=b.next;b.next=null,f===null?i=M:f.next=M,f=b;var U=e.alternate;U!==null&&(U=U.updateQueue,h=U.lastBaseUpdate,h!==f&&(h===null?U.firstBaseUpdate=M:h.next=M,U.lastBaseUpdate=b))}if(i!==null){var B=s.baseState;f=0,U=M=b=null,h=i;do{var z=h.lane&-536870913,_=z!==h.lane;if(_?(me&z)===z:(l&z)===z){z!==0&&z===jl&&(br=!0),U!==null&&(U=U.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var J=e,te=h;z=t;var Te=a;switch(te.tag){case 1:if(J=te.payload,typeof J=="function"){B=J.call(Te,B,z);break e}B=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=te.payload,z=typeof J=="function"?J.call(Te,B,z):J,z==null)break e;B=y({},B,z);break e;case 2:ya=!0}}z=h.callback,z!==null&&(e.flags|=64,_&&(e.flags|=8192),_=s.callbacks,_===null?s.callbacks=[z]:_.push(z))}else _={lane:z,tag:h.tag,payload:h.payload,callback:h.callback,next:null},U===null?(M=U=_,b=B):U=U.next=_,f|=z;if(h=h.next,h===null){if(h=s.shared.pending,h===null)break;_=h,h=_.next,_.next=null,s.lastBaseUpdate=_,s.shared.pending=null}}while(!0);U===null&&(b=B),s.baseState=b,s.firstBaseUpdate=M,s.lastBaseUpdate=U,i===null&&(s.shared.lanes=0),Ea|=f,e.lanes=f,e.memoizedState=B}}function zo(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Ro(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)zo(a[e],t)}var Tl=S(null),Ts=S(0);function _o(e,t){e=sa,k(Ts,e),k(Tl,t),sa=e|t.baseLanes}function jr(){k(Ts,sa),k(Tl,Tl.current)}function Nr(){sa=Ts.current,q(Tl),q(Ts)}var gt=S(null),zt=null;function ba(e){var t=e.alternate;k(He,He.current&1),k(gt,e),zt===null&&(t===null||Tl.current!==null||t.memoizedState!==null)&&(zt=e)}function Sr(e){k(He,He.current),k(gt,e),zt===null&&(zt=e)}function wo(e){e.tag===22?(k(He,He.current),k(gt,e),zt===null&&(zt=e)):ja()}function ja(){k(He,He.current),k(gt,gt.current)}function yt(e){q(gt),zt===e&&(zt=null),q(He)}var He=S(0);function Cs(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||zc(a)||Rc(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 Ft=0,ie=null,Se=null,Ge=null,As=!1,Cl=!1,Pa=!1,Ms=0,yn=0,Al=null,Ex=0;function Oe(){throw Error(c(321))}function Er(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!xt(e[a],t[a]))return!1;return!0}function Tr(e,t,a,l,s,i){return Ft=i,ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?gf:Yr,Pa=!1,i=a(l,s),Pa=!1,Cl&&(i=Do(t,a,l,s)),Oo(e),i}function Oo(e){D.H=bn;var t=Se!==null&&Se.next!==null;if(Ft=0,Ge=Se=ie=null,As=!1,yn=0,Al=null,t)throw Error(c(300));e===null||Xe||(e=e.dependencies,e!==null&&ps(e)&&(Xe=!0))}function Do(e,t,a,l){ie=e;var s=0;do{if(Cl&&(Al=null),yn=0,Cl=!1,25<=s)throw Error(c(301));if(s+=1,Ge=Se=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}D.H=yf,i=t(a,l)}while(Cl);return i}function Tx(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?pn(t):t,e=e.useState()[0],(Se!==null?Se.memoizedState:null)!==e&&(ie.flags|=1024),t}function Cr(){var e=Ms!==0;return Ms=0,e}function Ar(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Mr(e){if(As){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}As=!1}Ft=0,Ge=Se=ie=null,Cl=!1,yn=Ms=0,Al=null}function tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ge===null?ie.memoizedState=Ge=e:Ge=Ge.next=e,Ge}function Be(){if(Se===null){var e=ie.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=Ge===null?ie.memoizedState:Ge.next;if(t!==null)Ge=t,Se=e;else{if(e===null)throw ie.alternate===null?Error(c(467)):Error(c(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},Ge===null?ie.memoizedState=Ge=e:Ge=Ge.next=e}return Ge}function zs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pn(e){var t=yn;return yn+=1,Al===null&&(Al=[]),e=Eo(Al,e,t),t=ie,(Ge===null?t.memoizedState:Ge.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?gf:Yr),e}function Rs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pn(e);if(e.$$typeof===V)return We(e)}throw Error(c(438,String(e)))}function zr(e){var t=null,a=ie.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ie.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=zs(),ie.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]=Ce;return t.index++,a}function Pt(e,t){return typeof t=="function"?t(e):t}function _s(e){var t=Be();return Rr(t,Se,e)}function Rr(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 f=s.next;s.next=i.next,i.next=f}t.baseQueue=s=i,l.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var h=f=null,b=null,M=t,U=!1;do{var B=M.lane&-536870913;if(B!==M.lane?(me&B)===B:(Ft&B)===B){var z=M.revertLane;if(z===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),B===jl&&(U=!0);else if((Ft&z)===z){M=M.next,z===jl&&(U=!0);continue}else B={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},b===null?(h=b=B,f=i):b=b.next=B,ie.lanes|=z,Ea|=z;B=M.action,Pa&&a(i,B),i=M.hasEagerState?M.eagerState:a(i,B)}else z={lane:B,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},b===null?(h=b=z,f=i):b=b.next=z,ie.lanes|=B,Ea|=B;M=M.next}while(M!==null&&M!==t);if(b===null?f=i:b.next=h,!xt(i,e.memoizedState)&&(Xe=!0,U&&(a=Nl,a!==null)))throw a;e.memoizedState=i,e.baseState=f,e.baseQueue=b,l.lastRenderedState=i}return s===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function _r(e){var t=Be(),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 f=s=s.next;do i=e(i,f.action),f=f.next;while(f!==s);xt(i,t.memoizedState)||(Xe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function Uo(e,t,a){var l=ie,s=Be(),i=he;if(i){if(a===void 0)throw Error(c(407));a=a()}else a=t();var f=!xt((Se||s).memoizedState,a);if(f&&(s.memoizedState=a,Xe=!0),s=s.queue,Dr(Bo.bind(null,l,s,e),[e]),s.getSnapshot!==t||f||Ge!==null&&Ge.memoizedState.tag&1){if(l.flags|=2048,Ml(9,{destroy:void 0},Ho.bind(null,l,s,a,t),null),Me===null)throw Error(c(349));i||(Ft&127)!==0||Lo(l,t,a)}return a}function Lo(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ie.updateQueue,t===null?(t=zs(),ie.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Ho(e,t,a,l){t.value=a,t.getSnapshot=l,qo(t)&&Yo(e)}function Bo(e,t,a){return a(function(){qo(t)&&Yo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!xt(e,a)}catch{return!0}}function Yo(e){var t=Qa(e,2);t!==null&&ut(t,e,2)}function wr(e){var t=tt();if(typeof e=="function"){var a=e;if(e=a(),Pa){oa(!0);try{a()}finally{oa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:e},t}function Go(e,t,a,l){return e.baseState=a,Rr(e,Se,typeof l=="function"?l:Pt)}function Cx(e,t,a,l,s){if(Ds(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(f){i.listeners.push(f)}};D.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,Xo(t,i)):(i.next=a.next,t.pending=a.next=i)}}function Xo(e,t){var a=t.action,l=t.payload,s=e.state;if(t.isTransition){var i=D.T,f={};D.T=f;try{var h=a(s,l),b=D.S;b!==null&&b(f,h),Qo(e,t,h)}catch(M){Or(e,t,M)}finally{i!==null&&f.types!==null&&(i.types=f.types),D.T=i}}else try{i=a(s,l),Qo(e,t,i)}catch(M){Or(e,t,M)}}function Qo(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Vo(e,t,l)},function(l){return Or(e,t,l)}):Vo(e,t,a)}function Vo(e,t,a){t.status="fulfilled",t.value=a,Zo(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Xo(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,Zo(t),t=t.next;while(t!==l)}e.action=null}function Zo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $o(e,t){return t}function ko(e,t){if(he){var a=Me.formState;if(a!==null){e:{var l=ie;if(he){if(ze){t:{for(var s=ze,i=Mt;s.nodeType!==8;){if(!i){s=null;break t}if(s=Rt(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){ze=Rt(s.nextSibling),l=s.data==="F!";break e}}ha(l)}l=!1}l&&(t=a[0])}}return a=tt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:t},a.queue=l,a=mf.bind(null,ie,l),l.dispatch=a,l=wr(!1),i=qr.bind(null,ie,!1,l.queue),l=tt(),s={state:t,dispatch:null,action:e,pending:null},l.queue=s,a=Cx.bind(null,ie,s,i,a),s.dispatch=a,l.memoizedState=e,[t,a,!1]}function Ko(e){var t=Be();return Jo(t,Se,e)}function Jo(e,t,a){if(t=Rr(e,t,$o)[0],e=_s(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=pn(t)}catch(f){throw f===Sl?js:f}else l=t;t=Be();var s=t.queue,i=s.dispatch;return a!==t.memoizedState&&(ie.flags|=2048,Ml(9,{destroy:void 0},Ax.bind(null,s,a),null)),[l,i,e]}function Ax(e,t){e.action=t}function Wo(e){var t=Be(),a=Se;if(a!==null)return Jo(t,a,e);Be(),t=t.memoizedState,a=Be();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Ml(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ie.updateQueue,t===null&&(t=zs(),ie.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 Fo(){return Be().memoizedState}function ws(e,t,a,l){var s=tt();ie.flags|=e,s.memoizedState=Ml(1|t,{destroy:void 0},a,l===void 0?null:l)}function Os(e,t,a,l){var s=Be();l=l===void 0?null:l;var i=s.memoizedState.inst;Se!==null&&l!==null&&Er(l,Se.memoizedState.deps)?s.memoizedState=Ml(t,i,a,l):(ie.flags|=e,s.memoizedState=Ml(1|t,i,a,l))}function Po(e,t){ws(8390656,8,e,t)}function Dr(e,t){Os(2048,8,e,t)}function Mx(e){ie.flags|=4;var t=ie.updateQueue;if(t===null)t=zs(),ie.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Io(e){var t=Be().memoizedState;return Mx({ref:t,nextImpl:e}),function(){if((pe&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function ef(e,t){return Os(4,2,e,t)}function tf(e,t){return Os(4,4,e,t)}function af(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 lf(e,t,a){a=a!=null?a.concat([e]):null,Os(4,4,af.bind(null,t,e),a)}function Ur(){}function nf(e,t){var a=Be();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Er(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function sf(e,t){var a=Be();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Er(t,l[1]))return l[0];if(l=e(),Pa){oa(!0);try{e()}finally{oa(!1)}}return a.memoizedState=[l,t],l}function Lr(e,t,a){return a===void 0||(Ft&1073741824)!==0&&(me&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=rd(),ie.lanes|=e,Ea|=e,a)}function rf(e,t,a,l){return xt(a,t)?a:Tl.current!==null?(e=Lr(e,a,l),xt(e,t)||(Xe=!0),e):(Ft&42)===0||(Ft&1073741824)!==0&&(me&261930)===0?(Xe=!0,e.memoizedState=a):(e=rd(),ie.lanes|=e,Ea|=e,t)}function cf(e,t,a,l,s){var i=Z.p;Z.p=i!==0&&8>i?i:8;var f=D.T,h={};D.T=h,qr(e,!1,t,a);try{var b=s(),M=D.S;if(M!==null&&M(h,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var U=Sx(b,l);vn(e,t,U,bt(e))}else vn(e,t,l,bt(e))}catch(B){vn(e,t,{then:function(){},status:"rejected",reason:B},bt())}finally{Z.p=i,f!==null&&h.types!==null&&(f.types=h.types),D.T=f}}function zx(){}function Hr(e,t,a,l){if(e.tag!==5)throw Error(c(476));var s=uf(e).queue;cf(e,s,t,ae,a===null?zx:function(){return of(e),a(l)})}function uf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:ae},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function of(e){var t=uf(e);t.next===null&&(t=e.alternate.memoizedState),vn(e,t.next.queue,{},bt())}function Br(){return We(Ln)}function ff(){return Be().memoizedState}function df(){return Be().memoizedState}function Rx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=bt();e=pa(a);var l=va(t,e,a);l!==null&&(ut(l,t,a),xn(l,t,a)),t={cache:mr()},e.payload=t;return}t=t.return}}function _x(e,t,a){var l=bt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ds(e)?xf(t,a):(a=ar(e,t,a,l),a!==null&&(ut(a,e,l),hf(a,t,l)))}function mf(e,t,a){var l=bt();vn(e,t,a,l)}function vn(e,t,a,l){var s={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ds(e))xf(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var f=t.lastRenderedState,h=i(f,a);if(s.hasEagerState=!0,s.eagerState=h,xt(h,f))return xs(e,t,s,0),Me===null&&ms(),!1}catch{}if(a=ar(e,t,s,l),a!==null)return ut(a,e,l),hf(a,t,l),!0}return!1}function qr(e,t,a,l){if(l={lane:2,revertLane:yc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ds(e)){if(t)throw Error(c(479))}else t=ar(e,a,l,2),t!==null&&ut(t,e,2)}function Ds(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function xf(e,t){Cl=As=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function hf(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,pu(e,a)}}var bn={readContext:We,use:Rs,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};bn.useEffectEvent=Oe;var gf={readContext:We,use:Rs,useCallback:function(e,t){return tt().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:Po,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ws(4194308,4,af.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ws(4194308,4,e,t)},useInsertionEffect:function(e,t){ws(4,2,e,t)},useMemo:function(e,t){var a=tt();t=t===void 0?null:t;var l=e();if(Pa){oa(!0);try{e()}finally{oa(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=tt();if(a!==void 0){var s=a(t);if(Pa){oa(!0);try{a(t)}finally{oa(!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=_x.bind(null,ie,e),[l.memoizedState,e]},useRef:function(e){var t=tt();return e={current:e},t.memoizedState=e},useState:function(e){e=wr(e);var t=e.queue,a=mf.bind(null,ie,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Ur,useDeferredValue:function(e,t){var a=tt();return Lr(a,e,t)},useTransition:function(){var e=wr(!1);return e=cf.bind(null,ie,e.queue,!0,!1),tt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ie,s=tt();if(he){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),Me===null)throw Error(c(349));(me&127)!==0||Lo(l,t,a)}s.memoizedState=a;var i={value:a,getSnapshot:t};return s.queue=i,Po(Bo.bind(null,l,i,e),[e]),l.flags|=2048,Ml(9,{destroy:void 0},Ho.bind(null,l,i,a,t),null),a},useId:function(){var e=tt(),t=Me.identifierPrefix;if(he){var a=Yt,l=qt;a=(l&~(1<<32-mt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ms++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ex++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Br,useFormState:ko,useActionState:ko,useOptimistic:function(e){var t=tt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=qr.bind(null,ie,!0,a),a.dispatch=t,[e,t]},useMemoCache:zr,useCacheRefresh:function(){return tt().memoizedState=Rx.bind(null,ie)},useEffectEvent:function(e){var t=tt(),a={impl:e};return t.memoizedState=a,function(){if((pe&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},Yr={readContext:We,use:Rs,useCallback:nf,useContext:We,useEffect:Dr,useImperativeHandle:lf,useInsertionEffect:ef,useLayoutEffect:tf,useMemo:sf,useReducer:_s,useRef:Fo,useState:function(){return _s(Pt)},useDebugValue:Ur,useDeferredValue:function(e,t){var a=Be();return rf(a,Se.memoizedState,e,t)},useTransition:function(){var e=_s(Pt)[0],t=Be().memoizedState;return[typeof e=="boolean"?e:pn(e),t]},useSyncExternalStore:Uo,useId:ff,useHostTransitionStatus:Br,useFormState:Ko,useActionState:Ko,useOptimistic:function(e,t){var a=Be();return Go(a,Se,e,t)},useMemoCache:zr,useCacheRefresh:df};Yr.useEffectEvent=Io;var yf={readContext:We,use:Rs,useCallback:nf,useContext:We,useEffect:Dr,useImperativeHandle:lf,useInsertionEffect:ef,useLayoutEffect:tf,useMemo:sf,useReducer:_r,useRef:Fo,useState:function(){return _r(Pt)},useDebugValue:Ur,useDeferredValue:function(e,t){var a=Be();return Se===null?Lr(a,e,t):rf(a,Se.memoizedState,e,t)},useTransition:function(){var e=_r(Pt)[0],t=Be().memoizedState;return[typeof e=="boolean"?e:pn(e),t]},useSyncExternalStore:Uo,useId:ff,useHostTransitionStatus:Br,useFormState:Wo,useActionState:Wo,useOptimistic:function(e,t){var a=Be();return Se!==null?Go(a,Se,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:zr,useCacheRefresh:df};yf.useEffectEvent=Io;function Gr(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Xr={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=bt(),s=pa(l);s.payload=t,a!=null&&(s.callback=a),t=va(e,s,l),t!==null&&(ut(t,e,l),xn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=bt(),s=pa(l);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=va(e,s,l),t!==null&&(ut(t,e,l),xn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=bt(),l=pa(a);l.tag=2,t!=null&&(l.callback=t),t=va(e,l,a),t!==null&&(ut(t,e,a),xn(t,e,a))}};function pf(e,t,a,l,s,i,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,f):t.prototype&&t.prototype.isPureReactComponent?!sn(a,l)||!sn(s,i):!0}function vf(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&&Xr.enqueueReplaceState(t,t.state,null)}function Ia(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=y({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function bf(e){ds(e)}function jf(e){console.error(e)}function Nf(e){ds(e)}function Us(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Sf(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 Qr(e,t,a){return a=pa(a),a.tag=3,a.payload={element:null},a.callback=function(){Us(e,t)},a}function Ef(e){return e=pa(e),e.tag=3,e}function Tf(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(){Sf(t,a,l)}}var f=a.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Sf(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 wx(e,t,a,l,s){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&bl(t,a,s,!0),a=gt.current,a!==null){switch(a.tag){case 31:case 13:return zt===null?ks():a.alternate===null&&De===0&&(De=3),a.flags&=-257,a.flags|=65536,a.lanes=s,l===Ns?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),xc(e,l,s)),!1;case 22:return a.flags|=65536,l===Ns?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)),xc(e,l,s)),!1}throw Error(c(435,a.tag))}return xc(e,l,s),ks(),!1}if(he)return t=gt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,l!==cr&&(e=Error(c(422),{cause:l}),un(Tt(e,a)))):(l!==cr&&(t=Error(c(423),{cause:l}),un(Tt(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,l=Tt(l,a),s=Qr(e.stateNode,l,s),vr(e,s),De!==4&&(De=2)),!1;var i=Error(c(520),{cause:l});if(i=Tt(i,a),Mn===null?Mn=[i]:Mn.push(i),De!==4&&(De=2),t===null)return!0;l=Tt(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Qr(a.stateNode,l,e),vr(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=Ef(s),Tf(s,e,a,l),vr(a,s),!1}a=a.return}while(a!==null);return!1}var Vr=Error(c(461)),Xe=!1;function Fe(e,t,a,l){t.child=e===null?Mo(t,null,a,l):Fa(t,e.child,a,l)}function Cf(e,t,a,l,s){a=a.render;var i=t.ref;if("ref"in l){var f={};for(var h in l)h!=="ref"&&(f[h]=l[h])}else f=l;return ka(t),l=Tr(e,t,a,f,i,s),h=Cr(),e!==null&&!Xe?(Ar(e,t,s),It(e,t,s)):(he&&h&&ir(t),t.flags|=1,Fe(e,t,l,s),t.child)}function Af(e,t,a,l,s){if(e===null){var i=a.type;return typeof i=="function"&&!lr(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,Mf(e,t,i,l,s)):(e=gs(a.type,null,l,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Pr(e,s)){var f=i.memoizedProps;if(a=a.compare,a=a!==null?a:sn,a(f,l)&&e.ref===t.ref)return It(e,t,s)}return t.flags|=1,e=kt(i,l),e.ref=t.ref,e.return=t,t.child=e}function Mf(e,t,a,l,s){if(e!==null){var i=e.memoizedProps;if(sn(i,l)&&e.ref===t.ref)if(Xe=!1,t.pendingProps=l=i,Pr(e,s))(e.flags&131072)!==0&&(Xe=!0);else return t.lanes=e.lanes,It(e,t,s)}return Zr(e,t,a,l,s)}function zf(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 Rf(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bs(t,i!==null?i.cachePool:null),i!==null?_o(t,i):jr(),wo(t);else return l=t.lanes=536870912,Rf(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(bs(t,i.cachePool),_o(t,i),ja(),t.memoizedState=null):(e!==null&&bs(t,null),jr(),ja());return Fe(e,t,s,a),t.child}function jn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rf(e,t,a,l,s){var i=hr();return i=i===null?null:{parent:Ye._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&bs(t,null),jr(),wo(t),e!==null&&bl(e,t,l,!0),t.childLanes=s,null}function Ls(e,t){return t=Bs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _f(e,t,a){return Fa(t,e.child,null,a),e=Ls(t,t.pendingProps),e.flags|=2,yt(t),t.memoizedState=null,e}function Ox(e,t,a){var l=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(he){if(l.mode==="hidden")return e=Ls(t,l),t.lanes=536870912,jn(null,e);if(Sr(t),(e=ze)?(e=Qd(e,Mt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:qt,overflow:Yt}:null,retryLane:536870912,hydrationErrors:null},a=mo(e),a.return=t,t.child=a,Je=t,ze=null)):e=null,e===null)throw ha(t);return t.lanes=536870912,null}return Ls(t,l)}var i=e.memoizedState;if(i!==null){var f=i.dehydrated;if(Sr(t),s)if(t.flags&256)t.flags&=-257,t=_f(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||bl(e,t,a,!1),s=(a&e.childLanes)!==0,Xe||s){if(l=Me,l!==null&&(f=vu(l,a),f!==0&&f!==i.retryLane))throw i.retryLane=f,Qa(e,f),ut(l,e,f),Vr;ks(),t=_f(e,t,a)}else e=i.treeContext,ze=Rt(f.nextSibling),Je=t,he=!0,xa=null,Mt=!1,e!==null&&go(t,e),t=Ls(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 Hs(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 ka(t),a=Tr(e,t,a,l,void 0,s),l=Cr(),e!==null&&!Xe?(Ar(e,t,s),It(e,t,s)):(he&&l&&ir(t),t.flags|=1,Fe(e,t,a,s),t.child)}function wf(e,t,a,l,s,i){return ka(t),t.updateQueue=null,a=Do(t,l,a,s),Oo(e),l=Cr(),e!==null&&!Xe?(Ar(e,t,i),It(e,t,i)):(he&&l&&ir(t),t.flags|=1,Fe(e,t,a,i),t.child)}function Of(e,t,a,l,s){if(ka(t),t.stateNode===null){var i=gl,f=a.contextType;typeof f=="object"&&f!==null&&(i=We(f)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Xr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},yr(t),f=a.contextType,i.context=typeof f=="object"&&f!==null?We(f):gl,i.state=t.memoizedState,f=a.getDerivedStateFromProps,typeof f=="function"&&(Gr(t,a,f,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(f=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),f!==i.state&&Xr.enqueueReplaceState(i,i.state,null),gn(t,l,i,s),hn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,b=Ia(a,h);i.props=b;var M=i.context,U=a.contextType;f=gl,typeof U=="object"&&U!==null&&(f=We(U));var B=a.getDerivedStateFromProps;U=typeof B=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,U||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||M!==f)&&vf(t,i,l,f),ya=!1;var z=t.memoizedState;i.state=z,gn(t,l,i,s),hn(),M=t.memoizedState,h||z!==M||ya?(typeof B=="function"&&(Gr(t,a,B,l),M=t.memoizedState),(b=ya||pf(t,a,b,l,z,M,f))?(U||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=M),i.props=l,i.state=M,i.context=f,l=b):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,pr(e,t),f=t.memoizedProps,U=Ia(a,f),i.props=U,B=t.pendingProps,z=i.context,M=a.contextType,b=gl,typeof M=="object"&&M!==null&&(b=We(M)),h=a.getDerivedStateFromProps,(M=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(f!==B||z!==b)&&vf(t,i,l,b),ya=!1,z=t.memoizedState,i.state=z,gn(t,l,i,s),hn();var _=t.memoizedState;f!==B||z!==_||ya||e!==null&&e.dependencies!==null&&ps(e.dependencies)?(typeof h=="function"&&(Gr(t,a,h,l),_=t.memoizedState),(U=ya||pf(t,a,U,l,z,_,b)||e!==null&&e.dependencies!==null&&ps(e.dependencies))?(M||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,_,b),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,_,b)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=_),i.props=l,i.state=_,i.context=b,l=U):(typeof i.componentDidUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,Hs(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=Fa(t,e.child,null,s),t.child=Fa(t,null,a,s)):Fe(e,t,a,s),t.memoizedState=i.state,e=t.child):e=It(e,t,s),e}function Df(e,t,a,l){return Za(),t.flags|=256,Fe(e,t,a,l),t.child}var $r={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kr(e){return{baseLanes:e,cachePool:No()}}function Kr(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=vt),e}function Uf(e,t,a){var l=t.pendingProps,s=!1,i=(t.flags&128)!==0,f;if((f=i)||(f=e!==null&&e.memoizedState===null?!1:(He.current&2)!==0),f&&(s=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(he){if(s?ba(t):ja(),(e=ze)?(e=Qd(e,Mt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:qt,overflow:Yt}:null,retryLane:536870912,hydrationErrors:null},a=mo(e),a.return=t,t.child=a,Je=t,ze=null)):e=null,e===null)throw ha(t);return Rc(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,s?(ja(),s=t.mode,h=Bs({mode:"hidden",children:h},s),l=Va(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=Kr(e,f,a),t.memoizedState=$r,jn(null,l)):(ba(t),Jr(t,h))}var b=e.memoizedState;if(b!==null&&(h=b.dehydrated,h!==null)){if(i)t.flags&256?(ba(t),t.flags&=-257,t=Wr(e,t,a)):t.memoizedState!==null?(ja(),t.child=e.child,t.flags|=128,t=null):(ja(),h=l.fallback,s=t.mode,l=Bs({mode:"visible",children:l.children},s),h=Va(h,s,a,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,Fa(t,e.child,null,a),l=t.child,l.memoizedState=kr(a),l.childLanes=Kr(e,f,a),t.memoizedState=$r,t=jn(null,l));else if(ba(t),Rc(h)){if(f=h.nextSibling&&h.nextSibling.dataset,f)var M=f.dgst;f=M,l=Error(c(419)),l.stack="",l.digest=f,un({value:l,source:null,stack:null}),t=Wr(e,t,a)}else if(Xe||bl(e,t,a,!1),f=(a&e.childLanes)!==0,Xe||f){if(f=Me,f!==null&&(l=vu(f,a),l!==0&&l!==b.retryLane))throw b.retryLane=l,Qa(e,l),ut(f,e,l),Vr;zc(h)||ks(),t=Wr(e,t,a)}else zc(h)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,ze=Rt(h.nextSibling),Je=t,he=!0,xa=null,Mt=!1,e!==null&&go(t,e),t=Jr(t,l.children),t.flags|=4096);return t}return s?(ja(),h=l.fallback,s=t.mode,b=e.child,M=b.sibling,l=kt(b,{mode:"hidden",children:l.children}),l.subtreeFlags=b.subtreeFlags&65011712,M!==null?h=kt(M,h):(h=Va(h,s,a,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,jn(null,l),l=t.child,h=e.child.memoizedState,h===null?h=kr(a):(s=h.cachePool,s!==null?(b=Ye._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=No(),h={baseLanes:h.baseLanes|a,cachePool:s}),l.memoizedState=h,l.childLanes=Kr(e,f,a),t.memoizedState=$r,jn(e.child,l)):(ba(t),a=e.child,e=a.sibling,a=kt(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=a,t.memoizedState=null,a)}function Jr(e,t){return t=Bs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bs(e,t){return e=ht(22,e,null,t),e.lanes=0,e}function Wr(e,t,a){return Fa(t,e.child,null,a),e=Jr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Lf(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),fr(e.return,t,a)}function Fr(e,t,a,l,s,i){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:s,treeForkCount:i}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=a,f.tailMode=s,f.treeForkCount=i)}function Hf(e,t,a){var l=t.pendingProps,s=l.revealOrder,i=l.tail;l=l.children;var f=He.current,h=(f&2)!==0;if(h?(f=f&1|2,t.flags|=128):f&=1,k(He,f),Fe(e,t,l,a),l=he?cn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lf(e,a,t);else if(e.tag===19)Lf(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&&Cs(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),Fr(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&&Cs(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}Fr(t,!0,a,null,i,l);break;case"together":Fr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function It(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ea|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(bl(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 Pr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ps(e)))}function Dx(e,t,a){switch(t.tag){case 3:et(t,t.stateNode.containerInfo),ga(t,Ye,e.memoizedState.cache),Za();break;case 27:case 5:$l(t);break;case 4:et(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Sr(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ba(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Uf(e,t,a):(ba(t),e=It(e,t,a),e!==null?e.sibling:null);ba(t);break;case 19:var s=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(bl(e,t,a,!1),l=(a&t.childLanes)!==0),s){if(l)return Hf(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),k(He,He.current),l)break;return null;case 22:return t.lanes=0,zf(e,t,a,t.pendingProps);case 24:ga(t,Ye,e.memoizedState.cache)}return It(e,t,a)}function Bf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xe=!0;else{if(!Pr(e,a)&&(t.flags&128)===0)return Xe=!1,Dx(e,t,a);Xe=(e.flags&131072)!==0}else Xe=!1,he&&(t.flags&1048576)!==0&&ho(t,cn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Ja(t.elementType),t.type=e,typeof e=="function")lr(e)?(l=Ia(e,l),t.tag=1,t=Of(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===K){t.tag=11,t=Cf(null,t,e,l,a);break e}else if(s===Y){t.tag=14,t=Af(null,t,e,l,a);break e}}throw t=Dt(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=Ia(l,t.pendingProps),Of(e,t,l,s,a);case 3:e:{if(et(t,t.stateNode.containerInfo),e===null)throw Error(c(387));l=t.pendingProps;var i=t.memoizedState;s=i.element,pr(e,t),gn(t,l,null,a);var f=t.memoizedState;if(l=f.cache,ga(t,Ye,l),l!==i.cache&&dr(t,[Ye],a,!0),hn(),l=f.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Df(e,t,l,a);break e}else if(l!==s){s=Tt(Error(c(424)),t),un(s),t=Df(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=Rt(e.firstChild),Je=t,he=!0,xa=null,Mt=!0,a=Mo(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Za(),l===s){t=It(e,t,a);break e}Fe(e,t,l,a)}t=t.child}return t;case 26:return Hs(e,t),e===null?(a=Jd(t.type,null,t.pendingProps,null))?t.memoizedState=a:he||(a=t.type,e=t.pendingProps,l=ei(ue.current).createElement(a),l[Ke]=t,l[lt]=e,Pe(l,a,e),$e(l),t.stateNode=l):t.memoizedState=Jd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $l(t),e===null&&he&&(l=t.stateNode=$d(t.type,t.pendingProps,ue.current),Je=t,Mt=!0,s=ze,za(t.type)?(_c=s,ze=Rt(l.firstChild)):ze=s),Fe(e,t,t.pendingProps.children,a),Hs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&he&&((s=l=ze)&&(l=oh(l,t.type,t.pendingProps,Mt),l!==null?(t.stateNode=l,Je=t,ze=Rt(l.firstChild),Mt=!1,s=!0):s=!1),s||ha(t)),$l(t),s=t.type,i=t.pendingProps,f=e!==null?e.memoizedProps:null,l=i.children,Cc(s,i)?l=null:f!==null&&Cc(s,f)&&(t.flags|=32),t.memoizedState!==null&&(s=Tr(e,t,Tx,null,null,a),Ln._currentValue=s),Hs(e,t),Fe(e,t,l,a),t.child;case 6:return e===null&&he&&((e=a=ze)&&(a=fh(a,t.pendingProps,Mt),a!==null?(t.stateNode=a,Je=t,ze=null,e=!0):e=!1),e||ha(t)),null;case 13:return Uf(e,t,a);case 4:return et(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Fa(t,null,l,a):Fe(e,t,l,a),t.child;case 11:return Cf(e,t,t.type,t.pendingProps,a);case 7:return Fe(e,t,t.pendingProps,a),t.child;case 8:return Fe(e,t,t.pendingProps.children,a),t.child;case 12:return Fe(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,ga(t,t.type,l.value),Fe(e,t,l.children,a),t.child;case 9:return s=t.type._context,l=t.pendingProps.children,ka(t),s=We(s),l=l(s),t.flags|=1,Fe(e,t,l,a),t.child;case 14:return Af(e,t,t.type,t.pendingProps,a);case 15:return Mf(e,t,t.type,t.pendingProps,a);case 19:return Hf(e,t,a);case 31:return Ox(e,t,a);case 22:return zf(e,t,a,t.pendingProps);case 24:return ka(t),l=We(Ye),e===null?(s=hr(),s===null&&(s=Me,i=mr(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=a),s=i),t.memoizedState={parent:l,cache:s},yr(t),ga(t,Ye,s)):((e.lanes&a)!==0&&(pr(e,t),gn(t,null,null,a),hn()),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),ga(t,Ye,l)):(l=i.cache,ga(t,Ye,l),l!==s.cache&&dr(t,[Ye],a,!0))),Fe(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function ea(e){e.flags|=4}function Ir(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(fd())e.flags|=8192;else throw Wa=Ns,gr}else e.flags&=-16777217}function qf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!e0(t))if(fd())e.flags|=8192;else throw Wa=Ns,gr}function qs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?gu():536870912,e.lanes|=t,wl|=t)}function Nn(e,t){if(!he)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 Ux(e,t,a){var l=t.pendingProps;switch(rr(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),Wt(Ye),Le(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(vl(t)?ea(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ur())),Re(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(ea(t),i!==null?(Re(t),qf(t,i)):(Re(t),Ir(t,s,null,l,a))):i?i!==e.memoizedState?(ea(t),Re(t),qf(t,i)):(Re(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ea(t),Re(t),Ir(t,s,e,l,a)),null;case 27:if(Wn(t),a=ue.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}e=F.current,vl(t)?yo(t):(e=$d(s,l,a),t.stateNode=e,ea(t))}return Re(t),null;case 5:if(Wn(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(!l){if(t.stateNode===null)throw Error(c(166));return Re(t),null}if(i=F.current,vl(t))yo(t);else{var f=ei(ue.current);switch(i){case 1:i=f.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=f.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=f.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=f.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=f.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?f.createElement(s,{is:l.is}):f.createElement(s)}}i[Ke]=t,i[lt]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)i.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=i;e:switch(Pe(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&&ea(t)}}return Re(t),Ir(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ea(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(c(166));if(e=ue.current,vl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,s=Je,s!==null)switch(s.tag){case 27:case 5:l=s.memoizedProps}e[Ke]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Ud(e.nodeValue,a)),e||ha(t,!0)}else e=ei(e).createTextNode(l),e[Ke]=t,t.stateNode=e}return Re(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=vl(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[Ke]=t}else Za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),e=!1}else a=ur(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(yt(t),t):(yt(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=vl(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[Ke]=t}else Za(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),s=!1}else s=ur(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(yt(t),t):(yt(t),null)}return yt(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),qs(t,t.updateQueue),Re(t),null);case 4:return Le(),e===null&&jc(t.stateNode.containerInfo),Re(t),null;case 10:return Wt(t.type),Re(t),null;case 19:if(q(He),l=t.memoizedState,l===null)return Re(t),null;if(s=(t.flags&128)!==0,i=l.rendering,i===null)if(s)Nn(l,!1);else{if(De!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Cs(e),i!==null){for(t.flags|=128,Nn(l,!1),e=i.updateQueue,t.updateQueue=e,qs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)fo(a,e),a=a.sibling;return k(He,He.current&1|2),he&&Kt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ft()>Vs&&(t.flags|=128,s=!0,Nn(l,!1),t.lanes=4194304)}else{if(!s)if(e=Cs(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,qs(t,e),Nn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!he)return Re(t),null}else 2*ft()-l.renderingStartTime>Vs&&a!==536870912&&(t.flags|=128,s=!0,Nn(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=ft(),e.sibling=null,a=He.current,k(He,s?a&1|2:a&1),he&&Kt(t,l.treeForkCount),e):(Re(t),null);case 22:case 23:return yt(t),Nr(),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&&qs(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&&q(Ka),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wt(Ye),Re(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Lx(e,t){switch(rr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wt(Ye),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Wn(t),null;case 31:if(t.memoizedState!==null){if(yt(t),t.alternate===null)throw Error(c(340));Za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(yt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Za()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(He),null;case 4:return Le(),null;case 10:return Wt(t.type),null;case 22:case 23:return yt(t),Nr(),e!==null&&q(Ka),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wt(Ye),null;case 25:return null;default:return null}}function Yf(e,t){switch(rr(t),t.tag){case 3:Wt(Ye),Le();break;case 26:case 27:case 5:Wn(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&yt(t);break;case 13:yt(t);break;case 19:q(He);break;case 10:Wt(t.type);break;case 22:case 23:yt(t),Nr(),e!==null&&q(Ka);break;case 24:Wt(Ye)}}function Sn(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,f=a.inst;l=i(),f.destroy=l}a=a.next}while(a!==s)}}catch(h){je(t,t.return,h)}}function Na(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 f=l.inst,h=f.destroy;if(h!==void 0){f.destroy=void 0,s=t;var b=a,M=h;try{M()}catch(U){je(s,b,U)}}}l=l.next}while(l!==i)}}catch(U){je(t,t.return,U)}}function Gf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Ro(t,a)}catch(l){je(e,e.return,l)}}}function Xf(e,t,a){a.props=Ia(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){je(e,t,l)}}function En(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){je(e,t,s)}}function Gt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(s){je(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){je(e,t,s)}else a.current=null}function Qf(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){je(e,e.return,s)}}function ec(e,t,a){try{var l=e.stateNode;nh(l,e.type,a,t),l[lt]=t}catch(s){je(e,e.return,s)}}function Vf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&za(e.type)||e.tag===4}function tc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vf(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&&za(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 ac(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&&za(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(ac(e,t,a),e=e.sibling;e!==null;)ac(e,t,a),e=e.sibling}function Ys(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&&za(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Ys(e,t,a),e=e.sibling;e!==null;)Ys(e,t,a),e=e.sibling}function Zf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Pe(t,l,a),t[Ke]=e,t[lt]=a}catch(i){je(e,e.return,i)}}var ta=!1,Qe=!1,lc=!1,$f=typeof WeakSet=="function"?WeakSet:Set,ke=null;function Hx(e,t){if(e=e.containerInfo,Ec=ri,e=ao(e),Wi(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 f=0,h=-1,b=-1,M=0,U=0,B=e,z=null;t:for(;;){for(var _;B!==a||s!==0&&B.nodeType!==3||(h=f+s),B!==i||l!==0&&B.nodeType!==3||(b=f+l),B.nodeType===3&&(f+=B.nodeValue.length),(_=B.firstChild)!==null;)z=B,B=_;for(;;){if(B===e)break t;if(z===a&&++M===s&&(h=f),z===i&&++U===l&&(b=f),(_=B.nextSibling)!==null)break;B=z,z=B.parentNode}B=_}a=h===-1||b===-1?null:{start:h,end:b}}else a=null}a=a||{start:0,end:0}}else a=null;for(Tc={focusedElem:e,selectionRange:a},ri=!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 J=Ia(a.type,s);e=l.getSnapshotBeforeUpdate(J,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(te){je(a,a.return,te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Mc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mc(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 kf(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:la(e,a),l&4&&Sn(5,a);break;case 1:if(la(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(f){je(a,a.return,f)}else{var s=Ia(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){je(a,a.return,f)}}l&64&&Gf(a),l&512&&En(a,a.return);break;case 3:if(la(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{Ro(e,t)}catch(f){je(a,a.return,f)}}break;case 27:t===null&&l&4&&Zf(a);case 26:case 5:la(e,a),t===null&&l&4&&Qf(a),l&512&&En(a,a.return);break;case 12:la(e,a);break;case 31:la(e,a),l&4&&Wf(e,a);break;case 13:la(e,a),l&4&&Ff(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=$x.bind(null,a),dh(e,a))));break;case 22:if(l=a.memoizedState!==null||ta,!l){t=t!==null&&t.memoizedState!==null||Qe,s=ta;var i=Qe;ta=l,(Qe=t)&&!i?na(e,a,(a.subtreeFlags&8772)!==0):la(e,a),ta=s,Qe=i}break;case 30:break;default:la(e,a)}}function Kf(e){var t=e.alternate;t!==null&&(e.alternate=null,Kf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&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,st=!1;function aa(e,t,a){for(a=a.child;a!==null;)Jf(e,t,a),a=a.sibling}function Jf(e,t,a){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(kl,a)}catch{}switch(a.tag){case 26:Qe||Gt(a,t),aa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Qe||Gt(a,t);var l=_e,s=st;za(a.type)&&(_e=a.stateNode,st=!1),aa(e,t,a),On(a.stateNode),_e=l,st=s;break;case 5:Qe||Gt(a,t);case 6:if(l=_e,s=st,_e=null,aa(e,t,a),_e=l,st=s,_e!==null)if(st)try{(_e.nodeType===9?_e.body:_e.nodeName==="HTML"?_e.ownerDocument.body:_e).removeChild(a.stateNode)}catch(i){je(a,t,i)}else try{_e.removeChild(a.stateNode)}catch(i){je(a,t,i)}break;case 18:_e!==null&&(st?(e=_e,Gd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Yl(e)):Gd(_e,a.stateNode));break;case 4:l=_e,s=st,_e=a.stateNode.containerInfo,st=!0,aa(e,t,a),_e=l,st=s;break;case 0:case 11:case 14:case 15:Na(2,a,t),Qe||Na(4,a,t),aa(e,t,a);break;case 1:Qe||(Gt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Xf(a,t,l)),aa(e,t,a);break;case 21:aa(e,t,a);break;case 22:Qe=(l=Qe)||a.memoizedState!==null,aa(e,t,a),Qe=l;break;default:aa(e,t,a)}}function Wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Yl(e)}catch(a){je(t,t.return,a)}}}function Ff(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Yl(e)}catch(a){je(t,t.return,a)}}function Bx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $f),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $f),t;default:throw Error(c(435,e.tag))}}function Gs(e,t){var a=Bx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var s=kx.bind(null,e,l);l.then(s,s)}})}function it(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var s=a[l],i=e,f=t,h=f;e:for(;h!==null;){switch(h.tag){case 27:if(za(h.type)){_e=h.stateNode,st=!1;break e}break;case 5:_e=h.stateNode,st=!1;break e;case 3:case 4:_e=h.stateNode.containerInfo,st=!0;break e}h=h.return}if(_e===null)throw Error(c(160));Jf(i,f,s),_e=null,st=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Pf(t,e),t=t.sibling}var Lt=null;function Pf(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:it(t,e),rt(e),l&4&&(Na(3,e,e.return),Sn(3,e),Na(5,e,e.return));break;case 1:it(t,e),rt(e),l&512&&(Qe||a===null||Gt(a,a.return)),l&64&&ta&&(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=Lt;if(it(t,e),rt(e),l&512&&(Qe||a===null||Gt(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[Wl]||i[Ke]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(l),s.head.insertBefore(i,s.querySelector("head > title"))),Pe(i,l,a),i[Ke]=e,$e(i),l=i;break e;case"link":var f=Pd("link","href",s).get(l+(a.href||""));if(f){for(var h=0;h<f.length;h++)if(i=f[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)){f.splice(h,1);break t}}i=s.createElement(l),Pe(i,l,a),s.head.appendChild(i);break;case"meta":if(f=Pd("meta","content",s).get(l+(a.content||""))){for(h=0;h<f.length;h++)if(i=f[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)){f.splice(h,1);break t}}i=s.createElement(l),Pe(i,l,a),s.head.appendChild(i);break;default:throw Error(c(468,l))}i[Ke]=e,$e(i),l=i}e.stateNode=l}else Id(s,e.type,e.stateNode);else e.stateNode=Fd(s,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?Id(s,e.type,e.stateNode):Fd(s,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ec(e,e.memoizedProps,a.memoizedProps)}break;case 27:it(t,e),rt(e),l&512&&(Qe||a===null||Gt(a,a.return)),a!==null&&l&4&&ec(e,e.memoizedProps,a.memoizedProps);break;case 5:if(it(t,e),rt(e),l&512&&(Qe||a===null||Gt(a,a.return)),e.flags&32){s=e.stateNode;try{ul(s,"")}catch(J){je(e,e.return,J)}}l&4&&e.stateNode!=null&&(s=e.memoizedProps,ec(e,s,a!==null?a.memoizedProps:s)),l&1024&&(lc=!0);break;case 6:if(it(t,e),rt(e),l&4){if(e.stateNode===null)throw Error(c(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(J){je(e,e.return,J)}}break;case 3:if(li=null,s=Lt,Lt=ti(t.containerInfo),it(t,e),Lt=s,rt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Yl(t.containerInfo)}catch(J){je(e,e.return,J)}lc&&(lc=!1,If(e));break;case 4:l=Lt,Lt=ti(e.stateNode.containerInfo),it(t,e),rt(e),Lt=l;break;case 12:it(t,e),rt(e);break;case 31:it(t,e),rt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Gs(e,l)));break;case 13:it(t,e),rt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Qs=ft()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Gs(e,l)));break;case 22:s=e.memoizedState!==null;var b=a!==null&&a.memoizedState!==null,M=ta,U=Qe;if(ta=M||s,Qe=U||b,it(t,e),Qe=U,ta=M,rt(e),l&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||b||ta||Qe||el(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){b=a=t;try{if(i=b.stateNode,s)f=i.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{h=b.stateNode;var B=b.memoizedProps.style,z=B!=null&&B.hasOwnProperty("display")?B.display:null;h.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(J){je(b,b.return,J)}}}else if(t.tag===6){if(a===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(J){je(b,b.return,J)}}}else if(t.tag===18){if(a===null){b=t;try{var _=b.stateNode;s?Xd(_,!0):Xd(b.stateNode,!1)}catch(J){je(b,b.return,J)}}}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,Gs(e,a))));break;case 19:it(t,e),rt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Gs(e,l)));break;case 30:break;case 21:break;default:it(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Vf(l)){a=l;break}l=l.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var s=a.stateNode,i=tc(e);Ys(e,i,s);break;case 5:var f=a.stateNode;a.flags&32&&(ul(f,""),a.flags&=-33);var h=tc(e);Ys(e,h,f);break;case 3:case 4:var b=a.stateNode.containerInfo,M=tc(e);ac(e,M,b);break;default:throw Error(c(161))}}catch(U){je(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function If(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;If(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function la(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)kf(e,t.alternate,t),t=t.sibling}function el(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Na(4,t,t.return),el(t);break;case 1:Gt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Xf(t,t.return,a),el(t);break;case 27:On(t.stateNode);case 26:case 5:Gt(t,t.return),el(t);break;case 22:t.memoizedState===null&&el(t);break;case 30:el(t);break;default:el(t)}e=e.sibling}}function na(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,s=e,i=t,f=i.flags;switch(i.tag){case 0:case 11:case 15:na(s,i,a),Sn(4,i);break;case 1:if(na(s,i,a),l=i,s=l.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(M){je(l,l.return,M)}if(l=i,s=l.updateQueue,s!==null){var h=l.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)zo(b[s],h)}catch(M){je(l,l.return,M)}}a&&f&64&&Gf(i),En(i,i.return);break;case 27:Zf(i);case 26:case 5:na(s,i,a),a&&l===null&&f&4&&Qf(i),En(i,i.return);break;case 12:na(s,i,a);break;case 31:na(s,i,a),a&&f&4&&Wf(s,i);break;case 13:na(s,i,a),a&&f&4&&Ff(s,i);break;case 22:i.memoizedState===null&&na(s,i,a),En(i,i.return);break;case 30:break;default:na(s,i,a)}t=t.sibling}}function nc(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&&on(a))}function sc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&on(e))}function Ht(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ed(e,t,a,l),t=t.sibling}function ed(e,t,a,l){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Ht(e,t,a,l),s&2048&&Sn(9,t);break;case 1:Ht(e,t,a,l);break;case 3:Ht(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&&on(e)));break;case 12:if(s&2048){Ht(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,f=i.id,h=i.onPostCommit;typeof h=="function"&&h(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){je(t,t.return,b)}}else Ht(e,t,a,l);break;case 31:Ht(e,t,a,l);break;case 13:Ht(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,f=t.alternate,t.memoizedState!==null?i._visibility&2?Ht(e,t,a,l):Tn(e,t):i._visibility&2?Ht(e,t,a,l):(i._visibility|=2,zl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),s&2048&&nc(f,t);break;case 24:Ht(e,t,a,l),s&2048&&sc(t.alternate,t);break;default:Ht(e,t,a,l)}}function zl(e,t,a,l,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,f=t,h=a,b=l,M=f.flags;switch(f.tag){case 0:case 11:case 15:zl(i,f,h,b,s),Sn(8,f);break;case 23:break;case 22:var U=f.stateNode;f.memoizedState!==null?U._visibility&2?zl(i,f,h,b,s):Tn(i,f):(U._visibility|=2,zl(i,f,h,b,s)),s&&M&2048&&nc(f.alternate,f);break;case 24:zl(i,f,h,b,s),s&&M&2048&&sc(f.alternate,f);break;default:zl(i,f,h,b,s)}t=t.sibling}}function Tn(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:Tn(a,l),s&2048&&nc(l.alternate,l);break;case 24:Tn(a,l),s&2048&&sc(l.alternate,l);break;default:Tn(a,l)}t=t.sibling}}var Cn=8192;function Rl(e,t,a){if(e.subtreeFlags&Cn)for(e=e.child;e!==null;)td(e,t,a),e=e.sibling}function td(e,t,a){switch(e.tag){case 26:Rl(e,t,a),e.flags&Cn&&e.memoizedState!==null&&Eh(a,Lt,e.memoizedState,e.memoizedProps);break;case 5:Rl(e,t,a);break;case 3:case 4:var l=Lt;Lt=ti(e.stateNode.containerInfo),Rl(e,t,a),Lt=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Cn,Cn=16777216,Rl(e,t,a),Cn=l):Rl(e,t,a));break;default:Rl(e,t,a)}}function ad(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 An(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,nd(l,e)}ad(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ld(e),e=e.sibling}function ld(e){switch(e.tag){case 0:case 11:case 15:An(e),e.flags&2048&&Na(9,e,e.return);break;case 3:An(e);break;case 12:An(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xs(e)):An(e);break;default:An(e)}}function Xs(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,nd(l,e)}ad(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Na(8,t,t.return),Xs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Xs(t));break;default:Xs(t)}e=e.sibling}}function nd(e,t){for(;ke!==null;){var a=ke;switch(a.tag){case 0:case 11:case 15:Na(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:on(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(Kf(l),l===a){ke=null;break e}if(s!==null){s.return=i,ke=s;break e}ke=i}}}var qx={getCacheForType:function(e){var t=We(Ye),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return We(Ye).controller.signal}},Yx=typeof WeakMap=="function"?WeakMap:Map,pe=0,Me=null,oe=null,me=0,be=0,pt=null,Sa=!1,_l=!1,ic=!1,sa=0,De=0,Ea=0,tl=0,rc=0,vt=0,wl=0,Mn=null,ct=null,cc=!1,Qs=0,sd=0,Vs=1/0,Zs=null,Ta=null,Ze=0,Ca=null,Ol=null,ia=0,uc=0,oc=null,id=null,zn=0,fc=null;function bt(){return(pe&2)!==0&&me!==0?me&-me:D.T!==null?yc():bu()}function rd(){if(vt===0)if((me&536870912)===0||he){var e=In;In<<=1,(In&3932160)===0&&(In=262144),vt=e}else vt=536870912;return e=gt.current,e!==null&&(e.flags|=32),vt}function ut(e,t,a){(e===Me&&(be===2||be===9)||e.cancelPendingCommit!==null)&&(Dl(e,0),Aa(e,me,vt,!1)),Jl(e,a),((pe&2)===0||e!==Me)&&(e===Me&&((pe&2)===0&&(tl|=a),De===4&&Aa(e,me,vt,!1)),Xt(e))}function cd(e,t,a){if((pe&6)!==0)throw Error(c(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Kl(e,t),s=l?Qx(e,t):mc(e,t,!0),i=l;do{if(s===0){_l&&!l&&Aa(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!Gx(a)){s=mc(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var h=e;s=Mn;var b=h.current.memoizedState.isDehydrated;if(b&&(Dl(h,f).flags|=256),f=mc(h,f,!1),f!==2){if(ic&&!b){h.errorRecoveryDisabledLanes|=i,tl|=i,s=4;break e}i=ct,ct=s,i!==null&&(ct===null?ct=i:ct.push.apply(ct,i))}s=f}if(i=!1,s!==2)continue}}if(s===1){Dl(e,0),Aa(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:Aa(l,t,vt,!Sa);break e;case 2:ct=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(s=Qs+300-ft(),10<s)){if(Aa(l,t,vt,!Sa),ts(l,0,!0)!==0)break e;ia=t,l.timeoutHandle=qd(ud.bind(null,l,a,ct,Zs,cc,t,vt,tl,wl,Sa,i,"Throttled",-0,0),s);break e}ud(l,a,ct,Zs,cc,t,vt,tl,wl,Sa,i,null,-0,0)}}break}while(!0);Xt(e)}function ud(e,t,a,l,s,i,f,h,b,M,U,B,z,_){if(e.timeoutHandle=-1,B=t.subtreeFlags,B&8192||(B&16785408)===16785408){B={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},td(t,i,B);var J=(i&62914560)===i?Qs-ft():(i&4194048)===i?sd-ft():0;if(J=Th(B,J),J!==null){ia=i,e.cancelPendingCommit=J(yd.bind(null,e,t,i,a,l,s,f,h,b,U,B,null,z,_)),Aa(e,i,f,!M);return}}yd(e,t,i,a,l,s,f,h,b)}function Gx(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(!xt(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 Aa(e,t,a,l){t&=~rc,t&=~tl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var s=t;0<s;){var i=31-mt(s),f=1<<i;l[i]=-1,s&=~f}a!==0&&yu(e,a,t)}function $s(){return(pe&6)===0?(Rn(0),!1):!0}function dc(){if(oe!==null){if(be===0)var e=oe.return;else e=oe,Jt=$a=null,Mr(e),El=null,dn=0,e=oe;for(;e!==null;)Yf(e.alternate,e),e=e.return;oe=null}}function Dl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,rh(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ia=0,dc(),Me=e,oe=a=kt(e.current,null),me=t,be=0,pt=null,Sa=!1,_l=Kl(e,t),ic=!1,wl=vt=rc=tl=Ea=De=0,ct=Mn=null,cc=!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-mt(l),i=1<<s;t|=e[s],l&=~i}return sa=t,ms(),a}function od(e,t){ie=null,D.H=bn,t===Sl||t===js?(t=To(),be=3):t===gr?(t=To(),be=4):be=t===Vr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pt=t,oe===null&&(De=1,Us(e,Tt(t,e.current)))}function fd(){var e=gt.current;return e===null?!0:(me&4194048)===me?zt===null:(me&62914560)===me||(me&536870912)!==0?e===zt:!1}function dd(){var e=D.H;return D.H=bn,e===null?bn:e}function md(){var e=D.A;return D.A=qx,e}function ks(){De=4,Sa||(me&4194048)!==me&>.current!==null||(_l=!0),(Ea&134217727)===0&&(tl&134217727)===0||Me===null||Aa(Me,me,vt,!1)}function mc(e,t,a){var l=pe;pe|=2;var s=dd(),i=md();(Me!==e||me!==t)&&(Zs=null,Dl(e,t)),t=!1;var f=De;e:do try{if(be!==0&&oe!==null){var h=oe,b=pt;switch(be){case 8:dc(),f=6;break e;case 3:case 2:case 9:case 6:gt.current===null&&(t=!0);var M=be;if(be=0,pt=null,Ul(e,h,b,M),a&&_l){f=0;break e}break;default:M=be,be=0,pt=null,Ul(e,h,b,M)}}Xx(),f=De;break}catch(U){od(e,U)}while(!0);return t&&e.shellSuspendCounter++,Jt=$a=null,pe=l,D.H=s,D.A=i,oe===null&&(Me=null,me=0,ms()),f}function Xx(){for(;oe!==null;)xd(oe)}function Qx(e,t){var a=pe;pe|=2;var l=dd(),s=md();Me!==e||me!==t?(Zs=null,Vs=ft()+500,Dl(e,t)):_l=Kl(e,t);e:do try{if(be!==0&&oe!==null){t=oe;var i=pt;t:switch(be){case 1:be=0,pt=null,Ul(e,t,i,1);break;case 2:case 9:if(So(i)){be=0,pt=null,hd(t);break}t=function(){be!==2&&be!==9||Me!==e||(be=7),Xt(e)},i.then(t,t);break e;case 3:be=7;break e;case 4:be=5;break e;case 7:So(i)?(be=0,pt=null,hd(t)):(be=0,pt=null,Ul(e,t,i,7));break;case 5:var f=null;switch(oe.tag){case 26:f=oe.memoizedState;case 5:case 27:var h=oe;if(f?e0(f):h.stateNode.complete){be=0,pt=null;var b=h.sibling;if(b!==null)oe=b;else{var M=h.return;M!==null?(oe=M,Ks(M)):oe=null}break t}}be=0,pt=null,Ul(e,t,i,5);break;case 6:be=0,pt=null,Ul(e,t,i,6);break;case 8:dc(),De=6;break e;default:throw Error(c(462))}}Vx();break}catch(U){od(e,U)}while(!0);return Jt=$a=null,D.H=l,D.A=s,pe=a,oe!==null?0:(Me=null,me=0,ms(),De)}function Vx(){for(;oe!==null&&!mm();)xd(oe)}function xd(e){var t=Bf(e.alternate,e,sa);e.memoizedProps=e.pendingProps,t===null?Ks(e):oe=t}function hd(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=wf(a,t,t.pendingProps,t.type,void 0,me);break;case 11:t=wf(a,t,t.pendingProps,t.type.render,t.ref,me);break;case 5:Mr(t);default:Yf(a,t),t=oe=fo(t,sa),t=Bf(a,t,sa)}e.memoizedProps=e.pendingProps,t===null?Ks(e):oe=t}function Ul(e,t,a,l){Jt=$a=null,Mr(t),El=null,dn=0;var s=t.return;try{if(wx(e,s,t,a,me)){De=1,Us(e,Tt(a,e.current)),oe=null;return}}catch(i){if(s!==null)throw oe=s,i;De=1,Us(e,Tt(a,e.current)),oe=null;return}t.flags&32768?(he||l===1?e=!0:_l||(me&536870912)!==0?e=!1:(Sa=e=!0,(l===2||l===9||l===3||l===6)&&(l=gt.current,l!==null&&l.tag===13&&(l.flags|=16384))),gd(t,e)):Ks(t)}function Ks(e){var t=e;do{if((t.flags&32768)!==0){gd(t,Sa);return}e=t.return;var a=Ux(t.alternate,t,sa);if(a!==null){oe=a;return}if(t=t.sibling,t!==null){oe=t;return}oe=t=e}while(t!==null);De===0&&(De=5)}function gd(e,t){do{var a=Lx(e.alternate,e);if(a!==null){a.flags&=32767,oe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){oe=e;return}oe=e=a}while(e!==null);De=6,oe=null}function yd(e,t,a,l,s,i,f,h,b){e.cancelPendingCommit=null;do Js();while(Ze!==0);if((pe&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(i=t.lanes|t.childLanes,i|=tr,Sm(e,a,i,f,h,b),e===Me&&(oe=Me=null,me=0),Ol=t,Ca=e,ia=a,uc=i,oc=s,id=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Kx(Fn,function(){return Nd(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,s=Z.p,Z.p=2,f=pe,pe|=4;try{Hx(e,t,a)}finally{pe=f,Z.p=s,D.T=l}}Ze=1,pd(),vd(),bd()}}function pd(){if(Ze===1){Ze=0;var e=Ca,t=Ol,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var l=Z.p;Z.p=2;var s=pe;pe|=4;try{Pf(t,e);var i=Tc,f=ao(e.containerInfo),h=i.focusedElem,b=i.selectionRange;if(f!==h&&h&&h.ownerDocument&&to(h.ownerDocument.documentElement,h)){if(b!==null&&Wi(h)){var M=b.start,U=b.end;if(U===void 0&&(U=M),"selectionStart"in h)h.selectionStart=M,h.selectionEnd=Math.min(U,h.value.length);else{var B=h.ownerDocument||document,z=B&&B.defaultView||window;if(z.getSelection){var _=z.getSelection(),J=h.textContent.length,te=Math.min(b.start,J),Te=b.end===void 0?te:Math.min(b.end,J);!_.extend&&te>Te&&(f=Te,Te=te,te=f);var T=eo(h,te),N=eo(h,Te);if(T&&N&&(_.rangeCount!==1||_.anchorNode!==T.node||_.anchorOffset!==T.offset||_.focusNode!==N.node||_.focusOffset!==N.offset)){var A=B.createRange();A.setStart(T.node,T.offset),_.removeAllRanges(),te>Te?(_.addRange(A),_.extend(N.node,N.offset)):(A.setEnd(N.node,N.offset),_.addRange(A))}}}}for(B=[],_=h;_=_.parentNode;)_.nodeType===1&&B.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<B.length;h++){var L=B[h];L.element.scrollLeft=L.left,L.element.scrollTop=L.top}}ri=!!Ec,Tc=Ec=null}finally{pe=s,Z.p=l,D.T=a}}e.current=t,Ze=2}}function vd(){if(Ze===2){Ze=0;var e=Ca,t=Ol,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var l=Z.p;Z.p=2;var s=pe;pe|=4;try{kf(e,t.alternate,t)}finally{pe=s,Z.p=l,D.T=a}}Ze=3}}function bd(){if(Ze===4||Ze===3){Ze=0,xm();var e=Ca,t=Ol,a=ia,l=id;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ze=5:(Ze=0,Ol=Ca=null,jd(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ta=null),_i(a),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(kl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=D.T,s=Z.p,Z.p=2,D.T=null;try{for(var i=e.onRecoverableError,f=0;f<l.length;f++){var h=l[f];i(h.value,{componentStack:h.stack})}}finally{D.T=t,Z.p=s}}(ia&3)!==0&&Js(),Xt(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===fc?zn++:(zn=0,fc=e):zn=0,Rn(0)}}function jd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,on(t)))}function Js(){return pd(),vd(),bd(),Nd()}function Nd(){if(Ze!==5)return!1;var e=Ca,t=uc;uc=0;var a=_i(ia),l=D.T,s=Z.p;try{Z.p=32>a?32:a,D.T=null,a=oc,oc=null;var i=Ca,f=ia;if(Ze=0,Ol=Ca=null,ia=0,(pe&6)!==0)throw Error(c(331));var h=pe;if(pe|=4,ld(i.current),ed(i,i.current,f,a),pe=h,Rn(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(kl,i)}catch{}return!0}finally{Z.p=s,D.T=l,jd(e,t)}}function Sd(e,t,a){t=Tt(a,t),t=Qr(e.stateNode,t,2),e=va(e,t,2),e!==null&&(Jl(e,2),Xt(e))}function je(e,t,a){if(e.tag===3)Sd(e,e,a);else for(;t!==null;){if(t.tag===3){Sd(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=Tt(a,e),a=Ef(2),l=va(t,a,2),l!==null&&(Tf(a,l,t,e),Jl(l,2),Xt(l));break}}t=t.return}}function xc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Yx;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)||(ic=!0,s.add(a),e=Zx.bind(null,e,t,a),t.then(e,e))}function Zx(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Me===e&&(me&a)===a&&(De===4||De===3&&(me&62914560)===me&&300>ft()-Qs?(pe&2)===0&&Dl(e,0):rc|=a,wl===me&&(wl=0)),Xt(e)}function Ed(e,t){t===0&&(t=gu()),e=Qa(e,t),e!==null&&(Jl(e,t),Xt(e))}function $x(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Ed(e,a)}function kx(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),Ed(e,a)}function Kx(e,t){return Ai(e,t)}var Ws=null,Ll=null,hc=!1,Fs=!1,gc=!1,Ma=0;function Xt(e){e!==Ll&&e.next===null&&(Ll===null?Ws=Ll=e:Ll=Ll.next=e),Fs=!0,hc||(hc=!0,Wx())}function Rn(e,t){if(!gc&&Fs){gc=!0;do for(var a=!1,l=Ws;l!==null;){if(e!==0){var s=l.pendingLanes;if(s===0)var i=0;else{var f=l.suspendedLanes,h=l.pingedLanes;i=(1<<31-mt(42|e)+1)-1,i&=s&~(f&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Md(l,i))}else i=me,i=ts(l,l===Me?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Kl(l,i)||(a=!0,Md(l,i));l=l.next}while(a);gc=!1}}function Jx(){Td()}function Td(){Fs=hc=!1;var e=0;Ma!==0&&ih()&&(e=Ma);for(var t=ft(),a=null,l=Ws;l!==null;){var s=l.next,i=Cd(l,t);i===0?(l.next=null,a===null?Ws=s:a.next=s,s===null&&(Ll=a)):(a=l,(e!==0||(i&3)!==0)&&(Fs=!0)),l=s}Ze!==0&&Ze!==5||Rn(e),Ma!==0&&(Ma=0)}function Cd(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var f=31-mt(i),h=1<<f,b=s[f];b===-1?((h&a)===0||(h&l)!==0)&&(s[f]=Nm(h,t)):b<=t&&(e.expiredLanes|=h),i&=~h}if(t=Me,a=me,a=ts(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(be===2||be===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Mi(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Kl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Mi(l),_i(a)){case 2:case 8:a=xu;break;case 32:a=Fn;break;case 268435456:a=hu;break;default:a=Fn}return l=Ad.bind(null,e),a=Ai(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Mi(l),e.callbackPriority=2,e.callbackNode=null,2}function Ad(e,t){if(Ze!==0&&Ze!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Js()&&e.callbackNode!==a)return null;var l=me;return l=ts(e,e===Me?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(cd(e,l,t),Cd(e,ft()),e.callbackNode!=null&&e.callbackNode===a?Ad.bind(null,e):null)}function Md(e,t){if(Js())return null;cd(e,t,!0)}function Wx(){ch(function(){(pe&6)!==0?Ai(mu,Jx):Td()})}function yc(){if(Ma===0){var e=jl;e===0&&(e=Pn,Pn<<=1,(Pn&261888)===0&&(Pn=256)),Ma=e}return Ma}function zd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ss(""+e)}function Rd(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 Fx(e,t,a,l,s){if(t==="submit"&&a&&a.stateNode===s){var i=zd((s[lt]||null).action),f=l.submitter;f&&(t=(t=f[lt]||null)?zd(t.formAction):f.getAttribute("formAction"),t!==null&&(i=t,f=null));var h=new us("action","action",null,l,s);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ma!==0){var b=f?Rd(s,f):new FormData(s);Hr(a,{pending:!0,data:b,method:s.method,action:i},null,b)}}else typeof i=="function"&&(h.preventDefault(),b=f?Rd(s,f):new FormData(s),Hr(a,{pending:!0,data:b,method:s.method,action:i},i,b))},currentTarget:s}]})}}for(var pc=0;pc<er.length;pc++){var vc=er[pc],Px=vc.toLowerCase(),Ix=vc[0].toUpperCase()+vc.slice(1);Ut(Px,"on"+Ix)}Ut(so,"onAnimationEnd"),Ut(io,"onAnimationIteration"),Ut(ro,"onAnimationStart"),Ut("dblclick","onDoubleClick"),Ut("focusin","onFocus"),Ut("focusout","onBlur"),Ut(hx,"onTransitionRun"),Ut(gx,"onTransitionStart"),Ut(yx,"onTransitionCancel"),Ut(co,"onTransitionEnd"),rl("onMouseEnter",["mouseout","mouseover"]),rl("onMouseLeave",["mouseout","mouseover"]),rl("onPointerEnter",["pointerout","pointerover"]),rl("onPointerLeave",["pointerout","pointerover"]),qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _n="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(" "),eh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_n));function _d(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 f=l.length-1;0<=f;f--){var h=l[f],b=h.instance,M=h.currentTarget;if(h=h.listener,b!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=M;try{i(s)}catch(U){ds(U)}s.currentTarget=null,i=b}else for(f=0;f<l.length;f++){if(h=l[f],b=h.instance,M=h.currentTarget,h=h.listener,b!==i&&s.isPropagationStopped())break e;i=h,s.currentTarget=M;try{i(s)}catch(U){ds(U)}s.currentTarget=null,i=b}}}}function fe(e,t){var a=t[wi];a===void 0&&(a=t[wi]=new Set);var l=e+"__bubble";a.has(l)||(wd(t,e,2,!1),a.add(l))}function bc(e,t,a){var l=0;t&&(l|=4),wd(a,e,l,t)}var Ps="_reactListening"+Math.random().toString(36).slice(2);function jc(e){if(!e[Ps]){e[Ps]=!0,Su.forEach(function(a){a!=="selectionchange"&&(eh.has(a)||bc(a,!1,e),bc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ps]||(t[Ps]=!0,bc("selectionchange",!1,t))}}function wd(e,t,a,l){switch(r0(t)){case 2:var s=Mh;break;case 8:s=zh;break;default:s=Lc}a=s.bind(null,t,a,e),s=void 0,!Gi||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 Nc(e,t,a,l,s){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var f=l.tag;if(f===3||f===4){var h=l.stateNode.containerInfo;if(h===s)break;if(f===4)for(f=l.return;f!==null;){var b=f.tag;if((b===3||b===4)&&f.stateNode.containerInfo===s)return;f=f.return}for(;h!==null;){if(f=nl(h),f===null)return;if(b=f.tag,b===5||b===6||b===26||b===27){l=i=f;continue e}h=h.parentNode}}l=l.return}Uu(function(){var M=i,U=qi(a),B=[];e:{var z=uo.get(e);if(z!==void 0){var _=us,J=e;switch(e){case"keypress":if(rs(a)===0)break e;case"keydown":case"keyup":_=km;break;case"focusin":J="focus",_=Zi;break;case"focusout":J="blur",_=Zi;break;case"beforeblur":case"afterblur":_=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":_=Bu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=Um;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=Wm;break;case so:case io:case ro:_=Bm;break;case co:_=Pm;break;case"scroll":case"scrollend":_=Om;break;case"wheel":_=ex;break;case"copy":case"cut":case"paste":_=Ym;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=Yu;break;case"toggle":case"beforetoggle":_=ax}var te=(t&4)!==0,Te=!te&&(e==="scroll"||e==="scrollend"),T=te?z!==null?z+"Capture":null:z;te=[];for(var N=M,A;N!==null;){var L=N;if(A=L.stateNode,L=L.tag,L!==5&&L!==26&&L!==27||A===null||T===null||(L=Pl(N,T),L!=null&&te.push(wn(N,L,A))),Te)break;N=N.return}0<te.length&&(z=new _(z,J,null,a,U),B.push({event:z,listeners:te}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",z&&a!==Bi&&(J=a.relatedTarget||a.fromElement)&&(nl(J)||J[ll]))break e;if((_||z)&&(z=U.window===U?U:(z=U.ownerDocument)?z.defaultView||z.parentWindow:window,_?(J=a.relatedTarget||a.toElement,_=M,J=J?nl(J):null,J!==null&&(Te=x(J),te=J.tag,J!==Te||te!==5&&te!==27&&te!==6)&&(J=null)):(_=null,J=M),_!==J)){if(te=Bu,L="onMouseLeave",T="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(te=Yu,L="onPointerLeave",T="onPointerEnter",N="pointer"),Te=_==null?z:Fl(_),A=J==null?z:Fl(J),z=new te(L,N+"leave",_,a,U),z.target=Te,z.relatedTarget=A,L=null,nl(U)===M&&(te=new te(T,N+"enter",J,a,U),te.target=A,te.relatedTarget=Te,L=te),Te=L,_&&J)t:{for(te=th,T=_,N=J,A=0,L=T;L;L=te(L))A++;L=0;for(var ee=N;ee;ee=te(ee))L++;for(;0<A-L;)T=te(T),A--;for(;0<L-A;)N=te(N),L--;for(;A--;){if(T===N||N!==null&&T===N.alternate){te=T;break t}T=te(T),N=te(N)}te=null}else te=null;_!==null&&Od(B,z,_,te,!1),J!==null&&Te!==null&&Od(B,Te,J,te,!0)}}e:{if(z=M?Fl(M):window,_=z.nodeName&&z.nodeName.toLowerCase(),_==="select"||_==="input"&&z.type==="file")var ge=Ku;else if($u(z))if(Ju)ge=dx;else{ge=ox;var P=ux}else _=z.nodeName,!_||_.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?M&&Hi(M.elementType)&&(ge=Ku):ge=fx;if(ge&&(ge=ge(e,M))){ku(B,ge,a,U);break e}P&&P(e,z,M),e==="focusout"&&M&&z.type==="number"&&M.memoizedProps.value!=null&&Li(z,"number",z.value)}switch(P=M?Fl(M):window,e){case"focusin":($u(P)||P.contentEditable==="true")&&(ml=P,Fi=M,rn=null);break;case"focusout":rn=Fi=ml=null;break;case"mousedown":Pi=!0;break;case"contextmenu":case"mouseup":case"dragend":Pi=!1,lo(B,a,U);break;case"selectionchange":if(xx)break;case"keydown":case"keyup":lo(B,a,U)}var re;if(ki)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else dl?Vu(e,a)&&(xe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(xe="onCompositionStart");xe&&(Gu&&a.locale!=="ko"&&(dl||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&dl&&(re=Lu()):(da=U,Xi="value"in da?da.value:da.textContent,dl=!0)),P=Is(M,xe),0<P.length&&(xe=new qu(xe,e,null,a,U),B.push({event:xe,listeners:P}),re?xe.data=re:(re=Zu(a),re!==null&&(xe.data=re)))),(re=nx?sx(e,a):ix(e,a))&&(xe=Is(M,"onBeforeInput"),0<xe.length&&(P=new qu("onBeforeInput","beforeinput",null,a,U),B.push({event:P,listeners:xe}),P.data=re)),Fx(B,e,M,a,U)}_d(B,t)})}function wn(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Is(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=Pl(e,a),s!=null&&l.unshift(wn(e,s,i)),s=Pl(e,t),s!=null&&l.push(wn(e,s,i))),e.tag===3)return l;e=e.return}return[]}function th(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,a,l,s){for(var i=t._reactName,f=[];a!==null&&a!==l;){var h=a,b=h.alternate,M=h.stateNode;if(h=h.tag,b!==null&&b===l)break;h!==5&&h!==26&&h!==27||M===null||(b=M,s?(M=Pl(a,i),M!=null&&f.unshift(wn(a,M,b))):s||(M=Pl(a,i),M!=null&&f.push(wn(a,M,b)))),a=a.return}f.length!==0&&e.push({event:t,listeners:f})}var ah=/\r\n?/g,lh=/\u0000|\uFFFD/g;function Dd(e){return(typeof e=="string"?e:""+e).replace(ah,`
|
|
9
|
+
`).replace(lh,"")}function Ud(e,t){return t=Dd(t),Dd(e)===t}function Ee(e,t,a,l,s,i){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||ul(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&ul(e,""+l);break;case"className":ls(e,"class",l);break;case"tabIndex":ls(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ls(e,a,l);break;case"style":Ou(e,l,i);break;case"data":if(t!=="object"){ls(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=ss(""+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"&&Ee(e,t,"name",s.name,s,null),Ee(e,t,"formEncType",s.formEncType,s,null),Ee(e,t,"formMethod",s.formMethod,s,null),Ee(e,t,"formTarget",s.formTarget,s,null)):(Ee(e,t,"encType",s.encType,s,null),Ee(e,t,"method",s.method,s,null),Ee(e,t,"target",s.target,s,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ss(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Zt);break;case"onScroll":l!=null&&fe("scroll",e);break;case"onScrollEnd":l!=null&&fe("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=ss(""+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":fe("beforetoggle",e),fe("toggle",e),as(e,"popover",l);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":as(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=_m.get(a)||a,as(e,a,l))}}function Sc(e,t,a,l,s,i){switch(a){case"style":Ou(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"?ul(e,l):(typeof l=="number"||typeof l=="bigint")&&ul(e,""+l);break;case"onScroll":l!=null&&fe("scroll",e);break;case"onScrollEnd":l!=null&&fe("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(!Eu.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[lt]||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,""):as(e,a,l)}}}function Pe(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":fe("error",e),fe("load",e);var l=!1,s=!1,i;for(i in a)if(a.hasOwnProperty(i)){var f=a[i];if(f!=null)switch(i){case"src":l=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ee(e,t,i,f,a,null)}}s&&Ee(e,t,"srcSet",a.srcSet,a,null),l&&Ee(e,t,"src",a.src,a,null);return;case"input":fe("invalid",e);var h=i=f=s=null,b=null,M=null;for(l in a)if(a.hasOwnProperty(l)){var U=a[l];if(U!=null)switch(l){case"name":s=U;break;case"type":f=U;break;case"checked":b=U;break;case"defaultChecked":M=U;break;case"value":i=U;break;case"defaultValue":h=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(c(137,t));break;default:Ee(e,t,l,U,a,null)}}zu(e,i,h,b,M,f,s,!1);return;case"select":fe("invalid",e),l=f=i=null;for(s in a)if(a.hasOwnProperty(s)&&(h=a[s],h!=null))switch(s){case"value":i=h;break;case"defaultValue":f=h;break;case"multiple":l=h;default:Ee(e,t,s,h,a,null)}t=i,a=f,e.multiple=!!l,t!=null?cl(e,!!l,t,!1):a!=null&&cl(e,!!l,a,!0);return;case"textarea":fe("invalid",e),i=s=l=null;for(f in a)if(a.hasOwnProperty(f)&&(h=a[f],h!=null))switch(f){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:Ee(e,t,f,h,a,null)}_u(e,l,s,i);return;case"option":for(b in a)a.hasOwnProperty(b)&&(l=a[b],l!=null)&&(b==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ee(e,t,b,l,a,null));return;case"dialog":fe("beforetoggle",e),fe("toggle",e),fe("cancel",e),fe("close",e);break;case"iframe":case"object":fe("load",e);break;case"video":case"audio":for(l=0;l<_n.length;l++)fe(_n[l],e);break;case"image":fe("error",e),fe("load",e);break;case"details":fe("toggle",e);break;case"embed":case"source":case"link":fe("error",e),fe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(M in a)if(a.hasOwnProperty(M)&&(l=a[M],l!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Ee(e,t,M,l,a,null)}return;default:if(Hi(t)){for(U in a)a.hasOwnProperty(U)&&(l=a[U],l!==void 0&&Sc(e,t,U,l,a,void 0));return}}for(h in a)a.hasOwnProperty(h)&&(l=a[h],l!=null&&Ee(e,t,h,l,a,null))}function nh(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,f=null,h=null,b=null,M=null,U=null;for(_ in a){var B=a[_];if(a.hasOwnProperty(_)&&B!=null)switch(_){case"checked":break;case"value":break;case"defaultValue":b=B;default:l.hasOwnProperty(_)||Ee(e,t,_,null,l,B)}}for(var z in l){var _=l[z];if(B=a[z],l.hasOwnProperty(z)&&(_!=null||B!=null))switch(z){case"type":i=_;break;case"name":s=_;break;case"checked":M=_;break;case"defaultChecked":U=_;break;case"value":f=_;break;case"defaultValue":h=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(c(137,t));break;default:_!==B&&Ee(e,t,z,_,l,B)}}Ui(e,f,h,b,M,U,i,s);return;case"select":_=f=h=z=null;for(i in a)if(b=a[i],a.hasOwnProperty(i)&&b!=null)switch(i){case"value":break;case"multiple":_=b;default:l.hasOwnProperty(i)||Ee(e,t,i,null,l,b)}for(s in l)if(i=l[s],b=a[s],l.hasOwnProperty(s)&&(i!=null||b!=null))switch(s){case"value":z=i;break;case"defaultValue":h=i;break;case"multiple":f=i;default:i!==b&&Ee(e,t,s,i,l,b)}t=h,a=f,l=_,z!=null?cl(e,!!a,z,!1):!!l!=!!a&&(t!=null?cl(e,!!a,t,!0):cl(e,!!a,a?[]:"",!1));return;case"textarea":_=z=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:Ee(e,t,h,null,l,s)}for(f in l)if(s=l[f],i=a[f],l.hasOwnProperty(f)&&(s!=null||i!=null))switch(f){case"value":z=s;break;case"defaultValue":_=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(c(91));break;default:s!==i&&Ee(e,t,f,s,l,i)}Ru(e,z,_);return;case"option":for(var J in a)z=a[J],a.hasOwnProperty(J)&&z!=null&&!l.hasOwnProperty(J)&&(J==="selected"?e.selected=!1:Ee(e,t,J,null,l,z));for(b in l)z=l[b],_=a[b],l.hasOwnProperty(b)&&z!==_&&(z!=null||_!=null)&&(b==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":Ee(e,t,b,z,l,_));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var te in a)z=a[te],a.hasOwnProperty(te)&&z!=null&&!l.hasOwnProperty(te)&&Ee(e,t,te,null,l,z);for(M in l)if(z=l[M],_=a[M],l.hasOwnProperty(M)&&z!==_&&(z!=null||_!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(c(137,t));break;default:Ee(e,t,M,z,l,_)}return;default:if(Hi(t)){for(var Te in a)z=a[Te],a.hasOwnProperty(Te)&&z!==void 0&&!l.hasOwnProperty(Te)&&Sc(e,t,Te,void 0,l,z);for(U in l)z=l[U],_=a[U],!l.hasOwnProperty(U)||z===_||z===void 0&&_===void 0||Sc(e,t,U,z,l,_);return}}for(var T in a)z=a[T],a.hasOwnProperty(T)&&z!=null&&!l.hasOwnProperty(T)&&Ee(e,t,T,null,l,z);for(B in l)z=l[B],_=a[B],!l.hasOwnProperty(B)||z===_||z==null&&_==null||Ee(e,t,B,z,l,_)}function Ld(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sh(){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,f=s.initiatorType,h=s.duration;if(i&&h&&Ld(f)){for(f=0,h=s.responseEnd,l+=1;l<a.length;l++){var b=a[l],M=b.startTime;if(M>h)break;var U=b.transferSize,B=b.initiatorType;U&&Ld(B)&&(b=b.responseEnd,f+=U*(b<h?1:(h-M)/(b-M)))}if(--l,t+=8*(i+f)/(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 Ec=null,Tc=null;function ei(e){return e.nodeType===9?e:e.ownerDocument}function Hd(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 Bd(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 Cc(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 Ac=null;function ih(){var e=window.event;return e&&e.type==="popstate"?e===Ac?!1:(Ac=e,!0):(Ac=null,!1)}var qd=typeof setTimeout=="function"?setTimeout:void 0,rh=typeof clearTimeout=="function"?clearTimeout:void 0,Yd=typeof Promise=="function"?Promise:void 0,ch=typeof queueMicrotask=="function"?queueMicrotask:typeof Yd<"u"?function(e){return Yd.resolve(null).then(e).catch(uh)}:qd;function uh(e){setTimeout(function(){throw e})}function za(e){return e==="head"}function Gd(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),Yl(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")On(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,On(a);for(var i=a.firstChild;i;){var f=i.nextSibling,h=i.nodeName;i[Wl]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=f}}else a==="body"&&On(e.ownerDocument.body);a=s}while(a);Yl(t)}function Xd(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 Mc(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":Mc(a),Oi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function oh(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[Wl])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=Rt(e.nextSibling),e===null)break}return null}function fh(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Rt(e.nextSibling),e===null))return null;return e}function Qd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Rt(e.nextSibling),e===null))return null;return e}function zc(e){return e.data==="$?"||e.data==="$~"}function Rc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function dh(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 Rt(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 _c=null;function Vd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Rt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Zd(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 $d(e,t,a){switch(t=ei(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 On(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Oi(e)}var _t=new Map,kd=new Set;function ti(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ra=Z.d;Z.d={f:mh,r:xh,D:hh,C:gh,L:yh,m:ph,X:bh,S:vh,M:jh};function mh(){var e=ra.f(),t=$s();return e||t}function xh(e){var t=sl(e);t!==null&&t.tag===5&&t.type==="form"?of(t):ra.r(e)}var Hl=typeof document>"u"?null:document;function Kd(e,t,a){var l=Hl;if(l&&typeof t=="string"&&t){var s=St(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),kd.has(s)||(kd.add(s),e={rel:e,crossOrigin:a,href:t},l.querySelector(s)===null&&(t=l.createElement("link"),Pe(t,"link",e),$e(t),l.head.appendChild(t)))}}function hh(e){ra.D(e),Kd("dns-prefetch",e,null)}function gh(e,t){ra.C(e,t),Kd("preconnect",e,t)}function yh(e,t,a){ra.L(e,t,a);var l=Hl;if(l&&e&&t){var s='link[rel="preload"][as="'+St(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+St(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+St(a.imageSizes)+'"]')):s+='[href="'+St(e)+'"]';var i=s;switch(t){case"style":i=Bl(e);break;case"script":i=ql(e)}_t.has(i)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),_t.set(i,e),l.querySelector(s)!==null||t==="style"&&l.querySelector(Dn(i))||t==="script"&&l.querySelector(Un(i))||(t=l.createElement("link"),Pe(t,"link",e),$e(t),l.head.appendChild(t)))}}function ph(e,t){ra.m(e,t);var a=Hl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+St(l)+'"][href="'+St(e)+'"]',i=s;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ql(e)}if(!_t.has(i)&&(e=y({rel:"modulepreload",href:e},t),_t.set(i,e),a.querySelector(s)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Un(i)))return}l=a.createElement("link"),Pe(l,"link",e),$e(l),a.head.appendChild(l)}}}function vh(e,t,a){ra.S(e,t,a);var l=Hl;if(l&&e){var s=il(l).hoistableStyles,i=Bl(e);t=t||"default";var f=s.get(i);if(!f){var h={loading:0,preload:null};if(f=l.querySelector(Dn(i)))h.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=_t.get(i))&&wc(e,a);var b=f=l.createElement("link");$e(b),Pe(b,"link",e),b._p=new Promise(function(M,U){b.onload=M,b.onerror=U}),b.addEventListener("load",function(){h.loading|=1}),b.addEventListener("error",function(){h.loading|=2}),h.loading|=4,ai(f,t,l)}f={type:"stylesheet",instance:f,count:1,state:h},s.set(i,f)}}}function bh(e,t){ra.X(e,t);var a=Hl;if(a&&e){var l=il(a).hoistableScripts,s=ql(e),i=l.get(s);i||(i=a.querySelector(Un(s)),i||(e=y({src:e,async:!0},t),(t=_t.get(s))&&Oc(e,t),i=a.createElement("script"),$e(i),Pe(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function jh(e,t){ra.M(e,t);var a=Hl;if(a&&e){var l=il(a).hoistableScripts,s=ql(e),i=l.get(s);i||(i=a.querySelector(Un(s)),i||(e=y({src:e,async:!0,type:"module"},t),(t=_t.get(s))&&Oc(e,t),i=a.createElement("script"),$e(i),Pe(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(s,i))}}function Jd(e,t,a,l){var s=(s=ue.current)?ti(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=Bl(a.href),a=il(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=Bl(a.href);var i=il(s).hoistableStyles,f=i.get(e);if(f||(s=s.ownerDocument||s,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,f),(i=s.querySelector(Dn(e)))&&!i._p&&(f.instance=i,f.state.loading=5),_t.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},_t.set(e,a),i||Nh(s,e,a,f.state))),t&&l===null)throw Error(c(528,""));return f}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=ql(a),a=il(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 Bl(e){return'href="'+St(e)+'"'}function Dn(e){return'link[rel="stylesheet"]['+e+"]"}function Wd(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Nh(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}),Pe(t,"link",a),$e(t),e.head.appendChild(t))}function ql(e){return'[src="'+St(e)+'"]'}function Un(e){return"script[async]"+e}function Fd(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+St(a.href)+'"]');if(l)return t.instance=l,$e(l),l;var s=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),$e(l),Pe(l,"style",s),ai(l,a.precedence,e),t.instance=l;case"stylesheet":s=Bl(a.href);var i=e.querySelector(Dn(s));if(i)return t.state.loading|=4,t.instance=i,$e(i),i;l=Wd(a),(s=_t.get(s))&&wc(l,s),i=(e.ownerDocument||e).createElement("link"),$e(i);var f=i;return f._p=new Promise(function(h,b){f.onload=h,f.onerror=b}),Pe(i,"link",l),t.state.loading|=4,ai(i,a.precedence,e),t.instance=i;case"script":return i=ql(a.src),(s=e.querySelector(Un(i)))?(t.instance=s,$e(s),s):(l=a,(s=_t.get(i))&&(l=y({},a),Oc(l,s)),e=e.ownerDocument||e,s=e.createElement("script"),$e(s),Pe(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,ai(l,a.precedence,e));return t.instance}function ai(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,f=0;f<l.length;f++){var h=l[f];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 wc(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 li=null;function Pd(e,t,a){if(li===null){var l=new Map,s=li=new Map;s.set(a,l)}else s=li,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[Wl]||i[Ke]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var f=i.getAttribute(t)||"";f=e+f;var h=l.get(f);h?h.push(i):l.set(f,[i])}}return l}function Id(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Sh(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 e0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Eh(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=Bl(l.href),i=t.querySelector(Dn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ni.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,$e(i);return}i=t.ownerDocument||t,l=Wd(l),(s=_t.get(s))&&wc(l,s),i=i.createElement("link"),$e(i);var f=i;f._p=new Promise(function(h,b){f.onload=h,f.onerror=b}),Pe(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=ni.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Dc=0;function Th(e,t){return e.stylesheets&&e.count===0&&ii(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&ii(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Dc===0&&(Dc=62500*sh());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ii(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Dc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(s)}}:null}function ni(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ii(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var si=null;function ii(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,si=new Map,t.forEach(Ch,e),si=null,ni.call(e))}function Ch(e,t){if(!(t.state.loading&4)){var a=si.get(e);if(a)var l=a.get(null);else{a=new Map,si.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var f=s[i];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(a.set(f.dataset.precedence,f),l=f)}l&&a.set(null,l)}s=t.instance,f=s.getAttribute("data-precedence"),i=a.get(f)||l,i===l&&a.set(null,s),a.set(f,s),this.count++,l=ni.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 Ln={$$typeof:V,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function Ah(e,t,a,l,s,i,f,h,b){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=zi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zi(0),this.hiddenUpdates=zi(null),this.identifierPrefix=l,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function t0(e,t,a,l,s,i,f,h,b,M,U,B){return e=new Ah(e,t,a,f,b,M,U,B,h),t=1,i===!0&&(t|=24),i=ht(3,null,null,t),e.current=i,i.stateNode=e,t=mr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},yr(i),e}function a0(e){return e?(e=gl,e):gl}function l0(e,t,a,l,s,i){s=a0(s),l.context===null?l.context=s:l.pendingContext=s,l=pa(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=va(e,l,t),a!==null&&(ut(a,e,t),xn(a,e,t))}function n0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Uc(e,t){n0(e,t),(e=e.alternate)&&n0(e,t)}function s0(e){if(e.tag===13||e.tag===31){var t=Qa(e,67108864);t!==null&&ut(t,e,67108864),Uc(e,67108864)}}function i0(e){if(e.tag===13||e.tag===31){var t=bt();t=Ri(t);var a=Qa(e,t);a!==null&&ut(a,e,t),Uc(e,t)}}var ri=!0;function Mh(e,t,a,l){var s=D.T;D.T=null;var i=Z.p;try{Z.p=2,Lc(e,t,a,l)}finally{Z.p=i,D.T=s}}function zh(e,t,a,l){var s=D.T;D.T=null;var i=Z.p;try{Z.p=8,Lc(e,t,a,l)}finally{Z.p=i,D.T=s}}function Lc(e,t,a,l){if(ri){var s=Hc(l);if(s===null)Nc(e,t,l,ci,a),c0(e,l);else if(_h(s,e,t,a,l))l.stopPropagation();else if(c0(e,l),t&4&&-1<Rh.indexOf(e)){for(;s!==null;){var i=sl(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var f=Ba(i.pendingLanes);if(f!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;f;){var b=1<<31-mt(f);h.entanglements[1]|=b,f&=~b}Xt(i),(pe&6)===0&&(Vs=ft()+500,Rn(0))}}break;case 31:case 13:h=Qa(i,2),h!==null&&ut(h,i,2),$s(),Uc(i,2)}if(i=Hc(l),i===null&&Nc(e,t,l,ci,a),i===s)break;s=i}s!==null&&l.stopPropagation()}else Nc(e,t,l,null,a)}}function Hc(e){return e=qi(e),Bc(e)}var ci=null;function Bc(e){if(ci=null,e=nl(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=v(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 ci=e,null}function r0(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(hm()){case mu:return 2;case xu:return 8;case Fn:case gm:return 32;case hu:return 268435456;default:return 32}default:return 32}}var qc=!1,Ra=null,_a=null,wa=null,Hn=new Map,Bn=new Map,Oa=[],Rh="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 c0(e,t){switch(e){case"focusin":case"focusout":Ra=null;break;case"dragenter":case"dragleave":_a=null;break;case"mouseover":case"mouseout":wa=null;break;case"pointerover":case"pointerout":Hn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bn.delete(t.pointerId)}}function qn(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=sl(t),t!==null&&s0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function _h(e,t,a,l,s){switch(t){case"focusin":return Ra=qn(Ra,e,t,a,l,s),!0;case"dragenter":return _a=qn(_a,e,t,a,l,s),!0;case"mouseover":return wa=qn(wa,e,t,a,l,s),!0;case"pointerover":var i=s.pointerId;return Hn.set(i,qn(Hn.get(i)||null,e,t,a,l,s)),!0;case"gotpointercapture":return i=s.pointerId,Bn.set(i,qn(Bn.get(i)||null,e,t,a,l,s)),!0}return!1}function u0(e){var t=nl(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,ju(e.priority,function(){i0(a)});return}}else if(t===31){if(t=v(a),t!==null){e.blockedOn=t,ju(e.priority,function(){i0(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 ui(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Hc(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Bi=l,a.target.dispatchEvent(l),Bi=null}else return t=sl(a),t!==null&&s0(t),e.blockedOn=a,!1;t.shift()}return!0}function o0(e,t,a){ui(e)&&a.delete(t)}function wh(){qc=!1,Ra!==null&&ui(Ra)&&(Ra=null),_a!==null&&ui(_a)&&(_a=null),wa!==null&&ui(wa)&&(wa=null),Hn.forEach(o0),Bn.forEach(o0)}function oi(e,t){e.blockedOn===t&&(e.blockedOn=null,qc||(qc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,wh)))}var fi=null;function f0(e){fi!==e&&(fi=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){fi===e&&(fi=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(Bc(l||a)===null)continue;break}var i=sl(a);i!==null&&(e.splice(t,3),t-=3,Hr(i,{pending:!0,data:s,method:a.method,action:l},l,s))}}))}function Yl(e){function t(b){return oi(b,e)}Ra!==null&&oi(Ra,e),_a!==null&&oi(_a,e),wa!==null&&oi(wa,e),Hn.forEach(t),Bn.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);)u0(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],f=s[lt]||null;if(typeof i=="function")f||f0(a);else if(f){var h=null;if(i&&i.hasAttribute("formAction")){if(s=i,f=i[lt]||null)h=f.formAction;else if(Bc(s)!==null)continue}else h=f.action;typeof h=="function"?a[l+1]=h:(a.splice(l,3),l-=3),f0(a)}}}function d0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(f){return s=f})},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 Yc(e){this._internalRoot=e}di.prototype.render=Yc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,l=bt();l0(a,l,e,t,null,null)},di.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;l0(e.current,2,null,e,null,null),$s(),t[ll]=null}};function di(e){this._internalRoot=e}di.prototype.unstable_scheduleHydration=function(e){if(e){var t=bu();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&&u0(e)}};var m0=o.version;if(m0!=="19.2.4")throw Error(c(527,m0,"19.2.4"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=m(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var Oh={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mi.isDisabled&&mi.supportsFiber)try{kl=mi.inject(Oh),dt=mi}catch{}}return Gn.createRoot=function(e,t){if(!d(e))throw Error(c(299));var a=!1,l="",s=bf,i=jf,f=Nf;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&&(f=t.onRecoverableError)),t=t0(e,1,!1,null,null,a,l,null,s,i,f,d0),e[ll]=t.current,jc(e),new Yc(t)},Gn.hydrateRoot=function(e,t,a){if(!d(e))throw Error(c(299));var l=!1,s="",i=bf,f=jf,h=Nf,b=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&&(f=a.onCaughtError),a.onRecoverableError!==void 0&&(h=a.onRecoverableError),a.formState!==void 0&&(b=a.formState)),t=t0(e,1,!0,t,a??null,l,s,b,i,f,h,d0),t.context=a0(null),a=t.current,l=bt(),l=Ri(l),s=pa(l),s.callback=null,va(a,s,l),a=l,t.current.lanes=a,Jl(t,a),Xt(t),e[ll]=t.current,jc(e),new di(t)},Gn.version="19.2.4",Gn}var S0;function Qh(){if(S0)return Qc.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(o){console.error(o)}}return r(),Qc.exports=Xh(),Qc.exports}var Vh=Qh();var E0="popstate";function Zh(r={}){function o(c,d){let{pathname:x,search:g,hash:v}=c.location;return Pc("",{pathname:x,search:g,hash:v},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function u(c,d){return typeof d=="string"?d:Vn(d)}return kh(o,u,null,r)}function we(r,o){if(r===!1||r===null||typeof r>"u")throw new Error(o)}function Bt(r,o){if(!r){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function $h(){return Math.random().toString(36).substring(2,10)}function T0(r,o){return{usr:r.state,key:r.key,idx:o}}function Pc(r,o,u=null,c){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof o=="string"?Ql(o):o,state:u,key:o&&o.key||c||$h()}}function Vn({pathname:r="/",search:o="",hash:u=""}){return o&&o!=="?"&&(r+=o.charAt(0)==="?"?o:"?"+o),u&&u!=="#"&&(r+=u.charAt(0)==="#"?u:"#"+u),r}function Ql(r){let o={};if(r){let u=r.indexOf("#");u>=0&&(o.hash=r.substring(u),r=r.substring(0,u));let c=r.indexOf("?");c>=0&&(o.search=r.substring(c),r=r.substring(0,c)),r&&(o.pathname=r)}return o}function kh(r,o,u,c={}){let{window:d=document.defaultView,v5Compat:x=!1}=c,g=d.history,v="POP",p=null,m=j();m==null&&(m=0,g.replaceState({...g.state,idx:m},""));function j(){return(g.state||{idx:null}).idx}function y(){v="POP";let R=j(),Q=R==null?null:R-m;m=R,p&&p({action:v,location:w.location,delta:Q})}function C(R,Q){v="PUSH";let H=Pc(w.location,R,Q);m=j()+1;let V=T0(H,m),K=w.createHref(H);try{g.pushState(V,"",K)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;d.location.assign(K)}x&&p&&p({action:v,location:w.location,delta:1})}function O(R,Q){v="REPLACE";let H=Pc(w.location,R,Q);m=j();let V=T0(H,m),K=w.createHref(H);g.replaceState(V,"",K),x&&p&&p({action:v,location:w.location,delta:0})}function G(R){return Kh(R)}let w={get action(){return v},get location(){return r(d,g)},listen(R){if(p)throw new Error("A history only accepts one active listener");return d.addEventListener(E0,y),p=R,()=>{d.removeEventListener(E0,y),p=null}},createHref(R){return o(d,R)},createURL:G,encodeLocation(R){let Q=G(R);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:C,replace:O,go(R){return g.go(R)}};return w}function Kh(r,o=!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:Vn(r);return c=c.replace(/ $/,"%20"),!o&&c.startsWith("//")&&(c=u+c),new URL(c,u)}function B0(r,o,u="/"){return Jh(r,o,u,!1)}function Jh(r,o,u,c){let d=typeof o=="string"?Ql(o):o,x=ua(d.pathname||"/",u);if(x==null)return null;let g=q0(r);Wh(g);let v=null;for(let p=0;v==null&&p<g.length;++p){let m=rg(x);v=sg(g[p],m,c)}return v}function q0(r,o=[],u=[],c="",d=!1){let x=(g,v,p=d,m)=>{let j={relativePath:m===void 0?g.path||"":m,caseSensitive:g.caseSensitive===!0,childrenIndex:v,route:g};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(c)&&p)return;we(j.relativePath.startsWith(c),`Absolute route path "${j.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(c.length)}let y=ca([c,j.relativePath]),C=u.concat(j);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 "${y}".`),q0(g.children,o,C,y,p)),!(g.path==null&&!g.index)&&o.push({path:y,score:lg(y,g.index),routesMeta:C})};return r.forEach((g,v)=>{if(g.path===""||!g.path?.includes("?"))x(g,v);else for(let p of Y0(g.path))x(g,v,!0,p)}),o}function Y0(r){let o=r.split("/");if(o.length===0)return[];let[u,...c]=o,d=u.endsWith("?"),x=u.replace(/\?$/,"");if(c.length===0)return d?[x,""]:[x];let g=Y0(c.join("/")),v=[];return v.push(...g.map(p=>p===""?x:[x,p].join("/"))),d&&v.push(...g),v.map(p=>r.startsWith("/")&&p===""?"/":p)}function Wh(r){r.sort((o,u)=>o.score!==u.score?u.score-o.score:ng(o.routesMeta.map(c=>c.childrenIndex),u.routesMeta.map(c=>c.childrenIndex)))}var Fh=/^:[\w-]+$/,Ph=3,Ih=2,eg=1,tg=10,ag=-2,C0=r=>r==="*";function lg(r,o){let u=r.split("/"),c=u.length;return u.some(C0)&&(c+=ag),o&&(c+=Ih),u.filter(d=>!C0(d)).reduce((d,x)=>d+(Fh.test(x)?Ph:x===""?eg:tg),c)}function ng(r,o){return r.length===o.length&&r.slice(0,-1).every((c,d)=>c===o[d])?r[r.length-1]-o[o.length-1]:0}function sg(r,o,u=!1){let{routesMeta:c}=r,d={},x="/",g=[];for(let v=0;v<c.length;++v){let p=c[v],m=v===c.length-1,j=x==="/"?o:o.slice(x.length)||"/",y=vi({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},j),C=p.route;if(!y&&m&&u&&!c[c.length-1].route.index&&(y=vi({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},j)),!y)return null;Object.assign(d,y.params),g.push({params:d,pathname:ca([x,y.pathname]),pathnameBase:fg(ca([x,y.pathnameBase])),route:C}),y.pathnameBase!=="/"&&(x=ca([x,y.pathnameBase]))}return g}function vi(r,o){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[u,c]=ig(r.path,r.caseSensitive,r.end),d=o.match(u);if(!d)return null;let x=d[0],g=x.replace(/(.)\/+$/,"$1"),v=d.slice(1);return{params:c.reduce((m,{paramName:j,isOptional:y},C)=>{if(j==="*"){let G=v[C]||"";g=x.slice(0,x.length-G.length).replace(/(.)\/+$/,"$1")}const O=v[C];return y&&!O?m[j]=void 0:m[j]=(O||"").replace(/%2F/g,"/"),m},{}),pathname:x,pathnameBase:g,pattern:r}}function ig(r,o=!1,u=!0){Bt(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let c=[],d="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,v,p)=>(c.push({paramName:v,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(c.push({paramName:"*"}),d+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):u?d+="\\/*$":r!==""&&r!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,o?void 0:"i"),c]}function rg(r){try{return r.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return Bt(!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 (${o}).`),r}}function ua(r,o){if(o==="/")return r;if(!r.toLowerCase().startsWith(o.toLowerCase()))return null;let u=o.endsWith("/")?o.length-1:o.length,c=r.charAt(u);return c&&c!=="/"?null:r.slice(u)||"/"}var cg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ug(r,o="/"){let{pathname:u,search:c="",hash:d=""}=typeof r=="string"?Ql(r):r,x;return u?(u=u.replace(/\/\/+/g,"/"),u.startsWith("/")?x=A0(u.substring(1),"/"):x=A0(u,o)):x=o,{pathname:x,search:dg(c),hash:mg(d)}}function A0(r,o){let u=o.replace(/\/+$/,"").split("/");return r.split("/").forEach(d=>{d===".."?u.length>1&&u.pop():d!=="."&&u.push(d)}),u.length>1?u.join("/"):"/"}function kc(r,o,u,c){return`Cannot include a '${r}' character in a manually specified \`to.${o}\` 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 og(r){return r.filter((o,u)=>u===0||o.route.path&&o.route.path.length>0)}function G0(r){let o=og(r);return o.map((u,c)=>c===o.length-1?u.pathname:u.pathnameBase)}function X0(r,o,u,c=!1){let d;typeof r=="string"?d=Ql(r):(d={...r},we(!d.pathname||!d.pathname.includes("?"),kc("?","pathname","search",d)),we(!d.pathname||!d.pathname.includes("#"),kc("#","pathname","hash",d)),we(!d.search||!d.search.includes("#"),kc("#","search","hash",d)));let x=r===""||d.pathname==="",g=x?"/":d.pathname,v;if(g==null)v=u;else{let y=o.length-1;if(!c&&g.startsWith("..")){let C=g.split("/");for(;C[0]==="..";)C.shift(),y-=1;d.pathname=C.join("/")}v=y>=0?o[y]:"/"}let p=ug(d,v),m=g&&g!=="/"&&g.endsWith("/"),j=(x||g===".")&&u.endsWith("/");return!p.pathname.endsWith("/")&&(m||j)&&(p.pathname+="/"),p}var ca=r=>r.join("/").replace(/\/\/+/g,"/"),fg=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),dg=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,mg=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,xg=class{constructor(r,o,u,c=!1){this.status=r,this.statusText=o||"",this.internal=c,u instanceof Error?(this.data=u.toString(),this.error=u):this.data=u}};function hg(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function gg(r){return r.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Q0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function V0(r,o){let u=r;if(typeof u!="string"||!cg.test(u))return{absoluteURL:void 0,isExternal:!1,to:u};let c=u,d=!1;if(Q0)try{let x=new URL(window.location.href),g=u.startsWith("//")?new URL(x.protocol+u):new URL(u),v=ua(g.pathname,o);g.origin===x.origin&&v!=null?u=v+g.search+g.hash:d=!0}catch{Bt(!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:d,to:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Z0=["POST","PUT","PATCH","DELETE"];new Set(Z0);var yg=["GET",...Z0];new Set(yg);var Vl=E.createContext(null);Vl.displayName="DataRouter";var bi=E.createContext(null);bi.displayName="DataRouterState";var pg=E.createContext(!1),$0=E.createContext({isTransitioning:!1});$0.displayName="ViewTransition";var vg=E.createContext(new Map);vg.displayName="Fetchers";var bg=E.createContext(null);bg.displayName="Await";var wt=E.createContext(null);wt.displayName="Navigation";var Zn=E.createContext(null);Zn.displayName="Location";var Qt=E.createContext({outlet:null,matches:[],isDataRoute:!1});Qt.displayName="Route";var au=E.createContext(null);au.displayName="RouteError";var k0="REACT_ROUTER_ERROR",jg="REDIRECT",Ng="ROUTE_ERROR_RESPONSE";function Sg(r){if(r.startsWith(`${k0}:${jg}:{`))try{let o=JSON.parse(r.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function Eg(r){if(r.startsWith(`${k0}:${Ng}:{`))try{let o=JSON.parse(r.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new xg(o.status,o.statusText,o.data)}catch{}}function Tg(r,{relative:o}={}){we($n(),"useHref() may be used only in the context of a <Router> component.");let{basename:u,navigator:c}=E.useContext(wt),{hash:d,pathname:x,search:g}=kn(r,{relative:o}),v=x;return u!=="/"&&(v=x==="/"?u:ca([u,x])),c.createHref({pathname:v,search:g,hash:d})}function $n(){return E.useContext(Zn)!=null}function La(){return we($n(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Zn).location}var K0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function J0(r){E.useContext(wt).static||E.useLayoutEffect(r)}function lu(){let{isDataRoute:r}=E.useContext(Qt);return r?qg():Cg()}function Cg(){we($n(),"useNavigate() may be used only in the context of a <Router> component.");let r=E.useContext(Vl),{basename:o,navigator:u}=E.useContext(wt),{matches:c}=E.useContext(Qt),{pathname:d}=La(),x=JSON.stringify(G0(c)),g=E.useRef(!1);return J0(()=>{g.current=!0}),E.useCallback((p,m={})=>{if(Bt(g.current,K0),!g.current)return;if(typeof p=="number"){u.go(p);return}let j=X0(p,JSON.parse(x),d,m.relative==="path");r==null&&o!=="/"&&(j.pathname=j.pathname==="/"?o:ca([o,j.pathname])),(m.replace?u.replace:u.push)(j,m.state,m)},[o,u,x,d,r])}E.createContext(null);function Ag(){let{matches:r}=E.useContext(Qt),o=r[r.length-1];return o?o.params:{}}function kn(r,{relative:o}={}){let{matches:u}=E.useContext(Qt),{pathname:c}=La(),d=JSON.stringify(G0(u));return E.useMemo(()=>X0(r,JSON.parse(d),c,o==="path"),[r,d,c,o])}function Mg(r,o){return W0(r,o)}function W0(r,o,u,c,d){we($n(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=E.useContext(wt),{matches:g}=E.useContext(Qt),v=g[g.length-1],p=v?v.params:{},m=v?v.pathname:"/",j=v?v.pathnameBase:"/",y=v&&v.route;{let H=y&&y.path||"";P0(m,!y||H.endsWith("*")||H.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${H}">) 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
10
|
|
|
11
|
-
Please change the parent <Route path="${H}"> to <Route path="${H==="/"?"*":`${H}/*`}">.`)}let C=La(),O;if(o){let H=typeof o=="string"?Ql(o):o;we(j==="/"||H.pathname?.startsWith(j),`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 "${j}" but pathname "${H.pathname}" was given in the \`location\` prop.`),O=H}else O=C;let G=O.pathname||"/",w=G;if(j!=="/"){let H=j.replace(/^\//,"").split("/");w="/"+G.replace(/^\//,"").split("/").slice(H.length).join("/")}let R=B0(r,{pathname:w});Bt(y||R!=null,`No routes matched location "${O.pathname}${O.search}${O.hash}" `),Bt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${O.pathname}${O.search}${O.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 Q=Og(R&&R.map(H=>Object.assign({},H,{params:Object.assign({},p,H.params),pathname:ca([j,x.encodeLocation?x.encodeLocation(H.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathname]),pathnameBase:H.pathnameBase==="/"?j:ca([j,x.encodeLocation?x.encodeLocation(H.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathnameBase])})),g,u,c,d);return o&&Q?E.createElement(Zn.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...O},navigationType:"POP"}},Q):Q}function zg(){let r=Bg(),o=hg(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)",d={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=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:x},"ErrorBoundary")," or"," ",E.createElement("code",{style:x},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},o),u?E.createElement("pre",{style:d},u):null,g)}var Rg=E.createElement(zg,null),F0=class extends E.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,o){return o.location!==r.location||o.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:o.error,location:o.location,revalidation:r.revalidation||o.revalidation}}componentDidCatch(r,o){this.props.onError?this.props.onError(r,o):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=Eg(r.digest);u&&(r=u)}let o=r!==void 0?E.createElement(Qt.Provider,{value:this.props.routeContext},E.createElement(au.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?E.createElement(_g,{error:r},o):o}};F0.contextType=pg;var Kc=new WeakMap;function _g({children:r,error:o}){let{basename:u}=E.useContext(Ot);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let c=Sg(o.digest);if(c){let d=Kc.get(o);if(d)throw d;let x=V0(c.location,u);if(Q0&&!Kc.get(o))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 Kc.set(o,g),g}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return r}function wg({routeContext:r,match:o,children:u}){let c=E.useContext(Vl);return c&&c.static&&c.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=o.route.id),E.createElement(Qt.Provider,{value:r},u)}function Og(r,o=[],u=null,c=null,d=null){if(r==null){if(!u)return null;if(u.errors)r=u.matches;else if(o.length===0&&!u.initialized&&u.matches.length>0)r=u.matches;else return null}let x=r,g=u?.errors;if(g!=null){let j=x.findIndex(y=>y.route.id&&g?.[y.route.id]!==void 0);we(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(g).join(",")}`),x=x.slice(0,Math.min(x.length,j+1))}let v=!1,p=-1;if(u)for(let j=0;j<x.length;j++){let y=x[j];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(p=j),y.route.id){let{loaderData:C,errors:O}=u,G=y.route.loader&&!C.hasOwnProperty(y.route.id)&&(!O||O[y.route.id]===void 0);if(y.route.lazy||G){v=!0,p>=0?x=x.slice(0,p+1):x=[x[0]];break}}}let m=u&&c?(j,y)=>{c(j,{location:u.location,params:u.matches?.[0]?.params??{},unstable_pattern:gg(u.matches),errorInfo:y})}:void 0;return x.reduceRight((j,y,C)=>{let O,G=!1,w=null,R=null;u&&(O=g&&y.route.id?g[y.route.id]:void 0,w=y.route.errorElement||Rg,v&&(p<0&&C===0?(P0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),G=!0,R=null):p===C&&(G=!0,R=y.route.hydrateFallbackElement||null)));let Q=o.concat(x.slice(0,C+1)),H=()=>{let V;return O?V=w:G?V=R:y.route.Component?V=E.createElement(y.route.Component,null):y.route.element?V=y.route.element:V=j,E.createElement(wg,{match:y,routeContext:{outlet:j,matches:Q,isDataRoute:u!=null},children:V})};return u&&(y.route.ErrorBoundary||y.route.errorElement||C===0)?E.createElement(F0,{location:u.location,revalidation:u.revalidation,component:w,error:O,children:H(),routeContext:{outlet:null,matches:Q,isDataRoute:!0},onError:m}):H()},null)}function nu(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dg(r){let o=E.useContext(Vl);return we(o,nu(r)),o}function Ug(r){let o=E.useContext(vi);return we(o,nu(r)),o}function Lg(r){let o=E.useContext(Qt);return we(o,nu(r)),o}function su(r){let o=Lg(r),u=o.matches[o.matches.length-1];return we(u.route.id,`${r} can only be used on routes that contain a unique "id"`),u.route.id}function Hg(){return su("useRouteId")}function Bg(){let r=E.useContext(au),o=Ug("useRouteError"),u=su("useRouteError");return r!==void 0?r:o.errors?.[u]}function qg(){let{router:r}=Dg("useNavigate"),o=su("useNavigate"),u=E.useRef(!1);return J0(()=>{u.current=!0}),E.useCallback(async(d,x={})=>{Bt(u.current,K0),u.current&&(typeof d=="number"?await r.navigate(d):await r.navigate(d,{fromRouteId:o,...x}))},[r,o])}var M0={};function P0(r,o,u){!o&&!M0[r]&&(M0[r]=!0,Bt(!1,u))}E.memo(Yg);function Yg({routes:r,future:o,state:u,onError:c}){return W0(r,void 0,u,c,o)}function at(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 Gg({basename:r="/",children:o=null,location:u,navigationType:c="POP",navigator:d,static:x=!1,unstable_useTransitions:g}){we(!$n(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=r.replace(/^\/*/,"/"),p=E.useMemo(()=>({basename:v,navigator:d,static:x,unstable_useTransitions:g,future:{}}),[v,d,x,g]);typeof u=="string"&&(u=Ql(u));let{pathname:m="/",search:j="",hash:y="",state:C=null,key:O="default"}=u,G=E.useMemo(()=>{let w=ua(m,v);return w==null?null:{location:{pathname:w,search:j,hash:y,state:C,key:O},navigationType:c}},[v,m,j,y,C,O,c]);return Bt(G!=null,`<Router basename="${v}"> is not able to match the URL "${m}${j}${y}" because it does not start with the basename, so the <Router> won't render anything.`),G==null?null:E.createElement(Ot.Provider,{value:p},E.createElement(Zn.Provider,{children:o,value:G}))}function Xg({children:r,location:o}){return Mg(Ic(r),o)}function Ic(r,o=[]){let u=[];return E.Children.forEach(r,(c,d)=>{if(!E.isValidElement(c))return;let x=[...o,d];if(c.type===E.Fragment){u.push.apply(u,Ic(c.props.children,x));return}we(c.type===at,`[${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=Ic(c.props.children,x)),u.push(g)}),u}var gi="get",yi="application/x-www-form-urlencoded";function bi(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function Qg(r){return bi(r)&&r.tagName.toLowerCase()==="button"}function Vg(r){return bi(r)&&r.tagName.toLowerCase()==="form"}function Zg(r){return bi(r)&&r.tagName.toLowerCase()==="input"}function $g(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function kg(r,o){return r.button===0&&(!o||o==="_self")&&!$g(r)}function eu(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((o,u)=>{let c=r[u];return o.concat(Array.isArray(c)?c.map(d=>[u,d]):[[u,c]])},[]))}function Kg(r,o){let u=eu(r);return o&&o.forEach((c,d)=>{u.has(d)||o.getAll(d).forEach(x=>{u.append(d,x)})}),u}var mi=null;function Jg(){if(mi===null)try{new FormData(document.createElement("form"),0),mi=!1}catch{mi=!0}return mi}var Wg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jc(r){return r!=null&&!Wg.has(r)?(Bt(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${yi}"`),null):r}function Fg(r,o){let u,c,d,x,g;if(Vg(r)){let v=r.getAttribute("action");c=v?ua(v,o):null,u=r.getAttribute("method")||gi,d=Jc(r.getAttribute("enctype"))||yi,x=new FormData(r)}else if(Qg(r)||Zg(r)&&(r.type==="submit"||r.type==="image")){let v=r.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=r.getAttribute("formaction")||v.getAttribute("action");if(c=p?ua(p,o):null,u=r.getAttribute("formmethod")||v.getAttribute("method")||gi,d=Jc(r.getAttribute("formenctype"))||Jc(v.getAttribute("enctype"))||yi,x=new FormData(v,r),!Jg()){let{name:m,type:j,value:y}=r;if(j==="image"){let C=m?`${m}.`:"";x.append(`${C}x`,"0"),x.append(`${C}y`,"0")}else m&&x.append(m,y)}}else{if(bi(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');u=gi,c=null,d=yi,g=r}return x&&d==="text/plain"&&(g=x,x=void 0),{action:c,method:u.toLowerCase(),encType:d,formData:x,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function iu(r,o){if(r===!1||r===null||typeof r>"u")throw new Error(o)}function Pg(r,o,u,c){let d=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return u?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${c}`:d.pathname=`${d.pathname}.${c}`:d.pathname==="/"?d.pathname=`_root.${c}`:o&&ua(d.pathname,o)==="/"?d.pathname=`${o.replace(/\/$/,"")}/_root.${c}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${c}`,d}async function Ig(r,o){if(r.id in o)return o[r.id];try{let u=await import(r.module);return o[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 ey(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 ty(r,o,u){let c=await Promise.all(r.map(async d=>{let x=o.routes[d.route.id];if(x){let g=await Ig(x,u);return g.links?g.links():[]}return[]}));return sy(c.flat(1).filter(ey).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function z0(r,o,u,c,d,x){let g=(p,m)=>u[m]?p.route.id!==u[m].route.id:!0,v=(p,m)=>u[m].pathname!==p.pathname||u[m].route.path?.endsWith("*")&&u[m].params["*"]!==p.params["*"];return x==="assets"?o.filter((p,m)=>g(p,m)||v(p,m)):x==="data"?o.filter((p,m)=>{let j=c.routes[p.route.id];if(!j||!j.hasLoader)return!1;if(g(p,m)||v(p,m))return!0;if(p.route.shouldRevalidate){let y=p.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:u[0]?.params||{},nextUrl:new URL(r,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function ay(r,o,{includeHydrateFallback:u}={}){return ly(r.map(c=>{let d=o.routes[c.route.id];if(!d)return[];let x=[d.module];return d.clientActionModule&&(x=x.concat(d.clientActionModule)),d.clientLoaderModule&&(x=x.concat(d.clientLoaderModule)),u&&d.hydrateFallbackModule&&(x=x.concat(d.hydrateFallbackModule)),d.imports&&(x=x.concat(d.imports)),x}).flat(1))}function ly(r){return[...new Set(r)]}function ny(r){let o={},u=Object.keys(r).sort();for(let c of u)o[c]=r[c];return o}function sy(r,o){let u=new Set;return new Set(o),r.reduce((c,d)=>{let x=JSON.stringify(ny(d));return u.has(x)||(u.add(x),c.push({key:x,link:d})),c},[])}function I0(){let r=E.useContext(Vl);return iu(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function iy(){let r=E.useContext(vi);return iu(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var ru=E.createContext(void 0);ru.displayName="FrameworkContext";function em(){let r=E.useContext(ru);return iu(r,"You must render this element inside a <HydratedRouter> element"),r}function ry(r,o){let u=E.useContext(ru),[c,d]=E.useState(!1),[x,g]=E.useState(!1),{onFocus:v,onBlur:p,onMouseEnter:m,onMouseLeave:j,onTouchStart:y}=o,C=E.useRef(null);E.useEffect(()=>{if(r==="render"&&g(!0),r==="viewport"){let w=Q=>{Q.forEach(H=>{g(H.isIntersecting)})},R=new IntersectionObserver(w,{threshold:.5});return C.current&&R.observe(C.current),()=>{R.disconnect()}}},[r]),E.useEffect(()=>{if(c){let w=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(w)}}},[c]);let O=()=>{d(!0)},G=()=>{d(!1),g(!1)};return u?r!=="intent"?[x,C,{}]:[x,C,{onFocus:Xn(v,O),onBlur:Xn(p,G),onMouseEnter:Xn(m,O),onMouseLeave:Xn(j,G),onTouchStart:Xn(y,O)}]:[!1,C,{}]}function Xn(r,o){return u=>{r&&r(u),u.defaultPrevented||o(u)}}function cy({page:r,...o}){let{router:u}=I0(),c=E.useMemo(()=>B0(u.routes,r,u.basename),[u.routes,r,u.basename]);return c?E.createElement(oy,{page:r,matches:c,...o}):null}function uy(r){let{manifest:o,routeModules:u}=em(),[c,d]=E.useState([]);return E.useEffect(()=>{let x=!1;return ty(r,o,u).then(g=>{x||d(g)}),()=>{x=!0}},[r,o,u]),c}function oy({page:r,matches:o,...u}){let c=La(),{future:d,manifest:x,routeModules:g}=em(),{basename:v}=I0(),{loaderData:p,matches:m}=iy(),j=E.useMemo(()=>z0(r,o,m,x,c,"data"),[r,o,m,x,c]),y=E.useMemo(()=>z0(r,o,m,x,c,"assets"),[r,o,m,x,c]),C=E.useMemo(()=>{if(r===c.pathname+c.search+c.hash)return[];let w=new Set,R=!1;if(o.forEach(H=>{let V=x.routes[H.route.id];!V||!V.hasLoader||(!j.some(K=>K.route.id===H.route.id)&&H.route.id in p&&g[H.route.id]?.shouldRevalidate||V.hasClientLoader?R=!0:w.add(H.route.id))}),w.size===0)return[];let Q=Pg(r,v,d.unstable_trailingSlashAwareDataRequests,"data");return R&&w.size>0&&Q.searchParams.set("_routes",o.filter(H=>w.has(H.route.id)).map(H=>H.route.id).join(",")),[Q.pathname+Q.search]},[v,d.unstable_trailingSlashAwareDataRequests,p,c,x,j,o,r,g]),O=E.useMemo(()=>ay(y,x),[y,x]),G=uy(y);return E.createElement(E.Fragment,null,C.map(w=>E.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...u})),O.map(w=>E.createElement("link",{key:w,rel:"modulepreload",href:w,...u})),G.map(({key:w,link:R})=>E.createElement("link",{key:w,nonce:u.nonce,...R,crossOrigin:R.crossOrigin??u.crossOrigin})))}function fy(...r){return o=>{r.forEach(u=>{typeof u=="function"?u(o):u!=null&&(u.current=o)})}}var dy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{dy&&(window.__reactRouterVersion="7.13.0")}catch{}function my({basename:r,children:o,unstable_useTransitions:u,window:c}){let d=E.useRef();d.current==null&&(d.current=Zh({window:c,v5Compat:!0}));let x=d.current,[g,v]=E.useState({action:x.action,location:x.location}),p=E.useCallback(m=>{u===!1?v(m):E.startTransition(()=>v(m))},[u]);return E.useLayoutEffect(()=>x.listen(p),[x,p]),E.createElement(Gg,{basename:r,children:o,location:g.location,navigationType:g.action,navigator:x,unstable_useTransitions:u})}var tm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jt=E.forwardRef(function({onClick:o,discover:u="render",prefetch:c="none",relative:d,reloadDocument:x,replace:g,state:v,target:p,to:m,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:C,...O},G){let{basename:w,unstable_useTransitions:R}=E.useContext(Ot),Q=typeof m=="string"&&tm.test(m),H=V0(m,w);m=H.to;let V=Tg(m,{relative:d}),[K,F,$]=ry(c,O),Y=gy(m,{replace:g,state:v,target:p,preventScrollReset:j,relative:d,viewTransition:y,unstable_defaultShouldRevalidate:C,unstable_useTransitions:R});function I(Ce){o&&o(Ce),Ce.defaultPrevented||Y(Ce)}let X=E.createElement("a",{...O,...$,href:H.absoluteURL||V,onClick:H.isExternal||x?o:I,ref:fy(G,F),target:p,"data-discover":!Q&&u==="render"?"true":void 0});return K&&!Q?E.createElement(E.Fragment,null,X,E.createElement(cy,{page:V})):X});jt.displayName="Link";var am=E.forwardRef(function({"aria-current":o="page",caseSensitive:u=!1,className:c="",end:d=!1,style:x,to:g,viewTransition:v,children:p,...m},j){let y=kn(g,{relative:m.relative}),C=La(),O=E.useContext(vi),{navigator:G,basename:w}=E.useContext(Ot),R=O!=null&&jy(y)&&v===!0,Q=G.encodeLocation?G.encodeLocation(y).pathname:y.pathname,H=C.pathname,V=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;u||(H=H.toLowerCase(),V=V?V.toLowerCase():null,Q=Q.toLowerCase()),V&&w&&(V=ua(V,w)||V);const K=Q!=="/"&&Q.endsWith("/")?Q.length-1:Q.length;let F=H===Q||!d&&H.startsWith(Q)&&H.charAt(K)==="/",$=V!=null&&(V===Q||!d&&V.startsWith(Q)&&V.charAt(Q.length)==="/"),Y={isActive:F,isPending:$,isTransitioning:R},I=F?o:void 0,X;typeof c=="function"?X=c(Y):X=[c,F?"active":null,$?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let Ce=typeof x=="function"?x(Y):x;return E.createElement(jt,{...m,"aria-current":I,className:X,ref:j,style:Ce,to:g,viewTransition:v},typeof p=="function"?p(Y):p)});am.displayName="NavLink";var xy=E.forwardRef(({discover:r="render",fetcherKey:o,navigate:u,reloadDocument:c,replace:d,state:x,method:g=gi,action:v,onSubmit:p,relative:m,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:C,...O},G)=>{let{unstable_useTransitions:w}=E.useContext(Ot),R=vy(),Q=by(v,{relative:m}),H=g.toLowerCase()==="get"?"get":"post",V=typeof v=="string"&&tm.test(v),K=F=>{if(p&&p(F),F.defaultPrevented)return;F.preventDefault();let $=F.nativeEvent.submitter,Y=$?.getAttribute("formmethod")||g,I=()=>R($||F.currentTarget,{fetcherKey:o,method:Y,navigate:u,replace:d,state:x,relative:m,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:C});w&&u!==!1?E.startTransition(()=>I()):I()};return E.createElement("form",{ref:G,method:H,action:Q,onSubmit:c?p:K,...O,"data-discover":!V&&r==="render"?"true":void 0})});xy.displayName="Form";function hy(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lm(r){let o=E.useContext(Vl);return we(o,hy(r)),o}function gy(r,{target:o,replace:u,state:c,preventScrollReset:d,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:v,unstable_useTransitions:p}={}){let m=lu(),j=La(),y=kn(r,{relative:x});return E.useCallback(C=>{if(kg(C,o)){C.preventDefault();let O=u!==void 0?u:Vn(j)===Vn(y),G=()=>m(r,{replace:O,state:c,preventScrollReset:d,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:v});p?E.startTransition(()=>G()):G()}},[j,m,y,u,c,o,r,d,x,g,v,p])}function cu(r){Bt(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 o=E.useRef(eu(r)),u=E.useRef(!1),c=La(),d=E.useMemo(()=>Kg(c.search,u.current?null:o.current),[c.search]),x=lu(),g=E.useCallback((v,p)=>{const m=eu(typeof v=="function"?v(new URLSearchParams(d)):v);u.current=!0,x("?"+m,p)},[x,d]);return[d,g]}var yy=0,py=()=>`__${String(++yy)}__`;function vy(){let{router:r}=lm("useSubmit"),{basename:o}=E.useContext(Ot),u=Hg(),c=r.fetch,d=r.navigate;return E.useCallback(async(x,g={})=>{let{action:v,method:p,encType:m,formData:j,body:y}=Fg(x,o);if(g.navigate===!1){let C=g.fetcherKey||py();await c(C,u,g.action||v,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:j,body:y,formMethod:g.method||p,formEncType:g.encType||m,flushSync:g.flushSync})}else await d(g.action||v,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:j,body:y,formMethod:g.method||p,formEncType:g.encType||m,replace:g.replace,state:g.state,fromRouteId:u,flushSync:g.flushSync,viewTransition:g.viewTransition})},[c,d,o,u])}function by(r,{relative:o}={}){let{basename:u}=E.useContext(Ot),c=E.useContext(Qt);we(c,"useFormAction must be used inside a RouteContext");let[d]=c.matches.slice(-1),x={...kn(r||".",{relative:o})},g=La();if(r==null){x.search=g.search;let v=new URLSearchParams(x.search),p=v.getAll("index");if(p.some(j=>j==="")){v.delete("index"),p.filter(y=>y).forEach(y=>v.append("index",y));let j=v.toString();x.search=j?`?${j}`:""}}return(!r||r===".")&&d.route.index&&(x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index"),u!=="/"&&(x.pathname=x.pathname==="/"?u:ca([u,x.pathname])),Vn(x)}function jy(r,{relative:o}={}){let u=E.useContext($0);we(u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=lm("useViewTransitionState"),d=kn(r,{relative:o});if(!u.isTransitioning)return!1;let x=ua(u.currentLocation.pathname,c)||u.currentLocation.pathname,g=ua(u.nextLocation.pathname,c)||u.nextLocation.pathname;return pi(d.pathname,g)!=null||pi(d.pathname,x)!=null}const nm=E.createContext({projects:[],activeProject:null,setActiveProject:()=>{},refreshProjects:()=>{}});function Zl(){return E.useContext(nm)}function Ny(){const[r,o]=E.useState([]),[u,c]=cu(),d=E.useCallback(async()=>{try{const m=await(await fetch("/api/projects")).json();m.ok&&o(m.data||[])}catch{}},[]);E.useEffect(()=>{d()},[d]);const x=u.get("project"),g=x?r.find(p=>p.id===x)||r[0]||null:r[0]||null,v=E.useCallback(p=>{c(m=>(m.set("project",p),m))},[c]);return{projects:r,activeProject:g,setActiveProject:v,refreshProjects:d}}function sm(r){const[o,u]=E.useState(null),[c,d]=E.useState(!0),[x,g]=E.useState(null),[v,p]=E.useState(0),[m,j]=E.useState(null),y=E.useCallback(()=>p(C=>C+1),[]);return E.useEffect(()=>{let C=!1;return d(!0),fetch(r).then(O=>{if(!O.ok)throw new Error(`HTTP ${O.status}`);return O.json()}).then(O=>{C||(u(O.data??O),g(null),j(new Date))}).catch(O=>{C||g(String(O.message||O))}).finally(()=>{C||d(!1)}),()=>{C=!0}},[r,v]),{data:o,loading:c,error:x,refetch:y,fetchedAt:m}}function Be(r){const{activeProject:o}=Zl(),u=r.includes("?")?"&":"?",c=o?`${r}${u}project=${o.id}`:r;return sm(c)}function ji(r){const{url:o="/api/events"}=r,u=E.useRef(null),c=E.useRef(null),d=E.useRef(r);d.current=r;const[x,g]=E.useState("connecting"),v=E.useCallback(()=>{u.current&&u.current.close(),g("connecting");const p=new EventSource(o);u.current=p;const m=["heartbeat","increment-update","analytics-event","cost-update","notification","sync-update","sync-audit","error-detected","config-changed","activity","command-output","command-complete","job-progress"];for(const j of m)p.addEventListener(j,y=>{try{const C=JSON.parse(y.data);d.current.onEvent?.[j]?.(C),d.current.onAnyEvent?.(j,C)}catch{}});p.onopen=()=>{g("connected")},p.onerror=()=>{p.close(),g("disconnected"),c.current=setTimeout(()=>{u.current===p&&v()},3e3)}},[o]);return E.useEffect(()=>(v(),()=>{c.current&&(clearTimeout(c.current),c.current=null),u.current?.close(),u.current=null}),[v]),{status:x}}const Sy=[{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 Ey({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 Ty(){const{projects:r,activeProject:o,setActiveProject:u}=Zl(),[c]=cu(),{data:d}=Be("/api/overview"),[x,g]=E.useState(null),v=E.useCallback(C=>{const O=C;O?.pendingCount!=null&&g(O.pendingCount)},[]),{status:p}=ji({onEvent:{notification:v}}),m=x??d?.notifications?.pendingCount??0,j=c.get("project"),y=C=>j?`${C}?project=${j}`:C;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>1?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.jsx("select",{value:o?.id||"",onChange:C=>u(C.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(C=>n.jsx("option",{value:C.id,children:C.name},C.id))})]}):r.length===1?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.jsx("div",{className:"text-gray-300 text-xs px-2 py-1.5 truncate",title:r[0].path,children:r[0].name})]}):j?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.jsx("div",{className:"text-gray-500 text-xs px-2 py-1.5 truncate",children:decodeURIComponent(j).split(/[-/]/).pop()||"Loading..."})]}):null,n.jsx("nav",{className:"flex-1 overflow-y-auto py-3 px-2",children:Sy.map(C=>n.jsxs(am,{to:y(C.path),end:C.path==="/",className:({isActive:O})=>`flex items-center gap-3 px-3 py-2 rounded-lg text-sm mb-0.5 transition-colors ${O?"bg-indigo-500/10 text-indigo-400":"text-gray-400 hover:bg-gray-800 hover:text-gray-200"}`,children:[n.jsx(Ey,{d:C.icon}),n.jsx("span",{className:"flex-1",children:C.label}),C.badge&&m>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:m>99?"99+":m})]},C.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 ${p==="connected"?"bg-emerald-400 pulse-dot":p==="connecting"?"bg-amber-400 pulse-dot":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-500",children:p==="connected"?"Connected":p==="connecting"?"Connecting...":"Disconnected"})]}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[r.length," project",r.length!==1?"s":""]})]})})]})}function Cy(){const{data:r}=sm("/api/health"),{activeProject:o}=Zl(),u=o?.name||"Project",c=r?.uptime?Ay(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 Ay(r){if(r<60)return`${Math.floor(r)}s`;if(r<3600)return`${Math.floor(r/60)}m`;const o=Math.floor(r/3600),u=Math.floor(r%3600/60);return`${o}h ${u}m`}const My={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"},zy={indigo:"text-indigo-400",emerald:"text-emerald-400",amber:"text-amber-400",rose:"text-rose-400",cyan:"text-cyan-400"};function ne({title:r,value:o,subtitle:u,tooltip:c,color:d="indigo"}){return n.jsxs("div",{className:`bg-gradient-to-br ${My[d]} 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 ${zy[d]}`,children:o}),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 Ry={active:"#6366f1",completed:"#10b981",paused:"#f59e0b",planning:"#06b6d4",abandoned:"#ef4444",backlog:"#6b7280",ready_for_review:"#8b5cf6"};function _y(r){return Ry[r]||"#6b7280"}function wy({segments:r,size:o=160,centerLabel:u,centerValue:c}){const d=r.reduce((p,m)=>p+m.value,0);if(d===0)return n.jsx("div",{className:"flex items-center justify-center",style:{width:o,height:o},children:n.jsx("span",{className:"text-gray-600 text-xs",children:"No data"})});const x=52,g=2*Math.PI*x;let v=0;return n.jsxs("div",{className:"relative inline-flex items-center justify-center",style:{width:o,height:o},children:[n.jsx("svg",{viewBox:"0 0 128 128",className:"w-full h-full -rotate-90",children:r.map((p,m)=>{const y=p.value/d*g,C=v;return v+=y,n.jsx("circle",{cx:"64",cy:"64",r:x,fill:"none",stroke:p.color,strokeWidth:"12",strokeDasharray:`${y} ${g-y}`,strokeDashoffset:-C,className:"transition-all duration-500"},m)})}),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 Oy(r){return Object.entries(r).filter(([o,u])=>u>0).map(([o,u])=>({label:o,value:u,color:_y(o)}))}const Dy={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 me({label:r,variant:o="default"}){return n.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-md text-xs font-medium ${Dy[o]}`,children:r})}function Ni(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 Uy({size:r="md"}){const o={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"};return n.jsxs("svg",{className:`${o[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 Nt(){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsx(Uy,{size:"lg"})})}function R0(r){switch(r){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function Ly(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 Wc=r=>r.billingContext?.planType==="subscription";function Hy(){const{data:r,loading:o,error:u}=Be("/api/overview"),[c,d]=E.useState([]),{activeProject:x}=Zl(),g=E.useRef(null);E.useEffect(()=>{if(!x||g.current===x.id)return;g.current=x.id;const m=`project=${x.id}`;fetch(`/api/activity/stream?limit=20&${m}`).then(j=>j.json()).then(j=>{j.ok&&Array.isArray(j.data)&&d(j.data)}).catch(()=>{})},[x]);const v=E.useCallback(m=>{d(j=>[m,...j].slice(0,20))},[]);if(ji({onEvent:{activity:v}}),o)return n.jsx(Nt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});if(!r)return null;const p=Oy(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(jt,{to:"/increments?status=active",className:"group",children:n.jsx(ne,{title:"Active Increments",value:r.project.activeIncrements,subtitle:`${r.project.totalIncrements} total`,color:"indigo"})}),n.jsx(jt,{to:"/increments?status=completed",className:"group",children:n.jsx(ne,{title:"Completed",value:r.project.completedIncrements,subtitle:`${Math.round(r.project.completedIncrements/Math.max(r.project.totalIncrements,1)*100)}% done`,color:"emerald"})}),n.jsx(jt,{to:"/costs",className:"group",children:n.jsx(ne,{title:Wc(r.costs)?"Usage Value":"Total Cost",value:`$${r.costs.totalCost.toFixed(2)}`,subtitle:Wc(r.costs)?`$${r.costs.billingContext?.monthlyAmount??"?"}/mo plan`:`${r.costs.sessionCount.toLocaleString()} sessions`,color:"amber"})}),n.jsx(jt,{to:"/analytics",className:"group",children:n.jsx(ne,{title:"Events Today",value:r.analytics.last24hEvents,subtitle:`${r.analytics.totalEvents.toLocaleString()} total`,color:"cyan"})})]}),Wc(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(me,{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(wy,{segments:p,centerValue:r.project.totalIncrements,centerLabel:"total"})}),n.jsx("div",{className:"flex flex-wrap gap-2 mt-4 justify-center",children:p.map(m=>n.jsxs(jt,{to:`/increments?status=${m.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:m.color}}),n.jsxs("span",{className:"text-xs text-gray-500 hover:text-gray-300",children:[m.label," (",m.value,")"]})]},m.label))})]}),n.jsxs(jt,{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(([m,j])=>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:m}),j.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:j.configDetail}),!j.configDetail&&j.lastImport&&n.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:["Last: ",new Date(j.lastImport).toLocaleDateString()]})]}),n.jsx(me,{label:Ly(j.connectionStatus||j.lastSyncResult),variant:R0(j.connectionStatus)!=="default"?R0(j.connectionStatus):Ni(j.lastSyncResult||"")})]},m))}),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(jt,{to:"/notifications",onClick:m=>m.stopPropagation(),children:n.jsx(me,{label:`${r.notifications.criticalCount} critical`,variant:"error"})}),n.jsx(jt,{to:"/notifications",onClick:m=>m.stopPropagation(),children:n.jsx(me,{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(jt,{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((m,j)=>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 ${m.severity==="error"?"bg-rose-400":m.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:m.title}),n.jsxs("div",{className:"text-[10px] text-gray-600",children:[m.category,m.timestamp&&` · ${By(m.timestamp)}`]})]})]},j))})]})]}),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(([m,j])=>n.jsxs(jt,{to:`/increments?type=${m}`,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:m}),n.jsx("span",{className:"text-xs text-gray-500 bg-gray-800 px-2 py-0.5 rounded",children:j})]},m))})]})]})}function By(r){try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 al(r,o=""){const[u,c]=cu(),d=u.get(r)??o,x=E.useCallback(g=>{c(v=>{const p=new URLSearchParams(v);return g&&g!==o?p.set(r,g):p.delete(r),p})},[r,o,c]);return[d,x]}function uu({title:r,description:o}){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}),o&&n.jsx("p",{className:"text-gray-600 text-xs mt-1 max-w-xs",children:o})]})}function qy(){const{data:r,loading:o,error:u}=Be("/api/increments"),[c,d]=al("status","all"),[x,g]=al("type","all"),v=lu();if(o)return n.jsx(Nt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});if(!r)return null;const p=r.increments.filter(y=>!(c!=="all"&&y.status!==c||x!=="all"&&y.type!==x)),m=[...new Set(r.increments.map(y=>y.status))],j=[...new Set(r.increments.map(y=>y.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:[r.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(xi,{label:"All",active:c==="all",onClick:()=>d("all")}),m.map(y=>n.jsx(xi,{label:y,active:c===y,onClick:()=>d(y),count:r.increments.filter(C=>C.status===y).length},y))]})]}),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(xi,{label:"All",active:x==="all",onClick:()=>g("all")}),j.map(y=>n.jsx(xi,{label:y,active:x===y,onClick:()=>g(y),count:r.increments.filter(C=>C.type===y).length},y))]})]}),n.jsxs("span",{className:"text-xs text-gray-500",children:[p.length," matching"]})]}),p.length===0?n.jsx(uu,{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:p.map(y=>n.jsxs("tr",{onClick:()=>v(`/increments/${y.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:y.id})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-sm text-gray-300",children:y.title})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(me,{label:y.status,variant:Ni(y.status)})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:y.type})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(Yy,{priority:y.priority})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(_0,{completed:y.tasks.completed,total:y.tasks.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(_0,{completed:y.acs.completed,total:y.acs.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-500",children:y.lastActivity?Gy(y.lastActivity):"-"})})]},y.id))})]})})]})}function xi({label:r,active:o,onClick:u,count:c}){return n.jsxs("button",{onClick:u,className:`px-3 py-1 text-xs rounded-md transition-colors capitalize ${o?"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 _0({completed:r,total:o}){const u=o>0?Math.round(r/o*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,"/",o]})]})}function Yy({priority:r}){const o={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 ${o[r]||o.P2}`,children:r})}function Gy(r){try{const o=new Date(r),c=new Date().getTime()-o.getTime(),d=Math.floor(c/6e4);if(d<1)return"Just now";if(d<60)return`${d}m ago`;const x=Math.floor(d/60);if(x<24)return`${x}h ago`;const g=Math.floor(x/24);return g<7?`${g}d ago`:o.toLocaleDateString()}catch{return r}}function Xy(){const[r,o]=E.useState("commands"),[u,c]=E.useState(!1),{data:d,loading:x,error:g,refetch:v,fetchedAt:p}=Be("/api/analytics/summary"),{data:m,loading:j,refetch:y}=Be("/api/analytics/skills");if(x||j)return n.jsx(Nt,{});if(g)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",g]});if(!d)return null;const C=d.topCommands?.reduce((w,R)=>w+R.count,0)||0,O=d.topSkills?.reduce((w,R)=>w+R.count,0)||0,G=d.topAgents?.reduce((w,R)=>w+R.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:[p&&n.jsxs("span",{className:"text-[10px] text-gray-600",children:["Updated ",p.toLocaleTimeString()]}),n.jsxs("span",{className:"text-sm text-gray-500",children:[d.totalEvents.toLocaleString()," total events"]}),n.jsx("button",{onClick:()=>{c(!0),v(),y(),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(ne,{title:"Total Events",value:d.totalEvents.toLocaleString(),subtitle:`${d.successRate}% success rate`,color:"indigo",tooltip:`${d.totalEvents} events tracked from analytics JSONL`}),n.jsx(ne,{title:"Commands",value:C.toLocaleString(),subtitle:`${d.topCommands?.length||0} unique`,color:"cyan",tooltip:`${C} total command invocations across ${d.topCommands?.length||0} distinct commands`}),n.jsx(ne,{title:"Skills",value:O.toLocaleString(),subtitle:`${d.topSkills?.length||0} unique`,color:"emerald",tooltip:`${O} total skill activations across ${d.topSkills?.length||0} distinct skills`}),n.jsx(ne,{title:"Agents",value:G.toLocaleString(),subtitle:`${d.topAgents?.length||0} unique`,color:"amber",tooltip:`${G} agent spawns across ${d.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(w=>n.jsx("button",{onClick:()=>o(w.key),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===w.key?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:w.label},w.key))}),r==="commands"&&n.jsx(Qy,{commands:d.topCommands||[]}),r==="skills"&&n.jsx(Vy,{skills:m||[]}),r==="agents"&&n.jsx(Zy,{agents:d.topAgents||[]}),r==="daily"&&n.jsx($y,{days:d.dailySummaries||[]})]})}function Qy({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 o=[...r].sort((c,d)=>d.count-c.count),u=o[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:o.map((c,d)=>{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:["#",d+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 Vy({skills:r}){const o=[...r].sort((u,c)=>c.count-u.count);return o.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:o.map((u,c)=>{const d=u.count>0?Math.round(u.successCount/u.count*100):100,x=d>=90?"success":d>=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(me,{label:`${d}%`,variant:x})}),n.jsx("td",{className:"px-4 py-2.5 text-xs text-gray-600 text-right whitespace-nowrap",children:u.lastUsed?ky(u.lastUsed):"-"})]},u.name)})})]})]})}function Zy({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 o=[...r].sort((c,d)=>d.count-c.count),u=o[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:o.map((c,d)=>{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:["#",d+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 $y({days:r}){const o=r.slice(-14);if(o.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(...o.map(x=>x.totalEvents),1),c=o.reduce((x,g)=>x+g.totalEvents,0),d=Math.round(c/o.length);return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsx(ne,{title:"Period Total",value:c.toLocaleString(),subtitle:`Last ${o.length} days`,color:"indigo"}),n.jsx(ne,{title:"Daily Average",value:d.toLocaleString(),color:"cyan"}),n.jsx(ne,{title:"Peak Day",value:u.toLocaleString(),subtitle:o.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 ",o.length," Days)"]}),n.jsx("div",{className:"flex items-end gap-1.5 h-40",children:o.map(x=>{const g=Math.max(2,x.totalEvents/u*100),v=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:v})]},x.date)})})]})]})}function ky(r){if(!r)return"";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 im({items:r,maxBars:o=10}){const u=[...r].sort((d,x)=>x.value-d.value).slice(0,o),c=Math.max(...u.map(d=>d.value),1);return n.jsx("div",{className:"space-y-2",children:u.map((d,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:d.label,children:d.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:`${d.value/c*100}%`,backgroundColor:d.color||"#6366f1"}})}),n.jsx("span",{className:"text-xs text-gray-500 w-10 text-right",children:d.value})]},x))})}function Ky(){const[r,o]=E.useState("overview"),[u,c]=E.useState(null),{data:d,loading:x,error:g}=Be("/api/costs/summary");if(x)return n.jsx(Nt,{});if(g)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",g]});if(!d)return null;const v=d.sessions||[],p=d.billingContext?.planType==="subscription",m=d.modelBreakdown?Object.entries(d.modelBreakdown).map(([w,R])=>({model:w,...R})).sort((w,R)=>R.cost-w.cost):Wy(v),j=v.reduce((w,R)=>w+(R.inputTokens||0),0),y=v.reduce((w,R)=>w+(R.outputTokens||0),0),C=v.reduce((w,R)=>w+(R.cacheReadTokens||0),0),O=v.reduce((w,R)=>w+(R.cacheWriteTokens||0),0),G=j+y+C+O;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"}),p&&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(me,{label:"Subscription",variant:"info"}),n.jsxs("span",{className:"text-xs text-gray-300",children:[d.billingContext?.monthlyAmount?`$${d.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(ne,{title:p?"API-Equivalent Value":"Total Cost",value:`$${d.totalCost.toFixed(2)}`,subtitle:p&&d.billingContext?.monthlyAmount?`Your plan: $${d.billingContext.monthlyAmount}/mo`:void 0,color:"amber"}),n.jsx(ne,{title:p?"Cache Efficiency":"Cache Savings",value:`$${d.totalSavings.toFixed(2)}`,subtitle:p?"API-equivalent savings from cache":void 0,color:"emerald"}),n.jsx(ne,{title:"Total Tokens",value:Xl(d.totalTokens),subtitle:Fy(d.totalTokens),color:"indigo"}),n.jsx(ne,{title:"Sessions",value:d.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(w=>n.jsx("button",{onClick:()=>o(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==="overview"?"Breakdown":`Sessions (${v.length})`},w))}),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:p?"Usage Value by Model":"Cost by Model"}),m.length>0?n.jsx(im,{items:m.map(w=>({label:w.model,value:parseFloat(w.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(hi,{label:"Input",value:j,total:G,color:"bg-indigo-500"}),n.jsx(hi,{label:"Output",value:y,total:G,color:"bg-cyan-500"}),C>0&&n.jsx(hi,{label:"Cache Read",value:C,total:G,color:"bg-emerald-500"}),O>0&&n.jsx(hi,{label:"Cache Write",value:O,total:G,color:"bg-amber-500"})]})]}),m.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:m.map(w=>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:w.model}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:w.sessions.toLocaleString()}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(w.tokens)}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",w.cost.toFixed(2)]}),n.jsxs("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:["$",w.sessions>0?(w.cost/w.sessions).toFixed(4):"0"]})]},w.model))})]})]})]}),r==="sessions"&&n.jsx(Jy,{sessions:v,expandedSession:u,onToggle:w=>c(u===w?null:w)})]})}const Fc=30;function Jy({sessions:r,expandedSession:o,onToggle:u}){const[c,d]=E.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/Fc),g=c*Fc,v=g+Fc,p=r.slice(g,v);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(v,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:p.map(m=>{const j=m.sessionId||"-",y=o===j,C=(m.cacheReadTokens||0)+(m.cacheWriteTokens||0);return n.jsxs(E.Fragment,{children:[n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30 cursor-pointer",onClick:()=>u(j),children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-600",children:n.jsx("span",{className:`inline-block transition-transform ${y?"rotate-90":""}`,children:"▸"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400 font-mono",children:j.slice(0,8)}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(me,{label:m.model||"unknown",variant:"default"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(m.inputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(m.outputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:C>0?Xl(C):"-"}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",m.cost?.toFixed(4)||"0.0000"]}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:m.duration?w0(m.duration):"-"}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:Py(m.timestamp)})]}),y&&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:m.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:m.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:(m.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:(m.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:["$",m.cost?.toFixed(6)||"0"]})]}),m.savings!=null&&m.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:["$",m.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:m.duration?w0(m.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:m.sessionId})]})]})})})]},j)})})]}),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:()=>d(m=>Math.max(0,m-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)},(m,j)=>{let y;return x<=7||c<3?y=j:c>x-4?y=x-7+j:y=c-3+j,n.jsx("button",{onClick:()=>d(y),className:`w-7 h-7 text-xs rounded transition-colors ${c===y?"bg-indigo-600 text-white":"text-gray-500 hover:text-gray-300 hover:bg-gray-800"}`,children:y+1},y)})}),n.jsx("button",{onClick:()=>d(m=>Math.min(x-1,m+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 hi({label:r,value:o,total:u,color:c}){const d=u>0?o/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:[Xl(o)," (",d.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:`${d}%`,backgroundColor:x[c]||c}})})]})}function Wy(r){const o=new Map;for(const u of r){const c=u.model||"unknown",d=o.get(c)||{cost:0,tokens:0,sessions:0};d.cost+=u.cost||0,d.tokens+=(u.inputTokens||0)+(u.outputTokens||0),d.sessions++,o.set(c,d)}return Array.from(o.entries()).map(([u,c])=>({model:u,...c})).sort((u,c)=>c.cost-u.cost)}function Xl(r){return r?r>=1e6?`${(r/1e6).toFixed(1)}M`:r>=1e3?`${(r/1e3).toFixed(1)}K`:String(r):"0"}function Fy(r){return r?r.toLocaleString():"0"}function w0(r){const o=Math.round(r);if(o<60)return`${o}s`;const u=Math.floor(o/60),c=o%60;return u<60?`${u}m ${c}s`:`${Math.floor(u/60)}h ${u%60}m`}function Py(r){if(!r)return"-";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 ou(){const[r,o]=E.useState(!1),[u,c]=E.useState(null),[d,x]=E.useState(null),[g,v]=E.useState([]),[p,m]=E.useState("idle"),j=E.useRef(null),y=E.useRef(null);ji({onEvent:{"command-output":G=>{const w=G;y.current&&w.executionId===y.current&&w.line&&v(R=>[...R,w.line])},"command-complete":G=>{const w=G;if(y.current&&w.executionId===y.current){if(j.current&&(clearTimeout(j.current),j.current=null),o(!1),w.exitCode===0)m("success"),v(R=>[...R,"Command completed successfully."]);else{m("error");const R=`Command failed (exit code ${w.exitCode??"unknown"})`;x(R),v(Q=>[...Q,R])}y.current=null}}}}),E.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const C=E.useCallback(async G=>{o(!0),x(null),v([`> specweave ${G}`]),m("running");try{const R=await(await fetch(`/api/commands/${G}`,{method:"POST"})).json();return R.ok?(c(R.data),y.current=R.data?.id||null,j.current=setTimeout(()=>{y.current&&(y.current=null,o(!1),m("error"),x("Command timed out after 60 seconds"),v(Q=>[...Q,"Timed out after 60 seconds."]))},6e4),R.data):(x(R.error||"Command failed"),m("error"),v(Q=>[...Q,`Error: ${R.error||"Command failed"}`]),o(!1),null)}catch(w){return x(String(w)),m("error"),v(R=>[...R,`Error: ${String(w)}`]),o(!1),null}},[]),O=E.useCallback(()=>{o(!1),c(null),x(null),v([]),m("idle"),y.current=null,j.current&&(clearTimeout(j.current),j.current=null)},[]);return{execute:C,running:r,result:u,error:d,output:g,status:p,reset:O}}function Iy(r){switch(r){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function ep(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 tp(){const[r,o]=E.useState("health"),[u,c]=E.useState(null),{data:d,loading:x,error:g,refetch:v}=Be("/api/sync/status"),{data:p,loading:m}=Be("/api/sync/audit?limit=100"),{data:j,loading:y}=Be("/api/sync/audit/summary"),{execute:C,running:O}=ou(),G=async K=>{c(K);try{const F=new URLSearchParams(window.location.search).get("project")||"",$=F?`?platform=${K}&project=${F}`:`?platform=${K}`;await fetch(`/api/sync/verify${$}`,{method:"POST"}),v()}catch{}c(null)};if(x||m||y)return n.jsx(Nt,{});if(g)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",g]});if(!d)return null;const w=Object.entries(d.platforms).filter(([K])=>["github","jira","ado"].includes(K)),R=p?.length||0,Q=p?.filter(K=>K.result==="error").length||0,H=p?.filter(K=>K.conflict)||[],V=w.filter(([,K])=>K.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:()=>C("sync-push"),disabled:O,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:O?"Syncing...":"Sync Now"})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ne,{title:"Platforms",value:w.length,subtitle:`${V} connected`,color:"indigo"}),n.jsx(ne,{title:"Audit Entries",value:R,color:"cyan"}),n.jsx(ne,{title:"Errors",value:Q,color:"rose"}),n.jsx(ne,{title:"Conflicts",value:H.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(K=>n.jsx("button",{onClick:()=>o(K),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===K?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:K==="health"?"Platform Health":K==="audit"?"Audit Log":`Conflicts (${H.length})`},K))}),r==="health"&&n.jsx(n.Fragment,{children:w.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:w.map(([K,F])=>{const $=j?.[K],Y=F.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(rm,{platform:K}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm font-medium text-gray-300 capitalize",children:K}),F.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:F.configDetail})]})]}),n.jsx(me,{label:ep(Y),variant:Iy(Y)})]}),F.diagnosticMessage&&n.jsx("div",{className:"text-xs text-gray-500 mb-3 p-2 bg-gray-800/30 rounded-lg",children:F.diagnosticMessage}),Y==="not_configured"&&n.jsx(jt,{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"}),Y==="configured_never_synced"&&n.jsx("button",{onClick:()=>G(K),disabled:u===K,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===K?"Verifying...":"Verify Connection"}),Y==="sync_failed"&&n.jsx("button",{onClick:()=>G(K),disabled:u===K,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===K?"Verifying...":"Retry Sync"}),n.jsxs("div",{className:"space-y-2 mt-3",children:[F.lastImport&&n.jsx(Gl,{label:"Last Import",value:new Date(F.lastImport).toLocaleString()}),Y==="connected"&&!F.lastImport&&n.jsx(Gl,{label:"Status",value:"Connected, no imports yet"}),F.lastImportCount!=null&&n.jsx(Gl,{label:"Items Imported",value:F.lastImportCount.toLocaleString()}),F.lastSkippedCount!=null&&F.lastSkippedCount>0&&n.jsx(Gl,{label:"Skipped",value:F.lastSkippedCount.toLocaleString()}),$&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"border-t border-gray-800 my-2"}),n.jsx(Gl,{label:"Total Ops",value:$.total.toLocaleString()}),n.jsx(Gl,{label:"Success",value:$.success.toLocaleString()}),$.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(me,{label:String($.errors),variant:"error"})]})]})]})]},K)})})}),r==="audit"&&n.jsx(O0,{entries:p||[]}),r==="conflicts"&&n.jsx(O0,{entries:H}),d.lastUpdated&&n.jsxs("p",{className:"text-xs text-gray-600",children:["Last metadata update: ",new Date(d.lastUpdated).toLocaleString()]})]})}function O0({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 o={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:ap(u.timestamp)}),n.jsx("td",{className:"px-4 py-2",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(rm,{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(me,{label:u.direction,variant:u.direction==="push"?"info":"default"})}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(me,{label:u.result,variant:o[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 Gl({label:r,value:o}){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:o})]})}function rm({platform:r}){const o={github:"bg-gray-700",jira:"bg-blue-700",ado:"bg-blue-600"};return n.jsx("div",{className:`w-5 h-5 rounded ${o[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 ap(r){if(!r)return"-";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 cm={prompt_too_long:"error",api_error:"warning",tool_failure:"info",hook_error:"default",rate_limit:"warning",unknown:"default"},Qn=50;function lp(){const[r,o]=al("tab","groups"),[u,c]=al("type",""),[d,x]=al("session",""),[g,v]=E.useState(0),p=g*Qn,m=u?`&type=${encodeURIComponent(u)}`:"",{data:j,loading:y}=Be("/api/errors/groups"),{data:C,loading:O}=Be(`/api/errors/recent?limit=${Qn}&offset=${p}${m}`),{data:G,loading:w}=Be("/api/errors/sessions?limit=50"),{data:R,loading:Q}=Be("/api/errors/timeline?bucket=60");if(y||O||w||Q)return n.jsx(Nt,{});const H=C?.total||0,V=C?.errors||[],K=j?.length||0,F=j?.reduce((he,ot)=>he+ot.sessions,0)||0,$=j?.[0]?.type||"-",Y=d?G?.find(he=>he.sessionId===d):null,I=u?(G||[]).filter(he=>he.errors.some(ot=>ot.type===u)):G||[],X=Math.ceil(H/Qn),Ce=he=>{c(he),o("errors"),x(""),v(0)},Ve=he=>{o(he),x(""),he!=="errors"&&v(0)},qe=()=>{c(""),v(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:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ne,{title:"Total Errors",value:H,color:"rose"}),n.jsx(ne,{title:"Error Types",value:K,color:"amber"}),n.jsx(ne,{title:"Affected Sessions",value:F,color:"indigo"}),n.jsx(ne,{title:"Most Common",value:$,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(he=>n.jsx("button",{onClick:()=>Ve(he),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===he?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:he==="groups"?"Error Groups":he==="errors"?"All Errors":he==="timeline"?"Timeline":"Sessions"},he))}),u&&n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(me,{label:`type: ${u.replace(/_/g," ")}`,variant:"info"}),n.jsx("button",{onClick:qe,className:"text-xs text-gray-500 hover:text-gray-300 transition-colors",children:"clear"})]})]}),d&&Y&&n.jsx(cp,{session:Y,onClose:()=>x("")}),!d&&r==="groups"&&n.jsx(np,{groups:j||[],onGroupClick:Ce}),!d&&r==="errors"&&n.jsx(sp,{errors:V,total:H,page:g,totalPages:X,onPageChange:v,onSessionClick:he=>{x(he)}}),!d&&r==="timeline"&&n.jsx(ip,{buckets:R||[],errors:V,onSessionClick:he=>x(he)}),!d&&r==="sessions"&&n.jsx(rp,{sessions:I,onSelect:he=>x(he)}),H===0&&!d&&n.jsx(uu,{title:"No errors detected",description:"Claude Code session logs are clean"})]})}function np({groups:r,onGroupClick:o}){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(me,{label:u.type.replace(/_/g," "),variant:cm[u.type]||"default"})}),n.jsx("td",{className:"px-4 py-2 text-right",children:n.jsx("button",{onClick:()=>o(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-500",children:Kn(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 sp({errors:r,total:o,page:u,totalPages:c,onPageChange:d,onSessionClick:x}){const[g,v]=E.useState(new Set),p=E.useCallback(y=>{v(C=>{const O=new Set(C);return O.has(y)?O.delete(y):O.add(y),O})},[]);if(r.length===0)return n.jsx(uu,{title:"No errors",description:"No errors match the current filter"});const m=u*Qn+1,j=Math.min(u*Qn+r.length,o);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 ",m,"–",j," of ",o]}),c>1&&n.jsx(D0,{page:u,totalPages:c,onChange:d})]}),n.jsx("div",{className:"divide-y divide-gray-800/50",children:r.map((y,C)=>{const O=g.has(C),G=y.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(me,{label:y.type.replace(/_/g," "),variant:cm[y.type]||"default"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:`text-xs text-gray-300 ${O?"whitespace-pre-wrap break-words":"truncate"} ${G?"cursor-pointer":""}`,onClick:G?()=>p(C):void 0,title:G&&!O?"Click to expand full message":void 0,children:[O?y.message:y.message.slice(0,200),!O&&G&&n.jsx("span",{className:"text-indigo-400 ml-1",children:"...more"})]}),y.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:y.context.toolName}),y.context.toolInput&&n.jsx("span",{className:"text-[10px] text-gray-500 font-mono truncate max-w-md",children:y.context.toolInput})]})]}),n.jsxs("div",{className:"flex-shrink-0 text-right",children:[n.jsx("div",{className:"text-[10px] text-gray-500",children:Kn(y.timestamp)}),n.jsx("button",{onClick:()=>x(y.sessionId),className:"text-[10px] text-indigo-400 hover:text-indigo-300 font-mono mt-0.5 transition-colors",title:"View full session",children:y.sessionId.slice(0,8)}),y.context?.messageIndex!=null&&n.jsxs("div",{className:"text-[10px] text-gray-600",children:["msg #",y.context.messageIndex]})]})]})},`${y.sessionId}-${y.timestamp}-${C}`)})}),c>1&&n.jsx("div",{className:"px-5 py-3 border-t border-gray-800 flex justify-end",children:n.jsx(D0,{page:u,totalPages:c,onChange:d})})]})}function D0({page:r,totalPages:o,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," / ",o]}),n.jsx("button",{onClick:()=>u(Math.min(o-1,r+1)),disabled:r>=o-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 ip({buckets:r,errors:o,onSessionClick:u}){const[c,d]=E.useState(null),x=Math.max(...r.map(m=>m.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"},v=c?o.filter(m=>{const j=new Date(m.timestamp).getTime();return j>=new Date(c.start).getTime()&&j<new Date(c.end).getTime()}):o,p=m=>{try{return new Date(m).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return m}};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:()=>d(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((m,j)=>{const y=m.count/x*100,C=c?.start===m.start;return n.jsx("div",{className:"flex-1 flex flex-col items-center justify-end cursor-pointer group relative",onClick:()=>d(C?null:m),title:`${p(m.start)}: ${m.count} errors`,children:n.jsx("div",{className:`w-full min-h-[2px] rounded-t transition-all ${C?"bg-indigo-400":"bg-rose-500/70 group-hover:bg-rose-400"}`,style:{height:`${Math.max(y,2)}%`}})},j)})}),n.jsxs("div",{className:"flex justify-between mt-1",children:[n.jsx("span",{className:"text-[9px] text-gray-600",children:r.length>0?p(r[0].start):""}),n.jsx("span",{className:"text-[9px] text-gray-600",children:r.length>0?p(r[r.length-1].start):""})]}),n.jsx("div",{className:"flex gap-3 mt-2",children:Object.entries(g).map(([m,j])=>n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${j}`}),n.jsx("span",{className:"text-[9px] text-gray-600",children:m.replace(/_/g," ")})]},m))})]}),c&&n.jsxs("div",{className:"text-xs text-gray-400 px-1",children:["Showing ",v.length," errors from ",p(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:[v.length===0&&n.jsx("p",{className:"text-xs text-gray-600",children:"No errors in this time range"}),v.slice(0,100).map((m,j)=>n.jsxs("div",{className:"flex items-start gap-3 py-2 px-2 hover:bg-gray-800/30 rounded cursor-pointer",onClick:()=>u(m.sessionId),children:[n.jsx("div",{className:`w-2 h-2 rounded-full mt-1.5 flex-shrink-0 ${g[m.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:m.type.replace(/_/g," ")}),m.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:m.context.toolName}),n.jsx("span",{className:"text-[10px] text-gray-600",children:Kn(m.timestamp)})]}),n.jsx("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:m.message})]})]},j))]})]})]})}function rp({sessions:r,onSelect:o}){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:()=>o(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(me,{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-500",children:Kn(u.startTime)})]},u.sessionId))})]})]})}function cp({session:r,onClose:o}){const[u,c]=E.useState(new Set),d=x=>{c(g=>{const v=new Set(g);return v.has(x)?v.delete(x):v.add(x),v})};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:o,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 v=u.has(g),p=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(me,{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-600",children:Kn(x.timestamp)})]}),n.jsxs("div",{className:`text-xs text-gray-400 ${v?"whitespace-pre-wrap break-words":""} ${p?"cursor-pointer":""}`,onClick:p?()=>d(g):void 0,children:[v?x.message:x.message.slice(0,300),!v&&p&&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]})]},g)})})]})}function Kn(r){if(!r)return"-";const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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`}const up=[{value:"all",label:"All"},{value:"command",label:"Commands"},{value:"hook",label:"Hooks"},{value:"notification",label:"Notifications"},{value:"cost",label:"Cost"}],op=[{value:"all",label:"All Levels"},{value:"error",label:"Errors"},{value:"warning",label:"Warnings"},{value:"info",label:"Info"}];function fp(){const[r,o]=al("category","all"),[u,c]=al("severity","all"),d=r||"all",x=u||"all",[g,v]=E.useState([]),[p,m]=E.useState(200),[j,y]=E.useState(null),C=new URLSearchParams;C.set("limit",String(p)),d!=="all"&&C.set("categories",d),x!=="all"&&C.set("severity",x);const{data:O,loading:G}=Be(`/api/activity/stream?${C.toString()}`),w=E.useCallback(X=>{v(Ce=>[X,...Ce].slice(0,50))},[]);if(ji({onEvent:{activity:w}}),G)return n.jsx(Nt,{});const R=[...g,...O||[]],Q=new Set,H=[];for(const X of R){const Ce=`${X.timestamp}:${X.title}`;Q.has(Ce)||(Q.add(Ce),H.push(X))}const V=H.filter(X=>!(d!=="all"&&X.category!==d||x!=="all"&&X.severity!==x)),K=H.filter(X=>X.severity==="error").length,F=H.filter(X=>X.severity==="warning").length,$=new Set(H.map(X=>X.source)),Y=X=>{y(Ce=>Ce===X?null:X)},I=()=>{m(X=>X+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(ne,{title:"Total Events",value:H.length,color:"indigo"}),n.jsx(ne,{title:"Errors",value:K,color:"rose"}),n.jsx(ne,{title:"Warnings",value:F,color:"amber"}),n.jsx(ne,{title:"Sources",value:$.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:up.map(X=>n.jsx("button",{onClick:()=>o(X.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${d===X.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:X.label},X.value))}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:op.map(X=>n.jsx("button",{onClick:()=>c(X.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${x===X.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:X.label},X.value))}),n.jsxs("span",{className:"text-xs text-gray-500 self-center",children:[V.length," events"]})]}),n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl divide-y divide-gray-800/50",children:V.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:[V.slice(0,p).map((X,Ce)=>{const Ve=`${X.timestamp}-${Ce}`,qe=j===Ve;return n.jsx(dp,{event:X,isExpanded:qe,onToggle:()=>Y(Ve)},Ve)}),V.length>=p&&n.jsx("div",{className:"p-4 text-center",children:n.jsx("button",{onClick:I,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 dp({event:r,isExpanded:o,onToggle:u}){const c=r.severity==="error"?"bg-rose-400":r.severity==="warning"?"bg-amber-400":"bg-gray-600",d={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:d[r.category]||d.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(me,{label:r.category,variant:Ni(r.severity)})]}),r.detail&&!o&&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:mp(r.timestamp)}),x&&n.jsx("svg",{className:`w-4 h-4 text-gray-600 transition-transform duration-200 ${o?"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"})})]})]}),o&&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 mp(r){if(!r)return"-";const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 xp(){const{data:r,loading:o,error:u,refetch:c}=Be("/api/config"),{activeProject:d}=Zl(),[x,g]=E.useState(new Set),[v,p]=E.useState({}),[m,j]=E.useState(!1),[y,C]=E.useState(null),[O,G]=E.useState([]);if(o)return n.jsx(Nt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});if(!r)return null;const w=$=>{g(Y=>{const I=new Set(Y);return I.has($)?I.delete($):I.add($),I})},R=Object.keys(v).length>0,Q=($,Y)=>{p(I=>({...I,[$]:Y})),G(I=>I.filter(X=>X.path!==$))},H=async()=>{if(R){j(!0),C(null),G([]);try{const $={};for(const[qe,he]of Object.entries(v))gp($,qe,he);const Y=d?`?project=${d.id}`:"",X=await(await fetch(`/api/config/validate${Y}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})).json();if(X.errors&&X.errors.length>0){G(X.errors),C("Validation failed. Fix errors before saving."),j(!1);return}const Ve=await(await fetch(`/api/config${Y}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})).json();Ve.ok?(C("Saved successfully"),p({}),G([]),c(),setTimeout(()=>C(null),3e3)):C(`Error: ${Ve.error}`)}catch($){C(`Error: ${$}`)}finally{j(!1)}}},V=()=>{p({}),C(null),G([])},K=Object.entries(r).filter(([$,Y])=>typeof Y=="object"&&Y!==null),F=Object.entries(r).filter(([$,Y])=>typeof Y!="object"||Y===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:[y&&n.jsx("span",{className:`text-xs ${y.startsWith("Error")||y.startsWith("Validation")?"text-rose-400":"text-emerald-400"}`,children:y}),R&&n.jsxs(n.Fragment,{children:[n.jsx(me,{label:`${Object.keys(v).length} changes`,variant:"warning"}),n.jsx("button",{onClick:V,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:H,disabled:m,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:m?"Saving...":"Save Changes"})]})]})]}),y&&!R&&y==="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"})]}),O.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"})]}),O.map(($,Y)=>n.jsxs("div",{className:"text-xs text-rose-300 pl-4",children:[n.jsx("span",{className:"font-mono text-rose-400",children:$.path}),": ",$.message]},Y))]}),F.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:F.map(([$,Y])=>n.jsx(om,{path:$,label:$,value:v[$]!==void 0?v[$]:Y,original:Y,onChange:I=>Q($,I),edited:v[$]!==void 0,validationError:O.find(I=>I.path===$)?.message},$))})]}),K.map(([$,Y])=>n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("button",{onClick:()=>w($),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:$}),U0(v,$)>0&&n.jsx(me,{label:`${U0(v,$)} edited`,variant:"warning"}),O.some(I=>I.path.startsWith($+"."))&&n.jsx(me,{label:"errors",variant:"error"})]}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${x.has($)?"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"})})]}),x.has($)&&n.jsx("div",{className:"px-5 py-3 border-t border-gray-800",children:n.jsx(um,{data:Y,path:$,edits:v,onChange:Q,validationErrors:O,depth:0})})]},$))]})}function um({data:r,path:o,edits:u,onChange:c,validationErrors:d,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,v])=>{const p=`${o}.${g}`;return v&&typeof v=="object"&&!Array.isArray(v)?n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-gray-400 font-mono font-medium",children:g}),n.jsx(um,{data:v,path:p,edits:u,onChange:c,validationErrors:d,depth:x+1})]},g):n.jsx(om,{path:p,label:g,value:u[p]!==void 0?u[p]:v,original:v,onChange:m=>c(p,m),edited:u[p]!==void 0,validationError:d.find(m=>m.path===p)?.message},g)})})}function om({path:r,label:o,value:u,original:c,onChange:d,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:o}),n.jsx("button",{onClick:()=>d(!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:o}),n.jsx("input",{type:"number",value:String(u??""),onChange:v=>d(v.target.value?Number(v.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(hp,{path:r,label:o,value:Array.isArray(u)?u:Array.isArray(c)?c:[],edited:x,onChange:d,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:o}),n.jsx("input",{type:"text",value:String(u??""),onChange:v=>d(v.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 hp({path:r,label:o,value:u,edited:c,onChange:d,validationError:x}){const[g,v]=E.useState(!1),[p,m]=E.useState(""),j=O=>{const G=[...u];G.splice(O,1),d(G)},y=()=>{const O=p.trim();O&&(d([...u,O]),m(""))},C=O=>{O.key==="Enter"&&(O.preventDefault(),y())};return n.jsxs("div",{className:"py-1",children:[n.jsxs("button",{onClick:()=>v(O=>!O),className:"flex items-center justify-between w-full group",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:o}),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((O,G)=>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(O)}),n.jsx("button",{onClick:()=>j(G),className:"text-[10px] text-gray-600 hover:text-rose-400 opacity-0 group-hover/item:opacity-100 transition-opacity",children:"remove"})]},G)),n.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[n.jsx("input",{type:"text",value:p,onChange:O=>m(O.target.value),onKeyDown:C,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:y,disabled:!p.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 U0(r,o){return Object.keys(r).filter(u=>u.startsWith(o+".")).length}function gp(r,o,u){const c=o.split(".");let d=r;for(let x=0;x<c.length-1;x++)(!d[c[x]]||typeof d[c[x]]!="object")&&(d[c[x]]={}),d=d[c[x]];d[c[c.length-1]]=u}function fm({lines:r,status:o,onDismiss:u}){const c=E.useRef(null);return E.useEffect(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[r]),r.length===0&&o==="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 ${o==="running"?"bg-yellow-400 animate-pulse":o==="success"?"bg-green-400":o==="error"?"bg-red-400":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-400 font-mono",children:o==="running"?"Running...":o==="success"?"Completed":o==="error"?"Failed":"Output"})]}),o!=="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((d,x)=>n.jsx("div",{children:d},x)),n.jsx("div",{ref:c})]})]})}function yp(){const{data:r,loading:o}=Be("/api/plugins/full"),{execute:u,running:c,output:d,status:x,reset:g}=ou(),[v,p]=E.useState(null);if(o)return n.jsx(Nt,{});const m=r?.plugins||[],j=r?.skills||[],y=r?.lsp,C=r?.warmup,O=r?.triggerCount||0,G=m.reduce((H,V)=>H+V.skillCount,0),w=m.reduce((H,V)=>H+V.commandCount,0),R=H=>j.filter(V=>V.plugin===H).sort((V,K)=>K.count-V.count),Q=H=>{p(V=>V===H?null:H)};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(fm,{lines:d,status:x,onDismiss:g}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[n.jsx(Ua,{label:"Plugins",value:m.length}),n.jsx(Ua,{label:"Total Skills",value:G}),n.jsx(Ua,{label:"Total Commands",value:w}),n.jsx(Ua,{label:"Trigger Keywords",value:O})]}),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"})}),m.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:m.map(H=>{const V=v===H.name,K=R(H.name);return n.jsxs("div",{children:[n.jsxs("button",{onClick:()=>Q(H.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:H.name}),n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:H.version})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(me,{label:`${H.skillCount} skills`,variant:"info"}),n.jsx(me,{label:`${H.commandCount} cmds`,variant:"default"}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${V?"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"})})]})]}),V&&n.jsx("div",{className:"px-4 pb-4 bg-gray-800/20",children:K.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"})]}),K.map(F=>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:F.name}),n.jsx("span",{className:"text-xs text-gray-400 text-right font-mono",children:F.count}),n.jsxs("span",{className:"text-xs text-right font-mono",children:[n.jsx("span",{className:"text-emerald-400",children:F.successCount}),F.failureCount>0&&n.jsxs("span",{className:"text-rose-400",children:["/",F.failureCount]})]}),n.jsx("span",{className:"text-[10px] text-gray-500 text-right",children:F.lastUsed?pp(F.lastUsed):"-"})]},F.name))]})})]},H.name)})})]}),j.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(im,{items:j.sort((H,V)=>V.count-H.count).slice(0,20).map(H=>({label:H.name,value:H.count,color:"#10b981"})),maxBars:20})]}),y&&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(me,{label:y.status,variant:y.status==="ok"?"success":"warning"}),y.checked&&n.jsxs("span",{className:"text-[10px] text-gray-600",children:["Checked: ",new Date(y.checked).toLocaleDateString()]})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-4",children:[n.jsx(Ua,{label:"Total Languages",value:y.stats.totalLanguages}),n.jsx(Ua,{label:"Checked",value:y.stats.checkedLanguages}),n.jsx(Ua,{label:"Binary Missing",value:y.stats.binaryMissing}),n.jsx(Ua,{label:"Plugin Missing",value:y.stats.pluginMissing})]}),y.missing.length>0&&n.jsxs("div",{className:"space-y-2",children:[n.jsx("h4",{className:"text-xs text-gray-500",children:"Missing Languages"}),y.missing.map((H,V)=>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(me,{label:H.type,variant:H.type==="binary"?"warning":"default"}),n.jsx("span",{className:"text-xs text-gray-300",children:H.language})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("code",{className:"text-[10px] text-gray-500",children:H.binaryInstall}),H.message&&n.jsx("span",{className:"text-[10px] text-gray-600 max-w-[200px] truncate",children:H.message})]})]},V))]})]}),C&&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:[C.elapsed?`${(C.elapsed/1e3).toFixed(1)}s`:""," |"," ",C.timestamp?new Date(C.timestamp).toLocaleString():""]})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[C.warmedUp.map(H=>n.jsx(me,{label:H,variant:"success"},H)),C.failed.map(H=>n.jsx(me,{label:H,variant:"error"},H))]}),C.warmedUp.length===0&&C.failed.length===0&&n.jsx("p",{className:"text-gray-600 text-xs",children:"No warmup data"})]})]})}function Ua({label:r,value:o}){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:o}),n.jsx("div",{className:"text-[10px] text-gray-500",children:r})]})}function pp(r){if(!r)return"-";const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 vp(){const{data:r,loading:o}=Be("/api/links"),{data:u,loading:c,refetch:d}=Be("/api/services"),{execute:x,running:g,output:v,status:p,reset:m}=ou();if(o||c)return n.jsx(Nt,{});const j=(u||[]).filter(R=>R.status==="running").length,y=(u||[]).length,C=new Map;for(const R of u||[])if(R.port>0&&R.status==="running"){const Q=C.get(R.port)||[];Q.push(R.name),C.set(R.port,Q)}const O=Array.from(C.entries()).filter(([,R])=>R.length>1),G=async R=>{await x(R),setTimeout(()=>d(),3e3)},w=async R=>{await x(R),setTimeout(()=>d(),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(fm,{lines:v,status:p,onDismiss:m}),O.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:O.map(([R,Q])=>n.jsxs("span",{className:"block",children:["Port ",R," is used by: ",Q.join(", ")]},R))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ne,{title:"Services",value:y,color:"indigo",tooltip:`${y} managed services`}),n.jsx(ne,{title:"Running",value:j,color:"emerald",tooltip:`${j} services currently active`}),n.jsx(ne,{title:"External Links",value:(r||[]).length,color:"cyan",tooltip:"Configured external links (docs, repos, etc.)"}),n.jsx(ne,{title:"Stopped",value:y-j,color:"rose",tooltip:`${y-j} 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((R,Q)=>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 ${R.status==="running"?"bg-emerald-400":"bg-gray-600"}`}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm text-gray-300",children:R.name}),n.jsx("div",{className:"text-[10px] text-gray-600",children:R.status==="running"&&R.detail?n.jsx("a",{href:R.detail,target:"_blank",rel:"noopener noreferrer",className:"text-indigo-400 hover:text-indigo-300 underline transition-colors",children:R.detail}):R.detail})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[R.status==="running"&&R.port>0&&n.jsx(me,{label:`Port ${R.port}`,variant:"info"}),R.status==="running"?n.jsx(me,{label:"Running",variant:"success"}):n.jsx(me,{label:"Stopped",variant:"default"}),R.name==="Docs Preview"&&(R.status==="running"?n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("a",{href:R.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:()=>w("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:()=>G("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"})),R.status==="running"&&R.name!=="Docs Preview"&&n.jsx("a",{href:R.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"})]})]},Q))})]}),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((R,Q)=>n.jsxs("a",{href:R.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(bp,{type:R.type}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-gray-300 group-hover:text-white transition-colors",children:R.name}),n.jsx("div",{className:"text-[10px] text-gray-600 truncate max-w-[200px]",children:R.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"})})]},Q))})]})]})}function bp({type:r}){const o={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 ${o[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 L0={critical:0,warning:1,info:2};function jp(){const[r,o]=E.useState("pending"),[u,c]=E.useState(null),{activeProject:d}=Zl(),{data:x,loading:g,error:v,refetch:p}=Be("/api/notifications");if(g)return n.jsx(Nt,{});if(v)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",v]});const m=x||[],j=m.filter(Y=>!Y.dismissedAt),y=m.filter(Y=>!!Y.dismissedAt),C=j.filter(Y=>Y.severity==="critical"),O=j.filter(Y=>Y.severity==="warning"),w=[...r==="pending"?j:r==="dismissed"?y:m].sort((Y,I)=>{const X=L0[Y.severity]??3,Ce=L0[I.severity]??3;return X!==Ce?X-Ce:new Date(I.createdAt).getTime()-new Date(Y.createdAt).getTime()}),R=async Y=>{c(Y);try{const I=d?`?project=${d.id}`:"";(await fetch(`/api/notifications/${Y}/dismiss${I}`,{method:"POST"})).ok&&p()}finally{c(null)}},Q=async()=>{c("__all__");try{const Y=d?`?project=${d.id}`:"";for(const I of j)await fetch(`/api/notifications/${I.id}/dismiss${Y}`,{method:"POST"});p()}finally{c(null)}},H=Y=>Y==="critical"?"error":Y==="warning"?"warning":"info",V=Y=>Y==="critical"?"border-l-rose-500":Y==="warning"?"border-l-amber-500":"border-l-blue-500",F=(Y=>{const I={};for(const X of Y)I[X.severity]||(I[X.severity]=[]),I[X.severity].push(X);return I})(w),$={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(ne,{title:"Pending",value:j.length,color:"indigo"}),n.jsx(ne,{title:"Critical",value:C.length,color:"rose"}),n.jsx(ne,{title:"Warnings",value:O.length,color:"amber"}),n.jsx(ne,{title:"Dismissed",value:y.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 (${j.length})`},{value:"dismissed",label:`Dismissed (${y.length})`},{value:"all",label:`All (${m.length})`}].map(Y=>n.jsx("button",{onClick:()=>o(Y.value),className:`px-3 py-1.5 text-xs rounded-md transition-colors ${r===Y.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:Y.label},Y.value))}),j.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"})]}),w.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(Y=>{const I=F[Y];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:$[Y]||Y}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:["(",I.length,")"]})]}),n.jsx("div",{className:"space-y-2",children:I.map(X=>n.jsxs("div",{className:`bg-gray-900/50 border border-gray-800 border-l-4 ${V(X.severity)} rounded-xl p-4 flex items-start gap-4 ${X.dismissedAt?"opacity-60":""}`,children:[n.jsx(Np,{severity:X.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:X.title}),n.jsx(me,{label:X.severity,variant:H(X.severity)}),X.type&&n.jsx(me,{label:X.type,variant:"default"})]}),X.message&&n.jsx("p",{className:"text-xs text-gray-400 mb-2",children:X.message}),n.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-gray-600",children:[n.jsx("span",{children:new Date(X.createdAt).toLocaleString()}),X.source&&n.jsxs("span",{children:["via ",X.source]}),X.dismissedAt&&n.jsxs("span",{children:["Dismissed ",new Date(X.dismissedAt).toLocaleString()]})]})]}),!X.dismissedAt&&n.jsx("button",{onClick:()=>R(X.id),disabled:u===X.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===X.id?"...":"Dismiss"})]},X.id))})]},Y)})})]})}function Np({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 Sp(r){if(!r)return null;if(r.startsWith("https://"))return r.replace(/\.git$/,"");const o=r.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(o)return`https://${o[1]}/${o[2]}`;const u=r.match(/^ssh:\/\/git@([^/]+)\/(.+?)(?:\.git)?$/);return u?`https://${u[1]}/${u[2]}`:null}function Ep(){const{data:r,loading:o,error:u}=Be("/api/repos");if(o)return n.jsx(Nt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});const c=r||[],d=[...new Set(c.map(v=>v.org))],x=c.filter(v=>v.hasSpecweave).length,g=c.find(v=>v.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(ne,{title:"Repositories",value:c.length,color:"indigo"}),n.jsx(ne,{title:"Organizations",value:d.length,color:"cyan"}),n.jsx(ne,{title:"With SpecWeave",value:x,color:"emerald"}),n.jsx(ne,{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:d.map(v=>{const p=c.filter(m=>m.org===v);return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(Tp,{}),n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:v}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[p.length," ",p.length===1?"repo":"repos"]})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:p.map(m=>{const j=Sp(m.remote);return n.jsxs("div",{className:`bg-gray-900/50 border rounded-xl p-4 ${m.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(Cp,{}),n.jsx("span",{className:"text-sm font-medium text-gray-300",children:m.name})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[m.isCurrent&&n.jsx(me,{label:"Current Project",variant:"info"}),n.jsx(me,{label:m.hasSpecweave?"SpecWeave":"No SpecWeave",variant:m.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:m.org})]}),m.branch&&n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-[10px] text-gray-500",children:"Branch"}),n.jsx(me,{label:m.branch,variant:"default"})]}),j&&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:j,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-indigo-400 hover:text-indigo-300 hover:underline truncate max-w-[180px]",title:j,children:j.replace("https://","")})]}),!j&&m.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:m.remote,children:m.remote})]}),m.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:m.path,children:m.path.split("/").slice(-3).join("/")})]}),m.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:Mp(m.lastModified)})]})]}),j&&n.jsxs("a",{href:j,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(Ap,{}),"Open on GitHub"]})]},m.path||`${m.org}/${m.name}`)})})]},v)})})]})}function Tp(){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 Cp(){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 Ap(){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 Mp(r){if(!r)return"-";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 zp(){const{id:r}=Ag(),{data:o,loading:u,error:c}=Be(`/api/increments/${r||"_none"}`);if(!r)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"No increment ID specified"});if(u)return n.jsx(Nt,{});if(c)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",c]});if(!o)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"Increment not found"});const d=o.taskSummary.total>0?Math.round(o.taskSummary.completed/o.taskSummary.total*100):0,x=o.acSummary.total>0?Math.round(o.acSummary.completed/o.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:o.dirName}),n.jsx(me,{label:o.metadata.status||"unknown",variant:Ni(o.metadata.status||"")}),o.metadata.type&&n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:o.metadata.type}),o.metadata.priority&&n.jsx(Rp,{priority:o.metadata.priority})]}),n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:o.metadata.title||o.id}),o.metadata.project&&n.jsxs("span",{className:"text-xs text-gray-500",children:["Project: ",o.metadata.project]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ne,{title:"Tasks",value:`${o.taskSummary.completed}/${o.taskSummary.total}`,color:"indigo"}),n.jsx(ne,{title:"Task Progress",value:`${d}%`,color:"cyan"}),n.jsx(ne,{title:"ACs",value:`${o.acSummary.completed}/${o.acSummary.total}`,color:"emerald"}),n.jsx(ne,{title:"AC Progress",value:`${x}%`,color:"amber"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5 space-y-4",children:[n.jsx(H0,{label:"Tasks",completed:o.taskSummary.completed,total:o.taskSummary.total,color:"indigo"}),n.jsx(H0,{label:"Acceptance Criteria",completed:o.acSummary.completed,total:o.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 (",o.tasks.length,")"]})}),o.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:o.tasks.map(g=>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 ${g.status==="completed"?"bg-indigo-500/20 border-indigo-500 text-indigo-400":"border-gray-600"}`,children:g.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:g.id}),n.jsx("span",{className:`text-sm ${g.status==="completed"?"text-gray-500 line-through":"text-gray-300"}`,children:g.title})]}),(g.userStory||g.acs)&&n.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[g.userStory&&n.jsx("span",{className:"text-[10px] text-indigo-400",children:g.userStory}),g.acs?.map(v=>n.jsx("span",{className:"text-[10px] text-emerald-500",children:v},v))]})]})]},g.id))})]}),o.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 (",o.acs.length,")"]})}),n.jsx("div",{className:"divide-y divide-gray-800/50",children:o.acs.map(g=>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 ${g.completed?"bg-emerald-500/20 border-emerald-500 text-emerald-400":"border-gray-600"}`,children:g.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:g.id}),n.jsx("span",{className:`text-sm ml-2 ${g.completed?"text-gray-500 line-through":"text-gray-300"}`,children:g.text})]})]},g.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(o.metadata).filter(([g])=>!["title"].includes(g)).map(([g,v])=>n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:g}),n.jsx("span",{className:"text-xs text-gray-400",children:typeof v=="object"?JSON.stringify(v):String(v??"")})]},g))})]})]})}function H0({label:r,completed:o,total:u,color:c}){const d=u>0?Math.round(o/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:[o,"/",u," (",d,"%)"]})]}),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:`${d}%`}})})]})}function Rp({priority:r}){const o={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 ${o[r]||o.P2}`,children:r})}function _p(){const r=Ny();return n.jsx(nm.Provider,{value:r,children:n.jsxs("div",{className:"flex min-h-screen bg-gray-950 text-gray-100",children:[n.jsx(Ty,{}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[n.jsx(Cy,{}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsxs(Xg,{children:[n.jsx(at,{path:"/",element:n.jsx(Hy,{})}),n.jsx(at,{path:"/increments",element:n.jsx(qy,{})}),n.jsx(at,{path:"/increments/:id",element:n.jsx(zp,{})}),n.jsx(at,{path:"/analytics",element:n.jsx(Xy,{})}),n.jsx(at,{path:"/costs",element:n.jsx(Ky,{})}),n.jsx(at,{path:"/sync",element:n.jsx(tp,{})}),n.jsx(at,{path:"/errors",element:n.jsx(lp,{})}),n.jsx(at,{path:"/activity",element:n.jsx(fp,{})}),n.jsx(at,{path:"/config",element:n.jsx(xp,{})}),n.jsx(at,{path:"/plugins",element:n.jsx(yp,{})}),n.jsx(at,{path:"/services",element:n.jsx(vp,{})}),n.jsx(at,{path:"/notifications",element:n.jsx(jp,{})}),n.jsx(at,{path:"/repos",element:n.jsx(Ep,{})}),n.jsx(at,{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."})]})})]})})]})]})})}Vh.createRoot(document.getElementById("root")).render(n.jsx(E.StrictMode,{children:n.jsx(my,{children:n.jsx(_p,{})})}));
|
|
11
|
+
Please change the parent <Route path="${H}"> to <Route path="${H==="/"?"*":`${H}/*`}">.`)}let C=La(),O;if(o){let H=typeof o=="string"?Ql(o):o;we(j==="/"||H.pathname?.startsWith(j),`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 "${j}" but pathname "${H.pathname}" was given in the \`location\` prop.`),O=H}else O=C;let G=O.pathname||"/",w=G;if(j!=="/"){let H=j.replace(/^\//,"").split("/");w="/"+G.replace(/^\//,"").split("/").slice(H.length).join("/")}let R=B0(r,{pathname:w});Bt(y||R!=null,`No routes matched location "${O.pathname}${O.search}${O.hash}" `),Bt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${O.pathname}${O.search}${O.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 Q=Og(R&&R.map(H=>Object.assign({},H,{params:Object.assign({},p,H.params),pathname:ca([j,x.encodeLocation?x.encodeLocation(H.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathname]),pathnameBase:H.pathnameBase==="/"?j:ca([j,x.encodeLocation?x.encodeLocation(H.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathnameBase])})),g,u,c,d);return o&&Q?E.createElement(Zn.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...O},navigationType:"POP"}},Q):Q}function zg(){let r=Bg(),o=hg(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)",d={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=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:x},"ErrorBoundary")," or"," ",E.createElement("code",{style:x},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},o),u?E.createElement("pre",{style:d},u):null,g)}var Rg=E.createElement(zg,null),F0=class extends E.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,o){return o.location!==r.location||o.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:o.error,location:o.location,revalidation:r.revalidation||o.revalidation}}componentDidCatch(r,o){this.props.onError?this.props.onError(r,o):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=Eg(r.digest);u&&(r=u)}let o=r!==void 0?E.createElement(Qt.Provider,{value:this.props.routeContext},E.createElement(au.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?E.createElement(_g,{error:r},o):o}};F0.contextType=pg;var Kc=new WeakMap;function _g({children:r,error:o}){let{basename:u}=E.useContext(wt);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let c=Sg(o.digest);if(c){let d=Kc.get(o);if(d)throw d;let x=V0(c.location,u);if(Q0&&!Kc.get(o))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 Kc.set(o,g),g}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return r}function wg({routeContext:r,match:o,children:u}){let c=E.useContext(Vl);return c&&c.static&&c.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=o.route.id),E.createElement(Qt.Provider,{value:r},u)}function Og(r,o=[],u=null,c=null,d=null){if(r==null){if(!u)return null;if(u.errors)r=u.matches;else if(o.length===0&&!u.initialized&&u.matches.length>0)r=u.matches;else return null}let x=r,g=u?.errors;if(g!=null){let j=x.findIndex(y=>y.route.id&&g?.[y.route.id]!==void 0);we(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(g).join(",")}`),x=x.slice(0,Math.min(x.length,j+1))}let v=!1,p=-1;if(u)for(let j=0;j<x.length;j++){let y=x[j];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(p=j),y.route.id){let{loaderData:C,errors:O}=u,G=y.route.loader&&!C.hasOwnProperty(y.route.id)&&(!O||O[y.route.id]===void 0);if(y.route.lazy||G){v=!0,p>=0?x=x.slice(0,p+1):x=[x[0]];break}}}let m=u&&c?(j,y)=>{c(j,{location:u.location,params:u.matches?.[0]?.params??{},unstable_pattern:gg(u.matches),errorInfo:y})}:void 0;return x.reduceRight((j,y,C)=>{let O,G=!1,w=null,R=null;u&&(O=g&&y.route.id?g[y.route.id]:void 0,w=y.route.errorElement||Rg,v&&(p<0&&C===0?(P0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),G=!0,R=null):p===C&&(G=!0,R=y.route.hydrateFallbackElement||null)));let Q=o.concat(x.slice(0,C+1)),H=()=>{let V;return O?V=w:G?V=R:y.route.Component?V=E.createElement(y.route.Component,null):y.route.element?V=y.route.element:V=j,E.createElement(wg,{match:y,routeContext:{outlet:j,matches:Q,isDataRoute:u!=null},children:V})};return u&&(y.route.ErrorBoundary||y.route.errorElement||C===0)?E.createElement(F0,{location:u.location,revalidation:u.revalidation,component:w,error:O,children:H(),routeContext:{outlet:null,matches:Q,isDataRoute:!0},onError:m}):H()},null)}function nu(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dg(r){let o=E.useContext(Vl);return we(o,nu(r)),o}function Ug(r){let o=E.useContext(bi);return we(o,nu(r)),o}function Lg(r){let o=E.useContext(Qt);return we(o,nu(r)),o}function su(r){let o=Lg(r),u=o.matches[o.matches.length-1];return we(u.route.id,`${r} can only be used on routes that contain a unique "id"`),u.route.id}function Hg(){return su("useRouteId")}function Bg(){let r=E.useContext(au),o=Ug("useRouteError"),u=su("useRouteError");return r!==void 0?r:o.errors?.[u]}function qg(){let{router:r}=Dg("useNavigate"),o=su("useNavigate"),u=E.useRef(!1);return J0(()=>{u.current=!0}),E.useCallback(async(d,x={})=>{Bt(u.current,K0),u.current&&(typeof d=="number"?await r.navigate(d):await r.navigate(d,{fromRouteId:o,...x}))},[r,o])}var M0={};function P0(r,o,u){!o&&!M0[r]&&(M0[r]=!0,Bt(!1,u))}E.memo(Yg);function Yg({routes:r,future:o,state:u,onError:c}){return W0(r,void 0,u,c,o)}function at(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 Gg({basename:r="/",children:o=null,location:u,navigationType:c="POP",navigator:d,static:x=!1,unstable_useTransitions:g}){we(!$n(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=r.replace(/^\/*/,"/"),p=E.useMemo(()=>({basename:v,navigator:d,static:x,unstable_useTransitions:g,future:{}}),[v,d,x,g]);typeof u=="string"&&(u=Ql(u));let{pathname:m="/",search:j="",hash:y="",state:C=null,key:O="default"}=u,G=E.useMemo(()=>{let w=ua(m,v);return w==null?null:{location:{pathname:w,search:j,hash:y,state:C,key:O},navigationType:c}},[v,m,j,y,C,O,c]);return Bt(G!=null,`<Router basename="${v}"> is not able to match the URL "${m}${j}${y}" because it does not start with the basename, so the <Router> won't render anything.`),G==null?null:E.createElement(wt.Provider,{value:p},E.createElement(Zn.Provider,{children:o,value:G}))}function Xg({children:r,location:o}){return Mg(Ic(r),o)}function Ic(r,o=[]){let u=[];return E.Children.forEach(r,(c,d)=>{if(!E.isValidElement(c))return;let x=[...o,d];if(c.type===E.Fragment){u.push.apply(u,Ic(c.props.children,x));return}we(c.type===at,`[${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=Ic(c.props.children,x)),u.push(g)}),u}var yi="get",pi="application/x-www-form-urlencoded";function ji(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function Qg(r){return ji(r)&&r.tagName.toLowerCase()==="button"}function Vg(r){return ji(r)&&r.tagName.toLowerCase()==="form"}function Zg(r){return ji(r)&&r.tagName.toLowerCase()==="input"}function $g(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function kg(r,o){return r.button===0&&(!o||o==="_self")&&!$g(r)}function eu(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((o,u)=>{let c=r[u];return o.concat(Array.isArray(c)?c.map(d=>[u,d]):[[u,c]])},[]))}function Kg(r,o){let u=eu(r);return o&&o.forEach((c,d)=>{u.has(d)||o.getAll(d).forEach(x=>{u.append(d,x)})}),u}var xi=null;function Jg(){if(xi===null)try{new FormData(document.createElement("form"),0),xi=!1}catch{xi=!0}return xi}var Wg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jc(r){return r!=null&&!Wg.has(r)?(Bt(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${pi}"`),null):r}function Fg(r,o){let u,c,d,x,g;if(Vg(r)){let v=r.getAttribute("action");c=v?ua(v,o):null,u=r.getAttribute("method")||yi,d=Jc(r.getAttribute("enctype"))||pi,x=new FormData(r)}else if(Qg(r)||Zg(r)&&(r.type==="submit"||r.type==="image")){let v=r.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=r.getAttribute("formaction")||v.getAttribute("action");if(c=p?ua(p,o):null,u=r.getAttribute("formmethod")||v.getAttribute("method")||yi,d=Jc(r.getAttribute("formenctype"))||Jc(v.getAttribute("enctype"))||pi,x=new FormData(v,r),!Jg()){let{name:m,type:j,value:y}=r;if(j==="image"){let C=m?`${m}.`:"";x.append(`${C}x`,"0"),x.append(`${C}y`,"0")}else m&&x.append(m,y)}}else{if(ji(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');u=yi,c=null,d=pi,g=r}return x&&d==="text/plain"&&(g=x,x=void 0),{action:c,method:u.toLowerCase(),encType:d,formData:x,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function iu(r,o){if(r===!1||r===null||typeof r>"u")throw new Error(o)}function Pg(r,o,u,c){let d=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return u?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${c}`:d.pathname=`${d.pathname}.${c}`:d.pathname==="/"?d.pathname=`_root.${c}`:o&&ua(d.pathname,o)==="/"?d.pathname=`${o.replace(/\/$/,"")}/_root.${c}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${c}`,d}async function Ig(r,o){if(r.id in o)return o[r.id];try{let u=await import(r.module);return o[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 ey(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 ty(r,o,u){let c=await Promise.all(r.map(async d=>{let x=o.routes[d.route.id];if(x){let g=await Ig(x,u);return g.links?g.links():[]}return[]}));return sy(c.flat(1).filter(ey).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function z0(r,o,u,c,d,x){let g=(p,m)=>u[m]?p.route.id!==u[m].route.id:!0,v=(p,m)=>u[m].pathname!==p.pathname||u[m].route.path?.endsWith("*")&&u[m].params["*"]!==p.params["*"];return x==="assets"?o.filter((p,m)=>g(p,m)||v(p,m)):x==="data"?o.filter((p,m)=>{let j=c.routes[p.route.id];if(!j||!j.hasLoader)return!1;if(g(p,m)||v(p,m))return!0;if(p.route.shouldRevalidate){let y=p.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:u[0]?.params||{},nextUrl:new URL(r,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function ay(r,o,{includeHydrateFallback:u}={}){return ly(r.map(c=>{let d=o.routes[c.route.id];if(!d)return[];let x=[d.module];return d.clientActionModule&&(x=x.concat(d.clientActionModule)),d.clientLoaderModule&&(x=x.concat(d.clientLoaderModule)),u&&d.hydrateFallbackModule&&(x=x.concat(d.hydrateFallbackModule)),d.imports&&(x=x.concat(d.imports)),x}).flat(1))}function ly(r){return[...new Set(r)]}function ny(r){let o={},u=Object.keys(r).sort();for(let c of u)o[c]=r[c];return o}function sy(r,o){let u=new Set;return new Set(o),r.reduce((c,d)=>{let x=JSON.stringify(ny(d));return u.has(x)||(u.add(x),c.push({key:x,link:d})),c},[])}function I0(){let r=E.useContext(Vl);return iu(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function iy(){let r=E.useContext(bi);return iu(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var ru=E.createContext(void 0);ru.displayName="FrameworkContext";function em(){let r=E.useContext(ru);return iu(r,"You must render this element inside a <HydratedRouter> element"),r}function ry(r,o){let u=E.useContext(ru),[c,d]=E.useState(!1),[x,g]=E.useState(!1),{onFocus:v,onBlur:p,onMouseEnter:m,onMouseLeave:j,onTouchStart:y}=o,C=E.useRef(null);E.useEffect(()=>{if(r==="render"&&g(!0),r==="viewport"){let w=Q=>{Q.forEach(H=>{g(H.isIntersecting)})},R=new IntersectionObserver(w,{threshold:.5});return C.current&&R.observe(C.current),()=>{R.disconnect()}}},[r]),E.useEffect(()=>{if(c){let w=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(w)}}},[c]);let O=()=>{d(!0)},G=()=>{d(!1),g(!1)};return u?r!=="intent"?[x,C,{}]:[x,C,{onFocus:Xn(v,O),onBlur:Xn(p,G),onMouseEnter:Xn(m,O),onMouseLeave:Xn(j,G),onTouchStart:Xn(y,O)}]:[!1,C,{}]}function Xn(r,o){return u=>{r&&r(u),u.defaultPrevented||o(u)}}function cy({page:r,...o}){let{router:u}=I0(),c=E.useMemo(()=>B0(u.routes,r,u.basename),[u.routes,r,u.basename]);return c?E.createElement(oy,{page:r,matches:c,...o}):null}function uy(r){let{manifest:o,routeModules:u}=em(),[c,d]=E.useState([]);return E.useEffect(()=>{let x=!1;return ty(r,o,u).then(g=>{x||d(g)}),()=>{x=!0}},[r,o,u]),c}function oy({page:r,matches:o,...u}){let c=La(),{future:d,manifest:x,routeModules:g}=em(),{basename:v}=I0(),{loaderData:p,matches:m}=iy(),j=E.useMemo(()=>z0(r,o,m,x,c,"data"),[r,o,m,x,c]),y=E.useMemo(()=>z0(r,o,m,x,c,"assets"),[r,o,m,x,c]),C=E.useMemo(()=>{if(r===c.pathname+c.search+c.hash)return[];let w=new Set,R=!1;if(o.forEach(H=>{let V=x.routes[H.route.id];!V||!V.hasLoader||(!j.some(K=>K.route.id===H.route.id)&&H.route.id in p&&g[H.route.id]?.shouldRevalidate||V.hasClientLoader?R=!0:w.add(H.route.id))}),w.size===0)return[];let Q=Pg(r,v,d.unstable_trailingSlashAwareDataRequests,"data");return R&&w.size>0&&Q.searchParams.set("_routes",o.filter(H=>w.has(H.route.id)).map(H=>H.route.id).join(",")),[Q.pathname+Q.search]},[v,d.unstable_trailingSlashAwareDataRequests,p,c,x,j,o,r,g]),O=E.useMemo(()=>ay(y,x),[y,x]),G=uy(y);return E.createElement(E.Fragment,null,C.map(w=>E.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...u})),O.map(w=>E.createElement("link",{key:w,rel:"modulepreload",href:w,...u})),G.map(({key:w,link:R})=>E.createElement("link",{key:w,nonce:u.nonce,...R,crossOrigin:R.crossOrigin??u.crossOrigin})))}function fy(...r){return o=>{r.forEach(u=>{typeof u=="function"?u(o):u!=null&&(u.current=o)})}}var dy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{dy&&(window.__reactRouterVersion="7.13.0")}catch{}function my({basename:r,children:o,unstable_useTransitions:u,window:c}){let d=E.useRef();d.current==null&&(d.current=Zh({window:c,v5Compat:!0}));let x=d.current,[g,v]=E.useState({action:x.action,location:x.location}),p=E.useCallback(m=>{u===!1?v(m):E.startTransition(()=>v(m))},[u]);return E.useLayoutEffect(()=>x.listen(p),[x,p]),E.createElement(Gg,{basename:r,children:o,location:g.location,navigationType:g.action,navigator:x,unstable_useTransitions:u})}var tm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ot=E.forwardRef(function({onClick:o,discover:u="render",prefetch:c="none",relative:d,reloadDocument:x,replace:g,state:v,target:p,to:m,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:C,...O},G){let{basename:w,unstable_useTransitions:R}=E.useContext(wt),Q=typeof m=="string"&&tm.test(m),H=V0(m,w);m=H.to;let V=Tg(m,{relative:d}),[K,W,$]=ry(c,O),Y=gy(m,{replace:g,state:v,target:p,preventScrollReset:j,relative:d,viewTransition:y,unstable_defaultShouldRevalidate:C,unstable_useTransitions:R});function I(Ce){o&&o(Ce),Ce.defaultPrevented||Y(Ce)}let X=E.createElement("a",{...O,...$,href:H.absoluteURL||V,onClick:H.isExternal||x?o:I,ref:fy(G,W),target:p,"data-discover":!Q&&u==="render"?"true":void 0});return K&&!Q?E.createElement(E.Fragment,null,X,E.createElement(cy,{page:V})):X});ot.displayName="Link";var am=E.forwardRef(function({"aria-current":o="page",caseSensitive:u=!1,className:c="",end:d=!1,style:x,to:g,viewTransition:v,children:p,...m},j){let y=kn(g,{relative:m.relative}),C=La(),O=E.useContext(bi),{navigator:G,basename:w}=E.useContext(wt),R=O!=null&&jy(y)&&v===!0,Q=G.encodeLocation?G.encodeLocation(y).pathname:y.pathname,H=C.pathname,V=O&&O.navigation&&O.navigation.location?O.navigation.location.pathname:null;u||(H=H.toLowerCase(),V=V?V.toLowerCase():null,Q=Q.toLowerCase()),V&&w&&(V=ua(V,w)||V);const K=Q!=="/"&&Q.endsWith("/")?Q.length-1:Q.length;let W=H===Q||!d&&H.startsWith(Q)&&H.charAt(K)==="/",$=V!=null&&(V===Q||!d&&V.startsWith(Q)&&V.charAt(Q.length)==="/"),Y={isActive:W,isPending:$,isTransitioning:R},I=W?o:void 0,X;typeof c=="function"?X=c(Y):X=[c,W?"active":null,$?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let Ce=typeof x=="function"?x(Y):x;return E.createElement(ot,{...m,"aria-current":I,className:X,ref:j,style:Ce,to:g,viewTransition:v},typeof p=="function"?p(Y):p)});am.displayName="NavLink";var xy=E.forwardRef(({discover:r="render",fetcherKey:o,navigate:u,reloadDocument:c,replace:d,state:x,method:g=yi,action:v,onSubmit:p,relative:m,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:C,...O},G)=>{let{unstable_useTransitions:w}=E.useContext(wt),R=vy(),Q=by(v,{relative:m}),H=g.toLowerCase()==="get"?"get":"post",V=typeof v=="string"&&tm.test(v),K=W=>{if(p&&p(W),W.defaultPrevented)return;W.preventDefault();let $=W.nativeEvent.submitter,Y=$?.getAttribute("formmethod")||g,I=()=>R($||W.currentTarget,{fetcherKey:o,method:Y,navigate:u,replace:d,state:x,relative:m,preventScrollReset:j,viewTransition:y,unstable_defaultShouldRevalidate:C});w&&u!==!1?E.startTransition(()=>I()):I()};return E.createElement("form",{ref:G,method:H,action:Q,onSubmit:c?p:K,...O,"data-discover":!V&&r==="render"?"true":void 0})});xy.displayName="Form";function hy(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lm(r){let o=E.useContext(Vl);return we(o,hy(r)),o}function gy(r,{target:o,replace:u,state:c,preventScrollReset:d,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:v,unstable_useTransitions:p}={}){let m=lu(),j=La(),y=kn(r,{relative:x});return E.useCallback(C=>{if(kg(C,o)){C.preventDefault();let O=u!==void 0?u:Vn(j)===Vn(y),G=()=>m(r,{replace:O,state:c,preventScrollReset:d,relative:x,viewTransition:g,unstable_defaultShouldRevalidate:v});p?E.startTransition(()=>G()):G()}},[j,m,y,u,c,o,r,d,x,g,v,p])}function cu(r){Bt(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 o=E.useRef(eu(r)),u=E.useRef(!1),c=La(),d=E.useMemo(()=>Kg(c.search,u.current?null:o.current),[c.search]),x=lu(),g=E.useCallback((v,p)=>{const m=eu(typeof v=="function"?v(new URLSearchParams(d)):v);u.current=!0,x("?"+m,p)},[x,d]);return[d,g]}var yy=0,py=()=>`__${String(++yy)}__`;function vy(){let{router:r}=lm("useSubmit"),{basename:o}=E.useContext(wt),u=Hg(),c=r.fetch,d=r.navigate;return E.useCallback(async(x,g={})=>{let{action:v,method:p,encType:m,formData:j,body:y}=Fg(x,o);if(g.navigate===!1){let C=g.fetcherKey||py();await c(C,u,g.action||v,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:j,body:y,formMethod:g.method||p,formEncType:g.encType||m,flushSync:g.flushSync})}else await d(g.action||v,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:j,body:y,formMethod:g.method||p,formEncType:g.encType||m,replace:g.replace,state:g.state,fromRouteId:u,flushSync:g.flushSync,viewTransition:g.viewTransition})},[c,d,o,u])}function by(r,{relative:o}={}){let{basename:u}=E.useContext(wt),c=E.useContext(Qt);we(c,"useFormAction must be used inside a RouteContext");let[d]=c.matches.slice(-1),x={...kn(r||".",{relative:o})},g=La();if(r==null){x.search=g.search;let v=new URLSearchParams(x.search),p=v.getAll("index");if(p.some(j=>j==="")){v.delete("index"),p.filter(y=>y).forEach(y=>v.append("index",y));let j=v.toString();x.search=j?`?${j}`:""}}return(!r||r===".")&&d.route.index&&(x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index"),u!=="/"&&(x.pathname=x.pathname==="/"?u:ca([u,x.pathname])),Vn(x)}function jy(r,{relative:o}={}){let u=E.useContext($0);we(u!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=lm("useViewTransitionState"),d=kn(r,{relative:o});if(!u.isTransitioning)return!1;let x=ua(u.currentLocation.pathname,c)||u.currentLocation.pathname,g=ua(u.nextLocation.pathname,c)||u.nextLocation.pathname;return vi(d.pathname,g)!=null||vi(d.pathname,x)!=null}const nm=E.createContext({projects:[],activeProject:null,setActiveProject:()=>{},refreshProjects:()=>{}});function Zl(){return E.useContext(nm)}function Ny(){const[r,o]=E.useState([]),[u,c]=cu(),d=E.useCallback(async()=>{try{const m=await(await fetch("/api/projects")).json();m.ok&&o(m.data||[])}catch{}},[]);E.useEffect(()=>{d()},[d]);const x=u.get("project"),g=x?r.find(p=>p.id===x)||r[0]||null:r[0]||null,v=E.useCallback(p=>{c(m=>(m.set("project",p),m))},[c]);return{projects:r,activeProject:g,setActiveProject:v,refreshProjects:d}}function sm(r){const[o,u]=E.useState(null),[c,d]=E.useState(!0),[x,g]=E.useState(null),[v,p]=E.useState(0),[m,j]=E.useState(null),y=E.useCallback(()=>p(C=>C+1),[]);return E.useEffect(()=>{let C=!1;return d(!0),fetch(r).then(O=>{if(!O.ok)throw new Error(`HTTP ${O.status}`);return O.json()}).then(O=>{C||(u(O.data??O),g(null),j(new Date))}).catch(O=>{C||g(String(O.message||O))}).finally(()=>{C||d(!1)}),()=>{C=!0}},[r,v]),{data:o,loading:c,error:x,refetch:y,fetchedAt:m}}function Ue(r){const{activeProject:o}=Zl(),u=r.includes("?")?"&":"?",c=o?`${r}${u}project=${o.id}`:r;return sm(c)}function Kn(r){const{url:o="/api/events"}=r,u=E.useRef(null),c=E.useRef(null),d=E.useRef(r);d.current=r;const[x,g]=E.useState("connecting"),v=E.useCallback(()=>{u.current&&u.current.close(),g("connecting");const p=new EventSource(o);u.current=p;const m=["heartbeat","increment-update","analytics-event","cost-update","notification","sync-update","sync-audit","error-detected","config-changed","activity","command-output","command-complete","job-progress"];for(const j of m)p.addEventListener(j,y=>{try{const C=JSON.parse(y.data);d.current.onEvent?.[j]?.(C),d.current.onAnyEvent?.(j,C)}catch{}});p.onopen=()=>{g("connected")},p.onerror=()=>{p.close(),g("disconnected"),c.current=setTimeout(()=>{u.current===p&&v()},3e3)}},[o]);return E.useEffect(()=>(v(),()=>{c.current&&(clearTimeout(c.current),c.current=null),u.current?.close(),u.current=null}),[v]),{status:x}}const Sy=[{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 Ey({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 Ty(){const{projects:r,activeProject:o,setActiveProject:u}=Zl(),[c]=cu(),{data:d}=Ue("/api/overview"),[x,g]=E.useState(null),v=E.useCallback(C=>{const O=C;O?.pendingCount!=null&&g(O.pendingCount)},[]),{status:p}=Kn({onEvent:{notification:v}}),m=x??d?.notifications?.pendingCount??0,j=c.get("project"),y=C=>j?`${C}?project=${j}`:C;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>1?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.jsx("select",{value:o?.id||"",onChange:C=>u(C.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(C=>n.jsx("option",{value:C.id,children:C.name},C.id))})]}):r.length===1?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.jsx("div",{className:"text-gray-300 text-xs px-2 py-1.5 truncate",title:r[0].path,children:r[0].name})]}):j?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.jsx("div",{className:"text-gray-500 text-xs px-2 py-1.5 truncate",children:decodeURIComponent(j).split(/[-/]/).pop()||"Loading..."})]}):null,n.jsx("nav",{className:"flex-1 overflow-y-auto py-3 px-2",children:Sy.map(C=>n.jsxs(am,{to:y(C.path),end:C.path==="/",className:({isActive:O})=>`flex items-center gap-3 px-3 py-2 rounded-lg text-sm mb-0.5 transition-colors ${O?"bg-indigo-500/10 text-indigo-400":"text-gray-400 hover:bg-gray-800 hover:text-gray-200"}`,children:[n.jsx(Ey,{d:C.icon}),n.jsx("span",{className:"flex-1",children:C.label}),C.badge&&m>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:m>99?"99+":m})]},C.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 ${p==="connected"?"bg-emerald-400 pulse-dot":p==="connecting"?"bg-amber-400 pulse-dot":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-500",children:p==="connected"?"Connected":p==="connecting"?"Connecting...":"Disconnected"})]}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[r.length," project",r.length!==1?"s":""]})]})})]})}function Cy(){const{data:r}=sm("/api/health"),{activeProject:o}=Zl(),u=o?.name||"Project",c=r?.uptime?Ay(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 Ay(r){if(r<60)return`${Math.floor(r)}s`;if(r<3600)return`${Math.floor(r/60)}m`;const o=Math.floor(r/3600),u=Math.floor(r%3600/60);return`${o}h ${u}m`}const My={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"},zy={indigo:"text-indigo-400",emerald:"text-emerald-400",amber:"text-amber-400",rose:"text-rose-400",cyan:"text-cyan-400"};function ne({title:r,value:o,subtitle:u,tooltip:c,color:d="indigo"}){return n.jsxs("div",{className:`bg-gradient-to-br ${My[d]} 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 ${zy[d]}`,children:o}),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 Ry={active:"#6366f1",completed:"#10b981",paused:"#f59e0b",planning:"#06b6d4",abandoned:"#ef4444",backlog:"#6b7280",ready_for_review:"#8b5cf6"};function _y(r){return Ry[r]||"#6b7280"}function wy({segments:r,size:o=160,centerLabel:u,centerValue:c}){const d=r.reduce((p,m)=>p+m.value,0);if(d===0)return n.jsx("div",{className:"flex items-center justify-center",style:{width:o,height:o},children:n.jsx("span",{className:"text-gray-600 text-xs",children:"No data"})});const x=52,g=2*Math.PI*x;let v=0;return n.jsxs("div",{className:"relative inline-flex items-center justify-center",style:{width:o,height:o},children:[n.jsx("svg",{viewBox:"0 0 128 128",className:"w-full h-full -rotate-90",children:r.map((p,m)=>{const y=p.value/d*g,C=v;return v+=y,n.jsx("circle",{cx:"64",cy:"64",r:x,fill:"none",stroke:p.color,strokeWidth:"12",strokeDasharray:`${y} ${g-y}`,strokeDashoffset:-C,className:"transition-all duration-500"},m)})}),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 Oy(r){return Object.entries(r).filter(([o,u])=>u>0).map(([o,u])=>({label:o,value:u,color:_y(o)}))}const Dy={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:o="default"}){return n.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-md text-xs font-medium ${Dy[o]}`,children:r})}function Ni(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 Uy({size:r="md"}){const o={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"};return n.jsxs("svg",{className:`${o[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 jt(){return n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsx(Uy,{size:"lg"})})}function R0(r){switch(r){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function Ly(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 Wc=r=>r.billingContext?.planType==="subscription";function Hy(){const{data:r,loading:o,error:u}=Ue("/api/overview"),[c,d]=E.useState([]),{activeProject:x}=Zl(),g=E.useRef(null);E.useEffect(()=>{if(!x||g.current===x.id)return;g.current=x.id;const m=`project=${x.id}`;fetch(`/api/activity/stream?limit=20&${m}`).then(j=>j.json()).then(j=>{j.ok&&Array.isArray(j.data)&&d(j.data)}).catch(()=>{})},[x]);const v=E.useCallback(m=>{d(j=>[m,...j].slice(0,20))},[]);if(Kn({onEvent:{activity:v}}),o)return n.jsx(jt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});if(!r)return null;const p=Oy(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(ot,{to:"/increments?status=active",className:"group",children:n.jsx(ne,{title:"Active Increments",value:r.project.activeIncrements,subtitle:`${r.project.totalIncrements} total`,color:"indigo"})}),n.jsx(ot,{to:"/increments?status=completed",className:"group",children:n.jsx(ne,{title:"Completed",value:r.project.completedIncrements,subtitle:`${Math.round(r.project.completedIncrements/Math.max(r.project.totalIncrements,1)*100)}% done`,color:"emerald"})}),n.jsx(ot,{to:"/costs",className:"group",children:n.jsx(ne,{title:Wc(r.costs)?"Usage Value":"Total Cost",value:`$${r.costs.totalCost.toFixed(2)}`,subtitle:Wc(r.costs)?`$${r.costs.billingContext?.monthlyAmount??"?"}/mo plan`:`${r.costs.sessionCount.toLocaleString()} sessions`,color:"amber"})}),n.jsx(ot,{to:"/analytics",className:"group",children:n.jsx(ne,{title:"Events Today",value:r.analytics.last24hEvents,subtitle:`${r.analytics.totalEvents.toLocaleString()} total`,color:"cyan"})})]}),n.jsx(By,{}),Wc(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(wy,{segments:p,centerValue:r.project.totalIncrements,centerLabel:"total"})}),n.jsx("div",{className:"flex flex-wrap gap-2 mt-4 justify-center",children:p.map(m=>n.jsxs(ot,{to:`/increments?status=${m.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:m.color}}),n.jsxs("span",{className:"text-xs text-gray-500 hover:text-gray-300",children:[m.label," (",m.value,")"]})]},m.label))})]}),n.jsxs(ot,{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(([m,j])=>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:m}),j.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:j.configDetail}),!j.configDetail&&j.lastImport&&n.jsxs("div",{className:"text-xs text-gray-600 mt-0.5",children:["Last: ",new Date(j.lastImport).toLocaleDateString()]})]}),n.jsx(de,{label:Ly(j.connectionStatus||j.lastSyncResult),variant:R0(j.connectionStatus)!=="default"?R0(j.connectionStatus):Ni(j.lastSyncResult||"")})]},m))}),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(ot,{to:"/notifications",onClick:m=>m.stopPropagation(),children:n.jsx(de,{label:`${r.notifications.criticalCount} critical`,variant:"error"})}),n.jsx(ot,{to:"/notifications",onClick:m=>m.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(ot,{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((m,j)=>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 ${m.severity==="error"?"bg-rose-400":m.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:m.title}),n.jsxs("div",{className:"text-[10px] text-gray-600",children:[m.category,m.timestamp&&` · ${qy(m.timestamp)}`]})]})]},j))})]})]}),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(([m,j])=>n.jsxs(ot,{to:`/increments?type=${m}`,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:m}),n.jsx("span",{className:"text-xs text-gray-500 bg-gray-800 px-2 py-0.5 rounded",children:j})]},m))})]})]})}function By(){const{data:r}=Ue("/api/prompt-health");if(!r?.health||r.health.warningLevel==="normal")return null;const{health:o,alert:u}=r,c=u?.level==="emergency",d=o.warningLevel==="critical"||c,x=d?"border-rose-500/30":"border-amber-500/20",g=d?"bg-rose-500/10":"bg-amber-500/10",v=d?"text-rose-400":"text-amber-400",p=Math.round(o.baseline/1e3),m=Math.min(Math.round(o.baseline/2e5*100),100),j=d?"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:d?"Critical":"Warning",variant:d?"error":"warning"}),n.jsxs("span",{className:`text-xs ${v}`,children:["Prompt baseline: ",p,"KB (",m,"% of context window)"]})]}),n.jsx(ot,{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:`${j} h-1.5 rounded-full`,style:{width:`${m}%`}})}),n.jsxs("div",{className:"flex gap-4 text-[10px] text-gray-500",children:[n.jsxs("span",{children:["CLAUDE.md: ",Math.round(o.claudeMdSize/1e3),"KB"]}),n.jsxs("span",{children:["MEMORY.md: ",Math.round(o.memoryMdSize/1e3),"KB"]}),n.jsxs("span",{children:["Skills: ",Math.round(o.skillBudget/1e3),"KB"]}),u&&n.jsxs("span",{className:v,children:["Compactions: ",u.compactionCount]})]})]})}function qy(r){try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 al(r,o=""){const[u,c]=cu(),d=u.get(r)??o,x=E.useCallback(g=>{c(v=>{const p=new URLSearchParams(v);return g&&g!==o?p.set(r,g):p.delete(r),p})},[r,o,c]);return[d,x]}function uu({title:r,description:o}){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}),o&&n.jsx("p",{className:"text-gray-600 text-xs mt-1 max-w-xs",children:o})]})}function Yy(){const{data:r,loading:o,error:u}=Ue("/api/increments"),[c,d]=al("status","all"),[x,g]=al("type","all"),v=lu();if(o)return n.jsx(jt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});if(!r)return null;const p=r.increments.filter(y=>!(c!=="all"&&y.status!==c||x!=="all"&&y.type!==x)),m=[...new Set(r.increments.map(y=>y.status))],j=[...new Set(r.increments.map(y=>y.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:[r.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(hi,{label:"All",active:c==="all",onClick:()=>d("all")}),m.map(y=>n.jsx(hi,{label:y,active:c===y,onClick:()=>d(y),count:r.increments.filter(C=>C.status===y).length},y))]})]}),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(hi,{label:"All",active:x==="all",onClick:()=>g("all")}),j.map(y=>n.jsx(hi,{label:y,active:x===y,onClick:()=>g(y),count:r.increments.filter(C=>C.type===y).length},y))]})]}),n.jsxs("span",{className:"text-xs text-gray-500",children:[p.length," matching"]})]}),p.length===0?n.jsx(uu,{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:p.map(y=>n.jsxs("tr",{onClick:()=>v(`/increments/${y.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:y.id})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-sm text-gray-300",children:y.title})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(de,{label:y.status,variant:Ni(y.status)})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:y.type})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(Gy,{priority:y.priority})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(_0,{completed:y.tasks.completed,total:y.tasks.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx(_0,{completed:y.acs.completed,total:y.acs.total})}),n.jsx("td",{className:"px-4 py-3",children:n.jsx("span",{className:"text-xs text-gray-500",children:y.lastActivity?Xy(y.lastActivity):"-"})})]},y.id))})]})})]})}function hi({label:r,active:o,onClick:u,count:c}){return n.jsxs("button",{onClick:u,className:`px-3 py-1 text-xs rounded-md transition-colors capitalize ${o?"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 _0({completed:r,total:o}){const u=o>0?Math.round(r/o*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,"/",o]})]})}function Gy({priority:r}){const o={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 ${o[r]||o.P2}`,children:r})}function Xy(r){try{const o=new Date(r),c=new Date().getTime()-o.getTime(),d=Math.floor(c/6e4);if(d<1)return"Just now";if(d<60)return`${d}m ago`;const x=Math.floor(d/60);if(x<24)return`${x}h ago`;const g=Math.floor(x/24);return g<7?`${g}d ago`:o.toLocaleDateString()}catch{return r}}function Qy(){const[r,o]=E.useState("commands"),[u,c]=E.useState(!1),{data:d,loading:x,error:g,refetch:v,fetchedAt:p}=Ue("/api/analytics/summary"),{data:m,loading:j,refetch:y}=Ue("/api/analytics/skills");if(x||j)return n.jsx(jt,{});if(g)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",g]});if(!d)return null;const C=d.topCommands?.reduce((w,R)=>w+R.count,0)||0,O=d.topSkills?.reduce((w,R)=>w+R.count,0)||0,G=d.topAgents?.reduce((w,R)=>w+R.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:[p&&n.jsxs("span",{className:"text-[10px] text-gray-600",children:["Updated ",p.toLocaleTimeString()]}),n.jsxs("span",{className:"text-sm text-gray-500",children:[d.totalEvents.toLocaleString()," total events"]}),n.jsx("button",{onClick:()=>{c(!0),v(),y(),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(ne,{title:"Total Events",value:d.totalEvents.toLocaleString(),subtitle:`${d.successRate}% success rate`,color:"indigo",tooltip:`${d.totalEvents} events tracked from analytics JSONL`}),n.jsx(ne,{title:"Commands",value:C.toLocaleString(),subtitle:`${d.topCommands?.length||0} unique`,color:"cyan",tooltip:`${C} total command invocations across ${d.topCommands?.length||0} distinct commands`}),n.jsx(ne,{title:"Skills",value:O.toLocaleString(),subtitle:`${d.topSkills?.length||0} unique`,color:"emerald",tooltip:`${O} total skill activations across ${d.topSkills?.length||0} distinct skills`}),n.jsx(ne,{title:"Agents",value:G.toLocaleString(),subtitle:`${d.topAgents?.length||0} unique`,color:"amber",tooltip:`${G} agent spawns across ${d.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(w=>n.jsx("button",{onClick:()=>o(w.key),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===w.key?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:w.label},w.key))}),r==="commands"&&n.jsx(Vy,{commands:d.topCommands||[]}),r==="skills"&&n.jsx(Zy,{skills:m||[]}),r==="agents"&&n.jsx($y,{agents:d.topAgents||[]}),r==="daily"&&n.jsx(ky,{days:d.dailySummaries||[]})]})}function Vy({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 o=[...r].sort((c,d)=>d.count-c.count),u=o[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:o.map((c,d)=>{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:["#",d+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 Zy({skills:r}){const o=[...r].sort((u,c)=>c.count-u.count);return o.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:o.map((u,c)=>{const d=u.count>0?Math.round(u.successCount/u.count*100):100,x=d>=90?"success":d>=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:`${d}%`,variant:x})}),n.jsx("td",{className:"px-4 py-2.5 text-xs text-gray-600 text-right whitespace-nowrap",children:u.lastUsed?Ky(u.lastUsed):"-"})]},u.name)})})]})]})}function $y({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 o=[...r].sort((c,d)=>d.count-c.count),u=o[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:o.map((c,d)=>{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:["#",d+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 ky({days:r}){const o=r.slice(-14);if(o.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(...o.map(x=>x.totalEvents),1),c=o.reduce((x,g)=>x+g.totalEvents,0),d=Math.round(c/o.length);return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[n.jsx(ne,{title:"Period Total",value:c.toLocaleString(),subtitle:`Last ${o.length} days`,color:"indigo"}),n.jsx(ne,{title:"Daily Average",value:d.toLocaleString(),color:"cyan"}),n.jsx(ne,{title:"Peak Day",value:u.toLocaleString(),subtitle:o.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 ",o.length," Days)"]}),n.jsx("div",{className:"flex items-end gap-1.5 h-40",children:o.map(x=>{const g=Math.max(2,x.totalEvents/u*100),v=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:v})]},x.date)})})]})]})}function Ky(r){if(!r)return"";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 im({items:r,maxBars:o=10}){const u=[...r].sort((d,x)=>x.value-d.value).slice(0,o),c=Math.max(...u.map(d=>d.value),1);return n.jsx("div",{className:"space-y-2",children:u.map((d,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:d.label,children:d.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:`${d.value/c*100}%`,backgroundColor:d.color||"#6366f1"}})}),n.jsx("span",{className:"text-xs text-gray-500 w-10 text-right",children:d.value})]},x))})}function Jy(){const[r,o]=E.useState("overview"),[u,c]=E.useState(null),{data:d,loading:x,error:g}=Ue("/api/costs/summary");if(x)return n.jsx(jt,{});if(g)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",g]});if(!d)return null;const v=d.sessions||[],p=d.billingContext?.planType==="subscription",m=d.modelBreakdown?Object.entries(d.modelBreakdown).map(([w,R])=>({model:w,...R})).sort((w,R)=>R.cost-w.cost):Fy(v),j=v.reduce((w,R)=>w+(R.inputTokens||0),0),y=v.reduce((w,R)=>w+(R.outputTokens||0),0),C=v.reduce((w,R)=>w+(R.cacheReadTokens||0),0),O=v.reduce((w,R)=>w+(R.cacheWriteTokens||0),0),G=j+y+C+O;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"}),p&&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:[d.billingContext?.monthlyAmount?`$${d.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(ne,{title:p?"API-Equivalent Value":"Total Cost",value:`$${d.totalCost.toFixed(2)}`,subtitle:p&&d.billingContext?.monthlyAmount?`Your plan: $${d.billingContext.monthlyAmount}/mo`:void 0,color:"amber"}),n.jsx(ne,{title:p?"Cache Efficiency":"Cache Savings",value:`$${d.totalSavings.toFixed(2)}`,subtitle:p?"API-equivalent savings from cache":void 0,color:"emerald"}),n.jsx(ne,{title:"Total Tokens",value:Xl(d.totalTokens),subtitle:Py(d.totalTokens),color:"indigo"}),n.jsx(ne,{title:"Sessions",value:d.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(w=>n.jsx("button",{onClick:()=>o(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==="overview"?"Breakdown":`Sessions (${v.length})`},w))}),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:p?"Usage Value by Model":"Cost by Model"}),m.length>0?n.jsx(im,{items:m.map(w=>({label:w.model,value:parseFloat(w.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(gi,{label:"Input",value:j,total:G,color:"bg-indigo-500"}),n.jsx(gi,{label:"Output",value:y,total:G,color:"bg-cyan-500"}),C>0&&n.jsx(gi,{label:"Cache Read",value:C,total:G,color:"bg-emerald-500"}),O>0&&n.jsx(gi,{label:"Cache Write",value:O,total:G,color:"bg-amber-500"})]})]}),m.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:m.map(w=>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:w.model}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:w.sessions.toLocaleString()}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(w.tokens)}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",w.cost.toFixed(2)]}),n.jsxs("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:["$",w.sessions>0?(w.cost/w.sessions).toFixed(4):"0"]})]},w.model))})]})]})]}),r==="sessions"&&n.jsx(Wy,{sessions:v,expandedSession:u,onToggle:w=>c(u===w?null:w)})]})}const Fc=30;function Wy({sessions:r,expandedSession:o,onToggle:u}){const[c,d]=E.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/Fc),g=c*Fc,v=g+Fc,p=r.slice(g,v);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(v,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:p.map(m=>{const j=m.sessionId||"-",y=o===j,C=(m.cacheReadTokens||0)+(m.cacheWriteTokens||0);return n.jsxs(E.Fragment,{children:[n.jsxs("tr",{className:"border-b border-gray-800/50 hover:bg-gray-800/30 cursor-pointer",onClick:()=>u(j),children:[n.jsx("td",{className:"px-4 py-2 text-xs text-gray-600",children:n.jsx("span",{className:`inline-block transition-transform ${y?"rotate-90":""}`,children:"▸"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-400 font-mono",children:j.slice(0,8)}),n.jsx("td",{className:"px-4 py-2",children:n.jsx(de,{label:m.model||"unknown",variant:"default"})}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(m.inputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:Xl(m.outputTokens)}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:C>0?Xl(C):"-"}),n.jsxs("td",{className:"px-4 py-2 text-xs text-amber-400 text-right",children:["$",m.cost?.toFixed(4)||"0.0000"]}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500 text-right",children:m.duration?w0(m.duration):"-"}),n.jsx("td",{className:"px-4 py-2 text-xs text-gray-500",children:Iy(m.timestamp)})]}),y&&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:m.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:m.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:(m.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:(m.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:["$",m.cost?.toFixed(6)||"0"]})]}),m.savings!=null&&m.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:["$",m.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:m.duration?w0(m.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:m.sessionId})]})]})})})]},j)})})]}),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:()=>d(m=>Math.max(0,m-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)},(m,j)=>{let y;return x<=7||c<3?y=j:c>x-4?y=x-7+j:y=c-3+j,n.jsx("button",{onClick:()=>d(y),className:`w-7 h-7 text-xs rounded transition-colors ${c===y?"bg-indigo-600 text-white":"text-gray-500 hover:text-gray-300 hover:bg-gray-800"}`,children:y+1},y)})}),n.jsx("button",{onClick:()=>d(m=>Math.min(x-1,m+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 gi({label:r,value:o,total:u,color:c}){const d=u>0?o/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:[Xl(o)," (",d.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:`${d}%`,backgroundColor:x[c]||c}})})]})}function Fy(r){const o=new Map;for(const u of r){const c=u.model||"unknown",d=o.get(c)||{cost:0,tokens:0,sessions:0};d.cost+=u.cost||0,d.tokens+=(u.inputTokens||0)+(u.outputTokens||0),d.sessions++,o.set(c,d)}return Array.from(o.entries()).map(([u,c])=>({model:u,...c})).sort((u,c)=>c.cost-u.cost)}function Xl(r){return r?r>=1e6?`${(r/1e6).toFixed(1)}M`:r>=1e3?`${(r/1e3).toFixed(1)}K`:String(r):"0"}function Py(r){return r?r.toLocaleString():"0"}function w0(r){const o=Math.round(r);if(o<60)return`${o}s`;const u=Math.floor(o/60),c=o%60;return u<60?`${u}m ${c}s`:`${Math.floor(u/60)}h ${u%60}m`}function Iy(r){if(!r)return"-";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 ou(){const[r,o]=E.useState(!1),[u,c]=E.useState(null),[d,x]=E.useState(null),[g,v]=E.useState([]),[p,m]=E.useState("idle"),j=E.useRef(null),y=E.useRef(null);Kn({onEvent:{"command-output":G=>{const w=G;y.current&&w.executionId===y.current&&w.line&&v(R=>[...R,w.line])},"command-complete":G=>{const w=G;if(y.current&&w.executionId===y.current){if(j.current&&(clearTimeout(j.current),j.current=null),o(!1),w.exitCode===0)m("success"),v(R=>[...R,"Command completed successfully."]);else{m("error");const R=`Command failed (exit code ${w.exitCode??"unknown"})`;x(R),v(Q=>[...Q,R])}y.current=null}}}}),E.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const C=E.useCallback(async G=>{o(!0),x(null),v([`> specweave ${G}`]),m("running");try{const R=await(await fetch(`/api/commands/${G}`,{method:"POST"})).json();return R.ok?(c(R.data),y.current=R.data?.id||null,j.current=setTimeout(()=>{y.current&&(y.current=null,o(!1),m("error"),x("Command timed out after 60 seconds"),v(Q=>[...Q,"Timed out after 60 seconds."]))},6e4),R.data):(x(R.error||"Command failed"),m("error"),v(Q=>[...Q,`Error: ${R.error||"Command failed"}`]),o(!1),null)}catch(w){return x(String(w)),m("error"),v(R=>[...R,`Error: ${String(w)}`]),o(!1),null}},[]),O=E.useCallback(()=>{o(!1),c(null),x(null),v([]),m("idle"),y.current=null,j.current&&(clearTimeout(j.current),j.current=null)},[]);return{execute:C,running:r,result:u,error:d,output:g,status:p,reset:O}}function ep(r){switch(r){case"connected":return"success";case"sync_failed":return"warning";case"configured_never_synced":return"info";default:return"default"}}function tp(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 ap(){const[r,o]=E.useState("health"),[u,c]=E.useState(null),{data:d,loading:x,error:g,refetch:v}=Ue("/api/sync/status"),{data:p,loading:m}=Ue("/api/sync/audit?limit=100"),{data:j,loading:y}=Ue("/api/sync/audit/summary"),{execute:C,running:O}=ou(),G=async K=>{c(K);try{const W=new URLSearchParams(window.location.search).get("project")||"",$=W?`?platform=${K}&project=${W}`:`?platform=${K}`;await fetch(`/api/sync/verify${$}`,{method:"POST"}),v()}catch{}c(null)};if(x||m||y)return n.jsx(jt,{});if(g)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",g]});if(!d)return null;const w=Object.entries(d.platforms).filter(([K])=>["github","jira","ado"].includes(K)),R=p?.length||0,Q=p?.filter(K=>K.result==="error").length||0,H=p?.filter(K=>K.conflict)||[],V=w.filter(([,K])=>K.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:()=>C("sync-push"),disabled:O,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:O?"Syncing...":"Sync Now"})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ne,{title:"Platforms",value:w.length,subtitle:`${V} connected`,color:"indigo"}),n.jsx(ne,{title:"Audit Entries",value:R,color:"cyan"}),n.jsx(ne,{title:"Errors",value:Q,color:"rose"}),n.jsx(ne,{title:"Conflicts",value:H.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(K=>n.jsx("button",{onClick:()=>o(K),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===K?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:K==="health"?"Platform Health":K==="audit"?"Audit Log":`Conflicts (${H.length})`},K))}),r==="health"&&n.jsx(n.Fragment,{children:w.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:w.map(([K,W])=>{const $=j?.[K],Y=W.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(rm,{platform:K}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm font-medium text-gray-300 capitalize",children:K}),W.configDetail&&n.jsx("div",{className:"text-[10px] text-gray-600 mt-0.5",children:W.configDetail})]})]}),n.jsx(de,{label:tp(Y),variant:ep(Y)})]}),W.diagnosticMessage&&n.jsx("div",{className:"text-xs text-gray-500 mb-3 p-2 bg-gray-800/30 rounded-lg",children:W.diagnosticMessage}),Y==="not_configured"&&n.jsx(ot,{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"}),Y==="configured_never_synced"&&n.jsx("button",{onClick:()=>G(K),disabled:u===K,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===K?"Verifying...":"Verify Connection"}),Y==="sync_failed"&&n.jsx("button",{onClick:()=>G(K),disabled:u===K,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===K?"Verifying...":"Retry Sync"}),n.jsxs("div",{className:"space-y-2 mt-3",children:[W.lastImport&&n.jsx(Gl,{label:"Last Import",value:new Date(W.lastImport).toLocaleString()}),Y==="connected"&&!W.lastImport&&n.jsx(Gl,{label:"Status",value:"Connected, no imports yet"}),W.lastImportCount!=null&&n.jsx(Gl,{label:"Items Imported",value:W.lastImportCount.toLocaleString()}),W.lastSkippedCount!=null&&W.lastSkippedCount>0&&n.jsx(Gl,{label:"Skipped",value:W.lastSkippedCount.toLocaleString()}),$&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"border-t border-gray-800 my-2"}),n.jsx(Gl,{label:"Total Ops",value:$.total.toLocaleString()}),n.jsx(Gl,{label:"Success",value:$.success.toLocaleString()}),$.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($.errors),variant:"error"})]})]})]})]},K)})})}),r==="audit"&&n.jsx(O0,{entries:p||[]}),r==="conflicts"&&n.jsx(O0,{entries:H}),d.lastUpdated&&n.jsxs("p",{className:"text-xs text-gray-600",children:["Last metadata update: ",new Date(d.lastUpdated).toLocaleString()]})]})}function O0({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 o={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:lp(u.timestamp)}),n.jsx("td",{className:"px-4 py-2",children:n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx(rm,{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:o[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 Gl({label:r,value:o}){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:o})]})}function rm({platform:r}){const o={github:"bg-gray-700",jira:"bg-blue-700",ado:"bg-blue-600"};return n.jsx("div",{className:`w-5 h-5 rounded ${o[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 lp(r){if(!r)return"-";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 cm={prompt_too_long:"error",api_error:"warning",tool_failure:"info",hook_error:"default",rate_limit:"warning",unknown:"default"},Qn=50;function np(){const[r,o]=al("tab","groups"),[u,c]=al("type",""),[d,x]=al("session",""),[g,v]=E.useState(0),p=g*Qn,m=u?`&type=${encodeURIComponent(u)}`:"",[j,y]=E.useState(0);Kn({onEvent:{"error-detected":()=>y(ce=>ce+1)}});const{data:C,loading:O}=Ue(`/api/errors/groups?_r=${j}`),{data:G,loading:w}=Ue(`/api/errors/recent?limit=${Qn}&offset=${p}${m}&_r=${j}`),{data:R,loading:Q}=Ue(`/api/errors/sessions?limit=50&_r=${j}`),{data:H,loading:V}=Ue(`/api/errors/timeline?bucket=60&_r=${j}`);if(O||w||Q||V)return n.jsx(jt,{});const K=G?.total||0,W=G?.errors||[],$=C?.length||0,Y=C?.reduce((ce,D)=>ce+D.sessions,0)||0,I=C?.[0]?.type||"-",X=d?R?.find(ce=>ce.sessionId===d):null,Ce=u?(R||[]).filter(ce=>ce.errors.some(D=>D.type===u)):R||[],Ve=Math.ceil(K/Qn),qe=ce=>{c(ce),o("errors"),x(""),v(0)},Ot=ce=>{o(ce),x(""),ce!=="errors"&&v(0)},Dt=()=>{c(""),v(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:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ne,{title:"Total Errors",value:K,color:"rose"}),n.jsx(ne,{title:"Error Types",value:$,color:"amber"}),n.jsx(ne,{title:"Affected Sessions",value:Y,color:"indigo"}),n.jsx(ne,{title:"Most Common",value:I,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(ce=>n.jsx("button",{onClick:()=>Ot(ce),className:`flex-1 px-3 py-1.5 text-xs rounded-md transition-colors ${r===ce?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:ce==="groups"?"Error Groups":ce==="errors"?"All Errors":ce==="timeline"?"Timeline":"Sessions"},ce))}),u&&n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx(de,{label:`type: ${u.replace(/_/g," ")}`,variant:"info"}),n.jsx("button",{onClick:Dt,className:"text-xs text-gray-500 hover:text-gray-300 transition-colors",children:"clear"})]})]}),d&&X&&n.jsx(up,{session:X,onClose:()=>x("")}),!d&&r==="groups"&&n.jsx(sp,{groups:C||[],onGroupClick:qe}),!d&&r==="errors"&&n.jsx(ip,{errors:W,total:K,page:g,totalPages:Ve,onPageChange:v,onSessionClick:ce=>{x(ce)}}),!d&&r==="timeline"&&n.jsx(rp,{buckets:H||[],errors:W,onSessionClick:ce=>x(ce)}),!d&&r==="sessions"&&n.jsx(cp,{sessions:Ce,onSelect:ce=>x(ce)}),K===0&&!d&&n.jsx(uu,{title:"No errors detected",description:"Claude Code session logs are clean"})]})}function sp({groups:r,onGroupClick:o}){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:cm[u.type]||"default"})}),n.jsx("td",{className:"px-4 py-2 text-right",children:n.jsx("button",{onClick:()=>o(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-500",children:Jn(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 ip({errors:r,total:o,page:u,totalPages:c,onPageChange:d,onSessionClick:x}){const[g,v]=E.useState(new Set),p=E.useCallback(y=>{v(C=>{const O=new Set(C);return O.has(y)?O.delete(y):O.add(y),O})},[]);if(r.length===0)return n.jsx(uu,{title:"No errors",description:"No errors match the current filter"});const m=u*Qn+1,j=Math.min(u*Qn+r.length,o);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 ",m,"–",j," of ",o]}),c>1&&n.jsx(D0,{page:u,totalPages:c,onChange:d})]}),n.jsx("div",{className:"divide-y divide-gray-800/50",children:r.map((y,C)=>{const O=g.has(C),G=y.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:y.type.replace(/_/g," "),variant:cm[y.type]||"default"})}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("div",{className:`text-xs text-gray-300 ${O?"whitespace-pre-wrap break-words":"truncate"} ${G?"cursor-pointer":""}`,onClick:G?()=>p(C):void 0,title:G&&!O?"Click to expand full message":void 0,children:[O?y.message:y.message.slice(0,200),!O&&G&&n.jsx("span",{className:"text-indigo-400 ml-1",children:"...more"})]}),y.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:y.context.toolName}),y.context.toolInput&&n.jsx("span",{className:"text-[10px] text-gray-500 font-mono truncate max-w-md",children:y.context.toolInput})]})]}),n.jsxs("div",{className:"flex-shrink-0 text-right",children:[n.jsx("div",{className:"text-[10px] text-gray-500",children:Jn(y.timestamp)}),n.jsx("button",{onClick:()=>x(y.sessionId),className:"text-[10px] text-indigo-400 hover:text-indigo-300 font-mono mt-0.5 transition-colors",title:"View full session",children:y.sessionId.slice(0,8)}),y.context?.messageIndex!=null&&n.jsxs("div",{className:"text-[10px] text-gray-600",children:["msg #",y.context.messageIndex]})]})]})},`${y.sessionId}-${y.timestamp}-${C}`)})}),c>1&&n.jsx("div",{className:"px-5 py-3 border-t border-gray-800 flex justify-end",children:n.jsx(D0,{page:u,totalPages:c,onChange:d})})]})}function D0({page:r,totalPages:o,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," / ",o]}),n.jsx("button",{onClick:()=>u(Math.min(o-1,r+1)),disabled:r>=o-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 rp({buckets:r,errors:o,onSessionClick:u}){const[c,d]=E.useState(null),x=Math.max(...r.map(m=>m.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"},v=c?o.filter(m=>{const j=new Date(m.timestamp).getTime();return j>=new Date(c.start).getTime()&&j<new Date(c.end).getTime()}):o,p=m=>{try{return new Date(m).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return m}};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:()=>d(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((m,j)=>{const y=m.count/x*100,C=c?.start===m.start;return n.jsx("div",{className:"flex-1 flex flex-col items-center justify-end cursor-pointer group relative",onClick:()=>d(C?null:m),title:`${p(m.start)}: ${m.count} errors`,children:n.jsx("div",{className:`w-full min-h-[2px] rounded-t transition-all ${C?"bg-indigo-400":"bg-rose-500/70 group-hover:bg-rose-400"}`,style:{height:`${Math.max(y,2)}%`}})},j)})}),n.jsxs("div",{className:"flex justify-between mt-1",children:[n.jsx("span",{className:"text-[9px] text-gray-600",children:r.length>0?p(r[0].start):""}),n.jsx("span",{className:"text-[9px] text-gray-600",children:r.length>0?p(r[r.length-1].start):""})]}),n.jsx("div",{className:"flex gap-3 mt-2",children:Object.entries(g).map(([m,j])=>n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${j}`}),n.jsx("span",{className:"text-[9px] text-gray-600",children:m.replace(/_/g," ")})]},m))})]}),c&&n.jsxs("div",{className:"text-xs text-gray-400 px-1",children:["Showing ",v.length," errors from ",p(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:[v.length===0&&n.jsx("p",{className:"text-xs text-gray-600",children:"No errors in this time range"}),v.slice(0,100).map((m,j)=>n.jsxs("div",{className:"flex items-start gap-3 py-2 px-2 hover:bg-gray-800/30 rounded cursor-pointer",onClick:()=>u(m.sessionId),children:[n.jsx("div",{className:`w-2 h-2 rounded-full mt-1.5 flex-shrink-0 ${g[m.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:m.type.replace(/_/g," ")}),m.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:m.context.toolName}),n.jsx("span",{className:"text-[10px] text-gray-600",children:Jn(m.timestamp)})]}),n.jsx("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:m.message})]})]},j))]})]})]})}function cp({sessions:r,onSelect:o}){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:()=>o(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-500",children:Jn(u.startTime)})]},u.sessionId))})]})]})}function up({session:r,onClose:o}){const[u,c]=E.useState(new Set),d=x=>{c(g=>{const v=new Set(g);return v.has(x)?v.delete(x):v.add(x),v})};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:o,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 v=u.has(g),p=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-600",children:Jn(x.timestamp)})]}),n.jsxs("div",{className:`text-xs text-gray-400 ${v?"whitespace-pre-wrap break-words":""} ${p?"cursor-pointer":""}`,onClick:p?()=>d(g):void 0,children:[v?x.message:x.message.slice(0,300),!v&&p&&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]})]},g)})})]})}function Jn(r){if(!r)return"-";const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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`}const op=[{value:"all",label:"All"},{value:"command",label:"Commands"},{value:"hook",label:"Hooks"},{value:"notification",label:"Notifications"},{value:"cost",label:"Cost"}],fp=[{value:"all",label:"All Levels"},{value:"error",label:"Errors"},{value:"warning",label:"Warnings"},{value:"info",label:"Info"}];function dp(){const[r,o]=al("category","all"),[u,c]=al("severity","all"),d=r||"all",x=u||"all",[g,v]=E.useState([]),[p,m]=E.useState(200),[j,y]=E.useState(null),C=new URLSearchParams;C.set("limit",String(p)),d!=="all"&&C.set("categories",d),x!=="all"&&C.set("severity",x);const{data:O,loading:G}=Ue(`/api/activity/stream?${C.toString()}`),w=E.useCallback(X=>{v(Ce=>[X,...Ce].slice(0,50))},[]);if(Kn({onEvent:{activity:w}}),G)return n.jsx(jt,{});const R=[...g,...O||[]],Q=new Set,H=[];for(const X of R){const Ce=`${X.timestamp}:${X.title}`;Q.has(Ce)||(Q.add(Ce),H.push(X))}const V=H.filter(X=>!(d!=="all"&&X.category!==d||x!=="all"&&X.severity!==x)),K=H.filter(X=>X.severity==="error").length,W=H.filter(X=>X.severity==="warning").length,$=new Set(H.map(X=>X.source)),Y=X=>{y(Ce=>Ce===X?null:X)},I=()=>{m(X=>X+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(ne,{title:"Total Events",value:H.length,color:"indigo"}),n.jsx(ne,{title:"Errors",value:K,color:"rose"}),n.jsx(ne,{title:"Warnings",value:W,color:"amber"}),n.jsx(ne,{title:"Sources",value:$.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:op.map(X=>n.jsx("button",{onClick:()=>o(X.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${d===X.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:X.label},X.value))}),n.jsx("div",{className:"flex gap-1 bg-gray-900/50 border border-gray-800 rounded-lg p-1",children:fp.map(X=>n.jsx("button",{onClick:()=>c(X.value),className:`px-3 py-1 text-xs rounded-md transition-colors ${x===X.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:X.label},X.value))}),n.jsxs("span",{className:"text-xs text-gray-500 self-center",children:[V.length," events"]})]}),n.jsx("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl divide-y divide-gray-800/50",children:V.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:[V.slice(0,p).map((X,Ce)=>{const Ve=`${X.timestamp}-${Ce}`,qe=j===Ve;return n.jsx(mp,{event:X,isExpanded:qe,onToggle:()=>Y(Ve)},Ve)}),V.length>=p&&n.jsx("div",{className:"p-4 text-center",children:n.jsx("button",{onClick:I,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 mp({event:r,isExpanded:o,onToggle:u}){const c=r.severity==="error"?"bg-rose-400":r.severity==="warning"?"bg-amber-400":"bg-gray-600",d={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:d[r.category]||d.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:Ni(r.severity)})]}),r.detail&&!o&&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:xp(r.timestamp)}),x&&n.jsx("svg",{className:`w-4 h-4 text-gray-600 transition-transform duration-200 ${o?"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"})})]})]}),o&&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 xp(r){if(!r)return"-";const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 hp(){const{data:r,loading:o,error:u,refetch:c}=Ue("/api/config"),{activeProject:d}=Zl(),[x,g]=E.useState(new Set),[v,p]=E.useState({}),[m,j]=E.useState(!1),[y,C]=E.useState(null),[O,G]=E.useState([]);if(o)return n.jsx(jt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});if(!r)return null;const w=$=>{g(Y=>{const I=new Set(Y);return I.has($)?I.delete($):I.add($),I})},R=Object.keys(v).length>0,Q=($,Y)=>{p(I=>({...I,[$]:Y})),G(I=>I.filter(X=>X.path!==$))},H=async()=>{if(R){j(!0),C(null),G([]);try{const $={};for(const[qe,Ot]of Object.entries(v))yp($,qe,Ot);const Y=d?`?project=${d.id}`:"",X=await(await fetch(`/api/config/validate${Y}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})).json();if(X.errors&&X.errors.length>0){G(X.errors),C("Validation failed. Fix errors before saving."),j(!1);return}const Ve=await(await fetch(`/api/config${Y}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify($)})).json();Ve.ok?(C("Saved successfully"),p({}),G([]),c(),setTimeout(()=>C(null),3e3)):C(`Error: ${Ve.error}`)}catch($){C(`Error: ${$}`)}finally{j(!1)}}},V=()=>{p({}),C(null),G([])},K=Object.entries(r).filter(([$,Y])=>typeof Y=="object"&&Y!==null),W=Object.entries(r).filter(([$,Y])=>typeof Y!="object"||Y===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:[y&&n.jsx("span",{className:`text-xs ${y.startsWith("Error")||y.startsWith("Validation")?"text-rose-400":"text-emerald-400"}`,children:y}),R&&n.jsxs(n.Fragment,{children:[n.jsx(de,{label:`${Object.keys(v).length} changes`,variant:"warning"}),n.jsx("button",{onClick:V,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:H,disabled:m,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:m?"Saving...":"Save Changes"})]})]})]}),y&&!R&&y==="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"})]}),O.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"})]}),O.map(($,Y)=>n.jsxs("div",{className:"text-xs text-rose-300 pl-4",children:[n.jsx("span",{className:"font-mono text-rose-400",children:$.path}),": ",$.message]},Y))]}),W.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:W.map(([$,Y])=>n.jsx(om,{path:$,label:$,value:v[$]!==void 0?v[$]:Y,original:Y,onChange:I=>Q($,I),edited:v[$]!==void 0,validationError:O.find(I=>I.path===$)?.message},$))})]}),K.map(([$,Y])=>n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl overflow-hidden",children:[n.jsxs("button",{onClick:()=>w($),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:$}),U0(v,$)>0&&n.jsx(de,{label:`${U0(v,$)} edited`,variant:"warning"}),O.some(I=>I.path.startsWith($+"."))&&n.jsx(de,{label:"errors",variant:"error"})]}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${x.has($)?"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"})})]}),x.has($)&&n.jsx("div",{className:"px-5 py-3 border-t border-gray-800",children:n.jsx(um,{data:Y,path:$,edits:v,onChange:Q,validationErrors:O,depth:0})})]},$))]})}function um({data:r,path:o,edits:u,onChange:c,validationErrors:d,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,v])=>{const p=`${o}.${g}`;return v&&typeof v=="object"&&!Array.isArray(v)?n.jsxs("div",{children:[n.jsx("span",{className:"text-xs text-gray-400 font-mono font-medium",children:g}),n.jsx(um,{data:v,path:p,edits:u,onChange:c,validationErrors:d,depth:x+1})]},g):n.jsx(om,{path:p,label:g,value:u[p]!==void 0?u[p]:v,original:v,onChange:m=>c(p,m),edited:u[p]!==void 0,validationError:d.find(m=>m.path===p)?.message},g)})})}function om({path:r,label:o,value:u,original:c,onChange:d,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:o}),n.jsx("button",{onClick:()=>d(!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:o}),n.jsx("input",{type:"number",value:String(u??""),onChange:v=>d(v.target.value?Number(v.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(gp,{path:r,label:o,value:Array.isArray(u)?u:Array.isArray(c)?c:[],edited:x,onChange:d,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:o}),n.jsx("input",{type:"text",value:String(u??""),onChange:v=>d(v.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 gp({path:r,label:o,value:u,edited:c,onChange:d,validationError:x}){const[g,v]=E.useState(!1),[p,m]=E.useState(""),j=O=>{const G=[...u];G.splice(O,1),d(G)},y=()=>{const O=p.trim();O&&(d([...u,O]),m(""))},C=O=>{O.key==="Enter"&&(O.preventDefault(),y())};return n.jsxs("div",{className:"py-1",children:[n.jsxs("button",{onClick:()=>v(O=>!O),className:"flex items-center justify-between w-full group",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:o}),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((O,G)=>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(O)}),n.jsx("button",{onClick:()=>j(G),className:"text-[10px] text-gray-600 hover:text-rose-400 opacity-0 group-hover/item:opacity-100 transition-opacity",children:"remove"})]},G)),n.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[n.jsx("input",{type:"text",value:p,onChange:O=>m(O.target.value),onKeyDown:C,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:y,disabled:!p.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 U0(r,o){return Object.keys(r).filter(u=>u.startsWith(o+".")).length}function yp(r,o,u){const c=o.split(".");let d=r;for(let x=0;x<c.length-1;x++)(!d[c[x]]||typeof d[c[x]]!="object")&&(d[c[x]]={}),d=d[c[x]];d[c[c.length-1]]=u}function fm({lines:r,status:o,onDismiss:u}){const c=E.useRef(null);return E.useEffect(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[r]),r.length===0&&o==="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 ${o==="running"?"bg-yellow-400 animate-pulse":o==="success"?"bg-green-400":o==="error"?"bg-red-400":"bg-gray-500"}`}),n.jsx("span",{className:"text-xs text-gray-400 font-mono",children:o==="running"?"Running...":o==="success"?"Completed":o==="error"?"Failed":"Output"})]}),o!=="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((d,x)=>n.jsx("div",{children:d},x)),n.jsx("div",{ref:c})]})]})}function pp(){const{data:r,loading:o}=Ue("/api/plugins/full"),{execute:u,running:c,output:d,status:x,reset:g}=ou(),[v,p]=E.useState(null);if(o)return n.jsx(jt,{});const m=r?.plugins||[],j=r?.skills||[],y=r?.lsp,C=r?.warmup,O=r?.triggerCount||0,G=m.reduce((H,V)=>H+V.skillCount,0),w=m.reduce((H,V)=>H+V.commandCount,0),R=H=>j.filter(V=>V.plugin===H).sort((V,K)=>K.count-V.count),Q=H=>{p(V=>V===H?null:H)};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(fm,{lines:d,status:x,onDismiss:g}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[n.jsx(Ua,{label:"Plugins",value:m.length}),n.jsx(Ua,{label:"Total Skills",value:G}),n.jsx(Ua,{label:"Total Commands",value:w}),n.jsx(Ua,{label:"Trigger Keywords",value:O})]}),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"})}),m.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:m.map(H=>{const V=v===H.name,K=R(H.name);return n.jsxs("div",{children:[n.jsxs("button",{onClick:()=>Q(H.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:H.name}),n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:H.version})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(de,{label:`${H.skillCount} skills`,variant:"info"}),n.jsx(de,{label:`${H.commandCount} cmds`,variant:"default"}),n.jsx("svg",{className:`w-4 h-4 text-gray-500 transition-transform duration-200 ${V?"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"})})]})]}),V&&n.jsx("div",{className:"px-4 pb-4 bg-gray-800/20",children:K.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"})]}),K.map(W=>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:W.name}),n.jsx("span",{className:"text-xs text-gray-400 text-right font-mono",children:W.count}),n.jsxs("span",{className:"text-xs text-right font-mono",children:[n.jsx("span",{className:"text-emerald-400",children:W.successCount}),W.failureCount>0&&n.jsxs("span",{className:"text-rose-400",children:["/",W.failureCount]})]}),n.jsx("span",{className:"text-[10px] text-gray-500 text-right",children:W.lastUsed?vp(W.lastUsed):"-"})]},W.name))]})})]},H.name)})})]}),j.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(im,{items:j.sort((H,V)=>V.count-H.count).slice(0,20).map(H=>({label:H.name,value:H.count,color:"#10b981"})),maxBars:20})]}),y&&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:y.status,variant:y.status==="ok"?"success":"warning"}),y.checked&&n.jsxs("span",{className:"text-[10px] text-gray-600",children:["Checked: ",new Date(y.checked).toLocaleDateString()]})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-4",children:[n.jsx(Ua,{label:"Total Languages",value:y.stats.totalLanguages}),n.jsx(Ua,{label:"Checked",value:y.stats.checkedLanguages}),n.jsx(Ua,{label:"Binary Missing",value:y.stats.binaryMissing}),n.jsx(Ua,{label:"Plugin Missing",value:y.stats.pluginMissing})]}),y.missing.length>0&&n.jsxs("div",{className:"space-y-2",children:[n.jsx("h4",{className:"text-xs text-gray-500",children:"Missing Languages"}),y.missing.map((H,V)=>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:H.type,variant:H.type==="binary"?"warning":"default"}),n.jsx("span",{className:"text-xs text-gray-300",children:H.language})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("code",{className:"text-[10px] text-gray-500",children:H.binaryInstall}),H.message&&n.jsx("span",{className:"text-[10px] text-gray-600 max-w-[200px] truncate",children:H.message})]})]},V))]})]}),C&&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:[C.elapsed?`${(C.elapsed/1e3).toFixed(1)}s`:""," |"," ",C.timestamp?new Date(C.timestamp).toLocaleString():""]})]}),n.jsxs("div",{className:"flex flex-wrap gap-2",children:[C.warmedUp.map(H=>n.jsx(de,{label:H,variant:"success"},H)),C.failed.map(H=>n.jsx(de,{label:H,variant:"error"},H))]}),C.warmedUp.length===0&&C.failed.length===0&&n.jsx("p",{className:"text-gray-600 text-xs",children:"No warmup data"})]})]})}function Ua({label:r,value:o}){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:o}),n.jsx("div",{className:"text-[10px] text-gray-500",children:r})]})}function vp(r){if(!r)return"-";const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 bp(){const{data:r,loading:o}=Ue("/api/links"),{data:u,loading:c,refetch:d}=Ue("/api/services"),{execute:x,running:g,output:v,status:p,reset:m}=ou();if(o||c)return n.jsx(jt,{});const j=(u||[]).filter(R=>R.status==="running").length,y=(u||[]).length,C=new Map;for(const R of u||[])if(R.port>0&&R.status==="running"){const Q=C.get(R.port)||[];Q.push(R.name),C.set(R.port,Q)}const O=Array.from(C.entries()).filter(([,R])=>R.length>1),G=async R=>{await x(R),setTimeout(()=>d(),3e3)},w=async R=>{await x(R),setTimeout(()=>d(),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(fm,{lines:v,status:p,onDismiss:m}),O.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:O.map(([R,Q])=>n.jsxs("span",{className:"block",children:["Port ",R," is used by: ",Q.join(", ")]},R))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ne,{title:"Services",value:y,color:"indigo",tooltip:`${y} managed services`}),n.jsx(ne,{title:"Running",value:j,color:"emerald",tooltip:`${j} services currently active`}),n.jsx(ne,{title:"External Links",value:(r||[]).length,color:"cyan",tooltip:"Configured external links (docs, repos, etc.)"}),n.jsx(ne,{title:"Stopped",value:y-j,color:"rose",tooltip:`${y-j} 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((R,Q)=>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 ${R.status==="running"?"bg-emerald-400":"bg-gray-600"}`}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm text-gray-300",children:R.name}),n.jsx("div",{className:"text-[10px] text-gray-600",children:R.status==="running"&&R.detail?n.jsx("a",{href:R.detail,target:"_blank",rel:"noopener noreferrer",className:"text-indigo-400 hover:text-indigo-300 underline transition-colors",children:R.detail}):R.detail})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[R.status==="running"&&R.port>0&&n.jsx(de,{label:`Port ${R.port}`,variant:"info"}),R.status==="running"?n.jsx(de,{label:"Running",variant:"success"}):n.jsx(de,{label:"Stopped",variant:"default"}),R.name==="Docs Preview"&&(R.status==="running"?n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("a",{href:R.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:()=>w("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:()=>G("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"})),R.status==="running"&&R.name!=="Docs Preview"&&n.jsx("a",{href:R.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"})]})]},Q))})]}),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((R,Q)=>n.jsxs("a",{href:R.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(jp,{type:R.type}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-gray-300 group-hover:text-white transition-colors",children:R.name}),n.jsx("div",{className:"text-[10px] text-gray-600 truncate max-w-[200px]",children:R.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"})})]},Q))})]})]})}function jp({type:r}){const o={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 ${o[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 L0={critical:0,warning:1,info:2};function Np(){const[r,o]=E.useState("pending"),[u,c]=E.useState(null),{activeProject:d}=Zl(),{data:x,loading:g,error:v,refetch:p}=Ue("/api/notifications");if(g)return n.jsx(jt,{});if(v)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",v]});const m=x||[],j=m.filter(Y=>!Y.dismissedAt),y=m.filter(Y=>!!Y.dismissedAt),C=j.filter(Y=>Y.severity==="critical"),O=j.filter(Y=>Y.severity==="warning"),w=[...r==="pending"?j:r==="dismissed"?y:m].sort((Y,I)=>{const X=L0[Y.severity]??3,Ce=L0[I.severity]??3;return X!==Ce?X-Ce:new Date(I.createdAt).getTime()-new Date(Y.createdAt).getTime()}),R=async Y=>{c(Y);try{const I=d?`?project=${d.id}`:"";(await fetch(`/api/notifications/${Y}/dismiss${I}`,{method:"POST"})).ok&&p()}finally{c(null)}},Q=async()=>{c("__all__");try{const Y=d?`?project=${d.id}`:"";for(const I of j)await fetch(`/api/notifications/${I.id}/dismiss${Y}`,{method:"POST"});p()}finally{c(null)}},H=Y=>Y==="critical"?"error":Y==="warning"?"warning":"info",V=Y=>Y==="critical"?"border-l-rose-500":Y==="warning"?"border-l-amber-500":"border-l-blue-500",W=(Y=>{const I={};for(const X of Y)I[X.severity]||(I[X.severity]=[]),I[X.severity].push(X);return I})(w),$={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(ne,{title:"Pending",value:j.length,color:"indigo"}),n.jsx(ne,{title:"Critical",value:C.length,color:"rose"}),n.jsx(ne,{title:"Warnings",value:O.length,color:"amber"}),n.jsx(ne,{title:"Dismissed",value:y.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 (${j.length})`},{value:"dismissed",label:`Dismissed (${y.length})`},{value:"all",label:`All (${m.length})`}].map(Y=>n.jsx("button",{onClick:()=>o(Y.value),className:`px-3 py-1.5 text-xs rounded-md transition-colors ${r===Y.value?"bg-gray-700 text-white":"text-gray-400 hover:text-gray-300"}`,children:Y.label},Y.value))}),j.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"})]}),w.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(Y=>{const I=W[Y];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:$[Y]||Y}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:["(",I.length,")"]})]}),n.jsx("div",{className:"space-y-2",children:I.map(X=>n.jsxs("div",{className:`bg-gray-900/50 border border-gray-800 border-l-4 ${V(X.severity)} rounded-xl p-4 flex items-start gap-4 ${X.dismissedAt?"opacity-60":""}`,children:[n.jsx(Sp,{severity:X.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:X.title}),n.jsx(de,{label:X.severity,variant:H(X.severity)}),X.type&&n.jsx(de,{label:X.type,variant:"default"})]}),X.message&&n.jsx("p",{className:"text-xs text-gray-400 mb-2",children:X.message}),n.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-gray-600",children:[n.jsx("span",{children:new Date(X.createdAt).toLocaleString()}),X.source&&n.jsxs("span",{children:["via ",X.source]}),X.dismissedAt&&n.jsxs("span",{children:["Dismissed ",new Date(X.dismissedAt).toLocaleString()]})]})]}),!X.dismissedAt&&n.jsx("button",{onClick:()=>R(X.id),disabled:u===X.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===X.id?"...":"Dismiss"})]},X.id))})]},Y)})})]})}function Sp({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 Ep(r){if(!r)return null;if(r.startsWith("https://"))return r.replace(/\.git$/,"");const o=r.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(o)return`https://${o[1]}/${o[2]}`;const u=r.match(/^ssh:\/\/git@([^/]+)\/(.+?)(?:\.git)?$/);return u?`https://${u[1]}/${u[2]}`:null}function Tp(){const{data:r,loading:o,error:u}=Ue("/api/repos");if(o)return n.jsx(jt,{});if(u)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",u]});const c=r||[],d=[...new Set(c.map(v=>v.org))],x=c.filter(v=>v.hasSpecweave).length,g=c.find(v=>v.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(ne,{title:"Repositories",value:c.length,color:"indigo"}),n.jsx(ne,{title:"Organizations",value:d.length,color:"cyan"}),n.jsx(ne,{title:"With SpecWeave",value:x,color:"emerald"}),n.jsx(ne,{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:d.map(v=>{const p=c.filter(m=>m.org===v);return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(Cp,{}),n.jsx("h3",{className:"text-sm font-medium text-gray-300",children:v}),n.jsxs("span",{className:"text-[10px] text-gray-600",children:[p.length," ",p.length===1?"repo":"repos"]})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:p.map(m=>{const j=Ep(m.remote);return n.jsxs("div",{className:`bg-gray-900/50 border rounded-xl p-4 ${m.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(Ap,{}),n.jsx("span",{className:"text-sm font-medium text-gray-300",children:m.name})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[m.isCurrent&&n.jsx(de,{label:"Current Project",variant:"info"}),n.jsx(de,{label:m.hasSpecweave?"SpecWeave":"No SpecWeave",variant:m.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:m.org})]}),m.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:m.branch,variant:"default"})]}),j&&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:j,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-indigo-400 hover:text-indigo-300 hover:underline truncate max-w-[180px]",title:j,children:j.replace("https://","")})]}),!j&&m.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:m.remote,children:m.remote})]}),m.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:m.path,children:m.path.split("/").slice(-3).join("/")})]}),m.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:zp(m.lastModified)})]})]}),j&&n.jsxs("a",{href:j,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(Mp,{}),"Open on GitHub"]})]},m.path||`${m.org}/${m.name}`)})})]},v)})})]})}function Cp(){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 Ap(){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 Mp(){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 zp(r){if(!r)return"-";try{const o=Date.now()-new Date(r).getTime(),u=Math.floor(o/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 Rp(){const{id:r}=Ag(),{data:o,loading:u,error:c}=Ue(`/api/increments/${r||"_none"}`);if(!r)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"No increment ID specified"});if(u)return n.jsx(jt,{});if(c)return n.jsxs("div",{className:"p-6 text-rose-400 text-sm",children:["Error: ",c]});if(!o)return n.jsx("div",{className:"p-6 text-gray-500 text-sm",children:"Increment not found"});const d=o.taskSummary.total>0?Math.round(o.taskSummary.completed/o.taskSummary.total*100):0,x=o.acSummary.total>0?Math.round(o.acSummary.completed/o.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:o.dirName}),n.jsx(de,{label:o.metadata.status||"unknown",variant:Ni(o.metadata.status||"")}),o.metadata.type&&n.jsx("span",{className:"text-xs text-gray-400 capitalize",children:o.metadata.type}),o.metadata.priority&&n.jsx(_p,{priority:o.metadata.priority})]}),n.jsx("h2",{className:"text-lg font-semibold text-gray-200",children:o.metadata.title||o.id}),o.metadata.project&&n.jsxs("span",{className:"text-xs text-gray-500",children:["Project: ",o.metadata.project]})]}),n.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(ne,{title:"Tasks",value:`${o.taskSummary.completed}/${o.taskSummary.total}`,color:"indigo"}),n.jsx(ne,{title:"Task Progress",value:`${d}%`,color:"cyan"}),n.jsx(ne,{title:"ACs",value:`${o.acSummary.completed}/${o.acSummary.total}`,color:"emerald"}),n.jsx(ne,{title:"AC Progress",value:`${x}%`,color:"amber"})]}),n.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-xl p-5 space-y-4",children:[n.jsx(H0,{label:"Tasks",completed:o.taskSummary.completed,total:o.taskSummary.total,color:"indigo"}),n.jsx(H0,{label:"Acceptance Criteria",completed:o.acSummary.completed,total:o.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 (",o.tasks.length,")"]})}),o.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:o.tasks.map(g=>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 ${g.status==="completed"?"bg-indigo-500/20 border-indigo-500 text-indigo-400":"border-gray-600"}`,children:g.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:g.id}),n.jsx("span",{className:`text-sm ${g.status==="completed"?"text-gray-500 line-through":"text-gray-300"}`,children:g.title})]}),(g.userStory||g.acs)&&n.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[g.userStory&&n.jsx("span",{className:"text-[10px] text-indigo-400",children:g.userStory}),g.acs?.map(v=>n.jsx("span",{className:"text-[10px] text-emerald-500",children:v},v))]})]})]},g.id))})]}),o.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 (",o.acs.length,")"]})}),n.jsx("div",{className:"divide-y divide-gray-800/50",children:o.acs.map(g=>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 ${g.completed?"bg-emerald-500/20 border-emerald-500 text-emerald-400":"border-gray-600"}`,children:g.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:g.id}),n.jsx("span",{className:`text-sm ml-2 ${g.completed?"text-gray-500 line-through":"text-gray-300"}`,children:g.text})]})]},g.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(o.metadata).filter(([g])=>!["title"].includes(g)).map(([g,v])=>n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-xs text-gray-500 font-mono",children:g}),n.jsx("span",{className:"text-xs text-gray-400",children:typeof v=="object"?JSON.stringify(v):String(v??"")})]},g))})]})]})}function H0({label:r,completed:o,total:u,color:c}){const d=u>0?Math.round(o/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:[o,"/",u," (",d,"%)"]})]}),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:`${d}%`}})})]})}function _p({priority:r}){const o={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 ${o[r]||o.P2}`,children:r})}function wp(){const r=Ny();return n.jsx(nm.Provider,{value:r,children:n.jsxs("div",{className:"flex min-h-screen bg-gray-950 text-gray-100",children:[n.jsx(Ty,{}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[n.jsx(Cy,{}),n.jsx("main",{className:"flex-1 overflow-y-auto",children:n.jsxs(Xg,{children:[n.jsx(at,{path:"/",element:n.jsx(Hy,{})}),n.jsx(at,{path:"/increments",element:n.jsx(Yy,{})}),n.jsx(at,{path:"/increments/:id",element:n.jsx(Rp,{})}),n.jsx(at,{path:"/analytics",element:n.jsx(Qy,{})}),n.jsx(at,{path:"/costs",element:n.jsx(Jy,{})}),n.jsx(at,{path:"/sync",element:n.jsx(ap,{})}),n.jsx(at,{path:"/errors",element:n.jsx(np,{})}),n.jsx(at,{path:"/activity",element:n.jsx(dp,{})}),n.jsx(at,{path:"/config",element:n.jsx(hp,{})}),n.jsx(at,{path:"/plugins",element:n.jsx(pp,{})}),n.jsx(at,{path:"/services",element:n.jsx(bp,{})}),n.jsx(at,{path:"/notifications",element:n.jsx(Np,{})}),n.jsx(at,{path:"/repos",element:n.jsx(Tp,{})}),n.jsx(at,{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."})]})})]})})]})]})})}Vh.createRoot(document.getElementById("root")).render(n.jsx(E.StrictMode,{children:n.jsx(my,{children:n.jsx(wp,{})})}));
|