openclaw-memory-mapper 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,406 @@
1
+ function CS(t,i){for(var l=0;l<i.length;l++){const r=i[l];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const c=Object.getOwnPropertyDescriptor(r,s);c&&Object.defineProperty(t,s,c.get?c:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function l(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(s){if(s.ep)return;s.ep=!0;const c=l(s);fetch(s.href,c)}})();function ph(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var pd={exports:{}},Lr={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Yg;function TS(){if(Yg)return Lr;Yg=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function l(r,s,c){var u=null;if(c!==void 0&&(u=""+c),s.key!==void 0&&(u=""+s.key),"key"in s){c={};for(var h in s)h!=="key"&&(c[h]=s[h])}else c=s;return s=c.ref,{$$typeof:t,type:r,key:u,ref:s!==void 0?s:null,props:c}}return Lr.Fragment=i,Lr.jsx=l,Lr.jsxs=l,Lr}var qg;function MS(){return qg||(qg=1,pd.exports=TS()),pd.exports}var d=MS(),gd={exports:{}},je={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Xg;function zS(){if(Xg)return je;Xg=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),v=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function j(O,V,W){this.props=O,this.context=V,this.refs=E,this.updater=W||S}j.prototype.isReactComponent={},j.prototype.setState=function(O,V){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,V,"setState")},j.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function R(){}R.prototype=j.prototype;function N(O,V,W){this.props=O,this.context=V,this.refs=E,this.updater=W||S}var A=N.prototype=new R;A.constructor=N,_(A,j.prototype),A.isPureReactComponent=!0;var z=Array.isArray;function k(){}var L={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function K(O,V,W){var ne=W.ref;return{$$typeof:t,type:O,key:V,ref:ne!==void 0?ne:null,props:W}}function ie(O,V){return K(O.type,V,O.props)}function G(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function Q(O){var V={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(W){return V[W]})}var te=/\/+/g;function D(O,V){return typeof O=="object"&&O!==null&&O.key!=null?Q(""+O.key):V.toString(36)}function Z(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(k,k):(O.status="pending",O.then(function(V){O.status==="pending"&&(O.status="fulfilled",O.value=V)},function(V){O.status==="pending"&&(O.status="rejected",O.reason=V)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function M(O,V,W,ne,oe){var se=typeof O;(se==="undefined"||se==="boolean")&&(O=null);var fe=!1;if(O===null)fe=!0;else switch(se){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(O.$$typeof){case t:case i:fe=!0;break;case y:return fe=O._init,M(fe(O._payload),V,W,ne,oe)}}if(fe)return oe=oe(O),fe=ne===""?"."+D(O,0):ne,z(oe)?(W="",fe!=null&&(W=fe.replace(te,"$&/")+"/"),M(oe,V,W,"",function(Ee){return Ee})):oe!=null&&(G(oe)&&(oe=ie(oe,W+(oe.key==null||O&&O.key===oe.key?"":(""+oe.key).replace(te,"$&/")+"/")+fe)),V.push(oe)),1;fe=0;var ce=ne===""?".":ne+":";if(z(O))for(var ue=0;ue<O.length;ue++)ne=O[ue],se=ce+D(ne,ue),fe+=M(ne,V,W,se,oe);else if(ue=w(O),typeof ue=="function")for(O=ue.call(O),ue=0;!(ne=O.next()).done;)ne=ne.value,se=ce+D(ne,ue++),fe+=M(ne,V,W,se,oe);else if(se==="object"){if(typeof O.then=="function")return M(Z(O),V,W,ne,oe);throw V=String(O),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return fe}function H(O,V,W){if(O==null)return O;var ne=[],oe=0;return M(O,ne,"","",function(se){return V.call(W,se,oe++)}),ne}function B(O){if(O._status===-1){var V=O._result;V=V(),V.then(function(W){(O._status===0||O._status===-1)&&(O._status=1,O._result=W)},function(W){(O._status===0||O._status===-1)&&(O._status=2,O._result=W)}),O._status===-1&&(O._status=0,O._result=V)}if(O._status===1)return O._result.default;throw O._result}var Y=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},q={map:H,forEach:function(O,V,W){H(O,function(){V.apply(this,arguments)},W)},count:function(O){var V=0;return H(O,function(){V++}),V},toArray:function(O){return H(O,function(V){return V})||[]},only:function(O){if(!G(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return je.Activity=x,je.Children=q,je.Component=j,je.Fragment=l,je.Profiler=s,je.PureComponent=N,je.StrictMode=r,je.Suspense=g,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,je.__COMPILER_RUNTIME={__proto__:null,c:function(O){return L.H.useMemoCache(O)}},je.cache=function(O){return function(){return O.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(O,V,W){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ne=_({},O.props),oe=O.key;if(V!=null)for(se in V.key!==void 0&&(oe=""+V.key),V)!U.call(V,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&V.ref===void 0||(ne[se]=V[se]);var se=arguments.length-2;if(se===1)ne.children=W;else if(1<se){for(var fe=Array(se),ce=0;ce<se;ce++)fe[ce]=arguments[ce+2];ne.children=fe}return K(O.type,oe,ne)},je.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:c,_context:O},O},je.createElement=function(O,V,W){var ne,oe={},se=null;if(V!=null)for(ne in V.key!==void 0&&(se=""+V.key),V)U.call(V,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(oe[ne]=V[ne]);var fe=arguments.length-2;if(fe===1)oe.children=W;else if(1<fe){for(var ce=Array(fe),ue=0;ue<fe;ue++)ce[ue]=arguments[ue+2];oe.children=ce}if(O&&O.defaultProps)for(ne in fe=O.defaultProps,fe)oe[ne]===void 0&&(oe[ne]=fe[ne]);return K(O,se,oe)},je.createRef=function(){return{current:null}},je.forwardRef=function(O){return{$$typeof:h,render:O}},je.isValidElement=G,je.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:B}},je.memo=function(O,V){return{$$typeof:p,type:O,compare:V===void 0?null:V}},je.startTransition=function(O){var V=L.T,W={};L.T=W;try{var ne=O(),oe=L.S;oe!==null&&oe(W,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(k,Y)}catch(se){Y(se)}finally{V!==null&&W.types!==null&&(V.types=W.types),L.T=V}},je.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},je.use=function(O){return L.H.use(O)},je.useActionState=function(O,V,W){return L.H.useActionState(O,V,W)},je.useCallback=function(O,V){return L.H.useCallback(O,V)},je.useContext=function(O){return L.H.useContext(O)},je.useDebugValue=function(){},je.useDeferredValue=function(O,V){return L.H.useDeferredValue(O,V)},je.useEffect=function(O,V){return L.H.useEffect(O,V)},je.useEffectEvent=function(O){return L.H.useEffectEvent(O)},je.useId=function(){return L.H.useId()},je.useImperativeHandle=function(O,V,W){return L.H.useImperativeHandle(O,V,W)},je.useInsertionEffect=function(O,V){return L.H.useInsertionEffect(O,V)},je.useLayoutEffect=function(O,V){return L.H.useLayoutEffect(O,V)},je.useMemo=function(O,V){return L.H.useMemo(O,V)},je.useOptimistic=function(O,V){return L.H.useOptimistic(O,V)},je.useReducer=function(O,V,W){return L.H.useReducer(O,V,W)},je.useRef=function(O){return L.H.useRef(O)},je.useState=function(O){return L.H.useState(O)},je.useSyncExternalStore=function(O,V,W){return L.H.useSyncExternalStore(O,V,W)},je.useTransition=function(){return L.H.useTransition()},je.version="19.2.4",je}var Gg;function io(){return Gg||(Gg=1,gd.exports=zS()),gd.exports}var C=io();const Xt=ph(C),Vy=CS({__proto__:null,default:Xt},[C]);var xd={exports:{}},Hr={},yd={exports:{}},vd={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Zg;function OS(){return Zg||(Zg=1,(function(t){function i(M,H){var B=M.length;M.push(H);e:for(;0<B;){var Y=B-1>>>1,q=M[Y];if(0<s(q,H))M[Y]=H,M[B]=q,B=Y;else break e}}function l(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var H=M[0],B=M.pop();if(B!==H){M[0]=B;e:for(var Y=0,q=M.length,O=q>>>1;Y<O;){var V=2*(Y+1)-1,W=M[V],ne=V+1,oe=M[ne];if(0>s(W,B))ne<q&&0>s(oe,W)?(M[Y]=oe,M[ne]=B,Y=ne):(M[Y]=W,M[V]=B,Y=V);else if(ne<q&&0>s(oe,B))M[Y]=oe,M[ne]=B,Y=ne;else break e}}return H}function s(M,H){var B=M.sortIndex-H.sortIndex;return B!==0?B:M.id-H.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,h=u.now();t.unstable_now=function(){return u.now()-h}}var g=[],p=[],y=1,x=null,v=3,w=!1,S=!1,_=!1,E=!1,j=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function A(M){for(var H=l(p);H!==null;){if(H.callback===null)r(p);else if(H.startTime<=M)r(p),H.sortIndex=H.expirationTime,i(g,H);else break;H=l(p)}}function z(M){if(_=!1,A(M),!S)if(l(g)!==null)S=!0,k||(k=!0,Q());else{var H=l(p);H!==null&&Z(z,H.startTime-M)}}var k=!1,L=-1,U=5,K=-1;function ie(){return E?!0:!(t.unstable_now()-K<U)}function G(){if(E=!1,k){var M=t.unstable_now();K=M;var H=!0;try{e:{S=!1,_&&(_=!1,R(L),L=-1),w=!0;var B=v;try{t:{for(A(M),x=l(g);x!==null&&!(x.expirationTime>M&&ie());){var Y=x.callback;if(typeof Y=="function"){x.callback=null,v=x.priorityLevel;var q=Y(x.expirationTime<=M);if(M=t.unstable_now(),typeof q=="function"){x.callback=q,A(M),H=!0;break t}x===l(g)&&r(g),A(M)}else r(g);x=l(g)}if(x!==null)H=!0;else{var O=l(p);O!==null&&Z(z,O.startTime-M),H=!1}}break e}finally{x=null,v=B,w=!1}H=void 0}}finally{H?Q():k=!1}}}var Q;if(typeof N=="function")Q=function(){N(G)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,D=te.port2;te.port1.onmessage=G,Q=function(){D.postMessage(null)}}else Q=function(){j(G,0)};function Z(M,H){L=j(function(){M(t.unstable_now())},H)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(M){M.callback=null},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(M){switch(v){case 1:case 2:case 3:var H=3;break;default:H=v}var B=v;v=H;try{return M()}finally{v=B}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(M,H){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var B=v;v=M;try{return H()}finally{v=B}},t.unstable_scheduleCallback=function(M,H,B){var Y=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?Y+B:Y):B=Y,M){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=B+q,M={id:y++,callback:H,priorityLevel:M,startTime:B,expirationTime:q,sortIndex:-1},B>Y?(M.sortIndex=B,i(p,M),l(g)===null&&M===l(p)&&(_?(R(L),L=-1):_=!0,Z(z,B-Y))):(M.sortIndex=q,i(g,M),S||w||(S=!0,k||(k=!0,Q()))),M},t.unstable_shouldYield=ie,t.unstable_wrapCallback=function(M){var H=v;return function(){var B=v;v=H;try{return M.apply(this,arguments)}finally{v=B}}}})(vd)),vd}var Qg;function RS(){return Qg||(Qg=1,yd.exports=OS()),yd.exports}var bd={exports:{}},St={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Kg;function kS(){if(Kg)return St;Kg=1;var t=io();function i(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var r={d:{f:l,r:function(){throw Error(i(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(g,p,y){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:""+x,children:g,containerInfo:p,implementation:y}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return St.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,St.createPortal=function(g,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return c(g,p,null,y)},St.flushSync=function(g){var p=u.T,y=r.p;try{if(u.T=null,r.p=2,g)return g()}finally{u.T=p,r.p=y,r.d.f()}},St.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(g,p))},St.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},St.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var y=p.as,x=h(y,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,w=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?r.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:x,integrity:v,fetchPriority:w}):y==="script"&&r.d.X(g,{crossOrigin:x,integrity:v,fetchPriority:w,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},St.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=h(p.as,p.crossOrigin);r.d.M(g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(g)},St.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,x=h(y,p.crossOrigin);r.d.L(g,y,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},St.preloadModule=function(g,p){if(typeof g=="string")if(p){var y=h(p.as,p.crossOrigin);r.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(g)},St.requestFormReset=function(g){r.d.r(g)},St.unstable_batchedUpdates=function(g,p){return g(p)},St.useFormState=function(g,p,y){return u.H.useFormState(g,p,y)},St.useFormStatus=function(){return u.H.useHostTransitionStatus()},St.version="19.2.4",St}var Fg;function $y(){if(Fg)return bd.exports;Fg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),bd.exports=kS(),bd.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Pg;function DS(){if(Pg)return Hr;Pg=1;var t=RS(),i=io(),l=$y();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function u(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function g(e){if(c(e)!==e)throw Error(r(188))}function p(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,o=n;;){var f=a.return;if(f===null)break;var m=f.alternate;if(m===null){if(o=f.return,o!==null){a=o;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===a)return g(f),e;if(m===o)return g(f),n;m=m.sibling}throw Error(r(188))}if(a.return!==o.return)a=f,o=m;else{for(var b=!1,T=f.child;T;){if(T===a){b=!0,a=f,o=m;break}if(T===o){b=!0,o=f,a=m;break}T=T.sibling}if(!b){for(T=m.child;T;){if(T===a){b=!0,a=m,o=f;break}if(T===o){b=!0,o=m,a=f;break}T=T.sibling}if(!b)throw Error(r(189))}}if(a.alternate!==o)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}var x=Object.assign,v=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),N=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function Q(e){return e===null||typeof e!="object"?null:(e=G&&e[G]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function D(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case j:return"Profiler";case E:return"StrictMode";case z:return"Suspense";case k:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case N:return e.displayName||"Context";case R:return(e._context.displayName||"Context")+".Consumer";case A:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case L:return n=e.displayName||null,n!==null?n:D(e.type)||"Memo";case U:n=e._payload,e=e._init;try{return D(e(n))}catch{}}return null}var Z=Array.isArray,M=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},Y=[],q=-1;function O(e){return{current:e}}function V(e){0>q||(e.current=Y[q],Y[q]=null,q--)}function W(e,n){q++,Y[q]=e.current,e.current=n}var ne=O(null),oe=O(null),se=O(null),fe=O(null);function ce(e,n){switch(W(se,n),W(oe,e),W(ne,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?fg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=fg(n),e=dg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(ne),W(ne,e)}function ue(){V(ne),V(oe),V(se)}function Ee(e){e.memoizedState!==null&&W(fe,e);var n=ne.current,a=dg(n,e.type);n!==a&&(W(oe,e),W(ne,a))}function ve(e){oe.current===e&&(V(ne),V(oe)),fe.current===e&&(V(fe),Or._currentValue=B)}var xe,me;function _e(e){if(xe===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);xe=n&&n[1]||"",me=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+xe+e+me}var Ue=!1;function Me(e,n){if(!e||Ue)return"";Ue=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(ee){var J=ee}Reflect.construct(e,[],re)}else{try{re.call()}catch(ee){J=ee}e.call(re.prototype)}}else{try{throw Error()}catch(ee){J=ee}(re=e())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(ee){if(ee&&J&&typeof ee.stack=="string")return[ee.stack,J.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=o.DetermineComponentFrameRoot(),b=m[0],T=m[1];if(b&&T){var $=b.split(`
44
+ `),I=T.split(`
45
+ `);for(f=o=0;o<$.length&&!$[o].includes("DetermineComponentFrameRoot");)o++;for(;f<I.length&&!I[f].includes("DetermineComponentFrameRoot");)f++;if(o===$.length||f===I.length)for(o=$.length-1,f=I.length-1;1<=o&&0<=f&&$[o]!==I[f];)f--;for(;1<=o&&0<=f;o--,f--)if($[o]!==I[f]){if(o!==1||f!==1)do if(o--,f--,0>f||$[o]!==I[f]){var ae=`
46
+ `+$[o].replace(" at new "," at ");return e.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",e.displayName)),ae}while(1<=o&&0<=f);break}}}finally{Ue=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?_e(a):""}function nt(e,n){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e("Lazy");case 13:return e.child!==n&&n!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return _e("Activity");default:return""}}function Lt(e){try{var n="",a=null;do n+=nt(e,a),a=e,e=e.return;while(e);return n}catch(o){return`
47
+ Error generating stack: `+o.message+`
48
+ `+o.stack}}var ht=Object.prototype.hasOwnProperty,ln=t.unstable_scheduleCallback,Dn=t.unstable_cancelCallback,ea=t.unstable_shouldYield,ta=t.unstable_requestPaint,pt=t.unstable_now,Ha=t.unstable_getCurrentPriorityLevel,Ln=t.unstable_ImmediatePriority,di=t.unstable_UserBlockingPriority,na=t.unstable_NormalPriority,Ic=t.unstable_LowPriority,Ba=t.unstable_IdlePriority,Jc=t.log,Wc=t.unstable_setDisableYieldValue,ia=null,Nt=null;function vn(e){if(typeof Jc=="function"&&Wc(e),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(ia,e)}catch{}}var Et=Math.clz32?Math.clz32:nu,eu=Math.log,tu=Math.LN2;function nu(e){return e>>>=0,e===0?32:31-(eu(e)/tu|0)|0}var Ua=256,Va=262144,$a=4194304;function Hn(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ya(e,n,a){var o=e.pendingLanes;if(o===0)return 0;var f=0,m=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var T=o&134217727;return T!==0?(o=T&~m,o!==0?f=Hn(o):(b&=T,b!==0?f=Hn(b):a||(a=T&~e,a!==0&&(f=Hn(a))))):(T=o&~m,T!==0?f=Hn(T):b!==0?f=Hn(b):a||(a=o&~e,a!==0&&(f=Hn(a)))),f===0?0:n!==0&&n!==f&&(n&m)===0&&(m=f&-f,a=n&-n,m>=a||m===32&&(a&4194048)!==0)?n:f}function aa(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function iu(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function po(){var e=$a;return $a<<=1,($a&62914560)===0&&($a=4194304),e}function ql(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function la(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function au(e,n,a,o,f,m){var b=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var T=e.entanglements,$=e.expirationTimes,I=e.hiddenUpdates;for(a=b&~a;0<a;){var ae=31-Et(a),re=1<<ae;T[ae]=0,$[ae]=-1;var J=I[ae];if(J!==null)for(I[ae]=null,ae=0;ae<J.length;ae++){var ee=J[ae];ee!==null&&(ee.lane&=-536870913)}a&=~re}o!==0&&go(e,o,0),m!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=m&~(b&~n))}function go(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-Et(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|a&261930}function xo(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var o=31-Et(a),f=1<<o;f&n|e[o]&n&&(e[o]|=n),a&=~f}}function yo(e,n){var a=n&-n;return a=(a&42)!==0?1:Xl(a),(a&(e.suspendedLanes|n))!==0?0:a}function Xl(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Gl(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vo(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:Dg(e.type))}function bo(e,n){var a=H.p;try{return H.p=e,n()}finally{H.p=a}}var bn=Math.random().toString(36).slice(2),ct="__reactFiber$"+bn,wt="__reactProps$"+bn,Bn="__reactContainer$"+bn,qa="__reactEvents$"+bn,wo="__reactListeners$"+bn,lu="__reactHandles$"+bn,So="__reactResources$"+bn,ra="__reactMarker$"+bn;function Zl(e){delete e[ct],delete e[wt],delete e[qa],delete e[wo],delete e[lu]}function hi(e){var n=e[ct];if(n)return n;for(var a=e.parentNode;a;){if(n=a[Bn]||a[ct]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=vg(e);e!==null;){if(a=e[ct])return a;e=vg(e)}return n}e=a,a=e.parentNode}return null}function mi(e){if(e=e[ct]||e[Bn]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function pi(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function gi(e){var n=e[So];return n||(n=e[So]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function it(e){e[ra]=!0}var No=new Set,Eo={};function Un(e,n){xi(e,n),xi(e+"Capture",n)}function xi(e,n){for(Eo[e]=n,e=0;e<n.length;e++)No.add(n[e])}var ru=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ql={},_o={};function ou(e){return ht.call(_o,e)?!0:ht.call(Ql,e)?!1:ru.test(e)?_o[e]=!0:(Ql[e]=!0,!1)}function Xa(e,n,a){if(ou(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Ga(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function rn(e,n,a,o){if(o===null)e.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+o)}}function jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jo(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function su(e,n,a){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,m=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(b){a=""+b,m.call(this,b)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function yi(e){if(!e._valueTracker){var n=jo(e)?"checked":"value";e._valueTracker=su(e,n,""+e[n])}}function Ao(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),o="";return e&&(o=jo(e)?e.checked?"true":"false":e.value),e=o,e!==a?(n.setValue(e),!0):!1}function oa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var cu=/[\n"\\]/g;function At(e){return e.replace(cu,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function sa(e,n,a,o,f,m,b,T){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+jt(n)):e.value!==""+jt(n)&&(e.value=""+jt(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?Kl(e,b,jt(n)):a!=null?Kl(e,b,jt(a)):o!=null&&e.removeAttribute("value"),f==null&&m!=null&&(e.defaultChecked=!!m),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+jt(T):e.removeAttribute("name")}function Co(e,n,a,o,f,m,b,T){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.type=m),n!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||n!=null)){yi(e);return}a=a!=null?""+jt(a):"",n=n!=null?""+jt(n):a,T||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=T?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),yi(e)}function Kl(e,n,a){n==="number"&&oa(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Vn(e,n,a,o){if(e=e.options,n){n={};for(var f=0;f<a.length;f++)n["$"+a[f]]=!0;for(a=0;a<e.length;a++)f=n.hasOwnProperty("$"+e[a].value),e[a].selected!==f&&(e[a].selected=f),f&&o&&(e[a].defaultSelected=!0)}else{for(a=""+jt(a),n=null,f=0;f<e.length;f++){if(e[f].value===a){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function rm(e,n,a){if(n!=null&&(n=""+jt(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+jt(a):""}function om(e,n,a,o){if(n==null){if(o!=null){if(a!=null)throw Error(r(92));if(Z(o)){if(1<o.length)throw Error(r(93));o=o[0]}a=o}a==null&&(a=""),n=a}a=jt(n),e.defaultValue=a,o=e.textContent,o===a&&o!==""&&o!==null&&(e.value=o),yi(e)}function Za(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var N2=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function sm(e,n,a){var o=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,a):typeof a!="number"||a===0||N2.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function cm(e,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in n)o=n[f],n.hasOwnProperty(f)&&a[f]!==o&&sm(e,f,o)}else for(var m in n)n.hasOwnProperty(m)&&sm(e,m,n[m])}function uu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var E2=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),_2=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function To(e){return _2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $n(){}var fu=null;function du(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qa=null,Ka=null;function um(e){var n=mi(e);if(n&&(e=n.stateNode)){var a=e[wt]||null;e:switch(e=n.stateNode,n.type){case"input":if(sa(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+At(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var o=a[n];if(o!==e&&o.form===e.form){var f=o[wt]||null;if(!f)throw Error(r(90));sa(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<a.length;n++)o=a[n],o.form===e.form&&Ao(o)}break e;case"textarea":rm(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Vn(e,!!a.multiple,n,!1)}}}var hu=!1;function fm(e,n,a){if(hu)return e(n,a);hu=!0;try{var o=e(n);return o}finally{if(hu=!1,(Qa!==null||Ka!==null)&&(gs(),Qa&&(n=Qa,e=Ka,Ka=Qa=null,um(n),e)))for(n=0;n<e.length;n++)um(e[n])}}function Fl(e,n){var a=e.stateNode;if(a===null)return null;var o=a[wt]||null;if(o===null)return null;a=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mu=!1;if(Yn)try{var Pl={};Object.defineProperty(Pl,"passive",{get:function(){mu=!0}}),window.addEventListener("test",Pl,Pl),window.removeEventListener("test",Pl,Pl)}catch{mu=!1}var vi=null,pu=null,Mo=null;function dm(){if(Mo)return Mo;var e,n=pu,a=n.length,o,f="value"in vi?vi.value:vi.textContent,m=f.length;for(e=0;e<a&&n[e]===f[e];e++);var b=a-e;for(o=1;o<=b&&n[a-o]===f[m-o];o++);return Mo=f.slice(e,1<o?1-o:void 0)}function zo(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Oo(){return!0}function hm(){return!1}function Ct(e){function n(a,o,f,m,b){this._reactName=a,this._targetInst=f,this.type=o,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(a=e[T],this[T]=a?a(m):m[T]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Oo:hm,this.isPropagationStopped=hm,this}return x(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Oo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Oo)},persist:function(){},isPersistent:Oo}),n}var ca={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ro=Ct(ca),Il=x({},ca,{view:0,detail:0}),j2=Ct(Il),gu,xu,Jl,ko=x({},Il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vu,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!==Jl&&(Jl&&e.type==="mousemove"?(gu=e.screenX-Jl.screenX,xu=e.screenY-Jl.screenY):xu=gu=0,Jl=e),gu)},movementY:function(e){return"movementY"in e?e.movementY:xu}}),mm=Ct(ko),A2=x({},ko,{dataTransfer:0}),C2=Ct(A2),T2=x({},Il,{relatedTarget:0}),yu=Ct(T2),M2=x({},ca,{animationName:0,elapsedTime:0,pseudoElement:0}),z2=Ct(M2),O2=x({},ca,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),R2=Ct(O2),k2=x({},ca,{data:0}),pm=Ct(k2),D2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},L2={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"},H2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B2(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=H2[e])?!!n[e]:!1}function vu(){return B2}var U2=x({},Il,{key:function(e){if(e.key){var n=D2[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=zo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?L2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vu,charCode:function(e){return e.type==="keypress"?zo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),V2=Ct(U2),$2=x({},ko,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gm=Ct($2),Y2=x({},Il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vu}),q2=Ct(Y2),X2=x({},ca,{propertyName:0,elapsedTime:0,pseudoElement:0}),G2=Ct(X2),Z2=x({},ko,{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}),Q2=Ct(Z2),K2=x({},ca,{newState:0,oldState:0}),F2=Ct(K2),P2=[9,13,27,32],bu=Yn&&"CompositionEvent"in window,Wl=null;Yn&&"documentMode"in document&&(Wl=document.documentMode);var I2=Yn&&"TextEvent"in window&&!Wl,xm=Yn&&(!bu||Wl&&8<Wl&&11>=Wl),ym=" ",vm=!1;function bm(e,n){switch(e){case"keyup":return P2.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fa=!1;function J2(e,n){switch(e){case"compositionend":return wm(n);case"keypress":return n.which!==32?null:(vm=!0,ym);case"textInput":return e=n.data,e===ym&&vm?null:e;default:return null}}function W2(e,n){if(Fa)return e==="compositionend"||!bu&&bm(e,n)?(e=dm(),Mo=pu=vi=null,Fa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return xm&&n.locale!=="ko"?null:n.data;default:return null}}var ew={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 Sm(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!ew[e.type]:n==="textarea"}function Nm(e,n,a,o){Qa?Ka?Ka.push(o):Ka=[o]:Qa=o,n=Ns(n,"onChange"),0<n.length&&(a=new Ro("onChange","change",null,a,o),e.push({event:a,listeners:n}))}var er=null,tr=null;function tw(e){lg(e,0)}function Do(e){var n=pi(e);if(Ao(n))return e}function Em(e,n){if(e==="change")return n}var _m=!1;if(Yn){var wu;if(Yn){var Su="oninput"in document;if(!Su){var jm=document.createElement("div");jm.setAttribute("oninput","return;"),Su=typeof jm.oninput=="function"}wu=Su}else wu=!1;_m=wu&&(!document.documentMode||9<document.documentMode)}function Am(){er&&(er.detachEvent("onpropertychange",Cm),tr=er=null)}function Cm(e){if(e.propertyName==="value"&&Do(tr)){var n=[];Nm(n,tr,e,du(e)),fm(tw,n)}}function nw(e,n,a){e==="focusin"?(Am(),er=n,tr=a,er.attachEvent("onpropertychange",Cm)):e==="focusout"&&Am()}function iw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Do(tr)}function aw(e,n){if(e==="click")return Do(n)}function lw(e,n){if(e==="input"||e==="change")return Do(n)}function rw(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Ht=typeof Object.is=="function"?Object.is:rw;function nr(e,n){if(Ht(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),o=Object.keys(n);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var f=a[o];if(!ht.call(n,f)||!Ht(e[f],n[f]))return!1}return!0}function Tm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mm(e,n){var a=Tm(e);e=0;for(var o;a;){if(a.nodeType===3){if(o=e+a.textContent.length,e<=n&&o>=n)return{node:a,offset:n-e};e=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Tm(a)}}function zm(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?zm(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Om(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=oa(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=oa(e.document)}return n}function Nu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var ow=Yn&&"documentMode"in document&&11>=document.documentMode,Pa=null,Eu=null,ir=null,_u=!1;function Rm(e,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;_u||Pa==null||Pa!==oa(o)||(o=Pa,"selectionStart"in o&&Nu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ir&&nr(ir,o)||(ir=o,o=Ns(Eu,"onSelect"),0<o.length&&(n=new Ro("onSelect","select",null,n,a),e.push({event:n,listeners:o}),n.target=Pa)))}function ua(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Ia={animationend:ua("Animation","AnimationEnd"),animationiteration:ua("Animation","AnimationIteration"),animationstart:ua("Animation","AnimationStart"),transitionrun:ua("Transition","TransitionRun"),transitionstart:ua("Transition","TransitionStart"),transitioncancel:ua("Transition","TransitionCancel"),transitionend:ua("Transition","TransitionEnd")},ju={},km={};Yn&&(km=document.createElement("div").style,"AnimationEvent"in window||(delete Ia.animationend.animation,delete Ia.animationiteration.animation,delete Ia.animationstart.animation),"TransitionEvent"in window||delete Ia.transitionend.transition);function fa(e){if(ju[e])return ju[e];if(!Ia[e])return e;var n=Ia[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in km)return ju[e]=n[a];return e}var Dm=fa("animationend"),Lm=fa("animationiteration"),Hm=fa("animationstart"),sw=fa("transitionrun"),cw=fa("transitionstart"),uw=fa("transitioncancel"),Bm=fa("transitionend"),Um=new Map,Au="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Au.push("scrollEnd");function on(e,n){Um.set(e,n),Un(n,[e])}var Lo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ft=[],Ja=0,Cu=0;function Ho(){for(var e=Ja,n=Cu=Ja=0;n<e;){var a=Ft[n];Ft[n++]=null;var o=Ft[n];Ft[n++]=null;var f=Ft[n];Ft[n++]=null;var m=Ft[n];if(Ft[n++]=null,o!==null&&f!==null){var b=o.pending;b===null?f.next=f:(f.next=b.next,b.next=f),o.pending=f}m!==0&&Vm(a,f,m)}}function Bo(e,n,a,o){Ft[Ja++]=e,Ft[Ja++]=n,Ft[Ja++]=a,Ft[Ja++]=o,Cu|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Tu(e,n,a,o){return Bo(e,n,a,o),Uo(e)}function da(e,n){return Bo(e,null,null,n),Uo(e)}function Vm(e,n,a){e.lanes|=a;var o=e.alternate;o!==null&&(o.lanes|=a);for(var f=!1,m=e.return;m!==null;)m.childLanes|=a,o=m.alternate,o!==null&&(o.childLanes|=a),m.tag===22&&(e=m.stateNode,e===null||e._visibility&1||(f=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,f&&n!==null&&(f=31-Et(a),e=m.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=a|536870912),m):null}function Uo(e){if(50<_r)throw _r=0,Uf=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Wa={};function fw(e,n,a,o){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(e,n,a,o){return new fw(e,n,a,o)}function Mu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qn(e,n){var a=e.alternate;return a===null?(a=Bt(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function $m(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Vo(e,n,a,o,f,m){var b=0;if(o=e,typeof e=="function")Mu(e)&&(b=1);else if(typeof e=="string")b=gS(e,a,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case K:return e=Bt(31,a,n,f),e.elementType=K,e.lanes=m,e;case _:return ha(a.children,f,m,n);case E:b=8,f|=24;break;case j:return e=Bt(12,a,n,f|2),e.elementType=j,e.lanes=m,e;case z:return e=Bt(13,a,n,f),e.elementType=z,e.lanes=m,e;case k:return e=Bt(19,a,n,f),e.elementType=k,e.lanes=m,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:b=10;break e;case R:b=9;break e;case A:b=11;break e;case L:b=14;break e;case U:b=16,o=null;break e}b=29,a=Error(r(130,e===null?"null":typeof e,"")),o=null}return n=Bt(b,a,n,f),n.elementType=e,n.type=o,n.lanes=m,n}function ha(e,n,a,o){return e=Bt(7,e,o,n),e.lanes=a,e}function zu(e,n,a){return e=Bt(6,e,null,n),e.lanes=a,e}function Ym(e){var n=Bt(18,null,null,0);return n.stateNode=e,n}function Ou(e,n,a){return n=Bt(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var qm=new WeakMap;function Pt(e,n){if(typeof e=="object"&&e!==null){var a=qm.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Lt(n)},qm.set(e,n),n)}return{value:e,source:n,stack:Lt(n)}}var el=[],tl=0,$o=null,ar=0,It=[],Jt=0,bi=null,wn=1,Sn="";function Xn(e,n){el[tl++]=ar,el[tl++]=$o,$o=e,ar=n}function Xm(e,n,a){It[Jt++]=wn,It[Jt++]=Sn,It[Jt++]=bi,bi=e;var o=wn;e=Sn;var f=32-Et(o)-1;o&=~(1<<f),a+=1;var m=32-Et(n)+f;if(30<m){var b=f-f%5;m=(o&(1<<b)-1).toString(32),o>>=b,f-=b,wn=1<<32-Et(n)+f|a<<f|o,Sn=m+e}else wn=1<<m|a<<f|o,Sn=e}function Ru(e){e.return!==null&&(Xn(e,1),Xm(e,1,0))}function ku(e){for(;e===$o;)$o=el[--tl],el[tl]=null,ar=el[--tl],el[tl]=null;for(;e===bi;)bi=It[--Jt],It[Jt]=null,Sn=It[--Jt],It[Jt]=null,wn=It[--Jt],It[Jt]=null}function Gm(e,n){It[Jt++]=wn,It[Jt++]=Sn,It[Jt++]=bi,wn=n.id,Sn=n.overflow,bi=e}var gt=null,Qe=null,De=!1,wi=null,Wt=!1,Du=Error(r(519));function Si(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw lr(Pt(n,e)),Du}function Zm(e){var n=e.stateNode,a=e.type,o=e.memoizedProps;switch(n[ct]=e,n[wt]=o,a){case"dialog":Oe("cancel",n),Oe("close",n);break;case"iframe":case"object":case"embed":Oe("load",n);break;case"video":case"audio":for(a=0;a<Ar.length;a++)Oe(Ar[a],n);break;case"source":Oe("error",n);break;case"img":case"image":case"link":Oe("error",n),Oe("load",n);break;case"details":Oe("toggle",n);break;case"input":Oe("invalid",n),Co(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Oe("invalid",n);break;case"textarea":Oe("invalid",n),om(n,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||o.suppressHydrationWarning===!0||cg(n.textContent,a)?(o.popover!=null&&(Oe("beforetoggle",n),Oe("toggle",n)),o.onScroll!=null&&Oe("scroll",n),o.onScrollEnd!=null&&Oe("scrollend",n),o.onClick!=null&&(n.onclick=$n),n=!0):n=!1,n||Si(e,!0)}function Qm(e){for(gt=e.return;gt;)switch(gt.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:gt=gt.return}}function nl(e){if(e!==gt)return!1;if(!De)return Qm(e),De=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||ed(e.type,e.memoizedProps)),a=!a),a&&Qe&&Si(e),Qm(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=yg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=yg(e)}else n===27?(n=Qe,Li(e.type)?(e=ld,ld=null,Qe=e):Qe=n):Qe=gt?tn(e.stateNode.nextSibling):null;return!0}function ma(){Qe=gt=null,De=!1}function Lu(){var e=wi;return e!==null&&(Ot===null?Ot=e:Ot.push.apply(Ot,e),wi=null),e}function lr(e){wi===null?wi=[e]:wi.push(e)}var Hu=O(null),pa=null,Gn=null;function Ni(e,n,a){W(Hu,n._currentValue),n._currentValue=a}function Zn(e){e._currentValue=Hu.current,V(Hu)}function Bu(e,n,a){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===a)break;e=e.return}}function Uu(e,n,a,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var m=f.dependencies;if(m!==null){var b=f.child;m=m.firstContext;e:for(;m!==null;){var T=m;m=f;for(var $=0;$<n.length;$++)if(T.context===n[$]){m.lanes|=a,T=m.alternate,T!==null&&(T.lanes|=a),Bu(m.return,a,e),o||(b=null);break e}m=T.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(r(341));b.lanes|=a,m=b.alternate,m!==null&&(m.lanes|=a),Bu(b,a,e),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===e){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function il(e,n,a,o){e=null;for(var f=n,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(r(387));if(b=b.memoizedProps,b!==null){var T=f.type;Ht(f.pendingProps.value,b.value)||(e!==null?e.push(T):e=[T])}}else if(f===fe.current){if(b=f.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Or):e=[Or])}f=f.return}e!==null&&Uu(n,e,a,o),n.flags|=262144}function Yo(e){for(e=e.firstContext;e!==null;){if(!Ht(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ga(e){pa=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return Km(pa,e)}function qo(e,n){return pa===null&&ga(e),Km(e,n)}function Km(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Gn===null){if(e===null)throw Error(r(308));Gn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Gn=Gn.next=n;return a}var dw=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},hw=t.unstable_scheduleCallback,mw=t.unstable_NormalPriority,at={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vu(){return{controller:new dw,data:new Map,refCount:0}}function rr(e){e.refCount--,e.refCount===0&&hw(mw,function(){e.controller.abort()})}var or=null,$u=0,al=0,ll=null;function pw(e,n){if(or===null){var a=or=[];$u=0,al=Gf(),ll={status:"pending",value:void 0,then:function(o){a.push(o)}}}return $u++,n.then(Fm,Fm),n}function Fm(){if(--$u===0&&or!==null){ll!==null&&(ll.status="fulfilled");var e=or;or=null,al=0,ll=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function gw(e,n){var a=[],o={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<a.length;f++)(0,a[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),o}var Pm=M.S;M.S=function(e,n){Rp=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&pw(e,n),Pm!==null&&Pm(e,n)};var xa=O(null);function Yu(){var e=xa.current;return e!==null?e:Ze.pooledCache}function Xo(e,n){n===null?W(xa,xa.current):W(xa,n.pool)}function Im(){var e=Yu();return e===null?null:{parent:at._currentValue,pool:e}}var rl=Error(r(460)),qu=Error(r(474)),Go=Error(r(542)),Zo={then:function(){}};function Jm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wm(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then($n,$n),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,t0(e),e;default:if(typeof n.status=="string")n.then($n,$n);else{if(e=Ze,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=o}},function(o){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,t0(e),e}throw va=n,rl}}function ya(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(va=a,rl):a}}var va=null;function e0(){if(va===null)throw Error(r(459));var e=va;return va=null,e}function t0(e){if(e===rl||e===Go)throw Error(r(483))}var ol=null,sr=0;function Qo(e){var n=sr;return sr+=1,ol===null&&(ol=[]),Wm(ol,e,n)}function cr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Ko(e,n){throw n.$$typeof===v?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function n0(e){function n(F,X){if(e){var P=F.deletions;P===null?(F.deletions=[X],F.flags|=16):P.push(X)}}function a(F,X){if(!e)return null;for(;X!==null;)n(F,X),X=X.sibling;return null}function o(F){for(var X=new Map;F!==null;)F.key!==null?X.set(F.key,F):X.set(F.index,F),F=F.sibling;return X}function f(F,X){return F=qn(F,X),F.index=0,F.sibling=null,F}function m(F,X,P){return F.index=P,e?(P=F.alternate,P!==null?(P=P.index,P<X?(F.flags|=67108866,X):P):(F.flags|=67108866,X)):(F.flags|=1048576,X)}function b(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function T(F,X,P,le){return X===null||X.tag!==6?(X=zu(P,F.mode,le),X.return=F,X):(X=f(X,P),X.return=F,X)}function $(F,X,P,le){var we=P.type;return we===_?ae(F,X,P.props.children,le,P.key):X!==null&&(X.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===U&&ya(we)===X.type)?(X=f(X,P.props),cr(X,P),X.return=F,X):(X=Vo(P.type,P.key,P.props,null,F.mode,le),cr(X,P),X.return=F,X)}function I(F,X,P,le){return X===null||X.tag!==4||X.stateNode.containerInfo!==P.containerInfo||X.stateNode.implementation!==P.implementation?(X=Ou(P,F.mode,le),X.return=F,X):(X=f(X,P.children||[]),X.return=F,X)}function ae(F,X,P,le,we){return X===null||X.tag!==7?(X=ha(P,F.mode,le,we),X.return=F,X):(X=f(X,P),X.return=F,X)}function re(F,X,P){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=zu(""+X,F.mode,P),X.return=F,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case w:return P=Vo(X.type,X.key,X.props,null,F.mode,P),cr(P,X),P.return=F,P;case S:return X=Ou(X,F.mode,P),X.return=F,X;case U:return X=ya(X),re(F,X,P)}if(Z(X)||Q(X))return X=ha(X,F.mode,P,null),X.return=F,X;if(typeof X.then=="function")return re(F,Qo(X),P);if(X.$$typeof===N)return re(F,qo(F,X),P);Ko(F,X)}return null}function J(F,X,P,le){var we=X!==null?X.key:null;if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return we!==null?null:T(F,X,""+P,le);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case w:return P.key===we?$(F,X,P,le):null;case S:return P.key===we?I(F,X,P,le):null;case U:return P=ya(P),J(F,X,P,le)}if(Z(P)||Q(P))return we!==null?null:ae(F,X,P,le,null);if(typeof P.then=="function")return J(F,X,Qo(P),le);if(P.$$typeof===N)return J(F,X,qo(F,P),le);Ko(F,P)}return null}function ee(F,X,P,le,we){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return F=F.get(P)||null,T(X,F,""+le,we);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case w:return F=F.get(le.key===null?P:le.key)||null,$(X,F,le,we);case S:return F=F.get(le.key===null?P:le.key)||null,I(X,F,le,we);case U:return le=ya(le),ee(F,X,P,le,we)}if(Z(le)||Q(le))return F=F.get(P)||null,ae(X,F,le,we,null);if(typeof le.then=="function")return ee(F,X,P,Qo(le),we);if(le.$$typeof===N)return ee(F,X,P,qo(X,le),we);Ko(X,le)}return null}function de(F,X,P,le){for(var we=null,He=null,ge=X,Ce=X=0,ke=null;ge!==null&&Ce<P.length;Ce++){ge.index>Ce?(ke=ge,ge=null):ke=ge.sibling;var Be=J(F,ge,P[Ce],le);if(Be===null){ge===null&&(ge=ke);break}e&&ge&&Be.alternate===null&&n(F,ge),X=m(Be,X,Ce),He===null?we=Be:He.sibling=Be,He=Be,ge=ke}if(Ce===P.length)return a(F,ge),De&&Xn(F,Ce),we;if(ge===null){for(;Ce<P.length;Ce++)ge=re(F,P[Ce],le),ge!==null&&(X=m(ge,X,Ce),He===null?we=ge:He.sibling=ge,He=ge);return De&&Xn(F,Ce),we}for(ge=o(ge);Ce<P.length;Ce++)ke=ee(ge,F,Ce,P[Ce],le),ke!==null&&(e&&ke.alternate!==null&&ge.delete(ke.key===null?Ce:ke.key),X=m(ke,X,Ce),He===null?we=ke:He.sibling=ke,He=ke);return e&&ge.forEach(function($i){return n(F,$i)}),De&&Xn(F,Ce),we}function Ne(F,X,P,le){if(P==null)throw Error(r(151));for(var we=null,He=null,ge=X,Ce=X=0,ke=null,Be=P.next();ge!==null&&!Be.done;Ce++,Be=P.next()){ge.index>Ce?(ke=ge,ge=null):ke=ge.sibling;var $i=J(F,ge,Be.value,le);if($i===null){ge===null&&(ge=ke);break}e&&ge&&$i.alternate===null&&n(F,ge),X=m($i,X,Ce),He===null?we=$i:He.sibling=$i,He=$i,ge=ke}if(Be.done)return a(F,ge),De&&Xn(F,Ce),we;if(ge===null){for(;!Be.done;Ce++,Be=P.next())Be=re(F,Be.value,le),Be!==null&&(X=m(Be,X,Ce),He===null?we=Be:He.sibling=Be,He=Be);return De&&Xn(F,Ce),we}for(ge=o(ge);!Be.done;Ce++,Be=P.next())Be=ee(ge,F,Ce,Be.value,le),Be!==null&&(e&&Be.alternate!==null&&ge.delete(Be.key===null?Ce:Be.key),X=m(Be,X,Ce),He===null?we=Be:He.sibling=Be,He=Be);return e&&ge.forEach(function(AS){return n(F,AS)}),De&&Xn(F,Ce),we}function Ge(F,X,P,le){if(typeof P=="object"&&P!==null&&P.type===_&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case w:e:{for(var we=P.key;X!==null;){if(X.key===we){if(we=P.type,we===_){if(X.tag===7){a(F,X.sibling),le=f(X,P.props.children),le.return=F,F=le;break e}}else if(X.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===U&&ya(we)===X.type){a(F,X.sibling),le=f(X,P.props),cr(le,P),le.return=F,F=le;break e}a(F,X);break}else n(F,X);X=X.sibling}P.type===_?(le=ha(P.props.children,F.mode,le,P.key),le.return=F,F=le):(le=Vo(P.type,P.key,P.props,null,F.mode,le),cr(le,P),le.return=F,F=le)}return b(F);case S:e:{for(we=P.key;X!==null;){if(X.key===we)if(X.tag===4&&X.stateNode.containerInfo===P.containerInfo&&X.stateNode.implementation===P.implementation){a(F,X.sibling),le=f(X,P.children||[]),le.return=F,F=le;break e}else{a(F,X);break}else n(F,X);X=X.sibling}le=Ou(P,F.mode,le),le.return=F,F=le}return b(F);case U:return P=ya(P),Ge(F,X,P,le)}if(Z(P))return de(F,X,P,le);if(Q(P)){if(we=Q(P),typeof we!="function")throw Error(r(150));return P=we.call(P),Ne(F,X,P,le)}if(typeof P.then=="function")return Ge(F,X,Qo(P),le);if(P.$$typeof===N)return Ge(F,X,qo(F,P),le);Ko(F,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,X!==null&&X.tag===6?(a(F,X.sibling),le=f(X,P),le.return=F,F=le):(a(F,X),le=zu(P,F.mode,le),le.return=F,F=le),b(F)):a(F,X)}return function(F,X,P,le){try{sr=0;var we=Ge(F,X,P,le);return ol=null,we}catch(ge){if(ge===rl||ge===Go)throw ge;var He=Bt(29,ge,null,F.mode);return He.lanes=le,He.return=F,He}finally{}}}var ba=n0(!0),i0=n0(!1),Ei=!1;function Xu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function _i(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ji(e,n,a){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ve&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=Uo(e),Vm(e,null,a),n}return Bo(e,o,n,a),Uo(e)}function ur(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,xo(e,a)}}function Zu(e,n){var a=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var f=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?f=m=b:m=m.next=b,a=a.next}while(a!==null);m===null?f=m=n:m=m.next=n}else f=m=n;a={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:o.shared,callbacks:o.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Qu=!1;function fr(){if(Qu){var e=ll;if(e!==null)throw e}}function dr(e,n,a,o){Qu=!1;var f=e.updateQueue;Ei=!1;var m=f.firstBaseUpdate,b=f.lastBaseUpdate,T=f.shared.pending;if(T!==null){f.shared.pending=null;var $=T,I=$.next;$.next=null,b===null?m=I:b.next=I,b=$;var ae=e.alternate;ae!==null&&(ae=ae.updateQueue,T=ae.lastBaseUpdate,T!==b&&(T===null?ae.firstBaseUpdate=I:T.next=I,ae.lastBaseUpdate=$))}if(m!==null){var re=f.baseState;b=0,ae=I=$=null,T=m;do{var J=T.lane&-536870913,ee=J!==T.lane;if(ee?(Re&J)===J:(o&J)===J){J!==0&&J===al&&(Qu=!0),ae!==null&&(ae=ae.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var de=e,Ne=T;J=n;var Ge=a;switch(Ne.tag){case 1:if(de=Ne.payload,typeof de=="function"){re=de.call(Ge,re,J);break e}re=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Ne.payload,J=typeof de=="function"?de.call(Ge,re,J):de,J==null)break e;re=x({},re,J);break e;case 2:Ei=!0}}J=T.callback,J!==null&&(e.flags|=64,ee&&(e.flags|=8192),ee=f.callbacks,ee===null?f.callbacks=[J]:ee.push(J))}else ee={lane:J,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ae===null?(I=ae=ee,$=re):ae=ae.next=ee,b|=J;if(T=T.next,T===null){if(T=f.shared.pending,T===null)break;ee=T,T=ee.next,ee.next=null,f.lastBaseUpdate=ee,f.shared.pending=null}}while(!0);ae===null&&($=re),f.baseState=$,f.firstBaseUpdate=I,f.lastBaseUpdate=ae,m===null&&(f.shared.lanes=0),zi|=b,e.lanes=b,e.memoizedState=re}}function a0(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function l0(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)a0(a[e],n)}var sl=O(null),Fo=O(0);function r0(e,n){e=ti,W(Fo,e),W(sl,n),ti=e|n.baseLanes}function Ku(){W(Fo,ti),W(sl,sl.current)}function Fu(){ti=Fo.current,V(sl),V(Fo)}var Ut=O(null),en=null;function Ai(e){var n=e.alternate;W(et,et.current&1),W(Ut,e),en===null&&(n===null||sl.current!==null||n.memoizedState!==null)&&(en=e)}function Pu(e){W(et,et.current),W(Ut,e),en===null&&(en=e)}function o0(e){e.tag===22?(W(et,et.current),W(Ut,e),en===null&&(en=e)):Ci()}function Ci(){W(et,et.current),W(Ut,Ut.current)}function Vt(e){V(Ut),en===e&&(en=null),V(et)}var et=O(0);function Po(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||id(a)||ad(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Qn=0,Ae=null,qe=null,lt=null,Io=!1,cl=!1,wa=!1,Jo=0,hr=0,ul=null,xw=0;function Je(){throw Error(r(321))}function Iu(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!Ht(e[a],n[a]))return!1;return!0}function Ju(e,n,a,o,f,m){return Qn=m,Ae=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,M.H=e===null||e.memoizedState===null?X0:mf,wa=!1,m=a(o,f),wa=!1,cl&&(m=c0(n,a,o,f)),s0(e),m}function s0(e){M.H=gr;var n=qe!==null&&qe.next!==null;if(Qn=0,lt=qe=Ae=null,Io=!1,hr=0,ul=null,n)throw Error(r(300));e===null||rt||(e=e.dependencies,e!==null&&Yo(e)&&(rt=!0))}function c0(e,n,a,o){Ae=e;var f=0;do{if(cl&&(ul=null),hr=0,cl=!1,25<=f)throw Error(r(301));if(f+=1,lt=qe=null,e.updateQueue!=null){var m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}M.H=G0,m=n(a,o)}while(cl);return m}function yw(){var e=M.H,n=e.useState()[0];return n=typeof n.then=="function"?mr(n):n,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(Ae.flags|=1024),n}function Wu(){var e=Jo!==0;return Jo=0,e}function ef(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function tf(e){if(Io){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Io=!1}Qn=0,lt=qe=Ae=null,cl=!1,hr=Jo=0,ul=null}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Ae.memoizedState=lt=e:lt=lt.next=e,lt}function tt(){if(qe===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var n=lt===null?Ae.memoizedState:lt.next;if(n!==null)lt=n,qe=e;else{if(e===null)throw Ae.alternate===null?Error(r(467)):Error(r(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},lt===null?Ae.memoizedState=lt=e:lt=lt.next=e}return lt}function Wo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function mr(e){var n=hr;return hr+=1,ul===null&&(ul=[]),e=Wm(ul,e,n),n=Ae,(lt===null?n.memoizedState:lt.next)===null&&(n=n.alternate,M.H=n===null||n.memoizedState===null?X0:mf),e}function es(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return mr(e);if(e.$$typeof===N)return xt(e)}throw Error(r(438,String(e)))}function nf(e){var n=null,a=Ae.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var o=Ae.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=Wo(),Ae.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),o=0;o<e;o++)a[o]=ie;return n.index++,a}function Kn(e,n){return typeof n=="function"?n(e):n}function ts(e){var n=tt();return af(n,qe,e)}function af(e,n,a){var o=e.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=a;var f=e.baseQueue,m=o.pending;if(m!==null){if(f!==null){var b=f.next;f.next=m.next,m.next=b}n.baseQueue=f=m,o.pending=null}if(m=e.baseState,f===null)e.memoizedState=m;else{n=f.next;var T=b=null,$=null,I=n,ae=!1;do{var re=I.lane&-536870913;if(re!==I.lane?(Re&re)===re:(Qn&re)===re){var J=I.revertLane;if(J===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),re===al&&(ae=!0);else if((Qn&J)===J){I=I.next,J===al&&(ae=!0);continue}else re={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},$===null?(T=$=re,b=m):$=$.next=re,Ae.lanes|=J,zi|=J;re=I.action,wa&&a(m,re),m=I.hasEagerState?I.eagerState:a(m,re)}else J={lane:re,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},$===null?(T=$=J,b=m):$=$.next=J,Ae.lanes|=re,zi|=re;I=I.next}while(I!==null&&I!==n);if($===null?b=m:$.next=T,!Ht(m,e.memoizedState)&&(rt=!0,ae&&(a=ll,a!==null)))throw a;e.memoizedState=m,e.baseState=b,e.baseQueue=$,o.lastRenderedState=m}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function lf(e){var n=tt(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var o=a.dispatch,f=a.pending,m=n.memoizedState;if(f!==null){a.pending=null;var b=f=f.next;do m=e(m,b.action),b=b.next;while(b!==f);Ht(m,n.memoizedState)||(rt=!0),n.memoizedState=m,n.baseQueue===null&&(n.baseState=m),a.lastRenderedState=m}return[m,o]}function u0(e,n,a){var o=Ae,f=tt(),m=De;if(m){if(a===void 0)throw Error(r(407));a=a()}else a=n();var b=!Ht((qe||f).memoizedState,a);if(b&&(f.memoizedState=a,rt=!0),f=f.queue,sf(h0.bind(null,o,f,e),[e]),f.getSnapshot!==n||b||lt!==null&&lt.memoizedState.tag&1){if(o.flags|=2048,fl(9,{destroy:void 0},d0.bind(null,o,f,a,n),null),Ze===null)throw Error(r(349));m||(Qn&127)!==0||f0(o,n,a)}return a}function f0(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Ae.updateQueue,n===null?(n=Wo(),Ae.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function d0(e,n,a,o){n.value=a,n.getSnapshot=o,m0(n)&&p0(e)}function h0(e,n,a){return a(function(){m0(n)&&p0(e)})}function m0(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!Ht(e,a)}catch{return!0}}function p0(e){var n=da(e,2);n!==null&&Rt(n,e,2)}function rf(e){var n=_t();if(typeof e=="function"){var a=e;if(e=a(),wa){vn(!0);try{a()}finally{vn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},n}function g0(e,n,a,o){return e.baseState=a,af(e,qe,typeof o=="function"?o:Kn)}function vw(e,n,a,o,f){if(as(e))throw Error(r(485));if(e=n.action,e!==null){var m={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){m.listeners.push(b)}};M.T!==null?a(!0):m.isTransition=!1,o(m),a=n.pending,a===null?(m.next=n.pending=m,x0(n,m)):(m.next=a.next,n.pending=a.next=m)}}function x0(e,n){var a=n.action,o=n.payload,f=e.state;if(n.isTransition){var m=M.T,b={};M.T=b;try{var T=a(f,o),$=M.S;$!==null&&$(b,T),y0(e,n,T)}catch(I){of(e,n,I)}finally{m!==null&&b.types!==null&&(m.types=b.types),M.T=m}}else try{m=a(f,o),y0(e,n,m)}catch(I){of(e,n,I)}}function y0(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){v0(e,n,o)},function(o){return of(e,n,o)}):v0(e,n,a)}function v0(e,n,a){n.status="fulfilled",n.value=a,b0(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,x0(e,a)))}function of(e,n,a){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=a,b0(n),n=n.next;while(n!==o)}e.action=null}function b0(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function w0(e,n){return n}function S0(e,n){if(De){var a=Ze.formState;if(a!==null){e:{var o=Ae;if(De){if(Qe){t:{for(var f=Qe,m=Wt;f.nodeType!==8;){if(!m){f=null;break t}if(f=tn(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){Qe=tn(f.nextSibling),o=f.data==="F!";break e}}Si(o)}o=!1}o&&(n=a[0])}}return a=_t(),a.memoizedState=a.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:w0,lastRenderedState:n},a.queue=o,a=$0.bind(null,Ae,o),o.dispatch=a,o=rf(!1),m=hf.bind(null,Ae,!1,o.queue),o=_t(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,a=vw.bind(null,Ae,f,m,a),f.dispatch=a,o.memoizedState=e,[n,a,!1]}function N0(e){var n=tt();return E0(n,qe,e)}function E0(e,n,a){if(n=af(e,n,w0)[0],e=ts(Kn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=mr(n)}catch(b){throw b===rl?Go:b}else o=n;n=tt();var f=n.queue,m=f.dispatch;return a!==n.memoizedState&&(Ae.flags|=2048,fl(9,{destroy:void 0},bw.bind(null,f,a),null)),[o,m,e]}function bw(e,n){e.action=n}function _0(e){var n=tt(),a=qe;if(a!==null)return E0(n,a,e);tt(),n=n.memoizedState,a=tt();var o=a.queue.dispatch;return a.memoizedState=e,[n,o,!1]}function fl(e,n,a,o){return e={tag:e,create:a,deps:o,inst:n,next:null},n=Ae.updateQueue,n===null&&(n=Wo(),Ae.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(o=a.next,a.next=e,e.next=o,n.lastEffect=e),e}function j0(){return tt().memoizedState}function ns(e,n,a,o){var f=_t();Ae.flags|=e,f.memoizedState=fl(1|n,{destroy:void 0},a,o===void 0?null:o)}function is(e,n,a,o){var f=tt();o=o===void 0?null:o;var m=f.memoizedState.inst;qe!==null&&o!==null&&Iu(o,qe.memoizedState.deps)?f.memoizedState=fl(n,m,a,o):(Ae.flags|=e,f.memoizedState=fl(1|n,m,a,o))}function A0(e,n){ns(8390656,8,e,n)}function sf(e,n){is(2048,8,e,n)}function ww(e){Ae.flags|=4;var n=Ae.updateQueue;if(n===null)n=Wo(),Ae.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function C0(e){var n=tt().memoizedState;return ww({ref:n,nextImpl:e}),function(){if((Ve&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function T0(e,n){return is(4,2,e,n)}function M0(e,n){return is(4,4,e,n)}function z0(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function O0(e,n,a){a=a!=null?a.concat([e]):null,is(4,4,z0.bind(null,n,e),a)}function cf(){}function R0(e,n){var a=tt();n=n===void 0?null:n;var o=a.memoizedState;return n!==null&&Iu(n,o[1])?o[0]:(a.memoizedState=[e,n],e)}function k0(e,n){var a=tt();n=n===void 0?null:n;var o=a.memoizedState;if(n!==null&&Iu(n,o[1]))return o[0];if(o=e(),wa){vn(!0);try{e()}finally{vn(!1)}}return a.memoizedState=[o,n],o}function uf(e,n,a){return a===void 0||(Qn&1073741824)!==0&&(Re&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=Dp(),Ae.lanes|=e,zi|=e,a)}function D0(e,n,a,o){return Ht(a,n)?a:sl.current!==null?(e=uf(e,a,o),Ht(e,n)||(rt=!0),e):(Qn&42)===0||(Qn&1073741824)!==0&&(Re&261930)===0?(rt=!0,e.memoizedState=a):(e=Dp(),Ae.lanes|=e,zi|=e,n)}function L0(e,n,a,o,f){var m=H.p;H.p=m!==0&&8>m?m:8;var b=M.T,T={};M.T=T,hf(e,!1,n,a);try{var $=f(),I=M.S;if(I!==null&&I(T,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var ae=gw($,o);pr(e,n,ae,qt(e))}else pr(e,n,o,qt(e))}catch(re){pr(e,n,{then:function(){},status:"rejected",reason:re},qt())}finally{H.p=m,b!==null&&T.types!==null&&(b.types=T.types),M.T=b}}function Sw(){}function ff(e,n,a,o){if(e.tag!==5)throw Error(r(476));var f=H0(e).queue;L0(e,f,n,B,a===null?Sw:function(){return B0(e),a(o)})}function H0(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:B},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function B0(e){var n=H0(e);n.next===null&&(n=e.alternate.memoizedState),pr(e,n.next.queue,{},qt())}function df(){return xt(Or)}function U0(){return tt().memoizedState}function V0(){return tt().memoizedState}function Nw(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=qt();e=_i(a);var o=ji(n,e,a);o!==null&&(Rt(o,n,a),ur(o,n,a)),n={cache:Vu()},e.payload=n;return}n=n.return}}function Ew(e,n,a){var o=qt();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},as(e)?Y0(n,a):(a=Tu(e,n,a,o),a!==null&&(Rt(a,e,o),q0(a,n,o)))}function $0(e,n,a){var o=qt();pr(e,n,a,o)}function pr(e,n,a,o){var f={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(as(e))Y0(n,f);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var b=n.lastRenderedState,T=m(b,a);if(f.hasEagerState=!0,f.eagerState=T,Ht(T,b))return Bo(e,n,f,0),Ze===null&&Ho(),!1}catch{}finally{}if(a=Tu(e,n,f,o),a!==null)return Rt(a,e,o),q0(a,n,o),!0}return!1}function hf(e,n,a,o){if(o={lane:2,revertLane:Gf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},as(e)){if(n)throw Error(r(479))}else n=Tu(e,a,o,2),n!==null&&Rt(n,e,2)}function as(e){var n=e.alternate;return e===Ae||n!==null&&n===Ae}function Y0(e,n){cl=Io=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function q0(e,n,a){if((a&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,a|=o,n.lanes=a,xo(e,a)}}var gr={readContext:xt,use:es,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};gr.useEffectEvent=Je;var X0={readContext:xt,use:es,useCallback:function(e,n){return _t().memoizedState=[e,n===void 0?null:n],e},useContext:xt,useEffect:A0,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ns(4194308,4,z0.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ns(4194308,4,e,n)},useInsertionEffect:function(e,n){ns(4,2,e,n)},useMemo:function(e,n){var a=_t();n=n===void 0?null:n;var o=e();if(wa){vn(!0);try{e()}finally{vn(!1)}}return a.memoizedState=[o,n],o},useReducer:function(e,n,a){var o=_t();if(a!==void 0){var f=a(n);if(wa){vn(!0);try{a(n)}finally{vn(!1)}}}else f=n;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=Ew.bind(null,Ae,e),[o.memoizedState,e]},useRef:function(e){var n=_t();return e={current:e},n.memoizedState=e},useState:function(e){e=rf(e);var n=e.queue,a=$0.bind(null,Ae,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:cf,useDeferredValue:function(e,n){var a=_t();return uf(a,e,n)},useTransition:function(){var e=rf(!1);return e=L0.bind(null,Ae,e.queue,!0,!1),_t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var o=Ae,f=_t();if(De){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),Ze===null)throw Error(r(349));(Re&127)!==0||f0(o,n,a)}f.memoizedState=a;var m={value:a,getSnapshot:n};return f.queue=m,A0(h0.bind(null,o,m,e),[e]),o.flags|=2048,fl(9,{destroy:void 0},d0.bind(null,o,m,a,n),null),a},useId:function(){var e=_t(),n=Ze.identifierPrefix;if(De){var a=Sn,o=wn;a=(o&~(1<<32-Et(o)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Jo++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=xw++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:df,useFormState:S0,useActionState:S0,useOptimistic:function(e){var n=_t();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=hf.bind(null,Ae,!0,a),a.dispatch=n,[e,n]},useMemoCache:nf,useCacheRefresh:function(){return _t().memoizedState=Nw.bind(null,Ae)},useEffectEvent:function(e){var n=_t(),a={impl:e};return n.memoizedState=a,function(){if((Ve&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},mf={readContext:xt,use:es,useCallback:R0,useContext:xt,useEffect:sf,useImperativeHandle:O0,useInsertionEffect:T0,useLayoutEffect:M0,useMemo:k0,useReducer:ts,useRef:j0,useState:function(){return ts(Kn)},useDebugValue:cf,useDeferredValue:function(e,n){var a=tt();return D0(a,qe.memoizedState,e,n)},useTransition:function(){var e=ts(Kn)[0],n=tt().memoizedState;return[typeof e=="boolean"?e:mr(e),n]},useSyncExternalStore:u0,useId:U0,useHostTransitionStatus:df,useFormState:N0,useActionState:N0,useOptimistic:function(e,n){var a=tt();return g0(a,qe,e,n)},useMemoCache:nf,useCacheRefresh:V0};mf.useEffectEvent=C0;var G0={readContext:xt,use:es,useCallback:R0,useContext:xt,useEffect:sf,useImperativeHandle:O0,useInsertionEffect:T0,useLayoutEffect:M0,useMemo:k0,useReducer:lf,useRef:j0,useState:function(){return lf(Kn)},useDebugValue:cf,useDeferredValue:function(e,n){var a=tt();return qe===null?uf(a,e,n):D0(a,qe.memoizedState,e,n)},useTransition:function(){var e=lf(Kn)[0],n=tt().memoizedState;return[typeof e=="boolean"?e:mr(e),n]},useSyncExternalStore:u0,useId:U0,useHostTransitionStatus:df,useFormState:_0,useActionState:_0,useOptimistic:function(e,n){var a=tt();return qe!==null?g0(a,qe,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:nf,useCacheRefresh:V0};G0.useEffectEvent=C0;function pf(e,n,a,o){n=e.memoizedState,a=a(o,n),a=a==null?n:x({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var gf={enqueueSetState:function(e,n,a){e=e._reactInternals;var o=qt(),f=_i(o);f.payload=n,a!=null&&(f.callback=a),n=ji(e,f,o),n!==null&&(Rt(n,e,o),ur(n,e,o))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var o=qt(),f=_i(o);f.tag=1,f.payload=n,a!=null&&(f.callback=a),n=ji(e,f,o),n!==null&&(Rt(n,e,o),ur(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=qt(),o=_i(a);o.tag=2,n!=null&&(o.callback=n),n=ji(e,o,a),n!==null&&(Rt(n,e,a),ur(n,e,a))}};function Z0(e,n,a,o,f,m,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,m,b):n.prototype&&n.prototype.isPureReactComponent?!nr(a,o)||!nr(f,m):!0}function Q0(e,n,a,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,o),n.state!==e&&gf.enqueueReplaceState(n,n.state,null)}function Sa(e,n){var a=n;if("ref"in n){a={};for(var o in n)o!=="ref"&&(a[o]=n[o])}if(e=e.defaultProps){a===n&&(a=x({},a));for(var f in e)a[f]===void 0&&(a[f]=e[f])}return a}function K0(e){Lo(e)}function F0(e){console.error(e)}function P0(e){Lo(e)}function ls(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function I0(e,n,a){try{var o=e.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function xf(e,n,a){return a=_i(a),a.tag=3,a.payload={element:null},a.callback=function(){ls(e,n)},a}function J0(e){return e=_i(e),e.tag=3,e}function W0(e,n,a,o){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var m=o.value;e.payload=function(){return f(m)},e.callback=function(){I0(n,a,o)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){I0(n,a,o),typeof f!="function"&&(Oi===null?Oi=new Set([this]):Oi.add(this));var T=o.stack;this.componentDidCatch(o.value,{componentStack:T!==null?T:""})})}function _w(e,n,a,o,f){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=a.alternate,n!==null&&il(n,a,f,!0),a=Ut.current,a!==null){switch(a.tag){case 31:case 13:return en===null?xs():a.alternate===null&&We===0&&(We=3),a.flags&=-257,a.flags|=65536,a.lanes=f,o===Zo?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([o]):n.add(o),Yf(e,o,f)),!1;case 22:return a.flags|=65536,o===Zo?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([o]):a.add(o)),Yf(e,o,f)),!1}throw Error(r(435,a.tag))}return Yf(e,o,f),xs(),!1}if(De)return n=Ut.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==Du&&(e=Error(r(422),{cause:o}),lr(Pt(e,a)))):(o!==Du&&(n=Error(r(423),{cause:o}),lr(Pt(n,a))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=Pt(o,a),f=xf(e.stateNode,o,f),Zu(e,f),We!==4&&(We=2)),!1;var m=Error(r(520),{cause:o});if(m=Pt(m,a),Er===null?Er=[m]:Er.push(m),We!==4&&(We=2),n===null)return!0;o=Pt(o,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=f&-f,a.lanes|=e,e=xf(a.stateNode,o,e),Zu(a,e),!1;case 1:if(n=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Oi===null||!Oi.has(m))))return a.flags|=65536,f&=-f,a.lanes|=f,f=J0(f),W0(f,e,a,o),Zu(a,f),!1}a=a.return}while(a!==null);return!1}var yf=Error(r(461)),rt=!1;function yt(e,n,a,o){n.child=e===null?i0(n,null,a,o):ba(n,e.child,a,o)}function ep(e,n,a,o,f){a=a.render;var m=n.ref;if("ref"in o){var b={};for(var T in o)T!=="ref"&&(b[T]=o[T])}else b=o;return ga(n),o=Ju(e,n,a,b,m,f),T=Wu(),e!==null&&!rt?(ef(e,n,f),Fn(e,n,f)):(De&&T&&Ru(n),n.flags|=1,yt(e,n,o,f),n.child)}function tp(e,n,a,o,f){if(e===null){var m=a.type;return typeof m=="function"&&!Mu(m)&&m.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=m,np(e,n,m,o,f)):(e=Vo(a.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(m=e.child,!jf(e,f)){var b=m.memoizedProps;if(a=a.compare,a=a!==null?a:nr,a(b,o)&&e.ref===n.ref)return Fn(e,n,f)}return n.flags|=1,e=qn(m,o),e.ref=n.ref,e.return=n,n.child=e}function np(e,n,a,o,f){if(e!==null){var m=e.memoizedProps;if(nr(m,o)&&e.ref===n.ref)if(rt=!1,n.pendingProps=o=m,jf(e,f))(e.flags&131072)!==0&&(rt=!0);else return n.lanes=e.lanes,Fn(e,n,f)}return vf(e,n,a,o,f)}function ip(e,n,a,o){var f=o.children,m=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(m=m!==null?m.baseLanes|a:a,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~m}else o=0,n.child=null;return ap(e,n,m,a,o)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xo(n,m!==null?m.cachePool:null),m!==null?r0(n,m):Ku(),o0(n);else return o=n.lanes=536870912,ap(e,n,m!==null?m.baseLanes|a:a,a,o)}else m!==null?(Xo(n,m.cachePool),r0(n,m),Ci(),n.memoizedState=null):(e!==null&&Xo(n,null),Ku(),Ci());return yt(e,n,f,a),n.child}function xr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function ap(e,n,a,o,f){var m=Yu();return m=m===null?null:{parent:at._currentValue,pool:m},n.memoizedState={baseLanes:a,cachePool:m},e!==null&&Xo(n,null),Ku(),o0(n),e!==null&&il(e,n,o,!0),n.childLanes=f,null}function rs(e,n){return n=ss({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function lp(e,n,a){return ba(n,e.child,null,a),e=rs(n,n.pendingProps),e.flags|=2,Vt(n),n.memoizedState=null,e}function jw(e,n,a){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(De){if(o.mode==="hidden")return e=rs(n,o),n.lanes=536870912,xr(null,e);if(Pu(n),(e=Qe)?(e=xg(e,Wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:bi!==null?{id:wn,overflow:Sn}:null,retryLane:536870912,hydrationErrors:null},a=Ym(e),a.return=n,n.child=a,gt=n,Qe=null)):e=null,e===null)throw Si(n);return n.lanes=536870912,null}return rs(n,o)}var m=e.memoizedState;if(m!==null){var b=m.dehydrated;if(Pu(n),f)if(n.flags&256)n.flags&=-257,n=lp(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(rt||il(e,n,a,!1),f=(a&e.childLanes)!==0,rt||f){if(o=Ze,o!==null&&(b=yo(o,a),b!==0&&b!==m.retryLane))throw m.retryLane=b,da(e,b),Rt(o,e,b),yf;xs(),n=lp(e,n,a)}else e=m.treeContext,Qe=tn(b.nextSibling),gt=n,De=!0,wi=null,Wt=!1,e!==null&&Gm(n,e),n=rs(n,o),n.flags|=4096;return n}return e=qn(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function os(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function vf(e,n,a,o,f){return ga(n),a=Ju(e,n,a,o,void 0,f),o=Wu(),e!==null&&!rt?(ef(e,n,f),Fn(e,n,f)):(De&&o&&Ru(n),n.flags|=1,yt(e,n,a,f),n.child)}function rp(e,n,a,o,f,m){return ga(n),n.updateQueue=null,a=c0(n,o,a,f),s0(e),o=Wu(),e!==null&&!rt?(ef(e,n,m),Fn(e,n,m)):(De&&o&&Ru(n),n.flags|=1,yt(e,n,a,m),n.child)}function op(e,n,a,o,f){if(ga(n),n.stateNode===null){var m=Wa,b=a.contextType;typeof b=="object"&&b!==null&&(m=xt(b)),m=new a(o,m),n.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=gf,n.stateNode=m,m._reactInternals=n,m=n.stateNode,m.props=o,m.state=n.memoizedState,m.refs={},Xu(n),b=a.contextType,m.context=typeof b=="object"&&b!==null?xt(b):Wa,m.state=n.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(pf(n,a,b,o),m.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(b=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),b!==m.state&&gf.enqueueReplaceState(m,m.state,null),dr(n,o,m,f),fr(),m.state=n.memoizedState),typeof m.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){m=n.stateNode;var T=n.memoizedProps,$=Sa(a,T);m.props=$;var I=m.context,ae=a.contextType;b=Wa,typeof ae=="object"&&ae!==null&&(b=xt(ae));var re=a.getDerivedStateFromProps;ae=typeof re=="function"||typeof m.getSnapshotBeforeUpdate=="function",T=n.pendingProps!==T,ae||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(T||I!==b)&&Q0(n,m,o,b),Ei=!1;var J=n.memoizedState;m.state=J,dr(n,o,m,f),fr(),I=n.memoizedState,T||J!==I||Ei?(typeof re=="function"&&(pf(n,a,re,o),I=n.memoizedState),($=Ei||Z0(n,a,$,o,J,I,b))?(ae||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(n.flags|=4194308)):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=I),m.props=o,m.state=I,m.context=b,o=$):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{m=n.stateNode,Gu(e,n),b=n.memoizedProps,ae=Sa(a,b),m.props=ae,re=n.pendingProps,J=m.context,I=a.contextType,$=Wa,typeof I=="object"&&I!==null&&($=xt(I)),T=a.getDerivedStateFromProps,(I=typeof T=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(b!==re||J!==$)&&Q0(n,m,o,$),Ei=!1,J=n.memoizedState,m.state=J,dr(n,o,m,f),fr();var ee=n.memoizedState;b!==re||J!==ee||Ei||e!==null&&e.dependencies!==null&&Yo(e.dependencies)?(typeof T=="function"&&(pf(n,a,T,o),ee=n.memoizedState),(ae=Ei||Z0(n,a,ae,o,J,ee,$)||e!==null&&e.dependencies!==null&&Yo(e.dependencies))?(I||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,ee,$),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,ee,$)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof m.componentDidUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=ee),m.props=o,m.state=ee,m.context=$,o=ae):(typeof m.componentDidUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),o=!1)}return m=o,os(e,n),o=(n.flags&128)!==0,m||o?(m=n.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:m.render(),n.flags|=1,e!==null&&o?(n.child=ba(n,e.child,null,f),n.child=ba(n,null,a,f)):yt(e,n,a,f),n.memoizedState=m.state,e=n.child):e=Fn(e,n,f),e}function sp(e,n,a,o){return ma(),n.flags|=256,yt(e,n,a,o),n.child}var bf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wf(e){return{baseLanes:e,cachePool:Im()}}function Sf(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=Yt),e}function cp(e,n,a){var o=n.pendingProps,f=!1,m=(n.flags&128)!==0,b;if((b=m)||(b=e!==null&&e.memoizedState===null?!1:(et.current&2)!==0),b&&(f=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(De){if(f?Ai(n):Ci(),(e=Qe)?(e=xg(e,Wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:bi!==null?{id:wn,overflow:Sn}:null,retryLane:536870912,hydrationErrors:null},a=Ym(e),a.return=n,n.child=a,gt=n,Qe=null)):e=null,e===null)throw Si(n);return ad(e)?n.lanes=32:n.lanes=536870912,null}var T=o.children;return o=o.fallback,f?(Ci(),f=n.mode,T=ss({mode:"hidden",children:T},f),o=ha(o,f,a,null),T.return=n,o.return=n,T.sibling=o,n.child=T,o=n.child,o.memoizedState=wf(a),o.childLanes=Sf(e,b,a),n.memoizedState=bf,xr(null,o)):(Ai(n),Nf(n,T))}var $=e.memoizedState;if($!==null&&(T=$.dehydrated,T!==null)){if(m)n.flags&256?(Ai(n),n.flags&=-257,n=Ef(e,n,a)):n.memoizedState!==null?(Ci(),n.child=e.child,n.flags|=128,n=null):(Ci(),T=o.fallback,f=n.mode,o=ss({mode:"visible",children:o.children},f),T=ha(T,f,a,null),T.flags|=2,o.return=n,T.return=n,o.sibling=T,n.child=o,ba(n,e.child,null,a),o=n.child,o.memoizedState=wf(a),o.childLanes=Sf(e,b,a),n.memoizedState=bf,n=xr(null,o));else if(Ai(n),ad(T)){if(b=T.nextSibling&&T.nextSibling.dataset,b)var I=b.dgst;b=I,o=Error(r(419)),o.stack="",o.digest=b,lr({value:o,source:null,stack:null}),n=Ef(e,n,a)}else if(rt||il(e,n,a,!1),b=(a&e.childLanes)!==0,rt||b){if(b=Ze,b!==null&&(o=yo(b,a),o!==0&&o!==$.retryLane))throw $.retryLane=o,da(e,o),Rt(b,e,o),yf;id(T)||xs(),n=Ef(e,n,a)}else id(T)?(n.flags|=192,n.child=e.child,n=null):(e=$.treeContext,Qe=tn(T.nextSibling),gt=n,De=!0,wi=null,Wt=!1,e!==null&&Gm(n,e),n=Nf(n,o.children),n.flags|=4096);return n}return f?(Ci(),T=o.fallback,f=n.mode,$=e.child,I=$.sibling,o=qn($,{mode:"hidden",children:o.children}),o.subtreeFlags=$.subtreeFlags&65011712,I!==null?T=qn(I,T):(T=ha(T,f,a,null),T.flags|=2),T.return=n,o.return=n,o.sibling=T,n.child=o,xr(null,o),o=n.child,T=e.child.memoizedState,T===null?T=wf(a):(f=T.cachePool,f!==null?($=at._currentValue,f=f.parent!==$?{parent:$,pool:$}:f):f=Im(),T={baseLanes:T.baseLanes|a,cachePool:f}),o.memoizedState=T,o.childLanes=Sf(e,b,a),n.memoizedState=bf,xr(e.child,o)):(Ai(n),a=e.child,e=a.sibling,a=qn(a,{mode:"visible",children:o.children}),a.return=n,a.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=a,n.memoizedState=null,a)}function Nf(e,n){return n=ss({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function ss(e,n){return e=Bt(22,e,null,n),e.lanes=0,e}function Ef(e,n,a){return ba(n,e.child,null,a),e=Nf(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function up(e,n,a){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Bu(e.return,n,a)}function _f(e,n,a,o,f,m){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:f,treeForkCount:m}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=a,b.tailMode=f,b.treeForkCount=m)}function fp(e,n,a){var o=n.pendingProps,f=o.revealOrder,m=o.tail;o=o.children;var b=et.current,T=(b&2)!==0;if(T?(b=b&1|2,n.flags|=128):b&=1,W(et,b),yt(e,n,o,a),o=De?ar:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&up(e,a,n);else if(e.tag===19)up(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(a=n.child,f=null;a!==null;)e=a.alternate,e!==null&&Po(e)===null&&(f=a),a=a.sibling;a=f,a===null?(f=n.child,n.child=null):(f=a.sibling,a.sibling=null),_f(n,!1,f,a,m,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Po(e)===null){n.child=f;break}e=f.sibling,f.sibling=a,a=f,f=e}_f(n,!0,a,null,m,o);break;case"together":_f(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Fn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),zi|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(il(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,a=qn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=qn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function jf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Yo(e)))}function Aw(e,n,a){switch(n.tag){case 3:ce(n,n.stateNode.containerInfo),Ni(n,at,e.memoizedState.cache),ma();break;case 27:case 5:Ee(n);break;case 4:ce(n,n.stateNode.containerInfo);break;case 10:Ni(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Pu(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Ai(n),n.flags|=128,null):(a&n.child.childLanes)!==0?cp(e,n,a):(Ai(n),e=Fn(e,n,a),e!==null?e.sibling:null);Ai(n);break;case 19:var f=(e.flags&128)!==0;if(o=(a&n.childLanes)!==0,o||(il(e,n,a,!1),o=(a&n.childLanes)!==0),f){if(o)return fp(e,n,a);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),W(et,et.current),o)break;return null;case 22:return n.lanes=0,ip(e,n,a,n.pendingProps);case 24:Ni(n,at,e.memoizedState.cache)}return Fn(e,n,a)}function dp(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)rt=!0;else{if(!jf(e,a)&&(n.flags&128)===0)return rt=!1,Aw(e,n,a);rt=(e.flags&131072)!==0}else rt=!1,De&&(n.flags&1048576)!==0&&Xm(n,ar,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=ya(n.elementType),n.type=e,typeof e=="function")Mu(e)?(o=Sa(e,o),n.tag=1,n=op(null,n,e,o,a)):(n.tag=0,n=vf(null,n,e,o,a));else{if(e!=null){var f=e.$$typeof;if(f===A){n.tag=11,n=ep(null,n,e,o,a);break e}else if(f===L){n.tag=14,n=tp(null,n,e,o,a);break e}}throw n=D(e)||e,Error(r(306,n,""))}}return n;case 0:return vf(e,n,n.type,n.pendingProps,a);case 1:return o=n.type,f=Sa(o,n.pendingProps),op(e,n,o,f,a);case 3:e:{if(ce(n,n.stateNode.containerInfo),e===null)throw Error(r(387));o=n.pendingProps;var m=n.memoizedState;f=m.element,Gu(e,n),dr(n,o,null,a);var b=n.memoizedState;if(o=b.cache,Ni(n,at,o),o!==m.cache&&Uu(n,[at],a,!0),fr(),o=b.element,m.isDehydrated)if(m={element:o,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=m,n.memoizedState=m,n.flags&256){n=sp(e,n,o,a);break e}else if(o!==f){f=Pt(Error(r(424)),n),lr(f),n=sp(e,n,o,a);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Qe=tn(e.firstChild),gt=n,De=!0,wi=null,Wt=!0,a=i0(n,null,o,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ma(),o===f){n=Fn(e,n,a);break e}yt(e,n,o,a)}n=n.child}return n;case 26:return os(e,n),e===null?(a=Ng(n.type,null,n.pendingProps,null))?n.memoizedState=a:De||(a=n.type,e=n.pendingProps,o=Es(se.current).createElement(a),o[ct]=n,o[wt]=e,vt(o,a,e),it(o),n.stateNode=o):n.memoizedState=Ng(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Ee(n),e===null&&De&&(o=n.stateNode=bg(n.type,n.pendingProps,se.current),gt=n,Wt=!0,f=Qe,Li(n.type)?(ld=f,Qe=tn(o.firstChild)):Qe=f),yt(e,n,n.pendingProps.children,a),os(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&De&&((f=o=Qe)&&(o=iS(o,n.type,n.pendingProps,Wt),o!==null?(n.stateNode=o,gt=n,Qe=tn(o.firstChild),Wt=!1,f=!0):f=!1),f||Si(n)),Ee(n),f=n.type,m=n.pendingProps,b=e!==null?e.memoizedProps:null,o=m.children,ed(f,m)?o=null:b!==null&&ed(f,b)&&(n.flags|=32),n.memoizedState!==null&&(f=Ju(e,n,yw,null,null,a),Or._currentValue=f),os(e,n),yt(e,n,o,a),n.child;case 6:return e===null&&De&&((e=a=Qe)&&(a=aS(a,n.pendingProps,Wt),a!==null?(n.stateNode=a,gt=n,Qe=null,e=!0):e=!1),e||Si(n)),null;case 13:return cp(e,n,a);case 4:return ce(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=ba(n,null,o,a):yt(e,n,o,a),n.child;case 11:return ep(e,n,n.type,n.pendingProps,a);case 7:return yt(e,n,n.pendingProps,a),n.child;case 8:return yt(e,n,n.pendingProps.children,a),n.child;case 12:return yt(e,n,n.pendingProps.children,a),n.child;case 10:return o=n.pendingProps,Ni(n,n.type,o.value),yt(e,n,o.children,a),n.child;case 9:return f=n.type._context,o=n.pendingProps.children,ga(n),f=xt(f),o=o(f),n.flags|=1,yt(e,n,o,a),n.child;case 14:return tp(e,n,n.type,n.pendingProps,a);case 15:return np(e,n,n.type,n.pendingProps,a);case 19:return fp(e,n,a);case 31:return jw(e,n,a);case 22:return ip(e,n,a,n.pendingProps);case 24:return ga(n),o=xt(at),e===null?(f=Yu(),f===null&&(f=Ze,m=Vu(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=a),f=m),n.memoizedState={parent:o,cache:f},Xu(n),Ni(n,at,f)):((e.lanes&a)!==0&&(Gu(e,n),dr(n,null,null,a),fr()),f=e.memoizedState,m=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Ni(n,at,o)):(o=m.cache,Ni(n,at,o),o!==f.cache&&Uu(n,[at],a,!0))),yt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function Pn(e){e.flags|=4}function Af(e,n,a,o,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Up())e.flags|=8192;else throw va=Zo,qu}else e.flags&=-16777217}function hp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cg(n))if(Up())e.flags|=8192;else throw va=Zo,qu}function cs(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?po():536870912,e.lanes|=n,pl|=n)}function yr(e,n){if(!De)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ke(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,o=0;if(n)for(var f=e.child;f!==null;)a|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)a|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=a,n}function Cw(e,n,a){var o=n.pendingProps;switch(ku(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(n),null;case 1:return Ke(n),null;case 3:return a=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Zn(at),ue(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(nl(n)?Pn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Lu())),Ke(n),null;case 26:var f=n.type,m=n.memoizedState;return e===null?(Pn(n),m!==null?(Ke(n),hp(n,m)):(Ke(n),Af(n,f,null,o,a))):m?m!==e.memoizedState?(Pn(n),Ke(n),hp(n,m)):(Ke(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&Pn(n),Ke(n),Af(n,f,e,o,a)),null;case 27:if(ve(n),a=se.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Pn(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Ke(n),null}e=ne.current,nl(n)?Zm(n):(e=bg(f,o,a),n.stateNode=e,Pn(n))}return Ke(n),null;case 5:if(ve(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Pn(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Ke(n),null}if(m=ne.current,nl(n))Zm(n);else{var b=Es(se.current);switch(m){case 1:m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=b.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?m.multiple=!0:o.size&&(m.size=o.size);break;default:m=typeof o.is=="string"?b.createElement(f,{is:o.is}):b.createElement(f)}}m[ct]=n,m[wt]=o;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)m.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=m;e:switch(vt(m,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Pn(n)}}return Ke(n),Af(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&Pn(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(r(166));if(e=se.current,nl(n)){if(e=n.stateNode,a=n.memoizedProps,o=null,f=gt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[ct]=n,e=!!(e.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||cg(e.nodeValue,a)),e||Si(n,!0)}else e=Es(e).createTextNode(o),e[ct]=n,n.stateNode=e}return Ke(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(o=nl(n),a!==null){if(e===null){if(!o)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[ct]=n}else ma(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ke(n),e=!1}else a=Lu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(Vt(n),n):(Vt(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Ke(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=nl(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[ct]=n}else ma(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ke(n),f=!1}else f=Lu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(Vt(n),n):(Vt(n),null)}return Vt(n),(n.flags&128)!==0?(n.lanes=a,n):(a=o!==null,e=e!==null&&e.memoizedState!==null,a&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==f&&(o.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),cs(n,n.updateQueue),Ke(n),null);case 4:return ue(),e===null&&Ff(n.stateNode.containerInfo),Ke(n),null;case 10:return Zn(n.type),Ke(n),null;case 19:if(V(et),o=n.memoizedState,o===null)return Ke(n),null;if(f=(n.flags&128)!==0,m=o.rendering,m===null)if(f)yr(o,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(m=Po(e),m!==null){for(n.flags|=128,yr(o,!1),e=m.updateQueue,n.updateQueue=e,cs(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)$m(a,e),a=a.sibling;return W(et,et.current&1|2),De&&Xn(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&pt()>ms&&(n.flags|=128,f=!0,yr(o,!1),n.lanes=4194304)}else{if(!f)if(e=Po(m),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,cs(n,e),yr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!m.alternate&&!De)return Ke(n),null}else 2*pt()-o.renderingStartTime>ms&&a!==536870912&&(n.flags|=128,f=!0,yr(o,!1),n.lanes=4194304);o.isBackwards?(m.sibling=n.child,n.child=m):(e=o.last,e!==null?e.sibling=m:n.child=m,o.last=m)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=pt(),e.sibling=null,a=et.current,W(et,f?a&1|2:a&1),De&&Xn(n,o.treeForkCount),e):(Ke(n),null);case 22:case 23:return Vt(n),Fu(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(a&536870912)!==0&&(n.flags&128)===0&&(Ke(n),n.subtreeFlags&6&&(n.flags|=8192)):Ke(n),a=n.updateQueue,a!==null&&cs(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==a&&(n.flags|=2048),e!==null&&V(xa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Zn(at),Ke(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Tw(e,n){switch(ku(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Zn(at),ue(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return ve(n),null;case 31:if(n.memoizedState!==null){if(Vt(n),n.alternate===null)throw Error(r(340));ma()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Vt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));ma()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return V(et),null;case 4:return ue(),null;case 10:return Zn(n.type),null;case 22:case 23:return Vt(n),Fu(),e!==null&&V(xa),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Zn(at),null;case 25:return null;default:return null}}function mp(e,n){switch(ku(n),n.tag){case 3:Zn(at),ue();break;case 26:case 27:case 5:ve(n);break;case 4:ue();break;case 31:n.memoizedState!==null&&Vt(n);break;case 13:Vt(n);break;case 19:V(et);break;case 10:Zn(n.type);break;case 22:case 23:Vt(n),Fu(),e!==null&&V(xa);break;case 24:Zn(at)}}function vr(e,n){try{var a=n.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var f=o.next;a=f;do{if((a.tag&e)===e){o=void 0;var m=a.create,b=a.inst;o=m(),b.destroy=o}a=a.next}while(a!==f)}}catch(T){Ye(n,n.return,T)}}function Ti(e,n,a){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var m=f.next;o=m;do{if((o.tag&e)===e){var b=o.inst,T=b.destroy;if(T!==void 0){b.destroy=void 0,f=n;var $=a,I=T;try{I()}catch(ae){Ye(f,$,ae)}}}o=o.next}while(o!==m)}}catch(ae){Ye(n,n.return,ae)}}function pp(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{l0(n,a)}catch(o){Ye(e,e.return,o)}}}function gp(e,n,a){a.props=Sa(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(o){Ye(e,n,o)}}function br(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof a=="function"?e.refCleanup=a(o):a.current=o}}catch(f){Ye(e,n,f)}}function Nn(e,n){var a=e.ref,o=e.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(f){Ye(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){Ye(e,n,f)}else a.current=null}function xp(e){var n=e.type,a=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(f){Ye(e,e.return,f)}}function Cf(e,n,a){try{var o=e.stateNode;Iw(o,e.type,a,n),o[wt]=n}catch(f){Ye(e,e.return,f)}}function yp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Li(e.type)||e.tag===4}function Tf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Li(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Mf(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=$n));else if(o!==4&&(o===27&&Li(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Mf(e,n,a),e=e.sibling;e!==null;)Mf(e,n,a),e=e.sibling}function us(e,n,a){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(o!==4&&(o===27&&Li(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(us(e,n,a),e=e.sibling;e!==null;)us(e,n,a),e=e.sibling}function vp(e){var n=e.stateNode,a=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);vt(n,o,a),n[ct]=e,n[wt]=a}catch(m){Ye(e,e.return,m)}}var In=!1,ot=!1,zf=!1,bp=typeof WeakSet=="function"?WeakSet:Set,mt=null;function Mw(e,n){if(e=e.containerInfo,Jf=zs,e=Om(e),Nu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var f=o.anchorOffset,m=o.focusNode;o=o.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var b=0,T=-1,$=-1,I=0,ae=0,re=e,J=null;t:for(;;){for(var ee;re!==a||f!==0&&re.nodeType!==3||(T=b+f),re!==m||o!==0&&re.nodeType!==3||($=b+o),re.nodeType===3&&(b+=re.nodeValue.length),(ee=re.firstChild)!==null;)J=re,re=ee;for(;;){if(re===e)break t;if(J===a&&++I===f&&(T=b),J===m&&++ae===o&&($=b),(ee=re.nextSibling)!==null)break;re=J,J=re.parentNode}re=ee}a=T===-1||$===-1?null:{start:T,end:$}}else a=null}a=a||{start:0,end:0}}else a=null;for(Wf={focusedElem:e,selectionRange:a},zs=!1,mt=n;mt!==null;)if(n=mt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,mt=e;else for(;mt!==null;){switch(n=mt,m=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)f=e[a],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&m!==null){e=void 0,a=n,f=m.memoizedProps,m=m.memoizedState,o=a.stateNode;try{var de=Sa(a.type,f);e=o.getSnapshotBeforeUpdate(de,m),o.__reactInternalSnapshotBeforeUpdate=e}catch(Ne){Ye(a,a.return,Ne)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)nd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":nd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,mt=e;break}mt=n.return}}function wp(e,n,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:Wn(e,a),o&4&&vr(5,a);break;case 1:if(Wn(e,a),o&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(b){Ye(a,a.return,b)}else{var f=Sa(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ye(a,a.return,b)}}o&64&&pp(a),o&512&&br(a,a.return);break;case 3:if(Wn(e,a),o&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{l0(e,n)}catch(b){Ye(a,a.return,b)}}break;case 27:n===null&&o&4&&vp(a);case 26:case 5:Wn(e,a),n===null&&o&4&&xp(a),o&512&&br(a,a.return);break;case 12:Wn(e,a);break;case 31:Wn(e,a),o&4&&Ep(e,a);break;case 13:Wn(e,a),o&4&&_p(e,a),o&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Uw.bind(null,a),lS(e,a))));break;case 22:if(o=a.memoizedState!==null||In,!o){n=n!==null&&n.memoizedState!==null||ot,f=In;var m=ot;In=o,(ot=n)&&!m?ei(e,a,(a.subtreeFlags&8772)!==0):Wn(e,a),In=f,ot=m}break;case 30:break;default:Wn(e,a)}}function Sp(e){var n=e.alternate;n!==null&&(e.alternate=null,Sp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Zl(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Fe=null,Tt=!1;function Jn(e,n,a){for(a=a.child;a!==null;)Np(e,n,a),a=a.sibling}function Np(e,n,a){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(ia,a)}catch{}switch(a.tag){case 26:ot||Nn(a,n),Jn(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ot||Nn(a,n);var o=Fe,f=Tt;Li(a.type)&&(Fe=a.stateNode,Tt=!1),Jn(e,n,a),Tr(a.stateNode),Fe=o,Tt=f;break;case 5:ot||Nn(a,n);case 6:if(o=Fe,f=Tt,Fe=null,Jn(e,n,a),Fe=o,Tt=f,Fe!==null)if(Tt)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(a.stateNode)}catch(m){Ye(a,n,m)}else try{Fe.removeChild(a.stateNode)}catch(m){Ye(a,n,m)}break;case 18:Fe!==null&&(Tt?(e=Fe,pg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Nl(e)):pg(Fe,a.stateNode));break;case 4:o=Fe,f=Tt,Fe=a.stateNode.containerInfo,Tt=!0,Jn(e,n,a),Fe=o,Tt=f;break;case 0:case 11:case 14:case 15:Ti(2,a,n),ot||Ti(4,a,n),Jn(e,n,a);break;case 1:ot||(Nn(a,n),o=a.stateNode,typeof o.componentWillUnmount=="function"&&gp(a,n,o)),Jn(e,n,a);break;case 21:Jn(e,n,a);break;case 22:ot=(o=ot)||a.memoizedState!==null,Jn(e,n,a),ot=o;break;default:Jn(e,n,a)}}function Ep(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Nl(e)}catch(a){Ye(n,n.return,a)}}}function _p(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Nl(e)}catch(a){Ye(n,n.return,a)}}function zw(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new bp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new bp),n;default:throw Error(r(435,e.tag))}}function fs(e,n){var a=zw(e);n.forEach(function(o){if(!a.has(o)){a.add(o);var f=Vw.bind(null,e,o);o.then(f,f)}})}function Mt(e,n){var a=n.deletions;if(a!==null)for(var o=0;o<a.length;o++){var f=a[o],m=e,b=n,T=b;e:for(;T!==null;){switch(T.tag){case 27:if(Li(T.type)){Fe=T.stateNode,Tt=!1;break e}break;case 5:Fe=T.stateNode,Tt=!1;break e;case 3:case 4:Fe=T.stateNode.containerInfo,Tt=!0;break e}T=T.return}if(Fe===null)throw Error(r(160));Np(m,b,f),Fe=null,Tt=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)jp(n,e),n=n.sibling}var sn=null;function jp(e,n){var a=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Mt(n,e),zt(e),o&4&&(Ti(3,e,e.return),vr(3,e),Ti(5,e,e.return));break;case 1:Mt(n,e),zt(e),o&512&&(ot||a===null||Nn(a,a.return)),o&64&&In&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var f=sn;if(Mt(n,e),zt(e),o&512&&(ot||a===null||Nn(a,a.return)),o&4){var m=a!==null?a.memoizedState:null;if(o=e.memoizedState,a===null)if(o===null)if(e.stateNode===null){e:{o=e.type,a=e.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":m=f.getElementsByTagName("title")[0],(!m||m[ra]||m[ct]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(o),f.head.insertBefore(m,f.querySelector("head > title"))),vt(m,o,a),m[ct]=e,it(m),o=m;break e;case"link":var b=jg("link","href",f).get(o+(a.href||""));if(b){for(var T=0;T<b.length;T++)if(m=b[T],m.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&m.getAttribute("rel")===(a.rel==null?null:a.rel)&&m.getAttribute("title")===(a.title==null?null:a.title)&&m.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(T,1);break t}}m=f.createElement(o),vt(m,o,a),f.head.appendChild(m);break;case"meta":if(b=jg("meta","content",f).get(o+(a.content||""))){for(T=0;T<b.length;T++)if(m=b[T],m.getAttribute("content")===(a.content==null?null:""+a.content)&&m.getAttribute("name")===(a.name==null?null:a.name)&&m.getAttribute("property")===(a.property==null?null:a.property)&&m.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&m.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(T,1);break t}}m=f.createElement(o),vt(m,o,a),f.head.appendChild(m);break;default:throw Error(r(468,o))}m[ct]=e,it(m),o=m}e.stateNode=o}else Ag(f,e.type,e.stateNode);else e.stateNode=_g(f,o,e.memoizedProps);else m!==o?(m===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):m.count--,o===null?Ag(f,e.type,e.stateNode):_g(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Cf(e,e.memoizedProps,a.memoizedProps)}break;case 27:Mt(n,e),zt(e),o&512&&(ot||a===null||Nn(a,a.return)),a!==null&&o&4&&Cf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Mt(n,e),zt(e),o&512&&(ot||a===null||Nn(a,a.return)),e.flags&32){f=e.stateNode;try{Za(f,"")}catch(de){Ye(e,e.return,de)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,Cf(e,f,a!==null?a.memoizedProps:f)),o&1024&&(zf=!0);break;case 6:if(Mt(n,e),zt(e),o&4){if(e.stateNode===null)throw Error(r(162));o=e.memoizedProps,a=e.stateNode;try{a.nodeValue=o}catch(de){Ye(e,e.return,de)}}break;case 3:if(As=null,f=sn,sn=_s(n.containerInfo),Mt(n,e),sn=f,zt(e),o&4&&a!==null&&a.memoizedState.isDehydrated)try{Nl(n.containerInfo)}catch(de){Ye(e,e.return,de)}zf&&(zf=!1,Ap(e));break;case 4:o=sn,sn=_s(e.stateNode.containerInfo),Mt(n,e),zt(e),sn=o;break;case 12:Mt(n,e),zt(e);break;case 31:Mt(n,e),zt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,fs(e,o)));break;case 13:Mt(n,e),zt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(hs=pt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,fs(e,o)));break;case 22:f=e.memoizedState!==null;var $=a!==null&&a.memoizedState!==null,I=In,ae=ot;if(In=I||f,ot=ae||$,Mt(n,e),ot=ae,In=I,zt(e),o&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(a===null||$||In||ot||Na(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){$=a=n;try{if(m=$.stateNode,f)b=m.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{T=$.stateNode;var re=$.memoizedProps.style,J=re!=null&&re.hasOwnProperty("display")?re.display:null;T.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(de){Ye($,$.return,de)}}}else if(n.tag===6){if(a===null){$=n;try{$.stateNode.nodeValue=f?"":$.memoizedProps}catch(de){Ye($,$.return,de)}}}else if(n.tag===18){if(a===null){$=n;try{var ee=$.stateNode;f?gg(ee,!0):gg($.stateNode,!1)}catch(de){Ye($,$.return,de)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,fs(e,a))));break;case 19:Mt(n,e),zt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,fs(e,o)));break;case 30:break;case 21:break;default:Mt(n,e),zt(e)}}function zt(e){var n=e.flags;if(n&2){try{for(var a,o=e.return;o!==null;){if(yp(o)){a=o;break}o=o.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var f=a.stateNode,m=Tf(e);us(e,m,f);break;case 5:var b=a.stateNode;a.flags&32&&(Za(b,""),a.flags&=-33);var T=Tf(e);us(e,T,b);break;case 3:case 4:var $=a.stateNode.containerInfo,I=Tf(e);Mf(e,I,$);break;default:throw Error(r(161))}}catch(ae){Ye(e,e.return,ae)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Ap(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Ap(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Wn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)wp(e,n.alternate,n),n=n.sibling}function Na(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Ti(4,n,n.return),Na(n);break;case 1:Nn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&gp(n,n.return,a),Na(n);break;case 27:Tr(n.stateNode);case 26:case 5:Nn(n,n.return),Na(n);break;case 22:n.memoizedState===null&&Na(n);break;case 30:Na(n);break;default:Na(n)}e=e.sibling}}function ei(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,f=e,m=n,b=m.flags;switch(m.tag){case 0:case 11:case 15:ei(f,m,a),vr(4,m);break;case 1:if(ei(f,m,a),o=m,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(I){Ye(o,o.return,I)}if(o=m,f=o.updateQueue,f!==null){var T=o.stateNode;try{var $=f.shared.hiddenCallbacks;if($!==null)for(f.shared.hiddenCallbacks=null,f=0;f<$.length;f++)a0($[f],T)}catch(I){Ye(o,o.return,I)}}a&&b&64&&pp(m),br(m,m.return);break;case 27:vp(m);case 26:case 5:ei(f,m,a),a&&o===null&&b&4&&xp(m),br(m,m.return);break;case 12:ei(f,m,a);break;case 31:ei(f,m,a),a&&b&4&&Ep(f,m);break;case 13:ei(f,m,a),a&&b&4&&_p(f,m);break;case 22:m.memoizedState===null&&ei(f,m,a),br(m,m.return);break;case 30:break;default:ei(f,m,a)}n=n.sibling}}function Of(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&rr(a))}function Rf(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&rr(e))}function cn(e,n,a,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Cp(e,n,a,o),n=n.sibling}function Cp(e,n,a,o){var f=n.flags;switch(n.tag){case 0:case 11:case 15:cn(e,n,a,o),f&2048&&vr(9,n);break;case 1:cn(e,n,a,o);break;case 3:cn(e,n,a,o),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&rr(e)));break;case 12:if(f&2048){cn(e,n,a,o),e=n.stateNode;try{var m=n.memoizedProps,b=m.id,T=m.onPostCommit;typeof T=="function"&&T(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch($){Ye(n,n.return,$)}}else cn(e,n,a,o);break;case 31:cn(e,n,a,o);break;case 13:cn(e,n,a,o);break;case 23:break;case 22:m=n.stateNode,b=n.alternate,n.memoizedState!==null?m._visibility&2?cn(e,n,a,o):wr(e,n):m._visibility&2?cn(e,n,a,o):(m._visibility|=2,dl(e,n,a,o,(n.subtreeFlags&10256)!==0||!1)),f&2048&&Of(b,n);break;case 24:cn(e,n,a,o),f&2048&&Rf(n.alternate,n);break;default:cn(e,n,a,o)}}function dl(e,n,a,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var m=e,b=n,T=a,$=o,I=b.flags;switch(b.tag){case 0:case 11:case 15:dl(m,b,T,$,f),vr(8,b);break;case 23:break;case 22:var ae=b.stateNode;b.memoizedState!==null?ae._visibility&2?dl(m,b,T,$,f):wr(m,b):(ae._visibility|=2,dl(m,b,T,$,f)),f&&I&2048&&Of(b.alternate,b);break;case 24:dl(m,b,T,$,f),f&&I&2048&&Rf(b.alternate,b);break;default:dl(m,b,T,$,f)}n=n.sibling}}function wr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,o=n,f=o.flags;switch(o.tag){case 22:wr(a,o),f&2048&&Of(o.alternate,o);break;case 24:wr(a,o),f&2048&&Rf(o.alternate,o);break;default:wr(a,o)}n=n.sibling}}var Sr=8192;function hl(e,n,a){if(e.subtreeFlags&Sr)for(e=e.child;e!==null;)Tp(e,n,a),e=e.sibling}function Tp(e,n,a){switch(e.tag){case 26:hl(e,n,a),e.flags&Sr&&e.memoizedState!==null&&xS(a,sn,e.memoizedState,e.memoizedProps);break;case 5:hl(e,n,a);break;case 3:case 4:var o=sn;sn=_s(e.stateNode.containerInfo),hl(e,n,a),sn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Sr,Sr=16777216,hl(e,n,a),Sr=o):hl(e,n,a));break;default:hl(e,n,a)}}function Mp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Nr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];mt=o,Op(o,e)}Mp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zp(e),e=e.sibling}function zp(e){switch(e.tag){case 0:case 11:case 15:Nr(e),e.flags&2048&&Ti(9,e,e.return);break;case 3:Nr(e);break;case 12:Nr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,ds(e)):Nr(e);break;default:Nr(e)}}function ds(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];mt=o,Op(o,e)}Mp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Ti(8,n,n.return),ds(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,ds(n));break;default:ds(n)}e=e.sibling}}function Op(e,n){for(;mt!==null;){var a=mt;switch(a.tag){case 0:case 11:case 15:Ti(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:rr(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,mt=o;else e:for(a=e;mt!==null;){o=mt;var f=o.sibling,m=o.return;if(Sp(o),o===a){mt=null;break e}if(f!==null){f.return=m,mt=f;break e}mt=m}}}var Ow={getCacheForType:function(e){var n=xt(at),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return xt(at).controller.signal}},Rw=typeof WeakMap=="function"?WeakMap:Map,Ve=0,Ze=null,ze=null,Re=0,$e=0,$t=null,Mi=!1,ml=!1,kf=!1,ti=0,We=0,zi=0,Ea=0,Df=0,Yt=0,pl=0,Er=null,Ot=null,Lf=!1,hs=0,Rp=0,ms=1/0,ps=null,Oi=null,ut=0,Ri=null,gl=null,ni=0,Hf=0,Bf=null,kp=null,_r=0,Uf=null;function qt(){return(Ve&2)!==0&&Re!==0?Re&-Re:M.T!==null?Gf():vo()}function Dp(){if(Yt===0)if((Re&536870912)===0||De){var e=Va;Va<<=1,(Va&3932160)===0&&(Va=262144),Yt=e}else Yt=536870912;return e=Ut.current,e!==null&&(e.flags|=32),Yt}function Rt(e,n,a){(e===Ze&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(xl(e,0),ki(e,Re,Yt,!1)),la(e,a),((Ve&2)===0||e!==Ze)&&(e===Ze&&((Ve&2)===0&&(Ea|=a),We===4&&ki(e,Re,Yt,!1)),En(e))}function Lp(e,n,a){if((Ve&6)!==0)throw Error(r(327));var o=!a&&(n&127)===0&&(n&e.expiredLanes)===0||aa(e,n),f=o?Lw(e,n):$f(e,n,!0),m=o;do{if(f===0){ml&&!o&&ki(e,n,0,!1);break}else{if(a=e.current.alternate,m&&!kw(a)){f=$f(e,n,!1),m=!1;continue}if(f===2){if(m=n,e.errorRecoveryDisabledLanes&m)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var T=e;f=Er;var $=T.current.memoizedState.isDehydrated;if($&&(xl(T,b).flags|=256),b=$f(T,b,!1),b!==2){if(kf&&!$){T.errorRecoveryDisabledLanes|=m,Ea|=m,f=4;break e}m=Ot,Ot=f,m!==null&&(Ot===null?Ot=m:Ot.push.apply(Ot,m))}f=b}if(m=!1,f!==2)continue}}if(f===1){xl(e,0),ki(e,n,0,!0);break}e:{switch(o=e,m=f,m){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:ki(o,n,Yt,!Mi);break e;case 2:Ot=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=hs+300-pt(),10<f)){if(ki(o,n,Yt,!Mi),Ya(o,0,!0)!==0)break e;ni=n,o.timeoutHandle=hg(Hp.bind(null,o,a,Ot,ps,Lf,n,Yt,Ea,pl,Mi,m,"Throttled",-0,0),f);break e}Hp(o,a,Ot,ps,Lf,n,Yt,Ea,pl,Mi,m,null,-0,0)}}break}while(!0);En(e)}function Hp(e,n,a,o,f,m,b,T,$,I,ae,re,J,ee){if(e.timeoutHandle=-1,re=n.subtreeFlags,re&8192||(re&16785408)===16785408){re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$n},Tp(n,m,re);var de=(m&62914560)===m?hs-pt():(m&4194048)===m?Rp-pt():0;if(de=yS(re,de),de!==null){ni=m,e.cancelPendingCommit=de(Gp.bind(null,e,n,m,a,o,f,b,T,$,ae,re,null,J,ee)),ki(e,m,b,!I);return}}Gp(e,n,m,a,o,f,b,T,$)}function kw(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var f=a[o],m=f.getSnapshot;f=f.value;try{if(!Ht(m(),f))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ki(e,n,a,o){n&=~Df,n&=~Ea,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var m=31-Et(f),b=1<<m;o[m]=-1,f&=~b}a!==0&&go(e,a,n)}function gs(){return(Ve&6)===0?(jr(0),!1):!0}function Vf(){if(ze!==null){if($e===0)var e=ze.return;else e=ze,Gn=pa=null,tf(e),ol=null,sr=0,e=ze;for(;e!==null;)mp(e.alternate,e),e=e.return;ze=null}}function xl(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,eS(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ni=0,Vf(),Ze=e,ze=a=qn(e.current,null),Re=n,$e=0,$t=null,Mi=!1,ml=aa(e,n),kf=!1,pl=Yt=Df=Ea=zi=We=0,Ot=Er=null,Lf=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var f=31-Et(o),m=1<<f;n|=e[f],o&=~m}return ti=n,Ho(),a}function Bp(e,n){Ae=null,M.H=gr,n===rl||n===Go?(n=e0(),$e=3):n===qu?(n=e0(),$e=4):$e=n===yf?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,$t=n,ze===null&&(We=1,ls(e,Pt(n,e.current)))}function Up(){var e=Ut.current;return e===null?!0:(Re&4194048)===Re?en===null:(Re&62914560)===Re||(Re&536870912)!==0?e===en:!1}function Vp(){var e=M.H;return M.H=gr,e===null?gr:e}function $p(){var e=M.A;return M.A=Ow,e}function xs(){We=4,Mi||(Re&4194048)!==Re&&Ut.current!==null||(ml=!0),(zi&134217727)===0&&(Ea&134217727)===0||Ze===null||ki(Ze,Re,Yt,!1)}function $f(e,n,a){var o=Ve;Ve|=2;var f=Vp(),m=$p();(Ze!==e||Re!==n)&&(ps=null,xl(e,n)),n=!1;var b=We;e:do try{if($e!==0&&ze!==null){var T=ze,$=$t;switch($e){case 8:Vf(),b=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(n=!0);var I=$e;if($e=0,$t=null,yl(e,T,$,I),a&&ml){b=0;break e}break;default:I=$e,$e=0,$t=null,yl(e,T,$,I)}}Dw(),b=We;break}catch(ae){Bp(e,ae)}while(!0);return n&&e.shellSuspendCounter++,Gn=pa=null,Ve=o,M.H=f,M.A=m,ze===null&&(Ze=null,Re=0,Ho()),b}function Dw(){for(;ze!==null;)Yp(ze)}function Lw(e,n){var a=Ve;Ve|=2;var o=Vp(),f=$p();Ze!==e||Re!==n?(ps=null,ms=pt()+500,xl(e,n)):ml=aa(e,n);e:do try{if($e!==0&&ze!==null){n=ze;var m=$t;t:switch($e){case 1:$e=0,$t=null,yl(e,n,m,1);break;case 2:case 9:if(Jm(m)){$e=0,$t=null,qp(n);break}n=function(){$e!==2&&$e!==9||Ze!==e||($e=7),En(e)},m.then(n,n);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:Jm(m)?($e=0,$t=null,qp(n)):($e=0,$t=null,yl(e,n,m,7));break;case 5:var b=null;switch(ze.tag){case 26:b=ze.memoizedState;case 5:case 27:var T=ze;if(b?Cg(b):T.stateNode.complete){$e=0,$t=null;var $=T.sibling;if($!==null)ze=$;else{var I=T.return;I!==null?(ze=I,ys(I)):ze=null}break t}}$e=0,$t=null,yl(e,n,m,5);break;case 6:$e=0,$t=null,yl(e,n,m,6);break;case 8:Vf(),We=6;break e;default:throw Error(r(462))}}Hw();break}catch(ae){Bp(e,ae)}while(!0);return Gn=pa=null,M.H=o,M.A=f,Ve=a,ze!==null?0:(Ze=null,Re=0,Ho(),We)}function Hw(){for(;ze!==null&&!ea();)Yp(ze)}function Yp(e){var n=dp(e.alternate,e,ti);e.memoizedProps=e.pendingProps,n===null?ys(e):ze=n}function qp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=rp(a,n,n.pendingProps,n.type,void 0,Re);break;case 11:n=rp(a,n,n.pendingProps,n.type.render,n.ref,Re);break;case 5:tf(n);default:mp(a,n),n=ze=$m(n,ti),n=dp(a,n,ti)}e.memoizedProps=e.pendingProps,n===null?ys(e):ze=n}function yl(e,n,a,o){Gn=pa=null,tf(n),ol=null,sr=0;var f=n.return;try{if(_w(e,f,n,a,Re)){We=1,ls(e,Pt(a,e.current)),ze=null;return}}catch(m){if(f!==null)throw ze=f,m;We=1,ls(e,Pt(a,e.current)),ze=null;return}n.flags&32768?(De||o===1?e=!0:ml||(Re&536870912)!==0?e=!1:(Mi=e=!0,(o===2||o===9||o===3||o===6)&&(o=Ut.current,o!==null&&o.tag===13&&(o.flags|=16384))),Xp(n,e)):ys(n)}function ys(e){var n=e;do{if((n.flags&32768)!==0){Xp(n,Mi);return}e=n.return;var a=Cw(n.alternate,n,ti);if(a!==null){ze=a;return}if(n=n.sibling,n!==null){ze=n;return}ze=n=e}while(n!==null);We===0&&(We=5)}function Xp(e,n){do{var a=Tw(e.alternate,e);if(a!==null){a.flags&=32767,ze=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){ze=e;return}ze=e=a}while(e!==null);We=6,ze=null}function Gp(e,n,a,o,f,m,b,T,$){e.cancelPendingCommit=null;do vs();while(ut!==0);if((Ve&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(m=n.lanes|n.childLanes,m|=Cu,au(e,a,m,b,T,$),e===Ze&&(ze=Ze=null,Re=0),gl=n,Ri=e,ni=a,Hf=m,Bf=f,kp=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,$w(na,function(){return Pp(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=M.T,M.T=null,f=H.p,H.p=2,b=Ve,Ve|=4;try{Mw(e,n,a)}finally{Ve=b,H.p=f,M.T=o}}ut=1,Zp(),Qp(),Kp()}}function Zp(){if(ut===1){ut=0;var e=Ri,n=gl,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var o=H.p;H.p=2;var f=Ve;Ve|=4;try{jp(n,e);var m=Wf,b=Om(e.containerInfo),T=m.focusedElem,$=m.selectionRange;if(b!==T&&T&&T.ownerDocument&&zm(T.ownerDocument.documentElement,T)){if($!==null&&Nu(T)){var I=$.start,ae=$.end;if(ae===void 0&&(ae=I),"selectionStart"in T)T.selectionStart=I,T.selectionEnd=Math.min(ae,T.value.length);else{var re=T.ownerDocument||document,J=re&&re.defaultView||window;if(J.getSelection){var ee=J.getSelection(),de=T.textContent.length,Ne=Math.min($.start,de),Ge=$.end===void 0?Ne:Math.min($.end,de);!ee.extend&&Ne>Ge&&(b=Ge,Ge=Ne,Ne=b);var F=Mm(T,Ne),X=Mm(T,Ge);if(F&&X&&(ee.rangeCount!==1||ee.anchorNode!==F.node||ee.anchorOffset!==F.offset||ee.focusNode!==X.node||ee.focusOffset!==X.offset)){var P=re.createRange();P.setStart(F.node,F.offset),ee.removeAllRanges(),Ne>Ge?(ee.addRange(P),ee.extend(X.node,X.offset)):(P.setEnd(X.node,X.offset),ee.addRange(P))}}}}for(re=[],ee=T;ee=ee.parentNode;)ee.nodeType===1&&re.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<re.length;T++){var le=re[T];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}zs=!!Jf,Wf=Jf=null}finally{Ve=f,H.p=o,M.T=a}}e.current=n,ut=2}}function Qp(){if(ut===2){ut=0;var e=Ri,n=gl,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var o=H.p;H.p=2;var f=Ve;Ve|=4;try{wp(e,n.alternate,n)}finally{Ve=f,H.p=o,M.T=a}}ut=3}}function Kp(){if(ut===4||ut===3){ut=0,ta();var e=Ri,n=gl,a=ni,o=kp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?ut=5:(ut=0,gl=Ri=null,Fp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Oi=null),Gl(a),n=n.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(ia,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=M.T,f=H.p,H.p=2,M.T=null;try{for(var m=e.onRecoverableError,b=0;b<o.length;b++){var T=o[b];m(T.value,{componentStack:T.stack})}}finally{M.T=n,H.p=f}}(ni&3)!==0&&vs(),En(e),f=e.pendingLanes,(a&261930)!==0&&(f&42)!==0?e===Uf?_r++:(_r=0,Uf=e):_r=0,jr(0)}}function Fp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,rr(n)))}function vs(){return Zp(),Qp(),Kp(),Pp()}function Pp(){if(ut!==5)return!1;var e=Ri,n=Hf;Hf=0;var a=Gl(ni),o=M.T,f=H.p;try{H.p=32>a?32:a,M.T=null,a=Bf,Bf=null;var m=Ri,b=ni;if(ut=0,gl=Ri=null,ni=0,(Ve&6)!==0)throw Error(r(331));var T=Ve;if(Ve|=4,zp(m.current),Cp(m,m.current,b,a),Ve=T,jr(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(ia,m)}catch{}return!0}finally{H.p=f,M.T=o,Fp(e,n)}}function Ip(e,n,a){n=Pt(a,n),n=xf(e.stateNode,n,2),e=ji(e,n,2),e!==null&&(la(e,2),En(e))}function Ye(e,n,a){if(e.tag===3)Ip(e,e,a);else for(;n!==null;){if(n.tag===3){Ip(n,e,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Oi===null||!Oi.has(o))){e=Pt(a,e),a=J0(2),o=ji(n,a,2),o!==null&&(W0(a,o,n,e),la(o,2),En(o));break}}n=n.return}}function Yf(e,n,a){var o=e.pingCache;if(o===null){o=e.pingCache=new Rw;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(a)||(kf=!0,f.add(a),e=Bw.bind(null,e,n,a),n.then(e,e))}function Bw(e,n,a){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ze===e&&(Re&a)===a&&(We===4||We===3&&(Re&62914560)===Re&&300>pt()-hs?(Ve&2)===0&&xl(e,0):Df|=a,pl===Re&&(pl=0)),En(e)}function Jp(e,n){n===0&&(n=po()),e=da(e,n),e!==null&&(la(e,n),En(e))}function Uw(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Jp(e,a)}function Vw(e,n){var a=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(r(314))}o!==null&&o.delete(n),Jp(e,a)}function $w(e,n){return ln(e,n)}var bs=null,vl=null,qf=!1,ws=!1,Xf=!1,Di=0;function En(e){e!==vl&&e.next===null&&(vl===null?bs=vl=e:vl=vl.next=e),ws=!0,qf||(qf=!0,qw())}function jr(e,n){if(!Xf&&ws){Xf=!0;do for(var a=!1,o=bs;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var m=0;else{var b=o.suspendedLanes,T=o.pingedLanes;m=(1<<31-Et(42|e)+1)-1,m&=f&~(b&~T),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,ng(o,m))}else m=Re,m=Ya(o,o===Ze?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(m&3)===0||aa(o,m)||(a=!0,ng(o,m));o=o.next}while(a);Xf=!1}}function Yw(){Wp()}function Wp(){ws=qf=!1;var e=0;Di!==0&&Ww()&&(e=Di);for(var n=pt(),a=null,o=bs;o!==null;){var f=o.next,m=eg(o,n);m===0?(o.next=null,a===null?bs=f:a.next=f,f===null&&(vl=a)):(a=o,(e!==0||(m&3)!==0)&&(ws=!0)),o=f}ut!==0&&ut!==5||jr(e),Di!==0&&(Di=0)}function eg(e,n){for(var a=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var b=31-Et(m),T=1<<b,$=f[b];$===-1?((T&a)===0||(T&o)!==0)&&(f[b]=iu(T,n)):$<=n&&(e.expiredLanes|=T),m&=~T}if(n=Ze,a=Re,a=Ya(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,a===0||e===n&&($e===2||$e===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Dn(o),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||aa(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(o!==null&&Dn(o),Gl(a)){case 2:case 8:a=di;break;case 32:a=na;break;case 268435456:a=Ba;break;default:a=na}return o=tg.bind(null,e),a=ln(a,o),e.callbackPriority=n,e.callbackNode=a,n}return o!==null&&o!==null&&Dn(o),e.callbackPriority=2,e.callbackNode=null,2}function tg(e,n){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(vs()&&e.callbackNode!==a)return null;var o=Re;return o=Ya(e,e===Ze?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Lp(e,o,n),eg(e,pt()),e.callbackNode!=null&&e.callbackNode===a?tg.bind(null,e):null)}function ng(e,n){if(vs())return null;Lp(e,n,!0)}function qw(){tS(function(){(Ve&6)!==0?ln(Ln,Yw):Wp()})}function Gf(){if(Di===0){var e=al;e===0&&(e=Ua,Ua<<=1,(Ua&261888)===0&&(Ua=256)),Di=e}return Di}function ig(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:To(""+e)}function ag(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function Xw(e,n,a,o,f){if(n==="submit"&&a&&a.stateNode===f){var m=ig((f[wt]||null).action),b=o.submitter;b&&(n=(n=b[wt]||null)?ig(n.formAction):b.getAttribute("formAction"),n!==null&&(m=n,b=null));var T=new Ro("action","action",null,o,f);e.push({event:T,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Di!==0){var $=b?ag(f,b):new FormData(f);ff(a,{pending:!0,data:$,method:f.method,action:m},null,$)}}else typeof m=="function"&&(T.preventDefault(),$=b?ag(f,b):new FormData(f),ff(a,{pending:!0,data:$,method:f.method,action:m},m,$))},currentTarget:f}]})}}for(var Zf=0;Zf<Au.length;Zf++){var Qf=Au[Zf],Gw=Qf.toLowerCase(),Zw=Qf[0].toUpperCase()+Qf.slice(1);on(Gw,"on"+Zw)}on(Dm,"onAnimationEnd"),on(Lm,"onAnimationIteration"),on(Hm,"onAnimationStart"),on("dblclick","onDoubleClick"),on("focusin","onFocus"),on("focusout","onBlur"),on(sw,"onTransitionRun"),on(cw,"onTransitionStart"),on(uw,"onTransitionCancel"),on(Bm,"onTransitionEnd"),xi("onMouseEnter",["mouseout","mouseover"]),xi("onMouseLeave",["mouseout","mouseover"]),xi("onPointerEnter",["pointerout","pointerover"]),xi("onPointerLeave",["pointerout","pointerover"]),Un("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Un("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Un("onBeforeInput",["compositionend","keypress","textInput","paste"]),Un("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Un("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Un("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ar="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(" "),Qw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ar));function lg(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var o=e[a],f=o.event;o=o.listeners;e:{var m=void 0;if(n)for(var b=o.length-1;0<=b;b--){var T=o[b],$=T.instance,I=T.currentTarget;if(T=T.listener,$!==m&&f.isPropagationStopped())break e;m=T,f.currentTarget=I;try{m(f)}catch(ae){Lo(ae)}f.currentTarget=null,m=$}else for(b=0;b<o.length;b++){if(T=o[b],$=T.instance,I=T.currentTarget,T=T.listener,$!==m&&f.isPropagationStopped())break e;m=T,f.currentTarget=I;try{m(f)}catch(ae){Lo(ae)}f.currentTarget=null,m=$}}}}function Oe(e,n){var a=n[qa];a===void 0&&(a=n[qa]=new Set);var o=e+"__bubble";a.has(o)||(rg(n,e,2,!1),a.add(o))}function Kf(e,n,a){var o=0;n&&(o|=4),rg(a,e,o,n)}var Ss="_reactListening"+Math.random().toString(36).slice(2);function Ff(e){if(!e[Ss]){e[Ss]=!0,No.forEach(function(a){a!=="selectionchange"&&(Qw.has(a)||Kf(a,!1,e),Kf(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ss]||(n[Ss]=!0,Kf("selectionchange",!1,n))}}function rg(e,n,a,o){switch(Dg(n)){case 2:var f=wS;break;case 8:f=SS;break;default:f=ud}a=f.bind(null,n,a,e),f=void 0,!mu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,a,{capture:!0,passive:f}):e.addEventListener(n,a,!0):f!==void 0?e.addEventListener(n,a,{passive:f}):e.addEventListener(n,a,!1)}function Pf(e,n,a,o,f){var m=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var T=o.stateNode.containerInfo;if(T===f)break;if(b===4)for(b=o.return;b!==null;){var $=b.tag;if(($===3||$===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;T!==null;){if(b=hi(T),b===null)return;if($=b.tag,$===5||$===6||$===26||$===27){o=m=b;continue e}T=T.parentNode}}o=o.return}fm(function(){var I=m,ae=du(a),re=[];e:{var J=Um.get(e);if(J!==void 0){var ee=Ro,de=e;switch(e){case"keypress":if(zo(a)===0)break e;case"keydown":case"keyup":ee=V2;break;case"focusin":de="focus",ee=yu;break;case"focusout":de="blur",ee=yu;break;case"beforeblur":case"afterblur":ee=yu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=mm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=C2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=q2;break;case Dm:case Lm:case Hm:ee=z2;break;case Bm:ee=G2;break;case"scroll":case"scrollend":ee=j2;break;case"wheel":ee=Q2;break;case"copy":case"cut":case"paste":ee=R2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=gm;break;case"toggle":case"beforetoggle":ee=F2}var Ne=(n&4)!==0,Ge=!Ne&&(e==="scroll"||e==="scrollend"),F=Ne?J!==null?J+"Capture":null:J;Ne=[];for(var X=I,P;X!==null;){var le=X;if(P=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||P===null||F===null||(le=Fl(X,F),le!=null&&Ne.push(Cr(X,le,P))),Ge)break;X=X.return}0<Ne.length&&(J=new ee(J,de,null,a,ae),re.push({event:J,listeners:Ne}))}}if((n&7)===0){e:{if(J=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",J&&a!==fu&&(de=a.relatedTarget||a.fromElement)&&(hi(de)||de[Bn]))break e;if((ee||J)&&(J=ae.window===ae?ae:(J=ae.ownerDocument)?J.defaultView||J.parentWindow:window,ee?(de=a.relatedTarget||a.toElement,ee=I,de=de?hi(de):null,de!==null&&(Ge=c(de),Ne=de.tag,de!==Ge||Ne!==5&&Ne!==27&&Ne!==6)&&(de=null)):(ee=null,de=I),ee!==de)){if(Ne=mm,le="onMouseLeave",F="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=gm,le="onPointerLeave",F="onPointerEnter",X="pointer"),Ge=ee==null?J:pi(ee),P=de==null?J:pi(de),J=new Ne(le,X+"leave",ee,a,ae),J.target=Ge,J.relatedTarget=P,le=null,hi(ae)===I&&(Ne=new Ne(F,X+"enter",de,a,ae),Ne.target=P,Ne.relatedTarget=Ge,le=Ne),Ge=le,ee&&de)t:{for(Ne=Kw,F=ee,X=de,P=0,le=F;le;le=Ne(le))P++;le=0;for(var we=X;we;we=Ne(we))le++;for(;0<P-le;)F=Ne(F),P--;for(;0<le-P;)X=Ne(X),le--;for(;P--;){if(F===X||X!==null&&F===X.alternate){Ne=F;break t}F=Ne(F),X=Ne(X)}Ne=null}else Ne=null;ee!==null&&og(re,J,ee,Ne,!1),de!==null&&Ge!==null&&og(re,Ge,de,Ne,!0)}}e:{if(J=I?pi(I):window,ee=J.nodeName&&J.nodeName.toLowerCase(),ee==="select"||ee==="input"&&J.type==="file")var He=Em;else if(Sm(J))if(_m)He=lw;else{He=iw;var ge=nw}else ee=J.nodeName,!ee||ee.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?I&&uu(I.elementType)&&(He=Em):He=aw;if(He&&(He=He(e,I))){Nm(re,He,a,ae);break e}ge&&ge(e,J,I),e==="focusout"&&I&&J.type==="number"&&I.memoizedProps.value!=null&&Kl(J,"number",J.value)}switch(ge=I?pi(I):window,e){case"focusin":(Sm(ge)||ge.contentEditable==="true")&&(Pa=ge,Eu=I,ir=null);break;case"focusout":ir=Eu=Pa=null;break;case"mousedown":_u=!0;break;case"contextmenu":case"mouseup":case"dragend":_u=!1,Rm(re,a,ae);break;case"selectionchange":if(ow)break;case"keydown":case"keyup":Rm(re,a,ae)}var Ce;if(bu)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else Fa?bm(e,a)&&(ke="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ke="onCompositionStart");ke&&(xm&&a.locale!=="ko"&&(Fa||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Fa&&(Ce=dm()):(vi=ae,pu="value"in vi?vi.value:vi.textContent,Fa=!0)),ge=Ns(I,ke),0<ge.length&&(ke=new pm(ke,e,null,a,ae),re.push({event:ke,listeners:ge}),Ce?ke.data=Ce:(Ce=wm(a),Ce!==null&&(ke.data=Ce)))),(Ce=I2?J2(e,a):W2(e,a))&&(ke=Ns(I,"onBeforeInput"),0<ke.length&&(ge=new pm("onBeforeInput","beforeinput",null,a,ae),re.push({event:ge,listeners:ke}),ge.data=Ce)),Xw(re,e,I,a,ae)}lg(re,n)})}function Cr(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Ns(e,n){for(var a=n+"Capture",o=[];e!==null;){var f=e,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=Fl(e,a),f!=null&&o.unshift(Cr(e,f,m)),f=Fl(e,n),f!=null&&o.push(Cr(e,f,m))),e.tag===3)return o;e=e.return}return[]}function Kw(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function og(e,n,a,o,f){for(var m=n._reactName,b=[];a!==null&&a!==o;){var T=a,$=T.alternate,I=T.stateNode;if(T=T.tag,$!==null&&$===o)break;T!==5&&T!==26&&T!==27||I===null||($=I,f?(I=Fl(a,m),I!=null&&b.unshift(Cr(a,I,$))):f||(I=Fl(a,m),I!=null&&b.push(Cr(a,I,$)))),a=a.return}b.length!==0&&e.push({event:n,listeners:b})}var Fw=/\r\n?/g,Pw=/\u0000|\uFFFD/g;function sg(e){return(typeof e=="string"?e:""+e).replace(Fw,`
49
+ `).replace(Pw,"")}function cg(e,n){return n=sg(n),sg(e)===n}function Xe(e,n,a,o,f,m){switch(a){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||Za(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&Za(e,""+o);break;case"className":Ga(e,"class",o);break;case"tabIndex":Ga(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Ga(e,a,o);break;case"style":cm(e,o,m);break;case"data":if(n!=="object"){Ga(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=To(""+o),e.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(a==="formAction"?(n!=="input"&&Xe(e,n,"name",f.name,f,null),Xe(e,n,"formEncType",f.formEncType,f,null),Xe(e,n,"formMethod",f.formMethod,f,null),Xe(e,n,"formTarget",f.formTarget,f,null)):(Xe(e,n,"encType",f.encType,f,null),Xe(e,n,"method",f.method,f,null),Xe(e,n,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(a);break}o=To(""+o),e.setAttribute(a,o);break;case"onClick":o!=null&&(e.onclick=$n);break;case"onScroll":o!=null&&Oe("scroll",e);break;case"onScrollEnd":o!=null&&Oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(a=o.__html,a!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}a=To(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""+o):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":o===!0?e.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(a,o):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(a,o):e.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(a):e.setAttribute(a,o);break;case"popover":Oe("beforetoggle",e),Oe("toggle",e),Xa(e,"popover",o);break;case"xlinkActuate":rn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":rn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":rn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":rn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":rn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":rn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":rn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":rn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":rn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Xa(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=E2.get(a)||a,Xa(e,a,o))}}function If(e,n,a,o,f,m){switch(a){case"style":cm(e,o,m);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(a=o.__html,a!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof o=="string"?Za(e,o):(typeof o=="number"||typeof o=="bigint")&&Za(e,""+o);break;case"onScroll":o!=null&&Oe("scroll",e);break;case"onScrollEnd":o!=null&&Oe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=$n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Eo.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),n=a.slice(2,f?a.length-7:void 0),m=e[wt]||null,m=m!=null?m[a]:null,typeof m=="function"&&e.removeEventListener(n,m,f),typeof o=="function")){typeof m!="function"&&m!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,o,f);break e}a in e?e[a]=o:o===!0?e.setAttribute(a,""):Xa(e,a,o)}}}function vt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",e),Oe("load",e);var o=!1,f=!1,m;for(m in a)if(a.hasOwnProperty(m)){var b=a[m];if(b!=null)switch(m){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Xe(e,n,m,b,a,null)}}f&&Xe(e,n,"srcSet",a.srcSet,a,null),o&&Xe(e,n,"src",a.src,a,null);return;case"input":Oe("invalid",e);var T=m=b=f=null,$=null,I=null;for(o in a)if(a.hasOwnProperty(o)){var ae=a[o];if(ae!=null)switch(o){case"name":f=ae;break;case"type":b=ae;break;case"checked":$=ae;break;case"defaultChecked":I=ae;break;case"value":m=ae;break;case"defaultValue":T=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,n));break;default:Xe(e,n,o,ae,a,null)}}Co(e,m,T,$,I,b,f,!1);return;case"select":Oe("invalid",e),o=b=m=null;for(f in a)if(a.hasOwnProperty(f)&&(T=a[f],T!=null))switch(f){case"value":m=T;break;case"defaultValue":b=T;break;case"multiple":o=T;default:Xe(e,n,f,T,a,null)}n=m,a=b,e.multiple=!!o,n!=null?Vn(e,!!o,n,!1):a!=null&&Vn(e,!!o,a,!0);return;case"textarea":Oe("invalid",e),m=f=o=null;for(b in a)if(a.hasOwnProperty(b)&&(T=a[b],T!=null))switch(b){case"value":o=T;break;case"defaultValue":f=T;break;case"children":m=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:Xe(e,n,b,T,a,null)}om(e,o,f,m);return;case"option":for($ in a)if(a.hasOwnProperty($)&&(o=a[$],o!=null))switch($){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Xe(e,n,$,o,a,null)}return;case"dialog":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(o=0;o<Ar.length;o++)Oe(Ar[o],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(I in a)if(a.hasOwnProperty(I)&&(o=a[I],o!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Xe(e,n,I,o,a,null)}return;default:if(uu(n)){for(ae in a)a.hasOwnProperty(ae)&&(o=a[ae],o!==void 0&&If(e,n,ae,o,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(o=a[T],o!=null&&Xe(e,n,T,o,a,null))}function Iw(e,n,a,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,b=null,T=null,$=null,I=null,ae=null;for(ee in a){var re=a[ee];if(a.hasOwnProperty(ee)&&re!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":$=re;default:o.hasOwnProperty(ee)||Xe(e,n,ee,null,o,re)}}for(var J in o){var ee=o[J];if(re=a[J],o.hasOwnProperty(J)&&(ee!=null||re!=null))switch(J){case"type":m=ee;break;case"name":f=ee;break;case"checked":I=ee;break;case"defaultChecked":ae=ee;break;case"value":b=ee;break;case"defaultValue":T=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,n));break;default:ee!==re&&Xe(e,n,J,ee,o,re)}}sa(e,b,T,$,I,ae,m,f);return;case"select":ee=b=T=J=null;for(m in a)if($=a[m],a.hasOwnProperty(m)&&$!=null)switch(m){case"value":break;case"multiple":ee=$;default:o.hasOwnProperty(m)||Xe(e,n,m,null,o,$)}for(f in o)if(m=o[f],$=a[f],o.hasOwnProperty(f)&&(m!=null||$!=null))switch(f){case"value":J=m;break;case"defaultValue":T=m;break;case"multiple":b=m;default:m!==$&&Xe(e,n,f,m,o,$)}n=T,a=b,o=ee,J!=null?Vn(e,!!a,J,!1):!!o!=!!a&&(n!=null?Vn(e,!!a,n,!0):Vn(e,!!a,a?[]:"",!1));return;case"textarea":ee=J=null;for(T in a)if(f=a[T],a.hasOwnProperty(T)&&f!=null&&!o.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Xe(e,n,T,null,o,f)}for(b in o)if(f=o[b],m=a[b],o.hasOwnProperty(b)&&(f!=null||m!=null))switch(b){case"value":J=f;break;case"defaultValue":ee=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==m&&Xe(e,n,b,f,o,m)}rm(e,J,ee);return;case"option":for(var de in a)if(J=a[de],a.hasOwnProperty(de)&&J!=null&&!o.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:Xe(e,n,de,null,o,J)}for($ in o)if(J=o[$],ee=a[$],o.hasOwnProperty($)&&J!==ee&&(J!=null||ee!=null))switch($){case"selected":e.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:Xe(e,n,$,J,o,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ne in a)J=a[Ne],a.hasOwnProperty(Ne)&&J!=null&&!o.hasOwnProperty(Ne)&&Xe(e,n,Ne,null,o,J);for(I in o)if(J=o[I],ee=a[I],o.hasOwnProperty(I)&&J!==ee&&(J!=null||ee!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,n));break;default:Xe(e,n,I,J,o,ee)}return;default:if(uu(n)){for(var Ge in a)J=a[Ge],a.hasOwnProperty(Ge)&&J!==void 0&&!o.hasOwnProperty(Ge)&&If(e,n,Ge,void 0,o,J);for(ae in o)J=o[ae],ee=a[ae],!o.hasOwnProperty(ae)||J===ee||J===void 0&&ee===void 0||If(e,n,ae,J,o,ee);return}}for(var F in a)J=a[F],a.hasOwnProperty(F)&&J!=null&&!o.hasOwnProperty(F)&&Xe(e,n,F,null,o,J);for(re in o)J=o[re],ee=a[re],!o.hasOwnProperty(re)||J===ee||J==null&&ee==null||Xe(e,n,re,J,o,ee)}function ug(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Jw(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var f=a[o],m=f.transferSize,b=f.initiatorType,T=f.duration;if(m&&T&&ug(b)){for(b=0,T=f.responseEnd,o+=1;o<a.length;o++){var $=a[o],I=$.startTime;if(I>T)break;var ae=$.transferSize,re=$.initiatorType;ae&&ug(re)&&($=$.responseEnd,b+=ae*($<T?1:(T-I)/($-I)))}if(--o,n+=8*(m+b)/(f.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Jf=null,Wf=null;function Es(e){return e.nodeType===9?e:e.ownerDocument}function fg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function dg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function ed(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var td=null;function Ww(){var e=window.event;return e&&e.type==="popstate"?e===td?!1:(td=e,!0):(td=null,!1)}var hg=typeof setTimeout=="function"?setTimeout:void 0,eS=typeof clearTimeout=="function"?clearTimeout:void 0,mg=typeof Promise=="function"?Promise:void 0,tS=typeof queueMicrotask=="function"?queueMicrotask:typeof mg<"u"?function(e){return mg.resolve(null).then(e).catch(nS)}:hg;function nS(e){setTimeout(function(){throw e})}function Li(e){return e==="head"}function pg(e,n){var a=n,o=0;do{var f=a.nextSibling;if(e.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(o===0){e.removeChild(f),Nl(n);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")Tr(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Tr(a);for(var m=a.firstChild;m;){var b=m.nextSibling,T=m.nodeName;m[ra]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&m.rel.toLowerCase()==="stylesheet"||a.removeChild(m),m=b}}else a==="body"&&Tr(e.ownerDocument.body);a=f}while(a);Nl(n)}function gg(e,n){var a=e;e=0;do{var o=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=o}while(a)}function nd(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":nd(a),Zl(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function iS(e,n,a,o){for(;e.nodeType===1;){var f=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[ra])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(m=e.getAttribute("src"),(m!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===m)return e}else return e;if(e=tn(e.nextSibling),e===null)break}return null}function aS(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=tn(e.nextSibling),e===null))return null;return e}function xg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=tn(e.nextSibling),e===null))return null;return e}function id(e){return e.data==="$?"||e.data==="$~"}function ad(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function lS(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var o=function(){n(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function tn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var ld=null;function yg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return tn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function vg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function bg(e,n,a){switch(n=Es(a),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Tr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Zl(e)}var nn=new Map,wg=new Set;function _s(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ii=H.d;H.d={f:rS,r:oS,D:sS,C:cS,L:uS,m:fS,X:hS,S:dS,M:mS};function rS(){var e=ii.f(),n=gs();return e||n}function oS(e){var n=mi(e);n!==null&&n.tag===5&&n.type==="form"?B0(n):ii.r(e)}var bl=typeof document>"u"?null:document;function Sg(e,n,a){var o=bl;if(o&&typeof n=="string"&&n){var f=At(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),wg.has(f)||(wg.add(f),e={rel:e,crossOrigin:a,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),vt(n,"link",e),it(n),o.head.appendChild(n)))}}function sS(e){ii.D(e),Sg("dns-prefetch",e,null)}function cS(e,n){ii.C(e,n),Sg("preconnect",e,n)}function uS(e,n,a){ii.L(e,n,a);var o=bl;if(o&&e&&n){var f='link[rel="preload"][as="'+At(n)+'"]';n==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+At(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+At(a.imageSizes)+'"]')):f+='[href="'+At(e)+'"]';var m=f;switch(n){case"style":m=wl(e);break;case"script":m=Sl(e)}nn.has(m)||(e=x({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),nn.set(m,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(Mr(m))||n==="script"&&o.querySelector(zr(m))||(n=o.createElement("link"),vt(n,"link",e),it(n),o.head.appendChild(n)))}}function fS(e,n){ii.m(e,n);var a=bl;if(a&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+At(o)+'"][href="'+At(e)+'"]',m=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Sl(e)}if(!nn.has(m)&&(e=x({rel:"modulepreload",href:e},n),nn.set(m,e),a.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(zr(m)))return}o=a.createElement("link"),vt(o,"link",e),it(o),a.head.appendChild(o)}}}function dS(e,n,a){ii.S(e,n,a);var o=bl;if(o&&e){var f=gi(o).hoistableStyles,m=wl(e);n=n||"default";var b=f.get(m);if(!b){var T={loading:0,preload:null};if(b=o.querySelector(Mr(m)))T.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":n},a),(a=nn.get(m))&&rd(e,a);var $=b=o.createElement("link");it($),vt($,"link",e),$._p=new Promise(function(I,ae){$.onload=I,$.onerror=ae}),$.addEventListener("load",function(){T.loading|=1}),$.addEventListener("error",function(){T.loading|=2}),T.loading|=4,js(b,n,o)}b={type:"stylesheet",instance:b,count:1,state:T},f.set(m,b)}}}function hS(e,n){ii.X(e,n);var a=bl;if(a&&e){var o=gi(a).hoistableScripts,f=Sl(e),m=o.get(f);m||(m=a.querySelector(zr(f)),m||(e=x({src:e,async:!0},n),(n=nn.get(f))&&od(e,n),m=a.createElement("script"),it(m),vt(m,"link",e),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(f,m))}}function mS(e,n){ii.M(e,n);var a=bl;if(a&&e){var o=gi(a).hoistableScripts,f=Sl(e),m=o.get(f);m||(m=a.querySelector(zr(f)),m||(e=x({src:e,async:!0,type:"module"},n),(n=nn.get(f))&&od(e,n),m=a.createElement("script"),it(m),vt(m,"link",e),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(f,m))}}function Ng(e,n,a,o){var f=(f=se.current)?_s(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=wl(a.href),a=gi(f).hoistableStyles,o=a.get(n),o||(o={type:"style",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=wl(a.href);var m=gi(f).hoistableStyles,b=m.get(e);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(e,b),(m=f.querySelector(Mr(e)))&&!m._p&&(b.instance=m,b.state.loading=5),nn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},nn.set(e,a),m||pS(f,e,a,b.state))),n&&o===null)throw Error(r(528,""));return b}if(n&&o!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Sl(a),a=gi(f).hoistableScripts,o=a.get(n),o||(o={type:"script",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function wl(e){return'href="'+At(e)+'"'}function Mr(e){return'link[rel="stylesheet"]['+e+"]"}function Eg(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function pS(e,n,a,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),vt(n,"link",a),it(n),e.head.appendChild(n))}function Sl(e){return'[src="'+At(e)+'"]'}function zr(e){return"script[async]"+e}function _g(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+At(a.href)+'"]');if(o)return n.instance=o,it(o),o;var f=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),it(o),vt(o,"style",f),js(o,a.precedence,e),n.instance=o;case"stylesheet":f=wl(a.href);var m=e.querySelector(Mr(f));if(m)return n.state.loading|=4,n.instance=m,it(m),m;o=Eg(a),(f=nn.get(f))&&rd(o,f),m=(e.ownerDocument||e).createElement("link"),it(m);var b=m;return b._p=new Promise(function(T,$){b.onload=T,b.onerror=$}),vt(m,"link",o),n.state.loading|=4,js(m,a.precedence,e),n.instance=m;case"script":return m=Sl(a.src),(f=e.querySelector(zr(m)))?(n.instance=f,it(f),f):(o=a,(f=nn.get(m))&&(o=x({},a),od(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),it(f),vt(f,"link",o),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,js(o,a.precedence,e));return n.instance}function js(e,n,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,m=f,b=0;b<o.length;b++){var T=o[b];if(T.dataset.precedence===n)m=T;else if(m!==f)break}m?m.parentNode.insertBefore(e,m.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function rd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function od(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var As=null;function jg(e,n,a){if(As===null){var o=new Map,f=As=new Map;f.set(a,o)}else f=As,o=f.get(a),o||(o=new Map,f.set(a,o));if(o.has(e))return o;for(o.set(e,null),a=a.getElementsByTagName(e),f=0;f<a.length;f++){var m=a[f];if(!(m[ra]||m[ct]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var b=m.getAttribute(n)||"";b=e+b;var T=o.get(b);T?T.push(m):o.set(b,[m])}}return o}function Ag(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function gS(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Cg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function xS(e,n,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=wl(o.href),m=n.querySelector(Mr(f));if(m){n=m._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Cs.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=m,it(m);return}m=n.ownerDocument||n,o=Eg(o),(f=nn.get(f))&&rd(o,f),m=m.createElement("link"),it(m);var b=m;b._p=new Promise(function(T,$){b.onload=T,b.onerror=$}),vt(m,"link",o),a.instance=m}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Cs.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var sd=0;function yS(e,n){return e.stylesheets&&e.count===0&&Ms(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var o=setTimeout(function(){if(e.stylesheets&&Ms(e,e.stylesheets),e.unsuspend){var m=e.unsuspend;e.unsuspend=null,m()}},6e4+n);0<e.imgBytes&&sd===0&&(sd=62500*Jw());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ms(e,e.stylesheets),e.unsuspend)){var m=e.unsuspend;e.unsuspend=null,m()}},(e.imgBytes>sd?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Cs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ms(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ts=null;function Ms(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ts=new Map,n.forEach(vS,e),Ts=null,Cs.call(e))}function vS(e,n){if(!(n.state.loading&4)){var a=Ts.get(e);if(a)var o=a.get(null);else{a=new Map,Ts.set(e,a);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var b=f[m];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),o=b)}o&&a.set(null,o)}f=n.instance,b=f.getAttribute("data-precedence"),m=a.get(b)||o,m===o&&a.set(null,f),a.set(b,f),this.count++,o=Cs.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),m?m.parentNode.insertBefore(f,m.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Or={$$typeof:N,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function bS(e,n,a,o,f,m,b,T,$){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ql(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ql(0),this.hiddenUpdates=ql(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function Tg(e,n,a,o,f,m,b,T,$,I,ae,re){return e=new bS(e,n,a,b,$,I,ae,re,T),n=1,m===!0&&(n|=24),m=Bt(3,null,null,n),e.current=m,m.stateNode=e,n=Vu(),n.refCount++,e.pooledCache=n,n.refCount++,m.memoizedState={element:o,isDehydrated:a,cache:n},Xu(m),e}function Mg(e){return e?(e=Wa,e):Wa}function zg(e,n,a,o,f,m){f=Mg(f),o.context===null?o.context=f:o.pendingContext=f,o=_i(n),o.payload={element:a},m=m===void 0?null:m,m!==null&&(o.callback=m),a=ji(e,o,n),a!==null&&(Rt(a,e,n),ur(a,e,n))}function Og(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function cd(e,n){Og(e,n),(e=e.alternate)&&Og(e,n)}function Rg(e){if(e.tag===13||e.tag===31){var n=da(e,67108864);n!==null&&Rt(n,e,67108864),cd(e,67108864)}}function kg(e){if(e.tag===13||e.tag===31){var n=qt();n=Xl(n);var a=da(e,n);a!==null&&Rt(a,e,n),cd(e,n)}}var zs=!0;function wS(e,n,a,o){var f=M.T;M.T=null;var m=H.p;try{H.p=2,ud(e,n,a,o)}finally{H.p=m,M.T=f}}function SS(e,n,a,o){var f=M.T;M.T=null;var m=H.p;try{H.p=8,ud(e,n,a,o)}finally{H.p=m,M.T=f}}function ud(e,n,a,o){if(zs){var f=fd(o);if(f===null)Pf(e,n,o,Os,a),Lg(e,o);else if(ES(f,e,n,a,o))o.stopPropagation();else if(Lg(e,o),n&4&&-1<NS.indexOf(e)){for(;f!==null;){var m=mi(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var b=Hn(m.pendingLanes);if(b!==0){var T=m;for(T.pendingLanes|=2,T.entangledLanes|=2;b;){var $=1<<31-Et(b);T.entanglements[1]|=$,b&=~$}En(m),(Ve&6)===0&&(ms=pt()+500,jr(0))}}break;case 31:case 13:T=da(m,2),T!==null&&Rt(T,m,2),gs(),cd(m,2)}if(m=fd(o),m===null&&Pf(e,n,o,Os,a),m===f)break;f=m}f!==null&&o.stopPropagation()}else Pf(e,n,o,null,a)}}function fd(e){return e=du(e),dd(e)}var Os=null;function dd(e){if(Os=null,e=hi(e),e!==null){var n=c(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=u(n),e!==null)return e;e=null}else if(a===31){if(e=h(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Os=e,null}function Dg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ha()){case Ln:return 2;case di:return 8;case na:case Ic:return 32;case Ba:return 268435456;default:return 32}default:return 32}}var hd=!1,Hi=null,Bi=null,Ui=null,Rr=new Map,kr=new Map,Vi=[],NS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Lg(e,n){switch(e){case"focusin":case"focusout":Hi=null;break;case"dragenter":case"dragleave":Bi=null;break;case"mouseover":case"mouseout":Ui=null;break;case"pointerover":case"pointerout":Rr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":kr.delete(n.pointerId)}}function Dr(e,n,a,o,f,m){return e===null||e.nativeEvent!==m?(e={blockedOn:n,domEventName:a,eventSystemFlags:o,nativeEvent:m,targetContainers:[f]},n!==null&&(n=mi(n),n!==null&&Rg(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function ES(e,n,a,o,f){switch(n){case"focusin":return Hi=Dr(Hi,e,n,a,o,f),!0;case"dragenter":return Bi=Dr(Bi,e,n,a,o,f),!0;case"mouseover":return Ui=Dr(Ui,e,n,a,o,f),!0;case"pointerover":var m=f.pointerId;return Rr.set(m,Dr(Rr.get(m)||null,e,n,a,o,f)),!0;case"gotpointercapture":return m=f.pointerId,kr.set(m,Dr(kr.get(m)||null,e,n,a,o,f)),!0}return!1}function Hg(e){var n=hi(e.target);if(n!==null){var a=c(n);if(a!==null){if(n=a.tag,n===13){if(n=u(a),n!==null){e.blockedOn=n,bo(e.priority,function(){kg(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,bo(e.priority,function(){kg(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rs(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=fd(e.nativeEvent);if(a===null){a=e.nativeEvent;var o=new a.constructor(a.type,a);fu=o,a.target.dispatchEvent(o),fu=null}else return n=mi(a),n!==null&&Rg(n),e.blockedOn=a,!1;n.shift()}return!0}function Bg(e,n,a){Rs(e)&&a.delete(n)}function _S(){hd=!1,Hi!==null&&Rs(Hi)&&(Hi=null),Bi!==null&&Rs(Bi)&&(Bi=null),Ui!==null&&Rs(Ui)&&(Ui=null),Rr.forEach(Bg),kr.forEach(Bg)}function ks(e,n){e.blockedOn===n&&(e.blockedOn=null,hd||(hd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,_S)))}var Ds=null;function Ug(e){Ds!==e&&(Ds=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ds===e&&(Ds=null);for(var n=0;n<e.length;n+=3){var a=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(dd(o||a)===null)continue;break}var m=mi(a);m!==null&&(e.splice(n,3),n-=3,ff(m,{pending:!0,data:f,method:a.method,action:o},o,f))}}))}function Nl(e){function n($){return ks($,e)}Hi!==null&&ks(Hi,e),Bi!==null&&ks(Bi,e),Ui!==null&&ks(Ui,e),Rr.forEach(n),kr.forEach(n);for(var a=0;a<Vi.length;a++){var o=Vi[a];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Vi.length&&(a=Vi[0],a.blockedOn===null);)Hg(a),a.blockedOn===null&&Vi.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var f=a[o],m=a[o+1],b=f[wt]||null;if(typeof m=="function")b||Ug(a);else if(b){var T=null;if(m&&m.hasAttribute("formAction")){if(f=m,b=m[wt]||null)T=b.formAction;else if(dd(f)!==null)continue}else T=b.action;typeof T=="function"?a[o+1]=T:(a.splice(o,3),o-=3),Ug(a)}}}function Vg(){function e(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function md(e){this._internalRoot=e}Ls.prototype.render=md.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,o=qt();zg(a,o,e,n,null,null)},Ls.prototype.unmount=md.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;zg(e.current,2,null,e,null,null),gs(),n[Bn]=null}};function Ls(e){this._internalRoot=e}Ls.prototype.unstable_scheduleHydration=function(e){if(e){var n=vo();e={blockedOn:null,target:e,priority:n};for(var a=0;a<Vi.length&&n!==0&&n<Vi[a].priority;a++);Vi.splice(a,0,e),a===0&&Hg(e)}};var $g=i.version;if($g!=="19.2.4")throw Error(r(527,$g,"19.2.4"));H.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var jS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hs.isDisabled&&Hs.supportsFiber)try{ia=Hs.inject(jS),Nt=Hs}catch{}}return Hr.createRoot=function(e,n){if(!s(e))throw Error(r(299));var a=!1,o="",f=K0,m=F0,b=P0;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=Tg(e,1,!1,null,null,a,o,null,f,m,b,Vg),e[Bn]=n.current,Ff(e),new md(n)},Hr.hydrateRoot=function(e,n,a){if(!s(e))throw Error(r(299));var o=!1,f="",m=K0,b=F0,T=P0,$=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.formState!==void 0&&($=a.formState)),n=Tg(e,1,!0,n,a??null,o,f,$,m,b,T,Vg),n.context=Mg(null),a=n.current,o=qt(),o=Xl(o),f=_i(o),f.callback=null,ji(a,f,o),a=o,n.current.lanes=a,la(n,a),En(n),e[Bn]=n.current,Ff(e),new Ls(n)},Hr.version="19.2.4",Hr}var Ig;function LS(){if(Ig)return xd.exports;Ig=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),xd.exports=DS(),xd.exports}var HS=LS();function Yy(){const[t,i]=C.useState({status:"connecting",sources:[],lastChecked:null,error:null,isRefreshing:!1}),l=C.useCallback(async()=>{i(r=>({...r,isRefreshing:!0}));try{const r=await fetch("/api/files");if(!r.ok)throw new Error(`HTTP ${r.status}`);const s=await r.json(),c=Object.entries(s).map(([u,h])=>({id:u,path:(h==null?void 0:h.path)||`~/${u}`,connected:h!==null}));i({status:"connected",sources:c,lastChecked:new Date,error:null,isRefreshing:!1})}catch(r){i(s=>({...s,status:"error",error:r instanceof Error?r.message:"Connection failed",lastChecked:new Date,isRefreshing:!1}))}},[]);return C.useEffect(()=>{l()},[l]),{...t,refresh:l}}const Jg=t=>{let i;const l=new Set,r=(p,y)=>{const x=typeof p=="function"?p(i):p;if(!Object.is(x,i)){const v=i;i=y??(typeof x!="object"||x===null)?x:Object.assign({},i,x),l.forEach(w=>w(i,v))}},s=()=>i,h={setState:r,getState:s,getInitialState:()=>g,subscribe:p=>(l.add(p),()=>l.delete(p))},g=i=t(r,s,h);return h},BS=(t=>t?Jg(t):Jg),US=t=>t;function VS(t,i=US){const l=Xt.useSyncExternalStore(t.subscribe,Xt.useCallback(()=>i(t.getState()),[t,i]),Xt.useCallback(()=>i(t.getInitialState()),[t,i]));return Xt.useDebugValue(l),l}const Wg=t=>{const i=BS(t),l=r=>VS(i,r);return Object.assign(l,i),l},Nc=(t=>t?Wg(t):Wg),qy=Nc((t,i)=>({toasts:[],addToast:l=>{const r=Math.random().toString(36).substring(2,9),s=l.duration??4e3;t(c=>({toasts:[...c.toasts,{...l,id:r}]})),setTimeout(()=>{i().removeToast(r)},s)},removeToast:l=>{t(r=>({toasts:r.toasts.filter(s=>s.id!==l)}))},clearToasts:()=>{t({toasts:[]})}}));function $S(){const{addToast:t,removeToast:i,clearToasts:l}=qy();return{toast:h=>{t(h)},success:(h,g)=>{t({title:h,description:g,variant:"success"})},error:(h,g)=>{t({title:h,description:g,variant:"error"})},info:(h,g)=>{t({title:h,description:g,variant:"info"})},removeToast:i,clearToasts:l}}function Xy(t){var i,l,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(i=0;i<s;i++)t[i]&&(l=Xy(t[i]))&&(r&&(r+=" "),r+=l)}else for(l in t)t[l]&&(r&&(r+=" "),r+=l);return r}function Gy(){for(var t,i,l=0,r="",s=arguments.length;l<s;l++)(t=arguments[l])&&(i=Xy(t))&&(r&&(r+=" "),r+=i);return r}const YS=(t,i)=>{const l=new Array(t.length+i.length);for(let r=0;r<t.length;r++)l[r]=t[r];for(let r=0;r<i.length;r++)l[t.length+r]=i[r];return l},qS=(t,i)=>({classGroupId:t,validator:i}),Zy=(t=new Map,i=null,l)=>({nextPart:t,validators:i,classGroupId:l}),lc="-",ex=[],XS="arbitrary..",GS=t=>{const i=QS(t),{conflictingClassGroups:l,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return ZS(u);const h=u.split(lc),g=h[0]===""&&h.length>1?1:0;return Qy(h,g,i)},getConflictingClassGroupIds:(u,h)=>{if(h){const g=r[u],p=l[u];return g?p?YS(p,g):g:p||ex}return l[u]||ex}}},Qy=(t,i,l)=>{if(t.length-i===0)return l.classGroupId;const s=t[i],c=l.nextPart.get(s);if(c){const p=Qy(t,i+1,c);if(p)return p}const u=l.validators;if(u===null)return;const h=i===0?t.join(lc):t.slice(i).join(lc),g=u.length;for(let p=0;p<g;p++){const y=u[p];if(y.validator(h))return y.classGroupId}},ZS=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=t.slice(1,-1),l=i.indexOf(":"),r=i.slice(0,l);return r?XS+r:void 0})(),QS=t=>{const{theme:i,classGroups:l}=t;return KS(l,i)},KS=(t,i)=>{const l=Zy();for(const r in t){const s=t[r];gh(s,l,r,i)}return l},gh=(t,i,l,r)=>{const s=t.length;for(let c=0;c<s;c++){const u=t[c];FS(u,i,l,r)}},FS=(t,i,l,r)=>{if(typeof t=="string"){PS(t,i,l);return}if(typeof t=="function"){IS(t,i,l,r);return}JS(t,i,l,r)},PS=(t,i,l)=>{const r=t===""?i:Ky(i,t);r.classGroupId=l},IS=(t,i,l,r)=>{if(WS(t)){gh(t(r),i,l,r);return}i.validators===null&&(i.validators=[]),i.validators.push(qS(l,t))},JS=(t,i,l,r)=>{const s=Object.entries(t),c=s.length;for(let u=0;u<c;u++){const[h,g]=s[u];gh(g,Ky(i,h),l,r)}},Ky=(t,i)=>{let l=t;const r=i.split(lc),s=r.length;for(let c=0;c<s;c++){const u=r[c];let h=l.nextPart.get(u);h||(h=Zy(),l.nextPart.set(u,h)),l=h}return l},WS=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,eN=t=>{if(t<1)return{get:()=>{},set:()=>{}};let i=0,l=Object.create(null),r=Object.create(null);const s=(c,u)=>{l[c]=u,i++,i>t&&(i=0,r=l,l=Object.create(null))};return{get(c){let u=l[c];if(u!==void 0)return u;if((u=r[c])!==void 0)return s(c,u),u},set(c,u){c in l?l[c]=u:s(c,u)}}},Yd="!",tx=":",tN=[],nx=(t,i,l,r,s)=>({modifiers:t,hasImportantModifier:i,baseClassName:l,maybePostfixModifierPosition:r,isExternal:s}),nN=t=>{const{prefix:i,experimentalParseClassName:l}=t;let r=s=>{const c=[];let u=0,h=0,g=0,p;const y=s.length;for(let _=0;_<y;_++){const E=s[_];if(u===0&&h===0){if(E===tx){c.push(s.slice(g,_)),g=_+1;continue}if(E==="/"){p=_;continue}}E==="["?u++:E==="]"?u--:E==="("?h++:E===")"&&h--}const x=c.length===0?s:s.slice(g);let v=x,w=!1;x.endsWith(Yd)?(v=x.slice(0,-1),w=!0):x.startsWith(Yd)&&(v=x.slice(1),w=!0);const S=p&&p>g?p-g:void 0;return nx(c,w,v,S)};if(i){const s=i+tx,c=r;r=u=>u.startsWith(s)?c(u.slice(s.length)):nx(tN,!1,u,void 0,!0)}if(l){const s=r;r=c=>l({className:c,parseClassName:s})}return r},iN=t=>{const i=new Map;return t.orderSensitiveModifiers.forEach((l,r)=>{i.set(l,1e6+r)}),l=>{const r=[];let s=[];for(let c=0;c<l.length;c++){const u=l[c],h=u[0]==="[",g=i.has(u);h||g?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(u)):s.push(u)}return s.length>0&&(s.sort(),r.push(...s)),r}},aN=t=>({cache:eN(t.cacheSize),parseClassName:nN(t),sortModifiers:iN(t),...GS(t)}),lN=/\s+/,rN=(t,i)=>{const{parseClassName:l,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:c}=i,u=[],h=t.trim().split(lN);let g="";for(let p=h.length-1;p>=0;p-=1){const y=h[p],{isExternal:x,modifiers:v,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:_}=l(y);if(x){g=y+(g.length>0?" "+g:g);continue}let E=!!_,j=r(E?S.substring(0,_):S);if(!j){if(!E){g=y+(g.length>0?" "+g:g);continue}if(j=r(S),!j){g=y+(g.length>0?" "+g:g);continue}E=!1}const R=v.length===0?"":v.length===1?v[0]:c(v).join(":"),N=w?R+Yd:R,A=N+j;if(u.indexOf(A)>-1)continue;u.push(A);const z=s(j,E);for(let k=0;k<z.length;++k){const L=z[k];u.push(N+L)}g=y+(g.length>0?" "+g:g)}return g},oN=(...t)=>{let i=0,l,r,s="";for(;i<t.length;)(l=t[i++])&&(r=Fy(l))&&(s&&(s+=" "),s+=r);return s},Fy=t=>{if(typeof t=="string")return t;let i,l="";for(let r=0;r<t.length;r++)t[r]&&(i=Fy(t[r]))&&(l&&(l+=" "),l+=i);return l},sN=(t,...i)=>{let l,r,s,c;const u=g=>{const p=i.reduce((y,x)=>x(y),t());return l=aN(p),r=l.cache.get,s=l.cache.set,c=h,h(g)},h=g=>{const p=r(g);if(p)return p;const y=rN(g,l);return s(g,y),y};return c=u,(...g)=>c(oN(...g))},cN=[],ft=t=>{const i=l=>l[t]||cN;return i.isThemeGetter=!0,i},Py=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Iy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,uN=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,fN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yi=t=>uN.test(t),Te=t=>!!t&&!Number.isNaN(Number(t)),qi=t=>!!t&&Number.isInteger(Number(t)),wd=t=>t.endsWith("%")&&Te(t.slice(0,-1)),ai=t=>fN.test(t),Jy=()=>!0,gN=t=>dN.test(t)&&!hN.test(t),xh=()=>!1,xN=t=>mN.test(t),yN=t=>pN.test(t),vN=t=>!he(t)&&!pe(t),bN=t=>Wi(t,tv,xh),he=t=>Py.test(t),_a=t=>Wi(t,nv,gN),ix=t=>Wi(t,CN,Te),wN=t=>Wi(t,av,Jy),SN=t=>Wi(t,iv,xh),ax=t=>Wi(t,Wy,xh),NN=t=>Wi(t,ev,yN),Bs=t=>Wi(t,lv,xN),pe=t=>Iy.test(t),Br=t=>La(t,nv),EN=t=>La(t,iv),lx=t=>La(t,Wy),_N=t=>La(t,tv),jN=t=>La(t,ev),Us=t=>La(t,lv,!0),AN=t=>La(t,av,!0),Wi=(t,i,l)=>{const r=Py.exec(t);return r?r[1]?i(r[1]):l(r[2]):!1},La=(t,i,l=!1)=>{const r=Iy.exec(t);return r?r[1]?i(r[1]):l:!1},Wy=t=>t==="position"||t==="percentage",ev=t=>t==="image"||t==="url",tv=t=>t==="length"||t==="size"||t==="bg-size",nv=t=>t==="length",CN=t=>t==="number",iv=t=>t==="family-name",av=t=>t==="number"||t==="weight",lv=t=>t==="shadow",TN=()=>{const t=ft("color"),i=ft("font"),l=ft("text"),r=ft("font-weight"),s=ft("tracking"),c=ft("leading"),u=ft("breakpoint"),h=ft("container"),g=ft("spacing"),p=ft("radius"),y=ft("shadow"),x=ft("inset-shadow"),v=ft("text-shadow"),w=ft("drop-shadow"),S=ft("blur"),_=ft("perspective"),E=ft("aspect"),j=ft("ease"),R=ft("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...A(),pe,he],k=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],U=()=>[pe,he,g],K=()=>[Yi,"full","auto",...U()],ie=()=>[qi,"none","subgrid",pe,he],G=()=>["auto",{span:["full",qi,pe,he]},qi,pe,he],Q=()=>[qi,"auto",pe,he],te=()=>["auto","min","max","fr",pe,he],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Z=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...U()],H=()=>[Yi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],B=()=>[Yi,"screen","full","dvw","lvw","svw","min","max","fit",...U()],Y=()=>[Yi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],q=()=>[t,pe,he],O=()=>[...A(),lx,ax,{position:[pe,he]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",_N,bN,{size:[pe,he]}],ne=()=>[wd,Br,_a],oe=()=>["","none","full",p,pe,he],se=()=>["",Te,Br,_a],fe=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[Te,wd,lx,ax],Ee=()=>["","none",S,pe,he],ve=()=>["none",Te,pe,he],xe=()=>["none",Te,pe,he],me=()=>[Te,pe,he],_e=()=>[Yi,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ai],breakpoint:[ai],color:[Jy],container:[ai],"drop-shadow":[ai],ease:["in","out","in-out"],font:[vN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ai],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ai],shadow:[ai],spacing:["px",Te],text:[ai],"text-shadow":[ai],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Yi,he,pe,E]}],container:["container"],columns:[{columns:[Te,he,pe,h]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:z()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[qi,"auto",pe,he]}],basis:[{basis:[Yi,"full","auto",h,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,Yi,"auto","initial","none",he]}],grow:[{grow:["",Te,pe,he]}],shrink:[{shrink:["",Te,pe,he]}],order:[{order:[qi,"first","last","none",pe,he]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...Z(),"normal"]}],"justify-self":[{"justify-self":["auto",...Z()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...Z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Z(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...Z(),"baseline"]}],"place-self":[{"place-self":["auto",...Z()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...Y()]}],"min-block-size":[{"min-block":["auto",...Y()]}],"max-block-size":[{"max-block":["none",...Y()]}],w:[{w:[h,"screen",...H()]}],"min-w":[{"min-w":[h,"screen","none",...H()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[u]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",l,Br,_a]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,AN,wN]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wd,he]}],"font-family":[{font:[EN,SN,i]}],"font-features":[{"font-features":[he]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,pe,he]}],"line-clamp":[{"line-clamp":[Te,"none",pe,ix]}],leading:[{leading:[c,...U()]}],"list-image":[{"list-image":["none",pe,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",pe,_a]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[Te,"auto",pe,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qi,pe,he],radial:["",pe,he],conic:[qi,pe,he]},jN,NN]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-bs":[{"border-bs":q()}],"border-color-be":[{"border-be":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,pe,he]}],"outline-w":[{outline:["",Te,Br,_a]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",y,Us,Bs]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",x,Us,Bs]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[Te,_a]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",v,Us,Bs]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[Te,pe,he]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[pe,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,he]}],filter:[{filter:["","none",pe,he]}],blur:[{blur:Ee()}],brightness:[{brightness:[Te,pe,he]}],contrast:[{contrast:[Te,pe,he]}],"drop-shadow":[{"drop-shadow":["","none",w,Us,Bs]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",Te,pe,he]}],"hue-rotate":[{"hue-rotate":[Te,pe,he]}],invert:[{invert:["",Te,pe,he]}],saturate:[{saturate:[Te,pe,he]}],sepia:[{sepia:["",Te,pe,he]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,he]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Te,pe,he]}],"backdrop-contrast":[{"backdrop-contrast":[Te,pe,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,pe,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,pe,he]}],"backdrop-invert":[{"backdrop-invert":["",Te,pe,he]}],"backdrop-opacity":[{"backdrop-opacity":[Te,pe,he]}],"backdrop-saturate":[{"backdrop-saturate":[Te,pe,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,pe,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",pe,he]}],ease:[{ease:["linear","initial",j,pe,he]}],delay:[{delay:[Te,pe,he]}],animate:[{animate:["none",R,pe,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,pe,he]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:ve()}],"rotate-x":[{"rotate-x":ve()}],"rotate-y":[{"rotate-y":ve()}],"rotate-z":[{"rotate-z":ve()}],scale:[{scale:xe()}],"scale-x":[{"scale-x":xe()}],"scale-y":[{"scale-y":xe()}],"scale-z":[{"scale-z":xe()}],"scale-3d":["scale-3d"],skew:[{skew:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[pe,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe,he]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[Te,Br,_a,ix]}],stroke:[{stroke:["none",...q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},MN=sN(TN);function Se(...t){return MN(Gy(t))}/**
50
+ * @license lucide-react v0.563.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */const rv=(...t)=>t.filter((i,l,r)=>!!i&&i.trim()!==""&&r.indexOf(i)===l).join(" ").trim();/**
55
+ * @license lucide-react v0.563.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */const zN=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
60
+ * @license lucide-react v0.563.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */const ON=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,l,r)=>r?r.toUpperCase():l.toLowerCase());/**
65
+ * @license lucide-react v0.563.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const rx=t=>{const i=ON(t);return i.charAt(0).toUpperCase()+i.slice(1)};/**
70
+ * @license lucide-react v0.563.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */var RN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
75
+ * @license lucide-react v0.563.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const kN=t=>{for(const i in t)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};/**
80
+ * @license lucide-react v0.563.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */const DN=C.forwardRef(({color:t="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:r,className:s="",children:c,iconNode:u,...h},g)=>C.createElement("svg",{ref:g,...RN,width:i,height:i,stroke:t,strokeWidth:r?Number(l)*24/Number(i):l,className:rv("lucide",s),...!c&&!kN(h)&&{"aria-hidden":"true"},...h},[...u.map(([p,y])=>C.createElement(p,y)),...Array.isArray(c)?c:[c]]));/**
85
+ * @license lucide-react v0.563.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */const ye=(t,i)=>{const l=C.forwardRef(({className:r,...s},c)=>C.createElement(DN,{ref:c,iconNode:i,className:rv(`lucide-${zN(rx(t))}`,`lucide-${t}`,r),...s}));return l.displayName=rx(t),l};/**
90
+ * @license lucide-react v0.563.0 - ISC
91
+ *
92
+ * This source code is licensed under the ISC license.
93
+ * See the LICENSE file in the root directory of this source tree.
94
+ */const LN=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],ov=ye("activity",LN);/**
95
+ * @license lucide-react v0.563.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ */const HN=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],sv=ye("archive",HN);/**
100
+ * @license lucide-react v0.563.0 - ISC
101
+ *
102
+ * This source code is licensed under the ISC license.
103
+ * See the LICENSE file in the root directory of this source tree.
104
+ */const BN=[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2",key:"p02svl"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2",key:"xm4xkj"}],["path",{d:"M6 20h4",key:"1i6q5t"}],["path",{d:"M14 10h4",key:"ru81e7"}],["path",{d:"M6 14h2v6",key:"16z9wg"}],["path",{d:"M14 4h2v6",key:"1idq9u"}]],cv=ye("binary",BN);/**
105
+ * @license lucide-react v0.563.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */const UN=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],uv=ye("book-open",UN);/**
110
+ * @license lucide-react v0.563.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */const VN=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Vl=ye("brain",VN);/**
115
+ * @license lucide-react v0.563.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */const $N=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],fv=ye("calendar",$N);/**
120
+ * @license lucide-react v0.563.0 - ISC
121
+ *
122
+ * This source code is licensed under the ISC license.
123
+ * See the LICENSE file in the root directory of this source tree.
124
+ */const YN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],An=ye("check",YN);/**
125
+ * @license lucide-react v0.563.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */const qN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dv=ye("chevron-down",qN);/**
130
+ * @license lucide-react v0.563.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */const XN=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],GN=ye("chevron-left",XN);/**
135
+ * @license lucide-react v0.563.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */const ZN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],QN=ye("chevron-right",ZN);/**
140
+ * @license lucide-react v0.563.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */const KN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],hv=ye("circle-alert",KN);/**
145
+ * @license lucide-react v0.563.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */const FN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],PN=ye("circle-check",FN);/**
150
+ * @license lucide-react v0.563.0 - ISC
151
+ *
152
+ * This source code is licensed under the ISC license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */const IN=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],mv=ye("clock",IN);/**
155
+ * @license lucide-react v0.563.0 - ISC
156
+ *
157
+ * This source code is licensed under the ISC license.
158
+ * See the LICENSE file in the root directory of this source tree.
159
+ */const JN=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],yh=ye("cpu",JN);/**
160
+ * @license lucide-react v0.563.0 - ISC
161
+ *
162
+ * This source code is licensed under the ISC license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */const WN=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],pv=ye("database",WN);/**
165
+ * @license lucide-react v0.563.0 - ISC
166
+ *
167
+ * This source code is licensed under the ISC license.
168
+ * See the LICENSE file in the root directory of this source tree.
169
+ */const eE=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],tE=ye("download",eE);/**
170
+ * @license lucide-react v0.563.0 - ISC
171
+ *
172
+ * This source code is licensed under the ISC license.
173
+ * See the LICENSE file in the root directory of this source tree.
174
+ */const nE=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],iE=ye("eye-off",nE);/**
175
+ * @license lucide-react v0.563.0 - ISC
176
+ *
177
+ * This source code is licensed under the ISC license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ */const aE=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],vh=ye("eye",aE);/**
180
+ * @license lucide-react v0.563.0 - ISC
181
+ *
182
+ * This source code is licensed under the ISC license.
183
+ * See the LICENSE file in the root directory of this source tree.
184
+ */const lE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],rE=ye("file-braces",lE);/**
185
+ * @license lucide-react v0.563.0 - ISC
186
+ *
187
+ * This source code is licensed under the ISC license.
188
+ * See the LICENSE file in the root directory of this source tree.
189
+ */const oE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],gv=ye("file-code",oE);/**
190
+ * @license lucide-react v0.563.0 - ISC
191
+ *
192
+ * This source code is licensed under the ISC license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */const sE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ao=ye("file-text",sE);/**
195
+ * @license lucide-react v0.563.0 - ISC
196
+ *
197
+ * This source code is licensed under the ISC license.
198
+ * See the LICENSE file in the root directory of this source tree.
199
+ */const cE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M11 18h2",key:"12mj7e"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5",key:"qbrxap"}]],uE=ye("file-type",cE);/**
200
+ * @license lucide-react v0.563.0 - ISC
201
+ *
202
+ * This source code is licensed under the ISC license.
203
+ * See the LICENSE file in the root directory of this source tree.
204
+ */const fE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],dE=ye("file",fE);/**
205
+ * @license lucide-react v0.563.0 - ISC
206
+ *
207
+ * This source code is licensed under the ISC license.
208
+ * See the LICENSE file in the root directory of this source tree.
209
+ */const hE=[["circle",{cx:"15",cy:"19",r:"2",key:"u2pros"}],["path",{d:"M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1",key:"1jj40k"}],["path",{d:"M15 11v-1",key:"cntcp"}],["path",{d:"M15 17v-2",key:"1279jj"}]],mE=ye("folder-archive",hE);/**
210
+ * @license lucide-react v0.563.0 - ISC
211
+ *
212
+ * This source code is licensed under the ISC license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */const pE=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]],gE=ye("folder-check",pE);/**
215
+ * @license lucide-react v0.563.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */const xE=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Ki=ye("folder-open",xE);/**
220
+ * @license lucide-react v0.563.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */const yE=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],bh=ye("folder",yE);/**
225
+ * @license lucide-react v0.563.0 - ISC
226
+ *
227
+ * This source code is licensed under the ISC license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */const vE=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]],bE=ye("folder-x",vE);/**
230
+ * @license lucide-react v0.563.0 - ISC
231
+ *
232
+ * This source code is licensed under the ISC license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */const wE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],xv=ye("globe",wE);/**
235
+ * @license lucide-react v0.563.0 - ISC
236
+ *
237
+ * This source code is licensed under the ISC license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */const SE=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Ec=ye("hard-drive",SE);/**
240
+ * @license lucide-react v0.563.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */const NE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],yv=ye("image",NE);/**
245
+ * @license lucide-react v0.563.0 - ISC
246
+ *
247
+ * This source code is licensed under the ISC license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */const EE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rc=ye("info",EE);/**
250
+ * @license lucide-react v0.563.0 - ISC
251
+ *
252
+ * This source code is licensed under the ISC license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */const _E=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],jE=ye("layers",_E);/**
255
+ * @license lucide-react v0.563.0 - ISC
256
+ *
257
+ * This source code is licensed under the ISC license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ */const AE=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],vv=ye("layout-dashboard",AE);/**
260
+ * @license lucide-react v0.563.0 - ISC
261
+ *
262
+ * This source code is licensed under the ISC license.
263
+ * See the LICENSE file in the root directory of this source tree.
264
+ */const CE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],TE=ye("loader-circle",CE);/**
265
+ * @license lucide-react v0.563.0 - ISC
266
+ *
267
+ * This source code is licensed under the ISC license.
268
+ * See the LICENSE file in the root directory of this source tree.
269
+ */const ME=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],bv=ye("lock",ME);/**
270
+ * @license lucide-react v0.563.0 - ISC
271
+ *
272
+ * This source code is licensed under the ISC license.
273
+ * See the LICENSE file in the root directory of this source tree.
274
+ */const zE=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],OE=ye("message-square",zE);/**
275
+ * @license lucide-react v0.563.0 - ISC
276
+ *
277
+ * This source code is licensed under the ISC license.
278
+ * See the LICENSE file in the root directory of this source tree.
279
+ */const RE=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],kE=ye("monitor",RE);/**
280
+ * @license lucide-react v0.563.0 - ISC
281
+ *
282
+ * This source code is licensed under the ISC license.
283
+ * See the LICENSE file in the root directory of this source tree.
284
+ */const DE=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],LE=ye("moon",DE);/**
285
+ * @license lucide-react v0.563.0 - ISC
286
+ *
287
+ * This source code is licensed under the ISC license.
288
+ * See the LICENSE file in the root directory of this source tree.
289
+ */const HE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],BE=ye("plus",HE);/**
290
+ * @license lucide-react v0.563.0 - ISC
291
+ *
292
+ * This source code is licensed under the ISC license.
293
+ * See the LICENSE file in the root directory of this source tree.
294
+ */const UE=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],wv=ye("radio",UE);/**
295
+ * @license lucide-react v0.563.0 - ISC
296
+ *
297
+ * This source code is licensed under the ISC license.
298
+ * See the LICENSE file in the root directory of this source tree.
299
+ */const VE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],$E=ye("refresh-cw",VE);/**
300
+ * @license lucide-react v0.563.0 - ISC
301
+ *
302
+ * This source code is licensed under the ISC license.
303
+ * See the LICENSE file in the root directory of this source tree.
304
+ */const YE=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],_c=ye("scroll-text",YE);/**
305
+ * @license lucide-react v0.563.0 - ISC
306
+ *
307
+ * This source code is licensed under the ISC license.
308
+ * See the LICENSE file in the root directory of this source tree.
309
+ */const qE=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],XE=ye("search",qE);/**
310
+ * @license lucide-react v0.563.0 - ISC
311
+ *
312
+ * This source code is licensed under the ISC license.
313
+ * See the LICENSE file in the root directory of this source tree.
314
+ */const GE=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],ZE=ye("server",GE);/**
315
+ * @license lucide-react v0.563.0 - ISC
316
+ *
317
+ * This source code is licensed under the ISC license.
318
+ * See the LICENSE file in the root directory of this source tree.
319
+ */const QE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],wh=ye("settings",QE);/**
320
+ * @license lucide-react v0.563.0 - ISC
321
+ *
322
+ * This source code is licensed under the ISC license.
323
+ * See the LICENSE file in the root directory of this source tree.
324
+ */const KE=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],ox=ye("shield-off",KE);/**
325
+ * @license lucide-react v0.563.0 - ISC
326
+ *
327
+ * This source code is licensed under the ISC license.
328
+ * See the LICENSE file in the root directory of this source tree.
329
+ */const FE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],qr=ye("shield",FE);/**
330
+ * @license lucide-react v0.563.0 - ISC
331
+ *
332
+ * This source code is licensed under the ISC license.
333
+ * See the LICENSE file in the root directory of this source tree.
334
+ */const PE=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Sv=ye("sparkles",PE);/**
335
+ * @license lucide-react v0.563.0 - ISC
336
+ *
337
+ * This source code is licensed under the ISC license.
338
+ * See the LICENSE file in the root directory of this source tree.
339
+ */const IE=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],JE=ye("sun",IE);/**
340
+ * @license lucide-react v0.563.0 - ISC
341
+ *
342
+ * This source code is licensed under the ISC license.
343
+ * See the LICENSE file in the root directory of this source tree.
344
+ */const WE=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Nv=ye("trash-2",WE);/**
345
+ * @license lucide-react v0.563.0 - ISC
346
+ *
347
+ * This source code is licensed under the ISC license.
348
+ * See the LICENSE file in the root directory of this source tree.
349
+ */const e4=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],t4=ye("trending-up",e4);/**
350
+ * @license lucide-react v0.563.0 - ISC
351
+ *
352
+ * This source code is licensed under the ISC license.
353
+ * See the LICENSE file in the root directory of this source tree.
354
+ */const n4=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],i4=ye("user",n4);/**
355
+ * @license lucide-react v0.563.0 - ISC
356
+ *
357
+ * This source code is licensed under the ISC license.
358
+ * See the LICENSE file in the root directory of this source tree.
359
+ */const a4=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Sh=ye("wifi-off",a4);/**
360
+ * @license lucide-react v0.563.0 - ISC
361
+ *
362
+ * This source code is licensed under the ISC license.
363
+ * See the LICENSE file in the root directory of this source tree.
364
+ */const l4=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Ev=ye("wifi",l4);/**
365
+ * @license lucide-react v0.563.0 - ISC
366
+ *
367
+ * This source code is licensed under the ISC license.
368
+ * See the LICENSE file in the root directory of this source tree.
369
+ */const r4=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],qd=ye("workflow",r4);/**
370
+ * @license lucide-react v0.563.0 - ISC
371
+ *
372
+ * This source code is licensed under the ISC license.
373
+ * See the LICENSE file in the root directory of this source tree.
374
+ */const o4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],jc=ye("x",o4);/**
375
+ * @license lucide-react v0.563.0 - ISC
376
+ *
377
+ * This source code is licensed under the ISC license.
378
+ * See the LICENSE file in the root directory of this source tree.
379
+ */const s4=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],_v=ye("zap",s4);function c4(t,i){let l;try{l=t()}catch{return}return{getItem:s=>{var c;const u=g=>g===null?null:JSON.parse(g,void 0),h=(c=l.getItem(s))!=null?c:null;return h instanceof Promise?h.then(u):u(h)},setItem:(s,c)=>l.setItem(s,JSON.stringify(c,void 0)),removeItem:s=>l.removeItem(s)}}const Xd=t=>i=>{try{const l=t(i);return l instanceof Promise?l:{then(r){return Xd(r)(l)},catch(r){return this}}}catch(l){return{then(r){return this},catch(r){return Xd(r)(l)}}}},u4=(t,i)=>(l,r,s)=>{let c={storage:c4(()=>window.localStorage),partialize:E=>E,version:0,merge:(E,j)=>({...j,...E}),...i},u=!1,h=0;const g=new Set,p=new Set;let y=c.storage;if(!y)return t((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),l(...E)},r,s);const x=()=>{const E=c.partialize({...r()});return y.setItem(c.name,{state:E,version:c.version})},v=s.setState;s.setState=(E,j)=>(v(E,j),x());const w=t((...E)=>(l(...E),x()),r,s);s.getInitialState=()=>w;let S;const _=()=>{var E,j;if(!y)return;const R=++h;u=!1,g.forEach(A=>{var z;return A((z=r())!=null?z:w)});const N=((j=c.onRehydrateStorage)==null?void 0:j.call(c,(E=r())!=null?E:w))||void 0;return Xd(y.getItem.bind(y))(c.name).then(A=>{if(A)if(typeof A.version=="number"&&A.version!==c.version){if(c.migrate){const z=c.migrate(A.state,A.version);return z instanceof Promise?z.then(k=>[!0,k]):[!0,z]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,A.state];return[!1,void 0]}).then(A=>{var z;if(R!==h)return;const[k,L]=A;if(S=c.merge(L,(z=r())!=null?z:w),l(S,!0),k)return x()}).then(()=>{R===h&&(N==null||N(S,void 0),S=r(),u=!0,p.forEach(A=>A(S)))}).catch(A=>{R===h&&(N==null||N(void 0,A))})};return s.persist={setOptions:E=>{c={...c,...E},E.storage&&(y=E.storage)},clearStorage:()=>{y==null||y.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>_(),hasHydrated:()=>u,onHydrate:E=>(g.add(E),()=>{g.delete(E)}),onFinishHydration:E=>(p.add(E),()=>{p.delete(E)})},c.skipHydration||_(),S||w},Nh=u4,Eh=Nc()(Nh(t=>({theme:"dark",setTheme:i=>t({theme:i})}),{name:"memory-mapper-theme"}));function _h(t){const i=document.documentElement,l=window.matchMedia("(prefers-color-scheme: dark)").matches,r=t==="dark"||t==="system"&&l;i.classList.remove("light","dark"),i.classList.add(r?"dark":"light"),i.style.colorScheme=r?"dark":"light"}function f4(){const{theme:t,setTheme:i}=Eh();return C.useEffect(()=>{_h(t)},[t]),{theme:t,setTheme:i}}const sx=[{value:"dark",icon:LE,label:"Dark mode"},{value:"light",icon:JE,label:"Light mode"},{value:"system",icon:kE,label:"System theme"}];function d4(){const{theme:t,setTheme:i}=f4(),l=sx.findIndex(r=>r.value===t);return d.jsxs("div",{className:Se("relative flex items-center gap-1 p-1 rounded-lg","bg-secondary/50 border border-border"),role:"radiogroup","aria-label":"Theme selection",children:[d.jsx("div",{className:"absolute top-1 h-6 w-8 rounded border-[1.5px] border-foreground/70 pointer-events-none",style:{left:`${4+l*36}px`,transition:"left 250ms cubic-bezier(0.4, 0, 0.2, 1)"}}),sx.map(r=>{const s=r.icon,c=t===r.value;return d.jsx("button",{onClick:()=>i(r.value),role:"radio","aria-checked":c,"aria-label":r.label,className:Se("relative z-10 flex items-center justify-center w-8 h-6 rounded cursor-pointer","transition-colors duration-200",c?"text-foreground":"text-muted-foreground hover:text-foreground"),children:d.jsx(s,{className:"w-4 h-4"})},r.value)})]})}function h4(){const{status:t,sources:i,refresh:l}=Yy(),{success:r,error:s}=$S(),[c,u]=C.useState("idle"),h=async()=>{if(c==="idle"){u("refreshing");try{await l(),await new Promise(p=>setTimeout(p,600)),u("done"),r("Data refreshed","All sources updated successfully")}catch{u("idle"),s("Refresh failed","Could not connect to server");return}setTimeout(()=>u("idle"),1e3)}},g=i.filter(p=>p.connected);return d.jsxs("header",{className:"h-12 flex items-center justify-between px-4 border-b border-border bg-background/80 backdrop-blur-sm",children:[d.jsxs("div",{className:"flex items-center gap-5",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:Se("w-2 h-2 rounded-full",t==="connected"&&"bg-emerald-500",t==="connecting"&&"bg-amber-500",t==="error"&&"bg-red-500")}),t==="connected"&&d.jsx("div",{className:"absolute inset-0 w-2 h-2 rounded-full bg-emerald-500 animate-ping opacity-75"})]}),d.jsxs("span",{className:Se("text-xs font-medium",t==="connected"?"text-emerald-400":"text-muted-foreground"),children:[t==="connecting"&&"Connecting...",t==="connected"&&"Connected",t==="error"&&"Disconnected"]})]}),t==="connected"&&g.length>0&&d.jsx("div",{className:"w-px h-4 bg-border/50"}),t==="connected"&&g.length>0&&d.jsx("div",{className:"flex items-center gap-3 text-xs",children:g.map(p=>d.jsx(m4,{label:p.path,connected:p.connected,icon:Ec},p.id))})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsxs("button",{onClick:h,disabled:c!=="idle",className:Se("group flex items-center gap-2 px-3 py-1.5 rounded-lg cursor-pointer","text-xs font-medium transition-all duration-200 ease-out","border active:scale-[0.98]","disabled:cursor-not-allowed disabled:opacity-70",c==="idle"&&"border-border bg-secondary text-foreground hover:bg-secondary/80",c==="refreshing"&&"border-primary/30 bg-primary/10 text-primary",c==="done"&&"border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400"),children:[c==="done"?d.jsx(An,{className:"w-3.5 h-3.5"}):d.jsx($E,{className:Se("w-3.5 h-3.5",c==="idle"&&"group-hover:rotate-180",c==="refreshing"&&"animate-spin"),style:{transition:"transform 500ms cubic-bezier(0.4, 0, 0.2, 1)"}}),d.jsxs("span",{children:[c==="idle"&&"Refresh",c==="refreshing"&&"Syncing...",c==="done"&&"Done"]})]}),d.jsx(d4,{})]})]})}function m4({label:t,connected:i,icon:l}){return d.jsxs("span",{className:Se("flex items-center gap-1.5 px-2 py-1 rounded-md transition-colors duration-200",i?"text-foreground bg-emerald-500/10 border border-emerald-500/20":"text-muted-foreground bg-secondary"),children:[d.jsx(l,{className:Se("w-3 h-3",i?"text-emerald-600 dark:text-emerald-400":"text-muted-foreground")}),d.jsx("span",{className:"font-mono text-[11px]",children:t})]})}const cx=[];async function ux(t){const i=t.filter(l=>l.enabled&&l.detected).map(l=>({id:l.id,path:l.path}));await fetch("/api/config/sources",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sources:i})})}const Ma=Nc()(Nh((t,i)=>({completed:!1,sources:cx,completedAt:null,agentName:"",setAgentName:l=>t({agentName:l}),completeOnboarding:()=>{const{sources:l}=i();ux(l).catch(console.error),t({completed:!0,completedAt:new Date().toISOString()})},resetOnboarding:()=>t({completed:!1,sources:cx,completedAt:null,agentName:""}),setSources:l=>t({sources:l}),toggleSource:l=>t(r=>({sources:r.sources.map(s=>s.id===l?{...s,enabled:!s.enabled}:s)})),updateSourcePath:(l,r)=>t(s=>({sources:s.sources.map(c=>c.id===l?{...c,path:r,detected:!1}:c)})),syncSourcesToServer:async()=>{const{sources:l}=i();await ux(l)},addSource:()=>{const l=`custom-${Date.now()}`;return t(r=>({sources:[...r.sources,{id:l,name:"",path:"",enabled:!0,detected:!1}]})),l},removeSource:l=>t(r=>({sources:r.sources.filter(s=>s.id!==l)}))}),{name:"openclaw-memory-mapper-onboarding"})),p4=[{id:"architecture",label:"Architecture",icon:qd,color:"258 90% 66%"},{id:"files",label:"Files",icon:Ki,color:"38 92% 50%"},{id:"timeline",label:"Timeline",icon:mv,color:"190 90% 50%"},{id:"logs",label:"Logs",icon:_c,color:"160 84% 39%"},{id:"security",label:"Security",icon:qr,color:"142 76% 36%"}],Vs={id:"overview",label:"Overview",icon:vv,color:"220 90% 56%"};function fx({item:t,isActive:i,label:l,onClick:r}){const s=t.icon;return d.jsxs("button",{onClick:r,className:"group relative flex items-center gap-4 px-4 py-4 rounded-xl text-base cursor-pointer",style:{color:i?`hsl(${t.color})`:"hsl(var(--muted-foreground))",background:i?`linear-gradient(135deg, hsl(${t.color} / 0.15), hsl(${t.color} / 0.05))`:"transparent",boxShadow:i?`inset 0 0 0 1.5px hsl(${t.color} / 0.5), 0 0 20px hsl(${t.color} / 0.15)`:"inset 0 0 0 1.5px transparent, 0 0 20px transparent",transition:"color 300ms ease, background 300ms ease, box-shadow 300ms ease"},onMouseEnter:c=>{i||(c.currentTarget.style.color="hsl(var(--foreground))")},onMouseLeave:c=>{i||(c.currentTarget.style.color="hsl(var(--muted-foreground))")},children:[d.jsx(s,{className:"w-5 h-5",style:{color:"inherit",transition:"color 300ms ease"}}),d.jsx("span",{className:"font-medium",children:l})]})}function g4({children:t}){const[i,l]=C.useState("architecture"),{completed:r,syncSourcesToServer:s,agentName:c}=Ma();return C.useEffect(()=>{r&&s().catch(console.error)},[r,s]),d.jsxs("div",{className:"h-screen flex flex-col bg-background text-foreground",children:[d.jsx(h4,{}),d.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[d.jsxs("nav",{className:"w-56 flex flex-col border-r",style:{backgroundColor:"hsl(var(--sidebar-bg))",borderColor:"hsl(var(--sidebar-border))"},children:[d.jsxs("div",{className:"px-4 py-5 flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-xl bg-primary/10 ring-1 ring-primary/20",children:d.jsx(Vl,{className:"w-4 h-4 text-primary"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground tracking-tight",children:"Memory Mapper"}),d.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider font-medium",children:c||"OpenClaw"})]})]}),d.jsx("div",{className:"mx-4 h-px bg-border/60"}),d.jsxs("div",{className:"flex-1 flex flex-col p-3 pt-4",children:[d.jsx("div",{className:"flex flex-col gap-1 flex-1",children:p4.map(u=>d.jsx(fx,{item:u,isActive:i===u.id,label:u.id==="architecture"?c?`${c}'s Memory`:"Agent Memory":u.label,onClick:()=>l(u.id)},u.id))}),d.jsx("div",{className:"mx-1 h-px bg-border/40 my-2"}),d.jsx(fx,{item:Vs,isActive:i===Vs.id,label:Vs.label,onClick:()=>l(Vs.id)})]}),d.jsx("div",{className:"px-4 py-4 border-t",style:{borderColor:"hsl(var(--sidebar-border))"},children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider font-medium",children:"Version"}),d.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:"1.2.0"})]})})]}),d.jsx("main",{className:"flex-1 overflow-auto bg-background",children:t(i)})]})]})}const jh=Nc()(Nh((t,i)=>({entries:[],isPaused:!1,maxEntries:500,logActivity:l=>{if(i().isPaused)return;const r={...l,id:Math.random().toString(36).substring(2,9),timestamp:new Date().toISOString()};t(s=>({entries:[r,...s.entries].slice(0,s.maxEntries)}))},clearLog:()=>t({entries:[]}),togglePause:()=>t(l=>({isPaused:!l.isPaused})),setPaused:l=>t({isPaused:l})}),{name:"openclaw-memory-mapper-activity-log",partialize:t=>({entries:t.entries.slice(0,100),isPaused:t.isPaused})}));function x4(t){const i=["Timestamp","Type","Path","Source","Success","Size"],l=t.map(r=>{var s;return[r.timestamp,r.type,r.path,r.source,r.success?"Yes":"No",((s=r.size)==null?void 0:s.toString())||""]});return[i,...l].map(r=>r.join(",")).join(`
380
+ `)}function Ac(){const[t,i]=C.useState(null),[l,r]=C.useState(!0),[s,c]=C.useState(null),{logActivity:u,isPaused:h}=jh(),g=C.useCallback(async()=>{if(!h){r(!0);try{const p=await fetch("/api/files");if(!p.ok)throw new Error(`HTTP ${p.status}`);const y=await p.json();i(y),c(null),Object.entries(y).forEach(([x,v])=>{if(v){const w=v.path||`~/${x}`;u({type:"LIST",path:w,source:x,success:!0})}})}catch(p){c(p instanceof Error?p.message:"Failed to load files"),u({type:"LIST",path:"/api/files",source:"api",success:!1})}finally{r(!1)}}},[h,u]);return C.useEffect(()=>{g()},[g]),{data:t,loading:l,error:s,refresh:g}}function y4(){const[t,i]=C.useState(null),[l,r]=C.useState(!1),[s,c]=C.useState(null),{logActivity:u,isPaused:h}=jh(),g=C.useCallback(async(y,x)=>{if(!h){r(!0);try{const v=await fetch(`/api/file?path=${encodeURIComponent(y)}&source=${x}`);if(!v.ok)throw v.status===404?new Error("File not found"):new Error(`HTTP ${v.status}`);const w=await v.json();i(w),c(null),u({type:"READ",path:y,source:x,success:!0,size:w.size})}catch(v){c(v instanceof Error?v.message:"Failed to load file"),i(null),u({type:"READ",path:y,source:x,success:!1})}finally{r(!1)}}},[h,u]),p=C.useCallback(()=>{i(null),c(null)},[]);return{content:t,loading:l,error:s,loadFile:g,clear:p}}function v4(){const[t,i]=C.useState(null),[l,r]=C.useState(!0),[s,c]=C.useState(null),u=C.useCallback(async()=>{r(!0);try{const h=await fetch("/api/stats");if(!h.ok)throw new Error(`HTTP ${h.status}`);const g=await h.json();i(g),c(null)}catch(h){c(h instanceof Error?h.message:"Failed to load stats")}finally{r(!1)}},[]);return C.useEffect(()=>{u()},[u]),{stats:t,loading:l,error:s,refresh:u}}function b4(){const[t,i]=C.useState([]),[l,r]=C.useState(!0),[s,c]=C.useState(null),[u,h]=C.useState(null),g=C.useCallback(async()=>{r(!0);try{const p=await fetch("/api/logs");if(!p.ok){if(p.status===404){const x=await p.json();c(`Logs not found at ${x.path}`),i([]);return}throw new Error(`HTTP ${p.status}`)}const y=await p.json();i(y.logs),h(y.path),c(null)}catch(p){c(p instanceof Error?p.message:"Failed to load logs")}finally{r(!1)}},[]);return C.useEffect(()=>{g()},[g]),{logs:t,loading:l,error:s,refresh:g,logsPath:u}}function jv(){const[t,i]=C.useState(null),[l,r]=C.useState(null),[s,c]=C.useState(!0),[u,h]=C.useState(null),g=C.useCallback(async()=>{c(!0);try{const p=await fetch("/api/config");if(!p.ok){if(p.status===404){const x=await p.json();h(`Config not found at ${x.path}`),r(x.path),i(null);return}throw new Error(`HTTP ${p.status}`)}const y=await p.json();i(y.config),r(y.path),h(null)}catch(p){h(p instanceof Error?p.message:"Failed to load config")}finally{c(!1)}},[]);return C.useEffect(()=>{g()},[g]),{config:t,configPath:l,loading:s,error:u,refresh:g}}function an(t){if(t===0)return"0 B";const i=1024,l=["B","KB","MB","GB"],r=Math.floor(Math.log(t)/Math.log(i));return`${parseFloat((t/Math.pow(i,r)).toFixed(1))} ${l[r]}`}const bt=C.forwardRef(({className:t,...i},l)=>d.jsx("div",{ref:l,className:Se("rounded-2xl border border-border bg-card text-card-foreground shadow-lg",t),...i}));bt.displayName="Card";const w4=C.forwardRef(({className:t,...i},l)=>d.jsx("div",{ref:l,className:Se("flex flex-col space-y-1.5 p-6",t),...i}));w4.displayName="CardHeader";const S4=C.forwardRef(({className:t,...i},l)=>d.jsx("div",{ref:l,className:Se("font-semibold leading-none tracking-tight",t),...i}));S4.displayName="CardTitle";const N4=C.forwardRef(({className:t,...i},l)=>d.jsx("div",{ref:l,className:Se("text-sm text-muted-foreground",t),...i}));N4.displayName="CardDescription";const E4=C.forwardRef(({className:t,...i},l)=>d.jsx("div",{ref:l,className:Se("p-6 pt-0",t),...i}));E4.displayName="CardContent";const _4=C.forwardRef(({className:t,...i},l)=>d.jsx("div",{ref:l,className:Se("flex items-center p-6 pt-0",t),...i}));_4.displayName="CardFooter";const dx=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,hx=Gy,Ah=(t,i)=>l=>{var r;if((i==null?void 0:i.variants)==null)return hx(t,l==null?void 0:l.class,l==null?void 0:l.className);const{variants:s,defaultVariants:c}=i,u=Object.keys(s).map(p=>{const y=l==null?void 0:l[p],x=c==null?void 0:c[p];if(y===null)return null;const v=dx(y)||dx(x);return s[p][v]}),h=l&&Object.entries(l).reduce((p,y)=>{let[x,v]=y;return v===void 0||(p[x]=v),p},{}),g=i==null||(r=i.compoundVariants)===null||r===void 0?void 0:r.reduce((p,y)=>{let{class:x,className:v,...w}=y;return Object.entries(w).every(S=>{let[_,E]=S;return Array.isArray(E)?E.includes({...c,...h}[_]):{...c,...h}[_]===E})?[...p,x,v]:p},[]);return hx(t,u,g,l==null?void 0:l.class,l==null?void 0:l.className)},j4=Ah("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-emerald-500/15 text-emerald-400",warning:"border-transparent bg-amber-500/15 text-amber-400",error:"border-transparent bg-red-500/15 text-red-400"}},defaultVariants:{variant:"default"}});function Zr({className:t,variant:i,...l}){return d.jsx("div",{className:Se(j4({variant:i}),t),...l})}function A4({connected:t}){return d.jsx("div",{className:`w-2.5 h-2.5 rounded-full shrink-0 ${t?"bg-emerald-400 shadow-[0_0_8px_rgba(52,211,153,0.5)]":"bg-red-400 shadow-[0_0_8px_rgba(248,113,113,0.3)]"}`})}function mx(){const t=Yy(),{agentName:i}=Ma(),{config:l,configPath:r,loading:s}=jv(),{stats:c,loading:u}=v4(),{data:h,loading:g}=Ac(),p=s||u||g,y=h?Object.entries(h).map(([z,k])=>({id:z,path:(k==null?void 0:k.path)||`~/${z}`,fileCount:(k==null?void 0:k.fileCount)||0,totalSize:(k==null?void 0:k.totalSize)||0,connected:k!==null})):[],x=y.reduce((z,k)=>z+k.fileCount,0),v=y.reduce((z,k)=>z+k.totalSize,0),w=l==null?void 0:l.gateway,S=(w==null?void 0:w.mode)||null,_=w==null?void 0:w.port,E=l==null?void 0:l.channels,j=E?Object.entries(E).filter(([,z])=>typeof z=="object"&&z!==null?z.enabled!==!1:!!z).map(([z])=>z):[],R=(l==null?void 0:l.model)||null,N=l==null?void 0:l.models,A=R||(N==null?void 0:N.primary)||(N==null?void 0:N.default)||null;return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-blue-500/20 to-indigo-600/20 border border-blue-500/30",children:d.jsx(vv,{className:"w-5 h-5 text-blue-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Overview"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:i?`${i}'s system status`:"System status and memory summary"})]})]}),p&&d.jsx(TE,{className:"w-4 h-4 text-muted-foreground animate-spin"})]}),d.jsxs("div",{className:"flex-1 overflow-auto p-6 space-y-6",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Connection"}),d.jsxs(bt,{className:"p-4 bg-card",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[t.status==="connected"?d.jsx(Ev,{className:"w-5 h-5 text-emerald-400"}):d.jsx(Sh,{className:"w-5 h-5 text-red-400"}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-foreground capitalize",children:t.status}),t.error&&d.jsx("p",{className:"text-xs text-red-400",children:t.error})]}),d.jsx(Zr,{variant:t.status==="connected"?"success":"error",className:"ml-auto",children:t.status==="connected"?"Online":"Offline"})]}),y.length>0&&d.jsx("div",{className:"space-y-2",children:y.map(z=>d.jsxs("div",{className:"flex items-center gap-3 p-2.5 rounded-lg bg-secondary/30 border border-border/50",children:[d.jsx(A4,{connected:z.connected}),d.jsx(Ki,{className:"w-3.5 h-3.5 text-muted-foreground"}),d.jsx("span",{className:"text-xs font-mono text-foreground flex-1 truncate",children:z.path}),d.jsxs("span",{className:"text-[10px] text-muted-foreground tabular-nums",children:[z.fileCount," files"]}),z.totalSize>0&&d.jsx("span",{className:"text-[10px] text-muted-foreground font-mono tabular-nums",children:an(z.totalSize)})]},z.id))})]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Memory Stats"}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[d.jsx(bt,{className:"p-4 bg-card",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-blue-500/10 border border-blue-500/20",children:d.jsx(Ki,{className:"w-4 h-4 text-blue-400"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:"Sources"}),d.jsx("p",{className:"text-lg font-semibold text-foreground tabular-nums",children:y.length})]})]})}),d.jsx(bt,{className:"p-4 bg-card",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-emerald-500/10 border border-emerald-500/20",children:d.jsx(ao,{className:"w-4 h-4 text-emerald-400"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Files"}),d.jsx("p",{className:"text-lg font-semibold text-foreground tabular-nums",children:x})]})]})}),d.jsx(bt,{className:"p-4 bg-card",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-purple-500/10 border border-purple-500/20",children:d.jsx(Ec,{className:"w-4 h-4 text-purple-400"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Size"}),d.jsx("p",{className:"text-lg font-semibold text-foreground tabular-nums",children:an(v)})]})]})})]})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Configuration"}),d.jsxs(bt,{className:"p-4 bg-card",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx(wh,{className:"w-4 h-4 text-muted-foreground"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("p",{className:"text-sm font-medium text-foreground",children:l?"openclaw.json found":"No openclaw.json"}),r&&d.jsx("p",{className:"text-[10px] text-muted-foreground font-mono",children:r})]}),l?d.jsx(An,{className:"w-4 h-4 text-emerald-400"}):d.jsx(jc,{className:"w-4 h-4 text-muted-foreground/40"})]}),l&&d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[d.jsxs("div",{className:"p-3 rounded-lg bg-secondary/30 border border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[d.jsx(xv,{className:"w-3.5 h-3.5 text-blue-400"}),d.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Gateway"})]}),d.jsx("p",{className:"text-xs font-medium text-foreground",children:S||"Not configured"}),_&&d.jsxs("p",{className:"text-[10px] text-muted-foreground",children:["Port ",_]})]}),d.jsxs("div",{className:"p-3 rounded-lg bg-secondary/30 border border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[d.jsx(wv,{className:"w-3.5 h-3.5 text-emerald-400"}),d.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Channels"})]}),j.length>0?d.jsx("div",{className:"flex flex-wrap gap-1",children:j.map(z=>d.jsx(Zr,{variant:"outline",className:"text-[10px]",children:z},z))}):d.jsx("p",{className:"text-xs text-muted-foreground",children:"None configured"})]}),d.jsxs("div",{className:"p-3 rounded-lg bg-secondary/30 border border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[d.jsx(yh,{className:"w-3.5 h-3.5 text-purple-400"}),d.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Model"})]}),d.jsx("p",{className:"text-xs font-medium text-foreground truncate",children:A||"Not configured"})]})]})]})]}),(c==null?void 0:c.layers)&&d.jsxs("div",{children:[d.jsx("h2",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:"Memory Layers"}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Object.entries(c.layers).map(([z,k])=>d.jsx(bt,{className:"p-3 bg-card",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-medium text-foreground capitalize",children:z}),d.jsx("p",{className:"text-[10px] text-muted-foreground font-mono truncate",children:k.path})]}),d.jsxs("div",{className:"text-right",children:[d.jsxs("p",{className:"text-xs font-semibold text-foreground tabular-nums",children:[k.files," files"]}),k.size>0&&d.jsx("p",{className:"text-[10px] text-muted-foreground font-mono tabular-nums",children:an(k.size)})]})]})},z))})]})]})]})}function C4({nodes:t,selectedPath:i,onSelect:l}){return d.jsx("div",{className:"py-2",children:t.map(r=>d.jsx(Av,{node:r,selectedPath:i,onSelect:l,depth:0},r.path))})}function Av({node:t,selectedPath:i,onSelect:l,depth:r}){const[s,c]=C.useState(r<2),u=i===t.path,h=()=>{t.type==="directory"?c(!s):l(t.path)};return d.jsxs("div",{children:[d.jsxs("button",{onClick:h,className:Se("w-full flex items-center gap-1.5 px-2 py-1.5 text-xs text-left cursor-pointer transition-all duration-150",u?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),style:{paddingLeft:`${r*12+8}px`},children:[t.type==="directory"?s?d.jsx(dv,{className:"w-3 h-3 text-muted-foreground"}):d.jsx(QN,{className:"w-3 h-3 text-muted-foreground"}):d.jsx("span",{className:"w-3 h-3"}),t.type==="directory"?d.jsx(bh,{className:"w-4 h-4 text-amber-500/70"}):d.jsx(dE,{className:"w-4 h-4 text-blue-400/70"}),d.jsx("span",{className:"truncate",children:t.name})]}),t.type==="directory"&&s&&t.children&&d.jsx("div",{children:t.children.map(g=>d.jsx(Av,{node:g,selectedPath:i,onSelect:l,depth:r+1},g.path))})]})}const Cv=new Set([".pkl",".pickle",".pyc",".pyo",".so",".dylib",".dll",".exe",".bin",".dat",".db",".sqlite",".sqlite3",".zip",".tar",".gz",".bz2",".7z",".rar",".png",".jpg",".jpeg",".gif",".webp",".ico",".bmp",".svg",".mp3",".mp4",".wav",".avi",".mov",".webm",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".woff",".woff2",".ttf",".otf",".eot"]),Gd={".py":"python",".js":"javascript",".ts":"typescript",".tsx":"typescript",".jsx":"javascript",".rs":"rust",".go":"go",".rb":"ruby",".sh":"bash",".bash":"bash",".zsh":"bash",".yml":"yaml",".yaml":"yaml",".toml":"toml",".ini":"ini",".cfg":"ini",".conf":"ini",".css":"css",".scss":"scss",".html":"html",".xml":"xml",".sql":"sql"};function T4(t){return t.slice(0,1e3).split("").filter(l=>{const r=l.charCodeAt(0);return r<32&&r!==9&&r!==10&&r!==13}).length>10}function M4({extension:t,className:i}){return Cv.has(t)?[".png",".jpg",".jpeg",".gif",".webp",".ico",".bmp",".svg"].includes(t)?d.jsx(yv,{className:i}):d.jsx(cv,{className:i}):t===".json"?d.jsx(rE,{className:i}):Gd[t]?d.jsx(gv,{className:i}):t===".md"||t===".txt"?d.jsx(ao,{className:i}):d.jsx(uE,{className:i})}function z4({content:t,loading:i,error:l}){if(i)return d.jsx("div",{className:"h-full flex items-center justify-center",children:d.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[d.jsx("div",{className:"w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),d.jsx("span",{className:"text-sm",children:"Loading file..."})]})});if(l)return d.jsx("div",{className:"h-full flex items-center justify-center",children:d.jsxs(bt,{className:"p-6 max-w-sm text-center",children:[d.jsx(hv,{className:"w-8 h-8 text-red-400 mx-auto mb-3"}),d.jsx("p",{className:"text-sm text-red-400",children:l})]})});if(!t)return d.jsx("div",{className:"h-full flex items-center justify-center",children:d.jsx("p",{className:"text-sm text-muted-foreground/50",children:"Select a file to preview"})});const r=Cv.has(t.extension)||T4(t.content);return d.jsxs("div",{className:"h-full flex flex-col bg-card",children:[d.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border/50 bg-secondary/30",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(M4,{extension:t.extension,className:"w-4 h-4 text-muted-foreground"}),d.jsx("span",{className:"font-mono text-sm text-foreground",children:t.name}),d.jsx("span",{className:"text-xs text-muted-foreground/50 uppercase",children:t.extension.slice(1)})]}),d.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground/70",children:[d.jsx("span",{children:an(t.size)}),d.jsx("span",{children:new Date(t.modified).toLocaleDateString()})]})]}),d.jsx("div",{className:"flex-1 overflow-auto",children:r?d.jsx(O4,{extension:t.extension,size:t.size}):t.extension===".md"?d.jsx(D4,{content:t.content}):t.extension===".json"?d.jsx(L4,{content:t.content}):Gd[t.extension]?d.jsx(R4,{content:t.content,language:Gd[t.extension]}):d.jsx(Tv,{content:t.content})})]})}function O4({extension:t,size:i}){const l=[".png",".jpg",".jpeg",".gif",".webp",".ico",".bmp",".svg"].includes(t);return d.jsx("div",{className:"h-full flex items-center justify-center p-8",children:d.jsxs(bt,{className:"p-8 text-center max-w-sm",children:[l?d.jsx(yv,{className:"w-12 h-12 text-muted-foreground/30 mx-auto mb-4"}):d.jsx(cv,{className:"w-12 h-12 text-muted-foreground/30 mx-auto mb-4"}),d.jsx("p",{className:"text-sm font-medium text-foreground mb-1",children:"Binary File"}),d.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:l?"Image file":"This file cannot be displayed as text"}),d.jsxs("div",{className:"flex items-center justify-center gap-3 text-xs text-muted-foreground/50",children:[d.jsx("span",{className:"uppercase",children:t.slice(1)}),d.jsx("span",{children:"•"}),d.jsx("span",{children:an(i)})]})]})})}function Tv({content:t}){const i=t.split(`
381
+ `);return d.jsx("div",{className:"p-4 font-mono text-xs",children:d.jsx("table",{className:"w-full",children:d.jsx("tbody",{children:i.map((l,r)=>d.jsxs("tr",{className:"hover:bg-white/[0.02]",children:[d.jsx("td",{className:"pr-4 py-0.5 text-right text-muted-foreground/30 select-none w-10",children:r+1}),d.jsx("td",{className:"py-0.5 text-muted-foreground whitespace-pre-wrap break-all",children:l||" "})]},r))})})})}function R4({content:t,language:i}){const l=t.split(`
382
+ `),r=s=>{let c=s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return c=c.replace(/(["'`])(?:(?!\1)[^\\]|\\.)*?\1/g,'<span class="text-emerald-400">$&</span>'),c=c.replace(/(#.*$|\/\/.*$)/gm,'<span class="text-zinc-600">$1</span>'),c=c.replace(/\b(\d+\.?\d*)\b/g,'<span class="text-amber-400">$1</span>'),k4(i).forEach(h=>{const g=new RegExp(`\\b(${h})\\b`,"g");c=c.replace(g,'<span class="text-violet-400">$1</span>')}),c};return d.jsx("div",{className:"p-4 font-mono text-xs",children:d.jsx("table",{className:"w-full",children:d.jsx("tbody",{children:l.map((s,c)=>d.jsxs("tr",{className:"hover:bg-white/[0.02]",children:[d.jsx("td",{className:"pr-4 py-0.5 text-right text-muted-foreground/30 select-none w-10",children:c+1}),d.jsx("td",{className:"py-0.5 text-zinc-300 whitespace-pre",dangerouslySetInnerHTML:{__html:r(s)||" "}})]},c))})})})}function k4(t){return{python:["def","class","import","from","return","if","elif","else","for","while","try","except","finally","with","as","True","False","None","and","or","not","in","is","lambda","yield","async","await","self"],javascript:["const","let","var","function","return","if","else","for","while","class","import","export","default","from","try","catch","finally","throw","new","this","true","false","null","undefined","async","await","typeof","instanceof"],typescript:["const","let","var","function","return","if","else","for","while","class","import","export","default","from","try","catch","finally","throw","new","this","true","false","null","undefined","async","await","type","interface","extends","implements","readonly","private","public","protected"],yaml:["true","false","null","yes","no"],bash:["if","then","else","fi","for","do","done","while","case","esac","function","return","export","source","echo","exit"]}[t]||[]}function D4({content:t}){const i=t.split(`
383
+ `),l=[];let r=!1,s=[],c="";return i.forEach((u,h)=>{if(u.startsWith("```")){r?(l.push(d.jsxs("div",{className:"my-4 rounded-lg bg-secondary border border-border overflow-hidden",children:[d.jsx("div",{className:"px-4 py-2 bg-secondary/80 text-[10px] text-muted-foreground uppercase tracking-wider",children:c||"code"}),d.jsx("pre",{className:"p-4 text-xs text-foreground/80 overflow-x-auto font-mono",children:s.join(`
384
+ `)})]},`code-${h}`)),s=[],r=!1):(r=!0,c=u.slice(3).trim());return}if(r){s.push(u);return}if(u.startsWith("# ")){l.push(d.jsx("h1",{className:"text-2xl font-semibold text-foreground mt-8 mb-4 first:mt-0 pb-2 border-b border-border/30",children:u.slice(2)},h));return}if(u.startsWith("## ")){l.push(d.jsx("h2",{className:"text-xl font-semibold text-foreground mt-6 mb-3",children:u.slice(3)},h));return}if(u.startsWith("### ")){l.push(d.jsx("h3",{className:"text-lg font-medium text-foreground mt-5 mb-2",children:u.slice(4)},h));return}if(u.startsWith("#### ")){l.push(d.jsx("h4",{className:"text-base font-medium text-muted-foreground mt-4 mb-2",children:u.slice(5)},h));return}if(u.match(/^[-*] /)){l.push(d.jsxs("p",{className:"text-sm text-muted-foreground pl-4 py-0.5 flex",children:[d.jsx("span",{className:"text-violet-400 mr-3",children:"•"}),d.jsx("span",{children:Sd(u.slice(2))})]},h));return}if(u.match(/^\d+\. /)){const g=u.match(/^(\d+)\. (.*)$/);g&&l.push(d.jsxs("p",{className:"text-sm text-muted-foreground pl-4 py-0.5 flex",children:[d.jsxs("span",{className:"text-violet-400 mr-3 tabular-nums",children:[g[1],"."]}),d.jsx("span",{children:Sd(g[2])})]},h));return}if(u.startsWith("> ")){l.push(d.jsx("blockquote",{className:"border-l-2 border-violet-500/50 pl-4 my-2 text-sm text-muted-foreground italic",children:u.slice(2)},h));return}if(u.match(/^[-*_]{3,}$/)){l.push(d.jsx("hr",{className:"my-6 border-border/50"},h));return}if(u.trim()===""){l.push(d.jsx("div",{className:"h-3"},h));return}l.push(d.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed my-1",children:Sd(u)},h))}),d.jsx("div",{className:"p-6 max-w-3xl",children:l})}function Sd(t){const i=[];let l=t,r=0;for(;l.length>0;){const s=l.match(/^`([^`]+)`/);if(s){i.push(d.jsx("code",{className:"px-1.5 py-0.5 rounded bg-secondary text-emerald-600 dark:text-emerald-400 text-xs font-mono",children:s[1]},r++)),l=l.slice(s[0].length);continue}const c=l.match(/^\*\*([^*]+)\*\*/);if(c){i.push(d.jsx("strong",{className:"font-semibold text-foreground",children:c[1]},r++)),l=l.slice(c[0].length);continue}const u=l.match(/^\*([^*]+)\*/);if(u){i.push(d.jsx("em",{className:"italic",children:u[1]},r++)),l=l.slice(u[0].length);continue}const h=l.match(/^\[([^\]]+)\]\(([^)]+)\)/);if(h){i.push(d.jsx("a",{href:h[2],className:"text-violet-400 hover:underline",target:"_blank",rel:"noopener noreferrer",children:h[1]},r++)),l=l.slice(h[0].length);continue}i.push(l[0]),l=l.slice(1)}return i}function L4({content:t}){let i;try{i=JSON.parse(t)}catch{return d.jsx(Tv,{content:t})}return d.jsx("div",{className:"p-4",children:d.jsx(Zd,{value:i,depth:0})})}function Zd({value:t,depth:i}){const l=i*16;if(t===null)return d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"null"});if(typeof t=="boolean")return d.jsx("span",{className:"text-violet-400 text-xs font-mono",children:t.toString()});if(typeof t=="number")return d.jsx("span",{className:"text-amber-400 text-xs font-mono",children:t});if(typeof t=="string")return d.jsxs("span",{className:"text-emerald-400 text-xs font-mono",children:['"',t,'"']});if(Array.isArray(t))return t.length===0?d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"[]"}):d.jsxs("div",{children:[d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"["}),t.map((r,s)=>d.jsxs("div",{style:{marginLeft:l+16},className:"py-0.5",children:[d.jsx(Zd,{value:r,depth:i+1}),s<t.length-1&&d.jsx("span",{className:"text-zinc-600",children:","})]},s)),d.jsx("div",{style:{marginLeft:l},children:d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"]"})})]});if(typeof t=="object"){const r=Object.entries(t);return r.length===0?d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"{}"}):d.jsxs("div",{children:[d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"{"}),r.map(([s,c],u)=>d.jsxs("div",{style:{marginLeft:l+16},className:"py-0.5",children:[d.jsxs("span",{className:"text-zinc-400 text-xs font-mono",children:['"',s,'"']}),d.jsx("span",{className:"text-zinc-600 text-xs font-mono",children:": "}),d.jsx(Zd,{value:c,depth:i+1}),u<r.length-1&&d.jsx("span",{className:"text-zinc-600",children:","})]},s)),d.jsx("div",{style:{marginLeft:l},children:d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"}"})})]})}return d.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:String(t)})}function H4(){var w;const{data:t,loading:i,error:l}=Ac(),r=y4(),[s,c]=C.useState(null),[u,h]=C.useState(null),g=C.useMemo(()=>t?Object.entries(t).filter(([,S])=>S!==null).map(([S,_])=>({id:S,path:(_==null?void 0:_.path)||`~/${S}`,fileCount:(_==null?void 0:_.fileCount)||0,totalSize:(_==null?void 0:_.totalSize)||0})):[],[t]),p=s||((w=g[0])==null?void 0:w.id)||null,y=p&&t?t[p]:null,x=S=>{p&&(h(S),r.loadFile(S,p))},v=S=>{c(S),h(null),r.clear()};return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-amber-500/20 to-orange-600/20 border border-amber-500/30",children:d.jsx(Ki,{className:"w-5 h-5 text-amber-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"File Browser"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Browse memory files and configurations"})]})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[g.length>0&&d.jsx("div",{className:"flex items-center bg-secondary rounded-lg p-1 border border-border",children:g.map(S=>d.jsx("button",{onClick:()=>v(S.id),className:Se("px-3 py-1.5 text-xs rounded-md cursor-pointer transition-all font-mono",p===S.id?"bg-amber-500/20 text-amber-500 dark:text-amber-400 border border-amber-500/30":"text-muted-foreground hover:text-foreground"),children:S.path.startsWith("~")?S.path:`~/${S.id}`},S.id))}),y&&d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(Ec,{className:"w-3.5 h-3.5"}),d.jsxs("span",{className:"tabular-nums",children:[y.fileCount," files"]}),d.jsx("span",{className:"text-muted-foreground/50",children:"·"}),d.jsx("span",{className:"tabular-nums",children:an(y.totalSize)})]})]})]}),d.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[d.jsxs("div",{className:"w-72 border-r border-border overflow-auto",children:[i&&!t&&d.jsx("div",{className:"p-4",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})}),l&&d.jsx("div",{className:"p-4",children:d.jsx("p",{className:"text-sm text-destructive",children:l})}),g.length===0&&!i&&d.jsx("div",{className:"p-4",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:"No sources configured. Add paths in the onboarding wizard."})}),y?d.jsx(C4,{nodes:y.tree,selectedPath:u,onSelect:x}):!i&&g.length>0&&d.jsx("div",{className:"p-4",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:"Source not found"})})]}),d.jsx("div",{className:"flex-1 overflow-auto",children:d.jsx(z4,{content:r.content,loading:r.loading,error:r.error})})]})]})}function st(t){if(typeof t=="string"||typeof t=="number")return""+t;let i="";if(Array.isArray(t))for(let l=0,r;l<t.length;l++)(r=st(t[l]))!==""&&(i+=(i&&" ")+r);else for(let l in t)t[l]&&(i+=(i&&" ")+l);return i}var B4={value:()=>{}};function Cc(){for(var t=0,i=arguments.length,l={},r;t<i;++t){if(!(r=arguments[t]+"")||r in l||/[\s.]/.test(r))throw new Error("illegal type: "+r);l[r]=[]}return new Ws(l)}function Ws(t){this._=t}function U4(t,i){return t.trim().split(/^|\s+/).map(function(l){var r="",s=l.indexOf(".");if(s>=0&&(r=l.slice(s+1),l=l.slice(0,s)),l&&!i.hasOwnProperty(l))throw new Error("unknown type: "+l);return{type:l,name:r}})}Ws.prototype=Cc.prototype={constructor:Ws,on:function(t,i){var l=this._,r=U4(t+"",l),s,c=-1,u=r.length;if(arguments.length<2){for(;++c<u;)if((s=(t=r[c]).type)&&(s=V4(l[s],t.name)))return s;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++c<u;)if(s=(t=r[c]).type)l[s]=px(l[s],t.name,i);else if(i==null)for(s in l)l[s]=px(l[s],t.name,null);return this},copy:function(){var t={},i=this._;for(var l in i)t[l]=i[l].slice();return new Ws(t)},call:function(t,i){if((s=arguments.length-2)>0)for(var l=new Array(s),r=0,s,c;r<s;++r)l[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(c=this._[t],r=0,s=c.length;r<s;++r)c[r].value.apply(i,l)},apply:function(t,i,l){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],s=0,c=r.length;s<c;++s)r[s].value.apply(i,l)}};function V4(t,i){for(var l=0,r=t.length,s;l<r;++l)if((s=t[l]).name===i)return s.value}function px(t,i,l){for(var r=0,s=t.length;r<s;++r)if(t[r].name===i){t[r]=B4,t=t.slice(0,r).concat(t.slice(r+1));break}return l!=null&&t.push({name:i,value:l}),t}var Qd="http://www.w3.org/1999/xhtml";const gx={svg:"http://www.w3.org/2000/svg",xhtml:Qd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Tc(t){var i=t+="",l=i.indexOf(":");return l>=0&&(i=t.slice(0,l))!=="xmlns"&&(t=t.slice(l+1)),gx.hasOwnProperty(i)?{space:gx[i],local:t}:t}function $4(t){return function(){var i=this.ownerDocument,l=this.namespaceURI;return l===Qd&&i.documentElement.namespaceURI===Qd?i.createElement(t):i.createElementNS(l,t)}}function Y4(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Mv(t){var i=Tc(t);return(i.local?Y4:$4)(i)}function q4(){}function Ch(t){return t==null?q4:function(){return this.querySelector(t)}}function X4(t){typeof t!="function"&&(t=Ch(t));for(var i=this._groups,l=i.length,r=new Array(l),s=0;s<l;++s)for(var c=i[s],u=c.length,h=r[s]=new Array(u),g,p,y=0;y<u;++y)(g=c[y])&&(p=t.call(g,g.__data__,y,c))&&("__data__"in g&&(p.__data__=g.__data__),h[y]=p);return new Kt(r,this._parents)}function G4(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Z4(){return[]}function zv(t){return t==null?Z4:function(){return this.querySelectorAll(t)}}function Q4(t){return function(){return G4(t.apply(this,arguments))}}function K4(t){typeof t=="function"?t=Q4(t):t=zv(t);for(var i=this._groups,l=i.length,r=[],s=[],c=0;c<l;++c)for(var u=i[c],h=u.length,g,p=0;p<h;++p)(g=u[p])&&(r.push(t.call(g,g.__data__,p,u)),s.push(g));return new Kt(r,s)}function Ov(t){return function(){return this.matches(t)}}function Rv(t){return function(i){return i.matches(t)}}var F4=Array.prototype.find;function P4(t){return function(){return F4.call(this.children,t)}}function I4(){return this.firstElementChild}function J4(t){return this.select(t==null?I4:P4(typeof t=="function"?t:Rv(t)))}var W4=Array.prototype.filter;function e5(){return Array.from(this.children)}function t5(t){return function(){return W4.call(this.children,t)}}function n5(t){return this.selectAll(t==null?e5:t5(typeof t=="function"?t:Rv(t)))}function i5(t){typeof t!="function"&&(t=Ov(t));for(var i=this._groups,l=i.length,r=new Array(l),s=0;s<l;++s)for(var c=i[s],u=c.length,h=r[s]=[],g,p=0;p<u;++p)(g=c[p])&&t.call(g,g.__data__,p,c)&&h.push(g);return new Kt(r,this._parents)}function kv(t){return new Array(t.length)}function a5(){return new Kt(this._enter||this._groups.map(kv),this._parents)}function oc(t,i){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=i}oc.prototype={constructor:oc,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,i){return this._parent.insertBefore(t,i)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function l5(t){return function(){return t}}function r5(t,i,l,r,s,c){for(var u=0,h,g=i.length,p=c.length;u<p;++u)(h=i[u])?(h.__data__=c[u],r[u]=h):l[u]=new oc(t,c[u]);for(;u<g;++u)(h=i[u])&&(s[u]=h)}function o5(t,i,l,r,s,c,u){var h,g,p=new Map,y=i.length,x=c.length,v=new Array(y),w;for(h=0;h<y;++h)(g=i[h])&&(v[h]=w=u.call(g,g.__data__,h,i)+"",p.has(w)?s[h]=g:p.set(w,g));for(h=0;h<x;++h)w=u.call(t,c[h],h,c)+"",(g=p.get(w))?(r[h]=g,g.__data__=c[h],p.delete(w)):l[h]=new oc(t,c[h]);for(h=0;h<y;++h)(g=i[h])&&p.get(v[h])===g&&(s[h]=g)}function s5(t){return t.__data__}function c5(t,i){if(!arguments.length)return Array.from(this,s5);var l=i?o5:r5,r=this._parents,s=this._groups;typeof t!="function"&&(t=l5(t));for(var c=s.length,u=new Array(c),h=new Array(c),g=new Array(c),p=0;p<c;++p){var y=r[p],x=s[p],v=x.length,w=u5(t.call(y,y&&y.__data__,p,r)),S=w.length,_=h[p]=new Array(S),E=u[p]=new Array(S),j=g[p]=new Array(v);l(y,x,_,E,j,w,i);for(var R=0,N=0,A,z;R<S;++R)if(A=_[R]){for(R>=N&&(N=R+1);!(z=E[N])&&++N<S;);A._next=z||null}}return u=new Kt(u,r),u._enter=h,u._exit=g,u}function u5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function f5(){return new Kt(this._exit||this._groups.map(kv),this._parents)}function d5(t,i,l){var r=this.enter(),s=this,c=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),i!=null&&(s=i(s),s&&(s=s.selection())),l==null?c.remove():l(c),r&&s?r.merge(s).order():s}function h5(t){for(var i=t.selection?t.selection():t,l=this._groups,r=i._groups,s=l.length,c=r.length,u=Math.min(s,c),h=new Array(s),g=0;g<u;++g)for(var p=l[g],y=r[g],x=p.length,v=h[g]=new Array(x),w,S=0;S<x;++S)(w=p[S]||y[S])&&(v[S]=w);for(;g<s;++g)h[g]=l[g];return new Kt(h,this._parents)}function m5(){for(var t=this._groups,i=-1,l=t.length;++i<l;)for(var r=t[i],s=r.length-1,c=r[s],u;--s>=0;)(u=r[s])&&(c&&u.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(u,c),c=u);return this}function p5(t){t||(t=g5);function i(x,v){return x&&v?t(x.__data__,v.__data__):!x-!v}for(var l=this._groups,r=l.length,s=new Array(r),c=0;c<r;++c){for(var u=l[c],h=u.length,g=s[c]=new Array(h),p,y=0;y<h;++y)(p=u[y])&&(g[y]=p);g.sort(i)}return new Kt(s,this._parents).order()}function g5(t,i){return t<i?-1:t>i?1:t>=i?0:NaN}function x5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function y5(){return Array.from(this)}function v5(){for(var t=this._groups,i=0,l=t.length;i<l;++i)for(var r=t[i],s=0,c=r.length;s<c;++s){var u=r[s];if(u)return u}return null}function b5(){let t=0;for(const i of this)++t;return t}function w5(){return!this.node()}function S5(t){for(var i=this._groups,l=0,r=i.length;l<r;++l)for(var s=i[l],c=0,u=s.length,h;c<u;++c)(h=s[c])&&t.call(h,h.__data__,c,s);return this}function N5(t){return function(){this.removeAttribute(t)}}function E5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _5(t,i){return function(){this.setAttribute(t,i)}}function j5(t,i){return function(){this.setAttributeNS(t.space,t.local,i)}}function A5(t,i){return function(){var l=i.apply(this,arguments);l==null?this.removeAttribute(t):this.setAttribute(t,l)}}function C5(t,i){return function(){var l=i.apply(this,arguments);l==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,l)}}function T5(t,i){var l=Tc(t);if(arguments.length<2){var r=this.node();return l.local?r.getAttributeNS(l.space,l.local):r.getAttribute(l)}return this.each((i==null?l.local?E5:N5:typeof i=="function"?l.local?C5:A5:l.local?j5:_5)(l,i))}function Dv(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function M5(t){return function(){this.style.removeProperty(t)}}function z5(t,i,l){return function(){this.style.setProperty(t,i,l)}}function O5(t,i,l){return function(){var r=i.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,l)}}function R5(t,i,l){return arguments.length>1?this.each((i==null?M5:typeof i=="function"?O5:z5)(t,i,l??"")):Ml(this.node(),t)}function Ml(t,i){return t.style.getPropertyValue(i)||Dv(t).getComputedStyle(t,null).getPropertyValue(i)}function k5(t){return function(){delete this[t]}}function D5(t,i){return function(){this[t]=i}}function L5(t,i){return function(){var l=i.apply(this,arguments);l==null?delete this[t]:this[t]=l}}function H5(t,i){return arguments.length>1?this.each((i==null?k5:typeof i=="function"?L5:D5)(t,i)):this.node()[t]}function Lv(t){return t.trim().split(/^|\s+/)}function Th(t){return t.classList||new Hv(t)}function Hv(t){this._node=t,this._names=Lv(t.getAttribute("class")||"")}Hv.prototype={add:function(t){var i=this._names.indexOf(t);i<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var i=this._names.indexOf(t);i>=0&&(this._names.splice(i,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Bv(t,i){for(var l=Th(t),r=-1,s=i.length;++r<s;)l.add(i[r])}function Uv(t,i){for(var l=Th(t),r=-1,s=i.length;++r<s;)l.remove(i[r])}function B5(t){return function(){Bv(this,t)}}function U5(t){return function(){Uv(this,t)}}function V5(t,i){return function(){(i.apply(this,arguments)?Bv:Uv)(this,t)}}function $5(t,i){var l=Lv(t+"");if(arguments.length<2){for(var r=Th(this.node()),s=-1,c=l.length;++s<c;)if(!r.contains(l[s]))return!1;return!0}return this.each((typeof i=="function"?V5:i?B5:U5)(l,i))}function Y5(){this.textContent=""}function q5(t){return function(){this.textContent=t}}function X5(t){return function(){var i=t.apply(this,arguments);this.textContent=i??""}}function G5(t){return arguments.length?this.each(t==null?Y5:(typeof t=="function"?X5:q5)(t)):this.node().textContent}function Z5(){this.innerHTML=""}function Q5(t){return function(){this.innerHTML=t}}function K5(t){return function(){var i=t.apply(this,arguments);this.innerHTML=i??""}}function F5(t){return arguments.length?this.each(t==null?Z5:(typeof t=="function"?K5:Q5)(t)):this.node().innerHTML}function P5(){this.nextSibling&&this.parentNode.appendChild(this)}function I5(){return this.each(P5)}function J5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function W5(){return this.each(J5)}function e_(t){var i=typeof t=="function"?t:Mv(t);return this.select(function(){return this.appendChild(i.apply(this,arguments))})}function t_(){return null}function n_(t,i){var l=typeof t=="function"?t:Mv(t),r=i==null?t_:typeof i=="function"?i:Ch(i);return this.select(function(){return this.insertBefore(l.apply(this,arguments),r.apply(this,arguments)||null)})}function i_(){var t=this.parentNode;t&&t.removeChild(this)}function a_(){return this.each(i_)}function l_(){var t=this.cloneNode(!1),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function r_(){var t=this.cloneNode(!0),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function o_(t){return this.select(t?r_:l_)}function s_(t){return arguments.length?this.property("__data__",t):this.node().__data__}function c_(t){return function(i){t.call(this,i,this.__data__)}}function u_(t){return t.trim().split(/^|\s+/).map(function(i){var l="",r=i.indexOf(".");return r>=0&&(l=i.slice(r+1),i=i.slice(0,r)),{type:i,name:l}})}function f_(t){return function(){var i=this.__on;if(i){for(var l=0,r=-1,s=i.length,c;l<s;++l)c=i[l],(!t.type||c.type===t.type)&&c.name===t.name?this.removeEventListener(c.type,c.listener,c.options):i[++r]=c;++r?i.length=r:delete this.__on}}}function d_(t,i,l){return function(){var r=this.__on,s,c=c_(i);if(r){for(var u=0,h=r.length;u<h;++u)if((s=r[u]).type===t.type&&s.name===t.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=c,s.options=l),s.value=i;return}}this.addEventListener(t.type,c,l),s={type:t.type,name:t.name,value:i,listener:c,options:l},r?r.push(s):this.__on=[s]}}function h_(t,i,l){var r=u_(t+""),s,c=r.length,u;if(arguments.length<2){var h=this.node().__on;if(h){for(var g=0,p=h.length,y;g<p;++g)for(s=0,y=h[g];s<c;++s)if((u=r[s]).type===y.type&&u.name===y.name)return y.value}return}for(h=i?d_:f_,s=0;s<c;++s)this.each(h(r[s],i,l));return this}function Vv(t,i,l){var r=Dv(t),s=r.CustomEvent;typeof s=="function"?s=new s(i,l):(s=r.document.createEvent("Event"),l?(s.initEvent(i,l.bubbles,l.cancelable),s.detail=l.detail):s.initEvent(i,!1,!1)),t.dispatchEvent(s)}function m_(t,i){return function(){return Vv(this,t,i)}}function p_(t,i){return function(){return Vv(this,t,i.apply(this,arguments))}}function g_(t,i){return this.each((typeof i=="function"?p_:m_)(t,i))}function*x_(){for(var t=this._groups,i=0,l=t.length;i<l;++i)for(var r=t[i],s=0,c=r.length,u;s<c;++s)(u=r[s])&&(yield u)}var $v=[null];function Kt(t,i){this._groups=t,this._parents=i}function lo(){return new Kt([[document.documentElement]],$v)}function y_(){return this}Kt.prototype=lo.prototype={constructor:Kt,select:X4,selectAll:K4,selectChild:J4,selectChildren:n5,filter:i5,data:c5,enter:a5,exit:f5,join:d5,merge:h5,selection:y_,order:m5,sort:p5,call:x5,nodes:y5,node:v5,size:b5,empty:w5,each:S5,attr:T5,style:R5,property:H5,classed:$5,text:G5,html:F5,raise:I5,lower:W5,append:e_,insert:n_,remove:a_,clone:o_,datum:s_,on:h_,dispatch:g_,[Symbol.iterator]:x_};function Zt(t){return typeof t=="string"?new Kt([[document.querySelector(t)]],[document.documentElement]):new Kt([[t]],$v)}function v_(t){let i;for(;i=t.sourceEvent;)t=i;return t}function fn(t,i){if(t=v_(t),i===void 0&&(i=t.currentTarget),i){var l=i.ownerSVGElement||i;if(l.createSVGPoint){var r=l.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(i.getScreenCTM().inverse()),[r.x,r.y]}if(i.getBoundingClientRect){var s=i.getBoundingClientRect();return[t.clientX-s.left-i.clientLeft,t.clientY-s.top-i.clientTop]}}return[t.pageX,t.pageY]}const b_={passive:!1},Qr={capture:!0,passive:!1};function Nd(t){t.stopImmediatePropagation()}function Al(t){t.preventDefault(),t.stopImmediatePropagation()}function Yv(t){var i=t.document.documentElement,l=Zt(t).on("dragstart.drag",Al,Qr);"onselectstart"in i?l.on("selectstart.drag",Al,Qr):(i.__noselect=i.style.MozUserSelect,i.style.MozUserSelect="none")}function qv(t,i){var l=t.document.documentElement,r=Zt(t).on("dragstart.drag",null);i&&(r.on("click.drag",Al,Qr),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in l?r.on("selectstart.drag",null):(l.style.MozUserSelect=l.__noselect,delete l.__noselect)}const $s=t=>()=>t;function Kd(t,{sourceEvent:i,subject:l,target:r,identifier:s,active:c,x:u,y:h,dx:g,dy:p,dispatch:y}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},subject:{value:l,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:p,enumerable:!0,configurable:!0},_:{value:y}})}Kd.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function w_(t){return!t.ctrlKey&&!t.button}function S_(){return this.parentNode}function N_(t,i){return i??{x:t.x,y:t.y}}function E_(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xv(){var t=w_,i=S_,l=N_,r=E_,s={},c=Cc("start","drag","end"),u=0,h,g,p,y,x=0;function v(A){A.on("mousedown.drag",w).filter(r).on("touchstart.drag",E).on("touchmove.drag",j,b_).on("touchend.drag touchcancel.drag",R).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(A,z){if(!(y||!t.call(this,A,z))){var k=N(this,i.call(this,A,z),A,z,"mouse");k&&(Zt(A.view).on("mousemove.drag",S,Qr).on("mouseup.drag",_,Qr),Yv(A.view),Nd(A),p=!1,h=A.clientX,g=A.clientY,k("start",A))}}function S(A){if(Al(A),!p){var z=A.clientX-h,k=A.clientY-g;p=z*z+k*k>x}s.mouse("drag",A)}function _(A){Zt(A.view).on("mousemove.drag mouseup.drag",null),qv(A.view,p),Al(A),s.mouse("end",A)}function E(A,z){if(t.call(this,A,z)){var k=A.changedTouches,L=i.call(this,A,z),U=k.length,K,ie;for(K=0;K<U;++K)(ie=N(this,L,A,z,k[K].identifier,k[K]))&&(Nd(A),ie("start",A,k[K]))}}function j(A){var z=A.changedTouches,k=z.length,L,U;for(L=0;L<k;++L)(U=s[z[L].identifier])&&(Al(A),U("drag",A,z[L]))}function R(A){var z=A.changedTouches,k=z.length,L,U;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),L=0;L<k;++L)(U=s[z[L].identifier])&&(Nd(A),U("end",A,z[L]))}function N(A,z,k,L,U,K){var ie=c.copy(),G=fn(K||k,z),Q,te,D;if((D=l.call(A,new Kd("beforestart",{sourceEvent:k,target:v,identifier:U,active:u,x:G[0],y:G[1],dx:0,dy:0,dispatch:ie}),L))!=null)return Q=D.x-G[0]||0,te=D.y-G[1]||0,function Z(M,H,B){var Y=G,q;switch(M){case"start":s[U]=Z,q=u++;break;case"end":delete s[U],--u;case"drag":G=fn(B||H,z),q=u;break}ie.call(M,A,new Kd(M,{sourceEvent:H,subject:D,target:v,identifier:U,active:q,x:G[0]+Q,y:G[1]+te,dx:G[0]-Y[0],dy:G[1]-Y[1],dispatch:ie}),L)}}return v.filter=function(A){return arguments.length?(t=typeof A=="function"?A:$s(!!A),v):t},v.container=function(A){return arguments.length?(i=typeof A=="function"?A:$s(A),v):i},v.subject=function(A){return arguments.length?(l=typeof A=="function"?A:$s(A),v):l},v.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:$s(!!A),v):r},v.on=function(){var A=c.on.apply(c,arguments);return A===c?v:A},v.clickDistance=function(A){return arguments.length?(x=(A=+A)*A,v):Math.sqrt(x)},v}function Mh(t,i,l){t.prototype=i.prototype=l,l.constructor=t}function Gv(t,i){var l=Object.create(t.prototype);for(var r in i)l[r]=i[r];return l}function ro(){}var Kr=.7,sc=1/Kr,Cl="\\s*([+-]?\\d+)\\s*",Fr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",__=/^#([0-9a-f]{3,8})$/,j_=new RegExp(`^rgb\\(${Cl},${Cl},${Cl}\\)$`),A_=new RegExp(`^rgb\\(${Tn},${Tn},${Tn}\\)$`),C_=new RegExp(`^rgba\\(${Cl},${Cl},${Cl},${Fr}\\)$`),T_=new RegExp(`^rgba\\(${Tn},${Tn},${Tn},${Fr}\\)$`),M_=new RegExp(`^hsl\\(${Fr},${Tn},${Tn}\\)$`),z_=new RegExp(`^hsla\\(${Fr},${Tn},${Tn},${Fr}\\)$`),xx={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};Mh(ro,za,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:yx,formatHex:yx,formatHex8:O_,formatHsl:R_,formatRgb:vx,toString:vx});function yx(){return this.rgb().formatHex()}function O_(){return this.rgb().formatHex8()}function R_(){return Zv(this).formatHsl()}function vx(){return this.rgb().formatRgb()}function za(t){var i,l;return t=(t+"").trim().toLowerCase(),(i=__.exec(t))?(l=i[1].length,i=parseInt(i[1],16),l===6?bx(i):l===3?new kt(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):l===8?Ys(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):l===4?Ys(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=j_.exec(t))?new kt(i[1],i[2],i[3],1):(i=A_.exec(t))?new kt(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=C_.exec(t))?Ys(i[1],i[2],i[3],i[4]):(i=T_.exec(t))?Ys(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=M_.exec(t))?Nx(i[1],i[2]/100,i[3]/100,1):(i=z_.exec(t))?Nx(i[1],i[2]/100,i[3]/100,i[4]):xx.hasOwnProperty(t)?bx(xx[t]):t==="transparent"?new kt(NaN,NaN,NaN,0):null}function bx(t){return new kt(t>>16&255,t>>8&255,t&255,1)}function Ys(t,i,l,r){return r<=0&&(t=i=l=NaN),new kt(t,i,l,r)}function k_(t){return t instanceof ro||(t=za(t)),t?(t=t.rgb(),new kt(t.r,t.g,t.b,t.opacity)):new kt}function Fd(t,i,l,r){return arguments.length===1?k_(t):new kt(t,i,l,r??1)}function kt(t,i,l,r){this.r=+t,this.g=+i,this.b=+l,this.opacity=+r}Mh(kt,Fd,Gv(ro,{brighter(t){return t=t==null?sc:Math.pow(sc,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Kr:Math.pow(Kr,t),new kt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new kt(Ca(this.r),Ca(this.g),Ca(this.b),cc(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:wx,formatHex:wx,formatHex8:D_,formatRgb:Sx,toString:Sx}));function wx(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}`}function D_(){return`#${Aa(this.r)}${Aa(this.g)}${Aa(this.b)}${Aa((isNaN(this.opacity)?1:this.opacity)*255)}`}function Sx(){const t=cc(this.opacity);return`${t===1?"rgb(":"rgba("}${Ca(this.r)}, ${Ca(this.g)}, ${Ca(this.b)}${t===1?")":`, ${t})`}`}function cc(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ca(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Aa(t){return t=Ca(t),(t<16?"0":"")+t.toString(16)}function Nx(t,i,l,r){return r<=0?t=i=l=NaN:l<=0||l>=1?t=i=NaN:i<=0&&(t=NaN),new dn(t,i,l,r)}function Zv(t){if(t instanceof dn)return new dn(t.h,t.s,t.l,t.opacity);if(t instanceof ro||(t=za(t)),!t)return new dn;if(t instanceof dn)return t;t=t.rgb();var i=t.r/255,l=t.g/255,r=t.b/255,s=Math.min(i,l,r),c=Math.max(i,l,r),u=NaN,h=c-s,g=(c+s)/2;return h?(i===c?u=(l-r)/h+(l<r)*6:l===c?u=(r-i)/h+2:u=(i-l)/h+4,h/=g<.5?c+s:2-c-s,u*=60):h=g>0&&g<1?0:u,new dn(u,h,g,t.opacity)}function L_(t,i,l,r){return arguments.length===1?Zv(t):new dn(t,i,l,r??1)}function dn(t,i,l,r){this.h=+t,this.s=+i,this.l=+l,this.opacity=+r}Mh(dn,L_,Gv(ro,{brighter(t){return t=t==null?sc:Math.pow(sc,t),new dn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Kr:Math.pow(Kr,t),new dn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,i=isNaN(t)||isNaN(this.s)?0:this.s,l=this.l,r=l+(l<.5?l:1-l)*i,s=2*l-r;return new kt(Ed(t>=240?t-240:t+120,s,r),Ed(t,s,r),Ed(t<120?t+240:t-120,s,r),this.opacity)},clamp(){return new dn(Ex(this.h),qs(this.s),qs(this.l),cc(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 t=cc(this.opacity);return`${t===1?"hsl(":"hsla("}${Ex(this.h)}, ${qs(this.s)*100}%, ${qs(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ex(t){return t=(t||0)%360,t<0?t+360:t}function qs(t){return Math.max(0,Math.min(1,t||0))}function Ed(t,i,l){return(t<60?i+(l-i)*t/60:t<180?l:t<240?i+(l-i)*(240-t)/60:i)*255}const zh=t=>()=>t;function H_(t,i){return function(l){return t+l*i}}function B_(t,i,l){return t=Math.pow(t,l),i=Math.pow(i,l)-t,l=1/l,function(r){return Math.pow(t+r*i,l)}}function U_(t){return(t=+t)==1?Qv:function(i,l){return l-i?B_(i,l,t):zh(isNaN(i)?l:i)}}function Qv(t,i){var l=i-t;return l?H_(t,l):zh(isNaN(t)?i:t)}const uc=(function t(i){var l=U_(i);function r(s,c){var u=l((s=Fd(s)).r,(c=Fd(c)).r),h=l(s.g,c.g),g=l(s.b,c.b),p=Qv(s.opacity,c.opacity);return function(y){return s.r=u(y),s.g=h(y),s.b=g(y),s.opacity=p(y),s+""}}return r.gamma=t,r})(1);function V_(t,i){i||(i=[]);var l=t?Math.min(i.length,t.length):0,r=i.slice(),s;return function(c){for(s=0;s<l;++s)r[s]=t[s]*(1-c)+i[s]*c;return r}}function $_(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Y_(t,i){var l=i?i.length:0,r=t?Math.min(l,t.length):0,s=new Array(r),c=new Array(l),u;for(u=0;u<r;++u)s[u]=Xr(t[u],i[u]);for(;u<l;++u)c[u]=i[u];return function(h){for(u=0;u<r;++u)c[u]=s[u](h);return c}}function q_(t,i){var l=new Date;return t=+t,i=+i,function(r){return l.setTime(t*(1-r)+i*r),l}}function jn(t,i){return t=+t,i=+i,function(l){return t*(1-l)+i*l}}function X_(t,i){var l={},r={},s;(t===null||typeof t!="object")&&(t={}),(i===null||typeof i!="object")&&(i={});for(s in i)s in t?l[s]=Xr(t[s],i[s]):r[s]=i[s];return function(c){for(s in l)r[s]=l[s](c);return r}}var Pd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_d=new RegExp(Pd.source,"g");function G_(t){return function(){return t}}function Z_(t){return function(i){return t(i)+""}}function Kv(t,i){var l=Pd.lastIndex=_d.lastIndex=0,r,s,c,u=-1,h=[],g=[];for(t=t+"",i=i+"";(r=Pd.exec(t))&&(s=_d.exec(i));)(c=s.index)>l&&(c=i.slice(l,c),h[u]?h[u]+=c:h[++u]=c),(r=r[0])===(s=s[0])?h[u]?h[u]+=s:h[++u]=s:(h[++u]=null,g.push({i:u,x:jn(r,s)})),l=_d.lastIndex;return l<i.length&&(c=i.slice(l),h[u]?h[u]+=c:h[++u]=c),h.length<2?g[0]?Z_(g[0].x):G_(i):(i=g.length,function(p){for(var y=0,x;y<i;++y)h[(x=g[y]).i]=x.x(p);return h.join("")})}function Xr(t,i){var l=typeof i,r;return i==null||l==="boolean"?zh(i):(l==="number"?jn:l==="string"?(r=za(i))?(i=r,uc):Kv:i instanceof za?uc:i instanceof Date?q_:$_(i)?V_:Array.isArray(i)?Y_:typeof i.valueOf!="function"&&typeof i.toString!="function"||isNaN(i)?X_:jn)(t,i)}var _x=180/Math.PI,Id={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fv(t,i,l,r,s,c){var u,h,g;return(u=Math.sqrt(t*t+i*i))&&(t/=u,i/=u),(g=t*l+i*r)&&(l-=t*g,r-=i*g),(h=Math.sqrt(l*l+r*r))&&(l/=h,r/=h,g/=h),t*r<i*l&&(t=-t,i=-i,g=-g,u=-u),{translateX:s,translateY:c,rotate:Math.atan2(i,t)*_x,skewX:Math.atan(g)*_x,scaleX:u,scaleY:h}}var Xs;function Q_(t){const i=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return i.isIdentity?Id:Fv(i.a,i.b,i.c,i.d,i.e,i.f)}function K_(t){return t==null||(Xs||(Xs=document.createElementNS("http://www.w3.org/2000/svg","g")),Xs.setAttribute("transform",t),!(t=Xs.transform.baseVal.consolidate()))?Id:(t=t.matrix,Fv(t.a,t.b,t.c,t.d,t.e,t.f))}function Pv(t,i,l,r){function s(p){return p.length?p.pop()+" ":""}function c(p,y,x,v,w,S){if(p!==x||y!==v){var _=w.push("translate(",null,i,null,l);S.push({i:_-4,x:jn(p,x)},{i:_-2,x:jn(y,v)})}else(x||v)&&w.push("translate("+x+i+v+l)}function u(p,y,x,v){p!==y?(p-y>180?y+=360:y-p>180&&(p+=360),v.push({i:x.push(s(x)+"rotate(",null,r)-2,x:jn(p,y)})):y&&x.push(s(x)+"rotate("+y+r)}function h(p,y,x,v){p!==y?v.push({i:x.push(s(x)+"skewX(",null,r)-2,x:jn(p,y)}):y&&x.push(s(x)+"skewX("+y+r)}function g(p,y,x,v,w,S){if(p!==x||y!==v){var _=w.push(s(w)+"scale(",null,",",null,")");S.push({i:_-4,x:jn(p,x)},{i:_-2,x:jn(y,v)})}else(x!==1||v!==1)&&w.push(s(w)+"scale("+x+","+v+")")}return function(p,y){var x=[],v=[];return p=t(p),y=t(y),c(p.translateX,p.translateY,y.translateX,y.translateY,x,v),u(p.rotate,y.rotate,x,v),h(p.skewX,y.skewX,x,v),g(p.scaleX,p.scaleY,y.scaleX,y.scaleY,x,v),p=y=null,function(w){for(var S=-1,_=v.length,E;++S<_;)x[(E=v[S]).i]=E.x(w);return x.join("")}}}var F_=Pv(Q_,"px, ","px)","deg)"),P_=Pv(K_,", ",")",")"),I_=1e-12;function jx(t){return((t=Math.exp(t))+1/t)/2}function J_(t){return((t=Math.exp(t))-1/t)/2}function W_(t){return((t=Math.exp(2*t))-1)/(t+1)}const ec=(function t(i,l,r){function s(c,u){var h=c[0],g=c[1],p=c[2],y=u[0],x=u[1],v=u[2],w=y-h,S=x-g,_=w*w+S*S,E,j;if(_<I_)j=Math.log(v/p)/i,E=function(L){return[h+L*w,g+L*S,p*Math.exp(i*L*j)]};else{var R=Math.sqrt(_),N=(v*v-p*p+r*_)/(2*p*l*R),A=(v*v-p*p-r*_)/(2*v*l*R),z=Math.log(Math.sqrt(N*N+1)-N),k=Math.log(Math.sqrt(A*A+1)-A);j=(k-z)/i,E=function(L){var U=L*j,K=jx(z),ie=p/(l*R)*(K*W_(i*U+z)-J_(z));return[h+ie*w,g+ie*S,p*K/jx(i*U+z)]}}return E.duration=j*1e3*i/Math.SQRT2,E}return s.rho=function(c){var u=Math.max(.001,+c),h=u*u,g=h*h;return t(u,h,g)},s})(Math.SQRT2,2,4);var zl=0,$r=0,Ur=0,Iv=1e3,fc,Yr,dc=0,Oa=0,Mc=0,Pr=typeof performance=="object"&&performance.now?performance:Date,Jv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Oh(){return Oa||(Jv(ej),Oa=Pr.now()+Mc)}function ej(){Oa=0}function hc(){this._call=this._time=this._next=null}hc.prototype=Wv.prototype={constructor:hc,restart:function(t,i,l){if(typeof t!="function")throw new TypeError("callback is not a function");l=(l==null?Oh():+l)+(i==null?0:+i),!this._next&&Yr!==this&&(Yr?Yr._next=this:fc=this,Yr=this),this._call=t,this._time=l,Jd()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jd())}};function Wv(t,i,l){var r=new hc;return r.restart(t,i,l),r}function tj(){Oh(),++zl;for(var t=fc,i;t;)(i=Oa-t._time)>=0&&t._call.call(void 0,i),t=t._next;--zl}function Ax(){Oa=(dc=Pr.now())+Mc,zl=$r=0;try{tj()}finally{zl=0,ij(),Oa=0}}function nj(){var t=Pr.now(),i=t-dc;i>Iv&&(Mc-=i,dc=t)}function ij(){for(var t,i=fc,l,r=1/0;i;)i._call?(r>i._time&&(r=i._time),t=i,i=i._next):(l=i._next,i._next=null,i=t?t._next=l:fc=l);Yr=t,Jd(r)}function Jd(t){if(!zl){$r&&($r=clearTimeout($r));var i=t-Oa;i>24?(t<1/0&&($r=setTimeout(Ax,t-Pr.now()-Mc)),Ur&&(Ur=clearInterval(Ur))):(Ur||(dc=Pr.now(),Ur=setInterval(nj,Iv)),zl=1,Jv(Ax))}}function Cx(t,i,l){var r=new hc;return i=i==null?0:+i,r.restart(s=>{r.stop(),t(s+i)},i,l),r}var aj=Cc("start","end","cancel","interrupt"),lj=[],e1=0,Tx=1,Wd=2,tc=3,Mx=4,eh=5,nc=6;function zc(t,i,l,r,s,c){var u=t.__transition;if(!u)t.__transition={};else if(l in u)return;rj(t,l,{name:i,index:r,group:s,on:aj,tween:lj,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:e1})}function Rh(t,i){var l=yn(t,i);if(l.state>e1)throw new Error("too late; already scheduled");return l}function Rn(t,i){var l=yn(t,i);if(l.state>tc)throw new Error("too late; already running");return l}function yn(t,i){var l=t.__transition;if(!l||!(l=l[i]))throw new Error("transition not found");return l}function rj(t,i,l){var r=t.__transition,s;r[i]=l,l.timer=Wv(c,0,l.time);function c(p){l.state=Tx,l.timer.restart(u,l.delay,l.time),l.delay<=p&&u(p-l.delay)}function u(p){var y,x,v,w;if(l.state!==Tx)return g();for(y in r)if(w=r[y],w.name===l.name){if(w.state===tc)return Cx(u);w.state===Mx?(w.state=nc,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete r[y]):+y<i&&(w.state=nc,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete r[y])}if(Cx(function(){l.state===tc&&(l.state=Mx,l.timer.restart(h,l.delay,l.time),h(p))}),l.state=Wd,l.on.call("start",t,t.__data__,l.index,l.group),l.state===Wd){for(l.state=tc,s=new Array(v=l.tween.length),y=0,x=-1;y<v;++y)(w=l.tween[y].value.call(t,t.__data__,l.index,l.group))&&(s[++x]=w);s.length=x+1}}function h(p){for(var y=p<l.duration?l.ease.call(null,p/l.duration):(l.timer.restart(g),l.state=eh,1),x=-1,v=s.length;++x<v;)s[x].call(t,y);l.state===eh&&(l.on.call("end",t,t.__data__,l.index,l.group),g())}function g(){l.state=nc,l.timer.stop(),delete r[i];for(var p in r)return;delete t.__transition}}function ic(t,i){var l=t.__transition,r,s,c=!0,u;if(l){i=i==null?null:i+"";for(u in l){if((r=l[u]).name!==i){c=!1;continue}s=r.state>Wd&&r.state<eh,r.state=nc,r.timer.stop(),r.on.call(s?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete l[u]}c&&delete t.__transition}}function oj(t){return this.each(function(){ic(this,t)})}function sj(t,i){var l,r;return function(){var s=Rn(this,t),c=s.tween;if(c!==l){r=l=c;for(var u=0,h=r.length;u<h;++u)if(r[u].name===i){r=r.slice(),r.splice(u,1);break}}s.tween=r}}function cj(t,i,l){var r,s;if(typeof l!="function")throw new Error;return function(){var c=Rn(this,t),u=c.tween;if(u!==r){s=(r=u).slice();for(var h={name:i,value:l},g=0,p=s.length;g<p;++g)if(s[g].name===i){s[g]=h;break}g===p&&s.push(h)}c.tween=s}}function uj(t,i){var l=this._id;if(t+="",arguments.length<2){for(var r=yn(this.node(),l).tween,s=0,c=r.length,u;s<c;++s)if((u=r[s]).name===t)return u.value;return null}return this.each((i==null?sj:cj)(l,t,i))}function kh(t,i,l){var r=t._id;return t.each(function(){var s=Rn(this,r);(s.value||(s.value={}))[i]=l.apply(this,arguments)}),function(s){return yn(s,r).value[i]}}function t1(t,i){var l;return(typeof i=="number"?jn:i instanceof za?uc:(l=za(i))?(i=l,uc):Kv)(t,i)}function fj(t){return function(){this.removeAttribute(t)}}function dj(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hj(t,i,l){var r,s=l+"",c;return function(){var u=this.getAttribute(t);return u===s?null:u===r?c:c=i(r=u,l)}}function mj(t,i,l){var r,s=l+"",c;return function(){var u=this.getAttributeNS(t.space,t.local);return u===s?null:u===r?c:c=i(r=u,l)}}function pj(t,i,l){var r,s,c;return function(){var u,h=l(this),g;return h==null?void this.removeAttribute(t):(u=this.getAttribute(t),g=h+"",u===g?null:u===r&&g===s?c:(s=g,c=i(r=u,h)))}}function gj(t,i,l){var r,s,c;return function(){var u,h=l(this),g;return h==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),g=h+"",u===g?null:u===r&&g===s?c:(s=g,c=i(r=u,h)))}}function xj(t,i){var l=Tc(t),r=l==="transform"?P_:t1;return this.attrTween(t,typeof i=="function"?(l.local?gj:pj)(l,r,kh(this,"attr."+t,i)):i==null?(l.local?dj:fj)(l):(l.local?mj:hj)(l,r,i))}function yj(t,i){return function(l){this.setAttribute(t,i.call(this,l))}}function vj(t,i){return function(l){this.setAttributeNS(t.space,t.local,i.call(this,l))}}function bj(t,i){var l,r;function s(){var c=i.apply(this,arguments);return c!==r&&(l=(r=c)&&vj(t,c)),l}return s._value=i,s}function wj(t,i){var l,r;function s(){var c=i.apply(this,arguments);return c!==r&&(l=(r=c)&&yj(t,c)),l}return s._value=i,s}function Sj(t,i){var l="attr."+t;if(arguments.length<2)return(l=this.tween(l))&&l._value;if(i==null)return this.tween(l,null);if(typeof i!="function")throw new Error;var r=Tc(t);return this.tween(l,(r.local?bj:wj)(r,i))}function Nj(t,i){return function(){Rh(this,t).delay=+i.apply(this,arguments)}}function Ej(t,i){return i=+i,function(){Rh(this,t).delay=i}}function _j(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?Nj:Ej)(i,t)):yn(this.node(),i).delay}function jj(t,i){return function(){Rn(this,t).duration=+i.apply(this,arguments)}}function Aj(t,i){return i=+i,function(){Rn(this,t).duration=i}}function Cj(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?jj:Aj)(i,t)):yn(this.node(),i).duration}function Tj(t,i){if(typeof i!="function")throw new Error;return function(){Rn(this,t).ease=i}}function Mj(t){var i=this._id;return arguments.length?this.each(Tj(i,t)):yn(this.node(),i).ease}function zj(t,i){return function(){var l=i.apply(this,arguments);if(typeof l!="function")throw new Error;Rn(this,t).ease=l}}function Oj(t){if(typeof t!="function")throw new Error;return this.each(zj(this._id,t))}function Rj(t){typeof t!="function"&&(t=Ov(t));for(var i=this._groups,l=i.length,r=new Array(l),s=0;s<l;++s)for(var c=i[s],u=c.length,h=r[s]=[],g,p=0;p<u;++p)(g=c[p])&&t.call(g,g.__data__,p,c)&&h.push(g);return new si(r,this._parents,this._name,this._id)}function kj(t){if(t._id!==this._id)throw new Error;for(var i=this._groups,l=t._groups,r=i.length,s=l.length,c=Math.min(r,s),u=new Array(r),h=0;h<c;++h)for(var g=i[h],p=l[h],y=g.length,x=u[h]=new Array(y),v,w=0;w<y;++w)(v=g[w]||p[w])&&(x[w]=v);for(;h<r;++h)u[h]=i[h];return new si(u,this._parents,this._name,this._id)}function Dj(t){return(t+"").trim().split(/^|\s+/).every(function(i){var l=i.indexOf(".");return l>=0&&(i=i.slice(0,l)),!i||i==="start"})}function Lj(t,i,l){var r,s,c=Dj(i)?Rh:Rn;return function(){var u=c(this,t),h=u.on;h!==r&&(s=(r=h).copy()).on(i,l),u.on=s}}function Hj(t,i){var l=this._id;return arguments.length<2?yn(this.node(),l).on.on(t):this.each(Lj(l,t,i))}function Bj(t){return function(){var i=this.parentNode;for(var l in this.__transition)if(+l!==t)return;i&&i.removeChild(this)}}function Uj(){return this.on("end.remove",Bj(this._id))}function Vj(t){var i=this._name,l=this._id;typeof t!="function"&&(t=Ch(t));for(var r=this._groups,s=r.length,c=new Array(s),u=0;u<s;++u)for(var h=r[u],g=h.length,p=c[u]=new Array(g),y,x,v=0;v<g;++v)(y=h[v])&&(x=t.call(y,y.__data__,v,h))&&("__data__"in y&&(x.__data__=y.__data__),p[v]=x,zc(p[v],i,l,v,p,yn(y,l)));return new si(c,this._parents,i,l)}function $j(t){var i=this._name,l=this._id;typeof t!="function"&&(t=zv(t));for(var r=this._groups,s=r.length,c=[],u=[],h=0;h<s;++h)for(var g=r[h],p=g.length,y,x=0;x<p;++x)if(y=g[x]){for(var v=t.call(y,y.__data__,x,g),w,S=yn(y,l),_=0,E=v.length;_<E;++_)(w=v[_])&&zc(w,i,l,_,v,S);c.push(v),u.push(y)}return new si(c,u,i,l)}var Yj=lo.prototype.constructor;function qj(){return new Yj(this._groups,this._parents)}function Xj(t,i){var l,r,s;return function(){var c=Ml(this,t),u=(this.style.removeProperty(t),Ml(this,t));return c===u?null:c===l&&u===r?s:s=i(l=c,r=u)}}function n1(t){return function(){this.style.removeProperty(t)}}function Gj(t,i,l){var r,s=l+"",c;return function(){var u=Ml(this,t);return u===s?null:u===r?c:c=i(r=u,l)}}function Zj(t,i,l){var r,s,c;return function(){var u=Ml(this,t),h=l(this),g=h+"";return h==null&&(g=h=(this.style.removeProperty(t),Ml(this,t))),u===g?null:u===r&&g===s?c:(s=g,c=i(r=u,h))}}function Qj(t,i){var l,r,s,c="style."+i,u="end."+c,h;return function(){var g=Rn(this,t),p=g.on,y=g.value[c]==null?h||(h=n1(i)):void 0;(p!==l||s!==y)&&(r=(l=p).copy()).on(u,s=y),g.on=r}}function Kj(t,i,l){var r=(t+="")=="transform"?F_:t1;return i==null?this.styleTween(t,Xj(t,r)).on("end.style."+t,n1(t)):typeof i=="function"?this.styleTween(t,Zj(t,r,kh(this,"style."+t,i))).each(Qj(this._id,t)):this.styleTween(t,Gj(t,r,i),l).on("end.style."+t,null)}function Fj(t,i,l){return function(r){this.style.setProperty(t,i.call(this,r),l)}}function Pj(t,i,l){var r,s;function c(){var u=i.apply(this,arguments);return u!==s&&(r=(s=u)&&Fj(t,u,l)),r}return c._value=i,c}function Ij(t,i,l){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(i==null)return this.tween(r,null);if(typeof i!="function")throw new Error;return this.tween(r,Pj(t,i,l??""))}function Jj(t){return function(){this.textContent=t}}function Wj(t){return function(){var i=t(this);this.textContent=i??""}}function e3(t){return this.tween("text",typeof t=="function"?Wj(kh(this,"text",t)):Jj(t==null?"":t+""))}function t3(t){return function(i){this.textContent=t.call(this,i)}}function n3(t){var i,l;function r(){var s=t.apply(this,arguments);return s!==l&&(i=(l=s)&&t3(s)),i}return r._value=t,r}function i3(t){var i="text";if(arguments.length<1)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,n3(t))}function a3(){for(var t=this._name,i=this._id,l=i1(),r=this._groups,s=r.length,c=0;c<s;++c)for(var u=r[c],h=u.length,g,p=0;p<h;++p)if(g=u[p]){var y=yn(g,i);zc(g,t,l,p,u,{time:y.time+y.delay+y.duration,delay:0,duration:y.duration,ease:y.ease})}return new si(r,this._parents,t,l)}function l3(){var t,i,l=this,r=l._id,s=l.size();return new Promise(function(c,u){var h={value:u},g={value:function(){--s===0&&c()}};l.each(function(){var p=Rn(this,r),y=p.on;y!==t&&(i=(t=y).copy(),i._.cancel.push(h),i._.interrupt.push(h),i._.end.push(g)),p.on=i}),s===0&&c()})}var r3=0;function si(t,i,l,r){this._groups=t,this._parents=i,this._name=l,this._id=r}function i1(){return++r3}var li=lo.prototype;si.prototype={constructor:si,select:Vj,selectAll:$j,selectChild:li.selectChild,selectChildren:li.selectChildren,filter:Rj,merge:kj,selection:qj,transition:a3,call:li.call,nodes:li.nodes,node:li.node,size:li.size,empty:li.empty,each:li.each,on:Hj,attr:xj,attrTween:Sj,style:Kj,styleTween:Ij,text:e3,textTween:i3,remove:Uj,tween:uj,delay:_j,duration:Cj,ease:Mj,easeVarying:Oj,end:l3,[Symbol.iterator]:li[Symbol.iterator]};function o3(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var s3={time:null,delay:0,duration:250,ease:o3};function c3(t,i){for(var l;!(l=t.__transition)||!(l=l[i]);)if(!(t=t.parentNode))throw new Error(`transition ${i} not found`);return l}function u3(t){var i,l;t instanceof si?(i=t._id,t=t._name):(i=i1(),(l=s3).time=Oh(),t=t==null?null:t+"");for(var r=this._groups,s=r.length,c=0;c<s;++c)for(var u=r[c],h=u.length,g,p=0;p<h;++p)(g=u[p])&&zc(g,t,i,p,u,l||c3(g,i));return new si(r,this._parents,t,i)}lo.prototype.interrupt=oj;lo.prototype.transition=u3;const Gs=t=>()=>t;function f3(t,{sourceEvent:i,target:l,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},target:{value:l,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function oi(t,i,l){this.k=t,this.x=i,this.y=l}oi.prototype={constructor:oi,scale:function(t){return t===1?this:new oi(this.k*t,this.x,this.y)},translate:function(t,i){return t===0&i===0?this:new oi(this.k,this.x+this.k*t,this.y+this.k*i)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Oc=new oi(1,0,0);a1.prototype=oi.prototype;function a1(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Oc;return t.__zoom}function jd(t){t.stopImmediatePropagation()}function Vr(t){t.preventDefault(),t.stopImmediatePropagation()}function d3(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function h3(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function zx(){return this.__zoom||Oc}function m3(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function p3(){return navigator.maxTouchPoints||"ontouchstart"in this}function g3(t,i,l){var r=t.invertX(i[0][0])-l[0][0],s=t.invertX(i[1][0])-l[1][0],c=t.invertY(i[0][1])-l[0][1],u=t.invertY(i[1][1])-l[1][1];return t.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),u>c?(c+u)/2:Math.min(0,c)||Math.max(0,u))}function l1(){var t=d3,i=h3,l=g3,r=m3,s=p3,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],h=250,g=ec,p=Cc("start","zoom","end"),y,x,v,w=500,S=150,_=0,E=10;function j(D){D.property("__zoom",zx).on("wheel.zoom",U,{passive:!1}).on("mousedown.zoom",K).on("dblclick.zoom",ie).filter(s).on("touchstart.zoom",G).on("touchmove.zoom",Q).on("touchend.zoom touchcancel.zoom",te).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}j.transform=function(D,Z,M,H){var B=D.selection?D.selection():D;B.property("__zoom",zx),D!==B?z(D,Z,M,H):B.interrupt().each(function(){k(this,arguments).event(H).start().zoom(null,typeof Z=="function"?Z.apply(this,arguments):Z).end()})},j.scaleBy=function(D,Z,M,H){j.scaleTo(D,function(){var B=this.__zoom.k,Y=typeof Z=="function"?Z.apply(this,arguments):Z;return B*Y},M,H)},j.scaleTo=function(D,Z,M,H){j.transform(D,function(){var B=i.apply(this,arguments),Y=this.__zoom,q=M==null?A(B):typeof M=="function"?M.apply(this,arguments):M,O=Y.invert(q),V=typeof Z=="function"?Z.apply(this,arguments):Z;return l(N(R(Y,V),q,O),B,u)},M,H)},j.translateBy=function(D,Z,M,H){j.transform(D,function(){return l(this.__zoom.translate(typeof Z=="function"?Z.apply(this,arguments):Z,typeof M=="function"?M.apply(this,arguments):M),i.apply(this,arguments),u)},null,H)},j.translateTo=function(D,Z,M,H,B){j.transform(D,function(){var Y=i.apply(this,arguments),q=this.__zoom,O=H==null?A(Y):typeof H=="function"?H.apply(this,arguments):H;return l(Oc.translate(O[0],O[1]).scale(q.k).translate(typeof Z=="function"?-Z.apply(this,arguments):-Z,typeof M=="function"?-M.apply(this,arguments):-M),Y,u)},H,B)};function R(D,Z){return Z=Math.max(c[0],Math.min(c[1],Z)),Z===D.k?D:new oi(Z,D.x,D.y)}function N(D,Z,M){var H=Z[0]-M[0]*D.k,B=Z[1]-M[1]*D.k;return H===D.x&&B===D.y?D:new oi(D.k,H,B)}function A(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function z(D,Z,M,H){D.on("start.zoom",function(){k(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(H).end()}).tween("zoom",function(){var B=this,Y=arguments,q=k(B,Y).event(H),O=i.apply(B,Y),V=M==null?A(O):typeof M=="function"?M.apply(B,Y):M,W=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),ne=B.__zoom,oe=typeof Z=="function"?Z.apply(B,Y):Z,se=g(ne.invert(V).concat(W/ne.k),oe.invert(V).concat(W/oe.k));return function(fe){if(fe===1)fe=oe;else{var ce=se(fe),ue=W/ce[2];fe=new oi(ue,V[0]-ce[0]*ue,V[1]-ce[1]*ue)}q.zoom(null,fe)}})}function k(D,Z,M){return!M&&D.__zooming||new L(D,Z)}function L(D,Z){this.that=D,this.args=Z,this.active=0,this.sourceEvent=null,this.extent=i.apply(D,Z),this.taps=0}L.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,Z){return this.mouse&&D!=="mouse"&&(this.mouse[1]=Z.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=Z.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=Z.invert(this.touch1[0])),this.that.__zoom=Z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var Z=Zt(this.that).datum();p.call(D,this.that,new f3(D,{sourceEvent:this.sourceEvent,target:j,transform:this.that.__zoom,dispatch:p}),Z)}};function U(D,...Z){if(!t.apply(this,arguments))return;var M=k(this,Z).event(D),H=this.__zoom,B=Math.max(c[0],Math.min(c[1],H.k*Math.pow(2,r.apply(this,arguments)))),Y=fn(D);if(M.wheel)(M.mouse[0][0]!==Y[0]||M.mouse[0][1]!==Y[1])&&(M.mouse[1]=H.invert(M.mouse[0]=Y)),clearTimeout(M.wheel);else{if(H.k===B)return;M.mouse=[Y,H.invert(Y)],ic(this),M.start()}Vr(D),M.wheel=setTimeout(q,S),M.zoom("mouse",l(N(R(H,B),M.mouse[0],M.mouse[1]),M.extent,u));function q(){M.wheel=null,M.end()}}function K(D,...Z){if(v||!t.apply(this,arguments))return;var M=D.currentTarget,H=k(this,Z,!0).event(D),B=Zt(D.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",W,!0),Y=fn(D,M),q=D.clientX,O=D.clientY;Yv(D.view),jd(D),H.mouse=[Y,this.__zoom.invert(Y)],ic(this),H.start();function V(ne){if(Vr(ne),!H.moved){var oe=ne.clientX-q,se=ne.clientY-O;H.moved=oe*oe+se*se>_}H.event(ne).zoom("mouse",l(N(H.that.__zoom,H.mouse[0]=fn(ne,M),H.mouse[1]),H.extent,u))}function W(ne){B.on("mousemove.zoom mouseup.zoom",null),qv(ne.view,H.moved),Vr(ne),H.event(ne).end()}}function ie(D,...Z){if(t.apply(this,arguments)){var M=this.__zoom,H=fn(D.changedTouches?D.changedTouches[0]:D,this),B=M.invert(H),Y=M.k*(D.shiftKey?.5:2),q=l(N(R(M,Y),H,B),i.apply(this,Z),u);Vr(D),h>0?Zt(this).transition().duration(h).call(z,q,H,D):Zt(this).call(j.transform,q,H,D)}}function G(D,...Z){if(t.apply(this,arguments)){var M=D.touches,H=M.length,B=k(this,Z,D.changedTouches.length===H).event(D),Y,q,O,V;for(jd(D),q=0;q<H;++q)O=M[q],V=fn(O,this),V=[V,this.__zoom.invert(V),O.identifier],B.touch0?!B.touch1&&B.touch0[2]!==V[2]&&(B.touch1=V,B.taps=0):(B.touch0=V,Y=!0,B.taps=1+!!y);y&&(y=clearTimeout(y)),Y&&(B.taps<2&&(x=V[0],y=setTimeout(function(){y=null},w)),ic(this),B.start())}}function Q(D,...Z){if(this.__zooming){var M=k(this,Z).event(D),H=D.changedTouches,B=H.length,Y,q,O,V;for(Vr(D),Y=0;Y<B;++Y)q=H[Y],O=fn(q,this),M.touch0&&M.touch0[2]===q.identifier?M.touch0[0]=O:M.touch1&&M.touch1[2]===q.identifier&&(M.touch1[0]=O);if(q=M.that.__zoom,M.touch1){var W=M.touch0[0],ne=M.touch0[1],oe=M.touch1[0],se=M.touch1[1],fe=(fe=oe[0]-W[0])*fe+(fe=oe[1]-W[1])*fe,ce=(ce=se[0]-ne[0])*ce+(ce=se[1]-ne[1])*ce;q=R(q,Math.sqrt(fe/ce)),O=[(W[0]+oe[0])/2,(W[1]+oe[1])/2],V=[(ne[0]+se[0])/2,(ne[1]+se[1])/2]}else if(M.touch0)O=M.touch0[0],V=M.touch0[1];else return;M.zoom("touch",l(N(q,O,V),M.extent,u))}}function te(D,...Z){if(this.__zooming){var M=k(this,Z).event(D),H=D.changedTouches,B=H.length,Y,q;for(jd(D),v&&clearTimeout(v),v=setTimeout(function(){v=null},w),Y=0;Y<B;++Y)q=H[Y],M.touch0&&M.touch0[2]===q.identifier?delete M.touch0:M.touch1&&M.touch1[2]===q.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&&(q=fn(q,this),Math.hypot(x[0]-q[0],x[1]-q[1])<E)){var O=Zt(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return j.wheelDelta=function(D){return arguments.length?(r=typeof D=="function"?D:Gs(+D),j):r},j.filter=function(D){return arguments.length?(t=typeof D=="function"?D:Gs(!!D),j):t},j.touchable=function(D){return arguments.length?(s=typeof D=="function"?D:Gs(!!D),j):s},j.extent=function(D){return arguments.length?(i=typeof D=="function"?D:Gs([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),j):i},j.scaleExtent=function(D){return arguments.length?(c[0]=+D[0],c[1]=+D[1],j):[c[0],c[1]]},j.translateExtent=function(D){return arguments.length?(u[0][0]=+D[0][0],u[1][0]=+D[1][0],u[0][1]=+D[0][1],u[1][1]=+D[1][1],j):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},j.constrain=function(D){return arguments.length?(l=D,j):l},j.duration=function(D){return arguments.length?(h=+D,j):h},j.interpolate=function(D){return arguments.length?(g=D,j):g},j.on=function(){var D=p.on.apply(p,arguments);return D===p?j:D},j.clickDistance=function(D){return arguments.length?(_=(D=+D)*D,j):Math.sqrt(_)},j.tapDistance=function(D){return arguments.length?(E=+D,j):E},j}const zn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:i,sourceHandle:l,targetHandle:r})=>`Couldn't create edge for ${t} handle id: "${t==="source"?l:r}", edge id: ${i}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Ir=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],r1=["Enter"," ","Escape"],o1={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:i,y:l})=>`Moved selected node ${t}. New position, x: ${i}, y: ${l}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Ol;(function(t){t.Strict="strict",t.Loose="loose"})(Ol||(Ol={}));var Ta;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(Ta||(Ta={}));var Jr;(function(t){t.Partial="partial",t.Full="full"})(Jr||(Jr={}));const s1={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Zi;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Zi||(Zi={}));var mc;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(mc||(mc={}));var be;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(be||(be={}));const Ox={[be.Left]:be.Right,[be.Right]:be.Left,[be.Top]:be.Bottom,[be.Bottom]:be.Top};function c1(t){return t===null?null:t?"valid":"invalid"}const u1=t=>"id"in t&&"source"in t&&"target"in t,x3=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),Dh=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),oo=(t,i=[0,0])=>{const{width:l,height:r}=fi(t),s=t.origin??i,c=l*s[0],u=r*s[1];return{x:t.position.x-c,y:t.position.y-u}},y3=(t,i={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const l=t.reduce((r,s)=>{const c=typeof s=="string";let u=!i.nodeLookup&&!c?s:void 0;i.nodeLookup&&(u=c?i.nodeLookup.get(s):Dh(s)?s:i.nodeLookup.get(s.id));const h=u?pc(u,i.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Rc(r,h)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return kc(l)},so=(t,i={})=>{let l={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return t.forEach(s=>{(i.filter===void 0||i.filter(s))&&(l=Rc(l,pc(s)),r=!0)}),r?kc(l):{x:0,y:0,width:0,height:0}},Lh=(t,i,[l,r,s]=[0,0,1],c=!1,u=!1)=>{const h={...uo(i,[l,r,s]),width:i.width/s,height:i.height/s},g=[];for(const p of t.values()){const{measured:y,selectable:x=!0,hidden:v=!1}=p;if(u&&!x||v)continue;const w=y.width??p.width??p.initialWidth??null,S=y.height??p.height??p.initialHeight??null,_=Wr(h,kl(p)),E=(w??0)*(S??0),j=c&&_>0;(!p.internals.handleBounds||j||_>=E||p.dragging)&&g.push(p)}return g},v3=(t,i)=>{const l=new Set;return t.forEach(r=>{l.add(r.id)}),i.filter(r=>l.has(r.source)||l.has(r.target))};function b3(t,i){const l=new Map,r=i!=null&&i.nodes?new Set(i.nodes.map(s=>s.id)):null;return t.forEach(s=>{s.measured.width&&s.measured.height&&((i==null?void 0:i.includeHiddenNodes)||!s.hidden)&&(!r||r.has(s.id))&&l.set(s.id,s)}),l}async function w3({nodes:t,width:i,height:l,panZoom:r,minZoom:s,maxZoom:c},u){if(t.size===0)return Promise.resolve(!0);const h=b3(t,u),g=so(h),p=Hh(g,i,l,(u==null?void 0:u.minZoom)??s,(u==null?void 0:u.maxZoom)??c,(u==null?void 0:u.padding)??.1);return await r.setViewport(p,{duration:u==null?void 0:u.duration,ease:u==null?void 0:u.ease,interpolate:u==null?void 0:u.interpolate}),Promise.resolve(!0)}function f1({nodeId:t,nextPosition:i,nodeLookup:l,nodeOrigin:r=[0,0],nodeExtent:s,onError:c}){const u=l.get(t),h=u.parentId?l.get(u.parentId):void 0,{x:g,y:p}=h?h.internals.positionAbsolute:{x:0,y:0},y=u.origin??r;let x=u.extent||s;if(u.extent==="parent"&&!u.expandParent)if(!h)c==null||c("005",zn.error005());else{const w=h.measured.width,S=h.measured.height;w&&S&&(x=[[g,p],[g+w,p+S]])}else h&&Dl(u.extent)&&(x=[[u.extent[0][0]+g,u.extent[0][1]+p],[u.extent[1][0]+g,u.extent[1][1]+p]]);const v=Dl(x)?Ra(i,x,u.measured):i;return(u.measured.width===void 0||u.measured.height===void 0)&&(c==null||c("015",zn.error015())),{position:{x:v.x-g+(u.measured.width??0)*y[0],y:v.y-p+(u.measured.height??0)*y[1]},positionAbsolute:v}}async function S3({nodesToRemove:t=[],edgesToRemove:i=[],nodes:l,edges:r,onBeforeDelete:s}){const c=new Set(t.map(v=>v.id)),u=[];for(const v of l){if(v.deletable===!1)continue;const w=c.has(v.id),S=!w&&v.parentId&&u.find(_=>_.id===v.parentId);(w||S)&&u.push(v)}const h=new Set(i.map(v=>v.id)),g=r.filter(v=>v.deletable!==!1),y=v3(u,g);for(const v of g)h.has(v.id)&&!y.find(S=>S.id===v.id)&&y.push(v);if(!s)return{edges:y,nodes:u};const x=await s({nodes:u,edges:y});return typeof x=="boolean"?x?{edges:y,nodes:u}:{edges:[],nodes:[]}:x}const Rl=(t,i=0,l=1)=>Math.min(Math.max(t,i),l),Ra=(t={x:0,y:0},i,l)=>({x:Rl(t.x,i[0][0],i[1][0]-((l==null?void 0:l.width)??0)),y:Rl(t.y,i[0][1],i[1][1]-((l==null?void 0:l.height)??0))});function d1(t,i,l){const{width:r,height:s}=fi(l),{x:c,y:u}=l.internals.positionAbsolute;return Ra(t,[[c,u],[c+r,u+s]],i)}const Rx=(t,i,l)=>t<i?Rl(Math.abs(t-i),1,i)/i:t>l?-Rl(Math.abs(t-l),1,i)/i:0,h1=(t,i,l=15,r=40)=>{const s=Rx(t.x,r,i.width-r)*l,c=Rx(t.y,r,i.height-r)*l;return[s,c]},Rc=(t,i)=>({x:Math.min(t.x,i.x),y:Math.min(t.y,i.y),x2:Math.max(t.x2,i.x2),y2:Math.max(t.y2,i.y2)}),th=({x:t,y:i,width:l,height:r})=>({x:t,y:i,x2:t+l,y2:i+r}),kc=({x:t,y:i,x2:l,y2:r})=>({x:t,y:i,width:l-t,height:r-i}),kl=(t,i=[0,0])=>{var s,c;const{x:l,y:r}=Dh(t)?t.internals.positionAbsolute:oo(t,i);return{x:l,y:r,width:((s=t.measured)==null?void 0:s.width)??t.width??t.initialWidth??0,height:((c=t.measured)==null?void 0:c.height)??t.height??t.initialHeight??0}},pc=(t,i=[0,0])=>{var s,c;const{x:l,y:r}=Dh(t)?t.internals.positionAbsolute:oo(t,i);return{x:l,y:r,x2:l+(((s=t.measured)==null?void 0:s.width)??t.width??t.initialWidth??0),y2:r+(((c=t.measured)==null?void 0:c.height)??t.height??t.initialHeight??0)}},m1=(t,i)=>kc(Rc(th(t),th(i))),Wr=(t,i)=>{const l=Math.max(0,Math.min(t.x+t.width,i.x+i.width)-Math.max(t.x,i.x)),r=Math.max(0,Math.min(t.y+t.height,i.y+i.height)-Math.max(t.y,i.y));return Math.ceil(l*r)},kx=t=>hn(t.width)&&hn(t.height)&&hn(t.x)&&hn(t.y),hn=t=>!isNaN(t)&&isFinite(t),N3=(t,i)=>{},co=(t,i=[1,1])=>({x:i[0]*Math.round(t.x/i[0]),y:i[1]*Math.round(t.y/i[1])}),uo=({x:t,y:i},[l,r,s],c=!1,u=[1,1])=>{const h={x:(t-l)/s,y:(i-r)/s};return c?co(h,u):h},gc=({x:t,y:i},[l,r,s])=>({x:t*s+l,y:i*s+r});function El(t,i){if(typeof t=="number")return Math.floor((i-i/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const l=parseFloat(t);if(!Number.isNaN(l))return Math.floor(l)}if(typeof t=="string"&&t.endsWith("%")){const l=parseFloat(t);if(!Number.isNaN(l))return Math.floor(i*l*.01)}return console.error(`[React Flow] The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function E3(t,i,l){if(typeof t=="string"||typeof t=="number"){const r=El(t,l),s=El(t,i);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof t=="object"){const r=El(t.top??t.y??0,l),s=El(t.bottom??t.y??0,l),c=El(t.left??t.x??0,i),u=El(t.right??t.x??0,i);return{top:r,right:u,bottom:s,left:c,x:c+u,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function _3(t,i,l,r,s,c){const{x:u,y:h}=gc(t,[i,l,r]),{x:g,y:p}=gc({x:t.x+t.width,y:t.y+t.height},[i,l,r]),y=s-g,x=c-p;return{left:Math.floor(u),top:Math.floor(h),right:Math.floor(y),bottom:Math.floor(x)}}const Hh=(t,i,l,r,s,c)=>{const u=E3(c,i,l),h=(i-u.x)/t.width,g=(l-u.y)/t.height,p=Math.min(h,g),y=Rl(p,r,s),x=t.x+t.width/2,v=t.y+t.height/2,w=i/2-x*y,S=l/2-v*y,_=_3(t,w,S,y,i,l),E={left:Math.min(_.left-u.left,0),top:Math.min(_.top-u.top,0),right:Math.min(_.right-u.right,0),bottom:Math.min(_.bottom-u.bottom,0)};return{x:w-E.left+E.right,y:S-E.top+E.bottom,zoom:y}},eo=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function Dl(t){return t!=null&&t!=="parent"}function fi(t){var i,l;return{width:((i=t.measured)==null?void 0:i.width)??t.width??t.initialWidth??0,height:((l=t.measured)==null?void 0:l.height)??t.height??t.initialHeight??0}}function p1(t){var i,l;return(((i=t.measured)==null?void 0:i.width)??t.width??t.initialWidth)!==void 0&&(((l=t.measured)==null?void 0:l.height)??t.height??t.initialHeight)!==void 0}function g1(t,i={width:0,height:0},l,r,s){const c={...t},u=r.get(l);if(u){const h=u.origin||s;c.x+=u.internals.positionAbsolute.x-(i.width??0)*h[0],c.y+=u.internals.positionAbsolute.y-(i.height??0)*h[1]}return c}function Dx(t,i){if(t.size!==i.size)return!1;for(const l of t)if(!i.has(l))return!1;return!0}function j3(){let t,i;return{promise:new Promise((r,s)=>{t=r,i=s}),resolve:t,reject:i}}function A3(t){return{...o1,...t||{}}}function Gr(t,{snapGrid:i=[0,0],snapToGrid:l=!1,transform:r,containerBounds:s}){const{x:c,y:u}=mn(t),h=uo({x:c-((s==null?void 0:s.left)??0),y:u-((s==null?void 0:s.top)??0)},r),{x:g,y:p}=l?co(h,i):h;return{xSnapped:g,ySnapped:p,...h}}const Bh=t=>({width:t.offsetWidth,height:t.offsetHeight}),x1=t=>{var i;return((i=t==null?void 0:t.getRootNode)==null?void 0:i.call(t))||(window==null?void 0:window.document)},C3=["INPUT","SELECT","TEXTAREA"];function y1(t){var r,s;const i=((s=(r=t.composedPath)==null?void 0:r.call(t))==null?void 0:s[0])||t.target;return(i==null?void 0:i.nodeType)!==1?!1:C3.includes(i.nodeName)||i.hasAttribute("contenteditable")||!!i.closest(".nokey")}const v1=t=>"clientX"in t,mn=(t,i)=>{var c,u;const l=v1(t),r=l?t.clientX:(c=t.touches)==null?void 0:c[0].clientX,s=l?t.clientY:(u=t.touches)==null?void 0:u[0].clientY;return{x:r-((i==null?void 0:i.left)??0),y:s-((i==null?void 0:i.top)??0)}},Lx=(t,i,l,r,s)=>{const c=i.querySelectorAll(`.${t}`);return!c||!c.length?null:Array.from(c).map(u=>{const h=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:t,nodeId:s,position:u.getAttribute("data-handlepos"),x:(h.left-l.left)/r,y:(h.top-l.top)/r,...Bh(u)}})};function b1({sourceX:t,sourceY:i,targetX:l,targetY:r,sourceControlX:s,sourceControlY:c,targetControlX:u,targetControlY:h}){const g=t*.125+s*.375+u*.375+l*.125,p=i*.125+c*.375+h*.375+r*.125,y=Math.abs(g-t),x=Math.abs(p-i);return[g,p,y,x]}function Zs(t,i){return t>=0?.5*t:i*25*Math.sqrt(-t)}function Hx({pos:t,x1:i,y1:l,x2:r,y2:s,c}){switch(t){case be.Left:return[i-Zs(i-r,c),l];case be.Right:return[i+Zs(r-i,c),l];case be.Top:return[i,l-Zs(l-s,c)];case be.Bottom:return[i,l+Zs(s-l,c)]}}function w1({sourceX:t,sourceY:i,sourcePosition:l=be.Bottom,targetX:r,targetY:s,targetPosition:c=be.Top,curvature:u=.25}){const[h,g]=Hx({pos:l,x1:t,y1:i,x2:r,y2:s,c:u}),[p,y]=Hx({pos:c,x1:r,y1:s,x2:t,y2:i,c:u}),[x,v,w,S]=b1({sourceX:t,sourceY:i,targetX:r,targetY:s,sourceControlX:h,sourceControlY:g,targetControlX:p,targetControlY:y});return[`M${t},${i} C${h},${g} ${p},${y} ${r},${s}`,x,v,w,S]}function S1({sourceX:t,sourceY:i,targetX:l,targetY:r}){const s=Math.abs(l-t)/2,c=l<t?l+s:l-s,u=Math.abs(r-i)/2,h=r<i?r+u:r-u;return[c,h,s,u]}function T3({sourceNode:t,targetNode:i,selected:l=!1,zIndex:r=0,elevateOnSelect:s=!1,zIndexMode:c="basic"}){if(c==="manual")return r;const u=s&&l?r+1e3:r,h=Math.max(t.parentId||s&&t.selected?t.internals.z:0,i.parentId||s&&i.selected?i.internals.z:0);return u+h}function M3({sourceNode:t,targetNode:i,width:l,height:r,transform:s}){const c=Rc(pc(t),pc(i));c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u={x:-s[0]/s[2],y:-s[1]/s[2],width:l/s[2],height:r/s[2]};return Wr(u,kc(c))>0}const z3=({source:t,sourceHandle:i,target:l,targetHandle:r})=>`xy-edge__${t}${i||""}-${l}${r||""}`,O3=(t,i)=>i.some(l=>l.source===t.source&&l.target===t.target&&(l.sourceHandle===t.sourceHandle||!l.sourceHandle&&!t.sourceHandle)&&(l.targetHandle===t.targetHandle||!l.targetHandle&&!t.targetHandle)),R3=(t,i,l={})=>{if(!t.source||!t.target)return i;const r=l.getEdgeId||z3;let s;return u1(t)?s={...t}:s={...t,id:r(t)},O3(s,i)?i:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,i.concat(s))};function N1({sourceX:t,sourceY:i,targetX:l,targetY:r}){const[s,c,u,h]=S1({sourceX:t,sourceY:i,targetX:l,targetY:r});return[`M ${t},${i}L ${l},${r}`,s,c,u,h]}const Bx={[be.Left]:{x:-1,y:0},[be.Right]:{x:1,y:0},[be.Top]:{x:0,y:-1},[be.Bottom]:{x:0,y:1}},k3=({source:t,sourcePosition:i=be.Bottom,target:l})=>i===be.Left||i===be.Right?t.x<l.x?{x:1,y:0}:{x:-1,y:0}:t.y<l.y?{x:0,y:1}:{x:0,y:-1},Ux=(t,i)=>Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2));function D3({source:t,sourcePosition:i=be.Bottom,target:l,targetPosition:r=be.Top,center:s,offset:c,stepPosition:u}){const h=Bx[i],g=Bx[r],p={x:t.x+h.x*c,y:t.y+h.y*c},y={x:l.x+g.x*c,y:l.y+g.y*c},x=k3({source:p,sourcePosition:i,target:y}),v=x.x!==0?"x":"y",w=x[v];let S=[],_,E;const j={x:0,y:0},R={x:0,y:0},[,,N,A]=S1({sourceX:t.x,sourceY:t.y,targetX:l.x,targetY:l.y});if(h[v]*g[v]===-1){v==="x"?(_=s.x??p.x+(y.x-p.x)*u,E=s.y??(p.y+y.y)/2):(_=s.x??(p.x+y.x)/2,E=s.y??p.y+(y.y-p.y)*u);const k=[{x:_,y:p.y},{x:_,y:y.y}],L=[{x:p.x,y:E},{x:y.x,y:E}];h[v]===w?S=v==="x"?k:L:S=v==="x"?L:k}else{const k=[{x:p.x,y:y.y}],L=[{x:y.x,y:p.y}];if(v==="x"?S=h.x===w?L:k:S=h.y===w?k:L,i===r){const Q=Math.abs(t[v]-l[v]);if(Q<=c){const te=Math.min(c-1,c-Q);h[v]===w?j[v]=(p[v]>t[v]?-1:1)*te:R[v]=(y[v]>l[v]?-1:1)*te}}if(i!==r){const Q=v==="x"?"y":"x",te=h[v]===g[Q],D=p[Q]>y[Q],Z=p[Q]<y[Q];(h[v]===1&&(!te&&D||te&&Z)||h[v]!==1&&(!te&&Z||te&&D))&&(S=v==="x"?k:L)}const U={x:p.x+j.x,y:p.y+j.y},K={x:y.x+R.x,y:y.y+R.y},ie=Math.max(Math.abs(U.x-S[0].x),Math.abs(K.x-S[0].x)),G=Math.max(Math.abs(U.y-S[0].y),Math.abs(K.y-S[0].y));ie>=G?(_=(U.x+K.x)/2,E=S[0].y):(_=S[0].x,E=(U.y+K.y)/2)}return[[t,{x:p.x+j.x,y:p.y+j.y},...S,{x:y.x+R.x,y:y.y+R.y},l],_,E,N,A]}function L3(t,i,l,r){const s=Math.min(Ux(t,i)/2,Ux(i,l)/2,r),{x:c,y:u}=i;if(t.x===c&&c===l.x||t.y===u&&u===l.y)return`L${c} ${u}`;if(t.y===u){const p=t.x<l.x?-1:1,y=t.y<l.y?1:-1;return`L ${c+s*p},${u}Q ${c},${u} ${c},${u+s*y}`}const h=t.x<l.x?1:-1,g=t.y<l.y?-1:1;return`L ${c},${u+s*g}Q ${c},${u} ${c+s*h},${u}`}function nh({sourceX:t,sourceY:i,sourcePosition:l=be.Bottom,targetX:r,targetY:s,targetPosition:c=be.Top,borderRadius:u=5,centerX:h,centerY:g,offset:p=20,stepPosition:y=.5}){const[x,v,w,S,_]=D3({source:{x:t,y:i},sourcePosition:l,target:{x:r,y:s},targetPosition:c,center:{x:h,y:g},offset:p,stepPosition:y});return[x.reduce((j,R,N)=>{let A="";return N>0&&N<x.length-1?A=L3(x[N-1],R,x[N+1],u):A=`${N===0?"M":"L"}${R.x} ${R.y}`,j+=A,j},""),v,w,S,_]}function Vx(t){var i;return t&&!!(t.internals.handleBounds||(i=t.handles)!=null&&i.length)&&!!(t.measured.width||t.width||t.initialWidth)}function H3(t){var x;const{sourceNode:i,targetNode:l}=t;if(!Vx(i)||!Vx(l))return null;const r=i.internals.handleBounds||$x(i.handles),s=l.internals.handleBounds||$x(l.handles),c=Yx((r==null?void 0:r.source)??[],t.sourceHandle),u=Yx(t.connectionMode===Ol.Strict?(s==null?void 0:s.target)??[]:((s==null?void 0:s.target)??[]).concat((s==null?void 0:s.source)??[]),t.targetHandle);if(!c||!u)return(x=t.onError)==null||x.call(t,"008",zn.error008(c?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const h=(c==null?void 0:c.position)||be.Bottom,g=(u==null?void 0:u.position)||be.Top,p=ka(i,c,h),y=ka(l,u,g);return{sourceX:p.x,sourceY:p.y,targetX:y.x,targetY:y.y,sourcePosition:h,targetPosition:g}}function $x(t){if(!t)return null;const i=[],l=[];for(const r of t)r.width=r.width??1,r.height=r.height??1,r.type==="source"?i.push(r):r.type==="target"&&l.push(r);return{source:i,target:l}}function ka(t,i,l=be.Left,r=!1){const s=((i==null?void 0:i.x)??0)+t.internals.positionAbsolute.x,c=((i==null?void 0:i.y)??0)+t.internals.positionAbsolute.y,{width:u,height:h}=i??fi(t);if(r)return{x:s+u/2,y:c+h/2};switch((i==null?void 0:i.position)??l){case be.Top:return{x:s+u/2,y:c};case be.Right:return{x:s+u,y:c+h/2};case be.Bottom:return{x:s+u/2,y:c+h};case be.Left:return{x:s,y:c+h/2}}}function Yx(t,i){return t&&(i?t.find(l=>l.id===i):t[0])||null}function ih(t,i){return t?typeof t=="string"?t:`${i?`${i}__`:""}${Object.keys(t).sort().map(r=>`${r}=${t[r]}`).join("&")}`:""}function B3(t,{id:i,defaultColor:l,defaultMarkerStart:r,defaultMarkerEnd:s}){const c=new Set;return t.reduce((u,h)=>([h.markerStart||r,h.markerEnd||s].forEach(g=>{if(g&&typeof g=="object"){const p=ih(g,i);c.has(p)||(u.push({id:p,color:g.color||l,...g}),c.add(p))}}),u),[]).sort((u,h)=>u.id.localeCompare(h.id))}const E1=1e3,U3=10,Uh={nodeOrigin:[0,0],nodeExtent:Ir,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},V3={...Uh,checkEquality:!0};function Vh(t,i){const l={...t};for(const r in i)i[r]!==void 0&&(l[r]=i[r]);return l}function $3(t,i,l){const r=Vh(Uh,l);for(const s of t.values())if(s.parentId)Yh(s,t,i,r);else{const c=oo(s,r.nodeOrigin),u=Dl(s.extent)?s.extent:r.nodeExtent,h=Ra(c,u,fi(s));s.internals.positionAbsolute=h}}function Y3(t,i){if(!t.handles)return t.measured?i==null?void 0:i.internals.handleBounds:void 0;const l=[],r=[];for(const s of t.handles){const c={id:s.id,width:s.width??1,height:s.height??1,nodeId:t.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?l.push(c):s.type==="target"&&r.push(c)}return{source:l,target:r}}function $h(t){return t==="manual"}function ah(t,i,l,r={}){var p,y;const s=Vh(V3,r),c={i:0},u=new Map(i),h=s!=null&&s.elevateNodesOnSelect&&!$h(s.zIndexMode)?E1:0;let g=t.length>0;i.clear(),l.clear();for(const x of t){let v=u.get(x.id);if(s.checkEquality&&x===(v==null?void 0:v.internals.userNode))i.set(x.id,v);else{const w=oo(x,s.nodeOrigin),S=Dl(x.extent)?x.extent:s.nodeExtent,_=Ra(w,S,fi(x));v={...s.defaults,...x,measured:{width:(p=x.measured)==null?void 0:p.width,height:(y=x.measured)==null?void 0:y.height},internals:{positionAbsolute:_,handleBounds:Y3(x,v),z:_1(x,h,s.zIndexMode),userNode:x}},i.set(x.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(g=!1),x.parentId&&Yh(v,i,l,r,c)}return g}function q3(t,i){if(!t.parentId)return;const l=i.get(t.parentId);l?l.set(t.id,t):i.set(t.parentId,new Map([[t.id,t]]))}function Yh(t,i,l,r,s){const{elevateNodesOnSelect:c,nodeOrigin:u,nodeExtent:h,zIndexMode:g}=Vh(Uh,r),p=t.parentId,y=i.get(p);if(!y){console.warn(`Parent node ${p} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}q3(t,l),s&&!y.parentId&&y.internals.rootParentIndex===void 0&&g==="auto"&&(y.internals.rootParentIndex=++s.i,y.internals.z=y.internals.z+s.i*U3),s&&y.internals.rootParentIndex!==void 0&&(s.i=y.internals.rootParentIndex);const x=c&&!$h(g)?E1:0,{x:v,y:w,z:S}=X3(t,y,u,h,x,g),{positionAbsolute:_}=t.internals,E=v!==_.x||w!==_.y;(E||S!==t.internals.z)&&i.set(t.id,{...t,internals:{...t.internals,positionAbsolute:E?{x:v,y:w}:_,z:S}})}function _1(t,i,l){const r=hn(t.zIndex)?t.zIndex:0;return $h(l)?r:r+(t.selected?i:0)}function X3(t,i,l,r,s,c){const{x:u,y:h}=i.internals.positionAbsolute,g=fi(t),p=oo(t,l),y=Dl(t.extent)?Ra(p,t.extent,g):p;let x=Ra({x:u+y.x,y:h+y.y},r,g);t.extent==="parent"&&(x=d1(x,g,i));const v=_1(t,s,c),w=i.internals.z??0;return{x:x.x,y:x.y,z:w>=v?w+1:v}}function qh(t,i,l,r=[0,0]){var u;const s=[],c=new Map;for(const h of t){const g=i.get(h.parentId);if(!g)continue;const p=((u=c.get(h.parentId))==null?void 0:u.expandedRect)??kl(g),y=m1(p,h.rect);c.set(h.parentId,{expandedRect:y,parent:g})}return c.size>0&&c.forEach(({expandedRect:h,parent:g},p)=>{var N;const y=g.internals.positionAbsolute,x=fi(g),v=g.origin??r,w=h.x<y.x?Math.round(Math.abs(y.x-h.x)):0,S=h.y<y.y?Math.round(Math.abs(y.y-h.y)):0,_=Math.max(x.width,Math.round(h.width)),E=Math.max(x.height,Math.round(h.height)),j=(_-x.width)*v[0],R=(E-x.height)*v[1];(w>0||S>0||j||R)&&(s.push({id:p,type:"position",position:{x:g.position.x-w+j,y:g.position.y-S+R}}),(N=l.get(p))==null||N.forEach(A=>{t.some(z=>z.id===A.id)||s.push({id:A.id,type:"position",position:{x:A.position.x+w,y:A.position.y+S}})})),(x.width<h.width||x.height<h.height||w||S)&&s.push({id:p,type:"dimensions",setAttributes:!0,dimensions:{width:_+(w?v[0]*w-j:0),height:E+(S?v[1]*S-R:0)}})}),s}function G3(t,i,l,r,s,c,u){const h=r==null?void 0:r.querySelector(".xyflow__viewport");let g=!1;if(!h)return{changes:[],updatedInternals:g};const p=[],y=window.getComputedStyle(h),{m22:x}=new window.DOMMatrixReadOnly(y.transform),v=[];for(const w of t.values()){const S=i.get(w.id);if(!S)continue;if(S.hidden){i.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),g=!0;continue}const _=Bh(w.nodeElement),E=S.measured.width!==_.width||S.measured.height!==_.height;if(!!(_.width&&_.height&&(E||!S.internals.handleBounds||w.force))){const R=w.nodeElement.getBoundingClientRect(),N=Dl(S.extent)?S.extent:c;let{positionAbsolute:A}=S.internals;S.parentId&&S.extent==="parent"?A=d1(A,_,i.get(S.parentId)):N&&(A=Ra(A,N,_));const z={...S,measured:_,internals:{...S.internals,positionAbsolute:A,handleBounds:{source:Lx("source",w.nodeElement,R,x,S.id),target:Lx("target",w.nodeElement,R,x,S.id)}}};i.set(S.id,z),S.parentId&&Yh(z,i,l,{nodeOrigin:s,zIndexMode:u}),g=!0,E&&(p.push({id:S.id,type:"dimensions",dimensions:_}),S.expandParent&&S.parentId&&v.push({id:S.id,parentId:S.parentId,rect:kl(z,s)}))}}if(v.length>0){const w=qh(v,i,l,s);p.push(...w)}return{changes:p,updatedInternals:g}}async function Z3({delta:t,panZoom:i,transform:l,translateExtent:r,width:s,height:c}){if(!i||!t.x&&!t.y)return Promise.resolve(!1);const u=await i.setViewportConstrained({x:l[0]+t.x,y:l[1]+t.y,zoom:l[2]},[[0,0],[s,c]],r),h=!!u&&(u.x!==l[0]||u.y!==l[1]||u.k!==l[2]);return Promise.resolve(h)}function qx(t,i,l,r,s,c){let u=s;const h=r.get(u)||new Map;r.set(u,h.set(l,i)),u=`${s}-${t}`;const g=r.get(u)||new Map;if(r.set(u,g.set(l,i)),c){u=`${s}-${t}-${c}`;const p=r.get(u)||new Map;r.set(u,p.set(l,i))}}function j1(t,i,l){t.clear(),i.clear();for(const r of l){const{source:s,target:c,sourceHandle:u=null,targetHandle:h=null}=r,g={edgeId:r.id,source:s,target:c,sourceHandle:u,targetHandle:h},p=`${s}-${u}--${c}-${h}`,y=`${c}-${h}--${s}-${u}`;qx("source",g,y,t,s,u),qx("target",g,p,t,c,h),i.set(r.id,r)}}function A1(t,i){if(!t.parentId)return!1;const l=i.get(t.parentId);return l?l.selected?!0:A1(l,i):!1}function Xx(t,i,l){var s;let r=t;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,i))return!0;if(r===l)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function Q3(t,i,l,r){const s=new Map;for(const[c,u]of t)if((u.selected||u.id===r)&&(!u.parentId||!A1(u,t))&&(u.draggable||i&&typeof u.draggable>"u")){const h=t.get(c);h&&s.set(c,{id:c,position:h.position||{x:0,y:0},distance:{x:l.x-h.internals.positionAbsolute.x,y:l.y-h.internals.positionAbsolute.y},extent:h.extent,parentId:h.parentId,origin:h.origin,expandParent:h.expandParent,internals:{positionAbsolute:h.internals.positionAbsolute||{x:0,y:0}},measured:{width:h.measured.width??0,height:h.measured.height??0}})}return s}function Ad({nodeId:t,dragItems:i,nodeLookup:l,dragging:r=!0}){var u,h,g;const s=[];for(const[p,y]of i){const x=(u=l.get(p))==null?void 0:u.internals.userNode;x&&s.push({...x,position:y.position,dragging:r})}if(!t)return[s[0],s];const c=(h=l.get(t))==null?void 0:h.internals.userNode;return[c?{...c,position:((g=i.get(t))==null?void 0:g.position)||c.position,dragging:r}:s[0],s]}function K3({dragItems:t,snapGrid:i,x:l,y:r}){const s=t.values().next().value;if(!s)return null;const c={x:l-s.distance.x,y:r-s.distance.y},u=co(c,i);return{x:u.x-c.x,y:u.y-c.y}}function F3({onNodeMouseDown:t,getStoreItems:i,onDragStart:l,onDrag:r,onDragStop:s}){let c={x:null,y:null},u=0,h=new Map,g=!1,p={x:0,y:0},y=null,x=!1,v=null,w=!1,S=!1,_=null;function E({noDragClassName:R,handleSelector:N,domNode:A,isSelectable:z,nodeId:k,nodeClickDistance:L=0}){v=Zt(A);function U({x:Q,y:te}){const{nodeLookup:D,nodeExtent:Z,snapGrid:M,snapToGrid:H,nodeOrigin:B,onNodeDrag:Y,onSelectionDrag:q,onError:O,updateNodePositions:V}=i();c={x:Q,y:te};let W=!1;const ne=h.size>1,oe=ne&&Z?th(so(h)):null,se=ne&&H?K3({dragItems:h,snapGrid:M,x:Q,y:te}):null;for(const[fe,ce]of h){if(!D.has(fe))continue;let ue={x:Q-ce.distance.x,y:te-ce.distance.y};H&&(ue=se?{x:Math.round(ue.x+se.x),y:Math.round(ue.y+se.y)}:co(ue,M));let Ee=null;if(ne&&Z&&!ce.extent&&oe){const{positionAbsolute:me}=ce.internals,_e=me.x-oe.x+Z[0][0],Ue=me.x+ce.measured.width-oe.x2+Z[1][0],Me=me.y-oe.y+Z[0][1],nt=me.y+ce.measured.height-oe.y2+Z[1][1];Ee=[[_e,Me],[Ue,nt]]}const{position:ve,positionAbsolute:xe}=f1({nodeId:fe,nextPosition:ue,nodeLookup:D,nodeExtent:Ee||Z,nodeOrigin:B,onError:O});W=W||ce.position.x!==ve.x||ce.position.y!==ve.y,ce.position=ve,ce.internals.positionAbsolute=xe}if(S=S||W,!!W&&(V(h,!0),_&&(r||Y||!k&&q))){const[fe,ce]=Ad({nodeId:k,dragItems:h,nodeLookup:D});r==null||r(_,h,fe,ce),Y==null||Y(_,fe,ce),k||q==null||q(_,ce)}}async function K(){if(!y)return;const{transform:Q,panBy:te,autoPanSpeed:D,autoPanOnNodeDrag:Z}=i();if(!Z){g=!1,cancelAnimationFrame(u);return}const[M,H]=h1(p,y,D);(M!==0||H!==0)&&(c.x=(c.x??0)-M/Q[2],c.y=(c.y??0)-H/Q[2],await te({x:M,y:H})&&U(c)),u=requestAnimationFrame(K)}function ie(Q){var ne;const{nodeLookup:te,multiSelectionActive:D,nodesDraggable:Z,transform:M,snapGrid:H,snapToGrid:B,selectNodesOnDrag:Y,onNodeDragStart:q,onSelectionDragStart:O,unselectNodesAndEdges:V}=i();x=!0,(!Y||!z)&&!D&&k&&((ne=te.get(k))!=null&&ne.selected||V()),z&&Y&&k&&(t==null||t(k));const W=Gr(Q.sourceEvent,{transform:M,snapGrid:H,snapToGrid:B,containerBounds:y});if(c=W,h=Q3(te,Z,W,k),h.size>0&&(l||q||!k&&O)){const[oe,se]=Ad({nodeId:k,dragItems:h,nodeLookup:te});l==null||l(Q.sourceEvent,h,oe,se),q==null||q(Q.sourceEvent,oe,se),k||O==null||O(Q.sourceEvent,se)}}const G=Xv().clickDistance(L).on("start",Q=>{const{domNode:te,nodeDragThreshold:D,transform:Z,snapGrid:M,snapToGrid:H}=i();y=(te==null?void 0:te.getBoundingClientRect())||null,w=!1,S=!1,_=Q.sourceEvent,D===0&&ie(Q),c=Gr(Q.sourceEvent,{transform:Z,snapGrid:M,snapToGrid:H,containerBounds:y}),p=mn(Q.sourceEvent,y)}).on("drag",Q=>{const{autoPanOnNodeDrag:te,transform:D,snapGrid:Z,snapToGrid:M,nodeDragThreshold:H,nodeLookup:B}=i(),Y=Gr(Q.sourceEvent,{transform:D,snapGrid:Z,snapToGrid:M,containerBounds:y});if(_=Q.sourceEvent,(Q.sourceEvent.type==="touchmove"&&Q.sourceEvent.touches.length>1||k&&!B.has(k))&&(w=!0),!w){if(!g&&te&&x&&(g=!0,K()),!x){const q=mn(Q.sourceEvent,y),O=q.x-p.x,V=q.y-p.y;Math.sqrt(O*O+V*V)>H&&ie(Q)}(c.x!==Y.xSnapped||c.y!==Y.ySnapped)&&h&&x&&(p=mn(Q.sourceEvent,y),U(Y))}}).on("end",Q=>{if(!(!x||w)&&(g=!1,x=!1,cancelAnimationFrame(u),h.size>0)){const{nodeLookup:te,updateNodePositions:D,onNodeDragStop:Z,onSelectionDragStop:M}=i();if(S&&(D(h,!1),S=!1),s||Z||!k&&M){const[H,B]=Ad({nodeId:k,dragItems:h,nodeLookup:te,dragging:!1});s==null||s(Q.sourceEvent,h,H,B),Z==null||Z(Q.sourceEvent,H,B),k||M==null||M(Q.sourceEvent,B)}}}).filter(Q=>{const te=Q.target;return!Q.button&&(!R||!Xx(te,`.${R}`,A))&&(!N||Xx(te,N,A))});v.call(G)}function j(){v==null||v.on(".drag",null)}return{update:E,destroy:j}}function P3(t,i,l){const r=[],s={x:t.x-l,y:t.y-l,width:l*2,height:l*2};for(const c of i.values())Wr(s,kl(c))>0&&r.push(c);return r}const I3=250;function J3(t,i,l,r){var h,g;let s=[],c=1/0;const u=P3(t,l,i+I3);for(const p of u){const y=[...((h=p.internals.handleBounds)==null?void 0:h.source)??[],...((g=p.internals.handleBounds)==null?void 0:g.target)??[]];for(const x of y){if(r.nodeId===x.nodeId&&r.type===x.type&&r.id===x.id)continue;const{x:v,y:w}=ka(p,x,x.position,!0),S=Math.sqrt(Math.pow(v-t.x,2)+Math.pow(w-t.y,2));S>i||(S<c?(s=[{...x,x:v,y:w}],c=S):S===c&&s.push({...x,x:v,y:w}))}}if(!s.length)return null;if(s.length>1){const p=r.type==="source"?"target":"source";return s.find(y=>y.type===p)??s[0]}return s[0]}function C1(t,i,l,r,s,c=!1){var p,y,x;const u=r.get(t);if(!u)return null;const h=s==="strict"?(p=u.internals.handleBounds)==null?void 0:p[i]:[...((y=u.internals.handleBounds)==null?void 0:y.source)??[],...((x=u.internals.handleBounds)==null?void 0:x.target)??[]],g=(l?h==null?void 0:h.find(v=>v.id===l):h==null?void 0:h[0])??null;return g&&c?{...g,...ka(u,g,g.position,!0)}:g}function T1(t,i){return t||(i!=null&&i.classList.contains("target")?"target":i!=null&&i.classList.contains("source")?"source":null)}function W3(t,i){let l=null;return i?l=!0:t&&!i&&(l=!1),l}const M1=()=>!0;function eA(t,{connectionMode:i,connectionRadius:l,handleId:r,nodeId:s,edgeUpdaterType:c,isTarget:u,domNode:h,nodeLookup:g,lib:p,autoPanOnConnect:y,flowId:x,panBy:v,cancelConnection:w,onConnectStart:S,onConnect:_,onConnectEnd:E,isValidConnection:j=M1,onReconnectEnd:R,updateConnection:N,getTransform:A,getFromHandle:z,autoPanSpeed:k,dragThreshold:L=1,handleDomNode:U}){const K=x1(t.target);let ie=0,G;const{x:Q,y:te}=mn(t),D=T1(c,U),Z=h==null?void 0:h.getBoundingClientRect();let M=!1;if(!Z||!D)return;const H=C1(s,D,r,g,i);if(!H)return;let B=mn(t,Z),Y=!1,q=null,O=!1,V=null;function W(){if(!y||!Z)return;const[ve,xe]=h1(B,Z,k);v({x:ve,y:xe}),ie=requestAnimationFrame(W)}const ne={...H,nodeId:s,type:D,position:H.position},oe=g.get(s);let fe={inProgress:!0,isValid:null,from:ka(oe,ne,be.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:oe,to:B,toHandle:null,toPosition:Ox[ne.position],toNode:null,pointer:B};function ce(){M=!0,N(fe),S==null||S(t,{nodeId:s,handleId:r,handleType:D})}L===0&&ce();function ue(ve){if(!M){const{x:nt,y:Lt}=mn(ve),ht=nt-Q,ln=Lt-te;if(!(ht*ht+ln*ln>L*L))return;ce()}if(!z()||!ne){Ee(ve);return}const xe=A();B=mn(ve,Z),G=J3(uo(B,xe,!1,[1,1]),l,g,ne),Y||(W(),Y=!0);const me=z1(ve,{handle:G,connectionMode:i,fromNodeId:s,fromHandleId:r,fromType:u?"target":"source",isValidConnection:j,doc:K,lib:p,flowId:x,nodeLookup:g});V=me.handleDomNode,q=me.connection,O=W3(!!G,me.isValid);const _e=g.get(s),Ue=_e?ka(_e,ne,be.Left,!0):fe.from,Me={...fe,from:Ue,isValid:O,to:me.toHandle&&O?gc({x:me.toHandle.x,y:me.toHandle.y},xe):B,toHandle:me.toHandle,toPosition:O&&me.toHandle?me.toHandle.position:Ox[ne.position],toNode:me.toHandle?g.get(me.toHandle.nodeId):null,pointer:B};N(Me),fe=Me}function Ee(ve){if(!("touches"in ve&&ve.touches.length>0)){if(M){(G||V)&&q&&O&&(_==null||_(q));const{inProgress:xe,...me}=fe,_e={...me,toPosition:fe.toHandle?fe.toPosition:null};E==null||E(ve,_e),c&&(R==null||R(ve,_e))}w(),cancelAnimationFrame(ie),Y=!1,O=!1,q=null,V=null,K.removeEventListener("mousemove",ue),K.removeEventListener("mouseup",Ee),K.removeEventListener("touchmove",ue),K.removeEventListener("touchend",Ee)}}K.addEventListener("mousemove",ue),K.addEventListener("mouseup",Ee),K.addEventListener("touchmove",ue),K.addEventListener("touchend",Ee)}function z1(t,{handle:i,connectionMode:l,fromNodeId:r,fromHandleId:s,fromType:c,doc:u,lib:h,flowId:g,isValidConnection:p=M1,nodeLookup:y}){const x=c==="target",v=i?u.querySelector(`.${h}-flow__handle[data-id="${g}-${i==null?void 0:i.nodeId}-${i==null?void 0:i.id}-${i==null?void 0:i.type}"]`):null,{x:w,y:S}=mn(t),_=u.elementFromPoint(w,S),E=_!=null&&_.classList.contains(`${h}-flow__handle`)?_:v,j={handleDomNode:E,isValid:!1,connection:null,toHandle:null};if(E){const R=T1(void 0,E),N=E.getAttribute("data-nodeid"),A=E.getAttribute("data-handleid"),z=E.classList.contains("connectable"),k=E.classList.contains("connectableend");if(!N||!R)return j;const L={source:x?N:r,sourceHandle:x?A:s,target:x?r:N,targetHandle:x?s:A};j.connection=L;const K=z&&k&&(l===Ol.Strict?x&&R==="source"||!x&&R==="target":N!==r||A!==s);j.isValid=K&&p(L),j.toHandle=C1(N,R,A,y,l,!0)}return j}const lh={onPointerDown:eA,isValid:z1};function tA({domNode:t,panZoom:i,getTransform:l,getViewScale:r}){const s=Zt(t);function c({translateExtent:h,width:g,height:p,zoomStep:y=1,pannable:x=!0,zoomable:v=!0,inversePan:w=!1}){const S=N=>{if(N.sourceEvent.type!=="wheel"||!i)return;const A=l(),z=N.sourceEvent.ctrlKey&&eo()?10:1,k=-N.sourceEvent.deltaY*(N.sourceEvent.deltaMode===1?.05:N.sourceEvent.deltaMode?1:.002)*y,L=A[2]*Math.pow(2,k*z);i.scaleTo(L)};let _=[0,0];const E=N=>{(N.sourceEvent.type==="mousedown"||N.sourceEvent.type==="touchstart")&&(_=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY])},j=N=>{const A=l();if(N.sourceEvent.type!=="mousemove"&&N.sourceEvent.type!=="touchmove"||!i)return;const z=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY],k=[z[0]-_[0],z[1]-_[1]];_=z;const L=r()*Math.max(A[2],Math.log(A[2]))*(w?-1:1),U={x:A[0]-k[0]*L,y:A[1]-k[1]*L},K=[[0,0],[g,p]];i.setViewportConstrained({x:U.x,y:U.y,zoom:A[2]},K,h)},R=l1().on("start",E).on("zoom",x?j:null).on("zoom.wheel",v?S:null);s.call(R,{})}function u(){s.on("zoom",null)}return{update:c,destroy:u,pointer:fn}}const Dc=t=>({x:t.x,y:t.y,zoom:t.k}),Cd=({x:t,y:i,zoom:l})=>Oc.translate(t,i).scale(l),_l=(t,i)=>t.target.closest(`.${i}`),O1=(t,i)=>i===2&&Array.isArray(t)&&t.includes(2),nA=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,Td=(t,i=0,l=nA,r=()=>{})=>{const s=typeof i=="number"&&i>0;return s||r(),s?t.transition().duration(i).ease(l).on("end",r):t},R1=t=>{const i=t.ctrlKey&&eo()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*i};function iA({zoomPanValues:t,noWheelClassName:i,d3Selection:l,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:c,zoomOnPinch:u,onPanZoomStart:h,onPanZoom:g,onPanZoomEnd:p}){return y=>{if(_l(y,i))return y.ctrlKey&&y.preventDefault(),!1;y.preventDefault(),y.stopImmediatePropagation();const x=l.property("__zoom").k||1;if(y.ctrlKey&&u){const E=fn(y),j=R1(y),R=x*Math.pow(2,j);r.scaleTo(l,R,E,y);return}const v=y.deltaMode===1?20:1;let w=s===Ta.Vertical?0:y.deltaX*v,S=s===Ta.Horizontal?0:y.deltaY*v;!eo()&&y.shiftKey&&s!==Ta.Vertical&&(w=y.deltaY*v,S=0),r.translateBy(l,-(w/x)*c,-(S/x)*c,{internal:!0});const _=Dc(l.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(g==null||g(y,_),t.panScrollTimeout=setTimeout(()=>{p==null||p(y,_),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,h==null||h(y,_))}}function aA({noWheelClassName:t,preventScrolling:i,d3ZoomHandler:l}){return function(r,s){const c=r.type==="wheel",u=!i&&c&&!r.ctrlKey,h=_l(r,t);if(r.ctrlKey&&c&&h&&r.preventDefault(),u||h)return null;r.preventDefault(),l.call(this,r,s)}}function lA({zoomPanValues:t,onDraggingChange:i,onPanZoomStart:l}){return r=>{var c,u,h;if((c=r.sourceEvent)!=null&&c.internal)return;const s=Dc(r.transform);t.mouseButton=((u=r.sourceEvent)==null?void 0:u.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=s,((h=r.sourceEvent)==null?void 0:h.type)==="mousedown"&&i(!0),l&&(l==null||l(r.sourceEvent,s))}}function rA({zoomPanValues:t,panOnDrag:i,onPaneContextMenu:l,onTransformChange:r,onPanZoom:s}){return c=>{var u,h;t.usedRightMouseButton=!!(l&&O1(i,t.mouseButton??0)),(u=c.sourceEvent)!=null&&u.sync||r([c.transform.x,c.transform.y,c.transform.k]),s&&!((h=c.sourceEvent)!=null&&h.internal)&&(s==null||s(c.sourceEvent,Dc(c.transform)))}}function oA({zoomPanValues:t,panOnDrag:i,panOnScroll:l,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:c}){return u=>{var h;if(!((h=u.sourceEvent)!=null&&h.internal)&&(t.isZoomingOrPanning=!1,c&&O1(i,t.mouseButton??0)&&!t.usedRightMouseButton&&u.sourceEvent&&c(u.sourceEvent),t.usedRightMouseButton=!1,r(!1),s)){const g=Dc(u.transform);t.prevViewport=g,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{s==null||s(u.sourceEvent,g)},l?150:0)}}}function sA({zoomActivationKeyPressed:t,zoomOnScroll:i,zoomOnPinch:l,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:c,userSelectionActive:u,noWheelClassName:h,noPanClassName:g,lib:p,connectionInProgress:y}){return x=>{var E;const v=t||i,w=l&&x.ctrlKey,S=x.type==="wheel";if(x.button===1&&x.type==="mousedown"&&(_l(x,`${p}-flow__node`)||_l(x,`${p}-flow__edge`)))return!0;if(!r&&!v&&!s&&!c&&!l||u||y&&!S||_l(x,h)&&S||_l(x,g)&&(!S||s&&S&&!t)||!l&&x.ctrlKey&&S)return!1;if(!l&&x.type==="touchstart"&&((E=x.touches)==null?void 0:E.length)>1)return x.preventDefault(),!1;if(!v&&!s&&!w&&S||!r&&(x.type==="mousedown"||x.type==="touchstart")||Array.isArray(r)&&!r.includes(x.button)&&x.type==="mousedown")return!1;const _=Array.isArray(r)&&r.includes(x.button)||!x.button||x.button<=1;return(!x.ctrlKey||S)&&_}}function cA({domNode:t,minZoom:i,maxZoom:l,translateExtent:r,viewport:s,onPanZoom:c,onPanZoomStart:u,onPanZoomEnd:h,onDraggingChange:g}){const p={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},y=t.getBoundingClientRect(),x=l1().scaleExtent([i,l]).translateExtent(r),v=Zt(t).call(x);R({x:s.x,y:s.y,zoom:Rl(s.zoom,i,l)},[[0,0],[y.width,y.height]],r);const w=v.on("wheel.zoom"),S=v.on("dblclick.zoom");x.wheelDelta(R1);function _(G,Q){return v?new Promise(te=>{x==null||x.interpolate((Q==null?void 0:Q.interpolate)==="linear"?Xr:ec).transform(Td(v,Q==null?void 0:Q.duration,Q==null?void 0:Q.ease,()=>te(!0)),G)}):Promise.resolve(!1)}function E({noWheelClassName:G,noPanClassName:Q,onPaneContextMenu:te,userSelectionActive:D,panOnScroll:Z,panOnDrag:M,panOnScrollMode:H,panOnScrollSpeed:B,preventScrolling:Y,zoomOnPinch:q,zoomOnScroll:O,zoomOnDoubleClick:V,zoomActivationKeyPressed:W,lib:ne,onTransformChange:oe,connectionInProgress:se,paneClickDistance:fe,selectionOnDrag:ce}){D&&!p.isZoomingOrPanning&&j();const ue=Z&&!W&&!D;x.clickDistance(ce?1/0:!hn(fe)||fe<0?0:fe);const Ee=ue?iA({zoomPanValues:p,noWheelClassName:G,d3Selection:v,d3Zoom:x,panOnScrollMode:H,panOnScrollSpeed:B,zoomOnPinch:q,onPanZoomStart:u,onPanZoom:c,onPanZoomEnd:h}):aA({noWheelClassName:G,preventScrolling:Y,d3ZoomHandler:w});if(v.on("wheel.zoom",Ee,{passive:!1}),!D){const xe=lA({zoomPanValues:p,onDraggingChange:g,onPanZoomStart:u});x.on("start",xe);const me=rA({zoomPanValues:p,panOnDrag:M,onPaneContextMenu:!!te,onPanZoom:c,onTransformChange:oe});x.on("zoom",me);const _e=oA({zoomPanValues:p,panOnDrag:M,panOnScroll:Z,onPaneContextMenu:te,onPanZoomEnd:h,onDraggingChange:g});x.on("end",_e)}const ve=sA({zoomActivationKeyPressed:W,panOnDrag:M,zoomOnScroll:O,panOnScroll:Z,zoomOnDoubleClick:V,zoomOnPinch:q,userSelectionActive:D,noPanClassName:Q,noWheelClassName:G,lib:ne,connectionInProgress:se});x.filter(ve),V?v.on("dblclick.zoom",S):v.on("dblclick.zoom",null)}function j(){x.on("zoom",null)}async function R(G,Q,te){const D=Cd(G),Z=x==null?void 0:x.constrain()(D,Q,te);return Z&&await _(Z),new Promise(M=>M(Z))}async function N(G,Q){const te=Cd(G);return await _(te,Q),new Promise(D=>D(te))}function A(G){if(v){const Q=Cd(G),te=v.property("__zoom");(te.k!==G.zoom||te.x!==G.x||te.y!==G.y)&&(x==null||x.transform(v,Q,null,{sync:!0}))}}function z(){const G=v?a1(v.node()):{x:0,y:0,k:1};return{x:G.x,y:G.y,zoom:G.k}}function k(G,Q){return v?new Promise(te=>{x==null||x.interpolate((Q==null?void 0:Q.interpolate)==="linear"?Xr:ec).scaleTo(Td(v,Q==null?void 0:Q.duration,Q==null?void 0:Q.ease,()=>te(!0)),G)}):Promise.resolve(!1)}function L(G,Q){return v?new Promise(te=>{x==null||x.interpolate((Q==null?void 0:Q.interpolate)==="linear"?Xr:ec).scaleBy(Td(v,Q==null?void 0:Q.duration,Q==null?void 0:Q.ease,()=>te(!0)),G)}):Promise.resolve(!1)}function U(G){x==null||x.scaleExtent(G)}function K(G){x==null||x.translateExtent(G)}function ie(G){const Q=!hn(G)||G<0?0:G;x==null||x.clickDistance(Q)}return{update:E,destroy:j,setViewport:N,setViewportConstrained:R,getViewport:z,scaleTo:k,scaleBy:L,setScaleExtent:U,setTranslateExtent:K,syncViewport:A,setClickDistance:ie}}var Ll;(function(t){t.Line="line",t.Handle="handle"})(Ll||(Ll={}));function uA({width:t,prevWidth:i,height:l,prevHeight:r,affectsX:s,affectsY:c}){const u=t-i,h=l-r,g=[u>0?1:u<0?-1:0,h>0?1:h<0?-1:0];return u&&s&&(g[0]=g[0]*-1),h&&c&&(g[1]=g[1]*-1),g}function Gx(t){const i=t.includes("right")||t.includes("left"),l=t.includes("bottom")||t.includes("top"),r=t.includes("left"),s=t.includes("top");return{isHorizontal:i,isVertical:l,affectsX:r,affectsY:s}}function Xi(t,i){return Math.max(0,i-t)}function Gi(t,i){return Math.max(0,t-i)}function Qs(t,i,l){return Math.max(0,i-t,t-l)}function Zx(t,i){return t?!i:i}function fA(t,i,l,r,s,c,u,h){let{affectsX:g,affectsY:p}=i;const{isHorizontal:y,isVertical:x}=i,v=y&&x,{xSnapped:w,ySnapped:S}=l,{minWidth:_,maxWidth:E,minHeight:j,maxHeight:R}=r,{x:N,y:A,width:z,height:k,aspectRatio:L}=t;let U=Math.floor(y?w-t.pointerX:0),K=Math.floor(x?S-t.pointerY:0);const ie=z+(g?-U:U),G=k+(p?-K:K),Q=-c[0]*z,te=-c[1]*k;let D=Qs(ie,_,E),Z=Qs(G,j,R);if(u){let B=0,Y=0;g&&U<0?B=Xi(N+U+Q,u[0][0]):!g&&U>0&&(B=Gi(N+ie+Q,u[1][0])),p&&K<0?Y=Xi(A+K+te,u[0][1]):!p&&K>0&&(Y=Gi(A+G+te,u[1][1])),D=Math.max(D,B),Z=Math.max(Z,Y)}if(h){let B=0,Y=0;g&&U>0?B=Gi(N+U,h[0][0]):!g&&U<0&&(B=Xi(N+ie,h[1][0])),p&&K>0?Y=Gi(A+K,h[0][1]):!p&&K<0&&(Y=Xi(A+G,h[1][1])),D=Math.max(D,B),Z=Math.max(Z,Y)}if(s){if(y){const B=Qs(ie/L,j,R)*L;if(D=Math.max(D,B),u){let Y=0;!g&&!p||g&&!p&&v?Y=Gi(A+te+ie/L,u[1][1])*L:Y=Xi(A+te+(g?U:-U)/L,u[0][1])*L,D=Math.max(D,Y)}if(h){let Y=0;!g&&!p||g&&!p&&v?Y=Xi(A+ie/L,h[1][1])*L:Y=Gi(A+(g?U:-U)/L,h[0][1])*L,D=Math.max(D,Y)}}if(x){const B=Qs(G*L,_,E)/L;if(Z=Math.max(Z,B),u){let Y=0;!g&&!p||p&&!g&&v?Y=Gi(N+G*L+Q,u[1][0])/L:Y=Xi(N+(p?K:-K)*L+Q,u[0][0])/L,Z=Math.max(Z,Y)}if(h){let Y=0;!g&&!p||p&&!g&&v?Y=Xi(N+G*L,h[1][0])/L:Y=Gi(N+(p?K:-K)*L,h[0][0])/L,Z=Math.max(Z,Y)}}}K=K+(K<0?Z:-Z),U=U+(U<0?D:-D),s&&(v?ie>G*L?K=(Zx(g,p)?-U:U)/L:U=(Zx(g,p)?-K:K)*L:y?(K=U/L,p=g):(U=K*L,g=p));const M=g?N+U:N,H=p?A+K:A;return{width:z+(g?-U:U),height:k+(p?-K:K),x:c[0]*U*(g?-1:1)+M,y:c[1]*K*(p?-1:1)+H}}const k1={width:0,height:0,x:0,y:0},dA={...k1,pointerX:0,pointerY:0,aspectRatio:1};function hA(t){return[[0,0],[t.measured.width,t.measured.height]]}function mA(t,i,l){const r=i.position.x+t.position.x,s=i.position.y+t.position.y,c=t.measured.width??0,u=t.measured.height??0,h=l[0]*c,g=l[1]*u;return[[r-h,s-g],[r+c-h,s+u-g]]}function pA({domNode:t,nodeId:i,getStoreItems:l,onChange:r,onEnd:s}){const c=Zt(t);let u={controlDirection:Gx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function h({controlPosition:p,boundaries:y,keepAspectRatio:x,resizeDirection:v,onResizeStart:w,onResize:S,onResizeEnd:_,shouldResize:E}){let j={...k1},R={...dA};u={boundaries:y,resizeDirection:v,keepAspectRatio:x,controlDirection:Gx(p)};let N,A=null,z=[],k,L,U,K=!1;const ie=Xv().on("start",G=>{const{nodeLookup:Q,transform:te,snapGrid:D,snapToGrid:Z,nodeOrigin:M,paneDomNode:H}=l();if(N=Q.get(i),!N)return;A=(H==null?void 0:H.getBoundingClientRect())??null;const{xSnapped:B,ySnapped:Y}=Gr(G.sourceEvent,{transform:te,snapGrid:D,snapToGrid:Z,containerBounds:A});j={width:N.measured.width??0,height:N.measured.height??0,x:N.position.x??0,y:N.position.y??0},R={...j,pointerX:B,pointerY:Y,aspectRatio:j.width/j.height},k=void 0,N.parentId&&(N.extent==="parent"||N.expandParent)&&(k=Q.get(N.parentId),L=k&&N.extent==="parent"?hA(k):void 0),z=[],U=void 0;for(const[q,O]of Q)if(O.parentId===i&&(z.push({id:q,position:{...O.position},extent:O.extent}),O.extent==="parent"||O.expandParent)){const V=mA(O,N,O.origin??M);U?U=[[Math.min(V[0][0],U[0][0]),Math.min(V[0][1],U[0][1])],[Math.max(V[1][0],U[1][0]),Math.max(V[1][1],U[1][1])]]:U=V}w==null||w(G,{...j})}).on("drag",G=>{const{transform:Q,snapGrid:te,snapToGrid:D,nodeOrigin:Z}=l(),M=Gr(G.sourceEvent,{transform:Q,snapGrid:te,snapToGrid:D,containerBounds:A}),H=[];if(!N)return;const{x:B,y:Y,width:q,height:O}=j,V={},W=N.origin??Z,{width:ne,height:oe,x:se,y:fe}=fA(R,u.controlDirection,M,u.boundaries,u.keepAspectRatio,W,L,U),ce=ne!==q,ue=oe!==O,Ee=se!==B&&ce,ve=fe!==Y&&ue;if(!Ee&&!ve&&!ce&&!ue)return;if((Ee||ve||W[0]===1||W[1]===1)&&(V.x=Ee?se:j.x,V.y=ve?fe:j.y,j.x=V.x,j.y=V.y,z.length>0)){const Ue=se-B,Me=fe-Y;for(const nt of z)nt.position={x:nt.position.x-Ue+W[0]*(ne-q),y:nt.position.y-Me+W[1]*(oe-O)},H.push(nt)}if((ce||ue)&&(V.width=ce&&(!u.resizeDirection||u.resizeDirection==="horizontal")?ne:j.width,V.height=ue&&(!u.resizeDirection||u.resizeDirection==="vertical")?oe:j.height,j.width=V.width,j.height=V.height),k&&N.expandParent){const Ue=W[0]*(V.width??0);V.x&&V.x<Ue&&(j.x=Ue,R.x=R.x-(V.x-Ue));const Me=W[1]*(V.height??0);V.y&&V.y<Me&&(j.y=Me,R.y=R.y-(V.y-Me))}const xe=uA({width:j.width,prevWidth:q,height:j.height,prevHeight:O,affectsX:u.controlDirection.affectsX,affectsY:u.controlDirection.affectsY}),me={...j,direction:xe};(E==null?void 0:E(G,me))!==!1&&(K=!0,S==null||S(G,me),r(V,H))}).on("end",G=>{K&&(_==null||_(G,{...j}),s==null||s({...j}),K=!1)});c.call(ie)}function g(){c.on(".drag",null)}return{update:h,destroy:g}}var Md={exports:{}},zd={},Od={exports:{}},Rd={};/**
385
+ * @license React
386
+ * use-sync-external-store-shim.production.js
387
+ *
388
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
389
+ *
390
+ * This source code is licensed under the MIT license found in the
391
+ * LICENSE file in the root directory of this source tree.
392
+ */var Qx;function gA(){if(Qx)return Rd;Qx=1;var t=io();function i(x,v){return x===v&&(x!==0||1/x===1/v)||x!==x&&v!==v}var l=typeof Object.is=="function"?Object.is:i,r=t.useState,s=t.useEffect,c=t.useLayoutEffect,u=t.useDebugValue;function h(x,v){var w=v(),S=r({inst:{value:w,getSnapshot:v}}),_=S[0].inst,E=S[1];return c(function(){_.value=w,_.getSnapshot=v,g(_)&&E({inst:_})},[x,w,v]),s(function(){return g(_)&&E({inst:_}),x(function(){g(_)&&E({inst:_})})},[x]),u(w),w}function g(x){var v=x.getSnapshot;x=x.value;try{var w=v();return!l(x,w)}catch{return!0}}function p(x,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:h;return Rd.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,Rd}var Kx;function xA(){return Kx||(Kx=1,Od.exports=gA()),Od.exports}/**
393
+ * @license React
394
+ * use-sync-external-store-shim/with-selector.production.js
395
+ *
396
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
397
+ *
398
+ * This source code is licensed under the MIT license found in the
399
+ * LICENSE file in the root directory of this source tree.
400
+ */var Fx;function yA(){if(Fx)return zd;Fx=1;var t=io(),i=xA();function l(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var r=typeof Object.is=="function"?Object.is:l,s=i.useSyncExternalStore,c=t.useRef,u=t.useEffect,h=t.useMemo,g=t.useDebugValue;return zd.useSyncExternalStoreWithSelector=function(p,y,x,v,w){var S=c(null);if(S.current===null){var _={hasValue:!1,value:null};S.current=_}else _=S.current;S=h(function(){function j(k){if(!R){if(R=!0,N=k,k=v(k),w!==void 0&&_.hasValue){var L=_.value;if(w(L,k))return A=L}return A=k}if(L=A,r(N,k))return L;var U=v(k);return w!==void 0&&w(L,U)?(N=k,L):(N=k,A=U)}var R=!1,N,A,z=x===void 0?null:x;return[function(){return j(y())},z===null?void 0:function(){return j(z())}]},[y,x,v,w]);var E=s(p,S[0],S[1]);return u(function(){_.hasValue=!0,_.value=E},[E]),g(E),E},zd}var Px;function vA(){return Px||(Px=1,Md.exports=yA()),Md.exports}var bA=vA();const wA=ph(bA),SA={},Ix=t=>{let i;const l=new Set,r=(y,x)=>{const v=typeof y=="function"?y(i):y;if(!Object.is(v,i)){const w=i;i=x??(typeof v!="object"||v===null)?v:Object.assign({},i,v),l.forEach(S=>S(i,w))}},s=()=>i,g={setState:r,getState:s,getInitialState:()=>p,subscribe:y=>(l.add(y),()=>l.delete(y)),destroy:()=>{(SA?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),l.clear()}},p=i=t(r,s,g);return g},NA=t=>t?Ix(t):Ix,{useDebugValue:EA}=Xt,{useSyncExternalStoreWithSelector:_A}=wA,jA=t=>t;function D1(t,i=jA,l){const r=_A(t.subscribe,t.getState,t.getServerState||t.getInitialState,i,l);return EA(r),r}const Jx=(t,i)=>{const l=NA(t),r=(s,c=i)=>D1(l,s,c);return Object.assign(r,l),r},AA=(t,i)=>t?Jx(t,i):Jx;function Pe(t,i){if(Object.is(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(const[r,s]of t)if(!Object.is(s,i.get(r)))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(const r of t)if(!i.has(r))return!1;return!0}const l=Object.keys(t);if(l.length!==Object.keys(i).length)return!1;for(const r of l)if(!Object.prototype.hasOwnProperty.call(i,r)||!Object.is(t[r],i[r]))return!1;return!0}var Lc=$y();const CA=ph(Lc),Hc=C.createContext(null),TA=Hc.Provider,L1=zn.error001();function Le(t,i){const l=C.useContext(Hc);if(l===null)throw new Error(L1);return D1(l,t,i)}function Ie(){const t=C.useContext(Hc);if(t===null)throw new Error(L1);return C.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const Wx={display:"none"},MA={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},H1="react-flow__node-desc",B1="react-flow__edge-desc",zA="react-flow__aria-live",OA=t=>t.ariaLiveMessage,RA=t=>t.ariaLabelConfig;function kA({rfId:t}){const i=Le(OA);return d.jsx("div",{id:`${zA}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:MA,children:i})}function DA({rfId:t,disableKeyboardA11y:i}){const l=Le(RA);return d.jsxs(d.Fragment,{children:[d.jsx("div",{id:`${H1}-${t}`,style:Wx,children:i?l["node.a11yDescription.default"]:l["node.a11yDescription.keyboardDisabled"]}),d.jsx("div",{id:`${B1}-${t}`,style:Wx,children:l["edge.a11yDescription.default"]}),!i&&d.jsx(kA,{rfId:t})]})}const Bc=C.forwardRef(({position:t="top-left",children:i,className:l,style:r,...s},c)=>{const u=`${t}`.split("-");return d.jsx("div",{className:st(["react-flow__panel",l,...u]),style:r,ref:c,...s,children:i})});Bc.displayName="Panel";function LA({proOptions:t,position:i="bottom-right"}){return t!=null&&t.hideAttribution?null:d.jsx(Bc,{position:i,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:d.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const HA=t=>{const i=[],l=[];for(const[,r]of t.nodeLookup)r.selected&&i.push(r.internals.userNode);for(const[,r]of t.edgeLookup)r.selected&&l.push(r);return{selectedNodes:i,selectedEdges:l}},Ks=t=>t.id;function BA(t,i){return Pe(t.selectedNodes.map(Ks),i.selectedNodes.map(Ks))&&Pe(t.selectedEdges.map(Ks),i.selectedEdges.map(Ks))}function UA({onSelectionChange:t}){const i=Ie(),{selectedNodes:l,selectedEdges:r}=Le(HA,BA);return C.useEffect(()=>{const s={nodes:l,edges:r};t==null||t(s),i.getState().onSelectionChangeHandlers.forEach(c=>c(s))},[l,r,t]),null}const VA=t=>!!t.onSelectionChangeHandlers;function $A({onSelectionChange:t}){const i=Le(VA);return t||i?d.jsx(UA,{onSelectionChange:t}):null}const U1=[0,0],YA={x:0,y:0,zoom:1},qA=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],ey=[...qA,"rfId"],XA=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),ty={translateExtent:Ir,nodeOrigin:U1,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function GA(t){const{setNodes:i,setEdges:l,setMinZoom:r,setMaxZoom:s,setTranslateExtent:c,setNodeExtent:u,reset:h,setDefaultNodesAndEdges:g}=Le(XA,Pe),p=Ie();C.useEffect(()=>(g(t.defaultNodes,t.defaultEdges),()=>{y.current=ty,h()}),[]);const y=C.useRef(ty);return C.useEffect(()=>{for(const x of ey){const v=t[x],w=y.current[x];v!==w&&(typeof t[x]>"u"||(x==="nodes"?i(v):x==="edges"?l(v):x==="minZoom"?r(v):x==="maxZoom"?s(v):x==="translateExtent"?c(v):x==="nodeExtent"?u(v):x==="ariaLabelConfig"?p.setState({ariaLabelConfig:A3(v)}):x==="fitView"?p.setState({fitViewQueued:v}):x==="fitViewOptions"?p.setState({fitViewOptions:v}):p.setState({[x]:v})))}y.current=t},ey.map(x=>t[x])),null}function ny(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function ZA(t){var r;const[i,l]=C.useState(t==="system"?null:t);return C.useEffect(()=>{if(t!=="system"){l(t);return}const s=ny(),c=()=>l(s!=null&&s.matches?"dark":"light");return c(),s==null||s.addEventListener("change",c),()=>{s==null||s.removeEventListener("change",c)}},[t]),i!==null?i:(r=ny())!=null&&r.matches?"dark":"light"}const iy=typeof document<"u"?document:null;function to(t=null,i={target:iy,actInsideInputWithModifier:!0}){const[l,r]=C.useState(!1),s=C.useRef(!1),c=C.useRef(new Set([])),[u,h]=C.useMemo(()=>{if(t!==null){const p=(Array.isArray(t)?t:[t]).filter(x=>typeof x=="string").map(x=>x.replace("+",`
401
+ `).replace(`
402
+
403
+ `,`
404
+ +`).split(`
405
+ `)),y=p.reduce((x,v)=>x.concat(...v),[]);return[p,y]}return[[],[]]},[t]);return C.useEffect(()=>{const g=(i==null?void 0:i.target)??iy,p=(i==null?void 0:i.actInsideInputWithModifier)??!0;if(t!==null){const y=w=>{var E,j;if(s.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!s.current||s.current&&!p)&&y1(w))return!1;const _=ly(w.code,h);if(c.current.add(w[_]),ay(u,c.current,!1)){const R=((j=(E=w.composedPath)==null?void 0:E.call(w))==null?void 0:j[0])||w.target,N=(R==null?void 0:R.nodeName)==="BUTTON"||(R==null?void 0:R.nodeName)==="A";i.preventDefault!==!1&&(s.current||!N)&&w.preventDefault(),r(!0)}},x=w=>{const S=ly(w.code,h);ay(u,c.current,!0)?(r(!1),c.current.clear()):c.current.delete(w[S]),w.key==="Meta"&&c.current.clear(),s.current=!1},v=()=>{c.current.clear(),r(!1)};return g==null||g.addEventListener("keydown",y),g==null||g.addEventListener("keyup",x),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{g==null||g.removeEventListener("keydown",y),g==null||g.removeEventListener("keyup",x),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[t,r]),l}function ay(t,i,l){return t.filter(r=>l||r.length===i.size).some(r=>r.every(s=>i.has(s)))}function ly(t,i){return i.includes(t)?"code":"key"}const QA=()=>{const t=Ie();return C.useMemo(()=>({zoomIn:i=>{const{panZoom:l}=t.getState();return l?l.scaleBy(1.2,{duration:i==null?void 0:i.duration}):Promise.resolve(!1)},zoomOut:i=>{const{panZoom:l}=t.getState();return l?l.scaleBy(1/1.2,{duration:i==null?void 0:i.duration}):Promise.resolve(!1)},zoomTo:(i,l)=>{const{panZoom:r}=t.getState();return r?r.scaleTo(i,{duration:l==null?void 0:l.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(i,l)=>{const{transform:[r,s,c],panZoom:u}=t.getState();return u?(await u.setViewport({x:i.x??r,y:i.y??s,zoom:i.zoom??c},l),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[i,l,r]=t.getState().transform;return{x:i,y:l,zoom:r}},setCenter:async(i,l,r)=>t.getState().setCenter(i,l,r),fitBounds:async(i,l)=>{const{width:r,height:s,minZoom:c,maxZoom:u,panZoom:h}=t.getState(),g=Hh(i,r,s,c,u,(l==null?void 0:l.padding)??.1);return h?(await h.setViewport(g,{duration:l==null?void 0:l.duration,ease:l==null?void 0:l.ease,interpolate:l==null?void 0:l.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(i,l={})=>{const{transform:r,snapGrid:s,snapToGrid:c,domNode:u}=t.getState();if(!u)return i;const{x:h,y:g}=u.getBoundingClientRect(),p={x:i.x-h,y:i.y-g},y=l.snapGrid??s,x=l.snapToGrid??c;return uo(p,r,x,y)},flowToScreenPosition:i=>{const{transform:l,domNode:r}=t.getState();if(!r)return i;const{x:s,y:c}=r.getBoundingClientRect(),u=gc(i,l);return{x:u.x+s,y:u.y+c}}}),[])};function V1(t,i){const l=[],r=new Map,s=[];for(const c of t)if(c.type==="add"){s.push(c);continue}else if(c.type==="remove"||c.type==="replace")r.set(c.id,[c]);else{const u=r.get(c.id);u?u.push(c):r.set(c.id,[c])}for(const c of i){const u=r.get(c.id);if(!u){l.push(c);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){l.push({...u[0].item});continue}const h={...c};for(const g of u)KA(g,h);l.push(h)}return s.length&&s.forEach(c=>{c.index!==void 0?l.splice(c.index,0,{...c.item}):l.push({...c.item})}),l}function KA(t,i){switch(t.type){case"select":{i.selected=t.selected;break}case"position":{typeof t.position<"u"&&(i.position=t.position),typeof t.dragging<"u"&&(i.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(i.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(i.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(i.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(i.resizing=t.resizing);break}}}function FA(t,i){return V1(t,i)}function PA(t,i){return V1(t,i)}function ja(t,i){return{id:t,type:"select",selected:i}}function jl(t,i=new Set,l=!1){const r=[];for(const[s,c]of t){const u=i.has(s);!(c.selected===void 0&&!u)&&c.selected!==u&&(l&&(c.selected=u),r.push(ja(c.id,u)))}return r}function ry({items:t=[],lookup:i}){var s;const l=[],r=new Map(t.map(c=>[c.id,c]));for(const[c,u]of t.entries()){const h=i.get(u.id),g=((s=h==null?void 0:h.internals)==null?void 0:s.userNode)??h;g!==void 0&&g!==u&&l.push({id:u.id,item:u,type:"replace"}),g===void 0&&l.push({item:u,type:"add",index:c})}for(const[c]of i)r.get(c)===void 0&&l.push({id:c,type:"remove"});return l}function oy(t){return{id:t.id,type:"remove"}}const sy=t=>x3(t),IA=t=>u1(t);function $1(t){return C.forwardRef(t)}const JA=typeof window<"u"?C.useLayoutEffect:C.useEffect;function cy(t){const[i,l]=C.useState(BigInt(0)),[r]=C.useState(()=>WA(()=>l(s=>s+BigInt(1))));return JA(()=>{const s=r.get();s.length&&(t(s),r.reset())},[i]),r}function WA(t){let i=[];return{get:()=>i,reset:()=>{i=[]},push:l=>{i.push(l),t()}}}const Y1=C.createContext(null);function eC({children:t}){const i=Ie(),l=C.useCallback(h=>{const{nodes:g=[],setNodes:p,hasDefaultNodes:y,onNodesChange:x,nodeLookup:v,fitViewQueued:w,onNodesChangeMiddlewareMap:S}=i.getState();let _=g;for(const j of h)_=typeof j=="function"?j(_):j;let E=ry({items:_,lookup:v});for(const j of S.values())E=j(E);y&&p(_),E.length>0?x==null||x(E):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:j,nodes:R,setNodes:N}=i.getState();j&&N(R)})},[]),r=cy(l),s=C.useCallback(h=>{const{edges:g=[],setEdges:p,hasDefaultEdges:y,onEdgesChange:x,edgeLookup:v}=i.getState();let w=g;for(const S of h)w=typeof S=="function"?S(w):S;y?p(w):x&&x(ry({items:w,lookup:v}))},[]),c=cy(s),u=C.useMemo(()=>({nodeQueue:r,edgeQueue:c}),[]);return d.jsx(Y1.Provider,{value:u,children:t})}function tC(){const t=C.useContext(Y1);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const nC=t=>!!t.panZoom;function Xh(){const t=QA(),i=Ie(),l=tC(),r=Le(nC),s=C.useMemo(()=>{const c=x=>i.getState().nodeLookup.get(x),u=x=>{l.nodeQueue.push(x)},h=x=>{l.edgeQueue.push(x)},g=x=>{var j,R;const{nodeLookup:v,nodeOrigin:w}=i.getState(),S=sy(x)?x:v.get(x.id),_=S.parentId?g1(S.position,S.measured,S.parentId,v,w):S.position,E={...S,position:_,width:((j=S.measured)==null?void 0:j.width)??S.width,height:((R=S.measured)==null?void 0:R.height)??S.height};return kl(E)},p=(x,v,w={replace:!1})=>{u(S=>S.map(_=>{if(_.id===x){const E=typeof v=="function"?v(_):v;return w.replace&&sy(E)?E:{..._,...E}}return _}))},y=(x,v,w={replace:!1})=>{h(S=>S.map(_=>{if(_.id===x){const E=typeof v=="function"?v(_):v;return w.replace&&IA(E)?E:{..._,...E}}return _}))};return{getNodes:()=>i.getState().nodes.map(x=>({...x})),getNode:x=>{var v;return(v=c(x))==null?void 0:v.internals.userNode},getInternalNode:c,getEdges:()=>{const{edges:x=[]}=i.getState();return x.map(v=>({...v}))},getEdge:x=>i.getState().edgeLookup.get(x),setNodes:u,setEdges:h,addNodes:x=>{const v=Array.isArray(x)?x:[x];l.nodeQueue.push(w=>[...w,...v])},addEdges:x=>{const v=Array.isArray(x)?x:[x];l.edgeQueue.push(w=>[...w,...v])},toObject:()=>{const{nodes:x=[],edges:v=[],transform:w}=i.getState(),[S,_,E]=w;return{nodes:x.map(j=>({...j})),edges:v.map(j=>({...j})),viewport:{x:S,y:_,zoom:E}}},deleteElements:async({nodes:x=[],edges:v=[]})=>{const{nodes:w,edges:S,onNodesDelete:_,onEdgesDelete:E,triggerNodeChanges:j,triggerEdgeChanges:R,onDelete:N,onBeforeDelete:A}=i.getState(),{nodes:z,edges:k}=await S3({nodesToRemove:x,edgesToRemove:v,nodes:w,edges:S,onBeforeDelete:A}),L=k.length>0,U=z.length>0;if(L){const K=k.map(oy);E==null||E(k),R(K)}if(U){const K=z.map(oy);_==null||_(z),j(K)}return(U||L)&&(N==null||N({nodes:z,edges:k})),{deletedNodes:z,deletedEdges:k}},getIntersectingNodes:(x,v=!0,w)=>{const S=kx(x),_=S?x:g(x),E=w!==void 0;return _?(w||i.getState().nodes).filter(j=>{const R=i.getState().nodeLookup.get(j.id);if(R&&!S&&(j.id===x.id||!R.internals.positionAbsolute))return!1;const N=kl(E?j:R),A=Wr(N,_);return v&&A>0||A>=N.width*N.height||A>=_.width*_.height}):[]},isNodeIntersecting:(x,v,w=!0)=>{const _=kx(x)?x:g(x);if(!_)return!1;const E=Wr(_,v);return w&&E>0||E>=v.width*v.height||E>=_.width*_.height},updateNode:p,updateNodeData:(x,v,w={replace:!1})=>{p(x,S=>{const _=typeof v=="function"?v(S):v;return w.replace?{...S,data:_}:{...S,data:{...S.data,..._}}},w)},updateEdge:y,updateEdgeData:(x,v,w={replace:!1})=>{y(x,S=>{const _=typeof v=="function"?v(S):v;return w.replace?{...S,data:_}:{...S,data:{...S.data,..._}}},w)},getNodesBounds:x=>{const{nodeLookup:v,nodeOrigin:w}=i.getState();return y3(x,{nodeLookup:v,nodeOrigin:w})},getHandleConnections:({type:x,id:v,nodeId:w})=>{var S;return Array.from(((S=i.getState().connectionLookup.get(`${w}-${x}${v?`-${v}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:x,handleId:v,nodeId:w})=>{var S;return Array.from(((S=i.getState().connectionLookup.get(`${w}${x?v?`-${x}-${v}`:`-${x}`:""}`))==null?void 0:S.values())??[])},fitView:async x=>{const v=i.getState().fitViewResolver??j3();return i.setState({fitViewQueued:!0,fitViewOptions:x,fitViewResolver:v}),l.nodeQueue.push(w=>[...w]),v.promise}}},[]);return C.useMemo(()=>({...s,...t,viewportInitialized:r}),[r])}const uy=t=>t.selected,iC=typeof window<"u"?window:void 0;function aC({deleteKeyCode:t,multiSelectionKeyCode:i}){const l=Ie(),{deleteElements:r}=Xh(),s=to(t,{actInsideInputWithModifier:!1}),c=to(i,{target:iC});C.useEffect(()=>{if(s){const{edges:u,nodes:h}=l.getState();r({nodes:h.filter(uy),edges:u.filter(uy)}),l.setState({nodesSelectionActive:!1})}},[s]),C.useEffect(()=>{l.setState({multiSelectionActive:c})},[c])}function lC(t){const i=Ie();C.useEffect(()=>{const l=()=>{var s,c,u,h;if(!t.current||!(((c=(s=t.current).checkVisibility)==null?void 0:c.call(s))??!0))return!1;const r=Bh(t.current);(r.height===0||r.width===0)&&((h=(u=i.getState()).onError)==null||h.call(u,"004",zn.error004())),i.setState({width:r.width||500,height:r.height||500})};if(t.current){l(),window.addEventListener("resize",l);const r=new ResizeObserver(()=>l());return r.observe(t.current),()=>{window.removeEventListener("resize",l),r&&t.current&&r.unobserve(t.current)}}},[])}const Uc={position:"absolute",width:"100%",height:"100%",top:0,left:0},rC=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function oC({onPaneContextMenu:t,zoomOnScroll:i=!0,zoomOnPinch:l=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:c=Ta.Free,zoomOnDoubleClick:u=!0,panOnDrag:h=!0,defaultViewport:g,translateExtent:p,minZoom:y,maxZoom:x,zoomActivationKeyCode:v,preventScrolling:w=!0,children:S,noWheelClassName:_,noPanClassName:E,onViewportChange:j,isControlledViewport:R,paneClickDistance:N,selectionOnDrag:A}){const z=Ie(),k=C.useRef(null),{userSelectionActive:L,lib:U,connectionInProgress:K}=Le(rC,Pe),ie=to(v),G=C.useRef();lC(k);const Q=C.useCallback(te=>{j==null||j({x:te[0],y:te[1],zoom:te[2]}),R||z.setState({transform:te})},[j,R]);return C.useEffect(()=>{if(k.current){G.current=cA({domNode:k.current,minZoom:y,maxZoom:x,translateExtent:p,viewport:g,onDraggingChange:M=>z.setState(H=>H.paneDragging===M?H:{paneDragging:M}),onPanZoomStart:(M,H)=>{const{onViewportChangeStart:B,onMoveStart:Y}=z.getState();Y==null||Y(M,H),B==null||B(H)},onPanZoom:(M,H)=>{const{onViewportChange:B,onMove:Y}=z.getState();Y==null||Y(M,H),B==null||B(H)},onPanZoomEnd:(M,H)=>{const{onViewportChangeEnd:B,onMoveEnd:Y}=z.getState();Y==null||Y(M,H),B==null||B(H)}});const{x:te,y:D,zoom:Z}=G.current.getViewport();return z.setState({panZoom:G.current,transform:[te,D,Z],domNode:k.current.closest(".react-flow")}),()=>{var M;(M=G.current)==null||M.destroy()}}},[]),C.useEffect(()=>{var te;(te=G.current)==null||te.update({onPaneContextMenu:t,zoomOnScroll:i,zoomOnPinch:l,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:c,zoomOnDoubleClick:u,panOnDrag:h,zoomActivationKeyPressed:ie,preventScrolling:w,noPanClassName:E,userSelectionActive:L,noWheelClassName:_,lib:U,onTransformChange:Q,connectionInProgress:K,selectionOnDrag:A,paneClickDistance:N})},[t,i,l,r,s,c,u,h,ie,w,E,L,_,U,Q,K,A,N]),d.jsx("div",{className:"react-flow__renderer",ref:k,style:Uc,children:S})}const sC=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function cC(){const{userSelectionActive:t,userSelectionRect:i}=Le(sC,Pe);return t&&i?d.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:i.width,height:i.height,transform:`translate(${i.x}px, ${i.y}px)`}}):null}const kd=(t,i)=>l=>{l.target===i.current&&(t==null||t(l))},uC=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function fC({isSelecting:t,selectionKeyPressed:i,selectionMode:l=Jr.Full,panOnDrag:r,paneClickDistance:s,selectionOnDrag:c,onSelectionStart:u,onSelectionEnd:h,onPaneClick:g,onPaneContextMenu:p,onPaneScroll:y,onPaneMouseEnter:x,onPaneMouseMove:v,onPaneMouseLeave:w,children:S}){const _=Ie(),{userSelectionActive:E,elementsSelectable:j,dragging:R,connectionInProgress:N}=Le(uC,Pe),A=j&&(t||E),z=C.useRef(null),k=C.useRef(),L=C.useRef(new Set),U=C.useRef(new Set),K=C.useRef(!1),ie=B=>{if(K.current||N){K.current=!1;return}g==null||g(B),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},G=B=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){B.preventDefault();return}p==null||p(B)},Q=y?B=>y(B):void 0,te=B=>{K.current&&(B.stopPropagation(),K.current=!1)},D=B=>{var oe,se;const{domNode:Y}=_.getState();if(k.current=Y==null?void 0:Y.getBoundingClientRect(),!k.current)return;const q=B.target===z.current;if(!q&&!!B.target.closest(".nokey")||!t||!(c&&q||i)||B.button!==0||!B.isPrimary)return;(se=(oe=B.target)==null?void 0:oe.setPointerCapture)==null||se.call(oe,B.pointerId),K.current=!1;const{x:W,y:ne}=mn(B.nativeEvent,k.current);_.setState({userSelectionRect:{width:0,height:0,startX:W,startY:ne,x:W,y:ne}}),q||(B.stopPropagation(),B.preventDefault())},Z=B=>{const{userSelectionRect:Y,transform:q,nodeLookup:O,edgeLookup:V,connectionLookup:W,triggerNodeChanges:ne,triggerEdgeChanges:oe,defaultEdgeOptions:se,resetSelectedElements:fe}=_.getState();if(!k.current||!Y)return;const{x:ce,y:ue}=mn(B.nativeEvent,k.current),{startX:Ee,startY:ve}=Y;if(!K.current){const Me=i?0:s;if(Math.hypot(ce-Ee,ue-ve)<=Me)return;fe(),u==null||u(B)}K.current=!0;const xe={startX:Ee,startY:ve,x:ce<Ee?ce:Ee,y:ue<ve?ue:ve,width:Math.abs(ce-Ee),height:Math.abs(ue-ve)},me=L.current,_e=U.current;L.current=new Set(Lh(O,xe,q,l===Jr.Partial,!0).map(Me=>Me.id)),U.current=new Set;const Ue=(se==null?void 0:se.selectable)??!0;for(const Me of L.current){const nt=W.get(Me);if(nt)for(const{edgeId:Lt}of nt.values()){const ht=V.get(Lt);ht&&(ht.selectable??Ue)&&U.current.add(Lt)}}if(!Dx(me,L.current)){const Me=jl(O,L.current,!0);ne(Me)}if(!Dx(_e,U.current)){const Me=jl(V,U.current);oe(Me)}_.setState({userSelectionRect:xe,userSelectionActive:!0,nodesSelectionActive:!1})},M=B=>{var Y,q;B.button===0&&((q=(Y=B.target)==null?void 0:Y.releasePointerCapture)==null||q.call(Y,B.pointerId),!E&&B.target===z.current&&_.getState().userSelectionRect&&(ie==null||ie(B)),_.setState({userSelectionActive:!1,userSelectionRect:null}),K.current&&(h==null||h(B),_.setState({nodesSelectionActive:L.current.size>0})))},H=r===!0||Array.isArray(r)&&r.includes(0);return d.jsxs("div",{className:st(["react-flow__pane",{draggable:H,dragging:R,selection:t}]),onClick:A?void 0:kd(ie,z),onContextMenu:kd(G,z),onWheel:kd(Q,z),onPointerEnter:A?void 0:x,onPointerMove:A?Z:v,onPointerUp:A?M:void 0,onPointerDownCapture:A?D:void 0,onClickCapture:A?te:void 0,onPointerLeave:w,ref:z,style:Uc,children:[S,d.jsx(cC,{})]})}function rh({id:t,store:i,unselect:l=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:c,multiSelectionActive:u,nodeLookup:h,onError:g}=i.getState(),p=h.get(t);if(!p){g==null||g("012",zn.error012(t));return}i.setState({nodesSelectionActive:!1}),p.selected?(l||p.selected&&u)&&(c({nodes:[p],edges:[]}),requestAnimationFrame(()=>{var y;return(y=r==null?void 0:r.current)==null?void 0:y.blur()})):s([t])}function q1({nodeRef:t,disabled:i=!1,noDragClassName:l,handleSelector:r,nodeId:s,isSelectable:c,nodeClickDistance:u}){const h=Ie(),[g,p]=C.useState(!1),y=C.useRef();return C.useEffect(()=>{y.current=F3({getStoreItems:()=>h.getState(),onNodeMouseDown:x=>{rh({id:x,store:h,nodeRef:t})},onDragStart:()=>{p(!0)},onDragStop:()=>{p(!1)}})},[]),C.useEffect(()=>{if(!(i||!t.current||!y.current))return y.current.update({noDragClassName:l,handleSelector:r,domNode:t.current,isSelectable:c,nodeId:s,nodeClickDistance:u}),()=>{var x;(x=y.current)==null||x.destroy()}},[l,r,i,c,t,s,u]),g}const dC=t=>i=>i.selected&&(i.draggable||t&&typeof i.draggable>"u");function X1(){const t=Ie();return C.useCallback(l=>{const{nodeExtent:r,snapToGrid:s,snapGrid:c,nodesDraggable:u,onError:h,updateNodePositions:g,nodeLookup:p,nodeOrigin:y}=t.getState(),x=new Map,v=dC(u),w=s?c[0]:5,S=s?c[1]:5,_=l.direction.x*w*l.factor,E=l.direction.y*S*l.factor;for(const[,j]of p){if(!v(j))continue;let R={x:j.internals.positionAbsolute.x+_,y:j.internals.positionAbsolute.y+E};s&&(R=co(R,c));const{position:N,positionAbsolute:A}=f1({nodeId:j.id,nextPosition:R,nodeLookup:p,nodeExtent:r,nodeOrigin:y,onError:h});j.position=N,j.internals.positionAbsolute=A,x.set(j.id,j)}g(x)},[])}const Gh=C.createContext(null),hC=Gh.Provider;Gh.Consumer;const G1=()=>C.useContext(Gh),mC=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),pC=(t,i,l)=>r=>{const{connectionClickStartHandle:s,connectionMode:c,connection:u}=r,{fromHandle:h,toHandle:g,isValid:p}=u,y=(g==null?void 0:g.nodeId)===t&&(g==null?void 0:g.id)===i&&(g==null?void 0:g.type)===l;return{connectingFrom:(h==null?void 0:h.nodeId)===t&&(h==null?void 0:h.id)===i&&(h==null?void 0:h.type)===l,connectingTo:y,clickConnecting:(s==null?void 0:s.nodeId)===t&&(s==null?void 0:s.id)===i&&(s==null?void 0:s.type)===l,isPossibleEndHandle:c===Ol.Strict?(h==null?void 0:h.type)!==l:t!==(h==null?void 0:h.nodeId)||i!==(h==null?void 0:h.id),connectionInProcess:!!h,clickConnectionInProcess:!!s,valid:y&&p}};function gC({type:t="source",position:i=be.Top,isValidConnection:l,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:c=!0,id:u,onConnect:h,children:g,className:p,onMouseDown:y,onTouchStart:x,...v},w){var Z,M;const S=u||null,_=t==="target",E=Ie(),j=G1(),{connectOnClick:R,noPanClassName:N,rfId:A}=Le(mC,Pe),{connectingFrom:z,connectingTo:k,clickConnecting:L,isPossibleEndHandle:U,connectionInProcess:K,clickConnectionInProcess:ie,valid:G}=Le(pC(j,S,t),Pe);j||(M=(Z=E.getState()).onError)==null||M.call(Z,"010",zn.error010());const Q=H=>{const{defaultEdgeOptions:B,onConnect:Y,hasDefaultEdges:q}=E.getState(),O={...B,...H};if(q){const{edges:V,setEdges:W}=E.getState();W(R3(O,V))}Y==null||Y(O),h==null||h(O)},te=H=>{if(!j)return;const B=v1(H.nativeEvent);if(s&&(B&&H.button===0||!B)){const Y=E.getState();lh.onPointerDown(H.nativeEvent,{handleDomNode:H.currentTarget,autoPanOnConnect:Y.autoPanOnConnect,connectionMode:Y.connectionMode,connectionRadius:Y.connectionRadius,domNode:Y.domNode,nodeLookup:Y.nodeLookup,lib:Y.lib,isTarget:_,handleId:S,nodeId:j,flowId:Y.rfId,panBy:Y.panBy,cancelConnection:Y.cancelConnection,onConnectStart:Y.onConnectStart,onConnectEnd:(...q)=>{var O,V;return(V=(O=E.getState()).onConnectEnd)==null?void 0:V.call(O,...q)},updateConnection:Y.updateConnection,onConnect:Q,isValidConnection:l||((...q)=>{var O,V;return((V=(O=E.getState()).isValidConnection)==null?void 0:V.call(O,...q))??!0}),getTransform:()=>E.getState().transform,getFromHandle:()=>E.getState().connection.fromHandle,autoPanSpeed:Y.autoPanSpeed,dragThreshold:Y.connectionDragThreshold})}B?y==null||y(H):x==null||x(H)},D=H=>{const{onClickConnectStart:B,onClickConnectEnd:Y,connectionClickStartHandle:q,connectionMode:O,isValidConnection:V,lib:W,rfId:ne,nodeLookup:oe,connection:se}=E.getState();if(!j||!q&&!s)return;if(!q){B==null||B(H.nativeEvent,{nodeId:j,handleId:S,handleType:t}),E.setState({connectionClickStartHandle:{nodeId:j,type:t,id:S}});return}const fe=x1(H.target),ce=l||V,{connection:ue,isValid:Ee}=lh.isValid(H.nativeEvent,{handle:{nodeId:j,id:S,type:t},connectionMode:O,fromNodeId:q.nodeId,fromHandleId:q.id||null,fromType:q.type,isValidConnection:ce,flowId:ne,doc:fe,lib:W,nodeLookup:oe});Ee&&ue&&Q(ue);const ve=structuredClone(se);delete ve.inProgress,ve.toPosition=ve.toHandle?ve.toHandle.position:null,Y==null||Y(H,ve),E.setState({connectionClickStartHandle:null})};return d.jsx("div",{"data-handleid":S,"data-nodeid":j,"data-handlepos":i,"data-id":`${A}-${j}-${S}-${t}`,className:st(["react-flow__handle",`react-flow__handle-${i}`,"nodrag",N,p,{source:!_,target:_,connectable:r,connectablestart:s,connectableend:c,clickconnecting:L,connectingfrom:z,connectingto:k,valid:G,connectionindicator:r&&(!K||U)&&(K||ie?c:s)}]),onMouseDown:te,onTouchStart:te,onClick:R?D:void 0,ref:w,...v,children:g})}const Hl=C.memo($1(gC));function xC({data:t,isConnectable:i,sourcePosition:l=be.Bottom}){return d.jsxs(d.Fragment,{children:[t==null?void 0:t.label,d.jsx(Hl,{type:"source",position:l,isConnectable:i})]})}function yC({data:t,isConnectable:i,targetPosition:l=be.Top,sourcePosition:r=be.Bottom}){return d.jsxs(d.Fragment,{children:[d.jsx(Hl,{type:"target",position:l,isConnectable:i}),t==null?void 0:t.label,d.jsx(Hl,{type:"source",position:r,isConnectable:i})]})}function vC(){return null}function bC({data:t,isConnectable:i,targetPosition:l=be.Top}){return d.jsxs(d.Fragment,{children:[d.jsx(Hl,{type:"target",position:l,isConnectable:i}),t==null?void 0:t.label]})}const xc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},fy={input:xC,default:yC,output:bC,group:vC};function wC(t){var i,l,r,s;return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??((i=t.style)==null?void 0:i.width),height:t.height??t.initialHeight??((l=t.style)==null?void 0:l.height)}:{width:t.width??((r=t.style)==null?void 0:r.width),height:t.height??((s=t.style)==null?void 0:s.height)}}const SC=t=>{const{width:i,height:l,x:r,y:s}=so(t.nodeLookup,{filter:c=>!!c.selected});return{width:hn(i)?i:null,height:hn(l)?l:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${r}px,${s}px)`}};function NC({onSelectionContextMenu:t,noPanClassName:i,disableKeyboardA11y:l}){const r=Ie(),{width:s,height:c,transformString:u,userSelectionActive:h}=Le(SC,Pe),g=X1(),p=C.useRef(null);C.useEffect(()=>{var w;l||(w=p.current)==null||w.focus({preventScroll:!0})},[l]);const y=!h&&s!==null&&c!==null;if(q1({nodeRef:p,disabled:!y}),!y)return null;const x=t?w=>{const S=r.getState().nodes.filter(_=>_.selected);t(w,S)}:void 0,v=w=>{Object.prototype.hasOwnProperty.call(xc,w.key)&&(w.preventDefault(),g({direction:xc[w.key],factor:w.shiftKey?4:1}))};return d.jsx("div",{className:st(["react-flow__nodesselection","react-flow__container",i]),style:{transform:u},children:d.jsx("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:l?void 0:-1,onKeyDown:l?void 0:v,style:{width:s,height:c}})})}const dy=typeof window<"u"?window:void 0,EC=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function Z1({children:t,onPaneClick:i,onPaneMouseEnter:l,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:c,onPaneScroll:u,paneClickDistance:h,deleteKeyCode:g,selectionKeyCode:p,selectionOnDrag:y,selectionMode:x,onSelectionStart:v,onSelectionEnd:w,multiSelectionKeyCode:S,panActivationKeyCode:_,zoomActivationKeyCode:E,elementsSelectable:j,zoomOnScroll:R,zoomOnPinch:N,panOnScroll:A,panOnScrollSpeed:z,panOnScrollMode:k,zoomOnDoubleClick:L,panOnDrag:U,defaultViewport:K,translateExtent:ie,minZoom:G,maxZoom:Q,preventScrolling:te,onSelectionContextMenu:D,noWheelClassName:Z,noPanClassName:M,disableKeyboardA11y:H,onViewportChange:B,isControlledViewport:Y}){const{nodesSelectionActive:q,userSelectionActive:O}=Le(EC,Pe),V=to(p,{target:dy}),W=to(_,{target:dy}),ne=W||U,oe=W||A,se=y&&ne!==!0,fe=V||O||se;return aC({deleteKeyCode:g,multiSelectionKeyCode:S}),d.jsx(oC,{onPaneContextMenu:c,elementsSelectable:j,zoomOnScroll:R,zoomOnPinch:N,panOnScroll:oe,panOnScrollSpeed:z,panOnScrollMode:k,zoomOnDoubleClick:L,panOnDrag:!V&&ne,defaultViewport:K,translateExtent:ie,minZoom:G,maxZoom:Q,zoomActivationKeyCode:E,preventScrolling:te,noWheelClassName:Z,noPanClassName:M,onViewportChange:B,isControlledViewport:Y,paneClickDistance:h,selectionOnDrag:se,children:d.jsxs(fC,{onSelectionStart:v,onSelectionEnd:w,onPaneClick:i,onPaneMouseEnter:l,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:c,onPaneScroll:u,panOnDrag:ne,isSelecting:!!fe,selectionMode:x,selectionKeyPressed:V,paneClickDistance:h,selectionOnDrag:se,children:[t,q&&d.jsx(NC,{onSelectionContextMenu:D,noPanClassName:M,disableKeyboardA11y:H})]})})}Z1.displayName="FlowRenderer";const _C=C.memo(Z1),jC=t=>i=>t?Lh(i.nodeLookup,{x:0,y:0,width:i.width,height:i.height},i.transform,!0).map(l=>l.id):Array.from(i.nodeLookup.keys());function AC(t){return Le(C.useCallback(jC(t),[t]),Pe)}const CC=t=>t.updateNodeInternals;function TC(){const t=Le(CC),[i]=C.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(l=>{const r=new Map;l.forEach(s=>{const c=s.target.getAttribute("data-id");r.set(c,{id:c,nodeElement:s.target,force:!0})}),t(r)}));return C.useEffect(()=>()=>{i==null||i.disconnect()},[i]),i}function MC({node:t,nodeType:i,hasDimensions:l,resizeObserver:r}){const s=Ie(),c=C.useRef(null),u=C.useRef(null),h=C.useRef(t.sourcePosition),g=C.useRef(t.targetPosition),p=C.useRef(i),y=l&&!!t.internals.handleBounds;return C.useEffect(()=>{c.current&&!t.hidden&&(!y||u.current!==c.current)&&(u.current&&(r==null||r.unobserve(u.current)),r==null||r.observe(c.current),u.current=c.current)},[y,t.hidden]),C.useEffect(()=>()=>{u.current&&(r==null||r.unobserve(u.current),u.current=null)},[]),C.useEffect(()=>{if(c.current){const x=p.current!==i,v=h.current!==t.sourcePosition,w=g.current!==t.targetPosition;(x||v||w)&&(p.current=i,h.current=t.sourcePosition,g.current=t.targetPosition,s.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:c.current,force:!0}]])))}},[t.id,i,t.sourcePosition,t.targetPosition]),c}function zC({id:t,onClick:i,onMouseEnter:l,onMouseMove:r,onMouseLeave:s,onContextMenu:c,onDoubleClick:u,nodesDraggable:h,elementsSelectable:g,nodesConnectable:p,nodesFocusable:y,resizeObserver:x,noDragClassName:v,noPanClassName:w,disableKeyboardA11y:S,rfId:_,nodeTypes:E,nodeClickDistance:j,onError:R}){const{node:N,internals:A,isParent:z}=Le(ce=>{const ue=ce.nodeLookup.get(t),Ee=ce.parentLookup.has(t);return{node:ue,internals:ue.internals,isParent:Ee}},Pe);let k=N.type||"default",L=(E==null?void 0:E[k])||fy[k];L===void 0&&(R==null||R("003",zn.error003(k)),k="default",L=(E==null?void 0:E.default)||fy.default);const U=!!(N.draggable||h&&typeof N.draggable>"u"),K=!!(N.selectable||g&&typeof N.selectable>"u"),ie=!!(N.connectable||p&&typeof N.connectable>"u"),G=!!(N.focusable||y&&typeof N.focusable>"u"),Q=Ie(),te=p1(N),D=MC({node:N,nodeType:k,hasDimensions:te,resizeObserver:x}),Z=q1({nodeRef:D,disabled:N.hidden||!U,noDragClassName:v,handleSelector:N.dragHandle,nodeId:t,isSelectable:K,nodeClickDistance:j}),M=X1();if(N.hidden)return null;const H=fi(N),B=wC(N),Y=K||U||i||l||r||s,q=l?ce=>l(ce,{...A.userNode}):void 0,O=r?ce=>r(ce,{...A.userNode}):void 0,V=s?ce=>s(ce,{...A.userNode}):void 0,W=c?ce=>c(ce,{...A.userNode}):void 0,ne=u?ce=>u(ce,{...A.userNode}):void 0,oe=ce=>{const{selectNodesOnDrag:ue,nodeDragThreshold:Ee}=Q.getState();K&&(!ue||!U||Ee>0)&&rh({id:t,store:Q,nodeRef:D}),i&&i(ce,{...A.userNode})},se=ce=>{if(!(y1(ce.nativeEvent)||S)){if(r1.includes(ce.key)&&K){const ue=ce.key==="Escape";rh({id:t,store:Q,unselect:ue,nodeRef:D})}else if(U&&N.selected&&Object.prototype.hasOwnProperty.call(xc,ce.key)){ce.preventDefault();const{ariaLabelConfig:ue}=Q.getState();Q.setState({ariaLiveMessage:ue["node.a11yDescription.ariaLiveMessage"]({direction:ce.key.replace("Arrow","").toLowerCase(),x:~~A.positionAbsolute.x,y:~~A.positionAbsolute.y})}),M({direction:xc[ce.key],factor:ce.shiftKey?4:1})}}},fe=()=>{var _e;if(S||!((_e=D.current)!=null&&_e.matches(":focus-visible")))return;const{transform:ce,width:ue,height:Ee,autoPanOnNodeFocus:ve,setCenter:xe}=Q.getState();if(!ve)return;Lh(new Map([[t,N]]),{x:0,y:0,width:ue,height:Ee},ce,!0).length>0||xe(N.position.x+H.width/2,N.position.y+H.height/2,{zoom:ce[2]})};return d.jsx("div",{className:st(["react-flow__node",`react-flow__node-${k}`,{[w]:U},N.className,{selected:N.selected,selectable:K,parent:z,draggable:U,dragging:Z}]),ref:D,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:Y?"all":"none",visibility:te?"visible":"hidden",...N.style,...B},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:q,onMouseMove:O,onMouseLeave:V,onContextMenu:W,onClick:oe,onDoubleClick:ne,onKeyDown:G?se:void 0,tabIndex:G?0:void 0,onFocus:G?fe:void 0,role:N.ariaRole??(G?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${H1}-${_}`,"aria-label":N.ariaLabel,...N.domAttributes,children:d.jsx(hC,{value:t,children:d.jsx(L,{id:t,data:N.data,type:k,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:N.selected??!1,selectable:K,draggable:U,deletable:N.deletable??!0,isConnectable:ie,sourcePosition:N.sourcePosition,targetPosition:N.targetPosition,dragging:Z,dragHandle:N.dragHandle,zIndex:A.z,parentId:N.parentId,...H})})})}var OC=C.memo(zC);const RC=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function Q1(t){const{nodesDraggable:i,nodesConnectable:l,nodesFocusable:r,elementsSelectable:s,onError:c}=Le(RC,Pe),u=AC(t.onlyRenderVisibleElements),h=TC();return d.jsx("div",{className:"react-flow__nodes",style:Uc,children:u.map(g=>d.jsx(OC,{id:g,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:h,nodesDraggable:i,nodesConnectable:l,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:t.nodeClickDistance,onError:c},g))})}Q1.displayName="NodeRenderer";const kC=C.memo(Q1);function DC(t){return Le(C.useCallback(l=>{if(!t)return l.edges.map(s=>s.id);const r=[];if(l.width&&l.height)for(const s of l.edges){const c=l.nodeLookup.get(s.source),u=l.nodeLookup.get(s.target);c&&u&&M3({sourceNode:c,targetNode:u,width:l.width,height:l.height,transform:l.transform})&&r.push(s.id)}return r},[t]),Pe)}const LC=({color:t="none",strokeWidth:i=1})=>{const l={strokeWidth:i,...t&&{stroke:t}};return d.jsx("polyline",{className:"arrow",style:l,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},HC=({color:t="none",strokeWidth:i=1})=>{const l={strokeWidth:i,...t&&{stroke:t,fill:t}};return d.jsx("polyline",{className:"arrowclosed",style:l,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},hy={[mc.Arrow]:LC,[mc.ArrowClosed]:HC};function BC(t){const i=Ie();return C.useMemo(()=>{var s,c;return Object.prototype.hasOwnProperty.call(hy,t)?hy[t]:((c=(s=i.getState()).onError)==null||c.call(s,"009",zn.error009(t)),null)},[t])}const UC=({id:t,type:i,color:l,width:r=12.5,height:s=12.5,markerUnits:c="strokeWidth",strokeWidth:u,orient:h="auto-start-reverse"})=>{const g=BC(i);return g?d.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:c,orient:h,refX:"0",refY:"0",children:d.jsx(g,{color:l,strokeWidth:u})}):null},K1=({defaultColor:t,rfId:i})=>{const l=Le(c=>c.edges),r=Le(c=>c.defaultEdgeOptions),s=C.useMemo(()=>B3(l,{id:i,defaultColor:t,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[l,r,i,t]);return s.length?d.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:d.jsx("defs",{children:s.map(c=>d.jsx(UC,{id:c.id,type:c.type,color:c.color,width:c.width,height:c.height,markerUnits:c.markerUnits,strokeWidth:c.strokeWidth,orient:c.orient},c.id))})}):null};K1.displayName="MarkerDefinitions";var VC=C.memo(K1);function F1({x:t,y:i,label:l,labelStyle:r,labelShowBg:s=!0,labelBgStyle:c,labelBgPadding:u=[2,4],labelBgBorderRadius:h=2,children:g,className:p,...y}){const[x,v]=C.useState({x:1,y:0,width:0,height:0}),w=st(["react-flow__edge-textwrapper",p]),S=C.useRef(null);return C.useEffect(()=>{if(S.current){const _=S.current.getBBox();v({x:_.x,y:_.y,width:_.width,height:_.height})}},[l]),l?d.jsxs("g",{transform:`translate(${t-x.width/2} ${i-x.height/2})`,className:w,visibility:x.width?"visible":"hidden",...y,children:[s&&d.jsx("rect",{width:x.width+2*u[0],x:-u[0],y:-u[1],height:x.height+2*u[1],className:"react-flow__edge-textbg",style:c,rx:h,ry:h}),d.jsx("text",{className:"react-flow__edge-text",y:x.height/2,dy:"0.3em",ref:S,style:r,children:l}),g]}):null}F1.displayName="EdgeText";const $C=C.memo(F1);function Vc({path:t,labelX:i,labelY:l,label:r,labelStyle:s,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:g,interactionWidth:p=20,...y}){return d.jsxs(d.Fragment,{children:[d.jsx("path",{...y,d:t,fill:"none",className:st(["react-flow__edge-path",y.className])}),p?d.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}):null,r&&hn(i)&&hn(l)?d.jsx($C,{x:i,y:l,label:r,labelStyle:s,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:g}):null]})}function my({pos:t,x1:i,y1:l,x2:r,y2:s}){return t===be.Left||t===be.Right?[.5*(i+r),l]:[i,.5*(l+s)]}function P1({sourceX:t,sourceY:i,sourcePosition:l=be.Bottom,targetX:r,targetY:s,targetPosition:c=be.Top}){const[u,h]=my({pos:l,x1:t,y1:i,x2:r,y2:s}),[g,p]=my({pos:c,x1:r,y1:s,x2:t,y2:i}),[y,x,v,w]=b1({sourceX:t,sourceY:i,targetX:r,targetY:s,sourceControlX:u,sourceControlY:h,targetControlX:g,targetControlY:p});return[`M${t},${i} C${u},${h} ${g},${p} ${r},${s}`,y,x,v,w]}function I1(t){return C.memo(({id:i,sourceX:l,sourceY:r,targetX:s,targetY:c,sourcePosition:u,targetPosition:h,label:g,labelStyle:p,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:E,interactionWidth:j})=>{const[R,N,A]=P1({sourceX:l,sourceY:r,sourcePosition:u,targetX:s,targetY:c,targetPosition:h}),z=t.isInternal?void 0:i;return d.jsx(Vc,{id:z,path:R,labelX:N,labelY:A,label:g,labelStyle:p,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:E,interactionWidth:j})})}const YC=I1({isInternal:!1}),J1=I1({isInternal:!0});YC.displayName="SimpleBezierEdge";J1.displayName="SimpleBezierEdgeInternal";function W1(t){return C.memo(({id:i,sourceX:l,sourceY:r,targetX:s,targetY:c,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:v,sourcePosition:w=be.Bottom,targetPosition:S=be.Top,markerEnd:_,markerStart:E,pathOptions:j,interactionWidth:R})=>{const[N,A,z]=nh({sourceX:l,sourceY:r,sourcePosition:w,targetX:s,targetY:c,targetPosition:S,borderRadius:j==null?void 0:j.borderRadius,offset:j==null?void 0:j.offset,stepPosition:j==null?void 0:j.stepPosition}),k=t.isInternal?void 0:i;return d.jsx(Vc,{id:k,path:N,labelX:A,labelY:z,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:v,markerEnd:_,markerStart:E,interactionWidth:R})})}const eb=W1({isInternal:!1}),tb=W1({isInternal:!0});eb.displayName="SmoothStepEdge";tb.displayName="SmoothStepEdgeInternal";function nb(t){return C.memo(({id:i,...l})=>{var s;const r=t.isInternal?void 0:i;return d.jsx(eb,{...l,id:r,pathOptions:C.useMemo(()=>{var c;return{borderRadius:0,offset:(c=l.pathOptions)==null?void 0:c.offset}},[(s=l.pathOptions)==null?void 0:s.offset])})})}const qC=nb({isInternal:!1}),ib=nb({isInternal:!0});qC.displayName="StepEdge";ib.displayName="StepEdgeInternal";function ab(t){return C.memo(({id:i,sourceX:l,sourceY:r,targetX:s,targetY:c,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:v,markerEnd:w,markerStart:S,interactionWidth:_})=>{const[E,j,R]=N1({sourceX:l,sourceY:r,targetX:s,targetY:c}),N=t.isInternal?void 0:i;return d.jsx(Vc,{id:N,path:E,labelX:j,labelY:R,label:u,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:x,style:v,markerEnd:w,markerStart:S,interactionWidth:_})})}const XC=ab({isInternal:!1}),lb=ab({isInternal:!0});XC.displayName="StraightEdge";lb.displayName="StraightEdgeInternal";function rb(t){return C.memo(({id:i,sourceX:l,sourceY:r,targetX:s,targetY:c,sourcePosition:u=be.Bottom,targetPosition:h=be.Top,label:g,labelStyle:p,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:E,pathOptions:j,interactionWidth:R})=>{const[N,A,z]=w1({sourceX:l,sourceY:r,sourcePosition:u,targetX:s,targetY:c,targetPosition:h,curvature:j==null?void 0:j.curvature}),k=t.isInternal?void 0:i;return d.jsx(Vc,{id:k,path:N,labelX:A,labelY:z,label:g,labelStyle:p,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:E,interactionWidth:R})})}const GC=rb({isInternal:!1}),ob=rb({isInternal:!0});GC.displayName="BezierEdge";ob.displayName="BezierEdgeInternal";const py={default:ob,straight:lb,step:ib,smoothstep:tb,simplebezier:J1},gy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},ZC=(t,i,l)=>l===be.Left?t-i:l===be.Right?t+i:t,QC=(t,i,l)=>l===be.Top?t-i:l===be.Bottom?t+i:t,xy="react-flow__edgeupdater";function yy({position:t,centerX:i,centerY:l,radius:r=10,onMouseDown:s,onMouseEnter:c,onMouseOut:u,type:h}){return d.jsx("circle",{onMouseDown:s,onMouseEnter:c,onMouseOut:u,className:st([xy,`${xy}-${h}`]),cx:ZC(i,r,t),cy:QC(l,r,t),r,stroke:"transparent",fill:"transparent"})}function KC({isReconnectable:t,reconnectRadius:i,edge:l,sourceX:r,sourceY:s,targetX:c,targetY:u,sourcePosition:h,targetPosition:g,onReconnect:p,onReconnectStart:y,onReconnectEnd:x,setReconnecting:v,setUpdateHover:w}){const S=Ie(),_=(A,z)=>{if(A.button!==0)return;const{autoPanOnConnect:k,domNode:L,connectionMode:U,connectionRadius:K,lib:ie,onConnectStart:G,cancelConnection:Q,nodeLookup:te,rfId:D,panBy:Z,updateConnection:M}=S.getState(),H=z.type==="target",B=(O,V)=>{v(!1),x==null||x(O,l,z.type,V)},Y=O=>p==null?void 0:p(l,O),q=(O,V)=>{v(!0),y==null||y(A,l,z.type),G==null||G(O,V)};lh.onPointerDown(A.nativeEvent,{autoPanOnConnect:k,connectionMode:U,connectionRadius:K,domNode:L,handleId:z.id,nodeId:z.nodeId,nodeLookup:te,isTarget:H,edgeUpdaterType:z.type,lib:ie,flowId:D,cancelConnection:Q,panBy:Z,isValidConnection:(...O)=>{var V,W;return((W=(V=S.getState()).isValidConnection)==null?void 0:W.call(V,...O))??!0},onConnect:Y,onConnectStart:q,onConnectEnd:(...O)=>{var V,W;return(W=(V=S.getState()).onConnectEnd)==null?void 0:W.call(V,...O)},onReconnectEnd:B,updateConnection:M,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:A.currentTarget})},E=A=>_(A,{nodeId:l.target,id:l.targetHandle??null,type:"target"}),j=A=>_(A,{nodeId:l.source,id:l.sourceHandle??null,type:"source"}),R=()=>w(!0),N=()=>w(!1);return d.jsxs(d.Fragment,{children:[(t===!0||t==="source")&&d.jsx(yy,{position:h,centerX:r,centerY:s,radius:i,onMouseDown:E,onMouseEnter:R,onMouseOut:N,type:"source"}),(t===!0||t==="target")&&d.jsx(yy,{position:g,centerX:c,centerY:u,radius:i,onMouseDown:j,onMouseEnter:R,onMouseOut:N,type:"target"})]})}function FC({id:t,edgesFocusable:i,edgesReconnectable:l,elementsSelectable:r,onClick:s,onDoubleClick:c,onContextMenu:u,onMouseEnter:h,onMouseMove:g,onMouseLeave:p,reconnectRadius:y,onReconnect:x,onReconnectStart:v,onReconnectEnd:w,rfId:S,edgeTypes:_,noPanClassName:E,onError:j,disableKeyboardA11y:R}){let N=Le(xe=>xe.edgeLookup.get(t));const A=Le(xe=>xe.defaultEdgeOptions);N=A?{...A,...N}:N;let z=N.type||"default",k=(_==null?void 0:_[z])||py[z];k===void 0&&(j==null||j("011",zn.error011(z)),z="default",k=(_==null?void 0:_.default)||py.default);const L=!!(N.focusable||i&&typeof N.focusable>"u"),U=typeof x<"u"&&(N.reconnectable||l&&typeof N.reconnectable>"u"),K=!!(N.selectable||r&&typeof N.selectable>"u"),ie=C.useRef(null),[G,Q]=C.useState(!1),[te,D]=C.useState(!1),Z=Ie(),{zIndex:M,sourceX:H,sourceY:B,targetX:Y,targetY:q,sourcePosition:O,targetPosition:V}=Le(C.useCallback(xe=>{const me=xe.nodeLookup.get(N.source),_e=xe.nodeLookup.get(N.target);if(!me||!_e)return{zIndex:N.zIndex,...gy};const Ue=H3({id:t,sourceNode:me,targetNode:_e,sourceHandle:N.sourceHandle||null,targetHandle:N.targetHandle||null,connectionMode:xe.connectionMode,onError:j});return{zIndex:T3({selected:N.selected,zIndex:N.zIndex,sourceNode:me,targetNode:_e,elevateOnSelect:xe.elevateEdgesOnSelect,zIndexMode:xe.zIndexMode}),...Ue||gy}},[N.source,N.target,N.sourceHandle,N.targetHandle,N.selected,N.zIndex]),Pe),W=C.useMemo(()=>N.markerStart?`url('#${ih(N.markerStart,S)}')`:void 0,[N.markerStart,S]),ne=C.useMemo(()=>N.markerEnd?`url('#${ih(N.markerEnd,S)}')`:void 0,[N.markerEnd,S]);if(N.hidden||H===null||B===null||Y===null||q===null)return null;const oe=xe=>{var Me;const{addSelectedEdges:me,unselectNodesAndEdges:_e,multiSelectionActive:Ue}=Z.getState();K&&(Z.setState({nodesSelectionActive:!1}),N.selected&&Ue?(_e({nodes:[],edges:[N]}),(Me=ie.current)==null||Me.blur()):me([t])),s&&s(xe,N)},se=c?xe=>{c(xe,{...N})}:void 0,fe=u?xe=>{u(xe,{...N})}:void 0,ce=h?xe=>{h(xe,{...N})}:void 0,ue=g?xe=>{g(xe,{...N})}:void 0,Ee=p?xe=>{p(xe,{...N})}:void 0,ve=xe=>{var me;if(!R&&r1.includes(xe.key)&&K){const{unselectNodesAndEdges:_e,addSelectedEdges:Ue}=Z.getState();xe.key==="Escape"?((me=ie.current)==null||me.blur(),_e({edges:[N]})):Ue([t])}};return d.jsx("svg",{style:{zIndex:M},children:d.jsxs("g",{className:st(["react-flow__edge",`react-flow__edge-${z}`,N.className,E,{selected:N.selected,animated:N.animated,inactive:!K&&!s,updating:G,selectable:K}]),onClick:oe,onDoubleClick:se,onContextMenu:fe,onMouseEnter:ce,onMouseMove:ue,onMouseLeave:Ee,onKeyDown:L?ve:void 0,tabIndex:L?0:void 0,role:N.ariaRole??(L?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":N.ariaLabel===null?void 0:N.ariaLabel||`Edge from ${N.source} to ${N.target}`,"aria-describedby":L?`${B1}-${S}`:void 0,ref:ie,...N.domAttributes,children:[!te&&d.jsx(k,{id:t,source:N.source,target:N.target,type:N.type,selected:N.selected,animated:N.animated,selectable:K,deletable:N.deletable??!0,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,sourceX:H,sourceY:B,targetX:Y,targetY:q,sourcePosition:O,targetPosition:V,data:N.data,style:N.style,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerStart:W,markerEnd:ne,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth}),U&&d.jsx(KC,{edge:N,isReconnectable:U,reconnectRadius:y,onReconnect:x,onReconnectStart:v,onReconnectEnd:w,sourceX:H,sourceY:B,targetX:Y,targetY:q,sourcePosition:O,targetPosition:V,setUpdateHover:Q,setReconnecting:D})]})})}var PC=C.memo(FC);const IC=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function sb({defaultMarkerColor:t,onlyRenderVisibleElements:i,rfId:l,edgeTypes:r,noPanClassName:s,onReconnect:c,onEdgeContextMenu:u,onEdgeMouseEnter:h,onEdgeMouseMove:g,onEdgeMouseLeave:p,onEdgeClick:y,reconnectRadius:x,onEdgeDoubleClick:v,onReconnectStart:w,onReconnectEnd:S,disableKeyboardA11y:_}){const{edgesFocusable:E,edgesReconnectable:j,elementsSelectable:R,onError:N}=Le(IC,Pe),A=DC(i);return d.jsxs("div",{className:"react-flow__edges",children:[d.jsx(VC,{defaultColor:t,rfId:l}),A.map(z=>d.jsx(PC,{id:z,edgesFocusable:E,edgesReconnectable:j,elementsSelectable:R,noPanClassName:s,onReconnect:c,onContextMenu:u,onMouseEnter:h,onMouseMove:g,onMouseLeave:p,onClick:y,reconnectRadius:x,onDoubleClick:v,onReconnectStart:w,onReconnectEnd:S,rfId:l,onError:N,edgeTypes:r,disableKeyboardA11y:_},z))]})}sb.displayName="EdgeRenderer";const JC=C.memo(sb),WC=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function eT({children:t}){const i=Le(WC);return d.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:i},children:t})}function tT(t){const i=Xh(),l=C.useRef(!1);C.useEffect(()=>{!l.current&&i.viewportInitialized&&t&&(setTimeout(()=>t(i),1),l.current=!0)},[t,i.viewportInitialized])}const nT=t=>{var i;return(i=t.panZoom)==null?void 0:i.syncViewport};function iT(t){const i=Le(nT),l=Ie();return C.useEffect(()=>{t&&(i==null||i(t),l.setState({transform:[t.x,t.y,t.zoom]}))},[t,i]),null}function aT(t){return t.connection.inProgress?{...t.connection,to:uo(t.connection.to,t.transform)}:{...t.connection}}function lT(t){return aT}function rT(t){const i=lT();return Le(i,Pe)}const oT=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function sT({containerStyle:t,style:i,type:l,component:r}){const{nodesConnectable:s,width:c,height:u,isValid:h,inProgress:g}=Le(oT,Pe);return!(c&&s&&g)?null:d.jsx("svg",{style:t,width:c,height:u,className:"react-flow__connectionline react-flow__container",children:d.jsx("g",{className:st(["react-flow__connection",c1(h)]),children:d.jsx(cb,{style:i,type:l,CustomComponent:r,isValid:h})})})}const cb=({style:t,type:i=Zi.Bezier,CustomComponent:l,isValid:r})=>{const{inProgress:s,from:c,fromNode:u,fromHandle:h,fromPosition:g,to:p,toNode:y,toHandle:x,toPosition:v,pointer:w}=rT();if(!s)return;if(l)return d.jsx(l,{connectionLineType:i,connectionLineStyle:t,fromNode:u,fromHandle:h,fromX:c.x,fromY:c.y,toX:p.x,toY:p.y,fromPosition:g,toPosition:v,connectionStatus:c1(r),toNode:y,toHandle:x,pointer:w});let S="";const _={sourceX:c.x,sourceY:c.y,sourcePosition:g,targetX:p.x,targetY:p.y,targetPosition:v};switch(i){case Zi.Bezier:[S]=w1(_);break;case Zi.SimpleBezier:[S]=P1(_);break;case Zi.Step:[S]=nh({..._,borderRadius:0});break;case Zi.SmoothStep:[S]=nh(_);break;default:[S]=N1(_)}return d.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};cb.displayName="ConnectionLine";const cT={};function vy(t=cT){C.useRef(t),Ie(),C.useEffect(()=>{},[t])}function uT(){Ie(),C.useRef(!1),C.useEffect(()=>{},[])}function ub({nodeTypes:t,edgeTypes:i,onInit:l,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:c,onEdgeDoubleClick:u,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:p,onNodeContextMenu:y,onSelectionContextMenu:x,onSelectionStart:v,onSelectionEnd:w,connectionLineType:S,connectionLineStyle:_,connectionLineComponent:E,connectionLineContainerStyle:j,selectionKeyCode:R,selectionOnDrag:N,selectionMode:A,multiSelectionKeyCode:z,panActivationKeyCode:k,zoomActivationKeyCode:L,deleteKeyCode:U,onlyRenderVisibleElements:K,elementsSelectable:ie,defaultViewport:G,translateExtent:Q,minZoom:te,maxZoom:D,preventScrolling:Z,defaultMarkerColor:M,zoomOnScroll:H,zoomOnPinch:B,panOnScroll:Y,panOnScrollSpeed:q,panOnScrollMode:O,zoomOnDoubleClick:V,panOnDrag:W,onPaneClick:ne,onPaneMouseEnter:oe,onPaneMouseMove:se,onPaneMouseLeave:fe,onPaneScroll:ce,onPaneContextMenu:ue,paneClickDistance:Ee,nodeClickDistance:ve,onEdgeContextMenu:xe,onEdgeMouseEnter:me,onEdgeMouseMove:_e,onEdgeMouseLeave:Ue,reconnectRadius:Me,onReconnect:nt,onReconnectStart:Lt,onReconnectEnd:ht,noDragClassName:ln,noWheelClassName:Dn,noPanClassName:ea,disableKeyboardA11y:ta,nodeExtent:pt,rfId:Ha,viewport:Ln,onViewportChange:di}){return vy(t),vy(i),uT(),tT(l),iT(Ln),d.jsx(_C,{onPaneClick:ne,onPaneMouseEnter:oe,onPaneMouseMove:se,onPaneMouseLeave:fe,onPaneContextMenu:ue,onPaneScroll:ce,paneClickDistance:Ee,deleteKeyCode:U,selectionKeyCode:R,selectionOnDrag:N,selectionMode:A,onSelectionStart:v,onSelectionEnd:w,multiSelectionKeyCode:z,panActivationKeyCode:k,zoomActivationKeyCode:L,elementsSelectable:ie,zoomOnScroll:H,zoomOnPinch:B,zoomOnDoubleClick:V,panOnScroll:Y,panOnScrollSpeed:q,panOnScrollMode:O,panOnDrag:W,defaultViewport:G,translateExtent:Q,minZoom:te,maxZoom:D,onSelectionContextMenu:x,preventScrolling:Z,noDragClassName:ln,noWheelClassName:Dn,noPanClassName:ea,disableKeyboardA11y:ta,onViewportChange:di,isControlledViewport:!!Ln,children:d.jsxs(eT,{children:[d.jsx(JC,{edgeTypes:i,onEdgeClick:s,onEdgeDoubleClick:u,onReconnect:nt,onReconnectStart:Lt,onReconnectEnd:ht,onlyRenderVisibleElements:K,onEdgeContextMenu:xe,onEdgeMouseEnter:me,onEdgeMouseMove:_e,onEdgeMouseLeave:Ue,reconnectRadius:Me,defaultMarkerColor:M,noPanClassName:ea,disableKeyboardA11y:ta,rfId:Ha}),d.jsx(sT,{style:_,type:S,component:E,containerStyle:j}),d.jsx("div",{className:"react-flow__edgelabel-renderer"}),d.jsx(kC,{nodeTypes:t,onNodeClick:r,onNodeDoubleClick:c,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:p,onNodeContextMenu:y,nodeClickDistance:ve,onlyRenderVisibleElements:K,noPanClassName:ea,noDragClassName:ln,disableKeyboardA11y:ta,nodeExtent:pt,rfId:Ha}),d.jsx("div",{className:"react-flow__viewport-portal"})]})})}ub.displayName="GraphView";const fT=C.memo(ub),by=({nodes:t,edges:i,defaultNodes:l,defaultEdges:r,width:s,height:c,fitView:u,fitViewOptions:h,minZoom:g=.5,maxZoom:p=2,nodeOrigin:y,nodeExtent:x,zIndexMode:v="basic"}={})=>{const w=new Map,S=new Map,_=new Map,E=new Map,j=r??i??[],R=l??t??[],N=y??[0,0],A=x??Ir;j1(_,E,j);const z=ah(R,w,S,{nodeOrigin:N,nodeExtent:A,zIndexMode:v});let k=[0,0,1];if(u&&s&&c){const L=so(w,{filter:G=>!!((G.width||G.initialWidth)&&(G.height||G.initialHeight))}),{x:U,y:K,zoom:ie}=Hh(L,s,c,g,p,(h==null?void 0:h.padding)??.1);k=[U,K,ie]}return{rfId:"1",width:s??0,height:c??0,transform:k,nodes:R,nodesInitialized:z,nodeLookup:w,parentLookup:S,edges:j,edgeLookup:E,connectionLookup:_,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:l!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:g,maxZoom:p,translateExtent:Ir,nodeExtent:A,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ol.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:N,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:u??!1,fitViewOptions:h,fitViewResolver:null,connection:{...s1},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:N3,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:o1,zIndexMode:v,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},dT=({nodes:t,edges:i,defaultNodes:l,defaultEdges:r,width:s,height:c,fitView:u,fitViewOptions:h,minZoom:g,maxZoom:p,nodeOrigin:y,nodeExtent:x,zIndexMode:v})=>AA((w,S)=>{async function _(){const{nodeLookup:E,panZoom:j,fitViewOptions:R,fitViewResolver:N,width:A,height:z,minZoom:k,maxZoom:L}=S();j&&(await w3({nodes:E,width:A,height:z,panZoom:j,minZoom:k,maxZoom:L},R),N==null||N.resolve(!0),w({fitViewResolver:null}))}return{...by({nodes:t,edges:i,width:s,height:c,fitView:u,fitViewOptions:h,minZoom:g,maxZoom:p,nodeOrigin:y,nodeExtent:x,defaultNodes:l,defaultEdges:r,zIndexMode:v}),setNodes:E=>{const{nodeLookup:j,parentLookup:R,nodeOrigin:N,elevateNodesOnSelect:A,fitViewQueued:z,zIndexMode:k}=S(),L=ah(E,j,R,{nodeOrigin:N,nodeExtent:x,elevateNodesOnSelect:A,checkEquality:!0,zIndexMode:k});z&&L?(_(),w({nodes:E,nodesInitialized:L,fitViewQueued:!1,fitViewOptions:void 0})):w({nodes:E,nodesInitialized:L})},setEdges:E=>{const{connectionLookup:j,edgeLookup:R}=S();j1(j,R,E),w({edges:E})},setDefaultNodesAndEdges:(E,j)=>{if(E){const{setNodes:R}=S();R(E),w({hasDefaultNodes:!0})}if(j){const{setEdges:R}=S();R(j),w({hasDefaultEdges:!0})}},updateNodeInternals:E=>{const{triggerNodeChanges:j,nodeLookup:R,parentLookup:N,domNode:A,nodeOrigin:z,nodeExtent:k,debug:L,fitViewQueued:U,zIndexMode:K}=S(),{changes:ie,updatedInternals:G}=G3(E,R,N,A,z,k,K);G&&($3(R,N,{nodeOrigin:z,nodeExtent:k,zIndexMode:K}),U?(_(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),(ie==null?void 0:ie.length)>0&&(L&&console.log("React Flow: trigger node changes",ie),j==null||j(ie)))},updateNodePositions:(E,j=!1)=>{const R=[];let N=[];const{nodeLookup:A,triggerNodeChanges:z,connection:k,updateConnection:L,onNodesChangeMiddlewareMap:U}=S();for(const[K,ie]of E){const G=A.get(K),Q=!!(G!=null&&G.expandParent&&(G!=null&&G.parentId)&&(ie!=null&&ie.position)),te={id:K,type:"position",position:Q?{x:Math.max(0,ie.position.x),y:Math.max(0,ie.position.y)}:ie.position,dragging:j};if(G&&k.inProgress&&k.fromNode.id===G.id){const D=ka(G,k.fromHandle,be.Left,!0);L({...k,from:D})}Q&&G.parentId&&R.push({id:K,parentId:G.parentId,rect:{...ie.internals.positionAbsolute,width:ie.measured.width??0,height:ie.measured.height??0}}),N.push(te)}if(R.length>0){const{parentLookup:K,nodeOrigin:ie}=S(),G=qh(R,A,K,ie);N.push(...G)}for(const K of U.values())N=K(N);z(N)},triggerNodeChanges:E=>{const{onNodesChange:j,setNodes:R,nodes:N,hasDefaultNodes:A,debug:z}=S();if(E!=null&&E.length){if(A){const k=FA(E,N);R(k)}z&&console.log("React Flow: trigger node changes",E),j==null||j(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:j,setEdges:R,edges:N,hasDefaultEdges:A,debug:z}=S();if(E!=null&&E.length){if(A){const k=PA(E,N);R(k)}z&&console.log("React Flow: trigger edge changes",E),j==null||j(E)}},addSelectedNodes:E=>{const{multiSelectionActive:j,edgeLookup:R,nodeLookup:N,triggerNodeChanges:A,triggerEdgeChanges:z}=S();if(j){const k=E.map(L=>ja(L,!0));A(k);return}A(jl(N,new Set([...E]),!0)),z(jl(R))},addSelectedEdges:E=>{const{multiSelectionActive:j,edgeLookup:R,nodeLookup:N,triggerNodeChanges:A,triggerEdgeChanges:z}=S();if(j){const k=E.map(L=>ja(L,!0));z(k);return}z(jl(R,new Set([...E]))),A(jl(N,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:j}={})=>{const{edges:R,nodes:N,nodeLookup:A,triggerNodeChanges:z,triggerEdgeChanges:k}=S(),L=E||N,U=j||R,K=[];for(const G of L){if(!G.selected)continue;const Q=A.get(G.id);Q&&(Q.selected=!1),K.push(ja(G.id,!1))}const ie=[];for(const G of U)G.selected&&ie.push(ja(G.id,!1));z(K),k(ie)},setMinZoom:E=>{const{panZoom:j,maxZoom:R}=S();j==null||j.setScaleExtent([E,R]),w({minZoom:E})},setMaxZoom:E=>{const{panZoom:j,minZoom:R}=S();j==null||j.setScaleExtent([R,E]),w({maxZoom:E})},setTranslateExtent:E=>{var j;(j=S().panZoom)==null||j.setTranslateExtent(E),w({translateExtent:E})},resetSelectedElements:()=>{const{edges:E,nodes:j,triggerNodeChanges:R,triggerEdgeChanges:N,elementsSelectable:A}=S();if(!A)return;const z=j.reduce((L,U)=>U.selected?[...L,ja(U.id,!1)]:L,[]),k=E.reduce((L,U)=>U.selected?[...L,ja(U.id,!1)]:L,[]);R(z),N(k)},setNodeExtent:E=>{const{nodes:j,nodeLookup:R,parentLookup:N,nodeOrigin:A,elevateNodesOnSelect:z,nodeExtent:k,zIndexMode:L}=S();E[0][0]===k[0][0]&&E[0][1]===k[0][1]&&E[1][0]===k[1][0]&&E[1][1]===k[1][1]||(ah(j,R,N,{nodeOrigin:A,nodeExtent:E,elevateNodesOnSelect:z,checkEquality:!1,zIndexMode:L}),w({nodeExtent:E}))},panBy:E=>{const{transform:j,width:R,height:N,panZoom:A,translateExtent:z}=S();return Z3({delta:E,panZoom:A,transform:j,translateExtent:z,width:R,height:N})},setCenter:async(E,j,R)=>{const{width:N,height:A,maxZoom:z,panZoom:k}=S();if(!k)return Promise.resolve(!1);const L=typeof(R==null?void 0:R.zoom)<"u"?R.zoom:z;return await k.setViewport({x:N/2-E*L,y:A/2-j*L,zoom:L},{duration:R==null?void 0:R.duration,ease:R==null?void 0:R.ease,interpolate:R==null?void 0:R.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{w({connection:{...s1}})},updateConnection:E=>{w({connection:E})},reset:()=>w({...by()})}},Object.is);function hT({initialNodes:t,initialEdges:i,defaultNodes:l,defaultEdges:r,initialWidth:s,initialHeight:c,initialMinZoom:u,initialMaxZoom:h,initialFitViewOptions:g,fitView:p,nodeOrigin:y,nodeExtent:x,zIndexMode:v,children:w}){const[S]=C.useState(()=>dT({nodes:t,edges:i,defaultNodes:l,defaultEdges:r,width:s,height:c,fitView:p,minZoom:u,maxZoom:h,fitViewOptions:g,nodeOrigin:y,nodeExtent:x,zIndexMode:v}));return d.jsx(TA,{value:S,children:d.jsx(eC,{children:w})})}function mT({children:t,nodes:i,edges:l,defaultNodes:r,defaultEdges:s,width:c,height:u,fitView:h,fitViewOptions:g,minZoom:p,maxZoom:y,nodeOrigin:x,nodeExtent:v,zIndexMode:w}){return C.useContext(Hc)?d.jsx(d.Fragment,{children:t}):d.jsx(hT,{initialNodes:i,initialEdges:l,defaultNodes:r,defaultEdges:s,initialWidth:c,initialHeight:u,fitView:h,initialFitViewOptions:g,initialMinZoom:p,initialMaxZoom:y,nodeOrigin:x,nodeExtent:v,zIndexMode:w,children:t})}const pT={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function gT({nodes:t,edges:i,defaultNodes:l,defaultEdges:r,className:s,nodeTypes:c,edgeTypes:u,onNodeClick:h,onEdgeClick:g,onInit:p,onMove:y,onMoveStart:x,onMoveEnd:v,onConnect:w,onConnectStart:S,onConnectEnd:_,onClickConnectStart:E,onClickConnectEnd:j,onNodeMouseEnter:R,onNodeMouseMove:N,onNodeMouseLeave:A,onNodeContextMenu:z,onNodeDoubleClick:k,onNodeDragStart:L,onNodeDrag:U,onNodeDragStop:K,onNodesDelete:ie,onEdgesDelete:G,onDelete:Q,onSelectionChange:te,onSelectionDragStart:D,onSelectionDrag:Z,onSelectionDragStop:M,onSelectionContextMenu:H,onSelectionStart:B,onSelectionEnd:Y,onBeforeDelete:q,connectionMode:O,connectionLineType:V=Zi.Bezier,connectionLineStyle:W,connectionLineComponent:ne,connectionLineContainerStyle:oe,deleteKeyCode:se="Backspace",selectionKeyCode:fe="Shift",selectionOnDrag:ce=!1,selectionMode:ue=Jr.Full,panActivationKeyCode:Ee="Space",multiSelectionKeyCode:ve=eo()?"Meta":"Control",zoomActivationKeyCode:xe=eo()?"Meta":"Control",snapToGrid:me,snapGrid:_e,onlyRenderVisibleElements:Ue=!1,selectNodesOnDrag:Me,nodesDraggable:nt,autoPanOnNodeFocus:Lt,nodesConnectable:ht,nodesFocusable:ln,nodeOrigin:Dn=U1,edgesFocusable:ea,edgesReconnectable:ta,elementsSelectable:pt=!0,defaultViewport:Ha=YA,minZoom:Ln=.5,maxZoom:di=2,translateExtent:na=Ir,preventScrolling:Ic=!0,nodeExtent:Ba,defaultMarkerColor:Jc="#b1b1b7",zoomOnScroll:Wc=!0,zoomOnPinch:ia=!0,panOnScroll:Nt=!1,panOnScrollSpeed:vn=.5,panOnScrollMode:Et=Ta.Free,zoomOnDoubleClick:eu=!0,panOnDrag:tu=!0,onPaneClick:nu,onPaneMouseEnter:Ua,onPaneMouseMove:Va,onPaneMouseLeave:$a,onPaneScroll:Hn,onPaneContextMenu:Ya,paneClickDistance:aa=1,nodeClickDistance:iu=0,children:po,onReconnect:ql,onReconnectStart:la,onReconnectEnd:au,onEdgeContextMenu:go,onEdgeDoubleClick:xo,onEdgeMouseEnter:yo,onEdgeMouseMove:Xl,onEdgeMouseLeave:Gl,reconnectRadius:vo=10,onNodesChange:bo,onEdgesChange:bn,noDragClassName:ct="nodrag",noWheelClassName:wt="nowheel",noPanClassName:Bn="nopan",fitView:qa,fitViewOptions:wo,connectOnClick:lu,attributionPosition:So,proOptions:ra,defaultEdgeOptions:Zl,elevateNodesOnSelect:hi=!0,elevateEdgesOnSelect:mi=!1,disableKeyboardA11y:pi=!1,autoPanOnConnect:gi,autoPanOnNodeDrag:it,autoPanSpeed:No,connectionRadius:Eo,isValidConnection:Un,onError:xi,style:ru,id:Ql,nodeDragThreshold:_o,connectionDragThreshold:ou,viewport:Xa,onViewportChange:Ga,width:rn,height:jt,colorMode:jo="light",debug:su,onScroll:yi,ariaLabelConfig:Ao,zIndexMode:oa="basic",...cu},At){const sa=Ql||"1",Co=ZA(jo),Kl=C.useCallback(Vn=>{Vn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),yi==null||yi(Vn)},[yi]);return d.jsx("div",{"data-testid":"rf__wrapper",...cu,onScroll:Kl,style:{...ru,...pT},ref:At,className:st(["react-flow",s,Co]),id:Ql,role:"application",children:d.jsxs(mT,{nodes:t,edges:i,width:rn,height:jt,fitView:qa,fitViewOptions:wo,minZoom:Ln,maxZoom:di,nodeOrigin:Dn,nodeExtent:Ba,zIndexMode:oa,children:[d.jsx(fT,{onInit:p,onNodeClick:h,onEdgeClick:g,onNodeMouseEnter:R,onNodeMouseMove:N,onNodeMouseLeave:A,onNodeContextMenu:z,onNodeDoubleClick:k,nodeTypes:c,edgeTypes:u,connectionLineType:V,connectionLineStyle:W,connectionLineComponent:ne,connectionLineContainerStyle:oe,selectionKeyCode:fe,selectionOnDrag:ce,selectionMode:ue,deleteKeyCode:se,multiSelectionKeyCode:ve,panActivationKeyCode:Ee,zoomActivationKeyCode:xe,onlyRenderVisibleElements:Ue,defaultViewport:Ha,translateExtent:na,minZoom:Ln,maxZoom:di,preventScrolling:Ic,zoomOnScroll:Wc,zoomOnPinch:ia,zoomOnDoubleClick:eu,panOnScroll:Nt,panOnScrollSpeed:vn,panOnScrollMode:Et,panOnDrag:tu,onPaneClick:nu,onPaneMouseEnter:Ua,onPaneMouseMove:Va,onPaneMouseLeave:$a,onPaneScroll:Hn,onPaneContextMenu:Ya,paneClickDistance:aa,nodeClickDistance:iu,onSelectionContextMenu:H,onSelectionStart:B,onSelectionEnd:Y,onReconnect:ql,onReconnectStart:la,onReconnectEnd:au,onEdgeContextMenu:go,onEdgeDoubleClick:xo,onEdgeMouseEnter:yo,onEdgeMouseMove:Xl,onEdgeMouseLeave:Gl,reconnectRadius:vo,defaultMarkerColor:Jc,noDragClassName:ct,noWheelClassName:wt,noPanClassName:Bn,rfId:sa,disableKeyboardA11y:pi,nodeExtent:Ba,viewport:Xa,onViewportChange:Ga}),d.jsx(GA,{nodes:t,edges:i,defaultNodes:l,defaultEdges:r,onConnect:w,onConnectStart:S,onConnectEnd:_,onClickConnectStart:E,onClickConnectEnd:j,nodesDraggable:nt,autoPanOnNodeFocus:Lt,nodesConnectable:ht,nodesFocusable:ln,edgesFocusable:ea,edgesReconnectable:ta,elementsSelectable:pt,elevateNodesOnSelect:hi,elevateEdgesOnSelect:mi,minZoom:Ln,maxZoom:di,nodeExtent:Ba,onNodesChange:bo,onEdgesChange:bn,snapToGrid:me,snapGrid:_e,connectionMode:O,translateExtent:na,connectOnClick:lu,defaultEdgeOptions:Zl,fitView:qa,fitViewOptions:wo,onNodesDelete:ie,onEdgesDelete:G,onDelete:Q,onNodeDragStart:L,onNodeDrag:U,onNodeDragStop:K,onSelectionDrag:Z,onSelectionDragStart:D,onSelectionDragStop:M,onMove:y,onMoveStart:x,onMoveEnd:v,noPanClassName:Bn,nodeOrigin:Dn,rfId:sa,autoPanOnConnect:gi,autoPanOnNodeDrag:it,autoPanSpeed:No,onError:xi,connectionRadius:Eo,isValidConnection:Un,selectNodesOnDrag:Me,nodeDragThreshold:_o,connectionDragThreshold:ou,onBeforeDelete:q,debug:su,ariaLabelConfig:Ao,zIndexMode:oa}),d.jsx($A,{onSelectionChange:te}),po,d.jsx(LA,{proOptions:ra,position:So}),d.jsx(DA,{rfId:sa,disableKeyboardA11y:pi})]})})}var xT=$1(gT);function yT({dimensions:t,lineWidth:i,variant:l,className:r}){return d.jsx("path",{strokeWidth:i,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:st(["react-flow__background-pattern",l,r])})}function vT({radius:t,className:i}){return d.jsx("circle",{cx:t,cy:t,r:t,className:st(["react-flow__background-pattern","dots",i])})}var Qi;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Qi||(Qi={}));const bT={[Qi.Dots]:1,[Qi.Lines]:1,[Qi.Cross]:6},wT=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function fb({id:t,variant:i=Qi.Dots,gap:l=20,size:r,lineWidth:s=1,offset:c=0,color:u,bgColor:h,style:g,className:p,patternClassName:y}){const x=C.useRef(null),{transform:v,patternId:w}=Le(wT,Pe),S=r||bT[i],_=i===Qi.Dots,E=i===Qi.Cross,j=Array.isArray(l)?l:[l,l],R=[j[0]*v[2]||1,j[1]*v[2]||1],N=S*v[2],A=Array.isArray(c)?c:[c,c],z=E?[N,N]:R,k=[A[0]*v[2]||1+z[0]/2,A[1]*v[2]||1+z[1]/2],L=`${w}${t||""}`;return d.jsxs("svg",{className:st(["react-flow__background",p]),style:{...g,...Uc,"--xy-background-color-props":h,"--xy-background-pattern-color-props":u},ref:x,"data-testid":"rf__background",children:[d.jsx("pattern",{id:L,x:v[0]%R[0],y:v[1]%R[1],width:R[0],height:R[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${k[0]},-${k[1]})`,children:_?d.jsx(vT,{radius:N/2,className:y}):d.jsx(yT,{dimensions:z,lineWidth:s,variant:i,className:y})}),d.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${L})`})]})}fb.displayName="Background";const ST=C.memo(fb);function NT(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:d.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function ET(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:d.jsx("path",{d:"M0 0h32v4.2H0z"})})}function _T(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:d.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function jT(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:d.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function AT(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:d.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Fs({children:t,className:i,...l}){return d.jsx("button",{type:"button",className:st(["react-flow__controls-button",i]),...l,children:t})}const CT=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function db({style:t,showZoom:i=!0,showFitView:l=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:c,onZoomOut:u,onFitView:h,onInteractiveChange:g,className:p,children:y,position:x="bottom-left",orientation:v="vertical","aria-label":w}){const S=Ie(),{isInteractive:_,minZoomReached:E,maxZoomReached:j,ariaLabelConfig:R}=Le(CT,Pe),{zoomIn:N,zoomOut:A,fitView:z}=Xh(),k=()=>{N(),c==null||c()},L=()=>{A(),u==null||u()},U=()=>{z(s),h==null||h()},K=()=>{S.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),g==null||g(!_)},ie=v==="horizontal"?"horizontal":"vertical";return d.jsxs(Bc,{className:st(["react-flow__controls",ie,p]),position:x,style:t,"data-testid":"rf__controls","aria-label":w??R["controls.ariaLabel"],children:[i&&d.jsxs(d.Fragment,{children:[d.jsx(Fs,{onClick:k,className:"react-flow__controls-zoomin",title:R["controls.zoomIn.ariaLabel"],"aria-label":R["controls.zoomIn.ariaLabel"],disabled:j,children:d.jsx(NT,{})}),d.jsx(Fs,{onClick:L,className:"react-flow__controls-zoomout",title:R["controls.zoomOut.ariaLabel"],"aria-label":R["controls.zoomOut.ariaLabel"],disabled:E,children:d.jsx(ET,{})})]}),l&&d.jsx(Fs,{className:"react-flow__controls-fitview",onClick:U,title:R["controls.fitView.ariaLabel"],"aria-label":R["controls.fitView.ariaLabel"],children:d.jsx(_T,{})}),r&&d.jsx(Fs,{className:"react-flow__controls-interactive",onClick:K,title:R["controls.interactive.ariaLabel"],"aria-label":R["controls.interactive.ariaLabel"],children:_?d.jsx(AT,{}):d.jsx(jT,{})}),y]})}db.displayName="Controls";C.memo(db);function TT({id:t,x:i,y:l,width:r,height:s,style:c,color:u,strokeColor:h,strokeWidth:g,className:p,borderRadius:y,shapeRendering:x,selected:v,onClick:w}){const{background:S,backgroundColor:_}=c||{},E=u||S||_;return d.jsx("rect",{className:st(["react-flow__minimap-node",{selected:v},p]),x:i,y:l,rx:y,ry:y,width:r,height:s,style:{fill:E,stroke:h,strokeWidth:g},shapeRendering:x,onClick:w?j=>w(j,t):void 0})}const MT=C.memo(TT),zT=t=>t.nodes.map(i=>i.id),Dd=t=>t instanceof Function?t:()=>t;function OT({nodeStrokeColor:t,nodeColor:i,nodeClassName:l="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:c=MT,onClick:u}){const h=Le(zT,Pe),g=Dd(i),p=Dd(t),y=Dd(l),x=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return d.jsx(d.Fragment,{children:h.map(v=>d.jsx(kT,{id:v,nodeColorFunc:g,nodeStrokeColorFunc:p,nodeClassNameFunc:y,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:c,onClick:u,shapeRendering:x},v))})}function RT({id:t,nodeColorFunc:i,nodeStrokeColorFunc:l,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:c,shapeRendering:u,NodeComponent:h,onClick:g}){const{node:p,x:y,y:x,width:v,height:w}=Le(S=>{const _=S.nodeLookup.get(t);if(!_)return{node:void 0,x:0,y:0,width:0,height:0};const E=_.internals.userNode,{x:j,y:R}=_.internals.positionAbsolute,{width:N,height:A}=fi(E);return{node:E,x:j,y:R,width:N,height:A}},Pe);return!p||p.hidden||!p1(p)?null:d.jsx(h,{x:y,y:x,width:v,height:w,style:p.style,selected:!!p.selected,className:r(p),color:i(p),borderRadius:s,strokeColor:l(p),strokeWidth:c,shapeRendering:u,onClick:g,id:p.id})}const kT=C.memo(RT);var DT=C.memo(OT);const LT=200,HT=150,BT=t=>!t.hidden,UT=t=>{const i={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:i,boundingRect:t.nodeLookup.size>0?m1(so(t.nodeLookup,{filter:BT}),i):i,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},VT="react-flow__minimap-desc";function hb({style:t,className:i,nodeStrokeColor:l,nodeColor:r,nodeClassName:s="",nodeBorderRadius:c=5,nodeStrokeWidth:u,nodeComponent:h,bgColor:g,maskColor:p,maskStrokeColor:y,maskStrokeWidth:x,position:v="bottom-right",onClick:w,onNodeClick:S,pannable:_=!1,zoomable:E=!1,ariaLabel:j,inversePan:R,zoomStep:N=1,offsetScale:A=5}){const z=Ie(),k=C.useRef(null),{boundingRect:L,viewBB:U,rfId:K,panZoom:ie,translateExtent:G,flowWidth:Q,flowHeight:te,ariaLabelConfig:D}=Le(UT,Pe),Z=(t==null?void 0:t.width)??LT,M=(t==null?void 0:t.height)??HT,H=L.width/Z,B=L.height/M,Y=Math.max(H,B),q=Y*Z,O=Y*M,V=A*Y,W=L.x-(q-L.width)/2-V,ne=L.y-(O-L.height)/2-V,oe=q+V*2,se=O+V*2,fe=`${VT}-${K}`,ce=C.useRef(0),ue=C.useRef();ce.current=Y,C.useEffect(()=>{if(k.current&&ie)return ue.current=tA({domNode:k.current,panZoom:ie,getTransform:()=>z.getState().transform,getViewScale:()=>ce.current}),()=>{var me;(me=ue.current)==null||me.destroy()}},[ie]),C.useEffect(()=>{var me;(me=ue.current)==null||me.update({translateExtent:G,width:Q,height:te,inversePan:R,pannable:_,zoomStep:N,zoomable:E})},[_,E,R,N,G,Q,te]);const Ee=w?me=>{var Me;const[_e,Ue]=((Me=ue.current)==null?void 0:Me.pointer(me))||[0,0];w(me,{x:_e,y:Ue})}:void 0,ve=S?C.useCallback((me,_e)=>{const Ue=z.getState().nodeLookup.get(_e).internals.userNode;S(me,Ue)},[]):void 0,xe=j??D["minimap.ariaLabel"];return d.jsx(Bc,{position:v,style:{...t,"--xy-minimap-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-color-props":typeof y=="string"?y:void 0,"--xy-minimap-mask-stroke-width-props":typeof x=="number"?x*Y:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof l=="string"?l:void 0,"--xy-minimap-node-stroke-width-props":typeof u=="number"?u:void 0},className:st(["react-flow__minimap",i]),"data-testid":"rf__minimap",children:d.jsxs("svg",{width:Z,height:M,viewBox:`${W} ${ne} ${oe} ${se}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":fe,ref:k,onClick:Ee,children:[xe&&d.jsx("title",{id:fe,children:xe}),d.jsx(DT,{onClick:ve,nodeColor:r,nodeStrokeColor:l,nodeBorderRadius:c,nodeClassName:s,nodeStrokeWidth:u,nodeComponent:h}),d.jsx("path",{className:"react-flow__minimap-mask",d:`M${W-V},${ne-V}h${oe+V*2}v${se+V*2}h${-oe-V*2}z
406
+ M${U.x},${U.y}h${U.width}v${U.height}h${-U.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}hb.displayName="MiniMap";C.memo(hb);const $T=t=>i=>t?`${Math.max(1/i.transform[2],1)}`:void 0,YT={[Ll.Line]:"right",[Ll.Handle]:"bottom-right"};function qT({nodeId:t,position:i,variant:l=Ll.Handle,className:r,style:s=void 0,children:c,color:u,minWidth:h=10,minHeight:g=10,maxWidth:p=Number.MAX_VALUE,maxHeight:y=Number.MAX_VALUE,keepAspectRatio:x=!1,resizeDirection:v,autoScale:w=!0,shouldResize:S,onResizeStart:_,onResize:E,onResizeEnd:j}){const R=G1(),N=typeof t=="string"?t:R,A=Ie(),z=C.useRef(null),k=l===Ll.Handle,L=Le(C.useCallback($T(k&&w),[k,w]),Pe),U=C.useRef(null),K=i??YT[l];C.useEffect(()=>{if(!(!z.current||!N))return U.current||(U.current=pA({domNode:z.current,nodeId:N,getStoreItems:()=>{const{nodeLookup:G,transform:Q,snapGrid:te,snapToGrid:D,nodeOrigin:Z,domNode:M}=A.getState();return{nodeLookup:G,transform:Q,snapGrid:te,snapToGrid:D,nodeOrigin:Z,paneDomNode:M}},onChange:(G,Q)=>{const{triggerNodeChanges:te,nodeLookup:D,parentLookup:Z,nodeOrigin:M}=A.getState(),H=[],B={x:G.x,y:G.y},Y=D.get(N);if(Y&&Y.expandParent&&Y.parentId){const q=Y.origin??M,O=G.width??Y.measured.width??0,V=G.height??Y.measured.height??0,W={id:Y.id,parentId:Y.parentId,rect:{width:O,height:V,...g1({x:G.x??Y.position.x,y:G.y??Y.position.y},{width:O,height:V},Y.parentId,D,q)}},ne=qh([W],D,Z,M);H.push(...ne),B.x=G.x?Math.max(q[0]*O,G.x):void 0,B.y=G.y?Math.max(q[1]*V,G.y):void 0}if(B.x!==void 0&&B.y!==void 0){const q={id:N,type:"position",position:{...B}};H.push(q)}if(G.width!==void 0&&G.height!==void 0){const O={id:N,type:"dimensions",resizing:!0,setAttributes:v?v==="horizontal"?"width":"height":!0,dimensions:{width:G.width,height:G.height}};H.push(O)}for(const q of Q){const O={...q,type:"position"};H.push(O)}te(H)},onEnd:({width:G,height:Q})=>{const te={id:N,type:"dimensions",resizing:!1,dimensions:{width:G,height:Q}};A.getState().triggerNodeChanges([te])}})),U.current.update({controlPosition:K,boundaries:{minWidth:h,minHeight:g,maxWidth:p,maxHeight:y},keepAspectRatio:x,resizeDirection:v,onResizeStart:_,onResize:E,onResizeEnd:j,shouldResize:S}),()=>{var G;(G=U.current)==null||G.destroy()}},[K,h,g,p,y,x,_,E,j,S]);const ie=K.split("-");return d.jsx("div",{className:st(["react-flow__resize-control","nodrag",...ie,l,r]),ref:z,style:{...s,scale:L,...u&&{[k?"backgroundColor":"borderColor"]:u}},children:c})}C.memo(qT);const _n={memory:/^MEMORY\.md$/i,soul:/^SOUL\.md$/i,daily:/^\d{4}-\d{2}-\d{2}\.md$/,session:/\.jsonl$/,vectorIndex:/\.sqlite$/,aiConfig:/^CLAUDE\.md$|^\.cursorrules$/i,agentDefs:/^AGENTS\.md$|^SKILLS\.md$/i,telemetry:/\.csv$/,archive:/\.(tar\.gz|zip|gz)$/,knowledge:/^README\.md$|^KNOWLEDGE.*\.md$|^RUNBOOK.*\.md$/i};function un(t,i,l,r=[]){for(const s of t)s.type==="file"&&i.test(s.name)&&r.push({name:s.name,path:`${l}/${s.path}`,size:s.size}),s.children&&un(s.children,i,l,r);return r}function mb(t){let i=0,l=0;for(const r of t)if(r.type==="file"&&(i++,l+=r.size||0),r.children){const s=mb(r.children);i+=s.files,l+=s.size}return{files:i,size:l}}function XT(t){const i=[],l=t.gateway;if(l){const u=l.mode||"local",h=l.port,g=l.auth_mode||"none",p=[`Mode: ${u}`];h&&p.push(`Port: ${h}`),g!=="none"&&p.push(`Auth: ${g}`),i.push({id:"config-gateway",type:"processing",label:"Gateway",description:p.join(" · "),icon:xv,color:"var(--accent-blue)",files:[],totalSize:0,path:"openclaw.json → gateway",depth:-2})}const r=t.channels;if(r){const u=Object.entries(r).filter(([,h])=>typeof h=="object"&&h!==null?h.enabled!==!1:!!h).map(([h])=>h);u.length>0&&i.push({id:"config-channels",type:"processing",label:"Channels",description:u.join(", "),icon:wv,color:"var(--accent-green)",files:[],totalSize:0,path:"openclaw.json → channels",depth:-2})}const s=t.models,c=t.model;if(s||c){let u="Configured";if(c)u=c;else if(s){const h=s.primary||s.default,g=s.fallback,p=[];if(h&&p.push(h),g){const y=Array.isArray(g)?g:[g];p.push(`→ ${y.join(" → ")}`)}p.length>0&&(u=p.join(" "))}i.push({id:"config-models",type:"processing",label:"Models",description:u,icon:yh,color:"var(--accent-purple)",files:[],totalSize:0,path:"openclaw.json → models",depth:-2})}return i}function GT(t,i){const l=[];return i&&l.push(...XT(i)),Object.entries(t).forEach(([r,s])=>{if(!s)return;const{tree:c,path:u=`~/${r}`}=s,h=[],g=un(c,_n.memory,u,[]),p=un(c,_n.soul,u,[]),y=un(c,_n.daily,u,[]),x=[...g,...p,...y];if(x.length>0){const N=x.reduce((z,k)=>z+(k.size||0),0),A=[];g.length>0&&A.push("MEMORY.md"),p.length>0&&A.push("SOUL.md"),y.length>0&&A.push(`${y.length} daily logs`),h.push({id:`${r}-core-memory`,type:"storage",label:"Core Memory",description:A.join(" + "),icon:Vl,color:"var(--accent-purple)",files:[...g,...p,...y.sort((z,k)=>k.name.localeCompare(z.name)).slice(0,5)],totalSize:N,path:u,depth:0})}const v=un(c,_n.session,u,[]);if(v.length>0){const N=v.reduce((A,z)=>A+(z.size||0),0);h.push({id:`${r}-sessions`,type:"storage",label:"Session Transcripts",description:`${v.length} session files`,icon:_c,color:"var(--accent-green)",files:v.slice(0,6),totalSize:N,path:u,depth:1})}const w=un(c,_n.vectorIndex,u,[]);if(w.length>0){const N=w.reduce((A,z)=>A+(z.size||0),0);h.push({id:`${r}-vector`,type:"storage",label:"Vector Index",description:`${w.length} database files`,icon:pv,color:"var(--accent-indigo)",files:w,totalSize:N,path:u,depth:1})}const S=un(c,_n.aiConfig,u,[]);if(S.length>0){const N=S.reduce((A,z)=>A+(z.size||0),0);h.push({id:`${r}-ai-config`,type:"processing",label:"AI Config",description:S.map(A=>A.name).join(", "),icon:wh,color:"var(--accent-blue)",files:S,totalSize:N,path:u,depth:0})}const _=un(c,_n.agentDefs,u,[]);if(_.length>0){const N=_.reduce((A,z)=>A+(z.size||0),0);h.push({id:`${r}-agent-defs`,type:"processing",label:"Agent Definitions",description:_.map(A=>A.name).join(", "),icon:i4,color:"var(--accent-amber)",files:_,totalSize:N,path:u,depth:0})}const E=un(c,_n.knowledge,u,[]);if(E.length>0){const N=E.reduce((A,z)=>A+(z.size||0),0);h.push({id:`${r}-knowledge`,type:"storage",label:"Knowledge Base",description:`${E.length} documentation files`,icon:uv,color:"var(--accent-blue)",files:E,totalSize:N,path:u,depth:1})}const j=un(c,_n.telemetry,u,[]);if(j.length>0){const N=j.reduce((A,z)=>A+(z.size||0),0);h.push({id:`${r}-telemetry`,type:"telemetry",label:"Telemetry Logs",description:`${j.length} data log files`,icon:ov,color:"var(--accent-indigo)",files:j.slice(0,6),totalSize:N,path:u,depth:2})}const R=un(c,_n.archive,u,[]);if(R.length>0){const N=R.reduce((A,z)=>A+(z.size||0),0);h.push({id:`${r}-archive`,type:"archive",label:"Memory Archive",description:`${R.length} compressed history files`,icon:sv,color:"var(--accent-pink)",files:R,totalSize:N,path:u,depth:3})}if(h.length===0&&(c.filter(N=>N.type==="directory").forEach((N,A)=>{const z=N.children?mb(N.children):{files:0,size:0};z.files>0&&h.push({id:`${r}-${N.name}`,type:"storage",label:N.name,description:`${z.files} files`,icon:Ki,color:["var(--accent-blue)","var(--accent-green)","var(--accent-amber)","var(--accent-purple)"][A%4],files:[],totalSize:z.size,path:`${u}/${N.name}`,depth:1})}),h.length===0)){const N=c.filter(A=>A.type==="file");if(N.length>0){const A=N.reduce((z,k)=>z+(k.size||0),0);h.push({id:`${r}-root`,type:"storage",label:"Root Files",description:`${N.length} files`,icon:Ki,color:"var(--accent-blue)",files:N.map(z=>({name:z.name,path:`${u}/${z.path}`,size:z.size})),totalSize:A,path:u,depth:1})}}l.push(...h)}),l.sort((r,s)=>r.depth-s.depth)}function ZT({data:t}){const i=t.isExpanded??!1,l=t.fileCount!==void 0&&t.fileCount>0||t.size!==void 0&&t.size>0,r=t.IconComponent;return d.jsxs("div",{className:Se("group relative min-w-[220px] max-w-[260px] transition-all duration-300",l&&"hover:scale-[1.02]"),children:[!t.isFirst&&d.jsx(Hl,{type:"target",position:be.Top,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-border"}),d.jsx("div",{className:Se("absolute -inset-0.5 rounded-2xl blur-sm transition-all duration-300 pointer-events-none",i?"opacity-70":"opacity-40 group-hover:opacity-60"),style:{background:`hsl(${t.color} / 0.4)`}}),d.jsxs(bt,{className:Se("relative overflow-hidden bg-card backdrop-blur-sm cursor-pointer transition-all duration-200",i&&"ring-1 ring-foreground/10"),style:{borderColor:i?`hsl(${t.color} / 0.6)`:`hsl(${t.color} / 0.35)`},children:[d.jsxs("div",{className:"flex items-start gap-3 p-3.5",children:[d.jsx("div",{className:"shrink-0 p-2 rounded-xl",style:{background:`linear-gradient(135deg, hsl(${t.color} / 0.2), hsl(${t.color} / 0.05))`,border:`1px solid hsl(${t.color} / 0.2)`},children:d.jsx(r,{className:"w-4 h-4",style:{color:`hsl(${t.color})`}})}),d.jsxs("div",{className:"flex-1 min-w-0 pt-0.5",children:[d.jsx("h3",{className:"text-[12px] font-semibold text-card-foreground tracking-tight leading-tight truncate",children:t.label}),d.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:t.description})]})]}),(t.fileCount!==void 0||t.size!==void 0)&&d.jsxs("div",{className:"flex items-center justify-between px-3.5 py-2.5 border-t bg-secondary/30",style:{borderColor:`hsl(${t.color} / 0.1)`},children:[t.fileCount!==void 0&&d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(Ec,{className:"w-3 h-3 text-muted-foreground/60"}),d.jsx("span",{className:"text-xs font-semibold tabular-nums",style:{color:`hsl(${t.color})`},children:t.fileCount}),d.jsx("span",{className:"text-[9px] text-muted-foreground/60",children:t.fileCount===1?"file":"files"})]}),t.size!==void 0&&t.size>0&&d.jsx("span",{className:"text-[10px] text-muted-foreground font-mono tabular-nums",children:an(t.size)})]}),l&&d.jsx("div",{className:"absolute top-2.5 right-2.5 w-1.5 h-1.5 rounded-full",style:{backgroundColor:`hsl(${t.color})`,boxShadow:`0 0 6px hsl(${t.color})`,animation:"pulse 2s ease-in-out infinite"}})]}),!t.isLast&&d.jsx(Hl,{type:"source",position:be.Bottom,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-border"})]})}const QT={layer:ZT};function KT(){const[t,i]=C.useState(!1);return d.jsx("div",{className:"absolute bottom-4 right-4 z-10",children:d.jsxs("div",{className:Se("bg-card border border-border rounded-xl backdrop-blur-sm transition-all duration-300 overflow-hidden shadow-xl",t?"w-[260px]":"w-auto"),children:[d.jsxs("button",{onClick:()=>i(!t),className:"flex items-center gap-2.5 px-4 py-3 text-xs text-muted-foreground hover:text-foreground transition-colors w-full cursor-pointer focus:outline-none",children:[d.jsx("div",{className:"p-1.5 rounded-lg bg-secondary",children:d.jsx(rc,{className:"w-3.5 h-3.5"})}),d.jsx("span",{className:"font-medium",children:"Memory Layers"}),d.jsx(dv,{className:Se("w-4 h-4 ml-auto text-muted-foreground/60 transition-transform duration-200",t&&"rotate-180")})]}),t&&d.jsxs("div",{className:"px-4 pb-4 space-y-2.5 text-[10px] border-t border-border pt-3",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Vl,{className:"w-3 h-3 text-purple-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Core memory (MEMORY.md, SOUL.md, daily logs)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(_c,{className:"w-3 h-3 text-emerald-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Session transcripts (.jsonl)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(pv,{className:"w-3 h-3 text-indigo-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Vector index (.sqlite)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(wh,{className:"w-3 h-3 text-blue-400"}),d.jsx("span",{className:"text-muted-foreground",children:"AI config (CLAUDE.md, .cursorrules)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(uv,{className:"w-3 h-3 text-blue-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Knowledge base (README, RUNBOOK)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(ov,{className:"w-3 h-3 text-indigo-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Telemetry logs (.csv)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(sv,{className:"w-3 h-3 text-pink-400"}),d.jsx("span",{className:"text-muted-foreground",children:"Compressed archive"})]})]})]})})}function FT({nodeData:t,onClose:i}){if(!t)return null;const l=t.IconComponent;return d.jsx("div",{className:"absolute top-4 right-4 z-10 animate-in fade-in slide-in-from-right-2 duration-200",children:d.jsxs("div",{className:"w-[300px] bg-zinc-900/95 border rounded-2xl backdrop-blur-md shadow-xl overflow-hidden",style:{borderColor:`hsl(${t.color} / 0.4)`},children:[d.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[d.jsx("div",{className:"p-2 rounded-xl",style:{background:`linear-gradient(135deg, hsl(${t.color} / 0.2), hsl(${t.color} / 0.05))`,border:`1px solid hsl(${t.color} / 0.25)`},children:d.jsx(l,{className:"w-4 h-4",style:{color:`hsl(${t.color})`}})}),d.jsx("h3",{className:"flex-1 text-[14px] font-semibold text-card-foreground",children:t.label}),d.jsx("button",{onClick:i,className:"p-1.5 -mr-1 rounded-lg text-muted-foreground hover:text-foreground hover:bg-secondary transition-colors cursor-pointer",children:d.jsx(jc,{className:"w-4 h-4"})})]}),d.jsxs("div",{className:"px-4 pb-4 space-y-3",children:[d.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed",children:t.description}),t.path&&d.jsxs("div",{className:"p-2.5 rounded-lg bg-secondary/50 border border-border/50",children:[d.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Path"}),d.jsx("p",{className:"text-[11px] font-mono text-foreground mt-0.5 truncate",children:t.path})]}),t.files&&t.files.length>0&&d.jsxs("div",{className:"space-y-1.5",children:[d.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Files"}),d.jsx("div",{className:"space-y-1 max-h-[120px] overflow-y-auto",children:t.files.map((r,s)=>d.jsxs("div",{className:"flex items-center justify-between p-1.5 rounded bg-secondary/30 border border-border/30",children:[d.jsx("span",{className:"text-[10px] font-mono text-foreground truncate flex-1",children:r.name}),r.size&&d.jsx("span",{className:"text-[9px] text-muted-foreground ml-2 shrink-0",children:an(r.size)})]},s))})]}),t.fileCount!==void 0&&t.fileCount>0&&d.jsxs("div",{className:"flex items-center justify-between p-2.5 rounded-lg bg-secondary/50 border border-border/50",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Files"}),d.jsx("p",{className:"text-sm font-semibold text-foreground",children:t.fileCount})]}),t.size!==void 0&&t.size>0&&d.jsxs("div",{className:"text-right",children:[d.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Size"}),d.jsx("p",{className:"text-sm font-mono text-foreground",children:an(t.size)})]})]})]})]})})}function PT(){return d.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:d.jsxs("div",{className:"text-center max-w-md",children:[d.jsx("div",{className:"mx-auto w-16 h-16 rounded-2xl bg-muted/50 border border-border flex items-center justify-center mb-6",children:d.jsx(Ki,{className:"w-8 h-8 text-muted-foreground/60"})}),d.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"No files found"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-4 leading-relaxed",children:"Configure a memory source path in Settings to visualize your memory architecture."}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"The app auto-discovers .md files, logs, archives, and scripts."})]})})}function IT(){const{data:t,loading:i}=Ac(),{config:l}=jv(),{agentName:r}=Ma(),[s,c]=C.useState(null),u=C.useMemo(()=>t?GT(t,l):[],[t,l]),h=u.length>0,g=C.useCallback((_,E)=>{c(j=>j===E.id?null:E.id)},[]),p=C.useCallback(()=>{c(null)},[]),{nodes:y,edges:x}=C.useMemo(()=>{const _=[],E=[],j={};u.forEach(L=>{const U=L.depth;j[U]||(j[U]=[]),j[U].push(L)});const R=Object.keys(j).map(Number).sort((L,U)=>L-U),N=250,A=160;let z=0;_.push({id:"input",type:"layer",position:{x:400,y:z},data:{label:"User Input",description:"Query triggers memory retrieval",color:"var(--accent-indigo)",IconComponent:OE,isFirst:!0,isExpanded:s==="input"}}),z+=A;let k=["input"];return R.forEach(L=>{const U=j[L],K=400-(U.length-1)*N/2,ie=[];U.forEach((G,Q)=>{const te=K+Q*N,D=G.id;ie.push(D),_.push({id:D,type:"layer",position:{x:te,y:z},data:{label:G.label,description:G.description,color:G.color,IconComponent:G.icon,fileCount:G.files.length,size:G.totalSize,path:G.path,files:G.files.slice(0,6),isExpanded:s===D,layerType:G.type}}),k.forEach(Z=>{E.push({id:`e-${Z}-${D}`,source:Z,target:D,animated:!0,style:{stroke:"url(#edge-gradient)",strokeWidth:1.5}})})}),k=ie,z+=A}),_.push({id:"output",type:"layer",position:{x:400,y:z},data:{label:"Response",description:"Context-enriched output",color:"var(--accent-pink)",IconComponent:_v,isLast:!0,isExpanded:s==="output"}}),k.forEach(L=>{E.push({id:`e-${L}-output`,source:L,target:"output",animated:!0,style:{stroke:"url(#edge-gradient)",strokeWidth:1.5}})}),{nodes:_,edges:E}},[u,s]),v=C.useMemo(()=>{if(!s)return null;const _=y.find(E=>E.id===s);return(_==null?void 0:_.data)??null},[s,y]);if(!i&&!h)return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsx("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-violet-500/20 to-purple-600/20 border border-violet-500/30",children:d.jsx(qd,{className:"w-5 h-5 text-violet-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:r?`${r}'s Memory Architecture`:"Agent Memory Architecture"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Visualize your memory structure"})]})]})}),d.jsx(PT,{})]});const w=u.reduce((_,E)=>_+E.files.length,0),S=u.reduce((_,E)=>_+E.totalSize,0);return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-violet-500/20 to-purple-600/20 border border-violet-500/30",children:d.jsx(qd,{className:"w-5 h-5 text-violet-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Memory Architecture"}),d.jsxs("p",{className:"text-xs text-muted-foreground/70",children:[u.length," layers · ",w," files ·"," ",an(S)]})]})]}),d.jsx("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground/60",children:d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx(t4,{className:"w-3 h-3"}),d.jsxs("span",{children:["Depth: ",Math.max(...u.map(_=>_.depth))+1]})]})})]}),d.jsxs("div",{className:"flex-1 relative",children:[d.jsx("svg",{style:{position:"absolute",width:0,height:0},children:d.jsx("defs",{children:d.jsxs("linearGradient",{id:"edge-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"0",y2:"1000",children:[d.jsx("stop",{offset:"0%",stopColor:"#6366f1",stopOpacity:"0.5"}),d.jsx("stop",{offset:"50%",stopColor:"#a855f7",stopOpacity:"0.3"}),d.jsx("stop",{offset:"100%",stopColor:"#ec4899",stopOpacity:"0.5"})]})})}),d.jsx(xT,{nodes:y,edges:x,nodeTypes:QT,onNodeClick:g,onPaneClick:p,fitView:!0,fitViewOptions:{padding:.2},proOptions:{hideAttribution:!0},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!0,panOnDrag:!0,zoomOnScroll:!0,preventScrolling:!1,minZoom:.4,maxZoom:1.5,children:d.jsx(ST,{color:"hsl(var(--muted-foreground))",gap:32,size:1,style:{opacity:.08}})}),d.jsx(KT,{}),d.jsx(FT,{nodeData:v,onClose:()=>c(null)})]})]})}const JT=/(\d{4}-\d{2}-\d{2})/;function pb(t,i,l,r=[]){for(const s of t){if(s.type==="file"){const c=s.name.match(JT);c&&r.push({name:s.name,path:`${i}/${s.path}`,size:s.size,source:l,date:c[1]})}s.children&&pb(s.children,i,l,r)}return r}function WT(t){const i={};for(const l of t)i[l.date]||(i[l.date]={date:l.date,files:[]}),i[l.date].files.push({name:l.name,path:l.path,size:l.size,source:l.source});return Object.values(i).sort((l,r)=>r.date.localeCompare(l.date))}function eM(t){return new Date(t+"T00:00:00").toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})}function tM(t){return t===new Date().toISOString().split("T")[0]}function nM(t){const i=new Date;return i.setDate(i.getDate()-1),t===i.toISOString().split("T")[0]}function iM(){return d.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:d.jsxs("div",{className:"text-center max-w-md",children:[d.jsx("div",{className:"mx-auto w-16 h-16 rounded-2xl bg-muted/50 border border-border flex items-center justify-center mb-6",children:d.jsx(fv,{className:"w-8 h-8 text-muted-foreground/60"})}),d.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"No temporal files found"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-4 leading-relaxed",children:"This view shows files with dates in their names (e.g., 2024-01-15.md daily logs)."}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"OpenClaw daily logs and dated session files will appear here automatically."})]})})}function aM(){const{data:t,loading:i}=Ac(),l=C.useMemo(()=>{if(!t)return[];const s=[];return Object.entries(t).forEach(([c,u])=>{if(!u)return;const h=u.path||`~/${c}`;pb(u.tree,h,c,s)}),WT(s)},[t]),r=l.reduce((s,c)=>s+c.files.length,0);return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsx("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-cyan-500/20 to-blue-600/20 border border-cyan-500/30",children:d.jsx(mv,{className:"w-5 h-5 text-cyan-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Timeline"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:i?"Loading...":l.length>0?`${l.length} days · ${r} files`:"Chronological file history"})]})]})}),!i&&l.length===0?d.jsx(iM,{}):d.jsx("div",{className:"flex-1 overflow-auto",children:d.jsx("div",{className:"max-w-2xl mx-auto py-6 px-6",children:d.jsx("div",{className:"relative",children:l.map((s,c)=>{const u=tM(s.date),h=nM(s.date),g=s.files.reduce((p,y)=>p+(y.size||0),0);return d.jsxs("div",{className:"relative flex gap-6 pb-8",children:[c<l.length-1&&d.jsx("div",{className:"absolute left-[15px] top-10 bottom-0 w-px bg-border/60"}),d.jsx("div",{className:"relative shrink-0 mt-1",children:d.jsx("div",{className:`w-[30px] h-[30px] rounded-full border-2 flex items-center justify-center ${u?"border-cyan-500 bg-cyan-500/20":h?"border-blue-500/60 bg-blue-500/10":"border-border bg-secondary/50"}`,children:d.jsx(fv,{className:`w-3.5 h-3.5 ${u?"text-cyan-400":h?"text-blue-400":"text-muted-foreground"}`})})}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[d.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u?"Today":h?"Yesterday":eM(s.date)}),(u||h)&&d.jsx("span",{className:"text-[10px] text-muted-foreground",children:s.date}),d.jsxs(Zr,{variant:"outline",className:"text-[10px] ml-auto",children:[s.files.length," ",s.files.length===1?"file":"files",g>0&&` · ${an(g)}`]})]}),d.jsx("div",{className:"space-y-2",children:s.files.map((p,y)=>d.jsx(bt,{className:"p-3 bg-card hover:bg-secondary/30 transition-colors",children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(ao,{className:"w-4 h-4 text-muted-foreground/60 shrink-0"}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-xs font-mono text-foreground truncate",children:p.name}),d.jsx("p",{className:"text-[10px] text-muted-foreground truncate mt-0.5",children:p.source})]}),p.size!==void 0&&p.size>0&&d.jsx("span",{className:"text-[10px] text-muted-foreground font-mono tabular-nums shrink-0",children:an(p.size)})]})},y))})]})]},s.date)})})})})]})}const lM={search_optimizer:{icon:XE,color:"text-blue-400",description:"Finds the most relevant memories for your query"},pattern_recognizer:{icon:Sv,color:"text-violet-400",description:"Identifies patterns and connections across memories"},memory_intelligence:{icon:Vl,color:"text-pink-400",description:"Analyzes and ranks memory importance"},context_builder:{icon:jE,color:"text-amber-400",description:"Assembles context from multiple memory sources"},archive_manager:{icon:mE,color:"text-emerald-400",description:"Manages long-term memory storage and retrieval"}};function gb(t){const i=t.replace(".csv","");return lM[i]||{icon:gv,color:"text-zinc-400",description:"Agent activity log"}}function rM({filename:t}){const i=gb(t),l=i.icon,r=t.replace(".csv","").replace(/_/g," ");return d.jsx("div",{className:"h-full flex items-center justify-center p-6",children:d.jsxs("div",{className:"max-w-sm text-center",children:[d.jsx("div",{className:Se("inline-flex p-4 rounded-2xl bg-zinc-800/50 mb-4"),children:d.jsx(l,{className:Se("w-8 h-8",i.color)})}),d.jsx("h3",{className:"text-sm font-medium text-foreground capitalize mb-2",children:r}),d.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:i.description}),d.jsx("div",{className:"p-3 rounded-lg bg-zinc-800/30 border border-zinc-800",children:d.jsx("p",{className:"text-[11px] text-muted-foreground/70",children:"No activity recorded yet. This agent will log entries here when it runs during a Claude session with memory-swarm."})})]})})}function oM({entries:t}){return t.length===0?null:d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full text-xs",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"text-left border-b border-border bg-zinc-900/50 sticky top-0",children:[d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"When the action occurred",children:"Time"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"Which AI agent performed this action",children:"Agent"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"What the agent did (read, write, search, etc.)",children:"Action"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"The file or resource that was accessed",children:"Target"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"AI tokens consumed for this operation",children:"Tokens"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"How long the operation took",children:"Latency"}),d.jsx("th",{className:"px-4 py-3 font-medium text-muted-foreground",title:"Whether the operation succeeded",children:"Status"})]})}),d.jsx("tbody",{className:"font-mono",children:t.map((i,l)=>d.jsxs("tr",{className:"border-b border-border/50 hover:bg-muted/50",children:[d.jsx("td",{className:"px-4 py-2 text-muted-foreground",children:i.timestamp}),d.jsx("td",{className:"px-4 py-2 text-foreground",children:i.agent_name}),d.jsx("td",{className:"px-4 py-2 text-muted-foreground",children:i.action_type}),d.jsx("td",{className:"px-4 py-2 text-muted-foreground max-w-48 truncate",children:i.target_file||"-"}),d.jsx("td",{className:"px-4 py-2 text-muted-foreground tabular-nums",children:i.tokens_used||"-"}),d.jsx("td",{className:"px-4 py-2 text-muted-foreground tabular-nums",children:i.latency_ms?`${i.latency_ms}ms`:"-"}),d.jsx("td",{className:"px-4 py-2",children:i.success==="true"?d.jsx(Zr,{variant:"success",children:"OK"}):i.success==="false"?d.jsx(Zr,{variant:"error",title:i.error_message,children:"Error"}):d.jsx("span",{className:"text-muted-foreground",children:"-"})})]},l))})]})})}function sM(){const{logs:t,loading:i,error:l,logsPath:r}=b4(),[s,c]=C.useState(null),u=s?t.find(g=>g.file===s):t[0],h=t.reduce((g,p)=>g+p.entries.length,0);return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-gradient-to-br from-emerald-500/20 to-teal-600/20 border border-emerald-500/30",children:d.jsx(_c,{className:"w-5 h-5 text-emerald-400"})}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Agent Activity Logs"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"CSV logs from memory-swarm showing what AI agents did during sessions"})]})]}),d.jsxs("div",{className:"flex items-center gap-4",children:[r&&d.jsx("code",{className:"text-xs text-muted-foreground/70 font-mono bg-zinc-800/50 px-2 py-1 rounded",children:r}),t.length>0&&d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(ao,{className:"w-3.5 h-3.5"}),d.jsxs("span",{className:"tabular-nums",children:[t.length," files"]}),d.jsx("span",{className:"text-muted-foreground/50",children:"·"}),d.jsxs("span",{className:"tabular-nums",children:[h," entries"]})]})]})]}),i&&!t.length&&d.jsx("div",{className:"p-6",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading logs..."})}),l&&d.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:d.jsxs(bt,{className:"max-w-md p-6 bg-zinc-900/50",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("div",{className:"p-2 rounded-lg bg-amber-500/10 border border-amber-500/20",children:d.jsx(rc,{className:"w-5 h-5 text-amber-400"})}),d.jsx("h2",{className:"text-sm font-medium text-foreground",children:"Logs Directory Not Found"})]}),d.jsx("p",{className:"text-xs text-muted-foreground mb-4 leading-relaxed",children:l}),d.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Agent activity logs are CSV files created by memory-swarm during Claude sessions. They track what AI agents read, wrote, and searched."})]})}),!l&&t.length>0&&d.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[d.jsxs("div",{className:"w-64 border-r border-border overflow-auto py-2 bg-zinc-950/30",children:[d.jsx("div",{className:"px-4 py-2 mb-1",children:d.jsx("p",{className:"text-[10px] uppercase tracking-wider text-muted-foreground/50 font-medium",children:"Memory Swarm Agents"})}),t.map(g=>{var v;const p=gb(g.file),y=p.icon,x=(s||((v=t[0])==null?void 0:v.file))===g.file;return d.jsx("button",{onClick:()=>c(g.file),className:Se("w-full px-4 py-3 text-left cursor-pointer transition-colors",x?"bg-zinc-800/80":"hover:bg-zinc-800/40"),children:d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(y,{className:Se("w-4 h-4",p.color)}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:Se("text-xs font-medium truncate",x?"text-foreground":"text-muted-foreground"),children:g.file.replace(".csv","").replace(/_/g," ")}),d.jsx("span",{className:Se("text-[10px] tabular-nums",g.entries.length>0?"text-emerald-400":"text-zinc-600"),children:g.entries.length})]}),d.jsx("p",{className:"text-[10px] text-muted-foreground/60 truncate mt-0.5",children:p.description})]})]})},g.file)})]}),d.jsx("div",{className:"flex-1 overflow-auto",children:u&&u.entries.length>0?d.jsx(oM,{entries:u.entries}):u?d.jsx(rM,{filename:u.file}):d.jsx("div",{className:"p-6",children:d.jsx("p",{className:"text-sm text-muted-foreground",children:"Select an agent to view activity"})})})]}),!l&&!i&&t.length===0&&d.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:d.jsxs(bt,{className:"max-w-md p-6 bg-zinc-900/50",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[d.jsx("div",{className:"p-2 rounded-lg bg-zinc-800",children:d.jsx(rc,{className:"w-5 h-5 text-zinc-400"})}),d.jsx("h2",{className:"text-sm font-medium text-foreground",children:"What are Agent Logs?"})]}),d.jsx("p",{className:"text-xs text-muted-foreground mb-4 leading-relaxed",children:"When you use Claude with memory-swarm, it creates CSV files that record every action the AI agents take - like reading files, searching memories, or writing summaries."}),d.jsxs("div",{className:"space-y-2 mb-4",children:[d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(yh,{className:"w-3.5 h-3.5 text-amber-400"}),d.jsxs("span",{children:[d.jsx("strong",{className:"text-foreground",children:"Agent"})," - Which AI agent performed the action"]})]}),d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(_v,{className:"w-3.5 h-3.5 text-pink-400"}),d.jsxs("span",{children:[d.jsx("strong",{className:"text-foreground",children:"Action"})," - What it did (read, write, search)"]})]}),d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(Vl,{className:"w-3.5 h-3.5 text-violet-400"}),d.jsxs("span",{children:[d.jsx("strong",{className:"text-foreground",children:"Tokens"})," - How much AI capacity it used"]})]})]}),d.jsxs("p",{className:"text-[10px] text-muted-foreground/70",children:["No logs found at ",d.jsx("code",{className:"bg-zinc-800 px-1 rounded",children:r||"memory-swarm/logs/"})]})]})})]})}function wy(t,i){if(typeof t=="function")return t(i);t!=null&&(t.current=i)}function $c(...t){return i=>{let l=!1;const r=t.map(s=>{const c=wy(s,i);return!l&&typeof c=="function"&&(l=!0),c});if(l)return()=>{for(let s=0;s<r.length;s++){const c=r[s];typeof c=="function"?c():wy(t[s],null)}}}}function pn(...t){return C.useCallback($c(...t),t)}var cM=Symbol.for("react.lazy"),yc=Vy[" use ".trim().toString()];function uM(t){return typeof t=="object"&&t!==null&&"then"in t}function xb(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===cM&&"_payload"in t&&uM(t._payload)}function fM(t){const i=hM(t),l=C.forwardRef((r,s)=>{let{children:c,...u}=r;xb(c)&&typeof yc=="function"&&(c=yc(c._payload));const h=C.Children.toArray(c),g=h.find(pM);if(g){const p=g.props.children,y=h.map(x=>x===g?C.Children.count(p)>1?C.Children.only(null):C.isValidElement(p)?p.props.children:null:x);return d.jsx(i,{...u,ref:s,children:C.isValidElement(p)?C.cloneElement(p,void 0,y):null})}return d.jsx(i,{...u,ref:s,children:c})});return l.displayName=`${t}.Slot`,l}var dM=fM("Slot");function hM(t){const i=C.forwardRef((l,r)=>{let{children:s,...c}=l;if(xb(s)&&typeof yc=="function"&&(s=yc(s._payload)),C.isValidElement(s)){const u=xM(s),h=gM(c,s.props);return s.type!==C.Fragment&&(h.ref=r?$c(r,u):u),C.cloneElement(s,h)}return C.Children.count(s)>1?C.Children.only(null):null});return i.displayName=`${t}.SlotClone`,i}var mM=Symbol("radix.slottable");function pM(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===mM}function gM(t,i){const l={...i};for(const r in i){const s=t[r],c=i[r];/^on[A-Z]/.test(r)?s&&c?l[r]=(...h)=>{const g=c(...h);return s(...h),g}:s&&(l[r]=s):r==="style"?l[r]={...s,...c}:r==="className"&&(l[r]=[s,c].filter(Boolean).join(" "))}return{...t,...l}}function xM(t){var r,s;let i=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,l=i&&"isReactWarning"in i&&i.isReactWarning;return l?t.ref:(i=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=i&&"isReactWarning"in i&&i.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}const yM=Ah("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium cursor-pointer transition-all duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 active:scale-[0.98]",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-md hover:bg-primary/90 hover:shadow-lg hover:-translate-y-0.5",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 hover:shadow-md",outline:"border border-border bg-background shadow-sm hover:bg-secondary hover:text-foreground hover:border-foreground/20",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 hover:shadow-md",ghost:"hover:bg-accent/80 hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",glow:"bg-violet-600 text-white hover:bg-violet-500 transition-colors"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-11 rounded-xl px-8 text-base",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ri=C.forwardRef(({className:t,variant:i,size:l,asChild:r=!1,...s},c)=>{const u=r?dM:"button";return d.jsx(u,{className:Se(yM({variant:i,size:l,className:t})),ref:c,...s})});ri.displayName="Button";function vM(){const{entries:t,isPaused:i,togglePause:l,clearLog:r}=jh(),{sources:s,toggleSource:c,resetOnboarding:u}=Ma(),[h,g]=C.useState(!1),p=h?t:t.slice(0,20),y=s.filter(v=>v.enabled),x=()=>{const v=x4(t),w=new Blob([v],{type:"text/csv"}),S=URL.createObjectURL(w),_=document.createElement("a");_.href=S,_.download=`openclaw-memory-mapper-audit-${new Date().toISOString().split("T")[0]}.csv`,_.click(),URL.revokeObjectURL(S)};return d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(qr,{className:"w-5 h-5 text-emerald-400"}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Security & Privacy"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Monitor all file access activity"})]})]}),d.jsx(ri,{variant:i?"glow":"outline",size:"sm",onClick:l,className:Se(i?"bg-red-500/20 border-red-500/30 text-red-400 hover:bg-red-500/30":"hover:bg-primary/10 hover:border-primary/30 hover:text-primary"),children:i?d.jsxs(d.Fragment,{children:[d.jsx(ox,{className:"w-4 h-4 mr-1"}),"Paused - Resume"]}):d.jsxs(d.Fragment,{children:[d.jsx(qr,{className:"w-4 h-4 mr-1"}),"Pause All Access"]})})]}),d.jsxs("div",{className:"flex-1 overflow-auto p-6 space-y-6",children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[d.jsx(Ld,{icon:Ev,title:"Network Status",status:"Local Only",description:"localhost:3001",variant:"success"}),d.jsx(Ld,{icon:vh,title:"Access Mode",status:"Read-Only",description:"Files are never modified",variant:"success"}),d.jsx(Ld,{icon:ZE,title:"Data Storage",status:"Local Only",description:"Nothing uploaded",variant:"success"})]}),d.jsxs(bt,{className:"p-5 bg-card",children:[d.jsx("div",{className:"flex items-center justify-between mb-4",children:d.jsxs("h2",{className:"text-sm font-medium text-foreground flex items-center gap-2",children:[d.jsx(bv,{className:"w-4 h-4 text-muted-foreground"}),"Active Permissions"]})}),d.jsx("div",{className:"space-y-2",children:s.map(v=>d.jsxs("div",{className:Se("flex items-center justify-between p-3 rounded-lg border transition-colors",v.enabled?"bg-emerald-500/5 border-emerald-500/20":"bg-secondary/50 border-border"),children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(Ki,{className:Se("w-4 h-4",v.enabled?"text-emerald-500":"text-muted-foreground")}),d.jsxs("div",{children:[d.jsx("span",{className:"text-sm font-mono text-foreground",children:v.path}),d.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:"READ-ONLY"})]})]}),d.jsx(ri,{variant:"ghost",size:"sm",onClick:()=>c(v.id),className:Se("text-xs",v.enabled?"text-red-500 hover:text-red-600 hover:bg-red-500/10":"text-emerald-500 hover:text-emerald-600 hover:bg-emerald-500/10"),children:v.enabled?"Revoke":"Grant"})]},v.id))}),y.length===0&&d.jsx("div",{className:"mt-4 p-4 rounded-xl bg-red-500/10 border border-red-500/20",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(ox,{className:"w-5 h-5 text-red-400 shrink-0 mt-0.5"}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-red-400 mb-1",children:"All Access Disabled"}),d.jsx("p",{className:"text-xs text-red-400/70 mb-3",children:i?"Access is paused and all permissions are revoked. The app cannot function.":"All permissions revoked. The app cannot access any files."}),d.jsx(ri,{variant:"outline",size:"sm",onClick:()=>u(),className:"text-red-400 border-red-500/30 hover:bg-red-500/10",children:"Reconfigure Sources"})]})]})})]}),d.jsxs(bt,{className:"p-5 bg-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-4",children:[d.jsxs("h2",{className:"text-sm font-medium text-foreground flex items-center gap-2",children:[d.jsx(ao,{className:"w-4 h-4 text-muted-foreground"}),"Activity Log",d.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",t.length," entries)"]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(ri,{variant:"ghost",size:"sm",onClick:x,disabled:t.length===0,className:"text-xs",children:[d.jsx(tE,{className:"w-3.5 h-3.5 mr-1"}),"Export CSV"]}),d.jsxs(ri,{variant:"ghost",size:"sm",onClick:r,disabled:t.length===0,className:"text-xs text-red-400 hover:text-red-300 hover:bg-red-500/10",children:[d.jsx(Nv,{className:"w-3.5 h-3.5 mr-1"}),"Clear"]})]})]}),i&&d.jsx("div",{className:"mb-4 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20",children:d.jsxs("p",{className:"text-sm text-amber-400 flex items-center gap-2",children:[d.jsx(iE,{className:"w-4 h-4"}),"Logging paused. File access is disabled."]})}),t.length===0?d.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No activity recorded yet. Browse files to see access logs."}):d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"space-y-1 max-h-[400px] overflow-auto",children:p.map(v=>d.jsx(bM,{entry:v},v.id))}),t.length>20&&d.jsx(ri,{variant:"ghost",size:"sm",onClick:()=>g(!h),className:"w-full mt-3 text-xs",children:h?"Show less":`Show all ${t.length} entries`})]})]}),d.jsxs("div",{className:"p-4 rounded-xl bg-secondary/50 border border-border",children:[d.jsxs("h3",{className:"text-sm font-medium text-foreground mb-2 flex items-center gap-2",children:[d.jsx(qr,{className:"w-4 h-4 text-emerald-400"}),"Security Guarantees"]}),d.jsxs("ul",{className:"space-y-1.5 text-xs text-muted-foreground",children:[d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx(An,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),d.jsx("span",{children:"All data stays on your machine. Nothing is ever uploaded or transmitted."})]}),d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx(An,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),d.jsx("span",{children:"Read-only access. Files are never created, modified, or deleted."})]}),d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx(An,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),d.jsx("span",{children:"No analytics, telemetry, or tracking of any kind."})]}),d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx(An,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),d.jsx("span",{children:"Open source. Audit the code yourself on GitHub."})]})]})]})]})]})}function Ld({icon:t,title:i,status:l,description:r,variant:s}){const c={success:"border-emerald-500/20 bg-emerald-500/5",warning:"border-amber-500/20 bg-amber-500/5",error:"border-red-500/20 bg-red-500/5"},u={success:"text-emerald-400",warning:"text-amber-400",error:"text-red-400"};return d.jsx(bt,{className:Se("p-4",c[s]),children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:"p-2 rounded-lg bg-secondary/50",children:d.jsx(t,{className:Se("w-4 h-4",u[s])})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-muted-foreground",children:i}),d.jsx("p",{className:Se("text-sm font-medium",u[s]),children:l}),d.jsx("p",{className:"text-xs text-muted-foreground/70 mt-0.5",children:r})]})]})})}function bM({entry:t}){const i=new Date(t.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),l={READ:"text-blue-500 dark:text-blue-400 bg-blue-500/10",LIST:"text-amber-500 dark:text-amber-400 bg-amber-500/10",STAT:"text-muted-foreground bg-secondary/50"};return d.jsxs("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg hover:bg-secondary/50 transition-colors text-xs",children:[d.jsx("span",{className:"text-muted-foreground/50 font-mono w-20 shrink-0",children:i}),d.jsx("span",{className:Se("px-1.5 py-0.5 rounded text-[10px] font-medium uppercase w-12 text-center shrink-0",l[t.type]),children:t.type}),d.jsx("span",{className:"font-mono text-muted-foreground truncate flex-1",children:t.path}),t.success?d.jsx(An,{className:"w-3.5 h-3.5 text-emerald-400 shrink-0"}):d.jsx(jc,{className:"w-3.5 h-3.5 text-red-400 shrink-0"})]})}function wM(){const[t,i]=C.useState(0),{sources:l,setSources:r,toggleSource:s,updateSourcePath:c,completeOnboarding:u,addSource:h,removeSource:g,agentName:p,setAgentName:y}=Ma(),[x,v]=C.useState(!1),w=C.useCallback(async()=>{v(!0);try{const A=Ma.getState().sources,z=await Promise.all(A.map(async k=>{try{const L=await fetch(`/api/check-path?path=${encodeURIComponent(k.path)}`);if(L.ok){const U=await L.json();return{...k,detected:U.exists,name:U.exists?U.expandedPath:k.name}}}catch{}return{...k,detected:!1}}));r(z)}catch{}v(!1)},[r]),S=A=>{i(A),A===2&&setTimeout(w,0)},_=l.filter(A=>A.enabled&&A.detected),E=[{title:"Welcome",component:d.jsx(SM,{})},{title:"Name",component:d.jsx(NM,{agentName:p,onChangeName:y})},{title:"Configure",component:d.jsx(EM,{sources:l,onToggle:s,onUpdatePath:c,detecting:x,onRedetect:w,onAddSource:h,onRemoveSource:g})},{title:"Review",component:d.jsx(jM,{sources:_})}],j=t===0||t===1||t===2&&_.length>0||t===3,R=()=>{t<E.length-1?S(t+1):u()},N=()=>{t>0&&S(t-1)};return d.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-8",children:d.jsxs("div",{className:"w-full max-w-lg",children:[d.jsx("div",{className:"flex items-center justify-center gap-2 mb-8",children:E.map((A,z)=>d.jsxs("div",{className:"flex items-center",children:[d.jsx("div",{className:Se("w-8 h-8 rounded-full flex items-center justify-center text-xs font-medium transition-all",z<t&&"bg-emerald-500/20 text-emerald-400",z===t&&"bg-violet-500/20 text-violet-400 ring-2 ring-violet-500/50",z>t&&"bg-secondary text-muted-foreground"),children:z<t?d.jsx(An,{className:"w-4 h-4"}):z+1}),z<E.length-1&&d.jsx("div",{className:Se("w-12 h-0.5 mx-2 transition-colors",z<t?"bg-emerald-500/50":"bg-secondary")})]},z))}),d.jsxs(bt,{className:"p-8 bg-card border-border",children:[E[t].component,d.jsxs("div",{className:"flex items-center justify-between mt-8 pt-6 border-t border-border",children:[d.jsxs(ri,{variant:"ghost",onClick:N,disabled:t===0,className:Se(t===0&&"invisible"),children:[d.jsx(GN,{className:"w-4 h-4 mr-1"}),"Back"]}),d.jsx(ri,{variant:"glow",onClick:R,disabled:!j,children:t===E.length-1?"Get Started":"Continue"})]})]}),d.jsxs("p",{className:"text-center text-xs text-zinc-600 mt-6",children:["OpenClaw Memory Mapper v","1.2.0"," · Open Source"]})]})})}function SM(){return d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"inline-flex p-4 rounded-2xl bg-gradient-to-br from-violet-500/20 to-purple-600/20 border border-violet-500/30 mb-6",children:d.jsx(Vl,{className:"w-10 h-10 text-violet-400"})}),d.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Memory Mapper"}),d.jsx("p",{className:"text-muted-foreground mb-8",children:"Visualize your Claude agent's memory architecture"}),d.jsxs("div",{className:"grid gap-4 text-left",children:[d.jsx(Hd,{icon:qr,title:"100% Local",description:"All data stays on your machine. Nothing is ever uploaded.",color:"emerald"}),d.jsx(Hd,{icon:vh,title:"Read-Only",description:"We only read files. Your memory data is never modified.",color:"blue"}),d.jsx(Hd,{icon:Sh,title:"No Telemetry",description:"Zero tracking, analytics, or external connections.",color:"amber"})]})]})}function NM({agentName:t,onChangeName:i}){return d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"inline-flex p-4 rounded-2xl bg-gradient-to-br from-amber-500/20 to-orange-600/20 border border-amber-500/30 mb-6",children:d.jsx(Sv,{className:"w-10 h-10 text-amber-400"})}),d.jsx("h2",{className:"text-2xl font-semibold text-foreground mb-2",children:"Name Your Agent"}),d.jsx("p",{className:"text-muted-foreground mb-8",children:"Give your agent a name to personalize the experience. You can skip this."}),d.jsx("input",{type:"text",value:t,onChange:l=>i(l.target.value),placeholder:"e.g., Atlas, Sage, Nova...",className:"w-full bg-secondary border border-border rounded-xl px-4 py-3 text-center text-lg font-medium text-foreground focus:outline-none focus:border-violet-500 focus:ring-2 focus:ring-violet-500/20 placeholder:text-muted-foreground/40 transition-all",maxLength:32}),d.jsx("p",{className:"text-xs text-muted-foreground/60 mt-3",children:t?`"${t}'s Memory Architecture"`:'Leave blank to use "Agent Memory Architecture"'})]})}function Hd({icon:t,title:i,description:l,color:r}){const s={emerald:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20",blue:"bg-blue-500/10 text-blue-400 border-blue-500/20",amber:"bg-amber-500/10 text-amber-400 border-amber-500/20"};return d.jsxs("div",{className:"flex items-start gap-4 p-4 rounded-xl bg-secondary/30 border border-border",children:[d.jsx("div",{className:Se("p-2 rounded-lg border",s[r]),children:d.jsx(t,{className:"w-4 h-4"})}),d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-medium text-foreground",children:i}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:l})]})]})}function EM({sources:t,onToggle:i,onUpdatePath:l,detecting:r,onRedetect:s,onAddSource:c,onRemoveSource:u}){const[h,g]=C.useState(null),p=()=>{const y=c();g(y)};return d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"Configure Sources"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Select which memory directories to visualize. Click paths to edit."}),d.jsx("div",{className:"space-y-3",children:t.map(y=>d.jsx(_M,{source:y,onToggle:()=>i(y.id),onUpdatePath:x=>{l(y.id,x),setTimeout(s,10)},onRemove:()=>u(y.id),detecting:r,isEditing:h===y.id,onStartEdit:()=>g(y.id),onEndEdit:()=>g(null),canRemove:t.length>1},y.id))}),d.jsxs("button",{onClick:p,className:"mt-3 w-full flex items-center justify-center gap-2 p-3 rounded-xl border border-dashed border-border text-muted-foreground hover:text-foreground hover:border-violet-500/50 transition-colors",children:[d.jsx(BE,{className:"w-4 h-4"}),d.jsx("span",{className:"text-sm",children:"Add custom path"})]}),r&&d.jsxs("p",{className:"text-xs text-muted-foreground mt-4 flex items-center gap-2",children:[d.jsx("div",{className:"w-3 h-3 border-2 border-violet-400 border-t-transparent rounded-full animate-spin"}),"Detecting memory directories..."]}),!r&&t.length===0&&d.jsxs("div",{className:"mt-4 p-4 rounded-xl bg-blue-500/10 border border-blue-500/20",children:[d.jsx("p",{className:"text-sm text-blue-400 leading-relaxed",children:"Add a custom path to your agent's memory folder."}),d.jsx("p",{className:"text-xs text-blue-400/60 mt-1 font-mono",children:"e.g. ~/my-memory"})]}),!r&&t.length>0&&t.every(y=>!y.detected)&&d.jsx("div",{className:"mt-4 p-4 rounded-xl bg-amber-500/10 border border-amber-500/20",children:d.jsx("p",{className:"text-sm text-amber-400",children:"No paths found. Click the path text to edit, or make sure the API server is running."})})]})}function _M({source:t,onToggle:i,onUpdatePath:l,onRemove:r,detecting:s,isEditing:c,onStartEdit:u,onEndEdit:h,canRemove:g}){const[p,y]=C.useState(t.path),x=s?bh:t.detected?gE:bE,v=()=>{l(p),h()},w=S=>{S.key==="Enter"?v():S.key==="Escape"&&(y(t.path),h())};return d.jsxs("div",{className:Se("w-full flex items-center gap-4 p-4 rounded-xl border transition-all",t.enabled&&t.detected?"bg-violet-500/10 border-violet-500/30":"bg-secondary/30 border-border"),children:[d.jsx("button",{onClick:i,disabled:!t.detected,className:Se("w-5 h-5 rounded-md border-2 flex items-center justify-center transition-colors cursor-pointer",t.enabled&&t.detected?"bg-violet-500 border-violet-500":"border-border",!t.detected&&"opacity-50 cursor-not-allowed"),children:t.enabled&&t.detected&&d.jsx(An,{className:"w-3 h-3 text-white"})}),d.jsx(x,{className:Se("w-5 h-5 shrink-0",s&&"animate-pulse text-muted-foreground",!s&&t.detected&&"text-emerald-400",!s&&!t.detected&&"text-zinc-600")}),d.jsx("div",{className:"flex-1 min-w-0",children:c?d.jsx("input",{type:"text",value:p,onChange:S=>y(S.target.value),onBlur:v,onKeyDown:w,autoFocus:!0,placeholder:"Enter path to your memory folder...",className:"w-full bg-secondary border border-border rounded-md px-2 py-1 text-sm font-mono text-foreground focus:outline-none focus:border-violet-500 placeholder:text-muted-foreground/50"}):d.jsx("button",{onClick:u,className:"font-mono text-sm text-foreground hover:text-violet-400 transition-colors cursor-pointer truncate block w-full text-left",title:"Click to edit path",children:t.path||d.jsx("span",{className:"text-muted-foreground/50",children:"Click to enter path..."})})}),!s&&!c&&d.jsx("span",{className:Se("text-xs shrink-0",t.detected?"text-emerald-400":"text-zinc-600"),children:t.detected?"Found":"Not found"}),g&&!c&&d.jsx("button",{onClick:r,className:"p-1.5 rounded-md text-zinc-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",title:"Remove source",children:d.jsx(Nv,{className:"w-4 h-4"})})]})}function jM({sources:t}){return d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"Review Permissions"}),d.jsxs("p",{className:"text-sm text-muted-foreground mb-6",children:["Memory Mapper will have"," ",d.jsx("strong",{className:"text-foreground",children:"read-only"})," access to:"]}),d.jsx("div",{className:"space-y-3 mb-6",children:t.map(i=>d.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-xl bg-secondary/30 border border-border",children:[d.jsx(bh,{className:"w-5 h-5 text-violet-400"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("span",{className:"font-mono text-sm text-foreground",children:i.path}),d.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Memory files, logs, and configuration"})]}),d.jsx(An,{className:"w-4 h-4 text-emerald-400"})]},i.id))}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Bd,{icon:bv,text:"Data never leaves your machine"}),d.jsx(Bd,{icon:vh,text:"Files are never modified or deleted"}),d.jsx(Bd,{icon:Sh,text:"No external network connections"})]})]})}function Bd({icon:t,text:i}){return d.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[d.jsx(t,{className:"w-3.5 h-3.5 text-emerald-500"}),d.jsx("span",{children:i})]})}function dt(t,i,{checkForDefaultPrevented:l=!0}={}){return function(s){if(t==null||t(s),l===!1||!s.defaultPrevented)return i==null?void 0:i(s)}}function Yc(t,i=[]){let l=[];function r(c,u){const h=C.createContext(u),g=l.length;l=[...l,u];const p=x=>{var j;const{scope:v,children:w,...S}=x,_=((j=v==null?void 0:v[t])==null?void 0:j[g])||h,E=C.useMemo(()=>S,Object.values(S));return d.jsx(_.Provider,{value:E,children:w})};p.displayName=c+"Provider";function y(x,v){var _;const w=((_=v==null?void 0:v[t])==null?void 0:_[g])||h,S=C.useContext(w);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${x}\` must be used within \`${c}\``)}return[p,y]}const s=()=>{const c=l.map(u=>C.createContext(u));return function(h){const g=(h==null?void 0:h[t])||c;return C.useMemo(()=>({[`__scope${t}`]:{...h,[t]:g}}),[h,g])}};return s.scopeName=t,[r,AM(s,...i)]}function AM(...t){const i=t[0];if(t.length===1)return i;const l=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const u=r.reduce((h,{useScope:g,scopeName:p})=>{const x=g(c)[`__scope${p}`];return{...h,...x}},{});return C.useMemo(()=>({[`__scope${i.scopeName}`]:u}),[u])}};return l.scopeName=i.scopeName,l}function CM(t){const i=TM(t),l=C.forwardRef((r,s)=>{const{children:c,...u}=r,h=C.Children.toArray(c),g=h.find(zM);if(g){const p=g.props.children,y=h.map(x=>x===g?C.Children.count(p)>1?C.Children.only(null):C.isValidElement(p)?p.props.children:null:x);return d.jsx(i,{...u,ref:s,children:C.isValidElement(p)?C.cloneElement(p,void 0,y):null})}return d.jsx(i,{...u,ref:s,children:c})});return l.displayName=`${t}.Slot`,l}function TM(t){const i=C.forwardRef((l,r)=>{const{children:s,...c}=l;if(C.isValidElement(s)){const u=RM(s),h=OM(c,s.props);return s.type!==C.Fragment&&(h.ref=r?$c(r,u):u),C.cloneElement(s,h)}return C.Children.count(s)>1?C.Children.only(null):null});return i.displayName=`${t}.SlotClone`,i}var MM=Symbol("radix.slottable");function zM(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===MM}function OM(t,i){const l={...i};for(const r in i){const s=t[r],c=i[r];/^on[A-Z]/.test(r)?s&&c?l[r]=(...h)=>{const g=c(...h);return s(...h),g}:s&&(l[r]=s):r==="style"?l[r]={...s,...c}:r==="className"&&(l[r]=[s,c].filter(Boolean).join(" "))}return{...t,...l}}function RM(t){var r,s;let i=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,l=i&&"isReactWarning"in i&&i.isReactWarning;return l?t.ref:(i=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=i&&"isReactWarning"in i&&i.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}var kM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Dt=kM.reduce((t,i)=>{const l=CM(`Primitive.${i}`),r=C.forwardRef((s,c)=>{const{asChild:u,...h}=s,g=u?l:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(g,{...h,ref:c})});return r.displayName=`Primitive.${i}`,{...t,[i]:r}},{});function yb(t,i){t&&Lc.flushSync(()=>t.dispatchEvent(i))}function Fi(t){const i=C.useRef(t);return C.useEffect(()=>{i.current=t}),C.useMemo(()=>(...l)=>{var r;return(r=i.current)==null?void 0:r.call(i,...l)},[])}function DM(t,i=globalThis==null?void 0:globalThis.document){const l=Fi(t);C.useEffect(()=>{const r=s=>{s.key==="Escape"&&l(s)};return i.addEventListener("keydown",r,{capture:!0}),()=>i.removeEventListener("keydown",r,{capture:!0})},[l,i])}var LM="DismissableLayer",oh="dismissableLayer.update",HM="dismissableLayer.pointerDownOutside",BM="dismissableLayer.focusOutside",Sy,vb=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zh=C.forwardRef((t,i)=>{const{disableOutsidePointerEvents:l=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,onDismiss:h,...g}=t,p=C.useContext(vb),[y,x]=C.useState(null),v=(y==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=C.useState({}),S=pn(i,L=>x(L)),_=Array.from(p.layers),[E]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),j=_.indexOf(E),R=y?_.indexOf(y):-1,N=p.layersWithOutsidePointerEventsDisabled.size>0,A=R>=j,z=VM(L=>{const U=L.target,K=[...p.branches].some(ie=>ie.contains(U));!A||K||(s==null||s(L),u==null||u(L),L.defaultPrevented||h==null||h())},v),k=$M(L=>{const U=L.target;[...p.branches].some(ie=>ie.contains(U))||(c==null||c(L),u==null||u(L),L.defaultPrevented||h==null||h())},v);return DM(L=>{R===p.layers.size-1&&(r==null||r(L),!L.defaultPrevented&&h&&(L.preventDefault(),h()))},v),C.useEffect(()=>{if(y)return l&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Sy=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),Ny(),()=>{l&&p.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Sy)}},[y,v,l,p]),C.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),Ny())},[y,p]),C.useEffect(()=>{const L=()=>w({});return document.addEventListener(oh,L),()=>document.removeEventListener(oh,L)},[]),d.jsx(Dt.div,{...g,ref:S,style:{pointerEvents:N?A?"auto":"none":void 0,...t.style},onFocusCapture:dt(t.onFocusCapture,k.onFocusCapture),onBlurCapture:dt(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:dt(t.onPointerDownCapture,z.onPointerDownCapture)})});Zh.displayName=LM;var UM="DismissableLayerBranch",bb=C.forwardRef((t,i)=>{const l=C.useContext(vb),r=C.useRef(null),s=pn(i,r);return C.useEffect(()=>{const c=r.current;if(c)return l.branches.add(c),()=>{l.branches.delete(c)}},[l.branches]),d.jsx(Dt.div,{...t,ref:s})});bb.displayName=UM;function VM(t,i=globalThis==null?void 0:globalThis.document){const l=Fi(t),r=C.useRef(!1),s=C.useRef(()=>{});return C.useEffect(()=>{const c=h=>{if(h.target&&!r.current){let g=function(){wb(HM,l,p,{discrete:!0})};const p={originalEvent:h};h.pointerType==="touch"?(i.removeEventListener("click",s.current),s.current=g,i.addEventListener("click",s.current,{once:!0})):g()}else i.removeEventListener("click",s.current);r.current=!1},u=window.setTimeout(()=>{i.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),i.removeEventListener("pointerdown",c),i.removeEventListener("click",s.current)}},[i,l]),{onPointerDownCapture:()=>r.current=!0}}function $M(t,i=globalThis==null?void 0:globalThis.document){const l=Fi(t),r=C.useRef(!1);return C.useEffect(()=>{const s=c=>{c.target&&!r.current&&wb(BM,l,{originalEvent:c},{discrete:!1})};return i.addEventListener("focusin",s),()=>i.removeEventListener("focusin",s)},[i,l]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ny(){const t=new CustomEvent(oh);document.dispatchEvent(t)}function wb(t,i,l,{discrete:r}){const s=l.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:l});i&&s.addEventListener(t,i,{once:!0}),r?yb(s,c):s.dispatchEvent(c)}var YM=Zh,qM=bb,Pi=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{};const XM=["top","right","bottom","left"],Ii=Math.min,Gt=Math.max,vc=Math.round,Ps=Math.floor,Mn=t=>({x:t,y:t}),GM={left:"right",right:"left",bottom:"top",top:"bottom"},ZM={start:"end",end:"start"};function sh(t,i,l){return Gt(t,Ii(i,l))}function ci(t,i){return typeof t=="function"?t(i):t}function ui(t){return t.split("-")[0]}function $l(t){return t.split("-")[1]}function Qh(t){return t==="x"?"y":"x"}function Kh(t){return t==="y"?"height":"width"}const QM=new Set(["top","bottom"]);function Cn(t){return QM.has(ui(t))?"y":"x"}function Fh(t){return Qh(Cn(t))}function KM(t,i,l){l===void 0&&(l=!1);const r=$l(t),s=Fh(t),c=Kh(s);let u=s==="x"?r===(l?"end":"start")?"right":"left":r==="start"?"bottom":"top";return i.reference[c]>i.floating[c]&&(u=bc(u)),[u,bc(u)]}function FM(t){const i=bc(t);return[ch(t),i,ch(i)]}function ch(t){return t.replace(/start|end/g,i=>ZM[i])}const Ey=["left","right"],_y=["right","left"],PM=["top","bottom"],IM=["bottom","top"];function JM(t,i,l){switch(t){case"top":case"bottom":return l?i?_y:Ey:i?Ey:_y;case"left":case"right":return i?PM:IM;default:return[]}}function WM(t,i,l,r){const s=$l(t);let c=JM(ui(t),l==="start",r);return s&&(c=c.map(u=>u+"-"+s),i&&(c=c.concat(c.map(ch)))),c}function bc(t){return t.replace(/left|right|bottom|top/g,i=>GM[i])}function ez(t){return{top:0,right:0,bottom:0,left:0,...t}}function Sb(t){return typeof t!="number"?ez(t):{top:t,right:t,bottom:t,left:t}}function wc(t){const{x:i,y:l,width:r,height:s}=t;return{width:r,height:s,top:l,left:i,right:i+r,bottom:l+s,x:i,y:l}}function jy(t,i,l){let{reference:r,floating:s}=t;const c=Cn(i),u=Fh(i),h=Kh(u),g=ui(i),p=c==="y",y=r.x+r.width/2-s.width/2,x=r.y+r.height/2-s.height/2,v=r[h]/2-s[h]/2;let w;switch(g){case"top":w={x:y,y:r.y-s.height};break;case"bottom":w={x:y,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y:x};break;case"left":w={x:r.x-s.width,y:x};break;default:w={x:r.x,y:r.y}}switch($l(i)){case"start":w[u]-=v*(l&&p?-1:1);break;case"end":w[u]+=v*(l&&p?-1:1);break}return w}async function tz(t,i){var l;i===void 0&&(i={});const{x:r,y:s,platform:c,rects:u,elements:h,strategy:g}=t,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:x="floating",altBoundary:v=!1,padding:w=0}=ci(i,t),S=Sb(w),E=h[v?x==="floating"?"reference":"floating":x],j=wc(await c.getClippingRect({element:(l=await(c.isElement==null?void 0:c.isElement(E)))==null||l?E:E.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(h.floating)),boundary:p,rootBoundary:y,strategy:g})),R=x==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,N=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h.floating)),A=await(c.isElement==null?void 0:c.isElement(N))?await(c.getScale==null?void 0:c.getScale(N))||{x:1,y:1}:{x:1,y:1},z=wc(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:R,offsetParent:N,strategy:g}):R);return{top:(j.top-z.top+S.top)/A.y,bottom:(z.bottom-j.bottom+S.bottom)/A.y,left:(j.left-z.left+S.left)/A.x,right:(z.right-j.right+S.right)/A.x}}const nz=async(t,i,l)=>{const{placement:r="bottom",strategy:s="absolute",middleware:c=[],platform:u}=l,h=c.filter(Boolean),g=await(u.isRTL==null?void 0:u.isRTL(i));let p=await u.getElementRects({reference:t,floating:i,strategy:s}),{x:y,y:x}=jy(p,r,g),v=r,w={},S=0;for(let E=0;E<h.length;E++){var _;const{name:j,fn:R}=h[E],{x:N,y:A,data:z,reset:k}=await R({x:y,y:x,initialPlacement:r,placement:v,strategy:s,middlewareData:w,rects:p,platform:{...u,detectOverflow:(_=u.detectOverflow)!=null?_:tz},elements:{reference:t,floating:i}});y=N??y,x=A??x,w={...w,[j]:{...w[j],...z}},k&&S<=50&&(S++,typeof k=="object"&&(k.placement&&(v=k.placement),k.rects&&(p=k.rects===!0?await u.getElementRects({reference:t,floating:i,strategy:s}):k.rects),{x:y,y:x}=jy(p,v,g)),E=-1)}return{x:y,y:x,placement:v,strategy:s,middlewareData:w}},iz=t=>({name:"arrow",options:t,async fn(i){const{x:l,y:r,placement:s,rects:c,platform:u,elements:h,middlewareData:g}=i,{element:p,padding:y=0}=ci(t,i)||{};if(p==null)return{};const x=Sb(y),v={x:l,y:r},w=Fh(s),S=Kh(w),_=await u.getDimensions(p),E=w==="y",j=E?"top":"left",R=E?"bottom":"right",N=E?"clientHeight":"clientWidth",A=c.reference[S]+c.reference[w]-v[w]-c.floating[S],z=v[w]-c.reference[w],k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(p));let L=k?k[N]:0;(!L||!await(u.isElement==null?void 0:u.isElement(k)))&&(L=h.floating[N]||c.floating[S]);const U=A/2-z/2,K=L/2-_[S]/2-1,ie=Ii(x[j],K),G=Ii(x[R],K),Q=ie,te=L-_[S]-G,D=L/2-_[S]/2+U,Z=sh(Q,D,te),M=!g.arrow&&$l(s)!=null&&D!==Z&&c.reference[S]/2-(D<Q?ie:G)-_[S]/2<0,H=M?D<Q?D-Q:D-te:0;return{[w]:v[w]+H,data:{[w]:Z,centerOffset:D-Z-H,...M&&{alignmentOffset:H}},reset:M}}}),az=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(i){var l,r;const{placement:s,middlewareData:c,rects:u,initialPlacement:h,platform:g,elements:p}=i,{mainAxis:y=!0,crossAxis:x=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:_=!0,...E}=ci(t,i);if((l=c.arrow)!=null&&l.alignmentOffset)return{};const j=ui(s),R=Cn(h),N=ui(h)===h,A=await(g.isRTL==null?void 0:g.isRTL(p.floating)),z=v||(N||!_?[bc(h)]:FM(h)),k=S!=="none";!v&&k&&z.push(...WM(h,_,S,A));const L=[h,...z],U=await g.detectOverflow(i,E),K=[];let ie=((r=c.flip)==null?void 0:r.overflows)||[];if(y&&K.push(U[j]),x){const D=KM(s,u,A);K.push(U[D[0]],U[D[1]])}if(ie=[...ie,{placement:s,overflows:K}],!K.every(D=>D<=0)){var G,Q;const D=(((G=c.flip)==null?void 0:G.index)||0)+1,Z=L[D];if(Z&&(!(x==="alignment"?R!==Cn(Z):!1)||ie.every(B=>Cn(B.placement)===R?B.overflows[0]>0:!0)))return{data:{index:D,overflows:ie},reset:{placement:Z}};let M=(Q=ie.filter(H=>H.overflows[0]<=0).sort((H,B)=>H.overflows[1]-B.overflows[1])[0])==null?void 0:Q.placement;if(!M)switch(w){case"bestFit":{var te;const H=(te=ie.filter(B=>{if(k){const Y=Cn(B.placement);return Y===R||Y==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(Y=>Y>0).reduce((Y,q)=>Y+q,0)]).sort((B,Y)=>B[1]-Y[1])[0])==null?void 0:te[0];H&&(M=H);break}case"initialPlacement":M=h;break}if(s!==M)return{reset:{placement:M}}}return{}}}};function Ay(t,i){return{top:t.top-i.height,right:t.right-i.width,bottom:t.bottom-i.height,left:t.left-i.width}}function Cy(t){return XM.some(i=>t[i]>=0)}const lz=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(i){const{rects:l,platform:r}=i,{strategy:s="referenceHidden",...c}=ci(t,i);switch(s){case"referenceHidden":{const u=await r.detectOverflow(i,{...c,elementContext:"reference"}),h=Ay(u,l.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:Cy(h)}}}case"escaped":{const u=await r.detectOverflow(i,{...c,altBoundary:!0}),h=Ay(u,l.floating);return{data:{escapedOffsets:h,escaped:Cy(h)}}}default:return{}}}}},Nb=new Set(["left","top"]);async function rz(t,i){const{placement:l,platform:r,elements:s}=t,c=await(r.isRTL==null?void 0:r.isRTL(s.floating)),u=ui(l),h=$l(l),g=Cn(l)==="y",p=Nb.has(u)?-1:1,y=c&&g?-1:1,x=ci(i,t);let{mainAxis:v,crossAxis:w,alignmentAxis:S}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return h&&typeof S=="number"&&(w=h==="end"?S*-1:S),g?{x:w*y,y:v*p}:{x:v*p,y:w*y}}const oz=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(i){var l,r;const{x:s,y:c,placement:u,middlewareData:h}=i,g=await rz(i,t);return u===((l=h.offset)==null?void 0:l.placement)&&(r=h.arrow)!=null&&r.alignmentOffset?{}:{x:s+g.x,y:c+g.y,data:{...g,placement:u}}}}},sz=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(i){const{x:l,y:r,placement:s,platform:c}=i,{mainAxis:u=!0,crossAxis:h=!1,limiter:g={fn:j=>{let{x:R,y:N}=j;return{x:R,y:N}}},...p}=ci(t,i),y={x:l,y:r},x=await c.detectOverflow(i,p),v=Cn(ui(s)),w=Qh(v);let S=y[w],_=y[v];if(u){const j=w==="y"?"top":"left",R=w==="y"?"bottom":"right",N=S+x[j],A=S-x[R];S=sh(N,S,A)}if(h){const j=v==="y"?"top":"left",R=v==="y"?"bottom":"right",N=_+x[j],A=_-x[R];_=sh(N,_,A)}const E=g.fn({...i,[w]:S,[v]:_});return{...E,data:{x:E.x-l,y:E.y-r,enabled:{[w]:u,[v]:h}}}}}},cz=function(t){return t===void 0&&(t={}),{options:t,fn(i){const{x:l,y:r,placement:s,rects:c,middlewareData:u}=i,{offset:h=0,mainAxis:g=!0,crossAxis:p=!0}=ci(t,i),y={x:l,y:r},x=Cn(s),v=Qh(x);let w=y[v],S=y[x];const _=ci(h,i),E=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(g){const N=v==="y"?"height":"width",A=c.reference[v]-c.floating[N]+E.mainAxis,z=c.reference[v]+c.reference[N]-E.mainAxis;w<A?w=A:w>z&&(w=z)}if(p){var j,R;const N=v==="y"?"width":"height",A=Nb.has(ui(s)),z=c.reference[x]-c.floating[N]+(A&&((j=u.offset)==null?void 0:j[x])||0)+(A?0:E.crossAxis),k=c.reference[x]+c.reference[N]+(A?0:((R=u.offset)==null?void 0:R[x])||0)-(A?E.crossAxis:0);S<z?S=z:S>k&&(S=k)}return{[v]:w,[x]:S}}}},uz=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(i){var l,r;const{placement:s,rects:c,platform:u,elements:h}=i,{apply:g=()=>{},...p}=ci(t,i),y=await u.detectOverflow(i,p),x=ui(s),v=$l(s),w=Cn(s)==="y",{width:S,height:_}=c.floating;let E,j;x==="top"||x==="bottom"?(E=x,j=v===(await(u.isRTL==null?void 0:u.isRTL(h.floating))?"start":"end")?"left":"right"):(j=x,E=v==="end"?"top":"bottom");const R=_-y.top-y.bottom,N=S-y.left-y.right,A=Ii(_-y[E],R),z=Ii(S-y[j],N),k=!i.middlewareData.shift;let L=A,U=z;if((l=i.middlewareData.shift)!=null&&l.enabled.x&&(U=N),(r=i.middlewareData.shift)!=null&&r.enabled.y&&(L=R),k&&!v){const ie=Gt(y.left,0),G=Gt(y.right,0),Q=Gt(y.top,0),te=Gt(y.bottom,0);w?U=S-2*(ie!==0||G!==0?ie+G:Gt(y.left,y.right)):L=_-2*(Q!==0||te!==0?Q+te:Gt(y.top,y.bottom))}await g({...i,availableWidth:U,availableHeight:L});const K=await u.getDimensions(h.floating);return S!==K.width||_!==K.height?{reset:{rects:!0}}:{}}}};function qc(){return typeof window<"u"}function Yl(t){return Eb(t)?(t.nodeName||"").toLowerCase():"#document"}function Qt(t){var i;return(t==null||(i=t.ownerDocument)==null?void 0:i.defaultView)||window}function kn(t){var i;return(i=(Eb(t)?t.ownerDocument:t.document)||window.document)==null?void 0:i.documentElement}function Eb(t){return qc()?t instanceof Node||t instanceof Qt(t).Node:!1}function gn(t){return qc()?t instanceof Element||t instanceof Qt(t).Element:!1}function On(t){return qc()?t instanceof HTMLElement||t instanceof Qt(t).HTMLElement:!1}function Ty(t){return!qc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Qt(t).ShadowRoot}const fz=new Set(["inline","contents"]);function fo(t){const{overflow:i,overflowX:l,overflowY:r,display:s}=xn(t);return/auto|scroll|overlay|hidden|clip/.test(i+r+l)&&!fz.has(s)}const dz=new Set(["table","td","th"]);function hz(t){return dz.has(Yl(t))}const mz=[":popover-open",":modal"];function Xc(t){return mz.some(i=>{try{return t.matches(i)}catch{return!1}})}const pz=["transform","translate","scale","rotate","perspective"],gz=["transform","translate","scale","rotate","perspective","filter"],xz=["paint","layout","strict","content"];function Ph(t){const i=Ih(),l=gn(t)?xn(t):t;return pz.some(r=>l[r]?l[r]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!i&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!i&&(l.filter?l.filter!=="none":!1)||gz.some(r=>(l.willChange||"").includes(r))||xz.some(r=>(l.contain||"").includes(r))}function yz(t){let i=Ji(t);for(;On(i)&&!Bl(i);){if(Ph(i))return i;if(Xc(i))return null;i=Ji(i)}return null}function Ih(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vz=new Set(["html","body","#document"]);function Bl(t){return vz.has(Yl(t))}function xn(t){return Qt(t).getComputedStyle(t)}function Gc(t){return gn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ji(t){if(Yl(t)==="html")return t;const i=t.assignedSlot||t.parentNode||Ty(t)&&t.host||kn(t);return Ty(i)?i.host:i}function _b(t){const i=Ji(t);return Bl(i)?t.ownerDocument?t.ownerDocument.body:t.body:On(i)&&fo(i)?i:_b(i)}function no(t,i,l){var r;i===void 0&&(i=[]),l===void 0&&(l=!0);const s=_b(t),c=s===((r=t.ownerDocument)==null?void 0:r.body),u=Qt(s);if(c){const h=uh(u);return i.concat(u,u.visualViewport||[],fo(s)?s:[],h&&l?no(h):[])}return i.concat(s,no(s,[],l))}function uh(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function jb(t){const i=xn(t);let l=parseFloat(i.width)||0,r=parseFloat(i.height)||0;const s=On(t),c=s?t.offsetWidth:l,u=s?t.offsetHeight:r,h=vc(l)!==c||vc(r)!==u;return h&&(l=c,r=u),{width:l,height:r,$:h}}function Jh(t){return gn(t)?t:t.contextElement}function Tl(t){const i=Jh(t);if(!On(i))return Mn(1);const l=i.getBoundingClientRect(),{width:r,height:s,$:c}=jb(i);let u=(c?vc(l.width):l.width)/r,h=(c?vc(l.height):l.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!h||!Number.isFinite(h))&&(h=1),{x:u,y:h}}const bz=Mn(0);function Ab(t){const i=Qt(t);return!Ih()||!i.visualViewport?bz:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function wz(t,i,l){return i===void 0&&(i=!1),!l||i&&l!==Qt(t)?!1:i}function Da(t,i,l,r){i===void 0&&(i=!1),l===void 0&&(l=!1);const s=t.getBoundingClientRect(),c=Jh(t);let u=Mn(1);i&&(r?gn(r)&&(u=Tl(r)):u=Tl(t));const h=wz(c,l,r)?Ab(c):Mn(0);let g=(s.left+h.x)/u.x,p=(s.top+h.y)/u.y,y=s.width/u.x,x=s.height/u.y;if(c){const v=Qt(c),w=r&&gn(r)?Qt(r):r;let S=v,_=uh(S);for(;_&&r&&w!==S;){const E=Tl(_),j=_.getBoundingClientRect(),R=xn(_),N=j.left+(_.clientLeft+parseFloat(R.paddingLeft))*E.x,A=j.top+(_.clientTop+parseFloat(R.paddingTop))*E.y;g*=E.x,p*=E.y,y*=E.x,x*=E.y,g+=N,p+=A,S=Qt(_),_=uh(S)}}return wc({width:y,height:x,x:g,y:p})}function Zc(t,i){const l=Gc(t).scrollLeft;return i?i.left+l:Da(kn(t)).left+l}function Cb(t,i){const l=t.getBoundingClientRect(),r=l.left+i.scrollLeft-Zc(t,l),s=l.top+i.scrollTop;return{x:r,y:s}}function Sz(t){let{elements:i,rect:l,offsetParent:r,strategy:s}=t;const c=s==="fixed",u=kn(r),h=i?Xc(i.floating):!1;if(r===u||h&&c)return l;let g={scrollLeft:0,scrollTop:0},p=Mn(1);const y=Mn(0),x=On(r);if((x||!x&&!c)&&((Yl(r)!=="body"||fo(u))&&(g=Gc(r)),On(r))){const w=Da(r);p=Tl(r),y.x=w.x+r.clientLeft,y.y=w.y+r.clientTop}const v=u&&!x&&!c?Cb(u,g):Mn(0);return{width:l.width*p.x,height:l.height*p.y,x:l.x*p.x-g.scrollLeft*p.x+y.x+v.x,y:l.y*p.y-g.scrollTop*p.y+y.y+v.y}}function Nz(t){return Array.from(t.getClientRects())}function Ez(t){const i=kn(t),l=Gc(t),r=t.ownerDocument.body,s=Gt(i.scrollWidth,i.clientWidth,r.scrollWidth,r.clientWidth),c=Gt(i.scrollHeight,i.clientHeight,r.scrollHeight,r.clientHeight);let u=-l.scrollLeft+Zc(t);const h=-l.scrollTop;return xn(r).direction==="rtl"&&(u+=Gt(i.clientWidth,r.clientWidth)-s),{width:s,height:c,x:u,y:h}}const My=25;function _z(t,i){const l=Qt(t),r=kn(t),s=l.visualViewport;let c=r.clientWidth,u=r.clientHeight,h=0,g=0;if(s){c=s.width,u=s.height;const y=Ih();(!y||y&&i==="fixed")&&(h=s.offsetLeft,g=s.offsetTop)}const p=Zc(r);if(p<=0){const y=r.ownerDocument,x=y.body,v=getComputedStyle(x),w=y.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(r.clientWidth-x.clientWidth-w);S<=My&&(c-=S)}else p<=My&&(c+=p);return{width:c,height:u,x:h,y:g}}const jz=new Set(["absolute","fixed"]);function Az(t,i){const l=Da(t,!0,i==="fixed"),r=l.top+t.clientTop,s=l.left+t.clientLeft,c=On(t)?Tl(t):Mn(1),u=t.clientWidth*c.x,h=t.clientHeight*c.y,g=s*c.x,p=r*c.y;return{width:u,height:h,x:g,y:p}}function zy(t,i,l){let r;if(i==="viewport")r=_z(t,l);else if(i==="document")r=Ez(kn(t));else if(gn(i))r=Az(i,l);else{const s=Ab(t);r={x:i.x-s.x,y:i.y-s.y,width:i.width,height:i.height}}return wc(r)}function Tb(t,i){const l=Ji(t);return l===i||!gn(l)||Bl(l)?!1:xn(l).position==="fixed"||Tb(l,i)}function Cz(t,i){const l=i.get(t);if(l)return l;let r=no(t,[],!1).filter(h=>gn(h)&&Yl(h)!=="body"),s=null;const c=xn(t).position==="fixed";let u=c?Ji(t):t;for(;gn(u)&&!Bl(u);){const h=xn(u),g=Ph(u);!g&&h.position==="fixed"&&(s=null),(c?!g&&!s:!g&&h.position==="static"&&!!s&&jz.has(s.position)||fo(u)&&!g&&Tb(t,u))?r=r.filter(y=>y!==u):s=h,u=Ji(u)}return i.set(t,r),r}function Tz(t){let{element:i,boundary:l,rootBoundary:r,strategy:s}=t;const u=[...l==="clippingAncestors"?Xc(i)?[]:Cz(i,this._c):[].concat(l),r],h=u[0],g=u.reduce((p,y)=>{const x=zy(i,y,s);return p.top=Gt(x.top,p.top),p.right=Ii(x.right,p.right),p.bottom=Ii(x.bottom,p.bottom),p.left=Gt(x.left,p.left),p},zy(i,h,s));return{width:g.right-g.left,height:g.bottom-g.top,x:g.left,y:g.top}}function Mz(t){const{width:i,height:l}=jb(t);return{width:i,height:l}}function zz(t,i,l){const r=On(i),s=kn(i),c=l==="fixed",u=Da(t,!0,c,i);let h={scrollLeft:0,scrollTop:0};const g=Mn(0);function p(){g.x=Zc(s)}if(r||!r&&!c)if((Yl(i)!=="body"||fo(s))&&(h=Gc(i)),r){const w=Da(i,!0,c,i);g.x=w.x+i.clientLeft,g.y=w.y+i.clientTop}else s&&p();c&&!r&&s&&p();const y=s&&!r&&!c?Cb(s,h):Mn(0),x=u.left+h.scrollLeft-g.x-y.x,v=u.top+h.scrollTop-g.y-y.y;return{x,y:v,width:u.width,height:u.height}}function Ud(t){return xn(t).position==="static"}function Oy(t,i){if(!On(t)||xn(t).position==="fixed")return null;if(i)return i(t);let l=t.offsetParent;return kn(t)===l&&(l=l.ownerDocument.body),l}function Mb(t,i){const l=Qt(t);if(Xc(t))return l;if(!On(t)){let s=Ji(t);for(;s&&!Bl(s);){if(gn(s)&&!Ud(s))return s;s=Ji(s)}return l}let r=Oy(t,i);for(;r&&hz(r)&&Ud(r);)r=Oy(r,i);return r&&Bl(r)&&Ud(r)&&!Ph(r)?l:r||yz(t)||l}const Oz=async function(t){const i=this.getOffsetParent||Mb,l=this.getDimensions,r=await l(t.floating);return{reference:zz(t.reference,await i(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Rz(t){return xn(t).direction==="rtl"}const kz={convertOffsetParentRelativeRectToViewportRelativeRect:Sz,getDocumentElement:kn,getClippingRect:Tz,getOffsetParent:Mb,getElementRects:Oz,getClientRects:Nz,getDimensions:Mz,getScale:Tl,isElement:gn,isRTL:Rz};function zb(t,i){return t.x===i.x&&t.y===i.y&&t.width===i.width&&t.height===i.height}function Dz(t,i){let l=null,r;const s=kn(t);function c(){var h;clearTimeout(r),(h=l)==null||h.disconnect(),l=null}function u(h,g){h===void 0&&(h=!1),g===void 0&&(g=1),c();const p=t.getBoundingClientRect(),{left:y,top:x,width:v,height:w}=p;if(h||i(),!v||!w)return;const S=Ps(x),_=Ps(s.clientWidth-(y+v)),E=Ps(s.clientHeight-(x+w)),j=Ps(y),N={rootMargin:-S+"px "+-_+"px "+-E+"px "+-j+"px",threshold:Gt(0,Ii(1,g))||1};let A=!0;function z(k){const L=k[0].intersectionRatio;if(L!==g){if(!A)return u();L?u(!1,L):r=setTimeout(()=>{u(!1,1e-7)},1e3)}L===1&&!zb(p,t.getBoundingClientRect())&&u(),A=!1}try{l=new IntersectionObserver(z,{...N,root:s.ownerDocument})}catch{l=new IntersectionObserver(z,N)}l.observe(t)}return u(!0),c}function Lz(t,i,l,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:g=!1}=r,p=Jh(t),y=s||c?[...p?no(p):[],...no(i)]:[];y.forEach(j=>{s&&j.addEventListener("scroll",l,{passive:!0}),c&&j.addEventListener("resize",l)});const x=p&&h?Dz(p,l):null;let v=-1,w=null;u&&(w=new ResizeObserver(j=>{let[R]=j;R&&R.target===p&&w&&(w.unobserve(i),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var N;(N=w)==null||N.observe(i)})),l()}),p&&!g&&w.observe(p),w.observe(i));let S,_=g?Da(t):null;g&&E();function E(){const j=Da(t);_&&!zb(_,j)&&l(),_=j,S=requestAnimationFrame(E)}return l(),()=>{var j;y.forEach(R=>{s&&R.removeEventListener("scroll",l),c&&R.removeEventListener("resize",l)}),x==null||x(),(j=w)==null||j.disconnect(),w=null,g&&cancelAnimationFrame(S)}}const Hz=oz,Bz=sz,Uz=az,Vz=uz,$z=lz,Ry=iz,Yz=cz,qz=(t,i,l)=>{const r=new Map,s={platform:kz,...l},c={...s.platform,_c:r};return nz(t,i,{...s,platform:c})};var Xz=typeof document<"u",Gz=function(){},ac=Xz?C.useLayoutEffect:Gz;function Sc(t,i){if(t===i)return!0;if(typeof t!=typeof i)return!1;if(typeof t=="function"&&t.toString()===i.toString())return!0;let l,r,s;if(t&&i&&typeof t=="object"){if(Array.isArray(t)){if(l=t.length,l!==i.length)return!1;for(r=l;r--!==0;)if(!Sc(t[r],i[r]))return!1;return!0}if(s=Object.keys(t),l=s.length,l!==Object.keys(i).length)return!1;for(r=l;r--!==0;)if(!{}.hasOwnProperty.call(i,s[r]))return!1;for(r=l;r--!==0;){const c=s[r];if(!(c==="_owner"&&t.$$typeof)&&!Sc(t[c],i[c]))return!1}return!0}return t!==t&&i!==i}function Ob(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ky(t,i){const l=Ob(t);return Math.round(i*l)/l}function Vd(t){const i=C.useRef(t);return ac(()=>{i.current=t}),i}function Zz(t){t===void 0&&(t={});const{placement:i="bottom",strategy:l="absolute",middleware:r=[],platform:s,elements:{reference:c,floating:u}={},transform:h=!0,whileElementsMounted:g,open:p}=t,[y,x]=C.useState({x:0,y:0,strategy:l,placement:i,middlewareData:{},isPositioned:!1}),[v,w]=C.useState(r);Sc(v,r)||w(r);const[S,_]=C.useState(null),[E,j]=C.useState(null),R=C.useCallback(B=>{B!==k.current&&(k.current=B,_(B))},[]),N=C.useCallback(B=>{B!==L.current&&(L.current=B,j(B))},[]),A=c||S,z=u||E,k=C.useRef(null),L=C.useRef(null),U=C.useRef(y),K=g!=null,ie=Vd(g),G=Vd(s),Q=Vd(p),te=C.useCallback(()=>{if(!k.current||!L.current)return;const B={placement:i,strategy:l,middleware:v};G.current&&(B.platform=G.current),qz(k.current,L.current,B).then(Y=>{const q={...Y,isPositioned:Q.current!==!1};D.current&&!Sc(U.current,q)&&(U.current=q,Lc.flushSync(()=>{x(q)}))})},[v,i,l,G,Q]);ac(()=>{p===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,x(B=>({...B,isPositioned:!1})))},[p]);const D=C.useRef(!1);ac(()=>(D.current=!0,()=>{D.current=!1}),[]),ac(()=>{if(A&&(k.current=A),z&&(L.current=z),A&&z){if(ie.current)return ie.current(A,z,te);te()}},[A,z,te,ie,K]);const Z=C.useMemo(()=>({reference:k,floating:L,setReference:R,setFloating:N}),[R,N]),M=C.useMemo(()=>({reference:A,floating:z}),[A,z]),H=C.useMemo(()=>{const B={position:l,left:0,top:0};if(!M.floating)return B;const Y=ky(M.floating,y.x),q=ky(M.floating,y.y);return h?{...B,transform:"translate("+Y+"px, "+q+"px)",...Ob(M.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:Y,top:q}},[l,h,M.floating,y.x,y.y]);return C.useMemo(()=>({...y,update:te,refs:Z,elements:M,floatingStyles:H}),[y,te,Z,M,H])}const Qz=t=>{function i(l){return{}.hasOwnProperty.call(l,"current")}return{name:"arrow",options:t,fn(l){const{element:r,padding:s}=typeof t=="function"?t(l):t;return r&&i(r)?r.current!=null?Ry({element:r.current,padding:s}).fn(l):{}:r?Ry({element:r,padding:s}).fn(l):{}}}},Kz=(t,i)=>({...Hz(t),options:[t,i]}),Fz=(t,i)=>({...Bz(t),options:[t,i]}),Pz=(t,i)=>({...Yz(t),options:[t,i]}),Iz=(t,i)=>({...Uz(t),options:[t,i]}),Jz=(t,i)=>({...Vz(t),options:[t,i]}),Wz=(t,i)=>({...$z(t),options:[t,i]}),e6=(t,i)=>({...Qz(t),options:[t,i]});var t6="Arrow",Rb=C.forwardRef((t,i)=>{const{children:l,width:r=10,height:s=5,...c}=t;return d.jsx(Dt.svg,{...c,ref:i,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?l:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Rb.displayName=t6;var n6=Rb;function i6(t){const[i,l]=C.useState(void 0);return Pi(()=>{if(t){l({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const c=s[0];let u,h;if("borderBoxSize"in c){const g=c.borderBoxSize,p=Array.isArray(g)?g[0]:g;u=p.inlineSize,h=p.blockSize}else u=t.offsetWidth,h=t.offsetHeight;l({width:u,height:h})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else l(void 0)},[t]),i}var kb="Popper",[Db,Lb]=Yc(kb),[v8,Hb]=Db(kb),Bb="PopperAnchor",Ub=C.forwardRef((t,i)=>{const{__scopePopper:l,virtualRef:r,...s}=t,c=Hb(Bb,l),u=C.useRef(null),h=pn(i,u),g=C.useRef(null);return C.useEffect(()=>{const p=g.current;g.current=(r==null?void 0:r.current)||u.current,p!==g.current&&c.onAnchorChange(g.current)}),r?null:d.jsx(Dt.div,{...s,ref:h})});Ub.displayName=Bb;var Wh="PopperContent",[a6,l6]=Db(Wh),Vb=C.forwardRef((t,i)=>{var fe,ce,ue,Ee,ve,xe;const{__scopePopper:l,side:r="bottom",sideOffset:s=0,align:c="center",alignOffset:u=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:p=[],collisionPadding:y=0,sticky:x="partial",hideWhenDetached:v=!1,updatePositionStrategy:w="optimized",onPlaced:S,..._}=t,E=Hb(Wh,l),[j,R]=C.useState(null),N=pn(i,me=>R(me)),[A,z]=C.useState(null),k=i6(A),L=(k==null?void 0:k.width)??0,U=(k==null?void 0:k.height)??0,K=r+(c!=="center"?"-"+c:""),ie=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},G=Array.isArray(p)?p:[p],Q=G.length>0,te={padding:ie,boundary:G.filter(o6),altBoundary:Q},{refs:D,floatingStyles:Z,placement:M,isPositioned:H,middlewareData:B}=Zz({strategy:"fixed",placement:K,whileElementsMounted:(...me)=>Lz(...me,{animationFrame:w==="always"}),elements:{reference:E.anchor},middleware:[Kz({mainAxis:s+U,alignmentAxis:u}),g&&Fz({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?Pz():void 0,...te}),g&&Iz({...te}),Jz({...te,apply:({elements:me,rects:_e,availableWidth:Ue,availableHeight:Me})=>{const{width:nt,height:Lt}=_e.reference,ht=me.floating.style;ht.setProperty("--radix-popper-available-width",`${Ue}px`),ht.setProperty("--radix-popper-available-height",`${Me}px`),ht.setProperty("--radix-popper-anchor-width",`${nt}px`),ht.setProperty("--radix-popper-anchor-height",`${Lt}px`)}}),A&&e6({element:A,padding:h}),s6({arrowWidth:L,arrowHeight:U}),v&&Wz({strategy:"referenceHidden",...te})]}),[Y,q]=qb(M),O=Fi(S);Pi(()=>{H&&(O==null||O())},[H,O]);const V=(fe=B.arrow)==null?void 0:fe.x,W=(ce=B.arrow)==null?void 0:ce.y,ne=((ue=B.arrow)==null?void 0:ue.centerOffset)!==0,[oe,se]=C.useState();return Pi(()=>{j&&se(window.getComputedStyle(j).zIndex)},[j]),d.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:H?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(Ee=B.transformOrigin)==null?void 0:Ee.x,(ve=B.transformOrigin)==null?void 0:ve.y].join(" "),...((xe=B.hide)==null?void 0:xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:d.jsx(a6,{scope:l,placedSide:Y,onArrowChange:z,arrowX:V,arrowY:W,shouldHideArrow:ne,children:d.jsx(Dt.div,{"data-side":Y,"data-align":q,..._,ref:N,style:{..._.style,animation:H?void 0:"none"}})})})});Vb.displayName=Wh;var $b="PopperArrow",r6={top:"bottom",right:"left",bottom:"top",left:"right"},Yb=C.forwardRef(function(i,l){const{__scopePopper:r,...s}=i,c=l6($b,r),u=r6[c.placedSide];return d.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:d.jsx(n6,{...s,ref:l,style:{...s.style,display:"block"}})})});Yb.displayName=$b;function o6(t){return t!==null}var s6=t=>({name:"transformOrigin",options:t,fn(i){var E,j,R;const{placement:l,rects:r,middlewareData:s}=i,u=((E=s.arrow)==null?void 0:E.centerOffset)!==0,h=u?0:t.arrowWidth,g=u?0:t.arrowHeight,[p,y]=qb(l),x={start:"0%",center:"50%",end:"100%"}[y],v=(((j=s.arrow)==null?void 0:j.x)??0)+h/2,w=(((R=s.arrow)==null?void 0:R.y)??0)+g/2;let S="",_="";return p==="bottom"?(S=u?x:`${v}px`,_=`${-g}px`):p==="top"?(S=u?x:`${v}px`,_=`${r.floating.height+g}px`):p==="right"?(S=`${-g}px`,_=u?x:`${w}px`):p==="left"&&(S=`${r.floating.width+g}px`,_=u?x:`${w}px`),{data:{x:S,y:_}}}});function qb(t){const[i,l="center"]=t.split("-");return[i,l]}var c6=Ub,u6=Vb,f6=Yb,d6="Portal",em=C.forwardRef((t,i)=>{var h;const{container:l,...r}=t,[s,c]=C.useState(!1);Pi(()=>c(!0),[]);const u=l||s&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return u?CA.createPortal(d.jsx(Dt.div,{...r,ref:i}),u):null});em.displayName=d6;function h6(t,i){return C.useReducer((l,r)=>i[l][r]??l,t)}var Qc=t=>{const{present:i,children:l}=t,r=m6(i),s=typeof l=="function"?l({present:r.isPresent}):C.Children.only(l),c=pn(r.ref,p6(s));return typeof l=="function"||r.isPresent?C.cloneElement(s,{ref:c}):null};Qc.displayName="Presence";function m6(t){const[i,l]=C.useState(),r=C.useRef(null),s=C.useRef(t),c=C.useRef("none"),u=t?"mounted":"unmounted",[h,g]=h6(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const p=Is(r.current);c.current=h==="mounted"?p:"none"},[h]),Pi(()=>{const p=r.current,y=s.current;if(y!==t){const v=c.current,w=Is(p);t?g("MOUNT"):w==="none"||(p==null?void 0:p.display)==="none"?g("UNMOUNT"):g(y&&v!==w?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,g]),Pi(()=>{if(i){let p;const y=i.ownerDocument.defaultView??window,x=w=>{const _=Is(r.current).includes(CSS.escape(w.animationName));if(w.target===i&&_&&(g("ANIMATION_END"),!s.current)){const E=i.style.animationFillMode;i.style.animationFillMode="forwards",p=y.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=E)})}},v=w=>{w.target===i&&(c.current=Is(r.current))};return i.addEventListener("animationstart",v),i.addEventListener("animationcancel",x),i.addEventListener("animationend",x),()=>{y.clearTimeout(p),i.removeEventListener("animationstart",v),i.removeEventListener("animationcancel",x),i.removeEventListener("animationend",x)}}else g("ANIMATION_END")},[i,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:C.useCallback(p=>{r.current=p?getComputedStyle(p):null,l(p)},[])}}function Is(t){return(t==null?void 0:t.animationName)||"none"}function p6(t){var r,s;let i=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,l=i&&"isReactWarning"in i&&i.isReactWarning;return l?t.ref:(i=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=i&&"isReactWarning"in i&&i.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}var g6=Symbol("radix.slottable");function x6(t){const i=({children:l})=>d.jsx(d.Fragment,{children:l});return i.displayName=`${t}.Slottable`,i.__radixId=g6,i}var y6=Vy[" useInsertionEffect ".trim().toString()]||Pi;function v6({prop:t,defaultProp:i,onChange:l=()=>{},caller:r}){const[s,c,u]=b6({defaultProp:i,onChange:l}),h=t!==void 0,g=h?t:s;{const y=C.useRef(t!==void 0);C.useEffect(()=>{const x=y.current;x!==h&&console.warn(`${r} is changing from ${x?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=h},[h,r])}const p=C.useCallback(y=>{var x;if(h){const v=w6(y)?y(t):y;v!==t&&((x=u.current)==null||x.call(u,v))}else c(y)},[h,t,c,u]);return[g,p]}function b6({defaultProp:t,onChange:i}){const[l,r]=C.useState(t),s=C.useRef(l),c=C.useRef(i);return y6(()=>{c.current=i},[i]),C.useEffect(()=>{var u;s.current!==l&&((u=c.current)==null||u.call(c,l),s.current=l)},[l,s]),[l,r,c]}function w6(t){return typeof t=="function"}var S6=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),N6="VisuallyHidden",Kc=C.forwardRef((t,i)=>d.jsx(Dt.span,{...t,ref:i,style:{...S6,...t.style}}));Kc.displayName=N6;var E6=Kc,[Fc]=Yc("Tooltip",[Lb]),tm=Lb(),Xb="TooltipProvider",_6=700,Dy="tooltip.open",[j6,Gb]=Fc(Xb),Zb=t=>{const{__scopeTooltip:i,delayDuration:l=_6,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:c}=t,u=C.useRef(!0),h=C.useRef(!1),g=C.useRef(0);return C.useEffect(()=>{const p=g.current;return()=>window.clearTimeout(p)},[]),d.jsx(j6,{scope:i,isOpenDelayedRef:u,delayDuration:l,onOpen:C.useCallback(()=>{window.clearTimeout(g.current),u.current=!1},[]),onClose:C.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>u.current=!0,r)},[r]),isPointerInTransitRef:h,onPointerInTransitChange:C.useCallback(p=>{h.current=p},[]),disableHoverableContent:s,children:c})};Zb.displayName=Xb;var Qb="Tooltip",[b8,ho]=Fc(Qb),fh="TooltipTrigger",A6=C.forwardRef((t,i)=>{const{__scopeTooltip:l,...r}=t,s=ho(fh,l),c=Gb(fh,l),u=tm(l),h=C.useRef(null),g=pn(i,h,s.onTriggerChange),p=C.useRef(!1),y=C.useRef(!1),x=C.useCallback(()=>p.current=!1,[]);return C.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),d.jsx(c6,{asChild:!0,...u,children:d.jsx(Dt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:g,onPointerMove:dt(t.onPointerMove,v=>{v.pointerType!=="touch"&&!y.current&&!c.isPointerInTransitRef.current&&(s.onTriggerEnter(),y.current=!0)}),onPointerLeave:dt(t.onPointerLeave,()=>{s.onTriggerLeave(),y.current=!1}),onPointerDown:dt(t.onPointerDown,()=>{s.open&&s.onClose(),p.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:dt(t.onFocus,()=>{p.current||s.onOpen()}),onBlur:dt(t.onBlur,s.onClose),onClick:dt(t.onClick,s.onClose)})})});A6.displayName=fh;var nm="TooltipPortal",[C6,T6]=Fc(nm,{forceMount:void 0}),Kb=t=>{const{__scopeTooltip:i,forceMount:l,children:r,container:s}=t,c=ho(nm,i);return d.jsx(C6,{scope:i,forceMount:l,children:d.jsx(Qc,{present:l||c.open,children:d.jsx(em,{asChild:!0,container:s,children:r})})})};Kb.displayName=nm;var Ul="TooltipContent",Fb=C.forwardRef((t,i)=>{const l=T6(Ul,t.__scopeTooltip),{forceMount:r=l.forceMount,side:s="top",...c}=t,u=ho(Ul,t.__scopeTooltip);return d.jsx(Qc,{present:r||u.open,children:u.disableHoverableContent?d.jsx(Pb,{side:s,...c,ref:i}):d.jsx(M6,{side:s,...c,ref:i})})}),M6=C.forwardRef((t,i)=>{const l=ho(Ul,t.__scopeTooltip),r=Gb(Ul,t.__scopeTooltip),s=C.useRef(null),c=pn(i,s),[u,h]=C.useState(null),{trigger:g,onClose:p}=l,y=s.current,{onPointerInTransitChange:x}=r,v=C.useCallback(()=>{h(null),x(!1)},[x]),w=C.useCallback((S,_)=>{const E=S.currentTarget,j={x:S.clientX,y:S.clientY},R=D6(j,E.getBoundingClientRect()),N=L6(j,R),A=H6(_.getBoundingClientRect()),z=U6([...N,...A]);h(z),x(!0)},[x]);return C.useEffect(()=>()=>v(),[v]),C.useEffect(()=>{if(g&&y){const S=E=>w(E,y),_=E=>w(E,g);return g.addEventListener("pointerleave",S),y.addEventListener("pointerleave",_),()=>{g.removeEventListener("pointerleave",S),y.removeEventListener("pointerleave",_)}}},[g,y,w,v]),C.useEffect(()=>{if(u){const S=_=>{const E=_.target,j={x:_.clientX,y:_.clientY},R=(g==null?void 0:g.contains(E))||(y==null?void 0:y.contains(E)),N=!B6(j,u);R?v():N&&(v(),p())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[g,y,u,p,v]),d.jsx(Pb,{...t,ref:c})}),[z6,O6]=Fc(Qb,{isInside:!1}),R6=x6("TooltipContent"),Pb=C.forwardRef((t,i)=>{const{__scopeTooltip:l,children:r,"aria-label":s,onEscapeKeyDown:c,onPointerDownOutside:u,...h}=t,g=ho(Ul,l),p=tm(l),{onClose:y}=g;return C.useEffect(()=>(document.addEventListener(Dy,y),()=>document.removeEventListener(Dy,y)),[y]),C.useEffect(()=>{if(g.trigger){const x=v=>{const w=v.target;w!=null&&w.contains(g.trigger)&&y()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[g.trigger,y]),d.jsx(Zh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:x=>x.preventDefault(),onDismiss:y,children:d.jsxs(u6,{"data-state":g.stateAttribute,...p,...h,ref:i,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(R6,{children:r}),d.jsx(z6,{scope:l,isInside:!0,children:d.jsx(E6,{id:g.contentId,role:"tooltip",children:s||r})})]})})});Fb.displayName=Ul;var Ib="TooltipArrow",k6=C.forwardRef((t,i)=>{const{__scopeTooltip:l,...r}=t,s=tm(l);return O6(Ib,l).isInside?null:d.jsx(f6,{...s,...r,ref:i})});k6.displayName=Ib;function D6(t,i){const l=Math.abs(i.top-t.y),r=Math.abs(i.bottom-t.y),s=Math.abs(i.right-t.x),c=Math.abs(i.left-t.x);switch(Math.min(l,r,s,c)){case c:return"left";case s:return"right";case l:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function L6(t,i,l=5){const r=[];switch(i){case"top":r.push({x:t.x-l,y:t.y+l},{x:t.x+l,y:t.y+l});break;case"bottom":r.push({x:t.x-l,y:t.y-l},{x:t.x+l,y:t.y-l});break;case"left":r.push({x:t.x+l,y:t.y-l},{x:t.x+l,y:t.y+l});break;case"right":r.push({x:t.x-l,y:t.y-l},{x:t.x-l,y:t.y+l});break}return r}function H6(t){const{top:i,right:l,bottom:r,left:s}=t;return[{x:s,y:i},{x:l,y:i},{x:l,y:r},{x:s,y:r}]}function B6(t,i){const{x:l,y:r}=t;let s=!1;for(let c=0,u=i.length-1;c<i.length;u=c++){const h=i[c],g=i[u],p=h.x,y=h.y,x=g.x,v=g.y;y>r!=v>r&&l<(x-p)*(r-y)/(v-y)+p&&(s=!s)}return s}function U6(t){const i=t.slice();return i.sort((l,r)=>l.x<r.x?-1:l.x>r.x?1:l.y<r.y?-1:l.y>r.y?1:0),V6(i)}function V6(t){if(t.length<=1)return t.slice();const i=[];for(let r=0;r<t.length;r++){const s=t[r];for(;i.length>=2;){const c=i[i.length-1],u=i[i.length-2];if((c.x-u.x)*(s.y-u.y)>=(c.y-u.y)*(s.x-u.x))i.pop();else break}i.push(s)}i.pop();const l=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;l.length>=2;){const c=l[l.length-1],u=l[l.length-2];if((c.x-u.x)*(s.y-u.y)>=(c.y-u.y)*(s.x-u.x))l.pop();else break}l.push(s)}return l.pop(),i.length===1&&l.length===1&&i[0].x===l[0].x&&i[0].y===l[0].y?i:i.concat(l)}var $6=Zb,Y6=Kb,Jb=Fb;const Ly=$6,q6=C.forwardRef(({className:t,sideOffset:i=4,...l},r)=>d.jsx(Y6,{children:d.jsx(Jb,{ref:r,sideOffset:i,className:Se("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...l})}));q6.displayName=Jb.displayName;function Hy(t){const i=X6(t),l=C.forwardRef((r,s)=>{const{children:c,...u}=r,h=C.Children.toArray(c),g=h.find(Z6);if(g){const p=g.props.children,y=h.map(x=>x===g?C.Children.count(p)>1?C.Children.only(null):C.isValidElement(p)?p.props.children:null:x);return d.jsx(i,{...u,ref:s,children:C.isValidElement(p)?C.cloneElement(p,void 0,y):null})}return d.jsx(i,{...u,ref:s,children:c})});return l.displayName=`${t}.Slot`,l}function X6(t){const i=C.forwardRef((l,r)=>{const{children:s,...c}=l;if(C.isValidElement(s)){const u=K6(s),h=Q6(c,s.props);return s.type!==C.Fragment&&(h.ref=r?$c(r,u):u),C.cloneElement(s,h)}return C.Children.count(s)>1?C.Children.only(null):null});return i.displayName=`${t}.SlotClone`,i}var G6=Symbol("radix.slottable");function Z6(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===G6}function Q6(t,i){const l={...i};for(const r in i){const s=t[r],c=i[r];/^on[A-Z]/.test(r)?s&&c?l[r]=(...h)=>{const g=c(...h);return s(...h),g}:s&&(l[r]=s):r==="style"?l[r]={...s,...c}:r==="className"&&(l[r]=[s,c].filter(Boolean).join(" "))}return{...t,...l}}function K6(t){var r,s;let i=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,l=i&&"isReactWarning"in i&&i.isReactWarning;return l?t.ref:(i=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,l=i&&"isReactWarning"in i&&i.isReactWarning,l?t.props.ref:t.props.ref||t.ref)}function F6(t){const i=t+"CollectionProvider",[l,r]=Yc(i),[s,c]=l(i,{collectionRef:{current:null},itemMap:new Map}),u=_=>{const{scope:E,children:j}=_,R=Xt.useRef(null),N=Xt.useRef(new Map).current;return d.jsx(s,{scope:E,itemMap:N,collectionRef:R,children:j})};u.displayName=i;const h=t+"CollectionSlot",g=Hy(h),p=Xt.forwardRef((_,E)=>{const{scope:j,children:R}=_,N=c(h,j),A=pn(E,N.collectionRef);return d.jsx(g,{ref:A,children:R})});p.displayName=h;const y=t+"CollectionItemSlot",x="data-radix-collection-item",v=Hy(y),w=Xt.forwardRef((_,E)=>{const{scope:j,children:R,...N}=_,A=Xt.useRef(null),z=pn(E,A),k=c(y,j);return Xt.useEffect(()=>(k.itemMap.set(A,{ref:A,...N}),()=>void k.itemMap.delete(A))),d.jsx(v,{[x]:"",ref:z,children:R})});w.displayName=y;function S(_){const E=c(t+"CollectionConsumer",_);return Xt.useCallback(()=>{const R=E.collectionRef.current;if(!R)return[];const N=Array.from(R.querySelectorAll(`[${x}]`));return Array.from(E.itemMap.values()).sort((k,L)=>N.indexOf(k.ref.current)-N.indexOf(L.ref.current))},[E.collectionRef,E.itemMap])}return[{Provider:u,Slot:p,ItemSlot:w},S,r]}var im="ToastProvider",[am,P6,I6]=F6("Toast"),[Wb]=Yc("Toast",[I6]),[J6,Pc]=Wb(im),e2=t=>{const{__scopeToast:i,label:l="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:c=50,children:u}=t,[h,g]=C.useState(null),[p,y]=C.useState(0),x=C.useRef(!1),v=C.useRef(!1);return l.trim()||console.error(`Invalid prop \`label\` supplied to \`${im}\`. Expected non-empty \`string\`.`),d.jsx(am.Provider,{scope:i,children:d.jsx(J6,{scope:i,label:l,duration:r,swipeDirection:s,swipeThreshold:c,toastCount:p,viewport:h,onViewportChange:g,onToastAdd:C.useCallback(()=>y(w=>w+1),[]),onToastRemove:C.useCallback(()=>y(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:x,isClosePausedRef:v,children:u})})};e2.displayName=im;var t2="ToastViewport",W6=["F8"],dh="toast.viewportPause",hh="toast.viewportResume",n2=C.forwardRef((t,i)=>{const{__scopeToast:l,hotkey:r=W6,label:s="Notifications ({hotkey})",...c}=t,u=Pc(t2,l),h=P6(l),g=C.useRef(null),p=C.useRef(null),y=C.useRef(null),x=C.useRef(null),v=pn(i,x,u.onViewportChange),w=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=u.toastCount>0;C.useEffect(()=>{const E=j=>{var N;r.length!==0&&r.every(A=>j[A]||j.code===A)&&((N=x.current)==null||N.focus())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[r]),C.useEffect(()=>{const E=g.current,j=x.current;if(S&&E&&j){const R=()=>{if(!u.isClosePausedRef.current){const k=new CustomEvent(dh);j.dispatchEvent(k),u.isClosePausedRef.current=!0}},N=()=>{if(u.isClosePausedRef.current){const k=new CustomEvent(hh);j.dispatchEvent(k),u.isClosePausedRef.current=!1}},A=k=>{!E.contains(k.relatedTarget)&&N()},z=()=>{E.contains(document.activeElement)||N()};return E.addEventListener("focusin",R),E.addEventListener("focusout",A),E.addEventListener("pointermove",R),E.addEventListener("pointerleave",z),window.addEventListener("blur",R),window.addEventListener("focus",N),()=>{E.removeEventListener("focusin",R),E.removeEventListener("focusout",A),E.removeEventListener("pointermove",R),E.removeEventListener("pointerleave",z),window.removeEventListener("blur",R),window.removeEventListener("focus",N)}}},[S,u.isClosePausedRef]);const _=C.useCallback(({tabbingDirection:E})=>{const R=h().map(N=>{const A=N.ref.current,z=[A,...d8(A)];return E==="forwards"?z:z.reverse()});return(E==="forwards"?R.reverse():R).flat()},[h]);return C.useEffect(()=>{const E=x.current;if(E){const j=R=>{var z,k,L;const N=R.altKey||R.ctrlKey||R.metaKey;if(R.key==="Tab"&&!N){const U=document.activeElement,K=R.shiftKey;if(R.target===E&&K){(z=p.current)==null||z.focus();return}const Q=_({tabbingDirection:K?"backwards":"forwards"}),te=Q.findIndex(D=>D===U);$d(Q.slice(te+1))?R.preventDefault():K?(k=p.current)==null||k.focus():(L=y.current)==null||L.focus()}};return E.addEventListener("keydown",j),()=>E.removeEventListener("keydown",j)}},[h,_]),d.jsxs(qM,{ref:g,role:"region","aria-label":s.replace("{hotkey}",w),tabIndex:-1,style:{pointerEvents:S?void 0:"none"},children:[S&&d.jsx(mh,{ref:p,onFocusFromOutsideViewport:()=>{const E=_({tabbingDirection:"forwards"});$d(E)}}),d.jsx(am.Slot,{scope:l,children:d.jsx(Dt.ol,{tabIndex:-1,...c,ref:v})}),S&&d.jsx(mh,{ref:y,onFocusFromOutsideViewport:()=>{const E=_({tabbingDirection:"backwards"});$d(E)}})]})});n2.displayName=t2;var i2="ToastFocusProxy",mh=C.forwardRef((t,i)=>{const{__scopeToast:l,onFocusFromOutsideViewport:r,...s}=t,c=Pc(i2,l);return d.jsx(Kc,{tabIndex:0,...s,ref:i,style:{position:"fixed"},onFocus:u=>{var p;const h=u.relatedTarget;!((p=c.viewport)!=null&&p.contains(h))&&r()}})});mh.displayName=i2;var mo="Toast",e8="toast.swipeStart",t8="toast.swipeMove",n8="toast.swipeCancel",i8="toast.swipeEnd",a2=C.forwardRef((t,i)=>{const{forceMount:l,open:r,defaultOpen:s,onOpenChange:c,...u}=t,[h,g]=v6({prop:r,defaultProp:s??!0,onChange:c,caller:mo});return d.jsx(Qc,{present:l||h,children:d.jsx(r8,{open:h,...u,ref:i,onClose:()=>g(!1),onPause:Fi(t.onPause),onResume:Fi(t.onResume),onSwipeStart:dt(t.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:dt(t.onSwipeMove,p=>{const{x:y,y:x}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${y}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${x}px`)}),onSwipeCancel:dt(t.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:dt(t.onSwipeEnd,p=>{const{x:y,y:x}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${y}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${x}px`),g(!1)})})})});a2.displayName=mo;var[a8,l8]=Wb(mo,{onClose(){}}),r8=C.forwardRef((t,i)=>{const{__scopeToast:l,type:r="foreground",duration:s,open:c,onClose:u,onEscapeKeyDown:h,onPause:g,onResume:p,onSwipeStart:y,onSwipeMove:x,onSwipeCancel:v,onSwipeEnd:w,...S}=t,_=Pc(mo,l),[E,j]=C.useState(null),R=pn(i,D=>j(D)),N=C.useRef(null),A=C.useRef(null),z=s||_.duration,k=C.useRef(0),L=C.useRef(z),U=C.useRef(0),{onToastAdd:K,onToastRemove:ie}=_,G=Fi(()=>{var Z;(E==null?void 0:E.contains(document.activeElement))&&((Z=_.viewport)==null||Z.focus()),u()}),Q=C.useCallback(D=>{!D||D===1/0||(window.clearTimeout(U.current),k.current=new Date().getTime(),U.current=window.setTimeout(G,D))},[G]);C.useEffect(()=>{const D=_.viewport;if(D){const Z=()=>{Q(L.current),p==null||p()},M=()=>{const H=new Date().getTime()-k.current;L.current=L.current-H,window.clearTimeout(U.current),g==null||g()};return D.addEventListener(dh,M),D.addEventListener(hh,Z),()=>{D.removeEventListener(dh,M),D.removeEventListener(hh,Z)}}},[_.viewport,z,g,p,Q]),C.useEffect(()=>{c&&!_.isClosePausedRef.current&&Q(z)},[c,z,_.isClosePausedRef,Q]),C.useEffect(()=>(K(),()=>ie()),[K,ie]);const te=C.useMemo(()=>E?f2(E):null,[E]);return _.viewport?d.jsxs(d.Fragment,{children:[te&&d.jsx(o8,{__scopeToast:l,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:te}),d.jsx(a8,{scope:l,onClose:G,children:Lc.createPortal(d.jsx(am.ItemSlot,{scope:l,children:d.jsx(YM,{asChild:!0,onEscapeKeyDown:dt(h,()=>{_.isFocusedToastEscapeKeyDownRef.current||G(),_.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(Dt.li,{tabIndex:0,"data-state":c?"open":"closed","data-swipe-direction":_.swipeDirection,...S,ref:R,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:dt(t.onKeyDown,D=>{D.key==="Escape"&&(h==null||h(D.nativeEvent),D.nativeEvent.defaultPrevented||(_.isFocusedToastEscapeKeyDownRef.current=!0,G()))}),onPointerDown:dt(t.onPointerDown,D=>{D.button===0&&(N.current={x:D.clientX,y:D.clientY})}),onPointerMove:dt(t.onPointerMove,D=>{if(!N.current)return;const Z=D.clientX-N.current.x,M=D.clientY-N.current.y,H=!!A.current,B=["left","right"].includes(_.swipeDirection),Y=["left","up"].includes(_.swipeDirection)?Math.min:Math.max,q=B?Y(0,Z):0,O=B?0:Y(0,M),V=D.pointerType==="touch"?10:2,W={x:q,y:O},ne={originalEvent:D,delta:W};H?(A.current=W,Js(t8,x,ne,{discrete:!1})):By(W,_.swipeDirection,V)?(A.current=W,Js(e8,y,ne,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(Z)>V||Math.abs(M)>V)&&(N.current=null)}),onPointerUp:dt(t.onPointerUp,D=>{const Z=A.current,M=D.target;if(M.hasPointerCapture(D.pointerId)&&M.releasePointerCapture(D.pointerId),A.current=null,N.current=null,Z){const H=D.currentTarget,B={originalEvent:D,delta:Z};By(Z,_.swipeDirection,_.swipeThreshold)?Js(i8,w,B,{discrete:!0}):Js(n8,v,B,{discrete:!0}),H.addEventListener("click",Y=>Y.preventDefault(),{once:!0})}})})})}),_.viewport)})]}):null}),o8=t=>{const{__scopeToast:i,children:l,...r}=t,s=Pc(mo,i),[c,u]=C.useState(!1),[h,g]=C.useState(!1);return u8(()=>u(!0)),C.useEffect(()=>{const p=window.setTimeout(()=>g(!0),1e3);return()=>window.clearTimeout(p)},[]),h?null:d.jsx(em,{asChild:!0,children:d.jsx(Kc,{...r,children:c&&d.jsxs(d.Fragment,{children:[s.label," ",l]})})})},s8="ToastTitle",l2=C.forwardRef((t,i)=>{const{__scopeToast:l,...r}=t;return d.jsx(Dt.div,{...r,ref:i})});l2.displayName=s8;var c8="ToastDescription",r2=C.forwardRef((t,i)=>{const{__scopeToast:l,...r}=t;return d.jsx(Dt.div,{...r,ref:i})});r2.displayName=c8;var o2="ToastAction",s2=C.forwardRef((t,i)=>{const{altText:l,...r}=t;return l.trim()?d.jsx(u2,{altText:l,asChild:!0,children:d.jsx(lm,{...r,ref:i})}):(console.error(`Invalid prop \`altText\` supplied to \`${o2}\`. Expected non-empty \`string\`.`),null)});s2.displayName=o2;var c2="ToastClose",lm=C.forwardRef((t,i)=>{const{__scopeToast:l,...r}=t,s=l8(c2,l);return d.jsx(u2,{asChild:!0,children:d.jsx(Dt.button,{type:"button",...r,ref:i,onClick:dt(t.onClick,s.onClose)})})});lm.displayName=c2;var u2=C.forwardRef((t,i)=>{const{__scopeToast:l,altText:r,...s}=t;return d.jsx(Dt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:i})});function f2(t){const i=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&i.push(r.textContent),f8(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",c=r.dataset.radixToastAnnounceExclude==="";if(!s)if(c){const u=r.dataset.radixToastAnnounceAlt;u&&i.push(u)}else i.push(...f2(r))}}),i}function Js(t,i,l,{discrete:r}){const s=l.originalEvent.currentTarget,c=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:l});i&&s.addEventListener(t,i,{once:!0}),r?yb(s,c):s.dispatchEvent(c)}var By=(t,i,l=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),c=r>s;return i==="left"||i==="right"?c&&r>l:!c&&s>l};function u8(t=()=>{}){const i=Fi(t);Pi(()=>{let l=0,r=0;return l=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(i)),()=>{window.cancelAnimationFrame(l),window.cancelAnimationFrame(r)}},[i])}function f8(t){return t.nodeType===t.ELEMENT_NODE}function d8(t){const i=[],l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;l.nextNode();)i.push(l.currentNode);return i}function $d(t){const i=document.activeElement;return t.some(l=>l===i?!0:(l.focus(),document.activeElement!==i))}var h8=e2,d2=n2,h2=a2,m2=l2,p2=r2,g2=s2,x2=lm;const m8=h8,y2=C.forwardRef(({className:t,...i},l)=>d.jsx(d2,{ref:l,className:Se("fixed top-0 right-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:flex-col md:max-w-[420px]",t),...i}));y2.displayName=d2.displayName;const p8=Ah("group pointer-events-auto relative flex w-full items-center justify-between gap-4 overflow-hidden rounded-xl border p-4 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full",{variants:{variant:{default:"border-border/50 bg-zinc-900/95 text-foreground backdrop-blur-sm",success:"border-emerald-500/30 bg-emerald-950/95 text-emerald-50 backdrop-blur-sm",error:"border-red-500/30 bg-red-950/95 text-red-50 backdrop-blur-sm",info:"border-blue-500/30 bg-blue-950/95 text-blue-50 backdrop-blur-sm"}},defaultVariants:{variant:"default"}}),v2=C.forwardRef(({className:t,variant:i,...l},r)=>d.jsx(h2,{ref:r,className:Se(p8({variant:i}),t),...l}));v2.displayName=h2.displayName;const g8=C.forwardRef(({className:t,...i},l)=>d.jsx(g2,{ref:l,className:Se("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50",t),...i}));g8.displayName=g2.displayName;const b2=C.forwardRef(({className:t,...i},l)=>d.jsx(x2,{ref:l,className:Se("absolute right-3 top-3 rounded-md p-1.5 cursor-pointer","text-foreground/40 hover:text-foreground hover:bg-white/10","transition-all duration-150","focus:outline-none focus:ring-2 focus:ring-white/20",t),"toast-close":"",...i,children:d.jsx(jc,{className:"h-4 w-4"})}));b2.displayName=x2.displayName;const w2=C.forwardRef(({className:t,...i},l)=>d.jsx(m2,{ref:l,className:Se("text-sm font-semibold",t),...i}));w2.displayName=m2.displayName;const S2=C.forwardRef(({className:t,...i},l)=>d.jsx(p2,{ref:l,className:Se("text-sm opacity-90",t),...i}));S2.displayName=p2.displayName;const x8=({variant:t})=>{switch(t){case"success":return d.jsx(PN,{className:"h-5 w-5 text-emerald-400"});case"error":return d.jsx(hv,{className:"h-5 w-5 text-red-400"});case"info":return d.jsx(rc,{className:"h-5 w-5 text-blue-400"});default:return null}};function Uy(){const{toasts:t,removeToast:i}=qy();return d.jsxs(m8,{swipeDirection:"right",children:[t.map(l=>d.jsxs(v2,{variant:l.variant,duration:l.duration??4e3,onOpenChange:r=>{r||i(l.id)},children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(x8,{variant:l.variant}),d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx(w2,{children:l.title}),l.description&&d.jsx(S2,{children:l.description})]})]}),d.jsx(b2,{})]},l.id)),d.jsx(y2,{})]})}function y8(){const{completed:t}=Ma();return t?d.jsxs(Ly,{children:[d.jsx(g4,{children:i=>{switch(i){case"overview":return d.jsx(mx,{});case"architecture":return d.jsx(IT,{});case"files":return d.jsx(H4,{});case"timeline":return d.jsx(aM,{});case"logs":return d.jsx(sM,{});case"security":return d.jsx(vM,{});default:return d.jsx(mx,{})}}}),d.jsx(Uy,{})]}):d.jsxs(Ly,{children:[d.jsx(wM,{}),d.jsx(Uy,{})]})}_h(Eh.getState().theme);window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Eh.getState().theme==="system"&&_h("system")});HS.createRoot(document.getElementById("root")).render(d.jsx(C.StrictMode,{children:d.jsx(y8,{})}));