@super-line/control-center 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
function jx(e,r){for(var o=0;o<r.length;o++){const s=r[o];if(typeof s!="string"&&!Array.isArray(s)){for(const l in s)if(l!=="default"&&!(l in e)){const u=Object.getOwnPropertyDescriptor(s,l);u&&Object.defineProperty(e,l,u.get?u:{enumerable:!0,get:()=>s[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function o(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(l){if(l.ep)return;l.ep=!0;const u=o(l);fetch(l.href,u)}})();function gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $u={exports:{}},ui={},Du={exports:{}},Ce={};/**
|
|
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 bp;function Px(){if(bp)return Ce;bp=1;var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),m=Symbol.iterator;function y(b){return b===null||typeof b!="object"?null:(b=m&&b[m]||b["@@iterator"],typeof b=="function"?b:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,C={};function S(b,j,J){this.props=b,this.context=j,this.refs=C,this.updater=J||w}S.prototype.isReactComponent={},S.prototype.setState=function(b,j){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,j,"setState")},S.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function E(){}E.prototype=S.prototype;function P(b,j,J){this.props=b,this.context=j,this.refs=C,this.updater=J||w}var N=P.prototype=new E;N.constructor=P,_(N,S.prototype),N.isPureReactComponent=!0;var M=Array.isArray,$=Object.prototype.hasOwnProperty,D={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function G(b,j,J){var ne,ae={},ce=null,ue=null;if(j!=null)for(ne in j.ref!==void 0&&(ue=j.ref),j.key!==void 0&&(ce=""+j.key),j)$.call(j,ne)&&!H.hasOwnProperty(ne)&&(ae[ne]=j[ne]);var Z=arguments.length-2;if(Z===1)ae.children=J;else if(1<Z){for(var se=Array(Z),me=0;me<Z;me++)se[me]=arguments[me+2];ae.children=se}if(b&&b.defaultProps)for(ne in Z=b.defaultProps,Z)ae[ne]===void 0&&(ae[ne]=Z[ne]);return{$$typeof:e,type:b,key:ce,ref:ue,props:ae,_owner:D.current}}function K(b,j){return{$$typeof:e,type:b.type,key:j,ref:b.ref,props:b.props,_owner:b._owner}}function te(b){return typeof b=="object"&&b!==null&&b.$$typeof===e}function O(b){var j={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(J){return j[J]})}var V=/\/+/g;function ee(b,j){return typeof b=="object"&&b!==null&&b.key!=null?O(""+b.key):j.toString(36)}function z(b,j,J,ne,ae){var ce=typeof b;(ce==="undefined"||ce==="boolean")&&(b=null);var ue=!1;if(b===null)ue=!0;else switch(ce){case"string":case"number":ue=!0;break;case"object":switch(b.$$typeof){case e:case r:ue=!0}}if(ue)return ue=b,ae=ae(ue),b=ne===""?"."+ee(ue,0):ne,M(ae)?(J="",b!=null&&(J=b.replace(V,"$&/")+"/"),z(ae,j,J,"",function(me){return me})):ae!=null&&(te(ae)&&(ae=K(ae,J+(!ae.key||ue&&ue.key===ae.key?"":(""+ae.key).replace(V,"$&/")+"/")+b)),j.push(ae)),1;if(ue=0,ne=ne===""?".":ne+":",M(b))for(var Z=0;Z<b.length;Z++){ce=b[Z];var se=ne+ee(ce,Z);ue+=z(ce,j,J,se,ae)}else if(se=y(b),typeof se=="function")for(b=se.call(b),Z=0;!(ce=b.next()).done;)ce=ce.value,se=ne+ee(ce,Z++),ue+=z(ce,j,J,se,ae);else if(ce==="object")throw j=String(b),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.");return ue}function Y(b,j,J){if(b==null)return b;var ne=[],ae=0;return z(b,ne,"","",function(ce){return j.call(J,ce,ae++)}),ne}function F(b){if(b._status===-1){var j=b._result;j=j(),j.then(function(J){(b._status===0||b._status===-1)&&(b._status=1,b._result=J)},function(J){(b._status===0||b._status===-1)&&(b._status=2,b._result=J)}),b._status===-1&&(b._status=0,b._result=j)}if(b._status===1)return b._result.default;throw b._result}var U={current:null},A={transition:null},T={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:A,ReactCurrentOwner:D};function W(){throw Error("act(...) is not supported in production builds of React.")}return Ce.Children={map:Y,forEach:function(b,j,J){Y(b,function(){j.apply(this,arguments)},J)},count:function(b){var j=0;return Y(b,function(){j++}),j},toArray:function(b){return Y(b,function(j){return j})||[]},only:function(b){if(!te(b))throw Error("React.Children.only expected to receive a single React element child.");return b}},Ce.Component=S,Ce.Fragment=o,Ce.Profiler=l,Ce.PureComponent=P,Ce.StrictMode=s,Ce.Suspense=h,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,Ce.act=W,Ce.cloneElement=function(b,j,J){if(b==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+b+".");var ne=_({},b.props),ae=b.key,ce=b.ref,ue=b._owner;if(j!=null){if(j.ref!==void 0&&(ce=j.ref,ue=D.current),j.key!==void 0&&(ae=""+j.key),b.type&&b.type.defaultProps)var Z=b.type.defaultProps;for(se in j)$.call(j,se)&&!H.hasOwnProperty(se)&&(ne[se]=j[se]===void 0&&Z!==void 0?Z[se]:j[se])}var se=arguments.length-2;if(se===1)ne.children=J;else if(1<se){Z=Array(se);for(var me=0;me<se;me++)Z[me]=arguments[me+2];ne.children=Z}return{$$typeof:e,type:b.type,key:ae,ref:ce,props:ne,_owner:ue}},Ce.createContext=function(b){return b={$$typeof:c,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},b.Provider={$$typeof:u,_context:b},b.Consumer=b},Ce.createElement=G,Ce.createFactory=function(b){var j=G.bind(null,b);return j.type=b,j},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(b){return{$$typeof:f,render:b}},Ce.isValidElement=te,Ce.lazy=function(b){return{$$typeof:x,_payload:{_status:-1,_result:b},_init:F}},Ce.memo=function(b,j){return{$$typeof:g,type:b,compare:j===void 0?null:j}},Ce.startTransition=function(b){var j=A.transition;A.transition={};try{b()}finally{A.transition=j}},Ce.unstable_act=W,Ce.useCallback=function(b,j){return U.current.useCallback(b,j)},Ce.useContext=function(b){return U.current.useContext(b)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(b){return U.current.useDeferredValue(b)},Ce.useEffect=function(b,j){return U.current.useEffect(b,j)},Ce.useId=function(){return U.current.useId()},Ce.useImperativeHandle=function(b,j,J){return U.current.useImperativeHandle(b,j,J)},Ce.useInsertionEffect=function(b,j){return U.current.useInsertionEffect(b,j)},Ce.useLayoutEffect=function(b,j){return U.current.useLayoutEffect(b,j)},Ce.useMemo=function(b,j){return U.current.useMemo(b,j)},Ce.useReducer=function(b,j,J){return U.current.useReducer(b,j,J)},Ce.useRef=function(b){return U.current.useRef(b)},Ce.useState=function(b){return U.current.useState(b)},Ce.useSyncExternalStore=function(b,j,J){return U.current.useSyncExternalStore(b,j,J)},Ce.useTransition=function(){return U.current.useTransition()},Ce.version="18.3.1",Ce}var Mp;function Mi(){return Mp||(Mp=1,Du.exports=Px()),Du.exports}/**
|
|
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 jp;function zx(){if(jp)return ui;jp=1;var e=Mi(),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(f,h,g){var x,m={},y=null,w=null;g!==void 0&&(y=""+g),h.key!==void 0&&(y=""+h.key),h.ref!==void 0&&(w=h.ref);for(x in h)s.call(h,x)&&!u.hasOwnProperty(x)&&(m[x]=h[x]);if(f&&f.defaultProps)for(x in h=f.defaultProps,h)m[x]===void 0&&(m[x]=h[x]);return{$$typeof:r,type:f,key:y,ref:w,props:m,_owner:l.current}}return ui.Fragment=o,ui.jsx=c,ui.jsxs=c,ui}var Pp;function Ix(){return Pp||(Pp=1,$u.exports=zx()),$u.exports}var v=Ix(),I=Mi();const ym=gm(I),xm=jx({__proto__:null,default:ym},[I]);var el={},Ou={exports:{}},vt={},Fu={exports:{}},Vu={};/**
|
|
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
|
-
*/var zp;function Rx(){return zp||(zp=1,(function(e){function r(A,T){var W=A.length;A.push(T);e:for(;0<W;){var b=W-1>>>1,j=A[b];if(0<l(j,T))A[b]=T,A[W]=j,W=b;else break e}}function o(A){return A.length===0?null:A[0]}function s(A){if(A.length===0)return null;var T=A[0],W=A.pop();if(W!==T){A[0]=W;e:for(var b=0,j=A.length,J=j>>>1;b<J;){var ne=2*(b+1)-1,ae=A[ne],ce=ne+1,ue=A[ce];if(0>l(ae,W))ce<j&&0>l(ue,ae)?(A[b]=ue,A[ce]=W,b=ce):(A[b]=ae,A[ne]=W,b=ne);else if(ce<j&&0>l(ue,W))A[b]=ue,A[ce]=W,b=ce;else break e}}return T}function l(A,T){var W=A.sortIndex-T.sortIndex;return W!==0?W:A.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],g=[],x=1,m=null,y=3,w=!1,_=!1,C=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(A){for(var T=o(g);T!==null;){if(T.callback===null)s(g);else if(T.startTime<=A)s(g),T.sortIndex=T.expirationTime,r(h,T);else break;T=o(g)}}function M(A){if(C=!1,N(A),!_)if(o(h)!==null)_=!0,F($);else{var T=o(g);T!==null&&U(M,T.startTime-A)}}function $(A,T){_=!1,C&&(C=!1,E(G),G=-1),w=!0;var W=y;try{for(N(T),m=o(h);m!==null&&(!(m.expirationTime>T)||A&&!O());){var b=m.callback;if(typeof b=="function"){m.callback=null,y=m.priorityLevel;var j=b(m.expirationTime<=T);T=e.unstable_now(),typeof j=="function"?m.callback=j:m===o(h)&&s(h),N(T)}else s(h);m=o(h)}if(m!==null)var J=!0;else{var ne=o(g);ne!==null&&U(M,ne.startTime-T),J=!1}return J}finally{m=null,y=W,w=!1}}var D=!1,H=null,G=-1,K=5,te=-1;function O(){return!(e.unstable_now()-te<K)}function V(){if(H!==null){var A=e.unstable_now();te=A;var T=!0;try{T=H(!0,A)}finally{T?ee():(D=!1,H=null)}}else D=!1}var ee;if(typeof P=="function")ee=function(){P(V)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,Y=z.port2;z.port1.onmessage=V,ee=function(){Y.postMessage(null)}}else ee=function(){S(V,0)};function F(A){H=A,D||(D=!0,ee())}function U(A,T){G=S(function(){A(e.unstable_now())},T)}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(A){A.callback=null},e.unstable_continueExecution=function(){_||w||(_=!0,F($))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return o(h)},e.unstable_next=function(A){switch(y){case 1:case 2:case 3:var T=3;break;default:T=y}var W=y;y=T;try{return A()}finally{y=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,T){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var W=y;y=A;try{return T()}finally{y=W}},e.unstable_scheduleCallback=function(A,T,W){var b=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?b+W:b):W=b,A){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=W+j,A={id:x++,callback:T,priorityLevel:A,startTime:W,expirationTime:j,sortIndex:-1},W>b?(A.sortIndex=W,r(g,A),o(h)===null&&A===o(g)&&(C?(E(G),G=-1):C=!0,U(M,W-b))):(A.sortIndex=j,r(h,A),_||w||(_=!0,F($))),A},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(A){var T=y;return function(){var W=y;y=T;try{return A.apply(this,arguments)}finally{y=W}}}})(Vu)),Vu}var Ip;function Tx(){return Ip||(Ip=1,Fu.exports=Rx()),Fu.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 Rp;function Ax(){if(Rp)return vt;Rp=1;var e=Mi(),r=Tx();function o(t){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+t,i=1;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,l={};function u(t,n){c(t,n),c(t+"Capture",n)}function c(t,n){for(l[t]=n,t=0;t<n.length;t++)s.add(n[t])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[: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]*$/,x={},m={};function y(t){return h.call(m,t)?!0:h.call(x,t)?!1:g.test(t)?m[t]=!0:(x[t]=!0,!1)}function w(t,n,i,a){if(i!==null&&i.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return a?!1:i!==null?!i.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function _(t,n,i,a){if(n===null||typeof n>"u"||w(t,n,i,a))return!0;if(a)return!1;if(i!==null)switch(i.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function C(t,n,i,a,d,p,k){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=a,this.attributeNamespace=d,this.mustUseProperty=i,this.propertyName=t,this.type=n,this.sanitizeURL=p,this.removeEmptyString=k}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){S[t]=new C(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var n=t[0];S[n]=new C(n,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){S[t]=new C(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){S[t]=new C(t,2,!1,t,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(t){S[t]=new C(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){S[t]=new C(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){S[t]=new C(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){S[t]=new C(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){S[t]=new C(t,5,!1,t.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function P(t){return t[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(t){var n=t.replace(E,P);S[n]=new C(n,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var n=t.replace(E,P);S[n]=new C(n,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var n=t.replace(E,P);S[n]=new C(n,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){S[t]=new C(t,1,!1,t.toLowerCase(),null,!1,!1)}),S.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){S[t]=new C(t,1,!1,t.toLowerCase(),null,!0,!0)});function N(t,n,i,a){var d=S.hasOwnProperty(n)?S[n]:null;(d!==null?d.type!==0:a||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(_(n,i,d,a)&&(i=null),a||d===null?y(n)&&(i===null?t.removeAttribute(n):t.setAttribute(n,""+i)):d.mustUseProperty?t[d.propertyName]=i===null?d.type===3?!1:"":i:(n=d.attributeName,a=d.attributeNamespace,i===null?t.removeAttribute(n):(d=d.type,i=d===3||d===4&&i===!0?"":""+i,a?t.setAttributeNS(a,n,i):t.setAttribute(n,i))))}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$=Symbol.for("react.element"),D=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),te=Symbol.for("react.provider"),O=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),U=Symbol.for("react.offscreen"),A=Symbol.iterator;function T(t){return t===null||typeof t!="object"?null:(t=A&&t[A]||t["@@iterator"],typeof t=="function"?t:null)}var W=Object.assign,b;function j(t){if(b===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);b=n&&n[1]||""}return`
|
|
34
|
-
`+b+t}var J=!1;function ne(t,n){if(!t||J)return"";J=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(Q){var a=Q}Reflect.construct(t,[],n)}else{try{n.call()}catch(Q){a=Q}t.call(n.prototype)}else{try{throw Error()}catch(Q){a=Q}t()}}catch(Q){if(Q&&a&&typeof Q.stack=="string"){for(var d=Q.stack.split(`
|
|
35
|
-
`),p=a.stack.split(`
|
|
36
|
-
`),k=d.length-1,R=p.length-1;1<=k&&0<=R&&d[k]!==p[R];)R--;for(;1<=k&&0<=R;k--,R--)if(d[k]!==p[R]){if(k!==1||R!==1)do if(k--,R--,0>R||d[k]!==p[R]){var L=`
|
|
37
|
-
`+d[k].replace(" at new "," at ");return t.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",t.displayName)),L}while(1<=k&&0<=R);break}}}finally{J=!1,Error.prepareStackTrace=i}return(t=t?t.displayName||t.name:"")?j(t):""}function ae(t){switch(t.tag){case 5:return j(t.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return t=ne(t.type,!1),t;case 11:return t=ne(t.type.render,!1),t;case 1:return t=ne(t.type,!0),t;default:return""}}function ce(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case H:return"Fragment";case D:return"Portal";case K:return"Profiler";case G:return"StrictMode";case ee:return"Suspense";case z:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case O:return(t.displayName||"Context")+".Consumer";case te:return(t._context.displayName||"Context")+".Provider";case V:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Y:return n=t.displayName||null,n!==null?n:ce(t.type)||"Memo";case F:n=t._payload,t=t._init;try{return ce(t(n))}catch{}}return null}function ue(t){var n=t.type;switch(t.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=n.render,t=t.displayName||t.name||"",n.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(n);case 8:return n===G?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Z(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function se(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function me(t){var n=se(t)?"checked":"value",i=Object.getOwnPropertyDescriptor(t.constructor.prototype,n),a=""+t[n];if(!t.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var d=i.get,p=i.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(k){a=""+k,p.call(this,k)}}),Object.defineProperty(t,n,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(k){a=""+k},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function we(t){t._valueTracker||(t._valueTracker=me(t))}function xe(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var i=n.getValue(),a="";return t&&(a=se(t)?t.checked?"true":"false":t.value),t=a,t!==i?(n.setValue(t),!0):!1}function ge(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Ee(t,n){var i=n.checked;return W({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??t._wrapperState.initialChecked})}function Me(t,n){var i=n.defaultValue==null?"":n.defaultValue,a=n.checked!=null?n.checked:n.defaultChecked;i=Z(n.value!=null?n.value:i),t._wrapperState={initialChecked:a,initialValue:i,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function ze(t,n){n=n.checked,n!=null&&N(t,"checked",n,!1)}function Te(t,n){ze(t,n);var i=Z(n.value),a=n.type;if(i!=null)a==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+i):t.value!==""+i&&(t.value=""+i);else if(a==="submit"||a==="reset"){t.removeAttribute("value");return}n.hasOwnProperty("value")?ft(t,n.type,i):n.hasOwnProperty("defaultValue")&&ft(t,n.type,Z(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(t.defaultChecked=!!n.defaultChecked)}function ut(t,n,i){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var a=n.type;if(!(a!=="submit"&&a!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+t._wrapperState.initialValue,i||n===t.value||(t.value=n),t.defaultValue=n}i=t.name,i!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,i!==""&&(t.name=i)}function ft(t,n,i){(n!=="number"||ge(t.ownerDocument)!==t)&&(i==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+i&&(t.defaultValue=""+i))}var rt=Array.isArray;function ot(t,n,i,a){if(t=t.options,n){n={};for(var d=0;d<i.length;d++)n["$"+i[d]]=!0;for(i=0;i<t.length;i++)d=n.hasOwnProperty("$"+t[i].value),t[i].selected!==d&&(t[i].selected=d),d&&a&&(t[i].defaultSelected=!0)}else{for(i=""+Z(i),n=null,d=0;d<t.length;d++){if(t[d].value===i){t[d].selected=!0,a&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function ln(t,n){if(n.dangerouslySetInnerHTML!=null)throw Error(o(91));return W({},n,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function qt(t,n){var i=n.value;if(i==null){if(i=n.children,n=n.defaultValue,i!=null){if(n!=null)throw Error(o(92));if(rt(i)){if(1<i.length)throw Error(o(93));i=i[0]}n=i}n==null&&(n=""),i=n}t._wrapperState={initialValue:Z(i)}}function Qt(t,n){var i=Z(n.value),a=Z(n.defaultValue);i!=null&&(i=""+i,i!==t.value&&(t.value=i),n.defaultValue==null&&t.defaultValue!==i&&(t.defaultValue=i)),a!=null&&(t.defaultValue=""+a)}function pt(t){var n=t.textContent;n===t._wrapperState.initialValue&&n!==""&&n!==null&&(t.value=n)}function Pt(t){switch(t){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 St(t,n){return t==null||t==="http://www.w3.org/1999/xhtml"?Pt(n):t==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var zt,Li=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,i,a,d){MSApp.execUnsafeLocalFunction(function(){return t(n,i,a,d)})}:t})(function(t,n){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=n;else{for(zt=zt||document.createElement("div"),zt.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=zt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;n.firstChild;)t.appendChild(n.firstChild)}});function an(t,n){if(n){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=n;return}}t.textContent=n}var Zn={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},Ul=["Webkit","ms","Moz","O"];Object.keys(Zn).forEach(function(t){Ul.forEach(function(n){n=n+t.charAt(0).toUpperCase()+t.substring(1),Zn[n]=Zn[t]})});function $i(t,n,i){return n==null||typeof n=="boolean"||n===""?"":i||typeof n!="number"||n===0||Zn.hasOwnProperty(t)&&Zn[t]?(""+n).trim():n+"px"}function Di(t,n){t=t.style;for(var i in n)if(n.hasOwnProperty(i)){var a=i.indexOf("--")===0,d=$i(i,n[i],a);i==="float"&&(i="cssFloat"),a?t.setProperty(i,d):t[i]=d}}var Yl=W({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 wo(t,n){if(n){if(Yl[t]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(o(137,t));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(o(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(o(61))}if(n.style!=null&&typeof n.style!="object")throw Error(o(62))}}function So(t,n){if(t.indexOf("-")===-1)return typeof n.is=="string";switch(t){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 ko=null;function _o(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Eo=null,En=null,Nn=null;function Oi(t){if(t=Go(t)){if(typeof Eo!="function")throw Error(o(280));var n=t.stateNode;n&&(n=ms(n),Eo(t.stateNode,t.type,n))}}function Fi(t){En?Nn?Nn.push(t):Nn=[t]:En=t}function Vi(){if(En){var t=En,n=Nn;if(Nn=En=null,Oi(t),n)for(t=0;t<n.length;t++)Oi(n[t])}}function Bi(t,n){return t(n)}function Hi(){}var No=!1;function Wi(t,n,i){if(No)return t(n,i);No=!0;try{return Bi(t,n,i)}finally{No=!1,(En!==null||Nn!==null)&&(Hi(),Vi())}}function Jn(t,n){var i=t.stateNode;if(i===null)return null;var a=ms(i);if(a===null)return null;i=a[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(t=t.type,a=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!a;break e;default:t=!1}if(t)return null;if(i&&typeof i!="function")throw Error(o(231,n,typeof i));return i}var Co=!1;if(f)try{var er={};Object.defineProperty(er,"passive",{get:function(){Co=!0}}),window.addEventListener("test",er,er),window.removeEventListener("test",er,er)}catch{Co=!1}function Xl(t,n,i,a,d,p,k,R,L){var Q=Array.prototype.slice.call(arguments,3);try{n.apply(i,Q)}catch(oe){this.onError(oe)}}var tr=!1,br=null,Mr=!1,bo=null,Gl={onError:function(t){tr=!0,br=t}};function Kl(t,n,i,a,d,p,k,R,L){tr=!1,br=null,Xl.apply(Gl,arguments)}function ql(t,n,i,a,d,p,k,R,L){if(Kl.apply(this,arguments),tr){if(tr){var Q=br;tr=!1,br=null}else throw Error(o(198));Mr||(Mr=!0,bo=Q)}}function Zt(t){var n=t,i=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(i=n.return),t=n.return;while(t)}return n.tag===3?i:null}function Mo(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function jo(t){if(Zt(t)!==t)throw Error(o(188))}function Ql(t){var n=t.alternate;if(!n){if(n=Zt(t),n===null)throw Error(o(188));return n!==t?null:t}for(var i=t,a=n;;){var d=i.return;if(d===null)break;var p=d.alternate;if(p===null){if(a=d.return,a!==null){i=a;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===i)return jo(d),t;if(p===a)return jo(d),n;p=p.sibling}throw Error(o(188))}if(i.return!==a.return)i=d,a=p;else{for(var k=!1,R=d.child;R;){if(R===i){k=!0,i=d,a=p;break}if(R===a){k=!0,a=d,i=p;break}R=R.sibling}if(!k){for(R=p.child;R;){if(R===i){k=!0,i=p,a=d;break}if(R===a){k=!0,a=p,i=d;break}R=R.sibling}if(!k)throw Error(o(189))}}if(i.alternate!==a)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?t:n}function Ui(t){return t=Ql(t),t!==null?Yi(t):null}function Yi(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var n=Yi(t);if(n!==null)return n;t=t.sibling}return null}var Xi=r.unstable_scheduleCallback,Gi=r.unstable_cancelCallback,Zl=r.unstable_shouldYield,Ki=r.unstable_requestPaint,Be=r.unstable_now,Jl=r.unstable_getCurrentPriorityLevel,Po=r.unstable_ImmediatePriority,qi=r.unstable_UserBlockingPriority,jr=r.unstable_NormalPriority,ea=r.unstable_LowPriority,Qi=r.unstable_IdlePriority,Pr=null,kt=null;function ta(t){if(kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(Pr,t,void 0,(t.current.flags&128)===128)}catch{}}var _t=Math.clz32?Math.clz32:oa,na=Math.log,ra=Math.LN2;function oa(t){return t>>>=0,t===0?32:31-(na(t)/ra|0)|0}var zr=64,Ir=4194304;function nr(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function un(t,n){var i=t.pendingLanes;if(i===0)return 0;var a=0,d=t.suspendedLanes,p=t.pingedLanes,k=i&268435455;if(k!==0){var R=k&~d;R!==0?a=nr(R):(p&=k,p!==0&&(a=nr(p)))}else k=i&~d,k!==0?a=nr(k):p!==0&&(a=nr(p));if(a===0)return 0;if(n!==0&&n!==a&&(n&d)===0&&(d=a&-a,p=n&-n,d>=p||d===16&&(p&4194240)!==0))return n;if((a&4)!==0&&(a|=i&16),n=t.entangledLanes,n!==0)for(t=t.entanglements,n&=a;0<n;)i=31-_t(n),d=1<<i,a|=t[i],n&=~d;return a}function ia(t,n){switch(t){case 1:case 2:case 4:return n+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 n+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 Zi(t,n){for(var i=t.suspendedLanes,a=t.pingedLanes,d=t.expirationTimes,p=t.pendingLanes;0<p;){var k=31-_t(p),R=1<<k,L=d[k];L===-1?((R&i)===0||(R&a)!==0)&&(d[k]=ia(R,n)):L<=n&&(t.expiredLanes|=R),p&=~R}}function zo(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Ji(){var t=zr;return zr<<=1,(zr&4194240)===0&&(zr=64),t}function rr(t){for(var n=[],i=0;31>i;i++)n.push(t);return n}function or(t,n,i){t.pendingLanes|=n,n!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,n=31-_t(n),t[n]=i}function sa(t,n){var i=t.pendingLanes&~n;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=n,t.mutableReadLanes&=n,t.entangledLanes&=n,n=t.entanglements;var a=t.eventTimes;for(t=t.expirationTimes;0<i;){var d=31-_t(i),p=1<<d;n[d]=0,a[d]=-1,t[d]=-1,i&=~p}}function Rr(t,n){var i=t.entangledLanes|=n;for(t=t.entanglements;i;){var a=31-_t(i),d=1<<a;d&n|t[a]&n&&(t[a]|=n),i&=~d}}var Ie=0;function od(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var id,la,sd,ld,ad,aa=!1,es=[],Cn=null,bn=null,Mn=null,Io=new Map,Ro=new Map,jn=[],Q0="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 ud(t,n){switch(t){case"focusin":case"focusout":Cn=null;break;case"dragenter":case"dragleave":bn=null;break;case"mouseover":case"mouseout":Mn=null;break;case"pointerover":case"pointerout":Io.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ro.delete(n.pointerId)}}function To(t,n,i,a,d,p){return t===null||t.nativeEvent!==p?(t={blockedOn:n,domEventName:i,eventSystemFlags:a,nativeEvent:p,targetContainers:[d]},n!==null&&(n=Go(n),n!==null&&la(n)),t):(t.eventSystemFlags|=a,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function Z0(t,n,i,a,d){switch(n){case"focusin":return Cn=To(Cn,t,n,i,a,d),!0;case"dragenter":return bn=To(bn,t,n,i,a,d),!0;case"mouseover":return Mn=To(Mn,t,n,i,a,d),!0;case"pointerover":var p=d.pointerId;return Io.set(p,To(Io.get(p)||null,t,n,i,a,d)),!0;case"gotpointercapture":return p=d.pointerId,Ro.set(p,To(Ro.get(p)||null,t,n,i,a,d)),!0}return!1}function cd(t){var n=ir(t.target);if(n!==null){var i=Zt(n);if(i!==null){if(n=i.tag,n===13){if(n=Mo(i),n!==null){t.blockedOn=n,ad(t.priority,function(){sd(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ts(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var i=ca(t.domEventName,t.eventSystemFlags,n[0],t.nativeEvent);if(i===null){i=t.nativeEvent;var a=new i.constructor(i.type,i);ko=a,i.target.dispatchEvent(a),ko=null}else return n=Go(i),n!==null&&la(n),t.blockedOn=i,!1;n.shift()}return!0}function dd(t,n,i){ts(t)&&i.delete(n)}function J0(){aa=!1,Cn!==null&&ts(Cn)&&(Cn=null),bn!==null&&ts(bn)&&(bn=null),Mn!==null&&ts(Mn)&&(Mn=null),Io.forEach(dd),Ro.forEach(dd)}function Ao(t,n){t.blockedOn===n&&(t.blockedOn=null,aa||(aa=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,J0)))}function Lo(t){function n(d){return Ao(d,t)}if(0<es.length){Ao(es[0],t);for(var i=1;i<es.length;i++){var a=es[i];a.blockedOn===t&&(a.blockedOn=null)}}for(Cn!==null&&Ao(Cn,t),bn!==null&&Ao(bn,t),Mn!==null&&Ao(Mn,t),Io.forEach(n),Ro.forEach(n),i=0;i<jn.length;i++)a=jn[i],a.blockedOn===t&&(a.blockedOn=null);for(;0<jn.length&&(i=jn[0],i.blockedOn===null);)cd(i),i.blockedOn===null&&jn.shift()}var Tr=M.ReactCurrentBatchConfig,ns=!0;function ey(t,n,i,a){var d=Ie,p=Tr.transition;Tr.transition=null;try{Ie=1,ua(t,n,i,a)}finally{Ie=d,Tr.transition=p}}function ty(t,n,i,a){var d=Ie,p=Tr.transition;Tr.transition=null;try{Ie=4,ua(t,n,i,a)}finally{Ie=d,Tr.transition=p}}function ua(t,n,i,a){if(ns){var d=ca(t,n,i,a);if(d===null)ba(t,n,a,rs,i),ud(t,a);else if(Z0(d,t,n,i,a))a.stopPropagation();else if(ud(t,a),n&4&&-1<Q0.indexOf(t)){for(;d!==null;){var p=Go(d);if(p!==null&&id(p),p=ca(t,n,i,a),p===null&&ba(t,n,a,rs,i),p===d)break;d=p}d!==null&&a.stopPropagation()}else ba(t,n,a,null,i)}}var rs=null;function ca(t,n,i,a){if(rs=null,t=_o(a),t=ir(t),t!==null)if(n=Zt(t),n===null)t=null;else if(i=n.tag,i===13){if(t=Mo(n),t!==null)return t;t=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null);return rs=t,null}function fd(t){switch(t){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(Jl()){case Po:return 1;case qi:return 4;case jr:case ea:return 16;case Qi:return 536870912;default:return 16}default:return 16}}var Pn=null,da=null,os=null;function pd(){if(os)return os;var t,n=da,i=n.length,a,d="value"in Pn?Pn.value:Pn.textContent,p=d.length;for(t=0;t<i&&n[t]===d[t];t++);var k=i-t;for(a=1;a<=k&&n[i-a]===d[p-a];a++);return os=d.slice(t,1<a?1-a:void 0)}function is(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function ss(){return!0}function hd(){return!1}function Et(t){function n(i,a,d,p,k){this._reactName=i,this._targetInst=d,this.type=a,this.nativeEvent=p,this.target=k,this.currentTarget=null;for(var R in t)t.hasOwnProperty(R)&&(i=t[R],this[R]=i?i(p):p[R]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?ss:hd,this.isPropagationStopped=hd,this}return W(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=ss)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=ss)},persist:function(){},isPersistent:ss}),n}var Ar={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fa=Et(Ar),$o=W({},Ar,{view:0,detail:0}),ny=Et($o),pa,ha,Do,ls=W({},$o,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ga,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Do&&(Do&&t.type==="mousemove"?(pa=t.screenX-Do.screenX,ha=t.screenY-Do.screenY):ha=pa=0,Do=t),pa)},movementY:function(t){return"movementY"in t?t.movementY:ha}}),md=Et(ls),ry=W({},ls,{dataTransfer:0}),oy=Et(ry),iy=W({},$o,{relatedTarget:0}),ma=Et(iy),sy=W({},Ar,{animationName:0,elapsedTime:0,pseudoElement:0}),ly=Et(sy),ay=W({},Ar,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),uy=Et(ay),cy=W({},Ar,{data:0}),gd=Et(cy),dy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fy={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"},py={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hy(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=py[t])?!!n[t]:!1}function ga(){return hy}var my=W({},$o,{key:function(t){if(t.key){var n=dy[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=is(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?fy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ga,charCode:function(t){return t.type==="keypress"?is(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?is(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),gy=Et(my),yy=W({},ls,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yd=Et(yy),xy=W({},$o,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ga}),vy=Et(xy),wy=W({},Ar,{propertyName:0,elapsedTime:0,pseudoElement:0}),Sy=Et(wy),ky=W({},ls,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),_y=Et(ky),Ey=[9,13,27,32],ya=f&&"CompositionEvent"in window,Oo=null;f&&"documentMode"in document&&(Oo=document.documentMode);var Ny=f&&"TextEvent"in window&&!Oo,xd=f&&(!ya||Oo&&8<Oo&&11>=Oo),vd=" ",wd=!1;function Sd(t,n){switch(t){case"keyup":return Ey.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kd(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Lr=!1;function Cy(t,n){switch(t){case"compositionend":return kd(n);case"keypress":return n.which!==32?null:(wd=!0,vd);case"textInput":return t=n.data,t===vd&&wd?null:t;default:return null}}function by(t,n){if(Lr)return t==="compositionend"||!ya&&Sd(t,n)?(t=pd(),os=da=Pn=null,Lr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return xd&&n.locale!=="ko"?null:n.data;default:return null}}var My={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 _d(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!My[t.type]:n==="textarea"}function Ed(t,n,i,a){Fi(a),n=fs(n,"onChange"),0<n.length&&(i=new fa("onChange","change",null,i,a),t.push({event:i,listeners:n}))}var Fo=null,Vo=null;function jy(t){Bd(t,0)}function as(t){var n=Vr(t);if(xe(n))return t}function Py(t,n){if(t==="change")return n}var Nd=!1;if(f){var xa;if(f){var va="oninput"in document;if(!va){var Cd=document.createElement("div");Cd.setAttribute("oninput","return;"),va=typeof Cd.oninput=="function"}xa=va}else xa=!1;Nd=xa&&(!document.documentMode||9<document.documentMode)}function bd(){Fo&&(Fo.detachEvent("onpropertychange",Md),Vo=Fo=null)}function Md(t){if(t.propertyName==="value"&&as(Vo)){var n=[];Ed(n,Vo,t,_o(t)),Wi(jy,n)}}function zy(t,n,i){t==="focusin"?(bd(),Fo=n,Vo=i,Fo.attachEvent("onpropertychange",Md)):t==="focusout"&&bd()}function Iy(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return as(Vo)}function Ry(t,n){if(t==="click")return as(n)}function Ty(t,n){if(t==="input"||t==="change")return as(n)}function Ay(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var Dt=typeof Object.is=="function"?Object.is:Ay;function Bo(t,n){if(Dt(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var i=Object.keys(t),a=Object.keys(n);if(i.length!==a.length)return!1;for(a=0;a<i.length;a++){var d=i[a];if(!h.call(n,d)||!Dt(t[d],n[d]))return!1}return!0}function jd(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Pd(t,n){var i=jd(t);t=0;for(var a;i;){if(i.nodeType===3){if(a=t+i.textContent.length,t<=n&&a>=n)return{node:i,offset:n-t};t=a}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=jd(i)}}function zd(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?zd(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Id(){for(var t=window,n=ge();n instanceof t.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)t=n.contentWindow;else break;n=ge(t.document)}return n}function wa(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}function Ly(t){var n=Id(),i=t.focusedElem,a=t.selectionRange;if(n!==i&&i&&i.ownerDocument&&zd(i.ownerDocument.documentElement,i)){if(a!==null&&wa(i)){if(n=a.start,t=a.end,t===void 0&&(t=n),"selectionStart"in i)i.selectionStart=n,i.selectionEnd=Math.min(t,i.value.length);else if(t=(n=i.ownerDocument||document)&&n.defaultView||window,t.getSelection){t=t.getSelection();var d=i.textContent.length,p=Math.min(a.start,d);a=a.end===void 0?p:Math.min(a.end,d),!t.extend&&p>a&&(d=a,a=p,p=d),d=Pd(i,p);var k=Pd(i,a);d&&k&&(t.rangeCount!==1||t.anchorNode!==d.node||t.anchorOffset!==d.offset||t.focusNode!==k.node||t.focusOffset!==k.offset)&&(n=n.createRange(),n.setStart(d.node,d.offset),t.removeAllRanges(),p>a?(t.addRange(n),t.extend(k.node,k.offset)):(n.setEnd(k.node,k.offset),t.addRange(n)))}}for(n=[],t=i;t=t.parentNode;)t.nodeType===1&&n.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<n.length;i++)t=n[i],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var $y=f&&"documentMode"in document&&11>=document.documentMode,$r=null,Sa=null,Ho=null,ka=!1;function Rd(t,n,i){var a=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ka||$r==null||$r!==ge(a)||(a=$r,"selectionStart"in a&&wa(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ho&&Bo(Ho,a)||(Ho=a,a=fs(Sa,"onSelect"),0<a.length&&(n=new fa("onSelect","select",null,n,i),t.push({event:n,listeners:a}),n.target=$r)))}function us(t,n){var i={};return i[t.toLowerCase()]=n.toLowerCase(),i["Webkit"+t]="webkit"+n,i["Moz"+t]="moz"+n,i}var Dr={animationend:us("Animation","AnimationEnd"),animationiteration:us("Animation","AnimationIteration"),animationstart:us("Animation","AnimationStart"),transitionend:us("Transition","TransitionEnd")},_a={},Td={};f&&(Td=document.createElement("div").style,"AnimationEvent"in window||(delete Dr.animationend.animation,delete Dr.animationiteration.animation,delete Dr.animationstart.animation),"TransitionEvent"in window||delete Dr.transitionend.transition);function cs(t){if(_a[t])return _a[t];if(!Dr[t])return t;var n=Dr[t],i;for(i in n)if(n.hasOwnProperty(i)&&i in Td)return _a[t]=n[i];return t}var Ad=cs("animationend"),Ld=cs("animationiteration"),$d=cs("animationstart"),Dd=cs("transitionend"),Od=new Map,Fd="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 zn(t,n){Od.set(t,n),u(n,[t])}for(var Ea=0;Ea<Fd.length;Ea++){var Na=Fd[Ea],Dy=Na.toLowerCase(),Oy=Na[0].toUpperCase()+Na.slice(1);zn(Dy,"on"+Oy)}zn(Ad,"onAnimationEnd"),zn(Ld,"onAnimationIteration"),zn($d,"onAnimationStart"),zn("dblclick","onDoubleClick"),zn("focusin","onFocus"),zn("focusout","onBlur"),zn(Dd,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wo="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(" "),Fy=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wo));function Vd(t,n,i){var a=t.type||"unknown-event";t.currentTarget=i,ql(a,n,void 0,t),t.currentTarget=null}function Bd(t,n){n=(n&4)!==0;for(var i=0;i<t.length;i++){var a=t[i],d=a.event;a=a.listeners;e:{var p=void 0;if(n)for(var k=a.length-1;0<=k;k--){var R=a[k],L=R.instance,Q=R.currentTarget;if(R=R.listener,L!==p&&d.isPropagationStopped())break e;Vd(d,R,Q),p=L}else for(k=0;k<a.length;k++){if(R=a[k],L=R.instance,Q=R.currentTarget,R=R.listener,L!==p&&d.isPropagationStopped())break e;Vd(d,R,Q),p=L}}}if(Mr)throw t=bo,Mr=!1,bo=null,t}function Ae(t,n){var i=n[Ra];i===void 0&&(i=n[Ra]=new Set);var a=t+"__bubble";i.has(a)||(Hd(n,t,2,!1),i.add(a))}function Ca(t,n,i){var a=0;n&&(a|=4),Hd(i,t,a,n)}var ds="_reactListening"+Math.random().toString(36).slice(2);function Uo(t){if(!t[ds]){t[ds]=!0,s.forEach(function(i){i!=="selectionchange"&&(Fy.has(i)||Ca(i,!1,t),Ca(i,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[ds]||(n[ds]=!0,Ca("selectionchange",!1,n))}}function Hd(t,n,i,a){switch(fd(n)){case 1:var d=ey;break;case 4:d=ty;break;default:d=ua}i=d.bind(null,n,i,t),d=void 0,!Co||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),a?d!==void 0?t.addEventListener(n,i,{capture:!0,passive:d}):t.addEventListener(n,i,!0):d!==void 0?t.addEventListener(n,i,{passive:d}):t.addEventListener(n,i,!1)}function ba(t,n,i,a,d){var p=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var k=a.tag;if(k===3||k===4){var R=a.stateNode.containerInfo;if(R===d||R.nodeType===8&&R.parentNode===d)break;if(k===4)for(k=a.return;k!==null;){var L=k.tag;if((L===3||L===4)&&(L=k.stateNode.containerInfo,L===d||L.nodeType===8&&L.parentNode===d))return;k=k.return}for(;R!==null;){if(k=ir(R),k===null)return;if(L=k.tag,L===5||L===6){a=p=k;continue e}R=R.parentNode}}a=a.return}Wi(function(){var Q=p,oe=_o(i),ie=[];e:{var re=Od.get(t);if(re!==void 0){var de=fa,pe=t;switch(t){case"keypress":if(is(i)===0)break e;case"keydown":case"keyup":de=gy;break;case"focusin":pe="focus",de=ma;break;case"focusout":pe="blur",de=ma;break;case"beforeblur":case"afterblur":de=ma;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=md;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=oy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=vy;break;case Ad:case Ld:case $d:de=ly;break;case Dd:de=Sy;break;case"scroll":de=ny;break;case"wheel":de=_y;break;case"copy":case"cut":case"paste":de=uy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=yd}var he=(n&4)!==0,Ye=!he&&t==="scroll",X=he?re!==null?re+"Capture":null:re;he=[];for(var B=Q,q;B!==null;){q=B;var le=q.stateNode;if(q.tag===5&&le!==null&&(q=le,X!==null&&(le=Jn(B,X),le!=null&&he.push(Yo(B,le,q)))),Ye)break;B=B.return}0<he.length&&(re=new de(re,pe,null,i,oe),ie.push({event:re,listeners:he}))}}if((n&7)===0){e:{if(re=t==="mouseover"||t==="pointerover",de=t==="mouseout"||t==="pointerout",re&&i!==ko&&(pe=i.relatedTarget||i.fromElement)&&(ir(pe)||pe[cn]))break e;if((de||re)&&(re=oe.window===oe?oe:(re=oe.ownerDocument)?re.defaultView||re.parentWindow:window,de?(pe=i.relatedTarget||i.toElement,de=Q,pe=pe?ir(pe):null,pe!==null&&(Ye=Zt(pe),pe!==Ye||pe.tag!==5&&pe.tag!==6)&&(pe=null)):(de=null,pe=Q),de!==pe)){if(he=md,le="onMouseLeave",X="onMouseEnter",B="mouse",(t==="pointerout"||t==="pointerover")&&(he=yd,le="onPointerLeave",X="onPointerEnter",B="pointer"),Ye=de==null?re:Vr(de),q=pe==null?re:Vr(pe),re=new he(le,B+"leave",de,i,oe),re.target=Ye,re.relatedTarget=q,le=null,ir(oe)===Q&&(he=new he(X,B+"enter",pe,i,oe),he.target=q,he.relatedTarget=Ye,le=he),Ye=le,de&&pe)t:{for(he=de,X=pe,B=0,q=he;q;q=Or(q))B++;for(q=0,le=X;le;le=Or(le))q++;for(;0<B-q;)he=Or(he),B--;for(;0<q-B;)X=Or(X),q--;for(;B--;){if(he===X||X!==null&&he===X.alternate)break t;he=Or(he),X=Or(X)}he=null}else he=null;de!==null&&Wd(ie,re,de,he,!1),pe!==null&&Ye!==null&&Wd(ie,Ye,pe,he,!0)}}e:{if(re=Q?Vr(Q):window,de=re.nodeName&&re.nodeName.toLowerCase(),de==="select"||de==="input"&&re.type==="file")var ye=Py;else if(_d(re))if(Nd)ye=Ty;else{ye=Iy;var Se=zy}else(de=re.nodeName)&&de.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(ye=Ry);if(ye&&(ye=ye(t,Q))){Ed(ie,ye,i,oe);break e}Se&&Se(t,re,Q),t==="focusout"&&(Se=re._wrapperState)&&Se.controlled&&re.type==="number"&&ft(re,"number",re.value)}switch(Se=Q?Vr(Q):window,t){case"focusin":(_d(Se)||Se.contentEditable==="true")&&($r=Se,Sa=Q,Ho=null);break;case"focusout":Ho=Sa=$r=null;break;case"mousedown":ka=!0;break;case"contextmenu":case"mouseup":case"dragend":ka=!1,Rd(ie,i,oe);break;case"selectionchange":if($y)break;case"keydown":case"keyup":Rd(ie,i,oe)}var ke;if(ya)e:{switch(t){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else Lr?Sd(t,i)&&(_e="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(_e="onCompositionStart");_e&&(xd&&i.locale!=="ko"&&(Lr||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Lr&&(ke=pd()):(Pn=oe,da="value"in Pn?Pn.value:Pn.textContent,Lr=!0)),Se=fs(Q,_e),0<Se.length&&(_e=new gd(_e,t,null,i,oe),ie.push({event:_e,listeners:Se}),ke?_e.data=ke:(ke=kd(i),ke!==null&&(_e.data=ke)))),(ke=Ny?Cy(t,i):by(t,i))&&(Q=fs(Q,"onBeforeInput"),0<Q.length&&(oe=new gd("onBeforeInput","beforeinput",null,i,oe),ie.push({event:oe,listeners:Q}),oe.data=ke))}Bd(ie,n)})}function Yo(t,n,i){return{instance:t,listener:n,currentTarget:i}}function fs(t,n){for(var i=n+"Capture",a=[];t!==null;){var d=t,p=d.stateNode;d.tag===5&&p!==null&&(d=p,p=Jn(t,i),p!=null&&a.unshift(Yo(t,p,d)),p=Jn(t,n),p!=null&&a.push(Yo(t,p,d))),t=t.return}return a}function Or(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Wd(t,n,i,a,d){for(var p=n._reactName,k=[];i!==null&&i!==a;){var R=i,L=R.alternate,Q=R.stateNode;if(L!==null&&L===a)break;R.tag===5&&Q!==null&&(R=Q,d?(L=Jn(i,p),L!=null&&k.unshift(Yo(i,L,R))):d||(L=Jn(i,p),L!=null&&k.push(Yo(i,L,R)))),i=i.return}k.length!==0&&t.push({event:n,listeners:k})}var Vy=/\r\n?/g,By=/\u0000|\uFFFD/g;function Ud(t){return(typeof t=="string"?t:""+t).replace(Vy,`
|
|
38
|
-
`).replace(By,"")}function ps(t,n,i){if(n=Ud(n),Ud(t)!==n&&i)throw Error(o(425))}function hs(){}var Ma=null,ja=null;function Pa(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var za=typeof setTimeout=="function"?setTimeout:void 0,Hy=typeof clearTimeout=="function"?clearTimeout:void 0,Yd=typeof Promise=="function"?Promise:void 0,Wy=typeof queueMicrotask=="function"?queueMicrotask:typeof Yd<"u"?function(t){return Yd.resolve(null).then(t).catch(Uy)}:za;function Uy(t){setTimeout(function(){throw t})}function Ia(t,n){var i=n,a=0;do{var d=i.nextSibling;if(t.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"){if(a===0){t.removeChild(d),Lo(n);return}a--}else i!=="$"&&i!=="$?"&&i!=="$!"||a++;i=d}while(i);Lo(n)}function In(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return t}function Xd(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"){if(n===0)return t;n--}else i==="/$"&&n++}t=t.previousSibling}return null}var Fr=Math.random().toString(36).slice(2),Jt="__reactFiber$"+Fr,Xo="__reactProps$"+Fr,cn="__reactContainer$"+Fr,Ra="__reactEvents$"+Fr,Yy="__reactListeners$"+Fr,Xy="__reactHandles$"+Fr;function ir(t){var n=t[Jt];if(n)return n;for(var i=t.parentNode;i;){if(n=i[cn]||i[Jt]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(t=Xd(t);t!==null;){if(i=t[Jt])return i;t=Xd(t)}return n}t=i,i=t.parentNode}return null}function Go(t){return t=t[Jt]||t[cn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Vr(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(o(33))}function ms(t){return t[Xo]||null}var Ta=[],Br=-1;function Rn(t){return{current:t}}function Le(t){0>Br||(t.current=Ta[Br],Ta[Br]=null,Br--)}function Re(t,n){Br++,Ta[Br]=t.current,t.current=n}var Tn={},it=Rn(Tn),ht=Rn(!1),sr=Tn;function Hr(t,n){var i=t.type.contextTypes;if(!i)return Tn;var a=t.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===n)return a.__reactInternalMemoizedMaskedChildContext;var d={},p;for(p in i)d[p]=n[p];return a&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=n,t.__reactInternalMemoizedMaskedChildContext=d),d}function mt(t){return t=t.childContextTypes,t!=null}function gs(){Le(ht),Le(it)}function Gd(t,n,i){if(it.current!==Tn)throw Error(o(168));Re(it,n),Re(ht,i)}function Kd(t,n,i){var a=t.stateNode;if(n=n.childContextTypes,typeof a.getChildContext!="function")return i;a=a.getChildContext();for(var d in a)if(!(d in n))throw Error(o(108,ue(t)||"Unknown",d));return W({},i,a)}function ys(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Tn,sr=it.current,Re(it,t),Re(ht,ht.current),!0}function qd(t,n,i){var a=t.stateNode;if(!a)throw Error(o(169));i?(t=Kd(t,n,sr),a.__reactInternalMemoizedMergedChildContext=t,Le(ht),Le(it),Re(it,t)):Le(ht),Re(ht,i)}var dn=null,xs=!1,Aa=!1;function Qd(t){dn===null?dn=[t]:dn.push(t)}function Gy(t){xs=!0,Qd(t)}function An(){if(!Aa&&dn!==null){Aa=!0;var t=0,n=Ie;try{var i=dn;for(Ie=1;t<i.length;t++){var a=i[t];do a=a(!0);while(a!==null)}dn=null,xs=!1}catch(d){throw dn!==null&&(dn=dn.slice(t+1)),Xi(Po,An),d}finally{Ie=n,Aa=!1}}return null}var Wr=[],Ur=0,vs=null,ws=0,It=[],Rt=0,lr=null,fn=1,pn="";function ar(t,n){Wr[Ur++]=ws,Wr[Ur++]=vs,vs=t,ws=n}function Zd(t,n,i){It[Rt++]=fn,It[Rt++]=pn,It[Rt++]=lr,lr=t;var a=fn;t=pn;var d=32-_t(a)-1;a&=~(1<<d),i+=1;var p=32-_t(n)+d;if(30<p){var k=d-d%5;p=(a&(1<<k)-1).toString(32),a>>=k,d-=k,fn=1<<32-_t(n)+d|i<<d|a,pn=p+t}else fn=1<<p|i<<d|a,pn=t}function La(t){t.return!==null&&(ar(t,1),Zd(t,1,0))}function $a(t){for(;t===vs;)vs=Wr[--Ur],Wr[Ur]=null,ws=Wr[--Ur],Wr[Ur]=null;for(;t===lr;)lr=It[--Rt],It[Rt]=null,pn=It[--Rt],It[Rt]=null,fn=It[--Rt],It[Rt]=null}var Nt=null,Ct=null,De=!1,Ot=null;function Jd(t,n){var i=$t(5,null,null,0);i.elementType="DELETED",i.stateNode=n,i.return=t,n=t.deletions,n===null?(t.deletions=[i],t.flags|=16):n.push(i)}function ef(t,n){switch(t.tag){case 5:var i=t.type;return n=n.nodeType!==1||i.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(t.stateNode=n,Nt=t,Ct=In(n.firstChild),!0):!1;case 6:return n=t.pendingProps===""||n.nodeType!==3?null:n,n!==null?(t.stateNode=n,Nt=t,Ct=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(i=lr!==null?{id:fn,overflow:pn}:null,t.memoizedState={dehydrated:n,treeContext:i,retryLane:1073741824},i=$t(18,null,null,0),i.stateNode=n,i.return=t,t.child=i,Nt=t,Ct=null,!0):!1;default:return!1}}function Da(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Oa(t){if(De){var n=Ct;if(n){var i=n;if(!ef(t,n)){if(Da(t))throw Error(o(418));n=In(i.nextSibling);var a=Nt;n&&ef(t,n)?Jd(a,i):(t.flags=t.flags&-4097|2,De=!1,Nt=t)}}else{if(Da(t))throw Error(o(418));t.flags=t.flags&-4097|2,De=!1,Nt=t}}}function tf(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Nt=t}function Ss(t){if(t!==Nt)return!1;if(!De)return tf(t),De=!0,!1;var n;if((n=t.tag!==3)&&!(n=t.tag!==5)&&(n=t.type,n=n!=="head"&&n!=="body"&&!Pa(t.type,t.memoizedProps)),n&&(n=Ct)){if(Da(t))throw nf(),Error(o(418));for(;n;)Jd(t,n),n=In(n.nextSibling)}if(tf(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));e:{for(t=t.nextSibling,n=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"){if(n===0){Ct=In(t.nextSibling);break e}n--}else i!=="$"&&i!=="$!"&&i!=="$?"||n++}t=t.nextSibling}Ct=null}}else Ct=Nt?In(t.stateNode.nextSibling):null;return!0}function nf(){for(var t=Ct;t;)t=In(t.nextSibling)}function Yr(){Ct=Nt=null,De=!1}function Fa(t){Ot===null?Ot=[t]:Ot.push(t)}var Ky=M.ReactCurrentBatchConfig;function Ko(t,n,i){if(t=i.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(o(309));var a=i.stateNode}if(!a)throw Error(o(147,t));var d=a,p=""+t;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===p?n.ref:(n=function(k){var R=d.refs;k===null?delete R[p]:R[p]=k},n._stringRef=p,n)}if(typeof t!="string")throw Error(o(284));if(!i._owner)throw Error(o(290,t))}return t}function ks(t,n){throw t=Object.prototype.toString.call(n),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t))}function rf(t){var n=t._init;return n(t._payload)}function of(t){function n(X,B){if(t){var q=X.deletions;q===null?(X.deletions=[B],X.flags|=16):q.push(B)}}function i(X,B){if(!t)return null;for(;B!==null;)n(X,B),B=B.sibling;return null}function a(X,B){for(X=new Map;B!==null;)B.key!==null?X.set(B.key,B):X.set(B.index,B),B=B.sibling;return X}function d(X,B){return X=Hn(X,B),X.index=0,X.sibling=null,X}function p(X,B,q){return X.index=q,t?(q=X.alternate,q!==null?(q=q.index,q<B?(X.flags|=2,B):q):(X.flags|=2,B)):(X.flags|=1048576,B)}function k(X){return t&&X.alternate===null&&(X.flags|=2),X}function R(X,B,q,le){return B===null||B.tag!==6?(B=zu(q,X.mode,le),B.return=X,B):(B=d(B,q),B.return=X,B)}function L(X,B,q,le){var ye=q.type;return ye===H?oe(X,B,q.props.children,le,q.key):B!==null&&(B.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===F&&rf(ye)===B.type)?(le=d(B,q.props),le.ref=Ko(X,B,q),le.return=X,le):(le=Ys(q.type,q.key,q.props,null,X.mode,le),le.ref=Ko(X,B,q),le.return=X,le)}function Q(X,B,q,le){return B===null||B.tag!==4||B.stateNode.containerInfo!==q.containerInfo||B.stateNode.implementation!==q.implementation?(B=Iu(q,X.mode,le),B.return=X,B):(B=d(B,q.children||[]),B.return=X,B)}function oe(X,B,q,le,ye){return B===null||B.tag!==7?(B=gr(q,X.mode,le,ye),B.return=X,B):(B=d(B,q),B.return=X,B)}function ie(X,B,q){if(typeof B=="string"&&B!==""||typeof B=="number")return B=zu(""+B,X.mode,q),B.return=X,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case $:return q=Ys(B.type,B.key,B.props,null,X.mode,q),q.ref=Ko(X,null,B),q.return=X,q;case D:return B=Iu(B,X.mode,q),B.return=X,B;case F:var le=B._init;return ie(X,le(B._payload),q)}if(rt(B)||T(B))return B=gr(B,X.mode,q,null),B.return=X,B;ks(X,B)}return null}function re(X,B,q,le){var ye=B!==null?B.key:null;if(typeof q=="string"&&q!==""||typeof q=="number")return ye!==null?null:R(X,B,""+q,le);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case $:return q.key===ye?L(X,B,q,le):null;case D:return q.key===ye?Q(X,B,q,le):null;case F:return ye=q._init,re(X,B,ye(q._payload),le)}if(rt(q)||T(q))return ye!==null?null:oe(X,B,q,le,null);ks(X,q)}return null}function de(X,B,q,le,ye){if(typeof le=="string"&&le!==""||typeof le=="number")return X=X.get(q)||null,R(B,X,""+le,ye);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case $:return X=X.get(le.key===null?q:le.key)||null,L(B,X,le,ye);case D:return X=X.get(le.key===null?q:le.key)||null,Q(B,X,le,ye);case F:var Se=le._init;return de(X,B,q,Se(le._payload),ye)}if(rt(le)||T(le))return X=X.get(q)||null,oe(B,X,le,ye,null);ks(B,le)}return null}function pe(X,B,q,le){for(var ye=null,Se=null,ke=B,_e=B=0,et=null;ke!==null&&_e<q.length;_e++){ke.index>_e?(et=ke,ke=null):et=ke.sibling;var Pe=re(X,ke,q[_e],le);if(Pe===null){ke===null&&(ke=et);break}t&&ke&&Pe.alternate===null&&n(X,ke),B=p(Pe,B,_e),Se===null?ye=Pe:Se.sibling=Pe,Se=Pe,ke=et}if(_e===q.length)return i(X,ke),De&&ar(X,_e),ye;if(ke===null){for(;_e<q.length;_e++)ke=ie(X,q[_e],le),ke!==null&&(B=p(ke,B,_e),Se===null?ye=ke:Se.sibling=ke,Se=ke);return De&&ar(X,_e),ye}for(ke=a(X,ke);_e<q.length;_e++)et=de(ke,X,_e,q[_e],le),et!==null&&(t&&et.alternate!==null&&ke.delete(et.key===null?_e:et.key),B=p(et,B,_e),Se===null?ye=et:Se.sibling=et,Se=et);return t&&ke.forEach(function(Wn){return n(X,Wn)}),De&&ar(X,_e),ye}function he(X,B,q,le){var ye=T(q);if(typeof ye!="function")throw Error(o(150));if(q=ye.call(q),q==null)throw Error(o(151));for(var Se=ye=null,ke=B,_e=B=0,et=null,Pe=q.next();ke!==null&&!Pe.done;_e++,Pe=q.next()){ke.index>_e?(et=ke,ke=null):et=ke.sibling;var Wn=re(X,ke,Pe.value,le);if(Wn===null){ke===null&&(ke=et);break}t&&ke&&Wn.alternate===null&&n(X,ke),B=p(Wn,B,_e),Se===null?ye=Wn:Se.sibling=Wn,Se=Wn,ke=et}if(Pe.done)return i(X,ke),De&&ar(X,_e),ye;if(ke===null){for(;!Pe.done;_e++,Pe=q.next())Pe=ie(X,Pe.value,le),Pe!==null&&(B=p(Pe,B,_e),Se===null?ye=Pe:Se.sibling=Pe,Se=Pe);return De&&ar(X,_e),ye}for(ke=a(X,ke);!Pe.done;_e++,Pe=q.next())Pe=de(ke,X,_e,Pe.value,le),Pe!==null&&(t&&Pe.alternate!==null&&ke.delete(Pe.key===null?_e:Pe.key),B=p(Pe,B,_e),Se===null?ye=Pe:Se.sibling=Pe,Se=Pe);return t&&ke.forEach(function(Mx){return n(X,Mx)}),De&&ar(X,_e),ye}function Ye(X,B,q,le){if(typeof q=="object"&&q!==null&&q.type===H&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case $:e:{for(var ye=q.key,Se=B;Se!==null;){if(Se.key===ye){if(ye=q.type,ye===H){if(Se.tag===7){i(X,Se.sibling),B=d(Se,q.props.children),B.return=X,X=B;break e}}else if(Se.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===F&&rf(ye)===Se.type){i(X,Se.sibling),B=d(Se,q.props),B.ref=Ko(X,Se,q),B.return=X,X=B;break e}i(X,Se);break}else n(X,Se);Se=Se.sibling}q.type===H?(B=gr(q.props.children,X.mode,le,q.key),B.return=X,X=B):(le=Ys(q.type,q.key,q.props,null,X.mode,le),le.ref=Ko(X,B,q),le.return=X,X=le)}return k(X);case D:e:{for(Se=q.key;B!==null;){if(B.key===Se)if(B.tag===4&&B.stateNode.containerInfo===q.containerInfo&&B.stateNode.implementation===q.implementation){i(X,B.sibling),B=d(B,q.children||[]),B.return=X,X=B;break e}else{i(X,B);break}else n(X,B);B=B.sibling}B=Iu(q,X.mode,le),B.return=X,X=B}return k(X);case F:return Se=q._init,Ye(X,B,Se(q._payload),le)}if(rt(q))return pe(X,B,q,le);if(T(q))return he(X,B,q,le);ks(X,q)}return typeof q=="string"&&q!==""||typeof q=="number"?(q=""+q,B!==null&&B.tag===6?(i(X,B.sibling),B=d(B,q),B.return=X,X=B):(i(X,B),B=zu(q,X.mode,le),B.return=X,X=B),k(X)):i(X,B)}return Ye}var Xr=of(!0),sf=of(!1),_s=Rn(null),Es=null,Gr=null,Va=null;function Ba(){Va=Gr=Es=null}function Ha(t){var n=_s.current;Le(_s),t._currentValue=n}function Wa(t,n,i){for(;t!==null;){var a=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),t===i)break;t=t.return}}function Kr(t,n){Es=t,Va=Gr=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&n)!==0&&(gt=!0),t.firstContext=null)}function Tt(t){var n=t._currentValue;if(Va!==t)if(t={context:t,memoizedValue:n,next:null},Gr===null){if(Es===null)throw Error(o(308));Gr=t,Es.dependencies={lanes:0,firstContext:t}}else Gr=Gr.next=t;return n}var ur=null;function Ua(t){ur===null?ur=[t]:ur.push(t)}function lf(t,n,i,a){var d=n.interleaved;return d===null?(i.next=i,Ua(n)):(i.next=d.next,d.next=i),n.interleaved=i,hn(t,a)}function hn(t,n){t.lanes|=n;var i=t.alternate;for(i!==null&&(i.lanes|=n),i=t,t=t.return;t!==null;)t.childLanes|=n,i=t.alternate,i!==null&&(i.childLanes|=n),i=t,t=t.return;return i.tag===3?i.stateNode:null}var Ln=!1;function Ya(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function af(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function mn(t,n){return{eventTime:t,lane:n,tag:0,payload:null,callback:null,next:null}}function $n(t,n,i){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(je&2)!==0){var d=a.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),a.pending=n,hn(t,i)}return d=a.interleaved,d===null?(n.next=n,Ua(a)):(n.next=d.next,d.next=n),a.interleaved=n,hn(t,i)}function Ns(t,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194240)!==0)){var a=n.lanes;a&=t.pendingLanes,i|=a,n.lanes=i,Rr(t,i)}}function uf(t,n){var i=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,i===a)){var d=null,p=null;if(i=i.firstBaseUpdate,i!==null){do{var k={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};p===null?d=p=k:p=p.next=k,i=i.next}while(i!==null);p===null?d=p=n:p=p.next=n}else d=p=n;i={baseState:a.baseState,firstBaseUpdate:d,lastBaseUpdate:p,shared:a.shared,effects:a.effects},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=n:t.next=n,i.lastBaseUpdate=n}function Cs(t,n,i,a){var d=t.updateQueue;Ln=!1;var p=d.firstBaseUpdate,k=d.lastBaseUpdate,R=d.shared.pending;if(R!==null){d.shared.pending=null;var L=R,Q=L.next;L.next=null,k===null?p=Q:k.next=Q,k=L;var oe=t.alternate;oe!==null&&(oe=oe.updateQueue,R=oe.lastBaseUpdate,R!==k&&(R===null?oe.firstBaseUpdate=Q:R.next=Q,oe.lastBaseUpdate=L))}if(p!==null){var ie=d.baseState;k=0,oe=Q=L=null,R=p;do{var re=R.lane,de=R.eventTime;if((a&re)===re){oe!==null&&(oe=oe.next={eventTime:de,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var pe=t,he=R;switch(re=n,de=i,he.tag){case 1:if(pe=he.payload,typeof pe=="function"){ie=pe.call(de,ie,re);break e}ie=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=he.payload,re=typeof pe=="function"?pe.call(de,ie,re):pe,re==null)break e;ie=W({},ie,re);break e;case 2:Ln=!0}}R.callback!==null&&R.lane!==0&&(t.flags|=64,re=d.effects,re===null?d.effects=[R]:re.push(R))}else de={eventTime:de,lane:re,tag:R.tag,payload:R.payload,callback:R.callback,next:null},oe===null?(Q=oe=de,L=ie):oe=oe.next=de,k|=re;if(R=R.next,R===null){if(R=d.shared.pending,R===null)break;re=R,R=re.next,re.next=null,d.lastBaseUpdate=re,d.shared.pending=null}}while(!0);if(oe===null&&(L=ie),d.baseState=L,d.firstBaseUpdate=Q,d.lastBaseUpdate=oe,n=d.shared.interleaved,n!==null){d=n;do k|=d.lane,d=d.next;while(d!==n)}else p===null&&(d.shared.lanes=0);fr|=k,t.lanes=k,t.memoizedState=ie}}function cf(t,n,i){if(t=n.effects,n.effects=null,t!==null)for(n=0;n<t.length;n++){var a=t[n],d=a.callback;if(d!==null){if(a.callback=null,a=i,typeof d!="function")throw Error(o(191,d));d.call(a)}}}var qo={},en=Rn(qo),Qo=Rn(qo),Zo=Rn(qo);function cr(t){if(t===qo)throw Error(o(174));return t}function Xa(t,n){switch(Re(Zo,n),Re(Qo,t),Re(en,qo),t=n.nodeType,t){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:St(null,"");break;default:t=t===8?n.parentNode:n,n=t.namespaceURI||null,t=t.tagName,n=St(n,t)}Le(en),Re(en,n)}function qr(){Le(en),Le(Qo),Le(Zo)}function df(t){cr(Zo.current);var n=cr(en.current),i=St(n,t.type);n!==i&&(Re(Qo,t),Re(en,i))}function Ga(t){Qo.current===t&&(Le(en),Le(Qo))}var He=Rn(0);function bs(t){for(var n=t;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(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 null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Ka=[];function qa(){for(var t=0;t<Ka.length;t++)Ka[t]._workInProgressVersionPrimary=null;Ka.length=0}var Ms=M.ReactCurrentDispatcher,Qa=M.ReactCurrentBatchConfig,dr=0,We=null,qe=null,Ze=null,js=!1,Jo=!1,ei=0,qy=0;function st(){throw Error(o(321))}function Za(t,n){if(n===null)return!1;for(var i=0;i<n.length&&i<t.length;i++)if(!Dt(t[i],n[i]))return!1;return!0}function Ja(t,n,i,a,d,p){if(dr=p,We=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Ms.current=t===null||t.memoizedState===null?ex:tx,t=i(a,d),Jo){p=0;do{if(Jo=!1,ei=0,25<=p)throw Error(o(301));p+=1,Ze=qe=null,n.updateQueue=null,Ms.current=nx,t=i(a,d)}while(Jo)}if(Ms.current=Is,n=qe!==null&&qe.next!==null,dr=0,Ze=qe=We=null,js=!1,n)throw Error(o(300));return t}function eu(){var t=ei!==0;return ei=0,t}function tn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?We.memoizedState=Ze=t:Ze=Ze.next=t,Ze}function At(){if(qe===null){var t=We.alternate;t=t!==null?t.memoizedState:null}else t=qe.next;var n=Ze===null?We.memoizedState:Ze.next;if(n!==null)Ze=n,qe=t;else{if(t===null)throw Error(o(310));qe=t,t={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},Ze===null?We.memoizedState=Ze=t:Ze=Ze.next=t}return Ze}function ti(t,n){return typeof n=="function"?n(t):n}function tu(t){var n=At(),i=n.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var a=qe,d=a.baseQueue,p=i.pending;if(p!==null){if(d!==null){var k=d.next;d.next=p.next,p.next=k}a.baseQueue=d=p,i.pending=null}if(d!==null){p=d.next,a=a.baseState;var R=k=null,L=null,Q=p;do{var oe=Q.lane;if((dr&oe)===oe)L!==null&&(L=L.next={lane:0,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),a=Q.hasEagerState?Q.eagerState:t(a,Q.action);else{var ie={lane:oe,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null};L===null?(R=L=ie,k=a):L=L.next=ie,We.lanes|=oe,fr|=oe}Q=Q.next}while(Q!==null&&Q!==p);L===null?k=a:L.next=R,Dt(a,n.memoizedState)||(gt=!0),n.memoizedState=a,n.baseState=k,n.baseQueue=L,i.lastRenderedState=a}if(t=i.interleaved,t!==null){d=t;do p=d.lane,We.lanes|=p,fr|=p,d=d.next;while(d!==t)}else d===null&&(i.lanes=0);return[n.memoizedState,i.dispatch]}function nu(t){var n=At(),i=n.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=t;var a=i.dispatch,d=i.pending,p=n.memoizedState;if(d!==null){i.pending=null;var k=d=d.next;do p=t(p,k.action),k=k.next;while(k!==d);Dt(p,n.memoizedState)||(gt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),i.lastRenderedState=p}return[p,a]}function ff(){}function pf(t,n){var i=We,a=At(),d=n(),p=!Dt(a.memoizedState,d);if(p&&(a.memoizedState=d,gt=!0),a=a.queue,ru(gf.bind(null,i,a,t),[t]),a.getSnapshot!==n||p||Ze!==null&&Ze.memoizedState.tag&1){if(i.flags|=2048,ni(9,mf.bind(null,i,a,d,n),void 0,null),Je===null)throw Error(o(349));(dr&30)!==0||hf(i,n,d)}return d}function hf(t,n,i){t.flags|=16384,t={getSnapshot:n,value:i},n=We.updateQueue,n===null?(n={lastEffect:null,stores:null},We.updateQueue=n,n.stores=[t]):(i=n.stores,i===null?n.stores=[t]:i.push(t))}function mf(t,n,i,a){n.value=i,n.getSnapshot=a,yf(n)&&xf(t)}function gf(t,n,i){return i(function(){yf(n)&&xf(t)})}function yf(t){var n=t.getSnapshot;t=t.value;try{var i=n();return!Dt(t,i)}catch{return!0}}function xf(t){var n=hn(t,1);n!==null&&Ht(n,t,1,-1)}function vf(t){var n=tn();return typeof t=="function"&&(t=t()),n.memoizedState=n.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:t},n.queue=t,t=t.dispatch=Jy.bind(null,We,t),[n.memoizedState,t]}function ni(t,n,i,a){return t={tag:t,create:n,destroy:i,deps:a,next:null},n=We.updateQueue,n===null?(n={lastEffect:null,stores:null},We.updateQueue=n,n.lastEffect=t.next=t):(i=n.lastEffect,i===null?n.lastEffect=t.next=t:(a=i.next,i.next=t,t.next=a,n.lastEffect=t)),t}function wf(){return At().memoizedState}function Ps(t,n,i,a){var d=tn();We.flags|=t,d.memoizedState=ni(1|n,i,void 0,a===void 0?null:a)}function zs(t,n,i,a){var d=At();a=a===void 0?null:a;var p=void 0;if(qe!==null){var k=qe.memoizedState;if(p=k.destroy,a!==null&&Za(a,k.deps)){d.memoizedState=ni(n,i,p,a);return}}We.flags|=t,d.memoizedState=ni(1|n,i,p,a)}function Sf(t,n){return Ps(8390656,8,t,n)}function ru(t,n){return zs(2048,8,t,n)}function kf(t,n){return zs(4,2,t,n)}function _f(t,n){return zs(4,4,t,n)}function Ef(t,n){if(typeof n=="function")return t=t(),n(t),function(){n(null)};if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function Nf(t,n,i){return i=i!=null?i.concat([t]):null,zs(4,4,Ef.bind(null,n,t),i)}function ou(){}function Cf(t,n){var i=At();n=n===void 0?null:n;var a=i.memoizedState;return a!==null&&n!==null&&Za(n,a[1])?a[0]:(i.memoizedState=[t,n],t)}function bf(t,n){var i=At();n=n===void 0?null:n;var a=i.memoizedState;return a!==null&&n!==null&&Za(n,a[1])?a[0]:(t=t(),i.memoizedState=[t,n],t)}function Mf(t,n,i){return(dr&21)===0?(t.baseState&&(t.baseState=!1,gt=!0),t.memoizedState=i):(Dt(i,n)||(i=Ji(),We.lanes|=i,fr|=i,t.baseState=!0),n)}function Qy(t,n){var i=Ie;Ie=i!==0&&4>i?i:4,t(!0);var a=Qa.transition;Qa.transition={};try{t(!1),n()}finally{Ie=i,Qa.transition=a}}function jf(){return At().memoizedState}function Zy(t,n,i){var a=Vn(t);if(i={lane:a,action:i,hasEagerState:!1,eagerState:null,next:null},Pf(t))zf(n,i);else if(i=lf(t,n,i,a),i!==null){var d=dt();Ht(i,t,a,d),If(i,n,a)}}function Jy(t,n,i){var a=Vn(t),d={lane:a,action:i,hasEagerState:!1,eagerState:null,next:null};if(Pf(t))zf(n,d);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var k=n.lastRenderedState,R=p(k,i);if(d.hasEagerState=!0,d.eagerState=R,Dt(R,k)){var L=n.interleaved;L===null?(d.next=d,Ua(n)):(d.next=L.next,L.next=d),n.interleaved=d;return}}catch{}finally{}i=lf(t,n,d,a),i!==null&&(d=dt(),Ht(i,t,a,d),If(i,n,a))}}function Pf(t){var n=t.alternate;return t===We||n!==null&&n===We}function zf(t,n){Jo=js=!0;var i=t.pending;i===null?n.next=n:(n.next=i.next,i.next=n),t.pending=n}function If(t,n,i){if((i&4194240)!==0){var a=n.lanes;a&=t.pendingLanes,i|=a,n.lanes=i,Rr(t,i)}}var Is={readContext:Tt,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useInsertionEffect:st,useLayoutEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useMutableSource:st,useSyncExternalStore:st,useId:st,unstable_isNewReconciler:!1},ex={readContext:Tt,useCallback:function(t,n){return tn().memoizedState=[t,n===void 0?null:n],t},useContext:Tt,useEffect:Sf,useImperativeHandle:function(t,n,i){return i=i!=null?i.concat([t]):null,Ps(4194308,4,Ef.bind(null,n,t),i)},useLayoutEffect:function(t,n){return Ps(4194308,4,t,n)},useInsertionEffect:function(t,n){return Ps(4,2,t,n)},useMemo:function(t,n){var i=tn();return n=n===void 0?null:n,t=t(),i.memoizedState=[t,n],t},useReducer:function(t,n,i){var a=tn();return n=i!==void 0?i(n):n,a.memoizedState=a.baseState=n,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},a.queue=t,t=t.dispatch=Zy.bind(null,We,t),[a.memoizedState,t]},useRef:function(t){var n=tn();return t={current:t},n.memoizedState=t},useState:vf,useDebugValue:ou,useDeferredValue:function(t){return tn().memoizedState=t},useTransition:function(){var t=vf(!1),n=t[0];return t=Qy.bind(null,t[1]),tn().memoizedState=t,[n,t]},useMutableSource:function(){},useSyncExternalStore:function(t,n,i){var a=We,d=tn();if(De){if(i===void 0)throw Error(o(407));i=i()}else{if(i=n(),Je===null)throw Error(o(349));(dr&30)!==0||hf(a,n,i)}d.memoizedState=i;var p={value:i,getSnapshot:n};return d.queue=p,Sf(gf.bind(null,a,p,t),[t]),a.flags|=2048,ni(9,mf.bind(null,a,p,i,n),void 0,null),i},useId:function(){var t=tn(),n=Je.identifierPrefix;if(De){var i=pn,a=fn;i=(a&~(1<<32-_t(a)-1)).toString(32)+i,n=":"+n+"R"+i,i=ei++,0<i&&(n+="H"+i.toString(32)),n+=":"}else i=qy++,n=":"+n+"r"+i.toString(32)+":";return t.memoizedState=n},unstable_isNewReconciler:!1},tx={readContext:Tt,useCallback:Cf,useContext:Tt,useEffect:ru,useImperativeHandle:Nf,useInsertionEffect:kf,useLayoutEffect:_f,useMemo:bf,useReducer:tu,useRef:wf,useState:function(){return tu(ti)},useDebugValue:ou,useDeferredValue:function(t){var n=At();return Mf(n,qe.memoizedState,t)},useTransition:function(){var t=tu(ti)[0],n=At().memoizedState;return[t,n]},useMutableSource:ff,useSyncExternalStore:pf,useId:jf,unstable_isNewReconciler:!1},nx={readContext:Tt,useCallback:Cf,useContext:Tt,useEffect:ru,useImperativeHandle:Nf,useInsertionEffect:kf,useLayoutEffect:_f,useMemo:bf,useReducer:nu,useRef:wf,useState:function(){return nu(ti)},useDebugValue:ou,useDeferredValue:function(t){var n=At();return qe===null?n.memoizedState=t:Mf(n,qe.memoizedState,t)},useTransition:function(){var t=nu(ti)[0],n=At().memoizedState;return[t,n]},useMutableSource:ff,useSyncExternalStore:pf,useId:jf,unstable_isNewReconciler:!1};function Ft(t,n){if(t&&t.defaultProps){n=W({},n),t=t.defaultProps;for(var i in t)n[i]===void 0&&(n[i]=t[i]);return n}return n}function iu(t,n,i,a){n=t.memoizedState,i=i(a,n),i=i==null?n:W({},n,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Rs={isMounted:function(t){return(t=t._reactInternals)?Zt(t)===t:!1},enqueueSetState:function(t,n,i){t=t._reactInternals;var a=dt(),d=Vn(t),p=mn(a,d);p.payload=n,i!=null&&(p.callback=i),n=$n(t,p,d),n!==null&&(Ht(n,t,d,a),Ns(n,t,d))},enqueueReplaceState:function(t,n,i){t=t._reactInternals;var a=dt(),d=Vn(t),p=mn(a,d);p.tag=1,p.payload=n,i!=null&&(p.callback=i),n=$n(t,p,d),n!==null&&(Ht(n,t,d,a),Ns(n,t,d))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var i=dt(),a=Vn(t),d=mn(i,a);d.tag=2,n!=null&&(d.callback=n),n=$n(t,d,a),n!==null&&(Ht(n,t,a,i),Ns(n,t,a))}};function Rf(t,n,i,a,d,p,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(a,p,k):n.prototype&&n.prototype.isPureReactComponent?!Bo(i,a)||!Bo(d,p):!0}function Tf(t,n,i){var a=!1,d=Tn,p=n.contextType;return typeof p=="object"&&p!==null?p=Tt(p):(d=mt(n)?sr:it.current,a=n.contextTypes,p=(a=a!=null)?Hr(t,d):Tn),n=new n(i,p),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Rs,t.stateNode=n,n._reactInternals=t,a&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=d,t.__reactInternalMemoizedMaskedChildContext=p),n}function Af(t,n,i,a){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,a),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,a),n.state!==t&&Rs.enqueueReplaceState(n,n.state,null)}function su(t,n,i,a){var d=t.stateNode;d.props=i,d.state=t.memoizedState,d.refs={},Ya(t);var p=n.contextType;typeof p=="object"&&p!==null?d.context=Tt(p):(p=mt(n)?sr:it.current,d.context=Hr(t,p)),d.state=t.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(iu(t,n,p,i),d.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(n=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),n!==d.state&&Rs.enqueueReplaceState(d,d.state,null),Cs(t,i,d,a),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308)}function Qr(t,n){try{var i="",a=n;do i+=ae(a),a=a.return;while(a);var d=i}catch(p){d=`
|
|
39
|
-
Error generating stack: `+p.message+`
|
|
40
|
-
`+p.stack}return{value:t,source:n,stack:d,digest:null}}function lu(t,n,i){return{value:t,source:null,stack:i??null,digest:n??null}}function au(t,n){try{console.error(n.value)}catch(i){setTimeout(function(){throw i})}}var rx=typeof WeakMap=="function"?WeakMap:Map;function Lf(t,n,i){i=mn(-1,i),i.tag=3,i.payload={element:null};var a=n.value;return i.callback=function(){Fs||(Fs=!0,_u=a),au(t,n)},i}function $f(t,n,i){i=mn(-1,i),i.tag=3;var a=t.type.getDerivedStateFromError;if(typeof a=="function"){var d=n.value;i.payload=function(){return a(d)},i.callback=function(){au(t,n)}}var p=t.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(i.callback=function(){au(t,n),typeof a!="function"&&(On===null?On=new Set([this]):On.add(this));var k=n.stack;this.componentDidCatch(n.value,{componentStack:k!==null?k:""})}),i}function Df(t,n,i){var a=t.pingCache;if(a===null){a=t.pingCache=new rx;var d=new Set;a.set(n,d)}else d=a.get(n),d===void 0&&(d=new Set,a.set(n,d));d.has(i)||(d.add(i),t=yx.bind(null,t,n,i),n.then(t,t))}function Of(t){do{var n;if((n=t.tag===13)&&(n=t.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return t;t=t.return}while(t!==null);return null}function Ff(t,n,i,a,d){return(t.mode&1)===0?(t===n?t.flags|=65536:(t.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(n=mn(-1,1),n.tag=2,$n(i,n,1))),i.lanes|=1),t):(t.flags|=65536,t.lanes=d,t)}var ox=M.ReactCurrentOwner,gt=!1;function ct(t,n,i,a){n.child=t===null?sf(n,null,i,a):Xr(n,t.child,i,a)}function Vf(t,n,i,a,d){i=i.render;var p=n.ref;return Kr(n,d),a=Ja(t,n,i,a,p,d),i=eu(),t!==null&&!gt?(n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~d,gn(t,n,d)):(De&&i&&La(n),n.flags|=1,ct(t,n,a,d),n.child)}function Bf(t,n,i,a,d){if(t===null){var p=i.type;return typeof p=="function"&&!Pu(p)&&p.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(n.tag=15,n.type=p,Hf(t,n,p,a,d)):(t=Ys(i.type,null,a,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(p=t.child,(t.lanes&d)===0){var k=p.memoizedProps;if(i=i.compare,i=i!==null?i:Bo,i(k,a)&&t.ref===n.ref)return gn(t,n,d)}return n.flags|=1,t=Hn(p,a),t.ref=n.ref,t.return=n,n.child=t}function Hf(t,n,i,a,d){if(t!==null){var p=t.memoizedProps;if(Bo(p,a)&&t.ref===n.ref)if(gt=!1,n.pendingProps=a=p,(t.lanes&d)!==0)(t.flags&131072)!==0&&(gt=!0);else return n.lanes=t.lanes,gn(t,n,d)}return uu(t,n,i,a,d)}function Wf(t,n,i){var a=n.pendingProps,d=a.children,p=t!==null?t.memoizedState:null;if(a.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Re(Jr,bt),bt|=i;else{if((i&1073741824)===0)return t=p!==null?p.baseLanes|i:i,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:t,cachePool:null,transitions:null},n.updateQueue=null,Re(Jr,bt),bt|=t,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=p!==null?p.baseLanes:i,Re(Jr,bt),bt|=a}else p!==null?(a=p.baseLanes|i,n.memoizedState=null):a=i,Re(Jr,bt),bt|=a;return ct(t,n,d,i),n.child}function Uf(t,n){var i=n.ref;(t===null&&i!==null||t!==null&&t.ref!==i)&&(n.flags|=512,n.flags|=2097152)}function uu(t,n,i,a,d){var p=mt(i)?sr:it.current;return p=Hr(n,p),Kr(n,d),i=Ja(t,n,i,a,p,d),a=eu(),t!==null&&!gt?(n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~d,gn(t,n,d)):(De&&a&&La(n),n.flags|=1,ct(t,n,i,d),n.child)}function Yf(t,n,i,a,d){if(mt(i)){var p=!0;ys(n)}else p=!1;if(Kr(n,d),n.stateNode===null)As(t,n),Tf(n,i,a),su(n,i,a,d),a=!0;else if(t===null){var k=n.stateNode,R=n.memoizedProps;k.props=R;var L=k.context,Q=i.contextType;typeof Q=="object"&&Q!==null?Q=Tt(Q):(Q=mt(i)?sr:it.current,Q=Hr(n,Q));var oe=i.getDerivedStateFromProps,ie=typeof oe=="function"||typeof k.getSnapshotBeforeUpdate=="function";ie||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(R!==a||L!==Q)&&Af(n,k,a,Q),Ln=!1;var re=n.memoizedState;k.state=re,Cs(n,a,k,d),L=n.memoizedState,R!==a||re!==L||ht.current||Ln?(typeof oe=="function"&&(iu(n,i,oe,a),L=n.memoizedState),(R=Ln||Rf(n,i,R,a,re,L,Q))?(ie||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(n.flags|=4194308)):(typeof k.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=L),k.props=a,k.state=L,k.context=Q,a=R):(typeof k.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{k=n.stateNode,af(t,n),R=n.memoizedProps,Q=n.type===n.elementType?R:Ft(n.type,R),k.props=Q,ie=n.pendingProps,re=k.context,L=i.contextType,typeof L=="object"&&L!==null?L=Tt(L):(L=mt(i)?sr:it.current,L=Hr(n,L));var de=i.getDerivedStateFromProps;(oe=typeof de=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(R!==ie||re!==L)&&Af(n,k,a,L),Ln=!1,re=n.memoizedState,k.state=re,Cs(n,a,k,d);var pe=n.memoizedState;R!==ie||re!==pe||ht.current||Ln?(typeof de=="function"&&(iu(n,i,de,a),pe=n.memoizedState),(Q=Ln||Rf(n,i,Q,a,re,pe,L)||!1)?(oe||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(a,pe,L),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(a,pe,L)),typeof k.componentDidUpdate=="function"&&(n.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof k.componentDidUpdate!="function"||R===t.memoizedProps&&re===t.memoizedState||(n.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||R===t.memoizedProps&&re===t.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=pe),k.props=a,k.state=pe,k.context=L,a=Q):(typeof k.componentDidUpdate!="function"||R===t.memoizedProps&&re===t.memoizedState||(n.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||R===t.memoizedProps&&re===t.memoizedState||(n.flags|=1024),a=!1)}return cu(t,n,i,a,p,d)}function cu(t,n,i,a,d,p){Uf(t,n);var k=(n.flags&128)!==0;if(!a&&!k)return d&&qd(n,i,!1),gn(t,n,p);a=n.stateNode,ox.current=n;var R=k&&typeof i.getDerivedStateFromError!="function"?null:a.render();return n.flags|=1,t!==null&&k?(n.child=Xr(n,t.child,null,p),n.child=Xr(n,null,R,p)):ct(t,n,R,p),n.memoizedState=a.state,d&&qd(n,i,!0),n.child}function Xf(t){var n=t.stateNode;n.pendingContext?Gd(t,n.pendingContext,n.pendingContext!==n.context):n.context&&Gd(t,n.context,!1),Xa(t,n.containerInfo)}function Gf(t,n,i,a,d){return Yr(),Fa(d),n.flags|=256,ct(t,n,i,a),n.child}var du={dehydrated:null,treeContext:null,retryLane:0};function fu(t){return{baseLanes:t,cachePool:null,transitions:null}}function Kf(t,n,i){var a=n.pendingProps,d=He.current,p=!1,k=(n.flags&128)!==0,R;if((R=k)||(R=t!==null&&t.memoizedState===null?!1:(d&2)!==0),R?(p=!0,n.flags&=-129):(t===null||t.memoizedState!==null)&&(d|=1),Re(He,d&1),t===null)return Oa(n),t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((n.mode&1)===0?n.lanes=1:t.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(k=a.children,t=a.fallback,p?(a=n.mode,p=n.child,k={mode:"hidden",children:k},(a&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=k):p=Xs(k,a,0,null),t=gr(t,a,i,null),p.return=n,t.return=n,p.sibling=t,n.child=p,n.child.memoizedState=fu(i),n.memoizedState=du,t):pu(n,k));if(d=t.memoizedState,d!==null&&(R=d.dehydrated,R!==null))return ix(t,n,k,a,R,d,i);if(p){p=a.fallback,k=n.mode,d=t.child,R=d.sibling;var L={mode:"hidden",children:a.children};return(k&1)===0&&n.child!==d?(a=n.child,a.childLanes=0,a.pendingProps=L,n.deletions=null):(a=Hn(d,L),a.subtreeFlags=d.subtreeFlags&14680064),R!==null?p=Hn(R,p):(p=gr(p,k,i,null),p.flags|=2),p.return=n,a.return=n,a.sibling=p,n.child=a,a=p,p=n.child,k=t.child.memoizedState,k=k===null?fu(i):{baseLanes:k.baseLanes|i,cachePool:null,transitions:k.transitions},p.memoizedState=k,p.childLanes=t.childLanes&~i,n.memoizedState=du,a}return p=t.child,t=p.sibling,a=Hn(p,{mode:"visible",children:a.children}),(n.mode&1)===0&&(a.lanes=i),a.return=n,a.sibling=null,t!==null&&(i=n.deletions,i===null?(n.deletions=[t],n.flags|=16):i.push(t)),n.child=a,n.memoizedState=null,a}function pu(t,n){return n=Xs({mode:"visible",children:n},t.mode,0,null),n.return=t,t.child=n}function Ts(t,n,i,a){return a!==null&&Fa(a),Xr(n,t.child,null,i),t=pu(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function ix(t,n,i,a,d,p,k){if(i)return n.flags&256?(n.flags&=-257,a=lu(Error(o(422))),Ts(t,n,k,a)):n.memoizedState!==null?(n.child=t.child,n.flags|=128,null):(p=a.fallback,d=n.mode,a=Xs({mode:"visible",children:a.children},d,0,null),p=gr(p,d,k,null),p.flags|=2,a.return=n,p.return=n,a.sibling=p,n.child=a,(n.mode&1)!==0&&Xr(n,t.child,null,k),n.child.memoizedState=fu(k),n.memoizedState=du,p);if((n.mode&1)===0)return Ts(t,n,k,null);if(d.data==="$!"){if(a=d.nextSibling&&d.nextSibling.dataset,a)var R=a.dgst;return a=R,p=Error(o(419)),a=lu(p,a,void 0),Ts(t,n,k,a)}if(R=(k&t.childLanes)!==0,gt||R){if(a=Je,a!==null){switch(k&-k){case 4:d=2;break;case 16:d=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:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(a.suspendedLanes|k))!==0?0:d,d!==0&&d!==p.retryLane&&(p.retryLane=d,hn(t,d),Ht(a,t,d,-1))}return ju(),a=lu(Error(o(421))),Ts(t,n,k,a)}return d.data==="$?"?(n.flags|=128,n.child=t.child,n=xx.bind(null,t),d._reactRetry=n,null):(t=p.treeContext,Ct=In(d.nextSibling),Nt=n,De=!0,Ot=null,t!==null&&(It[Rt++]=fn,It[Rt++]=pn,It[Rt++]=lr,fn=t.id,pn=t.overflow,lr=n),n=pu(n,a.children),n.flags|=4096,n)}function qf(t,n,i){t.lanes|=n;var a=t.alternate;a!==null&&(a.lanes|=n),Wa(t.return,n,i)}function hu(t,n,i,a,d){var p=t.memoizedState;p===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:i,tailMode:d}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=a,p.tail=i,p.tailMode=d)}function Qf(t,n,i){var a=n.pendingProps,d=a.revealOrder,p=a.tail;if(ct(t,n,a.children,i),a=He.current,(a&2)!==0)a=a&1|2,n.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&qf(t,i,n);else if(t.tag===19)qf(t,i,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}a&=1}if(Re(He,a),(n.mode&1)===0)n.memoizedState=null;else switch(d){case"forwards":for(i=n.child,d=null;i!==null;)t=i.alternate,t!==null&&bs(t)===null&&(d=i),i=i.sibling;i=d,i===null?(d=n.child,n.child=null):(d=i.sibling,i.sibling=null),hu(n,!1,d,i,p);break;case"backwards":for(i=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&bs(t)===null){n.child=d;break}t=d.sibling,d.sibling=i,i=d,d=t}hu(n,!0,i,null,p);break;case"together":hu(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function As(t,n){(n.mode&1)===0&&t!==null&&(t.alternate=null,n.alternate=null,n.flags|=2)}function gn(t,n,i){if(t!==null&&(n.dependencies=t.dependencies),fr|=n.lanes,(i&n.childLanes)===0)return null;if(t!==null&&n.child!==t.child)throw Error(o(153));if(n.child!==null){for(t=n.child,i=Hn(t,t.pendingProps),n.child=i,i.return=n;t.sibling!==null;)t=t.sibling,i=i.sibling=Hn(t,t.pendingProps),i.return=n;i.sibling=null}return n.child}function sx(t,n,i){switch(n.tag){case 3:Xf(n),Yr();break;case 5:df(n);break;case 1:mt(n.type)&&ys(n);break;case 4:Xa(n,n.stateNode.containerInfo);break;case 10:var a=n.type._context,d=n.memoizedProps.value;Re(_s,a._currentValue),a._currentValue=d;break;case 13:if(a=n.memoizedState,a!==null)return a.dehydrated!==null?(Re(He,He.current&1),n.flags|=128,null):(i&n.child.childLanes)!==0?Kf(t,n,i):(Re(He,He.current&1),t=gn(t,n,i),t!==null?t.sibling:null);Re(He,He.current&1);break;case 19:if(a=(i&n.childLanes)!==0,(t.flags&128)!==0){if(a)return Qf(t,n,i);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Re(He,He.current),a)break;return null;case 22:case 23:return n.lanes=0,Wf(t,n,i)}return gn(t,n,i)}var Zf,mu,Jf,ep;Zf=function(t,n){for(var i=n.child;i!==null;){if(i.tag===5||i.tag===6)t.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},mu=function(){},Jf=function(t,n,i,a){var d=t.memoizedProps;if(d!==a){t=n.stateNode,cr(en.current);var p=null;switch(i){case"input":d=Ee(t,d),a=Ee(t,a),p=[];break;case"select":d=W({},d,{value:void 0}),a=W({},a,{value:void 0}),p=[];break;case"textarea":d=ln(t,d),a=ln(t,a),p=[];break;default:typeof d.onClick!="function"&&typeof a.onClick=="function"&&(t.onclick=hs)}wo(i,a);var k;i=null;for(Q in d)if(!a.hasOwnProperty(Q)&&d.hasOwnProperty(Q)&&d[Q]!=null)if(Q==="style"){var R=d[Q];for(k in R)R.hasOwnProperty(k)&&(i||(i={}),i[k]="")}else Q!=="dangerouslySetInnerHTML"&&Q!=="children"&&Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(l.hasOwnProperty(Q)?p||(p=[]):(p=p||[]).push(Q,null));for(Q in a){var L=a[Q];if(R=d!=null?d[Q]:void 0,a.hasOwnProperty(Q)&&L!==R&&(L!=null||R!=null))if(Q==="style")if(R){for(k in R)!R.hasOwnProperty(k)||L&&L.hasOwnProperty(k)||(i||(i={}),i[k]="");for(k in L)L.hasOwnProperty(k)&&R[k]!==L[k]&&(i||(i={}),i[k]=L[k])}else i||(p||(p=[]),p.push(Q,i)),i=L;else Q==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,R=R?R.__html:void 0,L!=null&&R!==L&&(p=p||[]).push(Q,L)):Q==="children"?typeof L!="string"&&typeof L!="number"||(p=p||[]).push(Q,""+L):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&(l.hasOwnProperty(Q)?(L!=null&&Q==="onScroll"&&Ae("scroll",t),p||R===L||(p=[])):(p=p||[]).push(Q,L))}i&&(p=p||[]).push("style",i);var Q=p;(n.updateQueue=Q)&&(n.flags|=4)}},ep=function(t,n,i,a){i!==a&&(n.flags|=4)};function ri(t,n){if(!De)switch(t.tailMode){case"hidden":n=t.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:a.sibling=null}}function lt(t){var n=t.alternate!==null&&t.alternate.child===t.child,i=0,a=0;if(n)for(var d=t.child;d!==null;)i|=d.lanes|d.childLanes,a|=d.subtreeFlags&14680064,a|=d.flags&14680064,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)i|=d.lanes|d.childLanes,a|=d.subtreeFlags,a|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=a,t.childLanes=i,n}function lx(t,n,i){var a=n.pendingProps;switch($a(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(n),null;case 1:return mt(n.type)&&gs(),lt(n),null;case 3:return a=n.stateNode,qr(),Le(ht),Le(it),qa(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Ss(n)?n.flags|=4:t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Ot!==null&&(Cu(Ot),Ot=null))),mu(t,n),lt(n),null;case 5:Ga(n);var d=cr(Zo.current);if(i=n.type,t!==null&&n.stateNode!=null)Jf(t,n,i,a,d),t.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!a){if(n.stateNode===null)throw Error(o(166));return lt(n),null}if(t=cr(en.current),Ss(n)){a=n.stateNode,i=n.type;var p=n.memoizedProps;switch(a[Jt]=n,a[Xo]=p,t=(n.mode&1)!==0,i){case"dialog":Ae("cancel",a),Ae("close",a);break;case"iframe":case"object":case"embed":Ae("load",a);break;case"video":case"audio":for(d=0;d<Wo.length;d++)Ae(Wo[d],a);break;case"source":Ae("error",a);break;case"img":case"image":case"link":Ae("error",a),Ae("load",a);break;case"details":Ae("toggle",a);break;case"input":Me(a,p),Ae("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!p.multiple},Ae("invalid",a);break;case"textarea":qt(a,p),Ae("invalid",a)}wo(i,p),d=null;for(var k in p)if(p.hasOwnProperty(k)){var R=p[k];k==="children"?typeof R=="string"?a.textContent!==R&&(p.suppressHydrationWarning!==!0&&ps(a.textContent,R,t),d=["children",R]):typeof R=="number"&&a.textContent!==""+R&&(p.suppressHydrationWarning!==!0&&ps(a.textContent,R,t),d=["children",""+R]):l.hasOwnProperty(k)&&R!=null&&k==="onScroll"&&Ae("scroll",a)}switch(i){case"input":we(a),ut(a,p,!0);break;case"textarea":we(a),pt(a);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(a.onclick=hs)}a=d,n.updateQueue=a,a!==null&&(n.flags|=4)}else{k=d.nodeType===9?d:d.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Pt(i)),t==="http://www.w3.org/1999/xhtml"?i==="script"?(t=k.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof a.is=="string"?t=k.createElement(i,{is:a.is}):(t=k.createElement(i),i==="select"&&(k=t,a.multiple?k.multiple=!0:a.size&&(k.size=a.size))):t=k.createElementNS(t,i),t[Jt]=n,t[Xo]=a,Zf(t,n,!1,!1),n.stateNode=t;e:{switch(k=So(i,a),i){case"dialog":Ae("cancel",t),Ae("close",t),d=a;break;case"iframe":case"object":case"embed":Ae("load",t),d=a;break;case"video":case"audio":for(d=0;d<Wo.length;d++)Ae(Wo[d],t);d=a;break;case"source":Ae("error",t),d=a;break;case"img":case"image":case"link":Ae("error",t),Ae("load",t),d=a;break;case"details":Ae("toggle",t),d=a;break;case"input":Me(t,a),d=Ee(t,a),Ae("invalid",t);break;case"option":d=a;break;case"select":t._wrapperState={wasMultiple:!!a.multiple},d=W({},a,{value:void 0}),Ae("invalid",t);break;case"textarea":qt(t,a),d=ln(t,a),Ae("invalid",t);break;default:d=a}wo(i,d),R=d;for(p in R)if(R.hasOwnProperty(p)){var L=R[p];p==="style"?Di(t,L):p==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&Li(t,L)):p==="children"?typeof L=="string"?(i!=="textarea"||L!=="")&&an(t,L):typeof L=="number"&&an(t,""+L):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(l.hasOwnProperty(p)?L!=null&&p==="onScroll"&&Ae("scroll",t):L!=null&&N(t,p,L,k))}switch(i){case"input":we(t),ut(t,a,!1);break;case"textarea":we(t),pt(t);break;case"option":a.value!=null&&t.setAttribute("value",""+Z(a.value));break;case"select":t.multiple=!!a.multiple,p=a.value,p!=null?ot(t,!!a.multiple,p,!1):a.defaultValue!=null&&ot(t,!!a.multiple,a.defaultValue,!0);break;default:typeof d.onClick=="function"&&(t.onclick=hs)}switch(i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return lt(n),null;case 6:if(t&&n.stateNode!=null)ep(t,n,t.memoizedProps,a);else{if(typeof a!="string"&&n.stateNode===null)throw Error(o(166));if(i=cr(Zo.current),cr(en.current),Ss(n)){if(a=n.stateNode,i=n.memoizedProps,a[Jt]=n,(p=a.nodeValue!==i)&&(t=Nt,t!==null))switch(t.tag){case 3:ps(a.nodeValue,i,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ps(a.nodeValue,i,(t.mode&1)!==0)}p&&(n.flags|=4)}else a=(i.nodeType===9?i:i.ownerDocument).createTextNode(a),a[Jt]=n,n.stateNode=a}return lt(n),null;case 13:if(Le(He),a=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(De&&Ct!==null&&(n.mode&1)!==0&&(n.flags&128)===0)nf(),Yr(),n.flags|=98560,p=!1;else if(p=Ss(n),a!==null&&a.dehydrated!==null){if(t===null){if(!p)throw Error(o(318));if(p=n.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(o(317));p[Jt]=n}else Yr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;lt(n),p=!1}else Ot!==null&&(Cu(Ot),Ot=null),p=!0;if(!p)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=i,n):(a=a!==null,a!==(t!==null&&t.memoizedState!==null)&&a&&(n.child.flags|=8192,(n.mode&1)!==0&&(t===null||(He.current&1)!==0?Qe===0&&(Qe=3):ju())),n.updateQueue!==null&&(n.flags|=4),lt(n),null);case 4:return qr(),mu(t,n),t===null&&Uo(n.stateNode.containerInfo),lt(n),null;case 10:return Ha(n.type._context),lt(n),null;case 17:return mt(n.type)&&gs(),lt(n),null;case 19:if(Le(He),p=n.memoizedState,p===null)return lt(n),null;if(a=(n.flags&128)!==0,k=p.rendering,k===null)if(a)ri(p,!1);else{if(Qe!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(k=bs(t),k!==null){for(n.flags|=128,ri(p,!1),a=k.updateQueue,a!==null&&(n.updateQueue=a,n.flags|=4),n.subtreeFlags=0,a=i,i=n.child;i!==null;)p=i,t=a,p.flags&=14680066,k=p.alternate,k===null?(p.childLanes=0,p.lanes=t,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=k.childLanes,p.lanes=k.lanes,p.child=k.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=k.memoizedProps,p.memoizedState=k.memoizedState,p.updateQueue=k.updateQueue,p.type=k.type,t=k.dependencies,p.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),i=i.sibling;return Re(He,He.current&1|2),n.child}t=t.sibling}p.tail!==null&&Be()>eo&&(n.flags|=128,a=!0,ri(p,!1),n.lanes=4194304)}else{if(!a)if(t=bs(k),t!==null){if(n.flags|=128,a=!0,i=t.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),ri(p,!0),p.tail===null&&p.tailMode==="hidden"&&!k.alternate&&!De)return lt(n),null}else 2*Be()-p.renderingStartTime>eo&&i!==1073741824&&(n.flags|=128,a=!0,ri(p,!1),n.lanes=4194304);p.isBackwards?(k.sibling=n.child,n.child=k):(i=p.last,i!==null?i.sibling=k:n.child=k,p.last=k)}return p.tail!==null?(n=p.tail,p.rendering=n,p.tail=n.sibling,p.renderingStartTime=Be(),n.sibling=null,i=He.current,Re(He,a?i&1|2:i&1),n):(lt(n),null);case 22:case 23:return Mu(),a=n.memoizedState!==null,t!==null&&t.memoizedState!==null!==a&&(n.flags|=8192),a&&(n.mode&1)!==0?(bt&1073741824)!==0&&(lt(n),n.subtreeFlags&6&&(n.flags|=8192)):lt(n),null;case 24:return null;case 25:return null}throw Error(o(156,n.tag))}function ax(t,n){switch($a(n),n.tag){case 1:return mt(n.type)&&gs(),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return qr(),Le(ht),Le(it),qa(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 5:return Ga(n),null;case 13:if(Le(He),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(o(340));Yr()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return Le(He),null;case 4:return qr(),null;case 10:return Ha(n.type._context),null;case 22:case 23:return Mu(),null;case 24:return null;default:return null}}var Ls=!1,at=!1,ux=typeof WeakSet=="function"?WeakSet:Set,fe=null;function Zr(t,n){var i=t.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(a){Ue(t,n,a)}else i.current=null}function gu(t,n,i){try{i()}catch(a){Ue(t,n,a)}}var tp=!1;function cx(t,n){if(Ma=ns,t=Id(),wa(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var a=i.getSelection&&i.getSelection();if(a&&a.rangeCount!==0){i=a.anchorNode;var d=a.anchorOffset,p=a.focusNode;a=a.focusOffset;try{i.nodeType,p.nodeType}catch{i=null;break e}var k=0,R=-1,L=-1,Q=0,oe=0,ie=t,re=null;t:for(;;){for(var de;ie!==i||d!==0&&ie.nodeType!==3||(R=k+d),ie!==p||a!==0&&ie.nodeType!==3||(L=k+a),ie.nodeType===3&&(k+=ie.nodeValue.length),(de=ie.firstChild)!==null;)re=ie,ie=de;for(;;){if(ie===t)break t;if(re===i&&++Q===d&&(R=k),re===p&&++oe===a&&(L=k),(de=ie.nextSibling)!==null)break;ie=re,re=ie.parentNode}ie=de}i=R===-1||L===-1?null:{start:R,end:L}}else i=null}i=i||{start:0,end:0}}else i=null;for(ja={focusedElem:t,selectionRange:i},ns=!1,fe=n;fe!==null;)if(n=fe,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,fe=t;else for(;fe!==null;){n=fe;try{var pe=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var he=pe.memoizedProps,Ye=pe.memoizedState,X=n.stateNode,B=X.getSnapshotBeforeUpdate(n.elementType===n.type?he:Ft(n.type,he),Ye);X.__reactInternalSnapshotBeforeUpdate=B}break;case 3:var q=n.stateNode.containerInfo;q.nodeType===1?q.textContent="":q.nodeType===9&&q.documentElement&&q.removeChild(q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(le){Ue(n,n.return,le)}if(t=n.sibling,t!==null){t.return=n.return,fe=t;break}fe=n.return}return pe=tp,tp=!1,pe}function oi(t,n,i){var a=n.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var d=a=a.next;do{if((d.tag&t)===t){var p=d.destroy;d.destroy=void 0,p!==void 0&&gu(n,i,p)}d=d.next}while(d!==a)}}function $s(t,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var a=i.create;i.destroy=a()}i=i.next}while(i!==n)}}function yu(t){var n=t.ref;if(n!==null){var i=t.stateNode;switch(t.tag){case 5:t=i;break;default:t=i}typeof n=="function"?n(t):n.current=t}}function np(t){var n=t.alternate;n!==null&&(t.alternate=null,np(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&(delete n[Jt],delete n[Xo],delete n[Ra],delete n[Yy],delete n[Xy])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function rp(t){return t.tag===5||t.tag===3||t.tag===4}function op(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||rp(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function xu(t,n,i){var a=t.tag;if(a===5||a===6)t=t.stateNode,n?i.nodeType===8?i.parentNode.insertBefore(t,n):i.insertBefore(t,n):(i.nodeType===8?(n=i.parentNode,n.insertBefore(t,i)):(n=i,n.appendChild(t)),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=hs));else if(a!==4&&(t=t.child,t!==null))for(xu(t,n,i),t=t.sibling;t!==null;)xu(t,n,i),t=t.sibling}function vu(t,n,i){var a=t.tag;if(a===5||a===6)t=t.stateNode,n?i.insertBefore(t,n):i.appendChild(t);else if(a!==4&&(t=t.child,t!==null))for(vu(t,n,i),t=t.sibling;t!==null;)vu(t,n,i),t=t.sibling}var tt=null,Vt=!1;function Dn(t,n,i){for(i=i.child;i!==null;)ip(t,n,i),i=i.sibling}function ip(t,n,i){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(Pr,i)}catch{}switch(i.tag){case 5:at||Zr(i,n);case 6:var a=tt,d=Vt;tt=null,Dn(t,n,i),tt=a,Vt=d,tt!==null&&(Vt?(t=tt,i=i.stateNode,t.nodeType===8?t.parentNode.removeChild(i):t.removeChild(i)):tt.removeChild(i.stateNode));break;case 18:tt!==null&&(Vt?(t=tt,i=i.stateNode,t.nodeType===8?Ia(t.parentNode,i):t.nodeType===1&&Ia(t,i),Lo(t)):Ia(tt,i.stateNode));break;case 4:a=tt,d=Vt,tt=i.stateNode.containerInfo,Vt=!0,Dn(t,n,i),tt=a,Vt=d;break;case 0:case 11:case 14:case 15:if(!at&&(a=i.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){d=a=a.next;do{var p=d,k=p.destroy;p=p.tag,k!==void 0&&((p&2)!==0||(p&4)!==0)&&gu(i,n,k),d=d.next}while(d!==a)}Dn(t,n,i);break;case 1:if(!at&&(Zr(i,n),a=i.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=i.memoizedProps,a.state=i.memoizedState,a.componentWillUnmount()}catch(R){Ue(i,n,R)}Dn(t,n,i);break;case 21:Dn(t,n,i);break;case 22:i.mode&1?(at=(a=at)||i.memoizedState!==null,Dn(t,n,i),at=a):Dn(t,n,i);break;default:Dn(t,n,i)}}function sp(t){var n=t.updateQueue;if(n!==null){t.updateQueue=null;var i=t.stateNode;i===null&&(i=t.stateNode=new ux),n.forEach(function(a){var d=vx.bind(null,t,a);i.has(a)||(i.add(a),a.then(d,d))})}}function Bt(t,n){var i=n.deletions;if(i!==null)for(var a=0;a<i.length;a++){var d=i[a];try{var p=t,k=n,R=k;e:for(;R!==null;){switch(R.tag){case 5:tt=R.stateNode,Vt=!1;break e;case 3:tt=R.stateNode.containerInfo,Vt=!0;break e;case 4:tt=R.stateNode.containerInfo,Vt=!0;break e}R=R.return}if(tt===null)throw Error(o(160));ip(p,k,d),tt=null,Vt=!1;var L=d.alternate;L!==null&&(L.return=null),d.return=null}catch(Q){Ue(d,n,Q)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)lp(n,t),n=n.sibling}function lp(t,n){var i=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Bt(n,t),nn(t),a&4){try{oi(3,t,t.return),$s(3,t)}catch(he){Ue(t,t.return,he)}try{oi(5,t,t.return)}catch(he){Ue(t,t.return,he)}}break;case 1:Bt(n,t),nn(t),a&512&&i!==null&&Zr(i,i.return);break;case 5:if(Bt(n,t),nn(t),a&512&&i!==null&&Zr(i,i.return),t.flags&32){var d=t.stateNode;try{an(d,"")}catch(he){Ue(t,t.return,he)}}if(a&4&&(d=t.stateNode,d!=null)){var p=t.memoizedProps,k=i!==null?i.memoizedProps:p,R=t.type,L=t.updateQueue;if(t.updateQueue=null,L!==null)try{R==="input"&&p.type==="radio"&&p.name!=null&&ze(d,p),So(R,k);var Q=So(R,p);for(k=0;k<L.length;k+=2){var oe=L[k],ie=L[k+1];oe==="style"?Di(d,ie):oe==="dangerouslySetInnerHTML"?Li(d,ie):oe==="children"?an(d,ie):N(d,oe,ie,Q)}switch(R){case"input":Te(d,p);break;case"textarea":Qt(d,p);break;case"select":var re=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!p.multiple;var de=p.value;de!=null?ot(d,!!p.multiple,de,!1):re!==!!p.multiple&&(p.defaultValue!=null?ot(d,!!p.multiple,p.defaultValue,!0):ot(d,!!p.multiple,p.multiple?[]:"",!1))}d[Xo]=p}catch(he){Ue(t,t.return,he)}}break;case 6:if(Bt(n,t),nn(t),a&4){if(t.stateNode===null)throw Error(o(162));d=t.stateNode,p=t.memoizedProps;try{d.nodeValue=p}catch(he){Ue(t,t.return,he)}}break;case 3:if(Bt(n,t),nn(t),a&4&&i!==null&&i.memoizedState.isDehydrated)try{Lo(n.containerInfo)}catch(he){Ue(t,t.return,he)}break;case 4:Bt(n,t),nn(t);break;case 13:Bt(n,t),nn(t),d=t.child,d.flags&8192&&(p=d.memoizedState!==null,d.stateNode.isHidden=p,!p||d.alternate!==null&&d.alternate.memoizedState!==null||(ku=Be())),a&4&&sp(t);break;case 22:if(oe=i!==null&&i.memoizedState!==null,t.mode&1?(at=(Q=at)||oe,Bt(n,t),at=Q):Bt(n,t),nn(t),a&8192){if(Q=t.memoizedState!==null,(t.stateNode.isHidden=Q)&&!oe&&(t.mode&1)!==0)for(fe=t,oe=t.child;oe!==null;){for(ie=fe=oe;fe!==null;){switch(re=fe,de=re.child,re.tag){case 0:case 11:case 14:case 15:oi(4,re,re.return);break;case 1:Zr(re,re.return);var pe=re.stateNode;if(typeof pe.componentWillUnmount=="function"){a=re,i=re.return;try{n=a,pe.props=n.memoizedProps,pe.state=n.memoizedState,pe.componentWillUnmount()}catch(he){Ue(a,i,he)}}break;case 5:Zr(re,re.return);break;case 22:if(re.memoizedState!==null){cp(ie);continue}}de!==null?(de.return=re,fe=de):cp(ie)}oe=oe.sibling}e:for(oe=null,ie=t;;){if(ie.tag===5){if(oe===null){oe=ie;try{d=ie.stateNode,Q?(p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(R=ie.stateNode,L=ie.memoizedProps.style,k=L!=null&&L.hasOwnProperty("display")?L.display:null,R.style.display=$i("display",k))}catch(he){Ue(t,t.return,he)}}}else if(ie.tag===6){if(oe===null)try{ie.stateNode.nodeValue=Q?"":ie.memoizedProps}catch(he){Ue(t,t.return,he)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===t)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===t)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===t)break e;oe===ie&&(oe=null),ie=ie.return}oe===ie&&(oe=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:Bt(n,t),nn(t),a&4&&sp(t);break;case 21:break;default:Bt(n,t),nn(t)}}function nn(t){var n=t.flags;if(n&2){try{e:{for(var i=t.return;i!==null;){if(rp(i)){var a=i;break e}i=i.return}throw Error(o(160))}switch(a.tag){case 5:var d=a.stateNode;a.flags&32&&(an(d,""),a.flags&=-33);var p=op(t);vu(t,p,d);break;case 3:case 4:var k=a.stateNode.containerInfo,R=op(t);xu(t,R,k);break;default:throw Error(o(161))}}catch(L){Ue(t,t.return,L)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function dx(t,n,i){fe=t,ap(t)}function ap(t,n,i){for(var a=(t.mode&1)!==0;fe!==null;){var d=fe,p=d.child;if(d.tag===22&&a){var k=d.memoizedState!==null||Ls;if(!k){var R=d.alternate,L=R!==null&&R.memoizedState!==null||at;R=Ls;var Q=at;if(Ls=k,(at=L)&&!Q)for(fe=d;fe!==null;)k=fe,L=k.child,k.tag===22&&k.memoizedState!==null?dp(d):L!==null?(L.return=k,fe=L):dp(d);for(;p!==null;)fe=p,ap(p),p=p.sibling;fe=d,Ls=R,at=Q}up(t)}else(d.subtreeFlags&8772)!==0&&p!==null?(p.return=d,fe=p):up(t)}}function up(t){for(;fe!==null;){var n=fe;if((n.flags&8772)!==0){var i=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:at||$s(5,n);break;case 1:var a=n.stateNode;if(n.flags&4&&!at)if(i===null)a.componentDidMount();else{var d=n.elementType===n.type?i.memoizedProps:Ft(n.type,i.memoizedProps);a.componentDidUpdate(d,i.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var p=n.updateQueue;p!==null&&cf(n,p,a);break;case 3:var k=n.updateQueue;if(k!==null){if(i=null,n.child!==null)switch(n.child.tag){case 5:i=n.child.stateNode;break;case 1:i=n.child.stateNode}cf(n,k,i)}break;case 5:var R=n.stateNode;if(i===null&&n.flags&4){i=R;var L=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&i.focus();break;case"img":L.src&&(i.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var Q=n.alternate;if(Q!==null){var oe=Q.memoizedState;if(oe!==null){var ie=oe.dehydrated;ie!==null&&Lo(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}at||n.flags&512&&yu(n)}catch(re){Ue(n,n.return,re)}}if(n===t){fe=null;break}if(i=n.sibling,i!==null){i.return=n.return,fe=i;break}fe=n.return}}function cp(t){for(;fe!==null;){var n=fe;if(n===t){fe=null;break}var i=n.sibling;if(i!==null){i.return=n.return,fe=i;break}fe=n.return}}function dp(t){for(;fe!==null;){var n=fe;try{switch(n.tag){case 0:case 11:case 15:var i=n.return;try{$s(4,n)}catch(L){Ue(n,i,L)}break;case 1:var a=n.stateNode;if(typeof a.componentDidMount=="function"){var d=n.return;try{a.componentDidMount()}catch(L){Ue(n,d,L)}}var p=n.return;try{yu(n)}catch(L){Ue(n,p,L)}break;case 5:var k=n.return;try{yu(n)}catch(L){Ue(n,k,L)}}}catch(L){Ue(n,n.return,L)}if(n===t){fe=null;break}var R=n.sibling;if(R!==null){R.return=n.return,fe=R;break}fe=n.return}}var fx=Math.ceil,Ds=M.ReactCurrentDispatcher,wu=M.ReactCurrentOwner,Lt=M.ReactCurrentBatchConfig,je=0,Je=null,Xe=null,nt=0,bt=0,Jr=Rn(0),Qe=0,ii=null,fr=0,Os=0,Su=0,si=null,yt=null,ku=0,eo=1/0,yn=null,Fs=!1,_u=null,On=null,Vs=!1,Fn=null,Bs=0,li=0,Eu=null,Hs=-1,Ws=0;function dt(){return(je&6)!==0?Be():Hs!==-1?Hs:Hs=Be()}function Vn(t){return(t.mode&1)===0?1:(je&2)!==0&&nt!==0?nt&-nt:Ky.transition!==null?(Ws===0&&(Ws=Ji()),Ws):(t=Ie,t!==0||(t=window.event,t=t===void 0?16:fd(t.type)),t)}function Ht(t,n,i,a){if(50<li)throw li=0,Eu=null,Error(o(185));or(t,i,a),((je&2)===0||t!==Je)&&(t===Je&&((je&2)===0&&(Os|=i),Qe===4&&Bn(t,nt)),xt(t,a),i===1&&je===0&&(n.mode&1)===0&&(eo=Be()+500,xs&&An()))}function xt(t,n){var i=t.callbackNode;Zi(t,n);var a=un(t,t===Je?nt:0);if(a===0)i!==null&&Gi(i),t.callbackNode=null,t.callbackPriority=0;else if(n=a&-a,t.callbackPriority!==n){if(i!=null&&Gi(i),n===1)t.tag===0?Gy(pp.bind(null,t)):Qd(pp.bind(null,t)),Wy(function(){(je&6)===0&&An()}),i=null;else{switch(od(a)){case 1:i=Po;break;case 4:i=qi;break;case 16:i=jr;break;case 536870912:i=Qi;break;default:i=jr}i=Sp(i,fp.bind(null,t))}t.callbackPriority=n,t.callbackNode=i}}function fp(t,n){if(Hs=-1,Ws=0,(je&6)!==0)throw Error(o(327));var i=t.callbackNode;if(to()&&t.callbackNode!==i)return null;var a=un(t,t===Je?nt:0);if(a===0)return null;if((a&30)!==0||(a&t.expiredLanes)!==0||n)n=Us(t,a);else{n=a;var d=je;je|=2;var p=mp();(Je!==t||nt!==n)&&(yn=null,eo=Be()+500,hr(t,n));do try{mx();break}catch(R){hp(t,R)}while(!0);Ba(),Ds.current=p,je=d,Xe!==null?n=0:(Je=null,nt=0,n=Qe)}if(n!==0){if(n===2&&(d=zo(t),d!==0&&(a=d,n=Nu(t,d))),n===1)throw i=ii,hr(t,0),Bn(t,a),xt(t,Be()),i;if(n===6)Bn(t,a);else{if(d=t.current.alternate,(a&30)===0&&!px(d)&&(n=Us(t,a),n===2&&(p=zo(t),p!==0&&(a=p,n=Nu(t,p))),n===1))throw i=ii,hr(t,0),Bn(t,a),xt(t,Be()),i;switch(t.finishedWork=d,t.finishedLanes=a,n){case 0:case 1:throw Error(o(345));case 2:mr(t,yt,yn);break;case 3:if(Bn(t,a),(a&130023424)===a&&(n=ku+500-Be(),10<n)){if(un(t,0)!==0)break;if(d=t.suspendedLanes,(d&a)!==a){dt(),t.pingedLanes|=t.suspendedLanes&d;break}t.timeoutHandle=za(mr.bind(null,t,yt,yn),n);break}mr(t,yt,yn);break;case 4:if(Bn(t,a),(a&4194240)===a)break;for(n=t.eventTimes,d=-1;0<a;){var k=31-_t(a);p=1<<k,k=n[k],k>d&&(d=k),a&=~p}if(a=d,a=Be()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*fx(a/1960))-a,10<a){t.timeoutHandle=za(mr.bind(null,t,yt,yn),a);break}mr(t,yt,yn);break;case 5:mr(t,yt,yn);break;default:throw Error(o(329))}}}return xt(t,Be()),t.callbackNode===i?fp.bind(null,t):null}function Nu(t,n){var i=si;return t.current.memoizedState.isDehydrated&&(hr(t,n).flags|=256),t=Us(t,n),t!==2&&(n=yt,yt=i,n!==null&&Cu(n)),t}function Cu(t){yt===null?yt=t:yt.push.apply(yt,t)}function px(t){for(var n=t;;){if(n.flags&16384){var i=n.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var a=0;a<i.length;a++){var d=i[a],p=d.getSnapshot;d=d.value;try{if(!Dt(p(),d))return!1}catch{return!1}}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Bn(t,n){for(n&=~Su,n&=~Os,t.suspendedLanes|=n,t.pingedLanes&=~n,t=t.expirationTimes;0<n;){var i=31-_t(n),a=1<<i;t[i]=-1,n&=~a}}function pp(t){if((je&6)!==0)throw Error(o(327));to();var n=un(t,0);if((n&1)===0)return xt(t,Be()),null;var i=Us(t,n);if(t.tag!==0&&i===2){var a=zo(t);a!==0&&(n=a,i=Nu(t,a))}if(i===1)throw i=ii,hr(t,0),Bn(t,n),xt(t,Be()),i;if(i===6)throw Error(o(345));return t.finishedWork=t.current.alternate,t.finishedLanes=n,mr(t,yt,yn),xt(t,Be()),null}function bu(t,n){var i=je;je|=1;try{return t(n)}finally{je=i,je===0&&(eo=Be()+500,xs&&An())}}function pr(t){Fn!==null&&Fn.tag===0&&(je&6)===0&&to();var n=je;je|=1;var i=Lt.transition,a=Ie;try{if(Lt.transition=null,Ie=1,t)return t()}finally{Ie=a,Lt.transition=i,je=n,(je&6)===0&&An()}}function Mu(){bt=Jr.current,Le(Jr)}function hr(t,n){t.finishedWork=null,t.finishedLanes=0;var i=t.timeoutHandle;if(i!==-1&&(t.timeoutHandle=-1,Hy(i)),Xe!==null)for(i=Xe.return;i!==null;){var a=i;switch($a(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&gs();break;case 3:qr(),Le(ht),Le(it),qa();break;case 5:Ga(a);break;case 4:qr();break;case 13:Le(He);break;case 19:Le(He);break;case 10:Ha(a.type._context);break;case 22:case 23:Mu()}i=i.return}if(Je=t,Xe=t=Hn(t.current,null),nt=bt=n,Qe=0,ii=null,Su=Os=fr=0,yt=si=null,ur!==null){for(n=0;n<ur.length;n++)if(i=ur[n],a=i.interleaved,a!==null){i.interleaved=null;var d=a.next,p=i.pending;if(p!==null){var k=p.next;p.next=d,a.next=k}i.pending=a}ur=null}return t}function hp(t,n){do{var i=Xe;try{if(Ba(),Ms.current=Is,js){for(var a=We.memoizedState;a!==null;){var d=a.queue;d!==null&&(d.pending=null),a=a.next}js=!1}if(dr=0,Ze=qe=We=null,Jo=!1,ei=0,wu.current=null,i===null||i.return===null){Qe=1,ii=n,Xe=null;break}e:{var p=t,k=i.return,R=i,L=n;if(n=nt,R.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var Q=L,oe=R,ie=oe.tag;if((oe.mode&1)===0&&(ie===0||ie===11||ie===15)){var re=oe.alternate;re?(oe.updateQueue=re.updateQueue,oe.memoizedState=re.memoizedState,oe.lanes=re.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var de=Of(k);if(de!==null){de.flags&=-257,Ff(de,k,R,p,n),de.mode&1&&Df(p,Q,n),n=de,L=Q;var pe=n.updateQueue;if(pe===null){var he=new Set;he.add(L),n.updateQueue=he}else pe.add(L);break e}else{if((n&1)===0){Df(p,Q,n),ju();break e}L=Error(o(426))}}else if(De&&R.mode&1){var Ye=Of(k);if(Ye!==null){(Ye.flags&65536)===0&&(Ye.flags|=256),Ff(Ye,k,R,p,n),Fa(Qr(L,R));break e}}p=L=Qr(L,R),Qe!==4&&(Qe=2),si===null?si=[p]:si.push(p),p=k;do{switch(p.tag){case 3:p.flags|=65536,n&=-n,p.lanes|=n;var X=Lf(p,L,n);uf(p,X);break e;case 1:R=L;var B=p.type,q=p.stateNode;if((p.flags&128)===0&&(typeof B.getDerivedStateFromError=="function"||q!==null&&typeof q.componentDidCatch=="function"&&(On===null||!On.has(q)))){p.flags|=65536,n&=-n,p.lanes|=n;var le=$f(p,R,n);uf(p,le);break e}}p=p.return}while(p!==null)}yp(i)}catch(ye){n=ye,Xe===i&&i!==null&&(Xe=i=i.return);continue}break}while(!0)}function mp(){var t=Ds.current;return Ds.current=Is,t===null?Is:t}function ju(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),Je===null||(fr&268435455)===0&&(Os&268435455)===0||Bn(Je,nt)}function Us(t,n){var i=je;je|=2;var a=mp();(Je!==t||nt!==n)&&(yn=null,hr(t,n));do try{hx();break}catch(d){hp(t,d)}while(!0);if(Ba(),je=i,Ds.current=a,Xe!==null)throw Error(o(261));return Je=null,nt=0,Qe}function hx(){for(;Xe!==null;)gp(Xe)}function mx(){for(;Xe!==null&&!Zl();)gp(Xe)}function gp(t){var n=wp(t.alternate,t,bt);t.memoizedProps=t.pendingProps,n===null?yp(t):Xe=n,wu.current=null}function yp(t){var n=t;do{var i=n.alternate;if(t=n.return,(n.flags&32768)===0){if(i=lx(i,n,bt),i!==null){Xe=i;return}}else{if(i=ax(i,n),i!==null){i.flags&=32767,Xe=i;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Qe=6,Xe=null;return}}if(n=n.sibling,n!==null){Xe=n;return}Xe=n=t}while(n!==null);Qe===0&&(Qe=5)}function mr(t,n,i){var a=Ie,d=Lt.transition;try{Lt.transition=null,Ie=1,gx(t,n,i,a)}finally{Lt.transition=d,Ie=a}return null}function gx(t,n,i,a){do to();while(Fn!==null);if((je&6)!==0)throw Error(o(327));i=t.finishedWork;var d=t.finishedLanes;if(i===null)return null;if(t.finishedWork=null,t.finishedLanes=0,i===t.current)throw Error(o(177));t.callbackNode=null,t.callbackPriority=0;var p=i.lanes|i.childLanes;if(sa(t,p),t===Je&&(Xe=Je=null,nt=0),(i.subtreeFlags&2064)===0&&(i.flags&2064)===0||Vs||(Vs=!0,Sp(jr,function(){return to(),null})),p=(i.flags&15990)!==0,(i.subtreeFlags&15990)!==0||p){p=Lt.transition,Lt.transition=null;var k=Ie;Ie=1;var R=je;je|=4,wu.current=null,cx(t,i),lp(i,t),Ly(ja),ns=!!Ma,ja=Ma=null,t.current=i,dx(i),Ki(),je=R,Ie=k,Lt.transition=p}else t.current=i;if(Vs&&(Vs=!1,Fn=t,Bs=d),p=t.pendingLanes,p===0&&(On=null),ta(i.stateNode),xt(t,Be()),n!==null)for(a=t.onRecoverableError,i=0;i<n.length;i++)d=n[i],a(d.value,{componentStack:d.stack,digest:d.digest});if(Fs)throw Fs=!1,t=_u,_u=null,t;return(Bs&1)!==0&&t.tag!==0&&to(),p=t.pendingLanes,(p&1)!==0?t===Eu?li++:(li=0,Eu=t):li=0,An(),null}function to(){if(Fn!==null){var t=od(Bs),n=Lt.transition,i=Ie;try{if(Lt.transition=null,Ie=16>t?16:t,Fn===null)var a=!1;else{if(t=Fn,Fn=null,Bs=0,(je&6)!==0)throw Error(o(331));var d=je;for(je|=4,fe=t.current;fe!==null;){var p=fe,k=p.child;if((fe.flags&16)!==0){var R=p.deletions;if(R!==null){for(var L=0;L<R.length;L++){var Q=R[L];for(fe=Q;fe!==null;){var oe=fe;switch(oe.tag){case 0:case 11:case 15:oi(8,oe,p)}var ie=oe.child;if(ie!==null)ie.return=oe,fe=ie;else for(;fe!==null;){oe=fe;var re=oe.sibling,de=oe.return;if(np(oe),oe===Q){fe=null;break}if(re!==null){re.return=de,fe=re;break}fe=de}}}var pe=p.alternate;if(pe!==null){var he=pe.child;if(he!==null){pe.child=null;do{var Ye=he.sibling;he.sibling=null,he=Ye}while(he!==null)}}fe=p}}if((p.subtreeFlags&2064)!==0&&k!==null)k.return=p,fe=k;else e:for(;fe!==null;){if(p=fe,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:oi(9,p,p.return)}var X=p.sibling;if(X!==null){X.return=p.return,fe=X;break e}fe=p.return}}var B=t.current;for(fe=B;fe!==null;){k=fe;var q=k.child;if((k.subtreeFlags&2064)!==0&&q!==null)q.return=k,fe=q;else e:for(k=B;fe!==null;){if(R=fe,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:$s(9,R)}}catch(ye){Ue(R,R.return,ye)}if(R===k){fe=null;break e}var le=R.sibling;if(le!==null){le.return=R.return,fe=le;break e}fe=R.return}}if(je=d,An(),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(Pr,t)}catch{}a=!0}return a}finally{Ie=i,Lt.transition=n}}return!1}function xp(t,n,i){n=Qr(i,n),n=Lf(t,n,1),t=$n(t,n,1),n=dt(),t!==null&&(or(t,1,n),xt(t,n))}function Ue(t,n,i){if(t.tag===3)xp(t,t,i);else for(;n!==null;){if(n.tag===3){xp(n,t,i);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(On===null||!On.has(a))){t=Qr(i,t),t=$f(n,t,1),n=$n(n,t,1),t=dt(),n!==null&&(or(n,1,t),xt(n,t));break}}n=n.return}}function yx(t,n,i){var a=t.pingCache;a!==null&&a.delete(n),n=dt(),t.pingedLanes|=t.suspendedLanes&i,Je===t&&(nt&i)===i&&(Qe===4||Qe===3&&(nt&130023424)===nt&&500>Be()-ku?hr(t,0):Su|=i),xt(t,n)}function vp(t,n){n===0&&((t.mode&1)===0?n=1:(n=Ir,Ir<<=1,(Ir&130023424)===0&&(Ir=4194304)));var i=dt();t=hn(t,n),t!==null&&(or(t,n,i),xt(t,i))}function xx(t){var n=t.memoizedState,i=0;n!==null&&(i=n.retryLane),vp(t,i)}function vx(t,n){var i=0;switch(t.tag){case 13:var a=t.stateNode,d=t.memoizedState;d!==null&&(i=d.retryLane);break;case 19:a=t.stateNode;break;default:throw Error(o(314))}a!==null&&a.delete(n),vp(t,i)}var wp;wp=function(t,n,i){if(t!==null)if(t.memoizedProps!==n.pendingProps||ht.current)gt=!0;else{if((t.lanes&i)===0&&(n.flags&128)===0)return gt=!1,sx(t,n,i);gt=(t.flags&131072)!==0}else gt=!1,De&&(n.flags&1048576)!==0&&Zd(n,ws,n.index);switch(n.lanes=0,n.tag){case 2:var a=n.type;As(t,n),t=n.pendingProps;var d=Hr(n,it.current);Kr(n,i),d=Ja(null,n,a,t,d,i);var p=eu();return n.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,mt(a)?(p=!0,ys(n)):p=!1,n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,Ya(n),d.updater=Rs,n.stateNode=d,d._reactInternals=n,su(n,a,t,i),n=cu(null,n,a,!0,p,i)):(n.tag=0,De&&p&&La(n),ct(null,n,d,i),n=n.child),n;case 16:a=n.elementType;e:{switch(As(t,n),t=n.pendingProps,d=a._init,a=d(a._payload),n.type=a,d=n.tag=Sx(a),t=Ft(a,t),d){case 0:n=uu(null,n,a,t,i);break e;case 1:n=Yf(null,n,a,t,i);break e;case 11:n=Vf(null,n,a,t,i);break e;case 14:n=Bf(null,n,a,Ft(a.type,t),i);break e}throw Error(o(306,a,""))}return n;case 0:return a=n.type,d=n.pendingProps,d=n.elementType===a?d:Ft(a,d),uu(t,n,a,d,i);case 1:return a=n.type,d=n.pendingProps,d=n.elementType===a?d:Ft(a,d),Yf(t,n,a,d,i);case 3:e:{if(Xf(n),t===null)throw Error(o(387));a=n.pendingProps,p=n.memoizedState,d=p.element,af(t,n),Cs(n,a,null,i);var k=n.memoizedState;if(a=k.element,p.isDehydrated)if(p={element:a,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){d=Qr(Error(o(423)),n),n=Gf(t,n,a,i,d);break e}else if(a!==d){d=Qr(Error(o(424)),n),n=Gf(t,n,a,i,d);break e}else for(Ct=In(n.stateNode.containerInfo.firstChild),Nt=n,De=!0,Ot=null,i=sf(n,null,a,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Yr(),a===d){n=gn(t,n,i);break e}ct(t,n,a,i)}n=n.child}return n;case 5:return df(n),t===null&&Oa(n),a=n.type,d=n.pendingProps,p=t!==null?t.memoizedProps:null,k=d.children,Pa(a,d)?k=null:p!==null&&Pa(a,p)&&(n.flags|=32),Uf(t,n),ct(t,n,k,i),n.child;case 6:return t===null&&Oa(n),null;case 13:return Kf(t,n,i);case 4:return Xa(n,n.stateNode.containerInfo),a=n.pendingProps,t===null?n.child=Xr(n,null,a,i):ct(t,n,a,i),n.child;case 11:return a=n.type,d=n.pendingProps,d=n.elementType===a?d:Ft(a,d),Vf(t,n,a,d,i);case 7:return ct(t,n,n.pendingProps,i),n.child;case 8:return ct(t,n,n.pendingProps.children,i),n.child;case 12:return ct(t,n,n.pendingProps.children,i),n.child;case 10:e:{if(a=n.type._context,d=n.pendingProps,p=n.memoizedProps,k=d.value,Re(_s,a._currentValue),a._currentValue=k,p!==null)if(Dt(p.value,k)){if(p.children===d.children&&!ht.current){n=gn(t,n,i);break e}}else for(p=n.child,p!==null&&(p.return=n);p!==null;){var R=p.dependencies;if(R!==null){k=p.child;for(var L=R.firstContext;L!==null;){if(L.context===a){if(p.tag===1){L=mn(-1,i&-i),L.tag=2;var Q=p.updateQueue;if(Q!==null){Q=Q.shared;var oe=Q.pending;oe===null?L.next=L:(L.next=oe.next,oe.next=L),Q.pending=L}}p.lanes|=i,L=p.alternate,L!==null&&(L.lanes|=i),Wa(p.return,i,n),R.lanes|=i;break}L=L.next}}else if(p.tag===10)k=p.type===n.type?null:p.child;else if(p.tag===18){if(k=p.return,k===null)throw Error(o(341));k.lanes|=i,R=k.alternate,R!==null&&(R.lanes|=i),Wa(k,i,n),k=p.sibling}else k=p.child;if(k!==null)k.return=p;else for(k=p;k!==null;){if(k===n){k=null;break}if(p=k.sibling,p!==null){p.return=k.return,k=p;break}k=k.return}p=k}ct(t,n,d.children,i),n=n.child}return n;case 9:return d=n.type,a=n.pendingProps.children,Kr(n,i),d=Tt(d),a=a(d),n.flags|=1,ct(t,n,a,i),n.child;case 14:return a=n.type,d=Ft(a,n.pendingProps),d=Ft(a.type,d),Bf(t,n,a,d,i);case 15:return Hf(t,n,n.type,n.pendingProps,i);case 17:return a=n.type,d=n.pendingProps,d=n.elementType===a?d:Ft(a,d),As(t,n),n.tag=1,mt(a)?(t=!0,ys(n)):t=!1,Kr(n,i),Tf(n,a,d),su(n,a,d,i),cu(null,n,a,!0,t,i);case 19:return Qf(t,n,i);case 22:return Wf(t,n,i)}throw Error(o(156,n.tag))};function Sp(t,n){return Xi(t,n)}function wx(t,n,i,a){this.tag=t,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(t,n,i,a){return new wx(t,n,i,a)}function Pu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Sx(t){if(typeof t=="function")return Pu(t)?1:0;if(t!=null){if(t=t.$$typeof,t===V)return 11;if(t===Y)return 14}return 2}function Hn(t,n){var i=t.alternate;return i===null?(i=$t(t.tag,n,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=n,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&14680064,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,n=t.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i}function Ys(t,n,i,a,d,p){var k=2;if(a=t,typeof t=="function")Pu(t)&&(k=1);else if(typeof t=="string")k=5;else e:switch(t){case H:return gr(i.children,d,p,n);case G:k=8,d|=8;break;case K:return t=$t(12,i,n,d|2),t.elementType=K,t.lanes=p,t;case ee:return t=$t(13,i,n,d),t.elementType=ee,t.lanes=p,t;case z:return t=$t(19,i,n,d),t.elementType=z,t.lanes=p,t;case U:return Xs(i,d,p,n);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case te:k=10;break e;case O:k=9;break e;case V:k=11;break e;case Y:k=14;break e;case F:k=16,a=null;break e}throw Error(o(130,t==null?t:typeof t,""))}return n=$t(k,i,n,d),n.elementType=t,n.type=a,n.lanes=p,n}function gr(t,n,i,a){return t=$t(7,t,a,n),t.lanes=i,t}function Xs(t,n,i,a){return t=$t(22,t,a,n),t.elementType=U,t.lanes=i,t.stateNode={isHidden:!1},t}function zu(t,n,i){return t=$t(6,t,null,n),t.lanes=i,t}function Iu(t,n,i){return n=$t(4,t.children!==null?t.children:[],t.key,n),n.lanes=i,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}function kx(t,n,i,a,d){this.tag=n,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=rr(0),this.expirationTimes=rr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rr(0),this.identifierPrefix=a,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function Ru(t,n,i,a,d,p,k,R,L){return t=new kx(t,n,i,R,L),n===1?(n=1,p===!0&&(n|=8)):n=0,p=$t(3,null,null,n),t.current=p,p.stateNode=t,p.memoizedState={element:a,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ya(p),t}function _x(t,n,i){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:a==null?null:""+a,children:t,containerInfo:n,implementation:i}}function kp(t){if(!t)return Tn;t=t._reactInternals;e:{if(Zt(t)!==t||t.tag!==1)throw Error(o(170));var n=t;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(mt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(o(171))}if(t.tag===1){var i=t.type;if(mt(i))return Kd(t,i,n)}return n}function _p(t,n,i,a,d,p,k,R,L){return t=Ru(i,a,!0,t,d,p,k,R,L),t.context=kp(null),i=t.current,a=dt(),d=Vn(i),p=mn(a,d),p.callback=n??null,$n(i,p,d),t.current.lanes=d,or(t,d,a),xt(t,a),t}function Gs(t,n,i,a){var d=n.current,p=dt(),k=Vn(d);return i=kp(i),n.context===null?n.context=i:n.pendingContext=i,n=mn(p,k),n.payload={element:t},a=a===void 0?null:a,a!==null&&(n.callback=a),t=$n(d,n,k),t!==null&&(Ht(t,d,k,p),Ns(t,d,k)),k}function Ks(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Ep(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<n?i:n}}function Tu(t,n){Ep(t,n),(t=t.alternate)&&Ep(t,n)}function Ex(){return null}var Np=typeof reportError=="function"?reportError:function(t){console.error(t)};function Au(t){this._internalRoot=t}qs.prototype.render=Au.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(o(409));Gs(t,n,null,null)},qs.prototype.unmount=Au.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;pr(function(){Gs(null,t,null,null)}),n[cn]=null}};function qs(t){this._internalRoot=t}qs.prototype.unstable_scheduleHydration=function(t){if(t){var n=ld();t={blockedOn:null,target:t,priority:n};for(var i=0;i<jn.length&&n!==0&&n<jn[i].priority;i++);jn.splice(i,0,t),i===0&&cd(t)}};function Lu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Qs(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Cp(){}function Nx(t,n,i,a,d){if(d){if(typeof a=="function"){var p=a;a=function(){var Q=Ks(k);p.call(Q)}}var k=_p(n,a,t,0,null,!1,!1,"",Cp);return t._reactRootContainer=k,t[cn]=k.current,Uo(t.nodeType===8?t.parentNode:t),pr(),k}for(;d=t.lastChild;)t.removeChild(d);if(typeof a=="function"){var R=a;a=function(){var Q=Ks(L);R.call(Q)}}var L=Ru(t,0,!1,null,null,!1,!1,"",Cp);return t._reactRootContainer=L,t[cn]=L.current,Uo(t.nodeType===8?t.parentNode:t),pr(function(){Gs(n,L,i,a)}),L}function Zs(t,n,i,a,d){var p=i._reactRootContainer;if(p){var k=p;if(typeof d=="function"){var R=d;d=function(){var L=Ks(k);R.call(L)}}Gs(n,k,t,d)}else k=Nx(i,n,t,d,a);return Ks(k)}id=function(t){switch(t.tag){case 3:var n=t.stateNode;if(n.current.memoizedState.isDehydrated){var i=nr(n.pendingLanes);i!==0&&(Rr(n,i|1),xt(n,Be()),(je&6)===0&&(eo=Be()+500,An()))}break;case 13:pr(function(){var a=hn(t,1);if(a!==null){var d=dt();Ht(a,t,1,d)}}),Tu(t,1)}},la=function(t){if(t.tag===13){var n=hn(t,134217728);if(n!==null){var i=dt();Ht(n,t,134217728,i)}Tu(t,134217728)}},sd=function(t){if(t.tag===13){var n=Vn(t),i=hn(t,n);if(i!==null){var a=dt();Ht(i,t,n,a)}Tu(t,n)}},ld=function(){return Ie},ad=function(t,n){var i=Ie;try{return Ie=t,n()}finally{Ie=i}},Eo=function(t,n,i){switch(n){case"input":if(Te(t,i),n=i.name,i.type==="radio"&&n!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<i.length;n++){var a=i[n];if(a!==t&&a.form===t.form){var d=ms(a);if(!d)throw Error(o(90));xe(a),Te(a,d)}}}break;case"textarea":Qt(t,i);break;case"select":n=i.value,n!=null&&ot(t,!!i.multiple,n,!1)}},Bi=bu,Hi=pr;var Cx={usingClientEntryPoint:!1,Events:[Go,Vr,ms,Fi,Vi,bu]},ai={findFiberByHostInstance:ir,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},bx={bundleType:ai.bundleType,version:ai.version,rendererPackageName:ai.rendererPackageName,rendererConfig:ai.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Ui(t),t===null?null:t.stateNode},findFiberByHostInstance:ai.findFiberByHostInstance||Ex,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Js=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Js.isDisabled&&Js.supportsFiber)try{Pr=Js.inject(bx),kt=Js}catch{}}return vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cx,vt.createPortal=function(t,n){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Lu(n))throw Error(o(200));return _x(t,n,null,i)},vt.createRoot=function(t,n){if(!Lu(t))throw Error(o(299));var i=!1,a="",d=Np;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(d=n.onRecoverableError)),n=Ru(t,1,!1,null,null,i,!1,a,d),t[cn]=n.current,Uo(t.nodeType===8?t.parentNode:t),new Au(n)},vt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=Ui(n),t=t===null?null:t.stateNode,t},vt.flushSync=function(t){return pr(t)},vt.hydrate=function(t,n,i){if(!Qs(n))throw Error(o(200));return Zs(null,t,n,!0,i)},vt.hydrateRoot=function(t,n,i){if(!Lu(t))throw Error(o(405));var a=i!=null&&i.hydratedSources||null,d=!1,p="",k=Np;if(i!=null&&(i.unstable_strictMode===!0&&(d=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onRecoverableError!==void 0&&(k=i.onRecoverableError)),n=_p(n,null,t,1,i??null,d,!1,p,k),t[cn]=n.current,Uo(t),a)for(t=0;t<a.length;t++)i=a[t],d=i._getVersion,d=d(i._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[i,d]:n.mutableSourceEagerHydrationData.push(i,d);return new qs(n)},vt.render=function(t,n,i){if(!Qs(n))throw Error(o(200));return Zs(null,t,n,!1,i)},vt.unmountComponentAtNode=function(t){if(!Qs(t))throw Error(o(40));return t._reactRootContainer?(pr(function(){Zs(null,null,t,!1,function(){t._reactRootContainer=null,t[cn]=null})}),!0):!1},vt.unstable_batchedUpdates=bu,vt.unstable_renderSubtreeIntoContainer=function(t,n,i,a){if(!Qs(i))throw Error(o(200));if(t==null||t._reactInternals===void 0)throw Error(o(38));return Zs(t,n,i,!1,a)},vt.version="18.3.1-next-f1338f8080-20240426",vt}var Tp;function vm(){if(Tp)return Ou.exports;Tp=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Ou.exports=Ax(),Ou.exports}var Ap;function Lx(){if(Ap)return el;Ap=1;var e=vm();return el.createRoot=e.createRoot,el.hydrateRoot=e.hydrateRoot,el}var $x=Lx();/**
|
|
41
|
-
* @license lucide-react v0.468.0 - ISC
|
|
42
|
-
*
|
|
43
|
-
* This source code is licensed under the ISC license.
|
|
44
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const Dx=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),wm=(...e)=>e.filter((r,o,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===o).join(" ").trim();/**
|
|
46
|
-
* @license lucide-react v0.468.0 - ISC
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the ISC license.
|
|
49
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/var Ox={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"};/**
|
|
51
|
-
* @license lucide-react v0.468.0 - ISC
|
|
52
|
-
*
|
|
53
|
-
* This source code is licensed under the ISC license.
|
|
54
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const Fx=I.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:l="",children:u,iconNode:c,...f},h)=>I.createElement("svg",{ref:h,...Ox,width:r,height:r,stroke:e,strokeWidth:s?Number(o)*24/Number(r):o,className:wm("lucide",l),...f},[...c.map(([g,x])=>I.createElement(g,x)),...Array.isArray(u)?u:[u]]));/**
|
|
56
|
-
* @license lucide-react v0.468.0 - ISC
|
|
57
|
-
*
|
|
58
|
-
* This source code is licensed under the ISC license.
|
|
59
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const Ge=(e,r)=>{const o=I.forwardRef(({className:s,...l},u)=>I.createElement(Fx,{ref:u,iconNode:r,className:wm(`lucide-${Dx(e)}`,s),...l}));return o.displayName=`${e}`,o};/**
|
|
61
|
-
* @license lucide-react v0.468.0 - ISC
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the ISC license.
|
|
64
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const Vx=Ge("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
66
|
-
* @license lucide-react v0.468.0 - ISC
|
|
67
|
-
*
|
|
68
|
-
* This source code is licensed under the ISC license.
|
|
69
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const Bx=Ge("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
|
|
71
|
-
* @license lucide-react v0.468.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const Sm=Ge("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
76
|
-
* @license lucide-react v0.468.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const Hx=Ge("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
81
|
-
* @license lucide-react v0.468.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the ISC license.
|
|
84
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const Wx=Ge("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
86
|
-
* @license lucide-react v0.468.0 - ISC
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the ISC license.
|
|
89
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const Ux=Ge("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
91
|
-
* @license lucide-react v0.468.0 - ISC
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the ISC license.
|
|
94
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const Yx=Ge("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"}]]);/**
|
|
96
|
-
* @license lucide-react v0.468.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const Xx=Ge("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"}]]);/**
|
|
101
|
-
* @license lucide-react v0.468.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const Gx=Ge("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"}]]);/**
|
|
106
|
-
* @license lucide-react v0.468.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const Kx=Ge("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"}]]);/**
|
|
111
|
-
* @license lucide-react v0.468.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const qx=Ge("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
|
|
116
|
-
* @license lucide-react v0.468.0 - ISC
|
|
117
|
-
*
|
|
118
|
-
* This source code is licensed under the ISC license.
|
|
119
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const Qx=Ge("LibraryBig",[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]]);/**
|
|
121
|
-
* @license lucide-react v0.468.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const Zx=Ge("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"}]]);/**
|
|
126
|
-
* @license lucide-react v0.468.0 - ISC
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the ISC license.
|
|
129
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const Jx=Ge("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 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.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
|
131
|
-
* @license lucide-react v0.468.0 - ISC
|
|
132
|
-
*
|
|
133
|
-
* This source code is licensed under the ISC license.
|
|
134
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const ev=Ge("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"}]]);/**
|
|
136
|
-
* @license lucide-react v0.468.0 - ISC
|
|
137
|
-
*
|
|
138
|
-
* This source code is licensed under the ISC license.
|
|
139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const tv=Ge("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
141
|
-
* @license lucide-react v0.468.0 - ISC
|
|
142
|
-
*
|
|
143
|
-
* This source code is licensed under the ISC license.
|
|
144
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const nv=Ge("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
|
|
146
|
-
* @license lucide-react v0.468.0 - ISC
|
|
147
|
-
*
|
|
148
|
-
* This source code is licensed under the ISC license.
|
|
149
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const rv=Ge("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"}]]);/**
|
|
151
|
-
* @license lucide-react v0.468.0 - ISC
|
|
152
|
-
*
|
|
153
|
-
* This source code is licensed under the ISC license.
|
|
154
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const ov=Ge("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
|
|
156
|
-
* @license lucide-react v0.468.0 - ISC
|
|
157
|
-
*
|
|
158
|
-
* This source code is licensed under the ISC license.
|
|
159
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/const iv=Ge("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),sv=new TextDecoder,Bu={encode:e=>JSON.stringify(e),decode:e=>JSON.parse(typeof e=="string"?e:sv.decode(e))},lv="superline.inspector.v1";function km(e){switch(e.type){case"msg.request":case"msg.serverRequest":return e.input;case"msg.response":case"msg.serverReply":return e.ok?e.output:e.error;case"msg.event":case"msg.broadcast":case"msg.publish":return e.data;case"store.write":return e.data;case"store.grant":return e.perms;default:return}}function av(e){const r=e.WebSocket??globalThis.WebSocket;if(!r)throw new Error("No WebSocket implementation found; pass opts.WebSocket");const o=r,s=e.reconnect??!0,l=new Set,u=new Set,c=new Map;let f,h=1,g=!1,x="connecting",m;function y(S){x=S;for(const E of u)E(S)}function w(){y("connecting"),f=new o(e.url,lv),f.binaryType="arraybuffer",f.onopen=()=>{y("open"),f.send(Bu.encode({t:"sub",i:h++,c:"events"}))},f.onmessage=S=>_(S.data),f.onclose=()=>{for(const[,S]of c)S.reject(new Error("Inspector disconnected"));if(c.clear(),g||!s){y("closed");return}y("closed"),m=setTimeout(w,1e3)},f.onerror=()=>{}}function _(S){let E;try{E=Bu.decode(typeof S=="string"?S:new Uint8Array(S))}catch{return}if(E.t==="pub"&&E.c==="events"){for(const N of l)N(E.d);return}if(E.i===void 0)return;const P=c.get(E.i);P&&(c.delete(E.i),E.t==="res"?P.resolve(E.d):E.t==="err"&&P.reject(new Error(E.code??"INSPECTOR_ERROR")))}function C(S,E){return new Promise((P,N)=>{if(x!=="open"){N(new Error("Inspector not connected"));return}const M=h++;c.set(M,{resolve:P,reject:N}),f.send(Bu.encode({t:"req",i:M,m:S,d:E}))})}return w(),{getContract:()=>C("getContract"),getTopology:()=>C("getTopology"),listConnections:()=>C("listConnections"),getNode:()=>C("getNode"),getConn:S=>C("getConn",{id:S}),listStores:()=>C("listStores"),listResources:S=>C("listResources",{store:S}),readResource:(S,E)=>C("readResource",{store:S,id:E}),onEvent(S){return l.add(S),()=>l.delete(S)},onStatus(S){return u.add(S),S(x),()=>u.delete(S)},close(){g=!0,m&&clearTimeout(m),f==null||f.close()}}}function uv(e){const[r,o]=I.useState(null),[s,l]=I.useState("connecting");return I.useEffect(()=>{if(!e)return;const u=av({url:e});o(u);const c=u.onStatus(l);return()=>{c(),u.close(),o(null)}},[e]),{client:r,status:s}}function _m(e){var r,o,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(r=0;r<l;r++)e[r]&&(o=_m(e[r]))&&(s&&(s+=" "),s+=o)}else for(o in e)e[o]&&(s&&(s+=" "),s+=o);return s}function Em(){for(var e,r,o=0,s="",l=arguments.length;o<l;o++)(e=arguments[o])&&(r=_m(e))&&(s&&(s+=" "),s+=r);return s}const Lp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,$p=Em,Nm=(e,r)=>o=>{var s;if((r==null?void 0:r.variants)==null)return $p(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:l,defaultVariants:u}=r,c=Object.keys(l).map(g=>{const x=o==null?void 0:o[g],m=u==null?void 0:u[g];if(x===null)return null;const y=Lp(x)||Lp(m);return l[g][y]}),f=o&&Object.entries(o).reduce((g,x)=>{let[m,y]=x;return y===void 0||(g[m]=y),g},{}),h=r==null||(s=r.compoundVariants)===null||s===void 0?void 0:s.reduce((g,x)=>{let{class:m,className:y,...w}=x;return Object.entries(w).every(_=>{let[C,S]=_;return Array.isArray(S)?S.includes({...u,...f}[C]):{...u,...f}[C]===S})?[...g,m,y]:g},[]);return $p(e,c,h,o==null?void 0:o.class,o==null?void 0:o.className)},jc="-",cv=e=>{const r=fv(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:c=>{const f=c.split(jc);return f[0]===""&&f.length!==1&&f.shift(),Cm(f,r)||dv(c)},getConflictingClassGroupIds:(c,f)=>{const h=o[c]||[];return f&&s[c]?[...h,...s[c]]:h}}},Cm=(e,r)=>{var c;if(e.length===0)return r.classGroupId;const o=e[0],s=r.nextPart.get(o),l=s?Cm(e.slice(1),s):void 0;if(l)return l;if(r.validators.length===0)return;const u=e.join(jc);return(c=r.validators.find(({validator:f})=>f(u)))==null?void 0:c.classGroupId},Dp=/^\[(.+)\]$/,dv=e=>{if(Dp.test(e)){const r=Dp.exec(e)[1],o=r==null?void 0:r.substring(0,r.indexOf(":"));if(o)return"arbitrary.."+o}},fv=e=>{const{theme:r,prefix:o}=e,s={nextPart:new Map,validators:[]};return hv(Object.entries(e.classGroups),o).forEach(([u,c])=>{ac(c,s,u,r)}),s},ac=(e,r,o,s)=>{e.forEach(l=>{if(typeof l=="string"){const u=l===""?r:Op(r,l);u.classGroupId=o;return}if(typeof l=="function"){if(pv(l)){ac(l(s),r,o,s);return}r.validators.push({validator:l,classGroupId:o});return}Object.entries(l).forEach(([u,c])=>{ac(c,Op(r,u),o,s)})})},Op=(e,r)=>{let o=e;return r.split(jc).forEach(s=>{o.nextPart.has(s)||o.nextPart.set(s,{nextPart:new Map,validators:[]}),o=o.nextPart.get(s)}),o},pv=e=>e.isThemeGetter,hv=(e,r)=>r?e.map(([o,s])=>{const l=s.map(u=>typeof u=="string"?r+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([c,f])=>[r+c,f])):u);return[o,l]}):e,mv=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,o=new Map,s=new Map;const l=(u,c)=>{o.set(u,c),r++,r>e&&(r=0,s=o,o=new Map)};return{get(u){let c=o.get(u);if(c!==void 0)return c;if((c=s.get(u))!==void 0)return l(u,c),c},set(u,c){o.has(u)?o.set(u,c):l(u,c)}}},bm="!",gv=e=>{const{separator:r,experimentalParseClassName:o}=e,s=r.length===1,l=r[0],u=r.length,c=f=>{const h=[];let g=0,x=0,m;for(let S=0;S<f.length;S++){let E=f[S];if(g===0){if(E===l&&(s||f.slice(S,S+u)===r)){h.push(f.slice(x,S)),x=S+u;continue}if(E==="/"){m=S;continue}}E==="["?g++:E==="]"&&g--}const y=h.length===0?f:f.substring(x),w=y.startsWith(bm),_=w?y.substring(1):y,C=m&&m>x?m-x:void 0;return{modifiers:h,hasImportantModifier:w,baseClassName:_,maybePostfixModifierPosition:C}};return o?f=>o({className:f,parseClassName:c}):c},yv=e=>{if(e.length<=1)return e;const r=[];let o=[];return e.forEach(s=>{s[0]==="["?(r.push(...o.sort(),s),o=[]):o.push(s)}),r.push(...o.sort()),r},xv=e=>({cache:mv(e.cacheSize),parseClassName:gv(e),...cv(e)}),vv=/\s+/,wv=(e,r)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:l}=r,u=[],c=e.trim().split(vv);let f="";for(let h=c.length-1;h>=0;h-=1){const g=c[h],{modifiers:x,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:w}=o(g);let _=!!w,C=s(_?y.substring(0,w):y);if(!C){if(!_){f=g+(f.length>0?" "+f:f);continue}if(C=s(y),!C){f=g+(f.length>0?" "+f:f);continue}_=!1}const S=yv(x).join(":"),E=m?S+bm:S,P=E+C;if(u.includes(P))continue;u.push(P);const N=l(C,_);for(let M=0;M<N.length;++M){const $=N[M];u.push(E+$)}f=g+(f.length>0?" "+f:f)}return f};function Sv(){let e=0,r,o,s="";for(;e<arguments.length;)(r=arguments[e++])&&(o=Mm(r))&&(s&&(s+=" "),s+=o);return s}const Mm=e=>{if(typeof e=="string")return e;let r,o="";for(let s=0;s<e.length;s++)e[s]&&(r=Mm(e[s]))&&(o&&(o+=" "),o+=r);return o};function kv(e,...r){let o,s,l,u=c;function c(h){const g=r.reduce((x,m)=>m(x),e());return o=xv(g),s=o.cache.get,l=o.cache.set,u=f,f(h)}function f(h){const g=s(h);if(g)return g;const x=wv(h,o);return l(h,x),x}return function(){return u(Sv.apply(null,arguments))}}const $e=e=>{const r=o=>o[e]||[];return r.isThemeGetter=!0,r},jm=/^\[(?:([a-z-]+):)?(.+)\]$/i,_v=/^\d+\/\d+$/,Ev=new Set(["px","full","screen"]),Nv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cv=/\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$/,bv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Mv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xn=e=>so(e)||Ev.has(e)||_v.test(e),Un=e=>yo(e,"length",$v),so=e=>!!e&&!Number.isNaN(Number(e)),Hu=e=>yo(e,"number",so),ci=e=>!!e&&Number.isInteger(Number(e)),Pv=e=>e.endsWith("%")&&so(e.slice(0,-1)),Ne=e=>jm.test(e),Yn=e=>Nv.test(e),zv=new Set(["length","size","percentage"]),Iv=e=>yo(e,zv,Pm),Rv=e=>yo(e,"position",Pm),Tv=new Set(["image","url"]),Av=e=>yo(e,Tv,Ov),Lv=e=>yo(e,"",Dv),di=()=>!0,yo=(e,r,o)=>{const s=jm.exec(e);return s?s[1]?typeof r=="string"?s[1]===r:r.has(s[1]):o(s[2]):!1},$v=e=>Cv.test(e)&&!bv.test(e),Pm=()=>!1,Dv=e=>Mv.test(e),Ov=e=>jv.test(e),Fv=()=>{const e=$e("colors"),r=$e("spacing"),o=$e("blur"),s=$e("brightness"),l=$e("borderColor"),u=$e("borderRadius"),c=$e("borderSpacing"),f=$e("borderWidth"),h=$e("contrast"),g=$e("grayscale"),x=$e("hueRotate"),m=$e("invert"),y=$e("gap"),w=$e("gradientColorStops"),_=$e("gradientColorStopPositions"),C=$e("inset"),S=$e("margin"),E=$e("opacity"),P=$e("padding"),N=$e("saturate"),M=$e("scale"),$=$e("sepia"),D=$e("skew"),H=$e("space"),G=$e("translate"),K=()=>["auto","contain","none"],te=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",Ne,r],V=()=>[Ne,r],ee=()=>["",xn,Un],z=()=>["auto",so,Ne],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",Ne],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>[so,Ne];return{cacheSize:500,separator:":",theme:{colors:[di],spacing:[xn,Un],blur:["none","",Yn,Ne],brightness:b(),borderColor:[e],borderRadius:["none","","full",Yn,Ne],borderSpacing:V(),borderWidth:ee(),contrast:b(),grayscale:T(),hueRotate:b(),invert:T(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[Pv,Un],inset:O(),margin:O(),opacity:b(),padding:V(),saturate:b(),scale:b(),sepia:T(),skew:b(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Ne]}],container:["container"],columns:[{columns:[Yn]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"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:[...Y(),Ne]}],overflow:[{overflow:te()}],"overflow-x":[{"overflow-x":te()}],"overflow-y":[{"overflow-y":te()}],overscroll:[{overscroll:K()}],"overscroll-x":[{"overscroll-x":K()}],"overscroll-y":[{"overscroll-y":K()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ci,Ne]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ne]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",ci,Ne]}],"grid-cols":[{"grid-cols":[di]}],"col-start-end":[{col:["auto",{span:["full",ci,Ne]},Ne]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[di]}],"row-start-end":[{row:["auto",{span:[ci,Ne]},Ne]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ne]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],ps:[{ps:[P]}],pe:[{pe:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ne,r]}],"min-w":[{"min-w":[Ne,r,"min","max","fit"]}],"max-w":[{"max-w":[Ne,r,"none","full","min","max","fit","prose",{screen:[Yn]},Yn]}],h:[{h:[Ne,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ne,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ne,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ne,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Yn,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hu]}],"font-family":[{font:[di]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ne]}],"line-clamp":[{"line-clamp":["none",so,Hu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xn,Ne]}],"list-image":[{"list-image":["none",Ne]}],"list-style-type":[{list:["none","disc","decimal",Ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xn,Un]}],"underline-offset":[{"underline-offset":["auto",xn,Ne]}],"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:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne]}],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",Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),Rv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Iv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Av]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:F()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-y":[{"border-y":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[xn,Ne]}],"outline-w":[{outline:[xn,Un]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[xn,Un]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Yn,Lv]}],"shadow-color":[{shadow:[di]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[s]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Yn,Ne]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[x]}],invert:[{invert:[m]}],saturate:[{saturate:[N]}],sepia:[{sepia:[$]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[x]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ne]}],duration:[{duration:b()}],ease:[{ease:["linear","in","out","in-out",Ne]}],delay:[{delay:b()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[ci,Ne]}],"translate-x":[{"translate-x":[G]}],"translate-y":[{"translate-y":[G]}],"skew-x":[{"skew-x":[D]}],"skew-y":[{"skew-y":[D]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ne]}],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",Ne]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ne]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xn,Un,Hu]}],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-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"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"]}}},Vv=kv(Fv);function Oe(...e){return Vv(Em(e))}const Bv=Nm("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",{variants:{variant:{default:"border-transparent bg-primary/15 text-primary",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"text-foreground",muted:"border-transparent bg-muted text-muted-foreground"}},defaultVariants:{variant:"default"}});function uc({className:e,variant:r,...o}){return v.jsx("span",{className:Oe(Bv({variant:r}),e),...o})}function Ke(e){if(typeof e=="string"||typeof e=="number")return""+e;let r="";if(Array.isArray(e))for(let o=0,s;o<e.length;o++)(s=Ke(e[o]))!==""&&(r+=(r&&" ")+s);else for(let o in e)e[o]&&(r+=(r&&" ")+o);return r}var Hv={value:()=>{}};function Il(){for(var e=0,r=arguments.length,o={},s;e<r;++e){if(!(s=arguments[e]+"")||s in o||/[\s.]/.test(s))throw new Error("illegal type: "+s);o[s]=[]}return new hl(o)}function hl(e){this._=e}function Wv(e,r){return e.trim().split(/^|\s+/).map(function(o){var s="",l=o.indexOf(".");if(l>=0&&(s=o.slice(l+1),o=o.slice(0,l)),o&&!r.hasOwnProperty(o))throw new Error("unknown type: "+o);return{type:o,name:s}})}hl.prototype=Il.prototype={constructor:hl,on:function(e,r){var o=this._,s=Wv(e+"",o),l,u=-1,c=s.length;if(arguments.length<2){for(;++u<c;)if((l=(e=s[u]).type)&&(l=Uv(o[l],e.name)))return l;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++u<c;)if(l=(e=s[u]).type)o[l]=Fp(o[l],e.name,r);else if(r==null)for(l in o)o[l]=Fp(o[l],e.name,null);return this},copy:function(){var e={},r=this._;for(var o in r)e[o]=r[o].slice();return new hl(e)},call:function(e,r){if((l=arguments.length-2)>0)for(var o=new Array(l),s=0,l,u;s<l;++s)o[s]=arguments[s+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(u=this._[e],s=0,l=u.length;s<l;++s)u[s].value.apply(r,o)},apply:function(e,r,o){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var s=this._[e],l=0,u=s.length;l<u;++l)s[l].value.apply(r,o)}};function Uv(e,r){for(var o=0,s=e.length,l;o<s;++o)if((l=e[o]).name===r)return l.value}function Fp(e,r,o){for(var s=0,l=e.length;s<l;++s)if(e[s].name===r){e[s]=Hv,e=e.slice(0,s).concat(e.slice(s+1));break}return o!=null&&e.push({name:r,value:o}),e}var cc="http://www.w3.org/1999/xhtml";const Vp={svg:"http://www.w3.org/2000/svg",xhtml:cc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Rl(e){var r=e+="",o=r.indexOf(":");return o>=0&&(r=e.slice(0,o))!=="xmlns"&&(e=e.slice(o+1)),Vp.hasOwnProperty(r)?{space:Vp[r],local:e}:e}function Yv(e){return function(){var r=this.ownerDocument,o=this.namespaceURI;return o===cc&&r.documentElement.namespaceURI===cc?r.createElement(e):r.createElementNS(o,e)}}function Xv(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function zm(e){var r=Rl(e);return(r.local?Xv:Yv)(r)}function Gv(){}function Pc(e){return e==null?Gv:function(){return this.querySelector(e)}}function Kv(e){typeof e!="function"&&(e=Pc(e));for(var r=this._groups,o=r.length,s=new Array(o),l=0;l<o;++l)for(var u=r[l],c=u.length,f=s[l]=new Array(c),h,g,x=0;x<c;++x)(h=u[x])&&(g=e.call(h,h.__data__,x,u))&&("__data__"in h&&(g.__data__=h.__data__),f[x]=g);return new jt(s,this._parents)}function qv(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Qv(){return[]}function Im(e){return e==null?Qv:function(){return this.querySelectorAll(e)}}function Zv(e){return function(){return qv(e.apply(this,arguments))}}function Jv(e){typeof e=="function"?e=Zv(e):e=Im(e);for(var r=this._groups,o=r.length,s=[],l=[],u=0;u<o;++u)for(var c=r[u],f=c.length,h,g=0;g<f;++g)(h=c[g])&&(s.push(e.call(h,h.__data__,g,c)),l.push(h));return new jt(s,l)}function Rm(e){return function(){return this.matches(e)}}function Tm(e){return function(r){return r.matches(e)}}var e1=Array.prototype.find;function t1(e){return function(){return e1.call(this.children,e)}}function n1(){return this.firstElementChild}function r1(e){return this.select(e==null?n1:t1(typeof e=="function"?e:Tm(e)))}var o1=Array.prototype.filter;function i1(){return Array.from(this.children)}function s1(e){return function(){return o1.call(this.children,e)}}function l1(e){return this.selectAll(e==null?i1:s1(typeof e=="function"?e:Tm(e)))}function a1(e){typeof e!="function"&&(e=Rm(e));for(var r=this._groups,o=r.length,s=new Array(o),l=0;l<o;++l)for(var u=r[l],c=u.length,f=s[l]=[],h,g=0;g<c;++g)(h=u[g])&&e.call(h,h.__data__,g,u)&&f.push(h);return new jt(s,this._parents)}function Am(e){return new Array(e.length)}function u1(){return new jt(this._enter||this._groups.map(Am),this._parents)}function wl(e,r){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=r}wl.prototype={constructor:wl,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,r){return this._parent.insertBefore(e,r)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function c1(e){return function(){return e}}function d1(e,r,o,s,l,u){for(var c=0,f,h=r.length,g=u.length;c<g;++c)(f=r[c])?(f.__data__=u[c],s[c]=f):o[c]=new wl(e,u[c]);for(;c<h;++c)(f=r[c])&&(l[c]=f)}function f1(e,r,o,s,l,u,c){var f,h,g=new Map,x=r.length,m=u.length,y=new Array(x),w;for(f=0;f<x;++f)(h=r[f])&&(y[f]=w=c.call(h,h.__data__,f,r)+"",g.has(w)?l[f]=h:g.set(w,h));for(f=0;f<m;++f)w=c.call(e,u[f],f,u)+"",(h=g.get(w))?(s[f]=h,h.__data__=u[f],g.delete(w)):o[f]=new wl(e,u[f]);for(f=0;f<x;++f)(h=r[f])&&g.get(y[f])===h&&(l[f]=h)}function p1(e){return e.__data__}function h1(e,r){if(!arguments.length)return Array.from(this,p1);var o=r?f1:d1,s=this._parents,l=this._groups;typeof e!="function"&&(e=c1(e));for(var u=l.length,c=new Array(u),f=new Array(u),h=new Array(u),g=0;g<u;++g){var x=s[g],m=l[g],y=m.length,w=m1(e.call(x,x&&x.__data__,g,s)),_=w.length,C=f[g]=new Array(_),S=c[g]=new Array(_),E=h[g]=new Array(y);o(x,m,C,S,E,w,r);for(var P=0,N=0,M,$;P<_;++P)if(M=C[P]){for(P>=N&&(N=P+1);!($=S[N])&&++N<_;);M._next=$||null}}return c=new jt(c,s),c._enter=f,c._exit=h,c}function m1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function g1(){return new jt(this._exit||this._groups.map(Am),this._parents)}function y1(e,r,o){var s=this.enter(),l=this,u=this.exit();return typeof e=="function"?(s=e(s),s&&(s=s.selection())):s=s.append(e+""),r!=null&&(l=r(l),l&&(l=l.selection())),o==null?u.remove():o(u),s&&l?s.merge(l).order():l}function x1(e){for(var r=e.selection?e.selection():e,o=this._groups,s=r._groups,l=o.length,u=s.length,c=Math.min(l,u),f=new Array(l),h=0;h<c;++h)for(var g=o[h],x=s[h],m=g.length,y=f[h]=new Array(m),w,_=0;_<m;++_)(w=g[_]||x[_])&&(y[_]=w);for(;h<l;++h)f[h]=o[h];return new jt(f,this._parents)}function v1(){for(var e=this._groups,r=-1,o=e.length;++r<o;)for(var s=e[r],l=s.length-1,u=s[l],c;--l>=0;)(c=s[l])&&(u&&c.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(c,u),u=c);return this}function w1(e){e||(e=S1);function r(m,y){return m&&y?e(m.__data__,y.__data__):!m-!y}for(var o=this._groups,s=o.length,l=new Array(s),u=0;u<s;++u){for(var c=o[u],f=c.length,h=l[u]=new Array(f),g,x=0;x<f;++x)(g=c[x])&&(h[x]=g);h.sort(r)}return new jt(l,this._parents).order()}function S1(e,r){return e<r?-1:e>r?1:e>=r?0:NaN}function k1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function _1(){return Array.from(this)}function E1(){for(var e=this._groups,r=0,o=e.length;r<o;++r)for(var s=e[r],l=0,u=s.length;l<u;++l){var c=s[l];if(c)return c}return null}function N1(){let e=0;for(const r of this)++e;return e}function C1(){return!this.node()}function b1(e){for(var r=this._groups,o=0,s=r.length;o<s;++o)for(var l=r[o],u=0,c=l.length,f;u<c;++u)(f=l[u])&&e.call(f,f.__data__,u,l);return this}function M1(e){return function(){this.removeAttribute(e)}}function j1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function P1(e,r){return function(){this.setAttribute(e,r)}}function z1(e,r){return function(){this.setAttributeNS(e.space,e.local,r)}}function I1(e,r){return function(){var o=r.apply(this,arguments);o==null?this.removeAttribute(e):this.setAttribute(e,o)}}function R1(e,r){return function(){var o=r.apply(this,arguments);o==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,o)}}function T1(e,r){var o=Rl(e);if(arguments.length<2){var s=this.node();return o.local?s.getAttributeNS(o.space,o.local):s.getAttribute(o)}return this.each((r==null?o.local?j1:M1:typeof r=="function"?o.local?R1:I1:o.local?z1:P1)(o,r))}function Lm(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function A1(e){return function(){this.style.removeProperty(e)}}function L1(e,r,o){return function(){this.style.setProperty(e,r,o)}}function $1(e,r,o){return function(){var s=r.apply(this,arguments);s==null?this.style.removeProperty(e):this.style.setProperty(e,s,o)}}function D1(e,r,o){return arguments.length>1?this.each((r==null?A1:typeof r=="function"?$1:L1)(e,r,o??"")):uo(this.node(),e)}function uo(e,r){return e.style.getPropertyValue(r)||Lm(e).getComputedStyle(e,null).getPropertyValue(r)}function O1(e){return function(){delete this[e]}}function F1(e,r){return function(){this[e]=r}}function V1(e,r){return function(){var o=r.apply(this,arguments);o==null?delete this[e]:this[e]=o}}function B1(e,r){return arguments.length>1?this.each((r==null?O1:typeof r=="function"?V1:F1)(e,r)):this.node()[e]}function $m(e){return e.trim().split(/^|\s+/)}function zc(e){return e.classList||new Dm(e)}function Dm(e){this._node=e,this._names=$m(e.getAttribute("class")||"")}Dm.prototype={add:function(e){var r=this._names.indexOf(e);r<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var r=this._names.indexOf(e);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Om(e,r){for(var o=zc(e),s=-1,l=r.length;++s<l;)o.add(r[s])}function Fm(e,r){for(var o=zc(e),s=-1,l=r.length;++s<l;)o.remove(r[s])}function H1(e){return function(){Om(this,e)}}function W1(e){return function(){Fm(this,e)}}function U1(e,r){return function(){(r.apply(this,arguments)?Om:Fm)(this,e)}}function Y1(e,r){var o=$m(e+"");if(arguments.length<2){for(var s=zc(this.node()),l=-1,u=o.length;++l<u;)if(!s.contains(o[l]))return!1;return!0}return this.each((typeof r=="function"?U1:r?H1:W1)(o,r))}function X1(){this.textContent=""}function G1(e){return function(){this.textContent=e}}function K1(e){return function(){var r=e.apply(this,arguments);this.textContent=r??""}}function q1(e){return arguments.length?this.each(e==null?X1:(typeof e=="function"?K1:G1)(e)):this.node().textContent}function Q1(){this.innerHTML=""}function Z1(e){return function(){this.innerHTML=e}}function J1(e){return function(){var r=e.apply(this,arguments);this.innerHTML=r??""}}function ew(e){return arguments.length?this.each(e==null?Q1:(typeof e=="function"?J1:Z1)(e)):this.node().innerHTML}function tw(){this.nextSibling&&this.parentNode.appendChild(this)}function nw(){return this.each(tw)}function rw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ow(){return this.each(rw)}function iw(e){var r=typeof e=="function"?e:zm(e);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function sw(){return null}function lw(e,r){var o=typeof e=="function"?e:zm(e),s=r==null?sw:typeof r=="function"?r:Pc(r);return this.select(function(){return this.insertBefore(o.apply(this,arguments),s.apply(this,arguments)||null)})}function aw(){var e=this.parentNode;e&&e.removeChild(this)}function uw(){return this.each(aw)}function cw(){var e=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function dw(){var e=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(e,this.nextSibling):e}function fw(e){return this.select(e?dw:cw)}function pw(e){return arguments.length?this.property("__data__",e):this.node().__data__}function hw(e){return function(r){e.call(this,r,this.__data__)}}function mw(e){return e.trim().split(/^|\s+/).map(function(r){var o="",s=r.indexOf(".");return s>=0&&(o=r.slice(s+1),r=r.slice(0,s)),{type:r,name:o}})}function gw(e){return function(){var r=this.__on;if(r){for(var o=0,s=-1,l=r.length,u;o<l;++o)u=r[o],(!e.type||u.type===e.type)&&u.name===e.name?this.removeEventListener(u.type,u.listener,u.options):r[++s]=u;++s?r.length=s:delete this.__on}}}function yw(e,r,o){return function(){var s=this.__on,l,u=hw(r);if(s){for(var c=0,f=s.length;c<f;++c)if((l=s[c]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.options),this.addEventListener(l.type,l.listener=u,l.options=o),l.value=r;return}}this.addEventListener(e.type,u,o),l={type:e.type,name:e.name,value:r,listener:u,options:o},s?s.push(l):this.__on=[l]}}function xw(e,r,o){var s=mw(e+""),l,u=s.length,c;if(arguments.length<2){var f=this.node().__on;if(f){for(var h=0,g=f.length,x;h<g;++h)for(l=0,x=f[h];l<u;++l)if((c=s[l]).type===x.type&&c.name===x.name)return x.value}return}for(f=r?yw:gw,l=0;l<u;++l)this.each(f(s[l],r,o));return this}function Vm(e,r,o){var s=Lm(e),l=s.CustomEvent;typeof l=="function"?l=new l(r,o):(l=s.document.createEvent("Event"),o?(l.initEvent(r,o.bubbles,o.cancelable),l.detail=o.detail):l.initEvent(r,!1,!1)),e.dispatchEvent(l)}function vw(e,r){return function(){return Vm(this,e,r)}}function ww(e,r){return function(){return Vm(this,e,r.apply(this,arguments))}}function Sw(e,r){return this.each((typeof r=="function"?ww:vw)(e,r))}function*kw(){for(var e=this._groups,r=0,o=e.length;r<o;++r)for(var s=e[r],l=0,u=s.length,c;l<u;++l)(c=s[l])&&(yield c)}var Bm=[null];function jt(e,r){this._groups=e,this._parents=r}function ji(){return new jt([[document.documentElement]],Bm)}function _w(){return this}jt.prototype=ji.prototype={constructor:jt,select:Kv,selectAll:Jv,selectChild:r1,selectChildren:l1,filter:a1,data:h1,enter:u1,exit:g1,join:y1,merge:x1,selection:_w,order:v1,sort:w1,call:k1,nodes:_1,node:E1,size:N1,empty:C1,each:b1,attr:T1,style:D1,property:B1,classed:Y1,text:q1,html:ew,raise:nw,lower:ow,append:iw,insert:lw,remove:uw,clone:fw,datum:pw,on:xw,dispatch:Sw,[Symbol.iterator]:kw};function Mt(e){return typeof e=="string"?new jt([[document.querySelector(e)]],[document.documentElement]):new jt([[e]],Bm)}function Ew(e){let r;for(;r=e.sourceEvent;)e=r;return e}function Wt(e,r){if(e=Ew(e),r===void 0&&(r=e.currentTarget),r){var o=r.ownerSVGElement||r;if(o.createSVGPoint){var s=o.createSVGPoint();return s.x=e.clientX,s.y=e.clientY,s=s.matrixTransform(r.getScreenCTM().inverse()),[s.x,s.y]}if(r.getBoundingClientRect){var l=r.getBoundingClientRect();return[e.clientX-l.left-r.clientLeft,e.clientY-l.top-r.clientTop]}}return[e.pageX,e.pageY]}const Nw={passive:!1},vi={capture:!0,passive:!1};function Wu(e){e.stopImmediatePropagation()}function lo(e){e.preventDefault(),e.stopImmediatePropagation()}function Hm(e){var r=e.document.documentElement,o=Mt(e).on("dragstart.drag",lo,vi);"onselectstart"in r?o.on("selectstart.drag",lo,vi):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function Wm(e,r){var o=e.document.documentElement,s=Mt(e).on("dragstart.drag",null);r&&(s.on("click.drag",lo,vi),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in o?s.on("selectstart.drag",null):(o.style.MozUserSelect=o.__noselect,delete o.__noselect)}const tl=e=>()=>e;function dc(e,{sourceEvent:r,subject:o,target:s,identifier:l,active:u,x:c,y:f,dx:h,dy:g,dispatch:x}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:o,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:l,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:h,enumerable:!0,configurable:!0},dy:{value:g,enumerable:!0,configurable:!0},_:{value:x}})}dc.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Cw(e){return!e.ctrlKey&&!e.button}function bw(){return this.parentNode}function Mw(e,r){return r??{x:e.x,y:e.y}}function jw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Um(){var e=Cw,r=bw,o=Mw,s=jw,l={},u=Il("start","drag","end"),c=0,f,h,g,x,m=0;function y(M){M.on("mousedown.drag",w).filter(s).on("touchstart.drag",S).on("touchmove.drag",E,Nw).on("touchend.drag touchcancel.drag",P).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(M,$){if(!(x||!e.call(this,M,$))){var D=N(this,r.call(this,M,$),M,$,"mouse");D&&(Mt(M.view).on("mousemove.drag",_,vi).on("mouseup.drag",C,vi),Hm(M.view),Wu(M),g=!1,f=M.clientX,h=M.clientY,D("start",M))}}function _(M){if(lo(M),!g){var $=M.clientX-f,D=M.clientY-h;g=$*$+D*D>m}l.mouse("drag",M)}function C(M){Mt(M.view).on("mousemove.drag mouseup.drag",null),Wm(M.view,g),lo(M),l.mouse("end",M)}function S(M,$){if(e.call(this,M,$)){var D=M.changedTouches,H=r.call(this,M,$),G=D.length,K,te;for(K=0;K<G;++K)(te=N(this,H,M,$,D[K].identifier,D[K]))&&(Wu(M),te("start",M,D[K]))}}function E(M){var $=M.changedTouches,D=$.length,H,G;for(H=0;H<D;++H)(G=l[$[H].identifier])&&(lo(M),G("drag",M,$[H]))}function P(M){var $=M.changedTouches,D=$.length,H,G;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),H=0;H<D;++H)(G=l[$[H].identifier])&&(Wu(M),G("end",M,$[H]))}function N(M,$,D,H,G,K){var te=u.copy(),O=Wt(K||D,$),V,ee,z;if((z=o.call(M,new dc("beforestart",{sourceEvent:D,target:y,identifier:G,active:c,x:O[0],y:O[1],dx:0,dy:0,dispatch:te}),H))!=null)return V=z.x-O[0]||0,ee=z.y-O[1]||0,function Y(F,U,A){var T=O,W;switch(F){case"start":l[G]=Y,W=c++;break;case"end":delete l[G],--c;case"drag":O=Wt(A||U,$),W=c;break}te.call(F,M,new dc(F,{sourceEvent:U,subject:z,target:y,identifier:G,active:W,x:O[0]+V,y:O[1]+ee,dx:O[0]-T[0],dy:O[1]-T[1],dispatch:te}),H)}}return y.filter=function(M){return arguments.length?(e=typeof M=="function"?M:tl(!!M),y):e},y.container=function(M){return arguments.length?(r=typeof M=="function"?M:tl(M),y):r},y.subject=function(M){return arguments.length?(o=typeof M=="function"?M:tl(M),y):o},y.touchable=function(M){return arguments.length?(s=typeof M=="function"?M:tl(!!M),y):s},y.on=function(){var M=u.on.apply(u,arguments);return M===u?y:M},y.clickDistance=function(M){return arguments.length?(m=(M=+M)*M,y):Math.sqrt(m)},y}function Ic(e,r,o){e.prototype=r.prototype=o,o.constructor=e}function Ym(e,r){var o=Object.create(e.prototype);for(var s in r)o[s]=r[s];return o}function Pi(){}var wi=.7,Sl=1/wi,ao="\\s*([+-]?\\d+)\\s*",Si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pw=/^#([0-9a-f]{3,8})$/,zw=new RegExp(`^rgb\\(${ao},${ao},${ao}\\)$`),Iw=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),Rw=new RegExp(`^rgba\\(${ao},${ao},${ao},${Si}\\)$`),Tw=new RegExp(`^rgba\\(${on},${on},${on},${Si}\\)$`),Aw=new RegExp(`^hsl\\(${Si},${on},${on}\\)$`),Lw=new RegExp(`^hsla\\(${Si},${on},${on},${Si}\\)$`),Bp={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};Ic(Pi,kr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Hp,formatHex:Hp,formatHex8:$w,formatHsl:Dw,formatRgb:Wp,toString:Wp});function Hp(){return this.rgb().formatHex()}function $w(){return this.rgb().formatHex8()}function Dw(){return Xm(this).formatHsl()}function Wp(){return this.rgb().formatRgb()}function kr(e){var r,o;return e=(e+"").trim().toLowerCase(),(r=Pw.exec(e))?(o=r[1].length,r=parseInt(r[1],16),o===6?Up(r):o===3?new wt(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):o===8?nl(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):o===4?nl(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=zw.exec(e))?new wt(r[1],r[2],r[3],1):(r=Iw.exec(e))?new wt(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=Rw.exec(e))?nl(r[1],r[2],r[3],r[4]):(r=Tw.exec(e))?nl(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=Aw.exec(e))?Gp(r[1],r[2]/100,r[3]/100,1):(r=Lw.exec(e))?Gp(r[1],r[2]/100,r[3]/100,r[4]):Bp.hasOwnProperty(e)?Up(Bp[e]):e==="transparent"?new wt(NaN,NaN,NaN,0):null}function Up(e){return new wt(e>>16&255,e>>8&255,e&255,1)}function nl(e,r,o,s){return s<=0&&(e=r=o=NaN),new wt(e,r,o,s)}function Ow(e){return e instanceof Pi||(e=kr(e)),e?(e=e.rgb(),new wt(e.r,e.g,e.b,e.opacity)):new wt}function fc(e,r,o,s){return arguments.length===1?Ow(e):new wt(e,r,o,s??1)}function wt(e,r,o,s){this.r=+e,this.g=+r,this.b=+o,this.opacity=+s}Ic(wt,fc,Ym(Pi,{brighter(e){return e=e==null?Sl:Math.pow(Sl,e),new wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?wi:Math.pow(wi,e),new wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wt(vr(this.r),vr(this.g),vr(this.b),kl(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:Yp,formatHex:Yp,formatHex8:Fw,formatRgb:Xp,toString:Xp}));function Yp(){return`#${xr(this.r)}${xr(this.g)}${xr(this.b)}`}function Fw(){return`#${xr(this.r)}${xr(this.g)}${xr(this.b)}${xr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Xp(){const e=kl(this.opacity);return`${e===1?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${e===1?")":`, ${e})`}`}function kl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xr(e){return e=vr(e),(e<16?"0":"")+e.toString(16)}function Gp(e,r,o,s){return s<=0?e=r=o=NaN:o<=0||o>=1?e=r=NaN:r<=0&&(e=NaN),new Ut(e,r,o,s)}function Xm(e){if(e instanceof Ut)return new Ut(e.h,e.s,e.l,e.opacity);if(e instanceof Pi||(e=kr(e)),!e)return new Ut;if(e instanceof Ut)return e;e=e.rgb();var r=e.r/255,o=e.g/255,s=e.b/255,l=Math.min(r,o,s),u=Math.max(r,o,s),c=NaN,f=u-l,h=(u+l)/2;return f?(r===u?c=(o-s)/f+(o<s)*6:o===u?c=(s-r)/f+2:c=(r-o)/f+4,f/=h<.5?u+l:2-u-l,c*=60):f=h>0&&h<1?0:c,new Ut(c,f,h,e.opacity)}function Vw(e,r,o,s){return arguments.length===1?Xm(e):new Ut(e,r,o,s??1)}function Ut(e,r,o,s){this.h=+e,this.s=+r,this.l=+o,this.opacity=+s}Ic(Ut,Vw,Ym(Pi,{brighter(e){return e=e==null?Sl:Math.pow(Sl,e),new Ut(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?wi:Math.pow(wi,e),new Ut(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,o=this.l,s=o+(o<.5?o:1-o)*r,l=2*o-s;return new wt(Uu(e>=240?e-240:e+120,l,s),Uu(e,l,s),Uu(e<120?e+240:e-120,l,s),this.opacity)},clamp(){return new Ut(Kp(this.h),rl(this.s),rl(this.l),kl(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=kl(this.opacity);return`${e===1?"hsl(":"hsla("}${Kp(this.h)}, ${rl(this.s)*100}%, ${rl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Kp(e){return e=(e||0)%360,e<0?e+360:e}function rl(e){return Math.max(0,Math.min(1,e||0))}function Uu(e,r,o){return(e<60?r+(o-r)*e/60:e<180?o:e<240?r+(o-r)*(240-e)/60:r)*255}const Rc=e=>()=>e;function Bw(e,r){return function(o){return e+o*r}}function Hw(e,r,o){return e=Math.pow(e,o),r=Math.pow(r,o)-e,o=1/o,function(s){return Math.pow(e+s*r,o)}}function Ww(e){return(e=+e)==1?Gm:function(r,o){return o-r?Hw(r,o,e):Rc(isNaN(r)?o:r)}}function Gm(e,r){var o=r-e;return o?Bw(e,o):Rc(isNaN(e)?r:e)}const _l=(function e(r){var o=Ww(r);function s(l,u){var c=o((l=fc(l)).r,(u=fc(u)).r),f=o(l.g,u.g),h=o(l.b,u.b),g=Gm(l.opacity,u.opacity);return function(x){return l.r=c(x),l.g=f(x),l.b=h(x),l.opacity=g(x),l+""}}return s.gamma=e,s})(1);function Uw(e,r){r||(r=[]);var o=e?Math.min(r.length,e.length):0,s=r.slice(),l;return function(u){for(l=0;l<o;++l)s[l]=e[l]*(1-u)+r[l]*u;return s}}function Yw(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Xw(e,r){var o=r?r.length:0,s=e?Math.min(o,e.length):0,l=new Array(s),u=new Array(o),c;for(c=0;c<s;++c)l[c]=yi(e[c],r[c]);for(;c<o;++c)u[c]=r[c];return function(f){for(c=0;c<s;++c)u[c]=l[c](f);return u}}function Gw(e,r){var o=new Date;return e=+e,r=+r,function(s){return o.setTime(e*(1-s)+r*s),o}}function rn(e,r){return e=+e,r=+r,function(o){return e*(1-o)+r*o}}function Kw(e,r){var o={},s={},l;(e===null||typeof e!="object")&&(e={}),(r===null||typeof r!="object")&&(r={});for(l in r)l in e?o[l]=yi(e[l],r[l]):s[l]=r[l];return function(u){for(l in o)s[l]=o[l](u);return s}}var pc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Yu=new RegExp(pc.source,"g");function qw(e){return function(){return e}}function Qw(e){return function(r){return e(r)+""}}function Km(e,r){var o=pc.lastIndex=Yu.lastIndex=0,s,l,u,c=-1,f=[],h=[];for(e=e+"",r=r+"";(s=pc.exec(e))&&(l=Yu.exec(r));)(u=l.index)>o&&(u=r.slice(o,u),f[c]?f[c]+=u:f[++c]=u),(s=s[0])===(l=l[0])?f[c]?f[c]+=l:f[++c]=l:(f[++c]=null,h.push({i:c,x:rn(s,l)})),o=Yu.lastIndex;return o<r.length&&(u=r.slice(o),f[c]?f[c]+=u:f[++c]=u),f.length<2?h[0]?Qw(h[0].x):qw(r):(r=h.length,function(g){for(var x=0,m;x<r;++x)f[(m=h[x]).i]=m.x(g);return f.join("")})}function yi(e,r){var o=typeof r,s;return r==null||o==="boolean"?Rc(r):(o==="number"?rn:o==="string"?(s=kr(r))?(r=s,_l):Km:r instanceof kr?_l:r instanceof Date?Gw:Yw(r)?Uw:Array.isArray(r)?Xw:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Kw:rn)(e,r)}var qp=180/Math.PI,hc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qm(e,r,o,s,l,u){var c,f,h;return(c=Math.sqrt(e*e+r*r))&&(e/=c,r/=c),(h=e*o+r*s)&&(o-=e*h,s-=r*h),(f=Math.sqrt(o*o+s*s))&&(o/=f,s/=f,h/=f),e*s<r*o&&(e=-e,r=-r,h=-h,c=-c),{translateX:l,translateY:u,rotate:Math.atan2(r,e)*qp,skewX:Math.atan(h)*qp,scaleX:c,scaleY:f}}var ol;function Zw(e){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return r.isIdentity?hc:qm(r.a,r.b,r.c,r.d,r.e,r.f)}function Jw(e){return e==null||(ol||(ol=document.createElementNS("http://www.w3.org/2000/svg","g")),ol.setAttribute("transform",e),!(e=ol.transform.baseVal.consolidate()))?hc:(e=e.matrix,qm(e.a,e.b,e.c,e.d,e.e,e.f))}function Qm(e,r,o,s){function l(g){return g.length?g.pop()+" ":""}function u(g,x,m,y,w,_){if(g!==m||x!==y){var C=w.push("translate(",null,r,null,o);_.push({i:C-4,x:rn(g,m)},{i:C-2,x:rn(x,y)})}else(m||y)&&w.push("translate("+m+r+y+o)}function c(g,x,m,y){g!==x?(g-x>180?x+=360:x-g>180&&(g+=360),y.push({i:m.push(l(m)+"rotate(",null,s)-2,x:rn(g,x)})):x&&m.push(l(m)+"rotate("+x+s)}function f(g,x,m,y){g!==x?y.push({i:m.push(l(m)+"skewX(",null,s)-2,x:rn(g,x)}):x&&m.push(l(m)+"skewX("+x+s)}function h(g,x,m,y,w,_){if(g!==m||x!==y){var C=w.push(l(w)+"scale(",null,",",null,")");_.push({i:C-4,x:rn(g,m)},{i:C-2,x:rn(x,y)})}else(m!==1||y!==1)&&w.push(l(w)+"scale("+m+","+y+")")}return function(g,x){var m=[],y=[];return g=e(g),x=e(x),u(g.translateX,g.translateY,x.translateX,x.translateY,m,y),c(g.rotate,x.rotate,m,y),f(g.skewX,x.skewX,m,y),h(g.scaleX,g.scaleY,x.scaleX,x.scaleY,m,y),g=x=null,function(w){for(var _=-1,C=y.length,S;++_<C;)m[(S=y[_]).i]=S.x(w);return m.join("")}}}var eS=Qm(Zw,"px, ","px)","deg)"),tS=Qm(Jw,", ",")",")"),nS=1e-12;function Qp(e){return((e=Math.exp(e))+1/e)/2}function rS(e){return((e=Math.exp(e))-1/e)/2}function oS(e){return((e=Math.exp(2*e))-1)/(e+1)}const ml=(function e(r,o,s){function l(u,c){var f=u[0],h=u[1],g=u[2],x=c[0],m=c[1],y=c[2],w=x-f,_=m-h,C=w*w+_*_,S,E;if(C<nS)E=Math.log(y/g)/r,S=function(H){return[f+H*w,h+H*_,g*Math.exp(r*H*E)]};else{var P=Math.sqrt(C),N=(y*y-g*g+s*C)/(2*g*o*P),M=(y*y-g*g-s*C)/(2*y*o*P),$=Math.log(Math.sqrt(N*N+1)-N),D=Math.log(Math.sqrt(M*M+1)-M);E=(D-$)/r,S=function(H){var G=H*E,K=Qp($),te=g/(o*P)*(K*oS(r*G+$)-rS($));return[f+te*w,h+te*_,g*K/Qp(r*G+$)]}}return S.duration=E*1e3*r/Math.SQRT2,S}return l.rho=function(u){var c=Math.max(.001,+u),f=c*c,h=f*f;return e(c,f,h)},l})(Math.SQRT2,2,4);var co=0,mi=0,fi=0,Zm=1e3,El,gi,Nl=0,_r=0,Tl=0,ki=typeof performance=="object"&&performance.now?performance:Date,Jm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Tc(){return _r||(Jm(iS),_r=ki.now()+Tl)}function iS(){_r=0}function Cl(){this._call=this._time=this._next=null}Cl.prototype=eg.prototype={constructor:Cl,restart:function(e,r,o){if(typeof e!="function")throw new TypeError("callback is not a function");o=(o==null?Tc():+o)+(r==null?0:+r),!this._next&&gi!==this&&(gi?gi._next=this:El=this,gi=this),this._call=e,this._time=o,mc()},stop:function(){this._call&&(this._call=null,this._time=1/0,mc())}};function eg(e,r,o){var s=new Cl;return s.restart(e,r,o),s}function sS(){Tc(),++co;for(var e=El,r;e;)(r=_r-e._time)>=0&&e._call.call(void 0,r),e=e._next;--co}function Zp(){_r=(Nl=ki.now())+Tl,co=mi=0;try{sS()}finally{co=0,aS(),_r=0}}function lS(){var e=ki.now(),r=e-Nl;r>Zm&&(Tl-=r,Nl=e)}function aS(){for(var e,r=El,o,s=1/0;r;)r._call?(s>r._time&&(s=r._time),e=r,r=r._next):(o=r._next,r._next=null,r=e?e._next=o:El=o);gi=e,mc(s)}function mc(e){if(!co){mi&&(mi=clearTimeout(mi));var r=e-_r;r>24?(e<1/0&&(mi=setTimeout(Zp,e-ki.now()-Tl)),fi&&(fi=clearInterval(fi))):(fi||(Nl=ki.now(),fi=setInterval(lS,Zm)),co=1,Jm(Zp))}}function Jp(e,r,o){var s=new Cl;return r=r==null?0:+r,s.restart(l=>{s.stop(),e(l+r)},r,o),s}var uS=Il("start","end","cancel","interrupt"),cS=[],tg=0,eh=1,gc=2,gl=3,th=4,yc=5,yl=6;function Al(e,r,o,s,l,u){var c=e.__transition;if(!c)e.__transition={};else if(o in c)return;dS(e,o,{name:r,index:s,group:l,on:uS,tween:cS,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:tg})}function Ac(e,r){var o=Kt(e,r);if(o.state>tg)throw new Error("too late; already scheduled");return o}function sn(e,r){var o=Kt(e,r);if(o.state>gl)throw new Error("too late; already running");return o}function Kt(e,r){var o=e.__transition;if(!o||!(o=o[r]))throw new Error("transition not found");return o}function dS(e,r,o){var s=e.__transition,l;s[r]=o,o.timer=eg(u,0,o.time);function u(g){o.state=eh,o.timer.restart(c,o.delay,o.time),o.delay<=g&&c(g-o.delay)}function c(g){var x,m,y,w;if(o.state!==eh)return h();for(x in s)if(w=s[x],w.name===o.name){if(w.state===gl)return Jp(c);w.state===th?(w.state=yl,w.timer.stop(),w.on.call("interrupt",e,e.__data__,w.index,w.group),delete s[x]):+x<r&&(w.state=yl,w.timer.stop(),w.on.call("cancel",e,e.__data__,w.index,w.group),delete s[x])}if(Jp(function(){o.state===gl&&(o.state=th,o.timer.restart(f,o.delay,o.time),f(g))}),o.state=gc,o.on.call("start",e,e.__data__,o.index,o.group),o.state===gc){for(o.state=gl,l=new Array(y=o.tween.length),x=0,m=-1;x<y;++x)(w=o.tween[x].value.call(e,e.__data__,o.index,o.group))&&(l[++m]=w);l.length=m+1}}function f(g){for(var x=g<o.duration?o.ease.call(null,g/o.duration):(o.timer.restart(h),o.state=yc,1),m=-1,y=l.length;++m<y;)l[m].call(e,x);o.state===yc&&(o.on.call("end",e,e.__data__,o.index,o.group),h())}function h(){o.state=yl,o.timer.stop(),delete s[r];for(var g in s)return;delete e.__transition}}function xl(e,r){var o=e.__transition,s,l,u=!0,c;if(o){r=r==null?null:r+"";for(c in o){if((s=o[c]).name!==r){u=!1;continue}l=s.state>gc&&s.state<yc,s.state=yl,s.timer.stop(),s.on.call(l?"interrupt":"cancel",e,e.__data__,s.index,s.group),delete o[c]}u&&delete e.__transition}}function fS(e){return this.each(function(){xl(this,e)})}function pS(e,r){var o,s;return function(){var l=sn(this,e),u=l.tween;if(u!==o){s=o=u;for(var c=0,f=s.length;c<f;++c)if(s[c].name===r){s=s.slice(),s.splice(c,1);break}}l.tween=s}}function hS(e,r,o){var s,l;if(typeof o!="function")throw new Error;return function(){var u=sn(this,e),c=u.tween;if(c!==s){l=(s=c).slice();for(var f={name:r,value:o},h=0,g=l.length;h<g;++h)if(l[h].name===r){l[h]=f;break}h===g&&l.push(f)}u.tween=l}}function mS(e,r){var o=this._id;if(e+="",arguments.length<2){for(var s=Kt(this.node(),o).tween,l=0,u=s.length,c;l<u;++l)if((c=s[l]).name===e)return c.value;return null}return this.each((r==null?pS:hS)(o,e,r))}function Lc(e,r,o){var s=e._id;return e.each(function(){var l=sn(this,s);(l.value||(l.value={}))[r]=o.apply(this,arguments)}),function(l){return Kt(l,s).value[r]}}function ng(e,r){var o;return(typeof r=="number"?rn:r instanceof kr?_l:(o=kr(r))?(r=o,_l):Km)(e,r)}function gS(e){return function(){this.removeAttribute(e)}}function yS(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xS(e,r,o){var s,l=o+"",u;return function(){var c=this.getAttribute(e);return c===l?null:c===s?u:u=r(s=c,o)}}function vS(e,r,o){var s,l=o+"",u;return function(){var c=this.getAttributeNS(e.space,e.local);return c===l?null:c===s?u:u=r(s=c,o)}}function wS(e,r,o){var s,l,u;return function(){var c,f=o(this),h;return f==null?void this.removeAttribute(e):(c=this.getAttribute(e),h=f+"",c===h?null:c===s&&h===l?u:(l=h,u=r(s=c,f)))}}function SS(e,r,o){var s,l,u;return function(){var c,f=o(this),h;return f==null?void this.removeAttributeNS(e.space,e.local):(c=this.getAttributeNS(e.space,e.local),h=f+"",c===h?null:c===s&&h===l?u:(l=h,u=r(s=c,f)))}}function kS(e,r){var o=Rl(e),s=o==="transform"?tS:ng;return this.attrTween(e,typeof r=="function"?(o.local?SS:wS)(o,s,Lc(this,"attr."+e,r)):r==null?(o.local?yS:gS)(o):(o.local?vS:xS)(o,s,r))}function _S(e,r){return function(o){this.setAttribute(e,r.call(this,o))}}function ES(e,r){return function(o){this.setAttributeNS(e.space,e.local,r.call(this,o))}}function NS(e,r){var o,s;function l(){var u=r.apply(this,arguments);return u!==s&&(o=(s=u)&&ES(e,u)),o}return l._value=r,l}function CS(e,r){var o,s;function l(){var u=r.apply(this,arguments);return u!==s&&(o=(s=u)&&_S(e,u)),o}return l._value=r,l}function bS(e,r){var o="attr."+e;if(arguments.length<2)return(o=this.tween(o))&&o._value;if(r==null)return this.tween(o,null);if(typeof r!="function")throw new Error;var s=Rl(e);return this.tween(o,(s.local?NS:CS)(s,r))}function MS(e,r){return function(){Ac(this,e).delay=+r.apply(this,arguments)}}function jS(e,r){return r=+r,function(){Ac(this,e).delay=r}}function PS(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?MS:jS)(r,e)):Kt(this.node(),r).delay}function zS(e,r){return function(){sn(this,e).duration=+r.apply(this,arguments)}}function IS(e,r){return r=+r,function(){sn(this,e).duration=r}}function RS(e){var r=this._id;return arguments.length?this.each((typeof e=="function"?zS:IS)(r,e)):Kt(this.node(),r).duration}function TS(e,r){if(typeof r!="function")throw new Error;return function(){sn(this,e).ease=r}}function AS(e){var r=this._id;return arguments.length?this.each(TS(r,e)):Kt(this.node(),r).ease}function LS(e,r){return function(){var o=r.apply(this,arguments);if(typeof o!="function")throw new Error;sn(this,e).ease=o}}function $S(e){if(typeof e!="function")throw new Error;return this.each(LS(this._id,e))}function DS(e){typeof e!="function"&&(e=Rm(e));for(var r=this._groups,o=r.length,s=new Array(o),l=0;l<o;++l)for(var u=r[l],c=u.length,f=s[l]=[],h,g=0;g<c;++g)(h=u[g])&&e.call(h,h.__data__,g,u)&&f.push(h);return new kn(s,this._parents,this._name,this._id)}function OS(e){if(e._id!==this._id)throw new Error;for(var r=this._groups,o=e._groups,s=r.length,l=o.length,u=Math.min(s,l),c=new Array(s),f=0;f<u;++f)for(var h=r[f],g=o[f],x=h.length,m=c[f]=new Array(x),y,w=0;w<x;++w)(y=h[w]||g[w])&&(m[w]=y);for(;f<s;++f)c[f]=r[f];return new kn(c,this._parents,this._name,this._id)}function FS(e){return(e+"").trim().split(/^|\s+/).every(function(r){var o=r.indexOf(".");return o>=0&&(r=r.slice(0,o)),!r||r==="start"})}function VS(e,r,o){var s,l,u=FS(r)?Ac:sn;return function(){var c=u(this,e),f=c.on;f!==s&&(l=(s=f).copy()).on(r,o),c.on=l}}function BS(e,r){var o=this._id;return arguments.length<2?Kt(this.node(),o).on.on(e):this.each(VS(o,e,r))}function HS(e){return function(){var r=this.parentNode;for(var o in this.__transition)if(+o!==e)return;r&&r.removeChild(this)}}function WS(){return this.on("end.remove",HS(this._id))}function US(e){var r=this._name,o=this._id;typeof e!="function"&&(e=Pc(e));for(var s=this._groups,l=s.length,u=new Array(l),c=0;c<l;++c)for(var f=s[c],h=f.length,g=u[c]=new Array(h),x,m,y=0;y<h;++y)(x=f[y])&&(m=e.call(x,x.__data__,y,f))&&("__data__"in x&&(m.__data__=x.__data__),g[y]=m,Al(g[y],r,o,y,g,Kt(x,o)));return new kn(u,this._parents,r,o)}function YS(e){var r=this._name,o=this._id;typeof e!="function"&&(e=Im(e));for(var s=this._groups,l=s.length,u=[],c=[],f=0;f<l;++f)for(var h=s[f],g=h.length,x,m=0;m<g;++m)if(x=h[m]){for(var y=e.call(x,x.__data__,m,h),w,_=Kt(x,o),C=0,S=y.length;C<S;++C)(w=y[C])&&Al(w,r,o,C,y,_);u.push(y),c.push(x)}return new kn(u,c,r,o)}var XS=ji.prototype.constructor;function GS(){return new XS(this._groups,this._parents)}function KS(e,r){var o,s,l;return function(){var u=uo(this,e),c=(this.style.removeProperty(e),uo(this,e));return u===c?null:u===o&&c===s?l:l=r(o=u,s=c)}}function rg(e){return function(){this.style.removeProperty(e)}}function qS(e,r,o){var s,l=o+"",u;return function(){var c=uo(this,e);return c===l?null:c===s?u:u=r(s=c,o)}}function QS(e,r,o){var s,l,u;return function(){var c=uo(this,e),f=o(this),h=f+"";return f==null&&(h=f=(this.style.removeProperty(e),uo(this,e))),c===h?null:c===s&&h===l?u:(l=h,u=r(s=c,f))}}function ZS(e,r){var o,s,l,u="style."+r,c="end."+u,f;return function(){var h=sn(this,e),g=h.on,x=h.value[u]==null?f||(f=rg(r)):void 0;(g!==o||l!==x)&&(s=(o=g).copy()).on(c,l=x),h.on=s}}function JS(e,r,o){var s=(e+="")=="transform"?eS:ng;return r==null?this.styleTween(e,KS(e,s)).on("end.style."+e,rg(e)):typeof r=="function"?this.styleTween(e,QS(e,s,Lc(this,"style."+e,r))).each(ZS(this._id,e)):this.styleTween(e,qS(e,s,r),o).on("end.style."+e,null)}function e2(e,r,o){return function(s){this.style.setProperty(e,r.call(this,s),o)}}function t2(e,r,o){var s,l;function u(){var c=r.apply(this,arguments);return c!==l&&(s=(l=c)&&e2(e,c,o)),s}return u._value=r,u}function n2(e,r,o){var s="style."+(e+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(r==null)return this.tween(s,null);if(typeof r!="function")throw new Error;return this.tween(s,t2(e,r,o??""))}function r2(e){return function(){this.textContent=e}}function o2(e){return function(){var r=e(this);this.textContent=r??""}}function i2(e){return this.tween("text",typeof e=="function"?o2(Lc(this,"text",e)):r2(e==null?"":e+""))}function s2(e){return function(r){this.textContent=e.call(this,r)}}function l2(e){var r,o;function s(){var l=e.apply(this,arguments);return l!==o&&(r=(o=l)&&s2(l)),r}return s._value=e,s}function a2(e){var r="text";if(arguments.length<1)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,l2(e))}function u2(){for(var e=this._name,r=this._id,o=og(),s=this._groups,l=s.length,u=0;u<l;++u)for(var c=s[u],f=c.length,h,g=0;g<f;++g)if(h=c[g]){var x=Kt(h,r);Al(h,e,o,g,c,{time:x.time+x.delay+x.duration,delay:0,duration:x.duration,ease:x.ease})}return new kn(s,this._parents,e,o)}function c2(){var e,r,o=this,s=o._id,l=o.size();return new Promise(function(u,c){var f={value:c},h={value:function(){--l===0&&u()}};o.each(function(){var g=sn(this,s),x=g.on;x!==e&&(r=(e=x).copy(),r._.cancel.push(f),r._.interrupt.push(f),r._.end.push(h)),g.on=r}),l===0&&u()})}var d2=0;function kn(e,r,o,s){this._groups=e,this._parents=r,this._name=o,this._id=s}function og(){return++d2}var vn=ji.prototype;kn.prototype={constructor:kn,select:US,selectAll:YS,selectChild:vn.selectChild,selectChildren:vn.selectChildren,filter:DS,merge:OS,selection:GS,transition:u2,call:vn.call,nodes:vn.nodes,node:vn.node,size:vn.size,empty:vn.empty,each:vn.each,on:BS,attr:kS,attrTween:bS,style:JS,styleTween:n2,text:i2,textTween:a2,remove:WS,tween:mS,delay:PS,duration:RS,ease:AS,easeVarying:$S,end:c2,[Symbol.iterator]:vn[Symbol.iterator]};function f2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var p2={time:null,delay:0,duration:250,ease:f2};function h2(e,r){for(var o;!(o=e.__transition)||!(o=o[r]);)if(!(e=e.parentNode))throw new Error(`transition ${r} not found`);return o}function m2(e){var r,o;e instanceof kn?(r=e._id,e=e._name):(r=og(),(o=p2).time=Tc(),e=e==null?null:e+"");for(var s=this._groups,l=s.length,u=0;u<l;++u)for(var c=s[u],f=c.length,h,g=0;g<f;++g)(h=c[g])&&Al(h,e,r,g,c,o||h2(h,r));return new kn(s,this._parents,e,r)}ji.prototype.interrupt=fS;ji.prototype.transition=m2;const il=e=>()=>e;function g2(e,{sourceEvent:r,target:o,transform:s,dispatch:l}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:l}})}function Sn(e,r,o){this.k=e,this.x=r,this.y=o}Sn.prototype={constructor:Sn,scale:function(e){return e===1?this:new Sn(this.k*e,this.x,this.y)},translate:function(e,r){return e===0&r===0?this:new Sn(this.k,this.x+this.k*e,this.y+this.k*r)},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 Ll=new Sn(1,0,0);ig.prototype=Sn.prototype;function ig(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ll;return e.__zoom}function Xu(e){e.stopImmediatePropagation()}function pi(e){e.preventDefault(),e.stopImmediatePropagation()}function y2(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function x2(){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 nh(){return this.__zoom||Ll}function v2(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function w2(){return navigator.maxTouchPoints||"ontouchstart"in this}function S2(e,r,o){var s=e.invertX(r[0][0])-o[0][0],l=e.invertX(r[1][0])-o[1][0],u=e.invertY(r[0][1])-o[0][1],c=e.invertY(r[1][1])-o[1][1];return e.translate(l>s?(s+l)/2:Math.min(0,s)||Math.max(0,l),c>u?(u+c)/2:Math.min(0,u)||Math.max(0,c))}function sg(){var e=y2,r=x2,o=S2,s=v2,l=w2,u=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,h=ml,g=Il("start","zoom","end"),x,m,y,w=500,_=150,C=0,S=10;function E(z){z.property("__zoom",nh).on("wheel.zoom",G,{passive:!1}).on("mousedown.zoom",K).on("dblclick.zoom",te).filter(l).on("touchstart.zoom",O).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",ee).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(z,Y,F,U){var A=z.selection?z.selection():z;A.property("__zoom",nh),z!==A?$(z,Y,F,U):A.interrupt().each(function(){D(this,arguments).event(U).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},E.scaleBy=function(z,Y,F,U){E.scaleTo(z,function(){var A=this.__zoom.k,T=typeof Y=="function"?Y.apply(this,arguments):Y;return A*T},F,U)},E.scaleTo=function(z,Y,F,U){E.transform(z,function(){var A=r.apply(this,arguments),T=this.__zoom,W=F==null?M(A):typeof F=="function"?F.apply(this,arguments):F,b=T.invert(W),j=typeof Y=="function"?Y.apply(this,arguments):Y;return o(N(P(T,j),W,b),A,c)},F,U)},E.translateBy=function(z,Y,F,U){E.transform(z,function(){return o(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof F=="function"?F.apply(this,arguments):F),r.apply(this,arguments),c)},null,U)},E.translateTo=function(z,Y,F,U,A){E.transform(z,function(){var T=r.apply(this,arguments),W=this.__zoom,b=U==null?M(T):typeof U=="function"?U.apply(this,arguments):U;return o(Ll.translate(b[0],b[1]).scale(W.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof F=="function"?-F.apply(this,arguments):-F),T,c)},U,A)};function P(z,Y){return Y=Math.max(u[0],Math.min(u[1],Y)),Y===z.k?z:new Sn(Y,z.x,z.y)}function N(z,Y,F){var U=Y[0]-F[0]*z.k,A=Y[1]-F[1]*z.k;return U===z.x&&A===z.y?z:new Sn(z.k,U,A)}function M(z){return[(+z[0][0]+ +z[1][0])/2,(+z[0][1]+ +z[1][1])/2]}function $(z,Y,F,U){z.on("start.zoom",function(){D(this,arguments).event(U).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(U).end()}).tween("zoom",function(){var A=this,T=arguments,W=D(A,T).event(U),b=r.apply(A,T),j=F==null?M(b):typeof F=="function"?F.apply(A,T):F,J=Math.max(b[1][0]-b[0][0],b[1][1]-b[0][1]),ne=A.__zoom,ae=typeof Y=="function"?Y.apply(A,T):Y,ce=h(ne.invert(j).concat(J/ne.k),ae.invert(j).concat(J/ae.k));return function(ue){if(ue===1)ue=ae;else{var Z=ce(ue),se=J/Z[2];ue=new Sn(se,j[0]-Z[0]*se,j[1]-Z[1]*se)}W.zoom(null,ue)}})}function D(z,Y,F){return!F&&z.__zooming||new H(z,Y)}function H(z,Y){this.that=z,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=r.apply(z,Y),this.taps=0}H.prototype={event:function(z){return z&&(this.sourceEvent=z),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(z,Y){return this.mouse&&z!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&z!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&z!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(z){var Y=Mt(this.that).datum();g.call(z,this.that,new g2(z,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:g}),Y)}};function G(z,...Y){if(!e.apply(this,arguments))return;var F=D(this,Y).event(z),U=this.__zoom,A=Math.max(u[0],Math.min(u[1],U.k*Math.pow(2,s.apply(this,arguments)))),T=Wt(z);if(F.wheel)(F.mouse[0][0]!==T[0]||F.mouse[0][1]!==T[1])&&(F.mouse[1]=U.invert(F.mouse[0]=T)),clearTimeout(F.wheel);else{if(U.k===A)return;F.mouse=[T,U.invert(T)],xl(this),F.start()}pi(z),F.wheel=setTimeout(W,_),F.zoom("mouse",o(N(P(U,A),F.mouse[0],F.mouse[1]),F.extent,c));function W(){F.wheel=null,F.end()}}function K(z,...Y){if(y||!e.apply(this,arguments))return;var F=z.currentTarget,U=D(this,Y,!0).event(z),A=Mt(z.view).on("mousemove.zoom",j,!0).on("mouseup.zoom",J,!0),T=Wt(z,F),W=z.clientX,b=z.clientY;Hm(z.view),Xu(z),U.mouse=[T,this.__zoom.invert(T)],xl(this),U.start();function j(ne){if(pi(ne),!U.moved){var ae=ne.clientX-W,ce=ne.clientY-b;U.moved=ae*ae+ce*ce>C}U.event(ne).zoom("mouse",o(N(U.that.__zoom,U.mouse[0]=Wt(ne,F),U.mouse[1]),U.extent,c))}function J(ne){A.on("mousemove.zoom mouseup.zoom",null),Wm(ne.view,U.moved),pi(ne),U.event(ne).end()}}function te(z,...Y){if(e.apply(this,arguments)){var F=this.__zoom,U=Wt(z.changedTouches?z.changedTouches[0]:z,this),A=F.invert(U),T=F.k*(z.shiftKey?.5:2),W=o(N(P(F,T),U,A),r.apply(this,Y),c);pi(z),f>0?Mt(this).transition().duration(f).call($,W,U,z):Mt(this).call(E.transform,W,U,z)}}function O(z,...Y){if(e.apply(this,arguments)){var F=z.touches,U=F.length,A=D(this,Y,z.changedTouches.length===U).event(z),T,W,b,j;for(Xu(z),W=0;W<U;++W)b=F[W],j=Wt(b,this),j=[j,this.__zoom.invert(j),b.identifier],A.touch0?!A.touch1&&A.touch0[2]!==j[2]&&(A.touch1=j,A.taps=0):(A.touch0=j,T=!0,A.taps=1+!!x);x&&(x=clearTimeout(x)),T&&(A.taps<2&&(m=j[0],x=setTimeout(function(){x=null},w)),xl(this),A.start())}}function V(z,...Y){if(this.__zooming){var F=D(this,Y).event(z),U=z.changedTouches,A=U.length,T,W,b,j;for(pi(z),T=0;T<A;++T)W=U[T],b=Wt(W,this),F.touch0&&F.touch0[2]===W.identifier?F.touch0[0]=b:F.touch1&&F.touch1[2]===W.identifier&&(F.touch1[0]=b);if(W=F.that.__zoom,F.touch1){var J=F.touch0[0],ne=F.touch0[1],ae=F.touch1[0],ce=F.touch1[1],ue=(ue=ae[0]-J[0])*ue+(ue=ae[1]-J[1])*ue,Z=(Z=ce[0]-ne[0])*Z+(Z=ce[1]-ne[1])*Z;W=P(W,Math.sqrt(ue/Z)),b=[(J[0]+ae[0])/2,(J[1]+ae[1])/2],j=[(ne[0]+ce[0])/2,(ne[1]+ce[1])/2]}else if(F.touch0)b=F.touch0[0],j=F.touch0[1];else return;F.zoom("touch",o(N(W,b,j),F.extent,c))}}function ee(z,...Y){if(this.__zooming){var F=D(this,Y).event(z),U=z.changedTouches,A=U.length,T,W;for(Xu(z),y&&clearTimeout(y),y=setTimeout(function(){y=null},w),T=0;T<A;++T)W=U[T],F.touch0&&F.touch0[2]===W.identifier?delete F.touch0:F.touch1&&F.touch1[2]===W.identifier&&delete F.touch1;if(F.touch1&&!F.touch0&&(F.touch0=F.touch1,delete F.touch1),F.touch0)F.touch0[1]=this.__zoom.invert(F.touch0[0]);else if(F.end(),F.taps===2&&(W=Wt(W,this),Math.hypot(m[0]-W[0],m[1]-W[1])<S)){var b=Mt(this).on("dblclick.zoom");b&&b.apply(this,arguments)}}}return E.wheelDelta=function(z){return arguments.length?(s=typeof z=="function"?z:il(+z),E):s},E.filter=function(z){return arguments.length?(e=typeof z=="function"?z:il(!!z),E):e},E.touchable=function(z){return arguments.length?(l=typeof z=="function"?z:il(!!z),E):l},E.extent=function(z){return arguments.length?(r=typeof z=="function"?z:il([[+z[0][0],+z[0][1]],[+z[1][0],+z[1][1]]]),E):r},E.scaleExtent=function(z){return arguments.length?(u[0]=+z[0],u[1]=+z[1],E):[u[0],u[1]]},E.translateExtent=function(z){return arguments.length?(c[0][0]=+z[0][0],c[1][0]=+z[1][0],c[0][1]=+z[0][1],c[1][1]=+z[1][1],E):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},E.constrain=function(z){return arguments.length?(o=z,E):o},E.duration=function(z){return arguments.length?(f=+z,E):f},E.interpolate=function(z){return arguments.length?(h=z,E):h},E.on=function(){var z=g.on.apply(g,arguments);return z===g?E:z},E.clickDistance=function(z){return arguments.length?(C=(z=+z)*z,E):Math.sqrt(C)},E.tapDistance=function(z){return arguments.length?(S=+z,E):S},E}const Gt={error001:(e="react")=>`Seems like you have not used zustand provider as an ancestor. Help: https://${e}flow.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 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:r,sourceHandle:o,targetHandle:s})=>`Couldn't create edge for ${e} handle id: "${e==="source"?o:s}", edge id: ${r}.`,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.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},_i=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],lg=["Enter"," ","Escape"],ag={"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:r,y:o})=>`Moved selected node ${e}. New position, x: ${r}, y: ${o}`,"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 fo;(function(e){e.Strict="strict",e.Loose="loose"})(fo||(fo={}));var wr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(wr||(wr={}));var Ei;(function(e){e.Partial="partial",e.Full="full"})(Ei||(Ei={}));const ug={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Kn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Kn||(Kn={}));var bl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(bl||(bl={}));var ve;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ve||(ve={}));const rh={[ve.Left]:ve.Right,[ve.Right]:ve.Left,[ve.Top]:ve.Bottom,[ve.Bottom]:ve.Top};function cg(e){return e===null?null:e?"valid":"invalid"}const dg=e=>"id"in e&&"source"in e&&"target"in e,k2=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),$c=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),zi=(e,r=[0,0])=>{const{width:o,height:s}=_n(e),l=e.origin??r,u=o*l[0],c=s*l[1];return{x:e.position.x-u,y:e.position.y-c}},_2=(e,r={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const o=e.reduce((s,l)=>{const u=typeof l=="string";let c=!r.nodeLookup&&!u?l:void 0;r.nodeLookup&&(c=u?r.nodeLookup.get(l):$c(l)?l:r.nodeLookup.get(l.id));const f=c?Ml(c,r.nodeOrigin):{x:0,y:0,x2:0,y2:0};return $l(s,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Dl(o)},Ii=(e,r={})=>{let o={x:1/0,y:1/0,x2:-1/0,y2:-1/0},s=!1;return e.forEach(l=>{(r.filter===void 0||r.filter(l))&&(o=$l(o,Ml(l)),s=!0)}),s?Dl(o):{x:0,y:0,width:0,height:0}},Dc=(e,r,[o,s,l]=[0,0,1],u=!1,c=!1)=>{const f={...xo(r,[o,s,l]),width:r.width/l,height:r.height/l},h=[];for(const g of e.values()){const{measured:x,selectable:m=!0,hidden:y=!1}=g;if(c&&!m||y)continue;const w=x.width??g.width??g.initialWidth??null,_=x.height??g.height??g.initialHeight??null,C=Ni(f,ho(g)),S=(w??0)*(_??0),E=u&&C>0;(!g.internals.handleBounds||E||C>=S||g.dragging)&&h.push(g)}return h},E2=(e,r)=>{const o=new Set;return e.forEach(s=>{o.add(s.id)}),r.filter(s=>o.has(s.source)||o.has(s.target))};function N2(e,r){const o=new Map,s=r!=null&&r.nodes?new Set(r.nodes.map(l=>l.id)):null;return e.forEach(l=>{l.measured.width&&l.measured.height&&((r==null?void 0:r.includeHiddenNodes)||!l.hidden)&&(!s||s.has(l.id))&&o.set(l.id,l)}),o}async function C2({nodes:e,width:r,height:o,panZoom:s,minZoom:l,maxZoom:u},c){if(e.size===0)return!0;const f=N2(e,c),h=Ii(f),g=Fc(h,r,o,(c==null?void 0:c.minZoom)??l,(c==null?void 0:c.maxZoom)??u,(c==null?void 0:c.padding)??.1);return await s.setViewport(g,{duration:c==null?void 0:c.duration,ease:c==null?void 0:c.ease,interpolate:c==null?void 0:c.interpolate}),!0}function fg({nodeId:e,nextPosition:r,nodeLookup:o,nodeOrigin:s=[0,0],nodeExtent:l,onError:u}){const c=o.get(e),f=c.parentId?o.get(c.parentId):void 0,{x:h,y:g}=f?f.internals.positionAbsolute:{x:0,y:0},x=c.origin??s;let m=c.extent||l;if(c.extent==="parent"&&!c.expandParent)if(!f)u==null||u("005",Gt.error005());else{const w=f.measured.width,_=f.measured.height;w&&_&&(m=[[h,g],[h+w,g+_]])}else f&&Nr(c.extent)&&(m=[[c.extent[0][0]+h,c.extent[0][1]+g],[c.extent[1][0]+h,c.extent[1][1]+g]]);const y=Nr(m)?Er(r,m,c.measured):r;return(c.measured.width===void 0||c.measured.height===void 0)&&(u==null||u("015",Gt.error015())),{position:{x:y.x-h+(c.measured.width??0)*x[0],y:y.y-g+(c.measured.height??0)*x[1]},positionAbsolute:y}}async function b2({nodesToRemove:e=[],edgesToRemove:r=[],nodes:o,edges:s,onBeforeDelete:l}){const u=new Set(e.map(y=>y.id)),c=[];for(const y of o){if(y.deletable===!1)continue;const w=u.has(y.id),_=!w&&y.parentId&&c.find(C=>C.id===y.parentId);(w||_)&&c.push(y)}const f=new Set(r.map(y=>y.id)),h=s.filter(y=>y.deletable!==!1),x=E2(c,h);for(const y of h)f.has(y.id)&&!x.find(_=>_.id===y.id)&&x.push(y);if(!l)return{edges:x,nodes:c};const m=await l({nodes:c,edges:x});return typeof m=="boolean"?m?{edges:x,nodes:c}:{edges:[],nodes:[]}:m}const po=(e,r=0,o=1)=>Math.min(Math.max(e,r),o),Er=(e={x:0,y:0},r,o)=>({x:po(e.x,r[0][0],r[1][0]-((o==null?void 0:o.width)??0)),y:po(e.y,r[0][1],r[1][1]-((o==null?void 0:o.height)??0))});function pg(e,r,o){const{width:s,height:l}=_n(o),{x:u,y:c}=o.internals.positionAbsolute;return Er(e,[[u,c],[u+s,c+l]],r)}const oh=(e,r,o)=>e<r?po(Math.abs(e-r),1,r)/r:e>o?-po(Math.abs(e-o),1,r)/r:0,Oc=(e,r,o=15,s=40)=>{const l=oh(e.x,s,r.width-s)*o,u=oh(e.y,s,r.height-s)*o;return[l,u]},$l=(e,r)=>({x:Math.min(e.x,r.x),y:Math.min(e.y,r.y),x2:Math.max(e.x2,r.x2),y2:Math.max(e.y2,r.y2)}),xc=({x:e,y:r,width:o,height:s})=>({x:e,y:r,x2:e+o,y2:r+s}),Dl=({x:e,y:r,x2:o,y2:s})=>({x:e,y:r,width:o-e,height:s-r}),ho=(e,r=[0,0])=>{var l,u;const{x:o,y:s}=$c(e)?e.internals.positionAbsolute:zi(e,r);return{x:o,y:s,width:((l=e.measured)==null?void 0:l.width)??e.width??e.initialWidth??0,height:((u=e.measured)==null?void 0:u.height)??e.height??e.initialHeight??0}},Ml=(e,r=[0,0])=>{var l,u;const{x:o,y:s}=$c(e)?e.internals.positionAbsolute:zi(e,r);return{x:o,y:s,x2:o+(((l=e.measured)==null?void 0:l.width)??e.width??e.initialWidth??0),y2:s+(((u=e.measured)==null?void 0:u.height)??e.height??e.initialHeight??0)}},hg=(e,r)=>Dl($l(xc(e),xc(r))),Ni=(e,r)=>{const o=Math.max(0,Math.min(e.x+e.width,r.x+r.width)-Math.max(e.x,r.x)),s=Math.max(0,Math.min(e.y+e.height,r.y+r.height)-Math.max(e.y,r.y));return Math.ceil(o*s)},ih=e=>Yt(e.width)&&Yt(e.height)&&Yt(e.x)&&Yt(e.y),Yt=e=>!isNaN(e)&&isFinite(e),mg=(e,r)=>(o,s)=>{},Ri=(e,r=[1,1])=>({x:r[0]*Math.round(e.x/r[0]),y:r[1]*Math.round(e.y/r[1])}),xo=({x:e,y:r},[o,s,l],u=!1,c=[1,1])=>{const f={x:(e-o)/l,y:(r-s)/l};return u?Ri(f,c):f},mo=({x:e,y:r},[o,s,l])=>({x:e*l+o,y:r*l+s});function no(e,r){if(typeof e=="number")return Math.floor((r-r/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const o=parseFloat(e);if(!Number.isNaN(o))return Math.floor(o)}if(typeof e=="string"&&e.endsWith("%")){const o=parseFloat(e);if(!Number.isNaN(o))return Math.floor(r*o*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function M2(e,r,o){if(typeof e=="string"||typeof e=="number"){const s=no(e,o),l=no(e,r);return{top:s,right:l,bottom:s,left:l,x:l*2,y:s*2}}if(typeof e=="object"){const s=no(e.top??e.y??0,o),l=no(e.bottom??e.y??0,o),u=no(e.left??e.x??0,r),c=no(e.right??e.x??0,r);return{top:s,right:c,bottom:l,left:u,x:u+c,y:s+l}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function j2(e,r,o,s,l,u){const{x:c,y:f}=mo(e,[r,o,s]),{x:h,y:g}=mo({x:e.x+e.width,y:e.y+e.height},[r,o,s]),x=l-h,m=u-g;return{left:Math.floor(c),top:Math.floor(f),right:Math.floor(x),bottom:Math.floor(m)}}const Fc=(e,r,o,s,l,u)=>{const c=M2(u,r,o),f=(r-c.x)/e.width,h=(o-c.y)/e.height,g=Math.min(f,h),x=po(g,s,l),m=e.x+e.width/2,y=e.y+e.height/2,w=r/2-m*x,_=o/2-y*x,C=j2(e,w,_,x,r,o),S={left:Math.min(C.left-c.left,0),top:Math.min(C.top-c.top,0),right:Math.min(C.right-c.right,0),bottom:Math.min(C.bottom-c.bottom,0)};return{x:w-S.left+S.right,y:_-S.top+S.bottom,zoom:x}},Ci=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Nr(e){return e!=null&&e!=="parent"}function _n(e){var r,o;return{width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}}function gg(e){var r,o;return(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth)!==void 0&&(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight)!==void 0}function yg(e,r={width:0,height:0},o,s,l){const u={...e},c=s.get(o);if(c){const f=c.origin||l;u.x+=c.internals.positionAbsolute.x-(r.width??0)*f[0],u.y+=c.internals.positionAbsolute.y-(r.height??0)*f[1]}return u}function sh(e,r){if(e.size!==r.size)return!1;for(const o of e)if(!r.has(o))return!1;return!0}function P2(){let e,r;return{promise:new Promise((s,l)=>{e=s,r=l}),resolve:e,reject:r}}function z2(e){return{...ag,...e||{}}}function xi(e,{snapGrid:r=[0,0],snapToGrid:o=!1,transform:s,containerBounds:l}){const{x:u,y:c}=Xt(e),f=xo({x:u-((l==null?void 0:l.left)??0),y:c-((l==null?void 0:l.top)??0)},s),{x:h,y:g}=o?Ri(f,r):f;return{xSnapped:h,ySnapped:g,...f}}const Vc=e=>({width:e.offsetWidth,height:e.offsetHeight}),xg=e=>{var r;return((r=e==null?void 0:e.getRootNode)==null?void 0:r.call(e))||(window==null?void 0:window.document)},I2=["INPUT","SELECT","TEXTAREA"];function vg(e){var s,l;const r=((l=(s=e.composedPath)==null?void 0:s.call(e))==null?void 0:l[0])||e.target;return(r==null?void 0:r.nodeType)!==1?!1:I2.includes(r.nodeName)||r.hasAttribute("contenteditable")||!!r.closest(".nokey")}const wg=e=>"clientX"in e,Xt=(e,r)=>{var u,c;const o=wg(e),s=o?e.clientX:(u=e.touches)==null?void 0:u[0].clientX,l=o?e.clientY:(c=e.touches)==null?void 0:c[0].clientY;return{x:s-((r==null?void 0:r.left)??0),y:l-((r==null?void 0:r.top)??0)}},lh=(e,r,o,s,l)=>{const u=r.querySelectorAll(`.${e}`);return!u||!u.length?null:Array.from(u).map(c=>{const f=c.getBoundingClientRect();return{id:c.getAttribute("data-handleid"),type:e,nodeId:l,position:c.getAttribute("data-handlepos"),x:(f.left-o.left)/s,y:(f.top-o.top)/s,...Vc(c)}})};function Sg({sourceX:e,sourceY:r,targetX:o,targetY:s,sourceControlX:l,sourceControlY:u,targetControlX:c,targetControlY:f}){const h=e*.125+l*.375+c*.375+o*.125,g=r*.125+u*.375+f*.375+s*.125,x=Math.abs(h-e),m=Math.abs(g-r);return[h,g,x,m]}function sl(e,r){return e>=0?.5*e:r*25*Math.sqrt(-e)}function ah({pos:e,x1:r,y1:o,x2:s,y2:l,c:u}){switch(e){case ve.Left:return[r-sl(r-s,u),o];case ve.Right:return[r+sl(s-r,u),o];case ve.Top:return[r,o-sl(o-l,u)];case ve.Bottom:return[r,o+sl(l-o,u)]}}function kg({sourceX:e,sourceY:r,sourcePosition:o=ve.Bottom,targetX:s,targetY:l,targetPosition:u=ve.Top,curvature:c=.25}){const[f,h]=ah({pos:o,x1:e,y1:r,x2:s,y2:l,c}),[g,x]=ah({pos:u,x1:s,y1:l,x2:e,y2:r,c}),[m,y,w,_]=Sg({sourceX:e,sourceY:r,targetX:s,targetY:l,sourceControlX:f,sourceControlY:h,targetControlX:g,targetControlY:x});return[`M${e},${r} C${f},${h} ${g},${x} ${s},${l}`,m,y,w,_]}function _g({sourceX:e,sourceY:r,targetX:o,targetY:s}){const l=Math.abs(o-e)/2,u=o<e?o+l:o-l,c=Math.abs(s-r)/2,f=s<r?s+c:s-c;return[u,f,l,c]}function R2({sourceNode:e,targetNode:r,selected:o=!1,zIndex:s=0,elevateOnSelect:l=!1,zIndexMode:u="basic"}){if(u==="manual")return s;const c=l&&o?s+1e3:s,f=Math.max(e.parentId||l&&e.selected?e.internals.z:0,r.parentId||l&&r.selected?r.internals.z:0);return c+f}function T2({sourceNode:e,targetNode:r,width:o,height:s,transform:l}){const u=$l(Ml(e),Ml(r));u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c={x:-l[0]/l[2],y:-l[1]/l[2],width:o/l[2],height:s/l[2]};return Ni(c,Dl(u))>0}const A2=({source:e,sourceHandle:r,target:o,targetHandle:s})=>`xy-edge__${e}${r||""}-${o}${s||""}`,L2=(e,r)=>r.some(o=>o.source===e.source&&o.target===e.target&&(o.sourceHandle===e.sourceHandle||!o.sourceHandle&&!e.sourceHandle)&&(o.targetHandle===e.targetHandle||!o.targetHandle&&!e.targetHandle)),$2=(e,r,o={})=>{var u;if(!e.source||!e.target)return(u=o.onError)==null||u.call(o,"006",Gt.error006()),r;const s=o.getEdgeId||A2;let l;return dg(e)?l={...e}:l={...e,id:s(e)},L2(l,r)?r:(l.sourceHandle===null&&delete l.sourceHandle,l.targetHandle===null&&delete l.targetHandle,r.concat(l))};function Eg({sourceX:e,sourceY:r,targetX:o,targetY:s}){const[l,u,c,f]=_g({sourceX:e,sourceY:r,targetX:o,targetY:s});return[`M ${e},${r}L ${o},${s}`,l,u,c,f]}const uh={[ve.Left]:{x:-1,y:0},[ve.Right]:{x:1,y:0},[ve.Top]:{x:0,y:-1},[ve.Bottom]:{x:0,y:1}},D2=({source:e,sourcePosition:r=ve.Bottom,target:o})=>r===ve.Left||r===ve.Right?e.x<o.x?{x:1,y:0}:{x:-1,y:0}:e.y<o.y?{x:0,y:1}:{x:0,y:-1},ch=(e,r)=>Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2));function O2({source:e,sourcePosition:r=ve.Bottom,target:o,targetPosition:s=ve.Top,center:l,offset:u,stepPosition:c}){const f=uh[r],h=uh[s],g={x:e.x+f.x*u,y:e.y+f.y*u},x={x:o.x+h.x*u,y:o.y+h.y*u},m=D2({source:g,sourcePosition:r,target:x}),y=m.x!==0?"x":"y",w=m[y];let _=[],C,S;const E={x:0,y:0},P={x:0,y:0},[,,N,M]=_g({sourceX:e.x,sourceY:e.y,targetX:o.x,targetY:o.y});if(f[y]*h[y]===-1){y==="x"?(C=l.x??g.x+(x.x-g.x)*c,S=l.y??(g.y+x.y)/2):(C=l.x??(g.x+x.x)/2,S=l.y??g.y+(x.y-g.y)*c);const G=[{x:C,y:g.y},{x:C,y:x.y}],K=[{x:g.x,y:S},{x:x.x,y:S}];f[y]===w?_=y==="x"?G:K:_=y==="x"?K:G}else{const G=[{x:g.x,y:x.y}],K=[{x:x.x,y:g.y}];if(y==="x"?_=f.x===w?K:G:_=f.y===w?G:K,r===s){const z=Math.abs(e[y]-o[y]);if(z<=u){const Y=Math.min(u-1,u-z);f[y]===w?E[y]=(g[y]>e[y]?-1:1)*Y:P[y]=(x[y]>o[y]?-1:1)*Y}}if(r!==s){const z=y==="x"?"y":"x",Y=f[y]===h[z],F=g[z]>x[z],U=g[z]<x[z];(f[y]===1&&(!Y&&F||Y&&U)||f[y]!==1&&(!Y&&U||Y&&F))&&(_=y==="x"?G:K)}const te={x:g.x+E.x,y:g.y+E.y},O={x:x.x+P.x,y:x.y+P.y},V=Math.max(Math.abs(te.x-_[0].x),Math.abs(O.x-_[0].x)),ee=Math.max(Math.abs(te.y-_[0].y),Math.abs(O.y-_[0].y));V>=ee?(C=(te.x+O.x)/2,S=_[0].y):(C=_[0].x,S=(te.y+O.y)/2)}const $={x:g.x+E.x,y:g.y+E.y},D={x:x.x+P.x,y:x.y+P.y};return[[e,...$.x!==_[0].x||$.y!==_[0].y?[$]:[],..._,...D.x!==_[_.length-1].x||D.y!==_[_.length-1].y?[D]:[],o],C,S,N,M]}function F2(e,r,o,s){const l=Math.min(ch(e,r)/2,ch(r,o)/2,s),{x:u,y:c}=r;if(e.x===u&&u===o.x||e.y===c&&c===o.y)return`L${u} ${c}`;if(e.y===c){const g=e.x<o.x?-1:1,x=e.y<o.y?1:-1;return`L ${u+l*g},${c}Q ${u},${c} ${u},${c+l*x}`}const f=e.x<o.x?1:-1,h=e.y<o.y?-1:1;return`L ${u},${c+l*h}Q ${u},${c} ${u+l*f},${c}`}function vc({sourceX:e,sourceY:r,sourcePosition:o=ve.Bottom,targetX:s,targetY:l,targetPosition:u=ve.Top,borderRadius:c=5,centerX:f,centerY:h,offset:g=20,stepPosition:x=.5}){const[m,y,w,_,C]=O2({source:{x:e,y:r},sourcePosition:o,target:{x:s,y:l},targetPosition:u,center:{x:f,y:h},offset:g,stepPosition:x});let S=`M${m[0].x} ${m[0].y}`;for(let E=1;E<m.length-1;E++)S+=F2(m[E-1],m[E],m[E+1],c);return S+=`L${m[m.length-1].x} ${m[m.length-1].y}`,[S,y,w,_,C]}function dh(e){var r;return e&&!!(e.internals.handleBounds||(r=e.handles)!=null&&r.length)&&!!(e.measured.width||e.width||e.initialWidth)}function V2(e){var m;const{sourceNode:r,targetNode:o}=e;if(!dh(r)||!dh(o))return null;const s=r.internals.handleBounds||fh(r.handles),l=o.internals.handleBounds||fh(o.handles),u=ph((s==null?void 0:s.source)??[],e.sourceHandle),c=ph(e.connectionMode===fo.Strict?(l==null?void 0:l.target)??[]:((l==null?void 0:l.target)??[]).concat((l==null?void 0:l.source)??[]),e.targetHandle);if(!u||!c)return(m=e.onError)==null||m.call(e,"008",Gt.error008(u?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const f=(u==null?void 0:u.position)||ve.Bottom,h=(c==null?void 0:c.position)||ve.Top,g=Cr(r,u,f),x=Cr(o,c,h);return{sourceX:g.x,sourceY:g.y,targetX:x.x,targetY:x.y,sourcePosition:f,targetPosition:h}}function fh(e){if(!e)return null;const r=[],o=[];for(const s of e)s.width=s.width??1,s.height=s.height??1,s.type==="source"?r.push(s):s.type==="target"&&o.push(s);return{source:r,target:o}}function Cr(e,r,o=ve.Left,s=!1){const l=((r==null?void 0:r.x)??0)+e.internals.positionAbsolute.x,u=((r==null?void 0:r.y)??0)+e.internals.positionAbsolute.y,{width:c,height:f}=r??_n(e);if(s)return{x:l+c/2,y:u+f/2};switch((r==null?void 0:r.position)??o){case ve.Top:return{x:l+c/2,y:u};case ve.Right:return{x:l+c,y:u+f/2};case ve.Bottom:return{x:l+c/2,y:u+f};case ve.Left:return{x:l,y:u+f/2}}}function ph(e,r){return e&&(r?e.find(o=>o.id===r):e[0])||null}function wc(e,r){return e?typeof e=="string"?e:`${r?`${r}__`:""}${Object.keys(e).sort().map(s=>`${s}=${e[s]}`).join("&")}`:""}function B2(e,{id:r,defaultColor:o,defaultMarkerStart:s,defaultMarkerEnd:l}){const u=new Set;return e.reduce((c,f)=>([f.markerStart||s,f.markerEnd||l].forEach(h=>{if(h&&typeof h=="object"){const g=wc(h,r);u.has(g)||(c.push({id:g,color:h.color||o,...h}),u.add(g))}}),c),[]).sort((c,f)=>c.id.localeCompare(f.id))}const Ng=1e3,H2=10,Bc={nodeOrigin:[0,0],nodeExtent:_i,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},W2={...Bc,checkEquality:!0};function Hc(e,r){const o={...e};for(const s in r)r[s]!==void 0&&(o[s]=r[s]);return o}function U2(e,r,o){const s=Hc(Bc,o);for(const l of e.values())if(l.parentId)Uc(l,e,r,s);else{const u=zi(l,s.nodeOrigin),c=Nr(l.extent)?l.extent:s.nodeExtent,f=Er(u,c,_n(l));l.internals.positionAbsolute=f}}function Y2(e,r){if(!e.handles)return e.measured?r==null?void 0:r.internals.handleBounds:void 0;const o=[],s=[];for(const l of e.handles){const u={id:l.id,width:l.width??1,height:l.height??1,nodeId:e.id,x:l.x,y:l.y,position:l.position,type:l.type};l.type==="source"?o.push(u):l.type==="target"&&s.push(u)}return{source:o,target:s}}function Wc(e){return e==="manual"}function Sc(e,r,o,s={}){var x,m;const l=Hc(W2,s),u={i:0},c=new Map(r),f=l!=null&&l.elevateNodesOnSelect&&!Wc(l.zIndexMode)?Ng:0;let h=e.length>0,g=!1;r.clear(),o.clear();for(const y of e){let w=c.get(y.id);if(l.checkEquality&&y===(w==null?void 0:w.internals.userNode))r.set(y.id,w);else{const _=zi(y,l.nodeOrigin),C=Nr(y.extent)?y.extent:l.nodeExtent,S=Er(_,C,_n(y));w={...l.defaults,...y,measured:{width:(x=y.measured)==null?void 0:x.width,height:(m=y.measured)==null?void 0:m.height},internals:{positionAbsolute:S,handleBounds:Y2(y,w),z:Cg(y,f,l.zIndexMode),userNode:y}},r.set(y.id,w)}(w.measured===void 0||w.measured.width===void 0||w.measured.height===void 0)&&!w.hidden&&(h=!1),y.parentId&&Uc(w,r,o,s,u),g||(g=y.selected??!1)}return{nodesInitialized:h,hasSelectedNodes:g}}function X2(e,r){if(!e.parentId)return;const o=r.get(e.parentId);o?o.set(e.id,e):r.set(e.parentId,new Map([[e.id,e]]))}function Uc(e,r,o,s,l){const{elevateNodesOnSelect:u,nodeOrigin:c,nodeExtent:f,zIndexMode:h}=Hc(Bc,s),g=e.parentId,x=r.get(g);if(!x){console.warn(`Parent node ${g} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}X2(e,o),l&&!x.parentId&&x.internals.rootParentIndex===void 0&&h==="auto"&&(x.internals.rootParentIndex=++l.i,x.internals.z=x.internals.z+l.i*H2),l&&x.internals.rootParentIndex!==void 0&&(l.i=x.internals.rootParentIndex);const m=u&&!Wc(h)?Ng:0,{x:y,y:w,z:_}=G2(e,x,c,f,m,h),{positionAbsolute:C}=e.internals,S=y!==C.x||w!==C.y;(S||_!==e.internals.z)&&r.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:y,y:w}:C,z:_}})}function Cg(e,r,o){const s=Yt(e.zIndex)?e.zIndex:0;return Wc(o)?s:s+(e.selected?r:0)}function G2(e,r,o,s,l,u){const{x:c,y:f}=r.internals.positionAbsolute,h=_n(e),g=zi(e,o),x=Nr(e.extent)?Er(g,e.extent,h):g;let m=Er({x:c+x.x,y:f+x.y},s,h);e.extent==="parent"&&(m=pg(m,h,r));const y=Cg(e,l,u),w=r.internals.z??0;return{x:m.x,y:m.y,z:w>=y?w+1:y}}function Yc(e,r,o,s=[0,0]){var c;const l=[],u=new Map;for(const f of e){const h=r.get(f.parentId);if(!h)continue;const g=((c=u.get(f.parentId))==null?void 0:c.expandedRect)??ho(h),x=hg(g,f.rect);u.set(f.parentId,{expandedRect:x,parent:h})}return u.size>0&&u.forEach(({expandedRect:f,parent:h},g)=>{var N;const x=h.internals.positionAbsolute,m=_n(h),y=h.origin??s,w=f.x<x.x?Math.round(Math.abs(x.x-f.x)):0,_=f.y<x.y?Math.round(Math.abs(x.y-f.y)):0,C=Math.max(m.width,Math.round(f.width)),S=Math.max(m.height,Math.round(f.height)),E=(C-m.width)*y[0],P=(S-m.height)*y[1];(w>0||_>0||E||P)&&(l.push({id:g,type:"position",position:{x:h.position.x-w+E,y:h.position.y-_+P}}),(N=o.get(g))==null||N.forEach(M=>{e.some($=>$.id===M.id)||l.push({id:M.id,type:"position",position:{x:M.position.x+w,y:M.position.y+_}})})),(m.width<f.width||m.height<f.height||w||_)&&l.push({id:g,type:"dimensions",setAttributes:!0,dimensions:{width:C+(w?y[0]*w-E:0),height:S+(_?y[1]*_-P:0)}})}),l}function K2(e,r,o,s,l,u,c){const f=s==null?void 0:s.querySelector(".xyflow__viewport");let h=!1;if(!f)return{changes:[],updatedInternals:h};const g=[],x=window.getComputedStyle(f),{m22:m}=new window.DOMMatrixReadOnly(x.transform),y=[];for(const w of e.values()){const _=r.get(w.id);if(!_)continue;if(_.hidden){r.set(_.id,{..._,internals:{..._.internals,handleBounds:void 0}}),h=!0;continue}const C=Vc(w.nodeElement),S=_.measured.width!==C.width||_.measured.height!==C.height;if(!!(C.width&&C.height&&(S||!_.internals.handleBounds||w.force))){const P=w.nodeElement.getBoundingClientRect(),N=Nr(_.extent)?_.extent:u;let{positionAbsolute:M}=_.internals;_.parentId&&_.extent==="parent"?M=pg(M,C,r.get(_.parentId)):N&&(M=Er(M,N,C));const $={..._,measured:C,internals:{..._.internals,positionAbsolute:M,handleBounds:{source:lh("source",w.nodeElement,P,m,_.id),target:lh("target",w.nodeElement,P,m,_.id)}}};r.set(_.id,$),_.parentId&&Uc($,r,o,{nodeOrigin:l,zIndexMode:c}),h=!0,S&&(g.push({id:_.id,type:"dimensions",dimensions:C}),_.expandParent&&_.parentId&&y.push({id:_.id,parentId:_.parentId,rect:ho($,l)}))}}if(y.length>0){const w=Yc(y,r,o,l);g.push(...w)}return{changes:g,updatedInternals:h}}async function q2({delta:e,panZoom:r,transform:o,translateExtent:s,width:l,height:u}){if(!r||!e.x&&!e.y)return!1;const c=await r.setViewportConstrained({x:o[0]+e.x,y:o[1]+e.y,zoom:o[2]},[[0,0],[l,u]],s);return!!c&&(c.x!==o[0]||c.y!==o[1]||c.k!==o[2])}function hh(e,r,o,s,l,u){let c=l;const f=s.get(c)||new Map;s.set(c,f.set(o,r)),c=`${l}-${e}`;const h=s.get(c)||new Map;if(s.set(c,h.set(o,r)),u){c=`${l}-${e}-${u}`;const g=s.get(c)||new Map;s.set(c,g.set(o,r))}}function bg(e,r,o){e.clear(),r.clear();for(const s of o){const{source:l,target:u,sourceHandle:c=null,targetHandle:f=null}=s,h={edgeId:s.id,source:l,target:u,sourceHandle:c,targetHandle:f},g=`${l}-${c}--${u}-${f}`,x=`${u}-${f}--${l}-${c}`;hh("source",h,x,e,l,c),hh("target",h,g,e,u,f),r.set(s.id,s)}}function Mg(e,r){if(!e.parentId)return!1;const o=r.get(e.parentId);return o?o.selected?!0:Mg(o,r):!1}function mh(e,r,o){var l;let s=e;do{if((l=s==null?void 0:s.matches)!=null&&l.call(s,r))return!0;if(s===o)return!1;s=s==null?void 0:s.parentElement}while(s);return!1}function Q2(e,r,o,s){const l=new Map;for(const[u,c]of e)if((c.selected||c.id===s)&&(!c.parentId||!Mg(c,e))&&(c.draggable||r&&typeof c.draggable>"u")){const f=e.get(u);f&&l.set(u,{id:u,position:f.position||{x:0,y:0},distance:{x:o.x-f.internals.positionAbsolute.x,y:o.y-f.internals.positionAbsolute.y},extent:f.extent,parentId:f.parentId,origin:f.origin,expandParent:f.expandParent,internals:{positionAbsolute:f.internals.positionAbsolute||{x:0,y:0}},measured:{width:f.measured.width??0,height:f.measured.height??0}})}return l}function Gu({nodeId:e,dragItems:r,nodeLookup:o,dragging:s=!0}){var c,f,h;const l=[];for(const[g,x]of r){const m=(c=o.get(g))==null?void 0:c.internals.userNode;m&&l.push({...m,position:x.position,dragging:s})}if(!e)return[l[0],l];const u=(f=o.get(e))==null?void 0:f.internals.userNode;return[u?{...u,position:((h=r.get(e))==null?void 0:h.position)||u.position,dragging:s}:l[0],l]}function Z2({dragItems:e,snapGrid:r,x:o,y:s}){const l=e.values().next().value;if(!l)return null;const u={x:o-l.distance.x,y:s-l.distance.y},c=Ri(u,r);return{x:c.x-u.x,y:c.y-u.y}}function J2({onNodeMouseDown:e,getStoreItems:r,onDragStart:o,onDrag:s,onDragStop:l}){let u={x:null,y:null},c=0,f=new Map,h=!1,g={x:0,y:0},x=null,m=!1,y=null,w=!1,_=!1,C=null;function S({noDragClassName:P,handleSelector:N,domNode:M,isSelectable:$,nodeId:D,nodeClickDistance:H=0}){y=Mt(M);function G({x:V,y:ee}){const{nodeLookup:z,nodeExtent:Y,snapGrid:F,snapToGrid:U,nodeOrigin:A,onNodeDrag:T,onSelectionDrag:W,onError:b,updateNodePositions:j}=r();u={x:V,y:ee};let J=!1;const ne=f.size>1,ae=ne&&Y?xc(Ii(f)):null,ce=ne&&U?Z2({dragItems:f,snapGrid:F,x:V,y:ee}):null;for(const[ue,Z]of f){if(!z.has(ue))continue;let se={x:V-Z.distance.x,y:ee-Z.distance.y};U&&(se=ce?{x:Math.round(se.x+ce.x),y:Math.round(se.y+ce.y)}:Ri(se,F));let me=null;if(ne&&Y&&!Z.extent&&ae){const{positionAbsolute:ge}=Z.internals,Ee=ge.x-ae.x+Y[0][0],Me=ge.x+Z.measured.width-ae.x2+Y[1][0],ze=ge.y-ae.y+Y[0][1],Te=ge.y+Z.measured.height-ae.y2+Y[1][1];me=[[Ee,ze],[Me,Te]]}const{position:we,positionAbsolute:xe}=fg({nodeId:ue,nextPosition:se,nodeLookup:z,nodeExtent:me||Y,nodeOrigin:A,onError:b});J=J||Z.position.x!==we.x||Z.position.y!==we.y,Z.position=we,Z.internals.positionAbsolute=xe}if(_=_||J,!!J&&(j(f,!0),C&&(s||T||!D&&W))){const[ue,Z]=Gu({nodeId:D,dragItems:f,nodeLookup:z});s==null||s(C,f,ue,Z),T==null||T(C,ue,Z),D||W==null||W(C,Z)}}async function K(){if(!x)return;const{transform:V,panBy:ee,autoPanSpeed:z,autoPanOnNodeDrag:Y}=r();if(!Y){h=!1,cancelAnimationFrame(c);return}const[F,U]=Oc(g,x,z);(F!==0||U!==0)&&(u.x=(u.x??0)-F/V[2],u.y=(u.y??0)-U/V[2],await ee({x:F,y:U})&&G(u)),c=requestAnimationFrame(K)}function te(V){var ne;const{nodeLookup:ee,multiSelectionActive:z,nodesDraggable:Y,transform:F,snapGrid:U,snapToGrid:A,selectNodesOnDrag:T,onNodeDragStart:W,onSelectionDragStart:b,unselectNodesAndEdges:j}=r();m=!0,(!T||!$)&&!z&&D&&((ne=ee.get(D))!=null&&ne.selected||j()),$&&T&&D&&(e==null||e(D));const J=xi(V.sourceEvent,{transform:F,snapGrid:U,snapToGrid:A,containerBounds:x});if(u=J,f=Q2(ee,Y,J,D),f.size>0&&(o||W||!D&&b)){const[ae,ce]=Gu({nodeId:D,dragItems:f,nodeLookup:ee});o==null||o(V.sourceEvent,f,ae,ce),W==null||W(V.sourceEvent,ae,ce),D||b==null||b(V.sourceEvent,ce)}}const O=Um().clickDistance(H).on("start",V=>{const{domNode:ee,nodeDragThreshold:z,transform:Y,snapGrid:F,snapToGrid:U}=r();x=(ee==null?void 0:ee.getBoundingClientRect())||null,w=!1,_=!1,C=V.sourceEvent,z===0&&te(V),u=xi(V.sourceEvent,{transform:Y,snapGrid:F,snapToGrid:U,containerBounds:x}),g=Xt(V.sourceEvent,x)}).on("drag",V=>{const{autoPanOnNodeDrag:ee,transform:z,snapGrid:Y,snapToGrid:F,nodeDragThreshold:U,nodeLookup:A}=r(),T=xi(V.sourceEvent,{transform:z,snapGrid:Y,snapToGrid:F,containerBounds:x});if(C=V.sourceEvent,(V.sourceEvent.type==="touchmove"&&V.sourceEvent.touches.length>1||D&&!A.has(D))&&(w=!0),!w){if(!h&&ee&&m&&(h=!0,K()),!m){const W=Xt(V.sourceEvent,x),b=W.x-g.x,j=W.y-g.y;Math.sqrt(b*b+j*j)>U&&te(V)}(u.x!==T.xSnapped||u.y!==T.ySnapped)&&f&&m&&(g=Xt(V.sourceEvent,x),G(T))}}).on("end",V=>{if(!m||w){w&&f.size>0&&r().updateNodePositions(f,!1);return}if(h=!1,m=!1,cancelAnimationFrame(c),f.size>0){const{nodeLookup:ee,updateNodePositions:z,onNodeDragStop:Y,onSelectionDragStop:F}=r();if(_&&(z(f,!1),_=!1),l||Y||!D&&F){const[U,A]=Gu({nodeId:D,dragItems:f,nodeLookup:ee,dragging:!1});l==null||l(V.sourceEvent,f,U,A),Y==null||Y(V.sourceEvent,U,A),D||F==null||F(V.sourceEvent,A)}}}).filter(V=>{const ee=V.target;return!V.button&&(!P||!mh(ee,`.${P}`,M))&&(!N||mh(ee,N,M))});y.call(O)}function E(){y==null||y.on(".drag",null)}return{update:S,destroy:E}}function ek(e,r,o){const s=[],l={x:e.x-o,y:e.y-o,width:o*2,height:o*2};for(const u of r.values())Ni(l,ho(u))>0&&s.push(u);return s}const tk=250;function nk(e,r,o,s){var f,h;let l=[],u=1/0;const c=ek(e,o,r+tk);for(const g of c){const x=[...((f=g.internals.handleBounds)==null?void 0:f.source)??[],...((h=g.internals.handleBounds)==null?void 0:h.target)??[]];for(const m of x){if(s.nodeId===m.nodeId&&s.type===m.type&&s.id===m.id)continue;const{x:y,y:w}=Cr(g,m,m.position,!0),_=Math.sqrt(Math.pow(y-e.x,2)+Math.pow(w-e.y,2));_>r||(_<u?(l=[{...m,x:y,y:w}],u=_):_===u&&l.push({...m,x:y,y:w}))}}if(!l.length)return null;if(l.length>1){const g=s.type==="source"?"target":"source";return l.find(x=>x.type===g)??l[0]}return l[0]}function jg(e,r,o,s,l,u=!1){var g,x,m;const c=s.get(e);if(!c)return null;const f=l==="strict"?(g=c.internals.handleBounds)==null?void 0:g[r]:[...((x=c.internals.handleBounds)==null?void 0:x.source)??[],...((m=c.internals.handleBounds)==null?void 0:m.target)??[]],h=(o?f==null?void 0:f.find(y=>y.id===o):f==null?void 0:f[0])??null;return h&&u?{...h,...Cr(c,h,h.position,!0)}:h}function Pg(e,r){return e||(r!=null&&r.classList.contains("target")?"target":r!=null&&r.classList.contains("source")?"source":null)}function rk(e,r){let o=null;return r?o=!0:e&&!r&&(o=!1),o}const zg=()=>!0;function ok(e,{connectionMode:r,connectionRadius:o,handleId:s,nodeId:l,edgeUpdaterType:u,isTarget:c,domNode:f,nodeLookup:h,lib:g,autoPanOnConnect:x,flowId:m,panBy:y,cancelConnection:w,onConnectStart:_,onConnect:C,onConnectEnd:S,isValidConnection:E=zg,onReconnectEnd:P,updateConnection:N,getTransform:M,getFromHandle:$,autoPanSpeed:D,dragThreshold:H=1,handleDomNode:G}){const K=xg(e.target);let te=0,O;const{x:V,y:ee}=Xt(e),z=Pg(u,G),Y=f==null?void 0:f.getBoundingClientRect();let F=!1;if(!Y||!z)return;const U=jg(l,z,s,h,r);if(!U)return;let A=Xt(e,Y),T=!1,W=null,b=!1,j=null;function J(){if(!x||!Y)return;const[we,xe]=Oc(A,Y,D);y({x:we,y:xe}),te=requestAnimationFrame(J)}const ne={...U,nodeId:l,type:z,position:U.position},ae=h.get(l);let ue={inProgress:!0,isValid:null,from:Cr(ae,ne,ve.Left,!0),fromHandle:ne,fromPosition:ne.position,fromNode:ae,to:A,toHandle:null,toPosition:rh[ne.position],toNode:null,pointer:A};function Z(){F=!0,N(ue),_==null||_(e,{nodeId:l,handleId:s,handleType:z})}H===0&&Z();function se(we){if(!F){const{x:Te,y:ut}=Xt(we),ft=Te-V,rt=ut-ee;if(!(ft*ft+rt*rt>H*H))return;Z()}if(!$()||!ne){me(we);return}const xe=M();A=Xt(we,Y),O=nk(xo(A,xe,!1,[1,1]),o,h,ne),T||(J(),T=!0);const ge=Ig(we,{handle:O,connectionMode:r,fromNodeId:l,fromHandleId:s,fromType:c?"target":"source",isValidConnection:E,doc:K,lib:g,flowId:m,nodeLookup:h});j=ge.handleDomNode,W=ge.connection,b=rk(!!O,ge.isValid);const Ee=h.get(l),Me=Ee?Cr(Ee,ne,ve.Left,!0):ue.from,ze={...ue,from:Me,isValid:b,to:ge.toHandle&&b?mo({x:ge.toHandle.x,y:ge.toHandle.y},xe):A,toHandle:ge.toHandle,toPosition:b&&ge.toHandle?ge.toHandle.position:rh[ne.position],toNode:ge.toHandle?h.get(ge.toHandle.nodeId):null,pointer:A};N(ze),ue=ze}function me(we){if(!("touches"in we&&we.touches.length>0)){if(F){(O||j)&&W&&b&&(C==null||C(W));const{inProgress:xe,...ge}=ue,Ee={...ge,toPosition:ue.toHandle?ue.toPosition:null};S==null||S(we,Ee),u&&(P==null||P(we,Ee))}w(),cancelAnimationFrame(te),T=!1,b=!1,W=null,j=null,K.removeEventListener("mousemove",se),K.removeEventListener("mouseup",me),K.removeEventListener("touchmove",se),K.removeEventListener("touchend",me)}}K.addEventListener("mousemove",se),K.addEventListener("mouseup",me),K.addEventListener("touchmove",se),K.addEventListener("touchend",me)}function Ig(e,{handle:r,connectionMode:o,fromNodeId:s,fromHandleId:l,fromType:u,doc:c,lib:f,flowId:h,isValidConnection:g=zg,nodeLookup:x}){const m=u==="target",y=r?c.querySelector(`.${f}-flow__handle[data-id="${h}-${r==null?void 0:r.nodeId}-${r==null?void 0:r.id}-${r==null?void 0:r.type}"]`):null,{x:w,y:_}=Xt(e),C=c.elementFromPoint(w,_),S=C!=null&&C.classList.contains(`${f}-flow__handle`)?C:y,E={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const P=Pg(void 0,S),N=S.getAttribute("data-nodeid"),M=S.getAttribute("data-handleid"),$=S.classList.contains("connectable"),D=S.classList.contains("connectableend");if(!N||!P)return E;const H={source:m?N:s,sourceHandle:m?M:l,target:m?s:N,targetHandle:m?l:M};E.connection=H;const K=$&&D&&(o===fo.Strict?m&&P==="source"||!m&&P==="target":N!==s||M!==l);E.isValid=K&&g(H),E.toHandle=jg(N,P,M,x,o,!0)}return E}const kc={onPointerDown:ok,isValid:Ig};function ik({domNode:e,panZoom:r,getTransform:o,getViewScale:s}){const l=Mt(e);function u({translateExtent:f,width:h,height:g,zoomStep:x=1,pannable:m=!0,zoomable:y=!0,inversePan:w=!1}){const _=N=>{if(N.sourceEvent.type!=="wheel"||!r)return;const M=o(),$=N.sourceEvent.ctrlKey&&Ci()?10:1,D=-N.sourceEvent.deltaY*(N.sourceEvent.deltaMode===1?.05:N.sourceEvent.deltaMode?1:.002)*x,H=M[2]*Math.pow(2,D*$);r.scaleTo(H)};let C=[0,0];const S=N=>{(N.sourceEvent.type==="mousedown"||N.sourceEvent.type==="touchstart")&&(C=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY])},E=N=>{const M=o();if(N.sourceEvent.type!=="mousemove"&&N.sourceEvent.type!=="touchmove"||!r)return;const $=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY],D=[$[0]-C[0],$[1]-C[1]];C=$;const H=s()*Math.max(M[2],Math.log(M[2]))*(w?-1:1),G={x:M[0]-D[0]*H,y:M[1]-D[1]*H},K=[[0,0],[h,g]];r.setViewportConstrained({x:G.x,y:G.y,zoom:M[2]},K,f)},P=sg().on("start",S).on("zoom",m?E:null).on("zoom.wheel",y?_:null);l.call(P,{})}function c(){l.on("zoom",null)}return{update:u,destroy:c,pointer:Wt}}const Ol=e=>({x:e.x,y:e.y,zoom:e.k}),Ku=({x:e,y:r,zoom:o})=>Ll.translate(e,r).scale(o),ro=(e,r)=>e.target.closest(`.${r}`),Rg=(e,r)=>r===2&&Array.isArray(e)&&e.includes(2),sk=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,qu=(e,r=0,o=sk,s=()=>{})=>{const l=typeof r=="number"&&r>0;return l||s(),l?e.transition().duration(r).ease(o).on("end",s):e},Tg=e=>{const r=e.ctrlKey&&Ci()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*r};function lk({zoomPanValues:e,noWheelClassName:r,d3Selection:o,d3Zoom:s,panOnScrollMode:l,panOnScrollSpeed:u,zoomOnPinch:c,onPanZoomStart:f,onPanZoom:h,onPanZoomEnd:g}){return x=>{if(ro(x,r))return x.ctrlKey&&x.preventDefault(),!1;x.preventDefault(),x.stopImmediatePropagation();const m=o.property("__zoom").k||1;if(x.ctrlKey&&c){const S=Wt(x),E=Tg(x),P=m*Math.pow(2,E);s.scaleTo(o,P,S,x);return}const y=x.deltaMode===1?20:1;let w=l===wr.Vertical?0:x.deltaX*y,_=l===wr.Horizontal?0:x.deltaY*y;!Ci()&&x.shiftKey&&l!==wr.Vertical&&(w=x.deltaY*y,_=0),s.translateBy(o,-(w/m)*u,-(_/m)*u,{internal:!0});const C=Ol(o.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(h==null||h(x,C),e.panScrollTimeout=setTimeout(()=>{g==null||g(x,C),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,f==null||f(x,C))}}function ak({noWheelClassName:e,preventScrolling:r,d3ZoomHandler:o}){return function(s,l){const u=s.type==="wheel",c=!r&&u&&!s.ctrlKey,f=ro(s,e);if(s.ctrlKey&&u&&f&&s.preventDefault(),c||f)return null;s.preventDefault(),o.call(this,s,l)}}function uk({zoomPanValues:e,onDraggingChange:r,onPanZoomStart:o}){return s=>{var u,c,f;if((u=s.sourceEvent)!=null&&u.internal)return;const l=Ol(s.transform);e.mouseButton=((c=s.sourceEvent)==null?void 0:c.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=l,((f=s.sourceEvent)==null?void 0:f.type)==="mousedown"&&r(!0),o&&(o==null||o(s.sourceEvent,l))}}function ck({zoomPanValues:e,panOnDrag:r,onPaneContextMenu:o,onTransformChange:s,onPanZoom:l}){return u=>{var c,f;e.usedRightMouseButton=!!(o&&Rg(r,e.mouseButton??0)),(c=u.sourceEvent)!=null&&c.sync||s([u.transform.x,u.transform.y,u.transform.k]),l&&!((f=u.sourceEvent)!=null&&f.internal)&&(l==null||l(u.sourceEvent,Ol(u.transform)))}}function dk({zoomPanValues:e,panOnDrag:r,panOnScroll:o,onDraggingChange:s,onPanZoomEnd:l,onPaneContextMenu:u}){return c=>{var f;if(!((f=c.sourceEvent)!=null&&f.internal)&&(e.isZoomingOrPanning=!1,u&&Rg(r,e.mouseButton??0)&&!e.usedRightMouseButton&&c.sourceEvent&&u(c.sourceEvent),e.usedRightMouseButton=!1,s(!1),l)){const h=Ol(c.transform);e.prevViewport=h,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{l==null||l(c.sourceEvent,h)},o?150:0)}}}function fk({zoomActivationKeyPressed:e,zoomOnScroll:r,zoomOnPinch:o,panOnDrag:s,panOnScroll:l,zoomOnDoubleClick:u,userSelectionActive:c,noWheelClassName:f,noPanClassName:h,lib:g,connectionInProgress:x}){return m=>{var S;const y=e||r,w=o&&m.ctrlKey,_=m.type==="wheel";if(m.button===1&&m.type==="mousedown"&&(ro(m,`${g}-flow__node`)||ro(m,`${g}-flow__edge`)))return!0;if(!s&&!y&&!l&&!u&&!o||c||x&&!_||ro(m,f)&&_||ro(m,h)&&(!_||l&&_&&!e)||!o&&m.ctrlKey&&_)return!1;if(!o&&m.type==="touchstart"&&((S=m.touches)==null?void 0:S.length)>1)return m.preventDefault(),!1;if(!y&&!l&&!w&&_||!s&&(m.type==="mousedown"||m.type==="touchstart")||Array.isArray(s)&&!s.includes(m.button)&&m.type==="mousedown")return!1;const C=Array.isArray(s)&&s.includes(m.button)||!m.button||m.button<=1;return(!m.ctrlKey||_)&&C}}function pk({domNode:e,minZoom:r,maxZoom:o,translateExtent:s,viewport:l,onPanZoom:u,onPanZoomStart:c,onPanZoomEnd:f,onDraggingChange:h}){const g={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},x=e.getBoundingClientRect(),m=sg().scaleExtent([r,o]).translateExtent(s),y=Mt(e).call(m);P({x:l.x,y:l.y,zoom:po(l.zoom,r,o)},[[0,0],[x.width,x.height]],s);const w=y.on("wheel.zoom"),_=y.on("dblclick.zoom");m.wheelDelta(Tg);async function C(O,V){return y?new Promise(ee=>{m==null||m.interpolate((V==null?void 0:V.interpolate)==="linear"?yi:ml).transform(qu(y,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>ee(!0)),O)}):!1}function S({noWheelClassName:O,noPanClassName:V,onPaneContextMenu:ee,userSelectionActive:z,panOnScroll:Y,panOnDrag:F,panOnScrollMode:U,panOnScrollSpeed:A,preventScrolling:T,zoomOnPinch:W,zoomOnScroll:b,zoomOnDoubleClick:j,zoomActivationKeyPressed:J,lib:ne,onTransformChange:ae,connectionInProgress:ce,paneClickDistance:ue,selectionOnDrag:Z}){z&&!g.isZoomingOrPanning&&E();const se=Y&&!J&&!z;m.clickDistance(Z?1/0:!Yt(ue)||ue<0?0:ue);const me=se?lk({zoomPanValues:g,noWheelClassName:O,d3Selection:y,d3Zoom:m,panOnScrollMode:U,panOnScrollSpeed:A,zoomOnPinch:W,onPanZoomStart:c,onPanZoom:u,onPanZoomEnd:f}):ak({noWheelClassName:O,preventScrolling:T,d3ZoomHandler:w});y.on("wheel.zoom",me,{passive:!1});const we=uk({zoomPanValues:g,onDraggingChange:h,onPanZoomStart:c});m.on("start",we);const xe=ck({zoomPanValues:g,panOnDrag:F,onPaneContextMenu:!!ee,onPanZoom:u,onTransformChange:ae});m.on("zoom",xe);const ge=dk({zoomPanValues:g,panOnDrag:F,panOnScroll:Y,onPaneContextMenu:ee,onPanZoomEnd:f,onDraggingChange:h});m.on("end",ge);const Ee=fk({zoomActivationKeyPressed:J,panOnDrag:F,zoomOnScroll:b,panOnScroll:Y,zoomOnDoubleClick:j,zoomOnPinch:W,userSelectionActive:z,noPanClassName:V,noWheelClassName:O,lib:ne,connectionInProgress:ce});m.filter(Ee),j?y.on("dblclick.zoom",_):y.on("dblclick.zoom",null)}function E(){m.on("zoom",null)}async function P(O,V,ee){const z=Ku(O),Y=m==null?void 0:m.constrain()(z,V,ee);return Y&&await C(Y),Y}async function N(O,V){const ee=Ku(O);return await C(ee,V),ee}function M(O){if(y){const V=Ku(O),ee=y.property("__zoom");(ee.k!==O.zoom||ee.x!==O.x||ee.y!==O.y)&&(m==null||m.transform(y,V,null,{sync:!0}))}}function $(){const O=y?ig(y.node()):{x:0,y:0,k:1};return{x:O.x,y:O.y,zoom:O.k}}async function D(O,V){return y?new Promise(ee=>{m==null||m.interpolate((V==null?void 0:V.interpolate)==="linear"?yi:ml).scaleTo(qu(y,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>ee(!0)),O)}):!1}async function H(O,V){return y?new Promise(ee=>{m==null||m.interpolate((V==null?void 0:V.interpolate)==="linear"?yi:ml).scaleBy(qu(y,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>ee(!0)),O)}):!1}function G(O){m==null||m.scaleExtent(O)}function K(O){m==null||m.translateExtent(O)}function te(O){const V=!Yt(O)||O<0?0:O;m==null||m.clickDistance(V)}return{update:S,destroy:E,setViewport:N,setViewportConstrained:P,getViewport:$,scaleTo:D,scaleBy:H,setScaleExtent:G,setTranslateExtent:K,syncViewport:M,setClickDistance:te}}var go;(function(e){e.Line="line",e.Handle="handle"})(go||(go={}));function hk({width:e,prevWidth:r,height:o,prevHeight:s,affectsX:l,affectsY:u}){const c=e-r,f=o-s,h=[c>0?1:c<0?-1:0,f>0?1:f<0?-1:0];return c&&l&&(h[0]=h[0]*-1),f&&u&&(h[1]=h[1]*-1),h}function gh(e){const r=e.includes("right")||e.includes("left"),o=e.includes("bottom")||e.includes("top"),s=e.includes("left"),l=e.includes("top");return{isHorizontal:r,isVertical:o,affectsX:s,affectsY:l}}function Xn(e,r){return Math.max(0,r-e)}function Gn(e,r){return Math.max(0,e-r)}function ll(e,r,o){return Math.max(0,r-e,e-o)}function yh(e,r){return e?!r:r}function mk(e,r,o,s,l,u,c,f){let{affectsX:h,affectsY:g}=r;const{isHorizontal:x,isVertical:m}=r,y=x&&m,{xSnapped:w,ySnapped:_}=o,{minWidth:C,maxWidth:S,minHeight:E,maxHeight:P}=s,{x:N,y:M,width:$,height:D,aspectRatio:H}=e;let G=Math.floor(x?w-e.pointerX:0),K=Math.floor(m?_-e.pointerY:0);const te=$+(h?-G:G),O=D+(g?-K:K),V=-u[0]*$,ee=-u[1]*D;let z=ll(te,C,S),Y=ll(O,E,P);if(c){let A=0,T=0;h&&G<0?A=Xn(N+G+V,c[0][0]):!h&&G>0&&(A=Gn(N+te+V,c[1][0])),g&&K<0?T=Xn(M+K+ee,c[0][1]):!g&&K>0&&(T=Gn(M+O+ee,c[1][1])),z=Math.max(z,A),Y=Math.max(Y,T)}if(f){let A=0,T=0;h&&G>0?A=Gn(N+G,f[0][0]):!h&&G<0&&(A=Xn(N+te,f[1][0])),g&&K>0?T=Gn(M+K,f[0][1]):!g&&K<0&&(T=Xn(M+O,f[1][1])),z=Math.max(z,A),Y=Math.max(Y,T)}if(l){if(x){const A=ll(te/H,E,P)*H;if(z=Math.max(z,A),c){let T=0;!h&&!g||h&&!g&&y?T=Gn(M+ee+te/H,c[1][1])*H:T=Xn(M+ee+(h?G:-G)/H,c[0][1])*H,z=Math.max(z,T)}if(f){let T=0;!h&&!g||h&&!g&&y?T=Xn(M+te/H,f[1][1])*H:T=Gn(M+(h?G:-G)/H,f[0][1])*H,z=Math.max(z,T)}}if(m){const A=ll(O*H,C,S)/H;if(Y=Math.max(Y,A),c){let T=0;!h&&!g||g&&!h&&y?T=Gn(N+O*H+V,c[1][0])/H:T=Xn(N+(g?K:-K)*H+V,c[0][0])/H,Y=Math.max(Y,T)}if(f){let T=0;!h&&!g||g&&!h&&y?T=Xn(N+O*H,f[1][0])/H:T=Gn(N+(g?K:-K)*H,f[0][0])/H,Y=Math.max(Y,T)}}}K=K+(K<0?Y:-Y),G=G+(G<0?z:-z),l&&(y?te>O*H?K=(yh(h,g)?-G:G)/H:G=(yh(h,g)?-K:K)*H:x?(K=G/H,g=h):(G=K*H,h=g));const F=h?N+G:N,U=g?M+K:M;return{width:$+(h?-G:G),height:D+(g?-K:K),x:u[0]*G*(h?-1:1)+F,y:u[1]*K*(g?-1:1)+U}}const Ag={width:0,height:0,x:0,y:0},gk={...Ag,pointerX:0,pointerY:0,aspectRatio:1};function yk(e,r,o){const s=r.position.x+e.position.x,l=r.position.y+e.position.y,u=e.measured.width??0,c=e.measured.height??0,f=o[0]*u,h=o[1]*c;return[[s-f,l-h],[s+u-f,l+c-h]]}function xk({domNode:e,nodeId:r,getStoreItems:o,onChange:s,onEnd:l}){const u=Mt(e);let c={controlDirection:gh("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function f({controlPosition:g,boundaries:x,keepAspectRatio:m,resizeDirection:y,onResizeStart:w,onResize:_,onResizeEnd:C,shouldResize:S}){let E={...Ag},P={...gk};c={boundaries:x,resizeDirection:y,keepAspectRatio:m,controlDirection:gh(g)};let N,M=null,$=[],D,H,G,K=!1;const te=Um().on("start",O=>{const{nodeLookup:V,transform:ee,snapGrid:z,snapToGrid:Y,nodeOrigin:F,paneDomNode:U}=o();if(N=V.get(r),!N)return;M=(U==null?void 0:U.getBoundingClientRect())??null;const{xSnapped:A,ySnapped:T}=xi(O.sourceEvent,{transform:ee,snapGrid:z,snapToGrid:Y,containerBounds:M});E={width:N.measured.width??0,height:N.measured.height??0,x:N.position.x??0,y:N.position.y??0},P={...E,pointerX:A,pointerY:T,aspectRatio:E.width/E.height},D=void 0,H=Nr(N.extent)?N.extent:void 0,N.parentId&&(N.extent==="parent"||N.expandParent)&&(D=V.get(N.parentId)),D&&N.extent==="parent"&&(H=[[0,0],[D.measured.width,D.measured.height]]),$=[],G=void 0;for(const[W,b]of V)if(b.parentId===r&&($.push({id:W,position:{...b.position},extent:b.extent}),b.extent==="parent"||b.expandParent)){const j=yk(b,N,b.origin??F);G?G=[[Math.min(j[0][0],G[0][0]),Math.min(j[0][1],G[0][1])],[Math.max(j[1][0],G[1][0]),Math.max(j[1][1],G[1][1])]]:G=j}w==null||w(O,{...E})}).on("drag",O=>{const{transform:V,snapGrid:ee,snapToGrid:z,nodeOrigin:Y}=o(),F=xi(O.sourceEvent,{transform:V,snapGrid:ee,snapToGrid:z,containerBounds:M}),U=[];if(!N)return;const{x:A,y:T,width:W,height:b}=E,j={},J=N.origin??Y,{width:ne,height:ae,x:ce,y:ue}=mk(P,c.controlDirection,F,c.boundaries,c.keepAspectRatio,J,H,G),Z=ne!==W,se=ae!==b,me=ce!==A&&Z,we=ue!==T&&se;if(!me&&!we&&!Z&&!se)return;if((me||we||J[0]===1||J[1]===1)&&(j.x=me?ce:E.x,j.y=we?ue:E.y,E.x=j.x,E.y=j.y,$.length>0)){const Me=ce-A,ze=ue-T;for(const Te of $)Te.position={x:Te.position.x-Me+J[0]*(ne-W),y:Te.position.y-ze+J[1]*(ae-b)},U.push(Te)}if((Z||se)&&(j.width=Z&&(!c.resizeDirection||c.resizeDirection==="horizontal")?ne:E.width,j.height=se&&(!c.resizeDirection||c.resizeDirection==="vertical")?ae:E.height,E.width=j.width,E.height=j.height),D&&N.expandParent){const Me=J[0]*(j.width??0);j.x&&j.x<Me&&(E.x=Me,P.x=P.x-(j.x-Me));const ze=J[1]*(j.height??0);j.y&&j.y<ze&&(E.y=ze,P.y=P.y-(j.y-ze))}const xe=hk({width:E.width,prevWidth:W,height:E.height,prevHeight:b,affectsX:c.controlDirection.affectsX,affectsY:c.controlDirection.affectsY}),ge={...E,direction:xe};(S==null?void 0:S(O,ge))!==!1&&(K=!0,_==null||_(O,ge),s(j,U))}).on("end",O=>{K&&(C==null||C(O,{...E}),l==null||l({...E}),K=!1)});u.call(te)}function h(){u.on(".drag",null)}return{update:f,destroy:h}}var Qu={exports:{}},Zu={},Ju={exports:{}},ec={};/**
|
|
161
|
-
* @license React
|
|
162
|
-
* use-sync-external-store-shim.production.js
|
|
163
|
-
*
|
|
164
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the MIT license found in the
|
|
167
|
-
* LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/var xh;function vk(){if(xh)return ec;xh=1;var e=Mi();function r(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}var o=typeof Object.is=="function"?Object.is:r,s=e.useState,l=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue;function f(m,y){var w=y(),_=s({inst:{value:w,getSnapshot:y}}),C=_[0].inst,S=_[1];return u(function(){C.value=w,C.getSnapshot=y,h(C)&&S({inst:C})},[m,w,y]),l(function(){return h(C)&&S({inst:C}),m(function(){h(C)&&S({inst:C})})},[m]),c(w),w}function h(m){var y=m.getSnapshot;m=m.value;try{var w=y();return!o(m,w)}catch{return!0}}function g(m,y){return y()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:f;return ec.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:x,ec}var vh;function wk(){return vh||(vh=1,Ju.exports=vk()),Ju.exports}/**
|
|
169
|
-
* @license React
|
|
170
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
171
|
-
*
|
|
172
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the MIT license found in the
|
|
175
|
-
* LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/var wh;function Sk(){if(wh)return Zu;wh=1;var e=Mi(),r=wk();function o(g,x){return g===x&&(g!==0||1/g===1/x)||g!==g&&x!==x}var s=typeof Object.is=="function"?Object.is:o,l=r.useSyncExternalStore,u=e.useRef,c=e.useEffect,f=e.useMemo,h=e.useDebugValue;return Zu.useSyncExternalStoreWithSelector=function(g,x,m,y,w){var _=u(null);if(_.current===null){var C={hasValue:!1,value:null};_.current=C}else C=_.current;_=f(function(){function E(D){if(!P){if(P=!0,N=D,D=y(D),w!==void 0&&C.hasValue){var H=C.value;if(w(H,D))return M=H}return M=D}if(H=M,s(N,D))return H;var G=y(D);return w!==void 0&&w(H,G)?(N=D,H):(N=D,M=G)}var P=!1,N,M,$=m===void 0?null:m;return[function(){return E(x())},$===null?void 0:function(){return E($())}]},[x,m,y,w]);var S=l(g,_[0],_[1]);return c(function(){C.hasValue=!0,C.value=S},[S]),h(S),S},Zu}var Sh;function kk(){return Sh||(Sh=1,Qu.exports=Sk()),Qu.exports}var _k=kk();const Ek=gm(_k),Nk={},kh=e=>{let r;const o=new Set,s=(x,m)=>{const y=typeof x=="function"?x(r):x;if(!Object.is(y,r)){const w=r;r=m??(typeof y!="object"||y===null)?y:Object.assign({},r,y),o.forEach(_=>_(r,w))}},l=()=>r,h={setState:s,getState:l,getInitialState:()=>g,subscribe:x=>(o.add(x),()=>o.delete(x)),destroy:()=>{(Nk?"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."),o.clear()}},g=r=e(s,l,h);return h},Ck=e=>e?kh(e):kh,{useDebugValue:bk}=ym,{useSyncExternalStoreWithSelector:Mk}=Ek,jk=e=>e;function Lg(e,r=jk,o){const s=Mk(e.subscribe,e.getState,e.getServerState||e.getInitialState,r,o);return bk(s),s}const _h=(e,r)=>{const o=Ck(e),s=(l,u=r)=>Lg(o,l,u);return Object.assign(s,o),s},Pk=(e,r)=>e?_h(e,r):_h;function Fe(e,r){if(Object.is(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(const[s,l]of e)if(!Object.is(l,r.get(s)))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(const s of e)if(!r.has(s))return!1;return!0}const o=Object.keys(e);if(o.length!==Object.keys(r).length)return!1;for(const s of o)if(!Object.prototype.hasOwnProperty.call(r,s)||!Object.is(e[s],r[s]))return!1;return!0}vm();const Fl=I.createContext(null),zk=Fl.Provider,$g=Gt.error001("react");function be(e,r){const o=I.useContext(Fl);if(o===null)throw new Error($g);return Lg(o,e,r)}function Ve(){const e=I.useContext(Fl);if(e===null)throw new Error($g);return I.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Eh={display:"none"},Ik={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Dg="react-flow__node-desc",Og="react-flow__edge-desc",Rk="react-flow__aria-live",Tk=e=>e.ariaLiveMessage,Ak=e=>e.ariaLabelConfig;function Lk({rfId:e}){const r=be(Tk);return v.jsx("div",{id:`${Rk}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Ik,children:r})}function $k({rfId:e,disableKeyboardA11y:r}){const o=be(Ak);return v.jsxs(v.Fragment,{children:[v.jsx("div",{id:`${Dg}-${e}`,style:Eh,children:r?o["node.a11yDescription.default"]:o["node.a11yDescription.keyboardDisabled"]}),v.jsx("div",{id:`${Og}-${e}`,style:Eh,children:o["edge.a11yDescription.default"]}),!r&&v.jsx(Lk,{rfId:e})]})}const Vl=I.forwardRef(({position:e="top-left",children:r,className:o,style:s,...l},u)=>{const c=`${e}`.split("-");return v.jsx("div",{className:Ke(["react-flow__panel",o,...c]),style:s,ref:u,...l,children:r})});Vl.displayName="Panel";function Dk({proOptions:e,position:r="bottom-right"}){return e!=null&&e.hideAttribution?null:v.jsx(Vl,{position:r,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:v.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Ok=e=>{const r=[],o=[];for(const[,s]of e.nodeLookup)s.selected&&r.push(s.internals.userNode);for(const[,s]of e.edgeLookup)s.selected&&o.push(s);return{selectedNodes:r,selectedEdges:o}},al=e=>e.id;function Fk(e,r){return Fe(e.selectedNodes.map(al),r.selectedNodes.map(al))&&Fe(e.selectedEdges.map(al),r.selectedEdges.map(al))}function Vk({onSelectionChange:e}){const r=Ve(),{selectedNodes:o,selectedEdges:s}=be(Ok,Fk);return I.useEffect(()=>{const l={nodes:o,edges:s};e==null||e(l),r.getState().onSelectionChangeHandlers.forEach(u=>u(l))},[o,s,e]),null}const Bk=e=>!!e.onSelectionChangeHandlers;function Hk({onSelectionChange:e}){const r=be(Bk);return e||r?v.jsx(Vk,{onSelectionChange:e}):null}const Fg=[0,0],Wk={x:0,y:0,zoom:1},Uk=["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"],Nh=[...Uk,"rfId"],Yk=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}),Ch={translateExtent:_i,nodeOrigin:Fg,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Xk(e){const{setNodes:r,setEdges:o,setMinZoom:s,setMaxZoom:l,setTranslateExtent:u,setNodeExtent:c,reset:f,setDefaultNodesAndEdges:h}=be(Yk,Fe),g=Ve();I.useEffect(()=>(h(e.defaultNodes,e.defaultEdges),()=>{x.current=Ch,f()}),[]);const x=I.useRef(Ch);return I.useEffect(()=>{for(const m of Nh){const y=e[m],w=x.current[m];y!==w&&(typeof e[m]>"u"||(m==="nodes"?r(y):m==="edges"?o(y):m==="minZoom"?s(y):m==="maxZoom"?l(y):m==="translateExtent"?u(y):m==="nodeExtent"?c(y):m==="ariaLabelConfig"?g.setState({ariaLabelConfig:z2(y)}):m==="fitView"?g.setState({fitViewQueued:y}):m==="fitViewOptions"?g.setState({fitViewOptions:y}):g.setState({[m]:y})))}x.current=e},Nh.map(m=>e[m])),null}function bh(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Gk(e){var s;const[r,o]=I.useState(e==="system"?null:e);return I.useEffect(()=>{if(e!=="system"){o(e);return}const l=bh(),u=()=>o(l!=null&&l.matches?"dark":"light");return u(),l==null||l.addEventListener("change",u),()=>{l==null||l.removeEventListener("change",u)}},[e]),r!==null?r:(s=bh())!=null&&s.matches?"dark":"light"}const Mh=typeof document<"u"?document:null;function bi(e=null,r={target:Mh,actInsideInputWithModifier:!0}){const[o,s]=I.useState(!1),l=I.useRef(!1),u=I.useRef(new Set([])),[c,f]=I.useMemo(()=>{if(e!==null){const g=(Array.isArray(e)?e:[e]).filter(m=>typeof m=="string").map(m=>m.replace("+",`
|
|
177
|
-
`).replace(`
|
|
178
|
-
|
|
179
|
-
`,`
|
|
180
|
-
+`).split(`
|
|
181
|
-
`)),x=g.reduce((m,y)=>m.concat(...y),[]);return[g,x]}return[[],[]]},[e]);return I.useEffect(()=>{const h=(r==null?void 0:r.target)??Mh,g=(r==null?void 0:r.actInsideInputWithModifier)??!0;if(e!==null){const x=w=>{var S,E;if(l.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!l.current||l.current&&!g)&&vg(w))return!1;const C=Ph(w.code,f);if(u.current.add(w[C]),jh(c,u.current,!1)){const P=((E=(S=w.composedPath)==null?void 0:S.call(w))==null?void 0:E[0])||w.target,N=(P==null?void 0:P.nodeName)==="BUTTON"||(P==null?void 0:P.nodeName)==="A";r.preventDefault!==!1&&(l.current||!N)&&w.preventDefault(),s(!0)}},m=w=>{const _=Ph(w.code,f);jh(c,u.current,!0)?(s(!1),u.current.clear()):u.current.delete(w[_]),w.key==="Meta"&&u.current.clear(),l.current=!1},y=()=>{u.current.clear(),s(!1)};return h==null||h.addEventListener("keydown",x),h==null||h.addEventListener("keyup",m),window.addEventListener("blur",y),window.addEventListener("contextmenu",y),()=>{h==null||h.removeEventListener("keydown",x),h==null||h.removeEventListener("keyup",m),window.removeEventListener("blur",y),window.removeEventListener("contextmenu",y)}}},[e,s]),o}function jh(e,r,o){return e.filter(s=>o||s.length===r.size).some(s=>s.every(l=>r.has(l)))}function Ph(e,r){return r.includes(e)?"code":"key"}const Kk=()=>{const e=Ve();return I.useMemo(()=>({zoomIn:async r=>{const{panZoom:o}=e.getState();return o?o.scaleBy(1.2,r):!1},zoomOut:async r=>{const{panZoom:o}=e.getState();return o?o.scaleBy(1/1.2,r):!1},zoomTo:async(r,o)=>{const{panZoom:s}=e.getState();return s?s.scaleTo(r,o):!1},getZoom:()=>e.getState().transform[2],setViewport:async(r,o)=>{const{transform:[s,l,u],panZoom:c}=e.getState();return c?(await c.setViewport({x:r.x??s,y:r.y??l,zoom:r.zoom??u},o),!0):!1},getViewport:()=>{const[r,o,s]=e.getState().transform;return{x:r,y:o,zoom:s}},setCenter:async(r,o,s)=>e.getState().setCenter(r,o,s),fitBounds:async(r,o)=>{const{width:s,height:l,minZoom:u,maxZoom:c,panZoom:f}=e.getState(),h=Fc(r,s,l,u,c,(o==null?void 0:o.padding)??.1);return f?(await f.setViewport(h,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),!0):!1},screenToFlowPosition:(r,o={})=>{const{transform:s,snapGrid:l,snapToGrid:u,domNode:c}=e.getState();if(!c)return r;const{x:f,y:h}=c.getBoundingClientRect(),g={x:r.x-f,y:r.y-h},x=o.snapGrid??l,m=o.snapToGrid??u;return xo(g,s,m,x)},flowToScreenPosition:r=>{const{transform:o,domNode:s}=e.getState();if(!s)return r;const{x:l,y:u}=s.getBoundingClientRect(),c=mo(r,o);return{x:c.x+l,y:c.y+u}}}),[])};function Vg(e,r){const o=[],s=new Map,l=[];for(const u of e)if(u.type==="add"){l.push(u);continue}else if(u.type==="remove"||u.type==="replace")s.set(u.id,[u]);else{const c=s.get(u.id);c?c.push(u):s.set(u.id,[u])}for(const u of r){const c=s.get(u.id);if(!c){o.push(u);continue}if(c[0].type==="remove")continue;if(c[0].type==="replace"){o.push({...c[0].item});continue}const f={...u};for(const h of c)qk(h,f);o.push(f)}return l.length&&l.forEach(u=>{u.index!==void 0?o.splice(u.index,0,{...u.item}):o.push({...u.item})}),o}function qk(e,r){switch(e.type){case"select":{r.selected=e.selected;break}case"position":{typeof e.position<"u"&&(r.position=e.position),typeof e.dragging<"u"&&(r.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(r.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(r.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(r.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(r.resizing=e.resizing);break}}}function Qk(e,r){return Vg(e,r)}function Zk(e,r){return Vg(e,r)}function yr(e,r){return{id:e,type:"select",selected:r}}function oo(e,r=new Set,o=!1){const s=[];for(const[l,u]of e){const c=r.has(l);!(u.selected===void 0&&!c)&&u.selected!==c&&(o&&(u.selected=c),s.push(yr(u.id,c)))}return s}function zh({items:e=[],lookup:r}){var l;const o=[],s=new Map(e.map(u=>[u.id,u]));for(const[u,c]of e.entries()){const f=r.get(c.id),h=((l=f==null?void 0:f.internals)==null?void 0:l.userNode)??f;h!==void 0&&h!==c&&o.push({id:c.id,item:c,type:"replace"}),h===void 0&&o.push({item:c,type:"add",index:u})}for(const[u]of r)s.get(u)===void 0&&o.push({id:u,type:"remove"});return o}function Ih(e){return{id:e.id,type:"remove"}}const Jk=mg();function e_(e,r,o={}){return $2(e,r,{...o,onError:o.onError??Jk})}const Rh=e=>k2(e),t_=e=>dg(e);function Bg(e){return I.forwardRef(e)}const n_=typeof window<"u"?I.useLayoutEffect:I.useEffect;function Th(e){const[r,o]=I.useState(BigInt(0)),[s]=I.useState(()=>r_(()=>o(l=>l+BigInt(1))));return n_(()=>{const l=s.get();l.length&&(e(l),s.reset())},[r]),s}function r_(e){let r=[];return{get:()=>r,reset:()=>{r=[]},push:o=>{r.push(o),e()}}}const Hg=I.createContext(null);function o_({children:e}){const r=Ve(),o=I.useCallback(f=>{const{nodes:h=[],setNodes:g,hasDefaultNodes:x,onNodesChange:m,nodeLookup:y,fitViewQueued:w,onNodesChangeMiddlewareMap:_}=r.getState();let C=h;for(const E of f)C=typeof E=="function"?E(C):E;let S=zh({items:C,lookup:y});for(const E of _.values())S=E(S);x&&g(C),S.length>0?m==null||m(S):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:E,nodes:P,setNodes:N}=r.getState();E&&N(P)})},[]),s=Th(o),l=I.useCallback(f=>{const{edges:h=[],setEdges:g,hasDefaultEdges:x,onEdgesChange:m,edgeLookup:y}=r.getState();let w=h;for(const _ of f)w=typeof _=="function"?_(w):_;x?g(w):m&&m(zh({items:w,lookup:y}))},[]),u=Th(l),c=I.useMemo(()=>({nodeQueue:s,edgeQueue:u}),[]);return v.jsx(Hg.Provider,{value:c,children:e})}function i_(){const e=I.useContext(Hg);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const s_=e=>!!e.panZoom;function Xc(){const e=Kk(),r=Ve(),o=i_(),s=be(s_),l=I.useMemo(()=>{const u=m=>r.getState().nodeLookup.get(m),c=m=>{o.nodeQueue.push(m)},f=m=>{o.edgeQueue.push(m)},h=m=>{var E,P;const{nodeLookup:y,nodeOrigin:w}=r.getState(),_=Rh(m)?m:y.get(m.id),C=_.parentId?yg(_.position,_.measured,_.parentId,y,w):_.position,S={..._,position:C,width:((E=_.measured)==null?void 0:E.width)??_.width,height:((P=_.measured)==null?void 0:P.height)??_.height};return ho(S)},g=(m,y,w={replace:!1})=>{c(_=>_.map(C=>{if(C.id===m){const S=typeof y=="function"?y(C):y;return w.replace&&Rh(S)?S:{...C,...S}}return C}))},x=(m,y,w={replace:!1})=>{f(_=>_.map(C=>{if(C.id===m){const S=typeof y=="function"?y(C):y;return w.replace&&t_(S)?S:{...C,...S}}return C}))};return{getNodes:()=>r.getState().nodes.map(m=>({...m})),getNode:m=>{var y;return(y=u(m))==null?void 0:y.internals.userNode},getInternalNode:u,getEdges:()=>{const{edges:m=[]}=r.getState();return m.map(y=>({...y}))},getEdge:m=>r.getState().edgeLookup.get(m),setNodes:c,setEdges:f,addNodes:m=>{const y=Array.isArray(m)?m:[m];o.nodeQueue.push(w=>[...w,...y])},addEdges:m=>{const y=Array.isArray(m)?m:[m];o.edgeQueue.push(w=>[...w,...y])},toObject:()=>{const{nodes:m=[],edges:y=[],transform:w}=r.getState(),[_,C,S]=w;return{nodes:m.map(E=>({...E})),edges:y.map(E=>({...E})),viewport:{x:_,y:C,zoom:S}}},deleteElements:async({nodes:m=[],edges:y=[]})=>{const{nodes:w,edges:_,onNodesDelete:C,onEdgesDelete:S,triggerNodeChanges:E,triggerEdgeChanges:P,onDelete:N,onBeforeDelete:M}=r.getState(),{nodes:$,edges:D}=await b2({nodesToRemove:m,edgesToRemove:y,nodes:w,edges:_,onBeforeDelete:M}),H=D.length>0,G=$.length>0;if(H){const K=D.map(Ih);S==null||S(D),P(K)}if(G){const K=$.map(Ih);C==null||C($),E(K)}return(G||H)&&(N==null||N({nodes:$,edges:D})),{deletedNodes:$,deletedEdges:D}},getIntersectingNodes:(m,y=!0,w)=>{const _=ih(m),C=_?m:h(m),S=w!==void 0;return C?(w||r.getState().nodes).filter(E=>{const P=r.getState().nodeLookup.get(E.id);if(P&&!_&&(E.id===m.id||!P.internals.positionAbsolute))return!1;const N=ho(S?E:P),M=Ni(N,C);return y&&M>0||M>=N.width*N.height||M>=C.width*C.height}):[]},isNodeIntersecting:(m,y,w=!0)=>{const C=ih(m)?m:h(m);if(!C)return!1;const S=Ni(C,y);return w&&S>0||S>=y.width*y.height||S>=C.width*C.height},updateNode:g,updateNodeData:(m,y,w={replace:!1})=>{g(m,_=>{const C=typeof y=="function"?y(_):y;return w.replace?{..._,data:C}:{..._,data:{..._.data,...C}}},w)},updateEdge:x,updateEdgeData:(m,y,w={replace:!1})=>{x(m,_=>{const C=typeof y=="function"?y(_):y;return w.replace?{..._,data:C}:{..._,data:{..._.data,...C}}},w)},getNodesBounds:m=>{const{nodeLookup:y,nodeOrigin:w}=r.getState();return _2(m,{nodeLookup:y,nodeOrigin:w})},getHandleConnections:({type:m,id:y,nodeId:w})=>{var _;return Array.from(((_=r.getState().connectionLookup.get(`${w}-${m}${y?`-${y}`:""}`))==null?void 0:_.values())??[])},getNodeConnections:({type:m,handleId:y,nodeId:w})=>{var _;return Array.from(((_=r.getState().connectionLookup.get(`${w}${m?y?`-${m}-${y}`:`-${m}`:""}`))==null?void 0:_.values())??[])},fitView:async m=>{const y=r.getState().fitViewResolver??P2();return r.setState({fitViewQueued:!0,fitViewOptions:m,fitViewResolver:y}),o.nodeQueue.push(w=>[...w]),y.promise}}},[]);return I.useMemo(()=>({...l,...e,viewportInitialized:s}),[s])}const Ah=e=>e.selected,l_=typeof window<"u"?window:void 0;function a_({deleteKeyCode:e,multiSelectionKeyCode:r}){const o=Ve(),{deleteElements:s}=Xc(),l=bi(e,{actInsideInputWithModifier:!1}),u=bi(r,{target:l_});I.useEffect(()=>{if(l){const{edges:c,nodes:f}=o.getState();s({nodes:f.filter(Ah),edges:c.filter(Ah)}),o.setState({nodesSelectionActive:!1})}},[l]),I.useEffect(()=>{o.setState({multiSelectionActive:u})},[u])}function u_(e){const r=Ve();I.useEffect(()=>{const o=()=>{var l,u,c,f;if(!e.current||!(((u=(l=e.current).checkVisibility)==null?void 0:u.call(l))??!0))return!1;const s=Vc(e.current);(s.height===0||s.width===0)&&((f=(c=r.getState()).onError)==null||f.call(c,"004",Gt.error004())),r.setState({width:s.width||500,height:s.height||500})};if(e.current){o(),window.addEventListener("resize",o);const s=new ResizeObserver(()=>o());return s.observe(e.current),()=>{window.removeEventListener("resize",o),s&&e.current&&s.unobserve(e.current)}}},[])}const Bl={position:"absolute",width:"100%",height:"100%",top:0,left:0},c_=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function d_({onPaneContextMenu:e,zoomOnScroll:r=!0,zoomOnPinch:o=!0,panOnScroll:s=!1,panOnScrollSpeed:l=.5,panOnScrollMode:u=wr.Free,zoomOnDoubleClick:c=!0,panOnDrag:f=!0,defaultViewport:h,translateExtent:g,minZoom:x,maxZoom:m,zoomActivationKeyCode:y,preventScrolling:w=!0,children:_,noWheelClassName:C,noPanClassName:S,onViewportChange:E,isControlledViewport:P,paneClickDistance:N,selectionOnDrag:M}){const $=Ve(),D=I.useRef(null),{userSelectionActive:H,lib:G,connectionInProgress:K}=be(c_,Fe),te=bi(y),O=I.useRef();u_(D);const V=I.useCallback(ee=>{E==null||E({x:ee[0],y:ee[1],zoom:ee[2]}),P||$.setState({transform:ee})},[E,P]);return I.useEffect(()=>{if(D.current){O.current=pk({domNode:D.current,minZoom:x,maxZoom:m,translateExtent:g,viewport:h,onDraggingChange:F=>$.setState(U=>U.paneDragging===F?U:{paneDragging:F}),onPanZoomStart:(F,U)=>{const{onViewportChangeStart:A,onMoveStart:T}=$.getState();T==null||T(F,U),A==null||A(U)},onPanZoom:(F,U)=>{const{onViewportChange:A,onMove:T}=$.getState();T==null||T(F,U),A==null||A(U)},onPanZoomEnd:(F,U)=>{const{onViewportChangeEnd:A,onMoveEnd:T}=$.getState();T==null||T(F,U),A==null||A(U)}});const{x:ee,y:z,zoom:Y}=O.current.getViewport();return $.setState({panZoom:O.current,transform:[ee,z,Y],domNode:D.current.closest(".react-flow")}),()=>{var F;(F=O.current)==null||F.destroy()}}},[]),I.useEffect(()=>{var ee;(ee=O.current)==null||ee.update({onPaneContextMenu:e,zoomOnScroll:r,zoomOnPinch:o,panOnScroll:s,panOnScrollSpeed:l,panOnScrollMode:u,zoomOnDoubleClick:c,panOnDrag:f,zoomActivationKeyPressed:te,preventScrolling:w,noPanClassName:S,userSelectionActive:H,noWheelClassName:C,lib:G,onTransformChange:V,connectionInProgress:K,selectionOnDrag:M,paneClickDistance:N})},[e,r,o,s,l,u,c,f,te,w,S,H,C,G,V,K,M,N]),v.jsx("div",{className:"react-flow__renderer",ref:D,style:Bl,children:_})}const f_=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function p_(){const{userSelectionActive:e,userSelectionRect:r}=be(f_,Fe);return e&&r?v.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:r.width,height:r.height,transform:`translate(${r.x}px, ${r.y}px)`}}):null}const tc=(e,r)=>o=>{o.target===r.current&&(e==null||e(o))},h_=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function m_({isSelecting:e,selectionKeyPressed:r,selectionMode:o=Ei.Full,panOnDrag:s,autoPanOnSelection:l,paneClickDistance:u,selectionOnDrag:c,onSelectionStart:f,onSelectionEnd:h,onPaneClick:g,onPaneContextMenu:x,onPaneScroll:m,onPaneMouseEnter:y,onPaneMouseMove:w,onPaneMouseLeave:_,children:C}){const S=I.useRef(0),E=Ve(),{userSelectionActive:P,elementsSelectable:N,dragging:M,connectionInProgress:$,panBy:D,autoPanSpeed:H}=be(h_,Fe),G=N&&(e||P),K=I.useRef(null),te=I.useRef(),O=I.useRef(new Set),V=I.useRef(new Set),ee=I.useRef(!1),z=I.useRef({x:0,y:0}),Y=I.useRef(!1),F=Z=>{if(ee.current||$){ee.current=!1;return}g==null||g(Z),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},U=Z=>{if(Array.isArray(s)&&(s!=null&&s.includes(2))){Z.preventDefault();return}x==null||x(Z)},A=m?Z=>m(Z):void 0,T=Z=>{ee.current&&(Z.stopPropagation(),ee.current=!1)},W=Z=>{var Te,ut;const{domNode:se,transform:me}=E.getState();if(te.current=se==null?void 0:se.getBoundingClientRect(),!te.current)return;const we=Z.target===K.current;if(!we&&!!Z.target.closest(".nokey")||!e||!(c&&we||r)||Z.button!==0||!Z.isPrimary)return;(ut=(Te=Z.target)==null?void 0:Te.setPointerCapture)==null||ut.call(Te,Z.pointerId),ee.current=!1;const{x:Ee,y:Me}=Xt(Z.nativeEvent,te.current),ze=xo({x:Ee,y:Me},me);E.setState({userSelectionRect:{width:0,height:0,startX:ze.x,startY:ze.y,x:Ee,y:Me}}),we||(Z.stopPropagation(),Z.preventDefault())};function b(Z,se){const{userSelectionRect:me}=E.getState();if(!me)return;const{transform:we,nodeLookup:xe,edgeLookup:ge,connectionLookup:Ee,triggerNodeChanges:Me,triggerEdgeChanges:ze,defaultEdgeOptions:Te}=E.getState(),ut={x:me.startX,y:me.startY},{x:ft,y:rt}=mo(ut,we),ot={startX:ut.x,startY:ut.y,x:Z<ft?Z:ft,y:se<rt?se:rt,width:Math.abs(Z-ft),height:Math.abs(se-rt)},ln=O.current,qt=V.current;O.current=new Set(Dc(xe,ot,we,o===Ei.Partial,!0).map(pt=>pt.id)),V.current=new Set;const Qt=(Te==null?void 0:Te.selectable)??!0;for(const pt of O.current){const Pt=Ee.get(pt);if(Pt)for(const{edgeId:St}of Pt.values()){const zt=ge.get(St);zt&&(zt.selectable??Qt)&&V.current.add(St)}}if(!sh(ln,O.current)){const pt=oo(xe,O.current,!0);Me(pt)}if(!sh(qt,V.current)){const pt=oo(ge,V.current);ze(pt)}E.setState({userSelectionRect:ot,userSelectionActive:!0,nodesSelectionActive:!1})}function j(){if(!l||!te.current)return;const[Z,se]=Oc(z.current,te.current,H);D({x:Z,y:se}).then(me=>{if(!ee.current||!me){S.current=requestAnimationFrame(j);return}const{x:we,y:xe}=z.current;b(we,xe),S.current=requestAnimationFrame(j)})}const J=()=>{cancelAnimationFrame(S.current),S.current=0,Y.current=!1};I.useEffect(()=>()=>J(),[]);const ne=Z=>{const{userSelectionRect:se,transform:me,resetSelectedElements:we}=E.getState();if(!te.current||!se)return;const{x:xe,y:ge}=Xt(Z.nativeEvent,te.current);z.current={x:xe,y:ge};const Ee=mo({x:se.startX,y:se.startY},me);if(!ee.current){const Me=r?0:u;if(Math.hypot(xe-Ee.x,ge-Ee.y)<=Me)return;we(),f==null||f(Z)}ee.current=!0,Y.current||(j(),Y.current=!0),b(xe,ge)},ae=Z=>{var se,me;Z.button===0&&((me=(se=Z.target)==null?void 0:se.releasePointerCapture)==null||me.call(se,Z.pointerId),!P&&Z.target===K.current&&E.getState().userSelectionRect&&(F==null||F(Z)),E.setState({userSelectionActive:!1,userSelectionRect:null}),ee.current&&(h==null||h(Z),E.setState({nodesSelectionActive:O.current.size>0})),J())},ce=Z=>{var se,me;(me=(se=Z.target)==null?void 0:se.releasePointerCapture)==null||me.call(se,Z.pointerId),J()},ue=s===!0||Array.isArray(s)&&s.includes(0);return v.jsxs("div",{className:Ke(["react-flow__pane",{draggable:ue,dragging:M,selection:e}]),onClick:G?void 0:tc(F,K),onContextMenu:tc(U,K),onWheel:tc(A,K),onPointerEnter:G?void 0:y,onPointerMove:G?ne:w,onPointerUp:G?ae:void 0,onPointerCancel:G?ce:void 0,onPointerDownCapture:G?W:void 0,onClickCapture:G?T:void 0,onPointerLeave:_,ref:K,style:Bl,children:[C,v.jsx(p_,{})]})}function _c({id:e,store:r,unselect:o=!1,nodeRef:s}){const{addSelectedNodes:l,unselectNodesAndEdges:u,multiSelectionActive:c,nodeLookup:f,onError:h}=r.getState(),g=f.get(e);if(!g){h==null||h("012",Gt.error012(e));return}r.setState({nodesSelectionActive:!1}),g.selected?(o||g.selected&&c)&&(u({nodes:[g],edges:[]}),requestAnimationFrame(()=>{var x;return(x=s==null?void 0:s.current)==null?void 0:x.blur()})):l([e])}function Wg({nodeRef:e,disabled:r=!1,noDragClassName:o,handleSelector:s,nodeId:l,isSelectable:u,nodeClickDistance:c}){const f=Ve(),[h,g]=I.useState(!1),x=I.useRef();return I.useEffect(()=>{x.current=J2({getStoreItems:()=>f.getState(),onNodeMouseDown:m=>{_c({id:m,store:f,nodeRef:e})},onDragStart:()=>{g(!0)},onDragStop:()=>{g(!1)}})},[]),I.useEffect(()=>{if(!(r||!e.current||!x.current))return x.current.update({noDragClassName:o,handleSelector:s,domNode:e.current,isSelectable:u,nodeId:l,nodeClickDistance:c}),()=>{var m;(m=x.current)==null||m.destroy()}},[o,s,r,u,e,l,c]),h}const g_=e=>r=>r.selected&&(r.draggable||e&&typeof r.draggable>"u");function Ug(){const e=Ve();return I.useCallback(o=>{const{nodeExtent:s,snapToGrid:l,snapGrid:u,nodesDraggable:c,onError:f,updateNodePositions:h,nodeLookup:g,nodeOrigin:x}=e.getState(),m=new Map,y=g_(c),w=l?u[0]:5,_=l?u[1]:5,C=o.direction.x*w*o.factor,S=o.direction.y*_*o.factor;for(const[,E]of g){if(!y(E))continue;let P={x:E.internals.positionAbsolute.x+C,y:E.internals.positionAbsolute.y+S};l&&(P=Ri(P,u));const{position:N,positionAbsolute:M}=fg({nodeId:E.id,nextPosition:P,nodeLookup:g,nodeExtent:s,nodeOrigin:x,onError:f});E.position=N,E.internals.positionAbsolute=M,m.set(E.id,E)}h(m)},[])}const Gc=I.createContext(null),y_=Gc.Provider;Gc.Consumer;const Yg=()=>I.useContext(Gc),x_=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),v_=(e,r,o)=>s=>{const{connectionClickStartHandle:l,connectionMode:u,connection:c}=s,{fromHandle:f,toHandle:h,isValid:g}=c,x=(h==null?void 0:h.nodeId)===e&&(h==null?void 0:h.id)===r&&(h==null?void 0:h.type)===o;return{connectingFrom:(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===r&&(f==null?void 0:f.type)===o,connectingTo:x,clickConnecting:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===r&&(l==null?void 0:l.type)===o,isPossibleEndHandle:u===fo.Strict?(f==null?void 0:f.type)!==o:e!==(f==null?void 0:f.nodeId)||r!==(f==null?void 0:f.id),connectionInProcess:!!f,clickConnectionInProcess:!!l,valid:x&&g}};function w_({type:e="source",position:r=ve.Top,isValidConnection:o,isConnectable:s=!0,isConnectableStart:l=!0,isConnectableEnd:u=!0,id:c,onConnect:f,children:h,className:g,onMouseDown:x,onTouchStart:m,...y},w){var Y,F;const _=c||null,C=e==="target",S=Ve(),E=Yg(),{connectOnClick:P,noPanClassName:N,rfId:M}=be(x_,Fe),{connectingFrom:$,connectingTo:D,clickConnecting:H,isPossibleEndHandle:G,connectionInProcess:K,clickConnectionInProcess:te,valid:O}=be(v_(E,_,e),Fe);E||(F=(Y=S.getState()).onError)==null||F.call(Y,"010",Gt.error010());const V=U=>{const{defaultEdgeOptions:A,onConnect:T,hasDefaultEdges:W}=S.getState(),b={...A,...U};if(W){const{edges:j,setEdges:J,onError:ne}=S.getState();J(e_(b,j,{onError:ne}))}T==null||T(b),f==null||f(b)},ee=U=>{if(!E)return;const A=wg(U.nativeEvent);if(l&&(A&&U.button===0||!A)){const T=S.getState();kc.onPointerDown(U.nativeEvent,{handleDomNode:U.currentTarget,autoPanOnConnect:T.autoPanOnConnect,connectionMode:T.connectionMode,connectionRadius:T.connectionRadius,domNode:T.domNode,nodeLookup:T.nodeLookup,lib:T.lib,isTarget:C,handleId:_,nodeId:E,flowId:T.rfId,panBy:T.panBy,cancelConnection:T.cancelConnection,onConnectStart:T.onConnectStart,onConnectEnd:(...W)=>{var b,j;return(j=(b=S.getState()).onConnectEnd)==null?void 0:j.call(b,...W)},updateConnection:T.updateConnection,onConnect:V,isValidConnection:o||((...W)=>{var b,j;return((j=(b=S.getState()).isValidConnection)==null?void 0:j.call(b,...W))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:T.autoPanSpeed,dragThreshold:T.connectionDragThreshold})}A?x==null||x(U):m==null||m(U)},z=U=>{const{onClickConnectStart:A,onClickConnectEnd:T,connectionClickStartHandle:W,connectionMode:b,isValidConnection:j,lib:J,rfId:ne,nodeLookup:ae,connection:ce}=S.getState();if(!E||!W&&!l)return;if(!W){A==null||A(U.nativeEvent,{nodeId:E,handleId:_,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:E,type:e,id:_}});return}const ue=xg(U.target),Z=o||j,{connection:se,isValid:me}=kc.isValid(U.nativeEvent,{handle:{nodeId:E,id:_,type:e},connectionMode:b,fromNodeId:W.nodeId,fromHandleId:W.id||null,fromType:W.type,isValidConnection:Z,flowId:ne,doc:ue,lib:J,nodeLookup:ae});me&&se&&V(se);const we=structuredClone(ce);delete we.inProgress,we.toPosition=we.toHandle?we.toHandle.position:null,T==null||T(U,we),S.setState({connectionClickStartHandle:null})};return v.jsx("div",{"data-handleid":_,"data-nodeid":E,"data-handlepos":r,"data-id":`${M}-${E}-${_}-${e}`,className:Ke(["react-flow__handle",`react-flow__handle-${r}`,"nodrag",N,g,{source:!C,target:C,connectable:s,connectablestart:l,connectableend:u,clickconnecting:H,connectingfrom:$,connectingto:D,valid:O,connectionindicator:s&&(!K||G)&&(K||te?u:l)}]),onMouseDown:ee,onTouchStart:ee,onClick:P?z:void 0,ref:w,...y,children:h})}const jl=I.memo(Bg(w_));function S_({data:e,isConnectable:r,sourcePosition:o=ve.Bottom}){return v.jsxs(v.Fragment,{children:[e==null?void 0:e.label,v.jsx(jl,{type:"source",position:o,isConnectable:r})]})}function k_({data:e,isConnectable:r,targetPosition:o=ve.Top,sourcePosition:s=ve.Bottom}){return v.jsxs(v.Fragment,{children:[v.jsx(jl,{type:"target",position:o,isConnectable:r}),e==null?void 0:e.label,v.jsx(jl,{type:"source",position:s,isConnectable:r})]})}function __(){return null}function E_({data:e,isConnectable:r,targetPosition:o=ve.Top}){return v.jsxs(v.Fragment,{children:[v.jsx(jl,{type:"target",position:o,isConnectable:r}),e==null?void 0:e.label]})}const Pl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Lh={input:S_,default:k_,output:E_,group:__};function N_(e){var r,o,s,l;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((r=e.style)==null?void 0:r.width),height:e.height??e.initialHeight??((o=e.style)==null?void 0:o.height)}:{width:e.width??((s=e.style)==null?void 0:s.width),height:e.height??((l=e.style)==null?void 0:l.height)}}const C_=e=>{const{width:r,height:o,x:s,y:l}=Ii(e.nodeLookup,{filter:u=>!!u.selected});return{width:Yt(r)?r:null,height:Yt(o)?o:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${s}px,${l}px)`}};function b_({onSelectionContextMenu:e,noPanClassName:r,disableKeyboardA11y:o}){const s=Ve(),{width:l,height:u,transformString:c,userSelectionActive:f}=be(C_,Fe),h=Ug(),g=I.useRef(null);I.useEffect(()=>{var w;o||(w=g.current)==null||w.focus({preventScroll:!0})},[o]);const x=!f&&l!==null&&u!==null;if(Wg({nodeRef:g,disabled:!x}),!x)return null;const m=e?w=>{const _=s.getState().nodes.filter(C=>C.selected);e(w,_)}:void 0,y=w=>{Object.prototype.hasOwnProperty.call(Pl,w.key)&&(w.preventDefault(),h({direction:Pl[w.key],factor:w.shiftKey?4:1}))};return v.jsx("div",{className:Ke(["react-flow__nodesselection","react-flow__container",r]),style:{transform:c},children:v.jsx("div",{ref:g,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:o?void 0:-1,onKeyDown:o?void 0:y,style:{width:l,height:u}})})}const $h=typeof window<"u"?window:void 0,M_=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Xg({children:e,onPaneClick:r,onPaneMouseEnter:o,onPaneMouseMove:s,onPaneMouseLeave:l,onPaneContextMenu:u,onPaneScroll:c,paneClickDistance:f,deleteKeyCode:h,selectionKeyCode:g,selectionOnDrag:x,selectionMode:m,onSelectionStart:y,onSelectionEnd:w,multiSelectionKeyCode:_,panActivationKeyCode:C,zoomActivationKeyCode:S,elementsSelectable:E,zoomOnScroll:P,zoomOnPinch:N,panOnScroll:M,panOnScrollSpeed:$,panOnScrollMode:D,zoomOnDoubleClick:H,panOnDrag:G,autoPanOnSelection:K,defaultViewport:te,translateExtent:O,minZoom:V,maxZoom:ee,preventScrolling:z,onSelectionContextMenu:Y,noWheelClassName:F,noPanClassName:U,disableKeyboardA11y:A,onViewportChange:T,isControlledViewport:W}){const{nodesSelectionActive:b,userSelectionActive:j}=be(M_,Fe),J=bi(g,{target:$h}),ne=bi(C,{target:$h}),ae=ne||G,ce=ne||M,ue=x&&ae!==!0,Z=J||j||ue;return a_({deleteKeyCode:h,multiSelectionKeyCode:_}),v.jsx(d_,{onPaneContextMenu:u,elementsSelectable:E,zoomOnScroll:P,zoomOnPinch:N,panOnScroll:ce,panOnScrollSpeed:$,panOnScrollMode:D,zoomOnDoubleClick:H,panOnDrag:!J&&ae,defaultViewport:te,translateExtent:O,minZoom:V,maxZoom:ee,zoomActivationKeyCode:S,preventScrolling:z,noWheelClassName:F,noPanClassName:U,onViewportChange:T,isControlledViewport:W,paneClickDistance:f,selectionOnDrag:ue,children:v.jsxs(m_,{onSelectionStart:y,onSelectionEnd:w,onPaneClick:r,onPaneMouseEnter:o,onPaneMouseMove:s,onPaneMouseLeave:l,onPaneContextMenu:u,onPaneScroll:c,panOnDrag:ae,autoPanOnSelection:K,isSelecting:!!Z,selectionMode:m,selectionKeyPressed:J,paneClickDistance:f,selectionOnDrag:ue,children:[e,b&&v.jsx(b_,{onSelectionContextMenu:Y,noPanClassName:U,disableKeyboardA11y:A})]})})}Xg.displayName="FlowRenderer";const j_=I.memo(Xg),P_=e=>r=>e?Dc(r.nodeLookup,{x:0,y:0,width:r.width,height:r.height},r.transform,!0).map(o=>o.id):Array.from(r.nodeLookup.keys());function z_(e){return be(I.useCallback(P_(e),[e]),Fe)}const I_=e=>e.updateNodeInternals;function R_(){const e=be(I_),[r]=I.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(o=>{const s=new Map;o.forEach(l=>{const u=l.target.getAttribute("data-id");s.set(u,{id:u,nodeElement:l.target,force:!0})}),e(s)}));return I.useEffect(()=>()=>{r==null||r.disconnect()},[r]),r}function T_({node:e,nodeType:r,hasDimensions:o,resizeObserver:s}){const l=Ve(),u=I.useRef(null),c=I.useRef(null),f=I.useRef(e.sourcePosition),h=I.useRef(e.targetPosition),g=I.useRef(r),x=o&&!!e.internals.handleBounds;return I.useEffect(()=>{u.current&&!e.hidden&&(!x||c.current!==u.current)&&(c.current&&(s==null||s.unobserve(c.current)),s==null||s.observe(u.current),c.current=u.current)},[x,e.hidden]),I.useEffect(()=>()=>{c.current&&(s==null||s.unobserve(c.current),c.current=null)},[]),I.useEffect(()=>{if(u.current){const m=g.current!==r,y=f.current!==e.sourcePosition,w=h.current!==e.targetPosition;(m||y||w)&&(g.current=r,f.current=e.sourcePosition,h.current=e.targetPosition,l.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:u.current,force:!0}]])))}},[e.id,r,e.sourcePosition,e.targetPosition]),u}function A_({id:e,onClick:r,onMouseEnter:o,onMouseMove:s,onMouseLeave:l,onContextMenu:u,onDoubleClick:c,nodesDraggable:f,elementsSelectable:h,nodesConnectable:g,nodesFocusable:x,resizeObserver:m,noDragClassName:y,noPanClassName:w,disableKeyboardA11y:_,rfId:C,nodeTypes:S,nodeClickDistance:E,onError:P}){const{node:N,internals:M,isParent:$}=be(Z=>{const se=Z.nodeLookup.get(e),me=Z.parentLookup.has(e);return{node:se,internals:se.internals,isParent:me}},Fe);let D=N.type||"default",H=(S==null?void 0:S[D])||Lh[D];H===void 0&&(P==null||P("003",Gt.error003(D)),D="default",H=(S==null?void 0:S.default)||Lh.default);const G=!!(N.draggable||f&&typeof N.draggable>"u"),K=!!(N.selectable||h&&typeof N.selectable>"u"),te=!!(N.connectable||g&&typeof N.connectable>"u"),O=!!(N.focusable||x&&typeof N.focusable>"u"),V=Ve(),ee=gg(N),z=T_({node:N,nodeType:D,hasDimensions:ee,resizeObserver:m}),Y=Wg({nodeRef:z,disabled:N.hidden||!G,noDragClassName:y,handleSelector:N.dragHandle,nodeId:e,isSelectable:K,nodeClickDistance:E}),F=Ug();if(N.hidden)return null;const U=_n(N),A=N_(N),T=K||G||r||o||s||l,W=o?Z=>o(Z,{...M.userNode}):void 0,b=s?Z=>s(Z,{...M.userNode}):void 0,j=l?Z=>l(Z,{...M.userNode}):void 0,J=u?Z=>u(Z,{...M.userNode}):void 0,ne=c?Z=>c(Z,{...M.userNode}):void 0,ae=Z=>{const{selectNodesOnDrag:se,nodeDragThreshold:me}=V.getState();K&&(!se||!G||me>0)&&_c({id:e,store:V,nodeRef:z}),r&&r(Z,{...M.userNode})},ce=Z=>{if(!(vg(Z.nativeEvent)||_)){if(lg.includes(Z.key)&&K){const se=Z.key==="Escape";_c({id:e,store:V,unselect:se,nodeRef:z})}else if(G&&N.selected&&Object.prototype.hasOwnProperty.call(Pl,Z.key)){Z.preventDefault();const{ariaLabelConfig:se}=V.getState();V.setState({ariaLiveMessage:se["node.a11yDescription.ariaLiveMessage"]({direction:Z.key.replace("Arrow","").toLowerCase(),x:~~M.positionAbsolute.x,y:~~M.positionAbsolute.y})}),F({direction:Pl[Z.key],factor:Z.shiftKey?4:1})}}},ue=()=>{var Ee;if(_||!((Ee=z.current)!=null&&Ee.matches(":focus-visible")))return;const{transform:Z,width:se,height:me,autoPanOnNodeFocus:we,setCenter:xe}=V.getState();if(!we)return;Dc(new Map([[e,N]]),{x:0,y:0,width:se,height:me},Z,!0).length>0||xe(N.position.x+U.width/2,N.position.y+U.height/2,{zoom:Z[2]})};return v.jsx("div",{className:Ke(["react-flow__node",`react-flow__node-${D}`,{[w]:G},N.className,{selected:N.selected,selectable:K,parent:$,draggable:G,dragging:Y}]),ref:z,style:{zIndex:M.z,transform:`translate(${M.positionAbsolute.x}px,${M.positionAbsolute.y}px)`,pointerEvents:T?"all":"none",visibility:ee?"visible":"hidden",...N.style,...A},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:W,onMouseMove:b,onMouseLeave:j,onContextMenu:J,onClick:ae,onDoubleClick:ne,onKeyDown:O?ce:void 0,tabIndex:O?0:void 0,onFocus:O?ue:void 0,role:N.ariaRole??(O?"group":void 0),"aria-roledescription":"node","aria-describedby":_?void 0:`${Dg}-${C}`,"aria-label":N.ariaLabel,...N.domAttributes,children:v.jsx(y_,{value:e,children:v.jsx(H,{id:e,data:N.data,type:D,positionAbsoluteX:M.positionAbsolute.x,positionAbsoluteY:M.positionAbsolute.y,selected:N.selected??!1,selectable:K,draggable:G,deletable:N.deletable??!0,isConnectable:te,sourcePosition:N.sourcePosition,targetPosition:N.targetPosition,dragging:Y,dragHandle:N.dragHandle,zIndex:M.z,parentId:N.parentId,...U})})})}var L_=I.memo(A_);const $_=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Gg(e){const{nodesDraggable:r,nodesConnectable:o,nodesFocusable:s,elementsSelectable:l,onError:u}=be($_,Fe),c=z_(e.onlyRenderVisibleElements),f=R_();return v.jsx("div",{className:"react-flow__nodes",style:Bl,children:c.map(h=>v.jsx(L_,{id:h,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:f,nodesDraggable:r,nodesConnectable:o,nodesFocusable:s,elementsSelectable:l,nodeClickDistance:e.nodeClickDistance,onError:u},h))})}Gg.displayName="NodeRenderer";const D_=I.memo(Gg);function O_(e){return be(I.useCallback(o=>{if(!e)return o.edges.map(l=>l.id);const s=[];if(o.width&&o.height)for(const l of o.edges){const u=o.nodeLookup.get(l.source),c=o.nodeLookup.get(l.target);u&&c&&T2({sourceNode:u,targetNode:c,width:o.width,height:o.height,transform:o.transform})&&s.push(l.id)}return s},[e]),Fe)}const F_=({color:e="none",strokeWidth:r=1})=>{const o={strokeWidth:r,...e&&{stroke:e}};return v.jsx("polyline",{className:"arrow",style:o,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},V_=({color:e="none",strokeWidth:r=1})=>{const o={strokeWidth:r,...e&&{stroke:e,fill:e}};return v.jsx("polyline",{className:"arrowclosed",style:o,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Dh={[bl.Arrow]:F_,[bl.ArrowClosed]:V_};function B_(e){const r=Ve();return I.useMemo(()=>{var l,u;return Object.prototype.hasOwnProperty.call(Dh,e)?Dh[e]:((u=(l=r.getState()).onError)==null||u.call(l,"009",Gt.error009(e)),null)},[e])}const H_=({id:e,type:r,color:o,width:s=12.5,height:l=12.5,markerUnits:u="strokeWidth",strokeWidth:c,orient:f="auto-start-reverse"})=>{const h=B_(r);return h?v.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${s}`,markerHeight:`${l}`,viewBox:"-10 -10 20 20",markerUnits:u,orient:f,refX:"0",refY:"0",children:v.jsx(h,{color:o,strokeWidth:c})}):null},Kg=({defaultColor:e,rfId:r})=>{const o=be(u=>u.edges),s=be(u=>u.defaultEdgeOptions),l=I.useMemo(()=>B2(o,{id:r,defaultColor:e,defaultMarkerStart:s==null?void 0:s.markerStart,defaultMarkerEnd:s==null?void 0:s.markerEnd}),[o,s,r,e]);return l.length?v.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:v.jsx("defs",{children:l.map(u=>v.jsx(H_,{id:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,strokeWidth:u.strokeWidth,orient:u.orient},u.id))})}):null};Kg.displayName="MarkerDefinitions";var W_=I.memo(Kg);function qg({x:e,y:r,label:o,labelStyle:s,labelShowBg:l=!0,labelBgStyle:u,labelBgPadding:c=[2,4],labelBgBorderRadius:f=2,children:h,className:g,...x}){const[m,y]=I.useState({x:1,y:0,width:0,height:0}),w=Ke(["react-flow__edge-textwrapper",g]),_=I.useRef(null);return I.useEffect(()=>{if(_.current){const C=_.current.getBBox();y({x:C.x,y:C.y,width:C.width,height:C.height})}},[o]),o?v.jsxs("g",{transform:`translate(${e-m.width/2} ${r-m.height/2})`,className:w,visibility:m.width?"visible":"hidden",...x,children:[l&&v.jsx("rect",{width:m.width+2*c[0],x:-c[0],y:-c[1],height:m.height+2*c[1],className:"react-flow__edge-textbg",style:u,rx:f,ry:f}),v.jsx("text",{className:"react-flow__edge-text",y:m.height/2,dy:"0.3em",ref:_,style:s,children:o}),h]}):null}qg.displayName="EdgeText";const U_=I.memo(qg);function Hl({path:e,labelX:r,labelY:o,label:s,labelStyle:l,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h,interactionWidth:g=20,...x}){return v.jsxs(v.Fragment,{children:[v.jsx("path",{...x,d:e,fill:"none",className:Ke(["react-flow__edge-path",x.className])}),g?v.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:g,className:"react-flow__edge-interaction"}):null,s&&Yt(r)&&Yt(o)?v.jsx(U_,{x:r,y:o,label:s,labelStyle:l,labelShowBg:u,labelBgStyle:c,labelBgPadding:f,labelBgBorderRadius:h}):null]})}function Oh({pos:e,x1:r,y1:o,x2:s,y2:l}){return e===ve.Left||e===ve.Right?[.5*(r+s),o]:[r,.5*(o+l)]}function Qg({sourceX:e,sourceY:r,sourcePosition:o=ve.Bottom,targetX:s,targetY:l,targetPosition:u=ve.Top}){const[c,f]=Oh({pos:o,x1:e,y1:r,x2:s,y2:l}),[h,g]=Oh({pos:u,x1:s,y1:l,x2:e,y2:r}),[x,m,y,w]=Sg({sourceX:e,sourceY:r,targetX:s,targetY:l,sourceControlX:c,sourceControlY:f,targetControlX:h,targetControlY:g});return[`M${e},${r} C${c},${f} ${h},${g} ${s},${l}`,x,m,y,w]}function Zg(e){return I.memo(({id:r,sourceX:o,sourceY:s,targetX:l,targetY:u,sourcePosition:c,targetPosition:f,label:h,labelStyle:g,labelShowBg:x,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:C,markerStart:S,interactionWidth:E})=>{const[P,N,M]=Qg({sourceX:o,sourceY:s,sourcePosition:c,targetX:l,targetY:u,targetPosition:f}),$=e.isInternal?void 0:r;return v.jsx(Hl,{id:$,path:P,labelX:N,labelY:M,label:h,labelStyle:g,labelShowBg:x,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:C,markerStart:S,interactionWidth:E})})}const Y_=Zg({isInternal:!1}),Jg=Zg({isInternal:!0});Y_.displayName="SimpleBezierEdge";Jg.displayName="SimpleBezierEdgeInternal";function e0(e){return I.memo(({id:r,sourceX:o,sourceY:s,targetX:l,targetY:u,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:g,labelBgPadding:x,labelBgBorderRadius:m,style:y,sourcePosition:w=ve.Bottom,targetPosition:_=ve.Top,markerEnd:C,markerStart:S,pathOptions:E,interactionWidth:P})=>{const[N,M,$]=vc({sourceX:o,sourceY:s,sourcePosition:w,targetX:l,targetY:u,targetPosition:_,borderRadius:E==null?void 0:E.borderRadius,offset:E==null?void 0:E.offset,stepPosition:E==null?void 0:E.stepPosition}),D=e.isInternal?void 0:r;return v.jsx(Hl,{id:D,path:N,labelX:M,labelY:$,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:g,labelBgPadding:x,labelBgBorderRadius:m,style:y,markerEnd:C,markerStart:S,interactionWidth:P})})}const t0=e0({isInternal:!1}),n0=e0({isInternal:!0});t0.displayName="SmoothStepEdge";n0.displayName="SmoothStepEdgeInternal";function r0(e){return I.memo(({id:r,...o})=>{var l;const s=e.isInternal?void 0:r;return v.jsx(t0,{...o,id:s,pathOptions:I.useMemo(()=>{var u;return{borderRadius:0,offset:(u=o.pathOptions)==null?void 0:u.offset}},[(l=o.pathOptions)==null?void 0:l.offset])})})}const X_=r0({isInternal:!1}),o0=r0({isInternal:!0});X_.displayName="StepEdge";o0.displayName="StepEdgeInternal";function i0(e){return I.memo(({id:r,sourceX:o,sourceY:s,targetX:l,targetY:u,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:g,labelBgPadding:x,labelBgBorderRadius:m,style:y,markerEnd:w,markerStart:_,interactionWidth:C})=>{const[S,E,P]=Eg({sourceX:o,sourceY:s,targetX:l,targetY:u}),N=e.isInternal?void 0:r;return v.jsx(Hl,{id:N,path:S,labelX:E,labelY:P,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:g,labelBgPadding:x,labelBgBorderRadius:m,style:y,markerEnd:w,markerStart:_,interactionWidth:C})})}const G_=i0({isInternal:!1}),s0=i0({isInternal:!0});G_.displayName="StraightEdge";s0.displayName="StraightEdgeInternal";function l0(e){return I.memo(({id:r,sourceX:o,sourceY:s,targetX:l,targetY:u,sourcePosition:c=ve.Bottom,targetPosition:f=ve.Top,label:h,labelStyle:g,labelShowBg:x,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:C,markerStart:S,pathOptions:E,interactionWidth:P})=>{const[N,M,$]=kg({sourceX:o,sourceY:s,sourcePosition:c,targetX:l,targetY:u,targetPosition:f,curvature:E==null?void 0:E.curvature}),D=e.isInternal?void 0:r;return v.jsx(Hl,{id:D,path:N,labelX:M,labelY:$,label:h,labelStyle:g,labelShowBg:x,labelBgStyle:m,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:C,markerStart:S,interactionWidth:P})})}const K_=l0({isInternal:!1}),a0=l0({isInternal:!0});K_.displayName="BezierEdge";a0.displayName="BezierEdgeInternal";const Fh={default:a0,straight:s0,step:o0,smoothstep:n0,simplebezier:Jg},Vh={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},q_=(e,r,o)=>o===ve.Left?e-r:o===ve.Right?e+r:e,Q_=(e,r,o)=>o===ve.Top?e-r:o===ve.Bottom?e+r:e,Bh="react-flow__edgeupdater";function Hh({position:e,centerX:r,centerY:o,radius:s=10,onMouseDown:l,onMouseEnter:u,onMouseOut:c,type:f}){return v.jsx("circle",{onMouseDown:l,onMouseEnter:u,onMouseOut:c,className:Ke([Bh,`${Bh}-${f}`]),cx:q_(r,s,e),cy:Q_(o,s,e),r:s,stroke:"transparent",fill:"transparent"})}function Z_({isReconnectable:e,reconnectRadius:r,edge:o,sourceX:s,sourceY:l,targetX:u,targetY:c,sourcePosition:f,targetPosition:h,onReconnect:g,onReconnectStart:x,onReconnectEnd:m,setReconnecting:y,setUpdateHover:w}){const _=Ve(),C=(M,$)=>{if(M.button!==0)return;const{autoPanOnConnect:D,domNode:H,connectionMode:G,connectionRadius:K,lib:te,onConnectStart:O,cancelConnection:V,nodeLookup:ee,rfId:z,panBy:Y,updateConnection:F}=_.getState(),U=$.type==="target",A=(b,j)=>{y(!1),m==null||m(b,o,$.type,j)},T=b=>g==null?void 0:g(o,b),W=(b,j)=>{y(!0),x==null||x(M,o,$.type),O==null||O(b,j)};kc.onPointerDown(M.nativeEvent,{autoPanOnConnect:D,connectionMode:G,connectionRadius:K,domNode:H,handleId:$.id,nodeId:$.nodeId,nodeLookup:ee,isTarget:U,edgeUpdaterType:$.type,lib:te,flowId:z,cancelConnection:V,panBy:Y,isValidConnection:(...b)=>{var j,J;return((J=(j=_.getState()).isValidConnection)==null?void 0:J.call(j,...b))??!0},onConnect:T,onConnectStart:W,onConnectEnd:(...b)=>{var j,J;return(J=(j=_.getState()).onConnectEnd)==null?void 0:J.call(j,...b)},onReconnectEnd:A,updateConnection:F,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,dragThreshold:_.getState().connectionDragThreshold,handleDomNode:M.currentTarget})},S=M=>C(M,{nodeId:o.target,id:o.targetHandle??null,type:"target"}),E=M=>C(M,{nodeId:o.source,id:o.sourceHandle??null,type:"source"}),P=()=>w(!0),N=()=>w(!1);return v.jsxs(v.Fragment,{children:[(e===!0||e==="source")&&v.jsx(Hh,{position:f,centerX:s,centerY:l,radius:r,onMouseDown:S,onMouseEnter:P,onMouseOut:N,type:"source"}),(e===!0||e==="target")&&v.jsx(Hh,{position:h,centerX:u,centerY:c,radius:r,onMouseDown:E,onMouseEnter:P,onMouseOut:N,type:"target"})]})}function J_({id:e,edgesFocusable:r,edgesReconnectable:o,elementsSelectable:s,onClick:l,onDoubleClick:u,onContextMenu:c,onMouseEnter:f,onMouseMove:h,onMouseLeave:g,reconnectRadius:x,onReconnect:m,onReconnectStart:y,onReconnectEnd:w,rfId:_,edgeTypes:C,noPanClassName:S,onError:E,disableKeyboardA11y:P}){let N=be(xe=>xe.edgeLookup.get(e));const M=be(xe=>xe.defaultEdgeOptions);N=M?{...M,...N}:N;let $=N.type||"default",D=(C==null?void 0:C[$])||Fh[$];D===void 0&&(E==null||E("011",Gt.error011($)),$="default",D=(C==null?void 0:C.default)||Fh.default);const H=!!(N.focusable||r&&typeof N.focusable>"u"),G=typeof m<"u"&&(N.reconnectable||o&&typeof N.reconnectable>"u"),K=!!(N.selectable||s&&typeof N.selectable>"u"),te=I.useRef(null),[O,V]=I.useState(!1),[ee,z]=I.useState(!1),Y=Ve(),{zIndex:F,sourceX:U,sourceY:A,targetX:T,targetY:W,sourcePosition:b,targetPosition:j}=be(I.useCallback(xe=>{const ge=xe.nodeLookup.get(N.source),Ee=xe.nodeLookup.get(N.target);if(!ge||!Ee)return{zIndex:N.zIndex,...Vh};const Me=V2({id:e,sourceNode:ge,targetNode:Ee,sourceHandle:N.sourceHandle||null,targetHandle:N.targetHandle||null,connectionMode:xe.connectionMode,onError:E});return{zIndex:R2({selected:N.selected,zIndex:N.zIndex,sourceNode:ge,targetNode:Ee,elevateOnSelect:xe.elevateEdgesOnSelect,zIndexMode:xe.zIndexMode}),...Me||Vh}},[N.source,N.target,N.sourceHandle,N.targetHandle,N.selected,N.zIndex]),Fe),J=I.useMemo(()=>N.markerStart?`url('#${wc(N.markerStart,_)}')`:void 0,[N.markerStart,_]),ne=I.useMemo(()=>N.markerEnd?`url('#${wc(N.markerEnd,_)}')`:void 0,[N.markerEnd,_]);if(N.hidden||U===null||A===null||T===null||W===null)return null;const ae=xe=>{var ze;const{addSelectedEdges:ge,unselectNodesAndEdges:Ee,multiSelectionActive:Me}=Y.getState();K&&(Y.setState({nodesSelectionActive:!1}),N.selected&&Me?(Ee({nodes:[],edges:[N]}),(ze=te.current)==null||ze.blur()):ge([e])),l&&l(xe,N)},ce=u?xe=>{u(xe,{...N})}:void 0,ue=c?xe=>{c(xe,{...N})}:void 0,Z=f?xe=>{f(xe,{...N})}:void 0,se=h?xe=>{h(xe,{...N})}:void 0,me=g?xe=>{g(xe,{...N})}:void 0,we=xe=>{var ge;if(!P&&lg.includes(xe.key)&&K){const{unselectNodesAndEdges:Ee,addSelectedEdges:Me}=Y.getState();xe.key==="Escape"?((ge=te.current)==null||ge.blur(),Ee({edges:[N]})):Me([e])}};return v.jsx("svg",{style:{zIndex:F},children:v.jsxs("g",{className:Ke(["react-flow__edge",`react-flow__edge-${$}`,N.className,S,{selected:N.selected,animated:N.animated,inactive:!K&&!l,updating:O,selectable:K}]),onClick:ae,onDoubleClick:ce,onContextMenu:ue,onMouseEnter:Z,onMouseMove:se,onMouseLeave:me,onKeyDown:H?we:void 0,tabIndex:H?0:void 0,role:N.ariaRole??(H?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":N.ariaLabel===null?void 0:N.ariaLabel||`Edge from ${N.source} to ${N.target}`,"aria-describedby":H?`${Og}-${_}`:void 0,ref:te,...N.domAttributes,children:[!ee&&v.jsx(D,{id:e,source:N.source,target:N.target,type:N.type,selected:N.selected,animated:N.animated,selectable:K,deletable:N.deletable??!0,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,sourceX:U,sourceY:A,targetX:T,targetY:W,sourcePosition:b,targetPosition:j,data:N.data,style:N.style,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerStart:J,markerEnd:ne,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth}),G&&v.jsx(Z_,{edge:N,isReconnectable:G,reconnectRadius:x,onReconnect:m,onReconnectStart:y,onReconnectEnd:w,sourceX:U,sourceY:A,targetX:T,targetY:W,sourcePosition:b,targetPosition:j,setUpdateHover:V,setReconnecting:z})]})})}var eE=I.memo(J_);const tE=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function u0({defaultMarkerColor:e,onlyRenderVisibleElements:r,rfId:o,edgeTypes:s,noPanClassName:l,onReconnect:u,onEdgeContextMenu:c,onEdgeMouseEnter:f,onEdgeMouseMove:h,onEdgeMouseLeave:g,onEdgeClick:x,reconnectRadius:m,onEdgeDoubleClick:y,onReconnectStart:w,onReconnectEnd:_,disableKeyboardA11y:C}){const{edgesFocusable:S,edgesReconnectable:E,elementsSelectable:P,onError:N}=be(tE,Fe),M=O_(r);return v.jsxs("div",{className:"react-flow__edges",children:[v.jsx(W_,{defaultColor:e,rfId:o}),M.map($=>v.jsx(eE,{id:$,edgesFocusable:S,edgesReconnectable:E,elementsSelectable:P,noPanClassName:l,onReconnect:u,onContextMenu:c,onMouseEnter:f,onMouseMove:h,onMouseLeave:g,onClick:x,reconnectRadius:m,onDoubleClick:y,onReconnectStart:w,onReconnectEnd:_,rfId:o,onError:N,edgeTypes:s,disableKeyboardA11y:C},$))]})}u0.displayName="EdgeRenderer";const nE=I.memo(u0),rE=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function oE({children:e}){const r=be(rE);return v.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:r},children:e})}function iE(e){const r=Xc(),o=I.useRef(!1);I.useEffect(()=>{!o.current&&r.viewportInitialized&&e&&(setTimeout(()=>e(r),1),o.current=!0)},[e,r.viewportInitialized])}const sE=e=>{var r;return(r=e.panZoom)==null?void 0:r.syncViewport};function lE(e){const r=be(sE),o=Ve();return I.useEffect(()=>{e&&(r==null||r(e),o.setState({transform:[e.x,e.y,e.zoom]}))},[e,r]),null}function aE(e){return e.connection.inProgress?{...e.connection,to:xo(e.connection.to,e.transform)}:{...e.connection}}function uE(e){return aE}function cE(e){const r=uE();return be(r,Fe)}const dE=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function fE({containerStyle:e,style:r,type:o,component:s}){const{nodesConnectable:l,width:u,height:c,isValid:f,inProgress:h}=be(dE,Fe);return!(u&&l&&h)?null:v.jsx("svg",{style:e,width:u,height:c,className:"react-flow__connectionline react-flow__container",children:v.jsx("g",{className:Ke(["react-flow__connection",cg(f)]),children:v.jsx(c0,{style:r,type:o,CustomComponent:s,isValid:f})})})}const c0=({style:e,type:r=Kn.Bezier,CustomComponent:o,isValid:s})=>{const{inProgress:l,from:u,fromNode:c,fromHandle:f,fromPosition:h,to:g,toNode:x,toHandle:m,toPosition:y,pointer:w}=cE();if(!l)return;if(o)return v.jsx(o,{connectionLineType:r,connectionLineStyle:e,fromNode:c,fromHandle:f,fromX:u.x,fromY:u.y,toX:g.x,toY:g.y,fromPosition:h,toPosition:y,connectionStatus:cg(s),toNode:x,toHandle:m,pointer:w});let _="";const C={sourceX:u.x,sourceY:u.y,sourcePosition:h,targetX:g.x,targetY:g.y,targetPosition:y};switch(r){case Kn.Bezier:[_]=kg(C);break;case Kn.SimpleBezier:[_]=Qg(C);break;case Kn.Step:[_]=vc({...C,borderRadius:0});break;case Kn.SmoothStep:[_]=vc(C);break;default:[_]=Eg(C)}return v.jsx("path",{d:_,fill:"none",className:"react-flow__connection-path",style:e})};c0.displayName="ConnectionLine";const pE={};function Wh(e=pE){I.useRef(e),Ve(),I.useEffect(()=>{},[e])}function hE(){Ve(),I.useRef(!1),I.useEffect(()=>{},[])}function d0({nodeTypes:e,edgeTypes:r,onInit:o,onNodeClick:s,onEdgeClick:l,onNodeDoubleClick:u,onEdgeDoubleClick:c,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:g,onNodeContextMenu:x,onSelectionContextMenu:m,onSelectionStart:y,onSelectionEnd:w,connectionLineType:_,connectionLineStyle:C,connectionLineComponent:S,connectionLineContainerStyle:E,selectionKeyCode:P,selectionOnDrag:N,selectionMode:M,multiSelectionKeyCode:$,panActivationKeyCode:D,zoomActivationKeyCode:H,deleteKeyCode:G,onlyRenderVisibleElements:K,elementsSelectable:te,defaultViewport:O,translateExtent:V,minZoom:ee,maxZoom:z,preventScrolling:Y,defaultMarkerColor:F,zoomOnScroll:U,zoomOnPinch:A,panOnScroll:T,panOnScrollSpeed:W,panOnScrollMode:b,zoomOnDoubleClick:j,panOnDrag:J,autoPanOnSelection:ne,onPaneClick:ae,onPaneMouseEnter:ce,onPaneMouseMove:ue,onPaneMouseLeave:Z,onPaneScroll:se,onPaneContextMenu:me,paneClickDistance:we,nodeClickDistance:xe,onEdgeContextMenu:ge,onEdgeMouseEnter:Ee,onEdgeMouseMove:Me,onEdgeMouseLeave:ze,reconnectRadius:Te,onReconnect:ut,onReconnectStart:ft,onReconnectEnd:rt,noDragClassName:ot,noWheelClassName:ln,noPanClassName:qt,disableKeyboardA11y:Qt,nodeExtent:pt,rfId:Pt,viewport:St,onViewportChange:zt}){return Wh(e),Wh(r),hE(),iE(o),lE(St),v.jsx(j_,{onPaneClick:ae,onPaneMouseEnter:ce,onPaneMouseMove:ue,onPaneMouseLeave:Z,onPaneContextMenu:me,onPaneScroll:se,paneClickDistance:we,deleteKeyCode:G,selectionKeyCode:P,selectionOnDrag:N,selectionMode:M,onSelectionStart:y,onSelectionEnd:w,multiSelectionKeyCode:$,panActivationKeyCode:D,zoomActivationKeyCode:H,elementsSelectable:te,zoomOnScroll:U,zoomOnPinch:A,zoomOnDoubleClick:j,panOnScroll:T,panOnScrollSpeed:W,panOnScrollMode:b,panOnDrag:J,autoPanOnSelection:ne,defaultViewport:O,translateExtent:V,minZoom:ee,maxZoom:z,onSelectionContextMenu:m,preventScrolling:Y,noDragClassName:ot,noWheelClassName:ln,noPanClassName:qt,disableKeyboardA11y:Qt,onViewportChange:zt,isControlledViewport:!!St,children:v.jsxs(oE,{children:[v.jsx(nE,{edgeTypes:r,onEdgeClick:l,onEdgeDoubleClick:c,onReconnect:ut,onReconnectStart:ft,onReconnectEnd:rt,onlyRenderVisibleElements:K,onEdgeContextMenu:ge,onEdgeMouseEnter:Ee,onEdgeMouseMove:Me,onEdgeMouseLeave:ze,reconnectRadius:Te,defaultMarkerColor:F,noPanClassName:qt,disableKeyboardA11y:Qt,rfId:Pt}),v.jsx(fE,{style:C,type:_,component:S,containerStyle:E}),v.jsx("div",{className:"react-flow__edgelabel-renderer"}),v.jsx(D_,{nodeTypes:e,onNodeClick:s,onNodeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:g,onNodeContextMenu:x,nodeClickDistance:xe,onlyRenderVisibleElements:K,noPanClassName:qt,noDragClassName:ot,disableKeyboardA11y:Qt,nodeExtent:pt,rfId:Pt}),v.jsx("div",{className:"react-flow__viewport-portal"})]})})}d0.displayName="GraphView";const mE=I.memo(d0),gE=mg(),Uh=({nodes:e,edges:r,defaultNodes:o,defaultEdges:s,width:l,height:u,fitView:c,fitViewOptions:f,minZoom:h=.5,maxZoom:g=2,nodeOrigin:x,nodeExtent:m,zIndexMode:y="basic"}={})=>{const w=new Map,_=new Map,C=new Map,S=new Map,E=s??r??[],P=o??e??[],N=x??[0,0],M=m??_i;bg(C,S,E);const{nodesInitialized:$}=Sc(P,w,_,{nodeOrigin:N,nodeExtent:M,zIndexMode:y});let D=[0,0,1];if(c&&l&&u){const H=Ii(w,{filter:O=>!!((O.width||O.initialWidth)&&(O.height||O.initialHeight))}),{x:G,y:K,zoom:te}=Fc(H,l,u,h,g,(f==null?void 0:f.padding)??.1);D=[G,K,te]}return{rfId:"1",width:l??0,height:u??0,transform:D,nodes:P,nodesInitialized:$,nodeLookup:w,parentLookup:_,edges:E,edgeLookup:S,connectionLookup:C,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:o!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:h,maxZoom:g,translateExtent:_i,nodeExtent:M,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:fo.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:N,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:c??!1,fitViewOptions:f,fitViewResolver:null,connection:{...ug},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:gE,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:ag,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},yE=({nodes:e,edges:r,defaultNodes:o,defaultEdges:s,width:l,height:u,fitView:c,fitViewOptions:f,minZoom:h,maxZoom:g,nodeOrigin:x,nodeExtent:m,zIndexMode:y})=>Pk((w,_)=>{async function C(){const{nodeLookup:S,panZoom:E,fitViewOptions:P,fitViewResolver:N,width:M,height:$,minZoom:D,maxZoom:H}=_();E&&(await C2({nodes:S,width:M,height:$,panZoom:E,minZoom:D,maxZoom:H},P),N==null||N.resolve(!0),w({fitViewResolver:null}))}return{...Uh({nodes:e,edges:r,width:l,height:u,fitView:c,fitViewOptions:f,minZoom:h,maxZoom:g,nodeOrigin:x,nodeExtent:m,defaultNodes:o,defaultEdges:s,zIndexMode:y}),setNodes:S=>{const{nodeLookup:E,parentLookup:P,nodeOrigin:N,elevateNodesOnSelect:M,fitViewQueued:$,zIndexMode:D,nodesSelectionActive:H}=_(),{nodesInitialized:G,hasSelectedNodes:K}=Sc(S,E,P,{nodeOrigin:N,nodeExtent:m,elevateNodesOnSelect:M,checkEquality:!0,zIndexMode:D}),te=H&&K;$&&G?(C(),w({nodes:S,nodesInitialized:G,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:te})):w({nodes:S,nodesInitialized:G,nodesSelectionActive:te})},setEdges:S=>{const{connectionLookup:E,edgeLookup:P}=_();bg(E,P,S),w({edges:S})},setDefaultNodesAndEdges:(S,E)=>{if(S){const{setNodes:P}=_();P(S),w({hasDefaultNodes:!0})}if(E){const{setEdges:P}=_();P(E),w({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:E,nodeLookup:P,parentLookup:N,domNode:M,nodeOrigin:$,nodeExtent:D,debug:H,fitViewQueued:G,zIndexMode:K}=_(),{changes:te,updatedInternals:O}=K2(S,P,N,M,$,D,K);O&&(U2(P,N,{nodeOrigin:$,nodeExtent:D,zIndexMode:K}),G?(C(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),(te==null?void 0:te.length)>0&&(H&&console.log("React Flow: trigger node changes",te),E==null||E(te)))},updateNodePositions:(S,E=!1)=>{const P=[];let N=[];const{nodeLookup:M,triggerNodeChanges:$,connection:D,updateConnection:H,onNodesChangeMiddlewareMap:G}=_();for(const[K,te]of S){const O=M.get(K),V=!!(O!=null&&O.expandParent&&(O!=null&&O.parentId)&&(te!=null&&te.position)),ee={id:K,type:"position",position:V?{x:Math.max(0,te.position.x),y:Math.max(0,te.position.y)}:te.position,dragging:E};if(O&&D.inProgress&&D.fromNode.id===O.id){const z=Cr(O,D.fromHandle,ve.Left,!0);H({...D,from:z})}V&&O.parentId&&P.push({id:K,parentId:O.parentId,rect:{...te.internals.positionAbsolute,width:te.measured.width??0,height:te.measured.height??0}}),N.push(ee)}if(P.length>0){const{parentLookup:K,nodeOrigin:te}=_(),O=Yc(P,M,K,te);N.push(...O)}for(const K of G.values())N=K(N);$(N)},triggerNodeChanges:S=>{const{onNodesChange:E,setNodes:P,nodes:N,hasDefaultNodes:M,debug:$}=_();if(S!=null&&S.length){if(M){const D=Qk(S,N);P(D)}$&&console.log("React Flow: trigger node changes",S),E==null||E(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:E,setEdges:P,edges:N,hasDefaultEdges:M,debug:$}=_();if(S!=null&&S.length){if(M){const D=Zk(S,N);P(D)}$&&console.log("React Flow: trigger edge changes",S),E==null||E(S)}},addSelectedNodes:S=>{const{multiSelectionActive:E,edgeLookup:P,nodeLookup:N,triggerNodeChanges:M,triggerEdgeChanges:$}=_();if(E){const D=S.map(H=>yr(H,!0));M(D);return}M(oo(N,new Set([...S]),!0)),$(oo(P))},addSelectedEdges:S=>{const{multiSelectionActive:E,edgeLookup:P,nodeLookup:N,triggerNodeChanges:M,triggerEdgeChanges:$}=_();if(E){const D=S.map(H=>yr(H,!0));$(D);return}$(oo(P,new Set([...S]))),M(oo(N,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:E}={})=>{const{edges:P,nodes:N,nodeLookup:M,triggerNodeChanges:$,triggerEdgeChanges:D}=_(),H=S||N,G=E||P,K=[];for(const O of H){if(!O.selected)continue;const V=M.get(O.id);V&&(V.selected=!1),K.push(yr(O.id,!1))}const te=[];for(const O of G)O.selected&&te.push(yr(O.id,!1));$(K),D(te)},setMinZoom:S=>{const{panZoom:E,maxZoom:P}=_();E==null||E.setScaleExtent([S,P]),w({minZoom:S})},setMaxZoom:S=>{const{panZoom:E,minZoom:P}=_();E==null||E.setScaleExtent([P,S]),w({maxZoom:S})},setTranslateExtent:S=>{var E;(E=_().panZoom)==null||E.setTranslateExtent(S),w({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:E,triggerNodeChanges:P,triggerEdgeChanges:N,elementsSelectable:M}=_();if(!M)return;const $=E.reduce((H,G)=>G.selected?[...H,yr(G.id,!1)]:H,[]),D=S.reduce((H,G)=>G.selected?[...H,yr(G.id,!1)]:H,[]);P($),N(D)},setNodeExtent:S=>{const{nodes:E,nodeLookup:P,parentLookup:N,nodeOrigin:M,elevateNodesOnSelect:$,nodeExtent:D,zIndexMode:H}=_();S[0][0]===D[0][0]&&S[0][1]===D[0][1]&&S[1][0]===D[1][0]&&S[1][1]===D[1][1]||(Sc(E,P,N,{nodeOrigin:M,nodeExtent:S,elevateNodesOnSelect:$,checkEquality:!1,zIndexMode:H}),w({nodeExtent:S}))},panBy:S=>{const{transform:E,width:P,height:N,panZoom:M,translateExtent:$}=_();return q2({delta:S,panZoom:M,transform:E,translateExtent:$,width:P,height:N})},setCenter:async(S,E,P)=>{const{width:N,height:M,maxZoom:$,panZoom:D}=_();if(!D)return!1;const H=typeof(P==null?void 0:P.zoom)<"u"?P.zoom:$;return await D.setViewport({x:N/2-S*H,y:M/2-E*H,zoom:H},{duration:P==null?void 0:P.duration,ease:P==null?void 0:P.ease,interpolate:P==null?void 0:P.interpolate}),!0},cancelConnection:()=>{w({connection:{...ug}})},updateConnection:S=>{w({connection:S})},reset:()=>w({...Uh()})}},Object.is);function xE({initialNodes:e,initialEdges:r,defaultNodes:o,defaultEdges:s,initialWidth:l,initialHeight:u,initialMinZoom:c,initialMaxZoom:f,initialFitViewOptions:h,fitView:g,nodeOrigin:x,nodeExtent:m,zIndexMode:y,children:w}){const[_]=I.useState(()=>yE({nodes:e,edges:r,defaultNodes:o,defaultEdges:s,width:l,height:u,fitView:g,minZoom:c,maxZoom:f,fitViewOptions:h,nodeOrigin:x,nodeExtent:m,zIndexMode:y}));return v.jsx(zk,{value:_,children:v.jsx(o_,{children:w})})}function vE({children:e,nodes:r,edges:o,defaultNodes:s,defaultEdges:l,width:u,height:c,fitView:f,fitViewOptions:h,minZoom:g,maxZoom:x,nodeOrigin:m,nodeExtent:y,zIndexMode:w}){return I.useContext(Fl)?v.jsx(v.Fragment,{children:e}):v.jsx(xE,{initialNodes:r,initialEdges:o,defaultNodes:s,defaultEdges:l,initialWidth:u,initialHeight:c,fitView:f,initialFitViewOptions:h,initialMinZoom:g,initialMaxZoom:x,nodeOrigin:m,nodeExtent:y,zIndexMode:w,children:e})}const wE={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function SE({nodes:e,edges:r,defaultNodes:o,defaultEdges:s,className:l,nodeTypes:u,edgeTypes:c,onNodeClick:f,onEdgeClick:h,onInit:g,onMove:x,onMoveStart:m,onMoveEnd:y,onConnect:w,onConnectStart:_,onConnectEnd:C,onClickConnectStart:S,onClickConnectEnd:E,onNodeMouseEnter:P,onNodeMouseMove:N,onNodeMouseLeave:M,onNodeContextMenu:$,onNodeDoubleClick:D,onNodeDragStart:H,onNodeDrag:G,onNodeDragStop:K,onNodesDelete:te,onEdgesDelete:O,onDelete:V,onSelectionChange:ee,onSelectionDragStart:z,onSelectionDrag:Y,onSelectionDragStop:F,onSelectionContextMenu:U,onSelectionStart:A,onSelectionEnd:T,onBeforeDelete:W,connectionMode:b,connectionLineType:j=Kn.Bezier,connectionLineStyle:J,connectionLineComponent:ne,connectionLineContainerStyle:ae,deleteKeyCode:ce="Backspace",selectionKeyCode:ue="Shift",selectionOnDrag:Z=!1,selectionMode:se=Ei.Full,panActivationKeyCode:me="Space",multiSelectionKeyCode:we=Ci()?"Meta":"Control",zoomActivationKeyCode:xe=Ci()?"Meta":"Control",snapToGrid:ge,snapGrid:Ee,onlyRenderVisibleElements:Me=!1,selectNodesOnDrag:ze,nodesDraggable:Te,autoPanOnNodeFocus:ut,nodesConnectable:ft,nodesFocusable:rt,nodeOrigin:ot=Fg,edgesFocusable:ln,edgesReconnectable:qt,elementsSelectable:Qt=!0,defaultViewport:pt=Wk,minZoom:Pt=.5,maxZoom:St=2,translateExtent:zt=_i,preventScrolling:Li=!0,nodeExtent:an,defaultMarkerColor:Zn="#b1b1b7",zoomOnScroll:Ul=!0,zoomOnPinch:$i=!0,panOnScroll:Di=!1,panOnScrollSpeed:Yl=.5,panOnScrollMode:wo=wr.Free,zoomOnDoubleClick:So=!0,panOnDrag:ko=!0,onPaneClick:_o,onPaneMouseEnter:Eo,onPaneMouseMove:En,onPaneMouseLeave:Nn,onPaneScroll:Oi,onPaneContextMenu:Fi,paneClickDistance:Vi=1,nodeClickDistance:Bi=0,children:Hi,onReconnect:No,onReconnectStart:Wi,onReconnectEnd:Jn,onEdgeContextMenu:Co,onEdgeDoubleClick:er,onEdgeMouseEnter:Xl,onEdgeMouseMove:tr,onEdgeMouseLeave:br,reconnectRadius:Mr=10,onNodesChange:bo,onEdgesChange:Gl,noDragClassName:Kl="nodrag",noWheelClassName:ql="nowheel",noPanClassName:Zt="nopan",fitView:Mo,fitViewOptions:jo,connectOnClick:Ql,attributionPosition:Ui,proOptions:Yi,defaultEdgeOptions:Xi,elevateNodesOnSelect:Gi=!0,elevateEdgesOnSelect:Zl=!1,disableKeyboardA11y:Ki=!1,autoPanOnConnect:Be,autoPanOnNodeDrag:Jl,autoPanOnSelection:Po=!0,autoPanSpeed:qi,connectionRadius:jr,isValidConnection:ea,onError:Qi,style:Pr,id:kt,nodeDragThreshold:ta,connectionDragThreshold:_t,viewport:na,onViewportChange:ra,width:oa,height:zr,colorMode:Ir="light",debug:nr,onScroll:un,ariaLabelConfig:ia,zIndexMode:Zi="basic",...zo},Ji){const rr=kt||"1",or=Gk(Ir),sa=I.useCallback(Rr=>{Rr.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),un==null||un(Rr)},[un]);return v.jsx("div",{"data-testid":"rf__wrapper",...zo,onScroll:sa,style:{...Pr,...wE},ref:Ji,className:Ke(["react-flow",l,or]),id:kt,role:"application",children:v.jsxs(vE,{nodes:e,edges:r,width:oa,height:zr,fitView:Mo,fitViewOptions:jo,minZoom:Pt,maxZoom:St,nodeOrigin:ot,nodeExtent:an,zIndexMode:Zi,children:[v.jsx(Xk,{nodes:e,edges:r,defaultNodes:o,defaultEdges:s,onConnect:w,onConnectStart:_,onConnectEnd:C,onClickConnectStart:S,onClickConnectEnd:E,nodesDraggable:Te,autoPanOnNodeFocus:ut,nodesConnectable:ft,nodesFocusable:rt,edgesFocusable:ln,edgesReconnectable:qt,elementsSelectable:Qt,elevateNodesOnSelect:Gi,elevateEdgesOnSelect:Zl,minZoom:Pt,maxZoom:St,nodeExtent:an,onNodesChange:bo,onEdgesChange:Gl,snapToGrid:ge,snapGrid:Ee,connectionMode:b,translateExtent:zt,connectOnClick:Ql,defaultEdgeOptions:Xi,fitView:Mo,fitViewOptions:jo,onNodesDelete:te,onEdgesDelete:O,onDelete:V,onNodeDragStart:H,onNodeDrag:G,onNodeDragStop:K,onSelectionDrag:Y,onSelectionDragStart:z,onSelectionDragStop:F,onMove:x,onMoveStart:m,onMoveEnd:y,noPanClassName:Zt,nodeOrigin:ot,rfId:rr,autoPanOnConnect:Be,autoPanOnNodeDrag:Jl,autoPanSpeed:qi,onError:Qi,connectionRadius:jr,isValidConnection:ea,selectNodesOnDrag:ze,nodeDragThreshold:ta,connectionDragThreshold:_t,onBeforeDelete:W,debug:nr,ariaLabelConfig:ia,zIndexMode:Zi}),v.jsx(mE,{onInit:g,onNodeClick:f,onEdgeClick:h,onNodeMouseEnter:P,onNodeMouseMove:N,onNodeMouseLeave:M,onNodeContextMenu:$,onNodeDoubleClick:D,nodeTypes:u,edgeTypes:c,connectionLineType:j,connectionLineStyle:J,connectionLineComponent:ne,connectionLineContainerStyle:ae,selectionKeyCode:ue,selectionOnDrag:Z,selectionMode:se,deleteKeyCode:ce,multiSelectionKeyCode:we,panActivationKeyCode:me,zoomActivationKeyCode:xe,onlyRenderVisibleElements:Me,defaultViewport:pt,translateExtent:zt,minZoom:Pt,maxZoom:St,preventScrolling:Li,zoomOnScroll:Ul,zoomOnPinch:$i,zoomOnDoubleClick:So,panOnScroll:Di,panOnScrollSpeed:Yl,panOnScrollMode:wo,panOnDrag:ko,autoPanOnSelection:Po,onPaneClick:_o,onPaneMouseEnter:Eo,onPaneMouseMove:En,onPaneMouseLeave:Nn,onPaneScroll:Oi,onPaneContextMenu:Fi,paneClickDistance:Vi,nodeClickDistance:Bi,onSelectionContextMenu:U,onSelectionStart:A,onSelectionEnd:T,onReconnect:No,onReconnectStart:Wi,onReconnectEnd:Jn,onEdgeContextMenu:Co,onEdgeDoubleClick:er,onEdgeMouseEnter:Xl,onEdgeMouseMove:tr,onEdgeMouseLeave:br,reconnectRadius:Mr,defaultMarkerColor:Zn,noDragClassName:Kl,noWheelClassName:ql,noPanClassName:Zt,rfId:rr,disableKeyboardA11y:Ki,nodeExtent:an,viewport:na,onViewportChange:ra}),v.jsx(Hk,{onSelectionChange:ee}),Hi,v.jsx(Dk,{proOptions:Yi,position:Ui}),v.jsx($k,{rfId:rr,disableKeyboardA11y:Ki})]})})}var kE=Bg(SE);function _E({dimensions:e,lineWidth:r,variant:o,className:s}){return v.jsx("path",{strokeWidth:r,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Ke(["react-flow__background-pattern",o,s])})}function EE({radius:e,className:r}){return v.jsx("circle",{cx:e,cy:e,r:e,className:Ke(["react-flow__background-pattern","dots",r])})}var qn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(qn||(qn={}));const NE={[qn.Dots]:1,[qn.Lines]:1,[qn.Cross]:6},CE=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function f0({id:e,variant:r=qn.Dots,gap:o=20,size:s,lineWidth:l=1,offset:u=0,color:c,bgColor:f,style:h,className:g,patternClassName:x}){const m=I.useRef(null),{transform:y,patternId:w}=be(CE,Fe),_=s||NE[r],C=r===qn.Dots,S=r===qn.Cross,E=Array.isArray(o)?o:[o,o],P=[E[0]*y[2]||1,E[1]*y[2]||1],N=_*y[2],M=Array.isArray(u)?u:[u,u],$=S?[N,N]:P,D=[M[0]*y[2]||1+$[0]/2,M[1]*y[2]||1+$[1]/2],H=`${w}${e||""}`;return v.jsxs("svg",{className:Ke(["react-flow__background",g]),style:{...h,...Bl,"--xy-background-color-props":f,"--xy-background-pattern-color-props":c},ref:m,"data-testid":"rf__background",children:[v.jsx("pattern",{id:H,x:y[0]%P[0],y:y[1]%P[1],width:P[0],height:P[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${D[0]},-${D[1]})`,children:C?v.jsx(EE,{radius:N/2,className:x}):v.jsx(_E,{dimensions:$,lineWidth:l,variant:r,className:x})}),v.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${H})`})]})}f0.displayName="Background";const bE=I.memo(f0);function ME(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:v.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function jE(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:v.jsx("path",{d:"M0 0h32v4.2H0z"})})}function PE(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:v.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 zE(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:v.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 IE(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:v.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 ul({children:e,className:r,...o}){return v.jsx("button",{type:"button",className:Ke(["react-flow__controls-button",r]),...o,children:e})}const RE=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function p0({style:e,showZoom:r=!0,showFitView:o=!0,showInteractive:s=!0,fitViewOptions:l,onZoomIn:u,onZoomOut:c,onFitView:f,onInteractiveChange:h,className:g,children:x,position:m="bottom-left",orientation:y="vertical","aria-label":w}){const _=Ve(),{isInteractive:C,minZoomReached:S,maxZoomReached:E,ariaLabelConfig:P}=be(RE,Fe),{zoomIn:N,zoomOut:M,fitView:$}=Xc(),D=()=>{N(),u==null||u()},H=()=>{M(),c==null||c()},G=()=>{$(l),f==null||f()},K=()=>{_.setState({nodesDraggable:!C,nodesConnectable:!C,elementsSelectable:!C}),h==null||h(!C)},te=y==="horizontal"?"horizontal":"vertical";return v.jsxs(Vl,{className:Ke(["react-flow__controls",te,g]),position:m,style:e,"data-testid":"rf__controls","aria-label":w??P["controls.ariaLabel"],children:[r&&v.jsxs(v.Fragment,{children:[v.jsx(ul,{onClick:D,className:"react-flow__controls-zoomin",title:P["controls.zoomIn.ariaLabel"],"aria-label":P["controls.zoomIn.ariaLabel"],disabled:E,children:v.jsx(ME,{})}),v.jsx(ul,{onClick:H,className:"react-flow__controls-zoomout",title:P["controls.zoomOut.ariaLabel"],"aria-label":P["controls.zoomOut.ariaLabel"],disabled:S,children:v.jsx(jE,{})})]}),o&&v.jsx(ul,{className:"react-flow__controls-fitview",onClick:G,title:P["controls.fitView.ariaLabel"],"aria-label":P["controls.fitView.ariaLabel"],children:v.jsx(PE,{})}),s&&v.jsx(ul,{className:"react-flow__controls-interactive",onClick:K,title:P["controls.interactive.ariaLabel"],"aria-label":P["controls.interactive.ariaLabel"],children:C?v.jsx(IE,{}):v.jsx(zE,{})}),x]})}p0.displayName="Controls";const TE=I.memo(p0);function AE({id:e,x:r,y:o,width:s,height:l,style:u,color:c,strokeColor:f,strokeWidth:h,className:g,borderRadius:x,shapeRendering:m,selected:y,onClick:w}){const{background:_,backgroundColor:C}=u||{},S=c||_||C;return v.jsx("rect",{className:Ke(["react-flow__minimap-node",{selected:y},g]),x:r,y:o,rx:x,ry:x,width:s,height:l,style:{fill:S,stroke:f,strokeWidth:h},shapeRendering:m,onClick:w?E=>w(E,e):void 0})}const LE=I.memo(AE),$E=e=>e.nodes.map(r=>r.id),nc=e=>e instanceof Function?e:()=>e;function DE({nodeStrokeColor:e,nodeColor:r,nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:l,nodeComponent:u=LE,onClick:c}){const f=be($E,Fe),h=nc(r),g=nc(e),x=nc(o),m=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return v.jsx(v.Fragment,{children:f.map(y=>v.jsx(FE,{id:y,nodeColorFunc:h,nodeStrokeColorFunc:g,nodeClassNameFunc:x,nodeBorderRadius:s,nodeStrokeWidth:l,NodeComponent:u,onClick:c,shapeRendering:m},y))})}function OE({id:e,nodeColorFunc:r,nodeStrokeColorFunc:o,nodeClassNameFunc:s,nodeBorderRadius:l,nodeStrokeWidth:u,shapeRendering:c,NodeComponent:f,onClick:h}){const{node:g,x,y:m,width:y,height:w}=be(_=>{const C=_.nodeLookup.get(e);if(!C)return{node:void 0,x:0,y:0,width:0,height:0};const S=C.internals.userNode,{x:E,y:P}=C.internals.positionAbsolute,{width:N,height:M}=_n(S);return{node:S,x:E,y:P,width:N,height:M}},Fe);return!g||g.hidden||!gg(g)?null:v.jsx(f,{x,y:m,width:y,height:w,style:g.style,selected:!!g.selected,className:s(g),color:r(g),borderRadius:l,strokeColor:o(g),strokeWidth:u,shapeRendering:c,onClick:h,id:g.id})}const FE=I.memo(OE);var VE=I.memo(DE);const BE=200,HE=150,WE=e=>!e.hidden,UE=e=>{const r={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:r,boundingRect:e.nodeLookup.size>0?hg(Ii(e.nodeLookup,{filter:WE}),r):r,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},YE="react-flow__minimap-desc";function h0({style:e,className:r,nodeStrokeColor:o,nodeColor:s,nodeClassName:l="",nodeBorderRadius:u=5,nodeStrokeWidth:c,nodeComponent:f,bgColor:h,maskColor:g,maskStrokeColor:x,maskStrokeWidth:m,position:y="bottom-right",onClick:w,onNodeClick:_,pannable:C=!1,zoomable:S=!1,ariaLabel:E,inversePan:P,zoomStep:N=1,offsetScale:M=5}){const $=Ve(),D=I.useRef(null),{boundingRect:H,viewBB:G,rfId:K,panZoom:te,translateExtent:O,flowWidth:V,flowHeight:ee,ariaLabelConfig:z}=be(UE,Fe),Y=(e==null?void 0:e.width)??BE,F=(e==null?void 0:e.height)??HE,U=H.width/Y,A=H.height/F,T=Math.max(U,A),W=T*Y,b=T*F,j=M*T,J=H.x-(W-H.width)/2-j,ne=H.y-(b-H.height)/2-j,ae=W+j*2,ce=b+j*2,ue=`${YE}-${K}`,Z=I.useRef(0),se=I.useRef();Z.current=T,I.useEffect(()=>{if(D.current&&te)return se.current=ik({domNode:D.current,panZoom:te,getTransform:()=>$.getState().transform,getViewScale:()=>Z.current}),()=>{var ge;(ge=se.current)==null||ge.destroy()}},[te]),I.useEffect(()=>{var ge;(ge=se.current)==null||ge.update({translateExtent:O,width:V,height:ee,inversePan:P,pannable:C,zoomStep:N,zoomable:S})},[C,S,P,N,O,V,ee]);const me=w?ge=>{var ze;const[Ee,Me]=((ze=se.current)==null?void 0:ze.pointer(ge))||[0,0];w(ge,{x:Ee,y:Me})}:void 0,we=_?I.useCallback((ge,Ee)=>{const Me=$.getState().nodeLookup.get(Ee).internals.userNode;_(ge,Me)},[]):void 0,xe=E??z["minimap.ariaLabel"];return v.jsx(Vl,{position:y,style:{...e,"--xy-minimap-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-width-props":typeof m=="number"?m*T:void 0,"--xy-minimap-node-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-width-props":typeof c=="number"?c:void 0},className:Ke(["react-flow__minimap",r]),"data-testid":"rf__minimap",children:v.jsxs("svg",{width:Y,height:F,viewBox:`${J} ${ne} ${ae} ${ce}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ue,ref:D,onClick:me,children:[xe&&v.jsx("title",{id:ue,children:xe}),v.jsx(VE,{onClick:we,nodeColor:s,nodeStrokeColor:o,nodeBorderRadius:u,nodeClassName:l,nodeStrokeWidth:c,nodeComponent:f}),v.jsx("path",{className:"react-flow__minimap-mask",d:`M${J-j},${ne-j}h${ae+j*2}v${ce+j*2}h${-ae-j*2}z
|
|
182
|
-
M${G.x},${G.y}h${G.width}v${G.height}h${-G.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}h0.displayName="MiniMap";I.memo(h0);const XE=e=>r=>e?`${Math.max(1/r.transform[2],1)}`:void 0,GE={[go.Line]:"right",[go.Handle]:"bottom-right"};function KE({nodeId:e,position:r,variant:o=go.Handle,className:s,style:l=void 0,children:u,color:c,minWidth:f=10,minHeight:h=10,maxWidth:g=Number.MAX_VALUE,maxHeight:x=Number.MAX_VALUE,keepAspectRatio:m=!1,resizeDirection:y,autoScale:w=!0,shouldResize:_,onResizeStart:C,onResize:S,onResizeEnd:E}){const P=Yg(),N=typeof e=="string"?e:P,M=Ve(),$=I.useRef(null),D=o===go.Handle,H=be(I.useCallback(XE(D&&w),[D,w]),Fe),G=I.useRef(null),K=r??GE[o];I.useEffect(()=>{if(!(!$.current||!N))return G.current||(G.current=xk({domNode:$.current,nodeId:N,getStoreItems:()=>{const{nodeLookup:O,transform:V,snapGrid:ee,snapToGrid:z,nodeOrigin:Y,domNode:F}=M.getState();return{nodeLookup:O,transform:V,snapGrid:ee,snapToGrid:z,nodeOrigin:Y,paneDomNode:F}},onChange:(O,V)=>{const{triggerNodeChanges:ee,nodeLookup:z,parentLookup:Y,nodeOrigin:F}=M.getState(),U=[],A={x:O.x,y:O.y},T=z.get(N);if(T&&T.expandParent&&T.parentId){const W=T.origin??F,b=O.width??T.measured.width??0,j=O.height??T.measured.height??0,J={id:T.id,parentId:T.parentId,rect:{width:b,height:j,...yg({x:O.x??T.position.x,y:O.y??T.position.y},{width:b,height:j},T.parentId,z,W)}},ne=Yc([J],z,Y,F);U.push(...ne),A.x=O.x?Math.max(W[0]*b,O.x):void 0,A.y=O.y?Math.max(W[1]*j,O.y):void 0}if(A.x!==void 0&&A.y!==void 0){const W={id:N,type:"position",position:{...A}};U.push(W)}if(O.width!==void 0&&O.height!==void 0){const b={id:N,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:O.width,height:O.height}};U.push(b)}for(const W of V){const b={...W,type:"position"};U.push(b)}ee(U)},onEnd:({width:O,height:V})=>{const ee={id:N,type:"dimensions",resizing:!1,dimensions:{width:O,height:V}};M.getState().triggerNodeChanges([ee])}})),G.current.update({controlPosition:K,boundaries:{minWidth:f,minHeight:h,maxWidth:g,maxHeight:x},keepAspectRatio:m,resizeDirection:y,onResizeStart:C,onResize:S,onResizeEnd:E,shouldResize:_}),()=>{var O;(O=G.current)==null||O.destroy()}},[K,f,h,g,x,m,C,S,E,_]);const te=K.split("-");return v.jsx("div",{className:Ke(["react-flow__resize-control","nodrag",...te,o,s]),ref:$,style:{...l,scale:H,...c&&{[D?"backgroundColor":"borderColor"]:c}},children:u})}I.memo(KE);function Wl(e){switch(e){case"websocket":return"websocket";case"sse":case"longpoll":return"http";case"libp2p":return"libp2p";case"loopback":return"loopback";default:return"unknown"}}function Kc(e){switch(e){case"websocket":return"WebSocket";case"sse":return"HTTP · SSE";case"longpoll":return"HTTP · long-poll";case"libp2p":return"libp2p";case"loopback":return"Loopback";case void 0:return"unknown";default:return e}}function qc(e){return e==="websocket"?"ws":e}const qE={websocket:"#22d3ee",http:"#a78bfa",libp2p:"#34d399",loopback:"#64748b",unknown:"#64748b"};function Qc(e){return qE[e]}function Zc(e){return Qc(Wl(e))}function zl(e){const r=new Map;for(const o of e){const s=Wl(o.transport);r.set(s,(r.get(s)??0)+1)}return[...r.entries()].map(([o,s])=>({family:o,count:s})).sort((o,s)=>s.count-o.count||o.family.localeCompare(s.family))}function QE(e){return zl(e).map(({family:r,count:o})=>`${o} ${qc(r)}`).join(" / ")}const rc=["#22d3ee","#a78bfa","#f472b6","#facc15","#34d399","#fb923c","#60a5fa","#f87171"];function m0(e){let r=0;for(let o=0;o<e.length;o++)r=r*31+e.charCodeAt(o)>>>0;return rc[r%rc.length]??rc[0]}const Yh="__bus",ZE=500,Xh=320,Gh=160;function JE(e,r,o){const s=[],l=new Set;for(const y of e)l.has(y.nodeId)||(l.add(y.nodeId),s.push(y.nodeId));o&&!l.has(o.nodeId)&&(l.add(o.nodeId),s.push(o.nodeId));const u=new Map(e.map(y=>[y.nodeId,y])),c=s.length>=2,f=[],h=[];c&&f.push({id:Yh,kind:"bus",x:0,y:0,label:"Adapter · bus"});const g=r.slice(0,ZE),x=Math.max(0,r.length-g.length),m=new Map;for(const y of g){const w=m.get(y.nodeId)??[];w.push(y),m.set(y.nodeId,w)}return s.forEach((y,w)=>{var M;const _=s.length===1?0:w/s.length*Math.PI*2-Math.PI/2,C=c?Math.cos(_)*Xh:0,S=c?Math.sin(_)*Xh:0,E=u.get(y),P=(E==null?void 0:E.nodeName)??((o==null?void 0:o.nodeId)===y?o.nodeName:void 0)??y.slice(0,8);f.push({id:y,kind:"server",x:C,y:S,label:P,alive:(E==null?void 0:E.alive)??!0,connCount:(E==null?void 0:E.connections)??((M=m.get(y))==null?void 0:M.length)??0,breakdown:QE(m.get(y)??[])}),c&&h.push({id:`e-bus-${y}`,source:y,target:Yh,kind:"bus"});const N=m.get(y)??[];N.forEach(($,D)=>{const H=D/Math.max(N.length,1)*Math.PI*2;f.push({id:$.id,kind:"conn",x:C+Math.cos(H)*Gh,y:S+Math.sin(H)*Gh,label:$.role,role:$.role,userId:$.userId,rooms:$.rooms,transport:$.transport}),h.push({id:`e-${$.id}`,source:$.id,target:y,kind:"conn"})})}),{nodes:f,edges:h,truncated:x}}function eN(e){const r=new Set;for(const o of e)for(const s of o.rooms)r.add(s);return[...r].sort()}function tN(e){return e.kind==="bus"?"Adapter · bus":e.kind==="server"?v.jsxs("div",{className:"text-center leading-tight",children:[v.jsx("div",{className:"font-semibold",children:e.label}),v.jsxs("div",{className:"text-[10px] opacity-70",children:[e.connCount," conns",e.breakdown?` · ${e.breakdown}`:"",e.alive?"":" · dead"]})]}):v.jsxs("div",{className:"leading-tight",children:[v.jsx("div",{className:"font-medium",children:e.role}),e.userId?v.jsx("div",{className:"text-[10px] opacity-70",children:e.userId}):null]})}function Kh(e,r){var o;return r.kind==="room"?!!((o=e.rooms)!=null&&o.includes(r.value)):Wl(e.transport)===r.value}function nN(e,r){const s={fontSize:11,opacity:r!==null&&e.kind==="conn"&&!Kh(e,r)?.16:1,transition:"opacity 120ms"};if(e.kind==="bus")return{...s,background:"var(--color-card)",border:"1px solid var(--color-primary)",color:"var(--color-primary)",borderRadius:999,padding:"8px 16px",fontWeight:600};if(e.kind==="server")return{...s,background:"var(--color-card)",border:"1px solid var(--color-border)",color:"var(--color-foreground)",borderRadius:12,padding:"8px 12px",minWidth:96};const l=Zc(e.transport),u=r!==null&&e.kind==="conn"&&Kh(e,r);return{...s,background:`${l}1f`,border:`1px solid ${l}`,color:"var(--color-foreground)",borderRadius:8,padding:"4px 9px",boxShadow:u?`0 0 0 2px ${l}`:"none"}}function rN({topology:e,connections:r,node:o,highlight:s}){const{nodes:l,edges:u,truncated:c}=I.useMemo(()=>{const f=JE(e,r,o),h=f.nodes.map(x=>({id:x.id,position:{x:x.x,y:x.y},data:{label:tN(x)},style:nN(x,s),draggable:!0,connectable:!1,selectable:!1})),g=f.edges.map(x=>({id:x.id,source:x.source,target:x.target,animated:x.kind==="bus",style:{stroke:x.kind==="bus"?"var(--color-primary)":"var(--color-border)",strokeWidth:x.kind==="bus"?1.5:1}}));return{nodes:h,edges:g,truncated:f.truncated}},[e,r,o,s]);return v.jsxs("div",{className:"relative h-full w-full",children:[v.jsxs(kE,{nodes:l,edges:u,fitView:!0,nodesConnectable:!1,edgesFocusable:!1,minZoom:.2,children:[v.jsx(bE,{color:"#2b2b35",gap:20}),v.jsx(TE,{showInteractive:!1})]}),c>0?v.jsxs("div",{className:"absolute left-3 top-3 rounded-md border bg-card/90 px-3 py-1.5 text-xs text-muted-foreground",children:["showing 500 of ",500+c," connections · Control Center targets small clusters"]}):null]})}function cl({title:e,children:r}){return v.jsxs("div",{className:"mb-4",children:[v.jsx("div",{className:"mb-1.5 px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:e}),r]})}const dl=()=>v.jsx("div",{className:"px-2 py-0.5 text-xs text-muted-foreground",children:"none"});function oN({roles:e,rooms:r,topics:o,transports:s,selected:l,onSelect:u}){const c=h=>u((l==null?void 0:l.kind)===h.kind&&l.value===h.value?null:h),f=h=>(l==null?void 0:l.kind)===h.kind&&l.value===h.value;return v.jsxs("aside",{className:"w-60 shrink-0 overflow-auto border-l bg-card/30 p-3",children:[v.jsx(cl,{title:"Roles",children:e.length===0?v.jsx(dl,{}):e.map(h=>v.jsxs("div",{className:"flex items-center gap-2 px-1 py-0.5 text-sm",children:[v.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{background:m0(h)}}),h]},h))}),v.jsx(cl,{title:"Transports · highlight",children:s.length===0?v.jsx(dl,{}):s.map(({family:h,count:g})=>v.jsxs("button",{onClick:()=>c({kind:"transport",value:h}),className:Oe("flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm",f({kind:"transport",value:h})?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:[v.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{background:Qc(h)}}),v.jsx("span",{className:"flex-1 truncate",children:qc(h)}),v.jsx("span",{className:"text-xs text-muted-foreground",children:g})]},h))}),v.jsx(cl,{title:"Rooms · highlight",children:r.length===0?v.jsx(dl,{}):r.map(h=>v.jsx("button",{onClick:()=>c({kind:"room",value:h}),className:Oe("block w-full truncate rounded px-2 py-1 text-left text-sm",f({kind:"room",value:h})?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:h},h))}),v.jsx(cl,{title:"Topics · this node",children:o.length===0?v.jsx(dl,{}):o.map(h=>v.jsx("div",{className:"truncate px-2 py-0.5 text-sm text-muted-foreground",children:h},h))})]})}function g0(e){return{kind:"one",label:Kc(e),color:Zc(e),family:Wl(e)}}function fl(e,r){const o=r==null?void 0:r.conn(e);return o?g0(o.transport):void 0}function Jc(e,r){var o;switch(e.type){case"connect":return g0(e.descriptor.transport);case"disconnect":case"room.add":case"room.remove":case"topic.sub":case"topic.unsub":case"msg.request":case"msg.response":return fl(e.connId,r);case"msg.event":return fl(e.target,r);case"msg.broadcast":{const s=((o=r==null?void 0:r.roomWires)==null?void 0:o.call(r,e.room))??[];return s.length?{kind:"many",parts:s.map(l=>({short:qc(l.family),count:l.count,color:Qc(l.family),family:l.family}))}:void 0}case"msg.publish":case"msg.serverRequest":case"msg.serverReply":return;case"store.subscribe":case"store.unsubscribe":return fl(e.connId,r);case"store.write":return e.connId?fl(e.connId,r):void 0;case"store.create":case"store.delete":case"store.grant":case"store.revoke":return}}function y0(e,r,o){return o?`${o} (${e})`:`${e} ${r.slice(0,8)}`}function wn(e,r){const o=r==null?void 0:r.conn(e);return o?y0(o.role,o.id,o.userId):e.slice(0,8)}function iN(e,r){var o,s;switch(e.type){case"connect":{const l=e.descriptor;return`${y0(l.role,l.id,l.userId)} on ${l.nodeName}`}case"disconnect":return`${e.userId??wn(e.connId,r)} on ${(r==null?void 0:r.nodeName(e.nodeId))??e.nodeId.slice(0,8)}`;case"room.add":case"room.remove":return`${wn(e.connId,r)} · ${e.room}`;case"topic.sub":case"topic.unsub":return`${wn(e.connId,r)} · ${e.topic}`;case"msg.request":return`${wn(e.connId,r)} → ${e.name}`;case"msg.response":return`${wn(e.connId,r)} ← ${e.name} · ${e.ok?"ok":((o=e.error)==null?void 0:o.code)??"error"}`;case"msg.event":return`→ ${wn(e.target,r)} · ${e.name}`;case"msg.broadcast":return`${e.room} ⇒ ${e.name}`;case"msg.publish":return e.topic;case"msg.serverRequest":return`→ ${wn(e.target,r)} · ${e.name}`;case"msg.serverReply":return`← ${wn(e.target,r)} · ${e.name} · ${e.ok?"ok":((s=e.error)==null?void 0:s.code)??"error"}`;case"store.create":return`+ ${e.store}/${e.id}`;case"store.delete":return`− ${e.store}/${e.id}`;case"store.write":return`${e.store}/${e.id}`;case"store.grant":return`${e.store}/${e.id} +${e.principal}`;case"store.revoke":return`${e.store}/${e.id} −${e.principal}`;case"store.subscribe":case"store.unsubscribe":return`${wn(e.connId,r)} · ${e.store}/${e.id}`}}function sN(e){return e==="msg.request"||e==="msg.response"||e==="msg.serverRequest"||e==="msg.serverReply"?"requests":e.startsWith("store.")?"stores":e.startsWith("msg.")?"events":"lifecycle"}function lN(e){return e==="connect"?"bg-primary":e==="disconnect"?"bg-destructive":e.startsWith("room")?"bg-violet-400":e.startsWith("topic")?"bg-amber-400":e.startsWith("store")?"bg-orange-400":e==="msg.request"||e==="msg.serverRequest"?"bg-cyan-400":e==="msg.response"||e==="msg.serverReply"?"bg-emerald-400":e==="msg.event"||e==="msg.broadcast"||e==="msg.publish"?"bg-sky-400":"bg-amber-400"}const aN={request:"#22d3ee",event:"#34d399",topic:"#a78bfa",serverRequest:"#60a5fa"};function uN(e){return aN[e]}function ed(e){return new Date(e).toLocaleTimeString()}function td(e,r=Date.now()){const o=Math.max(0,Math.floor((r-e)/1e3));if(o<60)return`${o}s`;const s=Math.floor(o/60);if(s<60)return`${s}m`;const l=Math.floor(s/60);return l<24?`${l}h ${s%60}m`:`${Math.floor(l/24)}d ${l%24}h`}const cN=[{max:10,color:"#4ade80"},{max:30,color:"#a3e635"},{max:100,color:"#facc15"},{max:500,color:"#fb923c"},{max:1/0,color:"#f87171"}],dN=[{max:512,color:"#4ade80"},{max:4096,color:"#a3e635"},{max:32768,color:"#facc15"},{max:262144,color:"#fb923c"},{max:1/0,color:"#f87171"}];function x0(e,r){return(e.find(o=>r<o.max)??e[e.length-1]).color}function fN(e){return x0(cN,e)}function pN(e){return x0(dN,e)}function qh(e,r){return r>0?Math.max(0,Math.min(1,e/r)):0}function Ec(e){return e===void 0?"—":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function v0(e){switch(e.type){case"msg.request":case"msg.response":return`c:${e.connId}:${e.reqId}`;case"msg.serverRequest":case"msg.serverReply":return`s:${e.target}:${e.reqId}`;default:return}}function hN(e){const r=new Map;for(const o of e)if(o.event.type==="msg.request"||o.event.type==="msg.serverRequest"){const s=v0(o.event);s&&r.set(s,o.ts)}return r}function mN(e,r){if(e.event.type!=="msg.response"&&e.event.type!=="msg.serverReply")return;const o=v0(e.event),s=o===void 0?void 0:r.get(o);return s===void 0?void 0:Math.max(0,e.ts-s)}function gN(e,r){const o=Jc(e,r);return o?o.kind==="one"?[o.family]:o.parts.map(s=>s.family):[]}const yN=["connect","disconnect","room.add","room.remove","topic.sub","topic.unsub","msg.request","msg.response","msg.event","msg.broadcast","msg.publish","msg.serverRequest","msg.serverReply","store.create","store.delete","store.write","store.grant","store.revoke","store.subscribe","store.unsubscribe"],xN=[{label:"15s",ms:15e3},{label:"1m",ms:6e4},{label:"5m",ms:3e5},{label:"All",ms:null}],vN=6e5,w0=Math.log10(vN);function Qh(e){return Math.pow(10,e*w0)}function Zh(e){return e<=1?0:Math.min(1,Math.log10(e)/w0)}function wN(e,r){return e<=0&&r>=1e3?null:[Qh(e/1e3),Qh(r/1e3)]}const SN=10485760,S0=Math.log10(SN);function Jh(e){return Math.pow(10,e*S0)}function em(e){return e<=1?0:Math.min(1,Math.log10(e)/S0)}function kN(e,r){return e<=0&&r>=1e3?null:[Jh(e/1e3),Jh(r/1e3)]}function tm(){return{text:"",types:new Set,nodes:new Set,wires:new Set,windowMs:null,latency:null,size:null}}function _N(e){return e.text!==""||e.types.size>0||e.nodes.size>0||e.wires.size>0||e.windowMs!==null||e.latency!==null||e.size!==null}function EN(e,r,o){return e&&r!==null?r:o}function NN(e,r,o){if(r.text){const s=r.text.toLowerCase();if(!`${e.event.type} ${o.summary}`.toLowerCase().includes(s))return!1}return!(r.types.size>0&&!r.types.has(e.event.type)||r.nodes.size>0&&!r.nodes.has(e.originNodeId)||r.wires.size>0&&(o.families.length===0||!o.families.some(s=>r.wires.has(s)))||r.windowMs!==null&&e.ts<o.nowAnchor-r.windowMs||r.latency&&(o.latency===void 0||o.latency<r.latency[0]||o.latency>r.latency[1])||r.size&&(e.byteSize===void 0||e.byteSize<r.size[0]||e.byteSize>r.size[1]))}function CN(e,r){const o=Jc(e,r);if(o)return o.kind==="one"?o.label:o.parts.map(s=>`${s.short}×${s.count}`).join(" ")}function bN(e,r,o,s){return{...e,summary:r,node:s.nodeName(e.originNodeId),latencyMs:o,wire:CN(e.event,s)}}const MN=e=>/[",\n]/.test(e)?`"${e.replaceAll('"','""')}"`:e;function jN(e){return["type,summary,node,time,size,latency,wire,payload",...e.map(o=>{var l,u;const s=km(o.event);return[o.event.type,o.summary,o.node,new Date(o.ts).toISOString(),((l=o.byteSize)==null?void 0:l.toString())??"",((u=o.latencyMs)==null?void 0:u.toString())??"",o.wire??"",s===void 0?"":JSON.stringify(s)].map(MN).join(",")})].join(`
|
|
183
|
-
`)}function PN(e){return e.map(r=>JSON.stringify(r)).join(`
|
|
184
|
-
`)}function zN(e,r){const o=r.filters;return JSON.stringify({exportedAt:r.exportedAt,count:e.length,filters:{text:o.text,types:[...o.types],nodes:[...o.nodes],wires:[...o.wires],windowMs:o.windowMs,latency:o.latency,size:o.size},nodes:r.nodes,events:e},null,2)}function IN({connections:e,selectedId:r,onSelect:o}){return e.length===0?v.jsx("p",{className:"text-sm text-muted-foreground",children:"No connections."}):v.jsx("div",{className:"overflow-auto rounded-md border",children:v.jsxs("table",{className:"w-full border-collapse text-sm",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"border-b bg-card/50 text-left text-[11px] uppercase tracking-wide text-muted-foreground",children:[v.jsx("th",{className:"px-3 py-2 font-medium",children:"role"}),v.jsx("th",{className:"px-3 py-2 font-medium",children:"transport"}),v.jsx("th",{className:"px-3 py-2 font-medium",children:"id"}),v.jsx("th",{className:"px-3 py-2 font-medium",children:"user"}),v.jsx("th",{className:"px-3 py-2 font-medium",children:"node"}),v.jsx("th",{className:"px-3 py-2 font-medium",children:"rooms"}),v.jsx("th",{className:"px-3 py-2 font-medium",children:"connected"})]})}),v.jsx("tbody",{children:e.map(s=>v.jsxs("tr",{onClick:()=>o(s.id),className:Oe("cursor-pointer border-b last:border-0 hover:bg-accent/40",r===s.id&&"bg-accent/60"),children:[v.jsx("td",{className:"px-3 py-2",children:v.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[v.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:m0(s.role)}}),s.role]})}),v.jsx("td",{className:"px-3 py-2",children:v.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[v.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:Zc(s.transport)}}),Kc(s.transport)]})}),v.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:s.id.slice(0,8)}),v.jsx("td",{className:"px-3 py-2",children:s.userId??"—"}),v.jsx("td",{className:"px-3 py-2 text-xs",children:s.nodeName}),v.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:s.rooms.length?s.rooms.join(", "):"—"}),v.jsxs("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:[ed(s.connectedAt)," ",v.jsxs("span",{className:"opacity-60",children:["· ",td(s.connectedAt)]})]})]},s.id))})]})})}function Sr({data:e,className:r}){const o=I.useMemo(()=>JSON.stringify(e,null,2),[e]),[s,l]=I.useState(!1),u=()=>{var c;(c=navigator.clipboard)==null||c.writeText(o).then(()=>{l(!0),setTimeout(()=>l(!1),1200)})};return v.jsxs("div",{className:"relative",children:[v.jsx("pre",{className:Oe("max-h-[72vh] overflow-auto rounded-md border bg-background/40 p-3 text-xs leading-relaxed",r),children:o}),v.jsx("button",{type:"button",onClick:u,"aria-label":"Copy JSON",title:s?"Copied":"Copy JSON",className:"absolute right-2 top-2 rounded-md border bg-card/80 p-1.5 text-muted-foreground opacity-70 transition-opacity hover:text-foreground hover:opacity-100",children:s?v.jsx(Sm,{className:"h-3.5 w-3.5"}):v.jsx(Ux,{className:"h-3.5 w-3.5"})})]})}const RN=Nm("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-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}});function k0({className:e,variant:r,size:o,...s}){return v.jsx("button",{className:Oe(RN({variant:r,size:o,className:e})),...s})}function oc({title:e,children:r}){return v.jsxs("div",{className:"mt-3",children:[v.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:e}),r]})}function TN({client:e,connId:r,onClose:o}){const[s,l]=I.useState(null),[u,c]=I.useState(null);return I.useEffect(()=>{if(!e||!r)return;let f=!0;return l(null),c(null),e.getConn(r).then(h=>{f&&l(h)}).catch(h=>{f&&c(h instanceof Error?h.message:String(h))}),()=>{f=!1}},[e,r]),r?v.jsxs("div",{className:"absolute inset-0 z-10 flex",children:[v.jsx("button",{className:"flex-1 bg-black/40",onClick:o,"aria-label":"Close detail"}),v.jsxs("div",{className:"w-[26rem] overflow-auto border-l bg-card p-4",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("h3",{className:"text-sm font-semibold",children:["Connection ",r.slice(0,8)]}),v.jsx(k0,{size:"sm",variant:"ghost",onClick:o,children:"close"})]}),u?v.jsx("p",{className:"mt-3 text-sm text-destructive",children:u}):null,s?v.jsxs(v.Fragment,{children:[v.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[s.descriptor.nodeName," · over ",Kc(s.descriptor.transport)," · connected"," ",ed(s.descriptor.connectedAt)," · ",td(s.descriptor.connectedAt)," ago"]}),v.jsx(oc,{title:"descriptor",children:v.jsx(Sr,{data:s.descriptor,className:"max-h-72"})}),s.ctxAvailable?v.jsxs(v.Fragment,{children:[v.jsx(oc,{title:"ctx · node-local, best-effort",children:v.jsx(Sr,{data:s.ctx,className:"max-h-72"})}),v.jsx(oc,{title:"conn.data",children:v.jsx(Sr,{data:s.data,className:"max-h-72"})})]}):v.jsxs("p",{className:"mt-3 text-xs text-muted-foreground",children:["ctx / conn.data live on node ",s.descriptor.nodeId.slice(0,8)," — point the Control Center at that node to inspect them."]})]}):u?null:v.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:"Loading…"})]})]}):null}function AN({flavor:e}){const r=uN(e);return v.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{background:`${r}22`,color:r,border:`1px solid ${r}66`},children:e})}function LN({message:e}){const[r,o]=I.useState(!1),s=[["input",e.input],["output",e.output],["payload",e.payload]].filter(([,u])=>u!==void 0),l=s.length>0;return v.jsxs("div",{className:"rounded-md border",children:[v.jsxs("button",{onClick:()=>l&&o(u=>!u),disabled:!l,className:"flex w-full items-center gap-2 px-3 py-1.5 text-left",children:[v.jsx(AN,{flavor:e.flavor}),v.jsx("span",{className:"font-mono text-sm",children:e.name}),l?v.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:r?"−":"+"}):null]}),r?v.jsxs("div",{className:"space-y-2 border-t p-3",children:[s.map(([u,c])=>v.jsxs("div",{children:[v.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:u}),v.jsx(Sr,{data:c,className:"max-h-72"})]},u)),v.jsx("p",{className:"text-[10px] text-muted-foreground",children:"schema · best-effort (refinements / transforms may be dropped)"})]}):null]})}function nm({label:e,messages:r}){return r.length===0?null:v.jsxs("div",{children:[v.jsx("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:e}),v.jsx("div",{className:"flex flex-col gap-1.5",children:r.map(o=>v.jsx(LN,{message:o},o.name))})]})}function rm({title:e,dir:r}){return r.clientToServer.length===0&&r.serverToClient.length===0?null:v.jsxs("div",{className:"rounded-lg border bg-card/40 p-3",children:[v.jsx("div",{className:"mb-2 text-sm font-semibold",children:e}),v.jsxs("div",{className:"flex flex-col gap-3",children:[v.jsx(nm,{label:"client → server",messages:r.clientToServer}),v.jsx(nm,{label:"server → client",messages:r.serverToClient})]})]})}function $N({contract:e}){return v.jsxs("div",{className:"flex max-w-3xl flex-col gap-3",children:[v.jsx(rm,{title:"shared",dir:e.shared}),Object.entries(e.roles).map(([r,o])=>v.jsx(rm,{title:`role · ${r}`,dir:o},r))]})}function om({fraction:e,color:r,label:o}){return v.jsxs("span",{className:"inline-flex items-center gap-2",children:[v.jsx("span",{className:"h-1.5 w-16 shrink-0 overflow-hidden rounded-full bg-secondary",children:v.jsx("span",{className:"block h-full rounded-full",style:{width:`${e*100}%`,background:r}})}),v.jsx("span",{className:"w-14 text-right text-xs tabular-nums text-muted-foreground",children:o})]})}function ic({label:e,groups:r,selected:o,onChange:s}){const[l,u]=I.useState(!1),c=I.useRef(null);I.useEffect(()=>{if(!l)return;const x=m=>{c.current&&!c.current.contains(m.target)&&u(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[l]);const f=x=>{const m=new Set(o);m.has(x)?m.delete(x):m.add(x),s(m)},h=x=>{const m=x.options.every(w=>o.has(w.value)),y=new Set(o);for(const w of x.options)m?y.delete(w.value):y.add(w.value);s(y)},g=o.size===0?`All ${e.toLowerCase()}`:`${e}: ${o.size}`;return v.jsxs("div",{ref:c,className:"relative",children:[v.jsxs("button",{onClick:()=>u(x=>!x),className:Oe("inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs transition-colors",o.size>0?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/40"),children:[g,v.jsx(Hx,{className:"h-3 w-3"})]}),l?v.jsx("div",{className:"absolute z-20 mt-1 max-h-72 w-56 overflow-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md",children:r.map(x=>{const m=r.length>1||x.label!=="",y=x.options.every(w=>o.has(w.value));return v.jsxs("div",{className:"mb-1 last:mb-0",children:[m?v.jsxs("button",{onClick:()=>h(x),className:"flex w-full items-center justify-between px-2 py-1 text-[10px] uppercase tracking-wide text-muted-foreground hover:text-foreground",children:[x.label,v.jsx("span",{children:y?"clear":"all"})]}):null,x.options.map(w=>v.jsxs("button",{onClick:()=>f(w.value),className:"flex w-full items-center gap-2 rounded px-2 py-1 text-left text-xs hover:bg-accent/40",children:[v.jsx("span",{className:Oe("flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded border",o.has(w.value)&&"border-primary bg-primary text-primary-foreground"),children:o.has(w.value)?v.jsx(Sm,{className:"h-2.5 w-2.5"}):null}),v.jsx("span",{className:"truncate",children:w.label})]},w.value))]},x.label)})}):null]})}function _0(e,[r,o]){return Math.min(o,Math.max(r,e))}function io(e,r,{checkForDefaultPrevented:o=!0}={}){return function(l){if(e==null||e(l),o===!1||!l.defaultPrevented)return r==null?void 0:r(l)}}function im(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function DN(...e){return r=>{let o=!1;const s=e.map(l=>{const u=im(l,r);return!o&&typeof u=="function"&&(o=!0),u});if(o)return()=>{for(let l=0;l<s.length;l++){const u=s[l];typeof u=="function"?u():im(e[l],null)}}}}function Qn(...e){return I.useCallback(DN(...e),e)}function E0(e,r=[]){let o=[];function s(u,c){const f=I.createContext(c);f.displayName=u+"Context";const h=o.length;o=[...o,c];const g=m=>{var E;const{scope:y,children:w,..._}=m,C=((E=y==null?void 0:y[e])==null?void 0:E[h])||f,S=I.useMemo(()=>_,Object.values(_));return v.jsx(C.Provider,{value:S,children:w})};g.displayName=u+"Provider";function x(m,y){var C;const w=((C=y==null?void 0:y[e])==null?void 0:C[h])||f,_=I.useContext(w);if(_)return _;if(c!==void 0)return c;throw new Error(`\`${m}\` must be used within \`${u}\``)}return[g,x]}const l=()=>{const u=o.map(c=>I.createContext(c));return function(f){const h=(f==null?void 0:f[e])||u;return I.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return l.scopeName=e,[s,ON(l,...r)]}function ON(...e){const r=e[0];if(e.length===1)return r;const o=()=>{const s=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(u){const c=s.reduce((f,{useScope:h,scopeName:g})=>{const m=h(u)[`__scope${g}`];return{...f,...m}},{});return I.useMemo(()=>({[`__scope${r.scopeName}`]:c}),[c])}};return o.scopeName=r.scopeName,o}var N0=globalThis!=null&&globalThis.document?I.useLayoutEffect:()=>{},FN=xm[" useInsertionEffect ".trim().toString()]||N0;function VN({prop:e,defaultProp:r,onChange:o=()=>{},caller:s}){const[l,u,c]=BN({defaultProp:r,onChange:o}),f=e!==void 0,h=f?e:l;{const x=I.useRef(e!==void 0);I.useEffect(()=>{const m=x.current;m!==f&&console.warn(`${s} is changing from ${m?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=f},[f,s])}const g=I.useCallback(x=>{var m;if(f){const y=HN(x)?x(e):x;y!==e&&((m=c.current)==null||m.call(c,y))}else u(x)},[f,e,u,c]);return[h,g]}function BN({defaultProp:e,onChange:r}){const[o,s]=I.useState(e),l=I.useRef(o),u=I.useRef(r);return FN(()=>{u.current=r},[r]),I.useEffect(()=>{var c;l.current!==o&&((c=u.current)==null||c.call(u,o),l.current=o)},[o,l]),[o,s,u]}function HN(e){return typeof e=="function"}var WN=I.createContext(void 0);function UN(e){const r=I.useContext(WN);return e||r||"ltr"}function YN(e){const r=I.useRef({value:e,previous:e});return I.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}function XN(e){const[r,o]=I.useState(void 0);return N0(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const u=l[0];let c,f;if("borderBoxSize"in u){const h=u.borderBoxSize,g=Array.isArray(h)?h[0]:h;c=g.inlineSize,f=g.blockSize}else c=e.offsetWidth,f=e.offsetHeight;o({width:c,height:f})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else o(void 0)},[e]),r}function Nc(e){const r=I.forwardRef((o,s)=>{let{children:l,...u}=o,c=null,f=!1;const h=[];sm(l)&&typeof pl=="function"&&(l=pl(l._payload)),I.Children.forEach(l,y=>{var w;if(ZN(y)){f=!0;const _=y;let C="child"in _.props?_.props.child:_.props.children;sm(C)&&typeof pl=="function"&&(C=pl(C._payload)),c=KN(_,C),h.push((w=c==null?void 0:c.props)==null?void 0:w.children)}else h.push(y)}),c?c=I.cloneElement(c,void 0,h):!f&&I.Children.count(l)===1&&I.isValidElement(l)&&(c=l);const g=c?QN(c):void 0,x=Qn(s,g);if(!c){if(l||l===0)throw new Error(f?nC(e):tC(e));return l}const m=qN(u,c.props??{});return c.type!==I.Fragment&&(m.ref=s?x:g),I.cloneElement(c,m)});return r.displayName=`${e}.Slot`,r}var GN=Symbol.for("radix.slottable"),KN=(e,r)=>{if("child"in e.props){const o=e.props.child;return I.isValidElement(o)?I.cloneElement(o,void 0,e.props.children(o.props.children)):null}return I.isValidElement(r)?r:null};function qN(e,r){const o={...r};for(const s in r){const l=e[s],u=r[s];/^on[A-Z]/.test(s)?l&&u?o[s]=(...f)=>{const h=u(...f);return l(...f),h}:l&&(o[s]=l):s==="style"?o[s]={...l,...u}:s==="className"&&(o[s]=[l,u].filter(Boolean).join(" "))}return{...e,...o}}function QN(e){var s,l;let r=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=(l=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:l.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function ZN(e){return I.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===GN}var JN=Symbol.for("react.lazy");function sm(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===JN&&"_payload"in e&&eC(e._payload)}function eC(e){return typeof e=="object"&&e!==null&&"then"in e}var tC=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,nC=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,pl=xm[" use ".trim().toString()],rC=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ti=rC.reduce((e,r)=>{const o=Nc(`Primitive.${r}`),s=I.forwardRef((l,u)=>{const{asChild:c,...f}=l,h=c?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(h,{...f,ref:u})});return s.displayName=`Primitive.${r}`,{...e,[r]:s}},{});function oC(e){const r=e+"CollectionProvider",[o,s]=E0(r),[l,u]=o(r,{collectionRef:{current:null},itemMap:new Map}),c=C=>{const{scope:S,children:E}=C,P=I.useRef(null),N=I.useRef(new Map).current;return v.jsx(l,{scope:S,itemMap:N,collectionRef:P,children:E})};c.displayName=r;const f=e+"CollectionSlot",h=Nc(f),g=I.forwardRef((C,S)=>{const{scope:E,children:P}=C,N=u(f,E),M=Qn(S,N.collectionRef);return v.jsx(h,{ref:M,children:P})});g.displayName=f;const x=e+"CollectionItemSlot",m="data-radix-collection-item",y=Nc(x),w=I.forwardRef((C,S)=>{const{scope:E,children:P,...N}=C,M=I.useRef(null),$=Qn(S,M),D=u(x,E);return I.useEffect(()=>(D.itemMap.set(M,{ref:M,...N}),()=>void D.itemMap.delete(M))),v.jsx(y,{[m]:"",ref:$,children:P})});w.displayName=x;function _(C){const S=u(e+"CollectionConsumer",C);return I.useCallback(()=>{const P=S.collectionRef.current;if(!P)return[];const N=Array.from(P.querySelectorAll(`[${m}]`));return Array.from(S.itemMap.values()).sort((D,H)=>N.indexOf(D.ref.current)-N.indexOf(H.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:c,Slot:g,ItemSlot:w},_,s]}var C0=["PageUp","PageDown"],b0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],M0={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},vo="Slider",[Cc,iC,sC]=oC(vo),[nd]=E0(vo,[sC]),[lC,Ai]=nd(vo),j0=I.forwardRef((e,r)=>{const{name:o,min:s=0,max:l=100,step:u=1,orientation:c="horizontal",disabled:f=!1,minStepsBetweenThumbs:h=0,defaultValue:g=[s],value:x,onValueChange:m=()=>{},onValueCommit:y=()=>{},inverted:w=!1,form:_,...C}=e,S=I.useRef(new Set),E=I.useRef(0),P=I.useRef(!1),M=c==="horizontal"?aC:uC,[$=[],D]=VN({prop:x,defaultProp:g,onChange:V=>{var z;(z=[...S.current][E.current])==null||z.focus({preventScroll:!0,focusVisible:P.current}),P.current=!1,m(V)}}),H=I.useRef($);function G(V){const ee=pC($,V);O(V,ee)}function K(V){O(V,E.current)}function te(){const V=H.current[E.current];$[E.current]!==V&&y($)}function O(V,ee,{commit:z}={commit:!1}){const Y=yC(u),F=xC(Math.round((V-s)/u)*u+s,Y),U=_0(F,[s,l]);D((A=[])=>{const T=dC(A,U,ee);if(gC(T,h*u)){E.current=T.indexOf(U);const W=String(T)!==String(A);return W&&z&&y(T),W?T:A}else return A})}return v.jsx(lC,{scope:e.__scopeSlider,name:o,disabled:f,min:s,max:l,valueIndexToChangeRef:E,thumbs:S.current,values:$,orientation:c,form:_,children:v.jsx(Cc.Provider,{scope:e.__scopeSlider,children:v.jsx(Cc.Slot,{scope:e.__scopeSlider,children:v.jsx(M,{"aria-disabled":f,"data-disabled":f?"":void 0,...C,ref:r,onPointerDown:io(C.onPointerDown,()=>{f||(H.current=$,P.current=!1)}),min:s,max:l,inverted:w,onSlideStart:f?void 0:G,onSlideMove:f?void 0:K,onSlideEnd:f?void 0:te,onHomeKeyDown:()=>{f||(P.current=!0,O(s,0,{commit:!0}))},onEndKeyDown:()=>{f||(P.current=!0,O(l,$.length-1,{commit:!0}))},onStepKeyDown:({event:V,direction:ee})=>{if(!f){P.current=!0;const F=C0.includes(V.key)||V.shiftKey&&b0.includes(V.key)?10:1,U=E.current,A=$[U],T=u*F*ee;O(A+T,U,{commit:!0})}}})})})})});j0.displayName=vo;var[P0,z0]=nd(vo,{startEdge:"left",endEdge:"right",size:"width",direction:1}),aC=I.forwardRef((e,r)=>{const{min:o,max:s,dir:l,inverted:u,onSlideStart:c,onSlideMove:f,onSlideEnd:h,onStepKeyDown:g,...x}=e,[m,y]=I.useState(null),w=Qn(r,N=>y(N)),_=I.useRef(void 0),C=UN(l),S=C==="ltr",E=S&&!u||!S&&u;function P(N){const M=_.current||m.getBoundingClientRect(),$=[0,M.width],H=rd($,E?[o,s]:[s,o]);return _.current=M,H(N-M.left)}return v.jsx(P0,{scope:e.__scopeSlider,startEdge:E?"left":"right",endEdge:E?"right":"left",direction:E?1:-1,size:"width",children:v.jsx(I0,{dir:C,"data-orientation":"horizontal",...x,ref:w,style:{...x.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:N=>{const M=P(N.clientX);c==null||c(M)},onSlideMove:N=>{const M=P(N.clientX);f==null||f(M)},onSlideEnd:()=>{_.current=void 0,h==null||h()},onStepKeyDown:N=>{const $=M0[E?"from-left":"from-right"].includes(N.key);g==null||g({event:N,direction:$?-1:1})}})})}),uC=I.forwardRef((e,r)=>{const{min:o,max:s,inverted:l,onSlideStart:u,onSlideMove:c,onSlideEnd:f,onStepKeyDown:h,...g}=e,x=I.useRef(null),m=Qn(r,x),y=I.useRef(void 0),w=!l;function _(C){const S=y.current||x.current.getBoundingClientRect(),E=[0,S.height],N=rd(E,w?[s,o]:[o,s]);return y.current=S,N(C-S.top)}return v.jsx(P0,{scope:e.__scopeSlider,startEdge:w?"bottom":"top",endEdge:w?"top":"bottom",size:"height",direction:w?1:-1,children:v.jsx(I0,{"data-orientation":"vertical",...g,ref:m,style:{...g.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:C=>{const S=_(C.clientY);u==null||u(S)},onSlideMove:C=>{const S=_(C.clientY);c==null||c(S)},onSlideEnd:()=>{y.current=void 0,f==null||f()},onStepKeyDown:C=>{const E=M0[w?"from-bottom":"from-top"].includes(C.key);h==null||h({event:C,direction:E?-1:1})}})})}),I0=I.forwardRef((e,r)=>{const{__scopeSlider:o,onSlideStart:s,onSlideMove:l,onSlideEnd:u,onHomeKeyDown:c,onEndKeyDown:f,onStepKeyDown:h,...g}=e,x=Ai(vo,o);return v.jsx(Ti.span,{...g,ref:r,onKeyDown:io(e.onKeyDown,m=>{m.key==="Home"?(c(m),m.preventDefault()):m.key==="End"?(f(m),m.preventDefault()):C0.concat(b0).includes(m.key)&&(h(m),m.preventDefault())}),onPointerDown:io(e.onPointerDown,m=>{const y=m.target;y.setPointerCapture(m.pointerId),m.preventDefault(),x.thumbs.has(y)?y.focus({preventScroll:!0,focusVisible:!1}):s(m)}),onPointerMove:io(e.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&l(m)}),onPointerUp:io(e.onPointerUp,m=>{const y=m.target;y.hasPointerCapture(m.pointerId)&&(y.releasePointerCapture(m.pointerId),u(m))})})}),R0="SliderTrack",T0=I.forwardRef((e,r)=>{const{__scopeSlider:o,...s}=e,l=Ai(R0,o);return v.jsx(Ti.span,{"data-disabled":l.disabled?"":void 0,"data-orientation":l.orientation,...s,ref:r})});T0.displayName=R0;var bc="SliderRange",A0=I.forwardRef((e,r)=>{const{__scopeSlider:o,...s}=e,l=Ai(bc,o),u=z0(bc,o),c=I.useRef(null),f=Qn(r,c),h=l.values.length,g=l.values.map(y=>W0(y,l.min,l.max)),x=h>1?Math.min(...g):0,m=100-Math.max(...g);return v.jsx(Ti.span,{"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,...s,ref:f,style:{...e.style,[u.startEdge]:x+"%",[u.endEdge]:m+"%"}})});A0.displayName=bc;var L0="SliderThumb",[cC,$0]=nd(L0),D0="SliderThumbProvider";function O0(e){const{__scopeSlider:r,name:o,children:s,internal_do_not_use_render:l}=e,u=Ai(D0,r),c=iC(r),[f,h]=I.useState(null),g=I.useMemo(()=>f?c().findIndex(S=>S.ref.current===f):-1,[c,f]),x=XN(f),m=f?!!u.form||!!f.closest("form"):!0,y=u.values[g],w=o??(u.name?u.name+(u.values.length>1?"[]":""):void 0),_=y===void 0?0:W0(y,u.min,u.max);I.useEffect(()=>{if(f)return u.thumbs.add(f),()=>{u.thumbs.delete(f)}},[f,u.thumbs]);const C={value:y,name:w,form:u.form,isFormControl:m,index:g,thumb:f,onThumbChange:h,percent:_,size:x};return v.jsx(cC,{scope:r,...C,children:vC(l)?l(C):s})}O0.displayName=D0;var vl="SliderThumbTrigger",F0=I.forwardRef((e,r)=>{const{__scopeSlider:o,...s}=e,l=Ai(vl,o),u=z0(vl,o),{index:c,value:f,percent:h,size:g,onThumbChange:x}=$0(vl,o),m=Qn(r,C=>x(C)),y=fC(c,l.values.length),w=g==null?void 0:g[u.size],_=w?hC(w,h,u.direction):0;return v.jsx("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${h}% + ${_}px)`},children:v.jsx(Cc.ItemSlot,{scope:o,children:v.jsx(Ti.span,{role:"slider","aria-label":e["aria-label"]||y,"aria-valuemin":l.min,"aria-valuenow":f,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...s,ref:m,style:f===void 0?{display:"none"}:e.style,onFocus:io(e.onFocus,()=>{l.valueIndexToChangeRef.current=c})})})})});F0.displayName=vl;var V0=I.forwardRef((e,r)=>{const{__scopeSlider:o,name:s,...l}=e;return v.jsx(O0,{__scopeSlider:o,name:s,internal_do_not_use_render:({index:u,isFormControl:c})=>v.jsxs(v.Fragment,{children:[v.jsx(F0,{...l,ref:r,__scopeSlider:o}),c?v.jsx(H0,{__scopeSlider:o},u):null]})})});V0.displayName=L0;var B0="SliderBubbleInput",H0=I.forwardRef(({__scopeSlider:e,...r},o)=>{const{value:s,name:l,form:u}=$0(B0,e),c=I.useRef(null),f=Qn(c,o),h=YN(s);return I.useEffect(()=>{const g=c.current;if(!g)return;const x=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(x,"value").set;if(h!==s&&y){const w=new Event("input",{bubbles:!0});y.call(g,s),g.dispatchEvent(w)}},[h,s]),v.jsx(Ti.input,{style:{display:"none"},name:l,form:u,...r,ref:f,defaultValue:s})});H0.displayName=B0;function dC(e=[],r,o){const s=[...e];return s[o]=r,s.sort((l,u)=>l-u)}function W0(e,r,o){const u=100/(o-r)*(e-r);return _0(u,[0,100])}function fC(e,r){return r>2?`Value ${e+1} of ${r}`:r===2?["Minimum","Maximum"][e]:void 0}function pC(e,r){if(e.length===1)return 0;const o=e.map(l=>Math.abs(l-r)),s=Math.min(...o);return o.indexOf(s)}function hC(e,r,o){const s=e/2,u=rd([0,50],[0,s]);return(s-u(r)*o)*o}function mC(e){return e.slice(0,-1).map((r,o)=>e[o+1]-r)}function gC(e,r){if(r>0){const o=mC(e);return Math.min(...o)>=r}return!0}function rd(e,r){return o=>{if(e[0]===e[1]||r[0]===r[1])return r[0];const s=(r[1]-r[0])/(e[1]-e[0]);return r[0]+s*(o-e[0])}}function yC(e){if(!Number.isFinite(e))return 0;const r=e.toString();if(r.includes("e")){const[s,l]=r.split("e"),u=s.split(".")[1]||"",c=Number(l);return Math.max(0,u.length-c)}const o=r.split(".")[1];return o?o.length:0}function xC(e,r){const o=Math.pow(10,r);return Math.round(e*o)/o}function vC(e){return typeof e=="function"}const Mc=I.forwardRef(({className:e,...r},o)=>v.jsxs(j0,{ref:o,className:Oe("relative flex w-full touch-none select-none items-center",e),...r,children:[v.jsx(T0,{className:"relative h-1.5 w-full grow overflow-hidden rounded-full bg-secondary",children:v.jsx(A0,{className:"absolute h-full bg-primary"})}),(r.value??r.defaultValue??[]).map((s,l)=>v.jsx(V0,{className:"block h-3.5 w-3.5 rounded-full border border-primary/60 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"},l))]}));Mc.displayName="Slider";const wC=[{id:"lifecycle",label:"Lifecycle"},{id:"requests",label:"Requests"},{id:"events",label:"Events"},{id:"stores",label:"Store"}],lm={websocket:"WebSocket",http:"HTTP",libp2p:"libp2p",loopback:"Loopback",unknown:"unknown"},am=e=>e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.round(e/6e4)}m`;function um(e,r,o){const s=new Set(e.map(u=>u.value)),l=[...r].filter(u=>!s.has(u)).map(u=>({value:u,label:o(u)}));return[...e,...l]}function SC({event:e,resolver:r}){const o=Jc(e,r);return o?o.kind==="one"?v.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground",children:[v.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:o.color}}),o.label]}):v.jsx("span",{className:"inline-flex items-center gap-1.5 text-[10px] text-muted-foreground",children:o.parts.map(s=>v.jsxs("span",{className:"inline-flex items-center gap-0.5",children:[v.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:s.color}}),s.short,"×",s.count]},s.short))}):null}const kC=["json","jsonl","csv"];function sc(e,r,o){const s=URL.createObjectURL(new Blob([e],{type:o})),l=document.createElement("a");l.href=s,l.download=r,l.click(),URL.revokeObjectURL(s)}function _C({disabled:e,onExport:r}){const[o,s]=I.useState(!1),l=I.useRef(null);return I.useEffect(()=>{if(!o)return;const u=c=>{l.current&&!l.current.contains(c.target)&&s(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[o]),v.jsxs("div",{ref:l,className:"relative ml-auto",children:[v.jsxs("button",{disabled:e,onClick:()=>s(u=>!u),className:Oe("inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs transition-colors",e?"cursor-not-allowed opacity-50":"text-muted-foreground hover:bg-accent/40"),children:[v.jsx(Xx,{className:"h-3.5 w-3.5"}),"Export"]}),o?v.jsx("div",{className:"absolute right-0 z-20 mt-1 w-28 rounded-md border bg-popover p-1 text-popover-foreground shadow-md",children:kC.map(u=>v.jsx("button",{onClick:()=>{s(!1),r(u)},className:"w-full rounded px-2 py-1 text-left text-xs uppercase hover:bg-accent/40",children:u},u))}):null]})}const EC=7;function NC({env:e,resolver:r,summary:o,latency:s,maxBytes:l,maxLatency:u}){const c=e.event,[f,h]=I.useState(!1),g=km(c),x=g!==void 0;return v.jsxs(v.Fragment,{children:[v.jsxs("tr",{onClick:()=>x&&h(m=>!m),className:Oe("border-b last:border-0",x&&"cursor-pointer hover:bg-accent/40"),children:[v.jsx("td",{className:"px-3 py-1.5",children:v.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[x?v.jsx(Wx,{className:Oe("h-3 w-3 shrink-0 text-muted-foreground transition-transform",f&&"rotate-90")}):v.jsx("span",{className:"w-3 shrink-0"}),v.jsx("span",{className:Oe("h-2 w-2 shrink-0 rounded-full",lN(c.type))}),v.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:c.type})]})}),v.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:v.jsx("span",{className:"block max-w-[22rem] truncate",children:o})}),v.jsx("td",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:r.nodeName(e.originNodeId)}),v.jsxs("td",{className:"whitespace-nowrap px-3 py-1.5 text-xs text-muted-foreground",children:[ed(e.ts)," ",v.jsxs("span",{className:"opacity-60",children:["· ",td(e.ts)]})]}),v.jsx("td",{className:"px-3 py-1.5",children:e.byteSize===void 0?v.jsx("span",{className:"text-xs text-muted-foreground",children:"—"}):v.jsx(om,{fraction:qh(e.byteSize,l),color:pN(e.byteSize),label:Ec(e.byteSize)})}),v.jsx("td",{className:"px-3 py-1.5",children:s===void 0?v.jsx("span",{className:"text-xs text-muted-foreground",children:"—"}):v.jsx(om,{fraction:qh(s,u),color:fN(s),label:`${s} ms`})}),v.jsx("td",{className:"px-3 py-1.5",children:v.jsx(SC,{event:c,resolver:r})})]}),f&&x?v.jsx("tr",{className:"border-b last:border-0",children:v.jsx("td",{colSpan:EC,className:"px-3 pb-2",children:v.jsx(Sr,{data:g,className:"max-h-60"})})}):null]})}function lc({col:e,label:r,sort:o,onSort:s,align:l="right"}){const u=(o==null?void 0:o.col)===e;return v.jsxs("th",{onClick:()=>s(e),className:Oe("cursor-pointer select-none px-3 py-2 font-medium hover:text-foreground",l==="right"&&"text-right"),children:[r,u?o.dir==="asc"?" ↑":" ↓":""]})}function CC({events:e,connections:r=[],topology:o=[]}){const[s,l]=I.useState(!1),[u,c]=I.useState([]),[f,h]=I.useState(null),[g,x]=I.useState(tm),[m,y]=I.useState(null),w=j=>x(J=>({...J,...j})),_=()=>{c(e),h(Date.now()),l(!0)},C=()=>{s?l(!1):_()},S=j=>{s||_(),y(J=>(J==null?void 0:J.col)!==j?{col:j,dir:"desc"}:J.dir==="desc"?{col:j,dir:"asc"}:null)},E=I.useRef(new WeakMap),P=I.useRef(0),N=j=>{let J=E.current.get(j);return J===void 0&&(J=P.current++,E.current.set(j,J)),J},M=I.useMemo(()=>{const j=new Map(r.map(ne=>[ne.id,ne])),J=new Map(r.map(ne=>[ne.nodeId,ne.nodeName]));return{conn:ne=>j.get(ne),nodeName:ne=>J.get(ne)??ne.slice(0,8),roomWires:ne=>zl(r.filter(ae=>ae.rooms.includes(ne)))}},[r]),$=wC.map(j=>({label:j.label,options:yN.filter(J=>sN(J)===j.id).map(J=>({value:J,label:J}))})),D=[{label:"",options:um(o.map(j=>({value:j.nodeId,label:j.nodeName})),g.nodes,j=>M.nodeName(j))}],H=zl(r).map(j=>j.family),G=[{label:"",options:um(H.map(j=>({value:j,label:lm[j]})),g.wires,j=>lm[j])}],[,K]=I.useState(0),te=!s&&g.windowMs!==null;I.useEffect(()=>{if(!te)return;const j=setInterval(()=>K(J=>J+1),1e3);return()=>clearInterval(j)},[te]);const O=s?u:e,V=I.useMemo(()=>hN(O),[O]),ee=EN(s,f,Date.now()),z=O.map(j=>({en:j,summary:iN(j.event,M),latency:mN(j,V),families:gN(j.event,M)})).filter(j=>NN(j.en,g,{summary:j.summary,latency:j.latency,families:j.families,nowAnchor:ee}));if(m&&s){const j=J=>m.col==="time"?J.en.ts:m.col==="size"?J.en.byteSize??-1:J.latency??-1;z.sort((J,ne)=>(j(J)-j(ne))*(m.dir==="asc"?1:-1))}const Y=z.reduce((j,J)=>Math.max(j,J.en.byteSize??0),0),F=z.reduce((j,J)=>Math.max(j,J.latency??0),0),U=j=>{const J=z.map(ce=>bN(ce.en,ce.summary,ce.latency,M)),ne=new Date,ae=ne.toISOString().replace(/[:.]/g,"-");if(j==="json"){const ce=o.map(Z=>({nodeId:Z.nodeId,nodeName:Z.nodeName})),ue=zN(J,{exportedAt:ne.toISOString(),filters:g,nodes:ce});sc(ue,`live-feed-${ae}.json`,"application/json")}else j==="jsonl"?sc(PN(J),`live-feed-${ae}.jsonl`,"application/x-ndjson"):sc(jN(J),`live-feed-${ae}.csv`,"text/csv")},A=g.latency?[Math.round(Zh(g.latency[0])*1e3),Math.round(Zh(g.latency[1])*1e3)]:[0,1e3],T=j=>w({latency:wN(j[0]??0,j[1]??1e3)}),W=g.size?[Math.round(em(g.size[0])*1e3),Math.round(em(g.size[1])*1e3)]:[0,1e3],b=j=>w({size:kN(j[0]??0,j[1]??1e3)});return v.jsxs("div",{className:"flex h-full flex-col gap-2",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[v.jsx("input",{value:g.text,onChange:j=>w({text:j.target.value}),placeholder:"Filter…",className:"w-36 rounded-md border bg-transparent px-2 py-1 text-xs outline-none focus:ring-1 focus:ring-ring"}),v.jsx(ic,{label:"Types",groups:$,selected:g.types,onChange:j=>w({types:j})}),o.length>1||g.nodes.size>0?v.jsx(ic,{label:"Nodes",groups:D,selected:g.nodes,onChange:j=>w({nodes:j})}):null,H.length>1||g.wires.size>0?v.jsx(ic,{label:"Wires",groups:G,selected:g.wires,onChange:j=>w({wires:j})}):null,v.jsx("div",{className:"inline-flex overflow-hidden rounded-md border text-xs",children:xN.map(j=>v.jsx("button",{onClick:()=>w({windowMs:j.ms}),className:Oe("px-2 py-1 transition-colors",g.windowMs===j.ms?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/40"),children:j.label},j.label))}),v.jsxs("div",{className:"inline-flex items-center gap-2 rounded-md border px-2 py-1",children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Latency"}),v.jsx(Mc,{value:A,min:0,max:1e3,step:1,onValueChange:T,className:"w-28"}),v.jsx("span",{className:"w-24 text-right text-[10px] tabular-nums text-muted-foreground",children:g.latency?`${am(g.latency[0])}–${am(g.latency[1])}`:"any"})]}),v.jsxs("div",{className:"inline-flex items-center gap-2 rounded-md border px-2 py-1",children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:"Size"}),v.jsx(Mc,{value:W,min:0,max:1e3,step:1,onValueChange:b,className:"w-28"}),v.jsx("span",{className:"w-24 text-right text-[10px] tabular-nums text-muted-foreground",children:g.size?`${Ec(Math.round(g.size[0]))}–${Ec(Math.round(g.size[1]))}`:"any"})]}),_N(g)?v.jsxs("button",{onClick:()=>x(tm()),className:"inline-flex items-center gap-1 rounded-md border px-2 py-1 text-xs text-muted-foreground hover:bg-accent/40",children:[v.jsx(iv,{className:"h-3 w-3"}),"Reset"]}):null,v.jsx(_C,{disabled:z.length===0,onExport:U}),v.jsxs("button",{onClick:C,className:Oe("inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs transition-colors",s?"bg-amber-400/20 text-amber-300":"text-muted-foreground hover:bg-accent/40"),children:[s?v.jsx(tv,{className:"h-3.5 w-3.5"}):v.jsx(ev,{className:"h-3.5 w-3.5"}),s?"Paused":"Pause"]})]}),z.length===0?v.jsx("p",{className:"text-sm text-muted-foreground",children:e.length===0?"Waiting for events…":"No events match the filter."}):v.jsx("div",{className:"min-h-0 flex-1 overflow-auto rounded-md border",children:v.jsxs("table",{className:"w-full border-collapse text-sm",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"border-b bg-card/50 text-left text-[11px] uppercase tracking-wide text-muted-foreground",children:[v.jsx("th",{className:"px-3 py-2 font-medium",children:"type"}),v.jsx("th",{className:"px-3 py-2 font-medium",children:"summary"}),v.jsx("th",{className:"px-3 py-2 font-medium",children:"node"}),v.jsx(lc,{col:"time",label:"time",sort:m,onSort:S,align:"left"}),v.jsx(lc,{col:"size",label:"size",sort:m,onSort:S,align:"left"}),v.jsx(lc,{col:"latency",label:"latency",sort:m,onSort:S,align:"left"}),v.jsx("th",{className:"px-3 py-2 font-medium",children:"wire"})]})}),v.jsx("tbody",{children:z.map(j=>v.jsx(NC,{env:j.en,resolver:M,summary:j.summary,latency:j.latency,maxBytes:Y,maxLatency:F},N(j.en)))})]})})]})}function bC({client:e}){const[r,o]=I.useState([]),[s,l]=I.useState(null),[u,c]=I.useState([]),[f,h]=I.useState(null),[g,x]=I.useState(null),[m,y]=I.useState(null),w=I.useRef({store:s,id:f});w.current={store:s,id:f},I.useEffect(()=>{e&&e.listStores().then(o).catch(()=>{})},[e]);const _=I.useCallback(S=>{e==null||e.listResources(S).then(c).catch(()=>{})},[e]),C=I.useCallback((S,E)=>{e==null||e.readResource(S,E).then(P=>{x(P),y(null)}).catch(P=>y(P instanceof Error?P.message:String(P)))},[e]);return I.useEffect(()=>{s&&_(s)},[s,_]),I.useEffect(()=>{s&&f&&C(s,f)},[s,f,C]),I.useEffect(()=>{if(e)return e.onEvent(({event:S})=>{!("store"in S)||S.store!==w.current.store||(S.type==="store.create"||S.type==="store.delete"?_(S.store):"id"in S&&S.id===w.current.id&&C(S.store,S.id))})},[e,_,C]),v.jsxs("div",{className:"flex h-full gap-3",children:[v.jsxs(cm,{title:"Stores",children:[r.map(S=>v.jsxs(dm,{active:S.name===s,onClick:()=>{l(S.name),h(null),x(null)},children:[v.jsx("span",{className:"truncate",children:S.name}),S.model?v.jsx(uc,{variant:"muted",className:"ml-auto uppercase",children:S.model}):null]},S.name)),r.length===0&&v.jsx(hi,{children:"No stores configured."})]}),v.jsx(cm,{title:"Resources",children:s==null?v.jsx(hi,{children:"Select a store."}):u.length===0?v.jsx(hi,{children:"No resources."}):u.map(S=>v.jsx(dm,{active:S===f,onClick:()=>h(S),children:v.jsx("span",{className:"truncate font-mono text-xs",children:S})},S))}),v.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-3 overflow-auto",children:f==null?v.jsx(hi,{children:"Select a resource."}):m?v.jsx("p",{className:"text-sm text-destructive",children:m}):g?v.jsxs(v.Fragment,{children:[v.jsxs("section",{children:[v.jsx("h3",{className:"mb-1 text-xs font-semibold text-muted-foreground",children:"Value"}),v.jsx(Sr,{data:g.data})]}),v.jsxs("section",{children:[v.jsx("h3",{className:"mb-1 text-xs font-semibold text-muted-foreground",children:"Access rules"}),v.jsx(Sr,{data:g.accessRules})]})]}):v.jsx(hi,{children:"Loading…"})})]})}function cm({title:e,children:r}){return v.jsxs("div",{className:"flex w-56 shrink-0 flex-col rounded-md border bg-card/40",children:[v.jsx("div",{className:"border-b px-3 py-2 text-xs font-semibold text-muted-foreground",children:e}),v.jsx("div",{className:"flex flex-col gap-0.5 overflow-auto p-1",children:r})]})}function dm({active:e,onClick:r,children:o}){return v.jsx("button",{onClick:r,className:Oe("flex items-center gap-2 rounded px-2 py-1.5 text-left text-sm transition-colors",e?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:o})}function hi({children:e}){return v.jsx("p",{className:"p-3 text-sm text-muted-foreground",children:e})}function U0({className:e,...r}){return v.jsx("div",{className:Oe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r})}function Y0({className:e,...r}){return v.jsx("div",{className:Oe("flex flex-col gap-1 px-4 py-3 border-b",e),...r})}function X0({className:e,...r}){return v.jsx("div",{className:Oe("text-sm font-semibold tracking-tight",e),...r})}function G0({className:e,...r}){return v.jsx("div",{className:Oe("p-4",e),...r})}function K0({status:e}){const r=e==="open"?"bg-primary":e==="connecting"?"bg-muted-foreground":"bg-destructive";return v.jsxs("span",{className:"inline-flex items-center gap-2 text-xs text-muted-foreground",children:[v.jsx("span",{className:Oe("h-2 w-2 rounded-full",r)}),e]})}function MC({url:e,status:r,onConnect:o}){const[s,l]=I.useState(e);I.useEffect(()=>{l(e)},[e]);const u=s.trim()!==e;return v.jsx("div",{className:"max-w-2xl",children:v.jsxs(U0,{children:[v.jsxs(Y0,{children:[v.jsx(X0,{children:"Inspector connection"}),v.jsxs("p",{className:"text-xs text-muted-foreground",children:["The WebSocket endpoint of a super-line server started with ",v.jsx("code",{children:"inspector: true"}),". Saved to this browser and reused next time."]})]}),v.jsxs(G0,{className:"flex flex-col gap-3",children:[v.jsx("label",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",htmlFor:"cc-url",children:"URL"}),v.jsxs("form",{className:"flex items-center gap-2",onSubmit:c=>{c.preventDefault(),o(s.trim())},children:[v.jsx("input",{id:"cc-url",value:s,onChange:c=>l(c.target.value),placeholder:"ws://localhost:3000",className:"h-9 w-full rounded-md border bg-background px-3 text-sm outline-none focus:ring-2 focus:ring-ring"}),v.jsx(k0,{type:"submit",size:"sm",variant:u?"default":"secondary",children:u?"Connect":"Reconnect"})]}),v.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[v.jsx("span",{children:"Status"}),v.jsx(K0,{status:r})]})]})]})})}const jC=[{icon:ov,title:"super-line",href:"https://mertdogar.github.io/super-line/",blurb:"The home page — what super-line is and why a strictly-typed realtime data bus."},{icon:Vx,title:"Documentation",href:"https://mertdogar.github.io/super-line/guide/getting-started",blurb:"Guides, the full API reference, and runnable examples."},{icon:qx,title:"GitHub",href:"https://github.com/mertdogar/super-line",blurb:"Browse the source, report issues, and contribute."},{icon:Jx,title:"npm",href:"https://www.npmjs.com/package/@super-line/core",blurb:"The @super-line/* packages — core, server, client, react, adapters."}];function PC(){return v.jsx("div",{className:"grid max-w-3xl grid-cols-1 gap-3 sm:grid-cols-2",children:jC.map(e=>v.jsx("a",{href:e.href,target:"_blank",rel:"noreferrer",className:"group block",children:v.jsxs(U0,{className:"h-full transition-colors hover:border-primary/60 hover:bg-accent/30",children:[v.jsx(Y0,{children:v.jsxs(X0,{className:"flex items-center gap-2",children:[v.jsx(e.icon,{className:"h-4 w-4 text-primary"}),e.title,v.jsx(Gx,{className:"ml-auto h-3.5 w-3.5 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})}),v.jsx(G0,{className:"text-xs text-muted-foreground",children:e.blurb})]})},e.title))})}function zC({status:e}){return v.jsx("svg",{viewBox:"0 0 44 24",className:"h-6 w-11 shrink-0",role:"img","aria-label":`super-line — inspector ${e}`,children:v.jsxs("g",{fill:"none",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M2 12 H12",className:"stroke-foreground/80"}),v.jsx("path",{d:"M12 12 L18 4 L25 20 L31 12",vectorEffect:"non-scaling-stroke",className:Oe("transition-all duration-700 [transform-box:fill-box] [transform-origin:center]",e==="closed"?"scale-y-[0.04] stroke-muted-foreground":"stroke-primary",e==="connecting"&&"cc-breathe")}),v.jsx("path",{d:"M31 12 H42",className:"stroke-foreground/80"}),e==="open"?v.jsx("path",{d:"M2 12 H12 L18 4 L25 20 L31 12 H42",pathLength:100,className:"cc-sweep stroke-primary"}):null]})})}const IC="0.8.0",fm=[{id:"topology",label:"Topology",icon:Zx},{id:"connections",label:"Connections",icon:Bx},{id:"contract",label:"Contract",icon:Kx},{id:"stores",label:"Stores",icon:Yx},{id:"feed",label:"Live feed",icon:nv}],pm=[{id:"settings",label:"Settings",icon:rv},{id:"resources",label:"Resources",icon:Qx}],q0="superline.cc.url",RC="ws://localhost:3000";function TC(){const e=new URLSearchParams(window.location.search).get("url");if(e)return e;try{const o=localStorage.getItem(q0);if(o)return o}catch{}const r=window.__CC_DEFAULT_URL__;return r||RC}function hm({item:e,active:r,onClick:o}){return v.jsxs("button",{onClick:o,className:Oe("flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",r?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[v.jsx(e.icon,{className:"h-4 w-4"}),e.label]})}function AC(){const[e,r]=I.useState(TC),[o,s]=I.useState("topology"),{client:l,status:u}=uv(e),[c,f]=I.useState([]),[h,g]=I.useState([]),[x,m]=I.useState(null),[y,w]=I.useState(null),[_,C]=I.useState([]),[S,E]=I.useState(null),[P,N]=I.useState(null),M=I.useCallback(O=>{r(O);try{localStorage.setItem(q0,O)}catch{}},[]);I.useEffect(()=>{if(!l||u!=="open")return;let O=!0;const V=()=>{Promise.all([l.getTopology(),l.listConnections(),l.getContract(),l.getNode()]).then(([z,Y,F,U])=>{O&&(f(z),g(Y),m(F),w(U))}).catch(()=>{})};V();const ee=l.onEvent(z=>{O&&(C(Y=>[z,...Y].slice(0,200)),V())});return()=>{O=!1,ee()}},[l,u]);const $=c.reduce((O,V)=>O+V.connections,0),D=I.useMemo(()=>[...new Set(h.map(O=>O.role))].sort(),[h]),H=I.useMemo(()=>eN(h),[h]),G=I.useMemo(()=>zl(h),[h]),K=[...fm,...pm].find(O=>O.id===o),te=o==="connections"?`${h.length} connections`:o==="feed"?`${_.length} events`:"";return v.jsxs("div",{className:"flex h-screen w-screen overflow-hidden",children:[v.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r bg-card/40",children:[v.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-4",children:[v.jsx(zC,{status:u}),v.jsxs("div",{className:"leading-none",children:[v.jsxs("div",{className:"text-[15px] font-bold tracking-tight",children:["super-",v.jsx("span",{className:"text-primary",children:"line"})]}),v.jsx("div",{className:"mt-1 text-[10px] font-medium uppercase tracking-[0.2em] text-muted-foreground",children:"Control Center"})]})]}),v.jsx("nav",{className:"flex flex-col gap-1 px-2",children:fm.map(O=>v.jsx(hm,{item:O,active:o===O.id,onClick:()=>s(O.id)},O.id))}),v.jsx("nav",{className:"mt-auto flex flex-col gap-1 border-t px-2 py-2",children:pm.map(O=>v.jsx(hm,{item:O,active:o===O.id,onClick:()=>s(O.id)},O.id))}),v.jsxs("div",{className:"px-4 py-3 text-[11px] text-muted-foreground",children:["v",IC]})]}),v.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[v.jsxs("header",{className:"flex items-center justify-between gap-3 border-b px-4 py-3",children:[v.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[K?v.jsx(K.icon,{className:"h-4 w-4 text-muted-foreground"}):null,K==null?void 0:K.label,te?v.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:te}):null]}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(K0,{status:u}),v.jsxs(uc,{variant:"muted",children:[c.length," nodes"]}),v.jsxs(uc,{variant:"muted",children:[$," conns"]})]})]}),v.jsxs("main",{className:"relative min-h-0 flex-1 overflow-hidden",children:[o==="topology"?v.jsxs("div",{className:"flex h-full",children:[v.jsx("div",{className:"min-w-0 flex-1",children:v.jsx(rN,{topology:c,connections:h,node:y,highlight:S})}),v.jsx(oN,{roles:D,rooms:H,topics:(y==null?void 0:y.topics)??[],transports:G,selected:S,onSelect:E})]}):v.jsxs("div",{className:"h-full overflow-auto p-4",children:[o==="connections"&&v.jsx(IN,{connections:h,selectedId:P,onSelect:N}),o==="contract"&&(x?v.jsx($N,{contract:x}):v.jsx("p",{className:"text-sm text-muted-foreground",children:"No contract."})),o==="stores"&&v.jsx(bC,{client:l}),o==="feed"&&v.jsx(CC,{events:_,connections:h,topology:c}),o==="settings"&&v.jsx(MC,{url:e,status:u,onConnect:M}),o==="resources"&&v.jsx(PC,{})]}),o==="connections"&&v.jsx(TN,{client:l,connId:P,onClose:()=>N(null)})]})]})]})}const mm=document.getElementById("root");mm&&$x.createRoot(mm).render(v.jsx(I.StrictMode,{children:v.jsx(AC,{})}));
|