openclaw-memory-mapper 1.0.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,351 @@
1
+ function sS(t,i){for(var a=0;a<i.length;a++){const r=i[a];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 a(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=a(s);fetch(s.href,c)}})();function oh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var rd={exports:{}},Dr={};/**
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 zg;function cS(){if(zg)return Dr;zg=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function a(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 Dr.Fragment=i,Dr.jsx=a,Dr.jsxs=a,Dr}var Rg;function uS(){return Rg||(Rg=1,rd.exports=cS()),rd.exports}var g=uS(),od={exports:{}},_e={};/**
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 Og;function fS(){if(Og)return _e;Og=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),a=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"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function w(R){return R===null||typeof R!="object"?null:(R=v&&R[v]||R["@@iterator"],typeof R=="function"?R:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,E={};function C(R,Y,P){this.props=R,this.context=Y,this.refs=E,this.updater=P||S}C.prototype.isReactComponent={},C.prototype.setState=function(R,Y){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,Y,"setState")},C.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function j(){}j.prototype=C.prototype;function N(R,Y,P){this.props=R,this.context=Y,this.refs=E,this.updater=P||S}var A=N.prototype=new j;A.constructor=N,_(A,C.prototype),A.isPureReactComponent=!0;var H=Array.isArray;function k(){}var L={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function Z(R,Y,P){var ee=P.ref;return{$$typeof:t,type:R,key:Y,ref:ee!==void 0?ee:null,props:P}}function le(R,Y){return Z(R.type,Y,R.props)}function Q(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function X(R){var Y={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(P){return Y[P]})}var te=/\/+/g;function D(R,Y){return typeof R=="object"&&R!==null&&R.key!=null?X(""+R.key):Y.toString(36)}function G(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(k,k):(R.status="pending",R.then(function(Y){R.status==="pending"&&(R.status="fulfilled",R.value=Y)},function(Y){R.status==="pending"&&(R.status="rejected",R.reason=Y)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function z(R,Y,P,ee,se){var ue=typeof R;(ue==="undefined"||ue==="boolean")&&(R=null);var oe=!1;if(R===null)oe=!0;else switch(ue){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(R.$$typeof){case t:case i:oe=!0;break;case x:return oe=R._init,z(oe(R._payload),Y,P,ee,se)}}if(oe)return se=se(R),oe=ee===""?"."+D(R,0):ee,H(se)?(P="",oe!=null&&(P=oe.replace(te,"$&/")+"/"),z(se,Y,P,"",function(we){return we})):se!=null&&(Q(se)&&(se=le(se,P+(se.key==null||R&&R.key===se.key?"":(""+se.key).replace(te,"$&/")+"/")+oe)),Y.push(se)),1;oe=0;var ce=ee===""?".":ee+":";if(H(R))for(var fe=0;fe<R.length;fe++)ee=R[fe],ue=ce+D(ee,fe),oe+=z(ee,Y,P,ue,se);else if(fe=w(R),typeof fe=="function")for(R=fe.call(R),fe=0;!(ee=R.next()).done;)ee=ee.value,ue=ce+D(ee,fe++),oe+=z(ee,Y,P,ue,se);else if(ue==="object"){if(typeof R.then=="function")return z(G(R),Y,P,ee,se);throw Y=String(R),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return oe}function B(R,Y,P){if(R==null)return R;var ee=[],se=0;return z(R,ee,"","",function(ue){return Y.call(P,ue,se++)}),ee}function O(R){if(R._status===-1){var Y=R._result;Y=Y(),Y.then(function(P){(R._status===0||R._status===-1)&&(R._status=1,R._result=P)},function(P){(R._status===0||R._status===-1)&&(R._status=2,R._result=P)}),R._status===-1&&(R._status=0,R._result=Y)}if(R._status===1)return R._result.default;throw R._result}var $=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},J={map:B,forEach:function(R,Y,P){B(R,function(){Y.apply(this,arguments)},P)},count:function(R){var Y=0;return B(R,function(){Y++}),Y},toArray:function(R){return B(R,function(Y){return Y})||[]},only:function(R){if(!Q(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return _e.Activity=y,_e.Children=J,_e.Component=C,_e.Fragment=a,_e.Profiler=s,_e.PureComponent=N,_e.StrictMode=r,_e.Suspense=p,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,_e.__COMPILER_RUNTIME={__proto__:null,c:function(R){return L.H.useMemoCache(R)}},_e.cache=function(R){return function(){return R.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(R,Y,P){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ee=_({},R.props),se=R.key;if(Y!=null)for(ue in Y.key!==void 0&&(se=""+Y.key),Y)!V.call(Y,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&Y.ref===void 0||(ee[ue]=Y[ue]);var ue=arguments.length-2;if(ue===1)ee.children=P;else if(1<ue){for(var oe=Array(ue),ce=0;ce<ue;ce++)oe[ce]=arguments[ce+2];ee.children=oe}return Z(R.type,se,ee)},_e.createContext=function(R){return R={$$typeof:u,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:c,_context:R},R},_e.createElement=function(R,Y,P){var ee,se={},ue=null;if(Y!=null)for(ee in Y.key!==void 0&&(ue=""+Y.key),Y)V.call(Y,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(se[ee]=Y[ee]);var oe=arguments.length-2;if(oe===1)se.children=P;else if(1<oe){for(var ce=Array(oe),fe=0;fe<oe;fe++)ce[fe]=arguments[fe+2];se.children=ce}if(R&&R.defaultProps)for(ee in oe=R.defaultProps,oe)se[ee]===void 0&&(se[ee]=oe[ee]);return Z(R,ue,se)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(R){return{$$typeof:h,render:R}},_e.isValidElement=Q,_e.lazy=function(R){return{$$typeof:x,_payload:{_status:-1,_result:R},_init:O}},_e.memo=function(R,Y){return{$$typeof:m,type:R,compare:Y===void 0?null:Y}},_e.startTransition=function(R){var Y=L.T,P={};L.T=P;try{var ee=R(),se=L.S;se!==null&&se(P,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(k,$)}catch(ue){$(ue)}finally{Y!==null&&P.types!==null&&(Y.types=P.types),L.T=Y}},_e.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},_e.use=function(R){return L.H.use(R)},_e.useActionState=function(R,Y,P){return L.H.useActionState(R,Y,P)},_e.useCallback=function(R,Y){return L.H.useCallback(R,Y)},_e.useContext=function(R){return L.H.useContext(R)},_e.useDebugValue=function(){},_e.useDeferredValue=function(R,Y){return L.H.useDeferredValue(R,Y)},_e.useEffect=function(R,Y){return L.H.useEffect(R,Y)},_e.useEffectEvent=function(R){return L.H.useEffectEvent(R)},_e.useId=function(){return L.H.useId()},_e.useImperativeHandle=function(R,Y,P){return L.H.useImperativeHandle(R,Y,P)},_e.useInsertionEffect=function(R,Y){return L.H.useInsertionEffect(R,Y)},_e.useLayoutEffect=function(R,Y){return L.H.useLayoutEffect(R,Y)},_e.useMemo=function(R,Y){return L.H.useMemo(R,Y)},_e.useOptimistic=function(R,Y){return L.H.useOptimistic(R,Y)},_e.useReducer=function(R,Y,P){return L.H.useReducer(R,Y,P)},_e.useRef=function(R){return L.H.useRef(R)},_e.useState=function(R){return L.H.useState(R)},_e.useSyncExternalStore=function(R,Y,P){return L.H.useSyncExternalStore(R,Y,P)},_e.useTransition=function(){return L.H.useTransition()},_e.version="19.2.4",_e}var Dg;function to(){return Dg||(Dg=1,od.exports=fS()),od.exports}var T=to();const qt=oh(T),Tx=sS({__proto__:null,default:qt},[T]);var sd={exports:{}},kr={},cd={exports:{}},ud={};/**
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 kg;function dS(){return kg||(kg=1,(function(t){function i(z,B){var O=z.length;z.push(B);e:for(;0<O;){var $=O-1>>>1,J=z[$];if(0<s(J,B))z[$]=B,z[O]=J,O=$;else break e}}function a(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var B=z[0],O=z.pop();if(O!==B){z[0]=O;e:for(var $=0,J=z.length,R=J>>>1;$<R;){var Y=2*($+1)-1,P=z[Y],ee=Y+1,se=z[ee];if(0>s(P,O))ee<J&&0>s(se,P)?(z[$]=se,z[ee]=O,$=ee):(z[$]=P,z[Y]=O,$=Y);else if(ee<J&&0>s(se,O))z[$]=se,z[ee]=O,$=ee;else break e}}return B}function s(z,B){var O=z.sortIndex-B.sortIndex;return O!==0?O:z.id-B.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 p=[],m=[],x=1,y=null,v=3,w=!1,S=!1,_=!1,E=!1,C=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function A(z){for(var B=a(m);B!==null;){if(B.callback===null)r(m);else if(B.startTime<=z)r(m),B.sortIndex=B.expirationTime,i(p,B);else break;B=a(m)}}function H(z){if(_=!1,A(z),!S)if(a(p)!==null)S=!0,k||(k=!0,X());else{var B=a(m);B!==null&&G(H,B.startTime-z)}}var k=!1,L=-1,V=5,Z=-1;function le(){return E?!0:!(t.unstable_now()-Z<V)}function Q(){if(E=!1,k){var z=t.unstable_now();Z=z;var B=!0;try{e:{S=!1,_&&(_=!1,j(L),L=-1),w=!0;var O=v;try{t:{for(A(z),y=a(p);y!==null&&!(y.expirationTime>z&&le());){var $=y.callback;if(typeof $=="function"){y.callback=null,v=y.priorityLevel;var J=$(y.expirationTime<=z);if(z=t.unstable_now(),typeof J=="function"){y.callback=J,A(z),B=!0;break t}y===a(p)&&r(p),A(z)}else r(p);y=a(p)}if(y!==null)B=!0;else{var R=a(m);R!==null&&G(H,R.startTime-z),B=!1}}break e}finally{y=null,v=O,w=!1}B=void 0}}finally{B?X():k=!1}}}var X;if(typeof N=="function")X=function(){N(Q)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,D=te.port2;te.port1.onmessage=Q,X=function(){D.postMessage(null)}}else X=function(){C(Q,0)};function G(z,B){L=C(function(){z(t.unstable_now())},B)}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(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<z?Math.floor(1e3/z):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(z){switch(v){case 1:case 2:case 3:var B=3;break;default:B=v}var O=v;v=B;try{return z()}finally{v=O}},t.unstable_requestPaint=function(){E=!0},t.unstable_runWithPriority=function(z,B){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var O=v;v=z;try{return B()}finally{v=O}},t.unstable_scheduleCallback=function(z,B,O){var $=t.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?$+O:$):O=$,z){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=O+J,z={id:x++,callback:B,priorityLevel:z,startTime:O,expirationTime:J,sortIndex:-1},O>$?(z.sortIndex=O,i(m,z),a(p)===null&&z===a(m)&&(_?(j(L),L=-1):_=!0,G(H,O-$))):(z.sortIndex=J,i(p,z),S||w||(S=!0,k||(k=!0,X()))),z},t.unstable_shouldYield=le,t.unstable_wrapCallback=function(z){var B=v;return function(){var O=v;v=B;try{return z.apply(this,arguments)}finally{v=O}}}})(ud)),ud}var Lg;function hS(){return Lg||(Lg=1,cd.exports=dS()),cd.exports}var fd={exports:{}},wt={};/**
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 Hg;function mS(){if(Hg)return wt;Hg=1;var t=to();function i(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)m+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(i(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(p,m,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:p,containerInfo:m,implementation:x}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,wt.createPortal=function(p,m){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return c(p,m,null,x)},wt.flushSync=function(p){var m=u.T,x=r.p;try{if(u.T=null,r.p=2,p)return p()}finally{u.T=m,r.p=x,r.d.f()}},wt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},wt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},wt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var x=m.as,y=h(x,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;x==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:w}):x==="script"&&r.d.X(p,{crossOrigin:y,integrity:v,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},wt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var x=h(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},wt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var x=m.as,y=h(x,m.crossOrigin);r.d.L(p,x,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},wt.preloadModule=function(p,m){if(typeof p=="string")if(m){var x=h(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},wt.requestFormReset=function(p){r.d.r(p)},wt.unstable_batchedUpdates=function(p,m){return p(m)},wt.useFormState=function(p,m,x){return u.H.useFormState(p,m,x)},wt.useFormStatus=function(){return u.H.useHostTransitionStatus()},wt.version="19.2.4",wt}var Bg;function Ax(){if(Bg)return fd.exports;Bg=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(),fd.exports=mS(),fd.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 Ug;function pS(){if(Ug)return kr;Ug=1;var t=hS(),i=to(),a=Ax();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}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,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l: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 p(e){if(c(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(r(188));return n!==e?null:e}for(var l=e,o=n;;){var f=l.return;if(f===null)break;var d=f.alternate;if(d===null){if(o=f.return,o!==null){l=o;continue}break}if(f.child===d.child){for(d=f.child;d;){if(d===l)return p(f),e;if(d===o)return p(f),n;d=d.sibling}throw Error(r(188))}if(l.return!==o.return)l=f,o=d;else{for(var b=!1,M=f.child;M;){if(M===l){b=!0,l=f,o=d;break}if(M===o){b=!0,o=f,l=d;break}M=M.sibling}if(!b){for(M=d.child;M;){if(M===l){b=!0,l=d,o=f;break}if(M===o){b=!0,o=d,l=f;break}M=M.sibling}if(!b)throw Error(r(189))}}if(l.alternate!==o)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:n}function x(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=x(e),n!==null)return n;e=e.sibling}return null}var y=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"),C=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),N=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function X(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||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 C:return"Profiler";case E:return"StrictMode";case H:return"Suspense";case k:return"SuspenseList";case Z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case N:return e.displayName||"Context";case j: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 V:n=e._payload,e=e._init;try{return D(e(n))}catch{}}return null}var G=Array.isArray,z=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O={pending:!1,data:null,method:null,action:null},$=[],J=-1;function R(e){return{current:e}}function Y(e){0>J||(e.current=$[J],$[J]=null,J--)}function P(e,n){J++,$[J]=e.current,e.current=n}var ee=R(null),se=R(null),ue=R(null),oe=R(null);function ce(e,n){switch(P(ue,n),P(se,e),P(ee,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?eg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=eg(n),e=tg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(ee),P(ee,e)}function fe(){Y(ee),Y(se),Y(ue)}function we(e){e.memoizedState!==null&&P(oe,e);var n=ee.current,l=tg(n,e.type);n!==l&&(P(se,e),P(ee,l))}function ve(e){se.current===e&&(Y(ee),Y(se)),oe.current===e&&(Y(oe),jr._currentValue=O)}var ge,ye;function Ce(e){if(ge===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);ge=n&&n[1]||"",ye=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+ge+e+ye}var Ue=!1;function je(e,n){if(!e||Ue)return"";Ue=!0;var l=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(ne){var W=ne}Reflect.construct(e,[],re)}else{try{re.call()}catch(ne){W=ne}e.call(re.prototype)}}else{try{throw Error()}catch(ne){W=ne}(re=e())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(ne){if(ne&&W&&typeof ne.stack=="string")return[ne.stack,W.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 d=o.DetermineComponentFrameRoot(),b=d[0],M=d[1];if(b&&M){var U=b.split(`
44
+ `),I=M.split(`
45
+ `);for(f=o=0;o<U.length&&!U[o].includes("DetermineComponentFrameRoot");)o++;for(;f<I.length&&!I[f].includes("DetermineComponentFrameRoot");)f++;if(o===U.length||f===I.length)for(o=U.length-1,f=I.length-1;1<=o&&0<=f&&U[o]!==I[f];)f--;for(;1<=o&&0<=f;o--,f--)if(U[o]!==I[f]){if(o!==1||f!==1)do if(o--,f--,0>f||U[o]!==I[f]){var ie=`
46
+ `+U[o].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),ie}while(1<=o&&0<=f);break}}}finally{Ue=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ce(l):""}function nt(e,n){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce("Lazy");case 13:return e.child!==n&&n!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return Ce("Activity");default:return""}}function kt(e){try{var n="",l=null;do n+=nt(e,l),l=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,nn=t.unstable_scheduleCallback,jn=t.unstable_cancelCallback,Pi=t.unstable_shouldYield,Fi=t.unstable_requestPaint,pt=t.unstable_now,Rl=t.unstable_getCurrentPriorityLevel,zn=t.unstable_ImmediatePriority,ci=t.unstable_UserBlockingPriority,Ii=t.unstable_NormalPriority,Yc=t.unstable_LowPriority,Ol=t.unstable_IdlePriority,qc=t.log,Xc=t.unstable_setDisableYieldValue,Ji=null,St=null;function gn(e){if(typeof qc=="function"&&Xc(e),St&&typeof St.setStrictMode=="function")try{St.setStrictMode(Ji,e)}catch{}}var Et=Math.clz32?Math.clz32:Qc,Gc=Math.log,Zc=Math.LN2;function Qc(e){return e>>>=0,e===0?32:31-(Gc(e)/Zc|0)|0}var Dl=256,kl=262144,Ll=4194304;function Rn(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 Hl(e,n,l){var o=e.pendingLanes;if(o===0)return 0;var f=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var M=o&134217727;return M!==0?(o=M&~d,o!==0?f=Rn(o):(b&=M,b!==0?f=Rn(b):l||(l=M&~e,l!==0&&(f=Rn(l))))):(M=o&~d,M!==0?f=Rn(M):b!==0?f=Rn(b):l||(l=o&~e,l!==0&&(f=Rn(l)))),f===0?0:n!==0&&n!==f&&(n&d)===0&&(d=f&-f,l=n&-n,d>=l||d===32&&(l&4194048)!==0)?n:f}function Wi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Kc(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 fo(){var e=Ll;return Ll<<=1,(Ll&62914560)===0&&(Ll=4194304),e}function $a(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function el(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Pc(e,n,l,o,f,d){var b=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var M=e.entanglements,U=e.expirationTimes,I=e.hiddenUpdates;for(l=b&~l;0<l;){var ie=31-Et(l),re=1<<ie;M[ie]=0,U[ie]=-1;var W=I[ie];if(W!==null)for(I[ie]=null,ie=0;ie<W.length;ie++){var ne=W[ie];ne!==null&&(ne.lane&=-536870913)}l&=~re}o!==0&&ho(e,o,0),d!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~n))}function ho(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-Et(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|l&261930}function mo(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var o=31-Et(l),f=1<<o;f&n|e[o]&n&&(e[o]|=n),l&=~f}}function po(e,n){var l=n&-n;return l=(l&42)!==0?1:Ya(l),(l&(e.suspendedLanes|n))!==0?0:l}function Ya(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 qa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function go(){var e=B.p;return e!==0?e:(e=window.event,e===void 0?32:Ng(e.type))}function yo(e,n){var l=B.p;try{return B.p=e,n()}finally{B.p=l}}var yn=Math.random().toString(36).slice(2),ct="__reactFiber$"+yn,bt="__reactProps$"+yn,On="__reactContainer$"+yn,Bl="__reactEvents$"+yn,xo="__reactListeners$"+yn,Fc="__reactHandles$"+yn,vo="__reactResources$"+yn,tl="__reactMarker$"+yn;function Xa(e){delete e[ct],delete e[bt],delete e[Bl],delete e[xo],delete e[Fc]}function ui(e){var n=e[ct];if(n)return n;for(var l=e.parentNode;l;){if(n=l[On]||l[ct]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=sg(e);e!==null;){if(l=e[ct])return l;e=sg(e)}return n}e=l,l=e.parentNode}return null}function fi(e){if(e=e[ct]||e[On]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function di(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function hi(e){var n=e[vo];return n||(n=e[vo]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function it(e){e[tl]=!0}var bo=new Set,wo={};function Dn(e,n){mi(e,n),mi(e+"Capture",n)}function mi(e,n){for(wo[e]=n,e=0;e<n.length;e++)bo.add(n[e])}var Ic=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]*$"),Ga={},So={};function Jc(e){return ht.call(So,e)?!0:ht.call(Ga,e)?!1:Ic.test(e)?So[e]=!0:(Ga[e]=!0,!1)}function Ul(e,n,l){if(Jc(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){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,""+l)}}function Vl(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function ln(e,n,l,o){if(o===null)e.removeAttribute(l);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+o)}}function _t(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Eo(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Wc(e,n,l){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,d=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(b){l=""+b,d.call(this,b)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(b){l=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function pi(e){if(!e._valueTracker){var n=Eo(e)?"checked":"value";e._valueTracker=Wc(e,n,""+e[n])}}function No(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),o="";return e&&(o=Eo(e)?e.checked?"true":"false":e.value),e=o,e!==l?(n.setValue(e),!0):!1}function nl(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 eu=/[\n"\\]/g;function Ct(e){return e.replace(eu,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function il(e,n,l,o,f,d,b,M){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=""+_t(n)):e.value!==""+_t(n)&&(e.value=""+_t(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?Za(e,b,_t(n)):l!=null?Za(e,b,_t(l)):o!=null&&e.removeAttribute("value"),f==null&&d!=null&&(e.defaultChecked=!!d),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.name=""+_t(M):e.removeAttribute("name")}function _o(e,n,l,o,f,d,b,M){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){pi(e);return}l=l!=null?""+_t(l):"",n=n!=null?""+_t(n):l,M||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=M?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),pi(e)}function Za(e,n,l){n==="number"&&nl(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function kn(e,n,l,o){if(e=e.options,n){n={};for(var f=0;f<l.length;f++)n["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=n.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&o&&(e[l].defaultSelected=!0)}else{for(l=""+_t(l),n=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function Ph(e,n,l){if(n!=null&&(n=""+_t(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+_t(l):""}function Fh(e,n,l,o){if(n==null){if(o!=null){if(l!=null)throw Error(r(92));if(G(o)){if(1<o.length)throw Error(r(93));o=o[0]}l=o}l==null&&(l=""),n=l}l=_t(n),e.defaultValue=l,o=e.textContent,o===l&&o!==""&&o!==null&&(e.value=o),pi(e)}function $l(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var i2=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 Ih(e,n,l){var o=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,l):typeof l!="number"||l===0||i2.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function Jh(e,n,l){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,l!=null){for(var o in l)!l.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)&&l[f]!==o&&Ih(e,f,o)}else for(var d in n)n.hasOwnProperty(d)&&Ih(e,d,n[d])}function tu(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 l2=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"]]),a2=/^[\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 Co(e){return a2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ln(){}var nu=null;function iu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yl=null,ql=null;function Wh(e){var n=fi(e);if(n&&(e=n.stateNode)){var l=e[bt]||null;e:switch(e=n.stateNode,n.type){case"input":if(il(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ct(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var o=l[n];if(o!==e&&o.form===e.form){var f=o[bt]||null;if(!f)throw Error(r(90));il(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<l.length;n++)o=l[n],o.form===e.form&&No(o)}break e;case"textarea":Ph(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&kn(e,!!l.multiple,n,!1)}}}var lu=!1;function em(e,n,l){if(lu)return e(n,l);lu=!0;try{var o=e(n);return o}finally{if(lu=!1,(Yl!==null||ql!==null)&&(hs(),Yl&&(n=Yl,e=ql,ql=Yl=null,Wh(n),e)))for(n=0;n<e.length;n++)Wh(e[n])}}function Qa(e,n){var l=e.stateNode;if(l===null)return null;var o=l[bt]||null;if(o===null)return null;l=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(l&&typeof l!="function")throw Error(r(231,n,typeof l));return l}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),au=!1;if(Hn)try{var Ka={};Object.defineProperty(Ka,"passive",{get:function(){au=!0}}),window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{au=!1}var gi=null,ru=null,To=null;function tm(){if(To)return To;var e,n=ru,l=n.length,o,f="value"in gi?gi.value:gi.textContent,d=f.length;for(e=0;e<l&&n[e]===f[e];e++);var b=l-e;for(o=1;o<=b&&n[l-o]===f[d-o];o++);return To=f.slice(e,1<o?1-o:void 0)}function Ao(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 Mo(){return!0}function nm(){return!1}function Tt(e){function n(l,o,f,d,b){this._reactName=l,this._targetInst=f,this.type=o,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var M in e)e.hasOwnProperty(M)&&(l=e[M],this[M]=l?l(d):d[M]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Mo:nm,this.isPropagationStopped=nm,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Mo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Mo)},persist:function(){},isPersistent:Mo}),n}var ll={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jo=Tt(ll),Pa=y({},ll,{view:0,detail:0}),r2=Tt(Pa),ou,su,Fa,zo=y({},Pa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uu,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!==Fa&&(Fa&&e.type==="mousemove"?(ou=e.screenX-Fa.screenX,su=e.screenY-Fa.screenY):su=ou=0,Fa=e),ou)},movementY:function(e){return"movementY"in e?e.movementY:su}}),im=Tt(zo),o2=y({},zo,{dataTransfer:0}),s2=Tt(o2),c2=y({},Pa,{relatedTarget:0}),cu=Tt(c2),u2=y({},ll,{animationName:0,elapsedTime:0,pseudoElement:0}),f2=Tt(u2),d2=y({},ll,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),h2=Tt(d2),m2=y({},ll,{data:0}),lm=Tt(m2),p2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g2={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"},y2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function x2(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=y2[e])?!!n[e]:!1}function uu(){return x2}var v2=y({},Pa,{key:function(e){if(e.key){var n=p2[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?g2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uu,charCode:function(e){return e.type==="keypress"?Ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),b2=Tt(v2),w2=y({},zo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),am=Tt(w2),S2=y({},Pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uu}),E2=Tt(S2),N2=y({},ll,{propertyName:0,elapsedTime:0,pseudoElement:0}),_2=Tt(N2),C2=y({},zo,{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}),T2=Tt(C2),A2=y({},ll,{newState:0,oldState:0}),M2=Tt(A2),j2=[9,13,27,32],fu=Hn&&"CompositionEvent"in window,Ia=null;Hn&&"documentMode"in document&&(Ia=document.documentMode);var z2=Hn&&"TextEvent"in window&&!Ia,rm=Hn&&(!fu||Ia&&8<Ia&&11>=Ia),om=" ",sm=!1;function cm(e,n){switch(e){case"keyup":return j2.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function um(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xl=!1;function R2(e,n){switch(e){case"compositionend":return um(n);case"keypress":return n.which!==32?null:(sm=!0,om);case"textInput":return e=n.data,e===om&&sm?null:e;default:return null}}function O2(e,n){if(Xl)return e==="compositionend"||!fu&&cm(e,n)?(e=tm(),To=ru=gi=null,Xl=!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 rm&&n.locale!=="ko"?null:n.data;default:return null}}var D2={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 fm(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!D2[e.type]:n==="textarea"}function dm(e,n,l,o){Yl?ql?ql.push(o):ql=[o]:Yl=o,n=bs(n,"onChange"),0<n.length&&(l=new jo("onChange","change",null,l,o),e.push({event:l,listeners:n}))}var Ja=null,Wa=null;function k2(e){Kp(e,0)}function Ro(e){var n=di(e);if(No(n))return e}function hm(e,n){if(e==="change")return n}var mm=!1;if(Hn){var du;if(Hn){var hu="oninput"in document;if(!hu){var pm=document.createElement("div");pm.setAttribute("oninput","return;"),hu=typeof pm.oninput=="function"}du=hu}else du=!1;mm=du&&(!document.documentMode||9<document.documentMode)}function gm(){Ja&&(Ja.detachEvent("onpropertychange",ym),Wa=Ja=null)}function ym(e){if(e.propertyName==="value"&&Ro(Wa)){var n=[];dm(n,Wa,e,iu(e)),em(k2,n)}}function L2(e,n,l){e==="focusin"?(gm(),Ja=n,Wa=l,Ja.attachEvent("onpropertychange",ym)):e==="focusout"&&gm()}function H2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ro(Wa)}function B2(e,n){if(e==="click")return Ro(n)}function U2(e,n){if(e==="input"||e==="change")return Ro(n)}function V2(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Lt=typeof Object.is=="function"?Object.is:V2;function er(e,n){if(Lt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),o=Object.keys(n);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var f=l[o];if(!ht.call(n,f)||!Lt(e[f],n[f]))return!1}return!0}function xm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vm(e,n){var l=xm(e);e=0;for(var o;l;){if(l.nodeType===3){if(o=e+l.textContent.length,e<=n&&o>=n)return{node:l,offset:n-e};e=o}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=xm(l)}}function bm(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?bm(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function wm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=nl(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=nl(e.document)}return n}function mu(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 $2=Hn&&"documentMode"in document&&11>=document.documentMode,Gl=null,pu=null,tr=null,gu=!1;function Sm(e,n,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;gu||Gl==null||Gl!==nl(o)||(o=Gl,"selectionStart"in o&&mu(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}),tr&&er(tr,o)||(tr=o,o=bs(pu,"onSelect"),0<o.length&&(n=new jo("onSelect","select",null,n,l),e.push({event:n,listeners:o}),n.target=Gl)))}function al(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var Zl={animationend:al("Animation","AnimationEnd"),animationiteration:al("Animation","AnimationIteration"),animationstart:al("Animation","AnimationStart"),transitionrun:al("Transition","TransitionRun"),transitionstart:al("Transition","TransitionStart"),transitioncancel:al("Transition","TransitionCancel"),transitionend:al("Transition","TransitionEnd")},yu={},Em={};Hn&&(Em=document.createElement("div").style,"AnimationEvent"in window||(delete Zl.animationend.animation,delete Zl.animationiteration.animation,delete Zl.animationstart.animation),"TransitionEvent"in window||delete Zl.transitionend.transition);function rl(e){if(yu[e])return yu[e];if(!Zl[e])return e;var n=Zl[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in Em)return yu[e]=n[l];return e}var Nm=rl("animationend"),_m=rl("animationiteration"),Cm=rl("animationstart"),Y2=rl("transitionrun"),q2=rl("transitionstart"),X2=rl("transitioncancel"),Tm=rl("transitionend"),Am=new Map,xu="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(" ");xu.push("scrollEnd");function an(e,n){Am.set(e,n),Dn(n,[e])}var Oo=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)},Kt=[],Ql=0,vu=0;function Do(){for(var e=Ql,n=vu=Ql=0;n<e;){var l=Kt[n];Kt[n++]=null;var o=Kt[n];Kt[n++]=null;var f=Kt[n];Kt[n++]=null;var d=Kt[n];if(Kt[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}d!==0&&Mm(l,f,d)}}function ko(e,n,l,o){Kt[Ql++]=e,Kt[Ql++]=n,Kt[Ql++]=l,Kt[Ql++]=o,vu|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function bu(e,n,l,o){return ko(e,n,l,o),Lo(e)}function ol(e,n){return ko(e,null,null,n),Lo(e)}function Mm(e,n,l){e.lanes|=l;var o=e.alternate;o!==null&&(o.lanes|=l);for(var f=!1,d=e.return;d!==null;)d.childLanes|=l,o=d.alternate,o!==null&&(o.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(f=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,f&&n!==null&&(f=31-Et(l),e=d.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=l|536870912),d):null}function Lo(e){if(50<Er)throw Er=0,jf=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Kl={};function G2(e,n,l,o){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=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 Ht(e,n,l,o){return new G2(e,n,l,o)}function wu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bn(e,n){var l=e.alternate;return l===null?(l=Ht(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function jm(e,n){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Ho(e,n,l,o,f,d){var b=0;if(o=e,typeof e=="function")wu(e)&&(b=1);else if(typeof e=="string")b=Fw(e,l,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Z:return e=Ht(31,l,n,f),e.elementType=Z,e.lanes=d,e;case _:return sl(l.children,f,d,n);case E:b=8,f|=24;break;case C:return e=Ht(12,l,n,f|2),e.elementType=C,e.lanes=d,e;case H:return e=Ht(13,l,n,f),e.elementType=H,e.lanes=d,e;case k:return e=Ht(19,l,n,f),e.elementType=k,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case N:b=10;break e;case j:b=9;break e;case A:b=11;break e;case L:b=14;break e;case V:b=16,o=null;break e}b=29,l=Error(r(130,e===null?"null":typeof e,"")),o=null}return n=Ht(b,l,n,f),n.elementType=e,n.type=o,n.lanes=d,n}function sl(e,n,l,o){return e=Ht(7,e,o,n),e.lanes=l,e}function Su(e,n,l){return e=Ht(6,e,null,n),e.lanes=l,e}function zm(e){var n=Ht(18,null,null,0);return n.stateNode=e,n}function Eu(e,n,l){return n=Ht(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Rm=new WeakMap;function Pt(e,n){if(typeof e=="object"&&e!==null){var l=Rm.get(e);return l!==void 0?l:(n={value:e,source:n,stack:kt(n)},Rm.set(e,n),n)}return{value:e,source:n,stack:kt(n)}}var Pl=[],Fl=0,Bo=null,nr=0,Ft=[],It=0,yi=null,xn=1,vn="";function Un(e,n){Pl[Fl++]=nr,Pl[Fl++]=Bo,Bo=e,nr=n}function Om(e,n,l){Ft[It++]=xn,Ft[It++]=vn,Ft[It++]=yi,yi=e;var o=xn;e=vn;var f=32-Et(o)-1;o&=~(1<<f),l+=1;var d=32-Et(n)+f;if(30<d){var b=f-f%5;d=(o&(1<<b)-1).toString(32),o>>=b,f-=b,xn=1<<32-Et(n)+f|l<<f|o,vn=d+e}else xn=1<<d|l<<f|o,vn=e}function Nu(e){e.return!==null&&(Un(e,1),Om(e,1,0))}function _u(e){for(;e===Bo;)Bo=Pl[--Fl],Pl[Fl]=null,nr=Pl[--Fl],Pl[Fl]=null;for(;e===yi;)yi=Ft[--It],Ft[It]=null,vn=Ft[--It],Ft[It]=null,xn=Ft[--It],Ft[It]=null}function Dm(e,n){Ft[It++]=xn,Ft[It++]=vn,Ft[It++]=yi,xn=n.id,vn=n.overflow,yi=e}var gt=null,Qe=null,ke=!1,xi=null,Jt=!1,Cu=Error(r(519));function vi(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ir(Pt(n,e)),Cu}function km(e){var n=e.stateNode,l=e.type,o=e.memoizedProps;switch(n[ct]=e,n[bt]=o,l){case"dialog":Re("cancel",n),Re("close",n);break;case"iframe":case"object":case"embed":Re("load",n);break;case"video":case"audio":for(l=0;l<_r.length;l++)Re(_r[l],n);break;case"source":Re("error",n);break;case"img":case"image":case"link":Re("error",n),Re("load",n);break;case"details":Re("toggle",n);break;case"input":Re("invalid",n),_o(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Re("invalid",n);break;case"textarea":Re("invalid",n),Fh(n,o.value,o.defaultValue,o.children)}l=o.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||o.suppressHydrationWarning===!0||Jp(n.textContent,l)?(o.popover!=null&&(Re("beforetoggle",n),Re("toggle",n)),o.onScroll!=null&&Re("scroll",n),o.onScrollEnd!=null&&Re("scrollend",n),o.onClick!=null&&(n.onclick=Ln),n=!0):n=!1,n||vi(e,!0)}function Lm(e){for(gt=e.return;gt;)switch(gt.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:gt=gt.return}}function Il(e){if(e!==gt)return!1;if(!ke)return Lm(e),ke=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Gf(e.type,e.memoizedProps)),l=!l),l&&Qe&&vi(e),Lm(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=og(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Qe=og(e)}else n===27?(n=Qe,Oi(e.type)?(e=Ff,Ff=null,Qe=e):Qe=n):Qe=gt?en(e.stateNode.nextSibling):null;return!0}function cl(){Qe=gt=null,ke=!1}function Tu(){var e=xi;return e!==null&&(zt===null?zt=e:zt.push.apply(zt,e),xi=null),e}function ir(e){xi===null?xi=[e]:xi.push(e)}var Au=R(null),ul=null,Vn=null;function bi(e,n,l){P(Au,n._currentValue),n._currentValue=l}function $n(e){e._currentValue=Au.current,Y(Au)}function Mu(e,n,l){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===l)break;e=e.return}}function ju(e,n,l,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var d=f.dependencies;if(d!==null){var b=f.child;d=d.firstContext;e:for(;d!==null;){var M=d;d=f;for(var U=0;U<n.length;U++)if(M.context===n[U]){d.lanes|=l,M=d.alternate,M!==null&&(M.lanes|=l),Mu(d.return,l,e),o||(b=null);break e}d=M.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(r(341));b.lanes|=l,d=b.alternate,d!==null&&(d.lanes|=l),Mu(b,l,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 Jl(e,n,l,o){e=null;for(var f=n,d=!1;f!==null;){if(!d){if((f.flags&524288)!==0)d=!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 M=f.type;Lt(f.pendingProps.value,b.value)||(e!==null?e.push(M):e=[M])}}else if(f===oe.current){if(b=f.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(jr):e=[jr])}f=f.return}e!==null&&ju(n,e,l,o),n.flags|=262144}function Uo(e){for(e=e.firstContext;e!==null;){if(!Lt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function fl(e){ul=e,Vn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function yt(e){return Hm(ul,e)}function Vo(e,n){return ul===null&&fl(e),Hm(e,n)}function Hm(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},Vn===null){if(e===null)throw Error(r(308));Vn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Vn=Vn.next=n;return l}var Z2=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},Q2=t.unstable_scheduleCallback,K2=t.unstable_NormalPriority,lt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zu(){return{controller:new Z2,data:new Map,refCount:0}}function lr(e){e.refCount--,e.refCount===0&&Q2(K2,function(){e.controller.abort()})}var ar=null,Ru=0,Wl=0,ea=null;function P2(e,n){if(ar===null){var l=ar=[];Ru=0,Wl=Lf(),ea={status:"pending",value:void 0,then:function(o){l.push(o)}}}return Ru++,n.then(Bm,Bm),n}function Bm(){if(--Ru===0&&ar!==null){ea!==null&&(ea.status="fulfilled");var e=ar;ar=null,Wl=0,ea=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function F2(e,n){var l=[],o={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<l.length;f++)(0,l[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),o}var Um=z.S;z.S=function(e,n){Sp=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&P2(e,n),Um!==null&&Um(e,n)};var dl=R(null);function Ou(){var e=dl.current;return e!==null?e:Ze.pooledCache}function $o(e,n){n===null?P(dl,dl.current):P(dl,n.pool)}function Vm(){var e=Ou();return e===null?null:{parent:lt._currentValue,pool:e}}var ta=Error(r(460)),Du=Error(r(474)),Yo=Error(r(542)),qo={then:function(){}};function $m(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ym(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(Ln,Ln),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Xm(e),e;default:if(typeof n.status=="string")n.then(Ln,Ln);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,Xm(e),e}throw ml=n,ta}}function hl(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ml=l,ta):l}}var ml=null;function qm(){if(ml===null)throw Error(r(459));var e=ml;return ml=null,e}function Xm(e){if(e===ta||e===Yo)throw Error(r(483))}var na=null,rr=0;function Xo(e){var n=rr;return rr+=1,na===null&&(na=[]),Ym(na,e,n)}function or(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Go(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 Gm(e){function n(K,q){if(e){var F=K.deletions;F===null?(K.deletions=[q],K.flags|=16):F.push(q)}}function l(K,q){if(!e)return null;for(;q!==null;)n(K,q),q=q.sibling;return null}function o(K){for(var q=new Map;K!==null;)K.key!==null?q.set(K.key,K):q.set(K.index,K),K=K.sibling;return q}function f(K,q){return K=Bn(K,q),K.index=0,K.sibling=null,K}function d(K,q,F){return K.index=F,e?(F=K.alternate,F!==null?(F=F.index,F<q?(K.flags|=67108866,q):F):(K.flags|=67108866,q)):(K.flags|=1048576,q)}function b(K){return e&&K.alternate===null&&(K.flags|=67108866),K}function M(K,q,F,ae){return q===null||q.tag!==6?(q=Su(F,K.mode,ae),q.return=K,q):(q=f(q,F),q.return=K,q)}function U(K,q,F,ae){var be=F.type;return be===_?ie(K,q,F.props.children,ae,F.key):q!==null&&(q.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===V&&hl(be)===q.type)?(q=f(q,F.props),or(q,F),q.return=K,q):(q=Ho(F.type,F.key,F.props,null,K.mode,ae),or(q,F),q.return=K,q)}function I(K,q,F,ae){return q===null||q.tag!==4||q.stateNode.containerInfo!==F.containerInfo||q.stateNode.implementation!==F.implementation?(q=Eu(F,K.mode,ae),q.return=K,q):(q=f(q,F.children||[]),q.return=K,q)}function ie(K,q,F,ae,be){return q===null||q.tag!==7?(q=sl(F,K.mode,ae,be),q.return=K,q):(q=f(q,F),q.return=K,q)}function re(K,q,F){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=Su(""+q,K.mode,F),q.return=K,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case w:return F=Ho(q.type,q.key,q.props,null,K.mode,F),or(F,q),F.return=K,F;case S:return q=Eu(q,K.mode,F),q.return=K,q;case V:return q=hl(q),re(K,q,F)}if(G(q)||X(q))return q=sl(q,K.mode,F,null),q.return=K,q;if(typeof q.then=="function")return re(K,Xo(q),F);if(q.$$typeof===N)return re(K,Vo(K,q),F);Go(K,q)}return null}function W(K,q,F,ae){var be=q!==null?q.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return be!==null?null:M(K,q,""+F,ae);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case w:return F.key===be?U(K,q,F,ae):null;case S:return F.key===be?I(K,q,F,ae):null;case V:return F=hl(F),W(K,q,F,ae)}if(G(F)||X(F))return be!==null?null:ie(K,q,F,ae,null);if(typeof F.then=="function")return W(K,q,Xo(F),ae);if(F.$$typeof===N)return W(K,q,Vo(K,F),ae);Go(K,F)}return null}function ne(K,q,F,ae,be){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return K=K.get(F)||null,M(q,K,""+ae,be);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case w:return K=K.get(ae.key===null?F:ae.key)||null,U(q,K,ae,be);case S:return K=K.get(ae.key===null?F:ae.key)||null,I(q,K,ae,be);case V:return ae=hl(ae),ne(K,q,F,ae,be)}if(G(ae)||X(ae))return K=K.get(F)||null,ie(q,K,ae,be,null);if(typeof ae.then=="function")return ne(K,q,F,Xo(ae),be);if(ae.$$typeof===N)return ne(K,q,F,Vo(q,ae),be);Go(q,ae)}return null}function de(K,q,F,ae){for(var be=null,He=null,pe=q,Ae=q=0,De=null;pe!==null&&Ae<F.length;Ae++){pe.index>Ae?(De=pe,pe=null):De=pe.sibling;var Be=W(K,pe,F[Ae],ae);if(Be===null){pe===null&&(pe=De);break}e&&pe&&Be.alternate===null&&n(K,pe),q=d(Be,q,Ae),He===null?be=Be:He.sibling=Be,He=Be,pe=De}if(Ae===F.length)return l(K,pe),ke&&Un(K,Ae),be;if(pe===null){for(;Ae<F.length;Ae++)pe=re(K,F[Ae],ae),pe!==null&&(q=d(pe,q,Ae),He===null?be=pe:He.sibling=pe,He=pe);return ke&&Un(K,Ae),be}for(pe=o(pe);Ae<F.length;Ae++)De=ne(pe,K,Ae,F[Ae],ae),De!==null&&(e&&De.alternate!==null&&pe.delete(De.key===null?Ae:De.key),q=d(De,q,Ae),He===null?be=De:He.sibling=De,He=De);return e&&pe.forEach(function(Bi){return n(K,Bi)}),ke&&Un(K,Ae),be}function Se(K,q,F,ae){if(F==null)throw Error(r(151));for(var be=null,He=null,pe=q,Ae=q=0,De=null,Be=F.next();pe!==null&&!Be.done;Ae++,Be=F.next()){pe.index>Ae?(De=pe,pe=null):De=pe.sibling;var Bi=W(K,pe,Be.value,ae);if(Bi===null){pe===null&&(pe=De);break}e&&pe&&Bi.alternate===null&&n(K,pe),q=d(Bi,q,Ae),He===null?be=Bi:He.sibling=Bi,He=Bi,pe=De}if(Be.done)return l(K,pe),ke&&Un(K,Ae),be;if(pe===null){for(;!Be.done;Ae++,Be=F.next())Be=re(K,Be.value,ae),Be!==null&&(q=d(Be,q,Ae),He===null?be=Be:He.sibling=Be,He=Be);return ke&&Un(K,Ae),be}for(pe=o(pe);!Be.done;Ae++,Be=F.next())Be=ne(pe,K,Ae,Be.value,ae),Be!==null&&(e&&Be.alternate!==null&&pe.delete(Be.key===null?Ae:Be.key),q=d(Be,q,Ae),He===null?be=Be:He.sibling=Be,He=Be);return e&&pe.forEach(function(oS){return n(K,oS)}),ke&&Un(K,Ae),be}function Ge(K,q,F,ae){if(typeof F=="object"&&F!==null&&F.type===_&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case w:e:{for(var be=F.key;q!==null;){if(q.key===be){if(be=F.type,be===_){if(q.tag===7){l(K,q.sibling),ae=f(q,F.props.children),ae.return=K,K=ae;break e}}else if(q.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===V&&hl(be)===q.type){l(K,q.sibling),ae=f(q,F.props),or(ae,F),ae.return=K,K=ae;break e}l(K,q);break}else n(K,q);q=q.sibling}F.type===_?(ae=sl(F.props.children,K.mode,ae,F.key),ae.return=K,K=ae):(ae=Ho(F.type,F.key,F.props,null,K.mode,ae),or(ae,F),ae.return=K,K=ae)}return b(K);case S:e:{for(be=F.key;q!==null;){if(q.key===be)if(q.tag===4&&q.stateNode.containerInfo===F.containerInfo&&q.stateNode.implementation===F.implementation){l(K,q.sibling),ae=f(q,F.children||[]),ae.return=K,K=ae;break e}else{l(K,q);break}else n(K,q);q=q.sibling}ae=Eu(F,K.mode,ae),ae.return=K,K=ae}return b(K);case V:return F=hl(F),Ge(K,q,F,ae)}if(G(F))return de(K,q,F,ae);if(X(F)){if(be=X(F),typeof be!="function")throw Error(r(150));return F=be.call(F),Se(K,q,F,ae)}if(typeof F.then=="function")return Ge(K,q,Xo(F),ae);if(F.$$typeof===N)return Ge(K,q,Vo(K,F),ae);Go(K,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,q!==null&&q.tag===6?(l(K,q.sibling),ae=f(q,F),ae.return=K,K=ae):(l(K,q),ae=Su(F,K.mode,ae),ae.return=K,K=ae),b(K)):l(K,q)}return function(K,q,F,ae){try{rr=0;var be=Ge(K,q,F,ae);return na=null,be}catch(pe){if(pe===ta||pe===Yo)throw pe;var He=Ht(29,pe,null,K.mode);return He.lanes=ae,He.return=K,He}finally{}}}var pl=Gm(!0),Zm=Gm(!1),wi=!1;function ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lu(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 Si(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ei(e,n,l){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=Lo(e),Mm(e,null,l),n}return ko(e,o,n,l),Lo(e)}function sr(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,mo(e,l)}}function Hu(e,n){var l=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var f=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var b={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?f=d=b:d=d.next=b,l=l.next}while(l!==null);d===null?f=d=n:d=d.next=n}else f=d=n;l={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var Bu=!1;function cr(){if(Bu){var e=ea;if(e!==null)throw e}}function ur(e,n,l,o){Bu=!1;var f=e.updateQueue;wi=!1;var d=f.firstBaseUpdate,b=f.lastBaseUpdate,M=f.shared.pending;if(M!==null){f.shared.pending=null;var U=M,I=U.next;U.next=null,b===null?d=I:b.next=I,b=U;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,M=ie.lastBaseUpdate,M!==b&&(M===null?ie.firstBaseUpdate=I:M.next=I,ie.lastBaseUpdate=U))}if(d!==null){var re=f.baseState;b=0,ie=I=U=null,M=d;do{var W=M.lane&-536870913,ne=W!==M.lane;if(ne?(Oe&W)===W:(o&W)===W){W!==0&&W===Wl&&(Bu=!0),ie!==null&&(ie=ie.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var de=e,Se=M;W=n;var Ge=l;switch(Se.tag){case 1:if(de=Se.payload,typeof de=="function"){re=de.call(Ge,re,W);break e}re=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Se.payload,W=typeof de=="function"?de.call(Ge,re,W):de,W==null)break e;re=y({},re,W);break e;case 2:wi=!0}}W=M.callback,W!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=f.callbacks,ne===null?f.callbacks=[W]:ne.push(W))}else ne={lane:W,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ie===null?(I=ie=ne,U=re):ie=ie.next=ne,b|=W;if(M=M.next,M===null){if(M=f.shared.pending,M===null)break;ne=M,M=ne.next,ne.next=null,f.lastBaseUpdate=ne,f.shared.pending=null}}while(!0);ie===null&&(U=re),f.baseState=U,f.firstBaseUpdate=I,f.lastBaseUpdate=ie,d===null&&(f.shared.lanes=0),Ai|=b,e.lanes=b,e.memoizedState=re}}function Qm(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Km(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Qm(l[e],n)}var ia=R(null),Zo=R(0);function Pm(e,n){e=Fn,P(Zo,e),P(ia,n),Fn=e|n.baseLanes}function Uu(){P(Zo,Fn),P(ia,ia.current)}function Vu(){Fn=Zo.current,Y(ia),Y(Zo)}var Bt=R(null),Wt=null;function Ni(e){var n=e.alternate;P(et,et.current&1),P(Bt,e),Wt===null&&(n===null||ia.current!==null||n.memoizedState!==null)&&(Wt=e)}function $u(e){P(et,et.current),P(Bt,e),Wt===null&&(Wt=e)}function Fm(e){e.tag===22?(P(et,et.current),P(Bt,e),Wt===null&&(Wt=e)):_i()}function _i(){P(et,et.current),P(Bt,Bt.current)}function Ut(e){Y(Bt),Wt===e&&(Wt=null),Y(et)}var et=R(0);function Qo(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Kf(l)||Pf(l)))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 Yn=0,Te=null,qe=null,at=null,Ko=!1,la=!1,gl=!1,Po=0,fr=0,aa=null,I2=0;function Je(){throw Error(r(321))}function Yu(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!Lt(e[l],n[l]))return!1;return!0}function qu(e,n,l,o,f,d){return Yn=d,Te=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,z.H=e===null||e.memoizedState===null?O0:af,gl=!1,d=l(o,f),gl=!1,la&&(d=Jm(n,l,o,f)),Im(e),d}function Im(e){z.H=mr;var n=qe!==null&&qe.next!==null;if(Yn=0,at=qe=Te=null,Ko=!1,fr=0,aa=null,n)throw Error(r(300));e===null||rt||(e=e.dependencies,e!==null&&Uo(e)&&(rt=!0))}function Jm(e,n,l,o){Te=e;var f=0;do{if(la&&(aa=null),fr=0,la=!1,25<=f)throw Error(r(301));if(f+=1,at=qe=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}z.H=D0,d=n(l,o)}while(la);return d}function J2(){var e=z.H,n=e.useState()[0];return n=typeof n.then=="function"?dr(n):n,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(Te.flags|=1024),n}function Xu(){var e=Po!==0;return Po=0,e}function Gu(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function Zu(e){if(Ko){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Ko=!1}Yn=0,at=qe=Te=null,la=!1,fr=Po=0,aa=null}function Nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?Te.memoizedState=at=e:at=at.next=e,at}function tt(){if(qe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var n=at===null?Te.memoizedState:at.next;if(n!==null)at=n,qe=e;else{if(e===null)throw Te.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},at===null?Te.memoizedState=at=e:at=at.next=e}return at}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function dr(e){var n=fr;return fr+=1,aa===null&&(aa=[]),e=Ym(aa,e,n),n=Te,(at===null?n.memoizedState:at.next)===null&&(n=n.alternate,z.H=n===null||n.memoizedState===null?O0:af),e}function Io(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return dr(e);if(e.$$typeof===N)return yt(e)}throw Error(r(438,String(e)))}function Qu(e){var n=null,l=Te.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var o=Te.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}),l===null&&(l=Fo(),Te.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),o=0;o<e;o++)l[o]=le;return n.index++,l}function qn(e,n){return typeof n=="function"?n(e):n}function Jo(e){var n=tt();return Ku(n,qe,e)}function Ku(e,n,l){var o=e.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=l;var f=e.baseQueue,d=o.pending;if(d!==null){if(f!==null){var b=f.next;f.next=d.next,d.next=b}n.baseQueue=f=d,o.pending=null}if(d=e.baseState,f===null)e.memoizedState=d;else{n=f.next;var M=b=null,U=null,I=n,ie=!1;do{var re=I.lane&-536870913;if(re!==I.lane?(Oe&re)===re:(Yn&re)===re){var W=I.revertLane;if(W===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),re===Wl&&(ie=!0);else if((Yn&W)===W){I=I.next,W===Wl&&(ie=!0);continue}else re={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},U===null?(M=U=re,b=d):U=U.next=re,Te.lanes|=W,Ai|=W;re=I.action,gl&&l(d,re),d=I.hasEagerState?I.eagerState:l(d,re)}else W={lane:re,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},U===null?(M=U=W,b=d):U=U.next=W,Te.lanes|=re,Ai|=re;I=I.next}while(I!==null&&I!==n);if(U===null?b=d:U.next=M,!Lt(d,e.memoizedState)&&(rt=!0,ie&&(l=ea,l!==null)))throw l;e.memoizedState=d,e.baseState=b,e.baseQueue=U,o.lastRenderedState=d}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Pu(e){var n=tt(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var o=l.dispatch,f=l.pending,d=n.memoizedState;if(f!==null){l.pending=null;var b=f=f.next;do d=e(d,b.action),b=b.next;while(b!==f);Lt(d,n.memoizedState)||(rt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),l.lastRenderedState=d}return[d,o]}function Wm(e,n,l){var o=Te,f=tt(),d=ke;if(d){if(l===void 0)throw Error(r(407));l=l()}else l=n();var b=!Lt((qe||f).memoizedState,l);if(b&&(f.memoizedState=l,rt=!0),f=f.queue,Ju(n0.bind(null,o,f,e),[e]),f.getSnapshot!==n||b||at!==null&&at.memoizedState.tag&1){if(o.flags|=2048,ra(9,{destroy:void 0},t0.bind(null,o,f,l,n),null),Ze===null)throw Error(r(349));d||(Yn&127)!==0||e0(o,n,l)}return l}function e0(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Te.updateQueue,n===null?(n=Fo(),Te.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function t0(e,n,l,o){n.value=l,n.getSnapshot=o,i0(n)&&l0(e)}function n0(e,n,l){return l(function(){i0(n)&&l0(e)})}function i0(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!Lt(e,l)}catch{return!0}}function l0(e){var n=ol(e,2);n!==null&&Rt(n,e,2)}function Fu(e){var n=Nt();if(typeof e=="function"){var l=e;if(e=l(),gl){gn(!0);try{l()}finally{gn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:e},n}function a0(e,n,l,o){return e.baseState=l,Ku(e,qe,typeof o=="function"?o:qn)}function W2(e,n,l,o,f){if(ts(e))throw Error(r(485));if(e=n.action,e!==null){var d={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};z.T!==null?l(!0):d.isTransition=!1,o(d),l=n.pending,l===null?(d.next=n.pending=d,r0(n,d)):(d.next=l.next,n.pending=l.next=d)}}function r0(e,n){var l=n.action,o=n.payload,f=e.state;if(n.isTransition){var d=z.T,b={};z.T=b;try{var M=l(f,o),U=z.S;U!==null&&U(b,M),o0(e,n,M)}catch(I){Iu(e,n,I)}finally{d!==null&&b.types!==null&&(d.types=b.types),z.T=d}}else try{d=l(f,o),o0(e,n,d)}catch(I){Iu(e,n,I)}}function o0(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(o){s0(e,n,o)},function(o){return Iu(e,n,o)}):s0(e,n,l)}function s0(e,n,l){n.status="fulfilled",n.value=l,c0(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,r0(e,l)))}function Iu(e,n,l){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=l,c0(n),n=n.next;while(n!==o)}e.action=null}function c0(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function u0(e,n){return n}function f0(e,n){if(ke){var l=Ze.formState;if(l!==null){e:{var o=Te;if(ke){if(Qe){t:{for(var f=Qe,d=Jt;f.nodeType!==8;){if(!d){f=null;break t}if(f=en(f.nextSibling),f===null){f=null;break t}}d=f.data,f=d==="F!"||d==="F"?f:null}if(f){Qe=en(f.nextSibling),o=f.data==="F!";break e}}vi(o)}o=!1}o&&(n=l[0])}}return l=Nt(),l.memoizedState=l.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u0,lastRenderedState:n},l.queue=o,l=j0.bind(null,Te,o),o.dispatch=l,o=Fu(!1),d=lf.bind(null,Te,!1,o.queue),o=Nt(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,l=W2.bind(null,Te,f,d,l),f.dispatch=l,o.memoizedState=e,[n,l,!1]}function d0(e){var n=tt();return h0(n,qe,e)}function h0(e,n,l){if(n=Ku(e,n,u0)[0],e=Jo(qn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=dr(n)}catch(b){throw b===ta?Yo:b}else o=n;n=tt();var f=n.queue,d=f.dispatch;return l!==n.memoizedState&&(Te.flags|=2048,ra(9,{destroy:void 0},ew.bind(null,f,l),null)),[o,d,e]}function ew(e,n){e.action=n}function m0(e){var n=tt(),l=qe;if(l!==null)return h0(n,l,e);tt(),n=n.memoizedState,l=tt();var o=l.queue.dispatch;return l.memoizedState=e,[n,o,!1]}function ra(e,n,l,o){return e={tag:e,create:l,deps:o,inst:n,next:null},n=Te.updateQueue,n===null&&(n=Fo(),Te.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(o=l.next,l.next=e,e.next=o,n.lastEffect=e),e}function p0(){return tt().memoizedState}function Wo(e,n,l,o){var f=Nt();Te.flags|=e,f.memoizedState=ra(1|n,{destroy:void 0},l,o===void 0?null:o)}function es(e,n,l,o){var f=tt();o=o===void 0?null:o;var d=f.memoizedState.inst;qe!==null&&o!==null&&Yu(o,qe.memoizedState.deps)?f.memoizedState=ra(n,d,l,o):(Te.flags|=e,f.memoizedState=ra(1|n,d,l,o))}function g0(e,n){Wo(8390656,8,e,n)}function Ju(e,n){es(2048,8,e,n)}function tw(e){Te.flags|=4;var n=Te.updateQueue;if(n===null)n=Fo(),Te.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function y0(e){var n=tt().memoizedState;return tw({ref:n,nextImpl:e}),function(){if((Ve&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function x0(e,n){return es(4,2,e,n)}function v0(e,n){return es(4,4,e,n)}function b0(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function w0(e,n,l){l=l!=null?l.concat([e]):null,es(4,4,b0.bind(null,n,e),l)}function Wu(){}function S0(e,n){var l=tt();n=n===void 0?null:n;var o=l.memoizedState;return n!==null&&Yu(n,o[1])?o[0]:(l.memoizedState=[e,n],e)}function E0(e,n){var l=tt();n=n===void 0?null:n;var o=l.memoizedState;if(n!==null&&Yu(n,o[1]))return o[0];if(o=e(),gl){gn(!0);try{e()}finally{gn(!1)}}return l.memoizedState=[o,n],o}function ef(e,n,l){return l===void 0||(Yn&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=Np(),Te.lanes|=e,Ai|=e,l)}function N0(e,n,l,o){return Lt(l,n)?l:ia.current!==null?(e=ef(e,l,o),Lt(e,n)||(rt=!0),e):(Yn&42)===0||(Yn&1073741824)!==0&&(Oe&261930)===0?(rt=!0,e.memoizedState=l):(e=Np(),Te.lanes|=e,Ai|=e,n)}function _0(e,n,l,o,f){var d=B.p;B.p=d!==0&&8>d?d:8;var b=z.T,M={};z.T=M,lf(e,!1,n,l);try{var U=f(),I=z.S;if(I!==null&&I(M,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ie=F2(U,o);hr(e,n,ie,Yt(e))}else hr(e,n,o,Yt(e))}catch(re){hr(e,n,{then:function(){},status:"rejected",reason:re},Yt())}finally{B.p=d,b!==null&&M.types!==null&&(b.types=M.types),z.T=b}}function nw(){}function tf(e,n,l,o){if(e.tag!==5)throw Error(r(476));var f=C0(e).queue;_0(e,f,n,O,l===null?nw:function(){return T0(e),l(o)})}function C0(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:O,baseState:O,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:O},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qn,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function T0(e){var n=C0(e);n.next===null&&(n=e.alternate.memoizedState),hr(e,n.next.queue,{},Yt())}function nf(){return yt(jr)}function A0(){return tt().memoizedState}function M0(){return tt().memoizedState}function iw(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=Yt();e=Si(l);var o=Ei(n,e,l);o!==null&&(Rt(o,n,l),sr(o,n,l)),n={cache:zu()},e.payload=n;return}n=n.return}}function lw(e,n,l){var o=Yt();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ts(e)?z0(n,l):(l=bu(e,n,l,o),l!==null&&(Rt(l,e,o),R0(l,n,o)))}function j0(e,n,l){var o=Yt();hr(e,n,l,o)}function hr(e,n,l,o){var f={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ts(e))z0(n,f);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var b=n.lastRenderedState,M=d(b,l);if(f.hasEagerState=!0,f.eagerState=M,Lt(M,b))return ko(e,n,f,0),Ze===null&&Do(),!1}catch{}finally{}if(l=bu(e,n,f,o),l!==null)return Rt(l,e,o),R0(l,n,o),!0}return!1}function lf(e,n,l,o){if(o={lane:2,revertLane:Lf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},ts(e)){if(n)throw Error(r(479))}else n=bu(e,l,o,2),n!==null&&Rt(n,e,2)}function ts(e){var n=e.alternate;return e===Te||n!==null&&n===Te}function z0(e,n){la=Ko=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function R0(e,n,l){if((l&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,mo(e,l)}}var mr={readContext:yt,use:Io,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};mr.useEffectEvent=Je;var O0={readContext:yt,use:Io,useCallback:function(e,n){return Nt().memoizedState=[e,n===void 0?null:n],e},useContext:yt,useEffect:g0,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,Wo(4194308,4,b0.bind(null,n,e),l)},useLayoutEffect:function(e,n){return Wo(4194308,4,e,n)},useInsertionEffect:function(e,n){Wo(4,2,e,n)},useMemo:function(e,n){var l=Nt();n=n===void 0?null:n;var o=e();if(gl){gn(!0);try{e()}finally{gn(!1)}}return l.memoizedState=[o,n],o},useReducer:function(e,n,l){var o=Nt();if(l!==void 0){var f=l(n);if(gl){gn(!0);try{l(n)}finally{gn(!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=lw.bind(null,Te,e),[o.memoizedState,e]},useRef:function(e){var n=Nt();return e={current:e},n.memoizedState=e},useState:function(e){e=Fu(e);var n=e.queue,l=j0.bind(null,Te,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:Wu,useDeferredValue:function(e,n){var l=Nt();return ef(l,e,n)},useTransition:function(){var e=Fu(!1);return e=_0.bind(null,Te,e.queue,!0,!1),Nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var o=Te,f=Nt();if(ke){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),Ze===null)throw Error(r(349));(Oe&127)!==0||e0(o,n,l)}f.memoizedState=l;var d={value:l,getSnapshot:n};return f.queue=d,g0(n0.bind(null,o,d,e),[e]),o.flags|=2048,ra(9,{destroy:void 0},t0.bind(null,o,d,l,n),null),l},useId:function(){var e=Nt(),n=Ze.identifierPrefix;if(ke){var l=vn,o=xn;l=(o&~(1<<32-Et(o)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Po++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=I2++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:nf,useFormState:f0,useActionState:f0,useOptimistic:function(e){var n=Nt();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=lf.bind(null,Te,!0,l),l.dispatch=n,[e,n]},useMemoCache:Qu,useCacheRefresh:function(){return Nt().memoizedState=iw.bind(null,Te)},useEffectEvent:function(e){var n=Nt(),l={impl:e};return n.memoizedState=l,function(){if((Ve&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},af={readContext:yt,use:Io,useCallback:S0,useContext:yt,useEffect:Ju,useImperativeHandle:w0,useInsertionEffect:x0,useLayoutEffect:v0,useMemo:E0,useReducer:Jo,useRef:p0,useState:function(){return Jo(qn)},useDebugValue:Wu,useDeferredValue:function(e,n){var l=tt();return N0(l,qe.memoizedState,e,n)},useTransition:function(){var e=Jo(qn)[0],n=tt().memoizedState;return[typeof e=="boolean"?e:dr(e),n]},useSyncExternalStore:Wm,useId:A0,useHostTransitionStatus:nf,useFormState:d0,useActionState:d0,useOptimistic:function(e,n){var l=tt();return a0(l,qe,e,n)},useMemoCache:Qu,useCacheRefresh:M0};af.useEffectEvent=y0;var D0={readContext:yt,use:Io,useCallback:S0,useContext:yt,useEffect:Ju,useImperativeHandle:w0,useInsertionEffect:x0,useLayoutEffect:v0,useMemo:E0,useReducer:Pu,useRef:p0,useState:function(){return Pu(qn)},useDebugValue:Wu,useDeferredValue:function(e,n){var l=tt();return qe===null?ef(l,e,n):N0(l,qe.memoizedState,e,n)},useTransition:function(){var e=Pu(qn)[0],n=tt().memoizedState;return[typeof e=="boolean"?e:dr(e),n]},useSyncExternalStore:Wm,useId:A0,useHostTransitionStatus:nf,useFormState:m0,useActionState:m0,useOptimistic:function(e,n){var l=tt();return qe!==null?a0(l,qe,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Qu,useCacheRefresh:M0};D0.useEffectEvent=y0;function rf(e,n,l,o){n=e.memoizedState,l=l(o,n),l=l==null?n:y({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var of={enqueueSetState:function(e,n,l){e=e._reactInternals;var o=Yt(),f=Si(o);f.payload=n,l!=null&&(f.callback=l),n=Ei(e,f,o),n!==null&&(Rt(n,e,o),sr(n,e,o))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var o=Yt(),f=Si(o);f.tag=1,f.payload=n,l!=null&&(f.callback=l),n=Ei(e,f,o),n!==null&&(Rt(n,e,o),sr(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=Yt(),o=Si(l);o.tag=2,n!=null&&(o.callback=n),n=Ei(e,o,l),n!==null&&(Rt(n,e,l),sr(n,e,l))}};function k0(e,n,l,o,f,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,b):n.prototype&&n.prototype.isPureReactComponent?!er(l,o)||!er(f,d):!0}function L0(e,n,l,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,o),n.state!==e&&of.enqueueReplaceState(n,n.state,null)}function yl(e,n){var l=n;if("ref"in n){l={};for(var o in n)o!=="ref"&&(l[o]=n[o])}if(e=e.defaultProps){l===n&&(l=y({},l));for(var f in e)l[f]===void 0&&(l[f]=e[f])}return l}function H0(e){Oo(e)}function B0(e){console.error(e)}function U0(e){Oo(e)}function ns(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function V0(e,n,l){try{var o=e.onCaughtError;o(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function sf(e,n,l){return l=Si(l),l.tag=3,l.payload={element:null},l.callback=function(){ns(e,n)},l}function $0(e){return e=Si(e),e.tag=3,e}function Y0(e,n,l,o){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var d=o.value;e.payload=function(){return f(d)},e.callback=function(){V0(n,l,o)}}var b=l.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){V0(n,l,o),typeof f!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var M=o.stack;this.componentDidCatch(o.value,{componentStack:M!==null?M:""})})}function aw(e,n,l,o,f){if(l.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=l.alternate,n!==null&&Jl(n,l,f,!0),l=Bt.current,l!==null){switch(l.tag){case 31:case 13:return Wt===null?ms():l.alternate===null&&We===0&&(We=3),l.flags&=-257,l.flags|=65536,l.lanes=f,o===qo?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([o]):n.add(o),Of(e,o,f)),!1;case 22:return l.flags|=65536,o===qo?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([o]):l.add(o)),Of(e,o,f)),!1}throw Error(r(435,l.tag))}return Of(e,o,f),ms(),!1}if(ke)return n=Bt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==Cu&&(e=Error(r(422),{cause:o}),ir(Pt(e,l)))):(o!==Cu&&(n=Error(r(423),{cause:o}),ir(Pt(n,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=Pt(o,l),f=sf(e.stateNode,o,f),Hu(e,f),We!==4&&(We=2)),!1;var d=Error(r(520),{cause:o});if(d=Pt(d,l),Sr===null?Sr=[d]:Sr.push(d),We!==4&&(We=2),n===null)return!0;o=Pt(o,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=sf(l.stateNode,o,e),Hu(l,e),!1;case 1:if(n=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Mi===null||!Mi.has(d))))return l.flags|=65536,f&=-f,l.lanes|=f,f=$0(f),Y0(f,e,l,o),Hu(l,f),!1}l=l.return}while(l!==null);return!1}var cf=Error(r(461)),rt=!1;function xt(e,n,l,o){n.child=e===null?Zm(n,null,l,o):pl(n,e.child,l,o)}function q0(e,n,l,o,f){l=l.render;var d=n.ref;if("ref"in o){var b={};for(var M in o)M!=="ref"&&(b[M]=o[M])}else b=o;return fl(n),o=qu(e,n,l,b,d,f),M=Xu(),e!==null&&!rt?(Gu(e,n,f),Xn(e,n,f)):(ke&&M&&Nu(n),n.flags|=1,xt(e,n,o,f),n.child)}function X0(e,n,l,o,f){if(e===null){var d=l.type;return typeof d=="function"&&!wu(d)&&d.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=d,G0(e,n,d,o,f)):(e=Ho(l.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!yf(e,f)){var b=d.memoizedProps;if(l=l.compare,l=l!==null?l:er,l(b,o)&&e.ref===n.ref)return Xn(e,n,f)}return n.flags|=1,e=Bn(d,o),e.ref=n.ref,e.return=n,n.child=e}function G0(e,n,l,o,f){if(e!==null){var d=e.memoizedProps;if(er(d,o)&&e.ref===n.ref)if(rt=!1,n.pendingProps=o=d,yf(e,f))(e.flags&131072)!==0&&(rt=!0);else return n.lanes=e.lanes,Xn(e,n,f)}return uf(e,n,l,o,f)}function Z0(e,n,l,o){var f=o.children,d=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(d=d!==null?d.baseLanes|l:l,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~d}else o=0,n.child=null;return Q0(e,n,d,l,o)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&$o(n,d!==null?d.cachePool:null),d!==null?Pm(n,d):Uu(),Fm(n);else return o=n.lanes=536870912,Q0(e,n,d!==null?d.baseLanes|l:l,l,o)}else d!==null?($o(n,d.cachePool),Pm(n,d),_i(),n.memoizedState=null):(e!==null&&$o(n,null),Uu(),_i());return xt(e,n,f,l),n.child}function pr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Q0(e,n,l,o,f){var d=Ou();return d=d===null?null:{parent:lt._currentValue,pool:d},n.memoizedState={baseLanes:l,cachePool:d},e!==null&&$o(n,null),Uu(),Fm(n),e!==null&&Jl(e,n,o,!0),n.childLanes=f,null}function is(e,n){return n=as({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function K0(e,n,l){return pl(n,e.child,null,l),e=is(n,n.pendingProps),e.flags|=2,Ut(n),n.memoizedState=null,e}function rw(e,n,l){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(ke){if(o.mode==="hidden")return e=is(n,o),n.lanes=536870912,pr(null,e);if($u(n),(e=Qe)?(e=rg(e,Jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:yi!==null?{id:xn,overflow:vn}:null,retryLane:536870912,hydrationErrors:null},l=zm(e),l.return=n,n.child=l,gt=n,Qe=null)):e=null,e===null)throw vi(n);return n.lanes=536870912,null}return is(n,o)}var d=e.memoizedState;if(d!==null){var b=d.dehydrated;if($u(n),f)if(n.flags&256)n.flags&=-257,n=K0(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(rt||Jl(e,n,l,!1),f=(l&e.childLanes)!==0,rt||f){if(o=Ze,o!==null&&(b=po(o,l),b!==0&&b!==d.retryLane))throw d.retryLane=b,ol(e,b),Rt(o,e,b),cf;ms(),n=K0(e,n,l)}else e=d.treeContext,Qe=en(b.nextSibling),gt=n,ke=!0,xi=null,Jt=!1,e!==null&&Dm(n,e),n=is(n,o),n.flags|=4096;return n}return e=Bn(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function ls(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function uf(e,n,l,o,f){return fl(n),l=qu(e,n,l,o,void 0,f),o=Xu(),e!==null&&!rt?(Gu(e,n,f),Xn(e,n,f)):(ke&&o&&Nu(n),n.flags|=1,xt(e,n,l,f),n.child)}function P0(e,n,l,o,f,d){return fl(n),n.updateQueue=null,l=Jm(n,o,l,f),Im(e),o=Xu(),e!==null&&!rt?(Gu(e,n,d),Xn(e,n,d)):(ke&&o&&Nu(n),n.flags|=1,xt(e,n,l,d),n.child)}function F0(e,n,l,o,f){if(fl(n),n.stateNode===null){var d=Kl,b=l.contextType;typeof b=="object"&&b!==null&&(d=yt(b)),d=new l(o,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=of,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=o,d.state=n.memoizedState,d.refs={},ku(n),b=l.contextType,d.context=typeof b=="object"&&b!==null?yt(b):Kl,d.state=n.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(rf(n,l,b,o),d.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&of.enqueueReplaceState(d,d.state,null),ur(n,o,d,f),cr(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){d=n.stateNode;var M=n.memoizedProps,U=yl(l,M);d.props=U;var I=d.context,ie=l.contextType;b=Kl,typeof ie=="object"&&ie!==null&&(b=yt(ie));var re=l.getDerivedStateFromProps;ie=typeof re=="function"||typeof d.getSnapshotBeforeUpdate=="function",M=n.pendingProps!==M,ie||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(M||I!==b)&&L0(n,d,o,b),wi=!1;var W=n.memoizedState;d.state=W,ur(n,o,d,f),cr(),I=n.memoizedState,M||W!==I||wi?(typeof re=="function"&&(rf(n,l,re,o),I=n.memoizedState),(U=wi||k0(n,l,U,o,W,I,b))?(ie||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=I),d.props=o,d.state=I,d.context=b,o=U):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{d=n.stateNode,Lu(e,n),b=n.memoizedProps,ie=yl(l,b),d.props=ie,re=n.pendingProps,W=d.context,I=l.contextType,U=Kl,typeof I=="object"&&I!==null&&(U=yt(I)),M=l.getDerivedStateFromProps,(I=typeof M=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==re||W!==U)&&L0(n,d,o,U),wi=!1,W=n.memoizedState,d.state=W,ur(n,o,d,f),cr();var ne=n.memoizedState;b!==re||W!==ne||wi||e!==null&&e.dependencies!==null&&Uo(e.dependencies)?(typeof M=="function"&&(rf(n,l,M,o),ne=n.memoizedState),(ie=wi||k0(n,l,ie,o,W,ne,U)||e!==null&&e.dependencies!==null&&Uo(e.dependencies))?(I||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,ne,U),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,ne,U)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=ne),d.props=o,d.state=ne,d.context=U,o=ie):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),o=!1)}return d=o,ls(e,n),o=(n.flags&128)!==0,d||o?(d=n.stateNode,l=o&&typeof l.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&o?(n.child=pl(n,e.child,null,f),n.child=pl(n,null,l,f)):xt(e,n,l,f),n.memoizedState=d.state,e=n.child):e=Xn(e,n,f),e}function I0(e,n,l,o){return cl(),n.flags|=256,xt(e,n,l,o),n.child}var ff={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function df(e){return{baseLanes:e,cachePool:Vm()}}function hf(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=$t),e}function J0(e,n,l){var o=n.pendingProps,f=!1,d=(n.flags&128)!==0,b;if((b=d)||(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(ke){if(f?Ni(n):_i(),(e=Qe)?(e=rg(e,Jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:yi!==null?{id:xn,overflow:vn}:null,retryLane:536870912,hydrationErrors:null},l=zm(e),l.return=n,n.child=l,gt=n,Qe=null)):e=null,e===null)throw vi(n);return Pf(e)?n.lanes=32:n.lanes=536870912,null}var M=o.children;return o=o.fallback,f?(_i(),f=n.mode,M=as({mode:"hidden",children:M},f),o=sl(o,f,l,null),M.return=n,o.return=n,M.sibling=o,n.child=M,o=n.child,o.memoizedState=df(l),o.childLanes=hf(e,b,l),n.memoizedState=ff,pr(null,o)):(Ni(n),mf(n,M))}var U=e.memoizedState;if(U!==null&&(M=U.dehydrated,M!==null)){if(d)n.flags&256?(Ni(n),n.flags&=-257,n=pf(e,n,l)):n.memoizedState!==null?(_i(),n.child=e.child,n.flags|=128,n=null):(_i(),M=o.fallback,f=n.mode,o=as({mode:"visible",children:o.children},f),M=sl(M,f,l,null),M.flags|=2,o.return=n,M.return=n,o.sibling=M,n.child=o,pl(n,e.child,null,l),o=n.child,o.memoizedState=df(l),o.childLanes=hf(e,b,l),n.memoizedState=ff,n=pr(null,o));else if(Ni(n),Pf(M)){if(b=M.nextSibling&&M.nextSibling.dataset,b)var I=b.dgst;b=I,o=Error(r(419)),o.stack="",o.digest=b,ir({value:o,source:null,stack:null}),n=pf(e,n,l)}else if(rt||Jl(e,n,l,!1),b=(l&e.childLanes)!==0,rt||b){if(b=Ze,b!==null&&(o=po(b,l),o!==0&&o!==U.retryLane))throw U.retryLane=o,ol(e,o),Rt(b,e,o),cf;Kf(M)||ms(),n=pf(e,n,l)}else Kf(M)?(n.flags|=192,n.child=e.child,n=null):(e=U.treeContext,Qe=en(M.nextSibling),gt=n,ke=!0,xi=null,Jt=!1,e!==null&&Dm(n,e),n=mf(n,o.children),n.flags|=4096);return n}return f?(_i(),M=o.fallback,f=n.mode,U=e.child,I=U.sibling,o=Bn(U,{mode:"hidden",children:o.children}),o.subtreeFlags=U.subtreeFlags&65011712,I!==null?M=Bn(I,M):(M=sl(M,f,l,null),M.flags|=2),M.return=n,o.return=n,o.sibling=M,n.child=o,pr(null,o),o=n.child,M=e.child.memoizedState,M===null?M=df(l):(f=M.cachePool,f!==null?(U=lt._currentValue,f=f.parent!==U?{parent:U,pool:U}:f):f=Vm(),M={baseLanes:M.baseLanes|l,cachePool:f}),o.memoizedState=M,o.childLanes=hf(e,b,l),n.memoizedState=ff,pr(e.child,o)):(Ni(n),l=e.child,e=l.sibling,l=Bn(l,{mode:"visible",children:o.children}),l.return=n,l.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=l,n.memoizedState=null,l)}function mf(e,n){return n=as({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function as(e,n){return e=Ht(22,e,null,n),e.lanes=0,e}function pf(e,n,l){return pl(n,e.child,null,l),e=mf(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function W0(e,n,l){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Mu(e.return,n,l)}function gf(e,n,l,o,f,d){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:f,treeForkCount:d}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=l,b.tailMode=f,b.treeForkCount=d)}function ep(e,n,l){var o=n.pendingProps,f=o.revealOrder,d=o.tail;o=o.children;var b=et.current,M=(b&2)!==0;if(M?(b=b&1|2,n.flags|=128):b&=1,P(et,b),xt(e,n,o,l),o=ke?nr:0,!M&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&W0(e,l,n);else if(e.tag===19)W0(e,l,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(l=n.child,f=null;l!==null;)e=l.alternate,e!==null&&Qo(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=n.child,n.child=null):(f=l.sibling,l.sibling=null),gf(n,!1,f,l,d,o);break;case"backwards":case"unstable_legacy-backwards":for(l=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Qo(e)===null){n.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}gf(n,!0,l,null,d,o);break;case"together":gf(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Xn(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),Ai|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(Jl(e,n,l,!1),(l&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,l=Bn(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=Bn(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function yf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Uo(e)))}function ow(e,n,l){switch(n.tag){case 3:ce(n,n.stateNode.containerInfo),bi(n,lt,e.memoizedState.cache),cl();break;case 27:case 5:we(n);break;case 4:ce(n,n.stateNode.containerInfo);break;case 10:bi(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,$u(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Ni(n),n.flags|=128,null):(l&n.child.childLanes)!==0?J0(e,n,l):(Ni(n),e=Xn(e,n,l),e!==null?e.sibling:null);Ni(n);break;case 19:var f=(e.flags&128)!==0;if(o=(l&n.childLanes)!==0,o||(Jl(e,n,l,!1),o=(l&n.childLanes)!==0),f){if(o)return ep(e,n,l);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),P(et,et.current),o)break;return null;case 22:return n.lanes=0,Z0(e,n,l,n.pendingProps);case 24:bi(n,lt,e.memoizedState.cache)}return Xn(e,n,l)}function tp(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)rt=!0;else{if(!yf(e,l)&&(n.flags&128)===0)return rt=!1,ow(e,n,l);rt=(e.flags&131072)!==0}else rt=!1,ke&&(n.flags&1048576)!==0&&Om(n,nr,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=hl(n.elementType),n.type=e,typeof e=="function")wu(e)?(o=yl(e,o),n.tag=1,n=F0(null,n,e,o,l)):(n.tag=0,n=uf(null,n,e,o,l));else{if(e!=null){var f=e.$$typeof;if(f===A){n.tag=11,n=q0(null,n,e,o,l);break e}else if(f===L){n.tag=14,n=X0(null,n,e,o,l);break e}}throw n=D(e)||e,Error(r(306,n,""))}}return n;case 0:return uf(e,n,n.type,n.pendingProps,l);case 1:return o=n.type,f=yl(o,n.pendingProps),F0(e,n,o,f,l);case 3:e:{if(ce(n,n.stateNode.containerInfo),e===null)throw Error(r(387));o=n.pendingProps;var d=n.memoizedState;f=d.element,Lu(e,n),ur(n,o,null,l);var b=n.memoizedState;if(o=b.cache,bi(n,lt,o),o!==d.cache&&ju(n,[lt],l,!0),cr(),o=b.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=I0(e,n,o,l);break e}else if(o!==f){f=Pt(Error(r(424)),n),ir(f),n=I0(e,n,o,l);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=en(e.firstChild),gt=n,ke=!0,xi=null,Jt=!0,l=Zm(n,null,o,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(cl(),o===f){n=Xn(e,n,l);break e}xt(e,n,o,l)}n=n.child}return n;case 26:return ls(e,n),e===null?(l=dg(n.type,null,n.pendingProps,null))?n.memoizedState=l:ke||(l=n.type,e=n.pendingProps,o=ws(ue.current).createElement(l),o[ct]=n,o[bt]=e,vt(o,l,e),it(o),n.stateNode=o):n.memoizedState=dg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return we(n),e===null&&ke&&(o=n.stateNode=cg(n.type,n.pendingProps,ue.current),gt=n,Jt=!0,f=Qe,Oi(n.type)?(Ff=f,Qe=en(o.firstChild)):Qe=f),xt(e,n,n.pendingProps.children,l),ls(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&ke&&((f=o=Qe)&&(o=Hw(o,n.type,n.pendingProps,Jt),o!==null?(n.stateNode=o,gt=n,Qe=en(o.firstChild),Jt=!1,f=!0):f=!1),f||vi(n)),we(n),f=n.type,d=n.pendingProps,b=e!==null?e.memoizedProps:null,o=d.children,Gf(f,d)?o=null:b!==null&&Gf(f,b)&&(n.flags|=32),n.memoizedState!==null&&(f=qu(e,n,J2,null,null,l),jr._currentValue=f),ls(e,n),xt(e,n,o,l),n.child;case 6:return e===null&&ke&&((e=l=Qe)&&(l=Bw(l,n.pendingProps,Jt),l!==null?(n.stateNode=l,gt=n,Qe=null,e=!0):e=!1),e||vi(n)),null;case 13:return J0(e,n,l);case 4:return ce(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=pl(n,null,o,l):xt(e,n,o,l),n.child;case 11:return q0(e,n,n.type,n.pendingProps,l);case 7:return xt(e,n,n.pendingProps,l),n.child;case 8:return xt(e,n,n.pendingProps.children,l),n.child;case 12:return xt(e,n,n.pendingProps.children,l),n.child;case 10:return o=n.pendingProps,bi(n,n.type,o.value),xt(e,n,o.children,l),n.child;case 9:return f=n.type._context,o=n.pendingProps.children,fl(n),f=yt(f),o=o(f),n.flags|=1,xt(e,n,o,l),n.child;case 14:return X0(e,n,n.type,n.pendingProps,l);case 15:return G0(e,n,n.type,n.pendingProps,l);case 19:return ep(e,n,l);case 31:return rw(e,n,l);case 22:return Z0(e,n,l,n.pendingProps);case 24:return fl(n),o=yt(lt),e===null?(f=Ou(),f===null&&(f=Ze,d=zu(),f.pooledCache=d,d.refCount++,d!==null&&(f.pooledCacheLanes|=l),f=d),n.memoizedState={parent:o,cache:f},ku(n),bi(n,lt,f)):((e.lanes&l)!==0&&(Lu(e,n),ur(n,null,null,l),cr()),f=e.memoizedState,d=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),bi(n,lt,o)):(o=d.cache,bi(n,lt,o),o!==f.cache&&ju(n,[lt],l,!0))),xt(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function Gn(e){e.flags|=4}function xf(e,n,l,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(Ap())e.flags|=8192;else throw ml=qo,Du}else e.flags&=-16777217}function np(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!yg(n))if(Ap())e.flags|=8192;else throw ml=qo,Du}function rs(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?fo():536870912,e.lanes|=n,ua|=n)}function gr(e,n){if(!ke)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var o=null;l!==null;)l.alternate!==null&&(o=l),l=l.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,l=0,o=0;if(n)for(var f=e.child;f!==null;)l|=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;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=l,n}function sw(e,n,l){var o=n.pendingProps;switch(_u(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 l=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),$n(lt),fe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Il(n)?Gn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Tu())),Ke(n),null;case 26:var f=n.type,d=n.memoizedState;return e===null?(Gn(n),d!==null?(Ke(n),np(n,d)):(Ke(n),xf(n,f,null,o,l))):d?d!==e.memoizedState?(Gn(n),Ke(n),np(n,d)):(Ke(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&Gn(n),Ke(n),xf(n,f,e,o,l)),null;case 27:if(ve(n),l=ue.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Gn(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Ke(n),null}e=ee.current,Il(n)?km(n):(e=cg(f,o,l),n.stateNode=e,Gn(n))}return Ke(n),null;case 5:if(ve(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Gn(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Ke(n),null}if(d=ee.current,Il(n))km(n);else{var b=ws(ue.current);switch(d){case 1:d=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:d=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":d=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":d=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":d=b.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?b.createElement(f,{is:o.is}):b.createElement(f)}}d[ct]=n,d[bt]=o;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)d.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=d;e:switch(vt(d,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&&Gn(n)}}return Ke(n),xf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&Gn(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(r(166));if(e=ue.current,Il(n)){if(e=n.stateNode,l=n.memoizedProps,o=null,f=gt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[ct]=n,e=!!(e.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||Jp(e.nodeValue,l)),e||vi(n,!0)}else e=ws(e).createTextNode(o),e[ct]=n,n.stateNode=e}return Ke(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(o=Il(n),l!==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 cl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ke(n),e=!1}else l=Tu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(Ut(n),n):(Ut(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=Il(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 cl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ke(n),f=!1}else f=Tu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(Ut(n),n):(Ut(n),null)}return Ut(n),(n.flags&128)!==0?(n.lanes=l,n):(l=o!==null,e=e!==null&&e.memoizedState!==null,l&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==f&&(o.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),rs(n,n.updateQueue),Ke(n),null);case 4:return fe(),e===null&&Vf(n.stateNode.containerInfo),Ke(n),null;case 10:return $n(n.type),Ke(n),null;case 19:if(Y(et),o=n.memoizedState,o===null)return Ke(n),null;if(f=(n.flags&128)!==0,d=o.rendering,d===null)if(f)gr(o,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=Qo(e),d!==null){for(n.flags|=128,gr(o,!1),e=d.updateQueue,n.updateQueue=e,rs(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)jm(l,e),l=l.sibling;return P(et,et.current&1|2),ke&&Un(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&pt()>fs&&(n.flags|=128,f=!0,gr(o,!1),n.lanes=4194304)}else{if(!f)if(e=Qo(d),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,rs(n,e),gr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!ke)return Ke(n),null}else 2*pt()-o.renderingStartTime>fs&&l!==536870912&&(n.flags|=128,f=!0,gr(o,!1),n.lanes=4194304);o.isBackwards?(d.sibling=n.child,n.child=d):(e=o.last,e!==null?e.sibling=d:n.child=d,o.last=d)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=pt(),e.sibling=null,l=et.current,P(et,f?l&1|2:l&1),ke&&Un(n,o.treeForkCount),e):(Ke(n),null);case 22:case 23:return Ut(n),Vu(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(l&536870912)!==0&&(n.flags&128)===0&&(Ke(n),n.subtreeFlags&6&&(n.flags|=8192)):Ke(n),l=n.updateQueue,l!==null&&rs(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==l&&(n.flags|=2048),e!==null&&Y(dl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),$n(lt),Ke(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function cw(e,n){switch(_u(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return $n(lt),fe(),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(Ut(n),n.alternate===null)throw Error(r(340));cl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Ut(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));cl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Y(et),null;case 4:return fe(),null;case 10:return $n(n.type),null;case 22:case 23:return Ut(n),Vu(),e!==null&&Y(dl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return $n(lt),null;case 25:return null;default:return null}}function ip(e,n){switch(_u(n),n.tag){case 3:$n(lt),fe();break;case 26:case 27:case 5:ve(n);break;case 4:fe();break;case 31:n.memoizedState!==null&&Ut(n);break;case 13:Ut(n);break;case 19:Y(et);break;case 10:$n(n.type);break;case 22:case 23:Ut(n),Vu(),e!==null&&Y(dl);break;case 24:$n(lt)}}function yr(e,n){try{var l=n.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var f=o.next;l=f;do{if((l.tag&e)===e){o=void 0;var d=l.create,b=l.inst;o=d(),b.destroy=o}l=l.next}while(l!==f)}}catch(M){Ye(n,n.return,M)}}function Ci(e,n,l){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var d=f.next;o=d;do{if((o.tag&e)===e){var b=o.inst,M=b.destroy;if(M!==void 0){b.destroy=void 0,f=n;var U=l,I=M;try{I()}catch(ie){Ye(f,U,ie)}}}o=o.next}while(o!==d)}}catch(ie){Ye(n,n.return,ie)}}function lp(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{Km(n,l)}catch(o){Ye(e,e.return,o)}}}function ap(e,n,l){l.props=yl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(o){Ye(e,n,o)}}function xr(e,n){try{var l=e.ref;if(l!==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 l=="function"?e.refCleanup=l(o):l.current=o}}catch(f){Ye(e,n,f)}}function bn(e,n){var l=e.ref,o=e.refCleanup;if(l!==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 l=="function")try{l(null)}catch(f){Ye(e,n,f)}else l.current=null}function rp(e){var n=e.type,l=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break e;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(f){Ye(e,e.return,f)}}function vf(e,n,l){try{var o=e.stateNode;zw(o,e.type,l,n),o[bt]=n}catch(f){Ye(e,e.return,f)}}function op(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Oi(e.type)||e.tag===4}function bf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||op(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&&Oi(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 wf(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Ln));else if(o!==4&&(o===27&&Oi(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(wf(e,n,l),e=e.sibling;e!==null;)wf(e,n,l),e=e.sibling}function os(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(o!==4&&(o===27&&Oi(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(os(e,n,l),e=e.sibling;e!==null;)os(e,n,l),e=e.sibling}function sp(e){var n=e.stateNode,l=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);vt(n,o,l),n[ct]=e,n[bt]=l}catch(d){Ye(e,e.return,d)}}var Zn=!1,ot=!1,Sf=!1,cp=typeof WeakSet=="function"?WeakSet:Set,mt=null;function uw(e,n){if(e=e.containerInfo,qf=As,e=wm(e),mu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var f=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var b=0,M=-1,U=-1,I=0,ie=0,re=e,W=null;t:for(;;){for(var ne;re!==l||f!==0&&re.nodeType!==3||(M=b+f),re!==d||o!==0&&re.nodeType!==3||(U=b+o),re.nodeType===3&&(b+=re.nodeValue.length),(ne=re.firstChild)!==null;)W=re,re=ne;for(;;){if(re===e)break t;if(W===l&&++I===f&&(M=b),W===d&&++ie===o&&(U=b),(ne=re.nextSibling)!==null)break;re=W,W=re.parentNode}re=ne}l=M===-1||U===-1?null:{start:M,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(Xf={focusedElem:e,selectionRange:l},As=!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,d=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(l=0;l<e.length;l++)f=e[l],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=n,f=d.memoizedProps,d=d.memoizedState,o=l.stateNode;try{var de=yl(l.type,f);e=o.getSnapshotBeforeUpdate(de,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Ye(l,l.return,Se)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)Qf(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qf(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 up(e,n,l){var o=l.flags;switch(l.tag){case 0:case 11:case 15:Kn(e,l),o&4&&yr(5,l);break;case 1:if(Kn(e,l),o&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(b){Ye(l,l.return,b)}else{var f=yl(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ye(l,l.return,b)}}o&64&&lp(l),o&512&&xr(l,l.return);break;case 3:if(Kn(e,l),o&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{Km(e,n)}catch(b){Ye(l,l.return,b)}}break;case 27:n===null&&o&4&&sp(l);case 26:case 5:Kn(e,l),n===null&&o&4&&rp(l),o&512&&xr(l,l.return);break;case 12:Kn(e,l);break;case 31:Kn(e,l),o&4&&hp(e,l);break;case 13:Kn(e,l),o&4&&mp(e,l),o&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=vw.bind(null,l),Uw(e,l))));break;case 22:if(o=l.memoizedState!==null||Zn,!o){n=n!==null&&n.memoizedState!==null||ot,f=Zn;var d=ot;Zn=o,(ot=n)&&!d?Pn(e,l,(l.subtreeFlags&8772)!==0):Kn(e,l),Zn=f,ot=d}break;case 30:break;default:Kn(e,l)}}function fp(e){var n=e.alternate;n!==null&&(e.alternate=null,fp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Xa(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 Pe=null,At=!1;function Qn(e,n,l){for(l=l.child;l!==null;)dp(e,n,l),l=l.sibling}function dp(e,n,l){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(Ji,l)}catch{}switch(l.tag){case 26:ot||bn(l,n),Qn(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ot||bn(l,n);var o=Pe,f=At;Oi(l.type)&&(Pe=l.stateNode,At=!1),Qn(e,n,l),Tr(l.stateNode),Pe=o,At=f;break;case 5:ot||bn(l,n);case 6:if(o=Pe,f=At,Pe=null,Qn(e,n,l),Pe=o,At=f,Pe!==null)if(At)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(l.stateNode)}catch(d){Ye(l,n,d)}else try{Pe.removeChild(l.stateNode)}catch(d){Ye(l,n,d)}break;case 18:Pe!==null&&(At?(e=Pe,lg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),xa(e)):lg(Pe,l.stateNode));break;case 4:o=Pe,f=At,Pe=l.stateNode.containerInfo,At=!0,Qn(e,n,l),Pe=o,At=f;break;case 0:case 11:case 14:case 15:Ci(2,l,n),ot||Ci(4,l,n),Qn(e,n,l);break;case 1:ot||(bn(l,n),o=l.stateNode,typeof o.componentWillUnmount=="function"&&ap(l,n,o)),Qn(e,n,l);break;case 21:Qn(e,n,l);break;case 22:ot=(o=ot)||l.memoizedState!==null,Qn(e,n,l),ot=o;break;default:Qn(e,n,l)}}function hp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{xa(e)}catch(l){Ye(n,n.return,l)}}}function mp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{xa(e)}catch(l){Ye(n,n.return,l)}}function fw(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new cp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new cp),n;default:throw Error(r(435,e.tag))}}function ss(e,n){var l=fw(e);n.forEach(function(o){if(!l.has(o)){l.add(o);var f=bw.bind(null,e,o);o.then(f,f)}})}function Mt(e,n){var l=n.deletions;if(l!==null)for(var o=0;o<l.length;o++){var f=l[o],d=e,b=n,M=b;e:for(;M!==null;){switch(M.tag){case 27:if(Oi(M.type)){Pe=M.stateNode,At=!1;break e}break;case 5:Pe=M.stateNode,At=!1;break e;case 3:case 4:Pe=M.stateNode.containerInfo,At=!0;break e}M=M.return}if(Pe===null)throw Error(r(160));dp(d,b,f),Pe=null,At=!1,d=f.alternate,d!==null&&(d.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)pp(n,e),n=n.sibling}var rn=null;function pp(e,n){var l=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Mt(n,e),jt(e),o&4&&(Ci(3,e,e.return),yr(3,e),Ci(5,e,e.return));break;case 1:Mt(n,e),jt(e),o&512&&(ot||l===null||bn(l,l.return)),o&64&&Zn&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?o:l.concat(o))));break;case 26:var f=rn;if(Mt(n,e),jt(e),o&512&&(ot||l===null||bn(l,l.return)),o&4){var d=l!==null?l.memoizedState:null;if(o=e.memoizedState,l===null)if(o===null)if(e.stateNode===null){e:{o=e.type,l=e.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":d=f.getElementsByTagName("title")[0],(!d||d[tl]||d[ct]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=f.createElement(o),f.head.insertBefore(d,f.querySelector("head > title"))),vt(d,o,l),d[ct]=e,it(d),o=d;break e;case"link":var b=pg("link","href",f).get(o+(l.href||""));if(b){for(var M=0;M<b.length;M++)if(d=b[M],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){b.splice(M,1);break t}}d=f.createElement(o),vt(d,o,l),f.head.appendChild(d);break;case"meta":if(b=pg("meta","content",f).get(o+(l.content||""))){for(M=0;M<b.length;M++)if(d=b[M],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){b.splice(M,1);break t}}d=f.createElement(o),vt(d,o,l),f.head.appendChild(d);break;default:throw Error(r(468,o))}d[ct]=e,it(d),o=d}e.stateNode=o}else gg(f,e.type,e.stateNode);else e.stateNode=mg(f,o,e.memoizedProps);else d!==o?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,o===null?gg(f,e.type,e.stateNode):mg(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&vf(e,e.memoizedProps,l.memoizedProps)}break;case 27:Mt(n,e),jt(e),o&512&&(ot||l===null||bn(l,l.return)),l!==null&&o&4&&vf(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Mt(n,e),jt(e),o&512&&(ot||l===null||bn(l,l.return)),e.flags&32){f=e.stateNode;try{$l(f,"")}catch(de){Ye(e,e.return,de)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,vf(e,f,l!==null?l.memoizedProps:f)),o&1024&&(Sf=!0);break;case 6:if(Mt(n,e),jt(e),o&4){if(e.stateNode===null)throw Error(r(162));o=e.memoizedProps,l=e.stateNode;try{l.nodeValue=o}catch(de){Ye(e,e.return,de)}}break;case 3:if(Ns=null,f=rn,rn=Ss(n.containerInfo),Mt(n,e),rn=f,jt(e),o&4&&l!==null&&l.memoizedState.isDehydrated)try{xa(n.containerInfo)}catch(de){Ye(e,e.return,de)}Sf&&(Sf=!1,gp(e));break;case 4:o=rn,rn=Ss(e.stateNode.containerInfo),Mt(n,e),jt(e),rn=o;break;case 12:Mt(n,e),jt(e);break;case 31:Mt(n,e),jt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,ss(e,o)));break;case 13:Mt(n,e),jt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(us=pt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,ss(e,o)));break;case 22:f=e.memoizedState!==null;var U=l!==null&&l.memoizedState!==null,I=Zn,ie=ot;if(Zn=I||f,ot=ie||U,Mt(n,e),ot=ie,Zn=I,jt(e),o&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(l===null||U||Zn||ot||xl(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){U=l=n;try{if(d=U.stateNode,f)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{M=U.stateNode;var re=U.memoizedProps.style,W=re!=null&&re.hasOwnProperty("display")?re.display:null;M.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(de){Ye(U,U.return,de)}}}else if(n.tag===6){if(l===null){U=n;try{U.stateNode.nodeValue=f?"":U.memoizedProps}catch(de){Ye(U,U.return,de)}}}else if(n.tag===18){if(l===null){U=n;try{var ne=U.stateNode;f?ag(ne,!0):ag(U.stateNode,!1)}catch(de){Ye(U,U.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;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(l=o.retryQueue,l!==null&&(o.retryQueue=null,ss(e,l))));break;case 19:Mt(n,e),jt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,ss(e,o)));break;case 30:break;case 21:break;default:Mt(n,e),jt(e)}}function jt(e){var n=e.flags;if(n&2){try{for(var l,o=e.return;o!==null;){if(op(o)){l=o;break}o=o.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var f=l.stateNode,d=bf(e);os(e,d,f);break;case 5:var b=l.stateNode;l.flags&32&&($l(b,""),l.flags&=-33);var M=bf(e);os(e,M,b);break;case 3:case 4:var U=l.stateNode.containerInfo,I=bf(e);wf(e,I,U);break;default:throw Error(r(161))}}catch(ie){Ye(e,e.return,ie)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function gp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;gp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Kn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)up(e,n.alternate,n),n=n.sibling}function xl(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Ci(4,n,n.return),xl(n);break;case 1:bn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&ap(n,n.return,l),xl(n);break;case 27:Tr(n.stateNode);case 26:case 5:bn(n,n.return),xl(n);break;case 22:n.memoizedState===null&&xl(n);break;case 30:xl(n);break;default:xl(n)}e=e.sibling}}function Pn(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,f=e,d=n,b=d.flags;switch(d.tag){case 0:case 11:case 15:Pn(f,d,l),yr(4,d);break;case 1:if(Pn(f,d,l),o=d,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(I){Ye(o,o.return,I)}if(o=d,f=o.updateQueue,f!==null){var M=o.stateNode;try{var U=f.shared.hiddenCallbacks;if(U!==null)for(f.shared.hiddenCallbacks=null,f=0;f<U.length;f++)Qm(U[f],M)}catch(I){Ye(o,o.return,I)}}l&&b&64&&lp(d),xr(d,d.return);break;case 27:sp(d);case 26:case 5:Pn(f,d,l),l&&o===null&&b&4&&rp(d),xr(d,d.return);break;case 12:Pn(f,d,l);break;case 31:Pn(f,d,l),l&&b&4&&hp(f,d);break;case 13:Pn(f,d,l),l&&b&4&&mp(f,d);break;case 22:d.memoizedState===null&&Pn(f,d,l),xr(d,d.return);break;case 30:break;default:Pn(f,d,l)}n=n.sibling}}function Ef(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&lr(l))}function Nf(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&lr(e))}function on(e,n,l,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)yp(e,n,l,o),n=n.sibling}function yp(e,n,l,o){var f=n.flags;switch(n.tag){case 0:case 11:case 15:on(e,n,l,o),f&2048&&yr(9,n);break;case 1:on(e,n,l,o);break;case 3:on(e,n,l,o),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&lr(e)));break;case 12:if(f&2048){on(e,n,l,o),e=n.stateNode;try{var d=n.memoizedProps,b=d.id,M=d.onPostCommit;typeof M=="function"&&M(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(U){Ye(n,n.return,U)}}else on(e,n,l,o);break;case 31:on(e,n,l,o);break;case 13:on(e,n,l,o);break;case 23:break;case 22:d=n.stateNode,b=n.alternate,n.memoizedState!==null?d._visibility&2?on(e,n,l,o):vr(e,n):d._visibility&2?on(e,n,l,o):(d._visibility|=2,oa(e,n,l,o,(n.subtreeFlags&10256)!==0||!1)),f&2048&&Ef(b,n);break;case 24:on(e,n,l,o),f&2048&&Nf(n.alternate,n);break;default:on(e,n,l,o)}}function oa(e,n,l,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,b=n,M=l,U=o,I=b.flags;switch(b.tag){case 0:case 11:case 15:oa(d,b,M,U,f),yr(8,b);break;case 23:break;case 22:var ie=b.stateNode;b.memoizedState!==null?ie._visibility&2?oa(d,b,M,U,f):vr(d,b):(ie._visibility|=2,oa(d,b,M,U,f)),f&&I&2048&&Ef(b.alternate,b);break;case 24:oa(d,b,M,U,f),f&&I&2048&&Nf(b.alternate,b);break;default:oa(d,b,M,U,f)}n=n.sibling}}function vr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,o=n,f=o.flags;switch(o.tag){case 22:vr(l,o),f&2048&&Ef(o.alternate,o);break;case 24:vr(l,o),f&2048&&Nf(o.alternate,o);break;default:vr(l,o)}n=n.sibling}}var br=8192;function sa(e,n,l){if(e.subtreeFlags&br)for(e=e.child;e!==null;)xp(e,n,l),e=e.sibling}function xp(e,n,l){switch(e.tag){case 26:sa(e,n,l),e.flags&br&&e.memoizedState!==null&&Iw(l,rn,e.memoizedState,e.memoizedProps);break;case 5:sa(e,n,l);break;case 3:case 4:var o=rn;rn=Ss(e.stateNode.containerInfo),sa(e,n,l),rn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=br,br=16777216,sa(e,n,l),br=o):sa(e,n,l));break;default:sa(e,n,l)}}function vp(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 wr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];mt=o,wp(o,e)}vp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bp(e),e=e.sibling}function bp(e){switch(e.tag){case 0:case 11:case 15:wr(e),e.flags&2048&&Ci(9,e,e.return);break;case 3:wr(e);break;case 12:wr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,cs(e)):wr(e);break;default:wr(e)}}function cs(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];mt=o,wp(o,e)}vp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Ci(8,n,n.return),cs(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,cs(n));break;default:cs(n)}e=e.sibling}}function wp(e,n){for(;mt!==null;){var l=mt;switch(l.tag){case 0:case 11:case 15:Ci(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var o=l.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:lr(l.memoizedState.cache)}if(o=l.child,o!==null)o.return=l,mt=o;else e:for(l=e;mt!==null;){o=mt;var f=o.sibling,d=o.return;if(fp(o),o===l){mt=null;break e}if(f!==null){f.return=d,mt=f;break e}mt=d}}}var dw={getCacheForType:function(e){var n=yt(lt),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return yt(lt).controller.signal}},hw=typeof WeakMap=="function"?WeakMap:Map,Ve=0,Ze=null,ze=null,Oe=0,$e=0,Vt=null,Ti=!1,ca=!1,_f=!1,Fn=0,We=0,Ai=0,vl=0,Cf=0,$t=0,ua=0,Sr=null,zt=null,Tf=!1,us=0,Sp=0,fs=1/0,ds=null,Mi=null,ut=0,ji=null,fa=null,In=0,Af=0,Mf=null,Ep=null,Er=0,jf=null;function Yt(){return(Ve&2)!==0&&Oe!==0?Oe&-Oe:z.T!==null?Lf():go()}function Np(){if($t===0)if((Oe&536870912)===0||ke){var e=kl;kl<<=1,(kl&3932160)===0&&(kl=262144),$t=e}else $t=536870912;return e=Bt.current,e!==null&&(e.flags|=32),$t}function Rt(e,n,l){(e===Ze&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(da(e,0),zi(e,Oe,$t,!1)),el(e,l),((Ve&2)===0||e!==Ze)&&(e===Ze&&((Ve&2)===0&&(vl|=l),We===4&&zi(e,Oe,$t,!1)),wn(e))}function _p(e,n,l){if((Ve&6)!==0)throw Error(r(327));var o=!l&&(n&127)===0&&(n&e.expiredLanes)===0||Wi(e,n),f=o?gw(e,n):Rf(e,n,!0),d=o;do{if(f===0){ca&&!o&&zi(e,n,0,!1);break}else{if(l=e.current.alternate,d&&!mw(l)){f=Rf(e,n,!1),d=!1;continue}if(f===2){if(d=n,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var M=e;f=Sr;var U=M.current.memoizedState.isDehydrated;if(U&&(da(M,b).flags|=256),b=Rf(M,b,!1),b!==2){if(_f&&!U){M.errorRecoveryDisabledLanes|=d,vl|=d,f=4;break e}d=zt,zt=f,d!==null&&(zt===null?zt=d:zt.push.apply(zt,d))}f=b}if(d=!1,f!==2)continue}}if(f===1){da(e,0),zi(e,n,0,!0);break}e:{switch(o=e,d=f,d){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:zi(o,n,$t,!Ti);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=us+300-pt(),10<f)){if(zi(o,n,$t,!Ti),Hl(o,0,!0)!==0)break e;In=n,o.timeoutHandle=ng(Cp.bind(null,o,l,zt,ds,Tf,n,$t,vl,ua,Ti,d,"Throttled",-0,0),f);break e}Cp(o,l,zt,ds,Tf,n,$t,vl,ua,Ti,d,null,-0,0)}}break}while(!0);wn(e)}function Cp(e,n,l,o,f,d,b,M,U,I,ie,re,W,ne){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:Ln},xp(n,d,re);var de=(d&62914560)===d?us-pt():(d&4194048)===d?Sp-pt():0;if(de=Jw(re,de),de!==null){In=d,e.cancelPendingCommit=de(Dp.bind(null,e,n,d,l,o,f,b,M,U,ie,re,null,W,ne)),zi(e,d,b,!I);return}}Dp(e,n,d,l,o,f,b,M,U)}function mw(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var o=0;o<l.length;o++){var f=l[o],d=f.getSnapshot;f=f.value;try{if(!Lt(d(),f))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;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 zi(e,n,l,o){n&=~Cf,n&=~vl,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var d=31-Et(f),b=1<<d;o[d]=-1,f&=~b}l!==0&&ho(e,l,n)}function hs(){return(Ve&6)===0?(Nr(0),!1):!0}function zf(){if(ze!==null){if($e===0)var e=ze.return;else e=ze,Vn=ul=null,Zu(e),na=null,rr=0,e=ze;for(;e!==null;)ip(e.alternate,e),e=e.return;ze=null}}function da(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Dw(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),In=0,zf(),Ze=e,ze=l=Bn(e.current,null),Oe=n,$e=0,Vt=null,Ti=!1,ca=Wi(e,n),_f=!1,ua=$t=Cf=vl=Ai=We=0,zt=Sr=null,Tf=!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),d=1<<f;n|=e[f],o&=~d}return Fn=n,Do(),l}function Tp(e,n){Te=null,z.H=mr,n===ta||n===Yo?(n=qm(),$e=3):n===Du?(n=qm(),$e=4):$e=n===cf?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Vt=n,ze===null&&(We=1,ns(e,Pt(n,e.current)))}function Ap(){var e=Bt.current;return e===null?!0:(Oe&4194048)===Oe?Wt===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===Wt:!1}function Mp(){var e=z.H;return z.H=mr,e===null?mr:e}function jp(){var e=z.A;return z.A=dw,e}function ms(){We=4,Ti||(Oe&4194048)!==Oe&&Bt.current!==null||(ca=!0),(Ai&134217727)===0&&(vl&134217727)===0||Ze===null||zi(Ze,Oe,$t,!1)}function Rf(e,n,l){var o=Ve;Ve|=2;var f=Mp(),d=jp();(Ze!==e||Oe!==n)&&(ds=null,da(e,n)),n=!1;var b=We;e:do try{if($e!==0&&ze!==null){var M=ze,U=Vt;switch($e){case 8:zf(),b=6;break e;case 3:case 2:case 9:case 6:Bt.current===null&&(n=!0);var I=$e;if($e=0,Vt=null,ha(e,M,U,I),l&&ca){b=0;break e}break;default:I=$e,$e=0,Vt=null,ha(e,M,U,I)}}pw(),b=We;break}catch(ie){Tp(e,ie)}while(!0);return n&&e.shellSuspendCounter++,Vn=ul=null,Ve=o,z.H=f,z.A=d,ze===null&&(Ze=null,Oe=0,Do()),b}function pw(){for(;ze!==null;)zp(ze)}function gw(e,n){var l=Ve;Ve|=2;var o=Mp(),f=jp();Ze!==e||Oe!==n?(ds=null,fs=pt()+500,da(e,n)):ca=Wi(e,n);e:do try{if($e!==0&&ze!==null){n=ze;var d=Vt;t:switch($e){case 1:$e=0,Vt=null,ha(e,n,d,1);break;case 2:case 9:if($m(d)){$e=0,Vt=null,Rp(n);break}n=function(){$e!==2&&$e!==9||Ze!==e||($e=7),wn(e)},d.then(n,n);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:$m(d)?($e=0,Vt=null,Rp(n)):($e=0,Vt=null,ha(e,n,d,7));break;case 5:var b=null;switch(ze.tag){case 26:b=ze.memoizedState;case 5:case 27:var M=ze;if(b?yg(b):M.stateNode.complete){$e=0,Vt=null;var U=M.sibling;if(U!==null)ze=U;else{var I=M.return;I!==null?(ze=I,ps(I)):ze=null}break t}}$e=0,Vt=null,ha(e,n,d,5);break;case 6:$e=0,Vt=null,ha(e,n,d,6);break;case 8:zf(),We=6;break e;default:throw Error(r(462))}}yw();break}catch(ie){Tp(e,ie)}while(!0);return Vn=ul=null,z.H=o,z.A=f,Ve=l,ze!==null?0:(Ze=null,Oe=0,Do(),We)}function yw(){for(;ze!==null&&!Pi();)zp(ze)}function zp(e){var n=tp(e.alternate,e,Fn);e.memoizedProps=e.pendingProps,n===null?ps(e):ze=n}function Rp(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=P0(l,n,n.pendingProps,n.type,void 0,Oe);break;case 11:n=P0(l,n,n.pendingProps,n.type.render,n.ref,Oe);break;case 5:Zu(n);default:ip(l,n),n=ze=jm(n,Fn),n=tp(l,n,Fn)}e.memoizedProps=e.pendingProps,n===null?ps(e):ze=n}function ha(e,n,l,o){Vn=ul=null,Zu(n),na=null,rr=0;var f=n.return;try{if(aw(e,f,n,l,Oe)){We=1,ns(e,Pt(l,e.current)),ze=null;return}}catch(d){if(f!==null)throw ze=f,d;We=1,ns(e,Pt(l,e.current)),ze=null;return}n.flags&32768?(ke||o===1?e=!0:ca||(Oe&536870912)!==0?e=!1:(Ti=e=!0,(o===2||o===9||o===3||o===6)&&(o=Bt.current,o!==null&&o.tag===13&&(o.flags|=16384))),Op(n,e)):ps(n)}function ps(e){var n=e;do{if((n.flags&32768)!==0){Op(n,Ti);return}e=n.return;var l=sw(n.alternate,n,Fn);if(l!==null){ze=l;return}if(n=n.sibling,n!==null){ze=n;return}ze=n=e}while(n!==null);We===0&&(We=5)}function Op(e,n){do{var l=cw(e.alternate,e);if(l!==null){l.flags&=32767,ze=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){ze=e;return}ze=e=l}while(e!==null);We=6,ze=null}function Dp(e,n,l,o,f,d,b,M,U){e.cancelPendingCommit=null;do gs();while(ut!==0);if((Ve&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(d=n.lanes|n.childLanes,d|=vu,Pc(e,l,d,b,M,U),e===Ze&&(ze=Ze=null,Oe=0),fa=n,ji=e,In=l,Af=d,Mf=f,Ep=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ww(Ii,function(){return Up(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=z.T,z.T=null,f=B.p,B.p=2,b=Ve,Ve|=4;try{uw(e,n,l)}finally{Ve=b,B.p=f,z.T=o}}ut=1,kp(),Lp(),Hp()}}function kp(){if(ut===1){ut=0;var e=ji,n=fa,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=z.T,z.T=null;var o=B.p;B.p=2;var f=Ve;Ve|=4;try{pp(n,e);var d=Xf,b=wm(e.containerInfo),M=d.focusedElem,U=d.selectionRange;if(b!==M&&M&&M.ownerDocument&&bm(M.ownerDocument.documentElement,M)){if(U!==null&&mu(M)){var I=U.start,ie=U.end;if(ie===void 0&&(ie=I),"selectionStart"in M)M.selectionStart=I,M.selectionEnd=Math.min(ie,M.value.length);else{var re=M.ownerDocument||document,W=re&&re.defaultView||window;if(W.getSelection){var ne=W.getSelection(),de=M.textContent.length,Se=Math.min(U.start,de),Ge=U.end===void 0?Se:Math.min(U.end,de);!ne.extend&&Se>Ge&&(b=Ge,Ge=Se,Se=b);var K=vm(M,Se),q=vm(M,Ge);if(K&&q&&(ne.rangeCount!==1||ne.anchorNode!==K.node||ne.anchorOffset!==K.offset||ne.focusNode!==q.node||ne.focusOffset!==q.offset)){var F=re.createRange();F.setStart(K.node,K.offset),ne.removeAllRanges(),Se>Ge?(ne.addRange(F),ne.extend(q.node,q.offset)):(F.setEnd(q.node,q.offset),ne.addRange(F))}}}}for(re=[],ne=M;ne=ne.parentNode;)ne.nodeType===1&&re.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<re.length;M++){var ae=re[M];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}As=!!qf,Xf=qf=null}finally{Ve=f,B.p=o,z.T=l}}e.current=n,ut=2}}function Lp(){if(ut===2){ut=0;var e=ji,n=fa,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=z.T,z.T=null;var o=B.p;B.p=2;var f=Ve;Ve|=4;try{up(e,n.alternate,n)}finally{Ve=f,B.p=o,z.T=l}}ut=3}}function Hp(){if(ut===4||ut===3){ut=0,Fi();var e=ji,n=fa,l=In,o=Ep;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?ut=5:(ut=0,fa=ji=null,Bp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Mi=null),qa(l),n=n.stateNode,St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(Ji,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=z.T,f=B.p,B.p=2,z.T=null;try{for(var d=e.onRecoverableError,b=0;b<o.length;b++){var M=o[b];d(M.value,{componentStack:M.stack})}}finally{z.T=n,B.p=f}}(In&3)!==0&&gs(),wn(e),f=e.pendingLanes,(l&261930)!==0&&(f&42)!==0?e===jf?Er++:(Er=0,jf=e):Er=0,Nr(0)}}function Bp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,lr(n)))}function gs(){return kp(),Lp(),Hp(),Up()}function Up(){if(ut!==5)return!1;var e=ji,n=Af;Af=0;var l=qa(In),o=z.T,f=B.p;try{B.p=32>l?32:l,z.T=null,l=Mf,Mf=null;var d=ji,b=In;if(ut=0,fa=ji=null,In=0,(Ve&6)!==0)throw Error(r(331));var M=Ve;if(Ve|=4,bp(d.current),yp(d,d.current,b,l),Ve=M,Nr(0,!1),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(Ji,d)}catch{}return!0}finally{B.p=f,z.T=o,Bp(e,n)}}function Vp(e,n,l){n=Pt(l,n),n=sf(e.stateNode,n,2),e=Ei(e,n,2),e!==null&&(el(e,2),wn(e))}function Ye(e,n,l){if(e.tag===3)Vp(e,e,l);else for(;n!==null;){if(n.tag===3){Vp(n,e,l);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Mi===null||!Mi.has(o))){e=Pt(l,e),l=$0(2),o=Ei(n,l,2),o!==null&&(Y0(l,o,n,e),el(o,2),wn(o));break}}n=n.return}}function Of(e,n,l){var o=e.pingCache;if(o===null){o=e.pingCache=new hw;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(l)||(_f=!0,f.add(l),e=xw.bind(null,e,n,l),n.then(e,e))}function xw(e,n,l){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ze===e&&(Oe&l)===l&&(We===4||We===3&&(Oe&62914560)===Oe&&300>pt()-us?(Ve&2)===0&&da(e,0):Cf|=l,ua===Oe&&(ua=0)),wn(e)}function $p(e,n){n===0&&(n=fo()),e=ol(e,n),e!==null&&(el(e,n),wn(e))}function vw(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),$p(e,l)}function bw(e,n){var l=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(l=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),$p(e,l)}function ww(e,n){return nn(e,n)}var ys=null,ma=null,Df=!1,xs=!1,kf=!1,Ri=0;function wn(e){e!==ma&&e.next===null&&(ma===null?ys=ma=e:ma=ma.next=e),xs=!0,Df||(Df=!0,Ew())}function Nr(e,n){if(!kf&&xs){kf=!0;do for(var l=!1,o=ys;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var d=0;else{var b=o.suspendedLanes,M=o.pingedLanes;d=(1<<31-Et(42|e)+1)-1,d&=f&~(b&~M),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,Gp(o,d))}else d=Oe,d=Hl(o,o===Ze?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Wi(o,d)||(l=!0,Gp(o,d));o=o.next}while(l);kf=!1}}function Sw(){Yp()}function Yp(){xs=Df=!1;var e=0;Ri!==0&&Ow()&&(e=Ri);for(var n=pt(),l=null,o=ys;o!==null;){var f=o.next,d=qp(o,n);d===0?(o.next=null,l===null?ys=f:l.next=f,f===null&&(ma=l)):(l=o,(e!==0||(d&3)!==0)&&(xs=!0)),o=f}ut!==0&&ut!==5||Nr(e),Ri!==0&&(Ri=0)}function qp(e,n){for(var l=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-Et(d),M=1<<b,U=f[b];U===-1?((M&l)===0||(M&o)!==0)&&(f[b]=Kc(M,n)):U<=n&&(e.expiredLanes|=M),d&=~M}if(n=Ze,l=Oe,l=Hl(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,l===0||e===n&&($e===2||$e===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&jn(o),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Wi(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(o!==null&&jn(o),qa(l)){case 2:case 8:l=ci;break;case 32:l=Ii;break;case 268435456:l=Ol;break;default:l=Ii}return o=Xp.bind(null,e),l=nn(l,o),e.callbackPriority=n,e.callbackNode=l,n}return o!==null&&o!==null&&jn(o),e.callbackPriority=2,e.callbackNode=null,2}function Xp(e,n){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(gs()&&e.callbackNode!==l)return null;var o=Oe;return o=Hl(e,e===Ze?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(_p(e,o,n),qp(e,pt()),e.callbackNode!=null&&e.callbackNode===l?Xp.bind(null,e):null)}function Gp(e,n){if(gs())return null;_p(e,n,!0)}function Ew(){kw(function(){(Ve&6)!==0?nn(zn,Sw):Yp()})}function Lf(){if(Ri===0){var e=Wl;e===0&&(e=Dl,Dl<<=1,(Dl&261888)===0&&(Dl=256)),Ri=e}return Ri}function Zp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Co(""+e)}function Qp(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function Nw(e,n,l,o,f){if(n==="submit"&&l&&l.stateNode===f){var d=Zp((f[bt]||null).action),b=o.submitter;b&&(n=(n=b[bt]||null)?Zp(n.formAction):b.getAttribute("formAction"),n!==null&&(d=n,b=null));var M=new jo("action","action",null,o,f);e.push({event:M,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Ri!==0){var U=b?Qp(f,b):new FormData(f);tf(l,{pending:!0,data:U,method:f.method,action:d},null,U)}}else typeof d=="function"&&(M.preventDefault(),U=b?Qp(f,b):new FormData(f),tf(l,{pending:!0,data:U,method:f.method,action:d},d,U))},currentTarget:f}]})}}for(var Hf=0;Hf<xu.length;Hf++){var Bf=xu[Hf],_w=Bf.toLowerCase(),Cw=Bf[0].toUpperCase()+Bf.slice(1);an(_w,"on"+Cw)}an(Nm,"onAnimationEnd"),an(_m,"onAnimationIteration"),an(Cm,"onAnimationStart"),an("dblclick","onDoubleClick"),an("focusin","onFocus"),an("focusout","onBlur"),an(Y2,"onTransitionRun"),an(q2,"onTransitionStart"),an(X2,"onTransitionCancel"),an(Tm,"onTransitionEnd"),mi("onMouseEnter",["mouseout","mouseover"]),mi("onMouseLeave",["mouseout","mouseover"]),mi("onPointerEnter",["pointerout","pointerover"]),mi("onPointerLeave",["pointerout","pointerover"]),Dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Dn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="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(" "),Tw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_r));function Kp(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var o=e[l],f=o.event;o=o.listeners;e:{var d=void 0;if(n)for(var b=o.length-1;0<=b;b--){var M=o[b],U=M.instance,I=M.currentTarget;if(M=M.listener,U!==d&&f.isPropagationStopped())break e;d=M,f.currentTarget=I;try{d(f)}catch(ie){Oo(ie)}f.currentTarget=null,d=U}else for(b=0;b<o.length;b++){if(M=o[b],U=M.instance,I=M.currentTarget,M=M.listener,U!==d&&f.isPropagationStopped())break e;d=M,f.currentTarget=I;try{d(f)}catch(ie){Oo(ie)}f.currentTarget=null,d=U}}}}function Re(e,n){var l=n[Bl];l===void 0&&(l=n[Bl]=new Set);var o=e+"__bubble";l.has(o)||(Pp(n,e,2,!1),l.add(o))}function Uf(e,n,l){var o=0;n&&(o|=4),Pp(l,e,o,n)}var vs="_reactListening"+Math.random().toString(36).slice(2);function Vf(e){if(!e[vs]){e[vs]=!0,bo.forEach(function(l){l!=="selectionchange"&&(Tw.has(l)||Uf(l,!1,e),Uf(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[vs]||(n[vs]=!0,Uf("selectionchange",!1,n))}}function Pp(e,n,l,o){switch(Ng(n)){case 2:var f=tS;break;case 8:f=nS;break;default:f=td}l=f.bind(null,n,l,e),f=void 0,!au||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,l,{capture:!0,passive:f}):e.addEventListener(n,l,!0):f!==void 0?e.addEventListener(n,l,{passive:f}):e.addEventListener(n,l,!1)}function $f(e,n,l,o,f){var d=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 M=o.stateNode.containerInfo;if(M===f)break;if(b===4)for(b=o.return;b!==null;){var U=b.tag;if((U===3||U===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;M!==null;){if(b=ui(M),b===null)return;if(U=b.tag,U===5||U===6||U===26||U===27){o=d=b;continue e}M=M.parentNode}}o=o.return}em(function(){var I=d,ie=iu(l),re=[];e:{var W=Am.get(e);if(W!==void 0){var ne=jo,de=e;switch(e){case"keypress":if(Ao(l)===0)break e;case"keydown":case"keyup":ne=b2;break;case"focusin":de="focus",ne=cu;break;case"focusout":de="blur",ne=cu;break;case"beforeblur":case"afterblur":ne=cu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=im;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=s2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=E2;break;case Nm:case _m:case Cm:ne=f2;break;case Tm:ne=_2;break;case"scroll":case"scrollend":ne=r2;break;case"wheel":ne=T2;break;case"copy":case"cut":case"paste":ne=h2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=am;break;case"toggle":case"beforetoggle":ne=M2}var Se=(n&4)!==0,Ge=!Se&&(e==="scroll"||e==="scrollend"),K=Se?W!==null?W+"Capture":null:W;Se=[];for(var q=I,F;q!==null;){var ae=q;if(F=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||F===null||K===null||(ae=Qa(q,K),ae!=null&&Se.push(Cr(q,ae,F))),Ge)break;q=q.return}0<Se.length&&(W=new ne(W,de,null,l,ie),re.push({event:W,listeners:Se}))}}if((n&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",W&&l!==nu&&(de=l.relatedTarget||l.fromElement)&&(ui(de)||de[On]))break e;if((ne||W)&&(W=ie.window===ie?ie:(W=ie.ownerDocument)?W.defaultView||W.parentWindow:window,ne?(de=l.relatedTarget||l.toElement,ne=I,de=de?ui(de):null,de!==null&&(Ge=c(de),Se=de.tag,de!==Ge||Se!==5&&Se!==27&&Se!==6)&&(de=null)):(ne=null,de=I),ne!==de)){if(Se=im,ae="onMouseLeave",K="onMouseEnter",q="mouse",(e==="pointerout"||e==="pointerover")&&(Se=am,ae="onPointerLeave",K="onPointerEnter",q="pointer"),Ge=ne==null?W:di(ne),F=de==null?W:di(de),W=new Se(ae,q+"leave",ne,l,ie),W.target=Ge,W.relatedTarget=F,ae=null,ui(ie)===I&&(Se=new Se(K,q+"enter",de,l,ie),Se.target=F,Se.relatedTarget=Ge,ae=Se),Ge=ae,ne&&de)t:{for(Se=Aw,K=ne,q=de,F=0,ae=K;ae;ae=Se(ae))F++;ae=0;for(var be=q;be;be=Se(be))ae++;for(;0<F-ae;)K=Se(K),F--;for(;0<ae-F;)q=Se(q),ae--;for(;F--;){if(K===q||q!==null&&K===q.alternate){Se=K;break t}K=Se(K),q=Se(q)}Se=null}else Se=null;ne!==null&&Fp(re,W,ne,Se,!1),de!==null&&Ge!==null&&Fp(re,Ge,de,Se,!0)}}e:{if(W=I?di(I):window,ne=W.nodeName&&W.nodeName.toLowerCase(),ne==="select"||ne==="input"&&W.type==="file")var He=hm;else if(fm(W))if(mm)He=U2;else{He=H2;var pe=L2}else ne=W.nodeName,!ne||ne.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?I&&tu(I.elementType)&&(He=hm):He=B2;if(He&&(He=He(e,I))){dm(re,He,l,ie);break e}pe&&pe(e,W,I),e==="focusout"&&I&&W.type==="number"&&I.memoizedProps.value!=null&&Za(W,"number",W.value)}switch(pe=I?di(I):window,e){case"focusin":(fm(pe)||pe.contentEditable==="true")&&(Gl=pe,pu=I,tr=null);break;case"focusout":tr=pu=Gl=null;break;case"mousedown":gu=!0;break;case"contextmenu":case"mouseup":case"dragend":gu=!1,Sm(re,l,ie);break;case"selectionchange":if($2)break;case"keydown":case"keyup":Sm(re,l,ie)}var Ae;if(fu)e:{switch(e){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Xl?cm(e,l)&&(De="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(De="onCompositionStart");De&&(rm&&l.locale!=="ko"&&(Xl||De!=="onCompositionStart"?De==="onCompositionEnd"&&Xl&&(Ae=tm()):(gi=ie,ru="value"in gi?gi.value:gi.textContent,Xl=!0)),pe=bs(I,De),0<pe.length&&(De=new lm(De,e,null,l,ie),re.push({event:De,listeners:pe}),Ae?De.data=Ae:(Ae=um(l),Ae!==null&&(De.data=Ae)))),(Ae=z2?R2(e,l):O2(e,l))&&(De=bs(I,"onBeforeInput"),0<De.length&&(pe=new lm("onBeforeInput","beforeinput",null,l,ie),re.push({event:pe,listeners:De}),pe.data=Ae)),Nw(re,e,I,l,ie)}Kp(re,n)})}function Cr(e,n,l){return{instance:e,listener:n,currentTarget:l}}function bs(e,n){for(var l=n+"Capture",o=[];e!==null;){var f=e,d=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||d===null||(f=Qa(e,l),f!=null&&o.unshift(Cr(e,f,d)),f=Qa(e,n),f!=null&&o.push(Cr(e,f,d))),e.tag===3)return o;e=e.return}return[]}function Aw(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Fp(e,n,l,o,f){for(var d=n._reactName,b=[];l!==null&&l!==o;){var M=l,U=M.alternate,I=M.stateNode;if(M=M.tag,U!==null&&U===o)break;M!==5&&M!==26&&M!==27||I===null||(U=I,f?(I=Qa(l,d),I!=null&&b.unshift(Cr(l,I,U))):f||(I=Qa(l,d),I!=null&&b.push(Cr(l,I,U)))),l=l.return}b.length!==0&&e.push({event:n,listeners:b})}var Mw=/\r\n?/g,jw=/\u0000|\uFFFD/g;function Ip(e){return(typeof e=="string"?e:""+e).replace(Mw,`
49
+ `).replace(jw,"")}function Jp(e,n){return n=Ip(n),Ip(e)===n}function Xe(e,n,l,o,f,d){switch(l){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||$l(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&$l(e,""+o);break;case"className":Vl(e,"class",o);break;case"tabIndex":Vl(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Vl(e,l,o);break;case"style":Jh(e,o,d);break;case"data":if(n!=="object"){Vl(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=Co(""+o),e.setAttribute(l,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(l==="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(l);break}o=Co(""+o),e.setAttribute(l,o);break;case"onClick":o!=null&&(e.onclick=Ln);break;case"onScroll":o!=null&&Re("scroll",e);break;case"onScrollEnd":o!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=l}}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}l=Co(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""+o):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":o===!0?e.setAttribute(l,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,o):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(l,o):e.removeAttribute(l);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(l):e.setAttribute(l,o);break;case"popover":Re("beforetoggle",e),Re("toggle",e),Ul(e,"popover",o);break;case"xlinkActuate":ln(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":ln(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":ln(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":ln(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":ln(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":ln(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":ln(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":ln(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":ln(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Ul(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=l2.get(l)||l,Ul(e,l,o))}}function Yf(e,n,l,o,f,d){switch(l){case"style":Jh(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof o=="string"?$l(e,o):(typeof o=="number"||typeof o=="bigint")&&$l(e,""+o);break;case"onScroll":o!=null&&Re("scroll",e);break;case"onScrollEnd":o!=null&&Re("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Ln);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wo.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),n=l.slice(2,f?l.length-7:void 0),d=e[bt]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(n,d,f),typeof o=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,o,f);break e}l in e?e[l]=o:o===!0?e.setAttribute(l,""):Ul(e,l,o)}}}function vt(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var o=!1,f=!1,d;for(d in l)if(l.hasOwnProperty(d)){var b=l[d];if(b!=null)switch(d){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Xe(e,n,d,b,l,null)}}f&&Xe(e,n,"srcSet",l.srcSet,l,null),o&&Xe(e,n,"src",l.src,l,null);return;case"input":Re("invalid",e);var M=d=b=f=null,U=null,I=null;for(o in l)if(l.hasOwnProperty(o)){var ie=l[o];if(ie!=null)switch(o){case"name":f=ie;break;case"type":b=ie;break;case"checked":U=ie;break;case"defaultChecked":I=ie;break;case"value":d=ie;break;case"defaultValue":M=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,n));break;default:Xe(e,n,o,ie,l,null)}}_o(e,d,M,U,I,b,f,!1);return;case"select":Re("invalid",e),o=b=d=null;for(f in l)if(l.hasOwnProperty(f)&&(M=l[f],M!=null))switch(f){case"value":d=M;break;case"defaultValue":b=M;break;case"multiple":o=M;default:Xe(e,n,f,M,l,null)}n=d,l=b,e.multiple=!!o,n!=null?kn(e,!!o,n,!1):l!=null&&kn(e,!!o,l,!0);return;case"textarea":Re("invalid",e),d=f=o=null;for(b in l)if(l.hasOwnProperty(b)&&(M=l[b],M!=null))switch(b){case"value":o=M;break;case"defaultValue":f=M;break;case"children":d=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(91));break;default:Xe(e,n,b,M,l,null)}Fh(e,o,f,d);return;case"option":for(U in l)if(l.hasOwnProperty(U)&&(o=l[U],o!=null))switch(U){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Xe(e,n,U,o,l,null)}return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(o=0;o<_r.length;o++)Re(_r[o],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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 l)if(l.hasOwnProperty(I)&&(o=l[I],o!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Xe(e,n,I,o,l,null)}return;default:if(tu(n)){for(ie in l)l.hasOwnProperty(ie)&&(o=l[ie],o!==void 0&&Yf(e,n,ie,o,l,void 0));return}}for(M in l)l.hasOwnProperty(M)&&(o=l[M],o!=null&&Xe(e,n,M,o,l,null))}function zw(e,n,l,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,d=null,b=null,M=null,U=null,I=null,ie=null;for(ne in l){var re=l[ne];if(l.hasOwnProperty(ne)&&re!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":U=re;default:o.hasOwnProperty(ne)||Xe(e,n,ne,null,o,re)}}for(var W in o){var ne=o[W];if(re=l[W],o.hasOwnProperty(W)&&(ne!=null||re!=null))switch(W){case"type":d=ne;break;case"name":f=ne;break;case"checked":I=ne;break;case"defaultChecked":ie=ne;break;case"value":b=ne;break;case"defaultValue":M=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,n));break;default:ne!==re&&Xe(e,n,W,ne,o,re)}}il(e,b,M,U,I,ie,d,f);return;case"select":ne=b=M=W=null;for(d in l)if(U=l[d],l.hasOwnProperty(d)&&U!=null)switch(d){case"value":break;case"multiple":ne=U;default:o.hasOwnProperty(d)||Xe(e,n,d,null,o,U)}for(f in o)if(d=o[f],U=l[f],o.hasOwnProperty(f)&&(d!=null||U!=null))switch(f){case"value":W=d;break;case"defaultValue":M=d;break;case"multiple":b=d;default:d!==U&&Xe(e,n,f,d,o,U)}n=M,l=b,o=ne,W!=null?kn(e,!!l,W,!1):!!o!=!!l&&(n!=null?kn(e,!!l,n,!0):kn(e,!!l,l?[]:"",!1));return;case"textarea":ne=W=null;for(M in l)if(f=l[M],l.hasOwnProperty(M)&&f!=null&&!o.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Xe(e,n,M,null,o,f)}for(b in o)if(f=o[b],d=l[b],o.hasOwnProperty(b)&&(f!=null||d!=null))switch(b){case"value":W=f;break;case"defaultValue":ne=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==d&&Xe(e,n,b,f,o,d)}Ph(e,W,ne);return;case"option":for(var de in l)if(W=l[de],l.hasOwnProperty(de)&&W!=null&&!o.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:Xe(e,n,de,null,o,W)}for(U in o)if(W=o[U],ne=l[U],o.hasOwnProperty(U)&&W!==ne&&(W!=null||ne!=null))switch(U){case"selected":e.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:Xe(e,n,U,W,o,ne)}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 Se in l)W=l[Se],l.hasOwnProperty(Se)&&W!=null&&!o.hasOwnProperty(Se)&&Xe(e,n,Se,null,o,W);for(I in o)if(W=o[I],ne=l[I],o.hasOwnProperty(I)&&W!==ne&&(W!=null||ne!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(137,n));break;default:Xe(e,n,I,W,o,ne)}return;default:if(tu(n)){for(var Ge in l)W=l[Ge],l.hasOwnProperty(Ge)&&W!==void 0&&!o.hasOwnProperty(Ge)&&Yf(e,n,Ge,void 0,o,W);for(ie in o)W=o[ie],ne=l[ie],!o.hasOwnProperty(ie)||W===ne||W===void 0&&ne===void 0||Yf(e,n,ie,W,o,ne);return}}for(var K in l)W=l[K],l.hasOwnProperty(K)&&W!=null&&!o.hasOwnProperty(K)&&Xe(e,n,K,null,o,W);for(re in o)W=o[re],ne=l[re],!o.hasOwnProperty(re)||W===ne||W==null&&ne==null||Xe(e,n,re,W,o,ne)}function Wp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Rw(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),o=0;o<l.length;o++){var f=l[o],d=f.transferSize,b=f.initiatorType,M=f.duration;if(d&&M&&Wp(b)){for(b=0,M=f.responseEnd,o+=1;o<l.length;o++){var U=l[o],I=U.startTime;if(I>M)break;var ie=U.transferSize,re=U.initiatorType;ie&&Wp(re)&&(U=U.responseEnd,b+=ie*(U<M?1:(M-I)/(U-I)))}if(--o,n+=8*(d+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 qf=null,Xf=null;function ws(e){return e.nodeType===9?e:e.ownerDocument}function eg(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 tg(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 Gf(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 Zf=null;function Ow(){var e=window.event;return e&&e.type==="popstate"?e===Zf?!1:(Zf=e,!0):(Zf=null,!1)}var ng=typeof setTimeout=="function"?setTimeout:void 0,Dw=typeof clearTimeout=="function"?clearTimeout:void 0,ig=typeof Promise=="function"?Promise:void 0,kw=typeof queueMicrotask=="function"?queueMicrotask:typeof ig<"u"?function(e){return ig.resolve(null).then(e).catch(Lw)}:ng;function Lw(e){setTimeout(function(){throw e})}function Oi(e){return e==="head"}function lg(e,n){var l=n,o=0;do{var f=l.nextSibling;if(e.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"||l==="/&"){if(o===0){e.removeChild(f),xa(n);return}o--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")o++;else if(l==="html")Tr(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Tr(l);for(var d=l.firstChild;d;){var b=d.nextSibling,M=d.nodeName;d[tl]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=b}}else l==="body"&&Tr(e.ownerDocument.body);l=f}while(l);xa(n)}function ag(e,n){var l=e;e=0;do{var o=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),o&&o.nodeType===8)if(l=o.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=o}while(l)}function Qf(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Qf(l),Xa(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Hw(e,n,l,o){for(;e.nodeType===1;){var f=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[tl])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==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(d=e.getAttribute("src"),(d!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=en(e.nextSibling),e===null)break}return null}function Bw(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=en(e.nextSibling),e===null))return null;return e}function rg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=en(e.nextSibling),e===null))return null;return e}function Kf(e){return e.data==="$?"||e.data==="$~"}function Pf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Uw(e,n){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||l.readyState!=="loading")n();else{var o=function(){n(),l.removeEventListener("DOMContentLoaded",o)};l.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function en(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 Ff=null;function og(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return en(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function sg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return e;n--}else l!=="/$"&&l!=="/&"||n++}e=e.previousSibling}return null}function cg(e,n,l){switch(n=ws(l),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]);Xa(e)}var tn=new Map,ug=new Set;function Ss(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Jn=B.d;B.d={f:Vw,r:$w,D:Yw,C:qw,L:Xw,m:Gw,X:Qw,S:Zw,M:Kw};function Vw(){var e=Jn.f(),n=hs();return e||n}function $w(e){var n=fi(e);n!==null&&n.tag===5&&n.type==="form"?T0(n):Jn.r(e)}var pa=typeof document>"u"?null:document;function fg(e,n,l){var o=pa;if(o&&typeof n=="string"&&n){var f=Ct(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),ug.has(f)||(ug.add(f),e={rel:e,crossOrigin:l,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),vt(n,"link",e),it(n),o.head.appendChild(n)))}}function Yw(e){Jn.D(e),fg("dns-prefetch",e,null)}function qw(e,n){Jn.C(e,n),fg("preconnect",e,n)}function Xw(e,n,l){Jn.L(e,n,l);var o=pa;if(o&&e&&n){var f='link[rel="preload"][as="'+Ct(n)+'"]';n==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+Ct(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+Ct(l.imageSizes)+'"]')):f+='[href="'+Ct(e)+'"]';var d=f;switch(n){case"style":d=ga(e);break;case"script":d=ya(e)}tn.has(d)||(e=y({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),tn.set(d,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(Ar(d))||n==="script"&&o.querySelector(Mr(d))||(n=o.createElement("link"),vt(n,"link",e),it(n),o.head.appendChild(n)))}}function Gw(e,n){Jn.m(e,n);var l=pa;if(l&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+Ct(o)+'"][href="'+Ct(e)+'"]',d=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ya(e)}if(!tn.has(d)&&(e=y({rel:"modulepreload",href:e},n),tn.set(d,e),l.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Mr(d)))return}o=l.createElement("link"),vt(o,"link",e),it(o),l.head.appendChild(o)}}}function Zw(e,n,l){Jn.S(e,n,l);var o=pa;if(o&&e){var f=hi(o).hoistableStyles,d=ga(e);n=n||"default";var b=f.get(d);if(!b){var M={loading:0,preload:null};if(b=o.querySelector(Ar(d)))M.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},l),(l=tn.get(d))&&If(e,l);var U=b=o.createElement("link");it(U),vt(U,"link",e),U._p=new Promise(function(I,ie){U.onload=I,U.onerror=ie}),U.addEventListener("load",function(){M.loading|=1}),U.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Es(b,n,o)}b={type:"stylesheet",instance:b,count:1,state:M},f.set(d,b)}}}function Qw(e,n){Jn.X(e,n);var l=pa;if(l&&e){var o=hi(l).hoistableScripts,f=ya(e),d=o.get(f);d||(d=l.querySelector(Mr(f)),d||(e=y({src:e,async:!0},n),(n=tn.get(f))&&Jf(e,n),d=l.createElement("script"),it(d),vt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function Kw(e,n){Jn.M(e,n);var l=pa;if(l&&e){var o=hi(l).hoistableScripts,f=ya(e),d=o.get(f);d||(d=l.querySelector(Mr(f)),d||(e=y({src:e,async:!0,type:"module"},n),(n=tn.get(f))&&Jf(e,n),d=l.createElement("script"),it(d),vt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function dg(e,n,l,o){var f=(f=ue.current)?Ss(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=ga(l.href),l=hi(f).hoistableStyles,o=l.get(n),o||(o={type:"style",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ga(l.href);var d=hi(f).hoistableStyles,b=d.get(e);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=f.querySelector(Ar(e)))&&!d._p&&(b.instance=d,b.state.loading=5),tn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},tn.set(e,l),d||Pw(f,e,l,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=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=ya(l),l=hi(f).hoistableScripts,o=l.get(n),o||(o={type:"script",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ga(e){return'href="'+Ct(e)+'"'}function Ar(e){return'link[rel="stylesheet"]['+e+"]"}function hg(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Pw(e,n,l,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",l),it(n),e.head.appendChild(n))}function ya(e){return'[src="'+Ct(e)+'"]'}function Mr(e){return"script[async]"+e}function mg(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+Ct(l.href)+'"]');if(o)return n.instance=o,it(o),o;var f=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),it(o),vt(o,"style",f),Es(o,l.precedence,e),n.instance=o;case"stylesheet":f=ga(l.href);var d=e.querySelector(Ar(f));if(d)return n.state.loading|=4,n.instance=d,it(d),d;o=hg(l),(f=tn.get(f))&&If(o,f),d=(e.ownerDocument||e).createElement("link"),it(d);var b=d;return b._p=new Promise(function(M,U){b.onload=M,b.onerror=U}),vt(d,"link",o),n.state.loading|=4,Es(d,l.precedence,e),n.instance=d;case"script":return d=ya(l.src),(f=e.querySelector(Mr(d)))?(n.instance=f,it(f),f):(o=l,(f=tn.get(d))&&(o=y({},l),Jf(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,Es(o,l.precedence,e));return n.instance}function Es(e,n,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,d=f,b=0;b<o.length;b++){var M=o[b];if(M.dataset.precedence===n)d=M;else if(d!==f)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function If(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Jf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Ns=null;function pg(e,n,l){if(Ns===null){var o=new Map,f=Ns=new Map;f.set(l,o)}else f=Ns,o=f.get(l),o||(o=new Map,f.set(l,o));if(o.has(e))return o;for(o.set(e,null),l=l.getElementsByTagName(e),f=0;f<l.length;f++){var d=l[f];if(!(d[tl]||d[ct]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(n)||"";b=e+b;var M=o.get(b);M?M.push(d):o.set(b,[d])}}return o}function gg(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function Fw(e,n,l){if(l===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 yg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Iw(e,n,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=ga(o.href),d=n.querySelector(Ar(f));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=_s.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=d,it(d);return}d=n.ownerDocument||n,o=hg(o),(f=tn.get(f))&&If(o,f),d=d.createElement("link"),it(d);var b=d;b._p=new Promise(function(M,U){b.onload=M,b.onerror=U}),vt(d,"link",o),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=_s.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var Wf=0;function Jw(e,n){return e.stylesheets&&e.count===0&&Ts(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var o=setTimeout(function(){if(e.stylesheets&&Ts(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&Wf===0&&(Wf=62500*Rw());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ts(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Wf?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function _s(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ts(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Cs=null;function Ts(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cs=new Map,n.forEach(Ww,e),Cs=null,_s.call(e))}function Ww(e,n){if(!(n.state.loading&4)){var l=Cs.get(e);if(l)var o=l.get(null);else{l=new Map,Cs.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<f.length;d++){var b=f[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(l.set(b.dataset.precedence,b),o=b)}o&&l.set(null,o)}f=n.instance,b=f.getAttribute("data-precedence"),d=l.get(b)||o,d===o&&l.set(null,f),l.set(b,f),this.count++,o=_s.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),d?d.parentNode.insertBefore(f,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var jr={$$typeof:N,Provider:null,Consumer:null,_currentValue:O,_currentValue2:O,_threadCount:0};function eS(e,n,l,o,f,d,b,M,U){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=$a(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$a(0),this.hiddenUpdates=$a(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function xg(e,n,l,o,f,d,b,M,U,I,ie,re){return e=new eS(e,n,l,b,U,I,ie,re,M),n=1,d===!0&&(n|=24),d=Ht(3,null,null,n),e.current=d,d.stateNode=e,n=zu(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:o,isDehydrated:l,cache:n},ku(d),e}function vg(e){return e?(e=Kl,e):Kl}function bg(e,n,l,o,f,d){f=vg(f),o.context===null?o.context=f:o.pendingContext=f,o=Si(n),o.payload={element:l},d=d===void 0?null:d,d!==null&&(o.callback=d),l=Ei(e,o,n),l!==null&&(Rt(l,e,n),sr(l,e,n))}function wg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function ed(e,n){wg(e,n),(e=e.alternate)&&wg(e,n)}function Sg(e){if(e.tag===13||e.tag===31){var n=ol(e,67108864);n!==null&&Rt(n,e,67108864),ed(e,67108864)}}function Eg(e){if(e.tag===13||e.tag===31){var n=Yt();n=Ya(n);var l=ol(e,n);l!==null&&Rt(l,e,n),ed(e,n)}}var As=!0;function tS(e,n,l,o){var f=z.T;z.T=null;var d=B.p;try{B.p=2,td(e,n,l,o)}finally{B.p=d,z.T=f}}function nS(e,n,l,o){var f=z.T;z.T=null;var d=B.p;try{B.p=8,td(e,n,l,o)}finally{B.p=d,z.T=f}}function td(e,n,l,o){if(As){var f=nd(o);if(f===null)$f(e,n,o,Ms,l),_g(e,o);else if(lS(f,e,n,l,o))o.stopPropagation();else if(_g(e,o),n&4&&-1<iS.indexOf(e)){for(;f!==null;){var d=fi(f);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=Rn(d.pendingLanes);if(b!==0){var M=d;for(M.pendingLanes|=2,M.entangledLanes|=2;b;){var U=1<<31-Et(b);M.entanglements[1]|=U,b&=~U}wn(d),(Ve&6)===0&&(fs=pt()+500,Nr(0))}}break;case 31:case 13:M=ol(d,2),M!==null&&Rt(M,d,2),hs(),ed(d,2)}if(d=nd(o),d===null&&$f(e,n,o,Ms,l),d===f)break;f=d}f!==null&&o.stopPropagation()}else $f(e,n,o,null,l)}}function nd(e){return e=iu(e),id(e)}var Ms=null;function id(e){if(Ms=null,e=ui(e),e!==null){var n=c(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=u(n),e!==null)return e;e=null}else if(l===31){if(e=h(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Ms=e,null}function Ng(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(Rl()){case zn:return 2;case ci:return 8;case Ii:case Yc:return 32;case Ol:return 268435456;default:return 32}default:return 32}}var ld=!1,Di=null,ki=null,Li=null,zr=new Map,Rr=new Map,Hi=[],iS="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 _g(e,n){switch(e){case"focusin":case"focusout":Di=null;break;case"dragenter":case"dragleave":ki=null;break;case"mouseover":case"mouseout":Li=null;break;case"pointerover":case"pointerout":zr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rr.delete(n.pointerId)}}function Or(e,n,l,o,f,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:l,eventSystemFlags:o,nativeEvent:d,targetContainers:[f]},n!==null&&(n=fi(n),n!==null&&Sg(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function lS(e,n,l,o,f){switch(n){case"focusin":return Di=Or(Di,e,n,l,o,f),!0;case"dragenter":return ki=Or(ki,e,n,l,o,f),!0;case"mouseover":return Li=Or(Li,e,n,l,o,f),!0;case"pointerover":var d=f.pointerId;return zr.set(d,Or(zr.get(d)||null,e,n,l,o,f)),!0;case"gotpointercapture":return d=f.pointerId,Rr.set(d,Or(Rr.get(d)||null,e,n,l,o,f)),!0}return!1}function Cg(e){var n=ui(e.target);if(n!==null){var l=c(n);if(l!==null){if(n=l.tag,n===13){if(n=u(l),n!==null){e.blockedOn=n,yo(e.priority,function(){Eg(l)});return}}else if(n===31){if(n=h(l),n!==null){e.blockedOn=n,yo(e.priority,function(){Eg(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function js(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=nd(e.nativeEvent);if(l===null){l=e.nativeEvent;var o=new l.constructor(l.type,l);nu=o,l.target.dispatchEvent(o),nu=null}else return n=fi(l),n!==null&&Sg(n),e.blockedOn=l,!1;n.shift()}return!0}function Tg(e,n,l){js(e)&&l.delete(n)}function aS(){ld=!1,Di!==null&&js(Di)&&(Di=null),ki!==null&&js(ki)&&(ki=null),Li!==null&&js(Li)&&(Li=null),zr.forEach(Tg),Rr.forEach(Tg)}function zs(e,n){e.blockedOn===n&&(e.blockedOn=null,ld||(ld=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,aS)))}var Rs=null;function Ag(e){Rs!==e&&(Rs=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Rs===e&&(Rs=null);for(var n=0;n<e.length;n+=3){var l=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(id(o||l)===null)continue;break}var d=fi(l);d!==null&&(e.splice(n,3),n-=3,tf(d,{pending:!0,data:f,method:l.method,action:o},o,f))}}))}function xa(e){function n(U){return zs(U,e)}Di!==null&&zs(Di,e),ki!==null&&zs(ki,e),Li!==null&&zs(Li,e),zr.forEach(n),Rr.forEach(n);for(var l=0;l<Hi.length;l++){var o=Hi[l];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Hi.length&&(l=Hi[0],l.blockedOn===null);)Cg(l),l.blockedOn===null&&Hi.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(o=0;o<l.length;o+=3){var f=l[o],d=l[o+1],b=f[bt]||null;if(typeof d=="function")b||Ag(l);else if(b){var M=null;if(d&&d.hasAttribute("formAction")){if(f=d,b=d[bt]||null)M=b.formAction;else if(id(f)!==null)continue}else M=b.action;typeof M=="function"?l[o+1]=M:(l.splice(o,3),o-=3),Ag(l)}}}function Mg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(l,20)}function l(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.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(l,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function ad(e){this._internalRoot=e}Os.prototype.render=ad.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var l=n.current,o=Yt();bg(l,o,e,n,null,null)},Os.prototype.unmount=ad.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;bg(e.current,2,null,e,null,null),hs(),n[On]=null}};function Os(e){this._internalRoot=e}Os.prototype.unstable_scheduleHydration=function(e){if(e){var n=go();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Hi.length&&n!==0&&n<Hi[l].priority;l++);Hi.splice(l,0,e),l===0&&Cg(e)}};var jg=i.version;if(jg!=="19.2.4")throw Error(r(527,jg,"19.2.4"));B.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=m(n),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var rS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ds=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ds.isDisabled&&Ds.supportsFiber)try{Ji=Ds.inject(rS),St=Ds}catch{}}return kr.createRoot=function(e,n){if(!s(e))throw Error(r(299));var l=!1,o="",f=H0,d=B0,b=U0;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=xg(e,1,!1,null,null,l,o,null,f,d,b,Mg),e[On]=n.current,Vf(e),new ad(n)},kr.hydrateRoot=function(e,n,l){if(!s(e))throw Error(r(299));var o=!1,f="",d=H0,b=B0,M=U0,U=null;return l!=null&&(l.unstable_strictMode===!0&&(o=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(M=l.onRecoverableError),l.formState!==void 0&&(U=l.formState)),n=xg(e,1,!0,n,l??null,o,f,U,d,b,M,Mg),n.context=vg(null),l=n.current,o=Yt(),o=Ya(o),f=Si(o),f.callback=null,Ei(l,f,o),l=o,n.current.lanes=l,el(n,l),wn(n),e[On]=n.current,Vf(e),new Os(n)},kr.version="19.2.4",kr}var Vg;function gS(){if(Vg)return sd.exports;Vg=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(),sd.exports=pS(),sd.exports}var yS=gS();function xS(){const[t,i]=T.useState({status:"connecting",sources:[],lastChecked:null,error:null,isRefreshing:!1}),a=T.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 T.useEffect(()=>{a()},[a]),{...t,refresh:a}}const $g=t=>{let i;const a=new Set,r=(m,x)=>{const y=typeof m=="function"?m(i):m;if(!Object.is(y,i)){const v=i;i=x??(typeof y!="object"||y===null)?y:Object.assign({},i,y),a.forEach(w=>w(i,v))}},s=()=>i,h={setState:r,getState:s,getInitialState:()=>p,subscribe:m=>(a.add(m),()=>a.delete(m))},p=i=t(r,s,h);return h},vS=(t=>t?$g(t):$g),bS=t=>t;function wS(t,i=bS){const a=qt.useSyncExternalStore(t.subscribe,qt.useCallback(()=>i(t.getState()),[t,i]),qt.useCallback(()=>i(t.getInitialState()),[t,i]));return qt.useDebugValue(a),a}const Yg=t=>{const i=vS(t),a=r=>wS(i,r);return Object.assign(a,i),a},xc=(t=>t?Yg(t):Yg),Mx=xc((t,i)=>({toasts:[],addToast:a=>{const r=Math.random().toString(36).substring(2,9),s=a.duration??4e3;t(c=>({toasts:[...c.toasts,{...a,id:r}]})),setTimeout(()=>{i().removeToast(r)},s)},removeToast:a=>{t(r=>({toasts:r.toasts.filter(s=>s.id!==a)}))},clearToasts:()=>{t({toasts:[]})}}));function SS(){const{addToast:t,removeToast:i,clearToasts:a}=Mx();return{toast:h=>{t(h)},success:(h,p)=>{t({title:h,description:p,variant:"success"})},error:(h,p)=>{t({title:h,description:p,variant:"error"})},info:(h,p)=>{t({title:h,description:p,variant:"info"})},removeToast:i,clearToasts:a}}function jx(t){var i,a,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]&&(a=jx(t[i]))&&(r&&(r+=" "),r+=a)}else for(a in t)t[a]&&(r&&(r+=" "),r+=a);return r}function zx(){for(var t,i,a=0,r="",s=arguments.length;a<s;a++)(t=arguments[a])&&(i=jx(t))&&(r&&(r+=" "),r+=i);return r}const ES=(t,i)=>{const a=new Array(t.length+i.length);for(let r=0;r<t.length;r++)a[r]=t[r];for(let r=0;r<i.length;r++)a[t.length+r]=i[r];return a},NS=(t,i)=>({classGroupId:t,validator:i}),Rx=(t=new Map,i=null,a)=>({nextPart:t,validators:i,classGroupId:a}),tc="-",qg=[],_S="arbitrary..",CS=t=>{const i=AS(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return TS(u);const h=u.split(tc),p=h[0]===""&&h.length>1?1:0;return Ox(h,p,i)},getConflictingClassGroupIds:(u,h)=>{if(h){const p=r[u],m=a[u];return p?m?ES(m,p):p:m||qg}return a[u]||qg}}},Ox=(t,i,a)=>{if(t.length-i===0)return a.classGroupId;const s=t[i],c=a.nextPart.get(s);if(c){const m=Ox(t,i+1,c);if(m)return m}const u=a.validators;if(u===null)return;const h=i===0?t.join(tc):t.slice(i).join(tc),p=u.length;for(let m=0;m<p;m++){const x=u[m];if(x.validator(h))return x.classGroupId}},TS=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=t.slice(1,-1),a=i.indexOf(":"),r=i.slice(0,a);return r?_S+r:void 0})(),AS=t=>{const{theme:i,classGroups:a}=t;return MS(a,i)},MS=(t,i)=>{const a=Rx();for(const r in t){const s=t[r];sh(s,a,r,i)}return a},sh=(t,i,a,r)=>{const s=t.length;for(let c=0;c<s;c++){const u=t[c];jS(u,i,a,r)}},jS=(t,i,a,r)=>{if(typeof t=="string"){zS(t,i,a);return}if(typeof t=="function"){RS(t,i,a,r);return}OS(t,i,a,r)},zS=(t,i,a)=>{const r=t===""?i:Dx(i,t);r.classGroupId=a},RS=(t,i,a,r)=>{if(DS(t)){sh(t(r),i,a,r);return}i.validators===null&&(i.validators=[]),i.validators.push(NS(a,t))},OS=(t,i,a,r)=>{const s=Object.entries(t),c=s.length;for(let u=0;u<c;u++){const[h,p]=s[u];sh(p,Dx(i,h),a,r)}},Dx=(t,i)=>{let a=t;const r=i.split(tc),s=r.length;for(let c=0;c<s;c++){const u=r[c];let h=a.nextPart.get(u);h||(h=Rx(),a.nextPart.set(u,h)),a=h}return a},DS=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,kS=t=>{if(t<1)return{get:()=>{},set:()=>{}};let i=0,a=Object.create(null),r=Object.create(null);const s=(c,u)=>{a[c]=u,i++,i>t&&(i=0,r=a,a=Object.create(null))};return{get(c){let u=a[c];if(u!==void 0)return u;if((u=r[c])!==void 0)return s(c,u),u},set(c,u){c in a?a[c]=u:s(c,u)}}},Dd="!",Xg=":",LS=[],Gg=(t,i,a,r,s)=>({modifiers:t,hasImportantModifier:i,baseClassName:a,maybePostfixModifierPosition:r,isExternal:s}),HS=t=>{const{prefix:i,experimentalParseClassName:a}=t;let r=s=>{const c=[];let u=0,h=0,p=0,m;const x=s.length;for(let _=0;_<x;_++){const E=s[_];if(u===0&&h===0){if(E===Xg){c.push(s.slice(p,_)),p=_+1;continue}if(E==="/"){m=_;continue}}E==="["?u++:E==="]"?u--:E==="("?h++:E===")"&&h--}const y=c.length===0?s:s.slice(p);let v=y,w=!1;y.endsWith(Dd)?(v=y.slice(0,-1),w=!0):y.startsWith(Dd)&&(v=y.slice(1),w=!0);const S=m&&m>p?m-p:void 0;return Gg(c,w,v,S)};if(i){const s=i+Xg,c=r;r=u=>u.startsWith(s)?c(u.slice(s.length)):Gg(LS,!1,u,void 0,!0)}if(a){const s=r;r=c=>a({className:c,parseClassName:s})}return r},BS=t=>{const i=new Map;return t.orderSensitiveModifiers.forEach((a,r)=>{i.set(a,1e6+r)}),a=>{const r=[];let s=[];for(let c=0;c<a.length;c++){const u=a[c],h=u[0]==="[",p=i.has(u);h||p?(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}},US=t=>({cache:kS(t.cacheSize),parseClassName:HS(t),sortModifiers:BS(t),...CS(t)}),VS=/\s+/,$S=(t,i)=>{const{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:c}=i,u=[],h=t.trim().split(VS);let p="";for(let m=h.length-1;m>=0;m-=1){const x=h[m],{isExternal:y,modifiers:v,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:_}=a(x);if(y){p=x+(p.length>0?" "+p:p);continue}let E=!!_,C=r(E?S.substring(0,_):S);if(!C){if(!E){p=x+(p.length>0?" "+p:p);continue}if(C=r(S),!C){p=x+(p.length>0?" "+p:p);continue}E=!1}const j=v.length===0?"":v.length===1?v[0]:c(v).join(":"),N=w?j+Dd:j,A=N+C;if(u.indexOf(A)>-1)continue;u.push(A);const H=s(C,E);for(let k=0;k<H.length;++k){const L=H[k];u.push(N+L)}p=x+(p.length>0?" "+p:p)}return p},YS=(...t)=>{let i=0,a,r,s="";for(;i<t.length;)(a=t[i++])&&(r=kx(a))&&(s&&(s+=" "),s+=r);return s},kx=t=>{if(typeof t=="string")return t;let i,a="";for(let r=0;r<t.length;r++)t[r]&&(i=kx(t[r]))&&(a&&(a+=" "),a+=i);return a},qS=(t,...i)=>{let a,r,s,c;const u=p=>{const m=i.reduce((x,y)=>y(x),t());return a=US(m),r=a.cache.get,s=a.cache.set,c=h,h(p)},h=p=>{const m=r(p);if(m)return m;const x=$S(p,a);return s(p,x),x};return c=u,(...p)=>c(YS(...p))},XS=[],ft=t=>{const i=a=>a[t]||XS;return i.isThemeGetter=!0,i},Lx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,GS=/^\d+\/\d+$/,ZS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,QS=/\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$/,KS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,PS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,va=t=>GS.test(t),Me=t=>!!t&&!Number.isNaN(Number(t)),Ui=t=>!!t&&Number.isInteger(Number(t)),dd=t=>t.endsWith("%")&&Me(t.slice(0,-1)),Wn=t=>ZS.test(t),IS=()=>!0,JS=t=>QS.test(t)&&!KS.test(t),Bx=()=>!1,WS=t=>PS.test(t),eE=t=>FS.test(t),tE=t=>!he(t)&&!me(t),nE=t=>Ha(t,$x,Bx),he=t=>Lx.test(t),bl=t=>Ha(t,Yx,JS),hd=t=>Ha(t,oE,Me),Zg=t=>Ha(t,Ux,Bx),iE=t=>Ha(t,Vx,eE),ks=t=>Ha(t,qx,WS),me=t=>Hx.test(t),Lr=t=>Ba(t,Yx),lE=t=>Ba(t,sE),Qg=t=>Ba(t,Ux),aE=t=>Ba(t,$x),rE=t=>Ba(t,Vx),Ls=t=>Ba(t,qx,!0),Ha=(t,i,a)=>{const r=Lx.exec(t);return r?r[1]?i(r[1]):a(r[2]):!1},Ba=(t,i,a=!1)=>{const r=Hx.exec(t);return r?r[1]?i(r[1]):a:!1},Ux=t=>t==="position"||t==="percentage",Vx=t=>t==="image"||t==="url",$x=t=>t==="length"||t==="size"||t==="bg-size",Yx=t=>t==="length",oE=t=>t==="number",sE=t=>t==="family-name",qx=t=>t==="shadow",cE=()=>{const t=ft("color"),i=ft("font"),a=ft("text"),r=ft("font-weight"),s=ft("tracking"),c=ft("leading"),u=ft("breakpoint"),h=ft("container"),p=ft("spacing"),m=ft("radius"),x=ft("shadow"),y=ft("inset-shadow"),v=ft("text-shadow"),w=ft("drop-shadow"),S=ft("blur"),_=ft("perspective"),E=ft("aspect"),C=ft("ease"),j=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"],H=()=>[...A(),me,he],k=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],V=()=>[me,he,p],Z=()=>[va,"full","auto",...V()],le=()=>[Ui,"none","subgrid",me,he],Q=()=>["auto",{span:["full",Ui,me,he]},Ui,me,he],X=()=>[Ui,"auto",me,he],te=()=>["auto","min","max","fr",me,he],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...V()],B=()=>[va,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],O=()=>[t,me,he],$=()=>[...A(),Qg,Zg,{position:[me,he]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",aE,nE,{size:[me,he]}],Y=()=>[dd,Lr,bl],P=()=>["","none","full",m,me,he],ee=()=>["",Me,Lr,bl],se=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[Me,dd,Qg,Zg],ce=()=>["","none",S,me,he],fe=()=>["none",Me,me,he],we=()=>["none",Me,me,he],ve=()=>[Me,me,he],ge=()=>[va,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Wn],breakpoint:[Wn],color:[IS],container:[Wn],"drop-shadow":[Wn],ease:["in","out","in-out"],font:[tE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Wn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Wn],shadow:[Wn],spacing:["px",Me],text:[Wn],"text-shadow":[Wn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",va,he,me,E]}],container:["container"],columns:[{columns:[Me,he,me,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:H()}],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:Z()}],"inset-x":[{"inset-x":Z()}],"inset-y":[{"inset-y":Z()}],start:[{start:Z()}],end:[{end:Z()}],top:[{top:Z()}],right:[{right:Z()}],bottom:[{bottom:Z()}],left:[{left:Z()}],visibility:["visible","invisible","collapse"],z:[{z:[Ui,"auto",me,he]}],basis:[{basis:[va,"full","auto",h,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,va,"auto","initial","none",he]}],grow:[{grow:["",Me,me,he]}],shrink:[{shrink:["",Me,me,he]}],order:[{order:[Ui,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[h,"screen",...B()]}],"min-w":[{"min-w":[h,"screen","none",...B()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[u]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",a,Lr,bl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,me,hd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dd,he]}],"font-family":[{font:[lE,he,i]}],"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,me,he]}],"line-clamp":[{"line-clamp":[Me,"none",me,hd]}],leading:[{leading:[c,...V()]}],"list-image":[{"list-image":["none",me,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",me,bl]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[Me,"auto",me,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,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",me,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:$()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ui,me,he],radial:["",me,he],conic:[Ui,me,he]},rE,iE]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Me,me,he]}],"outline-w":[{outline:["",Me,Lr,bl]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",x,Ls,ks]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",y,Ls,ks]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Me,bl]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",v,Ls,ks]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Me,me,he]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"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":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[me,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,he]}],filter:[{filter:["","none",me,he]}],blur:[{blur:ce()}],brightness:[{brightness:[Me,me,he]}],contrast:[{contrast:[Me,me,he]}],"drop-shadow":[{"drop-shadow":["","none",w,Ls,ks]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",Me,me,he]}],"hue-rotate":[{"hue-rotate":[Me,me,he]}],invert:[{invert:["",Me,me,he]}],saturate:[{saturate:[Me,me,he]}],sepia:[{sepia:["",Me,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[Me,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[Me,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,me,he]}],"backdrop-invert":[{"backdrop-invert":["",Me,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[Me,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[Me,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",me,he]}],ease:[{ease:["linear","initial",C,me,he]}],delay:[{delay:[Me,me,he]}],animate:[{animate:["none",j,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,me,he]}],"perspective-origin":[{"perspective-origin":H()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:we()}],"scale-x":[{"scale-x":we()}],"scale-y":[{"scale-y":we()}],"scale-z":[{"scale-z":we()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:H()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ge()}],"translate-x":[{"translate-x":ge()}],"translate-y":[{"translate-y":ge()}],"translate-z":[{"translate-z":ge()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",me,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":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",me,he]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[Me,Lr,bl,hd]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},uE=qS(cE);function Ne(...t){return uE(zx(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 Xx=(...t)=>t.filter((i,a,r)=>!!i&&i.trim()!==""&&r.indexOf(i)===a).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 fE=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 dE=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,a,r)=>r?r.toUpperCase():a.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 Kg=t=>{const i=dE(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 hE={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 mE=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 pE=T.forwardRef(({color:t="currentColor",size:i=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:s="",children:c,iconNode:u,...h},p)=>T.createElement("svg",{ref:p,...hE,width:i,height:i,stroke:t,strokeWidth:r?Number(a)*24/Number(i):a,className:Xx("lucide",s),...!c&&!mE(h)&&{"aria-hidden":"true"},...h},[...u.map(([m,x])=>T.createElement(m,x)),...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 Ee=(t,i)=>{const a=T.forwardRef(({className:r,...s},c)=>T.createElement(pE,{ref:c,iconNode:i,className:Xx(`lucide-${fE(Kg(t))}`,`lucide-${t}`,r),...s}));return a.displayName=Kg(t),a};/**
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 gE=[["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"}]],Gx=Ee("activity",gE);/**
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 yE=[["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"}]],Zx=Ee("archive",yE);/**
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 xE=[["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"}]],Qx=Ee("binary",xE);/**
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 vE=[["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"}]],Kx=Ee("book-open",vE);/**
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 bE=[["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"}]],Px=Ee("brain",bE);/**
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 wE=[["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"}]],Fx=Ee("calendar",wE);/**
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 SE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ii=Ee("check",SE);/**
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 EE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ix=Ee("chevron-down",EE);/**
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 NE=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_E=Ee("chevron-left",NE);/**
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 CE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],TE=Ee("chevron-right",CE);/**
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 AE=[["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"}]],Jx=Ee("circle-alert",AE);/**
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 ME=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],jE=Ee("circle-check",ME);/**
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 zE=[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]],Wx=Ee("coins",zE);/**
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 RE=[["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"}]],ev=Ee("database",RE);/**
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 OE=[["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"}]],DE=Ee("download",OE);/**
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 kE=[["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"}]],LE=Ee("eye-off",kE);/**
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 HE=[["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"}]],ch=Ee("eye",HE);/**
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 BE=[["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"}]],UE=Ee("file-braces",BE);/**
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 VE=[["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"}]],$E=Ee("file-code",VE);/**
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 YE=[["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"}]],tv=Ee("file-text",YE);/**
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 qE=[["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"}]],XE=Ee("file-type",qE);/**
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 GE=[["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"}]],ZE=Ee("file",GE);/**
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 QE=[["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"}]],KE=Ee("folder-check",QE);/**
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 PE=[["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"}]],Ca=Ee("folder-open",PE);/**
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 FE=[["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"}]],uh=Ee("folder",FE);/**
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 IE=[["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"}]],JE=Ee("folder-x",IE);/**
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 WE=[["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"}]],fh=Ee("hard-drive",WE);/**
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 eN=[["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"}]],nv=Ee("image",eN);/**
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 tN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],iv=Ee("info",tN);/**
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 nN=[["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"}]],lv=Ee("lock",nN);/**
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 iN=[["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"}]],lN=Ee("message-square",iN);/**
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 aN=[["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"}]],rN=Ee("monitor",aN);/**
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 oN=[["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"}]],sN=Ee("moon",oN);/**
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 cN=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],uN=Ee("plus",cN);/**
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 fN=[["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"}]],dN=Ee("refresh-cw",fN);/**
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 hN=[["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"}]],mN=Ee("server",hN);/**
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 pN=[["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"}]],Pg=Ee("shield-off",pN);/**
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 gN=[["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"}]],$r=Ee("shield",gN);/**
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 yN=[["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"}]],xN=Ee("sun",yN);/**
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 vN=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],bN=Ee("terminal",vN);/**
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 wN=[["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"}]],av=Ee("trash-2",wN);/**
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 SN=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],EN=Ee("trending-up",SN);/**
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 NN=[["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"}]],rv=Ee("wifi-off",NN);/**
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 _N=[["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"}]],CN=Ee("wifi",_N);/**
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 TN=[["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"}]],kd=Ee("workflow",TN);/**
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 AN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dh=Ee("x",AN);/**
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 MN=[["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"}]],jN=Ee("zap",MN);function zN(t,i){let a;try{a=t()}catch{return}return{getItem:s=>{var c;const u=p=>p===null?null:JSON.parse(p,void 0),h=(c=a.getItem(s))!=null?c:null;return h instanceof Promise?h.then(u):u(h)},setItem:(s,c)=>a.setItem(s,JSON.stringify(c,void 0)),removeItem:s=>a.removeItem(s)}}const Ld=t=>i=>{try{const a=t(i);return a instanceof Promise?a:{then(r){return Ld(r)(a)},catch(r){return this}}}catch(a){return{then(r){return this},catch(r){return Ld(r)(a)}}}},RN=(t,i)=>(a,r,s)=>{let c={storage:zN(()=>localStorage),partialize:E=>E,version:0,merge:(E,C)=>({...C,...E}),...i},u=!1,h=0;const p=new Set,m=new Set;let x=c.storage;if(!x)return t((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),a(...E)},r,s);const y=()=>{const E=c.partialize({...r()});return x.setItem(c.name,{state:E,version:c.version})},v=s.setState;s.setState=(E,C)=>(v(E,C),y());const w=t((...E)=>(a(...E),y()),r,s);s.getInitialState=()=>w;let S;const _=()=>{var E,C;if(!x)return;const j=++h;u=!1,p.forEach(A=>{var H;return A((H=r())!=null?H:w)});const N=((C=c.onRehydrateStorage)==null?void 0:C.call(c,(E=r())!=null?E:w))||void 0;return Ld(x.getItem.bind(x))(c.name).then(A=>{if(A)if(typeof A.version=="number"&&A.version!==c.version){if(c.migrate){const H=c.migrate(A.state,A.version);return H instanceof Promise?H.then(k=>[!0,k]):[!0,H]}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 H;if(j!==h)return;const[k,L]=A;if(S=c.merge(L,(H=r())!=null?H:w),a(S,!0),k)return y()}).then(()=>{j===h&&(N==null||N(S,void 0),S=r(),u=!0,m.forEach(A=>A(S)))}).catch(A=>{j===h&&(N==null||N(void 0,A))})};return s.persist={setOptions:E=>{c={...c,...E},E.storage&&(x=E.storage)},clearStorage:()=>{x==null||x.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>_(),hasHydrated:()=>u,onHydrate:E=>(p.add(E),()=>{p.delete(E)}),onFinishHydration:E=>(m.add(E),()=>{m.delete(E)})},c.skipHydration||_(),S||w},hh=RN,mh=xc()(hh(t=>({theme:"dark",setTheme:i=>t({theme:i})}),{name:"memory-mapper-theme"}));function ph(t){const i=document.documentElement,a=window.matchMedia("(prefers-color-scheme: dark)").matches,r=t==="dark"||t==="system"&&a;i.classList.remove("light","dark"),i.classList.add(r?"dark":"light"),i.style.colorScheme=r?"dark":"light"}function ON(){const{theme:t,setTheme:i}=mh();return T.useEffect(()=>{ph(t)},[t]),{theme:t,setTheme:i}}const Fg=[{value:"dark",icon:sN,label:"Dark mode"},{value:"light",icon:xN,label:"Light mode"},{value:"system",icon:rN,label:"System theme"}];function DN(){const{theme:t,setTheme:i}=ON(),a=Fg.findIndex(r=>r.value===t);return g.jsxs("div",{className:Ne("relative flex items-center gap-1 p-1 rounded-lg","bg-secondary/50 border border-border"),role:"radiogroup","aria-label":"Theme selection",children:[g.jsx("div",{className:"absolute top-1 h-6 w-8 rounded border-[1.5px] border-foreground/70 pointer-events-none",style:{left:`${4+a*36}px`,transition:"left 250ms cubic-bezier(0.4, 0, 0.2, 1)"}}),Fg.map(r=>{const s=r.icon,c=t===r.value;return g.jsx("button",{onClick:()=>i(r.value),role:"radio","aria-checked":c,"aria-label":r.label,className:Ne("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:g.jsx(s,{className:"w-4 h-4"})},r.value)})]})}function kN(){const{status:t,sources:i,refresh:a}=xS(),{success:r,error:s}=SS(),[c,u]=T.useState("idle"),h=async()=>{if(c==="idle"){u("refreshing");try{await a(),await new Promise(m=>setTimeout(m,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)}},p=i.filter(m=>m.connected);return g.jsxs("header",{className:"h-12 flex items-center justify-between px-4 border-b border-border bg-background/80 backdrop-blur-sm",children:[g.jsxs("div",{className:"flex items-center gap-5",children:[g.jsxs("div",{className:"flex items-center gap-2.5",children:[g.jsxs("div",{className:"relative",children:[g.jsx("div",{className:Ne("w-2 h-2 rounded-full",t==="connected"&&"bg-emerald-500",t==="connecting"&&"bg-amber-500",t==="error"&&"bg-red-500")}),t==="connected"&&g.jsx("div",{className:"absolute inset-0 w-2 h-2 rounded-full bg-emerald-500 animate-ping opacity-75"})]}),g.jsxs("span",{className:Ne("text-xs font-medium",t==="connected"?"text-emerald-400":"text-muted-foreground"),children:[t==="connecting"&&"Connecting...",t==="connected"&&"Connected",t==="error"&&"Disconnected"]})]}),t==="connected"&&p.length>0&&g.jsx("div",{className:"w-px h-4 bg-border/50"}),t==="connected"&&p.length>0&&g.jsx("div",{className:"flex items-center gap-3 text-xs",children:p.map(m=>g.jsx(LN,{label:m.path,connected:m.connected,icon:fh},m.id))})]}),g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsxs("button",{onClick:h,disabled:c!=="idle",className:Ne("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"?g.jsx(ii,{className:"w-3.5 h-3.5"}):g.jsx(dN,{className:Ne("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)"}}),g.jsxs("span",{children:[c==="idle"&&"Refresh",c==="refreshing"&&"Syncing...",c==="done"&&"Done"]})]}),g.jsx(DN,{})]})]})}function LN({label:t,connected:i,icon:a}){return g.jsxs("span",{className:Ne("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:[g.jsx(a,{className:Ne("w-3 h-3",i?"text-emerald-600 dark:text-emerald-400":"text-muted-foreground")}),g.jsx("span",{className:"font-mono text-[11px]",children:t})]})}const Ig=[];async function Jg(t){const i=t.filter(a=>a.enabled&&a.detected).map(a=>({id:a.id,path:a.path}));await fetch("/api/config/sources",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sources:i})})}const Xr=xc()(hh((t,i)=>({completed:!1,sources:Ig,completedAt:null,completeOnboarding:()=>{const{sources:a}=i();Jg(a).catch(console.error),t({completed:!0,completedAt:new Date().toISOString()})},resetOnboarding:()=>t({completed:!1,sources:Ig,completedAt:null}),setSources:a=>t({sources:a}),toggleSource:a=>t(r=>({sources:r.sources.map(s=>s.id===a?{...s,enabled:!s.enabled}:s)})),updateSourcePath:(a,r)=>t(s=>({sources:s.sources.map(c=>c.id===a?{...c,path:r,detected:!1}:c)})),syncSourcesToServer:async()=>{const{sources:a}=i();await Jg(a)},addSource:()=>{const a=`custom-${Date.now()}`;return t(r=>({sources:[...r.sources,{id:a,name:"",path:"",enabled:!0,detected:!1}]})),a},removeSource:a=>t(r=>({sources:r.sources.filter(s=>s.id!==a)}))}),{name:"openclaw-memory-mapper-onboarding"})),HN=[{id:"architecture",label:"Architecture",icon:kd,color:"258 90% 66%"},{id:"files",label:"Files",icon:Ca,color:"38 92% 50%"},{id:"security",label:"Security",icon:$r,color:"160 84% 39%"}];function BN({children:t}){const[i,a]=T.useState("architecture"),{completed:r,syncSourcesToServer:s}=Xr();return T.useEffect(()=>{r&&s().catch(console.error)},[r,s]),g.jsxs("div",{className:"h-screen flex flex-col bg-background text-foreground",children:[g.jsx(kN,{}),g.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[g.jsxs("nav",{className:"w-56 flex flex-col border-r",style:{backgroundColor:"hsl(var(--sidebar-bg))",borderColor:"hsl(var(--sidebar-border))"},children:[g.jsxs("div",{className:"px-4 py-5 flex items-center gap-3",children:[g.jsx("div",{className:"p-2 rounded-xl bg-primary/10 ring-1 ring-primary/20",children:g.jsx(Px,{className:"w-4 h-4 text-primary"})}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-sm font-semibold text-foreground tracking-tight",children:"Memory Mapper"}),g.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider font-medium",children:"OpenClaw"})]})]}),g.jsx("div",{className:"mx-4 h-px bg-border/60"}),g.jsx("div",{className:"flex-1 flex flex-col gap-1 p-3 pt-4",children:HN.map(c=>{const u=c.icon,h=i===c.id;return g.jsxs("button",{onClick:()=>a(c.id),className:"group relative flex items-center gap-4 px-4 py-4 rounded-xl text-base cursor-pointer",style:{color:h?`hsl(${c.color})`:"hsl(var(--muted-foreground))",background:h?`linear-gradient(135deg, hsl(${c.color} / 0.15), hsl(${c.color} / 0.05))`:"transparent",boxShadow:h?`inset 0 0 0 1.5px hsl(${c.color} / 0.5), 0 0 20px hsl(${c.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:p=>{h||(p.currentTarget.style.color="hsl(var(--foreground))")},onMouseLeave:p=>{h||(p.currentTarget.style.color="hsl(var(--muted-foreground))")},children:[g.jsx(u,{className:"w-5 h-5",style:{color:"inherit",transition:"color 300ms ease"}}),g.jsx("span",{className:"font-medium",children:c.label})]},c.id)})}),g.jsx("div",{className:"px-4 py-4 border-t",style:{borderColor:"hsl(var(--sidebar-border))"},children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wider font-medium",children:"Version"}),g.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:"1.0.0"})]})})]}),g.jsx("main",{className:"flex-1 overflow-auto bg-background",children:t(i)})]})]})}const gh=xc()(hh((t,i)=>({entries:[],isPaused:!1,maxEntries:500,logActivity:a=>{if(i().isPaused)return;const r={...a,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(a=>({isPaused:!a.isPaused})),setPaused:a=>t({isPaused:a})}),{name:"openclaw-memory-mapper-activity-log",partialize:t=>({entries:t.entries.slice(0,100),isPaused:t.isPaused})}));function UN(t){const i=["Timestamp","Type","Path","Source","Success","Size"],a=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,...a].map(r=>r.join(",")).join(`
325
+ `)}function ov(){const[t,i]=T.useState(null),[a,r]=T.useState(!0),[s,c]=T.useState(null),{logActivity:u,isPaused:h}=gh(),p=T.useCallback(async()=>{if(!h){r(!0);try{const m=await fetch("/api/files");if(!m.ok)throw new Error(`HTTP ${m.status}`);const x=await m.json();i(x),c(null),Object.entries(x).forEach(([y,v])=>{if(v){const w=v.path||`~/${y}`;u({type:"LIST",path:w,source:y,success:!0})}})}catch(m){c(m instanceof Error?m.message:"Failed to load files"),u({type:"LIST",path:"/api/files",source:"api",success:!1})}finally{r(!1)}}},[h,u]);return T.useEffect(()=>{p()},[p]),{data:t,loading:a,error:s,refresh:p}}function VN(){const[t,i]=T.useState(null),[a,r]=T.useState(!1),[s,c]=T.useState(null),{logActivity:u,isPaused:h}=gh(),p=T.useCallback(async(x,y)=>{if(!h){r(!0);try{const v=await fetch(`/api/file?path=${encodeURIComponent(x)}&source=${y}`);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:x,source:y,success:!0,size:w.size})}catch(v){c(v instanceof Error?v.message:"Failed to load file"),i(null),u({type:"READ",path:x,source:y,success:!1})}finally{r(!1)}}},[h,u]),m=T.useCallback(()=>{i(null),c(null)},[]);return{content:t,loading:a,error:s,loadFile:p,clear:m}}function Cl(t){if(t===0)return"0 B";const i=1024,a=["B","KB","MB","GB"],r=Math.floor(Math.log(t)/Math.log(i));return`${parseFloat((t/Math.pow(i,r)).toFixed(1))} ${a[r]}`}function $N({nodes:t,selectedPath:i,onSelect:a}){return g.jsx("div",{className:"py-2",children:t.map(r=>g.jsx(sv,{node:r,selectedPath:i,onSelect:a,depth:0},r.path))})}function sv({node:t,selectedPath:i,onSelect:a,depth:r}){const[s,c]=T.useState(r<2),u=i===t.path,h=()=>{t.type==="directory"?c(!s):a(t.path)};return g.jsxs("div",{children:[g.jsxs("button",{onClick:h,className:Ne("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?g.jsx(Ix,{className:"w-3 h-3 text-muted-foreground"}):g.jsx(TE,{className:"w-3 h-3 text-muted-foreground"}):g.jsx("span",{className:"w-3 h-3"}),t.type==="directory"?g.jsx(uh,{className:"w-4 h-4 text-amber-500/70"}):g.jsx(ZE,{className:"w-4 h-4 text-blue-400/70"}),g.jsx("span",{className:"truncate",children:t.name})]}),t.type==="directory"&&s&&t.children&&g.jsx("div",{children:t.children.map(p=>g.jsx(sv,{node:p,selectedPath:i,onSelect:a,depth:r+1},p.path))})]})}const Xi=T.forwardRef(({className:t,...i},a)=>g.jsx("div",{ref:a,className:Ne("rounded-2xl border border-border bg-card text-card-foreground shadow-lg",t),...i}));Xi.displayName="Card";const YN=T.forwardRef(({className:t,...i},a)=>g.jsx("div",{ref:a,className:Ne("flex flex-col space-y-1.5 p-6",t),...i}));YN.displayName="CardHeader";const qN=T.forwardRef(({className:t,...i},a)=>g.jsx("div",{ref:a,className:Ne("font-semibold leading-none tracking-tight",t),...i}));qN.displayName="CardTitle";const XN=T.forwardRef(({className:t,...i},a)=>g.jsx("div",{ref:a,className:Ne("text-sm text-muted-foreground",t),...i}));XN.displayName="CardDescription";const GN=T.forwardRef(({className:t,...i},a)=>g.jsx("div",{ref:a,className:Ne("p-6 pt-0",t),...i}));GN.displayName="CardContent";const ZN=T.forwardRef(({className:t,...i},a)=>g.jsx("div",{ref:a,className:Ne("flex items-center p-6 pt-0",t),...i}));ZN.displayName="CardFooter";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"]),Hd={".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 QN(t){return t.slice(0,1e3).split("").filter(a=>{const r=a.charCodeAt(0);return r<32&&r!==9&&r!==10&&r!==13}).length>10}function KN({extension:t,className:i}){return cv.has(t)?[".png",".jpg",".jpeg",".gif",".webp",".ico",".bmp",".svg"].includes(t)?g.jsx(nv,{className:i}):g.jsx(Qx,{className:i}):t===".json"?g.jsx(UE,{className:i}):Hd[t]?g.jsx($E,{className:i}):t===".md"||t===".txt"?g.jsx(tv,{className:i}):g.jsx(XE,{className:i})}function PN({content:t,loading:i,error:a}){if(i)return g.jsx("div",{className:"h-full flex items-center justify-center",children:g.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[g.jsx("div",{className:"w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),g.jsx("span",{className:"text-sm",children:"Loading file..."})]})});if(a)return g.jsx("div",{className:"h-full flex items-center justify-center",children:g.jsxs(Xi,{className:"p-6 max-w-sm text-center",children:[g.jsx(Jx,{className:"w-8 h-8 text-red-400 mx-auto mb-3"}),g.jsx("p",{className:"text-sm text-red-400",children:a})]})});if(!t)return g.jsx("div",{className:"h-full flex items-center justify-center",children:g.jsx("p",{className:"text-sm text-muted-foreground/50",children:"Select a file to preview"})});const r=cv.has(t.extension)||QN(t.content);return g.jsxs("div",{className:"h-full flex flex-col bg-card",children:[g.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border/50 bg-secondary/30",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(KN,{extension:t.extension,className:"w-4 h-4 text-muted-foreground"}),g.jsx("span",{className:"font-mono text-sm text-foreground",children:t.name}),g.jsx("span",{className:"text-xs text-muted-foreground/50 uppercase",children:t.extension.slice(1)})]}),g.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground/70",children:[g.jsx("span",{children:Cl(t.size)}),g.jsx("span",{children:new Date(t.modified).toLocaleDateString()})]})]}),g.jsx("div",{className:"flex-1 overflow-auto",children:r?g.jsx(FN,{extension:t.extension,size:t.size}):t.extension===".md"?g.jsx(WN,{content:t.content}):t.extension===".json"?g.jsx(e_,{content:t.content}):Hd[t.extension]?g.jsx(IN,{content:t.content,language:Hd[t.extension]}):g.jsx(uv,{content:t.content})})]})}function FN({extension:t,size:i}){const a=[".png",".jpg",".jpeg",".gif",".webp",".ico",".bmp",".svg"].includes(t);return g.jsx("div",{className:"h-full flex items-center justify-center p-8",children:g.jsxs(Xi,{className:"p-8 text-center max-w-sm",children:[a?g.jsx(nv,{className:"w-12 h-12 text-muted-foreground/30 mx-auto mb-4"}):g.jsx(Qx,{className:"w-12 h-12 text-muted-foreground/30 mx-auto mb-4"}),g.jsx("p",{className:"text-sm font-medium text-foreground mb-1",children:"Binary File"}),g.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:a?"Image file":"This file cannot be displayed as text"}),g.jsxs("div",{className:"flex items-center justify-center gap-3 text-xs text-muted-foreground/50",children:[g.jsx("span",{className:"uppercase",children:t.slice(1)}),g.jsx("span",{children:"•"}),g.jsx("span",{children:Cl(i)})]})]})})}function uv({content:t}){const i=t.split(`
326
+ `);return g.jsx("div",{className:"p-4 font-mono text-xs",children:g.jsx("table",{className:"w-full",children:g.jsx("tbody",{children:i.map((a,r)=>g.jsxs("tr",{className:"hover:bg-white/[0.02]",children:[g.jsx("td",{className:"pr-4 py-0.5 text-right text-muted-foreground/30 select-none w-10",children:r+1}),g.jsx("td",{className:"py-0.5 text-muted-foreground whitespace-pre-wrap break-all",children:a||" "})]},r))})})})}function IN({content:t,language:i}){const a=t.split(`
327
+ `),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>'),JN(i).forEach(h=>{const p=new RegExp(`\\b(${h})\\b`,"g");c=c.replace(p,'<span class="text-violet-400">$1</span>')}),c};return g.jsx("div",{className:"p-4 font-mono text-xs",children:g.jsx("table",{className:"w-full",children:g.jsx("tbody",{children:a.map((s,c)=>g.jsxs("tr",{className:"hover:bg-white/[0.02]",children:[g.jsx("td",{className:"pr-4 py-0.5 text-right text-muted-foreground/30 select-none w-10",children:c+1}),g.jsx("td",{className:"py-0.5 text-zinc-300 whitespace-pre",dangerouslySetInnerHTML:{__html:r(s)||" "}})]},c))})})})}function JN(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 WN({content:t}){const i=t.split(`
328
+ `),a=[];let r=!1,s=[],c="";return i.forEach((u,h)=>{if(u.startsWith("```")){r?(a.push(g.jsxs("div",{className:"my-4 rounded-lg bg-secondary border border-border overflow-hidden",children:[g.jsx("div",{className:"px-4 py-2 bg-secondary/80 text-[10px] text-muted-foreground uppercase tracking-wider",children:c||"code"}),g.jsx("pre",{className:"p-4 text-xs text-foreground/80 overflow-x-auto font-mono",children:s.join(`
329
+ `)})]},`code-${h}`)),s=[],r=!1):(r=!0,c=u.slice(3).trim());return}if(r){s.push(u);return}if(u.startsWith("# ")){a.push(g.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("## ")){a.push(g.jsx("h2",{className:"text-xl font-semibold text-foreground mt-6 mb-3",children:u.slice(3)},h));return}if(u.startsWith("### ")){a.push(g.jsx("h3",{className:"text-lg font-medium text-foreground mt-5 mb-2",children:u.slice(4)},h));return}if(u.startsWith("#### ")){a.push(g.jsx("h4",{className:"text-base font-medium text-muted-foreground mt-4 mb-2",children:u.slice(5)},h));return}if(u.match(/^[-*] /)){a.push(g.jsxs("p",{className:"text-sm text-muted-foreground pl-4 py-0.5 flex",children:[g.jsx("span",{className:"text-violet-400 mr-3",children:"•"}),g.jsx("span",{children:md(u.slice(2))})]},h));return}if(u.match(/^\d+\. /)){const p=u.match(/^(\d+)\. (.*)$/);p&&a.push(g.jsxs("p",{className:"text-sm text-muted-foreground pl-4 py-0.5 flex",children:[g.jsxs("span",{className:"text-violet-400 mr-3 tabular-nums",children:[p[1],"."]}),g.jsx("span",{children:md(p[2])})]},h));return}if(u.startsWith("> ")){a.push(g.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,}$/)){a.push(g.jsx("hr",{className:"my-6 border-border/50"},h));return}if(u.trim()===""){a.push(g.jsx("div",{className:"h-3"},h));return}a.push(g.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed my-1",children:md(u)},h))}),g.jsx("div",{className:"p-6 max-w-3xl",children:a})}function md(t){const i=[];let a=t,r=0;for(;a.length>0;){const s=a.match(/^`([^`]+)`/);if(s){i.push(g.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++)),a=a.slice(s[0].length);continue}const c=a.match(/^\*\*([^*]+)\*\*/);if(c){i.push(g.jsx("strong",{className:"font-semibold text-foreground",children:c[1]},r++)),a=a.slice(c[0].length);continue}const u=a.match(/^\*([^*]+)\*/);if(u){i.push(g.jsx("em",{className:"italic",children:u[1]},r++)),a=a.slice(u[0].length);continue}const h=a.match(/^\[([^\]]+)\]\(([^)]+)\)/);if(h){i.push(g.jsx("a",{href:h[2],className:"text-violet-400 hover:underline",target:"_blank",rel:"noopener noreferrer",children:h[1]},r++)),a=a.slice(h[0].length);continue}i.push(a[0]),a=a.slice(1)}return i}function e_({content:t}){let i;try{i=JSON.parse(t)}catch{return g.jsx(uv,{content:t})}return g.jsx("div",{className:"p-4",children:g.jsx(Bd,{value:i,depth:0})})}function Bd({value:t,depth:i}){const a=i*16;if(t===null)return g.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"null"});if(typeof t=="boolean")return g.jsx("span",{className:"text-violet-400 text-xs font-mono",children:t.toString()});if(typeof t=="number")return g.jsx("span",{className:"text-amber-400 text-xs font-mono",children:t});if(typeof t=="string")return g.jsxs("span",{className:"text-emerald-400 text-xs font-mono",children:['"',t,'"']});if(Array.isArray(t))return t.length===0?g.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"[]"}):g.jsxs("div",{children:[g.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"["}),t.map((r,s)=>g.jsxs("div",{style:{marginLeft:a+16},className:"py-0.5",children:[g.jsx(Bd,{value:r,depth:i+1}),s<t.length-1&&g.jsx("span",{className:"text-zinc-600",children:","})]},s)),g.jsx("div",{style:{marginLeft:a},children:g.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"]"})})]});if(typeof t=="object"){const r=Object.entries(t);return r.length===0?g.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"{}"}):g.jsxs("div",{children:[g.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"{"}),r.map(([s,c],u)=>g.jsxs("div",{style:{marginLeft:a+16},className:"py-0.5",children:[g.jsxs("span",{className:"text-zinc-400 text-xs font-mono",children:['"',s,'"']}),g.jsx("span",{className:"text-zinc-600 text-xs font-mono",children:": "}),g.jsx(Bd,{value:c,depth:i+1}),u<r.length-1&&g.jsx("span",{className:"text-zinc-600",children:","})]},s)),g.jsx("div",{style:{marginLeft:a},children:g.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:"}"})})]})}return g.jsx("span",{className:"text-zinc-500 text-xs font-mono",children:String(t)})}function t_(){var w;const{data:t,loading:i,error:a}=ov(),r=VN(),[s,c]=T.useState(null),[u,h]=T.useState(null),p=T.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]),m=s||((w=p[0])==null?void 0:w.id)||null,x=m&&t?t[m]:null,y=S=>{m&&(h(S),r.loadFile(S,m))},v=S=>{c(S),h(null),r.clear()};return g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.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:g.jsx(Ca,{className:"w-5 h-5 text-amber-400"})}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"File Browser"}),g.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Browse memory files and configurations"})]})]}),g.jsxs("div",{className:"flex items-center gap-4",children:[p.length>0&&g.jsx("div",{className:"flex items-center bg-secondary rounded-lg p-1 border border-border",children:p.map(S=>g.jsx("button",{onClick:()=>v(S.id),className:Ne("px-3 py-1.5 text-xs rounded-md cursor-pointer transition-all font-mono",m===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))}),x&&g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[g.jsx(fh,{className:"w-3.5 h-3.5"}),g.jsxs("span",{className:"tabular-nums",children:[x.fileCount," files"]}),g.jsx("span",{className:"text-muted-foreground/50",children:"·"}),g.jsx("span",{className:"tabular-nums",children:Cl(x.totalSize)})]})]})]}),g.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[g.jsxs("div",{className:"w-72 border-r border-border overflow-auto",children:[i&&!t&&g.jsx("div",{className:"p-4",children:g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})}),a&&g.jsx("div",{className:"p-4",children:g.jsx("p",{className:"text-sm text-destructive",children:a})}),p.length===0&&!i&&g.jsx("div",{className:"p-4",children:g.jsx("p",{className:"text-sm text-muted-foreground",children:"No sources configured. Add paths in the onboarding wizard."})}),x?g.jsx($N,{nodes:x.tree,selectedPath:u,onSelect:y}):!i&&p.length>0&&g.jsx("div",{className:"p-4",children:g.jsx("p",{className:"text-sm text-muted-foreground",children:"Source not found"})})]}),g.jsx("div",{className:"flex-1 overflow-auto",children:g.jsx(PN,{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 a=0,r;a<t.length;a++)(r=st(t[a]))!==""&&(i+=(i&&" ")+r);else for(let a in t)t[a]&&(i+=(i&&" ")+a);return i}var n_={value:()=>{}};function vc(){for(var t=0,i=arguments.length,a={},r;t<i;++t){if(!(r=arguments[t]+"")||r in a||/[\s.]/.test(r))throw new Error("illegal type: "+r);a[r]=[]}return new Ps(a)}function Ps(t){this._=t}function i_(t,i){return t.trim().split(/^|\s+/).map(function(a){var r="",s=a.indexOf(".");if(s>=0&&(r=a.slice(s+1),a=a.slice(0,s)),a&&!i.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:r}})}Ps.prototype=vc.prototype={constructor:Ps,on:function(t,i){var a=this._,r=i_(t+"",a),s,c=-1,u=r.length;if(arguments.length<2){for(;++c<u;)if((s=(t=r[c]).type)&&(s=l_(a[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)a[s]=Wg(a[s],t.name,i);else if(i==null)for(s in a)a[s]=Wg(a[s],t.name,null);return this},copy:function(){var t={},i=this._;for(var a in i)t[a]=i[a].slice();return new Ps(t)},call:function(t,i){if((s=arguments.length-2)>0)for(var a=new Array(s),r=0,s,c;r<s;++r)a[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,a)},apply:function(t,i,a){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,a)}};function l_(t,i){for(var a=0,r=t.length,s;a<r;++a)if((s=t[a]).name===i)return s.value}function Wg(t,i,a){for(var r=0,s=t.length;r<s;++r)if(t[r].name===i){t[r]=n_,t=t.slice(0,r).concat(t.slice(r+1));break}return a!=null&&t.push({name:i,value:a}),t}var Ud="http://www.w3.org/1999/xhtml";const ey={svg:"http://www.w3.org/2000/svg",xhtml:Ud,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function bc(t){var i=t+="",a=i.indexOf(":");return a>=0&&(i=t.slice(0,a))!=="xmlns"&&(t=t.slice(a+1)),ey.hasOwnProperty(i)?{space:ey[i],local:t}:t}function a_(t){return function(){var i=this.ownerDocument,a=this.namespaceURI;return a===Ud&&i.documentElement.namespaceURI===Ud?i.createElement(t):i.createElementNS(a,t)}}function r_(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function fv(t){var i=bc(t);return(i.local?r_:a_)(i)}function o_(){}function yh(t){return t==null?o_:function(){return this.querySelector(t)}}function s_(t){typeof t!="function"&&(t=yh(t));for(var i=this._groups,a=i.length,r=new Array(a),s=0;s<a;++s)for(var c=i[s],u=c.length,h=r[s]=new Array(u),p,m,x=0;x<u;++x)(p=c[x])&&(m=t.call(p,p.__data__,x,c))&&("__data__"in p&&(m.__data__=p.__data__),h[x]=m);return new Qt(r,this._parents)}function c_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function u_(){return[]}function dv(t){return t==null?u_:function(){return this.querySelectorAll(t)}}function f_(t){return function(){return c_(t.apply(this,arguments))}}function d_(t){typeof t=="function"?t=f_(t):t=dv(t);for(var i=this._groups,a=i.length,r=[],s=[],c=0;c<a;++c)for(var u=i[c],h=u.length,p,m=0;m<h;++m)(p=u[m])&&(r.push(t.call(p,p.__data__,m,u)),s.push(p));return new Qt(r,s)}function hv(t){return function(){return this.matches(t)}}function mv(t){return function(i){return i.matches(t)}}var h_=Array.prototype.find;function m_(t){return function(){return h_.call(this.children,t)}}function p_(){return this.firstElementChild}function g_(t){return this.select(t==null?p_:m_(typeof t=="function"?t:mv(t)))}var y_=Array.prototype.filter;function x_(){return Array.from(this.children)}function v_(t){return function(){return y_.call(this.children,t)}}function b_(t){return this.selectAll(t==null?x_:v_(typeof t=="function"?t:mv(t)))}function w_(t){typeof t!="function"&&(t=hv(t));for(var i=this._groups,a=i.length,r=new Array(a),s=0;s<a;++s)for(var c=i[s],u=c.length,h=r[s]=[],p,m=0;m<u;++m)(p=c[m])&&t.call(p,p.__data__,m,c)&&h.push(p);return new Qt(r,this._parents)}function pv(t){return new Array(t.length)}function S_(){return new Qt(this._enter||this._groups.map(pv),this._parents)}function nc(t,i){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=i}nc.prototype={constructor:nc,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 E_(t){return function(){return t}}function N_(t,i,a,r,s,c){for(var u=0,h,p=i.length,m=c.length;u<m;++u)(h=i[u])?(h.__data__=c[u],r[u]=h):a[u]=new nc(t,c[u]);for(;u<p;++u)(h=i[u])&&(s[u]=h)}function __(t,i,a,r,s,c,u){var h,p,m=new Map,x=i.length,y=c.length,v=new Array(x),w;for(h=0;h<x;++h)(p=i[h])&&(v[h]=w=u.call(p,p.__data__,h,i)+"",m.has(w)?s[h]=p:m.set(w,p));for(h=0;h<y;++h)w=u.call(t,c[h],h,c)+"",(p=m.get(w))?(r[h]=p,p.__data__=c[h],m.delete(w)):a[h]=new nc(t,c[h]);for(h=0;h<x;++h)(p=i[h])&&m.get(v[h])===p&&(s[h]=p)}function C_(t){return t.__data__}function T_(t,i){if(!arguments.length)return Array.from(this,C_);var a=i?__:N_,r=this._parents,s=this._groups;typeof t!="function"&&(t=E_(t));for(var c=s.length,u=new Array(c),h=new Array(c),p=new Array(c),m=0;m<c;++m){var x=r[m],y=s[m],v=y.length,w=A_(t.call(x,x&&x.__data__,m,r)),S=w.length,_=h[m]=new Array(S),E=u[m]=new Array(S),C=p[m]=new Array(v);a(x,y,_,E,C,w,i);for(var j=0,N=0,A,H;j<S;++j)if(A=_[j]){for(j>=N&&(N=j+1);!(H=E[N])&&++N<S;);A._next=H||null}}return u=new Qt(u,r),u._enter=h,u._exit=p,u}function A_(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function M_(){return new Qt(this._exit||this._groups.map(pv),this._parents)}function j_(t,i,a){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())),a==null?c.remove():a(c),r&&s?r.merge(s).order():s}function z_(t){for(var i=t.selection?t.selection():t,a=this._groups,r=i._groups,s=a.length,c=r.length,u=Math.min(s,c),h=new Array(s),p=0;p<u;++p)for(var m=a[p],x=r[p],y=m.length,v=h[p]=new Array(y),w,S=0;S<y;++S)(w=m[S]||x[S])&&(v[S]=w);for(;p<s;++p)h[p]=a[p];return new Qt(h,this._parents)}function R_(){for(var t=this._groups,i=-1,a=t.length;++i<a;)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 O_(t){t||(t=D_);function i(y,v){return y&&v?t(y.__data__,v.__data__):!y-!v}for(var a=this._groups,r=a.length,s=new Array(r),c=0;c<r;++c){for(var u=a[c],h=u.length,p=s[c]=new Array(h),m,x=0;x<h;++x)(m=u[x])&&(p[x]=m);p.sort(i)}return new Qt(s,this._parents).order()}function D_(t,i){return t<i?-1:t>i?1:t>=i?0:NaN}function k_(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function L_(){return Array.from(this)}function H_(){for(var t=this._groups,i=0,a=t.length;i<a;++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 B_(){let t=0;for(const i of this)++t;return t}function U_(){return!this.node()}function V_(t){for(var i=this._groups,a=0,r=i.length;a<r;++a)for(var s=i[a],c=0,u=s.length,h;c<u;++c)(h=s[c])&&t.call(h,h.__data__,c,s);return this}function $_(t){return function(){this.removeAttribute(t)}}function Y_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function q_(t,i){return function(){this.setAttribute(t,i)}}function X_(t,i){return function(){this.setAttributeNS(t.space,t.local,i)}}function G_(t,i){return function(){var a=i.apply(this,arguments);a==null?this.removeAttribute(t):this.setAttribute(t,a)}}function Z_(t,i){return function(){var a=i.apply(this,arguments);a==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,a)}}function Q_(t,i){var a=bc(t);if(arguments.length<2){var r=this.node();return a.local?r.getAttributeNS(a.space,a.local):r.getAttribute(a)}return this.each((i==null?a.local?Y_:$_:typeof i=="function"?a.local?Z_:G_:a.local?X_:q_)(a,i))}function gv(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function K_(t){return function(){this.style.removeProperty(t)}}function P_(t,i,a){return function(){this.style.setProperty(t,i,a)}}function F_(t,i,a){return function(){var r=i.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,a)}}function I_(t,i,a){return arguments.length>1?this.each((i==null?K_:typeof i=="function"?F_:P_)(t,i,a??"")):Ta(this.node(),t)}function Ta(t,i){return t.style.getPropertyValue(i)||gv(t).getComputedStyle(t,null).getPropertyValue(i)}function J_(t){return function(){delete this[t]}}function W_(t,i){return function(){this[t]=i}}function e5(t,i){return function(){var a=i.apply(this,arguments);a==null?delete this[t]:this[t]=a}}function t5(t,i){return arguments.length>1?this.each((i==null?J_:typeof i=="function"?e5:W_)(t,i)):this.node()[t]}function yv(t){return t.trim().split(/^|\s+/)}function xh(t){return t.classList||new xv(t)}function xv(t){this._node=t,this._names=yv(t.getAttribute("class")||"")}xv.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 vv(t,i){for(var a=xh(t),r=-1,s=i.length;++r<s;)a.add(i[r])}function bv(t,i){for(var a=xh(t),r=-1,s=i.length;++r<s;)a.remove(i[r])}function n5(t){return function(){vv(this,t)}}function i5(t){return function(){bv(this,t)}}function l5(t,i){return function(){(i.apply(this,arguments)?vv:bv)(this,t)}}function a5(t,i){var a=yv(t+"");if(arguments.length<2){for(var r=xh(this.node()),s=-1,c=a.length;++s<c;)if(!r.contains(a[s]))return!1;return!0}return this.each((typeof i=="function"?l5:i?n5:i5)(a,i))}function r5(){this.textContent=""}function o5(t){return function(){this.textContent=t}}function s5(t){return function(){var i=t.apply(this,arguments);this.textContent=i??""}}function c5(t){return arguments.length?this.each(t==null?r5:(typeof t=="function"?s5:o5)(t)):this.node().textContent}function u5(){this.innerHTML=""}function f5(t){return function(){this.innerHTML=t}}function d5(t){return function(){var i=t.apply(this,arguments);this.innerHTML=i??""}}function h5(t){return arguments.length?this.each(t==null?u5:(typeof t=="function"?d5:f5)(t)):this.node().innerHTML}function m5(){this.nextSibling&&this.parentNode.appendChild(this)}function p5(){return this.each(m5)}function g5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function y5(){return this.each(g5)}function x5(t){var i=typeof t=="function"?t:fv(t);return this.select(function(){return this.appendChild(i.apply(this,arguments))})}function v5(){return null}function b5(t,i){var a=typeof t=="function"?t:fv(t),r=i==null?v5:typeof i=="function"?i:yh(i);return this.select(function(){return this.insertBefore(a.apply(this,arguments),r.apply(this,arguments)||null)})}function w5(){var t=this.parentNode;t&&t.removeChild(this)}function S5(){return this.each(w5)}function E5(){var t=this.cloneNode(!1),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function N5(){var t=this.cloneNode(!0),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function _5(t){return this.select(t?N5:E5)}function C5(t){return arguments.length?this.property("__data__",t):this.node().__data__}function T5(t){return function(i){t.call(this,i,this.__data__)}}function A5(t){return t.trim().split(/^|\s+/).map(function(i){var a="",r=i.indexOf(".");return r>=0&&(a=i.slice(r+1),i=i.slice(0,r)),{type:i,name:a}})}function M5(t){return function(){var i=this.__on;if(i){for(var a=0,r=-1,s=i.length,c;a<s;++a)c=i[a],(!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 j5(t,i,a){return function(){var r=this.__on,s,c=T5(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=a),s.value=i;return}}this.addEventListener(t.type,c,a),s={type:t.type,name:t.name,value:i,listener:c,options:a},r?r.push(s):this.__on=[s]}}function z5(t,i,a){var r=A5(t+""),s,c=r.length,u;if(arguments.length<2){var h=this.node().__on;if(h){for(var p=0,m=h.length,x;p<m;++p)for(s=0,x=h[p];s<c;++s)if((u=r[s]).type===x.type&&u.name===x.name)return x.value}return}for(h=i?j5:M5,s=0;s<c;++s)this.each(h(r[s],i,a));return this}function wv(t,i,a){var r=gv(t),s=r.CustomEvent;typeof s=="function"?s=new s(i,a):(s=r.document.createEvent("Event"),a?(s.initEvent(i,a.bubbles,a.cancelable),s.detail=a.detail):s.initEvent(i,!1,!1)),t.dispatchEvent(s)}function R5(t,i){return function(){return wv(this,t,i)}}function O5(t,i){return function(){return wv(this,t,i.apply(this,arguments))}}function D5(t,i){return this.each((typeof i=="function"?O5:R5)(t,i))}function*k5(){for(var t=this._groups,i=0,a=t.length;i<a;++i)for(var r=t[i],s=0,c=r.length,u;s<c;++s)(u=r[s])&&(yield u)}var Sv=[null];function Qt(t,i){this._groups=t,this._parents=i}function no(){return new Qt([[document.documentElement]],Sv)}function L5(){return this}Qt.prototype=no.prototype={constructor:Qt,select:s_,selectAll:d_,selectChild:g_,selectChildren:b_,filter:w_,data:T_,enter:S_,exit:M_,join:j_,merge:z_,selection:L5,order:R_,sort:O_,call:k_,nodes:L_,node:H_,size:B_,empty:U_,each:V_,attr:Q_,style:I_,property:t5,classed:a5,text:c5,html:h5,raise:p5,lower:y5,append:x5,insert:b5,remove:S5,clone:_5,datum:C5,on:z5,dispatch:D5,[Symbol.iterator]:k5};function Gt(t){return typeof t=="string"?new Qt([[document.querySelector(t)]],[document.documentElement]):new Qt([[t]],Sv)}function H5(t){let i;for(;i=t.sourceEvent;)t=i;return t}function sn(t,i){if(t=H5(t),i===void 0&&(i=t.currentTarget),i){var a=i.ownerSVGElement||i;if(a.createSVGPoint){var r=a.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 B5={passive:!1},Gr={capture:!0,passive:!1};function pd(t){t.stopImmediatePropagation()}function Ea(t){t.preventDefault(),t.stopImmediatePropagation()}function Ev(t){var i=t.document.documentElement,a=Gt(t).on("dragstart.drag",Ea,Gr);"onselectstart"in i?a.on("selectstart.drag",Ea,Gr):(i.__noselect=i.style.MozUserSelect,i.style.MozUserSelect="none")}function Nv(t,i){var a=t.document.documentElement,r=Gt(t).on("dragstart.drag",null);i&&(r.on("click.drag",Ea,Gr),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in a?r.on("selectstart.drag",null):(a.style.MozUserSelect=a.__noselect,delete a.__noselect)}const Hs=t=>()=>t;function Vd(t,{sourceEvent:i,subject:a,target:r,identifier:s,active:c,x:u,y:h,dx:p,dy:m,dispatch:x}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},subject:{value:a,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:p,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:x}})}Vd.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function U5(t){return!t.ctrlKey&&!t.button}function V5(){return this.parentNode}function $5(t,i){return i??{x:t.x,y:t.y}}function Y5(){return navigator.maxTouchPoints||"ontouchstart"in this}function _v(){var t=U5,i=V5,a=$5,r=Y5,s={},c=vc("start","drag","end"),u=0,h,p,m,x,y=0;function v(A){A.on("mousedown.drag",w).filter(r).on("touchstart.drag",E).on("touchmove.drag",C,B5).on("touchend.drag touchcancel.drag",j).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(A,H){if(!(x||!t.call(this,A,H))){var k=N(this,i.call(this,A,H),A,H,"mouse");k&&(Gt(A.view).on("mousemove.drag",S,Gr).on("mouseup.drag",_,Gr),Ev(A.view),pd(A),m=!1,h=A.clientX,p=A.clientY,k("start",A))}}function S(A){if(Ea(A),!m){var H=A.clientX-h,k=A.clientY-p;m=H*H+k*k>y}s.mouse("drag",A)}function _(A){Gt(A.view).on("mousemove.drag mouseup.drag",null),Nv(A.view,m),Ea(A),s.mouse("end",A)}function E(A,H){if(t.call(this,A,H)){var k=A.changedTouches,L=i.call(this,A,H),V=k.length,Z,le;for(Z=0;Z<V;++Z)(le=N(this,L,A,H,k[Z].identifier,k[Z]))&&(pd(A),le("start",A,k[Z]))}}function C(A){var H=A.changedTouches,k=H.length,L,V;for(L=0;L<k;++L)(V=s[H[L].identifier])&&(Ea(A),V("drag",A,H[L]))}function j(A){var H=A.changedTouches,k=H.length,L,V;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),L=0;L<k;++L)(V=s[H[L].identifier])&&(pd(A),V("end",A,H[L]))}function N(A,H,k,L,V,Z){var le=c.copy(),Q=sn(Z||k,H),X,te,D;if((D=a.call(A,new Vd("beforestart",{sourceEvent:k,target:v,identifier:V,active:u,x:Q[0],y:Q[1],dx:0,dy:0,dispatch:le}),L))!=null)return X=D.x-Q[0]||0,te=D.y-Q[1]||0,function G(z,B,O){var $=Q,J;switch(z){case"start":s[V]=G,J=u++;break;case"end":delete s[V],--u;case"drag":Q=sn(O||B,H),J=u;break}le.call(z,A,new Vd(z,{sourceEvent:B,subject:D,target:v,identifier:V,active:J,x:Q[0]+X,y:Q[1]+te,dx:Q[0]-$[0],dy:Q[1]-$[1],dispatch:le}),L)}}return v.filter=function(A){return arguments.length?(t=typeof A=="function"?A:Hs(!!A),v):t},v.container=function(A){return arguments.length?(i=typeof A=="function"?A:Hs(A),v):i},v.subject=function(A){return arguments.length?(a=typeof A=="function"?A:Hs(A),v):a},v.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Hs(!!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?(y=(A=+A)*A,v):Math.sqrt(y)},v}function vh(t,i,a){t.prototype=i.prototype=a,a.constructor=t}function Cv(t,i){var a=Object.create(t.prototype);for(var r in i)a[r]=i[r];return a}function io(){}var Zr=.7,ic=1/Zr,Na="\\s*([+-]?\\d+)\\s*",Qr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Nn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",q5=/^#([0-9a-f]{3,8})$/,X5=new RegExp(`^rgb\\(${Na},${Na},${Na}\\)$`),G5=new RegExp(`^rgb\\(${Nn},${Nn},${Nn}\\)$`),Z5=new RegExp(`^rgba\\(${Na},${Na},${Na},${Qr}\\)$`),Q5=new RegExp(`^rgba\\(${Nn},${Nn},${Nn},${Qr}\\)$`),K5=new RegExp(`^hsl\\(${Qr},${Nn},${Nn}\\)$`),P5=new RegExp(`^hsla\\(${Qr},${Nn},${Nn},${Qr}\\)$`),ty={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};vh(io,Tl,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ny,formatHex:ny,formatHex8:F5,formatHsl:I5,formatRgb:iy,toString:iy});function ny(){return this.rgb().formatHex()}function F5(){return this.rgb().formatHex8()}function I5(){return Tv(this).formatHsl()}function iy(){return this.rgb().formatRgb()}function Tl(t){var i,a;return t=(t+"").trim().toLowerCase(),(i=q5.exec(t))?(a=i[1].length,i=parseInt(i[1],16),a===6?ly(i):a===3?new Ot(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):a===8?Bs(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):a===4?Bs(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=X5.exec(t))?new Ot(i[1],i[2],i[3],1):(i=G5.exec(t))?new Ot(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=Z5.exec(t))?Bs(i[1],i[2],i[3],i[4]):(i=Q5.exec(t))?Bs(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=K5.exec(t))?oy(i[1],i[2]/100,i[3]/100,1):(i=P5.exec(t))?oy(i[1],i[2]/100,i[3]/100,i[4]):ty.hasOwnProperty(t)?ly(ty[t]):t==="transparent"?new Ot(NaN,NaN,NaN,0):null}function ly(t){return new Ot(t>>16&255,t>>8&255,t&255,1)}function Bs(t,i,a,r){return r<=0&&(t=i=a=NaN),new Ot(t,i,a,r)}function J5(t){return t instanceof io||(t=Tl(t)),t?(t=t.rgb(),new Ot(t.r,t.g,t.b,t.opacity)):new Ot}function $d(t,i,a,r){return arguments.length===1?J5(t):new Ot(t,i,a,r??1)}function Ot(t,i,a,r){this.r=+t,this.g=+i,this.b=+a,this.opacity=+r}vh(Ot,$d,Cv(io,{brighter(t){return t=t==null?ic:Math.pow(ic,t),new Ot(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Zr:Math.pow(Zr,t),new Ot(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ot(Nl(this.r),Nl(this.g),Nl(this.b),lc(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:ay,formatHex:ay,formatHex8:W5,formatRgb:ry,toString:ry}));function ay(){return`#${El(this.r)}${El(this.g)}${El(this.b)}`}function W5(){return`#${El(this.r)}${El(this.g)}${El(this.b)}${El((isNaN(this.opacity)?1:this.opacity)*255)}`}function ry(){const t=lc(this.opacity);return`${t===1?"rgb(":"rgba("}${Nl(this.r)}, ${Nl(this.g)}, ${Nl(this.b)}${t===1?")":`, ${t})`}`}function lc(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Nl(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function El(t){return t=Nl(t),(t<16?"0":"")+t.toString(16)}function oy(t,i,a,r){return r<=0?t=i=a=NaN:a<=0||a>=1?t=i=NaN:i<=0&&(t=NaN),new cn(t,i,a,r)}function Tv(t){if(t instanceof cn)return new cn(t.h,t.s,t.l,t.opacity);if(t instanceof io||(t=Tl(t)),!t)return new cn;if(t instanceof cn)return t;t=t.rgb();var i=t.r/255,a=t.g/255,r=t.b/255,s=Math.min(i,a,r),c=Math.max(i,a,r),u=NaN,h=c-s,p=(c+s)/2;return h?(i===c?u=(a-r)/h+(a<r)*6:a===c?u=(r-i)/h+2:u=(i-a)/h+4,h/=p<.5?c+s:2-c-s,u*=60):h=p>0&&p<1?0:u,new cn(u,h,p,t.opacity)}function e4(t,i,a,r){return arguments.length===1?Tv(t):new cn(t,i,a,r??1)}function cn(t,i,a,r){this.h=+t,this.s=+i,this.l=+a,this.opacity=+r}vh(cn,e4,Cv(io,{brighter(t){return t=t==null?ic:Math.pow(ic,t),new cn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Zr:Math.pow(Zr,t),new cn(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,a=this.l,r=a+(a<.5?a:1-a)*i,s=2*a-r;return new Ot(gd(t>=240?t-240:t+120,s,r),gd(t,s,r),gd(t<120?t+240:t-120,s,r),this.opacity)},clamp(){return new cn(sy(this.h),Us(this.s),Us(this.l),lc(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=lc(this.opacity);return`${t===1?"hsl(":"hsla("}${sy(this.h)}, ${Us(this.s)*100}%, ${Us(this.l)*100}%${t===1?")":`, ${t})`}`}}));function sy(t){return t=(t||0)%360,t<0?t+360:t}function Us(t){return Math.max(0,Math.min(1,t||0))}function gd(t,i,a){return(t<60?i+(a-i)*t/60:t<180?a:t<240?i+(a-i)*(240-t)/60:i)*255}const bh=t=>()=>t;function t4(t,i){return function(a){return t+a*i}}function n4(t,i,a){return t=Math.pow(t,a),i=Math.pow(i,a)-t,a=1/a,function(r){return Math.pow(t+r*i,a)}}function i4(t){return(t=+t)==1?Av:function(i,a){return a-i?n4(i,a,t):bh(isNaN(i)?a:i)}}function Av(t,i){var a=i-t;return a?t4(t,a):bh(isNaN(t)?i:t)}const ac=(function t(i){var a=i4(i);function r(s,c){var u=a((s=$d(s)).r,(c=$d(c)).r),h=a(s.g,c.g),p=a(s.b,c.b),m=Av(s.opacity,c.opacity);return function(x){return s.r=u(x),s.g=h(x),s.b=p(x),s.opacity=m(x),s+""}}return r.gamma=t,r})(1);function l4(t,i){i||(i=[]);var a=t?Math.min(i.length,t.length):0,r=i.slice(),s;return function(c){for(s=0;s<a;++s)r[s]=t[s]*(1-c)+i[s]*c;return r}}function a4(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function r4(t,i){var a=i?i.length:0,r=t?Math.min(a,t.length):0,s=new Array(r),c=new Array(a),u;for(u=0;u<r;++u)s[u]=Yr(t[u],i[u]);for(;u<a;++u)c[u]=i[u];return function(h){for(u=0;u<r;++u)c[u]=s[u](h);return c}}function o4(t,i){var a=new Date;return t=+t,i=+i,function(r){return a.setTime(t*(1-r)+i*r),a}}function Sn(t,i){return t=+t,i=+i,function(a){return t*(1-a)+i*a}}function s4(t,i){var a={},r={},s;(t===null||typeof t!="object")&&(t={}),(i===null||typeof i!="object")&&(i={});for(s in i)s in t?a[s]=Yr(t[s],i[s]):r[s]=i[s];return function(c){for(s in a)r[s]=a[s](c);return r}}var Yd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yd=new RegExp(Yd.source,"g");function c4(t){return function(){return t}}function u4(t){return function(i){return t(i)+""}}function Mv(t,i){var a=Yd.lastIndex=yd.lastIndex=0,r,s,c,u=-1,h=[],p=[];for(t=t+"",i=i+"";(r=Yd.exec(t))&&(s=yd.exec(i));)(c=s.index)>a&&(c=i.slice(a,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,p.push({i:u,x:Sn(r,s)})),a=yd.lastIndex;return a<i.length&&(c=i.slice(a),h[u]?h[u]+=c:h[++u]=c),h.length<2?p[0]?u4(p[0].x):c4(i):(i=p.length,function(m){for(var x=0,y;x<i;++x)h[(y=p[x]).i]=y.x(m);return h.join("")})}function Yr(t,i){var a=typeof i,r;return i==null||a==="boolean"?bh(i):(a==="number"?Sn:a==="string"?(r=Tl(i))?(i=r,ac):Mv:i instanceof Tl?ac:i instanceof Date?o4:a4(i)?l4:Array.isArray(i)?r4:typeof i.valueOf!="function"&&typeof i.toString!="function"||isNaN(i)?s4:Sn)(t,i)}var cy=180/Math.PI,qd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jv(t,i,a,r,s,c){var u,h,p;return(u=Math.sqrt(t*t+i*i))&&(t/=u,i/=u),(p=t*a+i*r)&&(a-=t*p,r-=i*p),(h=Math.sqrt(a*a+r*r))&&(a/=h,r/=h,p/=h),t*r<i*a&&(t=-t,i=-i,p=-p,u=-u),{translateX:s,translateY:c,rotate:Math.atan2(i,t)*cy,skewX:Math.atan(p)*cy,scaleX:u,scaleY:h}}var Vs;function f4(t){const i=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return i.isIdentity?qd:jv(i.a,i.b,i.c,i.d,i.e,i.f)}function d4(t){return t==null||(Vs||(Vs=document.createElementNS("http://www.w3.org/2000/svg","g")),Vs.setAttribute("transform",t),!(t=Vs.transform.baseVal.consolidate()))?qd:(t=t.matrix,jv(t.a,t.b,t.c,t.d,t.e,t.f))}function zv(t,i,a,r){function s(m){return m.length?m.pop()+" ":""}function c(m,x,y,v,w,S){if(m!==y||x!==v){var _=w.push("translate(",null,i,null,a);S.push({i:_-4,x:Sn(m,y)},{i:_-2,x:Sn(x,v)})}else(y||v)&&w.push("translate("+y+i+v+a)}function u(m,x,y,v){m!==x?(m-x>180?x+=360:x-m>180&&(m+=360),v.push({i:y.push(s(y)+"rotate(",null,r)-2,x:Sn(m,x)})):x&&y.push(s(y)+"rotate("+x+r)}function h(m,x,y,v){m!==x?v.push({i:y.push(s(y)+"skewX(",null,r)-2,x:Sn(m,x)}):x&&y.push(s(y)+"skewX("+x+r)}function p(m,x,y,v,w,S){if(m!==y||x!==v){var _=w.push(s(w)+"scale(",null,",",null,")");S.push({i:_-4,x:Sn(m,y)},{i:_-2,x:Sn(x,v)})}else(y!==1||v!==1)&&w.push(s(w)+"scale("+y+","+v+")")}return function(m,x){var y=[],v=[];return m=t(m),x=t(x),c(m.translateX,m.translateY,x.translateX,x.translateY,y,v),u(m.rotate,x.rotate,y,v),h(m.skewX,x.skewX,y,v),p(m.scaleX,m.scaleY,x.scaleX,x.scaleY,y,v),m=x=null,function(w){for(var S=-1,_=v.length,E;++S<_;)y[(E=v[S]).i]=E.x(w);return y.join("")}}}var h4=zv(f4,"px, ","px)","deg)"),m4=zv(d4,", ",")",")"),p4=1e-12;function uy(t){return((t=Math.exp(t))+1/t)/2}function g4(t){return((t=Math.exp(t))-1/t)/2}function y4(t){return((t=Math.exp(2*t))-1)/(t+1)}const Fs=(function t(i,a,r){function s(c,u){var h=c[0],p=c[1],m=c[2],x=u[0],y=u[1],v=u[2],w=x-h,S=y-p,_=w*w+S*S,E,C;if(_<p4)C=Math.log(v/m)/i,E=function(L){return[h+L*w,p+L*S,m*Math.exp(i*L*C)]};else{var j=Math.sqrt(_),N=(v*v-m*m+r*_)/(2*m*a*j),A=(v*v-m*m-r*_)/(2*v*a*j),H=Math.log(Math.sqrt(N*N+1)-N),k=Math.log(Math.sqrt(A*A+1)-A);C=(k-H)/i,E=function(L){var V=L*C,Z=uy(H),le=m/(a*j)*(Z*y4(i*V+H)-g4(H));return[h+le*w,p+le*S,m*Z/uy(i*V+H)]}}return E.duration=C*1e3*i/Math.SQRT2,E}return s.rho=function(c){var u=Math.max(.001,+c),h=u*u,p=h*h;return t(u,h,p)},s})(Math.SQRT2,2,4);var Aa=0,Ur=0,Hr=0,Rv=1e3,rc,Vr,oc=0,Al=0,wc=0,Kr=typeof performance=="object"&&performance.now?performance:Date,Ov=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function wh(){return Al||(Ov(x4),Al=Kr.now()+wc)}function x4(){Al=0}function sc(){this._call=this._time=this._next=null}sc.prototype=Dv.prototype={constructor:sc,restart:function(t,i,a){if(typeof t!="function")throw new TypeError("callback is not a function");a=(a==null?wh():+a)+(i==null?0:+i),!this._next&&Vr!==this&&(Vr?Vr._next=this:rc=this,Vr=this),this._call=t,this._time=a,Xd()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xd())}};function Dv(t,i,a){var r=new sc;return r.restart(t,i,a),r}function v4(){wh(),++Aa;for(var t=rc,i;t;)(i=Al-t._time)>=0&&t._call.call(void 0,i),t=t._next;--Aa}function fy(){Al=(oc=Kr.now())+wc,Aa=Ur=0;try{v4()}finally{Aa=0,w4(),Al=0}}function b4(){var t=Kr.now(),i=t-oc;i>Rv&&(wc-=i,oc=t)}function w4(){for(var t,i=rc,a,r=1/0;i;)i._call?(r>i._time&&(r=i._time),t=i,i=i._next):(a=i._next,i._next=null,i=t?t._next=a:rc=a);Vr=t,Xd(r)}function Xd(t){if(!Aa){Ur&&(Ur=clearTimeout(Ur));var i=t-Al;i>24?(t<1/0&&(Ur=setTimeout(fy,t-Kr.now()-wc)),Hr&&(Hr=clearInterval(Hr))):(Hr||(oc=Kr.now(),Hr=setInterval(b4,Rv)),Aa=1,Ov(fy))}}function dy(t,i,a){var r=new sc;return i=i==null?0:+i,r.restart(s=>{r.stop(),t(s+i)},i,a),r}var S4=vc("start","end","cancel","interrupt"),E4=[],kv=0,hy=1,Gd=2,Is=3,my=4,Zd=5,Js=6;function Sc(t,i,a,r,s,c){var u=t.__transition;if(!u)t.__transition={};else if(a in u)return;N4(t,a,{name:i,index:r,group:s,on:S4,tween:E4,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:kv})}function Sh(t,i){var a=pn(t,i);if(a.state>kv)throw new Error("too late; already scheduled");return a}function An(t,i){var a=pn(t,i);if(a.state>Is)throw new Error("too late; already running");return a}function pn(t,i){var a=t.__transition;if(!a||!(a=a[i]))throw new Error("transition not found");return a}function N4(t,i,a){var r=t.__transition,s;r[i]=a,a.timer=Dv(c,0,a.time);function c(m){a.state=hy,a.timer.restart(u,a.delay,a.time),a.delay<=m&&u(m-a.delay)}function u(m){var x,y,v,w;if(a.state!==hy)return p();for(x in r)if(w=r[x],w.name===a.name){if(w.state===Is)return dy(u);w.state===my?(w.state=Js,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete r[x]):+x<i&&(w.state=Js,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete r[x])}if(dy(function(){a.state===Is&&(a.state=my,a.timer.restart(h,a.delay,a.time),h(m))}),a.state=Gd,a.on.call("start",t,t.__data__,a.index,a.group),a.state===Gd){for(a.state=Is,s=new Array(v=a.tween.length),x=0,y=-1;x<v;++x)(w=a.tween[x].value.call(t,t.__data__,a.index,a.group))&&(s[++y]=w);s.length=y+1}}function h(m){for(var x=m<a.duration?a.ease.call(null,m/a.duration):(a.timer.restart(p),a.state=Zd,1),y=-1,v=s.length;++y<v;)s[y].call(t,x);a.state===Zd&&(a.on.call("end",t,t.__data__,a.index,a.group),p())}function p(){a.state=Js,a.timer.stop(),delete r[i];for(var m in r)return;delete t.__transition}}function Ws(t,i){var a=t.__transition,r,s,c=!0,u;if(a){i=i==null?null:i+"";for(u in a){if((r=a[u]).name!==i){c=!1;continue}s=r.state>Gd&&r.state<Zd,r.state=Js,r.timer.stop(),r.on.call(s?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[u]}c&&delete t.__transition}}function _4(t){return this.each(function(){Ws(this,t)})}function C4(t,i){var a,r;return function(){var s=An(this,t),c=s.tween;if(c!==a){r=a=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 T4(t,i,a){var r,s;if(typeof a!="function")throw new Error;return function(){var c=An(this,t),u=c.tween;if(u!==r){s=(r=u).slice();for(var h={name:i,value:a},p=0,m=s.length;p<m;++p)if(s[p].name===i){s[p]=h;break}p===m&&s.push(h)}c.tween=s}}function A4(t,i){var a=this._id;if(t+="",arguments.length<2){for(var r=pn(this.node(),a).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?C4:T4)(a,t,i))}function Eh(t,i,a){var r=t._id;return t.each(function(){var s=An(this,r);(s.value||(s.value={}))[i]=a.apply(this,arguments)}),function(s){return pn(s,r).value[i]}}function Lv(t,i){var a;return(typeof i=="number"?Sn:i instanceof Tl?ac:(a=Tl(i))?(i=a,ac):Mv)(t,i)}function M4(t){return function(){this.removeAttribute(t)}}function j4(t){return function(){this.removeAttributeNS(t.space,t.local)}}function z4(t,i,a){var r,s=a+"",c;return function(){var u=this.getAttribute(t);return u===s?null:u===r?c:c=i(r=u,a)}}function R4(t,i,a){var r,s=a+"",c;return function(){var u=this.getAttributeNS(t.space,t.local);return u===s?null:u===r?c:c=i(r=u,a)}}function O4(t,i,a){var r,s,c;return function(){var u,h=a(this),p;return h==null?void this.removeAttribute(t):(u=this.getAttribute(t),p=h+"",u===p?null:u===r&&p===s?c:(s=p,c=i(r=u,h)))}}function D4(t,i,a){var r,s,c;return function(){var u,h=a(this),p;return h==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),p=h+"",u===p?null:u===r&&p===s?c:(s=p,c=i(r=u,h)))}}function k4(t,i){var a=bc(t),r=a==="transform"?m4:Lv;return this.attrTween(t,typeof i=="function"?(a.local?D4:O4)(a,r,Eh(this,"attr."+t,i)):i==null?(a.local?j4:M4)(a):(a.local?R4:z4)(a,r,i))}function L4(t,i){return function(a){this.setAttribute(t,i.call(this,a))}}function H4(t,i){return function(a){this.setAttributeNS(t.space,t.local,i.call(this,a))}}function B4(t,i){var a,r;function s(){var c=i.apply(this,arguments);return c!==r&&(a=(r=c)&&H4(t,c)),a}return s._value=i,s}function U4(t,i){var a,r;function s(){var c=i.apply(this,arguments);return c!==r&&(a=(r=c)&&L4(t,c)),a}return s._value=i,s}function V4(t,i){var a="attr."+t;if(arguments.length<2)return(a=this.tween(a))&&a._value;if(i==null)return this.tween(a,null);if(typeof i!="function")throw new Error;var r=bc(t);return this.tween(a,(r.local?B4:U4)(r,i))}function $4(t,i){return function(){Sh(this,t).delay=+i.apply(this,arguments)}}function Y4(t,i){return i=+i,function(){Sh(this,t).delay=i}}function q4(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?$4:Y4)(i,t)):pn(this.node(),i).delay}function X4(t,i){return function(){An(this,t).duration=+i.apply(this,arguments)}}function G4(t,i){return i=+i,function(){An(this,t).duration=i}}function Z4(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?X4:G4)(i,t)):pn(this.node(),i).duration}function Q4(t,i){if(typeof i!="function")throw new Error;return function(){An(this,t).ease=i}}function K4(t){var i=this._id;return arguments.length?this.each(Q4(i,t)):pn(this.node(),i).ease}function P4(t,i){return function(){var a=i.apply(this,arguments);if(typeof a!="function")throw new Error;An(this,t).ease=a}}function F4(t){if(typeof t!="function")throw new Error;return this.each(P4(this._id,t))}function I4(t){typeof t!="function"&&(t=hv(t));for(var i=this._groups,a=i.length,r=new Array(a),s=0;s<a;++s)for(var c=i[s],u=c.length,h=r[s]=[],p,m=0;m<u;++m)(p=c[m])&&t.call(p,p.__data__,m,c)&&h.push(p);return new ai(r,this._parents,this._name,this._id)}function J4(t){if(t._id!==this._id)throw new Error;for(var i=this._groups,a=t._groups,r=i.length,s=a.length,c=Math.min(r,s),u=new Array(r),h=0;h<c;++h)for(var p=i[h],m=a[h],x=p.length,y=u[h]=new Array(x),v,w=0;w<x;++w)(v=p[w]||m[w])&&(y[w]=v);for(;h<r;++h)u[h]=i[h];return new ai(u,this._parents,this._name,this._id)}function W4(t){return(t+"").trim().split(/^|\s+/).every(function(i){var a=i.indexOf(".");return a>=0&&(i=i.slice(0,a)),!i||i==="start"})}function eC(t,i,a){var r,s,c=W4(i)?Sh:An;return function(){var u=c(this,t),h=u.on;h!==r&&(s=(r=h).copy()).on(i,a),u.on=s}}function tC(t,i){var a=this._id;return arguments.length<2?pn(this.node(),a).on.on(t):this.each(eC(a,t,i))}function nC(t){return function(){var i=this.parentNode;for(var a in this.__transition)if(+a!==t)return;i&&i.removeChild(this)}}function iC(){return this.on("end.remove",nC(this._id))}function lC(t){var i=this._name,a=this._id;typeof t!="function"&&(t=yh(t));for(var r=this._groups,s=r.length,c=new Array(s),u=0;u<s;++u)for(var h=r[u],p=h.length,m=c[u]=new Array(p),x,y,v=0;v<p;++v)(x=h[v])&&(y=t.call(x,x.__data__,v,h))&&("__data__"in x&&(y.__data__=x.__data__),m[v]=y,Sc(m[v],i,a,v,m,pn(x,a)));return new ai(c,this._parents,i,a)}function aC(t){var i=this._name,a=this._id;typeof t!="function"&&(t=dv(t));for(var r=this._groups,s=r.length,c=[],u=[],h=0;h<s;++h)for(var p=r[h],m=p.length,x,y=0;y<m;++y)if(x=p[y]){for(var v=t.call(x,x.__data__,y,p),w,S=pn(x,a),_=0,E=v.length;_<E;++_)(w=v[_])&&Sc(w,i,a,_,v,S);c.push(v),u.push(x)}return new ai(c,u,i,a)}var rC=no.prototype.constructor;function oC(){return new rC(this._groups,this._parents)}function sC(t,i){var a,r,s;return function(){var c=Ta(this,t),u=(this.style.removeProperty(t),Ta(this,t));return c===u?null:c===a&&u===r?s:s=i(a=c,r=u)}}function Hv(t){return function(){this.style.removeProperty(t)}}function cC(t,i,a){var r,s=a+"",c;return function(){var u=Ta(this,t);return u===s?null:u===r?c:c=i(r=u,a)}}function uC(t,i,a){var r,s,c;return function(){var u=Ta(this,t),h=a(this),p=h+"";return h==null&&(p=h=(this.style.removeProperty(t),Ta(this,t))),u===p?null:u===r&&p===s?c:(s=p,c=i(r=u,h))}}function fC(t,i){var a,r,s,c="style."+i,u="end."+c,h;return function(){var p=An(this,t),m=p.on,x=p.value[c]==null?h||(h=Hv(i)):void 0;(m!==a||s!==x)&&(r=(a=m).copy()).on(u,s=x),p.on=r}}function dC(t,i,a){var r=(t+="")=="transform"?h4:Lv;return i==null?this.styleTween(t,sC(t,r)).on("end.style."+t,Hv(t)):typeof i=="function"?this.styleTween(t,uC(t,r,Eh(this,"style."+t,i))).each(fC(this._id,t)):this.styleTween(t,cC(t,r,i),a).on("end.style."+t,null)}function hC(t,i,a){return function(r){this.style.setProperty(t,i.call(this,r),a)}}function mC(t,i,a){var r,s;function c(){var u=i.apply(this,arguments);return u!==s&&(r=(s=u)&&hC(t,u,a)),r}return c._value=i,c}function pC(t,i,a){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,mC(t,i,a??""))}function gC(t){return function(){this.textContent=t}}function yC(t){return function(){var i=t(this);this.textContent=i??""}}function xC(t){return this.tween("text",typeof t=="function"?yC(Eh(this,"text",t)):gC(t==null?"":t+""))}function vC(t){return function(i){this.textContent=t.call(this,i)}}function bC(t){var i,a;function r(){var s=t.apply(this,arguments);return s!==a&&(i=(a=s)&&vC(s)),i}return r._value=t,r}function wC(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,bC(t))}function SC(){for(var t=this._name,i=this._id,a=Bv(),r=this._groups,s=r.length,c=0;c<s;++c)for(var u=r[c],h=u.length,p,m=0;m<h;++m)if(p=u[m]){var x=pn(p,i);Sc(p,t,a,m,u,{time:x.time+x.delay+x.duration,delay:0,duration:x.duration,ease:x.ease})}return new ai(r,this._parents,t,a)}function EC(){var t,i,a=this,r=a._id,s=a.size();return new Promise(function(c,u){var h={value:u},p={value:function(){--s===0&&c()}};a.each(function(){var m=An(this,r),x=m.on;x!==t&&(i=(t=x).copy(),i._.cancel.push(h),i._.interrupt.push(h),i._.end.push(p)),m.on=i}),s===0&&c()})}var NC=0;function ai(t,i,a,r){this._groups=t,this._parents=i,this._name=a,this._id=r}function Bv(){return++NC}var ei=no.prototype;ai.prototype={constructor:ai,select:lC,selectAll:aC,selectChild:ei.selectChild,selectChildren:ei.selectChildren,filter:I4,merge:J4,selection:oC,transition:SC,call:ei.call,nodes:ei.nodes,node:ei.node,size:ei.size,empty:ei.empty,each:ei.each,on:tC,attr:k4,attrTween:V4,style:dC,styleTween:pC,text:xC,textTween:wC,remove:iC,tween:A4,delay:q4,duration:Z4,ease:K4,easeVarying:F4,end:EC,[Symbol.iterator]:ei[Symbol.iterator]};function _C(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var CC={time:null,delay:0,duration:250,ease:_C};function TC(t,i){for(var a;!(a=t.__transition)||!(a=a[i]);)if(!(t=t.parentNode))throw new Error(`transition ${i} not found`);return a}function AC(t){var i,a;t instanceof ai?(i=t._id,t=t._name):(i=Bv(),(a=CC).time=wh(),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,p,m=0;m<h;++m)(p=u[m])&&Sc(p,t,i,m,u,a||TC(p,i));return new ai(r,this._parents,t,i)}no.prototype.interrupt=_4;no.prototype.transition=AC;const $s=t=>()=>t;function MC(t,{sourceEvent:i,target:a,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function li(t,i,a){this.k=t,this.x=i,this.y=a}li.prototype={constructor:li,scale:function(t){return t===1?this:new li(this.k*t,this.x,this.y)},translate:function(t,i){return t===0&i===0?this:new li(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 Ec=new li(1,0,0);Uv.prototype=li.prototype;function Uv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Ec;return t.__zoom}function xd(t){t.stopImmediatePropagation()}function Br(t){t.preventDefault(),t.stopImmediatePropagation()}function jC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function zC(){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 py(){return this.__zoom||Ec}function RC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function OC(){return navigator.maxTouchPoints||"ontouchstart"in this}function DC(t,i,a){var r=t.invertX(i[0][0])-a[0][0],s=t.invertX(i[1][0])-a[1][0],c=t.invertY(i[0][1])-a[0][1],u=t.invertY(i[1][1])-a[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 Vv(){var t=jC,i=zC,a=DC,r=RC,s=OC,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],h=250,p=Fs,m=vc("start","zoom","end"),x,y,v,w=500,S=150,_=0,E=10;function C(D){D.property("__zoom",py).on("wheel.zoom",V,{passive:!1}).on("mousedown.zoom",Z).on("dblclick.zoom",le).filter(s).on("touchstart.zoom",Q).on("touchmove.zoom",X).on("touchend.zoom touchcancel.zoom",te).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function(D,G,z,B){var O=D.selection?D.selection():D;O.property("__zoom",py),D!==O?H(D,G,z,B):O.interrupt().each(function(){k(this,arguments).event(B).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},C.scaleBy=function(D,G,z,B){C.scaleTo(D,function(){var O=this.__zoom.k,$=typeof G=="function"?G.apply(this,arguments):G;return O*$},z,B)},C.scaleTo=function(D,G,z,B){C.transform(D,function(){var O=i.apply(this,arguments),$=this.__zoom,J=z==null?A(O):typeof z=="function"?z.apply(this,arguments):z,R=$.invert(J),Y=typeof G=="function"?G.apply(this,arguments):G;return a(N(j($,Y),J,R),O,u)},z,B)},C.translateBy=function(D,G,z,B){C.transform(D,function(){return a(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof z=="function"?z.apply(this,arguments):z),i.apply(this,arguments),u)},null,B)},C.translateTo=function(D,G,z,B,O){C.transform(D,function(){var $=i.apply(this,arguments),J=this.__zoom,R=B==null?A($):typeof B=="function"?B.apply(this,arguments):B;return a(Ec.translate(R[0],R[1]).scale(J.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof z=="function"?-z.apply(this,arguments):-z),$,u)},B,O)};function j(D,G){return G=Math.max(c[0],Math.min(c[1],G)),G===D.k?D:new li(G,D.x,D.y)}function N(D,G,z){var B=G[0]-z[0]*D.k,O=G[1]-z[1]*D.k;return B===D.x&&O===D.y?D:new li(D.k,B,O)}function A(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function H(D,G,z,B){D.on("start.zoom",function(){k(this,arguments).event(B).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(B).end()}).tween("zoom",function(){var O=this,$=arguments,J=k(O,$).event(B),R=i.apply(O,$),Y=z==null?A(R):typeof z=="function"?z.apply(O,$):z,P=Math.max(R[1][0]-R[0][0],R[1][1]-R[0][1]),ee=O.__zoom,se=typeof G=="function"?G.apply(O,$):G,ue=p(ee.invert(Y).concat(P/ee.k),se.invert(Y).concat(P/se.k));return function(oe){if(oe===1)oe=se;else{var ce=ue(oe),fe=P/ce[2];oe=new li(fe,Y[0]-ce[0]*fe,Y[1]-ce[1]*fe)}J.zoom(null,oe)}})}function k(D,G,z){return!z&&D.__zooming||new L(D,G)}function L(D,G){this.that=D,this.args=G,this.active=0,this.sourceEvent=null,this.extent=i.apply(D,G),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,G){return this.mouse&&D!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=G.invert(this.touch1[0])),this.that.__zoom=G,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var G=Gt(this.that).datum();m.call(D,this.that,new MC(D,{sourceEvent:this.sourceEvent,target:C,transform:this.that.__zoom,dispatch:m}),G)}};function V(D,...G){if(!t.apply(this,arguments))return;var z=k(this,G).event(D),B=this.__zoom,O=Math.max(c[0],Math.min(c[1],B.k*Math.pow(2,r.apply(this,arguments)))),$=sn(D);if(z.wheel)(z.mouse[0][0]!==$[0]||z.mouse[0][1]!==$[1])&&(z.mouse[1]=B.invert(z.mouse[0]=$)),clearTimeout(z.wheel);else{if(B.k===O)return;z.mouse=[$,B.invert($)],Ws(this),z.start()}Br(D),z.wheel=setTimeout(J,S),z.zoom("mouse",a(N(j(B,O),z.mouse[0],z.mouse[1]),z.extent,u));function J(){z.wheel=null,z.end()}}function Z(D,...G){if(v||!t.apply(this,arguments))return;var z=D.currentTarget,B=k(this,G,!0).event(D),O=Gt(D.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",P,!0),$=sn(D,z),J=D.clientX,R=D.clientY;Ev(D.view),xd(D),B.mouse=[$,this.__zoom.invert($)],Ws(this),B.start();function Y(ee){if(Br(ee),!B.moved){var se=ee.clientX-J,ue=ee.clientY-R;B.moved=se*se+ue*ue>_}B.event(ee).zoom("mouse",a(N(B.that.__zoom,B.mouse[0]=sn(ee,z),B.mouse[1]),B.extent,u))}function P(ee){O.on("mousemove.zoom mouseup.zoom",null),Nv(ee.view,B.moved),Br(ee),B.event(ee).end()}}function le(D,...G){if(t.apply(this,arguments)){var z=this.__zoom,B=sn(D.changedTouches?D.changedTouches[0]:D,this),O=z.invert(B),$=z.k*(D.shiftKey?.5:2),J=a(N(j(z,$),B,O),i.apply(this,G),u);Br(D),h>0?Gt(this).transition().duration(h).call(H,J,B,D):Gt(this).call(C.transform,J,B,D)}}function Q(D,...G){if(t.apply(this,arguments)){var z=D.touches,B=z.length,O=k(this,G,D.changedTouches.length===B).event(D),$,J,R,Y;for(xd(D),J=0;J<B;++J)R=z[J],Y=sn(R,this),Y=[Y,this.__zoom.invert(Y),R.identifier],O.touch0?!O.touch1&&O.touch0[2]!==Y[2]&&(O.touch1=Y,O.taps=0):(O.touch0=Y,$=!0,O.taps=1+!!x);x&&(x=clearTimeout(x)),$&&(O.taps<2&&(y=Y[0],x=setTimeout(function(){x=null},w)),Ws(this),O.start())}}function X(D,...G){if(this.__zooming){var z=k(this,G).event(D),B=D.changedTouches,O=B.length,$,J,R,Y;for(Br(D),$=0;$<O;++$)J=B[$],R=sn(J,this),z.touch0&&z.touch0[2]===J.identifier?z.touch0[0]=R:z.touch1&&z.touch1[2]===J.identifier&&(z.touch1[0]=R);if(J=z.that.__zoom,z.touch1){var P=z.touch0[0],ee=z.touch0[1],se=z.touch1[0],ue=z.touch1[1],oe=(oe=se[0]-P[0])*oe+(oe=se[1]-P[1])*oe,ce=(ce=ue[0]-ee[0])*ce+(ce=ue[1]-ee[1])*ce;J=j(J,Math.sqrt(oe/ce)),R=[(P[0]+se[0])/2,(P[1]+se[1])/2],Y=[(ee[0]+ue[0])/2,(ee[1]+ue[1])/2]}else if(z.touch0)R=z.touch0[0],Y=z.touch0[1];else return;z.zoom("touch",a(N(J,R,Y),z.extent,u))}}function te(D,...G){if(this.__zooming){var z=k(this,G).event(D),B=D.changedTouches,O=B.length,$,J;for(xd(D),v&&clearTimeout(v),v=setTimeout(function(){v=null},w),$=0;$<O;++$)J=B[$],z.touch0&&z.touch0[2]===J.identifier?delete z.touch0:z.touch1&&z.touch1[2]===J.identifier&&delete z.touch1;if(z.touch1&&!z.touch0&&(z.touch0=z.touch1,delete z.touch1),z.touch0)z.touch0[1]=this.__zoom.invert(z.touch0[0]);else if(z.end(),z.taps===2&&(J=sn(J,this),Math.hypot(y[0]-J[0],y[1]-J[1])<E)){var R=Gt(this).on("dblclick.zoom");R&&R.apply(this,arguments)}}}return C.wheelDelta=function(D){return arguments.length?(r=typeof D=="function"?D:$s(+D),C):r},C.filter=function(D){return arguments.length?(t=typeof D=="function"?D:$s(!!D),C):t},C.touchable=function(D){return arguments.length?(s=typeof D=="function"?D:$s(!!D),C):s},C.extent=function(D){return arguments.length?(i=typeof D=="function"?D:$s([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),C):i},C.scaleExtent=function(D){return arguments.length?(c[0]=+D[0],c[1]=+D[1],C):[c[0],c[1]]},C.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],C):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},C.constrain=function(D){return arguments.length?(a=D,C):a},C.duration=function(D){return arguments.length?(h=+D,C):h},C.interpolate=function(D){return arguments.length?(p=D,C):p},C.on=function(){var D=m.on.apply(m,arguments);return D===m?C:D},C.clickDistance=function(D){return arguments.length?(_=(D=+D)*D,C):Math.sqrt(_)},C.tapDistance=function(D){return arguments.length?(E=+D,C):E},C}const Cn={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:a,targetHandle:r})=>`Couldn't create edge for ${t} handle id: "${t==="source"?a: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."},Pr=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],$v=["Enter"," ","Escape"],Yv={"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:a})=>`Moved selected node ${t}. New position, x: ${i}, y: ${a}`,"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 Ma;(function(t){t.Strict="strict",t.Loose="loose"})(Ma||(Ma={}));var _l;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(_l||(_l={}));var Fr;(function(t){t.Partial="partial",t.Full="full"})(Fr||(Fr={}));const qv={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Yi;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Yi||(Yi={}));var cc;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(cc||(cc={}));var xe;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(xe||(xe={}));const gy={[xe.Left]:xe.Right,[xe.Right]:xe.Left,[xe.Top]:xe.Bottom,[xe.Bottom]:xe.Top};function Xv(t){return t===null?null:t?"valid":"invalid"}const Gv=t=>"id"in t&&"source"in t&&"target"in t,kC=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),Nh=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),lo=(t,i=[0,0])=>{const{width:a,height:r}=si(t),s=t.origin??i,c=a*s[0],u=r*s[1];return{x:t.position.x-c,y:t.position.y-u}},LC=(t,i={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const a=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):Nh(s)?s:i.nodeLookup.get(s.id));const h=u?uc(u,i.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Nc(r,h)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return _c(a)},ao=(t,i={})=>{let a={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))&&(a=Nc(a,uc(s)),r=!0)}),r?_c(a):{x:0,y:0,width:0,height:0}},_h=(t,i,[a,r,s]=[0,0,1],c=!1,u=!1)=>{const h={...oo(i,[a,r,s]),width:i.width/s,height:i.height/s},p=[];for(const m of t.values()){const{measured:x,selectable:y=!0,hidden:v=!1}=m;if(u&&!y||v)continue;const w=x.width??m.width??m.initialWidth??null,S=x.height??m.height??m.initialHeight??null,_=Ir(h,za(m)),E=(w??0)*(S??0),C=c&&_>0;(!m.internals.handleBounds||C||_>=E||m.dragging)&&p.push(m)}return p},HC=(t,i)=>{const a=new Set;return t.forEach(r=>{a.add(r.id)}),i.filter(r=>a.has(r.source)||a.has(r.target))};function BC(t,i){const a=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))&&a.set(s.id,s)}),a}async function UC({nodes:t,width:i,height:a,panZoom:r,minZoom:s,maxZoom:c},u){if(t.size===0)return Promise.resolve(!0);const h=BC(t,u),p=ao(h),m=Ch(p,i,a,(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(m,{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 Zv({nodeId:t,nextPosition:i,nodeLookup:a,nodeOrigin:r=[0,0],nodeExtent:s,onError:c}){const u=a.get(t),h=u.parentId?a.get(u.parentId):void 0,{x:p,y:m}=h?h.internals.positionAbsolute:{x:0,y:0},x=u.origin??r;let y=u.extent||s;if(u.extent==="parent"&&!u.expandParent)if(!h)c==null||c("005",Cn.error005());else{const w=h.measured.width,S=h.measured.height;w&&S&&(y=[[p,m],[p+w,m+S]])}else h&&Ra(u.extent)&&(y=[[u.extent[0][0]+p,u.extent[0][1]+m],[u.extent[1][0]+p,u.extent[1][1]+m]]);const v=Ra(y)?Ml(i,y,u.measured):i;return(u.measured.width===void 0||u.measured.height===void 0)&&(c==null||c("015",Cn.error015())),{position:{x:v.x-p+(u.measured.width??0)*x[0],y:v.y-m+(u.measured.height??0)*x[1]},positionAbsolute:v}}async function VC({nodesToRemove:t=[],edgesToRemove:i=[],nodes:a,edges:r,onBeforeDelete:s}){const c=new Set(t.map(v=>v.id)),u=[];for(const v of a){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)),p=r.filter(v=>v.deletable!==!1),x=HC(u,p);for(const v of p)h.has(v.id)&&!x.find(S=>S.id===v.id)&&x.push(v);if(!s)return{edges:x,nodes:u};const y=await s({nodes:u,edges:x});return typeof y=="boolean"?y?{edges:x,nodes:u}:{edges:[],nodes:[]}:y}const ja=(t,i=0,a=1)=>Math.min(Math.max(t,i),a),Ml=(t={x:0,y:0},i,a)=>({x:ja(t.x,i[0][0],i[1][0]-((a==null?void 0:a.width)??0)),y:ja(t.y,i[0][1],i[1][1]-((a==null?void 0:a.height)??0))});function Qv(t,i,a){const{width:r,height:s}=si(a),{x:c,y:u}=a.internals.positionAbsolute;return Ml(t,[[c,u],[c+r,u+s]],i)}const yy=(t,i,a)=>t<i?ja(Math.abs(t-i),1,i)/i:t>a?-ja(Math.abs(t-a),1,i)/i:0,Kv=(t,i,a=15,r=40)=>{const s=yy(t.x,r,i.width-r)*a,c=yy(t.y,r,i.height-r)*a;return[s,c]},Nc=(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)}),Qd=({x:t,y:i,width:a,height:r})=>({x:t,y:i,x2:t+a,y2:i+r}),_c=({x:t,y:i,x2:a,y2:r})=>({x:t,y:i,width:a-t,height:r-i}),za=(t,i=[0,0])=>{var s,c;const{x:a,y:r}=Nh(t)?t.internals.positionAbsolute:lo(t,i);return{x:a,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}},uc=(t,i=[0,0])=>{var s,c;const{x:a,y:r}=Nh(t)?t.internals.positionAbsolute:lo(t,i);return{x:a,y:r,x2:a+(((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)}},Pv=(t,i)=>_c(Nc(Qd(t),Qd(i))),Ir=(t,i)=>{const a=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(a*r)},xy=t=>un(t.width)&&un(t.height)&&un(t.x)&&un(t.y),un=t=>!isNaN(t)&&isFinite(t),$C=(t,i)=>{},ro=(t,i=[1,1])=>({x:i[0]*Math.round(t.x/i[0]),y:i[1]*Math.round(t.y/i[1])}),oo=({x:t,y:i},[a,r,s],c=!1,u=[1,1])=>{const h={x:(t-a)/s,y:(i-r)/s};return c?ro(h,u):h},fc=({x:t,y:i},[a,r,s])=>({x:t*s+a,y:i*s+r});function ba(t,i){if(typeof t=="number")return Math.floor((i-i/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const a=parseFloat(t);if(!Number.isNaN(a))return Math.floor(a)}if(typeof t=="string"&&t.endsWith("%")){const a=parseFloat(t);if(!Number.isNaN(a))return Math.floor(i*a*.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 YC(t,i,a){if(typeof t=="string"||typeof t=="number"){const r=ba(t,a),s=ba(t,i);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof t=="object"){const r=ba(t.top??t.y??0,a),s=ba(t.bottom??t.y??0,a),c=ba(t.left??t.x??0,i),u=ba(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 qC(t,i,a,r,s,c){const{x:u,y:h}=fc(t,[i,a,r]),{x:p,y:m}=fc({x:t.x+t.width,y:t.y+t.height},[i,a,r]),x=s-p,y=c-m;return{left:Math.floor(u),top:Math.floor(h),right:Math.floor(x),bottom:Math.floor(y)}}const Ch=(t,i,a,r,s,c)=>{const u=YC(c,i,a),h=(i-u.x)/t.width,p=(a-u.y)/t.height,m=Math.min(h,p),x=ja(m,r,s),y=t.x+t.width/2,v=t.y+t.height/2,w=i/2-y*x,S=a/2-v*x,_=qC(t,w,S,x,i,a),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:x}},Jr=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function Ra(t){return t!=null&&t!=="parent"}function si(t){var i,a;return{width:((i=t.measured)==null?void 0:i.width)??t.width??t.initialWidth??0,height:((a=t.measured)==null?void 0:a.height)??t.height??t.initialHeight??0}}function Fv(t){var i,a;return(((i=t.measured)==null?void 0:i.width)??t.width??t.initialWidth)!==void 0&&(((a=t.measured)==null?void 0:a.height)??t.height??t.initialHeight)!==void 0}function Iv(t,i={width:0,height:0},a,r,s){const c={...t},u=r.get(a);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 vy(t,i){if(t.size!==i.size)return!1;for(const a of t)if(!i.has(a))return!1;return!0}function XC(){let t,i;return{promise:new Promise((r,s)=>{t=r,i=s}),resolve:t,reject:i}}function GC(t){return{...Yv,...t||{}}}function qr(t,{snapGrid:i=[0,0],snapToGrid:a=!1,transform:r,containerBounds:s}){const{x:c,y:u}=fn(t),h=oo({x:c-((s==null?void 0:s.left)??0),y:u-((s==null?void 0:s.top)??0)},r),{x:p,y:m}=a?ro(h,i):h;return{xSnapped:p,ySnapped:m,...h}}const Th=t=>({width:t.offsetWidth,height:t.offsetHeight}),Jv=t=>{var i;return((i=t==null?void 0:t.getRootNode)==null?void 0:i.call(t))||(window==null?void 0:window.document)},ZC=["INPUT","SELECT","TEXTAREA"];function Wv(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:ZC.includes(i.nodeName)||i.hasAttribute("contenteditable")||!!i.closest(".nokey")}const e1=t=>"clientX"in t,fn=(t,i)=>{var c,u;const a=e1(t),r=a?t.clientX:(c=t.touches)==null?void 0:c[0].clientX,s=a?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)}},by=(t,i,a,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-a.left)/r,y:(h.top-a.top)/r,...Th(u)}})};function t1({sourceX:t,sourceY:i,targetX:a,targetY:r,sourceControlX:s,sourceControlY:c,targetControlX:u,targetControlY:h}){const p=t*.125+s*.375+u*.375+a*.125,m=i*.125+c*.375+h*.375+r*.125,x=Math.abs(p-t),y=Math.abs(m-i);return[p,m,x,y]}function Ys(t,i){return t>=0?.5*t:i*25*Math.sqrt(-t)}function wy({pos:t,x1:i,y1:a,x2:r,y2:s,c}){switch(t){case xe.Left:return[i-Ys(i-r,c),a];case xe.Right:return[i+Ys(r-i,c),a];case xe.Top:return[i,a-Ys(a-s,c)];case xe.Bottom:return[i,a+Ys(s-a,c)]}}function n1({sourceX:t,sourceY:i,sourcePosition:a=xe.Bottom,targetX:r,targetY:s,targetPosition:c=xe.Top,curvature:u=.25}){const[h,p]=wy({pos:a,x1:t,y1:i,x2:r,y2:s,c:u}),[m,x]=wy({pos:c,x1:r,y1:s,x2:t,y2:i,c:u}),[y,v,w,S]=t1({sourceX:t,sourceY:i,targetX:r,targetY:s,sourceControlX:h,sourceControlY:p,targetControlX:m,targetControlY:x});return[`M${t},${i} C${h},${p} ${m},${x} ${r},${s}`,y,v,w,S]}function i1({sourceX:t,sourceY:i,targetX:a,targetY:r}){const s=Math.abs(a-t)/2,c=a<t?a+s:a-s,u=Math.abs(r-i)/2,h=r<i?r+u:r-u;return[c,h,s,u]}function QC({sourceNode:t,targetNode:i,selected:a=!1,zIndex:r=0,elevateOnSelect:s=!1,zIndexMode:c="basic"}){if(c==="manual")return r;const u=s&&a?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 KC({sourceNode:t,targetNode:i,width:a,height:r,transform:s}){const c=Nc(uc(t),uc(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:a/s[2],height:r/s[2]};return Ir(u,_c(c))>0}const PC=({source:t,sourceHandle:i,target:a,targetHandle:r})=>`xy-edge__${t}${i||""}-${a}${r||""}`,FC=(t,i)=>i.some(a=>a.source===t.source&&a.target===t.target&&(a.sourceHandle===t.sourceHandle||!a.sourceHandle&&!t.sourceHandle)&&(a.targetHandle===t.targetHandle||!a.targetHandle&&!t.targetHandle)),IC=(t,i,a={})=>{if(!t.source||!t.target)return i;const r=a.getEdgeId||PC;let s;return Gv(t)?s={...t}:s={...t,id:r(t)},FC(s,i)?i:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,i.concat(s))};function l1({sourceX:t,sourceY:i,targetX:a,targetY:r}){const[s,c,u,h]=i1({sourceX:t,sourceY:i,targetX:a,targetY:r});return[`M ${t},${i}L ${a},${r}`,s,c,u,h]}const Sy={[xe.Left]:{x:-1,y:0},[xe.Right]:{x:1,y:0},[xe.Top]:{x:0,y:-1},[xe.Bottom]:{x:0,y:1}},JC=({source:t,sourcePosition:i=xe.Bottom,target:a})=>i===xe.Left||i===xe.Right?t.x<a.x?{x:1,y:0}:{x:-1,y:0}:t.y<a.y?{x:0,y:1}:{x:0,y:-1},Ey=(t,i)=>Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2));function WC({source:t,sourcePosition:i=xe.Bottom,target:a,targetPosition:r=xe.Top,center:s,offset:c,stepPosition:u}){const h=Sy[i],p=Sy[r],m={x:t.x+h.x*c,y:t.y+h.y*c},x={x:a.x+p.x*c,y:a.y+p.y*c},y=JC({source:m,sourcePosition:i,target:x}),v=y.x!==0?"x":"y",w=y[v];let S=[],_,E;const C={x:0,y:0},j={x:0,y:0},[,,N,A]=i1({sourceX:t.x,sourceY:t.y,targetX:a.x,targetY:a.y});if(h[v]*p[v]===-1){v==="x"?(_=s.x??m.x+(x.x-m.x)*u,E=s.y??(m.y+x.y)/2):(_=s.x??(m.x+x.x)/2,E=s.y??m.y+(x.y-m.y)*u);const k=[{x:_,y:m.y},{x:_,y:x.y}],L=[{x:m.x,y:E},{x:x.x,y:E}];h[v]===w?S=v==="x"?k:L:S=v==="x"?L:k}else{const k=[{x:m.x,y:x.y}],L=[{x:x.x,y:m.y}];if(v==="x"?S=h.x===w?L:k:S=h.y===w?k:L,i===r){const X=Math.abs(t[v]-a[v]);if(X<=c){const te=Math.min(c-1,c-X);h[v]===w?C[v]=(m[v]>t[v]?-1:1)*te:j[v]=(x[v]>a[v]?-1:1)*te}}if(i!==r){const X=v==="x"?"y":"x",te=h[v]===p[X],D=m[X]>x[X],G=m[X]<x[X];(h[v]===1&&(!te&&D||te&&G)||h[v]!==1&&(!te&&G||te&&D))&&(S=v==="x"?k:L)}const V={x:m.x+C.x,y:m.y+C.y},Z={x:x.x+j.x,y:x.y+j.y},le=Math.max(Math.abs(V.x-S[0].x),Math.abs(Z.x-S[0].x)),Q=Math.max(Math.abs(V.y-S[0].y),Math.abs(Z.y-S[0].y));le>=Q?(_=(V.x+Z.x)/2,E=S[0].y):(_=S[0].x,E=(V.y+Z.y)/2)}return[[t,{x:m.x+C.x,y:m.y+C.y},...S,{x:x.x+j.x,y:x.y+j.y},a],_,E,N,A]}function e3(t,i,a,r){const s=Math.min(Ey(t,i)/2,Ey(i,a)/2,r),{x:c,y:u}=i;if(t.x===c&&c===a.x||t.y===u&&u===a.y)return`L${c} ${u}`;if(t.y===u){const m=t.x<a.x?-1:1,x=t.y<a.y?1:-1;return`L ${c+s*m},${u}Q ${c},${u} ${c},${u+s*x}`}const h=t.x<a.x?1:-1,p=t.y<a.y?-1:1;return`L ${c},${u+s*p}Q ${c},${u} ${c+s*h},${u}`}function Kd({sourceX:t,sourceY:i,sourcePosition:a=xe.Bottom,targetX:r,targetY:s,targetPosition:c=xe.Top,borderRadius:u=5,centerX:h,centerY:p,offset:m=20,stepPosition:x=.5}){const[y,v,w,S,_]=WC({source:{x:t,y:i},sourcePosition:a,target:{x:r,y:s},targetPosition:c,center:{x:h,y:p},offset:m,stepPosition:x});return[y.reduce((C,j,N)=>{let A="";return N>0&&N<y.length-1?A=e3(y[N-1],j,y[N+1],u):A=`${N===0?"M":"L"}${j.x} ${j.y}`,C+=A,C},""),v,w,S,_]}function Ny(t){var i;return t&&!!(t.internals.handleBounds||(i=t.handles)!=null&&i.length)&&!!(t.measured.width||t.width||t.initialWidth)}function t3(t){var y;const{sourceNode:i,targetNode:a}=t;if(!Ny(i)||!Ny(a))return null;const r=i.internals.handleBounds||_y(i.handles),s=a.internals.handleBounds||_y(a.handles),c=Cy((r==null?void 0:r.source)??[],t.sourceHandle),u=Cy(t.connectionMode===Ma.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(y=t.onError)==null||y.call(t,"008",Cn.error008(c?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const h=(c==null?void 0:c.position)||xe.Bottom,p=(u==null?void 0:u.position)||xe.Top,m=jl(i,c,h),x=jl(a,u,p);return{sourceX:m.x,sourceY:m.y,targetX:x.x,targetY:x.y,sourcePosition:h,targetPosition:p}}function _y(t){if(!t)return null;const i=[],a=[];for(const r of t)r.width=r.width??1,r.height=r.height??1,r.type==="source"?i.push(r):r.type==="target"&&a.push(r);return{source:i,target:a}}function jl(t,i,a=xe.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??si(t);if(r)return{x:s+u/2,y:c+h/2};switch((i==null?void 0:i.position)??a){case xe.Top:return{x:s+u/2,y:c};case xe.Right:return{x:s+u,y:c+h/2};case xe.Bottom:return{x:s+u/2,y:c+h};case xe.Left:return{x:s,y:c+h/2}}}function Cy(t,i){return t&&(i?t.find(a=>a.id===i):t[0])||null}function Pd(t,i){return t?typeof t=="string"?t:`${i?`${i}__`:""}${Object.keys(t).sort().map(r=>`${r}=${t[r]}`).join("&")}`:""}function n3(t,{id:i,defaultColor:a,defaultMarkerStart:r,defaultMarkerEnd:s}){const c=new Set;return t.reduce((u,h)=>([h.markerStart||r,h.markerEnd||s].forEach(p=>{if(p&&typeof p=="object"){const m=Pd(p,i);c.has(m)||(u.push({id:m,color:p.color||a,...p}),c.add(m))}}),u),[]).sort((u,h)=>u.id.localeCompare(h.id))}const a1=1e3,i3=10,Ah={nodeOrigin:[0,0],nodeExtent:Pr,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},l3={...Ah,checkEquality:!0};function Mh(t,i){const a={...t};for(const r in i)i[r]!==void 0&&(a[r]=i[r]);return a}function a3(t,i,a){const r=Mh(Ah,a);for(const s of t.values())if(s.parentId)zh(s,t,i,r);else{const c=lo(s,r.nodeOrigin),u=Ra(s.extent)?s.extent:r.nodeExtent,h=Ml(c,u,si(s));s.internals.positionAbsolute=h}}function r3(t,i){if(!t.handles)return t.measured?i==null?void 0:i.internals.handleBounds:void 0;const a=[],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"?a.push(c):s.type==="target"&&r.push(c)}return{source:a,target:r}}function jh(t){return t==="manual"}function Fd(t,i,a,r={}){var m,x;const s=Mh(l3,r),c={i:0},u=new Map(i),h=s!=null&&s.elevateNodesOnSelect&&!jh(s.zIndexMode)?a1:0;let p=t.length>0;i.clear(),a.clear();for(const y of t){let v=u.get(y.id);if(s.checkEquality&&y===(v==null?void 0:v.internals.userNode))i.set(y.id,v);else{const w=lo(y,s.nodeOrigin),S=Ra(y.extent)?y.extent:s.nodeExtent,_=Ml(w,S,si(y));v={...s.defaults,...y,measured:{width:(m=y.measured)==null?void 0:m.width,height:(x=y.measured)==null?void 0:x.height},internals:{positionAbsolute:_,handleBounds:r3(y,v),z:r1(y,h,s.zIndexMode),userNode:y}},i.set(y.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(p=!1),y.parentId&&zh(v,i,a,r,c)}return p}function o3(t,i){if(!t.parentId)return;const a=i.get(t.parentId);a?a.set(t.id,t):i.set(t.parentId,new Map([[t.id,t]]))}function zh(t,i,a,r,s){const{elevateNodesOnSelect:c,nodeOrigin:u,nodeExtent:h,zIndexMode:p}=Mh(Ah,r),m=t.parentId,x=i.get(m);if(!x){console.warn(`Parent node ${m} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}o3(t,a),s&&!x.parentId&&x.internals.rootParentIndex===void 0&&p==="auto"&&(x.internals.rootParentIndex=++s.i,x.internals.z=x.internals.z+s.i*i3),s&&x.internals.rootParentIndex!==void 0&&(s.i=x.internals.rootParentIndex);const y=c&&!jh(p)?a1:0,{x:v,y:w,z:S}=s3(t,x,u,h,y,p),{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 r1(t,i,a){const r=un(t.zIndex)?t.zIndex:0;return jh(a)?r:r+(t.selected?i:0)}function s3(t,i,a,r,s,c){const{x:u,y:h}=i.internals.positionAbsolute,p=si(t),m=lo(t,a),x=Ra(t.extent)?Ml(m,t.extent,p):m;let y=Ml({x:u+x.x,y:h+x.y},r,p);t.extent==="parent"&&(y=Qv(y,p,i));const v=r1(t,s,c),w=i.internals.z??0;return{x:y.x,y:y.y,z:w>=v?w+1:v}}function Rh(t,i,a,r=[0,0]){var u;const s=[],c=new Map;for(const h of t){const p=i.get(h.parentId);if(!p)continue;const m=((u=c.get(h.parentId))==null?void 0:u.expandedRect)??za(p),x=Pv(m,h.rect);c.set(h.parentId,{expandedRect:x,parent:p})}return c.size>0&&c.forEach(({expandedRect:h,parent:p},m)=>{var N;const x=p.internals.positionAbsolute,y=si(p),v=p.origin??r,w=h.x<x.x?Math.round(Math.abs(x.x-h.x)):0,S=h.y<x.y?Math.round(Math.abs(x.y-h.y)):0,_=Math.max(y.width,Math.round(h.width)),E=Math.max(y.height,Math.round(h.height)),C=(_-y.width)*v[0],j=(E-y.height)*v[1];(w>0||S>0||C||j)&&(s.push({id:m,type:"position",position:{x:p.position.x-w+C,y:p.position.y-S+j}}),(N=a.get(m))==null||N.forEach(A=>{t.some(H=>H.id===A.id)||s.push({id:A.id,type:"position",position:{x:A.position.x+w,y:A.position.y+S}})})),(y.width<h.width||y.height<h.height||w||S)&&s.push({id:m,type:"dimensions",setAttributes:!0,dimensions:{width:_+(w?v[0]*w-C:0),height:E+(S?v[1]*S-j:0)}})}),s}function c3(t,i,a,r,s,c,u){const h=r==null?void 0:r.querySelector(".xyflow__viewport");let p=!1;if(!h)return{changes:[],updatedInternals:p};const m=[],x=window.getComputedStyle(h),{m22:y}=new window.DOMMatrixReadOnly(x.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}}),p=!0;continue}const _=Th(w.nodeElement),E=S.measured.width!==_.width||S.measured.height!==_.height;if(!!(_.width&&_.height&&(E||!S.internals.handleBounds||w.force))){const j=w.nodeElement.getBoundingClientRect(),N=Ra(S.extent)?S.extent:c;let{positionAbsolute:A}=S.internals;S.parentId&&S.extent==="parent"?A=Qv(A,_,i.get(S.parentId)):N&&(A=Ml(A,N,_));const H={...S,measured:_,internals:{...S.internals,positionAbsolute:A,handleBounds:{source:by("source",w.nodeElement,j,y,S.id),target:by("target",w.nodeElement,j,y,S.id)}}};i.set(S.id,H),S.parentId&&zh(H,i,a,{nodeOrigin:s,zIndexMode:u}),p=!0,E&&(m.push({id:S.id,type:"dimensions",dimensions:_}),S.expandParent&&S.parentId&&v.push({id:S.id,parentId:S.parentId,rect:za(H,s)}))}}if(v.length>0){const w=Rh(v,i,a,s);m.push(...w)}return{changes:m,updatedInternals:p}}async function u3({delta:t,panZoom:i,transform:a,translateExtent:r,width:s,height:c}){if(!i||!t.x&&!t.y)return Promise.resolve(!1);const u=await i.setViewportConstrained({x:a[0]+t.x,y:a[1]+t.y,zoom:a[2]},[[0,0],[s,c]],r),h=!!u&&(u.x!==a[0]||u.y!==a[1]||u.k!==a[2]);return Promise.resolve(h)}function Ty(t,i,a,r,s,c){let u=s;const h=r.get(u)||new Map;r.set(u,h.set(a,i)),u=`${s}-${t}`;const p=r.get(u)||new Map;if(r.set(u,p.set(a,i)),c){u=`${s}-${t}-${c}`;const m=r.get(u)||new Map;r.set(u,m.set(a,i))}}function o1(t,i,a){t.clear(),i.clear();for(const r of a){const{source:s,target:c,sourceHandle:u=null,targetHandle:h=null}=r,p={edgeId:r.id,source:s,target:c,sourceHandle:u,targetHandle:h},m=`${s}-${u}--${c}-${h}`,x=`${c}-${h}--${s}-${u}`;Ty("source",p,x,t,s,u),Ty("target",p,m,t,c,h),i.set(r.id,r)}}function s1(t,i){if(!t.parentId)return!1;const a=i.get(t.parentId);return a?a.selected?!0:s1(a,i):!1}function Ay(t,i,a){var s;let r=t;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,i))return!0;if(r===a)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function f3(t,i,a,r){const s=new Map;for(const[c,u]of t)if((u.selected||u.id===r)&&(!u.parentId||!s1(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:a.x-h.internals.positionAbsolute.x,y:a.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 vd({nodeId:t,dragItems:i,nodeLookup:a,dragging:r=!0}){var u,h,p;const s=[];for(const[m,x]of i){const y=(u=a.get(m))==null?void 0:u.internals.userNode;y&&s.push({...y,position:x.position,dragging:r})}if(!t)return[s[0],s];const c=(h=a.get(t))==null?void 0:h.internals.userNode;return[c?{...c,position:((p=i.get(t))==null?void 0:p.position)||c.position,dragging:r}:s[0],s]}function d3({dragItems:t,snapGrid:i,x:a,y:r}){const s=t.values().next().value;if(!s)return null;const c={x:a-s.distance.x,y:r-s.distance.y},u=ro(c,i);return{x:u.x-c.x,y:u.y-c.y}}function h3({onNodeMouseDown:t,getStoreItems:i,onDragStart:a,onDrag:r,onDragStop:s}){let c={x:null,y:null},u=0,h=new Map,p=!1,m={x:0,y:0},x=null,y=!1,v=null,w=!1,S=!1,_=null;function E({noDragClassName:j,handleSelector:N,domNode:A,isSelectable:H,nodeId:k,nodeClickDistance:L=0}){v=Gt(A);function V({x:X,y:te}){const{nodeLookup:D,nodeExtent:G,snapGrid:z,snapToGrid:B,nodeOrigin:O,onNodeDrag:$,onSelectionDrag:J,onError:R,updateNodePositions:Y}=i();c={x:X,y:te};let P=!1;const ee=h.size>1,se=ee&&G?Qd(ao(h)):null,ue=ee&&B?d3({dragItems:h,snapGrid:z,x:X,y:te}):null;for(const[oe,ce]of h){if(!D.has(oe))continue;let fe={x:X-ce.distance.x,y:te-ce.distance.y};B&&(fe=ue?{x:Math.round(fe.x+ue.x),y:Math.round(fe.y+ue.y)}:ro(fe,z));let we=null;if(ee&&G&&!ce.extent&&se){const{positionAbsolute:ye}=ce.internals,Ce=ye.x-se.x+G[0][0],Ue=ye.x+ce.measured.width-se.x2+G[1][0],je=ye.y-se.y+G[0][1],nt=ye.y+ce.measured.height-se.y2+G[1][1];we=[[Ce,je],[Ue,nt]]}const{position:ve,positionAbsolute:ge}=Zv({nodeId:oe,nextPosition:fe,nodeLookup:D,nodeExtent:we||G,nodeOrigin:O,onError:R});P=P||ce.position.x!==ve.x||ce.position.y!==ve.y,ce.position=ve,ce.internals.positionAbsolute=ge}if(S=S||P,!!P&&(Y(h,!0),_&&(r||$||!k&&J))){const[oe,ce]=vd({nodeId:k,dragItems:h,nodeLookup:D});r==null||r(_,h,oe,ce),$==null||$(_,oe,ce),k||J==null||J(_,ce)}}async function Z(){if(!x)return;const{transform:X,panBy:te,autoPanSpeed:D,autoPanOnNodeDrag:G}=i();if(!G){p=!1,cancelAnimationFrame(u);return}const[z,B]=Kv(m,x,D);(z!==0||B!==0)&&(c.x=(c.x??0)-z/X[2],c.y=(c.y??0)-B/X[2],await te({x:z,y:B})&&V(c)),u=requestAnimationFrame(Z)}function le(X){var ee;const{nodeLookup:te,multiSelectionActive:D,nodesDraggable:G,transform:z,snapGrid:B,snapToGrid:O,selectNodesOnDrag:$,onNodeDragStart:J,onSelectionDragStart:R,unselectNodesAndEdges:Y}=i();y=!0,(!$||!H)&&!D&&k&&((ee=te.get(k))!=null&&ee.selected||Y()),H&&$&&k&&(t==null||t(k));const P=qr(X.sourceEvent,{transform:z,snapGrid:B,snapToGrid:O,containerBounds:x});if(c=P,h=f3(te,G,P,k),h.size>0&&(a||J||!k&&R)){const[se,ue]=vd({nodeId:k,dragItems:h,nodeLookup:te});a==null||a(X.sourceEvent,h,se,ue),J==null||J(X.sourceEvent,se,ue),k||R==null||R(X.sourceEvent,ue)}}const Q=_v().clickDistance(L).on("start",X=>{const{domNode:te,nodeDragThreshold:D,transform:G,snapGrid:z,snapToGrid:B}=i();x=(te==null?void 0:te.getBoundingClientRect())||null,w=!1,S=!1,_=X.sourceEvent,D===0&&le(X),c=qr(X.sourceEvent,{transform:G,snapGrid:z,snapToGrid:B,containerBounds:x}),m=fn(X.sourceEvent,x)}).on("drag",X=>{const{autoPanOnNodeDrag:te,transform:D,snapGrid:G,snapToGrid:z,nodeDragThreshold:B,nodeLookup:O}=i(),$=qr(X.sourceEvent,{transform:D,snapGrid:G,snapToGrid:z,containerBounds:x});if(_=X.sourceEvent,(X.sourceEvent.type==="touchmove"&&X.sourceEvent.touches.length>1||k&&!O.has(k))&&(w=!0),!w){if(!p&&te&&y&&(p=!0,Z()),!y){const J=fn(X.sourceEvent,x),R=J.x-m.x,Y=J.y-m.y;Math.sqrt(R*R+Y*Y)>B&&le(X)}(c.x!==$.xSnapped||c.y!==$.ySnapped)&&h&&y&&(m=fn(X.sourceEvent,x),V($))}}).on("end",X=>{if(!(!y||w)&&(p=!1,y=!1,cancelAnimationFrame(u),h.size>0)){const{nodeLookup:te,updateNodePositions:D,onNodeDragStop:G,onSelectionDragStop:z}=i();if(S&&(D(h,!1),S=!1),s||G||!k&&z){const[B,O]=vd({nodeId:k,dragItems:h,nodeLookup:te,dragging:!1});s==null||s(X.sourceEvent,h,B,O),G==null||G(X.sourceEvent,B,O),k||z==null||z(X.sourceEvent,O)}}}).filter(X=>{const te=X.target;return!X.button&&(!j||!Ay(te,`.${j}`,A))&&(!N||Ay(te,N,A))});v.call(Q)}function C(){v==null||v.on(".drag",null)}return{update:E,destroy:C}}function m3(t,i,a){const r=[],s={x:t.x-a,y:t.y-a,width:a*2,height:a*2};for(const c of i.values())Ir(s,za(c))>0&&r.push(c);return r}const p3=250;function g3(t,i,a,r){var h,p;let s=[],c=1/0;const u=m3(t,a,i+p3);for(const m of u){const x=[...((h=m.internals.handleBounds)==null?void 0:h.source)??[],...((p=m.internals.handleBounds)==null?void 0:p.target)??[]];for(const y of x){if(r.nodeId===y.nodeId&&r.type===y.type&&r.id===y.id)continue;const{x:v,y:w}=jl(m,y,y.position,!0),S=Math.sqrt(Math.pow(v-t.x,2)+Math.pow(w-t.y,2));S>i||(S<c?(s=[{...y,x:v,y:w}],c=S):S===c&&s.push({...y,x:v,y:w}))}}if(!s.length)return null;if(s.length>1){const m=r.type==="source"?"target":"source";return s.find(x=>x.type===m)??s[0]}return s[0]}function c1(t,i,a,r,s,c=!1){var m,x,y;const u=r.get(t);if(!u)return null;const h=s==="strict"?(m=u.internals.handleBounds)==null?void 0:m[i]:[...((x=u.internals.handleBounds)==null?void 0:x.source)??[],...((y=u.internals.handleBounds)==null?void 0:y.target)??[]],p=(a?h==null?void 0:h.find(v=>v.id===a):h==null?void 0:h[0])??null;return p&&c?{...p,...jl(u,p,p.position,!0)}:p}function u1(t,i){return t||(i!=null&&i.classList.contains("target")?"target":i!=null&&i.classList.contains("source")?"source":null)}function y3(t,i){let a=null;return i?a=!0:t&&!i&&(a=!1),a}const f1=()=>!0;function x3(t,{connectionMode:i,connectionRadius:a,handleId:r,nodeId:s,edgeUpdaterType:c,isTarget:u,domNode:h,nodeLookup:p,lib:m,autoPanOnConnect:x,flowId:y,panBy:v,cancelConnection:w,onConnectStart:S,onConnect:_,onConnectEnd:E,isValidConnection:C=f1,onReconnectEnd:j,updateConnection:N,getTransform:A,getFromHandle:H,autoPanSpeed:k,dragThreshold:L=1,handleDomNode:V}){const Z=Jv(t.target);let le=0,Q;const{x:X,y:te}=fn(t),D=u1(c,V),G=h==null?void 0:h.getBoundingClientRect();let z=!1;if(!G||!D)return;const B=c1(s,D,r,p,i);if(!B)return;let O=fn(t,G),$=!1,J=null,R=!1,Y=null;function P(){if(!x||!G)return;const[ve,ge]=Kv(O,G,k);v({x:ve,y:ge}),le=requestAnimationFrame(P)}const ee={...B,nodeId:s,type:D,position:B.position},se=p.get(s);let oe={inProgress:!0,isValid:null,from:jl(se,ee,xe.Left,!0),fromHandle:ee,fromPosition:ee.position,fromNode:se,to:O,toHandle:null,toPosition:gy[ee.position],toNode:null,pointer:O};function ce(){z=!0,N(oe),S==null||S(t,{nodeId:s,handleId:r,handleType:D})}L===0&&ce();function fe(ve){if(!z){const{x:nt,y:kt}=fn(ve),ht=nt-X,nn=kt-te;if(!(ht*ht+nn*nn>L*L))return;ce()}if(!H()||!ee){we(ve);return}const ge=A();O=fn(ve,G),Q=g3(oo(O,ge,!1,[1,1]),a,p,ee),$||(P(),$=!0);const ye=d1(ve,{handle:Q,connectionMode:i,fromNodeId:s,fromHandleId:r,fromType:u?"target":"source",isValidConnection:C,doc:Z,lib:m,flowId:y,nodeLookup:p});Y=ye.handleDomNode,J=ye.connection,R=y3(!!Q,ye.isValid);const Ce=p.get(s),Ue=Ce?jl(Ce,ee,xe.Left,!0):oe.from,je={...oe,from:Ue,isValid:R,to:ye.toHandle&&R?fc({x:ye.toHandle.x,y:ye.toHandle.y},ge):O,toHandle:ye.toHandle,toPosition:R&&ye.toHandle?ye.toHandle.position:gy[ee.position],toNode:ye.toHandle?p.get(ye.toHandle.nodeId):null,pointer:O};N(je),oe=je}function we(ve){if(!("touches"in ve&&ve.touches.length>0)){if(z){(Q||Y)&&J&&R&&(_==null||_(J));const{inProgress:ge,...ye}=oe,Ce={...ye,toPosition:oe.toHandle?oe.toPosition:null};E==null||E(ve,Ce),c&&(j==null||j(ve,Ce))}w(),cancelAnimationFrame(le),$=!1,R=!1,J=null,Y=null,Z.removeEventListener("mousemove",fe),Z.removeEventListener("mouseup",we),Z.removeEventListener("touchmove",fe),Z.removeEventListener("touchend",we)}}Z.addEventListener("mousemove",fe),Z.addEventListener("mouseup",we),Z.addEventListener("touchmove",fe),Z.addEventListener("touchend",we)}function d1(t,{handle:i,connectionMode:a,fromNodeId:r,fromHandleId:s,fromType:c,doc:u,lib:h,flowId:p,isValidConnection:m=f1,nodeLookup:x}){const y=c==="target",v=i?u.querySelector(`.${h}-flow__handle[data-id="${p}-${i==null?void 0:i.nodeId}-${i==null?void 0:i.id}-${i==null?void 0:i.type}"]`):null,{x:w,y:S}=fn(t),_=u.elementFromPoint(w,S),E=_!=null&&_.classList.contains(`${h}-flow__handle`)?_:v,C={handleDomNode:E,isValid:!1,connection:null,toHandle:null};if(E){const j=u1(void 0,E),N=E.getAttribute("data-nodeid"),A=E.getAttribute("data-handleid"),H=E.classList.contains("connectable"),k=E.classList.contains("connectableend");if(!N||!j)return C;const L={source:y?N:r,sourceHandle:y?A:s,target:y?r:N,targetHandle:y?s:A};C.connection=L;const Z=H&&k&&(a===Ma.Strict?y&&j==="source"||!y&&j==="target":N!==r||A!==s);C.isValid=Z&&m(L),C.toHandle=c1(N,j,A,x,a,!0)}return C}const Id={onPointerDown:x3,isValid:d1};function v3({domNode:t,panZoom:i,getTransform:a,getViewScale:r}){const s=Gt(t);function c({translateExtent:h,width:p,height:m,zoomStep:x=1,pannable:y=!0,zoomable:v=!0,inversePan:w=!1}){const S=N=>{if(N.sourceEvent.type!=="wheel"||!i)return;const A=a(),H=N.sourceEvent.ctrlKey&&Jr()?10:1,k=-N.sourceEvent.deltaY*(N.sourceEvent.deltaMode===1?.05:N.sourceEvent.deltaMode?1:.002)*x,L=A[2]*Math.pow(2,k*H);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])},C=N=>{const A=a();if(N.sourceEvent.type!=="mousemove"&&N.sourceEvent.type!=="touchmove"||!i)return;const H=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY],k=[H[0]-_[0],H[1]-_[1]];_=H;const L=r()*Math.max(A[2],Math.log(A[2]))*(w?-1:1),V={x:A[0]-k[0]*L,y:A[1]-k[1]*L},Z=[[0,0],[p,m]];i.setViewportConstrained({x:V.x,y:V.y,zoom:A[2]},Z,h)},j=Vv().on("start",E).on("zoom",y?C:null).on("zoom.wheel",v?S:null);s.call(j,{})}function u(){s.on("zoom",null)}return{update:c,destroy:u,pointer:sn}}const Cc=t=>({x:t.x,y:t.y,zoom:t.k}),bd=({x:t,y:i,zoom:a})=>Ec.translate(t,i).scale(a),wa=(t,i)=>t.target.closest(`.${i}`),h1=(t,i)=>i===2&&Array.isArray(t)&&t.includes(2),b3=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,wd=(t,i=0,a=b3,r=()=>{})=>{const s=typeof i=="number"&&i>0;return s||r(),s?t.transition().duration(i).ease(a).on("end",r):t},m1=t=>{const i=t.ctrlKey&&Jr()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*i};function w3({zoomPanValues:t,noWheelClassName:i,d3Selection:a,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:c,zoomOnPinch:u,onPanZoomStart:h,onPanZoom:p,onPanZoomEnd:m}){return x=>{if(wa(x,i))return x.ctrlKey&&x.preventDefault(),!1;x.preventDefault(),x.stopImmediatePropagation();const y=a.property("__zoom").k||1;if(x.ctrlKey&&u){const E=sn(x),C=m1(x),j=y*Math.pow(2,C);r.scaleTo(a,j,E,x);return}const v=x.deltaMode===1?20:1;let w=s===_l.Vertical?0:x.deltaX*v,S=s===_l.Horizontal?0:x.deltaY*v;!Jr()&&x.shiftKey&&s!==_l.Vertical&&(w=x.deltaY*v,S=0),r.translateBy(a,-(w/y)*c,-(S/y)*c,{internal:!0});const _=Cc(a.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(p==null||p(x,_),t.panScrollTimeout=setTimeout(()=>{m==null||m(x,_),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,h==null||h(x,_))}}function S3({noWheelClassName:t,preventScrolling:i,d3ZoomHandler:a}){return function(r,s){const c=r.type==="wheel",u=!i&&c&&!r.ctrlKey,h=wa(r,t);if(r.ctrlKey&&c&&h&&r.preventDefault(),u||h)return null;r.preventDefault(),a.call(this,r,s)}}function E3({zoomPanValues:t,onDraggingChange:i,onPanZoomStart:a}){return r=>{var c,u,h;if((c=r.sourceEvent)!=null&&c.internal)return;const s=Cc(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),a&&(a==null||a(r.sourceEvent,s))}}function N3({zoomPanValues:t,panOnDrag:i,onPaneContextMenu:a,onTransformChange:r,onPanZoom:s}){return c=>{var u,h;t.usedRightMouseButton=!!(a&&h1(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,Cc(c.transform)))}}function _3({zoomPanValues:t,panOnDrag:i,panOnScroll:a,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:c}){return u=>{var h;if(!((h=u.sourceEvent)!=null&&h.internal)&&(t.isZoomingOrPanning=!1,c&&h1(i,t.mouseButton??0)&&!t.usedRightMouseButton&&u.sourceEvent&&c(u.sourceEvent),t.usedRightMouseButton=!1,r(!1),s)){const p=Cc(u.transform);t.prevViewport=p,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{s==null||s(u.sourceEvent,p)},a?150:0)}}}function C3({zoomActivationKeyPressed:t,zoomOnScroll:i,zoomOnPinch:a,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:c,userSelectionActive:u,noWheelClassName:h,noPanClassName:p,lib:m,connectionInProgress:x}){return y=>{var E;const v=t||i,w=a&&y.ctrlKey,S=y.type==="wheel";if(y.button===1&&y.type==="mousedown"&&(wa(y,`${m}-flow__node`)||wa(y,`${m}-flow__edge`)))return!0;if(!r&&!v&&!s&&!c&&!a||u||x&&!S||wa(y,h)&&S||wa(y,p)&&(!S||s&&S&&!t)||!a&&y.ctrlKey&&S)return!1;if(!a&&y.type==="touchstart"&&((E=y.touches)==null?void 0:E.length)>1)return y.preventDefault(),!1;if(!v&&!s&&!w&&S||!r&&(y.type==="mousedown"||y.type==="touchstart")||Array.isArray(r)&&!r.includes(y.button)&&y.type==="mousedown")return!1;const _=Array.isArray(r)&&r.includes(y.button)||!y.button||y.button<=1;return(!y.ctrlKey||S)&&_}}function T3({domNode:t,minZoom:i,maxZoom:a,translateExtent:r,viewport:s,onPanZoom:c,onPanZoomStart:u,onPanZoomEnd:h,onDraggingChange:p}){const m={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},x=t.getBoundingClientRect(),y=Vv().scaleExtent([i,a]).translateExtent(r),v=Gt(t).call(y);j({x:s.x,y:s.y,zoom:ja(s.zoom,i,a)},[[0,0],[x.width,x.height]],r);const w=v.on("wheel.zoom"),S=v.on("dblclick.zoom");y.wheelDelta(m1);function _(Q,X){return v?new Promise(te=>{y==null||y.interpolate((X==null?void 0:X.interpolate)==="linear"?Yr:Fs).transform(wd(v,X==null?void 0:X.duration,X==null?void 0:X.ease,()=>te(!0)),Q)}):Promise.resolve(!1)}function E({noWheelClassName:Q,noPanClassName:X,onPaneContextMenu:te,userSelectionActive:D,panOnScroll:G,panOnDrag:z,panOnScrollMode:B,panOnScrollSpeed:O,preventScrolling:$,zoomOnPinch:J,zoomOnScroll:R,zoomOnDoubleClick:Y,zoomActivationKeyPressed:P,lib:ee,onTransformChange:se,connectionInProgress:ue,paneClickDistance:oe,selectionOnDrag:ce}){D&&!m.isZoomingOrPanning&&C();const fe=G&&!P&&!D;y.clickDistance(ce?1/0:!un(oe)||oe<0?0:oe);const we=fe?w3({zoomPanValues:m,noWheelClassName:Q,d3Selection:v,d3Zoom:y,panOnScrollMode:B,panOnScrollSpeed:O,zoomOnPinch:J,onPanZoomStart:u,onPanZoom:c,onPanZoomEnd:h}):S3({noWheelClassName:Q,preventScrolling:$,d3ZoomHandler:w});if(v.on("wheel.zoom",we,{passive:!1}),!D){const ge=E3({zoomPanValues:m,onDraggingChange:p,onPanZoomStart:u});y.on("start",ge);const ye=N3({zoomPanValues:m,panOnDrag:z,onPaneContextMenu:!!te,onPanZoom:c,onTransformChange:se});y.on("zoom",ye);const Ce=_3({zoomPanValues:m,panOnDrag:z,panOnScroll:G,onPaneContextMenu:te,onPanZoomEnd:h,onDraggingChange:p});y.on("end",Ce)}const ve=C3({zoomActivationKeyPressed:P,panOnDrag:z,zoomOnScroll:R,panOnScroll:G,zoomOnDoubleClick:Y,zoomOnPinch:J,userSelectionActive:D,noPanClassName:X,noWheelClassName:Q,lib:ee,connectionInProgress:ue});y.filter(ve),Y?v.on("dblclick.zoom",S):v.on("dblclick.zoom",null)}function C(){y.on("zoom",null)}async function j(Q,X,te){const D=bd(Q),G=y==null?void 0:y.constrain()(D,X,te);return G&&await _(G),new Promise(z=>z(G))}async function N(Q,X){const te=bd(Q);return await _(te,X),new Promise(D=>D(te))}function A(Q){if(v){const X=bd(Q),te=v.property("__zoom");(te.k!==Q.zoom||te.x!==Q.x||te.y!==Q.y)&&(y==null||y.transform(v,X,null,{sync:!0}))}}function H(){const Q=v?Uv(v.node()):{x:0,y:0,k:1};return{x:Q.x,y:Q.y,zoom:Q.k}}function k(Q,X){return v?new Promise(te=>{y==null||y.interpolate((X==null?void 0:X.interpolate)==="linear"?Yr:Fs).scaleTo(wd(v,X==null?void 0:X.duration,X==null?void 0:X.ease,()=>te(!0)),Q)}):Promise.resolve(!1)}function L(Q,X){return v?new Promise(te=>{y==null||y.interpolate((X==null?void 0:X.interpolate)==="linear"?Yr:Fs).scaleBy(wd(v,X==null?void 0:X.duration,X==null?void 0:X.ease,()=>te(!0)),Q)}):Promise.resolve(!1)}function V(Q){y==null||y.scaleExtent(Q)}function Z(Q){y==null||y.translateExtent(Q)}function le(Q){const X=!un(Q)||Q<0?0:Q;y==null||y.clickDistance(X)}return{update:E,destroy:C,setViewport:N,setViewportConstrained:j,getViewport:H,scaleTo:k,scaleBy:L,setScaleExtent:V,setTranslateExtent:Z,syncViewport:A,setClickDistance:le}}var Oa;(function(t){t.Line="line",t.Handle="handle"})(Oa||(Oa={}));function A3({width:t,prevWidth:i,height:a,prevHeight:r,affectsX:s,affectsY:c}){const u=t-i,h=a-r,p=[u>0?1:u<0?-1:0,h>0?1:h<0?-1:0];return u&&s&&(p[0]=p[0]*-1),h&&c&&(p[1]=p[1]*-1),p}function My(t){const i=t.includes("right")||t.includes("left"),a=t.includes("bottom")||t.includes("top"),r=t.includes("left"),s=t.includes("top");return{isHorizontal:i,isVertical:a,affectsX:r,affectsY:s}}function Vi(t,i){return Math.max(0,i-t)}function $i(t,i){return Math.max(0,t-i)}function qs(t,i,a){return Math.max(0,i-t,t-a)}function jy(t,i){return t?!i:i}function M3(t,i,a,r,s,c,u,h){let{affectsX:p,affectsY:m}=i;const{isHorizontal:x,isVertical:y}=i,v=x&&y,{xSnapped:w,ySnapped:S}=a,{minWidth:_,maxWidth:E,minHeight:C,maxHeight:j}=r,{x:N,y:A,width:H,height:k,aspectRatio:L}=t;let V=Math.floor(x?w-t.pointerX:0),Z=Math.floor(y?S-t.pointerY:0);const le=H+(p?-V:V),Q=k+(m?-Z:Z),X=-c[0]*H,te=-c[1]*k;let D=qs(le,_,E),G=qs(Q,C,j);if(u){let O=0,$=0;p&&V<0?O=Vi(N+V+X,u[0][0]):!p&&V>0&&(O=$i(N+le+X,u[1][0])),m&&Z<0?$=Vi(A+Z+te,u[0][1]):!m&&Z>0&&($=$i(A+Q+te,u[1][1])),D=Math.max(D,O),G=Math.max(G,$)}if(h){let O=0,$=0;p&&V>0?O=$i(N+V,h[0][0]):!p&&V<0&&(O=Vi(N+le,h[1][0])),m&&Z>0?$=$i(A+Z,h[0][1]):!m&&Z<0&&($=Vi(A+Q,h[1][1])),D=Math.max(D,O),G=Math.max(G,$)}if(s){if(x){const O=qs(le/L,C,j)*L;if(D=Math.max(D,O),u){let $=0;!p&&!m||p&&!m&&v?$=$i(A+te+le/L,u[1][1])*L:$=Vi(A+te+(p?V:-V)/L,u[0][1])*L,D=Math.max(D,$)}if(h){let $=0;!p&&!m||p&&!m&&v?$=Vi(A+le/L,h[1][1])*L:$=$i(A+(p?V:-V)/L,h[0][1])*L,D=Math.max(D,$)}}if(y){const O=qs(Q*L,_,E)/L;if(G=Math.max(G,O),u){let $=0;!p&&!m||m&&!p&&v?$=$i(N+Q*L+X,u[1][0])/L:$=Vi(N+(m?Z:-Z)*L+X,u[0][0])/L,G=Math.max(G,$)}if(h){let $=0;!p&&!m||m&&!p&&v?$=Vi(N+Q*L,h[1][0])/L:$=$i(N+(m?Z:-Z)*L,h[0][0])/L,G=Math.max(G,$)}}}Z=Z+(Z<0?G:-G),V=V+(V<0?D:-D),s&&(v?le>Q*L?Z=(jy(p,m)?-V:V)/L:V=(jy(p,m)?-Z:Z)*L:x?(Z=V/L,m=p):(V=Z*L,p=m));const z=p?N+V:N,B=m?A+Z:A;return{width:H+(p?-V:V),height:k+(m?-Z:Z),x:c[0]*V*(p?-1:1)+z,y:c[1]*Z*(m?-1:1)+B}}const p1={width:0,height:0,x:0,y:0},j3={...p1,pointerX:0,pointerY:0,aspectRatio:1};function z3(t){return[[0,0],[t.measured.width,t.measured.height]]}function R3(t,i,a){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=a[0]*c,p=a[1]*u;return[[r-h,s-p],[r+c-h,s+u-p]]}function O3({domNode:t,nodeId:i,getStoreItems:a,onChange:r,onEnd:s}){const c=Gt(t);let u={controlDirection:My("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function h({controlPosition:m,boundaries:x,keepAspectRatio:y,resizeDirection:v,onResizeStart:w,onResize:S,onResizeEnd:_,shouldResize:E}){let C={...p1},j={...j3};u={boundaries:x,resizeDirection:v,keepAspectRatio:y,controlDirection:My(m)};let N,A=null,H=[],k,L,V,Z=!1;const le=_v().on("start",Q=>{const{nodeLookup:X,transform:te,snapGrid:D,snapToGrid:G,nodeOrigin:z,paneDomNode:B}=a();if(N=X.get(i),!N)return;A=(B==null?void 0:B.getBoundingClientRect())??null;const{xSnapped:O,ySnapped:$}=qr(Q.sourceEvent,{transform:te,snapGrid:D,snapToGrid:G,containerBounds:A});C={width:N.measured.width??0,height:N.measured.height??0,x:N.position.x??0,y:N.position.y??0},j={...C,pointerX:O,pointerY:$,aspectRatio:C.width/C.height},k=void 0,N.parentId&&(N.extent==="parent"||N.expandParent)&&(k=X.get(N.parentId),L=k&&N.extent==="parent"?z3(k):void 0),H=[],V=void 0;for(const[J,R]of X)if(R.parentId===i&&(H.push({id:J,position:{...R.position},extent:R.extent}),R.extent==="parent"||R.expandParent)){const Y=R3(R,N,R.origin??z);V?V=[[Math.min(Y[0][0],V[0][0]),Math.min(Y[0][1],V[0][1])],[Math.max(Y[1][0],V[1][0]),Math.max(Y[1][1],V[1][1])]]:V=Y}w==null||w(Q,{...C})}).on("drag",Q=>{const{transform:X,snapGrid:te,snapToGrid:D,nodeOrigin:G}=a(),z=qr(Q.sourceEvent,{transform:X,snapGrid:te,snapToGrid:D,containerBounds:A}),B=[];if(!N)return;const{x:O,y:$,width:J,height:R}=C,Y={},P=N.origin??G,{width:ee,height:se,x:ue,y:oe}=M3(j,u.controlDirection,z,u.boundaries,u.keepAspectRatio,P,L,V),ce=ee!==J,fe=se!==R,we=ue!==O&&ce,ve=oe!==$&&fe;if(!we&&!ve&&!ce&&!fe)return;if((we||ve||P[0]===1||P[1]===1)&&(Y.x=we?ue:C.x,Y.y=ve?oe:C.y,C.x=Y.x,C.y=Y.y,H.length>0)){const Ue=ue-O,je=oe-$;for(const nt of H)nt.position={x:nt.position.x-Ue+P[0]*(ee-J),y:nt.position.y-je+P[1]*(se-R)},B.push(nt)}if((ce||fe)&&(Y.width=ce&&(!u.resizeDirection||u.resizeDirection==="horizontal")?ee:C.width,Y.height=fe&&(!u.resizeDirection||u.resizeDirection==="vertical")?se:C.height,C.width=Y.width,C.height=Y.height),k&&N.expandParent){const Ue=P[0]*(Y.width??0);Y.x&&Y.x<Ue&&(C.x=Ue,j.x=j.x-(Y.x-Ue));const je=P[1]*(Y.height??0);Y.y&&Y.y<je&&(C.y=je,j.y=j.y-(Y.y-je))}const ge=A3({width:C.width,prevWidth:J,height:C.height,prevHeight:R,affectsX:u.controlDirection.affectsX,affectsY:u.controlDirection.affectsY}),ye={...C,direction:ge};(E==null?void 0:E(Q,ye))!==!1&&(Z=!0,S==null||S(Q,ye),r(Y,B))}).on("end",Q=>{Z&&(_==null||_(Q,{...C}),s==null||s({...C}),Z=!1)});c.call(le)}function p(){c.on(".drag",null)}return{update:h,destroy:p}}var Sd={exports:{}},Ed={},Nd={exports:{}},_d={};/**
330
+ * @license React
331
+ * use-sync-external-store-shim.production.js
332
+ *
333
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
334
+ *
335
+ * This source code is licensed under the MIT license found in the
336
+ * LICENSE file in the root directory of this source tree.
337
+ */var zy;function D3(){if(zy)return _d;zy=1;var t=to();function i(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var a=typeof Object.is=="function"?Object.is:i,r=t.useState,s=t.useEffect,c=t.useLayoutEffect,u=t.useDebugValue;function h(y,v){var w=v(),S=r({inst:{value:w,getSnapshot:v}}),_=S[0].inst,E=S[1];return c(function(){_.value=w,_.getSnapshot=v,p(_)&&E({inst:_})},[y,w,v]),s(function(){return p(_)&&E({inst:_}),y(function(){p(_)&&E({inst:_})})},[y]),u(w),w}function p(y){var v=y.getSnapshot;y=y.value;try{var w=v();return!a(y,w)}catch{return!0}}function m(y,v){return v()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return _d.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:x,_d}var Ry;function k3(){return Ry||(Ry=1,Nd.exports=D3()),Nd.exports}/**
338
+ * @license React
339
+ * use-sync-external-store-shim/with-selector.production.js
340
+ *
341
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
342
+ *
343
+ * This source code is licensed under the MIT license found in the
344
+ * LICENSE file in the root directory of this source tree.
345
+ */var Oy;function L3(){if(Oy)return Ed;Oy=1;var t=to(),i=k3();function a(m,x){return m===x&&(m!==0||1/m===1/x)||m!==m&&x!==x}var r=typeof Object.is=="function"?Object.is:a,s=i.useSyncExternalStore,c=t.useRef,u=t.useEffect,h=t.useMemo,p=t.useDebugValue;return Ed.useSyncExternalStoreWithSelector=function(m,x,y,v,w){var S=c(null);if(S.current===null){var _={hasValue:!1,value:null};S.current=_}else _=S.current;S=h(function(){function C(k){if(!j){if(j=!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 V=v(k);return w!==void 0&&w(L,V)?(N=k,L):(N=k,A=V)}var j=!1,N,A,H=y===void 0?null:y;return[function(){return C(x())},H===null?void 0:function(){return C(H())}]},[x,y,v,w]);var E=s(m,S[0],S[1]);return u(function(){_.hasValue=!0,_.value=E},[E]),p(E),E},Ed}var Dy;function H3(){return Dy||(Dy=1,Sd.exports=L3()),Sd.exports}var B3=H3();const U3=oh(B3),V3={},ky=t=>{let i;const a=new Set,r=(x,y)=>{const v=typeof x=="function"?x(i):x;if(!Object.is(v,i)){const w=i;i=y??(typeof v!="object"||v===null)?v:Object.assign({},i,v),a.forEach(S=>S(i,w))}},s=()=>i,p={setState:r,getState:s,getInitialState:()=>m,subscribe:x=>(a.add(x),()=>a.delete(x)),destroy:()=>{(V3?"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."),a.clear()}},m=i=t(r,s,p);return p},$3=t=>t?ky(t):ky,{useDebugValue:Y3}=qt,{useSyncExternalStoreWithSelector:q3}=U3,X3=t=>t;function g1(t,i=X3,a){const r=q3(t.subscribe,t.getState,t.getServerState||t.getInitialState,i,a);return Y3(r),r}const Ly=(t,i)=>{const a=$3(t),r=(s,c=i)=>g1(a,s,c);return Object.assign(r,a),r},G3=(t,i)=>t?Ly(t,i):Ly;function Fe(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 a=Object.keys(t);if(a.length!==Object.keys(i).length)return!1;for(const r of a)if(!Object.prototype.hasOwnProperty.call(i,r)||!Object.is(t[r],i[r]))return!1;return!0}var Tc=Ax();const Z3=oh(Tc),Ac=T.createContext(null),Q3=Ac.Provider,y1=Cn.error001();function Le(t,i){const a=T.useContext(Ac);if(a===null)throw new Error(y1);return g1(a,t,i)}function Ie(){const t=T.useContext(Ac);if(t===null)throw new Error(y1);return T.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const Hy={display:"none"},K3={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},x1="react-flow__node-desc",v1="react-flow__edge-desc",P3="react-flow__aria-live",F3=t=>t.ariaLiveMessage,I3=t=>t.ariaLabelConfig;function J3({rfId:t}){const i=Le(F3);return g.jsx("div",{id:`${P3}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:K3,children:i})}function W3({rfId:t,disableKeyboardA11y:i}){const a=Le(I3);return g.jsxs(g.Fragment,{children:[g.jsx("div",{id:`${x1}-${t}`,style:Hy,children:i?a["node.a11yDescription.default"]:a["node.a11yDescription.keyboardDisabled"]}),g.jsx("div",{id:`${v1}-${t}`,style:Hy,children:a["edge.a11yDescription.default"]}),!i&&g.jsx(J3,{rfId:t})]})}const Mc=T.forwardRef(({position:t="top-left",children:i,className:a,style:r,...s},c)=>{const u=`${t}`.split("-");return g.jsx("div",{className:st(["react-flow__panel",a,...u]),style:r,ref:c,...s,children:i})});Mc.displayName="Panel";function eT({proOptions:t,position:i="bottom-right"}){return t!=null&&t.hideAttribution?null:g.jsx(Mc,{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:g.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const tT=t=>{const i=[],a=[];for(const[,r]of t.nodeLookup)r.selected&&i.push(r.internals.userNode);for(const[,r]of t.edgeLookup)r.selected&&a.push(r);return{selectedNodes:i,selectedEdges:a}},Xs=t=>t.id;function nT(t,i){return Fe(t.selectedNodes.map(Xs),i.selectedNodes.map(Xs))&&Fe(t.selectedEdges.map(Xs),i.selectedEdges.map(Xs))}function iT({onSelectionChange:t}){const i=Ie(),{selectedNodes:a,selectedEdges:r}=Le(tT,nT);return T.useEffect(()=>{const s={nodes:a,edges:r};t==null||t(s),i.getState().onSelectionChangeHandlers.forEach(c=>c(s))},[a,r,t]),null}const lT=t=>!!t.onSelectionChangeHandlers;function aT({onSelectionChange:t}){const i=Le(lT);return t||i?g.jsx(iT,{onSelectionChange:t}):null}const b1=[0,0],rT={x:0,y:0,zoom:1},oT=["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"],By=[...oT,"rfId"],sT=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}),Uy={translateExtent:Pr,nodeOrigin:b1,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function cT(t){const{setNodes:i,setEdges:a,setMinZoom:r,setMaxZoom:s,setTranslateExtent:c,setNodeExtent:u,reset:h,setDefaultNodesAndEdges:p}=Le(sT,Fe),m=Ie();T.useEffect(()=>(p(t.defaultNodes,t.defaultEdges),()=>{x.current=Uy,h()}),[]);const x=T.useRef(Uy);return T.useEffect(()=>{for(const y of By){const v=t[y],w=x.current[y];v!==w&&(typeof t[y]>"u"||(y==="nodes"?i(v):y==="edges"?a(v):y==="minZoom"?r(v):y==="maxZoom"?s(v):y==="translateExtent"?c(v):y==="nodeExtent"?u(v):y==="ariaLabelConfig"?m.setState({ariaLabelConfig:GC(v)}):y==="fitView"?m.setState({fitViewQueued:v}):y==="fitViewOptions"?m.setState({fitViewOptions:v}):m.setState({[y]:v})))}x.current=t},By.map(y=>t[y])),null}function Vy(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function uT(t){var r;const[i,a]=T.useState(t==="system"?null:t);return T.useEffect(()=>{if(t!=="system"){a(t);return}const s=Vy(),c=()=>a(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=Vy())!=null&&r.matches?"dark":"light"}const $y=typeof document<"u"?document:null;function Wr(t=null,i={target:$y,actInsideInputWithModifier:!0}){const[a,r]=T.useState(!1),s=T.useRef(!1),c=T.useRef(new Set([])),[u,h]=T.useMemo(()=>{if(t!==null){const m=(Array.isArray(t)?t:[t]).filter(y=>typeof y=="string").map(y=>y.replace("+",`
346
+ `).replace(`
347
+
348
+ `,`
349
+ +`).split(`
350
+ `)),x=m.reduce((y,v)=>y.concat(...v),[]);return[m,x]}return[[],[]]},[t]);return T.useEffect(()=>{const p=(i==null?void 0:i.target)??$y,m=(i==null?void 0:i.actInsideInputWithModifier)??!0;if(t!==null){const x=w=>{var E,C;if(s.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!s.current||s.current&&!m)&&Wv(w))return!1;const _=qy(w.code,h);if(c.current.add(w[_]),Yy(u,c.current,!1)){const j=((C=(E=w.composedPath)==null?void 0:E.call(w))==null?void 0:C[0])||w.target,N=(j==null?void 0:j.nodeName)==="BUTTON"||(j==null?void 0:j.nodeName)==="A";i.preventDefault!==!1&&(s.current||!N)&&w.preventDefault(),r(!0)}},y=w=>{const S=qy(w.code,h);Yy(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 p==null||p.addEventListener("keydown",x),p==null||p.addEventListener("keyup",y),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{p==null||p.removeEventListener("keydown",x),p==null||p.removeEventListener("keyup",y),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[t,r]),a}function Yy(t,i,a){return t.filter(r=>a||r.length===i.size).some(r=>r.every(s=>i.has(s)))}function qy(t,i){return i.includes(t)?"code":"key"}const fT=()=>{const t=Ie();return T.useMemo(()=>({zoomIn:i=>{const{panZoom:a}=t.getState();return a?a.scaleBy(1.2,{duration:i==null?void 0:i.duration}):Promise.resolve(!1)},zoomOut:i=>{const{panZoom:a}=t.getState();return a?a.scaleBy(1/1.2,{duration:i==null?void 0:i.duration}):Promise.resolve(!1)},zoomTo:(i,a)=>{const{panZoom:r}=t.getState();return r?r.scaleTo(i,{duration:a==null?void 0:a.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(i,a)=>{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},a),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[i,a,r]=t.getState().transform;return{x:i,y:a,zoom:r}},setCenter:async(i,a,r)=>t.getState().setCenter(i,a,r),fitBounds:async(i,a)=>{const{width:r,height:s,minZoom:c,maxZoom:u,panZoom:h}=t.getState(),p=Ch(i,r,s,c,u,(a==null?void 0:a.padding)??.1);return h?(await h.setViewport(p,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(i,a={})=>{const{transform:r,snapGrid:s,snapToGrid:c,domNode:u}=t.getState();if(!u)return i;const{x:h,y:p}=u.getBoundingClientRect(),m={x:i.x-h,y:i.y-p},x=a.snapGrid??s,y=a.snapToGrid??c;return oo(m,r,y,x)},flowToScreenPosition:i=>{const{transform:a,domNode:r}=t.getState();if(!r)return i;const{x:s,y:c}=r.getBoundingClientRect(),u=fc(i,a);return{x:u.x+s,y:u.y+c}}}),[])};function w1(t,i){const a=[],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){a.push(c);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){a.push({...u[0].item});continue}const h={...c};for(const p of u)dT(p,h);a.push(h)}return s.length&&s.forEach(c=>{c.index!==void 0?a.splice(c.index,0,{...c.item}):a.push({...c.item})}),a}function dT(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 hT(t,i){return w1(t,i)}function mT(t,i){return w1(t,i)}function Sl(t,i){return{id:t,type:"select",selected:i}}function Sa(t,i=new Set,a=!1){const r=[];for(const[s,c]of t){const u=i.has(s);!(c.selected===void 0&&!u)&&c.selected!==u&&(a&&(c.selected=u),r.push(Sl(c.id,u)))}return r}function Xy({items:t=[],lookup:i}){var s;const a=[],r=new Map(t.map(c=>[c.id,c]));for(const[c,u]of t.entries()){const h=i.get(u.id),p=((s=h==null?void 0:h.internals)==null?void 0:s.userNode)??h;p!==void 0&&p!==u&&a.push({id:u.id,item:u,type:"replace"}),p===void 0&&a.push({item:u,type:"add",index:c})}for(const[c]of i)r.get(c)===void 0&&a.push({id:c,type:"remove"});return a}function Gy(t){return{id:t.id,type:"remove"}}const Zy=t=>kC(t),pT=t=>Gv(t);function S1(t){return T.forwardRef(t)}const gT=typeof window<"u"?T.useLayoutEffect:T.useEffect;function Qy(t){const[i,a]=T.useState(BigInt(0)),[r]=T.useState(()=>yT(()=>a(s=>s+BigInt(1))));return gT(()=>{const s=r.get();s.length&&(t(s),r.reset())},[i]),r}function yT(t){let i=[];return{get:()=>i,reset:()=>{i=[]},push:a=>{i.push(a),t()}}}const E1=T.createContext(null);function xT({children:t}){const i=Ie(),a=T.useCallback(h=>{const{nodes:p=[],setNodes:m,hasDefaultNodes:x,onNodesChange:y,nodeLookup:v,fitViewQueued:w,onNodesChangeMiddlewareMap:S}=i.getState();let _=p;for(const C of h)_=typeof C=="function"?C(_):C;let E=Xy({items:_,lookup:v});for(const C of S.values())E=C(E);x&&m(_),E.length>0?y==null||y(E):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:C,nodes:j,setNodes:N}=i.getState();C&&N(j)})},[]),r=Qy(a),s=T.useCallback(h=>{const{edges:p=[],setEdges:m,hasDefaultEdges:x,onEdgesChange:y,edgeLookup:v}=i.getState();let w=p;for(const S of h)w=typeof S=="function"?S(w):S;x?m(w):y&&y(Xy({items:w,lookup:v}))},[]),c=Qy(s),u=T.useMemo(()=>({nodeQueue:r,edgeQueue:c}),[]);return g.jsx(E1.Provider,{value:u,children:t})}function vT(){const t=T.useContext(E1);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const bT=t=>!!t.panZoom;function Oh(){const t=fT(),i=Ie(),a=vT(),r=Le(bT),s=T.useMemo(()=>{const c=y=>i.getState().nodeLookup.get(y),u=y=>{a.nodeQueue.push(y)},h=y=>{a.edgeQueue.push(y)},p=y=>{var C,j;const{nodeLookup:v,nodeOrigin:w}=i.getState(),S=Zy(y)?y:v.get(y.id),_=S.parentId?Iv(S.position,S.measured,S.parentId,v,w):S.position,E={...S,position:_,width:((C=S.measured)==null?void 0:C.width)??S.width,height:((j=S.measured)==null?void 0:j.height)??S.height};return za(E)},m=(y,v,w={replace:!1})=>{u(S=>S.map(_=>{if(_.id===y){const E=typeof v=="function"?v(_):v;return w.replace&&Zy(E)?E:{..._,...E}}return _}))},x=(y,v,w={replace:!1})=>{h(S=>S.map(_=>{if(_.id===y){const E=typeof v=="function"?v(_):v;return w.replace&&pT(E)?E:{..._,...E}}return _}))};return{getNodes:()=>i.getState().nodes.map(y=>({...y})),getNode:y=>{var v;return(v=c(y))==null?void 0:v.internals.userNode},getInternalNode:c,getEdges:()=>{const{edges:y=[]}=i.getState();return y.map(v=>({...v}))},getEdge:y=>i.getState().edgeLookup.get(y),setNodes:u,setEdges:h,addNodes:y=>{const v=Array.isArray(y)?y:[y];a.nodeQueue.push(w=>[...w,...v])},addEdges:y=>{const v=Array.isArray(y)?y:[y];a.edgeQueue.push(w=>[...w,...v])},toObject:()=>{const{nodes:y=[],edges:v=[],transform:w}=i.getState(),[S,_,E]=w;return{nodes:y.map(C=>({...C})),edges:v.map(C=>({...C})),viewport:{x:S,y:_,zoom:E}}},deleteElements:async({nodes:y=[],edges:v=[]})=>{const{nodes:w,edges:S,onNodesDelete:_,onEdgesDelete:E,triggerNodeChanges:C,triggerEdgeChanges:j,onDelete:N,onBeforeDelete:A}=i.getState(),{nodes:H,edges:k}=await VC({nodesToRemove:y,edgesToRemove:v,nodes:w,edges:S,onBeforeDelete:A}),L=k.length>0,V=H.length>0;if(L){const Z=k.map(Gy);E==null||E(k),j(Z)}if(V){const Z=H.map(Gy);_==null||_(H),C(Z)}return(V||L)&&(N==null||N({nodes:H,edges:k})),{deletedNodes:H,deletedEdges:k}},getIntersectingNodes:(y,v=!0,w)=>{const S=xy(y),_=S?y:p(y),E=w!==void 0;return _?(w||i.getState().nodes).filter(C=>{const j=i.getState().nodeLookup.get(C.id);if(j&&!S&&(C.id===y.id||!j.internals.positionAbsolute))return!1;const N=za(E?C:j),A=Ir(N,_);return v&&A>0||A>=N.width*N.height||A>=_.width*_.height}):[]},isNodeIntersecting:(y,v,w=!0)=>{const _=xy(y)?y:p(y);if(!_)return!1;const E=Ir(_,v);return w&&E>0||E>=v.width*v.height||E>=_.width*_.height},updateNode:m,updateNodeData:(y,v,w={replace:!1})=>{m(y,S=>{const _=typeof v=="function"?v(S):v;return w.replace?{...S,data:_}:{...S,data:{...S.data,..._}}},w)},updateEdge:x,updateEdgeData:(y,v,w={replace:!1})=>{x(y,S=>{const _=typeof v=="function"?v(S):v;return w.replace?{...S,data:_}:{...S,data:{...S.data,..._}}},w)},getNodesBounds:y=>{const{nodeLookup:v,nodeOrigin:w}=i.getState();return LC(y,{nodeLookup:v,nodeOrigin:w})},getHandleConnections:({type:y,id:v,nodeId:w})=>{var S;return Array.from(((S=i.getState().connectionLookup.get(`${w}-${y}${v?`-${v}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:y,handleId:v,nodeId:w})=>{var S;return Array.from(((S=i.getState().connectionLookup.get(`${w}${y?v?`-${y}-${v}`:`-${y}`:""}`))==null?void 0:S.values())??[])},fitView:async y=>{const v=i.getState().fitViewResolver??XC();return i.setState({fitViewQueued:!0,fitViewOptions:y,fitViewResolver:v}),a.nodeQueue.push(w=>[...w]),v.promise}}},[]);return T.useMemo(()=>({...s,...t,viewportInitialized:r}),[r])}const Ky=t=>t.selected,wT=typeof window<"u"?window:void 0;function ST({deleteKeyCode:t,multiSelectionKeyCode:i}){const a=Ie(),{deleteElements:r}=Oh(),s=Wr(t,{actInsideInputWithModifier:!1}),c=Wr(i,{target:wT});T.useEffect(()=>{if(s){const{edges:u,nodes:h}=a.getState();r({nodes:h.filter(Ky),edges:u.filter(Ky)}),a.setState({nodesSelectionActive:!1})}},[s]),T.useEffect(()=>{a.setState({multiSelectionActive:c})},[c])}function ET(t){const i=Ie();T.useEffect(()=>{const a=()=>{var s,c,u,h;if(!t.current||!(((c=(s=t.current).checkVisibility)==null?void 0:c.call(s))??!0))return!1;const r=Th(t.current);(r.height===0||r.width===0)&&((h=(u=i.getState()).onError)==null||h.call(u,"004",Cn.error004())),i.setState({width:r.width||500,height:r.height||500})};if(t.current){a(),window.addEventListener("resize",a);const r=new ResizeObserver(()=>a());return r.observe(t.current),()=>{window.removeEventListener("resize",a),r&&t.current&&r.unobserve(t.current)}}},[])}const jc={position:"absolute",width:"100%",height:"100%",top:0,left:0},NT=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function _T({onPaneContextMenu:t,zoomOnScroll:i=!0,zoomOnPinch:a=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:c=_l.Free,zoomOnDoubleClick:u=!0,panOnDrag:h=!0,defaultViewport:p,translateExtent:m,minZoom:x,maxZoom:y,zoomActivationKeyCode:v,preventScrolling:w=!0,children:S,noWheelClassName:_,noPanClassName:E,onViewportChange:C,isControlledViewport:j,paneClickDistance:N,selectionOnDrag:A}){const H=Ie(),k=T.useRef(null),{userSelectionActive:L,lib:V,connectionInProgress:Z}=Le(NT,Fe),le=Wr(v),Q=T.useRef();ET(k);const X=T.useCallback(te=>{C==null||C({x:te[0],y:te[1],zoom:te[2]}),j||H.setState({transform:te})},[C,j]);return T.useEffect(()=>{if(k.current){Q.current=T3({domNode:k.current,minZoom:x,maxZoom:y,translateExtent:m,viewport:p,onDraggingChange:z=>H.setState({paneDragging:z}),onPanZoomStart:(z,B)=>{const{onViewportChangeStart:O,onMoveStart:$}=H.getState();$==null||$(z,B),O==null||O(B)},onPanZoom:(z,B)=>{const{onViewportChange:O,onMove:$}=H.getState();$==null||$(z,B),O==null||O(B)},onPanZoomEnd:(z,B)=>{const{onViewportChangeEnd:O,onMoveEnd:$}=H.getState();$==null||$(z,B),O==null||O(B)}});const{x:te,y:D,zoom:G}=Q.current.getViewport();return H.setState({panZoom:Q.current,transform:[te,D,G],domNode:k.current.closest(".react-flow")}),()=>{var z;(z=Q.current)==null||z.destroy()}}},[]),T.useEffect(()=>{var te;(te=Q.current)==null||te.update({onPaneContextMenu:t,zoomOnScroll:i,zoomOnPinch:a,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:c,zoomOnDoubleClick:u,panOnDrag:h,zoomActivationKeyPressed:le,preventScrolling:w,noPanClassName:E,userSelectionActive:L,noWheelClassName:_,lib:V,onTransformChange:X,connectionInProgress:Z,selectionOnDrag:A,paneClickDistance:N})},[t,i,a,r,s,c,u,h,le,w,E,L,_,V,X,Z,A,N]),g.jsx("div",{className:"react-flow__renderer",ref:k,style:jc,children:S})}const CT=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function TT(){const{userSelectionActive:t,userSelectionRect:i}=Le(CT,Fe);return t&&i?g.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 Cd=(t,i)=>a=>{a.target===i.current&&(t==null||t(a))},AT=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function MT({isSelecting:t,selectionKeyPressed:i,selectionMode:a=Fr.Full,panOnDrag:r,paneClickDistance:s,selectionOnDrag:c,onSelectionStart:u,onSelectionEnd:h,onPaneClick:p,onPaneContextMenu:m,onPaneScroll:x,onPaneMouseEnter:y,onPaneMouseMove:v,onPaneMouseLeave:w,children:S}){const _=Ie(),{userSelectionActive:E,elementsSelectable:C,dragging:j,connectionInProgress:N}=Le(AT,Fe),A=C&&(t||E),H=T.useRef(null),k=T.useRef(),L=T.useRef(new Set),V=T.useRef(new Set),Z=T.useRef(!1),le=O=>{if(Z.current||N){Z.current=!1;return}p==null||p(O),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},Q=O=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){O.preventDefault();return}m==null||m(O)},X=x?O=>x(O):void 0,te=O=>{Z.current&&(O.stopPropagation(),Z.current=!1)},D=O=>{var se,ue;const{domNode:$}=_.getState();if(k.current=$==null?void 0:$.getBoundingClientRect(),!k.current)return;const J=O.target===H.current;if(!J&&!!O.target.closest(".nokey")||!t||!(c&&J||i)||O.button!==0||!O.isPrimary)return;(ue=(se=O.target)==null?void 0:se.setPointerCapture)==null||ue.call(se,O.pointerId),Z.current=!1;const{x:P,y:ee}=fn(O.nativeEvent,k.current);_.setState({userSelectionRect:{width:0,height:0,startX:P,startY:ee,x:P,y:ee}}),J||(O.stopPropagation(),O.preventDefault())},G=O=>{const{userSelectionRect:$,transform:J,nodeLookup:R,edgeLookup:Y,connectionLookup:P,triggerNodeChanges:ee,triggerEdgeChanges:se,defaultEdgeOptions:ue,resetSelectedElements:oe}=_.getState();if(!k.current||!$)return;const{x:ce,y:fe}=fn(O.nativeEvent,k.current),{startX:we,startY:ve}=$;if(!Z.current){const je=i?0:s;if(Math.hypot(ce-we,fe-ve)<=je)return;oe(),u==null||u(O)}Z.current=!0;const ge={startX:we,startY:ve,x:ce<we?ce:we,y:fe<ve?fe:ve,width:Math.abs(ce-we),height:Math.abs(fe-ve)},ye=L.current,Ce=V.current;L.current=new Set(_h(R,ge,J,a===Fr.Partial,!0).map(je=>je.id)),V.current=new Set;const Ue=(ue==null?void 0:ue.selectable)??!0;for(const je of L.current){const nt=P.get(je);if(nt)for(const{edgeId:kt}of nt.values()){const ht=Y.get(kt);ht&&(ht.selectable??Ue)&&V.current.add(kt)}}if(!vy(ye,L.current)){const je=Sa(R,L.current,!0);ee(je)}if(!vy(Ce,V.current)){const je=Sa(Y,V.current);se(je)}_.setState({userSelectionRect:ge,userSelectionActive:!0,nodesSelectionActive:!1})},z=O=>{var $,J;O.button===0&&((J=($=O.target)==null?void 0:$.releasePointerCapture)==null||J.call($,O.pointerId),!E&&O.target===H.current&&_.getState().userSelectionRect&&(le==null||le(O)),_.setState({userSelectionActive:!1,userSelectionRect:null}),Z.current&&(h==null||h(O),_.setState({nodesSelectionActive:L.current.size>0})))},B=r===!0||Array.isArray(r)&&r.includes(0);return g.jsxs("div",{className:st(["react-flow__pane",{draggable:B,dragging:j,selection:t}]),onClick:A?void 0:Cd(le,H),onContextMenu:Cd(Q,H),onWheel:Cd(X,H),onPointerEnter:A?void 0:y,onPointerMove:A?G:v,onPointerUp:A?z:void 0,onPointerDownCapture:A?D:void 0,onClickCapture:A?te:void 0,onPointerLeave:w,ref:H,style:jc,children:[S,g.jsx(TT,{})]})}function Jd({id:t,store:i,unselect:a=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:c,multiSelectionActive:u,nodeLookup:h,onError:p}=i.getState(),m=h.get(t);if(!m){p==null||p("012",Cn.error012(t));return}i.setState({nodesSelectionActive:!1}),m.selected?(a||m.selected&&u)&&(c({nodes:[m],edges:[]}),requestAnimationFrame(()=>{var x;return(x=r==null?void 0:r.current)==null?void 0:x.blur()})):s([t])}function N1({nodeRef:t,disabled:i=!1,noDragClassName:a,handleSelector:r,nodeId:s,isSelectable:c,nodeClickDistance:u}){const h=Ie(),[p,m]=T.useState(!1),x=T.useRef();return T.useEffect(()=>{x.current=h3({getStoreItems:()=>h.getState(),onNodeMouseDown:y=>{Jd({id:y,store:h,nodeRef:t})},onDragStart:()=>{m(!0)},onDragStop:()=>{m(!1)}})},[]),T.useEffect(()=>{var y,v;if(i)(y=x.current)==null||y.destroy();else if(t.current)return(v=x.current)==null||v.update({noDragClassName:a,handleSelector:r,domNode:t.current,isSelectable:c,nodeId:s,nodeClickDistance:u}),()=>{var w;(w=x.current)==null||w.destroy()}},[a,r,i,c,t,s]),p}const jT=t=>i=>i.selected&&(i.draggable||t&&typeof i.draggable>"u");function _1(){const t=Ie();return T.useCallback(a=>{const{nodeExtent:r,snapToGrid:s,snapGrid:c,nodesDraggable:u,onError:h,updateNodePositions:p,nodeLookup:m,nodeOrigin:x}=t.getState(),y=new Map,v=jT(u),w=s?c[0]:5,S=s?c[1]:5,_=a.direction.x*w*a.factor,E=a.direction.y*S*a.factor;for(const[,C]of m){if(!v(C))continue;let j={x:C.internals.positionAbsolute.x+_,y:C.internals.positionAbsolute.y+E};s&&(j=ro(j,c));const{position:N,positionAbsolute:A}=Zv({nodeId:C.id,nextPosition:j,nodeLookup:m,nodeExtent:r,nodeOrigin:x,onError:h});C.position=N,C.internals.positionAbsolute=A,y.set(C.id,C)}p(y)},[])}const Dh=T.createContext(null),zT=Dh.Provider;Dh.Consumer;const C1=()=>T.useContext(Dh),RT=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),OT=(t,i,a)=>r=>{const{connectionClickStartHandle:s,connectionMode:c,connection:u}=r,{fromHandle:h,toHandle:p,isValid:m}=u,x=(p==null?void 0:p.nodeId)===t&&(p==null?void 0:p.id)===i&&(p==null?void 0:p.type)===a;return{connectingFrom:(h==null?void 0:h.nodeId)===t&&(h==null?void 0:h.id)===i&&(h==null?void 0:h.type)===a,connectingTo:x,clickConnecting:(s==null?void 0:s.nodeId)===t&&(s==null?void 0:s.id)===i&&(s==null?void 0:s.type)===a,isPossibleEndHandle:c===Ma.Strict?(h==null?void 0:h.type)!==a:t!==(h==null?void 0:h.nodeId)||i!==(h==null?void 0:h.id),connectionInProcess:!!h,clickConnectionInProcess:!!s,valid:x&&m}};function DT({type:t="source",position:i=xe.Top,isValidConnection:a,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:c=!0,id:u,onConnect:h,children:p,className:m,onMouseDown:x,onTouchStart:y,...v},w){var G,z;const S=u||null,_=t==="target",E=Ie(),C=C1(),{connectOnClick:j,noPanClassName:N,rfId:A}=Le(RT,Fe),{connectingFrom:H,connectingTo:k,clickConnecting:L,isPossibleEndHandle:V,connectionInProcess:Z,clickConnectionInProcess:le,valid:Q}=Le(OT(C,S,t),Fe);C||(z=(G=E.getState()).onError)==null||z.call(G,"010",Cn.error010());const X=B=>{const{defaultEdgeOptions:O,onConnect:$,hasDefaultEdges:J}=E.getState(),R={...O,...B};if(J){const{edges:Y,setEdges:P}=E.getState();P(IC(R,Y))}$==null||$(R),h==null||h(R)},te=B=>{if(!C)return;const O=e1(B.nativeEvent);if(s&&(O&&B.button===0||!O)){const $=E.getState();Id.onPointerDown(B.nativeEvent,{handleDomNode:B.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:_,handleId:S,nodeId:C,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:$.onConnectEnd,updateConnection:$.updateConnection,onConnect:X,isValidConnection:a||$.isValidConnection,getTransform:()=>E.getState().transform,getFromHandle:()=>E.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}O?x==null||x(B):y==null||y(B)},D=B=>{const{onClickConnectStart:O,onClickConnectEnd:$,connectionClickStartHandle:J,connectionMode:R,isValidConnection:Y,lib:P,rfId:ee,nodeLookup:se,connection:ue}=E.getState();if(!C||!J&&!s)return;if(!J){O==null||O(B.nativeEvent,{nodeId:C,handleId:S,handleType:t}),E.setState({connectionClickStartHandle:{nodeId:C,type:t,id:S}});return}const oe=Jv(B.target),ce=a||Y,{connection:fe,isValid:we}=Id.isValid(B.nativeEvent,{handle:{nodeId:C,id:S,type:t},connectionMode:R,fromNodeId:J.nodeId,fromHandleId:J.id||null,fromType:J.type,isValidConnection:ce,flowId:ee,doc:oe,lib:P,nodeLookup:se});we&&fe&&X(fe);const ve=structuredClone(ue);delete ve.inProgress,ve.toPosition=ve.toHandle?ve.toHandle.position:null,$==null||$(B,ve),E.setState({connectionClickStartHandle:null})};return g.jsx("div",{"data-handleid":S,"data-nodeid":C,"data-handlepos":i,"data-id":`${A}-${C}-${S}-${t}`,className:st(["react-flow__handle",`react-flow__handle-${i}`,"nodrag",N,m,{source:!_,target:_,connectable:r,connectablestart:s,connectableend:c,clickconnecting:L,connectingfrom:H,connectingto:k,valid:Q,connectionindicator:r&&(!Z||V)&&(Z||le?c:s)}]),onMouseDown:te,onTouchStart:te,onClick:j?D:void 0,ref:w,...v,children:p})}const Da=T.memo(S1(DT));function kT({data:t,isConnectable:i,sourcePosition:a=xe.Bottom}){return g.jsxs(g.Fragment,{children:[t==null?void 0:t.label,g.jsx(Da,{type:"source",position:a,isConnectable:i})]})}function LT({data:t,isConnectable:i,targetPosition:a=xe.Top,sourcePosition:r=xe.Bottom}){return g.jsxs(g.Fragment,{children:[g.jsx(Da,{type:"target",position:a,isConnectable:i}),t==null?void 0:t.label,g.jsx(Da,{type:"source",position:r,isConnectable:i})]})}function HT(){return null}function BT({data:t,isConnectable:i,targetPosition:a=xe.Top}){return g.jsxs(g.Fragment,{children:[g.jsx(Da,{type:"target",position:a,isConnectable:i}),t==null?void 0:t.label]})}const dc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Py={input:kT,default:LT,output:BT,group:HT};function UT(t){var i,a,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??((a=t.style)==null?void 0:a.height)}:{width:t.width??((r=t.style)==null?void 0:r.width),height:t.height??((s=t.style)==null?void 0:s.height)}}const VT=t=>{const{width:i,height:a,x:r,y:s}=ao(t.nodeLookup,{filter:c=>!!c.selected});return{width:un(i)?i:null,height:un(a)?a:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${r}px,${s}px)`}};function $T({onSelectionContextMenu:t,noPanClassName:i,disableKeyboardA11y:a}){const r=Ie(),{width:s,height:c,transformString:u,userSelectionActive:h}=Le(VT,Fe),p=_1(),m=T.useRef(null);if(T.useEffect(()=>{var v;a||(v=m.current)==null||v.focus({preventScroll:!0})},[a]),N1({nodeRef:m}),h||!s||!c)return null;const x=t?v=>{const w=r.getState().nodes.filter(S=>S.selected);t(v,w)}:void 0,y=v=>{Object.prototype.hasOwnProperty.call(dc,v.key)&&(v.preventDefault(),p({direction:dc[v.key],factor:v.shiftKey?4:1}))};return g.jsx("div",{className:st(["react-flow__nodesselection","react-flow__container",i]),style:{transform:u},children:g.jsx("div",{ref:m,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:a?void 0:-1,onKeyDown:a?void 0:y,style:{width:s,height:c}})})}const Fy=typeof window<"u"?window:void 0,YT=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function T1({children:t,onPaneClick:i,onPaneMouseEnter:a,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:c,onPaneScroll:u,paneClickDistance:h,deleteKeyCode:p,selectionKeyCode:m,selectionOnDrag:x,selectionMode:y,onSelectionStart:v,onSelectionEnd:w,multiSelectionKeyCode:S,panActivationKeyCode:_,zoomActivationKeyCode:E,elementsSelectable:C,zoomOnScroll:j,zoomOnPinch:N,panOnScroll:A,panOnScrollSpeed:H,panOnScrollMode:k,zoomOnDoubleClick:L,panOnDrag:V,defaultViewport:Z,translateExtent:le,minZoom:Q,maxZoom:X,preventScrolling:te,onSelectionContextMenu:D,noWheelClassName:G,noPanClassName:z,disableKeyboardA11y:B,onViewportChange:O,isControlledViewport:$}){const{nodesSelectionActive:J,userSelectionActive:R}=Le(YT,Fe),Y=Wr(m,{target:Fy}),P=Wr(_,{target:Fy}),ee=P||V,se=P||A,ue=x&&ee!==!0,oe=Y||R||ue;return ST({deleteKeyCode:p,multiSelectionKeyCode:S}),g.jsx(_T,{onPaneContextMenu:c,elementsSelectable:C,zoomOnScroll:j,zoomOnPinch:N,panOnScroll:se,panOnScrollSpeed:H,panOnScrollMode:k,zoomOnDoubleClick:L,panOnDrag:!Y&&ee,defaultViewport:Z,translateExtent:le,minZoom:Q,maxZoom:X,zoomActivationKeyCode:E,preventScrolling:te,noWheelClassName:G,noPanClassName:z,onViewportChange:O,isControlledViewport:$,paneClickDistance:h,selectionOnDrag:ue,children:g.jsxs(MT,{onSelectionStart:v,onSelectionEnd:w,onPaneClick:i,onPaneMouseEnter:a,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:c,onPaneScroll:u,panOnDrag:ee,isSelecting:!!oe,selectionMode:y,selectionKeyPressed:Y,paneClickDistance:h,selectionOnDrag:ue,children:[t,J&&g.jsx($T,{onSelectionContextMenu:D,noPanClassName:z,disableKeyboardA11y:B})]})})}T1.displayName="FlowRenderer";const qT=T.memo(T1),XT=t=>i=>t?_h(i.nodeLookup,{x:0,y:0,width:i.width,height:i.height},i.transform,!0).map(a=>a.id):Array.from(i.nodeLookup.keys());function GT(t){return Le(T.useCallback(XT(t),[t]),Fe)}const ZT=t=>t.updateNodeInternals;function QT(){const t=Le(ZT),[i]=T.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(a=>{const r=new Map;a.forEach(s=>{const c=s.target.getAttribute("data-id");r.set(c,{id:c,nodeElement:s.target,force:!0})}),t(r)}));return T.useEffect(()=>()=>{i==null||i.disconnect()},[i]),i}function KT({node:t,nodeType:i,hasDimensions:a,resizeObserver:r}){const s=Ie(),c=T.useRef(null),u=T.useRef(null),h=T.useRef(t.sourcePosition),p=T.useRef(t.targetPosition),m=T.useRef(i),x=a&&!!t.internals.handleBounds;return T.useEffect(()=>{c.current&&!t.hidden&&(!x||u.current!==c.current)&&(u.current&&(r==null||r.unobserve(u.current)),r==null||r.observe(c.current),u.current=c.current)},[x,t.hidden]),T.useEffect(()=>()=>{u.current&&(r==null||r.unobserve(u.current),u.current=null)},[]),T.useEffect(()=>{if(c.current){const y=m.current!==i,v=h.current!==t.sourcePosition,w=p.current!==t.targetPosition;(y||v||w)&&(m.current=i,h.current=t.sourcePosition,p.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 PT({id:t,onClick:i,onMouseEnter:a,onMouseMove:r,onMouseLeave:s,onContextMenu:c,onDoubleClick:u,nodesDraggable:h,elementsSelectable:p,nodesConnectable:m,nodesFocusable:x,resizeObserver:y,noDragClassName:v,noPanClassName:w,disableKeyboardA11y:S,rfId:_,nodeTypes:E,nodeClickDistance:C,onError:j}){const{node:N,internals:A,isParent:H}=Le(ce=>{const fe=ce.nodeLookup.get(t),we=ce.parentLookup.has(t);return{node:fe,internals:fe.internals,isParent:we}},Fe);let k=N.type||"default",L=(E==null?void 0:E[k])||Py[k];L===void 0&&(j==null||j("003",Cn.error003(k)),k="default",L=(E==null?void 0:E.default)||Py.default);const V=!!(N.draggable||h&&typeof N.draggable>"u"),Z=!!(N.selectable||p&&typeof N.selectable>"u"),le=!!(N.connectable||m&&typeof N.connectable>"u"),Q=!!(N.focusable||x&&typeof N.focusable>"u"),X=Ie(),te=Fv(N),D=KT({node:N,nodeType:k,hasDimensions:te,resizeObserver:y}),G=N1({nodeRef:D,disabled:N.hidden||!V,noDragClassName:v,handleSelector:N.dragHandle,nodeId:t,isSelectable:Z,nodeClickDistance:C}),z=_1();if(N.hidden)return null;const B=si(N),O=UT(N),$=Z||V||i||a||r||s,J=a?ce=>a(ce,{...A.userNode}):void 0,R=r?ce=>r(ce,{...A.userNode}):void 0,Y=s?ce=>s(ce,{...A.userNode}):void 0,P=c?ce=>c(ce,{...A.userNode}):void 0,ee=u?ce=>u(ce,{...A.userNode}):void 0,se=ce=>{const{selectNodesOnDrag:fe,nodeDragThreshold:we}=X.getState();Z&&(!fe||!V||we>0)&&Jd({id:t,store:X,nodeRef:D}),i&&i(ce,{...A.userNode})},ue=ce=>{if(!(Wv(ce.nativeEvent)||S)){if($v.includes(ce.key)&&Z){const fe=ce.key==="Escape";Jd({id:t,store:X,unselect:fe,nodeRef:D})}else if(V&&N.selected&&Object.prototype.hasOwnProperty.call(dc,ce.key)){ce.preventDefault();const{ariaLabelConfig:fe}=X.getState();X.setState({ariaLiveMessage:fe["node.a11yDescription.ariaLiveMessage"]({direction:ce.key.replace("Arrow","").toLowerCase(),x:~~A.positionAbsolute.x,y:~~A.positionAbsolute.y})}),z({direction:dc[ce.key],factor:ce.shiftKey?4:1})}}},oe=()=>{var Ce;if(S||!((Ce=D.current)!=null&&Ce.matches(":focus-visible")))return;const{transform:ce,width:fe,height:we,autoPanOnNodeFocus:ve,setCenter:ge}=X.getState();if(!ve)return;_h(new Map([[t,N]]),{x:0,y:0,width:fe,height:we},ce,!0).length>0||ge(N.position.x+B.width/2,N.position.y+B.height/2,{zoom:ce[2]})};return g.jsx("div",{className:st(["react-flow__node",`react-flow__node-${k}`,{[w]:V},N.className,{selected:N.selected,selectable:Z,parent:H,draggable:V,dragging:G}]),ref:D,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:te?"visible":"hidden",...N.style,...O},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:J,onMouseMove:R,onMouseLeave:Y,onContextMenu:P,onClick:se,onDoubleClick:ee,onKeyDown:Q?ue:void 0,tabIndex:Q?0:void 0,onFocus:Q?oe:void 0,role:N.ariaRole??(Q?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${x1}-${_}`,"aria-label":N.ariaLabel,...N.domAttributes,children:g.jsx(zT,{value:t,children:g.jsx(L,{id:t,data:N.data,type:k,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:N.selected??!1,selectable:Z,draggable:V,deletable:N.deletable??!0,isConnectable:le,sourcePosition:N.sourcePosition,targetPosition:N.targetPosition,dragging:G,dragHandle:N.dragHandle,zIndex:A.z,parentId:N.parentId,...B})})})}var FT=T.memo(PT);const IT=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function A1(t){const{nodesDraggable:i,nodesConnectable:a,nodesFocusable:r,elementsSelectable:s,onError:c}=Le(IT,Fe),u=GT(t.onlyRenderVisibleElements),h=QT();return g.jsx("div",{className:"react-flow__nodes",style:jc,children:u.map(p=>g.jsx(FT,{id:p,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:a,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:t.nodeClickDistance,onError:c},p))})}A1.displayName="NodeRenderer";const JT=T.memo(A1);function WT(t){return Le(T.useCallback(a=>{if(!t)return a.edges.map(s=>s.id);const r=[];if(a.width&&a.height)for(const s of a.edges){const c=a.nodeLookup.get(s.source),u=a.nodeLookup.get(s.target);c&&u&&KC({sourceNode:c,targetNode:u,width:a.width,height:a.height,transform:a.transform})&&r.push(s.id)}return r},[t]),Fe)}const eA=({color:t="none",strokeWidth:i=1})=>{const a={strokeWidth:i,...t&&{stroke:t}};return g.jsx("polyline",{className:"arrow",style:a,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},tA=({color:t="none",strokeWidth:i=1})=>{const a={strokeWidth:i,...t&&{stroke:t,fill:t}};return g.jsx("polyline",{className:"arrowclosed",style:a,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Iy={[cc.Arrow]:eA,[cc.ArrowClosed]:tA};function nA(t){const i=Ie();return T.useMemo(()=>{var s,c;return Object.prototype.hasOwnProperty.call(Iy,t)?Iy[t]:((c=(s=i.getState()).onError)==null||c.call(s,"009",Cn.error009(t)),null)},[t])}const iA=({id:t,type:i,color:a,width:r=12.5,height:s=12.5,markerUnits:c="strokeWidth",strokeWidth:u,orient:h="auto-start-reverse"})=>{const p=nA(i);return p?g.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:g.jsx(p,{color:a,strokeWidth:u})}):null},M1=({defaultColor:t,rfId:i})=>{const a=Le(c=>c.edges),r=Le(c=>c.defaultEdgeOptions),s=T.useMemo(()=>n3(a,{id:i,defaultColor:t,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[a,r,i,t]);return s.length?g.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:g.jsx("defs",{children:s.map(c=>g.jsx(iA,{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};M1.displayName="MarkerDefinitions";var lA=T.memo(M1);function j1({x:t,y:i,label:a,labelStyle:r,labelShowBg:s=!0,labelBgStyle:c,labelBgPadding:u=[2,4],labelBgBorderRadius:h=2,children:p,className:m,...x}){const[y,v]=T.useState({x:1,y:0,width:0,height:0}),w=st(["react-flow__edge-textwrapper",m]),S=T.useRef(null);return T.useEffect(()=>{if(S.current){const _=S.current.getBBox();v({x:_.x,y:_.y,width:_.width,height:_.height})}},[a]),a?g.jsxs("g",{transform:`translate(${t-y.width/2} ${i-y.height/2})`,className:w,visibility:y.width?"visible":"hidden",...x,children:[s&&g.jsx("rect",{width:y.width+2*u[0],x:-u[0],y:-u[1],height:y.height+2*u[1],className:"react-flow__edge-textbg",style:c,rx:h,ry:h}),g.jsx("text",{className:"react-flow__edge-text",y:y.height/2,dy:"0.3em",ref:S,style:r,children:a}),p]}):null}j1.displayName="EdgeText";const aA=T.memo(j1);function zc({path:t,labelX:i,labelY:a,label:r,labelStyle:s,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:p,interactionWidth:m=20,...x}){return g.jsxs(g.Fragment,{children:[g.jsx("path",{...x,d:t,fill:"none",className:st(["react-flow__edge-path",x.className])}),m?g.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:m,className:"react-flow__edge-interaction"}):null,r&&un(i)&&un(a)?g.jsx(aA,{x:i,y:a,label:r,labelStyle:s,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:p}):null]})}function Jy({pos:t,x1:i,y1:a,x2:r,y2:s}){return t===xe.Left||t===xe.Right?[.5*(i+r),a]:[i,.5*(a+s)]}function z1({sourceX:t,sourceY:i,sourcePosition:a=xe.Bottom,targetX:r,targetY:s,targetPosition:c=xe.Top}){const[u,h]=Jy({pos:a,x1:t,y1:i,x2:r,y2:s}),[p,m]=Jy({pos:c,x1:r,y1:s,x2:t,y2:i}),[x,y,v,w]=t1({sourceX:t,sourceY:i,targetX:r,targetY:s,sourceControlX:u,sourceControlY:h,targetControlX:p,targetControlY:m});return[`M${t},${i} C${u},${h} ${p},${m} ${r},${s}`,x,y,v,w]}function R1(t){return T.memo(({id:i,sourceX:a,sourceY:r,targetX:s,targetY:c,sourcePosition:u,targetPosition:h,label:p,labelStyle:m,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:E,interactionWidth:C})=>{const[j,N,A]=z1({sourceX:a,sourceY:r,sourcePosition:u,targetX:s,targetY:c,targetPosition:h}),H=t.isInternal?void 0:i;return g.jsx(zc,{id:H,path:j,labelX:N,labelY:A,label:p,labelStyle:m,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:E,interactionWidth:C})})}const rA=R1({isInternal:!1}),O1=R1({isInternal:!0});rA.displayName="SimpleBezierEdge";O1.displayName="SimpleBezierEdgeInternal";function D1(t){return T.memo(({id:i,sourceX:a,sourceY:r,targetX:s,targetY:c,label:u,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:y,style:v,sourcePosition:w=xe.Bottom,targetPosition:S=xe.Top,markerEnd:_,markerStart:E,pathOptions:C,interactionWidth:j})=>{const[N,A,H]=Kd({sourceX:a,sourceY:r,sourcePosition:w,targetX:s,targetY:c,targetPosition:S,borderRadius:C==null?void 0:C.borderRadius,offset:C==null?void 0:C.offset,stepPosition:C==null?void 0:C.stepPosition}),k=t.isInternal?void 0:i;return g.jsx(zc,{id:k,path:N,labelX:A,labelY:H,label:u,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:y,style:v,markerEnd:_,markerStart:E,interactionWidth:j})})}const k1=D1({isInternal:!1}),L1=D1({isInternal:!0});k1.displayName="SmoothStepEdge";L1.displayName="SmoothStepEdgeInternal";function H1(t){return T.memo(({id:i,...a})=>{var s;const r=t.isInternal?void 0:i;return g.jsx(k1,{...a,id:r,pathOptions:T.useMemo(()=>{var c;return{borderRadius:0,offset:(c=a.pathOptions)==null?void 0:c.offset}},[(s=a.pathOptions)==null?void 0:s.offset])})})}const oA=H1({isInternal:!1}),B1=H1({isInternal:!0});oA.displayName="StepEdge";B1.displayName="StepEdgeInternal";function U1(t){return T.memo(({id:i,sourceX:a,sourceY:r,targetX:s,targetY:c,label:u,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:y,style:v,markerEnd:w,markerStart:S,interactionWidth:_})=>{const[E,C,j]=l1({sourceX:a,sourceY:r,targetX:s,targetY:c}),N=t.isInternal?void 0:i;return g.jsx(zc,{id:N,path:E,labelX:C,labelY:j,label:u,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:x,labelBgBorderRadius:y,style:v,markerEnd:w,markerStart:S,interactionWidth:_})})}const sA=U1({isInternal:!1}),V1=U1({isInternal:!0});sA.displayName="StraightEdge";V1.displayName="StraightEdgeInternal";function $1(t){return T.memo(({id:i,sourceX:a,sourceY:r,targetX:s,targetY:c,sourcePosition:u=xe.Bottom,targetPosition:h=xe.Top,label:p,labelStyle:m,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:E,pathOptions:C,interactionWidth:j})=>{const[N,A,H]=n1({sourceX:a,sourceY:r,sourcePosition:u,targetX:s,targetY:c,targetPosition:h,curvature:C==null?void 0:C.curvature}),k=t.isInternal?void 0:i;return g.jsx(zc,{id:k,path:N,labelX:A,labelY:H,label:p,labelStyle:m,labelShowBg:x,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:E,interactionWidth:j})})}const cA=$1({isInternal:!1}),Y1=$1({isInternal:!0});cA.displayName="BezierEdge";Y1.displayName="BezierEdgeInternal";const Wy={default:Y1,straight:V1,step:B1,smoothstep:L1,simplebezier:O1},ex={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},uA=(t,i,a)=>a===xe.Left?t-i:a===xe.Right?t+i:t,fA=(t,i,a)=>a===xe.Top?t-i:a===xe.Bottom?t+i:t,tx="react-flow__edgeupdater";function nx({position:t,centerX:i,centerY:a,radius:r=10,onMouseDown:s,onMouseEnter:c,onMouseOut:u,type:h}){return g.jsx("circle",{onMouseDown:s,onMouseEnter:c,onMouseOut:u,className:st([tx,`${tx}-${h}`]),cx:uA(i,r,t),cy:fA(a,r,t),r,stroke:"transparent",fill:"transparent"})}function dA({isReconnectable:t,reconnectRadius:i,edge:a,sourceX:r,sourceY:s,targetX:c,targetY:u,sourcePosition:h,targetPosition:p,onReconnect:m,onReconnectStart:x,onReconnectEnd:y,setReconnecting:v,setUpdateHover:w}){const S=Ie(),_=(A,H)=>{if(A.button!==0)return;const{autoPanOnConnect:k,domNode:L,isValidConnection:V,connectionMode:Z,connectionRadius:le,lib:Q,onConnectStart:X,onConnectEnd:te,cancelConnection:D,nodeLookup:G,rfId:z,panBy:B,updateConnection:O}=S.getState(),$=H.type==="target",J=(P,ee)=>{v(!1),y==null||y(P,a,H.type,ee)},R=P=>m==null?void 0:m(a,P),Y=(P,ee)=>{v(!0),x==null||x(A,a,H.type),X==null||X(P,ee)};Id.onPointerDown(A.nativeEvent,{autoPanOnConnect:k,connectionMode:Z,connectionRadius:le,domNode:L,handleId:H.id,nodeId:H.nodeId,nodeLookup:G,isTarget:$,edgeUpdaterType:H.type,lib:Q,flowId:z,cancelConnection:D,panBy:B,isValidConnection:V,onConnect:R,onConnectStart:Y,onConnectEnd:te,onReconnectEnd:J,updateConnection:O,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:A.currentTarget})},E=A=>_(A,{nodeId:a.target,id:a.targetHandle??null,type:"target"}),C=A=>_(A,{nodeId:a.source,id:a.sourceHandle??null,type:"source"}),j=()=>w(!0),N=()=>w(!1);return g.jsxs(g.Fragment,{children:[(t===!0||t==="source")&&g.jsx(nx,{position:h,centerX:r,centerY:s,radius:i,onMouseDown:E,onMouseEnter:j,onMouseOut:N,type:"source"}),(t===!0||t==="target")&&g.jsx(nx,{position:p,centerX:c,centerY:u,radius:i,onMouseDown:C,onMouseEnter:j,onMouseOut:N,type:"target"})]})}function hA({id:t,edgesFocusable:i,edgesReconnectable:a,elementsSelectable:r,onClick:s,onDoubleClick:c,onContextMenu:u,onMouseEnter:h,onMouseMove:p,onMouseLeave:m,reconnectRadius:x,onReconnect:y,onReconnectStart:v,onReconnectEnd:w,rfId:S,edgeTypes:_,noPanClassName:E,onError:C,disableKeyboardA11y:j}){let N=Le(ge=>ge.edgeLookup.get(t));const A=Le(ge=>ge.defaultEdgeOptions);N=A?{...A,...N}:N;let H=N.type||"default",k=(_==null?void 0:_[H])||Wy[H];k===void 0&&(C==null||C("011",Cn.error011(H)),H="default",k=(_==null?void 0:_.default)||Wy.default);const L=!!(N.focusable||i&&typeof N.focusable>"u"),V=typeof y<"u"&&(N.reconnectable||a&&typeof N.reconnectable>"u"),Z=!!(N.selectable||r&&typeof N.selectable>"u"),le=T.useRef(null),[Q,X]=T.useState(!1),[te,D]=T.useState(!1),G=Ie(),{zIndex:z,sourceX:B,sourceY:O,targetX:$,targetY:J,sourcePosition:R,targetPosition:Y}=Le(T.useCallback(ge=>{const ye=ge.nodeLookup.get(N.source),Ce=ge.nodeLookup.get(N.target);if(!ye||!Ce)return{zIndex:N.zIndex,...ex};const Ue=t3({id:t,sourceNode:ye,targetNode:Ce,sourceHandle:N.sourceHandle||null,targetHandle:N.targetHandle||null,connectionMode:ge.connectionMode,onError:C});return{zIndex:QC({selected:N.selected,zIndex:N.zIndex,sourceNode:ye,targetNode:Ce,elevateOnSelect:ge.elevateEdgesOnSelect,zIndexMode:ge.zIndexMode}),...Ue||ex}},[N.source,N.target,N.sourceHandle,N.targetHandle,N.selected,N.zIndex]),Fe),P=T.useMemo(()=>N.markerStart?`url('#${Pd(N.markerStart,S)}')`:void 0,[N.markerStart,S]),ee=T.useMemo(()=>N.markerEnd?`url('#${Pd(N.markerEnd,S)}')`:void 0,[N.markerEnd,S]);if(N.hidden||B===null||O===null||$===null||J===null)return null;const se=ge=>{var je;const{addSelectedEdges:ye,unselectNodesAndEdges:Ce,multiSelectionActive:Ue}=G.getState();Z&&(G.setState({nodesSelectionActive:!1}),N.selected&&Ue?(Ce({nodes:[],edges:[N]}),(je=le.current)==null||je.blur()):ye([t])),s&&s(ge,N)},ue=c?ge=>{c(ge,{...N})}:void 0,oe=u?ge=>{u(ge,{...N})}:void 0,ce=h?ge=>{h(ge,{...N})}:void 0,fe=p?ge=>{p(ge,{...N})}:void 0,we=m?ge=>{m(ge,{...N})}:void 0,ve=ge=>{var ye;if(!j&&$v.includes(ge.key)&&Z){const{unselectNodesAndEdges:Ce,addSelectedEdges:Ue}=G.getState();ge.key==="Escape"?((ye=le.current)==null||ye.blur(),Ce({edges:[N]})):Ue([t])}};return g.jsx("svg",{style:{zIndex:z},children:g.jsxs("g",{className:st(["react-flow__edge",`react-flow__edge-${H}`,N.className,E,{selected:N.selected,animated:N.animated,inactive:!Z&&!s,updating:Q,selectable:Z}]),onClick:se,onDoubleClick:ue,onContextMenu:oe,onMouseEnter:ce,onMouseMove:fe,onMouseLeave:we,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?`${v1}-${S}`:void 0,ref:le,...N.domAttributes,children:[!te&&g.jsx(k,{id:t,source:N.source,target:N.target,type:N.type,selected:N.selected,animated:N.animated,selectable:Z,deletable:N.deletable??!0,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,sourceX:B,sourceY:O,targetX:$,targetY:J,sourcePosition:R,targetPosition:Y,data:N.data,style:N.style,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerStart:P,markerEnd:ee,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth}),V&&g.jsx(dA,{edge:N,isReconnectable:V,reconnectRadius:x,onReconnect:y,onReconnectStart:v,onReconnectEnd:w,sourceX:B,sourceY:O,targetX:$,targetY:J,sourcePosition:R,targetPosition:Y,setUpdateHover:X,setReconnecting:D})]})})}var mA=T.memo(hA);const pA=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function q1({defaultMarkerColor:t,onlyRenderVisibleElements:i,rfId:a,edgeTypes:r,noPanClassName:s,onReconnect:c,onEdgeContextMenu:u,onEdgeMouseEnter:h,onEdgeMouseMove:p,onEdgeMouseLeave:m,onEdgeClick:x,reconnectRadius:y,onEdgeDoubleClick:v,onReconnectStart:w,onReconnectEnd:S,disableKeyboardA11y:_}){const{edgesFocusable:E,edgesReconnectable:C,elementsSelectable:j,onError:N}=Le(pA,Fe),A=WT(i);return g.jsxs("div",{className:"react-flow__edges",children:[g.jsx(lA,{defaultColor:t,rfId:a}),A.map(H=>g.jsx(mA,{id:H,edgesFocusable:E,edgesReconnectable:C,elementsSelectable:j,noPanClassName:s,onReconnect:c,onContextMenu:u,onMouseEnter:h,onMouseMove:p,onMouseLeave:m,onClick:x,reconnectRadius:y,onDoubleClick:v,onReconnectStart:w,onReconnectEnd:S,rfId:a,onError:N,edgeTypes:r,disableKeyboardA11y:_},H))]})}q1.displayName="EdgeRenderer";const gA=T.memo(q1),yA=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function xA({children:t}){const i=Le(yA);return g.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:i},children:t})}function vA(t){const i=Oh(),a=T.useRef(!1);T.useEffect(()=>{!a.current&&i.viewportInitialized&&t&&(setTimeout(()=>t(i),1),a.current=!0)},[t,i.viewportInitialized])}const bA=t=>{var i;return(i=t.panZoom)==null?void 0:i.syncViewport};function wA(t){const i=Le(bA),a=Ie();return T.useEffect(()=>{t&&(i==null||i(t),a.setState({transform:[t.x,t.y,t.zoom]}))},[t,i]),null}function SA(t){return t.connection.inProgress?{...t.connection,to:oo(t.connection.to,t.transform)}:{...t.connection}}function EA(t){return SA}function NA(t){const i=EA();return Le(i,Fe)}const _A=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function CA({containerStyle:t,style:i,type:a,component:r}){const{nodesConnectable:s,width:c,height:u,isValid:h,inProgress:p}=Le(_A,Fe);return!(c&&s&&p)?null:g.jsx("svg",{style:t,width:c,height:u,className:"react-flow__connectionline react-flow__container",children:g.jsx("g",{className:st(["react-flow__connection",Xv(h)]),children:g.jsx(X1,{style:i,type:a,CustomComponent:r,isValid:h})})})}const X1=({style:t,type:i=Yi.Bezier,CustomComponent:a,isValid:r})=>{const{inProgress:s,from:c,fromNode:u,fromHandle:h,fromPosition:p,to:m,toNode:x,toHandle:y,toPosition:v,pointer:w}=NA();if(!s)return;if(a)return g.jsx(a,{connectionLineType:i,connectionLineStyle:t,fromNode:u,fromHandle:h,fromX:c.x,fromY:c.y,toX:m.x,toY:m.y,fromPosition:p,toPosition:v,connectionStatus:Xv(r),toNode:x,toHandle:y,pointer:w});let S="";const _={sourceX:c.x,sourceY:c.y,sourcePosition:p,targetX:m.x,targetY:m.y,targetPosition:v};switch(i){case Yi.Bezier:[S]=n1(_);break;case Yi.SimpleBezier:[S]=z1(_);break;case Yi.Step:[S]=Kd({..._,borderRadius:0});break;case Yi.SmoothStep:[S]=Kd(_);break;default:[S]=l1(_)}return g.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};X1.displayName="ConnectionLine";const TA={};function ix(t=TA){T.useRef(t),Ie(),T.useEffect(()=>{},[t])}function AA(){Ie(),T.useRef(!1),T.useEffect(()=>{},[])}function G1({nodeTypes:t,edgeTypes:i,onInit:a,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:c,onEdgeDoubleClick:u,onNodeMouseEnter:h,onNodeMouseMove:p,onNodeMouseLeave:m,onNodeContextMenu:x,onSelectionContextMenu:y,onSelectionStart:v,onSelectionEnd:w,connectionLineType:S,connectionLineStyle:_,connectionLineComponent:E,connectionLineContainerStyle:C,selectionKeyCode:j,selectionOnDrag:N,selectionMode:A,multiSelectionKeyCode:H,panActivationKeyCode:k,zoomActivationKeyCode:L,deleteKeyCode:V,onlyRenderVisibleElements:Z,elementsSelectable:le,defaultViewport:Q,translateExtent:X,minZoom:te,maxZoom:D,preventScrolling:G,defaultMarkerColor:z,zoomOnScroll:B,zoomOnPinch:O,panOnScroll:$,panOnScrollSpeed:J,panOnScrollMode:R,zoomOnDoubleClick:Y,panOnDrag:P,onPaneClick:ee,onPaneMouseEnter:se,onPaneMouseMove:ue,onPaneMouseLeave:oe,onPaneScroll:ce,onPaneContextMenu:fe,paneClickDistance:we,nodeClickDistance:ve,onEdgeContextMenu:ge,onEdgeMouseEnter:ye,onEdgeMouseMove:Ce,onEdgeMouseLeave:Ue,reconnectRadius:je,onReconnect:nt,onReconnectStart:kt,onReconnectEnd:ht,noDragClassName:nn,noWheelClassName:jn,noPanClassName:Pi,disableKeyboardA11y:Fi,nodeExtent:pt,rfId:Rl,viewport:zn,onViewportChange:ci}){return ix(t),ix(i),AA(),vA(a),wA(zn),g.jsx(qT,{onPaneClick:ee,onPaneMouseEnter:se,onPaneMouseMove:ue,onPaneMouseLeave:oe,onPaneContextMenu:fe,onPaneScroll:ce,paneClickDistance:we,deleteKeyCode:V,selectionKeyCode:j,selectionOnDrag:N,selectionMode:A,onSelectionStart:v,onSelectionEnd:w,multiSelectionKeyCode:H,panActivationKeyCode:k,zoomActivationKeyCode:L,elementsSelectable:le,zoomOnScroll:B,zoomOnPinch:O,zoomOnDoubleClick:Y,panOnScroll:$,panOnScrollSpeed:J,panOnScrollMode:R,panOnDrag:P,defaultViewport:Q,translateExtent:X,minZoom:te,maxZoom:D,onSelectionContextMenu:y,preventScrolling:G,noDragClassName:nn,noWheelClassName:jn,noPanClassName:Pi,disableKeyboardA11y:Fi,onViewportChange:ci,isControlledViewport:!!zn,children:g.jsxs(xA,{children:[g.jsx(gA,{edgeTypes:i,onEdgeClick:s,onEdgeDoubleClick:u,onReconnect:nt,onReconnectStart:kt,onReconnectEnd:ht,onlyRenderVisibleElements:Z,onEdgeContextMenu:ge,onEdgeMouseEnter:ye,onEdgeMouseMove:Ce,onEdgeMouseLeave:Ue,reconnectRadius:je,defaultMarkerColor:z,noPanClassName:Pi,disableKeyboardA11y:Fi,rfId:Rl}),g.jsx(CA,{style:_,type:S,component:E,containerStyle:C}),g.jsx("div",{className:"react-flow__edgelabel-renderer"}),g.jsx(JT,{nodeTypes:t,onNodeClick:r,onNodeDoubleClick:c,onNodeMouseEnter:h,onNodeMouseMove:p,onNodeMouseLeave:m,onNodeContextMenu:x,nodeClickDistance:ve,onlyRenderVisibleElements:Z,noPanClassName:Pi,noDragClassName:nn,disableKeyboardA11y:Fi,nodeExtent:pt,rfId:Rl}),g.jsx("div",{className:"react-flow__viewport-portal"})]})})}G1.displayName="GraphView";const MA=T.memo(G1),lx=({nodes:t,edges:i,defaultNodes:a,defaultEdges:r,width:s,height:c,fitView:u,fitViewOptions:h,minZoom:p=.5,maxZoom:m=2,nodeOrigin:x,nodeExtent:y,zIndexMode:v="basic"}={})=>{const w=new Map,S=new Map,_=new Map,E=new Map,C=r??i??[],j=a??t??[],N=x??[0,0],A=y??Pr;o1(_,E,C);const H=Fd(j,w,S,{nodeOrigin:N,nodeExtent:A,zIndexMode:v});let k=[0,0,1];if(u&&s&&c){const L=ao(w,{filter:Q=>!!((Q.width||Q.initialWidth)&&(Q.height||Q.initialHeight))}),{x:V,y:Z,zoom:le}=Ch(L,s,c,p,m,(h==null?void 0:h.padding)??.1);k=[V,Z,le]}return{rfId:"1",width:s??0,height:c??0,transform:k,nodes:j,nodesInitialized:H,nodeLookup:w,parentLookup:S,edges:C,edgeLookup:E,connectionLookup:_,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:a!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:p,maxZoom:m,translateExtent:Pr,nodeExtent:A,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ma.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:{...qv},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:$C,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Yv,zIndexMode:v,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},jA=({nodes:t,edges:i,defaultNodes:a,defaultEdges:r,width:s,height:c,fitView:u,fitViewOptions:h,minZoom:p,maxZoom:m,nodeOrigin:x,nodeExtent:y,zIndexMode:v})=>G3((w,S)=>{async function _(){const{nodeLookup:E,panZoom:C,fitViewOptions:j,fitViewResolver:N,width:A,height:H,minZoom:k,maxZoom:L}=S();C&&(await UC({nodes:E,width:A,height:H,panZoom:C,minZoom:k,maxZoom:L},j),N==null||N.resolve(!0),w({fitViewResolver:null}))}return{...lx({nodes:t,edges:i,width:s,height:c,fitView:u,fitViewOptions:h,minZoom:p,maxZoom:m,nodeOrigin:x,nodeExtent:y,defaultNodes:a,defaultEdges:r,zIndexMode:v}),setNodes:E=>{const{nodeLookup:C,parentLookup:j,nodeOrigin:N,elevateNodesOnSelect:A,fitViewQueued:H,zIndexMode:k}=S(),L=Fd(E,C,j,{nodeOrigin:N,nodeExtent:y,elevateNodesOnSelect:A,checkEquality:!0,zIndexMode:k});H&&L?(_(),w({nodes:E,nodesInitialized:L,fitViewQueued:!1,fitViewOptions:void 0})):w({nodes:E,nodesInitialized:L})},setEdges:E=>{const{connectionLookup:C,edgeLookup:j}=S();o1(C,j,E),w({edges:E})},setDefaultNodesAndEdges:(E,C)=>{if(E){const{setNodes:j}=S();j(E),w({hasDefaultNodes:!0})}if(C){const{setEdges:j}=S();j(C),w({hasDefaultEdges:!0})}},updateNodeInternals:E=>{const{triggerNodeChanges:C,nodeLookup:j,parentLookup:N,domNode:A,nodeOrigin:H,nodeExtent:k,debug:L,fitViewQueued:V,zIndexMode:Z}=S(),{changes:le,updatedInternals:Q}=c3(E,j,N,A,H,k,Z);Q&&(a3(j,N,{nodeOrigin:H,nodeExtent:k,zIndexMode:Z}),V?(_(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),(le==null?void 0:le.length)>0&&(L&&console.log("React Flow: trigger node changes",le),C==null||C(le)))},updateNodePositions:(E,C=!1)=>{const j=[];let N=[];const{nodeLookup:A,triggerNodeChanges:H,connection:k,updateConnection:L,onNodesChangeMiddlewareMap:V}=S();for(const[Z,le]of E){const Q=A.get(Z),X=!!(Q!=null&&Q.expandParent&&(Q!=null&&Q.parentId)&&(le!=null&&le.position)),te={id:Z,type:"position",position:X?{x:Math.max(0,le.position.x),y:Math.max(0,le.position.y)}:le.position,dragging:C};if(Q&&k.inProgress&&k.fromNode.id===Q.id){const D=jl(Q,k.fromHandle,xe.Left,!0);L({...k,from:D})}X&&Q.parentId&&j.push({id:Z,parentId:Q.parentId,rect:{...le.internals.positionAbsolute,width:le.measured.width??0,height:le.measured.height??0}}),N.push(te)}if(j.length>0){const{parentLookup:Z,nodeOrigin:le}=S(),Q=Rh(j,A,Z,le);N.push(...Q)}for(const Z of V.values())N=Z(N);H(N)},triggerNodeChanges:E=>{const{onNodesChange:C,setNodes:j,nodes:N,hasDefaultNodes:A,debug:H}=S();if(E!=null&&E.length){if(A){const k=hT(E,N);j(k)}H&&console.log("React Flow: trigger node changes",E),C==null||C(E)}},triggerEdgeChanges:E=>{const{onEdgesChange:C,setEdges:j,edges:N,hasDefaultEdges:A,debug:H}=S();if(E!=null&&E.length){if(A){const k=mT(E,N);j(k)}H&&console.log("React Flow: trigger edge changes",E),C==null||C(E)}},addSelectedNodes:E=>{const{multiSelectionActive:C,edgeLookup:j,nodeLookup:N,triggerNodeChanges:A,triggerEdgeChanges:H}=S();if(C){const k=E.map(L=>Sl(L,!0));A(k);return}A(Sa(N,new Set([...E]),!0)),H(Sa(j))},addSelectedEdges:E=>{const{multiSelectionActive:C,edgeLookup:j,nodeLookup:N,triggerNodeChanges:A,triggerEdgeChanges:H}=S();if(C){const k=E.map(L=>Sl(L,!0));H(k);return}H(Sa(j,new Set([...E]))),A(Sa(N,new Set,!0))},unselectNodesAndEdges:({nodes:E,edges:C}={})=>{const{edges:j,nodes:N,nodeLookup:A,triggerNodeChanges:H,triggerEdgeChanges:k}=S(),L=E||N,V=C||j,Z=L.map(Q=>{const X=A.get(Q.id);return X&&(X.selected=!1),Sl(Q.id,!1)}),le=V.map(Q=>Sl(Q.id,!1));H(Z),k(le)},setMinZoom:E=>{const{panZoom:C,maxZoom:j}=S();C==null||C.setScaleExtent([E,j]),w({minZoom:E})},setMaxZoom:E=>{const{panZoom:C,minZoom:j}=S();C==null||C.setScaleExtent([j,E]),w({maxZoom:E})},setTranslateExtent:E=>{var C;(C=S().panZoom)==null||C.setTranslateExtent(E),w({translateExtent:E})},resetSelectedElements:()=>{const{edges:E,nodes:C,triggerNodeChanges:j,triggerEdgeChanges:N,elementsSelectable:A}=S();if(!A)return;const H=C.reduce((L,V)=>V.selected?[...L,Sl(V.id,!1)]:L,[]),k=E.reduce((L,V)=>V.selected?[...L,Sl(V.id,!1)]:L,[]);j(H),N(k)},setNodeExtent:E=>{const{nodes:C,nodeLookup:j,parentLookup:N,nodeOrigin:A,elevateNodesOnSelect:H,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]||(Fd(C,j,N,{nodeOrigin:A,nodeExtent:E,elevateNodesOnSelect:H,checkEquality:!1,zIndexMode:L}),w({nodeExtent:E}))},panBy:E=>{const{transform:C,width:j,height:N,panZoom:A,translateExtent:H}=S();return u3({delta:E,panZoom:A,transform:C,translateExtent:H,width:j,height:N})},setCenter:async(E,C,j)=>{const{width:N,height:A,maxZoom:H,panZoom:k}=S();if(!k)return Promise.resolve(!1);const L=typeof(j==null?void 0:j.zoom)<"u"?j.zoom:H;return await k.setViewport({x:N/2-E*L,y:A/2-C*L,zoom:L},{duration:j==null?void 0:j.duration,ease:j==null?void 0:j.ease,interpolate:j==null?void 0:j.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{w({connection:{...qv}})},updateConnection:E=>{w({connection:E})},reset:()=>w({...lx()})}},Object.is);function zA({initialNodes:t,initialEdges:i,defaultNodes:a,defaultEdges:r,initialWidth:s,initialHeight:c,initialMinZoom:u,initialMaxZoom:h,initialFitViewOptions:p,fitView:m,nodeOrigin:x,nodeExtent:y,zIndexMode:v,children:w}){const[S]=T.useState(()=>jA({nodes:t,edges:i,defaultNodes:a,defaultEdges:r,width:s,height:c,fitView:m,minZoom:u,maxZoom:h,fitViewOptions:p,nodeOrigin:x,nodeExtent:y,zIndexMode:v}));return g.jsx(Q3,{value:S,children:g.jsx(xT,{children:w})})}function RA({children:t,nodes:i,edges:a,defaultNodes:r,defaultEdges:s,width:c,height:u,fitView:h,fitViewOptions:p,minZoom:m,maxZoom:x,nodeOrigin:y,nodeExtent:v,zIndexMode:w}){return T.useContext(Ac)?g.jsx(g.Fragment,{children:t}):g.jsx(zA,{initialNodes:i,initialEdges:a,defaultNodes:r,defaultEdges:s,initialWidth:c,initialHeight:u,fitView:h,initialFitViewOptions:p,initialMinZoom:m,initialMaxZoom:x,nodeOrigin:y,nodeExtent:v,zIndexMode:w,children:t})}const OA={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function DA({nodes:t,edges:i,defaultNodes:a,defaultEdges:r,className:s,nodeTypes:c,edgeTypes:u,onNodeClick:h,onEdgeClick:p,onInit:m,onMove:x,onMoveStart:y,onMoveEnd:v,onConnect:w,onConnectStart:S,onConnectEnd:_,onClickConnectStart:E,onClickConnectEnd:C,onNodeMouseEnter:j,onNodeMouseMove:N,onNodeMouseLeave:A,onNodeContextMenu:H,onNodeDoubleClick:k,onNodeDragStart:L,onNodeDrag:V,onNodeDragStop:Z,onNodesDelete:le,onEdgesDelete:Q,onDelete:X,onSelectionChange:te,onSelectionDragStart:D,onSelectionDrag:G,onSelectionDragStop:z,onSelectionContextMenu:B,onSelectionStart:O,onSelectionEnd:$,onBeforeDelete:J,connectionMode:R,connectionLineType:Y=Yi.Bezier,connectionLineStyle:P,connectionLineComponent:ee,connectionLineContainerStyle:se,deleteKeyCode:ue="Backspace",selectionKeyCode:oe="Shift",selectionOnDrag:ce=!1,selectionMode:fe=Fr.Full,panActivationKeyCode:we="Space",multiSelectionKeyCode:ve=Jr()?"Meta":"Control",zoomActivationKeyCode:ge=Jr()?"Meta":"Control",snapToGrid:ye,snapGrid:Ce,onlyRenderVisibleElements:Ue=!1,selectNodesOnDrag:je,nodesDraggable:nt,autoPanOnNodeFocus:kt,nodesConnectable:ht,nodesFocusable:nn,nodeOrigin:jn=b1,edgesFocusable:Pi,edgesReconnectable:Fi,elementsSelectable:pt=!0,defaultViewport:Rl=rT,minZoom:zn=.5,maxZoom:ci=2,translateExtent:Ii=Pr,preventScrolling:Yc=!0,nodeExtent:Ol,defaultMarkerColor:qc="#b1b1b7",zoomOnScroll:Xc=!0,zoomOnPinch:Ji=!0,panOnScroll:St=!1,panOnScrollSpeed:gn=.5,panOnScrollMode:Et=_l.Free,zoomOnDoubleClick:Gc=!0,panOnDrag:Zc=!0,onPaneClick:Qc,onPaneMouseEnter:Dl,onPaneMouseMove:kl,onPaneMouseLeave:Ll,onPaneScroll:Rn,onPaneContextMenu:Hl,paneClickDistance:Wi=1,nodeClickDistance:Kc=0,children:fo,onReconnect:$a,onReconnectStart:el,onReconnectEnd:Pc,onEdgeContextMenu:ho,onEdgeDoubleClick:mo,onEdgeMouseEnter:po,onEdgeMouseMove:Ya,onEdgeMouseLeave:qa,reconnectRadius:go=10,onNodesChange:yo,onEdgesChange:yn,noDragClassName:ct="nodrag",noWheelClassName:bt="nowheel",noPanClassName:On="nopan",fitView:Bl,fitViewOptions:xo,connectOnClick:Fc,attributionPosition:vo,proOptions:tl,defaultEdgeOptions:Xa,elevateNodesOnSelect:ui=!0,elevateEdgesOnSelect:fi=!1,disableKeyboardA11y:di=!1,autoPanOnConnect:hi,autoPanOnNodeDrag:it,autoPanSpeed:bo,connectionRadius:wo,isValidConnection:Dn,onError:mi,style:Ic,id:Ga,nodeDragThreshold:So,connectionDragThreshold:Jc,viewport:Ul,onViewportChange:Vl,width:ln,height:_t,colorMode:Eo="light",debug:Wc,onScroll:pi,ariaLabelConfig:No,zIndexMode:nl="basic",...eu},Ct){const il=Ga||"1",_o=uT(Eo),Za=T.useCallback(kn=>{kn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),pi==null||pi(kn)},[pi]);return g.jsx("div",{"data-testid":"rf__wrapper",...eu,onScroll:Za,style:{...Ic,...OA},ref:Ct,className:st(["react-flow",s,_o]),id:Ga,role:"application",children:g.jsxs(RA,{nodes:t,edges:i,width:ln,height:_t,fitView:Bl,fitViewOptions:xo,minZoom:zn,maxZoom:ci,nodeOrigin:jn,nodeExtent:Ol,zIndexMode:nl,children:[g.jsx(MA,{onInit:m,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:j,onNodeMouseMove:N,onNodeMouseLeave:A,onNodeContextMenu:H,onNodeDoubleClick:k,nodeTypes:c,edgeTypes:u,connectionLineType:Y,connectionLineStyle:P,connectionLineComponent:ee,connectionLineContainerStyle:se,selectionKeyCode:oe,selectionOnDrag:ce,selectionMode:fe,deleteKeyCode:ue,multiSelectionKeyCode:ve,panActivationKeyCode:we,zoomActivationKeyCode:ge,onlyRenderVisibleElements:Ue,defaultViewport:Rl,translateExtent:Ii,minZoom:zn,maxZoom:ci,preventScrolling:Yc,zoomOnScroll:Xc,zoomOnPinch:Ji,zoomOnDoubleClick:Gc,panOnScroll:St,panOnScrollSpeed:gn,panOnScrollMode:Et,panOnDrag:Zc,onPaneClick:Qc,onPaneMouseEnter:Dl,onPaneMouseMove:kl,onPaneMouseLeave:Ll,onPaneScroll:Rn,onPaneContextMenu:Hl,paneClickDistance:Wi,nodeClickDistance:Kc,onSelectionContextMenu:B,onSelectionStart:O,onSelectionEnd:$,onReconnect:$a,onReconnectStart:el,onReconnectEnd:Pc,onEdgeContextMenu:ho,onEdgeDoubleClick:mo,onEdgeMouseEnter:po,onEdgeMouseMove:Ya,onEdgeMouseLeave:qa,reconnectRadius:go,defaultMarkerColor:qc,noDragClassName:ct,noWheelClassName:bt,noPanClassName:On,rfId:il,disableKeyboardA11y:di,nodeExtent:Ol,viewport:Ul,onViewportChange:Vl}),g.jsx(cT,{nodes:t,edges:i,defaultNodes:a,defaultEdges:r,onConnect:w,onConnectStart:S,onConnectEnd:_,onClickConnectStart:E,onClickConnectEnd:C,nodesDraggable:nt,autoPanOnNodeFocus:kt,nodesConnectable:ht,nodesFocusable:nn,edgesFocusable:Pi,edgesReconnectable:Fi,elementsSelectable:pt,elevateNodesOnSelect:ui,elevateEdgesOnSelect:fi,minZoom:zn,maxZoom:ci,nodeExtent:Ol,onNodesChange:yo,onEdgesChange:yn,snapToGrid:ye,snapGrid:Ce,connectionMode:R,translateExtent:Ii,connectOnClick:Fc,defaultEdgeOptions:Xa,fitView:Bl,fitViewOptions:xo,onNodesDelete:le,onEdgesDelete:Q,onDelete:X,onNodeDragStart:L,onNodeDrag:V,onNodeDragStop:Z,onSelectionDrag:G,onSelectionDragStart:D,onSelectionDragStop:z,onMove:x,onMoveStart:y,onMoveEnd:v,noPanClassName:On,nodeOrigin:jn,rfId:il,autoPanOnConnect:hi,autoPanOnNodeDrag:it,autoPanSpeed:bo,onError:mi,connectionRadius:wo,isValidConnection:Dn,selectNodesOnDrag:je,nodeDragThreshold:So,connectionDragThreshold:Jc,onBeforeDelete:J,debug:Wc,ariaLabelConfig:No,zIndexMode:nl}),g.jsx(aT,{onSelectionChange:te}),fo,g.jsx(eT,{proOptions:tl,position:vo}),g.jsx(W3,{rfId:il,disableKeyboardA11y:di})]})})}var kA=S1(DA);function LA({dimensions:t,lineWidth:i,variant:a,className:r}){return g.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",a,r])})}function HA({radius:t,className:i}){return g.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 BA={[qi.Dots]:1,[qi.Lines]:1,[qi.Cross]:6},UA=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function Z1({id:t,variant:i=qi.Dots,gap:a=20,size:r,lineWidth:s=1,offset:c=0,color:u,bgColor:h,style:p,className:m,patternClassName:x}){const y=T.useRef(null),{transform:v,patternId:w}=Le(UA,Fe),S=r||BA[i],_=i===qi.Dots,E=i===qi.Cross,C=Array.isArray(a)?a:[a,a],j=[C[0]*v[2]||1,C[1]*v[2]||1],N=S*v[2],A=Array.isArray(c)?c:[c,c],H=E?[N,N]:j,k=[A[0]*v[2]||1+H[0]/2,A[1]*v[2]||1+H[1]/2],L=`${w}${t||""}`;return g.jsxs("svg",{className:st(["react-flow__background",m]),style:{...p,...jc,"--xy-background-color-props":h,"--xy-background-pattern-color-props":u},ref:y,"data-testid":"rf__background",children:[g.jsx("pattern",{id:L,x:v[0]%j[0],y:v[1]%j[1],width:j[0],height:j[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${k[0]},-${k[1]})`,children:_?g.jsx(HA,{radius:N/2,className:x}):g.jsx(LA,{dimensions:H,lineWidth:s,variant:i,className:x})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${L})`})]})}Z1.displayName="Background";const VA=T.memo(Z1);function $A(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:g.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function YA(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:g.jsx("path",{d:"M0 0h32v4.2H0z"})})}function qA(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:g.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 XA(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.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 GA(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.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 Gs({children:t,className:i,...a}){return g.jsx("button",{type:"button",className:st(["react-flow__controls-button",i]),...a,children:t})}const ZA=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function Q1({style:t,showZoom:i=!0,showFitView:a=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:c,onZoomOut:u,onFitView:h,onInteractiveChange:p,className:m,children:x,position:y="bottom-left",orientation:v="vertical","aria-label":w}){const S=Ie(),{isInteractive:_,minZoomReached:E,maxZoomReached:C,ariaLabelConfig:j}=Le(ZA,Fe),{zoomIn:N,zoomOut:A,fitView:H}=Oh(),k=()=>{N(),c==null||c()},L=()=>{A(),u==null||u()},V=()=>{H(s),h==null||h()},Z=()=>{S.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),p==null||p(!_)},le=v==="horizontal"?"horizontal":"vertical";return g.jsxs(Mc,{className:st(["react-flow__controls",le,m]),position:y,style:t,"data-testid":"rf__controls","aria-label":w??j["controls.ariaLabel"],children:[i&&g.jsxs(g.Fragment,{children:[g.jsx(Gs,{onClick:k,className:"react-flow__controls-zoomin",title:j["controls.zoomIn.ariaLabel"],"aria-label":j["controls.zoomIn.ariaLabel"],disabled:C,children:g.jsx($A,{})}),g.jsx(Gs,{onClick:L,className:"react-flow__controls-zoomout",title:j["controls.zoomOut.ariaLabel"],"aria-label":j["controls.zoomOut.ariaLabel"],disabled:E,children:g.jsx(YA,{})})]}),a&&g.jsx(Gs,{className:"react-flow__controls-fitview",onClick:V,title:j["controls.fitView.ariaLabel"],"aria-label":j["controls.fitView.ariaLabel"],children:g.jsx(qA,{})}),r&&g.jsx(Gs,{className:"react-flow__controls-interactive",onClick:Z,title:j["controls.interactive.ariaLabel"],"aria-label":j["controls.interactive.ariaLabel"],children:_?g.jsx(GA,{}):g.jsx(XA,{})}),x]})}Q1.displayName="Controls";T.memo(Q1);function QA({id:t,x:i,y:a,width:r,height:s,style:c,color:u,strokeColor:h,strokeWidth:p,className:m,borderRadius:x,shapeRendering:y,selected:v,onClick:w}){const{background:S,backgroundColor:_}=c||{},E=u||S||_;return g.jsx("rect",{className:st(["react-flow__minimap-node",{selected:v},m]),x:i,y:a,rx:x,ry:x,width:r,height:s,style:{fill:E,stroke:h,strokeWidth:p},shapeRendering:y,onClick:w?C=>w(C,t):void 0})}const KA=T.memo(QA),PA=t=>t.nodes.map(i=>i.id),Td=t=>t instanceof Function?t:()=>t;function FA({nodeStrokeColor:t,nodeColor:i,nodeClassName:a="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:c=KA,onClick:u}){const h=Le(PA,Fe),p=Td(i),m=Td(t),x=Td(a),y=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return g.jsx(g.Fragment,{children:h.map(v=>g.jsx(JA,{id:v,nodeColorFunc:p,nodeStrokeColorFunc:m,nodeClassNameFunc:x,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:c,onClick:u,shapeRendering:y},v))})}function IA({id:t,nodeColorFunc:i,nodeStrokeColorFunc:a,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:c,shapeRendering:u,NodeComponent:h,onClick:p}){const{node:m,x,y,width:v,height:w}=Le(S=>{const{internals:_}=S.nodeLookup.get(t),E=_.userNode,{x:C,y:j}=_.positionAbsolute,{width:N,height:A}=si(E);return{node:E,x:C,y:j,width:N,height:A}},Fe);return!m||m.hidden||!Fv(m)?null:g.jsx(h,{x,y,width:v,height:w,style:m.style,selected:!!m.selected,className:r(m),color:i(m),borderRadius:s,strokeColor:a(m),strokeWidth:c,shapeRendering:u,onClick:p,id:m.id})}const JA=T.memo(IA);var WA=T.memo(FA);const eM=200,tM=150,nM=t=>!t.hidden,iM=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?Pv(ao(t.nodeLookup,{filter:nM}),i):i,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},lM="react-flow__minimap-desc";function K1({style:t,className:i,nodeStrokeColor:a,nodeColor:r,nodeClassName:s="",nodeBorderRadius:c=5,nodeStrokeWidth:u,nodeComponent:h,bgColor:p,maskColor:m,maskStrokeColor:x,maskStrokeWidth:y,position:v="bottom-right",onClick:w,onNodeClick:S,pannable:_=!1,zoomable:E=!1,ariaLabel:C,inversePan:j,zoomStep:N=1,offsetScale:A=5}){const H=Ie(),k=T.useRef(null),{boundingRect:L,viewBB:V,rfId:Z,panZoom:le,translateExtent:Q,flowWidth:X,flowHeight:te,ariaLabelConfig:D}=Le(iM,Fe),G=(t==null?void 0:t.width)??eM,z=(t==null?void 0:t.height)??tM,B=L.width/G,O=L.height/z,$=Math.max(B,O),J=$*G,R=$*z,Y=A*$,P=L.x-(J-L.width)/2-Y,ee=L.y-(R-L.height)/2-Y,se=J+Y*2,ue=R+Y*2,oe=`${lM}-${Z}`,ce=T.useRef(0),fe=T.useRef();ce.current=$,T.useEffect(()=>{if(k.current&&le)return fe.current=v3({domNode:k.current,panZoom:le,getTransform:()=>H.getState().transform,getViewScale:()=>ce.current}),()=>{var ye;(ye=fe.current)==null||ye.destroy()}},[le]),T.useEffect(()=>{var ye;(ye=fe.current)==null||ye.update({translateExtent:Q,width:X,height:te,inversePan:j,pannable:_,zoomStep:N,zoomable:E})},[_,E,j,N,Q,X,te]);const we=w?ye=>{var je;const[Ce,Ue]=((je=fe.current)==null?void 0:je.pointer(ye))||[0,0];w(ye,{x:Ce,y:Ue})}:void 0,ve=S?T.useCallback((ye,Ce)=>{const Ue=H.getState().nodeLookup.get(Ce).internals.userNode;S(ye,Ue)},[]):void 0,ge=C??D["minimap.ariaLabel"];return g.jsx(Mc,{position:v,style:{...t,"--xy-minimap-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-width-props":typeof y=="number"?y*$:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof a=="string"?a: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:g.jsxs("svg",{width:G,height:z,viewBox:`${P} ${ee} ${se} ${ue}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":oe,ref:k,onClick:we,children:[ge&&g.jsx("title",{id:oe,children:ge}),g.jsx(WA,{onClick:ve,nodeColor:r,nodeStrokeColor:a,nodeBorderRadius:c,nodeClassName:s,nodeStrokeWidth:u,nodeComponent:h}),g.jsx("path",{className:"react-flow__minimap-mask",d:`M${P-Y},${ee-Y}h${se+Y*2}v${ue+Y*2}h${-se-Y*2}z
351
+ M${V.x},${V.y}h${V.width}v${V.height}h${-V.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}K1.displayName="MiniMap";T.memo(K1);const aM=t=>i=>t?`${Math.max(1/i.transform[2],1)}`:void 0,rM={[Oa.Line]:"right",[Oa.Handle]:"bottom-right"};function oM({nodeId:t,position:i,variant:a=Oa.Handle,className:r,style:s=void 0,children:c,color:u,minWidth:h=10,minHeight:p=10,maxWidth:m=Number.MAX_VALUE,maxHeight:x=Number.MAX_VALUE,keepAspectRatio:y=!1,resizeDirection:v,autoScale:w=!0,shouldResize:S,onResizeStart:_,onResize:E,onResizeEnd:C}){const j=C1(),N=typeof t=="string"?t:j,A=Ie(),H=T.useRef(null),k=a===Oa.Handle,L=Le(T.useCallback(aM(k&&w),[k,w]),Fe),V=T.useRef(null),Z=i??rM[a];T.useEffect(()=>{if(!(!H.current||!N))return V.current||(V.current=O3({domNode:H.current,nodeId:N,getStoreItems:()=>{const{nodeLookup:Q,transform:X,snapGrid:te,snapToGrid:D,nodeOrigin:G,domNode:z}=A.getState();return{nodeLookup:Q,transform:X,snapGrid:te,snapToGrid:D,nodeOrigin:G,paneDomNode:z}},onChange:(Q,X)=>{const{triggerNodeChanges:te,nodeLookup:D,parentLookup:G,nodeOrigin:z}=A.getState(),B=[],O={x:Q.x,y:Q.y},$=D.get(N);if($&&$.expandParent&&$.parentId){const J=$.origin??z,R=Q.width??$.measured.width??0,Y=Q.height??$.measured.height??0,P={id:$.id,parentId:$.parentId,rect:{width:R,height:Y,...Iv({x:Q.x??$.position.x,y:Q.y??$.position.y},{width:R,height:Y},$.parentId,D,J)}},ee=Rh([P],D,G,z);B.push(...ee),O.x=Q.x?Math.max(J[0]*R,Q.x):void 0,O.y=Q.y?Math.max(J[1]*Y,Q.y):void 0}if(O.x!==void 0&&O.y!==void 0){const J={id:N,type:"position",position:{...O}};B.push(J)}if(Q.width!==void 0&&Q.height!==void 0){const R={id:N,type:"dimensions",resizing:!0,setAttributes:v?v==="horizontal"?"width":"height":!0,dimensions:{width:Q.width,height:Q.height}};B.push(R)}for(const J of X){const R={...J,type:"position"};B.push(R)}te(B)},onEnd:({width:Q,height:X})=>{const te={id:N,type:"dimensions",resizing:!1,dimensions:{width:Q,height:X}};A.getState().triggerNodeChanges([te])}})),V.current.update({controlPosition:Z,boundaries:{minWidth:h,minHeight:p,maxWidth:m,maxHeight:x},keepAspectRatio:y,resizeDirection:v,onResizeStart:_,onResize:E,onResizeEnd:C,shouldResize:S}),()=>{var Q;(Q=V.current)==null||Q.destroy()}},[Z,h,p,m,x,y,_,E,C,S]);const le=Z.split("-");return g.jsx("div",{className:st(["react-flow__resize-control","nodrag",...le,a,r]),ref:H,style:{...s,scale:L,...u&&{[k?"backgroundColor":"borderColor"]:u}},children:c})}T.memo(oM);const wl={daily:/^\d{4}-\d{2}-\d{2}\.md$/,architecture:/_ARCHITECTURE\.md$|ARCHITECTURE.*\.md$/i,persistent:/^PERSISTENT_MEMORY\.md$/i,context:/^CONTEXT_BUILDER\.md$/i,crypto:/crypto/i,swarmLog:/\.csv$/,archive:/\.(tar\.gz|zip|gz)$/};function ti(t,i,a,r=[]){for(const s of t)s.type==="file"&&i.test(s.name)&&r.push({name:s.name,path:`${a}/${s.path}`,size:s.size}),s.children&&ti(s.children,i,a,r);return r}function P1(t){let i=0,a=0;for(const r of t)if(r.type==="file"&&(i++,a+=r.size||0),r.children){const s=P1(r.children);i+=s.files,a+=s.size}return{files:i,size:a}}function sM(t){const i=[];return Object.entries(t).forEach(([a,r])=>{if(!r)return;const{tree:s,path:c=`~/${a}`}=r,u=[],h=ti(s,wl.daily,c,[]);if(h.length>0){const E=h.reduce((C,j)=>C+(j.size||0),0);u.push({id:`${a}-daily`,type:"storage",label:"Daily Logs",description:`${h.length} temporal memory files`,icon:Fx,color:"var(--accent-green)",files:h.sort((C,j)=>j.name.localeCompare(C.name)).slice(0,5),totalSize:E,path:c,depth:1})}const p=ti(s,wl.architecture,c,[]);if(p.length>0){const E=p.reduce((C,j)=>C+(j.size||0),0);u.push({id:`${a}-architecture`,type:"storage",label:"Architecture Docs",description:`${p.length} system structure files`,icon:Kx,color:"var(--accent-blue)",files:p,totalSize:E,path:c,depth:1})}const m=ti(s,wl.persistent,c,[]),x=ti(s,wl.context,c,[]),y=[...m,...x];if(y.length>0){const E=y.reduce((C,j)=>C+(j.size||0),0);u.push({id:`${a}-persistent`,type:"storage",label:"Long-term Memory",description:"Persistent context & curated knowledge",icon:ev,color:"var(--accent-purple)",files:y,totalSize:E,path:c,depth:1})}const v=ti(s,wl.crypto,c,[]);if(v.length>0){const E=v.reduce((C,j)=>C+(j.size||0),0);u.push({id:`${a}-crypto`,type:"specialized",label:"Crypto Intelligence",description:`${v.length} specialized knowledge files`,icon:Wx,color:"var(--accent-amber)",files:v,totalSize:E,path:c,depth:2})}const w=ti(s,wl.swarmLog,c,[]);if(w.length>0){const E=w.reduce((C,j)=>C+(j.size||0),0);u.push({id:`${a}-telemetry`,type:"telemetry",label:"Telemetry Logs",description:`${w.length} data log files`,icon:Gx,color:"var(--accent-indigo)",files:w.slice(0,6),totalSize:E,path:c,depth:2})}const S=ti(s,wl.archive,c,[]);if(S.length>0){const E=S.reduce((C,j)=>C+(j.size||0),0);u.push({id:`${a}-archive`,type:"archive",label:"Memory Archive",description:`${S.length} compressed history files`,icon:Zx,color:"var(--accent-pink)",files:S,totalSize:E,path:c,depth:3})}const _=ti(s,/\.sh$/,c,[]);if(_.length>0&&u.push({id:`${a}-scripts`,type:"processing",label:"Automation Scripts",description:`${_.length} shell scripts`,icon:bN,color:"var(--accent-amber)",files:_,totalSize:_.reduce((E,C)=>E+(C.size||0),0),path:c,depth:0}),u.length===0&&(s.filter(E=>E.type==="directory").forEach((E,C)=>{const j=E.children?P1(E.children):{files:0,size:0};j.files>0&&u.push({id:`${a}-${E.name}`,type:"storage",label:E.name,description:`${j.files} files`,icon:Ca,color:["var(--accent-blue)","var(--accent-green)","var(--accent-amber)","var(--accent-purple)"][C%4],files:[],totalSize:j.size,path:`${c}/${E.name}`,depth:1})}),u.length===0)){const E=s.filter(C=>C.type==="file");if(E.length>0){const C=E.reduce((j,N)=>j+(N.size||0),0);u.push({id:`${a}-root`,type:"storage",label:"Root Files",description:`${E.length} files`,icon:Ca,color:"var(--accent-blue)",files:E.map(j=>({name:j.name,path:`${c}/${j.path}`,size:j.size})),totalSize:C,path:c,depth:1})}}i.push(...u)}),i.sort((a,r)=>a.depth-r.depth)}function cM({data:t}){const i=t.isExpanded??!1,a=t.fileCount!==void 0&&t.fileCount>0||t.size!==void 0&&t.size>0,r=t.IconComponent;return g.jsxs("div",{className:Ne("group relative min-w-[220px] max-w-[260px] transition-all duration-300",a&&"hover:scale-[1.02]"),children:[!t.isFirst&&g.jsx(Da,{type:"target",position:xe.Top,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-border"}),g.jsx("div",{className:Ne("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)`}}),g.jsxs(Xi,{className:Ne("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:[g.jsxs("div",{className:"flex items-start gap-3 p-3.5",children:[g.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:g.jsx(r,{className:"w-4 h-4",style:{color:`hsl(${t.color})`}})}),g.jsxs("div",{className:"flex-1 min-w-0 pt-0.5",children:[g.jsx("h3",{className:"text-[12px] font-semibold text-card-foreground tracking-tight leading-tight truncate",children:t.label}),g.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)&&g.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&&g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(fh,{className:"w-3 h-3 text-muted-foreground/60"}),g.jsx("span",{className:"text-xs font-semibold tabular-nums",style:{color:`hsl(${t.color})`},children:t.fileCount}),g.jsx("span",{className:"text-[9px] text-muted-foreground/60",children:t.fileCount===1?"file":"files"})]}),t.size!==void 0&&t.size>0&&g.jsx("span",{className:"text-[10px] text-muted-foreground font-mono tabular-nums",children:Cl(t.size)})]}),a&&g.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&&g.jsx(Da,{type:"source",position:xe.Bottom,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-border"})]})}const uM={layer:cM};function fM(){const[t,i]=T.useState(!1);return g.jsx("div",{className:"absolute bottom-4 left-4 z-10",children:g.jsxs("div",{className:Ne("bg-card border border-border rounded-xl backdrop-blur-sm transition-all duration-300 overflow-hidden shadow-xl",t?"w-[260px]":"w-auto"),children:[g.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:[g.jsx("div",{className:"p-1.5 rounded-lg bg-secondary",children:g.jsx(iv,{className:"w-3.5 h-3.5"})}),g.jsx("span",{className:"font-medium",children:"Memory Layers"}),g.jsx(Ix,{className:Ne("w-4 h-4 ml-auto text-muted-foreground/60 transition-transform duration-200",t&&"rotate-180")})]}),t&&g.jsxs("div",{className:"px-4 pb-4 space-y-2.5 text-[10px] border-t border-border pt-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Fx,{className:"w-3 h-3 text-emerald-400"}),g.jsx("span",{className:"text-muted-foreground",children:"Daily logs (temporal)"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(ev,{className:"w-3 h-3 text-purple-400"}),g.jsx("span",{className:"text-muted-foreground",children:"Persistent memory"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Kx,{className:"w-3 h-3 text-blue-400"}),g.jsx("span",{className:"text-muted-foreground",children:"Architecture docs"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Gx,{className:"w-3 h-3 text-indigo-400"}),g.jsx("span",{className:"text-muted-foreground",children:"Swarm telemetry"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Wx,{className:"w-3 h-3 text-amber-400"}),g.jsx("span",{className:"text-muted-foreground",children:"Specialized knowledge"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Zx,{className:"w-3 h-3 text-pink-400"}),g.jsx("span",{className:"text-muted-foreground",children:"Compressed archive"})]})]})]})})}function dM({nodeData:t,onClose:i}){if(!t)return null;const a=t.IconComponent;return g.jsx("div",{className:"absolute top-4 right-4 z-10 animate-in fade-in slide-in-from-right-2 duration-200",children:g.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:[g.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[g.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:g.jsx(a,{className:"w-4 h-4",style:{color:`hsl(${t.color})`}})}),g.jsx("h3",{className:"flex-1 text-[14px] font-semibold text-card-foreground",children:t.label}),g.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:g.jsx(dh,{className:"w-4 h-4"})})]}),g.jsxs("div",{className:"px-4 pb-4 space-y-3",children:[g.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed",children:t.description}),t.path&&g.jsxs("div",{className:"p-2.5 rounded-lg bg-secondary/50 border border-border/50",children:[g.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Path"}),g.jsx("p",{className:"text-[11px] font-mono text-foreground mt-0.5 truncate",children:t.path})]}),t.files&&t.files.length>0&&g.jsxs("div",{className:"space-y-1.5",children:[g.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Files"}),g.jsx("div",{className:"space-y-1 max-h-[120px] overflow-y-auto",children:t.files.map((r,s)=>g.jsxs("div",{className:"flex items-center justify-between p-1.5 rounded bg-secondary/30 border border-border/30",children:[g.jsx("span",{className:"text-[10px] font-mono text-foreground truncate flex-1",children:r.name}),r.size&&g.jsx("span",{className:"text-[9px] text-muted-foreground ml-2 shrink-0",children:Cl(r.size)})]},s))})]}),t.fileCount!==void 0&&t.fileCount>0&&g.jsxs("div",{className:"flex items-center justify-between p-2.5 rounded-lg bg-secondary/50 border border-border/50",children:[g.jsxs("div",{children:[g.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Files"}),g.jsx("p",{className:"text-sm font-semibold text-foreground",children:t.fileCount})]}),t.size!==void 0&&t.size>0&&g.jsxs("div",{className:"text-right",children:[g.jsx("span",{className:"text-[9px] text-muted-foreground uppercase tracking-wider",children:"Size"}),g.jsx("p",{className:"text-sm font-mono text-foreground",children:Cl(t.size)})]})]})]})]})})}function hM(){return g.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:g.jsxs("div",{className:"text-center max-w-md",children:[g.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:g.jsx(Ca,{className:"w-8 h-8 text-muted-foreground/60"})}),g.jsx("h2",{className:"text-lg font-semibold text-foreground mb-2",children:"No files found"}),g.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."}),g.jsx("p",{className:"text-xs text-muted-foreground/70",children:"The app auto-discovers .md files, logs, archives, and scripts."})]})})}function ax(){const{data:t,loading:i}=ov(),[a,r]=T.useState(null),s=T.useMemo(()=>t?sM(t):[],[t]),c=s.length>0,u=T.useCallback((w,S)=>{r(_=>_===S.id?null:S.id)},[]),h=T.useCallback(()=>{r(null)},[]),{nodes:p,edges:m}=T.useMemo(()=>{const w=[],S=[],_={};s.forEach(H=>{const k=H.depth;_[k]||(_[k]=[]),_[k].push(H)});const E=Object.keys(_).map(Number).sort((H,k)=>H-k),C=250,j=160;let N=0;w.push({id:"input",type:"layer",position:{x:400,y:N},data:{label:"User Input",description:"Query triggers memory retrieval",color:"var(--accent-indigo)",IconComponent:lN,isFirst:!0,isExpanded:a==="input"}}),N+=j;let A=["input"];return E.forEach(H=>{const k=_[H],L=400-(k.length-1)*C/2,V=[];k.forEach((Z,le)=>{const Q=L+le*C,X=Z.id;V.push(X),w.push({id:X,type:"layer",position:{x:Q,y:N},data:{label:Z.label,description:Z.description,color:Z.color,IconComponent:Z.icon,fileCount:Z.files.length,size:Z.totalSize,path:Z.path,files:Z.files.slice(0,6),isExpanded:a===X,layerType:Z.type}}),A.forEach(te=>{S.push({id:`e-${te}-${X}`,source:te,target:X,animated:!0,style:{stroke:"url(#edge-gradient)",strokeWidth:1.5}})})}),A=V,N+=j}),w.push({id:"output",type:"layer",position:{x:400,y:N},data:{label:"Response",description:"Context-enriched output",color:"var(--accent-pink)",IconComponent:jN,isLast:!0,isExpanded:a==="output"}}),A.forEach(H=>{S.push({id:`e-${H}-output`,source:H,target:"output",animated:!0,style:{stroke:"url(#edge-gradient)",strokeWidth:1.5}})}),{nodes:w,edges:S}},[s,a]),x=T.useMemo(()=>{if(!a)return null;const w=p.find(S=>S.id===a);return(w==null?void 0:w.data)??null},[a,p]);if(!i&&!c)return g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsx("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.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:g.jsx(kd,{className:"w-5 h-5 text-violet-400"})}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Memory Architecture"}),g.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Visualize your memory structure"})]})]})}),g.jsx(hM,{})]});const y=s.reduce((w,S)=>w+S.files.length,0),v=s.reduce((w,S)=>w+S.totalSize,0);return g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.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:g.jsx(kd,{className:"w-5 h-5 text-violet-400"})}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Memory Architecture"}),g.jsxs("p",{className:"text-xs text-muted-foreground/70",children:[s.length," layers · ",y," files · ",Cl(v)]})]})]}),g.jsx("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground/60",children:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(EN,{className:"w-3 h-3"}),g.jsxs("span",{children:["Depth: ",Math.max(...s.map(w=>w.depth))+1]})]})})]}),g.jsxs("div",{className:"flex-1 relative",children:[g.jsx("svg",{style:{position:"absolute",width:0,height:0},children:g.jsx("defs",{children:g.jsxs("linearGradient",{id:"edge-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"0",y2:"1000",children:[g.jsx("stop",{offset:"0%",stopColor:"#6366f1",stopOpacity:"0.5"}),g.jsx("stop",{offset:"50%",stopColor:"#a855f7",stopOpacity:"0.3"}),g.jsx("stop",{offset:"100%",stopColor:"#ec4899",stopOpacity:"0.5"})]})})}),g.jsx(kA,{nodes:p,edges:m,nodeTypes:uM,onNodeClick:u,onPaneClick:h,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:g.jsx(VA,{color:"hsl(var(--muted-foreground))",gap:32,size:1,style:{opacity:.08}})}),g.jsx(fM,{}),g.jsx(dM,{nodeData:x,onClose:()=>r(null)})]})]})}function rx(t,i){if(typeof t=="function")return t(i);t!=null&&(t.current=i)}function Rc(...t){return i=>{let a=!1;const r=t.map(s=>{const c=rx(s,i);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let s=0;s<r.length;s++){const c=r[s];typeof c=="function"?c():rx(t[s],null)}}}}function dn(...t){return T.useCallback(Rc(...t),t)}var mM=Symbol.for("react.lazy"),hc=Tx[" use ".trim().toString()];function pM(t){return typeof t=="object"&&t!==null&&"then"in t}function F1(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===mM&&"_payload"in t&&pM(t._payload)}function gM(t){const i=xM(t),a=T.forwardRef((r,s)=>{let{children:c,...u}=r;F1(c)&&typeof hc=="function"&&(c=hc(c._payload));const h=T.Children.toArray(c),p=h.find(bM);if(p){const m=p.props.children,x=h.map(y=>y===p?T.Children.count(m)>1?T.Children.only(null):T.isValidElement(m)?m.props.children:null:y);return g.jsx(i,{...u,ref:s,children:T.isValidElement(m)?T.cloneElement(m,void 0,x):null})}return g.jsx(i,{...u,ref:s,children:c})});return a.displayName=`${t}.Slot`,a}var yM=gM("Slot");function xM(t){const i=T.forwardRef((a,r)=>{let{children:s,...c}=a;if(F1(s)&&typeof hc=="function"&&(s=hc(s._payload)),T.isValidElement(s)){const u=SM(s),h=wM(c,s.props);return s.type!==T.Fragment&&(h.ref=r?Rc(r,u):u),T.cloneElement(s,h)}return T.Children.count(s)>1?T.Children.only(null):null});return i.displayName=`${t}.SlotClone`,i}var vM=Symbol("radix.slottable");function bM(t){return T.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===vM}function wM(t,i){const a={...i};for(const r in i){const s=t[r],c=i[r];/^on[A-Z]/.test(r)?s&&c?a[r]=(...h)=>{const p=c(...h);return s(...h),p}:s&&(a[r]=s):r==="style"?a[r]={...s,...c}:r==="className"&&(a[r]=[s,c].filter(Boolean).join(" "))}return{...t,...a}}function SM(t){var r,s;let i=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}const ox=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,sx=zx,I1=(t,i)=>a=>{var r;if((i==null?void 0:i.variants)==null)return sx(t,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:s,defaultVariants:c}=i,u=Object.keys(s).map(m=>{const x=a==null?void 0:a[m],y=c==null?void 0:c[m];if(x===null)return null;const v=ox(x)||ox(y);return s[m][v]}),h=a&&Object.entries(a).reduce((m,x)=>{let[y,v]=x;return v===void 0||(m[y]=v),m},{}),p=i==null||(r=i.compoundVariants)===null||r===void 0?void 0:r.reduce((m,x)=>{let{class:y,className:v,...w}=x;return Object.entries(w).every(S=>{let[_,E]=S;return Array.isArray(E)?E.includes({...c,...h}[_]):{...c,...h}[_]===E})?[...m,y,v]:m},[]);return sx(t,u,p,a==null?void 0:a.class,a==null?void 0:a.className)},EM=I1("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"}}),ni=T.forwardRef(({className:t,variant:i,size:a,asChild:r=!1,...s},c)=>{const u=r?yM:"button";return g.jsx(u,{className:Ne(EM({variant:i,size:a,className:t})),ref:c,...s})});ni.displayName="Button";function NM(){const{entries:t,isPaused:i,togglePause:a,clearLog:r}=gh(),{sources:s,toggleSource:c,resetOnboarding:u}=Xr(),[h,p]=T.useState(!1),m=h?t:t.slice(0,20),x=s.filter(v=>v.enabled),y=()=>{const v=UN(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 g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx($r,{className:"w-5 h-5 text-emerald-400"}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-sm font-semibold text-foreground",children:"Security & Privacy"}),g.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Monitor all file access activity"})]})]}),g.jsx(ni,{variant:i?"glow":"outline",size:"sm",onClick:a,className:Ne(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?g.jsxs(g.Fragment,{children:[g.jsx(Pg,{className:"w-4 h-4 mr-1"}),"Paused - Resume"]}):g.jsxs(g.Fragment,{children:[g.jsx($r,{className:"w-4 h-4 mr-1"}),"Pause All Access"]})})]}),g.jsxs("div",{className:"flex-1 overflow-auto p-6 space-y-6",children:[g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[g.jsx(Ad,{icon:CN,title:"Network Status",status:"Local Only",description:"localhost:3001",variant:"success"}),g.jsx(Ad,{icon:ch,title:"Access Mode",status:"Read-Only",description:"Files are never modified",variant:"success"}),g.jsx(Ad,{icon:mN,title:"Data Storage",status:"Local Only",description:"Nothing uploaded",variant:"success"})]}),g.jsxs(Xi,{className:"p-5 bg-card",children:[g.jsx("div",{className:"flex items-center justify-between mb-4",children:g.jsxs("h2",{className:"text-sm font-medium text-foreground flex items-center gap-2",children:[g.jsx(lv,{className:"w-4 h-4 text-muted-foreground"}),"Active Permissions"]})}),g.jsx("div",{className:"space-y-2",children:s.map(v=>g.jsxs("div",{className:Ne("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:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(Ca,{className:Ne("w-4 h-4",v.enabled?"text-emerald-500":"text-muted-foreground")}),g.jsxs("div",{children:[g.jsx("span",{className:"text-sm font-mono text-foreground",children:v.path}),g.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:"READ-ONLY"})]})]}),g.jsx(ni,{variant:"ghost",size:"sm",onClick:()=>c(v.id),className:Ne("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))}),x.length===0&&g.jsx("div",{className:"mt-4 p-4 rounded-xl bg-red-500/10 border border-red-500/20",children:g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx(Pg,{className:"w-5 h-5 text-red-400 shrink-0 mt-0.5"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm font-medium text-red-400 mb-1",children:"All Access Disabled"}),g.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."}),g.jsx(ni,{variant:"outline",size:"sm",onClick:()=>u(),className:"text-red-400 border-red-500/30 hover:bg-red-500/10",children:"Reconfigure Sources"})]})]})})]}),g.jsxs(Xi,{className:"p-5 bg-card",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsxs("h2",{className:"text-sm font-medium text-foreground flex items-center gap-2",children:[g.jsx(tv,{className:"w-4 h-4 text-muted-foreground"}),"Activity Log",g.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",t.length," entries)"]})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs(ni,{variant:"ghost",size:"sm",onClick:y,disabled:t.length===0,className:"text-xs",children:[g.jsx(DE,{className:"w-3.5 h-3.5 mr-1"}),"Export CSV"]}),g.jsxs(ni,{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:[g.jsx(av,{className:"w-3.5 h-3.5 mr-1"}),"Clear"]})]})]}),i&&g.jsx("div",{className:"mb-4 p-3 rounded-lg bg-amber-500/10 border border-amber-500/20",children:g.jsxs("p",{className:"text-sm text-amber-400 flex items-center gap-2",children:[g.jsx(LE,{className:"w-4 h-4"}),"Logging paused. File access is disabled."]})}),t.length===0?g.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No activity recorded yet. Browse files to see access logs."}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"space-y-1 max-h-[400px] overflow-auto",children:m.map(v=>g.jsx(_M,{entry:v},v.id))}),t.length>20&&g.jsx(ni,{variant:"ghost",size:"sm",onClick:()=>p(!h),className:"w-full mt-3 text-xs",children:h?"Show less":`Show all ${t.length} entries`})]})]}),g.jsxs("div",{className:"p-4 rounded-xl bg-secondary/50 border border-border",children:[g.jsxs("h3",{className:"text-sm font-medium text-foreground mb-2 flex items-center gap-2",children:[g.jsx($r,{className:"w-4 h-4 text-emerald-400"}),"Security Guarantees"]}),g.jsxs("ul",{className:"space-y-1.5 text-xs text-muted-foreground",children:[g.jsxs("li",{className:"flex items-start gap-2",children:[g.jsx(ii,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),g.jsx("span",{children:"All data stays on your machine. Nothing is ever uploaded or transmitted."})]}),g.jsxs("li",{className:"flex items-start gap-2",children:[g.jsx(ii,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),g.jsx("span",{children:"Read-only access. Files are never created, modified, or deleted."})]}),g.jsxs("li",{className:"flex items-start gap-2",children:[g.jsx(ii,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),g.jsx("span",{children:"No analytics, telemetry, or tracking of any kind."})]}),g.jsxs("li",{className:"flex items-start gap-2",children:[g.jsx(ii,{className:"w-3.5 h-3.5 text-emerald-400 mt-0.5 shrink-0"}),g.jsx("span",{children:"Open source. Audit the code yourself on GitHub."})]})]})]})]})]})}function Ad({icon:t,title:i,status:a,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 g.jsx(Xi,{className:Ne("p-4",c[s]),children:g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx("div",{className:"p-2 rounded-lg bg-secondary/50",children:g.jsx(t,{className:Ne("w-4 h-4",u[s])})}),g.jsxs("div",{children:[g.jsx("p",{className:"text-xs text-muted-foreground",children:i}),g.jsx("p",{className:Ne("text-sm font-medium",u[s]),children:a}),g.jsx("p",{className:"text-xs text-muted-foreground/70 mt-0.5",children:r})]})]})})}function _M({entry:t}){const i=new Date(t.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),a={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 g.jsxs("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg hover:bg-secondary/50 transition-colors text-xs",children:[g.jsx("span",{className:"text-muted-foreground/50 font-mono w-20 shrink-0",children:i}),g.jsx("span",{className:Ne("px-1.5 py-0.5 rounded text-[10px] font-medium uppercase w-12 text-center shrink-0",a[t.type]),children:t.type}),g.jsx("span",{className:"font-mono text-muted-foreground truncate flex-1",children:t.path}),t.success?g.jsx(ii,{className:"w-3.5 h-3.5 text-emerald-400 shrink-0"}):g.jsx(dh,{className:"w-3.5 h-3.5 text-red-400 shrink-0"})]})}function CM(){const[t,i]=T.useState(0),{sources:a,setSources:r,toggleSource:s,updateSourcePath:c,completeOnboarding:u,addSource:h,removeSource:p}=Xr(),[m,x]=T.useState(!1),y=T.useCallback(async()=>{x(!0);try{const j=Xr.getState().sources,N=await Promise.all(j.map(async A=>{try{const H=await fetch(`/api/check-path?path=${encodeURIComponent(A.path)}`);if(H.ok){const k=await H.json();return{...A,detected:k.exists,name:k.exists?k.expandedPath:A.name}}}catch{}return{...A,detected:!1}}));r(N)}catch{}x(!1)},[r]),v=j=>{i(j),j===1&&setTimeout(y,0)},w=a.filter(j=>j.enabled&&j.detected),S=[{title:"Welcome",component:g.jsx(TM,{})},{title:"Configure",component:g.jsx(AM,{sources:a,onToggle:s,onUpdatePath:c,detecting:m,onRedetect:y,onAddSource:h,onRemoveSource:p})},{title:"Review",component:g.jsx(jM,{sources:w})}],_=t===0||t===1&&w.length>0||t===2,E=()=>{t<S.length-1?v(t+1):u()},C=()=>{t>0&&v(t-1)};return g.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-8",children:g.jsxs("div",{className:"w-full max-w-lg",children:[g.jsx("div",{className:"flex items-center justify-center gap-2 mb-8",children:S.map((j,N)=>g.jsxs("div",{className:"flex items-center",children:[g.jsx("div",{className:Ne("w-8 h-8 rounded-full flex items-center justify-center text-xs font-medium transition-all",N<t&&"bg-emerald-500/20 text-emerald-400",N===t&&"bg-violet-500/20 text-violet-400 ring-2 ring-violet-500/50",N>t&&"bg-secondary text-muted-foreground"),children:N<t?g.jsx(ii,{className:"w-4 h-4"}):N+1}),N<S.length-1&&g.jsx("div",{className:Ne("w-12 h-0.5 mx-2 transition-colors",N<t?"bg-emerald-500/50":"bg-secondary")})]},N))}),g.jsxs(Xi,{className:"p-8 bg-card border-border",children:[S[t].component,g.jsxs("div",{className:"flex items-center justify-between mt-8 pt-6 border-t border-border",children:[g.jsxs(ni,{variant:"ghost",onClick:C,disabled:t===0,className:Ne(t===0&&"invisible"),children:[g.jsx(_E,{className:"w-4 h-4 mr-1"}),"Back"]}),g.jsx(ni,{variant:"glow",onClick:E,disabled:!_,children:t===S.length-1?"Get Started":"Continue"})]})]}),g.jsxs("p",{className:"text-center text-xs text-zinc-600 mt-6",children:["OpenClaw Memory Mapper v","1.0.0"," · Open Source"]})]})})}function TM(){return g.jsxs("div",{className:"text-center",children:[g.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:g.jsx(Px,{className:"w-10 h-10 text-violet-400"})}),g.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-2",children:"Welcome to Memory Mapper"}),g.jsx("p",{className:"text-muted-foreground mb-8",children:"Visualize your Claude agent's memory architecture"}),g.jsxs("div",{className:"grid gap-4 text-left",children:[g.jsx(Md,{icon:$r,title:"100% Local",description:"All data stays on your machine. Nothing is ever uploaded.",color:"emerald"}),g.jsx(Md,{icon:ch,title:"Read-Only",description:"We only read files. Your memory data is never modified.",color:"blue"}),g.jsx(Md,{icon:rv,title:"No Telemetry",description:"Zero tracking, analytics, or external connections.",color:"amber"})]})]})}function Md({icon:t,title:i,description:a,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 g.jsxs("div",{className:"flex items-start gap-4 p-4 rounded-xl bg-secondary/30 border border-border",children:[g.jsx("div",{className:Ne("p-2 rounded-lg border",s[r]),children:g.jsx(t,{className:"w-4 h-4"})}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-sm font-medium text-foreground",children:i}),g.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:a})]})]})}function AM({sources:t,onToggle:i,onUpdatePath:a,detecting:r,onRedetect:s,onAddSource:c,onRemoveSource:u}){const[h,p]=T.useState(null),m=()=>{const x=c();p(x)};return g.jsxs("div",{children:[g.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"Configure Sources"}),g.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Select which memory directories to visualize. Click paths to edit."}),g.jsx("div",{className:"space-y-3",children:t.map(x=>g.jsx(MM,{source:x,onToggle:()=>i(x.id),onUpdatePath:y=>{a(x.id,y),setTimeout(s,10)},onRemove:()=>u(x.id),detecting:r,isEditing:h===x.id,onStartEdit:()=>p(x.id),onEndEdit:()=>p(null),canRemove:t.length>1},x.id))}),g.jsxs("button",{onClick:m,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:[g.jsx(uN,{className:"w-4 h-4"}),g.jsx("span",{className:"text-sm",children:"Add custom path"})]}),r&&g.jsxs("p",{className:"text-xs text-muted-foreground mt-4 flex items-center gap-2",children:[g.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&&g.jsx("div",{className:"mt-4 p-4 rounded-xl bg-blue-500/10 border border-blue-500/20",children:g.jsx("p",{className:"text-sm text-blue-400",children:'Click "Add custom path" to add your memory folder (e.g., ~/my-memory).'})}),!r&&t.length>0&&t.every(x=>!x.detected)&&g.jsx("div",{className:"mt-4 p-4 rounded-xl bg-amber-500/10 border border-amber-500/20",children:g.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 MM({source:t,onToggle:i,onUpdatePath:a,onRemove:r,detecting:s,isEditing:c,onStartEdit:u,onEndEdit:h,canRemove:p}){const[m,x]=T.useState(t.path),y=s?uh:t.detected?KE:JE,v=()=>{a(m),h()},w=S=>{S.key==="Enter"?v():S.key==="Escape"&&(x(t.path),h())};return g.jsxs("div",{className:Ne("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:[g.jsx("button",{onClick:i,disabled:!t.detected,className:Ne("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&&g.jsx(ii,{className:"w-3 h-3 text-white"})}),g.jsx(y,{className:Ne("w-5 h-5 shrink-0",s&&"animate-pulse text-muted-foreground",!s&&t.detected&&"text-emerald-400",!s&&!t.detected&&"text-zinc-600")}),g.jsx("div",{className:"flex-1 min-w-0",children:c?g.jsx("input",{type:"text",value:m,onChange:S=>x(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"}):g.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||g.jsx("span",{className:"text-muted-foreground/50",children:"Click to enter path..."})})}),!s&&!c&&g.jsx("span",{className:Ne("text-xs shrink-0",t.detected?"text-emerald-400":"text-zinc-600"),children:t.detected?"Found":"Not found"}),p&&!c&&g.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:g.jsx(av,{className:"w-4 h-4"})})]})}function jM({sources:t}){return g.jsxs("div",{children:[g.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"Review Permissions"}),g.jsxs("p",{className:"text-sm text-muted-foreground mb-6",children:["Memory Mapper will have"," ",g.jsx("strong",{className:"text-foreground",children:"read-only"})," access to:"]}),g.jsx("div",{className:"space-y-3 mb-6",children:t.map(i=>g.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-xl bg-secondary/30 border border-border",children:[g.jsx(uh,{className:"w-5 h-5 text-violet-400"}),g.jsxs("div",{className:"flex-1",children:[g.jsx("span",{className:"font-mono text-sm text-foreground",children:i.path}),g.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"Memory files, logs, and configuration"})]}),g.jsx(ii,{className:"w-4 h-4 text-emerald-400"})]},i.id))}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(jd,{icon:lv,text:"Data never leaves your machine"}),g.jsx(jd,{icon:ch,text:"Files are never modified or deleted"}),g.jsx(jd,{icon:rv,text:"No external network connections"})]})]})}function jd({icon:t,text:i}){return g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[g.jsx(t,{className:"w-3.5 h-3.5 text-emerald-500"}),g.jsx("span",{children:i})]})}function dt(t,i,{checkForDefaultPrevented:a=!0}={}){return function(s){if(t==null||t(s),a===!1||!s.defaultPrevented)return i==null?void 0:i(s)}}function Oc(t,i=[]){let a=[];function r(c,u){const h=T.createContext(u),p=a.length;a=[...a,u];const m=y=>{var C;const{scope:v,children:w,...S}=y,_=((C=v==null?void 0:v[t])==null?void 0:C[p])||h,E=T.useMemo(()=>S,Object.values(S));return g.jsx(_.Provider,{value:E,children:w})};m.displayName=c+"Provider";function x(y,v){var _;const w=((_=v==null?void 0:v[t])==null?void 0:_[p])||h,S=T.useContext(w);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${c}\``)}return[m,x]}const s=()=>{const c=a.map(u=>T.createContext(u));return function(h){const p=(h==null?void 0:h[t])||c;return T.useMemo(()=>({[`__scope${t}`]:{...h,[t]:p}}),[h,p])}};return s.scopeName=t,[r,zM(s,...i)]}function zM(...t){const i=t[0];if(t.length===1)return i;const a=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(c){const u=r.reduce((h,{useScope:p,scopeName:m})=>{const y=p(c)[`__scope${m}`];return{...h,...y}},{});return T.useMemo(()=>({[`__scope${i.scopeName}`]:u}),[u])}};return a.scopeName=i.scopeName,a}function RM(t){const i=OM(t),a=T.forwardRef((r,s)=>{const{children:c,...u}=r,h=T.Children.toArray(c),p=h.find(kM);if(p){const m=p.props.children,x=h.map(y=>y===p?T.Children.count(m)>1?T.Children.only(null):T.isValidElement(m)?m.props.children:null:y);return g.jsx(i,{...u,ref:s,children:T.isValidElement(m)?T.cloneElement(m,void 0,x):null})}return g.jsx(i,{...u,ref:s,children:c})});return a.displayName=`${t}.Slot`,a}function OM(t){const i=T.forwardRef((a,r)=>{const{children:s,...c}=a;if(T.isValidElement(s)){const u=HM(s),h=LM(c,s.props);return s.type!==T.Fragment&&(h.ref=r?Rc(r,u):u),T.cloneElement(s,h)}return T.Children.count(s)>1?T.Children.only(null):null});return i.displayName=`${t}.SlotClone`,i}var DM=Symbol("radix.slottable");function kM(t){return T.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===DM}function LM(t,i){const a={...i};for(const r in i){const s=t[r],c=i[r];/^on[A-Z]/.test(r)?s&&c?a[r]=(...h)=>{const p=c(...h);return s(...h),p}:s&&(a[r]=s):r==="style"?a[r]={...s,...c}:r==="className"&&(a[r]=[s,c].filter(Boolean).join(" "))}return{...t,...a}}function HM(t){var r,s;let i=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var BM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Dt=BM.reduce((t,i)=>{const a=RM(`Primitive.${i}`),r=T.forwardRef((s,c)=>{const{asChild:u,...h}=s,p=u?a:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(p,{...h,ref:c})});return r.displayName=`Primitive.${i}`,{...t,[i]:r}},{});function J1(t,i){t&&Tc.flushSync(()=>t.dispatchEvent(i))}function Gi(t){const i=T.useRef(t);return T.useEffect(()=>{i.current=t}),T.useMemo(()=>(...a)=>{var r;return(r=i.current)==null?void 0:r.call(i,...a)},[])}function UM(t,i=globalThis==null?void 0:globalThis.document){const a=Gi(t);T.useEffect(()=>{const r=s=>{s.key==="Escape"&&a(s)};return i.addEventListener("keydown",r,{capture:!0}),()=>i.removeEventListener("keydown",r,{capture:!0})},[a,i])}var VM="DismissableLayer",Wd="dismissableLayer.update",$M="dismissableLayer.pointerDownOutside",YM="dismissableLayer.focusOutside",cx,W1=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kh=T.forwardRef((t,i)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,onDismiss:h,...p}=t,m=T.useContext(W1),[x,y]=T.useState(null),v=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=T.useState({}),S=dn(i,L=>y(L)),_=Array.from(m.layers),[E]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),C=_.indexOf(E),j=x?_.indexOf(x):-1,N=m.layersWithOutsidePointerEventsDisabled.size>0,A=j>=C,H=XM(L=>{const V=L.target,Z=[...m.branches].some(le=>le.contains(V));!A||Z||(s==null||s(L),u==null||u(L),L.defaultPrevented||h==null||h())},v),k=GM(L=>{const V=L.target;[...m.branches].some(le=>le.contains(V))||(c==null||c(L),u==null||u(L),L.defaultPrevented||h==null||h())},v);return UM(L=>{j===m.layers.size-1&&(r==null||r(L),!L.defaultPrevented&&h&&(L.preventDefault(),h()))},v),T.useEffect(()=>{if(x)return a&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(cx=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(x)),m.layers.add(x),ux(),()=>{a&&m.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=cx)}},[x,v,a,m]),T.useEffect(()=>()=>{x&&(m.layers.delete(x),m.layersWithOutsidePointerEventsDisabled.delete(x),ux())},[x,m]),T.useEffect(()=>{const L=()=>w({});return document.addEventListener(Wd,L),()=>document.removeEventListener(Wd,L)},[]),g.jsx(Dt.div,{...p,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,H.onPointerDownCapture)})});kh.displayName=VM;var qM="DismissableLayerBranch",eb=T.forwardRef((t,i)=>{const a=T.useContext(W1),r=T.useRef(null),s=dn(i,r);return T.useEffect(()=>{const c=r.current;if(c)return a.branches.add(c),()=>{a.branches.delete(c)}},[a.branches]),g.jsx(Dt.div,{...t,ref:s})});eb.displayName=qM;function XM(t,i=globalThis==null?void 0:globalThis.document){const a=Gi(t),r=T.useRef(!1),s=T.useRef(()=>{});return T.useEffect(()=>{const c=h=>{if(h.target&&!r.current){let p=function(){tb($M,a,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(i.removeEventListener("click",s.current),s.current=p,i.addEventListener("click",s.current,{once:!0})):p()}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,a]),{onPointerDownCapture:()=>r.current=!0}}function GM(t,i=globalThis==null?void 0:globalThis.document){const a=Gi(t),r=T.useRef(!1);return T.useEffect(()=>{const s=c=>{c.target&&!r.current&&tb(YM,a,{originalEvent:c},{discrete:!1})};return i.addEventListener("focusin",s),()=>i.removeEventListener("focusin",s)},[i,a]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ux(){const t=new CustomEvent(Wd);document.dispatchEvent(t)}function tb(t,i,a,{discrete:r}){const s=a.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:a});i&&s.addEventListener(t,i,{once:!0}),r?J1(s,c):s.dispatchEvent(c)}var ZM=kh,QM=eb,Zi=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{};const KM=["top","right","bottom","left"],Qi=Math.min,Xt=Math.max,mc=Math.round,Zs=Math.floor,_n=t=>({x:t,y:t}),PM={left:"right",right:"left",bottom:"top",top:"bottom"},FM={start:"end",end:"start"};function eh(t,i,a){return Xt(t,Qi(i,a))}function ri(t,i){return typeof t=="function"?t(i):t}function oi(t){return t.split("-")[0]}function Ua(t){return t.split("-")[1]}function Lh(t){return t==="x"?"y":"x"}function Hh(t){return t==="y"?"height":"width"}const IM=new Set(["top","bottom"]);function En(t){return IM.has(oi(t))?"y":"x"}function Bh(t){return Lh(En(t))}function JM(t,i,a){a===void 0&&(a=!1);const r=Ua(t),s=Bh(t),c=Hh(s);let u=s==="x"?r===(a?"end":"start")?"right":"left":r==="start"?"bottom":"top";return i.reference[c]>i.floating[c]&&(u=pc(u)),[u,pc(u)]}function WM(t){const i=pc(t);return[th(t),i,th(i)]}function th(t){return t.replace(/start|end/g,i=>FM[i])}const fx=["left","right"],dx=["right","left"],ej=["top","bottom"],tj=["bottom","top"];function nj(t,i,a){switch(t){case"top":case"bottom":return a?i?dx:fx:i?fx:dx;case"left":case"right":return i?ej:tj;default:return[]}}function ij(t,i,a,r){const s=Ua(t);let c=nj(oi(t),a==="start",r);return s&&(c=c.map(u=>u+"-"+s),i&&(c=c.concat(c.map(th)))),c}function pc(t){return t.replace(/left|right|bottom|top/g,i=>PM[i])}function lj(t){return{top:0,right:0,bottom:0,left:0,...t}}function nb(t){return typeof t!="number"?lj(t):{top:t,right:t,bottom:t,left:t}}function gc(t){const{x:i,y:a,width:r,height:s}=t;return{width:r,height:s,top:a,left:i,right:i+r,bottom:a+s,x:i,y:a}}function hx(t,i,a){let{reference:r,floating:s}=t;const c=En(i),u=Bh(i),h=Hh(u),p=oi(i),m=c==="y",x=r.x+r.width/2-s.width/2,y=r.y+r.height/2-s.height/2,v=r[h]/2-s[h]/2;let w;switch(p){case"top":w={x,y:r.y-s.height};break;case"bottom":w={x,y:r.y+r.height};break;case"right":w={x:r.x+r.width,y};break;case"left":w={x:r.x-s.width,y};break;default:w={x:r.x,y:r.y}}switch(Ua(i)){case"start":w[u]-=v*(a&&m?-1:1);break;case"end":w[u]+=v*(a&&m?-1:1);break}return w}async function aj(t,i){var a;i===void 0&&(i={});const{x:r,y:s,platform:c,rects:u,elements:h,strategy:p}=t,{boundary:m="clippingAncestors",rootBoundary:x="viewport",elementContext:y="floating",altBoundary:v=!1,padding:w=0}=ri(i,t),S=nb(w),E=h[v?y==="floating"?"reference":"floating":y],C=gc(await c.getClippingRect({element:(a=await(c.isElement==null?void 0:c.isElement(E)))==null||a?E:E.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(h.floating)),boundary:m,rootBoundary:x,strategy:p})),j=y==="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},H=gc(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:j,offsetParent:N,strategy:p}):j);return{top:(C.top-H.top+S.top)/A.y,bottom:(H.bottom-C.bottom+S.bottom)/A.y,left:(C.left-H.left+S.left)/A.x,right:(H.right-C.right+S.right)/A.x}}const rj=async(t,i,a)=>{const{placement:r="bottom",strategy:s="absolute",middleware:c=[],platform:u}=a,h=c.filter(Boolean),p=await(u.isRTL==null?void 0:u.isRTL(i));let m=await u.getElementRects({reference:t,floating:i,strategy:s}),{x,y}=hx(m,r,p),v=r,w={},S=0;for(let E=0;E<h.length;E++){var _;const{name:C,fn:j}=h[E],{x:N,y:A,data:H,reset:k}=await j({x,y,initialPlacement:r,placement:v,strategy:s,middlewareData:w,rects:m,platform:{...u,detectOverflow:(_=u.detectOverflow)!=null?_:aj},elements:{reference:t,floating:i}});x=N??x,y=A??y,w={...w,[C]:{...w[C],...H}},k&&S<=50&&(S++,typeof k=="object"&&(k.placement&&(v=k.placement),k.rects&&(m=k.rects===!0?await u.getElementRects({reference:t,floating:i,strategy:s}):k.rects),{x,y}=hx(m,v,p)),E=-1)}return{x,y,placement:v,strategy:s,middlewareData:w}},oj=t=>({name:"arrow",options:t,async fn(i){const{x:a,y:r,placement:s,rects:c,platform:u,elements:h,middlewareData:p}=i,{element:m,padding:x=0}=ri(t,i)||{};if(m==null)return{};const y=nb(x),v={x:a,y:r},w=Bh(s),S=Hh(w),_=await u.getDimensions(m),E=w==="y",C=E?"top":"left",j=E?"bottom":"right",N=E?"clientHeight":"clientWidth",A=c.reference[S]+c.reference[w]-v[w]-c.floating[S],H=v[w]-c.reference[w],k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let L=k?k[N]:0;(!L||!await(u.isElement==null?void 0:u.isElement(k)))&&(L=h.floating[N]||c.floating[S]);const V=A/2-H/2,Z=L/2-_[S]/2-1,le=Qi(y[C],Z),Q=Qi(y[j],Z),X=le,te=L-_[S]-Q,D=L/2-_[S]/2+V,G=eh(X,D,te),z=!p.arrow&&Ua(s)!=null&&D!==G&&c.reference[S]/2-(D<X?le:Q)-_[S]/2<0,B=z?D<X?D-X:D-te:0;return{[w]:v[w]+B,data:{[w]:G,centerOffset:D-G-B,...z&&{alignmentOffset:B}},reset:z}}}),sj=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(i){var a,r;const{placement:s,middlewareData:c,rects:u,initialPlacement:h,platform:p,elements:m}=i,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:_=!0,...E}=ri(t,i);if((a=c.arrow)!=null&&a.alignmentOffset)return{};const C=oi(s),j=En(h),N=oi(h)===h,A=await(p.isRTL==null?void 0:p.isRTL(m.floating)),H=v||(N||!_?[pc(h)]:WM(h)),k=S!=="none";!v&&k&&H.push(...ij(h,_,S,A));const L=[h,...H],V=await p.detectOverflow(i,E),Z=[];let le=((r=c.flip)==null?void 0:r.overflows)||[];if(x&&Z.push(V[C]),y){const D=JM(s,u,A);Z.push(V[D[0]],V[D[1]])}if(le=[...le,{placement:s,overflows:Z}],!Z.every(D=>D<=0)){var Q,X;const D=(((Q=c.flip)==null?void 0:Q.index)||0)+1,G=L[D];if(G&&(!(y==="alignment"?j!==En(G):!1)||le.every(O=>En(O.placement)===j?O.overflows[0]>0:!0)))return{data:{index:D,overflows:le},reset:{placement:G}};let z=(X=le.filter(B=>B.overflows[0]<=0).sort((B,O)=>B.overflows[1]-O.overflows[1])[0])==null?void 0:X.placement;if(!z)switch(w){case"bestFit":{var te;const B=(te=le.filter(O=>{if(k){const $=En(O.placement);return $===j||$==="y"}return!0}).map(O=>[O.placement,O.overflows.filter($=>$>0).reduce(($,J)=>$+J,0)]).sort((O,$)=>O[1]-$[1])[0])==null?void 0:te[0];B&&(z=B);break}case"initialPlacement":z=h;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function mx(t,i){return{top:t.top-i.height,right:t.right-i.width,bottom:t.bottom-i.height,left:t.left-i.width}}function px(t){return KM.some(i=>t[i]>=0)}const cj=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(i){const{rects:a,platform:r}=i,{strategy:s="referenceHidden",...c}=ri(t,i);switch(s){case"referenceHidden":{const u=await r.detectOverflow(i,{...c,elementContext:"reference"}),h=mx(u,a.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:px(h)}}}case"escaped":{const u=await r.detectOverflow(i,{...c,altBoundary:!0}),h=mx(u,a.floating);return{data:{escapedOffsets:h,escaped:px(h)}}}default:return{}}}}},ib=new Set(["left","top"]);async function uj(t,i){const{placement:a,platform:r,elements:s}=t,c=await(r.isRTL==null?void 0:r.isRTL(s.floating)),u=oi(a),h=Ua(a),p=En(a)==="y",m=ib.has(u)?-1:1,x=c&&p?-1:1,y=ri(i,t);let{mainAxis:v,crossAxis:w,alignmentAxis:S}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return h&&typeof S=="number"&&(w=h==="end"?S*-1:S),p?{x:w*x,y:v*m}:{x:v*m,y:w*x}}const fj=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(i){var a,r;const{x:s,y:c,placement:u,middlewareData:h}=i,p=await uj(i,t);return u===((a=h.offset)==null?void 0:a.placement)&&(r=h.arrow)!=null&&r.alignmentOffset?{}:{x:s+p.x,y:c+p.y,data:{...p,placement:u}}}}},dj=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(i){const{x:a,y:r,placement:s,platform:c}=i,{mainAxis:u=!0,crossAxis:h=!1,limiter:p={fn:C=>{let{x:j,y:N}=C;return{x:j,y:N}}},...m}=ri(t,i),x={x:a,y:r},y=await c.detectOverflow(i,m),v=En(oi(s)),w=Lh(v);let S=x[w],_=x[v];if(u){const C=w==="y"?"top":"left",j=w==="y"?"bottom":"right",N=S+y[C],A=S-y[j];S=eh(N,S,A)}if(h){const C=v==="y"?"top":"left",j=v==="y"?"bottom":"right",N=_+y[C],A=_-y[j];_=eh(N,_,A)}const E=p.fn({...i,[w]:S,[v]:_});return{...E,data:{x:E.x-a,y:E.y-r,enabled:{[w]:u,[v]:h}}}}}},hj=function(t){return t===void 0&&(t={}),{options:t,fn(i){const{x:a,y:r,placement:s,rects:c,middlewareData:u}=i,{offset:h=0,mainAxis:p=!0,crossAxis:m=!0}=ri(t,i),x={x:a,y:r},y=En(s),v=Lh(y);let w=x[v],S=x[y];const _=ri(h,i),E=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:0,crossAxis:0,..._};if(p){const N=v==="y"?"height":"width",A=c.reference[v]-c.floating[N]+E.mainAxis,H=c.reference[v]+c.reference[N]-E.mainAxis;w<A?w=A:w>H&&(w=H)}if(m){var C,j;const N=v==="y"?"width":"height",A=ib.has(oi(s)),H=c.reference[y]-c.floating[N]+(A&&((C=u.offset)==null?void 0:C[y])||0)+(A?0:E.crossAxis),k=c.reference[y]+c.reference[N]+(A?0:((j=u.offset)==null?void 0:j[y])||0)-(A?E.crossAxis:0);S<H?S=H:S>k&&(S=k)}return{[v]:w,[y]:S}}}},mj=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(i){var a,r;const{placement:s,rects:c,platform:u,elements:h}=i,{apply:p=()=>{},...m}=ri(t,i),x=await u.detectOverflow(i,m),y=oi(s),v=Ua(s),w=En(s)==="y",{width:S,height:_}=c.floating;let E,C;y==="top"||y==="bottom"?(E=y,C=v===(await(u.isRTL==null?void 0:u.isRTL(h.floating))?"start":"end")?"left":"right"):(C=y,E=v==="end"?"top":"bottom");const j=_-x.top-x.bottom,N=S-x.left-x.right,A=Qi(_-x[E],j),H=Qi(S-x[C],N),k=!i.middlewareData.shift;let L=A,V=H;if((a=i.middlewareData.shift)!=null&&a.enabled.x&&(V=N),(r=i.middlewareData.shift)!=null&&r.enabled.y&&(L=j),k&&!v){const le=Xt(x.left,0),Q=Xt(x.right,0),X=Xt(x.top,0),te=Xt(x.bottom,0);w?V=S-2*(le!==0||Q!==0?le+Q:Xt(x.left,x.right)):L=_-2*(X!==0||te!==0?X+te:Xt(x.top,x.bottom))}await p({...i,availableWidth:V,availableHeight:L});const Z=await u.getDimensions(h.floating);return S!==Z.width||_!==Z.height?{reset:{rects:!0}}:{}}}};function Dc(){return typeof window<"u"}function Va(t){return lb(t)?(t.nodeName||"").toLowerCase():"#document"}function Zt(t){var i;return(t==null||(i=t.ownerDocument)==null?void 0:i.defaultView)||window}function Mn(t){var i;return(i=(lb(t)?t.ownerDocument:t.document)||window.document)==null?void 0:i.documentElement}function lb(t){return Dc()?t instanceof Node||t instanceof Zt(t).Node:!1}function hn(t){return Dc()?t instanceof Element||t instanceof Zt(t).Element:!1}function Tn(t){return Dc()?t instanceof HTMLElement||t instanceof Zt(t).HTMLElement:!1}function gx(t){return!Dc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Zt(t).ShadowRoot}const pj=new Set(["inline","contents"]);function so(t){const{overflow:i,overflowX:a,overflowY:r,display:s}=mn(t);return/auto|scroll|overlay|hidden|clip/.test(i+r+a)&&!pj.has(s)}const gj=new Set(["table","td","th"]);function yj(t){return gj.has(Va(t))}const xj=[":popover-open",":modal"];function kc(t){return xj.some(i=>{try{return t.matches(i)}catch{return!1}})}const vj=["transform","translate","scale","rotate","perspective"],bj=["transform","translate","scale","rotate","perspective","filter"],wj=["paint","layout","strict","content"];function Uh(t){const i=Vh(),a=hn(t)?mn(t):t;return vj.some(r=>a[r]?a[r]!=="none":!1)||(a.containerType?a.containerType!=="normal":!1)||!i&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!i&&(a.filter?a.filter!=="none":!1)||bj.some(r=>(a.willChange||"").includes(r))||wj.some(r=>(a.contain||"").includes(r))}function Sj(t){let i=Ki(t);for(;Tn(i)&&!ka(i);){if(Uh(i))return i;if(kc(i))return null;i=Ki(i)}return null}function Vh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ej=new Set(["html","body","#document"]);function ka(t){return Ej.has(Va(t))}function mn(t){return Zt(t).getComputedStyle(t)}function Lc(t){return hn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ki(t){if(Va(t)==="html")return t;const i=t.assignedSlot||t.parentNode||gx(t)&&t.host||Mn(t);return gx(i)?i.host:i}function ab(t){const i=Ki(t);return ka(i)?t.ownerDocument?t.ownerDocument.body:t.body:Tn(i)&&so(i)?i:ab(i)}function eo(t,i,a){var r;i===void 0&&(i=[]),a===void 0&&(a=!0);const s=ab(t),c=s===((r=t.ownerDocument)==null?void 0:r.body),u=Zt(s);if(c){const h=nh(u);return i.concat(u,u.visualViewport||[],so(s)?s:[],h&&a?eo(h):[])}return i.concat(s,eo(s,[],a))}function nh(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function rb(t){const i=mn(t);let a=parseFloat(i.width)||0,r=parseFloat(i.height)||0;const s=Tn(t),c=s?t.offsetWidth:a,u=s?t.offsetHeight:r,h=mc(a)!==c||mc(r)!==u;return h&&(a=c,r=u),{width:a,height:r,$:h}}function $h(t){return hn(t)?t:t.contextElement}function _a(t){const i=$h(t);if(!Tn(i))return _n(1);const a=i.getBoundingClientRect(),{width:r,height:s,$:c}=rb(i);let u=(c?mc(a.width):a.width)/r,h=(c?mc(a.height):a.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!h||!Number.isFinite(h))&&(h=1),{x:u,y:h}}const Nj=_n(0);function ob(t){const i=Zt(t);return!Vh()||!i.visualViewport?Nj:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function _j(t,i,a){return i===void 0&&(i=!1),!a||i&&a!==Zt(t)?!1:i}function zl(t,i,a,r){i===void 0&&(i=!1),a===void 0&&(a=!1);const s=t.getBoundingClientRect(),c=$h(t);let u=_n(1);i&&(r?hn(r)&&(u=_a(r)):u=_a(t));const h=_j(c,a,r)?ob(c):_n(0);let p=(s.left+h.x)/u.x,m=(s.top+h.y)/u.y,x=s.width/u.x,y=s.height/u.y;if(c){const v=Zt(c),w=r&&hn(r)?Zt(r):r;let S=v,_=nh(S);for(;_&&r&&w!==S;){const E=_a(_),C=_.getBoundingClientRect(),j=mn(_),N=C.left+(_.clientLeft+parseFloat(j.paddingLeft))*E.x,A=C.top+(_.clientTop+parseFloat(j.paddingTop))*E.y;p*=E.x,m*=E.y,x*=E.x,y*=E.y,p+=N,m+=A,S=Zt(_),_=nh(S)}}return gc({width:x,height:y,x:p,y:m})}function Hc(t,i){const a=Lc(t).scrollLeft;return i?i.left+a:zl(Mn(t)).left+a}function sb(t,i){const a=t.getBoundingClientRect(),r=a.left+i.scrollLeft-Hc(t,a),s=a.top+i.scrollTop;return{x:r,y:s}}function Cj(t){let{elements:i,rect:a,offsetParent:r,strategy:s}=t;const c=s==="fixed",u=Mn(r),h=i?kc(i.floating):!1;if(r===u||h&&c)return a;let p={scrollLeft:0,scrollTop:0},m=_n(1);const x=_n(0),y=Tn(r);if((y||!y&&!c)&&((Va(r)!=="body"||so(u))&&(p=Lc(r)),Tn(r))){const w=zl(r);m=_a(r),x.x=w.x+r.clientLeft,x.y=w.y+r.clientTop}const v=u&&!y&&!c?sb(u,p):_n(0);return{width:a.width*m.x,height:a.height*m.y,x:a.x*m.x-p.scrollLeft*m.x+x.x+v.x,y:a.y*m.y-p.scrollTop*m.y+x.y+v.y}}function Tj(t){return Array.from(t.getClientRects())}function Aj(t){const i=Mn(t),a=Lc(t),r=t.ownerDocument.body,s=Xt(i.scrollWidth,i.clientWidth,r.scrollWidth,r.clientWidth),c=Xt(i.scrollHeight,i.clientHeight,r.scrollHeight,r.clientHeight);let u=-a.scrollLeft+Hc(t);const h=-a.scrollTop;return mn(r).direction==="rtl"&&(u+=Xt(i.clientWidth,r.clientWidth)-s),{width:s,height:c,x:u,y:h}}const yx=25;function Mj(t,i){const a=Zt(t),r=Mn(t),s=a.visualViewport;let c=r.clientWidth,u=r.clientHeight,h=0,p=0;if(s){c=s.width,u=s.height;const x=Vh();(!x||x&&i==="fixed")&&(h=s.offsetLeft,p=s.offsetTop)}const m=Hc(r);if(m<=0){const x=r.ownerDocument,y=x.body,v=getComputedStyle(y),w=x.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(r.clientWidth-y.clientWidth-w);S<=yx&&(c-=S)}else m<=yx&&(c+=m);return{width:c,height:u,x:h,y:p}}const jj=new Set(["absolute","fixed"]);function zj(t,i){const a=zl(t,!0,i==="fixed"),r=a.top+t.clientTop,s=a.left+t.clientLeft,c=Tn(t)?_a(t):_n(1),u=t.clientWidth*c.x,h=t.clientHeight*c.y,p=s*c.x,m=r*c.y;return{width:u,height:h,x:p,y:m}}function xx(t,i,a){let r;if(i==="viewport")r=Mj(t,a);else if(i==="document")r=Aj(Mn(t));else if(hn(i))r=zj(i,a);else{const s=ob(t);r={x:i.x-s.x,y:i.y-s.y,width:i.width,height:i.height}}return gc(r)}function cb(t,i){const a=Ki(t);return a===i||!hn(a)||ka(a)?!1:mn(a).position==="fixed"||cb(a,i)}function Rj(t,i){const a=i.get(t);if(a)return a;let r=eo(t,[],!1).filter(h=>hn(h)&&Va(h)!=="body"),s=null;const c=mn(t).position==="fixed";let u=c?Ki(t):t;for(;hn(u)&&!ka(u);){const h=mn(u),p=Uh(u);!p&&h.position==="fixed"&&(s=null),(c?!p&&!s:!p&&h.position==="static"&&!!s&&jj.has(s.position)||so(u)&&!p&&cb(t,u))?r=r.filter(x=>x!==u):s=h,u=Ki(u)}return i.set(t,r),r}function Oj(t){let{element:i,boundary:a,rootBoundary:r,strategy:s}=t;const u=[...a==="clippingAncestors"?kc(i)?[]:Rj(i,this._c):[].concat(a),r],h=u[0],p=u.reduce((m,x)=>{const y=xx(i,x,s);return m.top=Xt(y.top,m.top),m.right=Qi(y.right,m.right),m.bottom=Qi(y.bottom,m.bottom),m.left=Xt(y.left,m.left),m},xx(i,h,s));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function Dj(t){const{width:i,height:a}=rb(t);return{width:i,height:a}}function kj(t,i,a){const r=Tn(i),s=Mn(i),c=a==="fixed",u=zl(t,!0,c,i);let h={scrollLeft:0,scrollTop:0};const p=_n(0);function m(){p.x=Hc(s)}if(r||!r&&!c)if((Va(i)!=="body"||so(s))&&(h=Lc(i)),r){const w=zl(i,!0,c,i);p.x=w.x+i.clientLeft,p.y=w.y+i.clientTop}else s&&m();c&&!r&&s&&m();const x=s&&!r&&!c?sb(s,h):_n(0),y=u.left+h.scrollLeft-p.x-x.x,v=u.top+h.scrollTop-p.y-x.y;return{x:y,y:v,width:u.width,height:u.height}}function zd(t){return mn(t).position==="static"}function vx(t,i){if(!Tn(t)||mn(t).position==="fixed")return null;if(i)return i(t);let a=t.offsetParent;return Mn(t)===a&&(a=a.ownerDocument.body),a}function ub(t,i){const a=Zt(t);if(kc(t))return a;if(!Tn(t)){let s=Ki(t);for(;s&&!ka(s);){if(hn(s)&&!zd(s))return s;s=Ki(s)}return a}let r=vx(t,i);for(;r&&yj(r)&&zd(r);)r=vx(r,i);return r&&ka(r)&&zd(r)&&!Uh(r)?a:r||Sj(t)||a}const Lj=async function(t){const i=this.getOffsetParent||ub,a=this.getDimensions,r=await a(t.floating);return{reference:kj(t.reference,await i(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Hj(t){return mn(t).direction==="rtl"}const Bj={convertOffsetParentRelativeRectToViewportRelativeRect:Cj,getDocumentElement:Mn,getClippingRect:Oj,getOffsetParent:ub,getElementRects:Lj,getClientRects:Tj,getDimensions:Dj,getScale:_a,isElement:hn,isRTL:Hj};function fb(t,i){return t.x===i.x&&t.y===i.y&&t.width===i.width&&t.height===i.height}function Uj(t,i){let a=null,r;const s=Mn(t);function c(){var h;clearTimeout(r),(h=a)==null||h.disconnect(),a=null}function u(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),c();const m=t.getBoundingClientRect(),{left:x,top:y,width:v,height:w}=m;if(h||i(),!v||!w)return;const S=Zs(y),_=Zs(s.clientWidth-(x+v)),E=Zs(s.clientHeight-(y+w)),C=Zs(x),N={rootMargin:-S+"px "+-_+"px "+-E+"px "+-C+"px",threshold:Xt(0,Qi(1,p))||1};let A=!0;function H(k){const L=k[0].intersectionRatio;if(L!==p){if(!A)return u();L?u(!1,L):r=setTimeout(()=>{u(!1,1e-7)},1e3)}L===1&&!fb(m,t.getBoundingClientRect())&&u(),A=!1}try{a=new IntersectionObserver(H,{...N,root:s.ownerDocument})}catch{a=new IntersectionObserver(H,N)}a.observe(t)}return u(!0),c}function Vj(t,i,a,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:p=!1}=r,m=$h(t),x=s||c?[...m?eo(m):[],...eo(i)]:[];x.forEach(C=>{s&&C.addEventListener("scroll",a,{passive:!0}),c&&C.addEventListener("resize",a)});const y=m&&h?Uj(m,a):null;let v=-1,w=null;u&&(w=new ResizeObserver(C=>{let[j]=C;j&&j.target===m&&w&&(w.unobserve(i),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var N;(N=w)==null||N.observe(i)})),a()}),m&&!p&&w.observe(m),w.observe(i));let S,_=p?zl(t):null;p&&E();function E(){const C=zl(t);_&&!fb(_,C)&&a(),_=C,S=requestAnimationFrame(E)}return a(),()=>{var C;x.forEach(j=>{s&&j.removeEventListener("scroll",a),c&&j.removeEventListener("resize",a)}),y==null||y(),(C=w)==null||C.disconnect(),w=null,p&&cancelAnimationFrame(S)}}const $j=fj,Yj=dj,qj=sj,Xj=mj,Gj=cj,bx=oj,Zj=hj,Qj=(t,i,a)=>{const r=new Map,s={platform:Bj,...a},c={...s.platform,_c:r};return rj(t,i,{...s,platform:c})};var Kj=typeof document<"u",Pj=function(){},ec=Kj?T.useLayoutEffect:Pj;function yc(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 a,r,s;if(t&&i&&typeof t=="object"){if(Array.isArray(t)){if(a=t.length,a!==i.length)return!1;for(r=a;r--!==0;)if(!yc(t[r],i[r]))return!1;return!0}if(s=Object.keys(t),a=s.length,a!==Object.keys(i).length)return!1;for(r=a;r--!==0;)if(!{}.hasOwnProperty.call(i,s[r]))return!1;for(r=a;r--!==0;){const c=s[r];if(!(c==="_owner"&&t.$$typeof)&&!yc(t[c],i[c]))return!1}return!0}return t!==t&&i!==i}function db(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function wx(t,i){const a=db(t);return Math.round(i*a)/a}function Rd(t){const i=T.useRef(t);return ec(()=>{i.current=t}),i}function Fj(t){t===void 0&&(t={});const{placement:i="bottom",strategy:a="absolute",middleware:r=[],platform:s,elements:{reference:c,floating:u}={},transform:h=!0,whileElementsMounted:p,open:m}=t,[x,y]=T.useState({x:0,y:0,strategy:a,placement:i,middlewareData:{},isPositioned:!1}),[v,w]=T.useState(r);yc(v,r)||w(r);const[S,_]=T.useState(null),[E,C]=T.useState(null),j=T.useCallback(O=>{O!==k.current&&(k.current=O,_(O))},[]),N=T.useCallback(O=>{O!==L.current&&(L.current=O,C(O))},[]),A=c||S,H=u||E,k=T.useRef(null),L=T.useRef(null),V=T.useRef(x),Z=p!=null,le=Rd(p),Q=Rd(s),X=Rd(m),te=T.useCallback(()=>{if(!k.current||!L.current)return;const O={placement:i,strategy:a,middleware:v};Q.current&&(O.platform=Q.current),Qj(k.current,L.current,O).then($=>{const J={...$,isPositioned:X.current!==!1};D.current&&!yc(V.current,J)&&(V.current=J,Tc.flushSync(()=>{y(J)}))})},[v,i,a,Q,X]);ec(()=>{m===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,y(O=>({...O,isPositioned:!1})))},[m]);const D=T.useRef(!1);ec(()=>(D.current=!0,()=>{D.current=!1}),[]),ec(()=>{if(A&&(k.current=A),H&&(L.current=H),A&&H){if(le.current)return le.current(A,H,te);te()}},[A,H,te,le,Z]);const G=T.useMemo(()=>({reference:k,floating:L,setReference:j,setFloating:N}),[j,N]),z=T.useMemo(()=>({reference:A,floating:H}),[A,H]),B=T.useMemo(()=>{const O={position:a,left:0,top:0};if(!z.floating)return O;const $=wx(z.floating,x.x),J=wx(z.floating,x.y);return h?{...O,transform:"translate("+$+"px, "+J+"px)",...db(z.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:$,top:J}},[a,h,z.floating,x.x,x.y]);return T.useMemo(()=>({...x,update:te,refs:G,elements:z,floatingStyles:B}),[x,te,G,z,B])}const Ij=t=>{function i(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:t,fn(a){const{element:r,padding:s}=typeof t=="function"?t(a):t;return r&&i(r)?r.current!=null?bx({element:r.current,padding:s}).fn(a):{}:r?bx({element:r,padding:s}).fn(a):{}}}},Jj=(t,i)=>({...$j(t),options:[t,i]}),Wj=(t,i)=>({...Yj(t),options:[t,i]}),ez=(t,i)=>({...Zj(t),options:[t,i]}),tz=(t,i)=>({...qj(t),options:[t,i]}),nz=(t,i)=>({...Xj(t),options:[t,i]}),iz=(t,i)=>({...Gj(t),options:[t,i]}),lz=(t,i)=>({...Ij(t),options:[t,i]});var az="Arrow",hb=T.forwardRef((t,i)=>{const{children:a,width:r=10,height:s=5,...c}=t;return g.jsx(Dt.svg,{...c,ref:i,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?a:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});hb.displayName=az;var rz=hb;function oz(t){const[i,a]=T.useState(void 0);return Zi(()=>{if(t){a({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 p=c.borderBoxSize,m=Array.isArray(p)?p[0]:p;u=m.inlineSize,h=m.blockSize}else u=t.offsetWidth,h=t.offsetHeight;a({width:u,height:h})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else a(void 0)},[t]),i}var mb="Popper",[pb,gb]=Oc(mb),[E6,yb]=pb(mb),xb="PopperAnchor",vb=T.forwardRef((t,i)=>{const{__scopePopper:a,virtualRef:r,...s}=t,c=yb(xb,a),u=T.useRef(null),h=dn(i,u),p=T.useRef(null);return T.useEffect(()=>{const m=p.current;p.current=(r==null?void 0:r.current)||u.current,m!==p.current&&c.onAnchorChange(p.current)}),r?null:g.jsx(Dt.div,{...s,ref:h})});vb.displayName=xb;var Yh="PopperContent",[sz,cz]=pb(Yh),bb=T.forwardRef((t,i)=>{var oe,ce,fe,we,ve,ge;const{__scopePopper:a,side:r="bottom",sideOffset:s=0,align:c="center",alignOffset:u=0,arrowPadding:h=0,avoidCollisions:p=!0,collisionBoundary:m=[],collisionPadding:x=0,sticky:y="partial",hideWhenDetached:v=!1,updatePositionStrategy:w="optimized",onPlaced:S,..._}=t,E=yb(Yh,a),[C,j]=T.useState(null),N=dn(i,ye=>j(ye)),[A,H]=T.useState(null),k=oz(A),L=(k==null?void 0:k.width)??0,V=(k==null?void 0:k.height)??0,Z=r+(c!=="center"?"-"+c:""),le=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},Q=Array.isArray(m)?m:[m],X=Q.length>0,te={padding:le,boundary:Q.filter(fz),altBoundary:X},{refs:D,floatingStyles:G,placement:z,isPositioned:B,middlewareData:O}=Fj({strategy:"fixed",placement:Z,whileElementsMounted:(...ye)=>Vj(...ye,{animationFrame:w==="always"}),elements:{reference:E.anchor},middleware:[Jj({mainAxis:s+V,alignmentAxis:u}),p&&Wj({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?ez():void 0,...te}),p&&tz({...te}),nz({...te,apply:({elements:ye,rects:Ce,availableWidth:Ue,availableHeight:je})=>{const{width:nt,height:kt}=Ce.reference,ht=ye.floating.style;ht.setProperty("--radix-popper-available-width",`${Ue}px`),ht.setProperty("--radix-popper-available-height",`${je}px`),ht.setProperty("--radix-popper-anchor-width",`${nt}px`),ht.setProperty("--radix-popper-anchor-height",`${kt}px`)}}),A&&lz({element:A,padding:h}),dz({arrowWidth:L,arrowHeight:V}),v&&iz({strategy:"referenceHidden",...te})]}),[$,J]=Eb(z),R=Gi(S);Zi(()=>{B&&(R==null||R())},[B,R]);const Y=(oe=O.arrow)==null?void 0:oe.x,P=(ce=O.arrow)==null?void 0:ce.y,ee=((fe=O.arrow)==null?void 0:fe.centerOffset)!==0,[se,ue]=T.useState();return Zi(()=>{C&&ue(window.getComputedStyle(C).zIndex)},[C]),g.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:B?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(we=O.transformOrigin)==null?void 0:we.x,(ve=O.transformOrigin)==null?void 0:ve.y].join(" "),...((ge=O.hide)==null?void 0:ge.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(sz,{scope:a,placedSide:$,onArrowChange:H,arrowX:Y,arrowY:P,shouldHideArrow:ee,children:g.jsx(Dt.div,{"data-side":$,"data-align":J,..._,ref:N,style:{..._.style,animation:B?void 0:"none"}})})})});bb.displayName=Yh;var wb="PopperArrow",uz={top:"bottom",right:"left",bottom:"top",left:"right"},Sb=T.forwardRef(function(i,a){const{__scopePopper:r,...s}=i,c=cz(wb,r),u=uz[c.placedSide];return g.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:g.jsx(rz,{...s,ref:a,style:{...s.style,display:"block"}})})});Sb.displayName=wb;function fz(t){return t!==null}var dz=t=>({name:"transformOrigin",options:t,fn(i){var E,C,j;const{placement:a,rects:r,middlewareData:s}=i,u=((E=s.arrow)==null?void 0:E.centerOffset)!==0,h=u?0:t.arrowWidth,p=u?0:t.arrowHeight,[m,x]=Eb(a),y={start:"0%",center:"50%",end:"100%"}[x],v=(((C=s.arrow)==null?void 0:C.x)??0)+h/2,w=(((j=s.arrow)==null?void 0:j.y)??0)+p/2;let S="",_="";return m==="bottom"?(S=u?y:`${v}px`,_=`${-p}px`):m==="top"?(S=u?y:`${v}px`,_=`${r.floating.height+p}px`):m==="right"?(S=`${-p}px`,_=u?y:`${w}px`):m==="left"&&(S=`${r.floating.width+p}px`,_=u?y:`${w}px`),{data:{x:S,y:_}}}});function Eb(t){const[i,a="center"]=t.split("-");return[i,a]}var hz=vb,mz=bb,pz=Sb,gz="Portal",qh=T.forwardRef((t,i)=>{var h;const{container:a,...r}=t,[s,c]=T.useState(!1);Zi(()=>c(!0),[]);const u=a||s&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return u?Z3.createPortal(g.jsx(Dt.div,{...r,ref:i}),u):null});qh.displayName=gz;function yz(t,i){return T.useReducer((a,r)=>i[a][r]??a,t)}var Bc=t=>{const{present:i,children:a}=t,r=xz(i),s=typeof a=="function"?a({present:r.isPresent}):T.Children.only(a),c=dn(r.ref,vz(s));return typeof a=="function"||r.isPresent?T.cloneElement(s,{ref:c}):null};Bc.displayName="Presence";function xz(t){const[i,a]=T.useState(),r=T.useRef(null),s=T.useRef(t),c=T.useRef("none"),u=t?"mounted":"unmounted",[h,p]=yz(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const m=Qs(r.current);c.current=h==="mounted"?m:"none"},[h]),Zi(()=>{const m=r.current,x=s.current;if(x!==t){const v=c.current,w=Qs(m);t?p("MOUNT"):w==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(x&&v!==w?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,p]),Zi(()=>{if(i){let m;const x=i.ownerDocument.defaultView??window,y=w=>{const _=Qs(r.current).includes(CSS.escape(w.animationName));if(w.target===i&&_&&(p("ANIMATION_END"),!s.current)){const E=i.style.animationFillMode;i.style.animationFillMode="forwards",m=x.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=E)})}},v=w=>{w.target===i&&(c.current=Qs(r.current))};return i.addEventListener("animationstart",v),i.addEventListener("animationcancel",y),i.addEventListener("animationend",y),()=>{x.clearTimeout(m),i.removeEventListener("animationstart",v),i.removeEventListener("animationcancel",y),i.removeEventListener("animationend",y)}}else p("ANIMATION_END")},[i,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:T.useCallback(m=>{r.current=m?getComputedStyle(m):null,a(m)},[])}}function Qs(t){return(t==null?void 0:t.animationName)||"none"}function vz(t){var r,s;let i=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var bz=Symbol("radix.slottable");function wz(t){const i=({children:a})=>g.jsx(g.Fragment,{children:a});return i.displayName=`${t}.Slottable`,i.__radixId=bz,i}var Sz=Tx[" useInsertionEffect ".trim().toString()]||Zi;function Ez({prop:t,defaultProp:i,onChange:a=()=>{},caller:r}){const[s,c,u]=Nz({defaultProp:i,onChange:a}),h=t!==void 0,p=h?t:s;{const x=T.useRef(t!==void 0);T.useEffect(()=>{const y=x.current;y!==h&&console.warn(`${r} is changing from ${y?"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.`),x.current=h},[h,r])}const m=T.useCallback(x=>{var y;if(h){const v=_z(x)?x(t):x;v!==t&&((y=u.current)==null||y.call(u,v))}else c(x)},[h,t,c,u]);return[p,m]}function Nz({defaultProp:t,onChange:i}){const[a,r]=T.useState(t),s=T.useRef(a),c=T.useRef(i);return Sz(()=>{c.current=i},[i]),T.useEffect(()=>{var u;s.current!==a&&((u=c.current)==null||u.call(c,a),s.current=a)},[a,s]),[a,r,c]}function _z(t){return typeof t=="function"}var Cz=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"}),Tz="VisuallyHidden",Uc=T.forwardRef((t,i)=>g.jsx(Dt.span,{...t,ref:i,style:{...Cz,...t.style}}));Uc.displayName=Tz;var Az=Uc,[Vc]=Oc("Tooltip",[gb]),Xh=gb(),Nb="TooltipProvider",Mz=700,Sx="tooltip.open",[jz,_b]=Vc(Nb),Cb=t=>{const{__scopeTooltip:i,delayDuration:a=Mz,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:c}=t,u=T.useRef(!0),h=T.useRef(!1),p=T.useRef(0);return T.useEffect(()=>{const m=p.current;return()=>window.clearTimeout(m)},[]),g.jsx(jz,{scope:i,isOpenDelayedRef:u,delayDuration:a,onOpen:T.useCallback(()=>{window.clearTimeout(p.current),u.current=!1},[]),onClose:T.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>u.current=!0,r)},[r]),isPointerInTransitRef:h,onPointerInTransitChange:T.useCallback(m=>{h.current=m},[]),disableHoverableContent:s,children:c})};Cb.displayName=Nb;var Tb="Tooltip",[N6,co]=Vc(Tb),ih="TooltipTrigger",zz=T.forwardRef((t,i)=>{const{__scopeTooltip:a,...r}=t,s=co(ih,a),c=_b(ih,a),u=Xh(a),h=T.useRef(null),p=dn(i,h,s.onTriggerChange),m=T.useRef(!1),x=T.useRef(!1),y=T.useCallback(()=>m.current=!1,[]);return T.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),g.jsx(hz,{asChild:!0,...u,children:g.jsx(Dt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:p,onPointerMove:dt(t.onPointerMove,v=>{v.pointerType!=="touch"&&!x.current&&!c.isPointerInTransitRef.current&&(s.onTriggerEnter(),x.current=!0)}),onPointerLeave:dt(t.onPointerLeave,()=>{s.onTriggerLeave(),x.current=!1}),onPointerDown:dt(t.onPointerDown,()=>{s.open&&s.onClose(),m.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:dt(t.onFocus,()=>{m.current||s.onOpen()}),onBlur:dt(t.onBlur,s.onClose),onClick:dt(t.onClick,s.onClose)})})});zz.displayName=ih;var Gh="TooltipPortal",[Rz,Oz]=Vc(Gh,{forceMount:void 0}),Ab=t=>{const{__scopeTooltip:i,forceMount:a,children:r,container:s}=t,c=co(Gh,i);return g.jsx(Rz,{scope:i,forceMount:a,children:g.jsx(Bc,{present:a||c.open,children:g.jsx(qh,{asChild:!0,container:s,children:r})})})};Ab.displayName=Gh;var La="TooltipContent",Mb=T.forwardRef((t,i)=>{const a=Oz(La,t.__scopeTooltip),{forceMount:r=a.forceMount,side:s="top",...c}=t,u=co(La,t.__scopeTooltip);return g.jsx(Bc,{present:r||u.open,children:u.disableHoverableContent?g.jsx(jb,{side:s,...c,ref:i}):g.jsx(Dz,{side:s,...c,ref:i})})}),Dz=T.forwardRef((t,i)=>{const a=co(La,t.__scopeTooltip),r=_b(La,t.__scopeTooltip),s=T.useRef(null),c=dn(i,s),[u,h]=T.useState(null),{trigger:p,onClose:m}=a,x=s.current,{onPointerInTransitChange:y}=r,v=T.useCallback(()=>{h(null),y(!1)},[y]),w=T.useCallback((S,_)=>{const E=S.currentTarget,C={x:S.clientX,y:S.clientY},j=Uz(C,E.getBoundingClientRect()),N=Vz(C,j),A=$z(_.getBoundingClientRect()),H=qz([...N,...A]);h(H),y(!0)},[y]);return T.useEffect(()=>()=>v(),[v]),T.useEffect(()=>{if(p&&x){const S=E=>w(E,x),_=E=>w(E,p);return p.addEventListener("pointerleave",S),x.addEventListener("pointerleave",_),()=>{p.removeEventListener("pointerleave",S),x.removeEventListener("pointerleave",_)}}},[p,x,w,v]),T.useEffect(()=>{if(u){const S=_=>{const E=_.target,C={x:_.clientX,y:_.clientY},j=(p==null?void 0:p.contains(E))||(x==null?void 0:x.contains(E)),N=!Yz(C,u);j?v():N&&(v(),m())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[p,x,u,m,v]),g.jsx(jb,{...t,ref:c})}),[kz,Lz]=Vc(Tb,{isInside:!1}),Hz=wz("TooltipContent"),jb=T.forwardRef((t,i)=>{const{__scopeTooltip:a,children:r,"aria-label":s,onEscapeKeyDown:c,onPointerDownOutside:u,...h}=t,p=co(La,a),m=Xh(a),{onClose:x}=p;return T.useEffect(()=>(document.addEventListener(Sx,x),()=>document.removeEventListener(Sx,x)),[x]),T.useEffect(()=>{if(p.trigger){const y=v=>{const w=v.target;w!=null&&w.contains(p.trigger)&&x()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[p.trigger,x]),g.jsx(kh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:y=>y.preventDefault(),onDismiss:x,children:g.jsxs(mz,{"data-state":p.stateAttribute,...m,...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:[g.jsx(Hz,{children:r}),g.jsx(kz,{scope:a,isInside:!0,children:g.jsx(Az,{id:p.contentId,role:"tooltip",children:s||r})})]})})});Mb.displayName=La;var zb="TooltipArrow",Bz=T.forwardRef((t,i)=>{const{__scopeTooltip:a,...r}=t,s=Xh(a);return Lz(zb,a).isInside?null:g.jsx(pz,{...s,...r,ref:i})});Bz.displayName=zb;function Uz(t,i){const a=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(a,r,s,c)){case c:return"left";case s:return"right";case a:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Vz(t,i,a=5){const r=[];switch(i){case"top":r.push({x:t.x-a,y:t.y+a},{x:t.x+a,y:t.y+a});break;case"bottom":r.push({x:t.x-a,y:t.y-a},{x:t.x+a,y:t.y-a});break;case"left":r.push({x:t.x+a,y:t.y-a},{x:t.x+a,y:t.y+a});break;case"right":r.push({x:t.x-a,y:t.y-a},{x:t.x-a,y:t.y+a});break}return r}function $z(t){const{top:i,right:a,bottom:r,left:s}=t;return[{x:s,y:i},{x:a,y:i},{x:a,y:r},{x:s,y:r}]}function Yz(t,i){const{x:a,y:r}=t;let s=!1;for(let c=0,u=i.length-1;c<i.length;u=c++){const h=i[c],p=i[u],m=h.x,x=h.y,y=p.x,v=p.y;x>r!=v>r&&a<(y-m)*(r-x)/(v-x)+m&&(s=!s)}return s}function qz(t){const i=t.slice();return i.sort((a,r)=>a.x<r.x?-1:a.x>r.x?1:a.y<r.y?-1:a.y>r.y?1:0),Xz(i)}function Xz(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 a=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;a.length>=2;){const c=a[a.length-1],u=a[a.length-2];if((c.x-u.x)*(s.y-u.y)>=(c.y-u.y)*(s.x-u.x))a.pop();else break}a.push(s)}return a.pop(),i.length===1&&a.length===1&&i[0].x===a[0].x&&i[0].y===a[0].y?i:i.concat(a)}var Gz=Cb,Zz=Ab,Rb=Mb;const Ex=Gz,Qz=T.forwardRef(({className:t,sideOffset:i=4,...a},r)=>g.jsx(Zz,{children:g.jsx(Rb,{ref:r,sideOffset:i,className:Ne("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),...a})}));Qz.displayName=Rb.displayName;function Nx(t){const i=Kz(t),a=T.forwardRef((r,s)=>{const{children:c,...u}=r,h=T.Children.toArray(c),p=h.find(Fz);if(p){const m=p.props.children,x=h.map(y=>y===p?T.Children.count(m)>1?T.Children.only(null):T.isValidElement(m)?m.props.children:null:y);return g.jsx(i,{...u,ref:s,children:T.isValidElement(m)?T.cloneElement(m,void 0,x):null})}return g.jsx(i,{...u,ref:s,children:c})});return a.displayName=`${t}.Slot`,a}function Kz(t){const i=T.forwardRef((a,r)=>{const{children:s,...c}=a;if(T.isValidElement(s)){const u=Jz(s),h=Iz(c,s.props);return s.type!==T.Fragment&&(h.ref=r?Rc(r,u):u),T.cloneElement(s,h)}return T.Children.count(s)>1?T.Children.only(null):null});return i.displayName=`${t}.SlotClone`,i}var Pz=Symbol("radix.slottable");function Fz(t){return T.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Pz}function Iz(t,i){const a={...i};for(const r in i){const s=t[r],c=i[r];/^on[A-Z]/.test(r)?s&&c?a[r]=(...h)=>{const p=c(...h);return s(...h),p}:s&&(a[r]=s):r==="style"?a[r]={...s,...c}:r==="className"&&(a[r]=[s,c].filter(Boolean).join(" "))}return{...t,...a}}function Jz(t){var r,s;let i=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}function Wz(t){const i=t+"CollectionProvider",[a,r]=Oc(i),[s,c]=a(i,{collectionRef:{current:null},itemMap:new Map}),u=_=>{const{scope:E,children:C}=_,j=qt.useRef(null),N=qt.useRef(new Map).current;return g.jsx(s,{scope:E,itemMap:N,collectionRef:j,children:C})};u.displayName=i;const h=t+"CollectionSlot",p=Nx(h),m=qt.forwardRef((_,E)=>{const{scope:C,children:j}=_,N=c(h,C),A=dn(E,N.collectionRef);return g.jsx(p,{ref:A,children:j})});m.displayName=h;const x=t+"CollectionItemSlot",y="data-radix-collection-item",v=Nx(x),w=qt.forwardRef((_,E)=>{const{scope:C,children:j,...N}=_,A=qt.useRef(null),H=dn(E,A),k=c(x,C);return qt.useEffect(()=>(k.itemMap.set(A,{ref:A,...N}),()=>void k.itemMap.delete(A))),g.jsx(v,{[y]:"",ref:H,children:j})});w.displayName=x;function S(_){const E=c(t+"CollectionConsumer",_);return qt.useCallback(()=>{const j=E.collectionRef.current;if(!j)return[];const N=Array.from(j.querySelectorAll(`[${y}]`));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:m,ItemSlot:w},S,r]}var Zh="ToastProvider",[Qh,e6,t6]=Wz("Toast"),[Ob]=Oc("Toast",[t6]),[n6,$c]=Ob(Zh),Db=t=>{const{__scopeToast:i,label:a="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:c=50,children:u}=t,[h,p]=T.useState(null),[m,x]=T.useState(0),y=T.useRef(!1),v=T.useRef(!1);return a.trim()||console.error(`Invalid prop \`label\` supplied to \`${Zh}\`. Expected non-empty \`string\`.`),g.jsx(Qh.Provider,{scope:i,children:g.jsx(n6,{scope:i,label:a,duration:r,swipeDirection:s,swipeThreshold:c,toastCount:m,viewport:h,onViewportChange:p,onToastAdd:T.useCallback(()=>x(w=>w+1),[]),onToastRemove:T.useCallback(()=>x(w=>w-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:v,children:u})})};Db.displayName=Zh;var kb="ToastViewport",i6=["F8"],lh="toast.viewportPause",ah="toast.viewportResume",Lb=T.forwardRef((t,i)=>{const{__scopeToast:a,hotkey:r=i6,label:s="Notifications ({hotkey})",...c}=t,u=$c(kb,a),h=e6(a),p=T.useRef(null),m=T.useRef(null),x=T.useRef(null),y=T.useRef(null),v=dn(i,y,u.onViewportChange),w=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=u.toastCount>0;T.useEffect(()=>{const E=C=>{var N;r.length!==0&&r.every(A=>C[A]||C.code===A)&&((N=y.current)==null||N.focus())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[r]),T.useEffect(()=>{const E=p.current,C=y.current;if(S&&E&&C){const j=()=>{if(!u.isClosePausedRef.current){const k=new CustomEvent(lh);C.dispatchEvent(k),u.isClosePausedRef.current=!0}},N=()=>{if(u.isClosePausedRef.current){const k=new CustomEvent(ah);C.dispatchEvent(k),u.isClosePausedRef.current=!1}},A=k=>{!E.contains(k.relatedTarget)&&N()},H=()=>{E.contains(document.activeElement)||N()};return E.addEventListener("focusin",j),E.addEventListener("focusout",A),E.addEventListener("pointermove",j),E.addEventListener("pointerleave",H),window.addEventListener("blur",j),window.addEventListener("focus",N),()=>{E.removeEventListener("focusin",j),E.removeEventListener("focusout",A),E.removeEventListener("pointermove",j),E.removeEventListener("pointerleave",H),window.removeEventListener("blur",j),window.removeEventListener("focus",N)}}},[S,u.isClosePausedRef]);const _=T.useCallback(({tabbingDirection:E})=>{const j=h().map(N=>{const A=N.ref.current,H=[A,...g6(A)];return E==="forwards"?H:H.reverse()});return(E==="forwards"?j.reverse():j).flat()},[h]);return T.useEffect(()=>{const E=y.current;if(E){const C=j=>{var H,k,L;const N=j.altKey||j.ctrlKey||j.metaKey;if(j.key==="Tab"&&!N){const V=document.activeElement,Z=j.shiftKey;if(j.target===E&&Z){(H=m.current)==null||H.focus();return}const X=_({tabbingDirection:Z?"backwards":"forwards"}),te=X.findIndex(D=>D===V);Od(X.slice(te+1))?j.preventDefault():Z?(k=m.current)==null||k.focus():(L=x.current)==null||L.focus()}};return E.addEventListener("keydown",C),()=>E.removeEventListener("keydown",C)}},[h,_]),g.jsxs(QM,{ref:p,role:"region","aria-label":s.replace("{hotkey}",w),tabIndex:-1,style:{pointerEvents:S?void 0:"none"},children:[S&&g.jsx(rh,{ref:m,onFocusFromOutsideViewport:()=>{const E=_({tabbingDirection:"forwards"});Od(E)}}),g.jsx(Qh.Slot,{scope:a,children:g.jsx(Dt.ol,{tabIndex:-1,...c,ref:v})}),S&&g.jsx(rh,{ref:x,onFocusFromOutsideViewport:()=>{const E=_({tabbingDirection:"backwards"});Od(E)}})]})});Lb.displayName=kb;var Hb="ToastFocusProxy",rh=T.forwardRef((t,i)=>{const{__scopeToast:a,onFocusFromOutsideViewport:r,...s}=t,c=$c(Hb,a);return g.jsx(Uc,{tabIndex:0,...s,ref:i,style:{position:"fixed"},onFocus:u=>{var m;const h=u.relatedTarget;!((m=c.viewport)!=null&&m.contains(h))&&r()}})});rh.displayName=Hb;var uo="Toast",l6="toast.swipeStart",a6="toast.swipeMove",r6="toast.swipeCancel",o6="toast.swipeEnd",Bb=T.forwardRef((t,i)=>{const{forceMount:a,open:r,defaultOpen:s,onOpenChange:c,...u}=t,[h,p]=Ez({prop:r,defaultProp:s??!0,onChange:c,caller:uo});return g.jsx(Bc,{present:a||h,children:g.jsx(u6,{open:h,...u,ref:i,onClose:()=>p(!1),onPause:Gi(t.onPause),onResume:Gi(t.onResume),onSwipeStart:dt(t.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:dt(t.onSwipeMove,m=>{const{x,y}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${x}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:dt(t.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:dt(t.onSwipeEnd,m=>{const{x,y}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${x}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),p(!1)})})})});Bb.displayName=uo;var[s6,c6]=Ob(uo,{onClose(){}}),u6=T.forwardRef((t,i)=>{const{__scopeToast:a,type:r="foreground",duration:s,open:c,onClose:u,onEscapeKeyDown:h,onPause:p,onResume:m,onSwipeStart:x,onSwipeMove:y,onSwipeCancel:v,onSwipeEnd:w,...S}=t,_=$c(uo,a),[E,C]=T.useState(null),j=dn(i,D=>C(D)),N=T.useRef(null),A=T.useRef(null),H=s||_.duration,k=T.useRef(0),L=T.useRef(H),V=T.useRef(0),{onToastAdd:Z,onToastRemove:le}=_,Q=Gi(()=>{var G;(E==null?void 0:E.contains(document.activeElement))&&((G=_.viewport)==null||G.focus()),u()}),X=T.useCallback(D=>{!D||D===1/0||(window.clearTimeout(V.current),k.current=new Date().getTime(),V.current=window.setTimeout(Q,D))},[Q]);T.useEffect(()=>{const D=_.viewport;if(D){const G=()=>{X(L.current),m==null||m()},z=()=>{const B=new Date().getTime()-k.current;L.current=L.current-B,window.clearTimeout(V.current),p==null||p()};return D.addEventListener(lh,z),D.addEventListener(ah,G),()=>{D.removeEventListener(lh,z),D.removeEventListener(ah,G)}}},[_.viewport,H,p,m,X]),T.useEffect(()=>{c&&!_.isClosePausedRef.current&&X(H)},[c,H,_.isClosePausedRef,X]),T.useEffect(()=>(Z(),()=>le()),[Z,le]);const te=T.useMemo(()=>E?Gb(E):null,[E]);return _.viewport?g.jsxs(g.Fragment,{children:[te&&g.jsx(f6,{__scopeToast:a,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:te}),g.jsx(s6,{scope:a,onClose:Q,children:Tc.createPortal(g.jsx(Qh.ItemSlot,{scope:a,children:g.jsx(ZM,{asChild:!0,onEscapeKeyDown:dt(h,()=>{_.isFocusedToastEscapeKeyDownRef.current||Q(),_.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(Dt.li,{tabIndex:0,"data-state":c?"open":"closed","data-swipe-direction":_.swipeDirection,...S,ref:j,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,Q()))}),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 G=D.clientX-N.current.x,z=D.clientY-N.current.y,B=!!A.current,O=["left","right"].includes(_.swipeDirection),$=["left","up"].includes(_.swipeDirection)?Math.min:Math.max,J=O?$(0,G):0,R=O?0:$(0,z),Y=D.pointerType==="touch"?10:2,P={x:J,y:R},ee={originalEvent:D,delta:P};B?(A.current=P,Ks(a6,y,ee,{discrete:!1})):_x(P,_.swipeDirection,Y)?(A.current=P,Ks(l6,x,ee,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(G)>Y||Math.abs(z)>Y)&&(N.current=null)}),onPointerUp:dt(t.onPointerUp,D=>{const G=A.current,z=D.target;if(z.hasPointerCapture(D.pointerId)&&z.releasePointerCapture(D.pointerId),A.current=null,N.current=null,G){const B=D.currentTarget,O={originalEvent:D,delta:G};_x(G,_.swipeDirection,_.swipeThreshold)?Ks(o6,w,O,{discrete:!0}):Ks(r6,v,O,{discrete:!0}),B.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),_.viewport)})]}):null}),f6=t=>{const{__scopeToast:i,children:a,...r}=t,s=$c(uo,i),[c,u]=T.useState(!1),[h,p]=T.useState(!1);return m6(()=>u(!0)),T.useEffect(()=>{const m=window.setTimeout(()=>p(!0),1e3);return()=>window.clearTimeout(m)},[]),h?null:g.jsx(qh,{asChild:!0,children:g.jsx(Uc,{...r,children:c&&g.jsxs(g.Fragment,{children:[s.label," ",a]})})})},d6="ToastTitle",Ub=T.forwardRef((t,i)=>{const{__scopeToast:a,...r}=t;return g.jsx(Dt.div,{...r,ref:i})});Ub.displayName=d6;var h6="ToastDescription",Vb=T.forwardRef((t,i)=>{const{__scopeToast:a,...r}=t;return g.jsx(Dt.div,{...r,ref:i})});Vb.displayName=h6;var $b="ToastAction",Yb=T.forwardRef((t,i)=>{const{altText:a,...r}=t;return a.trim()?g.jsx(Xb,{altText:a,asChild:!0,children:g.jsx(Kh,{...r,ref:i})}):(console.error(`Invalid prop \`altText\` supplied to \`${$b}\`. Expected non-empty \`string\`.`),null)});Yb.displayName=$b;var qb="ToastClose",Kh=T.forwardRef((t,i)=>{const{__scopeToast:a,...r}=t,s=c6(qb,a);return g.jsx(Xb,{asChild:!0,children:g.jsx(Dt.button,{type:"button",...r,ref:i,onClick:dt(t.onClick,s.onClose)})})});Kh.displayName=qb;var Xb=T.forwardRef((t,i)=>{const{__scopeToast:a,altText:r,...s}=t;return g.jsx(Dt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:i})});function Gb(t){const i=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&i.push(r.textContent),p6(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(...Gb(r))}}),i}function Ks(t,i,a,{discrete:r}){const s=a.originalEvent.currentTarget,c=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:a});i&&s.addEventListener(t,i,{once:!0}),r?J1(s,c):s.dispatchEvent(c)}var _x=(t,i,a=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),c=r>s;return i==="left"||i==="right"?c&&r>a:!c&&s>a};function m6(t=()=>{}){const i=Gi(t);Zi(()=>{let a=0,r=0;return a=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(i)),()=>{window.cancelAnimationFrame(a),window.cancelAnimationFrame(r)}},[i])}function p6(t){return t.nodeType===t.ELEMENT_NODE}function g6(t){const i=[],a=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(;a.nextNode();)i.push(a.currentNode);return i}function Od(t){const i=document.activeElement;return t.some(a=>a===i?!0:(a.focus(),document.activeElement!==i))}var y6=Db,Zb=Lb,Qb=Bb,Kb=Ub,Pb=Vb,Fb=Yb,Ib=Kh;const x6=y6,Jb=T.forwardRef(({className:t,...i},a)=>g.jsx(Zb,{ref:a,className:Ne("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}));Jb.displayName=Zb.displayName;const v6=I1("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"}}),Wb=T.forwardRef(({className:t,variant:i,...a},r)=>g.jsx(Qb,{ref:r,className:Ne(v6({variant:i}),t),...a}));Wb.displayName=Qb.displayName;const b6=T.forwardRef(({className:t,...i},a)=>g.jsx(Fb,{ref:a,className:Ne("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}));b6.displayName=Fb.displayName;const e2=T.forwardRef(({className:t,...i},a)=>g.jsx(Ib,{ref:a,className:Ne("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:g.jsx(dh,{className:"h-4 w-4"})}));e2.displayName=Ib.displayName;const t2=T.forwardRef(({className:t,...i},a)=>g.jsx(Kb,{ref:a,className:Ne("text-sm font-semibold",t),...i}));t2.displayName=Kb.displayName;const n2=T.forwardRef(({className:t,...i},a)=>g.jsx(Pb,{ref:a,className:Ne("text-sm opacity-90",t),...i}));n2.displayName=Pb.displayName;const w6=({variant:t})=>{switch(t){case"success":return g.jsx(jE,{className:"h-5 w-5 text-emerald-400"});case"error":return g.jsx(Jx,{className:"h-5 w-5 text-red-400"});case"info":return g.jsx(iv,{className:"h-5 w-5 text-blue-400"});default:return null}};function Cx(){const{toasts:t,removeToast:i}=Mx();return g.jsxs(x6,{swipeDirection:"right",children:[t.map(a=>g.jsxs(Wb,{variant:a.variant,duration:a.duration??4e3,onOpenChange:r=>{r||i(a.id)},children:[g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx(w6,{variant:a.variant}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx(t2,{children:a.title}),a.description&&g.jsx(n2,{children:a.description})]})]}),g.jsx(e2,{})]},a.id)),g.jsx(Jb,{})]})}function S6(){const{completed:t}=Xr();return t?g.jsxs(Ex,{children:[g.jsx(BN,{children:i=>{switch(i){case"architecture":return g.jsx(ax,{});case"files":return g.jsx(t_,{});case"security":return g.jsx(NM,{});default:return g.jsx(ax,{})}}}),g.jsx(Cx,{})]}):g.jsxs(Ex,{children:[g.jsx(CM,{}),g.jsx(Cx,{})]})}ph(mh.getState().theme);window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{mh.getState().theme==="system"&&ph("system")});yS.createRoot(document.getElementById("root")).render(g.jsx(T.StrictMode,{children:g.jsx(S6,{})}));