@kavachos/dashboard 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,265 @@
1
+ var G0=c=>{throw TypeError(c)};var lo=(c,u,r)=>u.has(c)||G0("Cannot "+r);var x=(c,u,r)=>(lo(c,u,"read from private field"),r?r.call(c):u.get(c)),I=(c,u,r)=>u.has(c)?G0("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(c):u.set(c,r),V=(c,u,r,o)=>(lo(c,u,"write to private field"),o?o.call(c,r):u.set(c,r),r),re=(c,u,r)=>(lo(c,u,"access private method"),r);var Su=(c,u,r,o)=>({set _(d){V(c,u,d,r)},get _(){return x(c,u,o)}});(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(d);new MutationObserver(d=>{for(const y of d)if(y.type==="childList")for(const p of y.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&o(p)}).observe(document,{childList:!0,subtree:!0});function r(d){const y={};return d.integrity&&(y.integrity=d.integrity),d.referrerPolicy&&(y.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?y.credentials="include":d.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function o(d){if(d.ep)return;d.ep=!0;const y=r(d);fetch(d.href,y)}})();var no={exports:{}},Vi={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var X0;function pv(){if(X0)return Vi;X0=1;var c=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function r(o,d,y){var p=null;if(y!==void 0&&(p=""+y),d.key!==void 0&&(p=""+d.key),"key"in d){y={};for(var z in d)z!=="key"&&(y[z]=d[z])}else y=d;return d=y.ref,{$$typeof:c,type:o,key:p,ref:d!==void 0?d:null,props:y}}return Vi.Fragment=u,Vi.jsx=r,Vi.jsxs=r,Vi}var Z0;function bv(){return Z0||(Z0=1,no.exports=pv()),no.exports}var i=bv(),ao={exports:{}},ae={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var K0;function jv(){if(K0)return ae;K0=1;var c=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),p=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),_=Symbol.iterator;function q(g){return g===null||typeof g!="object"?null:(g=_&&g[_]||g["@@iterator"],typeof g=="function"?g:null)}var Q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,X={};function L(g,U,K){this.props=g,this.context=U,this.refs=X,this.updater=K||Q}L.prototype.isReactComponent={},L.prototype.setState=function(g,U){if(typeof g!="object"&&typeof g!="function"&&g!=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,g,U,"setState")},L.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function G(){}G.prototype=L.prototype;function $(g,U,K){this.props=g,this.context=U,this.refs=X,this.updater=K||Q}var w=$.prototype=new G;w.constructor=$,B(w,L.prototype),w.isPureReactComponent=!0;var le=Array.isArray;function fe(){}var ne={H:null,A:null,T:null,S:null},ue=Object.prototype.hasOwnProperty;function Ae(g,U,K){var F=K.ref;return{$$typeof:c,type:g,key:U,ref:F!==void 0?F:null,props:K}}function Qe(g,U){return Ae(g.type,U,g.props)}function $e(g){return typeof g=="object"&&g!==null&&g.$$typeof===c}function We(g){var U={"=":"=0",":":"=2"};return"$"+g.replace(/[=:]/g,function(K){return U[K]})}var il=/\/+/g;function gt(g,U){return typeof g=="object"&&g!==null&&g.key!=null?We(""+g.key):U.toString(36)}function ot(g){switch(g.status){case"fulfilled":return g.value;case"rejected":throw g.reason;default:switch(typeof g.status=="string"?g.then(fe,fe):(g.status="pending",g.then(function(U){g.status==="pending"&&(g.status="fulfilled",g.value=U)},function(U){g.status==="pending"&&(g.status="rejected",g.reason=U)})),g.status){case"fulfilled":return g.value;case"rejected":throw g.reason}}throw g}function M(g,U,K,F,ie){var he=typeof g;(he==="undefined"||he==="boolean")&&(g=null);var ze=!1;if(g===null)ze=!0;else switch(he){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(g.$$typeof){case c:case u:ze=!0;break;case H:return ze=g._init,M(ze(g._payload),U,K,F,ie)}}if(ze)return ie=ie(g),ze=F===""?"."+gt(g,0):F,le(ie)?(K="",ze!=null&&(K=ze.replace(il,"$&/")+"/"),M(ie,U,K,"",function(Pa){return Pa})):ie!=null&&($e(ie)&&(ie=Qe(ie,K+(ie.key==null||g&&g.key===ie.key?"":(""+ie.key).replace(il,"$&/")+"/")+ze)),U.push(ie)),1;ze=0;var mt=F===""?".":F+":";if(le(g))for(var Ge=0;Ge<g.length;Ge++)F=g[Ge],he=mt+gt(F,Ge),ze+=M(F,U,K,he,ie);else if(Ge=q(g),typeof Ge=="function")for(g=Ge.call(g),Ge=0;!(F=g.next()).done;)F=F.value,he=mt+gt(F,Ge++),ze+=M(F,U,K,he,ie);else if(he==="object"){if(typeof g.then=="function")return M(ot(g),U,K,F,ie);throw U=String(g),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return ze}function Z(g,U,K){if(g==null)return g;var F=[],ie=0;return M(g,F,"","",function(he){return U.call(K,he,ie++)}),F}function te(g){if(g._status===-1){var U=g._result;U=U(),U.then(function(K){(g._status===0||g._status===-1)&&(g._status=1,g._result=K)},function(K){(g._status===0||g._status===-1)&&(g._status=2,g._result=K)}),g._status===-1&&(g._status=0,g._result=U)}if(g._status===1)return g._result.default;throw g._result}var Oe=typeof reportError=="function"?reportError:function(g){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof g=="object"&&g!==null&&typeof g.message=="string"?String(g.message):String(g),error:g});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",g);return}console.error(g)},we={map:Z,forEach:function(g,U,K){Z(g,function(){U.apply(this,arguments)},K)},count:function(g){var U=0;return Z(g,function(){U++}),U},toArray:function(g){return Z(g,function(U){return U})||[]},only:function(g){if(!$e(g))throw Error("React.Children.only expected to receive a single React element child.");return g}};return ae.Activity=O,ae.Children=we,ae.Component=L,ae.Fragment=r,ae.Profiler=d,ae.PureComponent=$,ae.StrictMode=o,ae.Suspense=S,ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ne,ae.__COMPILER_RUNTIME={__proto__:null,c:function(g){return ne.H.useMemoCache(g)}},ae.cache=function(g){return function(){return g.apply(null,arguments)}},ae.cacheSignal=function(){return null},ae.cloneElement=function(g,U,K){if(g==null)throw Error("The argument must be a React element, but you passed "+g+".");var F=B({},g.props),ie=g.key;if(U!=null)for(he in U.key!==void 0&&(ie=""+U.key),U)!ue.call(U,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&U.ref===void 0||(F[he]=U[he]);var he=arguments.length-2;if(he===1)F.children=K;else if(1<he){for(var ze=Array(he),mt=0;mt<he;mt++)ze[mt]=arguments[mt+2];F.children=ze}return Ae(g.type,ie,F)},ae.createContext=function(g){return g={$$typeof:p,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null},g.Provider=g,g.Consumer={$$typeof:y,_context:g},g},ae.createElement=function(g,U,K){var F,ie={},he=null;if(U!=null)for(F in U.key!==void 0&&(he=""+U.key),U)ue.call(U,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(ie[F]=U[F]);var ze=arguments.length-2;if(ze===1)ie.children=K;else if(1<ze){for(var mt=Array(ze),Ge=0;Ge<ze;Ge++)mt[Ge]=arguments[Ge+2];ie.children=mt}if(g&&g.defaultProps)for(F in ze=g.defaultProps,ze)ie[F]===void 0&&(ie[F]=ze[F]);return Ae(g,he,ie)},ae.createRef=function(){return{current:null}},ae.forwardRef=function(g){return{$$typeof:z,render:g}},ae.isValidElement=$e,ae.lazy=function(g){return{$$typeof:H,_payload:{_status:-1,_result:g},_init:te}},ae.memo=function(g,U){return{$$typeof:b,type:g,compare:U===void 0?null:U}},ae.startTransition=function(g){var U=ne.T,K={};ne.T=K;try{var F=g(),ie=ne.S;ie!==null&&ie(K,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(fe,Oe)}catch(he){Oe(he)}finally{U!==null&&K.types!==null&&(U.types=K.types),ne.T=U}},ae.unstable_useCacheRefresh=function(){return ne.H.useCacheRefresh()},ae.use=function(g){return ne.H.use(g)},ae.useActionState=function(g,U,K){return ne.H.useActionState(g,U,K)},ae.useCallback=function(g,U){return ne.H.useCallback(g,U)},ae.useContext=function(g){return ne.H.useContext(g)},ae.useDebugValue=function(){},ae.useDeferredValue=function(g,U){return ne.H.useDeferredValue(g,U)},ae.useEffect=function(g,U){return ne.H.useEffect(g,U)},ae.useEffectEvent=function(g){return ne.H.useEffectEvent(g)},ae.useId=function(){return ne.H.useId()},ae.useImperativeHandle=function(g,U,K){return ne.H.useImperativeHandle(g,U,K)},ae.useInsertionEffect=function(g,U){return ne.H.useInsertionEffect(g,U)},ae.useLayoutEffect=function(g,U){return ne.H.useLayoutEffect(g,U)},ae.useMemo=function(g,U){return ne.H.useMemo(g,U)},ae.useOptimistic=function(g,U){return ne.H.useOptimistic(g,U)},ae.useReducer=function(g,U,K){return ne.H.useReducer(g,U,K)},ae.useRef=function(g){return ne.H.useRef(g)},ae.useState=function(g){return ne.H.useState(g)},ae.useSyncExternalStore=function(g,U,K){return ne.H.useSyncExternalStore(g,U,K)},ae.useTransition=function(){return ne.H.useTransition()},ae.version="19.2.4",ae}var V0;function _o(){return V0||(V0=1,ao.exports=jv()),ao.exports}var k=_o(),io={exports:{}},ki={},so={exports:{}},uo={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var k0;function Sv(){return k0||(k0=1,(function(c){function u(M,Z){var te=M.length;M.push(Z);e:for(;0<te;){var Oe=te-1>>>1,we=M[Oe];if(0<d(we,Z))M[Oe]=Z,M[te]=we,te=Oe;else break e}}function r(M){return M.length===0?null:M[0]}function o(M){if(M.length===0)return null;var Z=M[0],te=M.pop();if(te!==Z){M[0]=te;e:for(var Oe=0,we=M.length,g=we>>>1;Oe<g;){var U=2*(Oe+1)-1,K=M[U],F=U+1,ie=M[F];if(0>d(K,te))F<we&&0>d(ie,K)?(M[Oe]=ie,M[F]=te,Oe=F):(M[Oe]=K,M[U]=te,Oe=U);else if(F<we&&0>d(ie,te))M[Oe]=ie,M[F]=te,Oe=F;else break e}}return Z}function d(M,Z){var te=M.sortIndex-Z.sortIndex;return te!==0?te:M.id-Z.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;c.unstable_now=function(){return y.now()}}else{var p=Date,z=p.now();c.unstable_now=function(){return p.now()-z}}var S=[],b=[],H=1,O=null,_=3,q=!1,Q=!1,B=!1,X=!1,L=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function w(M){for(var Z=r(b);Z!==null;){if(Z.callback===null)o(b);else if(Z.startTime<=M)o(b),Z.sortIndex=Z.expirationTime,u(S,Z);else break;Z=r(b)}}function le(M){if(B=!1,w(M),!Q)if(r(S)!==null)Q=!0,fe||(fe=!0,We());else{var Z=r(b);Z!==null&&ot(le,Z.startTime-M)}}var fe=!1,ne=-1,ue=5,Ae=-1;function Qe(){return X?!0:!(c.unstable_now()-Ae<ue)}function $e(){if(X=!1,fe){var M=c.unstable_now();Ae=M;var Z=!0;try{e:{Q=!1,B&&(B=!1,G(ne),ne=-1),q=!0;var te=_;try{t:{for(w(M),O=r(S);O!==null&&!(O.expirationTime>M&&Qe());){var Oe=O.callback;if(typeof Oe=="function"){O.callback=null,_=O.priorityLevel;var we=Oe(O.expirationTime<=M);if(M=c.unstable_now(),typeof we=="function"){O.callback=we,w(M),Z=!0;break t}O===r(S)&&o(S),w(M)}else o(S);O=r(S)}if(O!==null)Z=!0;else{var g=r(b);g!==null&&ot(le,g.startTime-M),Z=!1}}break e}finally{O=null,_=te,q=!1}Z=void 0}}finally{Z?We():fe=!1}}}var We;if(typeof $=="function")We=function(){$($e)};else if(typeof MessageChannel<"u"){var il=new MessageChannel,gt=il.port2;il.port1.onmessage=$e,We=function(){gt.postMessage(null)}}else We=function(){L($e,0)};function ot(M,Z){ne=L(function(){M(c.unstable_now())},Z)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(M){M.callback=null},c.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<M?Math.floor(1e3/M):5},c.unstable_getCurrentPriorityLevel=function(){return _},c.unstable_next=function(M){switch(_){case 1:case 2:case 3:var Z=3;break;default:Z=_}var te=_;_=Z;try{return M()}finally{_=te}},c.unstable_requestPaint=function(){X=!0},c.unstable_runWithPriority=function(M,Z){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var te=_;_=M;try{return Z()}finally{_=te}},c.unstable_scheduleCallback=function(M,Z,te){var Oe=c.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?Oe+te:Oe):te=Oe,M){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=te+we,M={id:H++,callback:Z,priorityLevel:M,startTime:te,expirationTime:we,sortIndex:-1},te>Oe?(M.sortIndex=te,u(b,M),r(S)===null&&M===r(b)&&(B?(G(ne),ne=-1):B=!0,ot(le,te-Oe))):(M.sortIndex=we,u(S,M),Q||q||(Q=!0,fe||(fe=!0,We()))),M},c.unstable_shouldYield=Qe,c.unstable_wrapCallback=function(M){var Z=_;return function(){var te=_;_=Z;try{return M.apply(this,arguments)}finally{_=te}}}})(uo)),uo}var J0;function zv(){return J0||(J0=1,so.exports=Sv()),so.exports}var co={exports:{}},ft={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var F0;function Nv(){if(F0)return ft;F0=1;var c=_o();function u(S){var b="https://react.dev/errors/"+S;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var H=2;H<arguments.length;H++)b+="&args[]="+encodeURIComponent(arguments[H])}return"Minified React error #"+S+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(u(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},d=Symbol.for("react.portal");function y(S,b,H){var O=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:O==null?null:""+O,children:S,containerInfo:b,implementation:H}}var p=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function z(S,b){if(S==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return ft.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,ft.createPortal=function(S,b){var H=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(u(299));return y(S,b,null,H)},ft.flushSync=function(S){var b=p.T,H=o.p;try{if(p.T=null,o.p=2,S)return S()}finally{p.T=b,o.p=H,o.d.f()}},ft.preconnect=function(S,b){typeof S=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,o.d.C(S,b))},ft.prefetchDNS=function(S){typeof S=="string"&&o.d.D(S)},ft.preinit=function(S,b){if(typeof S=="string"&&b&&typeof b.as=="string"){var H=b.as,O=z(H,b.crossOrigin),_=typeof b.integrity=="string"?b.integrity:void 0,q=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;H==="style"?o.d.S(S,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:O,integrity:_,fetchPriority:q}):H==="script"&&o.d.X(S,{crossOrigin:O,integrity:_,fetchPriority:q,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},ft.preinitModule=function(S,b){if(typeof S=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var H=z(b.as,b.crossOrigin);o.d.M(S,{crossOrigin:H,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&o.d.M(S)},ft.preload=function(S,b){if(typeof S=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var H=b.as,O=z(H,b.crossOrigin);o.d.L(S,H,{crossOrigin:O,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},ft.preloadModule=function(S,b){if(typeof S=="string")if(b){var H=z(b.as,b.crossOrigin);o.d.m(S,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:H,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else o.d.m(S)},ft.requestFormReset=function(S){o.d.r(S)},ft.unstable_batchedUpdates=function(S,b){return S(b)},ft.useFormState=function(S,b,H){return p.H.useFormState(S,b,H)},ft.useFormStatus=function(){return p.H.useHostTransitionStatus()},ft.version="19.2.4",ft}var $0;function Av(){if($0)return co.exports;$0=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(u){console.error(u)}}return c(),co.exports=Nv(),co.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var W0;function Ev(){if(W0)return ki;W0=1;var c=zv(),u=_o(),r=Av();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function y(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function z(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 S(e){if(y(e)!==e)throw Error(o(188))}function b(e){var t=e.alternate;if(!t){if(t=y(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,n=t;;){var a=l.return;if(a===null)break;var s=a.alternate;if(s===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===l)return S(a),e;if(s===n)return S(a),t;s=s.sibling}throw Error(o(188))}if(l.return!==n.return)l=a,n=s;else{for(var f=!1,h=a.child;h;){if(h===l){f=!0,l=a,n=s;break}if(h===n){f=!0,n=a,l=s;break}h=h.sibling}if(!f){for(h=s.child;h;){if(h===l){f=!0,l=s,n=a;break}if(h===n){f=!0,n=s,l=a;break}h=h.sibling}if(!f)throw Error(o(189))}}if(l.alternate!==n)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:t}function H(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=H(e),t!==null)return t;e=e.sibling}return null}var O=Object.assign,_=Symbol.for("react.element"),q=Symbol.for("react.transitional.element"),Q=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),$=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),Ae=Symbol.for("react.activity"),Qe=Symbol.for("react.memo_cache_sentinel"),$e=Symbol.iterator;function We(e){return e===null||typeof e!="object"?null:(e=$e&&e[$e]||e["@@iterator"],typeof e=="function"?e:null)}var il=Symbol.for("react.client.reference");function gt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===il?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case L:return"Profiler";case X:return"StrictMode";case le:return"Suspense";case fe:return"SuspenseList";case Ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Q:return"Portal";case $:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case w:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ne:return t=e.displayName||null,t!==null?t:gt(e.type)||"Memo";case ue:t=e._payload,e=e._init;try{return gt(e(t))}catch{}}return null}var ot=Array.isArray,M=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},Oe=[],we=-1;function g(e){return{current:e}}function U(e){0>we||(e.current=Oe[we],Oe[we]=null,we--)}function K(e,t){we++,Oe[we]=e.current,e.current=t}var F=g(null),ie=g(null),he=g(null),ze=g(null);function mt(e,t){switch(K(he,t),K(ie,e),K(F,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?f0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=f0(t),e=d0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(F),K(F,e)}function Ge(){U(F),U(ie),U(he)}function Pa(e){e.memoizedState!==null&&K(ze,e);var t=F.current,l=d0(t,e.type);t!==l&&(K(ie,e),K(F,l))}function as(e){ie.current===e&&(U(F),U(ie)),ze.current===e&&(U(ze),Gi._currentValue=te)}var Qu,Lo;function Sn(e){if(Qu===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Qu=t&&t[1]||"",Lo=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Qu+e+Lo}var Bu=!1;function Lu(e,t){if(!e||Bu)return"";Bu=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(T){var E=T}Reflect.construct(e,[],R)}else{try{R.call()}catch(T){E=T}e.call(R.prototype)}}else{try{throw Error()}catch(T){E=T}(R=e())&&typeof R.catch=="function"&&R.catch(function(){})}}catch(T){if(T&&E&&typeof T.stack=="string")return[T.stack,E.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=n.DetermineComponentFrameRoot(),f=s[0],h=s[1];if(f&&h){var m=f.split(`
44
+ `),A=h.split(`
45
+ `);for(a=n=0;n<m.length&&!m[n].includes("DetermineComponentFrameRoot");)n++;for(;a<A.length&&!A[a].includes("DetermineComponentFrameRoot");)a++;if(n===m.length||a===A.length)for(n=m.length-1,a=A.length-1;1<=n&&0<=a&&m[n]!==A[a];)a--;for(;1<=n&&0<=a;n--,a--)if(m[n]!==A[a]){if(n!==1||a!==1)do if(n--,a--,0>a||m[n]!==A[a]){var C=`
46
+ `+m[n].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),C}while(1<=n&&0<=a);break}}}finally{Bu=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Sn(l):""}function $m(e,t){switch(e.tag){case 26:case 27:case 5:return Sn(e.type);case 16:return Sn("Lazy");case 13:return e.child!==t&&t!==null?Sn("Suspense Fallback"):Sn("Suspense");case 19:return Sn("SuspenseList");case 0:case 15:return Lu(e.type,!1);case 11:return Lu(e.type.render,!1);case 1:return Lu(e.type,!0);case 31:return Sn("Activity");default:return""}}function Yo(e){try{var t="",l=null;do t+=$m(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
47
+ Error generating stack: `+n.message+`
48
+ `+n.stack}}var Yu=Object.prototype.hasOwnProperty,Gu=c.unstable_scheduleCallback,Xu=c.unstable_cancelCallback,Wm=c.unstable_shouldYield,Im=c.unstable_requestPaint,Ot=c.unstable_now,Pm=c.unstable_getCurrentPriorityLevel,Go=c.unstable_ImmediatePriority,Xo=c.unstable_UserBlockingPriority,is=c.unstable_NormalPriority,ex=c.unstable_LowPriority,Zo=c.unstable_IdlePriority,tx=c.log,lx=c.unstable_setDisableYieldValue,ei=null,Ct=null;function Bl(e){if(typeof tx=="function"&&lx(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(ei,e)}catch{}}var Mt=Math.clz32?Math.clz32:ix,nx=Math.log,ax=Math.LN2;function ix(e){return e>>>=0,e===0?32:31-(nx(e)/ax|0)|0}var ss=256,us=262144,cs=4194304;function zn(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 rs(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var a=0,s=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var h=n&134217727;return h!==0?(n=h&~s,n!==0?a=zn(n):(f&=h,f!==0?a=zn(f):l||(l=h&~e,l!==0&&(a=zn(l))))):(h=n&~s,h!==0?a=zn(h):f!==0?a=zn(f):l||(l=n&~e,l!==0&&(a=zn(l)))),a===0?0:t!==0&&t!==a&&(t&s)===0&&(s=a&-a,l=t&-t,s>=l||s===32&&(l&4194048)!==0)?t:a}function ti(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function sx(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 Ko(){var e=cs;return cs<<=1,(cs&62914560)===0&&(cs=4194304),e}function Zu(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function li(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ux(e,t,l,n,a,s){var f=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var h=e.entanglements,m=e.expirationTimes,A=e.hiddenUpdates;for(l=f&~l;0<l;){var C=31-Mt(l),R=1<<C;h[C]=0,m[C]=-1;var E=A[C];if(E!==null)for(A[C]=null,C=0;C<E.length;C++){var T=E[C];T!==null&&(T.lane&=-536870913)}l&=~R}n!==0&&Vo(e,n,0),s!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=s&~(f&~t))}function Vo(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Mt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function ko(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-Mt(l),a=1<<n;a&t|e[n]&t&&(e[n]|=t),l&=~a}}function Jo(e,t){var l=t&-t;return l=(l&42)!==0?1:Ku(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ku(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 Vu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fo(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:U0(e.type))}function $o(e,t){var l=Z.p;try{return Z.p=e,t()}finally{Z.p=l}}var Ll=Math.random().toString(36).slice(2),at="__reactFiber$"+Ll,pt="__reactProps$"+Ll,ta="__reactContainer$"+Ll,ku="__reactEvents$"+Ll,cx="__reactListeners$"+Ll,rx="__reactHandles$"+Ll,Wo="__reactResources$"+Ll,ni="__reactMarker$"+Ll;function Ju(e){delete e[at],delete e[pt],delete e[ku],delete e[cx],delete e[rx]}function la(e){var t=e[at];if(t)return t;for(var l=e.parentNode;l;){if(t=l[ta]||l[at]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=p0(e);e!==null;){if(l=e[at])return l;e=p0(e)}return t}e=l,l=e.parentNode}return null}function na(e){if(e=e[at]||e[ta]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ai(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function aa(e){var t=e[Wo];return t||(t=e[Wo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function tt(e){e[ni]=!0}var Io=new Set,Po={};function Nn(e,t){ia(e,t),ia(e+"Capture",t)}function ia(e,t){for(Po[e]=t,e=0;e<t.length;e++)Io.add(t[e])}var ox=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]*$"),ef={},tf={};function fx(e){return Yu.call(tf,e)?!0:Yu.call(ef,e)?!1:ox.test(e)?tf[e]=!0:(ef[e]=!0,!1)}function os(e,t,l){if(fx(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function fs(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function hl(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+n)}}function Gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dx(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(f){l=""+f,s.call(this,f)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(f){l=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fu(e){if(!e._valueTracker){var t=lf(e)?"checked":"value";e._valueTracker=dx(e,t,""+e[t])}}function nf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=lf(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}function ds(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 hx=/[\n"\\]/g;function Xt(e){return e.replace(hx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function $u(e,t,l,n,a,s,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=""+Gt(t)):e.value!==""+Gt(t)&&(e.value=""+Gt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?Wu(e,f,Gt(t)):l!=null?Wu(e,f,Gt(l)):n!=null&&e.removeAttribute("value"),a==null&&s!=null&&(e.defaultChecked=!!s),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+Gt(h):e.removeAttribute("name")}function af(e,t,l,n,a,s,f,h){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||l!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Fu(e);return}l=l!=null?""+Gt(l):"",t=t!=null?""+Gt(t):l,h||t===e.value||(e.value=t),e.defaultValue=t}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=h?e.checked:!!n,e.defaultChecked=!!n,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),Fu(e)}function Wu(e,t,l){t==="number"&&ds(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function sa(e,t,l,n){if(e=e.options,t){t={};for(var a=0;a<l.length;a++)t["$"+l[a]]=!0;for(l=0;l<e.length;l++)a=t.hasOwnProperty("$"+e[l].value),e[l].selected!==a&&(e[l].selected=a),a&&n&&(e[l].defaultSelected=!0)}else{for(l=""+Gt(l),t=null,a=0;a<e.length;a++){if(e[a].value===l){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function sf(e,t,l){if(t!=null&&(t=""+Gt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Gt(l):""}function uf(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(o(92));if(ot(n)){if(1<n.length)throw Error(o(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=Gt(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),Fu(e)}function ua(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var mx=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 cf(e,t,l){var n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||mx.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function rf(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var a in t)n=t[a],t.hasOwnProperty(a)&&l[a]!==n&&cf(e,a,n)}else for(var s in t)t.hasOwnProperty(s)&&cf(e,s,t[s])}function Iu(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 xx=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"]]),yx=/^[\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 hs(e){return yx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ml(){}var Pu=null;function ec(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ca=null,ra=null;function of(e){var t=na(e);if(t&&(e=t.stateNode)){var l=e[pt]||null;e:switch(e=t.stateNode,t.type){case"input":if($u(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Xt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var a=n[pt]||null;if(!a)throw Error(o(90));$u(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&nf(n)}break e;case"textarea":sf(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&sa(e,!!l.multiple,t,!1)}}}var tc=!1;function ff(e,t,l){if(tc)return e(t,l);tc=!0;try{var n=e(t);return n}finally{if(tc=!1,(ca!==null||ra!==null)&&(eu(),ca&&(t=ca,e=ra,ra=ca=null,of(t),e)))for(t=0;t<e.length;t++)of(e[t])}}function ii(e,t){var l=e.stateNode;if(l===null)return null;var n=l[pt]||null;if(n===null)return null;l=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(o(231,t,typeof l));return l}var xl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lc=!1;if(xl)try{var si={};Object.defineProperty(si,"passive",{get:function(){lc=!0}}),window.addEventListener("test",si,si),window.removeEventListener("test",si,si)}catch{lc=!1}var Yl=null,nc=null,ms=null;function df(){if(ms)return ms;var e,t=nc,l=t.length,n,a="value"in Yl?Yl.value:Yl.textContent,s=a.length;for(e=0;e<l&&t[e]===a[e];e++);var f=l-e;for(n=1;n<=f&&t[l-n]===a[s-n];n++);return ms=a.slice(e,1<n?1-n:void 0)}function xs(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 ys(){return!0}function hf(){return!1}function bt(e){function t(l,n,a,s,f){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=s,this.target=f,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(l=e[h],this[h]=l?l(s):s[h]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ys:hf,this.isPropagationStopped=hf,this}return O(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ys)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ys)},persist:function(){},isPersistent:ys}),t}var An={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vs=bt(An),ui=O({},An,{view:0,detail:0}),vx=bt(ui),ac,ic,ci,gs=O({},ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uc,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!==ci&&(ci&&e.type==="mousemove"?(ac=e.screenX-ci.screenX,ic=e.screenY-ci.screenY):ic=ac=0,ci=e),ac)},movementY:function(e){return"movementY"in e?e.movementY:ic}}),mf=bt(gs),gx=O({},gs,{dataTransfer:0}),px=bt(gx),bx=O({},ui,{relatedTarget:0}),sc=bt(bx),jx=O({},An,{animationName:0,elapsedTime:0,pseudoElement:0}),Sx=bt(jx),zx=O({},An,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Nx=bt(zx),Ax=O({},An,{data:0}),xf=bt(Ax),Ex={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tx={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"},Ox={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ox[e])?!!t[e]:!1}function uc(){return Cx}var Mx=O({},ui,{key:function(e){if(e.key){var t=Ex[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Tx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uc,charCode:function(e){return e.type==="keypress"?xs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_x=bt(Mx),wx=O({},gs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yf=bt(wx),Dx=O({},ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uc}),Rx=bt(Dx),Ux=O({},An,{propertyName:0,elapsedTime:0,pseudoElement:0}),qx=bt(Ux),Hx=O({},gs,{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}),Qx=bt(Hx),Bx=O({},An,{newState:0,oldState:0}),Lx=bt(Bx),Yx=[9,13,27,32],cc=xl&&"CompositionEvent"in window,ri=null;xl&&"documentMode"in document&&(ri=document.documentMode);var Gx=xl&&"TextEvent"in window&&!ri,vf=xl&&(!cc||ri&&8<ri&&11>=ri),gf=" ",pf=!1;function bf(e,t){switch(e){case"keyup":return Yx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var oa=!1;function Xx(e,t){switch(e){case"compositionend":return jf(t);case"keypress":return t.which!==32?null:(pf=!0,gf);case"textInput":return e=t.data,e===gf&&pf?null:e;default:return null}}function Zx(e,t){if(oa)return e==="compositionend"||!cc&&bf(e,t)?(e=df(),ms=nc=Yl=null,oa=!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 vf&&t.locale!=="ko"?null:t.data;default:return null}}var Kx={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 Sf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Kx[e.type]:t==="textarea"}function zf(e,t,l,n){ca?ra?ra.push(n):ra=[n]:ca=n,t=uu(t,"onChange"),0<t.length&&(l=new vs("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var oi=null,fi=null;function Vx(e){i0(e,0)}function ps(e){var t=ai(e);if(nf(t))return e}function Nf(e,t){if(e==="change")return t}var Af=!1;if(xl){var rc;if(xl){var oc="oninput"in document;if(!oc){var Ef=document.createElement("div");Ef.setAttribute("oninput","return;"),oc=typeof Ef.oninput=="function"}rc=oc}else rc=!1;Af=rc&&(!document.documentMode||9<document.documentMode)}function Tf(){oi&&(oi.detachEvent("onpropertychange",Of),fi=oi=null)}function Of(e){if(e.propertyName==="value"&&ps(fi)){var t=[];zf(t,fi,e,ec(e)),ff(Vx,t)}}function kx(e,t,l){e==="focusin"?(Tf(),oi=t,fi=l,oi.attachEvent("onpropertychange",Of)):e==="focusout"&&Tf()}function Jx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ps(fi)}function Fx(e,t){if(e==="click")return ps(t)}function $x(e,t){if(e==="input"||e==="change")return ps(t)}function Wx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _t=typeof Object.is=="function"?Object.is:Wx;function di(e,t){if(_t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!Yu.call(t,a)||!_t(e[a],t[a]))return!1}return!0}function Cf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mf(e,t){var l=Cf(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Cf(l)}}function _f(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_f(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ds(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=ds(e.document)}return t}function fc(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 Ix=xl&&"documentMode"in document&&11>=document.documentMode,fa=null,dc=null,hi=null,hc=!1;function Df(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;hc||fa==null||fa!==ds(n)||(n=fa,"selectionStart"in n&&fc(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),hi&&di(hi,n)||(hi=n,n=uu(dc,"onSelect"),0<n.length&&(t=new vs("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=fa)))}function En(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var da={animationend:En("Animation","AnimationEnd"),animationiteration:En("Animation","AnimationIteration"),animationstart:En("Animation","AnimationStart"),transitionrun:En("Transition","TransitionRun"),transitionstart:En("Transition","TransitionStart"),transitioncancel:En("Transition","TransitionCancel"),transitionend:En("Transition","TransitionEnd")},mc={},Rf={};xl&&(Rf=document.createElement("div").style,"AnimationEvent"in window||(delete da.animationend.animation,delete da.animationiteration.animation,delete da.animationstart.animation),"TransitionEvent"in window||delete da.transitionend.transition);function Tn(e){if(mc[e])return mc[e];if(!da[e])return e;var t=da[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Rf)return mc[e]=t[l];return e}var Uf=Tn("animationend"),qf=Tn("animationiteration"),Hf=Tn("animationstart"),Px=Tn("transitionrun"),ey=Tn("transitionstart"),ty=Tn("transitioncancel"),Qf=Tn("transitionend"),Bf=new Map,xc="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(" ");xc.push("scrollEnd");function tl(e,t){Bf.set(e,t),Nn(t,[e])}var bs=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)},Zt=[],ha=0,yc=0;function js(){for(var e=ha,t=yc=ha=0;t<e;){var l=Zt[t];Zt[t++]=null;var n=Zt[t];Zt[t++]=null;var a=Zt[t];Zt[t++]=null;var s=Zt[t];if(Zt[t++]=null,n!==null&&a!==null){var f=n.pending;f===null?a.next=a:(a.next=f.next,f.next=a),n.pending=a}s!==0&&Lf(l,a,s)}}function Ss(e,t,l,n){Zt[ha++]=e,Zt[ha++]=t,Zt[ha++]=l,Zt[ha++]=n,yc|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function vc(e,t,l,n){return Ss(e,t,l,n),zs(e)}function On(e,t){return Ss(e,null,null,t),zs(e)}function Lf(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var a=!1,s=e.return;s!==null;)s.childLanes|=l,n=s.alternate,n!==null&&(n.childLanes|=l),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(a=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,a&&t!==null&&(a=31-Mt(l),e=s.hiddenUpdates,n=e[a],n===null?e[a]=[t]:n.push(t),t.lane=l|536870912),s):null}function zs(e){if(50<Ui)throw Ui=0,Er=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ma={};function ly(e,t,l,n){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wt(e,t,l,n){return new ly(e,t,l,n)}function gc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yl(e,t){var l=e.alternate;return l===null?(l=wt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Yf(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ns(e,t,l,n,a,s){var f=0;if(n=e,typeof e=="function")gc(e)&&(f=1);else if(typeof e=="string")f=uv(e,l,F.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Ae:return e=wt(31,l,t,a),e.elementType=Ae,e.lanes=s,e;case B:return Cn(l.children,a,s,t);case X:f=8,a|=24;break;case L:return e=wt(12,l,t,a|2),e.elementType=L,e.lanes=s,e;case le:return e=wt(13,l,t,a),e.elementType=le,e.lanes=s,e;case fe:return e=wt(19,l,t,a),e.elementType=fe,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:f=10;break e;case G:f=9;break e;case w:f=11;break e;case ne:f=14;break e;case ue:f=16,n=null;break e}f=29,l=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=wt(f,l,t,a),t.elementType=e,t.type=n,t.lanes=s,t}function Cn(e,t,l,n){return e=wt(7,e,n,t),e.lanes=l,e}function pc(e,t,l){return e=wt(6,e,null,t),e.lanes=l,e}function Gf(e){var t=wt(18,null,null,0);return t.stateNode=e,t}function bc(e,t,l){return t=wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Xf=new WeakMap;function Kt(e,t){if(typeof e=="object"&&e!==null){var l=Xf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Yo(t)},Xf.set(e,t),t)}return{value:e,source:t,stack:Yo(t)}}var xa=[],ya=0,As=null,mi=0,Vt=[],kt=0,Gl=null,sl=1,ul="";function vl(e,t){xa[ya++]=mi,xa[ya++]=As,As=e,mi=t}function Zf(e,t,l){Vt[kt++]=sl,Vt[kt++]=ul,Vt[kt++]=Gl,Gl=e;var n=sl;e=ul;var a=32-Mt(n)-1;n&=~(1<<a),l+=1;var s=32-Mt(t)+a;if(30<s){var f=a-a%5;s=(n&(1<<f)-1).toString(32),n>>=f,a-=f,sl=1<<32-Mt(t)+a|l<<a|n,ul=s+e}else sl=1<<s|l<<a|n,ul=e}function jc(e){e.return!==null&&(vl(e,1),Zf(e,1,0))}function Sc(e){for(;e===As;)As=xa[--ya],xa[ya]=null,mi=xa[--ya],xa[ya]=null;for(;e===Gl;)Gl=Vt[--kt],Vt[kt]=null,ul=Vt[--kt],Vt[kt]=null,sl=Vt[--kt],Vt[kt]=null}function Kf(e,t){Vt[kt++]=sl,Vt[kt++]=ul,Vt[kt++]=Gl,sl=t.id,ul=t.overflow,Gl=e}var it=null,Re=null,ge=!1,Xl=null,Jt=!1,zc=Error(o(519));function Zl(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xi(Kt(t,e)),zc}function Vf(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[at]=e,t[pt]=n,l){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(l=0;l<Hi.length;l++)xe(Hi[l],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),af(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),uf(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||r0(t.textContent,l)?(n.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),n.onScroll!=null&&xe("scroll",t),n.onScrollEnd!=null&&xe("scrollend",t),n.onClick!=null&&(t.onclick=ml),t=!0):t=!1,t||Zl(e,!0)}function kf(e){for(it=e.return;it;)switch(it.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:it=it.return}}function va(e){if(e!==it)return!1;if(!ge)return kf(e),ge=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Yr(e.type,e.memoizedProps)),l=!l),l&&Re&&Zl(e),kf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Re=g0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Re=g0(e)}else t===27?(t=Re,an(e.type)?(e=Vr,Vr=null,Re=e):Re=t):Re=it?$t(e.stateNode.nextSibling):null;return!0}function Mn(){Re=it=null,ge=!1}function Nc(){var e=Xl;return e!==null&&(Nt===null?Nt=e:Nt.push.apply(Nt,e),Xl=null),e}function xi(e){Xl===null?Xl=[e]:Xl.push(e)}var Ac=g(null),_n=null,gl=null;function Kl(e,t,l){K(Ac,t._currentValue),t._currentValue=l}function pl(e){e._currentValue=Ac.current,U(Ac)}function Ec(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function Tc(e,t,l,n){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){var f=a.child;s=s.firstContext;e:for(;s!==null;){var h=s;s=a;for(var m=0;m<t.length;m++)if(h.context===t[m]){s.lanes|=l,h=s.alternate,h!==null&&(h.lanes|=l),Ec(s.return,l,e),n||(f=null);break e}s=h.next}}else if(a.tag===18){if(f=a.return,f===null)throw Error(o(341));f.lanes|=l,s=f.alternate,s!==null&&(s.lanes|=l),Ec(f,l,e),f=null}else f=a.child;if(f!==null)f.return=a;else for(f=a;f!==null;){if(f===e){f=null;break}if(a=f.sibling,a!==null){a.return=f.return,f=a;break}f=f.return}a=f}}function ga(e,t,l,n){e=null;for(var a=t,s=!1;a!==null;){if(!s){if((a.flags&524288)!==0)s=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var f=a.alternate;if(f===null)throw Error(o(387));if(f=f.memoizedProps,f!==null){var h=a.type;_t(a.pendingProps.value,f.value)||(e!==null?e.push(h):e=[h])}}else if(a===ze.current){if(f=a.alternate,f===null)throw Error(o(387));f.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Gi):e=[Gi])}a=a.return}e!==null&&Tc(t,e,l,n),t.flags|=262144}function Es(e){for(e=e.firstContext;e!==null;){if(!_t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wn(e){_n=e,gl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function st(e){return Jf(_n,e)}function Ts(e,t){return _n===null&&wn(e),Jf(e,t)}function Jf(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},gl===null){if(e===null)throw Error(o(308));gl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else gl=gl.next=t;return l}var ny=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},ay=c.unstable_scheduleCallback,iy=c.unstable_NormalPriority,Ke={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Oc(){return{controller:new ny,data:new Map,refCount:0}}function yi(e){e.refCount--,e.refCount===0&&ay(iy,function(){e.controller.abort()})}var vi=null,Cc=0,pa=0,ba=null;function sy(e,t){if(vi===null){var l=vi=[];Cc=0,pa=wr(),ba={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Cc++,t.then(Ff,Ff),t}function Ff(){if(--Cc===0&&vi!==null){ba!==null&&(ba.status="fulfilled");var e=vi;vi=null,pa=0,ba=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function uy(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var a=0;a<l.length;a++)(0,l[a])(t)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var $f=M.S;M.S=function(e,t){Dh=Ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&sy(e,t),$f!==null&&$f(e,t)};var Dn=g(null);function Mc(){var e=Dn.current;return e!==null?e:De.pooledCache}function Os(e,t){t===null?K(Dn,Dn.current):K(Dn,t.pool)}function Wf(){var e=Mc();return e===null?null:{parent:Ke._currentValue,pool:e}}var ja=Error(o(460)),_c=Error(o(474)),Cs=Error(o(542)),Ms={then:function(){}};function If(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Pf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(ml,ml),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,td(e),e;default:if(typeof t.status=="string")t.then(ml,ml);else{if(e=De,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=n}},function(n){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,td(e),e}throw Un=t,ja}}function Rn(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Un=l,ja):l}}var Un=null;function ed(){if(Un===null)throw Error(o(459));var e=Un;return Un=null,e}function td(e){if(e===ja||e===Cs)throw Error(o(483))}var Sa=null,gi=0;function _s(e){var t=gi;return gi+=1,Sa===null&&(Sa=[]),Pf(Sa,e,t)}function pi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ws(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ld(e){function t(j,v){if(e){var N=j.deletions;N===null?(j.deletions=[v],j.flags|=16):N.push(v)}}function l(j,v){if(!e)return null;for(;v!==null;)t(j,v),v=v.sibling;return null}function n(j){for(var v=new Map;j!==null;)j.key!==null?v.set(j.key,j):v.set(j.index,j),j=j.sibling;return v}function a(j,v){return j=yl(j,v),j.index=0,j.sibling=null,j}function s(j,v,N){return j.index=N,e?(N=j.alternate,N!==null?(N=N.index,N<v?(j.flags|=67108866,v):N):(j.flags|=67108866,v)):(j.flags|=1048576,v)}function f(j){return e&&j.alternate===null&&(j.flags|=67108866),j}function h(j,v,N,D){return v===null||v.tag!==6?(v=pc(N,j.mode,D),v.return=j,v):(v=a(v,N),v.return=j,v)}function m(j,v,N,D){var P=N.type;return P===B?C(j,v,N.props.children,D,N.key):v!==null&&(v.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ue&&Rn(P)===v.type)?(v=a(v,N.props),pi(v,N),v.return=j,v):(v=Ns(N.type,N.key,N.props,null,j.mode,D),pi(v,N),v.return=j,v)}function A(j,v,N,D){return v===null||v.tag!==4||v.stateNode.containerInfo!==N.containerInfo||v.stateNode.implementation!==N.implementation?(v=bc(N,j.mode,D),v.return=j,v):(v=a(v,N.children||[]),v.return=j,v)}function C(j,v,N,D,P){return v===null||v.tag!==7?(v=Cn(N,j.mode,D,P),v.return=j,v):(v=a(v,N),v.return=j,v)}function R(j,v,N){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return v=pc(""+v,j.mode,N),v.return=j,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case q:return N=Ns(v.type,v.key,v.props,null,j.mode,N),pi(N,v),N.return=j,N;case Q:return v=bc(v,j.mode,N),v.return=j,v;case ue:return v=Rn(v),R(j,v,N)}if(ot(v)||We(v))return v=Cn(v,j.mode,N,null),v.return=j,v;if(typeof v.then=="function")return R(j,_s(v),N);if(v.$$typeof===$)return R(j,Ts(j,v),N);ws(j,v)}return null}function E(j,v,N,D){var P=v!==null?v.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return P!==null?null:h(j,v,""+N,D);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case q:return N.key===P?m(j,v,N,D):null;case Q:return N.key===P?A(j,v,N,D):null;case ue:return N=Rn(N),E(j,v,N,D)}if(ot(N)||We(N))return P!==null?null:C(j,v,N,D,null);if(typeof N.then=="function")return E(j,v,_s(N),D);if(N.$$typeof===$)return E(j,v,Ts(j,N),D);ws(j,N)}return null}function T(j,v,N,D,P){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return j=j.get(N)||null,h(v,j,""+D,P);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case q:return j=j.get(D.key===null?N:D.key)||null,m(v,j,D,P);case Q:return j=j.get(D.key===null?N:D.key)||null,A(v,j,D,P);case ue:return D=Rn(D),T(j,v,N,D,P)}if(ot(D)||We(D))return j=j.get(N)||null,C(v,j,D,P,null);if(typeof D.then=="function")return T(j,v,N,_s(D),P);if(D.$$typeof===$)return T(j,v,N,Ts(v,D),P);ws(v,D)}return null}function J(j,v,N,D){for(var P=null,be=null,W=v,ce=v=0,ve=null;W!==null&&ce<N.length;ce++){W.index>ce?(ve=W,W=null):ve=W.sibling;var je=E(j,W,N[ce],D);if(je===null){W===null&&(W=ve);break}e&&W&&je.alternate===null&&t(j,W),v=s(je,v,ce),be===null?P=je:be.sibling=je,be=je,W=ve}if(ce===N.length)return l(j,W),ge&&vl(j,ce),P;if(W===null){for(;ce<N.length;ce++)W=R(j,N[ce],D),W!==null&&(v=s(W,v,ce),be===null?P=W:be.sibling=W,be=W);return ge&&vl(j,ce),P}for(W=n(W);ce<N.length;ce++)ve=T(W,j,ce,N[ce],D),ve!==null&&(e&&ve.alternate!==null&&W.delete(ve.key===null?ce:ve.key),v=s(ve,v,ce),be===null?P=ve:be.sibling=ve,be=ve);return e&&W.forEach(function(on){return t(j,on)}),ge&&vl(j,ce),P}function ee(j,v,N,D){if(N==null)throw Error(o(151));for(var P=null,be=null,W=v,ce=v=0,ve=null,je=N.next();W!==null&&!je.done;ce++,je=N.next()){W.index>ce?(ve=W,W=null):ve=W.sibling;var on=E(j,W,je.value,D);if(on===null){W===null&&(W=ve);break}e&&W&&on.alternate===null&&t(j,W),v=s(on,v,ce),be===null?P=on:be.sibling=on,be=on,W=ve}if(je.done)return l(j,W),ge&&vl(j,ce),P;if(W===null){for(;!je.done;ce++,je=N.next())je=R(j,je.value,D),je!==null&&(v=s(je,v,ce),be===null?P=je:be.sibling=je,be=je);return ge&&vl(j,ce),P}for(W=n(W);!je.done;ce++,je=N.next())je=T(W,j,ce,je.value,D),je!==null&&(e&&je.alternate!==null&&W.delete(je.key===null?ce:je.key),v=s(je,v,ce),be===null?P=je:be.sibling=je,be=je);return e&&W.forEach(function(gv){return t(j,gv)}),ge&&vl(j,ce),P}function _e(j,v,N,D){if(typeof N=="object"&&N!==null&&N.type===B&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case q:e:{for(var P=N.key;v!==null;){if(v.key===P){if(P=N.type,P===B){if(v.tag===7){l(j,v.sibling),D=a(v,N.props.children),D.return=j,j=D;break e}}else if(v.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===ue&&Rn(P)===v.type){l(j,v.sibling),D=a(v,N.props),pi(D,N),D.return=j,j=D;break e}l(j,v);break}else t(j,v);v=v.sibling}N.type===B?(D=Cn(N.props.children,j.mode,D,N.key),D.return=j,j=D):(D=Ns(N.type,N.key,N.props,null,j.mode,D),pi(D,N),D.return=j,j=D)}return f(j);case Q:e:{for(P=N.key;v!==null;){if(v.key===P)if(v.tag===4&&v.stateNode.containerInfo===N.containerInfo&&v.stateNode.implementation===N.implementation){l(j,v.sibling),D=a(v,N.children||[]),D.return=j,j=D;break e}else{l(j,v);break}else t(j,v);v=v.sibling}D=bc(N,j.mode,D),D.return=j,j=D}return f(j);case ue:return N=Rn(N),_e(j,v,N,D)}if(ot(N))return J(j,v,N,D);if(We(N)){if(P=We(N),typeof P!="function")throw Error(o(150));return N=P.call(N),ee(j,v,N,D)}if(typeof N.then=="function")return _e(j,v,_s(N),D);if(N.$$typeof===$)return _e(j,v,Ts(j,N),D);ws(j,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,v!==null&&v.tag===6?(l(j,v.sibling),D=a(v,N),D.return=j,j=D):(l(j,v),D=pc(N,j.mode,D),D.return=j,j=D),f(j)):l(j,v)}return function(j,v,N,D){try{gi=0;var P=_e(j,v,N,D);return Sa=null,P}catch(W){if(W===ja||W===Cs)throw W;var be=wt(29,W,null,j.mode);return be.lanes=D,be.return=j,be}finally{}}}var qn=ld(!0),nd=ld(!1),Vl=!1;function wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dc(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 kl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Jl(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Se&2)!==0){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,t=zs(e),Lf(e,null,l),t}return Ss(e,n,t,l),zs(e)}function bi(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,ko(e,l)}}function Rc(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,s=null;if(l=l.firstBaseUpdate,l!==null){do{var f={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};s===null?a=s=f:s=s.next=f,l=l.next}while(l!==null);s===null?a=s=t:s=s.next=t}else a=s=t;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:s,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Uc=!1;function ji(){if(Uc){var e=ba;if(e!==null)throw e}}function Si(e,t,l,n){Uc=!1;var a=e.updateQueue;Vl=!1;var s=a.firstBaseUpdate,f=a.lastBaseUpdate,h=a.shared.pending;if(h!==null){a.shared.pending=null;var m=h,A=m.next;m.next=null,f===null?s=A:f.next=A,f=m;var C=e.alternate;C!==null&&(C=C.updateQueue,h=C.lastBaseUpdate,h!==f&&(h===null?C.firstBaseUpdate=A:h.next=A,C.lastBaseUpdate=m))}if(s!==null){var R=a.baseState;f=0,C=A=m=null,h=s;do{var E=h.lane&-536870913,T=E!==h.lane;if(T?(ye&E)===E:(n&E)===E){E!==0&&E===pa&&(Uc=!0),C!==null&&(C=C.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var J=e,ee=h;E=t;var _e=l;switch(ee.tag){case 1:if(J=ee.payload,typeof J=="function"){R=J.call(_e,R,E);break e}R=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=ee.payload,E=typeof J=="function"?J.call(_e,R,E):J,E==null)break e;R=O({},R,E);break e;case 2:Vl=!0}}E=h.callback,E!==null&&(e.flags|=64,T&&(e.flags|=8192),T=a.callbacks,T===null?a.callbacks=[E]:T.push(E))}else T={lane:E,tag:h.tag,payload:h.payload,callback:h.callback,next:null},C===null?(A=C=T,m=R):C=C.next=T,f|=E;if(h=h.next,h===null){if(h=a.shared.pending,h===null)break;T=h,h=T.next,T.next=null,a.lastBaseUpdate=T,a.shared.pending=null}}while(!0);C===null&&(m=R),a.baseState=m,a.firstBaseUpdate=A,a.lastBaseUpdate=C,s===null&&(a.shared.lanes=0),Pl|=f,e.lanes=f,e.memoizedState=R}}function ad(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function id(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)ad(l[e],t)}var za=g(null),Ds=g(0);function sd(e,t){e=Ol,K(Ds,e),K(za,t),Ol=e|t.baseLanes}function qc(){K(Ds,Ol),K(za,za.current)}function Hc(){Ol=Ds.current,U(za),U(Ds)}var Dt=g(null),Ft=null;function Fl(e){var t=e.alternate;K(Xe,Xe.current&1),K(Dt,e),Ft===null&&(t===null||za.current!==null||t.memoizedState!==null)&&(Ft=e)}function Qc(e){K(Xe,Xe.current),K(Dt,e),Ft===null&&(Ft=e)}function ud(e){e.tag===22?(K(Xe,Xe.current),K(Dt,e),Ft===null&&(Ft=e)):$l()}function $l(){K(Xe,Xe.current),K(Dt,Dt.current)}function Rt(e){U(Dt),Ft===e&&(Ft=null),U(Xe)}var Xe=g(0);function Rs(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Zr(l)||Kr(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bl=0,se=null,Ce=null,Ve=null,Us=!1,Na=!1,Hn=!1,qs=0,zi=0,Aa=null,cy=0;function Be(){throw Error(o(321))}function Bc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!_t(e[l],t[l]))return!1;return!0}function Lc(e,t,l,n,a,s){return bl=s,se=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Zd:tr,Hn=!1,s=l(n,a),Hn=!1,Na&&(s=rd(t,l,n,a)),cd(e),s}function cd(e){M.H=Ei;var t=Ce!==null&&Ce.next!==null;if(bl=0,Ve=Ce=se=null,Us=!1,zi=0,Aa=null,t)throw Error(o(300));e===null||ke||(e=e.dependencies,e!==null&&Es(e)&&(ke=!0))}function rd(e,t,l,n){se=e;var a=0;do{if(Na&&(Aa=null),zi=0,Na=!1,25<=a)throw Error(o(301));if(a+=1,Ve=Ce=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}M.H=Kd,s=t(l,n)}while(Na);return s}function ry(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?Ni(t):t,e=e.useState()[0],(Ce!==null?Ce.memoizedState:null)!==e&&(se.flags|=1024),t}function Yc(){var e=qs!==0;return qs=0,e}function Gc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Xc(e){if(Us){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Us=!1}bl=0,Ve=Ce=se=null,Na=!1,zi=qs=0,Aa=null}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ve===null?se.memoizedState=Ve=e:Ve=Ve.next=e,Ve}function Ze(){if(Ce===null){var e=se.alternate;e=e!==null?e.memoizedState:null}else e=Ce.next;var t=Ve===null?se.memoizedState:Ve.next;if(t!==null)Ve=t,Ce=e;else{if(e===null)throw se.alternate===null?Error(o(467)):Error(o(310));Ce=e,e={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},Ve===null?se.memoizedState=Ve=e:Ve=Ve.next=e}return Ve}function Hs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ni(e){var t=zi;return zi+=1,Aa===null&&(Aa=[]),e=Pf(Aa,e,t),t=se,(Ve===null?t.memoizedState:Ve.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Zd:tr),e}function Qs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ni(e);if(e.$$typeof===$)return st(e)}throw Error(o(438,String(e)))}function Zc(e){var t=null,l=se.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=se.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Hs(),se.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=Qe;return t.index++,l}function jl(e,t){return typeof t=="function"?t(e):t}function Bs(e){var t=Ze();return Kc(t,Ce,e)}function Kc(e,t,l){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=l;var a=e.baseQueue,s=n.pending;if(s!==null){if(a!==null){var f=a.next;a.next=s.next,s.next=f}t.baseQueue=a=s,n.pending=null}if(s=e.baseState,a===null)e.memoizedState=s;else{t=a.next;var h=f=null,m=null,A=t,C=!1;do{var R=A.lane&-536870913;if(R!==A.lane?(ye&R)===R:(bl&R)===R){var E=A.revertLane;if(E===0)m!==null&&(m=m.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),R===pa&&(C=!0);else if((bl&E)===E){A=A.next,E===pa&&(C=!0);continue}else R={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},m===null?(h=m=R,f=s):m=m.next=R,se.lanes|=E,Pl|=E;R=A.action,Hn&&l(s,R),s=A.hasEagerState?A.eagerState:l(s,R)}else E={lane:R,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},m===null?(h=m=E,f=s):m=m.next=E,se.lanes|=R,Pl|=R;A=A.next}while(A!==null&&A!==t);if(m===null?f=s:m.next=h,!_t(s,e.memoizedState)&&(ke=!0,C&&(l=ba,l!==null)))throw l;e.memoizedState=s,e.baseState=f,e.baseQueue=m,n.lastRenderedState=s}return a===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Vc(e){var t=Ze(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var n=l.dispatch,a=l.pending,s=t.memoizedState;if(a!==null){l.pending=null;var f=a=a.next;do s=e(s,f.action),f=f.next;while(f!==a);_t(s,t.memoizedState)||(ke=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),l.lastRenderedState=s}return[s,n]}function od(e,t,l){var n=se,a=Ze(),s=ge;if(s){if(l===void 0)throw Error(o(407));l=l()}else l=t();var f=!_t((Ce||a).memoizedState,l);if(f&&(a.memoizedState=l,ke=!0),a=a.queue,Fc(hd.bind(null,n,a,e),[e]),a.getSnapshot!==t||f||Ve!==null&&Ve.memoizedState.tag&1){if(n.flags|=2048,Ea(9,{destroy:void 0},dd.bind(null,n,a,l,t),null),De===null)throw Error(o(349));s||(bl&127)!==0||fd(n,t,l)}return l}function fd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=se.updateQueue,t===null?(t=Hs(),se.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function dd(e,t,l,n){t.value=l,t.getSnapshot=n,md(t)&&xd(e)}function hd(e,t,l){return l(function(){md(t)&&xd(e)})}function md(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!_t(e,l)}catch{return!0}}function xd(e){var t=On(e,2);t!==null&&At(t,e,2)}function kc(e){var t=xt();if(typeof e=="function"){var l=e;if(e=l(),Hn){Bl(!0);try{l()}finally{Bl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:e},t}function yd(e,t,l,n){return e.baseState=l,Kc(e,Ce,typeof n=="function"?n:jl)}function oy(e,t,l,n,a){if(Gs(e))throw Error(o(485));if(e=t.action,e!==null){var s={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){s.listeners.push(f)}};M.T!==null?l(!0):s.isTransition=!1,n(s),l=t.pending,l===null?(s.next=t.pending=s,vd(t,s)):(s.next=l.next,t.pending=l.next=s)}}function vd(e,t){var l=t.action,n=t.payload,a=e.state;if(t.isTransition){var s=M.T,f={};M.T=f;try{var h=l(a,n),m=M.S;m!==null&&m(f,h),gd(e,t,h)}catch(A){Jc(e,t,A)}finally{s!==null&&f.types!==null&&(s.types=f.types),M.T=s}}else try{s=l(a,n),gd(e,t,s)}catch(A){Jc(e,t,A)}}function gd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){pd(e,t,n)},function(n){return Jc(e,t,n)}):pd(e,t,l)}function pd(e,t,l){t.status="fulfilled",t.value=l,bd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,vd(e,l)))}function Jc(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,bd(t),t=t.next;while(t!==n)}e.action=null}function bd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function jd(e,t){return t}function Sd(e,t){if(ge){var l=De.formState;if(l!==null){e:{var n=se;if(ge){if(Re){t:{for(var a=Re,s=Jt;a.nodeType!==8;){if(!s){a=null;break t}if(a=$t(a.nextSibling),a===null){a=null;break t}}s=a.data,a=s==="F!"||s==="F"?a:null}if(a){Re=$t(a.nextSibling),n=a.data==="F!";break e}}Zl(n)}n=!1}n&&(t=l[0])}}return l=xt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jd,lastRenderedState:t},l.queue=n,l=Yd.bind(null,se,n),n.dispatch=l,n=kc(!1),s=er.bind(null,se,!1,n.queue),n=xt(),a={state:t,dispatch:null,action:e,pending:null},n.queue=a,l=oy.bind(null,se,a,s,l),a.dispatch=l,n.memoizedState=e,[t,l,!1]}function zd(e){var t=Ze();return Nd(t,Ce,e)}function Nd(e,t,l){if(t=Kc(e,t,jd)[0],e=Bs(jl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Ni(t)}catch(f){throw f===ja?Cs:f}else n=t;t=Ze();var a=t.queue,s=a.dispatch;return l!==t.memoizedState&&(se.flags|=2048,Ea(9,{destroy:void 0},fy.bind(null,a,l),null)),[n,s,e]}function fy(e,t){e.action=t}function Ad(e){var t=Ze(),l=Ce;if(l!==null)return Nd(t,l,e);Ze(),t=t.memoizedState,l=Ze();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function Ea(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=se.updateQueue,t===null&&(t=Hs(),se.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function Ed(){return Ze().memoizedState}function Ls(e,t,l,n){var a=xt();se.flags|=e,a.memoizedState=Ea(1|t,{destroy:void 0},l,n===void 0?null:n)}function Ys(e,t,l,n){var a=Ze();n=n===void 0?null:n;var s=a.memoizedState.inst;Ce!==null&&n!==null&&Bc(n,Ce.memoizedState.deps)?a.memoizedState=Ea(t,s,l,n):(se.flags|=e,a.memoizedState=Ea(1|t,s,l,n))}function Td(e,t){Ls(8390656,8,e,t)}function Fc(e,t){Ys(2048,8,e,t)}function dy(e){se.flags|=4;var t=se.updateQueue;if(t===null)t=Hs(),se.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Od(e){var t=Ze().memoizedState;return dy({ref:t,nextImpl:e}),function(){if((Se&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Cd(e,t){return Ys(4,2,e,t)}function Md(e,t){return Ys(4,4,e,t)}function _d(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function wd(e,t,l){l=l!=null?l.concat([e]):null,Ys(4,4,_d.bind(null,t,e),l)}function $c(){}function Dd(e,t){var l=Ze();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Bc(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function Rd(e,t){var l=Ze();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Bc(t,n[1]))return n[0];if(n=e(),Hn){Bl(!0);try{e()}finally{Bl(!1)}}return l.memoizedState=[n,t],n}function Wc(e,t,l){return l===void 0||(bl&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Uh(),se.lanes|=e,Pl|=e,l)}function Ud(e,t,l,n){return _t(l,t)?l:za.current!==null?(e=Wc(e,l,n),_t(e,t)||(ke=!0),e):(bl&42)===0||(bl&1073741824)!==0&&(ye&261930)===0?(ke=!0,e.memoizedState=l):(e=Uh(),se.lanes|=e,Pl|=e,t)}function qd(e,t,l,n,a){var s=Z.p;Z.p=s!==0&&8>s?s:8;var f=M.T,h={};M.T=h,er(e,!1,t,l);try{var m=a(),A=M.S;if(A!==null&&A(h,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var C=uy(m,n);Ai(e,t,C,Ht(e))}else Ai(e,t,n,Ht(e))}catch(R){Ai(e,t,{then:function(){},status:"rejected",reason:R},Ht())}finally{Z.p=s,f!==null&&h.types!==null&&(f.types=h.types),M.T=f}}function hy(){}function Ic(e,t,l,n){if(e.tag!==5)throw Error(o(476));var a=Hd(e).queue;qd(e,a,t,te,l===null?hy:function(){return Qd(e),l(n)})}function Hd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:te},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Qd(e){var t=Hd(e);t.next===null&&(t=e.alternate.memoizedState),Ai(e,t.next.queue,{},Ht())}function Pc(){return st(Gi)}function Bd(){return Ze().memoizedState}function Ld(){return Ze().memoizedState}function my(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Ht();e=kl(l);var n=Jl(t,e,l);n!==null&&(At(n,t,l),bi(n,t,l)),t={cache:Oc()},e.payload=t;return}t=t.return}}function xy(e,t,l){var n=Ht();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Gs(e)?Gd(t,l):(l=vc(e,t,l,n),l!==null&&(At(l,e,n),Xd(l,t,n)))}function Yd(e,t,l){var n=Ht();Ai(e,t,l,n)}function Ai(e,t,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Gs(e))Gd(t,a);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var f=t.lastRenderedState,h=s(f,l);if(a.hasEagerState=!0,a.eagerState=h,_t(h,f))return Ss(e,t,a,0),De===null&&js(),!1}catch{}finally{}if(l=vc(e,t,a,n),l!==null)return At(l,e,n),Xd(l,t,n),!0}return!1}function er(e,t,l,n){if(n={lane:2,revertLane:wr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Gs(e)){if(t)throw Error(o(479))}else t=vc(e,l,n,2),t!==null&&At(t,e,2)}function Gs(e){var t=e.alternate;return e===se||t!==null&&t===se}function Gd(e,t){Na=Us=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Xd(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,ko(e,l)}}var Ei={readContext:st,use:Qs,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useLayoutEffect:Be,useInsertionEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useSyncExternalStore:Be,useId:Be,useHostTransitionStatus:Be,useFormState:Be,useActionState:Be,useOptimistic:Be,useMemoCache:Be,useCacheRefresh:Be};Ei.useEffectEvent=Be;var Zd={readContext:st,use:Qs,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Td,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Ls(4194308,4,_d.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){Ls(4,2,e,t)},useMemo:function(e,t){var l=xt();t=t===void 0?null:t;var n=e();if(Hn){Bl(!0);try{e()}finally{Bl(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=xt();if(l!==void 0){var a=l(t);if(Hn){Bl(!0);try{l(t)}finally{Bl(!1)}}}else a=t;return n.memoizedState=n.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},n.queue=e,e=e.dispatch=xy.bind(null,se,e),[n.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:function(e){e=kc(e);var t=e.queue,l=Yd.bind(null,se,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:$c,useDeferredValue:function(e,t){var l=xt();return Wc(l,e,t)},useTransition:function(){var e=kc(!1);return e=qd.bind(null,se,e.queue,!0,!1),xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=se,a=xt();if(ge){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),De===null)throw Error(o(349));(ye&127)!==0||fd(n,t,l)}a.memoizedState=l;var s={value:l,getSnapshot:t};return a.queue=s,Td(hd.bind(null,n,s,e),[e]),n.flags|=2048,Ea(9,{destroy:void 0},dd.bind(null,n,s,l,t),null),l},useId:function(){var e=xt(),t=De.identifierPrefix;if(ge){var l=ul,n=sl;l=(n&~(1<<32-Mt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=qs++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=cy++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Pc,useFormState:Sd,useActionState:Sd,useOptimistic:function(e){var t=xt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=er.bind(null,se,!0,l),l.dispatch=t,[e,t]},useMemoCache:Zc,useCacheRefresh:function(){return xt().memoizedState=my.bind(null,se)},useEffectEvent:function(e){var t=xt(),l={impl:e};return t.memoizedState=l,function(){if((Se&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},tr={readContext:st,use:Qs,useCallback:Dd,useContext:st,useEffect:Fc,useImperativeHandle:wd,useInsertionEffect:Cd,useLayoutEffect:Md,useMemo:Rd,useReducer:Bs,useRef:Ed,useState:function(){return Bs(jl)},useDebugValue:$c,useDeferredValue:function(e,t){var l=Ze();return Ud(l,Ce.memoizedState,e,t)},useTransition:function(){var e=Bs(jl)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:Ni(e),t]},useSyncExternalStore:od,useId:Bd,useHostTransitionStatus:Pc,useFormState:zd,useActionState:zd,useOptimistic:function(e,t){var l=Ze();return yd(l,Ce,e,t)},useMemoCache:Zc,useCacheRefresh:Ld};tr.useEffectEvent=Od;var Kd={readContext:st,use:Qs,useCallback:Dd,useContext:st,useEffect:Fc,useImperativeHandle:wd,useInsertionEffect:Cd,useLayoutEffect:Md,useMemo:Rd,useReducer:Vc,useRef:Ed,useState:function(){return Vc(jl)},useDebugValue:$c,useDeferredValue:function(e,t){var l=Ze();return Ce===null?Wc(l,e,t):Ud(l,Ce.memoizedState,e,t)},useTransition:function(){var e=Vc(jl)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:Ni(e),t]},useSyncExternalStore:od,useId:Bd,useHostTransitionStatus:Pc,useFormState:Ad,useActionState:Ad,useOptimistic:function(e,t){var l=Ze();return Ce!==null?yd(l,Ce,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Zc,useCacheRefresh:Ld};Kd.useEffectEvent=Od;function lr(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:O({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var nr={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=Ht(),a=kl(n);a.payload=t,l!=null&&(a.callback=l),t=Jl(e,a,n),t!==null&&(At(t,e,n),bi(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=Ht(),a=kl(n);a.tag=1,a.payload=t,l!=null&&(a.callback=l),t=Jl(e,a,n),t!==null&&(At(t,e,n),bi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Ht(),n=kl(l);n.tag=2,t!=null&&(n.callback=t),t=Jl(e,n,l),t!==null&&(At(t,e,l),bi(t,e,l))}};function Vd(e,t,l,n,a,s,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,f):t.prototype&&t.prototype.isPureReactComponent?!di(l,n)||!di(a,s):!0}function kd(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&nr.enqueueReplaceState(t,t.state,null)}function Qn(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=O({},l));for(var a in e)l[a]===void 0&&(l[a]=e[a])}return l}function Jd(e){bs(e)}function Fd(e){console.error(e)}function $d(e){bs(e)}function Xs(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Wd(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function ar(e,t,l){return l=kl(l),l.tag=3,l.payload={element:null},l.callback=function(){Xs(e,t)},l}function Id(e){return e=kl(e),e.tag=3,e}function Pd(e,t,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var s=n.value;e.payload=function(){return a(s)},e.callback=function(){Wd(t,l,n)}}var f=l.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Wd(t,l,n),typeof a!="function"&&(en===null?en=new Set([this]):en.add(this));var h=n.stack;this.componentDidCatch(n.value,{componentStack:h!==null?h:""})})}function yy(e,t,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&ga(t,l,a,!0),l=Dt.current,l!==null){switch(l.tag){case 31:case 13:return Ft===null?tu():l.alternate===null&&Le===0&&(Le=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===Ms?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),Cr(e,n,a)),!1;case 22:return l.flags|=65536,n===Ms?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),Cr(e,n,a)),!1}throw Error(o(435,l.tag))}return Cr(e,n,a),tu(),!1}if(ge)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,n!==zc&&(e=Error(o(422),{cause:n}),xi(Kt(e,l)))):(n!==zc&&(t=Error(o(423),{cause:n}),xi(Kt(t,l))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,n=Kt(n,l),a=ar(e.stateNode,n,a),Rc(e,a),Le!==4&&(Le=2)),!1;var s=Error(o(520),{cause:n});if(s=Kt(s,l),Ri===null?Ri=[s]:Ri.push(s),Le!==4&&(Le=2),t===null)return!0;n=Kt(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=a&-a,l.lanes|=e,e=ar(l.stateNode,n,e),Rc(l,e),!1;case 1:if(t=l.type,s=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(en===null||!en.has(s))))return l.flags|=65536,a&=-a,l.lanes|=a,a=Id(a),Pd(a,e,l,n),Rc(l,a),!1}l=l.return}while(l!==null);return!1}var ir=Error(o(461)),ke=!1;function ut(e,t,l,n){t.child=e===null?nd(t,null,l,n):qn(t,e.child,l,n)}function eh(e,t,l,n,a){l=l.render;var s=t.ref;if("ref"in n){var f={};for(var h in n)h!=="ref"&&(f[h]=n[h])}else f=n;return wn(t),n=Lc(e,t,l,f,s,a),h=Yc(),e!==null&&!ke?(Gc(e,t,a),Sl(e,t,a)):(ge&&h&&jc(t),t.flags|=1,ut(e,t,n,a),t.child)}function th(e,t,l,n,a){if(e===null){var s=l.type;return typeof s=="function"&&!gc(s)&&s.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=s,lh(e,t,s,n,a)):(e=Ns(l.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!hr(e,a)){var f=s.memoizedProps;if(l=l.compare,l=l!==null?l:di,l(f,n)&&e.ref===t.ref)return Sl(e,t,a)}return t.flags|=1,e=yl(s,n),e.ref=t.ref,e.return=t,t.child=e}function lh(e,t,l,n,a){if(e!==null){var s=e.memoizedProps;if(di(s,n)&&e.ref===t.ref)if(ke=!1,t.pendingProps=n=s,hr(e,a))(e.flags&131072)!==0&&(ke=!0);else return t.lanes=e.lanes,Sl(e,t,a)}return sr(e,t,l,n,a)}function nh(e,t,l,n){var a=n.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|l:l,e!==null){for(n=t.child=e.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~s}else n=0,t.child=null;return ah(e,t,s,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Os(t,s!==null?s.cachePool:null),s!==null?sd(t,s):qc(),ud(t);else return n=t.lanes=536870912,ah(e,t,s!==null?s.baseLanes|l:l,l,n)}else s!==null?(Os(t,s.cachePool),sd(t,s),$l(),t.memoizedState=null):(e!==null&&Os(t,null),qc(),$l());return ut(e,t,a,l),t.child}function Ti(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ah(e,t,l,n,a){var s=Mc();return s=s===null?null:{parent:Ke._currentValue,pool:s},t.memoizedState={baseLanes:l,cachePool:s},e!==null&&Os(t,null),qc(),ud(t),e!==null&&ga(e,t,n,!0),t.childLanes=a,null}function Zs(e,t){return t=Vs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ih(e,t,l){return qn(t,e.child,null,l),e=Zs(t,t.pendingProps),e.flags|=2,Rt(t),t.memoizedState=null,e}function vy(e,t,l){var n=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ge){if(n.mode==="hidden")return e=Zs(t,n),t.lanes=536870912,Ti(null,e);if(Qc(t),(e=Re)?(e=v0(e,Jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gl!==null?{id:sl,overflow:ul}:null,retryLane:536870912,hydrationErrors:null},l=Gf(e),l.return=t,t.child=l,it=t,Re=null)):e=null,e===null)throw Zl(t);return t.lanes=536870912,null}return Zs(t,n)}var s=e.memoizedState;if(s!==null){var f=s.dehydrated;if(Qc(t),a)if(t.flags&256)t.flags&=-257,t=ih(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(ke||ga(e,t,l,!1),a=(l&e.childLanes)!==0,ke||a){if(n=De,n!==null&&(f=Jo(n,l),f!==0&&f!==s.retryLane))throw s.retryLane=f,On(e,f),At(n,e,f),ir;tu(),t=ih(e,t,l)}else e=s.treeContext,Re=$t(f.nextSibling),it=t,ge=!0,Xl=null,Jt=!1,e!==null&&Kf(t,e),t=Zs(t,n),t.flags|=4096;return t}return e=yl(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ks(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function sr(e,t,l,n,a){return wn(t),l=Lc(e,t,l,n,void 0,a),n=Yc(),e!==null&&!ke?(Gc(e,t,a),Sl(e,t,a)):(ge&&n&&jc(t),t.flags|=1,ut(e,t,l,a),t.child)}function sh(e,t,l,n,a,s){return wn(t),t.updateQueue=null,l=rd(t,n,l,a),cd(e),n=Yc(),e!==null&&!ke?(Gc(e,t,s),Sl(e,t,s)):(ge&&n&&jc(t),t.flags|=1,ut(e,t,l,s),t.child)}function uh(e,t,l,n,a){if(wn(t),t.stateNode===null){var s=ma,f=l.contextType;typeof f=="object"&&f!==null&&(s=st(f)),s=new l(n,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=nr,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=n,s.state=t.memoizedState,s.refs={},wc(t),f=l.contextType,s.context=typeof f=="object"&&f!==null?st(f):ma,s.state=t.memoizedState,f=l.getDerivedStateFromProps,typeof f=="function"&&(lr(t,l,f,n),s.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(f=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),f!==s.state&&nr.enqueueReplaceState(s,s.state,null),Si(t,n,s,a),ji(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){s=t.stateNode;var h=t.memoizedProps,m=Qn(l,h);s.props=m;var A=s.context,C=l.contextType;f=ma,typeof C=="object"&&C!==null&&(f=st(C));var R=l.getDerivedStateFromProps;C=typeof R=="function"||typeof s.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,C||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(h||A!==f)&&kd(t,s,n,f),Vl=!1;var E=t.memoizedState;s.state=E,Si(t,n,s,a),ji(),A=t.memoizedState,h||E!==A||Vl?(typeof R=="function"&&(lr(t,l,R,n),A=t.memoizedState),(m=Vl||Vd(t,l,m,n,E,A,f))?(C||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=A),s.props=n,s.state=A,s.context=f,n=m):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,Dc(e,t),f=t.memoizedProps,C=Qn(l,f),s.props=C,R=t.pendingProps,E=s.context,A=l.contextType,m=ma,typeof A=="object"&&A!==null&&(m=st(A)),h=l.getDerivedStateFromProps,(A=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(f!==R||E!==m)&&kd(t,s,n,m),Vl=!1,E=t.memoizedState,s.state=E,Si(t,n,s,a),ji();var T=t.memoizedState;f!==R||E!==T||Vl||e!==null&&e.dependencies!==null&&Es(e.dependencies)?(typeof h=="function"&&(lr(t,l,h,n),T=t.memoizedState),(C=Vl||Vd(t,l,C,n,E,T,m)||e!==null&&e.dependencies!==null&&Es(e.dependencies))?(A||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,T,m),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,T,m)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||f===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=T),s.props=n,s.state=T,s.context=m,n=C):(typeof s.componentDidUpdate!="function"||f===e.memoizedProps&&E===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&E===e.memoizedState||(t.flags|=1024),n=!1)}return s=n,Ks(e,t),n=(t.flags&128)!==0,s||n?(s=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&n?(t.child=qn(t,e.child,null,a),t.child=qn(t,null,l,a)):ut(e,t,l,a),t.memoizedState=s.state,e=t.child):e=Sl(e,t,a),e}function ch(e,t,l,n){return Mn(),t.flags|=256,ut(e,t,l,n),t.child}var ur={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cr(e){return{baseLanes:e,cachePool:Wf()}}function rr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=qt),e}function rh(e,t,l){var n=t.pendingProps,a=!1,s=(t.flags&128)!==0,f;if((f=s)||(f=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),f&&(a=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(ge){if(a?Fl(t):$l(),(e=Re)?(e=v0(e,Jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gl!==null?{id:sl,overflow:ul}:null,retryLane:536870912,hydrationErrors:null},l=Gf(e),l.return=t,t.child=l,it=t,Re=null)):e=null,e===null)throw Zl(t);return Kr(e)?t.lanes=32:t.lanes=536870912,null}var h=n.children;return n=n.fallback,a?($l(),a=t.mode,h=Vs({mode:"hidden",children:h},a),n=Cn(n,a,l,null),h.return=t,n.return=t,h.sibling=n,t.child=h,n=t.child,n.memoizedState=cr(l),n.childLanes=rr(e,f,l),t.memoizedState=ur,Ti(null,n)):(Fl(t),or(t,h))}var m=e.memoizedState;if(m!==null&&(h=m.dehydrated,h!==null)){if(s)t.flags&256?(Fl(t),t.flags&=-257,t=fr(e,t,l)):t.memoizedState!==null?($l(),t.child=e.child,t.flags|=128,t=null):($l(),h=n.fallback,a=t.mode,n=Vs({mode:"visible",children:n.children},a),h=Cn(h,a,l,null),h.flags|=2,n.return=t,h.return=t,n.sibling=h,t.child=n,qn(t,e.child,null,l),n=t.child,n.memoizedState=cr(l),n.childLanes=rr(e,f,l),t.memoizedState=ur,t=Ti(null,n));else if(Fl(t),Kr(h)){if(f=h.nextSibling&&h.nextSibling.dataset,f)var A=f.dgst;f=A,n=Error(o(419)),n.stack="",n.digest=f,xi({value:n,source:null,stack:null}),t=fr(e,t,l)}else if(ke||ga(e,t,l,!1),f=(l&e.childLanes)!==0,ke||f){if(f=De,f!==null&&(n=Jo(f,l),n!==0&&n!==m.retryLane))throw m.retryLane=n,On(e,n),At(f,e,n),ir;Zr(h)||tu(),t=fr(e,t,l)}else Zr(h)?(t.flags|=192,t.child=e.child,t=null):(e=m.treeContext,Re=$t(h.nextSibling),it=t,ge=!0,Xl=null,Jt=!1,e!==null&&Kf(t,e),t=or(t,n.children),t.flags|=4096);return t}return a?($l(),h=n.fallback,a=t.mode,m=e.child,A=m.sibling,n=yl(m,{mode:"hidden",children:n.children}),n.subtreeFlags=m.subtreeFlags&65011712,A!==null?h=yl(A,h):(h=Cn(h,a,l,null),h.flags|=2),h.return=t,n.return=t,n.sibling=h,t.child=n,Ti(null,n),n=t.child,h=e.child.memoizedState,h===null?h=cr(l):(a=h.cachePool,a!==null?(m=Ke._currentValue,a=a.parent!==m?{parent:m,pool:m}:a):a=Wf(),h={baseLanes:h.baseLanes|l,cachePool:a}),n.memoizedState=h,n.childLanes=rr(e,f,l),t.memoizedState=ur,Ti(e.child,n)):(Fl(t),l=e.child,e=l.sibling,l=yl(l,{mode:"visible",children:n.children}),l.return=t,l.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=l,t.memoizedState=null,l)}function or(e,t){return t=Vs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Vs(e,t){return e=wt(22,e,null,t),e.lanes=0,e}function fr(e,t,l){return qn(t,e.child,null,l),e=or(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function oh(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ec(e.return,t,l)}function dr(e,t,l,n,a,s){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:s}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=n,f.tail=l,f.tailMode=a,f.treeForkCount=s)}function fh(e,t,l){var n=t.pendingProps,a=n.revealOrder,s=n.tail;n=n.children;var f=Xe.current,h=(f&2)!==0;if(h?(f=f&1|2,t.flags|=128):f&=1,K(Xe,f),ut(e,t,n,l),n=ge?mi:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&oh(e,l,t);else if(e.tag===19)oh(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(l=t.child,a=null;l!==null;)e=l.alternate,e!==null&&Rs(e)===null&&(a=l),l=l.sibling;l=a,l===null?(a=t.child,t.child=null):(a=l.sibling,l.sibling=null),dr(t,!1,a,l,s,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Rs(e)===null){t.child=a;break}e=a.sibling,a.sibling=l,l=a,a=e}dr(t,!0,l,null,s,n);break;case"together":dr(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Sl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Pl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ga(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=yl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=yl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function hr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Es(e)))}function gy(e,t,l){switch(t.tag){case 3:mt(t,t.stateNode.containerInfo),Kl(t,Ke,e.memoizedState.cache),Mn();break;case 27:case 5:Pa(t);break;case 4:mt(t,t.stateNode.containerInfo);break;case 10:Kl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qc(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Fl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?rh(e,t,l):(Fl(t),e=Sl(e,t,l),e!==null?e.sibling:null);Fl(t);break;case 19:var a=(e.flags&128)!==0;if(n=(l&t.childLanes)!==0,n||(ga(e,t,l,!1),n=(l&t.childLanes)!==0),a){if(n)return fh(e,t,l);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),K(Xe,Xe.current),n)break;return null;case 22:return t.lanes=0,nh(e,t,l,t.pendingProps);case 24:Kl(t,Ke,e.memoizedState.cache)}return Sl(e,t,l)}function dh(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ke=!0;else{if(!hr(e,l)&&(t.flags&128)===0)return ke=!1,gy(e,t,l);ke=(e.flags&131072)!==0}else ke=!1,ge&&(t.flags&1048576)!==0&&Zf(t,mi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Rn(t.elementType),t.type=e,typeof e=="function")gc(e)?(n=Qn(e,n),t.tag=1,t=uh(null,t,e,n,l)):(t.tag=0,t=sr(null,t,e,n,l));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=eh(null,t,e,n,l);break e}else if(a===ne){t.tag=14,t=th(null,t,e,n,l);break e}}throw t=gt(e)||e,Error(o(306,t,""))}}return t;case 0:return sr(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,a=Qn(n,t.pendingProps),uh(e,t,n,a,l);case 3:e:{if(mt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var s=t.memoizedState;a=s.element,Dc(e,t),Si(t,n,null,l);var f=t.memoizedState;if(n=f.cache,Kl(t,Ke,n),n!==s.cache&&Tc(t,[Ke],l,!0),ji(),n=f.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=ch(e,t,n,l);break e}else if(n!==a){a=Kt(Error(o(424)),t),xi(a),t=ch(e,t,n,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Re=$t(e.firstChild),it=t,ge=!0,Xl=null,Jt=!0,l=nd(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Mn(),n===a){t=Sl(e,t,l);break e}ut(e,t,n,l)}t=t.child}return t;case 26:return Ks(e,t),e===null?(l=z0(t.type,null,t.pendingProps,null))?t.memoizedState=l:ge||(l=t.type,e=t.pendingProps,n=cu(he.current).createElement(l),n[at]=t,n[pt]=e,ct(n,l,e),tt(n),t.stateNode=n):t.memoizedState=z0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Pa(t),e===null&&ge&&(n=t.stateNode=b0(t.type,t.pendingProps,he.current),it=t,Jt=!0,a=Re,an(t.type)?(Vr=a,Re=$t(n.firstChild)):Re=a),ut(e,t,t.pendingProps.children,l),Ks(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ge&&((a=n=Re)&&(n=Jy(n,t.type,t.pendingProps,Jt),n!==null?(t.stateNode=n,it=t,Re=$t(n.firstChild),Jt=!1,a=!0):a=!1),a||Zl(t)),Pa(t),a=t.type,s=t.pendingProps,f=e!==null?e.memoizedProps:null,n=s.children,Yr(a,s)?n=null:f!==null&&Yr(a,f)&&(t.flags|=32),t.memoizedState!==null&&(a=Lc(e,t,ry,null,null,l),Gi._currentValue=a),Ks(e,t),ut(e,t,n,l),t.child;case 6:return e===null&&ge&&((e=l=Re)&&(l=Fy(l,t.pendingProps,Jt),l!==null?(t.stateNode=l,it=t,Re=null,e=!0):e=!1),e||Zl(t)),null;case 13:return rh(e,t,l);case 4:return mt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=qn(t,null,n,l):ut(e,t,n,l),t.child;case 11:return eh(e,t,t.type,t.pendingProps,l);case 7:return ut(e,t,t.pendingProps,l),t.child;case 8:return ut(e,t,t.pendingProps.children,l),t.child;case 12:return ut(e,t,t.pendingProps.children,l),t.child;case 10:return n=t.pendingProps,Kl(t,t.type,n.value),ut(e,t,n.children,l),t.child;case 9:return a=t.type._context,n=t.pendingProps.children,wn(t),a=st(a),n=n(a),t.flags|=1,ut(e,t,n,l),t.child;case 14:return th(e,t,t.type,t.pendingProps,l);case 15:return lh(e,t,t.type,t.pendingProps,l);case 19:return fh(e,t,l);case 31:return vy(e,t,l);case 22:return nh(e,t,l,t.pendingProps);case 24:return wn(t),n=st(Ke),e===null?(a=Mc(),a===null&&(a=De,s=Oc(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=l),a=s),t.memoizedState={parent:n,cache:a},wc(t),Kl(t,Ke,a)):((e.lanes&l)!==0&&(Dc(e,t),Si(t,null,null,l),ji()),a=e.memoizedState,s=t.memoizedState,a.parent!==n?(a={parent:n,cache:n},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Kl(t,Ke,n)):(n=s.cache,Kl(t,Ke,n),n!==a.cache&&Tc(t,[Ke],l,!0))),ut(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function zl(e){e.flags|=4}function mr(e,t,l,n,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Bh())e.flags|=8192;else throw Un=Ms,_c}else e.flags&=-16777217}function hh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!O0(t))if(Bh())e.flags|=8192;else throw Un=Ms,_c}function ks(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ko():536870912,e.lanes|=t,Ma|=t)}function Oi(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&65011712,n|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function py(e,t,l){var n=t.pendingProps;switch(Sc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Ue(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pl(Ke),Ge(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(va(t)?zl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nc())),Ue(t),null;case 26:var a=t.type,s=t.memoizedState;return e===null?(zl(t),s!==null?(Ue(t),hh(t,s)):(Ue(t),mr(t,a,null,n,l))):s?s!==e.memoizedState?(zl(t),Ue(t),hh(t,s)):(Ue(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&zl(t),Ue(t),mr(t,a,e,n,l)),null;case 27:if(as(t),l=he.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&zl(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}e=F.current,va(t)?Vf(t):(e=b0(a,n,l),t.stateNode=e,zl(t))}return Ue(t),null;case 5:if(as(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&zl(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}if(s=F.current,va(t))Vf(t);else{var f=cu(he.current);switch(s){case 1:s=f.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:s=f.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":s=f.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":s=f.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":s=f.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof n.is=="string"?f.createElement("select",{is:n.is}):f.createElement("select"),n.multiple?s.multiple=!0:n.size&&(s.size=n.size);break;default:s=typeof n.is=="string"?f.createElement(a,{is:n.is}):f.createElement(a)}}s[at]=t,s[pt]=n;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)s.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=s;e:switch(ct(s,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&zl(t)}}return Ue(t),mr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&zl(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=he.current,va(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,a=it,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}e[at]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||r0(e.nodeValue,l)),e||Zl(t,!0)}else e=cu(e).createTextNode(n),e[at]=t,t.stateNode=e}return Ue(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=va(t),l!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[at]=t}else Mn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),e=!1}else l=Nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Rt(t),t):(Rt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Ue(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=va(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(o(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));a[at]=t}else Mn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),a=!1}else a=Nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Rt(t),t):(Rt(t),null)}return Rt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==a&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),ks(t,t.updateQueue),Ue(t),null);case 4:return Ge(),e===null&&qr(t.stateNode.containerInfo),Ue(t),null;case 10:return pl(t.type),Ue(t),null;case 19:if(U(Xe),n=t.memoizedState,n===null)return Ue(t),null;if(a=(t.flags&128)!==0,s=n.rendering,s===null)if(a)Oi(n,!1);else{if(Le!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Rs(e),s!==null){for(t.flags|=128,Oi(n,!1),e=s.updateQueue,t.updateQueue=e,ks(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Yf(l,e),l=l.sibling;return K(Xe,Xe.current&1|2),ge&&vl(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ot()>Is&&(t.flags|=128,a=!0,Oi(n,!1),t.lanes=4194304)}else{if(!a)if(e=Rs(s),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ks(t,e),Oi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!s.alternate&&!ge)return Ue(t),null}else 2*Ot()-n.renderingStartTime>Is&&l!==536870912&&(t.flags|=128,a=!0,Oi(n,!1),t.lanes=4194304);n.isBackwards?(s.sibling=t.child,t.child=s):(e=n.last,e!==null?e.sibling=s:t.child=s,n.last=s)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=Ot(),e.sibling=null,l=Xe.current,K(Xe,a?l&1|2:l&1),ge&&vl(t,n.treeForkCount),e):(Ue(t),null);case 22:case 23:return Rt(t),Hc(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),l=t.updateQueue,l!==null&&ks(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&U(Dn),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),pl(Ke),Ue(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function by(e,t){switch(Sc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pl(Ke),Ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return as(t),null;case 31:if(t.memoizedState!==null){if(Rt(t),t.alternate===null)throw Error(o(340));Mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Rt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Mn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(Xe),null;case 4:return Ge(),null;case 10:return pl(t.type),null;case 22:case 23:return Rt(t),Hc(),e!==null&&U(Dn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pl(Ke),null;case 25:return null;default:return null}}function mh(e,t){switch(Sc(t),t.tag){case 3:pl(Ke),Ge();break;case 26:case 27:case 5:as(t);break;case 4:Ge();break;case 31:t.memoizedState!==null&&Rt(t);break;case 13:Rt(t);break;case 19:U(Xe);break;case 10:pl(t.type);break;case 22:case 23:Rt(t),Hc(),e!==null&&U(Dn);break;case 24:pl(Ke)}}function Ci(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&e)===e){n=void 0;var s=l.create,f=l.inst;n=s(),f.destroy=n}l=l.next}while(l!==a)}}catch(h){Te(t,t.return,h)}}function Wl(e,t,l){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var s=a.next;n=s;do{if((n.tag&e)===e){var f=n.inst,h=f.destroy;if(h!==void 0){f.destroy=void 0,a=t;var m=l,A=h;try{A()}catch(C){Te(a,m,C)}}}n=n.next}while(n!==s)}}catch(C){Te(t,t.return,C)}}function xh(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{id(t,l)}catch(n){Te(e,e.return,n)}}}function yh(e,t,l){l.props=Qn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){Te(e,t,n)}}function Mi(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(a){Te(e,t,a)}}function cl(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){Te(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){Te(e,t,a)}else l.current=null}function vh(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){Te(e,e.return,a)}}function xr(e,t,l){try{var n=e.stateNode;Gy(n,e.type,l,t),n[pt]=t}catch(a){Te(e,e.return,a)}}function gh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&an(e.type)||e.tag===4}function yr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gh(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&&an(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 vr(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=ml));else if(n!==4&&(n===27&&an(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(vr(e,t,l),e=e.sibling;e!==null;)vr(e,t,l),e=e.sibling}function Js(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(n!==4&&(n===27&&an(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Js(e,t,l),e=e.sibling;e!==null;)Js(e,t,l),e=e.sibling}function ph(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);ct(t,n,l),t[at]=e,t[pt]=l}catch(s){Te(e,e.return,s)}}var Nl=!1,Je=!1,gr=!1,bh=typeof WeakSet=="function"?WeakSet:Set,lt=null;function jy(e,t){if(e=e.containerInfo,Br=xu,e=wf(e),fc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var a=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{l.nodeType,s.nodeType}catch{l=null;break e}var f=0,h=-1,m=-1,A=0,C=0,R=e,E=null;t:for(;;){for(var T;R!==l||a!==0&&R.nodeType!==3||(h=f+a),R!==s||n!==0&&R.nodeType!==3||(m=f+n),R.nodeType===3&&(f+=R.nodeValue.length),(T=R.firstChild)!==null;)E=R,R=T;for(;;){if(R===e)break t;if(E===l&&++A===a&&(h=f),E===s&&++C===n&&(m=f),(T=R.nextSibling)!==null)break;R=E,E=R.parentNode}R=T}l=h===-1||m===-1?null:{start:h,end:m}}else l=null}l=l||{start:0,end:0}}else l=null;for(Lr={focusedElem:e,selectionRange:l},xu=!1,lt=t;lt!==null;)if(t=lt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,lt=e;else for(;lt!==null;){switch(t=lt,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)a=e[l],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,l=t,a=s.memoizedProps,s=s.memoizedState,n=l.stateNode;try{var J=Qn(l.type,a);e=n.getSnapshotBeforeUpdate(J,s),n.__reactInternalSnapshotBeforeUpdate=e}catch(ee){Te(l,l.return,ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Xr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Xr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,lt=e;break}lt=t.return}}function jh(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:El(e,l),n&4&&Ci(5,l);break;case 1:if(El(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(f){Te(l,l.return,f)}else{var a=Qn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Te(l,l.return,f)}}n&64&&xh(l),n&512&&Mi(l,l.return);break;case 3:if(El(e,l),n&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{id(e,t)}catch(f){Te(l,l.return,f)}}break;case 27:t===null&&n&4&&ph(l);case 26:case 5:El(e,l),t===null&&n&4&&vh(l),n&512&&Mi(l,l.return);break;case 12:El(e,l);break;case 31:El(e,l),n&4&&Nh(e,l);break;case 13:El(e,l),n&4&&Ah(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=My.bind(null,l),$y(e,l))));break;case 22:if(n=l.memoizedState!==null||Nl,!n){t=t!==null&&t.memoizedState!==null||Je,a=Nl;var s=Je;Nl=n,(Je=t)&&!s?Tl(e,l,(l.subtreeFlags&8772)!==0):El(e,l),Nl=a,Je=s}break;case 30:break;default:El(e,l)}}function Sh(e){var t=e.alternate;t!==null&&(e.alternate=null,Sh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ju(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 He=null,jt=!1;function Al(e,t,l){for(l=l.child;l!==null;)zh(e,t,l),l=l.sibling}function zh(e,t,l){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(ei,l)}catch{}switch(l.tag){case 26:Je||cl(l,t),Al(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Je||cl(l,t);var n=He,a=jt;an(l.type)&&(He=l.stateNode,jt=!1),Al(e,t,l),Bi(l.stateNode),He=n,jt=a;break;case 5:Je||cl(l,t);case 6:if(n=He,a=jt,He=null,Al(e,t,l),He=n,jt=a,He!==null)if(jt)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(l.stateNode)}catch(s){Te(l,t,s)}else try{He.removeChild(l.stateNode)}catch(s){Te(l,t,s)}break;case 18:He!==null&&(jt?(e=He,x0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Qa(e)):x0(He,l.stateNode));break;case 4:n=He,a=jt,He=l.stateNode.containerInfo,jt=!0,Al(e,t,l),He=n,jt=a;break;case 0:case 11:case 14:case 15:Wl(2,l,t),Je||Wl(4,l,t),Al(e,t,l);break;case 1:Je||(cl(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&yh(l,t,n)),Al(e,t,l);break;case 21:Al(e,t,l);break;case 22:Je=(n=Je)||l.memoizedState!==null,Al(e,t,l),Je=n;break;default:Al(e,t,l)}}function Nh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qa(e)}catch(l){Te(t,t.return,l)}}}function Ah(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qa(e)}catch(l){Te(t,t.return,l)}}function Sy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new bh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new bh),t;default:throw Error(o(435,e.tag))}}function Fs(e,t){var l=Sy(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var a=_y.bind(null,e,n);n.then(a,a)}})}function St(e,t){var l=t.deletions;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n],s=e,f=t,h=f;e:for(;h!==null;){switch(h.tag){case 27:if(an(h.type)){He=h.stateNode,jt=!1;break e}break;case 5:He=h.stateNode,jt=!1;break e;case 3:case 4:He=h.stateNode.containerInfo,jt=!0;break e}h=h.return}if(He===null)throw Error(o(160));zh(s,f,a),He=null,jt=!1,s=a.alternate,s!==null&&(s.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Eh(t,e),t=t.sibling}var ll=null;function Eh(e,t){var l=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:St(t,e),zt(e),n&4&&(Wl(3,e,e.return),Ci(3,e),Wl(5,e,e.return));break;case 1:St(t,e),zt(e),n&512&&(Je||l===null||cl(l,l.return)),n&64&&Nl&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var a=ll;if(St(t,e),zt(e),n&512&&(Je||l===null||cl(l,l.return)),n&4){var s=l!==null?l.memoizedState:null;if(n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null){e:{n=e.type,l=e.memoizedProps,a=a.ownerDocument||a;t:switch(n){case"title":s=a.getElementsByTagName("title")[0],(!s||s[ni]||s[at]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=a.createElement(n),a.head.insertBefore(s,a.querySelector("head > title"))),ct(s,n,l),s[at]=e,tt(s),n=s;break e;case"link":var f=E0("link","href",a).get(n+(l.href||""));if(f){for(var h=0;h<f.length;h++)if(s=f[h],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){f.splice(h,1);break t}}s=a.createElement(n),ct(s,n,l),a.head.appendChild(s);break;case"meta":if(f=E0("meta","content",a).get(n+(l.content||""))){for(h=0;h<f.length;h++)if(s=f[h],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){f.splice(h,1);break t}}s=a.createElement(n),ct(s,n,l),a.head.appendChild(s);break;default:throw Error(o(468,n))}s[at]=e,tt(s),n=s}e.stateNode=n}else T0(a,e.type,e.stateNode);else e.stateNode=A0(a,n,e.memoizedProps);else s!==n?(s===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):s.count--,n===null?T0(a,e.type,e.stateNode):A0(a,n,e.memoizedProps)):n===null&&e.stateNode!==null&&xr(e,e.memoizedProps,l.memoizedProps)}break;case 27:St(t,e),zt(e),n&512&&(Je||l===null||cl(l,l.return)),l!==null&&n&4&&xr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(St(t,e),zt(e),n&512&&(Je||l===null||cl(l,l.return)),e.flags&32){a=e.stateNode;try{ua(a,"")}catch(J){Te(e,e.return,J)}}n&4&&e.stateNode!=null&&(a=e.memoizedProps,xr(e,a,l!==null?l.memoizedProps:a)),n&1024&&(gr=!0);break;case 6:if(St(t,e),zt(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,l=e.stateNode;try{l.nodeValue=n}catch(J){Te(e,e.return,J)}}break;case 3:if(fu=null,a=ll,ll=ru(t.containerInfo),St(t,e),ll=a,zt(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{Qa(t.containerInfo)}catch(J){Te(e,e.return,J)}gr&&(gr=!1,Th(e));break;case 4:n=ll,ll=ru(e.stateNode.containerInfo),St(t,e),zt(e),ll=n;break;case 12:St(t,e),zt(e);break;case 31:St(t,e),zt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Fs(e,n)));break;case 13:St(t,e),zt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ws=Ot()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Fs(e,n)));break;case 22:a=e.memoizedState!==null;var m=l!==null&&l.memoizedState!==null,A=Nl,C=Je;if(Nl=A||a,Je=C||m,St(t,e),Je=C,Nl=A,zt(e),n&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(l===null||m||Nl||Je||Bn(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){m=l=t;try{if(s=m.stateNode,a)f=s.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{h=m.stateNode;var R=m.memoizedProps.style,E=R!=null&&R.hasOwnProperty("display")?R.display:null;h.style.display=E==null||typeof E=="boolean"?"":(""+E).trim()}}catch(J){Te(m,m.return,J)}}}else if(t.tag===6){if(l===null){m=t;try{m.stateNode.nodeValue=a?"":m.memoizedProps}catch(J){Te(m,m.return,J)}}}else if(t.tag===18){if(l===null){m=t;try{var T=m.stateNode;a?y0(T,!0):y0(m.stateNode,!1)}catch(J){Te(m,m.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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,Fs(e,l))));break;case 19:St(t,e),zt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Fs(e,n)));break;case 30:break;case 21:break;default:St(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(gh(n)){l=n;break}n=n.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var a=l.stateNode,s=yr(e);Js(e,s,a);break;case 5:var f=l.stateNode;l.flags&32&&(ua(f,""),l.flags&=-33);var h=yr(e);Js(e,h,f);break;case 3:case 4:var m=l.stateNode.containerInfo,A=yr(e);vr(e,A,m);break;default:throw Error(o(161))}}catch(C){Te(e,e.return,C)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Th(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Th(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function El(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)jh(e,t.alternate,t),t=t.sibling}function Bn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Wl(4,t,t.return),Bn(t);break;case 1:cl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&yh(t,t.return,l),Bn(t);break;case 27:Bi(t.stateNode);case 26:case 5:cl(t,t.return),Bn(t);break;case 22:t.memoizedState===null&&Bn(t);break;case 30:Bn(t);break;default:Bn(t)}e=e.sibling}}function Tl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,a=e,s=t,f=s.flags;switch(s.tag){case 0:case 11:case 15:Tl(a,s,l),Ci(4,s);break;case 1:if(Tl(a,s,l),n=s,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(A){Te(n,n.return,A)}if(n=s,a=n.updateQueue,a!==null){var h=n.stateNode;try{var m=a.shared.hiddenCallbacks;if(m!==null)for(a.shared.hiddenCallbacks=null,a=0;a<m.length;a++)ad(m[a],h)}catch(A){Te(n,n.return,A)}}l&&f&64&&xh(s),Mi(s,s.return);break;case 27:ph(s);case 26:case 5:Tl(a,s,l),l&&n===null&&f&4&&vh(s),Mi(s,s.return);break;case 12:Tl(a,s,l);break;case 31:Tl(a,s,l),l&&f&4&&Nh(a,s);break;case 13:Tl(a,s,l),l&&f&4&&Ah(a,s);break;case 22:s.memoizedState===null&&Tl(a,s,l),Mi(s,s.return);break;case 30:break;default:Tl(a,s,l)}t=t.sibling}}function pr(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&yi(l))}function br(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yi(e))}function nl(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Oh(e,t,l,n),t=t.sibling}function Oh(e,t,l,n){var a=t.flags;switch(t.tag){case 0:case 11:case 15:nl(e,t,l,n),a&2048&&Ci(9,t);break;case 1:nl(e,t,l,n);break;case 3:nl(e,t,l,n),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yi(e)));break;case 12:if(a&2048){nl(e,t,l,n),e=t.stateNode;try{var s=t.memoizedProps,f=s.id,h=s.onPostCommit;typeof h=="function"&&h(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(m){Te(t,t.return,m)}}else nl(e,t,l,n);break;case 31:nl(e,t,l,n);break;case 13:nl(e,t,l,n);break;case 23:break;case 22:s=t.stateNode,f=t.alternate,t.memoizedState!==null?s._visibility&2?nl(e,t,l,n):_i(e,t):s._visibility&2?nl(e,t,l,n):(s._visibility|=2,Ta(e,t,l,n,(t.subtreeFlags&10256)!==0||!1)),a&2048&&pr(f,t);break;case 24:nl(e,t,l,n),a&2048&&br(t.alternate,t);break;default:nl(e,t,l,n)}}function Ta(e,t,l,n,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,f=t,h=l,m=n,A=f.flags;switch(f.tag){case 0:case 11:case 15:Ta(s,f,h,m,a),Ci(8,f);break;case 23:break;case 22:var C=f.stateNode;f.memoizedState!==null?C._visibility&2?Ta(s,f,h,m,a):_i(s,f):(C._visibility|=2,Ta(s,f,h,m,a)),a&&A&2048&&pr(f.alternate,f);break;case 24:Ta(s,f,h,m,a),a&&A&2048&&br(f.alternate,f);break;default:Ta(s,f,h,m,a)}t=t.sibling}}function _i(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,a=n.flags;switch(n.tag){case 22:_i(l,n),a&2048&&pr(n.alternate,n);break;case 24:_i(l,n),a&2048&&br(n.alternate,n);break;default:_i(l,n)}t=t.sibling}}var wi=8192;function Oa(e,t,l){if(e.subtreeFlags&wi)for(e=e.child;e!==null;)Ch(e,t,l),e=e.sibling}function Ch(e,t,l){switch(e.tag){case 26:Oa(e,t,l),e.flags&wi&&e.memoizedState!==null&&cv(l,ll,e.memoizedState,e.memoizedProps);break;case 5:Oa(e,t,l);break;case 3:case 4:var n=ll;ll=ru(e.stateNode.containerInfo),Oa(e,t,l),ll=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=wi,wi=16777216,Oa(e,t,l),wi=n):Oa(e,t,l));break;default:Oa(e,t,l)}}function Mh(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 Di(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];lt=n,wh(n,e)}Mh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_h(e),e=e.sibling}function _h(e){switch(e.tag){case 0:case 11:case 15:Di(e),e.flags&2048&&Wl(9,e,e.return);break;case 3:Di(e);break;case 12:Di(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,$s(e)):Di(e);break;default:Di(e)}}function $s(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];lt=n,wh(n,e)}Mh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Wl(8,t,t.return),$s(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,$s(t));break;default:$s(t)}e=e.sibling}}function wh(e,t){for(;lt!==null;){var l=lt;switch(l.tag){case 0:case 11:case 15:Wl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:yi(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,lt=n;else e:for(l=e;lt!==null;){n=lt;var a=n.sibling,s=n.return;if(Sh(n),n===l){lt=null;break e}if(a!==null){a.return=s,lt=a;break e}lt=s}}}var zy={getCacheForType:function(e){var t=st(Ke),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return st(Ke).controller.signal}},Ny=typeof WeakMap=="function"?WeakMap:Map,Se=0,De=null,me=null,ye=0,Ee=0,Ut=null,Il=!1,Ca=!1,jr=!1,Ol=0,Le=0,Pl=0,Ln=0,Sr=0,qt=0,Ma=0,Ri=null,Nt=null,zr=!1,Ws=0,Dh=0,Is=1/0,Ps=null,en=null,Ie=0,tn=null,_a=null,Cl=0,Nr=0,Ar=null,Rh=null,Ui=0,Er=null;function Ht(){return(Se&2)!==0&&ye!==0?ye&-ye:M.T!==null?wr():Fo()}function Uh(){if(qt===0)if((ye&536870912)===0||ge){var e=us;us<<=1,(us&3932160)===0&&(us=262144),qt=e}else qt=536870912;return e=Dt.current,e!==null&&(e.flags|=32),qt}function At(e,t,l){(e===De&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)&&(wa(e,0),ln(e,ye,qt,!1)),li(e,l),((Se&2)===0||e!==De)&&(e===De&&((Se&2)===0&&(Ln|=l),Le===4&&ln(e,ye,qt,!1)),rl(e))}function qh(e,t,l){if((Se&6)!==0)throw Error(o(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||ti(e,t),a=n?Ty(e,t):Or(e,t,!0),s=n;do{if(a===0){Ca&&!n&&ln(e,t,0,!1);break}else{if(l=e.current.alternate,s&&!Ay(l)){a=Or(e,t,!1),s=!1;continue}if(a===2){if(s=t,e.errorRecoveryDisabledLanes&s)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var h=e;a=Ri;var m=h.current.memoizedState.isDehydrated;if(m&&(wa(h,f).flags|=256),f=Or(h,f,!1),f!==2){if(jr&&!m){h.errorRecoveryDisabledLanes|=s,Ln|=s,a=4;break e}s=Nt,Nt=a,s!==null&&(Nt===null?Nt=s:Nt.push.apply(Nt,s))}a=f}if(s=!1,a!==2)continue}}if(a===1){wa(e,0),ln(e,t,0,!0);break}e:{switch(n=e,s=a,s){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:ln(n,t,qt,!Il);break e;case 2:Nt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(a=Ws+300-Ot(),10<a)){if(ln(n,t,qt,!Il),rs(n,0,!0)!==0)break e;Cl=t,n.timeoutHandle=h0(Hh.bind(null,n,l,Nt,Ps,zr,t,qt,Ln,Ma,Il,s,"Throttled",-0,0),a);break e}Hh(n,l,Nt,Ps,zr,t,qt,Ln,Ma,Il,s,null,-0,0)}}break}while(!0);rl(e)}function Hh(e,t,l,n,a,s,f,h,m,A,C,R,E,T){if(e.timeoutHandle=-1,R=t.subtreeFlags,R&8192||(R&16785408)===16785408){R={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ml},Ch(t,s,R);var J=(s&62914560)===s?Ws-Ot():(s&4194048)===s?Dh-Ot():0;if(J=rv(R,J),J!==null){Cl=s,e.cancelPendingCommit=J(Kh.bind(null,e,t,s,l,n,a,f,h,m,C,R,null,E,T)),ln(e,s,f,!A);return}}Kh(e,t,s,l,n,a,f,h,m)}function Ay(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var a=l[n],s=a.getSnapshot;a=a.value;try{if(!_t(s(),a))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ln(e,t,l,n){t&=~Sr,t&=~Ln,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var a=t;0<a;){var s=31-Mt(a),f=1<<s;n[s]=-1,a&=~f}l!==0&&Vo(e,l,t)}function eu(){return(Se&6)===0?(qi(0),!1):!0}function Tr(){if(me!==null){if(Ee===0)var e=me.return;else e=me,gl=_n=null,Xc(e),Sa=null,gi=0,e=me;for(;e!==null;)mh(e.alternate,e),e=e.return;me=null}}function wa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Ky(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Cl=0,Tr(),De=e,me=l=yl(e.current,null),ye=t,Ee=0,Ut=null,Il=!1,Ca=ti(e,t),jr=!1,Ma=qt=Sr=Ln=Pl=Le=0,Nt=Ri=null,zr=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var a=31-Mt(n),s=1<<a;t|=e[a],n&=~s}return Ol=t,js(),l}function Qh(e,t){se=null,M.H=Ei,t===ja||t===Cs?(t=ed(),Ee=3):t===_c?(t=ed(),Ee=4):Ee=t===ir?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,me===null&&(Le=1,Xs(e,Kt(t,e.current)))}function Bh(){var e=Dt.current;return e===null?!0:(ye&4194048)===ye?Ft===null:(ye&62914560)===ye||(ye&536870912)!==0?e===Ft:!1}function Lh(){var e=M.H;return M.H=Ei,e===null?Ei:e}function Yh(){var e=M.A;return M.A=zy,e}function tu(){Le=4,Il||(ye&4194048)!==ye&&Dt.current!==null||(Ca=!0),(Pl&134217727)===0&&(Ln&134217727)===0||De===null||ln(De,ye,qt,!1)}function Or(e,t,l){var n=Se;Se|=2;var a=Lh(),s=Yh();(De!==e||ye!==t)&&(Ps=null,wa(e,t)),t=!1;var f=Le;e:do try{if(Ee!==0&&me!==null){var h=me,m=Ut;switch(Ee){case 8:Tr(),f=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var A=Ee;if(Ee=0,Ut=null,Da(e,h,m,A),l&&Ca){f=0;break e}break;default:A=Ee,Ee=0,Ut=null,Da(e,h,m,A)}}Ey(),f=Le;break}catch(C){Qh(e,C)}while(!0);return t&&e.shellSuspendCounter++,gl=_n=null,Se=n,M.H=a,M.A=s,me===null&&(De=null,ye=0,js()),f}function Ey(){for(;me!==null;)Gh(me)}function Ty(e,t){var l=Se;Se|=2;var n=Lh(),a=Yh();De!==e||ye!==t?(Ps=null,Is=Ot()+500,wa(e,t)):Ca=ti(e,t);e:do try{if(Ee!==0&&me!==null){t=me;var s=Ut;t:switch(Ee){case 1:Ee=0,Ut=null,Da(e,t,s,1);break;case 2:case 9:if(If(s)){Ee=0,Ut=null,Xh(t);break}t=function(){Ee!==2&&Ee!==9||De!==e||(Ee=7),rl(e)},s.then(t,t);break e;case 3:Ee=7;break e;case 4:Ee=5;break e;case 7:If(s)?(Ee=0,Ut=null,Xh(t)):(Ee=0,Ut=null,Da(e,t,s,7));break;case 5:var f=null;switch(me.tag){case 26:f=me.memoizedState;case 5:case 27:var h=me;if(f?O0(f):h.stateNode.complete){Ee=0,Ut=null;var m=h.sibling;if(m!==null)me=m;else{var A=h.return;A!==null?(me=A,lu(A)):me=null}break t}}Ee=0,Ut=null,Da(e,t,s,5);break;case 6:Ee=0,Ut=null,Da(e,t,s,6);break;case 8:Tr(),Le=6;break e;default:throw Error(o(462))}}Oy();break}catch(C){Qh(e,C)}while(!0);return gl=_n=null,M.H=n,M.A=a,Se=l,me!==null?0:(De=null,ye=0,js(),Le)}function Oy(){for(;me!==null&&!Wm();)Gh(me)}function Gh(e){var t=dh(e.alternate,e,Ol);e.memoizedProps=e.pendingProps,t===null?lu(e):me=t}function Xh(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=sh(l,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=sh(l,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:Xc(t);default:mh(l,t),t=me=Yf(t,Ol),t=dh(l,t,Ol)}e.memoizedProps=e.pendingProps,t===null?lu(e):me=t}function Da(e,t,l,n){gl=_n=null,Xc(t),Sa=null,gi=0;var a=t.return;try{if(yy(e,a,t,l,ye)){Le=1,Xs(e,Kt(l,e.current)),me=null;return}}catch(s){if(a!==null)throw me=a,s;Le=1,Xs(e,Kt(l,e.current)),me=null;return}t.flags&32768?(ge||n===1?e=!0:Ca||(ye&536870912)!==0?e=!1:(Il=e=!0,(n===2||n===9||n===3||n===6)&&(n=Dt.current,n!==null&&n.tag===13&&(n.flags|=16384))),Zh(t,e)):lu(t)}function lu(e){var t=e;do{if((t.flags&32768)!==0){Zh(t,Il);return}e=t.return;var l=py(t.alternate,t,Ol);if(l!==null){me=l;return}if(t=t.sibling,t!==null){me=t;return}me=t=e}while(t!==null);Le===0&&(Le=5)}function Zh(e,t){do{var l=by(e.alternate,e);if(l!==null){l.flags&=32767,me=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){me=e;return}me=e=l}while(e!==null);Le=6,me=null}function Kh(e,t,l,n,a,s,f,h,m){e.cancelPendingCommit=null;do nu();while(Ie!==0);if((Se&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(s=t.lanes|t.childLanes,s|=yc,ux(e,l,s,f,h,m),e===De&&(me=De=null,ye=0),_a=t,tn=e,Cl=l,Nr=s,Ar=a,Rh=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,wy(is,function(){return $h(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=M.T,M.T=null,a=Z.p,Z.p=2,f=Se,Se|=4;try{jy(e,t,l)}finally{Se=f,Z.p=a,M.T=n}}Ie=1,Vh(),kh(),Jh()}}function Vh(){if(Ie===1){Ie=0;var e=tn,t=_a,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=M.T,M.T=null;var n=Z.p;Z.p=2;var a=Se;Se|=4;try{Eh(t,e);var s=Lr,f=wf(e.containerInfo),h=s.focusedElem,m=s.selectionRange;if(f!==h&&h&&h.ownerDocument&&_f(h.ownerDocument.documentElement,h)){if(m!==null&&fc(h)){var A=m.start,C=m.end;if(C===void 0&&(C=A),"selectionStart"in h)h.selectionStart=A,h.selectionEnd=Math.min(C,h.value.length);else{var R=h.ownerDocument||document,E=R&&R.defaultView||window;if(E.getSelection){var T=E.getSelection(),J=h.textContent.length,ee=Math.min(m.start,J),_e=m.end===void 0?ee:Math.min(m.end,J);!T.extend&&ee>_e&&(f=_e,_e=ee,ee=f);var j=Mf(h,ee),v=Mf(h,_e);if(j&&v&&(T.rangeCount!==1||T.anchorNode!==j.node||T.anchorOffset!==j.offset||T.focusNode!==v.node||T.focusOffset!==v.offset)){var N=R.createRange();N.setStart(j.node,j.offset),T.removeAllRanges(),ee>_e?(T.addRange(N),T.extend(v.node,v.offset)):(N.setEnd(v.node,v.offset),T.addRange(N))}}}}for(R=[],T=h;T=T.parentNode;)T.nodeType===1&&R.push({element:T,left:T.scrollLeft,top:T.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<R.length;h++){var D=R[h];D.element.scrollLeft=D.left,D.element.scrollTop=D.top}}xu=!!Br,Lr=Br=null}finally{Se=a,Z.p=n,M.T=l}}e.current=t,Ie=2}}function kh(){if(Ie===2){Ie=0;var e=tn,t=_a,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=M.T,M.T=null;var n=Z.p;Z.p=2;var a=Se;Se|=4;try{jh(e,t.alternate,t)}finally{Se=a,Z.p=n,M.T=l}}Ie=3}}function Jh(){if(Ie===4||Ie===3){Ie=0,Im();var e=tn,t=_a,l=Cl,n=Rh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ie=5:(Ie=0,_a=tn=null,Fh(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(en=null),Vu(l),t=t.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(ei,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=M.T,a=Z.p,Z.p=2,M.T=null;try{for(var s=e.onRecoverableError,f=0;f<n.length;f++){var h=n[f];s(h.value,{componentStack:h.stack})}}finally{M.T=t,Z.p=a}}(Cl&3)!==0&&nu(),rl(e),a=e.pendingLanes,(l&261930)!==0&&(a&42)!==0?e===Er?Ui++:(Ui=0,Er=e):Ui=0,qi(0)}}function Fh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,yi(t)))}function nu(){return Vh(),kh(),Jh(),$h()}function $h(){if(Ie!==5)return!1;var e=tn,t=Nr;Nr=0;var l=Vu(Cl),n=M.T,a=Z.p;try{Z.p=32>l?32:l,M.T=null,l=Ar,Ar=null;var s=tn,f=Cl;if(Ie=0,_a=tn=null,Cl=0,(Se&6)!==0)throw Error(o(331));var h=Se;if(Se|=4,_h(s.current),Oh(s,s.current,f,l),Se=h,qi(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(ei,s)}catch{}return!0}finally{Z.p=a,M.T=n,Fh(e,t)}}function Wh(e,t,l){t=Kt(l,t),t=ar(e.stateNode,t,2),e=Jl(e,t,2),e!==null&&(li(e,2),rl(e))}function Te(e,t,l){if(e.tag===3)Wh(e,e,l);else for(;t!==null;){if(t.tag===3){Wh(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(en===null||!en.has(n))){e=Kt(l,e),l=Id(2),n=Jl(t,l,2),n!==null&&(Pd(l,n,t,e),li(n,2),rl(n));break}}t=t.return}}function Cr(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new Ny;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(l)||(jr=!0,a.add(l),e=Cy.bind(null,e,t,l),t.then(e,e))}function Cy(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,De===e&&(ye&l)===l&&(Le===4||Le===3&&(ye&62914560)===ye&&300>Ot()-Ws?(Se&2)===0&&wa(e,0):Sr|=l,Ma===ye&&(Ma=0)),rl(e)}function Ih(e,t){t===0&&(t=Ko()),e=On(e,t),e!==null&&(li(e,t),rl(e))}function My(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Ih(e,l)}function _y(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),Ih(e,l)}function wy(e,t){return Gu(e,t)}var au=null,Ra=null,Mr=!1,iu=!1,_r=!1,nn=0;function rl(e){e!==Ra&&e.next===null&&(Ra===null?au=Ra=e:Ra=Ra.next=e),iu=!0,Mr||(Mr=!0,Ry())}function qi(e,t){if(!_r&&iu){_r=!0;do for(var l=!1,n=au;n!==null;){if(e!==0){var a=n.pendingLanes;if(a===0)var s=0;else{var f=n.suspendedLanes,h=n.pingedLanes;s=(1<<31-Mt(42|e)+1)-1,s&=a&~(f&~h),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(l=!0,l0(n,s))}else s=ye,s=rs(n,n===De?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(s&3)===0||ti(n,s)||(l=!0,l0(n,s));n=n.next}while(l);_r=!1}}function Dy(){Ph()}function Ph(){iu=Mr=!1;var e=0;nn!==0&&Zy()&&(e=nn);for(var t=Ot(),l=null,n=au;n!==null;){var a=n.next,s=e0(n,t);s===0?(n.next=null,l===null?au=a:l.next=a,a===null&&(Ra=l)):(l=n,(e!==0||(s&3)!==0)&&(iu=!0)),n=a}Ie!==0&&Ie!==5||qi(e),nn!==0&&(nn=0)}function e0(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var f=31-Mt(s),h=1<<f,m=a[f];m===-1?((h&l)===0||(h&n)!==0)&&(a[f]=sx(h,t)):m<=t&&(e.expiredLanes|=h),s&=~h}if(t=De,l=ye,l=rs(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(Ee===2||Ee===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Xu(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||ti(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&Xu(n),Vu(l)){case 2:case 8:l=Xo;break;case 32:l=is;break;case 268435456:l=Zo;break;default:l=is}return n=t0.bind(null,e),l=Gu(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&Xu(n),e.callbackPriority=2,e.callbackNode=null,2}function t0(e,t){if(Ie!==0&&Ie!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(nu()&&e.callbackNode!==l)return null;var n=ye;return n=rs(e,e===De?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(qh(e,n,t),e0(e,Ot()),e.callbackNode!=null&&e.callbackNode===l?t0.bind(null,e):null)}function l0(e,t){if(nu())return null;qh(e,t,!0)}function Ry(){Vy(function(){(Se&6)!==0?Gu(Go,Dy):Ph()})}function wr(){if(nn===0){var e=pa;e===0&&(e=ss,ss<<=1,(ss&261888)===0&&(ss=256)),nn=e}return nn}function n0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:hs(""+e)}function a0(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Uy(e,t,l,n,a){if(t==="submit"&&l&&l.stateNode===a){var s=n0((a[pt]||null).action),f=n.submitter;f&&(t=(t=f[pt]||null)?n0(t.formAction):f.getAttribute("formAction"),t!==null&&(s=t,f=null));var h=new vs("action","action",null,n,a);e.push({event:h,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(nn!==0){var m=f?a0(a,f):new FormData(a);Ic(l,{pending:!0,data:m,method:a.method,action:s},null,m)}}else typeof s=="function"&&(h.preventDefault(),m=f?a0(a,f):new FormData(a),Ic(l,{pending:!0,data:m,method:a.method,action:s},s,m))},currentTarget:a}]})}}for(var Dr=0;Dr<xc.length;Dr++){var Rr=xc[Dr],qy=Rr.toLowerCase(),Hy=Rr[0].toUpperCase()+Rr.slice(1);tl(qy,"on"+Hy)}tl(Uf,"onAnimationEnd"),tl(qf,"onAnimationIteration"),tl(Hf,"onAnimationStart"),tl("dblclick","onDoubleClick"),tl("focusin","onFocus"),tl("focusout","onBlur"),tl(Px,"onTransitionRun"),tl(ey,"onTransitionStart"),tl(ty,"onTransitionCancel"),tl(Qf,"onTransitionEnd"),ia("onMouseEnter",["mouseout","mouseover"]),ia("onMouseLeave",["mouseout","mouseover"]),ia("onPointerEnter",["pointerout","pointerover"]),ia("onPointerLeave",["pointerout","pointerover"]),Nn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Nn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Nn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Nn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hi="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(" "),Qy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hi));function i0(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],a=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var f=n.length-1;0<=f;f--){var h=n[f],m=h.instance,A=h.currentTarget;if(h=h.listener,m!==s&&a.isPropagationStopped())break e;s=h,a.currentTarget=A;try{s(a)}catch(C){bs(C)}a.currentTarget=null,s=m}else for(f=0;f<n.length;f++){if(h=n[f],m=h.instance,A=h.currentTarget,h=h.listener,m!==s&&a.isPropagationStopped())break e;s=h,a.currentTarget=A;try{s(a)}catch(C){bs(C)}a.currentTarget=null,s=m}}}}function xe(e,t){var l=t[ku];l===void 0&&(l=t[ku]=new Set);var n=e+"__bubble";l.has(n)||(s0(t,e,2,!1),l.add(n))}function Ur(e,t,l){var n=0;t&&(n|=4),s0(l,e,n,t)}var su="_reactListening"+Math.random().toString(36).slice(2);function qr(e){if(!e[su]){e[su]=!0,Io.forEach(function(l){l!=="selectionchange"&&(Qy.has(l)||Ur(l,!1,e),Ur(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[su]||(t[su]=!0,Ur("selectionchange",!1,t))}}function s0(e,t,l,n){switch(U0(t)){case 2:var a=dv;break;case 8:a=hv;break;default:a=Wr}l=a.bind(null,t,l,e),a=void 0,!lc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,l,{capture:!0,passive:a}):e.addEventListener(t,l,!0):a!==void 0?e.addEventListener(t,l,{passive:a}):e.addEventListener(t,l,!1)}function Hr(e,t,l,n,a){var s=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var f=n.tag;if(f===3||f===4){var h=n.stateNode.containerInfo;if(h===a)break;if(f===4)for(f=n.return;f!==null;){var m=f.tag;if((m===3||m===4)&&f.stateNode.containerInfo===a)return;f=f.return}for(;h!==null;){if(f=la(h),f===null)return;if(m=f.tag,m===5||m===6||m===26||m===27){n=s=f;continue e}h=h.parentNode}}n=n.return}ff(function(){var A=s,C=ec(l),R=[];e:{var E=Bf.get(e);if(E!==void 0){var T=vs,J=e;switch(e){case"keypress":if(xs(l)===0)break e;case"keydown":case"keyup":T=_x;break;case"focusin":J="focus",T=sc;break;case"focusout":J="blur",T=sc;break;case"beforeblur":case"afterblur":T=sc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":T=mf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":T=px;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":T=Rx;break;case Uf:case qf:case Hf:T=Sx;break;case Qf:T=qx;break;case"scroll":case"scrollend":T=vx;break;case"wheel":T=Qx;break;case"copy":case"cut":case"paste":T=Nx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":T=yf;break;case"toggle":case"beforetoggle":T=Lx}var ee=(t&4)!==0,_e=!ee&&(e==="scroll"||e==="scrollend"),j=ee?E!==null?E+"Capture":null:E;ee=[];for(var v=A,N;v!==null;){var D=v;if(N=D.stateNode,D=D.tag,D!==5&&D!==26&&D!==27||N===null||j===null||(D=ii(v,j),D!=null&&ee.push(Qi(v,D,N))),_e)break;v=v.return}0<ee.length&&(E=new T(E,J,null,l,C),R.push({event:E,listeners:ee}))}}if((t&7)===0){e:{if(E=e==="mouseover"||e==="pointerover",T=e==="mouseout"||e==="pointerout",E&&l!==Pu&&(J=l.relatedTarget||l.fromElement)&&(la(J)||J[ta]))break e;if((T||E)&&(E=C.window===C?C:(E=C.ownerDocument)?E.defaultView||E.parentWindow:window,T?(J=l.relatedTarget||l.toElement,T=A,J=J?la(J):null,J!==null&&(_e=y(J),ee=J.tag,J!==_e||ee!==5&&ee!==27&&ee!==6)&&(J=null)):(T=null,J=A),T!==J)){if(ee=mf,D="onMouseLeave",j="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(ee=yf,D="onPointerLeave",j="onPointerEnter",v="pointer"),_e=T==null?E:ai(T),N=J==null?E:ai(J),E=new ee(D,v+"leave",T,l,C),E.target=_e,E.relatedTarget=N,D=null,la(C)===A&&(ee=new ee(j,v+"enter",J,l,C),ee.target=N,ee.relatedTarget=_e,D=ee),_e=D,T&&J)t:{for(ee=By,j=T,v=J,N=0,D=j;D;D=ee(D))N++;D=0;for(var P=v;P;P=ee(P))D++;for(;0<N-D;)j=ee(j),N--;for(;0<D-N;)v=ee(v),D--;for(;N--;){if(j===v||v!==null&&j===v.alternate){ee=j;break t}j=ee(j),v=ee(v)}ee=null}else ee=null;T!==null&&u0(R,E,T,ee,!1),J!==null&&_e!==null&&u0(R,_e,J,ee,!0)}}e:{if(E=A?ai(A):window,T=E.nodeName&&E.nodeName.toLowerCase(),T==="select"||T==="input"&&E.type==="file")var be=Nf;else if(Sf(E))if(Af)be=$x;else{be=Jx;var W=kx}else T=E.nodeName,!T||T.toLowerCase()!=="input"||E.type!=="checkbox"&&E.type!=="radio"?A&&Iu(A.elementType)&&(be=Nf):be=Fx;if(be&&(be=be(e,A))){zf(R,be,l,C);break e}W&&W(e,E,A),e==="focusout"&&A&&E.type==="number"&&A.memoizedProps.value!=null&&Wu(E,"number",E.value)}switch(W=A?ai(A):window,e){case"focusin":(Sf(W)||W.contentEditable==="true")&&(fa=W,dc=A,hi=null);break;case"focusout":hi=dc=fa=null;break;case"mousedown":hc=!0;break;case"contextmenu":case"mouseup":case"dragend":hc=!1,Df(R,l,C);break;case"selectionchange":if(Ix)break;case"keydown":case"keyup":Df(R,l,C)}var ce;if(cc)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else oa?bf(e,l)&&(ve="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ve="onCompositionStart");ve&&(vf&&l.locale!=="ko"&&(oa||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&oa&&(ce=df()):(Yl=C,nc="value"in Yl?Yl.value:Yl.textContent,oa=!0)),W=uu(A,ve),0<W.length&&(ve=new xf(ve,e,null,l,C),R.push({event:ve,listeners:W}),ce?ve.data=ce:(ce=jf(l),ce!==null&&(ve.data=ce)))),(ce=Gx?Xx(e,l):Zx(e,l))&&(ve=uu(A,"onBeforeInput"),0<ve.length&&(W=new xf("onBeforeInput","beforeinput",null,l,C),R.push({event:W,listeners:ve}),W.data=ce)),Uy(R,e,A,l,C)}i0(R,t)})}function Qi(e,t,l){return{instance:e,listener:t,currentTarget:l}}function uu(e,t){for(var l=t+"Capture",n=[];e!==null;){var a=e,s=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||s===null||(a=ii(e,l),a!=null&&n.unshift(Qi(e,a,s)),a=ii(e,t),a!=null&&n.push(Qi(e,a,s))),e.tag===3)return n;e=e.return}return[]}function By(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function u0(e,t,l,n,a){for(var s=t._reactName,f=[];l!==null&&l!==n;){var h=l,m=h.alternate,A=h.stateNode;if(h=h.tag,m!==null&&m===n)break;h!==5&&h!==26&&h!==27||A===null||(m=A,a?(A=ii(l,s),A!=null&&f.unshift(Qi(l,A,m))):a||(A=ii(l,s),A!=null&&f.push(Qi(l,A,m)))),l=l.return}f.length!==0&&e.push({event:t,listeners:f})}var Ly=/\r\n?/g,Yy=/\u0000|\uFFFD/g;function c0(e){return(typeof e=="string"?e:""+e).replace(Ly,`
49
+ `).replace(Yy,"")}function r0(e,t){return t=c0(t),c0(e)===t}function Me(e,t,l,n,a,s){switch(l){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||ua(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&ua(e,""+n);break;case"className":fs(e,"class",n);break;case"tabIndex":fs(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":fs(e,l,n);break;case"style":rf(e,n,s);break;case"data":if(t!=="object"){fs(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=hs(""+n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(l==="formAction"?(t!=="input"&&Me(e,t,"name",a.name,a,null),Me(e,t,"formEncType",a.formEncType,a,null),Me(e,t,"formMethod",a.formMethod,a,null),Me(e,t,"formTarget",a.formTarget,a,null)):(Me(e,t,"encType",a.encType,a,null),Me(e,t,"method",a.method,a,null),Me(e,t,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=hs(""+n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=ml);break;case"onScroll":n!=null&&xe("scroll",e);break;case"onScrollEnd":n!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=hs(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""+n):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":xe("beforetoggle",e),xe("toggle",e),os(e,"popover",n);break;case"xlinkActuate":hl(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":hl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":hl(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":hl(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":hl(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":hl(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":hl(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":hl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":hl(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":os(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=xx.get(l)||l,os(e,l,n))}}function Qr(e,t,l,n,a,s){switch(l){case"style":rf(e,n,s);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"children":typeof n=="string"?ua(e,n):(typeof n=="number"||typeof n=="bigint")&&ua(e,""+n);break;case"onScroll":n!=null&&xe("scroll",e);break;case"onScrollEnd":n!=null&&xe("scrollend",e);break;case"onClick":n!=null&&(e.onclick=ml);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Po.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),t=l.slice(2,a?l.length-7:void 0),s=e[pt]||null,s=s!=null?s[l]:null,typeof s=="function"&&e.removeEventListener(t,s,a),typeof n=="function")){typeof s!="function"&&s!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,n,a);break e}l in e?e[l]=n:n===!0?e.setAttribute(l,""):os(e,l,n)}}}function ct(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var n=!1,a=!1,s;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];if(f!=null)switch(s){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Me(e,t,s,f,l,null)}}a&&Me(e,t,"srcSet",l.srcSet,l,null),n&&Me(e,t,"src",l.src,l,null);return;case"input":xe("invalid",e);var h=s=f=a=null,m=null,A=null;for(n in l)if(l.hasOwnProperty(n)){var C=l[n];if(C!=null)switch(n){case"name":a=C;break;case"type":f=C;break;case"checked":m=C;break;case"defaultChecked":A=C;break;case"value":s=C;break;case"defaultValue":h=C;break;case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(o(137,t));break;default:Me(e,t,n,C,l,null)}}af(e,s,h,m,A,f,a,!1);return;case"select":xe("invalid",e),n=f=s=null;for(a in l)if(l.hasOwnProperty(a)&&(h=l[a],h!=null))switch(a){case"value":s=h;break;case"defaultValue":f=h;break;case"multiple":n=h;default:Me(e,t,a,h,l,null)}t=s,l=f,e.multiple=!!n,t!=null?sa(e,!!n,t,!1):l!=null&&sa(e,!!n,l,!0);return;case"textarea":xe("invalid",e),s=a=n=null;for(f in l)if(l.hasOwnProperty(f)&&(h=l[f],h!=null))switch(f){case"value":n=h;break;case"defaultValue":a=h;break;case"children":s=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(o(91));break;default:Me(e,t,f,h,l,null)}uf(e,n,a,s);return;case"option":for(m in l)if(l.hasOwnProperty(m)&&(n=l[m],n!=null))switch(m){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Me(e,t,m,n,l,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(n=0;n<Hi.length;n++)xe(Hi[n],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(A in l)if(l.hasOwnProperty(A)&&(n=l[A],n!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Me(e,t,A,n,l,null)}return;default:if(Iu(t)){for(C in l)l.hasOwnProperty(C)&&(n=l[C],n!==void 0&&Qr(e,t,C,n,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(n=l[h],n!=null&&Me(e,t,h,n,l,null))}function Gy(e,t,l,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,s=null,f=null,h=null,m=null,A=null,C=null;for(T in l){var R=l[T];if(l.hasOwnProperty(T)&&R!=null)switch(T){case"checked":break;case"value":break;case"defaultValue":m=R;default:n.hasOwnProperty(T)||Me(e,t,T,null,n,R)}}for(var E in n){var T=n[E];if(R=l[E],n.hasOwnProperty(E)&&(T!=null||R!=null))switch(E){case"type":s=T;break;case"name":a=T;break;case"checked":A=T;break;case"defaultChecked":C=T;break;case"value":f=T;break;case"defaultValue":h=T;break;case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(o(137,t));break;default:T!==R&&Me(e,t,E,T,n,R)}}$u(e,f,h,m,A,C,s,a);return;case"select":T=f=h=E=null;for(s in l)if(m=l[s],l.hasOwnProperty(s)&&m!=null)switch(s){case"value":break;case"multiple":T=m;default:n.hasOwnProperty(s)||Me(e,t,s,null,n,m)}for(a in n)if(s=n[a],m=l[a],n.hasOwnProperty(a)&&(s!=null||m!=null))switch(a){case"value":E=s;break;case"defaultValue":h=s;break;case"multiple":f=s;default:s!==m&&Me(e,t,a,s,n,m)}t=h,l=f,n=T,E!=null?sa(e,!!l,E,!1):!!n!=!!l&&(t!=null?sa(e,!!l,t,!0):sa(e,!!l,l?[]:"",!1));return;case"textarea":T=E=null;for(h in l)if(a=l[h],l.hasOwnProperty(h)&&a!=null&&!n.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Me(e,t,h,null,n,a)}for(f in n)if(a=n[f],s=l[f],n.hasOwnProperty(f)&&(a!=null||s!=null))switch(f){case"value":E=a;break;case"defaultValue":T=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(o(91));break;default:a!==s&&Me(e,t,f,a,n,s)}sf(e,E,T);return;case"option":for(var J in l)if(E=l[J],l.hasOwnProperty(J)&&E!=null&&!n.hasOwnProperty(J))switch(J){case"selected":e.selected=!1;break;default:Me(e,t,J,null,n,E)}for(m in n)if(E=n[m],T=l[m],n.hasOwnProperty(m)&&E!==T&&(E!=null||T!=null))switch(m){case"selected":e.selected=E&&typeof E!="function"&&typeof E!="symbol";break;default:Me(e,t,m,E,n,T)}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 ee in l)E=l[ee],l.hasOwnProperty(ee)&&E!=null&&!n.hasOwnProperty(ee)&&Me(e,t,ee,null,n,E);for(A in n)if(E=n[A],T=l[A],n.hasOwnProperty(A)&&E!==T&&(E!=null||T!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(E!=null)throw Error(o(137,t));break;default:Me(e,t,A,E,n,T)}return;default:if(Iu(t)){for(var _e in l)E=l[_e],l.hasOwnProperty(_e)&&E!==void 0&&!n.hasOwnProperty(_e)&&Qr(e,t,_e,void 0,n,E);for(C in n)E=n[C],T=l[C],!n.hasOwnProperty(C)||E===T||E===void 0&&T===void 0||Qr(e,t,C,E,n,T);return}}for(var j in l)E=l[j],l.hasOwnProperty(j)&&E!=null&&!n.hasOwnProperty(j)&&Me(e,t,j,null,n,E);for(R in n)E=n[R],T=l[R],!n.hasOwnProperty(R)||E===T||E==null&&T==null||Me(e,t,R,E,n,T)}function o0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Xy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],s=a.transferSize,f=a.initiatorType,h=a.duration;if(s&&h&&o0(f)){for(f=0,h=a.responseEnd,n+=1;n<l.length;n++){var m=l[n],A=m.startTime;if(A>h)break;var C=m.transferSize,R=m.initiatorType;C&&o0(R)&&(m=m.responseEnd,f+=C*(m<h?1:(h-A)/(m-A)))}if(--n,t+=8*(s+f)/(a.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 Br=null,Lr=null;function cu(e){return e.nodeType===9?e:e.ownerDocument}function f0(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 d0(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 Yr(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 Gr=null;function Zy(){var e=window.event;return e&&e.type==="popstate"?e===Gr?!1:(Gr=e,!0):(Gr=null,!1)}var h0=typeof setTimeout=="function"?setTimeout:void 0,Ky=typeof clearTimeout=="function"?clearTimeout:void 0,m0=typeof Promise=="function"?Promise:void 0,Vy=typeof queueMicrotask=="function"?queueMicrotask:typeof m0<"u"?function(e){return m0.resolve(null).then(e).catch(ky)}:h0;function ky(e){setTimeout(function(){throw e})}function an(e){return e==="head"}function x0(e,t){var l=t,n=0;do{var a=l.nextSibling;if(e.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(a),Qa(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Bi(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Bi(l);for(var s=l.firstChild;s;){var f=s.nextSibling,h=s.nodeName;s[ni]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&s.rel.toLowerCase()==="stylesheet"||l.removeChild(s),s=f}}else l==="body"&&Bi(e.ownerDocument.body);l=a}while(l);Qa(t)}function y0(e,t){var l=e;e=0;do{var n=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function Xr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Xr(l),Ju(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Jy(e,t,l,n){for(;e.nodeType===1;){var a=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[ni])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=$t(e.nextSibling),e===null)break}return null}function Fy(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=$t(e.nextSibling),e===null))return null;return e}function v0(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 Zr(e){return e.data==="$?"||e.data==="$~"}function Kr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $y(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function $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 Vr=null;function g0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return $t(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function p0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function b0(e,t,l){switch(t=cu(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Bi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ju(e)}var Wt=new Map,j0=new Set;function ru(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ml=Z.d;Z.d={f:Wy,r:Iy,D:Py,C:ev,L:tv,m:lv,X:av,S:nv,M:iv};function Wy(){var e=Ml.f(),t=eu();return e||t}function Iy(e){var t=na(e);t!==null&&t.tag===5&&t.type==="form"?Qd(t):Ml.r(e)}var Ua=typeof document>"u"?null:document;function S0(e,t,l){var n=Ua;if(n&&typeof t=="string"&&t){var a=Xt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),j0.has(a)||(j0.add(a),e={rel:e,crossOrigin:l,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),ct(t,"link",e),tt(t),n.head.appendChild(t)))}}function Py(e){Ml.D(e),S0("dns-prefetch",e,null)}function ev(e,t){Ml.C(e,t),S0("preconnect",e,t)}function tv(e,t,l){Ml.L(e,t,l);var n=Ua;if(n&&e&&t){var a='link[rel="preload"][as="'+Xt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Xt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Xt(l.imageSizes)+'"]')):a+='[href="'+Xt(e)+'"]';var s=a;switch(t){case"style":s=qa(e);break;case"script":s=Ha(e)}Wt.has(s)||(e=O({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Wt.set(s,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(Li(s))||t==="script"&&n.querySelector(Yi(s))||(t=n.createElement("link"),ct(t,"link",e),tt(t),n.head.appendChild(t)))}}function lv(e,t){Ml.m(e,t);var l=Ua;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Xt(n)+'"][href="'+Xt(e)+'"]',s=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Ha(e)}if(!Wt.has(s)&&(e=O({rel:"modulepreload",href:e},t),Wt.set(s,e),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Yi(s)))return}n=l.createElement("link"),ct(n,"link",e),tt(n),l.head.appendChild(n)}}}function nv(e,t,l){Ml.S(e,t,l);var n=Ua;if(n&&e){var a=aa(n).hoistableStyles,s=qa(e);t=t||"default";var f=a.get(s);if(!f){var h={loading:0,preload:null};if(f=n.querySelector(Li(s)))h.loading=5;else{e=O({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Wt.get(s))&&kr(e,l);var m=f=n.createElement("link");tt(m),ct(m,"link",e),m._p=new Promise(function(A,C){m.onload=A,m.onerror=C}),m.addEventListener("load",function(){h.loading|=1}),m.addEventListener("error",function(){h.loading|=2}),h.loading|=4,ou(f,t,n)}f={type:"stylesheet",instance:f,count:1,state:h},a.set(s,f)}}}function av(e,t){Ml.X(e,t);var l=Ua;if(l&&e){var n=aa(l).hoistableScripts,a=Ha(e),s=n.get(a);s||(s=l.querySelector(Yi(a)),s||(e=O({src:e,async:!0},t),(t=Wt.get(a))&&Jr(e,t),s=l.createElement("script"),tt(s),ct(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(a,s))}}function iv(e,t){Ml.M(e,t);var l=Ua;if(l&&e){var n=aa(l).hoistableScripts,a=Ha(e),s=n.get(a);s||(s=l.querySelector(Yi(a)),s||(e=O({src:e,async:!0,type:"module"},t),(t=Wt.get(a))&&Jr(e,t),s=l.createElement("script"),tt(s),ct(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(a,s))}}function z0(e,t,l,n){var a=(a=he.current)?ru(a):null;if(!a)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=qa(l.href),l=aa(a).hoistableStyles,n=l.get(t),n||(n={type:"style",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=qa(l.href);var s=aa(a).hoistableStyles,f=s.get(e);if(f||(a=a.ownerDocument||a,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,f),(s=a.querySelector(Li(e)))&&!s._p&&(f.instance=s,f.state.loading=5),Wt.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Wt.set(e,l),s||sv(a,e,l,f.state))),t&&n===null)throw Error(o(528,""));return f}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ha(l),l=aa(a).hoistableScripts,n=l.get(t),n||(n={type:"script",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function qa(e){return'href="'+Xt(e)+'"'}function Li(e){return'link[rel="stylesheet"]['+e+"]"}function N0(e){return O({},e,{"data-precedence":e.precedence,precedence:null})}function sv(e,t,l,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),ct(t,"link",l),tt(t),e.head.appendChild(t))}function Ha(e){return'[src="'+Xt(e)+'"]'}function Yi(e){return"script[async]"+e}function A0(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Xt(l.href)+'"]');if(n)return t.instance=n,tt(n),n;var a=O({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),tt(n),ct(n,"style",a),ou(n,l.precedence,e),t.instance=n;case"stylesheet":a=qa(l.href);var s=e.querySelector(Li(a));if(s)return t.state.loading|=4,t.instance=s,tt(s),s;n=N0(l),(a=Wt.get(a))&&kr(n,a),s=(e.ownerDocument||e).createElement("link"),tt(s);var f=s;return f._p=new Promise(function(h,m){f.onload=h,f.onerror=m}),ct(s,"link",n),t.state.loading|=4,ou(s,l.precedence,e),t.instance=s;case"script":return s=Ha(l.src),(a=e.querySelector(Yi(s)))?(t.instance=a,tt(a),a):(n=l,(a=Wt.get(s))&&(n=O({},l),Jr(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),tt(a),ct(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,ou(n,l.precedence,e));return t.instance}function ou(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,s=a,f=0;f<n.length;f++){var h=n[f];if(h.dataset.precedence===t)s=h;else if(s!==a)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function kr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Jr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var fu=null;function E0(e,t,l){if(fu===null){var n=new Map,a=fu=new Map;a.set(l,n)}else a=fu,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),a=0;a<l.length;a++){var s=l[a];if(!(s[ni]||s[at]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var f=s.getAttribute(t)||"";f=e+f;var h=n.get(f);h?h.push(s):n.set(f,[s])}}return n}function T0(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function uv(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function O0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function cv(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=qa(n.href),s=t.querySelector(Li(a));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=du.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=s,tt(s);return}s=t.ownerDocument||t,n=N0(n),(a=Wt.get(a))&&kr(n,a),s=s.createElement("link"),tt(s);var f=s;f._p=new Promise(function(h,m){f.onload=h,f.onerror=m}),ct(s,"link",n),l.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=du.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Fr=0;function rv(e,t){return e.stylesheets&&e.count===0&&mu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&mu(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Fr===0&&(Fr=62500*Xy());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&mu(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Fr?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function du(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var hu=null;function mu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,hu=new Map,t.forEach(ov,e),hu=null,du.call(e))}function ov(e,t){if(!(t.state.loading&4)){var l=hu.get(e);if(l)var n=l.get(null);else{l=new Map,hu.set(e,l);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<a.length;s++){var f=a[s];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(l.set(f.dataset.precedence,f),n=f)}n&&l.set(null,n)}a=t.instance,f=a.getAttribute("data-precedence"),s=l.get(f)||n,s===n&&l.set(null,a),l.set(f,a),this.count++,n=du.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),s?s.parentNode.insertBefore(a,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Gi={$$typeof:$,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function fv(e,t,l,n,a,s,f,h,m){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=Zu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zu(0),this.hiddenUpdates=Zu(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=s,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function C0(e,t,l,n,a,s,f,h,m,A,C,R){return e=new fv(e,t,l,f,m,A,C,R,h),t=1,s===!0&&(t|=24),s=wt(3,null,null,t),e.current=s,s.stateNode=e,t=Oc(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:n,isDehydrated:l,cache:t},wc(s),e}function M0(e){return e?(e=ma,e):ma}function _0(e,t,l,n,a,s){a=M0(a),n.context===null?n.context=a:n.pendingContext=a,n=kl(t),n.payload={element:l},s=s===void 0?null:s,s!==null&&(n.callback=s),l=Jl(e,n,t),l!==null&&(At(l,e,t),bi(l,e,t))}function w0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function $r(e,t){w0(e,t),(e=e.alternate)&&w0(e,t)}function D0(e){if(e.tag===13||e.tag===31){var t=On(e,67108864);t!==null&&At(t,e,67108864),$r(e,67108864)}}function R0(e){if(e.tag===13||e.tag===31){var t=Ht();t=Ku(t);var l=On(e,t);l!==null&&At(l,e,t),$r(e,t)}}var xu=!0;function dv(e,t,l,n){var a=M.T;M.T=null;var s=Z.p;try{Z.p=2,Wr(e,t,l,n)}finally{Z.p=s,M.T=a}}function hv(e,t,l,n){var a=M.T;M.T=null;var s=Z.p;try{Z.p=8,Wr(e,t,l,n)}finally{Z.p=s,M.T=a}}function Wr(e,t,l,n){if(xu){var a=Ir(n);if(a===null)Hr(e,t,n,yu,l),q0(e,n);else if(xv(a,e,t,l,n))n.stopPropagation();else if(q0(e,n),t&4&&-1<mv.indexOf(e)){for(;a!==null;){var s=na(a);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var f=zn(s.pendingLanes);if(f!==0){var h=s;for(h.pendingLanes|=2,h.entangledLanes|=2;f;){var m=1<<31-Mt(f);h.entanglements[1]|=m,f&=~m}rl(s),(Se&6)===0&&(Is=Ot()+500,qi(0))}}break;case 31:case 13:h=On(s,2),h!==null&&At(h,s,2),eu(),$r(s,2)}if(s=Ir(n),s===null&&Hr(e,t,n,yu,l),s===a)break;a=s}a!==null&&n.stopPropagation()}else Hr(e,t,n,null,l)}}function Ir(e){return e=ec(e),Pr(e)}var yu=null;function Pr(e){if(yu=null,e=la(e),e!==null){var t=y(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=p(t),e!==null)return e;e=null}else if(l===31){if(e=z(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yu=e,null}function U0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Pm()){case Go:return 2;case Xo:return 8;case is:case ex:return 32;case Zo:return 268435456;default:return 32}default:return 32}}var eo=!1,sn=null,un=null,cn=null,Xi=new Map,Zi=new Map,rn=[],mv="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 q0(e,t){switch(e){case"focusin":case"focusout":sn=null;break;case"dragenter":case"dragleave":un=null;break;case"mouseover":case"mouseout":cn=null;break;case"pointerover":case"pointerout":Xi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zi.delete(t.pointerId)}}function Ki(e,t,l,n,a,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:s,targetContainers:[a]},t!==null&&(t=na(t),t!==null&&D0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function xv(e,t,l,n,a){switch(t){case"focusin":return sn=Ki(sn,e,t,l,n,a),!0;case"dragenter":return un=Ki(un,e,t,l,n,a),!0;case"mouseover":return cn=Ki(cn,e,t,l,n,a),!0;case"pointerover":var s=a.pointerId;return Xi.set(s,Ki(Xi.get(s)||null,e,t,l,n,a)),!0;case"gotpointercapture":return s=a.pointerId,Zi.set(s,Ki(Zi.get(s)||null,e,t,l,n,a)),!0}return!1}function H0(e){var t=la(e.target);if(t!==null){var l=y(t);if(l!==null){if(t=l.tag,t===13){if(t=p(l),t!==null){e.blockedOn=t,$o(e.priority,function(){R0(l)});return}}else if(t===31){if(t=z(l),t!==null){e.blockedOn=t,$o(e.priority,function(){R0(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function vu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Ir(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);Pu=n,l.target.dispatchEvent(n),Pu=null}else return t=na(l),t!==null&&D0(t),e.blockedOn=l,!1;t.shift()}return!0}function Q0(e,t,l){vu(e)&&l.delete(t)}function yv(){eo=!1,sn!==null&&vu(sn)&&(sn=null),un!==null&&vu(un)&&(un=null),cn!==null&&vu(cn)&&(cn=null),Xi.forEach(Q0),Zi.forEach(Q0)}function gu(e,t){e.blockedOn===t&&(e.blockedOn=null,eo||(eo=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,yv)))}var pu=null;function B0(e){pu!==e&&(pu=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){pu===e&&(pu=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],a=e[t+2];if(typeof n!="function"){if(Pr(n||l)===null)continue;break}var s=na(l);s!==null&&(e.splice(t,3),t-=3,Ic(s,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function Qa(e){function t(m){return gu(m,e)}sn!==null&&gu(sn,e),un!==null&&gu(un,e),cn!==null&&gu(cn,e),Xi.forEach(t),Zi.forEach(t);for(var l=0;l<rn.length;l++){var n=rn[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<rn.length&&(l=rn[0],l.blockedOn===null);)H0(l),l.blockedOn===null&&rn.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],s=l[n+1],f=a[pt]||null;if(typeof s=="function")f||B0(l);else if(f){var h=null;if(s&&s.hasAttribute("formAction")){if(a=s,f=s[pt]||null)h=f.formAction;else if(Pr(a)!==null)continue}else h=f.action;typeof h=="function"?l[n+1]=h:(l.splice(n,3),n-=3),B0(l)}}}function L0(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(f){return a=f})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function to(e){this._internalRoot=e}bu.prototype.render=to.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,n=Ht();_0(l,n,e,t,null,null)},bu.prototype.unmount=to.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_0(e.current,2,null,e,null,null),eu(),t[ta]=null}};function bu(e){this._internalRoot=e}bu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fo();e={blockedOn:null,target:e,priority:t};for(var l=0;l<rn.length&&t!==0&&t<rn[l].priority;l++);rn.splice(l,0,e),l===0&&H0(e)}};var Y0=u.version;if(Y0!=="19.2.4")throw Error(o(527,Y0,"19.2.4"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=b(t),e=e!==null?H(e):null,e=e===null?null:e.stateNode,e};var vv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ju=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ju.isDisabled&&ju.supportsFiber)try{ei=ju.inject(vv),Ct=ju}catch{}}return ki.createRoot=function(e,t){if(!d(e))throw Error(o(299));var l=!1,n="",a=Jd,s=Fd,f=$d;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=C0(e,1,!1,null,null,l,n,null,a,s,f,L0),e[ta]=t.current,qr(e),new to(t)},ki.hydrateRoot=function(e,t,l){if(!d(e))throw Error(o(299));var n=!1,a="",s=Jd,f=Fd,h=$d,m=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(s=l.onUncaughtError),l.onCaughtError!==void 0&&(f=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(m=l.formState)),t=C0(e,1,!0,t,l??null,n,a,m,s,f,h,L0),t.context=M0(null),l=t.current,n=Ht(),n=Ku(n),a=kl(n),a.callback=null,Jl(l,a,n),l=n,t.current.lanes=l,li(t,l),rl(t),e[ta]=t.current,qr(e),new bu(t)},ki.version="19.2.4",ki}var I0;function Tv(){if(I0)return io.exports;I0=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(u){console.error(u)}}return c(),io.exports=Ev(),io.exports}var Ov=Tv(),Ia=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(c){return this.listeners.add(c),this.onSubscribe(),()=>{this.listeners.delete(c),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Gn,dn,Ba,pm,Cv=(pm=class extends Ia{constructor(){super();I(this,Gn);I(this,dn);I(this,Ba);V(this,Ba,u=>{if(typeof window<"u"&&window.addEventListener){const r=()=>u();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){x(this,dn)||this.setEventListener(x(this,Ba))}onUnsubscribe(){var u;this.hasListeners()||((u=x(this,dn))==null||u.call(this),V(this,dn,void 0))}setEventListener(u){var r;V(this,Ba,u),(r=x(this,dn))==null||r.call(this),V(this,dn,u(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(u){x(this,Gn)!==u&&(V(this,Gn,u),this.onFocus())}onFocus(){const u=this.isFocused();this.listeners.forEach(r=>{r(u)})}isFocused(){var u;return typeof x(this,Gn)=="boolean"?x(this,Gn):((u=globalThis.document)==null?void 0:u.visibilityState)!=="hidden"}},Gn=new WeakMap,dn=new WeakMap,Ba=new WeakMap,pm),wo=new Cv,Mv={setTimeout:(c,u)=>setTimeout(c,u),clearTimeout:c=>clearTimeout(c),setInterval:(c,u)=>setInterval(c,u),clearInterval:c=>clearInterval(c)},hn,Mo,bm,_v=(bm=class{constructor(){I(this,hn,Mv);I(this,Mo,!1)}setTimeoutProvider(c){V(this,hn,c)}setTimeout(c,u){return x(this,hn).setTimeout(c,u)}clearTimeout(c){x(this,hn).clearTimeout(c)}setInterval(c,u){return x(this,hn).setInterval(c,u)}clearInterval(c){x(this,hn).clearInterval(c)}},hn=new WeakMap,Mo=new WeakMap,bm),Yn=new _v;function wv(c){setTimeout(c,0)}var Dv=typeof window>"u"||"Deno"in globalThis;function vt(){}function Rv(c,u){return typeof c=="function"?c(u):c}function fo(c){return typeof c=="number"&&c>=0&&c!==1/0}function Mm(c,u){return Math.max(c+(u||0)-Date.now(),0)}function jn(c,u){return typeof c=="function"?c(u):c}function Pt(c,u){return typeof c=="function"?c(u):c}function P0(c,u){const{type:r="all",exact:o,fetchStatus:d,predicate:y,queryKey:p,stale:z}=c;if(p){if(o){if(u.queryHash!==Do(p,u.options))return!1}else if(!Fi(u.queryKey,p))return!1}if(r!=="all"){const S=u.isActive();if(r==="active"&&!S||r==="inactive"&&S)return!1}return!(typeof z=="boolean"&&u.isStale()!==z||d&&d!==u.state.fetchStatus||y&&!y(u))}function em(c,u){const{exact:r,status:o,predicate:d,mutationKey:y}=c;if(y){if(!u.options.mutationKey)return!1;if(r){if(Wn(u.options.mutationKey)!==Wn(y))return!1}else if(!Fi(u.options.mutationKey,y))return!1}return!(o&&u.state.status!==o||d&&!d(u))}function Do(c,u){return((u==null?void 0:u.queryKeyHashFn)||Wn)(c)}function Wn(c){return JSON.stringify(c,(u,r)=>ho(r)?Object.keys(r).sort().reduce((o,d)=>(o[d]=r[d],o),{}):r)}function Fi(c,u){return c===u?!0:typeof c!=typeof u?!1:c&&u&&typeof c=="object"&&typeof u=="object"?Object.keys(u).every(r=>Fi(c[r],u[r])):!1}var Uv=Object.prototype.hasOwnProperty;function _m(c,u,r=0){if(c===u)return c;if(r>500)return u;const o=tm(c)&&tm(u);if(!o&&!(ho(c)&&ho(u)))return u;const y=(o?c:Object.keys(c)).length,p=o?u:Object.keys(u),z=p.length,S=o?new Array(z):{};let b=0;for(let H=0;H<z;H++){const O=o?H:p[H],_=c[O],q=u[O];if(_===q){S[O]=_,(o?H<y:Uv.call(c,O))&&b++;continue}if(_===null||q===null||typeof _!="object"||typeof q!="object"){S[O]=q;continue}const Q=_m(_,q,r+1);S[O]=Q,Q===_&&b++}return y===z&&b===y?c:S}function wu(c,u){if(!u||Object.keys(c).length!==Object.keys(u).length)return!1;for(const r in c)if(c[r]!==u[r])return!1;return!0}function tm(c){return Array.isArray(c)&&c.length===Object.keys(c).length}function ho(c){if(!lm(c))return!1;const u=c.constructor;if(u===void 0)return!0;const r=u.prototype;return!(!lm(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(c)!==Object.prototype)}function lm(c){return Object.prototype.toString.call(c)==="[object Object]"}function qv(c){return new Promise(u=>{Yn.setTimeout(u,c)})}function mo(c,u,r){return typeof r.structuralSharing=="function"?r.structuralSharing(c,u):r.structuralSharing!==!1?_m(c,u):u}function Hv(c,u,r=0){const o=[...c,u];return r&&o.length>r?o.slice(1):o}function Qv(c,u,r=0){const o=[u,...c];return r&&o.length>r?o.slice(0,-1):o}var Ro=Symbol();function wm(c,u){return!c.queryFn&&(u!=null&&u.initialPromise)?()=>u.initialPromise:!c.queryFn||c.queryFn===Ro?()=>Promise.reject(new Error(`Missing queryFn: '${c.queryHash}'`)):c.queryFn}function Uo(c,u){return typeof c=="function"?c(...u):!!c}function Bv(c,u,r){let o=!1,d;return Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(d??(d=u()),o||(o=!0,d.aborted?r():d.addEventListener("abort",r,{once:!0})),d)}),c}var $i=(()=>{let c=()=>Dv;return{isServer(){return c()},setIsServer(u){c=u}}})();function xo(){let c,u;const r=new Promise((d,y)=>{c=d,u=y});r.status="pending",r.catch(()=>{});function o(d){Object.assign(r,d),delete r.resolve,delete r.reject}return r.resolve=d=>{o({status:"fulfilled",value:d}),c(d)},r.reject=d=>{o({status:"rejected",reason:d}),u(d)},r}var Lv=wv;function Yv(){let c=[],u=0,r=z=>{z()},o=z=>{z()},d=Lv;const y=z=>{u?c.push(z):d(()=>{r(z)})},p=()=>{const z=c;c=[],z.length&&d(()=>{o(()=>{z.forEach(S=>{r(S)})})})};return{batch:z=>{let S;u++;try{S=z()}finally{u--,u||p()}return S},batchCalls:z=>(...S)=>{y(()=>{z(...S)})},schedule:y,setNotifyFunction:z=>{r=z},setBatchNotifyFunction:z=>{o=z},setScheduler:z=>{d=z}}}var Pe=Yv(),La,mn,Ya,jm,Gv=(jm=class extends Ia{constructor(){super();I(this,La,!0);I(this,mn);I(this,Ya);V(this,Ya,u=>{if(typeof window<"u"&&window.addEventListener){const r=()=>u(!0),o=()=>u(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",o)}}})}onSubscribe(){x(this,mn)||this.setEventListener(x(this,Ya))}onUnsubscribe(){var u;this.hasListeners()||((u=x(this,mn))==null||u.call(this),V(this,mn,void 0))}setEventListener(u){var r;V(this,Ya,u),(r=x(this,mn))==null||r.call(this),V(this,mn,u(this.setOnline.bind(this)))}setOnline(u){x(this,La)!==u&&(V(this,La,u),this.listeners.forEach(o=>{o(u)}))}isOnline(){return x(this,La)}},La=new WeakMap,mn=new WeakMap,Ya=new WeakMap,jm),Du=new Gv;function Xv(c){return Math.min(1e3*2**c,3e4)}function Dm(c){return(c??"online")==="online"?Du.isOnline():!0}var yo=class extends Error{constructor(c){super("CancelledError"),this.revert=c==null?void 0:c.revert,this.silent=c==null?void 0:c.silent}};function Rm(c){let u=!1,r=0,o;const d=xo(),y=()=>d.status!=="pending",p=B=>{var X;if(!y()){const L=new yo(B);_(L),(X=c.onCancel)==null||X.call(c,L)}},z=()=>{u=!0},S=()=>{u=!1},b=()=>wo.isFocused()&&(c.networkMode==="always"||Du.isOnline())&&c.canRun(),H=()=>Dm(c.networkMode)&&c.canRun(),O=B=>{y()||(o==null||o(),d.resolve(B))},_=B=>{y()||(o==null||o(),d.reject(B))},q=()=>new Promise(B=>{var X;o=L=>{(y()||b())&&B(L)},(X=c.onPause)==null||X.call(c)}).then(()=>{var B;o=void 0,y()||(B=c.onContinue)==null||B.call(c)}),Q=()=>{if(y())return;let B;const X=r===0?c.initialPromise:void 0;try{B=X??c.fn()}catch(L){B=Promise.reject(L)}Promise.resolve(B).then(O).catch(L=>{var fe;if(y())return;const G=c.retry??($i.isServer()?0:3),$=c.retryDelay??Xv,w=typeof $=="function"?$(r,L):$,le=G===!0||typeof G=="number"&&r<G||typeof G=="function"&&G(r,L);if(u||!le){_(L);return}r++,(fe=c.onFail)==null||fe.call(c,r,L),qv(w).then(()=>b()?void 0:q()).then(()=>{u?_(L):Q()})})};return{promise:d,status:()=>d.status,cancel:p,continue:()=>(o==null||o(),d),cancelRetry:z,continueRetry:S,canStart:H,start:()=>(H()?Q():q().then(Q),d)}}var Xn,Sm,Um=(Sm=class{constructor(){I(this,Xn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fo(this.gcTime)&&V(this,Xn,Yn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(c){this.gcTime=Math.max(this.gcTime||0,c??($i.isServer()?1/0:300*1e3))}clearGcTimeout(){x(this,Xn)&&(Yn.clearTimeout(x(this,Xn)),V(this,Xn,void 0))}},Xn=new WeakMap,Sm),Zn,Ga,It,Kn,nt,Wi,Vn,Qt,qm,_l,zm,Zv=(zm=class extends Um{constructor(u){super();I(this,Qt);I(this,Zn);I(this,Ga);I(this,It);I(this,Kn);I(this,nt);I(this,Wi);I(this,Vn);V(this,Vn,!1),V(this,Wi,u.defaultOptions),this.setOptions(u.options),this.observers=[],V(this,Kn,u.client),V(this,It,x(this,Kn).getQueryCache()),this.queryKey=u.queryKey,this.queryHash=u.queryHash,V(this,Zn,am(this.options)),this.state=u.state??x(this,Zn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var u;return(u=x(this,nt))==null?void 0:u.promise}setOptions(u){if(this.options={...x(this,Wi),...u},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=am(this.options);r.data!==void 0&&(this.setState(nm(r.data,r.dataUpdatedAt)),V(this,Zn,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&x(this,It).remove(this)}setData(u,r){const o=mo(this.state.data,u,this.options);return re(this,Qt,_l).call(this,{data:o,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),o}setState(u,r){re(this,Qt,_l).call(this,{type:"setState",state:u,setStateOptions:r})}cancel(u){var o,d;const r=(o=x(this,nt))==null?void 0:o.promise;return(d=x(this,nt))==null||d.cancel(u),r?r.then(vt).catch(vt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return x(this,Zn)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(u=>Pt(u.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ro||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(u=>jn(u.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(u=>u.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(u=0){return this.state.data===void 0?!0:u==="static"?!1:this.state.isInvalidated?!0:!Mm(this.state.dataUpdatedAt,u)}onFocus(){var r;const u=this.observers.find(o=>o.shouldFetchOnWindowFocus());u==null||u.refetch({cancelRefetch:!1}),(r=x(this,nt))==null||r.continue()}onOnline(){var r;const u=this.observers.find(o=>o.shouldFetchOnReconnect());u==null||u.refetch({cancelRefetch:!1}),(r=x(this,nt))==null||r.continue()}addObserver(u){this.observers.includes(u)||(this.observers.push(u),this.clearGcTimeout(),x(this,It).notify({type:"observerAdded",query:this,observer:u}))}removeObserver(u){this.observers.includes(u)&&(this.observers=this.observers.filter(r=>r!==u),this.observers.length||(x(this,nt)&&(x(this,Vn)||re(this,Qt,qm).call(this)?x(this,nt).cancel({revert:!0}):x(this,nt).cancelRetry()),this.scheduleGc()),x(this,It).notify({type:"observerRemoved",query:this,observer:u}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||re(this,Qt,_l).call(this,{type:"invalidate"})}async fetch(u,r){var S,b,H,O,_,q,Q,B,X,L,G,$;if(this.state.fetchStatus!=="idle"&&((S=x(this,nt))==null?void 0:S.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(x(this,nt))return x(this,nt).continueRetry(),x(this,nt).promise}if(u&&this.setOptions(u),!this.options.queryFn){const w=this.observers.find(le=>le.options.queryFn);w&&this.setOptions(w.options)}const o=new AbortController,d=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(V(this,Vn,!0),o.signal)})},y=()=>{const w=wm(this.options,r),fe=(()=>{const ne={client:x(this,Kn),queryKey:this.queryKey,meta:this.meta};return d(ne),ne})();return V(this,Vn,!1),this.options.persister?this.options.persister(w,fe,this):w(fe)},z=(()=>{const w={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:x(this,Kn),state:this.state,fetchFn:y};return d(w),w})();(b=this.options.behavior)==null||b.onFetch(z,this),V(this,Ga,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((H=z.fetchOptions)==null?void 0:H.meta))&&re(this,Qt,_l).call(this,{type:"fetch",meta:(O=z.fetchOptions)==null?void 0:O.meta}),V(this,nt,Rm({initialPromise:r==null?void 0:r.initialPromise,fn:z.fetchFn,onCancel:w=>{w instanceof yo&&w.revert&&this.setState({...x(this,Ga),fetchStatus:"idle"}),o.abort()},onFail:(w,le)=>{re(this,Qt,_l).call(this,{type:"failed",failureCount:w,error:le})},onPause:()=>{re(this,Qt,_l).call(this,{type:"pause"})},onContinue:()=>{re(this,Qt,_l).call(this,{type:"continue"})},retry:z.options.retry,retryDelay:z.options.retryDelay,networkMode:z.options.networkMode,canRun:()=>!0}));try{const w=await x(this,nt).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(q=(_=x(this,It).config).onSuccess)==null||q.call(_,w,this),(B=(Q=x(this,It).config).onSettled)==null||B.call(Q,w,this.state.error,this),w}catch(w){if(w instanceof yo){if(w.silent)return x(this,nt).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw re(this,Qt,_l).call(this,{type:"error",error:w}),(L=(X=x(this,It).config).onError)==null||L.call(X,w,this),($=(G=x(this,It).config).onSettled)==null||$.call(G,this.state.data,w,this),w}finally{this.scheduleGc()}}},Zn=new WeakMap,Ga=new WeakMap,It=new WeakMap,Kn=new WeakMap,nt=new WeakMap,Wi=new WeakMap,Vn=new WeakMap,Qt=new WeakSet,qm=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},_l=function(u){const r=o=>{switch(u.type){case"failed":return{...o,fetchFailureCount:u.failureCount,fetchFailureReason:u.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...Hm(o.data,this.options),fetchMeta:u.meta??null};case"success":const d={...o,...nm(u.data,u.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!u.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return V(this,Ga,u.manual?d:void 0),d;case"error":const y=u.error;return{...o,error:y,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:y,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...u.state}}};this.state=r(this.state),Pe.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),x(this,It).notify({query:this,type:"updated",action:u})})},zm);function Hm(c,u){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Dm(u.networkMode)?"fetching":"paused",...c===void 0&&{error:null,status:"pending"}}}function nm(c,u){return{data:c,dataUpdatedAt:u??Date.now(),error:null,isInvalidated:!1,status:"success"}}function am(c){const u=typeof c.initialData=="function"?c.initialData():c.initialData,r=u!==void 0,o=r?typeof c.initialDataUpdatedAt=="function"?c.initialDataUpdatedAt():c.initialDataUpdatedAt:0;return{data:u,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Et,pe,Ii,yt,kn,Xa,wl,xn,Pi,Za,Ka,Jn,Fn,yn,Va,Ne,Ji,vo,go,po,bo,jo,So,zo,Qm,Nm,Kv=(Nm=class extends Ia{constructor(u,r){super();I(this,Ne);I(this,Et);I(this,pe);I(this,Ii);I(this,yt);I(this,kn);I(this,Xa);I(this,wl);I(this,xn);I(this,Pi);I(this,Za);I(this,Ka);I(this,Jn);I(this,Fn);I(this,yn);I(this,Va,new Set);this.options=r,V(this,Et,u),V(this,xn,null),V(this,wl,xo()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(x(this,pe).addObserver(this),im(x(this,pe),this.options)?re(this,Ne,Ji).call(this):this.updateResult(),re(this,Ne,bo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return No(x(this,pe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return No(x(this,pe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,re(this,Ne,jo).call(this),re(this,Ne,So).call(this),x(this,pe).removeObserver(this)}setOptions(u){const r=this.options,o=x(this,pe);if(this.options=x(this,Et).defaultQueryOptions(u),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Pt(this.options.enabled,x(this,pe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");re(this,Ne,zo).call(this),x(this,pe).setOptions(this.options),r._defaulted&&!wu(this.options,r)&&x(this,Et).getQueryCache().notify({type:"observerOptionsUpdated",query:x(this,pe),observer:this});const d=this.hasListeners();d&&sm(x(this,pe),o,this.options,r)&&re(this,Ne,Ji).call(this),this.updateResult(),d&&(x(this,pe)!==o||Pt(this.options.enabled,x(this,pe))!==Pt(r.enabled,x(this,pe))||jn(this.options.staleTime,x(this,pe))!==jn(r.staleTime,x(this,pe)))&&re(this,Ne,vo).call(this);const y=re(this,Ne,go).call(this);d&&(x(this,pe)!==o||Pt(this.options.enabled,x(this,pe))!==Pt(r.enabled,x(this,pe))||y!==x(this,yn))&&re(this,Ne,po).call(this,y)}getOptimisticResult(u){const r=x(this,Et).getQueryCache().build(x(this,Et),u),o=this.createResult(r,u);return kv(this,o)&&(V(this,yt,o),V(this,Xa,this.options),V(this,kn,x(this,pe).state)),o}getCurrentResult(){return x(this,yt)}trackResult(u,r){return new Proxy(u,{get:(o,d)=>(this.trackProp(d),r==null||r(d),d==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&x(this,wl).status==="pending"&&x(this,wl).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,d))})}trackProp(u){x(this,Va).add(u)}getCurrentQuery(){return x(this,pe)}refetch({...u}={}){return this.fetch({...u})}fetchOptimistic(u){const r=x(this,Et).defaultQueryOptions(u),o=x(this,Et).getQueryCache().build(x(this,Et),r);return o.fetch().then(()=>this.createResult(o,r))}fetch(u){return re(this,Ne,Ji).call(this,{...u,cancelRefetch:u.cancelRefetch??!0}).then(()=>(this.updateResult(),x(this,yt)))}createResult(u,r){var Ae;const o=x(this,pe),d=this.options,y=x(this,yt),p=x(this,kn),z=x(this,Xa),b=u!==o?u.state:x(this,Ii),{state:H}=u;let O={...H},_=!1,q;if(r._optimisticResults){const Qe=this.hasListeners(),$e=!Qe&&im(u,r),We=Qe&&sm(u,o,r,d);($e||We)&&(O={...O,...Hm(H.data,u.options)}),r._optimisticResults==="isRestoring"&&(O.fetchStatus="idle")}let{error:Q,errorUpdatedAt:B,status:X}=O;q=O.data;let L=!1;if(r.placeholderData!==void 0&&q===void 0&&X==="pending"){let Qe;y!=null&&y.isPlaceholderData&&r.placeholderData===(z==null?void 0:z.placeholderData)?(Qe=y.data,L=!0):Qe=typeof r.placeholderData=="function"?r.placeholderData((Ae=x(this,Ka))==null?void 0:Ae.state.data,x(this,Ka)):r.placeholderData,Qe!==void 0&&(X="success",q=mo(y==null?void 0:y.data,Qe,r),_=!0)}if(r.select&&q!==void 0&&!L)if(y&&q===(p==null?void 0:p.data)&&r.select===x(this,Pi))q=x(this,Za);else try{V(this,Pi,r.select),q=r.select(q),q=mo(y==null?void 0:y.data,q,r),V(this,Za,q),V(this,xn,null)}catch(Qe){V(this,xn,Qe)}x(this,xn)&&(Q=x(this,xn),q=x(this,Za),B=Date.now(),X="error");const G=O.fetchStatus==="fetching",$=X==="pending",w=X==="error",le=$&&G,fe=q!==void 0,ue={status:X,fetchStatus:O.fetchStatus,isPending:$,isSuccess:X==="success",isError:w,isInitialLoading:le,isLoading:le,data:q,dataUpdatedAt:O.dataUpdatedAt,error:Q,errorUpdatedAt:B,failureCount:O.fetchFailureCount,failureReason:O.fetchFailureReason,errorUpdateCount:O.errorUpdateCount,isFetched:u.isFetched(),isFetchedAfterMount:O.dataUpdateCount>b.dataUpdateCount||O.errorUpdateCount>b.errorUpdateCount,isFetching:G,isRefetching:G&&!$,isLoadingError:w&&!fe,isPaused:O.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:w&&fe,isStale:qo(u,r),refetch:this.refetch,promise:x(this,wl),isEnabled:Pt(r.enabled,u)!==!1};if(this.options.experimental_prefetchInRender){const Qe=ue.data!==void 0,$e=ue.status==="error"&&!Qe,We=ot=>{$e?ot.reject(ue.error):Qe&&ot.resolve(ue.data)},il=()=>{const ot=V(this,wl,ue.promise=xo());We(ot)},gt=x(this,wl);switch(gt.status){case"pending":u.queryHash===o.queryHash&&We(gt);break;case"fulfilled":($e||ue.data!==gt.value)&&il();break;case"rejected":(!$e||ue.error!==gt.reason)&&il();break}}return ue}updateResult(){const u=x(this,yt),r=this.createResult(x(this,pe),this.options);if(V(this,kn,x(this,pe).state),V(this,Xa,this.options),x(this,kn).data!==void 0&&V(this,Ka,x(this,pe)),wu(r,u))return;V(this,yt,r);const o=()=>{if(!u)return!0;const{notifyOnChangeProps:d}=this.options,y=typeof d=="function"?d():d;if(y==="all"||!y&&!x(this,Va).size)return!0;const p=new Set(y??x(this,Va));return this.options.throwOnError&&p.add("error"),Object.keys(x(this,yt)).some(z=>{const S=z;return x(this,yt)[S]!==u[S]&&p.has(S)})};re(this,Ne,Qm).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&re(this,Ne,bo).call(this)}},Et=new WeakMap,pe=new WeakMap,Ii=new WeakMap,yt=new WeakMap,kn=new WeakMap,Xa=new WeakMap,wl=new WeakMap,xn=new WeakMap,Pi=new WeakMap,Za=new WeakMap,Ka=new WeakMap,Jn=new WeakMap,Fn=new WeakMap,yn=new WeakMap,Va=new WeakMap,Ne=new WeakSet,Ji=function(u){re(this,Ne,zo).call(this);let r=x(this,pe).fetch(this.options,u);return u!=null&&u.throwOnError||(r=r.catch(vt)),r},vo=function(){re(this,Ne,jo).call(this);const u=jn(this.options.staleTime,x(this,pe));if($i.isServer()||x(this,yt).isStale||!fo(u))return;const o=Mm(x(this,yt).dataUpdatedAt,u)+1;V(this,Jn,Yn.setTimeout(()=>{x(this,yt).isStale||this.updateResult()},o))},go=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(x(this,pe)):this.options.refetchInterval)??!1},po=function(u){re(this,Ne,So).call(this),V(this,yn,u),!($i.isServer()||Pt(this.options.enabled,x(this,pe))===!1||!fo(x(this,yn))||x(this,yn)===0)&&V(this,Fn,Yn.setInterval(()=>{(this.options.refetchIntervalInBackground||wo.isFocused())&&re(this,Ne,Ji).call(this)},x(this,yn)))},bo=function(){re(this,Ne,vo).call(this),re(this,Ne,po).call(this,re(this,Ne,go).call(this))},jo=function(){x(this,Jn)&&(Yn.clearTimeout(x(this,Jn)),V(this,Jn,void 0))},So=function(){x(this,Fn)&&(Yn.clearInterval(x(this,Fn)),V(this,Fn,void 0))},zo=function(){const u=x(this,Et).getQueryCache().build(x(this,Et),this.options);if(u===x(this,pe))return;const r=x(this,pe);V(this,pe,u),V(this,Ii,u.state),this.hasListeners()&&(r==null||r.removeObserver(this),u.addObserver(this))},Qm=function(u){Pe.batch(()=>{u.listeners&&this.listeners.forEach(r=>{r(x(this,yt))}),x(this,Et).getQueryCache().notify({query:x(this,pe),type:"observerResultsUpdated"})})},Nm);function Vv(c,u){return Pt(u.enabled,c)!==!1&&c.state.data===void 0&&!(c.state.status==="error"&&u.retryOnMount===!1)}function im(c,u){return Vv(c,u)||c.state.data!==void 0&&No(c,u,u.refetchOnMount)}function No(c,u,r){if(Pt(u.enabled,c)!==!1&&jn(u.staleTime,c)!=="static"){const o=typeof r=="function"?r(c):r;return o==="always"||o!==!1&&qo(c,u)}return!1}function sm(c,u,r,o){return(c!==u||Pt(o.enabled,c)===!1)&&(!r.suspense||c.state.status!=="error")&&qo(c,r)}function qo(c,u){return Pt(u.enabled,c)!==!1&&c.isStaleByTime(jn(u.staleTime,c))}function kv(c,u){return!wu(c.getCurrentResult(),u)}function um(c){return{onFetch:(u,r)=>{var H,O,_,q,Q;const o=u.options,d=(_=(O=(H=u.fetchOptions)==null?void 0:H.meta)==null?void 0:O.fetchMore)==null?void 0:_.direction,y=((q=u.state.data)==null?void 0:q.pages)||[],p=((Q=u.state.data)==null?void 0:Q.pageParams)||[];let z={pages:[],pageParams:[]},S=0;const b=async()=>{let B=!1;const X=$=>{Bv($,()=>u.signal,()=>B=!0)},L=wm(u.options,u.fetchOptions),G=async($,w,le)=>{if(B)return Promise.reject();if(w==null&&$.pages.length)return Promise.resolve($);const ne=(()=>{const $e={client:u.client,queryKey:u.queryKey,pageParam:w,direction:le?"backward":"forward",meta:u.options.meta};return X($e),$e})(),ue=await L(ne),{maxPages:Ae}=u.options,Qe=le?Qv:Hv;return{pages:Qe($.pages,ue,Ae),pageParams:Qe($.pageParams,w,Ae)}};if(d&&y.length){const $=d==="backward",w=$?Jv:cm,le={pages:y,pageParams:p},fe=w(o,le);z=await G(le,fe,$)}else{const $=c??y.length;do{const w=S===0?p[0]??o.initialPageParam:cm(o,z);if(S>0&&w==null)break;z=await G(z,w),S++}while(S<$)}return z};u.options.persister?u.fetchFn=()=>{var B,X;return(X=(B=u.options).persister)==null?void 0:X.call(B,b,{client:u.client,queryKey:u.queryKey,meta:u.options.meta,signal:u.signal},r)}:u.fetchFn=b}}}function cm(c,{pages:u,pageParams:r}){const o=u.length-1;return u.length>0?c.getNextPageParam(u[o],u,r[o],r):void 0}function Jv(c,{pages:u,pageParams:r}){var o;return u.length>0?(o=c.getPreviousPageParam)==null?void 0:o.call(c,u[0],u,r[0],r):void 0}var es,ol,dt,$n,fl,fn,Am,Fv=(Am=class extends Um{constructor(u){super();I(this,fl);I(this,es);I(this,ol);I(this,dt);I(this,$n);V(this,es,u.client),this.mutationId=u.mutationId,V(this,dt,u.mutationCache),V(this,ol,[]),this.state=u.state||Bm(),this.setOptions(u.options),this.scheduleGc()}setOptions(u){this.options=u,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(u){x(this,ol).includes(u)||(x(this,ol).push(u),this.clearGcTimeout(),x(this,dt).notify({type:"observerAdded",mutation:this,observer:u}))}removeObserver(u){V(this,ol,x(this,ol).filter(r=>r!==u)),this.scheduleGc(),x(this,dt).notify({type:"observerRemoved",mutation:this,observer:u})}optionalRemove(){x(this,ol).length||(this.state.status==="pending"?this.scheduleGc():x(this,dt).remove(this))}continue(){var u;return((u=x(this,$n))==null?void 0:u.continue())??this.execute(this.state.variables)}async execute(u){var p,z,S,b,H,O,_,q,Q,B,X,L,G,$,w,le,fe,ne;const r=()=>{re(this,fl,fn).call(this,{type:"continue"})},o={client:x(this,es),meta:this.options.meta,mutationKey:this.options.mutationKey};V(this,$n,Rm({fn:()=>this.options.mutationFn?this.options.mutationFn(u,o):Promise.reject(new Error("No mutationFn found")),onFail:(ue,Ae)=>{re(this,fl,fn).call(this,{type:"failed",failureCount:ue,error:Ae})},onPause:()=>{re(this,fl,fn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>x(this,dt).canRun(this)}));const d=this.state.status==="pending",y=!x(this,$n).canStart();try{if(d)r();else{re(this,fl,fn).call(this,{type:"pending",variables:u,isPaused:y}),x(this,dt).config.onMutate&&await x(this,dt).config.onMutate(u,this,o);const Ae=await((z=(p=this.options).onMutate)==null?void 0:z.call(p,u,o));Ae!==this.state.context&&re(this,fl,fn).call(this,{type:"pending",context:Ae,variables:u,isPaused:y})}const ue=await x(this,$n).start();return await((b=(S=x(this,dt).config).onSuccess)==null?void 0:b.call(S,ue,u,this.state.context,this,o)),await((O=(H=this.options).onSuccess)==null?void 0:O.call(H,ue,u,this.state.context,o)),await((q=(_=x(this,dt).config).onSettled)==null?void 0:q.call(_,ue,null,this.state.variables,this.state.context,this,o)),await((B=(Q=this.options).onSettled)==null?void 0:B.call(Q,ue,null,u,this.state.context,o)),re(this,fl,fn).call(this,{type:"success",data:ue}),ue}catch(ue){try{await((L=(X=x(this,dt).config).onError)==null?void 0:L.call(X,ue,u,this.state.context,this,o))}catch(Ae){Promise.reject(Ae)}try{await(($=(G=this.options).onError)==null?void 0:$.call(G,ue,u,this.state.context,o))}catch(Ae){Promise.reject(Ae)}try{await((le=(w=x(this,dt).config).onSettled)==null?void 0:le.call(w,void 0,ue,this.state.variables,this.state.context,this,o))}catch(Ae){Promise.reject(Ae)}try{await((ne=(fe=this.options).onSettled)==null?void 0:ne.call(fe,void 0,ue,u,this.state.context,o))}catch(Ae){Promise.reject(Ae)}throw re(this,fl,fn).call(this,{type:"error",error:ue}),ue}finally{x(this,dt).runNext(this)}}},es=new WeakMap,ol=new WeakMap,dt=new WeakMap,$n=new WeakMap,fl=new WeakSet,fn=function(u){const r=o=>{switch(u.type){case"failed":return{...o,failureCount:u.failureCount,failureReason:u.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:u.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:u.isPaused,status:"pending",variables:u.variables,submittedAt:Date.now()};case"success":return{...o,data:u.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:u.error,failureCount:o.failureCount+1,failureReason:u.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Pe.batch(()=>{x(this,ol).forEach(o=>{o.onMutationUpdate(u)}),x(this,dt).notify({mutation:this,type:"updated",action:u})})},Am);function Bm(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Dl,al,ts,Em,$v=(Em=class extends Ia{constructor(u={}){super();I(this,Dl);I(this,al);I(this,ts);this.config=u,V(this,Dl,new Set),V(this,al,new Map),V(this,ts,0)}build(u,r,o){const d=new Fv({client:u,mutationCache:this,mutationId:++Su(this,ts)._,options:u.defaultMutationOptions(r),state:o});return this.add(d),d}add(u){x(this,Dl).add(u);const r=zu(u);if(typeof r=="string"){const o=x(this,al).get(r);o?o.push(u):x(this,al).set(r,[u])}this.notify({type:"added",mutation:u})}remove(u){if(x(this,Dl).delete(u)){const r=zu(u);if(typeof r=="string"){const o=x(this,al).get(r);if(o)if(o.length>1){const d=o.indexOf(u);d!==-1&&o.splice(d,1)}else o[0]===u&&x(this,al).delete(r)}}this.notify({type:"removed",mutation:u})}canRun(u){const r=zu(u);if(typeof r=="string"){const o=x(this,al).get(r),d=o==null?void 0:o.find(y=>y.state.status==="pending");return!d||d===u}else return!0}runNext(u){var o;const r=zu(u);if(typeof r=="string"){const d=(o=x(this,al).get(r))==null?void 0:o.find(y=>y!==u&&y.state.isPaused);return(d==null?void 0:d.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Pe.batch(()=>{x(this,Dl).forEach(u=>{this.notify({type:"removed",mutation:u})}),x(this,Dl).clear(),x(this,al).clear()})}getAll(){return Array.from(x(this,Dl))}find(u){const r={exact:!0,...u};return this.getAll().find(o=>em(r,o))}findAll(u={}){return this.getAll().filter(r=>em(u,r))}notify(u){Pe.batch(()=>{this.listeners.forEach(r=>{r(u)})})}resumePausedMutations(){const u=this.getAll().filter(r=>r.state.isPaused);return Pe.batch(()=>Promise.all(u.map(r=>r.continue().catch(vt))))}},Dl=new WeakMap,al=new WeakMap,ts=new WeakMap,Em);function zu(c){var u;return(u=c.options.scope)==null?void 0:u.id}var Rl,vn,Tt,Ul,Hl,Mu,Ao,Tm,Wv=(Tm=class extends Ia{constructor(r,o){super();I(this,Hl);I(this,Rl);I(this,vn);I(this,Tt);I(this,Ul);V(this,Rl,r),this.setOptions(o),this.bindMethods(),re(this,Hl,Mu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var d;const o=this.options;this.options=x(this,Rl).defaultMutationOptions(r),wu(this.options,o)||x(this,Rl).getMutationCache().notify({type:"observerOptionsUpdated",mutation:x(this,Tt),observer:this}),o!=null&&o.mutationKey&&this.options.mutationKey&&Wn(o.mutationKey)!==Wn(this.options.mutationKey)?this.reset():((d=x(this,Tt))==null?void 0:d.state.status)==="pending"&&x(this,Tt).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=x(this,Tt))==null||r.removeObserver(this)}onMutationUpdate(r){re(this,Hl,Mu).call(this),re(this,Hl,Ao).call(this,r)}getCurrentResult(){return x(this,vn)}reset(){var r;(r=x(this,Tt))==null||r.removeObserver(this),V(this,Tt,void 0),re(this,Hl,Mu).call(this),re(this,Hl,Ao).call(this)}mutate(r,o){var d;return V(this,Ul,o),(d=x(this,Tt))==null||d.removeObserver(this),V(this,Tt,x(this,Rl).getMutationCache().build(x(this,Rl),this.options)),x(this,Tt).addObserver(this),x(this,Tt).execute(r)}},Rl=new WeakMap,vn=new WeakMap,Tt=new WeakMap,Ul=new WeakMap,Hl=new WeakSet,Mu=function(){var o;const r=((o=x(this,Tt))==null?void 0:o.state)??Bm();V(this,vn,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Ao=function(r){Pe.batch(()=>{var o,d,y,p,z,S,b,H;if(x(this,Ul)&&this.hasListeners()){const O=x(this,vn).variables,_=x(this,vn).context,q={client:x(this,Rl),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(d=(o=x(this,Ul)).onSuccess)==null||d.call(o,r.data,O,_,q)}catch(Q){Promise.reject(Q)}try{(p=(y=x(this,Ul)).onSettled)==null||p.call(y,r.data,null,O,_,q)}catch(Q){Promise.reject(Q)}}else if((r==null?void 0:r.type)==="error"){try{(S=(z=x(this,Ul)).onError)==null||S.call(z,r.error,O,_,q)}catch(Q){Promise.reject(Q)}try{(H=(b=x(this,Ul)).onSettled)==null||H.call(b,void 0,r.error,O,_,q)}catch(Q){Promise.reject(Q)}}}this.listeners.forEach(O=>{O(x(this,vn))})})},Tm),dl,Om,Iv=(Om=class extends Ia{constructor(u={}){super();I(this,dl);this.config=u,V(this,dl,new Map)}build(u,r,o){const d=r.queryKey,y=r.queryHash??Do(d,r);let p=this.get(y);return p||(p=new Zv({client:u,queryKey:d,queryHash:y,options:u.defaultQueryOptions(r),state:o,defaultOptions:u.getQueryDefaults(d)}),this.add(p)),p}add(u){x(this,dl).has(u.queryHash)||(x(this,dl).set(u.queryHash,u),this.notify({type:"added",query:u}))}remove(u){const r=x(this,dl).get(u.queryHash);r&&(u.destroy(),r===u&&x(this,dl).delete(u.queryHash),this.notify({type:"removed",query:u}))}clear(){Pe.batch(()=>{this.getAll().forEach(u=>{this.remove(u)})})}get(u){return x(this,dl).get(u)}getAll(){return[...x(this,dl).values()]}find(u){const r={exact:!0,...u};return this.getAll().find(o=>P0(r,o))}findAll(u={}){const r=this.getAll();return Object.keys(u).length>0?r.filter(o=>P0(u,o)):r}notify(u){Pe.batch(()=>{this.listeners.forEach(r=>{r(u)})})}onFocus(){Pe.batch(()=>{this.getAll().forEach(u=>{u.onFocus()})})}onOnline(){Pe.batch(()=>{this.getAll().forEach(u=>{u.onOnline()})})}},dl=new WeakMap,Om),Ye,gn,pn,ka,Ja,bn,Fa,$a,Cm,Pv=(Cm=class{constructor(c={}){I(this,Ye);I(this,gn);I(this,pn);I(this,ka);I(this,Ja);I(this,bn);I(this,Fa);I(this,$a);V(this,Ye,c.queryCache||new Iv),V(this,gn,c.mutationCache||new $v),V(this,pn,c.defaultOptions||{}),V(this,ka,new Map),V(this,Ja,new Map),V(this,bn,0)}mount(){Su(this,bn)._++,x(this,bn)===1&&(V(this,Fa,wo.subscribe(async c=>{c&&(await this.resumePausedMutations(),x(this,Ye).onFocus())})),V(this,$a,Du.subscribe(async c=>{c&&(await this.resumePausedMutations(),x(this,Ye).onOnline())})))}unmount(){var c,u;Su(this,bn)._--,x(this,bn)===0&&((c=x(this,Fa))==null||c.call(this),V(this,Fa,void 0),(u=x(this,$a))==null||u.call(this),V(this,$a,void 0))}isFetching(c){return x(this,Ye).findAll({...c,fetchStatus:"fetching"}).length}isMutating(c){return x(this,gn).findAll({...c,status:"pending"}).length}getQueryData(c){var r;const u=this.defaultQueryOptions({queryKey:c});return(r=x(this,Ye).get(u.queryHash))==null?void 0:r.state.data}ensureQueryData(c){const u=this.defaultQueryOptions(c),r=x(this,Ye).build(this,u),o=r.state.data;return o===void 0?this.fetchQuery(c):(c.revalidateIfStale&&r.isStaleByTime(jn(u.staleTime,r))&&this.prefetchQuery(u),Promise.resolve(o))}getQueriesData(c){return x(this,Ye).findAll(c).map(({queryKey:u,state:r})=>{const o=r.data;return[u,o]})}setQueryData(c,u,r){const o=this.defaultQueryOptions({queryKey:c}),d=x(this,Ye).get(o.queryHash),y=d==null?void 0:d.state.data,p=Rv(u,y);if(p!==void 0)return x(this,Ye).build(this,o).setData(p,{...r,manual:!0})}setQueriesData(c,u,r){return Pe.batch(()=>x(this,Ye).findAll(c).map(({queryKey:o})=>[o,this.setQueryData(o,u,r)]))}getQueryState(c){var r;const u=this.defaultQueryOptions({queryKey:c});return(r=x(this,Ye).get(u.queryHash))==null?void 0:r.state}removeQueries(c){const u=x(this,Ye);Pe.batch(()=>{u.findAll(c).forEach(r=>{u.remove(r)})})}resetQueries(c,u){const r=x(this,Ye);return Pe.batch(()=>(r.findAll(c).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...c},u)))}cancelQueries(c,u={}){const r={revert:!0,...u},o=Pe.batch(()=>x(this,Ye).findAll(c).map(d=>d.cancel(r)));return Promise.all(o).then(vt).catch(vt)}invalidateQueries(c,u={}){return Pe.batch(()=>(x(this,Ye).findAll(c).forEach(r=>{r.invalidate()}),(c==null?void 0:c.refetchType)==="none"?Promise.resolve():this.refetchQueries({...c,type:(c==null?void 0:c.refetchType)??(c==null?void 0:c.type)??"active"},u)))}refetchQueries(c,u={}){const r={...u,cancelRefetch:u.cancelRefetch??!0},o=Pe.batch(()=>x(this,Ye).findAll(c).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let y=d.fetch(void 0,r);return r.throwOnError||(y=y.catch(vt)),d.state.fetchStatus==="paused"?Promise.resolve():y}));return Promise.all(o).then(vt)}fetchQuery(c){const u=this.defaultQueryOptions(c);u.retry===void 0&&(u.retry=!1);const r=x(this,Ye).build(this,u);return r.isStaleByTime(jn(u.staleTime,r))?r.fetch(u):Promise.resolve(r.state.data)}prefetchQuery(c){return this.fetchQuery(c).then(vt).catch(vt)}fetchInfiniteQuery(c){return c.behavior=um(c.pages),this.fetchQuery(c)}prefetchInfiniteQuery(c){return this.fetchInfiniteQuery(c).then(vt).catch(vt)}ensureInfiniteQueryData(c){return c.behavior=um(c.pages),this.ensureQueryData(c)}resumePausedMutations(){return Du.isOnline()?x(this,gn).resumePausedMutations():Promise.resolve()}getQueryCache(){return x(this,Ye)}getMutationCache(){return x(this,gn)}getDefaultOptions(){return x(this,pn)}setDefaultOptions(c){V(this,pn,c)}setQueryDefaults(c,u){x(this,ka).set(Wn(c),{queryKey:c,defaultOptions:u})}getQueryDefaults(c){const u=[...x(this,ka).values()],r={};return u.forEach(o=>{Fi(c,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(c,u){x(this,Ja).set(Wn(c),{mutationKey:c,defaultOptions:u})}getMutationDefaults(c){const u=[...x(this,Ja).values()],r={};return u.forEach(o=>{Fi(c,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(c){if(c._defaulted)return c;const u={...x(this,pn).queries,...this.getQueryDefaults(c.queryKey),...c,_defaulted:!0};return u.queryHash||(u.queryHash=Do(u.queryKey,u)),u.refetchOnReconnect===void 0&&(u.refetchOnReconnect=u.networkMode!=="always"),u.throwOnError===void 0&&(u.throwOnError=!!u.suspense),!u.networkMode&&u.persister&&(u.networkMode="offlineFirst"),u.queryFn===Ro&&(u.enabled=!1),u}defaultMutationOptions(c){return c!=null&&c._defaulted?c:{...x(this,pn).mutations,...(c==null?void 0:c.mutationKey)&&this.getMutationDefaults(c.mutationKey),...c,_defaulted:!0}}clear(){x(this,Ye).clear(),x(this,gn).clear()}},Ye=new WeakMap,gn=new WeakMap,pn=new WeakMap,ka=new WeakMap,Ja=new WeakMap,bn=new WeakMap,Fa=new WeakMap,$a=new WeakMap,Cm),Lm=k.createContext(void 0),In=c=>{const u=k.useContext(Lm);if(!u)throw new Error("No QueryClient set, use QueryClientProvider to set one");return u},e1=({client:c,children:u})=>(k.useEffect(()=>(c.mount(),()=>{c.unmount()}),[c]),i.jsx(Lm.Provider,{value:c,children:u})),Ym=k.createContext(!1),t1=()=>k.useContext(Ym);Ym.Provider;function l1(){let c=!1;return{clearReset:()=>{c=!1},reset:()=>{c=!0},isReset:()=>c}}var n1=k.createContext(l1()),a1=()=>k.useContext(n1),i1=(c,u,r)=>{const o=r!=null&&r.state.error&&typeof c.throwOnError=="function"?Uo(c.throwOnError,[r.state.error,r]):c.throwOnError;(c.suspense||c.experimental_prefetchInRender||o)&&(u.isReset()||(c.retryOnMount=!1))},s1=c=>{k.useEffect(()=>{c.clearReset()},[c])},u1=({result:c,errorResetBoundary:u,throwOnError:r,query:o,suspense:d})=>c.isError&&!u.isReset()&&!c.isFetching&&o&&(d&&c.data===void 0||Uo(r,[c.error,o])),c1=c=>{if(c.suspense){const r=d=>d==="static"?d:Math.max(d??1e3,1e3),o=c.staleTime;c.staleTime=typeof o=="function"?(...d)=>r(o(...d)):r(o),typeof c.gcTime=="number"&&(c.gcTime=Math.max(c.gcTime,1e3))}},r1=(c,u)=>c.isLoading&&c.isFetching&&!u,o1=(c,u)=>(c==null?void 0:c.suspense)&&u.isPending,rm=(c,u,r)=>u.fetchOptimistic(c).catch(()=>{r.clearReset()});function f1(c,u,r){var _,q,Q,B;const o=t1(),d=a1(),y=In(),p=y.defaultQueryOptions(c);(q=(_=y.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||q.call(_,p);const z=y.getQueryCache().get(p.queryHash);p._optimisticResults=o?"isRestoring":"optimistic",c1(p),i1(p,d,z),s1(d);const S=!y.getQueryCache().get(p.queryHash),[b]=k.useState(()=>new u(y,p)),H=b.getOptimisticResult(p),O=!o&&c.subscribed!==!1;if(k.useSyncExternalStore(k.useCallback(X=>{const L=O?b.subscribe(Pe.batchCalls(X)):vt;return b.updateResult(),L},[b,O]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),k.useEffect(()=>{b.setOptions(p)},[p,b]),o1(p,H))throw rm(p,b,d);if(u1({result:H,errorResetBoundary:d,throwOnError:p.throwOnError,query:z,suspense:p.suspense}))throw H.error;if((B=(Q=y.getDefaultOptions().queries)==null?void 0:Q._experimental_afterQuery)==null||B.call(Q,p,H),p.experimental_prefetchInRender&&!$i.isServer()&&r1(H,o)){const X=S?rm(p,b,d):z==null?void 0:z.promise;X==null||X.catch(vt).finally(()=>{b.updateResult()})}return p.notifyOnChangeProps?H:b.trackResult(H)}function rt(c,u){return f1(c,Kv)}function ql(c,u){const r=In(),[o]=k.useState(()=>new Wv(r,c));k.useEffect(()=>{o.setOptions(c)},[o,c]);const d=k.useSyncExternalStore(k.useCallback(p=>o.subscribe(Pe.batchCalls(p)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),y=k.useCallback((p,z)=>{o.mutate(p,z).catch(vt)},[o]);if(d.error&&Uo(o.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:y,mutateAsync:d.mutate}}async function d1(c,u,r){try{const o=`${c.replace(/\/$/,"")}${u}`,d=await fetch(o,{...r,headers:{"Content-Type":"application/json",...r==null?void 0:r.headers}});if(!d.ok){let p={};try{p=await d.json()}catch{}return{success:!1,error:{code:p.code??`HTTP_${d.status}`,message:p.message??d.statusText}}}return{success:!0,data:await d.json()}}catch(o){return{success:!1,error:{code:"NETWORK_ERROR",message:o instanceof Error?o.message:"Network request failed"}}}}function h1(c){const u=(r,o)=>d1(c,r,o);return{getStats:()=>u("/api/dashboard/stats"),getAgents:()=>u("/api/agents"),createAgent:r=>u("/api/agents",{method:"POST",body:JSON.stringify(r)}),revokeAgent:r=>u(`/api/agents/${r}/revoke`,{method:"POST"}),rotateAgentToken:r=>u(`/api/agents/${r}/rotate`,{method:"POST"}),getAgentPermissions:r=>u(`/api/agents/${r}/permissions`),getAuditLogs:r=>{const o=new URLSearchParams;r&&(r.agentId&&o.set("agentId",r.agentId),r.action&&o.set("action",r.action),r.result&&o.set("result",r.result),r.from&&o.set("from",r.from),r.to&&o.set("to",r.to),r.limit!==void 0&&o.set("limit",String(r.limit)),r.offset!==void 0&&o.set("offset",String(r.offset)));const d=o.toString();return u(`/api/audit${d?`?${d}`:""}`)},exportAuditLogs:(r,o)=>{const d=new URLSearchParams;return d.set("format",r),o&&(o.agentId&&d.set("agentId",o.agentId),o.action&&d.set("action",o.action),o.result&&d.set("result",o.result),o.from&&d.set("from",o.from),o.to&&d.set("to",o.to)),u(`/api/audit/export?${d.toString()}`)},getUsers:()=>u("/api/users"),getPermissionTemplates:()=>u("/api/permissions/templates"),createPermissionTemplate:r=>u("/api/permissions/templates",{method:"POST",body:JSON.stringify(r)}),updatePermissionTemplate:(r,o)=>u(`/api/permissions/templates/${r}`,{method:"PATCH",body:JSON.stringify(o)}),deletePermissionTemplate:r=>u(`/api/permissions/templates/${r}`,{method:"DELETE"}),getDelegations:()=>u("/api/delegations"),revokeDelegation:r=>u(`/api/delegations/${r}`,{method:"DELETE"}),getMcpServers:()=>u("/api/mcp/servers"),registerMcpServer:r=>u("/api/mcp/servers",{method:"POST",body:JSON.stringify(r)}),getSettings:()=>u("/api/settings"),updateSettings:r=>u("/api/settings",{method:"PATCH",body:JSON.stringify(r)})}}/**
50
+ * @license lucide-react v0.474.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */const m1=c=>c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Gm=(...c)=>c.filter((u,r,o)=>!!u&&u.trim()!==""&&o.indexOf(u)===r).join(" ").trim();/**
55
+ * @license lucide-react v0.474.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */var x1={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
60
+ * @license lucide-react v0.474.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */const y1=k.forwardRef(({color:c="currentColor",size:u=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:d="",children:y,iconNode:p,...z},S)=>k.createElement("svg",{ref:S,...x1,width:u,height:u,stroke:c,strokeWidth:o?Number(r)*24/Number(u):r,className:Gm("lucide",d),...z},[...p.map(([b,H])=>k.createElement(b,H)),...Array.isArray(y)?y:[y]]));/**
65
+ * @license lucide-react v0.474.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const de=(c,u)=>{const r=k.forwardRef(({className:o,...d},y)=>k.createElement(y1,{ref:y,iconNode:u,className:Gm(`lucide-${m1(c)}`,o),...d}));return r.displayName=`${c}`,r};/**
70
+ * @license lucide-react v0.474.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */const v1=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],g1=de("Activity",v1);/**
75
+ * @license lucide-react v0.474.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const p1=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],b1=de("Archive",p1);/**
80
+ * @license lucide-react v0.474.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */const j1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ru=de("ArrowRight",j1);/**
85
+ * @license lucide-react v0.474.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */const S1=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Uu=de("Bot",S1);/**
90
+ * @license lucide-react v0.474.0 - ISC
91
+ *
92
+ * This source code is licensed under the ISC license.
93
+ * See the LICENSE file in the root directory of this source tree.
94
+ */const z1=[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],Eo=de("CalendarClock",z1);/**
95
+ * @license lucide-react v0.474.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ */const N1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],A1=de("Check",N1);/**
100
+ * @license lucide-react v0.474.0 - ISC
101
+ *
102
+ * This source code is licensed under the ISC license.
103
+ * See the LICENSE file in the root directory of this source tree.
104
+ */const E1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Xm=de("ChevronRight",E1);/**
105
+ * @license lucide-react v0.474.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */const T1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],To=de("CircleX",T1);/**
110
+ * @license lucide-react v0.474.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */const O1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Hu=de("Clock",O1);/**
115
+ * @license lucide-react v0.474.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */const C1=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],M1=de("CodeXml",C1);/**
120
+ * @license lucide-react v0.474.0 - ISC
121
+ *
122
+ * This source code is licensed under the ISC license.
123
+ * See the LICENSE file in the root directory of this source tree.
124
+ */const _1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],w1=de("Copy",_1);/**
125
+ * @license lucide-react v0.474.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */const D1=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],R1=de("Database",D1);/**
130
+ * @license lucide-react v0.474.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */const U1=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],q1=de("Download",U1);/**
135
+ * @license lucide-react v0.474.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */const H1=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Q1=de("Ellipsis",H1);/**
140
+ * @license lucide-react v0.474.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */const B1=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],L1=de("EyeOff",B1);/**
145
+ * @license lucide-react v0.474.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */const Y1=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],G1=de("Eye",Y1);/**
150
+ * @license lucide-react v0.474.0 - ISC
151
+ *
152
+ * This source code is licensed under the ISC license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */const X1=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Z1=de("Filter",X1);/**
155
+ * @license lucide-react v0.474.0 - ISC
156
+ *
157
+ * This source code is licensed under the ISC license.
158
+ * See the LICENSE file in the root directory of this source tree.
159
+ */const K1=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],V1=de("GitBranch",K1);/**
160
+ * @license lucide-react v0.474.0 - ISC
161
+ *
162
+ * This source code is licensed under the ISC license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */const k1=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],J1=de("LayoutDashboard",k1);/**
165
+ * @license lucide-react v0.474.0 - ISC
166
+ *
167
+ * This source code is licensed under the ISC license.
168
+ * See the LICENSE file in the root directory of this source tree.
169
+ */const F1=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],$1=de("LogOut",F1);/**
170
+ * @license lucide-react v0.474.0 - ISC
171
+ *
172
+ * This source code is licensed under the ISC license.
173
+ * See the LICENSE file in the root directory of this source tree.
174
+ */const W1=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],I1=de("Network",W1);/**
175
+ * @license lucide-react v0.474.0 - ISC
176
+ *
177
+ * This source code is licensed under the ISC license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ */const P1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],eg=de("Pencil",P1);/**
180
+ * @license lucide-react v0.474.0 - ISC
181
+ *
182
+ * This source code is licensed under the ISC license.
183
+ * See the LICENSE file in the root directory of this source tree.
184
+ */const tg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Wa=de("Plus",tg);/**
185
+ * @license lucide-react v0.474.0 - ISC
186
+ *
187
+ * This source code is licensed under the ISC license.
188
+ * See the LICENSE file in the root directory of this source tree.
189
+ */const lg=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ng=de("RefreshCw",lg);/**
190
+ * @license lucide-react v0.474.0 - ISC
191
+ *
192
+ * This source code is licensed under the ISC license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */const ag=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],ig=de("RotateCw",ag);/**
195
+ * @license lucide-react v0.474.0 - ISC
196
+ *
197
+ * This source code is licensed under the ISC license.
198
+ * See the LICENSE file in the root directory of this source tree.
199
+ */const sg=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],ug=de("Save",sg);/**
200
+ * @license lucide-react v0.474.0 - ISC
201
+ *
202
+ * This source code is licensed under the ISC license.
203
+ * See the LICENSE file in the root directory of this source tree.
204
+ */const cg=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Zm=de("ScrollText",cg);/**
205
+ * @license lucide-react v0.474.0 - ISC
206
+ *
207
+ * This source code is licensed under the ISC license.
208
+ * See the LICENSE file in the root directory of this source tree.
209
+ */const rg=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Oo=de("Server",rg);/**
210
+ * @license lucide-react v0.474.0 - ISC
211
+ *
212
+ * This source code is licensed under the ISC license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */const og=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],fg=de("Settings",og);/**
215
+ * @license lucide-react v0.474.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */const dg=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Km=de("ShieldAlert",dg);/**
220
+ * @license lucide-react v0.474.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */const hg=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ls=de("ShieldCheck",hg);/**
225
+ * @license lucide-react v0.474.0 - ISC
226
+ *
227
+ * This source code is licensed under the ISC license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */const mg=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],Vm=de("ShieldOff",mg);/**
230
+ * @license lucide-react v0.474.0 - ISC
231
+ *
232
+ * This source code is licensed under the ISC license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */const xg=[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]],yg=de("SlidersHorizontal",xg);/**
235
+ * @license lucide-react v0.474.0 - ISC
236
+ *
237
+ * This source code is licensed under the ISC license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */const vg=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],om=de("Timer",vg);/**
240
+ * @license lucide-react v0.474.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */const gg=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],pg=de("Trash2",gg);/**
245
+ * @license lucide-react v0.474.0 - ISC
246
+ *
247
+ * This source code is licensed under the ISC license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */const bg=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],jg=de("TriangleAlert",bg);/**
250
+ * @license lucide-react v0.474.0 - ISC
251
+ *
252
+ * This source code is licensed under the ISC license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */const Sg=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],Ho=de("Users",Sg);/**
255
+ * @license lucide-react v0.474.0 - ISC
256
+ *
257
+ * This source code is licensed under the ISC license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ */const zg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],km=de("X",zg);/**
260
+ * @license lucide-react v0.474.0 - ISC
261
+ *
262
+ * This source code is licensed under the ISC license.
263
+ * See the LICENSE file in the root directory of this source tree.
264
+ */const Ng=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Ag=de("Zap",Ng);function Eg({apiUrl:c,onAuthenticated:u}){const[r,o]=k.useState(""),[d,y]=k.useState(!1),[p,z]=k.useState(null),[S,b]=k.useState(!1);async function H(O){if(O.preventDefault(),!!r.trim()){b(!0),z(null);try{const _=`${c.replace(/\/$/,"")}/api/dashboard/auth`;(await fetch(_,{headers:{Authorization:`Bearer ${r}`}})).ok?(sessionStorage.setItem("kavachos_dashboard_secret",r),u(r)):z("Invalid secret. Check your KAVACHOS_DASHBOARD_SECRET.")}catch{z("Could not reach the API. Make sure the server is running.")}finally{b(!1)}}}return i.jsx("div",{className:"min-h-screen bg-zinc-950 flex items-center justify-center px-4",children:i.jsxs("div",{className:"w-full max-w-sm",children:[i.jsxs("div",{className:"flex flex-col items-center mb-8",children:[i.jsx("div",{className:"w-12 h-12 rounded-2xl flex items-center justify-center mb-4 bg-gradient-to-br from-yellow-500/20 to-yellow-700/10 border border-yellow-600/30",children:i.jsx(ls,{className:"w-6 h-6 text-yellow-500",strokeWidth:2})}),i.jsx("h1",{className:"text-lg font-semibold text-white tracking-tight",children:"KavachOS"}),i.jsx("p",{className:"text-xs text-zinc-500 uppercase tracking-widest mt-0.5 font-medium",children:"Admin Dashboard"})]}),i.jsxs("div",{className:"bg-zinc-900 border border-zinc-800 rounded-2xl p-6 shadow-xl shadow-black/40",children:[i.jsx("h2",{className:"text-sm font-medium text-zinc-300 mb-1",children:"Dashboard access"}),i.jsx("p",{className:"text-xs text-zinc-500 mb-5",children:"Enter the dashboard secret to continue."}),i.jsxs("form",{onSubmit:H,className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("label",{htmlFor:"kavachos-secret",className:"block text-xs font-medium text-zinc-400 mb-1.5",children:"Secret"}),i.jsxs("div",{className:"relative",children:[i.jsx("input",{id:"kavachos-secret",type:d?"text":"password",value:r,onChange:O=>o(O.target.value),placeholder:"Enter your dashboard secret",autoComplete:"current-password",className:"w-full bg-zinc-950 border border-zinc-700 rounded-lg px-3 py-2.5 text-sm text-white placeholder-zinc-600 pr-10 focus:outline-none focus:border-yellow-600/60 focus:ring-1 focus:ring-yellow-600/20 transition-colors"}),i.jsx("button",{type:"button",onClick:()=>y(O=>!O),className:"absolute right-3 top-1/2 -translate-y-1/2 text-zinc-500 hover:text-zinc-300 transition-colors","aria-label":d?"Hide secret":"Show secret",children:d?i.jsx(L1,{className:"w-4 h-4"}):i.jsx(G1,{className:"w-4 h-4"})})]})]}),p&&i.jsx("p",{className:"text-xs text-red-400 bg-red-500/10 border border-red-500/20 rounded-lg px-3 py-2",children:p}),i.jsx("button",{type:"submit",disabled:S||!r.trim(),className:"w-full py-2.5 px-4 rounded-lg text-sm font-medium transition-all duration-100 bg-gradient-to-r from-yellow-600 to-yellow-700 text-zinc-950 hover:from-yellow-500 hover:to-yellow-600 disabled:opacity-40 disabled:cursor-not-allowed shadow-sm",children:S?"Verifying...":"Access dashboard"})]})]}),i.jsxs("p",{className:"text-center text-xs text-zinc-600 mt-5",children:["Set ",i.jsx("code",{className:"text-zinc-500 font-mono",children:"KAVACHOS_DASHBOARD_SECRET"})," to protect this dashboard."]})]})})}const ro="kavachos_dashboard_secret";async function Tg(c,u){try{const r=`${c.replace(/\/$/,"")}/api/dashboard/auth`;return(await fetch(r,{headers:{Authorization:`Bearer ${u}`}})).ok}catch{return!1}}function Og({onLogout:c}){return i.jsxs("button",{type:"button",onClick:c,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg text-xs font-medium text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800 transition-all duration-100",title:"Sign out",children:[i.jsx($1,{className:"w-3.5 h-3.5"}),i.jsx("span",{children:"Sign out"})]})}function Cg({apiUrl:c,children:u}){const[r,o]=k.useState("checking"),d=k.useCallback(()=>{sessionStorage.removeItem(ro),o("unauthenticated")},[]);return k.useEffect(()=>{const y=sessionStorage.getItem(ro);if(!y){o("unauthenticated");return}Tg(c,y).then(p=>{o(p?"authenticated":"unauthenticated"),p||sessionStorage.removeItem(ro)})},[c]),r==="checking"?i.jsx("div",{className:"min-h-screen bg-zinc-950 flex items-center justify-center",children:i.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-zinc-700 border-t-yellow-500 animate-spin"})}):r==="unauthenticated"?i.jsx(Eg,{apiUrl:c,onAuthenticated:()=>o("authenticated")}):i.jsx(i.Fragment,{children:u(d)})}const Mg=[{id:"overview",label:"Overview",icon:J1,description:"System overview"},{id:"agents",label:"Agents",icon:Uu,description:"Manage agent identities"},{id:"users",label:"Users",icon:Ho,description:"Users who own agents"},{id:"permissions",label:"Permissions",icon:ls,description:"Permission templates"},{id:"delegations",label:"Delegations",icon:V1,description:"Agent delegation chains"},{id:"mcp-servers",label:"MCP Servers",icon:Oo,description:"Registered MCP servers"},{id:"audit",label:"Audit Log",icon:Zm,description:"Immutable audit trail"},{id:"security",label:"Security",icon:Km,description:"Security overview"},{id:"settings",label:"Settings",icon:fg,description:"System configuration"}];function _g(){return i.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-5 border-b border-zinc-800",children:[i.jsx("div",{className:"w-7 h-7 rounded-lg bg-indigo-500 flex items-center justify-center flex-shrink-0",children:i.jsx(ls,{className:"w-4 h-4 text-white",strokeWidth:2.5})}),i.jsxs("div",{children:[i.jsx("div",{className:"text-sm font-semibold text-white tracking-tight",children:"KavachOS"}),i.jsx("div",{className:"text-[10px] text-zinc-500 uppercase tracking-widest font-medium",children:"Admin"})]})]})}function wg({currentPage:c,onNavigate:u}){return i.jsxs("aside",{className:"w-56 flex-shrink-0 bg-zinc-950 border-r border-zinc-800 flex flex-col h-screen sticky top-0",children:[i.jsx(_g,{}),i.jsx("nav",{className:"flex-1 px-3 py-4 space-y-0.5",children:Mg.map(r=>{const o=r.icon,d=c===r.id;return i.jsxs("button",{type:"button",onClick:()=>u(r.id),className:["w-full flex items-center gap-3 px-3 py-2 rounded-lg text-left transition-all duration-100",d?"bg-zinc-800 text-white":"text-zinc-400 hover:text-zinc-200 hover:bg-zinc-900"].join(" "),children:[i.jsx(o,{className:["w-4 h-4 flex-shrink-0",d?"text-indigo-400":"text-current"].join(" "),strokeWidth:d?2.5:2}),i.jsx("span",{className:"text-sm font-medium",children:r.label}),d&&i.jsx(Xm,{className:"w-3 h-3 ml-auto text-zinc-600"})]},r.id)})}),i.jsx("div",{className:"px-4 py-4 border-t border-zinc-800",children:i.jsxs("div",{className:"flex items-center gap-2 text-xs text-zinc-500",children:[i.jsx(g1,{className:"w-3.5 h-3.5 text-emerald-500"}),i.jsx("span",{children:"System Online"})]})})]})}function Ql({title:c,description:u,actions:r}){return i.jsxs("div",{className:"flex items-start justify-between mb-6",children:[i.jsxs("div",{children:[i.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight",children:c}),u&&i.jsx("p",{className:"text-sm text-zinc-400 mt-0.5",children:u})]}),r&&i.jsx("div",{className:"flex items-center gap-2",children:r})]})}function Dg({currentPage:c,onNavigate:u,children:r,headerActions:o}){return i.jsxs("div",{className:"flex min-h-screen bg-zinc-900 text-white",children:[i.jsx(wg,{currentPage:c,onNavigate:u}),i.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[o&&i.jsx("header",{className:"flex items-center justify-end px-6 py-3 border-b border-zinc-800 bg-zinc-900",children:o}),i.jsx("main",{className:"flex-1 overflow-auto",children:i.jsx("div",{className:"max-w-6xl mx-auto px-6 py-8",children:r})})]})]})}const Rg={green:"bg-emerald-950 text-emerald-400 border-emerald-800",red:"bg-red-950 text-red-400 border-red-800",yellow:"bg-amber-950 text-amber-400 border-amber-800",gray:"bg-zinc-800 text-zinc-400 border-zinc-700",blue:"bg-blue-950 text-blue-400 border-blue-800",indigo:"bg-indigo-950 text-indigo-400 border-indigo-800"};function el({variant:c,children:u}){return i.jsx("span",{className:["inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium border",Rg[c]].join(" "),children:u})}const Ug={green:"bg-emerald-400",red:"bg-red-400",yellow:"bg-amber-400",gray:"bg-zinc-500",blue:"bg-blue-400",indigo:"bg-indigo-400"};function Qo({variant:c}){return i.jsx("span",{className:["w-1.5 h-1.5 rounded-full flex-shrink-0",Ug[c]].join(" ")})}const qg={primary:"bg-indigo-600 hover:bg-indigo-500 text-white border border-indigo-500 hover:border-indigo-400",secondary:"bg-zinc-800 hover:bg-zinc-700 text-zinc-200 border border-zinc-700 hover:border-zinc-600",ghost:"bg-transparent hover:bg-zinc-800 text-zinc-400 hover:text-zinc-200 border border-transparent",danger:"bg-red-950 hover:bg-red-900 text-red-400 hover:text-red-300 border border-red-900 hover:border-red-800"},Hg={sm:"px-2.5 py-1 text-xs",md:"px-3.5 py-1.5 text-sm",lg:"px-5 py-2.5 text-sm"};function Fe({variant:c="secondary",size:u="md",children:r,loading:o=!1,className:d="",disabled:y,...p}){return i.jsxs("button",{type:"button",disabled:y??o,className:["inline-flex items-center gap-1.5 rounded-lg font-medium transition-all duration-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-1 focus-visible:ring-offset-zinc-900","disabled:opacity-50 disabled:cursor-not-allowed",qg[c],Hg[u],d].join(" "),...p,children:[o&&i.jsxs("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:[i.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),i.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),r]})}function qe({htmlFor:c,children:u,required:r}){return i.jsxs("label",{htmlFor:c,className:"block text-xs font-medium text-zinc-400 mb-1.5",children:[u,r&&i.jsx("span",{className:"text-red-400 ml-1",children:"*"})]})}const Bo="w-full bg-zinc-900 border border-zinc-700 rounded-lg px-3 py-2 text-sm text-white placeholder-zinc-500 transition-colors focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent disabled:opacity-50 disabled:cursor-not-allowed";function et({error:c,className:u="",...r}){return i.jsxs("div",{children:[i.jsx("input",{className:[Bo,c?"border-red-700":"",u].join(" "),...r}),c&&i.jsx("p",{className:"mt-1 text-xs text-red-400",children:c})]})}function _u({error:c,className:u="",children:r,...o}){return i.jsxs("div",{children:[i.jsx("select",{className:[Bo,"appearance-none cursor-pointer",c?"border-red-700":"",u].join(" "),...o,children:r}),c&&i.jsx("p",{className:"mt-1 text-xs text-red-400",children:c})]})}function Qg({error:c,className:u="",...r}){return i.jsxs("div",{children:[i.jsx("textarea",{className:[Bo,"resize-none",c?"border-red-700":"",u].join(" "),...r}),c&&i.jsx("p",{className:"mt-1 text-xs text-red-400",children:c})]})}function ht({children:c,className:u=""}){return i.jsx("div",{className:["space-y-1",u].join(" "),children:c})}function ns({open:c,onClose:u,title:r,children:o,footer:d}){return c?i.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title",children:[i.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:u,"aria-hidden":"true"}),i.jsxs("div",{className:"relative bg-zinc-900 border border-zinc-700 rounded-2xl shadow-2xl w-full max-w-lg max-h-[90vh] flex flex-col",children:[i.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-zinc-800",children:[i.jsx("h2",{id:"modal-title",className:"text-base font-semibold text-white",children:r}),i.jsx("button",{type:"button",onClick:u,className:"w-7 h-7 flex items-center justify-center rounded-lg text-zinc-500 hover:text-zinc-300 hover:bg-zinc-800 transition-colors","aria-label":"Close modal",children:i.jsx(km,{className:"w-4 h-4"})})]}),i.jsx("div",{className:"flex-1 overflow-auto px-6 py-5",children:o}),d&&i.jsx("div",{className:"px-6 py-4 border-t border-zinc-800 flex items-center justify-end gap-2",children:d})]})]}):null}function Bt({children:c}){return i.jsx("div",{className:"rounded-xl border border-zinc-800 overflow-hidden",children:i.jsx("table",{className:"w-full text-sm",children:c})})}function Lt({children:c}){return i.jsx("thead",{className:"bg-zinc-900 border-b border-zinc-800",children:i.jsx("tr",{children:c})})}function Yt({children:c}){return i.jsx("tbody",{className:"divide-y divide-zinc-800/60",children:c})}function Y({children:c,className:u=""}){return i.jsx("th",{className:["px-4 py-3 text-left text-xs font-medium text-zinc-500 uppercase tracking-wider",u].join(" "),children:c})}function oe({children:c,className:u=""}){return i.jsx("td",{className:["px-4 py-3 text-zinc-300",u].join(" "),children:c})}function Pn({children:c,onClick:u}){return i.jsx("tr",{onClick:u,className:["bg-zinc-950 transition-colors",u?"cursor-pointer hover:bg-zinc-900":""].join(" "),children:c})}function ea({icon:c,title:u,description:r,action:o}){return i.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[i.jsx("div",{className:"w-12 h-12 rounded-xl bg-zinc-800 flex items-center justify-center mb-4 text-zinc-500",children:c}),i.jsx("p",{className:"text-sm font-medium text-zinc-300 mb-1",children:u}),r&&i.jsx("p",{className:"text-xs text-zinc-500 max-w-xs mb-4",children:r}),o]})}function qu(c){switch(c){case"active":return"green";case"revoked":return"red";case"expired":return"gray"}}function Co(c){return c?new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"—"}function Jm(c){if(!c)return"Never";const u=Date.now()-new Date(c).getTime(),r=Math.floor(u/6e4);if(r<1)return"Just now";if(r<60)return`${r}m ago`;const o=Math.floor(r/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}const Bg=["llm","workflow","tool","human-in-loop","system"];function Lg({open:c,onClose:u,onSubmit:r,loading:o}){const[d,y]=k.useState(""),[p,z]=k.useState("llm"),[S,b]=k.useState(""),[H,O]=k.useState([]),[_,q]=k.useState(""),Q=["read","write","delete","execute","list"];function B(G){O($=>$.includes(G)?$.filter(w=>w!==G):[...$,G])}function X(){if(!d.trim()){q("Name is required");return}q("");const G=S.trim()&&H.length>0?[{resource:S.trim(),actions:H}]:[];r({name:d.trim(),type:p,permissions:G})}function L(){y(""),z("llm"),b(""),O([]),q(""),u()}return i.jsx(ns,{open:c,onClose:L,title:"Create Agent",footer:i.jsxs(i.Fragment,{children:[i.jsx(Fe,{variant:"ghost",onClick:L,children:"Cancel"}),i.jsx(Fe,{variant:"primary",onClick:X,loading:o,children:"Create Agent"})]}),children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"agent-name",required:!0,children:"Name"}),i.jsx(et,{id:"agent-name",placeholder:"e.g. data-pipeline-agent",value:d,onChange:G=>y(G.target.value),error:_,autoFocus:!0})]}),i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"agent-type",required:!0,children:"Type"}),i.jsx(_u,{id:"agent-type",value:p,onChange:G=>z(G.target.value),children:Bg.map(G=>i.jsx("option",{value:G,children:G},G))})]}),i.jsxs("div",{className:"border-t border-zinc-800 pt-4",children:[i.jsx("p",{className:"text-xs font-medium text-zinc-400 mb-3",children:"Initial Permission (optional)"}),i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"resource",children:"Resource Pattern"}),i.jsx(et,{id:"resource",placeholder:"e.g. documents:* or api/v1/users",value:S,onChange:G=>b(G.target.value)})]}),i.jsxs("div",{className:"mt-3",children:[i.jsx(qe,{children:"Actions"}),i.jsx("div",{className:"flex flex-wrap gap-2 mt-1.5",children:Q.map(G=>i.jsx("button",{type:"button",onClick:()=>B(G),className:["px-2.5 py-1 rounded-md text-xs font-medium border transition-colors",H.includes(G)?"bg-indigo-600 border-indigo-500 text-white":"bg-zinc-800 border-zinc-700 text-zinc-400 hover:text-zinc-200"].join(" "),children:G},G))})]})]})]})})}function Yg({open:c,onClose:u,token:r,agentName:o}){const[d,y]=k.useState(!1);function p(){navigator.clipboard.writeText(r).then(()=>{y(!0),setTimeout(()=>y(!1),2e3)})}return i.jsx(ns,{open:c,onClose:u,title:"Agent Token",footer:i.jsx(Fe,{variant:"primary",onClick:u,children:"Done"}),children:i.jsxs("div",{className:"space-y-4",children:[i.jsx("div",{className:"bg-amber-950/50 border border-amber-800/50 rounded-lg px-4 py-3",children:i.jsx("p",{className:"text-xs text-amber-400 font-medium",children:"Save this token now. It will not be shown again."})}),i.jsxs("div",{children:[i.jsx(qe,{children:"Agent"}),i.jsx("p",{className:"text-sm text-zinc-300",children:o})]}),i.jsxs("div",{children:[i.jsx(qe,{children:"Token"}),i.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[i.jsx("code",{className:"flex-1 bg-zinc-950 border border-zinc-700 rounded-lg px-3 py-2 text-xs text-zinc-300 font-mono break-all",children:r}),i.jsx("button",{type:"button",onClick:p,className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-lg bg-zinc-800 border border-zinc-700 text-zinc-400 hover:text-zinc-200 transition-colors","aria-label":"Copy token",children:d?i.jsx(A1,{className:"w-3.5 h-3.5 text-emerald-400"}):i.jsx(w1,{className:"w-3.5 h-3.5"})})]})]})]})})}function Gg({agent:c,onRevoke:u,onRotate:r,revoking:o,rotating:d}){const[y,p]=k.useState(!1);return c.status!=="active"?null:i.jsxs("div",{className:"relative",children:[i.jsx("button",{type:"button",onClick:()=>p(z=>!z),className:"w-7 h-7 flex items-center justify-center rounded-md text-zinc-500 hover:text-zinc-300 hover:bg-zinc-800 transition-colors","aria-label":"Agent actions",children:i.jsx(Q1,{className:"w-4 h-4"})}),y&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>p(!1),"aria-hidden":"true"}),i.jsxs("div",{className:"absolute right-0 top-8 z-20 bg-zinc-900 border border-zinc-700 rounded-xl shadow-xl py-1 min-w-[140px]",children:[i.jsxs("button",{type:"button",onClick:()=>{r(c.id),p(!1)},disabled:d,className:"w-full flex items-center gap-2.5 px-3 py-2 text-xs text-zinc-300 hover:bg-zinc-800 hover:text-white transition-colors disabled:opacity-50",children:[i.jsx(ig,{className:"w-3.5 h-3.5"}),"Rotate Token"]}),i.jsx("div",{className:"border-t border-zinc-800 my-1"}),i.jsxs("button",{type:"button",onClick:()=>{u(c.id),p(!1)},disabled:o,className:"w-full flex items-center gap-2.5 px-3 py-2 text-xs text-red-400 hover:bg-red-950/50 hover:text-red-300 transition-colors disabled:opacity-50",children:[i.jsx(Vm,{className:"w-3.5 h-3.5"}),"Revoke Agent"]})]})]})]})}function Xg(c){switch(c){case"allowed":return"green";case"denied":return"red";case"rate_limited":return"yellow"}}function Zg(c){return new Date(c).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Kg({open:c,onClose:u,agent:r,client:o}){const{data:d,isLoading:y}=rt({queryKey:["agent-permissions",r.id],queryFn:()=>o.getAgentPermissions(r.id),enabled:c}),{data:p,isLoading:z}=rt({queryKey:["agent-audit",r.id],queryFn:()=>o.getAuditLogs({agentId:r.id,limit:20}),enabled:c}),{data:S}=rt({queryKey:["delegations"],queryFn:()=>o.getDelegations(),enabled:c}),b=d!=null&&d.success?d.data:[],H=p!=null&&p.success?p.data.entries:[],_=(S!=null&&S.success?S.data:[]).filter(q=>q.fromAgentId===r.id||q.toAgentId===r.id);return i.jsx(ns,{open:c,onClose:u,title:r.name,footer:i.jsx(Fe,{variant:"primary",onClick:u,children:"Close"}),children:i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-3",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-[11px] font-medium text-zinc-500 uppercase tracking-wider mb-1",children:"ID"}),i.jsx("code",{className:"text-xs font-mono text-zinc-300 break-all",children:r.id})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-[11px] font-medium text-zinc-500 uppercase tracking-wider mb-1",children:"Type"}),i.jsx("span",{className:"text-xs font-mono text-zinc-300",children:r.type})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-[11px] font-medium text-zinc-500 uppercase tracking-wider mb-1",children:"Status"}),i.jsxs(el,{variant:qu(r.status),children:[i.jsx(Qo,{variant:qu(r.status)}),r.status]})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-[11px] font-medium text-zinc-500 uppercase tracking-wider mb-1",children:"Last active"}),i.jsx("span",{className:"text-xs text-zinc-300",children:Jm(r.lastActiveAt)})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-[11px] font-medium text-zinc-500 uppercase tracking-wider mb-1",children:"Created"}),i.jsx("span",{className:"text-xs text-zinc-300",children:Co(r.createdAt)})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-[11px] font-medium text-zinc-500 uppercase tracking-wider mb-1",children:"Expires"}),i.jsx("span",{className:"text-xs text-zinc-300",children:Co(r.expiresAt)})]})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-medium text-zinc-400 uppercase tracking-wider mb-2",children:"Permissions"}),y?i.jsx("div",{className:"flex items-center justify-center py-4",children:i.jsx("div",{className:"w-4 h-4 border-2 border-zinc-700 border-t-indigo-500 rounded-full animate-spin"})}):b.length===0?i.jsx("p",{className:"text-xs text-zinc-600 py-2",children:"No permissions assigned."}):i.jsx("div",{className:"rounded-lg border border-zinc-800 overflow-hidden",children:i.jsxs("table",{className:"w-full text-xs",children:[i.jsx("thead",{className:"bg-zinc-900 border-b border-zinc-800",children:i.jsxs("tr",{children:[i.jsx("th",{className:"px-3 py-2 text-left text-[11px] font-medium text-zinc-500 uppercase tracking-wider",children:"Resource"}),i.jsx("th",{className:"px-3 py-2 text-left text-[11px] font-medium text-zinc-500 uppercase tracking-wider",children:"Actions"})]})}),i.jsx("tbody",{className:"divide-y divide-zinc-800/60",children:b.map(q=>i.jsxs("tr",{className:"bg-zinc-950",children:[i.jsx("td",{className:"px-3 py-2",children:i.jsx("code",{className:"text-zinc-300 font-mono",children:q.resource})}),i.jsx("td",{className:"px-3 py-2",children:i.jsx("div",{className:"flex flex-wrap gap-1",children:q.actions.map(Q=>i.jsx("span",{className:"px-1.5 py-0.5 bg-zinc-800 border border-zinc-700 rounded text-[10px] text-zinc-400 font-mono",children:Q},Q))})})]},q.id))})]})})]}),_.length>0&&i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-medium text-zinc-400 uppercase tracking-wider mb-2",children:"Delegation chains"}),i.jsx("div",{className:"space-y-2",children:_.map(q=>i.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-zinc-950 border border-zinc-800 rounded-lg text-xs",children:[i.jsx("span",{className:"text-zinc-300 font-medium truncate max-w-[100px]",children:q.fromAgentName}),i.jsx(Ru,{className:"w-3 h-3 text-zinc-600 flex-shrink-0"}),i.jsx("span",{className:"text-zinc-300 font-medium truncate max-w-[100px]",children:q.toAgentName}),i.jsx(el,{variant:q.status==="active"?"green":q.status==="expired"?"yellow":"red",children:q.status})]},q.id))})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-medium text-zinc-400 uppercase tracking-wider mb-2",children:"Recent activity"}),z?i.jsx("div",{className:"flex items-center justify-center py-4",children:i.jsx("div",{className:"w-4 h-4 border-2 border-zinc-700 border-t-indigo-500 rounded-full animate-spin"})}):H.length===0?i.jsx("p",{className:"text-xs text-zinc-600 py-2",children:"No audit events yet."}):i.jsx("div",{className:"rounded-lg border border-zinc-800 overflow-hidden",children:i.jsx("div",{className:"divide-y divide-zinc-800/60",children:H.map(q=>i.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 bg-zinc-950 text-xs",children:[i.jsx(Hu,{className:"w-3 h-3 text-zinc-600 flex-shrink-0"}),i.jsx("span",{className:"text-zinc-500 tabular-nums flex-shrink-0 w-28",children:Zg(q.timestamp)}),i.jsx("code",{className:"text-zinc-400 font-mono w-20 flex-shrink-0 truncate",children:q.action}),i.jsx("code",{className:"text-zinc-500 font-mono flex-1 truncate",children:q.resource}),i.jsx(el,{variant:Xg(q.result),children:q.result.replace("_"," ")})]},q.id))})})]})]})})}function Vg({client:c}){const u=In(),[r,o]=k.useState(!1),[d,y]=k.useState(null),[p,z]=k.useState({open:!1,token:"",agentName:""}),{data:S,isLoading:b}=rt({queryKey:["agents"],queryFn:()=>c.getAgents()}),H=ql({mutationFn:Q=>c.createAgent(Q),onSuccess:Q=>{Q.success&&(u.invalidateQueries({queryKey:["agents"]}),o(!1),z({open:!0,token:Q.data.token,agentName:Q.data.agent.name}))}}),O=ql({mutationFn:Q=>c.revokeAgent(Q),onSuccess:()=>{u.invalidateQueries({queryKey:["agents"]})}}),_=ql({mutationFn:Q=>c.rotateAgentToken(Q),onSuccess:(Q,B)=>{if(Q.success){const L=(S!=null&&S.success?S.data:[]).find(G=>G.id===B);z({open:!0,token:Q.data.token,agentName:(L==null?void 0:L.name)??"Agent"})}}}),q=S!=null&&S.success?S.data:[];return i.jsxs("div",{children:[i.jsx(Ql,{title:"Agents",description:"Manage AI agent identities, tokens, and permissions.",actions:i.jsxs(Fe,{variant:"primary",onClick:()=>o(!0),children:[i.jsx(Wa,{className:"w-3.5 h-3.5"}),"New Agent"]})}),b?i.jsx("div",{className:"flex items-center justify-center py-16",children:i.jsx("div",{className:"w-5 h-5 border-2 border-zinc-700 border-t-indigo-500 rounded-full animate-spin"})}):q.length===0?i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"Agent"}),i.jsx(Y,{children:"Type"}),i.jsx(Y,{children:"Status"}),i.jsx(Y,{children:"Permissions"}),i.jsx(Y,{children:"Last Active"}),i.jsx(Y,{children:"Created"}),i.jsx(Y,{})]}),i.jsx(Yt,{children:i.jsx("tr",{children:i.jsx("td",{colSpan:7,children:i.jsx(ea,{icon:i.jsx(Uu,{className:"w-6 h-6"}),title:"No agents yet",description:"Create your first agent to get started with KavachOS.",action:i.jsxs(Fe,{variant:"primary",onClick:()=>o(!0),children:[i.jsx(Wa,{className:"w-3.5 h-3.5"}),"Create Agent"]})})})})})]}):i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"Agent"}),i.jsx(Y,{children:"Type"}),i.jsx(Y,{children:"Status"}),i.jsx(Y,{children:"Permissions"}),i.jsx(Y,{children:"Last Active"}),i.jsx(Y,{children:"Created"}),i.jsx(Y,{})]}),i.jsx(Yt,{children:q.map(Q=>i.jsxs(Pn,{onClick:()=>y(Q),children:[i.jsx(oe,{children:i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-white",children:Q.name}),i.jsxs("p",{className:"text-xs text-zinc-500 font-mono mt-0.5",children:[Q.id.slice(0,12),"…"]})]})}),i.jsx(oe,{children:i.jsx("span",{className:"text-xs font-mono text-zinc-400",children:Q.type})}),i.jsx(oe,{children:i.jsxs(el,{variant:qu(Q.status),children:[i.jsx(Qo,{variant:qu(Q.status)}),Q.status]})}),i.jsx(oe,{children:i.jsx("span",{className:"text-zinc-300",children:Q.permissionsCount})}),i.jsx(oe,{children:i.jsx("span",{className:"text-zinc-400 text-xs",children:Jm(Q.lastActiveAt)})}),i.jsx(oe,{children:i.jsx("span",{className:"text-zinc-400 text-xs",children:Co(Q.createdAt)})}),i.jsx(oe,{className:"text-right",children:i.jsx(Gg,{agent:Q,onRevoke:B=>O.mutate(B),onRotate:B=>_.mutate(B),revoking:O.isPending,rotating:_.isPending})})]},Q.id))})]}),i.jsx(Lg,{open:r,onClose:()=>o(!1),onSubmit:Q=>H.mutate(Q),loading:H.isPending}),i.jsx(Yg,{open:p.open,onClose:()=>z({open:!1,token:"",agentName:""}),token:p.token,agentName:p.agentName}),d&&i.jsx(Kg,{open:d!==null,onClose:()=>y(null),agent:d,client:c})]})}function kg(c){switch(c){case"allowed":return"green";case"denied":return"red";case"rate_limited":return"yellow"}}function Jg(c){const u=new Date(c);return{date:u.toLocaleDateString("en-US",{month:"short",day:"numeric"}),time:u.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}}function Fg(c){return c<1?"<1ms":c<1e3?`${c}ms`:`${(c/1e3).toFixed(1)}s`}const $g=["","read","write","delete","execute","list","authenticate","authorize"],Wg=[{value:"",label:"All results"},{value:"allowed",label:"Allowed"},{value:"denied",label:"Denied"},{value:"rate_limited",label:"Rate limited"}];function Ig({filters:c,agentOptions:u,onChange:r}){return i.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-5 p-3 bg-zinc-900 border border-zinc-800 rounded-xl",children:[i.jsx(Z1,{className:"w-3.5 h-3.5 text-zinc-500 flex-shrink-0 ml-0.5"}),i.jsxs(_u,{value:c.agentId??"",onChange:o=>r({...c,agentId:o.target.value||void 0,offset:0}),className:"flex-1 min-w-[140px] max-w-[200px] py-1.5 text-xs",children:[i.jsx("option",{value:"",children:"All agents"}),u.map(o=>i.jsx("option",{value:o.id,children:o.name},o.id))]}),i.jsxs(_u,{value:c.action??"",onChange:o=>r({...c,action:o.target.value||void 0,offset:0}),className:"flex-1 min-w-[120px] max-w-[160px] py-1.5 text-xs",children:[i.jsx("option",{value:"",children:"All actions"}),$g.filter(Boolean).map(o=>i.jsx("option",{value:o,children:o},o))]}),i.jsx(_u,{value:c.result??"",onChange:o=>r({...c,result:o.target.value||void 0,offset:0}),className:"flex-1 min-w-[130px] max-w-[180px] py-1.5 text-xs",children:Wg.map(o=>i.jsx("option",{value:o.value,children:o.label},o.value))}),i.jsx("input",{type:"date",value:c.from?c.from.slice(0,10):"",onChange:o=>r({...c,from:o.target.value?`${o.target.value}T00:00:00Z`:void 0,offset:0}),className:"bg-zinc-900 border border-zinc-700 rounded-lg px-2.5 py-1.5 text-xs text-zinc-300 focus:outline-none focus:ring-2 focus:ring-indigo-500","aria-label":"From date"}),i.jsx("span",{className:"text-zinc-600 text-xs",children:"to"}),i.jsx("input",{type:"date",value:c.to?c.to.slice(0,10):"",onChange:o=>r({...c,to:o.target.value?`${o.target.value}T23:59:59Z`:void 0,offset:0}),className:"bg-zinc-900 border border-zinc-700 rounded-lg px-2.5 py-1.5 text-xs text-zinc-300 focus:outline-none focus:ring-2 focus:ring-indigo-500","aria-label":"To date"}),(c.agentId??c.action??c.result??c.from??c.to)&&i.jsx("button",{type:"button",onClick:()=>r({limit:c.limit,offset:0}),className:"text-xs text-zinc-500 hover:text-zinc-300 transition-colors ml-auto",children:"Clear filters"})]})}function Pg({client:c,filters:u}){const[r,o]=k.useState(!1),[d,y]=k.useState(!1),p=k.useRef(null);async function z(S){o(!1),y(!0);try{const b=await c.exportAuditLogs(S,u);if(!b.success)return;const H=new Blob([b.data],{type:S==="csv"?"text/csv":"application/json"}),O=URL.createObjectURL(H),_=document.createElement("a");_.href=O,_.download=`audit-export.${S}`,_.click(),URL.revokeObjectURL(O)}finally{y(!1)}}return i.jsxs("div",{className:"relative",ref:p,children:[i.jsxs(Fe,{variant:"secondary",size:"sm",loading:d,onClick:()=>o(S=>!S),"aria-haspopup":"true","aria-expanded":r,children:[i.jsx(q1,{className:"w-3.5 h-3.5"}),"Export"]}),r&&i.jsxs("div",{className:"absolute right-0 mt-1 w-36 bg-zinc-900 border border-zinc-700 rounded-lg shadow-lg z-10 overflow-hidden",children:[i.jsx("button",{type:"button",className:"w-full text-left px-3 py-2 text-xs text-zinc-300 hover:bg-zinc-800 transition-colors",onClick:()=>void z("json"),children:"Export as JSON"}),i.jsx("button",{type:"button",className:"w-full text-left px-3 py-2 text-xs text-zinc-300 hover:bg-zinc-800 transition-colors",onClick:()=>void z("csv"),children:"Export as CSV"})]})]})}const fm=50;function ep({client:c}){const[u,r]=k.useState({limit:fm,offset:0}),{data:o,isLoading:d,refetch:y,isFetching:p}=rt({queryKey:["audit-logs",u],queryFn:()=>c.getAuditLogs(u),refetchInterval:3e4}),{data:z}=rt({queryKey:["agents"],queryFn:()=>c.getAgents()}),S=o!=null&&o.success?o.data.entries:[],b=o!=null&&o.success?o.data.total:0,H=z!=null&&z.success?z.data.map(B=>({id:B.id,name:B.name})):[],O=u.offset??0,_=u.limit??fm,q=O+_<b,Q=O>0;return i.jsxs("div",{children:[i.jsx(Ql,{title:"Audit Log",description:"Immutable record of all agent actions. Compliance-ready.",actions:i.jsxs(i.Fragment,{children:[i.jsx(Pg,{client:c,filters:u}),i.jsxs(Fe,{variant:"secondary",size:"sm",onClick:()=>void y(),loading:p,children:[i.jsx(ng,{className:"w-3.5 h-3.5"}),"Refresh"]})]})}),i.jsx(Ig,{filters:u,agentOptions:H,onChange:r}),d?i.jsx("div",{className:"flex items-center justify-center py-16",children:i.jsx("div",{className:"w-5 h-5 border-2 border-zinc-700 border-t-indigo-500 rounded-full animate-spin"})}):S.length===0?i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"Timestamp"}),i.jsx(Y,{children:"Agent"}),i.jsx(Y,{children:"Action"}),i.jsx(Y,{children:"Resource"}),i.jsx(Y,{children:"Result"}),i.jsx(Y,{children:"Duration"})]}),i.jsx(Yt,{children:i.jsx("tr",{children:i.jsx("td",{colSpan:6,children:i.jsx(ea,{icon:i.jsx(Zm,{className:"w-6 h-6"}),title:"No audit entries found",description:"Audit entries will appear here as agents perform actions."})})})})]}):i.jsxs(i.Fragment,{children:[i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"Timestamp"}),i.jsx(Y,{children:"Agent"}),i.jsx(Y,{children:"Action"}),i.jsx(Y,{children:"Resource"}),i.jsx(Y,{children:"Result"}),i.jsx(Y,{children:"Duration"})]}),i.jsx(Yt,{children:S.map(B=>{const X=Jg(B.timestamp);return i.jsxs(Pn,{children:[i.jsx(oe,{children:i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx(Hu,{className:"w-3 h-3 text-zinc-600 flex-shrink-0"}),i.jsxs("div",{children:[i.jsx("span",{className:"text-xs text-zinc-300 font-mono",children:X.time}),i.jsx("span",{className:"block text-[10px] text-zinc-600",children:X.date})]})]})}),i.jsx(oe,{children:i.jsx("span",{className:"text-xs font-medium text-zinc-200",children:B.agentName})}),i.jsx(oe,{children:i.jsx("code",{className:"text-xs font-mono text-zinc-400",children:B.action})}),i.jsx(oe,{children:i.jsx("code",{className:"text-xs font-mono text-zinc-400 max-w-[200px] truncate block",children:B.resource})}),i.jsx(oe,{children:i.jsx(el,{variant:kg(B.result),children:B.result.replace("_"," ")})}),i.jsx(oe,{children:i.jsx("span",{className:"text-xs text-zinc-500 font-mono",children:Fg(B.durationMs)})})]},B.id)})})]}),i.jsxs("div",{className:"flex items-center justify-between mt-4 text-xs text-zinc-500",children:[i.jsxs("span",{children:[O+1,"–",Math.min(O+_,b)," of ",b," entries"]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(Fe,{variant:"secondary",size:"sm",disabled:!Q,onClick:()=>r(B=>({...B,offset:Math.max(0,(B.offset??0)-_)})),children:"Previous"}),i.jsx(Fe,{variant:"secondary",size:"sm",disabled:!q,onClick:()=>r(B=>({...B,offset:(B.offset??0)+_})),children:"Next"})]})]})]})]})}function tp(c){const u=Date.now(),o=new Date(c).getTime()-u,d=Math.round(o/1e3),y=Math.abs(d),p=[[86400,"d"],[3600,"h"],[60,"m"]];for(const[z,S]of p)if(y>=z){const b=Math.floor(y/z);return d>=0?`in ${b}${S}`:`${b}${S} ago`}return d>=0?"in <1m":"just now"}function lp(c){switch(c){case"active":return"green";case"expired":return"yellow";case"revoked":return"red"}}function np({permissions:c}){const u=c.length;if(u===0)return i.jsx("span",{className:"text-xs text-zinc-600",children:"None"});const r=c.slice(0,2).map(o=>o.resource).join(", ");return i.jsxs("div",{title:c.map(o=>`${o.resource}: ${o.actions.join(", ")}`).join(`
265
+ `),children:[i.jsxs("span",{className:"text-xs text-zinc-300",children:[u," ",u===1?"permission":"permissions"]}),i.jsxs("p",{className:"text-[11px] text-zinc-600 mt-0.5 max-w-[160px] truncate",children:[r,u>2?` +${u-2} more`:""]})]})}function ap({client:c}){const u=In(),{data:r,isLoading:o}=rt({queryKey:["delegations"],queryFn:()=>c.getDelegations()}),d=ql({mutationFn:p=>c.revokeDelegation(p),onSuccess:()=>{u.invalidateQueries({queryKey:["delegations"]})}}),y=r!=null&&r.success?r.data:[];return i.jsxs("div",{children:[i.jsx(Ql,{title:"Delegations",description:"Active delegation chains between agents. Each chain grants a subset of the delegating agent's permissions."}),o?i.jsx("div",{className:"flex items-center justify-center py-16",children:i.jsx("div",{className:"w-5 h-5 border-2 border-zinc-700 border-t-indigo-500 rounded-full animate-spin"})}):y.length===0?i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"ID"}),i.jsx(Y,{children:"Chain"}),i.jsx(Y,{children:"Permissions"}),i.jsx(Y,{children:"Depth"}),i.jsx(Y,{children:"Expires"}),i.jsx(Y,{children:"Status"}),i.jsx(Y,{})]}),i.jsx(Yt,{children:i.jsx("tr",{children:i.jsx("td",{colSpan:7,children:i.jsx(ea,{icon:i.jsx(I1,{className:"w-6 h-6"}),title:"No delegations",description:"Delegation chains appear here when agents grant permissions to other agents."})})})})]}):i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"ID"}),i.jsx(Y,{children:"Chain"}),i.jsx(Y,{children:"Permissions"}),i.jsx(Y,{children:"Depth"}),i.jsx(Y,{children:"Expires"}),i.jsx(Y,{children:"Status"}),i.jsx(Y,{})]}),i.jsx(Yt,{children:y.map(p=>i.jsxs(Pn,{children:[i.jsx(oe,{children:i.jsx("code",{className:"text-xs font-mono text-zinc-500",children:p.id})}),i.jsxs(oe,{children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm text-zinc-200 font-medium max-w-[120px] truncate",children:p.fromAgentName}),i.jsx(Ru,{className:"w-3.5 h-3.5 text-zinc-600 flex-shrink-0"}),i.jsx("span",{className:"text-sm text-zinc-200 font-medium max-w-[120px] truncate",children:p.toAgentName})]}),i.jsxs("div",{className:"flex gap-1 mt-0.5",children:[i.jsx("code",{className:"text-[10px] font-mono text-zinc-600",children:p.fromAgentId}),i.jsx("span",{className:"text-[10px] text-zinc-700",children:"→"}),i.jsx("code",{className:"text-[10px] font-mono text-zinc-600",children:p.toAgentId})]})]}),i.jsx(oe,{children:i.jsx(np,{permissions:p.permissions})}),i.jsx(oe,{children:i.jsxs("span",{className:"text-xs font-mono text-zinc-400",children:[p.depth,"/",p.maxDepth]})}),i.jsx(oe,{children:i.jsx("span",{className:["text-xs",p.status==="expired"||new Date(p.expiresAt)<new Date?"text-amber-400":"text-zinc-400"].join(" "),children:tp(p.expiresAt)})}),i.jsx(oe,{children:i.jsx(el,{variant:lp(p.status),children:p.status})}),i.jsx(oe,{className:"text-right",children:p.status==="active"&&i.jsxs(Fe,{variant:"ghost",onClick:()=>d.mutate(p.id),disabled:d.isPending&&d.variables===p.id,children:[i.jsx(To,{className:"w-3.5 h-3.5 text-red-400"}),i.jsx("span",{className:"text-red-400",children:"Revoke"})]})})]},p.id))})]})]})}function dm(c){switch(c){case"online":return"green";case"offline":return"red";case"unknown":return"gray"}}function ip({open:c,onClose:u,onSubmit:r,loading:o}){const[d,y]=k.useState(""),[p,z]=k.useState(""),[S,b]=k.useState(""),[H,O]=k.useState(!1),[_,q]=k.useState(""),[Q,B]=k.useState(""),[X,L]=k.useState("");function G(){let w=!0;if(d.trim()?B(""):(B("Name is required"),w=!1),p.trim()?L(""):(L("Endpoint URL is required"),w=!1),!w)return;const le=S.split(",").map(ne=>ne.trim()).filter(Boolean),fe=_.trim()?Number(_.trim()):void 0;r({name:d.trim(),endpoint:p.trim(),tools:le,authRequired:H,rateLimit:fe&&fe>0?{rpm:fe}:void 0})}function $(){y(""),z(""),b(""),O(!1),q(""),B(""),L(""),u()}return i.jsx(ns,{open:c,onClose:$,title:"Register MCP Server",footer:i.jsxs(i.Fragment,{children:[i.jsx(Fe,{variant:"ghost",onClick:$,children:"Cancel"}),i.jsx(Fe,{variant:"primary",onClick:G,loading:o,children:"Register Server"})]}),children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"mcp-name",required:!0,children:"Name"}),i.jsx(et,{id:"mcp-name",placeholder:"e.g. filesystem-tools",value:d,onChange:w=>y(w.target.value),error:Q,autoFocus:!0})]}),i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"mcp-endpoint",required:!0,children:"Endpoint URL"}),i.jsx(et,{id:"mcp-endpoint",placeholder:"https://mcp.example.com/sse",value:p,onChange:w=>z(w.target.value),error:X})]}),i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"mcp-tools",children:"Tools (comma-separated)"}),i.jsx(et,{id:"mcp-tools",placeholder:"read_file, write_file, list_dir",value:S,onChange:w=>b(w.target.value)})]}),i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"mcp-rate-limit",children:"Rate limit (requests per minute)"}),i.jsx(et,{id:"mcp-rate-limit",type:"number",placeholder:"e.g. 60",min:"1",value:_,onChange:w=>q(w.target.value)})]}),i.jsxs("div",{className:"flex items-center gap-3 pt-1",children:[i.jsx("button",{id:"mcp-auth",type:"button",role:"switch","aria-checked":H,onClick:()=>O(w=>!w),className:["relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:ring-offset-zinc-900",H?"bg-indigo-600":"bg-zinc-700"].join(" "),children:i.jsx("span",{className:["pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200",H?"translate-x-4":"translate-x-0"].join(" ")})}),i.jsx("label",{htmlFor:"mcp-auth",className:"text-sm text-zinc-300 cursor-pointer select-none",children:"Auth required"})]})]})})}function sp({client:c}){const u=In(),[r,o]=k.useState(!1),{data:d,isLoading:y}=rt({queryKey:["mcp-servers"],queryFn:()=>c.getMcpServers()}),p=ql({mutationFn:S=>c.registerMcpServer(S),onSuccess:S=>{S.success&&(u.invalidateQueries({queryKey:["mcp-servers"]}),o(!1))}}),z=d!=null&&d.success?d.data:[];return i.jsxs("div",{children:[i.jsx(Ql,{title:"MCP Servers",description:"Registered Model Context Protocol servers available to agents.",actions:i.jsxs(Fe,{variant:"primary",onClick:()=>o(!0),children:[i.jsx(Wa,{className:"w-3.5 h-3.5"}),"Register Server"]})}),y?i.jsx("div",{className:"flex items-center justify-center py-16",children:i.jsx("div",{className:"w-5 h-5 border-2 border-zinc-700 border-t-indigo-500 rounded-full animate-spin"})}):z.length===0?i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"Name"}),i.jsx(Y,{children:"Endpoint"}),i.jsx(Y,{children:"Tools"}),i.jsx(Y,{children:"Auth"}),i.jsx(Y,{children:"Rate limit"}),i.jsx(Y,{children:"Status"})]}),i.jsx(Yt,{children:i.jsx("tr",{children:i.jsx("td",{colSpan:6,children:i.jsx(ea,{icon:i.jsx(Oo,{className:"w-6 h-6"}),title:"No servers registered",description:"Register an MCP server to make its tools available to agents.",action:i.jsxs(Fe,{variant:"primary",onClick:()=>o(!0),children:[i.jsx(Wa,{className:"w-3.5 h-3.5"}),"Register Server"]})})})})})]}):i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"Name"}),i.jsx(Y,{children:"Endpoint"}),i.jsx(Y,{children:"Tools"}),i.jsx(Y,{children:"Auth"}),i.jsx(Y,{children:"Rate limit"}),i.jsx(Y,{children:"Status"})]}),i.jsx(Yt,{children:z.map(S=>i.jsxs(Pn,{children:[i.jsx(oe,{children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("div",{className:"w-6 h-6 rounded-md bg-zinc-800 border border-zinc-700 flex items-center justify-center flex-shrink-0",children:i.jsx(Oo,{className:"w-3.5 h-3.5 text-zinc-400"})}),i.jsx("span",{className:"text-sm font-medium text-white",children:S.name})]})}),i.jsx(oe,{children:i.jsx("code",{className:"text-xs font-mono text-zinc-400 max-w-[200px] truncate block",children:S.endpoint})}),i.jsx(oe,{children:S.tools.length===0?i.jsx("span",{className:"text-xs text-zinc-600",children:"—"}):i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx("span",{className:"text-sm text-zinc-300 font-medium",children:S.tools.length}),i.jsx("span",{className:"text-xs text-zinc-500",children:S.tools.length===1?"tool":"tools"})]})}),i.jsx(oe,{children:S.authRequired?i.jsx(el,{variant:"indigo",children:"Required"}):i.jsx(el,{variant:"gray",children:"None"})}),i.jsx(oe,{children:S.rateLimit?i.jsxs("span",{className:"text-xs font-mono text-zinc-300",children:[S.rateLimit.rpm," rpm"]}):i.jsx("span",{className:"text-xs text-zinc-600",children:"—"})}),i.jsx(oe,{children:i.jsxs(el,{variant:dm(S.status),children:[i.jsx(Qo,{variant:dm(S.status)}),S.status]})})]},S.id))})]}),i.jsx(ip,{open:r,onClose:()=>o(!1),onSubmit:S=>p.mutate(S),loading:p.isPending})]})}function up(c){return new Date(c).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function cp(c){switch(c){case"allowed":return"green";case"denied":return"red";case"rate_limited":return"yellow"}}function rp(c){switch(c){case"allowed":return"allowed";case"denied":return"denied";case"rate_limited":return"rate limited"}}function Nu({title:c,value:u,subtitle:r,icon:o,iconColor:d}){return i.jsxs("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl p-5 flex flex-col gap-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-xs font-medium text-zinc-400 uppercase tracking-wider",children:c}),i.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center ${d}`,children:i.jsx(o,{className:"w-4 h-4 text-white",strokeWidth:2})})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-3xl font-semibold text-white tracking-tight",children:u}),i.jsx("p",{className:"text-xs text-zinc-500 mt-1",children:r})]})]})}function Au(){return i.jsxs("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl p-5 flex flex-col gap-4 animate-pulse",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("div",{className:"h-3 w-24 bg-zinc-800 rounded"}),i.jsx("div",{className:"w-8 h-8 bg-zinc-800 rounded-lg"})]}),i.jsxs("div",{children:[i.jsx("div",{className:"h-8 w-16 bg-zinc-800 rounded"}),i.jsx("div",{className:"h-3 w-28 bg-zinc-800 rounded mt-2"})]})]})}function op({client:c}){const{data:u,isLoading:r,dataUpdatedAt:o}=rt({queryKey:["audit","recent"],queryFn:()=>c.getAuditLogs({limit:10}),refetchInterval:15e3}),d=u!=null&&u.success?u.data.entries:[],y=o>0?new Date(o):null;return i.jsxs("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl overflow-hidden",children:[i.jsxs("div",{className:"px-5 py-4 border-b border-zinc-800 flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-sm font-semibold text-white",children:"Recent Activity"}),i.jsx("p",{className:"text-xs text-zinc-500 mt-0.5",children:"Last 10 audit entries, auto-refreshes every 15s"})]}),y&&i.jsxs("span",{className:"text-[10px] text-zinc-600 tabular-nums",children:["Updated"," ",y.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"})]})]}),r?i.jsx("div",{className:"divide-y divide-zinc-800",children:Array.from({length:5}).map((p,z)=>i.jsxs("div",{className:"px-5 py-3.5 flex items-center gap-4 animate-pulse",children:[i.jsx("div",{className:"h-3 w-28 bg-zinc-800 rounded flex-shrink-0"}),i.jsx("div",{className:"h-3 w-20 bg-zinc-800 rounded flex-shrink-0"}),i.jsx("div",{className:"h-3 w-24 bg-zinc-800 rounded flex-shrink-0"}),i.jsx("div",{className:"h-3 flex-1 bg-zinc-800 rounded"}),i.jsx("div",{className:"h-5 w-16 bg-zinc-800 rounded-full flex-shrink-0"})]},z))}):d.length===0?i.jsxs("div",{className:"px-5 py-10 text-center",children:[i.jsx(Eo,{className:"w-8 h-8 text-zinc-700 mx-auto mb-3"}),i.jsx("p",{className:"text-sm text-zinc-500",children:"No audit events yet"})]}):i.jsx("div",{className:"divide-y divide-zinc-800",children:d.map(p=>i.jsxs("div",{className:"px-5 py-3 flex items-center gap-4 text-xs hover:bg-zinc-800/40 transition-colors",children:[i.jsx("span",{className:"text-zinc-500 tabular-nums flex-shrink-0 w-36",children:up(p.timestamp)}),i.jsx("span",{className:"text-zinc-300 font-medium truncate w-32 flex-shrink-0",children:p.agentName}),i.jsx("span",{className:"text-zinc-400 font-mono truncate w-24 flex-shrink-0",children:p.action}),i.jsx("span",{className:"text-zinc-500 truncate flex-1 font-mono",children:p.resource}),i.jsx(el,{variant:cp(p.result),children:rp(p.result)})]},p.id))})]})}function fp({client:c,onNavigate:u}){const{data:r,isLoading:o}=rt({queryKey:["dashboard","stats"],queryFn:()=>c.getStats(),refetchInterval:3e4}),d=r!=null&&r.success?r.data:null;return k.useEffect(()=>{c.getAuditLogs({limit:10})},[c]),i.jsxs("div",{children:[i.jsx(Ql,{title:"Overview",description:"System-wide health and recent activity at a glance."}),i.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:o||!d?i.jsxs(i.Fragment,{children:[i.jsx(Au,{}),i.jsx(Au,{}),i.jsx(Au,{}),i.jsx(Au,{})]}):i.jsxs(i.Fragment,{children:[i.jsx(Nu,{title:"Total Agents",value:d.totalAgents,subtitle:`${d.activeAgents} active`,icon:Uu,iconColor:"bg-indigo-600"}),i.jsx(Nu,{title:"Auth Rate",value:`${Math.round(d.authAllowedRate)}%`,subtitle:"allowed vs denied, last 24h",icon:ls,iconColor:"bg-emerald-600"}),i.jsx(Nu,{title:"Audit Events",value:d.totalAuditEvents.toLocaleString(),subtitle:`${d.recentAuditEvents} in last 24h`,icon:Eo,iconColor:"bg-violet-600"}),i.jsx(Nu,{title:"Delegations",value:d.activeDelegations,subtitle:"active delegations",icon:Ho,iconColor:"bg-sky-600"})]})}),i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[i.jsx("div",{className:"lg:col-span-2",children:i.jsx(op,{client:c})}),i.jsxs("div",{className:"flex flex-col gap-4",children:[i.jsxs("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl overflow-hidden",children:[i.jsx("div",{className:"px-5 py-4 border-b border-zinc-800",children:i.jsx("h2",{className:"text-sm font-semibold text-white",children:"Quick Actions"})}),i.jsxs("div",{className:"p-4 flex flex-col gap-3",children:[i.jsxs("button",{type:"button",onClick:()=>u("agents"),className:"group flex items-center justify-between w-full px-4 py-3.5 bg-zinc-800 hover:bg-zinc-700/80 border border-zinc-700 hover:border-zinc-600 rounded-lg transition-all duration-100 text-left",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-indigo-600/20 border border-indigo-500/30 flex items-center justify-center flex-shrink-0",children:i.jsx(Uu,{className:"w-4 h-4 text-indigo-400"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-white",children:"Create Agent"}),i.jsx("p",{className:"text-xs text-zinc-500",children:"Register a new AI agent"})]})]}),i.jsx(Ru,{className:"w-4 h-4 text-zinc-600 group-hover:text-zinc-400 transition-colors"})]}),i.jsxs("button",{type:"button",onClick:()=>u("audit"),className:"group flex items-center justify-between w-full px-4 py-3.5 bg-zinc-800 hover:bg-zinc-700/80 border border-zinc-700 hover:border-zinc-600 rounded-lg transition-all duration-100 text-left",children:[i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-violet-600/20 border border-violet-500/30 flex items-center justify-center flex-shrink-0",children:i.jsx(Eo,{className:"w-4 h-4 text-violet-400"})}),i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-white",children:"View Audit Log"}),i.jsx("p",{className:"text-xs text-zinc-500",children:"Full immutable event trail"})]})]}),i.jsx(Ru,{className:"w-4 h-4 text-zinc-600 group-hover:text-zinc-400 transition-colors"})]})]})]}),d&&i.jsxs("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl p-5",children:[i.jsx("h3",{className:"text-xs font-medium text-zinc-400 uppercase tracking-wider mb-4",children:"Authorization Breakdown"}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[i.jsx("span",{className:"text-xs text-zinc-400",children:"Allowed"}),i.jsxs("span",{className:"text-xs font-mono text-emerald-400",children:[Math.round(d.authAllowedRate),"%"]})]}),i.jsx("div",{className:"h-1.5 bg-zinc-800 rounded-full overflow-hidden",children:i.jsx("div",{className:"h-full bg-emerald-500 rounded-full transition-all duration-500",style:{width:`${Math.min(100,d.authAllowedRate)}%`}})})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[i.jsx("span",{className:"text-xs text-zinc-400",children:"Denied"}),i.jsxs("span",{className:"text-xs font-mono text-red-400",children:[Math.round(100-d.authAllowedRate),"%"]})]}),i.jsx("div",{className:"h-1.5 bg-zinc-800 rounded-full overflow-hidden",children:i.jsx("div",{className:"h-full bg-red-500 rounded-full transition-all duration-500",style:{width:`${Math.min(100,100-d.authAllowedRate)}%`}})})]})]})]})]})]})]})}function hm(c,u){if(c===u||c==="*"||u==="*")return!0;function r(o,d){if(o===d)return!0;if(o.endsWith(":*")||o.endsWith("/*")||o.endsWith("*")){const y=o.endsWith(":*")||o.endsWith("/*")?o.slice(0,-2):o.slice(0,-1);return d.startsWith(y)||y.startsWith(d)}return!1}return r(c,u)||r(u,c)}function mm(c){return c.some(u=>["write","delete","update","create","execute"].includes(u))}function xm(c){return c.filter(r=>!["read","list"].includes(r)).length===0}function ym(c){return c.requireApproval===!0}function dp(c,u,r){const o=[];for(const d of u){if(r!==void 0&&d.id===r||!hm(c.resource,d.resource))continue;const y=mm(c.actions),p=mm(d.actions),z=xm(c.actions),S=xm(d.actions),b=ym(c.constraints),H=ym(d.constraints);if(b!==H&&o.push({kind:"contradiction",otherName:d.name,message:`Contradicts "${d.name}": one requires human approval on overlapping resource "${d.resource}", the other does not.`}),hm(c.resource,d.resource)&&(d.resource==="*"||d.resource.endsWith("*")&&c.resource.startsWith(d.resource.slice(0,-1)))&&d.actions.length>=c.actions.length&&c.actions.every(O=>d.actions.includes(O))){o.push({kind:"redundancy",otherName:d.name,message:`Redundant with "${d.name}": that template already covers "${d.resource}" with the same or broader actions.`});continue}z&&p?o.push({kind:"overlap",otherName:d.name,message:`Overlaps with "${d.name}": this template is read-only but "${d.name}" grants write access on matching resource "${d.resource}".`}):y&&S&&o.push({kind:"overlap",otherName:d.name,message:`Overlaps with "${d.name}": this template grants write access while "${d.name}" is read-only on matching resource "${d.resource}".`})}return o}function hp({resource:c,actions:u,constraints:r,allTemplates:o,editingId:d}){if(!c.trim()||u.length===0)return null;const y=dp({resource:c,actions:u,constraints:r},o,d);return y.length===0?null:i.jsx("div",{className:"rounded-lg border border-yellow-700/60 bg-yellow-950/30 px-3.5 py-3",role:"alert","aria-live":"polite",children:i.jsxs("div",{className:"flex items-start gap-2.5",children:[i.jsx(jg,{className:"w-4 h-4 text-yellow-500 mt-0.5 flex-shrink-0"}),i.jsxs("div",{className:"min-w-0",children:[i.jsx("p",{className:"text-xs font-semibold text-yellow-400 mb-1.5",children:y.length===1?"Potential conflict detected":`${y.length} potential conflicts detected`}),i.jsx("ul",{className:"space-y-1",children:y.map(p=>i.jsxs("li",{className:"text-[11px] text-yellow-300/80 leading-relaxed",children:[i.jsx("span",{className:"inline-block w-16 font-mono text-yellow-600 uppercase tracking-wide text-[9px]",children:p.kind}),p.message]},`${p.kind}-${p.otherName}-${p.message}`))})]})]})})}function mp(c){const u=c.rateLimit!==void 0&&c.rateLimit!==null?c.rateLimit:null,r=c.timeWindow!==void 0&&c.timeWindow!==null?c.timeWindow:null,o=c.requireApproval===!0,d=Array.isArray(c.ipAllowlist)&&c.ipAllowlist.length>0?c.ipAllowlist:null,y=Array.isArray(c.argumentPatterns)&&c.argumentPatterns.length>0?c.argumentPatterns:null;return{rateLimit:u,timeWindow:r,requireApproval:o,ipAllowlist:d,argumentPatterns:y}}function xp(c){const u={};return c.rateLimit!==null&&(u.rateLimit=c.rateLimit),c.timeWindow!==null&&(u.timeWindow=c.timeWindow),c.requireApproval&&(u.requireApproval=!0),c.ipAllowlist!==null&&(u.ipAllowlist=c.ipAllowlist),c.argumentPatterns!==null&&(u.argumentPatterns=c.argumentPatterns),u}function Eu({id:c,label:u,enabled:r,onToggle:o,children:d}){return i.jsxs("div",{className:"rounded-lg border border-zinc-800 overflow-hidden",children:[i.jsxs("button",{type:"button",id:c,onClick:o,className:"w-full flex items-center justify-between px-3 py-2.5 bg-zinc-800/40 hover:bg-zinc-800/70 transition-colors","aria-expanded":r,children:[i.jsx("span",{className:"text-xs font-medium text-zinc-300",children:u}),i.jsx("span",{className:["w-8 h-4 rounded-full transition-colors relative flex-shrink-0",r?"bg-indigo-600":"bg-zinc-700"].join(" "),"aria-hidden":"true",children:i.jsx("span",{className:["absolute top-0.5 w-3 h-3 rounded-full bg-white transition-transform",r?"translate-x-4":"translate-x-0.5"].join(" ")})})]}),r&&i.jsx("div",{className:"px-3 py-3 space-y-2.5 border-t border-zinc-800",children:d})]})}function vm({tags:c,onRemove:u}){return c.length===0?null:i.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1.5",children:c.map(r=>i.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-zinc-800 border border-zinc-700 text-xs text-zinc-300 font-mono",children:[r,i.jsx("button",{type:"button",onClick:()=>u(r),className:"text-zinc-500 hover:text-zinc-200 transition-colors","aria-label":`Remove ${r}`,children:i.jsx(km,{className:"w-2.5 h-2.5"})})]},r))})}function yp({constraints:c,onChange:u}){var Q,B,X;const r=mp(c),[o,d]=k.useState(""),[y,p]=k.useState("");function z(L){u(xp({...r,...L}))}function S(){z({rateLimit:r.rateLimit===null?{maxCallsPerHour:100}:null})}function b(){z({timeWindow:r.timeWindow===null?{start:"09:00",end:"17:00"}:null})}function H(){const L=o.split(",").map(w=>w.trim()).filter(Boolean);if(L.length===0)return;const G=r.ipAllowlist??[],$=[...G,...L.filter(w=>!G.includes(w))];z({ipAllowlist:$.length>0?$:null}),d("")}function O(L){const G=(r.ipAllowlist??[]).filter($=>$!==L);z({ipAllowlist:G.length>0?G:null})}function _(){const L=y.split(",").map(w=>w.trim()).filter(Boolean);if(L.length===0)return;const G=r.argumentPatterns??[],$=[...G,...L.filter(w=>!G.includes(w))];z({argumentPatterns:$.length>0?$:null}),p("")}function q(L){const G=(r.argumentPatterns??[]).filter($=>$!==L);z({argumentPatterns:G.length>0?G:null})}return i.jsxs("div",{className:"space-y-2",children:[i.jsx(Eu,{id:"constraint-rate-limit",label:"Rate limit",enabled:r.rateLimit!==null,onToggle:S,children:i.jsxs("div",{children:[i.jsx(qe,{htmlFor:"constraint-max-calls",children:"Max calls per hour"}),i.jsx(et,{id:"constraint-max-calls",type:"number",min:1,value:((Q=r.rateLimit)==null?void 0:Q.maxCallsPerHour)??100,onChange:L=>z({rateLimit:{maxCallsPerHour:Number(L.target.value)}}),className:"w-32"})]})}),i.jsx(Eu,{id:"constraint-time-window",label:"Time window",enabled:r.timeWindow!==null,onToggle:b,children:i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsxs("div",{children:[i.jsx(qe,{htmlFor:"constraint-tw-start",children:"Start"}),i.jsx(et,{id:"constraint-tw-start",type:"time",value:((B=r.timeWindow)==null?void 0:B.start)??"09:00",onChange:L=>{var G;return z({timeWindow:{start:L.target.value,end:((G=r.timeWindow)==null?void 0:G.end)??"17:00"}})},className:"w-32"})]}),i.jsxs("div",{children:[i.jsx(qe,{htmlFor:"constraint-tw-end",children:"End"}),i.jsx(et,{id:"constraint-tw-end",type:"time",value:((X=r.timeWindow)==null?void 0:X.end)??"17:00",onChange:L=>{var G;return z({timeWindow:{start:((G=r.timeWindow)==null?void 0:G.start)??"09:00",end:L.target.value}})},className:"w-32"})]})]})}),i.jsxs("label",{className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-zinc-800 bg-zinc-800/40 cursor-pointer hover:bg-zinc-800/70 transition-colors",children:[i.jsx("input",{type:"checkbox",checked:r.requireApproval,onChange:()=>z({requireApproval:!r.requireApproval}),className:"w-3.5 h-3.5 rounded border-zinc-600 bg-zinc-800 accent-indigo-500"}),i.jsx("span",{className:"text-xs font-medium text-zinc-300",children:"Human-in-the-loop (require approval)"})]}),i.jsx(Eu,{id:"constraint-ip-allowlist",label:"IP allowlist",enabled:r.ipAllowlist!==null,onToggle:()=>z({ipAllowlist:r.ipAllowlist===null?[]:null}),children:i.jsxs("div",{children:[i.jsx(qe,{htmlFor:"constraint-ip-input",children:"Add IPs or CIDRs (comma-separated, press Enter)"}),i.jsx(et,{id:"constraint-ip-input",placeholder:"10.0.0.0/8, 192.168.1.5",value:o,onChange:L=>d(L.target.value),onKeyDown:L=>{L.key==="Enter"&&(L.preventDefault(),H())},onBlur:H}),i.jsx(vm,{tags:r.ipAllowlist??[],onRemove:O})]})}),i.jsx(Eu,{id:"constraint-arg-patterns",label:"Argument patterns",enabled:r.argumentPatterns!==null,onToggle:()=>z({argumentPatterns:r.argumentPatterns===null?[]:null}),children:i.jsxs("div",{children:[i.jsx(qe,{htmlFor:"constraint-pattern-input",children:"Glob patterns (comma-separated, press Enter)"}),i.jsx(et,{id:"constraint-pattern-input",placeholder:"docs/*, reports/**",value:y,onChange:L=>p(L.target.value),onKeyDown:L=>{L.key==="Enter"&&(L.preventDefault(),_())},onBlur:_}),i.jsx(vm,{tags:r.argumentPatterns??[],onRemove:q})]})})]})}const vp=["read","write","delete","execute","list","create","update"];function gp(c){return new Date(c).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function gm({open:c,onClose:u,onSubmit:r,loading:o,initial:d,allTemplates:y}){const p=(d==null?void 0:d.constraints)??{},[z,S]=k.useState({name:(d==null?void 0:d.name)??"",description:(d==null?void 0:d.description)??"",resource:(d==null?void 0:d.resource)??"",actions:(d==null?void 0:d.actions)??[],constraints:p,constraintsJson:d!=null&&d.constraints?JSON.stringify(d.constraints,null,2):""}),[b,H]=k.useState({}),[O,_]=k.useState("visual");function q(w){S(le=>({...le,actions:le.actions.includes(w)?le.actions.filter(fe=>fe!==w):[...le.actions,w]}))}function Q(w){S(le=>({...le,constraints:w,constraintsJson:JSON.stringify(w,null,2)}))}function B(w){S(le=>{let fe={};try{fe=JSON.parse(w)}catch{fe=le.constraints}return{...le,constraintsJson:w,constraints:fe}})}function X(){const w={};if(z.name.trim()||(w.name="Name is required"),z.resource.trim()||(w.resource="Resource pattern is required"),z.actions.length===0&&(w.actions="At least one action required"),O==="raw"&&z.constraintsJson.trim())try{JSON.parse(z.constraintsJson)}catch{w.constraintsJson="Invalid JSON"}return H(w),Object.keys(w).length===0}function L(){if(!X())return;let w={};if(O==="raw"&&z.constraintsJson.trim())try{w=JSON.parse(z.constraintsJson)}catch{}else w=z.constraints;r({name:z.name.trim(),description:z.description.trim()||void 0,resource:z.resource.trim(),actions:z.actions,constraints:w})}function G(){S({name:(d==null?void 0:d.name)??"",description:(d==null?void 0:d.description)??"",resource:(d==null?void 0:d.resource)??"",actions:(d==null?void 0:d.actions)??[],constraints:(d==null?void 0:d.constraints)??{},constraintsJson:d!=null&&d.constraints?JSON.stringify(d.constraints,null,2):""}),H({}),_("visual"),u()}const $=O==="raw"?(()=>{try{return JSON.parse(z.constraintsJson)}catch{return z.constraints}})():z.constraints;return i.jsx(ns,{open:c,onClose:G,title:d?"Edit Template":"New Permission Template",footer:i.jsxs(i.Fragment,{children:[i.jsx(Fe,{variant:"ghost",onClick:G,children:"Cancel"}),i.jsx(Fe,{variant:"primary",onClick:L,loading:o,children:d?"Save Changes":"Create Template"})]}),children:i.jsxs("div",{className:"space-y-4",children:[i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"tpl-name",required:!0,children:"Name"}),i.jsx(et,{id:"tpl-name",placeholder:"e.g. read-only-documents",value:z.name,onChange:w=>S(le=>({...le,name:w.target.value})),error:b.name,autoFocus:!0})]}),i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"tpl-description",children:"Description"}),i.jsx(et,{id:"tpl-description",placeholder:"Brief description of what this template grants",value:z.description,onChange:w=>S(le=>({...le,description:w.target.value}))})]}),i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"tpl-resource",required:!0,children:"Resource Pattern"}),i.jsx(et,{id:"tpl-resource",placeholder:"e.g. documents:*, api/v1/users/:id",value:z.resource,onChange:w=>S(le=>({...le,resource:w.target.value})),error:b.resource}),i.jsxs("p",{className:"text-[11px] text-zinc-500 mt-1",children:["Use ",i.jsx("code",{className:"text-zinc-400",children:"*"})," for wildcard matching"]})]}),i.jsxs("div",{children:[i.jsx(qe,{required:!0,children:"Actions"}),b.actions&&i.jsx("p",{className:"text-xs text-red-400 mb-1.5",children:b.actions}),i.jsx("div",{className:"flex flex-wrap gap-2 mt-1.5",children:vp.map(w=>i.jsx("button",{type:"button",onClick:()=>q(w),className:["px-2.5 py-1 rounded-md text-xs font-medium border transition-colors",z.actions.includes(w)?"bg-indigo-600 border-indigo-500 text-white":"bg-zinc-800 border-zinc-700 text-zinc-400 hover:text-zinc-200"].join(" "),children:w},w))})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-2",children:[i.jsx(qe,{children:"Constraints"}),i.jsxs("div",{className:"flex items-center gap-0.5 p-0.5 rounded-md bg-zinc-800 border border-zinc-700",children:[i.jsxs("button",{type:"button",onClick:()=>_("visual"),className:["flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-colors",O==="visual"?"bg-zinc-700 text-zinc-200":"text-zinc-500 hover:text-zinc-300"].join(" "),children:[i.jsx(yg,{className:"w-3 h-3"}),"Visual"]}),i.jsxs("button",{type:"button",onClick:()=>_("raw"),className:["flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-colors",O==="raw"?"bg-zinc-700 text-zinc-200":"text-zinc-500 hover:text-zinc-300"].join(" "),children:[i.jsx(M1,{className:"w-3 h-3"}),"Raw JSON"]})]})]}),O==="visual"?i.jsx(yp,{constraints:z.constraints,onChange:Q}):i.jsxs(ht,{children:[i.jsx(Qg,{id:"tpl-constraints",placeholder:'{"maxRequests": 100, "allowedIPs": ["10.0.0.0/8"]}',value:z.constraintsJson,onChange:w=>B(w.target.value),rows:5,error:b.constraintsJson,className:"font-mono text-xs"}),i.jsx("p",{className:"text-[11px] text-zinc-500 mt-1",children:"Optional. JSON object with additional constraints applied at check time."})]})]}),i.jsx(hp,{resource:z.resource,actions:z.actions,constraints:$,allTemplates:y,editingId:d==null?void 0:d.id})]})})}function pp({client:c}){const u=In(),[r,o]=k.useState(!1),[d,y]=k.useState(null),{data:p,isLoading:z}=rt({queryKey:["permission-templates"],queryFn:()=>c.getPermissionTemplates()}),S=ql({mutationFn:_=>c.createPermissionTemplate(_),onSuccess:_=>{_.success&&(u.invalidateQueries({queryKey:["permission-templates"]}),o(!1))}}),b=ql({mutationFn:({id:_,input:q})=>c.updatePermissionTemplate(_,q),onSuccess:_=>{_.success&&(u.invalidateQueries({queryKey:["permission-templates"]}),y(null))}}),H=ql({mutationFn:_=>c.deletePermissionTemplate(_),onSuccess:()=>{u.invalidateQueries({queryKey:["permission-templates"]})}}),O=p!=null&&p.success?p.data:[];return i.jsxs("div",{children:[i.jsx(Ql,{title:"Permissions",description:"Reusable permission templates for agents. Define once, apply many times.",actions:i.jsxs(Fe,{variant:"primary",onClick:()=>o(!0),children:[i.jsx(Wa,{className:"w-3.5 h-3.5"}),"New Template"]})}),z?i.jsx("div",{className:"flex items-center justify-center py-16",children:i.jsx("div",{className:"w-5 h-5 border-2 border-zinc-700 border-t-indigo-500 rounded-full animate-spin"})}):O.length===0?i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"Name"}),i.jsx(Y,{children:"Resource"}),i.jsx(Y,{children:"Actions"}),i.jsx(Y,{children:"Constraints"}),i.jsx(Y,{children:"Updated"}),i.jsx(Y,{})]}),i.jsx(Yt,{children:i.jsx("tr",{children:i.jsx("td",{colSpan:6,children:i.jsx(ea,{icon:i.jsx(ls,{className:"w-6 h-6"}),title:"No permission templates",description:"Create templates to define reusable permission sets for your agents.",action:i.jsxs(Fe,{variant:"primary",onClick:()=>o(!0),children:[i.jsx(Wa,{className:"w-3.5 h-3.5"}),"Create Template"]})})})})})]}):i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"Name"}),i.jsx(Y,{children:"Resource"}),i.jsx(Y,{children:"Actions"}),i.jsx(Y,{children:"Constraints"}),i.jsx(Y,{children:"Updated"}),i.jsx(Y,{})]}),i.jsx(Yt,{children:O.map(_=>i.jsxs(Pn,{onClick:()=>y(_),children:[i.jsx(oe,{children:i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-white",children:_.name}),_.description&&i.jsx("p",{className:"text-xs text-zinc-500 mt-0.5 max-w-[200px] truncate",children:_.description})]})}),i.jsx(oe,{children:i.jsx("code",{className:"text-xs font-mono text-indigo-400",children:_.resource})}),i.jsx(oe,{children:i.jsx("div",{className:"flex flex-wrap gap-1",children:_.actions.map(q=>i.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono bg-zinc-800 text-zinc-400",children:q},q))})}),i.jsx(oe,{children:Object.keys(_.constraints).length>0?i.jsxs("span",{className:"text-xs text-zinc-400",children:[Object.keys(_.constraints).length," rule",Object.keys(_.constraints).length!==1?"s":""]}):i.jsx("span",{className:"text-xs text-zinc-600",children:"None"})}),i.jsx(oe,{children:i.jsx("span",{className:"text-xs text-zinc-500",children:gp(_.updatedAt)})}),i.jsx(oe,{className:"text-right",children:i.jsxs("div",{className:"flex items-center justify-end gap-1",children:[i.jsx("button",{type:"button",onClick:q=>{q.stopPropagation(),y(_)},className:"w-7 h-7 flex items-center justify-center rounded-md text-zinc-500 hover:text-zinc-300 hover:bg-zinc-800 transition-colors","aria-label":"Edit template",children:i.jsx(eg,{className:"w-3.5 h-3.5"})}),i.jsx("button",{type:"button",onClick:q=>{q.stopPropagation(),H.mutate(_.id)},disabled:H.isPending,className:"w-7 h-7 flex items-center justify-center rounded-md text-zinc-500 hover:text-red-400 hover:bg-red-950/50 transition-colors disabled:opacity-50","aria-label":"Delete template",children:i.jsx(pg,{className:"w-3.5 h-3.5"})}),i.jsx(Xm,{className:"w-3.5 h-3.5 text-zinc-700"})]})})]},_.id))})]}),i.jsx(gm,{open:r,onClose:()=>o(!1),onSubmit:_=>S.mutate(_),loading:S.isPending,allTemplates:O}),i.jsx(gm,{open:d!==null,onClose:()=>y(null),onSubmit:_=>{d&&b.mutate({id:d.id,input:_})},loading:b.isPending,initial:d??void 0,allTemplates:O})]})}function bp(c){return new Date(c).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Tu({title:c,value:u,subtitle:r,icon:o,iconColor:d}){return i.jsxs("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl p-5 flex flex-col gap-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-xs font-medium text-zinc-400 uppercase tracking-wider",children:c}),i.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center ${d}`,children:i.jsx(o,{className:"w-4 h-4 text-white",strokeWidth:2})})]}),i.jsxs("div",{children:[i.jsx("p",{className:"text-3xl font-semibold text-white tracking-tight",children:u}),i.jsx("p",{className:"text-xs text-zinc-500 mt-1",children:r})]})]})}function Ou(){return i.jsxs("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl p-5 flex flex-col gap-4 animate-pulse",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("div",{className:"h-3 w-24 bg-zinc-800 rounded"}),i.jsx("div",{className:"w-8 h-8 bg-zinc-800 rounded-lg"})]}),i.jsxs("div",{children:[i.jsx("div",{className:"h-8 w-16 bg-zinc-800 rounded"}),i.jsx("div",{className:"h-3 w-28 bg-zinc-800 rounded mt-2"})]})]})}function jp({client:c}){const{data:u,isLoading:r}=rt({queryKey:["dashboard","stats"],queryFn:()=>c.getStats(),refetchInterval:3e4}),{data:o}=rt({queryKey:["agents"],queryFn:()=>c.getAgents()}),{data:d,isLoading:y}=rt({queryKey:["audit-denials"],queryFn:()=>c.getAuditLogs({result:"denied",limit:20}),refetchInterval:3e4}),{data:p,isLoading:z}=rt({queryKey:["audit-rate-limited"],queryFn:()=>c.getAuditLogs({result:"rate_limited",limit:20}),refetchInterval:3e4}),S=u!=null&&u.success?u.data:null,b=o!=null&&o.success?o.data:[],H=d!=null&&d.success?d.data.entries:[],O=p!=null&&p.success?p.data.entries:[],_=b.filter(X=>X.status==="revoked").length,q=b.filter(X=>X.status==="expired").length,B=[...new Set(O.map(X=>X.agentId))].map(X=>{const L=O.find(G=>G.agentId===X);return{id:X,name:(L==null?void 0:L.agentName)??X}});return i.jsxs("div",{children:[i.jsx(Ql,{title:"Security",description:"Security health, denied access attempts, and rate limiting overview."}),i.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:r||!S?i.jsxs(i.Fragment,{children:[i.jsx(Ou,{}),i.jsx(Ou,{}),i.jsx(Ou,{}),i.jsx(Ou,{})]}):i.jsxs(i.Fragment,{children:[i.jsx(Tu,{title:"Rate limited (24h)",value:p!=null&&p.success?p.data.total:"—",subtitle:"requests throttled in last 24h",icon:om,iconColor:"bg-amber-600"}),i.jsx(Tu,{title:"Denied (24h)",value:d!=null&&d.success?d.data.total:"—",subtitle:"access denied events in last 24h",icon:To,iconColor:"bg-red-600"}),i.jsx(Tu,{title:"Revoked agents",value:_,subtitle:"agents manually revoked",icon:Vm,iconColor:"bg-rose-700"}),i.jsx(Tu,{title:"Expired tokens",value:q,subtitle:"agents with expired credentials",icon:Km,iconColor:"bg-zinc-600"})]})}),i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[i.jsx("div",{className:"lg:col-span-2",children:i.jsxs("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl overflow-hidden",children:[i.jsxs("div",{className:"px-5 py-4 border-b border-zinc-800",children:[i.jsx("h2",{className:"text-sm font-semibold text-white",children:"Recent denials"}),i.jsx("p",{className:"text-xs text-zinc-500 mt-0.5",children:"Last 20 denied access events"})]}),y?i.jsx("div",{className:"flex items-center justify-center py-12",children:i.jsx("div",{className:"w-5 h-5 border-2 border-zinc-700 border-t-indigo-500 rounded-full animate-spin"})}):H.length===0?i.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[i.jsx("div",{className:"w-10 h-10 rounded-xl bg-zinc-800 flex items-center justify-center mb-3 text-zinc-500",children:i.jsx(To,{className:"w-5 h-5"})}),i.jsx("p",{className:"text-sm font-medium text-zinc-300 mb-1",children:"No denied events"}),i.jsx("p",{className:"text-xs text-zinc-500",children:"All recent access requests were allowed."})]}):i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"Timestamp"}),i.jsx(Y,{children:"Agent"}),i.jsx(Y,{children:"Action"}),i.jsx(Y,{children:"Resource"})]}),i.jsx(Yt,{children:H.map(X=>i.jsxs(Pn,{children:[i.jsx(oe,{children:i.jsxs("div",{className:"flex items-center gap-1.5",children:[i.jsx(Hu,{className:"w-3 h-3 text-zinc-600 flex-shrink-0"}),i.jsx("span",{className:"text-xs text-zinc-300 font-mono",children:bp(X.timestamp)})]})}),i.jsx(oe,{children:i.jsx("span",{className:"text-xs font-medium text-zinc-200",children:X.agentName})}),i.jsx(oe,{children:i.jsx("code",{className:"text-xs font-mono text-zinc-400",children:X.action})}),i.jsx(oe,{children:i.jsx("code",{className:"text-xs font-mono text-zinc-400 max-w-[180px] truncate block",children:X.resource})})]},X.id))})]})]})}),i.jsx("div",{children:i.jsxs("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl overflow-hidden",children:[i.jsxs("div",{className:"px-5 py-4 border-b border-zinc-800",children:[i.jsx("h2",{className:"text-sm font-semibold text-white",children:"Rate limited agents"}),i.jsx("p",{className:"text-xs text-zinc-500 mt-0.5",children:"Agents hitting limits recently"})]}),z?i.jsx("div",{className:"flex items-center justify-center py-10",children:i.jsx("div",{className:"w-4 h-4 border-2 border-zinc-700 border-t-indigo-500 rounded-full animate-spin"})}):B.length===0?i.jsx("div",{className:"flex flex-col items-center justify-center py-10 text-center px-4",children:i.jsx(ea,{icon:i.jsx(om,{className:"w-5 h-5"}),title:"No throttled agents",description:"No agents have hit rate limits recently."})}):i.jsx("div",{className:"divide-y divide-zinc-800/60",children:B.map(X=>{const L=O.filter(G=>G.agentId===X.id).length;return i.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5",children:[i.jsxs("div",{children:[i.jsx("p",{className:"text-sm font-medium text-zinc-200",children:X.name}),i.jsxs("p",{className:"text-[11px] font-mono text-zinc-600 mt-0.5",children:[X.id.slice(0,12),"…"]})]}),i.jsxs(el,{variant:"yellow",children:[L," hits"]})]},X.id)})})]})})]})]})}function Cu({icon:c,title:u,description:r,children:o}){return i.jsxs("div",{className:"bg-zinc-900 border border-zinc-800 rounded-xl p-5",children:[i.jsxs("div",{className:"flex items-start gap-3 mb-5",children:[i.jsx("div",{className:"w-8 h-8 rounded-lg bg-zinc-800 flex items-center justify-center flex-shrink-0 text-zinc-400",children:c}),i.jsxs("div",{children:[i.jsx("h2",{className:"text-sm font-semibold text-white",children:u}),i.jsx("p",{className:"text-xs text-zinc-500 mt-0.5",children:r})]})]}),o]})}function oo({label:c,value:u}){return i.jsxs("div",{children:[i.jsx("p",{className:"text-xs font-medium text-zinc-500 mb-1",children:c}),i.jsx("p",{className:"text-sm font-mono text-zinc-300 bg-zinc-950 border border-zinc-800 rounded-lg px-3 py-2",children:u})]})}function Sp({settings:c,onSave:u,loading:r}){const[o,d]=k.useState(String(c.tokenExpirySeconds)),[y,p]=k.useState(String(c.rateLimitRequestsPerMinute)),[z,S]=k.useState(String(c.rateLimitWindowSeconds)),[b,H]=k.useState(String(c.auditRetentionDays)),[O,_]=k.useState(String(c.maxAgentsPerTenant));function q(){u({tokenExpirySeconds:Number(o),rateLimitRequestsPerMinute:Number(y),rateLimitWindowSeconds:Number(z),auditRetentionDays:Number(b),maxAgentsPerTenant:Number(O)})}return i.jsxs("div",{className:"space-y-5",children:[i.jsx(Cu,{icon:i.jsx(R1,{className:"w-4 h-4"}),title:"Database",description:"Connection information. Managed via environment variables.",children:i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[i.jsx(oo,{label:"Adapter",value:c.database.adapter}),i.jsx(oo,{label:"Version",value:c.database.version}),i.jsx(oo,{label:"Connection",value:c.database.url.replace(/:[^:@]+@/,":***@")})]})}),i.jsx(Cu,{icon:i.jsx(Hu,{className:"w-4 h-4"}),title:"Token Expiry",description:"Default lifetime for agent tokens before they must be rotated.",children:i.jsxs("div",{className:"max-w-xs",children:[i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"token-expiry",children:"Expiry (seconds)"}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(et,{id:"token-expiry",type:"number",min:60,max:31536e3,value:o,onChange:Q=>d(Q.target.value)}),i.jsxs("span",{className:"text-xs text-zinc-500 whitespace-nowrap flex-shrink-0",children:[Math.round(Number(o)/3600),"h"]})]})]}),i.jsx("p",{className:"text-[11px] text-zinc-500 mt-2",children:"Recommended: 3600 (1h) for automated agents, 86400 (24h) for service accounts."})]})}),i.jsxs(Cu,{icon:i.jsx(Ag,{className:"w-4 h-4"}),title:"Rate Limits",description:"Default rate limiting applied to all agents unless overridden by permission constraints.",children:[i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 max-w-md",children:[i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"rate-limit-requests",children:"Requests per window"}),i.jsx(et,{id:"rate-limit-requests",type:"number",min:1,value:y,onChange:Q=>p(Q.target.value)})]}),i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"rate-limit-window",children:"Window (seconds)"}),i.jsx(et,{id:"rate-limit-window",type:"number",min:1,value:z,onChange:Q=>S(Q.target.value)})]})]}),i.jsxs("p",{className:"text-[11px] text-zinc-500 mt-2",children:["Current: ",y," requests per ",z,"s window."]})]}),i.jsxs(Cu,{icon:i.jsx(b1,{className:"w-4 h-4"}),title:"Audit Retention",description:"How long audit log entries are retained before automatic deletion.",children:[i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 max-w-md",children:[i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"audit-retention",children:"Retention (days)"}),i.jsx(et,{id:"audit-retention",type:"number",min:1,max:3650,value:b,onChange:Q=>H(Q.target.value)})]}),i.jsxs(ht,{children:[i.jsx(qe,{htmlFor:"max-agents",children:"Max agents per tenant"}),i.jsx(et,{id:"max-agents",type:"number",min:1,value:O,onChange:Q=>_(Q.target.value)})]})]}),i.jsx("p",{className:"text-[11px] text-zinc-500 mt-2",children:"EU AI Act Article 12 requires minimum 90 days. SOC 2 recommends 365+ days."})]}),i.jsx("div",{className:"flex justify-end pt-2",children:i.jsxs(Fe,{variant:"primary",onClick:q,loading:r,children:[i.jsx(ug,{className:"w-3.5 h-3.5"}),"Save Settings"]})})]})}function zp({client:c}){const u=In(),{data:r,isLoading:o}=rt({queryKey:["settings"],queryFn:()=>c.getSettings()}),d=ql({mutationFn:y=>c.updateSettings(y),onSuccess:y=>{y.success&&u.invalidateQueries({queryKey:["settings"]})}});return i.jsxs("div",{children:[i.jsx(Ql,{title:"Settings",description:"System configuration and operational parameters."}),o?i.jsx("div",{className:"flex items-center justify-center py-16",children:i.jsx("div",{className:"w-5 h-5 border-2 border-zinc-700 border-t-indigo-500 rounded-full animate-spin"})}):r!=null&&r.success?i.jsx(Sp,{settings:r.data,onSave:y=>d.mutate(y),loading:d.isPending}):i.jsxs("div",{className:"bg-red-950/30 border border-red-800/50 rounded-xl p-5",children:[i.jsx("p",{className:"text-sm text-red-400",children:"Failed to load settings. Check that your KavachOS API is reachable."}),r&&!r.success&&i.jsxs("p",{className:"text-xs text-red-500 mt-1 font-mono",children:[r.error.code,": ",r.error.message]})]})]})}function Np({client:c,onNavigate:u}){const{data:r,isLoading:o}=rt({queryKey:["users"],queryFn:()=>c.getUsers()}),d=r!=null&&r.success?r.data:[];return i.jsxs("div",{children:[i.jsx(Ql,{title:"Users",description:"Users who own agent identities in this system."}),o?i.jsx("div",{className:"flex items-center justify-center py-16",children:i.jsx("div",{className:"w-5 h-5 border-2 border-zinc-700 border-t-indigo-500 rounded-full animate-spin"})}):d.length===0?i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"ID"}),i.jsx(Y,{children:"Email"}),i.jsx(Y,{children:"Name"}),i.jsx(Y,{children:"Agents"}),i.jsx(Y,{children:"Created"})]}),i.jsx(Yt,{children:i.jsx("tr",{children:i.jsx("td",{colSpan:5,children:i.jsx(ea,{icon:i.jsx(Ho,{className:"w-6 h-6"}),title:"No users found",description:"Users will appear here once agents are created."})})})})]}):i.jsxs(Bt,{children:[i.jsxs(Lt,{children:[i.jsx(Y,{children:"ID"}),i.jsx(Y,{children:"Email"}),i.jsx(Y,{children:"Name"}),i.jsx(Y,{children:"Agents"}),i.jsx(Y,{children:"Created"})]}),i.jsx(Yt,{children:d.map(y=>i.jsxs(Pn,{children:[i.jsx(oe,{children:i.jsx("code",{className:"text-xs font-mono text-zinc-500",children:y.id})}),i.jsx(oe,{children:i.jsx("span",{className:"text-xs text-zinc-200",children:y.email})}),i.jsx(oe,{children:i.jsx("span",{className:"text-xs text-zinc-400",children:y.name??"—"})}),i.jsx(oe,{children:i.jsx("button",{type:"button",onClick:()=>u("agents"),className:"inline-flex","aria-label":`View agents for ${y.email}`,children:i.jsx(el,{variant:y.agentCount>0?"indigo":"gray",children:y.agentCount})})}),i.jsx(oe,{children:i.jsx("span",{className:"text-xs text-zinc-500",children:new Date(y.createdAt).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})})})]},y.id))})]})]})}const Ap=new Pv({defaultOptions:{queries:{staleTime:3e4,retry:1,refetchOnWindowFocus:!1}}});function Ep({apiUrl:c,onLogout:u}){const[r,o]=k.useState("overview"),d=k.useMemo(()=>h1(c),[c]);function y(){switch(r){case"overview":return i.jsx(fp,{client:d,onNavigate:o});case"agents":return i.jsx(Vg,{client:d});case"users":return i.jsx(Np,{client:d,onNavigate:o});case"audit":return i.jsx(ep,{client:d});case"permissions":return i.jsx(pp,{client:d});case"delegations":return i.jsx(ap,{client:d});case"mcp-servers":return i.jsx(sp,{client:d});case"security":return i.jsx(jp,{client:d});case"settings":return i.jsx(zp,{client:d})}}return i.jsx(Dg,{currentPage:r,onNavigate:o,headerActions:i.jsx(Og,{onLogout:u}),children:y()})}function Tp({apiUrl:c,theme:u="dark"}){return i.jsx("div",{className:u==="dark"?"dark":"","data-kavachos-dashboard":!0,children:i.jsx(Cg,{apiUrl:c,children:r=>i.jsx(e1,{client:Ap,children:i.jsx(Ep,{apiUrl:c,onLogout:r})})})})}const Fm=document.getElementById("root");if(!Fm)throw new Error("Root element #root not found");Ov.createRoot(Fm).render(i.jsx(k.StrictMode,{children:i.jsx(Tp,{apiUrl:"http://localhost:3000",theme:"dark"})}));