atlas-mcp 0.1.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/.env.example +32 -0
- package/README.md +282 -0
- package/package.json +72 -0
- package/public/app/assets/app-CxbS1w9p.js +3981 -0
- package/public/app/assets/index-BA6nxCuI.css +1 -0
- package/public/app/assets/index-BXmIRrQH.js +177 -0
- package/public/app/index.html +27 -0
- package/public/assets/brain-atlas.LICENSE.txt +16 -0
- package/public/assets/brain-atlas.glb +0 -0
- package/public/assets/brain.obj +27282 -0
- package/public/fonts/DepartureMono-Regular.woff +0 -0
- package/public/fonts/DepartureMono-Regular.woff2 +0 -0
- package/scripts/sync-memory-vectors.js +46 -0
- package/src/audit.js +9 -0
- package/src/cli/args.js +87 -0
- package/src/cli/commands/add.js +103 -0
- package/src/cli/commands/config.js +228 -0
- package/src/cli/commands/delete.js +75 -0
- package/src/cli/commands/entities.js +39 -0
- package/src/cli/commands/entity.js +47 -0
- package/src/cli/commands/get.js +46 -0
- package/src/cli/commands/list.js +53 -0
- package/src/cli/commands/related.js +56 -0
- package/src/cli/commands/search.js +68 -0
- package/src/cli/commands/update.js +58 -0
- package/src/cli/deps.js +114 -0
- package/src/cli/env-file.js +44 -0
- package/src/cli/format.js +246 -0
- package/src/cli.js +187 -0
- package/src/cognitive-worker.js +381 -0
- package/src/db.js +2674 -0
- package/src/extraction-context.js +31 -0
- package/src/ingestion-service.js +387 -0
- package/src/ingestion-worker.js +225 -0
- package/src/llm-config.js +31 -0
- package/src/llm.js +789 -0
- package/src/logger.js +51 -0
- package/src/mcp-server.js +577 -0
- package/src/memory-comparison.js +421 -0
- package/src/related-memories.js +232 -0
- package/src/run-cognitive-worker.js +12 -0
- package/src/run-ingestion-worker.js +13 -0
- package/src/run-vector-worker.js +12 -0
- package/src/schemas.js +413 -0
- package/src/semantic-validation.js +430 -0
- package/src/server.js +827 -0
- package/src/shared/brain-regions.js +61 -0
- package/src/shared/entity-lens.js +249 -0
- package/src/shared/memory-placement.js +171 -0
- package/src/shared/memory-search.js +55 -0
- package/src/shared/region-anchors.js +112 -0
- package/src/shared/region-mapper.js +247 -0
- package/src/vector-store.js +546 -0
- package/src/vector-worker.js +71 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
function kx(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Cx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Cm={exports:{}},_a={},bm={exports:{}},J={};/**
|
|
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 ws=Symbol.for("react.element"),bx=Symbol.for("react.portal"),Tx=Symbol.for("react.fragment"),Ex=Symbol.for("react.strict_mode"),Px=Symbol.for("react.profiler"),Ax=Symbol.for("react.provider"),Lx=Symbol.for("react.context"),Mx=Symbol.for("react.forward_ref"),Rx=Symbol.for("react.suspense"),Dx=Symbol.for("react.memo"),Ix=Symbol.for("react.lazy"),af=Symbol.iterator;function $x(e){return e===null||typeof e!="object"?null:(e=af&&e[af]||e["@@iterator"],typeof e=="function"?e:null)}var Tm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Em=Object.assign,Pm={};function si(e,t,n){this.props=e,this.context=t,this.refs=Pm,this.updater=n||Tm}si.prototype.isReactComponent={};si.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};si.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Am(){}Am.prototype=si.prototype;function pu(e,t,n){this.props=e,this.context=t,this.refs=Pm,this.updater=n||Tm}var mu=pu.prototype=new Am;mu.constructor=pu;Em(mu,si.prototype);mu.isPureReactComponent=!0;var lf=Array.isArray,Lm=Object.prototype.hasOwnProperty,gu={current:null},Mm={key:!0,ref:!0,__self:!0,__source:!0};function Rm(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Lm.call(t,r)&&!Mm.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:ws,type:e,key:s,ref:o,props:i,_owner:gu.current}}function Fx(e,t){return{$$typeof:ws,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function yu(e){return typeof e=="object"&&e!==null&&e.$$typeof===ws}function Ox(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var cf=/\/+/g;function Ya(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ox(""+e.key):t.toString(36)}function ho(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ws:case bx:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+Ya(o,0):r,lf(i)?(n="",e!=null&&(n=e.replace(cf,"$&/")+"/"),ho(i,t,n,"",function(u){return u})):i!=null&&(yu(i)&&(i=Fx(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(cf,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",lf(e))for(var a=0;a<e.length;a++){s=e[a];var c=r+Ya(s,a);o+=ho(s,t,n,c,i)}else if(c=$x(e),typeof c=="function")for(e=c.call(e),a=0;!(s=e.next()).done;)s=s.value,c=r+Ya(s,a++),o+=ho(s,t,n,c,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Is(e,t,n){if(e==null)return e;var r=[],i=0;return ho(e,r,"","",function(s){return t.call(n,s,i++)}),r}function Vx(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ke={current:null},po={transition:null},zx={ReactCurrentDispatcher:Ke,ReactCurrentBatchConfig:po,ReactCurrentOwner:gu};function Dm(){throw Error("act(...) is not supported in production builds of React.")}J.Children={map:Is,forEach:function(e,t,n){Is(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Is(e,function(){t++}),t},toArray:function(e){return Is(e,function(t){return t})||[]},only:function(e){if(!yu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};J.Component=si;J.Fragment=Tx;J.Profiler=Px;J.PureComponent=pu;J.StrictMode=Ex;J.Suspense=Rx;J.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zx;J.act=Dm;J.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Em({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=gu.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)Lm.call(t,c)&&!Mm.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:ws,type:e.type,key:i,ref:s,props:r,_owner:o}};J.createContext=function(e){return e={$$typeof:Lx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ax,_context:e},e.Consumer=e};J.createElement=Rm;J.createFactory=function(e){var t=Rm.bind(null,e);return t.type=e,t};J.createRef=function(){return{current:null}};J.forwardRef=function(e){return{$$typeof:Mx,render:e}};J.isValidElement=yu;J.lazy=function(e){return{$$typeof:Ix,_payload:{_status:-1,_result:e},_init:Vx}};J.memo=function(e,t){return{$$typeof:Dx,type:e,compare:t===void 0?null:t}};J.startTransition=function(e){var t=po.transition;po.transition={};try{e()}finally{po.transition=t}};J.unstable_act=Dm;J.useCallback=function(e,t){return Ke.current.useCallback(e,t)};J.useContext=function(e){return Ke.current.useContext(e)};J.useDebugValue=function(){};J.useDeferredValue=function(e){return Ke.current.useDeferredValue(e)};J.useEffect=function(e,t){return Ke.current.useEffect(e,t)};J.useId=function(){return Ke.current.useId()};J.useImperativeHandle=function(e,t,n){return Ke.current.useImperativeHandle(e,t,n)};J.useInsertionEffect=function(e,t){return Ke.current.useInsertionEffect(e,t)};J.useLayoutEffect=function(e,t){return Ke.current.useLayoutEffect(e,t)};J.useMemo=function(e,t){return Ke.current.useMemo(e,t)};J.useReducer=function(e,t,n){return Ke.current.useReducer(e,t,n)};J.useRef=function(e){return Ke.current.useRef(e)};J.useState=function(e){return Ke.current.useState(e)};J.useSyncExternalStore=function(e,t,n){return Ke.current.useSyncExternalStore(e,t,n)};J.useTransition=function(){return Ke.current.useTransition()};J.version="18.3.1";bm.exports=J;var S=bm.exports;const Bx=Cx(S),Ux=kx({__proto__:null,default:Bx},[S]);/**
|
|
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 Hx=S,Wx=Symbol.for("react.element"),qx=Symbol.for("react.fragment"),Kx=Object.prototype.hasOwnProperty,Gx=Hx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Yx={key:!0,ref:!0,__self:!0,__source:!0};function Im(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Kx.call(t,r)&&!Yx.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Wx,type:e,key:s,ref:o,props:i,_owner:Gx.current}}_a.Fragment=qx;_a.jsx=Im;_a.jsxs=Im;Cm.exports=_a;var l=Cm.exports,$m={exports:{}},ut={},Fm={exports:{}},Om={};/**
|
|
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
|
+
*/(function(e){function t(E,D){var V=E.length;E.push(D);e:for(;0<V;){var L=V-1>>>1,W=E[L];if(0<i(W,D))E[L]=D,E[V]=W,V=L;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var D=E[0],V=E.pop();if(V!==D){E[0]=V;e:for(var L=0,W=E.length,Q=W>>>1;L<Q;){var ee=2*(L+1)-1,de=E[ee],he=ee+1,ke=E[he];if(0>i(de,V))he<W&&0>i(ke,de)?(E[L]=ke,E[he]=V,L=he):(E[L]=de,E[ee]=V,L=ee);else if(he<W&&0>i(ke,V))E[L]=ke,E[he]=V,L=he;else break e}}return D}function i(E,D){var V=E.sortIndex-D.sortIndex;return V!==0?V:E.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var c=[],u=[],d=1,f=null,h=3,g=!1,w=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,p=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 v(E){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=E)r(u),D.sortIndex=D.expirationTime,t(c,D);else break;D=n(u)}}function x(E){if(y=!1,v(E),!w)if(n(c)!==null)w=!0,M(j);else{var D=n(u);D!==null&&$(x,D.startTime-E)}}function j(E,D){w=!1,y&&(y=!1,p(k),k=-1),g=!0;var V=h;try{for(v(D),f=n(c);f!==null&&(!(f.expirationTime>D)||E&&!K());){var L=f.callback;if(typeof L=="function"){f.callback=null,h=f.priorityLevel;var W=L(f.expirationTime<=D);D=e.unstable_now(),typeof W=="function"?f.callback=W:f===n(c)&&r(c),v(D)}else r(c);f=n(c)}if(f!==null)var Q=!0;else{var ee=n(u);ee!==null&&$(x,ee.startTime-D),Q=!1}return Q}finally{f=null,h=V,g=!1}}var C=!1,b=null,k=-1,I=5,R=-1;function K(){return!(e.unstable_now()-R<I)}function te(){if(b!==null){var E=e.unstable_now();R=E;var D=!0;try{D=b(!0,E)}finally{D?X():(C=!1,b=null)}}else C=!1}var X;if(typeof m=="function")X=function(){m(te)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,U=N.port2;N.port1.onmessage=te,X=function(){U.postMessage(null)}}else X=function(){_(te,0)};function M(E){b=E,C||(C=!0,X())}function $(E,D){k=_(function(){E(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(E){E.callback=null},e.unstable_continueExecution=function(){w||g||(w=!0,M(j))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(E){switch(h){case 1:case 2:case 3:var D=3;break;default:D=h}var V=h;h=D;try{return E()}finally{h=V}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,D){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var V=h;h=E;try{return D()}finally{h=V}},e.unstable_scheduleCallback=function(E,D,V){var L=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?L+V:L):V=L,E){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=V+W,E={id:d++,callback:D,priorityLevel:E,startTime:V,expirationTime:W,sortIndex:-1},V>L?(E.sortIndex=V,t(u,E),n(c)===null&&E===n(u)&&(y?(p(k),k=-1):y=!0,$(x,V-L))):(E.sortIndex=W,t(c,E),w||g||(w=!0,M(j))),E},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(E){var D=h;return function(){var V=h;h=D;try{return E.apply(this,arguments)}finally{h=V}}}})(Om);Fm.exports=Om;var Xx=Fm.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 Qx=S,at=Xx;function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);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 Vm=new Set,qi={};function fr(e,t){qr(e,t),qr(e+"Capture",t)}function qr(e,t){for(qi[e]=t,e=0;e<t.length;e++)Vm.add(t[e])}var sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hl=Object.prototype.hasOwnProperty,Zx=/^[: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]*$/,uf={},df={};function Jx(e){return Hl.call(df,e)?!0:Hl.call(uf,e)?!1:Zx.test(e)?df[e]=!0:(uf[e]=!0,!1)}function e1(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function t1(e,t,n,r){if(t===null||typeof t>"u"||e1(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 Ge(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Re[e]=new Ge(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Re[t]=new Ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Re[e]=new Ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Re[e]=new Ge(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){Re[e]=new Ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Re[e]=new Ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Re[e]=new Ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Re[e]=new Ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Re[e]=new Ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var vu=/[\-:]([a-z])/g;function xu(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(vu,xu);Re[t]=new Ge(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(vu,xu);Re[t]=new Ge(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(vu,xu);Re[t]=new Ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Re[e]=new Ge(e,1,!1,e.toLowerCase(),null,!1,!1)});Re.xlinkHref=new Ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Re[e]=new Ge(e,1,!1,e.toLowerCase(),null,!0,!0)});function _u(e,t,n,r){var i=Re.hasOwnProperty(t)?Re[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(t1(t,n,i,r)&&(n=null),r||i===null?Jx(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var dn=Qx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$s=Symbol.for("react.element"),wr=Symbol.for("react.portal"),Sr=Symbol.for("react.fragment"),wu=Symbol.for("react.strict_mode"),Wl=Symbol.for("react.profiler"),zm=Symbol.for("react.provider"),Bm=Symbol.for("react.context"),Su=Symbol.for("react.forward_ref"),ql=Symbol.for("react.suspense"),Kl=Symbol.for("react.suspense_list"),ju=Symbol.for("react.memo"),pn=Symbol.for("react.lazy"),Um=Symbol.for("react.offscreen"),ff=Symbol.iterator;function di(e){return e===null||typeof e!="object"?null:(e=ff&&e[ff]||e["@@iterator"],typeof e=="function"?e:null)}var ye=Object.assign,Xa;function ji(e){if(Xa===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Xa=t&&t[1]||""}return`
|
|
34
|
+
`+Xa+e}var Qa=!1;function Za(e,t){if(!e||Qa)return"";Qa=!0;var n=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(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
35
|
+
`),s=r.stack.split(`
|
|
36
|
+
`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var c=`
|
|
37
|
+
`+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=a);break}}}finally{Qa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ji(e):""}function n1(e){switch(e.tag){case 5:return ji(e.type);case 16:return ji("Lazy");case 13:return ji("Suspense");case 19:return ji("SuspenseList");case 0:case 2:case 15:return e=Za(e.type,!1),e;case 11:return e=Za(e.type.render,!1),e;case 1:return e=Za(e.type,!0),e;default:return""}}function Gl(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 Sr:return"Fragment";case wr:return"Portal";case Wl:return"Profiler";case wu:return"StrictMode";case ql:return"Suspense";case Kl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bm:return(e.displayName||"Context")+".Consumer";case zm:return(e._context.displayName||"Context")+".Provider";case Su:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ju:return t=e.displayName||null,t!==null?t:Gl(e.type)||"Memo";case pn:t=e._payload,e=e._init;try{return Gl(e(t))}catch{}}return null}function r1(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 Gl(t);case 8:return t===wu?"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 Ln(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function i1(e){var t=Hm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fs(e){e._valueTracker||(e._valueTracker=i1(e))}function Wm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lo(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 Yl(e,t){var n=t.checked;return ye({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function hf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ln(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qm(e,t){t=t.checked,t!=null&&_u(e,"checked",t,!1)}function Xl(e,t){qm(e,t);var n=Ln(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ql(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ql(e,t.type,Ln(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ql(e,t,n){(t!=="number"||Lo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ni=Array.isArray;function Fr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ln(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Zl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return ye({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function mf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(O(92));if(Ni(n)){if(1<n.length)throw Error(O(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ln(n)}}function Km(e,t){var n=Ln(t.value),r=Ln(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function gf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Gm(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 Jl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Gm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Os,Ym=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Os=Os||document.createElement("div"),Os.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Os.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ki(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mi={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},s1=["Webkit","ms","Moz","O"];Object.keys(Mi).forEach(function(e){s1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mi[t]=Mi[e]})});function Xm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mi.hasOwnProperty(e)&&Mi[e]?(""+t).trim():t+"px"}function Qm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Xm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var o1=ye({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 ec(e,t){if(t){if(o1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function tc(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 nc=null;function Nu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rc=null,Or=null,Vr=null;function yf(e){if(e=Ns(e)){if(typeof rc!="function")throw Error(O(280));var t=e.stateNode;t&&(t=ka(t),rc(e.stateNode,e.type,t))}}function Zm(e){Or?Vr?Vr.push(e):Vr=[e]:Or=e}function Jm(){if(Or){var e=Or,t=Vr;if(Vr=Or=null,yf(e),t)for(e=0;e<t.length;e++)yf(t[e])}}function eg(e,t){return e(t)}function tg(){}var Ja=!1;function ng(e,t,n){if(Ja)return e(t,n);Ja=!0;try{return eg(e,t,n)}finally{Ja=!1,(Or!==null||Vr!==null)&&(tg(),Jm())}}function Gi(e,t){var n=e.stateNode;if(n===null)return null;var r=ka(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(O(231,t,typeof n));return n}var ic=!1;if(sn)try{var fi={};Object.defineProperty(fi,"passive",{get:function(){ic=!0}}),window.addEventListener("test",fi,fi),window.removeEventListener("test",fi,fi)}catch{ic=!1}function a1(e,t,n,r,i,s,o,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Ri=!1,Mo=null,Ro=!1,sc=null,l1={onError:function(e){Ri=!0,Mo=e}};function c1(e,t,n,r,i,s,o,a,c){Ri=!1,Mo=null,a1.apply(l1,arguments)}function u1(e,t,n,r,i,s,o,a,c){if(c1.apply(this,arguments),Ri){if(Ri){var u=Mo;Ri=!1,Mo=null}else throw Error(O(198));Ro||(Ro=!0,sc=u)}}function hr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function rg(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 vf(e){if(hr(e)!==e)throw Error(O(188))}function d1(e){var t=e.alternate;if(!t){if(t=hr(e),t===null)throw Error(O(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return vf(i),e;if(s===r)return vf(i),t;s=s.sibling}throw Error(O(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?e:t}function ig(e){return e=d1(e),e!==null?sg(e):null}function sg(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=sg(e);if(t!==null)return t;e=e.sibling}return null}var og=at.unstable_scheduleCallback,xf=at.unstable_cancelCallback,f1=at.unstable_shouldYield,h1=at.unstable_requestPaint,je=at.unstable_now,p1=at.unstable_getCurrentPriorityLevel,ku=at.unstable_ImmediatePriority,ag=at.unstable_UserBlockingPriority,Do=at.unstable_NormalPriority,m1=at.unstable_LowPriority,lg=at.unstable_IdlePriority,wa=null,Ot=null;function g1(e){if(Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(wa,e,void 0,(e.current.flags&128)===128)}catch{}}var Pt=Math.clz32?Math.clz32:x1,y1=Math.log,v1=Math.LN2;function x1(e){return e>>>=0,e===0?32:31-(y1(e)/v1|0)|0}var Vs=64,zs=4194304;function ki(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 Io(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=ki(a):(s&=o,s!==0&&(r=ki(s)))}else o=n&~i,o!==0?r=ki(o):s!==0&&(r=ki(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Pt(t),i=1<<n,r|=e[n],t&=~i;return r}function _1(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 w1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Pt(s),a=1<<o,c=i[o];c===-1?(!(a&n)||a&r)&&(i[o]=_1(a,t)):c<=t&&(e.expiredLanes|=a),s&=~a}}function oc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function cg(){var e=Vs;return Vs<<=1,!(Vs&4194240)&&(Vs=64),e}function el(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ss(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Pt(t),e[t]=n}function S1(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Pt(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Cu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var se=0;function ug(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var dg,bu,fg,hg,pg,ac=!1,Bs=[],jn=null,Nn=null,kn=null,Yi=new Map,Xi=new Map,yn=[],j1="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 _f(e,t){switch(e){case"focusin":case"focusout":jn=null;break;case"dragenter":case"dragleave":Nn=null;break;case"mouseover":case"mouseout":kn=null;break;case"pointerover":case"pointerout":Yi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xi.delete(t.pointerId)}}function hi(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Ns(t),t!==null&&bu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function N1(e,t,n,r,i){switch(t){case"focusin":return jn=hi(jn,e,t,n,r,i),!0;case"dragenter":return Nn=hi(Nn,e,t,n,r,i),!0;case"mouseover":return kn=hi(kn,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Yi.set(s,hi(Yi.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Xi.set(s,hi(Xi.get(s)||null,e,t,n,r,i)),!0}return!1}function mg(e){var t=Qn(e.target);if(t!==null){var n=hr(t);if(n!==null){if(t=n.tag,t===13){if(t=rg(n),t!==null){e.blockedOn=t,pg(e.priority,function(){fg(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=lc(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);nc=r,n.target.dispatchEvent(r),nc=null}else return t=Ns(n),t!==null&&bu(t),e.blockedOn=n,!1;t.shift()}return!0}function wf(e,t,n){mo(e)&&n.delete(t)}function k1(){ac=!1,jn!==null&&mo(jn)&&(jn=null),Nn!==null&&mo(Nn)&&(Nn=null),kn!==null&&mo(kn)&&(kn=null),Yi.forEach(wf),Xi.forEach(wf)}function pi(e,t){e.blockedOn===t&&(e.blockedOn=null,ac||(ac=!0,at.unstable_scheduleCallback(at.unstable_NormalPriority,k1)))}function Qi(e){function t(i){return pi(i,e)}if(0<Bs.length){pi(Bs[0],e);for(var n=1;n<Bs.length;n++){var r=Bs[n];r.blockedOn===e&&(r.blockedOn=null)}}for(jn!==null&&pi(jn,e),Nn!==null&&pi(Nn,e),kn!==null&&pi(kn,e),Yi.forEach(t),Xi.forEach(t),n=0;n<yn.length;n++)r=yn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<yn.length&&(n=yn[0],n.blockedOn===null);)mg(n),n.blockedOn===null&&yn.shift()}var zr=dn.ReactCurrentBatchConfig,$o=!0;function C1(e,t,n,r){var i=se,s=zr.transition;zr.transition=null;try{se=1,Tu(e,t,n,r)}finally{se=i,zr.transition=s}}function b1(e,t,n,r){var i=se,s=zr.transition;zr.transition=null;try{se=4,Tu(e,t,n,r)}finally{se=i,zr.transition=s}}function Tu(e,t,n,r){if($o){var i=lc(e,t,n,r);if(i===null)ul(e,t,r,Fo,n),_f(e,r);else if(N1(i,e,t,n,r))r.stopPropagation();else if(_f(e,r),t&4&&-1<j1.indexOf(e)){for(;i!==null;){var s=Ns(i);if(s!==null&&dg(s),s=lc(e,t,n,r),s===null&&ul(e,t,r,Fo,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else ul(e,t,r,null,n)}}var Fo=null;function lc(e,t,n,r){if(Fo=null,e=Nu(r),e=Qn(e),e!==null)if(t=hr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=rg(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Fo=e,null}function gg(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(p1()){case ku:return 1;case ag:return 4;case Do:case m1:return 16;case lg:return 536870912;default:return 16}default:return 16}}var xn=null,Eu=null,go=null;function yg(){if(go)return go;var e,t=Eu,n=t.length,r,i="value"in xn?xn.value:xn.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return go=i.slice(e,1<r?1-r:void 0)}function yo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Us(){return!0}function Sf(){return!1}function dt(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Us:Sf,this.isPropagationStopped=Sf,this}return ye(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Us)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Us)},persist:function(){},isPersistent:Us}),t}var oi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pu=dt(oi),js=ye({},oi,{view:0,detail:0}),T1=dt(js),tl,nl,mi,Sa=ye({},js,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Au,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!==mi&&(mi&&e.type==="mousemove"?(tl=e.screenX-mi.screenX,nl=e.screenY-mi.screenY):nl=tl=0,mi=e),tl)},movementY:function(e){return"movementY"in e?e.movementY:nl}}),jf=dt(Sa),E1=ye({},Sa,{dataTransfer:0}),P1=dt(E1),A1=ye({},js,{relatedTarget:0}),rl=dt(A1),L1=ye({},oi,{animationName:0,elapsedTime:0,pseudoElement:0}),M1=dt(L1),R1=ye({},oi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),D1=dt(R1),I1=ye({},oi,{data:0}),Nf=dt(I1),$1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},F1={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"},O1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function V1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=O1[e])?!!t[e]:!1}function Au(){return V1}var z1=ye({},js,{key:function(e){if(e.key){var t=$1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?F1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Au,charCode:function(e){return e.type==="keypress"?yo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),B1=dt(z1),U1=ye({},Sa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kf=dt(U1),H1=ye({},js,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Au}),W1=dt(H1),q1=ye({},oi,{propertyName:0,elapsedTime:0,pseudoElement:0}),K1=dt(q1),G1=ye({},Sa,{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}),Y1=dt(G1),X1=[9,13,27,32],Lu=sn&&"CompositionEvent"in window,Di=null;sn&&"documentMode"in document&&(Di=document.documentMode);var Q1=sn&&"TextEvent"in window&&!Di,vg=sn&&(!Lu||Di&&8<Di&&11>=Di),Cf=" ",bf=!1;function xg(e,t){switch(e){case"keyup":return X1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _g(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jr=!1;function Z1(e,t){switch(e){case"compositionend":return _g(t);case"keypress":return t.which!==32?null:(bf=!0,Cf);case"textInput":return e=t.data,e===Cf&&bf?null:e;default:return null}}function J1(e,t){if(jr)return e==="compositionend"||!Lu&&xg(e,t)?(e=yg(),go=Eu=xn=null,jr=!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 vg&&t.locale!=="ko"?null:t.data;default:return null}}var e_={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 Tf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!e_[e.type]:t==="textarea"}function wg(e,t,n,r){Zm(r),t=Oo(t,"onChange"),0<t.length&&(n=new Pu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ii=null,Zi=null;function t_(e){Lg(e,0)}function ja(e){var t=Cr(e);if(Wm(t))return e}function n_(e,t){if(e==="change")return t}var Sg=!1;if(sn){var il;if(sn){var sl="oninput"in document;if(!sl){var Ef=document.createElement("div");Ef.setAttribute("oninput","return;"),sl=typeof Ef.oninput=="function"}il=sl}else il=!1;Sg=il&&(!document.documentMode||9<document.documentMode)}function Pf(){Ii&&(Ii.detachEvent("onpropertychange",jg),Zi=Ii=null)}function jg(e){if(e.propertyName==="value"&&ja(Zi)){var t=[];wg(t,Zi,e,Nu(e)),ng(t_,t)}}function r_(e,t,n){e==="focusin"?(Pf(),Ii=t,Zi=n,Ii.attachEvent("onpropertychange",jg)):e==="focusout"&&Pf()}function i_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ja(Zi)}function s_(e,t){if(e==="click")return ja(t)}function o_(e,t){if(e==="input"||e==="change")return ja(t)}function a_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lt=typeof Object.is=="function"?Object.is:a_;function Ji(e,t){if(Lt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Hl.call(t,i)||!Lt(e[i],t[i]))return!1}return!0}function Af(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lf(e,t){var n=Af(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Af(n)}}function Ng(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ng(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kg(){for(var e=window,t=Lo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lo(e.document)}return t}function Mu(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 l_(e){var t=kg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ng(n.ownerDocument.documentElement,n)){if(r!==null&&Mu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Lf(n,s);var o=Lf(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var c_=sn&&"documentMode"in document&&11>=document.documentMode,Nr=null,cc=null,$i=null,uc=!1;function Mf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uc||Nr==null||Nr!==Lo(r)||(r=Nr,"selectionStart"in r&&Mu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$i&&Ji($i,r)||($i=r,r=Oo(cc,"onSelect"),0<r.length&&(t=new Pu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Nr)))}function Hs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kr={animationend:Hs("Animation","AnimationEnd"),animationiteration:Hs("Animation","AnimationIteration"),animationstart:Hs("Animation","AnimationStart"),transitionend:Hs("Transition","TransitionEnd")},ol={},Cg={};sn&&(Cg=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);function Na(e){if(ol[e])return ol[e];if(!kr[e])return e;var t=kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Cg)return ol[e]=t[n];return e}var bg=Na("animationend"),Tg=Na("animationiteration"),Eg=Na("animationstart"),Pg=Na("transitionend"),Ag=new Map,Rf="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 In(e,t){Ag.set(e,t),fr(t,[e])}for(var al=0;al<Rf.length;al++){var ll=Rf[al],u_=ll.toLowerCase(),d_=ll[0].toUpperCase()+ll.slice(1);In(u_,"on"+d_)}In(bg,"onAnimationEnd");In(Tg,"onAnimationIteration");In(Eg,"onAnimationStart");In("dblclick","onDoubleClick");In("focusin","onFocus");In("focusout","onBlur");In(Pg,"onTransitionEnd");qr("onMouseEnter",["mouseout","mouseover"]);qr("onMouseLeave",["mouseout","mouseover"]);qr("onPointerEnter",["pointerout","pointerover"]);qr("onPointerLeave",["pointerout","pointerover"]);fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));fr("onBeforeInput",["compositionend","keypress","textInput","paste"]);fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ci="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(" "),f_=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ci));function Df(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,u1(r,t,void 0,e),e.currentTarget=null}function Lg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==s&&i.isPropagationStopped())break e;Df(i,a,u),s=c}else for(o=0;o<r.length;o++){if(a=r[o],c=a.instance,u=a.currentTarget,a=a.listener,c!==s&&i.isPropagationStopped())break e;Df(i,a,u),s=c}}}if(Ro)throw e=sc,Ro=!1,sc=null,e}function le(e,t){var n=t[mc];n===void 0&&(n=t[mc]=new Set);var r=e+"__bubble";n.has(r)||(Mg(t,e,2,!1),n.add(r))}function cl(e,t,n){var r=0;t&&(r|=4),Mg(n,e,r,t)}var Ws="_reactListening"+Math.random().toString(36).slice(2);function es(e){if(!e[Ws]){e[Ws]=!0,Vm.forEach(function(n){n!=="selectionchange"&&(f_.has(n)||cl(n,!1,e),cl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ws]||(t[Ws]=!0,cl("selectionchange",!1,t))}}function Mg(e,t,n,r){switch(gg(t)){case 1:var i=C1;break;case 4:i=b1;break;default:i=Tu}n=i.bind(null,t,n,e),i=void 0,!ic||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function ul(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Qn(a),o===null)return;if(c=o.tag,c===5||c===6){r=s=o;continue e}a=a.parentNode}}r=r.return}ng(function(){var u=s,d=Nu(n),f=[];e:{var h=Ag.get(e);if(h!==void 0){var g=Pu,w=e;switch(e){case"keypress":if(yo(n)===0)break e;case"keydown":case"keyup":g=B1;break;case"focusin":w="focus",g=rl;break;case"focusout":w="blur",g=rl;break;case"beforeblur":case"afterblur":g=rl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=jf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=P1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=W1;break;case bg:case Tg:case Eg:g=M1;break;case Pg:g=K1;break;case"scroll":g=T1;break;case"wheel":g=Y1;break;case"copy":case"cut":case"paste":g=D1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=kf}var y=(t&4)!==0,_=!y&&e==="scroll",p=y?h!==null?h+"Capture":null:h;y=[];for(var m=u,v;m!==null;){v=m;var x=v.stateNode;if(v.tag===5&&x!==null&&(v=x,p!==null&&(x=Gi(m,p),x!=null&&y.push(ts(m,x,v)))),_)break;m=m.return}0<y.length&&(h=new g(h,w,null,n,d),f.push({event:h,listeners:y}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",h&&n!==nc&&(w=n.relatedTarget||n.fromElement)&&(Qn(w)||w[on]))break e;if((g||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,g?(w=n.relatedTarget||n.toElement,g=u,w=w?Qn(w):null,w!==null&&(_=hr(w),w!==_||w.tag!==5&&w.tag!==6)&&(w=null)):(g=null,w=u),g!==w)){if(y=jf,x="onMouseLeave",p="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(y=kf,x="onPointerLeave",p="onPointerEnter",m="pointer"),_=g==null?h:Cr(g),v=w==null?h:Cr(w),h=new y(x,m+"leave",g,n,d),h.target=_,h.relatedTarget=v,x=null,Qn(d)===u&&(y=new y(p,m+"enter",w,n,d),y.target=v,y.relatedTarget=_,x=y),_=x,g&&w)t:{for(y=g,p=w,m=0,v=y;v;v=yr(v))m++;for(v=0,x=p;x;x=yr(x))v++;for(;0<m-v;)y=yr(y),m--;for(;0<v-m;)p=yr(p),v--;for(;m--;){if(y===p||p!==null&&y===p.alternate)break t;y=yr(y),p=yr(p)}y=null}else y=null;g!==null&&If(f,h,g,y,!1),w!==null&&_!==null&&If(f,_,w,y,!0)}}e:{if(h=u?Cr(u):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var j=n_;else if(Tf(h))if(Sg)j=o_;else{j=i_;var C=r_}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(j=s_);if(j&&(j=j(e,u))){wg(f,j,n,d);break e}C&&C(e,h,u),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&Ql(h,"number",h.value)}switch(C=u?Cr(u):window,e){case"focusin":(Tf(C)||C.contentEditable==="true")&&(Nr=C,cc=u,$i=null);break;case"focusout":$i=cc=Nr=null;break;case"mousedown":uc=!0;break;case"contextmenu":case"mouseup":case"dragend":uc=!1,Mf(f,n,d);break;case"selectionchange":if(c_)break;case"keydown":case"keyup":Mf(f,n,d)}var b;if(Lu)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else jr?xg(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(vg&&n.locale!=="ko"&&(jr||k!=="onCompositionStart"?k==="onCompositionEnd"&&jr&&(b=yg()):(xn=d,Eu="value"in xn?xn.value:xn.textContent,jr=!0)),C=Oo(u,k),0<C.length&&(k=new Nf(k,e,null,n,d),f.push({event:k,listeners:C}),b?k.data=b:(b=_g(n),b!==null&&(k.data=b)))),(b=Q1?Z1(e,n):J1(e,n))&&(u=Oo(u,"onBeforeInput"),0<u.length&&(d=new Nf("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=b))}Lg(f,t)})}function ts(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Oo(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Gi(e,n),s!=null&&r.unshift(ts(e,s,i)),s=Gi(e,t),s!=null&&r.push(ts(e,s,i))),e=e.return}return r}function yr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function If(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&u!==null&&(a=u,i?(c=Gi(n,s),c!=null&&o.unshift(ts(n,c,a))):i||(c=Gi(n,s),c!=null&&o.push(ts(n,c,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var h_=/\r\n?/g,p_=/\u0000|\uFFFD/g;function $f(e){return(typeof e=="string"?e:""+e).replace(h_,`
|
|
38
|
+
`).replace(p_,"")}function qs(e,t,n){if(t=$f(t),$f(e)!==t&&n)throw Error(O(425))}function Vo(){}var dc=null,fc=null;function hc(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 pc=typeof setTimeout=="function"?setTimeout:void 0,m_=typeof clearTimeout=="function"?clearTimeout:void 0,Ff=typeof Promise=="function"?Promise:void 0,g_=typeof queueMicrotask=="function"?queueMicrotask:typeof Ff<"u"?function(e){return Ff.resolve(null).then(e).catch(y_)}:pc;function y_(e){setTimeout(function(){throw e})}function dl(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Qi(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Qi(t)}function Cn(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 Of(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ai=Math.random().toString(36).slice(2),Ft="__reactFiber$"+ai,ns="__reactProps$"+ai,on="__reactContainer$"+ai,mc="__reactEvents$"+ai,v_="__reactListeners$"+ai,x_="__reactHandles$"+ai;function Qn(e){var t=e[Ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[on]||n[Ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Of(e);e!==null;){if(n=e[Ft])return n;e=Of(e)}return t}e=n,n=e.parentNode}return null}function Ns(e){return e=e[Ft]||e[on],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Cr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function ka(e){return e[ns]||null}var gc=[],br=-1;function $n(e){return{current:e}}function ce(e){0>br||(e.current=gc[br],gc[br]=null,br--)}function ae(e,t){br++,gc[br]=e.current,e.current=t}var Mn={},Be=$n(Mn),Je=$n(!1),or=Mn;function Kr(e,t){var n=e.type.contextTypes;if(!n)return Mn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function et(e){return e=e.childContextTypes,e!=null}function zo(){ce(Je),ce(Be)}function Vf(e,t,n){if(Be.current!==Mn)throw Error(O(168));ae(Be,t),ae(Je,n)}function Rg(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(O(108,r1(e)||"Unknown",i));return ye({},n,r)}function Bo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Mn,or=Be.current,ae(Be,e),ae(Je,Je.current),!0}function zf(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=Rg(e,t,or),r.__reactInternalMemoizedMergedChildContext=e,ce(Je),ce(Be),ae(Be,e)):ce(Je),ae(Je,n)}var Xt=null,Ca=!1,fl=!1;function Dg(e){Xt===null?Xt=[e]:Xt.push(e)}function __(e){Ca=!0,Dg(e)}function Fn(){if(!fl&&Xt!==null){fl=!0;var e=0,t=se;try{var n=Xt;for(se=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Xt=null,Ca=!1}catch(i){throw Xt!==null&&(Xt=Xt.slice(e+1)),og(ku,Fn),i}finally{se=t,fl=!1}}return null}var Tr=[],Er=0,Uo=null,Ho=0,yt=[],vt=0,ar=null,Zt=1,Jt="";function qn(e,t){Tr[Er++]=Ho,Tr[Er++]=Uo,Uo=e,Ho=t}function Ig(e,t,n){yt[vt++]=Zt,yt[vt++]=Jt,yt[vt++]=ar,ar=e;var r=Zt;e=Jt;var i=32-Pt(r)-1;r&=~(1<<i),n+=1;var s=32-Pt(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zt=1<<32-Pt(t)+i|n<<i|r,Jt=s+e}else Zt=1<<s|n<<i|r,Jt=e}function Ru(e){e.return!==null&&(qn(e,1),Ig(e,1,0))}function Du(e){for(;e===Uo;)Uo=Tr[--Er],Tr[Er]=null,Ho=Tr[--Er],Tr[Er]=null;for(;e===ar;)ar=yt[--vt],yt[vt]=null,Jt=yt[--vt],yt[vt]=null,Zt=yt[--vt],yt[vt]=null}var st=null,it=null,fe=!1,bt=null;function $g(e,t){var n=xt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Bf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,st=e,it=Cn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,st=e,it=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ar!==null?{id:Zt,overflow:Jt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=xt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,st=e,it=null,!0):!1;default:return!1}}function yc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function vc(e){if(fe){var t=it;if(t){var n=t;if(!Bf(e,t)){if(yc(e))throw Error(O(418));t=Cn(n.nextSibling);var r=st;t&&Bf(e,t)?$g(r,n):(e.flags=e.flags&-4097|2,fe=!1,st=e)}}else{if(yc(e))throw Error(O(418));e.flags=e.flags&-4097|2,fe=!1,st=e}}}function Uf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;st=e}function Ks(e){if(e!==st)return!1;if(!fe)return Uf(e),fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!hc(e.type,e.memoizedProps)),t&&(t=it)){if(yc(e))throw Fg(),Error(O(418));for(;t;)$g(e,t),t=Cn(t.nextSibling)}if(Uf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){it=Cn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}it=null}}else it=st?Cn(e.stateNode.nextSibling):null;return!0}function Fg(){for(var e=it;e;)e=Cn(e.nextSibling)}function Gr(){it=st=null,fe=!1}function Iu(e){bt===null?bt=[e]:bt.push(e)}var w_=dn.ReactCurrentBatchConfig;function gi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,e))}return e}function Gs(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Hf(e){var t=e._init;return t(e._payload)}function Og(e){function t(p,m){if(e){var v=p.deletions;v===null?(p.deletions=[m],p.flags|=16):v.push(m)}}function n(p,m){if(!e)return null;for(;m!==null;)t(p,m),m=m.sibling;return null}function r(p,m){for(p=new Map;m!==null;)m.key!==null?p.set(m.key,m):p.set(m.index,m),m=m.sibling;return p}function i(p,m){return p=Pn(p,m),p.index=0,p.sibling=null,p}function s(p,m,v){return p.index=v,e?(v=p.alternate,v!==null?(v=v.index,v<m?(p.flags|=2,m):v):(p.flags|=2,m)):(p.flags|=1048576,m)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,m,v,x){return m===null||m.tag!==6?(m=xl(v,p.mode,x),m.return=p,m):(m=i(m,v),m.return=p,m)}function c(p,m,v,x){var j=v.type;return j===Sr?d(p,m,v.props.children,x,v.key):m!==null&&(m.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===pn&&Hf(j)===m.type)?(x=i(m,v.props),x.ref=gi(p,m,v),x.return=p,x):(x=No(v.type,v.key,v.props,null,p.mode,x),x.ref=gi(p,m,v),x.return=p,x)}function u(p,m,v,x){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=_l(v,p.mode,x),m.return=p,m):(m=i(m,v.children||[]),m.return=p,m)}function d(p,m,v,x,j){return m===null||m.tag!==7?(m=rr(v,p.mode,x,j),m.return=p,m):(m=i(m,v),m.return=p,m)}function f(p,m,v){if(typeof m=="string"&&m!==""||typeof m=="number")return m=xl(""+m,p.mode,v),m.return=p,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case $s:return v=No(m.type,m.key,m.props,null,p.mode,v),v.ref=gi(p,null,m),v.return=p,v;case wr:return m=_l(m,p.mode,v),m.return=p,m;case pn:var x=m._init;return f(p,x(m._payload),v)}if(Ni(m)||di(m))return m=rr(m,p.mode,v,null),m.return=p,m;Gs(p,m)}return null}function h(p,m,v,x){var j=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return j!==null?null:a(p,m,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case $s:return v.key===j?c(p,m,v,x):null;case wr:return v.key===j?u(p,m,v,x):null;case pn:return j=v._init,h(p,m,j(v._payload),x)}if(Ni(v)||di(v))return j!==null?null:d(p,m,v,x,null);Gs(p,v)}return null}function g(p,m,v,x,j){if(typeof x=="string"&&x!==""||typeof x=="number")return p=p.get(v)||null,a(m,p,""+x,j);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case $s:return p=p.get(x.key===null?v:x.key)||null,c(m,p,x,j);case wr:return p=p.get(x.key===null?v:x.key)||null,u(m,p,x,j);case pn:var C=x._init;return g(p,m,v,C(x._payload),j)}if(Ni(x)||di(x))return p=p.get(v)||null,d(m,p,x,j,null);Gs(m,x)}return null}function w(p,m,v,x){for(var j=null,C=null,b=m,k=m=0,I=null;b!==null&&k<v.length;k++){b.index>k?(I=b,b=null):I=b.sibling;var R=h(p,b,v[k],x);if(R===null){b===null&&(b=I);break}e&&b&&R.alternate===null&&t(p,b),m=s(R,m,k),C===null?j=R:C.sibling=R,C=R,b=I}if(k===v.length)return n(p,b),fe&&qn(p,k),j;if(b===null){for(;k<v.length;k++)b=f(p,v[k],x),b!==null&&(m=s(b,m,k),C===null?j=b:C.sibling=b,C=b);return fe&&qn(p,k),j}for(b=r(p,b);k<v.length;k++)I=g(b,p,k,v[k],x),I!==null&&(e&&I.alternate!==null&&b.delete(I.key===null?k:I.key),m=s(I,m,k),C===null?j=I:C.sibling=I,C=I);return e&&b.forEach(function(K){return t(p,K)}),fe&&qn(p,k),j}function y(p,m,v,x){var j=di(v);if(typeof j!="function")throw Error(O(150));if(v=j.call(v),v==null)throw Error(O(151));for(var C=j=null,b=m,k=m=0,I=null,R=v.next();b!==null&&!R.done;k++,R=v.next()){b.index>k?(I=b,b=null):I=b.sibling;var K=h(p,b,R.value,x);if(K===null){b===null&&(b=I);break}e&&b&&K.alternate===null&&t(p,b),m=s(K,m,k),C===null?j=K:C.sibling=K,C=K,b=I}if(R.done)return n(p,b),fe&&qn(p,k),j;if(b===null){for(;!R.done;k++,R=v.next())R=f(p,R.value,x),R!==null&&(m=s(R,m,k),C===null?j=R:C.sibling=R,C=R);return fe&&qn(p,k),j}for(b=r(p,b);!R.done;k++,R=v.next())R=g(b,p,k,R.value,x),R!==null&&(e&&R.alternate!==null&&b.delete(R.key===null?k:R.key),m=s(R,m,k),C===null?j=R:C.sibling=R,C=R);return e&&b.forEach(function(te){return t(p,te)}),fe&&qn(p,k),j}function _(p,m,v,x){if(typeof v=="object"&&v!==null&&v.type===Sr&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case $s:e:{for(var j=v.key,C=m;C!==null;){if(C.key===j){if(j=v.type,j===Sr){if(C.tag===7){n(p,C.sibling),m=i(C,v.props.children),m.return=p,p=m;break e}}else if(C.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===pn&&Hf(j)===C.type){n(p,C.sibling),m=i(C,v.props),m.ref=gi(p,C,v),m.return=p,p=m;break e}n(p,C);break}else t(p,C);C=C.sibling}v.type===Sr?(m=rr(v.props.children,p.mode,x,v.key),m.return=p,p=m):(x=No(v.type,v.key,v.props,null,p.mode,x),x.ref=gi(p,m,v),x.return=p,p=x)}return o(p);case wr:e:{for(C=v.key;m!==null;){if(m.key===C)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(p,m.sibling),m=i(m,v.children||[]),m.return=p,p=m;break e}else{n(p,m);break}else t(p,m);m=m.sibling}m=_l(v,p.mode,x),m.return=p,p=m}return o(p);case pn:return C=v._init,_(p,m,C(v._payload),x)}if(Ni(v))return w(p,m,v,x);if(di(v))return y(p,m,v,x);Gs(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(n(p,m.sibling),m=i(m,v),m.return=p,p=m):(n(p,m),m=xl(v,p.mode,x),m.return=p,p=m),o(p)):n(p,m)}return _}var Yr=Og(!0),Vg=Og(!1),Wo=$n(null),qo=null,Pr=null,$u=null;function Fu(){$u=Pr=qo=null}function Ou(e){var t=Wo.current;ce(Wo),e._currentValue=t}function xc(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Br(e,t){qo=e,$u=Pr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qe=!0),e.firstContext=null)}function wt(e){var t=e._currentValue;if($u!==e)if(e={context:e,memoizedValue:t,next:null},Pr===null){if(qo===null)throw Error(O(308));Pr=e,qo.dependencies={lanes:0,firstContext:e}}else Pr=Pr.next=e;return t}var Zn=null;function Vu(e){Zn===null?Zn=[e]:Zn.push(e)}function zg(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Vu(t)):(n.next=i.next,i.next=n),t.interleaved=n,an(e,r)}function an(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var mn=!1;function zu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bg(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 tn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,re&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,an(e,n)}return i=r.interleaved,i===null?(t.next=t,Vu(r)):(t.next=i.next,i.next=t),r.interleaved=t,an(e,n)}function vo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cu(e,n)}}function Wf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ko(e,t,n,r){var i=e.updateQueue;mn=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var c=a,u=c.next;c.next=null,o===null?s=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=c))}if(s!==null){var f=i.baseState;o=0,d=u=c=null,a=s;do{var h=a.lane,g=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,y=a;switch(h=t,g=n,y.tag){case 1:if(w=y.payload,typeof w=="function"){f=w.call(g,f,h);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=y.payload,h=typeof w=="function"?w.call(g,f,h):w,h==null)break e;f=ye({},f,h);break e;case 2:mn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[a]:h.push(a))}else g={eventTime:g,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=g,c=f):d=d.next=g,o|=h;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;h=a,a=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(c=f),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);cr|=o,e.lanes=o,e.memoizedState=f}}function qf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(O(191,i));i.call(r)}}}var ks={},Vt=$n(ks),rs=$n(ks),is=$n(ks);function Jn(e){if(e===ks)throw Error(O(174));return e}function Bu(e,t){switch(ae(is,t),ae(rs,e),ae(Vt,ks),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Jl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Jl(t,e)}ce(Vt),ae(Vt,t)}function Xr(){ce(Vt),ce(rs),ce(is)}function Ug(e){Jn(is.current);var t=Jn(Vt.current),n=Jl(t,e.type);t!==n&&(ae(rs,e),ae(Vt,n))}function Uu(e){rs.current===e&&(ce(Vt),ce(rs))}var pe=$n(0);function Go(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 hl=[];function Hu(){for(var e=0;e<hl.length;e++)hl[e]._workInProgressVersionPrimary=null;hl.length=0}var xo=dn.ReactCurrentDispatcher,pl=dn.ReactCurrentBatchConfig,lr=0,ge=null,Ce=null,Ee=null,Yo=!1,Fi=!1,ss=0,S_=0;function De(){throw Error(O(321))}function Wu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Lt(e[n],t[n]))return!1;return!0}function qu(e,t,n,r,i,s){if(lr=s,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xo.current=e===null||e.memoizedState===null?C_:b_,e=n(r,i),Fi){s=0;do{if(Fi=!1,ss=0,25<=s)throw Error(O(301));s+=1,Ee=Ce=null,t.updateQueue=null,xo.current=T_,e=n(r,i)}while(Fi)}if(xo.current=Xo,t=Ce!==null&&Ce.next!==null,lr=0,Ee=Ce=ge=null,Yo=!1,t)throw Error(O(300));return e}function Ku(){var e=ss!==0;return ss=0,e}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ee===null?ge.memoizedState=Ee=e:Ee=Ee.next=e,Ee}function St(){if(Ce===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Ce.next;var t=Ee===null?ge.memoizedState:Ee.next;if(t!==null)Ee=t,Ce=e;else{if(e===null)throw Error(O(310));Ce=e,e={memoizedState:Ce.memoizedState,baseState:Ce.baseState,baseQueue:Ce.baseQueue,queue:Ce.queue,next:null},Ee===null?ge.memoizedState=Ee=e:Ee=Ee.next=e}return Ee}function os(e,t){return typeof t=="function"?t(e):t}function ml(e){var t=St(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=Ce,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,c=null,u=s;do{var d=u.lane;if((lr&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=f,o=r):c=c.next=f,ge.lanes|=d,cr|=d}u=u.next}while(u!==null&&u!==s);c===null?o=r:c.next=a,Lt(r,t.memoizedState)||(Qe=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,ge.lanes|=s,cr|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function gl(e){var t=St(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);Lt(s,t.memoizedState)||(Qe=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Hg(){}function Wg(e,t){var n=ge,r=St(),i=t(),s=!Lt(r.memoizedState,i);if(s&&(r.memoizedState=i,Qe=!0),r=r.queue,Gu(Gg.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ee!==null&&Ee.memoizedState.tag&1){if(n.flags|=2048,as(9,Kg.bind(null,n,r,i,t),void 0,null),Pe===null)throw Error(O(349));lr&30||qg(n,t,i)}return i}function qg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Kg(e,t,n,r){t.value=n,t.getSnapshot=r,Yg(t)&&Xg(e)}function Gg(e,t,n){return n(function(){Yg(t)&&Xg(e)})}function Yg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lt(e,n)}catch{return!0}}function Xg(e){var t=an(e,1);t!==null&&At(t,e,1,-1)}function Kf(e){var t=$t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:os,lastRenderedState:e},t.queue=e,e=e.dispatch=k_.bind(null,ge,e),[t.memoizedState,e]}function as(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Qg(){return St().memoizedState}function _o(e,t,n,r){var i=$t();ge.flags|=e,i.memoizedState=as(1|t,n,void 0,r===void 0?null:r)}function ba(e,t,n,r){var i=St();r=r===void 0?null:r;var s=void 0;if(Ce!==null){var o=Ce.memoizedState;if(s=o.destroy,r!==null&&Wu(r,o.deps)){i.memoizedState=as(t,n,s,r);return}}ge.flags|=e,i.memoizedState=as(1|t,n,s,r)}function Gf(e,t){return _o(8390656,8,e,t)}function Gu(e,t){return ba(2048,8,e,t)}function Zg(e,t){return ba(4,2,e,t)}function Jg(e,t){return ba(4,4,e,t)}function ey(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 ty(e,t,n){return n=n!=null?n.concat([e]):null,ba(4,4,ey.bind(null,t,e),n)}function Yu(){}function ny(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ry(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Wu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function iy(e,t,n){return lr&21?(Lt(n,t)||(n=cg(),ge.lanes|=n,cr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Qe=!0),e.memoizedState=n)}function j_(e,t){var n=se;se=n!==0&&4>n?n:4,e(!0);var r=pl.transition;pl.transition={};try{e(!1),t()}finally{se=n,pl.transition=r}}function sy(){return St().memoizedState}function N_(e,t,n){var r=En(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},oy(e))ay(t,n);else if(n=zg(e,t,n,r),n!==null){var i=qe();At(n,e,r,i),ly(n,t,r)}}function k_(e,t,n){var r=En(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(oy(e))ay(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Lt(a,o)){var c=t.interleaved;c===null?(i.next=i,Vu(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=zg(e,t,i,r),n!==null&&(i=qe(),At(n,e,r,i),ly(n,t,r))}}function oy(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function ay(e,t){Fi=Yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ly(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Cu(e,n)}}var Xo={readContext:wt,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},C_={readContext:wt,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:Gf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_o(4194308,4,ey.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _o(4194308,4,e,t)},useInsertionEffect:function(e,t){return _o(4,2,e,t)},useMemo:function(e,t){var n=$t();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$t();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=N_.bind(null,ge,e),[r.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:Kf,useDebugValue:Yu,useDeferredValue:function(e){return $t().memoizedState=e},useTransition:function(){var e=Kf(!1),t=e[0];return e=j_.bind(null,e[1]),$t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ge,i=$t();if(fe){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Pe===null)throw Error(O(349));lr&30||qg(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Gf(Gg.bind(null,r,s,e),[e]),r.flags|=2048,as(9,Kg.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=$t(),t=Pe.identifierPrefix;if(fe){var n=Jt,r=Zt;n=(r&~(1<<32-Pt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ss++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=S_++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},b_={readContext:wt,useCallback:ny,useContext:wt,useEffect:Gu,useImperativeHandle:ty,useInsertionEffect:Zg,useLayoutEffect:Jg,useMemo:ry,useReducer:ml,useRef:Qg,useState:function(){return ml(os)},useDebugValue:Yu,useDeferredValue:function(e){var t=St();return iy(t,Ce.memoizedState,e)},useTransition:function(){var e=ml(os)[0],t=St().memoizedState;return[e,t]},useMutableSource:Hg,useSyncExternalStore:Wg,useId:sy,unstable_isNewReconciler:!1},T_={readContext:wt,useCallback:ny,useContext:wt,useEffect:Gu,useImperativeHandle:ty,useInsertionEffect:Zg,useLayoutEffect:Jg,useMemo:ry,useReducer:gl,useRef:Qg,useState:function(){return gl(os)},useDebugValue:Yu,useDeferredValue:function(e){var t=St();return Ce===null?t.memoizedState=e:iy(t,Ce.memoizedState,e)},useTransition:function(){var e=gl(os)[0],t=St().memoizedState;return[e,t]},useMutableSource:Hg,useSyncExternalStore:Wg,useId:sy,unstable_isNewReconciler:!1};function kt(e,t){if(e&&e.defaultProps){t=ye({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function _c(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ta={isMounted:function(e){return(e=e._reactInternals)?hr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=qe(),i=En(e),s=tn(r,i);s.payload=t,n!=null&&(s.callback=n),t=bn(e,s,i),t!==null&&(At(t,e,i,r),vo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=qe(),i=En(e),s=tn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=bn(e,s,i),t!==null&&(At(t,e,i,r),vo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=qe(),r=En(e),i=tn(n,r);i.tag=2,t!=null&&(i.callback=t),t=bn(e,i,r),t!==null&&(At(t,e,r,n),vo(t,e,r))}};function Yf(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Ji(n,r)||!Ji(i,s):!0}function cy(e,t,n){var r=!1,i=Mn,s=t.contextType;return typeof s=="object"&&s!==null?s=wt(s):(i=et(t)?or:Be.current,r=t.contextTypes,s=(r=r!=null)?Kr(e,i):Mn),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ta,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Xf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ta.enqueueReplaceState(t,t.state,null)}function wc(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},zu(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=wt(s):(s=et(t)?or:Be.current,i.context=Kr(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(_c(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Ta.enqueueReplaceState(i,i.state,null),Ko(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Qr(e,t){try{var n="",r=t;do n+=n1(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
39
|
+
Error generating stack: `+s.message+`
|
|
40
|
+
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function yl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Sc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var E_=typeof WeakMap=="function"?WeakMap:Map;function uy(e,t,n){n=tn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zo||(Zo=!0,Lc=r),Sc(e,t)},n}function dy(e,t,n){n=tn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Sc(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Sc(e,t),typeof r!="function"&&(Tn===null?Tn=new Set([this]):Tn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Qf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new E_;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=U_.bind(null,e,t,n),t.then(e,e))}function Zf(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 Jf(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=tn(-1,1),t.tag=2,bn(n,t,1))),n.lanes|=1),e)}var P_=dn.ReactCurrentOwner,Qe=!1;function Ue(e,t,n,r){t.child=e===null?Vg(t,null,n,r):Yr(t,e.child,n,r)}function eh(e,t,n,r,i){n=n.render;var s=t.ref;return Br(t,i),r=qu(e,t,n,r,s,i),n=Ku(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ln(e,t,i)):(fe&&n&&Ru(t),t.flags|=1,Ue(e,t,r,i),t.child)}function th(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!rd(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,fy(e,t,s,r,i)):(e=No(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ji,n(o,r)&&e.ref===t.ref)return ln(e,t,i)}return t.flags|=1,e=Pn(s,r),e.ref=t.ref,e.return=t,t.child=e}function fy(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ji(s,r)&&e.ref===t.ref)if(Qe=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Qe=!0);else return t.lanes=e.lanes,ln(e,t,i)}return jc(e,t,n,r,i)}function hy(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ae(Lr,rt),rt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ae(Lr,rt),rt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ae(Lr,rt),rt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ae(Lr,rt),rt|=r;return Ue(e,t,i,n),t.child}function py(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function jc(e,t,n,r,i){var s=et(n)?or:Be.current;return s=Kr(t,s),Br(t,i),n=qu(e,t,n,r,s,i),r=Ku(),e!==null&&!Qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ln(e,t,i)):(fe&&r&&Ru(t),t.flags|=1,Ue(e,t,n,i),t.child)}function nh(e,t,n,r,i){if(et(n)){var s=!0;Bo(t)}else s=!1;if(Br(t,i),t.stateNode===null)wo(e,t),cy(t,n,r),wc(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=wt(u):(u=et(n)?or:Be.current,u=Kr(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||c!==u)&&Xf(t,o,r,u),mn=!1;var h=t.memoizedState;o.state=h,Ko(t,r,o,i),c=t.memoizedState,a!==r||h!==c||Je.current||mn?(typeof d=="function"&&(_c(t,n,d,r),c=t.memoizedState),(a=mn||Yf(t,n,a,r,h,c,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Bg(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:kt(t.type,a),o.props=u,f=t.pendingProps,h=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=wt(c):(c=et(n)?or:Be.current,c=Kr(t,c));var g=n.getDerivedStateFromProps;(d=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==c)&&Xf(t,o,r,c),mn=!1,h=t.memoizedState,o.state=h,Ko(t,r,o,i);var w=t.memoizedState;a!==f||h!==w||Je.current||mn?(typeof g=="function"&&(_c(t,n,g,r),w=t.memoizedState),(u=mn||Yf(t,n,u,r,h,w,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Nc(e,t,n,r,s,i)}function Nc(e,t,n,r,i,s){py(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&zf(t,n,!1),ln(e,t,s);r=t.stateNode,P_.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Yr(t,e.child,null,s),t.child=Yr(t,null,a,s)):Ue(e,t,a,s),t.memoizedState=r.state,i&&zf(t,n,!0),t.child}function my(e){var t=e.stateNode;t.pendingContext?Vf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Vf(e,t.context,!1),Bu(e,t.containerInfo)}function rh(e,t,n,r,i){return Gr(),Iu(i),t.flags|=256,Ue(e,t,n,r),t.child}var kc={dehydrated:null,treeContext:null,retryLane:0};function Cc(e){return{baseLanes:e,cachePool:null,transitions:null}}function gy(e,t,n){var r=t.pendingProps,i=pe.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ae(pe,i&1),e===null)return vc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Aa(o,r,0,null),e=rr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Cc(n),t.memoizedState=kc,e):Xu(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return A_(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Pn(i,c),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Pn(a,s):(s=rr(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Cc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=kc,r}return s=e.child,e=s.sibling,r=Pn(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Xu(e,t){return t=Aa({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ys(e,t,n,r){return r!==null&&Iu(r),Yr(t,e.child,null,n),e=Xu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function A_(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=yl(Error(O(422))),Ys(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Aa({mode:"visible",children:r.children},i,0,null),s=rr(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Yr(t,e.child,null,o),t.child.memoizedState=Cc(o),t.memoizedState=kc,s);if(!(t.mode&1))return Ys(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(O(419)),r=yl(s,r,void 0),Ys(e,t,o,r)}if(a=(o&e.childLanes)!==0,Qe||a){if(r=Pe,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,an(e,i),At(r,e,i,-1))}return nd(),r=yl(Error(O(421))),Ys(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=H_.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,it=Cn(i.nextSibling),st=t,fe=!0,bt=null,e!==null&&(yt[vt++]=Zt,yt[vt++]=Jt,yt[vt++]=ar,Zt=e.id,Jt=e.overflow,ar=t),t=Xu(t,r.children),t.flags|=4096,t)}function ih(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),xc(e.return,t,n)}function vl(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function yy(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Ue(e,t,r.children,n),r=pe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ih(e,n,t);else if(e.tag===19)ih(e,n,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}r&=1}if(ae(pe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Go(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vl(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Go(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vl(t,!0,n,null,s);break;case"together":vl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function wo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ln(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),cr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,n=Pn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function L_(e,t,n){switch(t.tag){case 3:my(t),Gr();break;case 5:Ug(t);break;case 1:et(t.type)&&Bo(t);break;case 4:Bu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ae(Wo,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ae(pe,pe.current&1),t.flags|=128,null):n&t.child.childLanes?gy(e,t,n):(ae(pe,pe.current&1),e=ln(e,t,n),e!==null?e.sibling:null);ae(pe,pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return yy(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ae(pe,pe.current),r)break;return null;case 22:case 23:return t.lanes=0,hy(e,t,n)}return ln(e,t,n)}var vy,bc,xy,_y;vy=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};bc=function(){};xy=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Jn(Vt.current);var s=null;switch(n){case"input":i=Yl(e,i),r=Yl(e,r),s=[];break;case"select":i=ye({},i,{value:void 0}),r=ye({},r,{value:void 0}),s=[];break;case"textarea":i=Zl(e,i),r=Zl(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Vo)}ec(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(qi.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&a[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(qi.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&le("scroll",e),s||a===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};_y=function(e,t,n,r){n!==r&&(t.flags|=4)};function yi(e,t){if(!fe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function M_(e,t,n){var r=t.pendingProps;switch(Du(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return et(t.type)&&zo(),Ie(t),null;case 3:return r=t.stateNode,Xr(),ce(Je),ce(Be),Hu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ks(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bt!==null&&(Dc(bt),bt=null))),bc(e,t),Ie(t),null;case 5:Uu(t);var i=Jn(is.current);if(n=t.type,e!==null&&t.stateNode!=null)xy(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(O(166));return Ie(t),null}if(e=Jn(Vt.current),Ks(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Ft]=t,r[ns]=s,e=(t.mode&1)!==0,n){case"dialog":le("cancel",r),le("close",r);break;case"iframe":case"object":case"embed":le("load",r);break;case"video":case"audio":for(i=0;i<Ci.length;i++)le(Ci[i],r);break;case"source":le("error",r);break;case"img":case"image":case"link":le("error",r),le("load",r);break;case"details":le("toggle",r);break;case"input":hf(r,s),le("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},le("invalid",r);break;case"textarea":mf(r,s),le("invalid",r)}ec(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&qs(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&qs(r.textContent,a,e),i=["children",""+a]):qi.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&le("scroll",r)}switch(n){case"input":Fs(r),pf(r,s,!0);break;case"textarea":Fs(r),gf(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Vo)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Gm(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ft]=t,e[ns]=r,vy(e,t,!1,!1),t.stateNode=e;e:{switch(o=tc(n,r),n){case"dialog":le("cancel",e),le("close",e),i=r;break;case"iframe":case"object":case"embed":le("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ci.length;i++)le(Ci[i],e);i=r;break;case"source":le("error",e),i=r;break;case"img":case"image":case"link":le("error",e),le("load",e),i=r;break;case"details":le("toggle",e),i=r;break;case"input":hf(e,r),i=Yl(e,r),le("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=ye({},r,{value:void 0}),le("invalid",e);break;case"textarea":mf(e,r),i=Zl(e,r),le("invalid",e);break;default:i=r}ec(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var c=a[s];s==="style"?Qm(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Ym(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Ki(e,c):typeof c=="number"&&Ki(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(qi.hasOwnProperty(s)?c!=null&&s==="onScroll"&&le("scroll",e):c!=null&&_u(e,s,c,o))}switch(n){case"input":Fs(e),pf(e,r,!1);break;case"textarea":Fs(e),gf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ln(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Fr(e,!!r.multiple,s,!1):r.defaultValue!=null&&Fr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Vo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ie(t),null;case 6:if(e&&t.stateNode!=null)_y(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=Jn(is.current),Jn(Vt.current),Ks(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ft]=t,(s=r.nodeValue!==n)&&(e=st,e!==null))switch(e.tag){case 3:qs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qs(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ft]=t,t.stateNode=r}return Ie(t),null;case 13:if(ce(pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(fe&&it!==null&&t.mode&1&&!(t.flags&128))Fg(),Gr(),t.flags|=98560,s=!1;else if(s=Ks(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(O(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(O(317));s[Ft]=t}else Gr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ie(t),s=!1}else bt!==null&&(Dc(bt),bt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||pe.current&1?Te===0&&(Te=3):nd())),t.updateQueue!==null&&(t.flags|=4),Ie(t),null);case 4:return Xr(),bc(e,t),e===null&&es(t.stateNode.containerInfo),Ie(t),null;case 10:return Ou(t.type._context),Ie(t),null;case 17:return et(t.type)&&zo(),Ie(t),null;case 19:if(ce(pe),s=t.memoizedState,s===null)return Ie(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)yi(s,!1);else{if(Te!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Go(e),o!==null){for(t.flags|=128,yi(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ae(pe,pe.current&1|2),t.child}e=e.sibling}s.tail!==null&&je()>Zr&&(t.flags|=128,r=!0,yi(s,!1),t.lanes=4194304)}else{if(!r)if(e=Go(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!fe)return Ie(t),null}else 2*je()-s.renderingStartTime>Zr&&n!==1073741824&&(t.flags|=128,r=!0,yi(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=je(),t.sibling=null,n=pe.current,ae(pe,r?n&1|2:n&1),t):(Ie(t),null);case 22:case 23:return td(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?rt&1073741824&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function R_(e,t){switch(Du(t),t.tag){case 1:return et(t.type)&&zo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xr(),ce(Je),ce(Be),Hu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Uu(t),null;case 13:if(ce(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Gr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(pe),null;case 4:return Xr(),null;case 10:return Ou(t.type._context),null;case 22:case 23:return td(),null;case 24:return null;default:return null}}var Xs=!1,Ve=!1,D_=typeof WeakSet=="function"?WeakSet:Set,q=null;function Ar(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){_e(e,t,r)}else n.current=null}function Tc(e,t,n){try{n()}catch(r){_e(e,t,r)}}var sh=!1;function I_(e,t){if(dc=$o,e=kg(),Mu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var g;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(c=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(g=f.firstChild)!==null;)h=f,f=g;for(;;){if(f===e)break t;if(h===n&&++u===i&&(a=o),h===s&&++d===r&&(c=o),(g=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=g}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(fc={focusedElem:e,selectionRange:n},$o=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var y=w.memoizedProps,_=w.memoizedState,p=t.stateNode,m=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:kt(t.type,y),_);p.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(x){_e(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return w=sh,sh=!1,w}function Oi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Tc(t,n,s)}i=i.next}while(i!==r)}}function Ea(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ec(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wy(e){var t=e.alternate;t!==null&&(e.alternate=null,wy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ft],delete t[ns],delete t[mc],delete t[v_],delete t[x_])),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 Sy(e){return e.tag===5||e.tag===3||e.tag===4}function oh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sy(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 Pc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Vo));else if(r!==4&&(e=e.child,e!==null))for(Pc(e,t,n),e=e.sibling;e!==null;)Pc(e,t,n),e=e.sibling}function Ac(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ac(e,t,n),e=e.sibling;e!==null;)Ac(e,t,n),e=e.sibling}var Ae=null,Ct=!1;function fn(e,t,n){for(n=n.child;n!==null;)jy(e,t,n),n=n.sibling}function jy(e,t,n){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(wa,n)}catch{}switch(n.tag){case 5:Ve||Ar(n,t);case 6:var r=Ae,i=Ct;Ae=null,fn(e,t,n),Ae=r,Ct=i,Ae!==null&&(Ct?(e=Ae,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ae.removeChild(n.stateNode));break;case 18:Ae!==null&&(Ct?(e=Ae,n=n.stateNode,e.nodeType===8?dl(e.parentNode,n):e.nodeType===1&&dl(e,n),Qi(e)):dl(Ae,n.stateNode));break;case 4:r=Ae,i=Ct,Ae=n.stateNode.containerInfo,Ct=!0,fn(e,t,n),Ae=r,Ct=i;break;case 0:case 11:case 14:case 15:if(!Ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Tc(n,t,o),i=i.next}while(i!==r)}fn(e,t,n);break;case 1:if(!Ve&&(Ar(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){_e(n,t,a)}fn(e,t,n);break;case 21:fn(e,t,n);break;case 22:n.mode&1?(Ve=(r=Ve)||n.memoizedState!==null,fn(e,t,n),Ve=r):fn(e,t,n);break;default:fn(e,t,n)}}function ah(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new D_),t.forEach(function(r){var i=W_.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function jt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ae=a.stateNode,Ct=!1;break e;case 3:Ae=a.stateNode.containerInfo,Ct=!0;break e;case 4:Ae=a.stateNode.containerInfo,Ct=!0;break e}a=a.return}if(Ae===null)throw Error(O(160));jy(s,o,i),Ae=null,Ct=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){_e(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ny(t,e),t=t.sibling}function Ny(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(jt(t,e),Dt(e),r&4){try{Oi(3,e,e.return),Ea(3,e)}catch(y){_e(e,e.return,y)}try{Oi(5,e,e.return)}catch(y){_e(e,e.return,y)}}break;case 1:jt(t,e),Dt(e),r&512&&n!==null&&Ar(n,n.return);break;case 5:if(jt(t,e),Dt(e),r&512&&n!==null&&Ar(n,n.return),e.flags&32){var i=e.stateNode;try{Ki(i,"")}catch(y){_e(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&qm(i,s),tc(a,o);var u=tc(a,s);for(o=0;o<c.length;o+=2){var d=c[o],f=c[o+1];d==="style"?Qm(i,f):d==="dangerouslySetInnerHTML"?Ym(i,f):d==="children"?Ki(i,f):_u(i,d,f,u)}switch(a){case"input":Xl(i,s);break;case"textarea":Km(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var g=s.value;g!=null?Fr(i,!!s.multiple,g,!1):h!==!!s.multiple&&(s.defaultValue!=null?Fr(i,!!s.multiple,s.defaultValue,!0):Fr(i,!!s.multiple,s.multiple?[]:"",!1))}i[ns]=s}catch(y){_e(e,e.return,y)}}break;case 6:if(jt(t,e),Dt(e),r&4){if(e.stateNode===null)throw Error(O(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){_e(e,e.return,y)}}break;case 3:if(jt(t,e),Dt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Qi(t.containerInfo)}catch(y){_e(e,e.return,y)}break;case 4:jt(t,e),Dt(e);break;case 13:jt(t,e),Dt(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Ju=je())),r&4&&ah(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ve=(u=Ve)||d,jt(t,e),Ve=u):jt(t,e),Dt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(q=e,d=e.child;d!==null;){for(f=q=d;q!==null;){switch(h=q,g=h.child,h.tag){case 0:case 11:case 14:case 15:Oi(4,h,h.return);break;case 1:Ar(h,h.return);var w=h.stateNode;if(typeof w.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(y){_e(r,n,y)}}break;case 5:Ar(h,h.return);break;case 22:if(h.memoizedState!==null){ch(f);continue}}g!==null?(g.return=h,q=g):ch(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,c=f.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=Xm("display",o))}catch(y){_e(e,e.return,y)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){_e(e,e.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:jt(t,e),Dt(e),r&4&&ah(e);break;case 21:break;default:jt(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Sy(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ki(i,""),r.flags&=-33);var s=oh(e);Ac(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=oh(e);Pc(e,a,o);break;default:throw Error(O(161))}}catch(c){_e(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $_(e,t,n){q=e,ky(e)}function ky(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var i=q,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Xs;if(!o){var a=i.alternate,c=a!==null&&a.memoizedState!==null||Ve;a=Xs;var u=Ve;if(Xs=o,(Ve=c)&&!u)for(q=i;q!==null;)o=q,c=o.child,o.tag===22&&o.memoizedState!==null?uh(i):c!==null?(c.return=o,q=c):uh(i);for(;s!==null;)q=s,ky(s),s=s.sibling;q=i,Xs=a,Ve=u}lh(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,q=s):lh(e)}}function lh(e){for(;q!==null;){var t=q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ve||Ea(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ve)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:kt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&qf(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}qf(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Qi(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Ve||t.flags&512&&Ec(t)}catch(h){_e(t,t.return,h)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function ch(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function uh(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ea(4,t)}catch(c){_e(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){_e(t,i,c)}}var s=t.return;try{Ec(t)}catch(c){_e(t,s,c)}break;case 5:var o=t.return;try{Ec(t)}catch(c){_e(t,o,c)}}}catch(c){_e(t,t.return,c)}if(t===e){q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,q=a;break}q=t.return}}var F_=Math.ceil,Qo=dn.ReactCurrentDispatcher,Qu=dn.ReactCurrentOwner,_t=dn.ReactCurrentBatchConfig,re=0,Pe=null,Ne=null,Me=0,rt=0,Lr=$n(0),Te=0,ls=null,cr=0,Pa=0,Zu=0,Vi=null,Xe=null,Ju=0,Zr=1/0,Kt=null,Zo=!1,Lc=null,Tn=null,Qs=!1,_n=null,Jo=0,zi=0,Mc=null,So=-1,jo=0;function qe(){return re&6?je():So!==-1?So:So=je()}function En(e){return e.mode&1?re&2&&Me!==0?Me&-Me:w_.transition!==null?(jo===0&&(jo=cg()),jo):(e=se,e!==0||(e=window.event,e=e===void 0?16:gg(e.type)),e):1}function At(e,t,n,r){if(50<zi)throw zi=0,Mc=null,Error(O(185));Ss(e,n,r),(!(re&2)||e!==Pe)&&(e===Pe&&(!(re&2)&&(Pa|=n),Te===4&&vn(e,Me)),tt(e,r),n===1&&re===0&&!(t.mode&1)&&(Zr=je()+500,Ca&&Fn()))}function tt(e,t){var n=e.callbackNode;w1(e,t);var r=Io(e,e===Pe?Me:0);if(r===0)n!==null&&xf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&xf(n),t===1)e.tag===0?__(dh.bind(null,e)):Dg(dh.bind(null,e)),g_(function(){!(re&6)&&Fn()}),n=null;else{switch(ug(r)){case 1:n=ku;break;case 4:n=ag;break;case 16:n=Do;break;case 536870912:n=lg;break;default:n=Do}n=My(n,Cy.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Cy(e,t){if(So=-1,jo=0,re&6)throw Error(O(327));var n=e.callbackNode;if(Ur()&&e.callbackNode!==n)return null;var r=Io(e,e===Pe?Me:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ea(e,r);else{t=r;var i=re;re|=2;var s=Ty();(Pe!==e||Me!==t)&&(Kt=null,Zr=je()+500,nr(e,t));do try{z_();break}catch(a){by(e,a)}while(!0);Fu(),Qo.current=s,re=i,Ne!==null?t=0:(Pe=null,Me=0,t=Te)}if(t!==0){if(t===2&&(i=oc(e),i!==0&&(r=i,t=Rc(e,i))),t===1)throw n=ls,nr(e,0),vn(e,r),tt(e,je()),n;if(t===6)vn(e,r);else{if(i=e.current.alternate,!(r&30)&&!O_(i)&&(t=ea(e,r),t===2&&(s=oc(e),s!==0&&(r=s,t=Rc(e,s))),t===1))throw n=ls,nr(e,0),vn(e,r),tt(e,je()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(O(345));case 2:Kn(e,Xe,Kt);break;case 3:if(vn(e,r),(r&130023424)===r&&(t=Ju+500-je(),10<t)){if(Io(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){qe(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=pc(Kn.bind(null,e,Xe,Kt),t);break}Kn(e,Xe,Kt);break;case 4:if(vn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Pt(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*F_(r/1960))-r,10<r){e.timeoutHandle=pc(Kn.bind(null,e,Xe,Kt),r);break}Kn(e,Xe,Kt);break;case 5:Kn(e,Xe,Kt);break;default:throw Error(O(329))}}}return tt(e,je()),e.callbackNode===n?Cy.bind(null,e):null}function Rc(e,t){var n=Vi;return e.current.memoizedState.isDehydrated&&(nr(e,t).flags|=256),e=ea(e,t),e!==2&&(t=Xe,Xe=n,t!==null&&Dc(t)),e}function Dc(e){Xe===null?Xe=e:Xe.push.apply(Xe,e)}function O_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Lt(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 vn(e,t){for(t&=~Zu,t&=~Pa,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Pt(t),r=1<<n;e[n]=-1,t&=~r}}function dh(e){if(re&6)throw Error(O(327));Ur();var t=Io(e,0);if(!(t&1))return tt(e,je()),null;var n=ea(e,t);if(e.tag!==0&&n===2){var r=oc(e);r!==0&&(t=r,n=Rc(e,r))}if(n===1)throw n=ls,nr(e,0),vn(e,t),tt(e,je()),n;if(n===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Kn(e,Xe,Kt),tt(e,je()),null}function ed(e,t){var n=re;re|=1;try{return e(t)}finally{re=n,re===0&&(Zr=je()+500,Ca&&Fn())}}function ur(e){_n!==null&&_n.tag===0&&!(re&6)&&Ur();var t=re;re|=1;var n=_t.transition,r=se;try{if(_t.transition=null,se=1,e)return e()}finally{se=r,_t.transition=n,re=t,!(re&6)&&Fn()}}function td(){rt=Lr.current,ce(Lr)}function nr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,m_(n)),Ne!==null)for(n=Ne.return;n!==null;){var r=n;switch(Du(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&zo();break;case 3:Xr(),ce(Je),ce(Be),Hu();break;case 5:Uu(r);break;case 4:Xr();break;case 13:ce(pe);break;case 19:ce(pe);break;case 10:Ou(r.type._context);break;case 22:case 23:td()}n=n.return}if(Pe=e,Ne=e=Pn(e.current,null),Me=rt=t,Te=0,ls=null,Zu=Pa=cr=0,Xe=Vi=null,Zn!==null){for(t=0;t<Zn.length;t++)if(n=Zn[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Zn=null}return e}function by(e,t){do{var n=Ne;try{if(Fu(),xo.current=Xo,Yo){for(var r=ge.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Yo=!1}if(lr=0,Ee=Ce=ge=null,Fi=!1,ss=0,Qu.current=null,n===null||n.return===null){Te=1,ls=t,Ne=null;break}e:{var s=e,o=n.return,a=n,c=t;if(t=Me,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var g=Zf(o);if(g!==null){g.flags&=-257,Jf(g,o,a,s,t),g.mode&1&&Qf(s,u,t),t=g,c=u;var w=t.updateQueue;if(w===null){var y=new Set;y.add(c),t.updateQueue=y}else w.add(c);break e}else{if(!(t&1)){Qf(s,u,t),nd();break e}c=Error(O(426))}}else if(fe&&a.mode&1){var _=Zf(o);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Jf(_,o,a,s,t),Iu(Qr(c,a));break e}}s=c=Qr(c,a),Te!==4&&(Te=2),Vi===null?Vi=[s]:Vi.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=uy(s,c,t);Wf(s,p);break e;case 1:a=c;var m=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof m.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Tn===null||!Tn.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var x=dy(s,a,t);Wf(s,x);break e}}s=s.return}while(s!==null)}Py(n)}catch(j){t=j,Ne===n&&n!==null&&(Ne=n=n.return);continue}break}while(!0)}function Ty(){var e=Qo.current;return Qo.current=Xo,e===null?Xo:e}function nd(){(Te===0||Te===3||Te===2)&&(Te=4),Pe===null||!(cr&268435455)&&!(Pa&268435455)||vn(Pe,Me)}function ea(e,t){var n=re;re|=2;var r=Ty();(Pe!==e||Me!==t)&&(Kt=null,nr(e,t));do try{V_();break}catch(i){by(e,i)}while(!0);if(Fu(),re=n,Qo.current=r,Ne!==null)throw Error(O(261));return Pe=null,Me=0,Te}function V_(){for(;Ne!==null;)Ey(Ne)}function z_(){for(;Ne!==null&&!f1();)Ey(Ne)}function Ey(e){var t=Ly(e.alternate,e,rt);e.memoizedProps=e.pendingProps,t===null?Py(e):Ne=t,Qu.current=null}function Py(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=R_(n,t),n!==null){n.flags&=32767,Ne=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Te=6,Ne=null;return}}else if(n=M_(n,t,rt),n!==null){Ne=n;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);Te===0&&(Te=5)}function Kn(e,t,n){var r=se,i=_t.transition;try{_t.transition=null,se=1,B_(e,t,n,r)}finally{_t.transition=i,se=r}return null}function B_(e,t,n,r){do Ur();while(_n!==null);if(re&6)throw Error(O(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(O(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(S1(e,s),e===Pe&&(Ne=Pe=null,Me=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Qs||(Qs=!0,My(Do,function(){return Ur(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=_t.transition,_t.transition=null;var o=se;se=1;var a=re;re|=4,Qu.current=null,I_(e,n),Ny(n,e),l_(fc),$o=!!dc,fc=dc=null,e.current=n,$_(n),h1(),re=a,se=o,_t.transition=s}else e.current=n;if(Qs&&(Qs=!1,_n=e,Jo=i),s=e.pendingLanes,s===0&&(Tn=null),g1(n.stateNode),tt(e,je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Zo)throw Zo=!1,e=Lc,Lc=null,e;return Jo&1&&e.tag!==0&&Ur(),s=e.pendingLanes,s&1?e===Mc?zi++:(zi=0,Mc=e):zi=0,Fn(),null}function Ur(){if(_n!==null){var e=ug(Jo),t=_t.transition,n=se;try{if(_t.transition=null,se=16>e?16:e,_n===null)var r=!1;else{if(e=_n,_n=null,Jo=0,re&6)throw Error(O(331));var i=re;for(re|=4,q=e.current;q!==null;){var s=q,o=s.child;if(q.flags&16){var a=s.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(q=u;q!==null;){var d=q;switch(d.tag){case 0:case 11:case 15:Oi(8,d,s)}var f=d.child;if(f!==null)f.return=d,q=f;else for(;q!==null;){d=q;var h=d.sibling,g=d.return;if(wy(d),d===u){q=null;break}if(h!==null){h.return=g,q=h;break}q=g}}}var w=s.alternate;if(w!==null){var y=w.child;if(y!==null){w.child=null;do{var _=y.sibling;y.sibling=null,y=_}while(y!==null)}}q=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,q=o;else e:for(;q!==null;){if(s=q,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Oi(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,q=p;break e}q=s.return}}var m=e.current;for(q=m;q!==null;){o=q;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,q=v;else e:for(o=m;q!==null;){if(a=q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ea(9,a)}}catch(j){_e(a,a.return,j)}if(a===o){q=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,q=x;break e}q=a.return}}if(re=i,Fn(),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(wa,e)}catch{}r=!0}return r}finally{se=n,_t.transition=t}}return!1}function fh(e,t,n){t=Qr(n,t),t=uy(e,t,1),e=bn(e,t,1),t=qe(),e!==null&&(Ss(e,1,t),tt(e,t))}function _e(e,t,n){if(e.tag===3)fh(e,e,n);else for(;t!==null;){if(t.tag===3){fh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Tn===null||!Tn.has(r))){e=Qr(n,e),e=dy(t,e,1),t=bn(t,e,1),e=qe(),t!==null&&(Ss(t,1,e),tt(t,e));break}}t=t.return}}function U_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=qe(),e.pingedLanes|=e.suspendedLanes&n,Pe===e&&(Me&n)===n&&(Te===4||Te===3&&(Me&130023424)===Me&&500>je()-Ju?nr(e,0):Zu|=n),tt(e,t)}function Ay(e,t){t===0&&(e.mode&1?(t=zs,zs<<=1,!(zs&130023424)&&(zs=4194304)):t=1);var n=qe();e=an(e,t),e!==null&&(Ss(e,t,n),tt(e,n))}function H_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ay(e,n)}function W_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),Ay(e,n)}var Ly;Ly=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Je.current)Qe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Qe=!1,L_(e,t,n);Qe=!!(e.flags&131072)}else Qe=!1,fe&&t.flags&1048576&&Ig(t,Ho,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;wo(e,t),e=t.pendingProps;var i=Kr(t,Be.current);Br(t,n),i=qu(null,t,r,e,i,n);var s=Ku();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,et(r)?(s=!0,Bo(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,zu(t),i.updater=Ta,t.stateNode=i,i._reactInternals=t,wc(t,r,e,n),t=Nc(null,t,r,!0,s,n)):(t.tag=0,fe&&s&&Ru(t),Ue(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(wo(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=K_(r),e=kt(r,e),i){case 0:t=jc(null,t,r,e,n);break e;case 1:t=nh(null,t,r,e,n);break e;case 11:t=eh(null,t,r,e,n);break e;case 14:t=th(null,t,r,kt(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),jc(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),nh(e,t,r,i,n);case 3:e:{if(my(t),e===null)throw Error(O(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Bg(e,t),Ko(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Qr(Error(O(423)),t),t=rh(e,t,r,n,i);break e}else if(r!==i){i=Qr(Error(O(424)),t),t=rh(e,t,r,n,i);break e}else for(it=Cn(t.stateNode.containerInfo.firstChild),st=t,fe=!0,bt=null,n=Vg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gr(),r===i){t=ln(e,t,n);break e}Ue(e,t,r,n)}t=t.child}return t;case 5:return Ug(t),e===null&&vc(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,hc(r,i)?o=null:s!==null&&hc(r,s)&&(t.flags|=32),py(e,t),Ue(e,t,o,n),t.child;case 6:return e===null&&vc(t),null;case 13:return gy(e,t,n);case 4:return Bu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yr(t,null,r,n):Ue(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),eh(e,t,r,i,n);case 7:return Ue(e,t,t.pendingProps,n),t.child;case 8:return Ue(e,t,t.pendingProps.children,n),t.child;case 12:return Ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,ae(Wo,r._currentValue),r._currentValue=o,s!==null)if(Lt(s.value,o)){if(s.children===i.children&&!Je.current){t=ln(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=tn(-1,n&-n),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),xc(s.return,n,t),a.lanes|=n;break}c=c.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(O(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),xc(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ue(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Br(t,n),i=wt(i),r=r(i),t.flags|=1,Ue(e,t,r,n),t.child;case 14:return r=t.type,i=kt(r,t.pendingProps),i=kt(r.type,i),th(e,t,r,i,n);case 15:return fy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kt(r,i),wo(e,t),t.tag=1,et(r)?(e=!0,Bo(t)):e=!1,Br(t,n),cy(t,r,i),wc(t,r,i,n),Nc(null,t,r,!0,e,n);case 19:return yy(e,t,n);case 22:return hy(e,t,n)}throw Error(O(156,t.tag))};function My(e,t){return og(e,t)}function q_(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xt(e,t,n,r){return new q_(e,t,n,r)}function rd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function K_(e){if(typeof e=="function")return rd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Su)return 11;if(e===ju)return 14}return 2}function Pn(e,t){var n=e.alternate;return n===null?(n=xt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function No(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")rd(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Sr:return rr(n.children,i,s,t);case wu:o=8,i|=8;break;case Wl:return e=xt(12,n,t,i|2),e.elementType=Wl,e.lanes=s,e;case ql:return e=xt(13,n,t,i),e.elementType=ql,e.lanes=s,e;case Kl:return e=xt(19,n,t,i),e.elementType=Kl,e.lanes=s,e;case Um:return Aa(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zm:o=10;break e;case Bm:o=9;break e;case Su:o=11;break e;case ju:o=14;break e;case pn:o=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=xt(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function rr(e,t,n,r){return e=xt(7,e,r,t),e.lanes=n,e}function Aa(e,t,n,r){return e=xt(22,e,r,t),e.elementType=Um,e.lanes=n,e.stateNode={isHidden:!1},e}function xl(e,t,n){return e=xt(6,e,null,t),e.lanes=n,e}function _l(e,t,n){return t=xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function G_(e,t,n,r,i){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=el(0),this.expirationTimes=el(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=el(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function id(e,t,n,r,i,s,o,a,c){return e=new G_(e,t,n,a,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=xt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zu(s),e}function Y_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ry(e){if(!e)return Mn;e=e._reactInternals;e:{if(hr(e)!==e||e.tag!==1)throw Error(O(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(O(171))}if(e.tag===1){var n=e.type;if(et(n))return Rg(e,n,t)}return t}function Dy(e,t,n,r,i,s,o,a,c){return e=id(n,r,!0,e,i,s,o,a,c),e.context=Ry(null),n=e.current,r=qe(),i=En(n),s=tn(r,i),s.callback=t??null,bn(n,s,i),e.current.lanes=i,Ss(e,i,r),tt(e,r),e}function La(e,t,n,r){var i=t.current,s=qe(),o=En(i);return n=Ry(n),t.context===null?t.context=n:t.pendingContext=n,t=tn(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=bn(i,t,o),e!==null&&(At(e,i,o,s),vo(e,i,o)),o}function ta(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 hh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sd(e,t){hh(e,t),(e=e.alternate)&&hh(e,t)}function X_(){return null}var Iy=typeof reportError=="function"?reportError:function(e){console.error(e)};function od(e){this._internalRoot=e}Ma.prototype.render=od.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));La(e,t,null,null)};Ma.prototype.unmount=od.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ur(function(){La(null,e,null,null)}),t[on]=null}};function Ma(e){this._internalRoot=e}Ma.prototype.unstable_scheduleHydration=function(e){if(e){var t=hg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<yn.length&&t!==0&&t<yn[n].priority;n++);yn.splice(n,0,e),n===0&&mg(e)}};function ad(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ra(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ph(){}function Q_(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=ta(o);s.call(u)}}var o=Dy(t,r,e,0,null,!1,!1,"",ph);return e._reactRootContainer=o,e[on]=o.current,es(e.nodeType===8?e.parentNode:e),ur(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=ta(c);a.call(u)}}var c=id(e,0,!1,null,null,!1,!1,"",ph);return e._reactRootContainer=c,e[on]=c.current,es(e.nodeType===8?e.parentNode:e),ur(function(){La(t,c,n,r)}),c}function Da(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var c=ta(o);a.call(c)}}La(t,o,e,i)}else o=Q_(n,t,e,i,r);return ta(o)}dg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ki(t.pendingLanes);n!==0&&(Cu(t,n|1),tt(t,je()),!(re&6)&&(Zr=je()+500,Fn()))}break;case 13:ur(function(){var r=an(e,1);if(r!==null){var i=qe();At(r,e,1,i)}}),sd(e,1)}};bu=function(e){if(e.tag===13){var t=an(e,134217728);if(t!==null){var n=qe();At(t,e,134217728,n)}sd(e,134217728)}};fg=function(e){if(e.tag===13){var t=En(e),n=an(e,t);if(n!==null){var r=qe();At(n,e,t,r)}sd(e,t)}};hg=function(){return se};pg=function(e,t){var n=se;try{return se=e,t()}finally{se=n}};rc=function(e,t,n){switch(t){case"input":if(Xl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ka(r);if(!i)throw Error(O(90));Wm(r),Xl(r,i)}}}break;case"textarea":Km(e,n);break;case"select":t=n.value,t!=null&&Fr(e,!!n.multiple,t,!1)}};eg=ed;tg=ur;var Z_={usingClientEntryPoint:!1,Events:[Ns,Cr,ka,Zm,Jm,ed]},vi={findFiberByHostInstance:Qn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},J_={bundleType:vi.bundleType,version:vi.version,rendererPackageName:vi.rendererPackageName,rendererConfig:vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:dn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ig(e),e===null?null:e.stateNode},findFiberByHostInstance:vi.findFiberByHostInstance||X_,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 Zs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zs.isDisabled&&Zs.supportsFiber)try{wa=Zs.inject(J_),Ot=Zs}catch{}}ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z_;ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ad(t))throw Error(O(200));return Y_(e,t,null,n)};ut.createRoot=function(e,t){if(!ad(e))throw Error(O(299));var n=!1,r="",i=Iy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=id(e,1,!1,null,null,n,!1,r,i),e[on]=t.current,es(e.nodeType===8?e.parentNode:e),new od(t)};ut.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(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=ig(t),e=e===null?null:e.stateNode,e};ut.flushSync=function(e){return ur(e)};ut.hydrate=function(e,t,n){if(!Ra(t))throw Error(O(200));return Da(null,e,t,!0,n)};ut.hydrateRoot=function(e,t,n){if(!ad(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Iy;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Dy(t,null,e,1,n??null,i,!1,s,o),e[on]=t.current,es(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Ma(t)};ut.render=function(e,t,n){if(!Ra(t))throw Error(O(200));return Da(null,e,t,!1,n)};ut.unmountComponentAtNode=function(e){if(!Ra(e))throw Error(O(40));return e._reactRootContainer?(ur(function(){Da(null,null,e,!1,function(){e._reactRootContainer=null,e[on]=null})}),!0):!1};ut.unstable_batchedUpdates=ed;ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ra(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return Da(e,t,n,!1,r)};ut.version="18.3.1-next-f1338f8080-20240426";function $y(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($y)}catch(e){console.error(e)}}$y(),$m.exports=ut;var ew=$m.exports,Fy,mh=ew;Fy=mh.createRoot,mh.hydrateRoot;/**
|
|
41
|
+
* @remix-run/router v1.23.3
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/function cs(){return cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cs.apply(null,arguments)}var wn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(wn||(wn={}));const gh="popstate";function tw(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:o,hash:a}=r.location;return Ic("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:na(i)}return rw(t,n,null,e)}function we(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ld(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nw(){return Math.random().toString(36).substr(2,8)}function yh(e,t){return{usr:e.state,key:e.key,idx:t}}function Ic(e,t,n,r){return n===void 0&&(n=null),cs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?li(t):t,{state:n,key:t&&t.key||r||nw()})}function na(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function li(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function rw(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=wn.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(cs({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=wn.Pop;let _=d(),p=_==null?null:_-u;u=_,c&&c({action:a,location:y.location,delta:p})}function h(_,p){a=wn.Push;let m=Ic(y.location,_,p);u=d()+1;let v=yh(m,u),x=y.createHref(m);try{o.pushState(v,"",x)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(x)}s&&c&&c({action:a,location:y.location,delta:1})}function g(_,p){a=wn.Replace;let m=Ic(y.location,_,p);u=d();let v=yh(m,u),x=y.createHref(m);o.replaceState(v,"",x),s&&c&&c({action:a,location:y.location,delta:0})}function w(_){let p=i.location.origin!=="null"?i.location.origin:i.location.href,m=typeof _=="string"?_:na(_);return m=m.replace(/ $/,"%20"),we(p,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,p)}let y={get action(){return a},get location(){return e(i,o)},listen(_){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(gh,f),c=_,()=>{i.removeEventListener(gh,f),c=null}},createHref(_){return t(i,_)},createURL:w,encodeLocation(_){let p=w(_);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:h,replace:g,go(_){return o.go(_)}};return y}var vh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(vh||(vh={}));function iw(e,t,n){return n===void 0&&(n="/"),sw(e,t,n)}function sw(e,t,n,r){let i=typeof t=="string"?li(t):t,s=Jr(i.pathname||"/",n);if(s==null)return null;let o=Oy(e);ow(o);let a=null,c=yw(s);for(let u=0;a==null&&u<o.length;++u)a=mw(o[u],c);return a}function Oy(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,a)=>{let c={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};c.relativePath.startsWith("/")&&(we(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=An([r,c.relativePath]),d=n.concat(c);s.children&&s.children.length>0&&(we(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Oy(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:hw(u,s.index),routesMeta:d})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let c of Vy(s.path))i(s,o,c)}),t}function Vy(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=Vy(r.join("/")),a=[];return a.push(...o.map(c=>c===""?s:[s,c].join("/"))),i&&a.push(...o),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function ow(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:pw(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const aw=/^:[\w-]+$/,lw=3,cw=2,uw=1,dw=10,fw=-2,xh=e=>e==="*";function hw(e,t){let n=e.split("/"),r=n.length;return n.some(xh)&&(r+=fw),t&&(r+=cw),n.filter(i=>!xh(i)).reduce((i,s)=>i+(aw.test(s)?lw:s===""?uw:dw),r)}function pw(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function mw(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let c=r[a],u=a===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",f=$c({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f)return null;Object.assign(i,f.params),o.push({params:i,pathname:An([s,f.pathname]),pathnameBase:Sw(An([s,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(s=An([s,f.pathnameBase]))}return o}function $c(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=gw(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:h,isOptional:g}=d;if(h==="*"){let y=a[f]||"";o=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const w=a[f];return g&&!w?u[h]=void 0:u[h]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function gw(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ld(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,c)=>(r.push({paramName:a,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function yw(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ld(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Jr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const vw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xw=e=>vw.test(e);function _w(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?li(e):e,s;if(n)if(xw(n))s=n;else{if(n.includes("//")){let o=n;n=Uy(n),ld(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?s=_h(n.substring(1),"/"):s=_h(n,t)}else s=t;return{pathname:s,search:jw(r),hash:Nw(i)}}function _h(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function wl(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function ww(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function zy(e,t){let n=ww(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function By(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=li(e):(i=cs({},e),we(!i.pathname||!i.pathname.includes("?"),wl("?","pathname","search",i)),we(!i.pathname||!i.pathname.includes("#"),wl("#","pathname","hash",i)),we(!i.search||!i.search.includes("#"),wl("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}a=f>=0?t[f]:"/"}let c=_w(i,a),u=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Uy=e=>e.replace(/\/\/+/g,"/"),An=e=>Uy(e.join("/")),Sw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),jw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Nw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function kw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Hy=["post","put","patch","delete"];new Set(Hy);const Cw=["get",...Hy];new Set(Cw);/**
|
|
50
|
+
* React Router v6.30.4
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/function us(){return us=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},us.apply(null,arguments)}const Ia=S.createContext(null),Wy=S.createContext(null),On=S.createContext(null),$a=S.createContext(null),Vn=S.createContext({outlet:null,matches:[],isDataRoute:!1}),qy=S.createContext(null);function bw(e,t){let{relative:n}=t===void 0?{}:t;Cs()||we(!1);let{basename:r,navigator:i}=S.useContext(On),{hash:s,pathname:o,search:a}=Fa(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:An([r,o])),i.createHref({pathname:c,search:a,hash:s})}function Cs(){return S.useContext($a)!=null}function pr(){return Cs()||we(!1),S.useContext($a).location}function Ky(e){S.useContext(On).static||S.useLayoutEffect(e)}function cd(){let{isDataRoute:e}=S.useContext(Vn);return e?Bw():Tw()}function Tw(){Cs()||we(!1);let e=S.useContext(Ia),{basename:t,future:n,navigator:r}=S.useContext(On),{matches:i}=S.useContext(Vn),{pathname:s}=pr(),o=JSON.stringify(zy(i,n.v7_relativeSplatPath)),a=S.useRef(!1);return Ky(()=>{a.current=!0}),S.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=By(u,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:An([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,s,e])}const Ew=S.createContext(null);function Pw(e){let t=S.useContext(Vn).outlet;return t&&S.createElement(Ew.Provider,{value:e},t)}function Fa(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=S.useContext(On),{matches:i}=S.useContext(Vn),{pathname:s}=pr(),o=JSON.stringify(zy(i,r.v7_relativeSplatPath));return S.useMemo(()=>By(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function Aw(e,t){return Lw(e,t)}function Lw(e,t,n,r){Cs()||we(!1);let{navigator:i}=S.useContext(On),{matches:s}=S.useContext(Vn),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=pr(),d;if(t){var f;let _=typeof t=="string"?li(t):t;c==="/"||(f=_.pathname)!=null&&f.startsWith(c)||we(!1),d=_}else d=u;let h=d.pathname||"/",g=h;if(c!=="/"){let _=c.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(_.length).join("/")}let w=iw(e,{pathname:g}),y=$w(w&&w.map(_=>Object.assign({},_,{params:Object.assign({},a,_.params),pathname:An([c,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?c:An([c,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,n,r);return t&&y?S.createElement($a.Provider,{value:{location:us({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:wn.Pop}},y):y}function Mw(){let e=zw(),t=kw(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:i},n):null,null)}const Rw=S.createElement(Mw,null);class Dw extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?S.createElement(Vn.Provider,{value:this.props.routeContext},S.createElement(qy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Iw(e){let{routeContext:t,match:n,children:r}=e,i=S.useContext(Ia);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(Vn.Provider,{value:t},r)}function $w(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let d=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);d>=0||we(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:g}=n,w=f.route.loader&&h[f.route.id]===void 0&&(!g||g[f.route.id]===void 0);if(f.route.lazy||w){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let g,w=!1,y=null,_=null;n&&(g=a&&f.route.id?a[f.route.id]:void 0,y=f.route.errorElement||Rw,c&&(u<0&&h===0?(Uw("route-fallback"),w=!0,_=null):u===h&&(w=!0,_=f.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,h+1)),m=()=>{let v;return g?v=y:w?v=_:f.route.Component?v=S.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=d,S.createElement(Iw,{match:f,routeContext:{outlet:d,matches:p,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?S.createElement(Dw,{location:n.location,revalidation:n.revalidation,component:y,error:g,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var Gy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Gy||{}),Yy=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Yy||{});function Fw(e){let t=S.useContext(Ia);return t||we(!1),t}function Ow(e){let t=S.useContext(Wy);return t||we(!1),t}function Vw(e){let t=S.useContext(Vn);return t||we(!1),t}function Xy(e){let t=Vw(),n=t.matches[t.matches.length-1];return n.route.id||we(!1),n.route.id}function zw(){var e;let t=S.useContext(qy),n=Ow(),r=Xy();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Bw(){let{router:e}=Fw(Gy.UseNavigateStable),t=Xy(Yy.UseNavigateStable),n=S.useRef(!1);return Ky(()=>{n.current=!0}),S.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,us({fromRouteId:t},s)))},[e,t])}const wh={};function Uw(e,t,n){wh[e]||(wh[e]=!0)}function Hw(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ww(e){return Pw(e.context)}function It(e){we(!1)}function qw(e){let{basename:t="/",children:n=null,location:r,navigationType:i=wn.Pop,navigator:s,static:o=!1,future:a}=e;Cs()&&we(!1);let c=t.replace(/^\/*/,"/"),u=S.useMemo(()=>({basename:c,navigator:s,static:o,future:us({v7_relativeSplatPath:!1},a)}),[c,a,s,o]);typeof r=="string"&&(r=li(r));let{pathname:d="/",search:f="",hash:h="",state:g=null,key:w="default"}=r,y=S.useMemo(()=>{let _=Jr(d,c);return _==null?null:{location:{pathname:_,search:f,hash:h,state:g,key:w},navigationType:i}},[c,d,f,h,g,w,i]);return y==null?null:S.createElement(On.Provider,{value:u},S.createElement($a.Provider,{children:n,value:y}))}function Kw(e){let{children:t,location:n}=e;return Aw(Fc(t),n)}new Promise(()=>{});function Fc(e,t){t===void 0&&(t=[]);let n=[];return S.Children.forEach(e,(r,i)=>{if(!S.isValidElement(r))return;let s=[...t,i];if(r.type===S.Fragment){n.push.apply(n,Fc(r.props.children,s));return}r.type!==It&&we(!1),!r.props.index||!r.props.children||we(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Fc(r.props.children,s)),n.push(o)}),n}/**
|
|
59
|
+
* React Router DOM v6.30.4
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Remix Software Inc.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
65
|
+
*
|
|
66
|
+
* @license MIT
|
|
67
|
+
*/function ra(){return ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ra.apply(null,arguments)}function Qy(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Gw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yw(e,t){return e.button===0&&(!t||t==="_self")&&!Gw(e)}function Oc(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function Xw(e,t){let n=Oc(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(s=>{n.append(i,s)})}),n}const Qw=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Zw=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Jw="6";try{window.__reactRouterVersion=Jw}catch{}const eS=S.createContext({isTransitioning:!1}),tS="startTransition",Sh=Ux[tS];function nS(e){let{basename:t,children:n,future:r,window:i}=e,s=S.useRef();s.current==null&&(s.current=tw({window:i,v5Compat:!0}));let o=s.current,[a,c]=S.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=S.useCallback(f=>{u&&Sh?Sh(()=>c(f)):c(f)},[c,u]);return S.useLayoutEffect(()=>o.listen(d),[o,d]),S.useEffect(()=>Hw(r),[r]),S.createElement(qw,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const rS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ia=S.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:c,to:u,preventScrollReset:d,viewTransition:f}=t,h=Qy(t,Qw),{basename:g}=S.useContext(On),w,y=!1;if(typeof u=="string"&&iS.test(u)&&(w=u,rS))try{let v=new URL(window.location.href),x=u.startsWith("//")?new URL(v.protocol+u):new URL(u),j=Jr(x.pathname,g);x.origin===v.origin&&j!=null?u=j+x.search+x.hash:y=!0}catch{}let _=bw(u,{relative:i}),p=aS(u,{replace:o,state:a,target:c,preventScrollReset:d,relative:i,viewTransition:f});function m(v){r&&r(v),v.defaultPrevented||p(v)}return S.createElement("a",ra({},h,{href:w||_,onClick:y||s?r:m,ref:n,target:c}))}),sS=S.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:a,to:c,viewTransition:u,children:d}=t,f=Qy(t,Zw),h=Fa(c,{relative:f.relative}),g=pr(),w=S.useContext(Wy),{navigator:y,basename:_}=S.useContext(On),p=w!=null&&lS(h)&&u===!0,m=y.encodeLocation?y.encodeLocation(h).pathname:h.pathname,v=g.pathname,x=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;i||(v=v.toLowerCase(),x=x?x.toLowerCase():null,m=m.toLowerCase()),x&&_&&(x=Jr(x,_)||x);const j=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let C=v===m||!o&&v.startsWith(m)&&v.charAt(j)==="/",b=x!=null&&(x===m||!o&&x.startsWith(m)&&x.charAt(m.length)==="/"),k={isActive:C,isPending:b,isTransitioning:p},I=C?r:void 0,R;typeof s=="function"?R=s(k):R=[s,C?"active":null,b?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let K=typeof a=="function"?a(k):a;return S.createElement(ia,ra({},f,{"aria-current":I,className:R,ref:n,style:K,to:c,viewTransition:u}),typeof d=="function"?d(k):d)});var Vc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Vc||(Vc={}));var jh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(jh||(jh={}));function oS(e){let t=S.useContext(Ia);return t||we(!1),t}function aS(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=t===void 0?{}:t,c=cd(),u=pr(),d=Fa(e,{relative:o});return S.useCallback(f=>{if(Yw(f,n)){f.preventDefault();let h=r!==void 0?r:na(u)===na(d);c(e,{replace:h,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,c,d,r,i,n,e,s,o,a])}function Zy(e){let t=S.useRef(Oc(e)),n=S.useRef(!1),r=pr(),i=S.useMemo(()=>Xw(r.search,n.current?null:t.current),[r.search]),s=cd(),o=S.useCallback((a,c)=>{const u=Oc(typeof a=="function"?a(i):a);n.current=!0,s("?"+u,c)},[s,i]);return[i,o]}function lS(e,t){t===void 0&&(t={});let n=S.useContext(eS);n==null&&we(!1);let{basename:r}=oS(Vc.useViewTransitionState),i=Fa(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=Jr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Jr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return $c(i.pathname,o)!=null||$c(i.pathname,s)!=null}const Jy=S.createContext({});function ev(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const ud=S.createContext(null),sa=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function cS(e=!0){const t=S.useContext(ud);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=S.useId();S.useEffect(()=>{e&&i(s)},[e]);const o=S.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const dd=typeof window<"u",uS=dd?S.useLayoutEffect:S.useEffect,ot=e=>e;let tv=ot;function fd(e){let t;return()=>(t===void 0&&(t=e()),t)}const ei=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},nn=e=>e*1e3,rn=e=>e/1e3,dS={useManualTiming:!1};function fS(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){s.has(u)&&(c.schedule(u),e()),u(o)}const c={schedule:(u,d=!1,f=!1)=>{const g=f&&r?t:n;return d&&s.add(u),g.has(u)||g.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,i&&(i=!1,c.process(u))}};return c}const Js=["read","resolveKeyframes","update","preRender","render","postRender"],hS=40;function nv(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Js.reduce((p,m)=>(p[m]=fS(s),p),{}),{read:a,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:h}=o,g=()=>{const p=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(p-i.timestamp,hS),1),i.timestamp=p,i.isProcessing=!0,a.process(i),c.process(i),u.process(i),d.process(i),f.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(g))},w=()=>{n=!0,r=!0,i.isProcessing||e(g)};return{schedule:Js.reduce((p,m)=>{const v=o[m];return p[m]=(x,j=!1,C=!1)=>(n||w(),v.schedule(x,j,C)),p},{}),cancel:p=>{for(let m=0;m<Js.length;m++)o[Js[m]].cancel(p)},state:i,steps:o}}const{schedule:ue,cancel:Rn,state:Le,steps:Sl}=nv(typeof requestAnimationFrame<"u"?requestAnimationFrame:ot,!0),rv=S.createContext({strict:!1}),Nh={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ti={};for(const e in Nh)ti[e]={isEnabled:t=>Nh[e].some(n=>!!t[n])};function pS(e){for(const t in e)ti[t]={...ti[t],...e[t]}}const mS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function oa(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||mS.has(e)}let iv=e=>!oa(e);function sv(e){e&&(iv=t=>t.startsWith("on")?!oa(t):e(t))}try{sv(require("@emotion/is-prop-valid").default)}catch{}function gS(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(iv(i)||n===!0&&oa(i)||!t&&!oa(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function yS({children:e,isValidProp:t,...n}){t&&sv(t),n={...S.useContext(sa),...n},n.isStatic=ev(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return l.jsx(sa.Provider,{value:r,children:e})}function vS(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Oa=S.createContext({});function ds(e){return typeof e=="string"||Array.isArray(e)}function Va(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const hd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],pd=["initial",...hd];function za(e){return Va(e.animate)||pd.some(t=>ds(e[t]))}function ov(e){return!!(za(e)||e.variants)}function xS(e,t){if(za(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ds(n)?n:void 0,animate:ds(r)?r:void 0}}return e.inherit!==!1?t:{}}function _S(e){const{initial:t,animate:n}=xS(e,S.useContext(Oa));return S.useMemo(()=>({initial:t,animate:n}),[kh(t),kh(n)])}function kh(e){return Array.isArray(e)?e.join(" "):e}const wS=Symbol.for("motionComponentSymbol");function Mr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function SS(e,t,n){return S.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Mr(n)&&(n.current=r))},[t])}const md=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),jS="framerAppearId",av="data-"+md(jS),{schedule:gd}=nv(queueMicrotask,!1),lv=S.createContext({});function NS(e,t,n,r,i){var s,o;const{visualElement:a}=S.useContext(Oa),c=S.useContext(rv),u=S.useContext(ud),d=S.useContext(sa).reducedMotion,f=S.useRef(null);r=r||c.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,g=S.useContext(lv);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&kS(f.current,n,i,g);const w=S.useRef(!1);S.useInsertionEffect(()=>{h&&w.current&&h.update(n,u)});const y=n[av],_=S.useRef(!!y&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,y))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,y)));return uS(()=>{h&&(w.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),gd.render(h.render),_.current&&h.animationState&&h.animationState.animateChanges())}),S.useEffect(()=>{h&&(!_.current&&h.animationState&&h.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)===null||p===void 0||p.call(window,y)}),_.current=!1))}),h}function kS(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:cv(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Mr(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}function cv(e){if(e)return e.options.allowProjection!==!1?e.projection:cv(e.parent)}function CS({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var s,o;e&&pS(e);function a(u,d){let f;const h={...S.useContext(sa),...u,layoutId:bS(u)},{isStatic:g}=h,w=_S(u),y=r(u,g);if(!g&&dd){TS();const _=ES(h);f=_.MeasureLayout,w.visualElement=NS(i,y,h,t,_.ProjectionNode)}return l.jsxs(Oa.Provider,{value:w,children:[f&&w.visualElement?l.jsx(f,{visualElement:w.visualElement,...h}):null,n(i,u,SS(y,w.visualElement,d),y,g,w.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${(o=(s=i.displayName)!==null&&s!==void 0?s:i.name)!==null&&o!==void 0?o:""})`}`;const c=S.forwardRef(a);return c[wS]=i,c}function bS({layoutId:e}){const t=S.useContext(Jy).id;return t&&e!==void 0?t+"-"+e:e}function TS(e,t){S.useContext(rv).strict}function ES(e){const{drag:t,layout:n}=ti;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const PS=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yd(e){return typeof e!="string"||e.includes("-")?!1:!!(PS.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ch(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function vd(e,t,n,r){if(typeof t=="function"){const[i,s]=Ch(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Ch(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const zc=e=>Array.isArray(e),AS=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),LS=e=>zc(e)?e[e.length-1]||0:e,ze=e=>!!(e&&e.getVelocity);function ko(e){const t=ze(e)?e.get():e;return AS(t)?t.toValue():t}function MS({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,s){const o={latestValues:RS(r,i,s,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const uv=e=>(t,n)=>{const r=S.useContext(Oa),i=S.useContext(ud),s=()=>MS(e,t,r,i);return n?s():ev(s)};function RS(e,t,n,r){const i={},s=r(e,{});for(const h in s)i[h]=ko(s[h]);let{initial:o,animate:a}=e;const c=za(e),u=ov(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?a:o;if(f&&typeof f!="boolean"&&!Va(f)){const h=Array.isArray(f)?f:[f];for(let g=0;g<h.length;g++){const w=vd(e,h[g]);if(w){const{transitionEnd:y,transition:_,...p}=w;for(const m in p){let v=p[m];if(Array.isArray(v)){const x=d?v.length-1:0;v=v[x]}v!==null&&(i[m]=v)}for(const m in y)i[m]=y[m]}}}return i}const ci=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mr=new Set(ci),dv=e=>t=>typeof t=="string"&&t.startsWith(e),fv=dv("--"),DS=dv("var(--"),xd=e=>DS(e)?IS.test(e.split("/*")[0].trim()):!1,IS=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,hv=(e,t)=>t&&typeof e=="number"?t.transform(e):e,cn=(e,t,n)=>n>t?t:n<e?e:n,ui={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},fs={...ui,transform:e=>cn(0,1,e)},eo={...ui,default:1},bs=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),hn=bs("deg"),zt=bs("%"),Y=bs("px"),$S=bs("vh"),FS=bs("vw"),bh={...zt,parse:e=>zt.parse(e)/100,transform:e=>zt.transform(e*100)},OS={borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,radius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,top:Y,right:Y,bottom:Y,left:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,backgroundPositionX:Y,backgroundPositionY:Y},VS={rotate:hn,rotateX:hn,rotateY:hn,rotateZ:hn,scale:eo,scaleX:eo,scaleY:eo,scaleZ:eo,skew:hn,skewX:hn,skewY:hn,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:fs,originX:bh,originY:bh,originZ:Y},Th={...ui,transform:Math.round},_d={...OS,...VS,zIndex:Th,size:Y,fillOpacity:fs,strokeOpacity:fs,numOctaves:Th},zS={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},BS=ci.length;function US(e,t,n){let r="",i=!0;for(let s=0;s<BS;s++){const o=ci[s],a=e[o];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(o.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const u=hv(a,_d[o]);if(!c){i=!1;const d=zS[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function wd(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const c in t){const u=t[c];if(mr.has(c)){o=!0;continue}else if(fv(c)){i[c]=u;continue}else{const d=hv(u,_d[c]);c.startsWith("origin")?(a=!0,s[c]=d):r[c]=d}}if(t.transform||(o||n?r.transform=US(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${c} ${u} ${d}`}}const HS={offset:"stroke-dashoffset",array:"stroke-dasharray"},WS={offset:"strokeDashoffset",array:"strokeDasharray"};function qS(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?HS:WS;e[s.offset]=Y.transform(-r);const o=Y.transform(t),a=Y.transform(n);e[s.array]=`${o} ${a}`}function Eh(e,t,n){return typeof e=="string"?e:Y.transform(t+n*e)}function KS(e,t,n){const r=Eh(t,e.x,e.width),i=Eh(n,e.y,e.height);return`${r} ${i}`}function Sd(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:c=0,...u},d,f){if(wd(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:g,dimensions:w}=e;h.transform&&(w&&(g.transform=h.transform),delete h.transform),w&&(i!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=KS(w,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&qS(h,o,a,c,!1)}const jd=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),pv=()=>({...jd(),attrs:{}}),Nd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function mv(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const gv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function yv(e,t,n,r){mv(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(gv.has(i)?i:md(i),t.attrs[i])}const aa={};function GS(e){Object.assign(aa,e)}function vv(e,{layout:t,layoutId:n}){return mr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!aa[e]||e==="opacity")}function kd(e,t,n){var r;const{style:i}=e,s={};for(const o in i)(ze(i[o])||t.style&&ze(t.style[o])||vv(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return s}function xv(e,t,n){const r=kd(e,t,n);for(const i in e)if(ze(e[i])||ze(t[i])){const s=ci.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}function YS(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const Ph=["x","y","width","height","cx","cy","r"],XS={useVisualState:uv({scrapeMotionValuesFromProps:xv,createRenderState:pv,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in i)if(mr.has(a)){s=!0;break}}if(!s)return;let o=!t;if(t)for(let a=0;a<Ph.length;a++){const c=Ph[a];e[c]!==t[c]&&(o=!0)}o&&ue.read(()=>{YS(n,r),ue.render(()=>{Sd(r,i,Nd(n.tagName),e.transformTemplate),yv(n,r)})})}})},QS={useVisualState:uv({scrapeMotionValuesFromProps:kd,createRenderState:jd})};function _v(e,t,n){for(const r in t)!ze(t[r])&&!vv(r,n)&&(e[r]=t[r])}function ZS({transformTemplate:e},t){return S.useMemo(()=>{const n=jd();return wd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function JS(e,t){const n=e.style||{},r={};return _v(r,n,e),Object.assign(r,ZS(e,t)),r}function ej(e,t){const n={},r=JS(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function tj(e,t,n,r){const i=S.useMemo(()=>{const s=pv();return Sd(s,t,Nd(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};_v(s,e.style,e),i.style={...s,...i.style}}return i}function nj(e=!1){return(n,r,i,{latestValues:s},o)=>{const c=(yd(n)?tj:ej)(r,s,o,n),u=gS(r,typeof n=="string",e),d=n!==S.Fragment?{...u,...c,ref:i}:{},{children:f}=r,h=S.useMemo(()=>ze(f)?f.get():f,[f]);return S.createElement(n,{...d,children:h})}}function rj(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...yd(r)?XS:QS,preloadedFeatures:e,useRender:nj(i),createVisualElement:t,Component:r};return CS(o)}}function wv(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Ba(e,t,n){const r=e.getProps();return vd(r,t,n!==void 0?n:r.custom,e)}const ij=fd(()=>window.ScrollTimeline!==void 0);class sj{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(ij()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class oj extends sj{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Cd(e,t){return e?e[t]||e.default||e:void 0}const Bc=2e4;function Sv(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Bc;)t+=n,r=e.next(t);return t>=Bc?1/0:t}function bd(e){return typeof e=="function"}function Ah(e,t){e.timeline=t,e.onfinish=null}const Td=e=>Array.isArray(e)&&typeof e[0]=="number",aj={linearEasing:void 0};function lj(e,t){const n=fd(e);return()=>{var r;return(r=aj[t])!==null&&r!==void 0?r:n()}}const la=lj(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jv=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(ei(0,i-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Nv(e){return!!(typeof e=="function"&&la()||!e||typeof e=="string"&&(e in Uc||la())||Td(e)||Array.isArray(e)&&e.every(Nv))}const bi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Uc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bi([0,.65,.55,1]),circOut:bi([.55,0,1,.45]),backIn:bi([.31,.01,.66,-.59]),backOut:bi([.33,1.53,.69,.99])};function kv(e,t){if(e)return typeof e=="function"&&la()?jv(e,t):Td(e)?bi(e):Array.isArray(e)?e.map(n=>kv(n,t)||Uc.easeOut):Uc[e]}const Nt={x:!1,y:!1};function Cv(){return Nt.x||Nt.y}function cj(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const s=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function bv(e,t){const n=cj(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Lh(e){return t=>{t.pointerType==="touch"||Cv()||e(t)}}function uj(e,t,n={}){const[r,i,s]=bv(e,n),o=Lh(a=>{const{target:c}=a,u=t(a);if(typeof u!="function"||!c)return;const d=Lh(f=>{u(f),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,i)});return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Tv=(e,t)=>t?e===t?!0:Tv(e,t.parentElement):!1,Ed=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,dj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fj(e){return dj.has(e.tagName)||e.tabIndex!==-1}const Ti=new WeakSet;function Mh(e){return t=>{t.key==="Enter"&&e(t)}}function jl(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const hj=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Mh(()=>{if(Ti.has(n))return;jl(n,"down");const i=Mh(()=>{jl(n,"up")}),s=()=>jl(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Rh(e){return Ed(e)&&!Cv()}function pj(e,t,n={}){const[r,i,s]=bv(e,n),o=a=>{const c=a.currentTarget;if(!Rh(a)||Ti.has(c))return;Ti.add(c);const u=t(a),d=(g,w)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!Rh(g)||!Ti.has(c))&&(Ti.delete(c),typeof u=="function"&&u(g,{success:w}))},f=g=>{d(g,n.useGlobalTarget||Tv(c,g.target))},h=g=>{d(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{!fj(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a.addEventListener("focus",u=>hj(u,i),i)}),s}function mj(e){return e==="x"||e==="y"?Nt[e]?null:(Nt[e]=!0,()=>{Nt[e]=!1}):Nt.x||Nt.y?null:(Nt.x=Nt.y=!0,()=>{Nt.x=Nt.y=!1})}const Ev=new Set(["width","height","top","left","right","bottom",...ci]);let Co;function gj(){Co=void 0}const Bt={now:()=>(Co===void 0&&Bt.set(Le.isProcessing||dS.useManualTiming?Le.timestamp:performance.now()),Co),set:e=>{Co=e,queueMicrotask(gj)}};function Pd(e,t){e.indexOf(t)===-1&&e.push(t)}function Ad(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Ld{constructor(){this.subscriptions=[]}add(t){return Pd(this.subscriptions,t),()=>Ad(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Pv(e,t){return t?e*(1e3/t):0}const Dh=30,yj=e=>!isNaN(parseFloat(e));class vj{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Bt.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Bt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=yj(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ld);const r=this.events[t].add(n);return t==="change"?()=>{r(),ue.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Bt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Dh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dh);return Pv(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function hs(e,t){return new vj(e,t)}function xj(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,hs(n))}function _j(e,t){const n=Ba(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=LS(s[o]);xj(e,o,a)}}function wj(e){return!!(ze(e)&&e.add)}function Hc(e,t){const n=e.getValue("willChange");if(wj(n))return n.add(t)}function Av(e){return e.props[av]}const Lv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Sj=1e-7,jj=12;function Nj(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=Lv(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>Sj&&++a<jj);return o}function Ts(e,t,n,r){if(e===t&&n===r)return ot;const i=s=>Nj(s,0,1,e,n);return s=>s===0||s===1?s:Lv(i(s),t,r)}const Mv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Rv=e=>t=>1-e(1-t),Dv=Ts(.33,1.53,.69,.99),Md=Rv(Dv),Iv=Mv(Md),$v=e=>(e*=2)<1?.5*Md(e):.5*(2-Math.pow(2,-10*(e-1))),Rd=e=>1-Math.sin(Math.acos(e)),Fv=Rv(Rd),Ov=Mv(Rd),Vv=e=>/^0[^.\s]+$/u.test(e);function kj(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Vv(e):!0}const Bi=e=>Math.round(e*1e5)/1e5,Dd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Cj(e){return e==null}const bj=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Id=(e,t)=>n=>!!(typeof n=="string"&&bj.test(n)&&n.startsWith(e)||t&&!Cj(n)&&Object.prototype.hasOwnProperty.call(n,t)),zv=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Dd);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Tj=e=>cn(0,255,e),Nl={...ui,transform:e=>Math.round(Tj(e))},er={test:Id("rgb","red"),parse:zv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Nl.transform(e)+", "+Nl.transform(t)+", "+Nl.transform(n)+", "+Bi(fs.transform(r))+")"};function Ej(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Wc={test:Id("#"),parse:Ej,transform:er.transform},Rr={test:Id("hsl","hue"),parse:zv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+zt.transform(Bi(t))+", "+zt.transform(Bi(n))+", "+Bi(fs.transform(r))+")"},Fe={test:e=>er.test(e)||Wc.test(e)||Rr.test(e),parse:e=>er.test(e)?er.parse(e):Rr.test(e)?Rr.parse(e):Wc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?er.transform(e):Rr.transform(e)},Pj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Aj(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Dd))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Pj))===null||n===void 0?void 0:n.length)||0)>0}const Bv="number",Uv="color",Lj="var",Mj="var(",Ih="${}",Rj=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ps(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(Rj,c=>(Fe.test(c)?(r.color.push(s),i.push(Uv),n.push(Fe.parse(c))):c.startsWith(Mj)?(r.var.push(s),i.push(Lj),n.push(c)):(r.number.push(s),i.push(Bv),n.push(parseFloat(c))),++s,Ih)).split(Ih);return{values:n,split:a,indexes:r,types:i}}function Hv(e){return ps(e).values}function Wv(e){const{split:t,types:n}=ps(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===Bv?s+=Bi(i[o]):a===Uv?s+=Fe.transform(i[o]):s+=i[o]}return s}}const Dj=e=>typeof e=="number"?0:e;function Ij(e){const t=Hv(e);return Wv(e)(t.map(Dj))}const Dn={test:Aj,parse:Hv,createTransformer:Wv,getAnimatableNone:Ij},$j=new Set(["brightness","contrast","saturate","opacity"]);function Fj(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Dd)||[];if(!r)return e;const i=n.replace(r,"");let s=$j.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const Oj=/\b([a-z-]*)\(.*?\)/gu,qc={...Dn,getAnimatableNone:e=>{const t=e.match(Oj);return t?t.map(Fj).join(" "):e}},Vj={..._d,color:Fe,backgroundColor:Fe,outlineColor:Fe,fill:Fe,stroke:Fe,borderColor:Fe,borderTopColor:Fe,borderRightColor:Fe,borderBottomColor:Fe,borderLeftColor:Fe,filter:qc,WebkitFilter:qc},$d=e=>Vj[e];function qv(e,t){let n=$d(e);return n!==qc&&(n=Dn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zj=new Set(["auto","none","0"]);function Bj(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!zj.has(s)&&ps(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=qv(n,i)}const $h=e=>e===ui||e===Y,Fh=(e,t)=>parseFloat(e.split(", ")[t]),Oh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Fh(i[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?Fh(s[1],e):0}},Uj=new Set(["x","y","z"]),Hj=ci.filter(e=>!Uj.has(e));function Wj(e){const t=[];return Hj.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ni={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Oh(4,13),y:Oh(5,14)};ni.translateX=ni.x;ni.translateY=ni.y;const ir=new Set;let Kc=!1,Gc=!1;function Kv(){if(Gc){const e=Array.from(ir).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Wj(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Gc=!1,Kc=!1,ir.forEach(e=>e.complete()),ir.clear()}function Gv(){ir.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gc=!0)})}function qj(){Gv(),Kv()}class Fd{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ir.add(this),Kc||(Kc=!0,ue.read(Gv),ue.resolveKeyframes(Kv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const c=r.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ir.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ir.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Yv=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Kj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Gj(e){const t=Kj.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function Xv(e,t,n=1){const[r,i]=Gj(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return Yv(o)?parseFloat(o):o}return xd(i)?Xv(i,t,n+1):i}const Qv=e=>t=>t.test(e),Yj={test:e=>e==="auto",parse:e=>e},Zv=[ui,Y,zt,hn,FS,$S,Yj],Vh=e=>Zv.find(Qv(e));class Jv extends Fd{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),xd(u))){const d=Xv(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Ev.has(r)||t.length!==2)return;const[i,s]=t,o=Vh(i),a=Vh(s);if(o!==a)if($h(o)&&$h(a))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)kj(t[i])&&r.push(i);r.length&&Bj(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ni[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ni[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const zh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Dn.test(e)||e==="0")&&!e.startsWith("url("));function Xj(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Qj(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=zh(i,t),a=zh(s,t);return!o||!a?!1:Xj(e)||(n==="spring"||bd(n))&&r}const Zj=e=>e!==null;function Ua(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Zj),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const Jj=40;class e0{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Bt.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Jj?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&qj(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Bt.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:c,isGenerator:u}=this.options;if(!u&&!Qj(t,r,i,s))if(o)this.options.duration=0;else{c&&c(Ua(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const me=(e,t,n)=>e+(t-e)*n;function kl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function eN({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=kl(c,a,e+1/3),s=kl(c,a,e),o=kl(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function ca(e,t){return n=>n>0?t:e}const Cl=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},tN=[Wc,er,Rr],nN=e=>tN.find(t=>t.test(e));function Bh(e){const t=nN(e);if(!t)return!1;let n=t.parse(e);return t===Rr&&(n=eN(n)),n}const Uh=(e,t)=>{const n=Bh(e),r=Bh(t);if(!n||!r)return ca(e,t);const i={...n};return s=>(i.red=Cl(n.red,r.red,s),i.green=Cl(n.green,r.green,s),i.blue=Cl(n.blue,r.blue,s),i.alpha=me(n.alpha,r.alpha,s),er.transform(i))},rN=(e,t)=>n=>t(e(n)),Es=(...e)=>e.reduce(rN),Yc=new Set(["none","hidden"]);function iN(e,t){return Yc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function sN(e,t){return n=>me(e,t,n)}function Od(e){return typeof e=="number"?sN:typeof e=="string"?xd(e)?ca:Fe.test(e)?Uh:lN:Array.isArray(e)?t0:typeof e=="object"?Fe.test(e)?Uh:oN:ca}function t0(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Od(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function oN(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Od(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function aN(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],a=e.indexes[o][i[o]],c=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=c,i[o]++}return r}const lN=(e,t)=>{const n=Dn.createTransformer(t),r=ps(e),i=ps(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Yc.has(e)&&!i.values.length||Yc.has(t)&&!r.values.length?iN(e,t):Es(t0(aN(r,i),i.values),n):ca(e,t)};function n0(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?me(e,t,n):Od(e)(e,t)}const cN=5;function r0(e,t,n){const r=Math.max(t-cN,0);return Pv(n-e(r),t-r)}const xe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},bl=.001;function uN({duration:e=xe.duration,bounce:t=xe.bounce,velocity:n=xe.velocity,mass:r=xe.mass}){let i,s,o=1-t;o=cn(xe.minDamping,xe.maxDamping,o),e=cn(xe.minDuration,xe.maxDuration,rn(e)),o<1?(i=u=>{const d=u*o,f=d*e,h=d-n,g=Xc(u,o),w=Math.exp(-f);return bl-h/g*w},s=u=>{const f=u*o*e,h=f*n+n,g=Math.pow(o,2)*Math.pow(u,2)*e,w=Math.exp(-f),y=Xc(Math.pow(u,2),o);return(-i(u)+bl>0?-1:1)*((h-g)*w)/y}):(i=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-bl+d*f},s=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const a=5/e,c=fN(i,s,a);if(e=nn(e),isNaN(c))return{stiffness:xe.stiffness,damping:xe.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const dN=12;function fN(e,t,n){let r=n;for(let i=1;i<dN;i++)r=r-e(r)/t(r);return r}function Xc(e,t){return e*Math.sqrt(1-t*t)}const hN=["duration","bounce"],pN=["stiffness","damping","mass"];function Hh(e,t){return t.some(n=>e[n]!==void 0)}function mN(e){let t={velocity:xe.velocity,stiffness:xe.stiffness,damping:xe.damping,mass:xe.mass,isResolvedFromDuration:!1,...e};if(!Hh(e,pN)&&Hh(e,hN))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*cn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:xe.mass,stiffness:i,damping:s}}else{const n=uN(e);t={...t,...n,mass:xe.mass},t.isResolvedFromDuration=!0}return t}function i0(e=xe.visualDuration,t=xe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:g}=mN({...n,velocity:-rn(n.velocity||0)}),w=h||0,y=u/(2*Math.sqrt(c*d)),_=o-s,p=rn(Math.sqrt(c/d)),m=Math.abs(_)<5;r||(r=m?xe.restSpeed.granular:xe.restSpeed.default),i||(i=m?xe.restDelta.granular:xe.restDelta.default);let v;if(y<1){const j=Xc(p,y);v=C=>{const b=Math.exp(-y*p*C);return o-b*((w+y*p*_)/j*Math.sin(j*C)+_*Math.cos(j*C))}}else if(y===1)v=j=>o-Math.exp(-p*j)*(_+(w+p*_)*j);else{const j=p*Math.sqrt(y*y-1);v=C=>{const b=Math.exp(-y*p*C),k=Math.min(j*C,300);return o-b*((w+y*p*_)*Math.sinh(k)+j*_*Math.cosh(k))/j}}const x={calculatedDuration:g&&f||null,next:j=>{const C=v(j);if(g)a.done=j>=f;else{let b=0;y<1&&(b=j===0?nn(w):r0(v,j,C));const k=Math.abs(b)<=r,I=Math.abs(o-C)<=i;a.done=k&&I}return a.value=a.done?o:C,a},toString:()=>{const j=Math.min(Sv(x),Bc),C=jv(b=>x.next(j*b).value,j,30);return j+"ms "+C}};return x}function Wh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},g=k=>a!==void 0&&k<a||c!==void 0&&k>c,w=k=>a===void 0?c:c===void 0||Math.abs(a-k)<Math.abs(c-k)?a:c;let y=n*t;const _=f+y,p=o===void 0?_:o(_);p!==_&&(y=p-f);const m=k=>-y*Math.exp(-k/r),v=k=>p+m(k),x=k=>{const I=m(k),R=v(k);h.done=Math.abs(I)<=u,h.value=h.done?p:R};let j,C;const b=k=>{g(h.value)&&(j=k,C=i0({keyframes:[h.value,w(h.value)],velocity:r0(v,k,h.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return b(0),{calculatedDuration:null,next:k=>{let I=!1;return!C&&j===void 0&&(I=!0,x(k),b(k)),j!==void 0&&k>=j?C.next(k-j):(!I&&x(k),h)}}}const gN=Ts(.42,0,1,1),yN=Ts(0,0,.58,1),s0=Ts(.42,0,.58,1),vN=e=>Array.isArray(e)&&typeof e[0]!="number",xN={linear:ot,easeIn:gN,easeInOut:s0,easeOut:yN,circIn:Rd,circInOut:Ov,circOut:Fv,backIn:Md,backInOut:Iv,backOut:Dv,anticipate:$v},qh=e=>{if(Td(e)){tv(e.length===4);const[t,n,r,i]=e;return Ts(t,n,r,i)}else if(typeof e=="string")return xN[e];return e};function _N(e,t,n){const r=[],i=n||n0,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||ot:t;a=Es(c,a)}r.push(a)}return r}function wN(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(tv(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=_N(t,r,i),c=a.length,u=d=>{if(o&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=ei(e[f],e[f+1],d);return a[f](h)};return n?d=>u(cn(e[0],e[s-1],d)):u}function SN(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=ei(0,t,r);e.push(me(n,1,i))}}function jN(e){const t=[0];return SN(t,e.length-1),t}function NN(e,t){return e.map(n=>n*t)}function kN(e,t){return e.map(()=>t||s0).splice(0,e.length-1)}function ua({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=vN(r)?r.map(qh):qh(r),s={done:!1,value:t[0]},o=NN(n&&n.length===t.length?n:jN(t),e),a=wN(o,t,{ease:Array.isArray(i)?i:kN(t,i)});return{calculatedDuration:e,next:c=>(s.value=a(c),s.done=c>=e,s)}}const CN=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ue.update(t,!0),stop:()=>Rn(t),now:()=>Le.isProcessing?Le.timestamp:Bt.now()}},bN={decay:Wh,inertia:Wh,tween:ua,keyframes:ua,spring:i0},TN=e=>e/100;class Vd extends e0{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Fd,a=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=bd(n)?n:bN[n]||ua;let c,u;a!==ua&&typeof t[0]!="number"&&(c=Es(TN,n0(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=Sv(d));const{calculatedDuration:f}=d,h=f+i,g=h*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:h,repeat:g,repeatType:w,repeatDelay:y,onUpdate:_}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-h*(this.speed>=0?1:-1),m=this.speed>=0?p<0:p>d;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let v=this.currentTime,x=s;if(g){const k=Math.min(this.currentTime,d)/f;let I=Math.floor(k),R=k%1;!R&&k>=1&&(R=1),R===1&&I--,I=Math.min(I,g+1),!!(I%2)&&(w==="reverse"?(R=1-R,y&&(R-=y/f)):w==="mirror"&&(x=o)),v=cn(0,1,R)*f}const j=m?{done:!1,value:c[0]}:x.next(v);a&&(j.value=a(j.value));let{done:C}=j;!m&&u!==null&&(C=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const b=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return b&&i!==void 0&&(j.value=Ua(c,this.options,i)),_&&_(j.value),b&&this.finish(),j}get duration(){const{resolved:t}=this;return t?rn(t.calculatedDuration):0}get time(){return rn(this.currentTime)}set time(t){t=nn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=rn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=CN,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const EN=new Set(["opacity","clipPath","filter","transform"]);function PN(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=kv(a,i);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const AN=fd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),da=10,LN=2e4;function MN(e){return bd(e.type)||e.type==="spring"||!Nv(e.ease)}function RN(e,t){const n=new Vd({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<LN;)r=n.sample(s),i.push(r.value),s+=da;return{times:void 0,keyframes:i,duration:s-da,ease:"linear"}}const o0={anticipate:$v,backInOut:Iv,circInOut:Ov};function DN(e){return e in o0}class Kh extends e0{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Jv(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:c,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&la()&&DN(s)&&(s=o0[s]),MN(this.options)){const{onComplete:f,onUpdate:h,motionValue:g,element:w,...y}=this.options,_=RN(t,y);t=_.keyframes,t.length===1&&(t[1]=t[0]),r=_.duration,i=_.times,s=_.ease,o="keyframes"}const d=PN(a.owner.current,c,t,{...this.options,duration:r,times:i,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(Ah(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;a.set(Ua(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return rn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return rn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=nn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return ot;const{animation:r}=n;Ah(r,t)}return ot}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...g}=this.options,w=new Vd({...g,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),y=nn(this.time);u.setWithVelocity(w.sample(y-da).value,w.sample(y).value,da)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return AN()&&r&&EN.has(r)&&!c&&!u&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const IN={type:"spring",stiffness:500,damping:25,restSpeed:10},$N=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),FN={type:"keyframes",duration:.8},ON={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},VN=(e,{keyframes:t})=>t.length>2?FN:mr.has(e)?e.startsWith("scale")?$N(t[1]):IN:ON;function zN({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const zd=(e,t,n,r={},i,s)=>o=>{const a=Cd(r,e)||{},c=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-nn(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};zN(a)||(d={...d,...VN(e,d)}),d.duration&&(d.duration=nn(d.duration)),d.repeatDelay&&(d.repeatDelay=nn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const h=Ua(d.keyframes,a);if(h!==void 0)return ue.update(()=>{d.onUpdate(h),d.onComplete()}),new oj([])}return!s&&Kh.supports(d)?new Kh(d):new Vd(d)};function BN({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function a0(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...c}=t;r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in c){const h=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),g=c[f];if(g===void 0||d&&BN(d,f))continue;const w={delay:n,...Cd(o||{},f)};let y=!1;if(window.MotionHandoffAnimation){const p=Av(e);if(p){const m=window.MotionHandoffAnimation(p,f,ue);m!==null&&(w.startTime=m,y=!0)}}Hc(e,f),h.start(zd(f,h,g,e.shouldReduceMotion&&Ev.has(f)?{type:!1}:w,e,y));const _=h.animation;_&&u.push(_)}return a&&Promise.all(u).then(()=>{ue.update(()=>{a&&_j(e,a)})}),u}function Qc(e,t,n={}){var r;const i=Ba(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(a0(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return UN(e,t,d+u,f,h,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[u,d]=c==="beforeChildren"?[o,a]:[a,o];return u().then(()=>d())}else return Promise.all([o(),a(n.delay)])}function UN(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,c=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(HN).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(Qc(u,t,{...s,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function HN(e,t){return e.sortNodePosition(t)}function WN(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Qc(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Qc(e,t,n);else{const i=typeof t=="function"?Ba(e,t,n.custom):t;r=Promise.all(a0(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const qN=pd.length;function l0(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?l0(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<qN;n++){const r=pd[n],i=e.props[r];(ds(i)||i===!1)&&(t[r]=i)}return t}const KN=[...hd].reverse(),GN=hd.length;function YN(e){return t=>Promise.all(t.map(({animation:n,options:r})=>WN(e,n,r)))}function XN(e){let t=YN(e),n=Gh(),r=!0;const i=c=>(u,d)=>{var f;const h=Ba(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:g,transitionEnd:w,...y}=h;u={...u,...y,...w}}return u};function s(c){t=c(e)}function o(c){const{props:u}=e,d=l0(e.parent)||{},f=[],h=new Set;let g={},w=1/0;for(let _=0;_<GN;_++){const p=KN[_],m=n[p],v=u[p]!==void 0?u[p]:d[p],x=ds(v),j=p===c?m.isActive:null;j===!1&&(w=_);let C=v===d[p]&&v!==u[p]&&x;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),m.protectedKeys={...g},!m.isActive&&j===null||!v&&!m.prevProp||Va(v)||typeof v=="boolean")continue;const b=QN(m.prevProp,v);let k=b||p===c&&m.isActive&&!C&&x||_>w&&x,I=!1;const R=Array.isArray(v)?v:[v];let K=R.reduce(i(p),{});j===!1&&(K={});const{prevResolvedValues:te={}}=m,X={...te,...K},N=$=>{k=!0,h.has($)&&(I=!0,h.delete($)),m.needsAnimating[$]=!0;const E=e.getValue($);E&&(E.liveStyle=!1)};for(const $ in X){const E=K[$],D=te[$];if(g.hasOwnProperty($))continue;let V=!1;zc(E)&&zc(D)?V=!wv(E,D):V=E!==D,V?E!=null?N($):h.add($):E!==void 0&&h.has($)?N($):m.protectedKeys[$]=!0}m.prevProp=v,m.prevResolvedValues=K,m.isActive&&(g={...g,...K}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(C&&b)||I)&&f.push(...R.map($=>({animation:$,options:{type:p}})))}if(h.size){const _={};h.forEach(p=>{const m=e.getBaseTarget(p),v=e.getValue(p);v&&(v.liveStyle=!0),_[p]=m??null}),f.push({animation:_})}let y=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function a(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var g;return(g=h.animationState)===null||g===void 0?void 0:g.setActive(c,u)}),n[c].isActive=u;const f=o(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Gh(),r=!0}}}function QN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!wv(t,e):!1}function Un(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Gh(){return{animate:Un(!0),whileInView:Un(),whileHover:Un(),whileTap:Un(),whileDrag:Un(),whileFocus:Un(),exit:Un()}}class zn{constructor(t){this.isMounted=!1,this.node=t}update(){}}class ZN extends zn{constructor(t){super(t),t.animationState||(t.animationState=XN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Va(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let JN=0;class e2 extends zn{constructor(){super(...arguments),this.id=JN++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const t2={animation:{Feature:ZN},exit:{Feature:e2}};function ms(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ps(e){return{point:{x:e.pageX,y:e.pageY}}}const n2=e=>t=>Ed(t)&&e(t,Ps(t));function Ui(e,t,n,r){return ms(e,t,n2(n),r)}const Yh=(e,t)=>Math.abs(e-t);function r2(e,t){const n=Yh(e.x,t.x),r=Yh(e.y,t.y);return Math.sqrt(n**2+r**2)}class c0{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=El(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=r2(f.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:w}=f,{timestamp:y}=Le;this.history.push({...w,timestamp:y});const{onStart:_,onMove:p}=this.handlers;h||(_&&_(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Tl(h,this.transformPagePoint),ue.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:g,onSessionEnd:w,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=El(f.type==="pointercancel"?this.lastMoveEventInfo:Tl(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,_),w&&w(f,_)},!Ed(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Ps(t),a=Tl(o,this.transformPagePoint),{point:c}=a,{timestamp:u}=Le;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,El(a,this.history)),this.removeListeners=Es(Ui(this.contextWindow,"pointermove",this.handlePointerMove),Ui(this.contextWindow,"pointerup",this.handlePointerUp),Ui(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Rn(this.updatePoint)}}function Tl(e,t){return t?{point:t(e.point)}:e}function Xh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function El({point:e},t){return{point:e,delta:Xh(e,u0(t)),offset:Xh(e,i2(t)),velocity:s2(t,.1)}}function i2(e){return e[0]}function u0(e){return e[e.length-1]}function s2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=u0(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>nn(t)));)n--;if(!r)return{x:0,y:0};const s=rn(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const d0=1e-4,o2=1-d0,a2=1+d0,f0=.01,l2=0-f0,c2=0+f0;function lt(e){return e.max-e.min}function u2(e,t,n){return Math.abs(e-t)<=n}function Qh(e,t,n,r=.5){e.origin=r,e.originPoint=me(t.min,t.max,e.origin),e.scale=lt(n)/lt(t),e.translate=me(n.min,n.max,e.origin)-e.originPoint,(e.scale>=o2&&e.scale<=a2||isNaN(e.scale))&&(e.scale=1),(e.translate>=l2&&e.translate<=c2||isNaN(e.translate))&&(e.translate=0)}function Hi(e,t,n,r){Qh(e.x,t.x,n.x,r?r.originX:void 0),Qh(e.y,t.y,n.y,r?r.originY:void 0)}function Zh(e,t,n){e.min=n.min+t.min,e.max=e.min+lt(t)}function d2(e,t,n){Zh(e.x,t.x,n.x),Zh(e.y,t.y,n.y)}function Jh(e,t,n){e.min=t.min-n.min,e.max=e.min+lt(t)}function Wi(e,t,n){Jh(e.x,t.x,n.x),Jh(e.y,t.y,n.y)}function f2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?me(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?me(n,e,r.max):Math.min(e,n)),e}function ep(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function h2(e,{top:t,left:n,bottom:r,right:i}){return{x:ep(e.x,n,i),y:ep(e.y,t,r)}}function tp(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function p2(e,t){return{x:tp(e.x,t.x),y:tp(e.y,t.y)}}function m2(e,t){let n=.5;const r=lt(e),i=lt(t);return i>r?n=ei(t.min,t.max-r,e.min):r>i&&(n=ei(e.min,e.max-i,t.min)),cn(0,1,n)}function g2(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Zc=.35;function y2(e=Zc){return e===!1?e=0:e===!0&&(e=Zc),{x:np(e,"left","right"),y:np(e,"top","bottom")}}function np(e,t,n){return{min:rp(e,t),max:rp(e,n)}}function rp(e,t){return typeof e=="number"?e:e[t]||0}const ip=()=>({translate:0,scale:1,origin:0,originPoint:0}),Dr=()=>({x:ip(),y:ip()}),sp=()=>({min:0,max:0}),Se=()=>({x:sp(),y:sp()});function gt(e){return[e("x"),e("y")]}function h0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function v2({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function x2(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Pl(e){return e===void 0||e===1}function Jc({scale:e,scaleX:t,scaleY:n}){return!Pl(e)||!Pl(t)||!Pl(n)}function Gn(e){return Jc(e)||p0(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function p0(e){return op(e.x)||op(e.y)}function op(e){return e&&e!=="0%"}function fa(e,t,n){const r=e-n,i=t*r;return n+i}function ap(e,t,n,r,i){return i!==void 0&&(e=fa(e,i,r)),fa(e,n,r)+t}function eu(e,t=0,n=1,r,i){e.min=ap(e.min,t,n,r,i),e.max=ap(e.max,t,n,r,i)}function m0(e,{x:t,y:n}){eu(e.x,t.translate,t.scale,t.originPoint),eu(e.y,n.translate,n.scale,n.originPoint)}const lp=.999999999999,cp=1.0000000000001;function _2(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&$r(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,m0(e,o)),r&&Gn(s.latestValues)&&$r(e,s.latestValues))}t.x<cp&&t.x>lp&&(t.x=1),t.y<cp&&t.y>lp&&(t.y=1)}function Ir(e,t){e.min=e.min+t,e.max=e.max+t}function up(e,t,n,r,i=.5){const s=me(e.min,e.max,i);eu(e,t,n,s,r)}function $r(e,t){up(e.x,t.x,t.scaleX,t.scale,t.originX),up(e.y,t.y,t.scaleY,t.scale,t.originY)}function g0(e,t){return h0(x2(e.getBoundingClientRect(),t))}function w2(e,t,n){const r=g0(e,n),{scroll:i}=t;return i&&(Ir(r.x,i.offset.x),Ir(r.y,i.offset.y)),r}const y0=({current:e})=>e?e.ownerDocument.defaultView:null,S2=new WeakMap;class j2{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Se(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ps(d).point)},s=(d,f)=>{const{drag:h,dragPropagation:g,onDragStart:w}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mj(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),gt(_=>{let p=this.getAxisMotionValue(_).get()||0;if(zt.test(p)){const{projection:m}=this.visualElement;if(m&&m.layout){const v=m.layout.layoutBox[_];v&&(p=lt(v)*(parseFloat(p)/100))}}this.originPoint[_]=p}),w&&ue.postRender(()=>w(d,f)),Hc(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(d,f)=>{const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:w,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:_}=f;if(g&&this.currentDirection===null){this.currentDirection=N2(_),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",f.point,_),this.updateAxis("y",f.point,_),this.visualElement.render(),y&&y(d,f)},a=(d,f)=>this.stop(d,f),c=()=>gt(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new c0(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:y0(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&ue.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!to(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=f2(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&Mr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=h2(i.layoutBox,n):this.constraints=!1,this.elastic=y2(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&>(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=g2(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Mr(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=w2(r,i.root,this.visualElement.getTransformPagePoint());let o=p2(i.layout.layoutBox,s);if(n){const a=n(v2(o));this.hasMutatedConstraints=!!a,a&&(o=h0(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},u=gt(d=>{if(!to(d,n,this.currentDirection))return;let f=c&&c[d]||{};o&&(f={min:0,max:0});const h=i?200:1e6,g=i?40:1e7,w={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(d,w)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Hc(this.visualElement,t),r.start(zd(t,r,0,n,this.visualElement,!1))}stopAnimation(){gt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){gt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){gt(n=>{const{drag:r}=this.getProps();if(!to(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-me(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Mr(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};gt(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const c=a.get();i[o]=m2({min:c,max:c},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),gt(o=>{if(!to(o,t,null))return;const a=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];a.set(me(c,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;S2.set(this.visualElement,this);const t=this.visualElement.current,n=Ui(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Mr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ue.read(r);const o=ms(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(gt(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Zc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function to(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function N2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class k2 extends zn{constructor(t){super(t),this.removeGroupControls=ot,this.removeListeners=ot,this.controls=new j2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ot}unmount(){this.removeGroupControls(),this.removeListeners()}}const dp=e=>(t,n)=>{e&&ue.postRender(()=>e(t,n))};class C2 extends zn{constructor(){super(...arguments),this.removePointerDownListener=ot}onPointerDown(t){this.session=new c0(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:y0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:dp(t),onStart:dp(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&ue.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Ui(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const bo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fp(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xi={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Y.test(e))e=parseFloat(e);else return e;const n=fp(e,t.target.x),r=fp(e,t.target.y);return`${n}% ${r}%`}},b2={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Dn.parse(e);if(i.length>5)return r;const s=Dn.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=c;const u=me(a,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class T2 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;GS(E2),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),bo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ue.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),gd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function v0(e){const[t,n]=cS(),r=S.useContext(Jy);return l.jsx(T2,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(lv),isPresent:t,safeToRemove:n})}const E2={borderRadius:{...xi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xi,borderTopRightRadius:xi,borderBottomLeftRadius:xi,borderBottomRightRadius:xi,boxShadow:b2};function P2(e,t,n){const r=ze(e)?e:hs(e);return r.start(zd("",r,t,n)),r.animation}function A2(e){return e instanceof SVGElement&&e.tagName!=="svg"}const L2=(e,t)=>e.depth-t.depth;class M2{constructor(){this.children=[],this.isDirty=!1}add(t){Pd(this.children,t),this.isDirty=!0}remove(t){Ad(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(L2),this.isDirty=!1,this.children.forEach(t)}}function R2(e,t){const n=Bt.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Rn(r),e(s-t))};return ue.read(r,!0),()=>Rn(r)}const x0=["TopLeft","TopRight","BottomLeft","BottomRight"],D2=x0.length,hp=e=>typeof e=="string"?parseFloat(e):e,pp=e=>typeof e=="number"||Y.test(e);function I2(e,t,n,r,i,s){i?(e.opacity=me(0,n.opacity!==void 0?n.opacity:1,$2(r)),e.opacityExit=me(t.opacity!==void 0?t.opacity:1,0,F2(r))):s&&(e.opacity=me(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<D2;o++){const a=`border${x0[o]}Radius`;let c=mp(t,a),u=mp(n,a);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||pp(c)===pp(u)?(e[a]=Math.max(me(hp(c),hp(u),r),0),(zt.test(u)||zt.test(c))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=me(t.rotate||0,n.rotate||0,r))}function mp(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const $2=_0(0,.5,Fv),F2=_0(.5,.95,ot);function _0(e,t,n){return r=>r<e?0:r>t?1:n(ei(e,t,r))}function gp(e,t){e.min=t.min,e.max=t.max}function ht(e,t){gp(e.x,t.x),gp(e.y,t.y)}function yp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function vp(e,t,n,r,i){return e-=t,e=fa(e,1/n,r),i!==void 0&&(e=fa(e,1/i,r)),e}function O2(e,t=0,n=1,r=.5,i,s=e,o=e){if(zt.test(t)&&(t=parseFloat(t),t=me(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=me(s.min,s.max,r);e===s&&(a-=t),e.min=vp(e.min,t,n,a,i),e.max=vp(e.max,t,n,a,i)}function xp(e,t,[n,r,i],s,o){O2(e,t[n],t[r],t[i],t.scale,s,o)}const V2=["x","scaleX","originX"],z2=["y","scaleY","originY"];function _p(e,t,n,r){xp(e.x,t,V2,n?n.x:void 0,r?r.x:void 0),xp(e.y,t,z2,n?n.y:void 0,r?r.y:void 0)}function wp(e){return e.translate===0&&e.scale===1}function w0(e){return wp(e.x)&&wp(e.y)}function Sp(e,t){return e.min===t.min&&e.max===t.max}function B2(e,t){return Sp(e.x,t.x)&&Sp(e.y,t.y)}function jp(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function S0(e,t){return jp(e.x,t.x)&&jp(e.y,t.y)}function Np(e){return lt(e.x)/lt(e.y)}function kp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class U2{constructor(){this.members=[]}add(t){Pd(this.members,t),t.scheduleRender()}remove(t){if(Ad(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function H2(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:g,skewY:w}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),g&&(r+=`skewX(${g}deg) `),w&&(r+=`skewY(${w}deg) `)}const a=e.x.scale*t.x,c=e.y.scale*t.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const Yn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ei=typeof window<"u"&&window.MotionDebug!==void 0,Al=["","X","Y","Z"],W2={visibility:"hidden"},Cp=1e3;let q2=0;function Ll(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function j0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Av(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ue,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&j0(r)}function N0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=q2++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ei&&(Yn.totalNodes=Yn.resolvedTargetDeltas=Yn.recalculatedProjection=0),this.nodes.forEach(Y2),this.nodes.forEach(ek),this.nodes.forEach(tk),this.nodes.forEach(X2),Ei&&window.MotionDebug.record(Yn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new M2)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ld),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=A2(o),this.instance=o;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=R2(h,250),bo.hasAnimatedSinceResize&&(bo.hasAnimatedSinceResize=!1,this.nodes.forEach(Tp))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:g,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||ok,{onLayoutAnimationStart:_,onLayoutAnimationComplete:p}=d.getProps(),m=!this.targetLayout||!S0(this.targetLayout,w)||g,v=!h&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||v||h&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,v);const x={...Cd(y,"layout"),onPlay:_,onComplete:p};(d.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x)}else h||Tp(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Rn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(nk),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&j0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(bp);return}this.isUpdating||this.nodes.forEach(Z2),this.isUpdating=!1,this.nodes.forEach(J2),this.nodes.forEach(K2),this.nodes.forEach(G2),this.clearAllSnapshots();const a=Bt.now();Le.delta=cn(0,1e3/60,a-Le.timestamp),Le.timestamp=a,Le.isProcessing=!0,Sl.update.process(Le),Sl.preRender.process(Le),Sl.render.process(Le),Le.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Q2),this.sharedNodes.forEach(rk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Se(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!w0(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&(a||Gn(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),ak(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return Se();const c=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(lk))){const{scroll:d}=this.root;d&&(Ir(c.x,d.offset.x),Ir(c.y,d.offset.y))}return c}removeElementScroll(o){var a;const c=Se();if(ht(c,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&ht(c,o),Ir(c.x,f.offset.x),Ir(c.y,f.offset.y))}return c}applyTransform(o,a=!1){const c=Se();ht(c,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&$r(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Gn(d.latestValues)&&$r(c,d.latestValues)}return Gn(this.latestValues)&&$r(c,this.latestValues),c}removeTransform(o){const a=Se();ht(a,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Gn(u.latestValues))continue;Jc(u.latestValues)&&u.updateSnapshot();const d=Se(),f=u.measurePageBox();ht(d,f),_p(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Gn(this.latestValues)&&_p(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Le.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=Le.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),Wi(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),ht(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Se(),this.targetWithTransforms=Se()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),d2(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ht(this.target,this.layout.layoutBox),m0(this.target,this.targetDelta)):ht(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),Wi(this.relativeTargetOrigin,this.target,g.target),ht(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ei&&Yn.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Jc(this.parent.latestValues)||p0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),c=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Le.timestamp&&(u=!1),u)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;ht(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,g=this.treeScale.y;_2(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Se());const{target:w}=a;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yp(this.prevProjectionDelta.x,this.projectionDelta.x),yp(this.prevProjectionDelta.y,this.projectionDelta.y)),Hi(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==g||!kp(this.projectionDelta.x,this.prevProjectionDelta.x)||!kp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w)),Ei&&Yn.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Dr(),this.projectionDelta=Dr(),this.projectionDeltaWithTransform=Dr()}setAnimationOrigin(o,a=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=Dr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Se(),g=c?c.source:void 0,w=this.layout?this.layout.source:void 0,y=g!==w,_=this.getStack(),p=!_||_.members.length<=1,m=!!(y&&!p&&this.options.crossfade===!0&&!this.path.some(sk));this.animationProgress=0;let v;this.mixTargetDelta=x=>{const j=x/1e3;Ep(f.x,o.x,j),Ep(f.y,o.y,j),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wi(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ik(this.relativeTarget,this.relativeTargetOrigin,h,j),v&&B2(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=Se()),ht(v,this.relativeTarget)),y&&(this.animationValues=d,I2(d,u,this.latestValues,j,m,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Rn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ue.update(()=>{bo.hasAnimatedSinceResize=!0,this.currentAnimation=P2(0,Cp,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Cp),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:u,latestValues:d}=o;if(!(!a||!c||!u)){if(this!==o&&this.layout&&u&&k0(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Se();const f=lt(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=lt(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}ht(a,c),$r(a,d),Hi(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new U2),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const u={};c.z&&Ll("z",o,u,this.animationValues);for(let d=0;d<Al.length;d++)Ll(`rotate${Al[d]}`,o,u,this.animationValues),Ll(`skew${Al[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}getProjectionStyles(o){var a,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return W2;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ko(o==null?void 0:o.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=ko(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Gn(this.latestValues)&&(y.transform=d?d({},""):"none",this.hasProjected=!1),y}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=H2(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:g,y:w}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${w.origin*100}% 0`,f.animationValues?u.opacity=f===this?(c=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const y in aa){if(h[y]===void 0)continue;const{correct:_,applyTo:p}=aa[y],m=u.transform==="none"?h[y]:_(h[y],f);if(p){const v=p.length;for(let x=0;x<v;x++)u[p[x]]=m}else u[y]=m}return this.options.layoutId&&(u.pointerEvents=f===this?ko(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(bp),this.root.sharedNodes.clear()}}}function K2(e){e.updateLayout()}function G2(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;s==="size"?gt(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],g=lt(h);h.min=r[f].min,h.max=h.min+g}):k0(s,n.layoutBox,r)&>(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],g=lt(r[f]);h.max=h.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const a=Dr();Hi(a,r,n.layoutBox);const c=Dr();o?Hi(c,e.applyTransform(i,!0),n.measuredBox):Hi(c,r,n.layoutBox);const u=!w0(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:g}=f;if(h&&g){const w=Se();Wi(w,n.layoutBox,h.layoutBox);const y=Se();Wi(y,r,g.layoutBox),S0(w,y)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=w,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Y2(e){Ei&&Yn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function X2(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Q2(e){e.clearSnapshot()}function bp(e){e.clearMeasurements()}function Z2(e){e.isLayoutDirty=!1}function J2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Tp(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ek(e){e.resolveTargetDelta()}function tk(e){e.calcProjection()}function nk(e){e.resetSkewAndRotation()}function rk(e){e.removeLeadSnapshot()}function Ep(e,t,n){e.translate=me(t.translate,0,n),e.scale=me(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Pp(e,t,n,r){e.min=me(t.min,n.min,r),e.max=me(t.max,n.max,r)}function ik(e,t,n,r){Pp(e.x,t.x,n.x,r),Pp(e.y,t.y,n.y,r)}function sk(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const ok={duration:.45,ease:[.4,0,.1,1]},Ap=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Lp=Ap("applewebkit/")&&!Ap("chrome/")?Math.round:ot;function Mp(e){e.min=Lp(e.min),e.max=Lp(e.max)}function ak(e){Mp(e.x),Mp(e.y)}function k0(e,t,n){return e==="position"||e==="preserve-aspect"&&!u2(Np(t),Np(n),.2)}function lk(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const ck=N0({attachResizeListener:(e,t)=>ms(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ml={current:void 0},C0=N0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ml.current){const e=new ck({});e.mount(window),e.setOptions({layoutScroll:!0}),Ml.current=e}return Ml.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),uk={pan:{Feature:C2},drag:{Feature:k2,ProjectionNode:C0,MeasureLayout:v0}};function Rp(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&ue.postRender(()=>s(t,Ps(t)))}class dk extends zn{mount(){const{current:t}=this.node;t&&(this.unmount=uj(t,n=>(Rp(this.node,n,"Start"),r=>Rp(this.node,r,"End"))))}unmount(){}}class fk extends zn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Es(ms(this.node.current,"focus",()=>this.onFocus()),ms(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Dp(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ue.postRender(()=>s(t,Ps(t)))}class hk extends zn{mount(){const{current:t}=this.node;t&&(this.unmount=pj(t,n=>(Dp(this.node,n,"Start"),(r,{success:i})=>Dp(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const tu=new WeakMap,Rl=new WeakMap,pk=e=>{const t=tu.get(e.target);t&&t(e)},mk=e=>{e.forEach(pk)};function gk({root:e,...t}){const n=e||document;Rl.has(n)||Rl.set(n,{});const r=Rl.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(mk,{root:e,...t})),r[i]}function yk(e,t,n){const r=gk(t);return tu.set(e,n),r.observe(e),()=>{tu.delete(e),r.unobserve(e)}}const vk={some:0,all:1};class xk extends zn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:vk[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return yk(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(_k(t,n))&&this.startObserver()}unmount(){}}function _k({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const wk={inView:{Feature:xk},tap:{Feature:hk},focus:{Feature:fk},hover:{Feature:dk}},Sk={layout:{ProjectionNode:C0,MeasureLayout:v0}},nu={current:null},b0={current:!1};function jk(){if(b0.current=!0,!!dd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>nu.current=e.matches;e.addListener(t),t()}else nu.current=!1}const Nk=[...Zv,Fe,Dn],kk=e=>Nk.find(Qv(e)),Ip=new WeakMap;function Ck(e,t,n){for(const r in t){const i=t[r],s=n[r];if(ze(i))e.addValue(r,i);else if(ze(s))e.addValue(r,hs(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,hs(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const $p=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class bk{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Fd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=Bt.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,ue.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=o;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=za(n),this.isVariantNode=ov(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in h){const w=h[g];c[g]!==void 0&&ze(w)&&w.set(c[g],!1)}}mount(t){this.current=t,Ip.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),b0.current||jk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:nu.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ip.delete(this.current),this.projection&&this.projection.unmount(),Rn(this.notifyUpdate),Rn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=mr.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ti){const n=ti[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Se()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<$p.length;r++){const i=$p[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Ck(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=hs(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Yv(i)||Vv(i))?i=parseFloat(i):!kk(i)&&Dn.test(n)&&(i=qv(t,n)),this.setBaseTarget(t,ze(i)?i.get():i)),ze(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=vd(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!ze(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ld),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class T0 extends bk{constructor(){super(...arguments),this.KeyframeResolver=Jv}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ze(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Tk(e){return window.getComputedStyle(e)}class Ek extends T0{constructor(){super(...arguments),this.type="html",this.renderInstance=mv}readValueFromInstance(t,n){if(mr.has(n)){const r=$d(n);return r&&r.default||0}else{const r=Tk(t),i=(fv(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return g0(t,n)}build(t,n,r){wd(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return kd(t,n,r)}}class Pk extends T0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Se}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(mr.has(n)){const r=$d(n);return r&&r.default||0}return n=gv.has(n)?n:md(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return xv(t,n,r)}build(t,n,r){Sd(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){yv(t,n,r,i)}mount(t){this.isSVGTag=Nd(t.tagName),super.mount(t)}}const Ak=(e,t)=>yd(e)?new Pk(t):new Ek(t,{allowProjection:e!==S.Fragment}),Lk=rj({...t2,...wk,...uk,...Sk},Ak),be=vS(Lk),E0=[.2,.7,.2,1],Oe={hidden:{opacity:0,y:12},show:{opacity:1,y:0,transition:{duration:.4,ease:E0}}},Bd={hidden:{},show:{transition:{staggerChildren:.05,delayChildren:.04}}},Mk="_shell_zflfk_1",Rk="_bar_zflfk_7",Dk="_barScrolled_zflfk_22",Ik="_brand_zflfk_27",$k="_mark_zflfk_37",Fk="_word_zflfk_47",Ok="_nav_zflfk_53",Vk="_link_zflfk_58",zk="_linkActive_zflfk_71",Bk="_main_zflfk_90",Uk="_mainAtlas_zflfk_98",pt={shell:Mk,bar:Rk,barScrolled:Dk,brand:Ik,mark:$k,word:Fk,nav:Ok,link:Vk,linkActive:zk,main:Bk,mainAtlas:Uk},Hk=[{to:"/atlas",label:"Atlas",reload:!0},{to:"/memories",label:"Memories"},{to:"/entities",label:"Entities"},{to:"/graph",label:"Graph"}];function Wk(){const[e,t]=S.useState(!1),r=pr().pathname==="/atlas";return S.useEffect(()=>{const i=()=>t(window.scrollY>8);return i(),window.addEventListener("scroll",i,{passive:!0}),()=>window.removeEventListener("scroll",i)},[]),l.jsxs("div",{className:pt.shell,children:[l.jsxs(be.header,{className:`${pt.bar} ${e?pt.barScrolled:""}`,initial:"hidden",animate:"show",variants:Bd,children:[l.jsx(be.div,{variants:Oe,children:l.jsxs(ia,{to:"/",className:pt.brand,children:[l.jsx("span",{className:pt.mark,"aria-hidden":"true",children:"◍"}),l.jsx("span",{className:pt.word,children:"Atlas"})]})}),l.jsx("nav",{className:pt.nav,"aria-label":"Primary",children:Hk.map((i,s)=>l.jsx(be.div,{variants:Oe,custom:s,children:l.jsx(sS,{to:i.to,reloadDocument:i.reload,className:({isActive:o})=>o?`${pt.link} ${pt.linkActive}`:pt.link,children:i.label})},i.to))})]}),l.jsx("main",{className:`${pt.main} ${r?pt.mainAtlas:""}`,children:l.jsx(Ww,{})})]})}const qk="_wrap_1c5vy_6",Kk="_svg_1c5vy_12",Gk="_tierLabel_1c5vy_21",Yk="_node_1c5vy_29",Xk="_nodeActive_1c5vy_45",Qk="_nodeTitle_1c5vy_51",Zk="_indexLabel_1c5vy_58",Jk="_arrow_1c5vy_67",eC="_arrowHead_1c5vy_74",tC="_pipe_1c5vy_85",nC="_pipeHead_1c5vy_92",rC="_storeNode_1c5vy_103",iC="_storeName_1c5vy_124",sC="_storeCode_1c5vy_130",oC="_storeRole_1c5vy_136",aC="_storeDetail_1c5vy_143",lC="_recallNode_1c5vy_151",cC="_recallName_1c5vy_172",uC="_recallDesc_1c5vy_178",dC="_recallTag_1c5vy_184",fC="_userNode_1c5vy_192",hC="_userLabel_1c5vy_215",pC="_detailRegion_1c5vy_239",mC="_detailPanel_1c5vy_243",gC="_detailClose_1c5vy_264",yC="_detailTitle_1c5vy_286",vC="_detailLine_1c5vy_294",xC="_detailLineDim_1c5vy_302",_C="_detailHint_1c5vy_310",z={wrap:qk,svg:Kk,tierLabel:Gk,node:Yk,nodeActive:Xk,nodeTitle:Qk,indexLabel:Zk,arrow:Jk,arrowHead:eC,pipe:tC,pipeHead:nC,storeNode:rC,storeName:iC,storeCode:sC,storeRole:oC,storeDetail:aC,recallNode:lC,recallName:cC,recallDesc:uC,recallTag:dC,userNode:fC,userLabel:hC,detailRegion:pC,detailPanel:mC,detailClose:gC,detailTitle:yC,detailLine:vC,detailLineDim:xC,detailHint:_C},wC={nl:{title:"Natural language input",lines:["Raw text from a conversation or document.","No schema required — extraction handles structure.",""]},schema:{title:"Schema-locked extraction",lines:["Parses natural language into typed fields.","Enforces the cortical map schema strictly.","Produces structured entities, triples, and ROI tags."]},cortical:{title:"Cortical map (11 regions)",lines:["Inspired by cortical organisation of long-term memory.","11 ROIs: identity, location, time, emotion, goal…","Each memory is tagged to one or more regions."]},embedding:{title:"Prepared atomic memory",lines:["One validated memory, ready for durable persistence.","Carries entities, relationships, metadata, and ROI tags.","SQLite commits it before vector indexing begins."]},sqlite:{title:"SQLite — engram.db",lines:["Source of truth. Stores the full graph: memories,","entities, relationships, extractions, region tags.","Queried for structural and catalog retrieval."]},lancedb:{title:"LanceDB — atlas_memories",lines:["Local vector store holding 384-d embeddings.","Retrieval uses exact cosine-distance search.","Stored alongside Atlas on your machine."]},semantic:{title:"Semantic recall",lines:["Embed the query, find cosine-nearest vectors.","Returns memories that mean the same thing,","even if phrased differently. /api/memories/search"]},structural:{title:"Structural links",lines:["Find memories sharing entities or RDF triples.","Graph traversal over SQLite relationships.","Catches exact co-references semantic recall misses."]},catalog:{title:"Entity & catalog",lines:["Full-text search across names, aliases, summaries.","Useful for proper nouns and exact entity lookup.","/api/catalog returns ranked matches."]},mcp:{title:"You / MCP client",lines:["The consuming agent or human-facing interface.","Receives fused results from all three retrieval paths.","Signal fusion: 1 − ∏(1 − signal_i)"]}};function SC(){const[e,t]=S.useState(null),n=S.useRef(null),r=S.useCallback(o=>a=>{a.stopPropagation(),t(c=>c===o?null:o)},[]),i=S.useCallback(o=>a=>{a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),a.stopPropagation(),t(c=>c===o?null:o))},[]);S.useEffect(()=>{const o=a=>{a.key==="Escape"&&t(null)};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[]);const s=e?wC[e]:null;return l.jsxs("div",{className:z.wrap,children:[l.jsxs("svg",{ref:n,viewBox:"0 0 960 520",className:z.svg,role:"group","aria-label":"Interactive Atlas memory architecture diagram","aria-describedby":"architecture-instructions",onClick:()=>t(null),children:[l.jsx("title",{children:"Atlas memory architecture — interactive"}),l.jsx("text",{x:"0",y:"18",className:z.tierLabel,children:"CAPTURE"}),l.jsx("line",{x1:"0",y1:"24",x2:"960",y2:"24",stroke:"var(--line-soft)",strokeWidth:"0.5"}),l.jsx("text",{x:"0",y:"155",className:z.tierLabel,children:"SOURCE OF TRUTH · DERIVED INDEX"}),l.jsx("line",{x1:"0",y1:"161",x2:"960",y2:"161",stroke:"var(--line-soft)",strokeWidth:"0.5"}),l.jsx("text",{x:"0",y:"325",className:z.tierLabel,children:"THREE WAYS BACK"}),l.jsx("line",{x1:"0",y1:"331",x2:"960",y2:"331",stroke:"var(--line-soft)",strokeWidth:"0.5"}),l.jsxs("g",{className:`${z.node} ${e==="nl"?z.nodeActive:""}`,onClick:r("nl"),role:"button",tabIndex:0,"aria-pressed":e==="nl",onKeyDown:i("nl"),children:[l.jsx("rect",{x:"0",y:"30",width:"150",height:"48",rx:"4"}),l.jsx("text",{x:"75",y:"50",textAnchor:"middle",className:z.nodeTitle,children:"Natural"}),l.jsx("text",{x:"75",y:"66",textAnchor:"middle",className:z.nodeTitle,children:"language"})]}),l.jsx("line",{x1:"150",y1:"54",x2:"190",y2:"54",className:z.arrow}),l.jsx("polygon",{points:"186,49 196,54 186,59",className:z.arrowHead}),l.jsxs("g",{className:`${z.node} ${e==="schema"?z.nodeActive:""}`,onClick:r("schema"),role:"button",tabIndex:0,"aria-pressed":e==="schema",onKeyDown:i("schema"),children:[l.jsx("rect",{x:"196",y:"30",width:"150",height:"48",rx:"4"}),l.jsx("text",{x:"271",y:"50",textAnchor:"middle",className:z.nodeTitle,children:"Schema-locked"}),l.jsx("text",{x:"271",y:"66",textAnchor:"middle",className:z.nodeTitle,children:"extraction"})]}),l.jsx("line",{x1:"346",y1:"54",x2:"386",y2:"54",className:z.arrow}),l.jsx("polygon",{points:"382,49 392,54 382,59",className:z.arrowHead}),l.jsxs("g",{className:`${z.node} ${e==="cortical"?z.nodeActive:""}`,onClick:r("cortical"),role:"button",tabIndex:0,"aria-pressed":e==="cortical",onKeyDown:i("cortical"),children:[l.jsx("rect",{x:"392",y:"30",width:"150",height:"48",rx:"4"}),l.jsx("text",{x:"467",y:"50",textAnchor:"middle",className:z.nodeTitle,children:"Cortical map"}),l.jsx("text",{x:"467",y:"66",textAnchor:"middle",className:z.nodeTitle,children:"11 ROIs"})]}),l.jsx("line",{x1:"542",y1:"54",x2:"582",y2:"54",className:z.arrow}),l.jsx("polygon",{points:"578,49 588,54 578,59",className:z.arrowHead}),l.jsxs("g",{className:`${z.node} ${e==="embedding"?z.nodeActive:""}`,onClick:r("embedding"),role:"button",tabIndex:0,"aria-pressed":e==="embedding",onKeyDown:i("embedding"),children:[l.jsx("rect",{x:"588",y:"30",width:"150",height:"48",rx:"4"}),l.jsx("text",{x:"663",y:"58",textAnchor:"middle",className:z.nodeTitle,children:"Atomic memory"})]}),l.jsx("line",{x1:"663",y1:"78",x2:"663",y2:"108",className:z.pipe}),l.jsx("line",{x1:"663",y1:"108",x2:"310",y2:"108",className:z.pipe}),l.jsx("line",{x1:"310",y1:"108",x2:"310",y2:"130",className:z.pipe}),l.jsx("polygon",{points:"305,126 310,136 315,126",className:z.pipeHead}),l.jsxs("g",{className:`${z.storeNode} ${e==="sqlite"?z.nodeActive:""}`,onClick:r("sqlite"),role:"button",tabIndex:0,"aria-pressed":e==="sqlite",onKeyDown:i("sqlite"),children:[l.jsx("rect",{x:"155",y:"168",width:"310",height:"80",rx:"4"}),l.jsx("text",{x:"175",y:"192",className:z.storeName,children:"SQLite"}),l.jsx("text",{x:"275",y:"192",className:z.storeCode,children:"engram.db"}),l.jsx("text",{x:"175",y:"214",className:z.storeRole,children:"Source of truth · the graph"}),l.jsx("text",{x:"175",y:"234",className:z.storeDetail,children:"memories · entities · relationships"})]}),l.jsxs("g",{className:`${z.storeNode} ${e==="lancedb"?z.nodeActive:""}`,onClick:r("lancedb"),role:"button",tabIndex:0,"aria-pressed":e==="lancedb",onKeyDown:i("lancedb"),children:[l.jsx("rect",{x:"555",y:"168",width:"310",height:"80",rx:"4"}),l.jsx("text",{x:"575",y:"192",className:z.storeName,children:"LanceDB"}),l.jsx("text",{x:"675",y:"192",className:z.storeCode,children:"atlas_memories"}),l.jsx("text",{x:"575",y:"214",className:z.storeRole,children:"Semantic index"}),l.jsx("text",{x:"575",y:"234",className:z.storeDetail,children:"Cosine vector search"})]}),l.jsx("line",{x1:"465",y1:"208",x2:"545",y2:"208",className:z.arrow}),l.jsx("polygon",{points:"541,203 551,208 541,213",className:z.arrowHead}),l.jsx("text",{x:"508",y:"194",textAnchor:"middle",className:z.indexLabel,children:"EMBED + INDEX"}),l.jsx("line",{x1:"310",y1:"248",x2:"310",y2:"278",className:z.pipe}),l.jsx("line",{x1:"180",y1:"278",x2:"450",y2:"278",className:z.pipe}),l.jsx("line",{x1:"180",y1:"278",x2:"180",y2:"300",className:z.pipe}),l.jsx("polygon",{points:"175,296 180,306 185,296",className:z.pipeHead}),l.jsx("line",{x1:"450",y1:"278",x2:"450",y2:"300",className:z.pipe}),l.jsx("polygon",{points:"445,296 450,306 455,296",className:z.pipeHead}),l.jsx("line",{x1:"710",y1:"248",x2:"710",y2:"278",className:z.pipe}),l.jsx("line",{x1:"710",y1:"278",x2:"770",y2:"278",className:z.pipe}),l.jsx("line",{x1:"770",y1:"278",x2:"770",y2:"300",className:z.pipe}),l.jsx("polygon",{points:"765,296 770,306 775,296",className:z.pipeHead}),l.jsxs("g",{className:`${z.recallNode} ${e==="structural"?z.nodeActive:""}`,onClick:r("structural"),role:"button",tabIndex:0,"aria-pressed":e==="structural",onKeyDown:i("structural"),children:[l.jsx("rect",{x:"80",y:"340",width:"200",height:"90",rx:"4"}),l.jsx("text",{x:"100",y:"364",className:z.recallName,children:"Structural links"}),l.jsx("text",{x:"100",y:"386",className:z.recallDesc,children:"Memories sharing"}),l.jsx("text",{x:"100",y:"402",className:z.recallDesc,children:"entities or triples"})]}),l.jsxs("g",{className:`${z.recallNode} ${e==="catalog"?z.nodeActive:""}`,onClick:r("catalog"),role:"button",tabIndex:0,"aria-pressed":e==="catalog",onKeyDown:i("catalog"),children:[l.jsx("rect",{x:"300",y:"340",width:"300",height:"90",rx:"4"}),l.jsx("text",{x:"320",y:"364",className:z.recallName,children:"Entity & catalog"}),l.jsx("text",{x:"320",y:"386",className:z.recallDesc,children:"Full-text search across names,"}),l.jsx("text",{x:"320",y:"402",className:z.recallDesc,children:"aliases, summaries and raw text."}),l.jsx("text",{x:"320",y:"420",className:z.recallTag,children:"GET /api/catalog"})]}),l.jsxs("g",{className:`${z.recallNode} ${e==="semantic"?z.nodeActive:""}`,onClick:r("semantic"),role:"button",tabIndex:0,"aria-pressed":e==="semantic",onKeyDown:i("semantic"),children:[l.jsx("rect",{x:"620",y:"340",width:"300",height:"90",rx:"4"}),l.jsx("text",{x:"640",y:"364",className:z.recallName,children:"Semantic recall"}),l.jsx("text",{x:"640",y:"386",className:z.recallDesc,children:"Embed the query; find the nearest"}),l.jsx("text",{x:"640",y:"402",className:z.recallDesc,children:"vectors in the local index."}),l.jsx("text",{x:"640",y:"420",className:z.recallTag,children:"GET /api/memories/search"})]}),l.jsx("line",{x1:"180",y1:"430",x2:"180",y2:"460",className:z.pipe}),l.jsx("line",{x1:"450",y1:"430",x2:"450",y2:"460",className:z.pipe}),l.jsx("line",{x1:"770",y1:"430",x2:"770",y2:"460",className:z.pipe}),l.jsx("line",{x1:"180",y1:"460",x2:"770",y2:"460",className:z.pipe}),l.jsx("line",{x1:"540",y1:"460",x2:"540",y2:"480",className:z.pipe}),l.jsx("polygon",{points:"535,476 540,486 545,476",className:z.pipeHead}),l.jsxs("g",{className:`${z.userNode} ${e==="mcp"?z.nodeActive:""}`,onClick:r("mcp"),role:"button",tabIndex:0,"aria-pressed":e==="mcp",onKeyDown:i("mcp"),children:[l.jsx("rect",{x:"440",y:"488",width:"200",height:"30",rx:"4"}),l.jsx("text",{x:"540",y:"508",textAnchor:"middle",className:z.userLabel,children:"You / MCP Client"})]})]}),l.jsx("div",{id:"architecture-instructions",className:z.detailRegion,"aria-live":"polite",children:s?l.jsxs("div",{className:z.detailPanel,children:[l.jsxs("button",{type:"button",className:z.detailClose,onClick:()=>t(null),"aria-label":"Close architecture details",children:["Close ",l.jsx("span",{"aria-hidden":"true",children:"· esc"})]}),l.jsx("p",{className:z.detailTitle,children:s.title}),s.lines[0]&&l.jsx("p",{className:z.detailLine,children:s.lines[0]}),s.lines[1]&&l.jsx("p",{className:z.detailLine,children:s.lines[1]}),s.lines[2]&&l.jsx("p",{className:z.detailLineDim,children:s.lines[2]})]}):l.jsx("p",{className:z.detailHint,children:"Select any node to inspect its role in the system."})})]})}const jC=28,Fp="#6ab0ff",no="rgba(106,176,255,";function NC(){const e=S.useRef(null);return S.useEffect(()=>{const t=e.current;if(!t)return;const n=t.getContext("2d");if(!n)return;let r=[],i=[],s,o=[];const a=()=>t.offsetWidth,c=()=>t.offsetHeight;function u(){const g=window.devicePixelRatio||1;t.width=a()*g,t.height=c()*g,n.setTransform(g,0,0,g,0,0)}function d(){r=[];const g=55;for(let w=0;w<jC;w++){let y=0,_=0,p=0;do y=.06+Math.random()*.86,_=.04+Math.random()*.88,p++;while(p<50&&r.some(m=>{const v=(m.x-y)*a(),x=(m.y-_)*c();return Math.sqrt(v*v+x*x)<g}));r.push({x:y,y:_,r:2+Math.random()*2.5,glow:0,glowDecay:.012+Math.random()*.01,connections:[]})}r.forEach((w,y)=>{r.forEach((_,p)=>{if(y===p)return;const m=(w.x-_.x)*a(),v=(w.y-_.y)*c();Math.sqrt(m*m+v*v)<140&&w.connections.length<4&&w.connections.push(p)})})}function f(){const g=Math.floor(Math.random()*r.length),w=r[g];if(!w.connections.length)return;const y=w.connections[Math.floor(Math.random()*w.connections.length)];i.push({src:g,dst:y,t:0,speed:.018+Math.random()*.014}),r[g].glow=1}function h(){n.clearRect(0,0,a(),c());const g=a(),w=c();for(const y of r)y.glow>0&&(y.glow=Math.max(0,y.glow-y.glowDecay));for(const y of r)for(const _ of y.connections){const p=r[_];n.beginPath(),n.moveTo(y.x*g,y.y*w),n.lineTo(p.x*g,p.y*w),n.strokeStyle=no+"0.07)",n.lineWidth=.5,n.stroke()}i=i.filter(y=>y.t<=1);for(const y of i){y.t+=y.speed;const _=r[y.src],p=r[y.dst],m=_.x*g+(p.x-_.x)*g*y.t,v=_.y*w+(p.y-_.y)*w*y.t;n.beginPath(),n.moveTo(_.x*g,_.y*w),n.lineTo(m,v),n.strokeStyle=no+.5*y.t+")",n.lineWidth=1,n.stroke(),n.beginPath(),n.arc(m,v,2.5,0,Math.PI*2),n.fillStyle=Fp,n.fill(),y.t>=1&&(r[y.dst].glow=1)}for(const y of r){const _=y.glow;_>0&&(n.beginPath(),n.arc(y.x*g,y.y*w,y.r*3.5*_,0,Math.PI*2),n.fillStyle=no+_*.15+")",n.fill()),n.beginPath(),n.arc(y.x*g,y.y*w,y.r,0,Math.PI*2),n.fillStyle=_>.1?Fp:no+"0.3)",n.fill()}s=requestAnimationFrame(h)}return u(),d(),h(),o.push(setInterval(f,260)),o.push(setInterval(f,520)),window.addEventListener("resize",u),()=>{cancelAnimationFrame(s),o.forEach(clearInterval),window.removeEventListener("resize",u)}},[]),l.jsx("canvas",{ref:e,style:{position:"absolute",top:0,right:0,width:"55%",height:"100%",pointerEvents:"none"},"aria-hidden":"true"})}function kC(){const e=S.useRef(null);return S.useEffect(()=>{const t=e.current;if(!t)return;let n=0,r;function i(){const s=[];for(let a=0;a<=120;a++){const c=a/120*1440,u=a/120*Math.PI*8+n;let d=30+Math.sin(u)*6;a%20===10&&(d-=22),a%20===11&&(d+=18),a%20===12&&(d-=10),s.push(`${c},${d}`)}t.setAttribute("points",s.join(" ")),n+=.04,r=requestAnimationFrame(i)}return i(),()=>cancelAnimationFrame(r)},[]),l.jsx("svg",{style:{position:"absolute",bottom:0,left:0,right:0,height:60,zIndex:5,pointerEvents:"none"},viewBox:"0 0 1440 60",preserveAspectRatio:"none",fill:"none","aria-hidden":"true",children:l.jsx("polyline",{ref:e,points:"",stroke:"#6ab0ff",strokeWidth:"1",fill:"none",opacity:"0.3"})})}const CC="_page_1rrji_7",bC="_topbar_1rrji_19",TC="_topbarScrolled_1rrji_34",EC="_wordmark_1rrji_39",PC="_glyph_1rrji_52",AC="_topnav_1rrji_64",LC="_barCta_1rrji_80",MC="_hero_1rrji_96",RC="_heroGrid_1rrji_104",DC="_heroInner_1rrji_117",IC="_heroCoord_1rrji_122",$C="_heroTitle_1rrji_126",FC="_heroSub_1rrji_139",OC="_heroCta_1rrji_148",VC="_scope_1rrji_156",zC="_scopeLine_1rrji_163",BC="_metrics_1rrji_178",UC="_metric_1rrji_178",HC="_marginNote_1rrji_215",WC="_section_1rrji_235",qC="_sectionHead_1rrji_239",KC="_lab_1rrji_266",GC="_labInput_1rrji_278",YC="_labSentence_1rrji_284",XC="_markPerson_1rrji_291",QC="_markTime_1rrji_295",ZC="_labReq_1rrji_299",JC="_labArrow_1rrji_310",eb="_labArrowLine_1rrji_317",tb="_labArrowText_1rrji_323",nb="_labOutput_1rrji_347",rb="_labCol_1rrji_368",ib="_entList_1rrji_375",sb="_triple_1rrji_376",ob="_meterList_1rrji_377",ab="_labOutputLive_1rrji_381",lb="_meterHead_1rrji_450",cb="_meter_1rrji_377",ub="_meterFill_1rrji_469",db="_archDetail_1rrji_626",fb="_archNote_1rrji_634",hb="_mcp_1rrji_649",pb="_mcpCopy_1rrji_660",mb="_mcpFine_1rrji_674",gb="_mcpInstall_1rrji_682",yb="_mcpInstallLabel_1rrji_685",vb="_mcpInstallCode_1rrji_694",xb="_mcpRight_1rrji_707",_b="_mcpTerminal_1rrji_713",wb="_mcpBar_1rrji_719",Sb="_mcpName_1rrji_726",jb="_mcpCode_1rrji_732",Nb="_tokK_1rrji_742",kb="_tokS_1rrji_745",Cb="_mcpTools_1rrji_749",bb="_quote_1rrji_788",Tb="_principles_1rrji_801",Eb="_principleIndex_1rrji_823",Pb="_faq_1rrji_848",Ab="_faqItem_1rrji_852",Lb="_faqMark_1rrji_874",Mb="_ctaBand_1rrji_918",Rb="_ctaGrid_1rrji_925",Db="_footer_1rrji_957",Ib="_footerLinks_1rrji_965",$b="_footerFine_1rrji_978",Fb="_reveal_1rrji_987",A={page:CC,topbar:bC,topbarScrolled:TC,wordmark:EC,glyph:PC,topnav:AC,barCta:LC,hero:MC,heroGrid:RC,heroInner:DC,heroCoord:IC,heroTitle:$C,heroSub:FC,heroCta:OC,scope:VC,scopeLine:zC,metrics:BC,metric:UC,marginNote:HC,section:WC,sectionHead:qC,lab:KC,labInput:GC,labSentence:YC,markPerson:XC,markTime:QC,labReq:ZC,labArrow:JC,labArrowLine:eb,labArrowText:tb,labOutput:nb,labCol:rb,entList:ib,triple:sb,meterList:ob,labOutputLive:ab,meterHead:lb,meter:cb,meterFill:ub,archDetail:db,archNote:fb,mcp:hb,mcpCopy:pb,mcpFine:mb,mcpInstall:gb,mcpInstallLabel:yb,mcpInstallCode:vb,mcpRight:xb,mcpTerminal:_b,mcpBar:wb,mcpName:Sb,mcpCode:jb,tokK:Nb,tokS:kb,mcpTools:Cb,quote:bb,principles:Tb,principleIndex:Eb,faq:Pb,faqItem:Ab,faqMark:Lb,ctaBand:Mb,ctaGrid:Rb,footer:Db,footerLinks:Ib,footerFine:$b,reveal:Fb},ro=e=>e,Ob=[{figure:"11",label:"facets extracted per moment"},{figure:"2",label:"indexes for instant recall"},{figure:"9",label:"tools to read & write memory"},{figure:"18",label:"endpoints to read & write memory"}],Vb=[{mention:"Maya",kind:"person",conf:"0.95"},{mention:"a cafe",kind:"place",conf:"0.81"},{mention:"yesterday",kind:"time",conf:"0.90"}],zb=[{region:"Hippocampus",weight:.72},{region:"Association cortex",weight:.41},{region:"Temporal cortex",weight:.28},{region:"Prefrontal cortex",weight:.16}],Bb=[{name:"add_memory",note:"write a moment"},{name:"search_memories",note:"semantic recall"},{name:"get_related_memories",note:"follow a thread"},{name:"find_entities",note:"look someone up"},{name:"get_entity_memories",note:"everything about X"},{name:"get_memory",note:"full record"},{name:"list_memories",note:"browse recent"},{name:"update_memory_summary",note:"revise"},{name:"delete_memory",note:"forget"}],Ub=[{index:"01",term:"Hebbian wiring",body:"Co-occurring people, places and relationships strengthen the links between memories — fire together, wire together."},{index:"02",term:"Hippocampal laterality",body:"The left hippocampus leans verbal, the right leans spatial. Each memory's activation is split across both."},{index:"03",term:"Type-specific anatomy",body:"Episodic recall leans on the hippocampus, skills on the basal ganglia, feeling on the amygdala — each type lights its own regions."},{index:"04",term:"Salience & affect",body:"Emotionally charged moments weight the amygdala and surface more readily — the way a vivid memory outshines a dull one."}],Hb=[{q:"Where do my memories actually live?",a:"On your machine. SQLite holds the graph (the bones); LanceDB holds the embeddings (the smell). Only the extraction step calls the LLM provider you configure."},{q:"Does it need an LLM?",a:"Extraction — turning a sentence into entities, relationships and regions — calls a configured LLM. Everything you've already captured stays browsable without it."},{q:"How is this different from ChatGPT's memory?",a:"ChatGPT keeps a short, opaque summary it manages for you. Atlas keeps the full record — every entity, relationship and region — under your control, queryable by meaning, by association or by name, and shareable with any MCP-capable assistant."},{q:"What do I actually need to run it?",a:"A local Node server, a SQLite file and a local LanceDB directory — all of which you keep. Bring your own LLM key for the extraction step. No Atlas cloud account or telemetry."},{q:"Is the neuroscience literal?",a:"It's a principled model, not a clinical scan. Region activations follow established memory-systems research, but they remain an interpretive map — built to make structure visible, not to diagnose."}],Op=e=>`${Math.round(e*100)}%`;function Vp(){return l.jsxs("a",{href:"/landing",className:A.wordmark,children:[l.jsxs("svg",{viewBox:"0 0 32 32","aria-hidden":"true",className:A.glyph,children:[l.jsx("circle",{cx:"16",cy:"16",r:"11",fill:"none",stroke:"currentColor",strokeWidth:"1.4"}),l.jsx("circle",{cx:"19.5",cy:"12",r:"1.9",fill:"currentColor"}),l.jsx("circle",{cx:"12",cy:"20",r:"1.5",fill:"currentColor"}),l.jsx("path",{d:"M19.5 12 L12 20",stroke:"currentColor",strokeWidth:"0.8",opacity:"0.6"})]}),l.jsx("span",{children:"Atlas"})]})}function Wb(){return l.jsx("svg",{className:A.scope,viewBox:"0 0 720 80",preserveAspectRatio:"none","aria-hidden":"true",children:l.jsx("path",{className:A.scopeLine,d:"M0 40 L120 40 L150 40 L168 14 L186 66 L204 28 L222 40 L360 40 L388 40 L404 22 L420 58 L436 40 L560 40 L590 40 L606 30 L620 50 L636 40 L720 40"})})}function zp(){const e=S.useRef(null),[t,n]=S.useState(!1),[r,i]=S.useState(!1),s=S.useRef(null);return S.useEffect(()=>{const o=s.current;if(!o)return;if(typeof IntersectionObserver>"u"){n(!0);return}const a=new IntersectionObserver(c=>{for(const u of c)u.isIntersecting&&(n(!0),a.disconnect())},{threshold:.35});return a.observe(o),()=>a.disconnect()},[]),S.useEffect(()=>{const o=()=>i(window.scrollY>8);return o(),window.addEventListener("scroll",o,{passive:!0}),()=>window.removeEventListener("scroll",o)},[]),l.jsxs("div",{className:A.page,ref:e,children:[l.jsxs(be.header,{className:`${A.topbar} ${r?A.topbarScrolled:""}`,initial:"hidden",animate:"show",variants:Bd,children:[l.jsx(be.div,{variants:Oe,children:l.jsx(Vp,{})}),l.jsxs("nav",{className:A.topnav,"aria-label":"Primary",children:[l.jsx(be.a,{href:"/how-it-works",variants:Oe,children:"How it works"}),l.jsx(be.a,{href:"#architecture",variants:Oe,children:"Architecture"}),l.jsx(be.a,{href:"#mcp",variants:Oe,children:"Connect"}),l.jsx(be.a,{href:"#science",variants:Oe,children:"Science"}),l.jsx(be.a,{href:"https://github.com/sidmanale643/Atlas",target:"_blank",rel:"noopener noreferrer",variants:Oe,children:"GitHub"}),l.jsx(be.a,{className:`nrg-btn ${A.barCta}`,href:"/atlas",variants:Oe,children:"Open the atlas"})]})]}),l.jsxs("main",{children:[l.jsxs("section",{className:A.hero,children:[l.jsx("div",{className:A.heroGrid,"aria-hidden":"true"}),l.jsx(NC,{}),l.jsxs("div",{className:A.heroInner,children:[l.jsx("p",{className:`${A.heroCoord} ${A.reveal}`,children:l.jsx("span",{className:"label",children:"atlas · build 2026.06"})}),l.jsxs("h1",{className:`${A.heroTitle} ${A.reveal}`,children:["Neurons that fire together",l.jsx("br",{}),l.jsx("em",{children:"wire together."})]}),l.jsx("p",{className:`${A.heroSub} ${A.reveal}`,children:"Add a moment. Atlas breaks it into people, places, time and activity — places it anatomically across the cortex — then draws the associations that make it retrievable. A brain, not a notebook."}),l.jsxs("div",{className:`${A.heroCta} ${A.reveal}`,children:[l.jsx("a",{className:"nrg-btn nrg-btn--solid",href:"/atlas",children:"Open the atlas →"}),l.jsx("a",{className:"nrg-btn",href:"/how-it-works",children:"See how it works"})]}),l.jsx(Wb,{}),l.jsx("dl",{className:`${A.metrics} ${A.reveal}`,children:Ob.map(o=>l.jsxs("div",{className:A.metric,children:[l.jsx("dt",{children:o.figure}),l.jsx("dd",{children:o.label})]},o.label))})]}),l.jsx(kC,{}),l.jsx("aside",{className:A.marginNote,"aria-hidden":"true",children:"fig. 1 — a single moment, decomposed and re-wired"})]}),l.jsxs("section",{className:A.section,id:"extraction",children:[l.jsxs("div",{className:A.sectionHead,children:[l.jsx("span",{className:"rule-label",children:"extraction lab"}),l.jsx("h2",{children:"From a memory to a synapse."}),l.jsx("p",{children:"Natural language is decoded under a locked schema into entities, relationship triples and a weighted cortical activation map — the raw material the atlas wires together."})]}),l.jsxs("div",{className:A.lab,ref:s,children:[l.jsxs("div",{className:A.labInput,children:[l.jsx("span",{className:"label",children:"input · ≤180 chars"}),l.jsxs("p",{className:A.labSentence,children:[l.jsx("span",{className:A.markPerson,children:"I went to a cafe with Maya"})," ",l.jsx("span",{className:A.markTime,children:"yesterday"}),"."]}),l.jsx("code",{className:A.labReq,children:"POST /api/extract"})]}),l.jsxs("div",{className:A.labArrow,"aria-hidden":"true",children:[l.jsx("span",{className:A.labArrowLine}),l.jsx("span",{className:A.labArrowText,children:"decode"}),l.jsx("span",{className:A.labArrowLine})]}),l.jsxs("div",{className:`${A.labOutput} ${t?A.labOutputLive:""}`,children:[l.jsxs("div",{className:A.labCol,children:[l.jsx("span",{className:"label",children:"named entities"}),l.jsx("ul",{className:A.entList,children:Vb.map((o,a)=>l.jsxs("li",{style:ro({"--i":String(a)}),children:[l.jsx("b",{children:o.mention}),l.jsxs("small",{children:[o.kind," · ",o.conf]})]},o.mention))})]}),l.jsxs("div",{className:A.labCol,children:[l.jsx("span",{className:"label",children:"relationship triple"}),l.jsxs("p",{className:A.triple,style:ro({"--i":"1"}),children:[l.jsx("b",{children:"self"}),l.jsx("em",{children:"went to a cafe with"}),l.jsx("b",{children:"Maya"})]}),l.jsx("span",{className:"label",children:"cortical activation"}),l.jsx("ul",{className:A.meterList,children:zb.map((o,a)=>l.jsxs("li",{style:ro({"--i":String(a+2)}),children:[l.jsxs("span",{className:A.meterHead,children:[l.jsx("span",{children:o.region}),l.jsx("strong",{children:Op(o.weight)})]}),l.jsx("span",{className:A.meter,children:l.jsx("span",{className:A.meterFill,style:ro({"--w":Op(o.weight)})})})]},o.region))})]})]})]})]}),l.jsx("hr",{className:"nrg-divider"}),l.jsxs("section",{className:A.section,id:"architecture",children:[l.jsxs("div",{className:A.sectionHead,children:[l.jsx("span",{className:"rule-label",children:"how it fits"}),l.jsxs("h2",{children:["One memory, one source, ",l.jsx("em",{children:"three ways back."})]}),l.jsx("p",{children:"A moment is captured once, then persisted to a relational graph and a vector index as a rebuildable projection — so it can be recalled by meaning, by association, or by name. A Node server orchestrates the write; an MCP server exposes it to agents."})]}),l.jsx(SC,{}),l.jsxs("p",{className:A.archNote,children:["Related-memories fuses structural + semantic signal —"," ",l.jsx("code",{children:"1 − ∏(1 − signal)"}),". Surfaces:"," ",l.jsx("a",{href:"/atlas",children:"Atlas"}),", ",l.jsx("a",{href:"/memories",children:"Memories"}),","," ",l.jsx("a",{href:"/graph",children:"Graph"}),"."]})]}),l.jsx("hr",{className:"nrg-divider"}),l.jsx("section",{className:A.section,id:"mcp",children:l.jsxs("div",{className:A.mcp,children:[l.jsxs("div",{className:A.mcpCopy,children:[l.jsx("span",{className:"rule-label",children:"model context protocol"}),l.jsx("h2",{children:"Give your agent a hippocampus."}),l.jsx("p",{children:"Atlas ships an MCP server. Point any client — Claude among them — at it, and your assistant writes to and recalls from the same atlas you explore, persisting memory across every session."}),l.jsxs("p",{className:A.mcpFine,children:["Reads are safe by default — ",l.jsx("code",{children:"delete_memory"})," is the only destructive call, and it confirms first."]}),l.jsxs("div",{className:A.mcpInstall,children:[l.jsx("span",{className:A.mcpInstallLabel,children:"Quick start"}),l.jsx("pre",{className:A.mcpInstallCode,children:l.jsx("code",{children:`npm i -g atlas-mcp
|
|
68
|
+
npx atlas-mcp`})})]})]}),l.jsxs("div",{className:A.mcpRight,children:[l.jsxs("div",{className:A.mcpTerminal,children:[l.jsx("div",{className:A.mcpBar,"aria-hidden":"true",children:l.jsx("span",{className:A.mcpName,children:"claude_desktop_config.json"})}),l.jsx("pre",{className:A.mcpCode,children:l.jsxs("code",{children:[`{
|
|
69
|
+
`," ",l.jsx("span",{className:A.tokK,children:'"mcpServers"'}),`: {
|
|
70
|
+
`," ",l.jsx("span",{className:A.tokK,children:'"atlas"'}),`: {
|
|
71
|
+
`," ",l.jsx("span",{className:A.tokK,children:'"command"'}),": ",l.jsx("span",{className:A.tokS,children:'"npx"'}),`,
|
|
72
|
+
`," ",l.jsx("span",{className:A.tokK,children:'"args"'}),": [",l.jsx("span",{className:A.tokS,children:'"atlas-mcp"'}),`]
|
|
73
|
+
`,` }
|
|
74
|
+
`,` }
|
|
75
|
+
`,"}"]})})]}),l.jsx("ul",{className:A.mcpTools,children:Bb.map(o=>l.jsxs("li",{children:[l.jsx("code",{children:o.name}),l.jsx("span",{children:o.note})]},o.name))})]})]})}),l.jsx("hr",{className:"nrg-divider"}),l.jsxs("section",{className:A.section,id:"science",children:[l.jsx("div",{className:A.sectionHead,children:l.jsx("span",{className:"rule-label",children:"the science"})}),l.jsxs("blockquote",{className:A.quote,children:["A memory isn't a file you store. It's a ",l.jsx("em",{children:"pattern of connection"})," ","— and connection is something you can map."]}),l.jsx("ol",{className:A.principles,children:Ub.map(o=>l.jsxs("li",{children:[l.jsx("span",{className:A.principleIndex,children:o.index}),l.jsx("strong",{children:o.term}),l.jsx("span",{className:A.archDetail,children:o.body})]},o.term))})]}),l.jsx("hr",{className:"nrg-divider"}),l.jsxs("section",{className:A.section,children:[l.jsxs("div",{className:A.sectionHead,children:[l.jsx("span",{className:"rule-label",children:"the honest answers"}),l.jsx("h2",{children:"Questions, answered plainly."})]}),l.jsx("div",{className:A.faq,children:Hb.map(o=>l.jsxs("details",{className:A.faqItem,children:[l.jsxs("summary",{children:[l.jsx("span",{children:o.q}),l.jsx("i",{className:A.faqMark,"aria-hidden":"true"})]}),l.jsx("p",{children:o.a})]},o.q))})]}),l.jsxs("section",{className:A.ctaBand,children:[l.jsx("div",{className:A.ctaGrid,"aria-hidden":"true"}),l.jsxs("h2",{children:["Open the workspace. Record your first memory.",l.jsx("br",{}),l.jsx("em",{children:"Watch the associations draw themselves."})]}),l.jsxs("div",{className:A.heroCta,children:[l.jsx("a",{className:"nrg-btn nrg-btn--solid",href:"/atlas",children:"Open the atlas →"}),l.jsx("a",{className:"nrg-btn",href:"/memories",children:"Browse memories"})]})]})]}),l.jsxs("footer",{className:A.footer,children:[l.jsx(Vp,{}),l.jsxs("nav",{className:A.footerLinks,"aria-label":"Footer",children:[l.jsx("a",{href:"/atlas",children:"Atlas"}),l.jsx("a",{href:"/memories",children:"Memories"}),l.jsx("a",{href:"/graph",children:"Graph"}),l.jsx("a",{href:"/memories/compare",children:"Compare"}),l.jsx("a",{href:"https://github.com/sidmanale643/Atlas",target:"_blank",rel:"noopener noreferrer",children:"GitHub"})]}),l.jsx("span",{className:A.footerFine,children:"A map of remembered things"})]})]})}function Hn({children:e,className:t,delay:n=0,amount:r=.3}){return l.jsx(be.div,{className:t,variants:Oe,initial:"hidden",whileInView:"show",viewport:{once:!0,amount:r},transition:{duration:.4,ease:E0,delay:n},children:e})}const qb="_wrap_d1l0i_6",Kb="_stage_d1l0i_21",Gb="_reticle_d1l0i_31",Yb="_brain_d1l0i_44",Xb="_outline_d1l0i_53",Qb="_sulcus_d1l0i_59",Zb="_gyrus_d1l0i_65",Jb="_stem_d1l0i_71",eT="_cerebellum_d1l0i_72",tT="_region_d1l0i_81",nT="_regionGlow_d1l0i_86",rT="_regionShape_d1l0i_91",iT="_regionDeep_d1l0i_98",sT="_regionDot_d1l0i_101",oT="_regionIndex_d1l0i_106",aT="_regionOn_d1l0i_125",lT="_list_d1l0i_155",cT="_row_d1l0i_165",uT="_rowOn_d1l0i_178",dT="_rowIndex_d1l0i_187",fT="_rowMain_d1l0i_200",hT="_rowHead_d1l0i_206",pT="_rowType_d1l0i_223",mT="_rowBody_d1l0i_233",ie={wrap:qb,stage:Kb,reticle:Gb,brain:Yb,outline:Xb,sulcus:Qb,gyrus:Zb,stem:Jb,cerebellum:eT,region:tT,regionGlow:nT,regionShape:rT,regionDeep:iT,regionDot:sT,regionIndex:oT,regionOn:aT,list:lT,row:cT,rowOn:uT,rowIndex:dT,rowMain:fT,rowHead:hT,rowType:pT,rowBody:mT},Wn=[{id:"hippocampus",index:"01",name:"Hippocampus",type:"Episodic memory",deep:!0,cx:372,cy:268,rx:34,ry:18,body:"The seahorse-shaped engine of episodic memory. It binds the scattered fragments of a moment — who, where, when — into a single retrievable trace. Atlas leans on it hardest: the left hippocampus weights verbal detail, the right weights spatial layout, so every memory's activation is split across both."},{id:"amygdala",index:"02",name:"Amygdala",type:"Emotional salience",deep:!0,cx:320,cy:290,rx:22,ry:16,body:"Sits just ahead of the hippocampus and tags a moment with feeling. Emotionally charged memories light it brightly and, weighted by that salience, surface more readily later — the reason a vivid memory outshines a dull one."},{id:"basal-ganglia",index:"03",name:"Basal ganglia",type:"Procedural memory",deep:!0,cx:296,cy:224,rx:26,ry:16,body:"The substrate of skills and habits — memory you enact rather than recall. When a moment is about doing rather than recounting, activation shifts here, away from the hippocampal episodic core."},{id:"prefrontal",index:"04",name:"Prefrontal cortex",type:"Source & planning",cx:168,cy:214,rx:40,ry:30,body:"The front of the map holds working memory and source attribution — where a memory came from, when, and how it connects to intent. It keeps recall grounded, distinguishing what happened from what was merely imagined."},{id:"temporal",index:"05",name:"Temporal cortex",type:"Semantic memory",cx:344,cy:332,rx:52,ry:26,body:"Beneath the lateral sulcus lives semantic knowledge — names, facts, the meaning of things stripped of when you learned them. It lets Atlas resolve a mention like “a cafe” into a concept that links to every other cafe you've stored."},{id:"association",index:"06",name:"Association cortex",type:"Multimodal binding",cx:432,cy:168,rx:50,ry:32,body:"The parietal association areas weave the senses together — sight, sound, place — into the unified texture of an experience. It is the connective tissue that lets one memory reach across modalities to another."}];function gT(){const[e,t]=S.useState("hippocampus"),n=S.useCallback(i=>()=>t(s=>s===i?s:i),[]),r=S.useCallback(i=>s=>{s.key!=="Enter"&&s.key!==" "||(s.preventDefault(),t(i))},[]);return S.useEffect(()=>{const i=s=>{if(s.key!=="ArrowDown"&&s.key!=="ArrowUp")return;const o=Wn.findIndex(c=>c.id===e);if(o===-1)return;const a=s.key==="ArrowDown"?(o+1)%Wn.length:(o-1+Wn.length)%Wn.length;t(Wn[a].id)};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[e]),l.jsxs("div",{className:ie.wrap,children:[l.jsxs("div",{className:ie.stage,children:[l.jsx("span",{className:ie.reticle,"aria-hidden":"true"}),l.jsxs("svg",{className:ie.brain,viewBox:"0 0 680 520",role:"group","aria-label":"Interactive lateral diagram of the brain's memory regions",children:[l.jsx("title",{children:"Memory regions of the brain"}),l.jsx("defs",{children:l.jsxs("radialGradient",{id:"bd-core",cx:"50%",cy:"46%",r:"60%",children:[l.jsx("stop",{offset:"0%",stopColor:"rgba(56,130,246,0.16)"}),l.jsx("stop",{offset:"70%",stopColor:"rgba(56,130,246,0.04)"}),l.jsx("stop",{offset:"100%",stopColor:"rgba(56,130,246,0)"})]})}),l.jsx("ellipse",{cx:"330",cy:"240",rx:"270",ry:"190",fill:"url(#bd-core)"}),l.jsx("path",{className:ie.outline,d:`M120 250
|
|
76
|
+
C96 196 132 132 214 108
|
|
77
|
+
C300 82 408 86 482 124
|
|
78
|
+
C548 158 566 214 540 262
|
|
79
|
+
C566 300 548 350 498 352
|
|
80
|
+
C470 392 402 404 356 386
|
|
81
|
+
C338 420 276 426 240 404
|
|
82
|
+
C176 410 128 372 118 320
|
|
83
|
+
C92 306 92 274 120 250 Z`}),l.jsx("path",{className:ie.sulcus,d:"M196 318 C266 300 352 306 430 332"}),l.jsx("path",{className:ie.sulcus,d:"M330 116 C312 168 320 214 296 252"}),l.jsx("path",{className:ie.gyrus,d:"M168 168 C210 150 268 152 300 174"}),l.jsx("path",{className:ie.gyrus,d:"M360 132 C404 138 446 156 470 188"}),l.jsx("path",{className:ie.gyrus,d:"M214 220 C256 206 300 210 332 232"}),l.jsx("path",{className:ie.gyrus,d:"M392 210 C436 216 472 236 492 268"}),l.jsx("path",{className:ie.gyrus,d:"M250 360 C300 350 352 356 396 374"}),l.jsx("path",{className:ie.stem,d:"M356 388 C372 420 372 452 360 484"}),l.jsx("path",{className:ie.cerebellum,d:"M470 360 C520 360 548 392 540 430 C532 462 492 470 462 452"}),Wn.map(i=>{const s=e===i.id;return l.jsxs("g",{className:`${ie.region} ${s?ie.regionOn:""} ${i.deep?ie.regionDeep:""}`,onClick:n(i.id),onMouseEnter:n(i.id),onKeyDown:r(i.id),role:"button",tabIndex:0,"aria-pressed":s,"aria-label":`${i.name} — ${i.type}`,children:[l.jsx("ellipse",{className:ie.regionGlow,cx:i.cx,cy:i.cy,rx:i.rx+10,ry:i.ry+10}),l.jsx("ellipse",{className:ie.regionShape,cx:i.cx,cy:i.cy,rx:i.rx,ry:i.ry}),l.jsx("circle",{className:ie.regionDot,cx:i.cx,cy:i.cy,r:3.2}),l.jsx("text",{className:ie.regionIndex,x:i.cx,y:i.cy-i.ry-8,textAnchor:"middle",children:i.index})]},i.id)})]})]}),l.jsx("ol",{className:ie.list,"aria-label":"Brain memory regions",children:Wn.map(i=>{const s=e===i.id;return l.jsx("li",{className:s?ie.rowOn:void 0,children:l.jsxs("button",{type:"button",className:ie.row,"aria-expanded":s,onClick:n(i.id),onMouseEnter:n(i.id),children:[l.jsx("span",{className:ie.rowIndex,children:i.index}),l.jsxs("span",{className:ie.rowMain,children:[l.jsxs("span",{className:ie.rowHead,children:[l.jsx("strong",{children:i.name}),l.jsx("em",{className:ie.rowType,children:i.type})]}),l.jsx("span",{className:ie.rowBody,children:i.body})]})]})},i.id)})})]})}const yT="_hero_1kx6p_7",vT="_heroTitle_1kx6p_11",xT="_steps_1kx6p_17",_T="_step_1kx6p_17",wT="_stepIndex_1kx6p_51",ST="_stepBody_1kx6p_59",jT="_stepLead_1kx6p_62",NT="_stepTerm_1kx6p_70",kT="_stepText_1kx6p_78",CT="_brainSection_1kx6p_88",bT="_brainQuote_1kx6p_91",TT="_brainHint_1kx6p_104",ET="_brainNotes_1kx6p_114",PT="_brainNote_1kx6p_114",AT="_wiring_1kx6p_158",LT="_wireLink_1kx6p_166",MT="_wireLinkLive_1kx6p_172",RT="_wireMem_1kx6p_184",DT="_wireLabel_1kx6p_189",IT="_wireHubGlow_1kx6p_195",$T="_wireHub_1kx6p_195",FT="_wireHubLabel_1kx6p_211",OT="_wireHubTag_1kx6p_216",VT="_recall_1kx6p_226",zT="_recallItem_1kx6p_232",BT="_recallIndex_1kx6p_238",UT="_recallHead_1kx6p_246",HT="_recallVia_1kx6p_259",WT="_recallText_1kx6p_268",ne={hero:yT,heroTitle:vT,steps:xT,step:_T,stepIndex:wT,stepBody:ST,stepLead:jT,stepTerm:NT,stepText:kT,brainSection:CT,brainQuote:bT,brainHint:TT,brainNotes:ET,brainNote:PT,wiring:AT,wireLink:LT,wireLinkLive:MT,wireMem:RT,wireLabel:DT,wireHubGlow:IT,wireHub:$T,wireHubLabel:FT,wireHubTag:OT,recall:VT,recallItem:zT,recallIndex:BT,recallHead:UT,recallVia:HT,recallText:WT},qT=[{index:"01",term:"A moment goes in",lead:"It starts with a sentence.",body:"You add a moment in plain language — up to ~180 characters, no schema, no tags. “I went to a cafe with Maya yesterday.” That single line is the raw material; everything downstream is Atlas deciding what it means and where it belongs."},{index:"02",term:"The sentence is decoded",lead:"Language becomes structure.",body:"A schema-locked extraction step reads the sentence and returns three things: the named entities (Maya · person, a cafe · place, yesterday · time), the relationship triple that binds them (self → went to a cafe with → Maya), and a weighted activation map across the cortex. This is the only step that calls an LLM."}],KT=[{index:"α",way:"By meaning",via:"vector index · LanceDB",body:"Your query is embedded and matched against every stored memory by cosine distance — so a search for “coffee with a friend” surfaces the cafe moment even though none of those words appear in it."},{index:"β",way:"By association",via:"graph · SQLite",body:"Memories that share entities or relationship triples are linked structurally. Pull on Maya and the whole thread she runs through comes with her — the way one association drags the next out of the dark."},{index:"γ",way:"By name",via:"catalog · full-text",body:"Exact lookup across names, aliases and summaries. When you know precisely who or what you're after, the catalog returns it directly, without any inference in the loop."}];function Bp(){return l.jsxs("a",{href:"/",className:A.wordmark,children:[l.jsxs("svg",{viewBox:"0 0 32 32","aria-hidden":"true",className:A.glyph,children:[l.jsx("circle",{cx:"16",cy:"16",r:"11",fill:"none",stroke:"currentColor",strokeWidth:"1.4"}),l.jsx("circle",{cx:"19.5",cy:"12",r:"1.9",fill:"currentColor"}),l.jsx("circle",{cx:"12",cy:"20",r:"1.5",fill:"currentColor"}),l.jsx("path",{d:"M19.5 12 L12 20",stroke:"currentColor",strokeWidth:"0.8",opacity:"0.6"})]}),l.jsx("span",{children:"Atlas"})]})}function GT(){return l.jsxs("svg",{className:ne.wiring,viewBox:"0 0 640 240",role:"img","aria-label":"Two memories linked through a shared entity, illustrating Hebbian wiring",children:[l.jsx("defs",{children:l.jsxs("radialGradient",{id:"hiw-node",cx:"50%",cy:"50%",r:"50%",children:[l.jsx("stop",{offset:"0%",stopColor:"rgba(56,130,246,0.28)"}),l.jsx("stop",{offset:"100%",stopColor:"rgba(56,130,246,0.02)"})]})}),l.jsx("line",{className:ne.wireLink,x1:"150",y1:"78",x2:"320",y2:"120"}),l.jsx("line",{className:ne.wireLink,x1:"150",y1:"190",x2:"320",y2:"120"}),l.jsx("line",{className:ne.wireLinkLive,x1:"320",y1:"120",x2:"500",y2:"78"}),l.jsx("line",{className:ne.wireLinkLive,x1:"320",y1:"120",x2:"500",y2:"190"}),[{x:150,y:78,label:"cafe with Maya"},{x:150,y:190,label:"Maya's birthday"},{x:500,y:78,label:"lunch downtown"},{x:500,y:190,label:"the museum trip"}].map(e=>l.jsxs("g",{children:[l.jsx("circle",{cx:e.x,cy:e.y,r:"26",fill:"url(#hiw-node)"}),l.jsx("circle",{className:ne.wireMem,cx:e.x,cy:e.y,r:"9"}),l.jsx("text",{className:ne.wireLabel,x:e.x,y:e.y+(e.y<120?-22:34),textAnchor:"middle",children:e.label})]},e.label)),l.jsx("circle",{className:ne.wireHubGlow,cx:"320",cy:"120",r:"40"}),l.jsx("circle",{className:ne.wireHub,cx:"320",cy:"120",r:"15"}),l.jsx("text",{className:ne.wireHubLabel,x:"320",y:"170",textAnchor:"middle",children:"Maya"}),l.jsx("text",{className:ne.wireHubTag,x:"320",y:"186",textAnchor:"middle",children:"shared entity"})]})}function YT(){const[e,t]=S.useState(!1);return S.useEffect(()=>{const n=()=>t(window.scrollY>8);return n(),window.addEventListener("scroll",n,{passive:!0}),()=>window.removeEventListener("scroll",n)},[]),l.jsxs("div",{className:A.page,children:[l.jsxs(be.header,{className:`${A.topbar} ${e?A.topbarScrolled:""}`,initial:"hidden",animate:"show",variants:Bd,children:[l.jsx(be.div,{variants:Oe,children:l.jsx(Bp,{})}),l.jsxs("nav",{className:A.topnav,"aria-label":"Primary",children:[l.jsx(be.a,{href:"/",variants:Oe,children:"Home"}),l.jsx(be.a,{href:"/#science",variants:Oe,children:"Science"}),l.jsx(be.a,{href:"/#mcp",variants:Oe,children:"Connect"}),l.jsx(be.a,{href:"https://github.com/sidmanale643/Atlas",target:"_blank",rel:"noopener noreferrer",variants:Oe,children:"GitHub"}),l.jsx(be.a,{className:`nrg-btn ${A.barCta}`,href:"/atlas",variants:Oe,children:"Open the atlas"})]})]}),l.jsxs("main",{children:[l.jsxs("section",{className:`${A.hero} ${ne.hero}`,children:[l.jsx("div",{className:A.heroGrid,"aria-hidden":"true"}),l.jsxs("div",{className:A.heroInner,children:[l.jsx("p",{className:`${A.heroCoord} ${A.reveal}`,children:l.jsx("span",{className:"label",children:"atlas · how it works · build 2026.06"})}),l.jsxs("h1",{className:`${A.heroTitle} ${ne.heroTitle} ${A.reveal}`,children:["A memory is a",l.jsx("br",{}),l.jsx("em",{children:"pattern of connection."})]}),l.jsx("p",{className:`${A.heroSub} ${A.reveal}`,children:"Atlas doesn't file your memories away. It does what a brain does — breaks a moment into people, places, time and feeling, places each fragment across a working model of the cortex, then wires it to everything it resembles. Here is the whole path, from a sentence to a synapse."}),l.jsxs("div",{className:`${A.heroCta} ${A.reveal}`,children:[l.jsx("a",{className:"nrg-btn nrg-btn--solid",href:"/atlas",children:"Open the atlas →"}),l.jsx("a",{className:"nrg-btn",href:"#the-brain",children:"Skip to the brain ↓"})]})]}),l.jsx("aside",{className:A.marginNote,"aria-hidden":"true",children:"fig. 0 — the route a moment travels"})]}),l.jsxs("section",{className:A.section,id:"capture",children:[l.jsxs("div",{className:A.sectionHead,children:[l.jsx("span",{className:"rule-label",children:"before the brain"}),l.jsxs("h2",{children:["From a sentence ",l.jsx("em",{children:"to a signal."})]}),l.jsx("p",{children:"Two steps turn raw language into something the brain model can hold. They are deliberately the boring part — the interesting work happens once the signal reaches the cortex."})]}),l.jsx("ol",{className:ne.steps,children:qT.map(n=>l.jsxs(Hn,{className:ne.step,children:[l.jsx("span",{className:ne.stepIndex,children:n.index}),l.jsxs("div",{className:ne.stepBody,children:[l.jsx("h3",{className:ne.stepLead,children:n.lead}),l.jsx("p",{className:ne.stepTerm,children:n.term}),l.jsx("p",{className:ne.stepText,children:n.body})]})]},n.index))})]}),l.jsx("hr",{className:"nrg-divider"}),l.jsxs("section",{className:`${A.section} ${ne.brainSection}`,id:"the-brain",children:[l.jsxs("div",{className:A.sectionHead,children:[l.jsx("span",{className:"rule-label",children:"the brain"}),l.jsxs("h2",{children:["Every memory ",l.jsx("em",{children:"lands somewhere."})]}),l.jsx("p",{children:"This is the heart of Atlas. Real brains don't keep memory in one place — they distribute it across specialised regions, each handling a different facet of an experience. Atlas models that anatomy directly: the activation map from extraction lights these same regions, weighting where a given memory truly lives."})]}),l.jsxs("blockquote",{className:ne.brainQuote,children:["Recall isn't reading a file. It's a region ",l.jsx("em",{children:"firing"})," — and the brighter it fires, the faster the memory comes back."]}),l.jsx(Hn,{children:l.jsx(gT,{})}),l.jsxs("p",{className:ne.brainHint,children:[l.jsx("span",{className:"label",children:"tip"})," Hover a region — or use ↑ / ↓ — to see what it holds."]}),l.jsxs("div",{className:ne.brainNotes,children:[l.jsxs(Hn,{className:ne.brainNote,children:[l.jsx("h3",{children:"Laterality is real here"}),l.jsx("p",{children:"Each memory's hippocampal activation is split left and right: the left leans verbal, the right leans spatial. The same moment is held two ways at once, so it can be reached by what was said or by where it happened."})]}),l.jsxs(Hn,{className:ne.brainNote,delay:.08,children:[l.jsx("h3",{children:"Type decides anatomy"}),l.jsx("p",{children:"An episodic moment leans on the hippocampus; a skill leans on the basal ganglia; a charged feeling weights the amygdala. The kind of memory it is changes which regions light — exactly as it does in the tissue."})]}),l.jsxs(Hn,{className:ne.brainNote,delay:.16,children:[l.jsx("h3",{children:"A principled map, not a scan"}),l.jsx("p",{children:"Region weights follow established memory-systems research, but they remain an interpretive model — built to make the structure of a memory visible, never to diagnose. The point is a faithful metaphor you can actually query."})]})]})]}),l.jsx("hr",{className:"nrg-divider"}),l.jsxs("section",{className:A.section,id:"wiring",children:[l.jsxs("div",{className:A.sectionHead,children:[l.jsx("span",{className:"rule-label",children:"hebbian wiring"}),l.jsxs("h2",{children:["Fire together, ",l.jsx("em",{children:"wire together."})]}),l.jsx("p",{children:"A memory is never stored alone. When two moments share a person, a place or a relationship, Atlas strengthens the link between them — Hebb's rule, the oldest law in neuroscience. Over time the shared entities become hubs, and recall spreads outward through them."})]}),l.jsx(Hn,{children:l.jsx(GT,{})}),l.jsx("p",{className:A.archNote,children:"Pull on one node and its neighbours light through the shared hub — the same way one thought hands you the next."})]}),l.jsx("hr",{className:"nrg-divider"}),l.jsxs("section",{className:A.section,id:"recall",children:[l.jsxs("div",{className:A.sectionHead,children:[l.jsx("span",{className:"rule-label",children:"recall"}),l.jsxs("h2",{children:["Three ways back ",l.jsx("em",{children:"to a moment."})]}),l.jsx("p",{children:"Because a memory is held as structure, anatomy and meaning at once, there's never just one route to it. Atlas runs all three retrieval paths and fuses their signal."})]}),l.jsx("ol",{className:ne.recall,children:KT.map(n=>l.jsxs(Hn,{className:ne.recallItem,children:[l.jsx("span",{className:ne.recallIndex,children:n.index}),l.jsxs("div",{children:[l.jsxs("p",{className:ne.recallHead,children:[l.jsx("strong",{children:n.way}),l.jsx("code",{className:ne.recallVia,children:n.via})]}),l.jsx("p",{className:ne.recallText,children:n.body})]})]},n.way))}),l.jsxs("p",{className:A.archNote,children:["Signals combine, they don't compete — ",l.jsx("code",{children:"1 − ∏(1 − signal)"}),". A memory found three ways comes back brightest."]})]}),l.jsxs("section",{className:A.ctaBand,children:[l.jsx("div",{className:A.ctaGrid,"aria-hidden":"true"}),l.jsxs("h2",{children:["Now record a moment of your own.",l.jsx("br",{}),l.jsx("em",{children:"Watch it find its region."})]}),l.jsxs("div",{className:A.heroCta,children:[l.jsx("a",{className:"nrg-btn nrg-btn--solid",href:"/atlas",children:"Open the atlas →"}),l.jsx("a",{className:"nrg-btn",href:"/",children:"Back to home"})]})]})]}),l.jsxs("footer",{className:A.footer,children:[l.jsx(Bp,{}),l.jsxs("nav",{className:A.footerLinks,"aria-label":"Footer",children:[l.jsx("a",{href:"/",children:"Home"}),l.jsx("a",{href:"/atlas",children:"Atlas"}),l.jsx("a",{href:"/memories",children:"Memories"}),l.jsx("a",{href:"/graph",children:"Graph"}),l.jsx("a",{href:"https://github.com/sidmanale643/Atlas",target:"_blank",rel:"noopener noreferrer",children:"GitHub"})]}),l.jsx("span",{className:A.footerFine,children:"A map of remembered things"})]})]})}const XT="modulepreload",QT=function(e){return"/"+e},Up={},ZT=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.allSettled(n.map(c=>{if(c=QT(c),c in Up)return;Up[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":XT,u||(f.as="script"),f.crossOrigin="",f.href=c,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((h,g)=>{f.addEventListener("load",h),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},JT=`
|
|
84
|
+
<section class="atlas-grid">
|
|
85
|
+
<aside class="memory-log">
|
|
86
|
+
<div class="memory-log-header">
|
|
87
|
+
<h2 class="atlas-h">Recent traces</h2>
|
|
88
|
+
<div class="atlas-count"><strong id="memoryCount">0</strong><span>shown</span></div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<div class="atlas-controls">
|
|
92
|
+
<div class="memory-search">
|
|
93
|
+
<label class="visually-hidden" for="memorySearch">Search memories</label>
|
|
94
|
+
<input id="memorySearch" type="search" autocomplete="off"
|
|
95
|
+
placeholder="Search memories by meaning" aria-describedby="memorySearchStatus" />
|
|
96
|
+
<button class="text-button" id="resetFiltersButton" type="button" hidden>Reset</button>
|
|
97
|
+
</div>
|
|
98
|
+
<p class="memory-search-status" id="memorySearchStatus" role="status" aria-live="polite" hidden></p>
|
|
99
|
+
<div class="atlas-actions">
|
|
100
|
+
<div class="source-filter" role="group" aria-label="Filter memories by source">
|
|
101
|
+
<button class="filter-button active" data-filter="all" type="button" aria-pressed="true">All</button>
|
|
102
|
+
<button class="filter-button" data-filter="ui" type="button" aria-pressed="false">User</button>
|
|
103
|
+
<button class="filter-button" data-filter="mcp" type="button" aria-pressed="false">Agent</button>
|
|
104
|
+
</div>
|
|
105
|
+
<button class="text-button" id="clearSelectionButton" type="button" hidden>Clear selection</button>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<div class="memory-list" id="memoryList"></div>
|
|
110
|
+
<button class="text-button clear-atlas-button" id="clearButton" type="button">Clear atlas</button>
|
|
111
|
+
</aside>
|
|
112
|
+
|
|
113
|
+
<section class="atlas-panel">
|
|
114
|
+
<div class="atlas-heading">
|
|
115
|
+
<h2 class="atlas-h">Association field</h2>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<div class="brain-stage" id="brainStage">
|
|
119
|
+
<button class="brain-fullscreen-button" id="brainFullscreenButton" type="button"
|
|
120
|
+
aria-label="View brain in fullscreen" aria-pressed="false">
|
|
121
|
+
<span aria-hidden="true">↗↙</span><span class="brain-fullscreen-label">Fullscreen</span>
|
|
122
|
+
</button>
|
|
123
|
+
<div class="scan-interface" aria-hidden="true"><span class="scan-reticle"></span></div>
|
|
124
|
+
<canvas class="brain-model" id="brainModel"
|
|
125
|
+
aria-label="Rotating three-dimensional model of a human brain"></canvas>
|
|
126
|
+
<ul class="atlas-visual-key" aria-label="Atlas visual key">
|
|
127
|
+
<li><i class="key-memory"></i><span>Memory</span></li>
|
|
128
|
+
<li class="key-region-generic"><i class="key-region"></i><span>Region activation</span></li>
|
|
129
|
+
<li class="key-legacy-region key-legacy-prefrontal">
|
|
130
|
+
<i class="key-region"></i><span>Prefrontal cortex</span>
|
|
131
|
+
</li>
|
|
132
|
+
<li class="key-legacy-region key-legacy-association">
|
|
133
|
+
<i class="key-region"></i><span>Association cortex</span>
|
|
134
|
+
</li>
|
|
135
|
+
<li class="key-legend-extra"><i class="key-path"></i><span>Contribution path</span></li>
|
|
136
|
+
<li class="key-legend-extra"><i class="key-entity key-entity-person"></i><span>Person</span></li>
|
|
137
|
+
<li class="key-legend-extra"><i class="key-entity key-entity-place"></i><span>Place</span></li>
|
|
138
|
+
<li class="key-legend-extra"><i class="key-entity key-entity-object"></i><span>Object</span></li>
|
|
139
|
+
<li class="key-legend-extra"><i class="key-entity key-entity-concept"></i><span>Concept</span></li>
|
|
140
|
+
<li class="key-legend-extra"><i class="key-entity key-entity-organization"></i><span>Organization</span></li>
|
|
141
|
+
<li class="key-legend-extra"><i class="key-relationship"></i><span>Relationship</span></li>
|
|
142
|
+
</ul>
|
|
143
|
+
<div class="region-labels" id="regionLabels" aria-label="Active brain regions" hidden></div>
|
|
144
|
+
<div class="memory-hover-panel" id="memoryHoverPanel" role="tooltip" hidden></div>
|
|
145
|
+
<div class="empty-state" id="emptyState"></div>
|
|
146
|
+
</div>
|
|
147
|
+
</section>
|
|
148
|
+
|
|
149
|
+
<aside class="atlas-inspector">
|
|
150
|
+
<div class="memory-detail" id="memoryDetail" aria-live="polite"></div>
|
|
151
|
+
|
|
152
|
+
<section class="composer">
|
|
153
|
+
<h2 class="atlas-h">Record a memory</h2>
|
|
154
|
+
<form id="memoryForm">
|
|
155
|
+
<label for="memoryInput">What happened?</label>
|
|
156
|
+
<textarea id="memoryInput" rows="5"
|
|
157
|
+
placeholder="I went to a cafe with Maya yesterday..." required></textarea>
|
|
158
|
+
<div class="composer-meta">
|
|
159
|
+
<span>Natural language</span>
|
|
160
|
+
<span id="characterCount">0 / 180</span>
|
|
161
|
+
</div>
|
|
162
|
+
<button class="record-button" type="submit">
|
|
163
|
+
<span>Encode memory</span>
|
|
164
|
+
</button>
|
|
165
|
+
</form>
|
|
166
|
+
</section>
|
|
167
|
+
</aside>
|
|
168
|
+
</section>
|
|
169
|
+
|
|
170
|
+
<template id="memoryCardTemplate">
|
|
171
|
+
<article class="memory-card">
|
|
172
|
+
<div class="memory-card-top"><span class="memory-number"></span><time></time></div>
|
|
173
|
+
<p class="memory-text"></p>
|
|
174
|
+
<div class="memory-tags"></div>
|
|
175
|
+
</article>
|
|
176
|
+
</template>
|
|
177
|
+
`;function eE(){const e=S.useRef(!1);return S.useEffect(()=>{if(e.current)return;e.current=!0,document.title="Atlas · Atlas";const t=new URLSearchParams(window.location.search).get("brain"),n=document.getElementById("brainStage");n&&(n.dataset.renderer=t==="legacy"?"atlas":"legacy"),ZT(()=>import("./app-CxbS1w9p.js"),[]);const r=()=>{const s=document.querySelectorAll(".region-role-table tr[data-region]");if(s.length){const u=new Map;s.forEach(d=>{const f=d.dataset.region,h=d.querySelector("td");f&&(h!=null&&h.textContent)&&u.set(f,h.textContent.trim())}),document.querySelectorAll(".region-label[data-region]").forEach(d=>{const f=d.dataset.region,h=f?u.get(f):null;h?d.setAttribute("data-role",h):d.removeAttribute("data-role")})}const o=document.getElementById("memoryDetail"),a=!!o&&o.children.length>0,c=document.getElementById("brainStage");c&&(a?c.setAttribute("data-legend","expanded"):c.removeAttribute("data-legend"))},i=new MutationObserver(r);return i.observe(document.body,{childList:!0,subtree:!0}),r(),()=>i.disconnect()},[]),l.jsx("div",{className:"atlas-root",dangerouslySetInnerHTML:{__html:JT}})}async function nt(e,t){const n=await fetch(e,t),r=await n.text(),i=r?JSON.parse(r):null;if(!n.ok){const s=i&&typeof i.error=="string"?i.error:`Request failed (${n.status})`,o=new Error(s);throw o.payload=i,o.status=n.status,o}return i}function _i(e){const t=new URLSearchParams;for(const[r,i]of Object.entries(e))i===void 0||i===""||t.set(r,String(i));const n=t.toString();return n?`?${n}`:""}const Gt={listMemories:(e={})=>nt(`/api/memories${_i(e)}`),getMemory:e=>nt(`/api/memories/${encodeURIComponent(e)}`),createMemory:e=>nt("/api/memories",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e})}),deleteMemory:e=>nt(`/api/memories/${encodeURIComponent(e)}`,{method:"DELETE"}),deleteAllMemories:()=>nt("/api/memories",{method:"DELETE"}),searchMemories:(e,t=12)=>nt(`/api/memories/search${_i({q:e,limit:t})}`),catalogMemories:e=>nt(`/api/catalog/memories${_i(e)}`),catalogEntities:e=>nt(`/api/catalog/entities${_i(e)}`),entityGraph:e=>nt(`/api/entities/${e}/graph`),resolveSuggestion:(e,t)=>nt(`/api/entity-resolution/suggestions/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:t})}),compare:(e,t,n=!1)=>nt("/api/memory-comparisons",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({leftMemoryId:e,rightMemoryId:t,regenerate:n})}),graph:()=>nt("/api/graph"),getMemoryLinks:(e,t={})=>nt(`/api/memories/${encodeURIComponent(e)}/links${_i(t)}`)},tE="_page_4itqb_6",nE="_head_4itqb_15",rE="_title_4itqb_19",iE="_lede_4itqb_27",sE="_toolbar_4itqb_38",oE="_searchWrap_4itqb_48",aE="_filters_4itqb_56",lE="_filterField_4itqb_62",cE="_summary_4itqb_77",uE="_count_4itqb_85",dE="_textBtn_4itqb_93",fE="_compareRow_4itqb_112",hE="_compareInfo_4itqb_126",pE="_compareCount_4itqb_133",mE="_compareNames_4itqb_141",gE="_compareActions_4itqb_151",yE="_tableFrame_4itqb_158",vE="_table_4itqb_158",xE="_th_4itqb_172",_E="_sortBtn_4itqb_186",wE="_sortInd_4itqb_204",SE="_row_4itqb_218",jE="_rowExpanded_4itqb_225",NE="_primaryCell_4itqb_230",kE="_primaryName_4itqb_233",CE="_preview_4itqb_241",bE="_muted_4itqb_254",TE="_linkedCount_4itqb_258",EE="_tagCell_4itqb_265",PE="_selectCell_4itqb_273",AE="_checkbox_4itqb_277",LE="_expandBtn_4itqb_289",ME="_detailRow_4itqb_311",RE="_detail_4itqb_311",DE="_detailMsg_4itqb_322",IE="_detailError_4itqb_328",$E="_detailGrid_4itqb_332",FE="_section_4itqb_339",OE="_sectionWide_4itqb_343",VE="_sectionTitle_4itqb_349",zE="_list_4itqb_368",BE="_suggestionList_4itqb_383",UE="_suggestionItem_4itqb_387",HE="_suggestionActions_4itqb_412",WE="_meta_4itqb_437",qE="_metaRow_4itqb_442",KE="_memoryDetail_4itqb_460",GE="_detailTopline_4itqb_465",YE="_closeDetail_4itqb_477",XE="_corePanel_4itqb_493",QE="_detailPanel_4itqb_494",ZE="_coreHeading_4itqb_509",JE="_coreFooter_4itqb_510",eP="_regionMeta_4itqb_511",tP="_coreLabel_4itqb_518",nP="_sourceBadge_4itqb_519",rP="_rawMemory_4itqb_534",iP="_summaryBlock_4itqb_544",sP="_memoryDetailGrid_4itqb_566",oP="_detailColumn_4itqb_573",aP="_panelTitle_4itqb_579",lP="_panelBody_4itqb_591",cP="_detailFieldLabel_4itqb_595",uP="_detailChips_4itqb_605",dP="_detailChip_4itqb_605",fP="_detailChipKind_4itqb_623",hP="_semanticList_4itqb_628",pP="_semanticRow_4itqb_633",mP="_semanticNode_4itqb_640",gP="_semanticPredicate_4itqb_653",yP="_semanticArrow_4itqb_658",vP="_profileList_4itqb_662",xP="_regionList_4itqb_685",_P="_regionRow_4itqb_689",wP="_regionTrack_4itqb_703",SP="_emptyRelated_4itqb_715",jP="_rawExtraction_4itqb_740",NP="_relatedCard_4itqb_768",kP="_relatedHeader_4itqb_776",CP="_relatedTitle_4itqb_784",bP="_relatedScore_4itqb_791",TP="_relatedTags_4itqb_800",EP="_relatedTag_4itqb_800",PP="_state_4itqb_818",AP="_stateError_4itqb_825",LP="_pagination_4itqb_831",MP="_pageBtns_4itqb_845",P={page:tE,head:nE,title:rE,lede:iE,toolbar:sE,searchWrap:oE,filters:aE,filterField:lE,summary:cE,count:uE,textBtn:dE,compareRow:fE,compareInfo:hE,compareCount:pE,compareNames:mE,compareActions:gE,tableFrame:yE,table:vE,th:xE,sortBtn:_E,sortInd:wE,row:SE,rowExpanded:jE,primaryCell:NE,primaryName:kE,preview:CE,muted:bE,linkedCount:TE,tagCell:EE,selectCell:PE,checkbox:AE,expandBtn:LE,detailRow:ME,detail:RE,detailMsg:DE,detailError:IE,detailGrid:$E,section:FE,sectionWide:OE,sectionTitle:VE,list:zE,suggestionList:BE,suggestionItem:UE,suggestionActions:HE,meta:WE,metaRow:qE,memoryDetail:KE,detailTopline:GE,closeDetail:YE,corePanel:XE,detailPanel:QE,coreHeading:ZE,coreFooter:JE,regionMeta:eP,coreLabel:tP,sourceBadge:nP,rawMemory:rP,summaryBlock:iP,memoryDetailGrid:sP,detailColumn:oP,panelTitle:aP,panelBody:lP,detailFieldLabel:cP,detailChips:uP,detailChip:dP,detailChipKind:fP,semanticList:hP,semanticRow:pP,semanticNode:mP,semanticPredicate:gP,semanticArrow:yP,profileList:vP,regionList:xP,regionRow:_P,regionTrack:wP,emptyRelated:SP,rawExtraction:jP,relatedCard:NP,relatedHeader:kP,relatedTitle:CP,relatedScore:bP,relatedTags:TP,relatedTag:EP,state:PP,stateError:AP,pagination:LP,pageBtns:MP},Hp=["relationship","preference","fact","decision","learning","event","instruction","observation","error"],Wp=["person","place","object","concept","organization"],qp=[10,25,50,100],RP=250,DP=[{key:"select",label:"Compare"},{key:"title",label:"Memory",sortable:!0},{key:"type",label:"Type",sortable:!0},{key:"entities",label:"Entities"},{key:"linked",label:"Linked",sortable:!0},{key:"source",label:"Source",sortable:!0},{key:"confidence",label:"Confidence",sortable:!0},{key:"created_at",label:"Created",sortable:!0},{key:"expand",label:"Details"}],IP=[{key:"canonical_name",label:"Entity",sortable:!0},{key:"kind",label:"Kind",sortable:!0},{key:"memory_count",label:"Memories",sortable:!0},{key:"relationship_count",label:"Relationships",sortable:!0},{key:"alias_count",label:"Aliases"},{key:"pending_suggestion_count",label:"Review"},{key:"created_at",label:"Created",sortable:!0},{key:"expand",label:"Details"}];function Kp(e,t,n){if(e===null||!/^\d+$/.test(e))return t;const r=Number(e);return!Number.isSafeInteger(r)||n&&!n.includes(r)?t:r}function vr(e){const t=String(e??"");return t?t[0].toUpperCase()+t.slice(1):"Not available"}function Dl(e){return String(e??"").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,t=>t.toUpperCase())}function io(e){if(!e)return"Not available";const t=new Date(e.includes("T")?e:`${e.replace(" ","T")}Z`);return Number.isNaN(t.valueOf())?e:new Intl.DateTimeFormat("en",{year:"numeric",month:"short",day:"2-digit"}).format(t)}function so(e){const t=Number(e);return Number.isFinite(t)?new Intl.NumberFormat("en",{style:"percent",maximumFractionDigits:0}).format(t):"Not available"}const $P={memories:{title:"Memories",description:"Every remembered trace, with its extracted context and associations.",searchPlaceholder:"Search title, text, summary, or entity",filterLabel:"Source",defaultSort:"created_at",defaultOrder:"desc",columns:DP},entities:{title:"Entities",description:"People, places, objects, concepts, and organizations extracted from memory.",searchPlaceholder:"Search entity names",filterLabel:"Kind",defaultSort:"canonical_name",defaultOrder:"asc",columns:IP}};function Gp({view:e}){const t=$P[e],n=cd(),[r,i]=Zy(),s=S.useCallback(()=>{if(e==="entities"){const G=r.get("kind");return G&&Wp.includes(G)?`kind:${G}`:""}const T=r.get("source");return T==="ui"||T==="mcp"?`source:${T}`:""},[e,r]),o=S.useCallback(()=>{if(e==="entities")return"";const T=r.get("type");return T&&Hp.includes(T)?`type:${T}`:""},[e,r]),[a,c]=S.useState(r.get("q")??""),[u,d]=S.useState(s),[f,h]=S.useState(o),[g,w]=S.useState(()=>Kp(r.get("limit"),25,qp)),[y,_]=S.useState(()=>Math.max(0,Kp(r.get("offset"),0))),[p,m]=S.useState(()=>r.get("sort")??t.defaultSort),[v,x]=S.useState(()=>{const T=r.get("order");return T==="desc"?"desc":T==="asc"?"asc":t.defaultOrder}),[j,C]=S.useState([]),[b,k]=S.useState(0),[I,R]=S.useState(!0),[K,te]=S.useState(null),[X,N]=S.useState(null),[U,M]=S.useState({}),[$,E]=S.useState({}),[D,V]=S.useState({}),[L,W]=S.useState(new Map),Q=S.useRef(null),ee=S.useRef(null);S.useEffect(()=>{document.title=`${t.title} · Atlas`},[t.title]),S.useEffect(()=>{const T=new URLSearchParams;if(a&&T.set("q",a),u){const[G,B]=u.split(":");T.set(G,B)}if(f){const[G,B]=f.split(":");T.set(G,B)}g!==25&&T.set("limit",String(g)),y&&T.set("offset",String(y)),p!==t.defaultSort&&T.set("sort",p),v!==t.defaultOrder&&T.set("order",v),i(T,{replace:!0})},[a,u,f,g,y,p,v]),S.useEffect(()=>{const T=new AbortController;let G=!1;const B={limit:g,offset:y,sort:p,order:v};if(a&&(B.q=a),u){const[ve,Rt]=u.split(":");B[ve]=Rt}if(f){const[ve,Rt]=f.split(":");B[ve]=Rt}return R(!0),te(null),N(null),(e==="memories"?Gt.catalogMemories(B):Gt.catalogEntities(B)).then(ve=>{if(!G){if(y>=ve.total&&ve.total>0){const Rt=Math.floor((ve.total-1)/ve.limit)*ve.limit;_(Rt);return}C(ve.items),k(ve.total),R(!1)}}).catch(ve=>{G||T.signal.aborted||ve instanceof DOMException&&ve.name==="AbortError"||(C([]),k(0),te(ve instanceof Error?ve.message:"Catalog request failed"),R(!1))}),()=>{G=!0,T.abort()}},[e,a,u,f,g,y,p,v]);const de=T=>{Q.current&&clearTimeout(Q.current),Q.current=setTimeout(()=>{c(T.trim()),_(0)},RP)},he=T=>{Q.current&&clearTimeout(Q.current),c(T.trim()),_(0)},[ke,ft]=S.useState(a),gr=!!(a||u||f),ix=()=>{ft(""),c(""),d(""),h(""),_(0)},sx=T=>{p===T?x(G=>G==="asc"?"desc":"asc"):(m(T),x(T==="created_at"?"desc":"asc")),_(0)},ox=()=>{_(T=>Math.max(0,T-g)),Jd()},ax=()=>{y+g>=b||(_(T=>T+g),Jd())},Jd=()=>{requestAnimationFrame(()=>{var T;(T=ee.current)==null||T.scrollIntoView({behavior:"smooth",block:"start"})})},lx=T=>{if(X!==null&&String(X)===String(T)){N(null);return}N(T),cx(T)},cx=T=>{const G=String(T);if(e==="memories"){if(U[G]&&!U[G].error)return;M(B=>({...B,[G]:{loading:!0}})),Gt.getMemory(G).then(B=>M(Z=>({...Z,[G]:{data:B}}))).catch(B=>M(Z=>({...Z,[G]:{error:B instanceof Error?B.message:"Detail request failed"}}))),D[G]||(V(B=>({...B,[G]:{loading:!0}})),Gt.getMemoryLinks(G,{limit:5}).then(B=>V(Z=>({...Z,[G]:{links:B.links}}))).catch(()=>V(B=>({...B,[G]:{links:[]}}))))}else{if($[G]&&!$[G].error)return;E(B=>({...B,[G]:{loading:!0}})),Gt.entityGraph(Number(T)).then(B=>E(Z=>({...Z,[G]:{data:B}}))).catch(B=>E(Z=>({...Z,[G]:{error:B instanceof Error?B.message:"Detail request failed"}})))}},ux=T=>{const G=String(T);E(B=>({...B,[G]:{loading:!0}})),Gt.entityGraph(Number(T)).then(B=>E(Z=>({...Z,[G]:{data:B}}))).catch(B=>E(Z=>({...Z,[G]:{error:B instanceof Error?B.message:"Detail request failed"}})))},dx=async(T,G,B)=>{await Gt.resolveSuggestion(T,G),ux(B)},fx=T=>{W(G=>{const B=new Map(G);if(B.has(T.id))B.delete(T.id);else{if(B.size>=2)return G;B.set(T.id,T.title||T.summary||T.raw_text)}return B})},hx=()=>W(new Map),px=()=>{const T=[...L.keys()];T.length===2&&n(`/memories/compare?left=${encodeURIComponent(T[0])}&right=${encodeURIComponent(T[1])}`)},mx=b===1?e==="memories"?"memory":"entity":e,gx=b?y+1:0,yx=Math.min(y+g,b),Ds=S.useMemo(()=>[...L.values()],[L]);return l.jsxs("div",{className:P.page,children:[l.jsxs("header",{className:P.head,children:[l.jsx("h1",{className:P.title,children:t.title}),l.jsx("p",{className:P.lede,children:t.description})]}),l.jsxs("div",{className:P.toolbar,children:[l.jsxs("div",{className:P.searchWrap,children:[l.jsxs("label",{className:"label",htmlFor:"catalogSearch",children:["Search ",e]}),l.jsx("input",{id:"catalogSearch",className:"nrg-field",type:"search",autoComplete:"off",placeholder:t.searchPlaceholder,value:ke,onChange:T=>{ft(T.target.value),de(T.target.value)},onKeyDown:T=>{T.key==="Enter"&&(T.preventDefault(),he(ke))}})]}),l.jsxs("div",{className:P.filters,children:[l.jsxs("div",{className:P.filterField,children:[l.jsx("label",{className:"label",htmlFor:"catalogFilter",children:t.filterLabel}),l.jsxs("select",{id:"catalogFilter",className:"nrg-field",value:u,onChange:T=>{d(T.target.value),_(0)},children:[l.jsx("option",{value:"",children:"All"}),e==="memories"?l.jsxs(l.Fragment,{children:[l.jsx("option",{value:"source:ui",children:"User"}),l.jsx("option",{value:"source:mcp",children:"Agent"})]}):Wp.map(T=>l.jsx("option",{value:`kind:${T}`,children:vr(T)},T))]})]}),e==="memories"&&l.jsxs("div",{className:P.filterField,children:[l.jsx("label",{className:"label",htmlFor:"secondaryFilter",children:"Type"}),l.jsxs("select",{id:"secondaryFilter",className:"nrg-field",value:f,onChange:T=>{h(T.target.value),_(0)},children:[l.jsx("option",{value:"",children:"All"}),Hp.map(T=>l.jsx("option",{value:`type:${T}`,children:vr(T)},T))]})]}),l.jsxs("div",{className:P.filterField,children:[l.jsx("label",{className:"label",htmlFor:"pageSize",children:"Per page"}),l.jsx("select",{id:"pageSize",className:"nrg-field",value:g,onChange:T=>{w(Number(T.target.value)),_(0)},children:qp.map(T=>l.jsx("option",{value:T,children:T},T))})]})]})]}),l.jsxs("div",{className:P.summary,children:[l.jsx("span",{className:P.count,children:I?`Loading ${e}…`:`${b.toLocaleString()} ${mx}`}),gr&&l.jsx("button",{type:"button",className:P.textBtn,onClick:ix,children:"Clear filters"})]}),e==="memories"&&Ds.length>0&&l.jsxs("div",{className:P.compareRow,children:[l.jsxs("div",{className:P.compareInfo,children:[l.jsxs("span",{className:P.compareCount,children:[Ds.length," of 2 selected"]}),l.jsx("span",{className:P.compareNames,children:Ds.join(" · ")})]}),l.jsxs("div",{className:P.compareActions,children:[l.jsx("button",{type:"button",className:"nrg-btn",onClick:hx,children:"Clear"}),l.jsx("button",{type:"button",className:"nrg-btn nrg-btn--solid",disabled:Ds.length!==2,onClick:px,children:"Compare"})]})]}),l.jsxs("div",{className:P.tableFrame,ref:ee,children:[l.jsxs("table",{className:P.table,children:[l.jsxs("caption",{className:"visually-hidden",children:["Stored ",e]}),l.jsx("thead",{children:l.jsx("tr",{children:t.columns.map(T=>l.jsx("th",{scope:"col",className:P.th,children:T.sortable?l.jsxs("button",{type:"button",className:P.sortBtn,"aria-sort":p===T.key?v==="asc"?"ascending":"descending":void 0,onClick:()=>sx(T.key),children:[l.jsx("span",{children:T.label}),l.jsx("span",{"aria-hidden":"true",className:P.sortInd,children:p===T.key?v==="asc"?"↑":"↓":"↕"})]}):T.label},T.key))})}),l.jsx("tbody",{children:!I&&!K&&j.map(T=>e==="memories"?vx(T):xx(T))})]}),I&&l.jsxs("div",{className:P.state,children:["Loading ",e,"…"]}),!I&&K&&l.jsxs("div",{className:`${P.state} ${P.stateError}`,children:["Unable to load ",e,": ",K]}),!I&&!K&&j.length===0&&l.jsx("div",{className:P.state,children:gr?`No ${e} match the current search and filters.`:`No ${e} have been stored yet.`})]}),l.jsxs("div",{className:P.pagination,children:[l.jsxs("span",{children:[gx.toLocaleString(),"–",yx.toLocaleString()," of"," ",b.toLocaleString()]}),l.jsxs("div",{className:P.pageBtns,children:[l.jsx("button",{type:"button",className:"nrg-btn",disabled:I||y===0,onClick:ox,children:"Previous"}),l.jsx("button",{type:"button",className:"nrg-btn",disabled:I||y+g>=b,onClick:ax,children:"Next"})]})]})]});function vx(T){const G=String(X)===String(T.id),B=L.has(T.id),Z=!B&&L.size>=2;return l.jsxs(Yp,{children:[l.jsxs("tr",{className:G?P.rowExpanded:P.row,children:[l.jsx("td",{className:P.selectCell,children:l.jsx("input",{type:"checkbox",className:P.checkbox,checked:B,disabled:Z,"aria-label":`Select ${T.title||T.raw_text} for comparison`,onChange:()=>fx(T)})}),l.jsxs("td",{className:P.primaryCell,children:[l.jsx("strong",{className:P.primaryName,children:T.title||"Untitled memory"}),(T.summary||T.raw_text)&&l.jsx("p",{className:P.preview,children:T.summary||T.raw_text})]}),l.jsx("td",{children:vr(T.type)}),l.jsx("td",{children:_x(T.entities)}),l.jsx("td",{children:T.linked_count>0?l.jsx("span",{className:P.linkedCount,children:T.linked_count}):l.jsx("span",{className:P.muted,children:"0"})}),l.jsx("td",{children:T.source==="mcp"?"Agent":"User"}),l.jsx("td",{children:so(T.confidence)}),l.jsx("td",{children:io(T.created_at)}),l.jsx("td",{children:ef(T.id,T.title)})]}),G&&l.jsx("tr",{className:P.detailRow,children:l.jsx("td",{colSpan:t.columns.length,children:l.jsx("div",{className:P.detail,children:wx(T.id)})})})]},T.id)}function xx(T){const G=String(X)===String(T.id);return l.jsxs(Yp,{children:[l.jsxs("tr",{className:G?P.rowExpanded:P.row,children:[l.jsx("td",{className:P.primaryCell,children:l.jsx("strong",{className:P.primaryName,children:T.canonical_name})}),l.jsx("td",{children:l.jsx("span",{className:"chip",children:T.kind})}),l.jsx("td",{children:T.memory_count}),l.jsx("td",{children:T.relationship_count}),l.jsx("td",{children:T.alias_count??0}),l.jsx("td",{children:T.pending_suggestion_count??0}),l.jsx("td",{children:io(T.created_at)}),l.jsx("td",{children:ef(T.id,T.canonical_name)})]}),G&&l.jsx("tr",{className:P.detailRow,children:l.jsx("td",{colSpan:t.columns.length,children:l.jsx("div",{className:P.detail,children:Sx(T.id)})})})]},T.id)}function _x(T=[]){if(!T.length)return l.jsx("span",{className:P.muted,children:"None"});const G=T.slice(0,4);return l.jsxs("div",{className:P.tagCell,children:[G.map(B=>l.jsx("span",{className:"chip",children:B.canonical_name||B.kind},B.id)),T.length>4&&l.jsx("span",{className:"chip",children:`+${T.length-4}`})]})}function ef(T,G){const B=String(X)===String(T);return l.jsx("button",{type:"button",className:P.expandBtn,"aria-expanded":B,"aria-label":`${B?"Collapse":"Inspect"} ${G??""}`,onClick:()=>lx(T),children:B?"−":"+"})}function wx(T){const G=U[String(T)];if(!G||G.loading)return l.jsx("p",{className:P.detailMsg,children:"Loading details…"});if(G.error)return l.jsxs("p",{className:`${P.detailMsg} ${P.detailError}`,children:["Unable to load details: ",G.error]});const B=G.data;if(!B)return null;const Z=B.extraction,ve=Z&&"extraction_json"in Z&&Z.extraction_json||Z||{},Rt=Z&&"model"in Z?Z:{},Wt=D[String(T)],tf=(Wt==null?void 0:Wt.links)||[],nf=B.entities||[],Ka=B.relationships||[],rf=[...B.regions||[]].sort((oe,Bn)=>Bn.weight-oe.weight),jx=ve.summary||B.summary||"Not available",Nx=[B.type,...B.tags||[]].filter(Boolean);return l.jsxs("div",{className:P.memoryDetail,children:[l.jsxs("div",{className:P.detailTopline,children:[l.jsxs("span",{children:["Memory / ",vr(B.type)]}),l.jsxs("button",{type:"button",className:P.closeDetail,onClick:()=>N(null),children:["Close detail ",l.jsx("span",{"aria-hidden":"true",children:"×"})]})]}),l.jsxs("section",{className:P.corePanel,children:[l.jsxs("div",{className:P.coreHeading,children:[l.jsx("span",{className:P.coreLabel,children:"Core memory"}),l.jsx("span",{className:P.sourceBadge,children:B.source==="mcp"?"Agent":"User"})]}),l.jsx("p",{className:P.rawMemory,children:B.raw_text||"Not available"}),l.jsxs("div",{className:P.summaryBlock,children:[l.jsx("span",{className:P.detailFieldLabel,children:"Summary"}),l.jsx("p",{children:jx})]}),l.jsxs("div",{className:P.coreFooter,children:[l.jsx("div",{className:P.detailChips,children:Nx.map((oe,Bn)=>l.jsx("span",{className:P.detailChip,children:Dl(oe)},`${oe}-${Bn}`))}),l.jsxs("span",{children:["Added ",io(B.created_at||B.ingestion_date)]})]})]}),l.jsxs("div",{className:P.memoryDetailGrid,children:[l.jsxs("div",{className:P.detailColumn,children:[(Ka.length>0||nf.length>0)&&l.jsxs("section",{className:P.detailPanel,children:[l.jsx("h3",{className:P.panelTitle,children:"Semantic structure"}),l.jsx("div",{className:P.panelBody,children:Ka.length>0?l.jsx("div",{className:P.semanticList,children:Ka.map(oe=>{var sf,of;const Bn=oe.source_name||((sf=oe.source)==null?void 0:sf.canonical_name),Ga=oe.target_name||((of=oe.target)==null?void 0:of.canonical_name);return l.jsxs("div",{className:P.semanticRow,children:[l.jsx("span",{className:P.semanticNode,children:Bn||"Unknown"}),l.jsx("span",{className:P.semanticArrow,"aria-hidden":"true",children:"→"}),l.jsx("span",{className:`${P.semanticNode} ${P.semanticPredicate}`,children:Dl(oe.predicate)}),l.jsx("span",{className:P.semanticArrow,"aria-hidden":"true",children:"→"}),l.jsx("span",{className:P.semanticNode,children:Ga||"Unknown"})]},oe.id)})}):l.jsx("div",{className:P.detailChips,children:nf.map(oe=>l.jsxs("span",{className:P.detailChip,children:[oe.canonical_name,l.jsx("span",{className:P.detailChipKind,children:oe.kind})]},oe.id))})})]}),rf.length>0&&l.jsxs("section",{className:P.detailPanel,children:[l.jsx("h3",{className:P.panelTitle,children:"Brain regions"}),l.jsx("div",{className:`${P.panelBody} ${P.regionList}`,children:rf.map(oe=>l.jsxs("div",{className:P.regionRow,children:[l.jsxs("div",{className:P.regionMeta,children:[l.jsx("span",{children:Dl(oe.region)}),l.jsx("span",{children:so(oe.weight)})]}),l.jsx("div",{className:P.regionTrack,children:l.jsx("span",{style:{width:`${Math.max(0,Math.min(1,oe.weight))*100}%`}})})]},oe.region))})]})]}),l.jsxs("div",{className:P.detailColumn,children:[l.jsxs("section",{className:P.detailPanel,children:[l.jsx("h3",{className:P.panelTitle,children:"Memory profile"}),l.jsx("div",{className:P.panelBody,children:l.jsxs("dl",{className:P.profileList,children:[l.jsxs("div",{children:[l.jsx("dt",{children:"Type"}),l.jsx("dd",{children:vr(B.type)})]}),l.jsxs("div",{children:[l.jsx("dt",{children:"Confidence"}),l.jsx("dd",{children:so(B.confidence)})]}),ve.salience!=null&&l.jsxs("div",{children:[l.jsx("dt",{children:"Salience"}),l.jsx("dd",{children:so(ve.salience)})]}),Rt.schema_version!=null&&l.jsxs("div",{children:[l.jsx("dt",{children:"Schema"}),l.jsxs("dd",{children:["v",Rt.schema_version]})]}),Rt.model&&l.jsxs("div",{children:[l.jsx("dt",{children:"Model"}),l.jsx("dd",{children:Rt.model})]}),l.jsxs("div",{children:[l.jsx("dt",{children:"ID"}),l.jsx("dd",{title:B.id,children:B.id})]})]})})]}),l.jsxs("section",{className:P.detailPanel,children:[l.jsx("h3",{className:P.panelTitle,children:"Related memories"}),l.jsxs("div",{className:P.panelBody,children:[(Wt==null?void 0:Wt.loading)&&l.jsx("p",{className:P.detailMsg,children:"Loading related memories…"}),!(Wt!=null&&Wt.loading)&&tf.length===0&&l.jsxs("div",{className:P.emptyRelated,children:[l.jsx("span",{"aria-hidden":"true",children:"○"}),l.jsx("p",{children:"No related memories yet."}),l.jsx("small",{children:"Connections appear when memories share meaning or entities."})]}),tf.map(oe=>l.jsxs("article",{className:P.relatedCard,children:[l.jsxs("div",{className:P.relatedHeader,children:[l.jsx("span",{className:P.relatedTitle,children:oe.memory.summary||oe.memory.title||oe.memory.raw_text}),l.jsxs("span",{className:P.relatedScore,children:[Math.round(oe.score*100),"% linked"]})]}),l.jsx("div",{className:P.relatedTags,children:oe.reasons.slice(0,4).map((Bn,Ga)=>l.jsx("span",{className:P.relatedTag,children:Bn},Ga))})]},oe.memory.id))]})]})]})]}),Z&&l.jsxs("details",{className:P.rawExtraction,children:[l.jsx("summary",{children:"Raw extraction data"}),l.jsx("pre",{children:JSON.stringify(Z,null,2)})]})]})}function Sx(T){const G=$[String(T)];if(!G||G.loading)return l.jsx("p",{className:P.detailMsg,children:"Loading details…"});if(G.error)return l.jsxs("p",{className:`${P.detailMsg} ${P.detailError}`,children:["Unable to load details: ",G.error]});const B=G.data;return B?l.jsxs("div",{className:P.detailGrid,children:[l.jsx(OP,{title:"Entity",entries:[["Name",B.entity.canonical_name],["Kind",vr(B.entity.kind)],["Created",io(B.entity.created_at)]]}),l.jsx(Il,{title:"Known aliases",items:(B.aliases||[]).map(Z=>Z.alias)}),l.jsx(Il,{title:"Linked memories",wide:!0,items:(B.memories||[]).map(Z=>Z.summary||Z.title||Z.raw_text)}),l.jsx(Il,{title:"Explicit relationships",wide:!0,items:(B.relationships||[]).map(Z=>`${Z.source.canonical_name} ${Z.predicate} ${Z.target.canonical_name}`)}),l.jsx(FP,{suggestions:B.suggestions||[],onDecide:(Z,ve)=>dx(Z,ve,T)})]}):null}}function Yp({children:e}){return l.jsx(l.Fragment,{children:e})}function Il({title:e,items:t,wide:n}){const r=t.length?t:["None"];return l.jsxs("section",{className:n?P.sectionWide:P.section,children:[l.jsx("h2",{className:P.sectionTitle,children:e}),l.jsx("ul",{className:P.list,children:r.map((i,s)=>l.jsx("li",{children:i},s))})]})}function FP({suggestions:e,onDecide:t}){const[n,r]=S.useState(null),[i,s]=S.useState(null),o=async(a,c)=>{r(a),s(null);try{await t(a,c)}catch(u){s(u instanceof Error?u.message:"Review failed"),r(null)}};return l.jsxs("section",{className:P.sectionWide,children:[l.jsx("h2",{className:P.sectionTitle,children:"Entity resolution review"}),e.length?l.jsx("div",{className:P.suggestionList,children:e.map(a=>{const c=a.source_name||a.source_canonical_name||`Entity ${a.source_entity_id}`,u=a.target_name||a.target_canonical_name||`Entity ${a.target_entity_id}`,d=n===a.id;return l.jsxs("article",{className:P.suggestionItem,children:[l.jsxs("div",{children:[l.jsxs("strong",{children:[c," may be ",u]}),l.jsx("p",{children:a.reason||`Ambiguous alias: ${a.alias||"unknown"}`})]}),l.jsxs("div",{className:P.suggestionActions,children:[l.jsx("button",{type:"button",disabled:d,onClick:()=>o(a.id,"merge"),children:"Merge"}),l.jsx("button",{type:"button",disabled:d,onClick:()=>o(a.id,"reject"),children:"Keep separate"})]})]},a.id)})}):l.jsx("p",{className:P.detailMsg,children:"No ambiguous aliases need review."}),i?l.jsx("p",{className:`${P.detailMsg} ${P.detailError}`,children:i}):null]})}function OP({title:e,entries:t}){return l.jsxs("section",{className:P.section,children:[l.jsx("h2",{className:P.sectionTitle,children:e}),l.jsx("dl",{className:P.meta,children:t.map(([n,r])=>l.jsxs("div",{className:P.metaRow,children:[l.jsx("dt",{children:n}),l.jsx("dd",{children:r})]},n))})]})}const VP="_page_17btu_7",zP="_head_17btu_14",BP="_title_17btu_21",UP="_lede_17btu_28",HP="_controls_17btu_35",WP="_notice_17btu_43",qP="_noticeError_17btu_50",KP="_content_17btu_54",GP="_memoryPair_17btu_62",YP="_vrule_17btu_69",XP="_memoryColumn_17btu_75",QP="_colLabel_17btu_82",ZP="_memoryTitle_17btu_90",JP="_memoryText_17btu_96",eA="_memorySummary_17btu_103",tA="_metaGrid_17btu_111",nA="_metaPair_17btu_128",rA="_tagGroup_17btu_133",iA="_chips_17btu_138",sA="_chip_17btu_138",oA="_chipKind_17btu_155",aA="_section_17btu_162",lA="_sectionHead_17btu_168",cA="_sectionTitle_17btu_176",uA="_metaRow_17btu_182",dA="_badge_17btu_188",fA="_overview_17btu_201",hA="_subheading_17btu_210",pA="_count_17btu_218",mA="_listLabel_17btu_221",gA="_plainList_17btu_229",yA="_empty_17btu_240",vA="_findings_17btu_247",xA="_findingSection_17btu_252",_A="_findingItem_17btu_259",wA="_findingTop_17btu_265",SA="_findingStatement_17btu_271",jA="_evidencePair_17btu_278",NA="_evidence_17btu_278",kA="_evidenceSide_17btu_293",CA="_diffGrid_17btu_304",bA="_diffSection_17btu_309",TA="_diffList_17btu_314",EA="_diffSides_17btu_319",PA="_activationFindings_17btu_326",AA="_activationFinding_17btu_326",LA="_activationHead_17btu_338",MA="_activationExplain_17btu_344",RA="_activationRole_17btu_350",DA="_notes_17btu_357",IA="_tableFrame_17btu_381",$A="_regionTable_17btu_385",F={page:VP,head:zP,title:BP,lede:UP,controls:HP,notice:WP,noticeError:qP,content:KP,memoryPair:GP,vrule:YP,memoryColumn:XP,colLabel:QP,memoryTitle:ZP,memoryText:JP,memorySummary:eA,metaGrid:tA,metaPair:nA,tagGroup:rA,chips:iA,chip:sA,chipKind:oA,section:aA,sectionHead:lA,sectionTitle:cA,metaRow:uA,badge:dA,overview:fA,subheading:hA,count:pA,listLabel:mA,plainList:gA,empty:yA,findings:vA,findingSection:xA,findingItem:_A,findingTop:wA,findingStatement:SA,evidencePair:jA,evidence:NA,evidenceSide:kA,diffGrid:CA,diffSection:bA,diffList:TA,diffSides:EA,activationFindings:PA,activationFinding:AA,activationHead:LA,activationExplain:MA,activationRole:RA,notes:DA,tableFrame:IA,regionTable:$A};function ru(e){if(!e)return"Not available";const t=new Date(e);return Number.isNaN(t.valueOf())?String(e):new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"}).format(t)}function As(e){return new Intl.NumberFormat("en",{style:"percent",maximumFractionDigits:0}).format(Number(e)||0)}function Pi(e){return e==null?"Not present":As(e)}function oo(e){if(e==null)return"n/a";const t=As(Math.abs(e));return`${e>0?"+":e<0?"−":""}${t}`}function Xp(e){if(!e)return"Not available";const t=String(e);return t.includes("T")?ru(t):t}function Qp(e){return e?e.text||e.normalized||"Not specified":"Not available"}function iu(e){const t=String(e||"");return t?t[0].toUpperCase()+t.slice(1):"Not available"}function su(e){return String(e||"").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,t=>t.toUpperCase())}function $l(e){return`${e.name} · ${e.kind}`}function Fl(e){return`${e.subject} ${e.predicate} ${e.object}`}function FA(e){if(e&&typeof e=="object"){const t=e;if(typeof t.error=="string")return t.error;if(Array.isArray(t.error))return t.error.map(n=>n&&typeof n=="object"&&"message"in n?String(n.message):String(n)).join("; ")}return"Comparison request failed"}function Xn({children:e}){return l.jsx("span",{className:F.badge,children:e})}function $e({label:e,values:t,formatter:n=r=>String(r)}){const r=t??[];return l.jsxs("div",{className:F.diffList,children:[l.jsx("strong",{className:F.listLabel,children:e}),l.jsx("ul",{className:F.plainList,children:r.length?r.map((i,s)=>l.jsx("li",{children:n(i)},s)):l.jsx("li",{children:"None"})})]})}function Zp({label:e,memory:t}){const n=t.entities??[],r=t.regions??[];return l.jsxs("article",{className:F.memoryColumn,children:[l.jsx("span",{className:F.colLabel,children:e}),l.jsx("h2",{className:F.memoryTitle,children:t.title||t.summary||"Untitled memory"}),l.jsx("p",{className:F.memoryText,children:t.raw_text}),l.jsx("p",{className:F.memorySummary,children:t.summary||"No stored summary"}),l.jsxs("dl",{className:F.metaGrid,children:[l.jsx("dt",{children:"Type"}),l.jsx("dd",{children:iu(t.type)}),l.jsx("dt",{children:"Source"}),l.jsx("dd",{children:t.source==="mcp"?"Agent":"User"}),l.jsx("dt",{children:"Confidence"}),l.jsx("dd",{children:Pi(t.confidence)}),l.jsx("dt",{children:"Ingested"}),l.jsx("dd",{children:ru(t.ingestion_date)}),l.jsx("dt",{children:"Created"}),l.jsx("dd",{children:ru(t.created_at)})]}),l.jsxs("div",{className:F.tagGroup,children:[l.jsx("strong",{className:F.listLabel,children:"Key entities"}),l.jsx("div",{className:F.chips,children:n.length?n.map(i=>l.jsxs("span",{className:F.chip,children:[i.canonical_name,l.jsxs("span",{className:F.chipKind,children:[" ",i.kind]})]},i.id)):l.jsx("span",{className:F.empty,children:"None extracted"})})]}),l.jsxs("div",{className:F.tagGroup,children:[l.jsx("strong",{className:F.listLabel,children:"Active regions"}),l.jsx("div",{className:F.chips,children:r.length?r.map(i=>l.jsxs("span",{className:F.chip,children:[su(i.region),l.jsxs("span",{className:F.chipKind,children:[" ",As(i.weight)]})]},i.region)):l.jsx("span",{className:F.empty,children:"None mapped"})})]})]})}function Jp({side:e,value:t}){return l.jsxs("blockquote",{className:F.evidence,children:[l.jsx("strong",{className:F.evidenceSide,children:e}),t||"No evidence on this side"]})}function Ol({title:e,findings:t=[]}){return l.jsxs("section",{className:F.findingSection,children:[l.jsxs("h3",{className:F.subheading,children:[e," ",l.jsx("span",{className:F.count,children:t.length})]}),t.length?t.map((n,r)=>l.jsxs("article",{className:F.findingItem,children:[l.jsxs("div",{className:F.findingTop,children:[l.jsx("p",{className:F.findingStatement,children:n.statement}),l.jsx(Xn,{children:As(n.confidence)})]}),l.jsxs("div",{className:F.evidencePair,children:[l.jsx(Jp,{side:"Left",value:n.leftEvidence}),l.jsx(Jp,{side:"Right",value:n.rightEvidence})]})]},r)):l.jsx("p",{className:F.empty,children:"None identified."})]})}function OA({caveats:e=[]}){const t=e.length?e:["None identified."];return l.jsxs("section",{className:F.findingSection,children:[l.jsxs("h3",{className:F.subheading,children:["Caveats ",l.jsx("span",{className:F.count,children:e.length})]}),l.jsx("ul",{className:F.plainList,children:t.map((n,r)=>l.jsx("li",{children:n},r))})]})}function VA(){var y,_,p,m,v,x,j,C,b,k,I,R,K,te,X;const[e,t]=Zy(),n=e.get("left")||"",r=e.get("right")||"",[i,s]=S.useState({status:"idle",result:null,message:null,isError:!1}),o=!n||!r||n===r,a=S.useCallback(async(N,U,M)=>{s($=>({...$,status:"loading",message:M?"Regenerating AI analysis…":"Loading memories and generating comparison…",isError:!1}));try{const $=await Gt.compare(N,U,M),E=$.analysis===null;s({status:"ready",result:$,message:E?`AI analysis unavailable${$.detail||$.error?`: ${$.detail||$.error}`:""}. This failed result was not saved; deterministic differences and activation explanations are shown below.`:null,isError:E})}catch($){const E=$,D=E.payload?FA(E.payload):E.message||"Comparison request failed";s({status:"error",result:null,message:`Unable to compare memories: ${D}`,isError:!0})}},[]);S.useEffect(()=>{document.title="Compare memories · Atlas"},[]),S.useEffect(()=>{if(o){s({status:"idle",result:null,message:null,isError:!1});return}a(n,r,!1)},[n,r,o,a]);const c=i.status==="loading",u=()=>{c||o||t({left:r,right:n})},d=()=>{c||o||a(n,r,!0)},f=i.result,h=(f==null?void 0:f.structuralDiff)??null,g=(h==null?void 0:h.activationAnalysis)??null,w=(h==null?void 0:h.regions)??[];return l.jsxs("div",{className:F.page,children:[l.jsxs("header",{className:F.head,children:[l.jsx("h1",{className:F.title,children:"Compare memories"}),l.jsx("p",{className:F.lede,children:"AI interpretation is grounded in exact evidence. Structural and neural differences remain available if generation fails."}),l.jsxs("div",{className:F.controls,children:[l.jsx(ia,{to:"/memories",className:"nrg-btn",children:"← Back to memories"}),l.jsx("button",{type:"button",className:"nrg-btn",onClick:u,disabled:c||o,children:"Swap sides"}),l.jsx("button",{type:"button",className:"nrg-btn",onClick:d,disabled:c||o,children:"Regenerate analysis"})]})]}),l.jsx("hr",{className:"nrg-divider"}),o?l.jsxs("p",{className:F.notice,children:["Choose two different memories from the"," ",l.jsx(ia,{to:"/memories",children:"memory catalog"})," before opening this page."]}):null,!o&&i.status==="loading"?l.jsx("p",{className:F.notice,children:i.message}):null,!o&&i.status==="error"?l.jsx("p",{className:`${F.notice} ${F.noticeError}`,children:i.message}):null,!o&&i.status==="ready"&&f?l.jsxs("div",{className:F.content,children:[l.jsxs("section",{className:F.memoryPair,children:[l.jsx(Zp,{label:"Left memory",memory:f.left}),l.jsx("div",{className:F.vrule,"aria-hidden":"true"}),l.jsx(Zp,{label:"Right memory",memory:f.right})]}),l.jsx("hr",{className:"nrg-divider"}),l.jsxs("section",{className:F.section,children:[l.jsxs("div",{className:F.sectionHead,children:[l.jsx("h2",{className:F.sectionTitle,children:f.analysis?iu(f.analysis.relationship):"Analysis unavailable"}),l.jsx("div",{className:F.metaRow,children:f.analysis?l.jsxs(l.Fragment,{children:[l.jsx(Xn,{children:As(f.analysis.confidence)}),l.jsx(Xn,{children:f.generation.cached?"Cached":"Generated"}),l.jsx(Xn,{children:f.generation.saved?"Saved":"Not saved"}),l.jsx(Xn,{children:f.generation.model})]}):l.jsx(Xn,{children:"Not saved"})})]}),i.isError&&i.message?l.jsx("p",{className:`${F.notice} ${F.noticeError}`,children:i.message}):null,l.jsx("p",{className:F.overview,children:f.analysis?f.analysis.overview:"The provider did not return a validated comparison. Deterministic differences and activation explanations are shown below."}),f.analysis?l.jsxs("div",{className:F.findings,children:[l.jsx(Ol,{title:"Shared facts",findings:f.analysis.sharedFacts}),l.jsx(Ol,{title:"Differences",findings:f.analysis.differences}),l.jsx(Ol,{title:"Contradictions",findings:f.analysis.contradictions}),l.jsx(OA,{caveats:f.analysis.caveats})]}):null]}),l.jsx("hr",{className:"nrg-divider"}),l.jsxs("section",{className:F.section,children:[l.jsx("div",{className:F.sectionHead,children:l.jsx("h2",{className:F.sectionTitle,children:"Stored differences"})}),h?l.jsxs("div",{className:F.diffGrid,children:[l.jsxs("section",{className:F.diffSection,children:[l.jsx("h3",{className:F.subheading,children:"Memory types"}),l.jsx("ul",{className:F.plainList,children:(h.types.length?h.types:[{type:"None",left:null,right:null,delta:null}]).map((N,U)=>l.jsxs("li",{children:[iu(N.type),": ",Pi(N.left)," ","→ ",Pi(N.right)]},U))})]}),l.jsxs("section",{className:F.diffSection,children:[l.jsx("h3",{className:F.subheading,children:"Occurrence"}),l.jsxs("div",{className:F.diffSides,children:[l.jsx($e,{label:"Left",values:[Qp((y=h.occurredAt)==null?void 0:y.left)]}),l.jsx($e,{label:"Right",values:[Qp((_=h.occurredAt)==null?void 0:_.right)]})]})]}),l.jsxs("section",{className:F.diffSection,children:[l.jsx("h3",{className:F.subheading,children:"Entities"}),l.jsx($e,{label:"Shared",values:(p=h.entities)==null?void 0:p.shared,formatter:$l}),l.jsx($e,{label:"Left only",values:(m=h.entities)==null?void 0:m.leftOnly,formatter:$l}),l.jsx($e,{label:"Right only",values:(v=h.entities)==null?void 0:v.rightOnly,formatter:$l})]}),l.jsxs("section",{className:F.diffSection,children:[l.jsx("h3",{className:F.subheading,children:"Relationships"}),l.jsx($e,{label:"Shared",values:(x=h.relationships)==null?void 0:x.shared,formatter:Fl}),l.jsx($e,{label:"Left only",values:(j=h.relationships)==null?void 0:j.leftOnly,formatter:Fl}),l.jsx($e,{label:"Right only",values:(C=h.relationships)==null?void 0:C.rightOnly,formatter:Fl})]}),l.jsxs("section",{className:F.diffSection,children:[l.jsx("h3",{className:F.subheading,children:"Actions"}),l.jsx($e,{label:"Shared",values:(b=h.actions)==null?void 0:b.shared}),l.jsx($e,{label:"Left only",values:(k=h.actions)==null?void 0:k.leftOnly}),l.jsx($e,{label:"Right only",values:(I=h.actions)==null?void 0:I.rightOnly})]}),l.jsxs("section",{className:F.diffSection,children:[l.jsx("h3",{className:F.subheading,children:"Topics"}),l.jsx($e,{label:"Shared",values:(R=h.topics)==null?void 0:R.shared}),l.jsx($e,{label:"Left only",values:(K=h.topics)==null?void 0:K.leftOnly}),l.jsx($e,{label:"Right only",values:(te=h.topics)==null?void 0:te.rightOnly})]}),l.jsxs("section",{className:F.diffSection,children:[l.jsx("h3",{className:F.subheading,children:"Provenance"}),l.jsx("dl",{className:F.metaGrid,children:Object.entries(h.provenance??{}).map(([N,U])=>l.jsxs("div",{className:F.metaPair,children:[l.jsx("dt",{children:su(N)}),l.jsxs("dd",{children:[Xp(U.left)," → ",Xp(U.right)]})]},N))})]})]}):l.jsx("p",{className:F.empty,children:"No stored differences available."})]}),l.jsx("hr",{className:"nrg-divider"}),l.jsxs("section",{className:F.section,children:[l.jsx("div",{className:F.sectionHead,children:l.jsx("h2",{className:F.sectionTitle,children:"Why activation differs"})}),l.jsx("p",{className:F.overview,children:(g==null?void 0:g.summary)||"No activation explanation is available."}),l.jsx("div",{className:F.activationFindings,children:((g==null?void 0:g.findings)??[]).slice(0,6).map(N=>l.jsxs("article",{className:F.activationFinding,children:[l.jsxs("div",{className:F.activationHead,children:[l.jsx("h3",{className:F.subheading,children:N.label}),l.jsx(Xn,{children:oo(N.delta)})]}),l.jsx("p",{className:F.activationExplain,children:N.explanation}),N.role?l.jsx("p",{className:F.activationRole,children:N.role}):null,l.jsxs("div",{className:F.diffSides,children:[l.jsx($e,{label:"Left mapping inputs",values:N.leftReasons}),l.jsx($e,{label:"Right mapping inputs",values:N.rightReasons})]})]},N.region))}),(X=g==null?void 0:g.notes)!=null&&X.length?l.jsx("ul",{className:F.notes,children:g.notes.map((N,U)=>l.jsx("li",{children:N},U))}):null,l.jsx("div",{className:F.tableFrame,children:l.jsxs("table",{className:F.regionTable,children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Region"}),l.jsx("th",{children:"Left"}),l.jsx("th",{children:"Right"}),l.jsx("th",{children:"Delta"}),l.jsx("th",{children:"Hemisphere delta L / R"})]})}),l.jsx("tbody",{children:w.length?w.map(N=>{var U,M;return l.jsxs("tr",{children:[l.jsx("td",{children:su(N.region)}),l.jsx("td",{children:Pi((U=N.left)==null?void 0:U.weight)}),l.jsx("td",{children:Pi((M=N.right)==null?void 0:M.weight)}),l.jsx("td",{children:oo(N.delta.weight)}),l.jsxs("td",{children:[oo(N.delta.leftHemisphere)," /"," ",oo(N.delta.rightHemisphere)]})]},N.region)}):l.jsx("tr",{children:l.jsx("td",{colSpan:5,children:"No region activation data"})})})]})})]})]}):null]})}var zA={value:()=>{}};function Ls(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new To(n)}function To(e){this._=e}function BA(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}To.prototype=Ls.prototype={constructor:To,on:function(e,t){var n=this._,r=BA(e+"",n),i,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((i=(e=r[s]).type)&&(i=UA(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<o;)if(i=(e=r[s]).type)n[i]=em(n[i],e.name,t);else if(t==null)for(i in n)n[i]=em(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new To(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function UA(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function em(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=zA,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var ou="http://www.w3.org/1999/xhtml";const tm={svg:"http://www.w3.org/2000/svg",xhtml:ou,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ha(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),tm.hasOwnProperty(t)?{space:tm[t],local:e}:e}function HA(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ou&&t.documentElement.namespaceURI===ou?t.createElement(e):t.createElementNS(n,e)}}function WA(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function P0(e){var t=Ha(e);return(t.local?WA:HA)(t)}function qA(){}function Ud(e){return e==null?qA:function(){return this.querySelector(e)}}function KA(e){typeof e!="function"&&(e=Ud(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,a=r[i]=new Array(o),c,u,d=0;d<o;++d)(c=s[d])&&(u=e.call(c,c.__data__,d,s))&&("__data__"in c&&(u.__data__=c.__data__),a[d]=u);return new ct(r,this._parents)}function GA(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function YA(){return[]}function A0(e){return e==null?YA:function(){return this.querySelectorAll(e)}}function XA(e){return function(){return GA(e.apply(this,arguments))}}function QA(e){typeof e=="function"?e=XA(e):e=A0(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var o=t[s],a=o.length,c,u=0;u<a;++u)(c=o[u])&&(r.push(e.call(c,c.__data__,u,o)),i.push(c));return new ct(r,i)}function L0(e){return function(){return this.matches(e)}}function M0(e){return function(t){return t.matches(e)}}var ZA=Array.prototype.find;function JA(e){return function(){return ZA.call(this.children,e)}}function e3(){return this.firstElementChild}function t3(e){return this.select(e==null?e3:JA(typeof e=="function"?e:M0(e)))}var n3=Array.prototype.filter;function r3(){return Array.from(this.children)}function i3(e){return function(){return n3.call(this.children,e)}}function s3(e){return this.selectAll(e==null?r3:i3(typeof e=="function"?e:M0(e)))}function o3(e){typeof e!="function"&&(e=L0(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,a=r[i]=[],c,u=0;u<o;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&a.push(c);return new ct(r,this._parents)}function R0(e){return new Array(e.length)}function a3(){return new ct(this._enter||this._groups.map(R0),this._parents)}function ha(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ha.prototype={constructor:ha,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function l3(e){return function(){return e}}function c3(e,t,n,r,i,s){for(var o=0,a,c=t.length,u=s.length;o<u;++o)(a=t[o])?(a.__data__=s[o],r[o]=a):n[o]=new ha(e,s[o]);for(;o<c;++o)(a=t[o])&&(i[o]=a)}function u3(e,t,n,r,i,s,o){var a,c,u=new Map,d=t.length,f=s.length,h=new Array(d),g;for(a=0;a<d;++a)(c=t[a])&&(h[a]=g=o.call(c,c.__data__,a,t)+"",u.has(g)?i[a]=c:u.set(g,c));for(a=0;a<f;++a)g=o.call(e,s[a],a,s)+"",(c=u.get(g))?(r[a]=c,c.__data__=s[a],u.delete(g)):n[a]=new ha(e,s[a]);for(a=0;a<d;++a)(c=t[a])&&u.get(h[a])===c&&(i[a]=c)}function d3(e){return e.__data__}function f3(e,t){if(!arguments.length)return Array.from(this,d3);var n=t?u3:c3,r=this._parents,i=this._groups;typeof e!="function"&&(e=l3(e));for(var s=i.length,o=new Array(s),a=new Array(s),c=new Array(s),u=0;u<s;++u){var d=r[u],f=i[u],h=f.length,g=h3(e.call(d,d&&d.__data__,u,r)),w=g.length,y=a[u]=new Array(w),_=o[u]=new Array(w),p=c[u]=new Array(h);n(d,f,y,_,p,g,t);for(var m=0,v=0,x,j;m<w;++m)if(x=y[m]){for(m>=v&&(v=m+1);!(j=_[v])&&++v<w;);x._next=j||null}}return o=new ct(o,r),o._enter=a,o._exit=c,o}function h3(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function p3(){return new ct(this._exit||this._groups.map(R0),this._parents)}function m3(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function g3(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,o=Math.min(i,s),a=new Array(i),c=0;c<o;++c)for(var u=n[c],d=r[c],f=u.length,h=a[c]=new Array(f),g,w=0;w<f;++w)(g=u[w]||d[w])&&(h[w]=g);for(;c<i;++c)a[c]=n[c];return new ct(a,this._parents)}function y3(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],o;--i>=0;)(o=r[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function v3(e){e||(e=x3);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var o=n[s],a=o.length,c=i[s]=new Array(a),u,d=0;d<a;++d)(u=o[d])&&(c[d]=u);c.sort(t)}return new ct(i,this._parents).order()}function x3(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function _3(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function w3(){return Array.from(this)}function S3(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var o=r[i];if(o)return o}return null}function j3(){let e=0;for(const t of this)++e;return e}function N3(){return!this.node()}function k3(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,o=i.length,a;s<o;++s)(a=i[s])&&e.call(a,a.__data__,s,i);return this}function C3(e){return function(){this.removeAttribute(e)}}function b3(e){return function(){this.removeAttributeNS(e.space,e.local)}}function T3(e,t){return function(){this.setAttribute(e,t)}}function E3(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function P3(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function A3(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function L3(e,t){var n=Ha(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?b3:C3:typeof t=="function"?n.local?A3:P3:n.local?E3:T3)(n,t))}function D0(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function M3(e){return function(){this.style.removeProperty(e)}}function R3(e,t,n){return function(){this.style.setProperty(e,t,n)}}function D3(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function I3(e,t,n){return arguments.length>1?this.each((t==null?M3:typeof t=="function"?D3:R3)(e,t,n??"")):ri(this.node(),e)}function ri(e,t){return e.style.getPropertyValue(t)||D0(e).getComputedStyle(e,null).getPropertyValue(t)}function $3(e){return function(){delete this[e]}}function F3(e,t){return function(){this[e]=t}}function O3(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function V3(e,t){return arguments.length>1?this.each((t==null?$3:typeof t=="function"?O3:F3)(e,t)):this.node()[e]}function I0(e){return e.trim().split(/^|\s+/)}function Hd(e){return e.classList||new $0(e)}function $0(e){this._node=e,this._names=I0(e.getAttribute("class")||"")}$0.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function F0(e,t){for(var n=Hd(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function O0(e,t){for(var n=Hd(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function z3(e){return function(){F0(this,e)}}function B3(e){return function(){O0(this,e)}}function U3(e,t){return function(){(t.apply(this,arguments)?F0:O0)(this,e)}}function H3(e,t){var n=I0(e+"");if(arguments.length<2){for(var r=Hd(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?U3:t?z3:B3)(n,t))}function W3(){this.textContent=""}function q3(e){return function(){this.textContent=e}}function K3(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function G3(e){return arguments.length?this.each(e==null?W3:(typeof e=="function"?K3:q3)(e)):this.node().textContent}function Y3(){this.innerHTML=""}function X3(e){return function(){this.innerHTML=e}}function Q3(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Z3(e){return arguments.length?this.each(e==null?Y3:(typeof e=="function"?Q3:X3)(e)):this.node().innerHTML}function J3(){this.nextSibling&&this.parentNode.appendChild(this)}function e4(){return this.each(J3)}function t4(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function n4(){return this.each(t4)}function r4(e){var t=typeof e=="function"?e:P0(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function i4(){return null}function s4(e,t){var n=typeof e=="function"?e:P0(e),r=t==null?i4:typeof t=="function"?t:Ud(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function o4(){var e=this.parentNode;e&&e.removeChild(this)}function a4(){return this.each(o4)}function l4(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function c4(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function u4(e){return this.select(e?c4:l4)}function d4(e){return arguments.length?this.property("__data__",e):this.node().__data__}function f4(e){return function(t){e.call(this,t,this.__data__)}}function h4(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function p4(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function m4(e,t,n){return function(){var r=this.__on,i,s=f4(t);if(r){for(var o=0,a=r.length;o<a;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}function g4(e,t,n){var r=h4(e+""),i,s=r.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,u=a.length,d;c<u;++c)for(i=0,d=a[c];i<s;++i)if((o=r[i]).type===d.type&&o.name===d.name)return d.value}return}for(a=t?m4:p4,i=0;i<s;++i)this.each(a(r[i],t,n));return this}function V0(e,t,n){var r=D0(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function y4(e,t){return function(){return V0(this,e,t)}}function v4(e,t){return function(){return V0(this,e,t.apply(this,arguments))}}function x4(e,t){return this.each((typeof t=="function"?v4:y4)(e,t))}function*_4(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,o;i<s;++i)(o=r[i])&&(yield o)}var z0=[null];function ct(e,t){this._groups=e,this._parents=t}function Ms(){return new ct([[document.documentElement]],z0)}function w4(){return this}ct.prototype=Ms.prototype={constructor:ct,select:KA,selectAll:QA,selectChild:t3,selectChildren:s3,filter:o3,data:f3,enter:a3,exit:p3,join:m3,merge:g3,selection:w4,order:y3,sort:v3,call:_3,nodes:w3,node:S3,size:j3,empty:N3,each:k3,attr:L3,style:I3,property:V3,classed:H3,text:G3,html:Z3,raise:e4,lower:n4,append:r4,insert:s4,remove:a4,clone:u4,datum:d4,on:g4,dispatch:x4,[Symbol.iterator]:_4};function Tt(e){return typeof e=="string"?new ct([[document.querySelector(e)]],[document.documentElement]):new ct([[e]],z0)}function S4(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Yt(e,t){if(e=S4(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const j4={passive:!1},gs={capture:!0,passive:!1};function Vl(e){e.stopImmediatePropagation()}function Hr(e){e.preventDefault(),e.stopImmediatePropagation()}function B0(e){var t=e.document.documentElement,n=Tt(e).on("dragstart.drag",Hr,gs);"onselectstart"in t?n.on("selectstart.drag",Hr,gs):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function U0(e,t){var n=e.document.documentElement,r=Tt(e).on("dragstart.drag",null);t&&(r.on("click.drag",Hr,gs),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const ao=e=>()=>e;function au(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:s,x:o,y:a,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}au.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function N4(e){return!e.ctrlKey&&!e.button}function k4(){return this.parentNode}function C4(e,t){return t??{x:e.x,y:e.y}}function b4(){return navigator.maxTouchPoints||"ontouchstart"in this}function T4(){var e=N4,t=k4,n=C4,r=b4,i={},s=Ls("start","drag","end"),o=0,a,c,u,d,f=0;function h(x){x.on("mousedown.drag",g).filter(r).on("touchstart.drag",_).on("touchmove.drag",p,j4).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(x,j){if(!(d||!e.call(this,x,j))){var C=v(this,t.call(this,x,j),x,j,"mouse");C&&(Tt(x.view).on("mousemove.drag",w,gs).on("mouseup.drag",y,gs),B0(x.view),Vl(x),u=!1,a=x.clientX,c=x.clientY,C("start",x))}}function w(x){if(Hr(x),!u){var j=x.clientX-a,C=x.clientY-c;u=j*j+C*C>f}i.mouse("drag",x)}function y(x){Tt(x.view).on("mousemove.drag mouseup.drag",null),U0(x.view,u),Hr(x),i.mouse("end",x)}function _(x,j){if(e.call(this,x,j)){var C=x.changedTouches,b=t.call(this,x,j),k=C.length,I,R;for(I=0;I<k;++I)(R=v(this,b,x,j,C[I].identifier,C[I]))&&(Vl(x),R("start",x,C[I]))}}function p(x){var j=x.changedTouches,C=j.length,b,k;for(b=0;b<C;++b)(k=i[j[b].identifier])&&(Hr(x),k("drag",x,j[b]))}function m(x){var j=x.changedTouches,C=j.length,b,k;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),b=0;b<C;++b)(k=i[j[b].identifier])&&(Vl(x),k("end",x,j[b]))}function v(x,j,C,b,k,I){var R=s.copy(),K=Yt(I||C,j),te,X,N;if((N=n.call(x,new au("beforestart",{sourceEvent:C,target:h,identifier:k,active:o,x:K[0],y:K[1],dx:0,dy:0,dispatch:R}),b))!=null)return te=N.x-K[0]||0,X=N.y-K[1]||0,function U(M,$,E){var D=K,V;switch(M){case"start":i[k]=U,V=o++;break;case"end":delete i[k],--o;case"drag":K=Yt(E||$,j),V=o;break}R.call(M,x,new au(M,{sourceEvent:$,subject:N,target:h,identifier:k,active:V,x:K[0]+te,y:K[1]+X,dx:K[0]-D[0],dy:K[1]-D[1],dispatch:R}),b)}}return h.filter=function(x){return arguments.length?(e=typeof x=="function"?x:ao(!!x),h):e},h.container=function(x){return arguments.length?(t=typeof x=="function"?x:ao(x),h):t},h.subject=function(x){return arguments.length?(n=typeof x=="function"?x:ao(x),h):n},h.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:ao(!!x),h):r},h.on=function(){var x=s.on.apply(s,arguments);return x===s?h:x},h.clickDistance=function(x){return arguments.length?(f=(x=+x)*x,h):Math.sqrt(f)},h}function Wd(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function H0(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Rs(){}var ys=.7,pa=1/ys,Wr="\\s*([+-]?\\d+)\\s*",vs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",E4=/^#([0-9a-f]{3,8})$/,P4=new RegExp(`^rgb\\(${Wr},${Wr},${Wr}\\)$`),A4=new RegExp(`^rgb\\(${Ut},${Ut},${Ut}\\)$`),L4=new RegExp(`^rgba\\(${Wr},${Wr},${Wr},${vs}\\)$`),M4=new RegExp(`^rgba\\(${Ut},${Ut},${Ut},${vs}\\)$`),R4=new RegExp(`^hsl\\(${vs},${Ut},${Ut}\\)$`),D4=new RegExp(`^hsla\\(${vs},${Ut},${Ut},${vs}\\)$`),nm={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Wd(Rs,xs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rm,formatHex:rm,formatHex8:I4,formatHsl:$4,formatRgb:im,toString:im});function rm(){return this.rgb().formatHex()}function I4(){return this.rgb().formatHex8()}function $4(){return W0(this).formatHsl()}function im(){return this.rgb().formatRgb()}function xs(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=E4.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?sm(t):n===3?new Ze(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?lo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?lo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=P4.exec(e))?new Ze(t[1],t[2],t[3],1):(t=A4.exec(e))?new Ze(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=L4.exec(e))?lo(t[1],t[2],t[3],t[4]):(t=M4.exec(e))?lo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=R4.exec(e))?lm(t[1],t[2]/100,t[3]/100,1):(t=D4.exec(e))?lm(t[1],t[2]/100,t[3]/100,t[4]):nm.hasOwnProperty(e)?sm(nm[e]):e==="transparent"?new Ze(NaN,NaN,NaN,0):null}function sm(e){return new Ze(e>>16&255,e>>8&255,e&255,1)}function lo(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ze(e,t,n,r)}function F4(e){return e instanceof Rs||(e=xs(e)),e?(e=e.rgb(),new Ze(e.r,e.g,e.b,e.opacity)):new Ze}function lu(e,t,n,r){return arguments.length===1?F4(e):new Ze(e,t,n,r??1)}function Ze(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Wd(Ze,lu,H0(Rs,{brighter(e){return e=e==null?pa:Math.pow(pa,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ys:Math.pow(ys,e),new Ze(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ze(sr(this.r),sr(this.g),sr(this.b),ma(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:om,formatHex:om,formatHex8:O4,formatRgb:am,toString:am}));function om(){return`#${tr(this.r)}${tr(this.g)}${tr(this.b)}`}function O4(){return`#${tr(this.r)}${tr(this.g)}${tr(this.b)}${tr((isNaN(this.opacity)?1:this.opacity)*255)}`}function am(){const e=ma(this.opacity);return`${e===1?"rgb(":"rgba("}${sr(this.r)}, ${sr(this.g)}, ${sr(this.b)}${e===1?")":`, ${e})`}`}function ma(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function sr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tr(e){return e=sr(e),(e<16?"0":"")+e.toString(16)}function lm(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Et(e,t,n,r)}function W0(e){if(e instanceof Et)return new Et(e.h,e.s,e.l,e.opacity);if(e instanceof Rs||(e=xs(e)),!e)return new Et;if(e instanceof Et)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=NaN,a=s-i,c=(s+i)/2;return a?(t===s?o=(n-r)/a+(n<r)*6:n===s?o=(r-t)/a+2:o=(t-n)/a+4,a/=c<.5?s+i:2-s-i,o*=60):a=c>0&&c<1?0:o,new Et(o,a,c,e.opacity)}function V4(e,t,n,r){return arguments.length===1?W0(e):new Et(e,t,n,r??1)}function Et(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Wd(Et,V4,H0(Rs,{brighter(e){return e=e==null?pa:Math.pow(pa,e),new Et(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ys:Math.pow(ys,e),new Et(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ze(zl(e>=240?e-240:e+120,i,r),zl(e,i,r),zl(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Et(cm(this.h),co(this.s),co(this.l),ma(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ma(this.opacity);return`${e===1?"hsl(":"hsla("}${cm(this.h)}, ${co(this.s)*100}%, ${co(this.l)*100}%${e===1?")":`, ${e})`}`}}));function cm(e){return e=(e||0)%360,e<0?e+360:e}function co(e){return Math.max(0,Math.min(1,e||0))}function zl(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const q0=e=>()=>e;function z4(e,t){return function(n){return e+n*t}}function B4(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function U4(e){return(e=+e)==1?K0:function(t,n){return n-t?B4(t,n,e):q0(isNaN(t)?n:t)}}function K0(e,t){var n=t-e;return n?z4(e,n):q0(isNaN(e)?t:e)}const um=function e(t){var n=U4(t);function r(i,s){var o=n((i=lu(i)).r,(s=lu(s)).r),a=n(i.g,s.g),c=n(i.b,s.b),u=K0(i.opacity,s.opacity);return function(d){return i.r=o(d),i.g=a(d),i.b=c(d),i.opacity=u(d),i+""}}return r.gamma=e,r}(1);function gn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var cu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bl=new RegExp(cu.source,"g");function H4(e){return function(){return e}}function W4(e){return function(t){return e(t)+""}}function q4(e,t){var n=cu.lastIndex=Bl.lastIndex=0,r,i,s,o=-1,a=[],c=[];for(e=e+"",t=t+"";(r=cu.exec(e))&&(i=Bl.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,c.push({i:o,x:gn(r,i)})),n=Bl.lastIndex;return n<t.length&&(s=t.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?c[0]?W4(c[0].x):H4(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)a[(f=c[d]).i]=f.x(u);return a.join("")})}var dm=180/Math.PI,uu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function G0(e,t,n,r,i,s){var o,a,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,c/=a),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*dm,skewX:Math.atan(c)*dm,scaleX:o,scaleY:a}}var uo;function K4(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?uu:G0(t.a,t.b,t.c,t.d,t.e,t.f)}function G4(e){return e==null||(uo||(uo=document.createElementNS("http://www.w3.org/2000/svg","g")),uo.setAttribute("transform",e),!(e=uo.transform.baseVal.consolidate()))?uu:(e=e.matrix,G0(e.a,e.b,e.c,e.d,e.e,e.f))}function Y0(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function s(u,d,f,h,g,w){if(u!==f||d!==h){var y=g.push("translate(",null,t,null,n);w.push({i:y-4,x:gn(u,f)},{i:y-2,x:gn(d,h)})}else(f||h)&&g.push("translate("+f+t+h+n)}function o(u,d,f,h){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:gn(u,d)})):d&&f.push(i(f)+"rotate("+d+r)}function a(u,d,f,h){u!==d?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:gn(u,d)}):d&&f.push(i(f)+"skewX("+d+r)}function c(u,d,f,h,g,w){if(u!==f||d!==h){var y=g.push(i(g)+"scale(",null,",",null,")");w.push({i:y-4,x:gn(u,f)},{i:y-2,x:gn(d,h)})}else(f!==1||h!==1)&&g.push(i(g)+"scale("+f+","+h+")")}return function(u,d){var f=[],h=[];return u=e(u),d=e(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,h),o(u.rotate,d.rotate,f,h),a(u.skewX,d.skewX,f,h),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,h),u=d=null,function(g){for(var w=-1,y=h.length,_;++w<y;)f[(_=h[w]).i]=_.x(g);return f.join("")}}}var Y4=Y0(K4,"px, ","px)","deg)"),X4=Y0(G4,", ",")",")"),Q4=1e-12;function fm(e){return((e=Math.exp(e))+1/e)/2}function Z4(e){return((e=Math.exp(e))-1/e)/2}function J4(e){return((e=Math.exp(2*e))-1)/(e+1)}const eL=function e(t,n,r){function i(s,o){var a=s[0],c=s[1],u=s[2],d=o[0],f=o[1],h=o[2],g=d-a,w=f-c,y=g*g+w*w,_,p;if(y<Q4)p=Math.log(h/u)/t,_=function(b){return[a+b*g,c+b*w,u*Math.exp(t*b*p)]};else{var m=Math.sqrt(y),v=(h*h-u*u+r*y)/(2*u*n*m),x=(h*h-u*u-r*y)/(2*h*n*m),j=Math.log(Math.sqrt(v*v+1)-v),C=Math.log(Math.sqrt(x*x+1)-x);p=(C-j)/t,_=function(b){var k=b*p,I=fm(j),R=u/(n*m)*(I*J4(t*k+j)-Z4(j));return[a+R*g,c+R*w,u*I/fm(t*k+j)]}}return _.duration=p*1e3*t/Math.SQRT2,_}return i.rho=function(s){var o=Math.max(.001,+s),a=o*o,c=a*a;return e(o,a,c)},i}(Math.SQRT2,2,4);var ii=0,Ai=0,wi=0,X0=1e3,ga,Li,ya=0,dr=0,Wa=0,_s=typeof performance=="object"&&performance.now?performance:Date,Q0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function qd(){return dr||(Q0(tL),dr=_s.now()+Wa)}function tL(){dr=0}function va(){this._call=this._time=this._next=null}va.prototype=Kd.prototype={constructor:va,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?qd():+n)+(t==null?0:+t),!this._next&&Li!==this&&(Li?Li._next=this:ga=this,Li=this),this._call=e,this._time=n,du()},stop:function(){this._call&&(this._call=null,this._time=1/0,du())}};function Kd(e,t,n){var r=new va;return r.restart(e,t,n),r}function nL(){qd(),++ii;for(var e=ga,t;e;)(t=dr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ii}function hm(){dr=(ya=_s.now())+Wa,ii=Ai=0;try{nL()}finally{ii=0,iL(),dr=0}}function rL(){var e=_s.now(),t=e-ya;t>X0&&(Wa-=t,ya=e)}function iL(){for(var e,t=ga,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ga=n);Li=e,du(r)}function du(e){if(!ii){Ai&&(Ai=clearTimeout(Ai));var t=e-dr;t>24?(e<1/0&&(Ai=setTimeout(hm,e-_s.now()-Wa)),wi&&(wi=clearInterval(wi))):(wi||(ya=_s.now(),wi=setInterval(rL,X0)),ii=1,Q0(hm))}}function pm(e,t,n){var r=new va;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var sL=Ls("start","end","cancel","interrupt"),oL=[],Z0=0,mm=1,fu=2,Eo=3,gm=4,hu=5,Po=6;function qa(e,t,n,r,i,s){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;aL(e,n,{name:t,index:r,group:i,on:sL,tween:oL,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Z0})}function Gd(e,t){var n=Mt(e,t);if(n.state>Z0)throw new Error("too late; already scheduled");return n}function Ht(e,t){var n=Mt(e,t);if(n.state>Eo)throw new Error("too late; already running");return n}function Mt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function aL(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Kd(s,0,n.time);function s(u){n.state=mm,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var d,f,h,g;if(n.state!==mm)return c();for(d in r)if(g=r[d],g.name===n.name){if(g.state===Eo)return pm(o);g.state===gm?(g.state=Po,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[d]):+d<t&&(g.state=Po,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[d])}if(pm(function(){n.state===Eo&&(n.state=gm,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=fu,n.on.call("start",e,e.__data__,n.index,n.group),n.state===fu){for(n.state=Eo,i=new Array(h=n.tween.length),d=0,f=-1;d<h;++d)(g=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=g);i.length=f+1}}function a(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=hu,1),f=-1,h=i.length;++f<h;)i[f].call(e,d);n.state===hu&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=Po,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Ao(e,t){var n=e.__transition,r,i,s=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){s=!1;continue}i=r.state>fu&&r.state<hu,r.state=Po,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}s&&delete e.__transition}}function lL(e){return this.each(function(){Ao(this,e)})}function cL(e,t){var n,r;return function(){var i=Ht(this,e),s=i.tween;if(s!==n){r=n=s;for(var o=0,a=r.length;o<a;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function uL(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Ht(this,e),o=s.tween;if(o!==r){i=(r=o).slice();for(var a={name:t,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===t){i[c]=a;break}c===u&&i.push(a)}s.tween=i}}function dL(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Mt(this.node(),n).tween,i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?cL:uL)(n,e,t))}function Yd(e,t,n){var r=e._id;return e.each(function(){var i=Ht(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Mt(i,r).value[t]}}function J0(e,t){var n;return(typeof t=="number"?gn:t instanceof xs?um:(n=xs(t))?(t=n,um):q4)(e,t)}function fL(e){return function(){this.removeAttribute(e)}}function hL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function pL(e,t,n){var r,i=n+"",s;return function(){var o=this.getAttribute(e);return o===i?null:o===r?s:s=t(r=o,n)}}function mL(e,t,n){var r,i=n+"",s;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?s:s=t(r=o,n)}}function gL(e,t,n){var r,i,s;return function(){var o,a=n(this),c;return a==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=a+"",o===c?null:o===r&&c===i?s:(i=c,s=t(r=o,a)))}}function yL(e,t,n){var r,i,s;return function(){var o,a=n(this),c;return a==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=a+"",o===c?null:o===r&&c===i?s:(i=c,s=t(r=o,a)))}}function vL(e,t){var n=Ha(e),r=n==="transform"?X4:J0;return this.attrTween(e,typeof t=="function"?(n.local?yL:gL)(n,r,Yd(this,"attr."+e,t)):t==null?(n.local?hL:fL)(n):(n.local?mL:pL)(n,r,t))}function xL(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function _L(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function wL(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&_L(e,s)),n}return i._value=t,i}function SL(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&xL(e,s)),n}return i._value=t,i}function jL(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Ha(e);return this.tween(n,(r.local?wL:SL)(r,t))}function NL(e,t){return function(){Gd(this,e).delay=+t.apply(this,arguments)}}function kL(e,t){return t=+t,function(){Gd(this,e).delay=t}}function CL(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?NL:kL)(t,e)):Mt(this.node(),t).delay}function bL(e,t){return function(){Ht(this,e).duration=+t.apply(this,arguments)}}function TL(e,t){return t=+t,function(){Ht(this,e).duration=t}}function EL(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?bL:TL)(t,e)):Mt(this.node(),t).duration}function PL(e,t){if(typeof t!="function")throw new Error;return function(){Ht(this,e).ease=t}}function AL(e){var t=this._id;return arguments.length?this.each(PL(t,e)):Mt(this.node(),t).ease}function LL(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ht(this,e).ease=n}}function ML(e){if(typeof e!="function")throw new Error;return this.each(LL(this._id,e))}function RL(e){typeof e!="function"&&(e=L0(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,a=r[i]=[],c,u=0;u<o;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&a.push(c);return new un(r,this._parents,this._name,this._id)}function DL(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),o=new Array(r),a=0;a<s;++a)for(var c=t[a],u=n[a],d=c.length,f=o[a]=new Array(d),h,g=0;g<d;++g)(h=c[g]||u[g])&&(f[g]=h);for(;a<r;++a)o[a]=t[a];return new un(o,this._parents,this._name,this._id)}function IL(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function $L(e,t,n){var r,i,s=IL(t)?Gd:Ht;return function(){var o=s(this,e),a=o.on;a!==r&&(i=(r=a).copy()).on(t,n),o.on=i}}function FL(e,t){var n=this._id;return arguments.length<2?Mt(this.node(),n).on.on(e):this.each($L(n,e,t))}function OL(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function VL(){return this.on("end.remove",OL(this._id))}function zL(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ud(e));for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o)for(var a=r[o],c=a.length,u=s[o]=new Array(c),d,f,h=0;h<c;++h)(d=a[h])&&(f=e.call(d,d.__data__,h,a))&&("__data__"in d&&(f.__data__=d.__data__),u[h]=f,qa(u[h],t,n,h,u,Mt(d,n)));return new un(s,this._parents,t,n)}function BL(e){var t=this._name,n=this._id;typeof e!="function"&&(e=A0(e));for(var r=this._groups,i=r.length,s=[],o=[],a=0;a<i;++a)for(var c=r[a],u=c.length,d,f=0;f<u;++f)if(d=c[f]){for(var h=e.call(d,d.__data__,f,c),g,w=Mt(d,n),y=0,_=h.length;y<_;++y)(g=h[y])&&qa(g,t,n,y,h,w);s.push(h),o.push(d)}return new un(s,o,t,n)}var UL=Ms.prototype.constructor;function HL(){return new UL(this._groups,this._parents)}function WL(e,t){var n,r,i;return function(){var s=ri(this,e),o=(this.style.removeProperty(e),ri(this,e));return s===o?null:s===n&&o===r?i:i=t(n=s,r=o)}}function ex(e){return function(){this.style.removeProperty(e)}}function qL(e,t,n){var r,i=n+"",s;return function(){var o=ri(this,e);return o===i?null:o===r?s:s=t(r=o,n)}}function KL(e,t,n){var r,i,s;return function(){var o=ri(this,e),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(e),ri(this,e))),o===c?null:o===r&&c===i?s:(i=c,s=t(r=o,a))}}function GL(e,t){var n,r,i,s="style."+t,o="end."+s,a;return function(){var c=Ht(this,e),u=c.on,d=c.value[s]==null?a||(a=ex(t)):void 0;(u!==n||i!==d)&&(r=(n=u).copy()).on(o,i=d),c.on=r}}function YL(e,t,n){var r=(e+="")=="transform"?Y4:J0;return t==null?this.styleTween(e,WL(e,r)).on("end.style."+e,ex(e)):typeof t=="function"?this.styleTween(e,KL(e,r,Yd(this,"style."+e,t))).each(GL(this._id,e)):this.styleTween(e,qL(e,r,t),n).on("end.style."+e,null)}function XL(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function QL(e,t,n){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&XL(e,o,n)),r}return s._value=t,s}function ZL(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,QL(e,t,n??""))}function JL(e){return function(){this.textContent=e}}function eM(e){return function(){var t=e(this);this.textContent=t??""}}function tM(e){return this.tween("text",typeof e=="function"?eM(Yd(this,"text",e)):JL(e==null?"":e+""))}function nM(e){return function(t){this.textContent=e.call(this,t)}}function rM(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&nM(i)),t}return r._value=e,r}function iM(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,rM(e))}function sM(){for(var e=this._name,t=this._id,n=tx(),r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],a=o.length,c,u=0;u<a;++u)if(c=o[u]){var d=Mt(c,t);qa(c,e,n,u,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new un(r,this._parents,e,n)}function oM(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,o){var a={value:o},c={value:function(){--i===0&&s()}};n.each(function(){var u=Ht(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(c)),u.on=t}),i===0&&s()})}var aM=0;function un(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function tx(){return++aM}var qt=Ms.prototype;un.prototype={constructor:un,select:zL,selectAll:BL,selectChild:qt.selectChild,selectChildren:qt.selectChildren,filter:RL,merge:DL,selection:HL,transition:sM,call:qt.call,nodes:qt.nodes,node:qt.node,size:qt.size,empty:qt.empty,each:qt.each,on:FL,attr:vL,attrTween:jL,style:YL,styleTween:ZL,text:tM,textTween:iM,remove:VL,tween:dL,delay:CL,duration:EL,ease:AL,easeVarying:ML,end:oM,[Symbol.iterator]:qt[Symbol.iterator]};function lM(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var cM={time:null,delay:0,duration:250,ease:lM};function uM(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function dM(e){var t,n;e instanceof un?(t=e._id,e=e._name):(t=tx(),(n=cM).time=qd(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],a=o.length,c,u=0;u<a;++u)(c=o[u])&&qa(c,e,t,u,o,n||uM(c,t));return new un(r,this._parents,e,t)}Ms.prototype.interrupt=lL;Ms.prototype.transition=dM;function fM(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var s,o=n.length,a,c=0,u=0;for(s=0;s<o;++s)a=n[s],c+=a.x,u+=a.y;for(c=(c/o-e)*r,u=(u/o-t)*r,s=0;s<o;++s)a=n[s],a.x-=c,a.y-=u}return i.initialize=function(s){n=s},i.x=function(s){return arguments.length?(e=+s,i):e},i.y=function(s){return arguments.length?(t=+s,i):t},i.strength=function(s){return arguments.length?(r=+s,i):r},i}function hM(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return nx(this.cover(t,n),t,n,e)}function nx(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,s=e._root,o={data:r},a=e._x0,c=e._y0,u=e._x1,d=e._y1,f,h,g,w,y,_,p,m;if(!s)return e._root=o,e;for(;s.length;)if((y=t>=(f=(a+u)/2))?a=f:u=f,(_=n>=(h=(c+d)/2))?c=h:d=h,i=s,!(s=s[p=_<<1|y]))return i[p]=o,e;if(g=+e._x.call(null,s.data),w=+e._y.call(null,s.data),t===g&&n===w)return o.next=s,i?i[p]=o:e._root=o,e;do i=i?i[p]=new Array(4):e._root=new Array(4),(y=t>=(f=(a+u)/2))?a=f:u=f,(_=n>=(h=(c+d)/2))?c=h:d=h;while((p=_<<1|y)===(m=(w>=h)<<1|g>=f));return i[m]=s,i[p]=o,e}function pM(e){var t,n,r=e.length,i,s,o=new Array(r),a=new Array(r),c=1/0,u=1/0,d=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(s=+this._y.call(null,t))||(o[n]=i,a[n]=s,i<c&&(c=i),i>d&&(d=i),s<u&&(u=s),s>f&&(f=s));if(c>d||u>f)return this;for(this.cover(c,u).cover(d,f),n=0;n<r;++n)nx(this,o[n],a[n],e[n]);return this}function mM(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,s=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,s=(r=Math.floor(t))+1;else{for(var o=i-n||1,a=this._root,c,u;n>e||e>=i||r>t||t>=s;)switch(u=(t<r)<<1|e<n,c=new Array(4),c[u]=a,a=c,o*=2,u){case 0:i=n+o,s=r+o;break;case 1:n=i-o,s=r+o;break;case 2:i=n+o,r=s-o;break;case 3:n=i-o,r=s-o;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=r,this._x1=i,this._y1=s,this}function gM(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function yM(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function He(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function vM(e,t,n){var r,i=this._x0,s=this._y0,o,a,c,u,d=this._x1,f=this._y1,h=[],g=this._root,w,y;for(g&&h.push(new He(g,i,s,d,f)),n==null?n=1/0:(i=e-n,s=t-n,d=e+n,f=t+n,n*=n);w=h.pop();)if(!(!(g=w.node)||(o=w.x0)>d||(a=w.y0)>f||(c=w.x1)<i||(u=w.y1)<s))if(g.length){var _=(o+c)/2,p=(a+u)/2;h.push(new He(g[3],_,p,c,u),new He(g[2],o,p,_,u),new He(g[1],_,a,c,p),new He(g[0],o,a,_,p)),(y=(t>=p)<<1|e>=_)&&(w=h[h.length-1],h[h.length-1]=h[h.length-1-y],h[h.length-1-y]=w)}else{var m=e-+this._x.call(null,g.data),v=t-+this._y.call(null,g.data),x=m*m+v*v;if(x<n){var j=Math.sqrt(n=x);i=e-j,s=t-j,d=e+j,f=t+j,r=g.data}}return r}function xM(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,n=this._root,r,i,s,o=this._x0,a=this._y0,c=this._x1,u=this._y1,d,f,h,g,w,y,_,p;if(!n)return this;if(n.length)for(;;){if((w=d>=(h=(o+c)/2))?o=h:c=h,(y=f>=(g=(a+u)/2))?a=g:u=g,t=n,!(n=n[_=y<<1|w]))return this;if(!n.length)break;(t[_+1&3]||t[_+2&3]||t[_+3&3])&&(r=t,p=_)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(s=n.next)&&delete n.next,i?(s?i.next=s:delete i.next,this):t?(s?t[_]=s:delete t[_],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[p]=n:this._root=n),this):(this._root=s,this)}function _M(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function wM(){return this._root}function SM(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function jM(e){var t=[],n,r=this._root,i,s,o,a,c;for(r&&t.push(new He(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,s=n.x0,o=n.y0,a=n.x1,c=n.y1)&&r.length){var u=(s+a)/2,d=(o+c)/2;(i=r[3])&&t.push(new He(i,u,d,a,c)),(i=r[2])&&t.push(new He(i,s,d,u,c)),(i=r[1])&&t.push(new He(i,u,o,a,d)),(i=r[0])&&t.push(new He(i,s,o,u,d))}return this}function NM(e){var t=[],n=[],r;for(this._root&&t.push(new He(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var s,o=r.x0,a=r.y0,c=r.x1,u=r.y1,d=(o+c)/2,f=(a+u)/2;(s=i[0])&&t.push(new He(s,o,a,d,f)),(s=i[1])&&t.push(new He(s,d,a,c,f)),(s=i[2])&&t.push(new He(s,o,f,d,u)),(s=i[3])&&t.push(new He(s,d,f,c,u))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function kM(e){return e[0]}function CM(e){return arguments.length?(this._x=e,this):this._x}function bM(e){return e[1]}function TM(e){return arguments.length?(this._y=e,this):this._y}function Xd(e,t,n){var r=new Qd(t??kM,n??bM,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Qd(e,t,n,r,i,s){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=s,this._root=void 0}function ym(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Ye=Xd.prototype=Qd.prototype;Ye.copy=function(){var e=new Qd(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=ym(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=ym(r));return e};Ye.add=hM;Ye.addAll=pM;Ye.cover=mM;Ye.data=gM;Ye.extent=yM;Ye.find=vM;Ye.remove=xM;Ye.removeAll=_M;Ye.root=wM;Ye.size=SM;Ye.visit=jM;Ye.visitAfter=NM;Ye.x=CM;Ye.y=TM;function We(e){return function(){return e}}function Sn(e){return(e()-.5)*1e-6}function EM(e){return e.x+e.vx}function PM(e){return e.y+e.vy}function AM(e){var t,n,r,i=1,s=1;typeof e!="function"&&(e=We(e==null?1:+e));function o(){for(var u,d=t.length,f,h,g,w,y,_,p=0;p<s;++p)for(f=Xd(t,EM,PM).visitAfter(a),u=0;u<d;++u)h=t[u],y=n[h.index],_=y*y,g=h.x+h.vx,w=h.y+h.vy,f.visit(m);function m(v,x,j,C,b){var k=v.data,I=v.r,R=y+I;if(k){if(k.index>h.index){var K=g-k.x-k.vx,te=w-k.y-k.vy,X=K*K+te*te;X<R*R&&(K===0&&(K=Sn(r),X+=K*K),te===0&&(te=Sn(r),X+=te*te),X=(R-(X=Math.sqrt(X)))/X*i,h.vx+=(K*=X)*(R=(I*=I)/(_+I)),h.vy+=(te*=X)*R,k.vx-=K*(R=1-R),k.vy-=te*R)}return}return x>g+R||C<g-R||j>w+R||b<w-R}}function a(u){if(u.data)return u.r=n[u.data.index];for(var d=u.r=0;d<4;++d)u[d]&&u[d].r>u.r&&(u.r=u[d].r)}function c(){if(t){var u,d=t.length,f;for(n=new Array(d),u=0;u<d;++u)f=t[u],n[f.index]=+e(f,u,t)}}return o.initialize=function(u,d){t=u,r=d,c()},o.iterations=function(u){return arguments.length?(s=+u,o):s},o.strength=function(u){return arguments.length?(i=+u,o):i},o.radius=function(u){return arguments.length?(e=typeof u=="function"?u:We(+u),c(),o):e},o}function LM(e){return e.index}function vm(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function MM(e){var t=LM,n=f,r,i=We(30),s,o,a,c,u,d=1;e==null&&(e=[]);function f(_){return 1/Math.min(a[_.source.index],a[_.target.index])}function h(_){for(var p=0,m=e.length;p<d;++p)for(var v=0,x,j,C,b,k,I,R;v<m;++v)x=e[v],j=x.source,C=x.target,b=C.x+C.vx-j.x-j.vx||Sn(u),k=C.y+C.vy-j.y-j.vy||Sn(u),I=Math.sqrt(b*b+k*k),I=(I-s[v])/I*_*r[v],b*=I,k*=I,C.vx-=b*(R=c[v]),C.vy-=k*R,j.vx+=b*(R=1-R),j.vy+=k*R}function g(){if(o){var _,p=o.length,m=e.length,v=new Map(o.map((j,C)=>[t(j,C,o),j])),x;for(_=0,a=new Array(p);_<m;++_)x=e[_],x.index=_,typeof x.source!="object"&&(x.source=vm(v,x.source)),typeof x.target!="object"&&(x.target=vm(v,x.target)),a[x.source.index]=(a[x.source.index]||0)+1,a[x.target.index]=(a[x.target.index]||0)+1;for(_=0,c=new Array(m);_<m;++_)x=e[_],c[_]=a[x.source.index]/(a[x.source.index]+a[x.target.index]);r=new Array(m),w(),s=new Array(m),y()}}function w(){if(o)for(var _=0,p=e.length;_<p;++_)r[_]=+n(e[_],_,e)}function y(){if(o)for(var _=0,p=e.length;_<p;++_)s[_]=+i(e[_],_,e)}return h.initialize=function(_,p){o=_,u=p,g()},h.links=function(_){return arguments.length?(e=_,g(),h):e},h.id=function(_){return arguments.length?(t=_,h):t},h.iterations=function(_){return arguments.length?(d=+_,h):d},h.strength=function(_){return arguments.length?(n=typeof _=="function"?_:We(+_),w(),h):n},h.distance=function(_){return arguments.length?(i=typeof _=="function"?_:We(+_),y(),h):i},h}const RM=1664525,DM=1013904223,xm=4294967296;function IM(){let e=1;return()=>(e=(RM*e+DM)%xm)/xm}function $M(e){return e.x}function FM(e){return e.y}var OM=10,VM=Math.PI*(3-Math.sqrt(5));function zM(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),s=0,o=.6,a=new Map,c=Kd(f),u=Ls("tick","end"),d=IM();e==null&&(e=[]);function f(){h(),u.call("tick",t),n<r&&(c.stop(),u.call("end",t))}function h(y){var _,p=e.length,m;y===void 0&&(y=1);for(var v=0;v<y;++v)for(n+=(s-n)*i,a.forEach(function(x){x(n)}),_=0;_<p;++_)m=e[_],m.fx==null?m.x+=m.vx*=o:(m.x=m.fx,m.vx=0),m.fy==null?m.y+=m.vy*=o:(m.y=m.fy,m.vy=0);return t}function g(){for(var y=0,_=e.length,p;y<_;++y){if(p=e[y],p.index=y,p.fx!=null&&(p.x=p.fx),p.fy!=null&&(p.y=p.fy),isNaN(p.x)||isNaN(p.y)){var m=OM*Math.sqrt(.5+y),v=y*VM;p.x=m*Math.cos(v),p.y=m*Math.sin(v)}(isNaN(p.vx)||isNaN(p.vy))&&(p.vx=p.vy=0)}}function w(y){return y.initialize&&y.initialize(e,d),y}return g(),t={tick:h,restart:function(){return c.restart(f),t},stop:function(){return c.stop(),t},nodes:function(y){return arguments.length?(e=y,g(),a.forEach(w),t):e},alpha:function(y){return arguments.length?(n=+y,t):n},alphaMin:function(y){return arguments.length?(r=+y,t):r},alphaDecay:function(y){return arguments.length?(i=+y,t):+i},alphaTarget:function(y){return arguments.length?(s=+y,t):s},velocityDecay:function(y){return arguments.length?(o=1-y,t):1-o},randomSource:function(y){return arguments.length?(d=y,a.forEach(w),t):d},force:function(y,_){return arguments.length>1?(_==null?a.delete(y):a.set(y,w(_)),t):a.get(y)},find:function(y,_,p){var m=0,v=e.length,x,j,C,b,k;for(p==null?p=1/0:p*=p,m=0;m<v;++m)b=e[m],x=y-b.x,j=_-b.y,C=x*x+j*j,C<p&&(k=b,p=C);return k},on:function(y,_){return arguments.length>1?(u.on(y,_),t):u.on(y)}}}function BM(){var e,t,n,r,i=We(-30),s,o=1,a=1/0,c=.81;function u(g){var w,y=e.length,_=Xd(e,$M,FM).visitAfter(f);for(r=g,w=0;w<y;++w)t=e[w],_.visit(h)}function d(){if(e){var g,w=e.length,y;for(s=new Array(w),g=0;g<w;++g)y=e[g],s[y.index]=+i(y,g,e)}}function f(g){var w=0,y,_,p=0,m,v,x;if(g.length){for(m=v=x=0;x<4;++x)(y=g[x])&&(_=Math.abs(y.value))&&(w+=y.value,p+=_,m+=_*y.x,v+=_*y.y);g.x=m/p,g.y=v/p}else{y=g,y.x=y.data.x,y.y=y.data.y;do w+=s[y.data.index];while(y=y.next)}g.value=w}function h(g,w,y,_){if(!g.value)return!0;var p=g.x-t.x,m=g.y-t.y,v=_-w,x=p*p+m*m;if(v*v/c<x)return x<a&&(p===0&&(p=Sn(n),x+=p*p),m===0&&(m=Sn(n),x+=m*m),x<o&&(x=Math.sqrt(o*x)),t.vx+=p*g.value*r/x,t.vy+=m*g.value*r/x),!0;if(g.length||x>=a)return;(g.data!==t||g.next)&&(p===0&&(p=Sn(n),x+=p*p),m===0&&(m=Sn(n),x+=m*m),x<o&&(x=Math.sqrt(o*x)));do g.data!==t&&(v=s[g.data.index]*r/x,t.vx+=p*v,t.vy+=m*v);while(g=g.next)}return u.initialize=function(g,w){e=g,n=w,d()},u.strength=function(g){return arguments.length?(i=typeof g=="function"?g:We(+g),d(),u):i},u.distanceMin=function(g){return arguments.length?(o=g*g,u):Math.sqrt(o)},u.distanceMax=function(g){return arguments.length?(a=g*g,u):Math.sqrt(a)},u.theta=function(g){return arguments.length?(c=g*g,u):Math.sqrt(c)},u}function _m(e){var t=We(.1),n,r,i;typeof e!="function"&&(e=We(e==null?0:+e));function s(a){for(var c=0,u=n.length,d;c<u;++c)d=n[c],d.vx+=(i[c]-d.x)*r[c]*a}function o(){if(n){var a,c=n.length;for(r=new Array(c),i=new Array(c),a=0;a<c;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return s.initialize=function(a){n=a,o()},s.strength=function(a){return arguments.length?(t=typeof a=="function"?a:We(+a),o(),s):t},s.x=function(a){return arguments.length?(e=typeof a=="function"?a:We(+a),o(),s):e},s}function wm(e){var t=We(.1),n,r,i;typeof e!="function"&&(e=We(e==null?0:+e));function s(a){for(var c=0,u=n.length,d;c<u;++c)d=n[c],d.vy+=(i[c]-d.y)*r[c]*a}function o(){if(n){var a,c=n.length;for(r=new Array(c),i=new Array(c),a=0;a<c;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return s.initialize=function(a){n=a,o()},s.strength=function(a){return arguments.length?(t=typeof a=="function"?a:We(+a),o(),s):t},s.y=function(a){return arguments.length?(e=typeof a=="function"?a:We(+a),o(),s):e},s}const fo=e=>()=>e;function UM(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function en(e,t,n){this.k=e,this.x=t,this.y=n}en.prototype={constructor:en,scale:function(e){return e===1?this:new en(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new en(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var rx=new en(1,0,0);en.prototype;function Ul(e){e.stopImmediatePropagation()}function Si(e){e.preventDefault(),e.stopImmediatePropagation()}function HM(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function WM(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Sm(){return this.__zoom||rx}function qM(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function KM(){return navigator.maxTouchPoints||"ontouchstart"in this}function GM(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function YM(){var e=HM,t=WM,n=GM,r=qM,i=KM,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,c=eL,u=Ls("start","zoom","end"),d,f,h,g=500,w=150,y=0,_=10;function p(N){N.property("__zoom",Sm).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",R).filter(i).on("touchstart.zoom",K).on("touchmove.zoom",te).on("touchend.zoom touchcancel.zoom",X).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(N,U,M,$){var E=N.selection?N.selection():N;E.property("__zoom",Sm),N!==E?j(N,U,M,$):E.interrupt().each(function(){C(this,arguments).event($).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},p.scaleBy=function(N,U,M,$){p.scaleTo(N,function(){var E=this.__zoom.k,D=typeof U=="function"?U.apply(this,arguments):U;return E*D},M,$)},p.scaleTo=function(N,U,M,$){p.transform(N,function(){var E=t.apply(this,arguments),D=this.__zoom,V=M==null?x(E):typeof M=="function"?M.apply(this,arguments):M,L=D.invert(V),W=typeof U=="function"?U.apply(this,arguments):U;return n(v(m(D,W),V,L),E,o)},M,$)},p.translateBy=function(N,U,M,$){p.transform(N,function(){return n(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),o)},null,$)},p.translateTo=function(N,U,M,$,E){p.transform(N,function(){var D=t.apply(this,arguments),V=this.__zoom,L=$==null?x(D):typeof $=="function"?$.apply(this,arguments):$;return n(rx.translate(L[0],L[1]).scale(V.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof M=="function"?-M.apply(this,arguments):-M),D,o)},$,E)};function m(N,U){return U=Math.max(s[0],Math.min(s[1],U)),U===N.k?N:new en(U,N.x,N.y)}function v(N,U,M){var $=U[0]-M[0]*N.k,E=U[1]-M[1]*N.k;return $===N.x&&E===N.y?N:new en(N.k,$,E)}function x(N){return[(+N[0][0]+ +N[1][0])/2,(+N[0][1]+ +N[1][1])/2]}function j(N,U,M,$){N.on("start.zoom",function(){C(this,arguments).event($).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event($).end()}).tween("zoom",function(){var E=this,D=arguments,V=C(E,D).event($),L=t.apply(E,D),W=M==null?x(L):typeof M=="function"?M.apply(E,D):M,Q=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),ee=E.__zoom,de=typeof U=="function"?U.apply(E,D):U,he=c(ee.invert(W).concat(Q/ee.k),de.invert(W).concat(Q/de.k));return function(ke){if(ke===1)ke=de;else{var ft=he(ke),gr=Q/ft[2];ke=new en(gr,W[0]-ft[0]*gr,W[1]-ft[1]*gr)}V.zoom(null,ke)}})}function C(N,U,M){return!M&&N.__zooming||new b(N,U)}function b(N,U){this.that=N,this.args=U,this.active=0,this.sourceEvent=null,this.extent=t.apply(N,U),this.taps=0}b.prototype={event:function(N){return N&&(this.sourceEvent=N),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(N,U){return this.mouse&&N!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&N!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&N!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(N){var U=Tt(this.that).datum();u.call(N,this.that,new UM(N,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:u}),U)}};function k(N,...U){if(!e.apply(this,arguments))return;var M=C(this,U).event(N),$=this.__zoom,E=Math.max(s[0],Math.min(s[1],$.k*Math.pow(2,r.apply(this,arguments)))),D=Yt(N);if(M.wheel)(M.mouse[0][0]!==D[0]||M.mouse[0][1]!==D[1])&&(M.mouse[1]=$.invert(M.mouse[0]=D)),clearTimeout(M.wheel);else{if($.k===E)return;M.mouse=[D,$.invert(D)],Ao(this),M.start()}Si(N),M.wheel=setTimeout(V,w),M.zoom("mouse",n(v(m($,E),M.mouse[0],M.mouse[1]),M.extent,o));function V(){M.wheel=null,M.end()}}function I(N,...U){if(h||!e.apply(this,arguments))return;var M=N.currentTarget,$=C(this,U,!0).event(N),E=Tt(N.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",Q,!0),D=Yt(N,M),V=N.clientX,L=N.clientY;B0(N.view),Ul(N),$.mouse=[D,this.__zoom.invert(D)],Ao(this),$.start();function W(ee){if(Si(ee),!$.moved){var de=ee.clientX-V,he=ee.clientY-L;$.moved=de*de+he*he>y}$.event(ee).zoom("mouse",n(v($.that.__zoom,$.mouse[0]=Yt(ee,M),$.mouse[1]),$.extent,o))}function Q(ee){E.on("mousemove.zoom mouseup.zoom",null),U0(ee.view,$.moved),Si(ee),$.event(ee).end()}}function R(N,...U){if(e.apply(this,arguments)){var M=this.__zoom,$=Yt(N.changedTouches?N.changedTouches[0]:N,this),E=M.invert($),D=M.k*(N.shiftKey?.5:2),V=n(v(m(M,D),$,E),t.apply(this,U),o);Si(N),a>0?Tt(this).transition().duration(a).call(j,V,$,N):Tt(this).call(p.transform,V,$,N)}}function K(N,...U){if(e.apply(this,arguments)){var M=N.touches,$=M.length,E=C(this,U,N.changedTouches.length===$).event(N),D,V,L,W;for(Ul(N),V=0;V<$;++V)L=M[V],W=Yt(L,this),W=[W,this.__zoom.invert(W),L.identifier],E.touch0?!E.touch1&&E.touch0[2]!==W[2]&&(E.touch1=W,E.taps=0):(E.touch0=W,D=!0,E.taps=1+!!d);d&&(d=clearTimeout(d)),D&&(E.taps<2&&(f=W[0],d=setTimeout(function(){d=null},g)),Ao(this),E.start())}}function te(N,...U){if(this.__zooming){var M=C(this,U).event(N),$=N.changedTouches,E=$.length,D,V,L,W;for(Si(N),D=0;D<E;++D)V=$[D],L=Yt(V,this),M.touch0&&M.touch0[2]===V.identifier?M.touch0[0]=L:M.touch1&&M.touch1[2]===V.identifier&&(M.touch1[0]=L);if(V=M.that.__zoom,M.touch1){var Q=M.touch0[0],ee=M.touch0[1],de=M.touch1[0],he=M.touch1[1],ke=(ke=de[0]-Q[0])*ke+(ke=de[1]-Q[1])*ke,ft=(ft=he[0]-ee[0])*ft+(ft=he[1]-ee[1])*ft;V=m(V,Math.sqrt(ke/ft)),L=[(Q[0]+de[0])/2,(Q[1]+de[1])/2],W=[(ee[0]+he[0])/2,(ee[1]+he[1])/2]}else if(M.touch0)L=M.touch0[0],W=M.touch0[1];else return;M.zoom("touch",n(v(V,L,W),M.extent,o))}}function X(N,...U){if(this.__zooming){var M=C(this,U).event(N),$=N.changedTouches,E=$.length,D,V;for(Ul(N),h&&clearTimeout(h),h=setTimeout(function(){h=null},g),D=0;D<E;++D)V=$[D],M.touch0&&M.touch0[2]===V.identifier?delete M.touch0:M.touch1&&M.touch1[2]===V.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(V=Yt(V,this),Math.hypot(f[0]-V[0],f[1]-V[1])<_)){var L=Tt(this).on("dblclick.zoom");L&&L.apply(this,arguments)}}}return p.wheelDelta=function(N){return arguments.length?(r=typeof N=="function"?N:fo(+N),p):r},p.filter=function(N){return arguments.length?(e=typeof N=="function"?N:fo(!!N),p):e},p.touchable=function(N){return arguments.length?(i=typeof N=="function"?N:fo(!!N),p):i},p.extent=function(N){return arguments.length?(t=typeof N=="function"?N:fo([[+N[0][0],+N[0][1]],[+N[1][0],+N[1][1]]]),p):t},p.scaleExtent=function(N){return arguments.length?(s[0]=+N[0],s[1]=+N[1],p):[s[0],s[1]]},p.translateExtent=function(N){return arguments.length?(o[0][0]=+N[0][0],o[1][0]=+N[1][0],o[0][1]=+N[0][1],o[1][1]=+N[1][1],p):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},p.constrain=function(N){return arguments.length?(n=N,p):n},p.duration=function(N){return arguments.length?(a=+N,p):a},p.interpolate=function(N){return arguments.length?(c=N,p):c},p.on=function(){var N=u.on.apply(u,arguments);return N===u?p:N},p.clickDistance=function(N){return arguments.length?(y=(N=+N)*N,p):Math.sqrt(y)},p.tapDistance=function(N){return arguments.length?(_=+N,p):_},p}const Qt={bg:"#111318",green:"#3882F6",greenBright:"#6ba3ff",greenMid:"#2563eb",greenDim:"#1e40af",edgeRel:"rgba(56, 130, 246, 0.22)",edgeMem:"rgba(56, 130, 246, 0.12)"};function Zd(e){return e?e.edges??e.links??[]:[]}function mt(e){return typeof e=="object"?e.id:e}function XM(e){let t=null;for(const n of e??[])(!t||n.weight>t.weight)&&(t=n);return(t==null?void 0:t.type)??"semantic"}function xr(e){return e.type==="entity"?12:6+(e.salience??.5)*10}function QM(e){const t=e.salience??.5;return t>=.66?Qt.greenBright:t>=.33?Qt.green:Qt.greenMid}function ZM(e){const t=[];for(let n=0;n<6;n++){const r=Math.PI/3*n-Math.PI/6;t.push(`${e*Math.cos(r)},${e*Math.sin(r)}`)}return t.join(" ")}function jm(e,t){return e?e.length>t?`${e.slice(0,t-1)}…`:e:""}function JM(e){return T4().on("start",t=>{t.active||e.alphaTarget(.15).restart(),t.subject.fx=t.subject.x,t.subject.fy=t.subject.y}).on("drag",t=>{t.subject.fx=t.x,t.subject.fy=t.y}).on("end",t=>{t.active||e.alphaTarget(0),t.subject.fx=null,t.subject.fy=null})}function eR({svgRef:e,wrapperRef:t,data:n,filters:r,onSelect:i,onTooltip:s}){const o=S.useRef(null),a=S.useRef(null),c=S.useRef(null),u=S.useRef(null),d=S.useRef([]),f=S.useRef([]),h=S.useRef(null),g=S.useRef(r);g.current=r;const w=()=>{const m=g.current,v=new Set;for(const x of d.current)if(!(x.type==="memory"&&!m.activeMemoryTypes.has(XM(x.types)))&&!(x.type==="entity"&&!m.activeEntityKinds.has(x.kind??""))){if(m.search){((x.label??"").toLowerCase().includes(m.search)||x.type==="entity"&&(x.kind??"").toLowerCase().includes(m.search)||x.type==="memory"&&(x.text??"").toLowerCase().includes(m.search))&&v.add(x.id);continue}v.add(x.id)}return v},y=()=>{const m=a.current,v=c.current,x=u.current;if(!m||!v)return;const j=w();m.classed("dimmed",C=>!j.has(C.id)),v.classed("dimmed",C=>!j.has(mt(C.source))||!j.has(mt(C.target))),x==null||x.classed("dimmed",C=>!j.has(mt(C.source))||!j.has(mt(C.target)))},_=m=>{const v=a.current,x=c.current,j=u.current;if(!v||!x)return;const C=new Set([m]);for(const b of f.current){const k=mt(b.source),I=mt(b.target);k===m&&C.add(I),I===m&&C.add(k)}v.classed("dimmed",b=>!C.has(b.id)),v.classed("highlighted",b=>b.id===m),x.classed("active",b=>mt(b.source)===m||mt(b.target)===m),x.classed("dimmed",b=>mt(b.source)!==m&&mt(b.target)!==m),j==null||j.classed("dimmed",b=>mt(b.source)!==m&&mt(b.target)!==m)},p=()=>{const m=a.current,v=c.current;!m||!v||(m.classed("dimmed",!1).classed("highlighted",!1),v.classed("dimmed",!1).classed("active",!1),y())};S.useEffect(()=>{const m=e.current,v=t.current;if(!m||!v||!n||n.nodes.length===0)return;const x=Tt(m);x.selectAll("*").remove();const j=()=>{const L=v.getBoundingClientRect();return{width:Math.max(L.width,320),height:Math.max(L.height,320)}};let{width:C,height:b}=j();x.attr("viewBox",`0 0 ${C} ${b}`),x.append("defs").append("marker").attr("id","ng-arrow").attr("viewBox","0 0 10 7").attr("refX",10).attr("refY",3.5).attr("markerWidth",7).attr("markerHeight",5).attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",Qt.green).attr("fill-opacity",.55);const I=x.append("g").attr("class","ng-root"),R=YM().scaleExtent([.2,5]).on("zoom",L=>{I.attr("transform",L.transform.toString())});x.call(R);const K=n.nodes.map(L=>({...L})),te=Zd(n).map(L=>({...L}));d.current=K,f.current=te;const X=zM(K).force("link",MM(te).id(L=>L.id).distance(120).strength(.4)).force("charge",BM().strength(-260)).force("center",fM(C/2,b/2)).force("collision",AM().radius(L=>xr(L)+4)).force("x",_m(C/2).strength(.04)).force("y",wm(b/2).strength(.04));o.current=X;const N=I.append("g").attr("class","ng-edges"),U=I.append("g").attr("class","ng-edge-labels"),M=I.append("g").attr("class","ng-nodes"),$=N.selectAll("line").data(te).join("line").attr("class",L=>`ng-edge ${L.type==="relationship"?"rel":"mem"}`).attr("stroke",L=>L.type==="relationship"?Qt.edgeRel:Qt.edgeMem).attr("stroke-width",L=>L.type==="relationship"?1.4:1).attr("stroke-dasharray",L=>L.type==="memory-entity"?"4,3":"none").attr("marker-end",L=>L.type==="relationship"?"url(#ng-arrow)":null);c.current=$;const E=U.selectAll("text").data(te.filter(L=>L.type==="relationship")).join("text").attr("class","ng-edge-label").attr("text-anchor","middle").attr("dy",-3).text(L=>jm(L.label??L.predicate,20));u.current=E;const D=M.selectAll("g").data(K).join("g").attr("class","ng-node").call(JM(X));a.current=D,D.each(function(L){const W=Tt(this);if(L.type==="entity")W.append("polygon").attr("class","ng-shape").attr("points",ZM(xr(L))).attr("fill",Qt.green).attr("fill-opacity",.08).attr("stroke",Qt.greenDim).attr("stroke-width",1.4).attr("stroke-opacity",.9);else{const Q=QM(L);W.append("circle").attr("class","ng-shape").attr("r",xr(L)).attr("fill",Q).attr("fill-opacity",.28).attr("stroke",Q).attr("stroke-width",1.2).attr("stroke-opacity",.95)}W.append("text").attr("class","ng-node-label").attr("dy",xr(L)+13).attr("text-anchor","middle").attr("paint-order","stroke").attr("stroke",Qt.bg).attr("stroke-width",3).attr("stroke-linejoin","round").text(jm(L.label,22))}),D.on("pointerenter",(L,W)=>{_(W.id);const Q=v.getBoundingClientRect();s({node:W,x:L.clientX-Q.left,y:L.clientY-Q.top})}).on("pointermove",(L,W)=>{const Q=v.getBoundingClientRect();s({node:W,x:L.clientX-Q.left,y:L.clientY-Q.top})}).on("pointerleave",()=>{h.current?_(h.current):p(),s(null)}).on("click",(L,W)=>{L.stopPropagation(),h.current===W.id?(h.current=null,p(),i(null)):(h.current=W.id,_(W.id),i(W))}),x.on("click",()=>{h.current=null,p(),i(null)}),X.on("tick",()=>{$.attr("x1",L=>L.source.x??0).attr("y1",L=>L.source.y??0).attr("x2",L=>{const W=L.source,Q=L.target,ee=(Q.x??0)-(W.x??0),de=(Q.y??0)-(W.y??0),he=Math.sqrt(ee*ee+de*de)||1;return(Q.x??0)-ee/he*xr(Q)}).attr("y2",L=>{const W=L.source,Q=L.target,ee=(Q.x??0)-(W.x??0),de=(Q.y??0)-(W.y??0),he=Math.sqrt(ee*ee+de*de)||1;return(Q.y??0)-de/he*xr(Q)}),E.attr("x",L=>((L.source.x??0)+(L.target.x??0))/2).attr("y",L=>((L.source.y??0)+(L.target.y??0))/2),D.attr("transform",L=>`translate(${L.x??0},${L.y??0})`)});const V=new ResizeObserver(()=>{const L=j();C=L.width,b=L.height,x.attr("viewBox",`0 0 ${C} ${b}`);const W=X.force("center");W==null||W.x(C/2).y(b/2),X.force("x",_m(C/2).strength(.04)),X.force("y",wm(b/2).strength(.04)),X.alpha(.2).restart()});return V.observe(v),y(),()=>{V.disconnect(),X.on("tick",null),X.stop(),x.on(".zoom",null),x.on("click",null),x.selectAll("*").remove(),o.current=null,a.current=null,c.current=null,u.current=null,d.current=[],f.current=[],h.current=null}},[n,e,t]),S.useEffect(()=>{h.current?_(h.current):y()},[r.search,r.activeMemoryTypes,r.activeEntityKinds])}const tR="_page_12izf_6",nR="_sidebar_12izf_19",rR="_section_12izf_29",iR="_title_12izf_40",sR="_intro_12izf_46",oR="_heading_12izf_53",aR="_search_12izf_63",lR="_chips_12izf_69",cR="_chip_12izf_69",uR="_chipOn_12izf_101",dR="_legend_12izf_110",fR="_legendItem_12izf_118",hR="_swatch_12izf_126",pR="_swatchMem_12izf_132",mR="_swatchEntity_12izf_137",gR="_swatchRel_12izf_143",yR="_swatchLink_12izf_148",vR="_stats_12izf_156",xR="_statRow_12izf_162",_R="_canvasArea_12izf_183",wR="_canvasWrapper_12izf_191",SR="_svg_12izf_205",jR="_tooltip_12izf_262",NR="_tipLabel_12izf_279",kR="_tipTitle_12izf_285",CR="_tipMeta_12izf_291",bR="_overlay_12izf_298",TR="_detail_12izf_314",ER="_detailHead_12izf_321",PR="_detailType_12izf_327",AR="_close_12izf_334",LR="_detailBody_12izf_349",MR="_detailField_12izf_354",RR="_detailLabel_12izf_359",DR="_detailText_12izf_366",IR="_detailMuted_12izf_372",$R="_relList_12izf_377",FR="_tagRow_12izf_383",OR="_tag_12izf_383",H={page:tR,sidebar:nR,section:rR,title:iR,intro:sR,heading:oR,search:aR,chips:lR,chip:cR,chipOn:uR,legend:dR,legendItem:fR,swatch:hR,swatchMem:pR,swatchEntity:mR,swatchRel:gR,swatchLink:yR,stats:vR,statRow:xR,canvasArea:_R,canvasWrapper:wR,svg:SR,tooltip:jR,tipLabel:NR,tipTitle:kR,tipMeta:CR,overlay:bR,detail:TR,detailHead:ER,detailType:PR,close:AR,detailBody:LR,detailField:MR,detailLabel:RR,detailText:DR,detailMuted:IR,relList:$R,tagRow:FR,tag:OR},Nm=[{key:"episodic",label:"Episodic"},{key:"semantic",label:"Semantic"},{key:"procedural",label:"Procedural"},{key:"emotional",label:"Emotional"},{key:"spatial",label:"Spatial"},{key:"working",label:"Working"}],km=[{key:"person",label:"Person"},{key:"place",label:"Place"},{key:"object",label:"Object"},{key:"concept",label:"Concept"},{key:"organization",label:"Organization"}],VR=200;function zR(e){let t=null;for(const n of e??[])(!t||n.weight>t.weight)&&(t=n);return(t==null?void 0:t.type)??null}function xa(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function BR(){const e=S.useRef(null),t=S.useRef(null),[n,r]=S.useState(null),[i,s]=S.useState("loading"),[o,a]=S.useState(""),[c,u]=S.useState(""),[d,f]=S.useState(""),[h,g]=S.useState(()=>new Set(Nm.map(k=>k.key))),[w,y]=S.useState(()=>new Set(km.map(k=>k.key))),[_,p]=S.useState(null),[m,v]=S.useState(null);S.useEffect(()=>{let k=!1;return s("loading"),Gt.graph().then(I=>{k||(r(I),s("ready"))}).catch(I=>{k||(a(I instanceof Error?I.message:"Failed to load graph"),s("error"))}),()=>{k=!0}},[]),S.useEffect(()=>{const k=window.setTimeout(()=>f(c.trim().toLowerCase()),VR);return()=>window.clearTimeout(k)},[c]);const x=S.useMemo(()=>({search:d,activeMemoryTypes:h,activeEntityKinds:w}),[d,h,w]);eR({svgRef:e,wrapperRef:t,data:i==="ready"?n:null,filters:x,onSelect:p,onTooltip:v});const j=S.useMemo(()=>{if(!n)return{memories:0,entities:0,relationships:0};const k=n.nodes.filter(K=>K.type==="memory").length,I=n.nodes.filter(K=>K.type==="entity").length,R=Zd(n).length;return{memories:k,entities:I,relationships:R}},[n]),C=(k,I)=>{k(R=>{const K=new Set(R);return K.has(I)?K.delete(I):K.add(I),K})},b=i==="ready"&&(!n||n.nodes.length===0);return l.jsxs("div",{className:H.page,children:[l.jsxs("aside",{className:H.sidebar,children:[l.jsxs("div",{className:H.section,children:[l.jsx("h1",{className:H.title,children:"Memory Network"}),l.jsx("p",{className:H.intro,children:"How memories and entities connect. Click a node to inspect, drag to rearrange, scroll to zoom."})]}),l.jsx("div",{className:H.section,children:l.jsx("input",{className:`nrg-field ${H.search}`,type:"search",autoComplete:"off",placeholder:"Filter nodes…",value:c,onChange:k=>u(k.target.value),"aria-label":"Search nodes"})}),l.jsxs("div",{className:H.section,children:[l.jsx("span",{className:H.heading,children:"Memory type"}),l.jsx("div",{className:H.chips,children:Nm.map(k=>l.jsx("button",{type:"button",className:`${H.chip} ${h.has(k.key)?H.chipOn:""}`,onClick:()=>C(g,k.key),children:k.label},k.key))})]}),l.jsxs("div",{className:H.section,children:[l.jsx("span",{className:H.heading,children:"Entity kind"}),l.jsx("div",{className:H.chips,children:km.map(k=>l.jsx("button",{type:"button",className:`${H.chip} ${w.has(k.key)?H.chipOn:""}`,onClick:()=>C(y,k.key),children:k.label},k.key))})]}),l.jsxs("div",{className:H.section,children:[l.jsx("span",{className:H.heading,children:"Legend"}),l.jsxs("ul",{className:H.legend,children:[l.jsxs("li",{className:H.legendItem,children:[l.jsx("span",{className:`${H.swatch} ${H.swatchMem}`}),"Memory — filled circle, brightness ∝ salience"]}),l.jsxs("li",{className:H.legendItem,children:[l.jsx("span",{className:`${H.swatch} ${H.swatchEntity}`}),"Entity — hollow hexagon"]}),l.jsxs("li",{className:H.legendItem,children:[l.jsx("span",{className:`${H.swatch} ${H.swatchRel}`}),"Relationship — solid edge, directed"]}),l.jsxs("li",{className:H.legendItem,children:[l.jsx("span",{className:`${H.swatch} ${H.swatchLink}`}),"Mention — dashed memory↔entity edge"]})]})]}),l.jsxs("div",{className:H.section,children:[l.jsx("span",{className:H.heading,children:"Stats"}),l.jsxs("dl",{className:H.stats,children:[l.jsxs("div",{className:H.statRow,children:[l.jsx("dt",{children:"Memories"}),l.jsx("dd",{children:j.memories})]}),l.jsxs("div",{className:H.statRow,children:[l.jsx("dt",{children:"Entities"}),l.jsx("dd",{children:j.entities})]}),l.jsxs("div",{className:H.statRow,children:[l.jsx("dt",{children:"Connections"}),l.jsx("dd",{children:j.relationships})]})]})]})]}),l.jsxs("section",{className:H.canvasArea,children:[l.jsxs("div",{className:H.canvasWrapper,ref:t,children:[l.jsx("svg",{ref:e,className:H.svg}),m?l.jsx("div",{className:H.tooltip,style:{transform:`translate(${m.x+14}px, ${m.y+14}px)`},role:"tooltip",children:l.jsx(UR,{node:m.node})}):null,i==="loading"?l.jsx("div",{className:H.overlay,children:"Loading network…"}):null,i==="error"?l.jsx("div",{className:H.overlay,children:o}):null,b?l.jsx("div",{className:H.overlay,children:"No memories recorded yet. Add a memory in the atlas to see the graph."}):null]}),_?l.jsx(HR,{node:_,data:n,onClose:()=>p(null)}):null]})]})}function UR({node:e}){if(e.type==="memory"){const t=zR(e.types);return l.jsxs(l.Fragment,{children:[l.jsx("span",{className:H.tipLabel,children:"Memory"}),l.jsx("span",{className:H.tipTitle,children:e.label}),l.jsxs("span",{className:H.tipMeta,children:[t?xa(t):"Unclassified"," · salience"," ",(e.salience??0).toFixed(2)]})]})}return l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:H.tipLabel,children:["Entity / ",xa(e.kind??"")]}),l.jsx("span",{className:H.tipTitle,children:e.label}),l.jsxs("span",{className:H.tipMeta,children:[e.memoryCount??0," linked memories"]})]})}function HR({node:e,data:t,onClose:n}){const r=Zd(t);if(e.type==="memory"){const o=(e.types??[]).slice().sort((a,c)=>c.weight-a.weight).map(a=>a.type);return l.jsxs("div",{className:H.detail,"aria-live":"polite",children:[l.jsxs("div",{className:H.detailHead,children:[l.jsx("span",{className:H.detailType,children:"Memory"}),l.jsx("button",{type:"button",className:H.close,onClick:n,children:"Close"})]}),l.jsxs("div",{className:H.detailBody,children:[l.jsx(_r,{label:"Raw text",children:l.jsx("p",{className:H.detailText,children:e.text??e.label})}),o.length?l.jsx(_r,{label:"Types",children:l.jsx("div",{className:H.tagRow,children:o.map(a=>l.jsx("span",{className:H.tag,children:xa(a)},a))})}):null,l.jsx(_r,{label:"Source",children:l.jsx("p",{className:H.detailText,children:e.source==="mcp"?"Agent":"User"})}),l.jsx(_r,{label:"Salience",children:l.jsx("p",{className:H.detailText,children:(e.salience??0).toFixed(2)})})]})]})}const i=r.filter(o=>{const a=typeof o.source=="object"?o.source.id:o.source,c=typeof o.target=="object"?o.target.id:o.target;return(a===e.id||c===e.id)&&o.type==="memory-entity"}).map(o=>{const a=typeof o.source=="object"?o.source.id:o.source,c=a===e.id?typeof o.target=="object"?o.target.id:o.target:a;return t==null?void 0:t.nodes.find(u=>u.id===c)}).filter(o=>!!o),s=r.filter(o=>{const a=typeof o.source=="object"?o.source.id:o.source,c=typeof o.target=="object"?o.target.id:o.target;return(a===e.id||c===e.id)&&o.type==="relationship"});return l.jsxs("div",{className:H.detail,"aria-live":"polite",children:[l.jsxs("div",{className:H.detailHead,children:[l.jsxs("span",{className:H.detailType,children:["Entity / ",xa(e.kind??"")]}),l.jsx("button",{type:"button",className:H.close,onClick:n,children:"Close"})]}),l.jsxs("div",{className:H.detailBody,children:[l.jsx(_r,{label:`Linked memories (${i.length})`,children:i.length?l.jsx("div",{className:H.tagRow,children:i.map(o=>l.jsx("span",{className:H.tag,children:o.label.length>30?`${o.label.slice(0,29)}…`:o.label},o.id))}):l.jsx("p",{className:H.detailMuted,children:"None"})}),s.length?l.jsx(_r,{label:"Relationships",children:l.jsx("div",{className:H.relList,children:s.map((o,a)=>l.jsx("p",{className:H.detailText,children:o.label??o.predicate},a))})}):null]})]})}function _r({label:e,children:t}){return l.jsxs("div",{className:H.detailField,children:[l.jsx("span",{className:H.detailLabel,children:e}),t]})}function WR(){return l.jsxs(Kw,{children:[l.jsx(It,{path:"/",element:l.jsx(zp,{})}),l.jsx(It,{path:"/landing",element:l.jsx(zp,{})}),l.jsx(It,{path:"/how-it-works",element:l.jsx(YT,{})}),l.jsxs(It,{element:l.jsx(Wk,{}),children:[l.jsx(It,{path:"/atlas",element:l.jsx(eE,{})}),l.jsx(It,{path:"/memories",element:l.jsx(Gp,{view:"memories"})}),l.jsx(It,{path:"/entities",element:l.jsx(Gp,{view:"entities"})}),l.jsx(It,{path:"/memories/compare",element:l.jsx(VA,{})}),l.jsx(It,{path:"/graph",element:l.jsx(BR,{})})]})]})}Fy(document.getElementById("root")).render(l.jsx(nS,{children:l.jsx(yS,{reducedMotion:"user",children:l.jsx(WR,{})})}));
|