@opentrust/dashboard 7.3.31 → 7.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/routes/hosts.js +4 -27
- package/dist/routes/settings.js +52 -24
- package/package.json +3 -3
- package/public/assets/index-DzS9Yr59.js +418 -0
- package/public/assets/index-DzS9Yr59.js.map +1 -0
- package/public/assets/index-v4Sx1ze0.css +1 -0
- package/public/index.html +2 -2
- package/public/assets/index-2q5MJOn_.js +0 -408
- package/public/assets/index-2q5MJOn_.js.map +0 -1
- package/public/assets/index-C-TZSvxA.css +0 -1
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
function n1(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function qu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Np={exports:{}},Za={},jp={exports:{}},oe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Wo=Symbol.for("react.element"),r1=Symbol.for("react.portal"),s1=Symbol.for("react.fragment"),o1=Symbol.for("react.strict_mode"),i1=Symbol.for("react.profiler"),a1=Symbol.for("react.provider"),l1=Symbol.for("react.context"),c1=Symbol.for("react.forward_ref"),u1=Symbol.for("react.suspense"),d1=Symbol.for("react.memo"),f1=Symbol.for("react.lazy"),Bf=Symbol.iterator;function h1(e){return e===null||typeof e!="object"?null:(e=Bf&&e[Bf]||e["@@iterator"],typeof e=="function"?e:null)}var bp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sp=Object.assign,kp={};function Es(e,t,n){this.props=e,this.context=t,this.refs=kp,this.updater=n||bp}Es.prototype.isReactComponent={};Es.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Es.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Cp(){}Cp.prototype=Es.prototype;function Zu(e,t,n){this.props=e,this.context=t,this.refs=kp,this.updater=n||bp}var Ju=Zu.prototype=new Cp;Ju.constructor=Zu;Sp(Ju,Es.prototype);Ju.isPureReactComponent=!0;var Vf=Array.isArray,Ep=Object.prototype.hasOwnProperty,ed={current:null},_p={key:!0,ref:!0,__self:!0,__source:!0};function Pp(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Ep.call(t,r)&&!_p.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:Wo,type:e,key:o,ref:i,props:s,_owner:ed.current}}function m1(e,t){return{$$typeof:Wo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function td(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wo}function p1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Uf=/\/+/g;function Hl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?p1(""+e.key):t.toString(36)}function Vi(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Wo:case r1:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+Hl(i,0):r,Vf(s)?(n="",e!=null&&(n=e.replace(Uf,"$&/")+"/"),Vi(s,t,n,"",function(u){return u})):s!=null&&(td(s)&&(s=m1(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Uf,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",Vf(e))for(var l=0;l<e.length;l++){o=e[l];var c=r+Hl(o,l);i+=Vi(o,t,n,c,s)}else if(c=h1(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;)o=o.value,c=r+Hl(o,l++),i+=Vi(o,t,n,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function li(e,t,n){if(e==null)return e;var r=[],s=0;return Vi(e,r,"","",function(o){return t.call(n,o,s++)}),r}function g1(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Je={current:null},Ui={transition:null},x1={ReactCurrentDispatcher:Je,ReactCurrentBatchConfig:Ui,ReactCurrentOwner:ed};oe.Children={map:li,forEach:function(e,t,n){li(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return li(e,function(){t++}),t},toArray:function(e){return li(e,function(t){return t})||[]},only:function(e){if(!td(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=Es;oe.Fragment=s1;oe.Profiler=i1;oe.PureComponent=Zu;oe.StrictMode=o1;oe.Suspense=u1;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=x1;oe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Sp({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=ed.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Ep.call(t,c)&&!_p.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Wo,type:e.type,key:s,ref:o,props:r,_owner:i}};oe.createContext=function(e){return e={$$typeof:l1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:a1,_context:e},e.Consumer=e};oe.createElement=Pp;oe.createFactory=function(e){var t=Pp.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:c1,render:e}};oe.isValidElement=td;oe.lazy=function(e){return{$$typeof:f1,_payload:{_status:-1,_result:e},_init:g1}};oe.memo=function(e,t){return{$$typeof:d1,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=Ui.transition;Ui.transition={};try{e()}finally{Ui.transition=t}};oe.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};oe.useCallback=function(e,t){return Je.current.useCallback(e,t)};oe.useContext=function(e){return Je.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return Je.current.useDeferredValue(e)};oe.useEffect=function(e,t){return Je.current.useEffect(e,t)};oe.useId=function(){return Je.current.useId()};oe.useImperativeHandle=function(e,t,n){return Je.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return Je.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return Je.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return Je.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return Je.current.useReducer(e,t,n)};oe.useRef=function(e){return Je.current.useRef(e)};oe.useState=function(e){return Je.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return Je.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return Je.current.useTransition()};oe.version="18.3.0";jp.exports=oe;var m=jp.exports;const Wt=qu(m),y1=n1({__proto__:null,default:Wt},[m]);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var v1=m,w1=Symbol.for("react.element"),N1=Symbol.for("react.fragment"),j1=Object.prototype.hasOwnProperty,b1=v1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S1={key:!0,ref:!0,__self:!0,__source:!0};function Mp(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)j1.call(t,r)&&!S1.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:w1,type:e,key:o,ref:i,props:s,_owner:b1.current}}Za.Fragment=N1;Za.jsx=Mp;Za.jsxs=Mp;Np.exports=Za;var a=Np.exports,Ac={},Ip={exports:{}},xt={},Rp={exports:{}},Tp={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(P,S){var I=P.length;P.push(S);e:for(;0<I;){var A=I-1>>>1,F=P[A];if(0<s(F,S))P[A]=S,P[I]=F,I=A;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var S=P[0],I=P.pop();if(I!==S){P[0]=I;e:for(var A=0,F=P.length,B=F>>>1;A<B;){var V=2*(A+1)-1,G=P[V],Y=V+1,X=P[Y];if(0>s(G,I))Y<F&&0>s(X,G)?(P[A]=X,P[Y]=I,A=Y):(P[A]=G,P[V]=I,A=V);else if(Y<F&&0>s(X,I))P[A]=X,P[Y]=I,A=Y;else break e}}return S}function s(P,S){var I=P.sortIndex-S.sortIndex;return I!==0?I:P.id-S.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],h=1,d=null,f=3,g=!1,x=!1,v=!1,N=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(P){for(var S=n(u);S!==null;){if(S.callback===null)r(u);else if(S.startTime<=P)r(u),S.sortIndex=S.expirationTime,t(c,S);else break;S=n(u)}}function j(P){if(v=!1,y(P),!x)if(n(c)!==null)x=!0,k(b);else{var S=n(u);S!==null&&D(j,S.startTime-P)}}function b(P,S){x=!1,v&&(v=!1,p(M),M=-1),g=!0;var I=f;try{for(y(S),d=n(c);d!==null&&(!(d.expirationTime>S)||P&&!T());){var A=d.callback;if(typeof A=="function"){d.callback=null,f=d.priorityLevel;var F=A(d.expirationTime<=S);S=e.unstable_now(),typeof F=="function"?d.callback=F:d===n(c)&&r(c),y(S)}else r(c);d=n(c)}if(d!==null)var B=!0;else{var V=n(u);V!==null&&D(j,V.startTime-S),B=!1}return B}finally{d=null,f=I,g=!1}}var E=!1,C=null,M=-1,R=5,O=-1;function T(){return!(e.unstable_now()-O<R)}function L(){if(C!==null){var P=e.unstable_now();O=P;var S=!0;try{S=C(!0,P)}finally{S?$():(E=!1,C=null)}}else E=!1}var $;if(typeof w=="function")$=function(){w(L)};else if(typeof MessageChannel<"u"){var _=new MessageChannel,z=_.port2;_.port1.onmessage=L,$=function(){z.postMessage(null)}}else $=function(){N(L,0)};function k(P){C=P,E||(E=!0,$())}function D(P,S){M=N(function(){P(e.unstable_now())},S)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){x||g||(x=!0,k(b))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(P){switch(f){case 1:case 2:case 3:var S=3;break;default:S=f}var I=f;f=S;try{return P()}finally{f=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,S){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var I=f;f=P;try{return S()}finally{f=I}},e.unstable_scheduleCallback=function(P,S,I){var A=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?A+I:A):I=A,P){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=I+F,P={id:h++,callback:S,priorityLevel:P,startTime:I,expirationTime:F,sortIndex:-1},I>A?(P.sortIndex=I,t(u,P),n(c)===null&&P===n(u)&&(v?(p(M),M=-1):v=!0,D(j,I-A))):(P.sortIndex=F,t(c,P),x||g||(x=!0,k(b))),P},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(P){var S=f;return function(){var I=f;f=S;try{return P.apply(this,arguments)}finally{f=I}}}})(Tp);Rp.exports=Tp;var k1=Rp.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var C1=m,mt=k1;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Lp=new Set,xo={};function Er(e,t){us(e,t),us(e+"Capture",t)}function us(e,t){for(xo[e]=t,e=0;e<t.length;e++)Lp.add(t[e])}var mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zc=Object.prototype.hasOwnProperty,E1=/^[: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]*$/,Wf={},Kf={};function _1(e){return zc.call(Kf,e)?!0:zc.call(Wf,e)?!1:E1.test(e)?Kf[e]=!0:(Wf[e]=!0,!1)}function P1(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function M1(e,t,n,r){if(t===null||typeof t>"u"||P1(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function et(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ue[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ue[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ue[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ue[e]=new et(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ue[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ue[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ue[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ue[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ue[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var nd=/[\-:]([a-z])/g;function rd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(nd,rd);Ue[t]=new et(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(nd,rd);Ue[t]=new et(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(nd,rd);Ue[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ue[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});Ue.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ue[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function sd(e,t,n,r){var s=Ue.hasOwnProperty(t)?Ue[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(M1(t,n,s,r)&&(n=null),r||s===null?_1(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var vn=C1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ci=Symbol.for("react.element"),Hr=Symbol.for("react.portal"),Br=Symbol.for("react.fragment"),od=Symbol.for("react.strict_mode"),Dc=Symbol.for("react.profiler"),Ap=Symbol.for("react.provider"),zp=Symbol.for("react.context"),id=Symbol.for("react.forward_ref"),$c=Symbol.for("react.suspense"),Oc=Symbol.for("react.suspense_list"),ad=Symbol.for("react.memo"),_n=Symbol.for("react.lazy"),Dp=Symbol.for("react.offscreen"),Gf=Symbol.iterator;function $s(e){return e===null||typeof e!="object"?null:(e=Gf&&e[Gf]||e["@@iterator"],typeof e=="function"?e:null)}var _e=Object.assign,Bl;function Zs(e){if(Bl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Bl=t&&t[1]||""}return`
|
|
34
|
+
`+Bl+e}var Vl=!1;function Ul(e,t){if(!e||Vl)return"";Vl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
|
|
35
|
+
`),o=r.stack.split(`
|
|
36
|
+
`),i=s.length-1,l=o.length-1;1<=i&&0<=l&&s[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(s[i]!==o[l]){if(i!==1||l!==1)do if(i--,l--,0>l||s[i]!==o[l]){var c=`
|
|
37
|
+
`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{Vl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Zs(e):""}function I1(e){switch(e.tag){case 5:return Zs(e.type);case 16:return Zs("Lazy");case 13:return Zs("Suspense");case 19:return Zs("SuspenseList");case 0:case 2:case 15:return e=Ul(e.type,!1),e;case 11:return e=Ul(e.type.render,!1),e;case 1:return e=Ul(e.type,!0),e;default:return""}}function Fc(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Br:return"Fragment";case Hr:return"Portal";case Dc:return"Profiler";case od:return"StrictMode";case $c:return"Suspense";case Oc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case zp:return(e.displayName||"Context")+".Consumer";case Ap:return(e._context.displayName||"Context")+".Provider";case id:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ad:return t=e.displayName||null,t!==null?t:Fc(e.type)||"Memo";case _n:t=e._payload,e=e._init;try{return Fc(e(t))}catch{}}return null}function R1(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Fc(t);case 8:return t===od?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Un(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $p(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function T1(e){var t=$p(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ui(e){e._valueTracker||(e._valueTracker=T1(e))}function Op(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$p(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function da(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hc(e,t){var n=t.checked;return _e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Un(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Fp(e,t){t=t.checked,t!=null&&sd(e,"checked",t,!1)}function Bc(e,t){Fp(e,t);var n=Un(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vc(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vc(e,t.type,Un(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vc(e,t,n){(t!=="number"||da(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Js=Array.isArray;function ts(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Un(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Uc(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return _e({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Qf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(Js(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Un(n)}}function Hp(e,t){var n=Un(t.value),r=Un(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function qf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Bp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Wc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Bp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var di,Vp=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(di=di||document.createElement("div"),di.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=di.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var so={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},L1=["Webkit","ms","Moz","O"];Object.keys(so).forEach(function(e){L1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),so[t]=so[e]})});function Up(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||so.hasOwnProperty(e)&&so[e]?(""+t).trim():t+"px"}function Wp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Up(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var A1=_e({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Kc(e,t){if(t){if(A1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Gc(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Yc=null;function ld(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xc=null,ns=null,rs=null;function Zf(e){if(e=Yo(e)){if(typeof Xc!="function")throw Error(H(280));var t=e.stateNode;t&&(t=rl(t),Xc(e.stateNode,e.type,t))}}function Kp(e){ns?rs?rs.push(e):rs=[e]:ns=e}function Gp(){if(ns){var e=ns,t=rs;if(rs=ns=null,Zf(e),t)for(e=0;e<t.length;e++)Zf(t[e])}}function Yp(e,t){return e(t)}function Xp(){}var Wl=!1;function Qp(e,t,n){if(Wl)return e(t,n);Wl=!0;try{return Yp(e,t,n)}finally{Wl=!1,(ns!==null||rs!==null)&&(Xp(),Gp())}}function vo(e,t){var n=e.stateNode;if(n===null)return null;var r=rl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(H(231,t,typeof n));return n}var Qc=!1;if(mn)try{var Os={};Object.defineProperty(Os,"passive",{get:function(){Qc=!0}}),window.addEventListener("test",Os,Os),window.removeEventListener("test",Os,Os)}catch{Qc=!1}function z1(e,t,n,r,s,o,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(h){this.onError(h)}}var oo=!1,fa=null,ha=!1,qc=null,D1={onError:function(e){oo=!0,fa=e}};function $1(e,t,n,r,s,o,i,l,c){oo=!1,fa=null,z1.apply(D1,arguments)}function O1(e,t,n,r,s,o,i,l,c){if($1.apply(this,arguments),oo){if(oo){var u=fa;oo=!1,fa=null}else throw Error(H(198));ha||(ha=!0,qc=u)}}function _r(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function qp(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Jf(e){if(_r(e)!==e)throw Error(H(188))}function F1(e){var t=e.alternate;if(!t){if(t=_r(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return Jf(s),e;if(o===r)return Jf(s),t;o=o.sibling}throw Error(H(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,l=s.child;l;){if(l===n){i=!0,n=s,r=o;break}if(l===r){i=!0,r=s,n=o;break}l=l.sibling}if(!i){for(l=o.child;l;){if(l===n){i=!0,n=o,r=s;break}if(l===r){i=!0,r=o,n=s;break}l=l.sibling}if(!i)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function Zp(e){return e=F1(e),e!==null?Jp(e):null}function Jp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Jp(e);if(t!==null)return t;e=e.sibling}return null}var eg=mt.unstable_scheduleCallback,eh=mt.unstable_cancelCallback,H1=mt.unstable_shouldYield,B1=mt.unstable_requestPaint,Me=mt.unstable_now,V1=mt.unstable_getCurrentPriorityLevel,cd=mt.unstable_ImmediatePriority,tg=mt.unstable_UserBlockingPriority,ma=mt.unstable_NormalPriority,U1=mt.unstable_LowPriority,ng=mt.unstable_IdlePriority,Ja=null,Xt=null;function W1(e){if(Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(Ja,e,void 0,(e.current.flags&128)===128)}catch{}}var zt=Math.clz32?Math.clz32:Y1,K1=Math.log,G1=Math.LN2;function Y1(e){return e>>>=0,e===0?32:31-(K1(e)/G1|0)|0}var fi=64,hi=4194304;function eo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pa(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~s;l!==0?r=eo(l):(o&=i,o!==0&&(r=eo(o)))}else i=n&~s,i!==0?r=eo(i):o!==0&&(r=eo(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-zt(t),s=1<<n,r|=e[n],t&=~s;return r}function X1(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Q1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-zt(o),l=1<<i,c=s[i];c===-1?(!(l&n)||l&r)&&(s[i]=X1(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function Zc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function rg(){var e=fi;return fi<<=1,!(fi&4194240)&&(fi=64),e}function Kl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ko(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-zt(t),e[t]=n}function q1(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-zt(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function ud(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-zt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var fe=0;function sg(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var og,dd,ig,ag,lg,Jc=!1,mi=[],An=null,zn=null,Dn=null,wo=new Map,No=new Map,Mn=[],Z1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function th(e,t){switch(e){case"focusin":case"focusout":An=null;break;case"dragenter":case"dragleave":zn=null;break;case"mouseover":case"mouseout":Dn=null;break;case"pointerover":case"pointerout":wo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":No.delete(t.pointerId)}}function Fs(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Yo(t),t!==null&&dd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function J1(e,t,n,r,s){switch(t){case"focusin":return An=Fs(An,e,t,n,r,s),!0;case"dragenter":return zn=Fs(zn,e,t,n,r,s),!0;case"mouseover":return Dn=Fs(Dn,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return wo.set(o,Fs(wo.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,No.set(o,Fs(No.get(o)||null,e,t,n,r,s)),!0}return!1}function cg(e){var t=ar(e.target);if(t!==null){var n=_r(t);if(n!==null){if(t=n.tag,t===13){if(t=qp(n),t!==null){e.blockedOn=t,lg(e.priority,function(){ig(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=eu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Yc=r,n.target.dispatchEvent(r),Yc=null}else return t=Yo(n),t!==null&&dd(t),e.blockedOn=n,!1;t.shift()}return!0}function nh(e,t,n){Wi(e)&&n.delete(t)}function eN(){Jc=!1,An!==null&&Wi(An)&&(An=null),zn!==null&&Wi(zn)&&(zn=null),Dn!==null&&Wi(Dn)&&(Dn=null),wo.forEach(nh),No.forEach(nh)}function Hs(e,t){e.blockedOn===t&&(e.blockedOn=null,Jc||(Jc=!0,mt.unstable_scheduleCallback(mt.unstable_NormalPriority,eN)))}function jo(e){function t(s){return Hs(s,e)}if(0<mi.length){Hs(mi[0],e);for(var n=1;n<mi.length;n++){var r=mi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(An!==null&&Hs(An,e),zn!==null&&Hs(zn,e),Dn!==null&&Hs(Dn,e),wo.forEach(t),No.forEach(t),n=0;n<Mn.length;n++)r=Mn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Mn.length&&(n=Mn[0],n.blockedOn===null);)cg(n),n.blockedOn===null&&Mn.shift()}var ss=vn.ReactCurrentBatchConfig,ga=!0;function tN(e,t,n,r){var s=fe,o=ss.transition;ss.transition=null;try{fe=1,fd(e,t,n,r)}finally{fe=s,ss.transition=o}}function nN(e,t,n,r){var s=fe,o=ss.transition;ss.transition=null;try{fe=4,fd(e,t,n,r)}finally{fe=s,ss.transition=o}}function fd(e,t,n,r){if(ga){var s=eu(e,t,n,r);if(s===null)nc(e,t,r,xa,n),th(e,r);else if(J1(s,e,t,n,r))r.stopPropagation();else if(th(e,r),t&4&&-1<Z1.indexOf(e)){for(;s!==null;){var o=Yo(s);if(o!==null&&og(o),o=eu(e,t,n,r),o===null&&nc(e,t,r,xa,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else nc(e,t,r,null,n)}}var xa=null;function eu(e,t,n,r){if(xa=null,e=ld(r),e=ar(e),e!==null)if(t=_r(e),t===null)e=null;else if(n=t.tag,n===13){if(e=qp(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return xa=e,null}function ug(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(V1()){case cd:return 1;case tg:return 4;case ma:case U1:return 16;case ng:return 536870912;default:return 16}default:return 16}}var Tn=null,hd=null,Ki=null;function dg(){if(Ki)return Ki;var e,t=hd,n=t.length,r,s="value"in Tn?Tn.value:Tn.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return Ki=s.slice(e,1<r?1-r:void 0)}function Gi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function pi(){return!0}function rh(){return!1}function yt(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?pi:rh,this.isPropagationStopped=rh,this}return _e(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=pi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=pi)},persist:function(){},isPersistent:pi}),t}var _s={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},md=yt(_s),Go=_e({},_s,{view:0,detail:0}),rN=yt(Go),Gl,Yl,Bs,el=_e({},Go,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pd,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!==Bs&&(Bs&&e.type==="mousemove"?(Gl=e.screenX-Bs.screenX,Yl=e.screenY-Bs.screenY):Yl=Gl=0,Bs=e),Gl)},movementY:function(e){return"movementY"in e?e.movementY:Yl}}),sh=yt(el),sN=_e({},el,{dataTransfer:0}),oN=yt(sN),iN=_e({},Go,{relatedTarget:0}),Xl=yt(iN),aN=_e({},_s,{animationName:0,elapsedTime:0,pseudoElement:0}),lN=yt(aN),cN=_e({},_s,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),uN=yt(cN),dN=_e({},_s,{data:0}),oh=yt(dN),fN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hN={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"},mN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mN[e])?!!t[e]:!1}function pd(){return pN}var gN=_e({},Go,{key:function(e){if(e.key){var t=fN[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hN[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pd,charCode:function(e){return e.type==="keypress"?Gi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xN=yt(gN),yN=_e({},el,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ih=yt(yN),vN=_e({},Go,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pd}),wN=yt(vN),NN=_e({},_s,{propertyName:0,elapsedTime:0,pseudoElement:0}),jN=yt(NN),bN=_e({},el,{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}),SN=yt(bN),kN=[9,13,27,32],gd=mn&&"CompositionEvent"in window,io=null;mn&&"documentMode"in document&&(io=document.documentMode);var CN=mn&&"TextEvent"in window&&!io,fg=mn&&(!gd||io&&8<io&&11>=io),ah=" ",lh=!1;function hg(e,t){switch(e){case"keyup":return kN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vr=!1;function EN(e,t){switch(e){case"compositionend":return mg(t);case"keypress":return t.which!==32?null:(lh=!0,ah);case"textInput":return e=t.data,e===ah&&lh?null:e;default:return null}}function _N(e,t){if(Vr)return e==="compositionend"||!gd&&hg(e,t)?(e=dg(),Ki=hd=Tn=null,Vr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return fg&&t.locale!=="ko"?null:t.data;default:return null}}var PN={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 ch(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!PN[e.type]:t==="textarea"}function pg(e,t,n,r){Kp(r),t=ya(t,"onChange"),0<t.length&&(n=new md("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ao=null,bo=null;function MN(e){Cg(e,0)}function tl(e){var t=Kr(e);if(Op(t))return e}function IN(e,t){if(e==="change")return t}var gg=!1;if(mn){var Ql;if(mn){var ql="oninput"in document;if(!ql){var uh=document.createElement("div");uh.setAttribute("oninput","return;"),ql=typeof uh.oninput=="function"}Ql=ql}else Ql=!1;gg=Ql&&(!document.documentMode||9<document.documentMode)}function dh(){ao&&(ao.detachEvent("onpropertychange",xg),bo=ao=null)}function xg(e){if(e.propertyName==="value"&&tl(bo)){var t=[];pg(t,bo,e,ld(e)),Qp(MN,t)}}function RN(e,t,n){e==="focusin"?(dh(),ao=t,bo=n,ao.attachEvent("onpropertychange",xg)):e==="focusout"&&dh()}function TN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tl(bo)}function LN(e,t){if(e==="click")return tl(t)}function AN(e,t){if(e==="input"||e==="change")return tl(t)}function zN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $t=typeof Object.is=="function"?Object.is:zN;function So(e,t){if($t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!zc.call(t,s)||!$t(e[s],t[s]))return!1}return!0}function fh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hh(e,t){var n=fh(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fh(n)}}function yg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vg(){for(var e=window,t=da();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=da(e.document)}return t}function xd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function DN(e){var t=vg(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&yg(n.ownerDocument.documentElement,n)){if(r!==null&&xd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=hh(n,o);var i=hh(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var $N=mn&&"documentMode"in document&&11>=document.documentMode,Ur=null,tu=null,lo=null,nu=!1;function mh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nu||Ur==null||Ur!==da(r)||(r=Ur,"selectionStart"in r&&xd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),lo&&So(lo,r)||(lo=r,r=ya(tu,"onSelect"),0<r.length&&(t=new md("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ur)))}function gi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Wr={animationend:gi("Animation","AnimationEnd"),animationiteration:gi("Animation","AnimationIteration"),animationstart:gi("Animation","AnimationStart"),transitionend:gi("Transition","TransitionEnd")},Zl={},wg={};mn&&(wg=document.createElement("div").style,"AnimationEvent"in window||(delete Wr.animationend.animation,delete Wr.animationiteration.animation,delete Wr.animationstart.animation),"TransitionEvent"in window||delete Wr.transitionend.transition);function nl(e){if(Zl[e])return Zl[e];if(!Wr[e])return e;var t=Wr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in wg)return Zl[e]=t[n];return e}var Ng=nl("animationend"),jg=nl("animationiteration"),bg=nl("animationstart"),Sg=nl("transitionend"),kg=new Map,ph="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function qn(e,t){kg.set(e,t),Er(t,[e])}for(var Jl=0;Jl<ph.length;Jl++){var ec=ph[Jl],ON=ec.toLowerCase(),FN=ec[0].toUpperCase()+ec.slice(1);qn(ON,"on"+FN)}qn(Ng,"onAnimationEnd");qn(jg,"onAnimationIteration");qn(bg,"onAnimationStart");qn("dblclick","onDoubleClick");qn("focusin","onFocus");qn("focusout","onBlur");qn(Sg,"onTransitionEnd");us("onMouseEnter",["mouseout","mouseover"]);us("onMouseLeave",["mouseout","mouseover"]);us("onPointerEnter",["pointerout","pointerover"]);us("onPointerLeave",["pointerout","pointerover"]);Er("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Er("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Er("onBeforeInput",["compositionend","keypress","textInput","paste"]);Er("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Er("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Er("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var to="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(" "),HN=new Set("cancel close invalid load scroll toggle".split(" ").concat(to));function gh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,O1(r,t,void 0,e),e.currentTarget=null}function Cg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;gh(s,l,u),o=c}else for(i=0;i<r.length;i++){if(l=r[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;gh(s,l,u),o=c}}}if(ha)throw e=qc,ha=!1,qc=null,e}function ve(e,t){var n=t[au];n===void 0&&(n=t[au]=new Set);var r=e+"__bubble";n.has(r)||(Eg(t,e,2,!1),n.add(r))}function tc(e,t,n){var r=0;t&&(r|=4),Eg(n,e,r,t)}var xi="_reactListening"+Math.random().toString(36).slice(2);function ko(e){if(!e[xi]){e[xi]=!0,Lp.forEach(function(n){n!=="selectionchange"&&(HN.has(n)||tc(n,!1,e),tc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xi]||(t[xi]=!0,tc("selectionchange",!1,t))}}function Eg(e,t,n,r){switch(ug(t)){case 1:var s=tN;break;case 4:s=nN;break;default:s=fd}n=s.bind(null,t,n,e),s=void 0,!Qc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function nc(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;i=i.return}for(;l!==null;){if(i=ar(l),i===null)return;if(c=i.tag,c===5||c===6){r=o=i;continue e}l=l.parentNode}}r=r.return}Qp(function(){var u=o,h=ld(n),d=[];e:{var f=kg.get(e);if(f!==void 0){var g=md,x=e;switch(e){case"keypress":if(Gi(n)===0)break e;case"keydown":case"keyup":g=xN;break;case"focusin":x="focus",g=Xl;break;case"focusout":x="blur",g=Xl;break;case"beforeblur":case"afterblur":g=Xl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=sh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=oN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=wN;break;case Ng:case jg:case bg:g=lN;break;case Sg:g=jN;break;case"scroll":g=rN;break;case"wheel":g=SN;break;case"copy":case"cut":case"paste":g=uN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=ih}var v=(t&4)!==0,N=!v&&e==="scroll",p=v?f!==null?f+"Capture":null:f;v=[];for(var w=u,y;w!==null;){y=w;var j=y.stateNode;if(y.tag===5&&j!==null&&(y=j,p!==null&&(j=vo(w,p),j!=null&&v.push(Co(w,j,y)))),N)break;w=w.return}0<v.length&&(f=new g(f,x,null,n,h),d.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",f&&n!==Yc&&(x=n.relatedTarget||n.fromElement)&&(ar(x)||x[pn]))break e;if((g||f)&&(f=h.window===h?h:(f=h.ownerDocument)?f.defaultView||f.parentWindow:window,g?(x=n.relatedTarget||n.toElement,g=u,x=x?ar(x):null,x!==null&&(N=_r(x),x!==N||x.tag!==5&&x.tag!==6)&&(x=null)):(g=null,x=u),g!==x)){if(v=sh,j="onMouseLeave",p="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(v=ih,j="onPointerLeave",p="onPointerEnter",w="pointer"),N=g==null?f:Kr(g),y=x==null?f:Kr(x),f=new v(j,w+"leave",g,n,h),f.target=N,f.relatedTarget=y,j=null,ar(h)===u&&(v=new v(p,w+"enter",x,n,h),v.target=y,v.relatedTarget=N,j=v),N=j,g&&x)t:{for(v=g,p=x,w=0,y=v;y;y=Ar(y))w++;for(y=0,j=p;j;j=Ar(j))y++;for(;0<w-y;)v=Ar(v),w--;for(;0<y-w;)p=Ar(p),y--;for(;w--;){if(v===p||p!==null&&v===p.alternate)break t;v=Ar(v),p=Ar(p)}v=null}else v=null;g!==null&&xh(d,f,g,v,!1),x!==null&&N!==null&&xh(d,N,x,v,!0)}}e:{if(f=u?Kr(u):window,g=f.nodeName&&f.nodeName.toLowerCase(),g==="select"||g==="input"&&f.type==="file")var b=IN;else if(ch(f))if(gg)b=AN;else{b=TN;var E=RN}else(g=f.nodeName)&&g.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(b=LN);if(b&&(b=b(e,u))){pg(d,b,n,h);break e}E&&E(e,f,u),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&Vc(f,"number",f.value)}switch(E=u?Kr(u):window,e){case"focusin":(ch(E)||E.contentEditable==="true")&&(Ur=E,tu=u,lo=null);break;case"focusout":lo=tu=Ur=null;break;case"mousedown":nu=!0;break;case"contextmenu":case"mouseup":case"dragend":nu=!1,mh(d,n,h);break;case"selectionchange":if($N)break;case"keydown":case"keyup":mh(d,n,h)}var C;if(gd)e:{switch(e){case"compositionstart":var M="onCompositionStart";break e;case"compositionend":M="onCompositionEnd";break e;case"compositionupdate":M="onCompositionUpdate";break e}M=void 0}else Vr?hg(e,n)&&(M="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(M="onCompositionStart");M&&(fg&&n.locale!=="ko"&&(Vr||M!=="onCompositionStart"?M==="onCompositionEnd"&&Vr&&(C=dg()):(Tn=h,hd="value"in Tn?Tn.value:Tn.textContent,Vr=!0)),E=ya(u,M),0<E.length&&(M=new oh(M,e,null,n,h),d.push({event:M,listeners:E}),C?M.data=C:(C=mg(n),C!==null&&(M.data=C)))),(C=CN?EN(e,n):_N(e,n))&&(u=ya(u,"onBeforeInput"),0<u.length&&(h=new oh("onBeforeInput","beforeinput",null,n,h),d.push({event:h,listeners:u}),h.data=C))}Cg(d,t)})}function Co(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ya(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=vo(e,n),o!=null&&r.unshift(Co(e,o,s)),o=vo(e,t),o!=null&&r.push(Co(e,o,s))),e=e.return}return r}function Ar(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function xh(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=vo(n,o),c!=null&&i.unshift(Co(n,c,l))):s||(c=vo(n,o),c!=null&&i.push(Co(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var BN=/\r\n?/g,VN=/\u0000|\uFFFD/g;function yh(e){return(typeof e=="string"?e:""+e).replace(BN,`
|
|
38
|
+
`).replace(VN,"")}function yi(e,t,n){if(t=yh(t),yh(e)!==t&&n)throw Error(H(425))}function va(){}var ru=null,su=null;function ou(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var iu=typeof setTimeout=="function"?setTimeout:void 0,UN=typeof clearTimeout=="function"?clearTimeout:void 0,vh=typeof Promise=="function"?Promise:void 0,WN=typeof queueMicrotask=="function"?queueMicrotask:typeof vh<"u"?function(e){return vh.resolve(null).then(e).catch(KN)}:iu;function KN(e){setTimeout(function(){throw e})}function rc(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),jo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);jo(t)}function $n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function wh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ps=Math.random().toString(36).slice(2),Gt="__reactFiber$"+Ps,Eo="__reactProps$"+Ps,pn="__reactContainer$"+Ps,au="__reactEvents$"+Ps,GN="__reactListeners$"+Ps,YN="__reactHandles$"+Ps;function ar(e){var t=e[Gt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pn]||n[Gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wh(e);e!==null;){if(n=e[Gt])return n;e=wh(e)}return t}e=n,n=e.parentNode}return null}function Yo(e){return e=e[Gt]||e[pn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Kr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function rl(e){return e[Eo]||null}var lu=[],Gr=-1;function Zn(e){return{current:e}}function we(e){0>Gr||(e.current=lu[Gr],lu[Gr]=null,Gr--)}function ge(e,t){Gr++,lu[Gr]=e.current,e.current=t}var Wn={},Qe=Zn(Wn),at=Zn(!1),gr=Wn;function ds(e,t){var n=e.type.contextTypes;if(!n)return Wn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function lt(e){return e=e.childContextTypes,e!=null}function wa(){we(at),we(Qe)}function Nh(e,t,n){if(Qe.current!==Wn)throw Error(H(168));ge(Qe,t),ge(at,n)}function _g(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(H(108,R1(e)||"Unknown",s));return _e({},n,r)}function Na(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wn,gr=Qe.current,ge(Qe,e),ge(at,at.current),!0}function jh(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=_g(e,t,gr),r.__reactInternalMemoizedMergedChildContext=e,we(at),we(Qe),ge(Qe,e)):we(at),ge(at,n)}var ln=null,sl=!1,sc=!1;function Pg(e){ln===null?ln=[e]:ln.push(e)}function XN(e){sl=!0,Pg(e)}function Jn(){if(!sc&&ln!==null){sc=!0;var e=0,t=fe;try{var n=ln;for(fe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ln=null,sl=!1}catch(s){throw ln!==null&&(ln=ln.slice(e+1)),eg(cd,Jn),s}finally{fe=t,sc=!1}}return null}var Yr=[],Xr=0,ja=null,ba=0,vt=[],wt=0,xr=null,cn=1,un="";function sr(e,t){Yr[Xr++]=ba,Yr[Xr++]=ja,ja=e,ba=t}function Mg(e,t,n){vt[wt++]=cn,vt[wt++]=un,vt[wt++]=xr,xr=e;var r=cn;e=un;var s=32-zt(r)-1;r&=~(1<<s),n+=1;var o=32-zt(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,cn=1<<32-zt(t)+s|n<<s|r,un=o+e}else cn=1<<o|n<<s|r,un=e}function yd(e){e.return!==null&&(sr(e,1),Mg(e,1,0))}function vd(e){for(;e===ja;)ja=Yr[--Xr],Yr[Xr]=null,ba=Yr[--Xr],Yr[Xr]=null;for(;e===xr;)xr=vt[--wt],vt[wt]=null,un=vt[--wt],vt[wt]=null,cn=vt[--wt],vt[wt]=null}var ht=null,ft=null,je=!1,Rt=null;function Ig(e,t){var n=Nt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function bh(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ht=e,ft=$n(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ht=e,ft=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=xr!==null?{id:cn,overflow:un}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Nt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ht=e,ft=null,!0):!1;default:return!1}}function cu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function uu(e){if(je){var t=ft;if(t){var n=t;if(!bh(e,t)){if(cu(e))throw Error(H(418));t=$n(n.nextSibling);var r=ht;t&&bh(e,t)?Ig(r,n):(e.flags=e.flags&-4097|2,je=!1,ht=e)}}else{if(cu(e))throw Error(H(418));e.flags=e.flags&-4097|2,je=!1,ht=e}}}function Sh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ht=e}function vi(e){if(e!==ht)return!1;if(!je)return Sh(e),je=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ou(e.type,e.memoizedProps)),t&&(t=ft)){if(cu(e))throw Rg(),Error(H(418));for(;t;)Ig(e,t),t=$n(t.nextSibling)}if(Sh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ft=$n(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ft=null}}else ft=ht?$n(e.stateNode.nextSibling):null;return!0}function Rg(){for(var e=ft;e;)e=$n(e.nextSibling)}function fs(){ft=ht=null,je=!1}function wd(e){Rt===null?Rt=[e]:Rt.push(e)}var QN=vn.ReactCurrentBatchConfig;function Vs(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var l=s.refs;i===null?delete l[o]:l[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function wi(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function kh(e){var t=e._init;return t(e._payload)}function Tg(e){function t(p,w){if(e){var y=p.deletions;y===null?(p.deletions=[w],p.flags|=16):y.push(w)}}function n(p,w){if(!e)return null;for(;w!==null;)t(p,w),w=w.sibling;return null}function r(p,w){for(p=new Map;w!==null;)w.key!==null?p.set(w.key,w):p.set(w.index,w),w=w.sibling;return p}function s(p,w){return p=Bn(p,w),p.index=0,p.sibling=null,p}function o(p,w,y){return p.index=y,e?(y=p.alternate,y!==null?(y=y.index,y<w?(p.flags|=2,w):y):(p.flags|=2,w)):(p.flags|=1048576,w)}function i(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,w,y,j){return w===null||w.tag!==6?(w=dc(y,p.mode,j),w.return=p,w):(w=s(w,y),w.return=p,w)}function c(p,w,y,j){var b=y.type;return b===Br?h(p,w,y.props.children,j,y.key):w!==null&&(w.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===_n&&kh(b)===w.type)?(j=s(w,y.props),j.ref=Vs(p,w,y),j.return=p,j):(j=ea(y.type,y.key,y.props,null,p.mode,j),j.ref=Vs(p,w,y),j.return=p,j)}function u(p,w,y,j){return w===null||w.tag!==4||w.stateNode.containerInfo!==y.containerInfo||w.stateNode.implementation!==y.implementation?(w=fc(y,p.mode,j),w.return=p,w):(w=s(w,y.children||[]),w.return=p,w)}function h(p,w,y,j,b){return w===null||w.tag!==7?(w=hr(y,p.mode,j,b),w.return=p,w):(w=s(w,y),w.return=p,w)}function d(p,w,y){if(typeof w=="string"&&w!==""||typeof w=="number")return w=dc(""+w,p.mode,y),w.return=p,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ci:return y=ea(w.type,w.key,w.props,null,p.mode,y),y.ref=Vs(p,null,w),y.return=p,y;case Hr:return w=fc(w,p.mode,y),w.return=p,w;case _n:var j=w._init;return d(p,j(w._payload),y)}if(Js(w)||$s(w))return w=hr(w,p.mode,y,null),w.return=p,w;wi(p,w)}return null}function f(p,w,y,j){var b=w!==null?w.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return b!==null?null:l(p,w,""+y,j);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ci:return y.key===b?c(p,w,y,j):null;case Hr:return y.key===b?u(p,w,y,j):null;case _n:return b=y._init,f(p,w,b(y._payload),j)}if(Js(y)||$s(y))return b!==null?null:h(p,w,y,j,null);wi(p,y)}return null}function g(p,w,y,j,b){if(typeof j=="string"&&j!==""||typeof j=="number")return p=p.get(y)||null,l(w,p,""+j,b);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case ci:return p=p.get(j.key===null?y:j.key)||null,c(w,p,j,b);case Hr:return p=p.get(j.key===null?y:j.key)||null,u(w,p,j,b);case _n:var E=j._init;return g(p,w,y,E(j._payload),b)}if(Js(j)||$s(j))return p=p.get(y)||null,h(w,p,j,b,null);wi(w,j)}return null}function x(p,w,y,j){for(var b=null,E=null,C=w,M=w=0,R=null;C!==null&&M<y.length;M++){C.index>M?(R=C,C=null):R=C.sibling;var O=f(p,C,y[M],j);if(O===null){C===null&&(C=R);break}e&&C&&O.alternate===null&&t(p,C),w=o(O,w,M),E===null?b=O:E.sibling=O,E=O,C=R}if(M===y.length)return n(p,C),je&&sr(p,M),b;if(C===null){for(;M<y.length;M++)C=d(p,y[M],j),C!==null&&(w=o(C,w,M),E===null?b=C:E.sibling=C,E=C);return je&&sr(p,M),b}for(C=r(p,C);M<y.length;M++)R=g(C,p,M,y[M],j),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?M:R.key),w=o(R,w,M),E===null?b=R:E.sibling=R,E=R);return e&&C.forEach(function(T){return t(p,T)}),je&&sr(p,M),b}function v(p,w,y,j){var b=$s(y);if(typeof b!="function")throw Error(H(150));if(y=b.call(y),y==null)throw Error(H(151));for(var E=b=null,C=w,M=w=0,R=null,O=y.next();C!==null&&!O.done;M++,O=y.next()){C.index>M?(R=C,C=null):R=C.sibling;var T=f(p,C,O.value,j);if(T===null){C===null&&(C=R);break}e&&C&&T.alternate===null&&t(p,C),w=o(T,w,M),E===null?b=T:E.sibling=T,E=T,C=R}if(O.done)return n(p,C),je&&sr(p,M),b;if(C===null){for(;!O.done;M++,O=y.next())O=d(p,O.value,j),O!==null&&(w=o(O,w,M),E===null?b=O:E.sibling=O,E=O);return je&&sr(p,M),b}for(C=r(p,C);!O.done;M++,O=y.next())O=g(C,p,M,O.value,j),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?M:O.key),w=o(O,w,M),E===null?b=O:E.sibling=O,E=O);return e&&C.forEach(function(L){return t(p,L)}),je&&sr(p,M),b}function N(p,w,y,j){if(typeof y=="object"&&y!==null&&y.type===Br&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ci:e:{for(var b=y.key,E=w;E!==null;){if(E.key===b){if(b=y.type,b===Br){if(E.tag===7){n(p,E.sibling),w=s(E,y.props.children),w.return=p,p=w;break e}}else if(E.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===_n&&kh(b)===E.type){n(p,E.sibling),w=s(E,y.props),w.ref=Vs(p,E,y),w.return=p,p=w;break e}n(p,E);break}else t(p,E);E=E.sibling}y.type===Br?(w=hr(y.props.children,p.mode,j,y.key),w.return=p,p=w):(j=ea(y.type,y.key,y.props,null,p.mode,j),j.ref=Vs(p,w,y),j.return=p,p=j)}return i(p);case Hr:e:{for(E=y.key;w!==null;){if(w.key===E)if(w.tag===4&&w.stateNode.containerInfo===y.containerInfo&&w.stateNode.implementation===y.implementation){n(p,w.sibling),w=s(w,y.children||[]),w.return=p,p=w;break e}else{n(p,w);break}else t(p,w);w=w.sibling}w=fc(y,p.mode,j),w.return=p,p=w}return i(p);case _n:return E=y._init,N(p,w,E(y._payload),j)}if(Js(y))return x(p,w,y,j);if($s(y))return v(p,w,y,j);wi(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,w!==null&&w.tag===6?(n(p,w.sibling),w=s(w,y),w.return=p,p=w):(n(p,w),w=dc(y,p.mode,j),w.return=p,p=w),i(p)):n(p,w)}return N}var hs=Tg(!0),Lg=Tg(!1),Sa=Zn(null),ka=null,Qr=null,Nd=null;function jd(){Nd=Qr=ka=null}function bd(e){var t=Sa.current;we(Sa),e._currentValue=t}function du(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function os(e,t){ka=e,Nd=Qr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ot=!0),e.firstContext=null)}function bt(e){var t=e._currentValue;if(Nd!==e)if(e={context:e,memoizedValue:t,next:null},Qr===null){if(ka===null)throw Error(H(308));Qr=e,ka.dependencies={lanes:0,firstContext:e}}else Qr=Qr.next=e;return t}var lr=null;function Sd(e){lr===null?lr=[e]:lr.push(e)}function Ag(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Sd(t)):(n.next=s.next,s.next=n),t.interleaved=n,gn(e,r)}function gn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Pn=!1;function kd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function fn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function On(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ae&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,gn(e,n)}return s=r.interleaved,s===null?(t.next=t,Sd(r)):(t.next=s.next,s.next=t),r.interleaved=t,gn(e,n)}function Yi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ud(e,n)}}function Ch(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ca(e,t,n,r){var s=e.updateQueue;Pn=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var h=e.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==i&&(l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=c))}if(o!==null){var d=s.baseState;i=0,h=u=c=null,l=o;do{var f=l.lane,g=l.eventTime;if((r&f)===f){h!==null&&(h=h.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,v=l;switch(f=t,g=n,v.tag){case 1:if(x=v.payload,typeof x=="function"){d=x.call(g,d,f);break e}d=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=v.payload,f=typeof x=="function"?x.call(g,d,f):x,f==null)break e;d=_e({},d,f);break e;case 2:Pn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[l]:f.push(l))}else g={eventTime:g,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},h===null?(u=h=g,c=d):h=h.next=g,i|=f;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;f=l,l=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(h===null&&(c=d),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=h,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);vr|=i,e.lanes=i,e.memoizedState=d}}function Eh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(H(191,s));s.call(r)}}}var Xo={},Qt=Zn(Xo),_o=Zn(Xo),Po=Zn(Xo);function cr(e){if(e===Xo)throw Error(H(174));return e}function Cd(e,t){switch(ge(Po,t),ge(_o,e),ge(Qt,Xo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Wc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Wc(t,e)}we(Qt),ge(Qt,t)}function ms(){we(Qt),we(_o),we(Po)}function Dg(e){cr(Po.current);var t=cr(Qt.current),n=Wc(t,e.type);t!==n&&(ge(_o,e),ge(Qt,n))}function Ed(e){_o.current===e&&(we(Qt),we(_o))}var Ce=Zn(0);function Ea(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oc=[];function _d(){for(var e=0;e<oc.length;e++)oc[e]._workInProgressVersionPrimary=null;oc.length=0}var Xi=vn.ReactCurrentDispatcher,ic=vn.ReactCurrentBatchConfig,yr=0,Ee=null,ze=null,Oe=null,_a=!1,co=!1,Mo=0,qN=0;function Ke(){throw Error(H(321))}function Pd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!$t(e[n],t[n]))return!1;return!0}function Md(e,t,n,r,s,o){if(yr=o,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xi.current=e===null||e.memoizedState===null?t2:n2,e=n(r,s),co){o=0;do{if(co=!1,Mo=0,25<=o)throw Error(H(301));o+=1,Oe=ze=null,t.updateQueue=null,Xi.current=r2,e=n(r,s)}while(co)}if(Xi.current=Pa,t=ze!==null&&ze.next!==null,yr=0,Oe=ze=Ee=null,_a=!1,t)throw Error(H(300));return e}function Id(){var e=Mo!==0;return Mo=0,e}function Ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Oe===null?Ee.memoizedState=Oe=e:Oe=Oe.next=e,Oe}function St(){if(ze===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Oe===null?Ee.memoizedState:Oe.next;if(t!==null)Oe=t,ze=e;else{if(e===null)throw Error(H(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Oe===null?Ee.memoizedState=Oe=e:Oe=Oe.next=e}return Oe}function Io(e,t){return typeof t=="function"?t(e):t}function ac(e){var t=St(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=ze,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var l=i=null,c=null,u=o;do{var h=u.lane;if((yr&h)===h)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=d,i=r):c=c.next=d,Ee.lanes|=h,vr|=h}u=u.next}while(u!==null&&u!==o);c===null?i=r:c.next=l,$t(r,t.memoizedState)||(ot=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,Ee.lanes|=o,vr|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function lc(e){var t=St(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);$t(o,t.memoizedState)||(ot=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function $g(){}function Og(e,t){var n=Ee,r=St(),s=t(),o=!$t(r.memoizedState,s);if(o&&(r.memoizedState=s,ot=!0),r=r.queue,Rd(Bg.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Oe!==null&&Oe.memoizedState.tag&1){if(n.flags|=2048,Ro(9,Hg.bind(null,n,r,s,t),void 0,null),Fe===null)throw Error(H(349));yr&30||Fg(n,t,s)}return s}function Fg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Hg(e,t,n,r){t.value=n,t.getSnapshot=r,Vg(t)&&Ug(e)}function Bg(e,t,n){return n(function(){Vg(t)&&Ug(e)})}function Vg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!$t(e,n)}catch{return!0}}function Ug(e){var t=gn(e,1);t!==null&&Dt(t,e,1,-1)}function _h(e){var t=Ut();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t.queue=e,e=e.dispatch=e2.bind(null,Ee,e),[t.memoizedState,e]}function Ro(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Wg(){return St().memoizedState}function Qi(e,t,n,r){var s=Ut();Ee.flags|=e,s.memoizedState=Ro(1|t,n,void 0,r===void 0?null:r)}function ol(e,t,n,r){var s=St();r=r===void 0?null:r;var o=void 0;if(ze!==null){var i=ze.memoizedState;if(o=i.destroy,r!==null&&Pd(r,i.deps)){s.memoizedState=Ro(t,n,o,r);return}}Ee.flags|=e,s.memoizedState=Ro(1|t,n,o,r)}function Ph(e,t){return Qi(8390656,8,e,t)}function Rd(e,t){return ol(2048,8,e,t)}function Kg(e,t){return ol(4,2,e,t)}function Gg(e,t){return ol(4,4,e,t)}function Yg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Xg(e,t,n){return n=n!=null?n.concat([e]):null,ol(4,4,Yg.bind(null,t,e),n)}function Td(){}function Qg(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Pd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qg(e,t){var n=St();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Pd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Zg(e,t,n){return yr&21?($t(n,t)||(n=rg(),Ee.lanes|=n,vr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ot=!0),e.memoizedState=n)}function ZN(e,t){var n=fe;fe=n!==0&&4>n?n:4,e(!0);var r=ic.transition;ic.transition={};try{e(!1),t()}finally{fe=n,ic.transition=r}}function Jg(){return St().memoizedState}function JN(e,t,n){var r=Hn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ex(e))tx(t,n);else if(n=Ag(e,t,n,r),n!==null){var s=Ze();Dt(n,e,r,s),nx(n,t,r)}}function e2(e,t,n){var r=Hn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ex(e))tx(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,l=o(i,n);if(s.hasEagerState=!0,s.eagerState=l,$t(l,i)){var c=t.interleaved;c===null?(s.next=s,Sd(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=Ag(e,t,s,r),n!==null&&(s=Ze(),Dt(n,e,r,s),nx(n,t,r))}}function ex(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function tx(e,t){co=_a=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ud(e,n)}}var Pa={readContext:bt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},t2={readContext:bt,useCallback:function(e,t){return Ut().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:Ph,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qi(4194308,4,Yg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qi(4,2,e,t)},useMemo:function(e,t){var n=Ut();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ut();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=JN.bind(null,Ee,e),[r.memoizedState,e]},useRef:function(e){var t=Ut();return e={current:e},t.memoizedState=e},useState:_h,useDebugValue:Td,useDeferredValue:function(e){return Ut().memoizedState=e},useTransition:function(){var e=_h(!1),t=e[0];return e=ZN.bind(null,e[1]),Ut().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ee,s=Ut();if(je){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),Fe===null)throw Error(H(349));yr&30||Fg(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Ph(Bg.bind(null,r,o,e),[e]),r.flags|=2048,Ro(9,Hg.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ut(),t=Fe.identifierPrefix;if(je){var n=un,r=cn;n=(r&~(1<<32-zt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Mo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=qN++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},n2={readContext:bt,useCallback:Qg,useContext:bt,useEffect:Rd,useImperativeHandle:Xg,useInsertionEffect:Kg,useLayoutEffect:Gg,useMemo:qg,useReducer:ac,useRef:Wg,useState:function(){return ac(Io)},useDebugValue:Td,useDeferredValue:function(e){var t=St();return Zg(t,ze.memoizedState,e)},useTransition:function(){var e=ac(Io)[0],t=St().memoizedState;return[e,t]},useMutableSource:$g,useSyncExternalStore:Og,useId:Jg,unstable_isNewReconciler:!1},r2={readContext:bt,useCallback:Qg,useContext:bt,useEffect:Rd,useImperativeHandle:Xg,useInsertionEffect:Kg,useLayoutEffect:Gg,useMemo:qg,useReducer:lc,useRef:Wg,useState:function(){return lc(Io)},useDebugValue:Td,useDeferredValue:function(e){var t=St();return ze===null?t.memoizedState=e:Zg(t,ze.memoizedState,e)},useTransition:function(){var e=lc(Io)[0],t=St().memoizedState;return[e,t]},useMutableSource:$g,useSyncExternalStore:Og,useId:Jg,unstable_isNewReconciler:!1};function Pt(e,t){if(e&&e.defaultProps){t=_e({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function fu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:_e({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var il={isMounted:function(e){return(e=e._reactInternals)?_r(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ze(),s=Hn(e),o=fn(r,s);o.payload=t,n!=null&&(o.callback=n),t=On(e,o,s),t!==null&&(Dt(t,e,s,r),Yi(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ze(),s=Hn(e),o=fn(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=On(e,o,s),t!==null&&(Dt(t,e,s,r),Yi(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ze(),r=Hn(e),s=fn(n,r);s.tag=2,t!=null&&(s.callback=t),t=On(e,s,r),t!==null&&(Dt(t,e,r,n),Yi(t,e,r))}};function Mh(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!So(n,r)||!So(s,o):!0}function rx(e,t,n){var r=!1,s=Wn,o=t.contextType;return typeof o=="object"&&o!==null?o=bt(o):(s=lt(t)?gr:Qe.current,r=t.contextTypes,o=(r=r!=null)?ds(e,s):Wn),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=il,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Ih(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&il.enqueueReplaceState(t,t.state,null)}function hu(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},kd(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=bt(o):(o=lt(t)?gr:Qe.current,s.context=ds(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(fu(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&il.enqueueReplaceState(s,s.state,null),Ca(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ps(e,t){try{var n="",r=t;do n+=I1(r),r=r.return;while(r);var s=n}catch(o){s=`
|
|
39
|
+
Error generating stack: `+o.message+`
|
|
40
|
+
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function cc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function mu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var s2=typeof WeakMap=="function"?WeakMap:Map;function sx(e,t,n){n=fn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ia||(Ia=!0,Su=r),mu(e,t)},n}function ox(e,t,n){n=fn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){mu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){mu(e,t),typeof r!="function"&&(Fn===null?Fn=new Set([this]):Fn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Rh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new s2;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=y2.bind(null,e,t,n),t.then(e,e))}function Th(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Lh(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=fn(-1,1),t.tag=2,On(n,t,1))),n.lanes|=1),e)}var o2=vn.ReactCurrentOwner,ot=!1;function qe(e,t,n,r){t.child=e===null?Lg(t,null,n,r):hs(t,e.child,n,r)}function Ah(e,t,n,r,s){n=n.render;var o=t.ref;return os(t,s),r=Md(e,t,n,r,o,s),n=Id(),e!==null&&!ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xn(e,t,s)):(je&&n&&yd(t),t.flags|=1,qe(e,t,r,s),t.child)}function zh(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Hd(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,ix(e,t,o,r,s)):(e=ea(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:So,n(i,r)&&e.ref===t.ref)return xn(e,t,s)}return t.flags|=1,e=Bn(o,r),e.ref=t.ref,e.return=t,t.child=e}function ix(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(So(o,r)&&e.ref===t.ref)if(ot=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(ot=!0);else return t.lanes=e.lanes,xn(e,t,s)}return pu(e,t,n,r,s)}function ax(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ge(Zr,ut),ut|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ge(Zr,ut),ut|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ge(Zr,ut),ut|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ge(Zr,ut),ut|=r;return qe(e,t,s,n),t.child}function lx(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function pu(e,t,n,r,s){var o=lt(n)?gr:Qe.current;return o=ds(t,o),os(t,s),n=Md(e,t,n,r,o,s),r=Id(),e!==null&&!ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xn(e,t,s)):(je&&r&&yd(t),t.flags|=1,qe(e,t,n,s),t.child)}function Dh(e,t,n,r,s){if(lt(n)){var o=!0;Na(t)}else o=!1;if(os(t,s),t.stateNode===null)qi(e,t),rx(t,n,r),hu(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=bt(u):(u=lt(n)?gr:Qe.current,u=ds(t,u));var h=n.getDerivedStateFromProps,d=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||c!==u)&&Ih(t,i,r,u),Pn=!1;var f=t.memoizedState;i.state=f,Ca(t,r,i,s),c=t.memoizedState,l!==r||f!==c||at.current||Pn?(typeof h=="function"&&(fu(t,n,h,r),c=t.memoizedState),(l=Pn||Mh(t,n,l,r,f,c,u))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,zg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Pt(t.type,l),i.props=u,d=t.pendingProps,f=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=bt(c):(c=lt(n)?gr:Qe.current,c=ds(t,c));var g=n.getDerivedStateFromProps;(h=typeof g=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==d||f!==c)&&Ih(t,i,r,c),Pn=!1,f=t.memoizedState,i.state=f,Ca(t,r,i,s);var x=t.memoizedState;l!==d||f!==x||at.current||Pn?(typeof g=="function"&&(fu(t,n,g,r),x=t.memoizedState),(u=Pn||Mh(t,n,u,r,f,x,c)||!1)?(h||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return gu(e,t,n,r,o,s)}function gu(e,t,n,r,s,o){lx(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&jh(t,n,!1),xn(e,t,o);r=t.stateNode,o2.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=hs(t,e.child,null,o),t.child=hs(t,null,l,o)):qe(e,t,l,o),t.memoizedState=r.state,s&&jh(t,n,!0),t.child}function cx(e){var t=e.stateNode;t.pendingContext?Nh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Nh(e,t.context,!1),Cd(e,t.containerInfo)}function $h(e,t,n,r,s){return fs(),wd(s),t.flags|=256,qe(e,t,n,r),t.child}var xu={dehydrated:null,treeContext:null,retryLane:0};function yu(e){return{baseLanes:e,cachePool:null,transitions:null}}function ux(e,t,n){var r=t.pendingProps,s=Ce.current,o=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ge(Ce,s&1),e===null)return uu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=cl(i,r,0,null),e=hr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=yu(n),t.memoizedState=xu,e):Ld(t,i));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return i2(e,t,i,r,l,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Bn(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=Bn(l,o):(o=hr(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?yu(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=xu,r}return o=e.child,e=o.sibling,r=Bn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ld(e,t){return t=cl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ni(e,t,n,r){return r!==null&&wd(r),hs(t,e.child,null,n),e=Ld(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function i2(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=cc(Error(H(422))),Ni(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=cl({mode:"visible",children:r.children},s,0,null),o=hr(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&hs(t,e.child,null,i),t.child.memoizedState=yu(i),t.memoizedState=xu,o);if(!(t.mode&1))return Ni(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(H(419)),r=cc(o,r,void 0),Ni(e,t,i,r)}if(l=(i&e.childLanes)!==0,ot||l){if(r=Fe,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,gn(e,s),Dt(r,e,s,-1))}return Fd(),r=cc(Error(H(421))),Ni(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=v2.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,ft=$n(s.nextSibling),ht=t,je=!0,Rt=null,e!==null&&(vt[wt++]=cn,vt[wt++]=un,vt[wt++]=xr,cn=e.id,un=e.overflow,xr=t),t=Ld(t,r.children),t.flags|=4096,t)}function Oh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),du(e.return,t,n)}function uc(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function dx(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(qe(e,t,r.children,n),r=Ce.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oh(e,n,t);else if(e.tag===19)Oh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ge(Ce,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Ea(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),uc(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Ea(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}uc(t,!0,n,null,o);break;case"together":uc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function qi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=Bn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Bn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function a2(e,t,n){switch(t.tag){case 3:cx(t),fs();break;case 5:Dg(t);break;case 1:lt(t.type)&&Na(t);break;case 4:Cd(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ge(Sa,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ge(Ce,Ce.current&1),t.flags|=128,null):n&t.child.childLanes?ux(e,t,n):(ge(Ce,Ce.current&1),e=xn(e,t,n),e!==null?e.sibling:null);ge(Ce,Ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return dx(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ge(Ce,Ce.current),r)break;return null;case 22:case 23:return t.lanes=0,ax(e,t,n)}return xn(e,t,n)}var fx,vu,hx,mx;fx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};vu=function(){};hx=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,cr(Qt.current);var o=null;switch(n){case"input":s=Hc(e,s),r=Hc(e,r),o=[];break;case"select":s=_e({},s,{value:void 0}),r=_e({},r,{value:void 0}),o=[];break;case"textarea":s=Uc(e,s),r=Uc(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=va)}Kc(n,r);var i;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(xo.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(o||(o=[]),o.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(xo.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&ve("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};mx=function(e,t,n,r){n!==r&&(t.flags|=4)};function Us(e,t){if(!je)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function l2(e,t,n){var r=t.pendingProps;switch(vd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(t),null;case 1:return lt(t.type)&&wa(),Ge(t),null;case 3:return r=t.stateNode,ms(),we(at),we(Qe),_d(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(vi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Rt!==null&&(Eu(Rt),Rt=null))),vu(e,t),Ge(t),null;case 5:Ed(t);var s=cr(Po.current);if(n=t.type,e!==null&&t.stateNode!=null)hx(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return Ge(t),null}if(e=cr(Qt.current),vi(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Gt]=t,r[Eo]=o,e=(t.mode&1)!==0,n){case"dialog":ve("cancel",r),ve("close",r);break;case"iframe":case"object":case"embed":ve("load",r);break;case"video":case"audio":for(s=0;s<to.length;s++)ve(to[s],r);break;case"source":ve("error",r);break;case"img":case"image":case"link":ve("error",r),ve("load",r);break;case"details":ve("toggle",r);break;case"input":Yf(r,o),ve("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ve("invalid",r);break;case"textarea":Qf(r,o),ve("invalid",r)}Kc(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&yi(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&yi(r.textContent,l,e),s=["children",""+l]):xo.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&ve("scroll",r)}switch(n){case"input":ui(r),Xf(r,o,!0);break;case"textarea":ui(r),qf(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=va)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Bp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Gt]=t,e[Eo]=r,fx(e,t,!1,!1),t.stateNode=e;e:{switch(i=Gc(n,r),n){case"dialog":ve("cancel",e),ve("close",e),s=r;break;case"iframe":case"object":case"embed":ve("load",e),s=r;break;case"video":case"audio":for(s=0;s<to.length;s++)ve(to[s],e);s=r;break;case"source":ve("error",e),s=r;break;case"img":case"image":case"link":ve("error",e),ve("load",e),s=r;break;case"details":ve("toggle",e),s=r;break;case"input":Yf(e,r),s=Hc(e,r),ve("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=_e({},r,{value:void 0}),ve("invalid",e);break;case"textarea":Qf(e,r),s=Uc(e,r),ve("invalid",e);break;default:s=r}Kc(n,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?Wp(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Vp(e,c)):o==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&yo(e,c):typeof c=="number"&&yo(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(xo.hasOwnProperty(o)?c!=null&&o==="onScroll"&&ve("scroll",e):c!=null&&sd(e,o,c,i))}switch(n){case"input":ui(e),Xf(e,r,!1);break;case"textarea":ui(e),qf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Un(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?ts(e,!!r.multiple,o,!1):r.defaultValue!=null&&ts(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=va)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ge(t),null;case 6:if(e&&t.stateNode!=null)mx(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=cr(Po.current),cr(Qt.current),vi(t)){if(r=t.stateNode,n=t.memoizedProps,r[Gt]=t,(o=r.nodeValue!==n)&&(e=ht,e!==null))switch(e.tag){case 3:yi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&yi(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Gt]=t,t.stateNode=r}return Ge(t),null;case 13:if(we(Ce),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(je&&ft!==null&&t.mode&1&&!(t.flags&128))Rg(),fs(),t.flags|=98560,o=!1;else if(o=vi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(H(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(H(317));o[Gt]=t}else fs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ge(t),o=!1}else Rt!==null&&(Eu(Rt),Rt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ce.current&1?De===0&&(De=3):Fd())),t.updateQueue!==null&&(t.flags|=4),Ge(t),null);case 4:return ms(),vu(e,t),e===null&&ko(t.stateNode.containerInfo),Ge(t),null;case 10:return bd(t.type._context),Ge(t),null;case 17:return lt(t.type)&&wa(),Ge(t),null;case 19:if(we(Ce),o=t.memoizedState,o===null)return Ge(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)Us(o,!1);else{if(De!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Ea(e),i!==null){for(t.flags|=128,Us(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ge(Ce,Ce.current&1|2),t.child}e=e.sibling}o.tail!==null&&Me()>gs&&(t.flags|=128,r=!0,Us(o,!1),t.lanes=4194304)}else{if(!r)if(e=Ea(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Us(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!je)return Ge(t),null}else 2*Me()-o.renderingStartTime>gs&&n!==1073741824&&(t.flags|=128,r=!0,Us(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Me(),t.sibling=null,n=Ce.current,ge(Ce,r?n&1|2:n&1),t):(Ge(t),null);case 22:case 23:return Od(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ut&1073741824&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function c2(e,t){switch(vd(t),t.tag){case 1:return lt(t.type)&&wa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ms(),we(at),we(Qe),_d(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ed(t),null;case 13:if(we(Ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));fs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Ce),null;case 4:return ms(),null;case 10:return bd(t.type._context),null;case 22:case 23:return Od(),null;case 24:return null;default:return null}}var ji=!1,Xe=!1,u2=typeof WeakSet=="function"?WeakSet:Set,W=null;function qr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Pe(e,t,r)}else n.current=null}function wu(e,t,n){try{n()}catch(r){Pe(e,t,r)}}var Fh=!1;function d2(e,t){if(ru=ga,e=vg(),xd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,l=-1,c=-1,u=0,h=0,d=e,f=null;t:for(;;){for(var g;d!==n||s!==0&&d.nodeType!==3||(l=i+s),d!==o||r!==0&&d.nodeType!==3||(c=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(g=d.firstChild)!==null;)f=d,d=g;for(;;){if(d===e)break t;if(f===n&&++u===s&&(l=i),f===o&&++h===r&&(c=i),(g=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=g}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(su={focusedElem:e,selectionRange:n},ga=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var v=x.memoizedProps,N=x.memoizedState,p=t.stateNode,w=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:Pt(t.type,v),N);p.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(j){Pe(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return x=Fh,Fh=!1,x}function uo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&wu(t,n,o)}s=s.next}while(s!==r)}}function al(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Nu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function px(e){var t=e.alternate;t!==null&&(e.alternate=null,px(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Gt],delete t[Eo],delete t[au],delete t[GN],delete t[YN])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function gx(e){return e.tag===5||e.tag===3||e.tag===4}function Hh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ju(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=va));else if(r!==4&&(e=e.child,e!==null))for(ju(e,t,n),e=e.sibling;e!==null;)ju(e,t,n),e=e.sibling}function bu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(bu(e,t,n),e=e.sibling;e!==null;)bu(e,t,n),e=e.sibling}var He=null,Mt=!1;function jn(e,t,n){for(n=n.child;n!==null;)xx(e,t,n),n=n.sibling}function xx(e,t,n){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(Ja,n)}catch{}switch(n.tag){case 5:Xe||qr(n,t);case 6:var r=He,s=Mt;He=null,jn(e,t,n),He=r,Mt=s,He!==null&&(Mt?(e=He,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):He.removeChild(n.stateNode));break;case 18:He!==null&&(Mt?(e=He,n=n.stateNode,e.nodeType===8?rc(e.parentNode,n):e.nodeType===1&&rc(e,n),jo(e)):rc(He,n.stateNode));break;case 4:r=He,s=Mt,He=n.stateNode.containerInfo,Mt=!0,jn(e,t,n),He=r,Mt=s;break;case 0:case 11:case 14:case 15:if(!Xe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&wu(n,t,i),s=s.next}while(s!==r)}jn(e,t,n);break;case 1:if(!Xe&&(qr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Pe(n,t,l)}jn(e,t,n);break;case 21:jn(e,t,n);break;case 22:n.mode&1?(Xe=(r=Xe)||n.memoizedState!==null,jn(e,t,n),Xe=r):jn(e,t,n);break;default:jn(e,t,n)}}function Bh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new u2),t.forEach(function(r){var s=w2.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function _t(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:He=l.stateNode,Mt=!1;break e;case 3:He=l.stateNode.containerInfo,Mt=!0;break e;case 4:He=l.stateNode.containerInfo,Mt=!0;break e}l=l.return}if(He===null)throw Error(H(160));xx(o,i,s),He=null,Mt=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Pe(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)yx(t,e),t=t.sibling}function yx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(_t(t,e),Vt(e),r&4){try{uo(3,e,e.return),al(3,e)}catch(v){Pe(e,e.return,v)}try{uo(5,e,e.return)}catch(v){Pe(e,e.return,v)}}break;case 1:_t(t,e),Vt(e),r&512&&n!==null&&qr(n,n.return);break;case 5:if(_t(t,e),Vt(e),r&512&&n!==null&&qr(n,n.return),e.flags&32){var s=e.stateNode;try{yo(s,"")}catch(v){Pe(e,e.return,v)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Fp(s,o),Gc(l,i);var u=Gc(l,o);for(i=0;i<c.length;i+=2){var h=c[i],d=c[i+1];h==="style"?Wp(s,d):h==="dangerouslySetInnerHTML"?Vp(s,d):h==="children"?yo(s,d):sd(s,h,d,u)}switch(l){case"input":Bc(s,o);break;case"textarea":Hp(s,o);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var g=o.value;g!=null?ts(s,!!o.multiple,g,!1):f!==!!o.multiple&&(o.defaultValue!=null?ts(s,!!o.multiple,o.defaultValue,!0):ts(s,!!o.multiple,o.multiple?[]:"",!1))}s[Eo]=o}catch(v){Pe(e,e.return,v)}}break;case 6:if(_t(t,e),Vt(e),r&4){if(e.stateNode===null)throw Error(H(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(v){Pe(e,e.return,v)}}break;case 3:if(_t(t,e),Vt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{jo(t.containerInfo)}catch(v){Pe(e,e.return,v)}break;case 4:_t(t,e),Vt(e);break;case 13:_t(t,e),Vt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Dd=Me())),r&4&&Bh(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Xe=(u=Xe)||h,_t(t,e),Xe=u):_t(t,e),Vt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!h&&e.mode&1)for(W=e,h=e.child;h!==null;){for(d=W=h;W!==null;){switch(f=W,g=f.child,f.tag){case 0:case 11:case 14:case 15:uo(4,f,f.return);break;case 1:qr(f,f.return);var x=f.stateNode;if(typeof x.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(v){Pe(r,n,v)}}break;case 5:qr(f,f.return);break;case 22:if(f.memoizedState!==null){Uh(d);continue}}g!==null?(g.return=f,W=g):Uh(d)}h=h.sibling}e:for(h=null,d=e;;){if(d.tag===5){if(h===null){h=d;try{s=d.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,c=d.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Up("display",i))}catch(v){Pe(e,e.return,v)}}}else if(d.tag===6){if(h===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){Pe(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:_t(t,e),Vt(e),r&4&&Bh(e);break;case 21:break;default:_t(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(gx(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(yo(s,""),r.flags&=-33);var o=Hh(e);bu(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,l=Hh(e);ju(e,l,i);break;default:throw Error(H(161))}}catch(c){Pe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function f2(e,t,n){W=e,vx(e)}function vx(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var s=W,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||ji;if(!i){var l=s.alternate,c=l!==null&&l.memoizedState!==null||Xe;l=ji;var u=Xe;if(ji=i,(Xe=c)&&!u)for(W=s;W!==null;)i=W,c=i.child,i.tag===22&&i.memoizedState!==null?Wh(s):c!==null?(c.return=i,W=c):Wh(s);for(;o!==null;)W=o,vx(o),o=o.sibling;W=s,ji=l,Xe=u}Vh(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,W=o):Vh(e)}}function Vh(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Xe||al(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Xe)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Pt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Eh(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Eh(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var h=u.memoizedState;if(h!==null){var d=h.dehydrated;d!==null&&jo(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}Xe||t.flags&512&&Nu(t)}catch(f){Pe(t,t.return,f)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Uh(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function Wh(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{al(4,t)}catch(c){Pe(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){Pe(t,s,c)}}var o=t.return;try{Nu(t)}catch(c){Pe(t,o,c)}break;case 5:var i=t.return;try{Nu(t)}catch(c){Pe(t,i,c)}}}catch(c){Pe(t,t.return,c)}if(t===e){W=null;break}var l=t.sibling;if(l!==null){l.return=t.return,W=l;break}W=t.return}}var h2=Math.ceil,Ma=vn.ReactCurrentDispatcher,Ad=vn.ReactCurrentOwner,jt=vn.ReactCurrentBatchConfig,ae=0,Fe=null,Le=null,Be=0,ut=0,Zr=Zn(0),De=0,To=null,vr=0,ll=0,zd=0,fo=null,st=null,Dd=0,gs=1/0,an=null,Ia=!1,Su=null,Fn=null,bi=!1,Ln=null,Ra=0,ho=0,ku=null,Zi=-1,Ji=0;function Ze(){return ae&6?Me():Zi!==-1?Zi:Zi=Me()}function Hn(e){return e.mode&1?ae&2&&Be!==0?Be&-Be:QN.transition!==null?(Ji===0&&(Ji=rg()),Ji):(e=fe,e!==0||(e=window.event,e=e===void 0?16:ug(e.type)),e):1}function Dt(e,t,n,r){if(50<ho)throw ho=0,ku=null,Error(H(185));Ko(e,n,r),(!(ae&2)||e!==Fe)&&(e===Fe&&(!(ae&2)&&(ll|=n),De===4&&In(e,Be)),ct(e,r),n===1&&ae===0&&!(t.mode&1)&&(gs=Me()+500,sl&&Jn()))}function ct(e,t){var n=e.callbackNode;Q1(e,t);var r=pa(e,e===Fe?Be:0);if(r===0)n!==null&&eh(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&eh(n),t===1)e.tag===0?XN(Kh.bind(null,e)):Pg(Kh.bind(null,e)),WN(function(){!(ae&6)&&Jn()}),n=null;else{switch(sg(r)){case 1:n=cd;break;case 4:n=tg;break;case 16:n=ma;break;case 536870912:n=ng;break;default:n=ma}n=Ex(n,wx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function wx(e,t){if(Zi=-1,Ji=0,ae&6)throw Error(H(327));var n=e.callbackNode;if(is()&&e.callbackNode!==n)return null;var r=pa(e,e===Fe?Be:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ta(e,r);else{t=r;var s=ae;ae|=2;var o=jx();(Fe!==e||Be!==t)&&(an=null,gs=Me()+500,fr(e,t));do try{g2();break}catch(l){Nx(e,l)}while(!0);jd(),Ma.current=o,ae=s,Le!==null?t=0:(Fe=null,Be=0,t=De)}if(t!==0){if(t===2&&(s=Zc(e),s!==0&&(r=s,t=Cu(e,s))),t===1)throw n=To,fr(e,0),In(e,r),ct(e,Me()),n;if(t===6)In(e,r);else{if(s=e.current.alternate,!(r&30)&&!m2(s)&&(t=Ta(e,r),t===2&&(o=Zc(e),o!==0&&(r=o,t=Cu(e,o))),t===1))throw n=To,fr(e,0),In(e,r),ct(e,Me()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:or(e,st,an);break;case 3:if(In(e,r),(r&130023424)===r&&(t=Dd+500-Me(),10<t)){if(pa(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Ze(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=iu(or.bind(null,e,st,an),t);break}or(e,st,an);break;case 4:if(In(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-zt(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*h2(r/1960))-r,10<r){e.timeoutHandle=iu(or.bind(null,e,st,an),r);break}or(e,st,an);break;case 5:or(e,st,an);break;default:throw Error(H(329))}}}return ct(e,Me()),e.callbackNode===n?wx.bind(null,e):null}function Cu(e,t){var n=fo;return e.current.memoizedState.isDehydrated&&(fr(e,t).flags|=256),e=Ta(e,t),e!==2&&(t=st,st=n,t!==null&&Eu(t)),e}function Eu(e){st===null?st=e:st.push.apply(st,e)}function m2(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!$t(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function In(e,t){for(t&=~zd,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-zt(t),r=1<<n;e[n]=-1,t&=~r}}function Kh(e){if(ae&6)throw Error(H(327));is();var t=pa(e,0);if(!(t&1))return ct(e,Me()),null;var n=Ta(e,t);if(e.tag!==0&&n===2){var r=Zc(e);r!==0&&(t=r,n=Cu(e,r))}if(n===1)throw n=To,fr(e,0),In(e,t),ct(e,Me()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,or(e,st,an),ct(e,Me()),null}function $d(e,t){var n=ae;ae|=1;try{return e(t)}finally{ae=n,ae===0&&(gs=Me()+500,sl&&Jn())}}function wr(e){Ln!==null&&Ln.tag===0&&!(ae&6)&&is();var t=ae;ae|=1;var n=jt.transition,r=fe;try{if(jt.transition=null,fe=1,e)return e()}finally{fe=r,jt.transition=n,ae=t,!(ae&6)&&Jn()}}function Od(){ut=Zr.current,we(Zr)}function fr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,UN(n)),Le!==null)for(n=Le.return;n!==null;){var r=n;switch(vd(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&wa();break;case 3:ms(),we(at),we(Qe),_d();break;case 5:Ed(r);break;case 4:ms();break;case 13:we(Ce);break;case 19:we(Ce);break;case 10:bd(r.type._context);break;case 22:case 23:Od()}n=n.return}if(Fe=e,Le=e=Bn(e.current,null),Be=ut=t,De=0,To=null,zd=ll=vr=0,st=fo=null,lr!==null){for(t=0;t<lr.length;t++)if(n=lr[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}lr=null}return e}function Nx(e,t){do{var n=Le;try{if(jd(),Xi.current=Pa,_a){for(var r=Ee.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}_a=!1}if(yr=0,Oe=ze=Ee=null,co=!1,Mo=0,Ad.current=null,n===null||n.return===null){De=1,To=t,Le=null;break}e:{var o=e,i=n.return,l=n,c=t;if(t=Be,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,h=l,d=h.tag;if(!(h.mode&1)&&(d===0||d===11||d===15)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var g=Th(i);if(g!==null){g.flags&=-257,Lh(g,i,l,o,t),g.mode&1&&Rh(o,u,t),t=g,c=u;var x=t.updateQueue;if(x===null){var v=new Set;v.add(c),t.updateQueue=v}else x.add(c);break e}else{if(!(t&1)){Rh(o,u,t),Fd();break e}c=Error(H(426))}}else if(je&&l.mode&1){var N=Th(i);if(N!==null){!(N.flags&65536)&&(N.flags|=256),Lh(N,i,l,o,t),wd(ps(c,l));break e}}o=c=ps(c,l),De!==4&&(De=2),fo===null?fo=[o]:fo.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=sx(o,c,t);Ch(o,p);break e;case 1:l=c;var w=o.type,y=o.stateNode;if(!(o.flags&128)&&(typeof w.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Fn===null||!Fn.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t;var j=ox(o,l,t);Ch(o,j);break e}}o=o.return}while(o!==null)}Sx(n)}catch(b){t=b,Le===n&&n!==null&&(Le=n=n.return);continue}break}while(!0)}function jx(){var e=Ma.current;return Ma.current=Pa,e===null?Pa:e}function Fd(){(De===0||De===3||De===2)&&(De=4),Fe===null||!(vr&268435455)&&!(ll&268435455)||In(Fe,Be)}function Ta(e,t){var n=ae;ae|=2;var r=jx();(Fe!==e||Be!==t)&&(an=null,fr(e,t));do try{p2();break}catch(s){Nx(e,s)}while(!0);if(jd(),ae=n,Ma.current=r,Le!==null)throw Error(H(261));return Fe=null,Be=0,De}function p2(){for(;Le!==null;)bx(Le)}function g2(){for(;Le!==null&&!H1();)bx(Le)}function bx(e){var t=Cx(e.alternate,e,ut);e.memoizedProps=e.pendingProps,t===null?Sx(e):Le=t,Ad.current=null}function Sx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=c2(n,t),n!==null){n.flags&=32767,Le=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{De=6,Le=null;return}}else if(n=l2(n,t,ut),n!==null){Le=n;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);De===0&&(De=5)}function or(e,t,n){var r=fe,s=jt.transition;try{jt.transition=null,fe=1,x2(e,t,n,r)}finally{jt.transition=s,fe=r}return null}function x2(e,t,n,r){do is();while(Ln!==null);if(ae&6)throw Error(H(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(q1(e,o),e===Fe&&(Le=Fe=null,Be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||bi||(bi=!0,Ex(ma,function(){return is(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=jt.transition,jt.transition=null;var i=fe;fe=1;var l=ae;ae|=4,Ad.current=null,d2(e,n),yx(n,e),DN(su),ga=!!ru,su=ru=null,e.current=n,f2(n),B1(),ae=l,fe=i,jt.transition=o}else e.current=n;if(bi&&(bi=!1,Ln=e,Ra=s),o=e.pendingLanes,o===0&&(Fn=null),W1(n.stateNode),ct(e,Me()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ia)throw Ia=!1,e=Su,Su=null,e;return Ra&1&&e.tag!==0&&is(),o=e.pendingLanes,o&1?e===ku?ho++:(ho=0,ku=e):ho=0,Jn(),null}function is(){if(Ln!==null){var e=sg(Ra),t=jt.transition,n=fe;try{if(jt.transition=null,fe=16>e?16:e,Ln===null)var r=!1;else{if(e=Ln,Ln=null,Ra=0,ae&6)throw Error(H(331));var s=ae;for(ae|=4,W=e.current;W!==null;){var o=W,i=o.child;if(W.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(W=u;W!==null;){var h=W;switch(h.tag){case 0:case 11:case 15:uo(8,h,o)}var d=h.child;if(d!==null)d.return=h,W=d;else for(;W!==null;){h=W;var f=h.sibling,g=h.return;if(px(h),h===u){W=null;break}if(f!==null){f.return=g,W=f;break}W=g}}}var x=o.alternate;if(x!==null){var v=x.child;if(v!==null){x.child=null;do{var N=v.sibling;v.sibling=null,v=N}while(v!==null)}}W=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,W=i;else e:for(;W!==null;){if(o=W,o.flags&2048)switch(o.tag){case 0:case 11:case 15:uo(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,W=p;break e}W=o.return}}var w=e.current;for(W=w;W!==null;){i=W;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,W=y;else e:for(i=w;W!==null;){if(l=W,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:al(9,l)}}catch(b){Pe(l,l.return,b)}if(l===i){W=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,W=j;break e}W=l.return}}if(ae=s,Jn(),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(Ja,e)}catch{}r=!0}return r}finally{fe=n,jt.transition=t}}return!1}function Gh(e,t,n){t=ps(n,t),t=sx(e,t,1),e=On(e,t,1),t=Ze(),e!==null&&(Ko(e,1,t),ct(e,t))}function Pe(e,t,n){if(e.tag===3)Gh(e,e,n);else for(;t!==null;){if(t.tag===3){Gh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Fn===null||!Fn.has(r))){e=ps(n,e),e=ox(t,e,1),t=On(t,e,1),e=Ze(),t!==null&&(Ko(t,1,e),ct(t,e));break}}t=t.return}}function y2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ze(),e.pingedLanes|=e.suspendedLanes&n,Fe===e&&(Be&n)===n&&(De===4||De===3&&(Be&130023424)===Be&&500>Me()-Dd?fr(e,0):zd|=n),ct(e,t)}function kx(e,t){t===0&&(e.mode&1?(t=hi,hi<<=1,!(hi&130023424)&&(hi=4194304)):t=1);var n=Ze();e=gn(e,t),e!==null&&(Ko(e,t,n),ct(e,n))}function v2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),kx(e,n)}function w2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(H(314))}r!==null&&r.delete(t),kx(e,n)}var Cx;Cx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||at.current)ot=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ot=!1,a2(e,t,n);ot=!!(e.flags&131072)}else ot=!1,je&&t.flags&1048576&&Mg(t,ba,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qi(e,t),e=t.pendingProps;var s=ds(t,Qe.current);os(t,n),s=Md(null,t,r,e,s,n);var o=Id();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lt(r)?(o=!0,Na(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,kd(t),s.updater=il,t.stateNode=s,s._reactInternals=t,hu(t,r,e,n),t=gu(null,t,r,!0,o,n)):(t.tag=0,je&&o&&yd(t),qe(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qi(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=j2(r),e=Pt(r,e),s){case 0:t=pu(null,t,r,e,n);break e;case 1:t=Dh(null,t,r,e,n);break e;case 11:t=Ah(null,t,r,e,n);break e;case 14:t=zh(null,t,r,Pt(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Pt(r,s),pu(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Pt(r,s),Dh(e,t,r,s,n);case 3:e:{if(cx(t),e===null)throw Error(H(387));r=t.pendingProps,o=t.memoizedState,s=o.element,zg(e,t),Ca(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=ps(Error(H(423)),t),t=$h(e,t,r,n,s);break e}else if(r!==s){s=ps(Error(H(424)),t),t=$h(e,t,r,n,s);break e}else for(ft=$n(t.stateNode.containerInfo.firstChild),ht=t,je=!0,Rt=null,n=Lg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fs(),r===s){t=xn(e,t,n);break e}qe(e,t,r,n)}t=t.child}return t;case 5:return Dg(t),e===null&&uu(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,ou(r,s)?i=null:o!==null&&ou(r,o)&&(t.flags|=32),lx(e,t),qe(e,t,i,n),t.child;case 6:return e===null&&uu(t),null;case 13:return ux(e,t,n);case 4:return Cd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=hs(t,null,r,n):qe(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Pt(r,s),Ah(e,t,r,s,n);case 7:return qe(e,t,t.pendingProps,n),t.child;case 8:return qe(e,t,t.pendingProps.children,n),t.child;case 12:return qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,ge(Sa,r._currentValue),r._currentValue=i,o!==null)if($t(o.value,i)){if(o.children===s.children&&!at.current){t=xn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){i=o.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=fn(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?c.next=c:(c.next=h.next,h.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),du(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(H(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),du(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}qe(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,os(t,n),s=bt(s),r=r(s),t.flags|=1,qe(e,t,r,n),t.child;case 14:return r=t.type,s=Pt(r,t.pendingProps),s=Pt(r.type,s),zh(e,t,r,s,n);case 15:return ix(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Pt(r,s),qi(e,t),t.tag=1,lt(r)?(e=!0,Na(t)):e=!1,os(t,n),rx(t,r,s),hu(t,r,s,n),gu(null,t,r,!0,e,n);case 19:return dx(e,t,n);case 22:return ax(e,t,n)}throw Error(H(156,t.tag))};function Ex(e,t){return eg(e,t)}function N2(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nt(e,t,n,r){return new N2(e,t,n,r)}function Hd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function j2(e){if(typeof e=="function")return Hd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===id)return 11;if(e===ad)return 14}return 2}function Bn(e,t){var n=e.alternate;return n===null?(n=Nt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ea(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Hd(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Br:return hr(n.children,s,o,t);case od:i=8,s|=8;break;case Dc:return e=Nt(12,n,t,s|2),e.elementType=Dc,e.lanes=o,e;case $c:return e=Nt(13,n,t,s),e.elementType=$c,e.lanes=o,e;case Oc:return e=Nt(19,n,t,s),e.elementType=Oc,e.lanes=o,e;case Dp:return cl(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ap:i=10;break e;case zp:i=9;break e;case id:i=11;break e;case ad:i=14;break e;case _n:i=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=Nt(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function hr(e,t,n,r){return e=Nt(7,e,r,t),e.lanes=n,e}function cl(e,t,n,r){return e=Nt(22,e,r,t),e.elementType=Dp,e.lanes=n,e.stateNode={isHidden:!1},e}function dc(e,t,n){return e=Nt(6,e,null,t),e.lanes=n,e}function fc(e,t,n){return t=Nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function b2(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kl(0),this.expirationTimes=Kl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Bd(e,t,n,r,s,o,i,l,c){return e=new b2(e,t,n,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Nt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},kd(o),e}function S2(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function _x(e){if(!e)return Wn;e=e._reactInternals;e:{if(_r(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(lt(n))return _g(e,n,t)}return t}function Px(e,t,n,r,s,o,i,l,c){return e=Bd(n,r,!0,e,s,o,i,l,c),e.context=_x(null),n=e.current,r=Ze(),s=Hn(n),o=fn(r,s),o.callback=t??null,On(n,o,s),e.current.lanes=s,Ko(e,s,r),ct(e,r),e}function ul(e,t,n,r){var s=t.current,o=Ze(),i=Hn(s);return n=_x(n),t.context===null?t.context=n:t.pendingContext=n,t=fn(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=On(s,t,i),e!==null&&(Dt(e,s,i,o),Yi(e,s,i)),i}function La(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Yh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Vd(e,t){Yh(e,t),(e=e.alternate)&&Yh(e,t)}function k2(){return null}var Mx=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ud(e){this._internalRoot=e}dl.prototype.render=Ud.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));ul(e,t,null,null)};dl.prototype.unmount=Ud.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;wr(function(){ul(null,e,null,null)}),t[pn]=null}};function dl(e){this._internalRoot=e}dl.prototype.unstable_scheduleHydration=function(e){if(e){var t=ag();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mn.length&&t!==0&&t<Mn[n].priority;n++);Mn.splice(n,0,e),n===0&&cg(e)}};function Wd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function fl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Xh(){}function C2(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var u=La(i);o.call(u)}}var i=Px(t,r,e,0,null,!1,!1,"",Xh);return e._reactRootContainer=i,e[pn]=i.current,ko(e.nodeType===8?e.parentNode:e),wr(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=La(c);l.call(u)}}var c=Bd(e,0,!1,null,null,!1,!1,"",Xh);return e._reactRootContainer=c,e[pn]=c.current,ko(e.nodeType===8?e.parentNode:e),wr(function(){ul(t,c,n,r)}),c}function hl(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var l=s;s=function(){var c=La(i);l.call(c)}}ul(t,i,e,s)}else i=C2(n,t,e,s,r);return La(i)}og=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=eo(t.pendingLanes);n!==0&&(ud(t,n|1),ct(t,Me()),!(ae&6)&&(gs=Me()+500,Jn()))}break;case 13:wr(function(){var r=gn(e,1);if(r!==null){var s=Ze();Dt(r,e,1,s)}}),Vd(e,1)}};dd=function(e){if(e.tag===13){var t=gn(e,134217728);if(t!==null){var n=Ze();Dt(t,e,134217728,n)}Vd(e,134217728)}};ig=function(e){if(e.tag===13){var t=Hn(e),n=gn(e,t);if(n!==null){var r=Ze();Dt(n,e,t,r)}Vd(e,t)}};ag=function(){return fe};lg=function(e,t){var n=fe;try{return fe=e,t()}finally{fe=n}};Xc=function(e,t,n){switch(t){case"input":if(Bc(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=rl(r);if(!s)throw Error(H(90));Op(r),Bc(r,s)}}}break;case"textarea":Hp(e,n);break;case"select":t=n.value,t!=null&&ts(e,!!n.multiple,t,!1)}};Yp=$d;Xp=wr;var E2={usingClientEntryPoint:!1,Events:[Yo,Kr,rl,Kp,Gp,$d]},Ws={findFiberByHostInstance:ar,bundleType:0,version:"18.3.0",rendererPackageName:"react-dom"},_2={bundleType:Ws.bundleType,version:Ws.version,rendererPackageName:Ws.rendererPackageName,rendererConfig:Ws.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:vn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Zp(e),e===null?null:e.stateNode},findFiberByHostInstance:Ws.findFiberByHostInstance||k2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-next-8a015b68cc-20240425"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Si=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Si.isDisabled&&Si.supportsFiber)try{Ja=Si.inject(_2),Xt=Si}catch{}}xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=E2;xt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wd(t))throw Error(H(200));return S2(e,t,null,n)};xt.createRoot=function(e,t){if(!Wd(e))throw Error(H(299));var n=!1,r="",s=Mx;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Bd(e,1,!1,null,null,n,!1,r,s),e[pn]=t.current,ko(e.nodeType===8?e.parentNode:e),new Ud(t)};xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=Zp(t),e=e===null?null:e.stateNode,e};xt.flushSync=function(e){return wr(e)};xt.hydrate=function(e,t,n){if(!fl(t))throw Error(H(200));return hl(null,e,t,!0,n)};xt.hydrateRoot=function(e,t,n){if(!Wd(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=Mx;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Px(t,null,e,1,n??null,s,!1,o,i),e[pn]=t.current,ko(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new dl(t)};xt.render=function(e,t,n){if(!fl(t))throw Error(H(200));return hl(null,e,t,!1,n)};xt.unmountComponentAtNode=function(e){if(!fl(e))throw Error(H(40));return e._reactRootContainer?(wr(function(){hl(null,null,e,!1,function(){e._reactRootContainer=null,e[pn]=null})}),!0):!1};xt.unstable_batchedUpdates=$d;xt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!fl(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return hl(e,t,n,!1,r)};xt.version="18.3.0-next-8a015b68cc-20240425";function Ix(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ix)}catch(e){console.error(e)}}Ix(),Ip.exports=xt;var ml=Ip.exports;const P2=qu(ml);var Qh=ml;Ac.createRoot=Qh.createRoot,Ac.hydrateRoot=Qh.hydrateRoot;/**
|
|
41
|
+
* react-router v7.1.0
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/var qh="popstate";function M2(e={}){function t(r,s){let{pathname:o,search:i,hash:l}=r.location;return _u("",{pathname:o,search:i,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Lo(s)}return R2(t,n,null,e)}function be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function kt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function I2(){return Math.random().toString(36).substring(2,10)}function Zh(e,t){return{usr:e.state,key:e.key,idx:t}}function _u(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ms(t):t,state:n,key:t&&t.key||r||I2()}}function Lo({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ms(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function R2(e,t,n,r={}){let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,l="POP",c=null,u=h();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function h(){return(i.state||{idx:null}).idx}function d(){l="POP";let N=h(),p=N==null?null:N-u;u=N,c&&c({action:l,location:v.location,delta:p})}function f(N,p){l="PUSH";let w=_u(v.location,N,p);u=h()+1;let y=Zh(w,u),j=v.createHref(w);try{i.pushState(y,"",j)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;s.location.assign(j)}o&&c&&c({action:l,location:v.location,delta:1})}function g(N,p){l="REPLACE";let w=_u(v.location,N,p);u=h();let y=Zh(w,u),j=v.createHref(w);i.replaceState(y,"",j),o&&c&&c({action:l,location:v.location,delta:0})}function x(N){let p=s.location.origin!=="null"?s.location.origin:s.location.href,w=typeof N=="string"?N:Lo(N);return w=w.replace(/ $/,"%20"),be(p,`No window.location.(origin|href) available to create URL for href: ${w}`),new URL(w,p)}let v={get action(){return l},get location(){return e(s,i)},listen(N){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(qh,d),c=N,()=>{s.removeEventListener(qh,d),c=null}},createHref(N){return t(s,N)},createURL:x,encodeLocation(N){let p=x(N);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:f,replace:g,go(N){return i.go(N)}};return v}function Rx(e,t,n="/"){return T2(e,t,n,!1)}function T2(e,t,n,r){let s=typeof t=="string"?Ms(t):t,o=Kn(s.pathname||"/",n);if(o==null)return null;let i=Tx(e);L2(i);let l=null;for(let c=0;l==null&&c<i.length;++c){let u=W2(o);l=V2(i[c],u,r)}return l}function Tx(e,t=[],n=[],r=""){let s=(o,i,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(be(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length));let u=hn([r,c.relativePath]),h=n.concat(c);o.children&&o.children.length>0&&(be(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),Tx(o.children,t,h,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:H2(u,o.index),routesMeta:h})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,i);else for(let c of Lx(o.path))s(o,i,c)}),t}function Lx(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=Lx(r.join("/")),l=[];return l.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function L2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:B2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var A2=/^:[\w-]+$/,z2=3,D2=2,$2=1,O2=10,F2=-2,Jh=e=>e==="*";function H2(e,t){let n=e.split("/"),r=n.length;return n.some(Jh)&&(r+=F2),t&&(r+=D2),n.filter(s=>!Jh(s)).reduce((s,o)=>s+(A2.test(o)?z2:o===""?$2:O2),r)}function B2(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function V2(e,t,n=!1){let{routesMeta:r}=e,s={},o="/",i=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,h=o==="/"?t:t.slice(o.length)||"/",d=Aa({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},h),f=c.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=Aa({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!d)return null;Object.assign(s,d.params),i.push({params:s,pathname:hn([o,d.pathname]),pathnameBase:X2(hn([o,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(o=hn([o,d.pathnameBase]))}return i}function Aa(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=U2(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((u,{paramName:h,isOptional:d},f)=>{if(h==="*"){let x=l[f]||"";i=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const g=l[f];return d&&!g?u[h]=void 0:u[h]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function U2(e,t=!1,n=!0){kt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function W2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return kt(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Kn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function K2(e,t="/"){let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ms(e):e;return{pathname:n?n.startsWith("/")?n:G2(n,t):t,search:Q2(r),hash:q2(s)}}function G2(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function hc(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Y2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Kd(e){let t=Y2(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Gd(e,t,n,r=!1){let s;typeof e=="string"?s=Ms(e):(s={...e},be(!s.pathname||!s.pathname.includes("?"),hc("?","pathname","search",s)),be(!s.pathname||!s.pathname.includes("#"),hc("#","pathname","hash",s)),be(!s.search||!s.search.includes("#"),hc("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,l;if(i==null)l=n;else{let d=t.length-1;if(!r&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}l=d>=0?t[d]:"/"}let c=K2(s,l),u=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||h)&&(c.pathname+="/"),c}var hn=e=>e.join("/").replace(/\/\/+/g,"/"),X2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Q2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,q2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Z2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Ax=["POST","PUT","PATCH","DELETE"];new Set(Ax);var J2=["GET",...Ax];new Set(J2);var Is=m.createContext(null);Is.displayName="DataRouter";var pl=m.createContext(null);pl.displayName="DataRouterState";var zx=m.createContext({isTransitioning:!1});zx.displayName="ViewTransition";var ej=m.createContext(new Map);ej.displayName="Fetchers";var tj=m.createContext(null);tj.displayName="Await";var Ft=m.createContext(null);Ft.displayName="Navigation";var Qo=m.createContext(null);Qo.displayName="Location";var Et=m.createContext({outlet:null,matches:[],isDataRoute:!1});Et.displayName="Route";var Yd=m.createContext(null);Yd.displayName="RouteError";function nj(e,{relative:t}={}){be(Rs(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=m.useContext(Ft),{hash:s,pathname:o,search:i}=qo(e,{relative:t}),l=o;return n!=="/"&&(l=o==="/"?n:hn([n,o])),r.createHref({pathname:l,search:i,hash:s})}function Rs(){return m.useContext(Qo)!=null}function tn(){return be(Rs(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Qo).location}var Dx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $x(e){m.useContext(Ft).static||m.useLayoutEffect(e)}function gl(){let{isDataRoute:e}=m.useContext(Et);return e?yj():rj()}function rj(){be(Rs(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(Is),{basename:t,navigator:n}=m.useContext(Ft),{matches:r}=m.useContext(Et),{pathname:s}=tn(),o=JSON.stringify(Kd(r)),i=m.useRef(!1);return $x(()=>{i.current=!0}),m.useCallback((c,u={})=>{if(kt(i.current,Dx),!i.current)return;if(typeof c=="number"){n.go(c);return}let h=Gd(c,JSON.parse(o),s,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:hn([t,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[t,n,o,s,e])}var sj=m.createContext(null);function oj(e){let t=m.useContext(Et).outlet;return t&&m.createElement(sj.Provider,{value:e},t)}function ij(){let{matches:e}=m.useContext(Et),t=e[e.length-1];return t?t.params:{}}function qo(e,{relative:t}={}){let{matches:n}=m.useContext(Et),{pathname:r}=tn(),s=JSON.stringify(Kd(n));return m.useMemo(()=>Gd(e,JSON.parse(s),r,t==="path"),[e,s,r,t])}function aj(e,t){return Ox(e,t)}function Ox(e,t,n,r){var p;be(Rs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=m.useContext(Ft),{matches:o}=m.useContext(Et),i=o[o.length-1],l=i?i.params:{},c=i?i.pathname:"/",u=i?i.pathnameBase:"/",h=i&&i.route;{let w=h&&h.path||"";Fx(c,!h||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
+
|
|
51
|
+
Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let d=tn(),f;if(t){let w=typeof t=="string"?Ms(t):t;be(u==="/"||((p=w.pathname)==null?void 0:p.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${w.pathname}" was given in the \`location\` prop.`),f=w}else f=d;let g=f.pathname||"/",x=g;if(u!=="/"){let w=u.replace(/^\//,"").split("/");x="/"+g.replace(/^\//,"").split("/").slice(w.length).join("/")}let v=Rx(e,{pathname:x});kt(h||v!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),kt(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let N=fj(v&&v.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:hn([u,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?u:hn([u,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n,r);return t&&N?m.createElement(Qo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},N):N}function lj(){let e=xj(),t=Z2(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:o},"ErrorBoundary")," or"," ",m.createElement("code",{style:o},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:s},n):null,i)}var cj=m.createElement(lj,null),uj=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?m.createElement(Et.Provider,{value:this.props.routeContext},m.createElement(Yd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function dj({routeContext:e,match:t,children:n}){let r=m.useContext(Is);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(Et.Provider,{value:e},n)}function fj(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,o=n==null?void 0:n.errors;if(o!=null){let c=s.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);be(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,c+1))}let i=!1,l=-1;if(n)for(let c=0;c<s.length;c++){let u=s[c];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=c),u.route.id){let{loaderData:h,errors:d}=n,f=u.route.loader&&!h.hasOwnProperty(u.route.id)&&(!d||d[u.route.id]===void 0);if(u.route.lazy||f){i=!0,l>=0?s=s.slice(0,l+1):s=[s[0]];break}}}return s.reduceRight((c,u,h)=>{let d,f=!1,g=null,x=null;n&&(d=o&&u.route.id?o[u.route.id]:void 0,g=u.route.errorElement||cj,i&&(l<0&&h===0?(Fx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,x=null):l===h&&(f=!0,x=u.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,h+1)),N=()=>{let p;return d?p=g:f?p=x:u.route.Component?p=m.createElement(u.route.Component,null):u.route.element?p=u.route.element:p=c,m.createElement(dj,{match:u,routeContext:{outlet:c,matches:v,isDataRoute:n!=null},children:p})};return n&&(u.route.ErrorBoundary||u.route.errorElement||h===0)?m.createElement(uj,{location:n.location,revalidation:n.revalidation,component:g,error:d,children:N(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):N()},null)}function Xd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function hj(e){let t=m.useContext(Is);return be(t,Xd(e)),t}function mj(e){let t=m.useContext(pl);return be(t,Xd(e)),t}function pj(e){let t=m.useContext(Et);return be(t,Xd(e)),t}function Qd(e){let t=pj(e),n=t.matches[t.matches.length-1];return be(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function gj(){return Qd("useRouteId")}function xj(){var r;let e=m.useContext(Yd),t=mj("useRouteError"),n=Qd("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function yj(){let{router:e}=hj("useNavigate"),t=Qd("useNavigate"),n=m.useRef(!1);return $x(()=>{n.current=!0}),m.useCallback(async(s,o={})=>{kt(n.current,Dx),n.current&&(typeof s=="number"?e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var em={};function Fx(e,t,n){!t&&!em[e]&&(em[e]=!0,kt(!1,n))}m.memo(vj);function vj({routes:e,future:t,state:n}){return Ox(e,void 0,n,t)}function Pu({to:e,replace:t,state:n,relative:r}){be(Rs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=m.useContext(Ft);kt(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=m.useContext(Et),{pathname:i}=tn(),l=gl(),c=Gd(e,Kd(o),i,r==="path"),u=JSON.stringify(c);return m.useEffect(()=>{l(JSON.parse(u),{replace:t,state:n,relative:r})},[l,u,r,t,n]),null}function wj(e){return oj(e.context)}function Ye(e){be(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Nj({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:s,static:o=!1}){be(!Rs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=e.replace(/^\/*/,"/"),l=m.useMemo(()=>({basename:i,navigator:s,static:o,future:{}}),[i,s,o]);typeof n=="string"&&(n=Ms(n));let{pathname:c="/",search:u="",hash:h="",state:d=null,key:f="default"}=n,g=m.useMemo(()=>{let x=Kn(c,i);return x==null?null:{location:{pathname:x,search:u,hash:h,state:d,key:f},navigationType:r}},[i,c,u,h,d,f,r]);return kt(g!=null,`<Router basename="${i}"> is not able to match the URL "${c}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:m.createElement(Ft.Provider,{value:l},m.createElement(Qo.Provider,{children:t,value:g}))}function jj({children:e,location:t}){return aj(Mu(e),t)}function Mu(e,t=[]){let n=[];return m.Children.forEach(e,(r,s)=>{if(!m.isValidElement(r))return;let o=[...t,s];if(r.type===m.Fragment){n.push.apply(n,Mu(r.props.children,o));return}be(r.type===Ye,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),be(!r.props.index||!r.props.children,"An index route cannot have child routes.");let i={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=Mu(r.props.children,o)),n.push(i)}),n}var ta="get",na="application/x-www-form-urlencoded";function xl(e){return e!=null&&typeof e.tagName=="string"}function bj(e){return xl(e)&&e.tagName.toLowerCase()==="button"}function Sj(e){return xl(e)&&e.tagName.toLowerCase()==="form"}function kj(e){return xl(e)&&e.tagName.toLowerCase()==="input"}function Cj(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ej(e,t){return e.button===0&&(!t||t==="_self")&&!Cj(e)}function Iu(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function _j(e,t){let n=Iu(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var ki=null;function Pj(){if(ki===null)try{new FormData(document.createElement("form"),0),ki=!1}catch{ki=!0}return ki}var Mj=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function mc(e){return e!=null&&!Mj.has(e)?(kt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${na}"`),null):e}function Ij(e,t){let n,r,s,o,i;if(Sj(e)){let l=e.getAttribute("action");r=l?Kn(l,t):null,n=e.getAttribute("method")||ta,s=mc(e.getAttribute("enctype"))||na,o=new FormData(e)}else if(bj(e)||kj(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(r=c?Kn(c,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||ta,s=mc(e.getAttribute("formenctype"))||mc(l.getAttribute("enctype"))||na,o=new FormData(l,e),!Pj()){let{name:u,type:h,value:d}=e;if(h==="image"){let f=u?`${u}.`:"";o.append(`${f}x`,"0"),o.append(`${f}y`,"0")}else u&&o.append(u,d)}}else{if(xl(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ta,r=null,s=na,i=e}return o&&s==="text/plain"&&(i=o,o=void 0),{action:r,method:n.toLowerCase(),encType:s,formData:o,body:i}}function qd(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function Rj(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Tj(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Lj(e,t,n){let r=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let i=await Rj(o,n);return i.links?i.links():[]}return[]}));return $j(r.flat(1).filter(Tj).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function tm(e,t,n,r,s,o){let i=(c,u)=>n[u]?c.route.id!==n[u].route.id:!0,l=(c,u)=>{var h;return n[u].pathname!==c.pathname||((h=n[u].route.path)==null?void 0:h.endsWith("*"))&&n[u].params["*"]!==c.params["*"]};return o==="assets"?t.filter((c,u)=>i(c,u)||l(c,u)):o==="data"?t.filter((c,u)=>{var d;let h=r.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(i(c,u)||l(c,u))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function Aj(e,t){return zj(e.map(n=>{let r=t.routes[n.route.id];if(!r)return[];let s=[r.module];return r.imports&&(s=s.concat(r.imports)),s}).flat(1))}function zj(e){return[...new Set(e)]}function Dj(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function $j(e,t){let n=new Set;return new Set(t),e.reduce((r,s)=>{let o=JSON.stringify(Dj(s));return n.has(o)||(n.add(o),r.push({key:o,link:s})),r},[])}function Oj(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function Fj(){let e=m.useContext(Is);return qd(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Hj(){let e=m.useContext(pl);return qd(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Zd=m.createContext(void 0);Zd.displayName="FrameworkContext";function Hx(){let e=m.useContext(Zd);return qd(e,"You must render this element inside a <HydratedRouter> element"),e}function Bj(e,t){let n=m.useContext(Zd),[r,s]=m.useState(!1),[o,i]=m.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:h,onTouchStart:d}=t,f=m.useRef(null);m.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let v=p=>{p.forEach(w=>{i(w.isIntersecting)})},N=new IntersectionObserver(v,{threshold:.5});return f.current&&N.observe(f.current),()=>{N.disconnect()}}},[e]),m.useEffect(()=>{if(r){let v=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(v)}}},[r]);let g=()=>{s(!0)},x=()=>{s(!1),i(!1)};return n?e!=="intent"?[o,f,{}]:[o,f,{onFocus:Ks(l,g),onBlur:Ks(c,x),onMouseEnter:Ks(u,g),onMouseLeave:Ks(h,x),onTouchStart:Ks(d,g)}]:[!1,f,{}]}function Ks(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Vj({page:e,...t}){let{router:n}=Fj(),r=m.useMemo(()=>Rx(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?m.createElement(Wj,{page:e,matches:r,...t}):null}function Uj(e){let{manifest:t,routeModules:n}=Hx(),[r,s]=m.useState([]);return m.useEffect(()=>{let o=!1;return Lj(e,t,n).then(i=>{o||s(i)}),()=>{o=!0}},[e,t,n]),r}function Wj({page:e,matches:t,...n}){let r=tn(),{manifest:s,routeModules:o}=Hx(),{loaderData:i,matches:l}=Hj(),c=m.useMemo(()=>tm(e,t,l,s,r,"data"),[e,t,l,s,r]),u=m.useMemo(()=>tm(e,t,l,s,r,"assets"),[e,t,l,s,r]),h=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,x=!1;if(t.forEach(N=>{var w;let p=s.routes[N.route.id];!p||!p.hasLoader||(!c.some(y=>y.route.id===N.route.id)&&N.route.id in i&&((w=o[N.route.id])!=null&&w.shouldRevalidate)||p.hasClientLoader?x=!0:g.add(N.route.id))}),g.size===0)return[];let v=Oj(e);return x&&g.size>0&&v.searchParams.set("_routes",t.filter(N=>g.has(N.route.id)).map(N=>N.route.id).join(",")),[v.pathname+v.search]},[i,r,s,c,t,e,o]),d=m.useMemo(()=>Aj(u,s),[u,s]),f=Uj(u);return m.createElement(m.Fragment,null,h.map(g=>m.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),d.map(g=>m.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),f.map(({key:g,link:x})=>m.createElement("link",{key:g,...x})))}function Kj(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Bx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bx&&(window.__reactRouterVersion="7.1.0")}catch{}function Gj({basename:e,children:t,window:n}){let r=m.useRef();r.current==null&&(r.current=M2({window:n,v5Compat:!0}));let s=r.current,[o,i]=m.useState({action:s.action,location:s.location}),l=m.useCallback(c=>{m.startTransition(()=>i(c))},[i]);return m.useLayoutEffect(()=>s.listen(l),[s,l]),m.createElement(Nj,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s})}var Vx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Gn=m.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:s,reloadDocument:o,replace:i,state:l,target:c,to:u,preventScrollReset:h,viewTransition:d,...f},g){let{basename:x}=m.useContext(Ft),v=typeof u=="string"&&Vx.test(u),N,p=!1;if(typeof u=="string"&&v&&(N=u,Bx))try{let R=new URL(window.location.href),O=u.startsWith("//")?new URL(R.protocol+u):new URL(u),T=Kn(O.pathname,x);O.origin===R.origin&&T!=null?u=T+O.search+O.hash:p=!0}catch{kt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=nj(u,{relative:s}),[y,j,b]=Bj(r,f),E=Qj(u,{replace:i,state:l,target:c,preventScrollReset:h,relative:s,viewTransition:d});function C(R){t&&t(R),R.defaultPrevented||E(R)}let M=m.createElement("a",{...f,...b,href:N||w,onClick:p||o?t:C,ref:Kj(g,j),target:c,"data-discover":!v&&n==="render"?"true":void 0});return y&&!v?m.createElement(m.Fragment,null,M,m.createElement(Vj,{page:w})):M});Gn.displayName="Link";var Ux=m.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:s=!1,style:o,to:i,viewTransition:l,children:c,...u},h){let d=qo(i,{relative:u.relative}),f=tn(),g=m.useContext(pl),{navigator:x,basename:v}=m.useContext(Ft),N=g!=null&&nb(d)&&l===!0,p=x.encodeLocation?x.encodeLocation(d).pathname:d.pathname,w=f.pathname,y=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;n||(w=w.toLowerCase(),y=y?y.toLowerCase():null,p=p.toLowerCase()),y&&v&&(y=Kn(y,v)||y);const j=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let b=w===p||!s&&w.startsWith(p)&&w.charAt(j)==="/",E=y!=null&&(y===p||!s&&y.startsWith(p)&&y.charAt(p.length)==="/"),C={isActive:b,isPending:E,isTransitioning:N},M=b?t:void 0,R;typeof r=="function"?R=r(C):R=[r,b?"active":null,E?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let O=typeof o=="function"?o(C):o;return m.createElement(Gn,{...u,"aria-current":M,className:R,ref:h,style:O,to:i,viewTransition:l},typeof c=="function"?c(C):c)});Ux.displayName="NavLink";var Yj=m.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:s,state:o,method:i=ta,action:l,onSubmit:c,relative:u,preventScrollReset:h,viewTransition:d,...f},g)=>{let x=eb(),v=tb(l,{relative:u}),N=i.toLowerCase()==="get"?"get":"post",p=typeof l=="string"&&Vx.test(l),w=y=>{if(c&&c(y),y.defaultPrevented)return;y.preventDefault();let j=y.nativeEvent.submitter,b=(j==null?void 0:j.getAttribute("formmethod"))||i;x(j||y.currentTarget,{fetcherKey:t,method:b,navigate:n,replace:s,state:o,relative:u,preventScrollReset:h,viewTransition:d})};return m.createElement("form",{ref:g,method:N,action:v,onSubmit:r?c:w,...f,"data-discover":!p&&e==="render"?"true":void 0})});Yj.displayName="Form";function Xj(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wx(e){let t=m.useContext(Is);return be(t,Xj(e)),t}function Qj(e,{target:t,replace:n,state:r,preventScrollReset:s,relative:o,viewTransition:i}={}){let l=gl(),c=tn(),u=qo(e,{relative:o});return m.useCallback(h=>{if(Ej(h,t)){h.preventDefault();let d=n!==void 0?n:Lo(c)===Lo(u);l(e,{replace:d,state:r,preventScrollReset:s,relative:o,viewTransition:i})}},[c,l,u,n,r,t,e,s,o,i])}function qj(e){kt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=m.useRef(Iu(e)),n=m.useRef(!1),r=tn(),s=m.useMemo(()=>_j(r.search,n.current?null:t.current),[r.search]),o=gl(),i=m.useCallback((l,c)=>{const u=Iu(typeof l=="function"?l(s):l);n.current=!0,o("?"+u,c)},[o,s]);return[s,i]}var Zj=0,Jj=()=>`__${String(++Zj)}__`;function eb(){let{router:e}=Wx("useSubmit"),{basename:t}=m.useContext(Ft),n=gj();return m.useCallback(async(r,s={})=>{let{action:o,method:i,encType:l,formData:c,body:u}=Ij(r,t);if(s.navigate===!1){let h=s.fetcherKey||Jj();await e.fetch(h,n,s.action||o,{preventScrollReset:s.preventScrollReset,formData:c,body:u,formMethod:s.method||i,formEncType:s.encType||l,flushSync:s.flushSync})}else await e.navigate(s.action||o,{preventScrollReset:s.preventScrollReset,formData:c,body:u,formMethod:s.method||i,formEncType:s.encType||l,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[e,t,n])}function tb(e,{relative:t}={}){let{basename:n}=m.useContext(Ft),r=m.useContext(Et);be(r,"useFormAction must be used inside a RouteContext");let[s]=r.matches.slice(-1),o={...qo(e||".",{relative:t})},i=tn();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),c=l.getAll("index");if(c.some(h=>h==="")){l.delete("index"),c.filter(d=>d).forEach(d=>l.append("index",d));let h=l.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:hn([n,o.pathname])),Lo(o)}function nb(e,t={}){let n=m.useContext(zx);be(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Wx("useViewTransitionState"),s=qo(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Kn(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=Kn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Aa(s.pathname,i)!=null||Aa(s.pathname,o)!=null}new TextEncoder;const Kx=m.createContext(null);function rb({children:e}){const[t,n]=m.useState(()=>localStorage.getItem("opentrust_theme")||"dark"),r=s=>{n(s),localStorage.setItem("opentrust_theme",s)};return m.useEffect(()=>{const s=document.documentElement;if(s.classList.remove("light","dark"),t==="system"){const o=window.matchMedia("(prefers-color-scheme: dark)").matches;s.classList.add(o?"dark":"light")}else s.classList.add(t)},[t]),a.jsx(Kx.Provider,{value:{theme:t,setTheme:r},children:e})}function sb(){const e=m.useContext(Kx);if(!e)throw new Error("useTheme must be within ThemeProvider");return e}const Gx=m.createContext(null);function ob({children:e}){const[t,n]=m.useState(()=>{const l=localStorage.getItem("opentrust_user");return l?JSON.parse(l):null}),[r,s]=m.useState(!!localStorage.getItem("opentrust_user"));m.useEffect(()=>{if(!t){s(!1);return}let l=!1;return(async()=>{try{(await fetch("/api/auth/me",{headers:{Authorization:`Bearer ${t.apiKey}`}})).ok||l||(n(null),localStorage.removeItem("opentrust_user"))}catch{}finally{l||s(!1)}})(),()=>{l=!0}},[]);const o=m.useCallback(async(l,c)=>{const u=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:l,password:c})}),h=await u.json();if(!u.ok||!h.success)throw new Error(h.error??"Login failed");const d={email:h.email,apiKey:h.apiKey,name:h.name};n(d),localStorage.setItem("opentrust_user",JSON.stringify(d))},[]),i=m.useCallback(()=>{n(null),localStorage.removeItem("opentrust_user")},[]);return a.jsx(Gx.Provider,{value:{user:t,isAuthenticated:!!t,isLoading:r,login:o,logout:i},children:e})}function Jd(){const e=m.useContext(Gx);if(!e)throw new Error("useAuth must be within AuthProvider");return e}function Yx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Yx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ib(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Yx(e))&&(r&&(r+=" "),r+=t);return r}const ef="-";function ab(e){const t=cb(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function s(i){const l=i.split(ef);return l[0]===""&&l.length!==1&&l.shift(),Xx(l,t)||lb(i)}function o(i,l){const c=n[i]||[];return l&&r[i]?[...c,...r[i]]:c}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function Xx(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Xx(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(ef);return(i=t.validators.find(({validator:l})=>l(o)))==null?void 0:i.classGroupId}const nm=/^\[(.+)\]$/;function lb(e){if(nm.test(e)){const t=nm.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function cb(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return db(Object.entries(e.classGroups),n).forEach(([o,i])=>{Ru(i,r,o,t)}),r}function Ru(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:rm(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(ub(s)){Ru(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{Ru(i,rm(t,o),n,r)})})}function rm(e,t){let n=e;return t.split(ef).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function ub(e){return e.isThemeGetter}function db(e,t){return t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,l])=>[t+i,l])):o);return[n,s]}):e}function fb(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function s(o,i){n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}}const Qx="!";function hb(e){const t=e.separator,n=t.length===1,r=t[0],s=t.length;return function(i){const l=[];let c=0,u=0,h;for(let v=0;v<i.length;v++){let N=i[v];if(c===0){if(N===r&&(n||i.slice(v,v+s)===t)){l.push(i.slice(u,v)),u=v+s;continue}if(N==="/"){h=v;continue}}N==="["?c++:N==="]"&&c--}const d=l.length===0?i:i.substring(u),f=d.startsWith(Qx),g=f?d.substring(1):d,x=h&&h>u?h-u:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:x}}}function mb(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function pb(e){return{cache:fb(e.cacheSize),splitModifiers:hb(e),...ab(e)}}const gb=/\s+/;function xb(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=new Set;return e.trim().split(gb).map(i=>{const{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:h}=n(i);let d=r(h?u.substring(0,h):u),f=!!h;if(!d){if(!h)return{isTailwindClass:!1,originalClassName:i};if(d=r(u),!d)return{isTailwindClass:!1,originalClassName:i};f=!1}const g=mb(l).join(":");return{isTailwindClass:!0,modifierId:c?g+Qx:g,classGroupId:d,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:l,classGroupId:c,hasPostfixModifier:u}=i,h=l+c;return o.has(h)?!1:(o.add(h),s(c,u).forEach(d=>o.add(l+d)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function yb(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qx(t))&&(r&&(r+=" "),r+=n);return r}function qx(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qx(e[r]))&&(n&&(n+=" "),n+=t);return n}function vb(e,...t){let n,r,s,o=i;function i(c){const u=t.reduce((h,d)=>d(h),e());return n=pb(u),r=n.cache.get,s=n.cache.set,o=l,l(c)}function l(c){const u=r(c);if(u)return u;const h=xb(c,n);return s(c,h),h}return function(){return o(yb.apply(null,arguments))}}function ye(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Zx=/^\[(?:([a-z-]+):)?(.+)\]$/i,wb=/^\d+\/\d+$/,Nb=new Set(["px","full","screen"]),jb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bb=/\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$/,Sb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function sn(e){return ur(e)||Nb.has(e)||wb.test(e)}function bn(e){return Ts(e,"length",Lb)}function ur(e){return!!e&&!Number.isNaN(Number(e))}function Ci(e){return Ts(e,"number",ur)}function Gs(e){return!!e&&Number.isInteger(Number(e))}function Eb(e){return e.endsWith("%")&&ur(e.slice(0,-1))}function re(e){return Zx.test(e)}function Sn(e){return jb.test(e)}const _b=new Set(["length","size","percentage"]);function Pb(e){return Ts(e,_b,Jx)}function Mb(e){return Ts(e,"position",Jx)}const Ib=new Set(["image","url"]);function Rb(e){return Ts(e,Ib,zb)}function Tb(e){return Ts(e,"",Ab)}function Ys(){return!0}function Ts(e,t,n){const r=Zx.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function Lb(e){return bb.test(e)&&!Sb.test(e)}function Jx(){return!1}function Ab(e){return kb.test(e)}function zb(e){return Cb.test(e)}function Db(){const e=ye("colors"),t=ye("spacing"),n=ye("blur"),r=ye("brightness"),s=ye("borderColor"),o=ye("borderRadius"),i=ye("borderSpacing"),l=ye("borderWidth"),c=ye("contrast"),u=ye("grayscale"),h=ye("hueRotate"),d=ye("invert"),f=ye("gap"),g=ye("gradientColorStops"),x=ye("gradientColorStopPositions"),v=ye("inset"),N=ye("margin"),p=ye("opacity"),w=ye("padding"),y=ye("saturate"),j=ye("scale"),b=ye("sepia"),E=ye("skew"),C=ye("space"),M=ye("translate"),R=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",re,t],L=()=>[re,t],$=()=>["",sn,bn],_=()=>["auto",ur,re],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],S=()=>["","0",re],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>[ur,Ci],F=()=>[ur,re];return{cacheSize:500,separator:":",theme:{colors:[Ys],spacing:[sn,bn],blur:["none","",Sn,re],brightness:A(),borderColor:[e],borderRadius:["none","","full",Sn,re],borderSpacing:L(),borderWidth:$(),contrast:A(),grayscale:S(),hueRotate:F(),invert:S(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[Eb,bn],inset:T(),margin:T(),opacity:A(),padding:L(),saturate:A(),scale:A(),sepia:S(),skew:F(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[Sn]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...z(),re]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Gs,re]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:S()}],shrink:[{shrink:S()}],order:[{order:["first","last","none",Gs,re]}],"grid-cols":[{"grid-cols":[Ys]}],"col-start-end":[{col:["auto",{span:["full",Gs,re]},re]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[Ys]}],"row-start-end":[{row:["auto",{span:[Gs,re]},re]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,t]}],"min-w":[{"min-w":[re,t,"min","max","fit"]}],"max-w":[{"max-w":[re,t,"none","full","min","max","fit","prose",{screen:[Sn]},Sn]}],h:[{h:[re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Sn,bn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ci]}],"font-family":[{font:[Ys]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",re]}],"line-clamp":[{"line-clamp":["none",ur,Ci]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sn,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sn,bn]}],"underline-offset":[{"underline-offset":["auto",sn,re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...z(),Mb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Pb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Rb]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:k()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[sn,re]}],"outline-w":[{outline:[sn,bn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[sn,bn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Sn,Tb]}],"shadow-color":[{shadow:[Ys]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Sn,re]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",re]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Gs,re]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[sn,bn,Ci]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}}const $b=vb(Db);function Te(...e){return $b(ib(e))}/**
|
|
52
|
+
* @license lucide-react v0.400.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const Ob=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ey=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
57
|
+
* @license lucide-react v0.400.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/var Fb={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"};/**
|
|
62
|
+
* @license lucide-react v0.400.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const Hb=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...l},c)=>m.createElement("svg",{ref:c,...Fb,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ey("lucide",s),...l},[...i.map(([u,h])=>m.createElement(u,h)),...Array.isArray(o)?o:[o]]));/**
|
|
67
|
+
* @license lucide-react v0.400.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const q=(e,t)=>{const n=m.forwardRef(({className:r,...s},o)=>m.createElement(Hb,{ref:o,iconNode:t,className:ey(`lucide-${Ob(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
|
|
72
|
+
* @license lucide-react v0.400.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const Bb=q("Activity",[["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"}]]);/**
|
|
77
|
+
* @license lucide-react v0.400.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Vb=q("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
82
|
+
* @license lucide-react v0.400.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const Ub=q("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
87
|
+
* @license lucide-react v0.400.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const Wb=q("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
92
|
+
* @license lucide-react v0.400.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Pr=q("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
97
|
+
* @license lucide-react v0.400.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const Zo=q("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
102
|
+
* @license lucide-react v0.400.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const tf=q("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
107
|
+
* @license lucide-react v0.400.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const ty=q("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
112
|
+
* @license lucide-react v0.400.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const nf=q("CircleAlert",[["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"}]]);/**
|
|
117
|
+
* @license lucide-react v0.400.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const yl=q("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
|
|
122
|
+
* @license lucide-react v0.400.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const Yn=q("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
127
|
+
* @license lucide-react v0.400.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const pt=q("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
132
|
+
* @license lucide-react v0.400.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const Kb=q("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
137
|
+
* @license lucide-react v0.400.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const Gb=q("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
142
|
+
* @license lucide-react v0.400.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const Yb=q("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
147
|
+
* @license lucide-react v0.400.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const Xb=q("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
152
|
+
* @license lucide-react v0.400.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const Qb=q("Database",[["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"}]]);/**
|
|
157
|
+
* @license lucide-react v0.400.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const Ct=q("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
162
|
+
* @license lucide-react v0.400.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const qb=q("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
167
|
+
* @license lucide-react v0.400.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const Zb=q("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
|
|
172
|
+
* @license lucide-react v0.400.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const Jb=q("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
177
|
+
* @license lucide-react v0.400.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const Mr=q("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
182
|
+
* @license lucide-react v0.400.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const ny=q("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);/**
|
|
187
|
+
* @license lucide-react v0.400.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const ry=q("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
192
|
+
* @license lucide-react v0.400.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const eS=q("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
197
|
+
* @license lucide-react v0.400.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const tS=q("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
|
|
202
|
+
* @license lucide-react v0.400.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const $e=q("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
207
|
+
* @license lucide-react v0.400.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const nS=q("Lock",[["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"}]]);/**
|
|
212
|
+
* @license lucide-react v0.400.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const rS=q("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
|
217
|
+
* @license lucide-react v0.400.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const vl=q("Monitor",[["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"}]]);/**
|
|
222
|
+
* @license lucide-react v0.400.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const sS=q("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
227
|
+
* @license lucide-react v0.400.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const oS=q("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
|
232
|
+
* @license lucide-react v0.400.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const Nr=q("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
237
|
+
* @license lucide-react v0.400.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const iS=q("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
242
|
+
* @license lucide-react v0.400.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const za=q("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
247
|
+
* @license lucide-react v0.400.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const aS=q("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
252
|
+
* @license lucide-react v0.400.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const ra=q("Puzzle",[["path",{d:"M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z",key:"i0oyt7"}]]);/**
|
|
257
|
+
* @license lucide-react v0.400.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const Xn=q("RefreshCw",[["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"}]]);/**
|
|
262
|
+
* @license lucide-react v0.400.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const Da=q("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
267
|
+
* @license lucide-react v0.400.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const lS=q("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
|
|
272
|
+
* @license lucide-react v0.400.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const rf=q("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
|
|
277
|
+
* @license lucide-react v0.400.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const cS=q("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
|
|
282
|
+
* @license lucide-react v0.400.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const sy=q("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
287
|
+
* @license lucide-react v0.400.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const sf=q("Server",[["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"}]]);/**
|
|
292
|
+
* @license lucide-react v0.400.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const Zt=q("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
297
|
+
* @license lucide-react v0.400.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const oy=q("Shield",[["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"}]]);/**
|
|
302
|
+
* @license lucide-react v0.400.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const sm=q("SquareCheckBig",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]]);/**
|
|
307
|
+
* @license lucide-react v0.400.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const Ao=q("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
312
|
+
* @license lucide-react v0.400.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const uS=q("Sun",[["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"}]]);/**
|
|
317
|
+
* @license lucide-react v0.400.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const xs=q("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
322
|
+
* @license lucide-react v0.400.0 - ISC
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the ISC license.
|
|
325
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const Ot=q("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
327
|
+
* @license lucide-react v0.400.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const of=q("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
332
|
+
* @license lucide-react v0.400.0 - ISC
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the ISC license.
|
|
335
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
+
*/const iy=q("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
337
|
+
* @license lucide-react v0.400.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*/const ay=q("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),dS=[{label:"Discovery",items:[{to:"/inventory/hosts",label:"Hosts",icon:vl},{to:"/inventory/agents",label:"Agents",icon:Pr},{to:"/inventory/identities",label:"Identities",icon:ny},{to:"/inventory/permissions",label:"Permissions",icon:eS}]},{label:"Secure",items:[{to:"/secure/risk",label:"Risk",icon:of},{to:"/secure/graph",label:"Graph",icon:oS}]},{label:"Operations",items:[{to:"/ops/skills",label:"Skills",icon:iy},{to:"/ops/plugins",label:"Plugins",icon:ra}]},{label:"System",items:[{to:"/system/logs",label:"Logs",icon:cS},{to:"/system/settings",label:"Settings",icon:Zt}]}];function fS(){const e=tn(),[t,n]=m.useState("");return m.useEffect(()=>{fetch("/health").then(r=>r.json()).then(r=>n(r.version??"")).catch(()=>{})},[]),a.jsxs("aside",{className:"flex w-56 flex-col border-r border-border bg-card",children:[a.jsxs("div",{className:"flex h-14 items-center gap-2 border-b border-border px-4",children:[a.jsx("img",{src:"/dashboard/logo-512.png",alt:"OpenTrust",className:"h-6 w-6 dark:brightness-[1.8] dark:contrast-125"}),a.jsx("span",{className:"text-sm font-semibold tracking-tight text-foreground",children:"OpenTrust"})]}),a.jsx("nav",{className:"flex-1 space-y-6 px-3 py-4",children:dS.map(r=>a.jsxs("div",{children:[a.jsx("p",{className:"mb-2 px-2 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r.label}),a.jsx("div",{className:"space-y-0.5",children:r.items.map(s=>a.jsxs(Ux,{to:s.to,className:Te("flex items-center gap-2.5 rounded-md px-2 py-1.5 text-sm transition-colors",e.pathname.startsWith(s.to)?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[a.jsx(s.icon,{className:"h-4 w-4 shrink-0"}),s.label]},s.to))})]},r.label))}),a.jsx("div",{className:"border-t border-border px-4 py-3",children:a.jsx("p",{className:"text-[11px] text-muted-foreground",children:t?`v${t}`:""})})]})}function hS(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ly(...e){return t=>e.forEach(n=>hS(n,t))}function Jt(...e){return m.useCallback(ly(...e),e)}var ys=m.forwardRef((e,t)=>{const{children:n,...r}=e,s=m.Children.toArray(n),o=s.find(pS);if(o){const i=o.props.children,l=s.map(c=>c===o?m.Children.count(i)>1?m.Children.only(null):m.isValidElement(i)?i.props.children:null:c);return a.jsx(Tu,{...r,ref:t,children:m.isValidElement(i)?m.cloneElement(i,void 0,l):null})}return a.jsx(Tu,{...r,ref:t,children:n})});ys.displayName="Slot";var Tu=m.forwardRef((e,t)=>{const{children:n,...r}=e;if(m.isValidElement(n)){const s=xS(n);return m.cloneElement(n,{...gS(r,n.props),ref:t?ly(t,s):s})}return m.Children.count(n)>1?m.Children.only(null):null});Tu.displayName="SlotClone";var mS=({children:e})=>a.jsx(a.Fragment,{children:e});function pS(e){return m.isValidElement(e)&&e.type===mS}function gS(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...l)=>{o(...l),s(...l)}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function xS(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function cy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=cy(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function yS(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=cy(e))&&(r&&(r+=" "),r+=t);return r}const om=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,im=yS,vS=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return im(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const h=n==null?void 0:n[u],d=o==null?void 0:o[u];if(h===null)return null;const f=om(h)||om(d);return s[u][f]}),l=n&&Object.entries(n).reduce((u,h)=>{let[d,f]=h;return f===void 0||(u[d]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,h)=>{let{class:d,className:f,...g}=h;return Object.entries(g).every(x=>{let[v,N]=x;return Array.isArray(N)?N.includes({...o,...l}[v]):{...o,...l}[v]===N})?[...u,d,f]:u},[]);return im(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},wS=vS("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-border bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),K=m.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?ys:"button";return a.jsx(i,{className:Te(wS({variant:t,size:n,className:e})),ref:o,...s})});K.displayName="Button";function NS(){const{user:e,logout:t}=Jd(),{theme:n,setTheme:r}=sb();return a.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-border bg-card px-6",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"h-2 w-2 rounded-full bg-success"}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[(e==null?void 0:e.email)&&a.jsx("span",{className:"text-xs text-muted-foreground",children:e.email}),a.jsx(K,{variant:"ghost",size:"icon",onClick:()=>r(n==="dark"?"light":"dark"),className:"h-8 w-8",children:n==="dark"?a.jsx(uS,{className:"h-4 w-4"}):a.jsx(sS,{className:"h-4 w-4"})}),a.jsx(K,{variant:"ghost",size:"icon",onClick:t,className:"h-8 w-8",children:a.jsx(rS,{className:"h-4 w-4"})})]})]})}function jS(){return a.jsxs("div",{className:"flex h-screen overflow-hidden bg-background",children:[a.jsx(fS,{}),a.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[a.jsx(NS,{}),a.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:a.jsx(wj,{})})]})]})}const de=m.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:Te("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors","file:border-0 file:bg-transparent file:text-sm file:font-medium","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));de.displayName="Input";function bS(){const[e,t]=m.useState(""),[n,r]=m.useState(""),[s,o]=m.useState(""),[i,l]=m.useState(!1),[c,u]=m.useState(!1),{login:h,isAuthenticated:d,isLoading:f}=Jd(),g=gl();if(m.useEffect(()=>{d&&g("/inventory/agents",{replace:!0})},[d,g]),m.useEffect(()=>{fetch("/api/auth/config").then(v=>v.json()).then(v=>u(v.defaultPassword===!0)).catch(()=>{})},[]),f)return a.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:a.jsx("div",{className:"text-muted-foreground text-sm",children:"Loading..."})});const x=async v=>{v.preventDefault(),o(""),l(!0);try{await h(e,n),g("/inventory/agents",{replace:!0})}catch(N){o(N instanceof Error?N.message:"Login failed")}finally{l(!1)}};return a.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:a.jsxs("div",{className:"w-full max-w-sm space-y-8 px-4",children:[a.jsxs("div",{className:"flex flex-col items-center gap-3",children:[a.jsx("img",{src:"/dashboard/logo-512.png",alt:"OpenTrust",className:"h-12 w-12 dark:brightness-[1.8] dark:contrast-125"}),a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground",children:"OpenTrust"}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Sign in to your dashboard"})]})]}),c&&a.jsxs("div",{className:"flex items-start gap-2 rounded-md border border-amber-500/30 bg-amber-50 px-3 py-2.5 text-sm text-amber-800 dark:bg-amber-950 dark:text-amber-200",children:[a.jsx(of,{className:"mt-0.5 h-4 w-4 shrink-0"}),a.jsxs("span",{children:["Default credentials: ",a.jsx("code",{className:"rounded bg-amber-100 px-1 py-0.5 text-xs dark:bg-amber-900",children:"admin"})," / ",a.jsx("code",{className:"rounded bg-amber-100 px-1 py-0.5 text-xs dark:bg-amber-900",children:"admin"}),". Please change after login."]})]}),a.jsxs("form",{onSubmit:x,className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-sm font-medium text-foreground",children:"Username"}),a.jsx(de,{type:"text",placeholder:"admin",value:e,onChange:v=>t(v.target.value),autoComplete:"username",required:!0})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-sm font-medium text-foreground",children:"Password"}),a.jsx(de,{type:"password",placeholder:"Password",value:n,onChange:v=>r(v.target.value),autoComplete:"current-password",required:!0})]}),s&&a.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:s}),a.jsx(K,{type:"submit",className:"w-full",disabled:i,children:i?"Signing in...":"Sign in"})]}),a.jsx("p",{className:"text-center text-xs text-muted-foreground",children:"Change the password in Settings after first login."})]})})}const SS="/api";async function ce(e,t){const n=localStorage.getItem("opentrust_user"),r=n?JSON.parse(n).apiKey:null,s=await fetch(`${SS}${e}`,{...t,headers:{"Content-Type":"application/json",...r&&{Authorization:`Bearer ${r}`},...t==null?void 0:t.headers}});if(!s.ok)throw new Error(`API ${s.status}: ${await s.text()}`);return s.json()}const te={agents:{list:()=>ce("/agents"),get:e=>ce(`/agents/${e}`),create:e=>ce("/agents",{method:"POST",body:JSON.stringify(e)}),update:(e,t)=>ce(`/agents/${e}`,{method:"PUT",body:JSON.stringify(t)}),delete:e=>ce(`/agents/${e}`,{method:"DELETE"})},discovery:{agents:()=>ce("/discovery/agents"),profile:e=>ce(`/discovery/agents/${e}/profile`)},observations:{recent:(e=50)=>ce(`/observations?limit=${e}`),permissions:()=>ce("/observations/permissions"),anomalies:()=>ce("/observations/anomalies"),summary:()=>ce("/observations/summary"),agentPermissions:e=>ce(`/observations/agents/${e}/permissions`)},commands:{list:e=>ce(`/commands?agentId=${e}`),create:e=>ce("/commands",{method:"POST",body:JSON.stringify(e)})},system:{services:()=>ce("/system/services"),logs:(e,t=200)=>ce(`/system/logs/${e}?lines=${t}`),clearLog:e=>ce(`/system/logs/${e}`,{method:"DELETE"})},hosts:{list:()=>ce("/hosts"),get:e=>ce(`/hosts/${e}`),remove:e=>ce(`/hosts/${e}`,{method:"DELETE"}),agents:e=>ce(`/hosts/${e}/agents`),sendCommand:(e,t,n)=>ce("/hosts/commands",{method:"POST",body:JSON.stringify({hostId:e,type:t,payload:n})}),commands:(e,t=50)=>ce(`/hosts/commands?hostId=${e}&limit=${t}`)},detect:e=>ce("/detect",{method:"POST",body:JSON.stringify(e)}),usage:{summary:(e=30)=>ce(`/usage/summary?days=${e}`),daily:(e=30)=>ce(`/usage/daily?days=${e}`)},settings:{get:()=>ce("/settings"),update:e=>ce("/settings",{method:"PUT",body:JSON.stringify(e)}),getApiKey:(e=!1)=>ce(`/settings/api-key${e?"?reveal=true":""}`),generateKey:()=>ce("/settings/generate-key",{method:"POST"}),getOpenclawConfig:()=>ce("/settings/openclaw-config"),saveOpenclawConfig:e=>ce("/settings/openclaw-config",{method:"PUT",body:JSON.stringify(e)})}};function he({className:e,variant:t="default",...n}){return a.jsx("div",{className:Te("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{"border-transparent bg-primary text-primary-foreground shadow":t==="default","border-transparent bg-secondary text-secondary-foreground":t==="secondary","border-transparent bg-destructive text-destructive-foreground shadow":t==="destructive","text-foreground":t==="outline","border-transparent bg-success/15 text-success":t==="success","border-transparent bg-warning/15 text-warning":t==="warning"},e),...n})}const pe=m.forwardRef(({className:e,...t},n)=>a.jsx("label",{ref:n,className:Te("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));pe.displayName="Label";function Ve(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function kS(e,t){const n=m.createContext(t);function r(o){const{children:i,...l}=o,c=m.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:i})}function s(o){const i=m.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,s]}function wl(e,t=[]){let n=[];function r(o,i){const l=m.createContext(i),c=n.length;n=[...n,i];function u(d){const{scope:f,children:g,...x}=d,v=(f==null?void 0:f[e][c])||l,N=m.useMemo(()=>x,Object.values(x));return a.jsx(v.Provider,{value:N,children:g})}function h(d,f){const g=(f==null?void 0:f[e][c])||l,x=m.useContext(g);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const s=()=>{const o=n.map(i=>m.createContext(i));return function(l){const c=(l==null?void 0:l[e])||o;return m.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,CS(s,...t)]}function CS(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(o)[`__scope${u}`];return{...l,...d}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var $a=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},ES=y1.useId||(()=>{}),_S=0;function mo(e){const[t,n]=m.useState(ES());return $a(()=>{n(r=>r??String(_S++))},[e]),t?`radix-${t}`:""}function Qn(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function af({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=PS({defaultProp:t,onChange:n}),o=e!==void 0,i=o?e:r,l=Qn(n),c=m.useCallback(u=>{if(o){const d=typeof u=="function"?u(e):u;d!==e&&l(d)}else s(u)},[o,e,s,l]);return[i,c]}function PS({defaultProp:e,onChange:t}){const n=m.useState(e),[r]=n,s=m.useRef(r),o=Qn(t);return m.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}var MS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],tt=MS.reduce((e,t)=>{const n=m.forwardRef((r,s)=>{const{asChild:o,...i}=r,l=o?ys:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(l,{...i,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function IS(e,t){e&&ml.flushSync(()=>e.dispatchEvent(t))}function RS(e,t=globalThis==null?void 0:globalThis.document){const n=Qn(e);m.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var TS="DismissableLayer",Lu="dismissableLayer.update",LS="dismissableLayer.pointerDownOutside",AS="dismissableLayer.focusOutside",am,uy=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dy=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:l,...c}=e,u=m.useContext(uy),[h,d]=m.useState(null),f=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=m.useState({}),x=Jt(t,C=>d(C)),v=Array.from(u.layers),[N]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=v.indexOf(N),w=h?v.indexOf(h):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,j=w>=p,b=$S(C=>{const M=C.target,R=[...u.branches].some(O=>O.contains(M));!j||R||(s==null||s(C),i==null||i(C),C.defaultPrevented||l==null||l())},f),E=OS(C=>{const M=C.target;[...u.branches].some(O=>O.contains(M))||(o==null||o(C),i==null||i(C),C.defaultPrevented||l==null||l())},f);return RS(C=>{w===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},f),m.useEffect(()=>{if(h)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(am=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),lm(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=am)}},[h,f,n,u]),m.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),lm())},[h,u]),m.useEffect(()=>{const C=()=>g({});return document.addEventListener(Lu,C),()=>document.removeEventListener(Lu,C)},[]),a.jsx(tt.div,{...c,ref:x,style:{pointerEvents:y?j?"auto":"none":void 0,...e.style},onFocusCapture:Ve(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Ve(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ve(e.onPointerDownCapture,b.onPointerDownCapture)})});dy.displayName=TS;var zS="DismissableLayerBranch",DS=m.forwardRef((e,t)=>{const n=m.useContext(uy),r=m.useRef(null),s=Jt(t,r);return m.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),a.jsx(tt.div,{...e,ref:s})});DS.displayName=zS;function $S(e,t=globalThis==null?void 0:globalThis.document){const n=Qn(e),r=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const o=l=>{if(l.target&&!r.current){let c=function(){fy(LS,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function OS(e,t=globalThis==null?void 0:globalThis.document){const n=Qn(e),r=m.useRef(!1);return m.useEffect(()=>{const s=o=>{o.target&&!r.current&&fy(AS,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lm(){const e=new CustomEvent(Lu);document.dispatchEvent(e)}function fy(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?IS(s,o):s.dispatchEvent(o)}var pc="focusScope.autoFocusOnMount",gc="focusScope.autoFocusOnUnmount",cm={bubbles:!1,cancelable:!0},FS="FocusScope",hy=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[l,c]=m.useState(null),u=Qn(s),h=Qn(o),d=m.useRef(null),f=Jt(t,v=>c(v)),g=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let v=function(y){if(g.paused||!l)return;const j=y.target;l.contains(j)?d.current=j:En(d.current,{select:!0})},N=function(y){if(g.paused||!l)return;const j=y.relatedTarget;j!==null&&(l.contains(j)||En(d.current,{select:!0}))},p=function(y){if(document.activeElement===document.body)for(const b of y)b.removedNodes.length>0&&En(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",N);const w=new MutationObserver(p);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",N),w.disconnect()}}},[r,l,g.paused]),m.useEffect(()=>{if(l){dm.add(g);const v=document.activeElement;if(!l.contains(v)){const p=new CustomEvent(pc,cm);l.addEventListener(pc,u),l.dispatchEvent(p),p.defaultPrevented||(HS(KS(my(l)),{select:!0}),document.activeElement===v&&En(l))}return()=>{l.removeEventListener(pc,u),setTimeout(()=>{const p=new CustomEvent(gc,cm);l.addEventListener(gc,h),l.dispatchEvent(p),p.defaultPrevented||En(v??document.body,{select:!0}),l.removeEventListener(gc,h),dm.remove(g)},0)}}},[l,u,h,g]);const x=m.useCallback(v=>{if(!n&&!r||g.paused)return;const N=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,p=document.activeElement;if(N&&p){const w=v.currentTarget,[y,j]=BS(w);y&&j?!v.shiftKey&&p===j?(v.preventDefault(),n&&En(y,{select:!0})):v.shiftKey&&p===y&&(v.preventDefault(),n&&En(j,{select:!0})):p===w&&v.preventDefault()}},[n,r,g.paused]);return a.jsx(tt.div,{tabIndex:-1,...i,ref:f,onKeyDown:x})});hy.displayName=FS;function HS(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(En(r,{select:t}),document.activeElement!==n)return}function BS(e){const t=my(e),n=um(t,e),r=um(t.reverse(),e);return[n,r]}function my(e){const t=[],n=document.createTreeWalker(e,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(;n.nextNode();)t.push(n.currentNode);return t}function um(e,t){for(const n of e)if(!VS(n,{upTo:t}))return n}function VS(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function US(e){return e instanceof HTMLInputElement&&"select"in e}function En(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&US(e)&&t&&e.select()}}var dm=WS();function WS(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fm(e,t),e.unshift(t)},remove(t){var n;e=fm(e,t),(n=e[0])==null||n.resume()}}}function fm(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function KS(e){return e.filter(t=>t.tagName!=="A")}var GS="Portal",py=m.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[s,o]=m.useState(!1);$a(()=>o(!0),[]);const i=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?P2.createPortal(a.jsx(tt.div,{...r,ref:t}),i):null});py.displayName=GS;function YS(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var Jo=e=>{const{present:t,children:n}=e,r=XS(t),s=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),o=Jt(r.ref,QS(s));return typeof n=="function"||r.isPresent?m.cloneElement(s,{ref:o}):null};Jo.displayName="Presence";function XS(e){const[t,n]=m.useState(),r=m.useRef({}),s=m.useRef(e),o=m.useRef("none"),i=e?"mounted":"unmounted",[l,c]=YS(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const u=Ei(r.current);o.current=l==="mounted"?u:"none"},[l]),$a(()=>{const u=r.current,h=s.current;if(h!==e){const f=o.current,g=Ei(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(h&&f!==g?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),$a(()=>{if(t){const u=d=>{const g=Ei(r.current).includes(d.animationName);d.target===t&&g&&ml.flushSync(()=>c("ANIMATION_END"))},h=d=>{d.target===t&&(o.current=Ei(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:m.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ei(e){return(e==null?void 0:e.animationName)||"none"}function QS(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xc=0;function qS(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hm()),document.body.insertAdjacentElement("beforeend",e[1]??hm()),xc++,()=>{xc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xc--}},[])}function hm(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Yt=function(){return Yt=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Yt.apply(this,arguments)};function gy(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function ZS(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var sa="right-scroll-bar-position",oa="width-before-scroll-bar",JS="with-scroll-bars-hidden",ek="--removed-body-scroll-bar-size";function yc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function tk(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var nk=typeof window<"u"?m.useLayoutEffect:m.useEffect,mm=new WeakMap;function rk(e,t){var n=tk(null,function(r){return e.forEach(function(s){return yc(s,r)})});return nk(function(){var r=mm.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(l){o.has(l)||yc(l,null)}),o.forEach(function(l){s.has(l)||yc(l,i)})}mm.set(n,e)},[e]),n}function sk(e){return e}function ok(e,t){t===void 0&&(t=sk);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(l){return o(l)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(o),i=n}var c=function(){var h=i;i=[],h.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(h){i.push(h),u()},filter:function(h){return i=i.filter(h),n}}}};return s}function ik(e){e===void 0&&(e={});var t=ok(null);return t.options=Yt({async:!0,ssr:!1},e),t}var xy=function(e){var t=e.sideCar,n=gy(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,Yt({},n))};xy.isSideCarExport=!0;function ak(e,t){return e.useMedium(t),xy}var yy=ik(),vc=function(){},Nl=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:vc,onWheelCapture:vc,onTouchMoveCapture:vc}),s=r[0],o=r[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,h=e.enabled,d=e.shards,f=e.sideCar,g=e.noIsolation,x=e.inert,v=e.allowPinchZoom,N=e.as,p=N===void 0?"div":N,w=e.gapMode,y=gy(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=f,b=rk([n,t]),E=Yt(Yt({},y),s);return m.createElement(m.Fragment,null,h&&m.createElement(j,{sideCar:yy,removeScrollBar:u,shards:d,noIsolation:g,inert:x,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:w}),i?m.cloneElement(m.Children.only(l),Yt(Yt({},E),{ref:b})):m.createElement(p,Yt({},E,{className:c,ref:b}),l))});Nl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Nl.classNames={fullWidth:oa,zeroRight:sa};var lk=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ck(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=lk();return t&&e.setAttribute("nonce",t),e}function uk(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dk(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var fk=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ck())&&(uk(t,n),dk(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},hk=function(){var e=fk();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vy=function(){var e=hk(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},mk={left:0,top:0,right:0,gap:0},wc=function(e){return parseInt(e||"",10)||0},pk=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[wc(n),wc(r),wc(s)]},gk=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return mk;var t=pk(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},xk=vy(),as="data-scroll-locked",yk=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
342
|
+
.`.concat(JS,` {
|
|
343
|
+
overflow: hidden `).concat(r,`;
|
|
344
|
+
padding-right: `).concat(l,"px ").concat(r,`;
|
|
345
|
+
}
|
|
346
|
+
body[`).concat(as,`] {
|
|
347
|
+
overflow: hidden `).concat(r,`;
|
|
348
|
+
overscroll-behavior: contain;
|
|
349
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
350
|
+
padding-left: `.concat(s,`px;
|
|
351
|
+
padding-top: `).concat(o,`px;
|
|
352
|
+
padding-right: `).concat(i,`px;
|
|
353
|
+
margin-left:0;
|
|
354
|
+
margin-top:0;
|
|
355
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
356
|
+
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.`).concat(sa,` {
|
|
360
|
+
right: `).concat(l,"px ").concat(r,`;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.`).concat(oa,` {
|
|
364
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.`).concat(sa," .").concat(sa,` {
|
|
368
|
+
right: 0 `).concat(r,`;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.`).concat(oa," .").concat(oa,` {
|
|
372
|
+
margin-right: 0 `).concat(r,`;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
body[`).concat(as,`] {
|
|
376
|
+
`).concat(ek,": ").concat(l,`px;
|
|
377
|
+
}
|
|
378
|
+
`)},pm=function(){var e=parseInt(document.body.getAttribute(as)||"0",10);return isFinite(e)?e:0},vk=function(){m.useEffect(function(){return document.body.setAttribute(as,(pm()+1).toString()),function(){var e=pm()-1;e<=0?document.body.removeAttribute(as):document.body.setAttribute(as,e.toString())}},[])},wk=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;vk();var o=m.useMemo(function(){return gk(s)},[s]);return m.createElement(xk,{styles:yk(o,!t,s,n?"":"!important")})},Au=!1;if(typeof window<"u")try{var _i=Object.defineProperty({},"passive",{get:function(){return Au=!0,!0}});window.addEventListener("test",_i,_i),window.removeEventListener("test",_i,_i)}catch{Au=!1}var zr=Au?{passive:!1}:!1,Nk=function(e){return e.tagName==="TEXTAREA"},wy=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Nk(e)&&n[t]==="visible")},jk=function(e){return wy(e,"overflowY")},bk=function(e){return wy(e,"overflowX")},gm=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=Ny(e,r);if(s){var o=jy(e,r),i=o[1],l=o[2];if(i>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Sk=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},kk=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ny=function(e,t){return e==="v"?jk(t):bk(t)},jy=function(e,t){return e==="v"?Sk(t):kk(t)},Ck=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ek=function(e,t,n,r,s){var o=Ck(e,window.getComputedStyle(t).direction),i=o*r,l=n.target,c=t.contains(l),u=!1,h=i>0,d=0,f=0;do{var g=jy(e,l),x=g[0],v=g[1],N=g[2],p=v-N-o*x;(x||p)&&Ny(e,l)&&(d+=p,f+=x),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(h&&Math.abs(d)<1||!h&&Math.abs(f)<1)&&(u=!0),u},Pi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xm=function(e){return[e.deltaX,e.deltaY]},ym=function(e){return e&&"current"in e?e.current:e},_k=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pk=function(e){return`
|
|
379
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
380
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
381
|
+
`)},Mk=0,Dr=[];function Ik(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),s=m.useState(Mk++)[0],o=m.useState(vy)[0],i=m.useRef(e);m.useEffect(function(){i.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var v=ZS([e.lockRef.current],(e.shards||[]).map(ym),!0).filter(Boolean);return v.forEach(function(N){return N.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=m.useCallback(function(v,N){if("touches"in v&&v.touches.length===2)return!i.current.allowPinchZoom;var p=Pi(v),w=n.current,y="deltaX"in v?v.deltaX:w[0]-p[0],j="deltaY"in v?v.deltaY:w[1]-p[1],b,E=v.target,C=Math.abs(y)>Math.abs(j)?"h":"v";if("touches"in v&&C==="h"&&E.type==="range")return!1;var M=gm(C,E);if(!M)return!0;if(M?b=C:(b=C==="v"?"h":"v",M=gm(C,E)),!M)return!1;if(!r.current&&"changedTouches"in v&&(y||j)&&(r.current=b),!b)return!0;var R=r.current||b;return Ek(R,N,v,R==="h"?y:j)},[]),c=m.useCallback(function(v){var N=v;if(!(!Dr.length||Dr[Dr.length-1]!==o)){var p="deltaY"in N?xm(N):Pi(N),w=t.current.filter(function(b){return b.name===N.type&&(b.target===N.target||N.target===b.shadowParent)&&_k(b.delta,p)})[0];if(w&&w.should){N.cancelable&&N.preventDefault();return}if(!w){var y=(i.current.shards||[]).map(ym).filter(Boolean).filter(function(b){return b.contains(N.target)}),j=y.length>0?l(N,y[0]):!i.current.noIsolation;j&&N.cancelable&&N.preventDefault()}}},[]),u=m.useCallback(function(v,N,p,w){var y={name:v,delta:N,target:p,should:w,shadowParent:Rk(p)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(j){return j!==y})},1)},[]),h=m.useCallback(function(v){n.current=Pi(v),r.current=void 0},[]),d=m.useCallback(function(v){u(v.type,xm(v),v.target,l(v,e.lockRef.current))},[]),f=m.useCallback(function(v){u(v.type,Pi(v),v.target,l(v,e.lockRef.current))},[]);m.useEffect(function(){return Dr.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",c,zr),document.addEventListener("touchmove",c,zr),document.addEventListener("touchstart",h,zr),function(){Dr=Dr.filter(function(v){return v!==o}),document.removeEventListener("wheel",c,zr),document.removeEventListener("touchmove",c,zr),document.removeEventListener("touchstart",h,zr)}},[]);var g=e.removeScrollBar,x=e.inert;return m.createElement(m.Fragment,null,x?m.createElement(o,{styles:Pk(s)}):null,g?m.createElement(wk,{gapMode:e.gapMode}):null)}function Rk(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Tk=ak(yy,Ik);var by=m.forwardRef(function(e,t){return m.createElement(Nl,Yt({},e,{ref:t,sideCar:Tk}))});by.classNames=Nl.classNames;var Lk=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$r=new WeakMap,Mi=new WeakMap,Ii={},Nc=0,Sy=function(e){return e&&(e.host||Sy(e.parentNode))},Ak=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Sy(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},zk=function(e,t,n,r){var s=Ak(t,Array.isArray(e)?e:[e]);Ii[n]||(Ii[n]=new WeakMap);var o=Ii[n],i=[],l=new Set,c=new Set(s),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};s.forEach(u);var h=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(f){if(l.has(f))h(f);else try{var g=f.getAttribute(r),x=g!==null&&g!=="false",v=($r.get(f)||0)+1,N=(o.get(f)||0)+1;$r.set(f,v),o.set(f,N),i.push(f),v===1&&x&&Mi.set(f,!0),N===1&&f.setAttribute(n,"true"),x||f.setAttribute(r,"true")}catch(p){console.error("aria-hidden: cannot operate on ",f,p)}})};return h(t),l.clear(),Nc++,function(){i.forEach(function(d){var f=$r.get(d)-1,g=o.get(d)-1;$r.set(d,f),o.set(d,g),f||(Mi.has(d)||d.removeAttribute(r),Mi.delete(d)),g||d.removeAttribute(n)}),Nc--,Nc||($r=new WeakMap,$r=new WeakMap,Mi=new WeakMap,Ii={})}},Dk=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=Lk(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),zk(r,s,n,"aria-hidden")):function(){return null}},lf="Dialog",[ky]=wl(lf),[$k,Ht]=ky(lf),Cy=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,l=m.useRef(null),c=m.useRef(null),[u=!1,h]=af({prop:r,defaultProp:s,onChange:o});return a.jsx($k,{scope:t,triggerRef:l,contentRef:c,contentId:mo(),titleId:mo(),descriptionId:mo(),open:u,onOpenChange:h,onOpenToggle:m.useCallback(()=>h(d=>!d),[h]),modal:i,children:n})};Cy.displayName=lf;var Ey="DialogTrigger",Ok=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Ht(Ey,n),o=Jt(t,s.triggerRef);return a.jsx(tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":df(s.open),...r,ref:o,onClick:Ve(e.onClick,s.onOpenToggle)})});Ok.displayName=Ey;var cf="DialogPortal",[Fk,_y]=ky(cf,{forceMount:void 0}),Py=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Ht(cf,t);return a.jsx(Fk,{scope:t,forceMount:n,children:m.Children.map(r,i=>a.jsx(Jo,{present:n||o.open,children:a.jsx(py,{asChild:!0,container:s,children:i})}))})};Py.displayName=cf;var Oa="DialogOverlay",My=m.forwardRef((e,t)=>{const n=_y(Oa,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Ht(Oa,e.__scopeDialog);return o.modal?a.jsx(Jo,{present:r||o.open,children:a.jsx(Hk,{...s,ref:t})}):null});My.displayName=Oa;var Hk=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Ht(Oa,n);return a.jsx(by,{as:ys,allowPinchZoom:!0,shards:[s.contentRef],children:a.jsx(tt.div,{"data-state":df(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),jr="DialogContent",Iy=m.forwardRef((e,t)=>{const n=_y(jr,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Ht(jr,e.__scopeDialog);return a.jsx(Jo,{present:r||o.open,children:o.modal?a.jsx(Bk,{...s,ref:t}):a.jsx(Vk,{...s,ref:t})})});Iy.displayName=jr;var Bk=m.forwardRef((e,t)=>{const n=Ht(jr,e.__scopeDialog),r=m.useRef(null),s=Jt(t,n.contentRef,r);return m.useEffect(()=>{const o=r.current;if(o)return Dk(o)},[]),a.jsx(Ry,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ve(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Ve(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&o.preventDefault()}),onFocusOutside:Ve(e.onFocusOutside,o=>o.preventDefault())})}),Vk=m.forwardRef((e,t)=>{const n=Ht(jr,e.__scopeDialog),r=m.useRef(!1),s=m.useRef(!1);return a.jsx(Ry,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Ry=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,l=Ht(jr,n),c=m.useRef(null),u=Jt(t,c);return qS(),a.jsxs(a.Fragment,{children:[a.jsx(hy,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:a.jsx(dy,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":df(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(Uk,{titleId:l.titleId}),a.jsx(Kk,{contentRef:c,descriptionId:l.descriptionId})]})]})}),uf="DialogTitle",Ty=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Ht(uf,n);return a.jsx(tt.h2,{id:s.titleId,...r,ref:t})});Ty.displayName=uf;var Ly="DialogDescription",Ay=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Ht(Ly,n);return a.jsx(tt.p,{id:s.descriptionId,...r,ref:t})});Ay.displayName=Ly;var zy="DialogClose",Dy=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Ht(zy,n);return a.jsx(tt.button,{type:"button",...r,ref:t,onClick:Ve(e.onClick,()=>s.onOpenChange(!1))})});Dy.displayName=zy;function df(e){return e?"open":"closed"}var $y="DialogTitleWarning",[RI,Oy]=kS($y,{contentName:jr,titleName:uf,docsSlug:"dialog"}),Uk=({titleId:e})=>{const t=Oy($y),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
382
|
+
|
|
383
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
384
|
+
|
|
385
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Wk="DialogDescriptionWarning",Kk=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Oy(Wk).contentName}}.`;return m.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Gk=Cy,Yk=Py,Fy=My,Hy=Iy,By=Ty,Vy=Ay,Xk=Dy;const Ir=Gk,Qk=Yk,Uy=m.forwardRef(({className:e,...t},n)=>a.jsx(Fy,{ref:n,className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Uy.displayName=Fy.displayName;const er=m.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(Qk,{children:[a.jsx(Uy,{}),a.jsxs(Hy,{ref:r,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,a.jsxs(Xk,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsx(ay,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));er.displayName=Hy.displayName;const Rr=({className:e,...t})=>a.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),Tr=({className:e,...t})=>a.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),tr=m.forwardRef(({className:e,...t},n)=>a.jsx(By,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));tr.displayName=By.displayName;const nr=m.forwardRef(({className:e,...t},n)=>a.jsx(Vy,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));nr.displayName=Vy.displayName;function qk(){const[e,t]=m.useState([]),[n,r]=m.useState([]),[s,o]=m.useState(""),[i,l]=m.useState(""),[c,u]=m.useState(""),[h,d]=m.useState(""),[f,g]=m.useState(!0),[x,v]=m.useState(new Set),[N,p]=m.useState(!1),[w,y]=m.useState(null),j=async()=>{g(!0);try{const[k,D]=await Promise.all([te.discovery.agents(),te.hosts.list()]);t(k.data??[]),r(D.data??[])}catch{}g(!1)};m.useEffect(()=>{j()},[]),m.useEffect(()=>{if(!w)return;const k=setTimeout(()=>y(null),4e3);return()=>clearTimeout(k)},[w]);const b=new Map(n.map(k=>[k.id,k])),E=[...new Set(e.map(k=>k.provider).filter(Boolean))].sort(),C=[...new Set(e.map(k=>k.status??"inactive").filter(Boolean))].sort(),M=e.filter(k=>{var D;if(s&&!((D=k.name)!=null&&D.toLowerCase().includes(s.toLowerCase())))return!1;if(i){if(i==="__none__"){if(k.hostId)return!1}else if(k.hostId!==i)return!1}return!(c&&k.provider!==c||h&&(k.status??"inactive")!==h)}),R=!!(i||c||h),O=k=>k==="active"?"success":k==="inactive"?"secondary":"warning",T=(k,D)=>{D.preventDefault(),D.stopPropagation(),v(P=>{const S=new Set(P);return S.has(k)?S.delete(k):S.add(k),S})},L=()=>{x.size===M.length?v(new Set):v(new Set(M.map(k=>k.registeredAgentId||k.id)))},$=()=>{l(""),u(""),d("")},_=e.filter(k=>x.has(k.registeredAgentId||k.id)),z=[...new Set(_.map(k=>k.hostId).filter(Boolean))];return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Agents"}),a.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[e.length," agent",e.length!==1?"s":""," discovered",R&&` · ${M.length} shown`]})]}),a.jsxs(K,{variant:"outline",size:"sm",onClick:j,children:[a.jsx(Xn,{className:"h-3.5 w-3.5"}),"Scan"]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("div",{className:"relative max-w-xs flex-1 min-w-[180px]",children:[a.jsx(sy,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx(de,{placeholder:"Search agents...",className:"pl-9 h-8 text-sm",value:s,onChange:k=>o(k.target.value)})]}),a.jsxs("select",{className:"h-8 rounded-md border border-input bg-background px-2 text-xs focus:outline-none focus:ring-1 focus:ring-ring",value:i,onChange:k=>l(k.target.value),children:[a.jsx("option",{value:"",children:"All Hosts"}),n.map(k=>a.jsx("option",{value:k.id,children:k.hostname},k.id)),a.jsx("option",{value:"__none__",children:"No Host"})]}),a.jsxs("select",{className:"h-8 rounded-md border border-input bg-background px-2 text-xs focus:outline-none focus:ring-1 focus:ring-ring",value:c,onChange:k=>u(k.target.value),children:[a.jsx("option",{value:"",children:"All Providers"}),E.map(k=>a.jsx("option",{value:k,children:k},k))]}),a.jsxs("select",{className:"h-8 rounded-md border border-input bg-background px-2 text-xs focus:outline-none focus:ring-1 focus:ring-ring",value:h,onChange:k=>d(k.target.value),children:[a.jsx("option",{value:"",children:"All Status"}),C.map(k=>a.jsx("option",{value:k,children:k},k))]}),R&&a.jsxs(K,{variant:"ghost",size:"sm",onClick:$,className:"h-8 text-xs px-2",children:[a.jsx(ay,{className:"h-3 w-3 mr-1"})," Clear"]}),M.length>0&&a.jsx(K,{variant:"ghost",size:"sm",onClick:L,className:"h-8 text-xs ml-auto",children:x.size===M.length?a.jsxs(a.Fragment,{children:[a.jsx(sm,{className:"h-3.5 w-3.5 mr-1"})," Deselect All"]}):a.jsxs(a.Fragment,{children:[a.jsx(Ao,{className:"h-3.5 w-3.5 mr-1"})," Select All"]})})]}),x.size>0&&a.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-primary/20 bg-primary/5 px-4 py-3",children:[a.jsxs("span",{className:"text-sm font-medium",children:[x.size," agent",x.size>1?"s":""," selected"]}),a.jsx("div",{className:"flex-1"}),a.jsxs(K,{size:"sm",onClick:()=>p(!0),children:[a.jsx(Ct,{className:"h-3.5 w-3.5 mr-1"})," Install Skill"]}),a.jsx(K,{size:"sm",variant:"ghost",onClick:()=>v(new Set),children:"Clear"})]}),f?a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):M.length===0?a.jsxs("div",{className:"flex h-40 flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border",children:[a.jsx(Pr,{className:"h-8 w-8 text-muted-foreground/50"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents found"})]}):a.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:M.map(k=>{var S;const D=k.registeredAgentId||k.id,P=x.has(D);return a.jsxs("div",{className:"relative",children:[a.jsx("button",{onClick:I=>T(D,I),className:`absolute left-2 top-2 z-10 rounded p-0.5 transition-colors ${P?"text-primary":"text-muted-foreground/30 hover:text-muted-foreground/60"}`,children:P?a.jsx(sm,{className:"h-4 w-4"}):a.jsx(Ao,{className:"h-4 w-4"})}),a.jsxs(Gn,{to:`/inventory/agents/${k.id}`,className:`group flex flex-col gap-3 rounded-lg border bg-card p-4 pl-8 transition-colors hover:border-muted-foreground/30 ${P?"border-primary/40 bg-primary/5":"border-border"}`,children:[a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("span",{className:"text-xl",children:k.emoji||"🤖"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-foreground group-hover:text-foreground",children:k.name}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[k.provider||"unknown",k.model?` · ${k.model}`:"",k.hostId&&b.has(k.hostId)&&a.jsxs("span",{className:"ml-1 text-muted-foreground/60",children:["@ ",b.get(k.hostId).hostname]})]})]})]}),a.jsx(he,{variant:O(k.status??"inactive"),className:"text-[10px]",children:k.status??"inactive"})]}),((S=k.skills)==null?void 0:S.length)>0&&a.jsxs("div",{className:"flex flex-wrap gap-1",children:[k.skills.slice(0,4).map(I=>a.jsx("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:typeof I=="string"?I:I.name},I.name??I)),k.skills.length>4&&a.jsxs("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:["+",k.skills.length-4]})]})]})]},k.id)})}),a.jsx(Zk,{open:N,onOpenChange:p,hostIds:z,agentCount:x.size,hostlessCount:_.filter(k=>!k.hostId).length,onDone:(k,D)=>{y({msg:k,type:D}),v(new Set)}}),w&&a.jsxs("div",{className:`fixed bottom-6 right-6 z-[100] flex items-center gap-2 rounded-lg border px-4 py-3 shadow-lg ${w.type==="success"?"border-emerald-500/30 bg-emerald-50 text-emerald-800 dark:bg-emerald-950 dark:text-emerald-200":"border-destructive/30 bg-red-50 text-red-800 dark:bg-red-950 dark:text-red-200"}`,children:[w.type==="success"?a.jsx(Yn,{className:"h-4 w-4"}):a.jsx(pt,{className:"h-4 w-4"}),a.jsx("span",{className:"text-sm",children:w.msg})]})]})}function Zk({open:e,onOpenChange:t,hostIds:n,agentCount:r,hostlessCount:s,onDone:o}){const[i,l]=m.useState(""),[c,u]=m.useState(!1),[h,d]=m.useState(""),f=()=>{l(""),d("")},g=async()=>{const x=i.trim();if(!x)return;if(n.length===0){d("None of the selected agents are associated with a host. Run 'opentrust connect' on their machines first.");return}u(!0),d("");let v=0,N=0;for(const p of n)try{await te.hosts.sendCommand(p,"install_skill",{skillName:x}),v++}catch{N++}u(!1),N===0?(f(),t(!1),o(`Skill "${x}" install sent to ${v} host${v>1?"s":""} (${r} agents)`,"success")):d(`${v} sent, ${N} failed`)};return a.jsx(Ir,{open:e,onOpenChange:x=>{x||f(),t(x)},children:a.jsxs(er,{className:"sm:max-w-[460px]",children:[a.jsxs(Rr,{children:[a.jsxs(tr,{className:"flex items-center gap-2",children:[a.jsx(Nr,{className:"h-4 w-4"})," Batch Install Skill"]}),a.jsxs(nr,{children:["Install a skill on ",r," selected agent",r>1?"s":""," across ",n.length," host",n.length>1?"s":"",".",s>0&&a.jsxs("span",{className:"text-amber-600 dark:text-amber-400",children:[" ","(",s," agent",s>1?"s":""," without host will be skipped)"]})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(pe,{htmlFor:"batch-skill-name",children:"Skill Name"}),a.jsx(de,{id:"batch-skill-name",placeholder:"e.g. self-improving-agent, web-search",value:i,onChange:x=>{l(x.target.value),d("")},onKeyDown:x=>x.key==="Enter"&&g()}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Runs ",a.jsx("code",{className:"rounded bg-muted px-1",children:"clawhub install <name> --force"})," on each host via CLI daemon. Same host won't receive duplicate commands."]})]}),h&&a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:[a.jsx(pt,{className:"h-3.5 w-3.5 shrink-0"}),a.jsx("span",{children:h})]}),a.jsxs(Tr,{children:[a.jsx(K,{variant:"outline",onClick:()=>{f(),t(!1)},children:"Cancel"}),a.jsxs(K,{onClick:g,disabled:c||!i.trim(),children:[c?a.jsx($e,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):a.jsx(Ct,{className:"mr-1.5 h-3.5 w-3.5"}),"Install on ",n.length," host",n.length>1?"s":""]})]})]})})}const me=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Te("rounded-lg border border-border bg-card text-card-foreground shadow-sm",e),...t}));me.displayName="Card";const Ie=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Te("flex flex-col space-y-1.5 p-6",e),...t}));Ie.displayName="CardHeader";const Re=m.forwardRef(({className:e,...t},n)=>a.jsx("h3",{ref:n,className:Te("font-semibold leading-none tracking-tight",e),...t}));Re.displayName="CardTitle";const jl=m.forwardRef(({className:e,...t},n)=>a.jsx("p",{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));jl.displayName="CardDescription";const Ne=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Te("p-6 pt-0",e),...t}));Ne.displayName="CardContent";const Jk=["Profile","Tasks","Identities","Permissions"];function eC(){const{id:e}=ij(),[t,n]=m.useState(null),[r,s]=m.useState([]),[o,i]=m.useState("Profile"),[l,c]=m.useState(!0),[u,h]=m.useState(null);return m.useEffect(()=>{e&&(c(!0),(async()=>{const d=await te.discovery.profile(e).catch(()=>null),f=(d==null?void 0:d.data)??null;n(f),f!=null&&f.hostId&&te.hosts.get(f.hostId).then(v=>h(v.data??null)).catch(()=>{});const g=(f==null?void 0:f.registeredAgentId)??e,x=await te.observations.agentPermissions(g).catch(()=>({data:[]}));s((x==null?void 0:x.data)??[]),c(!1)})())},[e]),l?a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):t?a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Gn,{to:"/inventory/agents",className:"rounded-md p-1.5 hover:bg-accent",children:a.jsx(Ub,{className:"h-4 w-4"})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"text-2xl",children:t.emoji||"🤖"}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-lg font-semibold",children:t.name||e}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:[t.provider||"unknown",t.model?` / ${t.model}`:"",u&&t.hostId&&a.jsxs(Gn,{to:`/inventory/hosts?expand=${t.hostId}`,className:"ml-2 inline-flex items-center gap-1 text-xs text-primary hover:underline",children:[a.jsx(vl,{className:"h-3 w-3"})," ",u.hostname]})]})]})]})]}),a.jsx("div",{className:"flex gap-1 border-b border-border",children:Jk.map(d=>a.jsx("button",{onClick:()=>i(d),className:Te("border-b-2 px-4 py-2 text-sm font-medium transition-colors",o===d?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:d},d))}),o==="Profile"&&a.jsx(tC,{profile:t}),o==="Tasks"&&a.jsx(nC,{profile:t}),o==="Identities"&&a.jsx(rC,{profile:t}),o==="Permissions"&&a.jsx(sC,{permissions:r})]}):a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Agent not found"})}function tC({profile:e}){const t=e.skills??[];return a.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsx(Re,{className:"text-sm",children:"Info"})}),a.jsxs(Ne,{className:"space-y-2 text-sm",children:[a.jsx(Xs,{label:"Owner",value:e.ownerName||"—"}),a.jsx(Xs,{label:"Creature",value:e.creature||"—"}),a.jsx(Xs,{label:"Vibe",value:e.vibe||"—"}),a.jsx(Xs,{label:"Sessions",value:String(e.sessionCount??0)}),a.jsx(Xs,{label:"Last Active",value:e.lastActive??"never"})]})]}),a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(iy,{className:"h-4 w-4"})," Skills (",t.length,")"]}),a.jsx(Gn,{to:"/ops/skills",children:a.jsxs(K,{size:"sm",variant:"ghost",className:"h-7 text-xs text-muted-foreground",children:["Manage ",a.jsx(qb,{className:"ml-1 h-3 w-3"})]})})]})}),a.jsx(Ne,{children:t.length===0?a.jsxs("div",{className:"flex flex-col items-center gap-2 py-4",children:[a.jsx(Nr,{className:"h-8 w-8 text-muted-foreground/30"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No skills installed"}),a.jsx(Gn,{to:"/ops/skills",children:a.jsx(K,{size:"sm",variant:"ghost",className:"h-7 text-xs",children:"Go to Operations to install skills"})})]}):a.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(n=>a.jsxs(he,{variant:"secondary",className:"text-xs font-normal",children:[a.jsx(Nr,{className:"mr-1 h-3 w-3"})," ",n.name]},n.name))})})]}),a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsx(Re,{className:"text-sm",children:"Plugins"})}),a.jsx(Ne,{children:(e.plugins??[]).length===0?a.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins"}):a.jsx("div",{className:"space-y-1.5",children:(e.plugins??[]).map(n=>a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsx("span",{children:n.name}),a.jsx(he,{variant:n.enabled?"success":"secondary",className:"text-[10px]",children:n.enabled?"on":"off"})]},n.name))})})]}),a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsx(Re,{className:"text-sm",children:"Connected Systems"})}),a.jsx(Ne,{children:(e.connectedSystems??[]).length===0?a.jsx("p",{className:"text-sm text-muted-foreground",children:"None"}):a.jsx("div",{className:"flex flex-wrap gap-1.5",children:(e.connectedSystems??[]).map(n=>a.jsx(he,{variant:"outline",className:"text-xs",children:n},n))})})]})]})}function nC({profile:e}){const t=e.cronJobs??[];return a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(Gb,{className:"h-4 w-4"})," Scheduled Tasks (",t.length,")"]})}),a.jsx(Ne,{children:t.length===0?a.jsx("p",{className:"text-sm text-muted-foreground",children:"No scheduled tasks"}):a.jsx("div",{className:"space-y-2",children:t.map((n,r)=>a.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border px-3 py-2 text-sm",children:[a.jsxs("div",{children:[a.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:n.schedule}),a.jsx("span",{className:"ml-2",children:n.task??n.id})]}),a.jsx(he,{variant:n.enabled!==!1?"success":"secondary",className:"text-[10px]",children:n.enabled!==!1?"active":"paused"})]},r))})})]})}function rC({profile:e}){const t=e.workspaceFiles??{},n=[{label:"SOUL.md",content:t.soul},{label:"IDENTITY.md",content:t.identity},{label:"USER.md",content:t.user}].filter(r=>r.content);return a.jsx("div",{className:"space-y-4",children:n.length===0?a.jsx("p",{className:"text-sm text-muted-foreground",children:"No identity files found"}):n.map(r=>a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(Mr,{className:"h-4 w-4"})," ",r.label]})}),a.jsx(Ne,{children:a.jsx("pre",{className:"max-h-60 overflow-auto whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-xs text-muted-foreground",children:r.content})})]},r.label))})}function sC({permissions:e}){return e.length===0?a.jsx("p",{className:"text-sm text-muted-foreground",children:"No observed permissions"}):a.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[a.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Tool"}),a.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Category"}),a.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Access"}),a.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-muted-foreground",children:"Calls"}),a.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-muted-foreground",children:"Errors"})]})}),a.jsx("tbody",{children:e.map(t=>a.jsxs("tr",{className:"border-b border-border last:border-0",children:[a.jsx("td",{className:"px-4 py-2.5 font-mono text-xs",children:t.toolName}),a.jsx("td",{className:"px-4 py-2.5",children:a.jsx(he,{variant:"outline",className:"text-[10px]",children:t.category??"—"})}),a.jsx("td",{className:"px-4 py-2.5",children:a.jsx(he,{variant:t.accessPattern==="write"?"warning":t.accessPattern==="admin"?"destructive":"secondary",className:"text-[10px]",children:t.accessPattern??"read"})}),a.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs",children:t.callCount}),a.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs text-destructive",children:t.errorCount||"—"})]},t.id))})]})})}function Xs({label:e,value:t}){return a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-muted-foreground",children:e}),a.jsx("span",{className:"font-medium",children:t})]})}function oC(){const[e,t]=m.useState([]),[n,r]=m.useState(!0),[s,o]=m.useState(new Set);m.useEffect(()=>{te.discovery.agents().then(c=>{t(c.data??[]),r(!1)}).catch(()=>r(!1))},[]);const i=[{category:"Agents",items:e.map(c=>({id:c.id,name:c.name,emoji:c.emoji,provider:c.provider,status:c.status}))},{category:"Owners",items:[...new Set(e.map(c=>c.ownerName).filter(Boolean))].map(c=>({id:c,name:c,type:"owner"}))},{category:"Connected Systems",items:[...new Set(e.flatMap(c=>c.connectedSystems??[]))].map(c=>({id:c,name:c,type:"system"}))}],l=c=>{o(u=>{const h=new Set(u);return h.has(c)?h.delete(c):h.add(c),h})};return n?a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Identities"}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Agents, owners, and connected systems"})]}),a.jsx("div",{className:"space-y-3",children:i.map(c=>a.jsxs(me,{children:[a.jsxs("button",{onClick:()=>l(c.category),className:"flex w-full items-center justify-between p-4 text-left",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(ny,{className:"h-4 w-4 text-muted-foreground"}),a.jsx("span",{className:"text-sm font-medium",children:c.category}),a.jsx(he,{variant:"secondary",className:"text-[10px]",children:c.items.length})]}),s.has(c.category)?a.jsx(Zo,{className:"h-4 w-4 text-muted-foreground"}):a.jsx(tf,{className:"h-4 w-4 text-muted-foreground"})]}),s.has(c.category)&&a.jsx(Ne,{className:"border-t border-border pt-3",children:c.items.length===0?a.jsx("p",{className:"text-sm text-muted-foreground",children:"None"}):a.jsx("div",{className:"space-y-1.5",children:c.items.map(u=>a.jsxs("div",{className:"flex items-center justify-between rounded-md px-3 py-2 text-sm hover:bg-muted/50",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[u.emoji&&a.jsx("span",{className:"text-base",children:u.emoji}),a.jsx("span",{children:u.name})]}),u.status&&a.jsx(he,{variant:u.status==="active"?"success":"secondary",className:"text-[10px]",children:u.status}),u.type&&a.jsx(he,{variant:"outline",className:"text-[10px]",children:u.type})]},u.id))})})]},c.category))})]})}function iC(){const[e,t]=m.useState([]),[n,r]=m.useState(""),[s,o]=m.useState("callCount"),[i,l]=m.useState(!1),[c,u]=m.useState(!0);m.useEffect(()=>{te.observations.permissions().then(f=>{t(f.data??[]),u(!1)}).catch(()=>u(!1))},[]);const h=m.useMemo(()=>{let f=e;if(n){const g=n.toLowerCase();f=f.filter(x=>{var v,N;return((v=x.toolName)==null?void 0:v.toLowerCase().includes(g))||((N=x.category)==null?void 0:N.toLowerCase().includes(g))})}return[...f].sort((g,x)=>{const v=g[s]??0,N=x[s]??0;return typeof v=="string"?i?v.localeCompare(N):N.localeCompare(v):i?v-N:N-v})},[e,n,s,i]),d=f=>{s===f?l(!i):(o(f),l(!1))};return c?a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Permissions"}),a.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[e.length," observed tool permission",e.length!==1?"s":""]})]}),a.jsxs("div",{className:"relative max-w-sm",children:[a.jsx(sy,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),a.jsx(de,{placeholder:"Filter by tool or category...",className:"pl-9",value:n,onChange:f=>r(f.target.value)})]}),a.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[a.jsx(jc,{label:"Tool",sortKey:"toolName",current:s,asc:i,onSort:d}),a.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Category"}),a.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Access"}),a.jsx(jc,{label:"Calls",sortKey:"callCount",current:s,asc:i,onSort:d,align:"right"}),a.jsx(jc,{label:"Errors",sortKey:"errorCount",current:s,asc:i,onSort:d,align:"right"})]})}),a.jsx("tbody",{children:h.length===0?a.jsx("tr",{children:a.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-muted-foreground",children:"No permissions"})}):h.map(f=>a.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30",children:[a.jsx("td",{className:"px-4 py-2.5 font-mono text-xs",children:f.toolName}),a.jsx("td",{className:"px-4 py-2.5",children:a.jsx(he,{variant:"outline",className:"text-[10px]",children:f.category??"—"})}),a.jsx("td",{className:"px-4 py-2.5",children:a.jsx(he,{variant:f.accessPattern==="write"?"warning":f.accessPattern==="admin"?"destructive":"secondary",className:"text-[10px]",children:f.accessPattern??"read"})}),a.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs",children:f.callCount}),a.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs text-destructive",children:f.errorCount||"—"})]},f.id))})]})})]})}function jc({label:e,sortKey:t,current:n,asc:r,onSort:s,align:o="left"}){return a.jsx("th",{className:`cursor-pointer px-4 py-2.5 font-medium text-muted-foreground hover:text-foreground ${o==="right"?"text-right":"text-left"}`,onClick:()=>s(t),children:a.jsxs("span",{className:"inline-flex items-center gap-1",children:[e,n===t&&a.jsx(Wb,{className:"h-3 w-3"})]})})}function aC(){const[e,t]=m.useState([]),[n,r]=m.useState(!0);m.useEffect(()=>{te.observations.anomalies().then(i=>{t(i.data??[]),r(!1)}).catch(()=>r(!1))},[]);const s=i=>i.blocked||i.errorCount>3?"high":i.callCount===1||i.errorCount>0?"medium":"low",o=i=>i==="high"?"destructive":i==="medium"?"warning":"secondary";return n?a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Risk Overview"}),a.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[e.length," anomal",e.length!==1?"ies":"y"," detected"]})]}),e.length===0?a.jsxs("div",{className:"flex h-40 flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border",children:[a.jsx(of,{className:"h-8 w-8 text-muted-foreground/50"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No anomalies detected"})]}):a.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[a.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Tool"}),a.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Agent"}),a.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Risk"}),a.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Category"}),a.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-muted-foreground",children:"First Seen"})]})}),a.jsx("tbody",{children:e.map(i=>{var c;const l=s(i);return a.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30",children:[a.jsx("td",{className:"px-4 py-2.5 font-mono text-xs",children:i.toolName}),a.jsx("td",{className:"px-4 py-2.5 text-xs text-muted-foreground",children:((c=i.agentId)==null?void 0:c.slice(0,8))??"—"}),a.jsx("td",{className:"px-4 py-2.5",children:a.jsx(he,{variant:o(l),className:"text-[10px]",children:l})}),a.jsx("td",{className:"px-4 py-2.5",children:a.jsx(he,{variant:"outline",className:"text-[10px]",children:i.category??"—"})}),a.jsx("td",{className:"px-4 py-2.5 text-right text-xs text-muted-foreground",children:i.firstSeen?new Date(i.firstSeen).toLocaleDateString():"—"})]},i.id)})})]})})]})}function Ae(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Ae(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var lC={value:()=>{}};function bl(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ia(n)}function ia(e){this._=e}function cC(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",s=n.indexOf(".");if(s>=0&&(r=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ia.prototype=bl.prototype={constructor:ia,on:function(e,t){var n=this._,r=cC(e+"",n),s,o=-1,i=r.length;if(arguments.length<2){for(;++o<i;)if((s=(e=r[o]).type)&&(s=uC(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<i;)if(s=(e=r[o]).type)n[s]=vm(n[s],e.name,t);else if(t==null)for(s in n)n[s]=vm(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ia(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),r=0,s,o;r<s;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,s=o.length;r<s;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],s=0,o=r.length;s<o;++s)r[s].value.apply(t,n)}};function uC(e,t){for(var n=0,r=e.length,s;n<r;++n)if((s=e[n]).name===t)return s.value}function vm(e,t,n){for(var r=0,s=e.length;r<s;++r)if(e[r].name===t){e[r]=lC,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var zu="http://www.w3.org/1999/xhtml";const wm={svg:"http://www.w3.org/2000/svg",xhtml:zu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Sl(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),wm.hasOwnProperty(t)?{space:wm[t],local:e}:e}function dC(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===zu&&t.documentElement.namespaceURI===zu?t.createElement(e):t.createElementNS(n,e)}}function fC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Wy(e){var t=Sl(e);return(t.local?fC:dC)(t)}function hC(){}function ff(e){return e==null?hC:function(){return this.querySelector(e)}}function mC(e){typeof e!="function"&&(e=ff(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var o=t[s],i=o.length,l=r[s]=new Array(i),c,u,h=0;h<i;++h)(c=o[h])&&(u=e.call(c,c.__data__,h,o))&&("__data__"in c&&(u.__data__=c.__data__),l[h]=u);return new gt(r,this._parents)}function pC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function gC(){return[]}function Ky(e){return e==null?gC:function(){return this.querySelectorAll(e)}}function xC(e){return function(){return pC(e.apply(this,arguments))}}function yC(e){typeof e=="function"?e=xC(e):e=Ky(e);for(var t=this._groups,n=t.length,r=[],s=[],o=0;o<n;++o)for(var i=t[o],l=i.length,c,u=0;u<l;++u)(c=i[u])&&(r.push(e.call(c,c.__data__,u,i)),s.push(c));return new gt(r,s)}function Gy(e){return function(){return this.matches(e)}}function Yy(e){return function(t){return t.matches(e)}}var vC=Array.prototype.find;function wC(e){return function(){return vC.call(this.children,e)}}function NC(){return this.firstElementChild}function jC(e){return this.select(e==null?NC:wC(typeof e=="function"?e:Yy(e)))}var bC=Array.prototype.filter;function SC(){return Array.from(this.children)}function kC(e){return function(){return bC.call(this.children,e)}}function CC(e){return this.selectAll(e==null?SC:kC(typeof e=="function"?e:Yy(e)))}function EC(e){typeof e!="function"&&(e=Gy(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var o=t[s],i=o.length,l=r[s]=[],c,u=0;u<i;++u)(c=o[u])&&e.call(c,c.__data__,u,o)&&l.push(c);return new gt(r,this._parents)}function Xy(e){return new Array(e.length)}function _C(){return new gt(this._enter||this._groups.map(Xy),this._parents)}function Fa(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Fa.prototype={constructor:Fa,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function PC(e){return function(){return e}}function MC(e,t,n,r,s,o){for(var i=0,l,c=t.length,u=o.length;i<u;++i)(l=t[i])?(l.__data__=o[i],r[i]=l):n[i]=new Fa(e,o[i]);for(;i<c;++i)(l=t[i])&&(s[i]=l)}function IC(e,t,n,r,s,o,i){var l,c,u=new Map,h=t.length,d=o.length,f=new Array(h),g;for(l=0;l<h;++l)(c=t[l])&&(f[l]=g=i.call(c,c.__data__,l,t)+"",u.has(g)?s[l]=c:u.set(g,c));for(l=0;l<d;++l)g=i.call(e,o[l],l,o)+"",(c=u.get(g))?(r[l]=c,c.__data__=o[l],u.delete(g)):n[l]=new Fa(e,o[l]);for(l=0;l<h;++l)(c=t[l])&&u.get(f[l])===c&&(s[l]=c)}function RC(e){return e.__data__}function TC(e,t){if(!arguments.length)return Array.from(this,RC);var n=t?IC:MC,r=this._parents,s=this._groups;typeof e!="function"&&(e=PC(e));for(var o=s.length,i=new Array(o),l=new Array(o),c=new Array(o),u=0;u<o;++u){var h=r[u],d=s[u],f=d.length,g=LC(e.call(h,h&&h.__data__,u,r)),x=g.length,v=l[u]=new Array(x),N=i[u]=new Array(x),p=c[u]=new Array(f);n(h,d,v,N,p,g,t);for(var w=0,y=0,j,b;w<x;++w)if(j=v[w]){for(w>=y&&(y=w+1);!(b=N[y])&&++y<x;);j._next=b||null}}return i=new gt(i,r),i._enter=l,i._exit=c,i}function LC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function AC(){return new gt(this._exit||this._groups.map(Xy),this._parents)}function zC(e,t,n){var r=this.enter(),s=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?o.remove():n(o),r&&s?r.merge(s).order():s}function DC(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,s=n.length,o=r.length,i=Math.min(s,o),l=new Array(s),c=0;c<i;++c)for(var u=n[c],h=r[c],d=u.length,f=l[c]=new Array(d),g,x=0;x<d;++x)(g=u[x]||h[x])&&(f[x]=g);for(;c<s;++c)l[c]=n[c];return new gt(l,this._parents)}function $C(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],s=r.length-1,o=r[s],i;--s>=0;)(i=r[s])&&(o&&i.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(i,o),o=i);return this}function OC(e){e||(e=FC);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,s=new Array(r),o=0;o<r;++o){for(var i=n[o],l=i.length,c=s[o]=new Array(l),u,h=0;h<l;++h)(u=i[h])&&(c[h]=u);c.sort(t)}return new gt(s,this._parents).order()}function FC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function HC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function BC(){return Array.from(this)}function VC(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],s=0,o=r.length;s<o;++s){var i=r[s];if(i)return i}return null}function UC(){let e=0;for(const t of this)++e;return e}function WC(){return!this.node()}function KC(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var s=t[n],o=0,i=s.length,l;o<i;++o)(l=s[o])&&e.call(l,l.__data__,o,s);return this}function GC(e){return function(){this.removeAttribute(e)}}function YC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function XC(e,t){return function(){this.setAttribute(e,t)}}function QC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function qC(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function ZC(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function JC(e,t){var n=Sl(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?YC:GC:typeof t=="function"?n.local?ZC:qC:n.local?QC:XC)(n,t))}function Qy(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function eE(e){return function(){this.style.removeProperty(e)}}function tE(e,t,n){return function(){this.style.setProperty(e,t,n)}}function nE(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function rE(e,t,n){return arguments.length>1?this.each((t==null?eE:typeof t=="function"?nE:tE)(e,t,n??"")):vs(this.node(),e)}function vs(e,t){return e.style.getPropertyValue(t)||Qy(e).getComputedStyle(e,null).getPropertyValue(t)}function sE(e){return function(){delete this[e]}}function oE(e,t){return function(){this[e]=t}}function iE(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function aE(e,t){return arguments.length>1?this.each((t==null?sE:typeof t=="function"?iE:oE)(e,t)):this.node()[e]}function qy(e){return e.trim().split(/^|\s+/)}function hf(e){return e.classList||new Zy(e)}function Zy(e){this._node=e,this._names=qy(e.getAttribute("class")||"")}Zy.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Jy(e,t){for(var n=hf(e),r=-1,s=t.length;++r<s;)n.add(t[r])}function ev(e,t){for(var n=hf(e),r=-1,s=t.length;++r<s;)n.remove(t[r])}function lE(e){return function(){Jy(this,e)}}function cE(e){return function(){ev(this,e)}}function uE(e,t){return function(){(t.apply(this,arguments)?Jy:ev)(this,e)}}function dE(e,t){var n=qy(e+"");if(arguments.length<2){for(var r=hf(this.node()),s=-1,o=n.length;++s<o;)if(!r.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?uE:t?lE:cE)(n,t))}function fE(){this.textContent=""}function hE(e){return function(){this.textContent=e}}function mE(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function pE(e){return arguments.length?this.each(e==null?fE:(typeof e=="function"?mE:hE)(e)):this.node().textContent}function gE(){this.innerHTML=""}function xE(e){return function(){this.innerHTML=e}}function yE(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function vE(e){return arguments.length?this.each(e==null?gE:(typeof e=="function"?yE:xE)(e)):this.node().innerHTML}function wE(){this.nextSibling&&this.parentNode.appendChild(this)}function NE(){return this.each(wE)}function jE(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bE(){return this.each(jE)}function SE(e){var t=typeof e=="function"?e:Wy(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function kE(){return null}function CE(e,t){var n=typeof e=="function"?e:Wy(e),r=t==null?kE:typeof t=="function"?t:ff(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function EE(){var e=this.parentNode;e&&e.removeChild(this)}function _E(){return this.each(EE)}function PE(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ME(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function IE(e){return this.select(e?ME:PE)}function RE(e){return arguments.length?this.property("__data__",e):this.node().__data__}function TE(e){return function(t){e.call(this,t,this.__data__)}}function LE(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function AE(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,s=t.length,o;n<s;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function zE(e,t,n){return function(){var r=this.__on,s,o=TE(t);if(r){for(var i=0,l=r.length;i<l;++i)if((s=r[i]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=n),s.value=t;return}}this.addEventListener(e.type,o,n),s={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(s):this.__on=[s]}}function DE(e,t,n){var r=LE(e+""),s,o=r.length,i;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,h;c<u;++c)for(s=0,h=l[c];s<o;++s)if((i=r[s]).type===h.type&&i.name===h.name)return h.value}return}for(l=t?zE:AE,s=0;s<o;++s)this.each(l(r[s],t,n));return this}function tv(e,t,n){var r=Qy(e),s=r.CustomEvent;typeof s=="function"?s=new s(t,n):(s=r.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function $E(e,t){return function(){return tv(this,e,t)}}function OE(e,t){return function(){return tv(this,e,t.apply(this,arguments))}}function FE(e,t){return this.each((typeof t=="function"?OE:$E)(e,t))}function*HE(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],s=0,o=r.length,i;s<o;++s)(i=r[s])&&(yield i)}var nv=[null];function gt(e,t){this._groups=e,this._parents=t}function ei(){return new gt([[document.documentElement]],nv)}function BE(){return this}gt.prototype=ei.prototype={constructor:gt,select:mC,selectAll:yC,selectChild:jC,selectChildren:CC,filter:EC,data:TC,enter:_C,exit:AC,join:zC,merge:DC,selection:BE,order:$C,sort:OC,call:HC,nodes:BC,node:VC,size:UC,empty:WC,each:KC,attr:JC,style:rE,property:aE,classed:dE,text:pE,html:vE,raise:NE,lower:bE,append:SE,insert:CE,remove:_E,clone:IE,datum:RE,on:DE,dispatch:FE,[Symbol.iterator]:HE};function dt(e){return typeof e=="string"?new gt([[document.querySelector(e)]],[document.documentElement]):new gt([[e]],nv)}function VE(e){let t;for(;t=e.sourceEvent;)e=t;return e}function It(e,t){if(e=VE(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}const UE={passive:!1},zo={capture:!0,passive:!1};function bc(e){e.stopImmediatePropagation()}function ls(e){e.preventDefault(),e.stopImmediatePropagation()}function rv(e){var t=e.document.documentElement,n=dt(e).on("dragstart.drag",ls,zo);"onselectstart"in t?n.on("selectstart.drag",ls,zo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function sv(e,t){var n=e.document.documentElement,r=dt(e).on("dragstart.drag",null);t&&(r.on("click.drag",ls,zo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Ri=e=>()=>e;function Du(e,{sourceEvent:t,subject:n,target:r,identifier:s,active:o,x:i,y:l,dx:c,dy:u,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}Du.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function WE(e){return!e.ctrlKey&&!e.button}function KE(){return this.parentNode}function GE(e,t){return t??{x:e.x,y:e.y}}function YE(){return navigator.maxTouchPoints||"ontouchstart"in this}function ov(){var e=WE,t=KE,n=GE,r=YE,s={},o=bl("start","drag","end"),i=0,l,c,u,h,d=0;function f(j){j.on("mousedown.drag",g).filter(r).on("touchstart.drag",N).on("touchmove.drag",p,UE).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(j,b){if(!(h||!e.call(this,j,b))){var E=y(this,t.call(this,j,b),j,b,"mouse");E&&(dt(j.view).on("mousemove.drag",x,zo).on("mouseup.drag",v,zo),rv(j.view),bc(j),u=!1,l=j.clientX,c=j.clientY,E("start",j))}}function x(j){if(ls(j),!u){var b=j.clientX-l,E=j.clientY-c;u=b*b+E*E>d}s.mouse("drag",j)}function v(j){dt(j.view).on("mousemove.drag mouseup.drag",null),sv(j.view,u),ls(j),s.mouse("end",j)}function N(j,b){if(e.call(this,j,b)){var E=j.changedTouches,C=t.call(this,j,b),M=E.length,R,O;for(R=0;R<M;++R)(O=y(this,C,j,b,E[R].identifier,E[R]))&&(bc(j),O("start",j,E[R]))}}function p(j){var b=j.changedTouches,E=b.length,C,M;for(C=0;C<E;++C)(M=s[b[C].identifier])&&(ls(j),M("drag",j,b[C]))}function w(j){var b=j.changedTouches,E=b.length,C,M;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),C=0;C<E;++C)(M=s[b[C].identifier])&&(bc(j),M("end",j,b[C]))}function y(j,b,E,C,M,R){var O=o.copy(),T=It(R||E,b),L,$,_;if((_=n.call(j,new Du("beforestart",{sourceEvent:E,target:f,identifier:M,active:i,x:T[0],y:T[1],dx:0,dy:0,dispatch:O}),C))!=null)return L=_.x-T[0]||0,$=_.y-T[1]||0,function z(k,D,P){var S=T,I;switch(k){case"start":s[M]=z,I=i++;break;case"end":delete s[M],--i;case"drag":T=It(P||D,b),I=i;break}O.call(k,j,new Du(k,{sourceEvent:D,subject:_,target:f,identifier:M,active:I,x:T[0]+L,y:T[1]+$,dx:T[0]-S[0],dy:T[1]-S[1],dispatch:O}),C)}}return f.filter=function(j){return arguments.length?(e=typeof j=="function"?j:Ri(!!j),f):e},f.container=function(j){return arguments.length?(t=typeof j=="function"?j:Ri(j),f):t},f.subject=function(j){return arguments.length?(n=typeof j=="function"?j:Ri(j),f):n},f.touchable=function(j){return arguments.length?(r=typeof j=="function"?j:Ri(!!j),f):r},f.on=function(){var j=o.on.apply(o,arguments);return j===o?f:j},f.clickDistance=function(j){return arguments.length?(d=(j=+j)*j,f):Math.sqrt(d)},f}function mf(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function iv(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ti(){}var Do=.7,Ha=1/Do,cs="\\s*([+-]?\\d+)\\s*",$o="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",XE=/^#([0-9a-f]{3,8})$/,QE=new RegExp(`^rgb\\(${cs},${cs},${cs}\\)$`),qE=new RegExp(`^rgb\\(${qt},${qt},${qt}\\)$`),ZE=new RegExp(`^rgba\\(${cs},${cs},${cs},${$o}\\)$`),JE=new RegExp(`^rgba\\(${qt},${qt},${qt},${$o}\\)$`),e_=new RegExp(`^hsl\\(${$o},${qt},${qt}\\)$`),t_=new RegExp(`^hsla\\(${$o},${qt},${qt},${$o}\\)$`),Nm={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};mf(ti,br,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:jm,formatHex:jm,formatHex8:n_,formatHsl:r_,formatRgb:bm,toString:bm});function jm(){return this.rgb().formatHex()}function n_(){return this.rgb().formatHex8()}function r_(){return av(this).formatHsl()}function bm(){return this.rgb().formatRgb()}function br(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=XE.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Sm(t):n===3?new it(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ti(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ti(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=QE.exec(e))?new it(t[1],t[2],t[3],1):(t=qE.exec(e))?new it(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ZE.exec(e))?Ti(t[1],t[2],t[3],t[4]):(t=JE.exec(e))?Ti(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=e_.exec(e))?Em(t[1],t[2]/100,t[3]/100,1):(t=t_.exec(e))?Em(t[1],t[2]/100,t[3]/100,t[4]):Nm.hasOwnProperty(e)?Sm(Nm[e]):e==="transparent"?new it(NaN,NaN,NaN,0):null}function Sm(e){return new it(e>>16&255,e>>8&255,e&255,1)}function Ti(e,t,n,r){return r<=0&&(e=t=n=NaN),new it(e,t,n,r)}function s_(e){return e instanceof ti||(e=br(e)),e?(e=e.rgb(),new it(e.r,e.g,e.b,e.opacity)):new it}function $u(e,t,n,r){return arguments.length===1?s_(e):new it(e,t,n,r??1)}function it(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}mf(it,$u,iv(ti,{brighter(e){return e=e==null?Ha:Math.pow(Ha,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Do:Math.pow(Do,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new it(mr(this.r),mr(this.g),mr(this.b),Ba(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:km,formatHex:km,formatHex8:o_,formatRgb:Cm,toString:Cm}));function km(){return`#${dr(this.r)}${dr(this.g)}${dr(this.b)}`}function o_(){return`#${dr(this.r)}${dr(this.g)}${dr(this.b)}${dr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cm(){const e=Ba(this.opacity);return`${e===1?"rgb(":"rgba("}${mr(this.r)}, ${mr(this.g)}, ${mr(this.b)}${e===1?")":`, ${e})`}`}function Ba(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dr(e){return e=mr(e),(e<16?"0":"")+e.toString(16)}function Em(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Tt(e,t,n,r)}function av(e){if(e instanceof Tt)return new Tt(e.h,e.s,e.l,e.opacity);if(e instanceof ti||(e=br(e)),!e)return new Tt;if(e instanceof Tt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,s=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,l=o-s,c=(o+s)/2;return l?(t===o?i=(n-r)/l+(n<r)*6:n===o?i=(r-t)/l+2:i=(t-n)/l+4,l/=c<.5?o+s:2-o-s,i*=60):l=c>0&&c<1?0:i,new Tt(i,l,c,e.opacity)}function i_(e,t,n,r){return arguments.length===1?av(e):new Tt(e,t,n,r??1)}function Tt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}mf(Tt,i_,iv(ti,{brighter(e){return e=e==null?Ha:Math.pow(Ha,e),new Tt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Do:Math.pow(Do,e),new Tt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,s=2*n-r;return new it(Sc(e>=240?e-240:e+120,s,r),Sc(e,s,r),Sc(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Tt(_m(this.h),Li(this.s),Li(this.l),Ba(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ba(this.opacity);return`${e===1?"hsl(":"hsla("}${_m(this.h)}, ${Li(this.s)*100}%, ${Li(this.l)*100}%${e===1?")":`, ${e})`}`}}));function _m(e){return e=(e||0)%360,e<0?e+360:e}function Li(e){return Math.max(0,Math.min(1,e||0))}function Sc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const pf=e=>()=>e;function a_(e,t){return function(n){return e+n*t}}function l_(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function c_(e){return(e=+e)==1?lv:function(t,n){return n-t?l_(t,n,e):pf(isNaN(t)?n:t)}}function lv(e,t){var n=t-e;return n?a_(e,n):pf(isNaN(e)?t:e)}const Va=function e(t){var n=c_(t);function r(s,o){var i=n((s=$u(s)).r,(o=$u(o)).r),l=n(s.g,o.g),c=n(s.b,o.b),u=lv(s.opacity,o.opacity);return function(h){return s.r=i(h),s.g=l(h),s.b=c(h),s.opacity=u(h),s+""}}return r.gamma=e,r}(1);function u_(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),s;return function(o){for(s=0;s<n;++s)r[s]=e[s]*(1-o)+t[s]*o;return r}}function d_(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function f_(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,s=new Array(r),o=new Array(n),i;for(i=0;i<r;++i)s[i]=po(e[i],t[i]);for(;i<n;++i)o[i]=t[i];return function(l){for(i=0;i<r;++i)o[i]=s[i](l);return o}}function h_(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Kt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function m_(e,t){var n={},r={},s;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(s in t)s in e?n[s]=po(e[s],t[s]):r[s]=t[s];return function(o){for(s in n)r[s]=n[s](o);return r}}var Ou=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kc=new RegExp(Ou.source,"g");function p_(e){return function(){return e}}function g_(e){return function(t){return e(t)+""}}function cv(e,t){var n=Ou.lastIndex=kc.lastIndex=0,r,s,o,i=-1,l=[],c=[];for(e=e+"",t=t+"";(r=Ou.exec(e))&&(s=kc.exec(t));)(o=s.index)>n&&(o=t.slice(n,o),l[i]?l[i]+=o:l[++i]=o),(r=r[0])===(s=s[0])?l[i]?l[i]+=s:l[++i]=s:(l[++i]=null,c.push({i,x:Kt(r,s)})),n=kc.lastIndex;return n<t.length&&(o=t.slice(n),l[i]?l[i]+=o:l[++i]=o),l.length<2?c[0]?g_(c[0].x):p_(t):(t=c.length,function(u){for(var h=0,d;h<t;++h)l[(d=c[h]).i]=d.x(u);return l.join("")})}function po(e,t){var n=typeof t,r;return t==null||n==="boolean"?pf(t):(n==="number"?Kt:n==="string"?(r=br(t))?(t=r,Va):cv:t instanceof br?Va:t instanceof Date?h_:d_(t)?u_:Array.isArray(t)?f_:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?m_:Kt)(e,t)}var Pm=180/Math.PI,Fu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function uv(e,t,n,r,s,o){var i,l,c;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),e*r<t*n&&(e=-e,t=-t,c=-c,i=-i),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*Pm,skewX:Math.atan(c)*Pm,scaleX:i,scaleY:l}}var Ai;function x_(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Fu:uv(t.a,t.b,t.c,t.d,t.e,t.f)}function y_(e){return e==null||(Ai||(Ai=document.createElementNS("http://www.w3.org/2000/svg","g")),Ai.setAttribute("transform",e),!(e=Ai.transform.baseVal.consolidate()))?Fu:(e=e.matrix,uv(e.a,e.b,e.c,e.d,e.e,e.f))}function dv(e,t,n,r){function s(u){return u.length?u.pop()+" ":""}function o(u,h,d,f,g,x){if(u!==d||h!==f){var v=g.push("translate(",null,t,null,n);x.push({i:v-4,x:Kt(u,d)},{i:v-2,x:Kt(h,f)})}else(d||f)&&g.push("translate("+d+t+f+n)}function i(u,h,d,f){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),f.push({i:d.push(s(d)+"rotate(",null,r)-2,x:Kt(u,h)})):h&&d.push(s(d)+"rotate("+h+r)}function l(u,h,d,f){u!==h?f.push({i:d.push(s(d)+"skewX(",null,r)-2,x:Kt(u,h)}):h&&d.push(s(d)+"skewX("+h+r)}function c(u,h,d,f,g,x){if(u!==d||h!==f){var v=g.push(s(g)+"scale(",null,",",null,")");x.push({i:v-4,x:Kt(u,d)},{i:v-2,x:Kt(h,f)})}else(d!==1||f!==1)&&g.push(s(g)+"scale("+d+","+f+")")}return function(u,h){var d=[],f=[];return u=e(u),h=e(h),o(u.translateX,u.translateY,h.translateX,h.translateY,d,f),i(u.rotate,h.rotate,d,f),l(u.skewX,h.skewX,d,f),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,d,f),u=h=null,function(g){for(var x=-1,v=f.length,N;++x<v;)d[(N=f[x]).i]=N.x(g);return d.join("")}}}var v_=dv(x_,"px, ","px)","deg)"),w_=dv(y_,", ",")",")"),N_=1e-12;function Mm(e){return((e=Math.exp(e))+1/e)/2}function j_(e){return((e=Math.exp(e))-1/e)/2}function b_(e){return((e=Math.exp(2*e))-1)/(e+1)}const aa=function e(t,n,r){function s(o,i){var l=o[0],c=o[1],u=o[2],h=i[0],d=i[1],f=i[2],g=h-l,x=d-c,v=g*g+x*x,N,p;if(v<N_)p=Math.log(f/u)/t,N=function(C){return[l+C*g,c+C*x,u*Math.exp(t*C*p)]};else{var w=Math.sqrt(v),y=(f*f-u*u+r*v)/(2*u*n*w),j=(f*f-u*u-r*v)/(2*f*n*w),b=Math.log(Math.sqrt(y*y+1)-y),E=Math.log(Math.sqrt(j*j+1)-j);p=(E-b)/t,N=function(C){var M=C*p,R=Mm(b),O=u/(n*w)*(R*b_(t*M+b)-j_(b));return[l+O*g,c+O*x,u*R/Mm(t*M+b)]}}return N.duration=p*1e3*t/Math.SQRT2,N}return s.rho=function(o){var i=Math.max(.001,+o),l=i*i,c=l*l;return e(i,l,c)},s}(Math.SQRT2,2,4);var ws=0,no=0,Qs=0,fv=1e3,Ua,ro,Wa=0,Sr=0,kl=0,Oo=typeof performance=="object"&&performance.now?performance:Date,hv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function gf(){return Sr||(hv(S_),Sr=Oo.now()+kl)}function S_(){Sr=0}function Ka(){this._call=this._time=this._next=null}Ka.prototype=mv.prototype={constructor:Ka,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?gf():+n)+(t==null?0:+t),!this._next&&ro!==this&&(ro?ro._next=this:Ua=this,ro=this),this._call=e,this._time=n,Hu()},stop:function(){this._call&&(this._call=null,this._time=1/0,Hu())}};function mv(e,t,n){var r=new Ka;return r.restart(e,t,n),r}function k_(){gf(),++ws;for(var e=Ua,t;e;)(t=Sr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ws}function Im(){Sr=(Wa=Oo.now())+kl,ws=no=0;try{k_()}finally{ws=0,E_(),Sr=0}}function C_(){var e=Oo.now(),t=e-Wa;t>fv&&(kl-=t,Wa=e)}function E_(){for(var e,t=Ua,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ua=n);ro=e,Hu(r)}function Hu(e){if(!ws){no&&(no=clearTimeout(no));var t=e-Sr;t>24?(e<1/0&&(no=setTimeout(Im,e-Oo.now()-kl)),Qs&&(Qs=clearInterval(Qs))):(Qs||(Wa=Oo.now(),Qs=setInterval(C_,fv)),ws=1,hv(Im))}}function Rm(e,t,n){var r=new Ka;return t=t==null?0:+t,r.restart(s=>{r.stop(),e(s+t)},t,n),r}var __=bl("start","end","cancel","interrupt"),P_=[],pv=0,Tm=1,Bu=2,la=3,Lm=4,Vu=5,ca=6;function Cl(e,t,n,r,s,o){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;M_(e,n,{name:t,index:r,group:s,on:__,tween:P_,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:pv})}function xf(e,t){var n=Bt(e,t);if(n.state>pv)throw new Error("too late; already scheduled");return n}function nn(e,t){var n=Bt(e,t);if(n.state>la)throw new Error("too late; already running");return n}function Bt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function M_(e,t,n){var r=e.__transition,s;r[t]=n,n.timer=mv(o,0,n.time);function o(u){n.state=Tm,n.timer.restart(i,n.delay,n.time),n.delay<=u&&i(u-n.delay)}function i(u){var h,d,f,g;if(n.state!==Tm)return c();for(h in r)if(g=r[h],g.name===n.name){if(g.state===la)return Rm(i);g.state===Lm?(g.state=ca,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[h]):+h<t&&(g.state=ca,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[h])}if(Rm(function(){n.state===la&&(n.state=Lm,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Bu,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Bu){for(n.state=la,s=new Array(f=n.tween.length),h=0,d=-1;h<f;++h)(g=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(s[++d]=g);s.length=d+1}}function l(u){for(var h=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Vu,1),d=-1,f=s.length;++d<f;)s[d].call(e,h);n.state===Vu&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=ca,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function ua(e,t){var n=e.__transition,r,s,o=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((r=n[i]).name!==t){o=!1;continue}s=r.state>Bu&&r.state<Vu,r.state=ca,r.timer.stop(),r.on.call(s?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[i]}o&&delete e.__transition}}function I_(e){return this.each(function(){ua(this,e)})}function R_(e,t){var n,r;return function(){var s=nn(this,e),o=s.tween;if(o!==n){r=n=o;for(var i=0,l=r.length;i<l;++i)if(r[i].name===t){r=r.slice(),r.splice(i,1);break}}s.tween=r}}function T_(e,t,n){var r,s;if(typeof n!="function")throw new Error;return function(){var o=nn(this,e),i=o.tween;if(i!==r){s=(r=i).slice();for(var l={name:t,value:n},c=0,u=s.length;c<u;++c)if(s[c].name===t){s[c]=l;break}c===u&&s.push(l)}o.tween=s}}function L_(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Bt(this.node(),n).tween,s=0,o=r.length,i;s<o;++s)if((i=r[s]).name===e)return i.value;return null}return this.each((t==null?R_:T_)(n,e,t))}function yf(e,t,n){var r=e._id;return e.each(function(){var s=nn(this,r);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return Bt(s,r).value[t]}}function gv(e,t){var n;return(typeof t=="number"?Kt:t instanceof br?Va:(n=br(t))?(t=n,Va):cv)(e,t)}function A_(e){return function(){this.removeAttribute(e)}}function z_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function D_(e,t,n){var r,s=n+"",o;return function(){var i=this.getAttribute(e);return i===s?null:i===r?o:o=t(r=i,n)}}function $_(e,t,n){var r,s=n+"",o;return function(){var i=this.getAttributeNS(e.space,e.local);return i===s?null:i===r?o:o=t(r=i,n)}}function O_(e,t,n){var r,s,o;return function(){var i,l=n(this),c;return l==null?void this.removeAttribute(e):(i=this.getAttribute(e),c=l+"",i===c?null:i===r&&c===s?o:(s=c,o=t(r=i,l)))}}function F_(e,t,n){var r,s,o;return function(){var i,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),c=l+"",i===c?null:i===r&&c===s?o:(s=c,o=t(r=i,l)))}}function H_(e,t){var n=Sl(e),r=n==="transform"?w_:gv;return this.attrTween(e,typeof t=="function"?(n.local?F_:O_)(n,r,yf(this,"attr."+e,t)):t==null?(n.local?z_:A_)(n):(n.local?$_:D_)(n,r,t))}function B_(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function V_(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function U_(e,t){var n,r;function s(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&V_(e,o)),n}return s._value=t,s}function W_(e,t){var n,r;function s(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&B_(e,o)),n}return s._value=t,s}function K_(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Sl(e);return this.tween(n,(r.local?U_:W_)(r,t))}function G_(e,t){return function(){xf(this,e).delay=+t.apply(this,arguments)}}function Y_(e,t){return t=+t,function(){xf(this,e).delay=t}}function X_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?G_:Y_)(t,e)):Bt(this.node(),t).delay}function Q_(e,t){return function(){nn(this,e).duration=+t.apply(this,arguments)}}function q_(e,t){return t=+t,function(){nn(this,e).duration=t}}function Z_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Q_:q_)(t,e)):Bt(this.node(),t).duration}function J_(e,t){if(typeof t!="function")throw new Error;return function(){nn(this,e).ease=t}}function e3(e){var t=this._id;return arguments.length?this.each(J_(t,e)):Bt(this.node(),t).ease}function t3(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;nn(this,e).ease=n}}function n3(e){if(typeof e!="function")throw new Error;return this.each(t3(this._id,e))}function r3(e){typeof e!="function"&&(e=Gy(e));for(var t=this._groups,n=t.length,r=new Array(n),s=0;s<n;++s)for(var o=t[s],i=o.length,l=r[s]=[],c,u=0;u<i;++u)(c=o[u])&&e.call(c,c.__data__,u,o)&&l.push(c);return new yn(r,this._parents,this._name,this._id)}function s3(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,s=n.length,o=Math.min(r,s),i=new Array(r),l=0;l<o;++l)for(var c=t[l],u=n[l],h=c.length,d=i[l]=new Array(h),f,g=0;g<h;++g)(f=c[g]||u[g])&&(d[g]=f);for(;l<r;++l)i[l]=t[l];return new yn(i,this._parents,this._name,this._id)}function o3(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function i3(e,t,n){var r,s,o=o3(t)?xf:nn;return function(){var i=o(this,e),l=i.on;l!==r&&(s=(r=l).copy()).on(t,n),i.on=s}}function a3(e,t){var n=this._id;return arguments.length<2?Bt(this.node(),n).on.on(e):this.each(i3(n,e,t))}function l3(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function c3(){return this.on("end.remove",l3(this._id))}function u3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ff(e));for(var r=this._groups,s=r.length,o=new Array(s),i=0;i<s;++i)for(var l=r[i],c=l.length,u=o[i]=new Array(c),h,d,f=0;f<c;++f)(h=l[f])&&(d=e.call(h,h.__data__,f,l))&&("__data__"in h&&(d.__data__=h.__data__),u[f]=d,Cl(u[f],t,n,f,u,Bt(h,n)));return new yn(o,this._parents,t,n)}function d3(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ky(e));for(var r=this._groups,s=r.length,o=[],i=[],l=0;l<s;++l)for(var c=r[l],u=c.length,h,d=0;d<u;++d)if(h=c[d]){for(var f=e.call(h,h.__data__,d,c),g,x=Bt(h,n),v=0,N=f.length;v<N;++v)(g=f[v])&&Cl(g,t,n,v,f,x);o.push(f),i.push(h)}return new yn(o,i,t,n)}var f3=ei.prototype.constructor;function h3(){return new f3(this._groups,this._parents)}function m3(e,t){var n,r,s;return function(){var o=vs(this,e),i=(this.style.removeProperty(e),vs(this,e));return o===i?null:o===n&&i===r?s:s=t(n=o,r=i)}}function xv(e){return function(){this.style.removeProperty(e)}}function p3(e,t,n){var r,s=n+"",o;return function(){var i=vs(this,e);return i===s?null:i===r?o:o=t(r=i,n)}}function g3(e,t,n){var r,s,o;return function(){var i=vs(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),vs(this,e))),i===c?null:i===r&&c===s?o:(s=c,o=t(r=i,l))}}function x3(e,t){var n,r,s,o="style."+t,i="end."+o,l;return function(){var c=nn(this,e),u=c.on,h=c.value[o]==null?l||(l=xv(t)):void 0;(u!==n||s!==h)&&(r=(n=u).copy()).on(i,s=h),c.on=r}}function y3(e,t,n){var r=(e+="")=="transform"?v_:gv;return t==null?this.styleTween(e,m3(e,r)).on("end.style."+e,xv(e)):typeof t=="function"?this.styleTween(e,g3(e,r,yf(this,"style."+e,t))).each(x3(this._id,e)):this.styleTween(e,p3(e,r,t),n).on("end.style."+e,null)}function v3(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function w3(e,t,n){var r,s;function o(){var i=t.apply(this,arguments);return i!==s&&(r=(s=i)&&v3(e,i,n)),r}return o._value=t,o}function N3(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,w3(e,t,n??""))}function j3(e){return function(){this.textContent=e}}function b3(e){return function(){var t=e(this);this.textContent=t??""}}function S3(e){return this.tween("text",typeof e=="function"?b3(yf(this,"text",e)):j3(e==null?"":e+""))}function k3(e){return function(t){this.textContent=e.call(this,t)}}function C3(e){var t,n;function r(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&k3(s)),t}return r._value=e,r}function E3(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,C3(e))}function _3(){for(var e=this._name,t=this._id,n=yv(),r=this._groups,s=r.length,o=0;o<s;++o)for(var i=r[o],l=i.length,c,u=0;u<l;++u)if(c=i[u]){var h=Bt(c,t);Cl(c,e,n,u,i,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new yn(r,this._parents,e,n)}function P3(){var e,t,n=this,r=n._id,s=n.size();return new Promise(function(o,i){var l={value:i},c={value:function(){--s===0&&o()}};n.each(function(){var u=nn(this,r),h=u.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),u.on=t}),s===0&&o()})}var M3=0;function yn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function yv(){return++M3}var on=ei.prototype;yn.prototype={constructor:yn,select:u3,selectAll:d3,selectChild:on.selectChild,selectChildren:on.selectChildren,filter:r3,merge:s3,selection:h3,transition:_3,call:on.call,nodes:on.nodes,node:on.node,size:on.size,empty:on.empty,each:on.each,on:a3,attr:H_,attrTween:K_,style:y3,styleTween:N3,text:S3,textTween:E3,remove:c3,tween:L_,delay:X_,duration:Z_,ease:e3,easeVarying:n3,end:P3,[Symbol.iterator]:on[Symbol.iterator]};function I3(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var R3={time:null,delay:0,duration:250,ease:I3};function T3(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function L3(e){var t,n;e instanceof yn?(t=e._id,e=e._name):(t=yv(),(n=R3).time=gf(),e=e==null?null:e+"");for(var r=this._groups,s=r.length,o=0;o<s;++o)for(var i=r[o],l=i.length,c,u=0;u<l;++u)(c=i[u])&&Cl(c,e,t,u,i,n||T3(c,t));return new yn(r,this._parents,e,t)}ei.prototype.interrupt=I_;ei.prototype.transition=L3;const zi=e=>()=>e;function A3(e,{sourceEvent:t,target:n,transform:r,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function dn(e,t,n){this.k=e,this.x=t,this.y=n}dn.prototype={constructor:dn,scale:function(e){return e===1?this:new dn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new dn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var El=new dn(1,0,0);vv.prototype=dn.prototype;function vv(e){for(;!e.__zoom;)if(!(e=e.parentNode))return El;return e.__zoom}function Cc(e){e.stopImmediatePropagation()}function qs(e){e.preventDefault(),e.stopImmediatePropagation()}function z3(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function D3(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Am(){return this.__zoom||El}function $3(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function O3(){return navigator.maxTouchPoints||"ontouchstart"in this}function F3(e,t,n){var r=e.invertX(t[0][0])-n[0][0],s=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i))}function wv(){var e=z3,t=D3,n=F3,r=$3,s=O3,o=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],l=250,c=aa,u=bl("start","zoom","end"),h,d,f,g=500,x=150,v=0,N=10;function p(_){_.property("__zoom",Am).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",O).filter(s).on("touchstart.zoom",T).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",$).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(_,z,k,D){var P=_.selection?_.selection():_;P.property("__zoom",Am),_!==P?b(_,z,k,D):P.interrupt().each(function(){E(this,arguments).event(D).start().zoom(null,typeof z=="function"?z.apply(this,arguments):z).end()})},p.scaleBy=function(_,z,k,D){p.scaleTo(_,function(){var P=this.__zoom.k,S=typeof z=="function"?z.apply(this,arguments):z;return P*S},k,D)},p.scaleTo=function(_,z,k,D){p.transform(_,function(){var P=t.apply(this,arguments),S=this.__zoom,I=k==null?j(P):typeof k=="function"?k.apply(this,arguments):k,A=S.invert(I),F=typeof z=="function"?z.apply(this,arguments):z;return n(y(w(S,F),I,A),P,i)},k,D)},p.translateBy=function(_,z,k,D){p.transform(_,function(){return n(this.__zoom.translate(typeof z=="function"?z.apply(this,arguments):z,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),i)},null,D)},p.translateTo=function(_,z,k,D,P){p.transform(_,function(){var S=t.apply(this,arguments),I=this.__zoom,A=D==null?j(S):typeof D=="function"?D.apply(this,arguments):D;return n(El.translate(A[0],A[1]).scale(I.k).translate(typeof z=="function"?-z.apply(this,arguments):-z,typeof k=="function"?-k.apply(this,arguments):-k),S,i)},D,P)};function w(_,z){return z=Math.max(o[0],Math.min(o[1],z)),z===_.k?_:new dn(z,_.x,_.y)}function y(_,z,k){var D=z[0]-k[0]*_.k,P=z[1]-k[1]*_.k;return D===_.x&&P===_.y?_:new dn(_.k,D,P)}function j(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function b(_,z,k,D){_.on("start.zoom",function(){E(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(D).end()}).tween("zoom",function(){var P=this,S=arguments,I=E(P,S).event(D),A=t.apply(P,S),F=k==null?j(A):typeof k=="function"?k.apply(P,S):k,B=Math.max(A[1][0]-A[0][0],A[1][1]-A[0][1]),V=P.__zoom,G=typeof z=="function"?z.apply(P,S):z,Y=c(V.invert(F).concat(B/V.k),G.invert(F).concat(B/G.k));return function(X){if(X===1)X=G;else{var U=Y(X),Z=B/U[2];X=new dn(Z,F[0]-U[0]*Z,F[1]-U[1]*Z)}I.zoom(null,X)}})}function E(_,z,k){return!k&&_.__zooming||new C(_,z)}function C(_,z){this.that=_,this.args=z,this.active=0,this.sourceEvent=null,this.extent=t.apply(_,z),this.taps=0}C.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,z){return this.mouse&&_!=="mouse"&&(this.mouse[1]=z.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=z.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=z.invert(this.touch1[0])),this.that.__zoom=z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var z=dt(this.that).datum();u.call(_,this.that,new A3(_,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:u}),z)}};function M(_,...z){if(!e.apply(this,arguments))return;var k=E(this,z).event(_),D=this.__zoom,P=Math.max(o[0],Math.min(o[1],D.k*Math.pow(2,r.apply(this,arguments)))),S=It(_);if(k.wheel)(k.mouse[0][0]!==S[0]||k.mouse[0][1]!==S[1])&&(k.mouse[1]=D.invert(k.mouse[0]=S)),clearTimeout(k.wheel);else{if(D.k===P)return;k.mouse=[S,D.invert(S)],ua(this),k.start()}qs(_),k.wheel=setTimeout(I,x),k.zoom("mouse",n(y(w(D,P),k.mouse[0],k.mouse[1]),k.extent,i));function I(){k.wheel=null,k.end()}}function R(_,...z){if(f||!e.apply(this,arguments))return;var k=_.currentTarget,D=E(this,z,!0).event(_),P=dt(_.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",B,!0),S=It(_,k),I=_.clientX,A=_.clientY;rv(_.view),Cc(_),D.mouse=[S,this.__zoom.invert(S)],ua(this),D.start();function F(V){if(qs(V),!D.moved){var G=V.clientX-I,Y=V.clientY-A;D.moved=G*G+Y*Y>v}D.event(V).zoom("mouse",n(y(D.that.__zoom,D.mouse[0]=It(V,k),D.mouse[1]),D.extent,i))}function B(V){P.on("mousemove.zoom mouseup.zoom",null),sv(V.view,D.moved),qs(V),D.event(V).end()}}function O(_,...z){if(e.apply(this,arguments)){var k=this.__zoom,D=It(_.changedTouches?_.changedTouches[0]:_,this),P=k.invert(D),S=k.k*(_.shiftKey?.5:2),I=n(y(w(k,S),D,P),t.apply(this,z),i);qs(_),l>0?dt(this).transition().duration(l).call(b,I,D,_):dt(this).call(p.transform,I,D,_)}}function T(_,...z){if(e.apply(this,arguments)){var k=_.touches,D=k.length,P=E(this,z,_.changedTouches.length===D).event(_),S,I,A,F;for(Cc(_),I=0;I<D;++I)A=k[I],F=It(A,this),F=[F,this.__zoom.invert(F),A.identifier],P.touch0?!P.touch1&&P.touch0[2]!==F[2]&&(P.touch1=F,P.taps=0):(P.touch0=F,S=!0,P.taps=1+!!h);h&&(h=clearTimeout(h)),S&&(P.taps<2&&(d=F[0],h=setTimeout(function(){h=null},g)),ua(this),P.start())}}function L(_,...z){if(this.__zooming){var k=E(this,z).event(_),D=_.changedTouches,P=D.length,S,I,A,F;for(qs(_),S=0;S<P;++S)I=D[S],A=It(I,this),k.touch0&&k.touch0[2]===I.identifier?k.touch0[0]=A:k.touch1&&k.touch1[2]===I.identifier&&(k.touch1[0]=A);if(I=k.that.__zoom,k.touch1){var B=k.touch0[0],V=k.touch0[1],G=k.touch1[0],Y=k.touch1[1],X=(X=G[0]-B[0])*X+(X=G[1]-B[1])*X,U=(U=Y[0]-V[0])*U+(U=Y[1]-V[1])*U;I=w(I,Math.sqrt(X/U)),A=[(B[0]+G[0])/2,(B[1]+G[1])/2],F=[(V[0]+Y[0])/2,(V[1]+Y[1])/2]}else if(k.touch0)A=k.touch0[0],F=k.touch0[1];else return;k.zoom("touch",n(y(I,A,F),k.extent,i))}}function $(_,...z){if(this.__zooming){var k=E(this,z).event(_),D=_.changedTouches,P=D.length,S,I;for(Cc(_),f&&clearTimeout(f),f=setTimeout(function(){f=null},g),S=0;S<P;++S)I=D[S],k.touch0&&k.touch0[2]===I.identifier?delete k.touch0:k.touch1&&k.touch1[2]===I.identifier&&delete k.touch1;if(k.touch1&&!k.touch0&&(k.touch0=k.touch1,delete k.touch1),k.touch0)k.touch0[1]=this.__zoom.invert(k.touch0[0]);else if(k.end(),k.taps===2&&(I=It(I,this),Math.hypot(d[0]-I[0],d[1]-I[1])<N)){var A=dt(this).on("dblclick.zoom");A&&A.apply(this,arguments)}}}return p.wheelDelta=function(_){return arguments.length?(r=typeof _=="function"?_:zi(+_),p):r},p.filter=function(_){return arguments.length?(e=typeof _=="function"?_:zi(!!_),p):e},p.touchable=function(_){return arguments.length?(s=typeof _=="function"?_:zi(!!_),p):s},p.extent=function(_){return arguments.length?(t=typeof _=="function"?_:zi([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),p):t},p.scaleExtent=function(_){return arguments.length?(o[0]=+_[0],o[1]=+_[1],p):[o[0],o[1]]},p.translateExtent=function(_){return arguments.length?(i[0][0]=+_[0][0],i[1][0]=+_[1][0],i[0][1]=+_[0][1],i[1][1]=+_[1][1],p):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},p.constrain=function(_){return arguments.length?(n=_,p):n},p.duration=function(_){return arguments.length?(l=+_,p):l},p.interpolate=function(_){return arguments.length?(c=_,p):c},p.on=function(){var _=u.on.apply(u,arguments);return _===u?p:_},p.clickDistance=function(_){return arguments.length?(v=(_=+_)*_,p):Math.sqrt(v)},p.tapDistance=function(_){return arguments.length?(N=+_,p):N},p}const en={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:e=>`Node type "${e}" 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/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."},Fo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Nv=["Enter"," ","Escape"],jv={"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:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"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 Ns;(function(e){e.Strict="strict",e.Loose="loose"})(Ns||(Ns={}));var pr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(pr||(pr={}));var Ho;(function(e){e.Partial="partial",e.Full="full"})(Ho||(Ho={}));const bv={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Rn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Rn||(Rn={}));var Ga;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ga||(Ga={}));var Q;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Q||(Q={}));const zm={[Q.Left]:Q.Right,[Q.Right]:Q.Left,[Q.Top]:Q.Bottom,[Q.Bottom]:Q.Top};function Sv(e){return e===null?null:e?"valid":"invalid"}const kv=e=>"id"in e&&"source"in e&&"target"in e,H3=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),vf=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),ni=(e,t=[0,0])=>{const{width:n,height:r}=wn(e),s=e.origin??t,o=n*s[0],i=r*s[1];return{x:e.position.x-o,y:e.position.y-i}},B3=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,s)=>{const o=typeof s=="string";let i=!t.nodeLookup&&!o?s:void 0;t.nodeLookup&&(i=o?t.nodeLookup.get(s):vf(s)?s:t.nodeLookup.get(s.id));const l=i?Ya(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return _l(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Pl(n)},ri=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(s=>{(t.filter===void 0||t.filter(s))&&(n=_l(n,Ya(s)),r=!0)}),r?Pl(n):{x:0,y:0,width:0,height:0}},wf=(e,t,[n,r,s]=[0,0,1],o=!1,i=!1)=>{const l={...oi(t,[n,r,s]),width:t.width/s,height:t.height/s},c=[];for(const u of e.values()){const{measured:h,selectable:d=!0,hidden:f=!1}=u;if(i&&!d||f)continue;const g=h.width??u.width??u.initialWidth??null,x=h.height??u.height??u.initialHeight??null,v=Bo(l,bs(u)),N=(g??0)*(x??0),p=o&&v>0;(!u.internals.handleBounds||p||v>=N||u.dragging)&&c.push(u)}return c},V3=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function U3(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!s.hidden)&&(!r||r.has(s.id))&&n.set(s.id,s)}),n}async function W3({nodes:e,width:t,height:n,panZoom:r,minZoom:s,maxZoom:o},i){if(e.size===0)return Promise.resolve(!0);const l=U3(e,i),c=ri(l),u=Nf(c,t,n,(i==null?void 0:i.minZoom)??s,(i==null?void 0:i.maxZoom)??o,(i==null?void 0:i.padding)??.1);return await r.setViewport(u,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),Promise.resolve(!0)}function Cv({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:s,onError:o}){const i=n.get(e),l=i.parentId?n.get(i.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},h=i.origin??r;let d=i.extent||s;if(i.extent==="parent"&&!i.expandParent)if(!l)o==null||o("005",en.error005());else{const g=l.measured.width,x=l.measured.height;g&&x&&(d=[[c,u],[c+g,u+x]])}else l&&Ss(i.extent)&&(d=[[i.extent[0][0]+c,i.extent[0][1]+u],[i.extent[1][0]+c,i.extent[1][1]+u]]);const f=Ss(d)?kr(t,d,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&(o==null||o("015",en.error015())),{position:{x:f.x-c+(i.measured.width??0)*h[0],y:f.y-u+(i.measured.height??0)*h[1]},positionAbsolute:f}}async function K3({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:s}){const o=new Set(e.map(f=>f.id)),i=[];for(const f of n){if(f.deletable===!1)continue;const g=o.has(f.id),x=!g&&f.parentId&&i.find(v=>v.id===f.parentId);(g||x)&&i.push(f)}const l=new Set(t.map(f=>f.id)),c=r.filter(f=>f.deletable!==!1),h=V3(i,c);for(const f of c)l.has(f.id)&&!h.find(x=>x.id===f.id)&&h.push(f);if(!s)return{edges:h,nodes:i};const d=await s({nodes:i,edges:h});return typeof d=="boolean"?d?{edges:h,nodes:i}:{edges:[],nodes:[]}:d}const js=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),kr=(e={x:0,y:0},t,n)=>({x:js(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:js(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Ev(e,t,n){const{width:r,height:s}=wn(n),{x:o,y:i}=n.internals.positionAbsolute;return kr(e,[[o,i],[o+r,i+s]],t)}const Dm=(e,t,n)=>e<t?js(Math.abs(e-t),1,t)/t:e>n?-js(Math.abs(e-n),1,t)/t:0,_v=(e,t,n=15,r=40)=>{const s=Dm(e.x,r,t.width-r)*n,o=Dm(e.y,r,t.height-r)*n;return[s,o]},_l=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Uu=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Pl=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),bs=(e,t=[0,0])=>{var s,o;const{x:n,y:r}=vf(e)?e.internals.positionAbsolute:ni(e,t);return{x:n,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},Ya=(e,t=[0,0])=>{var s,o;const{x:n,y:r}=vf(e)?e.internals.positionAbsolute:ni(e,t);return{x:n,y:r,x2:n+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},Pv=(e,t)=>Pl(_l(Uu(e),Uu(t))),Bo=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},$m=e=>Lt(e.width)&&Lt(e.height)&&Lt(e.x)&&Lt(e.y),Lt=e=>!isNaN(e)&&isFinite(e),G3=(e,t)=>{},si=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),oi=({x:e,y:t},[n,r,s],o=!1,i=[1,1])=>{const l={x:(e-n)/s,y:(t-r)/s};return o?si(l,i):l},Xa=({x:e,y:t},[n,r,s])=>({x:e*s+n,y:t*s+r});function Or(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Y3(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Or(e,n),s=Or(e,t);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Or(e.top??e.y??0,n),s=Or(e.bottom??e.y??0,n),o=Or(e.left??e.x??0,t),i=Or(e.right??e.x??0,t);return{top:r,right:i,bottom:s,left:o,x:o+i,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function X3(e,t,n,r,s,o){const{x:i,y:l}=Xa(e,[t,n,r]),{x:c,y:u}=Xa({x:e.x+e.width,y:e.y+e.height},[t,n,r]),h=s-c,d=o-u;return{left:Math.floor(i),top:Math.floor(l),right:Math.floor(h),bottom:Math.floor(d)}}const Nf=(e,t,n,r,s,o)=>{const i=Y3(o,t,n),l=(t-i.x)/e.width,c=(n-i.y)/e.height,u=Math.min(l,c),h=js(u,r,s),d=e.x+e.width/2,f=e.y+e.height/2,g=t/2-d*h,x=n/2-f*h,v=X3(e,g,x,h,t,n),N={left:Math.min(v.left-i.left,0),top:Math.min(v.top-i.top,0),right:Math.min(v.right-i.right,0),bottom:Math.min(v.bottom-i.bottom,0)};return{x:g-N.left+N.right,y:x-N.top+N.bottom,zoom:h}},Vo=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ss(e){return e!=null&&e!=="parent"}function wn(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Mv(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Iv(e,t={width:0,height:0},n,r,s){const o={...e},i=r.get(n);if(i){const l=i.origin||s;o.x+=i.internals.positionAbsolute.x-(t.width??0)*l[0],o.y+=i.internals.positionAbsolute.y-(t.height??0)*l[1]}return o}function Om(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Q3(){let e,t;return{promise:new Promise((r,s)=>{e=r,t=s}),resolve:e,reject:t}}function q3(e){return{...jv,...e||{}}}function go(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:s}){const{x:o,y:i}=At(e),l=oi({x:o-((s==null?void 0:s.left)??0),y:i-((s==null?void 0:s.top)??0)},r),{x:c,y:u}=n?si(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const jf=e=>({width:e.offsetWidth,height:e.offsetHeight}),Rv=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Z3=["INPUT","SELECT","TEXTAREA"];function Tv(e){var r,s;const t=((s=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:s[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:Z3.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Lv=e=>"clientX"in e,At=(e,t)=>{var o,i;const n=Lv(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,s=n?e.clientY:(i=e.touches)==null?void 0:i[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:s-((t==null?void 0:t.top)??0)}},Fm=(e,t,n,r,s)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(i=>{const l=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:s,position:i.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...jf(i)}})};function Av({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:s,sourceControlY:o,targetControlX:i,targetControlY:l}){const c=e*.125+s*.375+i*.375+n*.125,u=t*.125+o*.375+l*.375+r*.125,h=Math.abs(c-e),d=Math.abs(u-t);return[c,u,h,d]}function Di(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Hm({pos:e,x1:t,y1:n,x2:r,y2:s,c:o}){switch(e){case Q.Left:return[t-Di(t-r,o),n];case Q.Right:return[t+Di(r-t,o),n];case Q.Top:return[t,n-Di(n-s,o)];case Q.Bottom:return[t,n+Di(s-n,o)]}}function zv({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:r,targetY:s,targetPosition:o=Q.Top,curvature:i=.25}){const[l,c]=Hm({pos:n,x1:e,y1:t,x2:r,y2:s,c:i}),[u,h]=Hm({pos:o,x1:r,y1:s,x2:e,y2:t,c:i}),[d,f,g,x]=Av({sourceX:e,sourceY:t,targetX:r,targetY:s,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:h});return[`M${e},${t} C${l},${c} ${u},${h} ${r},${s}`,d,f,g,x]}function Dv({sourceX:e,sourceY:t,targetX:n,targetY:r}){const s=Math.abs(n-e)/2,o=n<e?n+s:n-s,i=Math.abs(r-t)/2,l=r<t?r+i:r-i;return[o,l,s,i]}function J3({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:s=!1,zIndexMode:o="basic"}){if(o==="manual")return r;const i=s&&n?r+1e3:r,l=Math.max(e.parentId||s&&e.selected?e.internals.z:0,t.parentId||s&&t.selected?t.internals.z:0);return i+l}function e4({sourceNode:e,targetNode:t,width:n,height:r,transform:s}){const o=_l(Ya(e),Ya(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const i={x:-s[0]/s[2],y:-s[1]/s[2],width:n/s[2],height:r/s[2]};return Bo(i,Pl(o))>0}const t4=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,n4=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),r4=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||t4;let s;return kv(e)?s={...e}:s={...e,id:r(e)},n4(s,t)?t:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,t.concat(s))};function $v({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[s,o,i,l]=Dv({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,s,o,i,l]}const Bm={[Q.Left]:{x:-1,y:0},[Q.Right]:{x:1,y:0},[Q.Top]:{x:0,y:-1},[Q.Bottom]:{x:0,y:1}},s4=({source:e,sourcePosition:t=Q.Bottom,target:n})=>t===Q.Left||t===Q.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Vm=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function o4({source:e,sourcePosition:t=Q.Bottom,target:n,targetPosition:r=Q.Top,center:s,offset:o,stepPosition:i}){const l=Bm[t],c=Bm[r],u={x:e.x+l.x*o,y:e.y+l.y*o},h={x:n.x+c.x*o,y:n.y+c.y*o},d=s4({source:u,sourcePosition:t,target:h}),f=d.x!==0?"x":"y",g=d[f];let x=[],v,N;const p={x:0,y:0},w={x:0,y:0},[,,y,j]=Dv({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[f]*c[f]===-1){f==="x"?(v=s.x??u.x+(h.x-u.x)*i,N=s.y??(u.y+h.y)/2):(v=s.x??(u.x+h.x)/2,N=s.y??u.y+(h.y-u.y)*i);const E=[{x:v,y:u.y},{x:v,y:h.y}],C=[{x:u.x,y:N},{x:h.x,y:N}];l[f]===g?x=f==="x"?E:C:x=f==="x"?C:E}else{const E=[{x:u.x,y:h.y}],C=[{x:h.x,y:u.y}];if(f==="x"?x=l.x===g?C:E:x=l.y===g?E:C,t===r){const L=Math.abs(e[f]-n[f]);if(L<=o){const $=Math.min(o-1,o-L);l[f]===g?p[f]=(u[f]>e[f]?-1:1)*$:w[f]=(h[f]>n[f]?-1:1)*$}}if(t!==r){const L=f==="x"?"y":"x",$=l[f]===c[L],_=u[L]>h[L],z=u[L]<h[L];(l[f]===1&&(!$&&_||$&&z)||l[f]!==1&&(!$&&z||$&&_))&&(x=f==="x"?E:C)}const M={x:u.x+p.x,y:u.y+p.y},R={x:h.x+w.x,y:h.y+w.y},O=Math.max(Math.abs(M.x-x[0].x),Math.abs(R.x-x[0].x)),T=Math.max(Math.abs(M.y-x[0].y),Math.abs(R.y-x[0].y));O>=T?(v=(M.x+R.x)/2,N=x[0].y):(v=x[0].x,N=(M.y+R.y)/2)}return[[e,{x:u.x+p.x,y:u.y+p.y},...x,{x:h.x+w.x,y:h.y+w.y},n],v,N,y,j]}function i4(e,t,n,r){const s=Math.min(Vm(e,t)/2,Vm(t,n)/2,r),{x:o,y:i}=t;if(e.x===o&&o===n.x||e.y===i&&i===n.y)return`L${o} ${i}`;if(e.y===i){const u=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${o+s*u},${i}Q ${o},${i} ${o},${i+s*h}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${o},${i+s*c}Q ${o},${i} ${o+s*l},${i}`}function Wu({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:r,targetY:s,targetPosition:o=Q.Top,borderRadius:i=5,centerX:l,centerY:c,offset:u=20,stepPosition:h=.5}){const[d,f,g,x,v]=o4({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:s},targetPosition:o,center:{x:l,y:c},offset:u,stepPosition:h});return[d.reduce((p,w,y)=>{let j="";return y>0&&y<d.length-1?j=i4(d[y-1],w,d[y+1],i):j=`${y===0?"M":"L"}${w.x} ${w.y}`,p+=j,p},""),f,g,x,v]}function Um(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function a4(e){var d;const{sourceNode:t,targetNode:n}=e;if(!Um(t)||!Um(n))return null;const r=t.internals.handleBounds||Wm(t.handles),s=n.internals.handleBounds||Wm(n.handles),o=Km((r==null?void 0:r.source)??[],e.sourceHandle),i=Km(e.connectionMode===Ns.Strict?(s==null?void 0:s.target)??[]:((s==null?void 0:s.target)??[]).concat((s==null?void 0:s.source)??[]),e.targetHandle);if(!o||!i)return(d=e.onError)==null||d.call(e,"008",en.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(o==null?void 0:o.position)||Q.Bottom,c=(i==null?void 0:i.position)||Q.Top,u=Cr(t,o,l),h=Cr(n,i,c);return{sourceX:u.x,sourceY:u.y,targetX:h.x,targetY:h.y,sourcePosition:l,targetPosition:c}}function Wm(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function Cr(e,t,n=Q.Left,r=!1){const s=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:i,height:l}=t??wn(e);if(r)return{x:s+i/2,y:o+l/2};switch((t==null?void 0:t.position)??n){case Q.Top:return{x:s+i/2,y:o};case Q.Right:return{x:s+i,y:o+l/2};case Q.Bottom:return{x:s+i/2,y:o+l};case Q.Left:return{x:s,y:o+l/2}}}function Km(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Ku(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function l4(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:s}){const o=new Set;return e.reduce((i,l)=>([l.markerStart||r,l.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const u=Ku(c,t);o.has(u)||(i.push({id:u,color:c.color||n,...c}),o.add(u))}}),i),[]).sort((i,l)=>i.id.localeCompare(l.id))}const Ov=1e3,c4=10,bf={nodeOrigin:[0,0],nodeExtent:Fo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},u4={...bf,checkEquality:!0};function Sf(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function d4(e,t,n){const r=Sf(bf,n);for(const s of e.values())if(s.parentId)Cf(s,e,t,r);else{const o=ni(s,r.nodeOrigin),i=Ss(s.extent)?s.extent:r.nodeExtent,l=kr(o,i,wn(s));s.internals.positionAbsolute=l}}function f4(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const s of e.handles){const o={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?n.push(o):s.type==="target"&&r.push(o)}return{source:n,target:r}}function kf(e){return e==="manual"}function Gu(e,t,n,r={}){var u,h;const s=Sf(u4,r),o={i:0},i=new Map(t),l=s!=null&&s.elevateNodesOnSelect&&!kf(s.zIndexMode)?Ov:0;let c=e.length>0;t.clear(),n.clear();for(const d of e){let f=i.get(d.id);if(s.checkEquality&&d===(f==null?void 0:f.internals.userNode))t.set(d.id,f);else{const g=ni(d,s.nodeOrigin),x=Ss(d.extent)?d.extent:s.nodeExtent,v=kr(g,x,wn(d));f={...s.defaults,...d,measured:{width:(u=d.measured)==null?void 0:u.width,height:(h=d.measured)==null?void 0:h.height},internals:{positionAbsolute:v,handleBounds:f4(d,f),z:Fv(d,l,s.zIndexMode),userNode:d}},t.set(d.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(c=!1),d.parentId&&Cf(f,t,n,r,o)}return c}function h4(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Cf(e,t,n,r,s){const{elevateNodesOnSelect:o,nodeOrigin:i,nodeExtent:l,zIndexMode:c}=Sf(bf,r),u=e.parentId,h=t.get(u);if(!h){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}h4(e,n),s&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++s.i,h.internals.z=h.internals.z+s.i*c4),s&&h.internals.rootParentIndex!==void 0&&(s.i=h.internals.rootParentIndex);const d=o&&!kf(c)?Ov:0,{x:f,y:g,z:x}=m4(e,h,i,l,d,c),{positionAbsolute:v}=e.internals,N=f!==v.x||g!==v.y;(N||x!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:N?{x:f,y:g}:v,z:x}})}function Fv(e,t,n){const r=Lt(e.zIndex)?e.zIndex:0;return kf(n)?r:r+(e.selected?t:0)}function m4(e,t,n,r,s,o){const{x:i,y:l}=t.internals.positionAbsolute,c=wn(e),u=ni(e,n),h=Ss(e.extent)?kr(u,e.extent,c):u;let d=kr({x:i+h.x,y:l+h.y},r,c);e.extent==="parent"&&(d=Ev(d,c,t));const f=Fv(e,s,o),g=t.internals.z??0;return{x:d.x,y:d.y,z:g>=f?g+1:f}}function Ef(e,t,n,r=[0,0]){var i;const s=[],o=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const u=((i=o.get(l.parentId))==null?void 0:i.expandedRect)??bs(c),h=Pv(u,l.rect);o.set(l.parentId,{expandedRect:h,parent:c})}return o.size>0&&o.forEach(({expandedRect:l,parent:c},u)=>{var y;const h=c.internals.positionAbsolute,d=wn(c),f=c.origin??r,g=l.x<h.x?Math.round(Math.abs(h.x-l.x)):0,x=l.y<h.y?Math.round(Math.abs(h.y-l.y)):0,v=Math.max(d.width,Math.round(l.width)),N=Math.max(d.height,Math.round(l.height)),p=(v-d.width)*f[0],w=(N-d.height)*f[1];(g>0||x>0||p||w)&&(s.push({id:u,type:"position",position:{x:c.position.x-g+p,y:c.position.y-x+w}}),(y=n.get(u))==null||y.forEach(j=>{e.some(b=>b.id===j.id)||s.push({id:j.id,type:"position",position:{x:j.position.x+g,y:j.position.y+x}})})),(d.width<l.width||d.height<l.height||g||x)&&s.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:v+(g?f[0]*g-p:0),height:N+(x?f[1]*x-w:0)}})}),s}function p4(e,t,n,r,s,o,i){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const u=[],h=window.getComputedStyle(l),{m22:d}=new window.DOMMatrixReadOnly(h.transform),f=[];for(const g of e.values()){const x=t.get(g.id);if(!x)continue;if(x.hidden){t.set(x.id,{...x,internals:{...x.internals,handleBounds:void 0}}),c=!0;continue}const v=jf(g.nodeElement),N=x.measured.width!==v.width||x.measured.height!==v.height;if(!!(v.width&&v.height&&(N||!x.internals.handleBounds||g.force))){const w=g.nodeElement.getBoundingClientRect(),y=Ss(x.extent)?x.extent:o;let{positionAbsolute:j}=x.internals;x.parentId&&x.extent==="parent"?j=Ev(j,v,t.get(x.parentId)):y&&(j=kr(j,y,v));const b={...x,measured:v,internals:{...x.internals,positionAbsolute:j,handleBounds:{source:Fm("source",g.nodeElement,w,d,x.id),target:Fm("target",g.nodeElement,w,d,x.id)}}};t.set(x.id,b),x.parentId&&Cf(b,t,n,{nodeOrigin:s,zIndexMode:i}),c=!0,N&&(u.push({id:x.id,type:"dimensions",dimensions:v}),x.expandParent&&x.parentId&&f.push({id:x.id,parentId:x.parentId,rect:bs(b,s)}))}}if(f.length>0){const g=Ef(f,t,n,s);u.push(...g)}return{changes:u,updatedInternals:c}}async function g4({delta:e,panZoom:t,transform:n,translateExtent:r,width:s,height:o}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[s,o]],r),l=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(l)}function Gm(e,t,n,r,s,o){let i=s;const l=r.get(i)||new Map;r.set(i,l.set(n,t)),i=`${s}-${e}`;const c=r.get(i)||new Map;if(r.set(i,c.set(n,t)),o){i=`${s}-${e}-${o}`;const u=r.get(i)||new Map;r.set(i,u.set(n,t))}}function Hv(e,t,n){e.clear(),t.clear();for(const r of n){const{source:s,target:o,sourceHandle:i=null,targetHandle:l=null}=r,c={edgeId:r.id,source:s,target:o,sourceHandle:i,targetHandle:l},u=`${s}-${i}--${o}-${l}`,h=`${o}-${l}--${s}-${i}`;Gm("source",c,h,e,s,i),Gm("target",c,u,e,o,l),t.set(r.id,r)}}function Bv(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Bv(n,t):!1}function Ym(e,t,n){var s;let r=e;do{if((s=r==null?void 0:r.matches)!=null&&s.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function x4(e,t,n,r){const s=new Map;for(const[o,i]of e)if((i.selected||i.id===r)&&(!i.parentId||!Bv(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){const l=e.get(o);l&&s.set(o,{id:o,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return s}function Ec({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var i,l,c;const s=[];for(const[u,h]of t){const d=(i=n.get(u))==null?void 0:i.internals.userNode;d&&s.push({...d,position:h.position,dragging:r})}if(!e)return[s[0],s];const o=(l=n.get(e))==null?void 0:l.internals.userNode;return[o?{...o,position:((c=t.get(e))==null?void 0:c.position)||o.position,dragging:r}:s[0],s]}function y4({dragItems:e,snapGrid:t,x:n,y:r}){const s=e.values().next().value;if(!s)return null;const o={x:n-s.distance.x,y:r-s.distance.y},i=si(o,t);return{x:i.x-o.x,y:i.y-o.y}}function v4({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:s}){let o={x:null,y:null},i=0,l=new Map,c=!1,u={x:0,y:0},h=null,d=!1,f=null,g=!1,x=!1,v=null;function N({noDragClassName:w,handleSelector:y,domNode:j,isSelectable:b,nodeId:E,nodeClickDistance:C=0}){f=dt(j);function M({x:L,y:$}){const{nodeLookup:_,nodeExtent:z,snapGrid:k,snapToGrid:D,nodeOrigin:P,onNodeDrag:S,onSelectionDrag:I,onError:A,updateNodePositions:F}=t();o={x:L,y:$};let B=!1;const V=l.size>1,G=V&&z?Uu(ri(l)):null,Y=V&&D?y4({dragItems:l,snapGrid:k,x:L,y:$}):null;for(const[X,U]of l){if(!_.has(X))continue;let Z={x:L-U.distance.x,y:$-U.distance.y};D&&(Z=Y?{x:Math.round(Z.x+Y.x),y:Math.round(Z.y+Y.y)}:si(Z,k));let se=null;if(V&&z&&!U.extent&&G){const{positionAbsolute:J}=U.internals,ue=J.x-G.x+z[0][0],xe=J.x+U.measured.width-G.x2+z[1][0],le=J.y-G.y+z[0][1],We=J.y+U.measured.height-G.y2+z[1][1];se=[[ue,le],[xe,We]]}const{position:ne,positionAbsolute:ee}=Cv({nodeId:X,nextPosition:Z,nodeLookup:_,nodeExtent:se||z,nodeOrigin:P,onError:A});B=B||U.position.x!==ne.x||U.position.y!==ne.y,U.position=ne,U.internals.positionAbsolute=ee}if(x=x||B,!!B&&(F(l,!0),v&&(r||S||!E&&I))){const[X,U]=Ec({nodeId:E,dragItems:l,nodeLookup:_});r==null||r(v,l,X,U),S==null||S(v,X,U),E||I==null||I(v,U)}}async function R(){if(!h)return;const{transform:L,panBy:$,autoPanSpeed:_,autoPanOnNodeDrag:z}=t();if(!z){c=!1,cancelAnimationFrame(i);return}const[k,D]=_v(u,h,_);(k!==0||D!==0)&&(o.x=(o.x??0)-k/L[2],o.y=(o.y??0)-D/L[2],await $({x:k,y:D})&&M(o)),i=requestAnimationFrame(R)}function O(L){var V;const{nodeLookup:$,multiSelectionActive:_,nodesDraggable:z,transform:k,snapGrid:D,snapToGrid:P,selectNodesOnDrag:S,onNodeDragStart:I,onSelectionDragStart:A,unselectNodesAndEdges:F}=t();d=!0,(!S||!b)&&!_&&E&&((V=$.get(E))!=null&&V.selected||F()),b&&S&&E&&(e==null||e(E));const B=go(L.sourceEvent,{transform:k,snapGrid:D,snapToGrid:P,containerBounds:h});if(o=B,l=x4($,z,B,E),l.size>0&&(n||I||!E&&A)){const[G,Y]=Ec({nodeId:E,dragItems:l,nodeLookup:$});n==null||n(L.sourceEvent,l,G,Y),I==null||I(L.sourceEvent,G,Y),E||A==null||A(L.sourceEvent,Y)}}const T=ov().clickDistance(C).on("start",L=>{const{domNode:$,nodeDragThreshold:_,transform:z,snapGrid:k,snapToGrid:D}=t();h=($==null?void 0:$.getBoundingClientRect())||null,g=!1,x=!1,v=L.sourceEvent,_===0&&O(L),o=go(L.sourceEvent,{transform:z,snapGrid:k,snapToGrid:D,containerBounds:h}),u=At(L.sourceEvent,h)}).on("drag",L=>{const{autoPanOnNodeDrag:$,transform:_,snapGrid:z,snapToGrid:k,nodeDragThreshold:D,nodeLookup:P}=t(),S=go(L.sourceEvent,{transform:_,snapGrid:z,snapToGrid:k,containerBounds:h});if(v=L.sourceEvent,(L.sourceEvent.type==="touchmove"&&L.sourceEvent.touches.length>1||E&&!P.has(E))&&(g=!0),!g){if(!c&&$&&d&&(c=!0,R()),!d){const I=At(L.sourceEvent,h),A=I.x-u.x,F=I.y-u.y;Math.sqrt(A*A+F*F)>D&&O(L)}(o.x!==S.xSnapped||o.y!==S.ySnapped)&&l&&d&&(u=At(L.sourceEvent,h),M(S))}}).on("end",L=>{if(!(!d||g)&&(c=!1,d=!1,cancelAnimationFrame(i),l.size>0)){const{nodeLookup:$,updateNodePositions:_,onNodeDragStop:z,onSelectionDragStop:k}=t();if(x&&(_(l,!1),x=!1),s||z||!E&&k){const[D,P]=Ec({nodeId:E,dragItems:l,nodeLookup:$,dragging:!1});s==null||s(L.sourceEvent,l,D,P),z==null||z(L.sourceEvent,D,P),E||k==null||k(L.sourceEvent,P)}}}).filter(L=>{const $=L.target;return!L.button&&(!w||!Ym($,`.${w}`,j))&&(!y||Ym($,y,j))});f.call(T)}function p(){f==null||f.on(".drag",null)}return{update:N,destroy:p}}function w4(e,t,n){const r=[],s={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())Bo(s,bs(o))>0&&r.push(o);return r}const N4=250;function j4(e,t,n,r){var l,c;let s=[],o=1/0;const i=w4(e,n,t+N4);for(const u of i){const h=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const d of h){if(r.nodeId===d.nodeId&&r.type===d.type&&r.id===d.id)continue;const{x:f,y:g}=Cr(u,d,d.position,!0),x=Math.sqrt(Math.pow(f-e.x,2)+Math.pow(g-e.y,2));x>t||(x<o?(s=[{...d,x:f,y:g}],o=x):x===o&&s.push({...d,x:f,y:g}))}}if(!s.length)return null;if(s.length>1){const u=r.type==="source"?"target":"source";return s.find(h=>h.type===u)??s[0]}return s[0]}function Vv(e,t,n,r,s,o=!1){var u,h,d;const i=r.get(e);if(!i)return null;const l=s==="strict"?(u=i.internals.handleBounds)==null?void 0:u[t]:[...((h=i.internals.handleBounds)==null?void 0:h.source)??[],...((d=i.internals.handleBounds)==null?void 0:d.target)??[]],c=(n?l==null?void 0:l.find(f=>f.id===n):l==null?void 0:l[0])??null;return c&&o?{...c,...Cr(i,c,c.position,!0)}:c}function Uv(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function b4(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Wv=()=>!0;function S4(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:s,edgeUpdaterType:o,isTarget:i,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:h,flowId:d,panBy:f,cancelConnection:g,onConnectStart:x,onConnect:v,onConnectEnd:N,isValidConnection:p=Wv,onReconnectEnd:w,updateConnection:y,getTransform:j,getFromHandle:b,autoPanSpeed:E,dragThreshold:C=1,handleDomNode:M}){const R=Rv(e.target);let O=0,T;const{x:L,y:$}=At(e),_=Uv(o,M),z=l==null?void 0:l.getBoundingClientRect();let k=!1;if(!z||!_)return;const D=Vv(s,_,r,c,t);if(!D)return;let P=At(e,z),S=!1,I=null,A=!1,F=null;function B(){if(!h||!z)return;const[ne,ee]=_v(P,z,E);f({x:ne,y:ee}),O=requestAnimationFrame(B)}const V={...D,nodeId:s,type:_,position:D.position},G=c.get(s);let X={inProgress:!0,isValid:null,from:Cr(G,V,Q.Left,!0),fromHandle:V,fromPosition:V.position,fromNode:G,to:P,toHandle:null,toPosition:zm[V.position],toNode:null,pointer:P};function U(){k=!0,y(X),x==null||x(e,{nodeId:s,handleId:r,handleType:_})}C===0&&U();function Z(ne){if(!k){const{x:We,y:Nn}=At(ne),rn=We-L,rr=Nn-$;if(!(rn*rn+rr*rr>C*C))return;U()}if(!b()||!V){se(ne);return}const ee=j();P=At(ne,z),T=j4(oi(P,ee,!1,[1,1]),n,c,V),S||(B(),S=!0);const J=Kv(ne,{handle:T,connectionMode:t,fromNodeId:s,fromHandleId:r,fromType:i?"target":"source",isValidConnection:p,doc:R,lib:u,flowId:d,nodeLookup:c});F=J.handleDomNode,I=J.connection,A=b4(!!T,J.isValid);const ue=c.get(s),xe=ue?Cr(ue,V,Q.Left,!0):X.from,le={...X,from:xe,isValid:A,to:J.toHandle&&A?Xa({x:J.toHandle.x,y:J.toHandle.y},ee):P,toHandle:J.toHandle,toPosition:A&&J.toHandle?J.toHandle.position:zm[V.position],toNode:J.toHandle?c.get(J.toHandle.nodeId):null,pointer:P};y(le),X=le}function se(ne){if(!("touches"in ne&&ne.touches.length>0)){if(k){(T||F)&&I&&A&&(v==null||v(I));const{inProgress:ee,...J}=X,ue={...J,toPosition:X.toHandle?X.toPosition:null};N==null||N(ne,ue),o&&(w==null||w(ne,ue))}g(),cancelAnimationFrame(O),S=!1,A=!1,I=null,F=null,R.removeEventListener("mousemove",Z),R.removeEventListener("mouseup",se),R.removeEventListener("touchmove",Z),R.removeEventListener("touchend",se)}}R.addEventListener("mousemove",Z),R.addEventListener("mouseup",se),R.addEventListener("touchmove",Z),R.addEventListener("touchend",se)}function Kv(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:s,fromType:o,doc:i,lib:l,flowId:c,isValidConnection:u=Wv,nodeLookup:h}){const d=o==="target",f=t?i.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:g,y:x}=At(e),v=i.elementFromPoint(g,x),N=v!=null&&v.classList.contains(`${l}-flow__handle`)?v:f,p={handleDomNode:N,isValid:!1,connection:null,toHandle:null};if(N){const w=Uv(void 0,N),y=N.getAttribute("data-nodeid"),j=N.getAttribute("data-handleid"),b=N.classList.contains("connectable"),E=N.classList.contains("connectableend");if(!y||!w)return p;const C={source:d?y:r,sourceHandle:d?j:s,target:d?r:y,targetHandle:d?s:j};p.connection=C;const R=b&&E&&(n===Ns.Strict?d&&w==="source"||!d&&w==="target":y!==r||j!==s);p.isValid=R&&u(C),p.toHandle=Vv(y,w,j,h,n,!0)}return p}const Yu={onPointerDown:S4,isValid:Kv};function k4({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const s=dt(e);function o({translateExtent:l,width:c,height:u,zoomStep:h=1,pannable:d=!0,zoomable:f=!0,inversePan:g=!1}){const x=y=>{if(y.sourceEvent.type!=="wheel"||!t)return;const j=n(),b=y.sourceEvent.ctrlKey&&Vo()?10:1,E=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*h,C=j[2]*Math.pow(2,E*b);t.scaleTo(C)};let v=[0,0];const N=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(v=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},p=y=>{const j=n();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!t)return;const b=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],E=[b[0]-v[0],b[1]-v[1]];v=b;const C=r()*Math.max(j[2],Math.log(j[2]))*(g?-1:1),M={x:j[0]-E[0]*C,y:j[1]-E[1]*C},R=[[0,0],[c,u]];t.setViewportConstrained({x:M.x,y:M.y,zoom:j[2]},R,l)},w=wv().on("start",N).on("zoom",d?p:null).on("zoom.wheel",f?x:null);s.call(w,{})}function i(){s.on("zoom",null)}return{update:o,destroy:i,pointer:It}}const Ml=e=>({x:e.x,y:e.y,zoom:e.k}),_c=({x:e,y:t,zoom:n})=>El.translate(e,t).scale(n),Jr=(e,t)=>e.target.closest(`.${t}`),Gv=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),C4=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Pc=(e,t=0,n=C4,r=()=>{})=>{const s=typeof t=="number"&&t>0;return s||r(),s?e.transition().duration(t).ease(n).on("end",r):e},Yv=e=>{const t=e.ctrlKey&&Vo()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function E4({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:o,zoomOnPinch:i,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return h=>{if(Jr(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const d=n.property("__zoom").k||1;if(h.ctrlKey&&i){const N=It(h),p=Yv(h),w=d*Math.pow(2,p);r.scaleTo(n,w,N,h);return}const f=h.deltaMode===1?20:1;let g=s===pr.Vertical?0:h.deltaX*f,x=s===pr.Horizontal?0:h.deltaY*f;!Vo()&&h.shiftKey&&s!==pr.Vertical&&(g=h.deltaY*f,x=0),r.translateBy(n,-(g/d)*o,-(x/d)*o,{internal:!0});const v=Ml(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,v),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,v),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(h,v))}}function _4({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,s){const o=r.type==="wheel",i=!t&&o&&!r.ctrlKey,l=Jr(r,e);if(r.ctrlKey&&o&&l&&r.preventDefault(),i||l)return null;r.preventDefault(),n.call(this,r,s)}}function P4({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,i,l;if((o=r.sourceEvent)!=null&&o.internal)return;const s=Ml(r.transform);e.mouseButton=((i=r.sourceEvent)==null?void 0:i.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,s))}}function M4({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:s}){return o=>{var i,l;e.usedRightMouseButton=!!(n&&Gv(t,e.mouseButton??0)),(i=o.sourceEvent)!=null&&i.sync||r([o.transform.x,o.transform.y,o.transform.k]),s&&!((l=o.sourceEvent)!=null&&l.internal)&&(s==null||s(o.sourceEvent,Ml(o.transform)))}}function I4({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:o}){return i=>{var l;if(!((l=i.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,o&&Gv(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&o(i.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=Ml(i.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(i.sourceEvent,c)},n?150:0)}}}function R4({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:o,userSelectionActive:i,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:h}){return d=>{var N;const f=e||t,g=n&&d.ctrlKey,x=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(Jr(d,`${u}-flow__node`)||Jr(d,`${u}-flow__edge`)))return!0;if(!r&&!f&&!s&&!o&&!n||i||h&&!x||Jr(d,l)&&x||Jr(d,c)&&(!x||s&&x&&!e)||!n&&d.ctrlKey&&x)return!1;if(!n&&d.type==="touchstart"&&((N=d.touches)==null?void 0:N.length)>1)return d.preventDefault(),!1;if(!f&&!s&&!g&&x||!r&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(r)&&!r.includes(d.button)&&d.type==="mousedown")return!1;const v=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||x)&&v}}function T4({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:s,onPanZoom:o,onPanZoomStart:i,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),d=wv().scaleExtent([t,n]).translateExtent(r),f=dt(e).call(d);w({x:s.x,y:s.y,zoom:js(s.zoom,t,n)},[[0,0],[h.width,h.height]],r);const g=f.on("wheel.zoom"),x=f.on("dblclick.zoom");d.wheelDelta(Yv);function v(T,L){return f?new Promise($=>{d==null||d.interpolate((L==null?void 0:L.interpolate)==="linear"?po:aa).transform(Pc(f,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>$(!0)),T)}):Promise.resolve(!1)}function N({noWheelClassName:T,noPanClassName:L,onPaneContextMenu:$,userSelectionActive:_,panOnScroll:z,panOnDrag:k,panOnScrollMode:D,panOnScrollSpeed:P,preventScrolling:S,zoomOnPinch:I,zoomOnScroll:A,zoomOnDoubleClick:F,zoomActivationKeyPressed:B,lib:V,onTransformChange:G,connectionInProgress:Y,paneClickDistance:X,selectionOnDrag:U}){_&&!u.isZoomingOrPanning&&p();const Z=z&&!B&&!_;d.clickDistance(U?1/0:!Lt(X)||X<0?0:X);const se=Z?E4({zoomPanValues:u,noWheelClassName:T,d3Selection:f,d3Zoom:d,panOnScrollMode:D,panOnScrollSpeed:P,zoomOnPinch:I,onPanZoomStart:i,onPanZoom:o,onPanZoomEnd:l}):_4({noWheelClassName:T,preventScrolling:S,d3ZoomHandler:g});if(f.on("wheel.zoom",se,{passive:!1}),!_){const ee=P4({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:i});d.on("start",ee);const J=M4({zoomPanValues:u,panOnDrag:k,onPaneContextMenu:!!$,onPanZoom:o,onTransformChange:G});d.on("zoom",J);const ue=I4({zoomPanValues:u,panOnDrag:k,panOnScroll:z,onPaneContextMenu:$,onPanZoomEnd:l,onDraggingChange:c});d.on("end",ue)}const ne=R4({zoomActivationKeyPressed:B,panOnDrag:k,zoomOnScroll:A,panOnScroll:z,zoomOnDoubleClick:F,zoomOnPinch:I,userSelectionActive:_,noPanClassName:L,noWheelClassName:T,lib:V,connectionInProgress:Y});d.filter(ne),F?f.on("dblclick.zoom",x):f.on("dblclick.zoom",null)}function p(){d.on("zoom",null)}async function w(T,L,$){const _=_c(T),z=d==null?void 0:d.constrain()(_,L,$);return z&&await v(z),new Promise(k=>k(z))}async function y(T,L){const $=_c(T);return await v($,L),new Promise(_=>_($))}function j(T){if(f){const L=_c(T),$=f.property("__zoom");($.k!==T.zoom||$.x!==T.x||$.y!==T.y)&&(d==null||d.transform(f,L,null,{sync:!0}))}}function b(){const T=f?vv(f.node()):{x:0,y:0,k:1};return{x:T.x,y:T.y,zoom:T.k}}function E(T,L){return f?new Promise($=>{d==null||d.interpolate((L==null?void 0:L.interpolate)==="linear"?po:aa).scaleTo(Pc(f,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>$(!0)),T)}):Promise.resolve(!1)}function C(T,L){return f?new Promise($=>{d==null||d.interpolate((L==null?void 0:L.interpolate)==="linear"?po:aa).scaleBy(Pc(f,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>$(!0)),T)}):Promise.resolve(!1)}function M(T){d==null||d.scaleExtent(T)}function R(T){d==null||d.translateExtent(T)}function O(T){const L=!Lt(T)||T<0?0:T;d==null||d.clickDistance(L)}return{update:N,destroy:p,setViewport:y,setViewportConstrained:w,getViewport:b,scaleTo:E,scaleBy:C,setScaleExtent:M,setTranslateExtent:R,syncViewport:j,setClickDistance:O}}var ks;(function(e){e.Line="line",e.Handle="handle"})(ks||(ks={}));function L4({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:s,affectsY:o}){const i=e-t,l=n-r,c=[i>0?1:i<0?-1:0,l>0?1:l<0?-1:0];return i&&s&&(c[0]=c[0]*-1),l&&o&&(c[1]=c[1]*-1),c}function Xm(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),s=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:s}}function kn(e,t){return Math.max(0,t-e)}function Cn(e,t){return Math.max(0,e-t)}function $i(e,t,n){return Math.max(0,t-e,e-n)}function Qm(e,t){return e?!t:t}function A4(e,t,n,r,s,o,i,l){let{affectsX:c,affectsY:u}=t;const{isHorizontal:h,isVertical:d}=t,f=h&&d,{xSnapped:g,ySnapped:x}=n,{minWidth:v,maxWidth:N,minHeight:p,maxHeight:w}=r,{x:y,y:j,width:b,height:E,aspectRatio:C}=e;let M=Math.floor(h?g-e.pointerX:0),R=Math.floor(d?x-e.pointerY:0);const O=b+(c?-M:M),T=E+(u?-R:R),L=-o[0]*b,$=-o[1]*E;let _=$i(O,v,N),z=$i(T,p,w);if(i){let P=0,S=0;c&&M<0?P=kn(y+M+L,i[0][0]):!c&&M>0&&(P=Cn(y+O+L,i[1][0])),u&&R<0?S=kn(j+R+$,i[0][1]):!u&&R>0&&(S=Cn(j+T+$,i[1][1])),_=Math.max(_,P),z=Math.max(z,S)}if(l){let P=0,S=0;c&&M>0?P=Cn(y+M,l[0][0]):!c&&M<0&&(P=kn(y+O,l[1][0])),u&&R>0?S=Cn(j+R,l[0][1]):!u&&R<0&&(S=kn(j+T,l[1][1])),_=Math.max(_,P),z=Math.max(z,S)}if(s){if(h){const P=$i(O/C,p,w)*C;if(_=Math.max(_,P),i){let S=0;!c&&!u||c&&!u&&f?S=Cn(j+$+O/C,i[1][1])*C:S=kn(j+$+(c?M:-M)/C,i[0][1])*C,_=Math.max(_,S)}if(l){let S=0;!c&&!u||c&&!u&&f?S=kn(j+O/C,l[1][1])*C:S=Cn(j+(c?M:-M)/C,l[0][1])*C,_=Math.max(_,S)}}if(d){const P=$i(T*C,v,N)/C;if(z=Math.max(z,P),i){let S=0;!c&&!u||u&&!c&&f?S=Cn(y+T*C+L,i[1][0])/C:S=kn(y+(u?R:-R)*C+L,i[0][0])/C,z=Math.max(z,S)}if(l){let S=0;!c&&!u||u&&!c&&f?S=kn(y+T*C,l[1][0])/C:S=Cn(y+(u?R:-R)*C,l[0][0])/C,z=Math.max(z,S)}}}R=R+(R<0?z:-z),M=M+(M<0?_:-_),s&&(f?O>T*C?R=(Qm(c,u)?-M:M)/C:M=(Qm(c,u)?-R:R)*C:h?(R=M/C,u=c):(M=R*C,c=u));const k=c?y+M:y,D=u?j+R:j;return{width:b+(c?-M:M),height:E+(u?-R:R),x:o[0]*M*(c?-1:1)+k,y:o[1]*R*(u?-1:1)+D}}const Xv={width:0,height:0,x:0,y:0},z4={...Xv,pointerX:0,pointerY:0,aspectRatio:1};function D4(e){return[[0,0],[e.measured.width,e.measured.height]]}function $4(e,t,n){const r=t.position.x+e.position.x,s=t.position.y+e.position.y,o=e.measured.width??0,i=e.measured.height??0,l=n[0]*o,c=n[1]*i;return[[r-l,s-c],[r+o-l,s+i-c]]}function O4({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:s}){const o=dt(e);let i={controlDirection:Xm("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:h,keepAspectRatio:d,resizeDirection:f,onResizeStart:g,onResize:x,onResizeEnd:v,shouldResize:N}){let p={...Xv},w={...z4};i={boundaries:h,resizeDirection:f,keepAspectRatio:d,controlDirection:Xm(u)};let y,j=null,b=[],E,C,M,R=!1;const O=ov().on("start",T=>{const{nodeLookup:L,transform:$,snapGrid:_,snapToGrid:z,nodeOrigin:k,paneDomNode:D}=n();if(y=L.get(t),!y)return;j=(D==null?void 0:D.getBoundingClientRect())??null;const{xSnapped:P,ySnapped:S}=go(T.sourceEvent,{transform:$,snapGrid:_,snapToGrid:z,containerBounds:j});p={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},w={...p,pointerX:P,pointerY:S,aspectRatio:p.width/p.height},E=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(E=L.get(y.parentId),C=E&&y.extent==="parent"?D4(E):void 0),b=[],M=void 0;for(const[I,A]of L)if(A.parentId===t&&(b.push({id:I,position:{...A.position},extent:A.extent}),A.extent==="parent"||A.expandParent)){const F=$4(A,y,A.origin??k);M?M=[[Math.min(F[0][0],M[0][0]),Math.min(F[0][1],M[0][1])],[Math.max(F[1][0],M[1][0]),Math.max(F[1][1],M[1][1])]]:M=F}g==null||g(T,{...p})}).on("drag",T=>{const{transform:L,snapGrid:$,snapToGrid:_,nodeOrigin:z}=n(),k=go(T.sourceEvent,{transform:L,snapGrid:$,snapToGrid:_,containerBounds:j}),D=[];if(!y)return;const{x:P,y:S,width:I,height:A}=p,F={},B=y.origin??z,{width:V,height:G,x:Y,y:X}=A4(w,i.controlDirection,k,i.boundaries,i.keepAspectRatio,B,C,M),U=V!==I,Z=G!==A,se=Y!==P&&U,ne=X!==S&&Z;if(!se&&!ne&&!U&&!Z)return;if((se||ne||B[0]===1||B[1]===1)&&(F.x=se?Y:p.x,F.y=ne?X:p.y,p.x=F.x,p.y=F.y,b.length>0)){const xe=Y-P,le=X-S;for(const We of b)We.position={x:We.position.x-xe+B[0]*(V-I),y:We.position.y-le+B[1]*(G-A)},D.push(We)}if((U||Z)&&(F.width=U&&(!i.resizeDirection||i.resizeDirection==="horizontal")?V:p.width,F.height=Z&&(!i.resizeDirection||i.resizeDirection==="vertical")?G:p.height,p.width=F.width,p.height=F.height),E&&y.expandParent){const xe=B[0]*(F.width??0);F.x&&F.x<xe&&(p.x=xe,w.x=w.x-(F.x-xe));const le=B[1]*(F.height??0);F.y&&F.y<le&&(p.y=le,w.y=w.y-(F.y-le))}const ee=L4({width:p.width,prevWidth:I,height:p.height,prevHeight:A,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),J={...p,direction:ee};(N==null?void 0:N(T,J))!==!1&&(R=!0,x==null||x(T,J),r(F,D))}).on("end",T=>{R&&(v==null||v(T,{...p}),s==null||s({...p}),R=!1)});o.call(O)}function c(){o.on(".drag",null)}return{update:l,destroy:c}}var Qv={exports:{}},qv={},Zv={exports:{}},Jv={};/**
|
|
386
|
+
* @license React
|
|
387
|
+
* use-sync-external-store-shim.production.js
|
|
388
|
+
*
|
|
389
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
390
|
+
*
|
|
391
|
+
* This source code is licensed under the MIT license found in the
|
|
392
|
+
* LICENSE file in the root directory of this source tree.
|
|
393
|
+
*/var Cs=m;function F4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var H4=typeof Object.is=="function"?Object.is:F4,B4=Cs.useState,V4=Cs.useEffect,U4=Cs.useLayoutEffect,W4=Cs.useDebugValue;function K4(e,t){var n=t(),r=B4({inst:{value:n,getSnapshot:t}}),s=r[0].inst,o=r[1];return U4(function(){s.value=n,s.getSnapshot=t,Mc(s)&&o({inst:s})},[e,n,t]),V4(function(){return Mc(s)&&o({inst:s}),e(function(){Mc(s)&&o({inst:s})})},[e]),W4(n),n}function Mc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!H4(e,n)}catch{return!0}}function G4(e,t){return t()}var Y4=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?G4:K4;Jv.useSyncExternalStore=Cs.useSyncExternalStore!==void 0?Cs.useSyncExternalStore:Y4;Zv.exports=Jv;var X4=Zv.exports;/**
|
|
394
|
+
* @license React
|
|
395
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
396
|
+
*
|
|
397
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
398
|
+
*
|
|
399
|
+
* This source code is licensed under the MIT license found in the
|
|
400
|
+
* LICENSE file in the root directory of this source tree.
|
|
401
|
+
*/var Il=m,Q4=X4;function q4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Z4=typeof Object.is=="function"?Object.is:q4,J4=Q4.useSyncExternalStore,e5=Il.useRef,t5=Il.useEffect,n5=Il.useMemo,r5=Il.useDebugValue;qv.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var o=e5(null);if(o.current===null){var i={hasValue:!1,value:null};o.current=i}else i=o.current;o=n5(function(){function c(g){if(!u){if(u=!0,h=g,g=r(g),s!==void 0&&i.hasValue){var x=i.value;if(s(x,g))return d=x}return d=g}if(x=d,Z4(h,g))return x;var v=r(g);return s!==void 0&&s(x,v)?(h=g,x):(h=g,d=v)}var u=!1,h,d,f=n===void 0?null:n;return[function(){return c(t())},f===null?void 0:function(){return c(f())}]},[t,n,r,s]);var l=J4(e,o[0],o[1]);return t5(function(){i.hasValue=!0,i.value=l},[l]),r5(l),l};Qv.exports=qv;var s5=Qv.exports;const o5=qu(s5),i5={},qm=e=>{let t;const n=new Set,r=(h,d)=>{const f=typeof h=="function"?h(t):h;if(!Object.is(f,t)){const g=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(x=>x(t,g))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>u,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(i5?"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."),n.clear()}},u=t=e(r,s,c);return c},a5=e=>e?qm(e):qm,{useDebugValue:l5}=Wt,{useSyncExternalStoreWithSelector:c5}=o5,u5=e=>e;function e0(e,t=u5,n){const r=c5(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return l5(r),r}const Zm=(e,t)=>{const n=a5(e),r=(s,o=t)=>e0(n,s,o);return Object.assign(r,n),r},d5=(e,t)=>e?Zm(e,t):Zm;function Se(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,s]of e)if(!Object.is(s,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const Rl=m.createContext(null),f5=Rl.Provider,t0=en.error001();function ie(e,t){const n=m.useContext(Rl);if(n===null)throw new Error(t0);return e0(n,e,t)}function ke(){const e=m.useContext(Rl);if(e===null)throw new Error(t0);return m.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Jm={display:"none"},h5={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},n0="react-flow__node-desc",r0="react-flow__edge-desc",m5="react-flow__aria-live",p5=e=>e.ariaLiveMessage,g5=e=>e.ariaLabelConfig;function x5({rfId:e}){const t=ie(p5);return a.jsx("div",{id:`${m5}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:h5,children:t})}function y5({rfId:e,disableKeyboardA11y:t}){const n=ie(g5);return a.jsxs(a.Fragment,{children:[a.jsx("div",{id:`${n0}-${e}`,style:Jm,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),a.jsx("div",{id:`${r0}-${e}`,style:Jm,children:n["edge.a11yDescription.default"]}),!t&&a.jsx(x5,{rfId:e})]})}const Tl=m.forwardRef(({position:e="top-left",children:t,className:n,style:r,...s},o)=>{const i=`${e}`.split("-");return a.jsx("div",{className:Ae(["react-flow__panel",n,...i]),style:r,ref:o,...s,children:t})});Tl.displayName="Panel";function v5({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:a.jsx(Tl,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:a.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const w5=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Oi=e=>e.id;function N5(e,t){return Se(e.selectedNodes.map(Oi),t.selectedNodes.map(Oi))&&Se(e.selectedEdges.map(Oi),t.selectedEdges.map(Oi))}function j5({onSelectionChange:e}){const t=ke(),{selectedNodes:n,selectedEdges:r}=ie(w5,N5);return m.useEffect(()=>{const s={nodes:n,edges:r};e==null||e(s),t.getState().onSelectionChangeHandlers.forEach(o=>o(s))},[n,r,e]),null}const b5=e=>!!e.onSelectionChangeHandlers;function S5({onSelectionChange:e}){const t=ie(b5);return e||t?a.jsx(j5,{onSelectionChange:e}):null}const s0=[0,0],k5={x:0,y:0,zoom:1},C5=["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"],ep=[...C5,"rfId"],E5=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),tp={translateExtent:Fo,nodeOrigin:s0,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function _5(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:s,setTranslateExtent:o,setNodeExtent:i,reset:l,setDefaultNodesAndEdges:c}=ie(E5,Se),u=ke();m.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=tp,l()}),[]);const h=m.useRef(tp);return m.useEffect(()=>{for(const d of ep){const f=e[d],g=h.current[d];f!==g&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?r(f):d==="maxZoom"?s(f):d==="translateExtent"?o(f):d==="nodeExtent"?i(f):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:q3(f)}):d==="fitView"?u.setState({fitViewQueued:f}):d==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[d]:f})))}h.current=e},ep.map(d=>e[d])),null}function np(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function P5(e){var r;const[t,n]=m.useState(e==="system"?null:e);return m.useEffect(()=>{if(e!=="system"){n(e);return}const s=np(),o=()=>n(s!=null&&s.matches?"dark":"light");return o(),s==null||s.addEventListener("change",o),()=>{s==null||s.removeEventListener("change",o)}},[e]),t!==null?t:(r=np())!=null&&r.matches?"dark":"light"}const rp=typeof document<"u"?document:null;function Uo(e=null,t={target:rp,actInsideInputWithModifier:!0}){const[n,r]=m.useState(!1),s=m.useRef(!1),o=m.useRef(new Set([])),[i,l]=m.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
|
|
402
|
+
`).replace(`
|
|
403
|
+
|
|
404
|
+
`,`
|
|
405
|
+
+`).split(`
|
|
406
|
+
`)),h=u.reduce((d,f)=>d.concat(...f),[]);return[u,h]}return[[],[]]},[e]);return m.useEffect(()=>{const c=(t==null?void 0:t.target)??rp,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const h=g=>{var N,p;if(s.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!s.current||s.current&&!u)&&Tv(g))return!1;const v=op(g.code,l);if(o.current.add(g[v]),sp(i,o.current,!1)){const w=((p=(N=g.composedPath)==null?void 0:N.call(g))==null?void 0:p[0])||g.target,y=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";t.preventDefault!==!1&&(s.current||!y)&&g.preventDefault(),r(!0)}},d=g=>{const x=op(g.code,l);sp(i,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(g[x]),g.key==="Meta"&&o.current.clear(),s.current=!1},f=()=>{o.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",h),c==null||c.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,r]),n}function sp(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(s=>t.has(s)))}function op(e,t){return t.includes(e)?"code":"key"}const M5=()=>{const e=ke();return m.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,s,o],panZoom:i}=e.getState();return i?(await i.setViewport({x:t.x??r,y:t.y??s,zoom:t.zoom??o},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:s,minZoom:o,maxZoom:i,panZoom:l}=e.getState(),c=Nf(t,r,s,o,i,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:s,snapToGrid:o,domNode:i}=e.getState();if(!i)return t;const{x:l,y:c}=i.getBoundingClientRect(),u={x:t.x-l,y:t.y-c},h=n.snapGrid??s,d=n.snapToGrid??o;return oi(u,r,d,h)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:s,y:o}=r.getBoundingClientRect(),i=Xa(t,n);return{x:i.x+s,y:i.y+o}}}),[])};function o0(e,t){const n=[],r=new Map,s=[];for(const o of e)if(o.type==="add"){s.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const i=r.get(o.id);i?i.push(o):r.set(o.id,[o])}for(const o of t){const i=r.get(o.id);if(!i){n.push(o);continue}if(i[0].type==="remove")continue;if(i[0].type==="replace"){n.push({...i[0].item});continue}const l={...o};for(const c of i)I5(c,l);n.push(l)}return s.length&&s.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function I5(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function R5(e,t){return o0(e,t)}function T5(e,t){return o0(e,t)}function ir(e,t){return{id:e,type:"select",selected:t}}function es(e,t=new Set,n=!1){const r=[];for(const[s,o]of e){const i=t.has(s);!(o.selected===void 0&&!i)&&o.selected!==i&&(n&&(o.selected=i),r.push(ir(o.id,i)))}return r}function ip({items:e=[],lookup:t}){var s;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,i]of e.entries()){const l=t.get(i.id),c=((s=l==null?void 0:l.internals)==null?void 0:s.userNode)??l;c!==void 0&&c!==i&&n.push({id:i.id,item:i,type:"replace"}),c===void 0&&n.push({item:i,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function ap(e){return{id:e.id,type:"remove"}}const lp=e=>H3(e),L5=e=>kv(e);function i0(e){return m.forwardRef(e)}const A5=typeof window<"u"?m.useLayoutEffect:m.useEffect;function cp(e){const[t,n]=m.useState(BigInt(0)),[r]=m.useState(()=>z5(()=>n(s=>s+BigInt(1))));return A5(()=>{const s=r.get();s.length&&(e(s),r.reset())},[t]),r}function z5(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const a0=m.createContext(null);function D5({children:e}){const t=ke(),n=m.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:h,onNodesChange:d,nodeLookup:f,fitViewQueued:g,onNodesChangeMiddlewareMap:x}=t.getState();let v=c;for(const p of l)v=typeof p=="function"?p(v):p;let N=ip({items:v,lookup:f});for(const p of x.values())N=p(N);h&&u(v),N.length>0?d==null||d(N):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:p,nodes:w,setNodes:y}=t.getState();p&&y(w)})},[]),r=cp(n),s=m.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:h,onEdgesChange:d,edgeLookup:f}=t.getState();let g=c;for(const x of l)g=typeof x=="function"?x(g):x;h?u(g):d&&d(ip({items:g,lookup:f}))},[]),o=cp(s),i=m.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return a.jsx(a0.Provider,{value:i,children:e})}function $5(){const e=m.useContext(a0);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const O5=e=>!!e.panZoom;function _f(){const e=M5(),t=ke(),n=$5(),r=ie(O5),s=m.useMemo(()=>{const o=d=>t.getState().nodeLookup.get(d),i=d=>{n.nodeQueue.push(d)},l=d=>{n.edgeQueue.push(d)},c=d=>{var p,w;const{nodeLookup:f,nodeOrigin:g}=t.getState(),x=lp(d)?d:f.get(d.id),v=x.parentId?Iv(x.position,x.measured,x.parentId,f,g):x.position,N={...x,position:v,width:((p=x.measured)==null?void 0:p.width)??x.width,height:((w=x.measured)==null?void 0:w.height)??x.height};return bs(N)},u=(d,f,g={replace:!1})=>{i(x=>x.map(v=>{if(v.id===d){const N=typeof f=="function"?f(v):f;return g.replace&&lp(N)?N:{...v,...N}}return v}))},h=(d,f,g={replace:!1})=>{l(x=>x.map(v=>{if(v.id===d){const N=typeof f=="function"?f(v):f;return g.replace&&L5(N)?N:{...v,...N}}return v}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>{var f;return(f=o(d))==null?void 0:f.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:i,setEdges:l,addNodes:d=>{const f=Array.isArray(d)?d:[d];n.nodeQueue.push(g=>[...g,...f])},addEdges:d=>{const f=Array.isArray(d)?d:[d];n.edgeQueue.push(g=>[...g,...f])},toObject:()=>{const{nodes:d=[],edges:f=[],transform:g}=t.getState(),[x,v,N]=g;return{nodes:d.map(p=>({...p})),edges:f.map(p=>({...p})),viewport:{x,y:v,zoom:N}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{const{nodes:g,edges:x,onNodesDelete:v,onEdgesDelete:N,triggerNodeChanges:p,triggerEdgeChanges:w,onDelete:y,onBeforeDelete:j}=t.getState(),{nodes:b,edges:E}=await K3({nodesToRemove:d,edgesToRemove:f,nodes:g,edges:x,onBeforeDelete:j}),C=E.length>0,M=b.length>0;if(C){const R=E.map(ap);N==null||N(E),w(R)}if(M){const R=b.map(ap);v==null||v(b),p(R)}return(M||C)&&(y==null||y({nodes:b,edges:E})),{deletedNodes:b,deletedEdges:E}},getIntersectingNodes:(d,f=!0,g)=>{const x=$m(d),v=x?d:c(d),N=g!==void 0;return v?(g||t.getState().nodes).filter(p=>{const w=t.getState().nodeLookup.get(p.id);if(w&&!x&&(p.id===d.id||!w.internals.positionAbsolute))return!1;const y=bs(N?p:w),j=Bo(y,v);return f&&j>0||j>=y.width*y.height||j>=v.width*v.height}):[]},isNodeIntersecting:(d,f,g=!0)=>{const v=$m(d)?d:c(d);if(!v)return!1;const N=Bo(v,f);return g&&N>0||N>=f.width*f.height||N>=v.width*v.height},updateNode:u,updateNodeData:(d,f,g={replace:!1})=>{u(d,x=>{const v=typeof f=="function"?f(x):f;return g.replace?{...x,data:v}:{...x,data:{...x.data,...v}}},g)},updateEdge:h,updateEdgeData:(d,f,g={replace:!1})=>{h(d,x=>{const v=typeof f=="function"?f(x):f;return g.replace?{...x,data:v}:{...x,data:{...x.data,...v}}},g)},getNodesBounds:d=>{const{nodeLookup:f,nodeOrigin:g}=t.getState();return B3(d,{nodeLookup:f,nodeOrigin:g})},getHandleConnections:({type:d,id:f,nodeId:g})=>{var x;return Array.from(((x=t.getState().connectionLookup.get(`${g}-${d}${f?`-${f}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:d,handleId:f,nodeId:g})=>{var x;return Array.from(((x=t.getState().connectionLookup.get(`${g}${d?f?`-${d}-${f}`:`-${d}`:""}`))==null?void 0:x.values())??[])},fitView:async d=>{const f=t.getState().fitViewResolver??Q3();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(g=>[...g]),f.promise}}},[]);return m.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const up=e=>e.selected,F5=typeof window<"u"?window:void 0;function H5({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=ke(),{deleteElements:r}=_f(),s=Uo(e,{actInsideInputWithModifier:!1}),o=Uo(t,{target:F5});m.useEffect(()=>{if(s){const{edges:i,nodes:l}=n.getState();r({nodes:l.filter(up),edges:i.filter(up)}),n.setState({nodesSelectionActive:!1})}},[s]),m.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function B5(e){const t=ke();m.useEffect(()=>{const n=()=>{var s,o,i,l;if(!e.current||!(((o=(s=e.current).checkVisibility)==null?void 0:o.call(s))??!0))return!1;const r=jf(e.current);(r.height===0||r.width===0)&&((l=(i=t.getState()).onError)==null||l.call(i,"004",en.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const Ll={position:"absolute",width:"100%",height:"100%",top:0,left:0},V5=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function U5({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:o=pr.Free,zoomOnDoubleClick:i=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:h,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:g=!0,children:x,noWheelClassName:v,noPanClassName:N,onViewportChange:p,isControlledViewport:w,paneClickDistance:y,selectionOnDrag:j}){const b=ke(),E=m.useRef(null),{userSelectionActive:C,lib:M,connectionInProgress:R}=ie(V5,Se),O=Uo(f),T=m.useRef();B5(E);const L=m.useCallback($=>{p==null||p({x:$[0],y:$[1],zoom:$[2]}),w||b.setState({transform:$})},[p,w]);return m.useEffect(()=>{if(E.current){T.current=T4({domNode:E.current,minZoom:h,maxZoom:d,translateExtent:u,viewport:c,onDraggingChange:k=>b.setState({paneDragging:k}),onPanZoomStart:(k,D)=>{const{onViewportChangeStart:P,onMoveStart:S}=b.getState();S==null||S(k,D),P==null||P(D)},onPanZoom:(k,D)=>{const{onViewportChange:P,onMove:S}=b.getState();S==null||S(k,D),P==null||P(D)},onPanZoomEnd:(k,D)=>{const{onViewportChangeEnd:P,onMoveEnd:S}=b.getState();S==null||S(k,D),P==null||P(D)}});const{x:$,y:_,zoom:z}=T.current.getViewport();return b.setState({panZoom:T.current,transform:[$,_,z],domNode:E.current.closest(".react-flow")}),()=>{var k;(k=T.current)==null||k.destroy()}}},[]),m.useEffect(()=>{var $;($=T.current)==null||$.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:o,zoomOnDoubleClick:i,panOnDrag:l,zoomActivationKeyPressed:O,preventScrolling:g,noPanClassName:N,userSelectionActive:C,noWheelClassName:v,lib:M,onTransformChange:L,connectionInProgress:R,selectionOnDrag:j,paneClickDistance:y})},[e,t,n,r,s,o,i,l,O,g,N,C,v,M,L,R,j,y]),a.jsx("div",{className:"react-flow__renderer",ref:E,style:Ll,children:x})}const W5=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function K5(){const{userSelectionActive:e,userSelectionRect:t}=ie(W5,Se);return e&&t?a.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Ic=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},G5=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Y5({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Ho.Full,panOnDrag:r,paneClickDistance:s,selectionOnDrag:o,onSelectionStart:i,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:u,onPaneScroll:h,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:g,children:x}){const v=ke(),{userSelectionActive:N,elementsSelectable:p,dragging:w,connectionInProgress:y}=ie(G5,Se),j=p&&(e||N),b=m.useRef(null),E=m.useRef(),C=m.useRef(new Set),M=m.useRef(new Set),R=m.useRef(!1),O=P=>{if(R.current||y){R.current=!1;return}c==null||c(P),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},T=P=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){P.preventDefault();return}u==null||u(P)},L=h?P=>h(P):void 0,$=P=>{R.current&&(P.stopPropagation(),R.current=!1)},_=P=>{var G,Y;const{domNode:S}=v.getState();if(E.current=S==null?void 0:S.getBoundingClientRect(),!E.current)return;const I=P.target===b.current;if(!I&&!!P.target.closest(".nokey")||!e||!(o&&I||t)||P.button!==0||!P.isPrimary)return;(Y=(G=P.target)==null?void 0:G.setPointerCapture)==null||Y.call(G,P.pointerId),R.current=!1;const{x:B,y:V}=At(P.nativeEvent,E.current);v.setState({userSelectionRect:{width:0,height:0,startX:B,startY:V,x:B,y:V}}),I||(P.stopPropagation(),P.preventDefault())},z=P=>{const{userSelectionRect:S,transform:I,nodeLookup:A,edgeLookup:F,connectionLookup:B,triggerNodeChanges:V,triggerEdgeChanges:G,defaultEdgeOptions:Y,resetSelectedElements:X}=v.getState();if(!E.current||!S)return;const{x:U,y:Z}=At(P.nativeEvent,E.current),{startX:se,startY:ne}=S;if(!R.current){const le=t?0:s;if(Math.hypot(U-se,Z-ne)<=le)return;X(),i==null||i(P)}R.current=!0;const ee={startX:se,startY:ne,x:U<se?U:se,y:Z<ne?Z:ne,width:Math.abs(U-se),height:Math.abs(Z-ne)},J=C.current,ue=M.current;C.current=new Set(wf(A,ee,I,n===Ho.Partial,!0).map(le=>le.id)),M.current=new Set;const xe=(Y==null?void 0:Y.selectable)??!0;for(const le of C.current){const We=B.get(le);if(We)for(const{edgeId:Nn}of We.values()){const rn=F.get(Nn);rn&&(rn.selectable??xe)&&M.current.add(Nn)}}if(!Om(J,C.current)){const le=es(A,C.current,!0);V(le)}if(!Om(ue,M.current)){const le=es(F,M.current);G(le)}v.setState({userSelectionRect:ee,userSelectionActive:!0,nodesSelectionActive:!1})},k=P=>{var S,I;P.button===0&&((I=(S=P.target)==null?void 0:S.releasePointerCapture)==null||I.call(S,P.pointerId),!N&&P.target===b.current&&v.getState().userSelectionRect&&(O==null||O(P)),v.setState({userSelectionActive:!1,userSelectionRect:null}),R.current&&(l==null||l(P),v.setState({nodesSelectionActive:C.current.size>0})))},D=r===!0||Array.isArray(r)&&r.includes(0);return a.jsxs("div",{className:Ae(["react-flow__pane",{draggable:D,dragging:w,selection:e}]),onClick:j?void 0:Ic(O,b),onContextMenu:Ic(T,b),onWheel:Ic(L,b),onPointerEnter:j?void 0:d,onPointerMove:j?z:f,onPointerUp:j?k:void 0,onPointerDownCapture:j?_:void 0,onClickCapture:j?$:void 0,onPointerLeave:g,ref:b,style:Ll,children:[x,a.jsx(K5,{})]})}function Xu({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:o,multiSelectionActive:i,nodeLookup:l,onError:c}=t.getState(),u=l.get(e);if(!u){c==null||c("012",en.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&i)&&(o({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):s([e])}function l0({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:s,isSelectable:o,nodeClickDistance:i}){const l=ke(),[c,u]=m.useState(!1),h=m.useRef();return m.useEffect(()=>{h.current=v4({getStoreItems:()=>l.getState(),onNodeMouseDown:d=>{Xu({id:d,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),m.useEffect(()=>{var d,f;if(t)(d=h.current)==null||d.destroy();else if(e.current)return(f=h.current)==null||f.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:s,nodeClickDistance:i}),()=>{var g;(g=h.current)==null||g.destroy()}},[n,r,t,o,e,s]),c}const X5=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function c0(){const e=ke();return m.useCallback(n=>{const{nodeExtent:r,snapToGrid:s,snapGrid:o,nodesDraggable:i,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:h}=e.getState(),d=new Map,f=X5(i),g=s?o[0]:5,x=s?o[1]:5,v=n.direction.x*g*n.factor,N=n.direction.y*x*n.factor;for(const[,p]of u){if(!f(p))continue;let w={x:p.internals.positionAbsolute.x+v,y:p.internals.positionAbsolute.y+N};s&&(w=si(w,o));const{position:y,positionAbsolute:j}=Cv({nodeId:p.id,nextPosition:w,nodeLookup:u,nodeExtent:r,nodeOrigin:h,onError:l});p.position=y,p.internals.positionAbsolute=j,d.set(p.id,p)}c(d)},[])}const Pf=m.createContext(null),Q5=Pf.Provider;Pf.Consumer;const u0=()=>m.useContext(Pf),q5=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Z5=(e,t,n)=>r=>{const{connectionClickStartHandle:s,connectionMode:o,connection:i}=r,{fromHandle:l,toHandle:c,isValid:u}=i,h=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:h,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===n,isPossibleEndHandle:o===Ns.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!s,valid:h&&u}};function J5({type:e="source",position:t=Q.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:o=!0,id:i,onConnect:l,children:c,className:u,onMouseDown:h,onTouchStart:d,...f},g){var z,k;const x=i||null,v=e==="target",N=ke(),p=u0(),{connectOnClick:w,noPanClassName:y,rfId:j}=ie(q5,Se),{connectingFrom:b,connectingTo:E,clickConnecting:C,isPossibleEndHandle:M,connectionInProcess:R,clickConnectionInProcess:O,valid:T}=ie(Z5(p,x,e),Se);p||(k=(z=N.getState()).onError)==null||k.call(z,"010",en.error010());const L=D=>{const{defaultEdgeOptions:P,onConnect:S,hasDefaultEdges:I}=N.getState(),A={...P,...D};if(I){const{edges:F,setEdges:B}=N.getState();B(r4(A,F))}S==null||S(A),l==null||l(A)},$=D=>{if(!p)return;const P=Lv(D.nativeEvent);if(s&&(P&&D.button===0||!P)){const S=N.getState();Yu.onPointerDown(D.nativeEvent,{handleDomNode:D.currentTarget,autoPanOnConnect:S.autoPanOnConnect,connectionMode:S.connectionMode,connectionRadius:S.connectionRadius,domNode:S.domNode,nodeLookup:S.nodeLookup,lib:S.lib,isTarget:v,handleId:x,nodeId:p,flowId:S.rfId,panBy:S.panBy,cancelConnection:S.cancelConnection,onConnectStart:S.onConnectStart,onConnectEnd:S.onConnectEnd,updateConnection:S.updateConnection,onConnect:L,isValidConnection:n||S.isValidConnection,getTransform:()=>N.getState().transform,getFromHandle:()=>N.getState().connection.fromHandle,autoPanSpeed:S.autoPanSpeed,dragThreshold:S.connectionDragThreshold})}P?h==null||h(D):d==null||d(D)},_=D=>{const{onClickConnectStart:P,onClickConnectEnd:S,connectionClickStartHandle:I,connectionMode:A,isValidConnection:F,lib:B,rfId:V,nodeLookup:G,connection:Y}=N.getState();if(!p||!I&&!s)return;if(!I){P==null||P(D.nativeEvent,{nodeId:p,handleId:x,handleType:e}),N.setState({connectionClickStartHandle:{nodeId:p,type:e,id:x}});return}const X=Rv(D.target),U=n||F,{connection:Z,isValid:se}=Yu.isValid(D.nativeEvent,{handle:{nodeId:p,id:x,type:e},connectionMode:A,fromNodeId:I.nodeId,fromHandleId:I.id||null,fromType:I.type,isValidConnection:U,flowId:V,doc:X,lib:B,nodeLookup:G});se&&Z&&L(Z);const ne=structuredClone(Y);delete ne.inProgress,ne.toPosition=ne.toHandle?ne.toHandle.position:null,S==null||S(D,ne),N.setState({connectionClickStartHandle:null})};return a.jsx("div",{"data-handleid":x,"data-nodeid":p,"data-handlepos":t,"data-id":`${j}-${p}-${x}-${e}`,className:Ae(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",y,u,{source:!v,target:v,connectable:r,connectablestart:s,connectableend:o,clickconnecting:C,connectingfrom:b,connectingto:E,valid:T,connectionindicator:r&&(!R||M)&&(R||O?o:s)}]),onMouseDown:$,onTouchStart:$,onClick:w?_:void 0,ref:g,...f,children:c})}const Qa=m.memo(i0(J5));function eP({data:e,isConnectable:t,sourcePosition:n=Q.Bottom}){return a.jsxs(a.Fragment,{children:[e==null?void 0:e.label,a.jsx(Qa,{type:"source",position:n,isConnectable:t})]})}function tP({data:e,isConnectable:t,targetPosition:n=Q.Top,sourcePosition:r=Q.Bottom}){return a.jsxs(a.Fragment,{children:[a.jsx(Qa,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,a.jsx(Qa,{type:"source",position:r,isConnectable:t})]})}function nP(){return null}function rP({data:e,isConnectable:t,targetPosition:n=Q.Top}){return a.jsxs(a.Fragment,{children:[a.jsx(Qa,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const qa={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},dp={input:eP,default:tP,output:rP,group:nP};function sP(e){var t,n,r,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const oP=e=>{const{width:t,height:n,x:r,y:s}=ri(e.nodeLookup,{filter:o=>!!o.selected});return{width:Lt(t)?t:null,height:Lt(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${s}px)`}};function iP({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=ke(),{width:s,height:o,transformString:i,userSelectionActive:l}=ie(oP,Se),c=c0(),u=m.useRef(null);if(m.useEffect(()=>{var f;n||(f=u.current)==null||f.focus({preventScroll:!0})},[n]),l0({nodeRef:u}),l||!s||!o)return null;const h=e?f=>{const g=r.getState().nodes.filter(x=>x.selected);e(f,g)}:void 0,d=f=>{Object.prototype.hasOwnProperty.call(qa,f.key)&&(f.preventDefault(),c({direction:qa[f.key],factor:f.shiftKey?4:1}))};return a.jsx("div",{className:Ae(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},children:a.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:d,style:{width:s,height:o}})})}const fp=typeof window<"u"?window:void 0,aP=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function d0({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:o,onPaneScroll:i,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:h,selectionMode:d,onSelectionStart:f,onSelectionEnd:g,multiSelectionKeyCode:x,panActivationKeyCode:v,zoomActivationKeyCode:N,elementsSelectable:p,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:j,panOnScrollSpeed:b,panOnScrollMode:E,zoomOnDoubleClick:C,panOnDrag:M,defaultViewport:R,translateExtent:O,minZoom:T,maxZoom:L,preventScrolling:$,onSelectionContextMenu:_,noWheelClassName:z,noPanClassName:k,disableKeyboardA11y:D,onViewportChange:P,isControlledViewport:S}){const{nodesSelectionActive:I,userSelectionActive:A}=ie(aP,Se),F=Uo(u,{target:fp}),B=Uo(v,{target:fp}),V=B||M,G=B||j,Y=h&&V!==!0,X=F||A||Y;return H5({deleteKeyCode:c,multiSelectionKeyCode:x}),a.jsx(U5,{onPaneContextMenu:o,elementsSelectable:p,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:G,panOnScrollSpeed:b,panOnScrollMode:E,zoomOnDoubleClick:C,panOnDrag:!F&&V,defaultViewport:R,translateExtent:O,minZoom:T,maxZoom:L,zoomActivationKeyCode:N,preventScrolling:$,noWheelClassName:z,noPanClassName:k,onViewportChange:P,isControlledViewport:S,paneClickDistance:l,selectionOnDrag:Y,children:a.jsxs(Y5,{onSelectionStart:f,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:o,onPaneScroll:i,panOnDrag:V,isSelecting:!!X,selectionMode:d,selectionKeyPressed:F,paneClickDistance:l,selectionOnDrag:Y,children:[e,I&&a.jsx(iP,{onSelectionContextMenu:_,noPanClassName:k,disableKeyboardA11y:D})]})})}d0.displayName="FlowRenderer";const lP=m.memo(d0),cP=e=>t=>e?wf(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function uP(e){return ie(m.useCallback(cP(e),[e]),Se)}const dP=e=>e.updateNodeInternals;function fP(){const e=ie(dP),[t]=m.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(s=>{const o=s.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:s.target,force:!0})}),e(r)}));return m.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function hP({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const s=ke(),o=m.useRef(null),i=m.useRef(null),l=m.useRef(e.sourcePosition),c=m.useRef(e.targetPosition),u=m.useRef(t),h=n&&!!e.internals.handleBounds;return m.useEffect(()=>{o.current&&!e.hidden&&(!h||i.current!==o.current)&&(i.current&&(r==null||r.unobserve(i.current)),r==null||r.observe(o.current),i.current=o.current)},[h,e.hidden]),m.useEffect(()=>()=>{i.current&&(r==null||r.unobserve(i.current),i.current=null)},[]),m.useEffect(()=>{if(o.current){const d=u.current!==t,f=l.current!==e.sourcePosition,g=c.current!==e.targetPosition;(d||f||g)&&(u.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function mP({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:s,onContextMenu:o,onDoubleClick:i,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:h,resizeObserver:d,noDragClassName:f,noPanClassName:g,disableKeyboardA11y:x,rfId:v,nodeTypes:N,nodeClickDistance:p,onError:w}){const{node:y,internals:j,isParent:b}=ie(U=>{const Z=U.nodeLookup.get(e),se=U.parentLookup.has(e);return{node:Z,internals:Z.internals,isParent:se}},Se);let E=y.type||"default",C=(N==null?void 0:N[E])||dp[E];C===void 0&&(w==null||w("003",en.error003(E)),E="default",C=(N==null?void 0:N.default)||dp.default);const M=!!(y.draggable||l&&typeof y.draggable>"u"),R=!!(y.selectable||c&&typeof y.selectable>"u"),O=!!(y.connectable||u&&typeof y.connectable>"u"),T=!!(y.focusable||h&&typeof y.focusable>"u"),L=ke(),$=Mv(y),_=hP({node:y,nodeType:E,hasDimensions:$,resizeObserver:d}),z=l0({nodeRef:_,disabled:y.hidden||!M,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:R,nodeClickDistance:p}),k=c0();if(y.hidden)return null;const D=wn(y),P=sP(y),S=R||M||t||n||r||s,I=n?U=>n(U,{...j.userNode}):void 0,A=r?U=>r(U,{...j.userNode}):void 0,F=s?U=>s(U,{...j.userNode}):void 0,B=o?U=>o(U,{...j.userNode}):void 0,V=i?U=>i(U,{...j.userNode}):void 0,G=U=>{const{selectNodesOnDrag:Z,nodeDragThreshold:se}=L.getState();R&&(!Z||!M||se>0)&&Xu({id:e,store:L,nodeRef:_}),t&&t(U,{...j.userNode})},Y=U=>{if(!(Tv(U.nativeEvent)||x)){if(Nv.includes(U.key)&&R){const Z=U.key==="Escape";Xu({id:e,store:L,unselect:Z,nodeRef:_})}else if(M&&y.selected&&Object.prototype.hasOwnProperty.call(qa,U.key)){U.preventDefault();const{ariaLabelConfig:Z}=L.getState();L.setState({ariaLiveMessage:Z["node.a11yDescription.ariaLiveMessage"]({direction:U.key.replace("Arrow","").toLowerCase(),x:~~j.positionAbsolute.x,y:~~j.positionAbsolute.y})}),k({direction:qa[U.key],factor:U.shiftKey?4:1})}}},X=()=>{var ue;if(x||!((ue=_.current)!=null&&ue.matches(":focus-visible")))return;const{transform:U,width:Z,height:se,autoPanOnNodeFocus:ne,setCenter:ee}=L.getState();if(!ne)return;wf(new Map([[e,y]]),{x:0,y:0,width:Z,height:se},U,!0).length>0||ee(y.position.x+D.width/2,y.position.y+D.height/2,{zoom:U[2]})};return a.jsx("div",{className:Ae(["react-flow__node",`react-flow__node-${E}`,{[g]:M},y.className,{selected:y.selected,selectable:R,parent:b,draggable:M,dragging:z}]),ref:_,style:{zIndex:j.z,transform:`translate(${j.positionAbsolute.x}px,${j.positionAbsolute.y}px)`,pointerEvents:S?"all":"none",visibility:$?"visible":"hidden",...y.style,...P},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:I,onMouseMove:A,onMouseLeave:F,onContextMenu:B,onClick:G,onDoubleClick:V,onKeyDown:T?Y:void 0,tabIndex:T?0:void 0,onFocus:T?X:void 0,role:y.ariaRole??(T?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${n0}-${v}`,"aria-label":y.ariaLabel,...y.domAttributes,children:a.jsx(Q5,{value:e,children:a.jsx(C,{id:e,data:y.data,type:E,positionAbsoluteX:j.positionAbsolute.x,positionAbsoluteY:j.positionAbsolute.y,selected:y.selected??!1,selectable:R,draggable:M,deletable:y.deletable??!0,isConnectable:O,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:z,dragHandle:y.dragHandle,zIndex:j.z,parentId:y.parentId,...D})})})}var pP=m.memo(mP);const gP=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function f0(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:s,onError:o}=ie(gP,Se),i=uP(e.onlyRenderVisibleElements),l=fP();return a.jsx("div",{className:"react-flow__nodes",style:Ll,children:i.map(c=>a.jsx(pP,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:o},c))})}f0.displayName="NodeRenderer";const xP=m.memo(f0);function yP(e){return ie(m.useCallback(n=>{if(!e)return n.edges.map(s=>s.id);const r=[];if(n.width&&n.height)for(const s of n.edges){const o=n.nodeLookup.get(s.source),i=n.nodeLookup.get(s.target);o&&i&&e4({sourceNode:o,targetNode:i,width:n.width,height:n.height,transform:n.transform})&&r.push(s.id)}return r},[e]),Se)}const vP=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return a.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},wP=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return a.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},hp={[Ga.Arrow]:vP,[Ga.ArrowClosed]:wP};function NP(e){const t=ke();return m.useMemo(()=>{var s,o;return Object.prototype.hasOwnProperty.call(hp,e)?hp[e]:((o=(s=t.getState()).onError)==null||o.call(s,"009",en.error009(e)),null)},[e])}const jP=({id:e,type:t,color:n,width:r=12.5,height:s=12.5,markerUnits:o="strokeWidth",strokeWidth:i,orient:l="auto-start-reverse"})=>{const c=NP(t);return c?a.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:l,refX:"0",refY:"0",children:a.jsx(c,{color:n,strokeWidth:i})}):null},h0=({defaultColor:e,rfId:t})=>{const n=ie(o=>o.edges),r=ie(o=>o.defaultEdgeOptions),s=m.useMemo(()=>l4(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return s.length?a.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:a.jsx("defs",{children:s.map(o=>a.jsx(jP,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};h0.displayName="MarkerDefinitions";var bP=m.memo(h0);function m0({x:e,y:t,label:n,labelStyle:r,labelShowBg:s=!0,labelBgStyle:o,labelBgPadding:i=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...h}){const[d,f]=m.useState({x:1,y:0,width:0,height:0}),g=Ae(["react-flow__edge-textwrapper",u]),x=m.useRef(null);return m.useEffect(()=>{if(x.current){const v=x.current.getBBox();f({x:v.x,y:v.y,width:v.width,height:v.height})}},[n]),n?a.jsxs("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:g,visibility:d.width?"visible":"hidden",...h,children:[s&&a.jsx("rect",{width:d.width+2*i[0],x:-i[0],y:-i[1],height:d.height+2*i[1],className:"react-flow__edge-textbg",style:o,rx:l,ry:l}),a.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:x,style:r,children:n}),c]}):null}m0.displayName="EdgeText";const SP=m.memo(m0);function Al({path:e,labelX:t,labelY:n,label:r,labelStyle:s,labelShowBg:o,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...h}){return a.jsxs(a.Fragment,{children:[a.jsx("path",{...h,d:e,fill:"none",className:Ae(["react-flow__edge-path",h.className])}),u?a.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&Lt(t)&&Lt(n)?a.jsx(SP,{x:t,y:n,label:r,labelStyle:s,labelShowBg:o,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function mp({pos:e,x1:t,y1:n,x2:r,y2:s}){return e===Q.Left||e===Q.Right?[.5*(t+r),n]:[t,.5*(n+s)]}function p0({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:r,targetY:s,targetPosition:o=Q.Top}){const[i,l]=mp({pos:n,x1:e,y1:t,x2:r,y2:s}),[c,u]=mp({pos:o,x1:r,y1:s,x2:e,y2:t}),[h,d,f,g]=Av({sourceX:e,sourceY:t,targetX:r,targetY:s,sourceControlX:i,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${i},${l} ${c},${u} ${r},${s}`,h,d,f,g]}function g0(e){return m.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,sourcePosition:i,targetPosition:l,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:g,style:x,markerEnd:v,markerStart:N,interactionWidth:p})=>{const[w,y,j]=p0({sourceX:n,sourceY:r,sourcePosition:i,targetX:s,targetY:o,targetPosition:l}),b=e.isInternal?void 0:t;return a.jsx(Al,{id:b,path:w,labelX:y,labelY:j,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:g,style:x,markerEnd:v,markerStart:N,interactionWidth:p})})}const kP=g0({isInternal:!1}),x0=g0({isInternal:!0});kP.displayName="SimpleBezierEdge";x0.displayName="SimpleBezierEdgeInternal";function y0(e){return m.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,label:i,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:d,style:f,sourcePosition:g=Q.Bottom,targetPosition:x=Q.Top,markerEnd:v,markerStart:N,pathOptions:p,interactionWidth:w})=>{const[y,j,b]=Wu({sourceX:n,sourceY:r,sourcePosition:g,targetX:s,targetY:o,targetPosition:x,borderRadius:p==null?void 0:p.borderRadius,offset:p==null?void 0:p.offset,stepPosition:p==null?void 0:p.stepPosition}),E=e.isInternal?void 0:t;return a.jsx(Al,{id:E,path:y,labelX:j,labelY:b,label:i,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:d,style:f,markerEnd:v,markerStart:N,interactionWidth:w})})}const v0=y0({isInternal:!1}),w0=y0({isInternal:!0});v0.displayName="SmoothStepEdge";w0.displayName="SmoothStepEdgeInternal";function N0(e){return m.memo(({id:t,...n})=>{var s;const r=e.isInternal?void 0:t;return a.jsx(v0,{...n,id:r,pathOptions:m.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(s=n.pathOptions)==null?void 0:s.offset])})})}const CP=N0({isInternal:!1}),j0=N0({isInternal:!0});CP.displayName="StepEdge";j0.displayName="StepEdgeInternal";function b0(e){return m.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,label:i,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:d,style:f,markerEnd:g,markerStart:x,interactionWidth:v})=>{const[N,p,w]=$v({sourceX:n,sourceY:r,targetX:s,targetY:o}),y=e.isInternal?void 0:t;return a.jsx(Al,{id:y,path:N,labelX:p,labelY:w,label:i,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:d,style:f,markerEnd:g,markerStart:x,interactionWidth:v})})}const EP=b0({isInternal:!1}),S0=b0({isInternal:!0});EP.displayName="StraightEdge";S0.displayName="StraightEdgeInternal";function k0(e){return m.memo(({id:t,sourceX:n,sourceY:r,targetX:s,targetY:o,sourcePosition:i=Q.Bottom,targetPosition:l=Q.Top,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:g,style:x,markerEnd:v,markerStart:N,pathOptions:p,interactionWidth:w})=>{const[y,j,b]=zv({sourceX:n,sourceY:r,sourcePosition:i,targetX:s,targetY:o,targetPosition:l,curvature:p==null?void 0:p.curvature}),E=e.isInternal?void 0:t;return a.jsx(Al,{id:E,path:y,labelX:j,labelY:b,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:g,style:x,markerEnd:v,markerStart:N,interactionWidth:w})})}const _P=k0({isInternal:!1}),C0=k0({isInternal:!0});_P.displayName="BezierEdge";C0.displayName="BezierEdgeInternal";const pp={default:C0,straight:S0,step:j0,smoothstep:w0,simplebezier:x0},gp={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},PP=(e,t,n)=>n===Q.Left?e-t:n===Q.Right?e+t:e,MP=(e,t,n)=>n===Q.Top?e-t:n===Q.Bottom?e+t:e,xp="react-flow__edgeupdater";function yp({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:s,onMouseEnter:o,onMouseOut:i,type:l}){return a.jsx("circle",{onMouseDown:s,onMouseEnter:o,onMouseOut:i,className:Ae([xp,`${xp}-${l}`]),cx:PP(t,r,e),cy:MP(n,r,e),r,stroke:"transparent",fill:"transparent"})}function IP({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:s,targetX:o,targetY:i,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:h,onReconnectEnd:d,setReconnecting:f,setUpdateHover:g}){const x=ke(),v=(j,b)=>{if(j.button!==0)return;const{autoPanOnConnect:E,domNode:C,isValidConnection:M,connectionMode:R,connectionRadius:O,lib:T,onConnectStart:L,onConnectEnd:$,cancelConnection:_,nodeLookup:z,rfId:k,panBy:D,updateConnection:P}=x.getState(),S=b.type==="target",I=(B,V)=>{f(!1),d==null||d(B,n,b.type,V)},A=B=>u==null?void 0:u(n,B),F=(B,V)=>{f(!0),h==null||h(j,n,b.type),L==null||L(B,V)};Yu.onPointerDown(j.nativeEvent,{autoPanOnConnect:E,connectionMode:R,connectionRadius:O,domNode:C,handleId:b.id,nodeId:b.nodeId,nodeLookup:z,isTarget:S,edgeUpdaterType:b.type,lib:T,flowId:k,cancelConnection:_,panBy:D,isValidConnection:M,onConnect:A,onConnectStart:F,onConnectEnd:$,onReconnectEnd:I,updateConnection:P,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:j.currentTarget})},N=j=>v(j,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),p=j=>v(j,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),w=()=>g(!0),y=()=>g(!1);return a.jsxs(a.Fragment,{children:[(e===!0||e==="source")&&a.jsx(yp,{position:l,centerX:r,centerY:s,radius:t,onMouseDown:N,onMouseEnter:w,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&a.jsx(yp,{position:c,centerX:o,centerY:i,radius:t,onMouseDown:p,onMouseEnter:w,onMouseOut:y,type:"target"})]})}function RP({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:s,onDoubleClick:o,onContextMenu:i,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:h,onReconnect:d,onReconnectStart:f,onReconnectEnd:g,rfId:x,edgeTypes:v,noPanClassName:N,onError:p,disableKeyboardA11y:w}){let y=ie(ee=>ee.edgeLookup.get(e));const j=ie(ee=>ee.defaultEdgeOptions);y=j?{...j,...y}:y;let b=y.type||"default",E=(v==null?void 0:v[b])||pp[b];E===void 0&&(p==null||p("011",en.error011(b)),b="default",E=(v==null?void 0:v.default)||pp.default);const C=!!(y.focusable||t&&typeof y.focusable>"u"),M=typeof d<"u"&&(y.reconnectable||n&&typeof y.reconnectable>"u"),R=!!(y.selectable||r&&typeof y.selectable>"u"),O=m.useRef(null),[T,L]=m.useState(!1),[$,_]=m.useState(!1),z=ke(),{zIndex:k,sourceX:D,sourceY:P,targetX:S,targetY:I,sourcePosition:A,targetPosition:F}=ie(m.useCallback(ee=>{const J=ee.nodeLookup.get(y.source),ue=ee.nodeLookup.get(y.target);if(!J||!ue)return{zIndex:y.zIndex,...gp};const xe=a4({id:e,sourceNode:J,targetNode:ue,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:ee.connectionMode,onError:p});return{zIndex:J3({selected:y.selected,zIndex:y.zIndex,sourceNode:J,targetNode:ue,elevateOnSelect:ee.elevateEdgesOnSelect,zIndexMode:ee.zIndexMode}),...xe||gp}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Se),B=m.useMemo(()=>y.markerStart?`url('#${Ku(y.markerStart,x)}')`:void 0,[y.markerStart,x]),V=m.useMemo(()=>y.markerEnd?`url('#${Ku(y.markerEnd,x)}')`:void 0,[y.markerEnd,x]);if(y.hidden||D===null||P===null||S===null||I===null)return null;const G=ee=>{var le;const{addSelectedEdges:J,unselectNodesAndEdges:ue,multiSelectionActive:xe}=z.getState();R&&(z.setState({nodesSelectionActive:!1}),y.selected&&xe?(ue({nodes:[],edges:[y]}),(le=O.current)==null||le.blur()):J([e])),s&&s(ee,y)},Y=o?ee=>{o(ee,{...y})}:void 0,X=i?ee=>{i(ee,{...y})}:void 0,U=l?ee=>{l(ee,{...y})}:void 0,Z=c?ee=>{c(ee,{...y})}:void 0,se=u?ee=>{u(ee,{...y})}:void 0,ne=ee=>{var J;if(!w&&Nv.includes(ee.key)&&R){const{unselectNodesAndEdges:ue,addSelectedEdges:xe}=z.getState();ee.key==="Escape"?((J=O.current)==null||J.blur(),ue({edges:[y]})):xe([e])}};return a.jsx("svg",{style:{zIndex:k},children:a.jsxs("g",{className:Ae(["react-flow__edge",`react-flow__edge-${b}`,y.className,N,{selected:y.selected,animated:y.animated,inactive:!R&&!s,updating:T,selectable:R}]),onClick:G,onDoubleClick:Y,onContextMenu:X,onMouseEnter:U,onMouseMove:Z,onMouseLeave:se,onKeyDown:C?ne:void 0,tabIndex:C?0:void 0,role:y.ariaRole??(C?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":C?`${r0}-${x}`:void 0,ref:O,...y.domAttributes,children:[!$&&a.jsx(E,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:R,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:D,sourceY:P,targetX:S,targetY:I,sourcePosition:A,targetPosition:F,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:B,markerEnd:V,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),M&&a.jsx(IP,{edge:y,isReconnectable:M,reconnectRadius:h,onReconnect:d,onReconnectStart:f,onReconnectEnd:g,sourceX:D,sourceY:P,targetX:S,targetY:I,sourcePosition:A,targetPosition:F,setUpdateHover:L,setReconnecting:_})]})})}var TP=m.memo(RP);const LP=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function E0({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:s,onReconnect:o,onEdgeContextMenu:i,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:h,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:g,onReconnectEnd:x,disableKeyboardA11y:v}){const{edgesFocusable:N,edgesReconnectable:p,elementsSelectable:w,onError:y}=ie(LP,Se),j=yP(t);return a.jsxs("div",{className:"react-flow__edges",children:[a.jsx(bP,{defaultColor:e,rfId:n}),j.map(b=>a.jsx(TP,{id:b,edgesFocusable:N,edgesReconnectable:p,elementsSelectable:w,noPanClassName:s,onReconnect:o,onContextMenu:i,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:h,reconnectRadius:d,onDoubleClick:f,onReconnectStart:g,onReconnectEnd:x,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:v},b))]})}E0.displayName="EdgeRenderer";const AP=m.memo(E0),zP=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function DP({children:e}){const t=ie(zP);return a.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function $P(e){const t=_f(),n=m.useRef(!1);m.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const OP=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function FP(e){const t=ie(OP),n=ke();return m.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function HP(e){return e.connection.inProgress?{...e.connection,to:oi(e.connection.to,e.transform)}:{...e.connection}}function BP(e){return HP}function VP(e){const t=BP();return ie(t,Se)}const UP=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function WP({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:s,width:o,height:i,isValid:l,inProgress:c}=ie(UP,Se);return!(o&&s&&c)?null:a.jsx("svg",{style:e,width:o,height:i,className:"react-flow__connectionline react-flow__container",children:a.jsx("g",{className:Ae(["react-flow__connection",Sv(l)]),children:a.jsx(_0,{style:t,type:n,CustomComponent:r,isValid:l})})})}const _0=({style:e,type:t=Rn.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:s,from:o,fromNode:i,fromHandle:l,fromPosition:c,to:u,toNode:h,toHandle:d,toPosition:f,pointer:g}=VP();if(!s)return;if(n)return a.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:i,fromHandle:l,fromX:o.x,fromY:o.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:f,connectionStatus:Sv(r),toNode:h,toHandle:d,pointer:g});let x="";const v={sourceX:o.x,sourceY:o.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case Rn.Bezier:[x]=zv(v);break;case Rn.SimpleBezier:[x]=p0(v);break;case Rn.Step:[x]=Wu({...v,borderRadius:0});break;case Rn.SmoothStep:[x]=Wu(v);break;default:[x]=$v(v)}return a.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};_0.displayName="ConnectionLine";const KP={};function vp(e=KP){m.useRef(e),ke(),m.useEffect(()=>{},[e])}function GP(){ke(),m.useRef(!1),m.useEffect(()=>{},[])}function P0({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:o,onEdgeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:g,connectionLineType:x,connectionLineStyle:v,connectionLineComponent:N,connectionLineContainerStyle:p,selectionKeyCode:w,selectionOnDrag:y,selectionMode:j,multiSelectionKeyCode:b,panActivationKeyCode:E,zoomActivationKeyCode:C,deleteKeyCode:M,onlyRenderVisibleElements:R,elementsSelectable:O,defaultViewport:T,translateExtent:L,minZoom:$,maxZoom:_,preventScrolling:z,defaultMarkerColor:k,zoomOnScroll:D,zoomOnPinch:P,panOnScroll:S,panOnScrollSpeed:I,panOnScrollMode:A,zoomOnDoubleClick:F,panOnDrag:B,onPaneClick:V,onPaneMouseEnter:G,onPaneMouseMove:Y,onPaneMouseLeave:X,onPaneScroll:U,onPaneContextMenu:Z,paneClickDistance:se,nodeClickDistance:ne,onEdgeContextMenu:ee,onEdgeMouseEnter:J,onEdgeMouseMove:ue,onEdgeMouseLeave:xe,reconnectRadius:le,onReconnect:We,onReconnectStart:Nn,onReconnectEnd:rn,noDragClassName:rr,noWheelClassName:Ls,noPanClassName:As,disableKeyboardA11y:zs,nodeExtent:$l,rfId:ii,viewport:Lr,onViewportChange:Ds}){return vp(e),vp(t),GP(),$P(n),FP(Lr),a.jsx(lP,{onPaneClick:V,onPaneMouseEnter:G,onPaneMouseMove:Y,onPaneMouseLeave:X,onPaneContextMenu:Z,onPaneScroll:U,paneClickDistance:se,deleteKeyCode:M,selectionKeyCode:w,selectionOnDrag:y,selectionMode:j,onSelectionStart:f,onSelectionEnd:g,multiSelectionKeyCode:b,panActivationKeyCode:E,zoomActivationKeyCode:C,elementsSelectable:O,zoomOnScroll:D,zoomOnPinch:P,zoomOnDoubleClick:F,panOnScroll:S,panOnScrollSpeed:I,panOnScrollMode:A,panOnDrag:B,defaultViewport:T,translateExtent:L,minZoom:$,maxZoom:_,onSelectionContextMenu:d,preventScrolling:z,noDragClassName:rr,noWheelClassName:Ls,noPanClassName:As,disableKeyboardA11y:zs,onViewportChange:Ds,isControlledViewport:!!Lr,children:a.jsxs(DP,{children:[a.jsx(AP,{edgeTypes:t,onEdgeClick:s,onEdgeDoubleClick:i,onReconnect:We,onReconnectStart:Nn,onReconnectEnd:rn,onlyRenderVisibleElements:R,onEdgeContextMenu:ee,onEdgeMouseEnter:J,onEdgeMouseMove:ue,onEdgeMouseLeave:xe,reconnectRadius:le,defaultMarkerColor:k,noPanClassName:As,disableKeyboardA11y:zs,rfId:ii}),a.jsx(WP,{style:v,type:x,component:N,containerStyle:p}),a.jsx("div",{className:"react-flow__edgelabel-renderer"}),a.jsx(xP,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,nodeClickDistance:ne,onlyRenderVisibleElements:R,noPanClassName:As,noDragClassName:rr,disableKeyboardA11y:zs,nodeExtent:$l,rfId:ii}),a.jsx("div",{className:"react-flow__viewport-portal"})]})})}P0.displayName="GraphView";const YP=m.memo(P0),wp=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:s,height:o,fitView:i,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:h,nodeExtent:d,zIndexMode:f="basic"}={})=>{const g=new Map,x=new Map,v=new Map,N=new Map,p=r??t??[],w=n??e??[],y=h??[0,0],j=d??Fo;Hv(v,N,p);const b=Gu(w,g,x,{nodeOrigin:y,nodeExtent:j,zIndexMode:f});let E=[0,0,1];if(i&&s&&o){const C=ri(g,{filter:T=>!!((T.width||T.initialWidth)&&(T.height||T.initialHeight))}),{x:M,y:R,zoom:O}=Nf(C,s,o,c,u,(l==null?void 0:l.padding)??.1);E=[M,R,O]}return{rfId:"1",width:s??0,height:o??0,transform:E,nodes:w,nodesInitialized:b,nodeLookup:g,parentLookup:x,edges:p,edgeLookup:N,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Fo,nodeExtent:j,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ns.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,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:i??!1,fitViewOptions:l,fitViewResolver:null,connection:{...bv},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:G3,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:jv,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},XP=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:s,height:o,fitView:i,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:d,zIndexMode:f})=>d5((g,x)=>{async function v(){const{nodeLookup:N,panZoom:p,fitViewOptions:w,fitViewResolver:y,width:j,height:b,minZoom:E,maxZoom:C}=x();p&&(await W3({nodes:N,width:j,height:b,panZoom:p,minZoom:E,maxZoom:C},w),y==null||y.resolve(!0),g({fitViewResolver:null}))}return{...wp({nodes:e,edges:t,width:s,height:o,fitView:i,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:N=>{const{nodeLookup:p,parentLookup:w,nodeOrigin:y,elevateNodesOnSelect:j,fitViewQueued:b,zIndexMode:E}=x(),C=Gu(N,p,w,{nodeOrigin:y,nodeExtent:d,elevateNodesOnSelect:j,checkEquality:!0,zIndexMode:E});b&&C?(v(),g({nodes:N,nodesInitialized:C,fitViewQueued:!1,fitViewOptions:void 0})):g({nodes:N,nodesInitialized:C})},setEdges:N=>{const{connectionLookup:p,edgeLookup:w}=x();Hv(p,w,N),g({edges:N})},setDefaultNodesAndEdges:(N,p)=>{if(N){const{setNodes:w}=x();w(N),g({hasDefaultNodes:!0})}if(p){const{setEdges:w}=x();w(p),g({hasDefaultEdges:!0})}},updateNodeInternals:N=>{const{triggerNodeChanges:p,nodeLookup:w,parentLookup:y,domNode:j,nodeOrigin:b,nodeExtent:E,debug:C,fitViewQueued:M,zIndexMode:R}=x(),{changes:O,updatedInternals:T}=p4(N,w,y,j,b,E,R);T&&(d4(w,y,{nodeOrigin:b,nodeExtent:E,zIndexMode:R}),M?(v(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(O==null?void 0:O.length)>0&&(C&&console.log("React Flow: trigger node changes",O),p==null||p(O)))},updateNodePositions:(N,p=!1)=>{const w=[];let y=[];const{nodeLookup:j,triggerNodeChanges:b,connection:E,updateConnection:C,onNodesChangeMiddlewareMap:M}=x();for(const[R,O]of N){const T=j.get(R),L=!!(T!=null&&T.expandParent&&(T!=null&&T.parentId)&&(O!=null&&O.position)),$={id:R,type:"position",position:L?{x:Math.max(0,O.position.x),y:Math.max(0,O.position.y)}:O.position,dragging:p};if(T&&E.inProgress&&E.fromNode.id===T.id){const _=Cr(T,E.fromHandle,Q.Left,!0);C({...E,from:_})}L&&T.parentId&&w.push({id:R,parentId:T.parentId,rect:{...O.internals.positionAbsolute,width:O.measured.width??0,height:O.measured.height??0}}),y.push($)}if(w.length>0){const{parentLookup:R,nodeOrigin:O}=x(),T=Ef(w,j,R,O);y.push(...T)}for(const R of M.values())y=R(y);b(y)},triggerNodeChanges:N=>{const{onNodesChange:p,setNodes:w,nodes:y,hasDefaultNodes:j,debug:b}=x();if(N!=null&&N.length){if(j){const E=R5(N,y);w(E)}b&&console.log("React Flow: trigger node changes",N),p==null||p(N)}},triggerEdgeChanges:N=>{const{onEdgesChange:p,setEdges:w,edges:y,hasDefaultEdges:j,debug:b}=x();if(N!=null&&N.length){if(j){const E=T5(N,y);w(E)}b&&console.log("React Flow: trigger edge changes",N),p==null||p(N)}},addSelectedNodes:N=>{const{multiSelectionActive:p,edgeLookup:w,nodeLookup:y,triggerNodeChanges:j,triggerEdgeChanges:b}=x();if(p){const E=N.map(C=>ir(C,!0));j(E);return}j(es(y,new Set([...N]),!0)),b(es(w))},addSelectedEdges:N=>{const{multiSelectionActive:p,edgeLookup:w,nodeLookup:y,triggerNodeChanges:j,triggerEdgeChanges:b}=x();if(p){const E=N.map(C=>ir(C,!0));b(E);return}b(es(w,new Set([...N]))),j(es(y,new Set,!0))},unselectNodesAndEdges:({nodes:N,edges:p}={})=>{const{edges:w,nodes:y,nodeLookup:j,triggerNodeChanges:b,triggerEdgeChanges:E}=x(),C=N||y,M=p||w,R=C.map(T=>{const L=j.get(T.id);return L&&(L.selected=!1),ir(T.id,!1)}),O=M.map(T=>ir(T.id,!1));b(R),E(O)},setMinZoom:N=>{const{panZoom:p,maxZoom:w}=x();p==null||p.setScaleExtent([N,w]),g({minZoom:N})},setMaxZoom:N=>{const{panZoom:p,minZoom:w}=x();p==null||p.setScaleExtent([w,N]),g({maxZoom:N})},setTranslateExtent:N=>{var p;(p=x().panZoom)==null||p.setTranslateExtent(N),g({translateExtent:N})},resetSelectedElements:()=>{const{edges:N,nodes:p,triggerNodeChanges:w,triggerEdgeChanges:y,elementsSelectable:j}=x();if(!j)return;const b=p.reduce((C,M)=>M.selected?[...C,ir(M.id,!1)]:C,[]),E=N.reduce((C,M)=>M.selected?[...C,ir(M.id,!1)]:C,[]);w(b),y(E)},setNodeExtent:N=>{const{nodes:p,nodeLookup:w,parentLookup:y,nodeOrigin:j,elevateNodesOnSelect:b,nodeExtent:E,zIndexMode:C}=x();N[0][0]===E[0][0]&&N[0][1]===E[0][1]&&N[1][0]===E[1][0]&&N[1][1]===E[1][1]||(Gu(p,w,y,{nodeOrigin:j,nodeExtent:N,elevateNodesOnSelect:b,checkEquality:!1,zIndexMode:C}),g({nodeExtent:N}))},panBy:N=>{const{transform:p,width:w,height:y,panZoom:j,translateExtent:b}=x();return g4({delta:N,panZoom:j,transform:p,translateExtent:b,width:w,height:y})},setCenter:async(N,p,w)=>{const{width:y,height:j,maxZoom:b,panZoom:E}=x();if(!E)return Promise.resolve(!1);const C=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:b;return await E.setViewport({x:y/2-N*C,y:j/2-p*C,zoom:C},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{g({connection:{...bv}})},updateConnection:N=>{g({connection:N})},reset:()=>g({...wp()})}},Object.is);function QP({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:s,initialHeight:o,initialMinZoom:i,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:h,nodeExtent:d,zIndexMode:f,children:g}){const[x]=m.useState(()=>XP({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:s,height:o,fitView:u,minZoom:i,maxZoom:l,fitViewOptions:c,nodeOrigin:h,nodeExtent:d,zIndexMode:f}));return a.jsx(f5,{value:x,children:a.jsx(D5,{children:g})})}function qP({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:s,width:o,height:i,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:h,nodeOrigin:d,nodeExtent:f,zIndexMode:g}){return m.useContext(Rl)?a.jsx(a.Fragment,{children:e}):a.jsx(QP,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:s,initialWidth:o,initialHeight:i,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:h,nodeOrigin:d,nodeExtent:f,zIndexMode:g,children:e})}const ZP={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function JP({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:s,nodeTypes:o,edgeTypes:i,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:h,onMoveStart:d,onMoveEnd:f,onConnect:g,onConnectStart:x,onConnectEnd:v,onClickConnectStart:N,onClickConnectEnd:p,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:j,onNodeContextMenu:b,onNodeDoubleClick:E,onNodeDragStart:C,onNodeDrag:M,onNodeDragStop:R,onNodesDelete:O,onEdgesDelete:T,onDelete:L,onSelectionChange:$,onSelectionDragStart:_,onSelectionDrag:z,onSelectionDragStop:k,onSelectionContextMenu:D,onSelectionStart:P,onSelectionEnd:S,onBeforeDelete:I,connectionMode:A,connectionLineType:F=Rn.Bezier,connectionLineStyle:B,connectionLineComponent:V,connectionLineContainerStyle:G,deleteKeyCode:Y="Backspace",selectionKeyCode:X="Shift",selectionOnDrag:U=!1,selectionMode:Z=Ho.Full,panActivationKeyCode:se="Space",multiSelectionKeyCode:ne=Vo()?"Meta":"Control",zoomActivationKeyCode:ee=Vo()?"Meta":"Control",snapToGrid:J,snapGrid:ue,onlyRenderVisibleElements:xe=!1,selectNodesOnDrag:le,nodesDraggable:We,autoPanOnNodeFocus:Nn,nodesConnectable:rn,nodesFocusable:rr,nodeOrigin:Ls=s0,edgesFocusable:As,edgesReconnectable:zs,elementsSelectable:$l=!0,defaultViewport:ii=k5,minZoom:Lr=.5,maxZoom:Ds=2,translateExtent:Lf=Fo,preventScrolling:J0=!0,nodeExtent:Ol,defaultMarkerColor:ew="#b1b1b7",zoomOnScroll:tw=!0,zoomOnPinch:nw=!0,panOnScroll:rw=!1,panOnScrollSpeed:sw=.5,panOnScrollMode:ow=pr.Free,zoomOnDoubleClick:iw=!0,panOnDrag:aw=!0,onPaneClick:lw,onPaneMouseEnter:cw,onPaneMouseMove:uw,onPaneMouseLeave:dw,onPaneScroll:fw,onPaneContextMenu:hw,paneClickDistance:mw=1,nodeClickDistance:pw=0,children:gw,onReconnect:xw,onReconnectStart:yw,onReconnectEnd:vw,onEdgeContextMenu:ww,onEdgeDoubleClick:Nw,onEdgeMouseEnter:jw,onEdgeMouseMove:bw,onEdgeMouseLeave:Sw,reconnectRadius:kw=10,onNodesChange:Cw,onEdgesChange:Ew,noDragClassName:_w="nodrag",noWheelClassName:Pw="nowheel",noPanClassName:Af="nopan",fitView:zf,fitViewOptions:Df,connectOnClick:Mw,attributionPosition:Iw,proOptions:Rw,defaultEdgeOptions:Tw,elevateNodesOnSelect:Lw=!0,elevateEdgesOnSelect:Aw=!1,disableKeyboardA11y:$f=!1,autoPanOnConnect:zw,autoPanOnNodeDrag:Dw,autoPanSpeed:$w,connectionRadius:Ow,isValidConnection:Fw,onError:Hw,style:Bw,id:Of,nodeDragThreshold:Vw,connectionDragThreshold:Uw,viewport:Ww,onViewportChange:Kw,width:Gw,height:Yw,colorMode:Xw="light",debug:Qw,onScroll:ai,ariaLabelConfig:qw,zIndexMode:Ff="basic",...Zw},Jw){const Fl=Of||"1",e1=P5(Xw),t1=m.useCallback(Hf=>{Hf.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ai==null||ai(Hf)},[ai]);return a.jsx("div",{"data-testid":"rf__wrapper",...Zw,onScroll:t1,style:{...Bw,...ZP},ref:Jw,className:Ae(["react-flow",s,e1]),id:Of,role:"application",children:a.jsxs(qP,{nodes:e,edges:t,width:Gw,height:Yw,fitView:zf,fitViewOptions:Df,minZoom:Lr,maxZoom:Ds,nodeOrigin:Ls,nodeExtent:Ol,zIndexMode:Ff,children:[a.jsx(YP,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:j,onNodeContextMenu:b,onNodeDoubleClick:E,nodeTypes:o,edgeTypes:i,connectionLineType:F,connectionLineStyle:B,connectionLineComponent:V,connectionLineContainerStyle:G,selectionKeyCode:X,selectionOnDrag:U,selectionMode:Z,deleteKeyCode:Y,multiSelectionKeyCode:ne,panActivationKeyCode:se,zoomActivationKeyCode:ee,onlyRenderVisibleElements:xe,defaultViewport:ii,translateExtent:Lf,minZoom:Lr,maxZoom:Ds,preventScrolling:J0,zoomOnScroll:tw,zoomOnPinch:nw,zoomOnDoubleClick:iw,panOnScroll:rw,panOnScrollSpeed:sw,panOnScrollMode:ow,panOnDrag:aw,onPaneClick:lw,onPaneMouseEnter:cw,onPaneMouseMove:uw,onPaneMouseLeave:dw,onPaneScroll:fw,onPaneContextMenu:hw,paneClickDistance:mw,nodeClickDistance:pw,onSelectionContextMenu:D,onSelectionStart:P,onSelectionEnd:S,onReconnect:xw,onReconnectStart:yw,onReconnectEnd:vw,onEdgeContextMenu:ww,onEdgeDoubleClick:Nw,onEdgeMouseEnter:jw,onEdgeMouseMove:bw,onEdgeMouseLeave:Sw,reconnectRadius:kw,defaultMarkerColor:ew,noDragClassName:_w,noWheelClassName:Pw,noPanClassName:Af,rfId:Fl,disableKeyboardA11y:$f,nodeExtent:Ol,viewport:Ww,onViewportChange:Kw}),a.jsx(_5,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:x,onConnectEnd:v,onClickConnectStart:N,onClickConnectEnd:p,nodesDraggable:We,autoPanOnNodeFocus:Nn,nodesConnectable:rn,nodesFocusable:rr,edgesFocusable:As,edgesReconnectable:zs,elementsSelectable:$l,elevateNodesOnSelect:Lw,elevateEdgesOnSelect:Aw,minZoom:Lr,maxZoom:Ds,nodeExtent:Ol,onNodesChange:Cw,onEdgesChange:Ew,snapToGrid:J,snapGrid:ue,connectionMode:A,translateExtent:Lf,connectOnClick:Mw,defaultEdgeOptions:Tw,fitView:zf,fitViewOptions:Df,onNodesDelete:O,onEdgesDelete:T,onDelete:L,onNodeDragStart:C,onNodeDrag:M,onNodeDragStop:R,onSelectionDrag:z,onSelectionDragStart:_,onSelectionDragStop:k,onMove:h,onMoveStart:d,onMoveEnd:f,noPanClassName:Af,nodeOrigin:Ls,rfId:Fl,autoPanOnConnect:zw,autoPanOnNodeDrag:Dw,autoPanSpeed:$w,onError:Hw,connectionRadius:Ow,isValidConnection:Fw,selectNodesOnDrag:le,nodeDragThreshold:Vw,connectionDragThreshold:Uw,onBeforeDelete:I,debug:Qw,ariaLabelConfig:qw,zIndexMode:Ff}),a.jsx(S5,{onSelectionChange:$}),gw,a.jsx(v5,{proOptions:Rw,position:Iw}),a.jsx(y5,{rfId:Fl,disableKeyboardA11y:$f})]})})}var eM=i0(JP);function tM({dimensions:e,lineWidth:t,variant:n,className:r}){return a.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Ae(["react-flow__background-pattern",n,r])})}function nM({radius:e,className:t}){return a.jsx("circle",{cx:e,cy:e,r:e,className:Ae(["react-flow__background-pattern","dots",t])})}var Vn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Vn||(Vn={}));const rM={[Vn.Dots]:1,[Vn.Lines]:1,[Vn.Cross]:6},sM=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function M0({id:e,variant:t=Vn.Dots,gap:n=20,size:r,lineWidth:s=1,offset:o=0,color:i,bgColor:l,style:c,className:u,patternClassName:h}){const d=m.useRef(null),{transform:f,patternId:g}=ie(sM,Se),x=r||rM[t],v=t===Vn.Dots,N=t===Vn.Cross,p=Array.isArray(n)?n:[n,n],w=[p[0]*f[2]||1,p[1]*f[2]||1],y=x*f[2],j=Array.isArray(o)?o:[o,o],b=N?[y,y]:w,E=[j[0]*f[2]||1+b[0]/2,j[1]*f[2]||1+b[1]/2],C=`${g}${e||""}`;return a.jsxs("svg",{className:Ae(["react-flow__background",u]),style:{...c,...Ll,"--xy-background-color-props":l,"--xy-background-pattern-color-props":i},ref:d,"data-testid":"rf__background",children:[a.jsx("pattern",{id:C,x:f[0]%w[0],y:f[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:v?a.jsx(nM,{radius:y/2,className:h}):a.jsx(tM,{dimensions:b,lineWidth:s,variant:t,className:h})}),a.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${C})`})]})}M0.displayName="Background";const oM=m.memo(M0);function iM(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:a.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function aM(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:a.jsx("path",{d:"M0 0h32v4.2H0z"})})}function lM(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:a.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 cM(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:a.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 uM(){return a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:a.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 Fi({children:e,className:t,...n}){return a.jsx("button",{type:"button",className:Ae(["react-flow__controls-button",t]),...n,children:e})}const dM=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function I0({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:o,onZoomOut:i,onFitView:l,onInteractiveChange:c,className:u,children:h,position:d="bottom-left",orientation:f="vertical","aria-label":g}){const x=ke(),{isInteractive:v,minZoomReached:N,maxZoomReached:p,ariaLabelConfig:w}=ie(dM,Se),{zoomIn:y,zoomOut:j,fitView:b}=_f(),E=()=>{y(),o==null||o()},C=()=>{j(),i==null||i()},M=()=>{b(s),l==null||l()},R=()=>{x.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),c==null||c(!v)},O=f==="horizontal"?"horizontal":"vertical";return a.jsxs(Tl,{className:Ae(["react-flow__controls",O,u]),position:d,style:e,"data-testid":"rf__controls","aria-label":g??w["controls.ariaLabel"],children:[t&&a.jsxs(a.Fragment,{children:[a.jsx(Fi,{onClick:E,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:p,children:a.jsx(iM,{})}),a.jsx(Fi,{onClick:C,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:N,children:a.jsx(aM,{})})]}),n&&a.jsx(Fi,{className:"react-flow__controls-fitview",onClick:M,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:a.jsx(lM,{})}),r&&a.jsx(Fi,{className:"react-flow__controls-interactive",onClick:R,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:v?a.jsx(uM,{}):a.jsx(cM,{})}),h]})}I0.displayName="Controls";const fM=m.memo(I0);function hM({id:e,x:t,y:n,width:r,height:s,style:o,color:i,strokeColor:l,strokeWidth:c,className:u,borderRadius:h,shapeRendering:d,selected:f,onClick:g}){const{background:x,backgroundColor:v}=o||{},N=i||x||v;return a.jsx("rect",{className:Ae(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:h,ry:h,width:r,height:s,style:{fill:N,stroke:l,strokeWidth:c},shapeRendering:d,onClick:g?p=>g(p,e):void 0})}const mM=m.memo(hM),pM=e=>e.nodes.map(t=>t.id),Rc=e=>e instanceof Function?e:()=>e;function gM({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:o=mM,onClick:i}){const l=ie(pM,Se),c=Rc(t),u=Rc(e),h=Rc(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return a.jsx(a.Fragment,{children:l.map(f=>a.jsx(yM,{id:f,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:o,onClick:i,shapeRendering:d},f))})}function xM({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:o,shapeRendering:i,NodeComponent:l,onClick:c}){const{node:u,x:h,y:d,width:f,height:g}=ie(x=>{const{internals:v}=x.nodeLookup.get(e),N=v.userNode,{x:p,y:w}=v.positionAbsolute,{width:y,height:j}=wn(N);return{node:N,x:p,y:w,width:y,height:j}},Se);return!u||u.hidden||!Mv(u)?null:a.jsx(l,{x:h,y:d,width:f,height:g,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:s,strokeColor:n(u),strokeWidth:o,shapeRendering:i,onClick:c,id:u.id})}const yM=m.memo(xM);var vM=m.memo(gM);const wM=200,NM=150,jM=e=>!e.hidden,bM=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Pv(ri(e.nodeLookup,{filter:jM}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},SM="react-flow__minimap-desc";function R0({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:s="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:h,maskStrokeWidth:d,position:f="bottom-right",onClick:g,onNodeClick:x,pannable:v=!1,zoomable:N=!1,ariaLabel:p,inversePan:w,zoomStep:y=1,offsetScale:j=5}){const b=ke(),E=m.useRef(null),{boundingRect:C,viewBB:M,rfId:R,panZoom:O,translateExtent:T,flowWidth:L,flowHeight:$,ariaLabelConfig:_}=ie(bM,Se),z=(e==null?void 0:e.width)??wM,k=(e==null?void 0:e.height)??NM,D=C.width/z,P=C.height/k,S=Math.max(D,P),I=S*z,A=S*k,F=j*S,B=C.x-(I-C.width)/2-F,V=C.y-(A-C.height)/2-F,G=I+F*2,Y=A+F*2,X=`${SM}-${R}`,U=m.useRef(0),Z=m.useRef();U.current=S,m.useEffect(()=>{if(E.current&&O)return Z.current=k4({domNode:E.current,panZoom:O,getTransform:()=>b.getState().transform,getViewScale:()=>U.current}),()=>{var J;(J=Z.current)==null||J.destroy()}},[O]),m.useEffect(()=>{var J;(J=Z.current)==null||J.update({translateExtent:T,width:L,height:$,inversePan:w,pannable:v,zoomStep:y,zoomable:N})},[v,N,w,y,T,L,$]);const se=g?J=>{var le;const[ue,xe]=((le=Z.current)==null?void 0:le.pointer(J))||[0,0];g(J,{x:ue,y:xe})}:void 0,ne=x?m.useCallback((J,ue)=>{const xe=b.getState().nodeLookup.get(ue).internals.userNode;x(J,xe)},[]):void 0,ee=p??_["minimap.ariaLabel"];return a.jsx(Tl,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*S:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof i=="number"?i:void 0},className:Ae(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:a.jsxs("svg",{width:z,height:k,viewBox:`${B} ${V} ${G} ${Y}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":X,ref:E,onClick:se,children:[ee&&a.jsx("title",{id:X,children:ee}),a.jsx(vM,{onClick:ne,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:s,nodeStrokeWidth:i,nodeComponent:l}),a.jsx("path",{className:"react-flow__minimap-mask",d:`M${B-F},${V-F}h${G+F*2}v${Y+F*2}h${-G-F*2}z
|
|
407
|
+
M${M.x},${M.y}h${M.width}v${M.height}h${-M.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}R0.displayName="MiniMap";m.memo(R0);const kM=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,CM={[ks.Line]:"right",[ks.Handle]:"bottom-right"};function EM({nodeId:e,position:t,variant:n=ks.Handle,className:r,style:s=void 0,children:o,color:i,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:g=!0,shouldResize:x,onResizeStart:v,onResize:N,onResizeEnd:p}){const w=u0(),y=typeof e=="string"?e:w,j=ke(),b=m.useRef(null),E=n===ks.Handle,C=ie(m.useCallback(kM(E&&g),[E,g]),Se),M=m.useRef(null),R=t??CM[n];m.useEffect(()=>{if(!(!b.current||!y))return M.current||(M.current=O4({domNode:b.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:T,transform:L,snapGrid:$,snapToGrid:_,nodeOrigin:z,domNode:k}=j.getState();return{nodeLookup:T,transform:L,snapGrid:$,snapToGrid:_,nodeOrigin:z,paneDomNode:k}},onChange:(T,L)=>{const{triggerNodeChanges:$,nodeLookup:_,parentLookup:z,nodeOrigin:k}=j.getState(),D=[],P={x:T.x,y:T.y},S=_.get(y);if(S&&S.expandParent&&S.parentId){const I=S.origin??k,A=T.width??S.measured.width??0,F=T.height??S.measured.height??0,B={id:S.id,parentId:S.parentId,rect:{width:A,height:F,...Iv({x:T.x??S.position.x,y:T.y??S.position.y},{width:A,height:F},S.parentId,_,I)}},V=Ef([B],_,z,k);D.push(...V),P.x=T.x?Math.max(I[0]*A,T.x):void 0,P.y=T.y?Math.max(I[1]*F,T.y):void 0}if(P.x!==void 0&&P.y!==void 0){const I={id:y,type:"position",position:{...P}};D.push(I)}if(T.width!==void 0&&T.height!==void 0){const A={id:y,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:T.width,height:T.height}};D.push(A)}for(const I of L){const A={...I,type:"position"};D.push(A)}$(D)},onEnd:({width:T,height:L})=>{const $={id:y,type:"dimensions",resizing:!1,dimensions:{width:T,height:L}};j.getState().triggerNodeChanges([$])}})),M.current.update({controlPosition:R,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:h},keepAspectRatio:d,resizeDirection:f,onResizeStart:v,onResize:N,onResizeEnd:p,shouldResize:x}),()=>{var T;(T=M.current)==null||T.destroy()}},[R,l,c,u,h,d,v,N,p,x]);const O=R.split("-");return a.jsx("div",{className:Ae(["react-flow__resize-control","nodrag",...O,n,r]),ref:b,style:{...s,scale:C,...i&&{[E?"backgroundColor":"borderColor"]:i}},children:o})}m.memo(EM);function _M(){const[e,t]=m.useState(()=>document.documentElement.classList.contains("dark"));return m.useEffect(()=>{const n=new MutationObserver(()=>t(document.documentElement.classList.contains("dark")));return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()},[]),e}function PM(){const[e,t]=m.useState([]),[n,r]=m.useState([]),[s,o]=m.useState(!0),i=_M();m.useEffect(()=>{Promise.all([te.discovery.agents(),te.observations.permissions()]).then(([u,h])=>{t(u.data??[]),r(h.data??[]),o(!1)}).catch(()=>o(!1))},[]);const{nodes:l,edges:c}=m.useMemo(()=>{const u=[],h=[],d=new Set,f=new Map,g=i?{background:"#18181b",color:"#fafafa",border:"1px solid #3f3f46"}:{background:"#ffffff",color:"#09090b",border:"1px solid #e4e4e7"},x=i?{background:"#09090b",color:"#a1a1aa",border:"1px solid #3f3f46"}:{background:"#f4f4f5",color:"#52525b",border:"1px solid #d4d4d8"},v=i?"#52525b":"#a1a1aa",N=i?"#27272a":"#e4e4e7";return e.forEach((p,w)=>{const y=`agent-${p.id}`;p.registeredAgentId&&f.set(p.registeredAgentId,y),f.set(p.id,y),u.push({id:y,position:{x:100,y:w*120},data:{label:`${p.emoji||"🤖"} ${p.name}`},style:{...g,borderRadius:"8px",padding:"8px 16px",fontSize:"13px"}})}),n.forEach(p=>{const w=`tool-${p.toolName}`;d.has(p.toolName)||(d.add(p.toolName),u.push({id:w,position:{x:400,y:d.size*80},data:{label:`🔧 ${p.toolName}`},style:{...x,borderRadius:"8px",padding:"6px 12px",fontSize:"12px"}}));const y=f.get(p.agentId)??`agent-${p.agentId}`;h.push({id:`e-${p.agentId}-${p.toolName}`,source:y,target:w,animated:p.accessPattern==="write",style:{stroke:p.accessPattern==="write"?"#eab308":v}})}),{nodes:u,edges:h,bgColor:N}},[e,n,i]);return s?a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Identity Graph"}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Agent-to-tool relationship visualization"})]}),a.jsx("div",{className:"h-[600px] rounded-lg border border-border bg-card",children:a.jsxs(eM,{nodes:l,edges:c,fitView:!0,proOptions:{hideAttribution:!0},children:[a.jsx(oM,{color:i?"#27272a":"#e4e4e7",gap:20}),a.jsx(fM,{})]})})]})}const Mf=m.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:Te("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));Mf.displayName="Textarea";function MM(e){const t=e+"CollectionProvider",[n,r]=wl(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:x,children:v}=g,N=Wt.useRef(null),p=Wt.useRef(new Map).current;return a.jsx(s,{scope:x,itemMap:p,collectionRef:N,children:v})};i.displayName=t;const l=e+"CollectionSlot",c=Wt.forwardRef((g,x)=>{const{scope:v,children:N}=g,p=o(l,v),w=Jt(x,p.collectionRef);return a.jsx(ys,{ref:w,children:N})});c.displayName=l;const u=e+"CollectionItemSlot",h="data-radix-collection-item",d=Wt.forwardRef((g,x)=>{const{scope:v,children:N,...p}=g,w=Wt.useRef(null),y=Jt(x,w),j=o(u,v);return Wt.useEffect(()=>(j.itemMap.set(w,{ref:w,...p}),()=>void j.itemMap.delete(w))),a.jsx(ys,{[h]:"",ref:y,children:N})});d.displayName=u;function f(g){const x=o(e+"CollectionConsumer",g);return Wt.useCallback(()=>{const N=x.collectionRef.current;if(!N)return[];const p=Array.from(N.querySelectorAll(`[${h}]`));return Array.from(x.itemMap.values()).sort((j,b)=>p.indexOf(j.ref.current)-p.indexOf(b.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:c,ItemSlot:d},f,r]}var IM=m.createContext(void 0);function T0(e){const t=m.useContext(IM);return e||t||"ltr"}var Tc="rovingFocusGroup.onEntryFocus",RM={bubbles:!1,cancelable:!0},zl="RovingFocusGroup",[Qu,L0,TM]=MM(zl),[LM,A0]=wl(zl,[TM]),[AM,zM]=LM(zl),z0=m.forwardRef((e,t)=>a.jsx(Qu.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(Qu.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(DM,{...e,ref:t})})}));z0.displayName=zl;var DM=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:h=!1,...d}=e,f=m.useRef(null),g=Jt(t,f),x=T0(o),[v=null,N]=af({prop:i,defaultProp:l,onChange:c}),[p,w]=m.useState(!1),y=Qn(u),j=L0(n),b=m.useRef(!1),[E,C]=m.useState(0);return m.useEffect(()=>{const M=f.current;if(M)return M.addEventListener(Tc,y),()=>M.removeEventListener(Tc,y)},[y]),a.jsx(AM,{scope:n,orientation:r,dir:x,loop:s,currentTabStopId:v,onItemFocus:m.useCallback(M=>N(M),[N]),onItemShiftTab:m.useCallback(()=>w(!0),[]),onFocusableItemAdd:m.useCallback(()=>C(M=>M+1),[]),onFocusableItemRemove:m.useCallback(()=>C(M=>M-1),[]),children:a.jsx(tt.div,{tabIndex:p||E===0?-1:0,"data-orientation":r,...d,ref:g,style:{outline:"none",...e.style},onMouseDown:Ve(e.onMouseDown,()=>{b.current=!0}),onFocus:Ve(e.onFocus,M=>{const R=!b.current;if(M.target===M.currentTarget&&R&&!p){const O=new CustomEvent(Tc,RM);if(M.currentTarget.dispatchEvent(O),!O.defaultPrevented){const T=j().filter(k=>k.focusable),L=T.find(k=>k.active),$=T.find(k=>k.id===v),z=[L,$,...T].filter(Boolean).map(k=>k.ref.current);O0(z,h)}}b.current=!1}),onBlur:Ve(e.onBlur,()=>w(!1))})})}),D0="RovingFocusGroupItem",$0=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,...i}=e,l=mo(),c=o||l,u=zM(D0,n),h=u.currentTabStopId===c,d=L0(n),{onFocusableItemAdd:f,onFocusableItemRemove:g}=u;return m.useEffect(()=>{if(r)return f(),()=>g()},[r,f,g]),a.jsx(Qu.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:a.jsx(tt.span,{tabIndex:h?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:Ve(e.onMouseDown,x=>{r?u.onItemFocus(c):x.preventDefault()}),onFocus:Ve(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:Ve(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const v=FM(x,u.orientation,u.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let p=d().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")p.reverse();else if(v==="prev"||v==="next"){v==="prev"&&p.reverse();const w=p.indexOf(x.currentTarget);p=u.loop?HM(p,w+1):p.slice(w+1)}setTimeout(()=>O0(p))}})})})});$0.displayName=D0;var $M={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function OM(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function FM(e,t,n){const r=OM(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $M[r]}function O0(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function HM(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var BM=z0,VM=$0,If="Tabs",[UM]=wl(If,[A0]),F0=A0(),[WM,Rf]=UM(If),H0=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:l,activationMode:c="automatic",...u}=e,h=T0(l),[d,f]=af({prop:r,onChange:s,defaultProp:o});return a.jsx(WM,{scope:n,baseId:mo(),value:d,onValueChange:f,orientation:i,dir:h,activationMode:c,children:a.jsx(tt.div,{dir:h,"data-orientation":i,...u,ref:t})})});H0.displayName=If;var B0="TabsList",V0=m.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=Rf(B0,n),i=F0(n);return a.jsx(BM,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:r,children:a.jsx(tt.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});V0.displayName=B0;var U0="TabsTrigger",W0=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,i=Rf(U0,n),l=F0(n),c=Y0(i.baseId,r),u=X0(i.baseId,r),h=r===i.value;return a.jsx(VM,{asChild:!0,...l,focusable:!s,active:h,children:a.jsx(tt.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":u,"data-state":h?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...o,ref:t,onMouseDown:Ve(e.onMouseDown,d=>{!s&&d.button===0&&d.ctrlKey===!1?i.onValueChange(r):d.preventDefault()}),onKeyDown:Ve(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(r)}),onFocus:Ve(e.onFocus,()=>{const d=i.activationMode!=="manual";!h&&!s&&d&&i.onValueChange(r)})})})});W0.displayName=U0;var K0="TabsContent",G0=m.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...i}=e,l=Rf(K0,n),c=Y0(l.baseId,r),u=X0(l.baseId,r),h=r===l.value,d=m.useRef(h);return m.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),a.jsx(Jo,{present:s||h,children:({present:f})=>a.jsx(tt.div,{"data-state":h?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&o})})});G0.displayName=K0;function Y0(e,t){return`${e}-trigger-${t}`}function X0(e,t){return`${e}-content-${t}`}var KM=H0,Q0=V0,q0=W0,Z0=G0;const Tf=KM,Dl=m.forwardRef(({className:e,...t},n)=>a.jsx(Q0,{ref:n,className:Te("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Dl.displayName=Q0.displayName;const nt=m.forwardRef(({className:e,...t},n)=>a.jsx(q0,{ref:n,className:Te("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));nt.displayName=q0.displayName;const rt=m.forwardRef(({className:e,...t},n)=>a.jsx(Z0,{ref:n,className:Te("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));rt.displayName=Z0.displayName;function GM({message:e,type:t,onClose:n}){return m.useEffect(()=>{const r=setTimeout(n,4e3);return()=>clearTimeout(r)},[n]),a.jsxs("div",{className:`fixed bottom-6 right-6 z-[100] flex items-center gap-2 rounded-lg border px-4 py-3 shadow-lg transition-all animate-in slide-in-from-bottom-4 ${t==="success"?"border-emerald-500/30 bg-emerald-50 text-emerald-800 dark:bg-emerald-950 dark:text-emerald-200":"border-destructive/30 bg-red-50 text-red-800 dark:bg-red-950 dark:text-red-200"}`,children:[t==="success"?a.jsx(Yn,{className:"h-4 w-4"}):a.jsx(pt,{className:"h-4 w-4"}),a.jsx("span",{className:"text-sm",children:e}),a.jsx("button",{onClick:n,className:"ml-2 text-current/50 hover:text-current",children:"×"})]})}function YM(){const[e,t]=m.useState([]),[n,r]=m.useState(""),[s,o]=m.useState(!0),[i,l]=m.useState("skills"),[c,u]=m.useState(null),h=m.useRef(null),d=m.useCallback((x,v="success")=>{u({message:x,type:v})},[]),f=m.useCallback(()=>{d("Command sent to host"),l("commands"),setTimeout(()=>{var x;return(x=h.current)==null?void 0:x.call(h)},300)},[d]),g=m.useCallback(x=>{const v=x instanceof Error?x.message:"Failed to send command";d(v,"error")},[d]);return m.useEffect(()=>{te.hosts.list().then(x=>{const v=(x.data??[]).filter(N=>N.status==="online");t(v),v.length>0&&!n&&r(v[0].id)}).catch(()=>{}).finally(()=>o(!1))},[]),s?a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading hosts..."}):e.length===0?a.jsxs("div",{className:"space-y-6",children:[a.jsx("h1",{className:"text-lg font-semibold",children:"Operations"}),a.jsxs("div",{className:"flex h-60 flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border",children:[a.jsx(Pr,{className:"h-10 w-10 text-muted-foreground/30"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No hosts connected"}),a.jsxs("p",{className:"text-xs text-muted-foreground/70",children:["Run ",a.jsx("code",{className:"rounded bg-muted px-1",children:"opentrust connect --dashboard-url ... --api-key ..."})," on a host"]})]})]}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h1",{className:"text-lg font-semibold",children:"Operations"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Host:"}),a.jsx("select",{className:"h-8 rounded-md border border-input bg-background px-2 text-sm focus:outline-none focus:ring-1 focus:ring-ring",value:n,onChange:x=>r(x.target.value),children:e.map(x=>a.jsxs("option",{value:x.id,children:[x.hostname," (",x.ip||"local",")"]},x.id))})]})]}),n&&a.jsxs(Tf,{value:i,onValueChange:l,className:"w-full",children:[a.jsxs(Dl,{children:[a.jsxs(nt,{value:"skills",children:[a.jsx(Nr,{className:"mr-1.5 h-3.5 w-3.5"})," Skills"]}),a.jsxs(nt,{value:"commands",children:[a.jsx(xs,{className:"mr-1.5 h-3.5 w-3.5"})," Commands"]}),a.jsxs(nt,{value:"config",children:[a.jsx(Zt,{className:"mr-1.5 h-3.5 w-3.5"})," Config"]})]}),a.jsx(rt,{value:"skills",children:a.jsx(XM,{hostId:n,onCommandSent:f,onCommandError:g})}),a.jsx(rt,{value:"commands",children:a.jsx(QM,{hostId:n,refreshRef:h})}),a.jsx(rt,{value:"config",children:a.jsx(qM,{hostId:n,onCommandSent:f,onCommandError:g})})]}),c&&a.jsx(GM,{message:c.message,type:c.type,onClose:()=>u(null)})]})}function XM({hostId:e,onCommandSent:t,onCommandError:n}){const[r,s]=m.useState(!1),[o,i]=m.useState(null),[l,c]=m.useState([]);m.useEffect(()=>{te.hosts.agents(e).then(h=>c(h.data??[])).catch(()=>c([]))},[e]);const u=l.flatMap(h=>((h.metadata??{}).skills??[]).map(f=>({...f,agentName:h.name})));return a.jsxs("div",{className:"space-y-4 pt-4",children:[a.jsx("div",{className:"flex gap-2",children:a.jsxs(K,{size:"sm",onClick:()=>s(!0),children:[a.jsx(Ct,{className:"mr-1.5 h-3.5 w-3.5"})," Install Skill"]})}),u.length>0&&a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(Nr,{className:"h-4 w-4"})," Installed Skills (",u.length,")"]})}),a.jsx(Ne,{children:a.jsx("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:u.map((h,d)=>a.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3 transition-colors hover:bg-muted/30",children:[a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-md bg-muted",children:a.jsx(Nr,{className:"h-4 w-4 text-muted-foreground"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium",children:h.name}),h.description&&a.jsx("p",{className:"text-[11px] text-muted-foreground line-clamp-1",children:h.description}),l.length>1&&a.jsx("p",{className:"text-[10px] text-muted-foreground/60",children:h.agentName})]})]}),a.jsx(K,{size:"sm",variant:"ghost",className:"h-7 w-7 p-0 text-muted-foreground hover:text-destructive",onClick:()=>i(h.name),children:a.jsx(Ot,{className:"h-3.5 w-3.5"})})]},`${h.name}-${d}`))})})]}),l.length>0&&a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(Pr,{className:"h-4 w-4"})," Agents on this Host (",l.length,")"]})}),a.jsx(Ne,{children:a.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:l.map(h=>{const d=h.metadata??{};return a.jsxs("div",{className:"flex items-center gap-2.5 rounded-lg border border-border p-3",children:[a.jsx("span",{className:"text-lg",children:d.emoji||"🤖"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium",children:h.name}),a.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[(d.skills??[]).length," skills · ",h.status]})]})]},h.id)})})})]}),a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsx(Re,{className:"text-sm",children:"How Skills Work"})}),a.jsxs(Ne,{className:"text-xs text-muted-foreground space-y-2",children:[a.jsxs("p",{children:["Skills are ",a.jsx("a",{href:"https://agentskills.io",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"AgentSkills"}),"-compatible folders containing a ",a.jsx("code",{className:"rounded bg-muted px-1",children:"SKILL.md"})," with YAML frontmatter and instructions."]}),a.jsxs("p",{children:["Browse and discover skills at ",a.jsx("a",{href:"https://clawhub.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"clawhub.com"}),". Commands are executed by the CLI on the selected host via ",a.jsx("code",{className:"rounded bg-muted px-1",children:"clawhub install <slug>"}),"."]})]})]}),a.jsx(ZM,{open:r,onOpenChange:s,hostId:e,onSuccess:t,onError:n}),a.jsx(JM,{open:o!==null,onOpenChange:h=>{h||i(null)},hostId:e,initialName:o??"",onSuccess:t,onError:n})]})}function QM({hostId:e,refreshRef:t}){const[n,r]=m.useState([]),[s,o]=m.useState(!0),[i,l]=m.useState(null),c=m.useCallback(()=>{te.hosts.commands(e).then(f=>r(f.data??[])).catch(()=>{}).finally(()=>o(!1))},[e]);m.useEffect(()=>(t&&(t.current=c),()=>{t&&(t.current=null)}),[c,t]),m.useEffect(()=>{c()},[c]),m.useEffect(()=>{if(!n.some(x=>x.status==="pending"||x.status==="running"))return;const g=setInterval(c,5e3);return()=>clearInterval(g)},[n,c]);const u=f=>f==="completed"?a.jsx(Yn,{className:"h-3.5 w-3.5 text-emerald-500"}):f==="failed"?a.jsx(pt,{className:"h-3.5 w-3.5 text-destructive"}):f==="running"?a.jsx($e,{className:"h-3.5 w-3.5 animate-spin text-amber-500"}):a.jsx(nf,{className:"h-3.5 w-3.5 text-muted-foreground"}),h=f=>f==="completed"?"success":f==="failed"?"destructive":f==="running"?"warning":"secondary",d=f=>({install_skill:{icon:a.jsx(Ct,{className:"h-3 w-3"}),label:"Install Skill"},install_custom_skill:{icon:a.jsx(Mr,{className:"h-3 w-3"}),label:"Custom Skill"},uninstall_skill:{icon:a.jsx(Ot,{className:"h-3 w-3"}),label:"Uninstall Skill"},install_plugin:{icon:a.jsx(Ct,{className:"h-3 w-3"}),label:"Install Plugin"},uninstall_plugin:{icon:a.jsx(Ot,{className:"h-3 w-3"}),label:"Uninstall Plugin"},update_config:{icon:a.jsx(Zt,{className:"h-3 w-3"}),label:"Update Config"}})[f]??{icon:a.jsx(xs,{className:"h-3 w-3"}),label:f};return s?a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):a.jsxs("div",{className:"space-y-4 pt-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("p",{className:"text-sm text-muted-foreground",children:"Command history for this host"}),a.jsxs(K,{size:"sm",variant:"ghost",onClick:c,children:[a.jsx(Xn,{className:"mr-1.5 h-3.5 w-3.5"})," Refresh"]})]}),n.length===0?a.jsxs("div",{className:"flex h-40 flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border",children:[a.jsx(xs,{className:"h-8 w-8 text-muted-foreground/30"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No commands sent yet"})]}):a.jsx("div",{className:"space-y-2",children:n.map(f=>{var N,p,w;const g=d(f.type),x=i===f.id,v=f.result||f.type==="install_custom_skill"&&((N=f.payload)==null?void 0:N.content);return a.jsxs("div",{className:"rounded-lg border border-border transition-colors hover:bg-muted/20",children:[a.jsxs("div",{className:"flex cursor-pointer items-center gap-3 px-4 py-3",onClick:()=>v&&l(x?null:f.id),children:[u(f.status),a.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium",children:[g.icon," ",a.jsx("span",{children:g.label})]}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:[((p=f.payload)==null?void 0:p.skillName)&&`"${f.payload.skillName}"`,f.type==="update_config"&&f.payload&&!f.payload.skillName&&Object.keys(f.payload).join(", ")]}),a.jsx("div",{className:"flex-1"}),a.jsx(he,{variant:h(f.status),className:"text-[10px]",children:f.status}),a.jsx("span",{className:"text-[11px] text-muted-foreground",children:tI(f.createdAt)}),v&&(x?a.jsx(Zo,{className:"h-3.5 w-3.5 text-muted-foreground"}):a.jsx(tf,{className:"h-3.5 w-3.5 text-muted-foreground"}))]}),x&&v&&a.jsxs("div",{className:"border-t border-border bg-muted/30 px-4 py-3 text-xs",children:[f.result&&a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"font-medium text-muted-foreground",children:"Result"}),a.jsx("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap rounded-md bg-background p-2.5 font-mono text-[11px] text-muted-foreground",children:typeof f.result=="string"?f.result:JSON.stringify(f.result,null,2)})]}),f.type==="install_custom_skill"&&((w=f.payload)==null?void 0:w.content)&&a.jsxs("div",{className:"mt-2 space-y-1",children:[a.jsx("p",{className:"font-medium text-muted-foreground",children:"Skill Content"}),a.jsx("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap rounded-md bg-background p-2.5 font-mono text-[11px] text-muted-foreground",children:f.payload.content})]})]})]},f.id)})})]})}function qM({hostId:e,onCommandSent:t,onCommandError:n}){const[r,s]=m.useState(!1);return a.jsxs("div",{className:"space-y-4 pt-4",children:[a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(Zt,{className:"h-4 w-4"})," Guards Configuration"]}),a.jsxs(K,{size:"sm",variant:"outline",onClick:()=>s(!0),children:[a.jsx(Zt,{className:"mr-1.5 h-3.5 w-3.5"})," Update Config"]})]})}),a.jsxs(Ne,{className:"text-xs text-muted-foreground space-y-3",children:[a.jsxs("p",{children:["Send configuration updates to the Guards plugin on the host. The CLI updates ",a.jsx("code",{className:"rounded bg-muted px-1",children:"~/.openclaw/openclaw.json"})," on the target machine."]}),a.jsxs("div",{className:"rounded-md bg-muted p-3 space-y-1.5",children:[a.jsx("p",{className:"font-medium text-foreground text-xs",children:"Available settings:"}),a.jsxs("div",{className:"grid gap-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"blockOnRisk"}),a.jsx("span",{children:"Block tool calls when risk is detected"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"logLevel"}),a.jsx("span",{children:"Logging verbosity (debug, info, warn, error)"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"timeoutMs"}),a.jsx("span",{children:"Request timeout in milliseconds"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"enabled"}),a.jsx("span",{children:"Enable/disable the Guards plugin"})]})]})]})]})]}),a.jsx(eI,{open:r,onOpenChange:s,hostId:e,onSuccess:t,onError:n})]})}function ZM({open:e,onOpenChange:t,hostId:n,onSuccess:r,onError:s}){const[o,i]=m.useState("registry"),[l,c]=m.useState(""),[u,h]=m.useState(""),[d,f]=m.useState(!1),[g,x]=m.useState(""),v=()=>{c(""),h(""),i("registry"),x("")},N=async()=>{if(!(o==="registry"&&!l.trim())&&!(o==="custom"&&(!l.trim()||!u.trim()))){f(!0),x("");try{o==="registry"?await te.hosts.sendCommand(n,"install_skill",{skillName:l.trim()}):await te.hosts.sendCommand(n,"install_custom_skill",{skillName:l.trim(),content:u}),v(),t(!1),r==null||r()}catch(p){const w=p instanceof Error?p.message:"Failed to send command";x(w),s==null||s(p)}finally{f(!1)}}};return a.jsx(Ir,{open:e,onOpenChange:p=>{p||v(),t(p)},children:a.jsxs(er,{className:"sm:max-w-[560px]",children:[a.jsxs(Rr,{children:[a.jsxs(tr,{className:"flex items-center gap-2",children:[a.jsx(Ct,{className:"h-4 w-4"})," Install Skill"]}),a.jsxs(nr,{children:["Install from ",a.jsx("a",{href:"https://clawhub.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"ClawHub"})," registry or provide custom SKILL.md content."]})]}),a.jsxs(Tf,{value:o,onValueChange:p=>{i(p),x("")},children:[a.jsxs(Dl,{className:"w-full",children:[a.jsxs(nt,{value:"registry",className:"flex-1",children:[a.jsx(Nr,{className:"mr-1.5 h-3.5 w-3.5"})," ClawHub Registry"]}),a.jsxs(nt,{value:"custom",className:"flex-1",children:[a.jsx(Mr,{className:"mr-1.5 h-3.5 w-3.5"})," Custom SKILL.md"]})]}),a.jsx(rt,{value:"registry",className:"space-y-4 pt-2",children:a.jsxs("div",{className:"space-y-2",children:[a.jsx(pe,{htmlFor:"reg-skill-name",children:"Skill Slug"}),a.jsx(de,{id:"reg-skill-name",placeholder:"e.g. web-search, code-review, self-improving-agent...",value:l,onChange:p=>{c(p.target.value),x("")},onKeyDown:p=>p.key==="Enter"&&N()}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Executes ",a.jsx("code",{className:"rounded bg-muted px-1",children:"clawhub install <slug>"})," on the host via CLI. Browse available skills at ",a.jsx("a",{href:"https://clawhub.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"clawhub.com"}),"."]})]})}),a.jsxs(rt,{value:"custom",className:"space-y-4 pt-2",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(pe,{htmlFor:"custom-skill-name",children:"Skill Name"}),a.jsx(de,{id:"custom-skill-name",placeholder:"my-custom-skill",value:l,onChange:p=>{c(p.target.value),x("")}})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(pe,{htmlFor:"custom-skill-content",children:"SKILL.md Content"}),a.jsx(Mf,{id:"custom-skill-content",placeholder:`---
|
|
408
|
+
name: my-custom-skill
|
|
409
|
+
description: My custom skill
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
Instructions for the agent...
|
|
413
|
+
|
|
414
|
+
Use {baseDir} to reference the skill folder path.`,value:u,onChange:p=>{h(p.target.value),x("")},className:"min-h-[200px] font-mono text-xs"}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["The content will be saved as ",a.jsx("code",{className:"rounded bg-muted px-1",children:"~/.openclaw/workspace/skills/<name>/SKILL.md"}),". Use YAML frontmatter with ",a.jsx("code",{className:"rounded bg-muted px-1",children:"name"})," and ",a.jsx("code",{className:"rounded bg-muted px-1",children:"description"})," fields."]})]})]})]}),g&&a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:[a.jsx(pt,{className:"h-3.5 w-3.5 shrink-0"}),a.jsx("span",{children:g})]}),a.jsxs(Tr,{children:[a.jsx(K,{variant:"outline",onClick:()=>{v(),t(!1)},children:"Cancel"}),a.jsxs(K,{onClick:N,disabled:d||!l.trim()||o==="custom"&&!u.trim(),children:[d?a.jsx($e,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):a.jsx(Ct,{className:"mr-1.5 h-3.5 w-3.5"}),"Install"]})]})]})})}function JM({open:e,onOpenChange:t,hostId:n,initialName:r,onSuccess:s,onError:o}){const[i,l]=m.useState(r??""),[c,u]=m.useState(!1),[h,d]=m.useState("");m.useEffect(()=>{r&&l(r)},[r]);const f=async()=>{if(i.trim()){u(!0),d("");try{await te.hosts.sendCommand(n,"uninstall_skill",{skillName:i.trim()}),l(""),t(!1),s==null||s()}catch(g){const x=g instanceof Error?g.message:"Failed to send command";d(x),o==null||o(g)}finally{u(!1)}}};return a.jsx(Ir,{open:e,onOpenChange:t,children:a.jsxs(er,{className:"sm:max-w-[400px]",children:[a.jsxs(Rr,{children:[a.jsxs(tr,{className:"flex items-center gap-2",children:[a.jsx(Ot,{className:"h-4 w-4"})," Uninstall Skill"]}),a.jsx(nr,{children:"This will send a command to the host CLI to remove the skill."})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(pe,{htmlFor:"uninstall-name",children:"Skill Name"}),a.jsx(de,{id:"uninstall-name",placeholder:"Skill name to uninstall...",value:i,onChange:g=>{l(g.target.value),d("")},onKeyDown:g=>g.key==="Enter"&&f()})]}),h&&a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:[a.jsx(pt,{className:"h-3.5 w-3.5 shrink-0"}),a.jsx("span",{children:h})]}),a.jsxs(Tr,{children:[a.jsx(K,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),a.jsxs(K,{variant:"destructive",onClick:f,disabled:c||!i.trim(),children:[c?a.jsx($e,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):a.jsx(Ot,{className:"mr-1.5 h-3.5 w-3.5"}),"Uninstall"]})]})]})})}function eI({open:e,onOpenChange:t,hostId:n,onSuccess:r,onError:s}){const[o,i]=m.useState(`{
|
|
415
|
+
"blockOnRisk": false
|
|
416
|
+
}`),[l,c]=m.useState(""),[u,h]=m.useState(!1),d=async()=>{c("");let f;try{f=JSON.parse(o)}catch{c("Invalid JSON");return}if(typeof f!="object"||f===null||Array.isArray(f)){c("Must be a JSON object");return}h(!0);try{await te.hosts.sendCommand(n,"update_config",f),t(!1),r==null||r()}catch(g){const x=g instanceof Error?g.message:"Failed to send command";c(x),s==null||s(g)}finally{h(!1)}};return a.jsx(Ir,{open:e,onOpenChange:t,children:a.jsxs(er,{className:"sm:max-w-[460px]",children:[a.jsxs(Rr,{children:[a.jsxs(tr,{className:"flex items-center gap-2",children:[a.jsx(Zt,{className:"h-4 w-4"})," Update Guards Config"]}),a.jsx(nr,{children:"Values will be merged into the existing Guards plugin configuration."})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(pe,{htmlFor:"config-json",children:"Config JSON"}),a.jsx(Mf,{id:"config-json",value:o,onChange:f=>{i(f.target.value),c("")},className:"min-h-[120px] font-mono text-xs"}),l&&a.jsx("p",{className:"text-xs text-destructive",children:l})]}),a.jsxs(Tr,{children:[a.jsx(K,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),a.jsxs(K,{onClick:d,disabled:u,children:[u?a.jsx($e,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):a.jsx(Zt,{className:"mr-1.5 h-3.5 w-3.5"}),"Update"]})]})]})})}function tI(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<60)return"just now";const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const s=Math.floor(r/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`}function nI(){const[e,t]=m.useState([]),[n,r]=m.useState(""),[s,o]=m.useState(null),[i,l]=m.useState(!0),[c,u]=m.useState(null),h=m.useCallback((g,x="success")=>{u({msg:g,type:x}),setTimeout(()=>u(null),4e3)},[]);if(m.useEffect(()=>{te.discovery.agents().then(g=>{const x=g.data??[];t(x),x.length>0&&!n&&r(x[0].registeredAgentId||x[0].id)}).catch(()=>{}).finally(()=>l(!1))},[]),m.useEffect(()=>{if(!n){o(null);return}const g=e.find(x=>(x.registeredAgentId||x.id)===n);o(g??null)},[n,e]),i)return a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading agents..."});if(e.length===0)return a.jsxs("div",{className:"space-y-6",children:[a.jsx("h1",{className:"text-lg font-semibold",children:"Plugins"}),a.jsxs("div",{className:"flex h-60 flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border",children:[a.jsx(Pr,{className:"h-10 w-10 text-muted-foreground/30"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents discovered"}),a.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Start an OpenClaw agent with the Guards plugin to see it here"})]})]});const d=s==null?void 0:s.hostId,f=(s==null?void 0:s.plugins)??[];return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-lg font-semibold",children:"Plugins"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage OpenClaw plugins per agent"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs text-muted-foreground",children:"Agent:"}),a.jsx("select",{className:"h-8 rounded-md border border-input bg-background px-2 text-sm focus:outline-none focus:ring-1 focus:ring-ring",value:n,onChange:g=>r(g.target.value),children:e.map(g=>a.jsx("option",{value:g.registeredAgentId||g.id,children:g.name},g.registeredAgentId||g.id))})]})]}),s&&a.jsxs(a.Fragment,{children:[a.jsx(rI,{plugins:f}),d?a.jsxs(a.Fragment,{children:[a.jsx(sI,{hostId:d,showToast:h}),a.jsx(oI,{hostId:d})]}):a.jsx(me,{className:"border-dashed",children:a.jsxs(Ne,{className:"flex flex-col items-center gap-2 py-6",children:[a.jsx(nf,{className:"h-6 w-6 text-muted-foreground/40"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"This agent is not associated with a host. Plugin install/uninstall commands require a connected host."}),a.jsxs("p",{className:"text-xs text-muted-foreground/70",children:["Run ",a.jsx("code",{className:"rounded bg-muted px-1",children:"opentrust connect"})," on the agent's machine to link it."]})]})}),a.jsx(iI,{})]}),c&&a.jsxs("div",{className:`fixed bottom-6 right-6 z-[100] flex items-center gap-2 rounded-lg border px-4 py-3 shadow-lg animate-in slide-in-from-bottom-4 ${c.type==="success"?"border-emerald-500/30 bg-emerald-50 text-emerald-800 dark:bg-emerald-950 dark:text-emerald-200":"border-destructive/30 bg-red-50 text-red-800 dark:bg-red-950 dark:text-red-200"}`,children:[c.type==="success"?a.jsx(Yn,{className:"h-4 w-4"}):a.jsx(pt,{className:"h-4 w-4"}),a.jsx("span",{className:"text-sm",children:c.msg}),a.jsx("button",{onClick:()=>u(null),className:"ml-2 text-current/50 hover:text-current",children:"×"})]})]})}function rI({plugins:e}){return e.length===0?a.jsx(me,{className:"border-dashed",children:a.jsxs(Ne,{className:"flex flex-col items-center gap-2 py-6",children:[a.jsx(ra,{className:"h-8 w-8 text-muted-foreground/30"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins reported by this agent"})]})}):a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(ra,{className:"h-4 w-4"})," Installed Plugins (",e.length,")"]})}),a.jsx(Ne,{className:"space-y-2",children:e.map(t=>a.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border px-4 py-2.5",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(ra,{className:"h-3.5 w-3.5 text-muted-foreground"}),a.jsx("span",{className:"text-sm font-medium",children:t.name||t.id}),t.version&&a.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",t.version]})]}),a.jsx(he,{variant:t.enabled!==!1?"default":"secondary",className:"text-[10px]",children:t.enabled!==!1?"enabled":"disabled"})]},t.name||t.id))})]})}function sI({hostId:e,showToast:t}){const[n,r]=m.useState(!1),[s,o]=m.useState(!1);return a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(K,{size:"sm",onClick:()=>r(!0),children:[a.jsx(Ct,{className:"mr-1.5 h-3.5 w-3.5"})," Install Plugin"]}),a.jsxs(K,{size:"sm",variant:"outline",onClick:()=>o(!0),children:[a.jsx(Ot,{className:"mr-1.5 h-3.5 w-3.5"})," Uninstall Plugin"]}),a.jsx(aI,{open:n,onOpenChange:r,hostId:e,showToast:t}),a.jsx(lI,{open:s,onOpenChange:o,hostId:e,showToast:t})]})}function oI({hostId:e}){const[t,n]=m.useState([]),[r,s]=m.useState(!0),[o,i]=m.useState(null),l=m.useCallback(()=>{te.hosts.commands(e).then(u=>{const h=(u.data??[]).filter(d=>d.type==="install_plugin"||d.type==="uninstall_plugin");n(h)}).catch(()=>{}).finally(()=>s(!1))},[e]);m.useEffect(()=>{l()},[l]),m.useEffect(()=>{if(!t.some(d=>d.status==="pending"||d.status==="running"))return;const h=setInterval(l,5e3);return()=>clearInterval(h)},[t,l]);const c=u=>u==="completed"?a.jsx(Yn,{className:"h-3.5 w-3.5 text-emerald-500"}):u==="failed"?a.jsx(pt,{className:"h-3.5 w-3.5 text-destructive"}):u==="running"?a.jsx($e,{className:"h-3.5 w-3.5 animate-spin text-amber-500"}):a.jsx(nf,{className:"h-3.5 w-3.5 text-muted-foreground"});return r||t.length===0?null:a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(xs,{className:"h-4 w-4"})," Plugin Command History"]}),a.jsxs(K,{size:"sm",variant:"ghost",onClick:l,children:[a.jsx(Xn,{className:"mr-1.5 h-3.5 w-3.5"})," Refresh"]})]})}),a.jsx(Ne,{className:"space-y-2",children:t.map(u=>{var g,x;const h=o===u.id,d=u.type==="install_plugin"?"Install Plugin":"Uninstall Plugin",f=((g=u.payload)==null?void 0:g.spec)||((x=u.payload)==null?void 0:x.pluginId)||"";return a.jsxs("div",{className:"rounded-lg border border-border transition-colors hover:bg-muted/20",children:[a.jsxs("div",{className:"flex cursor-pointer items-center gap-3 px-4 py-3",onClick:()=>u.result&&i(h?null:u.id),children:[c(u.status),a.jsx("span",{className:"text-xs font-medium",children:d}),f&&a.jsxs("span",{className:"text-xs text-muted-foreground",children:['"',f,'"']}),a.jsx("div",{className:"flex-1"}),a.jsx(he,{variant:u.status==="completed"?"default":u.status==="failed"?"destructive":"secondary",className:"text-[10px]",children:u.status}),a.jsx("span",{className:"text-[11px] text-muted-foreground",children:cI(u.createdAt)}),u.result&&(h?a.jsx(Zo,{className:"h-3.5 w-3.5 text-muted-foreground"}):a.jsx(tf,{className:"h-3.5 w-3.5 text-muted-foreground"}))]}),h&&u.result&&a.jsx("div",{className:"border-t border-border bg-muted/30 px-4 py-3",children:a.jsx("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap rounded-md bg-background p-2.5 font-mono text-[11px] text-muted-foreground",children:typeof u.result=="string"?u.result:JSON.stringify(u.result,null,2)})})]},u.id)})})]})}function iI(){return a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsx(Re,{className:"text-sm",children:"How Plugins Work"})}),a.jsxs(Ne,{className:"text-xs text-muted-foreground space-y-2",children:[a.jsx("p",{children:"OpenClaw plugins extend agent capabilities. They can be installed from npm or local paths."}),a.jsx("p",{children:"Common plugin specs:"}),a.jsxs("ul",{className:"list-inside list-disc space-y-0.5 pl-2",children:[a.jsxs("li",{children:[a.jsx("code",{className:"rounded bg-muted px-1",children:"@openclaw/voice-call"})," — Voice calling plugin"]}),a.jsxs("li",{children:[a.jsx("code",{className:"rounded bg-muted px-1",children:"@opentrust/guards"})," — Security guard plugin"]}),a.jsxs("li",{children:[a.jsx("code",{className:"rounded bg-muted px-1",children:"/path/to/plugin"})," — Local plugin path"]})]}),a.jsxs("p",{children:["Commands are sent to the agent's host CLI which executes ",a.jsx("code",{className:"rounded bg-muted px-1",children:"openclaw plugins install/uninstall"}),"."]})]})]})}function aI({open:e,onOpenChange:t,hostId:n,showToast:r}){const[s,o]=m.useState(""),[i,l]=m.useState(!1),[c,u]=m.useState(""),h=()=>{o(""),u("")},d=async()=>{if(s.trim()){l(!0),u("");try{await te.hosts.sendCommand(n,"install_plugin",{spec:s.trim()}),h(),t(!1),r("Plugin install command sent","success")}catch(f){const g=f instanceof Error?f.message:"Failed to send command";u(g)}finally{l(!1)}}};return a.jsx(Ir,{open:e,onOpenChange:f=>{f||h(),t(f)},children:a.jsxs(er,{className:"sm:max-w-[480px]",children:[a.jsxs(Rr,{children:[a.jsxs(tr,{className:"flex items-center gap-2",children:[a.jsx(Ct,{className:"h-4 w-4"})," Install Plugin"]}),a.jsx(nr,{children:"Install an OpenClaw plugin via npm package name or local path."})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(pe,{htmlFor:"plugin-spec",children:"Plugin Spec"}),a.jsx(de,{id:"plugin-spec",placeholder:"e.g. @openclaw/voice-call, @opentrust/guards, /path/to/plugin",value:s,onChange:f=>{o(f.target.value),u("")},onKeyDown:f=>f.key==="Enter"&&d()}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Executes ",a.jsx("code",{className:"rounded bg-muted px-1",children:"openclaw plugins install <spec>"})," on the agent's host via CLI."]})]}),c&&a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:[a.jsx(pt,{className:"h-3.5 w-3.5 shrink-0"}),a.jsx("span",{children:c})]}),a.jsxs(Tr,{children:[a.jsx(K,{variant:"outline",onClick:()=>{h(),t(!1)},children:"Cancel"}),a.jsxs(K,{onClick:d,disabled:i||!s.trim(),children:[i?a.jsx($e,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):a.jsx(Ct,{className:"mr-1.5 h-3.5 w-3.5"}),"Install"]})]})]})})}function lI({open:e,onOpenChange:t,hostId:n,showToast:r,initialId:s}){const[o,i]=m.useState(s??""),[l,c]=m.useState(!1),[u,h]=m.useState("");m.useEffect(()=>{s&&i(s)},[s]);const d=async()=>{if(o.trim()){c(!0),h("");try{await te.hosts.sendCommand(n,"uninstall_plugin",{pluginId:o.trim()}),i(""),t(!1),r("Plugin uninstall command sent","success")}catch(f){const g=f instanceof Error?f.message:"Failed to send command";h(g)}finally{c(!1)}}};return a.jsx(Ir,{open:e,onOpenChange:t,children:a.jsxs(er,{className:"sm:max-w-[400px]",children:[a.jsxs(Rr,{children:[a.jsxs(tr,{className:"flex items-center gap-2",children:[a.jsx(Ot,{className:"h-4 w-4"})," Uninstall Plugin"]}),a.jsx(nr,{children:"Remove an OpenClaw plugin from the agent's host."})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(pe,{htmlFor:"plugin-id",children:"Plugin ID"}),a.jsx(de,{id:"plugin-id",placeholder:"e.g. voice-call, opentrust-guard",value:o,onChange:f=>{i(f.target.value),h("")},onKeyDown:f=>f.key==="Enter"&&d()}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Executes ",a.jsx("code",{className:"rounded bg-muted px-1",children:"openclaw plugins uninstall <id> --force"})," on the host via CLI."]})]}),u&&a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive",children:[a.jsx(pt,{className:"h-3.5 w-3.5 shrink-0"}),a.jsx("span",{children:u})]}),a.jsxs(Tr,{children:[a.jsx(K,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),a.jsxs(K,{variant:"destructive",onClick:d,disabled:l||!o.trim(),children:[l?a.jsx($e,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):a.jsx(Ot,{className:"mr-1.5 h-3.5 w-3.5"}),"Uninstall"]})]})]})})}function cI(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<60)return"just now";const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const s=Math.floor(r/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`}function uI(e){if(e===0)return"0 B";const t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,r)).toFixed(1)} ${n[r]}`}function dI(){const[e,t]=m.useState([]),[n,r]=m.useState(!0),[s,o]=m.useState("dashboard"),i=m.useCallback(()=>{te.system.services().then(l=>t(l.data??[])).catch(()=>{}).finally(()=>r(!1))},[]);return m.useEffect(()=>{i()},[i]),m.useEffect(()=>{const l=setInterval(i,1e4);return()=>clearInterval(l)},[i]),n?a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h1",{className:"text-lg font-semibold",children:"System"}),a.jsxs(K,{size:"sm",variant:"ghost",onClick:i,children:[a.jsx(Xn,{className:"mr-1.5 h-3.5 w-3.5"})," Refresh"]})]}),a.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:e.map(l=>a.jsx(me,{className:`cursor-pointer transition-all ${s===l.key?"ring-2 ring-primary shadow-sm":"hover:bg-muted/30"}`,onClick:()=>o(l.key),children:a.jsxs(Ne,{className:"flex items-center gap-3 p-4",children:[a.jsx("div",{className:`flex h-10 w-10 items-center justify-center rounded-lg ${l.healthy?"bg-emerald-100 dark:bg-emerald-950":l.running?"bg-amber-100 dark:bg-amber-950":"bg-muted"}`,children:a.jsx(sf,{className:`h-5 w-5 ${l.healthy?"text-emerald-600 dark:text-emerald-400":l.running?"text-amber-600 dark:text-amber-400":"text-muted-foreground"}`})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("p",{className:"text-sm font-medium",children:l.name}),a.jsx(Kb,{className:`h-2 w-2 fill-current ${l.healthy?"text-emerald-500":l.running?"text-amber-500":"text-muted-foreground/40"}`})]}),a.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[a.jsxs("span",{children:[":",l.port]}),l.pid&&a.jsxs("span",{children:["PID ",l.pid]}),l.logSize>0&&a.jsx("span",{children:uI(l.logSize)})]})]}),a.jsx(he,{variant:l.healthy?"default":l.running?"secondary":"outline",className:`text-[10px] ${l.healthy?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border-emerald-500/20":""}`,children:l.healthy?"Healthy":l.running?"Running":"Stopped"})]})},l.key))}),s&&a.jsx(fI,{service:s})]})}function fI({service:e}){const[t,n]=m.useState([]),[r,s]=m.useState(0),[o,i]=m.useState(""),[l,c]=m.useState(!0),[u,h]=m.useState(!0),[d,f]=m.useState(!0),[g,x]=m.useState(200),v=m.useRef(null),N=m.useRef(null),p=m.useCallback(b=>{const E=b??g;te.system.logs(e,E).then(C=>{n(C.data.lines),s(C.data.total),i(C.data.lastModified)}).catch(()=>{}).finally(()=>c(!1))},[e,g]);m.useEffect(()=>{c(!0),n([]),p()},[e]),m.useEffect(()=>{p()},[g]),m.useEffect(()=>{u&&v.current&&(v.current.scrollTop=v.current.scrollHeight)},[t,u]),m.useEffect(()=>(d?N.current=setInterval(()=>p(),3e3):N.current&&(clearInterval(N.current),N.current=null),()=>{N.current&&clearInterval(N.current)}),[d,p]);const w=async()=>{try{await te.system.clearLog(e),n([]),s(0)}catch{}},y=()=>{x(b=>Math.min(b+500,2e3))},j=e.charAt(0).toUpperCase()+e.slice(1);return a.jsxs(me,{children:[a.jsx(Ie,{className:"pb-3",children:a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(Mr,{className:"h-4 w-4"})," ",j," Logs",a.jsxs(he,{variant:"outline",className:"text-[10px] font-normal",children:[r.toLocaleString()," lines"]}),o&&a.jsxs("span",{className:"text-[11px] font-normal text-muted-foreground",children:["Updated ",new Date(o).toLocaleTimeString()]})]}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[r>g&&a.jsx(K,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:y,children:"Load more"}),a.jsxs(K,{size:"sm",variant:d?"default":"outline",className:"h-7 text-xs",onClick:()=>{f(!d),h(!d)},children:[d?a.jsx(iS,{className:"mr-1 h-3 w-3"}):a.jsx(za,{className:"mr-1 h-3 w-3"}),d?"Pause":"Tail"]}),a.jsxs(K,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>{var b;h(!0),(b=v.current)==null||b.scrollTo({top:v.current.scrollHeight,behavior:"smooth"})},children:[a.jsx(Vb,{className:"mr-1 h-3 w-3"})," Bottom"]}),a.jsxs(K,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>p(),children:[a.jsx(Xn,{className:"mr-1 h-3 w-3"})," Refresh"]}),a.jsxs(K,{size:"sm",variant:"ghost",className:"h-7 text-xs text-destructive hover:text-destructive",onClick:w,children:[a.jsx(Ot,{className:"mr-1 h-3 w-3"})," Clear"]})]})]})}),a.jsx(Ne,{className:"p-0",children:l?a.jsx("div",{className:"flex h-60 items-center justify-center",children:a.jsx($e,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):t.length===0?a.jsxs("div",{className:"flex h-60 flex-col items-center justify-center gap-2",children:[a.jsx(Bb,{className:"h-8 w-8 text-muted-foreground/20"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No log output"})]}):a.jsx("div",{ref:v,className:"h-[calc(100vh-420px)] min-h-[300px] overflow-auto border-t border-border bg-zinc-950 dark:bg-zinc-950",onScroll:()=>{if(!v.current)return;const{scrollTop:b,scrollHeight:E,clientHeight:C}=v.current,M=E-b-C<40;h(M)},children:a.jsx("pre",{className:"p-4 text-xs leading-5 font-mono text-zinc-300",children:t.map((b,E)=>a.jsx(hI,{line:b,lineNum:r-t.length+E+1},E))})})})]})}function hI({line:e,lineNum:t}){const n=mI(e);return a.jsxs("div",{className:"group flex hover:bg-white/5",children:[a.jsx("span",{className:"mr-3 inline-block w-10 select-none text-right text-zinc-600 group-hover:text-zinc-500",children:t}),a.jsx("span",{className:n,children:e}),`
|
|
417
|
+
`]})}function mI(e){const t=e.toLowerCase();return t.includes("error")||t.includes("err ")||t.includes("fatal")?"text-red-400":t.includes("warn")||t.includes("warning")?"text-amber-400":t.includes("debug")||t.includes("dbg ")?"text-zinc-500":/\b(get|post|put|delete|patch)\b/i.test(e)?"text-sky-400":t.includes("info")||t.includes("listening")||t.includes("started")||t.includes("running")?"text-emerald-400":"text-zinc-300"}const pI=[{key:"og_core_url",label:"Core API URL",icon:sf,placeholder:"http://localhost:53666",description:"OpenTrust Core service endpoint"},{key:"gateway_url",label:"Gateway URL",icon:ry,placeholder:"http://localhost:8900",description:"AI Gateway proxy endpoint"},{key:"dashboard_mode",label:"Dashboard Mode",icon:oy,placeholder:"selfhosted",description:"Deployment mode: selfhosted or embedded"},{key:"database_url",label:"Database URL",icon:Qb,placeholder:"file:./data/dashboard.db",description:"Database connection string",sensitive:!0}];function gI(){const[e,t]=m.useState({}),[n,r]=m.useState({}),[s,o]=m.useState(!0),[i,l]=m.useState(!1),[c,u]=m.useState(null),[h,d]=m.useState(null),[f,g]=m.useState(!1),[x,v]=m.useState(""),[N,p]=m.useState(""),[w,y]=m.useState(!1),[j,b]=m.useState(!1),E=m.useCallback(()=>{te.settings.getApiKey(!1).then($=>{v($.data.key),p(""),y(!1)}).catch(()=>{})},[]),C=()=>{o(!0),te.settings.get().then($=>{const _=$.data??{};t(_),r(_)}).catch(()=>{}).finally(()=>o(!1))};m.useEffect(()=>{C(),E()},[E]);const M=()=>Object.keys(e).some($=>e[$]!==n[$]),R=async()=>{l(!0);try{const $={};for(const[_,z]of Object.entries(e))z!==n[_]&&($[_]=z);Object.keys($).length>0&&(await te.settings.update($),r({...e}),T("Settings saved","success"))}catch($){T($ instanceof Error?$.message:"Failed to save","error")}finally{l(!1)}},O=async()=>{g(!0),d(null);try{const _=await(await fetch("/api/settings/test-connection",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${JSON.parse(localStorage.getItem("opentrust_user")||"{}").apiKey||""}`}})).json();_.success&&d(_.data)}catch{d({connected:!1,message:"Request failed"})}finally{g(!1)}},T=($,_)=>{u({msg:$,type:_}),setTimeout(()=>u(null),3e3)},L=($,_)=>{t(z=>({...z,[$]:_}))};return s?a.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading settings..."}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-lg font-semibold",children:"Settings"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure OpenTrust system settings"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(K,{size:"sm",variant:"ghost",onClick:C,children:[a.jsx(Xn,{className:"mr-1.5 h-3.5 w-3.5"})," Reload"]}),a.jsxs(K,{size:"sm",onClick:R,disabled:i||!M(),children:[i?a.jsx($e,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):a.jsx(rf,{className:"mr-1.5 h-3.5 w-3.5"}),"Save Changes"]})]})]}),a.jsxs(me,{children:[a.jsxs(Ie,{children:[a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(tS,{className:"h-4 w-4"})," System API Key"]}),a.jsx(jl,{className:"text-xs",children:"Unified key for CLI, Guards, Gateway, and Dashboard inter-component authentication"})]}),a.jsxs(Ne,{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(de,{readOnly:!0,value:w?N:x,className:"font-mono text-sm",placeholder:"Loading..."}),a.jsx(K,{size:"icon",variant:"outline",title:w?"Hide":"Reveal",onClick:async()=>{if(w)y(!1);else try{const $=await te.settings.getApiKey(!0);p($.data.key),y(!0)}catch{T("Failed to reveal key","error")}},children:w?a.jsx(Zb,{className:"h-4 w-4"}):a.jsx(Jb,{className:"h-4 w-4"})}),a.jsx(K,{size:"icon",variant:"outline",title:"Copy to clipboard",onClick:async()=>{try{const $=await te.settings.getApiKey(!0);await navigator.clipboard.writeText($.data.key),T("API key copied","success")}catch{T("Failed to copy","error")}},children:a.jsx(Xb,{className:"h-4 w-4"})}),a.jsx(K,{size:"icon",variant:"outline",title:"Regenerate key",disabled:j,onClick:async()=>{if(window.confirm("Regenerating will invalidate the current key. All connected components must update their configuration. Continue?")){b(!0);try{const $=await te.settings.generateKey();p($.data.key),v($.data.key.slice(0,12)+"..."+$.data.key.slice(-4)),y(!0),T("New API key generated","success")}catch{T("Failed to generate key","error")}finally{b(!1)}}},children:j?a.jsx($e,{className:"h-4 w-4 animate-spin"}):a.jsx(Da,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"rounded-md border border-border bg-muted/50 p-3",children:[a.jsxs("p",{className:"mb-2 flex items-center gap-1.5 text-xs font-medium",children:[a.jsx(xs,{className:"h-3.5 w-3.5"})," Connection Guide"]}),a.jsxs("div",{className:"space-y-1.5 text-[11px] font-mono text-muted-foreground",children:[a.jsxs("p",{children:[a.jsx("span",{className:"text-foreground font-semibold",children:"CLI:"})," opentrust connect --dashboard-url http://<host>:53667 --api-key <key>"]}),a.jsxs("p",{children:[a.jsx("span",{className:"text-foreground font-semibold",children:"Guards:"})," Set ",a.jsx("code",{className:"rounded bg-muted px-1",children:"apiKey"})," in openclaw.json plugin config"]}),a.jsxs("p",{children:[a.jsx("span",{className:"text-foreground font-semibold",children:"Gateway:"})," Set env ",a.jsx("code",{className:"rounded bg-muted px-1",children:"OT_API_KEY=<key>"})]})]})]})]})]}),a.jsx(xI,{showToast:T}),a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(sf,{className:"h-4 w-4"})," Service Connection"]}),a.jsxs(K,{size:"sm",variant:"outline",onClick:O,disabled:f,children:[f?a.jsx($e,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):a.jsx(Xn,{className:"mr-1.5 h-3.5 w-3.5"}),"Test Connection"]})]})}),a.jsx(Ne,{children:h?a.jsxs("div",{className:`flex items-center gap-2 rounded-md border px-3 py-2 text-sm ${h.connected?"border-emerald-500/30 bg-emerald-50 text-emerald-800 dark:bg-emerald-950 dark:text-emerald-200":"border-destructive/30 bg-red-50 text-red-800 dark:bg-red-950 dark:text-red-200"}`,children:[h.connected?a.jsx(Yn,{className:"h-4 w-4"}):a.jsx(pt,{className:"h-4 w-4"}),a.jsx("span",{children:h.message}),h.url&&a.jsx(he,{variant:"outline",className:"ml-auto text-[10px]",children:h.url})]}):a.jsx("p",{className:"text-xs text-muted-foreground",children:'Click "Test Connection" to verify Core service connectivity'})})]}),a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(Zt,{className:"h-4 w-4"})," Configuration"]})}),a.jsx(Ne,{className:"space-y-5",children:pI.map($=>{const _=$.icon,z=e[$.key]!==n[$.key];return a.jsxs("div",{className:"space-y-1.5",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(_,{className:"h-3.5 w-3.5 text-muted-foreground"}),a.jsx(pe,{htmlFor:$.key,className:"text-sm font-medium",children:$.label}),z&&a.jsx(he,{variant:"secondary",className:"text-[10px]",children:"Modified"})]}),a.jsx(de,{id:$.key,value:e[$.key]??"",onChange:k=>L($.key,k.target.value),placeholder:$.placeholder,className:"font-mono text-sm"}),a.jsx("p",{className:"text-[11px] text-muted-foreground",children:$.description})]},$.key)})})]}),a.jsx(yI,{showToast:T}),a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsx(Re,{className:"text-sm",children:"Environment"})}),a.jsx(Ne,{children:a.jsxs("div",{className:"grid gap-3 text-xs sm:grid-cols-2",children:[a.jsx(Bi,{label:"Dashboard Mode",value:e.dashboard_mode||"selfhosted"}),a.jsx(Bi,{label:"Core URL",value:e.og_core_url||"http://localhost:53666"}),a.jsx(Bi,{label:"Gateway URL",value:e.gateway_url||"http://localhost:8900"}),a.jsx(Bi,{label:"Database",value:e.database_url?"Custom":"SQLite (default)"})]})})]}),c&&a.jsxs("div",{className:`fixed bottom-6 right-6 z-[100] flex items-center gap-2 rounded-lg border px-4 py-3 shadow-lg animate-in slide-in-from-bottom-4 ${c.type==="success"?"border-emerald-500/30 bg-emerald-50 text-emerald-800 dark:bg-emerald-950 dark:text-emerald-200":"border-destructive/30 bg-red-50 text-red-800 dark:bg-red-950 dark:text-red-200"}`,children:[c.type==="success"?a.jsx(Yn,{className:"h-4 w-4"}):a.jsx(pt,{className:"h-4 w-4"}),a.jsx("span",{className:"text-sm",children:c.msg})]})]})}function xI({showToast:e}){const[t,n]=m.useState(""),[r,s]=m.useState(""),[o,i]=m.useState(""),[l,c]=m.useState(!1),u=async h=>{if(h.preventDefault(),r!==o){e("Passwords do not match","error");return}if(r.length<4){e("Password must be at least 4 characters","error");return}c(!0);try{const d=localStorage.getItem("opentrust_user"),f=d?JSON.parse(d).apiKey:null,g=await fetch("/api/auth/change-password",{method:"POST",headers:{"Content-Type":"application/json",...f&&{Authorization:`Bearer ${f}`}},body:JSON.stringify({currentPassword:t,newPassword:r})}),x=await g.json();if(!g.ok||!x.success)throw new Error(x.error||"Failed");e("Password changed successfully","success"),n(""),s(""),i("")}catch(d){e(d instanceof Error?d.message:"Failed to change password","error")}finally{c(!1)}};return a.jsxs(me,{children:[a.jsxs(Ie,{children:[a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(nS,{className:"h-4 w-4"})," Change Password"]}),a.jsx(jl,{className:"text-xs",children:"Update the admin login password"})]}),a.jsx(Ne,{children:a.jsxs("form",{onSubmit:u,className:"space-y-3",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx(pe,{className:"text-xs",children:"Current Password"}),a.jsx(de,{type:"password",value:t,onChange:h=>n(h.target.value),required:!0,className:"text-sm"})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(pe,{className:"text-xs",children:"New Password"}),a.jsx(de,{type:"password",value:r,onChange:h=>s(h.target.value),required:!0,className:"text-sm"})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(pe,{className:"text-xs",children:"Confirm New Password"}),a.jsx(de,{type:"password",value:o,onChange:h=>i(h.target.value),required:!0,className:"text-sm"})]}),a.jsxs(K,{type:"submit",size:"sm",disabled:l,children:[l?a.jsx($e,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):a.jsx(rf,{className:"mr-1.5 h-3.5 w-3.5"}),"Update Password"]})]})})]})}const Lc={browser:{enabled:!0,evaluateEnabled:!0,defaultProfile:"openclaw"},models:{mode:"merge",providers:{}},agents:{defaults:{model:{primary:""},models:{},compaction:{mode:"safeguard"},maxConcurrent:4,subagents:{maxConcurrent:8}}},messages:{ackReactionScope:"group-mentions"},commands:{native:"auto",nativeSkills:"auto",restart:!0,ownerDisplay:"raw"},session:{dmScope:"per-channel-peer"},hooks:{internal:{enabled:!0,entries:{"boot-md":{enabled:!0},"bootstrap-extra-files":{enabled:!0},"command-logger":{enabled:!0},"session-memory":{enabled:!0}}}},gateway:{port:18789,mode:"local",bind:"loopback",auth:{mode:"token"},tailscale:{mode:"off",resetOnExit:!1},nodes:{denyCommands:["camera.snap","camera.clip","screen.record","calendar.add","contacts.add","reminders.add"]}},plugins:{entries:{}}};function Fr(e){var s;const t=((s=e==null?void 0:e.models)==null?void 0:s.providers)??{},n=Object.keys(t)[0]??"",r=n?t[n]:{};return{name:n,baseUrl:r.baseUrl??"",apiKey:r.apiKey??"",api:r.api??"openai-completions",models:r.models??[]}}function Hi(e,t,n,r,s,o){const i=JSON.parse(JSON.stringify(e));i.models||(i.models={mode:"merge",providers:{}});const l=i.models.providers??{},c=Object.keys(l)[0];c&&c!==t&&delete l[c],t&&(l[t]={baseUrl:n,apiKey:r,api:s,models:o}),i.models.providers=l,i.agents||(i.agents={defaults:{}}),i.agents.defaults||(i.agents.defaults={});const u={};for(const h of o)h.id&&(u[`${t}/${h.id}`]={});return i.agents.defaults.models=u,i}function yI({showToast:e}){var T,L,$,_,z,k,D,P;const[t,n]=m.useState(Lc),[r,s]=m.useState(!0),[o,i]=m.useState(!1),[l,c]=m.useState("form"),[u,h]=m.useState(""),[d,f]=m.useState(""),[g,x]=m.useState(!1);m.useEffect(()=>{te.settings.getOpenclawConfig().then(S=>{S.data&&Object.keys(S.data).length>0&&n(S.data)}).catch(()=>{}).finally(()=>s(!1))},[]);const v=Fr(t),N=(($=(L=(T=t==null?void 0:t.agents)==null?void 0:T.defaults)==null?void 0:L.model)==null?void 0:$.primary)??"",p=(S,I)=>{const A=Fr(t),F={name:A.name,baseUrl:A.baseUrl,apiKey:A.apiKey,api:A.api};F[S]=I,n(Hi(t,F.name,F.baseUrl,F.apiKey,F.api,A.models))},w=(S,I,A)=>{var V;const F=Fr(t),B=[...F.models];B[S]={...B[S],[I]:A},I==="id"&&B[S].name===(((V=F.models[S])==null?void 0:V.id)??"")&&(B[S].name=A),n(Hi(t,F.name,F.baseUrl,F.apiKey,F.api,B))},y=()=>{const S=Fr(t),I={id:"",name:"",api:S.api||"openai-completions",reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536};n(Hi(t,S.name,S.baseUrl,S.apiKey,S.api,[...S.models,I]))},j=S=>{const I=Fr(t),A=I.models.filter((F,B)=>B!==S);n(Hi(t,I.name,I.baseUrl,I.apiKey,I.api,A))},b=S=>{n(I=>{const A=JSON.parse(JSON.stringify(I));return A.agents||(A.agents={defaults:{}}),A.agents.defaults||(A.agents.defaults={}),A.agents.defaults.model||(A.agents.defaults.model={}),A.agents.defaults.model.primary=S,A})},E=()=>{h(JSON.stringify(t,null,2)),f(""),c("raw")},C=()=>{if(u.trim())try{n(JSON.parse(u)),f("")}catch{e("Invalid JSON — fix before switching to Form","error");return}c("form")},M=async()=>{let S=t;if(l==="raw")try{S=JSON.parse(u),n(S),f("")}catch{f("Invalid JSON"),e("Cannot save: invalid JSON","error");return}const I=Fr(S);if(!I.name||!I.baseUrl){e("Provider name and base URL are required","error");return}i(!0);try{await te.settings.saveOpenclawConfig(S),e("OpenClaw config saved","success")}catch(A){e(A instanceof Error?A.message:"Failed to save","error")}finally{i(!1)}},R=()=>{window.confirm("Reset to the default empty template? Current config will be lost.")&&(n(JSON.parse(JSON.stringify(Lc))),l==="raw"&&h(JSON.stringify(Lc,null,2)),e("Config reset to default template","success"))};if(r)return null;const O=v.models.filter(S=>S.id).map(S=>({value:`${v.name}/${S.id}`,label:S.name||S.id}));return a.jsxs(me,{children:[a.jsx(Ie,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs(Re,{className:"flex items-center gap-2 text-sm",children:[a.jsx(Pr,{className:"h-4 w-4"})," OpenClaw Config Template"]}),a.jsx(jl,{className:"text-xs mt-1",children:"Full openclaw.json template — used when installing OpenClaw on hosts"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(K,{size:"sm",variant:"ghost",onClick:R,title:"Reset to default",children:a.jsx(lS,{className:"h-3.5 w-3.5"})}),a.jsxs("div",{className:"flex rounded-md border border-border",children:[a.jsxs("button",{className:`px-2.5 py-1 text-xs font-medium rounded-l-md transition-colors ${l==="form"?"bg-primary text-primary-foreground":"hover:bg-muted"}`,onClick:l==="raw"?C:void 0,children:[a.jsx(Mr,{className:"h-3 w-3 inline mr-1"}),"Form"]}),a.jsxs("button",{className:`px-2.5 py-1 text-xs font-medium rounded-r-md transition-colors ${l==="raw"?"bg-primary text-primary-foreground":"hover:bg-muted"}`,onClick:l==="form"?E:void 0,children:[a.jsx(Yb,{className:"h-3 w-3 inline mr-1"}),"Raw"]})]}),a.jsxs(K,{size:"sm",onClick:M,disabled:o,children:[o?a.jsx($e,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):a.jsx(rf,{className:"mr-1.5 h-3.5 w-3.5"}),"Save"]})]})]})}),a.jsxs(Ne,{className:"space-y-5",children:[l==="form"?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"space-y-3 rounded-md border border-border p-4",children:[a.jsx("h4",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Model Provider"}),a.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx(pe,{className:"text-xs",children:"Provider Name"}),a.jsx(de,{value:v.name,onChange:S=>p("name",S.target.value),placeholder:"e.g. bailian",className:"text-sm"})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(pe,{className:"text-xs",children:"API Type"}),a.jsx(de,{value:v.api,onChange:S=>p("api",S.target.value),placeholder:"openai-completions",className:"text-sm"})]}),a.jsxs("div",{className:"space-y-1 sm:col-span-2",children:[a.jsx(pe,{className:"text-xs",children:"Base URL"}),a.jsx(de,{value:v.baseUrl,onChange:S=>p("baseUrl",S.target.value),placeholder:"https://coding.dashscope.aliyuncs.com/v1",className:"text-sm font-mono"})]}),a.jsxs("div",{className:"space-y-1 sm:col-span-2",children:[a.jsx(pe,{className:"text-xs",children:"API Key"}),a.jsx(de,{type:"password",value:v.apiKey,onChange:S=>p("apiKey",S.target.value),placeholder:"sk-xxx",className:"text-sm font-mono"})]})]})]}),a.jsxs("div",{className:"space-y-3 rounded-md border border-border p-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("button",{className:"flex items-center gap-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wider hover:text-foreground transition-colors",onClick:()=>x(!g),children:[g?a.jsx(ty,{className:"h-3 w-3"}):a.jsx(Zo,{className:"h-3 w-3"}),"Models (",v.models.length,")"]}),a.jsxs(K,{size:"sm",variant:"outline",onClick:y,children:[a.jsx(aS,{className:"mr-1 h-3 w-3"})," Add"]})]}),v.models.length===0&&a.jsx("p",{className:"text-xs text-muted-foreground",children:"No models configured."}),!g&&v.models.length>0&&a.jsx("div",{className:"flex flex-wrap gap-1.5",children:v.models.map((S,I)=>a.jsx(he,{variant:"secondary",className:"text-[10px] font-mono",children:S.id||"(empty)"},I))}),g&&v.models.map((S,I)=>a.jsxs("div",{className:"rounded border border-border/50 p-3 space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-xs font-medium font-mono",children:S.id||`Model #${I+1}`}),a.jsx(K,{size:"icon",variant:"ghost",className:"h-6 w-6 text-destructive hover:text-destructive",onClick:()=>j(I),children:a.jsx(Ot,{className:"h-3 w-3"})})]}),a.jsxs("div",{className:"grid gap-2 sm:grid-cols-2",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx(pe,{className:"text-[10px] text-muted-foreground",children:"ID"}),a.jsx(de,{value:S.id??"",onChange:A=>w(I,"id",A.target.value),placeholder:"model-id",className:"text-xs h-8 font-mono"})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(pe,{className:"text-[10px] text-muted-foreground",children:"Display Name"}),a.jsx(de,{value:S.name??"",onChange:A=>w(I,"name",A.target.value),placeholder:"Model Name",className:"text-xs h-8"})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(pe,{className:"text-[10px] text-muted-foreground",children:"Context Window"}),a.jsx(de,{type:"number",value:S.contextWindow??262144,onChange:A=>w(I,"contextWindow",Number(A.target.value)),className:"text-xs h-8 font-mono"})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(pe,{className:"text-[10px] text-muted-foreground",children:"Max Tokens"}),a.jsx(de,{type:"number",value:S.maxTokens??65536,onChange:A=>w(I,"maxTokens",Number(A.target.value)),className:"text-xs h-8 font-mono"})]})]})]},I))]}),a.jsxs("div",{className:"space-y-2 rounded-md border border-border p-4",children:[a.jsx("h4",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Default Model"}),O.length>0?a.jsxs("select",{className:"w-full rounded-md border bg-background px-3 py-2 text-sm",value:N,onChange:S=>b(S.target.value),children:[a.jsx("option",{value:"",children:"-- Select default model --"}),O.map(S=>a.jsxs("option",{value:S.value,children:[S.label," (",S.value,")"]},S.value))]}):a.jsx("p",{className:"text-xs text-muted-foreground",children:"Add a provider and models first."})]}),a.jsxs("div",{className:"space-y-3 rounded-md border border-border p-4",children:[a.jsx("h4",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Agent Defaults"}),a.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx(pe,{className:"text-xs",children:"Max Concurrent"}),a.jsx(de,{type:"number",value:((z=(_=t==null?void 0:t.agents)==null?void 0:_.defaults)==null?void 0:z.maxConcurrent)??4,onChange:S=>n(I=>{var F,B;const A=JSON.parse(JSON.stringify(I));return(F=A.agents)!=null&&F.defaults||(A.agents={defaults:{...(B=A.agents)==null?void 0:B.defaults}}),A.agents.defaults.maxConcurrent=Number(S.target.value),A}),className:"text-sm font-mono"})]}),a.jsxs("div",{className:"space-y-1",children:[a.jsx(pe,{className:"text-xs",children:"Subagent Max Concurrent"}),a.jsx(de,{type:"number",value:((P=(D=(k=t==null?void 0:t.agents)==null?void 0:k.defaults)==null?void 0:D.subagents)==null?void 0:P.maxConcurrent)??8,onChange:S=>n(I=>{var F,B,V;const A=JSON.parse(JSON.stringify(I));return(B=(F=A.agents)==null?void 0:F.defaults)!=null&&B.subagents||(A.agents={...A.agents,defaults:{...(V=A.agents)==null?void 0:V.defaults,subagents:{}}}),A.agents.defaults.subagents.maxConcurrent=Number(S.target.value),A}),className:"text-sm font-mono"})]})]})]})]}):a.jsxs("div",{className:"space-y-2",children:[a.jsx("textarea",{className:"w-full min-h-[480px] rounded-md border border-border bg-muted/30 p-3 font-mono text-xs leading-relaxed focus:outline-none focus:ring-1 focus:ring-ring resize-y",value:u,onChange:S=>{h(S.target.value),f("")},spellCheck:!1}),d&&a.jsx("p",{className:"text-xs text-destructive",children:d})]}),a.jsx("div",{className:"rounded-md border border-border bg-muted/50 p-3",children:a.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[a.jsx("strong",{children:"Auto-injected at install time:"})," ",a.jsx("code",{children:"meta"}),", ",a.jsx("code",{children:"wizard"}),", ",a.jsx("code",{children:"gateway.auth.token"}),", and ",a.jsx("code",{children:"plugins.entries.opentrust-guard"})," (with System API Key, Dashboard URL, Core URL). Use ",a.jsx("strong",{children:"Raw"})," mode to edit advanced settings (hooks, gateway, session, etc.)."]})})]})]})}function Bi({label:e,value:t}){return a.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border px-3 py-2",children:[a.jsx("span",{className:"text-muted-foreground",children:e}),a.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-[11px]",children:t})]})}function vI(){const[e,t]=qj(),[n,r]=m.useState([]),[s,o]=m.useState(!0),[i,l]=m.useState(e.get("expand")),[c,u]=m.useState(null),h=m.useCallback(async()=>{try{const g=await te.hosts.list();r(g.data)}catch{}finally{o(!1)}},[]);m.useEffect(()=>{h();const g=setInterval(h,15e3);return()=>clearInterval(g)},[h]),m.useEffect(()=>{if(!c)return;const g=setTimeout(()=>u(null),4e3);return()=>clearTimeout(g)},[c]);const d=(g,x)=>u({msg:g,type:x}),f=async g=>{try{await te.hosts.remove(g),r(x=>x.filter(v=>v.id!==g)),d("Host removed","success")}catch{d("Failed to remove host","error")}};return s?a.jsx("div",{className:"flex items-center justify-center py-24",children:a.jsx($e,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):a.jsxs("div",{className:"space-y-6 p-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold",children:"Hosts"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage machines running OpenTrust CLI"})]}),a.jsxs(K,{variant:"outline",size:"sm",onClick:h,children:[a.jsx(Xn,{className:"h-4 w-4 mr-1"})," Refresh"]})]}),n.length===0?a.jsxs(me,{className:"p-8 text-center",children:[a.jsx(vl,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),a.jsx("h3",{className:"text-lg font-medium mb-2",children:"No hosts connected"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-4 max-w-md mx-auto",children:"Use the CLI to connect a host to this Dashboard:"}),a.jsx("code",{className:"block bg-muted rounded px-3 py-2 text-xs font-mono max-w-lg mx-auto",children:"opentrust connect --dashboard-url http://this-host:53667 --api-key sk-og-xxx"})]}):a.jsx("div",{className:"space-y-3",children:n.map(g=>a.jsx("div",{children:a.jsx(wI,{host:g,expanded:i===g.id,onToggle:()=>{const x=i===g.id?null:g.id;l(x),x?t({expand:x},{replace:!0}):t({},{replace:!0})},onRemove:()=>f(g.id),showToast:d})},g.id))}),c&&a.jsxs("div",{className:`fixed bottom-6 right-6 z-50 flex items-center gap-2 rounded-lg px-4 py-3 text-sm shadow-lg ${c.type==="success"?"bg-green-600 text-white":"bg-red-600 text-white"}`,children:[c.type==="success"?a.jsx(Yn,{className:"h-4 w-4"}):a.jsx(pt,{className:"h-4 w-4"}),c.msg]})]})}function wI({host:e,expanded:t,onToggle:n,onRemove:r,showToast:s}){const o=e.status==="online",i=e.services??{},l=Object.values(i).filter(d=>d.running).length,c=Object.keys(i).length;e.metadata;const[u,h]=m.useState(0);return m.useEffect(()=>{te.hosts.agents(e.id).then(d=>h((d.data??[]).length)).catch(()=>{})},[e.id]),a.jsxs(me,{className:"overflow-hidden",children:[a.jsxs("button",{onClick:n,className:"w-full flex items-center gap-4 p-4 hover:bg-accent/30 transition-colors text-left",children:[a.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[a.jsx("div",{className:`h-2.5 w-2.5 rounded-full shrink-0 ${o?"bg-green-500":"bg-gray-400"}`}),a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"font-medium truncate",children:e.hostname}),a.jsx(he,{variant:o?"default":"secondary",className:"text-[10px] px-1.5",children:o?"online":"offline"})]}),a.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground mt-0.5",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(ry,{className:"h-3 w-3"})," ",e.ip]}),a.jsxs("span",{children:[e.os," / ",e.arch]}),a.jsxs("span",{children:["CLI v",e.cliVersion]}),a.jsxs("span",{children:[l,"/",c," services"]}),u>0&&a.jsxs("span",{children:[u," agent",u>1?"s":""]})]})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"flex gap-1",children:Object.entries(i).map(([d,f])=>a.jsx("span",{title:`${f.name}: ${f.running?f.healthy?"healthy":"running":"stopped"}`,className:`inline-block h-4 w-4 rounded text-[8px] font-bold flex items-center justify-center ${f.running?f.healthy?"bg-green-500/20 text-green-700 dark:text-green-400":"bg-yellow-500/20 text-yellow-700 dark:text-yellow-400":"bg-gray-500/20 text-gray-500"}`,children:d[0].toUpperCase()},d))}),t?a.jsx(ty,{className:"h-4 w-4 text-muted-foreground"}):a.jsx(Zo,{className:"h-4 w-4 text-muted-foreground"})]})]}),t&&a.jsx("div",{className:"border-t border-border",children:a.jsx(NI,{host:e,onRemove:r,showToast:s})})]})}function NI({host:e,onRemove:t,showToast:n}){const[r,s]=m.useState("agents");return a.jsxs(Tf,{value:r,onValueChange:s,className:"w-full",children:[a.jsxs(Dl,{className:"w-full justify-start rounded-none border-b bg-transparent px-4 pt-2",children:[a.jsx(nt,{value:"agents",children:"Agents"}),a.jsx(nt,{value:"services",children:"Services"}),a.jsx(nt,{value:"guards",children:"Guards"}),a.jsx(nt,{value:"logs",children:"Logs"}),a.jsx(nt,{value:"upgrade",children:"Upgrade"}),a.jsx(nt,{value:"config",children:"Config"}),a.jsx(nt,{value:"commands",children:"Commands"}),a.jsx(nt,{value:"info",children:"Info"})]}),a.jsxs("div",{className:"p-4",children:[a.jsx(rt,{value:"agents",className:"mt-0",children:a.jsx(jI,{host:e,showToast:n})}),a.jsx(rt,{value:"services",className:"mt-0",children:a.jsx(bI,{host:e,showToast:n})}),a.jsx(rt,{value:"guards",className:"mt-0",children:a.jsx(SI,{host:e,showToast:n})}),a.jsx(rt,{value:"logs",className:"mt-0",children:a.jsx(kI,{host:e,showToast:n})}),a.jsx(rt,{value:"upgrade",className:"mt-0",children:a.jsx(CI,{host:e,showToast:n})}),a.jsx(rt,{value:"config",className:"mt-0",children:a.jsx(EI,{host:e,showToast:n})}),a.jsx(rt,{value:"commands",className:"mt-0",children:a.jsx(_I,{hostId:e.id})}),a.jsx(rt,{value:"info",className:"mt-0",children:a.jsx(PI,{host:e,onRemove:t})})]})]})}function jI({host:e,showToast:t}){const[n,r]=m.useState([]),[s,o]=m.useState(!0),[i,l]=m.useState(!1),u=(e.metadata??{}).openclaw;m.useEffect(()=>{te.hosts.agents(e.id).then(d=>r(d.data??[])).catch(()=>{}).finally(()=>o(!1))},[e.id]);const h=async()=>{l(!0);try{await te.hosts.sendCommand(e.id,"install_openclaw",{}),t("Install OpenClaw command sent (includes Guards plugin). Check Commands tab.","success")}catch(d){t((d==null?void 0:d.message)||"Failed to send install command","error")}finally{l(!1)}};return s?a.jsx("div",{className:"flex items-center justify-center py-8",children:a.jsx($e,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-3",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Pr,{className:"h-4 w-4 text-primary"}),a.jsx("span",{className:"text-sm font-medium",children:"OpenClaw Runtime"}),u!=null&&u.installed?a.jsxs(he,{variant:"default",className:"text-[10px]",children:["Installed",u.version?` · ${u.version}`:""]}):a.jsx(he,{variant:"secondary",className:"text-[10px]",children:"Not installed"})]}),a.jsxs(K,{size:"sm",onClick:h,disabled:i,children:[i?a.jsx($e,{className:"h-3.5 w-3.5 mr-1 animate-spin"}):a.jsx(Ct,{className:"h-3.5 w-3.5 mr-1"}),u!=null&&u.installed?"Reinstall":"Install OpenClaw"]})]}),a.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Installs OpenClaw, writes config from ",a.jsx("a",{href:"/system/settings",className:"text-primary underline",children:"Settings template"}),", and auto-installs the Guards plugin."]})]}),n.length===0?a.jsxs("div",{className:"flex flex-col items-center gap-3 py-6 text-center",children:[a.jsx(vl,{className:"h-8 w-8 text-muted-foreground/30"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents associated with this host"}),a.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Install OpenClaw above, then agents will auto-link once the Guards plugin reports in"})]}):a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-sm text-muted-foreground",children:[n.length," agent",n.length>1?"s":""," running on this host"]}),n.map(d=>{const f=d.metadata??{},g=f.emoji||"🤖",x=f.openclawId||d.id;return a.jsxs(Gn,{to:`/inventory/agents/${x}`,className:"flex items-center gap-3 rounded-lg border border-border p-3 transition-colors hover:bg-muted/30",children:[a.jsx("span",{className:"text-lg",children:g}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium truncate",children:d.name}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[d.provider!=="custom"?d.provider:""," ",a.jsx(he,{variant:d.status==="active"?"default":"secondary",className:"text-[10px] ml-1",children:d.status})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[d.lastSeenAt&&a.jsx("span",{className:"text-[11px] text-muted-foreground",children:new Date(d.lastSeenAt).toLocaleString()}),a.jsx(yl,{className:"h-3.5 w-3.5 text-muted-foreground/50 rotate-90"})]})]},d.id)})]})]})}function bI({host:e,showToast:t}){const n=e.services??{},[r,s]=m.useState(null),o=async(i,l)=>{s(`${i}-${l}`);try{await te.hosts.sendCommand(e.id,i,{service:l}),t(`${i.replace("_"," ")} "${l}" sent`,"success")}catch{t(`Failed to send ${i}`,"error")}finally{s(null)}};return a.jsxs("div",{className:"space-y-2",children:[Object.entries(n).map(([i,l])=>a.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border px-4 py-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:`h-2 w-2 rounded-full ${l.running?l.healthy?"bg-green-500":"bg-yellow-500":"bg-gray-400"}`}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-sm",children:l.name}),a.jsxs("span",{className:"text-xs text-muted-foreground ml-2",children:[":",l.port]}),l.pid&&a.jsxs("span",{className:"text-xs text-muted-foreground ml-2",children:["PID ",l.pid]})]})]}),a.jsx("div",{className:"flex items-center gap-1",children:l.running?a.jsxs(a.Fragment,{children:[a.jsxs(K,{variant:"outline",size:"sm",disabled:r!==null,onClick:()=>o("restart_service",i),children:[a.jsx(Da,{className:"h-3 w-3 mr-1"})," Restart"]}),a.jsxs(K,{variant:"outline",size:"sm",disabled:r!==null,onClick:()=>o("stop_service",i),children:[a.jsx(Ao,{className:"h-3 w-3 mr-1"})," Stop"]})]}):a.jsxs(K,{variant:"outline",size:"sm",disabled:r!==null,onClick:()=>o("start_service",i),children:[a.jsx(za,{className:"h-3 w-3 mr-1"})," Start"]})})]},i)),a.jsxs("div",{className:"flex gap-2 pt-2",children:[a.jsxs(K,{variant:"outline",size:"sm",disabled:r!==null,onClick:()=>o("start_service","all"),children:[a.jsx(za,{className:"h-3 w-3 mr-1"})," Start All"]}),a.jsxs(K,{variant:"outline",size:"sm",disabled:r!==null,onClick:()=>o("stop_service","all"),children:[a.jsx(Ao,{className:"h-3 w-3 mr-1"})," Stop All"]}),a.jsxs(K,{variant:"outline",size:"sm",disabled:r!==null,onClick:()=>o("restart_service","all"),children:[a.jsx(Da,{className:"h-3 w-3 mr-1"})," Restart All"]})]})]})}function SI({host:e,showToast:t}){const[n,r]=m.useState(""),[s,o]=m.useState(null),l=(e.metadata??{}).guards,c=async u=>{o(u);try{await te.hosts.sendCommand(e.id,u,n?{version:n}:{}),t(u==="install_guards"?"Guards install command sent":"Guards upgrade command sent","success")}catch{t(`Failed to send ${u.replace("_"," ")} command`,"error")}finally{o(null)}};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(oy,{className:"h-5 w-5 text-primary"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium",children:"OpenTrust Guards Plugin"}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Install or upgrade the ",a.jsx("code",{children:"@opentrust/guards"})," security plugin for OpenClaw on this host"]})]})]}),(l==null?void 0:l.installed)&&a.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[a.jsx(he,{variant:"default",className:"text-xs",children:"Installed"}),l.version&&a.jsxs("span",{className:"text-muted-foreground",children:["v",l.version]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(de,{placeholder:"Version (empty = latest)",value:n,onChange:u=>r(u.target.value),className:"max-w-xs"}),a.jsxs(K,{onClick:()=>c("install_guards"),disabled:s!==null,variant:"default",children:[s==="install_guards"?a.jsx($e,{className:"h-4 w-4 mr-1 animate-spin"}):a.jsx(Ct,{className:"h-4 w-4 mr-1"}),"Install"]}),a.jsxs(K,{onClick:()=>c("upgrade_guards"),disabled:s!==null,variant:"outline",children:[s==="upgrade_guards"?a.jsx($e,{className:"h-4 w-4 mr-1 animate-spin"}):a.jsx(yl,{className:"h-4 w-4 mr-1"}),"Upgrade"]})]}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[a.jsx("strong",{children:"Install"}),": runs ",a.jsx("code",{children:"openclaw plugins install @opentrust/guards"})," on the remote host.",a.jsx("br",{}),a.jsx("strong",{children:"Upgrade"}),": uninstalls the current version then installs the specified (or latest) version.",a.jsx("br",{}),"Check the ",a.jsx("strong",{children:"Commands"})," tab to see execution results."]})]})}function kI({host:e,showToast:t}){const n=Object.keys(e.services??{}),[r,s]=m.useState(n[0]??"core"),[o,i]=m.useState(null),[l,c]=m.useState(!1),u=async()=>{c(!0);try{await te.hosts.sendCommand(e.id,"fetch_logs",{service:r,lines:200}),t("Log fetch command sent. Check Commands tab for result.","success")}catch{t("Failed to send fetch_logs command","error")}finally{c(!1)}};return a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(pe,{children:"Service:"}),a.jsx("select",{className:"rounded border border-border bg-background px-2 py-1 text-sm",value:r,onChange:h=>s(h.target.value),children:n.map(h=>a.jsx("option",{value:h,children:h},h))}),a.jsxs(K,{variant:"outline",size:"sm",onClick:u,disabled:l,children:[a.jsx(Mr,{className:"h-3 w-3 mr-1"})," Fetch Logs"]})]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:'The fetch_logs command is sent to the host CLI daemon. View the result in the "Commands" tab once completed.'})]})}function CI({host:e,showToast:t}){const[n,r]=m.useState(""),[s,o]=m.useState(!1),i=async()=>{o(!0);try{await te.hosts.sendCommand(e.id,"upgrade",n?{version:n}:{}),t("Upgrade command sent","success")}catch{t("Failed to send upgrade command","error")}finally{o(!1)}};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[a.jsxs("span",{children:["Current CLI version: ",a.jsxs("strong",{children:["v",e.cliVersion]})]}),a.jsxs("span",{children:["Project mode: ",a.jsx(he,{variant:"secondary",children:e.projectMode})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(de,{placeholder:"Target version (empty = latest)",value:n,onChange:l=>r(l.target.value),className:"max-w-xs"}),a.jsxs(K,{onClick:i,disabled:s,children:[a.jsx(yl,{className:"h-4 w-4 mr-1"})," Upgrade"]})]}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Runs ",a.jsx("code",{children:"npm install -g @opentrust/cli@version"})," and upgrades project packages on the remote host."]})]})}function EI({host:e,showToast:t}){const[n,r]=m.useState(""),[s,o]=m.useState(""),[i,l]=m.useState(!1),c=async()=>{if(n){l(!0);try{await te.hosts.sendCommand(e.id,"update_env",{key:n,value:s}),t(`ENV update sent: ${n}`,"success"),r(""),o("")}catch{t("Failed to send config update","error")}finally{l(!1)}}};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("p",{className:"text-sm text-muted-foreground",children:["Update environment variables in the remote host's ",a.jsx("code",{children:".env"})," file."]}),a.jsxs("div",{className:"grid grid-cols-2 gap-2 max-w-lg",children:[a.jsxs("div",{children:[a.jsx(pe,{className:"text-xs",children:"Key"}),a.jsx(de,{placeholder:"e.g. CORE_API_KEY",value:n,onChange:u=>r(u.target.value)})]}),a.jsxs("div",{children:[a.jsx(pe,{className:"text-xs",children:"Value"}),a.jsx(de,{placeholder:"Value",value:s,onChange:u=>o(u.target.value)})]})]}),a.jsxs(K,{size:"sm",onClick:c,disabled:i||!n,children:[a.jsx(Zt,{className:"h-3 w-3 mr-1"})," Update .env"]})]})}function _I({hostId:e}){const[t,n]=m.useState([]),[r,s]=m.useState(!0),o=m.useCallback(async()=>{try{const c=await te.hosts.commands(e);n(c.data)}catch{}s(!1)},[e]);m.useEffect(()=>{o();const c=setInterval(o,8e3);return()=>clearInterval(c)},[o]);const i=c=>{const u={pending:"bg-yellow-500/20 text-yellow-700 dark:text-yellow-400",running:"bg-blue-500/20 text-blue-700 dark:text-blue-400",completed:"bg-green-500/20 text-green-700 dark:text-green-400",failed:"bg-red-500/20 text-red-700 dark:text-red-400"};return a.jsx("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-medium ${u[c]??"bg-gray-500/20 text-gray-500"}`,children:c})},l=c=>({start_service:a.jsx(za,{className:"h-3 w-3"}),stop_service:a.jsx(Ao,{className:"h-3 w-3"}),restart_service:a.jsx(Da,{className:"h-3 w-3"}),upgrade:a.jsx(yl,{className:"h-3 w-3"}),fetch_logs:a.jsx(Mr,{className:"h-3 w-3"}),update_env:a.jsx(Zt,{className:"h-3 w-3"})})[c]??a.jsx(xs,{className:"h-3 w-3"});return r?a.jsx("div",{className:"text-sm text-muted-foreground py-4",children:"Loading..."}):t.length===0?a.jsx("div",{className:"text-sm text-muted-foreground py-4",children:"No commands yet."}):a.jsx("div",{className:"space-y-2 max-h-[400px] overflow-y-auto",children:t.map(c=>a.jsxs("div",{className:"rounded border border-border p-3 text-sm",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[l(c.type),a.jsx("span",{className:"font-medium",children:c.type.replace(/_/g," ")}),i(c.status)]}),a.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(c.createdAt).toLocaleString()})]}),c.payload&&a.jsx("pre",{className:"text-xs bg-muted rounded px-2 py-1 mt-1 overflow-x-auto",children:JSON.stringify(c.payload,null,2)}),c.result&&a.jsx("pre",{className:`text-xs rounded px-2 py-1 mt-1 overflow-x-auto ${c.status==="failed"?"bg-red-500/10":"bg-green-500/10"}`,children:JSON.stringify(c.result,null,2)})]},c.id))})}function PI({host:e,onRemove:t}){const n=e.metadata??{},[r,s]=m.useState(!1),o=[{label:"Host ID",value:e.id},{label:"Hostname",value:e.hostname},{label:"OS",value:`${e.os} (${e.arch})`},{label:"IP",value:e.ip},{label:"CLI Version",value:e.cliVersion},{label:"Project Mode",value:e.projectMode},{label:"Project Root",value:e.projectRoot},{label:"CPU",value:`${n.cpuModel} (${n.cpuCount} cores)`},{label:"Memory",value:`${n.freeMemMB} MB free / ${n.totalMemMB} MB total`},{label:"Node.js",value:String(n.nodeVersion??"")},{label:"Uptime",value:n.uptime?`${Math.round(Number(n.uptime)/3600)} hours`:""},{label:"Last Seen",value:new Date(e.lastSeenAt).toLocaleString()},{label:"Connected Since",value:new Date(e.createdAt).toLocaleString()}];return a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"grid grid-cols-2 gap-x-6 gap-y-2",children:o.filter(i=>i.value).map(i=>a.jsxs("div",{className:"flex gap-2 text-sm py-1",children:[a.jsxs("span",{className:"text-muted-foreground min-w-[120px]",children:[i.label,":"]}),a.jsx("span",{className:"font-mono text-xs break-all",children:i.value})]},i.label))}),a.jsx("div",{className:"border-t border-border pt-4",children:a.jsxs(K,{variant:"destructive",size:"sm",onClick:()=>s(!0),children:[a.jsx(Ot,{className:"h-3 w-3 mr-1"})," Remove Host"]})}),a.jsx(Ir,{open:r,onOpenChange:s,children:a.jsxs(er,{children:[a.jsxs(Rr,{children:[a.jsx(tr,{children:"Remove Host"}),a.jsxs(nr,{children:["Remove ",a.jsx("strong",{children:e.hostname})," from the Dashboard? The host will need to run"," ",a.jsx("code",{children:"opentrust connect"})," again to re-register."]})]}),a.jsxs(Tr,{children:[a.jsx(K,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),a.jsx(K,{variant:"destructive",onClick:()=>{s(!1),t()},children:"Remove"})]})]})})]})}function MI({children:e}){const{isAuthenticated:t,isLoading:n}=Jd();return n?a.jsx("div",{className:"flex min-h-screen items-center justify-center",children:a.jsx("div",{className:"text-muted-foreground text-sm",children:"Loading..."})}):t?a.jsx(a.Fragment,{children:e}):a.jsx(Pu,{to:"/login",replace:!0})}function II(){return a.jsxs(jj,{children:[a.jsx(Ye,{path:"/login",element:a.jsx(bS,{})}),a.jsxs(Ye,{element:a.jsx(MI,{children:a.jsx(jS,{})}),children:[a.jsx(Ye,{index:!0,element:a.jsx(Pu,{to:"/inventory/agents",replace:!0})}),a.jsx(Ye,{path:"/inventory/agents",element:a.jsx(qk,{})}),a.jsx(Ye,{path:"/inventory/agents/:id",element:a.jsx(eC,{})}),a.jsx(Ye,{path:"/inventory/identities",element:a.jsx(oC,{})}),a.jsx(Ye,{path:"/inventory/permissions",element:a.jsx(iC,{})}),a.jsx(Ye,{path:"/secure/risk",element:a.jsx(aC,{})}),a.jsx(Ye,{path:"/secure/graph",element:a.jsx(PM,{})}),a.jsx(Ye,{path:"/ops/skills",element:a.jsx(YM,{})}),a.jsx(Ye,{path:"/ops/plugins",element:a.jsx(nI,{})}),a.jsx(Ye,{path:"/inventory/hosts",element:a.jsx(vI,{})}),a.jsx(Ye,{path:"/system/logs",element:a.jsx(dI,{})}),a.jsx(Ye,{path:"/system/settings",element:a.jsx(gI,{})})]}),a.jsx(Ye,{path:"*",element:a.jsx(Pu,{to:"/inventory/agents",replace:!0})})]})}Ac.createRoot(document.getElementById("root")).render(a.jsx(Wt.StrictMode,{children:a.jsx(Gj,{basename:"/dashboard",children:a.jsx(rb,{children:a.jsx(ob,{children:a.jsx(II,{})})})})}));
|
|
418
|
+
//# sourceMappingURL=index-DzS9Yr59.js.map
|