recallx 1.0.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -1
- package/app/cli/src/cli.js +32 -1
- package/app/cli/src/format.js +24 -0
- package/app/mcp/index.js +2 -2
- package/app/mcp/server.js +523 -146
- package/app/server/app.js +413 -5
- package/app/server/config.js +4 -2
- package/app/server/index.js +12 -1
- package/app/server/observability.js +2 -0
- package/app/server/project-graph.js +13 -6
- package/app/server/repositories.js +178 -24
- package/app/server/sqlite-errors.js +10 -0
- package/app/server/workspace-import-helpers.js +161 -0
- package/app/server/workspace-import.js +572 -0
- package/app/server/workspace-ops.js +249 -0
- package/app/server/workspace-session.js +119 -7
- package/app/shared/contracts.js +41 -0
- package/app/shared/version.js +1 -1
- package/dist/renderer/assets/{ProjectGraphCanvas-BLmjIT0R.js → ProjectGraphCanvas-B9-L83dL.js} +1 -1
- package/dist/renderer/assets/index-CNeaY_5l.js +69 -0
- package/dist/renderer/assets/index-Dz33nPCb.css +1 -0
- package/dist/renderer/index.html +2 -2
- package/package.json +1 -1
- package/dist/renderer/assets/index-C2-KXqBO.css +0 -1
- package/dist/renderer/assets/index-CIY8bKYQ.js +0 -69
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var by=Object.defineProperty;var xy=(s,d,o)=>d in s?by(s,d,{enumerable:!0,configurable:!0,writable:!0,value:o}):s[d]=o;var Zr=(s,d,o)=>xy(s,typeof d!="symbol"?d+"":d,o);(function(){const d=document.createElement("link").relList;if(d&&d.supports&&d.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))r(p);new MutationObserver(p=>{for(const k of p)if(k.type==="childList")for(const A of k.addedNodes)A.tagName==="LINK"&&A.rel==="modulepreload"&&r(A)}).observe(document,{childList:!0,subtree:!0});function o(p){const k={};return p.integrity&&(k.integrity=p.integrity),p.referrerPolicy&&(k.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?k.credentials="include":p.crossOrigin==="anonymous"?k.credentials="omit":k.credentials="same-origin",k}function r(p){if(p.ep)return;p.ep=!0;const k=o(p);fetch(p.href,k)}})();function Vm(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Vr={exports:{}},Us={};/**
|
|
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 om;function jy(){if(om)return Us;om=1;var s=Symbol.for("react.transitional.element"),d=Symbol.for("react.fragment");function o(r,p,k){var A=null;if(k!==void 0&&(A=""+k),p.key!==void 0&&(A=""+p.key),"key"in p){k={};for(var H in p)H!=="key"&&(k[H]=p[H])}else k=p;return p=k.ref,{$$typeof:s,type:r,key:A,ref:p!==void 0?p:null,props:k}}return Us.Fragment=d,Us.jsx=o,Us.jsxs=o,Us}var rm;function Ny(){return rm||(rm=1,Vr.exports=jy()),Vr.exports}var n=Ny(),Kr={exports:{}},P={};/**
|
|
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 dm;function Sy(){if(dm)return P;dm=1;var s=Symbol.for("react.transitional.element"),d=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),A=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),w=Symbol.iterator;function Ge(b){return b===null||typeof b!="object"?null:(b=w&&b[w]||b["@@iterator"],typeof b=="function"?b:null)}var Ee={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},me=Object.assign,Fe={};function nt(b,D,L){this.props=b,this.context=D,this.refs=Fe,this.updater=L||Ee}nt.prototype.isReactComponent={},nt.prototype.setState=function(b,D){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,D,"setState")},nt.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function na(){}na.prototype=nt.prototype;function ke(b,D,L){this.props=b,this.context=D,this.refs=Fe,this.updater=L||Ee}var dt=ke.prototype=new na;dt.constructor=ke,me(dt,nt.prototype),dt.isPureReactComponent=!0;var le=Array.isArray;function Ve(){}var te={H:null,A:null,T:null,S:null},Le=Object.prototype.hasOwnProperty;function vt(b,D,L){var Y=L.ref;return{$$typeof:s,type:b,key:D,ref:Y!==void 0?Y:null,props:L}}function Nl(b,D){return vt(b.type,D,b.props)}function ca(b){return typeof b=="object"&&b!==null&&b.$$typeof===s}function jt(b){var D={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(L){return D[L]})}var ka=/\/+/g;function ba(b,D){return typeof b=="object"&&b!==null&&b.key!=null?jt(""+b.key):D.toString(36)}function Ht(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(Ve,Ve):(b.status="pending",b.then(function(D){b.status==="pending"&&(b.status="fulfilled",b.value=D)},function(D){b.status==="pending"&&(b.status="rejected",b.reason=D)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function z(b,D,L,Y,W){var F=typeof b;(F==="undefined"||F==="boolean")&&(b=null);var ce=!1;if(b===null)ce=!0;else switch(F){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(b.$$typeof){case s:case d:ce=!0;break;case Z:return ce=b._init,z(ce(b._payload),D,L,Y,W)}}if(ce)return W=W(b),ce=Y===""?"."+ba(b,0):Y,le(W)?(L="",ce!=null&&(L=ce.replace(ka,"$&/")+"/"),z(W,D,L,"",function(xa){return xa})):W!=null&&(ca(W)&&(W=Nl(W,L+(W.key==null||b&&b.key===W.key?"":(""+W.key).replace(ka,"$&/")+"/")+ce)),D.push(W)),1;ce=0;var Ke=Y===""?".":Y+":";if(le(b))for(var be=0;be<b.length;be++)Y=b[be],F=Ke+ba(Y,be),ce+=z(Y,D,L,F,W);else if(be=Ge(b),typeof be=="function")for(b=be.call(b),be=0;!(Y=b.next()).done;)Y=Y.value,F=Ke+ba(Y,be++),ce+=z(Y,D,L,F,W);else if(F==="object"){if(typeof b.then=="function")return z(Ht(b),D,L,Y,W);throw D=String(b),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return ce}function G(b,D,L){if(b==null)return b;var Y=[],W=0;return z(b,Y,"","",function(F){return D.call(L,F,W++)}),Y}function J(b){if(b._status===-1){var D=b._result;D=D(),D.then(function(L){(b._status===0||b._status===-1)&&(b._status=1,b._result=L)},function(L){(b._status===0||b._status===-1)&&(b._status=2,b._result=L)}),b._status===-1&&(b._status=0,b._result=D)}if(b._status===1)return b._result.default;throw b._result}var he=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)},I={map:G,forEach:function(b,D,L){G(b,function(){D.apply(this,arguments)},L)},count:function(b){var D=0;return G(b,function(){D++}),D},toArray:function(b){return G(b,function(D){return D})||[]},only:function(b){if(!ca(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};return P.Activity=j,P.Children=I,P.Component=nt,P.Fragment=o,P.Profiler=p,P.PureComponent=ke,P.StrictMode=r,P.Suspense=B,P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=te,P.__COMPILER_RUNTIME={__proto__:null,c:function(b){return te.H.useMemoCache(b)}},P.cache=function(b){return function(){return b.apply(null,arguments)}},P.cacheSignal=function(){return null},P.cloneElement=function(b,D,L){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var Y=me({},b.props),W=b.key;if(D!=null)for(F in D.key!==void 0&&(W=""+D.key),D)!Le.call(D,F)||F==="key"||F==="__self"||F==="__source"||F==="ref"&&D.ref===void 0||(Y[F]=D[F]);var F=arguments.length-2;if(F===1)Y.children=L;else if(1<F){for(var ce=Array(F),Ke=0;Ke<F;Ke++)ce[Ke]=arguments[Ke+2];Y.children=ce}return vt(b.type,W,Y)},P.createContext=function(b){return b={$$typeof:A,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:k,_context:b},b},P.createElement=function(b,D,L){var Y,W={},F=null;if(D!=null)for(Y in D.key!==void 0&&(F=""+D.key),D)Le.call(D,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(W[Y]=D[Y]);var ce=arguments.length-2;if(ce===1)W.children=L;else if(1<ce){for(var Ke=Array(ce),be=0;be<ce;be++)Ke[be]=arguments[be+2];W.children=Ke}if(b&&b.defaultProps)for(Y in ce=b.defaultProps,ce)W[Y]===void 0&&(W[Y]=ce[Y]);return vt(b,F,W)},P.createRef=function(){return{current:null}},P.forwardRef=function(b){return{$$typeof:H,render:b}},P.isValidElement=ca,P.lazy=function(b){return{$$typeof:Z,_payload:{_status:-1,_result:b},_init:J}},P.memo=function(b,D){return{$$typeof:g,type:b,compare:D===void 0?null:D}},P.startTransition=function(b){var D=te.T,L={};te.T=L;try{var Y=b(),W=te.S;W!==null&&W(L,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(Ve,he)}catch(F){he(F)}finally{D!==null&&L.types!==null&&(D.types=L.types),te.T=D}},P.unstable_useCacheRefresh=function(){return te.H.useCacheRefresh()},P.use=function(b){return te.H.use(b)},P.useActionState=function(b,D,L){return te.H.useActionState(b,D,L)},P.useCallback=function(b,D){return te.H.useCallback(b,D)},P.useContext=function(b){return te.H.useContext(b)},P.useDebugValue=function(){},P.useDeferredValue=function(b,D){return te.H.useDeferredValue(b,D)},P.useEffect=function(b,D){return te.H.useEffect(b,D)},P.useEffectEvent=function(b){return te.H.useEffectEvent(b)},P.useId=function(){return te.H.useId()},P.useImperativeHandle=function(b,D,L){return te.H.useImperativeHandle(b,D,L)},P.useInsertionEffect=function(b,D){return te.H.useInsertionEffect(b,D)},P.useLayoutEffect=function(b,D){return te.H.useLayoutEffect(b,D)},P.useMemo=function(b,D){return te.H.useMemo(b,D)},P.useOptimistic=function(b,D){return te.H.useOptimistic(b,D)},P.useReducer=function(b,D,L){return te.H.useReducer(b,D,L)},P.useRef=function(b){return te.H.useRef(b)},P.useState=function(b){return te.H.useState(b)},P.useSyncExternalStore=function(b,D,L){return te.H.useSyncExternalStore(b,D,L)},P.useTransition=function(){return te.H.useTransition()},P.version="19.2.4",P}var fm;function ud(){return fm||(fm=1,Kr.exports=Sy()),Kr.exports}var T=ud();const Ay=Vm(T);var Jr={exports:{}},ks={},Ir={exports:{}},$r={};/**
|
|
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 hm;function Ty(){return hm||(hm=1,(function(s){function d(z,G){var J=z.length;z.push(G);e:for(;0<J;){var he=J-1>>>1,I=z[he];if(0<p(I,G))z[he]=G,z[J]=I,J=he;else break e}}function o(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var G=z[0],J=z.pop();if(J!==G){z[0]=J;e:for(var he=0,I=z.length,b=I>>>1;he<b;){var D=2*(he+1)-1,L=z[D],Y=D+1,W=z[Y];if(0>p(L,J))Y<I&&0>p(W,L)?(z[he]=W,z[Y]=J,he=Y):(z[he]=L,z[D]=J,he=D);else if(Y<I&&0>p(W,J))z[he]=W,z[Y]=J,he=Y;else break e}}return G}function p(z,G){var J=z.sortIndex-G.sortIndex;return J!==0?J:z.id-G.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var k=performance;s.unstable_now=function(){return k.now()}}else{var A=Date,H=A.now();s.unstable_now=function(){return A.now()-H}}var B=[],g=[],Z=1,j=null,w=3,Ge=!1,Ee=!1,me=!1,Fe=!1,nt=typeof setTimeout=="function"?setTimeout:null,na=typeof clearTimeout=="function"?clearTimeout:null,ke=typeof setImmediate<"u"?setImmediate:null;function dt(z){for(var G=o(g);G!==null;){if(G.callback===null)r(g);else if(G.startTime<=z)r(g),G.sortIndex=G.expirationTime,d(B,G);else break;G=o(g)}}function le(z){if(me=!1,dt(z),!Ee)if(o(B)!==null)Ee=!0,Ve||(Ve=!0,jt());else{var G=o(g);G!==null&&Ht(le,G.startTime-z)}}var Ve=!1,te=-1,Le=5,vt=-1;function Nl(){return Fe?!0:!(s.unstable_now()-vt<Le)}function ca(){if(Fe=!1,Ve){var z=s.unstable_now();vt=z;var G=!0;try{e:{Ee=!1,me&&(me=!1,na(te),te=-1),Ge=!0;var J=w;try{t:{for(dt(z),j=o(B);j!==null&&!(j.expirationTime>z&&Nl());){var he=j.callback;if(typeof he=="function"){j.callback=null,w=j.priorityLevel;var I=he(j.expirationTime<=z);if(z=s.unstable_now(),typeof I=="function"){j.callback=I,dt(z),G=!0;break t}j===o(B)&&r(B),dt(z)}else r(B);j=o(B)}if(j!==null)G=!0;else{var b=o(g);b!==null&&Ht(le,b.startTime-z),G=!1}}break e}finally{j=null,w=J,Ge=!1}G=void 0}}finally{G?jt():Ve=!1}}}var jt;if(typeof ke=="function")jt=function(){ke(ca)};else if(typeof MessageChannel<"u"){var ka=new MessageChannel,ba=ka.port2;ka.port1.onmessage=ca,jt=function(){ba.postMessage(null)}}else jt=function(){nt(ca,0)};function Ht(z,G){te=nt(function(){z(s.unstable_now())},G)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(z){z.callback=null},s.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Le=0<z?Math.floor(1e3/z):5},s.unstable_getCurrentPriorityLevel=function(){return w},s.unstable_next=function(z){switch(w){case 1:case 2:case 3:var G=3;break;default:G=w}var J=w;w=G;try{return z()}finally{w=J}},s.unstable_requestPaint=function(){Fe=!0},s.unstable_runWithPriority=function(z,G){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var J=w;w=z;try{return G()}finally{w=J}},s.unstable_scheduleCallback=function(z,G,J){var he=s.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?he+J:he):J=he,z){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=J+I,z={id:Z++,callback:G,priorityLevel:z,startTime:J,expirationTime:I,sortIndex:-1},J>he?(z.sortIndex=J,d(g,z),o(B)===null&&z===o(g)&&(me?(na(te),te=-1):me=!0,Ht(le,J-he))):(z.sortIndex=I,d(B,z),Ee||Ge||(Ee=!0,Ve||(Ve=!0,jt()))),z},s.unstable_shouldYield=Nl,s.unstable_wrapCallback=function(z){var G=w;return function(){var J=w;w=G;try{return z.apply(this,arguments)}finally{w=J}}}})($r)),$r}var mm;function Ey(){return mm||(mm=1,Ir.exports=Ty()),Ir.exports}var Wr={exports:{}},kt={};/**
|
|
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 pm;function _y(){if(pm)return kt;pm=1;var s=ud();function d(B){var g="https://react.dev/errors/"+B;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var Z=2;Z<arguments.length;Z++)g+="&args[]="+encodeURIComponent(arguments[Z])}return"Minified React error #"+B+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var r={d:{f:o,r:function(){throw Error(d(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},p=Symbol.for("react.portal");function k(B,g,Z){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,key:j==null?null:""+j,children:B,containerInfo:g,implementation:Z}}var A=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function H(B,g){if(B==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,kt.createPortal=function(B,g){var Z=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(d(299));return k(B,g,null,Z)},kt.flushSync=function(B){var g=A.T,Z=r.p;try{if(A.T=null,r.p=2,B)return B()}finally{A.T=g,r.p=Z,r.d.f()}},kt.preconnect=function(B,g){typeof B=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(B,g))},kt.prefetchDNS=function(B){typeof B=="string"&&r.d.D(B)},kt.preinit=function(B,g){if(typeof B=="string"&&g&&typeof g.as=="string"){var Z=g.as,j=H(Z,g.crossOrigin),w=typeof g.integrity=="string"?g.integrity:void 0,Ge=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;Z==="style"?r.d.S(B,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:j,integrity:w,fetchPriority:Ge}):Z==="script"&&r.d.X(B,{crossOrigin:j,integrity:w,fetchPriority:Ge,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},kt.preinitModule=function(B,g){if(typeof B=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var Z=H(g.as,g.crossOrigin);r.d.M(B,{crossOrigin:Z,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(B)},kt.preload=function(B,g){if(typeof B=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var Z=g.as,j=H(Z,g.crossOrigin);r.d.L(B,Z,{crossOrigin:j,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},kt.preloadModule=function(B,g){if(typeof B=="string")if(g){var Z=H(g.as,g.crossOrigin);r.d.m(B,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:Z,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(B)},kt.requestFormReset=function(B){r.d.r(B)},kt.unstable_batchedUpdates=function(B,g){return B(g)},kt.useFormState=function(B,g,Z){return A.H.useFormState(B,g,Z)},kt.useFormStatus=function(){return A.H.useHostTransitionStatus()},kt.version="19.2.4",kt}var ym;function Cy(){if(ym)return Wr.exports;ym=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(d){console.error(d)}}return s(),Wr.exports=_y(),Wr.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 vm;function Oy(){if(vm)return ks;vm=1;var s=Ey(),d=ud(),o=Cy();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function p(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function k(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function A(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 H(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 B(e){if(k(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=k(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,l=t;;){var c=a.return;if(c===null)break;var i=c.alternate;if(i===null){if(l=c.return,l!==null){a=l;continue}break}if(c.child===i.child){for(i=c.child;i;){if(i===a)return B(c),e;if(i===l)return B(c),t;i=i.sibling}throw Error(r(188))}if(a.return!==l.return)a=c,l=i;else{for(var u=!1,m=c.child;m;){if(m===a){u=!0,a=c,l=i;break}if(m===l){u=!0,l=c,a=i;break}m=m.sibling}if(!u){for(m=i.child;m;){if(m===a){u=!0,a=i,l=c;break}if(m===l){u=!0,l=i,a=c;break}m=m.sibling}if(!u)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function Z(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Z(e),t!==null)return t;e=e.sibling}return null}var j=Object.assign,w=Symbol.for("react.element"),Ge=Symbol.for("react.transitional.element"),Ee=Symbol.for("react.portal"),me=Symbol.for("react.fragment"),Fe=Symbol.for("react.strict_mode"),nt=Symbol.for("react.profiler"),na=Symbol.for("react.consumer"),ke=Symbol.for("react.context"),dt=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),Ve=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),Le=Symbol.for("react.lazy"),vt=Symbol.for("react.activity"),Nl=Symbol.for("react.memo_cache_sentinel"),ca=Symbol.iterator;function jt(e){return e===null||typeof e!="object"?null:(e=ca&&e[ca]||e["@@iterator"],typeof e=="function"?e:null)}var ka=Symbol.for("react.client.reference");function ba(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ka?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case me:return"Fragment";case nt:return"Profiler";case Fe:return"StrictMode";case le:return"Suspense";case Ve:return"SuspenseList";case vt:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Ee:return"Portal";case ke:return e.displayName||"Context";case na:return(e._context.displayName||"Context")+".Consumer";case dt:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:ba(e.type)||"Memo";case Le:t=e._payload,e=e._init;try{return ba(e(t))}catch{}}return null}var Ht=Array.isArray,z=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},he=[],I=-1;function b(e){return{current:e}}function D(e){0>I||(e.current=he[I],he[I]=null,I--)}function L(e,t){I++,he[I]=e.current,e.current=t}var Y=b(null),W=b(null),F=b(null),ce=b(null);function Ke(e,t){switch(L(F,t),L(W,e),L(Y,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Mh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Mh(t),e=Dh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}D(Y),L(Y,e)}function be(){D(Y),D(W),D(F)}function xa(e){e.memoizedState!==null&&L(ce,e);var t=Y.current,a=Dh(t,e.type);t!==a&&(L(W,e),L(Y,a))}function jc(e){W.current===e&&(D(Y),D(W)),ce.current===e&&(D(ce),Rs._currentValue=J)}var Gn,ia;function Ba(e){if(Gn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Gn=t&&t[1]||"",ia=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Gn+e+ia}var Fa=!1;function Ln(e,t){if(!e||Fa)return"";Fa=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(O){var C=O}Reflect.construct(e,[],U)}else{try{U.call()}catch(O){C=O}e.call(U.prototype)}}else{try{throw Error()}catch(O){C=O}(U=e())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(O){if(O&&C&&typeof O.stack=="string")return[O.stack,C.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),u=i[0],m=i[1];if(u&&m){var y=u.split(`
|
|
44
|
+
`),_=m.split(`
|
|
45
|
+
`);for(c=l=0;l<y.length&&!y[l].includes("DetermineComponentFrameRoot");)l++;for(;c<_.length&&!_[c].includes("DetermineComponentFrameRoot");)c++;if(l===y.length||c===_.length)for(l=y.length-1,c=_.length-1;1<=l&&0<=c&&y[l]!==_[c];)c--;for(;1<=l&&0<=c;l--,c--)if(y[l]!==_[c]){if(l!==1||c!==1)do if(l--,c--,0>c||y[l]!==_[c]){var R=`
|
|
46
|
+
`+y[l].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=l&&0<=c);break}}}finally{Fa=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ba(a):""}function Ha(e,t){switch(e.tag){case 26:case 27:case 5:return Ba(e.type);case 16:return Ba("Lazy");case 13:return e.child!==t&&t!==null?Ba("Suspense Fallback"):Ba("Suspense");case 19:return Ba("SuspenseList");case 0:case 15:return Ln(e.type,!1);case 11:return Ln(e.type.render,!1);case 1:return Ln(e.type,!0);case 31:return Ba("Activity");default:return""}}function Nc(e){try{var t="",a=null;do t+=Ha(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var sa=Object.prototype.hasOwnProperty,qn=s.unstable_scheduleCallback,Sc=s.unstable_cancelCallback,Ls=s.unstable_shouldYield,Sl=s.unstable_requestPaint,ft=s.unstable_now,we=s.unstable_getCurrentPriorityLevel,wn=s.unstable_ImmediatePriority,Yn=s.unstable_UserBlockingPriority,Pa=s.unstable_NormalPriority,Ac=s.unstable_LowPriority,_i=s.unstable_IdlePriority,Al=s.log,Tc=s.unstable_setDisableYieldValue,Jl=null,Nt=null;function ja(e){if(typeof Al=="function"&&Tc(e),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(Jl,e)}catch{}}var Ot=Math.clz32?Math.clz32:Ys,qs=Math.log,ws=Math.LN2;function Ys(e){return e>>>=0,e===0?32:31-(qs(e)/ws|0)|0}var Tl=256,Xn=262144,ua=4194304;function el(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 Qn(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var c=0,i=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var m=l&134217727;return m!==0?(l=m&~i,l!==0?c=el(l):(u&=m,u!==0?c=el(u):a||(a=m&~e,a!==0&&(c=el(a))))):(m=l&~i,m!==0?c=el(m):u!==0?c=el(u):a||(a=l&~e,a!==0&&(c=el(a)))),c===0?0:t!==0&&t!==c&&(t&i)===0&&(i=c&-c,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:c}function El(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ci(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 Ec(){var e=ua;return ua<<=1,(ua&62914560)===0&&(ua=4194304),e}function _c(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Il(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Xs(e,t,a,l,c,i){var u=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var m=e.entanglements,y=e.expirationTimes,_=e.hiddenUpdates;for(a=u&~a;0<a;){var R=31-Ot(a),U=1<<R;m[R]=0,y[R]=-1;var C=_[R];if(C!==null)for(_[R]=null,R=0;R<C.length;R++){var O=C[R];O!==null&&(O.lane&=-536870913)}a&=~U}l!==0&&Oi(e,l,0),i!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=i&~(u&~t))}function Oi(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Ot(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Ri(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Ot(a),c=1<<l;c&t|e[l]&t&&(e[l]|=t),a&=~c}}function Cc(e,t){var a=t&-t;return a=(a&42)!==0?1:Oc(a),(a&(e.suspendedLanes|t))!==0?0:a}function Oc(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 Zn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function zi(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:am(e.type))}function Vn(e,t){var a=G.p;try{return G.p=e,t()}finally{G.p=a}}var tl=Math.random().toString(36).slice(2),Xe="__reactFiber$"+tl,gt="__reactProps$"+tl,Ga="__reactContainer$"+tl,ht="__reactEvents$"+tl,Qs="__reactListeners$"+tl,_l="__reactHandles$"+tl,Kn="__reactResources$"+tl,al="__reactMarker$"+tl;function Rc(e){delete e[Xe],delete e[gt],delete e[ht],delete e[Qs],delete e[_l]}function Cl(e){var t=e[Xe];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ga]||a[Xe]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=qh(e);e!==null;){if(a=e[Xe])return a;e=qh(e)}return t}e=a,a=e.parentNode}return null}function Na(e){if(e=e[Xe]||e[Ga]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Sa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ll(e){var t=e[Kn];return t||(t=e[Kn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Pe(e){e[al]=!0}var zc=new Set,Mi={};function nl(e,t){Rt(e,t),Rt(e+"Capture",t)}function Rt(e,t){for(Mi[e]=t,e=0;e<t.length;e++)zc.add(t[e])}var Zs=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]*$"),Vs={},et={};function Mc(e){return sa.call(et,e)?!0:sa.call(Vs,e)?!1:Zs.test(e)?et[e]=!0:(Vs[e]=!0,!1)}function St(e,t,a){if(Mc(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function $l(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function At(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Je(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wl(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cl(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(u){a=""+u,i.call(this,u)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(u){a=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jn(e){if(!e._valueTracker){var t=Wl(e)?"checked":"value";e._valueTracker=cl(e,t,""+e[t])}}function Fl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Wl(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function In(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 $n=/[\n"\\]/g;function Gt(e){return e.replace($n,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function zt(e,t,a,l,c,i,u,m){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Je(t)):e.value!==""+Je(t)&&(e.value=""+Je(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Dc(e,u,Je(t)):a!=null?Dc(e,u,Je(a)):l!=null&&e.removeAttribute("value"),c==null&&i!=null&&(e.defaultChecked=!!i),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Je(m):e.removeAttribute("name")}function Wn(e,t,a,l,c,i,u,m){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Jn(e);return}a=a!=null?""+Je(a):"",t=t!=null?""+Je(t):a,m||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=m?e.checked:!!l,e.defaultChecked=!!l,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),Jn(e)}function Dc(e,t,a){t==="number"&&In(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Jt(e,t,a,l){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Je(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Di(e,t,a){if(t!=null&&(t=""+Je(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Je(a):""}function Pl(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(r(92));if(Ht(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Je(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Jn(e)}function oa(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var en=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 tn(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||en.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function ct(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&a[c]!==l&&tn(e,c,l)}else for(var i in t)t.hasOwnProperty(i)&&tn(e,i,t[i])}function Uc(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 an=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"]]),Ks=/^[\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 kc(e){return Ks.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function La(){}var Fn=null;function Pn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var It=null,il=null;function Ui(e){var t=Na(e);if(t&&(e=t.stateNode)){var a=e[gt]||null;e:switch(e=t.stateNode,t.type){case"input":if(zt(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Gt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var c=l[gt]||null;if(!c)throw Error(r(90));zt(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Fl(l)}break e;case"textarea":Di(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Jt(e,!!a.multiple,t,!1)}}}var ln=!1;function qa(e,t,a){if(ln)return e(t,a);ln=!0;try{var l=e(t);return l}finally{if(ln=!1,(It!==null||il!==null)&&(Bu(),It&&(t=It,e=il,il=It=null,Ui(t),e)))for(t=0;t<e.length;t++)Ui(e[t])}}function Aa(e,t){var a=e.stateNode;if(a===null)return null;var l=a[gt]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var ra=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ec=!1;if(ra)try{var Qe={};Object.defineProperty(Qe,"passive",{get:function(){ec=!0}}),window.addEventListener("test",Qe,Qe),window.removeEventListener("test",Qe,Qe)}catch{ec=!1}var Ta=null,tc=null,nn=null;function Bc(){if(nn)return nn;var e,t=tc,a=t.length,l,c="value"in Ta?Ta.value:Ta.textContent,i=c.length;for(e=0;e<a&&t[e]===c[e];e++);var u=a-e;for(l=1;l<=u&&t[a-l]===c[i-l];l++);return nn=c.slice(e,1<l?1-l:void 0)}function Ol(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 Rl(){return!0}function Hc(){return!1}function xe(e){function t(a,l,c,i,u){this._reactName=a,this._targetInst=c,this.type=l,this.nativeEvent=i,this.target=u,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(a=e[m],this[m]=a?a(i):i[m]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Rl:Hc,this.isPropagationStopped=Hc,this}return j(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Rl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Rl)},persist:function(){},isPersistent:Rl}),t}var sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=xe(sl),_e=j({},sl,{view:0,detail:0}),ne=xe(_e),je,ul,Se,Lt=j({},_e,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rn,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!==Se&&(Se&&e.type==="mousemove"?(je=e.screenX-Se.screenX,ul=e.screenY-Se.screenY):ul=je=0,Se=e),je)},movementY:function(e){return"movementY"in e?e.movementY:ul}}),sn=xe(Lt),it=j({},Lt,{dataTransfer:0}),un=xe(it),ac=j({},_e,{relatedTarget:0}),Gc=xe(ac),lc=j({},sl,{animationName:0,elapsedTime:0,pseudoElement:0}),ki=xe(lc),wa=j({},sl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),on=xe(wa),Ce=j({},sl,{data:0}),Lc=xe(Ce),qc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Js={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"},Is={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $s(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Is[e])?!!t[e]:!1}function rn(){return $s}var wc=j({},_e,{key:function(e){if(e.key){var t=qc[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ol(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Js[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rn,charCode:function(e){return e.type==="keypress"?Ol(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ol(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Yc=xe(wc),Xc=j({},Lt,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bi=xe(Xc),Qc=j({},_e,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rn}),nc=xe(Qc),Zc=j({},sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ws=xe(Zc),Fs=j({},Lt,{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}),mt=xe(Fs),Hi=j({},sl,{newState:0,oldState:0}),Vc=xe(Hi),cc=[9,13,27,32],Kc=ra&&"CompositionEvent"in window,zl=null;ra&&"documentMode"in document&&(zl=document.documentMode);var ie=ra&&"TextEvent"in window&&!zl,Gi=ra&&(!Kc||zl&&8<zl&&11>=zl),Li=" ",Ea=!1;function dn(e,t){switch(e){case"keyup":return cc.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qi(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ol=!1;function wi(e,t){switch(e){case"compositionend":return qi(t);case"keypress":return t.which!==32?null:(Ea=!0,Li);case"textInput":return e=t.data,e===Li&&Ea?null:e;default:return null}}function _a(e,t){if(ol)return e==="compositionend"||!Kc&&dn(e,t)?(e=Bc(),nn=tc=Ta=null,ol=!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 Gi&&t.locale!=="ko"?null:t.data;default:return null}}var Ps={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 fn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ps[e.type]:t==="textarea"}function hn(e,t,a,l){It?il?il.push(l):il=[l]:It=l,t=Xu(t,"onChange"),0<t.length&&(a=new cn("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var ve=null,rl=null;function Ml(e){Eh(e,0)}function pt(e){var t=Sa(e);if(Fl(t))return e}function Yi(e,t){if(e==="change")return t}var Xi=!1;if(ra){var Qi;if(ra){var Jc="oninput"in document;if(!Jc){var eu=document.createElement("div");eu.setAttribute("oninput","return;"),Jc=typeof eu.oninput=="function"}Qi=Jc}else Qi=!1;Xi=Qi&&(!document.documentMode||9<document.documentMode)}function Ya(){ve&&(ve.detachEvent("onpropertychange",tu),rl=ve=null)}function tu(e){if(e.propertyName==="value"&&pt(rl)){var t=[];hn(t,rl,e,Pn(e)),qa(Ml,t)}}function ho(e,t,a){e==="focusin"?(Ya(),ve=t,rl=a,ve.attachEvent("onpropertychange",tu)):e==="focusout"&&Ya()}function mo(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pt(rl)}function hd(e,t){if(e==="click")return pt(t)}function au(e,t){if(e==="input"||e==="change")return pt(t)}function po(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:po;function ic(e,t){if(Tt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var c=a[l];if(!sa.call(t,c)||!Tt(e[c],t[c]))return!1}return!0}function sc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xa(e,t){var a=sc(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=sc(a)}}function lu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dl(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=In(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=In(e.document)}return t}function uc(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 Ic=ra&&"documentMode"in document&&11>=document.documentMode,dl=null,Ca=null,mn=null,Oa=!1;function fl(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Oa||dl==null||dl!==In(l)||(l=dl,"selectionStart"in l&&uc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),mn&&ic(mn,l)||(mn=l,l=Xu(Ca,"onSelect"),0<l.length&&(t=new cn("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=dl)))}function hl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var bt={animationend:hl("Animation","AnimationEnd"),animationiteration:hl("Animation","AnimationIteration"),animationstart:hl("Animation","AnimationStart"),transitionrun:hl("Transition","TransitionRun"),transitionstart:hl("Transition","TransitionStart"),transitioncancel:hl("Transition","TransitionCancel"),transitionend:hl("Transition","TransitionEnd")},Qa={},$c={};ra&&($c=document.createElement("div").style,"AnimationEvent"in window||(delete bt.animationend.animation,delete bt.animationiteration.animation,delete bt.animationstart.animation),"TransitionEvent"in window||delete bt.transitionend.transition);function Ie(e){if(Qa[e])return Qa[e];if(!bt[e])return e;var t=bt[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in $c)return Qa[e]=t[a];return e}var Mt=Ie("animationend"),Zi=Ie("animationiteration"),Vi=Ie("animationstart"),nu=Ie("transitionrun"),cu=Ie("transitionstart"),iu=Ie("transitioncancel"),Ki=Ie("transitionend"),Wc=new Map,tt="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(" ");tt.push("scrollEnd");function $t(e,t){Wc.set(e,t),nl(t,[e])}var pn=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)},Dt=[],yn=0,Ji=0;function Fc(){for(var e=yn,t=Ji=yn=0;t<e;){var a=Dt[t];Dt[t++]=null;var l=Dt[t];Dt[t++]=null;var c=Dt[t];Dt[t++]=null;var i=Dt[t];if(Dt[t++]=null,l!==null&&c!==null){var u=l.pending;u===null?c.next=c:(c.next=u.next,u.next=c),l.pending=c}i!==0&&su(a,c,i)}}function oc(e,t,a,l){Dt[yn++]=e,Dt[yn++]=t,Dt[yn++]=a,Dt[yn++]=l,Ji|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ii(e,t,a,l){return oc(e,t,a,l),Pc(e)}function Za(e,t){return oc(e,null,null,t),Pc(e)}function su(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var c=!1,i=e.return;i!==null;)i.childLanes|=a,l=i.alternate,l!==null&&(l.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(c=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,c&&t!==null&&(c=31-Ot(a),e=i.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=a|536870912),i):null}function Pc(e){if(50<Ss)throw Ss=0,pr=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var vn={};function yo(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(e,t,a,l){return new yo(e,t,a,l)}function ml(e){return e=e.prototype,!(!e||!e.isReactComponent)}function da(e,t){var a=e.alternate;return a===null?(a=Ut(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function uu(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ei(e,t,a,l,c,i){var u=0;if(l=e,typeof e=="function")ml(e)&&(u=1);else if(typeof e=="string")u=sy(e,a,Y.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case vt:return e=Ut(31,a,t,c),e.elementType=vt,e.lanes=i,e;case me:return pl(a.children,c,i,t);case Fe:u=8,c|=24;break;case nt:return e=Ut(12,a,t,c|2),e.elementType=nt,e.lanes=i,e;case le:return e=Ut(13,a,t,c),e.elementType=le,e.lanes=i,e;case Ve:return e=Ut(19,a,t,c),e.elementType=Ve,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ke:u=10;break e;case na:u=9;break e;case dt:u=11;break e;case te:u=14;break e;case Le:u=16,l=null;break e}u=29,a=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=Ut(u,a,t,c),t.elementType=e,t.type=l,t.lanes=i,t}function pl(e,t,a,l){return e=Ut(7,e,l,t),e.lanes=a,e}function $i(e,t,a){return e=Ut(6,e,null,t),e.lanes=a,e}function Wi(e){var t=Ut(18,null,null,0);return t.stateNode=e,t}function Fi(e,t,a){return t=Ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ou=new WeakMap;function Wt(e,t){if(typeof e=="object"&&e!==null){var a=ou.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Nc(t)},ou.set(e,t),t)}return{value:e,source:t,stack:Nc(t)}}var fa=[],Oe=0,rc=null,Va=0,Et=[],qt=0,yl=null,wt=1,Ra="";function Ft(e,t){fa[Oe++]=Va,fa[Oe++]=rc,rc=e,Va=t}function Pi(e,t,a){Et[qt++]=wt,Et[qt++]=Ra,Et[qt++]=yl,yl=e;var l=wt;e=Ra;var c=32-Ot(l)-1;l&=~(1<<c),a+=1;var i=32-Ot(t)+c;if(30<i){var u=c-c%5;i=(l&(1<<u)-1).toString(32),l>>=u,c-=u,wt=1<<32-Ot(t)+c|a<<c|l,Ra=i+e}else wt=1<<i|a<<c|l,Ra=e}function es(e){e.return!==null&&(Ft(e,1),Pi(e,1,0))}function ti(e){for(;e===rc;)rc=fa[--Oe],fa[Oe]=null,Va=fa[--Oe],fa[Oe]=null;for(;e===yl;)yl=Et[--qt],Et[qt]=null,Ra=Et[--qt],Et[qt]=null,wt=Et[--qt],Et[qt]=null}function dc(e,t){Et[qt++]=wt,Et[qt++]=Ra,Et[qt++]=yl,wt=t.id,Ra=t.overflow,yl=e}var Be=null,Re=null,se=!1,Ka=null,Yt=!1,ts=Error(r(519));function ha(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gn(Wt(t,e)),ts}function as(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Xe]=e,t[gt]=l,a){case"dialog":oe("cancel",t),oe("close",t);break;case"iframe":case"object":case"embed":oe("load",t);break;case"video":case"audio":for(a=0;a<Ts.length;a++)oe(Ts[a],t);break;case"source":oe("error",t);break;case"img":case"image":case"link":oe("error",t),oe("load",t);break;case"details":oe("toggle",t);break;case"input":oe("invalid",t),Wn(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":oe("invalid",t);break;case"textarea":oe("invalid",t),Pl(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Rh(t.textContent,a)?(l.popover!=null&&(oe("beforetoggle",t),oe("toggle",t)),l.onScroll!=null&&oe("scroll",t),l.onScrollEnd!=null&&oe("scrollend",t),l.onClick!=null&&(t.onclick=La),t=!0):t=!1,t||ha(e,!0)}function ls(e){for(Be=e.return;Be;)switch(Be.tag){case 5:case 31:case 13:Yt=!1;return;case 27:case 3:Yt=!0;return;default:Be=Be.return}}function Ul(e){if(e!==Be)return!1;if(!se)return ls(e),se=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Rr(e.type,e.memoizedProps)),a=!a),a&&Re&&ha(e),ls(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Re=Lh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Re=Lh(e)}else t===27?(t=Re,zn(e.type)?(e=kr,kr=null,Re=e):Re=t):Re=Be?Da(e.stateNode.nextSibling):null;return!0}function vl(){Re=Be=null,se=!1}function ai(){var e=Ka;return e!==null&&(aa===null?aa=e:aa.push.apply(aa,e),Ka=null),e}function gn(e){Ka===null?Ka=[e]:Ka.push(e)}var li=b(null),gl=null,za=null;function h(e,t,a){L(li,t._currentValue),t._currentValue=a}function v(e){e._currentValue=li.current,D(li)}function S(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function q(e,t,a,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var i=c.dependencies;if(i!==null){var u=c.child;i=i.firstContext;e:for(;i!==null;){var m=i;i=c;for(var y=0;y<t.length;y++)if(m.context===t[y]){i.lanes|=a,m=i.alternate,m!==null&&(m.lanes|=a),S(i.return,a,e),l||(u=null);break e}i=m.next}}else if(c.tag===18){if(u=c.return,u===null)throw Error(r(341));u.lanes|=a,i=u.alternate,i!==null&&(i.lanes|=a),S(u,a,e),u=null}else u=c.child;if(u!==null)u.return=c;else for(u=c;u!==null;){if(u===e){u=null;break}if(c=u.sibling,c!==null){c.return=u.return,u=c;break}u=u.return}c=u}}function V(e,t,a,l){e=null;for(var c=t,i=!1;c!==null;){if(!i){if((c.flags&524288)!==0)i=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var u=c.alternate;if(u===null)throw Error(r(387));if(u=u.memoizedProps,u!==null){var m=c.type;Tt(c.pendingProps.value,u.value)||(e!==null?e.push(m):e=[m])}}else if(c===ce.current){if(u=c.alternate,u===null)throw Error(r(387));u.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Rs):e=[Rs])}c=c.return}e!==null&&q(t,e,a,l),t.flags|=262144}function f(e){for(e=e.firstContext;e!==null;){if(!Tt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fe(e){gl=e,za=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ze(e){return md(gl,e)}function Ja(e,t){return gl===null&&fe(e),md(e,t)}function md(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},za===null){if(e===null)throw Error(r(308));za=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else za=za.next=t;return a}var lp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},np=s.unstable_scheduleCallback,cp=s.unstable_NormalPriority,st={$$typeof:ke,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vo(){return{controller:new lp,data:new Map,refCount:0}}function ns(e){e.refCount--,e.refCount===0&&np(cp,function(){e.controller.abort()})}var cs=null,go=0,ni=0,ci=null;function ip(e,t){if(cs===null){var a=cs=[];go=0,ni=jr(),ci={status:"pending",value:void 0,then:function(l){a.push(l)}}}return go++,t.then(pd,pd),t}function pd(){if(--go===0&&cs!==null){ci!==null&&(ci.status="fulfilled");var e=cs;cs=null,ni=0,ci=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function sp(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),l}var yd=z.S;z.S=function(e,t){eh=ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ip(e,t),yd!==null&&yd(e,t)};var fc=b(null);function bo(){var e=fc.current;return e!==null?e:He.pooledCache}function ru(e,t){t===null?L(fc,fc.current):L(fc,t.pool)}function vd(){var e=bo();return e===null?null:{parent:st._currentValue,pool:e}}var ii=Error(r(460)),xo=Error(r(474)),du=Error(r(542)),fu={then:function(){}};function gd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bd(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(La,La),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,jd(e),e;default:if(typeof t.status=="string")t.then(La,La);else{if(e=He,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,jd(e),e}throw mc=t,ii}}function hc(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(mc=a,ii):a}}var mc=null;function xd(){if(mc===null)throw Error(r(459));var e=mc;return mc=null,e}function jd(e){if(e===ii||e===du)throw Error(r(483))}var si=null,is=0;function hu(e){var t=is;return is+=1,si===null&&(si=[]),bd(si,e,t)}function ss(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function mu(e,t){throw t.$$typeof===w?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Nd(e){function t(N,x){if(e){var E=N.deletions;E===null?(N.deletions=[x],N.flags|=16):E.push(x)}}function a(N,x){if(!e)return null;for(;x!==null;)t(N,x),x=x.sibling;return null}function l(N){for(var x=new Map;N!==null;)N.key!==null?x.set(N.key,N):x.set(N.index,N),N=N.sibling;return x}function c(N,x){return N=da(N,x),N.index=0,N.sibling=null,N}function i(N,x,E){return N.index=E,e?(E=N.alternate,E!==null?(E=E.index,E<x?(N.flags|=67108866,x):E):(N.flags|=67108866,x)):(N.flags|=1048576,x)}function u(N){return e&&N.alternate===null&&(N.flags|=67108866),N}function m(N,x,E,M){return x===null||x.tag!==6?(x=$i(E,N.mode,M),x.return=N,x):(x=c(x,E),x.return=N,x)}function y(N,x,E,M){var K=E.type;return K===me?R(N,x,E.props.children,M,E.key):x!==null&&(x.elementType===K||typeof K=="object"&&K!==null&&K.$$typeof===Le&&hc(K)===x.type)?(x=c(x,E.props),ss(x,E),x.return=N,x):(x=ei(E.type,E.key,E.props,null,N.mode,M),ss(x,E),x.return=N,x)}function _(N,x,E,M){return x===null||x.tag!==4||x.stateNode.containerInfo!==E.containerInfo||x.stateNode.implementation!==E.implementation?(x=Fi(E,N.mode,M),x.return=N,x):(x=c(x,E.children||[]),x.return=N,x)}function R(N,x,E,M,K){return x===null||x.tag!==7?(x=pl(E,N.mode,M,K),x.return=N,x):(x=c(x,E),x.return=N,x)}function U(N,x,E){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return x=$i(""+x,N.mode,E),x.return=N,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ge:return E=ei(x.type,x.key,x.props,null,N.mode,E),ss(E,x),E.return=N,E;case Ee:return x=Fi(x,N.mode,E),x.return=N,x;case Le:return x=hc(x),U(N,x,E)}if(Ht(x)||jt(x))return x=pl(x,N.mode,E,null),x.return=N,x;if(typeof x.then=="function")return U(N,hu(x),E);if(x.$$typeof===ke)return U(N,Ja(N,x),E);mu(N,x)}return null}function C(N,x,E,M){var K=x!==null?x.key:null;if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return K!==null?null:m(N,x,""+E,M);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ge:return E.key===K?y(N,x,E,M):null;case Ee:return E.key===K?_(N,x,E,M):null;case Le:return E=hc(E),C(N,x,E,M)}if(Ht(E)||jt(E))return K!==null?null:R(N,x,E,M,null);if(typeof E.then=="function")return C(N,x,hu(E),M);if(E.$$typeof===ke)return C(N,x,Ja(N,E),M);mu(N,E)}return null}function O(N,x,E,M,K){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return N=N.get(E)||null,m(x,N,""+M,K);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case Ge:return N=N.get(M.key===null?E:M.key)||null,y(x,N,M,K);case Ee:return N=N.get(M.key===null?E:M.key)||null,_(x,N,M,K);case Le:return M=hc(M),O(N,x,E,M,K)}if(Ht(M)||jt(M))return N=N.get(E)||null,R(x,N,M,K,null);if(typeof M.then=="function")return O(N,x,E,hu(M),K);if(M.$$typeof===ke)return O(N,x,E,Ja(x,M),K);mu(x,M)}return null}function X(N,x,E,M){for(var K=null,pe=null,Q=x,ae=x=0,de=null;Q!==null&&ae<E.length;ae++){Q.index>ae?(de=Q,Q=null):de=Q.sibling;var ye=C(N,Q,E[ae],M);if(ye===null){Q===null&&(Q=de);break}e&&Q&&ye.alternate===null&&t(N,Q),x=i(ye,x,ae),pe===null?K=ye:pe.sibling=ye,pe=ye,Q=de}if(ae===E.length)return a(N,Q),se&&Ft(N,ae),K;if(Q===null){for(;ae<E.length;ae++)Q=U(N,E[ae],M),Q!==null&&(x=i(Q,x,ae),pe===null?K=Q:pe.sibling=Q,pe=Q);return se&&Ft(N,ae),K}for(Q=l(Q);ae<E.length;ae++)de=O(Q,N,ae,E[ae],M),de!==null&&(e&&de.alternate!==null&&Q.delete(de.key===null?ae:de.key),x=i(de,x,ae),pe===null?K=de:pe.sibling=de,pe=de);return e&&Q.forEach(function(Bn){return t(N,Bn)}),se&&Ft(N,ae),K}function $(N,x,E,M){if(E==null)throw Error(r(151));for(var K=null,pe=null,Q=x,ae=x=0,de=null,ye=E.next();Q!==null&&!ye.done;ae++,ye=E.next()){Q.index>ae?(de=Q,Q=null):de=Q.sibling;var Bn=C(N,Q,ye.value,M);if(Bn===null){Q===null&&(Q=de);break}e&&Q&&Bn.alternate===null&&t(N,Q),x=i(Bn,x,ae),pe===null?K=Bn:pe.sibling=Bn,pe=Bn,Q=de}if(ye.done)return a(N,Q),se&&Ft(N,ae),K;if(Q===null){for(;!ye.done;ae++,ye=E.next())ye=U(N,ye.value,M),ye!==null&&(x=i(ye,x,ae),pe===null?K=ye:pe.sibling=ye,pe=ye);return se&&Ft(N,ae),K}for(Q=l(Q);!ye.done;ae++,ye=E.next())ye=O(Q,N,ae,ye.value,M),ye!==null&&(e&&ye.alternate!==null&&Q.delete(ye.key===null?ae:ye.key),x=i(ye,x,ae),pe===null?K=ye:pe.sibling=ye,pe=ye);return e&&Q.forEach(function(gy){return t(N,gy)}),se&&Ft(N,ae),K}function Ue(N,x,E,M){if(typeof E=="object"&&E!==null&&E.type===me&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case Ge:e:{for(var K=E.key;x!==null;){if(x.key===K){if(K=E.type,K===me){if(x.tag===7){a(N,x.sibling),M=c(x,E.props.children),M.return=N,N=M;break e}}else if(x.elementType===K||typeof K=="object"&&K!==null&&K.$$typeof===Le&&hc(K)===x.type){a(N,x.sibling),M=c(x,E.props),ss(M,E),M.return=N,N=M;break e}a(N,x);break}else t(N,x);x=x.sibling}E.type===me?(M=pl(E.props.children,N.mode,M,E.key),M.return=N,N=M):(M=ei(E.type,E.key,E.props,null,N.mode,M),ss(M,E),M.return=N,N=M)}return u(N);case Ee:e:{for(K=E.key;x!==null;){if(x.key===K)if(x.tag===4&&x.stateNode.containerInfo===E.containerInfo&&x.stateNode.implementation===E.implementation){a(N,x.sibling),M=c(x,E.children||[]),M.return=N,N=M;break e}else{a(N,x);break}else t(N,x);x=x.sibling}M=Fi(E,N.mode,M),M.return=N,N=M}return u(N);case Le:return E=hc(E),Ue(N,x,E,M)}if(Ht(E))return X(N,x,E,M);if(jt(E)){if(K=jt(E),typeof K!="function")throw Error(r(150));return E=K.call(E),$(N,x,E,M)}if(typeof E.then=="function")return Ue(N,x,hu(E),M);if(E.$$typeof===ke)return Ue(N,x,Ja(N,E),M);mu(N,E)}return typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint"?(E=""+E,x!==null&&x.tag===6?(a(N,x.sibling),M=c(x,E),M.return=N,N=M):(a(N,x),M=$i(E,N.mode,M),M.return=N,N=M),u(N)):a(N,x)}return function(N,x,E,M){try{is=0;var K=Ue(N,x,E,M);return si=null,K}catch(Q){if(Q===ii||Q===du)throw Q;var pe=Ut(29,Q,null,N.mode);return pe.lanes=M,pe.return=N,pe}finally{}}}var pc=Nd(!0),Sd=Nd(!1),bn=!1;function jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function No(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 xn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function jn(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ge&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Pc(e),su(e,null,a),t}return oc(e,l,t,a),Pc(e)}function us(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Ri(e,a)}}function So(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var c=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var u={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?c=i=u:i=i.next=u,a=a.next}while(a!==null);i===null?c=i=t:i=i.next=t}else c=i=t;a={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Ao=!1;function os(){if(Ao){var e=ci;if(e!==null)throw e}}function rs(e,t,a,l){Ao=!1;var c=e.updateQueue;bn=!1;var i=c.firstBaseUpdate,u=c.lastBaseUpdate,m=c.shared.pending;if(m!==null){c.shared.pending=null;var y=m,_=y.next;y.next=null,u===null?i=_:u.next=_,u=y;var R=e.alternate;R!==null&&(R=R.updateQueue,m=R.lastBaseUpdate,m!==u&&(m===null?R.firstBaseUpdate=_:m.next=_,R.lastBaseUpdate=y))}if(i!==null){var U=c.baseState;u=0,R=_=y=null,m=i;do{var C=m.lane&-536870913,O=C!==m.lane;if(O?(re&C)===C:(l&C)===C){C!==0&&C===ni&&(Ao=!0),R!==null&&(R=R.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var X=e,$=m;C=t;var Ue=a;switch($.tag){case 1:if(X=$.payload,typeof X=="function"){U=X.call(Ue,U,C);break e}U=X;break e;case 3:X.flags=X.flags&-65537|128;case 0:if(X=$.payload,C=typeof X=="function"?X.call(Ue,U,C):X,C==null)break e;U=j({},U,C);break e;case 2:bn=!0}}C=m.callback,C!==null&&(e.flags|=64,O&&(e.flags|=8192),O=c.callbacks,O===null?c.callbacks=[C]:O.push(C))}else O={lane:C,tag:m.tag,payload:m.payload,callback:m.callback,next:null},R===null?(_=R=O,y=U):R=R.next=O,u|=C;if(m=m.next,m===null){if(m=c.shared.pending,m===null)break;O=m,m=O.next,O.next=null,c.lastBaseUpdate=O,c.shared.pending=null}}while(!0);R===null&&(y=U),c.baseState=y,c.firstBaseUpdate=_,c.lastBaseUpdate=R,i===null&&(c.shared.lanes=0),En|=u,e.lanes=u,e.memoizedState=U}}function Ad(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Td(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Ad(a[e],t)}var ui=b(null),pu=b(0);function Ed(e,t){e=Xl,L(pu,e),L(ui,t),Xl=e|t.baseLanes}function To(){L(pu,Xl),L(ui,ui.current)}function Eo(){Xl=pu.current,D(ui),D(pu)}var ma=b(null),Ma=null;function Nn(e){var t=e.alternate;L(at,at.current&1),L(ma,e),Ma===null&&(t===null||ui.current!==null||t.memoizedState!==null)&&(Ma=e)}function _o(e){L(at,at.current),L(ma,e),Ma===null&&(Ma=e)}function _d(e){e.tag===22?(L(at,at.current),L(ma,e),Ma===null&&(Ma=e)):Sn()}function Sn(){L(at,at.current),L(ma,ma.current)}function pa(e){D(ma),Ma===e&&(Ma=null),D(at)}var at=b(0);function yu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Dr(a)||Ur(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var kl=0,ee=null,Me=null,ut=null,vu=!1,oi=!1,yc=!1,gu=0,ds=0,ri=null,up=0;function $e(){throw Error(r(321))}function Co(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Tt(e[a],t[a]))return!1;return!0}function Oo(e,t,a,l,c,i){return kl=i,ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?df:Qo,yc=!1,i=a(l,c),yc=!1,oi&&(i=Od(t,a,l,c)),Cd(e),i}function Cd(e){z.H=ms;var t=Me!==null&&Me.next!==null;if(kl=0,ut=Me=ee=null,vu=!1,ds=0,ri=null,t)throw Error(r(300));e===null||ot||(e=e.dependencies,e!==null&&f(e)&&(ot=!0))}function Od(e,t,a,l){ee=e;var c=0;do{if(oi&&(ri=null),ds=0,oi=!1,25<=c)throw Error(r(301));if(c+=1,ut=Me=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}z.H=ff,i=t(a,l)}while(oi);return i}function op(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?fs(t):t,e=e.useState()[0],(Me!==null?Me.memoizedState:null)!==e&&(ee.flags|=1024),t}function Ro(){var e=gu!==0;return gu=0,e}function zo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Mo(e){if(vu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vu=!1}kl=0,ut=Me=ee=null,oi=!1,ds=gu=0,ri=null}function Xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ut===null?ee.memoizedState=ut=e:ut=ut.next=e,ut}function lt(){if(Me===null){var e=ee.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=ut===null?ee.memoizedState:ut.next;if(t!==null)ut=t,Me=e;else{if(e===null)throw ee.alternate===null?Error(r(467)):Error(r(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},ut===null?ee.memoizedState=ut=e:ut=ut.next=e}return ut}function bu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fs(e){var t=ds;return ds+=1,ri===null&&(ri=[]),e=bd(ri,e,t),t=ee,(ut===null?t.memoizedState:ut.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?df:Qo),e}function xu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return fs(e);if(e.$$typeof===ke)return ze(e)}throw Error(r(438,String(e)))}function Do(e){var t=null,a=ee.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ee.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=bu(),ee.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=Nl;return t.index++,a}function Bl(e,t){return typeof t=="function"?t(e):t}function ju(e){var t=lt();return Uo(t,Me,e)}function Uo(e,t,a){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var c=e.baseQueue,i=l.pending;if(i!==null){if(c!==null){var u=c.next;c.next=i.next,i.next=u}t.baseQueue=c=i,l.pending=null}if(i=e.baseState,c===null)e.memoizedState=i;else{t=c.next;var m=u=null,y=null,_=t,R=!1;do{var U=_.lane&-536870913;if(U!==_.lane?(re&U)===U:(kl&U)===U){var C=_.revertLane;if(C===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),U===ni&&(R=!0);else if((kl&C)===C){_=_.next,C===ni&&(R=!0);continue}else U={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},y===null?(m=y=U,u=i):y=y.next=U,ee.lanes|=C,En|=C;U=_.action,yc&&a(i,U),i=_.hasEagerState?_.eagerState:a(i,U)}else C={lane:U,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},y===null?(m=y=C,u=i):y=y.next=C,ee.lanes|=U,En|=U;_=_.next}while(_!==null&&_!==t);if(y===null?u=i:y.next=m,!Tt(i,e.memoizedState)&&(ot=!0,R&&(a=ci,a!==null)))throw a;e.memoizedState=i,e.baseState=u,e.baseQueue=y,l.lastRenderedState=i}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function ko(e){var t=lt(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var l=a.dispatch,c=a.pending,i=t.memoizedState;if(c!==null){a.pending=null;var u=c=c.next;do i=e(i,u.action),u=u.next;while(u!==c);Tt(i,t.memoizedState)||(ot=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function Rd(e,t,a){var l=ee,c=lt(),i=se;if(i){if(a===void 0)throw Error(r(407));a=a()}else a=t();var u=!Tt((Me||c).memoizedState,a);if(u&&(c.memoizedState=a,ot=!0),c=c.queue,Go(Dd.bind(null,l,c,e),[e]),c.getSnapshot!==t||u||ut!==null&&ut.memoizedState.tag&1){if(l.flags|=2048,di(9,{destroy:void 0},Md.bind(null,l,c,a,t),null),He===null)throw Error(r(349));i||(kl&127)!==0||zd(l,t,a)}return a}function zd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ee.updateQueue,t===null?(t=bu(),ee.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Md(e,t,a,l){t.value=a,t.getSnapshot=l,Ud(t)&&kd(e)}function Dd(e,t,a){return a(function(){Ud(t)&&kd(e)})}function Ud(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Tt(e,a)}catch{return!0}}function kd(e){var t=Za(e,2);t!==null&&la(t,e,2)}function Bo(e){var t=Xt();if(typeof e=="function"){var a=e;if(e=a(),yc){ja(!0);try{a()}finally{ja(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bl,lastRenderedState:e},t}function Bd(e,t,a,l){return e.baseState=a,Uo(e,Me,typeof l=="function"?l:Bl)}function rp(e,t,a,l,c){if(Au(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){i.listeners.push(u)}};z.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,Hd(t,i)):(i.next=a.next,t.pending=a.next=i)}}function Hd(e,t){var a=t.action,l=t.payload,c=e.state;if(t.isTransition){var i=z.T,u={};z.T=u;try{var m=a(c,l),y=z.S;y!==null&&y(u,m),Gd(e,t,m)}catch(_){Ho(e,t,_)}finally{i!==null&&u.types!==null&&(i.types=u.types),z.T=i}}else try{i=a(c,l),Gd(e,t,i)}catch(_){Ho(e,t,_)}}function Gd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Ld(e,t,l)},function(l){return Ho(e,t,l)}):Ld(e,t,a)}function Ld(e,t,a){t.status="fulfilled",t.value=a,qd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Hd(e,a)))}function Ho(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,qd(t),t=t.next;while(t!==l)}e.action=null}function qd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function wd(e,t){return t}function Yd(e,t){if(se){var a=He.formState;if(a!==null){e:{var l=ee;if(se){if(Re){t:{for(var c=Re,i=Yt;c.nodeType!==8;){if(!i){c=null;break t}if(c=Da(c.nextSibling),c===null){c=null;break t}}i=c.data,c=i==="F!"||i==="F"?c:null}if(c){Re=Da(c.nextSibling),l=c.data==="F!";break e}}ha(l)}l=!1}l&&(t=a[0])}}return a=Xt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wd,lastRenderedState:t},a.queue=l,a=uf.bind(null,ee,l),l.dispatch=a,l=Bo(!1),i=Xo.bind(null,ee,!1,l.queue),l=Xt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,a=rp.bind(null,ee,c,i,a),c.dispatch=a,l.memoizedState=e,[t,a,!1]}function Xd(e){var t=lt();return Qd(t,Me,e)}function Qd(e,t,a){if(t=Uo(e,t,wd)[0],e=ju(Bl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=fs(t)}catch(u){throw u===ii?du:u}else l=t;t=lt();var c=t.queue,i=c.dispatch;return a!==t.memoizedState&&(ee.flags|=2048,di(9,{destroy:void 0},dp.bind(null,c,a),null)),[l,i,e]}function dp(e,t){e.action=t}function Zd(e){var t=lt(),a=Me;if(a!==null)return Qd(t,a,e);lt(),t=t.memoizedState,a=lt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function di(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ee.updateQueue,t===null&&(t=bu(),ee.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Vd(){return lt().memoizedState}function Nu(e,t,a,l){var c=Xt();ee.flags|=e,c.memoizedState=di(1|t,{destroy:void 0},a,l===void 0?null:l)}function Su(e,t,a,l){var c=lt();l=l===void 0?null:l;var i=c.memoizedState.inst;Me!==null&&l!==null&&Co(l,Me.memoizedState.deps)?c.memoizedState=di(t,i,a,l):(ee.flags|=e,c.memoizedState=di(1|t,i,a,l))}function Kd(e,t){Nu(8390656,8,e,t)}function Go(e,t){Su(2048,8,e,t)}function fp(e){ee.flags|=4;var t=ee.updateQueue;if(t===null)t=bu(),ee.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Jd(e){var t=lt().memoizedState;return fp({ref:t,nextImpl:e}),function(){if((ge&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Id(e,t){return Su(4,2,e,t)}function $d(e,t){return Su(4,4,e,t)}function Wd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Fd(e,t,a){a=a!=null?a.concat([e]):null,Su(4,4,Wd.bind(null,t,e),a)}function Lo(){}function Pd(e,t){var a=lt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Co(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function ef(e,t){var a=lt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Co(t,l[1]))return l[0];if(l=e(),yc){ja(!0);try{e()}finally{ja(!1)}}return a.memoizedState=[l,t],l}function qo(e,t,a){return a===void 0||(kl&1073741824)!==0&&(re&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=ah(),ee.lanes|=e,En|=e,a)}function tf(e,t,a,l){return Tt(a,t)?a:ui.current!==null?(e=qo(e,a,l),Tt(e,t)||(ot=!0),e):(kl&42)===0||(kl&1073741824)!==0&&(re&261930)===0?(ot=!0,e.memoizedState=a):(e=ah(),ee.lanes|=e,En|=e,t)}function af(e,t,a,l,c){var i=G.p;G.p=i!==0&&8>i?i:8;var u=z.T,m={};z.T=m,Xo(e,!1,t,a);try{var y=c(),_=z.S;if(_!==null&&_(m,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var R=sp(y,l);hs(e,t,R,ga(e))}else hs(e,t,l,ga(e))}catch(U){hs(e,t,{then:function(){},status:"rejected",reason:U},ga())}finally{G.p=i,u!==null&&m.types!==null&&(u.types=m.types),z.T=u}}function hp(){}function wo(e,t,a,l){if(e.tag!==5)throw Error(r(476));var c=lf(e).queue;af(e,c,t,J,a===null?hp:function(){return nf(e),a(l)})}function lf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bl,lastRenderedState:J},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bl,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nf(e){var t=lf(e);t.next===null&&(t=e.alternate.memoizedState),hs(e,t.next.queue,{},ga())}function Yo(){return ze(Rs)}function cf(){return lt().memoizedState}function sf(){return lt().memoizedState}function mp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=ga();e=xn(a);var l=jn(t,e,a);l!==null&&(la(l,t,a),us(l,t,a)),t={cache:vo()},e.payload=t;return}t=t.return}}function pp(e,t,a){var l=ga();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Au(e)?of(t,a):(a=Ii(e,t,a,l),a!==null&&(la(a,e,l),rf(a,t,l)))}function uf(e,t,a){var l=ga();hs(e,t,a,l)}function hs(e,t,a,l){var c={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Au(e))of(t,c);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var u=t.lastRenderedState,m=i(u,a);if(c.hasEagerState=!0,c.eagerState=m,Tt(m,u))return oc(e,t,c,0),He===null&&Fc(),!1}catch{}finally{}if(a=Ii(e,t,c,l),a!==null)return la(a,e,l),rf(a,t,l),!0}return!1}function Xo(e,t,a,l){if(l={lane:2,revertLane:jr(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Au(e)){if(t)throw Error(r(479))}else t=Ii(e,a,l,2),t!==null&&la(t,e,2)}function Au(e){var t=e.alternate;return e===ee||t!==null&&t===ee}function of(e,t){oi=vu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function rf(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Ri(e,a)}}var ms={readContext:ze,use:xu,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};ms.useEffectEvent=$e;var df={readContext:ze,use:xu,useCallback:function(e,t){return Xt().memoizedState=[e,t===void 0?null:t],e},useContext:ze,useEffect:Kd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Nu(4194308,4,Wd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Nu(4194308,4,e,t)},useInsertionEffect:function(e,t){Nu(4,2,e,t)},useMemo:function(e,t){var a=Xt();t=t===void 0?null:t;var l=e();if(yc){ja(!0);try{e()}finally{ja(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Xt();if(a!==void 0){var c=a(t);if(yc){ja(!0);try{a(t)}finally{ja(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=pp.bind(null,ee,e),[l.memoizedState,e]},useRef:function(e){var t=Xt();return e={current:e},t.memoizedState=e},useState:function(e){e=Bo(e);var t=e.queue,a=uf.bind(null,ee,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Lo,useDeferredValue:function(e,t){var a=Xt();return qo(a,e,t)},useTransition:function(){var e=Bo(!1);return e=af.bind(null,ee,e.queue,!0,!1),Xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ee,c=Xt();if(se){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),He===null)throw Error(r(349));(re&127)!==0||zd(l,t,a)}c.memoizedState=a;var i={value:a,getSnapshot:t};return c.queue=i,Kd(Dd.bind(null,l,i,e),[e]),l.flags|=2048,di(9,{destroy:void 0},Md.bind(null,l,i,a,t),null),a},useId:function(){var e=Xt(),t=He.identifierPrefix;if(se){var a=Ra,l=wt;a=(l&~(1<<32-Ot(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=gu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=up++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Yo,useFormState:Yd,useActionState:Yd,useOptimistic:function(e){var t=Xt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Xo.bind(null,ee,!0,a),a.dispatch=t,[e,t]},useMemoCache:Do,useCacheRefresh:function(){return Xt().memoizedState=mp.bind(null,ee)},useEffectEvent:function(e){var t=Xt(),a={impl:e};return t.memoizedState=a,function(){if((ge&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Qo={readContext:ze,use:xu,useCallback:Pd,useContext:ze,useEffect:Go,useImperativeHandle:Fd,useInsertionEffect:Id,useLayoutEffect:$d,useMemo:ef,useReducer:ju,useRef:Vd,useState:function(){return ju(Bl)},useDebugValue:Lo,useDeferredValue:function(e,t){var a=lt();return tf(a,Me.memoizedState,e,t)},useTransition:function(){var e=ju(Bl)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:fs(e),t]},useSyncExternalStore:Rd,useId:cf,useHostTransitionStatus:Yo,useFormState:Xd,useActionState:Xd,useOptimistic:function(e,t){var a=lt();return Bd(a,Me,e,t)},useMemoCache:Do,useCacheRefresh:sf};Qo.useEffectEvent=Jd;var ff={readContext:ze,use:xu,useCallback:Pd,useContext:ze,useEffect:Go,useImperativeHandle:Fd,useInsertionEffect:Id,useLayoutEffect:$d,useMemo:ef,useReducer:ko,useRef:Vd,useState:function(){return ko(Bl)},useDebugValue:Lo,useDeferredValue:function(e,t){var a=lt();return Me===null?qo(a,e,t):tf(a,Me.memoizedState,e,t)},useTransition:function(){var e=ko(Bl)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:fs(e),t]},useSyncExternalStore:Rd,useId:cf,useHostTransitionStatus:Yo,useFormState:Zd,useActionState:Zd,useOptimistic:function(e,t){var a=lt();return Me!==null?Bd(a,Me,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Do,useCacheRefresh:sf};ff.useEffectEvent=Jd;function Zo(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:j({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Vo={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=ga(),c=xn(l);c.payload=t,a!=null&&(c.callback=a),t=jn(e,c,l),t!==null&&(la(t,e,l),us(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=ga(),c=xn(l);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=jn(e,c,l),t!==null&&(la(t,e,l),us(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=ga(),l=xn(a);l.tag=2,t!=null&&(l.callback=t),t=jn(e,l,a),t!==null&&(la(t,e,a),us(t,e,a))}};function hf(e,t,a,l,c,i,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,u):t.prototype&&t.prototype.isPureReactComponent?!ic(a,l)||!ic(c,i):!0}function mf(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Vo.enqueueReplaceState(t,t.state,null)}function vc(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=j({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function pf(e){pn(e)}function yf(e){console.error(e)}function vf(e){pn(e)}function Tu(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function gf(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Ko(e,t,a){return a=xn(a),a.tag=3,a.payload={element:null},a.callback=function(){Tu(e,t)},a}function bf(e){return e=xn(e),e.tag=3,e}function xf(e,t,a,l){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var i=l.value;e.payload=function(){return c(i)},e.callback=function(){gf(t,a,l)}}var u=a.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){gf(t,a,l),typeof c!="function"&&(_n===null?_n=new Set([this]):_n.add(this));var m=l.stack;this.componentDidCatch(l.value,{componentStack:m!==null?m:""})})}function yp(e,t,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&V(t,a,c,!0),a=ma.current,a!==null){switch(a.tag){case 31:case 13:return Ma===null?Hu():a.alternate===null&&We===0&&(We=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===fu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),gr(e,l,c)),!1;case 22:return a.flags|=65536,l===fu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),gr(e,l,c)),!1}throw Error(r(435,a.tag))}return gr(e,l,c),Hu(),!1}if(se)return t=ma.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==ts&&(e=Error(r(422),{cause:l}),gn(Wt(e,a)))):(l!==ts&&(t=Error(r(423),{cause:l}),gn(Wt(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=Wt(l,a),c=Ko(e.stateNode,l,c),So(e,c),We!==4&&(We=2)),!1;var i=Error(r(520),{cause:l});if(i=Wt(i,a),Ns===null?Ns=[i]:Ns.push(i),We!==4&&(We=2),t===null)return!0;l=Wt(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Ko(a.stateNode,l,e),So(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(_n===null||!_n.has(i))))return a.flags|=65536,c&=-c,a.lanes|=c,c=bf(c),xf(c,e,a,l),So(a,c),!1}a=a.return}while(a!==null);return!1}var Jo=Error(r(461)),ot=!1;function _t(e,t,a,l){t.child=e===null?Sd(t,null,a,l):pc(t,e.child,a,l)}function jf(e,t,a,l,c){a=a.render;var i=t.ref;if("ref"in l){var u={};for(var m in l)m!=="ref"&&(u[m]=l[m])}else u=l;return fe(t),l=Oo(e,t,a,u,i,c),m=Ro(),e!==null&&!ot?(zo(e,t,c),Hl(e,t,c)):(se&&m&&es(t),t.flags|=1,_t(e,t,l,c),t.child)}function Nf(e,t,a,l,c){if(e===null){var i=a.type;return typeof i=="function"&&!ml(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,Sf(e,t,i,l,c)):(e=ei(a.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!ar(e,c)){var u=i.memoizedProps;if(a=a.compare,a=a!==null?a:ic,a(u,l)&&e.ref===t.ref)return Hl(e,t,c)}return t.flags|=1,e=da(i,l),e.ref=t.ref,e.return=t,t.child=e}function Sf(e,t,a,l,c){if(e!==null){var i=e.memoizedProps;if(ic(i,l)&&e.ref===t.ref)if(ot=!1,t.pendingProps=l=i,ar(e,c))(e.flags&131072)!==0&&(ot=!0);else return t.lanes=e.lanes,Hl(e,t,c)}return Io(e,t,a,l,c)}function Af(e,t,a,l){var c=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~i}else l=0,t.child=null;return Tf(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ru(t,i!==null?i.cachePool:null),i!==null?Ed(t,i):To(),_d(t);else return l=t.lanes=536870912,Tf(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(ru(t,i.cachePool),Ed(t,i),Sn(),t.memoizedState=null):(e!==null&&ru(t,null),To(),Sn());return _t(e,t,c,a),t.child}function ps(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Tf(e,t,a,l,c){var i=bo();return i=i===null?null:{parent:st._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&ru(t,null),To(),_d(t),e!==null&&V(e,t,l,!0),t.childLanes=c,null}function Eu(e,t){return t=Cu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ef(e,t,a){return pc(t,e.child,null,a),e=Eu(t,t.pendingProps),e.flags|=2,pa(t),t.memoizedState=null,e}function vp(e,t,a){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(se){if(l.mode==="hidden")return e=Eu(t,l),t.lanes=536870912,ps(null,e);if(_o(t),(e=Re)?(e=Gh(e,Yt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yl!==null?{id:wt,overflow:Ra}:null,retryLane:536870912,hydrationErrors:null},a=Wi(e),a.return=t,t.child=a,Be=t,Re=null)):e=null,e===null)throw ha(t);return t.lanes=536870912,null}return Eu(t,l)}var i=e.memoizedState;if(i!==null){var u=i.dehydrated;if(_o(t),c)if(t.flags&256)t.flags&=-257,t=Ef(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ot||V(e,t,a,!1),c=(a&e.childLanes)!==0,ot||c){if(l=He,l!==null&&(u=Cc(l,a),u!==0&&u!==i.retryLane))throw i.retryLane=u,Za(e,u),la(l,e,u),Jo;Hu(),t=Ef(e,t,a)}else e=i.treeContext,Re=Da(u.nextSibling),Be=t,se=!0,Ka=null,Yt=!1,e!==null&&dc(t,e),t=Eu(t,l),t.flags|=4096;return t}return e=da(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function _u(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Io(e,t,a,l,c){return fe(t),a=Oo(e,t,a,l,void 0,c),l=Ro(),e!==null&&!ot?(zo(e,t,c),Hl(e,t,c)):(se&&l&&es(t),t.flags|=1,_t(e,t,a,c),t.child)}function _f(e,t,a,l,c,i){return fe(t),t.updateQueue=null,a=Od(t,l,a,c),Cd(e),l=Ro(),e!==null&&!ot?(zo(e,t,i),Hl(e,t,i)):(se&&l&&es(t),t.flags|=1,_t(e,t,a,i),t.child)}function Cf(e,t,a,l,c){if(fe(t),t.stateNode===null){var i=vn,u=a.contextType;typeof u=="object"&&u!==null&&(i=ze(u)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Vo,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},jo(t),u=a.contextType,i.context=typeof u=="object"&&u!==null?ze(u):vn,i.state=t.memoizedState,u=a.getDerivedStateFromProps,typeof u=="function"&&(Zo(t,a,u,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&Vo.enqueueReplaceState(i,i.state,null),rs(t,l,i,c),os(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var m=t.memoizedProps,y=vc(a,m);i.props=y;var _=i.context,R=a.contextType;u=vn,typeof R=="object"&&R!==null&&(u=ze(R));var U=a.getDerivedStateFromProps;R=typeof U=="function"||typeof i.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,R||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(m||_!==u)&&mf(t,i,l,u),bn=!1;var C=t.memoizedState;i.state=C,rs(t,l,i,c),os(),_=t.memoizedState,m||C!==_||bn?(typeof U=="function"&&(Zo(t,a,U,l),_=t.memoizedState),(y=bn||hf(t,a,y,l,C,_,u))?(R||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=_),i.props=l,i.state=_,i.context=u,l=y):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,No(e,t),u=t.memoizedProps,R=vc(a,u),i.props=R,U=t.pendingProps,C=i.context,_=a.contextType,y=vn,typeof _=="object"&&_!==null&&(y=ze(_)),m=a.getDerivedStateFromProps,(_=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==U||C!==y)&&mf(t,i,l,y),bn=!1,C=t.memoizedState,i.state=C,rs(t,l,i,c),os();var O=t.memoizedState;u!==U||C!==O||bn||e!==null&&e.dependencies!==null&&f(e.dependencies)?(typeof m=="function"&&(Zo(t,a,m,l),O=t.memoizedState),(R=bn||hf(t,a,R,l,C,O,y)||e!==null&&e.dependencies!==null&&f(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,O,y),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,O,y)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=O),i.props=l,i.state=O,i.context=y,l=R):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&C===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&C===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,_u(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=pc(t,e.child,null,c),t.child=pc(t,null,a,c)):_t(e,t,a,c),t.memoizedState=i.state,e=t.child):e=Hl(e,t,c),e}function Of(e,t,a,l){return vl(),t.flags|=256,_t(e,t,a,l),t.child}var $o={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Wo(e){return{baseLanes:e,cachePool:vd()}}function Fo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=va),e}function Rf(e,t,a){var l=t.pendingProps,c=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),u&&(c=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(se){if(c?Nn(t):Sn(),(e=Re)?(e=Gh(e,Yt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yl!==null?{id:wt,overflow:Ra}:null,retryLane:536870912,hydrationErrors:null},a=Wi(e),a.return=t,t.child=a,Be=t,Re=null)):e=null,e===null)throw ha(t);return Ur(e)?t.lanes=32:t.lanes=536870912,null}var m=l.children;return l=l.fallback,c?(Sn(),c=t.mode,m=Cu({mode:"hidden",children:m},c),l=pl(l,c,a,null),m.return=t,l.return=t,m.sibling=l,t.child=m,l=t.child,l.memoizedState=Wo(a),l.childLanes=Fo(e,u,a),t.memoizedState=$o,ps(null,l)):(Nn(t),Po(t,m))}var y=e.memoizedState;if(y!==null&&(m=y.dehydrated,m!==null)){if(i)t.flags&256?(Nn(t),t.flags&=-257,t=er(e,t,a)):t.memoizedState!==null?(Sn(),t.child=e.child,t.flags|=128,t=null):(Sn(),m=l.fallback,c=t.mode,l=Cu({mode:"visible",children:l.children},c),m=pl(m,c,a,null),m.flags|=2,l.return=t,m.return=t,l.sibling=m,t.child=l,pc(t,e.child,null,a),l=t.child,l.memoizedState=Wo(a),l.childLanes=Fo(e,u,a),t.memoizedState=$o,t=ps(null,l));else if(Nn(t),Ur(m)){if(u=m.nextSibling&&m.nextSibling.dataset,u)var _=u.dgst;u=_,l=Error(r(419)),l.stack="",l.digest=u,gn({value:l,source:null,stack:null}),t=er(e,t,a)}else if(ot||V(e,t,a,!1),u=(a&e.childLanes)!==0,ot||u){if(u=He,u!==null&&(l=Cc(u,a),l!==0&&l!==y.retryLane))throw y.retryLane=l,Za(e,l),la(u,e,l),Jo;Dr(m)||Hu(),t=er(e,t,a)}else Dr(m)?(t.flags|=192,t.child=e.child,t=null):(e=y.treeContext,Re=Da(m.nextSibling),Be=t,se=!0,Ka=null,Yt=!1,e!==null&&dc(t,e),t=Po(t,l.children),t.flags|=4096);return t}return c?(Sn(),m=l.fallback,c=t.mode,y=e.child,_=y.sibling,l=da(y,{mode:"hidden",children:l.children}),l.subtreeFlags=y.subtreeFlags&65011712,_!==null?m=da(_,m):(m=pl(m,c,a,null),m.flags|=2),m.return=t,l.return=t,l.sibling=m,t.child=l,ps(null,l),l=t.child,m=e.child.memoizedState,m===null?m=Wo(a):(c=m.cachePool,c!==null?(y=st._currentValue,c=c.parent!==y?{parent:y,pool:y}:c):c=vd(),m={baseLanes:m.baseLanes|a,cachePool:c}),l.memoizedState=m,l.childLanes=Fo(e,u,a),t.memoizedState=$o,ps(e.child,l)):(Nn(t),a=e.child,e=a.sibling,a=da(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=a,t.memoizedState=null,a)}function Po(e,t){return t=Cu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Cu(e,t){return e=Ut(22,e,null,t),e.lanes=0,e}function er(e,t,a){return pc(t,e.child,null,a),e=Po(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zf(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),S(e.return,t,a)}function tr(e,t,a,l,c,i){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:c,treeForkCount:i}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=l,u.tail=a,u.tailMode=c,u.treeForkCount=i)}function Mf(e,t,a){var l=t.pendingProps,c=l.revealOrder,i=l.tail;l=l.children;var u=at.current,m=(u&2)!==0;if(m?(u=u&1|2,t.flags|=128):u&=1,L(at,u),_t(e,t,l,a),l=se?Va:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zf(e,a,t);else if(e.tag===19)zf(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&yu(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),tr(t,!1,c,a,i,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&yu(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}tr(t,!0,a,null,i,l);break;case"together":tr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Hl(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),En|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(V(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=da(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=da(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ar(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&f(e)))}function gp(e,t,a){switch(t.tag){case 3:Ke(t,t.stateNode.containerInfo),h(t,st,e.memoizedState.cache),vl();break;case 27:case 5:xa(t);break;case 4:Ke(t,t.stateNode.containerInfo);break;case 10:h(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,_o(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Nn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Rf(e,t,a):(Nn(t),e=Hl(e,t,a),e!==null?e.sibling:null);Nn(t);break;case 19:var c=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(V(e,t,a,!1),l=(a&t.childLanes)!==0),c){if(l)return Mf(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),L(at,at.current),l)break;return null;case 22:return t.lanes=0,Af(e,t,a,t.pendingProps);case 24:h(t,st,e.memoizedState.cache)}return Hl(e,t,a)}function Df(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ot=!0;else{if(!ar(e,a)&&(t.flags&128)===0)return ot=!1,gp(e,t,a);ot=(e.flags&131072)!==0}else ot=!1,se&&(t.flags&1048576)!==0&&Pi(t,Va,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=hc(t.elementType),t.type=e,typeof e=="function")ml(e)?(l=vc(e,l),t.tag=1,t=Cf(null,t,e,l,a)):(t.tag=0,t=Io(null,t,e,l,a));else{if(e!=null){var c=e.$$typeof;if(c===dt){t.tag=11,t=jf(null,t,e,l,a);break e}else if(c===te){t.tag=14,t=Nf(null,t,e,l,a);break e}}throw t=ba(e)||e,Error(r(306,t,""))}}return t;case 0:return Io(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,c=vc(l,t.pendingProps),Cf(e,t,l,c,a);case 3:e:{if(Ke(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var i=t.memoizedState;c=i.element,No(e,t),rs(t,l,null,a);var u=t.memoizedState;if(l=u.cache,h(t,st,l),l!==i.cache&&q(t,[st],a,!0),os(),l=u.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Of(e,t,l,a);break e}else if(l!==c){c=Wt(Error(r(424)),t),gn(c),t=Of(e,t,l,a);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=Da(e.firstChild),Be=t,se=!0,Ka=null,Yt=!0,a=Sd(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(vl(),l===c){t=Hl(e,t,a);break e}_t(e,t,l,a)}t=t.child}return t;case 26:return _u(e,t),e===null?(a=Qh(t.type,null,t.pendingProps,null))?t.memoizedState=a:se||(a=t.type,e=t.pendingProps,l=Qu(F.current).createElement(a),l[Xe]=t,l[gt]=e,Ct(l,a,e),Pe(l),t.stateNode=l):t.memoizedState=Qh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xa(t),e===null&&se&&(l=t.stateNode=wh(t.type,t.pendingProps,F.current),Be=t,Yt=!0,c=Re,zn(t.type)?(kr=c,Re=Da(l.firstChild)):Re=c),_t(e,t,t.pendingProps.children,a),_u(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&se&&((c=l=Re)&&(l=Jp(l,t.type,t.pendingProps,Yt),l!==null?(t.stateNode=l,Be=t,Re=Da(l.firstChild),Yt=!1,c=!0):c=!1),c||ha(t)),xa(t),c=t.type,i=t.pendingProps,u=e!==null?e.memoizedProps:null,l=i.children,Rr(c,i)?l=null:u!==null&&Rr(c,u)&&(t.flags|=32),t.memoizedState!==null&&(c=Oo(e,t,op,null,null,a),Rs._currentValue=c),_u(e,t),_t(e,t,l,a),t.child;case 6:return e===null&&se&&((e=a=Re)&&(a=Ip(a,t.pendingProps,Yt),a!==null?(t.stateNode=a,Be=t,Re=null,e=!0):e=!1),e||ha(t)),null;case 13:return Rf(e,t,a);case 4:return Ke(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=pc(t,null,l,a):_t(e,t,l,a),t.child;case 11:return jf(e,t,t.type,t.pendingProps,a);case 7:return _t(e,t,t.pendingProps,a),t.child;case 8:return _t(e,t,t.pendingProps.children,a),t.child;case 12:return _t(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,h(t,t.type,l.value),_t(e,t,l.children,a),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,fe(t),c=ze(c),l=l(c),t.flags|=1,_t(e,t,l,a),t.child;case 14:return Nf(e,t,t.type,t.pendingProps,a);case 15:return Sf(e,t,t.type,t.pendingProps,a);case 19:return Mf(e,t,a);case 31:return vp(e,t,a);case 22:return Af(e,t,a,t.pendingProps);case 24:return fe(t),l=ze(st),e===null?(c=bo(),c===null&&(c=He,i=vo(),c.pooledCache=i,i.refCount++,i!==null&&(c.pooledCacheLanes|=a),c=i),t.memoizedState={parent:l,cache:c},jo(t),h(t,st,c)):((e.lanes&a)!==0&&(No(e,t),rs(t,null,null,a),os()),c=e.memoizedState,i=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),h(t,st,l)):(l=i.cache,h(t,st,l),l!==c.cache&&q(t,[st],a,!0))),_t(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Gl(e){e.flags|=4}function lr(e,t,a,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(ih())e.flags|=8192;else throw mc=fu,xo}else e.flags&=-16777217}function Uf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ih(t))if(ih())e.flags|=8192;else throw mc=fu,xo}function Ou(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ec():536870912,e.lanes|=t,pi|=t)}function ys(e,t){if(!se)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function bp(e,t,a){var l=t.pendingProps;switch(ti(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return qe(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),v(st),be(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ul(t)?Gl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ai())),qe(t),null;case 26:var c=t.type,i=t.memoizedState;return e===null?(Gl(t),i!==null?(qe(t),Uf(t,i)):(qe(t),lr(t,c,null,l,a))):i?i!==e.memoizedState?(Gl(t),qe(t),Uf(t,i)):(qe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Gl(t),qe(t),lr(t,c,e,l,a)),null;case 27:if(jc(t),a=F.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Gl(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return qe(t),null}e=Y.current,Ul(t)?as(t):(e=wh(c,l,a),t.stateNode=e,Gl(t))}return qe(t),null;case 5:if(jc(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Gl(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return qe(t),null}if(i=Y.current,Ul(t))as(t);else{var u=Qu(F.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?u.createElement("select",{is:l.is}):u.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?u.createElement(c,{is:l.is}):u.createElement(c)}}i[Xe]=t,i[gt]=l;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=i;e:switch(Ct(i,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Gl(t)}}return qe(t),lr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Gl(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=F.current,Ul(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,c=Be,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Xe]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Rh(e.nodeValue,a)),e||ha(t,!0)}else e=Qu(e).createTextNode(l),e[Xe]=t,t.stateNode=e}return qe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ul(t),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Xe]=t}else vl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),e=!1}else a=ai(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(pa(t),t):(pa(t),null);if((t.flags&128)!==0)throw Error(r(558))}return qe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Ul(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[Xe]=t}else vl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),c=!1}else c=ai(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(pa(t),t):(pa(t),null)}return pa(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==c&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Ou(t,t.updateQueue),qe(t),null);case 4:return be(),e===null&&Tr(t.stateNode.containerInfo),qe(t),null;case 10:return v(t.type),qe(t),null;case 19:if(D(at),l=t.memoizedState,l===null)return qe(t),null;if(c=(t.flags&128)!==0,i=l.rendering,i===null)if(c)ys(l,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=yu(e),i!==null){for(t.flags|=128,ys(l,!1),e=i.updateQueue,t.updateQueue=e,Ou(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)uu(a,e),a=a.sibling;return L(at,at.current&1|2),se&&Ft(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ft()>Uu&&(t.flags|=128,c=!0,ys(l,!1),t.lanes=4194304)}else{if(!c)if(e=yu(i),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Ou(t,e),ys(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!se)return qe(t),null}else 2*ft()-l.renderingStartTime>Uu&&a!==536870912&&(t.flags|=128,c=!0,ys(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ft(),e.sibling=null,a=at.current,L(at,c?a&1|2:a&1),se&&Ft(t,l.treeForkCount),e):(qe(t),null);case 22:case 23:return pa(t),Eo(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),a=t.updateQueue,a!==null&&Ou(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&D(fc),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),v(st),qe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function xp(e,t){switch(ti(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return v(st),be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return jc(t),null;case 31:if(t.memoizedState!==null){if(pa(t),t.alternate===null)throw Error(r(340));vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(pa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return D(at),null;case 4:return be(),null;case 10:return v(t.type),null;case 22:case 23:return pa(t),Eo(),e!==null&&D(fc),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return v(st),null;case 25:return null;default:return null}}function kf(e,t){switch(ti(t),t.tag){case 3:v(st),be();break;case 26:case 27:case 5:jc(t);break;case 4:be();break;case 31:t.memoizedState!==null&&pa(t);break;case 13:pa(t);break;case 19:D(at);break;case 10:v(t.type);break;case 22:case 23:pa(t),Eo(),e!==null&&D(fc);break;case 24:v(st)}}function vs(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var c=l.next;a=c;do{if((a.tag&e)===e){l=void 0;var i=a.create,u=a.inst;l=i(),u.destroy=l}a=a.next}while(a!==c)}}catch(m){Te(t,t.return,m)}}function An(e,t,a){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var i=c.next;l=i;do{if((l.tag&e)===e){var u=l.inst,m=u.destroy;if(m!==void 0){u.destroy=void 0,c=t;var y=a,_=m;try{_()}catch(R){Te(c,y,R)}}}l=l.next}while(l!==i)}}catch(R){Te(t,t.return,R)}}function Bf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Td(t,a)}catch(l){Te(e,e.return,l)}}}function Hf(e,t,a){a.props=vc(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Te(e,t,l)}}function gs(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(c){Te(e,t,c)}}function bl(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){Te(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Te(e,t,c)}else a.current=null}function Gf(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(c){Te(e,e.return,c)}}function nr(e,t,a){try{var l=e.stateNode;Yp(l,e.type,a,t),l[gt]=t}catch(c){Te(e,e.return,c)}}function Lf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zn(e.type)||e.tag===4}function cr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lf(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&&zn(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 ir(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=La));else if(l!==4&&(l===27&&zn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(ir(e,t,a),e=e.sibling;e!==null;)ir(e,t,a),e=e.sibling}function Ru(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&zn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Ru(e,t,a),e=e.sibling;e!==null;)Ru(e,t,a),e=e.sibling}function qf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ct(t,l,a),t[Xe]=e,t[gt]=a}catch(i){Te(e,e.return,i)}}var Ll=!1,rt=!1,sr=!1,wf=typeof WeakSet=="function"?WeakSet:Set,xt=null;function jp(e,t){if(e=e.containerInfo,Cr=Wu,e=Dl(e),uc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var u=0,m=-1,y=-1,_=0,R=0,U=e,C=null;t:for(;;){for(var O;U!==a||c!==0&&U.nodeType!==3||(m=u+c),U!==i||l!==0&&U.nodeType!==3||(y=u+l),U.nodeType===3&&(u+=U.nodeValue.length),(O=U.firstChild)!==null;)C=U,U=O;for(;;){if(U===e)break t;if(C===a&&++_===c&&(m=u),C===i&&++R===l&&(y=u),(O=U.nextSibling)!==null)break;U=C,C=U.parentNode}U=O}a=m===-1||y===-1?null:{start:m,end:y}}else a=null}a=a||{start:0,end:0}}else a=null;for(Or={focusedElem:e,selectionRange:a},Wu=!1,xt=t;xt!==null;)if(t=xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xt=e;else for(;xt!==null;){switch(t=xt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,a=t,c=i.memoizedProps,i=i.memoizedState,l=a.stateNode;try{var X=vc(a.type,c);e=l.getSnapshotBeforeUpdate(X,i),l.__reactInternalSnapshotBeforeUpdate=e}catch($){Te(a,a.return,$)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Mr(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mr(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,xt=e;break}xt=t.return}}function Yf(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:wl(e,a),l&4&&vs(5,a);break;case 1:if(wl(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(u){Te(a,a.return,u)}else{var c=vc(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){Te(a,a.return,u)}}l&64&&Bf(a),l&512&&gs(a,a.return);break;case 3:if(wl(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Td(e,t)}catch(u){Te(a,a.return,u)}}break;case 27:t===null&&l&4&&qf(a);case 26:case 5:wl(e,a),t===null&&l&4&&Gf(a),l&512&&gs(a,a.return);break;case 12:wl(e,a);break;case 31:wl(e,a),l&4&&Zf(e,a);break;case 13:wl(e,a),l&4&&Vf(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Rp.bind(null,a),$p(e,a))));break;case 22:if(l=a.memoizedState!==null||Ll,!l){t=t!==null&&t.memoizedState!==null||rt,c=Ll;var i=rt;Ll=l,(rt=t)&&!i?Yl(e,a,(a.subtreeFlags&8772)!==0):wl(e,a),Ll=c,rt=i}break;case 30:break;default:wl(e,a)}}function Xf(e){var t=e.alternate;t!==null&&(e.alternate=null,Xf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Rc(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 Ye=null,Pt=!1;function ql(e,t,a){for(a=a.child;a!==null;)Qf(e,t,a),a=a.sibling}function Qf(e,t,a){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(Jl,a)}catch{}switch(a.tag){case 26:rt||bl(a,t),ql(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:rt||bl(a,t);var l=Ye,c=Pt;zn(a.type)&&(Ye=a.stateNode,Pt=!1),ql(e,t,a),_s(a.stateNode),Ye=l,Pt=c;break;case 5:rt||bl(a,t);case 6:if(l=Ye,c=Pt,Ye=null,ql(e,t,a),Ye=l,Pt=c,Ye!==null)if(Pt)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(a.stateNode)}catch(i){Te(a,t,i)}else try{Ye.removeChild(a.stateNode)}catch(i){Te(a,t,i)}break;case 18:Ye!==null&&(Pt?(e=Ye,Bh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Si(e)):Bh(Ye,a.stateNode));break;case 4:l=Ye,c=Pt,Ye=a.stateNode.containerInfo,Pt=!0,ql(e,t,a),Ye=l,Pt=c;break;case 0:case 11:case 14:case 15:An(2,a,t),rt||An(4,a,t),ql(e,t,a);break;case 1:rt||(bl(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Hf(a,t,l)),ql(e,t,a);break;case 21:ql(e,t,a);break;case 22:rt=(l=rt)||a.memoizedState!==null,ql(e,t,a),rt=l;break;default:ql(e,t,a)}}function Zf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Si(e)}catch(a){Te(t,t.return,a)}}}function Vf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Si(e)}catch(a){Te(t,t.return,a)}}function Np(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new wf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new wf),t;default:throw Error(r(435,e.tag))}}function zu(e,t){var a=Np(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var c=zp.bind(null,e,l);l.then(c,c)}})}function ea(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var c=a[l],i=e,u=t,m=u;e:for(;m!==null;){switch(m.tag){case 27:if(zn(m.type)){Ye=m.stateNode,Pt=!1;break e}break;case 5:Ye=m.stateNode,Pt=!1;break e;case 3:case 4:Ye=m.stateNode.containerInfo,Pt=!0;break e}m=m.return}if(Ye===null)throw Error(r(160));Qf(i,u,c),Ye=null,Pt=!1,i=c.alternate,i!==null&&(i.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Kf(t,e),t=t.sibling}var Ia=null;function Kf(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ea(t,e),ta(e),l&4&&(An(3,e,e.return),vs(3,e),An(5,e,e.return));break;case 1:ea(t,e),ta(e),l&512&&(rt||a===null||bl(a,a.return)),l&64&&Ll&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var c=Ia;if(ea(t,e),ta(e),l&512&&(rt||a===null||bl(a,a.return)),l&4){var i=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":i=c.getElementsByTagName("title")[0],(!i||i[al]||i[Xe]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=c.createElement(l),c.head.insertBefore(i,c.querySelector("head > title"))),Ct(i,l,a),i[Xe]=e,Pe(i),l=i;break e;case"link":var u=Kh("link","href",c).get(l+(a.href||""));if(u){for(var m=0;m<u.length;m++)if(i=u[m],i.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&i.getAttribute("rel")===(a.rel==null?null:a.rel)&&i.getAttribute("title")===(a.title==null?null:a.title)&&i.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){u.splice(m,1);break t}}i=c.createElement(l),Ct(i,l,a),c.head.appendChild(i);break;case"meta":if(u=Kh("meta","content",c).get(l+(a.content||""))){for(m=0;m<u.length;m++)if(i=u[m],i.getAttribute("content")===(a.content==null?null:""+a.content)&&i.getAttribute("name")===(a.name==null?null:a.name)&&i.getAttribute("property")===(a.property==null?null:a.property)&&i.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&i.getAttribute("charset")===(a.charSet==null?null:a.charSet)){u.splice(m,1);break t}}i=c.createElement(l),Ct(i,l,a),c.head.appendChild(i);break;default:throw Error(r(468,l))}i[Xe]=e,Pe(i),l=i}e.stateNode=l}else Jh(c,e.type,e.stateNode);else e.stateNode=Vh(c,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?Jh(c,e.type,e.stateNode):Vh(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&nr(e,e.memoizedProps,a.memoizedProps)}break;case 27:ea(t,e),ta(e),l&512&&(rt||a===null||bl(a,a.return)),a!==null&&l&4&&nr(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ea(t,e),ta(e),l&512&&(rt||a===null||bl(a,a.return)),e.flags&32){c=e.stateNode;try{oa(c,"")}catch(X){Te(e,e.return,X)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,nr(e,c,a!==null?a.memoizedProps:c)),l&1024&&(sr=!0);break;case 6:if(ea(t,e),ta(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(X){Te(e,e.return,X)}}break;case 3:if(Ku=null,c=Ia,Ia=Zu(t.containerInfo),ea(t,e),Ia=c,ta(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Si(t.containerInfo)}catch(X){Te(e,e.return,X)}sr&&(sr=!1,Jf(e));break;case 4:l=Ia,Ia=Zu(e.stateNode.containerInfo),ea(t,e),ta(e),Ia=l;break;case 12:ea(t,e),ta(e);break;case 31:ea(t,e),ta(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,zu(e,l)));break;case 13:ea(t,e),ta(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Du=ft()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,zu(e,l)));break;case 22:c=e.memoizedState!==null;var y=a!==null&&a.memoizedState!==null,_=Ll,R=rt;if(Ll=_||c,rt=R||y,ea(t,e),rt=R,Ll=_,ta(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||y||Ll||rt||gc(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){y=a=t;try{if(i=y.stateNode,c)u=i.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{m=y.stateNode;var U=y.memoizedProps.style,C=U!=null&&U.hasOwnProperty("display")?U.display:null;m.style.display=C==null||typeof C=="boolean"?"":(""+C).trim()}}catch(X){Te(y,y.return,X)}}}else if(t.tag===6){if(a===null){y=t;try{y.stateNode.nodeValue=c?"":y.memoizedProps}catch(X){Te(y,y.return,X)}}}else if(t.tag===18){if(a===null){y=t;try{var O=y.stateNode;c?Hh(O,!0):Hh(y.stateNode,!1)}catch(X){Te(y,y.return,X)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,zu(e,a))));break;case 19:ea(t,e),ta(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,zu(e,l)));break;case 30:break;case 21:break;default:ea(t,e),ta(e)}}function ta(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Lf(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var c=a.stateNode,i=cr(e);Ru(e,i,c);break;case 5:var u=a.stateNode;a.flags&32&&(oa(u,""),a.flags&=-33);var m=cr(e);Ru(e,m,u);break;case 3:case 4:var y=a.stateNode.containerInfo,_=cr(e);ir(e,_,y);break;default:throw Error(r(161))}}catch(R){Te(e,e.return,R)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Jf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Jf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Yf(e,t.alternate,t),t=t.sibling}function gc(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:An(4,t,t.return),gc(t);break;case 1:bl(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Hf(t,t.return,a),gc(t);break;case 27:_s(t.stateNode);case 26:case 5:bl(t,t.return),gc(t);break;case 22:t.memoizedState===null&&gc(t);break;case 30:gc(t);break;default:gc(t)}e=e.sibling}}function Yl(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,i=t,u=i.flags;switch(i.tag){case 0:case 11:case 15:Yl(c,i,a),vs(4,i);break;case 1:if(Yl(c,i,a),l=i,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(_){Te(l,l.return,_)}if(l=i,c=l.updateQueue,c!==null){var m=l.stateNode;try{var y=c.shared.hiddenCallbacks;if(y!==null)for(c.shared.hiddenCallbacks=null,c=0;c<y.length;c++)Ad(y[c],m)}catch(_){Te(l,l.return,_)}}a&&u&64&&Bf(i),gs(i,i.return);break;case 27:qf(i);case 26:case 5:Yl(c,i,a),a&&l===null&&u&4&&Gf(i),gs(i,i.return);break;case 12:Yl(c,i,a);break;case 31:Yl(c,i,a),a&&u&4&&Zf(c,i);break;case 13:Yl(c,i,a),a&&u&4&&Vf(c,i);break;case 22:i.memoizedState===null&&Yl(c,i,a),gs(i,i.return);break;case 30:break;default:Yl(c,i,a)}t=t.sibling}}function ur(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&ns(a))}function or(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ns(e))}function $a(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)If(e,t,a,l),t=t.sibling}function If(e,t,a,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:$a(e,t,a,l),c&2048&&vs(9,t);break;case 1:$a(e,t,a,l);break;case 3:$a(e,t,a,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ns(e)));break;case 12:if(c&2048){$a(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,u=i.id,m=i.onPostCommit;typeof m=="function"&&m(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(y){Te(t,t.return,y)}}else $a(e,t,a,l);break;case 31:$a(e,t,a,l);break;case 13:$a(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,u=t.alternate,t.memoizedState!==null?i._visibility&2?$a(e,t,a,l):bs(e,t):i._visibility&2?$a(e,t,a,l):(i._visibility|=2,fi(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&ur(u,t);break;case 24:$a(e,t,a,l),c&2048&&or(t.alternate,t);break;default:$a(e,t,a,l)}}function fi(e,t,a,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,u=t,m=a,y=l,_=u.flags;switch(u.tag){case 0:case 11:case 15:fi(i,u,m,y,c),vs(8,u);break;case 23:break;case 22:var R=u.stateNode;u.memoizedState!==null?R._visibility&2?fi(i,u,m,y,c):bs(i,u):(R._visibility|=2,fi(i,u,m,y,c)),c&&_&2048&&ur(u.alternate,u);break;case 24:fi(i,u,m,y,c),c&&_&2048&&or(u.alternate,u);break;default:fi(i,u,m,y,c)}t=t.sibling}}function bs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,c=l.flags;switch(l.tag){case 22:bs(a,l),c&2048&&ur(l.alternate,l);break;case 24:bs(a,l),c&2048&&or(l.alternate,l);break;default:bs(a,l)}t=t.sibling}}var xs=8192;function hi(e,t,a){if(e.subtreeFlags&xs)for(e=e.child;e!==null;)$f(e,t,a),e=e.sibling}function $f(e,t,a){switch(e.tag){case 26:hi(e,t,a),e.flags&xs&&e.memoizedState!==null&&uy(a,Ia,e.memoizedState,e.memoizedProps);break;case 5:hi(e,t,a);break;case 3:case 4:var l=Ia;Ia=Zu(e.stateNode.containerInfo),hi(e,t,a),Ia=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=xs,xs=16777216,hi(e,t,a),xs=l):hi(e,t,a));break;default:hi(e,t,a)}}function Wf(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 js(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];xt=l,Pf(l,e)}Wf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ff(e),e=e.sibling}function Ff(e){switch(e.tag){case 0:case 11:case 15:js(e),e.flags&2048&&An(9,e,e.return);break;case 3:js(e);break;case 12:js(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Mu(e)):js(e);break;default:js(e)}}function Mu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];xt=l,Pf(l,e)}Wf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:An(8,t,t.return),Mu(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Mu(t));break;default:Mu(t)}e=e.sibling}}function Pf(e,t){for(;xt!==null;){var a=xt;switch(a.tag){case 0:case 11:case 15:An(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ns(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,xt=l;else e:for(a=e;xt!==null;){l=xt;var c=l.sibling,i=l.return;if(Xf(l),l===a){xt=null;break e}if(c!==null){c.return=i,xt=c;break e}xt=i}}}var Sp={getCacheForType:function(e){var t=ze(st),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return ze(st).controller.signal}},Ap=typeof WeakMap=="function"?WeakMap:Map,ge=0,He=null,ue=null,re=0,Ae=0,ya=null,Tn=!1,mi=!1,rr=!1,Xl=0,We=0,En=0,bc=0,dr=0,va=0,pi=0,Ns=null,aa=null,fr=!1,Du=0,eh=0,Uu=1/0,ku=null,_n=null,yt=0,Cn=null,yi=null,Ql=0,hr=0,mr=null,th=null,Ss=0,pr=null;function ga(){return(ge&2)!==0&&re!==0?re&-re:z.T!==null?jr():zi()}function ah(){if(va===0)if((re&536870912)===0||se){var e=Xn;Xn<<=1,(Xn&3932160)===0&&(Xn=262144),va=e}else va=536870912;return e=ma.current,e!==null&&(e.flags|=32),va}function la(e,t,a){(e===He&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(vi(e,0),On(e,re,va,!1)),Il(e,a),((ge&2)===0||e!==He)&&(e===He&&((ge&2)===0&&(bc|=a),We===4&&On(e,re,va,!1)),xl(e))}function lh(e,t,a){if((ge&6)!==0)throw Error(r(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||El(e,t),c=l?_p(e,t):vr(e,t,!0),i=l;do{if(c===0){mi&&!l&&On(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!Tp(a)){c=vr(e,t,!1),i=!1;continue}if(c===2){if(i=t,e.errorRecoveryDisabledLanes&i)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var m=e;c=Ns;var y=m.current.memoizedState.isDehydrated;if(y&&(vi(m,u).flags|=256),u=vr(m,u,!1),u!==2){if(rr&&!y){m.errorRecoveryDisabledLanes|=i,bc|=i,c=4;break e}i=aa,aa=c,i!==null&&(aa===null?aa=i:aa.push.apply(aa,i))}c=u}if(i=!1,c!==2)continue}}if(c===1){vi(e,0),On(e,t,0,!0);break}e:{switch(l=e,i=c,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:On(l,t,va,!Tn);break e;case 2:aa=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(c=Du+300-ft(),10<c)){if(On(l,t,va,!Tn),Qn(l,0,!0)!==0)break e;Ql=t,l.timeoutHandle=Uh(nh.bind(null,l,a,aa,ku,fr,t,va,bc,pi,Tn,i,"Throttled",-0,0),c);break e}nh(l,a,aa,ku,fr,t,va,bc,pi,Tn,i,null,-0,0)}}break}while(!0);xl(e)}function nh(e,t,a,l,c,i,u,m,y,_,R,U,C,O){if(e.timeoutHandle=-1,U=t.subtreeFlags,U&8192||(U&16785408)===16785408){U={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:La},$f(t,i,U);var X=(i&62914560)===i?Du-ft():(i&4194048)===i?eh-ft():0;if(X=oy(U,X),X!==null){Ql=i,e.cancelPendingCommit=X(fh.bind(null,e,t,i,a,l,c,u,m,y,R,U,null,C,O)),On(e,i,u,!_);return}}fh(e,t,i,a,l,c,u,m,y)}function Tp(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var c=a[l],i=c.getSnapshot;c=c.value;try{if(!Tt(i(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function On(e,t,a,l){t&=~dr,t&=~bc,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var i=31-Ot(c),u=1<<i;l[i]=-1,c&=~u}a!==0&&Oi(e,a,t)}function Bu(){return(ge&6)===0?(As(0),!1):!0}function yr(){if(ue!==null){if(Ae===0)var e=ue.return;else e=ue,za=gl=null,Mo(e),si=null,is=0,e=ue;for(;e!==null;)kf(e.alternate,e),e=e.return;ue=null}}function vi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Zp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ql=0,yr(),He=e,ue=a=da(e.current,null),re=t,Ae=0,ya=null,Tn=!1,mi=El(e,t),rr=!1,pi=va=dr=bc=En=We=0,aa=Ns=null,fr=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-Ot(l),i=1<<c;t|=e[c],l&=~i}return Xl=t,Fc(),a}function ch(e,t){ee=null,z.H=ms,t===ii||t===du?(t=xd(),Ae=3):t===xo?(t=xd(),Ae=4):Ae=t===Jo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ya=t,ue===null&&(We=1,Tu(e,Wt(t,e.current)))}function ih(){var e=ma.current;return e===null?!0:(re&4194048)===re?Ma===null:(re&62914560)===re||(re&536870912)!==0?e===Ma:!1}function sh(){var e=z.H;return z.H=ms,e===null?ms:e}function uh(){var e=z.A;return z.A=Sp,e}function Hu(){We=4,Tn||(re&4194048)!==re&&ma.current!==null||(mi=!0),(En&134217727)===0&&(bc&134217727)===0||He===null||On(He,re,va,!1)}function vr(e,t,a){var l=ge;ge|=2;var c=sh(),i=uh();(He!==e||re!==t)&&(ku=null,vi(e,t)),t=!1;var u=We;e:do try{if(Ae!==0&&ue!==null){var m=ue,y=ya;switch(Ae){case 8:yr(),u=6;break e;case 3:case 2:case 9:case 6:ma.current===null&&(t=!0);var _=Ae;if(Ae=0,ya=null,gi(e,m,y,_),a&&mi){u=0;break e}break;default:_=Ae,Ae=0,ya=null,gi(e,m,y,_)}}Ep(),u=We;break}catch(R){ch(e,R)}while(!0);return t&&e.shellSuspendCounter++,za=gl=null,ge=l,z.H=c,z.A=i,ue===null&&(He=null,re=0,Fc()),u}function Ep(){for(;ue!==null;)oh(ue)}function _p(e,t){var a=ge;ge|=2;var l=sh(),c=uh();He!==e||re!==t?(ku=null,Uu=ft()+500,vi(e,t)):mi=El(e,t);e:do try{if(Ae!==0&&ue!==null){t=ue;var i=ya;t:switch(Ae){case 1:Ae=0,ya=null,gi(e,t,i,1);break;case 2:case 9:if(gd(i)){Ae=0,ya=null,rh(t);break}t=function(){Ae!==2&&Ae!==9||He!==e||(Ae=7),xl(e)},i.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:gd(i)?(Ae=0,ya=null,rh(t)):(Ae=0,ya=null,gi(e,t,i,7));break;case 5:var u=null;switch(ue.tag){case 26:u=ue.memoizedState;case 5:case 27:var m=ue;if(u?Ih(u):m.stateNode.complete){Ae=0,ya=null;var y=m.sibling;if(y!==null)ue=y;else{var _=m.return;_!==null?(ue=_,Gu(_)):ue=null}break t}}Ae=0,ya=null,gi(e,t,i,5);break;case 6:Ae=0,ya=null,gi(e,t,i,6);break;case 8:yr(),We=6;break e;default:throw Error(r(462))}}Cp();break}catch(R){ch(e,R)}while(!0);return za=gl=null,z.H=l,z.A=c,ge=a,ue!==null?0:(He=null,re=0,Fc(),We)}function Cp(){for(;ue!==null&&!Ls();)oh(ue)}function oh(e){var t=Df(e.alternate,e,Xl);e.memoizedProps=e.pendingProps,t===null?Gu(e):ue=t}function rh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=_f(a,t,t.pendingProps,t.type,void 0,re);break;case 11:t=_f(a,t,t.pendingProps,t.type.render,t.ref,re);break;case 5:Mo(t);default:kf(a,t),t=ue=uu(t,Xl),t=Df(a,t,Xl)}e.memoizedProps=e.pendingProps,t===null?Gu(e):ue=t}function gi(e,t,a,l){za=gl=null,Mo(t),si=null,is=0;var c=t.return;try{if(yp(e,c,t,a,re)){We=1,Tu(e,Wt(a,e.current)),ue=null;return}}catch(i){if(c!==null)throw ue=c,i;We=1,Tu(e,Wt(a,e.current)),ue=null;return}t.flags&32768?(se||l===1?e=!0:mi||(re&536870912)!==0?e=!1:(Tn=e=!0,(l===2||l===9||l===3||l===6)&&(l=ma.current,l!==null&&l.tag===13&&(l.flags|=16384))),dh(t,e)):Gu(t)}function Gu(e){var t=e;do{if((t.flags&32768)!==0){dh(t,Tn);return}e=t.return;var a=bp(t.alternate,t,Xl);if(a!==null){ue=a;return}if(t=t.sibling,t!==null){ue=t;return}ue=t=e}while(t!==null);We===0&&(We=5)}function dh(e,t){do{var a=xp(e.alternate,e);if(a!==null){a.flags&=32767,ue=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ue=e;return}ue=e=a}while(e!==null);We=6,ue=null}function fh(e,t,a,l,c,i,u,m,y){e.cancelPendingCommit=null;do Lu();while(yt!==0);if((ge&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=Ji,Xs(e,a,i,u,m,y),e===He&&(ue=He=null,re=0),yi=t,Cn=e,Ql=a,hr=i,mr=c,th=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Mp(Pa,function(){return vh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=z.T,z.T=null,c=G.p,G.p=2,u=ge,ge|=4;try{jp(e,t,a)}finally{ge=u,G.p=c,z.T=l}}yt=1,hh(),mh(),ph()}}function hh(){if(yt===1){yt=0;var e=Cn,t=yi,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null;var l=G.p;G.p=2;var c=ge;ge|=4;try{Kf(t,e);var i=Or,u=Dl(e.containerInfo),m=i.focusedElem,y=i.selectionRange;if(u!==m&&m&&m.ownerDocument&&lu(m.ownerDocument.documentElement,m)){if(y!==null&&uc(m)){var _=y.start,R=y.end;if(R===void 0&&(R=_),"selectionStart"in m)m.selectionStart=_,m.selectionEnd=Math.min(R,m.value.length);else{var U=m.ownerDocument||document,C=U&&U.defaultView||window;if(C.getSelection){var O=C.getSelection(),X=m.textContent.length,$=Math.min(y.start,X),Ue=y.end===void 0?$:Math.min(y.end,X);!O.extend&&$>Ue&&(u=Ue,Ue=$,$=u);var N=Xa(m,$),x=Xa(m,Ue);if(N&&x&&(O.rangeCount!==1||O.anchorNode!==N.node||O.anchorOffset!==N.offset||O.focusNode!==x.node||O.focusOffset!==x.offset)){var E=U.createRange();E.setStart(N.node,N.offset),O.removeAllRanges(),$>Ue?(O.addRange(E),O.extend(x.node,x.offset)):(E.setEnd(x.node,x.offset),O.addRange(E))}}}}for(U=[],O=m;O=O.parentNode;)O.nodeType===1&&U.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<U.length;m++){var M=U[m];M.element.scrollLeft=M.left,M.element.scrollTop=M.top}}Wu=!!Cr,Or=Cr=null}finally{ge=c,G.p=l,z.T=a}}e.current=t,yt=2}}function mh(){if(yt===2){yt=0;var e=Cn,t=yi,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=z.T,z.T=null;var l=G.p;G.p=2;var c=ge;ge|=4;try{Yf(e,t.alternate,t)}finally{ge=c,G.p=l,z.T=a}}yt=3}}function ph(){if(yt===4||yt===3){yt=0,Sl();var e=Cn,t=yi,a=Ql,l=th;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?yt=5:(yt=0,yi=Cn=null,yh(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(_n=null),Zn(a),t=t.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(Jl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=z.T,c=G.p,G.p=2,z.T=null;try{for(var i=e.onRecoverableError,u=0;u<l.length;u++){var m=l[u];i(m.value,{componentStack:m.stack})}}finally{z.T=t,G.p=c}}(Ql&3)!==0&&Lu(),xl(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===pr?Ss++:(Ss=0,pr=e):Ss=0,As(0)}}function yh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ns(t)))}function Lu(){return hh(),mh(),ph(),vh()}function vh(){if(yt!==5)return!1;var e=Cn,t=hr;hr=0;var a=Zn(Ql),l=z.T,c=G.p;try{G.p=32>a?32:a,z.T=null,a=mr,mr=null;var i=Cn,u=Ql;if(yt=0,yi=Cn=null,Ql=0,(ge&6)!==0)throw Error(r(331));var m=ge;if(ge|=4,Ff(i.current),If(i,i.current,u,a),ge=m,As(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(Jl,i)}catch{}return!0}finally{G.p=c,z.T=l,yh(e,t)}}function gh(e,t,a){t=Wt(a,t),t=Ko(e.stateNode,t,2),e=jn(e,t,2),e!==null&&(Il(e,2),xl(e))}function Te(e,t,a){if(e.tag===3)gh(e,e,a);else for(;t!==null;){if(t.tag===3){gh(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(_n===null||!_n.has(l))){e=Wt(a,e),a=bf(2),l=jn(t,a,2),l!==null&&(xf(a,l,t,e),Il(l,2),xl(l));break}}t=t.return}}function gr(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Ap;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(a)||(rr=!0,c.add(a),e=Op.bind(null,e,t,a),t.then(e,e))}function Op(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,He===e&&(re&a)===a&&(We===4||We===3&&(re&62914560)===re&&300>ft()-Du?(ge&2)===0&&vi(e,0):dr|=a,pi===re&&(pi=0)),xl(e)}function bh(e,t){t===0&&(t=Ec()),e=Za(e,t),e!==null&&(Il(e,t),xl(e))}function Rp(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),bh(e,a)}function zp(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),bh(e,a)}function Mp(e,t){return qn(e,t)}var qu=null,bi=null,br=!1,wu=!1,xr=!1,Rn=0;function xl(e){e!==bi&&e.next===null&&(bi===null?qu=bi=e:bi=bi.next=e),wu=!0,br||(br=!0,Up())}function As(e,t){if(!xr&&wu){xr=!0;do for(var a=!1,l=qu;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var i=0;else{var u=l.suspendedLanes,m=l.pingedLanes;i=(1<<31-Ot(42|e)+1)-1,i&=c&~(u&~m),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Sh(l,i))}else i=re,i=Qn(l,l===He?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||El(l,i)||(a=!0,Sh(l,i));l=l.next}while(a);xr=!1}}function Dp(){xh()}function xh(){wu=br=!1;var e=0;Rn!==0&&Qp()&&(e=Rn);for(var t=ft(),a=null,l=qu;l!==null;){var c=l.next,i=jh(l,t);i===0?(l.next=null,a===null?qu=c:a.next=c,c===null&&(bi=a)):(a=l,(e!==0||(i&3)!==0)&&(wu=!0)),l=c}yt!==0&&yt!==5||As(e),Rn!==0&&(Rn=0)}function jh(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var u=31-Ot(i),m=1<<u,y=c[u];y===-1?((m&a)===0||(m&l)!==0)&&(c[u]=Ci(m,t)):y<=t&&(e.expiredLanes|=m),i&=~m}if(t=He,a=re,a=Qn(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Sc(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||El(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Sc(l),Zn(a)){case 2:case 8:a=Yn;break;case 32:a=Pa;break;case 268435456:a=_i;break;default:a=Pa}return l=Nh.bind(null,e),a=qn(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Sc(l),e.callbackPriority=2,e.callbackNode=null,2}function Nh(e,t){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Lu()&&e.callbackNode!==a)return null;var l=re;return l=Qn(e,e===He?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(lh(e,l,t),jh(e,ft()),e.callbackNode!=null&&e.callbackNode===a?Nh.bind(null,e):null)}function Sh(e,t){if(Lu())return null;lh(e,t,!0)}function Up(){Vp(function(){(ge&6)!==0?qn(wn,Dp):xh()})}function jr(){if(Rn===0){var e=ni;e===0&&(e=Tl,Tl<<=1,(Tl&261888)===0&&(Tl=256)),Rn=e}return Rn}function Ah(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:kc(""+e)}function Th(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function kp(e,t,a,l,c){if(t==="submit"&&a&&a.stateNode===c){var i=Ah((c[gt]||null).action),u=l.submitter;u&&(t=(t=u[gt]||null)?Ah(t.formAction):u.getAttribute("formAction"),t!==null&&(i=t,u=null));var m=new cn("action","action",null,l,c);e.push({event:m,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Rn!==0){var y=u?Th(c,u):new FormData(c);wo(a,{pending:!0,data:y,method:c.method,action:i},null,y)}}else typeof i=="function"&&(m.preventDefault(),y=u?Th(c,u):new FormData(c),wo(a,{pending:!0,data:y,method:c.method,action:i},i,y))},currentTarget:c}]})}}for(var Nr=0;Nr<tt.length;Nr++){var Sr=tt[Nr],Bp=Sr.toLowerCase(),Hp=Sr[0].toUpperCase()+Sr.slice(1);$t(Bp,"on"+Hp)}$t(Mt,"onAnimationEnd"),$t(Zi,"onAnimationIteration"),$t(Vi,"onAnimationStart"),$t("dblclick","onDoubleClick"),$t("focusin","onFocus"),$t("focusout","onBlur"),$t(nu,"onTransitionRun"),$t(cu,"onTransitionStart"),$t(iu,"onTransitionCancel"),$t(Ki,"onTransitionEnd"),Rt("onMouseEnter",["mouseout","mouseover"]),Rt("onMouseLeave",["mouseout","mouseover"]),Rt("onPointerEnter",["pointerout","pointerover"]),Rt("onPointerLeave",["pointerout","pointerover"]),nl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),nl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),nl("onBeforeInput",["compositionend","keypress","textInput","paste"]),nl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),nl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),nl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ts="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(" "),Gp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ts));function Eh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],c=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var u=l.length-1;0<=u;u--){var m=l[u],y=m.instance,_=m.currentTarget;if(m=m.listener,y!==i&&c.isPropagationStopped())break e;i=m,c.currentTarget=_;try{i(c)}catch(R){pn(R)}c.currentTarget=null,i=y}else for(u=0;u<l.length;u++){if(m=l[u],y=m.instance,_=m.currentTarget,m=m.listener,y!==i&&c.isPropagationStopped())break e;i=m,c.currentTarget=_;try{i(c)}catch(R){pn(R)}c.currentTarget=null,i=y}}}}function oe(e,t){var a=t[ht];a===void 0&&(a=t[ht]=new Set);var l=e+"__bubble";a.has(l)||(_h(t,e,2,!1),a.add(l))}function Ar(e,t,a){var l=0;t&&(l|=4),_h(a,e,l,t)}var Yu="_reactListening"+Math.random().toString(36).slice(2);function Tr(e){if(!e[Yu]){e[Yu]=!0,zc.forEach(function(a){a!=="selectionchange"&&(Gp.has(a)||Ar(a,!1,e),Ar(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yu]||(t[Yu]=!0,Ar("selectionchange",!1,t))}}function _h(e,t,a,l){switch(am(t)){case 2:var c=fy;break;case 8:c=hy;break;default:c=qr}a=c.bind(null,t,a,e),c=void 0,!ec||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function Er(e,t,a,l,c){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var u=l.tag;if(u===3||u===4){var m=l.stateNode.containerInfo;if(m===c)break;if(u===4)for(u=l.return;u!==null;){var y=u.tag;if((y===3||y===4)&&u.stateNode.containerInfo===c)return;u=u.return}for(;m!==null;){if(u=Cl(m),u===null)return;if(y=u.tag,y===5||y===6||y===26||y===27){l=i=u;continue e}m=m.parentNode}}l=l.return}qa(function(){var _=i,R=Pn(a),U=[];e:{var C=Wc.get(e);if(C!==void 0){var O=cn,X=e;switch(e){case"keypress":if(Ol(a)===0)break e;case"keydown":case"keyup":O=Yc;break;case"focusin":X="focus",O=Gc;break;case"focusout":X="blur",O=Gc;break;case"beforeblur":case"afterblur":O=Gc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=sn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=un;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=nc;break;case Mt:case Zi:case Vi:O=ki;break;case Ki:O=Ws;break;case"scroll":case"scrollend":O=ne;break;case"wheel":O=mt;break;case"copy":case"cut":case"paste":O=on;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Bi;break;case"toggle":case"beforetoggle":O=Vc}var $=(t&4)!==0,Ue=!$&&(e==="scroll"||e==="scrollend"),N=$?C!==null?C+"Capture":null:C;$=[];for(var x=_,E;x!==null;){var M=x;if(E=M.stateNode,M=M.tag,M!==5&&M!==26&&M!==27||E===null||N===null||(M=Aa(x,N),M!=null&&$.push(Es(x,M,E))),Ue)break;x=x.return}0<$.length&&(C=new O(C,X,null,a,R),U.push({event:C,listeners:$}))}}if((t&7)===0){e:{if(C=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",C&&a!==Fn&&(X=a.relatedTarget||a.fromElement)&&(Cl(X)||X[Ga]))break e;if((O||C)&&(C=R.window===R?R:(C=R.ownerDocument)?C.defaultView||C.parentWindow:window,O?(X=a.relatedTarget||a.toElement,O=_,X=X?Cl(X):null,X!==null&&(Ue=k(X),$=X.tag,X!==Ue||$!==5&&$!==27&&$!==6)&&(X=null)):(O=null,X=_),O!==X)){if($=sn,M="onMouseLeave",N="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&($=Bi,M="onPointerLeave",N="onPointerEnter",x="pointer"),Ue=O==null?C:Sa(O),E=X==null?C:Sa(X),C=new $(M,x+"leave",O,a,R),C.target=Ue,C.relatedTarget=E,M=null,Cl(R)===_&&($=new $(N,x+"enter",X,a,R),$.target=E,$.relatedTarget=Ue,M=$),Ue=M,O&&X)t:{for($=Lp,N=O,x=X,E=0,M=N;M;M=$(M))E++;M=0;for(var K=x;K;K=$(K))M++;for(;0<E-M;)N=$(N),E--;for(;0<M-E;)x=$(x),M--;for(;E--;){if(N===x||x!==null&&N===x.alternate){$=N;break t}N=$(N),x=$(x)}$=null}else $=null;O!==null&&Ch(U,C,O,$,!1),X!==null&&Ue!==null&&Ch(U,Ue,X,$,!0)}}e:{if(C=_?Sa(_):window,O=C.nodeName&&C.nodeName.toLowerCase(),O==="select"||O==="input"&&C.type==="file")var pe=Yi;else if(fn(C))if(Xi)pe=au;else{pe=mo;var Q=ho}else O=C.nodeName,!O||O.toLowerCase()!=="input"||C.type!=="checkbox"&&C.type!=="radio"?_&&Uc(_.elementType)&&(pe=Yi):pe=hd;if(pe&&(pe=pe(e,_))){hn(U,pe,a,R);break e}Q&&Q(e,C,_),e==="focusout"&&_&&C.type==="number"&&_.memoizedProps.value!=null&&Dc(C,"number",C.value)}switch(Q=_?Sa(_):window,e){case"focusin":(fn(Q)||Q.contentEditable==="true")&&(dl=Q,Ca=_,mn=null);break;case"focusout":mn=Ca=dl=null;break;case"mousedown":Oa=!0;break;case"contextmenu":case"mouseup":case"dragend":Oa=!1,fl(U,a,R);break;case"selectionchange":if(Ic)break;case"keydown":case"keyup":fl(U,a,R)}var ae;if(Kc)e:{switch(e){case"compositionstart":var de="onCompositionStart";break e;case"compositionend":de="onCompositionEnd";break e;case"compositionupdate":de="onCompositionUpdate";break e}de=void 0}else ol?dn(e,a)&&(de="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(de="onCompositionStart");de&&(Gi&&a.locale!=="ko"&&(ol||de!=="onCompositionStart"?de==="onCompositionEnd"&&ol&&(ae=Bc()):(Ta=R,tc="value"in Ta?Ta.value:Ta.textContent,ol=!0)),Q=Xu(_,de),0<Q.length&&(de=new Lc(de,e,null,a,R),U.push({event:de,listeners:Q}),ae?de.data=ae:(ae=qi(a),ae!==null&&(de.data=ae)))),(ae=ie?wi(e,a):_a(e,a))&&(de=Xu(_,"onBeforeInput"),0<de.length&&(Q=new Lc("onBeforeInput","beforeinput",null,a,R),U.push({event:Q,listeners:de}),Q.data=ae)),kp(U,e,_,a,R)}Eh(U,t)})}function Es(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Xu(e,t){for(var a=t+"Capture",l=[];e!==null;){var c=e,i=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||i===null||(c=Aa(e,a),c!=null&&l.unshift(Es(e,c,i)),c=Aa(e,t),c!=null&&l.push(Es(e,c,i))),e.tag===3)return l;e=e.return}return[]}function Lp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ch(e,t,a,l,c){for(var i=t._reactName,u=[];a!==null&&a!==l;){var m=a,y=m.alternate,_=m.stateNode;if(m=m.tag,y!==null&&y===l)break;m!==5&&m!==26&&m!==27||_===null||(y=_,c?(_=Aa(a,i),_!=null&&u.unshift(Es(a,_,y))):c||(_=Aa(a,i),_!=null&&u.push(Es(a,_,y)))),a=a.return}u.length!==0&&e.push({event:t,listeners:u})}var qp=/\r\n?/g,wp=/\u0000|\uFFFD/g;function Oh(e){return(typeof e=="string"?e:""+e).replace(qp,`
|
|
49
|
+
`).replace(wp,"")}function Rh(e,t){return t=Oh(t),Oh(e)===t}function De(e,t,a,l,c,i){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||oa(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&oa(e,""+l);break;case"className":$l(e,"class",l);break;case"tabIndex":$l(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":$l(e,a,l);break;case"style":ct(e,l,i);break;case"data":if(t!=="object"){$l(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=kc(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(t!=="input"&&De(e,t,"name",c.name,c,null),De(e,t,"formEncType",c.formEncType,c,null),De(e,t,"formMethod",c.formMethod,c,null),De(e,t,"formTarget",c.formTarget,c,null)):(De(e,t,"encType",c.encType,c,null),De(e,t,"method",c.method,c,null),De(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=kc(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=La);break;case"onScroll":l!=null&&oe("scroll",e);break;case"onScrollEnd":l!=null&&oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=kc(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":oe("beforetoggle",e),oe("toggle",e),St(e,"popover",l);break;case"xlinkActuate":At(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":At(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":At(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":At(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":At(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":At(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":At(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":At(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":At(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":St(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=an.get(a)||a,St(e,a,l))}}function _r(e,t,a,l,c,i){switch(a){case"style":ct(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof l=="string"?oa(e,l):(typeof l=="number"||typeof l=="bigint")&&oa(e,""+l);break;case"onScroll":l!=null&&oe("scroll",e);break;case"onScrollEnd":l!=null&&oe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=La);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Mi.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),i=e[gt]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,c),typeof l=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,c);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):St(e,a,l)}}}function Ct(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":oe("error",e),oe("load",e);var l=!1,c=!1,i;for(i in a)if(a.hasOwnProperty(i)){var u=a[i];if(u!=null)switch(i){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:De(e,t,i,u,a,null)}}c&&De(e,t,"srcSet",a.srcSet,a,null),l&&De(e,t,"src",a.src,a,null);return;case"input":oe("invalid",e);var m=i=u=c=null,y=null,_=null;for(l in a)if(a.hasOwnProperty(l)){var R=a[l];if(R!=null)switch(l){case"name":c=R;break;case"type":u=R;break;case"checked":y=R;break;case"defaultChecked":_=R;break;case"value":i=R;break;case"defaultValue":m=R;break;case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(137,t));break;default:De(e,t,l,R,a,null)}}Wn(e,i,m,y,_,u,c,!1);return;case"select":oe("invalid",e),l=u=i=null;for(c in a)if(a.hasOwnProperty(c)&&(m=a[c],m!=null))switch(c){case"value":i=m;break;case"defaultValue":u=m;break;case"multiple":l=m;default:De(e,t,c,m,a,null)}t=i,a=u,e.multiple=!!l,t!=null?Jt(e,!!l,t,!1):a!=null&&Jt(e,!!l,a,!0);return;case"textarea":oe("invalid",e),i=c=l=null;for(u in a)if(a.hasOwnProperty(u)&&(m=a[u],m!=null))switch(u){case"value":l=m;break;case"defaultValue":c=m;break;case"children":i=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:De(e,t,u,m,a,null)}Pl(e,l,c,i);return;case"option":for(y in a)if(a.hasOwnProperty(y)&&(l=a[y],l!=null))switch(y){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:De(e,t,y,l,a,null)}return;case"dialog":oe("beforetoggle",e),oe("toggle",e),oe("cancel",e),oe("close",e);break;case"iframe":case"object":oe("load",e);break;case"video":case"audio":for(l=0;l<Ts.length;l++)oe(Ts[l],e);break;case"image":oe("error",e),oe("load",e);break;case"details":oe("toggle",e);break;case"embed":case"source":case"link":oe("error",e),oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(_ in a)if(a.hasOwnProperty(_)&&(l=a[_],l!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:De(e,t,_,l,a,null)}return;default:if(Uc(t)){for(R in a)a.hasOwnProperty(R)&&(l=a[R],l!==void 0&&_r(e,t,R,l,a,void 0));return}}for(m in a)a.hasOwnProperty(m)&&(l=a[m],l!=null&&De(e,t,m,l,a,null))}function Yp(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,i=null,u=null,m=null,y=null,_=null,R=null;for(O in a){var U=a[O];if(a.hasOwnProperty(O)&&U!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":y=U;default:l.hasOwnProperty(O)||De(e,t,O,null,l,U)}}for(var C in l){var O=l[C];if(U=a[C],l.hasOwnProperty(C)&&(O!=null||U!=null))switch(C){case"type":i=O;break;case"name":c=O;break;case"checked":_=O;break;case"defaultChecked":R=O;break;case"value":u=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==U&&De(e,t,C,O,l,U)}}zt(e,u,m,y,_,R,i,c);return;case"select":O=u=m=C=null;for(i in a)if(y=a[i],a.hasOwnProperty(i)&&y!=null)switch(i){case"value":break;case"multiple":O=y;default:l.hasOwnProperty(i)||De(e,t,i,null,l,y)}for(c in l)if(i=l[c],y=a[c],l.hasOwnProperty(c)&&(i!=null||y!=null))switch(c){case"value":C=i;break;case"defaultValue":m=i;break;case"multiple":u=i;default:i!==y&&De(e,t,c,i,l,y)}t=m,a=u,l=O,C!=null?Jt(e,!!a,C,!1):!!l!=!!a&&(t!=null?Jt(e,!!a,t,!0):Jt(e,!!a,a?[]:"",!1));return;case"textarea":O=C=null;for(m in a)if(c=a[m],a.hasOwnProperty(m)&&c!=null&&!l.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:De(e,t,m,null,l,c)}for(u in l)if(c=l[u],i=a[u],l.hasOwnProperty(u)&&(c!=null||i!=null))switch(u){case"value":C=c;break;case"defaultValue":O=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==i&&De(e,t,u,c,l,i)}Di(e,C,O);return;case"option":for(var X in a)if(C=a[X],a.hasOwnProperty(X)&&C!=null&&!l.hasOwnProperty(X))switch(X){case"selected":e.selected=!1;break;default:De(e,t,X,null,l,C)}for(y in l)if(C=l[y],O=a[y],l.hasOwnProperty(y)&&C!==O&&(C!=null||O!=null))switch(y){case"selected":e.selected=C&&typeof C!="function"&&typeof C!="symbol";break;default:De(e,t,y,C,l,O)}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 $ in a)C=a[$],a.hasOwnProperty($)&&C!=null&&!l.hasOwnProperty($)&&De(e,t,$,null,l,C);for(_ in l)if(C=l[_],O=a[_],l.hasOwnProperty(_)&&C!==O&&(C!=null||O!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(r(137,t));break;default:De(e,t,_,C,l,O)}return;default:if(Uc(t)){for(var Ue in a)C=a[Ue],a.hasOwnProperty(Ue)&&C!==void 0&&!l.hasOwnProperty(Ue)&&_r(e,t,Ue,void 0,l,C);for(R in l)C=l[R],O=a[R],!l.hasOwnProperty(R)||C===O||C===void 0&&O===void 0||_r(e,t,R,C,l,O);return}}for(var N in a)C=a[N],a.hasOwnProperty(N)&&C!=null&&!l.hasOwnProperty(N)&&De(e,t,N,null,l,C);for(U in l)C=l[U],O=a[U],!l.hasOwnProperty(U)||C===O||C==null&&O==null||De(e,t,U,C,l,O)}function zh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Xp(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var c=a[l],i=c.transferSize,u=c.initiatorType,m=c.duration;if(i&&m&&zh(u)){for(u=0,m=c.responseEnd,l+=1;l<a.length;l++){var y=a[l],_=y.startTime;if(_>m)break;var R=y.transferSize,U=y.initiatorType;R&&zh(U)&&(y=y.responseEnd,u+=R*(y<m?1:(m-_)/(y-_)))}if(--l,t+=8*(i+u)/(c.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 Cr=null,Or=null;function Qu(e){return e.nodeType===9?e:e.ownerDocument}function Mh(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 Dh(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 Rr(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 zr=null;function Qp(){var e=window.event;return e&&e.type==="popstate"?e===zr?!1:(zr=e,!0):(zr=null,!1)}var Uh=typeof setTimeout=="function"?setTimeout:void 0,Zp=typeof clearTimeout=="function"?clearTimeout:void 0,kh=typeof Promise=="function"?Promise:void 0,Vp=typeof queueMicrotask=="function"?queueMicrotask:typeof kh<"u"?function(e){return kh.resolve(null).then(e).catch(Kp)}:Uh;function Kp(e){setTimeout(function(){throw e})}function zn(e){return e==="head"}function Bh(e,t){var a=t,l=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(c),Si(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")_s(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,_s(a);for(var i=a.firstChild;i;){var u=i.nextSibling,m=i.nodeName;i[al]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=u}}else a==="body"&&_s(e.ownerDocument.body);a=c}while(a);Si(t)}function Hh(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Mr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Mr(a),Rc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Jp(e,t,a,l){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[al])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Da(e.nextSibling),e===null)break}return null}function Ip(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Da(e.nextSibling),e===null))return null;return e}function Gh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Da(e.nextSibling),e===null))return null;return e}function Dr(e){return e.data==="$?"||e.data==="$~"}function Ur(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $p(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Da(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 kr=null;function Lh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Da(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function qh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function wh(e,t,a){switch(t=Qu(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function _s(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Rc(e)}var Ua=new Map,Yh=new Set;function Zu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Zl=G.d;G.d={f:Wp,r:Fp,D:Pp,C:ey,L:ty,m:ay,X:ny,S:ly,M:cy};function Wp(){var e=Zl.f(),t=Bu();return e||t}function Fp(e){var t=Na(e);t!==null&&t.tag===5&&t.type==="form"?nf(t):Zl.r(e)}var xi=typeof document>"u"?null:document;function Xh(e,t,a){var l=xi;if(l&&typeof t=="string"&&t){var c=Gt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Yh.has(c)||(Yh.add(c),e={rel:e,crossOrigin:a,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),Ct(t,"link",e),Pe(t),l.head.appendChild(t)))}}function Pp(e){Zl.D(e),Xh("dns-prefetch",e,null)}function ey(e,t){Zl.C(e,t),Xh("preconnect",e,t)}function ty(e,t,a){Zl.L(e,t,a);var l=xi;if(l&&e&&t){var c='link[rel="preload"][as="'+Gt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Gt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Gt(a.imageSizes)+'"]')):c+='[href="'+Gt(e)+'"]';var i=c;switch(t){case"style":i=ji(e);break;case"script":i=Ni(e)}Ua.has(i)||(e=j({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ua.set(i,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Cs(i))||t==="script"&&l.querySelector(Os(i))||(t=l.createElement("link"),Ct(t,"link",e),Pe(t),l.head.appendChild(t)))}}function ay(e,t){Zl.m(e,t);var a=xi;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Gt(l)+'"][href="'+Gt(e)+'"]',i=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ni(e)}if(!Ua.has(i)&&(e=j({rel:"modulepreload",href:e},t),Ua.set(i,e),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Os(i)))return}l=a.createElement("link"),Ct(l,"link",e),Pe(l),a.head.appendChild(l)}}}function ly(e,t,a){Zl.S(e,t,a);var l=xi;if(l&&e){var c=ll(l).hoistableStyles,i=ji(e);t=t||"default";var u=c.get(i);if(!u){var m={loading:0,preload:null};if(u=l.querySelector(Cs(i)))m.loading=5;else{e=j({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ua.get(i))&&Br(e,a);var y=u=l.createElement("link");Pe(y),Ct(y,"link",e),y._p=new Promise(function(_,R){y.onload=_,y.onerror=R}),y.addEventListener("load",function(){m.loading|=1}),y.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Vu(u,t,l)}u={type:"stylesheet",instance:u,count:1,state:m},c.set(i,u)}}}function ny(e,t){Zl.X(e,t);var a=xi;if(a&&e){var l=ll(a).hoistableScripts,c=Ni(e),i=l.get(c);i||(i=a.querySelector(Os(c)),i||(e=j({src:e,async:!0},t),(t=Ua.get(c))&&Hr(e,t),i=a.createElement("script"),Pe(i),Ct(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(c,i))}}function cy(e,t){Zl.M(e,t);var a=xi;if(a&&e){var l=ll(a).hoistableScripts,c=Ni(e),i=l.get(c);i||(i=a.querySelector(Os(c)),i||(e=j({src:e,async:!0,type:"module"},t),(t=Ua.get(c))&&Hr(e,t),i=a.createElement("script"),Pe(i),Ct(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(c,i))}}function Qh(e,t,a,l){var c=(c=F.current)?Zu(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=ji(a.href),a=ll(c).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ji(a.href);var i=ll(c).hoistableStyles,u=i.get(e);if(u||(c=c.ownerDocument||c,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,u),(i=c.querySelector(Cs(e)))&&!i._p&&(u.instance=i,u.state.loading=5),Ua.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ua.set(e,a),i||iy(c,e,a,u.state))),t&&l===null)throw Error(r(528,""));return u}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ni(a),a=ll(c).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ji(e){return'href="'+Gt(e)+'"'}function Cs(e){return'link[rel="stylesheet"]['+e+"]"}function Zh(e){return j({},e,{"data-precedence":e.precedence,precedence:null})}function iy(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Ct(t,"link",a),Pe(t),e.head.appendChild(t))}function Ni(e){return'[src="'+Gt(e)+'"]'}function Os(e){return"script[async]"+e}function Vh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Gt(a.href)+'"]');if(l)return t.instance=l,Pe(l),l;var c=j({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Pe(l),Ct(l,"style",c),Vu(l,a.precedence,e),t.instance=l;case"stylesheet":c=ji(a.href);var i=e.querySelector(Cs(c));if(i)return t.state.loading|=4,t.instance=i,Pe(i),i;l=Zh(a),(c=Ua.get(c))&&Br(l,c),i=(e.ownerDocument||e).createElement("link"),Pe(i);var u=i;return u._p=new Promise(function(m,y){u.onload=m,u.onerror=y}),Ct(i,"link",l),t.state.loading|=4,Vu(i,a.precedence,e),t.instance=i;case"script":return i=Ni(a.src),(c=e.querySelector(Os(i)))?(t.instance=c,Pe(c),c):(l=a,(c=Ua.get(i))&&(l=j({},a),Hr(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Pe(c),Ct(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Vu(l,a.precedence,e));return t.instance}function Vu(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,i=c,u=0;u<l.length;u++){var m=l[u];if(m.dataset.precedence===t)i=m;else if(i!==c)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Br(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Hr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ku=null;function Kh(e,t,a){if(Ku===null){var l=new Map,c=Ku=new Map;c.set(a,l)}else c=Ku,l=c.get(a),l||(l=new Map,c.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var i=a[c];if(!(i[al]||i[Xe]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(t)||"";u=e+u;var m=l.get(u);m?m.push(i):l.set(u,[i])}}return l}function Jh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function sy(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;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 Ih(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function uy(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=ji(l.href),i=t.querySelector(Cs(c));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ju.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,Pe(i);return}i=t.ownerDocument||t,l=Zh(l),(c=Ua.get(c))&&Br(l,c),i=i.createElement("link"),Pe(i);var u=i;u._p=new Promise(function(m,y){u.onload=m,u.onerror=y}),Ct(i,"link",l),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ju.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Gr=0;function oy(e,t){return e.stylesheets&&e.count===0&&$u(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&$u(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Gr===0&&(Gr=62500*Xp());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$u(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Gr?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function Ju(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$u(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Iu=null;function $u(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Iu=new Map,t.forEach(ry,e),Iu=null,Ju.call(e))}function ry(e,t){if(!(t.state.loading&4)){var a=Iu.get(e);if(a)var l=a.get(null);else{a=new Map,Iu.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<c.length;i++){var u=c[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(a.set(u.dataset.precedence,u),l=u)}l&&a.set(null,l)}c=t.instance,u=c.getAttribute("data-precedence"),i=a.get(u)||l,i===l&&a.set(null,c),a.set(u,c),this.count++,l=Ju.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),i?i.parentNode.insertBefore(c,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Rs={$$typeof:ke,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function dy(e,t,a,l,c,i,u,m,y){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=_c(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_c(0),this.hiddenUpdates=_c(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function $h(e,t,a,l,c,i,u,m,y,_,R,U){return e=new dy(e,t,a,u,y,_,R,U,m),t=1,i===!0&&(t|=24),i=Ut(3,null,null,t),e.current=i,i.stateNode=e,t=vo(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},jo(i),e}function Wh(e){return e?(e=vn,e):vn}function Fh(e,t,a,l,c,i){c=Wh(c),l.context===null?l.context=c:l.pendingContext=c,l=xn(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=jn(e,l,t),a!==null&&(la(a,e,t),us(a,e,t))}function Ph(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Lr(e,t){Ph(e,t),(e=e.alternate)&&Ph(e,t)}function em(e){if(e.tag===13||e.tag===31){var t=Za(e,67108864);t!==null&&la(t,e,67108864),Lr(e,67108864)}}function tm(e){if(e.tag===13||e.tag===31){var t=ga();t=Oc(t);var a=Za(e,t);a!==null&&la(a,e,t),Lr(e,t)}}var Wu=!0;function fy(e,t,a,l){var c=z.T;z.T=null;var i=G.p;try{G.p=2,qr(e,t,a,l)}finally{G.p=i,z.T=c}}function hy(e,t,a,l){var c=z.T;z.T=null;var i=G.p;try{G.p=8,qr(e,t,a,l)}finally{G.p=i,z.T=c}}function qr(e,t,a,l){if(Wu){var c=wr(l);if(c===null)Er(e,t,l,Fu,a),lm(e,l);else if(py(c,e,t,a,l))l.stopPropagation();else if(lm(e,l),t&4&&-1<my.indexOf(e)){for(;c!==null;){var i=Na(c);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=el(i.pendingLanes);if(u!==0){var m=i;for(m.pendingLanes|=2,m.entangledLanes|=2;u;){var y=1<<31-Ot(u);m.entanglements[1]|=y,u&=~y}xl(i),(ge&6)===0&&(Uu=ft()+500,As(0))}}break;case 31:case 13:m=Za(i,2),m!==null&&la(m,i,2),Bu(),Lr(i,2)}if(i=wr(l),i===null&&Er(e,t,l,Fu,a),i===c)break;c=i}c!==null&&l.stopPropagation()}else Er(e,t,l,null,a)}}function wr(e){return e=Pn(e),Yr(e)}var Fu=null;function Yr(e){if(Fu=null,e=Cl(e),e!==null){var t=k(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=A(t),e!==null)return e;e=null}else if(a===31){if(e=H(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Fu=e,null}function am(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(we()){case wn:return 2;case Yn:return 8;case Pa:case Ac:return 32;case _i:return 268435456;default:return 32}default:return 32}}var Xr=!1,Mn=null,Dn=null,Un=null,zs=new Map,Ms=new Map,kn=[],my="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 lm(e,t){switch(e){case"focusin":case"focusout":Mn=null;break;case"dragenter":case"dragleave":Dn=null;break;case"mouseover":case"mouseout":Un=null;break;case"pointerover":case"pointerout":zs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ms.delete(t.pointerId)}}function Ds(e,t,a,l,c,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:i,targetContainers:[c]},t!==null&&(t=Na(t),t!==null&&em(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function py(e,t,a,l,c){switch(t){case"focusin":return Mn=Ds(Mn,e,t,a,l,c),!0;case"dragenter":return Dn=Ds(Dn,e,t,a,l,c),!0;case"mouseover":return Un=Ds(Un,e,t,a,l,c),!0;case"pointerover":var i=c.pointerId;return zs.set(i,Ds(zs.get(i)||null,e,t,a,l,c)),!0;case"gotpointercapture":return i=c.pointerId,Ms.set(i,Ds(Ms.get(i)||null,e,t,a,l,c)),!0}return!1}function nm(e){var t=Cl(e.target);if(t!==null){var a=k(t);if(a!==null){if(t=a.tag,t===13){if(t=A(a),t!==null){e.blockedOn=t,Vn(e.priority,function(){tm(a)});return}}else if(t===31){if(t=H(a),t!==null){e.blockedOn=t,Vn(e.priority,function(){tm(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=wr(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Fn=l,a.target.dispatchEvent(l),Fn=null}else return t=Na(a),t!==null&&em(t),e.blockedOn=a,!1;t.shift()}return!0}function cm(e,t,a){Pu(e)&&a.delete(t)}function yy(){Xr=!1,Mn!==null&&Pu(Mn)&&(Mn=null),Dn!==null&&Pu(Dn)&&(Dn=null),Un!==null&&Pu(Un)&&(Un=null),zs.forEach(cm),Ms.forEach(cm)}function eo(e,t){e.blockedOn===t&&(e.blockedOn=null,Xr||(Xr=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,yy)))}var to=null;function im(e){to!==e&&(to=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){to===e&&(to=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(Yr(l||a)===null)continue;break}var i=Na(a);i!==null&&(e.splice(t,3),t-=3,wo(i,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function Si(e){function t(y){return eo(y,e)}Mn!==null&&eo(Mn,e),Dn!==null&&eo(Dn,e),Un!==null&&eo(Un,e),zs.forEach(t),Ms.forEach(t);for(var a=0;a<kn.length;a++){var l=kn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<kn.length&&(a=kn[0],a.blockedOn===null);)nm(a),a.blockedOn===null&&kn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var c=a[l],i=a[l+1],u=c[gt]||null;if(typeof i=="function")u||im(a);else if(u){var m=null;if(i&&i.hasAttribute("formAction")){if(c=i,u=i[gt]||null)m=u.formAction;else if(Yr(c)!==null)continue}else m=u.action;typeof m=="function"?a[l+1]=m:(a.splice(l,3),l-=3),im(a)}}}function sm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return c=u})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Qr(e){this._internalRoot=e}ao.prototype.render=Qr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,l=ga();Fh(a,l,e,t,null,null)},ao.prototype.unmount=Qr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fh(e.current,2,null,e,null,null),Bu(),t[Ga]=null}};function ao(e){this._internalRoot=e}ao.prototype.unstable_scheduleHydration=function(e){if(e){var t=zi();e={blockedOn:null,target:e,priority:t};for(var a=0;a<kn.length&&t!==0&&t<kn[a].priority;a++);kn.splice(a,0,e),a===0&&nm(e)}};var um=d.version;if(um!=="19.2.4")throw Error(r(527,um,"19.2.4"));G.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=g(t),e=e!==null?Z(e):null,e=e===null?null:e.stateNode,e};var vy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lo.isDisabled&&lo.supportsFiber)try{Jl=lo.inject(vy),Nt=lo}catch{}}return ks.createRoot=function(e,t){if(!p(e))throw Error(r(299));var a=!1,l="",c=pf,i=yf,u=vf;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=$h(e,1,!1,null,null,a,l,null,c,i,u,sm),e[Ga]=t.current,Tr(e),new Qr(t)},ks.hydrateRoot=function(e,t,a){if(!p(e))throw Error(r(299));var l=!1,c="",i=pf,u=yf,m=vf,y=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(u=a.onCaughtError),a.onRecoverableError!==void 0&&(m=a.onRecoverableError),a.formState!==void 0&&(y=a.formState)),t=$h(e,1,!0,t,a??null,l,c,y,i,u,m,sm),t.context=Wh(null),a=t.current,l=ga(),l=Oc(l),c=xn(l),c.callback=null,jn(a,c,l),a=l,t.current.lanes=a,Il(t,a),xl(t),e[Ga]=t.current,Tr(e),new ao(t)},ks.version="19.2.4",ks}var gm;function Ry(){if(gm)return Jr.exports;gm=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(d){console.error(d)}}return s(),Jr.exports=Oy(),Jr.exports}var zy=Ry();const My=Vm(zy),Dy="modulepreload",Uy=function(s,d){return new URL(s,d).href},bm={},ky=function(d,o,r){let p=Promise.resolve();if(o&&o.length>0){let A=function(Z){return Promise.all(Z.map(j=>Promise.resolve(j).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};const H=document.getElementsByTagName("link"),B=document.querySelector("meta[property=csp-nonce]"),g=(B==null?void 0:B.nonce)||(B==null?void 0:B.getAttribute("nonce"));p=A(o.map(Z=>{if(Z=Uy(Z,r),Z in bm)return;bm[Z]=!0;const j=Z.endsWith(".css"),w=j?'[rel="stylesheet"]':"";if(!!r)for(let me=H.length-1;me>=0;me--){const Fe=H[me];if(Fe.href===Z&&(!j||Fe.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${Z}"]${w}`))return;const Ee=document.createElement("link");if(Ee.rel=j?"stylesheet":Dy,j||(Ee.as="script"),Ee.crossOrigin="",Ee.href=Z,g&&Ee.setAttribute("nonce",g),document.head.appendChild(Ee),j)return new Promise((me,Fe)=>{Ee.addEventListener("load",me),Ee.addEventListener("error",()=>Fe(new Error(`Unable to preload CSS for ${Z}`)))})}))}function k(A){const H=new Event("vite:preloadError",{cancelable:!0});if(H.payload=A,window.dispatchEvent(H),!H.defaultPrevented)throw A}return p.then(A=>{for(const H of A||[])H.status==="rejected"&&k(H.reason);return d().catch(k)})},Ze="2026-03-18T01:13:09.680Z",By=[{id:"node_recallx",type:"project",status:"active",canonicality:"canonical",visibility:"normal",title:"RecallX",body:`RecallX is a local-first knowledge substrate for durable notes, projects, decisions, references, activities, and graph relationships shared across humans and tools.
|
|
50
|
+
|
|
51
|
+
The current slice focuses on durable storage, fast retrieval, provenance, and automatic governance.`,summary:"Shared local memory layer for humans and agents.",createdBy:"고주환",sourceType:"human",sourceLabel:"manual",tags:["workspace","memory","local-first"],createdAt:Ze,updatedAt:Ze,metadata:{stage:"build",priority:"core"}},{id:"node_v1_governance",type:"decision",status:"active",canonicality:"canonical",visibility:"normal",title:"v1 governance rules",body:"Agent-created relations default to suggested. Automatic governance promotes, contests, or demotes content using deterministic local signals. Summary maintenance should stay cheap and deterministic.",summary:"Keep agent writes additive and automatically governed.",createdBy:"고주환",sourceType:"human",sourceLabel:"docs",tags:["governance","automation","rules"],createdAt:Ze,updatedAt:Ze,metadata:{doc:"docs/promotion-rules.md",scope:"v1"}},{id:"node_api_surface",type:"spec",status:"active",canonicality:"suggested",visibility:"normal",title:"Local API surface",body:"Expose /api/v1/nodes, /api/v1/relations, /api/v1/activities, and /api/v1/retrieval routes through a loopback-only service. Keep read operations simple and append-first writes attributable.",summary:"Thin loopback API for local tools and UI.",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",tags:["api","cli","integration"],createdAt:Ze,updatedAt:Ze,metadata:{transport:"http",version:"v1"}},{id:"node_retrieval",type:"note",status:"active",canonicality:"appended",visibility:"normal",title:"Retrieval should be summary-first",body:"Fast context assembly should prefer summaries, recent activity digests, and a compact shortlist before reaching for full bodies or deeper traversal.",summary:"Search should return a working set, not the whole graph.",createdBy:"Codex",sourceType:"agent",sourceLabel:"retrieval notes",tags:["retrieval","scout","performance"],createdAt:Ze,updatedAt:Ze,metadata:{bundle:"compact",hotPath:!0}},{id:"node_governance_policy",type:"question",status:"draft",canonicality:"generated",visibility:"normal",title:"How should governance issues be surfaced?",body:"We need a simple way to surface contested and low-confidence entities while keeping the governance surface compact and operational.",summary:"Open question about governance surfacing.",createdBy:"고주환",sourceType:"human",sourceLabel:"planning",tags:["governance","triage"],createdAt:Ze,updatedAt:Ze,metadata:{status:"pending"}},{id:"node_openclaw",type:"reference",status:"active",canonicality:"imported",visibility:"normal",title:"OpenClaw session summary pattern",body:"Session summaries should land as activity by default unless they carry durable cross-tool knowledge or a decision. High-value outputs become suggested notes.",summary:"Imported integration guidance from docs.",createdBy:"system",sourceType:"import",sourceLabel:"docs import",tags:["integration","openclaw"],createdAt:Ze,updatedAt:Ze,metadata:{importSource:"docs/archive/integrations.md"}}],Hy=[{id:"rel_1",fromNodeId:"node_v1_governance",toNodeId:"node_recallx",relationType:"relevant_to",status:"active",createdBy:"고주환",sourceType:"human",sourceLabel:"manual",createdAt:Ze,metadata:{}},{id:"rel_2",fromNodeId:"node_api_surface",toNodeId:"node_recallx",relationType:"relevant_to",status:"active",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",createdAt:Ze,metadata:{}},{id:"rel_3",fromNodeId:"node_retrieval",toNodeId:"node_recallx",relationType:"relevant_to",status:"active",createdBy:"Codex",sourceType:"agent",sourceLabel:"retrieval notes",createdAt:Ze,metadata:{}},{id:"rel_4",fromNodeId:"node_recallx",toNodeId:"node_api_surface",relationType:"related_to",status:"suggested",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",createdAt:Ze,metadata:{}},{id:"rel_5",fromNodeId:"node_retrieval",toNodeId:"node_api_surface",relationType:"supports",status:"active",createdBy:"Codex",sourceType:"agent",sourceLabel:"retrieval notes",createdAt:Ze,metadata:{}}],Gy=[{id:"act_1",targetNodeId:"node_recallx",activityType:"note_appended",body:"Created the project hub and aligned the workspace name to RecallX.",createdBy:"고주환",sourceType:"human",sourceLabel:"manual",createdAt:Ze,metadata:{}},{id:"act_2",targetNodeId:"node_api_surface",activityType:"agent_run_summary",body:"Codex documented the initial API contract and suggested a thin local HTTP surface.",createdBy:"Codex",sourceType:"agent",sourceLabel:"docs synthesis",createdAt:Ze,metadata:{runId:"run_123"}},{id:"act_3",targetNodeId:"node_governance_policy",activityType:"review_action",body:"Governance issue triage still needs a clear priority rule for contested entities and suggested notes.",createdBy:"고주환",sourceType:"human",sourceLabel:"planning",createdAt:Ze,metadata:{}}],Ly=[{id:"art_1",nodeId:"node_api_surface",path:"artifacts/reports/api-contract.md",mimeType:"text/markdown",sizeBytes:4096,checksum:"sha256:recallx-api-contract",createdBy:"Codex",sourceLabel:"docs synthesis",createdAt:Ze,metadata:{kind:"report"}}],qy=[{id:"int_1",name:"Claude Code",kind:"claude_code",status:"active",capabilities:["read_search","get_context_bundle","append_activity"],updatedAt:Ze},{id:"int_2",name:"Codex",kind:"codex",status:"active",capabilities:["read_search","get_context_bundle","create_node","create_relation"],updatedAt:Ze}],wy={workspace:{name:"RecallX",rootPath:"/Users/name/Documents/RecallX",schemaVersion:1,apiBind:"127.0.0.1:8787",integrationModes:["read-only","append-only"],authMode:"optional"},nodes:By,relations:Hy,activities:Gy,artifacts:Ly,integrations:qy,pinnedProjectIds:["node_recallx"],recentNodeIds:["node_api_surface","node_v1_governance","node_retrieval"]},Yy="1.2.0";function Xy(s,d){return s&&s.trim()?s:d}function Qy(s,d){return s&&s.trim()?s:d}function Ti(s,d="unknown"){return s&&s.trim()?s:d}function xm(s){return{id:s.id,type:s.type,status:s.status,canonicality:s.canonicality,title:typeof s.title=="string"?s.title:null,summary:typeof s.summary=="string"?s.summary:null,sourceLabel:typeof s.sourceLabel=="string"?s.sourceLabel:null,updatedAt:s.updatedAt??s.updated_at??new Date().toISOString(),tags:Array.isArray(s.tags)?s.tags:[],matchReason:s.matchReason,lexicalQuality:s.lexicalQuality}}function Km(s){const d=Ti(s.sourceLabel),o=Qy(s.summary,"No summary yet.");return{id:s.id,type:s.type,status:s.status,canonicality:s.canonicality,visibility:"normal",title:Xy(s.title,s.id),body:s.body??"",summary:o,createdBy:d,sourceType:"system",sourceLabel:d,tags:s.tags,createdAt:s.createdAt,updatedAt:s.updatedAt,metadata:{}}}function Zy(s){return Km({id:s.id,type:s.type,status:s.status,canonicality:s.canonicality,title:s.title,summary:s.summary,sourceLabel:s.sourceLabel,tags:s.tags,createdAt:s.updatedAt,updatedAt:s.updatedAt})}function Vy(s){return Km({id:s.targetNodeId,type:s.targetNodeType??"note",status:s.targetNodeStatus??"active",canonicality:"suggested",title:s.targetNodeTitle,summary:s.body||"Matched activity hit.",sourceLabel:s.sourceLabel,tags:[],createdAt:s.createdAt,updatedAt:s.createdAt,body:s.body})}function Ky(s,d,o){const r=new Map;return s.forEach(p=>r.set(p.id,p)),d.forEach(p=>{r.has(p.id)||r.set(p.id,Zy(p))}),o.forEach(p=>{p.targetNodeId&&!r.has(p.targetNodeId)&&r.set(p.targetNodeId,Vy(p))}),r}function Jy(s,d){const o=new Set;return s.forEach(r=>o.add(r.id)),d.forEach(r=>{r.targetNodeId&&o.add(r.targetNodeId)}),o}function Iy(s,d){const o=new Map;return s.forEach(r=>{const p=Ti(r.sourceLabel);o.set(p,(o.get(p)??0)+1)}),d.forEach(r=>{const p=Ti(r.sourceLabel);o.set(p,(o.get(p)??0)+1)}),Array.from(o.entries()).sort((r,p)=>p[1]-r[1]||r[0].localeCompare(p[0])).map(([r])=>r)}function $y(s,d,o){const r=o.sourceLabel==="all"?null:Ti(o.sourceLabel).toLowerCase(),p=o.scope==="activities"?[]:s.filter(A=>o.nodeType!=="all"&&A.type!==o.nodeType?!1:r?Ti(A.sourceLabel).toLowerCase()===r:!0),k=o.scope==="nodes"?[]:d.filter(A=>o.activityType!=="all"&&A.activityType!==o.activityType?!1:r?Ti(A.sourceLabel).toLowerCase()===r:!0);return{nodes:p,activities:k,total:p.length+k.length}}function jm(s,d,o=5){const r=d.trim();if(!r)return s.slice(0,o);const p=r.toLowerCase();return[r,...s.filter(k=>k.trim().toLowerCase()!==p)].slice(0,o)}const Jm=window.__RECALLX_API_BASE__??"/api/v1",jl={actorType:"human",actorLabel:"recallx-renderer",toolName:"recallx-renderer",toolVersion:Yy};let od=null;const so=new Map;class uo extends Error{constructor(o,r,p){super(p);Zr(this,"kind");Zr(this,"status");this.kind=o,this.status=r}}function Im(s){return structuredClone(s)}let Fr=null;function Bt(){return Fr||(Fr=Im(wy)),Fr}function oo(s){const d=(s==null?void 0:s.data)??s;return{name:d.workspaceName??d.name??"RecallX",rootPath:d.rootPath??d.workspaceRoot??"",schemaVersion:d.schemaVersion??1,apiBind:d.bindAddress??d.apiBind??"127.0.0.1:8787",integrationModes:d.enabledIntegrationModes??d.integrationModes??["read-only","append-only"],authMode:d.authMode==="bearer"?"bearer":"optional",paths:d.paths?{dbPath:d.paths.dbPath??"",artifactsDir:d.paths.artifactsDir??"",exportsDir:d.paths.exportsDir??"",importsDir:d.paths.importsDir??"",backupsDir:d.paths.backupsDir??"",configDir:d.paths.configDir??"",cacheDir:d.paths.cacheDir??""}:void 0,safety:d.safety?{machineId:d.safety.machineId??"unknown-machine",sessionId:d.safety.sessionId??"unknown-session",lastOpenedAt:d.safety.lastOpenedAt??new Date().toISOString(),lastCleanCloseAt:d.safety.lastCleanCloseAt??null,lockPresent:!!d.safety.lockPresent,lockUpdatedAt:d.safety.lockUpdatedAt??null,activeSessionMachineId:d.safety.activeSessionMachineId??null,warnings:Array.isArray(d.safety.warnings)?d.safety.warnings.map(o=>({code:(o==null?void 0:o.code)??"unclean_shutdown",message:(o==null?void 0:o.message)??"Workspace safety warning."})):[]}:void 0}}function Vt(s){return(s==null?void 0:s.data)??s}function Wy(s){const d=Vt(s);return Array.isArray(d==null?void 0:d.items)?d.items:[]}function Fy(s){var o;const d=Vt(s);return Array.isArray((o=d==null?void 0:d.bundle)==null?void 0:o.items)?d.bundle.items:[]}function Ei(s,d){return Wy(s).map(d)}function Py(s){return{...oo(s),isCurrent:!!(s!=null&&s.isCurrent),lastOpenedAt:(s==null?void 0:s.lastOpenedAt)??new Date().toISOString()}}function ev(s){return Array.isArray(s)?s.map(Py):[]}function ro(s){const d=Vt(s);return{current:oo(d==null?void 0:d.current),items:ev(d==null?void 0:d.items)}}function Wa(s){return{id:s.id,type:s.type,status:s.status,canonicality:s.canonicality,visibility:s.visibility??"normal",title:s.title??"Untitled",body:s.body??"",summary:s.summary??"No summary yet.",createdBy:s.createdBy??s.created_by??s.sourceLabel??"unknown",sourceType:s.sourceType??s.source_type??"system",sourceLabel:s.sourceLabel??s.source_label??"system",tags:Array.isArray(s.tags)?s.tags:[],createdAt:s.createdAt??s.created_at??new Date().toISOString(),updatedAt:s.updatedAt??s.updated_at??s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function $m(s){return{id:s.id,targetNodeId:s.targetNodeId??s.target_node_id,activityType:s.activityType??s.activity_type,body:s.body??"",createdBy:s.createdBy??s.created_by??s.sourceLabel??"unknown",sourceType:s.sourceType??s.source_type??"system",sourceLabel:s.sourceLabel??s.source_label??"system",createdAt:s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function Wm(s){return{id:s.id,fromNodeId:s.fromNodeId??s.from_node_id,toNodeId:s.toNodeId??s.to_node_id,relationType:s.relationType??s.relation_type,status:s.status??"suggested",createdBy:s.createdBy??s.created_by??s.sourceLabel??"unknown",sourceType:s.sourceType??s.source_type??"system",sourceLabel:s.sourceLabel??s.source_label??"system",createdAt:s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function Fm(s){return{entityType:s.entityType??s.entity_type,entityId:s.entityId??s.entity_id,state:s.state??"healthy",confidence:typeof s.confidence=="number"?s.confidence:0,reasons:Array.isArray(s.reasons)?s.reasons:[],lastEvaluatedAt:s.lastEvaluatedAt??s.last_evaluated_at??new Date().toISOString(),lastTransitionAt:s.lastTransitionAt??s.last_transition_at??new Date().toISOString(),metadata:s.metadata??{}}}function tv(s){const d=Fm(s);return{...d,title:s.title??s.display_title??`${d.entityType}:${d.entityId}`,subtitle:s.subtitle??s.display_subtitle??""}}function Pm(s){return{id:s.id??`gov-event:${s.entityType??s.entity_type}:${s.entityId??s.entity_id}:${s.eventType??s.event_type??"evaluated"}`,entityType:s.entityType??s.entity_type??"node",entityId:s.entityId??s.entity_id,eventType:s.eventType??s.event_type??"evaluated",previousState:s.previousState??s.previous_state??null,nextState:s.nextState??s.next_state??"healthy",confidence:typeof s.confidence=="number"?s.confidence:0,reason:s.reason??"No governance reason available.",createdAt:s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{},title:s.title??s.display_title??void 0,subtitle:s.subtitle??s.display_subtitle??void 0}}function av(s){var o;const d=Pm(s);return{...d,action:s.action??s.manualAction??((o=s.metadata)==null?void 0:o.manualAction)??null,title:s.title??s.display_title??null,subtitle:s.subtitle??s.display_subtitle??null,nodeId:s.nodeId??s.node_id??(d.entityType==="node"?d.entityId:null),fromNodeId:s.fromNodeId??s.from_node_id??null,toNodeId:s.toNodeId??s.to_node_id??null,relationType:s.relationType??s.relation_type??null}}function fo(s){return{state:s!=null&&s.state?Fm(s.state):null,events:Array.isArray(s==null?void 0:s.events)?s.events.map(Pm):[]}}function lv(s){return{id:s.id,nodeId:s.nodeId??s.node_id,path:s.path,mimeType:s.mimeType??s.mime_type??"application/octet-stream",sizeBytes:s.sizeBytes??s.size_bytes??0,checksum:s.checksum??"",createdBy:s.createdBy??s.created_by??s.sourceLabel??"unknown",sourceLabel:s.sourceLabel??s.source_label??"system",createdAt:s.createdAt??s.created_at??new Date().toISOString(),metadata:s.metadata??{}}}function nv(s,d=new Date().toISOString()){return{current:s,items:[{...s,isCurrent:!0,lastOpenedAt:d}]}}function cv(s){return s.status==="contested"?{entityType:"node",entityId:s.id,state:"contested",confidence:.22,reasons:["Historical contradiction or migration pressure is still attached to this node."],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{source:"fallback"}}:s.canonicality==="suggested"||s.canonicality==="generated"?{entityType:"node",entityId:s.id,state:"low_confidence",confidence:.56,reasons:["Suggested or generated content still needs repeated local confirmation signals."],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{source:"fallback"}}:{entityType:"node",entityId:s.id,state:"healthy",confidence:.86,reasons:["Canonical or appended content is currently stable in the fallback workspace."],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{source:"fallback"}}}function ep(s,d){return[{id:`gov-fallback:${s.id}`,entityType:"node",entityId:s.id,eventType:d.state==="contested"?"contested":"evaluated",previousState:null,nextState:d.state,confidence:d.confidence,reason:d.reasons[0]??"Fallback governance evaluation.",createdAt:s.updatedAt,metadata:{source:"fallback"}}]}function iv(s){const d=cv(s),o=Bt();return{node:s,related:o.relations.filter(r=>r.fromNodeId===s.id||r.toNodeId===s.id).map(r=>r.fromNodeId===s.id?r.toNodeId:r.fromNodeId).map(r=>o.nodes.find(p=>p.id===r)).filter(r=>!!r),activities:o.activities.filter(r=>r.targetNodeId===s.id),artifacts:o.artifacts.filter(r=>r.nodeId===s.id),governance:{state:d,events:ep(s,d)}}}function sv(s){return{id:s.id,name:s.name,kind:s.kind,status:s.status??"active",capabilities:Array.isArray(s.capabilities)?s.capabilities:[],updatedAt:s.updatedAt??s.updated_at??s.createdAt??s.created_at??new Date().toISOString()}}function uv(s,d){const o=Wa(d.node),r=d.edge??{},p={id:r.relationId??r.relation_id??`edge:${s}:${o.id}:${r.relationType??r.relation_type??"related_to"}`,fromNodeId:r.direction==="incoming"?o.id:s,toNodeId:r.direction==="incoming"?s:o.id,relationType:r.relationType??r.relation_type??"related_to",status:r.relationStatus??r.relation_status??"active",createdBy:r.generator??r.relationSource??"recallx",sourceType:r.relationSource==="inferred"?"system":"human",sourceLabel:r.relationSource==="inferred"?`inferred:${r.generator??"derived"}`:"canonical",createdAt:new Date().toISOString(),metadata:{}};return{node:o,relation:p,direction:r.direction==="incoming"?"incoming":"outgoing",hop:r.hop===2?2:1,viaNodeId:typeof d.viaNodeId=="string"?d.viaNodeId:void 0,viaNodeTitle:typeof d.viaNodeTitle=="string"?d.viaNodeTitle:void 0}}function ov(s){var o,r,p,k,A,H,B,g,Z;const d=Vt(s);return{nodes:Array.isArray(d==null?void 0:d.nodes)?d.nodes.map(j=>({id:j.id,title:j.title??"Untitled",type:j.type,status:j.status??"active",canonicality:j.canonicality??"appended",summary:j.summary??"No summary yet.",createdAt:j.createdAt??j.created_at??new Date().toISOString(),updatedAt:j.updatedAt??j.updated_at??j.createdAt??j.created_at??new Date().toISOString(),degree:typeof j.degree=="number"?j.degree:0,isFocus:!!j.isFocus,projectRole:j.projectRole==="focus"?"focus":"member"})):[],edges:Array.isArray(d==null?void 0:d.edges)?d.edges.map(j=>({id:j.id,source:j.source,target:j.target,relationType:j.relationType??j.relation_type??"related_to",relationSource:j.relationSource==="inferred"?"inferred":"canonical",status:j.status??"active",score:typeof j.score=="number"?j.score:null,generator:typeof j.generator=="string"?j.generator:null,createdAt:j.createdAt??j.created_at??new Date().toISOString(),evidence:j.evidence??{}})):[],timeline:Array.isArray(d==null?void 0:d.timeline)?d.timeline.map(j=>({id:j.id,kind:j.kind??"activity",at:j.at??new Date().toISOString(),nodeId:typeof j.nodeId=="string"?j.nodeId:void 0,edgeId:typeof j.edgeId=="string"?j.edgeId:void 0,label:j.label??"Graph event"})):[],meta:{focusProjectId:((o=d==null?void 0:d.meta)==null?void 0:o.focusProjectId)??((r=d==null?void 0:d.meta)==null?void 0:r.focus_project_id)??"",nodeCount:typeof((p=d==null?void 0:d.meta)==null?void 0:p.nodeCount)=="number"?d.meta.nodeCount:0,edgeCount:typeof((k=d==null?void 0:d.meta)==null?void 0:k.edgeCount)=="number"?d.meta.edgeCount:0,inferredEdgeCount:typeof((A=d==null?void 0:d.meta)==null?void 0:A.inferredEdgeCount)=="number"?d.meta.inferredEdgeCount:0,timeRange:{start:((B=(H=d==null?void 0:d.meta)==null?void 0:H.timeRange)==null?void 0:B.start)??null,end:((Z=(g=d==null?void 0:d.meta)==null?void 0:g.timeRange)==null?void 0:Z.end)??null}}}}function rv(s,d){var g,Z;const o=s.nodes.find(j=>j.id===d&&j.type==="project");if(!o)throw new Error("Project not found in fallback workspace.");const r=s.relations.filter(j=>j.relationType==="relevant_to"&&j.status!=="archived"&&j.status!=="rejected"&&(j.fromNodeId===d||j.toNodeId===d)),p=new Set([d]);r.forEach(j=>{p.add(j.fromNodeId===d?j.toNodeId:j.fromNodeId)});const k=s.nodes.filter(j=>p.has(j.id)).map(j=>({id:j.id,title:j.title,type:j.type,status:j.status,canonicality:j.canonicality,summary:j.summary,createdAt:j.createdAt,updatedAt:j.updatedAt,degree:s.relations.filter(w=>p.has(w.fromNodeId)&&p.has(w.toNodeId)&&(w.fromNodeId===j.id||w.toNodeId===j.id)).length,isFocus:j.id===d,projectRole:j.id===d?"focus":"member"})),A=new Map(k.map(j=>[j.id,j.title])),H=s.relations.filter(j=>p.has(j.fromNodeId)&&p.has(j.toNodeId)&&j.status!=="archived"&&j.status!=="rejected").map(j=>({id:j.id,source:j.fromNodeId,target:j.toNodeId,relationType:j.relationType,relationSource:"canonical",status:j.status,score:null,generator:null,createdAt:j.createdAt,evidence:{}})),B=[...k.map(j=>({id:`timeline-node:${j.id}`,kind:"node_created",at:j.createdAt,nodeId:j.id,label:`${j.title} created`})),...H.map(j=>({id:`timeline-edge:${j.id}`,kind:"relation_created",at:j.createdAt,edgeId:j.id,nodeId:j.source,label:`${A.get(j.source)??j.source} ${j.relationType.replaceAll("_"," ")} ${A.get(j.target)??j.target}`})),...s.activities.filter(j=>p.has(j.targetNodeId)).map(j=>({id:`timeline-activity:${j.id}`,kind:"activity",at:j.createdAt,nodeId:j.targetNodeId,label:`${j.activityType.replaceAll("_"," ")} on ${A.get(j.targetNodeId)??j.targetNodeId}`}))].sort((j,w)=>j.at.localeCompare(w.at)||j.id.localeCompare(w.id));return{nodes:k,edges:H,timeline:B,meta:{focusProjectId:d,nodeCount:k.length,edgeCount:H.length,inferredEdgeCount:0,timeRange:{start:((g=B[0])==null?void 0:g.at)??o.createdAt,end:((Z=B[B.length-1])==null?void 0:Z.at)??o.createdAt}}}}async function Ne(s,d){const o=rd();let r;try{r=await fetch(`${Jm}${s}`,{headers:{Accept:"application/json","Content-Type":"application/json",...o?{Authorization:`Bearer ${o}`}:{},...(d==null?void 0:d.headers)??{}},...d})}catch(p){throw new uo("network",0,p instanceof Error?p.message:"Network request failed.")}if(!r.ok)throw new uo("http",r.status,`Request failed: ${r.status}`);return r.json()}async function Kt(s,d){try{return await s()}catch(o){if(o instanceof uo&&o.kind==="network")return await d();throw o}}function rd(){const s=window.__RECALLX_API_TOKEN__;return s||od}function dv(s){od=s}function Pr(){od=null}function ed(s){return s instanceof uo&&s.status===401}function fv(){return`${Jm}/events`}function hv(){return Im(Bt())}async function mv(){return Kt(async()=>{const s=await Ne("/workspaces");return ro(s)},async()=>nv(Bt().workspace))}async function pv(){return Kt(async()=>{const s=await Ne("/bootstrap"),d=Vt(s),o=oo(d.workspace??d);return{workspace:o,authMode:d.authMode==="bearer"?"bearer":o.authMode,hasToken:!!rd()}},async()=>({workspace:Bt().workspace,authMode:"optional",hasToken:!1}))}async function yv(s){return Kt(async()=>{const d=s!=null&&s.length?`?keys=${encodeURIComponent(s.join(","))}`:"",o=await Ne(`/settings${d}`),r=Vt(o);return typeof(r==null?void 0:r.values)=="object"&&(r==null?void 0:r.values)!==null?r.values:{}},async()=>s!=null&&s.length?s.reduce((d,o)=>(so.has(o)&&(d[o]=so.get(o)),d),{}):Object.fromEntries(so.entries()))}async function vv(s){return Kt(async()=>{const d=await Ne("/settings",{method:"PATCH",body:JSON.stringify({values:s})}),o=Vt(d);return typeof(o==null?void 0:o.values)=="object"&&(o==null?void 0:o.values)!==null?o.values:{}},async()=>(Object.entries(s).forEach(([d,o])=>{so.set(d,o)}),s))}async function td(s){return Kt(async()=>{const d=await Ne("/context/bundles",{method:"POST",body:JSON.stringify({target:{id:s},mode:"compact",preset:"for-assistant",options:{includeRelated:!0,includeInferred:!0,includeRecentActivities:!1,includeDecisions:!0,includeOpenQuestions:!0,maxInferred:4,maxItems:6}})});return Fy(d).filter(o=>o&&typeof o.nodeId=="string"&&o.nodeId!==s).map(o=>({nodeId:o.nodeId,type:o.type,title:typeof o.title=="string"?o.title:null,summary:typeof o.summary=="string"?o.summary:null,reason:typeof o.reason=="string"?o.reason:"Included for context",relationId:typeof o.relationId=="string"?o.relationId:void 0,relationType:typeof o.relationType=="string"?o.relationType:void 0,relationSource:o.relationSource==="canonical"||o.relationSource==="inferred"?o.relationSource:void 0,relationScore:typeof o.relationScore=="number"?o.relationScore:void 0,retrievalRank:typeof o.retrievalRank=="number"?o.retrievalRank:void 0,generator:typeof o.generator=="string"?o.generator:null}))},async()=>[])}async function Nm(s){await Ne("/relation-usage-events",{method:"POST",body:JSON.stringify({relationId:s.relationId,relationSource:s.relationSource,eventType:s.eventType,sessionId:s.sessionId,delta:s.delta,source:jl,metadata:s.metadata??{}})})}async function gv(s){const d=await Ne("/workspaces",{method:"POST",body:JSON.stringify(s)});return ro(d)}async function bv(s){const d=await Ne("/workspaces/open",{method:"POST",body:JSON.stringify({rootPath:s})});return ro(d)}async function Sm(){const s=await Ne("/workspaces/backups");return Ei(s,d=>({id:d.id,label:d.label??d.id,createdAt:d.createdAt??new Date().toISOString(),backupPath:d.backupPath??"",workspaceRoot:d.workspaceRoot??"",workspaceName:d.workspaceName??"RecallX"}))}async function xv(s){var r,p,k,A,H,B,g;const d=await Ne("/workspaces/backups",{method:"POST",body:JSON.stringify(s?{label:s}:{})}),o=Vt(d);return{id:((r=o==null?void 0:o.backup)==null?void 0:r.id)??"",label:((p=o==null?void 0:o.backup)==null?void 0:p.label)??((k=o==null?void 0:o.backup)==null?void 0:k.id)??"snapshot",createdAt:((A=o==null?void 0:o.backup)==null?void 0:A.createdAt)??new Date().toISOString(),backupPath:((H=o==null?void 0:o.backup)==null?void 0:H.backupPath)??"",workspaceRoot:((B=o==null?void 0:o.backup)==null?void 0:B.workspaceRoot)??"",workspaceName:((g=o==null?void 0:o.backup)==null?void 0:g.workspaceName)??"RecallX"}}async function jv(s){var r,p,k,A,H,B;const d=await Ne("/workspaces/export",{method:"POST",body:JSON.stringify({format:s})}),o=Vt(d);return{id:((r=o==null?void 0:o.export)==null?void 0:r.id)??"",format:((p=o==null?void 0:o.export)==null?void 0:p.format)==="markdown"?"markdown":"json",createdAt:((k=o==null?void 0:o.export)==null?void 0:k.createdAt)??new Date().toISOString(),exportPath:((A=o==null?void 0:o.export)==null?void 0:A.exportPath)??"",workspaceRoot:((H=o==null?void 0:o.export)==null?void 0:H.workspaceRoot)??"",workspaceName:((B=o==null?void 0:o.export)==null?void 0:B.workspaceName)??"RecallX"}}async function Nv(s){var r,p,k,A,H,B,g,Z,j,w,Ge,Ee,me,Fe,nt,na,ke,dt,le,Ve;const d=await Ne("/workspaces/import",{method:"POST",body:JSON.stringify(s)}),o=Vt(d);return{format:((r=o==null?void 0:o.import)==null?void 0:r.format)==="markdown"?"markdown":"recallx_json",label:((p=o==null?void 0:o.import)==null?void 0:p.label)??"Workspace import",sourcePath:((k=o==null?void 0:o.import)==null?void 0:k.sourcePath)??"",importedPath:((A=o==null?void 0:o.import)==null?void 0:A.importedPath)??"",createdAt:((H=o==null?void 0:o.import)==null?void 0:H.createdAt)??new Date().toISOString(),options:{normalizeTitleWhitespace:((g=(B=o==null?void 0:o.import)==null?void 0:B.options)==null?void 0:g.normalizeTitleWhitespace)!==!1,trimBodyWhitespace:!!((j=(Z=o==null?void 0:o.import)==null?void 0:Z.options)!=null&&j.trimBodyWhitespace),duplicateMode:((Ge=(w=o==null?void 0:o.import)==null?void 0:w.options)==null?void 0:Ge.duplicateMode)==="skip_exact"?"skip_exact":"warn"},backupId:((Ee=o==null?void 0:o.import)==null?void 0:Ee.backupId)??"",backupPath:((me=o==null?void 0:o.import)==null?void 0:me.backupPath)??"",nodesCreated:typeof((Fe=o==null?void 0:o.import)==null?void 0:Fe.nodesCreated)=="number"?o.import.nodesCreated:0,relationsCreated:typeof((nt=o==null?void 0:o.import)==null?void 0:nt.relationsCreated)=="number"?o.import.relationsCreated:0,activitiesCreated:typeof((na=o==null?void 0:o.import)==null?void 0:na.activitiesCreated)=="number"?o.import.activitiesCreated:0,skippedNodes:typeof((ke=o==null?void 0:o.import)==null?void 0:ke.skippedNodes)=="number"?o.import.skippedNodes:0,skippedRelations:typeof((dt=o==null?void 0:o.import)==null?void 0:dt.skippedRelations)=="number"?o.import.skippedRelations:0,skippedActivities:typeof((le=o==null?void 0:o.import)==null?void 0:le.skippedActivities)=="number"?o.import.skippedActivities:0,warnings:Array.isArray((Ve=o==null?void 0:o.import)==null?void 0:Ve.warnings)?o.import.warnings.filter(te=>typeof te=="string"):[]}}async function Sv(s){var A,H,B;const d=await Ne("/workspaces/import/preview",{method:"POST",body:JSON.stringify(s)}),o=Vt(d),r=(o==null?void 0:o.preview)??{},p=g=>({title:(g==null?void 0:g.title)??"Imported node",sourcePath:(g==null?void 0:g.sourcePath)??"",matchType:(g==null?void 0:g.matchType)==="exact"?"exact":"title",existingNodeId:typeof(g==null?void 0:g.existingNodeId)=="string"?g.existingNodeId:null,existingNodeTitle:typeof(g==null?void 0:g.existingNodeTitle)=="string"?g.existingNodeTitle:null,existingSource:(g==null?void 0:g.existingSource)==="batch"?"batch":"workspace"}),k=g=>({title:(g==null?void 0:g.title)??"Imported node",type:(g==null?void 0:g.type)==="project"||(g==null?void 0:g.type)==="idea"||(g==null?void 0:g.type)==="question"||(g==null?void 0:g.type)==="decision"||(g==null?void 0:g.type)==="reference"||(g==null?void 0:g.type)==="artifact_ref"||(g==null?void 0:g.type)==="conversation"?g.type:"note",sourcePath:(g==null?void 0:g.sourcePath)??"",duplicateKind:(g==null?void 0:g.duplicateKind)==="exact"||(g==null?void 0:g.duplicateKind)==="title"?g.duplicateKind:null});return{format:(r==null?void 0:r.format)==="markdown"?"markdown":"recallx_json",label:(r==null?void 0:r.label)??"Workspace import",sourcePath:(r==null?void 0:r.sourcePath)??"",createdAt:(r==null?void 0:r.createdAt)??new Date().toISOString(),options:{normalizeTitleWhitespace:((A=r==null?void 0:r.options)==null?void 0:A.normalizeTitleWhitespace)!==!1,trimBodyWhitespace:!!((H=r==null?void 0:r.options)!=null&&H.trimBodyWhitespace),duplicateMode:((B=r==null?void 0:r.options)==null?void 0:B.duplicateMode)==="skip_exact"?"skip_exact":"warn"},nodesDetected:typeof(r==null?void 0:r.nodesDetected)=="number"?r.nodesDetected:0,relationsDetected:typeof(r==null?void 0:r.relationsDetected)=="number"?r.relationsDetected:0,activitiesDetected:typeof(r==null?void 0:r.activitiesDetected)=="number"?r.activitiesDetected:0,duplicateCandidates:typeof(r==null?void 0:r.duplicateCandidates)=="number"?r.duplicateCandidates:0,exactDuplicateCandidates:typeof(r==null?void 0:r.exactDuplicateCandidates)=="number"?r.exactDuplicateCandidates:0,nodesReady:typeof(r==null?void 0:r.nodesReady)=="number"?r.nodesReady:0,relationsReady:typeof(r==null?void 0:r.relationsReady)=="number"?r.relationsReady:0,activitiesReady:typeof(r==null?void 0:r.activitiesReady)=="number"?r.activitiesReady:0,skippedNodes:typeof(r==null?void 0:r.skippedNodes)=="number"?r.skippedNodes:0,skippedRelations:typeof(r==null?void 0:r.skippedRelations)=="number"?r.skippedRelations:0,skippedActivities:typeof(r==null?void 0:r.skippedActivities)=="number"?r.skippedActivities:0,warnings:Array.isArray(r==null?void 0:r.warnings)?r.warnings.filter(g=>typeof g=="string"):[],sampleItems:Array.isArray(r==null?void 0:r.sampleItems)?r.sampleItems.map(k):[],duplicateItems:Array.isArray(r==null?void 0:r.duplicateItems)?r.duplicateItems.map(p):[]}}async function Av(s){const d=await Ne("/workspaces/restore",{method:"POST",body:JSON.stringify(s)}),o=Vt(d);return{catalog:ro(d),autoBackup:o!=null&&o.autoBackup?{id:o.autoBackup.id??"",label:o.autoBackup.label??o.autoBackup.id??"snapshot",createdAt:o.autoBackup.createdAt??new Date().toISOString(),backupPath:o.autoBackup.backupPath??"",workspaceRoot:o.autoBackup.workspaceRoot??"",workspaceName:o.autoBackup.workspaceName??"RecallX"}:null}}async function Tv(s){return Kt(async()=>{const d=await Ne("/search",{method:"POST",body:JSON.stringify({query:s.query,scopes:["nodes","activities"],limit:s.limit??24,offset:s.offset??0,sort:"smart"})}),o=Vt(d),r=Array.isArray(o==null?void 0:o.items)?o.items:[];return{nodes:r.filter(p=>(p==null?void 0:p.resultType)==="node"&&p.node).map(p=>xm(p.node)),activities:r.filter(p=>(p==null?void 0:p.resultType)==="activity"&&p.activity).map(p=>({id:p.activity.id,targetNodeId:p.activity.targetNodeId??p.activity.target_node_id,targetNodeTitle:p.activity.targetNodeTitle??null,targetNodeType:p.activity.targetNodeType??null,targetNodeStatus:p.activity.targetNodeStatus??null,activityType:p.activity.activityType??p.activity.activity_type,body:p.activity.body??"",sourceLabel:p.activity.sourceLabel??"unknown",createdAt:p.activity.createdAt??p.activity.created_at??new Date().toISOString(),metadata:p.activity.metadata??{}})),total:typeof(o==null?void 0:o.total)=="number"?o.total:r.length}},async()=>{const d=s.query.trim().toLowerCase(),o=Bt().nodes.filter(r=>[r.title,r.summary,r.body,r.tags.join(" ")].join(" ").toLowerCase().includes(d));return{nodes:o.map(r=>xm(r)),activities:Bt().activities.filter(r=>r.body.toLowerCase().includes(d)).map(r=>{var p,k,A;return{id:r.id,targetNodeId:r.targetNodeId,targetNodeTitle:((p=Bt().nodes.find(H=>H.id===r.targetNodeId))==null?void 0:p.title)??null,targetNodeType:((k=Bt().nodes.find(H=>H.id===r.targetNodeId))==null?void 0:k.type)??null,targetNodeStatus:((A=Bt().nodes.find(H=>H.id===r.targetNodeId))==null?void 0:A.status)??null,activityType:r.activityType,body:r.body,sourceLabel:r.sourceLabel,createdAt:r.createdAt,metadata:r.metadata??{}}}),total:o.length}})}async function Ev(s){return Kt(async()=>{const[d,o,r]=await Promise.all([s!=null&&s.workspace?Promise.resolve(s.workspace):Ne("/workspace"),Ne("/nodes/search",{method:"POST",body:JSON.stringify({query:"",filters:{},limit:100,offset:0,sort:"updated_at"})}),Ne("/integrations")]),p=Ei(o,Wa),k=Ei(r,sv),A=p.slice(0,5).map(B=>B.id),H=p.filter(B=>B.type==="project").slice(0,3).map(B=>B.id);return{workspace:(s==null?void 0:s.workspace)??oo(d),nodes:p,relations:[],activities:[],artifacts:[],integrations:k,pinnedProjectIds:H,recentNodeIds:A}},async()=>hv())}async function no(s){return Kt(async()=>{const d=await Ne(`/nodes/${encodeURIComponent(s)}`),o=Vt(d);return{node:o!=null&&o.node?Wa(o.node):null,related:Array.isArray(o==null?void 0:o.related)?o.related.map(r=>Wa(r.node??r)):[],activities:Array.isArray(o==null?void 0:o.activities)?o.activities.map($m):[],artifacts:Array.isArray(o==null?void 0:o.artifacts)?o.artifacts.map(lv):[],governance:fo(o==null?void 0:o.governance)}},async()=>{const d=Bt().nodes.find(o=>o.id===s);return d?iv(d):void 0})}async function _v(s){return Kt(async()=>{const d=await Ne(`/relations/${encodeURIComponent(s)}`),o=Vt(d);return{relation:o!=null&&o.relation?Wm(o.relation):null,fromNode:o!=null&&o.fromNode?Wa(o.fromNode):null,toNode:o!=null&&o.toNode?Wa(o.toNode):null,governance:fo(o==null?void 0:o.governance)}},async()=>{const d=Bt(),o=d.relations.find(p=>p.id===s);if(!o)return;const r=o.status==="suggested"?{entityType:"relation",entityId:o.id,state:"low_confidence",confidence:.54,reasons:["Suggested relation still needs stronger confirmation or a direct human decision."],lastEvaluatedAt:o.createdAt,lastTransitionAt:o.createdAt,metadata:{source:"fallback"}}:{entityType:"relation",entityId:o.id,state:"healthy",confidence:.9,reasons:["Relation is stable in the fallback workspace."],lastEvaluatedAt:o.createdAt,lastTransitionAt:o.createdAt,metadata:{source:"fallback"}};return{relation:o,fromNode:d.nodes.find(p=>p.id===o.fromNodeId)??null,toNode:d.nodes.find(p=>p.id===o.toNodeId)??null,governance:{state:r,events:[{id:`gov-fallback:${o.id}`,entityType:"relation",entityId:o.id,eventType:r.state==="healthy"?"promoted":"evaluated",previousState:null,nextState:r.state,confidence:r.confidence,reason:r.reasons[0]??"Fallback governance evaluation.",createdAt:o.createdAt,metadata:{source:"fallback"},title:`${o.fromNodeId} ${o.relationType} ${o.toNodeId}`,subtitle:o.status}]}}})}function Am(s,d){const o=new Map(s.nodes.map(r=>[r.id,r]));return s.relations.reduce((r,p)=>{if(p.fromNodeId!==d&&p.toNodeId!==d||p.status==="archived")return r;const k=p.fromNodeId===d?p.toNodeId:p.fromNodeId,A=o.get(k);return!A||A.status==="archived"||r.push({node:A,relation:p,direction:p.fromNodeId===d?"outgoing":"incoming",hop:1}),r},[])}async function Cv(s,d){return Kt(async()=>{const o=await Ne(`/nodes/${encodeURIComponent(s)}/neighborhood?include_inferred=1&max_inferred=4&depth=${d}`);return Ei(o,r=>uv(s,r))},async()=>{const o=Bt(),r=Am(o,s);if(d===1)return r;const p=r.map(H=>Am(o,H.node.id).filter(B=>B.node.id!==s).map(B=>({...B,hop:2,viaNodeId:H.node.id,viaNodeTitle:H.node.title}))),k=[...r],A=new Set(r.map(H=>`${H.relation.id}:${H.node.id}:1`));return p.flat().forEach(H=>{const B=`${H.relation.id}:${H.node.id}:${H.viaNodeId??"direct"}`;A.has(B)||(A.add(B),k.push(H))}),k})}async function Ov(s){return Kt(async()=>{const d=await Ne(`/projects/${encodeURIComponent(s)}/graph?include_inferred=1&max_inferred=60`);return ov(d)},async()=>rv(Bt(),s))}async function Rv(){return Kt(async()=>{const s=await Ne("/governance/issues?limit=20");return Ei(s,tv)},async()=>Bt().nodes.filter(s=>s.status==="contested"||s.canonicality==="suggested").map(s=>({entityType:"node",entityId:s.id,state:s.status==="contested"?"contested":"low_confidence",confidence:s.status==="contested"?.2:.55,reasons:s.status==="contested"?["fallback contested node"]:["fallback suggested node"],lastEvaluatedAt:s.updatedAt,lastTransitionAt:s.updatedAt,metadata:{},title:s.title,subtitle:s.type})))}async function zv(s){return Kt(async()=>{var r,p;const d=new URLSearchParams;d.set("limit",String((s==null?void 0:s.limit)??12)),(r=s==null?void 0:s.entityTypes)!=null&&r.length&&d.set("entity_types",s.entityTypes.join(",")),(p=s==null?void 0:s.actions)!=null&&p.length&&d.set("actions",s.actions.join(","));const o=await Ne(`/governance/events?${d.toString()}`);return Ei(o,av)},async()=>[])}function Mv(s){if(typeof window>"u"||typeof window.fetch>"u")return()=>{};const d=new AbortController;let o=null;async function r(){var p;try{const k=rd(),A=await fetch(fv(),{headers:k?{Authorization:`Bearer ${k}`}:void 0,signal:d.signal});if(!A.ok||!A.body)throw new Error(`Workspace event stream failed (${A.status})`);const H=A.body.getReader(),B=new TextDecoder;let g="";for(;!d.signal.aborted;){const{done:Z,value:j}=await H.read();if(Z)break;g+=B.decode(j,{stream:!0});let w=Tm(g);for(;w>=0;){const Ge=g.slice(0,w);g=g.slice(Dv(g,w)),Uv(Ge,s.onWorkspaceUpdate),w=Tm(g)}}}catch{if(d.signal.aborted)return;(p=s.onError)==null||p.call(s)}d.signal.aborted||(o=window.setTimeout(()=>{o=null,r()},1e3))}return r(),()=>{d.abort(),o!==null&&window.clearTimeout(o)}}function Tm(s){const d=s.indexOf(`
|
|
52
|
+
|
|
53
|
+
`),o=s.indexOf(`\r
|
|
54
|
+
\r
|
|
55
|
+
`);return d<0?o:o<0?d:Math.min(d,o)}function Dv(s,d){return s.startsWith(`\r
|
|
56
|
+
\r
|
|
57
|
+
`,d)?d+4:d+2}function Uv(s,d){const o=s.split(/\r?\n/);let r="message";const p=[];for(const k of o){if(k.startsWith("event:")){r=k.slice(6).trim();continue}k.startsWith("data:")&&p.push(k.slice(5).trimStart())}if(!(r!=="workspace.updated"||p.length===0))try{d==null||d(JSON.parse(p.join(`
|
|
58
|
+
`)))}catch{}}async function kv(s){var o,r;const d=await Ne("/nodes",{method:"POST",body:JSON.stringify({type:s.type,title:s.title,body:s.body,tags:s.tags??[],source:jl,metadata:{createdFrom:"renderer-quick-capture",...s.projectId?{projectId:s.projectId}:{}}})});return{node:Wa((o=d==null?void 0:d.data)==null?void 0:o.node),landing:((r=d==null?void 0:d.data)==null?void 0:r.landing)??null}}async function Bv(s){var o;const d=await Ne(`/nodes/${encodeURIComponent(s)}/refresh-summary`,{method:"POST",body:JSON.stringify({source:jl})});return Wa((o=d==null?void 0:d.data)==null?void 0:o.node)}async function Hv(s){var o;const d=await Ne(`/nodes/${encodeURIComponent(s.id)}`,{method:"PATCH",body:JSON.stringify({...s.title!==void 0?{title:s.title}:{},...s.body!==void 0?{body:s.body}:{},source:jl})});return Wa((o=d==null?void 0:d.data)==null?void 0:o.node)}async function Gv(s){var o;const d=await Ne(`/nodes/${encodeURIComponent(s)}/archive`,{method:"POST",body:JSON.stringify({source:jl})});return Wa((o=d==null?void 0:d.data)==null?void 0:o.node)}async function Lv(s){return Kt(async()=>{var o,r,p,k;const d=await Ne(`/nodes/${encodeURIComponent(s.id)}/governance-action`,{method:"POST",body:JSON.stringify({action:s.action,...(o=s.note)!=null&&o.trim()?{note:s.note.trim()}:{},source:jl})});return{node:Wa((r=d==null?void 0:d.data)==null?void 0:r.node),governance:fo((p=d==null?void 0:d.data)==null?void 0:p.governance),activity:(k=d==null?void 0:d.data)!=null&&k.activity?$m(d.data.activity):null}},async()=>{var j;const d=Bt(),o=d.nodes.findIndex(w=>w.id===s.id);if(o<0)throw new Error(`Node ${s.id} not found.`);const r=d.nodes[o],p=new Date().toISOString(),k=(j=s.note)!=null&&j.trim()?s.note.trim():"",A=s.action==="promote"?{...r,status:"active",canonicality:"canonical",updatedAt:p,metadata:{...r.metadata,manualGovernanceAction:"promote",manualGovernanceAt:p}}:s.action==="contest"?{...r,status:"contested",updatedAt:p,metadata:{...r.metadata,manualGovernanceAction:"contest",manualGovernanceAt:p}}:{...r,status:"archived",updatedAt:p,metadata:{...r.metadata,manualGovernanceAction:"archive",manualGovernanceAt:p}};d.nodes[o]=A,d.recentNodeIds=[A.id,...d.recentNodeIds.filter(w=>w!==A.id)].slice(0,5);const H=s.action==="promote"?k?`Human promoted this node to canonical. ${k}`:"Human promoted this node to canonical from the governance surface.":s.action==="contest"?k?`Human marked this node contested. ${k}`:"Human marked this node contested from the governance surface.":k?`Human archived this node from governance. ${k}`:"Human archived this node from the governance surface.",B={id:`act-fallback:${A.id}:${p}`,targetNodeId:A.id,activityType:"review_action",body:H,createdBy:jl.actorLabel,sourceType:jl.actorType,sourceLabel:jl.actorLabel,createdAt:p,metadata:{action:s.action,note:k}};d.activities.unshift(B);const g=s.action==="promote"?{entityType:"node",entityId:A.id,state:"healthy",confidence:.96,reasons:[H],lastEvaluatedAt:p,lastTransitionAt:p,metadata:{source:"fallback",manualAction:s.action}}:s.action==="contest"?{entityType:"node",entityId:A.id,state:"contested",confidence:.32,reasons:[H],lastEvaluatedAt:p,lastTransitionAt:p,metadata:{source:"fallback",manualAction:s.action}}:{entityType:"node",entityId:A.id,state:"low_confidence",confidence:.2,reasons:[H],lastEvaluatedAt:p,lastTransitionAt:p,metadata:{source:"fallback",manualAction:s.action}},Z={state:g,events:[{id:`gov-fallback:${A.id}:${p}`,entityType:"node",entityId:A.id,eventType:s.action==="promote"?"promoted":s.action==="contest"?"contested":"demoted",previousState:r.status==="contested"?"contested":r.canonicality==="canonical"?"healthy":"low_confidence",nextState:g.state,confidence:g.confidence,reason:H,createdAt:p,metadata:{source:"fallback",manualAction:s.action}},...ep(A,g)]};return{node:A,governance:Z,activity:B}})}async function qv(s){return Kt(async()=>{var o,r,p;const d=await Ne(`/relations/${encodeURIComponent(s.id)}/governance-action`,{method:"POST",body:JSON.stringify({action:s.action,...(o=s.note)!=null&&o.trim()?{note:s.note.trim()}:{},source:jl})});return{relation:Wm((r=d==null?void 0:d.data)==null?void 0:r.relation),governance:fo((p=d==null?void 0:d.data)==null?void 0:p.governance)}},async()=>{var B;const d=Bt(),o=d.relations.findIndex(g=>g.id===s.id);if(o<0)throw new Error(`Relation ${s.id} not found.`);const r=d.relations[o],p=new Date().toISOString(),k=(B=s.note)!=null&&B.trim()?s.note.trim():"",A={...r,status:s.action==="accept"?"active":s.action==="reject"?"rejected":"archived",metadata:{...r.metadata,manualGovernanceAction:s.action,manualGovernanceAt:p}};d.relations[o]=A;const H=s.action==="accept"?k?`Human accepted this relation. ${k}`:"Human accepted this relation from the governance surface.":s.action==="reject"?k?`Human rejected this relation. ${k}`:"Human rejected this relation from the governance surface.":k?`Human archived this relation from governance. ${k}`:"Human archived this relation from the governance surface.";return{relation:A,governance:{state:{entityType:"relation",entityId:A.id,state:"healthy",confidence:s.action==="accept"?.94:s.action==="reject"?.9:.88,reasons:[H],lastEvaluatedAt:p,lastTransitionAt:p,metadata:{source:"fallback",manualAction:s.action}},events:[{id:`gov-fallback:${A.id}:${p}`,entityType:"relation",entityId:A.id,eventType:s.action==="accept"?"promoted":"demoted",previousState:r.status==="suggested"?"low_confidence":"healthy",nextState:"healthy",confidence:s.action==="accept"?.94:s.action==="reject"?.9:.88,reason:H,createdAt:p,metadata:{source:"fallback",manualAction:s.action},title:`${A.fromNodeId} ${A.relationType} ${A.toNodeId}`,subtitle:A.status}]}}})}function Em(s){return s?Array.from(new Set(s.edges.map(d=>d.relationType))).sort((d,o)=>d.localeCompare(o)):[]}function wv(s,d){if(!s)return{nodes:[],edges:[]};const o=new Set(d.relationTypes),r=s.edges.filter(A=>!(!o.has(A.relationType)||A.relationSource==="canonical"&&!d.sources.canonical||A.relationSource==="inferred"&&!d.sources.inferred)),p=new Set(s.nodes.filter(A=>A.isFocus).map(A=>A.id));for(const A of r)p.add(A.source),p.add(A.target);return{nodes:s.nodes.filter(A=>p.has(A.id)),edges:r}}function Yv(s,d,o){if(!s)return{emphasizedNodeIds:[],emphasizedEdgeIds:[],activeAt:null};const r=d.nodes,p=d.edges,k=s.timeline[Math.min(Math.max(o,0),Math.max(s.timeline.length-1,0))],A=(k==null?void 0:k.at)??null,H=A?r.filter(g=>g.createdAt<=A).map(g=>g.id):r.map(g=>g.id),B=A?p.filter(g=>g.createdAt<=A).map(g=>g.id):p.map(g=>g.id);return{emphasizedNodeIds:H,emphasizedEdgeIds:B,activeAt:A}}function Sg(s){if(s.relationSource==="inferred")return"#7c8aa5";switch(s.relationType){case"supports":return"#0f766e";case"depends_on":return"#9a3412";case"contradicts":return"#b91c1c";case"elaborates":return"#1d4ed8";case"derived_from":return"#6d28d9";case"produced_by":return"#92400e";case"relevant_to":return"#2563eb";default:return"#475569"}}function Xv(s){return Array.from(new Set(s.map(d=>d.type))).sort((d,o)=>d.localeCompare(o))}function Qv(s,d,o){const r=(s??[]).map(p=>d.get(p)).filter(p=>p!==void 0&&p.type==="project");return r.length?r:o.slice(0,3)}function Zv(s,d,o,r){const p=new Set(o.map(A=>A.id)),k=(s??[]).map(A=>d.get(A)).filter(A=>A!==void 0&&!p.has(A.id));return k.length?k.slice(0,4):r.filter(A=>!p.has(A.id)).slice(0,4)}function Vv(s,d,o,r,p){const k=[s,...d,...o,...(r??[]).map(H=>p.get(H)??null)].filter(H=>H!==null),A=new Set;return k.filter(H=>A.has(H.id)?!1:(A.add(H.id),!0)).slice(0,6)}function Kv(s,d,o){return s??d[0]??o[0]??null}function Jv(s,d){return d?s.filter(o=>[o.title,o.summary,o.type].join(" ").toLowerCase().includes(d)):s}function tp(s){return s.trim().toLowerCase()}function Iv(s){return{...s,normalizedLabel:tp(s.label),searchText:`${s.label} ${s.hint}`.toLowerCase()}}function $v(s){return s.map(d=>Iv(d)).sort((d,o)=>d.label.localeCompare(o.label))}function Wv(s,d){return d?s.filter(o=>o.searchText.includes(d)):s}function Fv(s,d,o){const r=new Map(d.map(A=>[A.normalizedLabel,A])),p=new Set,k=[];for(const A of s){const H=r.get(tp(A));!H||p.has(H.label)||o&&!H.searchText.includes(o)||(p.add(H.label),k.push(H))}return k}function Pv(s,d=3){return s.slice(0,d)}function eg(s){return s[0]??null}function id(s,d){return s.some(o=>o.entityType===d.entityType&&o.entityId===d.entityId)}function tg(s,d){return s.find(o=>id(d,o))??null}function _m(s,d={}){const{targetNodeId:o}=d;return s.filter(r=>r.activityType!=="review_action"?!1:o?r.targetNodeId===o:!0)}const ag="recallx.hot-path-profile",lg="rxProfile",Cm="__recallxHotPathProfile",ng=.5;function cg(s){return typeof s=="object"&&s!==null&&"then"in s}function ig(){if(typeof window>"u")return!1;try{return new URLSearchParams(window.location.search).get(lg)==="1"?!0:window.localStorage.getItem(ag)==="1"}catch{return!1}}function sg(s){if(typeof window>"u")return;const d=window[Cm]??[];d.push(s),window[Cm]=d.slice(-200)}function ad(s,d){const o=Number((performance.now()-d).toFixed(2)),r={label:s,durationMs:o,ts:new Date().toISOString()};sg(r),o>=ng&&console.info(`RecallX hot-path ${s}`,r)}function Qt(s,d){if(!ig())return d();const o=performance.now(),r=d();return cg(r)?r.then(p=>(ad(s,o),p),p=>{throw ad(s,o),p}):(ad(s,o),r)}const ug=15e3,co="workspace.activeProjectId",Om="recallx.recent-searches",Rm="recallx.recent-commands",zm="recallx.governance-feed-entity-filter",Mm="recallx.governance-feed-action-filter",og=["all","review_action"],Dm=["all","node","relation"],Um=["all","promote","contest","archive","accept","reject"],io={bundleItems:[],activities:[],relatedCount:0},rg=[{id:"home",label:"Home",hint:"re-entry"},{id:"recent",label:"Memory",hint:"browse"},{id:"settings",label:"Workspace",hint:"ops"}],dg=[{id:"graph",label:"Graph"},{id:"project-map",label:"Project map",graphMode:"project-map"},{id:"governance",label:"Review"}];function fg(s){if(s.startsWith("["))return`http://${s}/api/v1`;if((s.match(/:/g)??[]).length>1){const o=s.lastIndexOf(":"),r=s.slice(0,o),p=s.slice(o+1);if(r&&/^\d+$/.test(p))return`http://[${r}]:${p}/api/v1`}return`http://${s}/api/v1`}const hg=T.lazy(async()=>({default:(await ky(()=>import("./ProjectGraphCanvas-B9-L83dL.js"),[],import.meta.url)).ProjectGraphCanvas}));function Vl(s){return s==="active"||s==="approved"?"tone-good":s==="contested"||s==="pending"?"tone-warn":s==="draft"||s==="suggested"?"tone-info":"tone-muted"}function ld(s){switch(s){case"supports":return"relation-chip--supports";case"depends_on":return"relation-chip--depends";case"contradicts":return"relation-chip--contradicts";case"elaborates":return"relation-chip--elaborates";case"derived_from":return"relation-chip--derived";case"produced_by":return"relation-chip--produced";case"relevant_to":return"relation-chip--relevant";default:return"relation-chip--related"}}function xc(s){return s.replaceAll("_"," ")}function Zt(s){return new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(new Date(s))}function km(s){switch(s){case"contested":return 0;case"low_confidence":return 1;default:return 2}}function nd(s){return`${(s*100).toFixed(0)}%`}function cd(s){const d=s.indexOf(":"),o=d>=0?s.slice(0,d):null,r=d>=0?s.slice(d+1):s,p=r.length>16?`${r.slice(0,8)}…${r.slice(-4)}`:r;return o?`${o}:${p}`:p}function Bm(s){switch(s){case"contested":return"Conflicting signals need review.";case"low_confidence":return"Trust is still weak.";default:return"State is stable."}}function ap(s){return s?s.replaceAll("_"," "):"unknown"}function mg(s){return s.entityType==="node"?"Inspect node":"Relation issue"}function Kl(s){switch(s){case"promote":return"Promote";case"contest":return"Contest";case"archive":return"Archive";case"accept":return"Accept";case"reject":return"Reject";default:return"Manual review"}}function dd(s){return s.activityType==="review_action"}function Bs(s){var o;if(!dd(s))return s.activityType.replaceAll("_"," ");const d=typeof((o=s.metadata)==null?void 0:o.action)=="string"?s.metadata.action:null;return d?`Review decision · ${Kl(d)}`:"Review decision"}function Hs(s){var d;if(s.body&&s.body.trim())return s.body;if(dd(s)){const o=typeof((d=s.metadata)==null?void 0:d.action)=="string"?s.metadata.action:null;return o?`${Kl(o)} decision recorded for this memory.`:"A manual review decision was recorded for this memory."}return s.activityType.replaceAll("_"," ")}function Hm(s){var r,p;if(!dd(s))return null;const d=typeof((r=s.metadata)==null?void 0:r.nextState)=="string"?ap(s.metadata.nextState):null,o=((p=s.sourceLabel)==null?void 0:p.trim())||null;return o&&d?`${o} moved this to ${d}.`:d?`Moved to ${d}.`:o?`${o} recorded this review.`:"Review recorded."}function Gm(s){const d=ap(s.nextState);return s.entityType==="relation"&&s.relationType?`${Kl(s.action)} ${xc(s.relationType)} -> ${d}`:`${Kl(s.action)} -> ${d}`}function pg(s,d=null){return s?s.status==="contested"||s.canonicality==="suggested"||s.canonicality==="generated"||(d==null?void 0:d.state)==="low_confidence"||(d==null?void 0:d.state)==="contested":!1}function Lm(s){return!!(s&&s.status!=="archived"&&(s.canonicality==="suggested"||s.canonicality==="generated"))}function qm(s){return!!(s&&s.status!=="archived"&&s.status!=="contested")}function wm(s){return!!(s&&s.status!=="archived")}function yg(s){return!!(s&&s.status!=="archived"&&s.status!=="active")}function vg(s){return!!(s&&s.status!=="archived"&&s.status!=="rejected")}function gg(s){return!!(s&&s.status!=="archived")}function bg(s){switch(s){case"search":return"Integrations";case"projects":return"Integrations";case"recent":return"Memory";case"settings":return"Workspace";case"governance":return"Review";case"graph":return"Graph";default:return"Home"}}function xg(){if(typeof window>"u")return"home";switch(new URLSearchParams(window.location.search).get("view")){case"search":case"guide":return"search";case"graph":return"graph";case"governance":return"governance";case"recent":return"recent";case"settings":return"settings";default:return"home"}}function Ym(s){if(typeof window>"u")return[];try{const d=window.localStorage.getItem(s);if(!d)return[];const o=JSON.parse(d);return Array.isArray(o)?o.filter(r=>typeof r=="string"):[]}catch{return[]}}function Xm(s,d){if(!(typeof window>"u"))try{window.localStorage.setItem(s,JSON.stringify(d))}catch{}}function Qm(s,d,o){if(typeof window>"u")return o;try{const r=window.localStorage.getItem(s);return r&&d.includes(r)?r:o}catch{return o}}function Zm(s,d){if(!(typeof window>"u"))try{window.localStorage.setItem(s,d)}catch{}}function Hn(){return{node:null,related:[],bundleItems:[],activities:[],artifacts:[],governance:{state:null,events:[]}}}function Gs(){return{node:null,relation:null,fromNode:null,toNode:null,governance:{state:null,events:[]}}}function jg(){var ha,as,ls,Ul,vl,ai,gn,li,gl,za;const[s,d]=T.useState(null),[o,r]=T.useState([]),[p,k]=T.useState(null),[A,H]=T.useState(xg),[B,g]=T.useState("node_recallx"),[Z,j]=T.useState(""),w=T.useDeferredValue(Z),[Ge,Ee]=T.useState("all"),[me,Fe]=T.useState("all"),[nt,na]=T.useState("all"),[ke,dt]=T.useState("all"),[le,Ve]=T.useState({nodes:[],activities:[],total:0,isLoading:!1,error:null}),[te,Le]=T.useState(!1),[vt,Nl]=T.useState("routes"),[ca,jt]=T.useState(""),[ka,ba]=T.useState([]),[Ht,z]=T.useState([]),[G,J]=T.useState(!0),[he,I]=T.useState(null),[b,D]=T.useState(!1),[L,Y]=T.useState(""),[W,F]=T.useState(null),[ce,Ke]=T.useState(null),[be,xa]=T.useState(Gs()),[jc,Gn]=T.useState(!1),[ia,Ba]=T.useState([]),[Fa,Ln]=T.useState(!1),[Ha,Nc]=T.useState(()=>Qm(zm,Dm,"all")),[sa,qn]=T.useState(()=>Qm(Mm,Um,"all")),[Sc,Ls]=T.useState("note"),[Sl,ft]=T.useState(""),[we,wn]=T.useState(null),[Yn,Pa]=T.useState(null),[Ac,_i]=T.useState(!1),[Al,Tc]=T.useState(io),[Jl,Nt]=T.useState(!1),[ja,Ot]=T.useState(""),[qs,ws]=T.useState(""),[Ys,Tl]=T.useState(null),[Xn,ua]=T.useState(null),[el,Qn]=T.useState(!1),[El,Ci]=T.useState(""),[Ec,_c]=T.useState(""),[Il,Xs]=T.useState(""),[Oi,Ri]=T.useState(""),[Cc,Oc]=T.useState(""),[Zn,zi]=T.useState(""),[Vn,tl]=T.useState("markdown"),[Xe,gt]=T.useState({normalizeTitleWhitespace:!0,trimBodyWhitespace:!1,duplicateMode:"warn"}),[Ga,ht]=T.useState(null),[Qs,_l]=T.useState(null),[Kn,al]=T.useState(!1),[Rc,Cl]=T.useState([]),[Na,Sa]=T.useState(!1),[ll,Pe]=T.useState(!1),[zc,Mi]=T.useState(!1),[nl,Rt]=T.useState(null),[Zs,Vs]=T.useState(null),[et,Mc]=T.useState(null),[St,$l]=T.useState(null),[At,Je]=T.useState(null),[Wl,cl]=T.useState(!1),[Jn,Fl]=T.useState(""),[In,$n]=T.useState(""),[Gt,zt]=T.useState(null),[Wn,Dc]=T.useState(!1),[Jt,Di]=T.useState(!1),[Pl,oa]=T.useState(""),[en,tn]=T.useState(null),[ct,Uc]=T.useState(null),[an,Ks]=T.useState(null),[kc,La]=T.useState("overview"),Fn=T.useRef(new Set),Pn=T.useRef(new Set),It=T.useRef(null),il=T.useRef(null),Ui=T.useRef(((as=(ha=globalThis.crypto)==null?void 0:ha.randomUUID)==null?void 0:as.call(ha))??`recallx-renderer-${Date.now()}`),ln=A==="home"||A==="recent";async function qa(h){const v=await Ev(h?{workspace:h}:void 0);return k(v),I(null),v}async function Aa(h){var V;const[v,S,q]=await Promise.all([qa(h==null?void 0:h.workspaceOverride),h!=null&&h.catalogOverride?Promise.resolve(h.catalogOverride):mv(),Sm().catch(()=>[])]);return d(((V=h==null?void 0:h.catalogOverride)==null?void 0:V.current)??(h==null?void 0:h.workspaceOverride)??v.workspace),r(S.items),Cl(q),Ci(S.current.rootPath),I(null),v}async function ra(){return(await Rv()).slice().sort((v,S)=>{const q=km(v.state)-km(S.state);return q!==0?q:v.confidence-S.confidence||S.lastTransitionAt.localeCompare(v.lastTransitionAt)})}async function ec(){return(await zv({entityTypes:Ha==="all"?void 0:[Ha],actions:sa==="all"?void 0:[sa],limit:12})).slice().sort((v,S)=>S.createdAt.localeCompare(v.createdAt))}function Qe(h,v){if(ed(h)){Pr(),D(!0),F("Enter the RecallX API token to continue."),I(null);return}I(h instanceof Error?h.message:v)}function Ta(h){return typeof h=="object"&&h!==null&&"status"in h&&h.status===404}T.useEffect(()=>{let h=!0;async function v(){try{const S=await pv();if(!h)return;if(d(S.workspace),S.authMode==="bearer"&&!S.hasToken){D(!0),F(null),I(null);return}if(await Aa({workspaceOverride:S.workspace}),!h)return;D(!1),F(null),Ke(null)}catch(S){if(!h)return;Qe(S,"Failed to load workspace.")}finally{h&&J(!1)}}return v(),()=>{h=!1}},[]),T.useEffect(()=>{if(G||b||!ln)return;let h=!1,v=!1,S=!1;async function q(){if(!(h||document.hidden)){if(v){S=!0;return}v=!0;try{await qa(),I(null)}catch(ze){h||Qe(ze,"Failed to refresh recent activity.")}finally{v=!1,S&&!h&&(S=!1,q())}}}function V(){document.hidden||q()}const f=Mv({onWorkspaceUpdate:()=>{q()},onError:()=>{document.hidden||q()}}),fe=(s==null?void 0:s.authMode)==="bearer"?window.setInterval(()=>{document.hidden||q()},ug):null;return q(),window.addEventListener("focus",V),document.addEventListener("visibilitychange",V),()=>{h=!0,f(),fe!==null&&window.clearInterval(fe),window.removeEventListener("focus",V),document.removeEventListener("visibilitychange",V)}},[b,G,ln,s==null?void 0:s.authMode]),T.useEffect(()=>{if(G||b||!ln)return;const h=w.trim();if(!h){Ve({nodes:[],activities:[],total:0,isLoading:!1,error:null});return}let v=!1;return Ve(S=>({...S,isLoading:!0,error:null})),Tv({query:h,limit:24,offset:0}).then(S=>{v||Ve({nodes:S.nodes,activities:S.activities,total:S.total,isLoading:!1,error:null})}).catch(S=>{v||Ve({nodes:[],activities:[],total:0,isLoading:!1,error:S instanceof Error?S.message:"Failed to search the workspace."})}),()=>{v=!0}},[b,w,G,ln]);const tc=T.useMemo(()=>Iy(le.nodes,le.activities).slice(0,4),[le.activities,le.nodes]),nn=T.useMemo(()=>Xv(le.nodes),[le.nodes]),Bc=T.useMemo(()=>Qt("search.filteredResults",()=>$y(le.nodes,le.activities,{scope:Ge,nodeType:me,sourceLabel:ke,activityType:nt})),[nt,me,le.activities,le.nodes,Ge,ke]),Ol=Bc.nodes,Rl=Bc.activities,Hc=Bc.total;T.useEffect(()=>{ba(Ym(Om)),z(Ym(Rm))},[]),T.useEffect(()=>{ke!=="all"&&(tc.includes(ke)||dt("all"))},[ke,tc]),T.useEffect(()=>{me!=="all"&&(nn.includes(me)||Fe("all"))},[me,nn]),T.useEffect(()=>{function h(v){if((v.metaKey||v.ctrlKey)&&v.key.toLowerCase()==="k"){v.preventDefault(),Le(!0);return}v.key==="Escape"&&Le(!1)}return window.addEventListener("keydown",h),()=>{window.removeEventListener("keydown",h)}},[]),T.useEffect(()=>{if(!te){jt("");return}const h=window.setTimeout(()=>{var v,S;(v=il.current)==null||v.focus(),(S=il.current)==null||S.select()},0);return()=>{window.clearTimeout(h)}},[te]);const xe=T.useMemo(()=>Qt("search.nodeMap",()=>Ky((p==null?void 0:p.nodes)??[],le.nodes,le.activities)),[le.activities,le.nodes,p]),sl=T.useMemo(()=>Qt("search.recentSelectableNodeIds",()=>Jy(le.nodes,le.activities)),[le.activities,le.nodes]);T.useEffect(()=>{var h;p!=null&&p.nodes.length&&(!B||xe.has(B)||A==="recent"&&sl.has(B)||g(((h=p.nodes[0])==null?void 0:h.id)??""))},[xe,sl,B,p,A]);const cn=T.useMemo(()=>((p==null?void 0:p.nodes)??[]).slice().sort((h,v)=>(h.title||"").localeCompare(v.title||"")||h.updatedAt.localeCompare(v.updatedAt)),[p]),_e=T.useMemo(()=>cn.filter(h=>h.type==="project"),[cn]),ne=T.useMemo(()=>we?_e.find(h=>h.id===we)??null:null,[we,_e]);T.useEffect(()=>{Sl&&(_e.some(h=>h.id===Sl)||ft(""))},[Sl,_e]);const je=B?xe.get(B)??null:null,ul=(je==null?void 0:je.id)??null,[Se,Lt]=T.useState(Hn),sn=((ls=Se.node)==null?void 0:ls.id)===(je==null?void 0:je.id)?Se.node:je,[it,un]=T.useState("neighborhood"),[ac,Gc]=T.useState(1),[lc,ki]=T.useState([]),[wa,on]=T.useState(null),[Ce,Lc]=T.useState(null),[qc,Js]=T.useState({canonical:!0,inferred:!0}),[Is,$s]=T.useState([]),[rn,wc]=T.useState(0),[Yc,Xc]=T.useState(!1),[Bi,Qc]=T.useState(null),[nc,Zc]=T.useState(!1),[Ws,Fs]=T.useState(!1);T.useEffect(()=>{var h;if(!_e.length){on(null);return}if((je==null?void 0:je.type)==="project"){on(je.id);return}if(!wa||!_e.some(v=>v.id===wa)){const v=we&&_e.some(S=>S.id===we)?we:((h=_e[0])==null?void 0:h.id)??null;on(v)}},[we,wa,_e,je]),T.useEffect(()=>{let h=!0;const v=je;if(A!=="graph"||!v||!ul)return;const S=ul;Lt({...Hn(),node:v});async function q(){var V;try{const[f,fe]=await Promise.all([no(S),Qt("compactContext.graphDetailPreview",()=>td(S))]);if(!h)return;const ze=f??{...Hn(),node:v};Lt({node:((V=ze.node)==null?void 0:V.id)===S?ze.node:v,related:ze.related,bundleItems:fe,activities:ze.activities,artifacts:ze.artifacts,governance:ze.governance}),I(null)}catch(f){if(!h)return;if(Ta(f)){Lt({...Hn(),node:v}),I(null);return}Qe(f,"Failed to load node detail.")}}return q(),()=>{h=!1}},[ul]),T.useEffect(()=>{let h=!0;if(A!=="graph"||it!=="neighborhood"||!je||!ul)return;const S=ul;async function q(){Zc(!0);try{const V=await Cv(S,ac);if(!h)return;ki(V),Qc(null)}catch(V){if(!h)return;ki([]),Qc(V instanceof Error?V.message:"Failed to load graph neighborhood.")}finally{h&&Zc(!1)}}return q(),()=>{h=!1}},[it,ac,ul,A]),T.useEffect(()=>{let h=!0;if(A!=="graph"||it!=="project-map"||!wa)return;const v=wa;async function S(){Zc(!0);try{const q=await Ov(v);if(!h)return;Lc(q);const V=Em(q);$s(f=>f.length?f.filter(fe=>V.includes(fe)):V),wc(Math.max(q.timeline.length-1,0)),ki([]),Qc(null)}catch(q){if(!h)return;Lc(null),Qc(q instanceof Error?q.message:"Failed to load project graph.")}finally{h&&Zc(!1)}}return S(),()=>{h=!1}},[it,wa,A]);const[mt,Hi]=T.useState([]),Vc=T.useMemo(()=>Qt("notes.searchableNoteNodes",()=>((p==null?void 0:p.nodes)??[]).slice().sort((h,v)=>v.updatedAt.localeCompare(h.updatedAt)||h.title.localeCompare(v.title))),[p]),cc=T.useMemo(()=>w.trim()?Ol:Vc,[w,Ol,Vc]),Kc=T.useMemo(()=>w.trim()?Rl:[],[w,Rl]),zl=T.useMemo(()=>cc.find(h=>h.id===B)??null,[cc,B]),ie=At?((Ul=Se.node)==null?void 0:Ul.id)===At?Se.node:xe.get(At)??null:null,Gi=pg(ie,Se.governance.state);T.useMemo(()=>Qt("governance.detailReviewActions",()=>_m(Se.activities)),[Se.activities]);const Li=T.useMemo(()=>Qt("governance.notePreviewReviewActions",()=>_m(Se.activities,{targetNodeId:(ie==null?void 0:ie.id)??null})),[Se.activities,ie]),Ea=T.useMemo(()=>Qv(p==null?void 0:p.pinnedProjectIds,xe,_e),[xe,_e,p==null?void 0:p.pinnedProjectIds]),dn=T.useMemo(()=>Qt("home.homeRecentNodes",()=>Zv(p==null?void 0:p.recentNodeIds,xe,Ea,Vc)),[xe,Ea,Vc,p==null?void 0:p.recentNodeIds]),qi=T.useMemo(()=>Qt("palette.recentNodes",()=>Vv(ne,Ea,dn,p==null?void 0:p.recentNodeIds,xe)),[ne,dn,xe,Ea,p==null?void 0:p.recentNodeIds]),ol=T.useMemo(()=>w.trim()?Ol.slice(0,5):[],[w,Ol]),wi=T.useMemo(()=>w.trim()?Rl.slice(0,4):[],[w,Rl]),_a=T.useMemo(()=>eg(ia),[ia]),Ps=T.useMemo(()=>Qt("governance.homeFeed",()=>Pv(ia)),[ia]),fn=T.useMemo(()=>tg(ia,mt),[ia,mt]),hn=T.useMemo(()=>Kv(ne,Ea,_e),[ne,Ea,_e]);T.useEffect(()=>{if(!ie){cl(!1),Fl(""),$n(""),zt(null);return}Fl(ie.title),$n(ie.body),zt(null)},[ie]),T.useEffect(()=>{oa(""),tn(null)},[At,ce,A]),T.useEffect(()=>{let h=!0;const v=At,S=v?xe.get(v)??null:null;if(A!=="recent"||!v||!S)return;const q=v;Lt({...Hn(),node:S});async function V(){var f;try{const[fe,ze]=await Promise.all([no(q),Qt("compactContext.recentNotePreview",()=>td(q))]);if(!h)return;const Ja=fe??{...Hn(),node:S};Lt({node:((f=Ja.node)==null?void 0:f.id)===q?Ja.node:S,related:Ja.related,bundleItems:ze,activities:Ja.activities,artifacts:Ja.artifacts,governance:Ja.governance}),I(null)}catch(fe){if(!h)return;if(Ta(fe)){Lt({...Hn(),node:S}),I(null);return}Qe(fe,"Failed to load note detail.")}}return V(),()=>{h=!1}},[xe,At,A]),T.useEffect(()=>{if(A!=="governance"&&A!=="home")return;let h=!0;async function v(){try{const S=await ra();if(!h)return;Hi(S),I(null)}catch(S){if(!h)return;Qe(S,"Failed to refresh workspace lists.")}}return v(),()=>{h=!1}},[A]),T.useEffect(()=>{if(A!=="governance"&&A!=="home"){Ln(!1);return}let h=!0;Ln(!0);async function v(){try{const S=await ec();if(!h)return;Ba(S),I(null)}catch(S){if(!h)return;Qe(S,"Failed to load governance decision feed.")}finally{h&&Ln(!1)}}return v(),()=>{h=!1}},[sa,Ha,A]),T.useEffect(()=>{Zm(zm,Ha)},[Ha]),T.useEffect(()=>{Zm(Mm,sa)},[sa]),T.useEffect(()=>{var h;if(!mt.length){ce!==null&&Ke(null);return}(!ce||!mt.some(v=>v.entityId===ce))&&Ke(((h=mt[0])==null?void 0:h.entityId)??null)},[mt,ce]);const ve=mt.find(h=>h.entityId===ce)??mt[0];T.useEffect(()=>{if(A!=="governance"||!ve){xa(Gs()),Gn(!1);return}let h=!0;Gn(!0);async function v(){try{if(ve.entityType==="node"){const S=await no(ve.entityId);if(!h)return;xa({node:(S==null?void 0:S.node)??null,relation:null,fromNode:null,toNode:null,governance:(S==null?void 0:S.governance)??Gs().governance})}else{const S=await _v(ve.entityId);if(!h)return;xa({node:null,relation:(S==null?void 0:S.relation)??null,fromNode:(S==null?void 0:S.fromNode)??null,toNode:(S==null?void 0:S.toNode)??null,governance:(S==null?void 0:S.governance)??Gs().governance})}I(null)}catch(S){if(!h)return;if(Ta(S)){xa(Gs()),I(null);return}Qe(S,"Failed to load governance detail.")}finally{h&&Gn(!1)}}return v(),()=>{h=!1}},[ve,A]);const rl=(s==null?void 0:s.name)??"RecallX",Ml=fg((s==null?void 0:s.apiBind)??"127.0.0.1:8787"),pt=(s==null?void 0:s.rootPath)??"",Yi=((vl=s==null?void 0:s.paths)==null?void 0:vl.dbPath)??(pt?`${pt}/workspace.db`:""),Xi=((ai=s==null?void 0:s.paths)==null?void 0:ai.artifactsDir)??(pt?`${pt}/artifacts`:""),Qi=((gn=s==null?void 0:s.paths)==null?void 0:gn.exportsDir)??(pt?`${pt}/exports`:""),Jc=((li=s==null?void 0:s.paths)==null?void 0:li.importsDir)??(pt?`${pt}/imports`:""),eu=((gl=s==null?void 0:s.paths)==null?void 0:gl.backupsDir)??(pt?`${pt}/backups`:""),Ya=((za=s==null?void 0:s.safety)==null?void 0:za.warnings)??[],tu=Ya.some(h=>h.code==="recent_other_machine"),ho=Ya.some(h=>h.code==="unclean_shutdown"),mo=["Close RecallX on the current machine before opening the same workspace somewhere else.","Wait for Dropbox, Drive, or iCloud sync to finish before switching devices.",tu?"This workspace was opened recently on another machine, so treat the next open as read carefully and avoid concurrent writes.":"Open the workspace on the next machine only after the previous session finished and sync is complete.",ho?"Create a snapshot before heavier edits because the previous session may not have closed cleanly.":"Create a manual snapshot if anything about the handoff felt uncertain."],au=`node dist/server/app/mcp/index.js --api ${Ml}`,po=`{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"recallx": {
|
|
61
|
+
"command": "node",
|
|
62
|
+
"args": ["dist/server/app/mcp/index.js", "--api", "${Ml}"]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}`,Tt=(s==null?void 0:s.authMode)==="bearer"?' -H "Authorization: Bearer $RECALLX_API_TOKEN"':"",ic=`curl${Tt} ${Ml}
|
|
66
|
+
curl${Tt} ${Ml}/health
|
|
67
|
+
curl${Tt} ${Ml}/workspace`;T.useEffect(()=>{if(G||b||!pt)return;let h=!0;async function v(){try{const S=await yv([co]);if(!h)return;const q=typeof S[co]=="string"?String(S[co]):null;wn(q),Pa(null)}catch(S){if(!h)return;Qe(S,"Failed to load workspace settings.")}}return v(),()=>{h=!1}},[b,G,pt]),T.useEffect(()=>{we&&(_e.some(h=>h.id===we)||(wn(null),Tc(io)))},[we,_e]),T.useEffect(()=>{if(!we||!_e.some(h=>h.id===we)){ft(h=>h&&h===It.current?(It.current=null,""):(It.current=null,h));return}ft(h=>{const v=It.current;return!h||h===v?(It.current=we,we):h})},[we,_e]),T.useEffect(()=>{const h=ne;if(!h){Tc(io),Nt(!1);return}const v=h.id;let S=!0;Nt(!0);async function q(){try{const[V,f]=await Promise.all([no(v),Qt("compactContext.activeProjectDigest",()=>td(v))]);if(!S)return;Tc({bundleItems:f.slice(0,3),activities:((V==null?void 0:V.activities)??[]).slice(0,3),relatedCount:(V==null?void 0:V.related.length)??0}),Pa(null)}catch(V){if(!S)return;Tc(io),Pa(V instanceof Error?V.message:"Failed to load the active project digest.")}finally{S&&Nt(!1)}}return q(),()=>{S=!1}},[ne]);const sc=[{id:"overview",group:"Getting started",label:"Overview",eyebrow:"Unified guide",title:"One page for human access and agent access.",body:"This guide merges the loopback API and MCP setup into one quiet reference. The left menu should feel like a documentation tree: start broad, then drill into one detail page at a time.",points:["Use HTTP when a person or script wants direct loopback access.","Use MCP when an agent client needs tool-shaped access and guided workflow.","Keep the surface text-first and operational, not dashboard-like."]},{id:"base-url",group:"HTTP API",label:"Base URL",eyebrow:"Loopback entry",title:"Start with the current loopback endpoint.",body:"Everything else in the local API hangs off one base URL. Keep auth rules explicit, but do not bury the main path under decorative UI.",points:[`Base URL: ${Ml}`,(s==null?void 0:s.authMode)==="bearer"?"Auth mode: bearer header required for protected requests.":"Auth mode: local optional access for loopback requests.","Use this first for health, workspace, bootstrap, and direct endpoint inspection."]},{id:"routes",group:"HTTP API",label:"Starter routes",eyebrow:"Small surface first",title:"Keep the first three routes in easy reach.",body:"Most sessions only need a tiny route set. Show those clearly before any deeper reference material.",points:["/health for service status and active workspace state.","/workspace for current workspace metadata and local scope details.","/bootstrap for client startup and service capability discovery."]},{id:"http-examples",group:"HTTP API",label:"Example requests",eyebrow:"Quick start",title:"Copy a request, verify locally, then move on.",body:"The examples should stay short and immediately runnable. This page is a launchpad, not a full API encyclopedia.",points:["Use curl for the fastest first verification loop.","Add the bearer header only when this workspace requires it.","After the first successful request, move into the route or workflow you actually need."],code:ic},{id:"mcp-connect",group:"MCP",label:"Connection",eyebrow:"Agent route",title:"Use MCP when the client is an agent, not a person making raw requests.",body:"Show the launcher configuration and the direct command together, but keep the page visually quiet. The important part is the connection shape, not extra chrome.",points:["Use the launcher config when wiring RecallX into an MCP-capable agent client.","Use the direct local command when testing the server manually.","Keep the API target pointed at the current workspace service."],code:`${po}
|
|
68
|
+
|
|
69
|
+
${au}`},{id:"mcp-search-flow",group:"MCP",label:"Search flow",eyebrow:"Recommended flow",title:"Search first, then decide whether to anchor.",body:"The guide should make the order obvious so agent clients do not jump into over-specific context too early.",points:["1. Start broad with recallx_search_workspace when the target is still unclear.","2. Use recallx_search_nodes when checking for an existing project or durable node.","3. Use recallx_context_bundle only after the target is actually known."]},{id:"mcp-write-flow",group:"MCP",label:"Write path",eyebrow:"Capture rules",title:"Write lightly unless the target is already clear.",body:"This is the part that prevents over-structuring. Treat durable memory, activity logs, and anchored bundles as separate decisions.",points:["recallx_capture_memory is the safe default only before a project or node is known.","Once a project is known, stop using untargeted capture for routine logs and append activity to that project instead.","recallx_append_activity is best for routine summaries and work logs after the target is known.","recallx_context_bundle should include targetId only after the project or node is truly known."]},{id:"workspace-paths",group:"Workspace",label:"Workspace paths",eyebrow:"Local files",title:"Know where the current workspace lives on disk.",body:"Keep the local paths visible for debugging, inspection, and operational work. This should read like a simple system note, not an admin panel.",points:[`Workspace root: ${pt||"Unavailable"}`,`Database: ${Yi||"Unavailable"}`,`Artifacts: ${Xi||"Unavailable"}`]}],Xa=sc.find(h=>h.id===kc)??sc[0],lu=Array.from(new Set(sc.map(h=>h.group))).map(h=>({group:h,sections:sc.filter(v=>v.group===h)})),Dl=T.useMemo(()=>{const h=new Map,v={};let S=0,q=0,V=0;for(const f of lc)h.set(f.node.id,f.node),v[f.relation.relationType]=(v[f.relation.relationType]??0)+1,f.direction==="incoming"?S+=1:q+=1,f.relation.status==="suggested"&&(V+=1);return{distinctNodes:Array.from(h.values()),relationCounts:v,incomingCount:S,outgoingCount:q,suggestedCount:V}},[lc]),uc=T.useMemo(()=>Object.entries(Dl.relationCounts).map(([h,v])=>({relationType:h,count:v})).sort((h,v)=>v.count-h.count||h.relationType.localeCompare(v.relationType)),[Dl.relationCounts]),Ic=T.useMemo(()=>Em(Ce),[Ce]),dl=Is.length?Is:Ic,Ca=T.useMemo(()=>wv(Ce,{relationTypes:dl,sources:qc}),[dl,Ce,qc]),mn=T.useMemo(()=>Yv(Ce,Ca,rn),[Ca,Ce,rn]),Oa=T.useMemo(()=>({...Ca,...mn}),[Ca,mn]),fl=T.useMemo(()=>Ce?{...Ce,nodes:Ca.nodes,edges:Ca.edges}:null,[Ca.edges,Ca.nodes,Ce]),hl=T.useMemo(()=>Object.entries(Oa.edges.reduce((h,v)=>(h[v.relationType]=(h[v.relationType]??0)+1,h),{})).map(([h,v])=>({relationType:h,count:v})).sort((h,v)=>v.count-h.count||h.relationType.localeCompare(v.relationType)),[Oa.edges]),bt=(wa?xe.get(wa):void 0)??_e.find(h=>h.id===wa)??null,Qa=(Ce==null?void 0:Ce.timeline[rn])??null;T.useEffect(()=>{if(!Yc||!(Ce!=null&&Ce.timeline.length))return;const h=window.setInterval(()=>{wc(v=>v>=Ce.timeline.length-1?(Xc(!1),v):v+1)},900);return()=>{window.clearInterval(h)}},[Yc,Ce]),T.useEffect(()=>{it!=="project-map"&&Xc(!1)},[it]);const $c=T.useMemo(()=>mt.reduce((h,v)=>(h[v.state]=(h[v.state]??0)+1,h),{}),[mt]),Ie=(ve==null?void 0:ve.entityType)==="node"?be.node??xe.get(ve.entityId)??null:null,Mt=(ve==null?void 0:ve.entityType)==="relation"?be.relation:null,Zi=Lm(Ie),Vi=qm(Ie),nu=wm(Ie),cu=yg(Mt),iu=vg(Mt),Ki=gg(Mt);function Wc(h){var q,V;const v=h.nodes.filter(f=>f.type==="project"),S=we&&v.some(f=>f.id===we)?we:((q=v[0])==null?void 0:q.id)??null;g(((V=h.nodes[0])==null?void 0:V.id)??""),Je(null),Lt(Hn()),Lc(null),on(S)}function tt(h,v){g(h),v&&Oe(v)}function $t(h){tt(h,"recent"),Je(h)}function pn(h){if(h.entityType==="node"&&h.nodeId){$t(h.nodeId);return}h.fromNodeId&&$t(h.fromNodeId)}function Dt(h){if(h.entityType==="node"&&h.nodeId){tt(h.nodeId,"graph");return}if(h.toNodeId){tt(h.toNodeId,"graph");return}h.fromNodeId&&tt(h.fromNodeId,"graph")}function yn(h){on(h),tt(h,"graph")}function Ji(h){tt(h,"graph")}function Fc(h){$s(v=>v.length?v.includes(h)?v.length===1?v:v.filter(S=>S!==h):[...v,h].sort((S,q)=>S.localeCompare(q)):Ic.filter(S=>S!==h))}async function oc(h){const v=sn==null?void 0:sn.id;if(tt(h.nodeId),!v||!h.relationId||!h.relationSource)return;const S=`${v}:${h.relationId}:bundle_clicked`;if(!Fn.current.has(S)){Fn.current.add(S);try{await Nm({relationId:h.relationId,relationSource:h.relationSource,eventType:"bundle_clicked",sessionId:Ui.current,delta:.4,metadata:{targetNodeId:v,surfacedVia:"context_bundle_preview",selectedNodeId:h.nodeId}})}catch{Fn.current.delete(S)}}}async function Ii(h){if(!ne||(tt(h.nodeId,"recent"),Je(h.nodeId),!h.relationId||!h.relationSource))return;const v=`${ne.id}:${h.relationId}:home_bundle_clicked`;if(!Pn.current.has(v)){Pn.current.add(v);try{await Nm({relationId:h.relationId,relationSource:h.relationSource,eventType:"bundle_clicked",sessionId:Ui.current,delta:.4,metadata:{targetNodeId:ne.id,surfacedVia:"home_active_project_digest",selectedNodeId:h.nodeId}})}catch{Pn.current.delete(v)}}}async function Za(h){const v=we;wn(h),Pa(null),_i(!0);try{await vv({[co]:h}),I(null)}catch(S){wn(v),ed(S)?Qe(S,"Failed to update workspace settings."):Pa(S instanceof Error?S.message:"Failed to update the active project.")}finally{_i(!1)}}function su(h){ft(h),It.current=h&&h===we?h:null}async function Pc(h){if(h.preventDefault(),!ja.trim()){Tl("Title is required.");return}Tl(null),ua(null),Qn(!0);try{const v=await kv({type:Sc,title:ja.trim(),body:qs.trim(),projectId:Sl||void 0}),S=v.node;await qa(),tt(S.id),Je(null),H("recent"),Ot(""),ws(""),Ls("note"),ft(we??""),It.current=we??null;const q=Sl?_e.find(V=>V.id===Sl)??null:null;ua(v.landing?`Saved as ${v.landing.canonicality?`${v.landing.canonicality} `:""}${v.landing.status}.${q?` Linked to ${q.title}.`:""} ${v.landing.reason}`:"Node saved."),I(null)}catch(v){ed(v)?(Pr(),D(!0),F("Enter the RecallX API token to continue."),Tl(null),ua(null)):(Tl(v instanceof Error?v.message:"Failed to create node."),ua(null))}finally{Qn(!1)}}async function vn(){if(sn){Fs(!0);try{const h=await Bv(sn.id);Lt(v=>({...v,node:h})),await qa(),I(null)}catch(h){Qe(h,"Failed to refresh summary.")}finally{Fs(!1)}}}async function yo(){if(ie){if(!Jn.trim()){zt("Title is required.");return}zt(null),Dc(!0);try{const h=await Hv({id:ie.id,title:Jn.trim(),body:In});Lt(v=>({...v,node:h})),await qa(),ua("Saved note changes."),cl(!1),I(null)}catch(h){Qe(h,"Failed to save note changes."),zt(h instanceof Error?h.message:"Failed to save note changes.")}finally{Dc(!1)}}}async function Ut(){if(ie){zt(null),Di(!0);try{await Gv(ie.id),await qa(),ua(`Archived ${ie.title}.`),Je(null),cl(!1),I(null)}catch(h){Qe(h,"Failed to archive node."),zt(h instanceof Error?h.message:"Failed to archive node.")}finally{Di(!1)}}}async function ml(h,v){tn(null),Uc(h);try{const S=await Lv({id:v.id,action:h,note:Pl});Lt(q=>{var V;return((V=q.node)==null?void 0:V.id)===v.id?{...q,node:S.node,governance:S.governance,activities:S.activity?[S.activity,...q.activities]:q.activities}:q}),xa(q=>{var V;return((V=q.node)==null?void 0:V.id)===v.id?{...q,node:S.node,governance:S.governance}:q}),await qa(),Hi(await ra()),Ba(await ec()),ua(h==="promote"?`Promoted ${S.node.title} to canonical.`:h==="contest"?`Marked ${S.node.title} contested.`:`Archived ${S.node.title} from governance.`),oa(""),I(null),h==="archive"&&At===v.id&&(Je(null),cl(!1),zt(null))}catch(S){Qe(S,"Failed to apply governance action."),tn(S instanceof Error?S.message:"Failed to apply governance action.")}finally{Uc(null)}}async function da(h,v){tn(null),Ks(h);try{const S=await qv({id:v.id,action:h,note:Pl});xa(q=>{var V;return((V=q.relation)==null?void 0:V.id)===v.id?{...q,relation:S.relation,governance:S.governance}:q}),await qa(),Hi(await ra()),Ba(await ec()),ua(h==="accept"?`Accepted relation ${S.relation.relationType}.`:h==="reject"?`Rejected relation ${S.relation.relationType}.`:`Archived relation ${S.relation.relationType}.`),oa(""),I(null)}catch(S){Qe(S,"Failed to apply relation governance action."),tn(S instanceof Error?S.message:"Failed to apply relation governance action.")}finally{Ks(null)}}async function uu(h){h.preventDefault();const v=L.trim();if(!v){F("API token is required in bearer mode.");return}dv(v),F(null),J(!0);try{await Aa(),D(!1),Y(""),I(null)}catch(S){Pr(),D(!0),Qe(S,"Failed to authenticate renderer.")}finally{J(!1)}}async function ei(h){h.preventDefault();const v=El.trim();if(!v){ht("Workspace root is required.");return}ht(null),al(!0);try{const S=Ec.trim(),q=await gv({rootPath:v,...S?{workspaceName:S}:{}}),V=await Aa({workspaceOverride:q.current,catalogOverride:q});Wc(V),_c("")}catch(S){Qe(S,"Failed to create workspace."),ht(S instanceof Error?S.message:"Failed to create workspace.")}finally{al(!1)}}async function pl(h){const v=h.trim();if(!v){ht("Workspace root is required.");return}ht(null),al(!0);try{const S=await bv(v),q=await Aa({workspaceOverride:S.current,catalogOverride:S});Wc(q)}catch(S){Qe(S,"Failed to switch workspace."),ht(S instanceof Error?S.message:"Failed to switch workspace.")}finally{al(!1)}}async function $i(){Rt(null),ht(null),Sa(!0);try{const h=await xv(Oi.trim()||void 0),v=await Sm();Cl(v),Ri(""),Rt(`Created snapshot at ${h.backupPath}`)}catch(h){ht(h instanceof Error?h.message:"Failed to create workspace backup.")}finally{Sa(!1)}}async function Wi(h){Rt(null),ht(null),Sa(!0);try{const v=await jv(h);Vs(v),Rt(`Exported ${h.toUpperCase()} snapshot to ${v.exportPath}`)}catch(v){ht(v instanceof Error?v.message:"Failed to export workspace.")}finally{Sa(!1)}}async function Fi(h){const v=Il.trim();if(!v){ht("Restore target root is required.");return}Rt(null),ht(null),Sa(!0);try{const S=await Av({backupId:h,targetRootPath:v,workspaceName:Ec.trim()||void 0}),q=await Aa({workspaceOverride:S.catalog.current,catalogOverride:S.catalog});Wc(q),Xs(""),Rt(S.autoBackup?`Created safety snapshot ${S.autoBackup.id} before restoring ${h} into ${v}.`:`Restored backup ${h} into ${v}.`)}catch(S){ht(S instanceof Error?S.message:"Failed to restore workspace backup.")}finally{Sa(!1)}}async function ou(){const h=Cc.trim();if(!h){_l("Import source path is required.");return}if(!et){_l("Preview the import before running it.");return}_l(null),ht(null),Rt(null),Mi(!0);try{const v=await Nv({format:Vn,sourcePath:h,label:Zn.trim()||void 0,options:Xe});await Aa(),$l(v),Mc(null),Oc(""),zi(""),Rt(`Created snapshot ${v.backupId} before import.`)}catch(v){_l(v instanceof Error?v.message:"Failed to import into workspace.")}finally{Mi(!1)}}async function Wt(){const h=Cc.trim();if(!h){_l("Import source path is required.");return}_l(null),ht(null),Rt(null),$l(null),Pe(!0);try{const v=await Sv({format:Vn,sourcePath:h,label:Zn.trim()||void 0,options:Xe});Mc(v)}catch(v){Mc(null),_l(v instanceof Error?v.message:"Failed to preview workspace import.")}finally{Pe(!1)}}function fa(){Mc(null),$l(null)}function Oe(h){I(null),T.startTransition(()=>{H(h)})}function rc(h){Ke(h.entityId),Oe("governance")}function Va(h){const v=xe.get(h);(v==null?void 0:v.type)==="project"&&(un("project-map"),on(h)),tt(h,"graph")}function Et(h){tt(h,"recent"),Je(h)}function qt(h){ba(v=>{const S=jm(v,h);return Xm(Om,S),S})}function yl(h){z(v=>{const S=jm(v,h);return Xm(Rm,S),S})}function wt(h){const v=w.trim();v&&qt(v),Et(h)}function Ra(h){qt(h),j(h),Oe("home"),Le(!1),Nl("searches")}function Ft(h="all",v="all"){Nc(h),qn(v),Oe("governance")}function Pi(h){yl(h.label),Le(!1),h.run()}function es(h){Le(!1),Et(h)}function ti(h){return w.trim()?n.jsxs("section",{className:"card search-refinement-card",children:[n.jsxs("div",{className:"page-copy compact-copy",children:[n.jsx("span",{className:"eyebrow",children:"Search refinement"}),n.jsx("h3",{children:h==="home"?"Keep Home search narrow and fast":"Trim mixed search results without rerunning the backend"})]}),n.jsxs("div",{className:"search-refinement-groups",children:[n.jsxs("div",{className:"search-filter-group",children:[n.jsx("span",{className:"search-filter-label",children:"Scope"}),n.jsx("div",{className:"chip-row",children:[["all","All"],["nodes","Nodes"],["activities","Activity"]].map(([v,S])=>n.jsx("button",{type:"button",className:`chip-button ${Ge===v?"active":""}`,onClick:()=>Ee(v),children:S},v))})]}),n.jsxs("div",{className:"search-filter-group",children:[n.jsx("span",{className:"search-filter-label",children:"Node type"}),n.jsxs("div",{className:"chip-row",children:[n.jsx("button",{type:"button",className:`chip-button ${me==="all"?"active":""}`,onClick:()=>Fe("all"),children:"All"}),nn.map(v=>n.jsx("button",{type:"button",className:`chip-button ${me===v?"active":""}`,onClick:()=>Fe(v),disabled:Ge==="activities",children:v},v))]})]}),n.jsxs("div",{className:"search-filter-group",children:[n.jsx("span",{className:"search-filter-label",children:"Activity type"}),n.jsx("div",{className:"chip-row",children:og.map(v=>n.jsx("button",{type:"button",className:`chip-button ${nt===v?"active":""}`,onClick:()=>na(v),disabled:Ge==="nodes",children:v==="all"?"All":"Review decisions"},v))})]}),n.jsxs("div",{className:"search-filter-group",children:[n.jsx("span",{className:"search-filter-label",children:"Source"}),n.jsxs("div",{className:"chip-row",children:[n.jsx("button",{type:"button",className:`chip-button ${ke==="all"?"active":""}`,onClick:()=>dt("all"),children:"All"}),tc.map(v=>n.jsx("button",{type:"button",className:`chip-button ${ke===v?"active":""}`,onClick:()=>dt(v),children:v},v))]})]})]}),n.jsxs("div",{className:"chip-row",children:[n.jsxs("span",{className:"chip chip-static",children:[Hc," filtered hits"]}),n.jsxs("span",{className:"chip chip-static",children:[le.total," backend hits"]}),n.jsx("span",{className:"chip chip-static",children:"Cmd/Ctrl+K opens the palette"})]})]}):null}const dc=T.useMemo(()=>Qt("palette.routeCommands",()=>$v([{label:"Open Home",hint:"Return to the re-entry surface",run:()=>Oe("home")},{label:"Open Memory",hint:"Browse memory and quick capture",run:()=>Oe("recent")},{label:"Open Graph",hint:"Inspect the broader memory graph",run:()=>{un("neighborhood"),Oe("graph")}},{label:"Open Review",hint:"Inspect trust and review signals",run:()=>Oe("governance")},{label:"Review promoted decisions",hint:"Open Review filtered to recent promote actions",run:()=>Ft("all","promote")},{label:"Review archived decisions",hint:"Open Review filtered to recent archive actions",run:()=>Ft("all","archive")},{label:"Review contested nodes",hint:"Open Review filtered to contested node decisions",run:()=>Ft("node","contest")},{label:"Review relation decisions",hint:"Open Review filtered to relation review activity",run:()=>Ft("relation","all")},..._a?[{label:"Open latest review in notes",hint:`${_a.title??_a.entityId} · ${Kl(_a.action)} · ${Zt(_a.createdAt)}`,run:()=>pn(_a)},{label:"Open latest review in graph",hint:`${_a.title??_a.entityId} · graph context`,run:()=>Dt(_a)}]:[],...fn?[{label:"Open latest review issue",hint:`${fn.title??fn.entityId} · reopen Review detail`,run:()=>rc(fn)}]:[],{label:"Open Workspace",hint:"Open backup, import, and safety tools",run:()=>Oe("settings")},{label:"Open API guide",hint:"Read HTTP and MCP access guidance",run:()=>Oe("search")},...ne?[{label:`Open ${ne.title} project map`,hint:"Jump straight to the active project graph",run:()=>Va(ne.id)}]:[]])),[ne,_a,fn]),Be=ca.trim().toLowerCase(),Re=T.useMemo(()=>Qt("palette.filteredRouteCommands",()=>Wv(dc,Be)),[dc,Be]),se=T.useMemo(()=>Qt("palette.recentCommands",()=>Fv(Ht,dc,Be)),[dc,Be,Ht]),Ka=T.useMemo(()=>ka.filter(h=>!Be||h.toLowerCase().includes(Be)),[Be,ka]),Yt=T.useMemo(()=>Jv(qi,Be),[Be,qi]),ts=(()=>{var h,v,S,q,V;return G?n.jsx("section",{className:"page-section page-section--centered",children:n.jsx("div",{className:"empty-state",children:"Opening the local memory field..."})}):he&&!p?n.jsx("section",{className:"page-section page-section--centered",children:n.jsx("div",{className:"empty-state",children:he})}):b?n.jsx("section",{className:"page-section page-section--centered",children:n.jsxs("div",{className:"card auth-card",children:[n.jsxs("div",{className:"page-copy",children:[n.jsx("span",{className:"eyebrow",children:"Renderer authentication"}),n.jsx("h2",{children:"Connect to continue"}),n.jsx("p",{children:"This workspace requires a bearer token before the renderer can use the live API."})]}),n.jsxs("form",{className:"capture-form",onSubmit:f=>void uu(f),children:[n.jsxs("label",{className:"search-box",htmlFor:"recallx-token",children:[n.jsx("span",{children:"API token"}),n.jsx("input",{id:"recallx-token",type:"password",value:L,onChange:f=>Y(f.target.value),placeholder:"Paste RECALLX_API_TOKEN"})]}),W?n.jsx("div",{className:"empty-state compact",children:W}):null,n.jsx("div",{className:"action-row",children:n.jsx("button",{type:"submit",disabled:G,children:G?"Connecting...":"Connect renderer"})})]})]})}):A==="search"||A==="projects"?n.jsxs("section",{className:"page-section page-section--guide",children:[n.jsxs("div",{className:"page-heading",children:[n.jsx("span",{className:"eyebrow",children:"Integrations"}),n.jsx("h2",{children:"API and MCP access."})]}),n.jsxs("div",{className:"guide-shell",children:[n.jsxs("aside",{className:"guide-sidebar",children:[n.jsxs("div",{className:"guide-sidebar-head",children:[n.jsx("span",{className:"eyebrow",children:"Developer guide"}),n.jsx("h3",{children:"Contents"})]}),n.jsx("div",{className:"guide-tree",children:lu.map(f=>n.jsxs("section",{className:"guide-tree-group",children:[n.jsx("div",{className:"guide-tree-group-label",children:f.group}),n.jsx("div",{className:"guide-tree-children",children:f.sections.map(fe=>n.jsx("button",{type:"button",className:`guide-tree-item ${Xa.id===fe.id?"active":""}`,onClick:()=>La(fe.id),children:fe.label},fe.id))})]},f.group))})]}),n.jsx("section",{className:"guide-content",children:n.jsxs("article",{className:"guide-article",children:[n.jsxs("div",{className:"guide-kicker-row",children:[n.jsx("span",{className:"eyebrow",children:Xa.group}),n.jsx("span",{className:"guide-section-meta",children:Xa.eyebrow})]}),n.jsx("h3",{children:Xa.title}),n.jsx("p",{className:"guide-body",children:Xa.body}),n.jsx("div",{className:"guide-copy-list",children:Xa.points.map(f=>n.jsx("p",{children:f},f))}),Xa.code?n.jsx("pre",{className:"guide-code-block",children:Xa.code}):null]})})]})]}):A==="governance"?n.jsxs("section",{className:"page-section",children:[n.jsxs("div",{className:"page-heading",children:[n.jsx("span",{className:"eyebrow",children:"Review"}),n.jsx("h2",{children:"Issue queue"})]}),n.jsxs("div",{className:"governance-layout",children:[n.jsxs("aside",{className:"card governance-list",children:[n.jsxs("div",{className:"section-head section-head--compact",children:[n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Issue queue"}),n.jsx("h3",{children:"Current items"})]}),n.jsx("span",{className:"pill tone-muted",children:mt.length})]}),n.jsxs("div",{className:"info-grid three",children:[n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Contested"}),n.jsx("strong",{children:$c.contested??0}),n.jsx("p",{children:"Needs direct review."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Low confidence"}),n.jsx("strong",{children:$c.low_confidence??0}),n.jsx("p",{children:"Needs stronger proof."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Healthy"}),n.jsx("strong",{children:$c.healthy??0}),n.jsx("p",{children:"Out of queue."})]})]}),n.jsxs("div",{className:"card-stack",children:[mt.map(f=>n.jsxs("button",{type:"button",className:`result-card governance-card ${ce===f.entityId?"selected":""}`,onClick:()=>Ke(f.entityId),children:[n.jsx("span",{className:"eyebrow",children:f.entityType==="node"?"Node issue":"Relation issue"}),n.jsxs("div",{className:"result-card__top",children:[n.jsx("strong",{children:f.title}),n.jsx("span",{className:`pill ${Vl(f.state)}`,children:f.state})]}),n.jsx("p",{children:f.subtitle||Bm(f.state)}),n.jsxs("div",{className:"meta-row",children:[n.jsx("span",{children:cd(`${f.entityType}:${f.entityId}`)}),n.jsx("span",{children:nd(f.confidence)})]})]},`${f.entityType}:${f.entityId}`)),mt.length?null:n.jsx("div",{className:"empty-state",children:"No governance issues are currently surfaced."})]})]}),n.jsx("section",{className:"card governance-detail",children:ve?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"section-head section-head--compact",children:[n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:ve.entityType==="node"?"Selected node issue":"Selected relation issue"}),n.jsx("h3",{children:ve.title})]}),n.jsx("span",{className:`pill ${Vl(ve.state)}`,children:ve.state})]}),n.jsxs("div",{className:"info-grid three",children:[n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Confidence"}),n.jsx("strong",{children:nd(ve.confidence)}),n.jsx("p",{children:"Current trust."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Action"}),n.jsx("strong",{children:mg(ve)}),n.jsx("p",{children:Bm(ve.state)})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Last transition"}),n.jsx("strong",{children:Zt(ve.lastTransitionAt)}),n.jsx("p",{children:"Most recent change."})]})]}),n.jsxs("div",{className:"governance-detail-grid",children:[n.jsxs("article",{className:"card governance-detail-card",children:[n.jsxs("div",{className:"page-copy compact-copy",children:[n.jsx("span",{className:"eyebrow",children:"Why this surfaced"}),n.jsx("h3",{children:"Reason"})]}),n.jsxs("div",{className:"card-stack compact-stack",children:[ve.reasons.map(f=>n.jsx("article",{className:"mini-card",children:n.jsx("strong",{children:f})},f)),ve.reasons.length?null:n.jsx("div",{className:"empty-state compact",children:"No explicit reasons yet."})]})]}),n.jsxs("article",{className:"card governance-detail-card",children:[n.jsxs("div",{className:"page-copy compact-copy",children:[n.jsx("span",{className:"eyebrow",children:"Context"}),n.jsx("h3",{children:"Entity"})]}),jc?n.jsx("div",{className:"empty-state compact",children:"Loading issue detail..."}):Ie?n.jsxs("div",{className:"card-stack compact-stack",children:[n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:Ie.title}),n.jsx("p",{children:Ie.summary})]}),n.jsxs("div",{className:"chip-row",children:[n.jsx("span",{className:"chip chip-static",children:Ie.type}),n.jsx("span",{className:"chip chip-static",children:Ie.status}),n.jsx("span",{className:"chip chip-static",children:Ie.sourceLabel})]}),n.jsxs("div",{className:"action-row",children:[n.jsx("button",{type:"button",onClick:()=>tt(Ie.id,"recent"),children:"Open"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>tt(Ie.id,"graph"),children:"Graph"})]}),Zi||Vi||nu?n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"search-box",htmlFor:"governance-decision-note",children:[n.jsx("span",{children:"Decision note"}),n.jsx("textarea",{id:"governance-decision-note",value:Pl,onChange:f=>oa(f.target.value),placeholder:"Optional short rationale for this human decision.",rows:3})]}),n.jsxs("div",{className:"action-row",children:[Zi?n.jsx("button",{type:"button",onClick:()=>void ml("promote",Ie),disabled:ct!==null,children:ct==="promote"?"Promoting...":"Promote"}):null,Vi?n.jsx("button",{type:"button",className:"ghost",onClick:()=>void ml("contest",Ie),disabled:ct!==null,children:ct==="contest"?"Marking...":"Mark contested"}):null,nu?n.jsx("button",{type:"button",className:"ghost",onClick:()=>void ml("archive",Ie),disabled:ct!==null,children:ct==="archive"?"Archiving...":"Archive suggestion"}):null]}),en?n.jsx("div",{className:"empty-state compact",children:en}):null]}):null]}):Mt?n.jsxs("div",{className:"card-stack compact-stack",children:[n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:ve.title}),n.jsx("p",{children:ve.subtitle||`${Mt.relationType} relation`})]}),n.jsxs("div",{className:"chip-row",children:[n.jsx("span",{className:"chip chip-static",children:Mt.relationType}),n.jsx("span",{className:"chip chip-static",children:Mt.status}),n.jsx("span",{className:"chip chip-static",children:Mt.sourceLabel})]}),n.jsxs("div",{className:"card-stack compact-stack",children:[n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:"From"}),n.jsx("p",{children:((h=be.fromNode)==null?void 0:h.title)??Mt.fromNodeId})]}),n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:"To"}),n.jsx("p",{children:((v=be.toNode)==null?void 0:v.title)??Mt.toNodeId})]})]}),n.jsxs("div",{className:"action-row",children:[be.fromNode?n.jsx("button",{type:"button",onClick:()=>tt(be.fromNode.id,"recent"),children:"Source"}):null,be.toNode?n.jsx("button",{type:"button",className:"ghost",onClick:()=>tt(be.toNode.id,"graph"),children:"Graph"}):null]}),cu||iu||Ki?n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"search-box",htmlFor:"governance-relation-decision-note",children:[n.jsx("span",{children:"Decision note"}),n.jsx("textarea",{id:"governance-relation-decision-note",value:Pl,onChange:f=>oa(f.target.value),placeholder:"Optional short rationale for this relation decision.",rows:3})]}),n.jsxs("div",{className:"action-row",children:[cu?n.jsx("button",{type:"button",onClick:()=>void da("accept",Mt),disabled:an!==null,children:an==="accept"?"Accepting...":"Accept"}):null,iu?n.jsx("button",{type:"button",className:"ghost",onClick:()=>void da("reject",Mt),disabled:an!==null,children:an==="reject"?"Rejecting...":"Reject"}):null,Ki?n.jsx("button",{type:"button",className:"ghost",onClick:()=>void da("archive",Mt),disabled:an!==null,children:an==="archive"?"Archiving...":"Archive"}):null]}),en?n.jsx("div",{className:"empty-state compact",children:en}):null]}):null]}):n.jsx("div",{className:"empty-state compact",children:"No extra entity detail is available here yet."})]}),n.jsxs("article",{className:"card governance-detail-card",children:[n.jsxs("div",{className:"page-copy compact-copy",children:[n.jsx("span",{className:"eyebrow",children:"Recent decisions"}),n.jsx("h3",{children:"Recent decisions"})]}),n.jsxs("div",{className:"governance-feed-toolbar",children:[n.jsx("div",{className:"chip-row",children:Dm.map(f=>n.jsx("button",{type:"button",className:`tool-chip ${Ha===f?"tool-chip--active":""}`,onClick:()=>Nc(f),children:f==="all"?"All entities":f==="node"?"Nodes":"Relations"},f))}),n.jsx("div",{className:"chip-row",children:Um.map(f=>n.jsx("button",{type:"button",className:`tool-chip ${sa===f?"tool-chip--active":""}`,onClick:()=>qn(f),children:f==="all"?"All actions":Kl(f)},f))})]}),n.jsxs("div",{className:"governance-feed-list",children:[Fa?n.jsx("div",{className:"empty-state compact",children:"Loading recent governance decisions..."}):null,Fa?null:ia.map(f=>n.jsxs("article",{className:"mini-card governance-feed-card",children:[n.jsxs("div",{className:"result-card__top",children:[n.jsxs("div",{children:[n.jsx("strong",{children:f.title??cd(`${f.entityType}:${f.entityId}`)}),n.jsx("p",{children:f.reason})]}),n.jsx("span",{className:`pill ${Vl(f.nextState)}`,children:Kl(f.action)})]}),n.jsx("div",{className:"meta-row",children:n.jsx("span",{children:Gm(f)})}),n.jsxs("div",{className:"chip-row",children:[n.jsx("span",{className:"chip chip-static",children:f.entityType}),f.subtitle?n.jsx("span",{className:"chip chip-static",children:f.subtitle}):null,f.relationType?n.jsx("span",{className:"chip chip-static",children:xc(f.relationType)}):null]}),n.jsxs("div",{className:"meta-row",children:[n.jsx("span",{children:Zt(f.createdAt)}),n.jsx("span",{children:nd(f.confidence)})]}),n.jsxs("div",{className:"action-row governance-feed-card__actions",children:[n.jsx("button",{type:"button",onClick:()=>pn(f),children:"Open"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>Dt(f),children:"Graph"}),id(mt,f)?n.jsx("button",{type:"button",className:"ghost",onClick:()=>Ke(f.entityId),children:"Issue"}):null]})]},f.id)),!Fa&&!ia.length?n.jsx("div",{className:"empty-state compact",children:"No decisions match current filters."}):null]})]})]})]}):n.jsx("div",{className:"empty-state",children:"No governance issue is selected."})})]})]}):A==="graph"?n.jsxs("section",{className:"page-section",children:[n.jsxs("div",{className:"page-heading",children:[n.jsx("span",{className:"eyebrow",children:"Graph"}),n.jsx("h2",{children:"Relationships"})]}),n.jsxs("section",{className:"card page-card",children:[n.jsxs("div",{className:"graph-toolbar",children:[n.jsxs("div",{className:"chip-row",children:[n.jsx("button",{type:"button",className:`tool-chip ${it==="neighborhood"?"tool-chip--active":""}`,onClick:()=>un("neighborhood"),children:"Neighborhood"}),n.jsx("button",{type:"button",className:`tool-chip ${it==="project-map"?"tool-chip--active":""}`,onClick:()=>un("project-map"),children:"Project map"})]}),it==="neighborhood"?n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Focus node"}),n.jsx("select",{value:(je==null?void 0:je.id)??"",onChange:f=>{f.target.value&&tt(f.target.value)},children:cn.map(f=>n.jsx("option",{value:f.id,children:`${f.title} · ${f.type}`},f.id))})]}),n.jsxs("div",{className:"chip-row",children:[n.jsx("button",{type:"button",className:`tool-chip ${ac===1?"tool-chip--active":""}`,onClick:()=>Gc(1),children:"1 hop"}),n.jsx("button",{type:"button",className:`tool-chip ${ac===2?"tool-chip--active":""}`,onClick:()=>Gc(2),children:"2 hops"})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Focus project"}),n.jsx("select",{value:(bt==null?void 0:bt.id)??"",onChange:f=>{f.target.value&&yn(f.target.value)},children:_e.map(f=>n.jsx("option",{value:f.id,children:f.title},f.id))})]}),n.jsxs("div",{className:"chip-row",children:[n.jsx("button",{type:"button",className:`tool-chip ${qc.canonical?"tool-chip--active":""}`,onClick:()=>Js(f=>({...f,canonical:!f.canonical})),children:"Canonical"}),n.jsx("button",{type:"button",className:`tool-chip ${qc.inferred?"tool-chip--active":""}`,onClick:()=>Js(f=>({...f,inferred:!f.inferred})),children:"Inferred"})]})]})]}),it==="project-map"&&Ic.length?n.jsx("div",{className:"graph-filter-row",children:Ic.map(f=>{const fe=dl.includes(f);return n.jsx("button",{type:"button",className:`tool-chip ${fe?"tool-chip--active":""}`,onClick:()=>Fc(f),children:xc(f)},f)})}):null,n.jsx("div",{className:"graph-summary-grid",children:it==="neighborhood"?n.jsxs(n.Fragment,{children:[n.jsxs("article",{className:"graph-focus graph-focus-card",children:[n.jsx("span",{className:"eyebrow",children:"Focus node"}),n.jsx("strong",{children:je==null?void 0:je.title}),n.jsx("p",{children:je==null?void 0:je.summary})]}),n.jsxs("article",{className:"mini-card",children:[n.jsx("span",{className:"eyebrow",children:"Connected nodes"}),n.jsxs("strong",{children:[Dl.distinctNodes.length," nodes"]}),n.jsxs("p",{children:[lc.length," visible paths."]})]}),n.jsxs("article",{className:"mini-card",children:[n.jsx("span",{className:"eyebrow",children:"Signal mix"}),n.jsxs("strong",{children:[uc.length," relation types"]}),n.jsxs("p",{children:[Dl.suggestedCount," links still need review."]})]}),n.jsxs("article",{className:"mini-card",children:[n.jsx("span",{className:"eyebrow",children:"Direction"}),n.jsxs("strong",{children:[Dl.outgoingCount," out / ",Dl.incomingCount," in"]}),n.jsx("p",{children:"Outbound vs inbound."})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("article",{className:"graph-focus graph-focus-card",children:[n.jsx("span",{className:"eyebrow",children:"Focus project"}),n.jsx("strong",{children:(bt==null?void 0:bt.title)??"No project selected"}),n.jsx("p",{children:(bt==null?void 0:bt.summary)??"Select a project to open its graph."})]}),n.jsxs("article",{className:"mini-card",children:[n.jsx("span",{className:"eyebrow",children:"Visible graph"}),n.jsxs("strong",{children:[Oa.nodes.length," nodes"]}),n.jsxs("p",{children:[Oa.edges.length," visible edges."]})]}),n.jsxs("article",{className:"mini-card",children:[n.jsx("span",{className:"eyebrow",children:"Signal split"}),n.jsxs("strong",{children:[(Ce==null?void 0:Ce.meta.inferredEdgeCount)??0," inferred"]}),n.jsxs("p",{children:[(Ce==null?void 0:Ce.meta.edgeCount)??0," total edges in scope."]})]}),n.jsxs("article",{className:"mini-card",children:[n.jsx("span",{className:"eyebrow",children:"Timeline"}),n.jsxs("strong",{children:[(Ce==null?void 0:Ce.timeline.length)??0," events"]}),n.jsx("p",{children:Qa?Qa.label:"Use the scrubber to move in time."})]})]})}),Bi?n.jsx("div",{className:"empty-state",children:Bi}):null,nc?n.jsx("div",{className:"empty-state",children:it==="project-map"?"Loading project graph...":"Loading graph neighborhood..."}):null,!nc&&it==="neighborhood"&&!lc.length?n.jsxs("div",{className:"graph-empty",children:[n.jsx("div",{className:"empty-state",children:"No linked memory for this node yet."}),n.jsxs("div",{className:"graph-support-grid",children:[n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:"Context bundle signals"}),n.jsx("p",{children:Se.bundleItems.length?`${Se.bundleItems.length} bundle items are available even without graph links.`:"No bundle signals for this node yet."})]}),n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:"Related detail nodes"}),n.jsx("p",{children:Se.related.length?`${Se.related.length} related nodes can guide the first relation pass.`:"No explicit related nodes for this focus."})]})]})]}):null,!nc&&it==="project-map"&&!bt?n.jsx("div",{className:"graph-empty",children:n.jsx("div",{className:"empty-state",children:"Select a project to open the map."})}):null,!nc&&it==="project-map"&&bt&&!Oa.edges.length?n.jsx("div",{className:"graph-empty",children:n.jsx("div",{className:"empty-state",children:"This project map is still sparse."})}):null,it==="neighborhood"&&uc.length?n.jsxs("section",{className:"graph-section-grid",children:[n.jsxs("article",{className:"card relation-group-card",children:[n.jsx("div",{className:"section-head section-head--compact",children:n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Relation groups"}),n.jsx("h3",{children:"Link types"})]})}),n.jsx("div",{className:"relation-group-grid",children:uc.map(f=>n.jsxs("article",{className:"mini-card",children:[n.jsx("span",{className:`chip relation-chip ${ld(f.relationType)}`,children:xc(f.relationType)}),n.jsxs("strong",{children:[f.count," links"]}),n.jsxs("p",{children:["Visible in the current ",ac,"-hop neighborhood."]})]},f.relationType))})]}),n.jsxs("article",{className:"card relation-group-card",children:[n.jsx("div",{className:"section-head section-head--compact",children:n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Connected memory"}),n.jsx("h3",{children:"Nearby nodes"})]})}),n.jsx("div",{className:"graph-related-grid",children:lc.map(f=>n.jsxs("button",{type:"button",className:`graph-node graph-node--hop-${f.hop}`,onClick:()=>{tt(f.node.id,"graph")},children:[n.jsxs("div",{className:"result-card__top",children:[n.jsx("strong",{children:f.node.title}),n.jsx("span",{className:`pill ${Vl(f.node.status)}`,children:f.node.type})]}),n.jsx("p",{children:f.node.summary}),n.jsxs("div",{className:"chip-row",children:[n.jsx("span",{className:`chip relation-chip ${ld(f.relation.relationType)}`,children:xc(f.relation.relationType)}),n.jsx("span",{className:"chip chip-static",children:f.direction}),n.jsxs("span",{className:"chip chip-static",children:[f.hop," hop"]})]})]},`${f.relation.id}:${f.node.id}:${f.viaNodeId??"focus"}`))})]})]}):null,it==="project-map"&&fl&&Oa.nodes.length?n.jsxs("section",{className:"graph-section-grid graph-section-grid--project",children:[n.jsxs("article",{className:"card relation-group-card project-graph-card",children:[n.jsxs("div",{className:"section-head section-head--compact",children:[n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Project map"}),n.jsx("h3",{children:"Project field"})]}),n.jsxs("div",{className:"chip-row",children:[n.jsx("button",{type:"button",className:`tool-chip ${Yc?"tool-chip--active":""}`,disabled:!fl.timeline.length,onClick:()=>{Xc(f=>!f)},children:Yc?"Pause":"Play"}),n.jsx("button",{type:"button",className:"tool-chip",disabled:!fl.timeline.length,onClick:()=>wc(Math.max(fl.timeline.length-1,0)),children:"Latest"})]})]}),n.jsx(T.Suspense,{fallback:n.jsx("div",{className:"empty-state compact",children:"Loading project graph canvas..."}),children:n.jsx(hg,{graph:fl,selectedNodeId:(je==null?void 0:je.id)??null,emphasizedNodeIds:Oa.emphasizedNodeIds,emphasizedEdgeIds:Oa.emphasizedEdgeIds,onSelectNode:Ji})}),n.jsxs("div",{className:"project-graph-controls",children:[n.jsxs("label",{className:"search-box project-graph-scrubber",children:[n.jsx("span",{children:"Time emphasis"}),n.jsx("input",{type:"range",min:0,max:Math.max(fl.timeline.length-1,0),value:Math.min(rn,Math.max(fl.timeline.length-1,0)),onChange:f=>{Xc(!1),wc(Number(f.target.value))}})]}),n.jsxs("div",{className:"mini-card",children:[n.jsx("span",{className:"eyebrow",children:"Current event"}),n.jsx("strong",{children:(Qa==null?void 0:Qa.label)??"Latest state"}),n.jsx("p",{children:Qa?Zt(Qa.at):"No timeline events yet."})]})]})]}),n.jsxs("article",{className:"card relation-group-card",children:[n.jsx("div",{className:"section-head section-head--compact",children:n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Relation groups"}),n.jsx("h3",{children:"Top link types"})]})}),n.jsxs("div",{className:"relation-group-grid",children:[hl.map(f=>n.jsxs("article",{className:"mini-card",children:[n.jsx("span",{className:`chip relation-chip ${ld(f.relationType)}`,children:xc(f.relationType)}),n.jsxs("strong",{children:[f.count," links"]}),n.jsx("p",{children:"Visible in the current project map filters."})]},f.relationType)),hl.length?null:n.jsx("div",{className:"empty-state compact",children:"No relation groups are visible with the current filters."})]})]})]}):null,(Se.bundleItems.length||Se.activities.length)&&!nc?n.jsxs("section",{className:"graph-section-grid",children:[n.jsxs("article",{className:"card relation-group-card",children:[n.jsx("div",{className:"section-head section-head--compact",children:n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Context signals"}),n.jsx("h3",{children:"Nearby memory"})]})}),n.jsxs("div",{className:"card-stack compact-stack",children:[Se.bundleItems.slice(0,3).map(f=>n.jsxs("button",{type:"button",className:"mini-card mini-card--interactive",onClick:()=>void oc(f),children:[n.jsx("strong",{children:f.title??f.nodeId}),n.jsx("p",{children:f.reason})]},f.nodeId)),Se.bundleItems.length?null:n.jsx("div",{className:"empty-state compact",children:"No bundle signals for this focus yet."})]})]}),n.jsxs("article",{className:"card relation-group-card",children:[n.jsx("div",{className:"section-head section-head--compact",children:n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Recent activity"}),n.jsx("h3",{children:"Recent activity"})]})}),n.jsxs("div",{className:"card-stack compact-stack",children:[Se.activities.slice(0,3).map(f=>n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:Bs(f)}),n.jsx("p",{children:Hs(f)})]},f.id)),Se.activities.length?null:n.jsx("div",{className:"empty-state compact",children:"No recent activity on this node yet."})]})]})]}):null]})]}):A==="settings"?n.jsxs("section",{className:"page-section",children:[n.jsxs("div",{className:"page-heading",children:[n.jsx("span",{className:"eyebrow",children:"Current workspace"}),n.jsx("h2",{children:"Workspace ops"})]}),n.jsxs("div",{className:"two-column-grid",children:[n.jsxs("section",{id:"workspace-settings-card",tabIndex:-1,className:"card page-card",children:[n.jsxs("div",{className:"info-grid three",children:[n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Active"}),n.jsx("strong",{children:rl}),n.jsx("p",{children:"Primary local memory field."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Mode"}),n.jsx("strong",{children:"Workspace-first"}),n.jsx("p",{children:"Projects stay inside this workspace."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"API bind"}),n.jsx("strong",{children:(s==null?void 0:s.apiBind)??"127.0.0.1:8787"}),n.jsx("p",{children:"Local integration address."})]})]}),n.jsxs("form",{className:"capture-form compact-form",onSubmit:f=>void ei(f),children:[n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Workspace root"}),n.jsx("input",{value:El,onChange:f=>Ci(f.target.value),placeholder:"/Users/name/Documents/MyRecallX"})]}),n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Workspace name"}),n.jsx("input",{value:Ec,onChange:f=>_c(f.target.value),placeholder:"Optional display name"})]}),Ga?n.jsx("div",{className:"empty-state compact",children:Ga}):null,n.jsxs("div",{className:"action-row",children:[n.jsx("button",{type:"submit",disabled:Kn,children:Kn?"Switching...":"Create and switch"}),n.jsx("button",{type:"button",className:"ghost",disabled:Kn,onClick:()=>void pl(El),children:"Open existing"})]})]})]}),n.jsxs("aside",{className:"card page-card",children:[n.jsxs("div",{className:"page-copy",children:[n.jsx("span",{className:"eyebrow",children:"Recent workspaces"}),n.jsx("h3",{children:"Recent workspaces"})]}),n.jsx("div",{className:"card-stack",children:o.map(f=>n.jsxs("button",{type:"button",className:"route-card",disabled:Kn||f.isCurrent,onClick:()=>{Ci(f.rootPath),pl(f.rootPath)},children:[n.jsxs("div",{children:[n.jsx("strong",{children:f.name}),n.jsx("span",{children:f.rootPath})]}),n.jsx("em",{children:f.isCurrent?"Current":"Open"})]},f.rootPath))})]})]}),n.jsxs("div",{className:"two-column-grid",children:[n.jsxs("section",{id:"server-status-card",tabIndex:-1,className:"card page-card",children:[n.jsxs("div",{className:"page-copy",children:[n.jsx("span",{className:"eyebrow",children:"Server status"}),n.jsx("h3",{children:"API health"})]}),n.jsxs("div",{className:"info-grid three",children:[n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Status"}),n.jsx("strong",{children:s?"running":"starting"}),n.jsx("p",{children:"Available for renderer, CLI, and MCP."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"API base"}),n.jsx("strong",{children:Ml}),n.jsx("p",{children:"Loopback base URL."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Auth mode"}),n.jsx("strong",{children:(s==null?void 0:s.authMode)??"optional"}),n.jsx("p",{children:"Bootstrap auth mode."})]})]})]}),n.jsxs("section",{id:"workspace-status-card",tabIndex:-1,className:"card page-card",children:[n.jsxs("div",{className:"page-copy",children:[n.jsx("span",{className:"eyebrow",children:"Workspace status"}),n.jsx("h3",{children:"Paths"})]}),n.jsxs("div",{className:"info-grid three",children:[n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Root"}),n.jsx("strong",{children:pt||"Unavailable"}),n.jsx("p",{children:"Current workspace root."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Database"}),n.jsx("strong",{children:Yi||"Unavailable"}),n.jsx("p",{children:"SQLite source of truth for the active memory field."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Artifacts"}),n.jsx("strong",{children:Xi||"Unavailable"}),n.jsx("p",{children:"Attachment file storage."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Exports"}),n.jsx("strong",{children:Qi||"Unavailable"}),n.jsx("p",{children:"Portable export files."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Imports"}),n.jsx("strong",{children:Jc||"Unavailable"}),n.jsx("p",{children:"Imported source staging."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Backups"}),n.jsx("strong",{children:eu||"Unavailable"}),n.jsx("p",{children:"Manual snapshot storage."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Safety"}),n.jsx("strong",{children:Ya.length?`${Ya.length} warning(s)`:"clear"}),n.jsx("p",{children:"Session and lock signals."})]})]})]})]}),n.jsxs("div",{className:"two-column-grid",children:[n.jsxs("section",{className:"card page-card",children:[n.jsxs("div",{className:"page-copy",children:[n.jsx("span",{className:"eyebrow",children:"Safety"}),n.jsx("h3",{children:"Safety signals"})]}),n.jsxs("div",{className:"info-grid three",children:[n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Machine"}),n.jsx("strong",{children:((S=s==null?void 0:s.safety)==null?void 0:S.machineId)??"Unavailable"}),n.jsx("p",{children:"Current host marker."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Last opened"}),n.jsx("strong",{children:(q=s==null?void 0:s.safety)!=null&&q.lastOpenedAt?Zt(s.safety.lastOpenedAt):"Unavailable"}),n.jsx("p",{children:"Most recent session open."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Last clean close"}),n.jsx("strong",{children:(V=s==null?void 0:s.safety)!=null&&V.lastCleanCloseAt?Zt(s.safety.lastCleanCloseAt):"Not recorded yet"}),n.jsx("p",{children:"Latest clean shutdown marker."})]})]}),Ya.length?n.jsx("div",{className:"card-stack compact-stack",children:Ya.map(f=>n.jsx("div",{className:"empty-state compact",children:f.message},f.code))}):n.jsx("div",{className:"notice",children:"No active lock or unclean-close warning."})]}),n.jsxs("section",{className:"card page-card",children:[n.jsxs("div",{className:"page-copy",children:[n.jsx("span",{className:"eyebrow",children:"Safe handoff"}),n.jsx("h3",{children:"Device handoff"})]}),n.jsx("div",{className:"card-stack compact-stack",children:mo.map(f=>n.jsx("article",{className:"mini-card",children:n.jsx("p",{children:f})},f))}),n.jsxs("div",{className:"info-grid three",children:[n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Model"}),n.jsx("strong",{children:"Single writer"}),n.jsx("p",{children:"Sync is transport, not collaboration."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Warning state"}),n.jsx("strong",{children:Ya.length?"needs care":"clear"}),n.jsx("p",{children:"Cross-machine and shutdown signals."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Best next step"}),n.jsx("strong",{children:Ya.length?"snapshot first":"handoff normally"}),n.jsx("p",{children:"Back up first if handoff feels uncertain."})]})]})]}),n.jsxs("section",{className:"card page-card",children:[n.jsxs("div",{className:"page-copy",children:[n.jsx("span",{className:"eyebrow",children:"Backup and restore"}),n.jsx("h3",{children:"Snapshot before risky moves"})]}),n.jsxs("form",{className:"capture-form compact-form",onSubmit:f=>{f.preventDefault(),$i()},children:[n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Snapshot label"}),n.jsx("input",{value:Oi,onChange:f=>Ri(f.target.value),placeholder:"before-upgrade"})]}),n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Restore target root"}),n.jsx("input",{value:Il,onChange:f=>Xs(f.target.value),placeholder:"/Users/name/Documents/RecallX-Restore"})]}),Ga?n.jsx("div",{className:"empty-state compact",children:Ga}):null,nl?n.jsx("div",{className:"notice",children:nl}):null,Zs?n.jsxs("div",{className:"notice",children:["Latest export: ",Zs.exportPath]}):null,n.jsxs("div",{className:"action-row",children:[n.jsx("button",{type:"submit",disabled:Na,children:Na?"Working...":"Create snapshot"}),n.jsx("button",{type:"button",className:"ghost",disabled:Na,onClick:()=>void Wi("json"),children:"Export JSON"}),n.jsx("button",{type:"button",className:"ghost",disabled:Na,onClick:()=>void Wi("markdown"),children:"Export Markdown"})]})]}),n.jsx("div",{className:"card-stack compact-stack",children:Rc.length?Rc.slice(0,5).map(f=>n.jsxs("button",{type:"button",className:"route-card",disabled:Na,onClick:()=>void Fi(f.id),children:[n.jsxs("div",{children:[n.jsx("strong",{children:f.label}),n.jsx("span",{children:f.backupPath})]}),n.jsx("em",{children:Zt(f.createdAt)})]},f.id)):n.jsx("div",{className:"empty-state compact",children:"No snapshots yet."})})]})]}),n.jsxs("section",{className:"card page-card",children:[n.jsxs("div",{className:"page-copy",children:[n.jsx("span",{className:"eyebrow",children:"Import onboarding"}),n.jsx("h3",{children:"Import notes into this workspace"})]}),n.jsxs("form",{className:"capture-form compact-form",onSubmit:f=>{f.preventDefault(),ou()},children:[n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Import format"}),n.jsxs("select",{value:Vn,onChange:f=>{tl(f.target.value),fa()},children:[n.jsx("option",{value:"markdown",children:"Markdown file or folder"}),n.jsx("option",{value:"recallx_json",children:"RecallX JSON export"})]})]}),n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Local source path"}),n.jsx("input",{value:Cc,onChange:f=>{Oc(f.target.value),fa()},placeholder:Vn==="markdown"?"/Users/name/Documents/notes":"/Users/name/Downloads/recallx-export.json"})]}),n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Import label"}),n.jsx("input",{value:Zn,onChange:f=>{zi(f.target.value),fa()},placeholder:"Imported project notes"})]}),n.jsxs("div",{className:"info-grid three",children:[n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Title cleanup"}),n.jsxs("select",{value:Xe.normalizeTitleWhitespace?"normalize":"preserve",onChange:f=>{gt(fe=>({...fe,normalizeTitleWhitespace:f.target.value==="normalize"})),fa()},children:[n.jsx("option",{value:"normalize",children:"Normalize whitespace"}),n.jsx("option",{value:"preserve",children:"Preserve existing spacing"})]})]}),n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Body cleanup"}),n.jsxs("select",{value:Xe.trimBodyWhitespace?"trim":"preserve",onChange:f=>{gt(fe=>({...fe,trimBodyWhitespace:f.target.value==="trim"})),fa()},children:[n.jsx("option",{value:"preserve",children:"Preserve body spacing"}),n.jsx("option",{value:"trim",children:"Trim trailing blank lines"})]})]}),n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Duplicate mode"}),n.jsxs("select",{value:Xe.duplicateMode,onChange:f=>{gt(fe=>({...fe,duplicateMode:f.target.value==="skip_exact"?"skip_exact":"warn"})),fa()},children:[n.jsx("option",{value:"warn",children:"Warn only"}),n.jsx("option",{value:"skip_exact",children:"Skip exact duplicates"})]})]})]}),Qs?n.jsx("div",{className:"empty-state compact",children:Qs}):null,et?n.jsxs("div",{className:"card-stack compact-stack",children:[n.jsxs("div",{className:"notice",children:["Previewed ",et.nodesDetected," nodes, ",et.relationsDetected," relations, and"," ",et.activitiesDetected," activities from ",et.sourcePath,"."]}),n.jsxs("div",{className:"info-grid three",children:[n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Ready"}),n.jsxs("strong",{children:[et.nodesReady," nodes"]}),n.jsxs("p",{children:[et.duplicateCandidates," likely duplicates detected."]})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Skipped if applied"}),n.jsxs("strong",{children:[et.skippedNodes," nodes"]}),n.jsxs("p",{children:[et.skippedRelations," relations and ",et.skippedActivities," activities would be skipped."]})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Normalization"}),n.jsx("strong",{children:et.options.normalizeTitleWhitespace?"Normalized titles":"Original spacing"}),n.jsx("p",{children:et.options.trimBodyWhitespace?"Trailing blank lines trimmed.":"Body spacing preserved."})]})]}),et.sampleItems.length?n.jsx("div",{className:"card-stack compact-stack",children:et.sampleItems.map(f=>n.jsxs("div",{className:"empty-state compact",children:[n.jsx("strong",{children:f.title}),n.jsx("div",{children:f.sourcePath}),n.jsx("div",{children:f.duplicateKind?`Duplicate signal: ${f.duplicateKind}`:"No duplicate signal detected."})]},`${f.sourcePath}-${f.title}`))}):null,et.duplicateItems.length?n.jsx("div",{className:"card-stack compact-stack",children:et.duplicateItems.map(f=>n.jsxs("div",{className:"empty-state compact",children:[n.jsx("strong",{children:f.title}),n.jsx("div",{children:f.sourcePath}),n.jsxs("div",{children:[f.matchType==="exact"?"Exact duplicate":"Title match"," against"," ",f.existingSource==="workspace"?"workspace content":"another item in this import","."]})]},`${f.sourcePath}-${f.existingNodeId??f.existingNodeTitle??f.title}`))}):null]}):null,St?n.jsxs("div",{className:"notice",children:["Imported ",St.nodesCreated," nodes, ",St.relationsCreated," relations, and"," ",St.activitiesCreated," activities from ",St.sourcePath,". Skipped"," ",St.skippedNodes," nodes, ",St.skippedRelations," relations, and"," ",St.skippedActivities," activities."]}):null,n.jsxs("div",{className:"action-row",children:[n.jsx("button",{type:"button",onClick:()=>void Wt(),disabled:zc||ll,children:ll?"Previewing...":"Preview import"}),n.jsx("button",{type:"submit",disabled:zc||ll||!et,children:zc?"Importing...":"Run import"})]})]}),n.jsxs("div",{className:"info-grid three",children:[n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Safety"}),n.jsx("strong",{children:"Snapshot first"}),n.jsx("p",{children:"Backup runs before import."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Provenance"}),n.jsx("strong",{children:Jc||"Unavailable"}),n.jsx("p",{children:"Source files are copied into imports."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Scope"}),n.jsx("strong",{children:"v1 inbound path"}),n.jsx("p",{children:"Markdown and RecallX JSON are supported."})]})]}),St!=null&&St.warnings.length?n.jsx("div",{className:"card-stack compact-stack",children:St.warnings.map(f=>n.jsx("div",{className:"empty-state compact",children:f},f))}):null]}),n.jsxs("section",{id:"mcp-status-card",tabIndex:-1,className:"card page-card",children:[n.jsxs("div",{className:"page-copy",children:[n.jsx("span",{className:"eyebrow",children:"Launchers"}),n.jsx("h3",{children:"CLI and MCP entrypoints"})]}),n.jsxs("div",{className:"info-grid two",children:[n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"CLI version"}),n.jsx("strong",{children:s!=null&&s.name?"active workspace loaded":"Unavailable"}),n.jsx("p",{children:"Use `recallx update` to check npm updates for installed runtimes."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"MCP command"}),n.jsx("strong",{children:au}),n.jsx("p",{children:"Direct command for testing the MCP server outside editor integration."})]})]})]})]}):A==="recent"?n.jsxs("section",{className:"page-section",children:[n.jsxs("div",{className:"page-heading",children:[n.jsx("span",{className:"eyebrow",children:"Memory"}),n.jsx("h2",{children:"Browse memory"})]}),n.jsxs("div",{className:"notes-toolbar",children:[n.jsxs("section",{className:"card notes-toolbar-card",children:[n.jsxs("div",{className:"page-copy compact-copy",children:[n.jsx("span",{className:"eyebrow",children:"Search"}),n.jsx("h3",{children:"Find cards"})]}),n.jsxs("label",{className:"search-box",htmlFor:"notes-search-input",children:[n.jsx("span",{children:"Query"}),n.jsx("input",{id:"notes-search-input",value:Z,onChange:f=>j(f.target.value),placeholder:"Search memory"})]}),n.jsxs("div",{className:"chip-row",children:[n.jsx("span",{className:"chip chip-static",children:w.trim()?`${Hc} filtered hits`:`${cc.length} recent cards`}),n.jsx("span",{className:"chip chip-static",children:rl}),w.trim()?n.jsxs("span",{className:"chip chip-static",children:[le.total," backend hits"]}):null,n.jsx("button",{type:"button",className:"chip-button",onClick:()=>Le(!0),children:"Cmd/Ctrl+K"})]})]}),n.jsxs("section",{className:"card notes-toolbar-card",children:[n.jsxs("div",{className:"page-copy compact-copy",children:[n.jsx("span",{className:"eyebrow",children:"Capture"}),n.jsx("h3",{children:"Add memory"})]}),n.jsxs("form",{className:"capture-form notes-capture-form",onSubmit:f=>void Pc(f),children:[n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Type"}),n.jsxs("select",{value:Sc,onChange:f=>Ls(f.target.value),children:[n.jsx("option",{value:"note",children:"note"}),n.jsx("option",{value:"idea",children:"idea"}),n.jsx("option",{value:"question",children:"question"}),n.jsx("option",{value:"decision",children:"decision"}),n.jsx("option",{value:"reference",children:"reference"}),n.jsx("option",{value:"project",children:"project"})]})]}),n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Project"}),n.jsxs("select",{value:Sl,onChange:f=>su(f.target.value),children:[n.jsx("option",{value:"",children:"No project"}),_e.map(f=>n.jsx("option",{value:f.id,children:f.title},f.id))]})]}),n.jsxs("label",{className:"search-box",children:[n.jsx("span",{children:"Title"}),n.jsx("input",{id:"capture-title-input",value:ja,onChange:f=>Ot(f.target.value),placeholder:"Note title"})]}),n.jsxs("label",{className:"search-box notes-capture-body",children:[n.jsx("span",{children:"Body"}),n.jsx("textarea",{value:qs,onChange:f=>ws(f.target.value),placeholder:"Write a concise note.",rows:3})]}),n.jsx("div",{className:"action-row",children:n.jsx("button",{type:"submit",disabled:el,children:el?"Saving...":"Save"})})]}),Ys?n.jsx("div",{className:"empty-state compact",children:Ys}):null,Xn?n.jsx("div",{className:"notice",children:Xn}):null]})]}),ti("notes"),le.error?n.jsx("div",{className:"empty-state compact",children:le.error}):null,le.isLoading?n.jsx("div",{className:"empty-state compact",children:"Searching the full workspace..."}):null,cc.length?n.jsx("section",{className:"notes-board",children:cc.map(f=>n.jsxs("button",{type:"button",className:`note-tile ${(zl==null?void 0:zl.id)===f.id?"selected":""}`,onClick:()=>{wt(f.id)},children:[n.jsxs("div",{className:"result-card__top",children:[n.jsx("span",{className:`pill ${Vl(f.status)}`,children:f.type}),n.jsx("span",{className:"note-tile-time",children:Zt(f.updatedAt)})]}),n.jsx("strong",{children:f.title??f.id}),n.jsx("p",{children:f.summary||"No summary yet."}),n.jsx("div",{className:"chip-row",children:f.tags.slice(0,3).map(fe=>n.jsx("span",{className:"chip",children:fe},fe))}),n.jsx("div",{className:"meta-row",children:n.jsx("span",{children:f.sourceLabel??"unknown"})})]},f.id))}):n.jsx("div",{className:"empty-state",children:w.trim()?"No node hits matched this workspace query.":p!=null&&p.nodes.length?"No cards match this query.":"There are no saved memory cards in the current workspace yet."}),Kc.length?n.jsxs("section",{className:"card page-card",children:[n.jsxs("div",{className:"page-copy compact-copy",children:[n.jsx("span",{className:"eyebrow",children:"Activity hits"}),n.jsx("h3",{children:"Recent movement that matched this search"})]}),n.jsx("div",{className:"card-stack compact-stack",children:Kc.map(f=>n.jsxs("button",{type:"button",className:"route-card",onClick:()=>{f.targetNodeId&&wt(f.targetNodeId)},children:[n.jsxs("div",{children:[n.jsx("strong",{children:f.targetNodeTitle??f.targetNodeId}),n.jsx("span",{children:Hs(f)}),n.jsxs("div",{className:"meta-row",children:[n.jsx("span",{children:Bs(f)}),n.jsx("span",{children:f.sourceLabel})]})]}),n.jsx("em",{children:Zt(f.createdAt)})]},f.id))})]}):null,ie?n.jsx("div",{className:"note-overlay",onClick:()=>{Je(null),cl(!1),zt(null)},children:n.jsxs("section",{className:"card note-modal",onClick:f=>{f.stopPropagation()},children:[n.jsxs("div",{className:"section-head section-head--compact",children:[n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Selected note"}),n.jsx("h3",{children:Wl?"Edit note":ie.title})]}),n.jsxs("div",{className:"note-modal-actions",children:[n.jsx("span",{className:`pill ${Vl(ie.status)}`,children:ie.type}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>{Je(null),cl(!1),zt(null)},children:"Close"})]})]}),Wl?n.jsxs("div",{className:"capture-form compact-form",children:[n.jsxs("label",{className:"search-box",htmlFor:"note-edit-title-input",children:[n.jsx("span",{children:"Title"}),n.jsx("input",{id:"note-edit-title-input",value:Jn,onChange:f=>Fl(f.target.value),placeholder:"Short durable title"})]}),n.jsxs("label",{className:"search-box notes-capture-body",htmlFor:"note-edit-body-input",children:[n.jsx("span",{children:"Body"}),n.jsx("textarea",{id:"note-edit-body-input",value:In,onChange:f=>$n(f.target.value),placeholder:"Keep the memory concise and attributable.",rows:8})]})]}):n.jsx("div",{className:"note-reading-pane",children:ie.body||ie.summary}),Gt?n.jsx("div",{className:"empty-state compact",children:Gt}):null,Gi&&!Wl?n.jsxs("div",{className:"card-stack compact-stack",children:[n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:"Governance actions"}),n.jsx("p",{children:"Use a direct human decision here when this note should be promoted, contested, or archived."})]}),n.jsxs("label",{className:"search-box",htmlFor:"note-governance-decision-note",children:[n.jsx("span",{children:"Decision note"}),n.jsx("textarea",{id:"note-governance-decision-note",value:Pl,onChange:f=>oa(f.target.value),placeholder:"Optional short rationale for this governance decision.",rows:3})]}),n.jsxs("div",{className:"action-row",children:[Lm(ie)?n.jsx("button",{type:"button",onClick:()=>ie&&void ml("promote",ie),disabled:ct!==null,children:ct==="promote"?"Promoting...":"Promote"}):null,qm(ie)?n.jsx("button",{type:"button",className:"ghost",onClick:()=>ie&&void ml("contest",ie),disabled:ct!==null,children:ct==="contest"?"Marking...":"Mark contested"}):null,wm(ie)?n.jsx("button",{type:"button",className:"ghost",onClick:()=>ie&&void ml("archive",ie),disabled:ct!==null,children:ct==="archive"?"Archiving...":"Archive suggestion"}):null]}),en?n.jsx("div",{className:"empty-state compact",children:en}):null]}):null,Li.length&&!Wl?n.jsxs("div",{className:"card-stack compact-stack",children:[n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:"Review recall"}),n.jsx("p",{children:"Recent manual trust decisions for this note stay visible here so you can reopen the surrounding context quickly."})]}),Li.slice(0,3).map(f=>n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:Bs(f)}),n.jsx("p",{children:Hs(f)}),Hm(f)?n.jsx("div",{className:"meta-row",children:n.jsx("span",{children:Hm(f)})}):null,n.jsxs("div",{className:"meta-row",children:[n.jsx("span",{children:Zt(f.createdAt)}),n.jsx("span",{children:f.sourceLabel})]})]},f.id)),n.jsxs("div",{className:"action-row",children:[n.jsx("button",{type:"button",onClick:()=>Oe("governance"),children:"Open governance"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>Va(ie.id),children:"Inspect in graph"})]})]}):null,n.jsx("div",{className:"chip-row",children:ie.tags.map(f=>n.jsx("span",{className:"chip",children:f},f))}),n.jsx("div",{className:"action-row",children:Wl?n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",onClick:()=>void yo(),disabled:Wn||Jt||ct!==null,children:Wn?"Saving...":"Save changes"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>{cl(!1),Fl(ie.title),$n(ie.body),zt(null)},disabled:Wn||Jt||ct!==null,children:"Cancel"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>void Ut(),disabled:Wn||Jt||ct!==null,children:Jt?"Archiving...":"Archive"})]}):n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",onClick:()=>Va(ie.id),children:"Inspect in graph"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>void vn(),disabled:Ws,children:Ws?"Refreshing...":"Refresh summary"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>{cl(!0),Fl(ie.title),$n(ie.body),zt(null)},disabled:Jt||ct!==null,children:"Edit"}),Gi?null:n.jsx("button",{type:"button",className:"ghost",onClick:()=>void Ut(),disabled:Jt||ct!==null,children:Jt?"Archiving...":"Archive"})]})}),Se.governance.events.length?n.jsx("div",{className:"card-stack compact-stack",children:Se.governance.events.slice(0,3).map(f=>n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:f.eventType}),n.jsx("p",{children:f.reason})]},f.id))}):null,n.jsxs("div",{className:"card-stack compact-stack",children:[Se.bundleItems.slice(0,2).map(f=>n.jsxs("button",{type:"button",className:"mini-card mini-card--interactive",onClick:()=>void oc(f),children:[n.jsx("strong",{children:f.title??f.nodeId}),n.jsx("p",{children:f.reason})]},f.nodeId)),Se.activities.slice(0,2).map(f=>n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:Bs(f)}),n.jsx("p",{children:Hs(f)})]},f.id))]})]})}):null]}):n.jsxs("section",{className:"page-section home-section",children:[n.jsxs("div",{className:"home-shell",children:[n.jsxs("section",{className:"card home-hero-card",children:[n.jsxs("div",{className:"page-copy",children:[n.jsx("span",{className:"eyebrow",children:"Home"}),n.jsx("h2",{children:"Search workspace"}),n.jsx("p",{children:"Find the next useful memory."})]}),n.jsxs("label",{className:"search-box home-search-box",htmlFor:"home-search-input",children:[n.jsx("span",{children:"Workspace-wide search"}),n.jsx("input",{id:"home-search-input",value:Z,onChange:f=>j(f.target.value),placeholder:"projects, decisions, questions, recent activity"})]}),n.jsxs("div",{className:"chip-row",children:[n.jsxs("span",{className:"chip chip-static",children:[Ea.length," active projects"]}),n.jsxs("span",{className:"chip chip-static",children:[dn.length," recent nodes"]}),n.jsxs("span",{className:"chip chip-static",children:[mt.length," review signals"]}),n.jsx("span",{className:"chip chip-static",children:ne?`focus ${ne.title}`:"no active project"}),w.trim()?n.jsxs("span",{className:"chip chip-static",children:[Hc," filtered hits"]}):null]}),n.jsxs("div",{className:"hero-actions",children:[n.jsx("button",{type:"button",className:"hero-button hero-button--primary",onClick:()=>Oe("recent"),children:"Open Memory"}),n.jsx("button",{type:"button",className:"hero-button hero-button--secondary",onClick:()=>Le(!0),children:"Command"}),n.jsx("button",{type:"button",className:"hero-button hero-button--secondary",onClick:()=>Oe("graph"),children:"Graph"}),n.jsx("button",{type:"button",className:"hero-button hero-button--secondary",onClick:()=>Oe("governance"),children:"Review"}),n.jsx("button",{type:"button",className:"hero-button hero-button--secondary",onClick:()=>Oe("settings"),children:"Workspace"})]})]}),n.jsxs("aside",{className:"card home-summary-card",children:[n.jsxs("div",{className:"page-copy",children:[n.jsx("span",{className:"eyebrow",children:"Workspace"}),n.jsx("h3",{children:rl}),n.jsx("p",{children:ne?`${ne.title} is active.`:"Set one active project."})]}),n.jsxs("div",{className:"info-grid two",children:[n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Projects"}),n.jsx("strong",{children:_e.length}),n.jsx("p",{children:"Visible now."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Recent nodes"}),n.jsx("strong",{children:(p==null?void 0:p.recentNodeIds.length)??0}),n.jsx("p",{children:"Ready to reopen."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"Review"}),n.jsx("strong",{children:mt.length||"clear"}),n.jsx("p",{children:"Open signals."})]}),n.jsxs("article",{className:"info-block",children:[n.jsx("span",{className:"info-label",children:"API"}),n.jsx("strong",{children:(s==null?void 0:s.apiBind)??"127.0.0.1:8787"}),n.jsx("p",{children:"Local access."})]})]})]})]}),le.error?n.jsx("div",{className:"empty-state compact",children:le.error}):null,le.isLoading?n.jsx("div",{className:"empty-state compact",children:"Searching the full workspace..."}):null,ti("home"),w.trim()?n.jsxs("section",{className:"home-results-grid",children:[n.jsxs("section",{className:"card page-card",children:[n.jsxs("div",{className:"section-head section-head--compact",children:[n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Search results"}),n.jsx("h3",{children:"Matching memory"})]}),n.jsx("span",{className:"pill tone-info",children:ol.length})]}),n.jsxs("div",{className:"card-stack",children:[ol.map(f=>n.jsxs("button",{type:"button",className:"route-card",onClick:()=>wt(f.id),children:[n.jsxs("div",{children:[n.jsx("strong",{children:f.title??f.id}),n.jsx("span",{children:f.summary??"No summary yet."}),n.jsxs("div",{className:"meta-row",children:[n.jsx("span",{children:f.type}),n.jsx("span",{children:f.sourceLabel??"unknown"}),n.jsx("span",{children:Zt(f.updatedAt)})]})]}),n.jsx("em",{children:"Open"})]},f.id)),ol.length?null:n.jsx("div",{className:"empty-state compact",children:"No node hits matched this search yet."})]})]}),n.jsxs("section",{className:"card page-card",children:[n.jsxs("div",{className:"section-head section-head--compact",children:[n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Activity hits"}),n.jsx("h3",{children:"Matching activity"})]}),n.jsx("span",{className:"pill tone-muted",children:wi.length})]}),n.jsxs("div",{className:"card-stack",children:[wi.map(f=>n.jsxs("button",{type:"button",className:"route-card",onClick:()=>{f.targetNodeId&&wt(f.targetNodeId)},children:[n.jsxs("div",{children:[n.jsx("strong",{children:f.targetNodeTitle??f.targetNodeId}),n.jsx("span",{children:Hs(f)}),n.jsxs("div",{className:"meta-row",children:[n.jsx("span",{children:Bs(f)}),n.jsx("span",{children:f.sourceLabel}),n.jsx("span",{children:Zt(f.createdAt)})]})]}),n.jsx("em",{children:"Jump"})]},f.id)),wi.length?null:n.jsx("div",{className:"empty-state compact",children:"No activity hits matched this workspace query."})]})]})]}):n.jsxs("section",{className:"home-results-grid",children:[n.jsxs("section",{className:"card page-card home-digest-card",children:[n.jsxs("div",{className:"section-head section-head--compact",children:[n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Active project"}),n.jsx("h3",{children:(ne==null?void 0:ne.title)??"Choose a project anchor"})]}),n.jsx("span",{className:`pill ${ne?Vl(ne.status):"tone-muted"}`,children:Ac?"Saving...":ne?ne.canonicality:"unset"})]}),ne?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"home-digest-copy",children:ne.summary||"Active for Home, capture, and graph."}),n.jsxs("div",{className:"chip-row",children:[n.jsxs("span",{className:"chip chip-static",children:[Al.relatedCount," related nodes"]}),n.jsxs("span",{className:"chip chip-static",children:[Al.activities.length," recent activities"]}),n.jsxs("span",{className:"chip chip-static",children:[Al.bundleItems.length," nearby context items"]})]}),n.jsxs("div",{className:"action-row",children:[n.jsx("button",{type:"button",onClick:()=>Va(ne.id),children:"Open project map"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>Et(ne.id),children:"Memory"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>void Za(null),disabled:Ac,children:"Clear active project"})]}),Jl?n.jsx("div",{className:"empty-state compact",children:"Loading project digest..."}):null,Yn?n.jsx("div",{className:"empty-state compact",children:Yn}):null,n.jsxs("div",{className:"card-stack compact-stack",children:[Al.bundleItems.map(f=>n.jsxs("button",{type:"button",className:"mini-card mini-card--interactive",onClick:()=>void Ii(f),children:[n.jsx("strong",{children:f.title??f.nodeId}),n.jsx("p",{children:f.reason})]},f.nodeId)),Al.activities.map(f=>n.jsxs("article",{className:"mini-card",children:[n.jsx("strong",{children:f.activityType}),n.jsx("p",{children:f.body||"Recent project activity"})]},f.id)),!Al.bundleItems.length&&!Al.activities.length&&!Jl?n.jsx("div",{className:"empty-state compact",children:"No nearby project context yet."}):null]})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"home-digest-copy",children:"Pick one project to keep Home and graph aligned."}),n.jsxs("div",{className:"action-row",children:[n.jsx("button",{type:"button",onClick:()=>{hn&&Za(hn.id)},disabled:!hn||Ac,children:hn?`Set ${hn.title}`:"Add a project first"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>Oe("recent"),children:"Open memory"})]}),Yn?n.jsx("div",{className:"empty-state compact",children:Yn}):null]})]}),n.jsxs("section",{className:"card page-card",children:[n.jsx("div",{className:"section-head section-head--compact",children:n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Active projects"}),n.jsx("h3",{children:"Project memory"})]})}),n.jsxs("div",{className:"home-project-grid",children:[Ea.map(f=>n.jsxs("article",{className:`note-tile home-project-card ${(ne==null?void 0:ne.id)===f.id?"selected":""}`,children:[n.jsxs("div",{className:"result-card__top",children:[n.jsx("span",{className:`pill ${Vl(f.status)}`,children:f.type}),n.jsx("span",{className:"note-tile-time",children:Zt(f.updatedAt)})]}),n.jsx("strong",{children:f.title}),n.jsx("p",{children:f.summary||"No summary yet."}),n.jsxs("div",{className:"chip-row",children:[n.jsx("span",{className:"chip chip-static",children:f.canonicality}),n.jsx("span",{className:"chip chip-static",children:f.sourceLabel})]}),n.jsxs("div",{className:"home-project-card-actions",children:[n.jsx("button",{type:"button",onClick:()=>Va(f.id),children:"Open"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>void Za(f.id),disabled:Ac,children:(ne==null?void 0:ne.id)===f.id?"Active":"Make active"})]})]},f.id)),Ea.length?null:n.jsx("div",{className:"empty-state",children:"No project nodes are available yet."})]})]}),n.jsxs("section",{className:"card page-card home-governance-card",children:[n.jsxs("div",{className:"section-head section-head--compact",children:[n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Review"}),n.jsx("h3",{children:"Recent review signals"})]}),n.jsx("span",{className:"pill tone-muted",children:Ps.length})]}),n.jsxs("div",{className:"chip-row",children:[n.jsx("span",{className:"chip chip-static",children:Ha==="all"?"all entities":`${Ha} only`}),n.jsx("span",{className:"chip chip-static",children:sa==="all"?"all actions":`${Kl(sa)} decisions`}),n.jsxs("span",{className:"chip chip-static",children:[ia.length," recent decisions"]})]}),n.jsxs("div",{className:"action-row",children:[n.jsx("button",{type:"button",onClick:()=>Oe("governance"),children:"Open review"}),Ha!=="all"||sa!=="all"?n.jsx("button",{type:"button",className:"ghost",onClick:()=>{Nc("all"),qn("all")},children:"Clear feed filters"}):null]}),n.jsxs("div",{className:"card-stack compact-stack",children:[Fa?n.jsx("div",{className:"empty-state compact",children:"Loading recent governance decisions..."}):null,Fa?null:Ps.map(f=>n.jsxs("article",{className:"mini-card governance-feed-card",children:[n.jsxs("div",{className:"result-card__top",children:[n.jsxs("div",{children:[n.jsx("strong",{children:f.title??cd(`${f.entityType}:${f.entityId}`)}),n.jsx("p",{children:f.reason})]}),n.jsx("span",{className:`pill ${Vl(f.nextState)}`,children:Kl(f.action)})]}),n.jsx("div",{className:"meta-row",children:n.jsx("span",{children:Gm(f)})}),n.jsxs("div",{className:"meta-row",children:[n.jsx("span",{children:Zt(f.createdAt)}),n.jsx("span",{children:f.entityType}),f.relationType?n.jsx("span",{children:xc(f.relationType)}):null]}),n.jsxs("div",{className:"action-row governance-feed-card__actions",children:[n.jsx("button",{type:"button",onClick:()=>pn(f),children:"Open"}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>Dt(f),children:"Graph"}),id(mt,f)?n.jsx("button",{type:"button",className:"ghost",onClick:()=>rc(f),children:"Issue"}):null]})]},f.id)),!Fa&&!ia.length?n.jsx("div",{className:"empty-state compact",children:"No recent manual governance decisions are available for Home yet."}):null]})]}),n.jsxs("section",{className:"card page-card",children:[n.jsx("div",{className:"section-head section-head--compact",children:n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Recent movement"}),n.jsx("h3",{children:"Return to the latest durable changes"})]})}),n.jsxs("div",{className:"card-stack",children:[dn.map(f=>n.jsxs("button",{type:"button",className:"route-card",onClick:()=>Et(f.id),children:[n.jsxs("div",{children:[n.jsx("strong",{children:f.title}),n.jsx("span",{children:f.summary||"No summary yet."}),n.jsxs("div",{className:"meta-row",children:[n.jsx("span",{children:f.type}),n.jsx("span",{children:f.sourceLabel}),n.jsx("span",{children:Zt(f.updatedAt)})]})]}),n.jsx("em",{children:"Open"})]},f.id)),dn.length?null:n.jsx("div",{className:"empty-state compact",children:"No recent nodes are available yet."})]})]})]})]})})();return n.jsx("div",{className:"app-shell",children:n.jsxs("main",{className:"workspace",children:[n.jsxs("div",{className:"workspace-shell",children:[n.jsxs("aside",{className:"sidebar",children:[n.jsx("div",{className:"sidebar-brand",children:n.jsxs("div",{className:"brand",children:[n.jsx("span",{className:"brand-mark"}),n.jsxs("div",{children:[n.jsx("strong",{children:rl}),n.jsx("p",{children:"RecallX"})]})]})}),n.jsx("nav",{className:"nav-list nav-list--sidebar","aria-label":"Main navigation",children:rg.map(h=>n.jsxs("button",{type:"button",className:`nav-item ${A===h.id?"active":""}`,onClick:()=>Oe(h.id),children:[n.jsx("span",{children:h.label}),n.jsx("small",{children:h.hint})]},h.id))}),n.jsx("div",{className:"sidebar-divider"}),n.jsx("div",{className:"utility-nav utility-nav--sidebar","aria-label":"Utility navigation",children:dg.map(h=>n.jsx("button",{type:"button",className:`utility-nav-item ${h.id==="project-map"?A==="graph"&&it==="project-map"?"active":"":A===h.id?"active":""}`,onClick:()=>{if(h.id==="project-map"){un("project-map"),Oe("graph");return}h.id==="graph"&&un("neighborhood"),Oe(h.id)},children:h.label},h.id))}),n.jsxs("div",{className:"sidebar-meta",children:[n.jsx("span",{className:"sidebar-meta-label",children:"Active project"}),n.jsx("strong",{children:(ne==null?void 0:ne.title)??"None"}),n.jsx("p",{children:(s==null?void 0:s.apiBind)??"127.0.0.1:8787"})]}),n.jsxs("div",{className:"sidebar-actions",children:[n.jsx("button",{type:"button",className:"sidebar-action sidebar-action--primary",onClick:()=>Le(!0),children:"Command"}),n.jsx("button",{type:"button",className:"sidebar-action",onClick:()=>Oe("search"),children:"API guide"})]})]}),n.jsxs("section",{className:"workspace-main",children:[n.jsxs("header",{className:"topbar",children:[n.jsxs("div",{className:"topbar-heading",children:[n.jsx("span",{className:"eyebrow",children:"Current view"}),n.jsx("h1",{children:bg(A)})]}),n.jsxs("div",{className:"topbar-meta",children:[n.jsx("span",{children:(s==null?void 0:s.integrationModes.join(" / "))||"local / append-only"}),n.jsx("span",{children:(s==null?void 0:s.apiBind)??"127.0.0.1:8787"})]})]}),he&&p?n.jsx("div",{className:"banner",children:he}):null,n.jsx("div",{className:"workspace-body",children:ts})]})]}),te?n.jsx("div",{className:"command-palette-overlay",onClick:()=>{Le(!1)},children:n.jsxs("section",{className:"card command-palette-modal",onClick:h=>{h.stopPropagation()},children:[n.jsxs("div",{className:"section-head section-head--compact",children:[n.jsxs("div",{children:[n.jsx("span",{className:"eyebrow",children:"Command palette"}),n.jsx("h3",{children:"Jump quickly without changing the product shape"})]}),n.jsx("button",{type:"button",className:"ghost",onClick:()=>Le(!1),children:"Close"})]}),n.jsxs("label",{className:"search-box",htmlFor:"command-palette-input",children:[n.jsx("span",{children:"Query"}),n.jsx("input",{id:"command-palette-input",ref:il,value:ca,onChange:h=>jt(h.target.value),placeholder:"routes, recent searches, recent nodes"})]}),n.jsx("div",{className:"command-palette-tabs",children:[["routes","Routes"],["searches","Recent searches"],["nodes","Recent nodes"]].map(([h,v])=>n.jsx("button",{type:"button",className:`chip-button ${vt===h?"active":""}`,onClick:()=>Nl(h),children:v},h))}),n.jsxs("div",{className:"command-palette-results",children:[vt==="routes"?n.jsxs(n.Fragment,{children:[se.length?n.jsxs("div",{className:"command-palette-group",children:[n.jsx("span",{className:"search-filter-label",children:"Recent commands"}),n.jsx("div",{className:"card-stack compact-stack",children:se.map(h=>n.jsxs("button",{type:"button",className:"route-card command-palette-result",onClick:()=>Pi(h),children:[n.jsxs("div",{children:[n.jsx("strong",{children:h.label}),n.jsx("span",{children:h.hint})]}),n.jsx("em",{children:"Recent"})]},`recent-${h.label}`))})]}):null,Re.map(h=>n.jsxs("button",{type:"button",className:"route-card command-palette-result",onClick:()=>Pi(h),children:[n.jsxs("div",{children:[n.jsx("strong",{children:h.label}),n.jsx("span",{children:h.hint})]}),n.jsx("em",{children:"Run"})]},h.label))]}):null,vt==="searches"?Ka.map(h=>n.jsxs("button",{type:"button",className:"route-card command-palette-result",onClick:()=>Ra(h),children:[n.jsxs("div",{children:[n.jsx("strong",{children:h}),n.jsx("span",{children:"Reuse a recent workspace query"})]}),n.jsx("em",{children:"Search"})]},h)):null,vt==="nodes"?Yt.map(h=>n.jsxs("button",{type:"button",className:"route-card command-palette-result",onClick:()=>es(h.id),children:[n.jsxs("div",{children:[n.jsx("strong",{children:h.title}),n.jsx("span",{children:h.summary||h.type})]}),n.jsx("em",{children:h.type})]},h.id)):null,vt==="routes"&&!Re.length?n.jsx("div",{className:"empty-state compact",children:"No route commands matched this palette query."}):null,vt==="searches"&&!Ka.length?n.jsx("div",{className:"empty-state compact",children:"No recent searches are stored yet."}):null,vt==="nodes"&&!Yt.length?n.jsx("div",{className:"empty-state compact",children:"No recent nodes matched this palette query."}):null]}),n.jsxs("div",{className:"chip-row",children:[n.jsx("span",{className:"chip chip-static",children:"Cmd/Ctrl+K"}),n.jsxs("span",{className:"chip chip-static",children:[Ht.length," recent commands"]}),n.jsxs("span",{className:"chip chip-static",children:[ka.length," recent searches"]})]})]})}):null]})})}const sd=document.getElementById("root");function Ai(s,d){for(const[o,r]of Object.entries(d))s.style.setProperty(o,r)}function fd(s,d){if(!sd)return;const o=document.createElement("main");Ai(o,{"min-height":"100vh",display:"grid","place-items":"center",background:"#0f172a",color:"#e2e8f0",padding:"24px","font-family":"-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif"});const r=document.createElement("section");Ai(r,{width:"min(780px,100%)",border:"1px solid rgba(148,163,184,0.28)","border-radius":"24px",background:"rgba(15,23,42,0.96)",padding:"24px 28px","box-shadow":"0 18px 60px rgba(15,23,42,0.45)"});const p=document.createElement("p");Ai(p,{margin:"0 0 8px","font-size":"12px","letter-spacing":"0.08em","text-transform":"uppercase",color:"#93c5fd"}),p.textContent="RecallX renderer error";const k=document.createElement("h1");Ai(k,{margin:"0 0 12px","font-size":"28px","line-height":"1.2"}),k.textContent=s;const A=document.createElement("p");Ai(A,{margin:"0 0 16px",color:"#cbd5e1"}),A.textContent="The app shell opened, but the renderer failed before the landing page could mount.";const H=document.createElement("pre");Ai(H,{margin:"0",overflow:"auto","border-radius":"16px",background:"#020617",padding:"16px",color:"#f8fafc","white-space":"pre-wrap","word-break":"break-word",font:"12px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace"}),H.textContent=d,r.append(p,k,A,H),o.append(r),sd.replaceChildren(o)}window.addEventListener("error",s=>{const d=s.error instanceof Error?s.error.stack??s.error.message:s.message;fd("Failed to start the RecallX UI.",d||"Unknown renderer error.")});window.addEventListener("unhandledrejection",s=>{const d=s.reason,o=d instanceof Error?d.stack??d.message:typeof d=="string"?d:JSON.stringify(d,null,2);fd("RecallX hit an unhandled promise rejection.",o||"Unknown rejection.")});try{My.createRoot(sd).render(n.jsx(Ay.StrictMode,{children:n.jsx(jg,{})}))}catch(s){const d=s instanceof Error?s.stack??s.message:String(s);fd("RecallX could not mount the root React tree.",d)}export{Vm as g,n as j,Sg as p,T as r};
|