@opentrust/dashboard 7.3.15 → 7.3.16
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/package.json +3 -3
- package/public/assets/index-21v8SsP2.js +348 -0
- package/public/assets/index-21v8SsP2.js.map +1 -0
- package/public/assets/{index-Cm8HDPq1.css → index-WH1q0VNo.css} +1 -1
- package/public/index.html +2 -2
- package/public/assets/index-COriRF_c.js +0 -318
- package/public/assets/index-COriRF_c.js.map +0 -1
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
function Ow(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();function Ac(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var om={exports:{}},zl={},sm={exports:{}},re={};/**
|
|
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 Ts=Symbol.for("react.element"),Fw=Symbol.for("react.portal"),Bw=Symbol.for("react.fragment"),Hw=Symbol.for("react.strict_mode"),Vw=Symbol.for("react.profiler"),Uw=Symbol.for("react.provider"),Ww=Symbol.for("react.context"),Yw=Symbol.for("react.forward_ref"),Gw=Symbol.for("react.suspense"),Xw=Symbol.for("react.memo"),Kw=Symbol.for("react.lazy"),Cf=Symbol.iterator;function Qw(e){return e===null||typeof e!="object"?null:(e=Cf&&e[Cf]||e["@@iterator"],typeof e=="function"?e:null)}var im={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lm=Object.assign,am={};function mo(e,t,n){this.props=e,this.context=t,this.refs=am,this.updater=n||im}mo.prototype.isReactComponent={};mo.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")};mo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function um(){}um.prototype=mo.prototype;function zc(e,t,n){this.props=e,this.context=t,this.refs=am,this.updater=n||im}var Dc=zc.prototype=new um;Dc.constructor=zc;lm(Dc,mo.prototype);Dc.isPureReactComponent=!0;var jf=Array.isArray,cm=Object.prototype.hasOwnProperty,$c={current:null},dm={key:!0,ref:!0,__self:!0,__source:!0};function fm(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)cm.call(t,r)&&!dm.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:Ts,type:e,key:s,ref:i,props:o,_owner:$c.current}}function qw(e,t){return{$$typeof:Ts,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Oc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ts}function Zw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var _f=/\/+/g;function ba(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Zw(""+e.key):t.toString(36)}function _i(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Ts:case Fw:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+ba(i,0):r,jf(o)?(n="",e!=null&&(n=e.replace(_f,"$&/")+"/"),_i(o,t,n,"",function(u){return u})):o!=null&&(Oc(o)&&(o=qw(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(_f,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",jf(e))for(var l=0;l<e.length;l++){s=e[l];var a=r+ba(s,l);i+=_i(s,t,n,a,o)}else if(a=Qw(e),typeof a=="function")for(e=a.call(e),l=0;!(s=e.next()).done;)s=s.value,a=r+ba(s,l++),i+=_i(s,t,n,a,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Xs(e,t,n){if(e==null)return e;var r=[],o=0;return _i(e,r,"","",function(s){return t.call(n,s,o++)}),r}function Jw(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 Ge={current:null},Pi={transition:null},e1={ReactCurrentDispatcher:Ge,ReactCurrentBatchConfig:Pi,ReactCurrentOwner:$c};re.Children={map:Xs,forEach:function(e,t,n){Xs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Xs(e,function(){t++}),t},toArray:function(e){return Xs(e,function(t){return t})||[]},only:function(e){if(!Oc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Component=mo;re.Fragment=Bw;re.Profiler=Vw;re.PureComponent=zc;re.StrictMode=Hw;re.Suspense=Gw;re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=e1;re.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=lm({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=$c.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)cm.call(t,a)&&!dm.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Ts,type:e.type,key:o,ref:s,props:r,_owner:i}};re.createContext=function(e){return e={$$typeof:Ww,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Uw,_context:e},e.Consumer=e};re.createElement=fm;re.createFactory=function(e){var t=fm.bind(null,e);return t.type=e,t};re.createRef=function(){return{current:null}};re.forwardRef=function(e){return{$$typeof:Yw,render:e}};re.isValidElement=Oc;re.lazy=function(e){return{$$typeof:Kw,_payload:{_status:-1,_result:e},_init:Jw}};re.memo=function(e,t){return{$$typeof:Xw,type:e,compare:t===void 0?null:t}};re.startTransition=function(e){var t=Pi.transition;Pi.transition={};try{e()}finally{Pi.transition=t}};re.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};re.useCallback=function(e,t){return Ge.current.useCallback(e,t)};re.useContext=function(e){return Ge.current.useContext(e)};re.useDebugValue=function(){};re.useDeferredValue=function(e){return Ge.current.useDeferredValue(e)};re.useEffect=function(e,t){return Ge.current.useEffect(e,t)};re.useId=function(){return Ge.current.useId()};re.useImperativeHandle=function(e,t,n){return Ge.current.useImperativeHandle(e,t,n)};re.useInsertionEffect=function(e,t){return Ge.current.useInsertionEffect(e,t)};re.useLayoutEffect=function(e,t){return Ge.current.useLayoutEffect(e,t)};re.useMemo=function(e,t){return Ge.current.useMemo(e,t)};re.useReducer=function(e,t,n){return Ge.current.useReducer(e,t,n)};re.useRef=function(e){return Ge.current.useRef(e)};re.useState=function(e){return Ge.current.useState(e)};re.useSyncExternalStore=function(e,t,n){return Ge.current.useSyncExternalStore(e,t,n)};re.useTransition=function(){return Ge.current.useTransition()};re.version="18.3.0";sm.exports=re;var g=sm.exports;const Dt=Ac(g),t1=Ow({__proto__:null,default:Dt},[g]);/**
|
|
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 n1=g,r1=Symbol.for("react.element"),o1=Symbol.for("react.fragment"),s1=Object.prototype.hasOwnProperty,i1=n1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l1={key:!0,ref:!0,__self:!0,__source:!0};function hm(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)s1.call(t,r)&&!l1.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:r1,type:e,key:s,ref:i,props:o,_owner:i1.current}}zl.Fragment=o1;zl.jsx=hm;zl.jsxs=hm;om.exports=zl;var c=om.exports,xu={},pm={exports:{}},dt={},mm={exports:{}},gm={};/**
|
|
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(C,P){var L=C.length;C.push(P);e:for(;0<L;){var O=L-1>>>1,$=C[O];if(0<o($,P))C[O]=P,C[L]=$,L=O;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var P=C[0],L=C.pop();if(L!==P){C[0]=L;e:for(var O=0,$=C.length,U=$>>>1;O<U;){var V=2*(O+1)-1,Y=C[V],G=V+1,X=C[G];if(0>o(Y,L))G<$&&0>o(X,Y)?(C[O]=X,C[G]=L,O=G):(C[O]=Y,C[V]=L,O=V);else if(G<$&&0>o(X,L))C[O]=X,C[G]=L,O=G;else break e}}return P}function o(C,P){var L=C.sortIndex-P.sortIndex;return L!==0?L:C.id-P.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var a=[],u=[],h=1,f=null,d=3,x=!1,y=!1,w=!1,N=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(C){for(var P=n(u);P!==null;){if(P.callback===null)r(u);else if(P.startTime<=C)r(u),P.sortIndex=P.expirationTime,t(a,P);else break;P=n(u)}}function S(C){if(w=!1,m(C),!y)if(n(a)!==null)y=!0,M(k);else{var P=n(u);P!==null&&z(S,P.startTime-C)}}function k(C,P){y=!1,w&&(w=!1,p(_),_=-1),x=!0;var L=d;try{for(m(P),f=n(a);f!==null&&(!(f.expirationTime>P)||C&&!I());){var O=f.callback;if(typeof O=="function"){f.callback=null,d=f.priorityLevel;var $=O(f.expirationTime<=P);P=e.unstable_now(),typeof $=="function"?f.callback=$:f===n(a)&&r(a),m(P)}else r(a);f=n(a)}if(f!==null)var U=!0;else{var V=n(u);V!==null&&z(S,V.startTime-P),U=!1}return U}finally{f=null,d=L,x=!1}}var E=!1,b=null,_=-1,R=5,D=-1;function I(){return!(e.unstable_now()-D<R)}function T(){if(b!==null){var C=e.unstable_now();D=C;var P=!0;try{P=b(!0,C)}finally{P?F():(E=!1,b=null)}}else E=!1}var F;if(typeof v=="function")F=function(){v(T)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,A=j.port2;j.port1.onmessage=T,F=function(){A.postMessage(null)}}else F=function(){N(T,0)};function M(C){b=C,E||(E=!0,F())}function z(C,P){_=N(function(){C(e.unstable_now())},P)}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(C){C.callback=null},e.unstable_continueExecution=function(){y||x||(y=!0,M(k))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(C){switch(d){case 1:case 2:case 3:var P=3;break;default:P=d}var L=d;d=P;try{return C()}finally{d=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,P){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var L=d;d=C;try{return P()}finally{d=L}},e.unstable_scheduleCallback=function(C,P,L){var O=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?O+L:O):L=O,C){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=L+$,C={id:h++,callback:P,priorityLevel:C,startTime:L,expirationTime:$,sortIndex:-1},L>O?(C.sortIndex=L,t(u,C),n(a)===null&&C===n(u)&&(w?(p(_),_=-1):w=!0,z(S,L-O))):(C.sortIndex=$,t(a,C),y||x||(y=!0,M(k))),C},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(C){var P=d;return function(){var L=d;d=P;try{return C.apply(this,arguments)}finally{d=L}}}})(gm);mm.exports=gm;var a1=mm.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 u1=g,ut=a1;function B(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 ym=new Set,os={};function gr(e,t){Kr(e,t),Kr(e+"Capture",t)}function Kr(e,t){for(os[e]=t,e=0;e<t.length;e++)ym.add(t[e])}var on=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vu=Object.prototype.hasOwnProperty,c1=/^[: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]*$/,Pf={},Mf={};function d1(e){return vu.call(Mf,e)?!0:vu.call(Pf,e)?!1:c1.test(e)?Mf[e]=!0:(Pf[e]=!0,!1)}function f1(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 h1(e,t,n,r){if(t===null||typeof t>"u"||f1(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 Xe(e,t,n,r,o,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var De={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){De[e]=new Xe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];De[t]=new Xe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){De[e]=new Xe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){De[e]=new Xe(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){De[e]=new Xe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){De[e]=new Xe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){De[e]=new Xe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){De[e]=new Xe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){De[e]=new Xe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fc=/[\-:]([a-z])/g;function Bc(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(Fc,Bc);De[t]=new Xe(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(Fc,Bc);De[t]=new Xe(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(Fc,Bc);De[t]=new Xe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){De[e]=new Xe(e,1,!1,e.toLowerCase(),null,!1,!1)});De.xlinkHref=new Xe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){De[e]=new Xe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Hc(e,t,n,r){var o=De.hasOwnProperty(t)?De[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(h1(t,n,o,r)&&(n=null),r||o===null?d1(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var dn=u1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ks=Symbol.for("react.element"),Er=Symbol.for("react.portal"),br=Symbol.for("react.fragment"),Vc=Symbol.for("react.strict_mode"),wu=Symbol.for("react.profiler"),xm=Symbol.for("react.provider"),vm=Symbol.for("react.context"),Uc=Symbol.for("react.forward_ref"),Su=Symbol.for("react.suspense"),Nu=Symbol.for("react.suspense_list"),Wc=Symbol.for("react.memo"),wn=Symbol.for("react.lazy"),wm=Symbol.for("react.offscreen"),Rf=Symbol.iterator;function Co(e){return e===null||typeof e!="object"?null:(e=Rf&&e[Rf]||e["@@iterator"],typeof e=="function"?e:null)}var Se=Object.assign,Ca;function Fo(e){if(Ca===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ca=t&&t[1]||""}return`
|
|
34
|
+
`+Ca+e}var ja=!1;function _a(e,t){if(!e||ja)return"";ja=!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 o=u.stack.split(`
|
|
35
|
+
`),s=r.stack.split(`
|
|
36
|
+
`),i=o.length-1,l=s.length-1;1<=i&&0<=l&&o[i]!==s[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==s[l]){if(i!==1||l!==1)do if(i--,l--,0>l||o[i]!==s[l]){var a=`
|
|
37
|
+
`+o[i].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=i&&0<=l);break}}}finally{ja=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fo(e):""}function p1(e){switch(e.tag){case 5:return Fo(e.type);case 16:return Fo("Lazy");case 13:return Fo("Suspense");case 19:return Fo("SuspenseList");case 0:case 2:case 15:return e=_a(e.type,!1),e;case 11:return e=_a(e.type.render,!1),e;case 1:return e=_a(e.type,!0),e;default:return""}}function ku(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 Er:return"Portal";case wu:return"Profiler";case Vc:return"StrictMode";case Su:return"Suspense";case Nu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vm:return(e.displayName||"Context")+".Consumer";case xm:return(e._context.displayName||"Context")+".Provider";case Uc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Wc:return t=e.displayName||null,t!==null?t:ku(e.type)||"Memo";case wn:t=e._payload,e=e._init;try{return ku(e(t))}catch{}}return null}function m1(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 ku(t);case 8:return t===Vc?"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 zn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function g1(e){var t=Sm(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 o=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.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 Qs(e){e._valueTracker||(e._valueTracker=g1(e))}function Nm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ki(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 Eu(e,t){var n=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Tf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=zn(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 km(e,t){t=t.checked,t!=null&&Hc(e,"checked",t,!1)}function bu(e,t){km(e,t);var n=zn(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")?Cu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Cu(e,t.type,zn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function If(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 Cu(e,t,n){(t!=="number"||Ki(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Bo=Array.isArray;function $r(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+zn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function ju(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(B(91));return Se({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Lf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(B(92));if(Bo(n)){if(1<n.length)throw Error(B(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:zn(n)}}function Em(e,t){var n=zn(t.value),r=zn(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 Af(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function bm(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 _u(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?bm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qs,Cm=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(qs=qs||document.createElement("div"),qs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ss(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yo={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},y1=["Webkit","ms","Moz","O"];Object.keys(Yo).forEach(function(e){y1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Yo[t]=Yo[e]})});function jm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Yo.hasOwnProperty(e)&&Yo[e]?(""+t).trim():t+"px"}function _m(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=jm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var x1=Se({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 Pu(e,t){if(t){if(x1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(B(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(B(61))}if(t.style!=null&&typeof t.style!="object")throw Error(B(62))}}function Mu(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 Ru=null;function Yc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tu=null,Or=null,Fr=null;function zf(e){if(e=As(e)){if(typeof Tu!="function")throw Error(B(280));var t=e.stateNode;t&&(t=Bl(t),Tu(e.stateNode,e.type,t))}}function Pm(e){Or?Fr?Fr.push(e):Fr=[e]:Or=e}function Mm(){if(Or){var e=Or,t=Fr;if(Fr=Or=null,zf(e),t)for(e=0;e<t.length;e++)zf(t[e])}}function Rm(e,t){return e(t)}function Tm(){}var Pa=!1;function Im(e,t,n){if(Pa)return e(t,n);Pa=!0;try{return Rm(e,t,n)}finally{Pa=!1,(Or!==null||Fr!==null)&&(Tm(),Mm())}}function is(e,t){var n=e.stateNode;if(n===null)return null;var r=Bl(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(B(231,t,typeof n));return n}var Iu=!1;if(on)try{var jo={};Object.defineProperty(jo,"passive",{get:function(){Iu=!0}}),window.addEventListener("test",jo,jo),window.removeEventListener("test",jo,jo)}catch{Iu=!1}function v1(e,t,n,r,o,s,i,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(h){this.onError(h)}}var Go=!1,Qi=null,qi=!1,Lu=null,w1={onError:function(e){Go=!0,Qi=e}};function S1(e,t,n,r,o,s,i,l,a){Go=!1,Qi=null,v1.apply(w1,arguments)}function N1(e,t,n,r,o,s,i,l,a){if(S1.apply(this,arguments),Go){if(Go){var u=Qi;Go=!1,Qi=null}else throw Error(B(198));qi||(qi=!0,Lu=u)}}function yr(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 Lm(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 Df(e){if(yr(e)!==e)throw Error(B(188))}function k1(e){var t=e.alternate;if(!t){if(t=yr(e),t===null)throw Error(B(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return Df(o),e;if(s===r)return Df(o),t;s=s.sibling}throw Error(B(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,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){for(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)throw Error(B(189))}}if(n.alternate!==r)throw Error(B(190))}if(n.tag!==3)throw Error(B(188));return n.stateNode.current===n?e:t}function Am(e){return e=k1(e),e!==null?zm(e):null}function zm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=zm(e);if(t!==null)return t;e=e.sibling}return null}var Dm=ut.unstable_scheduleCallback,$f=ut.unstable_cancelCallback,E1=ut.unstable_shouldYield,b1=ut.unstable_requestPaint,Ee=ut.unstable_now,C1=ut.unstable_getCurrentPriorityLevel,Gc=ut.unstable_ImmediatePriority,$m=ut.unstable_UserBlockingPriority,Zi=ut.unstable_NormalPriority,j1=ut.unstable_LowPriority,Om=ut.unstable_IdlePriority,Dl=null,Bt=null;function _1(e){if(Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(Dl,e,void 0,(e.current.flags&128)===128)}catch{}}var Pt=Math.clz32?Math.clz32:R1,P1=Math.log,M1=Math.LN2;function R1(e){return e>>>=0,e===0?32:31-(P1(e)/M1|0)|0}var Zs=64,Js=4194304;function Ho(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 Ji(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~o;l!==0?r=Ho(l):(s&=i,s!==0&&(r=Ho(s)))}else i=n&~o,i!==0?r=Ho(i):s!==0&&(r=Ho(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Pt(t),o=1<<n,r|=e[n],t&=~o;return r}function T1(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 I1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Pt(s),l=1<<i,a=o[i];a===-1?(!(l&n)||l&r)&&(o[i]=T1(l,t)):a<=t&&(e.expiredLanes|=l),s&=~l}}function Au(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Fm(){var e=Zs;return Zs<<=1,!(Zs&4194240)&&(Zs=64),e}function Ma(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Is(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Pt(t),e[t]=n}function L1(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 o=31-Pt(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function Xc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ae=0;function Bm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Hm,Kc,Vm,Um,Wm,zu=!1,ei=[],jn=null,_n=null,Pn=null,ls=new Map,as=new Map,Nn=[],A1="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 Of(e,t){switch(e){case"focusin":case"focusout":jn=null;break;case"dragenter":case"dragleave":_n=null;break;case"mouseover":case"mouseout":Pn=null;break;case"pointerover":case"pointerout":ls.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":as.delete(t.pointerId)}}function _o(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=As(t),t!==null&&Kc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function z1(e,t,n,r,o){switch(t){case"focusin":return jn=_o(jn,e,t,n,r,o),!0;case"dragenter":return _n=_o(_n,e,t,n,r,o),!0;case"mouseover":return Pn=_o(Pn,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return ls.set(s,_o(ls.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,as.set(s,_o(as.get(s)||null,e,t,n,r,o)),!0}return!1}function Ym(e){var t=Xn(e.target);if(t!==null){var n=yr(t);if(n!==null){if(t=n.tag,t===13){if(t=Lm(n),t!==null){e.blockedOn=t,Wm(e.priority,function(){Vm(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 Mi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Du(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ru=r,n.target.dispatchEvent(r),Ru=null}else return t=As(n),t!==null&&Kc(t),e.blockedOn=n,!1;t.shift()}return!0}function Ff(e,t,n){Mi(e)&&n.delete(t)}function D1(){zu=!1,jn!==null&&Mi(jn)&&(jn=null),_n!==null&&Mi(_n)&&(_n=null),Pn!==null&&Mi(Pn)&&(Pn=null),ls.forEach(Ff),as.forEach(Ff)}function Po(e,t){e.blockedOn===t&&(e.blockedOn=null,zu||(zu=!0,ut.unstable_scheduleCallback(ut.unstable_NormalPriority,D1)))}function us(e){function t(o){return Po(o,e)}if(0<ei.length){Po(ei[0],e);for(var n=1;n<ei.length;n++){var r=ei[n];r.blockedOn===e&&(r.blockedOn=null)}}for(jn!==null&&Po(jn,e),_n!==null&&Po(_n,e),Pn!==null&&Po(Pn,e),ls.forEach(t),as.forEach(t),n=0;n<Nn.length;n++)r=Nn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Nn.length&&(n=Nn[0],n.blockedOn===null);)Ym(n),n.blockedOn===null&&Nn.shift()}var Br=dn.ReactCurrentBatchConfig,el=!0;function $1(e,t,n,r){var o=ae,s=Br.transition;Br.transition=null;try{ae=1,Qc(e,t,n,r)}finally{ae=o,Br.transition=s}}function O1(e,t,n,r){var o=ae,s=Br.transition;Br.transition=null;try{ae=4,Qc(e,t,n,r)}finally{ae=o,Br.transition=s}}function Qc(e,t,n,r){if(el){var o=Du(e,t,n,r);if(o===null)Fa(e,t,r,tl,n),Of(e,r);else if(z1(o,e,t,n,r))r.stopPropagation();else if(Of(e,r),t&4&&-1<A1.indexOf(e)){for(;o!==null;){var s=As(o);if(s!==null&&Hm(s),s=Du(e,t,n,r),s===null&&Fa(e,t,r,tl,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else Fa(e,t,r,null,n)}}var tl=null;function Du(e,t,n,r){if(tl=null,e=Yc(r),e=Xn(e),e!==null)if(t=yr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Lm(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 tl=e,null}function Gm(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(C1()){case Gc:return 1;case $m:return 4;case Zi:case j1:return 16;case Om:return 536870912;default:return 16}default:return 16}}var bn=null,qc=null,Ri=null;function Xm(){if(Ri)return Ri;var e,t=qc,n=t.length,r,o="value"in bn?bn.value:bn.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return Ri=o.slice(e,1<r?1-r:void 0)}function Ti(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 ti(){return!0}function Bf(){return!1}function ft(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ti:Bf,this.isPropagationStopped=Bf,this}return Se(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=ti)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ti)},persist:function(){},isPersistent:ti}),t}var go={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zc=ft(go),Ls=Se({},go,{view:0,detail:0}),F1=ft(Ls),Ra,Ta,Mo,$l=Se({},Ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jc,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!==Mo&&(Mo&&e.type==="mousemove"?(Ra=e.screenX-Mo.screenX,Ta=e.screenY-Mo.screenY):Ta=Ra=0,Mo=e),Ra)},movementY:function(e){return"movementY"in e?e.movementY:Ta}}),Hf=ft($l),B1=Se({},$l,{dataTransfer:0}),H1=ft(B1),V1=Se({},Ls,{relatedTarget:0}),Ia=ft(V1),U1=Se({},go,{animationName:0,elapsedTime:0,pseudoElement:0}),W1=ft(U1),Y1=Se({},go,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),G1=ft(Y1),X1=Se({},go,{data:0}),Vf=ft(X1),K1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q1={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"},q1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=q1[e])?!!t[e]:!1}function Jc(){return Z1}var J1=Se({},Ls,{key:function(e){if(e.key){var t=K1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ti(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Q1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jc,charCode:function(e){return e.type==="keypress"?Ti(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ti(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),eS=ft(J1),tS=Se({},$l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uf=ft(tS),nS=Se({},Ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jc}),rS=ft(nS),oS=Se({},go,{propertyName:0,elapsedTime:0,pseudoElement:0}),sS=ft(oS),iS=Se({},$l,{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}),lS=ft(iS),aS=[9,13,27,32],ed=on&&"CompositionEvent"in window,Xo=null;on&&"documentMode"in document&&(Xo=document.documentMode);var uS=on&&"TextEvent"in window&&!Xo,Km=on&&(!ed||Xo&&8<Xo&&11>=Xo),Wf=" ",Yf=!1;function Qm(e,t){switch(e){case"keyup":return aS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cr=!1;function cS(e,t){switch(e){case"compositionend":return qm(t);case"keypress":return t.which!==32?null:(Yf=!0,Wf);case"textInput":return e=t.data,e===Wf&&Yf?null:e;default:return null}}function dS(e,t){if(Cr)return e==="compositionend"||!ed&&Qm(e,t)?(e=Xm(),Ri=qc=bn=null,Cr=!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 Km&&t.locale!=="ko"?null:t.data;default:return null}}var fS={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 Gf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fS[e.type]:t==="textarea"}function Zm(e,t,n,r){Pm(r),t=nl(t,"onChange"),0<t.length&&(n=new Zc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ko=null,cs=null;function hS(e){ug(e,0)}function Ol(e){var t=Pr(e);if(Nm(t))return e}function pS(e,t){if(e==="change")return t}var Jm=!1;if(on){var La;if(on){var Aa="oninput"in document;if(!Aa){var Xf=document.createElement("div");Xf.setAttribute("oninput","return;"),Aa=typeof Xf.oninput=="function"}La=Aa}else La=!1;Jm=La&&(!document.documentMode||9<document.documentMode)}function Kf(){Ko&&(Ko.detachEvent("onpropertychange",eg),cs=Ko=null)}function eg(e){if(e.propertyName==="value"&&Ol(cs)){var t=[];Zm(t,cs,e,Yc(e)),Im(hS,t)}}function mS(e,t,n){e==="focusin"?(Kf(),Ko=t,cs=n,Ko.attachEvent("onpropertychange",eg)):e==="focusout"&&Kf()}function gS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ol(cs)}function yS(e,t){if(e==="click")return Ol(t)}function xS(e,t){if(e==="input"||e==="change")return Ol(t)}function vS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rt=typeof Object.is=="function"?Object.is:vS;function ds(e,t){if(Rt(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 o=n[r];if(!vu.call(t,o)||!Rt(e[o],t[o]))return!1}return!0}function Qf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qf(e,t){var n=Qf(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=Qf(n)}}function tg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ng(){for(var e=window,t=Ki();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ki(e.document)}return t}function td(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 wS(e){var t=ng(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tg(n.ownerDocument.documentElement,n)){if(r!==null&&td(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 o=n.textContent.length,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=qf(n,s);var i=qf(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>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 SS=on&&"documentMode"in document&&11>=document.documentMode,jr=null,$u=null,Qo=null,Ou=!1;function Zf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ou||jr==null||jr!==Ki(r)||(r=jr,"selectionStart"in r&&td(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}),Qo&&ds(Qo,r)||(Qo=r,r=nl($u,"onSelect"),0<r.length&&(t=new Zc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _r={animationend:ni("Animation","AnimationEnd"),animationiteration:ni("Animation","AnimationIteration"),animationstart:ni("Animation","AnimationStart"),transitionend:ni("Transition","TransitionEnd")},za={},rg={};on&&(rg=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);function Fl(e){if(za[e])return za[e];if(!_r[e])return e;var t=_r[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in rg)return za[e]=t[n];return e}var og=Fl("animationend"),sg=Fl("animationiteration"),ig=Fl("animationstart"),lg=Fl("transitionend"),ag=new Map,Jf="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 Bn(e,t){ag.set(e,t),gr(t,[e])}for(var Da=0;Da<Jf.length;Da++){var $a=Jf[Da],NS=$a.toLowerCase(),kS=$a[0].toUpperCase()+$a.slice(1);Bn(NS,"on"+kS)}Bn(og,"onAnimationEnd");Bn(sg,"onAnimationIteration");Bn(ig,"onAnimationStart");Bn("dblclick","onDoubleClick");Bn("focusin","onFocus");Bn("focusout","onBlur");Bn(lg,"onTransitionEnd");Kr("onMouseEnter",["mouseout","mouseover"]);Kr("onMouseLeave",["mouseout","mouseover"]);Kr("onPointerEnter",["pointerout","pointerover"]);Kr("onPointerLeave",["pointerout","pointerover"]);gr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));gr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));gr("onBeforeInput",["compositionend","keypress","textInput","paste"]);gr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));gr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));gr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vo="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(" "),ES=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vo));function eh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,N1(r,t,void 0,e),e.currentTarget=null}function ug(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==s&&o.isPropagationStopped())break e;eh(o,l,u),s=a}else for(i=0;i<r.length;i++){if(l=r[i],a=l.instance,u=l.currentTarget,l=l.listener,a!==s&&o.isPropagationStopped())break e;eh(o,l,u),s=a}}}if(qi)throw e=Lu,qi=!1,Lu=null,e}function he(e,t){var n=t[Uu];n===void 0&&(n=t[Uu]=new Set);var r=e+"__bubble";n.has(r)||(cg(t,e,2,!1),n.add(r))}function Oa(e,t,n){var r=0;t&&(r|=4),cg(n,e,r,t)}var ri="_reactListening"+Math.random().toString(36).slice(2);function fs(e){if(!e[ri]){e[ri]=!0,ym.forEach(function(n){n!=="selectionchange"&&(ES.has(n)||Oa(n,!1,e),Oa(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ri]||(t[ri]=!0,Oa("selectionchange",!1,t))}}function cg(e,t,n,r){switch(Gm(t)){case 1:var o=$1;break;case 4:o=O1;break;default:o=Qc}n=o.bind(null,t,n,e),o=void 0,!Iu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Fa(e,t,n,r,o){var s=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===o||l.nodeType===8&&l.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var a=i.tag;if((a===3||a===4)&&(a=i.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;i=i.return}for(;l!==null;){if(i=Xn(l),i===null)return;if(a=i.tag,a===5||a===6){r=s=i;continue e}l=l.parentNode}}r=r.return}Im(function(){var u=s,h=Yc(n),f=[];e:{var d=ag.get(e);if(d!==void 0){var x=Zc,y=e;switch(e){case"keypress":if(Ti(n)===0)break e;case"keydown":case"keyup":x=eS;break;case"focusin":y="focus",x=Ia;break;case"focusout":y="blur",x=Ia;break;case"beforeblur":case"afterblur":x=Ia;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":x=Hf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=H1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=rS;break;case og:case sg:case ig:x=W1;break;case lg:x=sS;break;case"scroll":x=F1;break;case"wheel":x=lS;break;case"copy":case"cut":case"paste":x=G1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=Uf}var w=(t&4)!==0,N=!w&&e==="scroll",p=w?d!==null?d+"Capture":null:d;w=[];for(var v=u,m;v!==null;){m=v;var S=m.stateNode;if(m.tag===5&&S!==null&&(m=S,p!==null&&(S=is(v,p),S!=null&&w.push(hs(v,S,m)))),N)break;v=v.return}0<w.length&&(d=new x(d,y,null,n,h),f.push({event:d,listeners:w}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",x=e==="mouseout"||e==="pointerout",d&&n!==Ru&&(y=n.relatedTarget||n.fromElement)&&(Xn(y)||y[sn]))break e;if((x||d)&&(d=h.window===h?h:(d=h.ownerDocument)?d.defaultView||d.parentWindow:window,x?(y=n.relatedTarget||n.toElement,x=u,y=y?Xn(y):null,y!==null&&(N=yr(y),y!==N||y.tag!==5&&y.tag!==6)&&(y=null)):(x=null,y=u),x!==y)){if(w=Hf,S="onMouseLeave",p="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(w=Uf,S="onPointerLeave",p="onPointerEnter",v="pointer"),N=x==null?d:Pr(x),m=y==null?d:Pr(y),d=new w(S,v+"leave",x,n,h),d.target=N,d.relatedTarget=m,S=null,Xn(h)===u&&(w=new w(p,v+"enter",y,n,h),w.target=m,w.relatedTarget=N,S=w),N=S,x&&y)t:{for(w=x,p=y,v=0,m=w;m;m=vr(m))v++;for(m=0,S=p;S;S=vr(S))m++;for(;0<v-m;)w=vr(w),v--;for(;0<m-v;)p=vr(p),m--;for(;v--;){if(w===p||p!==null&&w===p.alternate)break t;w=vr(w),p=vr(p)}w=null}else w=null;x!==null&&th(f,d,x,w,!1),y!==null&&N!==null&&th(f,N,y,w,!0)}}e:{if(d=u?Pr(u):window,x=d.nodeName&&d.nodeName.toLowerCase(),x==="select"||x==="input"&&d.type==="file")var k=pS;else if(Gf(d))if(Jm)k=xS;else{k=gS;var E=mS}else(x=d.nodeName)&&x.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(k=yS);if(k&&(k=k(e,u))){Zm(f,k,n,h);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&Cu(d,"number",d.value)}switch(E=u?Pr(u):window,e){case"focusin":(Gf(E)||E.contentEditable==="true")&&(jr=E,$u=u,Qo=null);break;case"focusout":Qo=$u=jr=null;break;case"mousedown":Ou=!0;break;case"contextmenu":case"mouseup":case"dragend":Ou=!1,Zf(f,n,h);break;case"selectionchange":if(SS)break;case"keydown":case"keyup":Zf(f,n,h)}var b;if(ed)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else Cr?Qm(e,n)&&(_="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_="onCompositionStart");_&&(Km&&n.locale!=="ko"&&(Cr||_!=="onCompositionStart"?_==="onCompositionEnd"&&Cr&&(b=Xm()):(bn=h,qc="value"in bn?bn.value:bn.textContent,Cr=!0)),E=nl(u,_),0<E.length&&(_=new Vf(_,e,null,n,h),f.push({event:_,listeners:E}),b?_.data=b:(b=qm(n),b!==null&&(_.data=b)))),(b=uS?cS(e,n):dS(e,n))&&(u=nl(u,"onBeforeInput"),0<u.length&&(h=new Vf("onBeforeInput","beforeinput",null,n,h),f.push({event:h,listeners:u}),h.data=b))}ug(f,t)})}function hs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function nl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=is(e,n),s!=null&&r.unshift(hs(e,s,o)),s=is(e,t),s!=null&&r.push(hs(e,s,o))),e=e.return}return r}function vr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function th(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,o?(a=is(n,s),a!=null&&i.unshift(hs(n,a,l))):o||(a=is(n,s),a!=null&&i.push(hs(n,a,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var bS=/\r\n?/g,CS=/\u0000|\uFFFD/g;function nh(e){return(typeof e=="string"?e:""+e).replace(bS,`
|
|
38
|
+
`).replace(CS,"")}function oi(e,t,n){if(t=nh(t),nh(e)!==t&&n)throw Error(B(425))}function rl(){}var Fu=null,Bu=null;function Hu(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 Vu=typeof setTimeout=="function"?setTimeout:void 0,jS=typeof clearTimeout=="function"?clearTimeout:void 0,rh=typeof Promise=="function"?Promise:void 0,_S=typeof queueMicrotask=="function"?queueMicrotask:typeof rh<"u"?function(e){return rh.resolve(null).then(e).catch(PS)}:Vu;function PS(e){setTimeout(function(){throw e})}function Ba(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),us(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);us(t)}function Mn(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 oh(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 yo=Math.random().toString(36).slice(2),Ot="__reactFiber$"+yo,ps="__reactProps$"+yo,sn="__reactContainer$"+yo,Uu="__reactEvents$"+yo,MS="__reactListeners$"+yo,RS="__reactHandles$"+yo;function Xn(e){var t=e[Ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[sn]||n[Ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=oh(e);e!==null;){if(n=e[Ot])return n;e=oh(e)}return t}e=n,n=e.parentNode}return null}function As(e){return e=e[Ot]||e[sn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Pr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function Bl(e){return e[ps]||null}var Wu=[],Mr=-1;function Hn(e){return{current:e}}function pe(e){0>Mr||(e.current=Wu[Mr],Wu[Mr]=null,Mr--)}function ce(e,t){Mr++,Wu[Mr]=e.current,e.current=t}var Dn={},Ue=Hn(Dn),nt=Hn(!1),sr=Dn;function Qr(e,t){var n=e.type.contextTypes;if(!n)return Dn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function rt(e){return e=e.childContextTypes,e!=null}function ol(){pe(nt),pe(Ue)}function sh(e,t,n){if(Ue.current!==Dn)throw Error(B(168));ce(Ue,t),ce(nt,n)}function dg(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(B(108,m1(e)||"Unknown",o));return Se({},n,r)}function sl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dn,sr=Ue.current,ce(Ue,e),ce(nt,nt.current),!0}function ih(e,t,n){var r=e.stateNode;if(!r)throw Error(B(169));n?(e=dg(e,t,sr),r.__reactInternalMemoizedMergedChildContext=e,pe(nt),pe(Ue),ce(Ue,e)):pe(nt),ce(nt,n)}var Zt=null,Hl=!1,Ha=!1;function fg(e){Zt===null?Zt=[e]:Zt.push(e)}function TS(e){Hl=!0,fg(e)}function Vn(){if(!Ha&&Zt!==null){Ha=!0;var e=0,t=ae;try{var n=Zt;for(ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Zt=null,Hl=!1}catch(o){throw Zt!==null&&(Zt=Zt.slice(e+1)),Dm(Gc,Vn),o}finally{ae=t,Ha=!1}}return null}var Rr=[],Tr=0,il=null,ll=0,ht=[],pt=0,ir=null,Jt=1,en="";function Wn(e,t){Rr[Tr++]=ll,Rr[Tr++]=il,il=e,ll=t}function hg(e,t,n){ht[pt++]=Jt,ht[pt++]=en,ht[pt++]=ir,ir=e;var r=Jt;e=en;var o=32-Pt(r)-1;r&=~(1<<o),n+=1;var s=32-Pt(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Jt=1<<32-Pt(t)+o|n<<o|r,en=s+e}else Jt=1<<s|n<<o|r,en=e}function nd(e){e.return!==null&&(Wn(e,1),hg(e,1,0))}function rd(e){for(;e===il;)il=Rr[--Tr],Rr[Tr]=null,ll=Rr[--Tr],Rr[Tr]=null;for(;e===ir;)ir=ht[--pt],ht[pt]=null,en=ht[--pt],ht[pt]=null,Jt=ht[--pt],ht[pt]=null}var at=null,lt=null,me=!1,bt=null;function pg(e,t){var n=mt(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 lh(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,at=e,lt=Mn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,at=e,lt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ir!==null?{id:Jt,overflow:en}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=mt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,at=e,lt=null,!0):!1;default:return!1}}function Yu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Gu(e){if(me){var t=lt;if(t){var n=t;if(!lh(e,t)){if(Yu(e))throw Error(B(418));t=Mn(n.nextSibling);var r=at;t&&lh(e,t)?pg(r,n):(e.flags=e.flags&-4097|2,me=!1,at=e)}}else{if(Yu(e))throw Error(B(418));e.flags=e.flags&-4097|2,me=!1,at=e}}}function ah(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;at=e}function si(e){if(e!==at)return!1;if(!me)return ah(e),me=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Hu(e.type,e.memoizedProps)),t&&(t=lt)){if(Yu(e))throw mg(),Error(B(418));for(;t;)pg(e,t),t=Mn(t.nextSibling)}if(ah(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){lt=Mn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}lt=null}}else lt=at?Mn(e.stateNode.nextSibling):null;return!0}function mg(){for(var e=lt;e;)e=Mn(e.nextSibling)}function qr(){lt=at=null,me=!1}function od(e){bt===null?bt=[e]:bt.push(e)}var IS=dn.ReactCurrentBatchConfig;function Ro(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(B(309));var r=n.stateNode}if(!r)throw Error(B(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var l=o.refs;i===null?delete l[s]:l[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(B(284));if(!n._owner)throw Error(B(290,e))}return e}function ii(e,t){throw e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function uh(e){var t=e._init;return t(e._payload)}function gg(e){function t(p,v){if(e){var m=p.deletions;m===null?(p.deletions=[v],p.flags|=16):m.push(v)}}function n(p,v){if(!e)return null;for(;v!==null;)t(p,v),v=v.sibling;return null}function r(p,v){for(p=new Map;v!==null;)v.key!==null?p.set(v.key,v):p.set(v.index,v),v=v.sibling;return p}function o(p,v){return p=Ln(p,v),p.index=0,p.sibling=null,p}function s(p,v,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<v?(p.flags|=2,v):m):(p.flags|=2,v)):(p.flags|=1048576,v)}function i(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,v,m,S){return v===null||v.tag!==6?(v=Ka(m,p.mode,S),v.return=p,v):(v=o(v,m),v.return=p,v)}function a(p,v,m,S){var k=m.type;return k===br?h(p,v,m.props.children,S,m.key):v!==null&&(v.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===wn&&uh(k)===v.type)?(S=o(v,m.props),S.ref=Ro(p,v,m),S.return=p,S):(S=Oi(m.type,m.key,m.props,null,p.mode,S),S.ref=Ro(p,v,m),S.return=p,S)}function u(p,v,m,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==m.containerInfo||v.stateNode.implementation!==m.implementation?(v=Qa(m,p.mode,S),v.return=p,v):(v=o(v,m.children||[]),v.return=p,v)}function h(p,v,m,S,k){return v===null||v.tag!==7?(v=er(m,p.mode,S,k),v.return=p,v):(v=o(v,m),v.return=p,v)}function f(p,v,m){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Ka(""+v,p.mode,m),v.return=p,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ks:return m=Oi(v.type,v.key,v.props,null,p.mode,m),m.ref=Ro(p,null,v),m.return=p,m;case Er:return v=Qa(v,p.mode,m),v.return=p,v;case wn:var S=v._init;return f(p,S(v._payload),m)}if(Bo(v)||Co(v))return v=er(v,p.mode,m,null),v.return=p,v;ii(p,v)}return null}function d(p,v,m,S){var k=v!==null?v.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return k!==null?null:l(p,v,""+m,S);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ks:return m.key===k?a(p,v,m,S):null;case Er:return m.key===k?u(p,v,m,S):null;case wn:return k=m._init,d(p,v,k(m._payload),S)}if(Bo(m)||Co(m))return k!==null?null:h(p,v,m,S,null);ii(p,m)}return null}function x(p,v,m,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return p=p.get(m)||null,l(v,p,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ks:return p=p.get(S.key===null?m:S.key)||null,a(v,p,S,k);case Er:return p=p.get(S.key===null?m:S.key)||null,u(v,p,S,k);case wn:var E=S._init;return x(p,v,m,E(S._payload),k)}if(Bo(S)||Co(S))return p=p.get(m)||null,h(v,p,S,k,null);ii(v,S)}return null}function y(p,v,m,S){for(var k=null,E=null,b=v,_=v=0,R=null;b!==null&&_<m.length;_++){b.index>_?(R=b,b=null):R=b.sibling;var D=d(p,b,m[_],S);if(D===null){b===null&&(b=R);break}e&&b&&D.alternate===null&&t(p,b),v=s(D,v,_),E===null?k=D:E.sibling=D,E=D,b=R}if(_===m.length)return n(p,b),me&&Wn(p,_),k;if(b===null){for(;_<m.length;_++)b=f(p,m[_],S),b!==null&&(v=s(b,v,_),E===null?k=b:E.sibling=b,E=b);return me&&Wn(p,_),k}for(b=r(p,b);_<m.length;_++)R=x(b,p,_,m[_],S),R!==null&&(e&&R.alternate!==null&&b.delete(R.key===null?_:R.key),v=s(R,v,_),E===null?k=R:E.sibling=R,E=R);return e&&b.forEach(function(I){return t(p,I)}),me&&Wn(p,_),k}function w(p,v,m,S){var k=Co(m);if(typeof k!="function")throw Error(B(150));if(m=k.call(m),m==null)throw Error(B(151));for(var E=k=null,b=v,_=v=0,R=null,D=m.next();b!==null&&!D.done;_++,D=m.next()){b.index>_?(R=b,b=null):R=b.sibling;var I=d(p,b,D.value,S);if(I===null){b===null&&(b=R);break}e&&b&&I.alternate===null&&t(p,b),v=s(I,v,_),E===null?k=I:E.sibling=I,E=I,b=R}if(D.done)return n(p,b),me&&Wn(p,_),k;if(b===null){for(;!D.done;_++,D=m.next())D=f(p,D.value,S),D!==null&&(v=s(D,v,_),E===null?k=D:E.sibling=D,E=D);return me&&Wn(p,_),k}for(b=r(p,b);!D.done;_++,D=m.next())D=x(b,p,_,D.value,S),D!==null&&(e&&D.alternate!==null&&b.delete(D.key===null?_:D.key),v=s(D,v,_),E===null?k=D:E.sibling=D,E=D);return e&&b.forEach(function(T){return t(p,T)}),me&&Wn(p,_),k}function N(p,v,m,S){if(typeof m=="object"&&m!==null&&m.type===br&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Ks:e:{for(var k=m.key,E=v;E!==null;){if(E.key===k){if(k=m.type,k===br){if(E.tag===7){n(p,E.sibling),v=o(E,m.props.children),v.return=p,p=v;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===wn&&uh(k)===E.type){n(p,E.sibling),v=o(E,m.props),v.ref=Ro(p,E,m),v.return=p,p=v;break e}n(p,E);break}else t(p,E);E=E.sibling}m.type===br?(v=er(m.props.children,p.mode,S,m.key),v.return=p,p=v):(S=Oi(m.type,m.key,m.props,null,p.mode,S),S.ref=Ro(p,v,m),S.return=p,p=S)}return i(p);case Er:e:{for(E=m.key;v!==null;){if(v.key===E)if(v.tag===4&&v.stateNode.containerInfo===m.containerInfo&&v.stateNode.implementation===m.implementation){n(p,v.sibling),v=o(v,m.children||[]),v.return=p,p=v;break e}else{n(p,v);break}else t(p,v);v=v.sibling}v=Qa(m,p.mode,S),v.return=p,p=v}return i(p);case wn:return E=m._init,N(p,v,E(m._payload),S)}if(Bo(m))return y(p,v,m,S);if(Co(m))return w(p,v,m,S);ii(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,v!==null&&v.tag===6?(n(p,v.sibling),v=o(v,m),v.return=p,p=v):(n(p,v),v=Ka(m,p.mode,S),v.return=p,p=v),i(p)):n(p,v)}return N}var Zr=gg(!0),yg=gg(!1),al=Hn(null),ul=null,Ir=null,sd=null;function id(){sd=Ir=ul=null}function ld(e){var t=al.current;pe(al),e._currentValue=t}function Xu(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 Hr(e,t){ul=e,sd=Ir=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ze=!0),e.firstContext=null)}function yt(e){var t=e._currentValue;if(sd!==e)if(e={context:e,memoizedValue:t,next:null},Ir===null){if(ul===null)throw Error(B(308));Ir=e,ul.dependencies={lanes:0,firstContext:e}}else Ir=Ir.next=e;return t}var Kn=null;function ad(e){Kn===null?Kn=[e]:Kn.push(e)}function xg(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,ad(t)):(n.next=o.next,o.next=n),t.interleaved=n,ln(e,r)}function ln(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 Sn=!1;function ud(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vg(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 nn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Rn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ln(e,n)}return o=r.interleaved,o===null?(t.next=t,ad(r)):(t.next=o.next,o.next=t),r.interleaved=t,ln(e,n)}function Ii(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,Xc(e,n)}}function ch(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=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};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function cl(e,t,n,r){var o=e.updateQueue;Sn=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,i===null?s=u:i.next=u,i=a;var h=e.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==i&&(l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=a))}if(s!==null){var f=o.baseState;i=0,h=u=a=null,l=s;do{var d=l.lane,x=l.eventTime;if((r&d)===d){h!==null&&(h=h.next={eventTime:x,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,w=l;switch(d=t,x=n,w.tag){case 1:if(y=w.payload,typeof y=="function"){f=y.call(x,f,d);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=w.payload,d=typeof y=="function"?y.call(x,f,d):y,d==null)break e;f=Se({},f,d);break e;case 2:Sn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[l]:d.push(l))}else x={eventTime:x,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},h===null?(u=h=x,a=f):h=h.next=x,i|=d;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;d=l,l=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(h===null&&(a=f),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=h,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);ar|=i,e.lanes=i,e.memoizedState=f}}function dh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(B(191,o));o.call(r)}}}var zs={},Ht=Hn(zs),ms=Hn(zs),gs=Hn(zs);function Qn(e){if(e===zs)throw Error(B(174));return e}function cd(e,t){switch(ce(gs,t),ce(ms,e),ce(Ht,zs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_u(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_u(t,e)}pe(Ht),ce(Ht,t)}function Jr(){pe(Ht),pe(ms),pe(gs)}function wg(e){Qn(gs.current);var t=Qn(Ht.current),n=_u(t,e.type);t!==n&&(ce(ms,e),ce(Ht,n))}function dd(e){ms.current===e&&(pe(Ht),pe(ms))}var ve=Hn(0);function dl(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 Va=[];function fd(){for(var e=0;e<Va.length;e++)Va[e]._workInProgressVersionPrimary=null;Va.length=0}var Li=dn.ReactCurrentDispatcher,Ua=dn.ReactCurrentBatchConfig,lr=0,we=null,_e=null,Te=null,fl=!1,qo=!1,ys=0,LS=0;function Oe(){throw Error(B(321))}function hd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rt(e[n],t[n]))return!1;return!0}function pd(e,t,n,r,o,s){if(lr=s,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Li.current=e===null||e.memoizedState===null?$S:OS,e=n(r,o),qo){s=0;do{if(qo=!1,ys=0,25<=s)throw Error(B(301));s+=1,Te=_e=null,t.updateQueue=null,Li.current=FS,e=n(r,o)}while(qo)}if(Li.current=hl,t=_e!==null&&_e.next!==null,lr=0,Te=_e=we=null,fl=!1,t)throw Error(B(300));return e}function md(){var e=ys!==0;return ys=0,e}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Te===null?we.memoizedState=Te=e:Te=Te.next=e,Te}function xt(){if(_e===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Te===null?we.memoizedState:Te.next;if(t!==null)Te=t,_e=e;else{if(e===null)throw Error(B(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Te===null?we.memoizedState=Te=e:Te=Te.next=e}return Te}function xs(e,t){return typeof t=="function"?t(e):t}function Wa(e){var t=xt(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=_e,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var l=i=null,a=null,u=s;do{var h=u.lane;if((lr&h)===h)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=f,i=r):a=a.next=f,we.lanes|=h,ar|=h}u=u.next}while(u!==null&&u!==s);a===null?i=r:a.next=l,Rt(r,t.memoizedState)||(Ze=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,we.lanes|=s,ar|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ya(e){var t=xt(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Rt(s,t.memoizedState)||(Ze=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Sg(){}function Ng(e,t){var n=we,r=xt(),o=t(),s=!Rt(r.memoizedState,o);if(s&&(r.memoizedState=o,Ze=!0),r=r.queue,gd(bg.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Te!==null&&Te.memoizedState.tag&1){if(n.flags|=2048,vs(9,Eg.bind(null,n,r,o,t),void 0,null),Ie===null)throw Error(B(349));lr&30||kg(n,t,o)}return o}function kg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Eg(e,t,n,r){t.value=n,t.getSnapshot=r,Cg(t)&&jg(e)}function bg(e,t,n){return n(function(){Cg(t)&&jg(e)})}function Cg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rt(e,n)}catch{return!0}}function jg(e){var t=ln(e,1);t!==null&&Mt(t,e,1,-1)}function fh(e){var t=zt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xs,lastRenderedState:e},t.queue=e,e=e.dispatch=DS.bind(null,we,e),[t.memoizedState,e]}function vs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.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 _g(){return xt().memoizedState}function Ai(e,t,n,r){var o=zt();we.flags|=e,o.memoizedState=vs(1|t,n,void 0,r===void 0?null:r)}function Vl(e,t,n,r){var o=xt();r=r===void 0?null:r;var s=void 0;if(_e!==null){var i=_e.memoizedState;if(s=i.destroy,r!==null&&hd(r,i.deps)){o.memoizedState=vs(t,n,s,r);return}}we.flags|=e,o.memoizedState=vs(1|t,n,s,r)}function hh(e,t){return Ai(8390656,8,e,t)}function gd(e,t){return Vl(2048,8,e,t)}function Pg(e,t){return Vl(4,2,e,t)}function Mg(e,t){return Vl(4,4,e,t)}function Rg(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 Tg(e,t,n){return n=n!=null?n.concat([e]):null,Vl(4,4,Rg.bind(null,t,e),n)}function yd(){}function Ig(e,t){var n=xt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Lg(e,t){var n=xt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ag(e,t,n){return lr&21?(Rt(n,t)||(n=Fm(),we.lanes|=n,ar|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ze=!0),e.memoizedState=n)}function AS(e,t){var n=ae;ae=n!==0&&4>n?n:4,e(!0);var r=Ua.transition;Ua.transition={};try{e(!1),t()}finally{ae=n,Ua.transition=r}}function zg(){return xt().memoizedState}function zS(e,t,n){var r=In(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Dg(e))$g(t,n);else if(n=xg(e,t,n,r),n!==null){var o=Ye();Mt(n,e,r,o),Og(n,t,r)}}function DS(e,t,n){var r=In(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Dg(e))$g(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,l=s(i,n);if(o.hasEagerState=!0,o.eagerState=l,Rt(l,i)){var a=t.interleaved;a===null?(o.next=o,ad(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=xg(e,t,o,r),n!==null&&(o=Ye(),Mt(n,e,r,o),Og(n,t,r))}}function Dg(e){var t=e.alternate;return e===we||t!==null&&t===we}function $g(e,t){qo=fl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Og(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Xc(e,n)}}var hl={readContext:yt,useCallback:Oe,useContext:Oe,useEffect:Oe,useImperativeHandle:Oe,useInsertionEffect:Oe,useLayoutEffect:Oe,useMemo:Oe,useReducer:Oe,useRef:Oe,useState:Oe,useDebugValue:Oe,useDeferredValue:Oe,useTransition:Oe,useMutableSource:Oe,useSyncExternalStore:Oe,useId:Oe,unstable_isNewReconciler:!1},$S={readContext:yt,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:hh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ai(4194308,4,Rg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ai(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ai(4,2,e,t)},useMemo:function(e,t){var n=zt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zt();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=zS.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:fh,useDebugValue:yd,useDeferredValue:function(e){return zt().memoizedState=e},useTransition:function(){var e=fh(!1),t=e[0];return e=AS.bind(null,e[1]),zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=we,o=zt();if(me){if(n===void 0)throw Error(B(407));n=n()}else{if(n=t(),Ie===null)throw Error(B(349));lr&30||kg(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,hh(bg.bind(null,r,s,e),[e]),r.flags|=2048,vs(9,Eg.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=zt(),t=Ie.identifierPrefix;if(me){var n=en,r=Jt;n=(r&~(1<<32-Pt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ys++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=LS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},OS={readContext:yt,useCallback:Ig,useContext:yt,useEffect:gd,useImperativeHandle:Tg,useInsertionEffect:Pg,useLayoutEffect:Mg,useMemo:Lg,useReducer:Wa,useRef:_g,useState:function(){return Wa(xs)},useDebugValue:yd,useDeferredValue:function(e){var t=xt();return Ag(t,_e.memoizedState,e)},useTransition:function(){var e=Wa(xs)[0],t=xt().memoizedState;return[e,t]},useMutableSource:Sg,useSyncExternalStore:Ng,useId:zg,unstable_isNewReconciler:!1},FS={readContext:yt,useCallback:Ig,useContext:yt,useEffect:gd,useImperativeHandle:Tg,useInsertionEffect:Pg,useLayoutEffect:Mg,useMemo:Lg,useReducer:Ya,useRef:_g,useState:function(){return Ya(xs)},useDebugValue:yd,useDeferredValue:function(e){var t=xt();return _e===null?t.memoizedState=e:Ag(t,_e.memoizedState,e)},useTransition:function(){var e=Ya(xs)[0],t=xt().memoizedState;return[e,t]},useMutableSource:Sg,useSyncExternalStore:Ng,useId:zg,unstable_isNewReconciler:!1};function Nt(e,t){if(e&&e.defaultProps){t=Se({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ku(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Se({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ul={isMounted:function(e){return(e=e._reactInternals)?yr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ye(),o=In(e),s=nn(r,o);s.payload=t,n!=null&&(s.callback=n),t=Rn(e,s,o),t!==null&&(Mt(t,e,o,r),Ii(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ye(),o=In(e),s=nn(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Rn(e,s,o),t!==null&&(Mt(t,e,o,r),Ii(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ye(),r=In(e),o=nn(n,r);o.tag=2,t!=null&&(o.callback=t),t=Rn(e,o,r),t!==null&&(Mt(t,e,r,n),Ii(t,e,r))}};function ph(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!ds(n,r)||!ds(o,s):!0}function Fg(e,t,n){var r=!1,o=Dn,s=t.contextType;return typeof s=="object"&&s!==null?s=yt(s):(o=rt(t)?sr:Ue.current,r=t.contextTypes,s=(r=r!=null)?Qr(e,o):Dn),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ul,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function mh(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&&Ul.enqueueReplaceState(t,t.state,null)}function Qu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},ud(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=yt(s):(s=rt(t)?sr:Ue.current,o.context=Qr(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Ku(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Ul.enqueueReplaceState(o,o.state,null),cl(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function eo(e,t){try{var n="",r=t;do n+=p1(r),r=r.return;while(r);var o=n}catch(s){o=`
|
|
39
|
+
Error generating stack: `+s.message+`
|
|
40
|
+
`+s.stack}return{value:e,source:t,stack:o,digest:null}}function Ga(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function qu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var BS=typeof WeakMap=="function"?WeakMap:Map;function Bg(e,t,n){n=nn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ml||(ml=!0,lc=r),qu(e,t)},n}function Hg(e,t,n){n=nn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){qu(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){qu(e,t),typeof r!="function"&&(Tn===null?Tn=new Set([this]):Tn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function gh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new BS;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=t2.bind(null,e,t,n),t.then(e,e))}function yh(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 xh(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,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=nn(-1,1),t.tag=2,Rn(n,t,1))),n.lanes|=1),e)}var HS=dn.ReactCurrentOwner,Ze=!1;function We(e,t,n,r){t.child=e===null?yg(t,null,n,r):Zr(t,e.child,n,r)}function vh(e,t,n,r,o){n=n.render;var s=t.ref;return Hr(t,o),r=pd(e,t,n,r,s,o),n=md(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,an(e,t,o)):(me&&n&&nd(t),t.flags|=1,We(e,t,r,o),t.child)}function wh(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!bd(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Vg(e,t,s,r,o)):(e=Oi(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:ds,n(i,r)&&e.ref===t.ref)return an(e,t,o)}return t.flags|=1,e=Ln(s,r),e.ref=t.ref,e.return=t,t.child=e}function Vg(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(ds(s,r)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(Ze=!0);else return t.lanes=e.lanes,an(e,t,o)}return Zu(e,t,n,r,o)}function Ug(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ce(Ar,st),st|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ce(Ar,st),st|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ce(Ar,st),st|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ce(Ar,st),st|=r;return We(e,t,o,n),t.child}function Wg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Zu(e,t,n,r,o){var s=rt(n)?sr:Ue.current;return s=Qr(t,s),Hr(t,o),n=pd(e,t,n,r,s,o),r=md(),e!==null&&!Ze?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,an(e,t,o)):(me&&r&&nd(t),t.flags|=1,We(e,t,n,o),t.child)}function Sh(e,t,n,r,o){if(rt(n)){var s=!0;sl(t)}else s=!1;if(Hr(t,o),t.stateNode===null)zi(e,t),Fg(t,n,r),Qu(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var a=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=yt(u):(u=rt(n)?sr:Ue.current,u=Qr(t,u));var h=n.getDerivedStateFromProps,f=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||a!==u)&&mh(t,i,r,u),Sn=!1;var d=t.memoizedState;i.state=d,cl(t,r,i,o),a=t.memoizedState,l!==r||d!==a||nt.current||Sn?(typeof h=="function"&&(Ku(t,n,h,r),a=t.memoizedState),(l=Sn||ph(t,n,l,r,d,a,u))?(f||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=a),i.props=r,i.state=a,i.context=u,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,vg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Nt(t.type,l),i.props=u,f=t.pendingProps,d=i.context,a=n.contextType,typeof a=="object"&&a!==null?a=yt(a):(a=rt(n)?sr:Ue.current,a=Qr(t,a));var x=n.getDerivedStateFromProps;(h=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||d!==a)&&mh(t,i,r,a),Sn=!1,d=t.memoizedState,i.state=d,cl(t,r,i,o);var y=t.memoizedState;l!==f||d!==y||nt.current||Sn?(typeof x=="function"&&(Ku(t,n,x,r),y=t.memoizedState),(u=Sn||ph(t,n,u,r,d,y,a)||!1)?(h||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,y,a),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,y,a)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),i.props=r,i.state=y,i.context=a,r=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Ju(e,t,n,r,s,o)}function Ju(e,t,n,r,o,s){Wg(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&ih(t,n,!1),an(e,t,s);r=t.stateNode,HS.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Zr(t,e.child,null,s),t.child=Zr(t,null,l,s)):We(e,t,l,s),t.memoizedState=r.state,o&&ih(t,n,!0),t.child}function Yg(e){var t=e.stateNode;t.pendingContext?sh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sh(e,t.context,!1),cd(e,t.containerInfo)}function Nh(e,t,n,r,o){return qr(),od(o),t.flags|=256,We(e,t,n,r),t.child}var ec={dehydrated:null,treeContext:null,retryLane:0};function tc(e){return{baseLanes:e,cachePool:null,transitions:null}}function Gg(e,t,n){var r=t.pendingProps,o=ve.current,s=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ce(ve,o&1),e===null)return Gu(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,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Gl(i,r,0,null),e=er(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=tc(n),t.memoizedState=ec,e):xd(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return VS(e,t,i,r,l,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,l=o.sibling;var a={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Ln(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?s=Ln(l,s):(s=er(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?tc(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=ec,r}return s=e.child,e=s.sibling,r=Ln(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function xd(e,t){return t=Gl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function li(e,t,n,r){return r!==null&&od(r),Zr(t,e.child,null,n),e=xd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function VS(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=Ga(Error(B(422))),li(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Gl({mode:"visible",children:r.children},o,0,null),s=er(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Zr(t,e.child,null,i),t.child.memoizedState=tc(i),t.memoizedState=ec,s);if(!(t.mode&1))return li(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(B(419)),r=Ga(s,r,void 0),li(e,t,i,r)}if(l=(i&e.childLanes)!==0,Ze||l){if(r=Ie,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,ln(e,o),Mt(r,e,o,-1))}return Ed(),r=Ga(Error(B(421))),li(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=n2.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,lt=Mn(o.nextSibling),at=t,me=!0,bt=null,e!==null&&(ht[pt++]=Jt,ht[pt++]=en,ht[pt++]=ir,Jt=e.id,en=e.overflow,ir=t),t=xd(t,r.children),t.flags|=4096,t)}function kh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xu(e.return,t,n)}function Xa(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function Xg(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(We(e,t,r.children,n),r=ve.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&&kh(e,n,t);else if(e.tag===19)kh(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(ce(ve,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&dl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Xa(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&dl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Xa(t,!0,n,null,s);break;case"together":Xa(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function zi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function an(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ar|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,n=Ln(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ln(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function US(e,t,n){switch(t.tag){case 3:Yg(t),qr();break;case 5:wg(t);break;case 1:rt(t.type)&&sl(t);break;case 4:cd(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ce(al,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ce(ve,ve.current&1),t.flags|=128,null):n&t.child.childLanes?Gg(e,t,n):(ce(ve,ve.current&1),e=an(e,t,n),e!==null?e.sibling:null);ce(ve,ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Xg(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ce(ve,ve.current),r)break;return null;case 22:case 23:return t.lanes=0,Ug(e,t,n)}return an(e,t,n)}var Kg,nc,Qg,qg;Kg=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}};nc=function(){};Qg=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Qn(Ht.current);var s=null;switch(n){case"input":o=Eu(e,o),r=Eu(e,r),s=[];break;case"select":o=Se({},o,{value:void 0}),r=Se({},r,{value:void 0}),s=[];break;case"textarea":o=ju(e,o),r=ju(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=rl)}Pu(n,r);var i;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(os.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var a=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||a&&a.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in a)a.hasOwnProperty(i)&&l[i]!==a[i]&&(n||(n={}),n[i]=a[i])}else n||(s||(s=[]),s.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(s=s||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(os.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&he("scroll",e),s||l===a||(s=[])):(s=s||[]).push(u,a))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};qg=function(e,t,n,r){n!==r&&(t.flags|=4)};function To(e,t){if(!me)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 Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function WS(e,t,n){var r=t.pendingProps;switch(rd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return rt(t.type)&&ol(),Fe(t),null;case 3:return r=t.stateNode,Jr(),pe(nt),pe(Ue),fd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(si(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,bt!==null&&(cc(bt),bt=null))),nc(e,t),Fe(t),null;case 5:dd(t);var o=Qn(gs.current);if(n=t.type,e!==null&&t.stateNode!=null)Qg(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(B(166));return Fe(t),null}if(e=Qn(Ht.current),si(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Ot]=t,r[ps]=s,e=(t.mode&1)!==0,n){case"dialog":he("cancel",r),he("close",r);break;case"iframe":case"object":case"embed":he("load",r);break;case"video":case"audio":for(o=0;o<Vo.length;o++)he(Vo[o],r);break;case"source":he("error",r);break;case"img":case"image":case"link":he("error",r),he("load",r);break;case"details":he("toggle",r);break;case"input":Tf(r,s),he("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},he("invalid",r);break;case"textarea":Lf(r,s),he("invalid",r)}Pu(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&oi(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&oi(r.textContent,l,e),o=["children",""+l]):os.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&he("scroll",r)}switch(n){case"input":Qs(r),If(r,s,!0);break;case"textarea":Qs(r),Af(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=rl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=bm(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[Ot]=t,e[ps]=r,Kg(e,t,!1,!1),t.stateNode=e;e:{switch(i=Mu(n,r),n){case"dialog":he("cancel",e),he("close",e),o=r;break;case"iframe":case"object":case"embed":he("load",e),o=r;break;case"video":case"audio":for(o=0;o<Vo.length;o++)he(Vo[o],e);o=r;break;case"source":he("error",e),o=r;break;case"img":case"image":case"link":he("error",e),he("load",e),o=r;break;case"details":he("toggle",e),o=r;break;case"input":Tf(e,r),o=Eu(e,r),he("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Se({},r,{value:void 0}),he("invalid",e);break;case"textarea":Lf(e,r),o=ju(e,r),he("invalid",e);break;default:o=r}Pu(n,o),l=o;for(s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="style"?_m(e,a):s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Cm(e,a)):s==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&ss(e,a):typeof a=="number"&&ss(e,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(os.hasOwnProperty(s)?a!=null&&s==="onScroll"&&he("scroll",e):a!=null&&Hc(e,s,a,i))}switch(n){case"input":Qs(e),If(e,r,!1);break;case"textarea":Qs(e),Af(e);break;case"option":r.value!=null&&e.setAttribute("value",""+zn(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?$r(e,!!r.multiple,s,!1):r.defaultValue!=null&&$r(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=rl)}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 Fe(t),null;case 6:if(e&&t.stateNode!=null)qg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(B(166));if(n=Qn(gs.current),Qn(Ht.current),si(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ot]=t,(s=r.nodeValue!==n)&&(e=at,e!==null))switch(e.tag){case 3:oi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&oi(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ot]=t,t.stateNode=r}return Fe(t),null;case 13:if(pe(ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(me&<!==null&&t.mode&1&&!(t.flags&128))mg(),qr(),t.flags|=98560,s=!1;else if(s=si(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(B(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(B(317));s[Ot]=t}else qr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fe(t),s=!1}else bt!==null&&(cc(bt),bt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ve.current&1?Pe===0&&(Pe=3):Ed())),t.updateQueue!==null&&(t.flags|=4),Fe(t),null);case 4:return Jr(),nc(e,t),e===null&&fs(t.stateNode.containerInfo),Fe(t),null;case 10:return ld(t.type._context),Fe(t),null;case 17:return rt(t.type)&&ol(),Fe(t),null;case 19:if(pe(ve),s=t.memoizedState,s===null)return Fe(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)To(s,!1);else{if(Pe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=dl(e),i!==null){for(t.flags|=128,To(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ce(ve,ve.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ee()>to&&(t.flags|=128,r=!0,To(s,!1),t.lanes=4194304)}else{if(!r)if(e=dl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),To(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!me)return Fe(t),null}else 2*Ee()-s.renderingStartTime>to&&n!==1073741824&&(t.flags|=128,r=!0,To(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ee(),t.sibling=null,n=ve.current,ce(ve,r?n&1|2:n&1),t):(Fe(t),null);case 22:case 23:return kd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?st&1073741824&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),null;case 24:return null;case 25:return null}throw Error(B(156,t.tag))}function YS(e,t){switch(rd(t),t.tag){case 1:return rt(t.type)&&ol(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jr(),pe(nt),pe(Ue),fd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return dd(t),null;case 13:if(pe(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));qr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ve),null;case 4:return Jr(),null;case 10:return ld(t.type._context),null;case 22:case 23:return kd(),null;case 24:return null;default:return null}}var ai=!1,Be=!1,GS=typeof WeakSet=="function"?WeakSet:Set,W=null;function Lr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function rc(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Eh=!1;function XS(e,t){if(Fu=el,e=ng(),td(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 o=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,l=-1,a=-1,u=0,h=0,f=e,d=null;t:for(;;){for(var x;f!==n||o!==0&&f.nodeType!==3||(l=i+o),f!==s||r!==0&&f.nodeType!==3||(a=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(x=f.firstChild)!==null;)d=f,f=x;for(;;){if(f===e)break t;if(d===n&&++u===o&&(l=i),d===s&&++h===r&&(a=i),(x=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=x}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Bu={focusedElem:e,selectionRange:n},el=!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 y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,N=y.memoizedState,p=t.stateNode,v=p.getSnapshotBeforeUpdate(t.elementType===t.type?w:Nt(t.type,w),N);p.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(S){ke(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return y=Eh,Eh=!1,y}function Zo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&rc(t,n,s)}o=o.next}while(o!==r)}}function Wl(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 oc(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 Zg(e){var t=e.alternate;t!==null&&(e.alternate=null,Zg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ot],delete t[ps],delete t[Uu],delete t[MS],delete t[RS])),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 Jg(e){return e.tag===5||e.tag===3||e.tag===4}function bh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jg(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 sc(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=rl));else if(r!==4&&(e=e.child,e!==null))for(sc(e,t,n),e=e.sibling;e!==null;)sc(e,t,n),e=e.sibling}function ic(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(ic(e,t,n),e=e.sibling;e!==null;)ic(e,t,n),e=e.sibling}var Le=null,kt=!1;function pn(e,t,n){for(n=n.child;n!==null;)ey(e,t,n),n=n.sibling}function ey(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Dl,n)}catch{}switch(n.tag){case 5:Be||Lr(n,t);case 6:var r=Le,o=kt;Le=null,pn(e,t,n),Le=r,kt=o,Le!==null&&(kt?(e=Le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(kt?(e=Le,n=n.stateNode,e.nodeType===8?Ba(e.parentNode,n):e.nodeType===1&&Ba(e,n),us(e)):Ba(Le,n.stateNode));break;case 4:r=Le,o=kt,Le=n.stateNode.containerInfo,kt=!0,pn(e,t,n),Le=r,kt=o;break;case 0:case 11:case 14:case 15:if(!Be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&rc(n,t,i),o=o.next}while(o!==r)}pn(e,t,n);break;case 1:if(!Be&&(Lr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ke(n,t,l)}pn(e,t,n);break;case 21:pn(e,t,n);break;case 22:n.mode&1?(Be=(r=Be)||n.memoizedState!==null,pn(e,t,n),Be=r):pn(e,t,n);break;default:pn(e,t,n)}}function Ch(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new GS),t.forEach(function(r){var o=r2.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function St(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:Le=l.stateNode,kt=!1;break e;case 3:Le=l.stateNode.containerInfo,kt=!0;break e;case 4:Le=l.stateNode.containerInfo,kt=!0;break e}l=l.return}if(Le===null)throw Error(B(160));ey(s,i,o),Le=null,kt=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){ke(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ty(t,e),t=t.sibling}function ty(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(St(t,e),At(e),r&4){try{Zo(3,e,e.return),Wl(3,e)}catch(w){ke(e,e.return,w)}try{Zo(5,e,e.return)}catch(w){ke(e,e.return,w)}}break;case 1:St(t,e),At(e),r&512&&n!==null&&Lr(n,n.return);break;case 5:if(St(t,e),At(e),r&512&&n!==null&&Lr(n,n.return),e.flags&32){var o=e.stateNode;try{ss(o,"")}catch(w){ke(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&km(o,s),Mu(l,i);var u=Mu(l,s);for(i=0;i<a.length;i+=2){var h=a[i],f=a[i+1];h==="style"?_m(o,f):h==="dangerouslySetInnerHTML"?Cm(o,f):h==="children"?ss(o,f):Hc(o,h,f,u)}switch(l){case"input":bu(o,s);break;case"textarea":Em(o,s);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var x=s.value;x!=null?$r(o,!!s.multiple,x,!1):d!==!!s.multiple&&(s.defaultValue!=null?$r(o,!!s.multiple,s.defaultValue,!0):$r(o,!!s.multiple,s.multiple?[]:"",!1))}o[ps]=s}catch(w){ke(e,e.return,w)}}break;case 6:if(St(t,e),At(e),r&4){if(e.stateNode===null)throw Error(B(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(w){ke(e,e.return,w)}}break;case 3:if(St(t,e),At(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{us(t.containerInfo)}catch(w){ke(e,e.return,w)}break;case 4:St(t,e),At(e);break;case 13:St(t,e),At(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(Sd=Ee())),r&4&&Ch(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Be=(u=Be)||h,St(t,e),Be=u):St(t,e),At(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(f=W=h;W!==null;){switch(d=W,x=d.child,d.tag){case 0:case 11:case 14:case 15:Zo(4,d,d.return);break;case 1:Lr(d,d.return);var y=d.stateNode;if(typeof y.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(w){ke(r,n,w)}}break;case 5:Lr(d,d.return);break;case 22:if(d.memoizedState!==null){_h(f);continue}}x!==null?(x.return=d,W=x):_h(f)}h=h.sibling}e:for(h=null,f=e;;){if(f.tag===5){if(h===null){h=f;try{o=f.stateNode,u?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=f.stateNode,a=f.memoizedProps.style,i=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=jm("display",i))}catch(w){ke(e,e.return,w)}}}else if(f.tag===6){if(h===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(w){ke(e,e.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:St(t,e),At(e),r&4&&Ch(e);break;case 21:break;default:St(t,e),At(e)}}function At(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Jg(n)){var r=n;break e}n=n.return}throw Error(B(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(ss(o,""),r.flags&=-33);var s=bh(e);ic(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,l=bh(e);sc(e,l,i);break;default:throw Error(B(161))}}catch(a){ke(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function KS(e,t,n){W=e,ny(e)}function ny(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var o=W,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||ai;if(!i){var l=o.alternate,a=l!==null&&l.memoizedState!==null||Be;l=ai;var u=Be;if(ai=i,(Be=a)&&!u)for(W=o;W!==null;)i=W,a=i.child,i.tag===22&&i.memoizedState!==null?Ph(o):a!==null?(a.return=i,W=a):Ph(o);for(;s!==null;)W=s,ny(s),s=s.sibling;W=o,ai=l,Be=u}jh(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,W=s):jh(e)}}function jh(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:Be||Wl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Be)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Nt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&dh(t,s,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}dh(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.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 f=h.dehydrated;f!==null&&us(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}Be||t.flags&512&&oc(t)}catch(d){ke(t,t.return,d)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function _h(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 Ph(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Wl(4,t)}catch(a){ke(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){ke(t,o,a)}}var s=t.return;try{oc(t)}catch(a){ke(t,s,a)}break;case 5:var i=t.return;try{oc(t)}catch(a){ke(t,i,a)}}}catch(a){ke(t,t.return,a)}if(t===e){W=null;break}var l=t.sibling;if(l!==null){l.return=t.return,W=l;break}W=t.return}}var QS=Math.ceil,pl=dn.ReactCurrentDispatcher,vd=dn.ReactCurrentOwner,gt=dn.ReactCurrentBatchConfig,se=0,Ie=null,Ce=null,Ae=0,st=0,Ar=Hn(0),Pe=0,ws=null,ar=0,Yl=0,wd=0,Jo=null,qe=null,Sd=0,to=1/0,qt=null,ml=!1,lc=null,Tn=null,ui=!1,Cn=null,gl=0,es=0,ac=null,Di=-1,$i=0;function Ye(){return se&6?Ee():Di!==-1?Di:Di=Ee()}function In(e){return e.mode&1?se&2&&Ae!==0?Ae&-Ae:IS.transition!==null?($i===0&&($i=Fm()),$i):(e=ae,e!==0||(e=window.event,e=e===void 0?16:Gm(e.type)),e):1}function Mt(e,t,n,r){if(50<es)throw es=0,ac=null,Error(B(185));Is(e,n,r),(!(se&2)||e!==Ie)&&(e===Ie&&(!(se&2)&&(Yl|=n),Pe===4&&kn(e,Ae)),ot(e,r),n===1&&se===0&&!(t.mode&1)&&(to=Ee()+500,Hl&&Vn()))}function ot(e,t){var n=e.callbackNode;I1(e,t);var r=Ji(e,e===Ie?Ae:0);if(r===0)n!==null&&$f(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&$f(n),t===1)e.tag===0?TS(Mh.bind(null,e)):fg(Mh.bind(null,e)),_S(function(){!(se&6)&&Vn()}),n=null;else{switch(Bm(r)){case 1:n=Gc;break;case 4:n=$m;break;case 16:n=Zi;break;case 536870912:n=Om;break;default:n=Zi}n=cy(n,ry.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ry(e,t){if(Di=-1,$i=0,se&6)throw Error(B(327));var n=e.callbackNode;if(Vr()&&e.callbackNode!==n)return null;var r=Ji(e,e===Ie?Ae:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=yl(e,r);else{t=r;var o=se;se|=2;var s=sy();(Ie!==e||Ae!==t)&&(qt=null,to=Ee()+500,Jn(e,t));do try{JS();break}catch(l){oy(e,l)}while(!0);id(),pl.current=s,se=o,Ce!==null?t=0:(Ie=null,Ae=0,t=Pe)}if(t!==0){if(t===2&&(o=Au(e),o!==0&&(r=o,t=uc(e,o))),t===1)throw n=ws,Jn(e,0),kn(e,r),ot(e,Ee()),n;if(t===6)kn(e,r);else{if(o=e.current.alternate,!(r&30)&&!qS(o)&&(t=yl(e,r),t===2&&(s=Au(e),s!==0&&(r=s,t=uc(e,s))),t===1))throw n=ws,Jn(e,0),kn(e,r),ot(e,Ee()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(B(345));case 2:Yn(e,qe,qt);break;case 3:if(kn(e,r),(r&130023424)===r&&(t=Sd+500-Ee(),10<t)){if(Ji(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ye(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Vu(Yn.bind(null,e,qe,qt),t);break}Yn(e,qe,qt);break;case 4:if(kn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Pt(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*QS(r/1960))-r,10<r){e.timeoutHandle=Vu(Yn.bind(null,e,qe,qt),r);break}Yn(e,qe,qt);break;case 5:Yn(e,qe,qt);break;default:throw Error(B(329))}}}return ot(e,Ee()),e.callbackNode===n?ry.bind(null,e):null}function uc(e,t){var n=Jo;return e.current.memoizedState.isDehydrated&&(Jn(e,t).flags|=256),e=yl(e,t),e!==2&&(t=qe,qe=n,t!==null&&cc(t)),e}function cc(e){qe===null?qe=e:qe.push.apply(qe,e)}function qS(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 o=n[r],s=o.getSnapshot;o=o.value;try{if(!Rt(s(),o))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 kn(e,t){for(t&=~wd,t&=~Yl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Pt(t),r=1<<n;e[n]=-1,t&=~r}}function Mh(e){if(se&6)throw Error(B(327));Vr();var t=Ji(e,0);if(!(t&1))return ot(e,Ee()),null;var n=yl(e,t);if(e.tag!==0&&n===2){var r=Au(e);r!==0&&(t=r,n=uc(e,r))}if(n===1)throw n=ws,Jn(e,0),kn(e,t),ot(e,Ee()),n;if(n===6)throw Error(B(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Yn(e,qe,qt),ot(e,Ee()),null}function Nd(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(to=Ee()+500,Hl&&Vn())}}function ur(e){Cn!==null&&Cn.tag===0&&!(se&6)&&Vr();var t=se;se|=1;var n=gt.transition,r=ae;try{if(gt.transition=null,ae=1,e)return e()}finally{ae=r,gt.transition=n,se=t,!(se&6)&&Vn()}}function kd(){st=Ar.current,pe(Ar)}function Jn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,jS(n)),Ce!==null)for(n=Ce.return;n!==null;){var r=n;switch(rd(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ol();break;case 3:Jr(),pe(nt),pe(Ue),fd();break;case 5:dd(r);break;case 4:Jr();break;case 13:pe(ve);break;case 19:pe(ve);break;case 10:ld(r.type._context);break;case 22:case 23:kd()}n=n.return}if(Ie=e,Ce=e=Ln(e.current,null),Ae=st=t,Pe=0,ws=null,wd=Yl=ar=0,qe=Jo=null,Kn!==null){for(t=0;t<Kn.length;t++)if(n=Kn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}Kn=null}return e}function oy(e,t){do{var n=Ce;try{if(id(),Li.current=hl,fl){for(var r=we.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}fl=!1}if(lr=0,Te=_e=we=null,qo=!1,ys=0,vd.current=null,n===null||n.return===null){Pe=1,ws=t,Ce=null;break}e:{var s=e,i=n.return,l=n,a=t;if(t=Ae,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,h=l,f=h.tag;if(!(h.mode&1)&&(f===0||f===11||f===15)){var d=h.alternate;d?(h.updateQueue=d.updateQueue,h.memoizedState=d.memoizedState,h.lanes=d.lanes):(h.updateQueue=null,h.memoizedState=null)}var x=yh(i);if(x!==null){x.flags&=-257,xh(x,i,l,s,t),x.mode&1&&gh(s,u,t),t=x,a=u;var y=t.updateQueue;if(y===null){var w=new Set;w.add(a),t.updateQueue=w}else y.add(a);break e}else{if(!(t&1)){gh(s,u,t),Ed();break e}a=Error(B(426))}}else if(me&&l.mode&1){var N=yh(i);if(N!==null){!(N.flags&65536)&&(N.flags|=256),xh(N,i,l,s,t),od(eo(a,l));break e}}s=a=eo(a,l),Pe!==4&&(Pe=2),Jo===null?Jo=[s]:Jo.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=Bg(s,a,t);ch(s,p);break e;case 1:l=a;var v=s.type,m=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Tn===null||!Tn.has(m)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=Hg(s,l,t);ch(s,S);break e}}s=s.return}while(s!==null)}ly(n)}catch(k){t=k,Ce===n&&n!==null&&(Ce=n=n.return);continue}break}while(!0)}function sy(){var e=pl.current;return pl.current=hl,e===null?hl:e}function Ed(){(Pe===0||Pe===3||Pe===2)&&(Pe=4),Ie===null||!(ar&268435455)&&!(Yl&268435455)||kn(Ie,Ae)}function yl(e,t){var n=se;se|=2;var r=sy();(Ie!==e||Ae!==t)&&(qt=null,Jn(e,t));do try{ZS();break}catch(o){oy(e,o)}while(!0);if(id(),se=n,pl.current=r,Ce!==null)throw Error(B(261));return Ie=null,Ae=0,Pe}function ZS(){for(;Ce!==null;)iy(Ce)}function JS(){for(;Ce!==null&&!E1();)iy(Ce)}function iy(e){var t=uy(e.alternate,e,st);e.memoizedProps=e.pendingProps,t===null?ly(e):Ce=t,vd.current=null}function ly(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=YS(n,t),n!==null){n.flags&=32767,Ce=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Pe=6,Ce=null;return}}else if(n=WS(n,t,st),n!==null){Ce=n;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);Pe===0&&(Pe=5)}function Yn(e,t,n){var r=ae,o=gt.transition;try{gt.transition=null,ae=1,e2(e,t,n,r)}finally{gt.transition=o,ae=r}return null}function e2(e,t,n,r){do Vr();while(Cn!==null);if(se&6)throw Error(B(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(B(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(L1(e,s),e===Ie&&(Ce=Ie=null,Ae=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ui||(ui=!0,cy(Zi,function(){return Vr(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=gt.transition,gt.transition=null;var i=ae;ae=1;var l=se;se|=4,vd.current=null,XS(e,n),ty(n,e),wS(Bu),el=!!Fu,Bu=Fu=null,e.current=n,KS(n),b1(),se=l,ae=i,gt.transition=s}else e.current=n;if(ui&&(ui=!1,Cn=e,gl=o),s=e.pendingLanes,s===0&&(Tn=null),_1(n.stateNode),ot(e,Ee()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(ml)throw ml=!1,e=lc,lc=null,e;return gl&1&&e.tag!==0&&Vr(),s=e.pendingLanes,s&1?e===ac?es++:(es=0,ac=e):es=0,Vn(),null}function Vr(){if(Cn!==null){var e=Bm(gl),t=gt.transition,n=ae;try{if(gt.transition=null,ae=16>e?16:e,Cn===null)var r=!1;else{if(e=Cn,Cn=null,gl=0,se&6)throw Error(B(331));var o=se;for(se|=4,W=e.current;W!==null;){var s=W,i=s.child;if(W.flags&16){var l=s.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(W=u;W!==null;){var h=W;switch(h.tag){case 0:case 11:case 15:Zo(8,h,s)}var f=h.child;if(f!==null)f.return=h,W=f;else for(;W!==null;){h=W;var d=h.sibling,x=h.return;if(Zg(h),h===u){W=null;break}if(d!==null){d.return=x,W=d;break}W=x}}}var y=s.alternate;if(y!==null){var w=y.child;if(w!==null){y.child=null;do{var N=w.sibling;w.sibling=null,w=N}while(w!==null)}}W=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,W=i;else e:for(;W!==null;){if(s=W,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Zo(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,W=p;break e}W=s.return}}var v=e.current;for(W=v;W!==null;){i=W;var m=i.child;if(i.subtreeFlags&2064&&m!==null)m.return=i,W=m;else e:for(i=v;W!==null;){if(l=W,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Wl(9,l)}}catch(k){ke(l,l.return,k)}if(l===i){W=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,W=S;break e}W=l.return}}if(se=o,Vn(),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(Dl,e)}catch{}r=!0}return r}finally{ae=n,gt.transition=t}}return!1}function Rh(e,t,n){t=eo(n,t),t=Bg(e,t,1),e=Rn(e,t,1),t=Ye(),e!==null&&(Is(e,1,t),ot(e,t))}function ke(e,t,n){if(e.tag===3)Rh(e,e,n);else for(;t!==null;){if(t.tag===3){Rh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Tn===null||!Tn.has(r))){e=eo(n,e),e=Hg(t,e,1),t=Rn(t,e,1),e=Ye(),t!==null&&(Is(t,1,e),ot(t,e));break}}t=t.return}}function t2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ye(),e.pingedLanes|=e.suspendedLanes&n,Ie===e&&(Ae&n)===n&&(Pe===4||Pe===3&&(Ae&130023424)===Ae&&500>Ee()-Sd?Jn(e,0):wd|=n),ot(e,t)}function ay(e,t){t===0&&(e.mode&1?(t=Js,Js<<=1,!(Js&130023424)&&(Js=4194304)):t=1);var n=Ye();e=ln(e,t),e!==null&&(Is(e,t,n),ot(e,n))}function n2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ay(e,n)}function r2(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(B(314))}r!==null&&r.delete(t),ay(e,n)}var uy;uy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||nt.current)Ze=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ze=!1,US(e,t,n);Ze=!!(e.flags&131072)}else Ze=!1,me&&t.flags&1048576&&hg(t,ll,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zi(e,t),e=t.pendingProps;var o=Qr(t,Ue.current);Hr(t,n),o=pd(null,t,r,e,o,n);var s=md();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rt(r)?(s=!0,sl(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ud(t),o.updater=Ul,t.stateNode=o,o._reactInternals=t,Qu(t,r,e,n),t=Ju(null,t,r,!0,s,n)):(t.tag=0,me&&s&&nd(t),We(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=s2(r),e=Nt(r,e),o){case 0:t=Zu(null,t,r,e,n);break e;case 1:t=Sh(null,t,r,e,n);break e;case 11:t=vh(null,t,r,e,n);break e;case 14:t=wh(null,t,r,Nt(r.type,e),n);break e}throw Error(B(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),Zu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),Sh(e,t,r,o,n);case 3:e:{if(Yg(t),e===null)throw Error(B(387));r=t.pendingProps,s=t.memoizedState,o=s.element,vg(e,t),cl(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=eo(Error(B(423)),t),t=Nh(e,t,r,n,o);break e}else if(r!==o){o=eo(Error(B(424)),t),t=Nh(e,t,r,n,o);break e}else for(lt=Mn(t.stateNode.containerInfo.firstChild),at=t,me=!0,bt=null,n=yg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(qr(),r===o){t=an(e,t,n);break e}We(e,t,r,n)}t=t.child}return t;case 5:return wg(t),e===null&&Gu(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Hu(r,o)?i=null:s!==null&&Hu(r,s)&&(t.flags|=32),Wg(e,t),We(e,t,i,n),t.child;case 6:return e===null&&Gu(t),null;case 13:return Gg(e,t,n);case 4:return cd(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Zr(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),vh(e,t,r,o,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,ce(al,r._currentValue),r._currentValue=i,s!==null)if(Rt(s.value,i)){if(s.children===o.children&&!nt.current){t=an(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){i=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=nn(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?a.next=a:(a.next=h.next,h.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Xu(s.return,n,t),l.lanes|=n;break}a=a.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(B(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Xu(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}We(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Hr(t,n),o=yt(o),r=r(o),t.flags|=1,We(e,t,r,n),t.child;case 14:return r=t.type,o=Nt(r,t.pendingProps),o=Nt(r.type,o),wh(e,t,r,o,n);case 15:return Vg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),zi(e,t),t.tag=1,rt(r)?(e=!0,sl(t)):e=!1,Hr(t,n),Fg(t,r,o),Qu(t,r,o,n),Ju(null,t,r,!0,e,n);case 19:return Xg(e,t,n);case 22:return Ug(e,t,n)}throw Error(B(156,t.tag))};function cy(e,t){return Dm(e,t)}function o2(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 mt(e,t,n,r){return new o2(e,t,n,r)}function bd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function s2(e){if(typeof e=="function")return bd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uc)return 11;if(e===Wc)return 14}return 2}function Ln(e,t){var n=e.alternate;return n===null?(n=mt(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 Oi(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")bd(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case br:return er(n.children,o,s,t);case Vc:i=8,o|=8;break;case wu:return e=mt(12,n,t,o|2),e.elementType=wu,e.lanes=s,e;case Su:return e=mt(13,n,t,o),e.elementType=Su,e.lanes=s,e;case Nu:return e=mt(19,n,t,o),e.elementType=Nu,e.lanes=s,e;case wm:return Gl(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xm:i=10;break e;case vm:i=9;break e;case Uc:i=11;break e;case Wc:i=14;break e;case wn:i=16,r=null;break e}throw Error(B(130,e==null?e:typeof e,""))}return t=mt(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function er(e,t,n,r){return e=mt(7,e,r,t),e.lanes=n,e}function Gl(e,t,n,r){return e=mt(22,e,r,t),e.elementType=wm,e.lanes=n,e.stateNode={isHidden:!1},e}function Ka(e,t,n){return e=mt(6,e,null,t),e.lanes=n,e}function Qa(e,t,n){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function i2(e,t,n,r,o){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=Ma(0),this.expirationTimes=Ma(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ma(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Cd(e,t,n,r,o,s,i,l,a){return e=new i2(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=mt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ud(s),e}function l2(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Er,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function dy(e){if(!e)return Dn;e=e._reactInternals;e:{if(yr(e)!==e||e.tag!==1)throw Error(B(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(rt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(B(171))}if(e.tag===1){var n=e.type;if(rt(n))return dg(e,n,t)}return t}function fy(e,t,n,r,o,s,i,l,a){return e=Cd(n,r,!0,e,o,s,i,l,a),e.context=dy(null),n=e.current,r=Ye(),o=In(n),s=nn(r,o),s.callback=t??null,Rn(n,s,o),e.current.lanes=o,Is(e,o,r),ot(e,r),e}function Xl(e,t,n,r){var o=t.current,s=Ye(),i=In(o);return n=dy(n),t.context===null?t.context=n:t.pendingContext=n,t=nn(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Rn(o,t,i),e!==null&&(Mt(e,o,i,s),Ii(e,o,i)),i}function xl(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 Th(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function jd(e,t){Th(e,t),(e=e.alternate)&&Th(e,t)}function a2(){return null}var hy=typeof reportError=="function"?reportError:function(e){console.error(e)};function _d(e){this._internalRoot=e}Kl.prototype.render=_d.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));Xl(e,t,null,null)};Kl.prototype.unmount=_d.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ur(function(){Xl(null,e,null,null)}),t[sn]=null}};function Kl(e){this._internalRoot=e}Kl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Um();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nn.length&&t!==0&&t<Nn[n].priority;n++);Nn.splice(n,0,e),n===0&&Ym(e)}};function Pd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ql(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ih(){}function u2(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var u=xl(i);s.call(u)}}var i=fy(t,r,e,0,null,!1,!1,"",Ih);return e._reactRootContainer=i,e[sn]=i.current,fs(e.nodeType===8?e.parentNode:e),ur(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=xl(a);l.call(u)}}var a=Cd(e,0,!1,null,null,!1,!1,"",Ih);return e._reactRootContainer=a,e[sn]=a.current,fs(e.nodeType===8?e.parentNode:e),ur(function(){Xl(t,a,n,r)}),a}function ql(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var l=o;o=function(){var a=xl(i);l.call(a)}}Xl(t,i,e,o)}else i=u2(n,t,e,o,r);return xl(i)}Hm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ho(t.pendingLanes);n!==0&&(Xc(t,n|1),ot(t,Ee()),!(se&6)&&(to=Ee()+500,Vn()))}break;case 13:ur(function(){var r=ln(e,1);if(r!==null){var o=Ye();Mt(r,e,1,o)}}),jd(e,1)}};Kc=function(e){if(e.tag===13){var t=ln(e,134217728);if(t!==null){var n=Ye();Mt(t,e,134217728,n)}jd(e,134217728)}};Vm=function(e){if(e.tag===13){var t=In(e),n=ln(e,t);if(n!==null){var r=Ye();Mt(n,e,t,r)}jd(e,t)}};Um=function(){return ae};Wm=function(e,t){var n=ae;try{return ae=e,t()}finally{ae=n}};Tu=function(e,t,n){switch(t){case"input":if(bu(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 o=Bl(r);if(!o)throw Error(B(90));Nm(r),bu(r,o)}}}break;case"textarea":Em(e,n);break;case"select":t=n.value,t!=null&&$r(e,!!n.multiple,t,!1)}};Rm=Nd;Tm=ur;var c2={usingClientEntryPoint:!1,Events:[As,Pr,Bl,Pm,Mm,Nd]},Io={findFiberByHostInstance:Xn,bundleType:0,version:"18.3.0",rendererPackageName:"react-dom"},d2={bundleType:Io.bundleType,version:Io.version,rendererPackageName:Io.rendererPackageName,rendererConfig:Io.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:dn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Am(e),e===null?null:e.stateNode},findFiberByHostInstance:Io.findFiberByHostInstance||a2,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 ci=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ci.isDisabled&&ci.supportsFiber)try{Dl=ci.inject(d2),Bt=ci}catch{}}dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=c2;dt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pd(t))throw Error(B(200));return l2(e,t,null,n)};dt.createRoot=function(e,t){if(!Pd(e))throw Error(B(299));var n=!1,r="",o=hy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Cd(e,1,!1,null,null,n,!1,r,o),e[sn]=t.current,fs(e.nodeType===8?e.parentNode:e),new _d(t)};dt.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(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=Am(t),e=e===null?null:e.stateNode,e};dt.flushSync=function(e){return ur(e)};dt.hydrate=function(e,t,n){if(!Ql(t))throw Error(B(200));return ql(null,e,t,!0,n)};dt.hydrateRoot=function(e,t,n){if(!Pd(e))throw Error(B(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=hy;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=fy(t,null,e,1,n??null,o,!1,s,i),e[sn]=t.current,fs(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Kl(t)};dt.render=function(e,t,n){if(!Ql(t))throw Error(B(200));return ql(null,e,t,!1,n)};dt.unmountComponentAtNode=function(e){if(!Ql(e))throw Error(B(40));return e._reactRootContainer?(ur(function(){ql(null,null,e,!1,function(){e._reactRootContainer=null,e[sn]=null})}),!0):!1};dt.unstable_batchedUpdates=Nd;dt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ql(n))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return ql(e,t,n,!1,r)};dt.version="18.3.0-next-8a015b68cc-20240425";function py(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(py)}catch(e){console.error(e)}}py(),pm.exports=dt;var Zl=pm.exports;const f2=Ac(Zl);var Lh=Zl;xu.createRoot=Lh.createRoot,xu.hydrateRoot=Lh.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 Ah="popstate";function h2(e={}){function t(r,o){let{pathname:s,search:i,hash:l}=r.location;return dc("",{pathname:s,search:i,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Ss(o)}return m2(t,n,null,e)}function ge(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function vt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function p2(){return Math.random().toString(36).substring(2,10)}function zh(e,t){return{usr:e.state,key:e.key,idx:t}}function dc(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?xo(t):t,state:n,key:t&&t.key||r||p2()}}function Ss({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 xo(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 m2(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:s=!1}=r,i=o.history,l="POP",a=null,u=h();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function h(){return(i.state||{idx:null}).idx}function f(){l="POP";let N=h(),p=N==null?null:N-u;u=N,a&&a({action:l,location:w.location,delta:p})}function d(N,p){l="PUSH";let v=dc(w.location,N,p);u=h()+1;let m=zh(v,u),S=w.createHref(v);try{i.pushState(m,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(S)}s&&a&&a({action:l,location:w.location,delta:1})}function x(N,p){l="REPLACE";let v=dc(w.location,N,p);u=h();let m=zh(v,u),S=w.createHref(v);i.replaceState(m,"",S),s&&a&&a({action:l,location:w.location,delta:0})}function y(N){let p=o.location.origin!=="null"?o.location.origin:o.location.href,v=typeof N=="string"?N:Ss(N);return v=v.replace(/ $/,"%20"),ge(p,`No window.location.(origin|href) available to create URL for href: ${v}`),new URL(v,p)}let w={get action(){return l},get location(){return e(o,i)},listen(N){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(Ah,f),a=N,()=>{o.removeEventListener(Ah,f),a=null}},createHref(N){return t(o,N)},createURL:y,encodeLocation(N){let p=y(N);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:d,replace:x,go(N){return i.go(N)}};return w}function my(e,t,n="/"){return g2(e,t,n,!1)}function g2(e,t,n,r){let o=typeof t=="string"?xo(t):t,s=$n(o.pathname||"/",n);if(s==null)return null;let i=gy(e);y2(i);let l=null;for(let a=0;l==null&&a<i.length;++a){let u=_2(s);l=C2(i[a],u,r)}return l}function gy(e,t=[],n=[],r=""){let o=(s,i,l)=>{let a={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};a.relativePath.startsWith("/")&&(ge(a.relativePath.startsWith(r),`Absolute route path "${a.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(r.length));let u=rn([r,a.relativePath]),h=n.concat(a);s.children&&s.children.length>0&&(ge(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),gy(s.children,t,h,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:E2(u,s.index),routesMeta:h})};return e.forEach((s,i)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))o(s,i);else for(let a of yy(s.path))o(s,i,a)}),t}function yy(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let i=yy(r.join("/")),l=[];return l.push(...i.map(a=>a===""?s:[s,a].join("/"))),o&&l.push(...i),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function y2(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 x2=/^:[\w-]+$/,v2=3,w2=2,S2=1,N2=10,k2=-2,Dh=e=>e==="*";function E2(e,t){let n=e.split("/"),r=n.length;return n.some(Dh)&&(r+=k2),t&&(r+=w2),n.filter(o=>!Dh(o)).reduce((o,s)=>o+(x2.test(s)?v2:s===""?S2:N2),r)}function b2(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function C2(e,t,n=!1){let{routesMeta:r}=e,o={},s="/",i=[];for(let l=0;l<r.length;++l){let a=r[l],u=l===r.length-1,h=s==="/"?t:t.slice(s.length)||"/",f=vl({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},h),d=a.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=vl({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},h)),!f)return null;Object.assign(o,f.params),i.push({params:o,pathname:rn([s,f.pathname]),pathnameBase:T2(rn([s,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(s=rn([s,f.pathnameBase]))}return i}function vl(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=j2(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let s=o[0],i=s.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((u,{paramName:h,isOptional:f},d)=>{if(h==="*"){let y=l[d]||"";i=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const x=l[d];return f&&!x?u[h]=void 0:u[h]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:i,pattern:e}}function j2(e,t=!1,n=!0){vt(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,a)=>(r.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function _2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return vt(!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 $n(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 P2(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?xo(e):e;return{pathname:n?n.startsWith("/")?n:M2(n,t):t,search:I2(r),hash:L2(o)}}function M2(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function qa(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 R2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Md(e){let t=R2(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Rd(e,t,n,r=!1){let o;typeof e=="string"?o=xo(e):(o={...e},ge(!o.pathname||!o.pathname.includes("?"),qa("?","pathname","search",o)),ge(!o.pathname||!o.pathname.includes("#"),qa("#","pathname","hash",o)),ge(!o.search||!o.search.includes("#"),qa("#","search","hash",o)));let s=e===""||o.pathname==="",i=s?"/":o.pathname,l;if(i==null)l=n;else{let f=t.length-1;if(!r&&i.startsWith("..")){let d=i.split("/");for(;d[0]==="..";)d.shift(),f-=1;o.pathname=d.join("/")}l=f>=0?t[f]:"/"}let a=P2(o,l),u=i&&i!=="/"&&i.endsWith("/"),h=(s||i===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||h)&&(a.pathname+="/"),a}var rn=e=>e.join("/").replace(/\/\/+/g,"/"),T2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),I2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,L2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function A2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var xy=["POST","PUT","PATCH","DELETE"];new Set(xy);var z2=["GET",...xy];new Set(z2);var vo=g.createContext(null);vo.displayName="DataRouter";var Jl=g.createContext(null);Jl.displayName="DataRouterState";var vy=g.createContext({isTransitioning:!1});vy.displayName="ViewTransition";var D2=g.createContext(new Map);D2.displayName="Fetchers";var $2=g.createContext(null);$2.displayName="Await";var Tt=g.createContext(null);Tt.displayName="Navigation";var Ds=g.createContext(null);Ds.displayName="Location";var wt=g.createContext({outlet:null,matches:[],isDataRoute:!1});wt.displayName="Route";var Td=g.createContext(null);Td.displayName="RouteError";function O2(e,{relative:t}={}){ge(wo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=g.useContext(Tt),{hash:o,pathname:s,search:i}=$s(e,{relative:t}),l=s;return n!=="/"&&(l=s==="/"?n:rn([n,s])),r.createHref({pathname:l,search:i,hash:o})}function wo(){return g.useContext(Ds)!=null}function Yt(){return ge(wo(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Ds).location}var wy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Sy(e){g.useContext(Tt).static||g.useLayoutEffect(e)}function ea(){let{isDataRoute:e}=g.useContext(wt);return e?tN():F2()}function F2(){ge(wo(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(vo),{basename:t,navigator:n}=g.useContext(Tt),{matches:r}=g.useContext(wt),{pathname:o}=Yt(),s=JSON.stringify(Md(r)),i=g.useRef(!1);return Sy(()=>{i.current=!0}),g.useCallback((a,u={})=>{if(vt(i.current,wy),!i.current)return;if(typeof a=="number"){n.go(a);return}let h=Rd(a,JSON.parse(s),o,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:rn([t,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[t,n,s,o,e])}var B2=g.createContext(null);function H2(e){let t=g.useContext(wt).outlet;return t&&g.createElement(B2.Provider,{value:e},t)}function V2(){let{matches:e}=g.useContext(wt),t=e[e.length-1];return t?t.params:{}}function $s(e,{relative:t}={}){let{matches:n}=g.useContext(wt),{pathname:r}=Yt(),o=JSON.stringify(Md(n));return g.useMemo(()=>Rd(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function U2(e,t){return Ny(e,t)}function Ny(e,t,n,r){var p;ge(wo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=g.useContext(Tt),{matches:s}=g.useContext(wt),i=s[s.length-1],l=i?i.params:{},a=i?i.pathname:"/",u=i?i.pathnameBase:"/",h=i&&i.route;{let v=h&&h.path||"";ky(a,!h||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${v}">) 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="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let f=Yt(),d;if(t){let v=typeof t=="string"?xo(t):t;ge(u==="/"||((p=v.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 "${v.pathname}" was given in the \`location\` prop.`),d=v}else d=f;let x=d.pathname||"/",y=x;if(u!=="/"){let v=u.replace(/^\//,"").split("/");y="/"+x.replace(/^\//,"").split("/").slice(v.length).join("/")}let w=my(e,{pathname:y});vt(h||w!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),vt(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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=K2(w&&w.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:rn([u,o.encodeLocation?o.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?u:rn([u,o.encodeLocation?o.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),s,n,r);return t&&N?g.createElement(Ds.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},N):N}function W2(){let e=eN(),t=A2(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)",o={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:s},"ErrorBoundary")," or"," ",g.createElement("code",{style:s},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:o},n):null,i)}var Y2=g.createElement(W2,null),G2=class extends g.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?g.createElement(wt.Provider,{value:this.props.routeContext},g.createElement(Td.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function X2({routeContext:e,match:t,children:n}){let r=g.useContext(vo);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(wt.Provider,{value:e},n)}function K2(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 o=e,s=n==null?void 0:n.errors;if(s!=null){let a=o.findIndex(u=>u.route.id&&(s==null?void 0:s[u.route.id])!==void 0);ge(a>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,a+1))}let i=!1,l=-1;if(n)for(let a=0;a<o.length;a++){let u=o[a];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=a),u.route.id){let{loaderData:h,errors:f}=n,d=u.route.loader&&!h.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||d){i=!0,l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}return o.reduceRight((a,u,h)=>{let f,d=!1,x=null,y=null;n&&(f=s&&u.route.id?s[u.route.id]:void 0,x=u.route.errorElement||Y2,i&&(l<0&&h===0?(ky("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,y=null):l===h&&(d=!0,y=u.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,h+1)),N=()=>{let p;return f?p=x:d?p=y:u.route.Component?p=g.createElement(u.route.Component,null):u.route.element?p=u.route.element:p=a,g.createElement(X2,{match:u,routeContext:{outlet:a,matches:w,isDataRoute:n!=null},children:p})};return n&&(u.route.ErrorBoundary||u.route.errorElement||h===0)?g.createElement(G2,{location:n.location,revalidation:n.revalidation,component:x,error:f,children:N(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):N()},null)}function Id(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Q2(e){let t=g.useContext(vo);return ge(t,Id(e)),t}function q2(e){let t=g.useContext(Jl);return ge(t,Id(e)),t}function Z2(e){let t=g.useContext(wt);return ge(t,Id(e)),t}function Ld(e){let t=Z2(e),n=t.matches[t.matches.length-1];return ge(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function J2(){return Ld("useRouteId")}function eN(){var r;let e=g.useContext(Td),t=q2("useRouteError"),n=Ld("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function tN(){let{router:e}=Q2("useNavigate"),t=Ld("useNavigate"),n=g.useRef(!1);return Sy(()=>{n.current=!0}),g.useCallback(async(o,s={})=>{vt(n.current,wy),n.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...s}))},[e,t])}var $h={};function ky(e,t,n){!t&&!$h[e]&&($h[e]=!0,vt(!1,n))}g.memo(nN);function nN({routes:e,future:t,state:n}){return Ny(e,void 0,n,t)}function fc({to:e,replace:t,state:n,relative:r}){ge(wo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=g.useContext(Tt);vt(!o,"<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:s}=g.useContext(wt),{pathname:i}=Yt(),l=ea(),a=Rd(e,Md(s),i,r==="path"),u=JSON.stringify(a);return g.useEffect(()=>{l(JSON.parse(u),{replace:t,state:n,relative:r})},[l,u,r,t,n]),null}function rN(e){return H2(e.context)}function Qe(e){ge(!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 oN({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:s=!1}){ge(!wo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=e.replace(/^\/*/,"/"),l=g.useMemo(()=>({basename:i,navigator:o,static:s,future:{}}),[i,o,s]);typeof n=="string"&&(n=xo(n));let{pathname:a="/",search:u="",hash:h="",state:f=null,key:d="default"}=n,x=g.useMemo(()=>{let y=$n(a,i);return y==null?null:{location:{pathname:y,search:u,hash:h,state:f,key:d},navigationType:r}},[i,a,u,h,f,d,r]);return vt(x!=null,`<Router basename="${i}"> is not able to match the URL "${a}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:g.createElement(Tt.Provider,{value:l},g.createElement(Ds.Provider,{children:t,value:x}))}function sN({children:e,location:t}){return U2(hc(e),t)}function hc(e,t=[]){let n=[];return g.Children.forEach(e,(r,o)=>{if(!g.isValidElement(r))return;let s=[...t,o];if(r.type===g.Fragment){n.push.apply(n,hc(r.props.children,s));return}ge(r.type===Qe,`[${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>`),ge(!r.props.index||!r.props.children,"An index route cannot have child routes.");let i={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,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=hc(r.props.children,s)),n.push(i)}),n}var Fi="get",Bi="application/x-www-form-urlencoded";function ta(e){return e!=null&&typeof e.tagName=="string"}function iN(e){return ta(e)&&e.tagName.toLowerCase()==="button"}function lN(e){return ta(e)&&e.tagName.toLowerCase()==="form"}function aN(e){return ta(e)&&e.tagName.toLowerCase()==="input"}function uN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function cN(e,t){return e.button===0&&(!t||t==="_self")&&!uN(e)}function pc(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(o=>[n,o]):[[n,r]])},[]))}function dN(e,t){let n=pc(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(s=>{n.append(o,s)})}),n}var di=null;function fN(){if(di===null)try{new FormData(document.createElement("form"),0),di=!1}catch{di=!0}return di}var hN=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Za(e){return e!=null&&!hN.has(e)?(vt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Bi}"`),null):e}function pN(e,t){let n,r,o,s,i;if(lN(e)){let l=e.getAttribute("action");r=l?$n(l,t):null,n=e.getAttribute("method")||Fi,o=Za(e.getAttribute("enctype"))||Bi,s=new FormData(e)}else if(iN(e)||aN(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 a=e.getAttribute("formaction")||l.getAttribute("action");if(r=a?$n(a,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||Fi,o=Za(e.getAttribute("formenctype"))||Za(l.getAttribute("enctype"))||Bi,s=new FormData(l,e),!fN()){let{name:u,type:h,value:f}=e;if(h==="image"){let d=u?`${u}.`:"";s.append(`${d}x`,"0"),s.append(`${d}y`,"0")}else u&&s.append(u,f)}}else{if(ta(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Fi,r=null,o=Bi,i=e}return s&&o==="text/plain"&&(i=s,s=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:s,body:i}}function Ad(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function mN(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 gN(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 yN(e,t,n){let r=await Promise.all(e.map(async o=>{let s=t.routes[o.route.id];if(s){let i=await mN(s,n);return i.links?i.links():[]}return[]}));return SN(r.flat(1).filter(gN).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Oh(e,t,n,r,o,s){let i=(a,u)=>n[u]?a.route.id!==n[u].route.id:!0,l=(a,u)=>{var h;return n[u].pathname!==a.pathname||((h=n[u].route.path)==null?void 0:h.endsWith("*"))&&n[u].params["*"]!==a.params["*"]};return s==="assets"?t.filter((a,u)=>i(a,u)||l(a,u)):s==="data"?t.filter((a,u)=>{var f;let h=r.routes[a.route.id];if(!h||!h.hasLoader)return!1;if(i(a,u)||l(a,u))return!0;if(a.route.shouldRevalidate){let d=a.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:a.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function xN(e,t){return vN(e.map(n=>{let r=t.routes[n.route.id];if(!r)return[];let o=[r.module];return r.imports&&(o=o.concat(r.imports)),o}).flat(1))}function vN(e){return[...new Set(e)]}function wN(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function SN(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let s=JSON.stringify(wN(o));return n.has(s)||(n.add(s),r.push({key:s,link:o})),r},[])}function NN(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 kN(){let e=g.useContext(vo);return Ad(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function EN(){let e=g.useContext(Jl);return Ad(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var zd=g.createContext(void 0);zd.displayName="FrameworkContext";function Ey(){let e=g.useContext(zd);return Ad(e,"You must render this element inside a <HydratedRouter> element"),e}function bN(e,t){let n=g.useContext(zd),[r,o]=g.useState(!1),[s,i]=g.useState(!1),{onFocus:l,onBlur:a,onMouseEnter:u,onMouseLeave:h,onTouchStart:f}=t,d=g.useRef(null);g.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let w=p=>{p.forEach(v=>{i(v.isIntersecting)})},N=new IntersectionObserver(w,{threshold:.5});return d.current&&N.observe(d.current),()=>{N.disconnect()}}},[e]),g.useEffect(()=>{if(r){let w=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(w)}}},[r]);let x=()=>{o(!0)},y=()=>{o(!1),i(!1)};return n?e!=="intent"?[s,d,{}]:[s,d,{onFocus:Lo(l,x),onBlur:Lo(a,y),onMouseEnter:Lo(u,x),onMouseLeave:Lo(h,y),onTouchStart:Lo(f,x)}]:[!1,d,{}]}function Lo(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function CN({page:e,...t}){let{router:n}=kN(),r=g.useMemo(()=>my(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?g.createElement(_N,{page:e,matches:r,...t}):null}function jN(e){let{manifest:t,routeModules:n}=Ey(),[r,o]=g.useState([]);return g.useEffect(()=>{let s=!1;return yN(e,t,n).then(i=>{s||o(i)}),()=>{s=!0}},[e,t,n]),r}function _N({page:e,matches:t,...n}){let r=Yt(),{manifest:o,routeModules:s}=Ey(),{loaderData:i,matches:l}=EN(),a=g.useMemo(()=>Oh(e,t,l,o,r,"data"),[e,t,l,o,r]),u=g.useMemo(()=>Oh(e,t,l,o,r,"assets"),[e,t,l,o,r]),h=g.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let x=new Set,y=!1;if(t.forEach(N=>{var v;let p=o.routes[N.route.id];!p||!p.hasLoader||(!a.some(m=>m.route.id===N.route.id)&&N.route.id in i&&((v=s[N.route.id])!=null&&v.shouldRevalidate)||p.hasClientLoader?y=!0:x.add(N.route.id))}),x.size===0)return[];let w=NN(e);return y&&x.size>0&&w.searchParams.set("_routes",t.filter(N=>x.has(N.route.id)).map(N=>N.route.id).join(",")),[w.pathname+w.search]},[i,r,o,a,t,e,s]),f=g.useMemo(()=>xN(u,o),[u,o]),d=jN(u);return g.createElement(g.Fragment,null,h.map(x=>g.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),f.map(x=>g.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),d.map(({key:x,link:y})=>g.createElement("link",{key:x,...y})))}function PN(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var by=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{by&&(window.__reactRouterVersion="7.1.0")}catch{}function MN({basename:e,children:t,window:n}){let r=g.useRef();r.current==null&&(r.current=h2({window:n,v5Compat:!0}));let o=r.current,[s,i]=g.useState({action:o.action,location:o.location}),l=g.useCallback(a=>{g.startTransition(()=>i(a))},[i]);return g.useLayoutEffect(()=>o.listen(l),[o,l]),g.createElement(oN,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:o})}var Cy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,no=g.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:s,replace:i,state:l,target:a,to:u,preventScrollReset:h,viewTransition:f,...d},x){let{basename:y}=g.useContext(Tt),w=typeof u=="string"&&Cy.test(u),N,p=!1;if(typeof u=="string"&&w&&(N=u,by))try{let R=new URL(window.location.href),D=u.startsWith("//")?new URL(R.protocol+u):new URL(u),I=$n(D.pathname,y);D.origin===R.origin&&I!=null?u=I+D.search+D.hash:p=!0}catch{vt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let v=O2(u,{relative:o}),[m,S,k]=bN(r,d),E=IN(u,{replace:i,state:l,target:a,preventScrollReset:h,relative:o,viewTransition:f});function b(R){t&&t(R),R.defaultPrevented||E(R)}let _=g.createElement("a",{...d,...k,href:N||v,onClick:p||s?t:b,ref:PN(x,S),target:a,"data-discover":!w&&n==="render"?"true":void 0});return m&&!w?g.createElement(g.Fragment,null,_,g.createElement(CN,{page:v})):_});no.displayName="Link";var jy=g.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:s,to:i,viewTransition:l,children:a,...u},h){let f=$s(i,{relative:u.relative}),d=Yt(),x=g.useContext(Jl),{navigator:y,basename:w}=g.useContext(Tt),N=x!=null&&ON(f)&&l===!0,p=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,v=d.pathname,m=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(v=v.toLowerCase(),m=m?m.toLowerCase():null,p=p.toLowerCase()),m&&w&&(m=$n(m,w)||m);const S=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let k=v===p||!o&&v.startsWith(p)&&v.charAt(S)==="/",E=m!=null&&(m===p||!o&&m.startsWith(p)&&m.charAt(p.length)==="/"),b={isActive:k,isPending:E,isTransitioning:N},_=k?t:void 0,R;typeof r=="function"?R=r(b):R=[r,k?"active":null,E?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let D=typeof s=="function"?s(b):s;return g.createElement(no,{...u,"aria-current":_,className:R,ref:h,style:D,to:i,viewTransition:l},typeof a=="function"?a(b):a)});jy.displayName="NavLink";var RN=g.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:s,method:i=Fi,action:l,onSubmit:a,relative:u,preventScrollReset:h,viewTransition:f,...d},x)=>{let y=DN(),w=$N(l,{relative:u}),N=i.toLowerCase()==="get"?"get":"post",p=typeof l=="string"&&Cy.test(l),v=m=>{if(a&&a(m),m.defaultPrevented)return;m.preventDefault();let S=m.nativeEvent.submitter,k=(S==null?void 0:S.getAttribute("formmethod"))||i;y(S||m.currentTarget,{fetcherKey:t,method:k,navigate:n,replace:o,state:s,relative:u,preventScrollReset:h,viewTransition:f})};return g.createElement("form",{ref:x,method:N,action:w,onSubmit:r?a:v,...d,"data-discover":!p&&e==="render"?"true":void 0})});RN.displayName="Form";function TN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _y(e){let t=g.useContext(vo);return ge(t,TN(e)),t}function IN(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:s,viewTransition:i}={}){let l=ea(),a=Yt(),u=$s(e,{relative:s});return g.useCallback(h=>{if(cN(h,t)){h.preventDefault();let f=n!==void 0?n:Ss(a)===Ss(u);l(e,{replace:f,state:r,preventScrollReset:o,relative:s,viewTransition:i})}},[a,l,u,n,r,t,e,o,s,i])}function LN(e){vt(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=g.useRef(pc(e)),n=g.useRef(!1),r=Yt(),o=g.useMemo(()=>dN(r.search,n.current?null:t.current),[r.search]),s=ea(),i=g.useCallback((l,a)=>{const u=pc(typeof l=="function"?l(o):l);n.current=!0,s("?"+u,a)},[s,o]);return[o,i]}var AN=0,zN=()=>`__${String(++AN)}__`;function DN(){let{router:e}=_y("useSubmit"),{basename:t}=g.useContext(Tt),n=J2();return g.useCallback(async(r,o={})=>{let{action:s,method:i,encType:l,formData:a,body:u}=pN(r,t);if(o.navigate===!1){let h=o.fetcherKey||zN();await e.fetch(h,n,o.action||s,{preventScrollReset:o.preventScrollReset,formData:a,body:u,formMethod:o.method||i,formEncType:o.encType||l,flushSync:o.flushSync})}else await e.navigate(o.action||s,{preventScrollReset:o.preventScrollReset,formData:a,body:u,formMethod:o.method||i,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function $N(e,{relative:t}={}){let{basename:n}=g.useContext(Tt),r=g.useContext(wt);ge(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),s={...$s(e||".",{relative:t})},i=Yt();if(e==null){s.search=i.search;let l=new URLSearchParams(s.search),a=l.getAll("index");if(a.some(h=>h==="")){l.delete("index"),a.filter(f=>f).forEach(f=>l.append("index",f));let h=l.toString();s.search=h?`?${h}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:rn([n,s.pathname])),Ss(s)}function ON(e,t={}){let n=g.useContext(vy);ge(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=_y("useViewTransitionState"),o=$s(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=$n(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=$n(n.nextLocation.pathname,r)||n.nextLocation.pathname;return vl(o.pathname,i)!=null||vl(o.pathname,s)!=null}new TextEncoder;const Py=g.createContext(null);function FN({children:e}){const[t,n]=g.useState(()=>localStorage.getItem("opentrust_theme")||"dark"),r=o=>{n(o),localStorage.setItem("opentrust_theme",o)};return g.useEffect(()=>{const o=document.documentElement;if(o.classList.remove("light","dark"),t==="system"){const s=window.matchMedia("(prefers-color-scheme: dark)").matches;o.classList.add(s?"dark":"light")}else o.classList.add(t)},[t]),c.jsx(Py.Provider,{value:{theme:t,setTheme:r},children:e})}function BN(){const e=g.useContext(Py);if(!e)throw new Error("useTheme must be within ThemeProvider");return e}const HN={email:"dev@localhost",apiKey:"sk-og-dev"},My=g.createContext(null);function VN({children:e}){const[t,n]=g.useState(()=>{const l=localStorage.getItem("opentrust_user");return l?JSON.parse(l):null}),[r,o]=g.useState(!localStorage.getItem("opentrust_user"));g.useEffect(()=>{if(t){o(!1);return}let l=!1;return(async()=>{try{const a=await fetch("/api/auth/config");if(!a.ok)return;const u=await a.json();!l&&u.devMode&&n(HN)}catch{}finally{l||o(!1)}})(),()=>{l=!0}},[t]);const s=g.useCallback(async(l,a)=>{const u=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l,apiKey:a})});if(!u.ok)throw new Error("Login failed");const h=await u.json();if(!h.success)throw new Error(h.error??"Login failed");const f={email:l,apiKey:a};n(f),localStorage.setItem("opentrust_user",JSON.stringify(f))},[]),i=g.useCallback(()=>{n(null),localStorage.removeItem("opentrust_user")},[]);return c.jsx(My.Provider,{value:{user:t,isAuthenticated:!!t,isLoading:r,login:s,logout:i},children:e})}function Dd(){const e=g.useContext(My);if(!e)throw new Error("useAuth must be within AuthProvider");return e}function Ry(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ry(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function UN(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ry(e))&&(r&&(r+=" "),r+=t);return r}const $d="-";function WN(e){const t=GN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(i){const l=i.split($d);return l[0]===""&&l.length!==1&&l.shift(),Ty(l,t)||YN(i)}function s(i,l){const a=n[i]||[];return l&&r[i]?[...a,...r[i]]:a}return{getClassGroupId:o,getConflictingClassGroupIds:s}}function Ty(e,t){var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ty(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join($d);return(i=t.validators.find(({validator:l})=>l(s)))==null?void 0:i.classGroupId}const Fh=/^\[(.+)\]$/;function YN(e){if(Fh.test(e)){const t=Fh.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function GN(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return KN(Object.entries(e.classGroups),n).forEach(([s,i])=>{mc(i,r,s,t)}),r}function mc(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Bh(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(XN(o)){mc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{mc(i,Bh(t,s),n,r)})})}function Bh(e,t){let n=e;return t.split($d).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function XN(e){return e.isThemeGetter}function KN(e,t){return t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,l])=>[t+i,l])):s);return[n,o]}):e}function QN(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(s,i){n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)}return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}}const Iy="!";function qN(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(i){const l=[];let a=0,u=0,h;for(let w=0;w<i.length;w++){let N=i[w];if(a===0){if(N===r&&(n||i.slice(w,w+o)===t)){l.push(i.slice(u,w)),u=w+o;continue}if(N==="/"){h=w;continue}}N==="["?a++:N==="]"&&a--}const f=l.length===0?i:i.substring(u),d=f.startsWith(Iy),x=d?f.substring(1):f,y=h&&h>u?h-u:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:x,maybePostfixModifierPosition:y}}}function ZN(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 JN(e){return{cache:QN(e.cacheSize),splitModifiers:qN(e),...WN(e)}}const ek=/\s+/;function tk(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=new Set;return e.trim().split(ek).map(i=>{const{modifiers:l,hasImportantModifier:a,baseClassName:u,maybePostfixModifierPosition:h}=n(i);let f=r(h?u.substring(0,h):u),d=!!h;if(!f){if(!h)return{isTailwindClass:!1,originalClassName:i};if(f=r(u),!f)return{isTailwindClass:!1,originalClassName:i};d=!1}const x=ZN(l).join(":");return{isTailwindClass:!0,modifierId:a?x+Iy:x,classGroupId:f,originalClassName:i,hasPostfixModifier:d}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:l,classGroupId:a,hasPostfixModifier:u}=i,h=l+a;return s.has(h)?!1:(s.add(h),o(a,u).forEach(f=>s.add(l+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function nk(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ly(t))&&(r&&(r+=" "),r+=n);return r}function Ly(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ly(e[r]))&&(n&&(n+=" "),n+=t);return n}function rk(e,...t){let n,r,o,s=i;function i(a){const u=t.reduce((h,f)=>f(h),e());return n=JN(u),r=n.cache.get,o=n.cache.set,s=l,l(a)}function l(a){const u=r(a);if(u)return u;const h=tk(a,n);return o(a,h),h}return function(){return s(nk.apply(null,arguments))}}function fe(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Ay=/^\[(?:([a-z-]+):)?(.+)\]$/i,ok=/^\d+\/\d+$/,sk=new Set(["px","full","screen"]),ik=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lk=/\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$/,ak=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,uk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ck=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Kt(e){return qn(e)||sk.has(e)||ok.test(e)}function mn(e){return So(e,"length",xk)}function qn(e){return!!e&&!Number.isNaN(Number(e))}function fi(e){return So(e,"number",qn)}function Ao(e){return!!e&&Number.isInteger(Number(e))}function dk(e){return e.endsWith("%")&&qn(e.slice(0,-1))}function ee(e){return Ay.test(e)}function gn(e){return ik.test(e)}const fk=new Set(["length","size","percentage"]);function hk(e){return So(e,fk,zy)}function pk(e){return So(e,"position",zy)}const mk=new Set(["image","url"]);function gk(e){return So(e,mk,wk)}function yk(e){return So(e,"",vk)}function zo(){return!0}function So(e,t,n){const r=Ay.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function xk(e){return lk.test(e)&&!ak.test(e)}function zy(){return!1}function vk(e){return uk.test(e)}function wk(e){return ck.test(e)}function Sk(){const e=fe("colors"),t=fe("spacing"),n=fe("blur"),r=fe("brightness"),o=fe("borderColor"),s=fe("borderRadius"),i=fe("borderSpacing"),l=fe("borderWidth"),a=fe("contrast"),u=fe("grayscale"),h=fe("hueRotate"),f=fe("invert"),d=fe("gap"),x=fe("gradientColorStops"),y=fe("gradientColorStopPositions"),w=fe("inset"),N=fe("margin"),p=fe("opacity"),v=fe("padding"),m=fe("saturate"),S=fe("scale"),k=fe("sepia"),E=fe("skew"),b=fe("space"),_=fe("translate"),R=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",ee,t],T=()=>[ee,t],F=()=>["",Kt,mn],j=()=>["auto",qn,ee],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",ee],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>[qn,fi],$=()=>[qn,ee];return{cacheSize:500,separator:":",theme:{colors:[zo],spacing:[Kt,mn],blur:["none","",gn,ee],brightness:O(),borderColor:[e],borderRadius:["none","","full",gn,ee],borderSpacing:T(),borderWidth:F(),contrast:O(),grayscale:P(),hueRotate:$(),invert:P(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[dk,mn],inset:I(),margin:I(),opacity:O(),padding:T(),saturate:O(),scale:O(),sepia:P(),skew:$(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[gn]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:[...A(),ee]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ao,ee]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Ao,ee]}],"grid-cols":[{"grid-cols":[zo]}],"col-start-end":[{col:["auto",{span:["full",Ao,ee]},ee]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[zo]}],"row-start-end":[{row:["auto",{span:[Ao,ee]},ee]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...C()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...C(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...C(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[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":[b]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[b]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[gn]},gn]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gn,mn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",fi]}],"font-family":[{font:[zo]}],"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",ee]}],"line-clamp":[{"line-clamp":["none",qn,fi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Kt,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"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:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Kt,mn]}],"underline-offset":[{"underline-offset":["auto",Kt,ee]}],"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:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],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",ee]}],"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:[...A(),pk]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",hk]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gk]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"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:[...M(),"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:M()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[Kt,ee]}],"outline-w":[{outline:[Kt,mn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[Kt,mn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gn,yk]}],"shadow-color":[{shadow:[zo]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",gn,ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[f]}],saturate:[{saturate:[m]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[m]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"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",ee]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Ao,ee]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"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",ee]}],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",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Kt,mn,fi]}],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 Nk=rk(Sk);function be(...e){return Nk(UN(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 kk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Dy=(...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 Ek={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 bk=g.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...l},a)=>g.createElement("svg",{ref:a,...Ek,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Dy("lucide",o),...l},[...i.map(([u,h])=>g.createElement(u,h)),...Array.isArray(s)?s:[s]]));/**
|
|
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 te=(e,t)=>{const n=g.forwardRef(({className:r,...o},s)=>g.createElement(bk,{ref:s,iconNode:t,className:Dy(`lucide-${kk(e)}`,r),...o}));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 Ck=te("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 jk=te("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 _k=te("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 Pk=te("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 Od=te("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 $y=te("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 Oy=te("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 Mk=te("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"}]]);/**
|
|
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 wl=te("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
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 ro=te("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"}]]);/**
|
|
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 Rk=te("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
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 Tk=te("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
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 Ik=te("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"}]]);/**
|
|
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 Sl=te("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"}]]);/**
|
|
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 Lk=te("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"}]]);/**
|
|
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 na=te("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"}]]);/**
|
|
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 Fy=te("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"}]]);/**
|
|
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 Ak=te("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"}]]);/**
|
|
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 zk=te("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"}]]);/**
|
|
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 Dk=te("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"}]]);/**
|
|
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 cr=te("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
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 $k=te("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"}]]);/**
|
|
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 Ok=te("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
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 Fk=te("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"}]]);/**
|
|
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 tr=te("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"}]]);/**
|
|
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 Bk=te("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"}]]);/**
|
|
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 Hk=te("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
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 oo=te("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"}]]);/**
|
|
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 Vk=te("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"}]]);/**
|
|
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 Uk=te("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"}]]);/**
|
|
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 By=te("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
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 Fd=te("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"}]]);/**
|
|
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 On=te("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"}]]);/**
|
|
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 Wk=te("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"}]]);/**
|
|
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 Yk=te("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"}]]);/**
|
|
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 gc=te("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
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 Ns=te("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"}]]);/**
|
|
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 Hy=te("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"}]]);/**
|
|
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 Vy=te("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"}]]);/**
|
|
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 Gk=te("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Xk=[{label:"Discovery",items:[{to:"/inventory/agents",label:"Agents",icon:Od},{to:"/inventory/identities",label:"Identities",icon:Fy},{to:"/inventory/permissions",label:"Permissions",icon:zk}]},{label:"Secure",items:[{to:"/secure/risk",label:"Risk",icon:Hy},{to:"/secure/graph",label:"Graph",icon:Fk}]},{label:"Operations",items:[{to:"/ops/skills",label:"Skills & Commands",icon:Vy}]},{label:"System",items:[{to:"/system/logs",label:"Logs",icon:Uk},{to:"/system/settings",label:"Settings",icon:On}]}];function Kk(){const e=Yt(),[t,n]=g.useState("");return g.useEffect(()=>{fetch("/health").then(r=>r.json()).then(r=>n(r.version??"")).catch(()=>{})},[]),c.jsxs("aside",{className:"flex w-56 flex-col border-r border-border bg-card",children:[c.jsxs("div",{className:"flex h-14 items-center gap-2 border-b border-border px-4",children:[c.jsx("img",{src:"/dashboard/logo-512.png",alt:"OpenTrust",className:"h-6 w-6 dark:brightness-[1.8] dark:contrast-125"}),c.jsx("span",{className:"text-sm font-semibold tracking-tight text-foreground",children:"OpenTrust"})]}),c.jsx("nav",{className:"flex-1 space-y-6 px-3 py-4",children:Xk.map(r=>c.jsxs("div",{children:[c.jsx("p",{className:"mb-2 px-2 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r.label}),c.jsx("div",{className:"space-y-0.5",children:r.items.map(o=>c.jsxs(jy,{to:o.to,className:be("flex items-center gap-2.5 rounded-md px-2 py-1.5 text-sm transition-colors",e.pathname.startsWith(o.to)?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[c.jsx(o.icon,{className:"h-4 w-4 shrink-0"}),o.label]},o.to))})]},r.label))}),c.jsx("div",{className:"border-t border-border px-4 py-3",children:c.jsx("p",{className:"text-[11px] text-muted-foreground",children:t?`v${t}`:""})})]})}function Qk(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Uy(...e){return t=>e.forEach(n=>Qk(n,t))}function Ut(...e){return g.useCallback(Uy(...e),e)}var so=g.forwardRef((e,t)=>{const{children:n,...r}=e,o=g.Children.toArray(n),s=o.find(Zk);if(s){const i=s.props.children,l=o.map(a=>a===s?g.Children.count(i)>1?g.Children.only(null):g.isValidElement(i)?i.props.children:null:a);return c.jsx(yc,{...r,ref:t,children:g.isValidElement(i)?g.cloneElement(i,void 0,l):null})}return c.jsx(yc,{...r,ref:t,children:n})});so.displayName="Slot";var yc=g.forwardRef((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const o=eE(n);return g.cloneElement(n,{...Jk(r,n.props),ref:t?Uy(t,o):o})}return g.Children.count(n)>1?g.Children.only(null):null});yc.displayName="SlotClone";var qk=({children:e})=>c.jsx(c.Fragment,{children:e});function Zk(e){return g.isValidElement(e)&&e.type===qk}function Jk(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...l)=>{s(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function eE(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Wy(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=Wy(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function tE(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Wy(e))&&(r&&(r+=" "),r+=t);return r}const Hh=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Vh=tE,nE=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Vh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(u=>{const h=n==null?void 0:n[u],f=s==null?void 0:s[u];if(h===null)return null;const d=Hh(h)||Hh(f);return o[u][d]}),l=n&&Object.entries(n).reduce((u,h)=>{let[f,d]=h;return d===void 0||(u[f]=d),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,h)=>{let{class:f,className:d,...x}=h;return Object.entries(x).every(y=>{let[w,N]=y;return Array.isArray(N)?N.includes({...s,...l}[w]):{...s,...l}[w]===N})?[...u,f,d]:u},[]);return Vh(e,i,a,n==null?void 0:n.class,n==null?void 0:n.className)},rE=nE("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"}}),ue=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?so:"button";return c.jsx(i,{className:be(rE({variant:t,size:n,className:e})),ref:s,...o})});ue.displayName="Button";function oE(){const{user:e,logout:t}=Dd(),{theme:n,setTheme:r}=BN();return c.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-border bg-card px-6",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"h-2 w-2 rounded-full bg-success"}),c.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[(e==null?void 0:e.email)&&c.jsx("span",{className:"text-xs text-muted-foreground",children:e.email}),c.jsx(ue,{variant:"ghost",size:"icon",onClick:()=>r(n==="dark"?"light":"dark"),className:"h-8 w-8",children:n==="dark"?c.jsx(Yk,{className:"h-4 w-4"}):c.jsx(Ok,{className:"h-4 w-4"})}),c.jsx(ue,{variant:"ghost",size:"icon",onClick:t,className:"h-8 w-8",children:c.jsx($k,{className:"h-4 w-4"})})]})]})}function sE(){return c.jsxs("div",{className:"flex h-screen overflow-hidden bg-background",children:[c.jsx(Kk,{}),c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsx(oE,{}),c.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:c.jsx(rN,{})})]})]})}const un=g.forwardRef(({className:e,type:t,...n},r)=>c.jsx("input",{type:t,className:be("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}));un.displayName="Input";function iE(){const[e]=LN(),[t,n]=g.useState(e.get("email")??""),[r,o]=g.useState(e.get("key")??""),[s,i]=g.useState(""),[l,a]=g.useState(!1),{login:u,isAuthenticated:h,isLoading:f}=Dd(),d=ea();if(g.useEffect(()=>{h&&d("/inventory/agents",{replace:!0})},[h,d]),f)return c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:c.jsx("div",{className:"text-muted-foreground text-sm",children:"Loading..."})});const x=async y=>{y.preventDefault(),i(""),a(!0);try{await u(t,r),d("/inventory/agents",{replace:!0})}catch(w){i(w instanceof Error?w.message:"Login failed")}finally{a(!1)}};return c.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:c.jsxs("div",{className:"w-full max-w-sm space-y-8 px-4",children:[c.jsxs("div",{className:"flex flex-col items-center gap-3",children:[c.jsx("img",{src:"/dashboard/logo-512.png",alt:"OpenTrust",className:"h-12 w-12 dark:brightness-[1.8] dark:contrast-125"}),c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground",children:"OpenTrust"}),c.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Sign in to your dashboard"})]})]}),c.jsxs("form",{onSubmit:x,className:"space-y-4",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{className:"text-sm font-medium text-foreground",children:"Email"}),c.jsx(un,{type:"email",placeholder:"you@example.com",value:t,onChange:y=>n(y.target.value),required:!0})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx("label",{className:"text-sm font-medium text-foreground",children:"API Key"}),c.jsx(un,{type:"password",placeholder:"sk-og-...",value:r,onChange:y=>o(y.target.value),required:!0})]}),s&&c.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:s}),c.jsx(ue,{type:"submit",className:"w-full",disabled:l,children:l?"Signing in...":"Sign in"})]}),c.jsx("p",{className:"text-center text-xs text-muted-foreground",children:"API Key is generated when registering an agent with the Core API."})]})})}const lE="/api";async function Ne(e,t){const n=localStorage.getItem("opentrust_user"),r=n?JSON.parse(n).apiKey:null,o=await fetch(`${lE}${e}`,{...t,headers:{"Content-Type":"application/json",...r&&{Authorization:`Bearer ${r}`},...t==null?void 0:t.headers}});if(!o.ok)throw new Error(`API ${o.status}: ${await o.text()}`);return o.json()}const Re={agents:{list:()=>Ne("/agents"),get:e=>Ne(`/agents/${e}`),create:e=>Ne("/agents",{method:"POST",body:JSON.stringify(e)}),update:(e,t)=>Ne(`/agents/${e}`,{method:"PUT",body:JSON.stringify(t)}),delete:e=>Ne(`/agents/${e}`,{method:"DELETE"})},discovery:{agents:()=>Ne("/discovery/agents"),profile:e=>Ne(`/discovery/agents/${e}/profile`)},observations:{recent:(e=50)=>Ne(`/observations?limit=${e}`),permissions:()=>Ne("/observations/permissions"),anomalies:()=>Ne("/observations/anomalies"),summary:()=>Ne("/observations/summary"),agentPermissions:e=>Ne(`/observations/agents/${e}/permissions`)},commands:{list:e=>Ne(`/commands?agentId=${e}`),create:e=>Ne("/commands",{method:"POST",body:JSON.stringify(e)})},system:{services:()=>Ne("/system/services"),logs:(e,t=200)=>Ne(`/system/logs/${e}?lines=${t}`),clearLog:e=>Ne(`/system/logs/${e}`,{method:"DELETE"})},detect:e=>Ne("/detect",{method:"POST",body:JSON.stringify(e)}),usage:{summary:(e=30)=>Ne(`/usage/summary?days=${e}`),daily:(e=30)=>Ne(`/usage/daily?days=${e}`)},settings:{get:()=>Ne("/settings"),update:e=>Ne("/settings",{method:"PUT",body:JSON.stringify(e)})}};function Me({className:e,variant:t="default",...n}){return c.jsx("div",{className:be("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})}function aE(){const[e,t]=g.useState([]),[n,r]=g.useState(""),[o,s]=g.useState(!0),i=async()=>{s(!0);try{const u=await Re.discovery.agents();t(u.data??[])}catch{}s(!1)};g.useEffect(()=>{i()},[]);const l=e.filter(u=>{var h;return!n||((h=u.name)==null?void 0:h.toLowerCase().includes(n.toLowerCase()))}),a=u=>u==="active"?"success":u==="inactive"?"secondary":"warning";return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Agents"}),c.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[e.length," agent",e.length!==1?"s":""," discovered"]})]}),c.jsxs(ue,{variant:"outline",size:"sm",onClick:i,children:[c.jsx(oo,{className:"h-3.5 w-3.5"}),"Scan"]})]}),c.jsxs("div",{className:"relative max-w-sm",children:[c.jsx(By,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),c.jsx(un,{placeholder:"Search agents...",className:"pl-9",value:n,onChange:u=>r(u.target.value)})]}),o?c.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):l.length===0?c.jsxs("div",{className:"flex h-40 flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border",children:[c.jsx(Od,{className:"h-8 w-8 text-muted-foreground/50"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents found"})]}):c.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:l.map(u=>{var h;return c.jsxs(no,{to:`/inventory/agents/${u.id}`,className:"group flex flex-col gap-3 rounded-lg border border-border bg-card p-4 transition-colors hover:border-muted-foreground/30",children:[c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsx("span",{className:"text-xl",children:u.emoji||"🤖"}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-medium text-foreground group-hover:text-foreground",children:u.name}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:[u.provider||"unknown",u.model?` · ${u.model}`:""]})]})]}),c.jsx(Me,{variant:a(u.status??"inactive"),className:"text-[10px]",children:u.status??"inactive"})]}),((h=u.skills)==null?void 0:h.length)>0&&c.jsxs("div",{className:"flex flex-wrap gap-1",children:[u.skills.slice(0,4).map(f=>c.jsx("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:typeof f=="string"?f:f.name},f.name??f)),u.skills.length>4&&c.jsxs("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:["+",u.skills.length-4]})]})]},u.id)})})]})}const He=g.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:be("rounded-lg border border-border bg-card text-card-foreground shadow-sm",e),...t}));He.displayName="Card";const Je=g.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:be("flex flex-col space-y-1.5 p-6",e),...t}));Je.displayName="CardHeader";const et=g.forwardRef(({className:e,...t},n)=>c.jsx("h3",{ref:n,className:be("font-semibold leading-none tracking-tight",e),...t}));et.displayName="CardTitle";const uE=g.forwardRef(({className:e,...t},n)=>c.jsx("p",{ref:n,className:be("text-sm text-muted-foreground",e),...t}));uE.displayName="CardDescription";const Ve=g.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:be("p-6 pt-0",e),...t}));Ve.displayName="CardContent";const cE=["Profile","Tasks","Identities","Permissions"];function dE(){const{id:e}=V2(),[t,n]=g.useState(null),[r,o]=g.useState([]),[s,i]=g.useState("Profile"),[l,a]=g.useState(!0);return g.useEffect(()=>{e&&(a(!0),(async()=>{const u=await Re.discovery.profile(e).catch(()=>null),h=(u==null?void 0:u.data)??null;n(h);const f=(h==null?void 0:h.registeredAgentId)??e,d=await Re.observations.agentPermissions(f).catch(()=>({data:[]}));o((d==null?void 0:d.data)??[]),a(!1)})())},[e]),l?c.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):t?c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(no,{to:"/inventory/agents",className:"rounded-md p-1.5 hover:bg-accent",children:c.jsx(_k,{className:"h-4 w-4"})}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:"text-2xl",children:t.emoji||"🤖"}),c.jsxs("div",{children:[c.jsx("h1",{className:"text-lg font-semibold",children:t.name||e}),c.jsxs("p",{className:"text-sm text-muted-foreground",children:[t.provider||"unknown",t.model?` / ${t.model}`:""]})]})]})]}),c.jsx("div",{className:"flex gap-1 border-b border-border",children:cE.map(u=>c.jsx("button",{onClick:()=>i(u),className:be("border-b-2 px-4 py-2 text-sm font-medium transition-colors",s===u?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:u},u))}),s==="Profile"&&c.jsx(fE,{profile:t}),s==="Tasks"&&c.jsx(hE,{profile:t}),s==="Identities"&&c.jsx(pE,{profile:t}),s==="Permissions"&&c.jsx(mE,{permissions:r})]}):c.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Agent not found"})}function fE({profile:e}){const t=e.skills??[];return c.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[c.jsxs(He,{children:[c.jsx(Je,{children:c.jsx(et,{className:"text-sm",children:"Info"})}),c.jsxs(Ve,{className:"space-y-2 text-sm",children:[c.jsx(Do,{label:"Owner",value:e.ownerName||"—"}),c.jsx(Do,{label:"Creature",value:e.creature||"—"}),c.jsx(Do,{label:"Vibe",value:e.vibe||"—"}),c.jsx(Do,{label:"Sessions",value:String(e.sessionCount??0)}),c.jsx(Do,{label:"Last Active",value:e.lastActive??"never"})]})]}),c.jsxs(He,{children:[c.jsx(Je,{children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs(et,{className:"flex items-center gap-2 text-sm",children:[c.jsx(Vy,{className:"h-4 w-4"})," Skills (",t.length,")"]}),c.jsx(no,{to:"/ops/skills",children:c.jsxs(ue,{size:"sm",variant:"ghost",className:"h-7 text-xs text-muted-foreground",children:["Manage ",c.jsx(Lk,{className:"ml-1 h-3 w-3"})]})})]})}),c.jsx(Ve,{children:t.length===0?c.jsxs("div",{className:"flex flex-col items-center gap-2 py-4",children:[c.jsx(tr,{className:"h-8 w-8 text-muted-foreground/30"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"No skills installed"}),c.jsx(no,{to:"/ops/skills",children:c.jsx(ue,{size:"sm",variant:"ghost",className:"h-7 text-xs",children:"Go to Operations to install skills"})})]}):c.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(n=>c.jsxs(Me,{variant:"secondary",className:"text-xs font-normal",children:[c.jsx(tr,{className:"mr-1 h-3 w-3"})," ",n.name]},n.name))})})]}),c.jsxs(He,{children:[c.jsx(Je,{children:c.jsx(et,{className:"text-sm",children:"Plugins"})}),c.jsx(Ve,{children:(e.plugins??[]).length===0?c.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins"}):c.jsx("div",{className:"space-y-1.5",children:(e.plugins??[]).map(n=>c.jsxs("div",{className:"flex items-center justify-between text-sm",children:[c.jsx("span",{children:n.name}),c.jsx(Me,{variant:n.enabled?"success":"secondary",className:"text-[10px]",children:n.enabled?"on":"off"})]},n.name))})})]}),c.jsxs(He,{children:[c.jsx(Je,{children:c.jsx(et,{className:"text-sm",children:"Connected Systems"})}),c.jsx(Ve,{children:(e.connectedSystems??[]).length===0?c.jsx("p",{className:"text-sm text-muted-foreground",children:"None"}):c.jsx("div",{className:"flex flex-wrap gap-1.5",children:(e.connectedSystems??[]).map(n=>c.jsx(Me,{variant:"outline",className:"text-xs",children:n},n))})})]})]})}function hE({profile:e}){const t=e.cronJobs??[];return c.jsxs(He,{children:[c.jsx(Je,{children:c.jsxs(et,{className:"flex items-center gap-2 text-sm",children:[c.jsx(Tk,{className:"h-4 w-4"})," Scheduled Tasks (",t.length,")"]})}),c.jsx(Ve,{children:t.length===0?c.jsx("p",{className:"text-sm text-muted-foreground",children:"No scheduled tasks"}):c.jsx("div",{className:"space-y-2",children:t.map((n,r)=>c.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border px-3 py-2 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:n.schedule}),c.jsx("span",{className:"ml-2",children:n.task??n.id})]}),c.jsx(Me,{variant:n.enabled!==!1?"success":"secondary",className:"text-[10px]",children:n.enabled!==!1?"active":"paused"})]},r))})})]})}function pE({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 c.jsx("div",{className:"space-y-4",children:n.length===0?c.jsx("p",{className:"text-sm text-muted-foreground",children:"No identity files found"}):n.map(r=>c.jsxs(He,{children:[c.jsx(Je,{children:c.jsxs(et,{className:"flex items-center gap-2 text-sm",children:[c.jsx(na,{className:"h-4 w-4"})," ",r.label]})}),c.jsx(Ve,{children:c.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 mE({permissions:e}){return e.length===0?c.jsx("p",{className:"text-sm text-muted-foreground",children:"No observed permissions"}):c.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[c.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Tool"}),c.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Category"}),c.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Access"}),c.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-muted-foreground",children:"Calls"}),c.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-muted-foreground",children:"Errors"})]})}),c.jsx("tbody",{children:e.map(t=>c.jsxs("tr",{className:"border-b border-border last:border-0",children:[c.jsx("td",{className:"px-4 py-2.5 font-mono text-xs",children:t.toolName}),c.jsx("td",{className:"px-4 py-2.5",children:c.jsx(Me,{variant:"outline",className:"text-[10px]",children:t.category??"—"})}),c.jsx("td",{className:"px-4 py-2.5",children:c.jsx(Me,{variant:t.accessPattern==="write"?"warning":t.accessPattern==="admin"?"destructive":"secondary",className:"text-[10px]",children:t.accessPattern??"read"})}),c.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs",children:t.callCount}),c.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs text-destructive",children:t.errorCount||"—"})]},t.id))})]})})}function Do({label:e,value:t}){return c.jsxs("div",{className:"flex justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:e}),c.jsx("span",{className:"font-medium",children:t})]})}function gE(){const[e,t]=g.useState([]),[n,r]=g.useState(!0),[o,s]=g.useState(new Set);g.useEffect(()=>{Re.discovery.agents().then(a=>{t(a.data??[]),r(!1)}).catch(()=>r(!1))},[]);const i=[{category:"Agents",items:e.map(a=>({id:a.id,name:a.name,emoji:a.emoji,provider:a.provider,status:a.status}))},{category:"Owners",items:[...new Set(e.map(a=>a.ownerName).filter(Boolean))].map(a=>({id:a,name:a,type:"owner"}))},{category:"Connected Systems",items:[...new Set(e.flatMap(a=>a.connectedSystems??[]))].map(a=>({id:a,name:a,type:"system"}))}],l=a=>{s(u=>{const h=new Set(u);return h.has(a)?h.delete(a):h.add(a),h})};return n?c.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Identities"}),c.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Agents, owners, and connected systems"})]}),c.jsx("div",{className:"space-y-3",children:i.map(a=>c.jsxs(He,{children:[c.jsxs("button",{onClick:()=>l(a.category),className:"flex w-full items-center justify-between p-4 text-left",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Fy,{className:"h-4 w-4 text-muted-foreground"}),c.jsx("span",{className:"text-sm font-medium",children:a.category}),c.jsx(Me,{variant:"secondary",className:"text-[10px]",children:a.items.length})]}),o.has(a.category)?c.jsx($y,{className:"h-4 w-4 text-muted-foreground"}):c.jsx(Oy,{className:"h-4 w-4 text-muted-foreground"})]}),o.has(a.category)&&c.jsx(Ve,{className:"border-t border-border pt-3",children:a.items.length===0?c.jsx("p",{className:"text-sm text-muted-foreground",children:"None"}):c.jsx("div",{className:"space-y-1.5",children:a.items.map(u=>c.jsxs("div",{className:"flex items-center justify-between rounded-md px-3 py-2 text-sm hover:bg-muted/50",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[u.emoji&&c.jsx("span",{className:"text-base",children:u.emoji}),c.jsx("span",{children:u.name})]}),u.status&&c.jsx(Me,{variant:u.status==="active"?"success":"secondary",className:"text-[10px]",children:u.status}),u.type&&c.jsx(Me,{variant:"outline",className:"text-[10px]",children:u.type})]},u.id))})})]},a.category))})]})}function yE(){const[e,t]=g.useState([]),[n,r]=g.useState(""),[o,s]=g.useState("callCount"),[i,l]=g.useState(!1),[a,u]=g.useState(!0);g.useEffect(()=>{Re.observations.permissions().then(d=>{t(d.data??[]),u(!1)}).catch(()=>u(!1))},[]);const h=g.useMemo(()=>{let d=e;if(n){const x=n.toLowerCase();d=d.filter(y=>{var w,N;return((w=y.toolName)==null?void 0:w.toLowerCase().includes(x))||((N=y.category)==null?void 0:N.toLowerCase().includes(x))})}return[...d].sort((x,y)=>{const w=x[o]??0,N=y[o]??0;return typeof w=="string"?i?w.localeCompare(N):N.localeCompare(w):i?w-N:N-w})},[e,n,o,i]),f=d=>{o===d?l(!i):(s(d),l(!1))};return a?c.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Permissions"}),c.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[e.length," observed tool permission",e.length!==1?"s":""]})]}),c.jsxs("div",{className:"relative max-w-sm",children:[c.jsx(By,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),c.jsx(un,{placeholder:"Filter by tool or category...",className:"pl-9",value:n,onChange:d=>r(d.target.value)})]}),c.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[c.jsx(Ja,{label:"Tool",sortKey:"toolName",current:o,asc:i,onSort:f}),c.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Category"}),c.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Access"}),c.jsx(Ja,{label:"Calls",sortKey:"callCount",current:o,asc:i,onSort:f,align:"right"}),c.jsx(Ja,{label:"Errors",sortKey:"errorCount",current:o,asc:i,onSort:f,align:"right"})]})}),c.jsx("tbody",{children:h.length===0?c.jsx("tr",{children:c.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-muted-foreground",children:"No permissions"})}):h.map(d=>c.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30",children:[c.jsx("td",{className:"px-4 py-2.5 font-mono text-xs",children:d.toolName}),c.jsx("td",{className:"px-4 py-2.5",children:c.jsx(Me,{variant:"outline",className:"text-[10px]",children:d.category??"—"})}),c.jsx("td",{className:"px-4 py-2.5",children:c.jsx(Me,{variant:d.accessPattern==="write"?"warning":d.accessPattern==="admin"?"destructive":"secondary",className:"text-[10px]",children:d.accessPattern??"read"})}),c.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs",children:d.callCount}),c.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs text-destructive",children:d.errorCount||"—"})]},d.id))})]})})]})}function Ja({label:e,sortKey:t,current:n,asc:r,onSort:o,align:s="left"}){return c.jsx("th",{className:`cursor-pointer px-4 py-2.5 font-medium text-muted-foreground hover:text-foreground ${s==="right"?"text-right":"text-left"}`,onClick:()=>o(t),children:c.jsxs("span",{className:"inline-flex items-center gap-1",children:[e,n===t&&c.jsx(Pk,{className:"h-3 w-3"})]})})}function xE(){const[e,t]=g.useState([]),[n,r]=g.useState(!0);g.useEffect(()=>{Re.observations.anomalies().then(i=>{t(i.data??[]),r(!1)}).catch(()=>r(!1))},[]);const o=i=>i.blocked||i.errorCount>3?"high":i.callCount===1||i.errorCount>0?"medium":"low",s=i=>i==="high"?"destructive":i==="medium"?"warning":"secondary";return n?c.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Risk Overview"}),c.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[e.length," anomal",e.length!==1?"ies":"y"," detected"]})]}),e.length===0?c.jsxs("div",{className:"flex h-40 flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border",children:[c.jsx(Hy,{className:"h-8 w-8 text-muted-foreground/50"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"No anomalies detected"})]}):c.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[c.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Tool"}),c.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Agent"}),c.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Risk"}),c.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Category"}),c.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-muted-foreground",children:"First Seen"})]})}),c.jsx("tbody",{children:e.map(i=>{var a;const l=o(i);return c.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30",children:[c.jsx("td",{className:"px-4 py-2.5 font-mono text-xs",children:i.toolName}),c.jsx("td",{className:"px-4 py-2.5 text-xs text-muted-foreground",children:((a=i.agentId)==null?void 0:a.slice(0,8))??"—"}),c.jsx("td",{className:"px-4 py-2.5",children:c.jsx(Me,{variant:s(l),className:"text-[10px]",children:l})}),c.jsx("td",{className:"px-4 py-2.5",children:c.jsx(Me,{variant:"outline",className:"text-[10px]",children:i.category??"—"})}),c.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 je(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=je(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var vE={value:()=>{}};function ra(){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 Hi(n)}function Hi(e){this._=e}function wE(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Hi.prototype=ra.prototype={constructor:Hi,on:function(e,t){var n=this._,r=wE(e+"",n),o,s=-1,i=r.length;if(arguments.length<2){for(;++s<i;)if((o=(e=r[s]).type)&&(o=SE(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<i;)if(o=(e=r[s]).type)n[o]=Uh(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Uh(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Hi(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,s;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,o=s.length;r<o;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,s=r.length;o<s;++o)r[o].value.apply(t,n)}};function SE(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Uh(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=vE,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var xc="http://www.w3.org/1999/xhtml";const Wh={svg:"http://www.w3.org/2000/svg",xhtml:xc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function oa(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Wh.hasOwnProperty(t)?{space:Wh[t],local:e}:e}function NE(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===xc&&t.documentElement.namespaceURI===xc?t.createElement(e):t.createElementNS(n,e)}}function kE(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Yy(e){var t=oa(e);return(t.local?kE:NE)(t)}function EE(){}function Bd(e){return e==null?EE:function(){return this.querySelector(e)}}function bE(e){typeof e!="function"&&(e=Bd(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],i=s.length,l=r[o]=new Array(i),a,u,h=0;h<i;++h)(a=s[h])&&(u=e.call(a,a.__data__,h,s))&&("__data__"in a&&(u.__data__=a.__data__),l[h]=u);return new ct(r,this._parents)}function CE(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function jE(){return[]}function Gy(e){return e==null?jE:function(){return this.querySelectorAll(e)}}function _E(e){return function(){return CE(e.apply(this,arguments))}}function PE(e){typeof e=="function"?e=_E(e):e=Gy(e);for(var t=this._groups,n=t.length,r=[],o=[],s=0;s<n;++s)for(var i=t[s],l=i.length,a,u=0;u<l;++u)(a=i[u])&&(r.push(e.call(a,a.__data__,u,i)),o.push(a));return new ct(r,o)}function Xy(e){return function(){return this.matches(e)}}function Ky(e){return function(t){return t.matches(e)}}var ME=Array.prototype.find;function RE(e){return function(){return ME.call(this.children,e)}}function TE(){return this.firstElementChild}function IE(e){return this.select(e==null?TE:RE(typeof e=="function"?e:Ky(e)))}var LE=Array.prototype.filter;function AE(){return Array.from(this.children)}function zE(e){return function(){return LE.call(this.children,e)}}function DE(e){return this.selectAll(e==null?AE:zE(typeof e=="function"?e:Ky(e)))}function $E(e){typeof e!="function"&&(e=Xy(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],i=s.length,l=r[o]=[],a,u=0;u<i;++u)(a=s[u])&&e.call(a,a.__data__,u,s)&&l.push(a);return new ct(r,this._parents)}function Qy(e){return new Array(e.length)}function OE(){return new ct(this._enter||this._groups.map(Qy),this._parents)}function Nl(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Nl.prototype={constructor:Nl,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 FE(e){return function(){return e}}function BE(e,t,n,r,o,s){for(var i=0,l,a=t.length,u=s.length;i<u;++i)(l=t[i])?(l.__data__=s[i],r[i]=l):n[i]=new Nl(e,s[i]);for(;i<a;++i)(l=t[i])&&(o[i]=l)}function HE(e,t,n,r,o,s,i){var l,a,u=new Map,h=t.length,f=s.length,d=new Array(h),x;for(l=0;l<h;++l)(a=t[l])&&(d[l]=x=i.call(a,a.__data__,l,t)+"",u.has(x)?o[l]=a:u.set(x,a));for(l=0;l<f;++l)x=i.call(e,s[l],l,s)+"",(a=u.get(x))?(r[l]=a,a.__data__=s[l],u.delete(x)):n[l]=new Nl(e,s[l]);for(l=0;l<h;++l)(a=t[l])&&u.get(d[l])===a&&(o[l]=a)}function VE(e){return e.__data__}function UE(e,t){if(!arguments.length)return Array.from(this,VE);var n=t?HE:BE,r=this._parents,o=this._groups;typeof e!="function"&&(e=FE(e));for(var s=o.length,i=new Array(s),l=new Array(s),a=new Array(s),u=0;u<s;++u){var h=r[u],f=o[u],d=f.length,x=WE(e.call(h,h&&h.__data__,u,r)),y=x.length,w=l[u]=new Array(y),N=i[u]=new Array(y),p=a[u]=new Array(d);n(h,f,w,N,p,x,t);for(var v=0,m=0,S,k;v<y;++v)if(S=w[v]){for(v>=m&&(m=v+1);!(k=N[m])&&++m<y;);S._next=k||null}}return i=new ct(i,r),i._enter=l,i._exit=a,i}function WE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function YE(){return new ct(this._exit||this._groups.map(Qy),this._parents)}function GE(e,t,n){var r=this.enter(),o=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?s.remove():n(s),r&&o?r.merge(o).order():o}function XE(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,s=r.length,i=Math.min(o,s),l=new Array(o),a=0;a<i;++a)for(var u=n[a],h=r[a],f=u.length,d=l[a]=new Array(f),x,y=0;y<f;++y)(x=u[y]||h[y])&&(d[y]=x);for(;a<o;++a)l[a]=n[a];return new ct(l,this._parents)}function KE(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,s=r[o],i;--o>=0;)(i=r[o])&&(s&&i.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(i,s),s=i);return this}function QE(e){e||(e=qE);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,o=new Array(r),s=0;s<r;++s){for(var i=n[s],l=i.length,a=o[s]=new Array(l),u,h=0;h<l;++h)(u=i[h])&&(a[h]=u);a.sort(t)}return new ct(o,this._parents).order()}function qE(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ZE(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function JE(){return Array.from(this)}function eb(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,s=r.length;o<s;++o){var i=r[o];if(i)return i}return null}function tb(){let e=0;for(const t of this)++e;return e}function nb(){return!this.node()}function rb(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],s=0,i=o.length,l;s<i;++s)(l=o[s])&&e.call(l,l.__data__,s,o);return this}function ob(e){return function(){this.removeAttribute(e)}}function sb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ib(e,t){return function(){this.setAttribute(e,t)}}function lb(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ab(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function ub(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 cb(e,t){var n=oa(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?sb:ob:typeof t=="function"?n.local?ub:ab:n.local?lb:ib)(n,t))}function qy(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function db(e){return function(){this.style.removeProperty(e)}}function fb(e,t,n){return function(){this.style.setProperty(e,t,n)}}function hb(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function pb(e,t,n){return arguments.length>1?this.each((t==null?db:typeof t=="function"?hb:fb)(e,t,n??"")):io(this.node(),e)}function io(e,t){return e.style.getPropertyValue(t)||qy(e).getComputedStyle(e,null).getPropertyValue(t)}function mb(e){return function(){delete this[e]}}function gb(e,t){return function(){this[e]=t}}function yb(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function xb(e,t){return arguments.length>1?this.each((t==null?mb:typeof t=="function"?yb:gb)(e,t)):this.node()[e]}function Zy(e){return e.trim().split(/^|\s+/)}function Hd(e){return e.classList||new Jy(e)}function Jy(e){this._node=e,this._names=Zy(e.getAttribute("class")||"")}Jy.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 ex(e,t){for(var n=Hd(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function tx(e,t){for(var n=Hd(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function vb(e){return function(){ex(this,e)}}function wb(e){return function(){tx(this,e)}}function Sb(e,t){return function(){(t.apply(this,arguments)?ex:tx)(this,e)}}function Nb(e,t){var n=Zy(e+"");if(arguments.length<2){for(var r=Hd(this.node()),o=-1,s=n.length;++o<s;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Sb:t?vb:wb)(n,t))}function kb(){this.textContent=""}function Eb(e){return function(){this.textContent=e}}function bb(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Cb(e){return arguments.length?this.each(e==null?kb:(typeof e=="function"?bb:Eb)(e)):this.node().textContent}function jb(){this.innerHTML=""}function _b(e){return function(){this.innerHTML=e}}function Pb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Mb(e){return arguments.length?this.each(e==null?jb:(typeof e=="function"?Pb:_b)(e)):this.node().innerHTML}function Rb(){this.nextSibling&&this.parentNode.appendChild(this)}function Tb(){return this.each(Rb)}function Ib(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Lb(){return this.each(Ib)}function Ab(e){var t=typeof e=="function"?e:Yy(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function zb(){return null}function Db(e,t){var n=typeof e=="function"?e:Yy(e),r=t==null?zb:typeof t=="function"?t:Bd(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function $b(){var e=this.parentNode;e&&e.removeChild(this)}function Ob(){return this.each($b)}function Fb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Bb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Hb(e){return this.select(e?Bb:Fb)}function Vb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ub(e){return function(t){e.call(this,t,this.__data__)}}function Wb(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 Yb(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,s;n<o;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function Gb(e,t,n){return function(){var r=this.__on,o,s=Ub(t);if(r){for(var i=0,l=r.length;i<l;++i)if((o=r[i]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=n),o.value=t;return}}this.addEventListener(e.type,s,n),o={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(o):this.__on=[o]}}function Xb(e,t,n){var r=Wb(e+""),o,s=r.length,i;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,h;a<u;++a)for(o=0,h=l[a];o<s;++o)if((i=r[o]).type===h.type&&i.name===h.name)return h.value}return}for(l=t?Gb:Yb,o=0;o<s;++o)this.each(l(r[o],t,n));return this}function nx(e,t,n){var r=qy(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Kb(e,t){return function(){return nx(this,e,t)}}function Qb(e,t){return function(){return nx(this,e,t.apply(this,arguments))}}function qb(e,t){return this.each((typeof t=="function"?Qb:Kb)(e,t))}function*Zb(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,s=r.length,i;o<s;++o)(i=r[o])&&(yield i)}var rx=[null];function ct(e,t){this._groups=e,this._parents=t}function Os(){return new ct([[document.documentElement]],rx)}function Jb(){return this}ct.prototype=Os.prototype={constructor:ct,select:bE,selectAll:PE,selectChild:IE,selectChildren:DE,filter:$E,data:UE,enter:OE,exit:YE,join:GE,merge:XE,selection:Jb,order:KE,sort:QE,call:ZE,nodes:JE,node:eb,size:tb,empty:nb,each:rb,attr:cb,style:pb,property:xb,classed:Nb,text:Cb,html:Mb,raise:Tb,lower:Lb,append:Ab,insert:Db,remove:Ob,clone:Hb,datum:Vb,on:Xb,dispatch:qb,[Symbol.iterator]:Zb};function it(e){return typeof e=="string"?new ct([[document.querySelector(e)]],[document.documentElement]):new ct([[e]],rx)}function eC(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Et(e,t){if(e=eC(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 o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const tC={passive:!1},ks={capture:!0,passive:!1};function eu(e){e.stopImmediatePropagation()}function Ur(e){e.preventDefault(),e.stopImmediatePropagation()}function ox(e){var t=e.document.documentElement,n=it(e).on("dragstart.drag",Ur,ks);"onselectstart"in t?n.on("selectstart.drag",Ur,ks):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function sx(e,t){var n=e.document.documentElement,r=it(e).on("dragstart.drag",null);t&&(r.on("click.drag",Ur,ks),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 hi=e=>()=>e;function vc(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:s,x:i,y:l,dx:a,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:o,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}vc.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function nC(e){return!e.ctrlKey&&!e.button}function rC(){return this.parentNode}function oC(e,t){return t??{x:e.x,y:e.y}}function sC(){return navigator.maxTouchPoints||"ontouchstart"in this}function ix(){var e=nC,t=rC,n=oC,r=sC,o={},s=ra("start","drag","end"),i=0,l,a,u,h,f=0;function d(S){S.on("mousedown.drag",x).filter(r).on("touchstart.drag",N).on("touchmove.drag",p,tC).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(S,k){if(!(h||!e.call(this,S,k))){var E=m(this,t.call(this,S,k),S,k,"mouse");E&&(it(S.view).on("mousemove.drag",y,ks).on("mouseup.drag",w,ks),ox(S.view),eu(S),u=!1,l=S.clientX,a=S.clientY,E("start",S))}}function y(S){if(Ur(S),!u){var k=S.clientX-l,E=S.clientY-a;u=k*k+E*E>f}o.mouse("drag",S)}function w(S){it(S.view).on("mousemove.drag mouseup.drag",null),sx(S.view,u),Ur(S),o.mouse("end",S)}function N(S,k){if(e.call(this,S,k)){var E=S.changedTouches,b=t.call(this,S,k),_=E.length,R,D;for(R=0;R<_;++R)(D=m(this,b,S,k,E[R].identifier,E[R]))&&(eu(S),D("start",S,E[R]))}}function p(S){var k=S.changedTouches,E=k.length,b,_;for(b=0;b<E;++b)(_=o[k[b].identifier])&&(Ur(S),_("drag",S,k[b]))}function v(S){var k=S.changedTouches,E=k.length,b,_;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),b=0;b<E;++b)(_=o[k[b].identifier])&&(eu(S),_("end",S,k[b]))}function m(S,k,E,b,_,R){var D=s.copy(),I=Et(R||E,k),T,F,j;if((j=n.call(S,new vc("beforestart",{sourceEvent:E,target:d,identifier:_,active:i,x:I[0],y:I[1],dx:0,dy:0,dispatch:D}),b))!=null)return T=j.x-I[0]||0,F=j.y-I[1]||0,function A(M,z,C){var P=I,L;switch(M){case"start":o[_]=A,L=i++;break;case"end":delete o[_],--i;case"drag":I=Et(C||z,k),L=i;break}D.call(M,S,new vc(M,{sourceEvent:z,subject:j,target:d,identifier:_,active:L,x:I[0]+T,y:I[1]+F,dx:I[0]-P[0],dy:I[1]-P[1],dispatch:D}),b)}}return d.filter=function(S){return arguments.length?(e=typeof S=="function"?S:hi(!!S),d):e},d.container=function(S){return arguments.length?(t=typeof S=="function"?S:hi(S),d):t},d.subject=function(S){return arguments.length?(n=typeof S=="function"?S:hi(S),d):n},d.touchable=function(S){return arguments.length?(r=typeof S=="function"?S:hi(!!S),d):r},d.on=function(){var S=s.on.apply(s,arguments);return S===s?d:S},d.clickDistance=function(S){return arguments.length?(f=(S=+S)*S,d):Math.sqrt(f)},d}function Vd(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function lx(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Fs(){}var Es=.7,kl=1/Es,Wr="\\s*([+-]?\\d+)\\s*",bs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iC=/^#([0-9a-f]{3,8})$/,lC=new RegExp(`^rgb\\(${Wr},${Wr},${Wr}\\)$`),aC=new RegExp(`^rgb\\(${Vt},${Vt},${Vt}\\)$`),uC=new RegExp(`^rgba\\(${Wr},${Wr},${Wr},${bs}\\)$`),cC=new RegExp(`^rgba\\(${Vt},${Vt},${Vt},${bs}\\)$`),dC=new RegExp(`^hsl\\(${bs},${Vt},${Vt}\\)$`),fC=new RegExp(`^hsla\\(${bs},${Vt},${Vt},${bs}\\)$`),Yh={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};Vd(Fs,dr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Gh,formatHex:Gh,formatHex8:hC,formatHsl:pC,formatRgb:Xh,toString:Xh});function Gh(){return this.rgb().formatHex()}function hC(){return this.rgb().formatHex8()}function pC(){return ax(this).formatHsl()}function Xh(){return this.rgb().formatRgb()}function dr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=iC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Kh(t):n===3?new tt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?pi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?pi(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=lC.exec(e))?new tt(t[1],t[2],t[3],1):(t=aC.exec(e))?new tt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=uC.exec(e))?pi(t[1],t[2],t[3],t[4]):(t=cC.exec(e))?pi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=dC.exec(e))?Zh(t[1],t[2]/100,t[3]/100,1):(t=fC.exec(e))?Zh(t[1],t[2]/100,t[3]/100,t[4]):Yh.hasOwnProperty(e)?Kh(Yh[e]):e==="transparent"?new tt(NaN,NaN,NaN,0):null}function Kh(e){return new tt(e>>16&255,e>>8&255,e&255,1)}function pi(e,t,n,r){return r<=0&&(e=t=n=NaN),new tt(e,t,n,r)}function mC(e){return e instanceof Fs||(e=dr(e)),e?(e=e.rgb(),new tt(e.r,e.g,e.b,e.opacity)):new tt}function wc(e,t,n,r){return arguments.length===1?mC(e):new tt(e,t,n,r??1)}function tt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Vd(tt,wc,lx(Fs,{brighter(e){return e=e==null?kl:Math.pow(kl,e),new tt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Es:Math.pow(Es,e),new tt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tt(nr(this.r),nr(this.g),nr(this.b),El(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:Qh,formatHex:Qh,formatHex8:gC,formatRgb:qh,toString:qh}));function Qh(){return`#${Zn(this.r)}${Zn(this.g)}${Zn(this.b)}`}function gC(){return`#${Zn(this.r)}${Zn(this.g)}${Zn(this.b)}${Zn((isNaN(this.opacity)?1:this.opacity)*255)}`}function qh(){const e=El(this.opacity);return`${e===1?"rgb(":"rgba("}${nr(this.r)}, ${nr(this.g)}, ${nr(this.b)}${e===1?")":`, ${e})`}`}function El(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zn(e){return e=nr(e),(e<16?"0":"")+e.toString(16)}function Zh(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ct(e,t,n,r)}function ax(e){if(e instanceof Ct)return new Ct(e.h,e.s,e.l,e.opacity);if(e instanceof Fs||(e=dr(e)),!e)return new Ct;if(e instanceof Ct)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),s=Math.max(t,n,r),i=NaN,l=s-o,a=(s+o)/2;return l?(t===s?i=(n-r)/l+(n<r)*6:n===s?i=(r-t)/l+2:i=(t-n)/l+4,l/=a<.5?s+o:2-s-o,i*=60):l=a>0&&a<1?0:i,new Ct(i,l,a,e.opacity)}function yC(e,t,n,r){return arguments.length===1?ax(e):new Ct(e,t,n,r??1)}function Ct(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Vd(Ct,yC,lx(Fs,{brighter(e){return e=e==null?kl:Math.pow(kl,e),new Ct(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Es:Math.pow(Es,e),new Ct(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,o=2*n-r;return new tt(tu(e>=240?e-240:e+120,o,r),tu(e,o,r),tu(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Ct(Jh(this.h),mi(this.s),mi(this.l),El(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=El(this.opacity);return`${e===1?"hsl(":"hsla("}${Jh(this.h)}, ${mi(this.s)*100}%, ${mi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Jh(e){return e=(e||0)%360,e<0?e+360:e}function mi(e){return Math.max(0,Math.min(1,e||0))}function tu(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 Ud=e=>()=>e;function xC(e,t){return function(n){return e+n*t}}function vC(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 wC(e){return(e=+e)==1?ux:function(t,n){return n-t?vC(t,n,e):Ud(isNaN(t)?n:t)}}function ux(e,t){var n=t-e;return n?xC(e,n):Ud(isNaN(e)?t:e)}const bl=function e(t){var n=wC(t);function r(o,s){var i=n((o=wc(o)).r,(s=wc(s)).r),l=n(o.g,s.g),a=n(o.b,s.b),u=ux(o.opacity,s.opacity);return function(h){return o.r=i(h),o.g=l(h),o.b=a(h),o.opacity=u(h),o+""}}return r.gamma=e,r}(1);function SC(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(s){for(o=0;o<n;++o)r[o]=e[o]*(1-s)+t[o]*s;return r}}function NC(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function kC(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),s=new Array(n),i;for(i=0;i<r;++i)o[i]=ts(e[i],t[i]);for(;i<n;++i)s[i]=t[i];return function(l){for(i=0;i<r;++i)s[i]=o[i](l);return s}}function EC(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function $t(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function bC(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=ts(e[o],t[o]):r[o]=t[o];return function(s){for(o in n)r[o]=n[o](s);return r}}var Sc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nu=new RegExp(Sc.source,"g");function CC(e){return function(){return e}}function jC(e){return function(t){return e(t)+""}}function cx(e,t){var n=Sc.lastIndex=nu.lastIndex=0,r,o,s,i=-1,l=[],a=[];for(e=e+"",t=t+"";(r=Sc.exec(e))&&(o=nu.exec(t));)(s=o.index)>n&&(s=t.slice(n,s),l[i]?l[i]+=s:l[++i]=s),(r=r[0])===(o=o[0])?l[i]?l[i]+=o:l[++i]=o:(l[++i]=null,a.push({i,x:$t(r,o)})),n=nu.lastIndex;return n<t.length&&(s=t.slice(n),l[i]?l[i]+=s:l[++i]=s),l.length<2?a[0]?jC(a[0].x):CC(t):(t=a.length,function(u){for(var h=0,f;h<t;++h)l[(f=a[h]).i]=f.x(u);return l.join("")})}function ts(e,t){var n=typeof t,r;return t==null||n==="boolean"?Ud(t):(n==="number"?$t:n==="string"?(r=dr(t))?(t=r,bl):cx:t instanceof dr?bl:t instanceof Date?EC:NC(t)?SC:Array.isArray(t)?kC:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?bC:$t)(e,t)}var ep=180/Math.PI,Nc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function dx(e,t,n,r,o,s){var i,l,a;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(a=e*n+t*r)&&(n-=e*a,r-=t*a),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,a/=l),e*r<t*n&&(e=-e,t=-t,a=-a,i=-i),{translateX:o,translateY:s,rotate:Math.atan2(t,e)*ep,skewX:Math.atan(a)*ep,scaleX:i,scaleY:l}}var gi;function _C(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Nc:dx(t.a,t.b,t.c,t.d,t.e,t.f)}function PC(e){return e==null||(gi||(gi=document.createElementNS("http://www.w3.org/2000/svg","g")),gi.setAttribute("transform",e),!(e=gi.transform.baseVal.consolidate()))?Nc:(e=e.matrix,dx(e.a,e.b,e.c,e.d,e.e,e.f))}function fx(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function s(u,h,f,d,x,y){if(u!==f||h!==d){var w=x.push("translate(",null,t,null,n);y.push({i:w-4,x:$t(u,f)},{i:w-2,x:$t(h,d)})}else(f||d)&&x.push("translate("+f+t+d+n)}function i(u,h,f,d){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),d.push({i:f.push(o(f)+"rotate(",null,r)-2,x:$t(u,h)})):h&&f.push(o(f)+"rotate("+h+r)}function l(u,h,f,d){u!==h?d.push({i:f.push(o(f)+"skewX(",null,r)-2,x:$t(u,h)}):h&&f.push(o(f)+"skewX("+h+r)}function a(u,h,f,d,x,y){if(u!==f||h!==d){var w=x.push(o(x)+"scale(",null,",",null,")");y.push({i:w-4,x:$t(u,f)},{i:w-2,x:$t(h,d)})}else(f!==1||d!==1)&&x.push(o(x)+"scale("+f+","+d+")")}return function(u,h){var f=[],d=[];return u=e(u),h=e(h),s(u.translateX,u.translateY,h.translateX,h.translateY,f,d),i(u.rotate,h.rotate,f,d),l(u.skewX,h.skewX,f,d),a(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,d),u=h=null,function(x){for(var y=-1,w=d.length,N;++y<w;)f[(N=d[y]).i]=N.x(x);return f.join("")}}}var MC=fx(_C,"px, ","px)","deg)"),RC=fx(PC,", ",")",")"),TC=1e-12;function tp(e){return((e=Math.exp(e))+1/e)/2}function IC(e){return((e=Math.exp(e))-1/e)/2}function LC(e){return((e=Math.exp(2*e))-1)/(e+1)}const Vi=function e(t,n,r){function o(s,i){var l=s[0],a=s[1],u=s[2],h=i[0],f=i[1],d=i[2],x=h-l,y=f-a,w=x*x+y*y,N,p;if(w<TC)p=Math.log(d/u)/t,N=function(b){return[l+b*x,a+b*y,u*Math.exp(t*b*p)]};else{var v=Math.sqrt(w),m=(d*d-u*u+r*w)/(2*u*n*v),S=(d*d-u*u-r*w)/(2*d*n*v),k=Math.log(Math.sqrt(m*m+1)-m),E=Math.log(Math.sqrt(S*S+1)-S);p=(E-k)/t,N=function(b){var _=b*p,R=tp(k),D=u/(n*v)*(R*LC(t*_+k)-IC(k));return[l+D*x,a+D*y,u*R/tp(t*_+k)]}}return N.duration=p*1e3*t/Math.SQRT2,N}return o.rho=function(s){var i=Math.max(.001,+s),l=i*i,a=l*l;return e(i,l,a)},o}(Math.SQRT2,2,4);var lo=0,Uo=0,$o=0,hx=1e3,Cl,Wo,jl=0,fr=0,sa=0,Cs=typeof performance=="object"&&performance.now?performance:Date,px=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Wd(){return fr||(px(AC),fr=Cs.now()+sa)}function AC(){fr=0}function _l(){this._call=this._time=this._next=null}_l.prototype=mx.prototype={constructor:_l,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Wd():+n)+(t==null?0:+t),!this._next&&Wo!==this&&(Wo?Wo._next=this:Cl=this,Wo=this),this._call=e,this._time=n,kc()},stop:function(){this._call&&(this._call=null,this._time=1/0,kc())}};function mx(e,t,n){var r=new _l;return r.restart(e,t,n),r}function zC(){Wd(),++lo;for(var e=Cl,t;e;)(t=fr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--lo}function np(){fr=(jl=Cs.now())+sa,lo=Uo=0;try{zC()}finally{lo=0,$C(),fr=0}}function DC(){var e=Cs.now(),t=e-jl;t>hx&&(sa-=t,jl=e)}function $C(){for(var e,t=Cl,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:Cl=n);Wo=e,kc(r)}function kc(e){if(!lo){Uo&&(Uo=clearTimeout(Uo));var t=e-fr;t>24?(e<1/0&&(Uo=setTimeout(np,e-Cs.now()-sa)),$o&&($o=clearInterval($o))):($o||(jl=Cs.now(),$o=setInterval(DC,hx)),lo=1,px(np))}}function rp(e,t,n){var r=new _l;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var OC=ra("start","end","cancel","interrupt"),FC=[],gx=0,op=1,Ec=2,Ui=3,sp=4,bc=5,Wi=6;function ia(e,t,n,r,o,s){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;BC(e,n,{name:t,index:r,group:o,on:OC,tween:FC,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:gx})}function Yd(e,t){var n=It(e,t);if(n.state>gx)throw new Error("too late; already scheduled");return n}function Gt(e,t){var n=It(e,t);if(n.state>Ui)throw new Error("too late; already running");return n}function It(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function BC(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=mx(s,0,n.time);function s(u){n.state=op,n.timer.restart(i,n.delay,n.time),n.delay<=u&&i(u-n.delay)}function i(u){var h,f,d,x;if(n.state!==op)return a();for(h in r)if(x=r[h],x.name===n.name){if(x.state===Ui)return rp(i);x.state===sp?(x.state=Wi,x.timer.stop(),x.on.call("interrupt",e,e.__data__,x.index,x.group),delete r[h]):+h<t&&(x.state=Wi,x.timer.stop(),x.on.call("cancel",e,e.__data__,x.index,x.group),delete r[h])}if(rp(function(){n.state===Ui&&(n.state=sp,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Ec,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ec){for(n.state=Ui,o=new Array(d=n.tween.length),h=0,f=-1;h<d;++h)(x=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(o[++f]=x);o.length=f+1}}function l(u){for(var h=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=bc,1),f=-1,d=o.length;++f<d;)o[f].call(e,h);n.state===bc&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=Wi,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Yi(e,t){var n=e.__transition,r,o,s=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((r=n[i]).name!==t){s=!1;continue}o=r.state>Ec&&r.state<bc,r.state=Wi,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[i]}s&&delete e.__transition}}function HC(e){return this.each(function(){Yi(this,e)})}function VC(e,t){var n,r;return function(){var o=Gt(this,e),s=o.tween;if(s!==n){r=n=s;for(var i=0,l=r.length;i<l;++i)if(r[i].name===t){r=r.slice(),r.splice(i,1);break}}o.tween=r}}function UC(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var s=Gt(this,e),i=s.tween;if(i!==r){o=(r=i).slice();for(var l={name:t,value:n},a=0,u=o.length;a<u;++a)if(o[a].name===t){o[a]=l;break}a===u&&o.push(l)}s.tween=o}}function WC(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=It(this.node(),n).tween,o=0,s=r.length,i;o<s;++o)if((i=r[o]).name===e)return i.value;return null}return this.each((t==null?VC:UC)(n,e,t))}function Gd(e,t,n){var r=e._id;return e.each(function(){var o=Gt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return It(o,r).value[t]}}function yx(e,t){var n;return(typeof t=="number"?$t:t instanceof dr?bl:(n=dr(t))?(t=n,bl):cx)(e,t)}function YC(e){return function(){this.removeAttribute(e)}}function GC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function XC(e,t,n){var r,o=n+"",s;return function(){var i=this.getAttribute(e);return i===o?null:i===r?s:s=t(r=i,n)}}function KC(e,t,n){var r,o=n+"",s;return function(){var i=this.getAttributeNS(e.space,e.local);return i===o?null:i===r?s:s=t(r=i,n)}}function QC(e,t,n){var r,o,s;return function(){var i,l=n(this),a;return l==null?void this.removeAttribute(e):(i=this.getAttribute(e),a=l+"",i===a?null:i===r&&a===o?s:(o=a,s=t(r=i,l)))}}function qC(e,t,n){var r,o,s;return function(){var i,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),a=l+"",i===a?null:i===r&&a===o?s:(o=a,s=t(r=i,l)))}}function ZC(e,t){var n=oa(e),r=n==="transform"?RC:yx;return this.attrTween(e,typeof t=="function"?(n.local?qC:QC)(n,r,Gd(this,"attr."+e,t)):t==null?(n.local?GC:YC)(n):(n.local?KC:XC)(n,r,t))}function JC(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ej(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function tj(e,t){var n,r;function o(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&ej(e,s)),n}return o._value=t,o}function nj(e,t){var n,r;function o(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&JC(e,s)),n}return o._value=t,o}function rj(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=oa(e);return this.tween(n,(r.local?tj:nj)(r,t))}function oj(e,t){return function(){Yd(this,e).delay=+t.apply(this,arguments)}}function sj(e,t){return t=+t,function(){Yd(this,e).delay=t}}function ij(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?oj:sj)(t,e)):It(this.node(),t).delay}function lj(e,t){return function(){Gt(this,e).duration=+t.apply(this,arguments)}}function aj(e,t){return t=+t,function(){Gt(this,e).duration=t}}function uj(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?lj:aj)(t,e)):It(this.node(),t).duration}function cj(e,t){if(typeof t!="function")throw new Error;return function(){Gt(this,e).ease=t}}function dj(e){var t=this._id;return arguments.length?this.each(cj(t,e)):It(this.node(),t).ease}function fj(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Gt(this,e).ease=n}}function hj(e){if(typeof e!="function")throw new Error;return this.each(fj(this._id,e))}function pj(e){typeof e!="function"&&(e=Xy(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],i=s.length,l=r[o]=[],a,u=0;u<i;++u)(a=s[u])&&e.call(a,a.__data__,u,s)&&l.push(a);return new cn(r,this._parents,this._name,this._id)}function mj(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,s=Math.min(r,o),i=new Array(r),l=0;l<s;++l)for(var a=t[l],u=n[l],h=a.length,f=i[l]=new Array(h),d,x=0;x<h;++x)(d=a[x]||u[x])&&(f[x]=d);for(;l<r;++l)i[l]=t[l];return new cn(i,this._parents,this._name,this._id)}function gj(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 yj(e,t,n){var r,o,s=gj(t)?Yd:Gt;return function(){var i=s(this,e),l=i.on;l!==r&&(o=(r=l).copy()).on(t,n),i.on=o}}function xj(e,t){var n=this._id;return arguments.length<2?It(this.node(),n).on.on(e):this.each(yj(n,e,t))}function vj(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function wj(){return this.on("end.remove",vj(this._id))}function Sj(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Bd(e));for(var r=this._groups,o=r.length,s=new Array(o),i=0;i<o;++i)for(var l=r[i],a=l.length,u=s[i]=new Array(a),h,f,d=0;d<a;++d)(h=l[d])&&(f=e.call(h,h.__data__,d,l))&&("__data__"in h&&(f.__data__=h.__data__),u[d]=f,ia(u[d],t,n,d,u,It(h,n)));return new cn(s,this._parents,t,n)}function Nj(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Gy(e));for(var r=this._groups,o=r.length,s=[],i=[],l=0;l<o;++l)for(var a=r[l],u=a.length,h,f=0;f<u;++f)if(h=a[f]){for(var d=e.call(h,h.__data__,f,a),x,y=It(h,n),w=0,N=d.length;w<N;++w)(x=d[w])&&ia(x,t,n,w,d,y);s.push(d),i.push(h)}return new cn(s,i,t,n)}var kj=Os.prototype.constructor;function Ej(){return new kj(this._groups,this._parents)}function bj(e,t){var n,r,o;return function(){var s=io(this,e),i=(this.style.removeProperty(e),io(this,e));return s===i?null:s===n&&i===r?o:o=t(n=s,r=i)}}function xx(e){return function(){this.style.removeProperty(e)}}function Cj(e,t,n){var r,o=n+"",s;return function(){var i=io(this,e);return i===o?null:i===r?s:s=t(r=i,n)}}function jj(e,t,n){var r,o,s;return function(){var i=io(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),io(this,e))),i===a?null:i===r&&a===o?s:(o=a,s=t(r=i,l))}}function _j(e,t){var n,r,o,s="style."+t,i="end."+s,l;return function(){var a=Gt(this,e),u=a.on,h=a.value[s]==null?l||(l=xx(t)):void 0;(u!==n||o!==h)&&(r=(n=u).copy()).on(i,o=h),a.on=r}}function Pj(e,t,n){var r=(e+="")=="transform"?MC:yx;return t==null?this.styleTween(e,bj(e,r)).on("end.style."+e,xx(e)):typeof t=="function"?this.styleTween(e,jj(e,r,Gd(this,"style."+e,t))).each(_j(this._id,e)):this.styleTween(e,Cj(e,r,t),n).on("end.style."+e,null)}function Mj(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Rj(e,t,n){var r,o;function s(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&Mj(e,i,n)),r}return s._value=t,s}function Tj(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,Rj(e,t,n??""))}function Ij(e){return function(){this.textContent=e}}function Lj(e){return function(){var t=e(this);this.textContent=t??""}}function Aj(e){return this.tween("text",typeof e=="function"?Lj(Gd(this,"text",e)):Ij(e==null?"":e+""))}function zj(e){return function(t){this.textContent=e.call(this,t)}}function Dj(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&zj(o)),t}return r._value=e,r}function $j(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,Dj(e))}function Oj(){for(var e=this._name,t=this._id,n=vx(),r=this._groups,o=r.length,s=0;s<o;++s)for(var i=r[s],l=i.length,a,u=0;u<l;++u)if(a=i[u]){var h=It(a,t);ia(a,e,n,u,i,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new cn(r,this._parents,e,n)}function Fj(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(s,i){var l={value:i},a={value:function(){--o===0&&s()}};n.each(function(){var u=Gt(this,r),h=u.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),o===0&&s()})}var Bj=0;function cn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function vx(){return++Bj}var Qt=Os.prototype;cn.prototype={constructor:cn,select:Sj,selectAll:Nj,selectChild:Qt.selectChild,selectChildren:Qt.selectChildren,filter:pj,merge:mj,selection:Ej,transition:Oj,call:Qt.call,nodes:Qt.nodes,node:Qt.node,size:Qt.size,empty:Qt.empty,each:Qt.each,on:xj,attr:ZC,attrTween:rj,style:Pj,styleTween:Tj,text:Aj,textTween:$j,remove:wj,tween:WC,delay:ij,duration:uj,ease:dj,easeVarying:hj,end:Fj,[Symbol.iterator]:Qt[Symbol.iterator]};function Hj(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Vj={time:null,delay:0,duration:250,ease:Hj};function Uj(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 Wj(e){var t,n;e instanceof cn?(t=e._id,e=e._name):(t=vx(),(n=Vj).time=Wd(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,s=0;s<o;++s)for(var i=r[s],l=i.length,a,u=0;u<l;++u)(a=i[u])&&ia(a,e,t,u,i,n||Uj(a,t));return new cn(r,this._parents,e,t)}Os.prototype.interrupt=HC;Os.prototype.transition=Wj;const yi=e=>()=>e;function Yj(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){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:o}})}function tn(e,t,n){this.k=e,this.x=t,this.y=n}tn.prototype={constructor:tn,scale:function(e){return e===1?this:new tn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new tn(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 la=new tn(1,0,0);wx.prototype=tn.prototype;function wx(e){for(;!e.__zoom;)if(!(e=e.parentNode))return la;return e.__zoom}function ru(e){e.stopImmediatePropagation()}function Oo(e){e.preventDefault(),e.stopImmediatePropagation()}function Gj(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Xj(){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 ip(){return this.__zoom||la}function Kj(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Qj(){return navigator.maxTouchPoints||"ontouchstart"in this}function qj(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>s?(s+i)/2:Math.min(0,s)||Math.max(0,i))}function Sx(){var e=Gj,t=Xj,n=qj,r=Kj,o=Qj,s=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],l=250,a=Vi,u=ra("start","zoom","end"),h,f,d,x=500,y=150,w=0,N=10;function p(j){j.property("__zoom",ip).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",D).filter(o).on("touchstart.zoom",I).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(j,A,M,z){var C=j.selection?j.selection():j;C.property("__zoom",ip),j!==C?k(j,A,M,z):C.interrupt().each(function(){E(this,arguments).event(z).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},p.scaleBy=function(j,A,M,z){p.scaleTo(j,function(){var C=this.__zoom.k,P=typeof A=="function"?A.apply(this,arguments):A;return C*P},M,z)},p.scaleTo=function(j,A,M,z){p.transform(j,function(){var C=t.apply(this,arguments),P=this.__zoom,L=M==null?S(C):typeof M=="function"?M.apply(this,arguments):M,O=P.invert(L),$=typeof A=="function"?A.apply(this,arguments):A;return n(m(v(P,$),L,O),C,i)},M,z)},p.translateBy=function(j,A,M,z){p.transform(j,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),i)},null,z)},p.translateTo=function(j,A,M,z,C){p.transform(j,function(){var P=t.apply(this,arguments),L=this.__zoom,O=z==null?S(P):typeof z=="function"?z.apply(this,arguments):z;return n(la.translate(O[0],O[1]).scale(L.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof M=="function"?-M.apply(this,arguments):-M),P,i)},z,C)};function v(j,A){return A=Math.max(s[0],Math.min(s[1],A)),A===j.k?j:new tn(A,j.x,j.y)}function m(j,A,M){var z=A[0]-M[0]*j.k,C=A[1]-M[1]*j.k;return z===j.x&&C===j.y?j:new tn(j.k,z,C)}function S(j){return[(+j[0][0]+ +j[1][0])/2,(+j[0][1]+ +j[1][1])/2]}function k(j,A,M,z){j.on("start.zoom",function(){E(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(z).end()}).tween("zoom",function(){var C=this,P=arguments,L=E(C,P).event(z),O=t.apply(C,P),$=M==null?S(O):typeof M=="function"?M.apply(C,P):M,U=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),V=C.__zoom,Y=typeof A=="function"?A.apply(C,P):A,G=a(V.invert($).concat(U/V.k),Y.invert($).concat(U/Y.k));return function(X){if(X===1)X=Y;else{var H=G(X),Q=U/H[2];X=new tn(Q,$[0]-H[0]*Q,$[1]-H[1]*Q)}L.zoom(null,X)}})}function E(j,A,M){return!M&&j.__zooming||new b(j,A)}function b(j,A){this.that=j,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(j,A),this.taps=0}b.prototype={event:function(j){return j&&(this.sourceEvent=j),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(j,A){return this.mouse&&j!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&j!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&j!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(j){var A=it(this.that).datum();u.call(j,this.that,new Yj(j,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:u}),A)}};function _(j,...A){if(!e.apply(this,arguments))return;var M=E(this,A).event(j),z=this.__zoom,C=Math.max(s[0],Math.min(s[1],z.k*Math.pow(2,r.apply(this,arguments)))),P=Et(j);if(M.wheel)(M.mouse[0][0]!==P[0]||M.mouse[0][1]!==P[1])&&(M.mouse[1]=z.invert(M.mouse[0]=P)),clearTimeout(M.wheel);else{if(z.k===C)return;M.mouse=[P,z.invert(P)],Yi(this),M.start()}Oo(j),M.wheel=setTimeout(L,y),M.zoom("mouse",n(m(v(z,C),M.mouse[0],M.mouse[1]),M.extent,i));function L(){M.wheel=null,M.end()}}function R(j,...A){if(d||!e.apply(this,arguments))return;var M=j.currentTarget,z=E(this,A,!0).event(j),C=it(j.view).on("mousemove.zoom",$,!0).on("mouseup.zoom",U,!0),P=Et(j,M),L=j.clientX,O=j.clientY;ox(j.view),ru(j),z.mouse=[P,this.__zoom.invert(P)],Yi(this),z.start();function $(V){if(Oo(V),!z.moved){var Y=V.clientX-L,G=V.clientY-O;z.moved=Y*Y+G*G>w}z.event(V).zoom("mouse",n(m(z.that.__zoom,z.mouse[0]=Et(V,M),z.mouse[1]),z.extent,i))}function U(V){C.on("mousemove.zoom mouseup.zoom",null),sx(V.view,z.moved),Oo(V),z.event(V).end()}}function D(j,...A){if(e.apply(this,arguments)){var M=this.__zoom,z=Et(j.changedTouches?j.changedTouches[0]:j,this),C=M.invert(z),P=M.k*(j.shiftKey?.5:2),L=n(m(v(M,P),z,C),t.apply(this,A),i);Oo(j),l>0?it(this).transition().duration(l).call(k,L,z,j):it(this).call(p.transform,L,z,j)}}function I(j,...A){if(e.apply(this,arguments)){var M=j.touches,z=M.length,C=E(this,A,j.changedTouches.length===z).event(j),P,L,O,$;for(ru(j),L=0;L<z;++L)O=M[L],$=Et(O,this),$=[$,this.__zoom.invert($),O.identifier],C.touch0?!C.touch1&&C.touch0[2]!==$[2]&&(C.touch1=$,C.taps=0):(C.touch0=$,P=!0,C.taps=1+!!h);h&&(h=clearTimeout(h)),P&&(C.taps<2&&(f=$[0],h=setTimeout(function(){h=null},x)),Yi(this),C.start())}}function T(j,...A){if(this.__zooming){var M=E(this,A).event(j),z=j.changedTouches,C=z.length,P,L,O,$;for(Oo(j),P=0;P<C;++P)L=z[P],O=Et(L,this),M.touch0&&M.touch0[2]===L.identifier?M.touch0[0]=O:M.touch1&&M.touch1[2]===L.identifier&&(M.touch1[0]=O);if(L=M.that.__zoom,M.touch1){var U=M.touch0[0],V=M.touch0[1],Y=M.touch1[0],G=M.touch1[1],X=(X=Y[0]-U[0])*X+(X=Y[1]-U[1])*X,H=(H=G[0]-V[0])*H+(H=G[1]-V[1])*H;L=v(L,Math.sqrt(X/H)),O=[(U[0]+Y[0])/2,(U[1]+Y[1])/2],$=[(V[0]+G[0])/2,(V[1]+G[1])/2]}else if(M.touch0)O=M.touch0[0],$=M.touch0[1];else return;M.zoom("touch",n(m(L,O,$),M.extent,i))}}function F(j,...A){if(this.__zooming){var M=E(this,A).event(j),z=j.changedTouches,C=z.length,P,L;for(ru(j),d&&clearTimeout(d),d=setTimeout(function(){d=null},x),P=0;P<C;++P)L=z[P],M.touch0&&M.touch0[2]===L.identifier?delete M.touch0:M.touch1&&M.touch1[2]===L.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(L=Et(L,this),Math.hypot(f[0]-L[0],f[1]-L[1])<N)){var O=it(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return p.wheelDelta=function(j){return arguments.length?(r=typeof j=="function"?j:yi(+j),p):r},p.filter=function(j){return arguments.length?(e=typeof j=="function"?j:yi(!!j),p):e},p.touchable=function(j){return arguments.length?(o=typeof j=="function"?j:yi(!!j),p):o},p.extent=function(j){return arguments.length?(t=typeof j=="function"?j:yi([[+j[0][0],+j[0][1]],[+j[1][0],+j[1][1]]]),p):t},p.scaleExtent=function(j){return arguments.length?(s[0]=+j[0],s[1]=+j[1],p):[s[0],s[1]]},p.translateExtent=function(j){return arguments.length?(i[0][0]=+j[0][0],i[1][0]=+j[1][0],i[0][1]=+j[0][1],i[1][1]=+j[1][1],p):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},p.constrain=function(j){return arguments.length?(n=j,p):n},p.duration=function(j){return arguments.length?(l=+j,p):l},p.interpolate=function(j){return arguments.length?(a=j,p):a},p.on=function(){var j=u.on.apply(u,arguments);return j===u?p:j},p.clickDistance=function(j){return arguments.length?(w=(j=+j)*j,p):Math.sqrt(w)},p.tapDistance=function(j){return arguments.length?(N=+j,p):N},p}const Wt={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."},js=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Nx=["Enter"," ","Escape"],kx={"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 ao;(function(e){e.Strict="strict",e.Loose="loose"})(ao||(ao={}));var rr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(rr||(rr={}));var _s;(function(e){e.Partial="partial",e.Full="full"})(_s||(_s={}));const Ex={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var En;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(En||(En={}));var Pl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Pl||(Pl={}));var K;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(K||(K={}));const lp={[K.Left]:K.Right,[K.Right]:K.Left,[K.Top]:K.Bottom,[K.Bottom]:K.Top};function bx(e){return e===null?null:e?"valid":"invalid"}const Cx=e=>"id"in e&&"source"in e&&"target"in e,Zj=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Xd=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Bs=(e,t=[0,0])=>{const{width:n,height:r}=fn(e),o=e.origin??t,s=n*o[0],i=r*o[1];return{x:e.position.x-s,y:e.position.y-i}},Jj=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const s=typeof o=="string";let i=!t.nodeLookup&&!s?o:void 0;t.nodeLookup&&(i=s?t.nodeLookup.get(o):Xd(o)?o:t.nodeLookup.get(o.id));const l=i?Ml(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return aa(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ua(n)},Hs=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=aa(n,Ml(o)),r=!0)}),r?ua(n):{x:0,y:0,width:0,height:0}},Kd=(e,t,[n,r,o]=[0,0,1],s=!1,i=!1)=>{const l={...Us(t,[n,r,o]),width:t.width/o,height:t.height/o},a=[];for(const u of e.values()){const{measured:h,selectable:f=!0,hidden:d=!1}=u;if(i&&!f||d)continue;const x=h.width??u.width??u.initialWidth??null,y=h.height??u.height??u.initialHeight??null,w=Ps(l,co(u)),N=(x??0)*(y??0),p=s&&w>0;(!u.internals.handleBounds||p||w>=N||u.dragging)&&a.push(u)}return a},e_=(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 t_(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{o.measured.width&&o.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!o.hidden)&&(!r||r.has(o.id))&&n.set(o.id,o)}),n}async function n_({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:s},i){if(e.size===0)return Promise.resolve(!0);const l=t_(e,i),a=Hs(l),u=Qd(a,t,n,(i==null?void 0:i.minZoom)??o,(i==null?void 0:i.maxZoom)??s,(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 jx({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:s}){const i=n.get(e),l=i.parentId?n.get(i.parentId):void 0,{x:a,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},h=i.origin??r;let f=i.extent||o;if(i.extent==="parent"&&!i.expandParent)if(!l)s==null||s("005",Wt.error005());else{const x=l.measured.width,y=l.measured.height;x&&y&&(f=[[a,u],[a+x,u+y]])}else l&&fo(i.extent)&&(f=[[i.extent[0][0]+a,i.extent[0][1]+u],[i.extent[1][0]+a,i.extent[1][1]+u]]);const d=fo(f)?hr(t,f,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&(s==null||s("015",Wt.error015())),{position:{x:d.x-a+(i.measured.width??0)*h[0],y:d.y-u+(i.measured.height??0)*h[1]},positionAbsolute:d}}async function r_({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){const s=new Set(e.map(d=>d.id)),i=[];for(const d of n){if(d.deletable===!1)continue;const x=s.has(d.id),y=!x&&d.parentId&&i.find(w=>w.id===d.parentId);(x||y)&&i.push(d)}const l=new Set(t.map(d=>d.id)),a=r.filter(d=>d.deletable!==!1),h=e_(i,a);for(const d of a)l.has(d.id)&&!h.find(y=>y.id===d.id)&&h.push(d);if(!o)return{edges:h,nodes:i};const f=await o({nodes:i,edges:h});return typeof f=="boolean"?f?{edges:h,nodes:i}:{edges:[],nodes:[]}:f}const uo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),hr=(e={x:0,y:0},t,n)=>({x:uo(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:uo(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function _x(e,t,n){const{width:r,height:o}=fn(n),{x:s,y:i}=n.internals.positionAbsolute;return hr(e,[[s,i],[s+r,i+o]],t)}const ap=(e,t,n)=>e<t?uo(Math.abs(e-t),1,t)/t:e>n?-uo(Math.abs(e-n),1,t)/t:0,Px=(e,t,n=15,r=40)=>{const o=ap(e.x,r,t.width-r)*n,s=ap(e.y,r,t.height-r)*n;return[o,s]},aa=(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)}),Cc=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),ua=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),co=(e,t=[0,0])=>{var o,s;const{x:n,y:r}=Xd(e)?e.internals.positionAbsolute:Bs(e,t);return{x:n,y:r,width:((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},Ml=(e,t=[0,0])=>{var o,s;const{x:n,y:r}=Xd(e)?e.internals.positionAbsolute:Bs(e,t);return{x:n,y:r,x2:n+(((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0),y2:r+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},Mx=(e,t)=>ua(aa(Cc(e),Cc(t))),Ps=(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)},up=e=>jt(e.width)&&jt(e.height)&&jt(e.x)&&jt(e.y),jt=e=>!isNaN(e)&&isFinite(e),o_=(e,t)=>{},Vs=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Us=({x:e,y:t},[n,r,o],s=!1,i=[1,1])=>{const l={x:(e-n)/o,y:(t-r)/o};return s?Vs(l,i):l},Rl=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function wr(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 s_(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=wr(e,n),o=wr(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=wr(e.top??e.y??0,n),o=wr(e.bottom??e.y??0,n),s=wr(e.left??e.x??0,t),i=wr(e.right??e.x??0,t);return{top:r,right:i,bottom:o,left:s,x:s+i,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function i_(e,t,n,r,o,s){const{x:i,y:l}=Rl(e,[t,n,r]),{x:a,y:u}=Rl({x:e.x+e.width,y:e.y+e.height},[t,n,r]),h=o-a,f=s-u;return{left:Math.floor(i),top:Math.floor(l),right:Math.floor(h),bottom:Math.floor(f)}}const Qd=(e,t,n,r,o,s)=>{const i=s_(s,t,n),l=(t-i.x)/e.width,a=(n-i.y)/e.height,u=Math.min(l,a),h=uo(u,r,o),f=e.x+e.width/2,d=e.y+e.height/2,x=t/2-f*h,y=n/2-d*h,w=i_(e,x,y,h,t,n),N={left:Math.min(w.left-i.left,0),top:Math.min(w.top-i.top,0),right:Math.min(w.right-i.right,0),bottom:Math.min(w.bottom-i.bottom,0)};return{x:x-N.left+N.right,y:y-N.top+N.bottom,zoom:h}},Ms=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function fo(e){return e!=null&&e!=="parent"}function fn(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 Rx(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 Tx(e,t={width:0,height:0},n,r,o){const s={...e},i=r.get(n);if(i){const l=i.origin||o;s.x+=i.internals.positionAbsolute.x-(t.width??0)*l[0],s.y+=i.internals.positionAbsolute.y-(t.height??0)*l[1]}return s}function cp(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function l_(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function a_(e){return{...kx,...e||{}}}function ns(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:s,y:i}=_t(e),l=Us({x:s-((o==null?void 0:o.left)??0),y:i-((o==null?void 0:o.top)??0)},r),{x:a,y:u}=n?Vs(l,t):l;return{xSnapped:a,ySnapped:u,...l}}const qd=e=>({width:e.offsetWidth,height:e.offsetHeight}),Ix=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},u_=["INPUT","SELECT","TEXTAREA"];function Lx(e){var r,o;const t=((o=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:o[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:u_.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Ax=e=>"clientX"in e,_t=(e,t)=>{var s,i;const n=Ax(e),r=n?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,o=n?e.clientY:(i=e.touches)==null?void 0:i[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},dp=(e,t,n,r,o)=>{const s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(i=>{const l=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:o,position:i.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...qd(i)}})};function zx({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:s,targetControlX:i,targetControlY:l}){const a=e*.125+o*.375+i*.375+n*.125,u=t*.125+s*.375+l*.375+r*.125,h=Math.abs(a-e),f=Math.abs(u-t);return[a,u,h,f]}function xi(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function fp({pos:e,x1:t,y1:n,x2:r,y2:o,c:s}){switch(e){case K.Left:return[t-xi(t-r,s),n];case K.Right:return[t+xi(r-t,s),n];case K.Top:return[t,n-xi(n-o,s)];case K.Bottom:return[t,n+xi(o-n,s)]}}function Dx({sourceX:e,sourceY:t,sourcePosition:n=K.Bottom,targetX:r,targetY:o,targetPosition:s=K.Top,curvature:i=.25}){const[l,a]=fp({pos:n,x1:e,y1:t,x2:r,y2:o,c:i}),[u,h]=fp({pos:s,x1:r,y1:o,x2:e,y2:t,c:i}),[f,d,x,y]=zx({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:h});return[`M${e},${t} C${l},${a} ${u},${h} ${r},${o}`,f,d,x,y]}function $x({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,s=n<e?n+o:n-o,i=Math.abs(r-t)/2,l=r<t?r+i:r-i;return[s,l,o,i]}function c_({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:s="basic"}){if(s==="manual")return r;const i=o&&n?r+1e3:r,l=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return i+l}function d_({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const s=aa(Ml(e),Ml(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const i={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return Ps(i,ua(s))>0}const f_=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,h_=(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)),p_=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||f_;let o;return Cx(e)?o={...e}:o={...e,id:r(e)},h_(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function Ox({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,s,i,l]=$x({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,s,i,l]}const hp={[K.Left]:{x:-1,y:0},[K.Right]:{x:1,y:0},[K.Top]:{x:0,y:-1},[K.Bottom]:{x:0,y:1}},m_=({source:e,sourcePosition:t=K.Bottom,target:n})=>t===K.Left||t===K.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},pp=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function g_({source:e,sourcePosition:t=K.Bottom,target:n,targetPosition:r=K.Top,center:o,offset:s,stepPosition:i}){const l=hp[t],a=hp[r],u={x:e.x+l.x*s,y:e.y+l.y*s},h={x:n.x+a.x*s,y:n.y+a.y*s},f=m_({source:u,sourcePosition:t,target:h}),d=f.x!==0?"x":"y",x=f[d];let y=[],w,N;const p={x:0,y:0},v={x:0,y:0},[,,m,S]=$x({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[d]*a[d]===-1){d==="x"?(w=o.x??u.x+(h.x-u.x)*i,N=o.y??(u.y+h.y)/2):(w=o.x??(u.x+h.x)/2,N=o.y??u.y+(h.y-u.y)*i);const E=[{x:w,y:u.y},{x:w,y:h.y}],b=[{x:u.x,y:N},{x:h.x,y:N}];l[d]===x?y=d==="x"?E:b:y=d==="x"?b:E}else{const E=[{x:u.x,y:h.y}],b=[{x:h.x,y:u.y}];if(d==="x"?y=l.x===x?b:E:y=l.y===x?E:b,t===r){const T=Math.abs(e[d]-n[d]);if(T<=s){const F=Math.min(s-1,s-T);l[d]===x?p[d]=(u[d]>e[d]?-1:1)*F:v[d]=(h[d]>n[d]?-1:1)*F}}if(t!==r){const T=d==="x"?"y":"x",F=l[d]===a[T],j=u[T]>h[T],A=u[T]<h[T];(l[d]===1&&(!F&&j||F&&A)||l[d]!==1&&(!F&&A||F&&j))&&(y=d==="x"?E:b)}const _={x:u.x+p.x,y:u.y+p.y},R={x:h.x+v.x,y:h.y+v.y},D=Math.max(Math.abs(_.x-y[0].x),Math.abs(R.x-y[0].x)),I=Math.max(Math.abs(_.y-y[0].y),Math.abs(R.y-y[0].y));D>=I?(w=(_.x+R.x)/2,N=y[0].y):(w=y[0].x,N=(_.y+R.y)/2)}return[[e,{x:u.x+p.x,y:u.y+p.y},...y,{x:h.x+v.x,y:h.y+v.y},n],w,N,m,S]}function y_(e,t,n,r){const o=Math.min(pp(e,t)/2,pp(t,n)/2,r),{x:s,y:i}=t;if(e.x===s&&s===n.x||e.y===i&&i===n.y)return`L${s} ${i}`;if(e.y===i){const u=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${s+o*u},${i}Q ${s},${i} ${s},${i+o*h}`}const l=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${s},${i+o*a}Q ${s},${i} ${s+o*l},${i}`}function jc({sourceX:e,sourceY:t,sourcePosition:n=K.Bottom,targetX:r,targetY:o,targetPosition:s=K.Top,borderRadius:i=5,centerX:l,centerY:a,offset:u=20,stepPosition:h=.5}){const[f,d,x,y,w]=g_({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:s,center:{x:l,y:a},offset:u,stepPosition:h});return[f.reduce((p,v,m)=>{let S="";return m>0&&m<f.length-1?S=y_(f[m-1],v,f[m+1],i):S=`${m===0?"M":"L"}${v.x} ${v.y}`,p+=S,p},""),d,x,y,w]}function mp(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function x_(e){var f;const{sourceNode:t,targetNode:n}=e;if(!mp(t)||!mp(n))return null;const r=t.internals.handleBounds||gp(t.handles),o=n.internals.handleBounds||gp(n.handles),s=yp((r==null?void 0:r.source)??[],e.sourceHandle),i=yp(e.connectionMode===ao.Strict?(o==null?void 0:o.target)??[]:((o==null?void 0:o.target)??[]).concat((o==null?void 0:o.source)??[]),e.targetHandle);if(!s||!i)return(f=e.onError)==null||f.call(e,"008",Wt.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(s==null?void 0:s.position)||K.Bottom,a=(i==null?void 0:i.position)||K.Top,u=pr(t,s,l),h=pr(n,i,a);return{sourceX:u.x,sourceY:u.y,targetX:h.x,targetY:h.y,sourcePosition:l,targetPosition:a}}function gp(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 pr(e,t,n=K.Left,r=!1){const o=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,s=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:i,height:l}=t??fn(e);if(r)return{x:o+i/2,y:s+l/2};switch((t==null?void 0:t.position)??n){case K.Top:return{x:o+i/2,y:s};case K.Right:return{x:o+i,y:s+l/2};case K.Bottom:return{x:o+i/2,y:s+l};case K.Left:return{x:o,y:s+l/2}}}function yp(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function _c(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function v_(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){const s=new Set;return e.reduce((i,l)=>([l.markerStart||r,l.markerEnd||o].forEach(a=>{if(a&&typeof a=="object"){const u=_c(a,t);s.has(u)||(i.push({id:u,color:a.color||n,...a}),s.add(u))}}),i),[]).sort((i,l)=>i.id.localeCompare(l.id))}const Fx=1e3,w_=10,Zd={nodeOrigin:[0,0],nodeExtent:js,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},S_={...Zd,checkEquality:!0};function Jd(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function N_(e,t,n){const r=Jd(Zd,n);for(const o of e.values())if(o.parentId)tf(o,e,t,r);else{const s=Bs(o,r.nodeOrigin),i=fo(o.extent)?o.extent:r.nodeExtent,l=hr(s,i,fn(o));o.internals.positionAbsolute=l}}function k_(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const o of e.handles){const s={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?n.push(s):o.type==="target"&&r.push(s)}return{source:n,target:r}}function ef(e){return e==="manual"}function Pc(e,t,n,r={}){var u,h;const o=Jd(S_,r),s={i:0},i=new Map(t),l=o!=null&&o.elevateNodesOnSelect&&!ef(o.zIndexMode)?Fx:0;let a=e.length>0;t.clear(),n.clear();for(const f of e){let d=i.get(f.id);if(o.checkEquality&&f===(d==null?void 0:d.internals.userNode))t.set(f.id,d);else{const x=Bs(f,o.nodeOrigin),y=fo(f.extent)?f.extent:o.nodeExtent,w=hr(x,y,fn(f));d={...o.defaults,...f,measured:{width:(u=f.measured)==null?void 0:u.width,height:(h=f.measured)==null?void 0:h.height},internals:{positionAbsolute:w,handleBounds:k_(f,d),z:Bx(f,l,o.zIndexMode),userNode:f}},t.set(f.id,d)}(d.measured===void 0||d.measured.width===void 0||d.measured.height===void 0)&&!d.hidden&&(a=!1),f.parentId&&tf(d,t,n,r,s)}return a}function E_(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 tf(e,t,n,r,o){const{elevateNodesOnSelect:s,nodeOrigin:i,nodeExtent:l,zIndexMode:a}=Jd(Zd,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}E_(e,n),o&&!h.parentId&&h.internals.rootParentIndex===void 0&&a==="auto"&&(h.internals.rootParentIndex=++o.i,h.internals.z=h.internals.z+o.i*w_),o&&h.internals.rootParentIndex!==void 0&&(o.i=h.internals.rootParentIndex);const f=s&&!ef(a)?Fx:0,{x:d,y:x,z:y}=b_(e,h,i,l,f,a),{positionAbsolute:w}=e.internals,N=d!==w.x||x!==w.y;(N||y!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:N?{x:d,y:x}:w,z:y}})}function Bx(e,t,n){const r=jt(e.zIndex)?e.zIndex:0;return ef(n)?r:r+(e.selected?t:0)}function b_(e,t,n,r,o,s){const{x:i,y:l}=t.internals.positionAbsolute,a=fn(e),u=Bs(e,n),h=fo(e.extent)?hr(u,e.extent,a):u;let f=hr({x:i+h.x,y:l+h.y},r,a);e.extent==="parent"&&(f=_x(f,a,t));const d=Bx(e,o,s),x=t.internals.z??0;return{x:f.x,y:f.y,z:x>=d?x+1:d}}function nf(e,t,n,r=[0,0]){var i;const o=[],s=new Map;for(const l of e){const a=t.get(l.parentId);if(!a)continue;const u=((i=s.get(l.parentId))==null?void 0:i.expandedRect)??co(a),h=Mx(u,l.rect);s.set(l.parentId,{expandedRect:h,parent:a})}return s.size>0&&s.forEach(({expandedRect:l,parent:a},u)=>{var m;const h=a.internals.positionAbsolute,f=fn(a),d=a.origin??r,x=l.x<h.x?Math.round(Math.abs(h.x-l.x)):0,y=l.y<h.y?Math.round(Math.abs(h.y-l.y)):0,w=Math.max(f.width,Math.round(l.width)),N=Math.max(f.height,Math.round(l.height)),p=(w-f.width)*d[0],v=(N-f.height)*d[1];(x>0||y>0||p||v)&&(o.push({id:u,type:"position",position:{x:a.position.x-x+p,y:a.position.y-y+v}}),(m=n.get(u))==null||m.forEach(S=>{e.some(k=>k.id===S.id)||o.push({id:S.id,type:"position",position:{x:S.position.x+x,y:S.position.y+y}})})),(f.width<l.width||f.height<l.height||x||y)&&o.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:w+(x?d[0]*x-p:0),height:N+(y?d[1]*y-v:0)}})}),o}function C_(e,t,n,r,o,s,i){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let a=!1;if(!l)return{changes:[],updatedInternals:a};const u=[],h=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(h.transform),d=[];for(const x of e.values()){const y=t.get(x.id);if(!y)continue;if(y.hidden){t.set(y.id,{...y,internals:{...y.internals,handleBounds:void 0}}),a=!0;continue}const w=qd(x.nodeElement),N=y.measured.width!==w.width||y.measured.height!==w.height;if(!!(w.width&&w.height&&(N||!y.internals.handleBounds||x.force))){const v=x.nodeElement.getBoundingClientRect(),m=fo(y.extent)?y.extent:s;let{positionAbsolute:S}=y.internals;y.parentId&&y.extent==="parent"?S=_x(S,w,t.get(y.parentId)):m&&(S=hr(S,m,w));const k={...y,measured:w,internals:{...y.internals,positionAbsolute:S,handleBounds:{source:dp("source",x.nodeElement,v,f,y.id),target:dp("target",x.nodeElement,v,f,y.id)}}};t.set(y.id,k),y.parentId&&tf(k,t,n,{nodeOrigin:o,zIndexMode:i}),a=!0,N&&(u.push({id:y.id,type:"dimensions",dimensions:w}),y.expandParent&&y.parentId&&d.push({id:y.id,parentId:y.parentId,rect:co(k,o)}))}}if(d.length>0){const x=nf(d,t,n,o);u.push(...x)}return{changes:u,updatedInternals:a}}async function j_({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:s}){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],[o,s]],r),l=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(l)}function xp(e,t,n,r,o,s){let i=o;const l=r.get(i)||new Map;r.set(i,l.set(n,t)),i=`${o}-${e}`;const a=r.get(i)||new Map;if(r.set(i,a.set(n,t)),s){i=`${o}-${e}-${s}`;const u=r.get(i)||new Map;r.set(i,u.set(n,t))}}function Hx(e,t,n){e.clear(),t.clear();for(const r of n){const{source:o,target:s,sourceHandle:i=null,targetHandle:l=null}=r,a={edgeId:r.id,source:o,target:s,sourceHandle:i,targetHandle:l},u=`${o}-${i}--${s}-${l}`,h=`${s}-${l}--${o}-${i}`;xp("source",a,h,e,o,i),xp("target",a,u,e,s,l),t.set(r.id,r)}}function Vx(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Vx(n,t):!1}function vp(e,t,n){var o;let r=e;do{if((o=r==null?void 0:r.matches)!=null&&o.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function __(e,t,n,r){const o=new Map;for(const[s,i]of e)if((i.selected||i.id===r)&&(!i.parentId||!Vx(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){const l=e.get(s);l&&o.set(s,{id:s,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 o}function ou({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var i,l,a;const o=[];for(const[u,h]of t){const f=(i=n.get(u))==null?void 0:i.internals.userNode;f&&o.push({...f,position:h.position,dragging:r})}if(!e)return[o[0],o];const s=(l=n.get(e))==null?void 0:l.internals.userNode;return[s?{...s,position:((a=t.get(e))==null?void 0:a.position)||s.position,dragging:r}:o[0],o]}function P_({dragItems:e,snapGrid:t,x:n,y:r}){const o=e.values().next().value;if(!o)return null;const s={x:n-o.distance.x,y:r-o.distance.y},i=Vs(s,t);return{x:i.x-s.x,y:i.y-s.y}}function M_({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let s={x:null,y:null},i=0,l=new Map,a=!1,u={x:0,y:0},h=null,f=!1,d=null,x=!1,y=!1,w=null;function N({noDragClassName:v,handleSelector:m,domNode:S,isSelectable:k,nodeId:E,nodeClickDistance:b=0}){d=it(S);function _({x:T,y:F}){const{nodeLookup:j,nodeExtent:A,snapGrid:M,snapToGrid:z,nodeOrigin:C,onNodeDrag:P,onSelectionDrag:L,onError:O,updateNodePositions:$}=t();s={x:T,y:F};let U=!1;const V=l.size>1,Y=V&&A?Cc(Hs(l)):null,G=V&&z?P_({dragItems:l,snapGrid:M,x:T,y:F}):null;for(const[X,H]of l){if(!j.has(X))continue;let Q={x:T-H.distance.x,y:F-H.distance.y};z&&(Q=G?{x:Math.round(Q.x+G.x),y:Math.round(Q.y+G.y)}:Vs(Q,M));let ne=null;if(V&&A&&!H.extent&&Y){const{positionAbsolute:q}=H.internals,le=q.x-Y.x+A[0][0],de=q.x+H.measured.width-Y.x2+A[1][0],ie=q.y-Y.y+A[0][1],$e=q.y+H.measured.height-Y.y2+A[1][1];ne=[[le,ie],[de,$e]]}const{position:J,positionAbsolute:Z}=jx({nodeId:X,nextPosition:Q,nodeLookup:j,nodeExtent:ne||A,nodeOrigin:C,onError:O});U=U||H.position.x!==J.x||H.position.y!==J.y,H.position=J,H.internals.positionAbsolute=Z}if(y=y||U,!!U&&($(l,!0),w&&(r||P||!E&&L))){const[X,H]=ou({nodeId:E,dragItems:l,nodeLookup:j});r==null||r(w,l,X,H),P==null||P(w,X,H),E||L==null||L(w,H)}}async function R(){if(!h)return;const{transform:T,panBy:F,autoPanSpeed:j,autoPanOnNodeDrag:A}=t();if(!A){a=!1,cancelAnimationFrame(i);return}const[M,z]=Px(u,h,j);(M!==0||z!==0)&&(s.x=(s.x??0)-M/T[2],s.y=(s.y??0)-z/T[2],await F({x:M,y:z})&&_(s)),i=requestAnimationFrame(R)}function D(T){var V;const{nodeLookup:F,multiSelectionActive:j,nodesDraggable:A,transform:M,snapGrid:z,snapToGrid:C,selectNodesOnDrag:P,onNodeDragStart:L,onSelectionDragStart:O,unselectNodesAndEdges:$}=t();f=!0,(!P||!k)&&!j&&E&&((V=F.get(E))!=null&&V.selected||$()),k&&P&&E&&(e==null||e(E));const U=ns(T.sourceEvent,{transform:M,snapGrid:z,snapToGrid:C,containerBounds:h});if(s=U,l=__(F,A,U,E),l.size>0&&(n||L||!E&&O)){const[Y,G]=ou({nodeId:E,dragItems:l,nodeLookup:F});n==null||n(T.sourceEvent,l,Y,G),L==null||L(T.sourceEvent,Y,G),E||O==null||O(T.sourceEvent,G)}}const I=ix().clickDistance(b).on("start",T=>{const{domNode:F,nodeDragThreshold:j,transform:A,snapGrid:M,snapToGrid:z}=t();h=(F==null?void 0:F.getBoundingClientRect())||null,x=!1,y=!1,w=T.sourceEvent,j===0&&D(T),s=ns(T.sourceEvent,{transform:A,snapGrid:M,snapToGrid:z,containerBounds:h}),u=_t(T.sourceEvent,h)}).on("drag",T=>{const{autoPanOnNodeDrag:F,transform:j,snapGrid:A,snapToGrid:M,nodeDragThreshold:z,nodeLookup:C}=t(),P=ns(T.sourceEvent,{transform:j,snapGrid:A,snapToGrid:M,containerBounds:h});if(w=T.sourceEvent,(T.sourceEvent.type==="touchmove"&&T.sourceEvent.touches.length>1||E&&!C.has(E))&&(x=!0),!x){if(!a&&F&&f&&(a=!0,R()),!f){const L=_t(T.sourceEvent,h),O=L.x-u.x,$=L.y-u.y;Math.sqrt(O*O+$*$)>z&&D(T)}(s.x!==P.xSnapped||s.y!==P.ySnapped)&&l&&f&&(u=_t(T.sourceEvent,h),_(P))}}).on("end",T=>{if(!(!f||x)&&(a=!1,f=!1,cancelAnimationFrame(i),l.size>0)){const{nodeLookup:F,updateNodePositions:j,onNodeDragStop:A,onSelectionDragStop:M}=t();if(y&&(j(l,!1),y=!1),o||A||!E&&M){const[z,C]=ou({nodeId:E,dragItems:l,nodeLookup:F,dragging:!1});o==null||o(T.sourceEvent,l,z,C),A==null||A(T.sourceEvent,z,C),E||M==null||M(T.sourceEvent,C)}}}).filter(T=>{const F=T.target;return!T.button&&(!v||!vp(F,`.${v}`,S))&&(!m||vp(F,m,S))});d.call(I)}function p(){d==null||d.on(".drag",null)}return{update:N,destroy:p}}function R_(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())Ps(o,co(s))>0&&r.push(s);return r}const T_=250;function I_(e,t,n,r){var l,a;let o=[],s=1/0;const i=R_(e,n,t+T_);for(const u of i){const h=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((a=u.internals.handleBounds)==null?void 0:a.target)??[]];for(const f of h){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:d,y:x}=pr(u,f,f.position,!0),y=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(x-e.y,2));y>t||(y<s?(o=[{...f,x:d,y:x}],s=y):y===s&&o.push({...f,x:d,y:x}))}}if(!o.length)return null;if(o.length>1){const u=r.type==="source"?"target":"source";return o.find(h=>h.type===u)??o[0]}return o[0]}function Ux(e,t,n,r,o,s=!1){var u,h,f;const i=r.get(e);if(!i)return null;const l=o==="strict"?(u=i.internals.handleBounds)==null?void 0:u[t]:[...((h=i.internals.handleBounds)==null?void 0:h.source)??[],...((f=i.internals.handleBounds)==null?void 0:f.target)??[]],a=(n?l==null?void 0:l.find(d=>d.id===n):l==null?void 0:l[0])??null;return a&&s?{...a,...pr(i,a,a.position,!0)}:a}function Wx(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function L_(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Yx=()=>!0;function A_(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:s,isTarget:i,domNode:l,nodeLookup:a,lib:u,autoPanOnConnect:h,flowId:f,panBy:d,cancelConnection:x,onConnectStart:y,onConnect:w,onConnectEnd:N,isValidConnection:p=Yx,onReconnectEnd:v,updateConnection:m,getTransform:S,getFromHandle:k,autoPanSpeed:E,dragThreshold:b=1,handleDomNode:_}){const R=Ix(e.target);let D=0,I;const{x:T,y:F}=_t(e),j=Wx(s,_),A=l==null?void 0:l.getBoundingClientRect();let M=!1;if(!A||!j)return;const z=Ux(o,j,r,a,t);if(!z)return;let C=_t(e,A),P=!1,L=null,O=!1,$=null;function U(){if(!h||!A)return;const[J,Z]=Px(C,A,E);d({x:J,y:Z}),D=requestAnimationFrame(U)}const V={...z,nodeId:o,type:j,position:z.position},Y=a.get(o);let X={inProgress:!0,isValid:null,from:pr(Y,V,K.Left,!0),fromHandle:V,fromPosition:V.position,fromNode:Y,to:C,toHandle:null,toPosition:lp[V.position],toNode:null,pointer:C};function H(){M=!0,m(X),y==null||y(e,{nodeId:o,handleId:r,handleType:j})}b===0&&H();function Q(J){if(!M){const{x:$e,y:hn}=_t(J),Xt=$e-T,Un=hn-F;if(!(Xt*Xt+Un*Un>b*b))return;H()}if(!k()||!V){ne(J);return}const Z=S();C=_t(J,A),I=I_(Us(C,Z,!1,[1,1]),n,a,V),P||(U(),P=!0);const q=Gx(J,{handle:I,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:i?"target":"source",isValidConnection:p,doc:R,lib:u,flowId:f,nodeLookup:a});$=q.handleDomNode,L=q.connection,O=L_(!!I,q.isValid);const le=a.get(o),de=le?pr(le,V,K.Left,!0):X.from,ie={...X,from:de,isValid:O,to:q.toHandle&&O?Rl({x:q.toHandle.x,y:q.toHandle.y},Z):C,toHandle:q.toHandle,toPosition:O&&q.toHandle?q.toHandle.position:lp[V.position],toNode:q.toHandle?a.get(q.toHandle.nodeId):null,pointer:C};m(ie),X=ie}function ne(J){if(!("touches"in J&&J.touches.length>0)){if(M){(I||$)&&L&&O&&(w==null||w(L));const{inProgress:Z,...q}=X,le={...q,toPosition:X.toHandle?X.toPosition:null};N==null||N(J,le),s&&(v==null||v(J,le))}x(),cancelAnimationFrame(D),P=!1,O=!1,L=null,$=null,R.removeEventListener("mousemove",Q),R.removeEventListener("mouseup",ne),R.removeEventListener("touchmove",Q),R.removeEventListener("touchend",ne)}}R.addEventListener("mousemove",Q),R.addEventListener("mouseup",ne),R.addEventListener("touchmove",Q),R.addEventListener("touchend",ne)}function Gx(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:s,doc:i,lib:l,flowId:a,isValidConnection:u=Yx,nodeLookup:h}){const f=s==="target",d=t?i.querySelector(`.${l}-flow__handle[data-id="${a}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x,y}=_t(e),w=i.elementFromPoint(x,y),N=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:d,p={handleDomNode:N,isValid:!1,connection:null,toHandle:null};if(N){const v=Wx(void 0,N),m=N.getAttribute("data-nodeid"),S=N.getAttribute("data-handleid"),k=N.classList.contains("connectable"),E=N.classList.contains("connectableend");if(!m||!v)return p;const b={source:f?m:r,sourceHandle:f?S:o,target:f?r:m,targetHandle:f?o:S};p.connection=b;const R=k&&E&&(n===ao.Strict?f&&v==="source"||!f&&v==="target":m!==r||S!==o);p.isValid=R&&u(b),p.toHandle=Ux(m,v,S,h,n,!0)}return p}const Mc={onPointerDown:A_,isValid:Gx};function z_({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=it(e);function s({translateExtent:l,width:a,height:u,zoomStep:h=1,pannable:f=!0,zoomable:d=!0,inversePan:x=!1}){const y=m=>{if(m.sourceEvent.type!=="wheel"||!t)return;const S=n(),k=m.sourceEvent.ctrlKey&&Ms()?10:1,E=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*h,b=S[2]*Math.pow(2,E*k);t.scaleTo(b)};let w=[0,0];const N=m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(w=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},p=m=>{const S=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;const k=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],E=[k[0]-w[0],k[1]-w[1]];w=k;const b=r()*Math.max(S[2],Math.log(S[2]))*(x?-1:1),_={x:S[0]-E[0]*b,y:S[1]-E[1]*b},R=[[0,0],[a,u]];t.setViewportConstrained({x:_.x,y:_.y,zoom:S[2]},R,l)},v=Sx().on("start",N).on("zoom",f?p:null).on("zoom.wheel",d?y:null);o.call(v,{})}function i(){o.on("zoom",null)}return{update:s,destroy:i,pointer:Et}}const ca=e=>({x:e.x,y:e.y,zoom:e.k}),su=({x:e,y:t,zoom:n})=>la.translate(e,t).scale(n),zr=(e,t)=>e.target.closest(`.${t}`),Xx=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),D_=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,iu=(e,t=0,n=D_,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},Kx=e=>{const t=e.ctrlKey&&Ms()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function $_({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:s,zoomOnPinch:i,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:u}){return h=>{if(zr(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(h.ctrlKey&&i){const N=Et(h),p=Kx(h),v=f*Math.pow(2,p);r.scaleTo(n,v,N,h);return}const d=h.deltaMode===1?20:1;let x=o===rr.Vertical?0:h.deltaX*d,y=o===rr.Horizontal?0:h.deltaY*d;!Ms()&&h.shiftKey&&o!==rr.Vertical&&(x=h.deltaY*d,y=0),r.translateBy(n,-(x/f)*s,-(y/f)*s,{internal:!0});const w=ca(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(a==null||a(h,w),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(h,w))}}function O_({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const s=r.type==="wheel",i=!t&&s&&!r.ctrlKey,l=zr(r,e);if(r.ctrlKey&&s&&l&&r.preventDefault(),i||l)return null;r.preventDefault(),n.call(this,r,o)}}function F_({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var s,i,l;if((s=r.sourceEvent)!=null&&s.internal)return;const o=ca(r.transform);e.mouseButton=((i=r.sourceEvent)==null?void 0:i.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=o,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,o))}}function B_({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return s=>{var i,l;e.usedRightMouseButton=!!(n&&Xx(t,e.mouseButton??0)),(i=s.sourceEvent)!=null&&i.sync||r([s.transform.x,s.transform.y,s.transform.k]),o&&!((l=s.sourceEvent)!=null&&l.internal)&&(o==null||o(s.sourceEvent,ca(s.transform)))}}function H_({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:s}){return i=>{var l;if(!((l=i.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,s&&Xx(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&s(i.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const a=ca(i.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(i.sourceEvent,a)},n?150:0)}}}function V_({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:s,userSelectionActive:i,noWheelClassName:l,noPanClassName:a,lib:u,connectionInProgress:h}){return f=>{var N;const d=e||t,x=n&&f.ctrlKey,y=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(zr(f,`${u}-flow__node`)||zr(f,`${u}-flow__edge`)))return!0;if(!r&&!d&&!o&&!s&&!n||i||h&&!y||zr(f,l)&&y||zr(f,a)&&(!y||o&&y&&!e)||!n&&f.ctrlKey&&y)return!1;if(!n&&f.type==="touchstart"&&((N=f.touches)==null?void 0:N.length)>1)return f.preventDefault(),!1;if(!d&&!o&&!x&&y||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||y)&&w}}function U_({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:s,onPanZoomStart:i,onPanZoomEnd:l,onDraggingChange:a}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),f=Sx().scaleExtent([t,n]).translateExtent(r),d=it(e).call(f);v({x:o.x,y:o.y,zoom:uo(o.zoom,t,n)},[[0,0],[h.width,h.height]],r);const x=d.on("wheel.zoom"),y=d.on("dblclick.zoom");f.wheelDelta(Kx);function w(I,T){return d?new Promise(F=>{f==null||f.interpolate((T==null?void 0:T.interpolate)==="linear"?ts:Vi).transform(iu(d,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>F(!0)),I)}):Promise.resolve(!1)}function N({noWheelClassName:I,noPanClassName:T,onPaneContextMenu:F,userSelectionActive:j,panOnScroll:A,panOnDrag:M,panOnScrollMode:z,panOnScrollSpeed:C,preventScrolling:P,zoomOnPinch:L,zoomOnScroll:O,zoomOnDoubleClick:$,zoomActivationKeyPressed:U,lib:V,onTransformChange:Y,connectionInProgress:G,paneClickDistance:X,selectionOnDrag:H}){j&&!u.isZoomingOrPanning&&p();const Q=A&&!U&&!j;f.clickDistance(H?1/0:!jt(X)||X<0?0:X);const ne=Q?$_({zoomPanValues:u,noWheelClassName:I,d3Selection:d,d3Zoom:f,panOnScrollMode:z,panOnScrollSpeed:C,zoomOnPinch:L,onPanZoomStart:i,onPanZoom:s,onPanZoomEnd:l}):O_({noWheelClassName:I,preventScrolling:P,d3ZoomHandler:x});if(d.on("wheel.zoom",ne,{passive:!1}),!j){const Z=F_({zoomPanValues:u,onDraggingChange:a,onPanZoomStart:i});f.on("start",Z);const q=B_({zoomPanValues:u,panOnDrag:M,onPaneContextMenu:!!F,onPanZoom:s,onTransformChange:Y});f.on("zoom",q);const le=H_({zoomPanValues:u,panOnDrag:M,panOnScroll:A,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:a});f.on("end",le)}const J=V_({zoomActivationKeyPressed:U,panOnDrag:M,zoomOnScroll:O,panOnScroll:A,zoomOnDoubleClick:$,zoomOnPinch:L,userSelectionActive:j,noPanClassName:T,noWheelClassName:I,lib:V,connectionInProgress:G});f.filter(J),$?d.on("dblclick.zoom",y):d.on("dblclick.zoom",null)}function p(){f.on("zoom",null)}async function v(I,T,F){const j=su(I),A=f==null?void 0:f.constrain()(j,T,F);return A&&await w(A),new Promise(M=>M(A))}async function m(I,T){const F=su(I);return await w(F,T),new Promise(j=>j(F))}function S(I){if(d){const T=su(I),F=d.property("__zoom");(F.k!==I.zoom||F.x!==I.x||F.y!==I.y)&&(f==null||f.transform(d,T,null,{sync:!0}))}}function k(){const I=d?wx(d.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}function E(I,T){return d?new Promise(F=>{f==null||f.interpolate((T==null?void 0:T.interpolate)==="linear"?ts:Vi).scaleTo(iu(d,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>F(!0)),I)}):Promise.resolve(!1)}function b(I,T){return d?new Promise(F=>{f==null||f.interpolate((T==null?void 0:T.interpolate)==="linear"?ts:Vi).scaleBy(iu(d,T==null?void 0:T.duration,T==null?void 0:T.ease,()=>F(!0)),I)}):Promise.resolve(!1)}function _(I){f==null||f.scaleExtent(I)}function R(I){f==null||f.translateExtent(I)}function D(I){const T=!jt(I)||I<0?0:I;f==null||f.clickDistance(T)}return{update:N,destroy:p,setViewport:m,setViewportConstrained:v,getViewport:k,scaleTo:E,scaleBy:b,setScaleExtent:_,setTranslateExtent:R,syncViewport:S,setClickDistance:D}}var ho;(function(e){e.Line="line",e.Handle="handle"})(ho||(ho={}));function W_({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:o,affectsY:s}){const i=e-t,l=n-r,a=[i>0?1:i<0?-1:0,l>0?1:l<0?-1:0];return i&&o&&(a[0]=a[0]*-1),l&&s&&(a[1]=a[1]*-1),a}function wp(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:o}}function yn(e,t){return Math.max(0,t-e)}function xn(e,t){return Math.max(0,e-t)}function vi(e,t,n){return Math.max(0,t-e,e-n)}function Sp(e,t){return e?!t:t}function Y_(e,t,n,r,o,s,i,l){let{affectsX:a,affectsY:u}=t;const{isHorizontal:h,isVertical:f}=t,d=h&&f,{xSnapped:x,ySnapped:y}=n,{minWidth:w,maxWidth:N,minHeight:p,maxHeight:v}=r,{x:m,y:S,width:k,height:E,aspectRatio:b}=e;let _=Math.floor(h?x-e.pointerX:0),R=Math.floor(f?y-e.pointerY:0);const D=k+(a?-_:_),I=E+(u?-R:R),T=-s[0]*k,F=-s[1]*E;let j=vi(D,w,N),A=vi(I,p,v);if(i){let C=0,P=0;a&&_<0?C=yn(m+_+T,i[0][0]):!a&&_>0&&(C=xn(m+D+T,i[1][0])),u&&R<0?P=yn(S+R+F,i[0][1]):!u&&R>0&&(P=xn(S+I+F,i[1][1])),j=Math.max(j,C),A=Math.max(A,P)}if(l){let C=0,P=0;a&&_>0?C=xn(m+_,l[0][0]):!a&&_<0&&(C=yn(m+D,l[1][0])),u&&R>0?P=xn(S+R,l[0][1]):!u&&R<0&&(P=yn(S+I,l[1][1])),j=Math.max(j,C),A=Math.max(A,P)}if(o){if(h){const C=vi(D/b,p,v)*b;if(j=Math.max(j,C),i){let P=0;!a&&!u||a&&!u&&d?P=xn(S+F+D/b,i[1][1])*b:P=yn(S+F+(a?_:-_)/b,i[0][1])*b,j=Math.max(j,P)}if(l){let P=0;!a&&!u||a&&!u&&d?P=yn(S+D/b,l[1][1])*b:P=xn(S+(a?_:-_)/b,l[0][1])*b,j=Math.max(j,P)}}if(f){const C=vi(I*b,w,N)/b;if(A=Math.max(A,C),i){let P=0;!a&&!u||u&&!a&&d?P=xn(m+I*b+T,i[1][0])/b:P=yn(m+(u?R:-R)*b+T,i[0][0])/b,A=Math.max(A,P)}if(l){let P=0;!a&&!u||u&&!a&&d?P=yn(m+I*b,l[1][0])/b:P=xn(m+(u?R:-R)*b,l[0][0])/b,A=Math.max(A,P)}}}R=R+(R<0?A:-A),_=_+(_<0?j:-j),o&&(d?D>I*b?R=(Sp(a,u)?-_:_)/b:_=(Sp(a,u)?-R:R)*b:h?(R=_/b,u=a):(_=R*b,a=u));const M=a?m+_:m,z=u?S+R:S;return{width:k+(a?-_:_),height:E+(u?-R:R),x:s[0]*_*(a?-1:1)+M,y:s[1]*R*(u?-1:1)+z}}const Qx={width:0,height:0,x:0,y:0},G_={...Qx,pointerX:0,pointerY:0,aspectRatio:1};function X_(e){return[[0,0],[e.measured.width,e.measured.height]]}function K_(e,t,n){const r=t.position.x+e.position.x,o=t.position.y+e.position.y,s=e.measured.width??0,i=e.measured.height??0,l=n[0]*s,a=n[1]*i;return[[r-l,o-a],[r+s-l,o+i-a]]}function Q_({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const s=it(e);let i={controlDirection:wp("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:f,resizeDirection:d,onResizeStart:x,onResize:y,onResizeEnd:w,shouldResize:N}){let p={...Qx},v={...G_};i={boundaries:h,resizeDirection:d,keepAspectRatio:f,controlDirection:wp(u)};let m,S=null,k=[],E,b,_,R=!1;const D=ix().on("start",I=>{const{nodeLookup:T,transform:F,snapGrid:j,snapToGrid:A,nodeOrigin:M,paneDomNode:z}=n();if(m=T.get(t),!m)return;S=(z==null?void 0:z.getBoundingClientRect())??null;const{xSnapped:C,ySnapped:P}=ns(I.sourceEvent,{transform:F,snapGrid:j,snapToGrid:A,containerBounds:S});p={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},v={...p,pointerX:C,pointerY:P,aspectRatio:p.width/p.height},E=void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(E=T.get(m.parentId),b=E&&m.extent==="parent"?X_(E):void 0),k=[],_=void 0;for(const[L,O]of T)if(O.parentId===t&&(k.push({id:L,position:{...O.position},extent:O.extent}),O.extent==="parent"||O.expandParent)){const $=K_(O,m,O.origin??M);_?_=[[Math.min($[0][0],_[0][0]),Math.min($[0][1],_[0][1])],[Math.max($[1][0],_[1][0]),Math.max($[1][1],_[1][1])]]:_=$}x==null||x(I,{...p})}).on("drag",I=>{const{transform:T,snapGrid:F,snapToGrid:j,nodeOrigin:A}=n(),M=ns(I.sourceEvent,{transform:T,snapGrid:F,snapToGrid:j,containerBounds:S}),z=[];if(!m)return;const{x:C,y:P,width:L,height:O}=p,$={},U=m.origin??A,{width:V,height:Y,x:G,y:X}=Y_(v,i.controlDirection,M,i.boundaries,i.keepAspectRatio,U,b,_),H=V!==L,Q=Y!==O,ne=G!==C&&H,J=X!==P&&Q;if(!ne&&!J&&!H&&!Q)return;if((ne||J||U[0]===1||U[1]===1)&&($.x=ne?G:p.x,$.y=J?X:p.y,p.x=$.x,p.y=$.y,k.length>0)){const de=G-C,ie=X-P;for(const $e of k)$e.position={x:$e.position.x-de+U[0]*(V-L),y:$e.position.y-ie+U[1]*(Y-O)},z.push($e)}if((H||Q)&&($.width=H&&(!i.resizeDirection||i.resizeDirection==="horizontal")?V:p.width,$.height=Q&&(!i.resizeDirection||i.resizeDirection==="vertical")?Y:p.height,p.width=$.width,p.height=$.height),E&&m.expandParent){const de=U[0]*($.width??0);$.x&&$.x<de&&(p.x=de,v.x=v.x-($.x-de));const ie=U[1]*($.height??0);$.y&&$.y<ie&&(p.y=ie,v.y=v.y-($.y-ie))}const Z=W_({width:p.width,prevWidth:L,height:p.height,prevHeight:O,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),q={...p,direction:Z};(N==null?void 0:N(I,q))!==!1&&(R=!0,y==null||y(I,q),r($,z))}).on("end",I=>{R&&(w==null||w(I,{...p}),o==null||o({...p}),R=!1)});s.call(D)}function a(){s.on(".drag",null)}return{update:l,destroy:a}}var qx={exports:{}},Zx={},Jx={exports:{}},e0={};/**
|
|
272
|
+
* @license React
|
|
273
|
+
* use-sync-external-store-shim.production.js
|
|
274
|
+
*
|
|
275
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the MIT license found in the
|
|
278
|
+
* LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/var po=g;function q_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Z_=typeof Object.is=="function"?Object.is:q_,J_=po.useState,eP=po.useEffect,tP=po.useLayoutEffect,nP=po.useDebugValue;function rP(e,t){var n=t(),r=J_({inst:{value:n,getSnapshot:t}}),o=r[0].inst,s=r[1];return tP(function(){o.value=n,o.getSnapshot=t,lu(o)&&s({inst:o})},[e,n,t]),eP(function(){return lu(o)&&s({inst:o}),e(function(){lu(o)&&s({inst:o})})},[e]),nP(n),n}function lu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Z_(e,n)}catch{return!0}}function oP(e,t){return t()}var sP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oP:rP;e0.useSyncExternalStore=po.useSyncExternalStore!==void 0?po.useSyncExternalStore:sP;Jx.exports=e0;var iP=Jx.exports;/**
|
|
280
|
+
* @license React
|
|
281
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
282
|
+
*
|
|
283
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
284
|
+
*
|
|
285
|
+
* This source code is licensed under the MIT license found in the
|
|
286
|
+
* LICENSE file in the root directory of this source tree.
|
|
287
|
+
*/var da=g,lP=iP;function aP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var uP=typeof Object.is=="function"?Object.is:aP,cP=lP.useSyncExternalStore,dP=da.useRef,fP=da.useEffect,hP=da.useMemo,pP=da.useDebugValue;Zx.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=dP(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=hP(function(){function a(x){if(!u){if(u=!0,h=x,x=r(x),o!==void 0&&i.hasValue){var y=i.value;if(o(y,x))return f=y}return f=x}if(y=f,uP(h,x))return y;var w=r(x);return o!==void 0&&o(y,w)?(h=x,y):(h=x,f=w)}var u=!1,h,f,d=n===void 0?null:n;return[function(){return a(t())},d===null?void 0:function(){return a(d())}]},[t,n,r,o]);var l=cP(e,s[0],s[1]);return fP(function(){i.hasValue=!0,i.value=l},[l]),pP(l),l};qx.exports=Zx;var mP=qx.exports;const gP=Ac(mP),yP={},Np=e=>{let t;const n=new Set,r=(h,f)=>{const d=typeof h=="function"?h(t):h;if(!Object.is(d,t)){const x=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(y=>y(t,x))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>u,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(yP?"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,o,a);return a},xP=e=>e?Np(e):Np,{useDebugValue:vP}=Dt,{useSyncExternalStoreWithSelector:wP}=gP,SP=e=>e;function t0(e,t=SP,n){const r=wP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return vP(r),r}const kp=(e,t)=>{const n=xP(e),r=(o,s=t)=>t0(n,o,s);return Object.assign(r,n),r},NP=(e,t)=>e?kp(e,t):kp;function ye(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,o]of e)if(!Object.is(o,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 fa=g.createContext(null),kP=fa.Provider,n0=Wt.error001();function oe(e,t){const n=g.useContext(fa);if(n===null)throw new Error(n0);return t0(n,e,t)}function xe(){const e=g.useContext(fa);if(e===null)throw new Error(n0);return g.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Ep={display:"none"},EP={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},r0="react-flow__node-desc",o0="react-flow__edge-desc",bP="react-flow__aria-live",CP=e=>e.ariaLiveMessage,jP=e=>e.ariaLabelConfig;function _P({rfId:e}){const t=oe(CP);return c.jsx("div",{id:`${bP}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:EP,children:t})}function PP({rfId:e,disableKeyboardA11y:t}){const n=oe(jP);return c.jsxs(c.Fragment,{children:[c.jsx("div",{id:`${r0}-${e}`,style:Ep,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),c.jsx("div",{id:`${o0}-${e}`,style:Ep,children:n["edge.a11yDescription.default"]}),!t&&c.jsx(_P,{rfId:e})]})}const ha=g.forwardRef(({position:e="top-left",children:t,className:n,style:r,...o},s)=>{const i=`${e}`.split("-");return c.jsx("div",{className:je(["react-flow__panel",n,...i]),style:r,ref:s,...o,children:t})});ha.displayName="Panel";function MP({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:c.jsx(ha,{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:c.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const RP=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}},wi=e=>e.id;function TP(e,t){return ye(e.selectedNodes.map(wi),t.selectedNodes.map(wi))&&ye(e.selectedEdges.map(wi),t.selectedEdges.map(wi))}function IP({onSelectionChange:e}){const t=xe(),{selectedNodes:n,selectedEdges:r}=oe(RP,TP);return g.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(s=>s(o))},[n,r,e]),null}const LP=e=>!!e.onSelectionChangeHandlers;function AP({onSelectionChange:e}){const t=oe(LP);return e||t?c.jsx(IP,{onSelectionChange:e}):null}const s0=[0,0],zP={x:0,y:0,zoom:1},DP=["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"],bp=[...DP,"rfId"],$P=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}),Cp={translateExtent:js,nodeOrigin:s0,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function OP(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:s,setNodeExtent:i,reset:l,setDefaultNodesAndEdges:a}=oe($P,ye),u=xe();g.useEffect(()=>(a(e.defaultNodes,e.defaultEdges),()=>{h.current=Cp,l()}),[]);const h=g.useRef(Cp);return g.useEffect(()=>{for(const f of bp){const d=e[f],x=h.current[f];d!==x&&(typeof e[f]>"u"||(f==="nodes"?t(d):f==="edges"?n(d):f==="minZoom"?r(d):f==="maxZoom"?o(d):f==="translateExtent"?s(d):f==="nodeExtent"?i(d):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:a_(d)}):f==="fitView"?u.setState({fitViewQueued:d}):f==="fitViewOptions"?u.setState({fitViewOptions:d}):u.setState({[f]:d})))}h.current=e},bp.map(f=>e[f])),null}function jp(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function FP(e){var r;const[t,n]=g.useState(e==="system"?null:e);return g.useEffect(()=>{if(e!=="system"){n(e);return}const o=jp(),s=()=>n(o!=null&&o.matches?"dark":"light");return s(),o==null||o.addEventListener("change",s),()=>{o==null||o.removeEventListener("change",s)}},[e]),t!==null?t:(r=jp())!=null&&r.matches?"dark":"light"}const _p=typeof document<"u"?document:null;function Rs(e=null,t={target:_p,actInsideInputWithModifier:!0}){const[n,r]=g.useState(!1),o=g.useRef(!1),s=g.useRef(new Set([])),[i,l]=g.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
|
|
288
|
+
`).replace(`
|
|
289
|
+
|
|
290
|
+
`,`
|
|
291
|
+
+`).split(`
|
|
292
|
+
`)),h=u.reduce((f,d)=>f.concat(...d),[]);return[u,h]}return[[],[]]},[e]);return g.useEffect(()=>{const a=(t==null?void 0:t.target)??_p,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const h=x=>{var N,p;if(o.current=x.ctrlKey||x.metaKey||x.shiftKey||x.altKey,(!o.current||o.current&&!u)&&Lx(x))return!1;const w=Mp(x.code,l);if(s.current.add(x[w]),Pp(i,s.current,!1)){const v=((p=(N=x.composedPath)==null?void 0:N.call(x))==null?void 0:p[0])||x.target,m=(v==null?void 0:v.nodeName)==="BUTTON"||(v==null?void 0:v.nodeName)==="A";t.preventDefault!==!1&&(o.current||!m)&&x.preventDefault(),r(!0)}},f=x=>{const y=Mp(x.code,l);Pp(i,s.current,!0)?(r(!1),s.current.clear()):s.current.delete(x[y]),x.key==="Meta"&&s.current.clear(),o.current=!1},d=()=>{s.current.clear(),r(!1)};return a==null||a.addEventListener("keydown",h),a==null||a.addEventListener("keyup",f),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{a==null||a.removeEventListener("keydown",h),a==null||a.removeEventListener("keyup",f),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function Pp(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function Mp(e,t){return t.includes(e)?"code":"key"}const BP=()=>{const e=xe();return g.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,o,s],panZoom:i}=e.getState();return i?(await i.setViewport({x:t.x??r,y:t.y??o,zoom:t.zoom??s},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:o,minZoom:s,maxZoom:i,panZoom:l}=e.getState(),a=Qd(t,r,o,s,i,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(a,{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:o,snapToGrid:s,domNode:i}=e.getState();if(!i)return t;const{x:l,y:a}=i.getBoundingClientRect(),u={x:t.x-l,y:t.y-a},h=n.snapGrid??o,f=n.snapToGrid??s;return Us(u,r,f,h)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:s}=r.getBoundingClientRect(),i=Rl(t,n);return{x:i.x+o,y:i.y+s}}}),[])};function i0(e,t){const n=[],r=new Map,o=[];for(const s of e)if(s.type==="add"){o.push(s);continue}else if(s.type==="remove"||s.type==="replace")r.set(s.id,[s]);else{const i=r.get(s.id);i?i.push(s):r.set(s.id,[s])}for(const s of t){const i=r.get(s.id);if(!i){n.push(s);continue}if(i[0].type==="remove")continue;if(i[0].type==="replace"){n.push({...i[0].item});continue}const l={...s};for(const a of i)HP(a,l);n.push(l)}return o.length&&o.forEach(s=>{s.index!==void 0?n.splice(s.index,0,{...s.item}):n.push({...s.item})}),n}function HP(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 VP(e,t){return i0(e,t)}function UP(e,t){return i0(e,t)}function Gn(e,t){return{id:e,type:"select",selected:t}}function Dr(e,t=new Set,n=!1){const r=[];for(const[o,s]of e){const i=t.has(o);!(s.selected===void 0&&!i)&&s.selected!==i&&(n&&(s.selected=i),r.push(Gn(s.id,i)))}return r}function Rp({items:e=[],lookup:t}){var o;const n=[],r=new Map(e.map(s=>[s.id,s]));for(const[s,i]of e.entries()){const l=t.get(i.id),a=((o=l==null?void 0:l.internals)==null?void 0:o.userNode)??l;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:"replace"}),a===void 0&&n.push({item:i,type:"add",index:s})}for(const[s]of t)r.get(s)===void 0&&n.push({id:s,type:"remove"});return n}function Tp(e){return{id:e.id,type:"remove"}}const Ip=e=>Zj(e),WP=e=>Cx(e);function l0(e){return g.forwardRef(e)}const YP=typeof window<"u"?g.useLayoutEffect:g.useEffect;function Lp(e){const[t,n]=g.useState(BigInt(0)),[r]=g.useState(()=>GP(()=>n(o=>o+BigInt(1))));return YP(()=>{const o=r.get();o.length&&(e(o),r.reset())},[t]),r}function GP(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const a0=g.createContext(null);function XP({children:e}){const t=xe(),n=g.useCallback(l=>{const{nodes:a=[],setNodes:u,hasDefaultNodes:h,onNodesChange:f,nodeLookup:d,fitViewQueued:x,onNodesChangeMiddlewareMap:y}=t.getState();let w=a;for(const p of l)w=typeof p=="function"?p(w):p;let N=Rp({items:w,lookup:d});for(const p of y.values())N=p(N);h&&u(w),N.length>0?f==null||f(N):x&&window.requestAnimationFrame(()=>{const{fitViewQueued:p,nodes:v,setNodes:m}=t.getState();p&&m(v)})},[]),r=Lp(n),o=g.useCallback(l=>{const{edges:a=[],setEdges:u,hasDefaultEdges:h,onEdgesChange:f,edgeLookup:d}=t.getState();let x=a;for(const y of l)x=typeof y=="function"?y(x):y;h?u(x):f&&f(Rp({items:x,lookup:d}))},[]),s=Lp(o),i=g.useMemo(()=>({nodeQueue:r,edgeQueue:s}),[]);return c.jsx(a0.Provider,{value:i,children:e})}function KP(){const e=g.useContext(a0);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const QP=e=>!!e.panZoom;function rf(){const e=BP(),t=xe(),n=KP(),r=oe(QP),o=g.useMemo(()=>{const s=f=>t.getState().nodeLookup.get(f),i=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},a=f=>{var p,v;const{nodeLookup:d,nodeOrigin:x}=t.getState(),y=Ip(f)?f:d.get(f.id),w=y.parentId?Tx(y.position,y.measured,y.parentId,d,x):y.position,N={...y,position:w,width:((p=y.measured)==null?void 0:p.width)??y.width,height:((v=y.measured)==null?void 0:v.height)??y.height};return co(N)},u=(f,d,x={replace:!1})=>{i(y=>y.map(w=>{if(w.id===f){const N=typeof d=="function"?d(w):d;return x.replace&&Ip(N)?N:{...w,...N}}return w}))},h=(f,d,x={replace:!1})=>{l(y=>y.map(w=>{if(w.id===f){const N=typeof d=="function"?d(w):d;return x.replace&&WP(N)?N:{...w,...N}}return w}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>{var d;return(d=s(f))==null?void 0:d.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(d=>({...d}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:i,setEdges:l,addNodes:f=>{const d=Array.isArray(f)?f:[f];n.nodeQueue.push(x=>[...x,...d])},addEdges:f=>{const d=Array.isArray(f)?f:[f];n.edgeQueue.push(x=>[...x,...d])},toObject:()=>{const{nodes:f=[],edges:d=[],transform:x}=t.getState(),[y,w,N]=x;return{nodes:f.map(p=>({...p})),edges:d.map(p=>({...p})),viewport:{x:y,y:w,zoom:N}}},deleteElements:async({nodes:f=[],edges:d=[]})=>{const{nodes:x,edges:y,onNodesDelete:w,onEdgesDelete:N,triggerNodeChanges:p,triggerEdgeChanges:v,onDelete:m,onBeforeDelete:S}=t.getState(),{nodes:k,edges:E}=await r_({nodesToRemove:f,edgesToRemove:d,nodes:x,edges:y,onBeforeDelete:S}),b=E.length>0,_=k.length>0;if(b){const R=E.map(Tp);N==null||N(E),v(R)}if(_){const R=k.map(Tp);w==null||w(k),p(R)}return(_||b)&&(m==null||m({nodes:k,edges:E})),{deletedNodes:k,deletedEdges:E}},getIntersectingNodes:(f,d=!0,x)=>{const y=up(f),w=y?f:a(f),N=x!==void 0;return w?(x||t.getState().nodes).filter(p=>{const v=t.getState().nodeLookup.get(p.id);if(v&&!y&&(p.id===f.id||!v.internals.positionAbsolute))return!1;const m=co(N?p:v),S=Ps(m,w);return d&&S>0||S>=m.width*m.height||S>=w.width*w.height}):[]},isNodeIntersecting:(f,d,x=!0)=>{const w=up(f)?f:a(f);if(!w)return!1;const N=Ps(w,d);return x&&N>0||N>=d.width*d.height||N>=w.width*w.height},updateNode:u,updateNodeData:(f,d,x={replace:!1})=>{u(f,y=>{const w=typeof d=="function"?d(y):d;return x.replace?{...y,data:w}:{...y,data:{...y.data,...w}}},x)},updateEdge:h,updateEdgeData:(f,d,x={replace:!1})=>{h(f,y=>{const w=typeof d=="function"?d(y):d;return x.replace?{...y,data:w}:{...y,data:{...y.data,...w}}},x)},getNodesBounds:f=>{const{nodeLookup:d,nodeOrigin:x}=t.getState();return Jj(f,{nodeLookup:d,nodeOrigin:x})},getHandleConnections:({type:f,id:d,nodeId:x})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${x}-${f}${d?`-${d}`:""}`))==null?void 0:y.values())??[])},getNodeConnections:({type:f,handleId:d,nodeId:x})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${x}${f?d?`-${f}-${d}`:`-${f}`:""}`))==null?void 0:y.values())??[])},fitView:async f=>{const d=t.getState().fitViewResolver??l_();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:d}),n.nodeQueue.push(x=>[...x]),d.promise}}},[]);return g.useMemo(()=>({...o,...e,viewportInitialized:r}),[r])}const Ap=e=>e.selected,qP=typeof window<"u"?window:void 0;function ZP({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=xe(),{deleteElements:r}=rf(),o=Rs(e,{actInsideInputWithModifier:!1}),s=Rs(t,{target:qP});g.useEffect(()=>{if(o){const{edges:i,nodes:l}=n.getState();r({nodes:l.filter(Ap),edges:i.filter(Ap)}),n.setState({nodesSelectionActive:!1})}},[o]),g.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])}function JP(e){const t=xe();g.useEffect(()=>{const n=()=>{var o,s,i,l;if(!e.current||!(((s=(o=e.current).checkVisibility)==null?void 0:s.call(o))??!0))return!1;const r=qd(e.current);(r.height===0||r.width===0)&&((l=(i=t.getState()).onError)==null||l.call(i,"004",Wt.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 pa={position:"absolute",width:"100%",height:"100%",top:0,left:0},e3=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function t3({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:s=rr.Free,zoomOnDoubleClick:i=!0,panOnDrag:l=!0,defaultViewport:a,translateExtent:u,minZoom:h,maxZoom:f,zoomActivationKeyCode:d,preventScrolling:x=!0,children:y,noWheelClassName:w,noPanClassName:N,onViewportChange:p,isControlledViewport:v,paneClickDistance:m,selectionOnDrag:S}){const k=xe(),E=g.useRef(null),{userSelectionActive:b,lib:_,connectionInProgress:R}=oe(e3,ye),D=Rs(d),I=g.useRef();JP(E);const T=g.useCallback(F=>{p==null||p({x:F[0],y:F[1],zoom:F[2]}),v||k.setState({transform:F})},[p,v]);return g.useEffect(()=>{if(E.current){I.current=U_({domNode:E.current,minZoom:h,maxZoom:f,translateExtent:u,viewport:a,onDraggingChange:M=>k.setState({paneDragging:M}),onPanZoomStart:(M,z)=>{const{onViewportChangeStart:C,onMoveStart:P}=k.getState();P==null||P(M,z),C==null||C(z)},onPanZoom:(M,z)=>{const{onViewportChange:C,onMove:P}=k.getState();P==null||P(M,z),C==null||C(z)},onPanZoomEnd:(M,z)=>{const{onViewportChangeEnd:C,onMoveEnd:P}=k.getState();P==null||P(M,z),C==null||C(z)}});const{x:F,y:j,zoom:A}=I.current.getViewport();return k.setState({panZoom:I.current,transform:[F,j,A],domNode:E.current.closest(".react-flow")}),()=>{var M;(M=I.current)==null||M.destroy()}}},[]),g.useEffect(()=>{var F;(F=I.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:s,zoomOnDoubleClick:i,panOnDrag:l,zoomActivationKeyPressed:D,preventScrolling:x,noPanClassName:N,userSelectionActive:b,noWheelClassName:w,lib:_,onTransformChange:T,connectionInProgress:R,selectionOnDrag:S,paneClickDistance:m})},[e,t,n,r,o,s,i,l,D,x,N,b,w,_,T,R,S,m]),c.jsx("div",{className:"react-flow__renderer",ref:E,style:pa,children:y})}const n3=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function r3(){const{userSelectionActive:e,userSelectionRect:t}=oe(n3,ye);return e&&t?c.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 au=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},o3=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function s3({isSelecting:e,selectionKeyPressed:t,selectionMode:n=_s.Full,panOnDrag:r,paneClickDistance:o,selectionOnDrag:s,onSelectionStart:i,onSelectionEnd:l,onPaneClick:a,onPaneContextMenu:u,onPaneScroll:h,onPaneMouseEnter:f,onPaneMouseMove:d,onPaneMouseLeave:x,children:y}){const w=xe(),{userSelectionActive:N,elementsSelectable:p,dragging:v,connectionInProgress:m}=oe(o3,ye),S=p&&(e||N),k=g.useRef(null),E=g.useRef(),b=g.useRef(new Set),_=g.useRef(new Set),R=g.useRef(!1),D=C=>{if(R.current||m){R.current=!1;return}a==null||a(C),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},I=C=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){C.preventDefault();return}u==null||u(C)},T=h?C=>h(C):void 0,F=C=>{R.current&&(C.stopPropagation(),R.current=!1)},j=C=>{var Y,G;const{domNode:P}=w.getState();if(E.current=P==null?void 0:P.getBoundingClientRect(),!E.current)return;const L=C.target===k.current;if(!L&&!!C.target.closest(".nokey")||!e||!(s&&L||t)||C.button!==0||!C.isPrimary)return;(G=(Y=C.target)==null?void 0:Y.setPointerCapture)==null||G.call(Y,C.pointerId),R.current=!1;const{x:U,y:V}=_t(C.nativeEvent,E.current);w.setState({userSelectionRect:{width:0,height:0,startX:U,startY:V,x:U,y:V}}),L||(C.stopPropagation(),C.preventDefault())},A=C=>{const{userSelectionRect:P,transform:L,nodeLookup:O,edgeLookup:$,connectionLookup:U,triggerNodeChanges:V,triggerEdgeChanges:Y,defaultEdgeOptions:G,resetSelectedElements:X}=w.getState();if(!E.current||!P)return;const{x:H,y:Q}=_t(C.nativeEvent,E.current),{startX:ne,startY:J}=P;if(!R.current){const ie=t?0:o;if(Math.hypot(H-ne,Q-J)<=ie)return;X(),i==null||i(C)}R.current=!0;const Z={startX:ne,startY:J,x:H<ne?H:ne,y:Q<J?Q:J,width:Math.abs(H-ne),height:Math.abs(Q-J)},q=b.current,le=_.current;b.current=new Set(Kd(O,Z,L,n===_s.Partial,!0).map(ie=>ie.id)),_.current=new Set;const de=(G==null?void 0:G.selectable)??!0;for(const ie of b.current){const $e=U.get(ie);if($e)for(const{edgeId:hn}of $e.values()){const Xt=$.get(hn);Xt&&(Xt.selectable??de)&&_.current.add(hn)}}if(!cp(q,b.current)){const ie=Dr(O,b.current,!0);V(ie)}if(!cp(le,_.current)){const ie=Dr($,_.current);Y(ie)}w.setState({userSelectionRect:Z,userSelectionActive:!0,nodesSelectionActive:!1})},M=C=>{var P,L;C.button===0&&((L=(P=C.target)==null?void 0:P.releasePointerCapture)==null||L.call(P,C.pointerId),!N&&C.target===k.current&&w.getState().userSelectionRect&&(D==null||D(C)),w.setState({userSelectionActive:!1,userSelectionRect:null}),R.current&&(l==null||l(C),w.setState({nodesSelectionActive:b.current.size>0})))},z=r===!0||Array.isArray(r)&&r.includes(0);return c.jsxs("div",{className:je(["react-flow__pane",{draggable:z,dragging:v,selection:e}]),onClick:S?void 0:au(D,k),onContextMenu:au(I,k),onWheel:au(T,k),onPointerEnter:S?void 0:f,onPointerMove:S?A:d,onPointerUp:S?M:void 0,onPointerDownCapture:S?j:void 0,onClickCapture:S?F:void 0,onPointerLeave:x,ref:k,style:pa,children:[y,c.jsx(r3,{})]})}function Rc({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:s,multiSelectionActive:i,nodeLookup:l,onError:a}=t.getState(),u=l.get(e);if(!u){a==null||a("012",Wt.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&i)&&(s({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):o([e])}function u0({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:s,nodeClickDistance:i}){const l=xe(),[a,u]=g.useState(!1),h=g.useRef();return g.useEffect(()=>{h.current=M_({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{Rc({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),g.useEffect(()=>{var f,d;if(t)(f=h.current)==null||f.destroy();else if(e.current)return(d=h.current)==null||d.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:s,nodeId:o,nodeClickDistance:i}),()=>{var x;(x=h.current)==null||x.destroy()}},[n,r,t,s,e,o]),a}const i3=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function c0(){const e=xe();return g.useCallback(n=>{const{nodeExtent:r,snapToGrid:o,snapGrid:s,nodesDraggable:i,onError:l,updateNodePositions:a,nodeLookup:u,nodeOrigin:h}=e.getState(),f=new Map,d=i3(i),x=o?s[0]:5,y=o?s[1]:5,w=n.direction.x*x*n.factor,N=n.direction.y*y*n.factor;for(const[,p]of u){if(!d(p))continue;let v={x:p.internals.positionAbsolute.x+w,y:p.internals.positionAbsolute.y+N};o&&(v=Vs(v,s));const{position:m,positionAbsolute:S}=jx({nodeId:p.id,nextPosition:v,nodeLookup:u,nodeExtent:r,nodeOrigin:h,onError:l});p.position=m,p.internals.positionAbsolute=S,f.set(p.id,p)}a(f)},[])}const of=g.createContext(null),l3=of.Provider;of.Consumer;const d0=()=>g.useContext(of),a3=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),u3=(e,t,n)=>r=>{const{connectionClickStartHandle:o,connectionMode:s,connection:i}=r,{fromHandle:l,toHandle:a,isValid:u}=i,h=(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.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:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===n,isPossibleEndHandle:s===ao.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:!!o,valid:h&&u}};function c3({type:e="source",position:t=K.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:s=!0,id:i,onConnect:l,children:a,className:u,onMouseDown:h,onTouchStart:f,...d},x){var A,M;const y=i||null,w=e==="target",N=xe(),p=d0(),{connectOnClick:v,noPanClassName:m,rfId:S}=oe(a3,ye),{connectingFrom:k,connectingTo:E,clickConnecting:b,isPossibleEndHandle:_,connectionInProcess:R,clickConnectionInProcess:D,valid:I}=oe(u3(p,y,e),ye);p||(M=(A=N.getState()).onError)==null||M.call(A,"010",Wt.error010());const T=z=>{const{defaultEdgeOptions:C,onConnect:P,hasDefaultEdges:L}=N.getState(),O={...C,...z};if(L){const{edges:$,setEdges:U}=N.getState();U(p_(O,$))}P==null||P(O),l==null||l(O)},F=z=>{if(!p)return;const C=Ax(z.nativeEvent);if(o&&(C&&z.button===0||!C)){const P=N.getState();Mc.onPointerDown(z.nativeEvent,{handleDomNode:z.currentTarget,autoPanOnConnect:P.autoPanOnConnect,connectionMode:P.connectionMode,connectionRadius:P.connectionRadius,domNode:P.domNode,nodeLookup:P.nodeLookup,lib:P.lib,isTarget:w,handleId:y,nodeId:p,flowId:P.rfId,panBy:P.panBy,cancelConnection:P.cancelConnection,onConnectStart:P.onConnectStart,onConnectEnd:P.onConnectEnd,updateConnection:P.updateConnection,onConnect:T,isValidConnection:n||P.isValidConnection,getTransform:()=>N.getState().transform,getFromHandle:()=>N.getState().connection.fromHandle,autoPanSpeed:P.autoPanSpeed,dragThreshold:P.connectionDragThreshold})}C?h==null||h(z):f==null||f(z)},j=z=>{const{onClickConnectStart:C,onClickConnectEnd:P,connectionClickStartHandle:L,connectionMode:O,isValidConnection:$,lib:U,rfId:V,nodeLookup:Y,connection:G}=N.getState();if(!p||!L&&!o)return;if(!L){C==null||C(z.nativeEvent,{nodeId:p,handleId:y,handleType:e}),N.setState({connectionClickStartHandle:{nodeId:p,type:e,id:y}});return}const X=Ix(z.target),H=n||$,{connection:Q,isValid:ne}=Mc.isValid(z.nativeEvent,{handle:{nodeId:p,id:y,type:e},connectionMode:O,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:H,flowId:V,doc:X,lib:U,nodeLookup:Y});ne&&Q&&T(Q);const J=structuredClone(G);delete J.inProgress,J.toPosition=J.toHandle?J.toHandle.position:null,P==null||P(z,J),N.setState({connectionClickStartHandle:null})};return c.jsx("div",{"data-handleid":y,"data-nodeid":p,"data-handlepos":t,"data-id":`${S}-${p}-${y}-${e}`,className:je(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!w,target:w,connectable:r,connectablestart:o,connectableend:s,clickconnecting:b,connectingfrom:k,connectingto:E,valid:I,connectionindicator:r&&(!R||_)&&(R||D?s:o)}]),onMouseDown:F,onTouchStart:F,onClick:v?j:void 0,ref:x,...d,children:a})}const Tl=g.memo(l0(c3));function d3({data:e,isConnectable:t,sourcePosition:n=K.Bottom}){return c.jsxs(c.Fragment,{children:[e==null?void 0:e.label,c.jsx(Tl,{type:"source",position:n,isConnectable:t})]})}function f3({data:e,isConnectable:t,targetPosition:n=K.Top,sourcePosition:r=K.Bottom}){return c.jsxs(c.Fragment,{children:[c.jsx(Tl,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,c.jsx(Tl,{type:"source",position:r,isConnectable:t})]})}function h3(){return null}function p3({data:e,isConnectable:t,targetPosition:n=K.Top}){return c.jsxs(c.Fragment,{children:[c.jsx(Tl,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Il={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},zp={input:d3,default:f3,output:p3,group:h3};function m3(e){var t,n,r,o;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??((o=e.style)==null?void 0:o.height)}}const g3=e=>{const{width:t,height:n,x:r,y:o}=Hs(e.nodeLookup,{filter:s=>!!s.selected});return{width:jt(t)?t:null,height:jt(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${o}px)`}};function y3({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=xe(),{width:o,height:s,transformString:i,userSelectionActive:l}=oe(g3,ye),a=c0(),u=g.useRef(null);if(g.useEffect(()=>{var d;n||(d=u.current)==null||d.focus({preventScroll:!0})},[n]),u0({nodeRef:u}),l||!o||!s)return null;const h=e?d=>{const x=r.getState().nodes.filter(y=>y.selected);e(d,x)}:void 0,f=d=>{Object.prototype.hasOwnProperty.call(Il,d.key)&&(d.preventDefault(),a({direction:Il[d.key],factor:d.shiftKey?4:1}))};return c.jsx("div",{className:je(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},children:c.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:o,height:s}})})}const Dp=typeof window<"u"?window:void 0,x3=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function f0({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:i,paneClickDistance:l,deleteKeyCode:a,selectionKeyCode:u,selectionOnDrag:h,selectionMode:f,onSelectionStart:d,onSelectionEnd:x,multiSelectionKeyCode:y,panActivationKeyCode:w,zoomActivationKeyCode:N,elementsSelectable:p,zoomOnScroll:v,zoomOnPinch:m,panOnScroll:S,panOnScrollSpeed:k,panOnScrollMode:E,zoomOnDoubleClick:b,panOnDrag:_,defaultViewport:R,translateExtent:D,minZoom:I,maxZoom:T,preventScrolling:F,onSelectionContextMenu:j,noWheelClassName:A,noPanClassName:M,disableKeyboardA11y:z,onViewportChange:C,isControlledViewport:P}){const{nodesSelectionActive:L,userSelectionActive:O}=oe(x3,ye),$=Rs(u,{target:Dp}),U=Rs(w,{target:Dp}),V=U||_,Y=U||S,G=h&&V!==!0,X=$||O||G;return ZP({deleteKeyCode:a,multiSelectionKeyCode:y}),c.jsx(t3,{onPaneContextMenu:s,elementsSelectable:p,zoomOnScroll:v,zoomOnPinch:m,panOnScroll:Y,panOnScrollSpeed:k,panOnScrollMode:E,zoomOnDoubleClick:b,panOnDrag:!$&&V,defaultViewport:R,translateExtent:D,minZoom:I,maxZoom:T,zoomActivationKeyCode:N,preventScrolling:F,noWheelClassName:A,noPanClassName:M,onViewportChange:C,isControlledViewport:P,paneClickDistance:l,selectionOnDrag:G,children:c.jsxs(s3,{onSelectionStart:d,onSelectionEnd:x,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:i,panOnDrag:V,isSelecting:!!X,selectionMode:f,selectionKeyPressed:$,paneClickDistance:l,selectionOnDrag:G,children:[e,L&&c.jsx(y3,{onSelectionContextMenu:j,noPanClassName:M,disableKeyboardA11y:z})]})})}f0.displayName="FlowRenderer";const v3=g.memo(f0),w3=e=>t=>e?Kd(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 S3(e){return oe(g.useCallback(w3(e),[e]),ye)}const N3=e=>e.updateNodeInternals;function k3(){const e=oe(N3),[t]=g.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(o=>{const s=o.target.getAttribute("data-id");r.set(s,{id:s,nodeElement:o.target,force:!0})}),e(r)}));return g.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function E3({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=xe(),s=g.useRef(null),i=g.useRef(null),l=g.useRef(e.sourcePosition),a=g.useRef(e.targetPosition),u=g.useRef(t),h=n&&!!e.internals.handleBounds;return g.useEffect(()=>{s.current&&!e.hidden&&(!h||i.current!==s.current)&&(i.current&&(r==null||r.unobserve(i.current)),r==null||r.observe(s.current),i.current=s.current)},[h,e.hidden]),g.useEffect(()=>()=>{i.current&&(r==null||r.unobserve(i.current),i.current=null)},[]),g.useEffect(()=>{if(s.current){const f=u.current!==t,d=l.current!==e.sourcePosition,x=a.current!==e.targetPosition;(f||d||x)&&(u.current=t,l.current=e.sourcePosition,a.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),s}function b3({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:s,onDoubleClick:i,nodesDraggable:l,elementsSelectable:a,nodesConnectable:u,nodesFocusable:h,resizeObserver:f,noDragClassName:d,noPanClassName:x,disableKeyboardA11y:y,rfId:w,nodeTypes:N,nodeClickDistance:p,onError:v}){const{node:m,internals:S,isParent:k}=oe(H=>{const Q=H.nodeLookup.get(e),ne=H.parentLookup.has(e);return{node:Q,internals:Q.internals,isParent:ne}},ye);let E=m.type||"default",b=(N==null?void 0:N[E])||zp[E];b===void 0&&(v==null||v("003",Wt.error003(E)),E="default",b=(N==null?void 0:N.default)||zp.default);const _=!!(m.draggable||l&&typeof m.draggable>"u"),R=!!(m.selectable||a&&typeof m.selectable>"u"),D=!!(m.connectable||u&&typeof m.connectable>"u"),I=!!(m.focusable||h&&typeof m.focusable>"u"),T=xe(),F=Rx(m),j=E3({node:m,nodeType:E,hasDimensions:F,resizeObserver:f}),A=u0({nodeRef:j,disabled:m.hidden||!_,noDragClassName:d,handleSelector:m.dragHandle,nodeId:e,isSelectable:R,nodeClickDistance:p}),M=c0();if(m.hidden)return null;const z=fn(m),C=m3(m),P=R||_||t||n||r||o,L=n?H=>n(H,{...S.userNode}):void 0,O=r?H=>r(H,{...S.userNode}):void 0,$=o?H=>o(H,{...S.userNode}):void 0,U=s?H=>s(H,{...S.userNode}):void 0,V=i?H=>i(H,{...S.userNode}):void 0,Y=H=>{const{selectNodesOnDrag:Q,nodeDragThreshold:ne}=T.getState();R&&(!Q||!_||ne>0)&&Rc({id:e,store:T,nodeRef:j}),t&&t(H,{...S.userNode})},G=H=>{if(!(Lx(H.nativeEvent)||y)){if(Nx.includes(H.key)&&R){const Q=H.key==="Escape";Rc({id:e,store:T,unselect:Q,nodeRef:j})}else if(_&&m.selected&&Object.prototype.hasOwnProperty.call(Il,H.key)){H.preventDefault();const{ariaLabelConfig:Q}=T.getState();T.setState({ariaLiveMessage:Q["node.a11yDescription.ariaLiveMessage"]({direction:H.key.replace("Arrow","").toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),M({direction:Il[H.key],factor:H.shiftKey?4:1})}}},X=()=>{var le;if(y||!((le=j.current)!=null&&le.matches(":focus-visible")))return;const{transform:H,width:Q,height:ne,autoPanOnNodeFocus:J,setCenter:Z}=T.getState();if(!J)return;Kd(new Map([[e,m]]),{x:0,y:0,width:Q,height:ne},H,!0).length>0||Z(m.position.x+z.width/2,m.position.y+z.height/2,{zoom:H[2]})};return c.jsx("div",{className:je(["react-flow__node",`react-flow__node-${E}`,{[x]:_},m.className,{selected:m.selected,selectable:R,parent:k,draggable:_,dragging:A}]),ref:j,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:P?"all":"none",visibility:F?"visible":"hidden",...m.style,...C},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:O,onMouseLeave:$,onContextMenu:U,onClick:Y,onDoubleClick:V,onKeyDown:I?G:void 0,tabIndex:I?0:void 0,onFocus:I?X:void 0,role:m.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":y?void 0:`${r0}-${w}`,"aria-label":m.ariaLabel,...m.domAttributes,children:c.jsx(l3,{value:e,children:c.jsx(b,{id:e,data:m.data,type:E,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:m.selected??!1,selectable:R,draggable:_,deletable:m.deletable??!0,isConnectable:D,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:A,dragHandle:m.dragHandle,zIndex:S.z,parentId:m.parentId,...z})})})}var C3=g.memo(b3);const j3=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function h0(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,onError:s}=oe(j3,ye),i=S3(e.onlyRenderVisibleElements),l=k3();return c.jsx("div",{className:"react-flow__nodes",style:pa,children:i.map(a=>c.jsx(C3,{id:a,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:o,nodeClickDistance:e.nodeClickDistance,onError:s},a))})}h0.displayName="NodeRenderer";const _3=g.memo(h0);function P3(e){return oe(g.useCallback(n=>{if(!e)return n.edges.map(o=>o.id);const r=[];if(n.width&&n.height)for(const o of n.edges){const s=n.nodeLookup.get(o.source),i=n.nodeLookup.get(o.target);s&&i&&d_({sourceNode:s,targetNode:i,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),ye)}const M3=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return c.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},R3=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return c.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},$p={[Pl.Arrow]:M3,[Pl.ArrowClosed]:R3};function T3(e){const t=xe();return g.useMemo(()=>{var o,s;return Object.prototype.hasOwnProperty.call($p,e)?$p[e]:((s=(o=t.getState()).onError)==null||s.call(o,"009",Wt.error009(e)),null)},[e])}const I3=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:s="strokeWidth",strokeWidth:i,orient:l="auto-start-reverse"})=>{const a=T3(t);return a?c.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:l,refX:"0",refY:"0",children:c.jsx(a,{color:n,strokeWidth:i})}):null},p0=({defaultColor:e,rfId:t})=>{const n=oe(s=>s.edges),r=oe(s=>s.defaultEdgeOptions),o=g.useMemo(()=>v_(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return o.length?c.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:c.jsx("defs",{children:o.map(s=>c.jsx(I3,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};p0.displayName="MarkerDefinitions";var L3=g.memo(p0);function m0({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:s,labelBgPadding:i=[2,4],labelBgBorderRadius:l=2,children:a,className:u,...h}){const[f,d]=g.useState({x:1,y:0,width:0,height:0}),x=je(["react-flow__edge-textwrapper",u]),y=g.useRef(null);return g.useEffect(()=>{if(y.current){const w=y.current.getBBox();d({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?c.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:x,visibility:f.width?"visible":"hidden",...h,children:[o&&c.jsx("rect",{width:f.width+2*i[0],x:-i[0],y:-i[1],height:f.height+2*i[1],className:"react-flow__edge-textbg",style:s,rx:l,ry:l}),c.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:y,style:r,children:n}),a]}):null}m0.displayName="EdgeText";const A3=g.memo(m0);function ma({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:s,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:a,interactionWidth:u=20,...h}){return c.jsxs(c.Fragment,{children:[c.jsx("path",{...h,d:e,fill:"none",className:je(["react-flow__edge-path",h.className])}),u?c.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&jt(t)&&jt(n)?c.jsx(A3,{x:t,y:n,label:r,labelStyle:o,labelShowBg:s,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:a}):null]})}function Op({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===K.Left||e===K.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function g0({sourceX:e,sourceY:t,sourcePosition:n=K.Bottom,targetX:r,targetY:o,targetPosition:s=K.Top}){const[i,l]=Op({pos:n,x1:e,y1:t,x2:r,y2:o}),[a,u]=Op({pos:s,x1:r,y1:o,x2:e,y2:t}),[h,f,d,x]=zx({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:i,sourceControlY:l,targetControlX:a,targetControlY:u});return[`M${e},${t} C${i},${l} ${a},${u} ${r},${o}`,h,f,d,x]}function y0(e){return g.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:s,sourcePosition:i,targetPosition:l,label:a,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:x,style:y,markerEnd:w,markerStart:N,interactionWidth:p})=>{const[v,m,S]=g0({sourceX:n,sourceY:r,sourcePosition:i,targetX:o,targetY:s,targetPosition:l}),k=e.isInternal?void 0:t;return c.jsx(ma,{id:k,path:v,labelX:m,labelY:S,label:a,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:x,style:y,markerEnd:w,markerStart:N,interactionWidth:p})})}const z3=y0({isInternal:!1}),x0=y0({isInternal:!0});z3.displayName="SimpleBezierEdge";x0.displayName="SimpleBezierEdgeInternal";function v0(e){return g.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:s,label:i,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:d,sourcePosition:x=K.Bottom,targetPosition:y=K.Top,markerEnd:w,markerStart:N,pathOptions:p,interactionWidth:v})=>{const[m,S,k]=jc({sourceX:n,sourceY:r,sourcePosition:x,targetX:o,targetY:s,targetPosition:y,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 c.jsx(ma,{id:E,path:m,labelX:S,labelY:k,label:i,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:d,markerEnd:w,markerStart:N,interactionWidth:v})})}const w0=v0({isInternal:!1}),S0=v0({isInternal:!0});w0.displayName="SmoothStepEdge";S0.displayName="SmoothStepEdgeInternal";function N0(e){return g.memo(({id:t,...n})=>{var o;const r=e.isInternal?void 0:t;return c.jsx(w0,{...n,id:r,pathOptions:g.useMemo(()=>{var s;return{borderRadius:0,offset:(s=n.pathOptions)==null?void 0:s.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const D3=N0({isInternal:!1}),k0=N0({isInternal:!0});D3.displayName="StepEdge";k0.displayName="StepEdgeInternal";function E0(e){return g.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:s,label:i,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:d,markerEnd:x,markerStart:y,interactionWidth:w})=>{const[N,p,v]=Ox({sourceX:n,sourceY:r,targetX:o,targetY:s}),m=e.isInternal?void 0:t;return c.jsx(ma,{id:m,path:N,labelX:p,labelY:v,label:i,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:d,markerEnd:x,markerStart:y,interactionWidth:w})})}const $3=E0({isInternal:!1}),b0=E0({isInternal:!0});$3.displayName="StraightEdge";b0.displayName="StraightEdgeInternal";function C0(e){return g.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:s,sourcePosition:i=K.Bottom,targetPosition:l=K.Top,label:a,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:x,style:y,markerEnd:w,markerStart:N,pathOptions:p,interactionWidth:v})=>{const[m,S,k]=Dx({sourceX:n,sourceY:r,sourcePosition:i,targetX:o,targetY:s,targetPosition:l,curvature:p==null?void 0:p.curvature}),E=e.isInternal?void 0:t;return c.jsx(ma,{id:E,path:m,labelX:S,labelY:k,label:a,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:x,style:y,markerEnd:w,markerStart:N,interactionWidth:v})})}const O3=C0({isInternal:!1}),j0=C0({isInternal:!0});O3.displayName="BezierEdge";j0.displayName="BezierEdgeInternal";const Fp={default:j0,straight:b0,step:k0,smoothstep:S0,simplebezier:x0},Bp={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},F3=(e,t,n)=>n===K.Left?e-t:n===K.Right?e+t:e,B3=(e,t,n)=>n===K.Top?e-t:n===K.Bottom?e+t:e,Hp="react-flow__edgeupdater";function Vp({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:s,onMouseOut:i,type:l}){return c.jsx("circle",{onMouseDown:o,onMouseEnter:s,onMouseOut:i,className:je([Hp,`${Hp}-${l}`]),cx:F3(t,r,e),cy:B3(n,r,e),r,stroke:"transparent",fill:"transparent"})}function H3({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:s,targetY:i,sourcePosition:l,targetPosition:a,onReconnect:u,onReconnectStart:h,onReconnectEnd:f,setReconnecting:d,setUpdateHover:x}){const y=xe(),w=(S,k)=>{if(S.button!==0)return;const{autoPanOnConnect:E,domNode:b,isValidConnection:_,connectionMode:R,connectionRadius:D,lib:I,onConnectStart:T,onConnectEnd:F,cancelConnection:j,nodeLookup:A,rfId:M,panBy:z,updateConnection:C}=y.getState(),P=k.type==="target",L=(U,V)=>{d(!1),f==null||f(U,n,k.type,V)},O=U=>u==null?void 0:u(n,U),$=(U,V)=>{d(!0),h==null||h(S,n,k.type),T==null||T(U,V)};Mc.onPointerDown(S.nativeEvent,{autoPanOnConnect:E,connectionMode:R,connectionRadius:D,domNode:b,handleId:k.id,nodeId:k.nodeId,nodeLookup:A,isTarget:P,edgeUpdaterType:k.type,lib:I,flowId:M,cancelConnection:j,panBy:z,isValidConnection:_,onConnect:O,onConnectStart:$,onConnectEnd:F,onReconnectEnd:L,updateConnection:C,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:S.currentTarget})},N=S=>w(S,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),p=S=>w(S,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),v=()=>x(!0),m=()=>x(!1);return c.jsxs(c.Fragment,{children:[(e===!0||e==="source")&&c.jsx(Vp,{position:l,centerX:r,centerY:o,radius:t,onMouseDown:N,onMouseEnter:v,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&c.jsx(Vp,{position:a,centerX:s,centerY:i,radius:t,onMouseDown:p,onMouseEnter:v,onMouseOut:m,type:"target"})]})}function V3({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:s,onContextMenu:i,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,reconnectRadius:h,onReconnect:f,onReconnectStart:d,onReconnectEnd:x,rfId:y,edgeTypes:w,noPanClassName:N,onError:p,disableKeyboardA11y:v}){let m=oe(Z=>Z.edgeLookup.get(e));const S=oe(Z=>Z.defaultEdgeOptions);m=S?{...S,...m}:m;let k=m.type||"default",E=(w==null?void 0:w[k])||Fp[k];E===void 0&&(p==null||p("011",Wt.error011(k)),k="default",E=(w==null?void 0:w.default)||Fp.default);const b=!!(m.focusable||t&&typeof m.focusable>"u"),_=typeof f<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),R=!!(m.selectable||r&&typeof m.selectable>"u"),D=g.useRef(null),[I,T]=g.useState(!1),[F,j]=g.useState(!1),A=xe(),{zIndex:M,sourceX:z,sourceY:C,targetX:P,targetY:L,sourcePosition:O,targetPosition:$}=oe(g.useCallback(Z=>{const q=Z.nodeLookup.get(m.source),le=Z.nodeLookup.get(m.target);if(!q||!le)return{zIndex:m.zIndex,...Bp};const de=x_({id:e,sourceNode:q,targetNode:le,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:Z.connectionMode,onError:p});return{zIndex:c_({selected:m.selected,zIndex:m.zIndex,sourceNode:q,targetNode:le,elevateOnSelect:Z.elevateEdgesOnSelect,zIndexMode:Z.zIndexMode}),...de||Bp}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),ye),U=g.useMemo(()=>m.markerStart?`url('#${_c(m.markerStart,y)}')`:void 0,[m.markerStart,y]),V=g.useMemo(()=>m.markerEnd?`url('#${_c(m.markerEnd,y)}')`:void 0,[m.markerEnd,y]);if(m.hidden||z===null||C===null||P===null||L===null)return null;const Y=Z=>{var ie;const{addSelectedEdges:q,unselectNodesAndEdges:le,multiSelectionActive:de}=A.getState();R&&(A.setState({nodesSelectionActive:!1}),m.selected&&de?(le({nodes:[],edges:[m]}),(ie=D.current)==null||ie.blur()):q([e])),o&&o(Z,m)},G=s?Z=>{s(Z,{...m})}:void 0,X=i?Z=>{i(Z,{...m})}:void 0,H=l?Z=>{l(Z,{...m})}:void 0,Q=a?Z=>{a(Z,{...m})}:void 0,ne=u?Z=>{u(Z,{...m})}:void 0,J=Z=>{var q;if(!v&&Nx.includes(Z.key)&&R){const{unselectNodesAndEdges:le,addSelectedEdges:de}=A.getState();Z.key==="Escape"?((q=D.current)==null||q.blur(),le({edges:[m]})):de([e])}};return c.jsx("svg",{style:{zIndex:M},children:c.jsxs("g",{className:je(["react-flow__edge",`react-flow__edge-${k}`,m.className,N,{selected:m.selected,animated:m.animated,inactive:!R&&!o,updating:I,selectable:R}]),onClick:Y,onDoubleClick:G,onContextMenu:X,onMouseEnter:H,onMouseMove:Q,onMouseLeave:ne,onKeyDown:b?J:void 0,tabIndex:b?0:void 0,role:m.ariaRole??(b?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":m.ariaLabel===null?void 0:m.ariaLabel||`Edge from ${m.source} to ${m.target}`,"aria-describedby":b?`${o0}-${y}`:void 0,ref:D,...m.domAttributes,children:[!F&&c.jsx(E,{id:e,source:m.source,target:m.target,type:m.type,selected:m.selected,animated:m.animated,selectable:R,deletable:m.deletable??!0,label:m.label,labelStyle:m.labelStyle,labelShowBg:m.labelShowBg,labelBgStyle:m.labelBgStyle,labelBgPadding:m.labelBgPadding,labelBgBorderRadius:m.labelBgBorderRadius,sourceX:z,sourceY:C,targetX:P,targetY:L,sourcePosition:O,targetPosition:$,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:U,markerEnd:V,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),_&&c.jsx(H3,{edge:m,isReconnectable:_,reconnectRadius:h,onReconnect:f,onReconnectStart:d,onReconnectEnd:x,sourceX:z,sourceY:C,targetX:P,targetY:L,sourcePosition:O,targetPosition:$,setUpdateHover:T,setReconnecting:j})]})})}var U3=g.memo(V3);const W3=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function _0({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:s,onEdgeContextMenu:i,onEdgeMouseEnter:l,onEdgeMouseMove:a,onEdgeMouseLeave:u,onEdgeClick:h,reconnectRadius:f,onEdgeDoubleClick:d,onReconnectStart:x,onReconnectEnd:y,disableKeyboardA11y:w}){const{edgesFocusable:N,edgesReconnectable:p,elementsSelectable:v,onError:m}=oe(W3,ye),S=P3(t);return c.jsxs("div",{className:"react-flow__edges",children:[c.jsx(L3,{defaultColor:e,rfId:n}),S.map(k=>c.jsx(U3,{id:k,edgesFocusable:N,edgesReconnectable:p,elementsSelectable:v,noPanClassName:o,onReconnect:s,onContextMenu:i,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,onClick:h,reconnectRadius:f,onDoubleClick:d,onReconnectStart:x,onReconnectEnd:y,rfId:n,onError:m,edgeTypes:r,disableKeyboardA11y:w},k))]})}_0.displayName="EdgeRenderer";const Y3=g.memo(_0),G3=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function X3({children:e}){const t=oe(G3);return c.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function K3(e){const t=rf(),n=g.useRef(!1);g.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const Q3=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function q3(e){const t=oe(Q3),n=xe();return g.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Z3(e){return e.connection.inProgress?{...e.connection,to:Us(e.connection.to,e.transform)}:{...e.connection}}function J3(e){return Z3}function eM(e){const t=J3();return oe(t,ye)}const tM=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function nM({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:s,height:i,isValid:l,inProgress:a}=oe(tM,ye);return!(s&&o&&a)?null:c.jsx("svg",{style:e,width:s,height:i,className:"react-flow__connectionline react-flow__container",children:c.jsx("g",{className:je(["react-flow__connection",bx(l)]),children:c.jsx(P0,{style:t,type:n,CustomComponent:r,isValid:l})})})}const P0=({style:e,type:t=En.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:s,fromNode:i,fromHandle:l,fromPosition:a,to:u,toNode:h,toHandle:f,toPosition:d,pointer:x}=eM();if(!o)return;if(n)return c.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:i,fromHandle:l,fromX:s.x,fromY:s.y,toX:u.x,toY:u.y,fromPosition:a,toPosition:d,connectionStatus:bx(r),toNode:h,toHandle:f,pointer:x});let y="";const w={sourceX:s.x,sourceY:s.y,sourcePosition:a,targetX:u.x,targetY:u.y,targetPosition:d};switch(t){case En.Bezier:[y]=Dx(w);break;case En.SimpleBezier:[y]=g0(w);break;case En.Step:[y]=jc({...w,borderRadius:0});break;case En.SmoothStep:[y]=jc(w);break;default:[y]=Ox(w)}return c.jsx("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};P0.displayName="ConnectionLine";const rM={};function Up(e=rM){g.useRef(e),xe(),g.useEffect(()=>{},[e])}function oM(){xe(),g.useRef(!1),g.useEffect(()=>{},[])}function M0({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:s,onEdgeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:h,onSelectionContextMenu:f,onSelectionStart:d,onSelectionEnd:x,connectionLineType:y,connectionLineStyle:w,connectionLineComponent:N,connectionLineContainerStyle:p,selectionKeyCode:v,selectionOnDrag:m,selectionMode:S,multiSelectionKeyCode:k,panActivationKeyCode:E,zoomActivationKeyCode:b,deleteKeyCode:_,onlyRenderVisibleElements:R,elementsSelectable:D,defaultViewport:I,translateExtent:T,minZoom:F,maxZoom:j,preventScrolling:A,defaultMarkerColor:M,zoomOnScroll:z,zoomOnPinch:C,panOnScroll:P,panOnScrollSpeed:L,panOnScrollMode:O,zoomOnDoubleClick:$,panOnDrag:U,onPaneClick:V,onPaneMouseEnter:Y,onPaneMouseMove:G,onPaneMouseLeave:X,onPaneScroll:H,onPaneContextMenu:Q,paneClickDistance:ne,nodeClickDistance:J,onEdgeContextMenu:Z,onEdgeMouseEnter:q,onEdgeMouseMove:le,onEdgeMouseLeave:de,reconnectRadius:ie,onReconnect:$e,onReconnectStart:hn,onReconnectEnd:Xt,noDragClassName:Un,noWheelClassName:No,noPanClassName:ko,disableKeyboardA11y:Eo,nodeExtent:Na,rfId:Ys,viewport:xr,onViewportChange:bo}){return Up(e),Up(t),oM(),K3(n),q3(xr),c.jsx(v3,{onPaneClick:V,onPaneMouseEnter:Y,onPaneMouseMove:G,onPaneMouseLeave:X,onPaneContextMenu:Q,onPaneScroll:H,paneClickDistance:ne,deleteKeyCode:_,selectionKeyCode:v,selectionOnDrag:m,selectionMode:S,onSelectionStart:d,onSelectionEnd:x,multiSelectionKeyCode:k,panActivationKeyCode:E,zoomActivationKeyCode:b,elementsSelectable:D,zoomOnScroll:z,zoomOnPinch:C,zoomOnDoubleClick:$,panOnScroll:P,panOnScrollSpeed:L,panOnScrollMode:O,panOnDrag:U,defaultViewport:I,translateExtent:T,minZoom:F,maxZoom:j,onSelectionContextMenu:f,preventScrolling:A,noDragClassName:Un,noWheelClassName:No,noPanClassName:ko,disableKeyboardA11y:Eo,onViewportChange:bo,isControlledViewport:!!xr,children:c.jsxs(X3,{children:[c.jsx(Y3,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:i,onReconnect:$e,onReconnectStart:hn,onReconnectEnd:Xt,onlyRenderVisibleElements:R,onEdgeContextMenu:Z,onEdgeMouseEnter:q,onEdgeMouseMove:le,onEdgeMouseLeave:de,reconnectRadius:ie,defaultMarkerColor:M,noPanClassName:ko,disableKeyboardA11y:Eo,rfId:Ys}),c.jsx(nM,{style:w,type:y,component:N,containerStyle:p}),c.jsx("div",{className:"react-flow__edgelabel-renderer"}),c.jsx(_3,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:h,nodeClickDistance:J,onlyRenderVisibleElements:R,noPanClassName:ko,noDragClassName:Un,disableKeyboardA11y:Eo,nodeExtent:Na,rfId:Ys}),c.jsx("div",{className:"react-flow__viewport-portal"})]})})}M0.displayName="GraphView";const sM=g.memo(M0),Wp=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:s,fitView:i,fitViewOptions:l,minZoom:a=.5,maxZoom:u=2,nodeOrigin:h,nodeExtent:f,zIndexMode:d="basic"}={})=>{const x=new Map,y=new Map,w=new Map,N=new Map,p=r??t??[],v=n??e??[],m=h??[0,0],S=f??js;Hx(w,N,p);const k=Pc(v,x,y,{nodeOrigin:m,nodeExtent:S,zIndexMode:d});let E=[0,0,1];if(i&&o&&s){const b=Hs(x,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:_,y:R,zoom:D}=Qd(b,o,s,a,u,(l==null?void 0:l.padding)??.1);E=[_,R,D]}return{rfId:"1",width:o??0,height:s??0,transform:E,nodes:v,nodesInitialized:k,nodeLookup:x,parentLookup:y,edges:p,edgeLookup:N,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:a,maxZoom:u,translateExtent:js,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ao.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:m,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:{...Ex},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:o_,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:kx,zIndexMode:d,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},iM=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:s,fitView:i,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:h,nodeExtent:f,zIndexMode:d})=>NP((x,y)=>{async function w(){const{nodeLookup:N,panZoom:p,fitViewOptions:v,fitViewResolver:m,width:S,height:k,minZoom:E,maxZoom:b}=y();p&&(await n_({nodes:N,width:S,height:k,panZoom:p,minZoom:E,maxZoom:b},v),m==null||m.resolve(!0),x({fitViewResolver:null}))}return{...Wp({nodes:e,edges:t,width:o,height:s,fitView:i,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:h,nodeExtent:f,defaultNodes:n,defaultEdges:r,zIndexMode:d}),setNodes:N=>{const{nodeLookup:p,parentLookup:v,nodeOrigin:m,elevateNodesOnSelect:S,fitViewQueued:k,zIndexMode:E}=y(),b=Pc(N,p,v,{nodeOrigin:m,nodeExtent:f,elevateNodesOnSelect:S,checkEquality:!0,zIndexMode:E});k&&b?(w(),x({nodes:N,nodesInitialized:b,fitViewQueued:!1,fitViewOptions:void 0})):x({nodes:N,nodesInitialized:b})},setEdges:N=>{const{connectionLookup:p,edgeLookup:v}=y();Hx(p,v,N),x({edges:N})},setDefaultNodesAndEdges:(N,p)=>{if(N){const{setNodes:v}=y();v(N),x({hasDefaultNodes:!0})}if(p){const{setEdges:v}=y();v(p),x({hasDefaultEdges:!0})}},updateNodeInternals:N=>{const{triggerNodeChanges:p,nodeLookup:v,parentLookup:m,domNode:S,nodeOrigin:k,nodeExtent:E,debug:b,fitViewQueued:_,zIndexMode:R}=y(),{changes:D,updatedInternals:I}=C_(N,v,m,S,k,E,R);I&&(N_(v,m,{nodeOrigin:k,nodeExtent:E,zIndexMode:R}),_?(w(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),(D==null?void 0:D.length)>0&&(b&&console.log("React Flow: trigger node changes",D),p==null||p(D)))},updateNodePositions:(N,p=!1)=>{const v=[];let m=[];const{nodeLookup:S,triggerNodeChanges:k,connection:E,updateConnection:b,onNodesChangeMiddlewareMap:_}=y();for(const[R,D]of N){const I=S.get(R),T=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(D!=null&&D.position)),F={id:R,type:"position",position:T?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:p};if(I&&E.inProgress&&E.fromNode.id===I.id){const j=pr(I,E.fromHandle,K.Left,!0);b({...E,from:j})}T&&I.parentId&&v.push({id:R,parentId:I.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),m.push(F)}if(v.length>0){const{parentLookup:R,nodeOrigin:D}=y(),I=nf(v,S,R,D);m.push(...I)}for(const R of _.values())m=R(m);k(m)},triggerNodeChanges:N=>{const{onNodesChange:p,setNodes:v,nodes:m,hasDefaultNodes:S,debug:k}=y();if(N!=null&&N.length){if(S){const E=VP(N,m);v(E)}k&&console.log("React Flow: trigger node changes",N),p==null||p(N)}},triggerEdgeChanges:N=>{const{onEdgesChange:p,setEdges:v,edges:m,hasDefaultEdges:S,debug:k}=y();if(N!=null&&N.length){if(S){const E=UP(N,m);v(E)}k&&console.log("React Flow: trigger edge changes",N),p==null||p(N)}},addSelectedNodes:N=>{const{multiSelectionActive:p,edgeLookup:v,nodeLookup:m,triggerNodeChanges:S,triggerEdgeChanges:k}=y();if(p){const E=N.map(b=>Gn(b,!0));S(E);return}S(Dr(m,new Set([...N]),!0)),k(Dr(v))},addSelectedEdges:N=>{const{multiSelectionActive:p,edgeLookup:v,nodeLookup:m,triggerNodeChanges:S,triggerEdgeChanges:k}=y();if(p){const E=N.map(b=>Gn(b,!0));k(E);return}k(Dr(v,new Set([...N]))),S(Dr(m,new Set,!0))},unselectNodesAndEdges:({nodes:N,edges:p}={})=>{const{edges:v,nodes:m,nodeLookup:S,triggerNodeChanges:k,triggerEdgeChanges:E}=y(),b=N||m,_=p||v,R=b.map(I=>{const T=S.get(I.id);return T&&(T.selected=!1),Gn(I.id,!1)}),D=_.map(I=>Gn(I.id,!1));k(R),E(D)},setMinZoom:N=>{const{panZoom:p,maxZoom:v}=y();p==null||p.setScaleExtent([N,v]),x({minZoom:N})},setMaxZoom:N=>{const{panZoom:p,minZoom:v}=y();p==null||p.setScaleExtent([v,N]),x({maxZoom:N})},setTranslateExtent:N=>{var p;(p=y().panZoom)==null||p.setTranslateExtent(N),x({translateExtent:N})},resetSelectedElements:()=>{const{edges:N,nodes:p,triggerNodeChanges:v,triggerEdgeChanges:m,elementsSelectable:S}=y();if(!S)return;const k=p.reduce((b,_)=>_.selected?[...b,Gn(_.id,!1)]:b,[]),E=N.reduce((b,_)=>_.selected?[...b,Gn(_.id,!1)]:b,[]);v(k),m(E)},setNodeExtent:N=>{const{nodes:p,nodeLookup:v,parentLookup:m,nodeOrigin:S,elevateNodesOnSelect:k,nodeExtent:E,zIndexMode:b}=y();N[0][0]===E[0][0]&&N[0][1]===E[0][1]&&N[1][0]===E[1][0]&&N[1][1]===E[1][1]||(Pc(p,v,m,{nodeOrigin:S,nodeExtent:N,elevateNodesOnSelect:k,checkEquality:!1,zIndexMode:b}),x({nodeExtent:N}))},panBy:N=>{const{transform:p,width:v,height:m,panZoom:S,translateExtent:k}=y();return j_({delta:N,panZoom:S,transform:p,translateExtent:k,width:v,height:m})},setCenter:async(N,p,v)=>{const{width:m,height:S,maxZoom:k,panZoom:E}=y();if(!E)return Promise.resolve(!1);const b=typeof(v==null?void 0:v.zoom)<"u"?v.zoom:k;return await E.setViewport({x:m/2-N*b,y:S/2-p*b,zoom:b},{duration:v==null?void 0:v.duration,ease:v==null?void 0:v.ease,interpolate:v==null?void 0:v.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{x({connection:{...Ex}})},updateConnection:N=>{x({connection:N})},reset:()=>x({...Wp()})}},Object.is);function lM({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:s,initialMinZoom:i,initialMaxZoom:l,initialFitViewOptions:a,fitView:u,nodeOrigin:h,nodeExtent:f,zIndexMode:d,children:x}){const[y]=g.useState(()=>iM({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:s,fitView:u,minZoom:i,maxZoom:l,fitViewOptions:a,nodeOrigin:h,nodeExtent:f,zIndexMode:d}));return c.jsx(kP,{value:y,children:c.jsx(XP,{children:x})})}function aM({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:s,height:i,fitView:l,fitViewOptions:a,minZoom:u,maxZoom:h,nodeOrigin:f,nodeExtent:d,zIndexMode:x}){return g.useContext(fa)?c.jsx(c.Fragment,{children:e}):c.jsx(lM,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:s,initialHeight:i,fitView:l,initialFitViewOptions:a,initialMinZoom:u,initialMaxZoom:h,nodeOrigin:f,nodeExtent:d,zIndexMode:x,children:e})}const uM={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function cM({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:s,edgeTypes:i,onNodeClick:l,onEdgeClick:a,onInit:u,onMove:h,onMoveStart:f,onMoveEnd:d,onConnect:x,onConnectStart:y,onConnectEnd:w,onClickConnectStart:N,onClickConnectEnd:p,onNodeMouseEnter:v,onNodeMouseMove:m,onNodeMouseLeave:S,onNodeContextMenu:k,onNodeDoubleClick:E,onNodeDragStart:b,onNodeDrag:_,onNodeDragStop:R,onNodesDelete:D,onEdgesDelete:I,onDelete:T,onSelectionChange:F,onSelectionDragStart:j,onSelectionDrag:A,onSelectionDragStop:M,onSelectionContextMenu:z,onSelectionStart:C,onSelectionEnd:P,onBeforeDelete:L,connectionMode:O,connectionLineType:$=En.Bezier,connectionLineStyle:U,connectionLineComponent:V,connectionLineContainerStyle:Y,deleteKeyCode:G="Backspace",selectionKeyCode:X="Shift",selectionOnDrag:H=!1,selectionMode:Q=_s.Full,panActivationKeyCode:ne="Space",multiSelectionKeyCode:J=Ms()?"Meta":"Control",zoomActivationKeyCode:Z=Ms()?"Meta":"Control",snapToGrid:q,snapGrid:le,onlyRenderVisibleElements:de=!1,selectNodesOnDrag:ie,nodesDraggable:$e,autoPanOnNodeFocus:hn,nodesConnectable:Xt,nodesFocusable:Un,nodeOrigin:No=s0,edgesFocusable:ko,edgesReconnectable:Eo,elementsSelectable:Na=!0,defaultViewport:Ys=zP,minZoom:xr=.5,maxZoom:bo=2,translateExtent:xf=js,preventScrolling:zv=!0,nodeExtent:ka,defaultMarkerColor:Dv="#b1b1b7",zoomOnScroll:$v=!0,zoomOnPinch:Ov=!0,panOnScroll:Fv=!1,panOnScrollSpeed:Bv=.5,panOnScrollMode:Hv=rr.Free,zoomOnDoubleClick:Vv=!0,panOnDrag:Uv=!0,onPaneClick:Wv,onPaneMouseEnter:Yv,onPaneMouseMove:Gv,onPaneMouseLeave:Xv,onPaneScroll:Kv,onPaneContextMenu:Qv,paneClickDistance:qv=1,nodeClickDistance:Zv=0,children:Jv,onReconnect:ew,onReconnectStart:tw,onReconnectEnd:nw,onEdgeContextMenu:rw,onEdgeDoubleClick:ow,onEdgeMouseEnter:sw,onEdgeMouseMove:iw,onEdgeMouseLeave:lw,reconnectRadius:aw=10,onNodesChange:uw,onEdgesChange:cw,noDragClassName:dw="nodrag",noWheelClassName:fw="nowheel",noPanClassName:vf="nopan",fitView:wf,fitViewOptions:Sf,connectOnClick:hw,attributionPosition:pw,proOptions:mw,defaultEdgeOptions:gw,elevateNodesOnSelect:yw=!0,elevateEdgesOnSelect:xw=!1,disableKeyboardA11y:Nf=!1,autoPanOnConnect:vw,autoPanOnNodeDrag:ww,autoPanSpeed:Sw,connectionRadius:Nw,isValidConnection:kw,onError:Ew,style:bw,id:kf,nodeDragThreshold:Cw,connectionDragThreshold:jw,viewport:_w,onViewportChange:Pw,width:Mw,height:Rw,colorMode:Tw="light",debug:Iw,onScroll:Gs,ariaLabelConfig:Lw,zIndexMode:Ef="basic",...Aw},zw){const Ea=kf||"1",Dw=FP(Tw),$w=g.useCallback(bf=>{bf.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Gs==null||Gs(bf)},[Gs]);return c.jsx("div",{"data-testid":"rf__wrapper",...Aw,onScroll:$w,style:{...bw,...uM},ref:zw,className:je(["react-flow",o,Dw]),id:kf,role:"application",children:c.jsxs(aM,{nodes:e,edges:t,width:Mw,height:Rw,fitView:wf,fitViewOptions:Sf,minZoom:xr,maxZoom:bo,nodeOrigin:No,nodeExtent:ka,zIndexMode:Ef,children:[c.jsx(sM,{onInit:u,onNodeClick:l,onEdgeClick:a,onNodeMouseEnter:v,onNodeMouseMove:m,onNodeMouseLeave:S,onNodeContextMenu:k,onNodeDoubleClick:E,nodeTypes:s,edgeTypes:i,connectionLineType:$,connectionLineStyle:U,connectionLineComponent:V,connectionLineContainerStyle:Y,selectionKeyCode:X,selectionOnDrag:H,selectionMode:Q,deleteKeyCode:G,multiSelectionKeyCode:J,panActivationKeyCode:ne,zoomActivationKeyCode:Z,onlyRenderVisibleElements:de,defaultViewport:Ys,translateExtent:xf,minZoom:xr,maxZoom:bo,preventScrolling:zv,zoomOnScroll:$v,zoomOnPinch:Ov,zoomOnDoubleClick:Vv,panOnScroll:Fv,panOnScrollSpeed:Bv,panOnScrollMode:Hv,panOnDrag:Uv,onPaneClick:Wv,onPaneMouseEnter:Yv,onPaneMouseMove:Gv,onPaneMouseLeave:Xv,onPaneScroll:Kv,onPaneContextMenu:Qv,paneClickDistance:qv,nodeClickDistance:Zv,onSelectionContextMenu:z,onSelectionStart:C,onSelectionEnd:P,onReconnect:ew,onReconnectStart:tw,onReconnectEnd:nw,onEdgeContextMenu:rw,onEdgeDoubleClick:ow,onEdgeMouseEnter:sw,onEdgeMouseMove:iw,onEdgeMouseLeave:lw,reconnectRadius:aw,defaultMarkerColor:Dv,noDragClassName:dw,noWheelClassName:fw,noPanClassName:vf,rfId:Ea,disableKeyboardA11y:Nf,nodeExtent:ka,viewport:_w,onViewportChange:Pw}),c.jsx(OP,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:x,onConnectStart:y,onConnectEnd:w,onClickConnectStart:N,onClickConnectEnd:p,nodesDraggable:$e,autoPanOnNodeFocus:hn,nodesConnectable:Xt,nodesFocusable:Un,edgesFocusable:ko,edgesReconnectable:Eo,elementsSelectable:Na,elevateNodesOnSelect:yw,elevateEdgesOnSelect:xw,minZoom:xr,maxZoom:bo,nodeExtent:ka,onNodesChange:uw,onEdgesChange:cw,snapToGrid:q,snapGrid:le,connectionMode:O,translateExtent:xf,connectOnClick:hw,defaultEdgeOptions:gw,fitView:wf,fitViewOptions:Sf,onNodesDelete:D,onEdgesDelete:I,onDelete:T,onNodeDragStart:b,onNodeDrag:_,onNodeDragStop:R,onSelectionDrag:A,onSelectionDragStart:j,onSelectionDragStop:M,onMove:h,onMoveStart:f,onMoveEnd:d,noPanClassName:vf,nodeOrigin:No,rfId:Ea,autoPanOnConnect:vw,autoPanOnNodeDrag:ww,autoPanSpeed:Sw,onError:Ew,connectionRadius:Nw,isValidConnection:kw,selectNodesOnDrag:ie,nodeDragThreshold:Cw,connectionDragThreshold:jw,onBeforeDelete:L,debug:Iw,ariaLabelConfig:Lw,zIndexMode:Ef}),c.jsx(AP,{onSelectionChange:F}),Jv,c.jsx(MP,{proOptions:mw,position:pw}),c.jsx(PP,{rfId:Ea,disableKeyboardA11y:Nf})]})})}var dM=l0(cM);function fM({dimensions:e,lineWidth:t,variant:n,className:r}){return c.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:je(["react-flow__background-pattern",n,r])})}function hM({radius:e,className:t}){return c.jsx("circle",{cx:e,cy:e,r:e,className:je(["react-flow__background-pattern","dots",t])})}var An;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(An||(An={}));const pM={[An.Dots]:1,[An.Lines]:1,[An.Cross]:6},mM=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function R0({id:e,variant:t=An.Dots,gap:n=20,size:r,lineWidth:o=1,offset:s=0,color:i,bgColor:l,style:a,className:u,patternClassName:h}){const f=g.useRef(null),{transform:d,patternId:x}=oe(mM,ye),y=r||pM[t],w=t===An.Dots,N=t===An.Cross,p=Array.isArray(n)?n:[n,n],v=[p[0]*d[2]||1,p[1]*d[2]||1],m=y*d[2],S=Array.isArray(s)?s:[s,s],k=N?[m,m]:v,E=[S[0]*d[2]||1+k[0]/2,S[1]*d[2]||1+k[1]/2],b=`${x}${e||""}`;return c.jsxs("svg",{className:je(["react-flow__background",u]),style:{...a,...pa,"--xy-background-color-props":l,"--xy-background-pattern-color-props":i},ref:f,"data-testid":"rf__background",children:[c.jsx("pattern",{id:b,x:d[0]%v[0],y:d[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:w?c.jsx(hM,{radius:m/2,className:h}):c.jsx(fM,{dimensions:k,lineWidth:o,variant:t,className:h})}),c.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${b})`})]})}R0.displayName="Background";const gM=g.memo(R0);function yM(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:c.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function xM(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:c.jsx("path",{d:"M0 0h32v4.2H0z"})})}function vM(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:c.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 wM(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:c.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 SM(){return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:c.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 Si({children:e,className:t,...n}){return c.jsx("button",{type:"button",className:je(["react-flow__controls-button",t]),...n,children:e})}const NM=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function T0({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:s,onZoomOut:i,onFitView:l,onInteractiveChange:a,className:u,children:h,position:f="bottom-left",orientation:d="vertical","aria-label":x}){const y=xe(),{isInteractive:w,minZoomReached:N,maxZoomReached:p,ariaLabelConfig:v}=oe(NM,ye),{zoomIn:m,zoomOut:S,fitView:k}=rf(),E=()=>{m(),s==null||s()},b=()=>{S(),i==null||i()},_=()=>{k(o),l==null||l()},R=()=>{y.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),a==null||a(!w)},D=d==="horizontal"?"horizontal":"vertical";return c.jsxs(ha,{className:je(["react-flow__controls",D,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":x??v["controls.ariaLabel"],children:[t&&c.jsxs(c.Fragment,{children:[c.jsx(Si,{onClick:E,className:"react-flow__controls-zoomin",title:v["controls.zoomIn.ariaLabel"],"aria-label":v["controls.zoomIn.ariaLabel"],disabled:p,children:c.jsx(yM,{})}),c.jsx(Si,{onClick:b,className:"react-flow__controls-zoomout",title:v["controls.zoomOut.ariaLabel"],"aria-label":v["controls.zoomOut.ariaLabel"],disabled:N,children:c.jsx(xM,{})})]}),n&&c.jsx(Si,{className:"react-flow__controls-fitview",onClick:_,title:v["controls.fitView.ariaLabel"],"aria-label":v["controls.fitView.ariaLabel"],children:c.jsx(vM,{})}),r&&c.jsx(Si,{className:"react-flow__controls-interactive",onClick:R,title:v["controls.interactive.ariaLabel"],"aria-label":v["controls.interactive.ariaLabel"],children:w?c.jsx(SM,{}):c.jsx(wM,{})}),h]})}T0.displayName="Controls";const kM=g.memo(T0);function EM({id:e,x:t,y:n,width:r,height:o,style:s,color:i,strokeColor:l,strokeWidth:a,className:u,borderRadius:h,shapeRendering:f,selected:d,onClick:x}){const{background:y,backgroundColor:w}=s||{},N=i||y||w;return c.jsx("rect",{className:je(["react-flow__minimap-node",{selected:d},u]),x:t,y:n,rx:h,ry:h,width:r,height:o,style:{fill:N,stroke:l,strokeWidth:a},shapeRendering:f,onClick:x?p=>x(p,e):void 0})}const bM=g.memo(EM),CM=e=>e.nodes.map(t=>t.id),uu=e=>e instanceof Function?e:()=>e;function jM({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:s=bM,onClick:i}){const l=oe(CM,ye),a=uu(t),u=uu(e),h=uu(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return c.jsx(c.Fragment,{children:l.map(d=>c.jsx(PM,{id:d,nodeColorFunc:a,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:s,onClick:i,shapeRendering:f},d))})}function _M({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:s,shapeRendering:i,NodeComponent:l,onClick:a}){const{node:u,x:h,y:f,width:d,height:x}=oe(y=>{const{internals:w}=y.nodeLookup.get(e),N=w.userNode,{x:p,y:v}=w.positionAbsolute,{width:m,height:S}=fn(N);return{node:N,x:p,y:v,width:m,height:S}},ye);return!u||u.hidden||!Rx(u)?null:c.jsx(l,{x:h,y:f,width:d,height:x,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:o,strokeColor:n(u),strokeWidth:s,shapeRendering:i,onClick:a,id:u.id})}const PM=g.memo(_M);var MM=g.memo(jM);const RM=200,TM=150,IM=e=>!e.hidden,LM=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?Mx(Hs(e.nodeLookup,{filter:IM}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},AM="react-flow__minimap-desc";function I0({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:i,nodeComponent:l,bgColor:a,maskColor:u,maskStrokeColor:h,maskStrokeWidth:f,position:d="bottom-right",onClick:x,onNodeClick:y,pannable:w=!1,zoomable:N=!1,ariaLabel:p,inversePan:v,zoomStep:m=1,offsetScale:S=5}){const k=xe(),E=g.useRef(null),{boundingRect:b,viewBB:_,rfId:R,panZoom:D,translateExtent:I,flowWidth:T,flowHeight:F,ariaLabelConfig:j}=oe(LM,ye),A=(e==null?void 0:e.width)??RM,M=(e==null?void 0:e.height)??TM,z=b.width/A,C=b.height/M,P=Math.max(z,C),L=P*A,O=P*M,$=S*P,U=b.x-(L-b.width)/2-$,V=b.y-(O-b.height)/2-$,Y=L+$*2,G=O+$*2,X=`${AM}-${R}`,H=g.useRef(0),Q=g.useRef();H.current=P,g.useEffect(()=>{if(E.current&&D)return Q.current=z_({domNode:E.current,panZoom:D,getTransform:()=>k.getState().transform,getViewScale:()=>H.current}),()=>{var q;(q=Q.current)==null||q.destroy()}},[D]),g.useEffect(()=>{var q;(q=Q.current)==null||q.update({translateExtent:I,width:T,height:F,inversePan:v,pannable:w,zoomStep:m,zoomable:N})},[w,N,v,m,I,T,F]);const ne=x?q=>{var ie;const[le,de]=((ie=Q.current)==null?void 0:ie.pointer(q))||[0,0];x(q,{x:le,y:de})}:void 0,J=y?g.useCallback((q,le)=>{const de=k.getState().nodeLookup.get(le).internals.userNode;y(q,de)},[]):void 0,Z=p??j["minimap.ariaLabel"];return c.jsx(ha,{position:d,style:{...e,"--xy-minimap-background-color-props":typeof a=="string"?a: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 f=="number"?f*P: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:je(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:c.jsxs("svg",{width:A,height:M,viewBox:`${U} ${V} ${Y} ${G}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":X,ref:E,onClick:ne,children:[Z&&c.jsx("title",{id:X,children:Z}),c.jsx(MM,{onClick:J,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:o,nodeStrokeWidth:i,nodeComponent:l}),c.jsx("path",{className:"react-flow__minimap-mask",d:`M${U-$},${V-$}h${Y+$*2}v${G+$*2}h${-Y-$*2}z
|
|
293
|
+
M${_.x},${_.y}h${_.width}v${_.height}h${-_.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}I0.displayName="MiniMap";g.memo(I0);const zM=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,DM={[ho.Line]:"right",[ho.Handle]:"bottom-right"};function $M({nodeId:e,position:t,variant:n=ho.Handle,className:r,style:o=void 0,children:s,color:i,minWidth:l=10,minHeight:a=10,maxWidth:u=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:d,autoScale:x=!0,shouldResize:y,onResizeStart:w,onResize:N,onResizeEnd:p}){const v=d0(),m=typeof e=="string"?e:v,S=xe(),k=g.useRef(null),E=n===ho.Handle,b=oe(g.useCallback(zM(E&&x),[E,x]),ye),_=g.useRef(null),R=t??DM[n];g.useEffect(()=>{if(!(!k.current||!m))return _.current||(_.current=Q_({domNode:k.current,nodeId:m,getStoreItems:()=>{const{nodeLookup:I,transform:T,snapGrid:F,snapToGrid:j,nodeOrigin:A,domNode:M}=S.getState();return{nodeLookup:I,transform:T,snapGrid:F,snapToGrid:j,nodeOrigin:A,paneDomNode:M}},onChange:(I,T)=>{const{triggerNodeChanges:F,nodeLookup:j,parentLookup:A,nodeOrigin:M}=S.getState(),z=[],C={x:I.x,y:I.y},P=j.get(m);if(P&&P.expandParent&&P.parentId){const L=P.origin??M,O=I.width??P.measured.width??0,$=I.height??P.measured.height??0,U={id:P.id,parentId:P.parentId,rect:{width:O,height:$,...Tx({x:I.x??P.position.x,y:I.y??P.position.y},{width:O,height:$},P.parentId,j,L)}},V=nf([U],j,A,M);z.push(...V),C.x=I.x?Math.max(L[0]*O,I.x):void 0,C.y=I.y?Math.max(L[1]*$,I.y):void 0}if(C.x!==void 0&&C.y!==void 0){const L={id:m,type:"position",position:{...C}};z.push(L)}if(I.width!==void 0&&I.height!==void 0){const O={id:m,type:"dimensions",resizing:!0,setAttributes:d?d==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};z.push(O)}for(const L of T){const O={...L,type:"position"};z.push(O)}F(z)},onEnd:({width:I,height:T})=>{const F={id:m,type:"dimensions",resizing:!1,dimensions:{width:I,height:T}};S.getState().triggerNodeChanges([F])}})),_.current.update({controlPosition:R,boundaries:{minWidth:l,minHeight:a,maxWidth:u,maxHeight:h},keepAspectRatio:f,resizeDirection:d,onResizeStart:w,onResize:N,onResizeEnd:p,shouldResize:y}),()=>{var I;(I=_.current)==null||I.destroy()}},[R,l,a,u,h,f,w,N,p,y]);const D=R.split("-");return c.jsx("div",{className:je(["react-flow__resize-control","nodrag",...D,n,r]),ref:k,style:{...o,scale:b,...i&&{[E?"backgroundColor":"borderColor"]:i}},children:s})}g.memo($M);function OM(){const[e,t]=g.useState(()=>document.documentElement.classList.contains("dark"));return g.useEffect(()=>{const n=new MutationObserver(()=>t(document.documentElement.classList.contains("dark")));return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()},[]),e}function FM(){const[e,t]=g.useState([]),[n,r]=g.useState([]),[o,s]=g.useState(!0),i=OM();g.useEffect(()=>{Promise.all([Re.discovery.agents(),Re.observations.permissions()]).then(([u,h])=>{t(u.data??[]),r(h.data??[]),s(!1)}).catch(()=>s(!1))},[]);const{nodes:l,edges:a}=g.useMemo(()=>{const u=[],h=[],f=new Set,d=new Map,x=i?{background:"#18181b",color:"#fafafa",border:"1px solid #3f3f46"}:{background:"#ffffff",color:"#09090b",border:"1px solid #e4e4e7"},y=i?{background:"#09090b",color:"#a1a1aa",border:"1px solid #3f3f46"}:{background:"#f4f4f5",color:"#52525b",border:"1px solid #d4d4d8"},w=i?"#52525b":"#a1a1aa",N=i?"#27272a":"#e4e4e7";return e.forEach((p,v)=>{const m=`agent-${p.id}`;p.registeredAgentId&&d.set(p.registeredAgentId,m),d.set(p.id,m),u.push({id:m,position:{x:100,y:v*120},data:{label:`${p.emoji||"🤖"} ${p.name}`},style:{...x,borderRadius:"8px",padding:"8px 16px",fontSize:"13px"}})}),n.forEach(p=>{const v=`tool-${p.toolName}`;f.has(p.toolName)||(f.add(p.toolName),u.push({id:v,position:{x:400,y:f.size*80},data:{label:`🔧 ${p.toolName}`},style:{...y,borderRadius:"8px",padding:"6px 12px",fontSize:"12px"}}));const m=d.get(p.agentId)??`agent-${p.agentId}`;h.push({id:`e-${p.agentId}-${p.toolName}`,source:m,target:v,animated:p.accessPattern==="write",style:{stroke:p.accessPattern==="write"?"#eab308":w}})}),{nodes:u,edges:h,bgColor:N}},[e,n,i]);return o?c.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Identity Graph"}),c.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Agent-to-tool relationship visualization"})]}),c.jsx("div",{className:"h-[600px] rounded-lg border border-border bg-card",children:c.jsxs(dM,{nodes:l,edges:a,fitView:!0,proOptions:{hideAttribution:!0},children:[c.jsx(gM,{color:i?"#27272a":"#e4e4e7",gap:20}),c.jsx(kM,{})]})})]})}const sf=g.forwardRef(({className:e,...t},n)=>c.jsx("textarea",{className:be("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}));sf.displayName="Textarea";const or=g.forwardRef(({className:e,...t},n)=>c.jsx("label",{ref:n,className:be("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));or.displayName="Label";function ze(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function BM(e,t){const n=g.createContext(t);function r(s){const{children:i,...l}=s,a=g.useMemo(()=>l,Object.values(l));return c.jsx(n.Provider,{value:a,children:i})}function o(s){const i=g.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function ga(e,t=[]){let n=[];function r(s,i){const l=g.createContext(i),a=n.length;n=[...n,i];function u(f){const{scope:d,children:x,...y}=f,w=(d==null?void 0:d[e][a])||l,N=g.useMemo(()=>y,Object.values(y));return c.jsx(w.Provider,{value:N,children:x})}function h(f,d){const x=(d==null?void 0:d[e][a])||l,y=g.useContext(x);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return u.displayName=s+"Provider",[u,h]}const o=()=>{const s=n.map(i=>g.createContext(i));return function(l){const a=(l==null?void 0:l[e])||s;return g.useMemo(()=>({[`__scope${e}`]:{...l,[e]:a}}),[l,a])}};return o.scopeName=e,[r,HM(o,...t)]}function HM(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((l,{useScope:a,scopeName:u})=>{const f=a(s)[`__scope${u}`];return{...l,...f}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function VM(e){const t=e+"CollectionProvider",[n,r]=ga(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=x=>{const{scope:y,children:w}=x,N=Dt.useRef(null),p=Dt.useRef(new Map).current;return c.jsx(o,{scope:y,itemMap:p,collectionRef:N,children:w})};i.displayName=t;const l=e+"CollectionSlot",a=Dt.forwardRef((x,y)=>{const{scope:w,children:N}=x,p=s(l,w),v=Ut(y,p.collectionRef);return c.jsx(so,{ref:v,children:N})});a.displayName=l;const u=e+"CollectionItemSlot",h="data-radix-collection-item",f=Dt.forwardRef((x,y)=>{const{scope:w,children:N,...p}=x,v=Dt.useRef(null),m=Ut(y,v),S=s(u,w);return Dt.useEffect(()=>(S.itemMap.set(v,{ref:v,...p}),()=>void S.itemMap.delete(v))),c.jsx(so,{[h]:"",ref:m,children:N})});f.displayName=u;function d(x){const y=s(e+"CollectionConsumer",x);return Dt.useCallback(()=>{const N=y.collectionRef.current;if(!N)return[];const p=Array.from(N.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((S,k)=>p.indexOf(S.ref.current)-p.indexOf(k.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:a,ItemSlot:f},d,r]}var Ll=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},UM=t1.useId||(()=>{}),WM=0;function rs(e){const[t,n]=g.useState(UM());return Ll(()=>{n(r=>r??String(WM++))},[e]),t?`radix-${t}`:""}var YM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ke=YM.reduce((e,t)=>{const n=g.forwardRef((r,o)=>{const{asChild:s,...i}=r,l=s?so:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...i,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function GM(e,t){e&&Zl.flushSync(()=>e.dispatchEvent(t))}function Fn(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function lf({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=XM({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:r,l=Fn(n),a=g.useCallback(u=>{if(s){const f=typeof u=="function"?u(e):u;f!==e&&l(f)}else o(u)},[s,e,o,l]);return[i,a]}function XM({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,o=g.useRef(r),s=Fn(t);return g.useEffect(()=>{o.current!==r&&(s(r),o.current=r)},[r,o,s]),n}var KM=g.createContext(void 0);function L0(e){const t=g.useContext(KM);return e||t||"ltr"}var cu="rovingFocusGroup.onEntryFocus",QM={bubbles:!1,cancelable:!0},ya="RovingFocusGroup",[Tc,A0,qM]=VM(ya),[ZM,z0]=ga(ya,[qM]),[JM,e4]=ZM(ya),D0=g.forwardRef((e,t)=>c.jsx(Tc.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Tc.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(t4,{...e,ref:t})})}));D0.displayName=ya;var t4=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:a,onEntryFocus:u,preventScrollOnEntryFocus:h=!1,...f}=e,d=g.useRef(null),x=Ut(t,d),y=L0(s),[w=null,N]=lf({prop:i,defaultProp:l,onChange:a}),[p,v]=g.useState(!1),m=Fn(u),S=A0(n),k=g.useRef(!1),[E,b]=g.useState(0);return g.useEffect(()=>{const _=d.current;if(_)return _.addEventListener(cu,m),()=>_.removeEventListener(cu,m)},[m]),c.jsx(JM,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:w,onItemFocus:g.useCallback(_=>N(_),[N]),onItemShiftTab:g.useCallback(()=>v(!0),[]),onFocusableItemAdd:g.useCallback(()=>b(_=>_+1),[]),onFocusableItemRemove:g.useCallback(()=>b(_=>_-1),[]),children:c.jsx(Ke.div,{tabIndex:p||E===0?-1:0,"data-orientation":r,...f,ref:x,style:{outline:"none",...e.style},onMouseDown:ze(e.onMouseDown,()=>{k.current=!0}),onFocus:ze(e.onFocus,_=>{const R=!k.current;if(_.target===_.currentTarget&&R&&!p){const D=new CustomEvent(cu,QM);if(_.currentTarget.dispatchEvent(D),!D.defaultPrevented){const I=S().filter(M=>M.focusable),T=I.find(M=>M.active),F=I.find(M=>M.id===w),A=[T,F,...I].filter(Boolean).map(M=>M.ref.current);F0(A,h)}}k.current=!1}),onBlur:ze(e.onBlur,()=>v(!1))})})}),$0="RovingFocusGroupItem",O0=g.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...i}=e,l=rs(),a=s||l,u=e4($0,n),h=u.currentTabStopId===a,f=A0(n),{onFocusableItemAdd:d,onFocusableItemRemove:x}=u;return g.useEffect(()=>{if(r)return d(),()=>x()},[r,d,x]),c.jsx(Tc.ItemSlot,{scope:n,id:a,focusable:r,active:o,children:c.jsx(Ke.span,{tabIndex:h?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:ze(e.onMouseDown,y=>{r?u.onItemFocus(a):y.preventDefault()}),onFocus:ze(e.onFocus,()=>u.onItemFocus(a)),onKeyDown:ze(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){u.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const w=o4(y,u.orientation,u.dir);if(w!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let p=f().filter(v=>v.focusable).map(v=>v.ref.current);if(w==="last")p.reverse();else if(w==="prev"||w==="next"){w==="prev"&&p.reverse();const v=p.indexOf(y.currentTarget);p=u.loop?s4(p,v+1):p.slice(v+1)}setTimeout(()=>F0(p))}})})})});O0.displayName=$0;var n4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function r4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function o4(e,t,n){const r=r4(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return n4[r]}function F0(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function s4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var i4=D0,l4=O0;function a4(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var Ws=e=>{const{present:t,children:n}=e,r=u4(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),s=Ut(r.ref,c4(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:s}):null};Ws.displayName="Presence";function u4(e){const[t,n]=g.useState(),r=g.useRef({}),o=g.useRef(e),s=g.useRef("none"),i=e?"mounted":"unmounted",[l,a]=a4(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=Ni(r.current);s.current=l==="mounted"?u:"none"},[l]),Ll(()=>{const u=r.current,h=o.current;if(h!==e){const d=s.current,x=Ni(u);e?a("MOUNT"):x==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(h&&d!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),Ll(()=>{if(t){const u=f=>{const x=Ni(r.current).includes(f.animationName);f.target===t&&x&&Zl.flushSync(()=>a("ANIMATION_END"))},h=f=>{f.target===t&&(s.current=Ni(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 a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ni(e){return(e==null?void 0:e.animationName)||"none"}function c4(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var af="Tabs",[d4]=ga(af,[z0]),B0=z0(),[f4,uf]=d4(af),H0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:l,activationMode:a="automatic",...u}=e,h=L0(l),[f,d]=lf({prop:r,onChange:o,defaultProp:s});return c.jsx(f4,{scope:n,baseId:rs(),value:f,onValueChange:d,orientation:i,dir:h,activationMode:a,children:c.jsx(Ke.div,{dir:h,"data-orientation":i,...u,ref:t})})});H0.displayName=af;var V0="TabsList",U0=g.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=uf(V0,n),i=B0(n);return c.jsx(i4,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:c.jsx(Ke.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});U0.displayName=V0;var W0="TabsTrigger",Y0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=uf(W0,n),l=B0(n),a=K0(i.baseId,r),u=Q0(i.baseId,r),h=r===i.value;return c.jsx(l4,{asChild:!0,...l,focusable:!o,active:h,children:c.jsx(Ke.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":u,"data-state":h?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:a,...s,ref:t,onMouseDown:ze(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:ze(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:ze(e.onFocus,()=>{const f=i.activationMode!=="manual";!h&&!o&&f&&i.onValueChange(r)})})})});Y0.displayName=W0;var G0="TabsContent",X0=g.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,l=uf(G0,n),a=K0(l.baseId,r),u=Q0(l.baseId,r),h=r===l.value,f=g.useRef(h);return g.useEffect(()=>{const d=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(d)},[]),c.jsx(Ws,{present:o||h,children:({present:d})=>c.jsx(Ke.div,{"data-state":h?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":a,hidden:!d,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:d&&s})})});X0.displayName=G0;function K0(e,t){return`${e}-trigger-${t}`}function Q0(e,t){return`${e}-content-${t}`}var h4=H0,q0=U0,Z0=Y0,J0=X0;const ev=h4,cf=g.forwardRef(({className:e,...t},n)=>c.jsx(q0,{ref:n,className:be("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));cf.displayName=q0.displayName;const Yr=g.forwardRef(({className:e,...t},n)=>c.jsx(Z0,{ref:n,className:be("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}));Yr.displayName=Z0.displayName;const Gr=g.forwardRef(({className:e,...t},n)=>c.jsx(J0,{ref:n,className:be("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Gr.displayName=J0.displayName;function p4(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e);g.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var m4="DismissableLayer",Ic="dismissableLayer.update",g4="dismissableLayer.pointerDownOutside",y4="dismissableLayer.focusOutside",Yp,tv=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nv=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...a}=e,u=g.useContext(tv),[h,f]=g.useState(null),d=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,x]=g.useState({}),y=Ut(t,b=>f(b)),w=Array.from(u.layers),[N]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=w.indexOf(N),v=h?w.indexOf(h):-1,m=u.layersWithOutsidePointerEventsDisabled.size>0,S=v>=p,k=w4(b=>{const _=b.target,R=[...u.branches].some(D=>D.contains(_));!S||R||(o==null||o(b),i==null||i(b),b.defaultPrevented||l==null||l())},d),E=S4(b=>{const _=b.target;[...u.branches].some(D=>D.contains(_))||(s==null||s(b),i==null||i(b),b.defaultPrevented||l==null||l())},d);return p4(b=>{v===u.layers.size-1&&(r==null||r(b),!b.defaultPrevented&&l&&(b.preventDefault(),l()))},d),g.useEffect(()=>{if(h)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Yp=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),Gp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Yp)}},[h,d,n,u]),g.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),Gp())},[h,u]),g.useEffect(()=>{const b=()=>x({});return document.addEventListener(Ic,b),()=>document.removeEventListener(Ic,b)},[]),c.jsx(Ke.div,{...a,ref:y,style:{pointerEvents:m?S?"auto":"none":void 0,...e.style},onFocusCapture:ze(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ze(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ze(e.onPointerDownCapture,k.onPointerDownCapture)})});nv.displayName=m4;var x4="DismissableLayerBranch",v4=g.forwardRef((e,t)=>{const n=g.useContext(tv),r=g.useRef(null),o=Ut(t,r);return g.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(Ke.div,{...e,ref:o})});v4.displayName=x4;function w4(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let a=function(){rv(g4,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function S4(e,t=globalThis==null?void 0:globalThis.document){const n=Fn(e),r=g.useRef(!1);return g.useEffect(()=>{const o=s=>{s.target&&!r.current&&rv(y4,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Gp(){const e=new CustomEvent(Ic);document.dispatchEvent(e)}function rv(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?GM(o,s):o.dispatchEvent(s)}var du="focusScope.autoFocusOnMount",fu="focusScope.autoFocusOnUnmount",Xp={bubbles:!1,cancelable:!0},N4="FocusScope",ov=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[l,a]=g.useState(null),u=Fn(o),h=Fn(s),f=g.useRef(null),d=Ut(t,w=>a(w)),x=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let w=function(m){if(x.paused||!l)return;const S=m.target;l.contains(S)?f.current=S:vn(f.current,{select:!0})},N=function(m){if(x.paused||!l)return;const S=m.relatedTarget;S!==null&&(l.contains(S)||vn(f.current,{select:!0}))},p=function(m){if(document.activeElement===document.body)for(const k of m)k.removedNodes.length>0&&vn(l)};document.addEventListener("focusin",w),document.addEventListener("focusout",N);const v=new MutationObserver(p);return l&&v.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",N),v.disconnect()}}},[r,l,x.paused]),g.useEffect(()=>{if(l){Qp.add(x);const w=document.activeElement;if(!l.contains(w)){const p=new CustomEvent(du,Xp);l.addEventListener(du,u),l.dispatchEvent(p),p.defaultPrevented||(k4(_4(sv(l)),{select:!0}),document.activeElement===w&&vn(l))}return()=>{l.removeEventListener(du,u),setTimeout(()=>{const p=new CustomEvent(fu,Xp);l.addEventListener(fu,h),l.dispatchEvent(p),p.defaultPrevented||vn(w??document.body,{select:!0}),l.removeEventListener(fu,h),Qp.remove(x)},0)}}},[l,u,h,x]);const y=g.useCallback(w=>{if(!n&&!r||x.paused)return;const N=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,p=document.activeElement;if(N&&p){const v=w.currentTarget,[m,S]=E4(v);m&&S?!w.shiftKey&&p===S?(w.preventDefault(),n&&vn(m,{select:!0})):w.shiftKey&&p===m&&(w.preventDefault(),n&&vn(S,{select:!0})):p===v&&w.preventDefault()}},[n,r,x.paused]);return c.jsx(Ke.div,{tabIndex:-1,...i,ref:d,onKeyDown:y})});ov.displayName=N4;function k4(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(vn(r,{select:t}),document.activeElement!==n)return}function E4(e){const t=sv(e),n=Kp(t,e),r=Kp(t.reverse(),e);return[n,r]}function sv(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kp(e,t){for(const n of e)if(!b4(n,{upTo:t}))return n}function b4(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 C4(e){return e instanceof HTMLInputElement&&"select"in e}function vn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&C4(e)&&t&&e.select()}}var Qp=j4();function j4(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=qp(e,t),e.unshift(t)},remove(t){var n;e=qp(e,t),(n=e[0])==null||n.resume()}}}function qp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _4(e){return e.filter(t=>t.tagName!=="A")}var P4="Portal",iv=g.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,s]=g.useState(!1);Ll(()=>s(!0),[]);const i=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?f2.createPortal(c.jsx(Ke.div,{...r,ref:t}),i):null});iv.displayName=P4;var hu=0;function M4(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Zp()),document.body.insertAdjacentElement("beforeend",e[1]??Zp()),hu++,()=>{hu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),hu--}},[])}function Zp(){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 Ft=function(){return Ft=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ft.apply(this,arguments)};function lv(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function R4(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Gi="right-scroll-bar-position",Xi="width-before-scroll-bar",T4="with-scroll-bars-hidden",I4="--removed-body-scroll-bar-size";function pu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function L4(e,t){var n=g.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var A4=typeof window<"u"?g.useLayoutEffect:g.useEffect,Jp=new WeakMap;function z4(e,t){var n=L4(null,function(r){return e.forEach(function(o){return pu(o,r)})});return A4(function(){var r=Jp.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(l){s.has(l)||pu(l,null)}),s.forEach(function(l){o.has(l)||pu(l,i)})}Jp.set(n,e)},[e]),n}function D4(e){return e}function $4(e,t){t===void 0&&(t=D4);var n=[],r=!1,o={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(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(l){return l!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var l=n;n=[],l.forEach(s),i=n}var a=function(){var h=i;i=[],h.forEach(s)},u=function(){return Promise.resolve().then(a)};u(),n={push:function(h){i.push(h),u()},filter:function(h){return i=i.filter(h),n}}}};return o}function O4(e){e===void 0&&(e={});var t=$4(null);return t.options=Ft({async:!0,ssr:!1},e),t}var av=function(e){var t=e.sideCar,n=lv(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 g.createElement(r,Ft({},n))};av.isSideCarExport=!0;function F4(e,t){return e.useMedium(t),av}var uv=O4(),mu=function(){},xa=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:mu,onWheelCapture:mu,onTouchMoveCapture:mu}),o=r[0],s=r[1],i=e.forwardProps,l=e.children,a=e.className,u=e.removeScrollBar,h=e.enabled,f=e.shards,d=e.sideCar,x=e.noIsolation,y=e.inert,w=e.allowPinchZoom,N=e.as,p=N===void 0?"div":N,v=e.gapMode,m=lv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=d,k=z4([n,t]),E=Ft(Ft({},m),o);return g.createElement(g.Fragment,null,h&&g.createElement(S,{sideCar:uv,removeScrollBar:u,shards:f,noIsolation:x,inert:y,setCallbacks:s,allowPinchZoom:!!w,lockRef:n,gapMode:v}),i?g.cloneElement(g.Children.only(l),Ft(Ft({},E),{ref:k})):g.createElement(p,Ft({},E,{className:a,ref:k}),l))});xa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xa.classNames={fullWidth:Xi,zeroRight:Gi};var B4=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function H4(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=B4();return t&&e.setAttribute("nonce",t),e}function V4(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function U4(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var W4=function(){var e=0,t=null;return{add:function(n){e==0&&(t=H4())&&(V4(t,n),U4(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Y4=function(){var e=W4();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},cv=function(){var e=Y4(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},G4={left:0,top:0,right:0,gap:0},gu=function(e){return parseInt(e||"",10)||0},X4=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[gu(n),gu(r),gu(o)]},K4=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return G4;var t=X4(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])}},Q4=cv(),Xr="data-scroll-locked",q4=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
294
|
+
.`.concat(T4,` {
|
|
295
|
+
overflow: hidden `).concat(r,`;
|
|
296
|
+
padding-right: `).concat(l,"px ").concat(r,`;
|
|
297
|
+
}
|
|
298
|
+
body[`).concat(Xr,`] {
|
|
299
|
+
overflow: hidden `).concat(r,`;
|
|
300
|
+
overscroll-behavior: contain;
|
|
301
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
302
|
+
padding-left: `.concat(o,`px;
|
|
303
|
+
padding-top: `).concat(s,`px;
|
|
304
|
+
padding-right: `).concat(i,`px;
|
|
305
|
+
margin-left:0;
|
|
306
|
+
margin-top:0;
|
|
307
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
308
|
+
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.`).concat(Gi,` {
|
|
312
|
+
right: `).concat(l,"px ").concat(r,`;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.`).concat(Xi,` {
|
|
316
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.`).concat(Gi," .").concat(Gi,` {
|
|
320
|
+
right: 0 `).concat(r,`;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.`).concat(Xi," .").concat(Xi,` {
|
|
324
|
+
margin-right: 0 `).concat(r,`;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
body[`).concat(Xr,`] {
|
|
328
|
+
`).concat(I4,": ").concat(l,`px;
|
|
329
|
+
}
|
|
330
|
+
`)},em=function(){var e=parseInt(document.body.getAttribute(Xr)||"0",10);return isFinite(e)?e:0},Z4=function(){g.useEffect(function(){return document.body.setAttribute(Xr,(em()+1).toString()),function(){var e=em()-1;e<=0?document.body.removeAttribute(Xr):document.body.setAttribute(Xr,e.toString())}},[])},J4=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Z4();var s=g.useMemo(function(){return K4(o)},[o]);return g.createElement(Q4,{styles:q4(s,!t,o,n?"":"!important")})},Lc=!1;if(typeof window<"u")try{var ki=Object.defineProperty({},"passive",{get:function(){return Lc=!0,!0}});window.addEventListener("test",ki,ki),window.removeEventListener("test",ki,ki)}catch{Lc=!1}var Sr=Lc?{passive:!1}:!1,e5=function(e){return e.tagName==="TEXTAREA"},dv=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!e5(e)&&n[t]==="visible")},t5=function(e){return dv(e,"overflowY")},n5=function(e){return dv(e,"overflowX")},tm=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=fv(e,r);if(o){var s=hv(e,r),i=s[1],l=s[2];if(i>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},r5=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},o5=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},fv=function(e,t){return e==="v"?t5(t):n5(t)},hv=function(e,t){return e==="v"?r5(t):o5(t)},s5=function(e,t){return e==="h"&&t==="rtl"?-1:1},i5=function(e,t,n,r,o){var s=s5(e,window.getComputedStyle(t).direction),i=s*r,l=n.target,a=t.contains(l),u=!1,h=i>0,f=0,d=0;do{var x=hv(e,l),y=x[0],w=x[1],N=x[2],p=w-N-s*y;(y||p)&&fv(e,l)&&(f+=p,d+=y),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!a&&l!==document.body||a&&(t.contains(l)||t===l));return(h&&Math.abs(f)<1||!h&&Math.abs(d)<1)&&(u=!0),u},Ei=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nm=function(e){return[e.deltaX,e.deltaY]},rm=function(e){return e&&"current"in e?e.current:e},l5=function(e,t){return e[0]===t[0]&&e[1]===t[1]},a5=function(e){return`
|
|
331
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
332
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
333
|
+
`)},u5=0,Nr=[];function c5(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(u5++)[0],s=g.useState(cv)[0],i=g.useRef(e);g.useEffect(function(){i.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=R4([e.lockRef.current],(e.shards||[]).map(rm),!0).filter(Boolean);return w.forEach(function(N){return N.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=g.useCallback(function(w,N){if("touches"in w&&w.touches.length===2)return!i.current.allowPinchZoom;var p=Ei(w),v=n.current,m="deltaX"in w?w.deltaX:v[0]-p[0],S="deltaY"in w?w.deltaY:v[1]-p[1],k,E=w.target,b=Math.abs(m)>Math.abs(S)?"h":"v";if("touches"in w&&b==="h"&&E.type==="range")return!1;var _=tm(b,E);if(!_)return!0;if(_?k=b:(k=b==="v"?"h":"v",_=tm(b,E)),!_)return!1;if(!r.current&&"changedTouches"in w&&(m||S)&&(r.current=k),!k)return!0;var R=r.current||k;return i5(R,N,w,R==="h"?m:S)},[]),a=g.useCallback(function(w){var N=w;if(!(!Nr.length||Nr[Nr.length-1]!==s)){var p="deltaY"in N?nm(N):Ei(N),v=t.current.filter(function(k){return k.name===N.type&&(k.target===N.target||N.target===k.shadowParent)&&l5(k.delta,p)})[0];if(v&&v.should){N.cancelable&&N.preventDefault();return}if(!v){var m=(i.current.shards||[]).map(rm).filter(Boolean).filter(function(k){return k.contains(N.target)}),S=m.length>0?l(N,m[0]):!i.current.noIsolation;S&&N.cancelable&&N.preventDefault()}}},[]),u=g.useCallback(function(w,N,p,v){var m={name:w,delta:N,target:p,should:v,shadowParent:d5(p)};t.current.push(m),setTimeout(function(){t.current=t.current.filter(function(S){return S!==m})},1)},[]),h=g.useCallback(function(w){n.current=Ei(w),r.current=void 0},[]),f=g.useCallback(function(w){u(w.type,nm(w),w.target,l(w,e.lockRef.current))},[]),d=g.useCallback(function(w){u(w.type,Ei(w),w.target,l(w,e.lockRef.current))},[]);g.useEffect(function(){return Nr.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",a,Sr),document.addEventListener("touchmove",a,Sr),document.addEventListener("touchstart",h,Sr),function(){Nr=Nr.filter(function(w){return w!==s}),document.removeEventListener("wheel",a,Sr),document.removeEventListener("touchmove",a,Sr),document.removeEventListener("touchstart",h,Sr)}},[]);var x=e.removeScrollBar,y=e.inert;return g.createElement(g.Fragment,null,y?g.createElement(s,{styles:a5(o)}):null,x?g.createElement(J4,{gapMode:e.gapMode}):null)}function d5(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const f5=F4(uv,c5);var pv=g.forwardRef(function(e,t){return g.createElement(xa,Ft({},e,{ref:t,sideCar:f5}))});pv.classNames=xa.classNames;var h5=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kr=new WeakMap,bi=new WeakMap,Ci={},yu=0,mv=function(e){return e&&(e.host||mv(e.parentNode))},p5=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=mv(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})},m5=function(e,t,n,r){var o=p5(t,Array.isArray(e)?e:[e]);Ci[n]||(Ci[n]=new WeakMap);var s=Ci[n],i=[],l=new Set,a=new Set(o),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};o.forEach(u);var h=function(f){!f||a.has(f)||Array.prototype.forEach.call(f.children,function(d){if(l.has(d))h(d);else try{var x=d.getAttribute(r),y=x!==null&&x!=="false",w=(kr.get(d)||0)+1,N=(s.get(d)||0)+1;kr.set(d,w),s.set(d,N),i.push(d),w===1&&y&&bi.set(d,!0),N===1&&d.setAttribute(n,"true"),y||d.setAttribute(r,"true")}catch(p){console.error("aria-hidden: cannot operate on ",d,p)}})};return h(t),l.clear(),yu++,function(){i.forEach(function(f){var d=kr.get(f)-1,x=s.get(f)-1;kr.set(f,d),s.set(f,x),d||(bi.has(f)||f.removeAttribute(r),bi.delete(f)),x||f.removeAttribute(n)}),yu--,yu||(kr=new WeakMap,kr=new WeakMap,bi=new WeakMap,Ci={})}},g5=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=h5(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),m5(r,o,n,"aria-hidden")):function(){return null}},df="Dialog",[gv]=ga(df),[y5,Lt]=gv(df),yv=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,l=g.useRef(null),a=g.useRef(null),[u=!1,h]=lf({prop:r,defaultProp:o,onChange:s});return c.jsx(y5,{scope:t,triggerRef:l,contentRef:a,contentId:rs(),titleId:rs(),descriptionId:rs(),open:u,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(f=>!f),[h]),modal:i,children:n})};yv.displayName=df;var xv="DialogTrigger",x5=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lt(xv,n),s=Ut(t,o.triggerRef);return c.jsx(Ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":pf(o.open),...r,ref:s,onClick:ze(e.onClick,o.onOpenToggle)})});x5.displayName=xv;var ff="DialogPortal",[v5,vv]=gv(ff,{forceMount:void 0}),wv=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Lt(ff,t);return c.jsx(v5,{scope:t,forceMount:n,children:g.Children.map(r,i=>c.jsx(Ws,{present:n||s.open,children:c.jsx(iv,{asChild:!0,container:o,children:i})}))})};wv.displayName=ff;var Al="DialogOverlay",Sv=g.forwardRef((e,t)=>{const n=vv(Al,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Lt(Al,e.__scopeDialog);return s.modal?c.jsx(Ws,{present:r||s.open,children:c.jsx(w5,{...o,ref:t})}):null});Sv.displayName=Al;var w5=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lt(Al,n);return c.jsx(pv,{as:so,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(Ke.div,{"data-state":pf(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),mr="DialogContent",Nv=g.forwardRef((e,t)=>{const n=vv(mr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Lt(mr,e.__scopeDialog);return c.jsx(Ws,{present:r||s.open,children:s.modal?c.jsx(S5,{...o,ref:t}):c.jsx(N5,{...o,ref:t})})});Nv.displayName=mr;var S5=g.forwardRef((e,t)=>{const n=Lt(mr,e.__scopeDialog),r=g.useRef(null),o=Ut(t,n.contentRef,r);return g.useEffect(()=>{const s=r.current;if(s)return g5(s)},[]),c.jsx(kv,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ze(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ze(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&s.preventDefault()}),onFocusOutside:ze(e.onFocusOutside,s=>s.preventDefault())})}),N5=g.forwardRef((e,t)=>{const n=Lt(mr,e.__scopeDialog),r=g.useRef(!1),o=g.useRef(!1);return c.jsx(kv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var a,u;(a=e.onInteractOutside)==null||a.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),kv=g.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,l=Lt(mr,n),a=g.useRef(null),u=Ut(t,a);return M4(),c.jsxs(c.Fragment,{children:[c.jsx(ov,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(nv,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":pf(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(k5,{titleId:l.titleId}),c.jsx(b5,{contentRef:a,descriptionId:l.descriptionId})]})]})}),hf="DialogTitle",Ev=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lt(hf,n);return c.jsx(Ke.h2,{id:o.titleId,...r,ref:t})});Ev.displayName=hf;var bv="DialogDescription",Cv=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lt(bv,n);return c.jsx(Ke.p,{id:o.descriptionId,...r,ref:t})});Cv.displayName=bv;var jv="DialogClose",_v=g.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Lt(jv,n);return c.jsx(Ke.button,{type:"button",...r,ref:t,onClick:ze(e.onClick,()=>o.onOpenChange(!1))})});_v.displayName=jv;function pf(e){return e?"open":"closed"}var Pv="DialogTitleWarning",[X5,Mv]=BM(Pv,{contentName:mr,titleName:hf,docsSlug:"dialog"}),k5=({titleId:e})=>{const t=Mv(Pv),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
334
|
+
|
|
335
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
336
|
+
|
|
337
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},E5="DialogDescriptionWarning",b5=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mv(E5).contentName}}.`;return g.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},C5=yv,j5=wv,Rv=Sv,Tv=Nv,Iv=Ev,Lv=Cv,_5=_v;const mf=C5,P5=j5,Av=g.forwardRef(({className:e,...t},n)=>c.jsx(Rv,{ref:n,className:be("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}));Av.displayName=Rv.displayName;const va=g.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(P5,{children:[c.jsx(Av,{}),c.jsxs(Tv,{ref:r,className:be("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,c.jsxs(_5,{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:[c.jsx(Gk,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));va.displayName=Tv.displayName;const gf=({className:e,...t})=>c.jsx("div",{className:be("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),yf=({className:e,...t})=>c.jsx("div",{className:be("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),wa=g.forwardRef(({className:e,...t},n)=>c.jsx(Iv,{ref:n,className:be("text-lg font-semibold leading-none tracking-tight",e),...t}));wa.displayName=Iv.displayName;const Sa=g.forwardRef(({className:e,...t},n)=>c.jsx(Lv,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));Sa.displayName=Lv.displayName;function M5({message:e,type:t,onClose:n}){return g.useEffect(()=>{const r=setTimeout(n,4e3);return()=>clearTimeout(r)},[n]),c.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"?c.jsx(wl,{className:"h-4 w-4"}):c.jsx(ro,{className:"h-4 w-4"}),c.jsx("span",{className:"text-sm",children:e}),c.jsx("button",{onClick:n,className:"ml-2 text-current/50 hover:text-current",children:"×"})]})}function R5(){const[e,t]=g.useState([]),[n,r]=g.useState(""),[o,s]=g.useState(!0),[i,l]=g.useState("skills"),[a,u]=g.useState(null),h=g.useRef(null),f=g.useCallback((y,w="success")=>{u({message:y,type:w})},[]),d=g.useCallback(()=>{f("Command sent to agent"),l("commands"),setTimeout(()=>{var y;return(y=h.current)==null?void 0:y.call(h)},300)},[f]),x=g.useCallback(y=>{const w=y instanceof Error?y.message:"Failed to send command";f(w,"error")},[f]);return g.useEffect(()=>{Re.discovery.agents().then(y=>{const w=y.data??[];t(w),w.length>0&&!n&&r(w[0].registeredAgentId??w[0].id)}).catch(()=>{}).finally(()=>s(!1))},[]),o?c.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading agents..."}):e.length===0?c.jsxs("div",{className:"space-y-6",children:[c.jsx("h1",{className:"text-lg font-semibold",children:"Operations"}),c.jsxs("div",{className:"flex h-60 flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border",children:[c.jsx(Od,{className:"h-10 w-10 text-muted-foreground/30"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents discovered yet"}),c.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Connect an agent with the Guards plugin to get started"})]})]}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h1",{className:"text-lg font-semibold",children:"Operations"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-xs text-muted-foreground",children:"Agent:"}),c.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:y=>r(y.target.value),children:e.map(y=>c.jsxs("option",{value:y.registeredAgentId??y.id,children:[y.emoji?`${y.emoji} `:"",y.name]},y.registeredAgentId??y.id))})]})]}),n&&c.jsxs(ev,{value:i,onValueChange:l,className:"w-full",children:[c.jsxs(cf,{children:[c.jsxs(Yr,{value:"skills",children:[c.jsx(tr,{className:"mr-1.5 h-3.5 w-3.5"})," Skills"]}),c.jsxs(Yr,{value:"commands",children:[c.jsx(gc,{className:"mr-1.5 h-3.5 w-3.5"})," Commands"]}),c.jsxs(Yr,{value:"config",children:[c.jsx(On,{className:"mr-1.5 h-3.5 w-3.5"})," Config"]})]}),c.jsx(Gr,{value:"skills",children:c.jsx(T5,{agentId:n,agents:e,onCommandSent:d,onCommandError:x})}),c.jsx(Gr,{value:"commands",children:c.jsx(I5,{agentId:n,refreshRef:h})}),c.jsx(Gr,{value:"config",children:c.jsx(L5,{agentId:n,onCommandSent:d,onCommandError:x})})]}),a&&c.jsx(M5,{message:a.message,type:a.type,onClose:()=>u(null)})]})}function T5({agentId:e,agents:t,onCommandSent:n,onCommandError:r}){const o=t.find(h=>(h.registeredAgentId??h.id)===e),s=(o==null?void 0:o.skills)??[],[i,l]=g.useState(!1),[a,u]=g.useState(null);return c.jsxs("div",{className:"space-y-4 pt-4",children:[c.jsx("div",{className:"flex gap-2",children:c.jsxs(ue,{size:"sm",onClick:()=>l(!0),children:[c.jsx(Sl,{className:"mr-1.5 h-3.5 w-3.5"})," Install Skill"]})}),c.jsxs(He,{children:[c.jsx(Je,{children:c.jsxs(et,{className:"flex items-center gap-2 text-sm",children:[c.jsx(tr,{className:"h-4 w-4"})," Installed Skills (",s.length,")"]})}),c.jsx(Ve,{children:s.length===0?c.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[c.jsx(tr,{className:"h-10 w-10 text-muted-foreground/20"}),c.jsxs("div",{className:"text-center",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"No skills installed"}),c.jsxs("p",{className:"mt-1 text-xs text-muted-foreground/70",children:["Install skills from ",c.jsx("a",{href:"https://clawhub.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"ClawHub"})," or provide custom skill content"]})]}),c.jsx(ue,{size:"sm",variant:"outline",onClick:()=>l(!0),children:"Install your first skill"})]}):c.jsx("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:s.map(h=>c.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3 transition-colors hover:bg-muted/30",children:[c.jsxs("div",{className:"flex items-center gap-2.5",children:[c.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-md bg-muted",children:c.jsx(tr,{className:"h-4 w-4 text-muted-foreground"})}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-medium",children:h.name}),h.description&&c.jsx("p",{className:"text-[11px] text-muted-foreground line-clamp-1",children:h.description})]})]}),c.jsx(ue,{size:"sm",variant:"ghost",className:"h-7 w-7 p-0 text-muted-foreground hover:text-destructive",onClick:()=>u(h.name),children:c.jsx(Ns,{className:"h-3.5 w-3.5"})})]},h.name))})})]}),c.jsxs(He,{children:[c.jsx(Je,{children:c.jsx(et,{className:"text-sm",children:"How Skills Work"})}),c.jsxs(Ve,{className:"text-xs text-muted-foreground space-y-2",children:[c.jsxs("p",{children:["Skills are ",c.jsx("a",{href:"https://agentskills.io",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"AgentSkills"}),"-compatible folders containing a ",c.jsx("code",{className:"rounded bg-muted px-1",children:"SKILL.md"})," with YAML frontmatter and instructions."]}),c.jsx("p",{children:"Skills are loaded from three locations (highest to lowest precedence):"}),c.jsxs("ol",{className:"list-inside list-decimal space-y-0.5 pl-2",children:[c.jsxs("li",{children:[c.jsx("code",{className:"rounded bg-muted px-1",children:"<workspace>/skills"})," — per-agent workspace skills"]}),c.jsxs("li",{children:[c.jsx("code",{className:"rounded bg-muted px-1",children:"~/.openclaw/skills"})," — shared managed skills"]}),c.jsx("li",{children:"Bundled skills — shipped with the OpenClaw install"})]}),c.jsxs("p",{children:["Browse and discover skills at ",c.jsx("a",{href:"https://clawhub.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"clawhub.com"}),". Registry installs use ",c.jsx("code",{className:"rounded bg-muted px-1",children:"clawhub install <slug>"}),"."]})]})]}),c.jsx(A5,{open:i,onOpenChange:l,agentId:e,onSuccess:n,onError:r}),c.jsx(z5,{open:a!==null,onOpenChange:h=>{h||u(null)},agentId:e,initialName:a??"",onSuccess:n,onError:r})]})}function I5({agentId:e,refreshRef:t}){const[n,r]=g.useState([]),[o,s]=g.useState(!0),[i,l]=g.useState(null),a=g.useCallback(()=>{Re.commands.list(e).then(d=>r(d.data??[])).catch(()=>{}).finally(()=>s(!1))},[e]);g.useEffect(()=>(t&&(t.current=a),()=>{t&&(t.current=null)}),[a,t]),g.useEffect(()=>{a()},[a]),g.useEffect(()=>{if(!n.some(y=>y.status==="pending"||y.status==="running"))return;const x=setInterval(a,5e3);return()=>clearInterval(x)},[n,a]);const u=d=>d==="completed"?c.jsx(wl,{className:"h-3.5 w-3.5 text-emerald-500"}):d==="failed"?c.jsx(ro,{className:"h-3.5 w-3.5 text-destructive"}):d==="running"?c.jsx(cr,{className:"h-3.5 w-3.5 animate-spin text-amber-500"}):c.jsx(Mk,{className:"h-3.5 w-3.5 text-muted-foreground"}),h=d=>d==="completed"?"success":d==="failed"?"destructive":d==="running"?"warning":"secondary",f=d=>({install_skill:{icon:c.jsx(Sl,{className:"h-3 w-3"}),label:"Install Skill"},install_custom_skill:{icon:c.jsx(na,{className:"h-3 w-3"}),label:"Custom Skill"},uninstall_skill:{icon:c.jsx(Ns,{className:"h-3 w-3"}),label:"Uninstall Skill"},update_config:{icon:c.jsx(On,{className:"h-3 w-3"}),label:"Update Config"}})[d]??{icon:c.jsx(gc,{className:"h-3 w-3"}),label:d};return o?c.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):c.jsxs("div",{className:"space-y-4 pt-4",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("p",{className:"text-sm text-muted-foreground",children:"Command history for this agent"}),c.jsxs(ue,{size:"sm",variant:"ghost",onClick:a,children:[c.jsx(oo,{className:"mr-1.5 h-3.5 w-3.5"})," Refresh"]})]}),n.length===0?c.jsxs("div",{className:"flex h-40 flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border",children:[c.jsx(gc,{className:"h-8 w-8 text-muted-foreground/30"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"No commands sent yet"})]}):c.jsx("div",{className:"space-y-2",children:n.map(d=>{var N,p,v;const x=f(d.type),y=i===d.id,w=d.result||d.type==="install_custom_skill"&&((N=d.payload)==null?void 0:N.content);return c.jsxs("div",{className:"rounded-lg border border-border transition-colors hover:bg-muted/20",children:[c.jsxs("div",{className:"flex cursor-pointer items-center gap-3 px-4 py-3",onClick:()=>w&&l(y?null:d.id),children:[u(d.status),c.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium",children:[x.icon," ",c.jsx("span",{children:x.label})]}),c.jsxs("span",{className:"text-xs text-muted-foreground",children:[((p=d.payload)==null?void 0:p.skillName)&&`"${d.payload.skillName}"`,d.type==="update_config"&&d.payload&&!d.payload.skillName&&Object.keys(d.payload).join(", ")]}),c.jsx("div",{className:"flex-1"}),c.jsx(Me,{variant:h(d.status),className:"text-[10px]",children:d.status}),c.jsx("span",{className:"text-[11px] text-muted-foreground",children:$5(d.createdAt)}),w&&(y?c.jsx($y,{className:"h-3.5 w-3.5 text-muted-foreground"}):c.jsx(Oy,{className:"h-3.5 w-3.5 text-muted-foreground"}))]}),y&&w&&c.jsxs("div",{className:"border-t border-border bg-muted/30 px-4 py-3 text-xs",children:[d.result&&c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"font-medium text-muted-foreground",children:"Result"}),c.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 d.result=="string"?d.result:JSON.stringify(d.result,null,2)})]}),d.type==="install_custom_skill"&&((v=d.payload)==null?void 0:v.content)&&c.jsxs("div",{className:"mt-2 space-y-1",children:[c.jsx("p",{className:"font-medium text-muted-foreground",children:"Skill Content"}),c.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:d.payload.content})]})]})]},d.id)})})]})}function L5({agentId:e,onCommandSent:t,onCommandError:n}){const[r,o]=g.useState(!1);return c.jsxs("div",{className:"space-y-4 pt-4",children:[c.jsxs(He,{children:[c.jsx(Je,{children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs(et,{className:"flex items-center gap-2 text-sm",children:[c.jsx(On,{className:"h-4 w-4"})," Guards Configuration"]}),c.jsxs(ue,{size:"sm",variant:"outline",onClick:()=>o(!0),children:[c.jsx(On,{className:"mr-1.5 h-3.5 w-3.5"})," Update Config"]})]})}),c.jsxs(Ve,{className:"text-xs text-muted-foreground space-y-3",children:[c.jsxs("p",{children:["Send configuration updates to the Guards plugin running on this agent. Changes are merged with the existing config in ",c.jsx("code",{className:"rounded bg-muted px-1",children:"~/.openclaw/openclaw.json"}),"."]}),c.jsxs("div",{className:"rounded-md bg-muted p-3 space-y-1.5",children:[c.jsx("p",{className:"font-medium text-foreground text-xs",children:"Available settings:"}),c.jsxs("div",{className:"grid gap-1",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"blockOnRisk"}),c.jsx("span",{children:"Block tool calls when risk is detected"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"logLevel"}),c.jsx("span",{children:"Logging verbosity (debug, info, warn, error)"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"timeoutMs"}),c.jsx("span",{children:"Request timeout in milliseconds"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"enabled"}),c.jsx("span",{children:"Enable/disable the Guards plugin"})]})]})]})]})]}),c.jsx(D5,{open:r,onOpenChange:o,agentId:e,onSuccess:t,onError:n})]})}function A5({open:e,onOpenChange:t,agentId:n,onSuccess:r,onError:o}){const[s,i]=g.useState("registry"),[l,a]=g.useState(""),[u,h]=g.useState(""),[f,d]=g.useState(!1),[x,y]=g.useState(""),w=()=>{a(""),h(""),i("registry"),y("")},N=async()=>{if(!(s==="registry"&&!l.trim())&&!(s==="custom"&&(!l.trim()||!u.trim()))){d(!0),y("");try{s==="registry"?await Re.commands.create({agentId:n,type:"install_skill",payload:{skillName:l.trim()}}):await Re.commands.create({agentId:n,type:"install_custom_skill",payload:{skillName:l.trim(),content:u}}),w(),t(!1),r==null||r()}catch(p){const v=p instanceof Error?p.message:"Failed to send command";y(v),o==null||o(p)}finally{d(!1)}}};return c.jsx(mf,{open:e,onOpenChange:p=>{p||w(),t(p)},children:c.jsxs(va,{className:"sm:max-w-[560px]",children:[c.jsxs(gf,{children:[c.jsxs(wa,{className:"flex items-center gap-2",children:[c.jsx(Sl,{className:"h-4 w-4"})," Install Skill"]}),c.jsxs(Sa,{children:["Install from ",c.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."]})]}),c.jsxs(ev,{value:s,onValueChange:p=>{i(p),y("")},children:[c.jsxs(cf,{className:"w-full",children:[c.jsxs(Yr,{value:"registry",className:"flex-1",children:[c.jsx(tr,{className:"mr-1.5 h-3.5 w-3.5"})," ClawHub Registry"]}),c.jsxs(Yr,{value:"custom",className:"flex-1",children:[c.jsx(na,{className:"mr-1.5 h-3.5 w-3.5"})," Custom SKILL.md"]})]}),c.jsx(Gr,{value:"registry",className:"space-y-4 pt-2",children:c.jsxs("div",{className:"space-y-2",children:[c.jsx(or,{htmlFor:"reg-skill-name",children:"Skill Slug"}),c.jsx(un,{id:"reg-skill-name",placeholder:"e.g. web-search, code-review, self-improving-agent...",value:l,onChange:p=>{a(p.target.value),y("")},onKeyDown:p=>p.key==="Enter"&&N()}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:["Executes ",c.jsx("code",{className:"rounded bg-muted px-1",children:"clawhub install <slug>"})," on the agent. Browse available skills at ",c.jsx("a",{href:"https://clawhub.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"clawhub.com"}),"."]})]})}),c.jsxs(Gr,{value:"custom",className:"space-y-4 pt-2",children:[c.jsxs("div",{className:"space-y-2",children:[c.jsx(or,{htmlFor:"custom-skill-name",children:"Skill Name"}),c.jsx(un,{id:"custom-skill-name",placeholder:"my-custom-skill",value:l,onChange:p=>{a(p.target.value),y("")}})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(or,{htmlFor:"custom-skill-content",children:"SKILL.md Content"}),c.jsx(sf,{id:"custom-skill-content",placeholder:`---
|
|
338
|
+
name: my-custom-skill
|
|
339
|
+
description: My custom skill
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
Instructions for the agent...
|
|
343
|
+
|
|
344
|
+
Use {baseDir} to reference the skill folder path.`,value:u,onChange:p=>{h(p.target.value),y("")},className:"min-h-[200px] font-mono text-xs"}),c.jsxs("p",{className:"text-xs text-muted-foreground",children:["The content will be saved as ",c.jsx("code",{className:"rounded bg-muted px-1",children:"~/.openclaw/skills/<name>/SKILL.md"}),". Use YAML frontmatter with ",c.jsx("code",{className:"rounded bg-muted px-1",children:"name"})," and ",c.jsx("code",{className:"rounded bg-muted px-1",children:"description"})," fields."]})]})]})]}),x&&c.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:[c.jsx(ro,{className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{children:x})]}),c.jsxs(yf,{children:[c.jsx(ue,{variant:"outline",onClick:()=>{w(),t(!1)},children:"Cancel"}),c.jsxs(ue,{onClick:N,disabled:f||!l.trim()||s==="custom"&&!u.trim(),children:[f?c.jsx(cr,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):c.jsx(Sl,{className:"mr-1.5 h-3.5 w-3.5"}),"Install"]})]})]})})}function z5({open:e,onOpenChange:t,agentId:n,initialName:r,onSuccess:o,onError:s}){const[i,l]=g.useState(r??""),[a,u]=g.useState(!1),[h,f]=g.useState("");g.useEffect(()=>{r&&l(r)},[r]);const d=async()=>{if(i.trim()){u(!0),f("");try{await Re.commands.create({agentId:n,type:"uninstall_skill",payload:{skillName:i.trim()}}),l(""),t(!1),o==null||o()}catch(x){const y=x instanceof Error?x.message:"Failed to send command";f(y),s==null||s(x)}finally{u(!1)}}};return c.jsx(mf,{open:e,onOpenChange:t,children:c.jsxs(va,{className:"sm:max-w-[400px]",children:[c.jsxs(gf,{children:[c.jsxs(wa,{className:"flex items-center gap-2",children:[c.jsx(Ns,{className:"h-4 w-4"})," Uninstall Skill"]}),c.jsx(Sa,{children:"This will send a command to remove the skill from the agent."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(or,{htmlFor:"uninstall-name",children:"Skill Name"}),c.jsx(un,{id:"uninstall-name",placeholder:"Skill name to uninstall...",value:i,onChange:x=>{l(x.target.value),f("")},onKeyDown:x=>x.key==="Enter"&&d()})]}),h&&c.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:[c.jsx(ro,{className:"h-3.5 w-3.5 shrink-0"}),c.jsx("span",{children:h})]}),c.jsxs(yf,{children:[c.jsx(ue,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),c.jsxs(ue,{variant:"destructive",onClick:d,disabled:a||!i.trim(),children:[a?c.jsx(cr,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):c.jsx(Ns,{className:"mr-1.5 h-3.5 w-3.5"}),"Uninstall"]})]})]})})}function D5({open:e,onOpenChange:t,agentId:n,onSuccess:r,onError:o}){const[s,i]=g.useState(`{
|
|
345
|
+
"blockOnRisk": false
|
|
346
|
+
}`),[l,a]=g.useState(""),[u,h]=g.useState(!1),f=async()=>{a("");let d;try{d=JSON.parse(s)}catch{a("Invalid JSON");return}if(typeof d!="object"||d===null||Array.isArray(d)){a("Must be a JSON object");return}h(!0);try{await Re.commands.create({agentId:n,type:"update_config",payload:d}),t(!1),r==null||r()}catch(x){const y=x instanceof Error?x.message:"Failed to send command";a(y),o==null||o(x)}finally{h(!1)}};return c.jsx(mf,{open:e,onOpenChange:t,children:c.jsxs(va,{className:"sm:max-w-[460px]",children:[c.jsxs(gf,{children:[c.jsxs(wa,{className:"flex items-center gap-2",children:[c.jsx(On,{className:"h-4 w-4"})," Update Guards Config"]}),c.jsx(Sa,{children:"Values will be merged into the existing Guards plugin configuration."})]}),c.jsxs("div",{className:"space-y-2",children:[c.jsx(or,{htmlFor:"config-json",children:"Config JSON"}),c.jsx(sf,{id:"config-json",value:s,onChange:d=>{i(d.target.value),a("")},className:"min-h-[120px] font-mono text-xs"}),l&&c.jsx("p",{className:"text-xs text-destructive",children:l})]}),c.jsxs(yf,{children:[c.jsx(ue,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),c.jsxs(ue,{onClick:f,disabled:u,children:[u?c.jsx(cr,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):c.jsx(On,{className:"mr-1.5 h-3.5 w-3.5"}),"Update"]})]})]})})}function $5(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 o=Math.floor(r/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function O5(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 F5(){const[e,t]=g.useState([]),[n,r]=g.useState(!0),[o,s]=g.useState("dashboard"),i=g.useCallback(()=>{Re.system.services().then(l=>t(l.data??[])).catch(()=>{}).finally(()=>r(!1))},[]);return g.useEffect(()=>{i()},[i]),g.useEffect(()=>{const l=setInterval(i,1e4);return()=>clearInterval(l)},[i]),n?c.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("h1",{className:"text-lg font-semibold",children:"System"}),c.jsxs(ue,{size:"sm",variant:"ghost",onClick:i,children:[c.jsx(oo,{className:"mr-1.5 h-3.5 w-3.5"})," Refresh"]})]}),c.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:e.map(l=>c.jsx(He,{className:`cursor-pointer transition-all ${o===l.key?"ring-2 ring-primary shadow-sm":"hover:bg-muted/30"}`,onClick:()=>s(l.key),children:c.jsxs(Ve,{className:"flex items-center gap-3 p-4",children:[c.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:c.jsx(Fd,{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"}`})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("p",{className:"text-sm font-medium",children:l.name}),c.jsx(Rk,{className:`h-2 w-2 fill-current ${l.healthy?"text-emerald-500":l.running?"text-amber-500":"text-muted-foreground/40"}`})]}),c.jsxs("div",{className:"flex items-center gap-2 text-[11px] text-muted-foreground",children:[c.jsxs("span",{children:[":",l.port]}),l.pid&&c.jsxs("span",{children:["PID ",l.pid]}),l.logSize>0&&c.jsx("span",{children:O5(l.logSize)})]})]}),c.jsx(Me,{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))}),o&&c.jsx(B5,{service:o})]})}function B5({service:e}){const[t,n]=g.useState([]),[r,o]=g.useState(0),[s,i]=g.useState(""),[l,a]=g.useState(!0),[u,h]=g.useState(!0),[f,d]=g.useState(!0),[x,y]=g.useState(200),w=g.useRef(null),N=g.useRef(null),p=g.useCallback(k=>{const E=k??x;Re.system.logs(e,E).then(b=>{n(b.data.lines),o(b.data.total),i(b.data.lastModified)}).catch(()=>{}).finally(()=>a(!1))},[e,x]);g.useEffect(()=>{a(!0),n([]),p()},[e]),g.useEffect(()=>{p()},[x]),g.useEffect(()=>{u&&w.current&&(w.current.scrollTop=w.current.scrollHeight)},[t,u]),g.useEffect(()=>(f?N.current=setInterval(()=>p(),3e3):N.current&&(clearInterval(N.current),N.current=null),()=>{N.current&&clearInterval(N.current)}),[f,p]);const v=async()=>{try{await Re.system.clearLog(e),n([]),o(0)}catch{}},m=()=>{y(k=>Math.min(k+500,2e3))},S=e.charAt(0).toUpperCase()+e.slice(1);return c.jsxs(He,{children:[c.jsx(Je,{className:"pb-3",children:c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[c.jsxs(et,{className:"flex items-center gap-2 text-sm",children:[c.jsx(na,{className:"h-4 w-4"})," ",S," Logs",c.jsxs(Me,{variant:"outline",className:"text-[10px] font-normal",children:[r.toLocaleString()," lines"]}),s&&c.jsxs("span",{className:"text-[11px] font-normal text-muted-foreground",children:["Updated ",new Date(s).toLocaleTimeString()]})]}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[r>x&&c.jsx(ue,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:m,children:"Load more"}),c.jsxs(ue,{size:"sm",variant:f?"default":"outline",className:"h-7 text-xs",onClick:()=>{d(!f),h(!f)},children:[f?c.jsx(Bk,{className:"mr-1 h-3 w-3"}):c.jsx(Hk,{className:"mr-1 h-3 w-3"}),f?"Pause":"Tail"]}),c.jsxs(ue,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>{var k;h(!0),(k=w.current)==null||k.scrollTo({top:w.current.scrollHeight,behavior:"smooth"})},children:[c.jsx(jk,{className:"mr-1 h-3 w-3"})," Bottom"]}),c.jsxs(ue,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>p(),children:[c.jsx(oo,{className:"mr-1 h-3 w-3"})," Refresh"]}),c.jsxs(ue,{size:"sm",variant:"ghost",className:"h-7 text-xs text-destructive hover:text-destructive",onClick:v,children:[c.jsx(Ns,{className:"mr-1 h-3 w-3"})," Clear"]})]})]})}),c.jsx(Ve,{className:"p-0",children:l?c.jsx("div",{className:"flex h-60 items-center justify-center",children:c.jsx(cr,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):t.length===0?c.jsxs("div",{className:"flex h-60 flex-col items-center justify-center gap-2",children:[c.jsx(Ck,{className:"h-8 w-8 text-muted-foreground/20"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"No log output"})]}):c.jsx("div",{ref:w,className:"h-[calc(100vh-420px)] min-h-[300px] overflow-auto border-t border-border bg-zinc-950 dark:bg-zinc-950",onScroll:()=>{if(!w.current)return;const{scrollTop:k,scrollHeight:E,clientHeight:b}=w.current,_=E-k-b<40;h(_)},children:c.jsx("pre",{className:"p-4 text-xs leading-5 font-mono text-zinc-300",children:t.map((k,E)=>c.jsx(H5,{line:k,lineNum:r-t.length+E+1},E))})})})]})}function H5({line:e,lineNum:t}){const n=V5(e);return c.jsxs("div",{className:"group flex hover:bg-white/5",children:[c.jsx("span",{className:"mr-3 inline-block w-10 select-none text-right text-zinc-600 group-hover:text-zinc-500",children:t}),c.jsx("span",{className:n,children:e}),`
|
|
347
|
+
`]})}function V5(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 U5=[{key:"og_core_url",label:"Core API URL",icon:Fd,placeholder:"http://localhost:53666",description:"OpenTrust Core service endpoint"},{key:"og_core_key",label:"Core API Key",icon:Dk,placeholder:"sk-og-***",description:"API key for Core authentication (masked for security)",sensitive:!0},{key:"gateway_url",label:"Gateway URL",icon:Ak,placeholder:"http://localhost:8900",description:"AI Gateway proxy endpoint"},{key:"dashboard_mode",label:"Dashboard Mode",icon:Wk,placeholder:"selfhosted",description:"Deployment mode: selfhosted or embedded"},{key:"database_url",label:"Database URL",icon:Ik,placeholder:"file:./data/dashboard.db",description:"Database connection string",sensitive:!0}];function W5(){const[e,t]=g.useState({}),[n,r]=g.useState({}),[o,s]=g.useState(!0),[i,l]=g.useState(!1),[a,u]=g.useState(null),[h,f]=g.useState(null),[d,x]=g.useState(!1),y=()=>{s(!0),Re.settings.get().then(S=>{const k=S.data??{};t(k),r(k)}).catch(()=>{}).finally(()=>s(!1))};g.useEffect(()=>{y()},[]);const w=()=>Object.keys(e).some(S=>e[S]!==n[S]),N=async()=>{l(!0);try{const S={};for(const[k,E]of Object.entries(e))E!==n[k]&&(S[k]=E);Object.keys(S).length>0&&(await Re.settings.update(S),r({...e}),v("Settings saved","success"))}catch(S){v(S instanceof Error?S.message:"Failed to save","error")}finally{l(!1)}},p=async()=>{x(!0),f(null);try{const k=await(await fetch("/api/settings/test-connection",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${JSON.parse(localStorage.getItem("opentrust_user")||"{}").apiKey||""}`}})).json();k.success&&f(k.data)}catch{f({connected:!1,message:"Request failed"})}finally{x(!1)}},v=(S,k)=>{u({msg:S,type:k}),setTimeout(()=>u(null),3e3)},m=(S,k)=>{t(E=>({...E,[S]:k}))};return o?c.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading settings..."}):c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-lg font-semibold",children:"Settings"}),c.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure OpenTrust system settings"})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs(ue,{size:"sm",variant:"ghost",onClick:y,children:[c.jsx(oo,{className:"mr-1.5 h-3.5 w-3.5"})," Reload"]}),c.jsxs(ue,{size:"sm",onClick:N,disabled:i||!w(),children:[i?c.jsx(cr,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):c.jsx(Vk,{className:"mr-1.5 h-3.5 w-3.5"}),"Save Changes"]})]})]}),c.jsxs(He,{children:[c.jsx(Je,{children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs(et,{className:"flex items-center gap-2 text-sm",children:[c.jsx(Fd,{className:"h-4 w-4"})," Service Connection"]}),c.jsxs(ue,{size:"sm",variant:"outline",onClick:p,disabled:d,children:[d?c.jsx(cr,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):c.jsx(oo,{className:"mr-1.5 h-3.5 w-3.5"}),"Test Connection"]})]})}),c.jsx(Ve,{children:h?c.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?c.jsx(wl,{className:"h-4 w-4"}):c.jsx(ro,{className:"h-4 w-4"}),c.jsx("span",{children:h.message}),h.url&&c.jsx(Me,{variant:"outline",className:"ml-auto text-[10px]",children:h.url})]}):c.jsx("p",{className:"text-xs text-muted-foreground",children:'Click "Test Connection" to verify Core service connectivity'})})]}),c.jsxs(He,{children:[c.jsx(Je,{children:c.jsxs(et,{className:"flex items-center gap-2 text-sm",children:[c.jsx(On,{className:"h-4 w-4"})," Configuration"]})}),c.jsx(Ve,{className:"space-y-5",children:U5.map(S=>{const k=S.icon,E=e[S.key]!==n[S.key];return c.jsxs("div",{className:"space-y-1.5",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(k,{className:"h-3.5 w-3.5 text-muted-foreground"}),c.jsx(or,{htmlFor:S.key,className:"text-sm font-medium",children:S.label}),E&&c.jsx(Me,{variant:"secondary",className:"text-[10px]",children:"Modified"})]}),c.jsx(un,{id:S.key,value:e[S.key]??"",onChange:b=>m(S.key,b.target.value),placeholder:S.placeholder,className:"font-mono text-sm"}),c.jsx("p",{className:"text-[11px] text-muted-foreground",children:S.description})]},S.key)})})]}),c.jsxs(He,{children:[c.jsx(Je,{children:c.jsx(et,{className:"text-sm",children:"Environment"})}),c.jsx(Ve,{children:c.jsxs("div",{className:"grid gap-3 text-xs sm:grid-cols-2",children:[c.jsx(ji,{label:"Dashboard Mode",value:e.dashboard_mode||"selfhosted"}),c.jsx(ji,{label:"Core URL",value:e.og_core_url||"http://localhost:53666"}),c.jsx(ji,{label:"Gateway URL",value:e.gateway_url||"http://localhost:8900"}),c.jsx(ji,{label:"Database",value:e.database_url?"Custom":"SQLite (default)"})]})})]}),a&&c.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 ${a.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:[a.type==="success"?c.jsx(wl,{className:"h-4 w-4"}):c.jsx(ro,{className:"h-4 w-4"}),c.jsx("span",{className:"text-sm",children:a.msg})]})]})}function ji({label:e,value:t}){return c.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border px-3 py-2",children:[c.jsx("span",{className:"text-muted-foreground",children:e}),c.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-[11px]",children:t})]})}function Y5({children:e}){const{isAuthenticated:t,isLoading:n}=Dd();return n?c.jsx("div",{className:"flex min-h-screen items-center justify-center",children:c.jsx("div",{className:"text-muted-foreground text-sm",children:"Loading..."})}):t?c.jsx(c.Fragment,{children:e}):c.jsx(fc,{to:"/login",replace:!0})}function G5(){return c.jsxs(sN,{children:[c.jsx(Qe,{path:"/login",element:c.jsx(iE,{})}),c.jsxs(Qe,{element:c.jsx(Y5,{children:c.jsx(sE,{})}),children:[c.jsx(Qe,{index:!0,element:c.jsx(fc,{to:"/inventory/agents",replace:!0})}),c.jsx(Qe,{path:"/inventory/agents",element:c.jsx(aE,{})}),c.jsx(Qe,{path:"/inventory/agents/:id",element:c.jsx(dE,{})}),c.jsx(Qe,{path:"/inventory/identities",element:c.jsx(gE,{})}),c.jsx(Qe,{path:"/inventory/permissions",element:c.jsx(yE,{})}),c.jsx(Qe,{path:"/secure/risk",element:c.jsx(xE,{})}),c.jsx(Qe,{path:"/secure/graph",element:c.jsx(FM,{})}),c.jsx(Qe,{path:"/ops/skills",element:c.jsx(R5,{})}),c.jsx(Qe,{path:"/system/logs",element:c.jsx(F5,{})}),c.jsx(Qe,{path:"/system/settings",element:c.jsx(W5,{})})]}),c.jsx(Qe,{path:"*",element:c.jsx(fc,{to:"/inventory/agents",replace:!0})})]})}xu.createRoot(document.getElementById("root")).render(c.jsx(Dt.StrictMode,{children:c.jsx(MN,{basename:"/dashboard",children:c.jsx(FN,{children:c.jsx(VN,{children:c.jsx(G5,{})})})})}));
|
|
348
|
+
//# sourceMappingURL=index-21v8SsP2.js.map
|