@hbarefoot/engram 1.2.0 β 1.3.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/bin/engram.js +4 -1
- package/dashboard/dist/assets/{index-D0xT6oKC.css β index-CIMIyJGP.css} +1 -1
- package/dashboard/dist/assets/index-CK-bEXRL.js +45 -0
- package/dashboard/dist/index.html +2 -2
- package/package.json +1 -1
- package/src/import/parsers/claude.js +69 -17
- package/src/import/parsers/cursorrules.js +55 -16
- package/src/import/parsers/env.js +52 -11
- package/src/import/parsers/git.js +54 -11
- package/src/import/parsers/obsidian.js +17 -2
- package/src/import/parsers/package.js +55 -8
- package/src/import/parsers/shell.js +60 -30
- package/src/import/parsers/ssh.js +57 -10
- package/src/import/wizard.js +14 -5
- package/src/server/rest.js +39 -5
- package/dashboard/dist/assets/index-D3bysGhj.js +0 -45
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
(function(){const k=document.createElement("link").relList;if(k&&k.supports&&k.supports("modulepreload"))return;for(const A of document.querySelectorAll('link[rel="modulepreload"]'))U(A);new MutationObserver(A=>{for(const R of A)if(R.type==="childList")for(const X of R.addedNodes)X.tagName==="LINK"&&X.rel==="modulepreload"&&U(X)}).observe(document,{childList:!0,subtree:!0});function f(A){const R={};return A.integrity&&(R.integrity=A.integrity),A.referrerPolicy&&(R.referrerPolicy=A.referrerPolicy),A.crossOrigin==="use-credentials"?R.credentials="include":A.crossOrigin==="anonymous"?R.credentials="omit":R.credentials="same-origin",R}function U(A){if(A.ep)return;A.ep=!0;const R=f(A);fetch(A.href,R)}})();function Fu(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var _i={exports:{}},jn={},bi={exports:{}},ee={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its 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 bu;function Dd(){if(bu)return ee;bu=1;var m=Symbol.for("react.element"),k=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),X=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),O=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),G=Symbol.iterator;function b(c){return c===null||typeof c!="object"?null:(c=G&&c[G]||c["@@iterator"],typeof c=="function"?c:null)}var q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ie=Object.assign,P={};function I(c,v,K){this.props=c,this.context=v,this.refs=P,this.updater=K||q}I.prototype.isReactComponent={},I.prototype.setState=function(c,v){if(typeof c!="object"&&typeof c!="function"&&c!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,c,v,"setState")},I.prototype.forceUpdate=function(c){this.updater.enqueueForceUpdate(this,c,"forceUpdate")};function Z(){}Z.prototype=I.prototype;function M(c,v,K){this.props=c,this.context=v,this.refs=P,this.updater=K||q}var C=M.prototype=new Z;C.constructor=M,ie(C,I.prototype),C.isPureReactComponent=!0;var B=Array.isArray,J=Object.prototype.hasOwnProperty,ae={current:null},Le={key:!0,ref:!0,__self:!0,__source:!0};function Be(c,v,K){var te,ne={},le=null,ce=null;if(v!=null)for(te in v.ref!==void 0&&(ce=v.ref),v.key!==void 0&&(le=""+v.key),v)J.call(v,te)&&!Le.hasOwnProperty(te)&&(ne[te]=v[te]);var oe=arguments.length-2;if(oe===1)ne.children=K;else if(1<oe){for(var he=Array(oe),Xe=0;Xe<oe;Xe++)he[Xe]=arguments[Xe+2];ne.children=he}if(c&&c.defaultProps)for(te in oe=c.defaultProps,oe)ne[te]===void 0&&(ne[te]=oe[te]);return{$$typeof:m,type:c,key:le,ref:ce,props:ne,_owner:ae.current}}function xt(c,v){return{$$typeof:m,type:c.type,key:v,ref:c.ref,props:c.props,_owner:c._owner}}function ut(c){return typeof c=="object"&&c!==null&&c.$$typeof===m}function Nt(c){var v={"=":"=0",":":"=2"};return"$"+c.replace(/[=:]/g,function(K){return v[K]})}var Ie=/\/+/g;function Fe(c,v){return typeof c=="object"&&c!==null&&c.key!=null?Nt(""+c.key):v.toString(36)}function Ye(c,v,K,te,ne){var le=typeof c;(le==="undefined"||le==="boolean")&&(c=null);var ce=!1;if(c===null)ce=!0;else switch(le){case"string":case"number":ce=!0;break;case"object":switch(c.$$typeof){case m:case k:ce=!0}}if(ce)return ce=c,ne=ne(ce),c=te===""?"."+Fe(ce,0):te,B(ne)?(K="",c!=null&&(K=c.replace(Ie,"$&/")+"/"),Ye(ne,v,K,"",function(Xe){return Xe})):ne!=null&&(ut(ne)&&(ne=xt(ne,K+(!ne.key||ce&&ce.key===ne.key?"":(""+ne.key).replace(Ie,"$&/")+"/")+c)),v.push(ne)),1;if(ce=0,te=te===""?".":te+":",B(c))for(var oe=0;oe<c.length;oe++){le=c[oe];var he=te+Fe(le,oe);ce+=Ye(le,v,K,he,ne)}else if(he=b(c),typeof he=="function")for(c=he.call(c),oe=0;!(le=c.next()).done;)le=le.value,he=te+Fe(le,oe++),ce+=Ye(le,v,K,he,ne);else if(le==="object")throw v=String(c),Error("Objects are not valid as a React child (found: "+(v==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":v)+"). If you meant to render a collection of children, use an array instead.");return ce}function tt(c,v,K){if(c==null)return c;var te=[],ne=0;return Ye(c,te,"","",function(le){return v.call(K,le,ne++)}),te}function Me(c){if(c._status===-1){var v=c._result;v=v(),v.then(function(K){(c._status===0||c._status===-1)&&(c._status=1,c._result=K)},function(K){(c._status===0||c._status===-1)&&(c._status=2,c._result=K)}),c._status===-1&&(c._status=0,c._result=v)}if(c._status===1)return c._result.default;throw c._result}var fe={current:null},_={transition:null},x={ReactCurrentDispatcher:fe,ReactCurrentBatchConfig:_,ReactCurrentOwner:ae};function y(){throw Error("act(...) is not supported in production builds of React.")}return ee.Children={map:tt,forEach:function(c,v,K){tt(c,function(){v.apply(this,arguments)},K)},count:function(c){var v=0;return tt(c,function(){v++}),v},toArray:function(c){return tt(c,function(v){return v})||[]},only:function(c){if(!ut(c))throw Error("React.Children.only expected to receive a single React element child.");return c}},ee.Component=I,ee.Fragment=f,ee.Profiler=A,ee.PureComponent=M,ee.StrictMode=U,ee.Suspense=E,ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=x,ee.act=y,ee.cloneElement=function(c,v,K){if(c==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+c+".");var te=ie({},c.props),ne=c.key,le=c.ref,ce=c._owner;if(v!=null){if(v.ref!==void 0&&(le=v.ref,ce=ae.current),v.key!==void 0&&(ne=""+v.key),c.type&&c.type.defaultProps)var oe=c.type.defaultProps;for(he in v)J.call(v,he)&&!Le.hasOwnProperty(he)&&(te[he]=v[he]===void 0&&oe!==void 0?oe[he]:v[he])}var he=arguments.length-2;if(he===1)te.children=K;else if(1<he){oe=Array(he);for(var Xe=0;Xe<he;Xe++)oe[Xe]=arguments[Xe+2];te.children=oe}return{$$typeof:m,type:c.type,key:ne,ref:le,props:te,_owner:ce}},ee.createContext=function(c){return c={$$typeof:X,_currentValue:c,_currentValue2:c,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},c.Provider={$$typeof:R,_context:c},c.Consumer=c},ee.createElement=Be,ee.createFactory=function(c){var v=Be.bind(null,c);return v.type=c,v},ee.createRef=function(){return{current:null}},ee.forwardRef=function(c){return{$$typeof:Q,render:c}},ee.isValidElement=ut,ee.lazy=function(c){return{$$typeof:H,_payload:{_status:-1,_result:c},_init:Me}},ee.memo=function(c,v){return{$$typeof:O,type:c,compare:v===void 0?null:v}},ee.startTransition=function(c){var v=_.transition;_.transition={};try{c()}finally{_.transition=v}},ee.unstable_act=y,ee.useCallback=function(c,v){return fe.current.useCallback(c,v)},ee.useContext=function(c){return fe.current.useContext(c)},ee.useDebugValue=function(){},ee.useDeferredValue=function(c){return fe.current.useDeferredValue(c)},ee.useEffect=function(c,v){return fe.current.useEffect(c,v)},ee.useId=function(){return fe.current.useId()},ee.useImperativeHandle=function(c,v,K){return fe.current.useImperativeHandle(c,v,K)},ee.useInsertionEffect=function(c,v){return fe.current.useInsertionEffect(c,v)},ee.useLayoutEffect=function(c,v){return fe.current.useLayoutEffect(c,v)},ee.useMemo=function(c,v){return fe.current.useMemo(c,v)},ee.useReducer=function(c,v,K){return fe.current.useReducer(c,v,K)},ee.useRef=function(c){return fe.current.useRef(c)},ee.useState=function(c){return fe.current.useState(c)},ee.useSyncExternalStore=function(c,v,K){return fe.current.useSyncExternalStore(c,v,K)},ee.useTransition=function(){return fe.current.useTransition()},ee.version="18.3.1",ee}var Pu;function zi(){return Pu||(Pu=1,bi.exports=Dd()),bi.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its 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 Lu;function Od(){if(Lu)return jn;Lu=1;var m=zi(),k=Symbol.for("react.element"),f=Symbol.for("react.fragment"),U=Object.prototype.hasOwnProperty,A=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,R={key:!0,ref:!0,__self:!0,__source:!0};function X(Q,E,O){var H,G={},b=null,q=null;O!==void 0&&(b=""+O),E.key!==void 0&&(b=""+E.key),E.ref!==void 0&&(q=E.ref);for(H in E)U.call(E,H)&&!R.hasOwnProperty(H)&&(G[H]=E[H]);if(Q&&Q.defaultProps)for(H in E=Q.defaultProps,E)G[H]===void 0&&(G[H]=E[H]);return{$$typeof:k,type:Q,key:b,ref:q,props:G,_owner:A.current}}return jn.Fragment=f,jn.jsx=X,jn.jsxs=X,jn}var Mu;function Id(){return Mu||(Mu=1,_i.exports=Od()),_i.exports}var s=Id(),V=zi();const Fd=Fu(V);var Tl={},Pi={exports:{}},Ke={},Li={exports:{}},Mi={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its 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 zu;function Ad(){return zu||(zu=1,(function(m){function k(_,x){var y=_.length;_.push(x);e:for(;0<y;){var c=y-1>>>1,v=_[c];if(0<A(v,x))_[c]=x,_[y]=v,y=c;else break e}}function f(_){return _.length===0?null:_[0]}function U(_){if(_.length===0)return null;var x=_[0],y=_.pop();if(y!==x){_[0]=y;e:for(var c=0,v=_.length,K=v>>>1;c<K;){var te=2*(c+1)-1,ne=_[te],le=te+1,ce=_[le];if(0>A(ne,y))le<v&&0>A(ce,ne)?(_[c]=ce,_[le]=y,c=le):(_[c]=ne,_[te]=y,c=te);else if(le<v&&0>A(ce,y))_[c]=ce,_[le]=y,c=le;else break e}}return x}function A(_,x){var y=_.sortIndex-x.sortIndex;return y!==0?y:_.id-x.id}if(typeof performance=="object"&&typeof performance.now=="function"){var R=performance;m.unstable_now=function(){return R.now()}}else{var X=Date,Q=X.now();m.unstable_now=function(){return X.now()-Q}}var E=[],O=[],H=1,G=null,b=3,q=!1,ie=!1,P=!1,I=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(_){for(var x=f(O);x!==null;){if(x.callback===null)U(O);else if(x.startTime<=_)U(O),x.sortIndex=x.expirationTime,k(E,x);else break;x=f(O)}}function B(_){if(P=!1,C(_),!ie)if(f(E)!==null)ie=!0,Me(J);else{var x=f(O);x!==null&&fe(B,x.startTime-_)}}function J(_,x){ie=!1,P&&(P=!1,Z(Be),Be=-1),q=!0;var y=b;try{for(C(x),G=f(E);G!==null&&(!(G.expirationTime>x)||_&&!Nt());){var c=G.callback;if(typeof c=="function"){G.callback=null,b=G.priorityLevel;var v=c(G.expirationTime<=x);x=m.unstable_now(),typeof v=="function"?G.callback=v:G===f(E)&&U(E),C(x)}else U(E);G=f(E)}if(G!==null)var K=!0;else{var te=f(O);te!==null&&fe(B,te.startTime-x),K=!1}return K}finally{G=null,b=y,q=!1}}var ae=!1,Le=null,Be=-1,xt=5,ut=-1;function Nt(){return!(m.unstable_now()-ut<xt)}function Ie(){if(Le!==null){var _=m.unstable_now();ut=_;var x=!0;try{x=Le(!0,_)}finally{x?Fe():(ae=!1,Le=null)}}else ae=!1}var Fe;if(typeof M=="function")Fe=function(){M(Ie)};else if(typeof MessageChannel<"u"){var Ye=new MessageChannel,tt=Ye.port2;Ye.port1.onmessage=Ie,Fe=function(){tt.postMessage(null)}}else Fe=function(){I(Ie,0)};function Me(_){Le=_,ae||(ae=!0,Fe())}function fe(_,x){Be=I(function(){_(m.unstable_now())},x)}m.unstable_IdlePriority=5,m.unstable_ImmediatePriority=1,m.unstable_LowPriority=4,m.unstable_NormalPriority=3,m.unstable_Profiling=null,m.unstable_UserBlockingPriority=2,m.unstable_cancelCallback=function(_){_.callback=null},m.unstable_continueExecution=function(){ie||q||(ie=!0,Me(J))},m.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xt=0<_?Math.floor(1e3/_):5},m.unstable_getCurrentPriorityLevel=function(){return b},m.unstable_getFirstCallbackNode=function(){return f(E)},m.unstable_next=function(_){switch(b){case 1:case 2:case 3:var x=3;break;default:x=b}var y=b;b=x;try{return _()}finally{b=y}},m.unstable_pauseExecution=function(){},m.unstable_requestPaint=function(){},m.unstable_runWithPriority=function(_,x){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var y=b;b=_;try{return x()}finally{b=y}},m.unstable_scheduleCallback=function(_,x,y){var c=m.unstable_now();switch(typeof y=="object"&&y!==null?(y=y.delay,y=typeof y=="number"&&0<y?c+y:c):y=c,_){case 1:var v=-1;break;case 2:v=250;break;case 5:v=1073741823;break;case 4:v=1e4;break;default:v=5e3}return v=y+v,_={id:H++,callback:x,priorityLevel:_,startTime:y,expirationTime:v,sortIndex:-1},y>c?(_.sortIndex=y,k(O,_),f(E)===null&&_===f(O)&&(P?(Z(Be),Be=-1):P=!0,fe(B,y-c))):(_.sortIndex=v,k(E,_),ie||q||(ie=!0,Me(J))),_},m.unstable_shouldYield=Nt,m.unstable_wrapCallback=function(_){var x=b;return function(){var y=b;b=x;try{return _.apply(this,arguments)}finally{b=y}}}})(Mi)),Mi}var Tu;function Ud(){return Tu||(Tu=1,Li.exports=Ad()),Li.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its 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 Ru;function Bd(){if(Ru)return Ke;Ru=1;var m=zi(),k=Ud();function f(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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."}var U=new Set,A={};function R(e,t){X(e,t),X(e+"Capture",t)}function X(e,t){for(A[e]=t,e=0;e<t.length;e++)U.add(t[e])}var Q=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),E=Object.prototype.hasOwnProperty,O=/^[: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]*$/,H={},G={};function b(e){return E.call(G,e)?!0:E.call(H,e)?!1:O.test(e)?G[e]=!0:(H[e]=!0,!1)}function q(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ie(e,t,r,n){if(t===null||typeof t>"u"||q(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function P(e,t,r,n,l,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=l,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){I[e]=new P(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];I[t]=new P(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){I[e]=new P(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){I[e]=new P(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){I[e]=new P(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){I[e]=new P(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){I[e]=new P(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){I[e]=new P(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){I[e]=new P(e,5,!1,e.toLowerCase(),null,!1,!1)});var Z=/[\-:]([a-z])/g;function M(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Z,M);I[t]=new P(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Z,M);I[t]=new P(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Z,M);I[t]=new P(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){I[e]=new P(e,1,!1,e.toLowerCase(),null,!1,!1)}),I.xlinkHref=new P("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){I[e]=new P(e,1,!1,e.toLowerCase(),null,!0,!0)});function C(e,t,r,n){var l=I.hasOwnProperty(t)?I[t]:null;(l!==null?l.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ie(t,r,l,n)&&(r=null),n||l===null?b(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):l.mustUseProperty?e[l.propertyName]=r===null?l.type===3?!1:"":r:(t=l.attributeName,n=l.attributeNamespace,r===null?e.removeAttribute(t):(l=l.type,r=l===3||l===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var B=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,J=Symbol.for("react.element"),ae=Symbol.for("react.portal"),Le=Symbol.for("react.fragment"),Be=Symbol.for("react.strict_mode"),xt=Symbol.for("react.profiler"),ut=Symbol.for("react.provider"),Nt=Symbol.for("react.context"),Ie=Symbol.for("react.forward_ref"),Fe=Symbol.for("react.suspense"),Ye=Symbol.for("react.suspense_list"),tt=Symbol.for("react.memo"),Me=Symbol.for("react.lazy"),fe=Symbol.for("react.offscreen"),_=Symbol.iterator;function x(e){return e===null||typeof e!="object"?null:(e=_&&e[_]||e["@@iterator"],typeof e=="function"?e:null)}var y=Object.assign,c;function v(e){if(c===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);c=t&&t[1]||""}return`
|
|
34
|
+
`+c+e}var K=!1;function te(e,t){if(!e||K)return"";K=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(g){var n=g}Reflect.construct(e,[],t)}else{try{t.call()}catch(g){n=g}e.call(t.prototype)}else{try{throw Error()}catch(g){n=g}e()}}catch(g){if(g&&n&&typeof g.stack=="string"){for(var l=g.stack.split(`
|
|
35
|
+
`),i=n.stack.split(`
|
|
36
|
+
`),a=l.length-1,o=i.length-1;1<=a&&0<=o&&l[a]!==i[o];)o--;for(;1<=a&&0<=o;a--,o--)if(l[a]!==i[o]){if(a!==1||o!==1)do if(a--,o--,0>o||l[a]!==i[o]){var u=`
|
|
37
|
+
`+l[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=o);break}}}finally{K=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?v(e):""}function ne(e){switch(e.tag){case 5:return v(e.type);case 16:return v("Lazy");case 13:return v("Suspense");case 19:return v("SuspenseList");case 0:case 2:case 15:return e=te(e.type,!1),e;case 11:return e=te(e.type.render,!1),e;case 1:return e=te(e.type,!0),e;default:return""}}function le(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Le:return"Fragment";case ae:return"Portal";case xt:return"Profiler";case Be:return"StrictMode";case Fe:return"Suspense";case Ye:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Nt:return(e.displayName||"Context")+".Consumer";case ut:return(e._context.displayName||"Context")+".Provider";case Ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case tt:return t=e.displayName||null,t!==null?t:le(e.type)||"Memo";case Me:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}function ce(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return le(t);case 8:return t===Be?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function oe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function he(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xe(e){var t=he(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var l=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nn(e){e._valueTracker||(e._valueTracker=Xe(e))}function Ti(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=he(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Sn(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}}function Rl(e,t){var r=t.checked;return y({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Ri(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=oe(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Di(e,t){t=t.checked,t!=null&&C(e,"checked",t,!1)}function Dl(e,t){Di(e,t);var r=oe(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ol(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ol(e,t.type,oe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Oi(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Ol(e,t,r){(t!=="number"||Sn(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Or=Array.isArray;function dr(e,t,r,n){if(e=e.options,t){t={};for(var l=0;l<r.length;l++)t["$"+r[l]]=!0;for(r=0;r<e.length;r++)l=t.hasOwnProperty("$"+e[r].value),e[r].selected!==l&&(e[r].selected=l),l&&n&&(e[r].defaultSelected=!0)}else{for(r=""+oe(r),t=null,l=0;l<e.length;l++){if(e[l].value===r){e[l].selected=!0,n&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Il(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(f(91));return y({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ii(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(f(92));if(Or(r)){if(1<r.length)throw Error(f(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:oe(r)}}function Fi(e,t){var r=oe(t.value),n=oe(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function Ai(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ui(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Fl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ui(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Cn,Bi=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,l){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,l)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Cn=Cn||document.createElement("div"),Cn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Cn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ir(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Fr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Au=["Webkit","ms","Moz","O"];Object.keys(Fr).forEach(function(e){Au.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fr[t]=Fr[e]})});function Vi(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Fr.hasOwnProperty(e)&&Fr[e]?(""+t).trim():t+"px"}function Wi(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,l=Vi(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,l):e[r]=l}}var Uu=y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Al(e,t){if(t){if(Uu[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(f(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(f(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(f(61))}if(t.style!=null&&typeof t.style!="object")throw Error(f(62))}}function Ul(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Bl=null;function Vl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wl=null,fr=null,mr=null;function $i(e){if(e=an(e)){if(typeof Wl!="function")throw Error(f(280));var t=e.stateNode;t&&(t=Gn(t),Wl(e.stateNode,e.type,t))}}function Hi(e){fr?mr?mr.push(e):mr=[e]:fr=e}function Qi(){if(fr){var e=fr,t=mr;if(mr=fr=null,$i(e),t)for(e=0;e<t.length;e++)$i(t[e])}}function Ki(e,t){return e(t)}function Gi(){}var $l=!1;function Yi(e,t,r){if($l)return e(t,r);$l=!0;try{return Ki(e,t,r)}finally{$l=!1,(fr!==null||mr!==null)&&(Gi(),Qi())}}function Ar(e,t){var r=e.stateNode;if(r===null)return null;var n=Gn(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(f(231,t,typeof r));return r}var Hl=!1;if(Q)try{var Ur={};Object.defineProperty(Ur,"passive",{get:function(){Hl=!0}}),window.addEventListener("test",Ur,Ur),window.removeEventListener("test",Ur,Ur)}catch{Hl=!1}function Bu(e,t,r,n,l,i,a,o,u){var g=Array.prototype.slice.call(arguments,3);try{t.apply(r,g)}catch(j){this.onError(j)}}var Br=!1,En=null,_n=!1,Ql=null,Vu={onError:function(e){Br=!0,En=e}};function Wu(e,t,r,n,l,i,a,o,u){Br=!1,En=null,Bu.apply(Vu,arguments)}function $u(e,t,r,n,l,i,a,o,u){if(Wu.apply(this,arguments),Br){if(Br){var g=En;Br=!1,En=null}else throw Error(f(198));_n||(_n=!0,Ql=g)}}function Zt(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Xi(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 Ji(e){if(Zt(e)!==e)throw Error(f(188))}function Hu(e){var t=e.alternate;if(!t){if(t=Zt(e),t===null)throw Error(f(188));return t!==e?null:e}for(var r=e,n=t;;){var l=r.return;if(l===null)break;var i=l.alternate;if(i===null){if(n=l.return,n!==null){r=n;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===r)return Ji(l),e;if(i===n)return Ji(l),t;i=i.sibling}throw Error(f(188))}if(r.return!==n.return)r=l,n=i;else{for(var a=!1,o=l.child;o;){if(o===r){a=!0,r=l,n=i;break}if(o===n){a=!0,n=l,r=i;break}o=o.sibling}if(!a){for(o=i.child;o;){if(o===r){a=!0,r=i,n=l;break}if(o===n){a=!0,n=i,r=l;break}o=o.sibling}if(!a)throw Error(f(189))}}if(r.alternate!==n)throw Error(f(190))}if(r.tag!==3)throw Error(f(188));return r.stateNode.current===r?e:t}function Zi(e){return e=Hu(e),e!==null?qi(e):null}function qi(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=qi(e);if(t!==null)return t;e=e.sibling}return null}var ea=k.unstable_scheduleCallback,ta=k.unstable_cancelCallback,Qu=k.unstable_shouldYield,Ku=k.unstable_requestPaint,ke=k.unstable_now,Gu=k.unstable_getCurrentPriorityLevel,Kl=k.unstable_ImmediatePriority,ra=k.unstable_UserBlockingPriority,bn=k.unstable_NormalPriority,Yu=k.unstable_LowPriority,na=k.unstable_IdlePriority,Pn=null,yt=null;function Xu(e){if(yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(Pn,e,void 0,(e.current.flags&128)===128)}catch{}}var ct=Math.clz32?Math.clz32:qu,Ju=Math.log,Zu=Math.LN2;function qu(e){return e>>>=0,e===0?32:31-(Ju(e)/Zu|0)|0}var Ln=64,Mn=4194304;function Vr(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zn(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,l=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var o=a&~l;o!==0?n=Vr(o):(i&=a,i!==0&&(n=Vr(i)))}else a=r&~l,a!==0?n=Vr(a):i!==0&&(n=Vr(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&l)===0&&(l=n&-n,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-ct(t),l=1<<r,n|=e[r],t&=~l;return n}function ec(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tc(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-ct(i),o=1<<a,u=l[a];u===-1?((o&r)===0||(o&n)!==0)&&(l[a]=ec(o,t)):u<=t&&(e.expiredLanes|=o),i&=~o}}function Gl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function la(){var e=Ln;return Ln<<=1,(Ln&4194240)===0&&(Ln=64),e}function Yl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Wr(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=r}function rc(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var l=31-ct(r),i=1<<l;t[l]=0,n[l]=-1,e[l]=-1,r&=~i}}function Xl(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-ct(r),l=1<<n;l&t|e[n]&t&&(e[n]|=t),r&=~l}}var ue=0;function sa(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var ia,Jl,aa,oa,ua,Zl=!1,Tn=[],zt=null,Tt=null,Rt=null,$r=new Map,Hr=new Map,Dt=[],nc="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 submit".split(" ");function ca(e,t){switch(e){case"focusin":case"focusout":zt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":$r.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hr.delete(t.pointerId)}}function Qr(e,t,r,n,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[l]},t!==null&&(t=an(t),t!==null&&Jl(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function lc(e,t,r,n,l){switch(t){case"focusin":return zt=Qr(zt,e,t,r,n,l),!0;case"dragenter":return Tt=Qr(Tt,e,t,r,n,l),!0;case"mouseover":return Rt=Qr(Rt,e,t,r,n,l),!0;case"pointerover":var i=l.pointerId;return $r.set(i,Qr($r.get(i)||null,e,t,r,n,l)),!0;case"gotpointercapture":return i=l.pointerId,Hr.set(i,Qr(Hr.get(i)||null,e,t,r,n,l)),!0}return!1}function da(e){var t=qt(e.target);if(t!==null){var r=Zt(t);if(r!==null){if(t=r.tag,t===13){if(t=Xi(r),t!==null){e.blockedOn=t,ua(e.priority,function(){aa(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=es(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Bl=n,r.target.dispatchEvent(n),Bl=null}else return t=an(r),t!==null&&Jl(t),e.blockedOn=r,!1;t.shift()}return!0}function fa(e,t,r){Rn(e)&&r.delete(t)}function sc(){Zl=!1,zt!==null&&Rn(zt)&&(zt=null),Tt!==null&&Rn(Tt)&&(Tt=null),Rt!==null&&Rn(Rt)&&(Rt=null),$r.forEach(fa),Hr.forEach(fa)}function Kr(e,t){e.blockedOn===t&&(e.blockedOn=null,Zl||(Zl=!0,k.unstable_scheduleCallback(k.unstable_NormalPriority,sc)))}function Gr(e){function t(l){return Kr(l,e)}if(0<Tn.length){Kr(Tn[0],e);for(var r=1;r<Tn.length;r++){var n=Tn[r];n.blockedOn===e&&(n.blockedOn=null)}}for(zt!==null&&Kr(zt,e),Tt!==null&&Kr(Tt,e),Rt!==null&&Kr(Rt,e),$r.forEach(t),Hr.forEach(t),r=0;r<Dt.length;r++)n=Dt[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Dt.length&&(r=Dt[0],r.blockedOn===null);)da(r),r.blockedOn===null&&Dt.shift()}var pr=B.ReactCurrentBatchConfig,Dn=!0;function ic(e,t,r,n){var l=ue,i=pr.transition;pr.transition=null;try{ue=1,ql(e,t,r,n)}finally{ue=l,pr.transition=i}}function ac(e,t,r,n){var l=ue,i=pr.transition;pr.transition=null;try{ue=4,ql(e,t,r,n)}finally{ue=l,pr.transition=i}}function ql(e,t,r,n){if(Dn){var l=es(e,t,r,n);if(l===null)xs(e,t,n,On,r),ca(e,n);else if(lc(l,e,t,r,n))n.stopPropagation();else if(ca(e,n),t&4&&-1<nc.indexOf(e)){for(;l!==null;){var i=an(l);if(i!==null&&ia(i),i=es(e,t,r,n),i===null&&xs(e,t,n,On,r),i===l)break;l=i}l!==null&&n.stopPropagation()}else xs(e,t,n,null,r)}}var On=null;function es(e,t,r,n){if(On=null,e=Vl(n),e=qt(e),e!==null)if(t=Zt(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Xi(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return On=e,null}function ma(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Gu()){case Kl:return 1;case ra:return 4;case bn:case Yu:return 16;case na:return 536870912;default:return 16}default:return 16}}var Ot=null,ts=null,In=null;function pa(){if(In)return In;var e,t=ts,r=t.length,n,l="value"in Ot?Ot.value:Ot.textContent,i=l.length;for(e=0;e<r&&t[e]===l[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===l[i-n];n++);return In=l.slice(e,1<n?1-n:void 0)}function Fn(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 An(){return!0}function ha(){return!1}function Je(e){function t(r,n,l,i,a){this._reactName=r,this._targetInst=l,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?An:ha,this.isPropagationStopped=ha,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var hr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rs=Je(hr),Yr=y({},hr,{view:0,detail:0}),oc=Je(Yr),ns,ls,Xr,Un=y({},Yr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:is,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!==Xr&&(Xr&&e.type==="mousemove"?(ns=e.screenX-Xr.screenX,ls=e.screenY-Xr.screenY):ls=ns=0,Xr=e),ns)},movementY:function(e){return"movementY"in e?e.movementY:ls}}),ga=Je(Un),uc=y({},Un,{dataTransfer:0}),cc=Je(uc),dc=y({},Yr,{relatedTarget:0}),ss=Je(dc),fc=y({},hr,{animationName:0,elapsedTime:0,pseudoElement:0}),mc=Je(fc),pc=y({},hr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hc=Je(pc),gc=y({},hr,{data:0}),xa=Je(gc),xc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yc={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"},vc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kc(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vc[e])?!!t[e]:!1}function is(){return kc}var wc=y({},Yr,{key:function(e){if(e.key){var t=xc[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Fn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yc[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:is,charCode:function(e){return e.type==="keypress"?Fn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jc=Je(wc),Nc=y({},Un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ya=Je(Nc),Sc=y({},Yr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:is}),Cc=Je(Sc),Ec=y({},hr,{propertyName:0,elapsedTime:0,pseudoElement:0}),_c=Je(Ec),bc=y({},Un,{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}),Pc=Je(bc),Lc=[9,13,27,32],as=Q&&"CompositionEvent"in window,Jr=null;Q&&"documentMode"in document&&(Jr=document.documentMode);var Mc=Q&&"TextEvent"in window&&!Jr,va=Q&&(!as||Jr&&8<Jr&&11>=Jr),ka=" ",wa=!1;function ja(e,t){switch(e){case"keyup":return Lc.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Na(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gr=!1;function zc(e,t){switch(e){case"compositionend":return Na(t);case"keypress":return t.which!==32?null:(wa=!0,ka);case"textInput":return e=t.data,e===ka&&wa?null:e;default:return null}}function Tc(e,t){if(gr)return e==="compositionend"||!as&&ja(e,t)?(e=pa(),In=ts=Ot=null,gr=!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 va&&t.locale!=="ko"?null:t.data;default:return null}}var Rc={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 Sa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rc[e.type]:t==="textarea"}function Ca(e,t,r,n){Hi(n),t=Hn(t,"onChange"),0<t.length&&(r=new rs("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Zr=null,qr=null;function Dc(e){Wa(e,0)}function Bn(e){var t=wr(e);if(Ti(t))return e}function Oc(e,t){if(e==="change")return t}var Ea=!1;if(Q){var os;if(Q){var us="oninput"in document;if(!us){var _a=document.createElement("div");_a.setAttribute("oninput","return;"),us=typeof _a.oninput=="function"}os=us}else os=!1;Ea=os&&(!document.documentMode||9<document.documentMode)}function ba(){Zr&&(Zr.detachEvent("onpropertychange",Pa),qr=Zr=null)}function Pa(e){if(e.propertyName==="value"&&Bn(qr)){var t=[];Ca(t,qr,e,Vl(e)),Yi(Dc,t)}}function Ic(e,t,r){e==="focusin"?(ba(),Zr=t,qr=r,Zr.attachEvent("onpropertychange",Pa)):e==="focusout"&&ba()}function Fc(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bn(qr)}function Ac(e,t){if(e==="click")return Bn(t)}function Uc(e,t){if(e==="input"||e==="change")return Bn(t)}function Bc(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dt=typeof Object.is=="function"?Object.is:Bc;function en(e,t){if(dt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var l=r[n];if(!E.call(t,l)||!dt(e[l],t[l]))return!1}return!0}function La(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ma(e,t){var r=La(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=La(r)}}function za(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?za(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ta(){for(var e=window,t=Sn();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Sn(e.document)}return t}function cs(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")}function Vc(e){var t=Ta(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&za(r.ownerDocument.documentElement,r)){if(n!==null&&cs(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=r.textContent.length,i=Math.min(n.start,l);n=n.end===void 0?i:Math.min(n.end,l),!e.extend&&i>n&&(l=n,n=i,i=l),l=Ma(r,i);var a=Ma(r,n);l&&a&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Wc=Q&&"documentMode"in document&&11>=document.documentMode,xr=null,ds=null,tn=null,fs=!1;function Ra(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;fs||xr==null||xr!==Sn(n)||(n=xr,"selectionStart"in n&&cs(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),tn&&en(tn,n)||(tn=n,n=Hn(ds,"onSelect"),0<n.length&&(t=new rs("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=xr)))}function Vn(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var yr={animationend:Vn("Animation","AnimationEnd"),animationiteration:Vn("Animation","AnimationIteration"),animationstart:Vn("Animation","AnimationStart"),transitionend:Vn("Transition","TransitionEnd")},ms={},Da={};Q&&(Da=document.createElement("div").style,"AnimationEvent"in window||(delete yr.animationend.animation,delete yr.animationiteration.animation,delete yr.animationstart.animation),"TransitionEvent"in window||delete yr.transitionend.transition);function Wn(e){if(ms[e])return ms[e];if(!yr[e])return e;var t=yr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Da)return ms[e]=t[r];return e}var Oa=Wn("animationend"),Ia=Wn("animationiteration"),Fa=Wn("animationstart"),Aa=Wn("transitionend"),Ua=new Map,Ba="abort auxClick 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(" ");function It(e,t){Ua.set(e,t),R(t,[e])}for(var ps=0;ps<Ba.length;ps++){var hs=Ba[ps],$c=hs.toLowerCase(),Hc=hs[0].toUpperCase()+hs.slice(1);It($c,"on"+Hc)}It(Oa,"onAnimationEnd"),It(Ia,"onAnimationIteration"),It(Fa,"onAnimationStart"),It("dblclick","onDoubleClick"),It("focusin","onFocus"),It("focusout","onBlur"),It(Aa,"onTransitionEnd"),X("onMouseEnter",["mouseout","mouseover"]),X("onMouseLeave",["mouseout","mouseover"]),X("onPointerEnter",["pointerout","pointerover"]),X("onPointerLeave",["pointerout","pointerover"]),R("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),R("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),R("onBeforeInput",["compositionend","keypress","textInput","paste"]),R("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),R("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),R("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var rn="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(" "),Qc=new Set("cancel close invalid load scroll toggle".split(" ").concat(rn));function Va(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,$u(n,t,void 0,e),e.currentTarget=null}function Wa(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],l=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var a=n.length-1;0<=a;a--){var o=n[a],u=o.instance,g=o.currentTarget;if(o=o.listener,u!==i&&l.isPropagationStopped())break e;Va(l,o,g),i=u}else for(a=0;a<n.length;a++){if(o=n[a],u=o.instance,g=o.currentTarget,o=o.listener,u!==i&&l.isPropagationStopped())break e;Va(l,o,g),i=u}}}if(_n)throw e=Ql,_n=!1,Ql=null,e}function me(e,t){var r=t[Ns];r===void 0&&(r=t[Ns]=new Set);var n=e+"__bubble";r.has(n)||($a(t,e,2,!1),r.add(n))}function gs(e,t,r){var n=0;t&&(n|=4),$a(r,e,n,t)}var $n="_reactListening"+Math.random().toString(36).slice(2);function nn(e){if(!e[$n]){e[$n]=!0,U.forEach(function(r){r!=="selectionchange"&&(Qc.has(r)||gs(r,!1,e),gs(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$n]||(t[$n]=!0,gs("selectionchange",!1,t))}}function $a(e,t,r,n){switch(ma(t)){case 1:var l=ic;break;case 4:l=ac;break;default:l=ql}r=l.bind(null,t,r,e),l=void 0,!Hl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),n?l!==void 0?e.addEventListener(t,r,{capture:!0,passive:l}):e.addEventListener(t,r,!0):l!==void 0?e.addEventListener(t,r,{passive:l}):e.addEventListener(t,r,!1)}function xs(e,t,r,n,l){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var o=n.stateNode.containerInfo;if(o===l||o.nodeType===8&&o.parentNode===l)break;if(a===4)for(a=n.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===l||u.nodeType===8&&u.parentNode===l))return;a=a.return}for(;o!==null;){if(a=qt(o),a===null)return;if(u=a.tag,u===5||u===6){n=i=a;continue e}o=o.parentNode}}n=n.return}Yi(function(){var g=i,j=Vl(r),N=[];e:{var w=Ua.get(e);if(w!==void 0){var L=rs,T=e;switch(e){case"keypress":if(Fn(r)===0)break e;case"keydown":case"keyup":L=jc;break;case"focusin":T="focus",L=ss;break;case"focusout":T="blur",L=ss;break;case"beforeblur":case"afterblur":L=ss;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=ga;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=cc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=Cc;break;case Oa:case Ia:case Fa:L=mc;break;case Aa:L=_c;break;case"scroll":L=oc;break;case"wheel":L=Pc;break;case"copy":case"cut":case"paste":L=hc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=ya}var D=(t&4)!==0,we=!D&&e==="scroll",p=D?w!==null?w+"Capture":null:w;D=[];for(var d=g,h;d!==null;){h=d;var S=h.stateNode;if(h.tag===5&&S!==null&&(h=S,p!==null&&(S=Ar(d,p),S!=null&&D.push(ln(d,S,h)))),we)break;d=d.return}0<D.length&&(w=new L(w,T,null,r,j),N.push({event:w,listeners:D}))}}if((t&7)===0){e:{if(w=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",w&&r!==Bl&&(T=r.relatedTarget||r.fromElement)&&(qt(T)||T[St]))break e;if((L||w)&&(w=j.window===j?j:(w=j.ownerDocument)?w.defaultView||w.parentWindow:window,L?(T=r.relatedTarget||r.toElement,L=g,T=T?qt(T):null,T!==null&&(we=Zt(T),T!==we||T.tag!==5&&T.tag!==6)&&(T=null)):(L=null,T=g),L!==T)){if(D=ga,S="onMouseLeave",p="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(D=ya,S="onPointerLeave",p="onPointerEnter",d="pointer"),we=L==null?w:wr(L),h=T==null?w:wr(T),w=new D(S,d+"leave",L,r,j),w.target=we,w.relatedTarget=h,S=null,qt(j)===g&&(D=new D(p,d+"enter",T,r,j),D.target=h,D.relatedTarget=we,S=D),we=S,L&&T)t:{for(D=L,p=T,d=0,h=D;h;h=vr(h))d++;for(h=0,S=p;S;S=vr(S))h++;for(;0<d-h;)D=vr(D),d--;for(;0<h-d;)p=vr(p),h--;for(;d--;){if(D===p||p!==null&&D===p.alternate)break t;D=vr(D),p=vr(p)}D=null}else D=null;L!==null&&Ha(N,w,L,D,!1),T!==null&&we!==null&&Ha(N,we,T,D,!0)}}e:{if(w=g?wr(g):window,L=w.nodeName&&w.nodeName.toLowerCase(),L==="select"||L==="input"&&w.type==="file")var F=Oc;else if(Sa(w))if(Ea)F=Uc;else{F=Fc;var W=Ic}else(L=w.nodeName)&&L.toLowerCase()==="input"&&(w.type==="checkbox"||w.type==="radio")&&(F=Ac);if(F&&(F=F(e,g))){Ca(N,F,r,j);break e}W&&W(e,w,g),e==="focusout"&&(W=w._wrapperState)&&W.controlled&&w.type==="number"&&Ol(w,"number",w.value)}switch(W=g?wr(g):window,e){case"focusin":(Sa(W)||W.contentEditable==="true")&&(xr=W,ds=g,tn=null);break;case"focusout":tn=ds=xr=null;break;case"mousedown":fs=!0;break;case"contextmenu":case"mouseup":case"dragend":fs=!1,Ra(N,r,j);break;case"selectionchange":if(Wc)break;case"keydown":case"keyup":Ra(N,r,j)}var $;if(as)e:{switch(e){case"compositionstart":var Y="onCompositionStart";break e;case"compositionend":Y="onCompositionEnd";break e;case"compositionupdate":Y="onCompositionUpdate";break e}Y=void 0}else gr?ja(e,r)&&(Y="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(Y="onCompositionStart");Y&&(va&&r.locale!=="ko"&&(gr||Y!=="onCompositionStart"?Y==="onCompositionEnd"&&gr&&($=pa()):(Ot=j,ts="value"in Ot?Ot.value:Ot.textContent,gr=!0)),W=Hn(g,Y),0<W.length&&(Y=new xa(Y,e,null,r,j),N.push({event:Y,listeners:W}),$?Y.data=$:($=Na(r),$!==null&&(Y.data=$)))),($=Mc?zc(e,r):Tc(e,r))&&(g=Hn(g,"onBeforeInput"),0<g.length&&(j=new xa("onBeforeInput","beforeinput",null,r,j),N.push({event:j,listeners:g}),j.data=$))}Wa(N,t)})}function ln(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Hn(e,t){for(var r=t+"Capture",n=[];e!==null;){var l=e,i=l.stateNode;l.tag===5&&i!==null&&(l=i,i=Ar(e,r),i!=null&&n.unshift(ln(e,i,l)),i=Ar(e,t),i!=null&&n.push(ln(e,i,l))),e=e.return}return n}function vr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ha(e,t,r,n,l){for(var i=t._reactName,a=[];r!==null&&r!==n;){var o=r,u=o.alternate,g=o.stateNode;if(u!==null&&u===n)break;o.tag===5&&g!==null&&(o=g,l?(u=Ar(r,i),u!=null&&a.unshift(ln(r,u,o))):l||(u=Ar(r,i),u!=null&&a.push(ln(r,u,o)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var Kc=/\r\n?/g,Gc=/\u0000|\uFFFD/g;function Qa(e){return(typeof e=="string"?e:""+e).replace(Kc,`
|
|
38
|
+
`).replace(Gc,"")}function Qn(e,t,r){if(t=Qa(t),Qa(e)!==t&&r)throw Error(f(425))}function Kn(){}var ys=null,vs=null;function ks(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ws=typeof setTimeout=="function"?setTimeout:void 0,Yc=typeof clearTimeout=="function"?clearTimeout:void 0,Ka=typeof Promise=="function"?Promise:void 0,Xc=typeof queueMicrotask=="function"?queueMicrotask:typeof Ka<"u"?function(e){return Ka.resolve(null).then(e).catch(Jc)}:ws;function Jc(e){setTimeout(function(){throw e})}function js(e,t){var r=t,n=0;do{var l=r.nextSibling;if(e.removeChild(r),l&&l.nodeType===8)if(r=l.data,r==="/$"){if(n===0){e.removeChild(l),Gr(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=l}while(r);Gr(t)}function Ft(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==="$?")break;if(t==="/$")return null}}return e}function Ga(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var kr=Math.random().toString(36).slice(2),vt="__reactFiber$"+kr,sn="__reactProps$"+kr,St="__reactContainer$"+kr,Ns="__reactEvents$"+kr,Zc="__reactListeners$"+kr,qc="__reactHandles$"+kr;function qt(e){var t=e[vt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[St]||r[vt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Ga(e);e!==null;){if(r=e[vt])return r;e=Ga(e)}return t}e=r,r=e.parentNode}return null}function an(e){return e=e[vt]||e[St],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function wr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(f(33))}function Gn(e){return e[sn]||null}var Ss=[],jr=-1;function At(e){return{current:e}}function pe(e){0>jr||(e.current=Ss[jr],Ss[jr]=null,jr--)}function de(e,t){jr++,Ss[jr]=e.current,e.current=t}var Ut={},ze=At(Ut),Ve=At(!1),er=Ut;function Nr(e,t){var r=e.type.contextTypes;if(!r)return Ut;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in r)l[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function We(e){return e=e.childContextTypes,e!=null}function Yn(){pe(Ve),pe(ze)}function Ya(e,t,r){if(ze.current!==Ut)throw Error(f(168));de(ze,t),de(Ve,r)}function Xa(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var l in n)if(!(l in t))throw Error(f(108,ce(e)||"Unknown",l));return y({},r,n)}function Xn(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ut,er=ze.current,de(ze,e),de(Ve,Ve.current),!0}function Ja(e,t,r){var n=e.stateNode;if(!n)throw Error(f(169));r?(e=Xa(e,t,er),n.__reactInternalMemoizedMergedChildContext=e,pe(Ve),pe(ze),de(ze,e)):pe(Ve),de(Ve,r)}var Ct=null,Jn=!1,Cs=!1;function Za(e){Ct===null?Ct=[e]:Ct.push(e)}function ed(e){Jn=!0,Za(e)}function Bt(){if(!Cs&&Ct!==null){Cs=!0;var e=0,t=ue;try{var r=Ct;for(ue=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ct=null,Jn=!1}catch(l){throw Ct!==null&&(Ct=Ct.slice(e+1)),ea(Kl,Bt),l}finally{ue=t,Cs=!1}}return null}var Sr=[],Cr=0,Zn=null,qn=0,rt=[],nt=0,tr=null,Et=1,_t="";function rr(e,t){Sr[Cr++]=qn,Sr[Cr++]=Zn,Zn=e,qn=t}function qa(e,t,r){rt[nt++]=Et,rt[nt++]=_t,rt[nt++]=tr,tr=e;var n=Et;e=_t;var l=32-ct(n)-1;n&=~(1<<l),r+=1;var i=32-ct(t)+l;if(30<i){var a=l-l%5;i=(n&(1<<a)-1).toString(32),n>>=a,l-=a,Et=1<<32-ct(t)+l|r<<l|n,_t=i+e}else Et=1<<i|r<<l|n,_t=e}function Es(e){e.return!==null&&(rr(e,1),qa(e,1,0))}function _s(e){for(;e===Zn;)Zn=Sr[--Cr],Sr[Cr]=null,qn=Sr[--Cr],Sr[Cr]=null;for(;e===tr;)tr=rt[--nt],rt[nt]=null,_t=rt[--nt],rt[nt]=null,Et=rt[--nt],rt[nt]=null}var Ze=null,qe=null,ge=!1,ft=null;function eo(e,t){var r=at(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function to(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ze=e,qe=Ft(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ze=e,qe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=tr!==null?{id:Et,overflow:_t}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=at(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ze=e,qe=null,!0):!1;default:return!1}}function bs(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ps(e){if(ge){var t=qe;if(t){var r=t;if(!to(e,t)){if(bs(e))throw Error(f(418));t=Ft(r.nextSibling);var n=Ze;t&&to(e,t)?eo(n,r):(e.flags=e.flags&-4097|2,ge=!1,Ze=e)}}else{if(bs(e))throw Error(f(418));e.flags=e.flags&-4097|2,ge=!1,Ze=e}}}function ro(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ze=e}function el(e){if(e!==Ze)return!1;if(!ge)return ro(e),ge=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ks(e.type,e.memoizedProps)),t&&(t=qe)){if(bs(e))throw no(),Error(f(418));for(;t;)eo(e,t),t=Ft(t.nextSibling)}if(ro(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(f(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){qe=Ft(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}qe=null}}else qe=Ze?Ft(e.stateNode.nextSibling):null;return!0}function no(){for(var e=qe;e;)e=Ft(e.nextSibling)}function Er(){qe=Ze=null,ge=!1}function Ls(e){ft===null?ft=[e]:ft.push(e)}var td=B.ReactCurrentBatchConfig;function on(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(f(309));var n=r.stateNode}if(!n)throw Error(f(147,e));var l=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var o=l.refs;a===null?delete o[i]:o[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(f(284));if(!r._owner)throw Error(f(290,e))}return e}function tl(e,t){throw e=Object.prototype.toString.call(t),Error(f(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function lo(e){var t=e._init;return t(e._payload)}function so(e){function t(p,d){if(e){var h=p.deletions;h===null?(p.deletions=[d],p.flags|=16):h.push(d)}}function r(p,d){if(!e)return null;for(;d!==null;)t(p,d),d=d.sibling;return null}function n(p,d){for(p=new Map;d!==null;)d.key!==null?p.set(d.key,d):p.set(d.index,d),d=d.sibling;return p}function l(p,d){return p=Yt(p,d),p.index=0,p.sibling=null,p}function i(p,d,h){return p.index=h,e?(h=p.alternate,h!==null?(h=h.index,h<d?(p.flags|=2,d):h):(p.flags|=2,d)):(p.flags|=1048576,d)}function a(p){return e&&p.alternate===null&&(p.flags|=2),p}function o(p,d,h,S){return d===null||d.tag!==6?(d=wi(h,p.mode,S),d.return=p,d):(d=l(d,h),d.return=p,d)}function u(p,d,h,S){var F=h.type;return F===Le?j(p,d,h.props.children,S,h.key):d!==null&&(d.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===Me&&lo(F)===d.type)?(S=l(d,h.props),S.ref=on(p,d,h),S.return=p,S):(S=Cl(h.type,h.key,h.props,null,p.mode,S),S.ref=on(p,d,h),S.return=p,S)}function g(p,d,h,S){return d===null||d.tag!==4||d.stateNode.containerInfo!==h.containerInfo||d.stateNode.implementation!==h.implementation?(d=ji(h,p.mode,S),d.return=p,d):(d=l(d,h.children||[]),d.return=p,d)}function j(p,d,h,S,F){return d===null||d.tag!==7?(d=cr(h,p.mode,S,F),d.return=p,d):(d=l(d,h),d.return=p,d)}function N(p,d,h){if(typeof d=="string"&&d!==""||typeof d=="number")return d=wi(""+d,p.mode,h),d.return=p,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case J:return h=Cl(d.type,d.key,d.props,null,p.mode,h),h.ref=on(p,null,d),h.return=p,h;case ae:return d=ji(d,p.mode,h),d.return=p,d;case Me:var S=d._init;return N(p,S(d._payload),h)}if(Or(d)||x(d))return d=cr(d,p.mode,h,null),d.return=p,d;tl(p,d)}return null}function w(p,d,h,S){var F=d!==null?d.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return F!==null?null:o(p,d,""+h,S);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case J:return h.key===F?u(p,d,h,S):null;case ae:return h.key===F?g(p,d,h,S):null;case Me:return F=h._init,w(p,d,F(h._payload),S)}if(Or(h)||x(h))return F!==null?null:j(p,d,h,S,null);tl(p,h)}return null}function L(p,d,h,S,F){if(typeof S=="string"&&S!==""||typeof S=="number")return p=p.get(h)||null,o(d,p,""+S,F);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case J:return p=p.get(S.key===null?h:S.key)||null,u(d,p,S,F);case ae:return p=p.get(S.key===null?h:S.key)||null,g(d,p,S,F);case Me:var W=S._init;return L(p,d,h,W(S._payload),F)}if(Or(S)||x(S))return p=p.get(h)||null,j(d,p,S,F,null);tl(d,S)}return null}function T(p,d,h,S){for(var F=null,W=null,$=d,Y=d=0,_e=null;$!==null&&Y<h.length;Y++){$.index>Y?(_e=$,$=null):_e=$.sibling;var se=w(p,$,h[Y],S);if(se===null){$===null&&($=_e);break}e&&$&&se.alternate===null&&t(p,$),d=i(se,d,Y),W===null?F=se:W.sibling=se,W=se,$=_e}if(Y===h.length)return r(p,$),ge&&rr(p,Y),F;if($===null){for(;Y<h.length;Y++)$=N(p,h[Y],S),$!==null&&(d=i($,d,Y),W===null?F=$:W.sibling=$,W=$);return ge&&rr(p,Y),F}for($=n(p,$);Y<h.length;Y++)_e=L($,p,Y,h[Y],S),_e!==null&&(e&&_e.alternate!==null&&$.delete(_e.key===null?Y:_e.key),d=i(_e,d,Y),W===null?F=_e:W.sibling=_e,W=_e);return e&&$.forEach(function(Xt){return t(p,Xt)}),ge&&rr(p,Y),F}function D(p,d,h,S){var F=x(h);if(typeof F!="function")throw Error(f(150));if(h=F.call(h),h==null)throw Error(f(151));for(var W=F=null,$=d,Y=d=0,_e=null,se=h.next();$!==null&&!se.done;Y++,se=h.next()){$.index>Y?(_e=$,$=null):_e=$.sibling;var Xt=w(p,$,se.value,S);if(Xt===null){$===null&&($=_e);break}e&&$&&Xt.alternate===null&&t(p,$),d=i(Xt,d,Y),W===null?F=Xt:W.sibling=Xt,W=Xt,$=_e}if(se.done)return r(p,$),ge&&rr(p,Y),F;if($===null){for(;!se.done;Y++,se=h.next())se=N(p,se.value,S),se!==null&&(d=i(se,d,Y),W===null?F=se:W.sibling=se,W=se);return ge&&rr(p,Y),F}for($=n(p,$);!se.done;Y++,se=h.next())se=L($,p,Y,se.value,S),se!==null&&(e&&se.alternate!==null&&$.delete(se.key===null?Y:se.key),d=i(se,d,Y),W===null?F=se:W.sibling=se,W=se);return e&&$.forEach(function(Rd){return t(p,Rd)}),ge&&rr(p,Y),F}function we(p,d,h,S){if(typeof h=="object"&&h!==null&&h.type===Le&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case J:e:{for(var F=h.key,W=d;W!==null;){if(W.key===F){if(F=h.type,F===Le){if(W.tag===7){r(p,W.sibling),d=l(W,h.props.children),d.return=p,p=d;break e}}else if(W.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===Me&&lo(F)===W.type){r(p,W.sibling),d=l(W,h.props),d.ref=on(p,W,h),d.return=p,p=d;break e}r(p,W);break}else t(p,W);W=W.sibling}h.type===Le?(d=cr(h.props.children,p.mode,S,h.key),d.return=p,p=d):(S=Cl(h.type,h.key,h.props,null,p.mode,S),S.ref=on(p,d,h),S.return=p,p=S)}return a(p);case ae:e:{for(W=h.key;d!==null;){if(d.key===W)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){r(p,d.sibling),d=l(d,h.children||[]),d.return=p,p=d;break e}else{r(p,d);break}else t(p,d);d=d.sibling}d=ji(h,p.mode,S),d.return=p,p=d}return a(p);case Me:return W=h._init,we(p,d,W(h._payload),S)}if(Or(h))return T(p,d,h,S);if(x(h))return D(p,d,h,S);tl(p,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(r(p,d.sibling),d=l(d,h),d.return=p,p=d):(r(p,d),d=wi(h,p.mode,S),d.return=p,p=d),a(p)):r(p,d)}return we}var _r=so(!0),io=so(!1),rl=At(null),nl=null,br=null,Ms=null;function zs(){Ms=br=nl=null}function Ts(e){var t=rl.current;pe(rl),e._currentValue=t}function Rs(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Pr(e,t){nl=e,Ms=br=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&($e=!0),e.firstContext=null)}function lt(e){var t=e._currentValue;if(Ms!==e)if(e={context:e,memoizedValue:t,next:null},br===null){if(nl===null)throw Error(f(308));br=e,nl.dependencies={lanes:0,firstContext:e}}else br=br.next=e;return t}var nr=null;function Ds(e){nr===null?nr=[e]:nr.push(e)}function ao(e,t,r,n){var l=t.interleaved;return l===null?(r.next=r,Ds(t)):(r.next=l.next,l.next=r),t.interleaved=r,bt(e,n)}function bt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Vt=!1;function Os(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wt(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(re&2)!==0){var l=n.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),n.pending=t,bt(e,r)}return l=n.interleaved,l===null?(t.next=t,Ds(n)):(t.next=l.next,l.next=t),n.interleaved=t,bt(e,r)}function ll(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xl(e,r)}}function uo(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var l=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?l=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?l=i=t:i=i.next=t}else l=i=t;r={baseState:n.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function sl(e,t,r,n){var l=e.updateQueue;Vt=!1;var i=l.firstBaseUpdate,a=l.lastBaseUpdate,o=l.shared.pending;if(o!==null){l.shared.pending=null;var u=o,g=u.next;u.next=null,a===null?i=g:a.next=g,a=u;var j=e.alternate;j!==null&&(j=j.updateQueue,o=j.lastBaseUpdate,o!==a&&(o===null?j.firstBaseUpdate=g:o.next=g,j.lastBaseUpdate=u))}if(i!==null){var N=l.baseState;a=0,j=g=u=null,o=i;do{var w=o.lane,L=o.eventTime;if((n&w)===w){j!==null&&(j=j.next={eventTime:L,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var T=e,D=o;switch(w=t,L=r,D.tag){case 1:if(T=D.payload,typeof T=="function"){N=T.call(L,N,w);break e}N=T;break e;case 3:T.flags=T.flags&-65537|128;case 0:if(T=D.payload,w=typeof T=="function"?T.call(L,N,w):T,w==null)break e;N=y({},N,w);break e;case 2:Vt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,w=l.effects,w===null?l.effects=[o]:w.push(o))}else L={eventTime:L,lane:w,tag:o.tag,payload:o.payload,callback:o.callback,next:null},j===null?(g=j=L,u=N):j=j.next=L,a|=w;if(o=o.next,o===null){if(o=l.shared.pending,o===null)break;w=o,o=w.next,w.next=null,l.lastBaseUpdate=w,l.shared.pending=null}}while(!0);if(j===null&&(u=N),l.baseState=u,l.firstBaseUpdate=g,l.lastBaseUpdate=j,t=l.shared.interleaved,t!==null){l=t;do a|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);ir|=a,e.lanes=a,e.memoizedState=N}}function co(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],l=n.callback;if(l!==null){if(n.callback=null,n=r,typeof l!="function")throw Error(f(191,l));l.call(n)}}}var un={},kt=At(un),cn=At(un),dn=At(un);function lr(e){if(e===un)throw Error(f(174));return e}function Is(e,t){switch(de(dn,t),de(cn,e),de(kt,un),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Fl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Fl(t,e)}pe(kt),de(kt,t)}function Lr(){pe(kt),pe(cn),pe(dn)}function fo(e){lr(dn.current);var t=lr(kt.current),r=Fl(t,e.type);t!==r&&(de(cn,e),de(kt,r))}function Fs(e){cn.current===e&&(pe(kt),pe(cn))}var xe=At(0);function il(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 As=[];function Us(){for(var e=0;e<As.length;e++)As[e]._workInProgressVersionPrimary=null;As.length=0}var al=B.ReactCurrentDispatcher,Bs=B.ReactCurrentBatchConfig,sr=0,ye=null,Ne=null,Ce=null,ol=!1,fn=!1,mn=0,rd=0;function Te(){throw Error(f(321))}function Vs(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!dt(e[r],t[r]))return!1;return!0}function Ws(e,t,r,n,l,i){if(sr=i,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,al.current=e===null||e.memoizedState===null?id:ad,e=r(n,l),fn){i=0;do{if(fn=!1,mn=0,25<=i)throw Error(f(301));i+=1,Ce=Ne=null,t.updateQueue=null,al.current=od,e=r(n,l)}while(fn)}if(al.current=dl,t=Ne!==null&&Ne.next!==null,sr=0,Ce=Ne=ye=null,ol=!1,t)throw Error(f(300));return e}function $s(){var e=mn!==0;return mn=0,e}function wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ce===null?ye.memoizedState=Ce=e:Ce=Ce.next=e,Ce}function st(){if(Ne===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Ce===null?ye.memoizedState:Ce.next;if(t!==null)Ce=t,Ne=e;else{if(e===null)throw Error(f(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Ce===null?ye.memoizedState=Ce=e:Ce=Ce.next=e}return Ce}function pn(e,t){return typeof t=="function"?t(e):t}function Hs(e){var t=st(),r=t.queue;if(r===null)throw Error(f(311));r.lastRenderedReducer=e;var n=Ne,l=n.baseQueue,i=r.pending;if(i!==null){if(l!==null){var a=l.next;l.next=i.next,i.next=a}n.baseQueue=l=i,r.pending=null}if(l!==null){i=l.next,n=n.baseState;var o=a=null,u=null,g=i;do{var j=g.lane;if((sr&j)===j)u!==null&&(u=u.next={lane:0,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null}),n=g.hasEagerState?g.eagerState:e(n,g.action);else{var N={lane:j,action:g.action,hasEagerState:g.hasEagerState,eagerState:g.eagerState,next:null};u===null?(o=u=N,a=n):u=u.next=N,ye.lanes|=j,ir|=j}g=g.next}while(g!==null&&g!==i);u===null?a=n:u.next=o,dt(n,t.memoizedState)||($e=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=u,r.lastRenderedState=n}if(e=r.interleaved,e!==null){l=e;do i=l.lane,ye.lanes|=i,ir|=i,l=l.next;while(l!==e)}else l===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Qs(e){var t=st(),r=t.queue;if(r===null)throw Error(f(311));r.lastRenderedReducer=e;var n=r.dispatch,l=r.pending,i=t.memoizedState;if(l!==null){r.pending=null;var a=l=l.next;do i=e(i,a.action),a=a.next;while(a!==l);dt(i,t.memoizedState)||($e=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function mo(){}function po(e,t){var r=ye,n=st(),l=t(),i=!dt(n.memoizedState,l);if(i&&(n.memoizedState=l,$e=!0),n=n.queue,Ks(xo.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||Ce!==null&&Ce.memoizedState.tag&1){if(r.flags|=2048,hn(9,go.bind(null,r,n,l,t),void 0,null),Ee===null)throw Error(f(349));(sr&30)!==0||ho(r,t,l)}return l}function ho(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ye.updateQueue,t===null?(t={lastEffect:null,stores:null},ye.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function go(e,t,r,n){t.value=r,t.getSnapshot=n,yo(t)&&vo(e)}function xo(e,t,r){return r(function(){yo(t)&&vo(e)})}function yo(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!dt(e,r)}catch{return!0}}function vo(e){var t=bt(e,1);t!==null&>(t,e,1,-1)}function ko(e){var t=wt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:pn,lastRenderedState:e},t.queue=e,e=e.dispatch=sd.bind(null,ye,e),[t.memoizedState,e]}function hn(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=ye.updateQueue,t===null?(t={lastEffect:null,stores:null},ye.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function wo(){return st().memoizedState}function ul(e,t,r,n){var l=wt();ye.flags|=e,l.memoizedState=hn(1|t,r,void 0,n===void 0?null:n)}function cl(e,t,r,n){var l=st();n=n===void 0?null:n;var i=void 0;if(Ne!==null){var a=Ne.memoizedState;if(i=a.destroy,n!==null&&Vs(n,a.deps)){l.memoizedState=hn(t,r,i,n);return}}ye.flags|=e,l.memoizedState=hn(1|t,r,i,n)}function jo(e,t){return ul(8390656,8,e,t)}function Ks(e,t){return cl(2048,8,e,t)}function No(e,t){return cl(4,2,e,t)}function So(e,t){return cl(4,4,e,t)}function Co(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Eo(e,t,r){return r=r!=null?r.concat([e]):null,cl(4,4,Co.bind(null,t,e),r)}function Gs(){}function _o(e,t){var r=st();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Vs(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function bo(e,t){var r=st();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Vs(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Po(e,t,r){return(sr&21)===0?(e.baseState&&(e.baseState=!1,$e=!0),e.memoizedState=r):(dt(r,t)||(r=la(),ye.lanes|=r,ir|=r,e.baseState=!0),t)}function nd(e,t){var r=ue;ue=r!==0&&4>r?r:4,e(!0);var n=Bs.transition;Bs.transition={};try{e(!1),t()}finally{ue=r,Bs.transition=n}}function Lo(){return st().memoizedState}function ld(e,t,r){var n=Kt(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Mo(e))zo(t,r);else if(r=ao(e,t,r,n),r!==null){var l=Ue();gt(r,e,n,l),To(r,t,n)}}function sd(e,t,r){var n=Kt(e),l={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Mo(e))zo(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,o=i(a,r);if(l.hasEagerState=!0,l.eagerState=o,dt(o,a)){var u=t.interleaved;u===null?(l.next=l,Ds(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}r=ao(e,t,l,n),r!==null&&(l=Ue(),gt(r,e,n,l),To(r,t,n))}}function Mo(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function zo(e,t){fn=ol=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function To(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Xl(e,r)}}var dl={readContext:lt,useCallback:Te,useContext:Te,useEffect:Te,useImperativeHandle:Te,useInsertionEffect:Te,useLayoutEffect:Te,useMemo:Te,useReducer:Te,useRef:Te,useState:Te,useDebugValue:Te,useDeferredValue:Te,useTransition:Te,useMutableSource:Te,useSyncExternalStore:Te,useId:Te,unstable_isNewReconciler:!1},id={readContext:lt,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:jo,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ul(4194308,4,Co.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ul(4194308,4,e,t)},useInsertionEffect:function(e,t){return ul(4,2,e,t)},useMemo:function(e,t){var r=wt();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=wt();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=ld.bind(null,ye,e),[n.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:ko,useDebugValue:Gs,useDeferredValue:function(e){return wt().memoizedState=e},useTransition:function(){var e=ko(!1),t=e[0];return e=nd.bind(null,e[1]),wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=ye,l=wt();if(ge){if(r===void 0)throw Error(f(407));r=r()}else{if(r=t(),Ee===null)throw Error(f(349));(sr&30)!==0||ho(n,t,r)}l.memoizedState=r;var i={value:r,getSnapshot:t};return l.queue=i,jo(xo.bind(null,n,i,e),[e]),n.flags|=2048,hn(9,go.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=wt(),t=Ee.identifierPrefix;if(ge){var r=_t,n=Et;r=(n&~(1<<32-ct(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=mn++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=rd++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ad={readContext:lt,useCallback:_o,useContext:lt,useEffect:Ks,useImperativeHandle:Eo,useInsertionEffect:No,useLayoutEffect:So,useMemo:bo,useReducer:Hs,useRef:wo,useState:function(){return Hs(pn)},useDebugValue:Gs,useDeferredValue:function(e){var t=st();return Po(t,Ne.memoizedState,e)},useTransition:function(){var e=Hs(pn)[0],t=st().memoizedState;return[e,t]},useMutableSource:mo,useSyncExternalStore:po,useId:Lo,unstable_isNewReconciler:!1},od={readContext:lt,useCallback:_o,useContext:lt,useEffect:Ks,useImperativeHandle:Eo,useInsertionEffect:No,useLayoutEffect:So,useMemo:bo,useReducer:Qs,useRef:wo,useState:function(){return Qs(pn)},useDebugValue:Gs,useDeferredValue:function(e){var t=st();return Ne===null?t.memoizedState=e:Po(t,Ne.memoizedState,e)},useTransition:function(){var e=Qs(pn)[0],t=st().memoizedState;return[e,t]},useMutableSource:mo,useSyncExternalStore:po,useId:Lo,unstable_isNewReconciler:!1};function mt(e,t){if(e&&e.defaultProps){t=y({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Ys(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:y({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var fl={isMounted:function(e){return(e=e._reactInternals)?Zt(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ue(),l=Kt(e),i=Pt(n,l);i.payload=t,r!=null&&(i.callback=r),t=Wt(e,i,l),t!==null&&(gt(t,e,l,n),ll(t,e,l))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ue(),l=Kt(e),i=Pt(n,l);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Wt(e,i,l),t!==null&&(gt(t,e,l,n),ll(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ue(),n=Kt(e),l=Pt(r,n);l.tag=2,t!=null&&(l.callback=t),t=Wt(e,l,n),t!==null&&(gt(t,e,n,r),ll(t,e,n))}};function Ro(e,t,r,n,l,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,a):t.prototype&&t.prototype.isPureReactComponent?!en(r,n)||!en(l,i):!0}function Do(e,t,r){var n=!1,l=Ut,i=t.contextType;return typeof i=="object"&&i!==null?i=lt(i):(l=We(t)?er:ze.current,n=t.contextTypes,i=(n=n!=null)?Nr(e,l):Ut),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fl,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=l,e.__reactInternalMemoizedMaskedChildContext=i),t}function Oo(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&fl.enqueueReplaceState(t,t.state,null)}function Xs(e,t,r,n){var l=e.stateNode;l.props=r,l.state=e.memoizedState,l.refs={},Os(e);var i=t.contextType;typeof i=="object"&&i!==null?l.context=lt(i):(i=We(t)?er:ze.current,l.context=Nr(e,i)),l.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Ys(e,t,i,r),l.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(t=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),t!==l.state&&fl.enqueueReplaceState(l,l.state,null),sl(e,r,l,n),l.state=e.memoizedState),typeof l.componentDidMount=="function"&&(e.flags|=4194308)}function Mr(e,t){try{var r="",n=t;do r+=ne(n),n=n.return;while(n);var l=r}catch(i){l=`
|
|
39
|
+
Error generating stack: `+i.message+`
|
|
40
|
+
`+i.stack}return{value:e,source:t,stack:l,digest:null}}function Js(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Zs(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var ud=typeof WeakMap=="function"?WeakMap:Map;function Io(e,t,r){r=Pt(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){vl||(vl=!0,mi=n),Zs(e,t)},r}function Fo(e,t,r){r=Pt(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var l=t.value;r.payload=function(){return n(l)},r.callback=function(){Zs(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){Zs(e,t),typeof n!="function"&&(Ht===null?Ht=new Set([this]):Ht.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function Ao(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new ud;var l=new Set;n.set(t,l)}else l=n.get(t),l===void 0&&(l=new Set,n.set(t,l));l.has(r)||(l.add(r),e=Nd.bind(null,e,t,r),t.then(e,e))}function Uo(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Bo(e,t,r,n,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Pt(-1,1),t.tag=2,Wt(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var cd=B.ReactCurrentOwner,$e=!1;function Ae(e,t,r,n){t.child=e===null?io(t,null,r,n):_r(t,e.child,r,n)}function Vo(e,t,r,n,l){r=r.render;var i=t.ref;return Pr(t,l),n=Ws(e,t,r,n,i,l),r=$s(),e!==null&&!$e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Lt(e,t,l)):(ge&&r&&Es(t),t.flags|=1,Ae(e,t,n,l),t.child)}function Wo(e,t,r,n,l){if(e===null){var i=r.type;return typeof i=="function"&&!ki(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,$o(e,t,i,n,l)):(e=Cl(r.type,null,n,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&l)===0){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:en,r(a,n)&&e.ref===t.ref)return Lt(e,t,l)}return t.flags|=1,e=Yt(i,n),e.ref=t.ref,e.return=t,t.child=e}function $o(e,t,r,n,l){if(e!==null){var i=e.memoizedProps;if(en(i,n)&&e.ref===t.ref)if($e=!1,t.pendingProps=n=i,(e.lanes&l)!==0)(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,Lt(e,t,l)}return qs(e,t,r,n,l)}function Ho(e,t,r){var n=t.pendingProps,l=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(Tr,et),et|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,de(Tr,et),et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,de(Tr,et),et|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,de(Tr,et),et|=n;return Ae(e,t,l,r),t.child}function Qo(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function qs(e,t,r,n,l){var i=We(r)?er:ze.current;return i=Nr(t,i),Pr(t,l),r=Ws(e,t,r,n,i,l),n=$s(),e!==null&&!$e?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Lt(e,t,l)):(ge&&n&&Es(t),t.flags|=1,Ae(e,t,r,l),t.child)}function Ko(e,t,r,n,l){if(We(r)){var i=!0;Xn(t)}else i=!1;if(Pr(t,l),t.stateNode===null)pl(e,t),Do(t,r,n),Xs(t,r,n,l),n=!0;else if(e===null){var a=t.stateNode,o=t.memoizedProps;a.props=o;var u=a.context,g=r.contextType;typeof g=="object"&&g!==null?g=lt(g):(g=We(r)?er:ze.current,g=Nr(t,g));var j=r.getDerivedStateFromProps,N=typeof j=="function"||typeof a.getSnapshotBeforeUpdate=="function";N||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==n||u!==g)&&Oo(t,a,n,g),Vt=!1;var w=t.memoizedState;a.state=w,sl(t,n,a,l),u=t.memoizedState,o!==n||w!==u||Ve.current||Vt?(typeof j=="function"&&(Ys(t,r,j,n),u=t.memoizedState),(o=Vt||Ro(t,r,o,n,w,u,g))?(N||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),a.props=n,a.state=u,a.context=g,n=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,oo(e,t),o=t.memoizedProps,g=t.type===t.elementType?o:mt(t.type,o),a.props=g,N=t.pendingProps,w=a.context,u=r.contextType,typeof u=="object"&&u!==null?u=lt(u):(u=We(r)?er:ze.current,u=Nr(t,u));var L=r.getDerivedStateFromProps;(j=typeof L=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==N||w!==u)&&Oo(t,a,n,u),Vt=!1,w=t.memoizedState,a.state=w,sl(t,n,a,l);var T=t.memoizedState;o!==N||w!==T||Ve.current||Vt?(typeof L=="function"&&(Ys(t,r,L,n),T=t.memoizedState),(g=Vt||Ro(t,r,g,n,w,T,u)||!1)?(j||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,T,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,T,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=T),a.props=n,a.state=T,a.context=u,n=g):(typeof a.componentDidUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&w===e.memoizedState||(t.flags|=1024),n=!1)}return ei(e,t,r,n,i,l)}function ei(e,t,r,n,l,i){Qo(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return l&&Ja(t,r,!1),Lt(e,t,i);n=t.stateNode,cd.current=t;var o=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=_r(t,e.child,null,i),t.child=_r(t,null,o,i)):Ae(e,t,o,i),t.memoizedState=n.state,l&&Ja(t,r,!0),t.child}function Go(e){var t=e.stateNode;t.pendingContext?Ya(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ya(e,t.context,!1),Is(e,t.containerInfo)}function Yo(e,t,r,n,l){return Er(),Ls(l),t.flags|=256,Ae(e,t,r,n),t.child}var ti={dehydrated:null,treeContext:null,retryLane:0};function ri(e){return{baseLanes:e,cachePool:null,transitions:null}}function Xo(e,t,r){var n=t.pendingProps,l=xe.current,i=!1,a=(t.flags&128)!==0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(l&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),de(xe,l&1),e===null)return Ps(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=n.children,e=n.fallback,i?(n=t.mode,i=t.child,a={mode:"hidden",children:a},(n&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=a):i=El(a,n,0,null),e=cr(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ri(r),t.memoizedState=ti,e):ni(t,a));if(l=e.memoizedState,l!==null&&(o=l.dehydrated,o!==null))return dd(e,t,a,n,o,l,r);if(i){i=n.fallback,a=t.mode,l=e.child,o=l.sibling;var u={mode:"hidden",children:n.children};return(a&1)===0&&t.child!==l?(n=t.child,n.childLanes=0,n.pendingProps=u,t.deletions=null):(n=Yt(l,u),n.subtreeFlags=l.subtreeFlags&14680064),o!==null?i=Yt(o,i):(i=cr(i,a,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,a=e.child.memoizedState,a=a===null?ri(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~r,t.memoizedState=ti,n}return i=e.child,e=i.sibling,n=Yt(i,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function ni(e,t){return t=El({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ml(e,t,r,n){return n!==null&&Ls(n),_r(t,e.child,null,r),e=ni(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dd(e,t,r,n,l,i,a){if(r)return t.flags&256?(t.flags&=-257,n=Js(Error(f(422))),ml(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,l=t.mode,n=El({mode:"visible",children:n.children},l,0,null),i=cr(i,l,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,(t.mode&1)!==0&&_r(t,e.child,null,a),t.child.memoizedState=ri(a),t.memoizedState=ti,i);if((t.mode&1)===0)return ml(e,t,a,null);if(l.data==="$!"){if(n=l.nextSibling&&l.nextSibling.dataset,n)var o=n.dgst;return n=o,i=Error(f(419)),n=Js(i,n,void 0),ml(e,t,a,n)}if(o=(a&e.childLanes)!==0,$e||o){if(n=Ee,n!==null){switch(a&-a){case 4:l=2;break;case 16:l=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(n.suspendedLanes|a))!==0?0:l,l!==0&&l!==i.retryLane&&(i.retryLane=l,bt(e,l),gt(n,e,l,-1))}return vi(),n=Js(Error(f(421))),ml(e,t,a,n)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Sd.bind(null,e),l._reactRetry=t,null):(e=i.treeContext,qe=Ft(l.nextSibling),Ze=t,ge=!0,ft=null,e!==null&&(rt[nt++]=Et,rt[nt++]=_t,rt[nt++]=tr,Et=e.id,_t=e.overflow,tr=t),t=ni(t,n.children),t.flags|=4096,t)}function Jo(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Rs(e.return,t,r)}function li(e,t,r,n,l){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:l}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=l)}function Zo(e,t,r){var n=t.pendingProps,l=n.revealOrder,i=n.tail;if(Ae(e,t,n.children,r),n=xe.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Jo(e,r,t);else if(e.tag===19)Jo(e,r,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}n&=1}if(de(xe,n),(t.mode&1)===0)t.memoizedState=null;else switch(l){case"forwards":for(r=t.child,l=null;r!==null;)e=r.alternate,e!==null&&il(e)===null&&(l=r),r=r.sibling;r=l,r===null?(l=t.child,t.child=null):(l=r.sibling,r.sibling=null),li(t,!1,l,r,i);break;case"backwards":for(r=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&il(e)===null){t.child=l;break}e=l.sibling,l.sibling=r,r=l,l=e}li(t,!0,r,null,i);break;case"together":li(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Lt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ir|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(f(153));if(t.child!==null){for(e=t.child,r=Yt(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Yt(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function fd(e,t,r){switch(t.tag){case 3:Go(t),Er();break;case 5:fo(t);break;case 1:We(t.type)&&Xn(t);break;case 4:Is(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,l=t.memoizedProps.value;de(rl,n._currentValue),n._currentValue=l;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(de(xe,xe.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Xo(e,t,r):(de(xe,xe.current&1),e=Lt(e,t,r),e!==null?e.sibling:null);de(xe,xe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return Zo(e,t,r);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),de(xe,xe.current),n)break;return null;case 22:case 23:return t.lanes=0,Ho(e,t,r)}return Lt(e,t,r)}var qo,si,eu,tu;qo=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},si=function(){},eu=function(e,t,r,n){var l=e.memoizedProps;if(l!==n){e=t.stateNode,lr(kt.current);var i=null;switch(r){case"input":l=Rl(e,l),n=Rl(e,n),i=[];break;case"select":l=y({},l,{value:void 0}),n=y({},n,{value:void 0}),i=[];break;case"textarea":l=Il(e,l),n=Il(e,n),i=[];break;default:typeof l.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Kn)}Al(r,n);var a;r=null;for(g in l)if(!n.hasOwnProperty(g)&&l.hasOwnProperty(g)&&l[g]!=null)if(g==="style"){var o=l[g];for(a in o)o.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else g!=="dangerouslySetInnerHTML"&&g!=="children"&&g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(A.hasOwnProperty(g)?i||(i=[]):(i=i||[]).push(g,null));for(g in n){var u=n[g];if(o=l!=null?l[g]:void 0,n.hasOwnProperty(g)&&u!==o&&(u!=null||o!=null))if(g==="style")if(o){for(a in o)!o.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in u)u.hasOwnProperty(a)&&o[a]!==u[a]&&(r||(r={}),r[a]=u[a])}else r||(i||(i=[]),i.push(g,r)),r=u;else g==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,o=o?o.__html:void 0,u!=null&&o!==u&&(i=i||[]).push(g,u)):g==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(g,""+u):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&(A.hasOwnProperty(g)?(u!=null&&g==="onScroll"&&me("scroll",e),i||o===u||(i=[])):(i=i||[]).push(g,u))}r&&(i=i||[]).push("style",r);var g=i;(t.updateQueue=g)&&(t.flags|=4)}},tu=function(e,t,r,n){r!==n&&(t.flags|=4)};function gn(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Re(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var l=e.child;l!==null;)r|=l.lanes|l.childLanes,n|=l.subtreeFlags&14680064,n|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)r|=l.lanes|l.childLanes,n|=l.subtreeFlags,n|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function md(e,t,r){var n=t.pendingProps;switch(_s(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return We(t.type)&&Yn(),Re(t),null;case 3:return n=t.stateNode,Lr(),pe(Ve),pe(ze),Us(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(el(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ft!==null&&(gi(ft),ft=null))),si(e,t),Re(t),null;case 5:Fs(t);var l=lr(dn.current);if(r=t.type,e!==null&&t.stateNode!=null)eu(e,t,r,n,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(f(166));return Re(t),null}if(e=lr(kt.current),el(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[vt]=t,n[sn]=i,e=(t.mode&1)!==0,r){case"dialog":me("cancel",n),me("close",n);break;case"iframe":case"object":case"embed":me("load",n);break;case"video":case"audio":for(l=0;l<rn.length;l++)me(rn[l],n);break;case"source":me("error",n);break;case"img":case"image":case"link":me("error",n),me("load",n);break;case"details":me("toggle",n);break;case"input":Ri(n,i),me("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},me("invalid",n);break;case"textarea":Ii(n,i),me("invalid",n)}Al(r,i),l=null;for(var a in i)if(i.hasOwnProperty(a)){var o=i[a];a==="children"?typeof o=="string"?n.textContent!==o&&(i.suppressHydrationWarning!==!0&&Qn(n.textContent,o,e),l=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&Qn(n.textContent,o,e),l=["children",""+o]):A.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&me("scroll",n)}switch(r){case"input":Nn(n),Oi(n,i,!0);break;case"textarea":Nn(n),Ai(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Kn)}n=l,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=l.nodeType===9?l:l.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ui(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[vt]=t,e[sn]=n,qo(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ul(r,n),r){case"dialog":me("cancel",e),me("close",e),l=n;break;case"iframe":case"object":case"embed":me("load",e),l=n;break;case"video":case"audio":for(l=0;l<rn.length;l++)me(rn[l],e);l=n;break;case"source":me("error",e),l=n;break;case"img":case"image":case"link":me("error",e),me("load",e),l=n;break;case"details":me("toggle",e),l=n;break;case"input":Ri(e,n),l=Rl(e,n),me("invalid",e);break;case"option":l=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},l=y({},n,{value:void 0}),me("invalid",e);break;case"textarea":Ii(e,n),l=Il(e,n),me("invalid",e);break;default:l=n}Al(r,l),o=l;for(i in o)if(o.hasOwnProperty(i)){var u=o[i];i==="style"?Wi(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Bi(e,u)):i==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&Ir(e,u):typeof u=="number"&&Ir(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(A.hasOwnProperty(i)?u!=null&&i==="onScroll"&&me("scroll",e):u!=null&&C(e,i,u,a))}switch(r){case"input":Nn(e),Oi(e,n,!1);break;case"textarea":Nn(e),Ai(e);break;case"option":n.value!=null&&e.setAttribute("value",""+oe(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?dr(e,!!n.multiple,i,!1):n.defaultValue!=null&&dr(e,!!n.multiple,n.defaultValue,!0);break;default:typeof l.onClick=="function"&&(e.onclick=Kn)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Re(t),null;case 6:if(e&&t.stateNode!=null)tu(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(f(166));if(r=lr(dn.current),lr(kt.current),el(t)){if(n=t.stateNode,r=t.memoizedProps,n[vt]=t,(i=n.nodeValue!==r)&&(e=Ze,e!==null))switch(e.tag){case 3:Qn(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Qn(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[vt]=t,t.stateNode=n}return Re(t),null;case 13:if(pe(xe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ge&&qe!==null&&(t.mode&1)!==0&&(t.flags&128)===0)no(),Er(),t.flags|=98560,i=!1;else if(i=el(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(f(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(f(317));i[vt]=t}else Er(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Re(t),i=!1}else ft!==null&&(gi(ft),ft=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(xe.current&1)!==0?Se===0&&(Se=3):vi())),t.updateQueue!==null&&(t.flags|=4),Re(t),null);case 4:return Lr(),si(e,t),e===null&&nn(t.stateNode.containerInfo),Re(t),null;case 10:return Ts(t.type._context),Re(t),null;case 17:return We(t.type)&&Yn(),Re(t),null;case 19:if(pe(xe),i=t.memoizedState,i===null)return Re(t),null;if(n=(t.flags&128)!==0,a=i.rendering,a===null)if(n)gn(i,!1);else{if(Se!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=il(e),a!==null){for(t.flags|=128,gn(i,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return de(xe,xe.current&1|2),t.child}e=e.sibling}i.tail!==null&&ke()>Rr&&(t.flags|=128,n=!0,gn(i,!1),t.lanes=4194304)}else{if(!n)if(e=il(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),gn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!ge)return Re(t),null}else 2*ke()-i.renderingStartTime>Rr&&r!==1073741824&&(t.flags|=128,n=!0,gn(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ke(),t.sibling=null,r=xe.current,de(xe,n?r&1|2:r&1),t):(Re(t),null);case 22:case 23:return yi(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(et&1073741824)!==0&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(f(156,t.tag))}function pd(e,t){switch(_s(t),t.tag){case 1:return We(t.type)&&Yn(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Lr(),pe(Ve),pe(ze),Us(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Fs(t),null;case 13:if(pe(xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(f(340));Er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(xe),null;case 4:return Lr(),null;case 10:return Ts(t.type._context),null;case 22:case 23:return yi(),null;case 24:return null;default:return null}}var hl=!1,De=!1,hd=typeof WeakSet=="function"?WeakSet:Set,z=null;function zr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ve(e,t,n)}else r.current=null}function ii(e,t,r){try{r()}catch(n){ve(e,t,n)}}var ru=!1;function gd(e,t){if(ys=Dn,e=Ta(),cs(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var l=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,o=-1,u=-1,g=0,j=0,N=e,w=null;t:for(;;){for(var L;N!==r||l!==0&&N.nodeType!==3||(o=a+l),N!==i||n!==0&&N.nodeType!==3||(u=a+n),N.nodeType===3&&(a+=N.nodeValue.length),(L=N.firstChild)!==null;)w=N,N=L;for(;;){if(N===e)break t;if(w===r&&++g===l&&(o=a),w===i&&++j===n&&(u=a),(L=N.nextSibling)!==null)break;N=w,w=N.parentNode}N=L}r=o===-1||u===-1?null:{start:o,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(vs={focusedElem:e,selectionRange:r},Dn=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var T=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(T!==null){var D=T.memoizedProps,we=T.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?D:mt(t.type,D),we);p.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(f(163))}}catch(S){ve(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return T=ru,ru=!1,T}function xn(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var l=n=n.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&ii(t,r,i)}l=l.next}while(l!==n)}}function gl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function ai(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function nu(e){var t=e.alternate;t!==null&&(e.alternate=null,nu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vt],delete t[sn],delete t[Ns],delete t[Zc],delete t[qc])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function lu(e){return e.tag===5||e.tag===3||e.tag===4}function su(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lu(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.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 oi(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Kn));else if(n!==4&&(e=e.child,e!==null))for(oi(e,t,r),e=e.sibling;e!==null;)oi(e,t,r),e=e.sibling}function ui(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(ui(e,t,r),e=e.sibling;e!==null;)ui(e,t,r),e=e.sibling}var be=null,pt=!1;function $t(e,t,r){for(r=r.child;r!==null;)iu(e,t,r),r=r.sibling}function iu(e,t,r){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(Pn,r)}catch{}switch(r.tag){case 5:De||zr(r,t);case 6:var n=be,l=pt;be=null,$t(e,t,r),be=n,pt=l,be!==null&&(pt?(e=be,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):be.removeChild(r.stateNode));break;case 18:be!==null&&(pt?(e=be,r=r.stateNode,e.nodeType===8?js(e.parentNode,r):e.nodeType===1&&js(e,r),Gr(e)):js(be,r.stateNode));break;case 4:n=be,l=pt,be=r.stateNode.containerInfo,pt=!0,$t(e,t,r),be=n,pt=l;break;case 0:case 11:case 14:case 15:if(!De&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){l=n=n.next;do{var i=l,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&ii(r,t,a),l=l.next}while(l!==n)}$t(e,t,r);break;case 1:if(!De&&(zr(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){ve(r,t,o)}$t(e,t,r);break;case 21:$t(e,t,r);break;case 22:r.mode&1?(De=(n=De)||r.memoizedState!==null,$t(e,t,r),De=n):$t(e,t,r);break;default:$t(e,t,r)}}function au(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new hd),t.forEach(function(n){var l=Cd.bind(null,e,n);r.has(n)||(r.add(n),n.then(l,l))})}}function ht(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var l=r[n];try{var i=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 5:be=o.stateNode,pt=!1;break e;case 3:be=o.stateNode.containerInfo,pt=!0;break e;case 4:be=o.stateNode.containerInfo,pt=!0;break e}o=o.return}if(be===null)throw Error(f(160));iu(i,a,l),be=null,pt=!1;var u=l.alternate;u!==null&&(u.return=null),l.return=null}catch(g){ve(l,t,g)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ou(t,e),t=t.sibling}function ou(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ht(t,e),jt(e),n&4){try{xn(3,e,e.return),gl(3,e)}catch(D){ve(e,e.return,D)}try{xn(5,e,e.return)}catch(D){ve(e,e.return,D)}}break;case 1:ht(t,e),jt(e),n&512&&r!==null&&zr(r,r.return);break;case 5:if(ht(t,e),jt(e),n&512&&r!==null&&zr(r,r.return),e.flags&32){var l=e.stateNode;try{Ir(l,"")}catch(D){ve(e,e.return,D)}}if(n&4&&(l=e.stateNode,l!=null)){var i=e.memoizedProps,a=r!==null?r.memoizedProps:i,o=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&Di(l,i),Ul(o,a);var g=Ul(o,i);for(a=0;a<u.length;a+=2){var j=u[a],N=u[a+1];j==="style"?Wi(l,N):j==="dangerouslySetInnerHTML"?Bi(l,N):j==="children"?Ir(l,N):C(l,j,N,g)}switch(o){case"input":Dl(l,i);break;case"textarea":Fi(l,i);break;case"select":var w=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!i.multiple;var L=i.value;L!=null?dr(l,!!i.multiple,L,!1):w!==!!i.multiple&&(i.defaultValue!=null?dr(l,!!i.multiple,i.defaultValue,!0):dr(l,!!i.multiple,i.multiple?[]:"",!1))}l[sn]=i}catch(D){ve(e,e.return,D)}}break;case 6:if(ht(t,e),jt(e),n&4){if(e.stateNode===null)throw Error(f(162));l=e.stateNode,i=e.memoizedProps;try{l.nodeValue=i}catch(D){ve(e,e.return,D)}}break;case 3:if(ht(t,e),jt(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Gr(t.containerInfo)}catch(D){ve(e,e.return,D)}break;case 4:ht(t,e),jt(e);break;case 13:ht(t,e),jt(e),l=e.child,l.flags&8192&&(i=l.memoizedState!==null,l.stateNode.isHidden=i,!i||l.alternate!==null&&l.alternate.memoizedState!==null||(fi=ke())),n&4&&au(e);break;case 22:if(j=r!==null&&r.memoizedState!==null,e.mode&1?(De=(g=De)||j,ht(t,e),De=g):ht(t,e),jt(e),n&8192){if(g=e.memoizedState!==null,(e.stateNode.isHidden=g)&&!j&&(e.mode&1)!==0)for(z=e,j=e.child;j!==null;){for(N=z=j;z!==null;){switch(w=z,L=w.child,w.tag){case 0:case 11:case 14:case 15:xn(4,w,w.return);break;case 1:zr(w,w.return);var T=w.stateNode;if(typeof T.componentWillUnmount=="function"){n=w,r=w.return;try{t=n,T.props=t.memoizedProps,T.state=t.memoizedState,T.componentWillUnmount()}catch(D){ve(n,r,D)}}break;case 5:zr(w,w.return);break;case 22:if(w.memoizedState!==null){du(N);continue}}L!==null?(L.return=w,z=L):du(N)}j=j.sibling}e:for(j=null,N=e;;){if(N.tag===5){if(j===null){j=N;try{l=N.stateNode,g?(i=l.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=N.stateNode,u=N.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,o.style.display=Vi("display",a))}catch(D){ve(e,e.return,D)}}}else if(N.tag===6){if(j===null)try{N.stateNode.nodeValue=g?"":N.memoizedProps}catch(D){ve(e,e.return,D)}}else if((N.tag!==22&&N.tag!==23||N.memoizedState===null||N===e)&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===e)break e;for(;N.sibling===null;){if(N.return===null||N.return===e)break e;j===N&&(j=null),N=N.return}j===N&&(j=null),N.sibling.return=N.return,N=N.sibling}}break;case 19:ht(t,e),jt(e),n&4&&au(e);break;case 21:break;default:ht(t,e),jt(e)}}function jt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(lu(r)){var n=r;break e}r=r.return}throw Error(f(160))}switch(n.tag){case 5:var l=n.stateNode;n.flags&32&&(Ir(l,""),n.flags&=-33);var i=su(e);ui(e,i,l);break;case 3:case 4:var a=n.stateNode.containerInfo,o=su(e);oi(e,o,a);break;default:throw Error(f(161))}}catch(u){ve(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xd(e,t,r){z=e,uu(e)}function uu(e,t,r){for(var n=(e.mode&1)!==0;z!==null;){var l=z,i=l.child;if(l.tag===22&&n){var a=l.memoizedState!==null||hl;if(!a){var o=l.alternate,u=o!==null&&o.memoizedState!==null||De;o=hl;var g=De;if(hl=a,(De=u)&&!g)for(z=l;z!==null;)a=z,u=a.child,a.tag===22&&a.memoizedState!==null?fu(l):u!==null?(u.return=a,z=u):fu(l);for(;i!==null;)z=i,uu(i),i=i.sibling;z=l,hl=o,De=g}cu(e)}else(l.subtreeFlags&8772)!==0&&i!==null?(i.return=l,z=i):cu(e)}}function cu(e){for(;z!==null;){var t=z;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:De||gl(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!De)if(r===null)n.componentDidMount();else{var l=t.elementType===t.type?r.memoizedProps:mt(t.type,r.memoizedProps);n.componentDidUpdate(l,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&co(t,i,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}co(t,a,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var g=t.alternate;if(g!==null){var j=g.memoizedState;if(j!==null){var N=j.dehydrated;N!==null&&Gr(N)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(f(163))}De||t.flags&512&&ai(t)}catch(w){ve(t,t.return,w)}}if(t===e){z=null;break}if(r=t.sibling,r!==null){r.return=t.return,z=r;break}z=t.return}}function du(e){for(;z!==null;){var t=z;if(t===e){z=null;break}var r=t.sibling;if(r!==null){r.return=t.return,z=r;break}z=t.return}}function fu(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{gl(4,t)}catch(u){ve(t,r,u)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var l=t.return;try{n.componentDidMount()}catch(u){ve(t,l,u)}}var i=t.return;try{ai(t)}catch(u){ve(t,i,u)}break;case 5:var a=t.return;try{ai(t)}catch(u){ve(t,a,u)}}}catch(u){ve(t,t.return,u)}if(t===e){z=null;break}var o=t.sibling;if(o!==null){o.return=t.return,z=o;break}z=t.return}}var yd=Math.ceil,xl=B.ReactCurrentDispatcher,ci=B.ReactCurrentOwner,it=B.ReactCurrentBatchConfig,re=0,Ee=null,je=null,Pe=0,et=0,Tr=At(0),Se=0,yn=null,ir=0,yl=0,di=0,vn=null,He=null,fi=0,Rr=1/0,Mt=null,vl=!1,mi=null,Ht=null,kl=!1,Qt=null,wl=0,kn=0,pi=null,jl=-1,Nl=0;function Ue(){return(re&6)!==0?ke():jl!==-1?jl:jl=ke()}function Kt(e){return(e.mode&1)===0?1:(re&2)!==0&&Pe!==0?Pe&-Pe:td.transition!==null?(Nl===0&&(Nl=la()),Nl):(e=ue,e!==0||(e=window.event,e=e===void 0?16:ma(e.type)),e)}function gt(e,t,r,n){if(50<kn)throw kn=0,pi=null,Error(f(185));Wr(e,r,n),((re&2)===0||e!==Ee)&&(e===Ee&&((re&2)===0&&(yl|=r),Se===4&&Gt(e,Pe)),Qe(e,n),r===1&&re===0&&(t.mode&1)===0&&(Rr=ke()+500,Jn&&Bt()))}function Qe(e,t){var r=e.callbackNode;tc(e,t);var n=zn(e,e===Ee?Pe:0);if(n===0)r!==null&&ta(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&ta(r),t===1)e.tag===0?ed(pu.bind(null,e)):Za(pu.bind(null,e)),Xc(function(){(re&6)===0&&Bt()}),r=null;else{switch(sa(n)){case 1:r=Kl;break;case 4:r=ra;break;case 16:r=bn;break;case 536870912:r=na;break;default:r=bn}r=ju(r,mu.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function mu(e,t){if(jl=-1,Nl=0,(re&6)!==0)throw Error(f(327));var r=e.callbackNode;if(Dr()&&e.callbackNode!==r)return null;var n=zn(e,e===Ee?Pe:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=Sl(e,n);else{t=n;var l=re;re|=2;var i=gu();(Ee!==e||Pe!==t)&&(Mt=null,Rr=ke()+500,or(e,t));do try{wd();break}catch(o){hu(e,o)}while(!0);zs(),xl.current=i,re=l,je!==null?t=0:(Ee=null,Pe=0,t=Se)}if(t!==0){if(t===2&&(l=Gl(e),l!==0&&(n=l,t=hi(e,l))),t===1)throw r=yn,or(e,0),Gt(e,n),Qe(e,ke()),r;if(t===6)Gt(e,n);else{if(l=e.current.alternate,(n&30)===0&&!vd(l)&&(t=Sl(e,n),t===2&&(i=Gl(e),i!==0&&(n=i,t=hi(e,i))),t===1))throw r=yn,or(e,0),Gt(e,n),Qe(e,ke()),r;switch(e.finishedWork=l,e.finishedLanes=n,t){case 0:case 1:throw Error(f(345));case 2:ur(e,He,Mt);break;case 3:if(Gt(e,n),(n&130023424)===n&&(t=fi+500-ke(),10<t)){if(zn(e,0)!==0)break;if(l=e.suspendedLanes,(l&n)!==n){Ue(),e.pingedLanes|=e.suspendedLanes&l;break}e.timeoutHandle=ws(ur.bind(null,e,He,Mt),t);break}ur(e,He,Mt);break;case 4:if(Gt(e,n),(n&4194240)===n)break;for(t=e.eventTimes,l=-1;0<n;){var a=31-ct(n);i=1<<a,a=t[a],a>l&&(l=a),n&=~i}if(n=l,n=ke()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*yd(n/1960))-n,10<n){e.timeoutHandle=ws(ur.bind(null,e,He,Mt),n);break}ur(e,He,Mt);break;case 5:ur(e,He,Mt);break;default:throw Error(f(329))}}}return Qe(e,ke()),e.callbackNode===r?mu.bind(null,e):null}function hi(e,t){var r=vn;return e.current.memoizedState.isDehydrated&&(or(e,t).flags|=256),e=Sl(e,t),e!==2&&(t=He,He=r,t!==null&&gi(t)),e}function gi(e){He===null?He=e:He.push.apply(He,e)}function vd(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var l=r[n],i=l.getSnapshot;l=l.value;try{if(!dt(i(),l))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Gt(e,t){for(t&=~di,t&=~yl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-ct(t),n=1<<r;e[r]=-1,t&=~n}}function pu(e){if((re&6)!==0)throw Error(f(327));Dr();var t=zn(e,0);if((t&1)===0)return Qe(e,ke()),null;var r=Sl(e,t);if(e.tag!==0&&r===2){var n=Gl(e);n!==0&&(t=n,r=hi(e,n))}if(r===1)throw r=yn,or(e,0),Gt(e,t),Qe(e,ke()),r;if(r===6)throw Error(f(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ur(e,He,Mt),Qe(e,ke()),null}function xi(e,t){var r=re;re|=1;try{return e(t)}finally{re=r,re===0&&(Rr=ke()+500,Jn&&Bt())}}function ar(e){Qt!==null&&Qt.tag===0&&(re&6)===0&&Dr();var t=re;re|=1;var r=it.transition,n=ue;try{if(it.transition=null,ue=1,e)return e()}finally{ue=n,it.transition=r,re=t,(re&6)===0&&Bt()}}function yi(){et=Tr.current,pe(Tr)}function or(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Yc(r)),je!==null)for(r=je.return;r!==null;){var n=r;switch(_s(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Yn();break;case 3:Lr(),pe(Ve),pe(ze),Us();break;case 5:Fs(n);break;case 4:Lr();break;case 13:pe(xe);break;case 19:pe(xe);break;case 10:Ts(n.type._context);break;case 22:case 23:yi()}r=r.return}if(Ee=e,je=e=Yt(e.current,null),Pe=et=t,Se=0,yn=null,di=yl=ir=0,He=vn=null,nr!==null){for(t=0;t<nr.length;t++)if(r=nr[t],n=r.interleaved,n!==null){r.interleaved=null;var l=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=l,n.next=a}r.pending=n}nr=null}return e}function hu(e,t){do{var r=je;try{if(zs(),al.current=dl,ol){for(var n=ye.memoizedState;n!==null;){var l=n.queue;l!==null&&(l.pending=null),n=n.next}ol=!1}if(sr=0,Ce=Ne=ye=null,fn=!1,mn=0,ci.current=null,r===null||r.return===null){Se=1,yn=t,je=null;break}e:{var i=e,a=r.return,o=r,u=t;if(t=Pe,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var g=u,j=o,N=j.tag;if((j.mode&1)===0&&(N===0||N===11||N===15)){var w=j.alternate;w?(j.updateQueue=w.updateQueue,j.memoizedState=w.memoizedState,j.lanes=w.lanes):(j.updateQueue=null,j.memoizedState=null)}var L=Uo(a);if(L!==null){L.flags&=-257,Bo(L,a,o,i,t),L.mode&1&&Ao(i,g,t),t=L,u=g;var T=t.updateQueue;if(T===null){var D=new Set;D.add(u),t.updateQueue=D}else T.add(u);break e}else{if((t&1)===0){Ao(i,g,t),vi();break e}u=Error(f(426))}}else if(ge&&o.mode&1){var we=Uo(a);if(we!==null){(we.flags&65536)===0&&(we.flags|=256),Bo(we,a,o,i,t),Ls(Mr(u,o));break e}}i=u=Mr(u,o),Se!==4&&(Se=2),vn===null?vn=[i]:vn.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=Io(i,u,t);uo(i,p);break e;case 1:o=u;var d=i.type,h=i.stateNode;if((i.flags&128)===0&&(typeof d.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Ht===null||!Ht.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=Fo(i,o,t);uo(i,S);break e}}i=i.return}while(i!==null)}yu(r)}catch(F){t=F,je===r&&r!==null&&(je=r=r.return);continue}break}while(!0)}function gu(){var e=xl.current;return xl.current=dl,e===null?dl:e}function vi(){(Se===0||Se===3||Se===2)&&(Se=4),Ee===null||(ir&268435455)===0&&(yl&268435455)===0||Gt(Ee,Pe)}function Sl(e,t){var r=re;re|=2;var n=gu();(Ee!==e||Pe!==t)&&(Mt=null,or(e,t));do try{kd();break}catch(l){hu(e,l)}while(!0);if(zs(),re=r,xl.current=n,je!==null)throw Error(f(261));return Ee=null,Pe=0,Se}function kd(){for(;je!==null;)xu(je)}function wd(){for(;je!==null&&!Qu();)xu(je)}function xu(e){var t=wu(e.alternate,e,et);e.memoizedProps=e.pendingProps,t===null?yu(e):je=t,ci.current=null}function yu(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=md(r,t,et),r!==null){je=r;return}}else{if(r=pd(r,t),r!==null){r.flags&=32767,je=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Se=6,je=null;return}}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Se===0&&(Se=5)}function ur(e,t,r){var n=ue,l=it.transition;try{it.transition=null,ue=1,jd(e,t,r,n)}finally{it.transition=l,ue=n}return null}function jd(e,t,r,n){do Dr();while(Qt!==null);if((re&6)!==0)throw Error(f(327));r=e.finishedWork;var l=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(f(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(rc(e,i),e===Ee&&(je=Ee=null,Pe=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||kl||(kl=!0,ju(bn,function(){return Dr(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=it.transition,it.transition=null;var a=ue;ue=1;var o=re;re|=4,ci.current=null,gd(e,r),ou(r,e),Vc(vs),Dn=!!ys,vs=ys=null,e.current=r,xd(r),Ku(),re=o,ue=a,it.transition=i}else e.current=r;if(kl&&(kl=!1,Qt=e,wl=l),i=e.pendingLanes,i===0&&(Ht=null),Xu(r.stateNode),Qe(e,ke()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)l=t[r],n(l.value,{componentStack:l.stack,digest:l.digest});if(vl)throw vl=!1,e=mi,mi=null,e;return(wl&1)!==0&&e.tag!==0&&Dr(),i=e.pendingLanes,(i&1)!==0?e===pi?kn++:(kn=0,pi=e):kn=0,Bt(),null}function Dr(){if(Qt!==null){var e=sa(wl),t=it.transition,r=ue;try{if(it.transition=null,ue=16>e?16:e,Qt===null)var n=!1;else{if(e=Qt,Qt=null,wl=0,(re&6)!==0)throw Error(f(331));var l=re;for(re|=4,z=e.current;z!==null;){var i=z,a=i.child;if((z.flags&16)!==0){var o=i.deletions;if(o!==null){for(var u=0;u<o.length;u++){var g=o[u];for(z=g;z!==null;){var j=z;switch(j.tag){case 0:case 11:case 15:xn(8,j,i)}var N=j.child;if(N!==null)N.return=j,z=N;else for(;z!==null;){j=z;var w=j.sibling,L=j.return;if(nu(j),j===g){z=null;break}if(w!==null){w.return=L,z=w;break}z=L}}}var T=i.alternate;if(T!==null){var D=T.child;if(D!==null){T.child=null;do{var we=D.sibling;D.sibling=null,D=we}while(D!==null)}}z=i}}if((i.subtreeFlags&2064)!==0&&a!==null)a.return=i,z=a;else e:for(;z!==null;){if(i=z,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:xn(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,z=p;break e}z=i.return}}var d=e.current;for(z=d;z!==null;){a=z;var h=a.child;if((a.subtreeFlags&2064)!==0&&h!==null)h.return=a,z=h;else e:for(a=d;z!==null;){if(o=z,(o.flags&2048)!==0)try{switch(o.tag){case 0:case 11:case 15:gl(9,o)}}catch(F){ve(o,o.return,F)}if(o===a){z=null;break e}var S=o.sibling;if(S!==null){S.return=o.return,z=S;break e}z=o.return}}if(re=l,Bt(),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(Pn,e)}catch{}n=!0}return n}finally{ue=r,it.transition=t}}return!1}function vu(e,t,r){t=Mr(r,t),t=Io(e,t,1),e=Wt(e,t,1),t=Ue(),e!==null&&(Wr(e,1,t),Qe(e,t))}function ve(e,t,r){if(e.tag===3)vu(e,e,r);else for(;t!==null;){if(t.tag===3){vu(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ht===null||!Ht.has(n))){e=Mr(r,e),e=Fo(t,e,1),t=Wt(t,e,1),e=Ue(),t!==null&&(Wr(t,1,e),Qe(t,e));break}}t=t.return}}function Nd(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ue(),e.pingedLanes|=e.suspendedLanes&r,Ee===e&&(Pe&r)===r&&(Se===4||Se===3&&(Pe&130023424)===Pe&&500>ke()-fi?or(e,0):di|=r),Qe(e,t)}function ku(e,t){t===0&&((e.mode&1)===0?t=1:(t=Mn,Mn<<=1,(Mn&130023424)===0&&(Mn=4194304)));var r=Ue();e=bt(e,t),e!==null&&(Wr(e,t,r),Qe(e,r))}function Sd(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),ku(e,r)}function Cd(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,l=e.memoizedState;l!==null&&(r=l.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(f(314))}n!==null&&n.delete(t),ku(e,r)}var wu;wu=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ve.current)$e=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return $e=!1,fd(e,t,r);$e=(e.flags&131072)!==0}else $e=!1,ge&&(t.flags&1048576)!==0&&qa(t,qn,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;pl(e,t),e=t.pendingProps;var l=Nr(t,ze.current);Pr(t,r),l=Ws(null,t,n,e,l,r);var i=$s();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,We(n)?(i=!0,Xn(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Os(t),l.updater=fl,t.stateNode=l,l._reactInternals=t,Xs(t,n,e,r),t=ei(null,t,n,!0,i,r)):(t.tag=0,ge&&i&&Es(t),Ae(null,t,l,r),t=t.child),t;case 16:n=t.elementType;e:{switch(pl(e,t),e=t.pendingProps,l=n._init,n=l(n._payload),t.type=n,l=t.tag=_d(n),e=mt(n,e),l){case 0:t=qs(null,t,n,e,r);break e;case 1:t=Ko(null,t,n,e,r);break e;case 11:t=Vo(null,t,n,e,r);break e;case 14:t=Wo(null,t,n,mt(n.type,e),r);break e}throw Error(f(306,n,""))}return t;case 0:return n=t.type,l=t.pendingProps,l=t.elementType===n?l:mt(n,l),qs(e,t,n,l,r);case 1:return n=t.type,l=t.pendingProps,l=t.elementType===n?l:mt(n,l),Ko(e,t,n,l,r);case 3:e:{if(Go(t),e===null)throw Error(f(387));n=t.pendingProps,i=t.memoizedState,l=i.element,oo(e,t),sl(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=Mr(Error(f(423)),t),t=Yo(e,t,n,r,l);break e}else if(n!==l){l=Mr(Error(f(424)),t),t=Yo(e,t,n,r,l);break e}else for(qe=Ft(t.stateNode.containerInfo.firstChild),Ze=t,ge=!0,ft=null,r=io(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Er(),n===l){t=Lt(e,t,r);break e}Ae(e,t,n,r)}t=t.child}return t;case 5:return fo(t),e===null&&Ps(t),n=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,a=l.children,ks(n,l)?a=null:i!==null&&ks(n,i)&&(t.flags|=32),Qo(e,t),Ae(e,t,a,r),t.child;case 6:return e===null&&Ps(t),null;case 13:return Xo(e,t,r);case 4:return Is(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=_r(t,null,n,r):Ae(e,t,n,r),t.child;case 11:return n=t.type,l=t.pendingProps,l=t.elementType===n?l:mt(n,l),Vo(e,t,n,l,r);case 7:return Ae(e,t,t.pendingProps,r),t.child;case 8:return Ae(e,t,t.pendingProps.children,r),t.child;case 12:return Ae(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,l=t.pendingProps,i=t.memoizedProps,a=l.value,de(rl,n._currentValue),n._currentValue=a,i!==null)if(dt(i.value,a)){if(i.children===l.children&&!Ve.current){t=Lt(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){a=i.child;for(var u=o.firstContext;u!==null;){if(u.context===n){if(i.tag===1){u=Pt(-1,r&-r),u.tag=2;var g=i.updateQueue;if(g!==null){g=g.shared;var j=g.pending;j===null?u.next=u:(u.next=j.next,j.next=u),g.pending=u}}i.lanes|=r,u=i.alternate,u!==null&&(u.lanes|=r),Rs(i.return,r,t),o.lanes|=r;break}u=u.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(f(341));a.lanes|=r,o=a.alternate,o!==null&&(o.lanes|=r),Rs(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ae(e,t,l.children,r),t=t.child}return t;case 9:return l=t.type,n=t.pendingProps.children,Pr(t,r),l=lt(l),n=n(l),t.flags|=1,Ae(e,t,n,r),t.child;case 14:return n=t.type,l=mt(n,t.pendingProps),l=mt(n.type,l),Wo(e,t,n,l,r);case 15:return $o(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,l=t.pendingProps,l=t.elementType===n?l:mt(n,l),pl(e,t),t.tag=1,We(n)?(e=!0,Xn(t)):e=!1,Pr(t,r),Do(t,n,l),Xs(t,n,l,r),ei(null,t,n,!0,e,r);case 19:return Zo(e,t,r);case 22:return Ho(e,t,r)}throw Error(f(156,t.tag))};function ju(e,t){return ea(e,t)}function Ed(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function at(e,t,r,n){return new Ed(e,t,r,n)}function ki(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _d(e){if(typeof e=="function")return ki(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ie)return 11;if(e===tt)return 14}return 2}function Yt(e,t){var r=e.alternate;return r===null?(r=at(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Cl(e,t,r,n,l,i){var a=2;if(n=e,typeof e=="function")ki(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Le:return cr(r.children,l,i,t);case Be:a=8,l|=8;break;case xt:return e=at(12,r,t,l|2),e.elementType=xt,e.lanes=i,e;case Fe:return e=at(13,r,t,l),e.elementType=Fe,e.lanes=i,e;case Ye:return e=at(19,r,t,l),e.elementType=Ye,e.lanes=i,e;case fe:return El(r,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ut:a=10;break e;case Nt:a=9;break e;case Ie:a=11;break e;case tt:a=14;break e;case Me:a=16,n=null;break e}throw Error(f(130,e==null?e:typeof e,""))}return t=at(a,r,t,l),t.elementType=e,t.type=n,t.lanes=i,t}function cr(e,t,r,n){return e=at(7,e,n,t),e.lanes=r,e}function El(e,t,r,n){return e=at(22,e,n,t),e.elementType=fe,e.lanes=r,e.stateNode={isHidden:!1},e}function wi(e,t,r){return e=at(6,e,null,t),e.lanes=r,e}function ji(e,t,r){return t=at(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bd(e,t,r,n,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yl(0),this.expirationTimes=Yl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yl(0),this.identifierPrefix=n,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ni(e,t,r,n,l,i,a,o,u){return e=new bd(e,t,r,o,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=at(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Os(i),e}function Pd(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ae,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Nu(e){if(!e)return Ut;e=e._reactInternals;e:{if(Zt(e)!==e||e.tag!==1)throw Error(f(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(We(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(f(171))}if(e.tag===1){var r=e.type;if(We(r))return Xa(e,r,t)}return t}function Su(e,t,r,n,l,i,a,o,u){return e=Ni(r,n,!0,e,l,i,a,o,u),e.context=Nu(null),r=e.current,n=Ue(),l=Kt(r),i=Pt(n,l),i.callback=t??null,Wt(r,i,l),e.current.lanes=l,Wr(e,l,n),Qe(e,n),e}function _l(e,t,r,n){var l=t.current,i=Ue(),a=Kt(l);return r=Nu(r),t.context===null?t.context=r:t.pendingContext=r,t=Pt(i,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Wt(l,t,a),e!==null&&(gt(e,l,a,i),ll(e,l,a)),a}function bl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Cu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Si(e,t){Cu(e,t),(e=e.alternate)&&Cu(e,t)}function Ld(){return null}var Eu=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ci(e){this._internalRoot=e}Pl.prototype.render=Ci.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(f(409));_l(e,t,null,null)},Pl.prototype.unmount=Ci.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ar(function(){_l(null,e,null,null)}),t[St]=null}};function Pl(e){this._internalRoot=e}Pl.prototype.unstable_scheduleHydration=function(e){if(e){var t=oa();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Dt.length&&t!==0&&t<Dt[r].priority;r++);Dt.splice(r,0,e),r===0&&da(e)}};function Ei(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ll(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function _u(){}function Md(e,t,r,n,l){if(l){if(typeof n=="function"){var i=n;n=function(){var g=bl(a);i.call(g)}}var a=Su(t,n,e,0,null,!1,!1,"",_u);return e._reactRootContainer=a,e[St]=a.current,nn(e.nodeType===8?e.parentNode:e),ar(),a}for(;l=e.lastChild;)e.removeChild(l);if(typeof n=="function"){var o=n;n=function(){var g=bl(u);o.call(g)}}var u=Ni(e,0,!1,null,null,!1,!1,"",_u);return e._reactRootContainer=u,e[St]=u.current,nn(e.nodeType===8?e.parentNode:e),ar(function(){_l(t,u,r,n)}),u}function Ml(e,t,r,n,l){var i=r._reactRootContainer;if(i){var a=i;if(typeof l=="function"){var o=l;l=function(){var u=bl(a);o.call(u)}}_l(t,a,e,l)}else a=Md(r,t,e,l,n);return bl(a)}ia=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Vr(t.pendingLanes);r!==0&&(Xl(t,r|1),Qe(t,ke()),(re&6)===0&&(Rr=ke()+500,Bt()))}break;case 13:ar(function(){var n=bt(e,1);if(n!==null){var l=Ue();gt(n,e,1,l)}}),Si(e,1)}},Jl=function(e){if(e.tag===13){var t=bt(e,134217728);if(t!==null){var r=Ue();gt(t,e,134217728,r)}Si(e,134217728)}},aa=function(e){if(e.tag===13){var t=Kt(e),r=bt(e,t);if(r!==null){var n=Ue();gt(r,e,t,n)}Si(e,t)}},oa=function(){return ue},ua=function(e,t){var r=ue;try{return ue=e,t()}finally{ue=r}},Wl=function(e,t,r){switch(t){case"input":if(Dl(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var l=Gn(n);if(!l)throw Error(f(90));Ti(n),Dl(n,l)}}}break;case"textarea":Fi(e,r);break;case"select":t=r.value,t!=null&&dr(e,!!r.multiple,t,!1)}},Ki=xi,Gi=ar;var zd={usingClientEntryPoint:!1,Events:[an,wr,Gn,Hi,Qi,xi]},wn={findFiberByHostInstance:qt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Td={bundleType:wn.bundleType,version:wn.version,rendererPackageName:wn.rendererPackageName,rendererConfig:wn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:B.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Zi(e),e===null?null:e.stateNode},findFiberByHostInstance:wn.findFiberByHostInstance||Ld,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zl.isDisabled&&zl.supportsFiber)try{Pn=zl.inject(Td),yt=zl}catch{}}return Ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zd,Ke.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ei(t))throw Error(f(200));return Pd(e,t,null,r)},Ke.createRoot=function(e,t){if(!Ei(e))throw Error(f(299));var r=!1,n="",l=Eu;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Ni(e,1,!1,null,null,r,!1,n,l),e[St]=t.current,nn(e.nodeType===8?e.parentNode:e),new Ci(t)},Ke.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(f(188)):(e=Object.keys(e).join(","),Error(f(268,e)));return e=Zi(t),e=e===null?null:e.stateNode,e},Ke.flushSync=function(e){return ar(e)},Ke.hydrate=function(e,t,r){if(!Ll(t))throw Error(f(200));return Ml(null,e,t,!0,r)},Ke.hydrateRoot=function(e,t,r){if(!Ei(e))throw Error(f(405));var n=r!=null&&r.hydratedSources||null,l=!1,i="",a=Eu;if(r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=Su(t,null,e,1,r??null,l,!1,i,a),e[St]=t.current,nn(e),n)for(e=0;e<n.length;e++)r=n[e],l=r._getVersion,l=l(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,l]:t.mutableSourceEagerHydrationData.push(r,l);return new Pl(t)},Ke.render=function(e,t,r){if(!Ll(t))throw Error(f(200));return Ml(null,e,t,!1,r)},Ke.unmountComponentAtNode=function(e){if(!Ll(e))throw Error(f(40));return e._reactRootContainer?(ar(function(){Ml(null,null,e,!1,function(){e._reactRootContainer=null,e[St]=null})}),!0):!1},Ke.unstable_batchedUpdates=xi,Ke.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Ll(r))throw Error(f(200));if(e==null||e._reactInternals===void 0)throw Error(f(38));return Ml(e,t,r,!1,n)},Ke.version="18.3.1-next-f1338f8080-20240426",Ke}var Du;function Vd(){if(Du)return Pi.exports;Du=1;function m(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m)}catch(k){console.error(k)}}return m(),Pi.exports=Bd(),Pi.exports}var Ou;function Wd(){if(Ou)return Tl;Ou=1;var m=Vd();return Tl.createRoot=m.createRoot,Tl.hydrateRoot=m.hydrateRoot,Tl}var $d=Wd();const Hd=Fu($d),ot="/api",Ge={async getStatus(){const m=await fetch(`${ot}/status`);if(!m.ok)throw new Error("Failed to fetch status");return m.json()},async getMemories(m={}){const k=new URLSearchParams(m).toString(),f=await fetch(`${ot}/memories${k?`?${k}`:""}`);if(!f.ok)throw new Error("Failed to fetch memories");return f.json()},async getMemory(m){const k=await fetch(`${ot}/memories/${m}`);if(!k.ok)throw new Error("Failed to fetch memory");return k.json()},async createMemory(m){const k=await fetch(`${ot}/memories`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)});if(!k.ok)throw new Error("Failed to create memory");return k.json()},async searchMemories(m,k={}){const f=await fetch(`${ot}/memories/search`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:m,...k})});if(!f.ok)throw new Error("Failed to search memories");return f.json()},async deleteMemory(m){const k=await fetch(`${ot}/memories/${m}`,{method:"DELETE"});if(!k.ok)throw new Error("Failed to delete memory");return k.json()},async consolidate(m={}){const k=await fetch(`${ot}/consolidate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(m)});if(!k.ok)throw new Error("Failed to consolidate");return k.json()},async getConflicts(){const m=await fetch(`${ot}/conflicts`);if(!m.ok)throw new Error("Failed to fetch conflicts");return m.json()},async getHealth(){const m=await fetch("/health");if(!m.ok)throw new Error("Failed to fetch health");return m.json()},async getInstallationInfo(){const m=await fetch(`${ot}/installation-info`);if(!m.ok)throw new Error("Failed to fetch installation info");return m.json()},async getImportSources(m){const k=new URLSearchParams;m&&m.length>0&&k.set("paths",m.join(","));const f=k.toString(),U=await fetch(`${ot}/import/sources${f?`?${f}`:""}`);if(!U.ok)throw new Error("Failed to fetch import sources");return U.json()},async scanImportSources(m,k){const f={sources:m};k&&k.length>0&&(f.paths=k);const U=await fetch(`${ot}/import/scan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f)});if(!U.ok)throw new Error("Failed to scan import sources");return U.json()},async commitImport(m,k){const f=await fetch(`${ot}/import/commit`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({memories:m,namespace:k})});if(!f.ok)throw new Error("Failed to commit import");return f.json()}};function Qd(){var Q,E,O,H,G,b,q,ie,P,I,Z,M;const[m,k]=V.useState(null),[f,U]=V.useState(!0),[A,R]=V.useState(null);V.useEffect(()=>{X()},[]);async function X(){try{U(!0);const C=await Ge.getStatus();k(C),R(null)}catch(C){R(C.message)}finally{U(!1)}}return f?s.jsx("div",{className:"flex justify-center items-center h-64",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):A?s.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:[s.jsxs("p",{className:"text-red-800 dark:text-red-200",children:["Error: ",A]}),s.jsx("button",{onClick:X,className:"mt-2 text-sm text-red-600 dark:text-red-400 hover:underline",children:"Retry"})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:"Welcome to Engram"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Persistent memory for AI agents - SQLite for agent state"})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-4",children:[s.jsx("div",{className:"bg-white dark:bg-gray-800 overflow-hidden shadow rounded-lg",children:s.jsx("div",{className:"p-5",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx("svg",{className:"h-6 w-6 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 7v10a2 2 0 002 2h14a 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})})}),s.jsx("div",{className:"ml-5 w-0 flex-1",children:s.jsxs("dl",{children:[s.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate",children:"Total Memories"}),s.jsx("dd",{className:"text-2xl font-semibold text-gray-900 dark:text-white",children:((Q=m==null?void 0:m.memory)==null?void 0:Q.total)||0})]})})]})})}),s.jsx("div",{className:"bg-white dark:bg-gray-800 overflow-hidden shadow rounded-lg",children:s.jsx("div",{className:"p-5",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx("svg",{className:"h-6 w-6 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),s.jsx("div",{className:"ml-5 w-0 flex-1",children:s.jsxs("dl",{children:[s.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate",children:"With Embeddings"}),s.jsx("dd",{className:"text-2xl font-semibold text-gray-900 dark:text-white",children:((E=m==null?void 0:m.memory)==null?void 0:E.withEmbeddings)||0})]})})]})})}),s.jsx("div",{className:"bg-white dark:bg-gray-800 overflow-hidden shadow rounded-lg",children:s.jsx("div",{className:"p-5",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx("svg",{className:"h-6 w-6 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"})})}),s.jsx("div",{className:"ml-5 w-0 flex-1",children:s.jsxs("dl",{children:[s.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate",children:"Categories"}),s.jsx("dd",{className:"text-2xl font-semibold text-gray-900 dark:text-white",children:Object.keys(((O=m==null?void 0:m.memory)==null?void 0:O.byCategory)||{}).length})]})})]})})}),s.jsx("div",{className:"bg-white dark:bg-gray-800 overflow-hidden shadow rounded-lg",children:s.jsx("div",{className:"p-5",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx("svg",{className:"h-6 w-6 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"})})}),s.jsx("div",{className:"ml-5 w-0 flex-1",children:s.jsxs("dl",{children:[s.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate",children:"Namespaces"}),s.jsx("dd",{className:"text-2xl font-semibold text-gray-900 dark:text-white",children:Object.keys(((H=m==null?void 0:m.memory)==null?void 0:H.byNamespace)||{}).length})]})})]})})})]}),s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"Embedding Model"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Name"}),s.jsx("p",{className:"text-base font-medium text-gray-900 dark:text-white",children:((G=m==null?void 0:m.model)==null?void 0:G.name)||"Unknown"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Status"}),s.jsx("p",{className:"text-base font-medium",children:(b=m==null?void 0:m.model)!=null&&b.available?s.jsx("span",{className:"text-green-600 dark:text-green-400",children:"Available"}):s.jsx("span",{className:"text-yellow-600 dark:text-yellow-400",children:"Not Available"})})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Cached"}),s.jsx("p",{className:"text-base font-medium text-gray-900 dark:text-white",children:(q=m==null?void 0:m.model)!=null&&q.cached?"Yes":"No"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Size"}),s.jsxs("p",{className:"text-base font-medium text-gray-900 dark:text-white",children:[((ie=m==null?void 0:m.model)==null?void 0:ie.size)||0," MB"]})]})]})]}),s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"Configuration"}),s.jsxs("dl",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[s.jsxs("div",{children:[s.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"Data Directory"}),s.jsx("dd",{className:"mt-1 text-sm text-gray-900 dark:text-white font-mono",children:(P=m==null?void 0:m.config)==null?void 0:P.dataDir})]}),s.jsxs("div",{children:[s.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"Default Namespace"}),s.jsx("dd",{className:"mt-1 text-sm text-gray-900 dark:text-white",children:(I=m==null?void 0:m.config)==null?void 0:I.defaultNamespace})]}),s.jsxs("div",{children:[s.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"Recall Limit"}),s.jsx("dd",{className:"mt-1 text-sm text-gray-900 dark:text-white",children:(Z=m==null?void 0:m.config)==null?void 0:Z.recallLimit})]}),s.jsxs("div",{children:[s.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"Secret Detection"}),s.jsx("dd",{className:"mt-1 text-sm text-gray-900 dark:text-white",children:(M=m==null?void 0:m.config)!=null&&M.secretDetection?s.jsx("span",{className:"text-green-600 dark:text-green-400",children:"Enabled"}):s.jsx("span",{className:"text-red-600 dark:text-red-400",children:"Disabled"})})]})]})]})]})}function Kd({onClose:m,onSuccess:k}){const[f,U]=V.useState({content:"",category:"fact",entity:"",confidence:.8,namespace:"default",tags:""}),[A,R]=V.useState(!1),[X,Q]=V.useState(null);async function E(O){if(O.preventDefault(),!f.content.trim()){Q("Content is required");return}try{R(!0),Q(null);const H={content:f.content,category:f.category,confidence:parseFloat(f.confidence),namespace:f.namespace};f.entity.trim()&&(H.entity=f.entity.trim()),f.tags.trim()&&(H.tags=f.tags.split(",").map(G=>G.trim()).filter(G=>G)),await Ge.createMemory(H),k()}catch(H){Q(H.message)}finally{R(!1)}}return s.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 flex items-center justify-center p-4 z-50",children:s.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:"Create New Memory"}),s.jsx("button",{onClick:m,className:"text-gray-400 hover:text-gray-500 dark:hover:text-gray-300",children:s.jsx("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]}),X&&s.jsx("div",{className:"mb-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-3",children:s.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:X})}),s.jsxs("form",{onSubmit:E,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Content *"}),s.jsx("textarea",{value:f.content,onChange:O=>U({...f,content:O.target.value}),rows:"4",placeholder:"Enter the memory content...",className:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Category"}),s.jsxs("select",{value:f.category,onChange:O=>U({...f,category:O.target.value}),className:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500",children:[s.jsx("option",{value:"fact",children:"Fact"}),s.jsx("option",{value:"preference",children:"Preference"}),s.jsx("option",{value:"pattern",children:"Pattern"}),s.jsx("option",{value:"decision",children:"Decision"}),s.jsx("option",{value:"outcome",children:"Outcome"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Entity (optional)"}),s.jsx("input",{type:"text",value:f.entity,onChange:O=>U({...f,entity:O.target.value}),placeholder:"e.g., docker, deployment",className:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500"}),s.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"Auto-detected if not provided"})]})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Confidence"}),s.jsx("input",{type:"number",min:"0",max:"1",step:"0.1",value:f.confidence,onChange:O=>U({...f,confidence:O.target.value}),className:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500"}),s.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"0.0 to 1.0 (default: 0.8)"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Namespace"}),s.jsx("input",{type:"text",value:f.namespace,onChange:O=>U({...f,namespace:O.target.value}),placeholder:"default",className:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500"}),s.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"Project or scope name"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Tags (optional)"}),s.jsx("input",{type:"text",value:f.tags,onChange:O=>U({...f,tags:O.target.value}),placeholder:"tag1, tag2, tag3",className:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500"}),s.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:"Comma-separated tags"})]}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-4",children:[s.jsx("button",{type:"button",onClick:m,className:"px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500",children:"Cancel"}),s.jsx("button",{type:"submit",disabled:A,className:"px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed",children:A?"Creating...":"Create Memory"})]})]})]})})})}function Gd(){const[m,k]=V.useState([]),[f,U]=V.useState(!0),[A,R]=V.useState(null),[X,Q]=V.useState(!1),[E,O]=V.useState({namespace:"",category:"",limit:20,offset:0}),[H,G]=V.useState(0);V.useEffect(()=>{b()},[E]);async function b(){var P,I;try{U(!0);const Z={};E.namespace&&(Z.namespace=E.namespace),E.category&&(Z.category=E.category),Z.limit=E.limit,Z.offset=E.offset;const M=await Ge.getMemories(Z);k(M.memories||[]),G(((P=M.pagination)==null?void 0:P.total)??((I=M.memories)==null?void 0:I.length)??0),R(null)}catch(Z){R(Z.message)}finally{U(!1)}}async function q(P){if(confirm("Are you sure you want to delete this memory?"))try{await Ge.deleteMemory(P),b()}catch(I){alert(`Failed to delete: ${I.message}`)}}function ie(P){return{preference:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200",fact:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",pattern:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",decision:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",outcome:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}[P]||"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-200"}return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Memories"}),s.jsxs("button",{onClick:()=>Q(!0),className:"inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500",children:[s.jsx("svg",{className:"h-5 w-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 4v16m8-8H4"})}),"New Memory"]})]}),s.jsx("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-4",children:s.jsxs("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Namespace"}),s.jsx("input",{type:"text",value:E.namespace,onChange:P=>O({...E,namespace:P.target.value,offset:0}),placeholder:"Filter by namespace",className:"w-full px-3 py-2 border rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500 focus:outline-none"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Category"}),s.jsxs("select",{value:E.category,onChange:P=>O({...E,category:P.target.value,offset:0}),className:"w-full px-3 py-2 border rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500 focus:outline-none",children:[s.jsx("option",{value:"",children:"All Categories"}),s.jsx("option",{value:"preference",children:"Preference"}),s.jsx("option",{value:"fact",children:"Fact"}),s.jsx("option",{value:"pattern",children:"Pattern"}),s.jsx("option",{value:"decision",children:"Decision"}),s.jsx("option",{value:"outcome",children:"Outcome"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Limit"}),s.jsxs("select",{value:E.limit,onChange:P=>O({...E,limit:parseInt(P.target.value),offset:0}),className:"w-full px-3 py-2 border rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500 focus:outline-none",children:[s.jsx("option",{value:"10",children:"10"}),s.jsx("option",{value:"25",children:"25"}),s.jsx("option",{value:"50",children:"50"}),s.jsx("option",{value:"100",children:"100"})]})]})]})}),f?s.jsx("div",{className:"flex justify-center items-center h-64",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):A?s.jsx("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:s.jsxs("p",{className:"text-red-800 dark:text-red-200",children:["Error: ",A]})}):m.length===0?s.jsxs("div",{className:"text-center py-12 bg-white dark:bg-gray-800 rounded-lg shadow",children:[s.jsx("svg",{className:"mx-auto h-12 w-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4"})}),s.jsx("h3",{className:"mt-2 text-sm font-medium text-gray-900 dark:text-white",children:"No memories found"}),s.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:"Get started by creating a new memory."}),s.jsx("div",{className:"mt-6",children:s.jsxs("button",{onClick:()=>Q(!0),className:"inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary-600 hover:bg-primary-700",children:[s.jsx("svg",{className:"h-5 w-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 4v16m8-8H4"})}),"New Memory"]})})]}):s.jsx("div",{className:"bg-white dark:bg-gray-800 shadow overflow-hidden rounded-lg",children:s.jsx("ul",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:m.map(P=>s.jsx("li",{className:"p-6 hover:bg-gray-50 dark:hover:bg-gray-700/50",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:P.content}),s.jsxs("div",{className:"mt-2 flex items-center space-x-4",children:[s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${ie(P.category)}`,children:P.category}),P.entity&&s.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Entity: ",P.entity]}),s.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Confidence: ",(P.confidence*100).toFixed(0),"%"]}),s.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Accessed: ",P.accessCount,"x"]})]}),P.tags&&P.tags.length>0&&s.jsx("div",{className:"mt-2 flex items-center space-x-2",children:P.tags.map((I,Z)=>s.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200",children:I},Z))}),s.jsxs("p",{className:"mt-2 text-xs text-gray-500 dark:text-gray-400",children:["Namespace: ",P.namespace," | ID: ",P.id.substring(0,8)]})]}),s.jsx("button",{onClick:()=>q(P.id),className:"ml-4 flex-shrink-0 text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300",children:s.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})},P.id))})}),H>E.limit&&(()=>{const P=Math.ceil(H/E.limit),I=Math.floor(E.offset/E.limit);return s.jsxs("div",{className:"flex items-center justify-between mt-4",children:[s.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Showing ",E.offset+1,"β",Math.min(E.offset+E.limit,H)," of ",H]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:()=>O(Z=>({...Z,offset:Math.max(0,Z.offset-Z.limit)})),disabled:I===0,className:"px-3 py-1.5 text-sm font-medium rounded-md border border-gray-300 dark:border-gray-600 disabled:opacity-30 disabled:cursor-not-allowed hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:"Previous"}),Array.from({length:Math.min(P,I+3)-Math.max(0,I-2)},(Z,M)=>{const C=Math.max(0,I-2)+M;return s.jsx("button",{onClick:()=>O(B=>({...B,offset:C*B.limit})),className:`w-8 h-8 text-sm font-medium rounded-md transition-colors ${I===C?"bg-primary-100 text-primary-700 dark:bg-primary-900 dark:text-primary-300":"hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300"}`,children:C+1},C)}),I+3<P&&s.jsx("span",{className:"px-1 text-sm text-gray-400",children:"..."}),s.jsx("button",{onClick:()=>O(Z=>({...Z,offset:Math.min((P-1)*Z.limit,Z.offset+Z.limit)})),disabled:I>=P-1,className:"px-3 py-1.5 text-sm font-medium rounded-md border border-gray-300 dark:border-gray-600 disabled:opacity-30 disabled:cursor-not-allowed hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:"Next"})]})]})})(),X&&s.jsx(Kd,{onClose:()=>Q(!1),onSuccess:()=>{Q(!1),b()}})]})}function Yd(){const[m,k]=V.useState(""),[f,U]=V.useState([]),[A,R]=V.useState(!1),[X,Q]=V.useState(null),[E,O]=V.useState({limit:5,threshold:.3});async function H(b){if(b.preventDefault(),!!m.trim())try{R(!0),Q(null);const q=await Ge.searchMemories(m,E);U(q.memories||[])}catch(q){Q(q.message)}finally{R(!1)}}function G(b){return{preference:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200",fact:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",pattern:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",decision:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",outcome:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"}[b]||"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-200"}return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Search Memories"}),s.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:"Use hybrid search to find relevant memories based on semantic similarity, recency, and confidence."})]}),s.jsx("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:s.jsxs("form",{onSubmit:H,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Search Query"}),s.jsx("input",{type:"text",value:m,onChange:b=>k(b.target.value),placeholder:"What do you want to remember?",className:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500 text-lg p-3"})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Max Results"}),s.jsxs("select",{value:E.limit,onChange:b=>O({...E,limit:parseInt(b.target.value)}),className:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500",children:[s.jsx("option",{value:"3",children:"3"}),s.jsx("option",{value:"5",children:"5"}),s.jsx("option",{value:"10",children:"10"}),s.jsx("option",{value:"20",children:"20"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Threshold"}),s.jsxs("select",{value:E.threshold,onChange:b=>O({...E,threshold:parseFloat(b.target.value)}),className:"w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-primary-500 focus:ring-primary-500",children:[s.jsx("option",{value:"0.1",children:"0.1 (Low)"}),s.jsx("option",{value:"0.3",children:"0.3 (Medium)"}),s.jsx("option",{value:"0.5",children:"0.5 (High)"}),s.jsx("option",{value:"0.7",children:"0.7 (Very High)"})]})]})]}),s.jsx("button",{type:"submit",disabled:A||!m.trim(),className:"w-full inline-flex justify-center items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed",children:A?s.jsxs(s.Fragment,{children:[s.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Searching..."]}):s.jsxs(s.Fragment,{children:[s.jsx("svg",{className:"h-5 w-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),"Search"]})})]})}),X&&s.jsx("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:s.jsxs("p",{className:"text-red-800 dark:text-red-200",children:["Error: ",X]})}),f.length>0&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:["Found ",f.length," result",f.length!==1?"s":""]}),s.jsx("div",{className:"bg-white dark:bg-gray-800 shadow overflow-hidden rounded-lg",children:s.jsx("ul",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:f.map((b,q)=>s.jsx("li",{className:"p-6",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsxs("div",{className:"flex items-center justify-center h-10 w-10 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-600 dark:text-primary-400 font-bold",children:["#",q+1]})}),s.jsxs("div",{className:"ml-4 flex-1",children:[s.jsx("p",{className:"text-base font-medium text-gray-900 dark:text-white",children:b.content}),s.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-3",children:[s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${G(b.category)}`,children:b.category}),b.entity&&s.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Entity: ",b.entity]}),s.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Score: ",b.score.toFixed(3)]}),s.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Confidence: ",(b.confidence*100).toFixed(0),"%"]})]}),b.scoreBreakdown&&s.jsxs("div",{className:"mt-3 p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg",children:[s.jsx("p",{className:"text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Score Breakdown:"}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-5 gap-2 text-xs",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"Similarity:"}),s.jsx("span",{className:"ml-1 font-medium text-gray-900 dark:text-white",children:b.scoreBreakdown.similarity.toFixed(3)})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"Recency:"}),s.jsx("span",{className:"ml-1 font-medium text-gray-900 dark:text-white",children:b.scoreBreakdown.recency.toFixed(3)})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"Confidence:"}),s.jsx("span",{className:"ml-1 font-medium text-gray-900 dark:text-white",children:b.scoreBreakdown.confidence.toFixed(3)})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"Access:"}),s.jsx("span",{className:"ml-1 font-medium text-gray-900 dark:text-white",children:b.scoreBreakdown.access.toFixed(3)})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"FTS Boost:"}),s.jsx("span",{className:"ml-1 font-medium text-gray-900 dark:text-white",children:b.scoreBreakdown.ftsBoost.toFixed(3)})]})]})]}),s.jsxs("p",{className:"mt-2 text-xs text-gray-500 dark:text-gray-400",children:["Namespace: ",b.namespace," | Accessed: ",b.accessCount,"x | ID: ",b.id.substring(0,8)]})]})]})},b.id))})})]}),!A&&!X&&f.length===0&&m&&s.jsxs("div",{className:"text-center py-12 bg-white dark:bg-gray-800 rounded-lg shadow",children:[s.jsx("svg",{className:"mx-auto h-12 w-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsx("h3",{className:"mt-2 text-sm font-medium text-gray-900 dark:text-white",children:"No results found"}),s.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:"Try adjusting your search query or threshold."})]})]})}function Xd(){var ie,P,I,Z,M;const[m,k]=V.useState(null),[f,U]=V.useState([]),[A,R]=V.useState(!0),[X,Q]=V.useState(!1),[E,O]=V.useState(null);V.useEffect(()=>{H()},[]);async function H(){try{R(!0);const[C,B]=await Promise.all([Ge.getStatus(),Ge.getConflicts()]);k(C),U(B.conflicts||[]),O(null)}catch(C){O(C.message)}finally{R(!1)}}async function G(){if(confirm("Run memory consolidation? This will detect duplicates, apply decay, and find contradictions."))try{Q(!0);const C=await Ge.consolidate({detectDuplicates:!0,detectContradictions:!0,applyDecay:!0,cleanupStale:!1});alert(`Consolidation complete!
|
|
41
|
+
|
|
42
|
+
Duplicates removed: ${C.results.duplicatesRemoved}
|
|
43
|
+
Contradictions detected: ${C.results.contradictionsDetected}
|
|
44
|
+
Memories decayed: ${C.results.memoriesDecayed}
|
|
45
|
+
Duration: ${C.results.duration}ms`),H()}catch(C){alert(`Consolidation failed: ${C.message}`)}finally{Q(!1)}}if(A)return s.jsx("div",{className:"flex justify-center items-center h-64",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});if(E)return s.jsx("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:s.jsxs("p",{className:"text-red-800 dark:text-red-200",children:["Error: ",E]})});const b=((ie=m==null?void 0:m.memory)==null?void 0:ie.byCategory)||{},q=((P=m==null?void 0:m.memory)==null?void 0:P.byNamespace)||{};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Statistics & Management"}),s.jsx("button",{onClick:G,disabled:X,className:"inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed",children:X?s.jsxs(s.Fragment,{children:[s.jsxs("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",fill:"none",viewBox:"0 0 24 24",children:[s.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Consolidating..."]}):s.jsxs(s.Fragment,{children:[s.jsx("svg",{className:"h-5 w-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Run Consolidation"]})})]}),s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"Memories by Category"}),Object.keys(b).length===0?s.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No memories yet"}):s.jsx("div",{className:"space-y-3",children:Object.entries(b).map(([C,B])=>{const J=m.memory.total,ae=(B/J*100).toFixed(1);return s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between items-center mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 capitalize",children:C}),s.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[B," (",ae,"%)"]})]}),s.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2",children:s.jsx("div",{className:"bg-primary-600 dark:bg-primary-500 h-2 rounded-full",style:{width:`${ae}%`}})})]},C)})})]}),s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"Memories by Namespace"}),Object.keys(q).length===0?s.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No memories yet"}):s.jsx("div",{className:"space-y-3",children:Object.entries(q).map(([C,B])=>{const J=m.memory.total,ae=(B/J*100).toFixed(1);return s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between items-center mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:C}),s.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[B," (",ae,"%)"]})]}),s.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2",children:s.jsx("div",{className:"bg-green-600 dark:bg-green-500 h-2 rounded-full",style:{width:`${ae}%`}})})]},C)})})]}),s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"Detected Conflicts"}),f.length===0?s.jsxs("div",{className:"text-center py-6",children:[s.jsx("svg",{className:"mx-auto h-12 w-12 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsx("p",{className:"mt-2 text-sm text-gray-600 dark:text-gray-400",children:"No conflicts detected"})]}):s.jsx("div",{className:"space-y-4",children:f.map((C,B)=>s.jsxs("div",{className:"border border-yellow-200 dark:border-yellow-800 rounded-lg p-4 bg-yellow-50 dark:bg-yellow-900/20",children:[s.jsxs("h4",{className:"text-sm font-medium text-yellow-900 dark:text-yellow-200 mb-2",children:["Conflict #",B+1]}),s.jsx("div",{className:"space-y-2",children:C.memories.map((J,ae)=>s.jsxs("div",{className:"flex items-start",children:[s.jsx("span",{className:"flex-shrink-0 inline-flex items-center justify-center h-6 w-6 rounded-full bg-yellow-600 text-white text-xs font-medium",children:String.fromCharCode(65+ae)}),s.jsxs("p",{className:"ml-3 text-sm text-gray-700 dark:text-gray-300",children:[J.content,s.jsxs("span",{className:"ml-2 text-xs text-gray-500 dark:text-gray-400",children:["(confidence: ",(J.confidence*100).toFixed(0),"%)"]})]})]},J.id))})]},C.conflictId))})]}),s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"System Health"}),s.jsxs("dl",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3",children:[s.jsxs("div",{className:"px-4 py-5 bg-gray-50 dark:bg-gray-700/50 shadow rounded-lg overflow-hidden",children:[s.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate",children:"Total Memories"}),s.jsx("dd",{className:"mt-1 text-3xl font-semibold text-gray-900 dark:text-white",children:((I=m==null?void 0:m.memory)==null?void 0:I.total)||0})]}),s.jsxs("div",{className:"px-4 py-5 bg-gray-50 dark:bg-gray-700/50 shadow rounded-lg overflow-hidden",children:[s.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate",children:"With Embeddings"}),s.jsx("dd",{className:"mt-1 text-3xl font-semibold text-gray-900 dark:text-white",children:((Z=m==null?void 0:m.memory)==null?void 0:Z.withEmbeddings)||0})]}),s.jsxs("div",{className:"px-4 py-5 bg-gray-50 dark:bg-gray-700/50 shadow rounded-lg overflow-hidden",children:[s.jsx("dt",{className:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate",children:"Coverage"}),s.jsxs("dd",{className:"mt-1 text-3xl font-semibold text-gray-900 dark:text-white",children:[((M=m==null?void 0:m.memory)==null?void 0:M.total)>0?(m.memory.withEmbeddings/m.memory.total*100).toFixed(0):0,"%"]})]})]})]})]})}const Jt={CLAUDE_DESKTOP:"claude-desktop",CLAUDE_CODE:"claude-code",CLINE:"cline",CUSTOM:"custom"},Jd=(m,k,f="darwin")=>({[Jt.CLAUDE_DESKTOP]:{name:"Claude Desktop",icon:"π¬",configPath:f==="darwin"?"~/Library/Application Support/Claude/claude_desktop_config.json":f==="win32"?"%APPDATA%/Claude/claude_desktop_config.json":"~/.config/Claude/claude_desktop_config.json",instructions:["Open or create the config file at the path shown above (create it if it doesn't exist yet)",'Paste the entire configuration below into the file (or merge the "mcpServers" section if the file already has content)',"Restart Claude Desktop application",`Test by asking Claude: "What is Engram's status?"`],config:{mcpServers:{engram:{command:"node",args:[k,"start","--mcp-only"]}}}},[Jt.CLAUDE_CODE]:{name:"Claude Code",icon:"β¨οΈ",configPath:"~/.claude/mcp.json",instructions:["Open or create the file ~/.claude/mcp.json (create it if it doesn't exist yet)",'Paste the entire configuration below into the file (or merge the "mcpServers" section if the file already has content)',"Restart Claude Code","Test by using the engram_status tool"],config:{mcpServers:{engram:{command:"node",args:[k,"start","--mcp-only"]}}}},[Jt.CLINE]:{name:"Cline (VS Code)",icon:"π·",configPath:f==="darwin"?"~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json":f==="win32"?"%APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json":"~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json",instructions:["Open VS Code with Cline extension installed","Open or create the Cline MCP settings file at the path shown above",'Paste the configuration below (or merge the "mcpServers" section if the file already has content)','Reload VS Code window (Cmd/Ctrl + Shift + P β "Developer: Reload Window")'],config:{mcpServers:{engram:{command:"node",args:[k,"start","--mcp-only"]}}}},[Jt.CUSTOM]:{name:"Custom MCP Client",icon:"π§",configPath:"Varies by client",instructions:["Locate your MCP client's configuration file","Add the Engram MCP server configuration to the mcpServers section","Restart your MCP client application","Verify Engram tools are available"],config:{mcpServers:{engram:{command:"node",args:[k,"start","--mcp-only"]}}}}})[m],Zd=()=>[{id:Jt.CLAUDE_DESKTOP,name:"Claude Desktop",description:"Anthropic's desktop AI assistant",icon:"π¬",popular:!0},{id:Jt.CLAUDE_CODE,name:"Claude Code",description:"Command-line AI coding assistant",icon:"β¨οΈ",popular:!0},{id:Jt.CLINE,name:"Cline (VS Code)",description:"VS Code extension for Claude",icon:"π·",popular:!1},{id:Jt.CUSTOM,name:"Custom MCP Client",description:"Other MCP-compatible tools",icon:"π§",popular:!1}];function qd({onSelect:m,selectedPlatform:k}){const f=Zd();return s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white",children:"Select Your Platform"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:f.map(U=>s.jsxs("button",{onClick:()=>m(U.id),className:`relative p-6 rounded-lg border-2 transition-all text-left ${k===U.id?"border-primary-500 bg-primary-50 dark:bg-primary-900/20":"border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}`,children:[U.popular&&s.jsx("span",{className:"absolute top-2 right-2 px-2 py-1 text-xs font-medium bg-primary-100 text-primary-800 dark:bg-primary-800 dark:text-primary-200 rounded",children:"Popular"}),s.jsxs("div",{className:"flex items-start space-x-4",children:[s.jsx("div",{className:"text-4xl",children:U.icon}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"font-semibold text-gray-900 dark:text-white mb-1",children:U.name}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:U.description})]})]})]},U.id))})]})}function ef({platform:m,installationPath:k,platformOS:f}){const[U,A]=V.useState(!1),[R,X]=V.useState(null),Q=Jd(m,k,f);if(!Q)return null;const E=JSON.stringify(Q.config,null,2),O=async()=>{try{await navigator.clipboard.writeText(E),A(!0),setTimeout(()=>A(!1),2e3)}catch(G){console.error("Failed to copy:",G)}},H=()=>{k&&k.includes("/bin/engram.js")?X({valid:!0,message:"Path looks correct"}):X({valid:!1,message:"Path may be incorrect"})};return V.useEffect(()=>{H()},[k]),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsxs("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:["Configuration for ",Q.name]}),s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Config file location: ",s.jsx("code",{className:"px-2 py-1 bg-gray-100 dark:bg-gray-800 rounded",children:Q.configPath})]})]}),s.jsx("div",{className:`p-4 rounded-lg border ${R!=null&&R.valid?"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800":"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xl",children:R!=null&&R.valid?"β
":"β οΈ"}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("p",{className:"font-medium text-sm",children:["Installation Path: ",R!=null&&R.valid?"Valid":"Check Required"]}),s.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mt-1 break-all",children:k})]})]})}),s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:"Copy this configuration"}),s.jsx("button",{onClick:O,className:"px-3 py-1 text-sm font-medium text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300",children:U?"β Copied!":"Copy to clipboard"})]}),s.jsx("pre",{className:"p-4 bg-gray-900 text-gray-100 rounded-lg overflow-x-auto text-sm",children:s.jsx("code",{children:E})})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:[s.jsx("h4",{className:"font-semibold text-blue-900 dark:text-blue-200 mb-2",children:"Setup Instructions"}),s.jsx("ol",{className:"list-decimal list-inside space-y-2 text-sm text-blue-800 dark:text-blue-300",children:Q.instructions.map((G,b)=>s.jsx("li",{children:G},b))})]})]})}const Oe={SELECT_PLATFORM:"select",GENERATE_CONFIG:"generate",VERIFY:"verify"};function tf({onClose:m}){const[k,f]=V.useState(Oe.SELECT_PLATFORM),[U,A]=V.useState(null),[R,X]=V.useState(null),[Q,E]=V.useState(!0),[O,H]=V.useState(null);V.useEffect(()=>{G()},[]);async function G(){try{E(!0);const ie=await Ge.getInstallationInfo();X(ie),H(null)}catch(ie){H(ie.message)}finally{E(!1)}}const b=ie=>{A(ie),f(Oe.GENERATE_CONFIG)},q=()=>{k===Oe.GENERATE_CONFIG?f(Oe.SELECT_PLATFORM):k===Oe.VERIFY&&f(Oe.GENERATE_CONFIG)};return Q?s.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 flex items-center justify-center p-4 z-50",children:s.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg p-8",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600 mx-auto"}),s.jsx("p",{className:"mt-4 text-gray-600 dark:text-gray-400",children:"Loading installation info..."})]})}):s.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 flex items-center justify-center p-4 z-50",children:s.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg max-w-4xl w-full max-h-[90vh] overflow-y-auto",children:s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Integration Setup Wizard"}),s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:["Step ",k===Oe.SELECT_PLATFORM?"1":k===Oe.GENERATE_CONFIG?"2":"3"," of 3"]})]}),s.jsx("button",{onClick:m,className:"text-gray-400 hover:text-gray-500 dark:hover:text-gray-300",children:s.jsx("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]}),s.jsx("div",{className:"mb-8",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:`flex-1 ${k!==Oe.SELECT_PLATFORM?"opacity-100":"opacity-50"}`,children:s.jsx("div",{className:`h-2 rounded-full ${k!==Oe.SELECT_PLATFORM?"bg-primary-600":"bg-gray-200 dark:bg-gray-700"}`})}),s.jsx("div",{className:`flex-1 ml-2 ${k===Oe.VERIFY?"opacity-100":"opacity-50"}`,children:s.jsx("div",{className:`h-2 rounded-full ${k===Oe.VERIFY?"bg-primary-600":"bg-gray-200 dark:bg-gray-700"}`})})]})}),O&&s.jsx("div",{className:"mb-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-3",children:s.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:O})}),k===Oe.SELECT_PLATFORM&&s.jsx(qd,{onSelect:b,selectedPlatform:U}),k===Oe.GENERATE_CONFIG&&R&&s.jsxs("div",{className:"space-y-6",children:[s.jsx(ef,{platform:U,installationPath:R.installation.binPath,platformOS:R.installation.platform}),s.jsxs("div",{className:"flex justify-between pt-4",children:[s.jsx("button",{onClick:q,className:"px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white",children:"β Back"}),s.jsx("button",{onClick:()=>f(Oe.VERIFY),className:"px-4 py-2 bg-primary-600 text-white rounded-md hover:bg-primary-700 text-sm font-medium",children:"Next: Verify Setup β"})]})]}),k===Oe.VERIFY&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg p-6 text-center",children:[s.jsx("div",{className:"text-6xl mb-4",children:"π"}),s.jsx("h3",{className:"text-xl font-semibold text-green-900 dark:text-green-200 mb-2",children:"Configuration Ready!"}),s.jsx("p",{className:"text-green-800 dark:text-green-300",children:"Your Engram MCP configuration has been generated. Follow the instructions above to complete the setup."})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:[s.jsx("h4",{className:"font-semibold text-blue-900 dark:text-blue-200 mb-2",children:"Next Steps"}),s.jsxs("ol",{className:"list-decimal list-inside space-y-1 text-sm text-blue-800 dark:text-blue-300",children:[s.jsx("li",{children:"Paste the configuration into your config file"}),s.jsx("li",{children:"Restart your AI application"}),s.jsx("li",{children:"Test the integration by asking about Engram"}),s.jsx("li",{children:"Check the Agents page for activity"})]})]}),s.jsxs("div",{className:"flex justify-between pt-4",children:[s.jsx("button",{onClick:q,className:"px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white",children:"β Back"}),s.jsx("button",{onClick:m,className:"px-4 py-2 bg-primary-600 text-white rounded-md hover:bg-primary-700 text-sm font-medium",children:"Done"})]})]})]})})})}function rf(){const[m,k]=V.useState(null),[f,U]=V.useState([]),[A,R]=V.useState(!0),[X,Q]=V.useState(null),[E,O]=V.useState(!1),[H,G]=V.useState("overview");V.useEffect(()=>{b()},[]);async function b(){try{R(!0);const[M,C]=await Promise.all([Ge.getStatus(),Ge.getMemories({limit:1e3})]);k(M),U(C.memories||[]),Q(null)}catch(M){Q(M.message)}finally{R(!1)}}if(A)return s.jsx("div",{className:"flex justify-center items-center h-64",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});if(X)return s.jsx("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:s.jsxs("p",{className:"text-red-800 dark:text-red-200",children:["Error: ",X]})});const q=f.reduce((M,C)=>{const B=C.source||"unknown";M[B]||(M[B]={count:0,namespaces:new Set,categories:{},lastActivity:0}),M[B].count++,M[B].namespaces.add(C.namespace),M[B].categories[C.category]=(M[B].categories[C.category]||0)+1;const J=C.lastAccessed||C.createdAt;return J>M[B].lastActivity&&(M[B].lastActivity=J),M},{}),ie=f.reduce((M,C)=>{const B=C.namespace||"default";M[B]||(M[B]={count:0,sources:new Set,categories:{},withEmbeddings:0,totalAccess:0,lastActivity:0}),M[B].count++,M[B].sources.add(C.source||"unknown"),M[B].categories[C.category]=(M[B].categories[C.category]||0)+1,M[B].totalAccess+=C.accessCount||0;const J=C.lastAccessed||C.createdAt;return J>M[B].lastActivity&&(M[B].lastActivity=J),M},{}),P=M=>{const C={cli:s.jsx("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2z"})}),mcp:s.jsx("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2zM9 9h6v6H9V9z"})}),api:s.jsx("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),unknown:s.jsx("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})};return C[M]||C.unknown},I=M=>{const C={cli:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",mcp:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200",api:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",unknown:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-200"};return C[M]||C.unknown},Z=M=>{if(!M)return"Never";const C=new Date(M),J=Date.now()-M;return J<6e4?"Just now":J<36e5?`${Math.floor(J/6e4)}m ago`:J<864e5?`${Math.floor(J/36e5)}h ago`:J<6048e5?`${Math.floor(J/864e5)}d ago`:C.toLocaleDateString()};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Agent Integrations"}),s.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:"Overview of agents and interfaces using Engram for persistent memory"})]}),s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"Active Integration Sources"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:Object.entries(q).map(([M,C])=>s.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4 hover:shadow-md transition-shadow",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("div",{className:`p-2 rounded-lg ${I(M)}`,children:P(M)}),s.jsx("span",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:C.count})]}),s.jsx("h4",{className:"text-lg font-semibold text-gray-900 dark:text-white capitalize mb-2",children:M}),s.jsxs("div",{className:"space-y-1 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("p",{children:["Namespaces: ",C.namespaces.size]}),s.jsxs("p",{children:["Categories: ",Object.keys(C.categories).length]}),s.jsxs("p",{children:["Last active: ",Z(C.lastActivity)]})]})]},M))})]}),s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-4",children:"Agent Namespaces"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:"Each namespace represents a separate agent instance or context. Use namespaces to keep memories isolated between different agents, projects, or environments."}),s.jsx("div",{className:"space-y-4",children:Object.entries(ie).map(([M,C])=>{const B=C.totalAccess/C.count;return s.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("h4",{className:"text-base font-semibold text-gray-900 dark:text-white",children:M}),s.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[C.count," memories"]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"Sources"}),s.jsx("div",{className:"flex gap-1 mt-1",children:Array.from(C.sources).map((J,ae)=>s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${I(J)}`,children:J},ae))})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"Categories"}),s.jsx("p",{className:"text-gray-900 dark:text-white mt-1",children:Object.entries(C.categories).sort((J,ae)=>ae[1]-J[1]).slice(0,2).map(([J,ae])=>`${J} (${ae})`).join(", ")})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"Avg Access"}),s.jsxs("p",{className:"text-gray-900 dark:text-white mt-1",children:[B.toFixed(1),"x"]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"Last Active"}),s.jsx("p",{className:"text-gray-900 dark:text-white mt-1",children:Z(C.lastActivity)})]})]})]},M)})})]}),s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg overflow-hidden",children:[s.jsx("div",{className:"border-b border-gray-200 dark:border-gray-700",children:s.jsxs("nav",{className:"flex -mb-px",children:[s.jsx("button",{onClick:()=>G("overview"),className:`px-6 py-3 text-sm font-medium ${H==="overview"?"border-b-2 border-primary-500 text-primary-600 dark:text-primary-400":"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:"Integration Overview"}),s.jsx("button",{onClick:()=>G("setup"),className:`px-6 py-3 text-sm font-medium ${H==="setup"?"border-b-2 border-primary-500 text-primary-600 dark:text-primary-400":"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`,children:"Quick Setup"})]})}),s.jsx("div",{className:"p-6",children:H==="overview"?s.jsxs("div",{className:"space-y-4 text-sm text-blue-800 dark:text-blue-300",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-1 text-gray-900 dark:text-white",children:"1. MCP Integration (Claude Desktop/Code)"}),s.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"Add Engram to your Claude Desktop configuration. Claude will automatically use engram_remember and engram_recall tools."}),s.jsx("code",{className:"block mt-2 p-2 bg-gray-100 dark:bg-gray-900 rounded text-xs text-gray-800 dark:text-gray-200",children:"See docs/mcp-setup.md for configuration"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-1 text-gray-900 dark:text-white",children:"2. REST API Integration"}),s.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"Use the REST API from any programming language. Create memories with custom namespaces for each agent."}),s.jsxs("code",{className:"block mt-2 p-2 bg-gray-100 dark:bg-gray-900 rounded text-xs text-gray-800 dark:text-gray-200",children:["POST http://localhost:3838/api/memories ","{",'"namespace": "my-agent"',"}"]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold mb-1 text-gray-900 dark:text-white",children:"3. CLI Integration"}),s.jsx("p",{className:"text-gray-700 dark:text-gray-400",children:"Call Engram CLI from your agent's code or scripts. Perfect for shell-based agents."}),s.jsx("code",{className:"block mt-2 p-2 bg-gray-100 dark:bg-gray-900 rounded text-xs text-gray-800 dark:text-gray-200",children:'node bin/engram.js remember "..." --namespace my-agent'})]})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center py-8",children:[s.jsx("div",{className:"text-6xl mb-4",children:"π"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:"Set Up Engram in Minutes"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-6 max-w-2xl mx-auto",children:"Get copy-paste ready configurations for Claude Desktop, Claude Code, and other AI platforms. No manual path finding required!"}),s.jsxs("button",{onClick:()=>O(!0),className:"px-6 py-3 bg-primary-600 text-white rounded-lg hover:bg-primary-700 font-medium inline-flex items-center space-x-2",children:[s.jsx("span",{children:"Launch Setup Wizard"}),s.jsx("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 7l5 5m0 0l-5 5m5-5H6"})})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 pt-6 border-t border-gray-200 dark:border-gray-700",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-3xl mb-2",children:"π―"}),s.jsx("h4",{className:"font-medium text-gray-900 dark:text-white mb-1",children:"Auto-Detection"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Installation path detected automatically"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-3xl mb-2",children:"π"}),s.jsx("h4",{className:"font-medium text-gray-900 dark:text-white mb-1",children:"Copy & Paste"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Ready-to-use configurations for all platforms"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-3xl mb-2",children:"β
"}),s.jsx("h4",{className:"font-medium text-gray-900 dark:text-white mb-1",children:"Validated"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Real-time validation and success indicators"})]})]})]})})]}),E&&s.jsx(tf,{onClose:()=>O(!1)})]})}function nf(){const m="https://github.com/HBarefoot/engram",k=`${m}/releases/latest`;return s.jsxs("div",{className:"space-y-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Download Engram Desktop"}),s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[s.jsx("div",{className:"flex-shrink-0 w-16 h-16 bg-primary-100 dark:bg-primary-900/30 rounded-2xl flex items-center justify-center",children:s.jsx("svg",{className:"w-8 h-8 text-primary-600 dark:text-primary-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"macOS (Universal)"}),s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Apple Silicon (M1/M2/M3/M4) & Intel"})]})]}),s.jsxs("div",{className:"flex flex-wrap gap-3 mb-6",children:[s.jsxs("a",{href:k,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500",children:[s.jsx("svg",{className:"w-5 h-5 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download from GitHub"]}),s.jsx("a",{href:`${m}/releases`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500",children:"All releases"})]})]}),s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:"Installation"}),s.jsxs("ol",{className:"list-decimal list-inside space-y-3 text-gray-700 dark:text-gray-300",children:[s.jsxs("li",{children:["Download the ",s.jsx("code",{className:"text-sm bg-gray-100 dark:bg-gray-700 px-1.5 py-0.5 rounded",children:".dmg"})," file above"]}),s.jsxs("li",{children:["Open the DMG and drag ",s.jsx("strong",{children:"Engram"})," to your Applications folder"]}),s.jsxs("li",{children:[s.jsx("strong",{children:"First launch:"})," Right-click the app, select ",s.jsx("strong",{children:"Open"}),", then click ",s.jsx("strong",{children:"Open"})," in the dialog",s.jsx("span",{className:"block text-sm text-gray-500 dark:text-gray-400 mt-1 ml-5",children:"This is only needed once β macOS remembers your choice"})]})]})]}),s.jsxs("div",{className:"bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 rounded-lg p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-amber-900 dark:text-amber-200 mb-2",children:"Why the extra step?"}),s.jsx("p",{className:"text-amber-800 dark:text-amber-300 text-sm",children:"Engram Desktop is not yet signed with an Apple Developer certificate. macOS Gatekeeper blocks unsigned apps by default. Right-clicking and choosing βOpenβ tells macOS you trust this app. You only need to do this once."}),s.jsxs("div",{className:"mt-4",children:[s.jsx("p",{className:"text-sm font-medium text-amber-900 dark:text-amber-200 mb-1",children:"Alternative (Terminal):"}),s.jsx("code",{className:"block text-sm bg-amber-100 dark:bg-amber-900/40 text-amber-900 dark:text-amber-200 px-3 py-2 rounded",children:"xattr -cr /Applications/Engram.app"})]})]})]})}const Iu=["Select Sources","Scan","Preview & Edit","Commit","Done"],lf=["preference","fact","pattern","decision","outcome"];function sf(){var _;const[m,k]=V.useState(0),[f,U]=V.useState([]),[A,R]=V.useState([]),[X,Q]=V.useState(null),[E,O]=V.useState([]),[H,G]=V.useState(null),[b,q]=V.useState(!1),[ie,P]=V.useState(null),[I,Z]=V.useState([]),[M,C]=V.useState("");V.useEffect(()=>{B()},[]);async function B(x){q(!0),P(null);try{const y=await Ge.getImportSources(x||I);U(y.sources||[]);const c=(y.sources||[]).filter(v=>{var K;return(K=v.detected)==null?void 0:K.found}).map(v=>v.id);R(c)}catch(y){P(y.message)}finally{q(!1)}}function J(){const x=M.trim();if(x&&!I.includes(x)){const y=[...I,x];Z(y),C(""),B(y)}}function ae(x){const y=I.filter(c=>c!==x);Z(y),B(y)}function Le(x){R(y=>y.includes(x)?y.filter(c=>c!==x):[...y,x])}function Be(){const x=f.filter(y=>{var c;return(c=y.detected)==null?void 0:c.found}).map(y=>y.id);R(x)}function xt(){R([])}async function ut(){k(1),q(!0),P(null);try{const x=await Ge.scanImportSources(A,I);Q(x),O((x.memories||[]).map(y=>({...y,selected:!0}))),k(2)}catch(x){P(x.message),k(0)}finally{q(!1)}}async function Nt(){const x=E.filter(y=>y.selected);if(x.length!==0){k(3),q(!0),P(null);try{const y=await Ge.commitImport(x);G(y.results),k(4)}catch(y){P(y.message),k(2)}finally{q(!1)}}}function Ie(x,y,c){O(v=>{const K=[...v];return K[x]={...K[x],[y]:c},K})}function Fe(x){Ie(x,"selected",!E[x].selected)}function Ye(){O(x=>x.map(y=>({...y,selected:!0})))}function tt(){O(x=>x.map(y=>({...y,selected:!1})))}function Me(x){O(y=>y.filter((c,v)=>v!==x))}const fe=E.filter(x=>x.selected).length;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:"Smart Import Wizard"}),s.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Bootstrap memories from your existing tools"})]}),s.jsx("div",{className:"flex items-center space-x-2",children:Iu.map((x,y)=>s.jsxs("div",{className:"flex items-center",children:[s.jsx("div",{className:`flex items-center justify-center w-8 h-8 rounded-full text-sm font-medium ${y<m?"bg-green-500 text-white":y===m?"bg-primary-600 text-white":"bg-gray-200 dark:bg-gray-700 text-gray-500 dark:text-gray-400"}`,children:y<m?"β":y+1}),s.jsx("span",{className:`ml-2 text-sm ${y===m?"text-gray-900 dark:text-white font-medium":"text-gray-500 dark:text-gray-400"}`,children:x}),y<Iu.length-1&&s.jsx("div",{className:`mx-3 h-px w-8 ${y<m?"bg-green-500":"bg-gray-300 dark:bg-gray-600"}`})]},x))}),ie&&s.jsx("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:s.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:ie})}),m===0&&s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4",children:"Select Import Sources"}),s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-4",children:"Sources with a green badge were auto-detected on your system."}),s.jsxs("div",{className:"mb-4 p-3 border border-gray-200 dark:border-gray-700 rounded-lg bg-gray-50 dark:bg-gray-900",children:[s.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Additional scan directories"}),s.jsxs("div",{className:"flex gap-2 mb-2",children:[s.jsx("input",{type:"text",value:M,onChange:x=>C(x.target.value),onKeyDown:x=>x.key==="Enter"&&J(),placeholder:"e.g. ~/repos/my-project",className:"flex-1 text-sm border border-gray-300 dark:border-gray-600 rounded px-3 py-1.5 bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400"}),s.jsx("button",{onClick:J,disabled:!M.trim(),className:"px-3 py-1.5 text-sm bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded hover:bg-gray-300 dark:hover:bg-gray-600 disabled:opacity-50",children:"Add"})]}),I.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:I.map(x=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 text-xs bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded",children:[x,s.jsx("button",{onClick:()=>ae(x),className:"text-gray-400 hover:text-red-500",children:"Γ"})]},x))})]}),s.jsxs("div",{className:"flex gap-2 mb-4",children:[s.jsx("button",{onClick:Be,className:"text-sm text-primary-600 hover:text-primary-700 dark:text-primary-400",children:"Select all found"}),s.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"|"}),s.jsx("button",{onClick:xt,className:"text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400",children:"Deselect all"})]}),b?s.jsx("div",{className:"text-center py-8 text-gray-500",children:"Detecting sources..."}):s.jsx("div",{className:"grid gap-3",children:f.map(x=>{var y,c,v,K;return s.jsxs("label",{className:`flex items-center p-4 border rounded-lg cursor-pointer transition-colors ${A.includes(x.id)?"border-primary-500 bg-primary-50 dark:bg-primary-900/20":"border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"} ${(y=x.detected)!=null&&y.found?"":"opacity-50"}`,children:[s.jsx("input",{type:"checkbox",checked:A.includes(x.id),onChange:()=>Le(x.id),disabled:!((c=x.detected)!=null&&c.found),className:"mr-3 rounded border-gray-300 text-primary-600 focus:ring-primary-500"}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:x.label}),(v=x.detected)!=null&&v.found?s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",children:"Found"}):s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-gray-100 text-gray-500 dark:bg-gray-700 dark:text-gray-400",children:"Not found"}),s.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",children:x.category})]}),s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:x.description}),((K=x.detected)==null?void 0:K.paths)&&x.detected.paths.length>1&&s.jsxs("p",{className:"text-xs text-gray-400 dark:text-gray-500 mt-1",children:["Found in: ",x.detected.paths.join(", ")]})]})]},x.id)})}),s.jsx("div",{className:"mt-6 flex justify-end",children:s.jsxs("button",{onClick:ut,disabled:A.length===0||b,className:"px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed",children:["Scan Selected Sources (",A.length,")"]})})]}),m===1&&b&&s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-12 text-center",children:[s.jsx("div",{className:"inline-block w-8 h-8 border-4 border-primary-500 border-t-transparent rounded-full animate-spin mb-4"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Scanning sources..."}),s.jsxs("p",{className:"text-sm text-gray-400 mt-2",children:["Extracting memories from ",A.length," source(s)"]})]}),m===2&&s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Preview Extracted Memories (",E.length,")"]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:Ye,className:"text-sm text-primary-600 hover:text-primary-700 dark:text-primary-400",children:"Select all"}),s.jsx("span",{className:"text-gray-300 dark:text-gray-600",children:"|"}),s.jsx("button",{onClick:tt,className:"text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400",children:"Deselect all"})]})]}),((_=X==null?void 0:X.warnings)==null?void 0:_.length)>0&&s.jsxs("div",{className:"mb-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-3",children:[s.jsx("p",{className:"text-sm font-medium text-yellow-700 dark:text-yellow-400 mb-1",children:"Warnings:"}),X.warnings.map((x,y)=>s.jsx("p",{className:"text-sm text-yellow-600 dark:text-yellow-500",children:x},y))]}),s.jsx("div",{className:"space-y-3 max-h-[500px] overflow-y-auto",children:E.map((x,y)=>s.jsx("div",{className:`border rounded-lg p-3 transition-colors ${x.selected?"border-primary-200 dark:border-primary-800 bg-white dark:bg-gray-800":"border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900 opacity-60"}`,children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("input",{type:"checkbox",checked:x.selected,onChange:()=>Fe(y),className:"mt-1 rounded border-gray-300 text-primary-600 focus:ring-primary-500"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("textarea",{value:x.content,onChange:c=>Ie(y,"content",c.target.value),rows:2,className:"w-full text-sm border-0 bg-transparent text-gray-900 dark:text-white resize-none focus:ring-0 p-0"}),s.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[s.jsx("select",{value:x.category,onChange:c=>Ie(y,"category",c.target.value),className:"text-xs border border-gray-200 dark:border-gray-600 rounded px-2 py-1 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300",children:lf.map(c=>s.jsx("option",{value:c,children:c},c))}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"text-xs text-gray-400",children:"Confidence:"}),s.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",value:x.confidence,onChange:c=>Ie(y,"confidence",parseFloat(c.target.value)),className:"w-20 h-1 accent-primary-500"}),s.jsx("span",{className:"text-xs text-gray-500 w-8",children:x.confidence.toFixed(2)})]}),s.jsx("span",{className:"text-xs text-gray-400",children:x.source})]})]}),s.jsx("button",{onClick:()=>Me(y),className:"text-gray-400 hover:text-red-500 text-sm p-1",title:"Remove",children:"Γ"})]})},y))}),s.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[s.jsx("button",{onClick:()=>k(0),className:"px-4 py-2 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white",children:"Back"}),s.jsxs("button",{onClick:Nt,disabled:fe===0||b,className:"px-4 py-2 bg-primary-600 text-white rounded-lg hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed",children:["Commit ",fe," Memories"]})]})]}),m===3&&b&&s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-12 text-center",children:[s.jsx("div",{className:"inline-block w-8 h-8 border-4 border-primary-500 border-t-transparent rounded-full animate-spin mb-4"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-300",children:"Committing memories..."}),s.jsx("p",{className:"text-sm text-gray-400 mt-2",children:"Generating embeddings and deduplicating"})]}),m===4&&H&&s.jsxs("div",{className:"bg-white dark:bg-gray-800 shadow rounded-lg p-8 text-center",children:[s.jsx("div",{className:"text-4xl mb-4",children:"β"}),s.jsx("h3",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-4",children:"Import Complete"}),s.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 max-w-lg mx-auto mb-6",children:[s.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 rounded-lg p-3",children:[s.jsx("div",{className:"text-2xl font-bold text-green-600 dark:text-green-400",children:H.created}),s.jsx("div",{className:"text-xs text-green-700 dark:text-green-500",children:"Created"})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/20 rounded-lg p-3",children:[s.jsx("div",{className:"text-2xl font-bold text-blue-600 dark:text-blue-400",children:H.merged}),s.jsx("div",{className:"text-xs text-blue-700 dark:text-blue-500",children:"Merged"})]}),s.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 rounded-lg p-3",children:[s.jsx("div",{className:"text-2xl font-bold text-yellow-600 dark:text-yellow-400",children:H.duplicates}),s.jsx("div",{className:"text-xs text-yellow-700 dark:text-yellow-500",children:"Duplicates"})]}),s.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 rounded-lg p-3",children:[s.jsx("div",{className:"text-2xl font-bold text-red-600 dark:text-red-400",children:H.rejected}),s.jsx("div",{className:"text-xs text-red-700 dark:text-red-500",children:"Rejected"})]})]}),s.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-6",children:["Completed in ",H.duration,"ms"]}),s.jsx("div",{className:"flex justify-center gap-3",children:s.jsx("button",{onClick:()=>{k(0),Q(null),O([]),G(null),Z([]),C("")},className:"px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700",children:"Import More"})})]})]})}function af(){const[m,k]=V.useState("dashboard"),f={dashboard:s.jsx(Qd,{}),memories:s.jsx(Gd,{}),search:s.jsx(Yd,{}),agents:s.jsx(rf,{}),statistics:s.jsx(Xd,{}),download:s.jsx(nf,{}),import:s.jsx(sf,{})};return s.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[s.jsx("nav",{className:"bg-white dark:bg-gray-800 shadow-sm",children:s.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"flex justify-between h-16",children:s.jsxs("div",{className:"flex",children:[s.jsxs("div",{className:"flex-shrink-0 flex items-center gap-2.5",children:[s.jsx("img",{src:"/engram-logo.png",alt:"Engram",className:"h-8 w-8 rounded-lg"}),s.jsx("h1",{className:"text-2xl font-bold text-primary-600 dark:text-primary-400",children:"Engram"})]}),s.jsxs("div",{className:"hidden sm:ml-6 sm:flex sm:space-x-8",children:[s.jsx("button",{onClick:()=>k("dashboard"),className:`${m==="dashboard"?"border-primary-500 text-gray-900 dark:text-white":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"} inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium`,children:"Dashboard"}),s.jsx("button",{onClick:()=>k("memories"),className:`${m==="memories"?"border-primary-500 text-gray-900 dark:text-white":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"} inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium`,children:"Memories"}),s.jsx("button",{onClick:()=>k("search"),className:`${m==="search"?"border-primary-500 text-gray-900 dark:text-white":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"} inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium`,children:"Search"}),s.jsx("button",{onClick:()=>k("agents"),className:`${m==="agents"?"border-primary-500 text-gray-900 dark:text-white":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"} inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium`,children:"Agents"}),s.jsx("button",{onClick:()=>k("statistics"),className:`${m==="statistics"?"border-primary-500 text-gray-900 dark:text-white":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"} inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium`,children:"Statistics"}),s.jsx("button",{onClick:()=>k("import"),className:`${m==="import"?"border-primary-500 text-gray-900 dark:text-white":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"} inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium`,children:"Import"}),s.jsx("button",{onClick:()=>k("download"),className:`${m==="download"?"border-primary-500 text-gray-900 dark:text-white":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"} inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium`,children:"Download"})]})]})})})}),s.jsx("main",{children:s.jsx("div",{className:"max-w-7xl mx-auto py-6 sm:px-6 lg:px-8",children:f[m]})})]})}Hd.createRoot(document.getElementById("root")).render(s.jsx(Fd.StrictMode,{children:s.jsx(af,{})}));
|