react-state-flow 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,62 @@
1
+ var jy=Object.defineProperty;var Fy=(e,t,n)=>t in e?jy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var we=(e,t,n)=>Fy(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Ju(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ih={exports:{}},_s={},sh={exports:{}},te={};/**
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 Ao=Symbol.for("react.element"),Vy=Symbol.for("react.portal"),Hy=Symbol.for("react.fragment"),By=Symbol.for("react.strict_mode"),Wy=Symbol.for("react.profiler"),Uy=Symbol.for("react.provider"),Yy=Symbol.for("react.context"),Xy=Symbol.for("react.forward_ref"),Gy=Symbol.for("react.suspense"),Qy=Symbol.for("react.memo"),Ky=Symbol.for("react.lazy"),kc=Symbol.iterator;function Zy(e){return e===null||typeof e!="object"?null:(e=kc&&e[kc]||e["@@iterator"],typeof e=="function"?e:null)}var lh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uh=Object.assign,ah={};function Ir(e,t,n){this.props=e,this.context=t,this.refs=ah,this.updater=n||lh}Ir.prototype.isReactComponent={};Ir.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ir.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ch(){}ch.prototype=Ir.prototype;function ea(e,t,n){this.props=e,this.context=t,this.refs=ah,this.updater=n||lh}var ta=ea.prototype=new ch;ta.constructor=ea;uh(ta,Ir.prototype);ta.isPureReactComponent=!0;var Nc=Array.isArray,fh=Object.prototype.hasOwnProperty,na={current:null},dh={key:!0,ref:!0,__self:!0,__source:!0};function hh(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)fh.call(t,r)&&!dh.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var u=Array(l),a=0;a<l;a++)u[a]=arguments[a+2];o.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:Ao,type:e,key:i,ref:s,props:o,_owner:na.current}}function qy(e,t){return{$$typeof:Ao,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ra(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ao}function Jy(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Cc=/\/+/g;function nl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Jy(""+e.key):t.toString(36)}function Si(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ao:case Vy:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+nl(s,0):r,Nc(o)?(n="",e!=null&&(n=e.replace(Cc,"$&/")+"/"),Si(o,t,n,"",function(a){return a})):o!=null&&(ra(o)&&(o=qy(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Cc,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Nc(e))for(var l=0;l<e.length;l++){i=e[l];var u=r+nl(i,l);s+=Si(i,t,n,u,o)}else if(u=Zy(e),typeof u=="function")for(e=u.call(e),l=0;!(i=e.next()).done;)i=i.value,u=r+nl(i,l++),s+=Si(i,t,n,u,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Ko(e,t,n){if(e==null)return e;var r=[],o=0;return Si(e,r,"","",function(i){return t.call(n,i,o++)}),r}function ev(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ae={current:null},ki={transition:null},tv={ReactCurrentDispatcher:Ae,ReactCurrentBatchConfig:ki,ReactCurrentOwner:na};function ph(){throw Error("act(...) is not supported in production builds of React.")}te.Children={map:Ko,forEach:function(e,t,n){Ko(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ko(e,function(){t++}),t},toArray:function(e){return Ko(e,function(t){return t})||[]},only:function(e){if(!ra(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};te.Component=Ir;te.Fragment=Hy;te.Profiler=Wy;te.PureComponent=ea;te.StrictMode=By;te.Suspense=Gy;te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tv;te.act=ph;te.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=uh({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=na.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)fh.call(t,u)&&!dh.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){l=Array(u);for(var a=0;a<u;a++)l[a]=arguments[a+2];r.children=l}return{$$typeof:Ao,type:e.type,key:o,ref:i,props:r,_owner:s}};te.createContext=function(e){return e={$$typeof:Yy,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Uy,_context:e},e.Consumer=e};te.createElement=hh;te.createFactory=function(e){var t=hh.bind(null,e);return t.type=e,t};te.createRef=function(){return{current:null}};te.forwardRef=function(e){return{$$typeof:Xy,render:e}};te.isValidElement=ra;te.lazy=function(e){return{$$typeof:Ky,_payload:{_status:-1,_result:e},_init:ev}};te.memo=function(e,t){return{$$typeof:Qy,type:e,compare:t===void 0?null:t}};te.startTransition=function(e){var t=ki.transition;ki.transition={};try{e()}finally{ki.transition=t}};te.unstable_act=ph;te.useCallback=function(e,t){return Ae.current.useCallback(e,t)};te.useContext=function(e){return Ae.current.useContext(e)};te.useDebugValue=function(){};te.useDeferredValue=function(e){return Ae.current.useDeferredValue(e)};te.useEffect=function(e,t){return Ae.current.useEffect(e,t)};te.useId=function(){return Ae.current.useId()};te.useImperativeHandle=function(e,t,n){return Ae.current.useImperativeHandle(e,t,n)};te.useInsertionEffect=function(e,t){return Ae.current.useInsertionEffect(e,t)};te.useLayoutEffect=function(e,t){return Ae.current.useLayoutEffect(e,t)};te.useMemo=function(e,t){return Ae.current.useMemo(e,t)};te.useReducer=function(e,t,n){return Ae.current.useReducer(e,t,n)};te.useRef=function(e){return Ae.current.useRef(e)};te.useState=function(e){return Ae.current.useState(e)};te.useSyncExternalStore=function(e,t,n){return Ae.current.useSyncExternalStore(e,t,n)};te.useTransition=function(){return Ae.current.useTransition()};te.version="18.3.1";sh.exports=te;var O=sh.exports;const nv=Ju(O);/**
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 rv=O,ov=Symbol.for("react.element"),iv=Symbol.for("react.fragment"),sv=Object.prototype.hasOwnProperty,lv=rv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uv={key:!0,ref:!0,__self:!0,__source:!0};function gh(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)sv.call(t,r)&&!uv.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:ov,type:e,key:i,ref:s,props:o,_owner:lv.current}}_s.Fragment=iv;_s.jsx=gh;_s.jsxs=gh;ih.exports=_s;var I=ih.exports,mh={exports:{}},Ze={},yh={exports:{}},vh={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(k,N){var z=k.length;k.push(N);e:for(;0<z;){var j=z-1>>>1,A=k[j];if(0<o(A,N))k[j]=N,k[z]=A,z=j;else break e}}function n(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var N=k[0],z=k.pop();if(z!==N){k[0]=z;e:for(var j=0,A=k.length,W=A>>>1;j<W;){var B=2*(j+1)-1,X=k[B],G=B+1,Q=k[G];if(0>o(X,z))G<A&&0>o(Q,X)?(k[j]=Q,k[G]=z,j=G):(k[j]=X,k[B]=z,j=B);else if(G<A&&0>o(Q,z))k[j]=Q,k[G]=z,j=G;else break e}}return N}function o(k,N){var z=k.sortIndex-N.sortIndex;return z!==0?z:k.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],a=[],f=1,c=null,d=3,g=!1,m=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(k){for(var N=n(a);N!==null;){if(N.callback===null)r(a);else if(N.startTime<=k)r(a),N.sortIndex=N.expirationTime,t(u,N);else break;N=n(a)}}function v(k){if(w=!1,h(k),!m)if(n(u)!==null)m=!0,P(E);else{var N=n(a);N!==null&&R(v,N.startTime-k)}}function E(k,N){m=!1,w&&(w=!1,p(M),M=-1),g=!0;var z=d;try{for(h(N),c=n(u);c!==null&&(!(c.expirationTime>N)||k&&!T());){var j=c.callback;if(typeof j=="function"){c.callback=null,d=c.priorityLevel;var A=j(c.expirationTime<=N);N=e.unstable_now(),typeof A=="function"?c.callback=A:c===n(u)&&r(u),h(N)}else r(u);c=n(u)}if(c!==null)var W=!0;else{var B=n(a);B!==null&&R(v,B.startTime-N),W=!1}return W}finally{c=null,d=z,g=!1}}var _=!1,C=null,M=-1,L=5,D=-1;function T(){return!(e.unstable_now()-D<L)}function $(){if(C!==null){var k=e.unstable_now();D=k;var N=!0;try{N=C(!0,k)}finally{N?F():(_=!1,C=null)}}else _=!1}var F;if(typeof y=="function")F=function(){y($)};else if(typeof MessageChannel<"u"){var S=new MessageChannel,b=S.port2;S.port1.onmessage=$,F=function(){b.postMessage(null)}}else F=function(){x($,0)};function P(k){C=k,_||(_=!0,F())}function R(k,N){M=x(function(){k(e.unstable_now())},N)}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(k){k.callback=null},e.unstable_continueExecution=function(){m||g||(m=!0,P(E))},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(k){switch(d){case 1:case 2:case 3:var N=3;break;default:N=d}var z=d;d=N;try{return k()}finally{d=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(k,N){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var z=d;d=k;try{return N()}finally{d=z}},e.unstable_scheduleCallback=function(k,N,z){var j=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?j+z:j):z=j,k){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=z+A,k={id:f++,callback:N,priorityLevel:k,startTime:z,expirationTime:A,sortIndex:-1},z>j?(k.sortIndex=z,t(a,k),n(u)===null&&k===n(a)&&(w?(p(M),M=-1):w=!0,R(v,z-j))):(k.sortIndex=A,t(u,k),m||g||(m=!0,P(E))),k},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(k){var N=d;return function(){var z=d;d=N;try{return k.apply(this,arguments)}finally{d=z}}}})(vh);yh.exports=vh;var av=yh.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 cv=O,Qe=av;function V(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var wh=new Set,ao={};function jn(e,t){hr(e,t),hr(e+"Capture",t)}function hr(e,t){for(ao[e]=t,e=0;e<t.length;e++)wh.add(t[e])}var At=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wl=Object.prototype.hasOwnProperty,fv=/^[: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]*$/,Mc={},Ic={};function dv(e){return Wl.call(Ic,e)?!0:Wl.call(Mc,e)?!1:fv.test(e)?Ic[e]=!0:(Mc[e]=!0,!1)}function hv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function pv(e,t,n,r){if(t===null||typeof t>"u"||hv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function De(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pe[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[e]=new De(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Pe[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var oa=/[\-:]([a-z])/g;function ia(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(oa,ia);Pe[t]=new De(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(oa,ia);Pe[t]=new De(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(oa,ia);Pe[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function sa(e,t,n,r){var o=Pe.hasOwnProperty(t)?Pe[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(pv(t,n,o,r)&&(n=null),r||o===null?dv(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ht=cv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Zo=Symbol.for("react.element"),Un=Symbol.for("react.portal"),Yn=Symbol.for("react.fragment"),la=Symbol.for("react.strict_mode"),Ul=Symbol.for("react.profiler"),xh=Symbol.for("react.provider"),Eh=Symbol.for("react.context"),ua=Symbol.for("react.forward_ref"),Yl=Symbol.for("react.suspense"),Xl=Symbol.for("react.suspense_list"),aa=Symbol.for("react.memo"),Gt=Symbol.for("react.lazy"),_h=Symbol.for("react.offscreen"),Pc=Symbol.iterator;function Or(e){return e===null||typeof e!="object"?null:(e=Pc&&e[Pc]||e["@@iterator"],typeof e=="function"?e:null)}var me=Object.assign,rl;function Ur(e){if(rl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);rl=t&&t[1]||""}return`
34
+ `+rl+e}var ol=!1;function il(e,t){if(!e||ol)return"";ol=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(a){var r=a}Reflect.construct(e,[],t)}else{try{t.call()}catch(a){r=a}e.call(t.prototype)}else{try{throw Error()}catch(a){r=a}e()}}catch(a){if(a&&r&&typeof a.stack=="string"){for(var o=a.stack.split(`
35
+ `),i=r.stack.split(`
36
+ `),s=o.length-1,l=i.length-1;1<=s&&0<=l&&o[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==i[l]){if(s!==1||l!==1)do if(s--,l--,0>l||o[s]!==i[l]){var u=`
37
+ `+o[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{ol=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ur(e):""}function gv(e){switch(e.tag){case 5:return Ur(e.type);case 16:return Ur("Lazy");case 13:return Ur("Suspense");case 19:return Ur("SuspenseList");case 0:case 2:case 15:return e=il(e.type,!1),e;case 11:return e=il(e.type.render,!1),e;case 1:return e=il(e.type,!0),e;default:return""}}function Gl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Yn:return"Fragment";case Un:return"Portal";case Ul:return"Profiler";case la:return"StrictMode";case Yl:return"Suspense";case Xl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Eh:return(e.displayName||"Context")+".Consumer";case xh:return(e._context.displayName||"Context")+".Provider";case ua:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case aa:return t=e.displayName||null,t!==null?t:Gl(e.type)||"Memo";case Gt:t=e._payload,e=e._init;try{return Gl(e(t))}catch{}}return null}function mv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Gl(t);case 8:return t===la?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function fn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yv(e){var t=Sh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qo(e){e._valueTracker||(e._valueTracker=yv(e))}function kh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Fi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ql(e,t){var n=t.checked;return me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Tc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Nh(e,t){t=t.checked,t!=null&&sa(e,"checked",t,!1)}function Kl(e,t){Nh(e,t);var n=fn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Zl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Zl(e,t.type,fn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Lc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Zl(e,t,n){(t!=="number"||Fi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Yr=Array.isArray;function ir(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+fn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function ql(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(V(91));return me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function zc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(V(92));if(Yr(n)){if(1<n.length)throw Error(V(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fn(n)}}function Ch(e,t){var n=fn(t.value),r=fn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function bc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Mh(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Jl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Mh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Jo,Ih=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Jo=Jo||document.createElement("div"),Jo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Jo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function co(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qr={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},vv=["Webkit","ms","Moz","O"];Object.keys(qr).forEach(function(e){vv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qr[t]=qr[e]})});function Ph(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||qr.hasOwnProperty(e)&&qr[e]?(""+t).trim():t+"px"}function Th(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Ph(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var wv=me({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 eu(e,t){if(t){if(wv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(V(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(V(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(V(61))}if(t.style!=null&&typeof t.style!="object")throw Error(V(62))}}function tu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var nu=null;function ca(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ru=null,sr=null,lr=null;function Rc(e){if(e=Fo(e)){if(typeof ru!="function")throw Error(V(280));var t=e.stateNode;t&&(t=Ms(t),ru(e.stateNode,e.type,t))}}function Lh(e){sr?lr?lr.push(e):lr=[e]:sr=e}function zh(){if(sr){var e=sr,t=lr;if(lr=sr=null,Rc(e),t)for(e=0;e<t.length;e++)Rc(t[e])}}function bh(e,t){return e(t)}function Rh(){}var sl=!1;function Oh(e,t,n){if(sl)return e(t,n);sl=!0;try{return bh(e,t,n)}finally{sl=!1,(sr!==null||lr!==null)&&(Rh(),zh())}}function fo(e,t){var n=e.stateNode;if(n===null)return null;var r=Ms(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(V(231,t,typeof n));return n}var ou=!1;if(At)try{var $r={};Object.defineProperty($r,"passive",{get:function(){ou=!0}}),window.addEventListener("test",$r,$r),window.removeEventListener("test",$r,$r)}catch{ou=!1}function xv(e,t,n,r,o,i,s,l,u){var a=Array.prototype.slice.call(arguments,3);try{t.apply(n,a)}catch(f){this.onError(f)}}var Jr=!1,Vi=null,Hi=!1,iu=null,Ev={onError:function(e){Jr=!0,Vi=e}};function _v(e,t,n,r,o,i,s,l,u){Jr=!1,Vi=null,xv.apply(Ev,arguments)}function Sv(e,t,n,r,o,i,s,l,u){if(_v.apply(this,arguments),Jr){if(Jr){var a=Vi;Jr=!1,Vi=null}else throw Error(V(198));Hi||(Hi=!0,iu=a)}}function Fn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function $h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Oc(e){if(Fn(e)!==e)throw Error(V(188))}function kv(e){var t=e.alternate;if(!t){if(t=Fn(e),t===null)throw Error(V(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Oc(o),e;if(i===r)return Oc(o),t;i=i.sibling}throw Error(V(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(V(189))}}if(n.alternate!==r)throw Error(V(190))}if(n.tag!==3)throw Error(V(188));return n.stateNode.current===n?e:t}function Ah(e){return e=kv(e),e!==null?Dh(e):null}function Dh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Dh(e);if(t!==null)return t;e=e.sibling}return null}var jh=Qe.unstable_scheduleCallback,$c=Qe.unstable_cancelCallback,Nv=Qe.unstable_shouldYield,Cv=Qe.unstable_requestPaint,ve=Qe.unstable_now,Mv=Qe.unstable_getCurrentPriorityLevel,fa=Qe.unstable_ImmediatePriority,Fh=Qe.unstable_UserBlockingPriority,Bi=Qe.unstable_NormalPriority,Iv=Qe.unstable_LowPriority,Vh=Qe.unstable_IdlePriority,Ss=null,St=null;function Pv(e){if(St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(Ss,e,void 0,(e.current.flags&128)===128)}catch{}}var pt=Math.clz32?Math.clz32:zv,Tv=Math.log,Lv=Math.LN2;function zv(e){return e>>>=0,e===0?32:31-(Tv(e)/Lv|0)|0}var ei=64,ti=4194304;function Xr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=Xr(l):(i&=s,i!==0&&(r=Xr(i)))}else s=n&~o,s!==0?r=Xr(s):i!==0&&(r=Xr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-pt(t),o=1<<n,r|=e[n],t&=~o;return r}function bv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-pt(i),l=1<<s,u=o[s];u===-1?(!(l&n)||l&r)&&(o[s]=bv(l,t)):u<=t&&(e.expiredLanes|=l),i&=~l}}function su(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Hh(){var e=ei;return ei<<=1,!(ei&4194240)&&(ei=64),e}function ll(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Do(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pt(t),e[t]=n}function Ov(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-pt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function da(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var se=0;function Bh(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Wh,ha,Uh,Yh,Xh,lu=!1,ni=[],tn=null,nn=null,rn=null,ho=new Map,po=new Map,Kt=[],$v="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 Ac(e,t){switch(e){case"focusin":case"focusout":tn=null;break;case"dragenter":case"dragleave":nn=null;break;case"mouseover":case"mouseout":rn=null;break;case"pointerover":case"pointerout":ho.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":po.delete(t.pointerId)}}function Ar(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Fo(t),t!==null&&ha(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Av(e,t,n,r,o){switch(t){case"focusin":return tn=Ar(tn,e,t,n,r,o),!0;case"dragenter":return nn=Ar(nn,e,t,n,r,o),!0;case"mouseover":return rn=Ar(rn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ho.set(i,Ar(ho.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,po.set(i,Ar(po.get(i)||null,e,t,n,r,o)),!0}return!1}function Gh(e){var t=_n(e.target);if(t!==null){var n=Fn(t);if(n!==null){if(t=n.tag,t===13){if(t=$h(n),t!==null){e.blockedOn=t,Xh(e.priority,function(){Uh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ni(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=uu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);nu=r,n.target.dispatchEvent(r),nu=null}else return t=Fo(n),t!==null&&ha(t),e.blockedOn=n,!1;t.shift()}return!0}function Dc(e,t,n){Ni(e)&&n.delete(t)}function Dv(){lu=!1,tn!==null&&Ni(tn)&&(tn=null),nn!==null&&Ni(nn)&&(nn=null),rn!==null&&Ni(rn)&&(rn=null),ho.forEach(Dc),po.forEach(Dc)}function Dr(e,t){e.blockedOn===t&&(e.blockedOn=null,lu||(lu=!0,Qe.unstable_scheduleCallback(Qe.unstable_NormalPriority,Dv)))}function go(e){function t(o){return Dr(o,e)}if(0<ni.length){Dr(ni[0],e);for(var n=1;n<ni.length;n++){var r=ni[n];r.blockedOn===e&&(r.blockedOn=null)}}for(tn!==null&&Dr(tn,e),nn!==null&&Dr(nn,e),rn!==null&&Dr(rn,e),ho.forEach(t),po.forEach(t),n=0;n<Kt.length;n++)r=Kt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Kt.length&&(n=Kt[0],n.blockedOn===null);)Gh(n),n.blockedOn===null&&Kt.shift()}var ur=Ht.ReactCurrentBatchConfig,Ui=!0;function jv(e,t,n,r){var o=se,i=ur.transition;ur.transition=null;try{se=1,pa(e,t,n,r)}finally{se=o,ur.transition=i}}function Fv(e,t,n,r){var o=se,i=ur.transition;ur.transition=null;try{se=4,pa(e,t,n,r)}finally{se=o,ur.transition=i}}function pa(e,t,n,r){if(Ui){var o=uu(e,t,n,r);if(o===null)yl(e,t,r,Yi,n),Ac(e,r);else if(Av(o,e,t,n,r))r.stopPropagation();else if(Ac(e,r),t&4&&-1<$v.indexOf(e)){for(;o!==null;){var i=Fo(o);if(i!==null&&Wh(i),i=uu(e,t,n,r),i===null&&yl(e,t,r,Yi,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else yl(e,t,r,null,n)}}var Yi=null;function uu(e,t,n,r){if(Yi=null,e=ca(r),e=_n(e),e!==null)if(t=Fn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=$h(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yi=e,null}function Qh(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Mv()){case fa:return 1;case Fh:return 4;case Bi:case Iv:return 16;case Vh:return 536870912;default:return 16}default:return 16}}var Jt=null,ga=null,Ci=null;function Kh(){if(Ci)return Ci;var e,t=ga,n=t.length,r,o="value"in Jt?Jt.value:Jt.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Ci=o.slice(e,1<r?1-r:void 0)}function Mi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ri(){return!0}function jc(){return!1}function qe(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ri:jc,this.isPropagationStopped=jc,this}return me(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ri)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ri)},persist:function(){},isPersistent:ri}),t}var Pr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ma=qe(Pr),jo=me({},Pr,{view:0,detail:0}),Vv=qe(jo),ul,al,jr,ks=me({},jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ya,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==jr&&(jr&&e.type==="mousemove"?(ul=e.screenX-jr.screenX,al=e.screenY-jr.screenY):al=ul=0,jr=e),ul)},movementY:function(e){return"movementY"in e?e.movementY:al}}),Fc=qe(ks),Hv=me({},ks,{dataTransfer:0}),Bv=qe(Hv),Wv=me({},jo,{relatedTarget:0}),cl=qe(Wv),Uv=me({},Pr,{animationName:0,elapsedTime:0,pseudoElement:0}),Yv=qe(Uv),Xv=me({},Pr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gv=qe(Xv),Qv=me({},Pr,{data:0}),Vc=qe(Qv),Kv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zv={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"},qv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qv[e])?!!t[e]:!1}function ya(){return Jv}var ew=me({},jo,{key:function(e){if(e.key){var t=Kv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Mi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ya,charCode:function(e){return e.type==="keypress"?Mi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tw=qe(ew),nw=me({},ks,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hc=qe(nw),rw=me({},jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ya}),ow=qe(rw),iw=me({},Pr,{propertyName:0,elapsedTime:0,pseudoElement:0}),sw=qe(iw),lw=me({},ks,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),uw=qe(lw),aw=[9,13,27,32],va=At&&"CompositionEvent"in window,eo=null;At&&"documentMode"in document&&(eo=document.documentMode);var cw=At&&"TextEvent"in window&&!eo,Zh=At&&(!va||eo&&8<eo&&11>=eo),Bc=" ",Wc=!1;function qh(e,t){switch(e){case"keyup":return aw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xn=!1;function fw(e,t){switch(e){case"compositionend":return Jh(t);case"keypress":return t.which!==32?null:(Wc=!0,Bc);case"textInput":return e=t.data,e===Bc&&Wc?null:e;default:return null}}function dw(e,t){if(Xn)return e==="compositionend"||!va&&qh(e,t)?(e=Kh(),Ci=ga=Jt=null,Xn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zh&&t.locale!=="ko"?null:t.data;default:return null}}var hw={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 Uc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hw[e.type]:t==="textarea"}function ep(e,t,n,r){Lh(r),t=Xi(t,"onChange"),0<t.length&&(n=new ma("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var to=null,mo=null;function pw(e){fp(e,0)}function Ns(e){var t=Kn(e);if(kh(t))return e}function gw(e,t){if(e==="change")return t}var tp=!1;if(At){var fl;if(At){var dl="oninput"in document;if(!dl){var Yc=document.createElement("div");Yc.setAttribute("oninput","return;"),dl=typeof Yc.oninput=="function"}fl=dl}else fl=!1;tp=fl&&(!document.documentMode||9<document.documentMode)}function Xc(){to&&(to.detachEvent("onpropertychange",np),mo=to=null)}function np(e){if(e.propertyName==="value"&&Ns(mo)){var t=[];ep(t,mo,e,ca(e)),Oh(pw,t)}}function mw(e,t,n){e==="focusin"?(Xc(),to=t,mo=n,to.attachEvent("onpropertychange",np)):e==="focusout"&&Xc()}function yw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ns(mo)}function vw(e,t){if(e==="click")return Ns(t)}function ww(e,t){if(e==="input"||e==="change")return Ns(t)}function xw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:xw;function yo(e,t){if(mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Wl.call(t,o)||!mt(e[o],t[o]))return!1}return!0}function Gc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qc(e,t){var n=Gc(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gc(n)}}function rp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?rp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function op(){for(var e=window,t=Fi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Fi(e.document)}return t}function wa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ew(e){var t=op(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&rp(n.ownerDocument.documentElement,n)){if(r!==null&&wa(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Qc(n,i);var s=Qc(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var _w=At&&"documentMode"in document&&11>=document.documentMode,Gn=null,au=null,no=null,cu=!1;function Kc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cu||Gn==null||Gn!==Fi(r)||(r=Gn,"selectionStart"in r&&wa(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),no&&yo(no,r)||(no=r,r=Xi(au,"onSelect"),0<r.length&&(t=new ma("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Gn)))}function oi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qn={animationend:oi("Animation","AnimationEnd"),animationiteration:oi("Animation","AnimationIteration"),animationstart:oi("Animation","AnimationStart"),transitionend:oi("Transition","TransitionEnd")},hl={},ip={};At&&(ip=document.createElement("div").style,"AnimationEvent"in window||(delete Qn.animationend.animation,delete Qn.animationiteration.animation,delete Qn.animationstart.animation),"TransitionEvent"in window||delete Qn.transitionend.transition);function Cs(e){if(hl[e])return hl[e];if(!Qn[e])return e;var t=Qn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ip)return hl[e]=t[n];return e}var sp=Cs("animationend"),lp=Cs("animationiteration"),up=Cs("animationstart"),ap=Cs("transitionend"),cp=new Map,Zc="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 pn(e,t){cp.set(e,t),jn(t,[e])}for(var pl=0;pl<Zc.length;pl++){var gl=Zc[pl],Sw=gl.toLowerCase(),kw=gl[0].toUpperCase()+gl.slice(1);pn(Sw,"on"+kw)}pn(sp,"onAnimationEnd");pn(lp,"onAnimationIteration");pn(up,"onAnimationStart");pn("dblclick","onDoubleClick");pn("focusin","onFocus");pn("focusout","onBlur");pn(ap,"onTransitionEnd");hr("onMouseEnter",["mouseout","mouseover"]);hr("onMouseLeave",["mouseout","mouseover"]);hr("onPointerEnter",["pointerout","pointerover"]);hr("onPointerLeave",["pointerout","pointerover"]);jn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));jn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));jn("onBeforeInput",["compositionend","keypress","textInput","paste"]);jn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));jn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));jn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gr="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(" "),Nw=new Set("cancel close invalid load scroll toggle".split(" ").concat(Gr));function qc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Sv(r,t,void 0,e),e.currentTarget=null}function fp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],u=l.instance,a=l.currentTarget;if(l=l.listener,u!==i&&o.isPropagationStopped())break e;qc(o,l,a),i=u}else for(s=0;s<r.length;s++){if(l=r[s],u=l.instance,a=l.currentTarget,l=l.listener,u!==i&&o.isPropagationStopped())break e;qc(o,l,a),i=u}}}if(Hi)throw e=iu,Hi=!1,iu=null,e}function ae(e,t){var n=t[gu];n===void 0&&(n=t[gu]=new Set);var r=e+"__bubble";n.has(r)||(dp(t,e,2,!1),n.add(r))}function ml(e,t,n){var r=0;t&&(r|=4),dp(n,e,r,t)}var ii="_reactListening"+Math.random().toString(36).slice(2);function vo(e){if(!e[ii]){e[ii]=!0,wh.forEach(function(n){n!=="selectionchange"&&(Nw.has(n)||ml(n,!1,e),ml(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ii]||(t[ii]=!0,ml("selectionchange",!1,t))}}function dp(e,t,n,r){switch(Qh(t)){case 1:var o=jv;break;case 4:o=Fv;break;default:o=pa}n=o.bind(null,t,n,e),o=void 0,!ou||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function yl(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===o||u.nodeType===8&&u.parentNode===o))return;s=s.return}for(;l!==null;){if(s=_n(l),s===null)return;if(u=s.tag,u===5||u===6){r=i=s;continue e}l=l.parentNode}}r=r.return}Oh(function(){var a=i,f=ca(n),c=[];e:{var d=cp.get(e);if(d!==void 0){var g=ma,m=e;switch(e){case"keypress":if(Mi(n)===0)break e;case"keydown":case"keyup":g=tw;break;case"focusin":m="focus",g=cl;break;case"focusout":m="blur",g=cl;break;case"beforeblur":case"afterblur":g=cl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=Fc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Bv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=ow;break;case sp:case lp:case up:g=Yv;break;case ap:g=sw;break;case"scroll":g=Vv;break;case"wheel":g=uw;break;case"copy":case"cut":case"paste":g=Gv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Hc}var w=(t&4)!==0,x=!w&&e==="scroll",p=w?d!==null?d+"Capture":null:d;w=[];for(var y=a,h;y!==null;){h=y;var v=h.stateNode;if(h.tag===5&&v!==null&&(h=v,p!==null&&(v=fo(y,p),v!=null&&w.push(wo(y,v,h)))),x)break;y=y.return}0<w.length&&(d=new g(d,m,null,n,f),c.push({event:d,listeners:w}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",d&&n!==nu&&(m=n.relatedTarget||n.fromElement)&&(_n(m)||m[Dt]))break e;if((g||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,g?(m=n.relatedTarget||n.toElement,g=a,m=m?_n(m):null,m!==null&&(x=Fn(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(g=null,m=a),g!==m)){if(w=Fc,v="onMouseLeave",p="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(w=Hc,v="onPointerLeave",p="onPointerEnter",y="pointer"),x=g==null?d:Kn(g),h=m==null?d:Kn(m),d=new w(v,y+"leave",g,n,f),d.target=x,d.relatedTarget=h,v=null,_n(f)===a&&(w=new w(p,y+"enter",m,n,f),w.target=h,w.relatedTarget=x,v=w),x=v,g&&m)t:{for(w=g,p=m,y=0,h=w;h;h=Bn(h))y++;for(h=0,v=p;v;v=Bn(v))h++;for(;0<y-h;)w=Bn(w),y--;for(;0<h-y;)p=Bn(p),h--;for(;y--;){if(w===p||p!==null&&w===p.alternate)break t;w=Bn(w),p=Bn(p)}w=null}else w=null;g!==null&&Jc(c,d,g,w,!1),m!==null&&x!==null&&Jc(c,x,m,w,!0)}}e:{if(d=a?Kn(a):window,g=d.nodeName&&d.nodeName.toLowerCase(),g==="select"||g==="input"&&d.type==="file")var E=gw;else if(Uc(d))if(tp)E=ww;else{E=yw;var _=mw}else(g=d.nodeName)&&g.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(E=vw);if(E&&(E=E(e,a))){ep(c,E,n,f);break e}_&&_(e,d,a),e==="focusout"&&(_=d._wrapperState)&&_.controlled&&d.type==="number"&&Zl(d,"number",d.value)}switch(_=a?Kn(a):window,e){case"focusin":(Uc(_)||_.contentEditable==="true")&&(Gn=_,au=a,no=null);break;case"focusout":no=au=Gn=null;break;case"mousedown":cu=!0;break;case"contextmenu":case"mouseup":case"dragend":cu=!1,Kc(c,n,f);break;case"selectionchange":if(_w)break;case"keydown":case"keyup":Kc(c,n,f)}var C;if(va)e:{switch(e){case"compositionstart":var M="onCompositionStart";break e;case"compositionend":M="onCompositionEnd";break e;case"compositionupdate":M="onCompositionUpdate";break e}M=void 0}else Xn?qh(e,n)&&(M="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(M="onCompositionStart");M&&(Zh&&n.locale!=="ko"&&(Xn||M!=="onCompositionStart"?M==="onCompositionEnd"&&Xn&&(C=Kh()):(Jt=f,ga="value"in Jt?Jt.value:Jt.textContent,Xn=!0)),_=Xi(a,M),0<_.length&&(M=new Vc(M,e,null,n,f),c.push({event:M,listeners:_}),C?M.data=C:(C=Jh(n),C!==null&&(M.data=C)))),(C=cw?fw(e,n):dw(e,n))&&(a=Xi(a,"onBeforeInput"),0<a.length&&(f=new Vc("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:a}),f.data=C))}fp(c,t)})}function wo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xi(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=fo(e,n),i!=null&&r.unshift(wo(e,i,o)),i=fo(e,t),i!=null&&r.push(wo(e,i,o))),e=e.return}return r}function Bn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Jc(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var l=n,u=l.alternate,a=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&a!==null&&(l=a,o?(u=fo(n,i),u!=null&&s.unshift(wo(n,u,l))):o||(u=fo(n,i),u!=null&&s.push(wo(n,u,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Cw=/\r\n?/g,Mw=/\u0000|\uFFFD/g;function ef(e){return(typeof e=="string"?e:""+e).replace(Cw,`
38
+ `).replace(Mw,"")}function si(e,t,n){if(t=ef(t),ef(e)!==t&&n)throw Error(V(425))}function Gi(){}var fu=null,du=null;function hu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var pu=typeof setTimeout=="function"?setTimeout:void 0,Iw=typeof clearTimeout=="function"?clearTimeout:void 0,tf=typeof Promise=="function"?Promise:void 0,Pw=typeof queueMicrotask=="function"?queueMicrotask:typeof tf<"u"?function(e){return tf.resolve(null).then(e).catch(Tw)}:pu;function Tw(e){setTimeout(function(){throw e})}function vl(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),go(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);go(t)}function on(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function nf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Tr=Math.random().toString(36).slice(2),_t="__reactFiber$"+Tr,xo="__reactProps$"+Tr,Dt="__reactContainer$"+Tr,gu="__reactEvents$"+Tr,Lw="__reactListeners$"+Tr,zw="__reactHandles$"+Tr;function _n(e){var t=e[_t];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Dt]||n[_t]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=nf(e);e!==null;){if(n=e[_t])return n;e=nf(e)}return t}e=n,n=e.parentNode}return null}function Fo(e){return e=e[_t]||e[Dt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Kn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(V(33))}function Ms(e){return e[xo]||null}var mu=[],Zn=-1;function gn(e){return{current:e}}function ce(e){0>Zn||(e.current=mu[Zn],mu[Zn]=null,Zn--)}function le(e,t){Zn++,mu[Zn]=e.current,e.current=t}var dn={},Re=gn(dn),He=gn(!1),Tn=dn;function pr(e,t){var n=e.type.contextTypes;if(!n)return dn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Be(e){return e=e.childContextTypes,e!=null}function Qi(){ce(He),ce(Re)}function rf(e,t,n){if(Re.current!==dn)throw Error(V(168));le(Re,t),le(He,n)}function hp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(V(108,mv(e)||"Unknown",o));return me({},n,r)}function Ki(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dn,Tn=Re.current,le(Re,e),le(He,He.current),!0}function of(e,t,n){var r=e.stateNode;if(!r)throw Error(V(169));n?(e=hp(e,t,Tn),r.__reactInternalMemoizedMergedChildContext=e,ce(He),ce(Re),le(Re,e)):ce(He),le(He,n)}var Lt=null,Is=!1,wl=!1;function pp(e){Lt===null?Lt=[e]:Lt.push(e)}function bw(e){Is=!0,pp(e)}function mn(){if(!wl&&Lt!==null){wl=!0;var e=0,t=se;try{var n=Lt;for(se=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Lt=null,Is=!1}catch(o){throw Lt!==null&&(Lt=Lt.slice(e+1)),jh(fa,mn),o}finally{se=t,wl=!1}}return null}var qn=[],Jn=0,Zi=null,qi=0,Je=[],et=0,Ln=null,bt=1,Rt="";function wn(e,t){qn[Jn++]=qi,qn[Jn++]=Zi,Zi=e,qi=t}function gp(e,t,n){Je[et++]=bt,Je[et++]=Rt,Je[et++]=Ln,Ln=e;var r=bt;e=Rt;var o=32-pt(r)-1;r&=~(1<<o),n+=1;var i=32-pt(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,bt=1<<32-pt(t)+o|n<<o|r,Rt=i+e}else bt=1<<i|n<<o|r,Rt=e}function xa(e){e.return!==null&&(wn(e,1),gp(e,1,0))}function Ea(e){for(;e===Zi;)Zi=qn[--Jn],qn[Jn]=null,qi=qn[--Jn],qn[Jn]=null;for(;e===Ln;)Ln=Je[--et],Je[et]=null,Rt=Je[--et],Je[et]=null,bt=Je[--et],Je[et]=null}var Ge=null,Xe=null,fe=!1,ct=null;function mp(e,t){var n=tt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function sf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ge=e,Xe=on(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ge=e,Xe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ln!==null?{id:bt,overflow:Rt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=tt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ge=e,Xe=null,!0):!1;default:return!1}}function yu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function vu(e){if(fe){var t=Xe;if(t){var n=t;if(!sf(e,t)){if(yu(e))throw Error(V(418));t=on(n.nextSibling);var r=Ge;t&&sf(e,t)?mp(r,n):(e.flags=e.flags&-4097|2,fe=!1,Ge=e)}}else{if(yu(e))throw Error(V(418));e.flags=e.flags&-4097|2,fe=!1,Ge=e}}}function lf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ge=e}function li(e){if(e!==Ge)return!1;if(!fe)return lf(e),fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!hu(e.type,e.memoizedProps)),t&&(t=Xe)){if(yu(e))throw yp(),Error(V(418));for(;t;)mp(e,t),t=on(t.nextSibling)}if(lf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Xe=on(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Xe=null}}else Xe=Ge?on(e.stateNode.nextSibling):null;return!0}function yp(){for(var e=Xe;e;)e=on(e.nextSibling)}function gr(){Xe=Ge=null,fe=!1}function _a(e){ct===null?ct=[e]:ct.push(e)}var Rw=Ht.ReactCurrentBatchConfig;function Fr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(V(309));var r=n.stateNode}if(!r)throw Error(V(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var l=o.refs;s===null?delete l[i]:l[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(V(284));if(!n._owner)throw Error(V(290,e))}return e}function ui(e,t){throw e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function uf(e){var t=e._init;return t(e._payload)}function vp(e){function t(p,y){if(e){var h=p.deletions;h===null?(p.deletions=[y],p.flags|=16):h.push(y)}}function n(p,y){if(!e)return null;for(;y!==null;)t(p,y),y=y.sibling;return null}function r(p,y){for(p=new Map;y!==null;)y.key!==null?p.set(y.key,y):p.set(y.index,y),y=y.sibling;return p}function o(p,y){return p=an(p,y),p.index=0,p.sibling=null,p}function i(p,y,h){return p.index=h,e?(h=p.alternate,h!==null?(h=h.index,h<y?(p.flags|=2,y):h):(p.flags|=2,y)):(p.flags|=1048576,y)}function s(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,y,h,v){return y===null||y.tag!==6?(y=Cl(h,p.mode,v),y.return=p,y):(y=o(y,h),y.return=p,y)}function u(p,y,h,v){var E=h.type;return E===Yn?f(p,y,h.props.children,v,h.key):y!==null&&(y.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Gt&&uf(E)===y.type)?(v=o(y,h.props),v.ref=Fr(p,y,h),v.return=p,v):(v=Ri(h.type,h.key,h.props,null,p.mode,v),v.ref=Fr(p,y,h),v.return=p,v)}function a(p,y,h,v){return y===null||y.tag!==4||y.stateNode.containerInfo!==h.containerInfo||y.stateNode.implementation!==h.implementation?(y=Ml(h,p.mode,v),y.return=p,y):(y=o(y,h.children||[]),y.return=p,y)}function f(p,y,h,v,E){return y===null||y.tag!==7?(y=Mn(h,p.mode,v,E),y.return=p,y):(y=o(y,h),y.return=p,y)}function c(p,y,h){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Cl(""+y,p.mode,h),y.return=p,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Zo:return h=Ri(y.type,y.key,y.props,null,p.mode,h),h.ref=Fr(p,null,y),h.return=p,h;case Un:return y=Ml(y,p.mode,h),y.return=p,y;case Gt:var v=y._init;return c(p,v(y._payload),h)}if(Yr(y)||Or(y))return y=Mn(y,p.mode,h,null),y.return=p,y;ui(p,y)}return null}function d(p,y,h,v){var E=y!==null?y.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return E!==null?null:l(p,y,""+h,v);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Zo:return h.key===E?u(p,y,h,v):null;case Un:return h.key===E?a(p,y,h,v):null;case Gt:return E=h._init,d(p,y,E(h._payload),v)}if(Yr(h)||Or(h))return E!==null?null:f(p,y,h,v,null);ui(p,h)}return null}function g(p,y,h,v,E){if(typeof v=="string"&&v!==""||typeof v=="number")return p=p.get(h)||null,l(y,p,""+v,E);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Zo:return p=p.get(v.key===null?h:v.key)||null,u(y,p,v,E);case Un:return p=p.get(v.key===null?h:v.key)||null,a(y,p,v,E);case Gt:var _=v._init;return g(p,y,h,_(v._payload),E)}if(Yr(v)||Or(v))return p=p.get(h)||null,f(y,p,v,E,null);ui(y,v)}return null}function m(p,y,h,v){for(var E=null,_=null,C=y,M=y=0,L=null;C!==null&&M<h.length;M++){C.index>M?(L=C,C=null):L=C.sibling;var D=d(p,C,h[M],v);if(D===null){C===null&&(C=L);break}e&&C&&D.alternate===null&&t(p,C),y=i(D,y,M),_===null?E=D:_.sibling=D,_=D,C=L}if(M===h.length)return n(p,C),fe&&wn(p,M),E;if(C===null){for(;M<h.length;M++)C=c(p,h[M],v),C!==null&&(y=i(C,y,M),_===null?E=C:_.sibling=C,_=C);return fe&&wn(p,M),E}for(C=r(p,C);M<h.length;M++)L=g(C,p,M,h[M],v),L!==null&&(e&&L.alternate!==null&&C.delete(L.key===null?M:L.key),y=i(L,y,M),_===null?E=L:_.sibling=L,_=L);return e&&C.forEach(function(T){return t(p,T)}),fe&&wn(p,M),E}function w(p,y,h,v){var E=Or(h);if(typeof E!="function")throw Error(V(150));if(h=E.call(h),h==null)throw Error(V(151));for(var _=E=null,C=y,M=y=0,L=null,D=h.next();C!==null&&!D.done;M++,D=h.next()){C.index>M?(L=C,C=null):L=C.sibling;var T=d(p,C,D.value,v);if(T===null){C===null&&(C=L);break}e&&C&&T.alternate===null&&t(p,C),y=i(T,y,M),_===null?E=T:_.sibling=T,_=T,C=L}if(D.done)return n(p,C),fe&&wn(p,M),E;if(C===null){for(;!D.done;M++,D=h.next())D=c(p,D.value,v),D!==null&&(y=i(D,y,M),_===null?E=D:_.sibling=D,_=D);return fe&&wn(p,M),E}for(C=r(p,C);!D.done;M++,D=h.next())D=g(C,p,M,D.value,v),D!==null&&(e&&D.alternate!==null&&C.delete(D.key===null?M:D.key),y=i(D,y,M),_===null?E=D:_.sibling=D,_=D);return e&&C.forEach(function($){return t(p,$)}),fe&&wn(p,M),E}function x(p,y,h,v){if(typeof h=="object"&&h!==null&&h.type===Yn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Zo:e:{for(var E=h.key,_=y;_!==null;){if(_.key===E){if(E=h.type,E===Yn){if(_.tag===7){n(p,_.sibling),y=o(_,h.props.children),y.return=p,p=y;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Gt&&uf(E)===_.type){n(p,_.sibling),y=o(_,h.props),y.ref=Fr(p,_,h),y.return=p,p=y;break e}n(p,_);break}else t(p,_);_=_.sibling}h.type===Yn?(y=Mn(h.props.children,p.mode,v,h.key),y.return=p,p=y):(v=Ri(h.type,h.key,h.props,null,p.mode,v),v.ref=Fr(p,y,h),v.return=p,p=v)}return s(p);case Un:e:{for(_=h.key;y!==null;){if(y.key===_)if(y.tag===4&&y.stateNode.containerInfo===h.containerInfo&&y.stateNode.implementation===h.implementation){n(p,y.sibling),y=o(y,h.children||[]),y.return=p,p=y;break e}else{n(p,y);break}else t(p,y);y=y.sibling}y=Ml(h,p.mode,v),y.return=p,p=y}return s(p);case Gt:return _=h._init,x(p,y,_(h._payload),v)}if(Yr(h))return m(p,y,h,v);if(Or(h))return w(p,y,h,v);ui(p,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,y!==null&&y.tag===6?(n(p,y.sibling),y=o(y,h),y.return=p,p=y):(n(p,y),y=Cl(h,p.mode,v),y.return=p,p=y),s(p)):n(p,y)}return x}var mr=vp(!0),wp=vp(!1),Ji=gn(null),es=null,er=null,Sa=null;function ka(){Sa=er=es=null}function Na(e){var t=Ji.current;ce(Ji),e._currentValue=t}function wu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ar(e,t){es=e,Sa=er=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Fe=!0),e.firstContext=null)}function rt(e){var t=e._currentValue;if(Sa!==e)if(e={context:e,memoizedValue:t,next:null},er===null){if(es===null)throw Error(V(308));er=e,es.dependencies={lanes:0,firstContext:e}}else er=er.next=e;return t}var Sn=null;function Ca(e){Sn===null?Sn=[e]:Sn.push(e)}function xp(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Ca(t)):(n.next=o.next,o.next=n),t.interleaved=n,jt(e,r)}function jt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Qt=!1;function Ma(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ep(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function sn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,re&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,jt(e,n)}return o=r.interleaved,o===null?(t.next=t,Ca(r)):(t.next=o.next,o.next=t),r.interleaved=t,jt(e,n)}function Ii(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,da(e,n)}}function af(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ts(e,t,n,r){var o=e.updateQueue;Qt=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var u=l,a=u.next;u.next=null,s===null?i=a:s.next=a,s=u;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==s&&(l===null?f.firstBaseUpdate=a:l.next=a,f.lastBaseUpdate=u))}if(i!==null){var c=o.baseState;s=0,f=a=u=null,l=i;do{var d=l.lane,g=l.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,w=l;switch(d=t,g=n,w.tag){case 1:if(m=w.payload,typeof m=="function"){c=m.call(g,c,d);break e}c=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=w.payload,d=typeof m=="function"?m.call(g,c,d):m,d==null)break e;c=me({},c,d);break e;case 2:Qt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[l]:d.push(l))}else g={eventTime:g,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(a=f=g,u=c):f=f.next=g,s|=d;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;d=l,l=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(f===null&&(u=c),o.baseState=u,o.firstBaseUpdate=a,o.lastBaseUpdate=f,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);bn|=s,e.lanes=s,e.memoizedState=c}}function cf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(V(191,o));o.call(r)}}}var Vo={},kt=gn(Vo),Eo=gn(Vo),_o=gn(Vo);function kn(e){if(e===Vo)throw Error(V(174));return e}function Ia(e,t){switch(le(_o,t),le(Eo,e),le(kt,Vo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Jl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Jl(t,e)}ce(kt),le(kt,t)}function yr(){ce(kt),ce(Eo),ce(_o)}function _p(e){kn(_o.current);var t=kn(kt.current),n=Jl(t,e.type);t!==n&&(le(Eo,e),le(kt,n))}function Pa(e){Eo.current===e&&(ce(kt),ce(Eo))}var pe=gn(0);function ns(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var xl=[];function Ta(){for(var e=0;e<xl.length;e++)xl[e]._workInProgressVersionPrimary=null;xl.length=0}var Pi=Ht.ReactCurrentDispatcher,El=Ht.ReactCurrentBatchConfig,zn=0,ge=null,Se=null,Ne=null,rs=!1,ro=!1,So=0,Ow=0;function Le(){throw Error(V(321))}function La(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mt(e[n],t[n]))return!1;return!0}function za(e,t,n,r,o,i){if(zn=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Pi.current=e===null||e.memoizedState===null?jw:Fw,e=n(r,o),ro){i=0;do{if(ro=!1,So=0,25<=i)throw Error(V(301));i+=1,Ne=Se=null,t.updateQueue=null,Pi.current=Vw,e=n(r,o)}while(ro)}if(Pi.current=os,t=Se!==null&&Se.next!==null,zn=0,Ne=Se=ge=null,rs=!1,t)throw Error(V(300));return e}function ba(){var e=So!==0;return So=0,e}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ne===null?ge.memoizedState=Ne=e:Ne=Ne.next=e,Ne}function ot(){if(Se===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Se.next;var t=Ne===null?ge.memoizedState:Ne.next;if(t!==null)Ne=t,Se=e;else{if(e===null)throw Error(V(310));Se=e,e={memoizedState:Se.memoizedState,baseState:Se.baseState,baseQueue:Se.baseQueue,queue:Se.queue,next:null},Ne===null?ge.memoizedState=Ne=e:Ne=Ne.next=e}return Ne}function ko(e,t){return typeof t=="function"?t(e):t}function _l(e){var t=ot(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var r=Se,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var l=s=null,u=null,a=i;do{var f=a.lane;if((zn&f)===f)u!==null&&(u=u.next={lane:0,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null}),r=a.hasEagerState?a.eagerState:e(r,a.action);else{var c={lane:f,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null};u===null?(l=u=c,s=r):u=u.next=c,ge.lanes|=f,bn|=f}a=a.next}while(a!==null&&a!==i);u===null?s=r:u.next=l,mt(r,t.memoizedState)||(Fe=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,ge.lanes|=i,bn|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Sl(e){var t=ot(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);mt(i,t.memoizedState)||(Fe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Sp(){}function kp(e,t){var n=ge,r=ot(),o=t(),i=!mt(r.memoizedState,o);if(i&&(r.memoizedState=o,Fe=!0),r=r.queue,Ra(Mp.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ne!==null&&Ne.memoizedState.tag&1){if(n.flags|=2048,No(9,Cp.bind(null,n,r,o,t),void 0,null),Ce===null)throw Error(V(349));zn&30||Np(n,t,o)}return o}function Np(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Cp(e,t,n,r){t.value=n,t.getSnapshot=r,Ip(t)&&Pp(e)}function Mp(e,t,n){return n(function(){Ip(t)&&Pp(e)})}function Ip(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mt(e,n)}catch{return!0}}function Pp(e){var t=jt(e,1);t!==null&&gt(t,e,1,-1)}function ff(e){var t=xt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:e},t.queue=e,e=e.dispatch=Dw.bind(null,ge,e),[t.memoizedState,e]}function No(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Tp(){return ot().memoizedState}function Ti(e,t,n,r){var o=xt();ge.flags|=e,o.memoizedState=No(1|t,n,void 0,r===void 0?null:r)}function Ps(e,t,n,r){var o=ot();r=r===void 0?null:r;var i=void 0;if(Se!==null){var s=Se.memoizedState;if(i=s.destroy,r!==null&&La(r,s.deps)){o.memoizedState=No(t,n,i,r);return}}ge.flags|=e,o.memoizedState=No(1|t,n,i,r)}function df(e,t){return Ti(8390656,8,e,t)}function Ra(e,t){return Ps(2048,8,e,t)}function Lp(e,t){return Ps(4,2,e,t)}function zp(e,t){return Ps(4,4,e,t)}function bp(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Rp(e,t,n){return n=n!=null?n.concat([e]):null,Ps(4,4,bp.bind(null,t,e),n)}function Oa(){}function Op(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&La(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function $p(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&La(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ap(e,t,n){return zn&21?(mt(n,t)||(n=Hh(),ge.lanes|=n,bn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Fe=!0),e.memoizedState=n)}function $w(e,t){var n=se;se=n!==0&&4>n?n:4,e(!0);var r=El.transition;El.transition={};try{e(!1),t()}finally{se=n,El.transition=r}}function Dp(){return ot().memoizedState}function Aw(e,t,n){var r=un(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},jp(e))Fp(t,n);else if(n=xp(e,t,n,r),n!==null){var o=$e();gt(n,e,r,o),Vp(n,t,r)}}function Dw(e,t,n){var r=un(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(jp(e))Fp(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,mt(l,s)){var u=t.interleaved;u===null?(o.next=o,Ca(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=xp(e,t,o,r),n!==null&&(o=$e(),gt(n,e,r,o),Vp(n,t,r))}}function jp(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Fp(e,t){ro=rs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,da(e,n)}}var os={readContext:rt,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useInsertionEffect:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useMutableSource:Le,useSyncExternalStore:Le,useId:Le,unstable_isNewReconciler:!1},jw={readContext:rt,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:rt,useEffect:df,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ti(4194308,4,bp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ti(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ti(4,2,e,t)},useMemo:function(e,t){var n=xt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Aw.bind(null,ge,e),[r.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:ff,useDebugValue:Oa,useDeferredValue:function(e){return xt().memoizedState=e},useTransition:function(){var e=ff(!1),t=e[0];return e=$w.bind(null,e[1]),xt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ge,o=xt();if(fe){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),Ce===null)throw Error(V(349));zn&30||Np(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,df(Mp.bind(null,r,i,e),[e]),r.flags|=2048,No(9,Cp.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=xt(),t=Ce.identifierPrefix;if(fe){var n=Rt,r=bt;n=(r&~(1<<32-pt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=So++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Ow++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Fw={readContext:rt,useCallback:Op,useContext:rt,useEffect:Ra,useImperativeHandle:Rp,useInsertionEffect:Lp,useLayoutEffect:zp,useMemo:$p,useReducer:_l,useRef:Tp,useState:function(){return _l(ko)},useDebugValue:Oa,useDeferredValue:function(e){var t=ot();return Ap(t,Se.memoizedState,e)},useTransition:function(){var e=_l(ko)[0],t=ot().memoizedState;return[e,t]},useMutableSource:Sp,useSyncExternalStore:kp,useId:Dp,unstable_isNewReconciler:!1},Vw={readContext:rt,useCallback:Op,useContext:rt,useEffect:Ra,useImperativeHandle:Rp,useInsertionEffect:Lp,useLayoutEffect:zp,useMemo:$p,useReducer:Sl,useRef:Tp,useState:function(){return Sl(ko)},useDebugValue:Oa,useDeferredValue:function(e){var t=ot();return Se===null?t.memoizedState=e:Ap(t,Se.memoizedState,e)},useTransition:function(){var e=Sl(ko)[0],t=ot().memoizedState;return[e,t]},useMutableSource:Sp,useSyncExternalStore:kp,useId:Dp,unstable_isNewReconciler:!1};function lt(e,t){if(e&&e.defaultProps){t=me({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function xu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:me({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ts={isMounted:function(e){return(e=e._reactInternals)?Fn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=$e(),o=un(e),i=$t(r,o);i.payload=t,n!=null&&(i.callback=n),t=sn(e,i,o),t!==null&&(gt(t,e,o,r),Ii(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=$e(),o=un(e),i=$t(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=sn(e,i,o),t!==null&&(gt(t,e,o,r),Ii(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=$e(),r=un(e),o=$t(n,r);o.tag=2,t!=null&&(o.callback=t),t=sn(e,o,r),t!==null&&(gt(t,e,r,n),Ii(t,e,r))}};function hf(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!yo(n,r)||!yo(o,i):!0}function Hp(e,t,n){var r=!1,o=dn,i=t.contextType;return typeof i=="object"&&i!==null?i=rt(i):(o=Be(t)?Tn:Re.current,r=t.contextTypes,i=(r=r!=null)?pr(e,o):dn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ts,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function pf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ts.enqueueReplaceState(t,t.state,null)}function Eu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ma(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=rt(i):(i=Be(t)?Tn:Re.current,o.context=pr(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(xu(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Ts.enqueueReplaceState(o,o.state,null),ts(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function vr(e,t){try{var n="",r=t;do n+=gv(r),r=r.return;while(r);var o=n}catch(i){o=`
39
+ Error generating stack: `+i.message+`
40
+ `+i.stack}return{value:e,source:t,stack:o,digest:null}}function kl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function _u(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Hw=typeof WeakMap=="function"?WeakMap:Map;function Bp(e,t,n){n=$t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ss||(ss=!0,zu=r),_u(e,t)},n}function Wp(e,t,n){n=$t(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){_u(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){_u(e,t),typeof r!="function"&&(ln===null?ln=new Set([this]):ln.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function gf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hw;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=n1.bind(null,e,t,n),t.then(e,e))}function mf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function yf(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$t(-1,1),t.tag=2,sn(n,t,1))),n.lanes|=1),e)}var Bw=Ht.ReactCurrentOwner,Fe=!1;function Oe(e,t,n,r){t.child=e===null?wp(t,null,n,r):mr(t,e.child,n,r)}function vf(e,t,n,r,o){n=n.render;var i=t.ref;return ar(t,o),r=za(e,t,n,r,i,o),n=ba(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ft(e,t,o)):(fe&&n&&xa(t),t.flags|=1,Oe(e,t,r,o),t.child)}function wf(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Ba(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Up(e,t,i,r,o)):(e=Ri(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:yo,n(s,r)&&e.ref===t.ref)return Ft(e,t,o)}return t.flags|=1,e=an(i,r),e.ref=t.ref,e.return=t,t.child=e}function Up(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(yo(i,r)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Fe=!0);else return t.lanes=e.lanes,Ft(e,t,o)}return Su(e,t,n,r,o)}function Yp(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},le(nr,Ue),Ue|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,le(nr,Ue),Ue|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,le(nr,Ue),Ue|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,le(nr,Ue),Ue|=r;return Oe(e,t,o,n),t.child}function Xp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Su(e,t,n,r,o){var i=Be(n)?Tn:Re.current;return i=pr(t,i),ar(t,o),n=za(e,t,n,r,i,o),r=ba(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ft(e,t,o)):(fe&&r&&xa(t),t.flags|=1,Oe(e,t,n,o),t.child)}function xf(e,t,n,r,o){if(Be(n)){var i=!0;Ki(t)}else i=!1;if(ar(t,o),t.stateNode===null)Li(e,t),Hp(t,n,r),Eu(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var u=s.context,a=n.contextType;typeof a=="object"&&a!==null?a=rt(a):(a=Be(n)?Tn:Re.current,a=pr(t,a));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";c||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||u!==a)&&pf(t,s,r,a),Qt=!1;var d=t.memoizedState;s.state=d,ts(t,r,s,o),u=t.memoizedState,l!==r||d!==u||He.current||Qt?(typeof f=="function"&&(xu(t,n,f,r),u=t.memoizedState),(l=Qt||hf(t,n,l,r,d,u,a))?(c||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=a,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Ep(e,t),l=t.memoizedProps,a=t.type===t.elementType?l:lt(t.type,l),s.props=a,c=t.pendingProps,d=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=rt(u):(u=Be(n)?Tn:Re.current,u=pr(t,u));var g=n.getDerivedStateFromProps;(f=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==c||d!==u)&&pf(t,s,r,u),Qt=!1,d=t.memoizedState,s.state=d,ts(t,r,s,o);var m=t.memoizedState;l!==c||d!==m||He.current||Qt?(typeof g=="function"&&(xu(t,n,g,r),m=t.memoizedState),(a=Qt||hf(t,n,a,r,d,m,u)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),s.props=r,s.state=m,s.context=u,r=a):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ku(e,t,n,r,i,o)}function ku(e,t,n,r,o,i){Xp(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&of(t,n,!1),Ft(e,t,i);r=t.stateNode,Bw.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=mr(t,e.child,null,i),t.child=mr(t,null,l,i)):Oe(e,t,l,i),t.memoizedState=r.state,o&&of(t,n,!0),t.child}function Gp(e){var t=e.stateNode;t.pendingContext?rf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&rf(e,t.context,!1),Ia(e,t.containerInfo)}function Ef(e,t,n,r,o){return gr(),_a(o),t.flags|=256,Oe(e,t,n,r),t.child}var Nu={dehydrated:null,treeContext:null,retryLane:0};function Cu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Qp(e,t,n){var r=t.pendingProps,o=pe.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),le(pe,o&1),e===null)return vu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=bs(s,r,0,null),e=Mn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Cu(n),t.memoizedState=Nu,e):$a(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return Ww(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var u={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=an(o,u),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=an(l,i):(i=Mn(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Cu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Nu,r}return i=e.child,e=i.sibling,r=an(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function $a(e,t){return t=bs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ai(e,t,n,r){return r!==null&&_a(r),mr(t,e.child,null,n),e=$a(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ww(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=kl(Error(V(422))),ai(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=bs({mode:"visible",children:r.children},o,0,null),i=Mn(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&mr(t,e.child,null,s),t.child.memoizedState=Cu(s),t.memoizedState=Nu,i);if(!(t.mode&1))return ai(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(V(419)),r=kl(i,r,void 0),ai(e,t,s,r)}if(l=(s&e.childLanes)!==0,Fe||l){if(r=Ce,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,jt(e,o),gt(r,e,o,-1))}return Ha(),r=kl(Error(V(421))),ai(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=r1.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Xe=on(o.nextSibling),Ge=t,fe=!0,ct=null,e!==null&&(Je[et++]=bt,Je[et++]=Rt,Je[et++]=Ln,bt=e.id,Rt=e.overflow,Ln=t),t=$a(t,r.children),t.flags|=4096,t)}function _f(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),wu(e.return,t,n)}function Nl(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Kp(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Oe(e,t,r.children,n),r=pe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_f(e,n,t);else if(e.tag===19)_f(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(le(pe,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ns(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Nl(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ns(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Nl(t,!0,n,null,i);break;case"together":Nl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Li(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ft(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),bn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,n=an(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=an(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Uw(e,t,n){switch(t.tag){case 3:Gp(t),gr();break;case 5:_p(t);break;case 1:Be(t.type)&&Ki(t);break;case 4:Ia(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;le(Ji,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(le(pe,pe.current&1),t.flags|=128,null):n&t.child.childLanes?Qp(e,t,n):(le(pe,pe.current&1),e=Ft(e,t,n),e!==null?e.sibling:null);le(pe,pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Kp(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),le(pe,pe.current),r)break;return null;case 22:case 23:return t.lanes=0,Yp(e,t,n)}return Ft(e,t,n)}var Zp,Mu,qp,Jp;Zp=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Mu=function(){};qp=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,kn(kt.current);var i=null;switch(n){case"input":o=Ql(e,o),r=Ql(e,r),i=[];break;case"select":o=me({},o,{value:void 0}),r=me({},r,{value:void 0}),i=[];break;case"textarea":o=ql(e,o),r=ql(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gi)}eu(n,r);var s;n=null;for(a in o)if(!r.hasOwnProperty(a)&&o.hasOwnProperty(a)&&o[a]!=null)if(a==="style"){var l=o[a];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(ao.hasOwnProperty(a)?i||(i=[]):(i=i||[]).push(a,null));for(a in r){var u=r[a];if(l=o!=null?o[a]:void 0,r.hasOwnProperty(a)&&u!==l&&(u!=null||l!=null))if(a==="style")if(l){for(s in l)!l.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&l[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(i||(i=[]),i.push(a,n)),n=u;else a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(i=i||[]).push(a,u)):a==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(a,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(ao.hasOwnProperty(a)?(u!=null&&a==="onScroll"&&ae("scroll",e),i||l===u||(i=[])):(i=i||[]).push(a,u))}n&&(i=i||[]).push("style",n);var a=i;(t.updateQueue=a)&&(t.flags|=4)}};Jp=function(e,t,n,r){n!==r&&(t.flags|=4)};function Vr(e,t){if(!fe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Yw(e,t,n){var r=t.pendingProps;switch(Ea(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return Be(t.type)&&Qi(),ze(t),null;case 3:return r=t.stateNode,yr(),ce(He),ce(Re),Ta(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(li(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ct!==null&&(Ou(ct),ct=null))),Mu(e,t),ze(t),null;case 5:Pa(t);var o=kn(_o.current);if(n=t.type,e!==null&&t.stateNode!=null)qp(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(V(166));return ze(t),null}if(e=kn(kt.current),li(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[_t]=t,r[xo]=i,e=(t.mode&1)!==0,n){case"dialog":ae("cancel",r),ae("close",r);break;case"iframe":case"object":case"embed":ae("load",r);break;case"video":case"audio":for(o=0;o<Gr.length;o++)ae(Gr[o],r);break;case"source":ae("error",r);break;case"img":case"image":case"link":ae("error",r),ae("load",r);break;case"details":ae("toggle",r);break;case"input":Tc(r,i),ae("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ae("invalid",r);break;case"textarea":zc(r,i),ae("invalid",r)}eu(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];s==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&si(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&si(r.textContent,l,e),o=["children",""+l]):ao.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&ae("scroll",r)}switch(n){case"input":qo(r),Lc(r,i,!0);break;case"textarea":qo(r),bc(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Gi)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Mh(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[_t]=t,e[xo]=r,Zp(e,t,!1,!1),t.stateNode=e;e:{switch(s=tu(n,r),n){case"dialog":ae("cancel",e),ae("close",e),o=r;break;case"iframe":case"object":case"embed":ae("load",e),o=r;break;case"video":case"audio":for(o=0;o<Gr.length;o++)ae(Gr[o],e);o=r;break;case"source":ae("error",e),o=r;break;case"img":case"image":case"link":ae("error",e),ae("load",e),o=r;break;case"details":ae("toggle",e),o=r;break;case"input":Tc(e,r),o=Ql(e,r),ae("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=me({},r,{value:void 0}),ae("invalid",e);break;case"textarea":zc(e,r),o=ql(e,r),ae("invalid",e);break;default:o=r}eu(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];i==="style"?Th(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Ih(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&co(e,u):typeof u=="number"&&co(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ao.hasOwnProperty(i)?u!=null&&i==="onScroll"&&ae("scroll",e):u!=null&&sa(e,i,u,s))}switch(n){case"input":qo(e),Lc(e,r,!1);break;case"textarea":qo(e),bc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ir(e,!!r.multiple,i,!1):r.defaultValue!=null&&ir(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Gi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ze(t),null;case 6:if(e&&t.stateNode!=null)Jp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(V(166));if(n=kn(_o.current),kn(kt.current),li(t)){if(r=t.stateNode,n=t.memoizedProps,r[_t]=t,(i=r.nodeValue!==n)&&(e=Ge,e!==null))switch(e.tag){case 3:si(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&si(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[_t]=t,t.stateNode=r}return ze(t),null;case 13:if(ce(pe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(fe&&Xe!==null&&t.mode&1&&!(t.flags&128))yp(),gr(),t.flags|=98560,i=!1;else if(i=li(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(V(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(V(317));i[_t]=t}else gr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),i=!1}else ct!==null&&(Ou(ct),ct=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||pe.current&1?ke===0&&(ke=3):Ha())),t.updateQueue!==null&&(t.flags|=4),ze(t),null);case 4:return yr(),Mu(e,t),e===null&&vo(t.stateNode.containerInfo),ze(t),null;case 10:return Na(t.type._context),ze(t),null;case 17:return Be(t.type)&&Qi(),ze(t),null;case 19:if(ce(pe),i=t.memoizedState,i===null)return ze(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Vr(i,!1);else{if(ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=ns(e),s!==null){for(t.flags|=128,Vr(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return le(pe,pe.current&1|2),t.child}e=e.sibling}i.tail!==null&&ve()>wr&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304)}else{if(!r)if(e=ns(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Vr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!fe)return ze(t),null}else 2*ve()-i.renderingStartTime>wr&&n!==1073741824&&(t.flags|=128,r=!0,Vr(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ve(),t.sibling=null,n=pe.current,le(pe,r?n&1|2:n&1),t):(ze(t),null);case 22:case 23:return Va(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ue&1073741824&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),null;case 24:return null;case 25:return null}throw Error(V(156,t.tag))}function Xw(e,t){switch(Ea(t),t.tag){case 1:return Be(t.type)&&Qi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yr(),ce(He),ce(Re),Ta(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Pa(t),null;case 13:if(ce(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));gr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(pe),null;case 4:return yr(),null;case 10:return Na(t.type._context),null;case 22:case 23:return Va(),null;case 24:return null;default:return null}}var ci=!1,be=!1,Gw=typeof WeakSet=="function"?WeakSet:Set,U=null;function tr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ye(e,t,r)}else n.current=null}function Iu(e,t,n){try{n()}catch(r){ye(e,t,r)}}var Sf=!1;function Qw(e,t){if(fu=Ui,e=op(),wa(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,u=-1,a=0,f=0,c=e,d=null;t:for(;;){for(var g;c!==n||o!==0&&c.nodeType!==3||(l=s+o),c!==i||r!==0&&c.nodeType!==3||(u=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(g=c.firstChild)!==null;)d=c,c=g;for(;;){if(c===e)break t;if(d===n&&++a===o&&(l=s),d===i&&++f===r&&(u=s),(g=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=g}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(du={focusedElem:e,selectionRange:n},Ui=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var w=m.memoizedProps,x=m.memoizedState,p=t.stateNode,y=p.getSnapshotBeforeUpdate(t.elementType===t.type?w:lt(t.type,w),x);p.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(V(163))}}catch(v){ye(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return m=Sf,Sf=!1,m}function oo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Iu(t,n,i)}o=o.next}while(o!==r)}}function Ls(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Pu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function eg(e){var t=e.alternate;t!==null&&(e.alternate=null,eg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_t],delete t[xo],delete t[gu],delete t[Lw],delete t[zw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function tg(e){return e.tag===5||e.tag===3||e.tag===4}function kf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gi));else if(r!==4&&(e=e.child,e!==null))for(Tu(e,t,n),e=e.sibling;e!==null;)Tu(e,t,n),e=e.sibling}function Lu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Lu(e,t,n),e=e.sibling;e!==null;)Lu(e,t,n),e=e.sibling}var Me=null,ut=!1;function Ut(e,t,n){for(n=n.child;n!==null;)ng(e,t,n),n=n.sibling}function ng(e,t,n){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(Ss,n)}catch{}switch(n.tag){case 5:be||tr(n,t);case 6:var r=Me,o=ut;Me=null,Ut(e,t,n),Me=r,ut=o,Me!==null&&(ut?(e=Me,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Me.removeChild(n.stateNode));break;case 18:Me!==null&&(ut?(e=Me,n=n.stateNode,e.nodeType===8?vl(e.parentNode,n):e.nodeType===1&&vl(e,n),go(e)):vl(Me,n.stateNode));break;case 4:r=Me,o=ut,Me=n.stateNode.containerInfo,ut=!0,Ut(e,t,n),Me=r,ut=o;break;case 0:case 11:case 14:case 15:if(!be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Iu(n,t,s),o=o.next}while(o!==r)}Ut(e,t,n);break;case 1:if(!be&&(tr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ye(n,t,l)}Ut(e,t,n);break;case 21:Ut(e,t,n);break;case 22:n.mode&1?(be=(r=be)||n.memoizedState!==null,Ut(e,t,n),be=r):Ut(e,t,n);break;default:Ut(e,t,n)}}function Nf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Gw),t.forEach(function(r){var o=o1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function st(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:Me=l.stateNode,ut=!1;break e;case 3:Me=l.stateNode.containerInfo,ut=!0;break e;case 4:Me=l.stateNode.containerInfo,ut=!0;break e}l=l.return}if(Me===null)throw Error(V(160));ng(i,s,o),Me=null,ut=!1;var u=o.alternate;u!==null&&(u.return=null),o.return=null}catch(a){ye(o,t,a)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)rg(t,e),t=t.sibling}function rg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(st(t,e),wt(e),r&4){try{oo(3,e,e.return),Ls(3,e)}catch(w){ye(e,e.return,w)}try{oo(5,e,e.return)}catch(w){ye(e,e.return,w)}}break;case 1:st(t,e),wt(e),r&512&&n!==null&&tr(n,n.return);break;case 5:if(st(t,e),wt(e),r&512&&n!==null&&tr(n,n.return),e.flags&32){var o=e.stateNode;try{co(o,"")}catch(w){ye(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&Nh(o,i),tu(l,s);var a=tu(l,i);for(s=0;s<u.length;s+=2){var f=u[s],c=u[s+1];f==="style"?Th(o,c):f==="dangerouslySetInnerHTML"?Ih(o,c):f==="children"?co(o,c):sa(o,f,c,a)}switch(l){case"input":Kl(o,i);break;case"textarea":Ch(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var g=i.value;g!=null?ir(o,!!i.multiple,g,!1):d!==!!i.multiple&&(i.defaultValue!=null?ir(o,!!i.multiple,i.defaultValue,!0):ir(o,!!i.multiple,i.multiple?[]:"",!1))}o[xo]=i}catch(w){ye(e,e.return,w)}}break;case 6:if(st(t,e),wt(e),r&4){if(e.stateNode===null)throw Error(V(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(w){ye(e,e.return,w)}}break;case 3:if(st(t,e),wt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{go(t.containerInfo)}catch(w){ye(e,e.return,w)}break;case 4:st(t,e),wt(e);break;case 13:st(t,e),wt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(ja=ve())),r&4&&Nf(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(be=(a=be)||f,st(t,e),be=a):st(t,e),wt(e),r&8192){if(a=e.memoizedState!==null,(e.stateNode.isHidden=a)&&!f&&e.mode&1)for(U=e,f=e.child;f!==null;){for(c=U=f;U!==null;){switch(d=U,g=d.child,d.tag){case 0:case 11:case 14:case 15:oo(4,d,d.return);break;case 1:tr(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(w){ye(r,n,w)}}break;case 5:tr(d,d.return);break;case 22:if(d.memoizedState!==null){Mf(c);continue}}g!==null?(g.return=d,U=g):Mf(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{o=c.stateNode,a?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=c.stateNode,u=c.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=Ph("display",s))}catch(w){ye(e,e.return,w)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(w){ye(e,e.return,w)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:st(t,e),wt(e),r&4&&Nf(e);break;case 21:break;default:st(t,e),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(tg(n)){var r=n;break e}n=n.return}throw Error(V(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(co(o,""),r.flags&=-33);var i=kf(e);Lu(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=kf(e);Tu(e,l,s);break;default:throw Error(V(161))}}catch(u){ye(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kw(e,t,n){U=e,og(e)}function og(e,t,n){for(var r=(e.mode&1)!==0;U!==null;){var o=U,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||ci;if(!s){var l=o.alternate,u=l!==null&&l.memoizedState!==null||be;l=ci;var a=be;if(ci=s,(be=u)&&!a)for(U=o;U!==null;)s=U,u=s.child,s.tag===22&&s.memoizedState!==null?If(o):u!==null?(u.return=s,U=u):If(o);for(;i!==null;)U=i,og(i),i=i.sibling;U=o,ci=l,be=a}Cf(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,U=i):Cf(e)}}function Cf(e){for(;U!==null;){var t=U;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:be||Ls(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!be)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:lt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&cf(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}cf(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var a=t.alternate;if(a!==null){var f=a.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&go(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(V(163))}be||t.flags&512&&Pu(t)}catch(d){ye(t,t.return,d)}}if(t===e){U=null;break}if(n=t.sibling,n!==null){n.return=t.return,U=n;break}U=t.return}}function Mf(e){for(;U!==null;){var t=U;if(t===e){U=null;break}var n=t.sibling;if(n!==null){n.return=t.return,U=n;break}U=t.return}}function If(e){for(;U!==null;){var t=U;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ls(4,t)}catch(u){ye(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(u){ye(t,o,u)}}var i=t.return;try{Pu(t)}catch(u){ye(t,i,u)}break;case 5:var s=t.return;try{Pu(t)}catch(u){ye(t,s,u)}}}catch(u){ye(t,t.return,u)}if(t===e){U=null;break}var l=t.sibling;if(l!==null){l.return=t.return,U=l;break}U=t.return}}var Zw=Math.ceil,is=Ht.ReactCurrentDispatcher,Aa=Ht.ReactCurrentOwner,nt=Ht.ReactCurrentBatchConfig,re=0,Ce=null,xe=null,Ie=0,Ue=0,nr=gn(0),ke=0,Co=null,bn=0,zs=0,Da=0,io=null,je=null,ja=0,wr=1/0,Tt=null,ss=!1,zu=null,ln=null,fi=!1,en=null,ls=0,so=0,bu=null,zi=-1,bi=0;function $e(){return re&6?ve():zi!==-1?zi:zi=ve()}function un(e){return e.mode&1?re&2&&Ie!==0?Ie&-Ie:Rw.transition!==null?(bi===0&&(bi=Hh()),bi):(e=se,e!==0||(e=window.event,e=e===void 0?16:Qh(e.type)),e):1}function gt(e,t,n,r){if(50<so)throw so=0,bu=null,Error(V(185));Do(e,n,r),(!(re&2)||e!==Ce)&&(e===Ce&&(!(re&2)&&(zs|=n),ke===4&&Zt(e,Ie)),We(e,r),n===1&&re===0&&!(t.mode&1)&&(wr=ve()+500,Is&&mn()))}function We(e,t){var n=e.callbackNode;Rv(e,t);var r=Wi(e,e===Ce?Ie:0);if(r===0)n!==null&&$c(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&$c(n),t===1)e.tag===0?bw(Pf.bind(null,e)):pp(Pf.bind(null,e)),Pw(function(){!(re&6)&&mn()}),n=null;else{switch(Bh(r)){case 1:n=fa;break;case 4:n=Fh;break;case 16:n=Bi;break;case 536870912:n=Vh;break;default:n=Bi}n=dg(n,ig.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ig(e,t){if(zi=-1,bi=0,re&6)throw Error(V(327));var n=e.callbackNode;if(cr()&&e.callbackNode!==n)return null;var r=Wi(e,e===Ce?Ie:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=us(e,r);else{t=r;var o=re;re|=2;var i=lg();(Ce!==e||Ie!==t)&&(Tt=null,wr=ve()+500,Cn(e,t));do try{e1();break}catch(l){sg(e,l)}while(!0);ka(),is.current=i,re=o,xe!==null?t=0:(Ce=null,Ie=0,t=ke)}if(t!==0){if(t===2&&(o=su(e),o!==0&&(r=o,t=Ru(e,o))),t===1)throw n=Co,Cn(e,0),Zt(e,r),We(e,ve()),n;if(t===6)Zt(e,r);else{if(o=e.current.alternate,!(r&30)&&!qw(o)&&(t=us(e,r),t===2&&(i=su(e),i!==0&&(r=i,t=Ru(e,i))),t===1))throw n=Co,Cn(e,0),Zt(e,r),We(e,ve()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(V(345));case 2:xn(e,je,Tt);break;case 3:if(Zt(e,r),(r&130023424)===r&&(t=ja+500-ve(),10<t)){if(Wi(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){$e(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=pu(xn.bind(null,e,je,Tt),t);break}xn(e,je,Tt);break;case 4:if(Zt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-pt(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=ve()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Zw(r/1960))-r,10<r){e.timeoutHandle=pu(xn.bind(null,e,je,Tt),r);break}xn(e,je,Tt);break;case 5:xn(e,je,Tt);break;default:throw Error(V(329))}}}return We(e,ve()),e.callbackNode===n?ig.bind(null,e):null}function Ru(e,t){var n=io;return e.current.memoizedState.isDehydrated&&(Cn(e,t).flags|=256),e=us(e,t),e!==2&&(t=je,je=n,t!==null&&Ou(t)),e}function Ou(e){je===null?je=e:je.push.apply(je,e)}function qw(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!mt(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Zt(e,t){for(t&=~Da,t&=~zs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pt(t),r=1<<n;e[n]=-1,t&=~r}}function Pf(e){if(re&6)throw Error(V(327));cr();var t=Wi(e,0);if(!(t&1))return We(e,ve()),null;var n=us(e,t);if(e.tag!==0&&n===2){var r=su(e);r!==0&&(t=r,n=Ru(e,r))}if(n===1)throw n=Co,Cn(e,0),Zt(e,t),We(e,ve()),n;if(n===6)throw Error(V(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xn(e,je,Tt),We(e,ve()),null}function Fa(e,t){var n=re;re|=1;try{return e(t)}finally{re=n,re===0&&(wr=ve()+500,Is&&mn())}}function Rn(e){en!==null&&en.tag===0&&!(re&6)&&cr();var t=re;re|=1;var n=nt.transition,r=se;try{if(nt.transition=null,se=1,e)return e()}finally{se=r,nt.transition=n,re=t,!(re&6)&&mn()}}function Va(){Ue=nr.current,ce(nr)}function Cn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Iw(n)),xe!==null)for(n=xe.return;n!==null;){var r=n;switch(Ea(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Qi();break;case 3:yr(),ce(He),ce(Re),Ta();break;case 5:Pa(r);break;case 4:yr();break;case 13:ce(pe);break;case 19:ce(pe);break;case 10:Na(r.type._context);break;case 22:case 23:Va()}n=n.return}if(Ce=e,xe=e=an(e.current,null),Ie=Ue=t,ke=0,Co=null,Da=zs=bn=0,je=io=null,Sn!==null){for(t=0;t<Sn.length;t++)if(n=Sn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Sn=null}return e}function sg(e,t){do{var n=xe;try{if(ka(),Pi.current=os,rs){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}rs=!1}if(zn=0,Ne=Se=ge=null,ro=!1,So=0,Aa.current=null,n===null||n.return===null){ke=1,Co=t,xe=null;break}e:{var i=e,s=n.return,l=n,u=t;if(t=Ie,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var a=u,f=l,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var g=mf(s);if(g!==null){g.flags&=-257,yf(g,s,l,i,t),g.mode&1&&gf(i,a,t),t=g,u=a;var m=t.updateQueue;if(m===null){var w=new Set;w.add(u),t.updateQueue=w}else m.add(u);break e}else{if(!(t&1)){gf(i,a,t),Ha();break e}u=Error(V(426))}}else if(fe&&l.mode&1){var x=mf(s);if(x!==null){!(x.flags&65536)&&(x.flags|=256),yf(x,s,l,i,t),_a(vr(u,l));break e}}i=u=vr(u,l),ke!==4&&(ke=2),io===null?io=[i]:io.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=Bp(i,u,t);af(i,p);break e;case 1:l=u;var y=i.type,h=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(ln===null||!ln.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var v=Wp(i,l,t);af(i,v);break e}}i=i.return}while(i!==null)}ag(n)}catch(E){t=E,xe===n&&n!==null&&(xe=n=n.return);continue}break}while(!0)}function lg(){var e=is.current;return is.current=os,e===null?os:e}function Ha(){(ke===0||ke===3||ke===2)&&(ke=4),Ce===null||!(bn&268435455)&&!(zs&268435455)||Zt(Ce,Ie)}function us(e,t){var n=re;re|=2;var r=lg();(Ce!==e||Ie!==t)&&(Tt=null,Cn(e,t));do try{Jw();break}catch(o){sg(e,o)}while(!0);if(ka(),re=n,is.current=r,xe!==null)throw Error(V(261));return Ce=null,Ie=0,ke}function Jw(){for(;xe!==null;)ug(xe)}function e1(){for(;xe!==null&&!Nv();)ug(xe)}function ug(e){var t=fg(e.alternate,e,Ue);e.memoizedProps=e.pendingProps,t===null?ag(e):xe=t,Aa.current=null}function ag(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Xw(n,t),n!==null){n.flags&=32767,xe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,xe=null;return}}else if(n=Yw(n,t,Ue),n!==null){xe=n;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);ke===0&&(ke=5)}function xn(e,t,n){var r=se,o=nt.transition;try{nt.transition=null,se=1,t1(e,t,n,r)}finally{nt.transition=o,se=r}return null}function t1(e,t,n,r){do cr();while(en!==null);if(re&6)throw Error(V(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(V(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Ov(e,i),e===Ce&&(xe=Ce=null,Ie=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||fi||(fi=!0,dg(Bi,function(){return cr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=nt.transition,nt.transition=null;var s=se;se=1;var l=re;re|=4,Aa.current=null,Qw(e,n),rg(n,e),Ew(du),Ui=!!fu,du=fu=null,e.current=n,Kw(n),Cv(),re=l,se=s,nt.transition=i}else e.current=n;if(fi&&(fi=!1,en=e,ls=o),i=e.pendingLanes,i===0&&(ln=null),Pv(n.stateNode),We(e,ve()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(ss)throw ss=!1,e=zu,zu=null,e;return ls&1&&e.tag!==0&&cr(),i=e.pendingLanes,i&1?e===bu?so++:(so=0,bu=e):so=0,mn(),null}function cr(){if(en!==null){var e=Bh(ls),t=nt.transition,n=se;try{if(nt.transition=null,se=16>e?16:e,en===null)var r=!1;else{if(e=en,en=null,ls=0,re&6)throw Error(V(331));var o=re;for(re|=4,U=e.current;U!==null;){var i=U,s=i.child;if(U.flags&16){var l=i.deletions;if(l!==null){for(var u=0;u<l.length;u++){var a=l[u];for(U=a;U!==null;){var f=U;switch(f.tag){case 0:case 11:case 15:oo(8,f,i)}var c=f.child;if(c!==null)c.return=f,U=c;else for(;U!==null;){f=U;var d=f.sibling,g=f.return;if(eg(f),f===a){U=null;break}if(d!==null){d.return=g,U=d;break}U=g}}}var m=i.alternate;if(m!==null){var w=m.child;if(w!==null){m.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}U=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,U=s;else e:for(;U!==null;){if(i=U,i.flags&2048)switch(i.tag){case 0:case 11:case 15:oo(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,U=p;break e}U=i.return}}var y=e.current;for(U=y;U!==null;){s=U;var h=s.child;if(s.subtreeFlags&2064&&h!==null)h.return=s,U=h;else e:for(s=y;U!==null;){if(l=U,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Ls(9,l)}}catch(E){ye(l,l.return,E)}if(l===s){U=null;break e}var v=l.sibling;if(v!==null){v.return=l.return,U=v;break e}U=l.return}}if(re=o,mn(),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(Ss,e)}catch{}r=!0}return r}finally{se=n,nt.transition=t}}return!1}function Tf(e,t,n){t=vr(n,t),t=Bp(e,t,1),e=sn(e,t,1),t=$e(),e!==null&&(Do(e,1,t),We(e,t))}function ye(e,t,n){if(e.tag===3)Tf(e,e,n);else for(;t!==null;){if(t.tag===3){Tf(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ln===null||!ln.has(r))){e=vr(n,e),e=Wp(t,e,1),t=sn(t,e,1),e=$e(),t!==null&&(Do(t,1,e),We(t,e));break}}t=t.return}}function n1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=$e(),e.pingedLanes|=e.suspendedLanes&n,Ce===e&&(Ie&n)===n&&(ke===4||ke===3&&(Ie&130023424)===Ie&&500>ve()-ja?Cn(e,0):Da|=n),We(e,t)}function cg(e,t){t===0&&(e.mode&1?(t=ti,ti<<=1,!(ti&130023424)&&(ti=4194304)):t=1);var n=$e();e=jt(e,t),e!==null&&(Do(e,t,n),We(e,n))}function r1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cg(e,n)}function o1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(V(314))}r!==null&&r.delete(t),cg(e,n)}var fg;fg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||He.current)Fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Fe=!1,Uw(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,fe&&t.flags&1048576&&gp(t,qi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Li(e,t),e=t.pendingProps;var o=pr(t,Re.current);ar(t,n),o=za(null,t,r,e,o,n);var i=ba();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Be(r)?(i=!0,Ki(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ma(t),o.updater=Ts,t.stateNode=o,o._reactInternals=t,Eu(t,r,e,n),t=ku(null,t,r,!0,i,n)):(t.tag=0,fe&&i&&xa(t),Oe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Li(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=s1(r),e=lt(r,e),o){case 0:t=Su(null,t,r,e,n);break e;case 1:t=xf(null,t,r,e,n);break e;case 11:t=vf(null,t,r,e,n);break e;case 14:t=wf(null,t,r,lt(r.type,e),n);break e}throw Error(V(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lt(r,o),Su(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lt(r,o),xf(e,t,r,o,n);case 3:e:{if(Gp(t),e===null)throw Error(V(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Ep(e,t),ts(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=vr(Error(V(423)),t),t=Ef(e,t,r,n,o);break e}else if(r!==o){o=vr(Error(V(424)),t),t=Ef(e,t,r,n,o);break e}else for(Xe=on(t.stateNode.containerInfo.firstChild),Ge=t,fe=!0,ct=null,n=wp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(gr(),r===o){t=Ft(e,t,n);break e}Oe(e,t,r,n)}t=t.child}return t;case 5:return _p(t),e===null&&vu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,hu(r,o)?s=null:i!==null&&hu(r,i)&&(t.flags|=32),Xp(e,t),Oe(e,t,s,n),t.child;case 6:return e===null&&vu(t),null;case 13:return Qp(e,t,n);case 4:return Ia(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=mr(t,null,r,n):Oe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lt(r,o),vf(e,t,r,o,n);case 7:return Oe(e,t,t.pendingProps,n),t.child;case 8:return Oe(e,t,t.pendingProps.children,n),t.child;case 12:return Oe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,le(Ji,r._currentValue),r._currentValue=s,i!==null)if(mt(i.value,s)){if(i.children===o.children&&!He.current){t=Ft(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=$t(-1,n&-n),u.tag=2;var a=i.updateQueue;if(a!==null){a=a.shared;var f=a.pending;f===null?u.next=u:(u.next=f.next,f.next=u),a.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),wu(i.return,n,t),l.lanes|=n;break}u=u.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(V(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),wu(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Oe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ar(t,n),o=rt(o),r=r(o),t.flags|=1,Oe(e,t,r,n),t.child;case 14:return r=t.type,o=lt(r,t.pendingProps),o=lt(r.type,o),wf(e,t,r,o,n);case 15:return Up(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lt(r,o),Li(e,t),t.tag=1,Be(r)?(e=!0,Ki(t)):e=!1,ar(t,n),Hp(t,r,o),Eu(t,r,o,n),ku(null,t,r,!0,e,n);case 19:return Kp(e,t,n);case 22:return Yp(e,t,n)}throw Error(V(156,t.tag))};function dg(e,t){return jh(e,t)}function i1(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tt(e,t,n,r){return new i1(e,t,n,r)}function Ba(e){return e=e.prototype,!(!e||!e.isReactComponent)}function s1(e){if(typeof e=="function")return Ba(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ua)return 11;if(e===aa)return 14}return 2}function an(e,t){var n=e.alternate;return n===null?(n=tt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ri(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Ba(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Yn:return Mn(n.children,o,i,t);case la:s=8,o|=8;break;case Ul:return e=tt(12,n,t,o|2),e.elementType=Ul,e.lanes=i,e;case Yl:return e=tt(13,n,t,o),e.elementType=Yl,e.lanes=i,e;case Xl:return e=tt(19,n,t,o),e.elementType=Xl,e.lanes=i,e;case _h:return bs(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xh:s=10;break e;case Eh:s=9;break e;case ua:s=11;break e;case aa:s=14;break e;case Gt:s=16,r=null;break e}throw Error(V(130,e==null?e:typeof e,""))}return t=tt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Mn(e,t,n,r){return e=tt(7,e,r,t),e.lanes=n,e}function bs(e,t,n,r){return e=tt(22,e,r,t),e.elementType=_h,e.lanes=n,e.stateNode={isHidden:!1},e}function Cl(e,t,n){return e=tt(6,e,null,t),e.lanes=n,e}function Ml(e,t,n){return t=tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function l1(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ll(0),this.expirationTimes=ll(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ll(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Wa(e,t,n,r,o,i,s,l,u){return e=new l1(e,t,n,l,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=tt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ma(i),e}function u1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Un,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function hg(e){if(!e)return dn;e=e._reactInternals;e:{if(Fn(e)!==e||e.tag!==1)throw Error(V(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Be(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(V(171))}if(e.tag===1){var n=e.type;if(Be(n))return hp(e,n,t)}return t}function pg(e,t,n,r,o,i,s,l,u){return e=Wa(n,r,!0,e,o,i,s,l,u),e.context=hg(null),n=e.current,r=$e(),o=un(n),i=$t(r,o),i.callback=t??null,sn(n,i,o),e.current.lanes=o,Do(e,o,r),We(e,r),e}function Rs(e,t,n,r){var o=t.current,i=$e(),s=un(o);return n=hg(n),t.context===null?t.context=n:t.pendingContext=n,t=$t(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=sn(o,t,s),e!==null&&(gt(e,o,s,i),Ii(e,o,s)),s}function as(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Lf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ua(e,t){Lf(e,t),(e=e.alternate)&&Lf(e,t)}function a1(){return null}var gg=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ya(e){this._internalRoot=e}Os.prototype.render=Ya.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));Rs(e,t,null,null)};Os.prototype.unmount=Ya.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rn(function(){Rs(null,e,null,null)}),t[Dt]=null}};function Os(e){this._internalRoot=e}Os.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yh();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Kt.length&&t!==0&&t<Kt[n].priority;n++);Kt.splice(n,0,e),n===0&&Gh(e)}};function Xa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zf(){}function c1(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var a=as(s);i.call(a)}}var s=pg(t,r,e,0,null,!1,!1,"",zf);return e._reactRootContainer=s,e[Dt]=s.current,vo(e.nodeType===8?e.parentNode:e),Rn(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var a=as(u);l.call(a)}}var u=Wa(e,0,!1,null,null,!1,!1,"",zf);return e._reactRootContainer=u,e[Dt]=u.current,vo(e.nodeType===8?e.parentNode:e),Rn(function(){Rs(t,u,n,r)}),u}function As(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var l=o;o=function(){var u=as(s);l.call(u)}}Rs(t,s,e,o)}else s=c1(n,t,e,o,r);return as(s)}Wh=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Xr(t.pendingLanes);n!==0&&(da(t,n|1),We(t,ve()),!(re&6)&&(wr=ve()+500,mn()))}break;case 13:Rn(function(){var r=jt(e,1);if(r!==null){var o=$e();gt(r,e,1,o)}}),Ua(e,1)}};ha=function(e){if(e.tag===13){var t=jt(e,134217728);if(t!==null){var n=$e();gt(t,e,134217728,n)}Ua(e,134217728)}};Uh=function(e){if(e.tag===13){var t=un(e),n=jt(e,t);if(n!==null){var r=$e();gt(n,e,t,r)}Ua(e,t)}};Yh=function(){return se};Xh=function(e,t){var n=se;try{return se=e,t()}finally{se=n}};ru=function(e,t,n){switch(t){case"input":if(Kl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Ms(r);if(!o)throw Error(V(90));kh(r),Kl(r,o)}}}break;case"textarea":Ch(e,n);break;case"select":t=n.value,t!=null&&ir(e,!!n.multiple,t,!1)}};bh=Fa;Rh=Rn;var f1={usingClientEntryPoint:!1,Events:[Fo,Kn,Ms,Lh,zh,Fa]},Hr={findFiberByHostInstance:_n,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},d1={bundleType:Hr.bundleType,version:Hr.version,rendererPackageName:Hr.rendererPackageName,rendererConfig:Hr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ht.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ah(e),e===null?null:e.stateNode},findFiberByHostInstance:Hr.findFiberByHostInstance||a1,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 di=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!di.isDisabled&&di.supportsFiber)try{Ss=di.inject(d1),St=di}catch{}}Ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f1;Ze.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xa(t))throw Error(V(200));return u1(e,t,null,n)};Ze.createRoot=function(e,t){if(!Xa(e))throw Error(V(299));var n=!1,r="",o=gg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Wa(e,1,!1,null,null,n,!1,r,o),e[Dt]=t.current,vo(e.nodeType===8?e.parentNode:e),new Ya(t)};Ze.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=Ah(t),e=e===null?null:e.stateNode,e};Ze.flushSync=function(e){return Rn(e)};Ze.hydrate=function(e,t,n){if(!$s(t))throw Error(V(200));return As(null,e,t,!0,n)};Ze.hydrateRoot=function(e,t,n){if(!Xa(e))throw Error(V(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=gg;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=pg(t,null,e,1,n??null,o,!1,i,s),e[Dt]=t.current,vo(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Os(t)};Ze.render=function(e,t,n){if(!$s(t))throw Error(V(200));return As(null,e,t,!1,n)};Ze.unmountComponentAtNode=function(e){if(!$s(e))throw Error(V(40));return e._reactRootContainer?(Rn(function(){As(null,null,e,!1,function(){e._reactRootContainer=null,e[Dt]=null})}),!0):!1};Ze.unstable_batchedUpdates=Fa;Ze.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$s(n))throw Error(V(200));if(e==null||e._reactInternals===void 0)throw Error(V(38));return As(e,t,n,!1,r)};Ze.version="18.3.1-next-f1338f8080-20240426";function mg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mg)}catch(e){console.error(e)}}mg(),mh.exports=Ze;var h1=mh.exports,yg,bf=h1;yg=bf.createRoot,bf.hydrateRoot;function _e(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=_e(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var p1={value:()=>{}};function Ds(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Oi(n)}function Oi(e){this._=e}function g1(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Oi.prototype=Ds.prototype={constructor:Oi,on:function(e,t){var n=this._,r=g1(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=m1(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=Rf(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Rf(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Oi(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function m1(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Rf(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=p1,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var $u="http://www.w3.org/1999/xhtml";const Of={svg:"http://www.w3.org/2000/svg",xhtml:$u,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function js(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Of.hasOwnProperty(t)?{space:Of[t],local:e}:e}function y1(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===$u&&t.documentElement.namespaceURI===$u?t.createElement(e):t.createElementNS(n,e)}}function v1(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function vg(e){var t=js(e);return(t.local?v1:y1)(t)}function w1(){}function Ga(e){return e==null?w1:function(){return this.querySelector(e)}}function x1(e){typeof e!="function"&&(e=Ga(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=new Array(s),u,a,f=0;f<s;++f)(u=i[f])&&(a=e.call(u,u.__data__,f,i))&&("__data__"in u&&(a.__data__=u.__data__),l[f]=a);return new Ke(r,this._parents)}function E1(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function _1(){return[]}function wg(e){return e==null?_1:function(){return this.querySelectorAll(e)}}function S1(e){return function(){return E1(e.apply(this,arguments))}}function k1(e){typeof e=="function"?e=S1(e):e=wg(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],l=s.length,u,a=0;a<l;++a)(u=s[a])&&(r.push(e.call(u,u.__data__,a,s)),o.push(u));return new Ke(r,o)}function xg(e){return function(){return this.matches(e)}}function Eg(e){return function(t){return t.matches(e)}}var N1=Array.prototype.find;function C1(e){return function(){return N1.call(this.children,e)}}function M1(){return this.firstElementChild}function I1(e){return this.select(e==null?M1:C1(typeof e=="function"?e:Eg(e)))}var P1=Array.prototype.filter;function T1(){return Array.from(this.children)}function L1(e){return function(){return P1.call(this.children,e)}}function z1(e){return this.selectAll(e==null?T1:L1(typeof e=="function"?e:Eg(e)))}function b1(e){typeof e!="function"&&(e=xg(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],u,a=0;a<s;++a)(u=i[a])&&e.call(u,u.__data__,a,i)&&l.push(u);return new Ke(r,this._parents)}function _g(e){return new Array(e.length)}function R1(){return new Ke(this._enter||this._groups.map(_g),this._parents)}function cs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}cs.prototype={constructor:cs,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function O1(e){return function(){return e}}function $1(e,t,n,r,o,i){for(var s=0,l,u=t.length,a=i.length;s<a;++s)(l=t[s])?(l.__data__=i[s],r[s]=l):n[s]=new cs(e,i[s]);for(;s<u;++s)(l=t[s])&&(o[s]=l)}function A1(e,t,n,r,o,i,s){var l,u,a=new Map,f=t.length,c=i.length,d=new Array(f),g;for(l=0;l<f;++l)(u=t[l])&&(d[l]=g=s.call(u,u.__data__,l,t)+"",a.has(g)?o[l]=u:a.set(g,u));for(l=0;l<c;++l)g=s.call(e,i[l],l,i)+"",(u=a.get(g))?(r[l]=u,u.__data__=i[l],a.delete(g)):n[l]=new cs(e,i[l]);for(l=0;l<f;++l)(u=t[l])&&a.get(d[l])===u&&(o[l]=u)}function D1(e){return e.__data__}function j1(e,t){if(!arguments.length)return Array.from(this,D1);var n=t?A1:$1,r=this._parents,o=this._groups;typeof e!="function"&&(e=O1(e));for(var i=o.length,s=new Array(i),l=new Array(i),u=new Array(i),a=0;a<i;++a){var f=r[a],c=o[a],d=c.length,g=F1(e.call(f,f&&f.__data__,a,r)),m=g.length,w=l[a]=new Array(m),x=s[a]=new Array(m),p=u[a]=new Array(d);n(f,c,w,x,p,g,t);for(var y=0,h=0,v,E;y<m;++y)if(v=w[y]){for(y>=h&&(h=y+1);!(E=x[h])&&++h<m;);v._next=E||null}}return s=new Ke(s,r),s._enter=l,s._exit=u,s}function F1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function V1(){return new Ke(this._exit||this._groups.map(_g),this._parents)}function H1(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function B1(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),l=new Array(o),u=0;u<s;++u)for(var a=n[u],f=r[u],c=a.length,d=l[u]=new Array(c),g,m=0;m<c;++m)(g=a[m]||f[m])&&(d[m]=g);for(;u<o;++u)l[u]=n[u];return new Ke(l,this._parents)}function W1(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function U1(e){e||(e=Y1);function t(c,d){return c&&d?e(c.__data__,d.__data__):!c-!d}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],l=s.length,u=o[i]=new Array(l),a,f=0;f<l;++f)(a=s[f])&&(u[f]=a);u.sort(t)}return new Ke(o,this._parents).order()}function Y1(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function X1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function G1(){return Array.from(this)}function Q1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function K1(){let e=0;for(const t of this)++e;return e}function Z1(){return!this.node()}function q1(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,l;i<s;++i)(l=o[i])&&e.call(l,l.__data__,i,o);return this}function J1(e){return function(){this.removeAttribute(e)}}function ex(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tx(e,t){return function(){this.setAttribute(e,t)}}function nx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function rx(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function ox(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function ix(e,t){var n=js(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?ex:J1:typeof t=="function"?n.local?ox:rx:n.local?nx:tx)(n,t))}function Sg(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function sx(e){return function(){this.style.removeProperty(e)}}function lx(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ux(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ax(e,t,n){return arguments.length>1?this.each((t==null?sx:typeof t=="function"?ux:lx)(e,t,n??"")):xr(this.node(),e)}function xr(e,t){return e.style.getPropertyValue(t)||Sg(e).getComputedStyle(e,null).getPropertyValue(t)}function cx(e){return function(){delete this[e]}}function fx(e,t){return function(){this[e]=t}}function dx(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function hx(e,t){return arguments.length>1?this.each((t==null?cx:typeof t=="function"?dx:fx)(e,t)):this.node()[e]}function kg(e){return e.trim().split(/^|\s+/)}function Qa(e){return e.classList||new Ng(e)}function Ng(e){this._node=e,this._names=kg(e.getAttribute("class")||"")}Ng.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Cg(e,t){for(var n=Qa(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Mg(e,t){for(var n=Qa(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function px(e){return function(){Cg(this,e)}}function gx(e){return function(){Mg(this,e)}}function mx(e,t){return function(){(t.apply(this,arguments)?Cg:Mg)(this,e)}}function yx(e,t){var n=kg(e+"");if(arguments.length<2){for(var r=Qa(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?mx:t?px:gx)(n,t))}function vx(){this.textContent=""}function wx(e){return function(){this.textContent=e}}function xx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ex(e){return arguments.length?this.each(e==null?vx:(typeof e=="function"?xx:wx)(e)):this.node().textContent}function _x(){this.innerHTML=""}function Sx(e){return function(){this.innerHTML=e}}function kx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Nx(e){return arguments.length?this.each(e==null?_x:(typeof e=="function"?kx:Sx)(e)):this.node().innerHTML}function Cx(){this.nextSibling&&this.parentNode.appendChild(this)}function Mx(){return this.each(Cx)}function Ix(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Px(){return this.each(Ix)}function Tx(e){var t=typeof e=="function"?e:vg(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Lx(){return null}function zx(e,t){var n=typeof e=="function"?e:vg(e),r=t==null?Lx:typeof t=="function"?t:Ga(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function bx(){var e=this.parentNode;e&&e.removeChild(this)}function Rx(){return this.each(bx)}function Ox(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $x(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ax(e){return this.select(e?$x:Ox)}function Dx(e){return arguments.length?this.property("__data__",e):this.node().__data__}function jx(e){return function(t){e.call(this,t,this.__data__)}}function Fx(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Vx(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function Hx(e,t,n){return function(){var r=this.__on,o,i=jx(t);if(r){for(var s=0,l=r.length;s<l;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function Bx(e,t,n){var r=Fx(e+""),o,i=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,a=l.length,f;u<a;++u)for(o=0,f=l[u];o<i;++o)if((s=r[o]).type===f.type&&s.name===f.name)return f.value}return}for(l=t?Hx:Vx,o=0;o<i;++o)this.each(l(r[o],t,n));return this}function Ig(e,t,n){var r=Sg(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Wx(e,t){return function(){return Ig(this,e,t)}}function Ux(e,t){return function(){return Ig(this,e,t.apply(this,arguments))}}function Yx(e,t){return this.each((typeof t=="function"?Ux:Wx)(e,t))}function*Xx(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var Pg=[null];function Ke(e,t){this._groups=e,this._parents=t}function Ho(){return new Ke([[document.documentElement]],Pg)}function Gx(){return this}Ke.prototype=Ho.prototype={constructor:Ke,select:x1,selectAll:k1,selectChild:I1,selectChildren:z1,filter:b1,data:j1,enter:R1,exit:V1,join:H1,merge:B1,selection:Gx,order:W1,sort:U1,call:X1,nodes:G1,node:Q1,size:K1,empty:Z1,each:q1,attr:ix,style:ax,property:hx,classed:yx,text:Ex,html:Nx,raise:Mx,lower:Px,append:Tx,insert:zx,remove:Rx,clone:Ax,datum:Dx,on:Bx,dispatch:Yx,[Symbol.iterator]:Xx};function Ye(e){return typeof e=="string"?new Ke([[document.querySelector(e)]],[document.documentElement]):new Ke([[e]],Pg)}function Qx(e){let t;for(;t=e.sourceEvent;)e=t;return e}function at(e,t){if(e=Qx(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Kx={passive:!1},Mo={capture:!0,passive:!1};function Il(e){e.stopImmediatePropagation()}function fr(e){e.preventDefault(),e.stopImmediatePropagation()}function Tg(e){var t=e.document.documentElement,n=Ye(e).on("dragstart.drag",fr,Mo);"onselectstart"in t?n.on("selectstart.drag",fr,Mo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Lg(e,t){var n=e.document.documentElement,r=Ye(e).on("dragstart.drag",null);t&&(r.on("click.drag",fr,Mo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const hi=e=>()=>e;function Au(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:l,dx:u,dy:a,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:a,enumerable:!0,configurable:!0},_:{value:f}})}Au.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Zx(e){return!e.ctrlKey&&!e.button}function qx(){return this.parentNode}function Jx(e,t){return t??{x:e.x,y:e.y}}function eE(){return navigator.maxTouchPoints||"ontouchstart"in this}function zg(){var e=Zx,t=qx,n=Jx,r=eE,o={},i=Ds("start","drag","end"),s=0,l,u,a,f,c=0;function d(v){v.on("mousedown.drag",g).filter(r).on("touchstart.drag",x).on("touchmove.drag",p,Kx).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(v,E){if(!(f||!e.call(this,v,E))){var _=h(this,t.call(this,v,E),v,E,"mouse");_&&(Ye(v.view).on("mousemove.drag",m,Mo).on("mouseup.drag",w,Mo),Tg(v.view),Il(v),a=!1,l=v.clientX,u=v.clientY,_("start",v))}}function m(v){if(fr(v),!a){var E=v.clientX-l,_=v.clientY-u;a=E*E+_*_>c}o.mouse("drag",v)}function w(v){Ye(v.view).on("mousemove.drag mouseup.drag",null),Lg(v.view,a),fr(v),o.mouse("end",v)}function x(v,E){if(e.call(this,v,E)){var _=v.changedTouches,C=t.call(this,v,E),M=_.length,L,D;for(L=0;L<M;++L)(D=h(this,C,v,E,_[L].identifier,_[L]))&&(Il(v),D("start",v,_[L]))}}function p(v){var E=v.changedTouches,_=E.length,C,M;for(C=0;C<_;++C)(M=o[E[C].identifier])&&(fr(v),M("drag",v,E[C]))}function y(v){var E=v.changedTouches,_=E.length,C,M;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),C=0;C<_;++C)(M=o[E[C].identifier])&&(Il(v),M("end",v,E[C]))}function h(v,E,_,C,M,L){var D=i.copy(),T=at(L||_,E),$,F,S;if((S=n.call(v,new Au("beforestart",{sourceEvent:_,target:d,identifier:M,active:s,x:T[0],y:T[1],dx:0,dy:0,dispatch:D}),C))!=null)return $=S.x-T[0]||0,F=S.y-T[1]||0,function b(P,R,k){var N=T,z;switch(P){case"start":o[M]=b,z=s++;break;case"end":delete o[M],--s;case"drag":T=at(k||R,E),z=s;break}D.call(P,v,new Au(P,{sourceEvent:R,subject:S,target:d,identifier:M,active:z,x:T[0]+$,y:T[1]+F,dx:T[0]-N[0],dy:T[1]-N[1],dispatch:D}),C)}}return d.filter=function(v){return arguments.length?(e=typeof v=="function"?v:hi(!!v),d):e},d.container=function(v){return arguments.length?(t=typeof v=="function"?v:hi(v),d):t},d.subject=function(v){return arguments.length?(n=typeof v=="function"?v:hi(v),d):n},d.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:hi(!!v),d):r},d.on=function(){var v=i.on.apply(i,arguments);return v===i?d:v},d.clickDistance=function(v){return arguments.length?(c=(v=+v)*v,d):Math.sqrt(c)},d}function Ka(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function bg(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Bo(){}var Io=.7,fs=1/Io,dr="\\s*([+-]?\\d+)\\s*",Po="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Nt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tE=/^#([0-9a-f]{3,8})$/,nE=new RegExp(`^rgb\\(${dr},${dr},${dr}\\)$`),rE=new RegExp(`^rgb\\(${Nt},${Nt},${Nt}\\)$`),oE=new RegExp(`^rgba\\(${dr},${dr},${dr},${Po}\\)$`),iE=new RegExp(`^rgba\\(${Nt},${Nt},${Nt},${Po}\\)$`),sE=new RegExp(`^hsl\\(${Po},${Nt},${Nt}\\)$`),lE=new RegExp(`^hsla\\(${Po},${Nt},${Nt},${Po}\\)$`),$f={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};Ka(Bo,On,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Af,formatHex:Af,formatHex8:uE,formatHsl:aE,formatRgb:Df,toString:Df});function Af(){return this.rgb().formatHex()}function uE(){return this.rgb().formatHex8()}function aE(){return Rg(this).formatHsl()}function Df(){return this.rgb().formatRgb()}function On(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=tE.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?jf(t):n===3?new Ve(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?pi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?pi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=nE.exec(e))?new Ve(t[1],t[2],t[3],1):(t=rE.exec(e))?new Ve(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=oE.exec(e))?pi(t[1],t[2],t[3],t[4]):(t=iE.exec(e))?pi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=sE.exec(e))?Hf(t[1],t[2]/100,t[3]/100,1):(t=lE.exec(e))?Hf(t[1],t[2]/100,t[3]/100,t[4]):$f.hasOwnProperty(e)?jf($f[e]):e==="transparent"?new Ve(NaN,NaN,NaN,0):null}function jf(e){return new Ve(e>>16&255,e>>8&255,e&255,1)}function pi(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ve(e,t,n,r)}function cE(e){return e instanceof Bo||(e=On(e)),e?(e=e.rgb(),new Ve(e.r,e.g,e.b,e.opacity)):new Ve}function Du(e,t,n,r){return arguments.length===1?cE(e):new Ve(e,t,n,r??1)}function Ve(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ka(Ve,Du,bg(Bo,{brighter(e){return e=e==null?fs:Math.pow(fs,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Io:Math.pow(Io,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ve(In(this.r),In(this.g),In(this.b),ds(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:Ff,formatHex:Ff,formatHex8:fE,formatRgb:Vf,toString:Vf}));function Ff(){return`#${Nn(this.r)}${Nn(this.g)}${Nn(this.b)}`}function fE(){return`#${Nn(this.r)}${Nn(this.g)}${Nn(this.b)}${Nn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vf(){const e=ds(this.opacity);return`${e===1?"rgb(":"rgba("}${In(this.r)}, ${In(this.g)}, ${In(this.b)}${e===1?")":`, ${e})`}`}function ds(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function In(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Nn(e){return e=In(e),(e<16?"0":"")+e.toString(16)}function Hf(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ft(e,t,n,r)}function Rg(e){if(e instanceof ft)return new ft(e.h,e.s,e.l,e.opacity);if(e instanceof Bo||(e=On(e)),!e)return new ft;if(e instanceof ft)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,l=i-o,u=(i+o)/2;return l?(t===i?s=(n-r)/l+(n<r)*6:n===i?s=(r-t)/l+2:s=(t-n)/l+4,l/=u<.5?i+o:2-i-o,s*=60):l=u>0&&u<1?0:s,new ft(s,l,u,e.opacity)}function dE(e,t,n,r){return arguments.length===1?Rg(e):new ft(e,t,n,r??1)}function ft(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ka(ft,dE,bg(Bo,{brighter(e){return e=e==null?fs:Math.pow(fs,e),new ft(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Io:Math.pow(Io,e),new ft(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Ve(Pl(e>=240?e-240:e+120,o,r),Pl(e,o,r),Pl(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new ft(Bf(this.h),gi(this.s),gi(this.l),ds(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=ds(this.opacity);return`${e===1?"hsl(":"hsla("}${Bf(this.h)}, ${gi(this.s)*100}%, ${gi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Bf(e){return e=(e||0)%360,e<0?e+360:e}function gi(e){return Math.max(0,Math.min(1,e||0))}function Pl(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Za=e=>()=>e;function hE(e,t){return function(n){return e+n*t}}function pE(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function gE(e){return(e=+e)==1?Og:function(t,n){return n-t?pE(t,n,e):Za(isNaN(t)?n:t)}}function Og(e,t){var n=t-e;return n?hE(e,n):Za(isNaN(e)?t:e)}const hs=function e(t){var n=gE(t);function r(o,i){var s=n((o=Du(o)).r,(i=Du(i)).r),l=n(o.g,i.g),u=n(o.b,i.b),a=Og(o.opacity,i.opacity);return function(f){return o.r=s(f),o.g=l(f),o.b=u(f),o.opacity=a(f),o+""}}return r.gamma=e,r}(1);function mE(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function yE(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function vE(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=lo(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(l){for(s=0;s<r;++s)i[s]=o[s](l);return i}}function wE(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Et(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function xE(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=lo(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var ju=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Tl=new RegExp(ju.source,"g");function EE(e){return function(){return e}}function _E(e){return function(t){return e(t)+""}}function $g(e,t){var n=ju.lastIndex=Tl.lastIndex=0,r,o,i,s=-1,l=[],u=[];for(e=e+"",t=t+"";(r=ju.exec(e))&&(o=Tl.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),l[s]?l[s]+=i:l[++s]=i),(r=r[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,u.push({i:s,x:Et(r,o)})),n=Tl.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?u[0]?_E(u[0].x):EE(t):(t=u.length,function(a){for(var f=0,c;f<t;++f)l[(c=u[f]).i]=c.x(a);return l.join("")})}function lo(e,t){var n=typeof t,r;return t==null||n==="boolean"?Za(t):(n==="number"?Et:n==="string"?(r=On(t))?(t=r,hs):$g:t instanceof On?hs:t instanceof Date?wE:yE(t)?mE:Array.isArray(t)?vE:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?xE:Et)(e,t)}var Wf=180/Math.PI,Fu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ag(e,t,n,r,o,i){var s,l,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),e*r<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*Wf,skewX:Math.atan(u)*Wf,scaleX:s,scaleY:l}}var mi;function SE(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Fu:Ag(t.a,t.b,t.c,t.d,t.e,t.f)}function kE(e){return e==null||(mi||(mi=document.createElementNS("http://www.w3.org/2000/svg","g")),mi.setAttribute("transform",e),!(e=mi.transform.baseVal.consolidate()))?Fu:(e=e.matrix,Ag(e.a,e.b,e.c,e.d,e.e,e.f))}function Dg(e,t,n,r){function o(a){return a.length?a.pop()+" ":""}function i(a,f,c,d,g,m){if(a!==c||f!==d){var w=g.push("translate(",null,t,null,n);m.push({i:w-4,x:Et(a,c)},{i:w-2,x:Et(f,d)})}else(c||d)&&g.push("translate("+c+t+d+n)}function s(a,f,c,d){a!==f?(a-f>180?f+=360:f-a>180&&(a+=360),d.push({i:c.push(o(c)+"rotate(",null,r)-2,x:Et(a,f)})):f&&c.push(o(c)+"rotate("+f+r)}function l(a,f,c,d){a!==f?d.push({i:c.push(o(c)+"skewX(",null,r)-2,x:Et(a,f)}):f&&c.push(o(c)+"skewX("+f+r)}function u(a,f,c,d,g,m){if(a!==c||f!==d){var w=g.push(o(g)+"scale(",null,",",null,")");m.push({i:w-4,x:Et(a,c)},{i:w-2,x:Et(f,d)})}else(c!==1||d!==1)&&g.push(o(g)+"scale("+c+","+d+")")}return function(a,f){var c=[],d=[];return a=e(a),f=e(f),i(a.translateX,a.translateY,f.translateX,f.translateY,c,d),s(a.rotate,f.rotate,c,d),l(a.skewX,f.skewX,c,d),u(a.scaleX,a.scaleY,f.scaleX,f.scaleY,c,d),a=f=null,function(g){for(var m=-1,w=d.length,x;++m<w;)c[(x=d[m]).i]=x.x(g);return c.join("")}}}var NE=Dg(SE,"px, ","px)","deg)"),CE=Dg(kE,", ",")",")"),ME=1e-12;function Uf(e){return((e=Math.exp(e))+1/e)/2}function IE(e){return((e=Math.exp(e))-1/e)/2}function PE(e){return((e=Math.exp(2*e))-1)/(e+1)}const $i=function e(t,n,r){function o(i,s){var l=i[0],u=i[1],a=i[2],f=s[0],c=s[1],d=s[2],g=f-l,m=c-u,w=g*g+m*m,x,p;if(w<ME)p=Math.log(d/a)/t,x=function(C){return[l+C*g,u+C*m,a*Math.exp(t*C*p)]};else{var y=Math.sqrt(w),h=(d*d-a*a+r*w)/(2*a*n*y),v=(d*d-a*a-r*w)/(2*d*n*y),E=Math.log(Math.sqrt(h*h+1)-h),_=Math.log(Math.sqrt(v*v+1)-v);p=(_-E)/t,x=function(C){var M=C*p,L=Uf(E),D=a/(n*y)*(L*PE(t*M+E)-IE(E));return[l+D*g,u+D*m,a*L/Uf(t*M+E)]}}return x.duration=p*1e3*t/Math.SQRT2,x}return o.rho=function(i){var s=Math.max(.001,+i),l=s*s,u=l*l;return e(s,l,u)},o}(Math.SQRT2,2,4);var Er=0,Qr=0,Br=0,jg=1e3,ps,Kr,gs=0,$n=0,Fs=0,To=typeof performance=="object"&&performance.now?performance:Date,Fg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function qa(){return $n||(Fg(TE),$n=To.now()+Fs)}function TE(){$n=0}function ms(){this._call=this._time=this._next=null}ms.prototype=Vg.prototype={constructor:ms,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?qa():+n)+(t==null?0:+t),!this._next&&Kr!==this&&(Kr?Kr._next=this:ps=this,Kr=this),this._call=e,this._time=n,Vu()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vu())}};function Vg(e,t,n){var r=new ms;return r.restart(e,t,n),r}function LE(){qa(),++Er;for(var e=ps,t;e;)(t=$n-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Er}function Yf(){$n=(gs=To.now())+Fs,Er=Qr=0;try{LE()}finally{Er=0,bE(),$n=0}}function zE(){var e=To.now(),t=e-gs;t>jg&&(Fs-=t,gs=e)}function bE(){for(var e,t=ps,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ps=n);Kr=e,Vu(r)}function Vu(e){if(!Er){Qr&&(Qr=clearTimeout(Qr));var t=e-$n;t>24?(e<1/0&&(Qr=setTimeout(Yf,e-To.now()-Fs)),Br&&(Br=clearInterval(Br))):(Br||(gs=To.now(),Br=setInterval(zE,jg)),Er=1,Fg(Yf))}}function Xf(e,t,n){var r=new ms;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var RE=Ds("start","end","cancel","interrupt"),OE=[],Hg=0,Gf=1,Hu=2,Ai=3,Qf=4,Bu=5,Di=6;function Vs(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;$E(e,n,{name:t,index:r,group:o,on:RE,tween:OE,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Hg})}function Ja(e,t){var n=yt(e,t);if(n.state>Hg)throw new Error("too late; already scheduled");return n}function Mt(e,t){var n=yt(e,t);if(n.state>Ai)throw new Error("too late; already running");return n}function yt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function $E(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=Vg(i,0,n.time);function i(a){n.state=Gf,n.timer.restart(s,n.delay,n.time),n.delay<=a&&s(a-n.delay)}function s(a){var f,c,d,g;if(n.state!==Gf)return u();for(f in r)if(g=r[f],g.name===n.name){if(g.state===Ai)return Xf(s);g.state===Qf?(g.state=Di,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[f]):+f<t&&(g.state=Di,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[f])}if(Xf(function(){n.state===Ai&&(n.state=Qf,n.timer.restart(l,n.delay,n.time),l(a))}),n.state=Hu,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Hu){for(n.state=Ai,o=new Array(d=n.tween.length),f=0,c=-1;f<d;++f)(g=n.tween[f].value.call(e,e.__data__,n.index,n.group))&&(o[++c]=g);o.length=c+1}}function l(a){for(var f=a<n.duration?n.ease.call(null,a/n.duration):(n.timer.restart(u),n.state=Bu,1),c=-1,d=o.length;++c<d;)o[c].call(e,f);n.state===Bu&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=Di,n.timer.stop(),delete r[t];for(var a in r)return;delete e.__transition}}function ji(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>Hu&&r.state<Bu,r.state=Di,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function AE(e){return this.each(function(){ji(this,e)})}function DE(e,t){var n,r;return function(){var o=Mt(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,l=r.length;s<l;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function jE(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Mt(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var l={name:t,value:n},u=0,a=o.length;u<a;++u)if(o[u].name===t){o[u]=l;break}u===a&&o.push(l)}i.tween=o}}function FE(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=yt(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?DE:jE)(n,e,t))}function ec(e,t,n){var r=e._id;return e.each(function(){var o=Mt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return yt(o,r).value[t]}}function Bg(e,t){var n;return(typeof t=="number"?Et:t instanceof On?hs:(n=On(t))?(t=n,hs):$g)(e,t)}function VE(e){return function(){this.removeAttribute(e)}}function HE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function BE(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function WE(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function UE(e,t,n){var r,o,i;return function(){var s,l=n(this),u;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),u=l+"",s===u?null:s===r&&u===o?i:(o=u,i=t(r=s,l)))}}function YE(e,t,n){var r,o,i;return function(){var s,l=n(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),u=l+"",s===u?null:s===r&&u===o?i:(o=u,i=t(r=s,l)))}}function XE(e,t){var n=js(e),r=n==="transform"?CE:Bg;return this.attrTween(e,typeof t=="function"?(n.local?YE:UE)(n,r,ec(this,"attr."+e,t)):t==null?(n.local?HE:VE)(n):(n.local?WE:BE)(n,r,t))}function GE(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function QE(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function KE(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&QE(e,i)),n}return o._value=t,o}function ZE(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&GE(e,i)),n}return o._value=t,o}function qE(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=js(e);return this.tween(n,(r.local?KE:ZE)(r,t))}function JE(e,t){return function(){Ja(this,e).delay=+t.apply(this,arguments)}}function e_(e,t){return t=+t,function(){Ja(this,e).delay=t}}function t_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?JE:e_)(t,e)):yt(this.node(),t).delay}function n_(e,t){return function(){Mt(this,e).duration=+t.apply(this,arguments)}}function r_(e,t){return t=+t,function(){Mt(this,e).duration=t}}function o_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?n_:r_)(t,e)):yt(this.node(),t).duration}function i_(e,t){if(typeof t!="function")throw new Error;return function(){Mt(this,e).ease=t}}function s_(e){var t=this._id;return arguments.length?this.each(i_(t,e)):yt(this.node(),t).ease}function l_(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Mt(this,e).ease=n}}function u_(e){if(typeof e!="function")throw new Error;return this.each(l_(this._id,e))}function a_(e){typeof e!="function"&&(e=xg(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],u,a=0;a<s;++a)(u=i[a])&&e.call(u,u.__data__,a,i)&&l.push(u);return new Vt(r,this._parents,this._name,this._id)}function c_(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),l=0;l<i;++l)for(var u=t[l],a=n[l],f=u.length,c=s[l]=new Array(f),d,g=0;g<f;++g)(d=u[g]||a[g])&&(c[g]=d);for(;l<r;++l)s[l]=t[l];return new Vt(s,this._parents,this._name,this._id)}function f_(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function d_(e,t,n){var r,o,i=f_(t)?Ja:Mt;return function(){var s=i(this,e),l=s.on;l!==r&&(o=(r=l).copy()).on(t,n),s.on=o}}function h_(e,t){var n=this._id;return arguments.length<2?yt(this.node(),n).on.on(e):this.each(d_(n,e,t))}function p_(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function g_(){return this.on("end.remove",p_(this._id))}function m_(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ga(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var l=r[s],u=l.length,a=i[s]=new Array(u),f,c,d=0;d<u;++d)(f=l[d])&&(c=e.call(f,f.__data__,d,l))&&("__data__"in f&&(c.__data__=f.__data__),a[d]=c,Vs(a[d],t,n,d,a,yt(f,n)));return new Vt(i,this._parents,t,n)}function y_(e){var t=this._name,n=this._id;typeof e!="function"&&(e=wg(e));for(var r=this._groups,o=r.length,i=[],s=[],l=0;l<o;++l)for(var u=r[l],a=u.length,f,c=0;c<a;++c)if(f=u[c]){for(var d=e.call(f,f.__data__,c,u),g,m=yt(f,n),w=0,x=d.length;w<x;++w)(g=d[w])&&Vs(g,t,n,w,d,m);i.push(d),s.push(f)}return new Vt(i,s,t,n)}var v_=Ho.prototype.constructor;function w_(){return new v_(this._groups,this._parents)}function x_(e,t){var n,r,o;return function(){var i=xr(this,e),s=(this.style.removeProperty(e),xr(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function Wg(e){return function(){this.style.removeProperty(e)}}function E_(e,t,n){var r,o=n+"",i;return function(){var s=xr(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function __(e,t,n){var r,o,i;return function(){var s=xr(this,e),l=n(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),xr(this,e))),s===u?null:s===r&&u===o?i:(o=u,i=t(r=s,l))}}function S_(e,t){var n,r,o,i="style."+t,s="end."+i,l;return function(){var u=Mt(this,e),a=u.on,f=u.value[i]==null?l||(l=Wg(t)):void 0;(a!==n||o!==f)&&(r=(n=a).copy()).on(s,o=f),u.on=r}}function k_(e,t,n){var r=(e+="")=="transform"?NE:Bg;return t==null?this.styleTween(e,x_(e,r)).on("end.style."+e,Wg(e)):typeof t=="function"?this.styleTween(e,__(e,r,ec(this,"style."+e,t))).each(S_(this._id,e)):this.styleTween(e,E_(e,r,t),n).on("end.style."+e,null)}function N_(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function C_(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&N_(e,s,n)),r}return i._value=t,i}function M_(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,C_(e,t,n??""))}function I_(e){return function(){this.textContent=e}}function P_(e){return function(){var t=e(this);this.textContent=t??""}}function T_(e){return this.tween("text",typeof e=="function"?P_(ec(this,"text",e)):I_(e==null?"":e+""))}function L_(e){return function(t){this.textContent=e.call(this,t)}}function z_(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&L_(o)),t}return r._value=e,r}function b_(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,z_(e))}function R_(){for(var e=this._name,t=this._id,n=Ug(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,u,a=0;a<l;++a)if(u=s[a]){var f=yt(u,t);Vs(u,e,n,a,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Vt(r,this._parents,e,n)}function O_(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var l={value:s},u={value:function(){--o===0&&i()}};n.each(function(){var a=Mt(this,r),f=a.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),a.on=t}),o===0&&i()})}var $_=0;function Vt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ug(){return++$_}var Pt=Ho.prototype;Vt.prototype={constructor:Vt,select:m_,selectAll:y_,selectChild:Pt.selectChild,selectChildren:Pt.selectChildren,filter:a_,merge:c_,selection:w_,transition:R_,call:Pt.call,nodes:Pt.nodes,node:Pt.node,size:Pt.size,empty:Pt.empty,each:Pt.each,on:h_,attr:XE,attrTween:qE,style:k_,styleTween:M_,text:T_,textTween:b_,remove:g_,tween:FE,delay:t_,duration:o_,ease:s_,easeVarying:u_,end:O_,[Symbol.iterator]:Pt[Symbol.iterator]};function A_(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var D_={time:null,delay:0,duration:250,ease:A_};function j_(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function F_(e){var t,n;e instanceof Vt?(t=e._id,e=e._name):(t=Ug(),(n=D_).time=qa(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,u,a=0;a<l;++a)(u=s[a])&&Vs(u,e,t,a,s,n||j_(u,t));return new Vt(r,this._parents,e,t)}Ho.prototype.interrupt=AE;Ho.prototype.transition=F_;const yi=e=>()=>e;function V_(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Ot(e,t,n){this.k=e,this.x=t,this.y=n}Ot.prototype={constructor:Ot,scale:function(e){return e===1?this:new Ot(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ot(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Hs=new Ot(1,0,0);Yg.prototype=Ot.prototype;function Yg(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Hs;return e.__zoom}function Ll(e){e.stopImmediatePropagation()}function Wr(e){e.preventDefault(),e.stopImmediatePropagation()}function H_(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function B_(){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 Kf(){return this.__zoom||Hs}function W_(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function U_(){return navigator.maxTouchPoints||"ontouchstart"in this}function Y_(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function Xg(){var e=H_,t=B_,n=Y_,r=W_,o=U_,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,u=$i,a=Ds("start","zoom","end"),f,c,d,g=500,m=150,w=0,x=10;function p(S){S.property("__zoom",Kf).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",L).on("dblclick.zoom",D).filter(o).on("touchstart.zoom",T).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(S,b,P,R){var k=S.selection?S.selection():S;k.property("__zoom",Kf),S!==k?E(S,b,P,R):k.interrupt().each(function(){_(this,arguments).event(R).start().zoom(null,typeof b=="function"?b.apply(this,arguments):b).end()})},p.scaleBy=function(S,b,P,R){p.scaleTo(S,function(){var k=this.__zoom.k,N=typeof b=="function"?b.apply(this,arguments):b;return k*N},P,R)},p.scaleTo=function(S,b,P,R){p.transform(S,function(){var k=t.apply(this,arguments),N=this.__zoom,z=P==null?v(k):typeof P=="function"?P.apply(this,arguments):P,j=N.invert(z),A=typeof b=="function"?b.apply(this,arguments):b;return n(h(y(N,A),z,j),k,s)},P,R)},p.translateBy=function(S,b,P,R){p.transform(S,function(){return n(this.__zoom.translate(typeof b=="function"?b.apply(this,arguments):b,typeof P=="function"?P.apply(this,arguments):P),t.apply(this,arguments),s)},null,R)},p.translateTo=function(S,b,P,R,k){p.transform(S,function(){var N=t.apply(this,arguments),z=this.__zoom,j=R==null?v(N):typeof R=="function"?R.apply(this,arguments):R;return n(Hs.translate(j[0],j[1]).scale(z.k).translate(typeof b=="function"?-b.apply(this,arguments):-b,typeof P=="function"?-P.apply(this,arguments):-P),N,s)},R,k)};function y(S,b){return b=Math.max(i[0],Math.min(i[1],b)),b===S.k?S:new Ot(b,S.x,S.y)}function h(S,b,P){var R=b[0]-P[0]*S.k,k=b[1]-P[1]*S.k;return R===S.x&&k===S.y?S:new Ot(S.k,R,k)}function v(S){return[(+S[0][0]+ +S[1][0])/2,(+S[0][1]+ +S[1][1])/2]}function E(S,b,P,R){S.on("start.zoom",function(){_(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(R).end()}).tween("zoom",function(){var k=this,N=arguments,z=_(k,N).event(R),j=t.apply(k,N),A=P==null?v(j):typeof P=="function"?P.apply(k,N):P,W=Math.max(j[1][0]-j[0][0],j[1][1]-j[0][1]),B=k.__zoom,X=typeof b=="function"?b.apply(k,N):b,G=u(B.invert(A).concat(W/B.k),X.invert(A).concat(W/X.k));return function(Q){if(Q===1)Q=X;else{var H=G(Q),K=W/H[2];Q=new Ot(K,A[0]-H[0]*K,A[1]-H[1]*K)}z.zoom(null,Q)}})}function _(S,b,P){return!P&&S.__zooming||new C(S,b)}function C(S,b){this.that=S,this.args=b,this.active=0,this.sourceEvent=null,this.extent=t.apply(S,b),this.taps=0}C.prototype={event:function(S){return S&&(this.sourceEvent=S),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(S,b){return this.mouse&&S!=="mouse"&&(this.mouse[1]=b.invert(this.mouse[0])),this.touch0&&S!=="touch"&&(this.touch0[1]=b.invert(this.touch0[0])),this.touch1&&S!=="touch"&&(this.touch1[1]=b.invert(this.touch1[0])),this.that.__zoom=b,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(S){var b=Ye(this.that).datum();a.call(S,this.that,new V_(S,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:a}),b)}};function M(S,...b){if(!e.apply(this,arguments))return;var P=_(this,b).event(S),R=this.__zoom,k=Math.max(i[0],Math.min(i[1],R.k*Math.pow(2,r.apply(this,arguments)))),N=at(S);if(P.wheel)(P.mouse[0][0]!==N[0]||P.mouse[0][1]!==N[1])&&(P.mouse[1]=R.invert(P.mouse[0]=N)),clearTimeout(P.wheel);else{if(R.k===k)return;P.mouse=[N,R.invert(N)],ji(this),P.start()}Wr(S),P.wheel=setTimeout(z,m),P.zoom("mouse",n(h(y(R,k),P.mouse[0],P.mouse[1]),P.extent,s));function z(){P.wheel=null,P.end()}}function L(S,...b){if(d||!e.apply(this,arguments))return;var P=S.currentTarget,R=_(this,b,!0).event(S),k=Ye(S.view).on("mousemove.zoom",A,!0).on("mouseup.zoom",W,!0),N=at(S,P),z=S.clientX,j=S.clientY;Tg(S.view),Ll(S),R.mouse=[N,this.__zoom.invert(N)],ji(this),R.start();function A(B){if(Wr(B),!R.moved){var X=B.clientX-z,G=B.clientY-j;R.moved=X*X+G*G>w}R.event(B).zoom("mouse",n(h(R.that.__zoom,R.mouse[0]=at(B,P),R.mouse[1]),R.extent,s))}function W(B){k.on("mousemove.zoom mouseup.zoom",null),Lg(B.view,R.moved),Wr(B),R.event(B).end()}}function D(S,...b){if(e.apply(this,arguments)){var P=this.__zoom,R=at(S.changedTouches?S.changedTouches[0]:S,this),k=P.invert(R),N=P.k*(S.shiftKey?.5:2),z=n(h(y(P,N),R,k),t.apply(this,b),s);Wr(S),l>0?Ye(this).transition().duration(l).call(E,z,R,S):Ye(this).call(p.transform,z,R,S)}}function T(S,...b){if(e.apply(this,arguments)){var P=S.touches,R=P.length,k=_(this,b,S.changedTouches.length===R).event(S),N,z,j,A;for(Ll(S),z=0;z<R;++z)j=P[z],A=at(j,this),A=[A,this.__zoom.invert(A),j.identifier],k.touch0?!k.touch1&&k.touch0[2]!==A[2]&&(k.touch1=A,k.taps=0):(k.touch0=A,N=!0,k.taps=1+!!f);f&&(f=clearTimeout(f)),N&&(k.taps<2&&(c=A[0],f=setTimeout(function(){f=null},g)),ji(this),k.start())}}function $(S,...b){if(this.__zooming){var P=_(this,b).event(S),R=S.changedTouches,k=R.length,N,z,j,A;for(Wr(S),N=0;N<k;++N)z=R[N],j=at(z,this),P.touch0&&P.touch0[2]===z.identifier?P.touch0[0]=j:P.touch1&&P.touch1[2]===z.identifier&&(P.touch1[0]=j);if(z=P.that.__zoom,P.touch1){var W=P.touch0[0],B=P.touch0[1],X=P.touch1[0],G=P.touch1[1],Q=(Q=X[0]-W[0])*Q+(Q=X[1]-W[1])*Q,H=(H=G[0]-B[0])*H+(H=G[1]-B[1])*H;z=y(z,Math.sqrt(Q/H)),j=[(W[0]+X[0])/2,(W[1]+X[1])/2],A=[(B[0]+G[0])/2,(B[1]+G[1])/2]}else if(P.touch0)j=P.touch0[0],A=P.touch0[1];else return;P.zoom("touch",n(h(z,j,A),P.extent,s))}}function F(S,...b){if(this.__zooming){var P=_(this,b).event(S),R=S.changedTouches,k=R.length,N,z;for(Ll(S),d&&clearTimeout(d),d=setTimeout(function(){d=null},g),N=0;N<k;++N)z=R[N],P.touch0&&P.touch0[2]===z.identifier?delete P.touch0:P.touch1&&P.touch1[2]===z.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&(z=at(z,this),Math.hypot(c[0]-z[0],c[1]-z[1])<x)){var j=Ye(this).on("dblclick.zoom");j&&j.apply(this,arguments)}}}return p.wheelDelta=function(S){return arguments.length?(r=typeof S=="function"?S:yi(+S),p):r},p.filter=function(S){return arguments.length?(e=typeof S=="function"?S:yi(!!S),p):e},p.touchable=function(S){return arguments.length?(o=typeof S=="function"?S:yi(!!S),p):o},p.extent=function(S){return arguments.length?(t=typeof S=="function"?S:yi([[+S[0][0],+S[0][1]],[+S[1][0],+S[1][1]]]),p):t},p.scaleExtent=function(S){return arguments.length?(i[0]=+S[0],i[1]=+S[1],p):[i[0],i[1]]},p.translateExtent=function(S){return arguments.length?(s[0][0]=+S[0][0],s[1][0]=+S[1][0],s[0][1]=+S[0][1],s[1][1]=+S[1][1],p):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},p.constrain=function(S){return arguments.length?(n=S,p):n},p.duration=function(S){return arguments.length?(l=+S,p):l},p.interpolate=function(S){return arguments.length?(u=S,p):u},p.on=function(){var S=a.on.apply(a,arguments);return S===a?p:S},p.clickDistance=function(S){return arguments.length?(w=(S=+S)*S,p):Math.sqrt(w)},p.tapDistance=function(S){return arguments.length?(x=+S,p):x},p}const Ct={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Lo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Gg=["Enter"," ","Escape"],Qg={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var _r;(function(e){e.Strict="strict",e.Loose="loose"})(_r||(_r={}));var Pn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Pn||(Pn={}));var zo;(function(e){e.Partial="partial",e.Full="full"})(zo||(zo={}));const Kg={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var qt;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(qt||(qt={}));var bo;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(bo||(bo={}));var Y;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Y||(Y={}));const Zf={[Y.Left]:Y.Right,[Y.Right]:Y.Left,[Y.Top]:Y.Bottom,[Y.Bottom]:Y.Top};function Zg(e){return e===null?null:e?"valid":"invalid"}const qg=e=>"id"in e&&"source"in e&&"target"in e,X_=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),tc=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Wo=(e,t=[0,0])=>{const{width:n,height:r}=Bt(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},G_=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const i=typeof o=="string";let s=!t.nodeLookup&&!i?o:void 0;t.nodeLookup&&(s=i?t.nodeLookup.get(o):tc(o)?o:t.nodeLookup.get(o.id));const l=s?ys(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Bs(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ws(n)},Uo=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=Bs(n,ys(o)),r=!0)}),r?Ws(n):{x:0,y:0,width:0,height:0}},nc=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{const l={...Xo(t,[n,r,o]),width:t.width/o,height:t.height/o},u=[];for(const a of e.values()){const{measured:f,selectable:c=!0,hidden:d=!1}=a;if(s&&!c||d)continue;const g=f.width??a.width??a.initialWidth??null,m=f.height??a.height??a.initialHeight??null,w=Ro(l,kr(a)),x=(g??0)*(m??0),p=i&&w>0;(!a.internals.handleBounds||p||w>=x||a.dragging)&&u.push(a)}return u},Q_=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function K_(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{o.measured.width&&o.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!o.hidden)&&(!r||r.has(o.id))&&n.set(o.id,o)}),n}async function Z_({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const l=K_(e,s),u=Uo(l),a=rc(u,t,n,(s==null?void 0:s.minZoom)??o,(s==null?void 0:s.maxZoom)??i,(s==null?void 0:s.padding)??.1);return await r.setViewport(a,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function Jg({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:i}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:u,y:a}=l?l.internals.positionAbsolute:{x:0,y:0},f=s.origin??r;let c=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!l)i==null||i("005",Ct.error005());else{const g=l.measured.width,m=l.measured.height;g&&m&&(c=[[u,a],[u+g,a+m]])}else l&&Nr(s.extent)&&(c=[[s.extent[0][0]+u,s.extent[0][1]+a],[s.extent[1][0]+u,s.extent[1][1]+a]]);const d=Nr(c)?An(t,c,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",Ct.error015())),{position:{x:d.x-u+(s.measured.width??0)*f[0],y:d.y-a+(s.measured.height??0)*f[1]},positionAbsolute:d}}async function q_({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){const i=new Set(e.map(d=>d.id)),s=[];for(const d of n){if(d.deletable===!1)continue;const g=i.has(d.id),m=!g&&d.parentId&&s.find(w=>w.id===d.parentId);(g||m)&&s.push(d)}const l=new Set(t.map(d=>d.id)),u=r.filter(d=>d.deletable!==!1),f=Q_(s,u);for(const d of u)l.has(d.id)&&!f.find(m=>m.id===d.id)&&f.push(d);if(!o)return{edges:f,nodes:s};const c=await o({nodes:s,edges:f});return typeof c=="boolean"?c?{edges:f,nodes:s}:{edges:[],nodes:[]}:c}const Sr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),An=(e={x:0,y:0},t,n)=>({x:Sr(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Sr(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function em(e,t,n){const{width:r,height:o}=Bt(n),{x:i,y:s}=n.internals.positionAbsolute;return An(e,[[i,s],[i+r,s+o]],t)}const qf=(e,t,n)=>e<t?Sr(Math.abs(e-t),1,t)/t:e>n?-Sr(Math.abs(e-n),1,t)/t:0,tm=(e,t,n=15,r=40)=>{const o=qf(e.x,r,t.width-r)*n,i=qf(e.y,r,t.height-r)*n;return[o,i]},Bs=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Wu=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Ws=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),kr=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=tc(e)?e.internals.positionAbsolute:Wo(e,t);return{x:n,y:r,width:((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},ys=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=tc(e)?e.internals.positionAbsolute:Wo(e,t);return{x:n,y:r,x2:n+(((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},nm=(e,t)=>Ws(Bs(Wu(e),Wu(t))),Ro=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Jf=e=>dt(e.width)&&dt(e.height)&&dt(e.x)&&dt(e.y),dt=e=>!isNaN(e)&&isFinite(e),J_=(e,t)=>{},Yo=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Xo=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?Yo(l,s):l},vs=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function Wn(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function eS(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Wn(e,n),o=Wn(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=Wn(e.top??e.y??0,n),o=Wn(e.bottom??e.y??0,n),i=Wn(e.left??e.x??0,t),s=Wn(e.right??e.x??0,t);return{top:r,right:s,bottom:o,left:i,x:i+s,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function tS(e,t,n,r,o,i){const{x:s,y:l}=vs(e,[t,n,r]),{x:u,y:a}=vs({x:e.x+e.width,y:e.y+e.height},[t,n,r]),f=o-u,c=i-a;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(f),bottom:Math.floor(c)}}const rc=(e,t,n,r,o,i)=>{const s=eS(i,t,n),l=(t-s.x)/e.width,u=(n-s.y)/e.height,a=Math.min(l,u),f=Sr(a,r,o),c=e.x+e.width/2,d=e.y+e.height/2,g=t/2-c*f,m=n/2-d*f,w=tS(e,g,m,f,t,n),x={left:Math.min(w.left-s.left,0),top:Math.min(w.top-s.top,0),right:Math.min(w.right-s.right,0),bottom:Math.min(w.bottom-s.bottom,0)};return{x:g-x.left+x.right,y:m-x.top+x.bottom,zoom:f}},Oo=()=>{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 Bt(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function rm(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function om(e,t={width:0,height:0},n,r,o){const i={...e},s=r.get(n);if(s){const l=s.origin||o;i.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function ed(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function nS(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function rS(e){return{...Qg,...e||{}}}function uo(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:i,y:s}=ht(e),l=Xo({x:i-((o==null?void 0:o.left)??0),y:s-((o==null?void 0:o.top)??0)},r),{x:u,y:a}=n?Yo(l,t):l;return{xSnapped:u,ySnapped:a,...l}}const oc=e=>({width:e.offsetWidth,height:e.offsetHeight}),im=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},oS=["INPUT","SELECT","TEXTAREA"];function sm(e){var r,o;const t=((o=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:o[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:oS.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const lm=e=>"clientX"in e,ht=(e,t)=>{var i,s;const n=lm(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,o=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},td=(e,t,n,r,o)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:o,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...oc(s)}})};function um({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:l}){const u=e*.125+o*.375+s*.375+n*.125,a=t*.125+i*.375+l*.375+r*.125,f=Math.abs(u-e),c=Math.abs(a-t);return[u,a,f,c]}function vi(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function nd({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case Y.Left:return[t-vi(t-r,i),n];case Y.Right:return[t+vi(r-t,i),n];case Y.Top:return[t,n-vi(n-o,i)];case Y.Bottom:return[t,n+vi(o-n,i)]}}function am({sourceX:e,sourceY:t,sourcePosition:n=Y.Bottom,targetX:r,targetY:o,targetPosition:i=Y.Top,curvature:s=.25}){const[l,u]=nd({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[a,f]=nd({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[c,d,g,m]=um({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:u,targetControlX:a,targetControlY:f});return[`M${e},${t} C${l},${u} ${a},${f} ${r},${o}`,c,d,g,m]}function cm({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2,l=r<t?r+s:r-s;return[i,l,o,s]}function iS({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=o&&n?r+1e3:r,l=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return s+l}function sS({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const i=Bs(ys(e),ys(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return Ro(s,Ws(i))>0}const lS=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,uS=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),fm=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||lS;let o;return qg(e)?o={...e}:o={...e,id:r(e)},uS(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function dm({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,l]=cm({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,l]}const rd={[Y.Left]:{x:-1,y:0},[Y.Right]:{x:1,y:0},[Y.Top]:{x:0,y:-1},[Y.Bottom]:{x:0,y:1}},aS=({source:e,sourcePosition:t=Y.Bottom,target:n})=>t===Y.Left||t===Y.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},od=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function cS({source:e,sourcePosition:t=Y.Bottom,target:n,targetPosition:r=Y.Top,center:o,offset:i,stepPosition:s}){const l=rd[t],u=rd[r],a={x:e.x+l.x*i,y:e.y+l.y*i},f={x:n.x+u.x*i,y:n.y+u.y*i},c=aS({source:a,sourcePosition:t,target:f}),d=c.x!==0?"x":"y",g=c[d];let m=[],w,x;const p={x:0,y:0},y={x:0,y:0},[,,h,v]=cm({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[d]*u[d]===-1){d==="x"?(w=o.x??a.x+(f.x-a.x)*s,x=o.y??(a.y+f.y)/2):(w=o.x??(a.x+f.x)/2,x=o.y??a.y+(f.y-a.y)*s);const M=[{x:w,y:a.y},{x:w,y:f.y}],L=[{x:a.x,y:x},{x:f.x,y:x}];l[d]===g?m=d==="x"?M:L:m=d==="x"?L:M}else{const M=[{x:a.x,y:f.y}],L=[{x:f.x,y:a.y}];if(d==="x"?m=l.x===g?L:M:m=l.y===g?M:L,t===r){const S=Math.abs(e[d]-n[d]);if(S<=i){const b=Math.min(i-1,i-S);l[d]===g?p[d]=(a[d]>e[d]?-1:1)*b:y[d]=(f[d]>n[d]?-1:1)*b}}if(t!==r){const S=d==="x"?"y":"x",b=l[d]===u[S],P=a[S]>f[S],R=a[S]<f[S];(l[d]===1&&(!b&&P||b&&R)||l[d]!==1&&(!b&&R||b&&P))&&(m=d==="x"?M:L)}const D={x:a.x+p.x,y:a.y+p.y},T={x:f.x+y.x,y:f.y+y.y},$=Math.max(Math.abs(D.x-m[0].x),Math.abs(T.x-m[0].x)),F=Math.max(Math.abs(D.y-m[0].y),Math.abs(T.y-m[0].y));$>=F?(w=(D.x+T.x)/2,x=m[0].y):(w=m[0].x,x=(D.y+T.y)/2)}const E={x:a.x+p.x,y:a.y+p.y},_={x:f.x+y.x,y:f.y+y.y};return[[e,...E.x!==m[0].x||E.y!==m[0].y?[E]:[],...m,..._.x!==m[m.length-1].x||_.y!==m[m.length-1].y?[_]:[],n],w,x,h,v]}function fS(e,t,n,r){const o=Math.min(od(e,t)/2,od(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const a=e.x<n.x?-1:1,f=e.y<n.y?1:-1;return`L ${i+o*a},${s}Q ${i},${s} ${i},${s+o*f}`}const l=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${i},${s+o*u}Q ${i},${s} ${i+o*l},${s}`}function Uu({sourceX:e,sourceY:t,sourcePosition:n=Y.Bottom,targetX:r,targetY:o,targetPosition:i=Y.Top,borderRadius:s=5,centerX:l,centerY:u,offset:a=20,stepPosition:f=.5}){const[c,d,g,m,w]=cS({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:l,y:u},offset:a,stepPosition:f});let x=`M${c[0].x} ${c[0].y}`;for(let p=1;p<c.length-1;p++)x+=fS(c[p-1],c[p],c[p+1],s);return x+=`L${c[c.length-1].x} ${c[c.length-1].y}`,[x,d,g,m,w]}function id(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function dS(e){var c;const{sourceNode:t,targetNode:n}=e;if(!id(t)||!id(n))return null;const r=t.internals.handleBounds||sd(t.handles),o=n.internals.handleBounds||sd(n.handles),i=ld((r==null?void 0:r.source)??[],e.sourceHandle),s=ld(e.connectionMode===_r.Strict?(o==null?void 0:o.target)??[]:((o==null?void 0:o.target)??[]).concat((o==null?void 0:o.source)??[]),e.targetHandle);if(!i||!s)return(c=e.onError)==null||c.call(e,"008",Ct.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||Y.Bottom,u=(s==null?void 0:s.position)||Y.Top,a=Dn(t,i,l),f=Dn(n,s,u);return{sourceX:a.x,sourceY:a.y,targetX:f.x,targetY:f.y,sourcePosition:l,targetPosition:u}}function sd(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function Dn(e,t,n=Y.Left,r=!1){const o=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??Bt(e);if(r)return{x:o+s/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case Y.Top:return{x:o+s/2,y:i};case Y.Right:return{x:o+s,y:i+l/2};case Y.Bottom:return{x:o+s/2,y:i+l};case Y.Left:return{x:o,y:i+l/2}}}function ld(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Yu(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function hS(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){const i=new Set;return e.reduce((s,l)=>([l.markerStart||r,l.markerEnd||o].forEach(u=>{if(u&&typeof u=="object"){const a=Yu(u,t);i.has(a)||(s.push({id:a,color:u.color||n,...u}),i.add(a))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}const hm=1e3,pS=10,ic={nodeOrigin:[0,0],nodeExtent:Lo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},gS={...ic,checkEquality:!0};function sc(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function mS(e,t,n){const r=sc(ic,n);for(const o of e.values())if(o.parentId)uc(o,e,t,r);else{const i=Wo(o,r.nodeOrigin),s=Nr(o.extent)?o.extent:r.nodeExtent,l=An(i,s,Bt(o));o.internals.positionAbsolute=l}}function yS(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const o of e.handles){const i={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?n.push(i):o.type==="target"&&r.push(i)}return{source:n,target:r}}function lc(e){return e==="manual"}function Xu(e,t,n,r={}){var f,c;const o=sc(gS,r),i={i:0},s=new Map(t),l=o!=null&&o.elevateNodesOnSelect&&!lc(o.zIndexMode)?hm:0;let u=e.length>0,a=!1;t.clear(),n.clear();for(const d of e){let g=s.get(d.id);if(o.checkEquality&&d===(g==null?void 0:g.internals.userNode))t.set(d.id,g);else{const m=Wo(d,o.nodeOrigin),w=Nr(d.extent)?d.extent:o.nodeExtent,x=An(m,w,Bt(d));g={...o.defaults,...d,measured:{width:(f=d.measured)==null?void 0:f.width,height:(c=d.measured)==null?void 0:c.height},internals:{positionAbsolute:x,handleBounds:yS(d,g),z:pm(d,l,o.zIndexMode),userNode:d}},t.set(d.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(u=!1),d.parentId&&uc(g,t,n,r,i),a||(a=d.selected??!1)}return{nodesInitialized:u,hasSelectedNodes:a}}function vS(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function uc(e,t,n,r,o){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:u}=sc(ic,r),a=e.parentId,f=t.get(a);if(!f){console.warn(`Parent node ${a} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}vS(e,n),o&&!f.parentId&&f.internals.rootParentIndex===void 0&&u==="auto"&&(f.internals.rootParentIndex=++o.i,f.internals.z=f.internals.z+o.i*pS),o&&f.internals.rootParentIndex!==void 0&&(o.i=f.internals.rootParentIndex);const c=i&&!lc(u)?hm:0,{x:d,y:g,z:m}=wS(e,f,s,l,c,u),{positionAbsolute:w}=e.internals,x=d!==w.x||g!==w.y;(x||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:d,y:g}:w,z:m}})}function pm(e,t,n){const r=dt(e.zIndex)?e.zIndex:0;return lc(n)?r:r+(e.selected?t:0)}function wS(e,t,n,r,o,i){const{x:s,y:l}=t.internals.positionAbsolute,u=Bt(e),a=Wo(e,n),f=Nr(e.extent)?An(a,e.extent,u):a;let c=An({x:s+f.x,y:l+f.y},r,u);e.extent==="parent"&&(c=em(c,u,t));const d=pm(e,o,i),g=t.internals.z??0;return{x:c.x,y:c.y,z:g>=d?g+1:d}}function ac(e,t,n,r=[0,0]){var s;const o=[],i=new Map;for(const l of e){const u=t.get(l.parentId);if(!u)continue;const a=((s=i.get(l.parentId))==null?void 0:s.expandedRect)??kr(u),f=nm(a,l.rect);i.set(l.parentId,{expandedRect:f,parent:u})}return i.size>0&&i.forEach(({expandedRect:l,parent:u},a)=>{var h;const f=u.internals.positionAbsolute,c=Bt(u),d=u.origin??r,g=l.x<f.x?Math.round(Math.abs(f.x-l.x)):0,m=l.y<f.y?Math.round(Math.abs(f.y-l.y)):0,w=Math.max(c.width,Math.round(l.width)),x=Math.max(c.height,Math.round(l.height)),p=(w-c.width)*d[0],y=(x-c.height)*d[1];(g>0||m>0||p||y)&&(o.push({id:a,type:"position",position:{x:u.position.x-g+p,y:u.position.y-m+y}}),(h=n.get(a))==null||h.forEach(v=>{e.some(E=>E.id===v.id)||o.push({id:v.id,type:"position",position:{x:v.position.x+g,y:v.position.y+m}})})),(c.width<l.width||c.height<l.height||g||m)&&o.push({id:a,type:"dimensions",setAttributes:!0,dimensions:{width:w+(g?d[0]*g-p:0),height:x+(m?d[1]*m-y:0)}})}),o}function xS(e,t,n,r,o,i,s){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let u=!1;if(!l)return{changes:[],updatedInternals:u};const a=[],f=window.getComputedStyle(l),{m22:c}=new window.DOMMatrixReadOnly(f.transform),d=[];for(const g of e.values()){const m=t.get(g.id);if(!m)continue;if(m.hidden){t.set(m.id,{...m,internals:{...m.internals,handleBounds:void 0}}),u=!0;continue}const w=oc(g.nodeElement),x=m.measured.width!==w.width||m.measured.height!==w.height;if(!!(w.width&&w.height&&(x||!m.internals.handleBounds||g.force))){const y=g.nodeElement.getBoundingClientRect(),h=Nr(m.extent)?m.extent:i;let{positionAbsolute:v}=m.internals;m.parentId&&m.extent==="parent"?v=em(v,w,t.get(m.parentId)):h&&(v=An(v,h,w));const E={...m,measured:w,internals:{...m.internals,positionAbsolute:v,handleBounds:{source:td("source",g.nodeElement,y,c,m.id),target:td("target",g.nodeElement,y,c,m.id)}}};t.set(m.id,E),m.parentId&&uc(E,t,n,{nodeOrigin:o,zIndexMode:s}),u=!0,x&&(a.push({id:m.id,type:"dimensions",dimensions:w}),m.expandParent&&m.parentId&&d.push({id:m.id,parentId:m.parentId,rect:kr(E,o)}))}}if(d.length>0){const g=ac(d,t,n,o);a.push(...g)}return{changes:a,updatedInternals:u}}async function ES({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,i]],r),l=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(l)}function ud(e,t,n,r,o,i){let s=o;const l=r.get(s)||new Map;r.set(s,l.set(n,t)),s=`${o}-${e}`;const u=r.get(s)||new Map;if(r.set(s,u.set(n,t)),i){s=`${o}-${e}-${i}`;const a=r.get(s)||new Map;r.set(s,a.set(n,t))}}function gm(e,t,n){e.clear(),t.clear();for(const r of n){const{source:o,target:i,sourceHandle:s=null,targetHandle:l=null}=r,u={edgeId:r.id,source:o,target:i,sourceHandle:s,targetHandle:l},a=`${o}-${s}--${i}-${l}`,f=`${i}-${l}--${o}-${s}`;ud("source",u,f,e,o,s),ud("target",u,a,e,i,l),t.set(r.id,r)}}function mm(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:mm(n,t):!1}function ad(e,t,n){var o;let r=e;do{if((o=r==null?void 0:r.matches)!=null&&o.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function _S(e,t,n,r){const o=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!mm(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const l=e.get(i);l&&o.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return o}function zl({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,l,u;const o=[];for(const[a,f]of t){const c=(s=n.get(a))==null?void 0:s.internals.userNode;c&&o.push({...c,position:f.position,dragging:r})}if(!e)return[o[0],o];const i=(l=n.get(e))==null?void 0:l.internals.userNode;return[i?{...i,position:((u=t.get(e))==null?void 0:u.position)||i.position,dragging:r}:o[0],o]}function SS({dragItems:e,snapGrid:t,x:n,y:r}){const o=e.values().next().value;if(!o)return null;const i={x:n-o.distance.x,y:r-o.distance.y},s=Yo(i,t);return{x:s.x-i.x,y:s.y-i.y}}function kS({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let i={x:null,y:null},s=0,l=new Map,u=!1,a={x:0,y:0},f=null,c=!1,d=null,g=!1,m=!1,w=null;function x({noDragClassName:y,handleSelector:h,domNode:v,isSelectable:E,nodeId:_,nodeClickDistance:C=0}){d=Ye(v);function M({x:$,y:F}){const{nodeLookup:S,nodeExtent:b,snapGrid:P,snapToGrid:R,nodeOrigin:k,onNodeDrag:N,onSelectionDrag:z,onError:j,updateNodePositions:A}=t();i={x:$,y:F};let W=!1;const B=l.size>1,X=B&&b?Wu(Uo(l)):null,G=B&&R?SS({dragItems:l,snapGrid:P,x:$,y:F}):null;for(const[Q,H]of l){if(!S.has(Q))continue;let K={x:$-H.distance.x,y:F-H.distance.y};R&&(K=G?{x:Math.round(K.x+G.x),y:Math.round(K.y+G.y)}:Yo(K,P));let ee=null;if(B&&b&&!H.extent&&X){const{positionAbsolute:Z}=H.internals,ie=Z.x-X.x+b[0][0],ue=Z.x+H.measured.width-X.x2+b[1][0],oe=Z.y-X.y+b[0][1],Te=Z.y+H.measured.height-X.y2+b[1][1];ee=[[ie,oe],[ue,Te]]}const{position:J,positionAbsolute:q}=Jg({nodeId:Q,nextPosition:K,nodeLookup:S,nodeExtent:ee||b,nodeOrigin:k,onError:j});W=W||H.position.x!==J.x||H.position.y!==J.y,H.position=J,H.internals.positionAbsolute=q}if(m=m||W,!!W&&(A(l,!0),w&&(r||N||!_&&z))){const[Q,H]=zl({nodeId:_,dragItems:l,nodeLookup:S});r==null||r(w,l,Q,H),N==null||N(w,Q,H),_||z==null||z(w,H)}}async function L(){if(!f)return;const{transform:$,panBy:F,autoPanSpeed:S,autoPanOnNodeDrag:b}=t();if(!b){u=!1,cancelAnimationFrame(s);return}const[P,R]=tm(a,f,S);(P!==0||R!==0)&&(i.x=(i.x??0)-P/$[2],i.y=(i.y??0)-R/$[2],await F({x:P,y:R})&&M(i)),s=requestAnimationFrame(L)}function D($){var B;const{nodeLookup:F,multiSelectionActive:S,nodesDraggable:b,transform:P,snapGrid:R,snapToGrid:k,selectNodesOnDrag:N,onNodeDragStart:z,onSelectionDragStart:j,unselectNodesAndEdges:A}=t();c=!0,(!N||!E)&&!S&&_&&((B=F.get(_))!=null&&B.selected||A()),E&&N&&_&&(e==null||e(_));const W=uo($.sourceEvent,{transform:P,snapGrid:R,snapToGrid:k,containerBounds:f});if(i=W,l=_S(F,b,W,_),l.size>0&&(n||z||!_&&j)){const[X,G]=zl({nodeId:_,dragItems:l,nodeLookup:F});n==null||n($.sourceEvent,l,X,G),z==null||z($.sourceEvent,X,G),_||j==null||j($.sourceEvent,G)}}const T=zg().clickDistance(C).on("start",$=>{const{domNode:F,nodeDragThreshold:S,transform:b,snapGrid:P,snapToGrid:R}=t();f=(F==null?void 0:F.getBoundingClientRect())||null,g=!1,m=!1,w=$.sourceEvent,S===0&&D($),i=uo($.sourceEvent,{transform:b,snapGrid:P,snapToGrid:R,containerBounds:f}),a=ht($.sourceEvent,f)}).on("drag",$=>{const{autoPanOnNodeDrag:F,transform:S,snapGrid:b,snapToGrid:P,nodeDragThreshold:R,nodeLookup:k}=t(),N=uo($.sourceEvent,{transform:S,snapGrid:b,snapToGrid:P,containerBounds:f});if(w=$.sourceEvent,($.sourceEvent.type==="touchmove"&&$.sourceEvent.touches.length>1||_&&!k.has(_))&&(g=!0),!g){if(!u&&F&&c&&(u=!0,L()),!c){const z=ht($.sourceEvent,f),j=z.x-a.x,A=z.y-a.y;Math.sqrt(j*j+A*A)>R&&D($)}(i.x!==N.xSnapped||i.y!==N.ySnapped)&&l&&c&&(a=ht($.sourceEvent,f),M(N))}}).on("end",$=>{if(!(!c||g)&&(u=!1,c=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:F,updateNodePositions:S,onNodeDragStop:b,onSelectionDragStop:P}=t();if(m&&(S(l,!1),m=!1),o||b||!_&&P){const[R,k]=zl({nodeId:_,dragItems:l,nodeLookup:F,dragging:!1});o==null||o($.sourceEvent,l,R,k),b==null||b($.sourceEvent,R,k),_||P==null||P($.sourceEvent,k)}}}).filter($=>{const F=$.target;return!$.button&&(!y||!ad(F,`.${y}`,v))&&(!h||ad(F,h,v))});d.call(T)}function p(){d==null||d.on(".drag",null)}return{update:x,destroy:p}}function NS(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Ro(o,kr(i))>0&&r.push(i);return r}const CS=250;function MS(e,t,n,r){var l,u;let o=[],i=1/0;const s=NS(e,n,t+CS);for(const a of s){const f=[...((l=a.internals.handleBounds)==null?void 0:l.source)??[],...((u=a.internals.handleBounds)==null?void 0:u.target)??[]];for(const c of f){if(r.nodeId===c.nodeId&&r.type===c.type&&r.id===c.id)continue;const{x:d,y:g}=Dn(a,c,c.position,!0),m=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(g-e.y,2));m>t||(m<i?(o=[{...c,x:d,y:g}],i=m):m===i&&o.push({...c,x:d,y:g}))}}if(!o.length)return null;if(o.length>1){const a=r.type==="source"?"target":"source";return o.find(f=>f.type===a)??o[0]}return o[0]}function ym(e,t,n,r,o,i=!1){var a,f,c;const s=r.get(e);if(!s)return null;const l=o==="strict"?(a=s.internals.handleBounds)==null?void 0:a[t]:[...((f=s.internals.handleBounds)==null?void 0:f.source)??[],...((c=s.internals.handleBounds)==null?void 0:c.target)??[]],u=(n?l==null?void 0:l.find(d=>d.id===n):l==null?void 0:l[0])??null;return u&&i?{...u,...Dn(s,u,u.position,!0)}:u}function vm(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function IS(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const wm=()=>!0;function PS(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:u,lib:a,autoPanOnConnect:f,flowId:c,panBy:d,cancelConnection:g,onConnectStart:m,onConnect:w,onConnectEnd:x,isValidConnection:p=wm,onReconnectEnd:y,updateConnection:h,getTransform:v,getFromHandle:E,autoPanSpeed:_,dragThreshold:C=1,handleDomNode:M}){const L=im(e.target);let D=0,T;const{x:$,y:F}=ht(e),S=vm(i,M),b=l==null?void 0:l.getBoundingClientRect();let P=!1;if(!b||!S)return;const R=ym(o,S,r,u,t);if(!R)return;let k=ht(e,b),N=!1,z=null,j=!1,A=null;function W(){if(!f||!b)return;const[J,q]=tm(k,b,_);d({x:J,y:q}),D=requestAnimationFrame(W)}const B={...R,nodeId:o,type:S,position:R.position},X=u.get(o);let Q={inProgress:!0,isValid:null,from:Dn(X,B,Y.Left,!0),fromHandle:B,fromPosition:B.position,fromNode:X,to:k,toHandle:null,toPosition:Zf[B.position],toNode:null,pointer:k};function H(){P=!0,h(Q),m==null||m(e,{nodeId:o,handleId:r,handleType:S})}C===0&&H();function K(J){if(!P){const{x:Te,y:Wt}=ht(J),It=Te-$,yn=Wt-F;if(!(It*It+yn*yn>C*C))return;H()}if(!E()||!B){ee(J);return}const q=v();k=ht(J,b),T=MS(Xo(k,q,!1,[1,1]),n,u,B),N||(W(),N=!0);const Z=xm(J,{handle:T,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:p,doc:L,lib:a,flowId:c,nodeLookup:u});A=Z.handleDomNode,z=Z.connection,j=IS(!!T,Z.isValid);const ie=u.get(o),ue=ie?Dn(ie,B,Y.Left,!0):Q.from,oe={...Q,from:ue,isValid:j,to:Z.toHandle&&j?vs({x:Z.toHandle.x,y:Z.toHandle.y},q):k,toHandle:Z.toHandle,toPosition:j&&Z.toHandle?Z.toHandle.position:Zf[B.position],toNode:Z.toHandle?u.get(Z.toHandle.nodeId):null,pointer:k};h(oe),Q=oe}function ee(J){if(!("touches"in J&&J.touches.length>0)){if(P){(T||A)&&z&&j&&(w==null||w(z));const{inProgress:q,...Z}=Q,ie={...Z,toPosition:Q.toHandle?Q.toPosition:null};x==null||x(J,ie),i&&(y==null||y(J,ie))}g(),cancelAnimationFrame(D),N=!1,j=!1,z=null,A=null,L.removeEventListener("mousemove",K),L.removeEventListener("mouseup",ee),L.removeEventListener("touchmove",K),L.removeEventListener("touchend",ee)}}L.addEventListener("mousemove",K),L.addEventListener("mouseup",ee),L.addEventListener("touchmove",K),L.addEventListener("touchend",ee)}function xm(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:l,flowId:u,isValidConnection:a=wm,nodeLookup:f}){const c=i==="target",d=t?s.querySelector(`.${l}-flow__handle[data-id="${u}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:g,y:m}=ht(e),w=s.elementFromPoint(g,m),x=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:d,p={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){const y=vm(void 0,x),h=x.getAttribute("data-nodeid"),v=x.getAttribute("data-handleid"),E=x.classList.contains("connectable"),_=x.classList.contains("connectableend");if(!h||!y)return p;const C={source:c?h:r,sourceHandle:c?v:o,target:c?r:h,targetHandle:c?o:v};p.connection=C;const L=E&&_&&(n===_r.Strict?c&&y==="source"||!c&&y==="target":h!==r||v!==o);p.isValid=L&&a(C),p.toHandle=ym(h,y,v,f,n,!0)}return p}const Gu={onPointerDown:PS,isValid:xm};function TS({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=Ye(e);function i({translateExtent:l,width:u,height:a,zoomStep:f=1,pannable:c=!0,zoomable:d=!0,inversePan:g=!1}){const m=h=>{if(h.sourceEvent.type!=="wheel"||!t)return;const v=n(),E=h.sourceEvent.ctrlKey&&Oo()?10:1,_=-h.sourceEvent.deltaY*(h.sourceEvent.deltaMode===1?.05:h.sourceEvent.deltaMode?1:.002)*f,C=v[2]*Math.pow(2,_*E);t.scaleTo(C)};let w=[0,0];const x=h=>{(h.sourceEvent.type==="mousedown"||h.sourceEvent.type==="touchstart")&&(w=[h.sourceEvent.clientX??h.sourceEvent.touches[0].clientX,h.sourceEvent.clientY??h.sourceEvent.touches[0].clientY])},p=h=>{const v=n();if(h.sourceEvent.type!=="mousemove"&&h.sourceEvent.type!=="touchmove"||!t)return;const E=[h.sourceEvent.clientX??h.sourceEvent.touches[0].clientX,h.sourceEvent.clientY??h.sourceEvent.touches[0].clientY],_=[E[0]-w[0],E[1]-w[1]];w=E;const C=r()*Math.max(v[2],Math.log(v[2]))*(g?-1:1),M={x:v[0]-_[0]*C,y:v[1]-_[1]*C},L=[[0,0],[u,a]];t.setViewportConstrained({x:M.x,y:M.y,zoom:v[2]},L,l)},y=Xg().on("start",x).on("zoom",c?p:null).on("zoom.wheel",d?m:null);o.call(y,{})}function s(){o.on("zoom",null)}return{update:i,destroy:s,pointer:at}}const Us=e=>({x:e.x,y:e.y,zoom:e.k}),bl=({x:e,y:t,zoom:n})=>Hs.translate(e,t).scale(n),rr=(e,t)=>e.target.closest(`.${t}`),Em=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),LS=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Rl=(e,t=0,n=LS,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},_m=e=>{const t=e.ctrlKey&&Oo()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function zS({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:u,onPanZoomEnd:a}){return f=>{if(rr(f,t))return f.ctrlKey&&f.preventDefault(),!1;f.preventDefault(),f.stopImmediatePropagation();const c=n.property("__zoom").k||1;if(f.ctrlKey&&s){const x=at(f),p=_m(f),y=c*Math.pow(2,p);r.scaleTo(n,y,x,f);return}const d=f.deltaMode===1?20:1;let g=o===Pn.Vertical?0:f.deltaX*d,m=o===Pn.Horizontal?0:f.deltaY*d;!Oo()&&f.shiftKey&&o!==Pn.Vertical&&(g=f.deltaY*d,m=0),r.translateBy(n,-(g/c)*i,-(m/c)*i,{internal:!0});const w=Us(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(u==null||u(f,w),e.panScrollTimeout=setTimeout(()=>{a==null||a(f,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(f,w))}}function bS({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,l=rr(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,o)}}function RS({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,l;if((i=r.sourceEvent)!=null&&i.internal)return;const o=Us(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=o,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,o))}}function OS({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{var s,l;e.usedRightMouseButton=!!(n&&Em(t,e.mouseButton??0)),(s=i.sourceEvent)!=null&&s.sync||r([i.transform.x,i.transform.y,i.transform.k]),o&&!((l=i.sourceEvent)!=null&&l.internal)&&(o==null||o(i.sourceEvent,Us(i.transform)))}}function $S({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:i}){return s=>{var l;if(!((l=s.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,i&&Em(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const u=Us(s.transform);e.prevViewport=u,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(s.sourceEvent,u)},n?150:0)}}}function AS({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:l,noPanClassName:u,lib:a,connectionInProgress:f}){return c=>{var x;const d=e||t,g=n&&c.ctrlKey,m=c.type==="wheel";if(c.button===1&&c.type==="mousedown"&&(rr(c,`${a}-flow__node`)||rr(c,`${a}-flow__edge`)))return!0;if(!r&&!d&&!o&&!i&&!n||s||f&&!m||rr(c,l)&&m||rr(c,u)&&(!m||o&&m&&!e)||!n&&c.ctrlKey&&m)return!1;if(!n&&c.type==="touchstart"&&((x=c.touches)==null?void 0:x.length)>1)return c.preventDefault(),!1;if(!d&&!o&&!g&&m||!r&&(c.type==="mousedown"||c.type==="touchstart")||Array.isArray(r)&&!r.includes(c.button)&&c.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||m)&&w}}function DS({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:u}){const a={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},f=e.getBoundingClientRect(),c=Xg().scaleExtent([t,n]).translateExtent(r),d=Ye(e).call(c);y({x:o.x,y:o.y,zoom:Sr(o.zoom,t,n)},[[0,0],[f.width,f.height]],r);const g=d.on("wheel.zoom"),m=d.on("dblclick.zoom");c.wheelDelta(_m);function w(T,$){return d?new Promise(F=>{c==null||c.interpolate(($==null?void 0:$.interpolate)==="linear"?lo:$i).transform(Rl(d,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>F(!0)),T)}):Promise.resolve(!1)}function x({noWheelClassName:T,noPanClassName:$,onPaneContextMenu:F,userSelectionActive:S,panOnScroll:b,panOnDrag:P,panOnScrollMode:R,panOnScrollSpeed:k,preventScrolling:N,zoomOnPinch:z,zoomOnScroll:j,zoomOnDoubleClick:A,zoomActivationKeyPressed:W,lib:B,onTransformChange:X,connectionInProgress:G,paneClickDistance:Q,selectionOnDrag:H}){S&&!a.isZoomingOrPanning&&p();const K=b&&!W&&!S;c.clickDistance(H?1/0:!dt(Q)||Q<0?0:Q);const ee=K?zS({zoomPanValues:a,noWheelClassName:T,d3Selection:d,d3Zoom:c,panOnScrollMode:R,panOnScrollSpeed:k,zoomOnPinch:z,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):bS({noWheelClassName:T,preventScrolling:N,d3ZoomHandler:g});if(d.on("wheel.zoom",ee,{passive:!1}),!S){const q=RS({zoomPanValues:a,onDraggingChange:u,onPanZoomStart:s});c.on("start",q);const Z=OS({zoomPanValues:a,panOnDrag:P,onPaneContextMenu:!!F,onPanZoom:i,onTransformChange:X});c.on("zoom",Z);const ie=$S({zoomPanValues:a,panOnDrag:P,panOnScroll:b,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:u});c.on("end",ie)}const J=AS({zoomActivationKeyPressed:W,panOnDrag:P,zoomOnScroll:j,panOnScroll:b,zoomOnDoubleClick:A,zoomOnPinch:z,userSelectionActive:S,noPanClassName:$,noWheelClassName:T,lib:B,connectionInProgress:G});c.filter(J),A?d.on("dblclick.zoom",m):d.on("dblclick.zoom",null)}function p(){c.on("zoom",null)}async function y(T,$,F){const S=bl(T),b=c==null?void 0:c.constrain()(S,$,F);return b&&await w(b),new Promise(P=>P(b))}async function h(T,$){const F=bl(T);return await w(F,$),new Promise(S=>S(F))}function v(T){if(d){const $=bl(T),F=d.property("__zoom");(F.k!==T.zoom||F.x!==T.x||F.y!==T.y)&&(c==null||c.transform(d,$,null,{sync:!0}))}}function E(){const T=d?Yg(d.node()):{x:0,y:0,k:1};return{x:T.x,y:T.y,zoom:T.k}}function _(T,$){return d?new Promise(F=>{c==null||c.interpolate(($==null?void 0:$.interpolate)==="linear"?lo:$i).scaleTo(Rl(d,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>F(!0)),T)}):Promise.resolve(!1)}function C(T,$){return d?new Promise(F=>{c==null||c.interpolate(($==null?void 0:$.interpolate)==="linear"?lo:$i).scaleBy(Rl(d,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>F(!0)),T)}):Promise.resolve(!1)}function M(T){c==null||c.scaleExtent(T)}function L(T){c==null||c.translateExtent(T)}function D(T){const $=!dt(T)||T<0?0:T;c==null||c.clickDistance($)}return{update:x,destroy:p,setViewport:h,setViewportConstrained:y,getViewport:E,scaleTo:_,scaleBy:C,setScaleExtent:M,setTranslateExtent:L,syncViewport:v,setClickDistance:D}}var Cr;(function(e){e.Line="line",e.Handle="handle"})(Cr||(Cr={}));function jS({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:o,affectsY:i}){const s=e-t,l=n-r,u=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&o&&(u[0]=u[0]*-1),l&&i&&(u[1]=u[1]*-1),u}function cd(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:o}}function Yt(e,t){return Math.max(0,t-e)}function Xt(e,t){return Math.max(0,e-t)}function wi(e,t,n){return Math.max(0,t-e,e-n)}function fd(e,t){return e?!t:t}function FS(e,t,n,r,o,i,s,l){let{affectsX:u,affectsY:a}=t;const{isHorizontal:f,isVertical:c}=t,d=f&&c,{xSnapped:g,ySnapped:m}=n,{minWidth:w,maxWidth:x,minHeight:p,maxHeight:y}=r,{x:h,y:v,width:E,height:_,aspectRatio:C}=e;let M=Math.floor(f?g-e.pointerX:0),L=Math.floor(c?m-e.pointerY:0);const D=E+(u?-M:M),T=_+(a?-L:L),$=-i[0]*E,F=-i[1]*_;let S=wi(D,w,x),b=wi(T,p,y);if(s){let k=0,N=0;u&&M<0?k=Yt(h+M+$,s[0][0]):!u&&M>0&&(k=Xt(h+D+$,s[1][0])),a&&L<0?N=Yt(v+L+F,s[0][1]):!a&&L>0&&(N=Xt(v+T+F,s[1][1])),S=Math.max(S,k),b=Math.max(b,N)}if(l){let k=0,N=0;u&&M>0?k=Xt(h+M,l[0][0]):!u&&M<0&&(k=Yt(h+D,l[1][0])),a&&L>0?N=Xt(v+L,l[0][1]):!a&&L<0&&(N=Yt(v+T,l[1][1])),S=Math.max(S,k),b=Math.max(b,N)}if(o){if(f){const k=wi(D/C,p,y)*C;if(S=Math.max(S,k),s){let N=0;!u&&!a||u&&!a&&d?N=Xt(v+F+D/C,s[1][1])*C:N=Yt(v+F+(u?M:-M)/C,s[0][1])*C,S=Math.max(S,N)}if(l){let N=0;!u&&!a||u&&!a&&d?N=Yt(v+D/C,l[1][1])*C:N=Xt(v+(u?M:-M)/C,l[0][1])*C,S=Math.max(S,N)}}if(c){const k=wi(T*C,w,x)/C;if(b=Math.max(b,k),s){let N=0;!u&&!a||a&&!u&&d?N=Xt(h+T*C+$,s[1][0])/C:N=Yt(h+(a?L:-L)*C+$,s[0][0])/C,b=Math.max(b,N)}if(l){let N=0;!u&&!a||a&&!u&&d?N=Yt(h+T*C,l[1][0])/C:N=Xt(h+(a?L:-L)*C,l[0][0])/C,b=Math.max(b,N)}}}L=L+(L<0?b:-b),M=M+(M<0?S:-S),o&&(d?D>T*C?L=(fd(u,a)?-M:M)/C:M=(fd(u,a)?-L:L)*C:f?(L=M/C,a=u):(M=L*C,u=a));const P=u?h+M:h,R=a?v+L:v;return{width:E+(u?-M:M),height:_+(a?-L:L),x:i[0]*M*(u?-1:1)+P,y:i[1]*L*(a?-1:1)+R}}const Sm={width:0,height:0,x:0,y:0},VS={...Sm,pointerX:0,pointerY:0,aspectRatio:1};function HS(e){return[[0,0],[e.measured.width,e.measured.height]]}function BS(e,t,n){const r=t.position.x+e.position.x,o=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,l=n[0]*i,u=n[1]*s;return[[r-l,o-u],[r+i-l,o+s-u]]}function WS({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const i=Ye(e);let s={controlDirection:cd("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:a,boundaries:f,keepAspectRatio:c,resizeDirection:d,onResizeStart:g,onResize:m,onResizeEnd:w,shouldResize:x}){let p={...Sm},y={...VS};s={boundaries:f,resizeDirection:d,keepAspectRatio:c,controlDirection:cd(a)};let h,v=null,E=[],_,C,M,L=!1;const D=zg().on("start",T=>{const{nodeLookup:$,transform:F,snapGrid:S,snapToGrid:b,nodeOrigin:P,paneDomNode:R}=n();if(h=$.get(t),!h)return;v=(R==null?void 0:R.getBoundingClientRect())??null;const{xSnapped:k,ySnapped:N}=uo(T.sourceEvent,{transform:F,snapGrid:S,snapToGrid:b,containerBounds:v});p={width:h.measured.width??0,height:h.measured.height??0,x:h.position.x??0,y:h.position.y??0},y={...p,pointerX:k,pointerY:N,aspectRatio:p.width/p.height},_=void 0,h.parentId&&(h.extent==="parent"||h.expandParent)&&(_=$.get(h.parentId),C=_&&h.extent==="parent"?HS(_):void 0),E=[],M=void 0;for(const[z,j]of $)if(j.parentId===t&&(E.push({id:z,position:{...j.position},extent:j.extent}),j.extent==="parent"||j.expandParent)){const A=BS(j,h,j.origin??P);M?M=[[Math.min(A[0][0],M[0][0]),Math.min(A[0][1],M[0][1])],[Math.max(A[1][0],M[1][0]),Math.max(A[1][1],M[1][1])]]:M=A}g==null||g(T,{...p})}).on("drag",T=>{const{transform:$,snapGrid:F,snapToGrid:S,nodeOrigin:b}=n(),P=uo(T.sourceEvent,{transform:$,snapGrid:F,snapToGrid:S,containerBounds:v}),R=[];if(!h)return;const{x:k,y:N,width:z,height:j}=p,A={},W=h.origin??b,{width:B,height:X,x:G,y:Q}=FS(y,s.controlDirection,P,s.boundaries,s.keepAspectRatio,W,C,M),H=B!==z,K=X!==j,ee=G!==k&&H,J=Q!==N&&K;if(!ee&&!J&&!H&&!K)return;if((ee||J||W[0]===1||W[1]===1)&&(A.x=ee?G:p.x,A.y=J?Q:p.y,p.x=A.x,p.y=A.y,E.length>0)){const ue=G-k,oe=Q-N;for(const Te of E)Te.position={x:Te.position.x-ue+W[0]*(B-z),y:Te.position.y-oe+W[1]*(X-j)},R.push(Te)}if((H||K)&&(A.width=H&&(!s.resizeDirection||s.resizeDirection==="horizontal")?B:p.width,A.height=K&&(!s.resizeDirection||s.resizeDirection==="vertical")?X:p.height,p.width=A.width,p.height=A.height),_&&h.expandParent){const ue=W[0]*(A.width??0);A.x&&A.x<ue&&(p.x=ue,y.x=y.x-(A.x-ue));const oe=W[1]*(A.height??0);A.y&&A.y<oe&&(p.y=oe,y.y=y.y-(A.y-oe))}const q=jS({width:p.width,prevWidth:z,height:p.height,prevHeight:j,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),Z={...p,direction:q};(x==null?void 0:x(T,Z))!==!1&&(L=!0,m==null||m(T,Z),r(A,R))}).on("end",T=>{L&&(w==null||w(T,{...p}),o==null||o({...p}),L=!1)});i.call(D)}function u(){i.on(".drag",null)}return{update:l,destroy:u}}var km={exports:{}},Nm={},Cm={exports:{}},Mm={};/**
41
+ * @license React
42
+ * use-sync-external-store-shim.production.js
43
+ *
44
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE file in the root directory of this source tree.
48
+ */var Mr=O;function US(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var YS=typeof Object.is=="function"?Object.is:US,XS=Mr.useState,GS=Mr.useEffect,QS=Mr.useLayoutEffect,KS=Mr.useDebugValue;function ZS(e,t){var n=t(),r=XS({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return QS(function(){o.value=n,o.getSnapshot=t,Ol(o)&&i({inst:o})},[e,n,t]),GS(function(){return Ol(o)&&i({inst:o}),e(function(){Ol(o)&&i({inst:o})})},[e]),KS(n),n}function Ol(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!YS(e,n)}catch{return!0}}function qS(e,t){return t()}var JS=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?qS:ZS;Mm.useSyncExternalStore=Mr.useSyncExternalStore!==void 0?Mr.useSyncExternalStore:JS;Cm.exports=Mm;var ek=Cm.exports;/**
49
+ * @license React
50
+ * use-sync-external-store-shim/with-selector.production.js
51
+ *
52
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE file in the root directory of this source tree.
56
+ */var Ys=O,tk=ek;function nk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var rk=typeof Object.is=="function"?Object.is:nk,ok=tk.useSyncExternalStore,ik=Ys.useRef,sk=Ys.useEffect,lk=Ys.useMemo,uk=Ys.useDebugValue;Nm.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=ik(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=lk(function(){function u(g){if(!a){if(a=!0,f=g,g=r(g),o!==void 0&&s.hasValue){var m=s.value;if(o(m,g))return c=m}return c=g}if(m=c,rk(f,g))return m;var w=r(g);return o!==void 0&&o(m,w)?(f=g,m):(f=g,c=w)}var a=!1,f,c,d=n===void 0?null:n;return[function(){return u(t())},d===null?void 0:function(){return u(d())}]},[t,n,r,o]);var l=ok(e,i[0],i[1]);return sk(function(){s.hasValue=!0,s.value=l},[l]),uk(l),l};km.exports=Nm;var ak=km.exports;const ck=Ju(ak),fk={},dd=e=>{let t;const n=new Set,r=(f,c)=>{const d=typeof f=="function"?f(t):f;if(!Object.is(d,t)){const g=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,g))}},o=()=>t,u={setState:r,getState:o,getInitialState:()=>a,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(fk?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(r,o,u);return u},dk=e=>e?dd(e):dd,{useDebugValue:hk}=nv,{useSyncExternalStoreWithSelector:pk}=ck,gk=e=>e;function Im(e,t=gk,n){const r=pk(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return hk(r),r}const hd=(e,t)=>{const n=dk(e),r=(o,i=t)=>Im(n,o,i);return Object.assign(r,n),r},mk=(e,t)=>e?hd(e,t):hd;function de(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const Xs=O.createContext(null),yk=Xs.Provider,Pm=Ct.error001();function ne(e,t){const n=O.useContext(Xs);if(n===null)throw new Error(Pm);return Im(n,e,t)}function he(){const e=O.useContext(Xs);if(e===null)throw new Error(Pm);return O.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const pd={display:"none"},vk={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Tm="react-flow__node-desc",Lm="react-flow__edge-desc",wk="react-flow__aria-live",xk=e=>e.ariaLiveMessage,Ek=e=>e.ariaLabelConfig;function _k({rfId:e}){const t=ne(xk);return I.jsx("div",{id:`${wk}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:vk,children:t})}function Sk({rfId:e,disableKeyboardA11y:t}){const n=ne(Ek);return I.jsxs(I.Fragment,{children:[I.jsx("div",{id:`${Tm}-${e}`,style:pd,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),I.jsx("div",{id:`${Lm}-${e}`,style:pd,children:n["edge.a11yDescription.default"]}),!t&&I.jsx(_k,{rfId:e})]})}const Gs=O.forwardRef(({position:e="top-left",children:t,className:n,style:r,...o},i)=>{const s=`${e}`.split("-");return I.jsx("div",{className:_e(["react-flow__panel",n,...s]),style:r,ref:i,...o,children:t})});Gs.displayName="Panel";function kk({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:I.jsx(Gs,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:I.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Nk=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},xi=e=>e.id;function Ck(e,t){return de(e.selectedNodes.map(xi),t.selectedNodes.map(xi))&&de(e.selectedEdges.map(xi),t.selectedEdges.map(xi))}function Mk({onSelectionChange:e}){const t=he(),{selectedNodes:n,selectedEdges:r}=ne(Nk,Ck);return O.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,r,e]),null}const Ik=e=>!!e.onSelectionChangeHandlers;function Pk({onSelectionChange:e}){const t=ne(Ik);return e||t?I.jsx(Mk,{onSelectionChange:e}):null}const Qu=typeof window<"u"?O.useLayoutEffect:O.useEffect,zm=[0,0],Tk={x:0,y:0,zoom:1},Lk=["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"],gd=[...Lk,"rfId"],zk=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}),md={translateExtent:Lo,nodeOrigin:zm,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function bk(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:u}=ne(zk,de),a=he();Qu(()=>(u(e.defaultNodes,e.defaultEdges),()=>{f.current=md,l()}),[]);const f=O.useRef(md);return Qu(()=>{for(const c of gd){const d=e[c],g=f.current[c];d!==g&&(typeof e[c]>"u"||(c==="nodes"?t(d):c==="edges"?n(d):c==="minZoom"?r(d):c==="maxZoom"?o(d):c==="translateExtent"?i(d):c==="nodeExtent"?s(d):c==="ariaLabelConfig"?a.setState({ariaLabelConfig:rS(d)}):c==="fitView"?a.setState({fitViewQueued:d}):c==="fitViewOptions"?a.setState({fitViewOptions:d}):a.setState({[c]:d})))}f.current=e},gd.map(c=>e[c])),null}function yd(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Rk(e){var r;const[t,n]=O.useState(e==="system"?null:e);return O.useEffect(()=>{if(e!=="system"){n(e);return}const o=yd(),i=()=>n(o!=null&&o.matches?"dark":"light");return i(),o==null||o.addEventListener("change",i),()=>{o==null||o.removeEventListener("change",i)}},[e]),t!==null?t:(r=yd())!=null&&r.matches?"dark":"light"}const vd=typeof document<"u"?document:null;function $o(e=null,t={target:vd,actInsideInputWithModifier:!0}){const[n,r]=O.useState(!1),o=O.useRef(!1),i=O.useRef(new Set([])),[s,l]=O.useMemo(()=>{if(e!==null){const a=(Array.isArray(e)?e:[e]).filter(c=>typeof c=="string").map(c=>c.replace("+",`
57
+ `).replace(`
58
+
59
+ `,`
60
+ +`).split(`
61
+ `)),f=a.reduce((c,d)=>c.concat(...d),[]);return[a,f]}return[[],[]]},[e]);return O.useEffect(()=>{const u=(t==null?void 0:t.target)??vd,a=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const f=g=>{var x,p;if(o.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!o.current||o.current&&!a)&&sm(g))return!1;const w=xd(g.code,l);if(i.current.add(g[w]),wd(s,i.current,!1)){const y=((p=(x=g.composedPath)==null?void 0:x.call(g))==null?void 0:p[0])||g.target,h=(y==null?void 0:y.nodeName)==="BUTTON"||(y==null?void 0:y.nodeName)==="A";t.preventDefault!==!1&&(o.current||!h)&&g.preventDefault(),r(!0)}},c=g=>{const m=xd(g.code,l);wd(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(g[m]),g.key==="Meta"&&i.current.clear(),o.current=!1},d=()=>{i.current.clear(),r(!1)};return u==null||u.addEventListener("keydown",f),u==null||u.addEventListener("keyup",c),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{u==null||u.removeEventListener("keydown",f),u==null||u.removeEventListener("keyup",c),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function wd(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function xd(e,t){return t.includes(e)?"code":"key"}const Ok=()=>{const e=he();return O.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,o,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??o,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:o,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),u=rc(t,r,o,i,s,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(u,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:o,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:l,y:u}=s.getBoundingClientRect(),a={x:t.x-l,y:t.y-u},f=n.snapGrid??o,c=n.snapToGrid??i;return Xo(a,r,c,f)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),s=vs(t,n);return{x:s.x+o,y:s.y+i}}}),[])};function bm(e,t){const n=[],r=new Map,o=[];for(const i of e)if(i.type==="add"){o.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(const i of t){const s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...i};for(const u of s)$k(u,l);n.push(l)}return o.length&&o.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function $k(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Rm(e,t){return bm(e,t)}function Om(e,t){return bm(e,t)}function En(e,t){return{id:e,type:"select",selected:t}}function or(e,t=new Set,n=!1){const r=[];for(const[o,i]of e){const s=t.has(o);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),r.push(En(i.id,s)))}return r}function Ed({items:e=[],lookup:t}){var o;const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,s]of e.entries()){const l=t.get(s.id),u=((o=l==null?void 0:l.internals)==null?void 0:o.userNode)??l;u!==void 0&&u!==s&&n.push({id:s.id,item:s,type:"replace"}),u===void 0&&n.push({item:s,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function _d(e){return{id:e.id,type:"remove"}}const Sd=e=>X_(e),Ak=e=>qg(e);function $m(e){return O.forwardRef(e)}function kd(e){const[t,n]=O.useState(BigInt(0)),[r]=O.useState(()=>Dk(()=>n(o=>o+BigInt(1))));return Qu(()=>{const o=r.get();o.length&&(e(o),r.reset())},[t]),r}function Dk(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Am=O.createContext(null);function jk({children:e}){const t=he(),n=O.useCallback(l=>{const{nodes:u=[],setNodes:a,hasDefaultNodes:f,onNodesChange:c,nodeLookup:d,fitViewQueued:g,onNodesChangeMiddlewareMap:m}=t.getState();let w=u;for(const p of l)w=typeof p=="function"?p(w):p;let x=Ed({items:w,lookup:d});for(const p of m.values())x=p(x);f&&a(w),x.length>0?c==null||c(x):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:p,nodes:y,setNodes:h}=t.getState();p&&h(y)})},[]),r=kd(n),o=O.useCallback(l=>{const{edges:u=[],setEdges:a,hasDefaultEdges:f,onEdgesChange:c,edgeLookup:d}=t.getState();let g=u;for(const m of l)g=typeof m=="function"?m(g):m;f?a(g):c&&c(Ed({items:g,lookup:d}))},[]),i=kd(o),s=O.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return I.jsx(Am.Provider,{value:s,children:e})}function Fk(){const e=O.useContext(Am);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const Vk=e=>!!e.panZoom;function cc(){const e=Ok(),t=he(),n=Fk(),r=ne(Vk),o=O.useMemo(()=>{const i=c=>t.getState().nodeLookup.get(c),s=c=>{n.nodeQueue.push(c)},l=c=>{n.edgeQueue.push(c)},u=c=>{var p,y;const{nodeLookup:d,nodeOrigin:g}=t.getState(),m=Sd(c)?c:d.get(c.id),w=m.parentId?om(m.position,m.measured,m.parentId,d,g):m.position,x={...m,position:w,width:((p=m.measured)==null?void 0:p.width)??m.width,height:((y=m.measured)==null?void 0:y.height)??m.height};return kr(x)},a=(c,d,g={replace:!1})=>{s(m=>m.map(w=>{if(w.id===c){const x=typeof d=="function"?d(w):d;return g.replace&&Sd(x)?x:{...w,...x}}return w}))},f=(c,d,g={replace:!1})=>{l(m=>m.map(w=>{if(w.id===c){const x=typeof d=="function"?d(w):d;return g.replace&&Ak(x)?x:{...w,...x}}return w}))};return{getNodes:()=>t.getState().nodes.map(c=>({...c})),getNode:c=>{var d;return(d=i(c))==null?void 0:d.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:c=[]}=t.getState();return c.map(d=>({...d}))},getEdge:c=>t.getState().edgeLookup.get(c),setNodes:s,setEdges:l,addNodes:c=>{const d=Array.isArray(c)?c:[c];n.nodeQueue.push(g=>[...g,...d])},addEdges:c=>{const d=Array.isArray(c)?c:[c];n.edgeQueue.push(g=>[...g,...d])},toObject:()=>{const{nodes:c=[],edges:d=[],transform:g}=t.getState(),[m,w,x]=g;return{nodes:c.map(p=>({...p})),edges:d.map(p=>({...p})),viewport:{x:m,y:w,zoom:x}}},deleteElements:async({nodes:c=[],edges:d=[]})=>{const{nodes:g,edges:m,onNodesDelete:w,onEdgesDelete:x,triggerNodeChanges:p,triggerEdgeChanges:y,onDelete:h,onBeforeDelete:v}=t.getState(),{nodes:E,edges:_}=await q_({nodesToRemove:c,edgesToRemove:d,nodes:g,edges:m,onBeforeDelete:v}),C=_.length>0,M=E.length>0;if(C){const L=_.map(_d);x==null||x(_),y(L)}if(M){const L=E.map(_d);w==null||w(E),p(L)}return(M||C)&&(h==null||h({nodes:E,edges:_})),{deletedNodes:E,deletedEdges:_}},getIntersectingNodes:(c,d=!0,g)=>{const m=Jf(c),w=m?c:u(c),x=g!==void 0;return w?(g||t.getState().nodes).filter(p=>{const y=t.getState().nodeLookup.get(p.id);if(y&&!m&&(p.id===c.id||!y.internals.positionAbsolute))return!1;const h=kr(x?p:y),v=Ro(h,w);return d&&v>0||v>=h.width*h.height||v>=w.width*w.height}):[]},isNodeIntersecting:(c,d,g=!0)=>{const w=Jf(c)?c:u(c);if(!w)return!1;const x=Ro(w,d);return g&&x>0||x>=d.width*d.height||x>=w.width*w.height},updateNode:a,updateNodeData:(c,d,g={replace:!1})=>{a(c,m=>{const w=typeof d=="function"?d(m):d;return g.replace?{...m,data:w}:{...m,data:{...m.data,...w}}},g)},updateEdge:f,updateEdgeData:(c,d,g={replace:!1})=>{f(c,m=>{const w=typeof d=="function"?d(m):d;return g.replace?{...m,data:w}:{...m,data:{...m.data,...w}}},g)},getNodesBounds:c=>{const{nodeLookup:d,nodeOrigin:g}=t.getState();return G_(c,{nodeLookup:d,nodeOrigin:g})},getHandleConnections:({type:c,id:d,nodeId:g})=>{var m;return Array.from(((m=t.getState().connectionLookup.get(`${g}-${c}${d?`-${d}`:""}`))==null?void 0:m.values())??[])},getNodeConnections:({type:c,handleId:d,nodeId:g})=>{var m;return Array.from(((m=t.getState().connectionLookup.get(`${g}${c?d?`-${c}-${d}`:`-${c}`:""}`))==null?void 0:m.values())??[])},fitView:async c=>{const d=t.getState().fitViewResolver??nS();return t.setState({fitViewQueued:!0,fitViewOptions:c,fitViewResolver:d}),n.nodeQueue.push(g=>[...g]),d.promise}}},[]);return O.useMemo(()=>({...o,...e,viewportInitialized:r}),[r])}const Nd=e=>e.selected,Hk=typeof window<"u"?window:void 0;function Bk({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=he(),{deleteElements:r}=cc(),o=$o(e,{actInsideInputWithModifier:!1}),i=$o(t,{target:Hk});O.useEffect(()=>{if(o){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(Nd),edges:s.filter(Nd)}),n.setState({nodesSelectionActive:!1})}},[o]),O.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function Wk(e){const t=he();O.useEffect(()=>{const n=()=>{var o,i,s,l;if(!e.current||!(((i=(o=e.current).checkVisibility)==null?void 0:i.call(o))??!0))return!1;const r=oc(e.current);(r.height===0||r.width===0)&&((l=(s=t.getState()).onError)==null||l.call(s,"004",Ct.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const Qs={position:"absolute",width:"100%",height:"100%",top:0,left:0},Uk=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Yk({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:i=Pn.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:u,translateExtent:a,minZoom:f,maxZoom:c,zoomActivationKeyCode:d,preventScrolling:g=!0,children:m,noWheelClassName:w,noPanClassName:x,onViewportChange:p,isControlledViewport:y,paneClickDistance:h,selectionOnDrag:v}){const E=he(),_=O.useRef(null),{userSelectionActive:C,lib:M,connectionInProgress:L}=ne(Uk,de),D=$o(d),T=O.useRef();Wk(_);const $=O.useCallback(F=>{p==null||p({x:F[0],y:F[1],zoom:F[2]}),y||E.setState({transform:F})},[p,y]);return O.useEffect(()=>{if(_.current){T.current=DS({domNode:_.current,minZoom:f,maxZoom:c,translateExtent:a,viewport:u,onDraggingChange:P=>E.setState(R=>R.paneDragging===P?R:{paneDragging:P}),onPanZoomStart:(P,R)=>{const{onViewportChangeStart:k,onMoveStart:N}=E.getState();N==null||N(P,R),k==null||k(R)},onPanZoom:(P,R)=>{const{onViewportChange:k,onMove:N}=E.getState();N==null||N(P,R),k==null||k(R)},onPanZoomEnd:(P,R)=>{const{onViewportChangeEnd:k,onMoveEnd:N}=E.getState();N==null||N(P,R),k==null||k(R)}});const{x:F,y:S,zoom:b}=T.current.getViewport();return E.setState({panZoom:T.current,transform:[F,S,b],domNode:_.current.closest(".react-flow")}),()=>{var P;(P=T.current)==null||P.destroy()}}},[]),O.useEffect(()=>{var F;(F=T.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:D,preventScrolling:g,noPanClassName:x,userSelectionActive:C,noWheelClassName:w,lib:M,onTransformChange:$,connectionInProgress:L,selectionOnDrag:v,paneClickDistance:h})},[e,t,n,r,o,i,s,l,D,g,x,C,w,M,$,L,v,h]),I.jsx("div",{className:"react-flow__renderer",ref:_,style:Qs,children:m})}const Xk=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Gk(){const{userSelectionActive:e,userSelectionRect:t}=ne(Xk,de);return e&&t?I.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const $l=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},Qk=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Kk({isSelecting:e,selectionKeyPressed:t,selectionMode:n=zo.Full,panOnDrag:r,paneClickDistance:o,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:l,onPaneClick:u,onPaneContextMenu:a,onPaneScroll:f,onPaneMouseEnter:c,onPaneMouseMove:d,onPaneMouseLeave:g,children:m}){const w=he(),{userSelectionActive:x,elementsSelectable:p,dragging:y,connectionInProgress:h}=ne(Qk,de),v=p&&(e||x),E=O.useRef(null),_=O.useRef(),C=O.useRef(new Set),M=O.useRef(new Set),L=O.useRef(!1),D=k=>{if(L.current||h){L.current=!1;return}u==null||u(k),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},T=k=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){k.preventDefault();return}a==null||a(k)},$=f?k=>f(k):void 0,F=k=>{L.current&&(k.stopPropagation(),L.current=!1)},S=k=>{var X,G;const{domNode:N}=w.getState();if(_.current=N==null?void 0:N.getBoundingClientRect(),!_.current)return;const z=k.target===E.current;if(!z&&!!k.target.closest(".nokey")||!e||!(i&&z||t)||k.button!==0||!k.isPrimary)return;(G=(X=k.target)==null?void 0:X.setPointerCapture)==null||G.call(X,k.pointerId),L.current=!1;const{x:W,y:B}=ht(k.nativeEvent,_.current);w.setState({userSelectionRect:{width:0,height:0,startX:W,startY:B,x:W,y:B}}),z||(k.stopPropagation(),k.preventDefault())},b=k=>{const{userSelectionRect:N,transform:z,nodeLookup:j,edgeLookup:A,connectionLookup:W,triggerNodeChanges:B,triggerEdgeChanges:X,defaultEdgeOptions:G,resetSelectedElements:Q}=w.getState();if(!_.current||!N)return;const{x:H,y:K}=ht(k.nativeEvent,_.current),{startX:ee,startY:J}=N;if(!L.current){const oe=t?0:o;if(Math.hypot(H-ee,K-J)<=oe)return;Q(),s==null||s(k)}L.current=!0;const q={startX:ee,startY:J,x:H<ee?H:ee,y:K<J?K:J,width:Math.abs(H-ee),height:Math.abs(K-J)},Z=C.current,ie=M.current;C.current=new Set(nc(j,q,z,n===zo.Partial,!0).map(oe=>oe.id)),M.current=new Set;const ue=(G==null?void 0:G.selectable)??!0;for(const oe of C.current){const Te=W.get(oe);if(Te)for(const{edgeId:Wt}of Te.values()){const It=A.get(Wt);It&&(It.selectable??ue)&&M.current.add(Wt)}}if(!ed(Z,C.current)){const oe=or(j,C.current,!0);B(oe)}if(!ed(ie,M.current)){const oe=or(A,M.current);X(oe)}w.setState({userSelectionRect:q,userSelectionActive:!0,nodesSelectionActive:!1})},P=k=>{var N,z;k.button===0&&((z=(N=k.target)==null?void 0:N.releasePointerCapture)==null||z.call(N,k.pointerId),!x&&k.target===E.current&&w.getState().userSelectionRect&&(D==null||D(k)),w.setState({userSelectionActive:!1,userSelectionRect:null}),L.current&&(l==null||l(k),w.setState({nodesSelectionActive:C.current.size>0})))},R=r===!0||Array.isArray(r)&&r.includes(0);return I.jsxs("div",{className:_e(["react-flow__pane",{draggable:R,dragging:y,selection:e}]),onClick:v?void 0:$l(D,E),onContextMenu:$l(T,E),onWheel:$l($,E),onPointerEnter:v?void 0:c,onPointerMove:v?b:d,onPointerUp:v?P:void 0,onPointerDownCapture:v?S:void 0,onClickCapture:v?F:void 0,onPointerLeave:g,ref:E,style:Qs,children:[m,I.jsx(Gk,{})]})}function Ku({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:l,onError:u}=t.getState(),a=l.get(e);if(!a){u==null||u("012",Ct.error012(e));return}t.setState({nodesSelectionActive:!1}),a.selected?(n||a.selected&&s)&&(i({nodes:[a],edges:[]}),requestAnimationFrame(()=>{var f;return(f=r==null?void 0:r.current)==null?void 0:f.blur()})):o([e])}function Dm({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,nodeClickDistance:s}){const l=he(),[u,a]=O.useState(!1),f=O.useRef();return O.useEffect(()=>{f.current=kS({getStoreItems:()=>l.getState(),onNodeMouseDown:c=>{Ku({id:c,store:l,nodeRef:e})},onDragStart:()=>{a(!0)},onDragStop:()=>{a(!1)}})},[]),O.useEffect(()=>{if(!(t||!e.current||!f.current))return f.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:s}),()=>{var c;(c=f.current)==null||c.destroy()}},[n,r,t,i,e,o,s]),u}const Zk=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function jm(){const e=he();return O.useCallback(n=>{const{nodeExtent:r,snapToGrid:o,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:u,nodeLookup:a,nodeOrigin:f}=e.getState(),c=new Map,d=Zk(s),g=o?i[0]:5,m=o?i[1]:5,w=n.direction.x*g*n.factor,x=n.direction.y*m*n.factor;for(const[,p]of a){if(!d(p))continue;let y={x:p.internals.positionAbsolute.x+w,y:p.internals.positionAbsolute.y+x};o&&(y=Yo(y,i));const{position:h,positionAbsolute:v}=Jg({nodeId:p.id,nextPosition:y,nodeLookup:a,nodeExtent:r,nodeOrigin:f,onError:l});p.position=h,p.internals.positionAbsolute=v,c.set(p.id,p)}u(c)},[])}const fc=O.createContext(null),qk=fc.Provider;fc.Consumer;const Fm=()=>O.useContext(fc),Jk=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),e2=(e,t,n)=>r=>{const{connectionClickStartHandle:o,connectionMode:i,connection:s}=r,{fromHandle:l,toHandle:u,isValid:a}=s,f=(u==null?void 0:u.nodeId)===e&&(u==null?void 0:u.id)===t&&(u==null?void 0:u.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:f,clickConnecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===n,isPossibleEndHandle:i===_r.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!o,valid:f&&a}};function t2({type:e="source",position:t=Y.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:u,className:a,onMouseDown:f,onTouchStart:c,...d},g){var b,P;const m=s||null,w=e==="target",x=he(),p=Fm(),{connectOnClick:y,noPanClassName:h,rfId:v}=ne(Jk,de),{connectingFrom:E,connectingTo:_,clickConnecting:C,isPossibleEndHandle:M,connectionInProcess:L,clickConnectionInProcess:D,valid:T}=ne(e2(p,m,e),de);p||(P=(b=x.getState()).onError)==null||P.call(b,"010",Ct.error010());const $=R=>{const{defaultEdgeOptions:k,onConnect:N,hasDefaultEdges:z}=x.getState(),j={...k,...R};if(z){const{edges:A,setEdges:W}=x.getState();W(fm(j,A))}N==null||N(j),l==null||l(j)},F=R=>{if(!p)return;const k=lm(R.nativeEvent);if(o&&(k&&R.button===0||!k)){const N=x.getState();Gu.onPointerDown(R.nativeEvent,{handleDomNode:R.currentTarget,autoPanOnConnect:N.autoPanOnConnect,connectionMode:N.connectionMode,connectionRadius:N.connectionRadius,domNode:N.domNode,nodeLookup:N.nodeLookup,lib:N.lib,isTarget:w,handleId:m,nodeId:p,flowId:N.rfId,panBy:N.panBy,cancelConnection:N.cancelConnection,onConnectStart:N.onConnectStart,onConnectEnd:(...z)=>{var j,A;return(A=(j=x.getState()).onConnectEnd)==null?void 0:A.call(j,...z)},updateConnection:N.updateConnection,onConnect:$,isValidConnection:n||((...z)=>{var j,A;return((A=(j=x.getState()).isValidConnection)==null?void 0:A.call(j,...z))??!0}),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:N.autoPanSpeed,dragThreshold:N.connectionDragThreshold})}k?f==null||f(R):c==null||c(R)},S=R=>{const{onClickConnectStart:k,onClickConnectEnd:N,connectionClickStartHandle:z,connectionMode:j,isValidConnection:A,lib:W,rfId:B,nodeLookup:X,connection:G}=x.getState();if(!p||!z&&!o)return;if(!z){k==null||k(R.nativeEvent,{nodeId:p,handleId:m,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:p,type:e,id:m}});return}const Q=im(R.target),H=n||A,{connection:K,isValid:ee}=Gu.isValid(R.nativeEvent,{handle:{nodeId:p,id:m,type:e},connectionMode:j,fromNodeId:z.nodeId,fromHandleId:z.id||null,fromType:z.type,isValidConnection:H,flowId:B,doc:Q,lib:W,nodeLookup:X});ee&&K&&$(K);const J=structuredClone(G);delete J.inProgress,J.toPosition=J.toHandle?J.toHandle.position:null,N==null||N(R,J),x.setState({connectionClickStartHandle:null})};return I.jsx("div",{"data-handleid":m,"data-nodeid":p,"data-handlepos":t,"data-id":`${v}-${p}-${m}-${e}`,className:_e(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",h,a,{source:!w,target:w,connectable:r,connectablestart:o,connectableend:i,clickconnecting:C,connectingfrom:E,connectingto:_,valid:T,connectionindicator:r&&(!L||M)&&(L||D?i:o)}]),onMouseDown:F,onTouchStart:F,onClick:y?S:void 0,ref:g,...d,children:u})}const hn=O.memo($m(t2));function n2({data:e,isConnectable:t,sourcePosition:n=Y.Bottom}){return I.jsxs(I.Fragment,{children:[e==null?void 0:e.label,I.jsx(hn,{type:"source",position:n,isConnectable:t})]})}function r2({data:e,isConnectable:t,targetPosition:n=Y.Top,sourcePosition:r=Y.Bottom}){return I.jsxs(I.Fragment,{children:[I.jsx(hn,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,I.jsx(hn,{type:"source",position:r,isConnectable:t})]})}function o2(){return null}function i2({data:e,isConnectable:t,targetPosition:n=Y.Top}){return I.jsxs(I.Fragment,{children:[I.jsx(hn,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const ws={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Cd={input:n2,default:r2,output:i2,group:o2};function s2(e){var t,n,r,o;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((o=e.style)==null?void 0:o.height)}}const l2=e=>{const{width:t,height:n,x:r,y:o}=Uo(e.nodeLookup,{filter:i=>!!i.selected});return{width:dt(t)?t:null,height:dt(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${o}px)`}};function u2({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=he(),{width:o,height:i,transformString:s,userSelectionActive:l}=ne(l2,de),u=jm(),a=O.useRef(null);O.useEffect(()=>{var g;n||(g=a.current)==null||g.focus({preventScroll:!0})},[n]);const f=!l&&o!==null&&i!==null;if(Dm({nodeRef:a,disabled:!f}),!f)return null;const c=e?g=>{const m=r.getState().nodes.filter(w=>w.selected);e(g,m)}:void 0,d=g=>{Object.prototype.hasOwnProperty.call(ws,g.key)&&(g.preventDefault(),u({direction:ws[g.key],factor:g.shiftKey?4:1}))};return I.jsx("div",{className:_e(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:I.jsx("div",{ref:a,className:"react-flow__nodesselection-rect",onContextMenu:c,tabIndex:n?void 0:-1,onKeyDown:n?void 0:d,style:{width:o,height:i}})})}const Md=typeof window<"u"?window:void 0,a2=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Vm({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:u,selectionKeyCode:a,selectionOnDrag:f,selectionMode:c,onSelectionStart:d,onSelectionEnd:g,multiSelectionKeyCode:m,panActivationKeyCode:w,zoomActivationKeyCode:x,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:h,panOnScroll:v,panOnScrollSpeed:E,panOnScrollMode:_,zoomOnDoubleClick:C,panOnDrag:M,defaultViewport:L,translateExtent:D,minZoom:T,maxZoom:$,preventScrolling:F,onSelectionContextMenu:S,noWheelClassName:b,noPanClassName:P,disableKeyboardA11y:R,onViewportChange:k,isControlledViewport:N}){const{nodesSelectionActive:z,userSelectionActive:j}=ne(a2,de),A=$o(a,{target:Md}),W=$o(w,{target:Md}),B=W||M,X=W||v,G=f&&B!==!0,Q=A||j||G;return Bk({deleteKeyCode:u,multiSelectionKeyCode:m}),I.jsx(Yk,{onPaneContextMenu:i,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:h,panOnScroll:X,panOnScrollSpeed:E,panOnScrollMode:_,zoomOnDoubleClick:C,panOnDrag:!A&&B,defaultViewport:L,translateExtent:D,minZoom:T,maxZoom:$,zoomActivationKeyCode:x,preventScrolling:F,noWheelClassName:b,noPanClassName:P,onViewportChange:k,isControlledViewport:N,paneClickDistance:l,selectionOnDrag:G,children:I.jsxs(Kk,{onSelectionStart:d,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:B,isSelecting:!!Q,selectionMode:c,selectionKeyPressed:A,paneClickDistance:l,selectionOnDrag:G,children:[e,z&&I.jsx(u2,{onSelectionContextMenu:S,noPanClassName:P,disableKeyboardA11y:R})]})})}Vm.displayName="FlowRenderer";const c2=O.memo(Vm),f2=e=>t=>e?nc(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function d2(e){return ne(O.useCallback(f2(e),[e]),de)}const h2=e=>e.updateNodeInternals;function p2(){const e=ne(h2),[t]=O.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(o=>{const i=o.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:o.target,force:!0})}),e(r)}));return O.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function g2({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=he(),i=O.useRef(null),s=O.useRef(null),l=O.useRef(e.sourcePosition),u=O.useRef(e.targetPosition),a=O.useRef(t),f=n&&!!e.internals.handleBounds;return O.useEffect(()=>{i.current&&!e.hidden&&(!f||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[f,e.hidden]),O.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),O.useEffect(()=>{if(i.current){const c=a.current!==t,d=l.current!==e.sourcePosition,g=u.current!==e.targetPosition;(c||d||g)&&(a.current=t,l.current=e.sourcePosition,u.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function m2({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:u,nodesConnectable:a,nodesFocusable:f,resizeObserver:c,noDragClassName:d,noPanClassName:g,disableKeyboardA11y:m,rfId:w,nodeTypes:x,nodeClickDistance:p,onError:y}){const{node:h,internals:v,isParent:E}=ne(H=>{const K=H.nodeLookup.get(e),ee=H.parentLookup.has(e);return{node:K,internals:K.internals,isParent:ee}},de);let _=h.type||"default",C=(x==null?void 0:x[_])||Cd[_];C===void 0&&(y==null||y("003",Ct.error003(_)),_="default",C=(x==null?void 0:x.default)||Cd.default);const M=!!(h.draggable||l&&typeof h.draggable>"u"),L=!!(h.selectable||u&&typeof h.selectable>"u"),D=!!(h.connectable||a&&typeof h.connectable>"u"),T=!!(h.focusable||f&&typeof h.focusable>"u"),$=he(),F=rm(h),S=g2({node:h,nodeType:_,hasDimensions:F,resizeObserver:c}),b=Dm({nodeRef:S,disabled:h.hidden||!M,noDragClassName:d,handleSelector:h.dragHandle,nodeId:e,isSelectable:L,nodeClickDistance:p}),P=jm();if(h.hidden)return null;const R=Bt(h),k=s2(h),N=L||M||t||n||r||o,z=n?H=>n(H,{...v.userNode}):void 0,j=r?H=>r(H,{...v.userNode}):void 0,A=o?H=>o(H,{...v.userNode}):void 0,W=i?H=>i(H,{...v.userNode}):void 0,B=s?H=>s(H,{...v.userNode}):void 0,X=H=>{const{selectNodesOnDrag:K,nodeDragThreshold:ee}=$.getState();L&&(!K||!M||ee>0)&&Ku({id:e,store:$,nodeRef:S}),t&&t(H,{...v.userNode})},G=H=>{if(!(sm(H.nativeEvent)||m)){if(Gg.includes(H.key)&&L){const K=H.key==="Escape";Ku({id:e,store:$,unselect:K,nodeRef:S})}else if(M&&h.selected&&Object.prototype.hasOwnProperty.call(ws,H.key)){H.preventDefault();const{ariaLabelConfig:K}=$.getState();$.setState({ariaLiveMessage:K["node.a11yDescription.ariaLiveMessage"]({direction:H.key.replace("Arrow","").toLowerCase(),x:~~v.positionAbsolute.x,y:~~v.positionAbsolute.y})}),P({direction:ws[H.key],factor:H.shiftKey?4:1})}}},Q=()=>{var ie;if(m||!((ie=S.current)!=null&&ie.matches(":focus-visible")))return;const{transform:H,width:K,height:ee,autoPanOnNodeFocus:J,setCenter:q}=$.getState();if(!J)return;nc(new Map([[e,h]]),{x:0,y:0,width:K,height:ee},H,!0).length>0||q(h.position.x+R.width/2,h.position.y+R.height/2,{zoom:H[2]})};return I.jsx("div",{className:_e(["react-flow__node",`react-flow__node-${_}`,{[g]:M},h.className,{selected:h.selected,selectable:L,parent:E,draggable:M,dragging:b}]),ref:S,style:{zIndex:v.z,transform:`translate(${v.positionAbsolute.x}px,${v.positionAbsolute.y}px)`,pointerEvents:N?"all":"none",visibility:F?"visible":"hidden",...h.style,...k},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:z,onMouseMove:j,onMouseLeave:A,onContextMenu:W,onClick:X,onDoubleClick:B,onKeyDown:T?G:void 0,tabIndex:T?0:void 0,onFocus:T?Q:void 0,role:h.ariaRole??(T?"group":void 0),"aria-roledescription":"node","aria-describedby":m?void 0:`${Tm}-${w}`,"aria-label":h.ariaLabel,...h.domAttributes,children:I.jsx(qk,{value:e,children:I.jsx(C,{id:e,data:h.data,type:_,positionAbsoluteX:v.positionAbsolute.x,positionAbsoluteY:v.positionAbsolute.y,selected:h.selected??!1,selectable:L,draggable:M,deletable:h.deletable??!0,isConnectable:D,sourcePosition:h.sourcePosition,targetPosition:h.targetPosition,dragging:b,dragHandle:h.dragHandle,zIndex:v.z,parentId:h.parentId,...R})})})}var y2=O.memo(m2);const v2=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Hm(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,onError:i}=ne(v2,de),s=d2(e.onlyRenderVisibleElements),l=p2();return I.jsx("div",{className:"react-flow__nodes",style:Qs,children:s.map(u=>I.jsx(y2,{id:u,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:i},u))})}Hm.displayName="NodeRenderer";const w2=O.memo(Hm);function x2(e){return ne(O.useCallback(n=>{if(!e)return n.edges.map(o=>o.id);const r=[];if(n.width&&n.height)for(const o of n.edges){const i=n.nodeLookup.get(o.source),s=n.nodeLookup.get(o.target);i&&s&&sS({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),de)}const E2=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return I.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},_2=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return I.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Id={[bo.Arrow]:E2,[bo.ArrowClosed]:_2};function S2(e){const t=he();return O.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(Id,e)?Id[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",Ct.error009(e)),null)},[e])}const k2=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{const u=S2(t);return u?I.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:I.jsx(u,{color:n,strokeWidth:s})}):null},Bm=({defaultColor:e,rfId:t})=>{const n=ne(i=>i.edges),r=ne(i=>i.defaultEdgeOptions),o=O.useMemo(()=>hS(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return o.length?I.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:I.jsx("defs",{children:o.map(i=>I.jsx(k2,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};Bm.displayName="MarkerDefinitions";var N2=O.memo(Bm);function Wm({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:u,className:a,...f}){const[c,d]=O.useState({x:1,y:0,width:0,height:0}),g=_e(["react-flow__edge-textwrapper",a]),m=O.useRef(null);return O.useEffect(()=>{if(m.current){const w=m.current.getBBox();d({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?I.jsxs("g",{transform:`translate(${e-c.width/2} ${t-c.height/2})`,className:g,visibility:c.width?"visible":"hidden",...f,children:[o&&I.jsx("rect",{width:c.width+2*s[0],x:-s[0],y:-s[1],height:c.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),I.jsx("text",{className:"react-flow__edge-text",y:c.height/2,dy:"0.3em",ref:m,style:r,children:n}),u]}):null}Wm.displayName="EdgeText";const C2=O.memo(Wm);function Ks({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,interactionWidth:a=20,...f}){return I.jsxs(I.Fragment,{children:[I.jsx("path",{...f,d:e,fill:"none",className:_e(["react-flow__edge-path",f.className])}),a?I.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:a,className:"react-flow__edge-interaction"}):null,r&&dt(t)&&dt(n)?I.jsx(C2,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u}):null]})}function Pd({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===Y.Left||e===Y.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function Um({sourceX:e,sourceY:t,sourcePosition:n=Y.Bottom,targetX:r,targetY:o,targetPosition:i=Y.Top}){const[s,l]=Pd({pos:n,x1:e,y1:t,x2:r,y2:o}),[u,a]=Pd({pos:i,x1:r,y1:o,x2:e,y2:t}),[f,c,d,g]=um({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:a});return[`M${e},${t} C${s},${l} ${u},${a} ${r},${o}`,f,c,d,g]}function Ym(e){return O.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:l,label:u,labelStyle:a,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:g,style:m,markerEnd:w,markerStart:x,interactionWidth:p})=>{const[y,h,v]=Um({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l}),E=e.isInternal?void 0:t;return I.jsx(Ks,{id:E,path:y,labelX:h,labelY:v,label:u,labelStyle:a,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:g,style:m,markerEnd:w,markerStart:x,interactionWidth:p})})}const M2=Ym({isInternal:!1}),Xm=Ym({isInternal:!0});M2.displayName="SimpleBezierEdge";Xm.displayName="SimpleBezierEdgeInternal";function Gm(e){return O.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:u,labelBgStyle:a,labelBgPadding:f,labelBgBorderRadius:c,style:d,sourcePosition:g=Y.Bottom,targetPosition:m=Y.Top,markerEnd:w,markerStart:x,pathOptions:p,interactionWidth:y})=>{const[h,v,E]=Uu({sourceX:n,sourceY:r,sourcePosition:g,targetX:o,targetY:i,targetPosition:m,borderRadius:p==null?void 0:p.borderRadius,offset:p==null?void 0:p.offset,stepPosition:p==null?void 0:p.stepPosition}),_=e.isInternal?void 0:t;return I.jsx(Ks,{id:_,path:h,labelX:v,labelY:E,label:s,labelStyle:l,labelShowBg:u,labelBgStyle:a,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:w,markerStart:x,interactionWidth:y})})}const Qm=Gm({isInternal:!1}),Km=Gm({isInternal:!0});Qm.displayName="SmoothStepEdge";Km.displayName="SmoothStepEdgeInternal";function Zm(e){return O.memo(({id:t,...n})=>{var o;const r=e.isInternal?void 0:t;return I.jsx(Qm,{...n,id:r,pathOptions:O.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const I2=Zm({isInternal:!1}),qm=Zm({isInternal:!0});I2.displayName="StepEdge";qm.displayName="StepEdgeInternal";function Jm(e){return O.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:u,labelBgStyle:a,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:g,markerStart:m,interactionWidth:w})=>{const[x,p,y]=dm({sourceX:n,sourceY:r,targetX:o,targetY:i}),h=e.isInternal?void 0:t;return I.jsx(Ks,{id:h,path:x,labelX:p,labelY:y,label:s,labelStyle:l,labelShowBg:u,labelBgStyle:a,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:g,markerStart:m,interactionWidth:w})})}const P2=Jm({isInternal:!1}),e0=Jm({isInternal:!0});P2.displayName="StraightEdge";e0.displayName="StraightEdgeInternal";function t0(e){return O.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s=Y.Bottom,targetPosition:l=Y.Top,label:u,labelStyle:a,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:g,style:m,markerEnd:w,markerStart:x,pathOptions:p,interactionWidth:y})=>{const[h,v,E]=am({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l,curvature:p==null?void 0:p.curvature}),_=e.isInternal?void 0:t;return I.jsx(Ks,{id:_,path:h,labelX:v,labelY:E,label:u,labelStyle:a,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:g,style:m,markerEnd:w,markerStart:x,interactionWidth:y})})}const T2=t0({isInternal:!1}),n0=t0({isInternal:!0});T2.displayName="BezierEdge";n0.displayName="BezierEdgeInternal";const Td={default:n0,straight:e0,step:qm,smoothstep:Km,simplebezier:Xm},Ld={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},L2=(e,t,n)=>n===Y.Left?e-t:n===Y.Right?e+t:e,z2=(e,t,n)=>n===Y.Top?e-t:n===Y.Bottom?e+t:e,zd="react-flow__edgeupdater";function bd({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:s,type:l}){return I.jsx("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:s,className:_e([zd,`${zd}-${l}`]),cx:L2(t,r,e),cy:z2(n,r,e),r,stroke:"transparent",fill:"transparent"})}function b2({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:l,targetPosition:u,onReconnect:a,onReconnectStart:f,onReconnectEnd:c,setReconnecting:d,setUpdateHover:g}){const m=he(),w=(v,E)=>{if(v.button!==0)return;const{autoPanOnConnect:_,domNode:C,connectionMode:M,connectionRadius:L,lib:D,onConnectStart:T,cancelConnection:$,nodeLookup:F,rfId:S,panBy:b,updateConnection:P}=m.getState(),R=E.type==="target",k=(j,A)=>{d(!1),c==null||c(j,n,E.type,A)},N=j=>a==null?void 0:a(n,j),z=(j,A)=>{d(!0),f==null||f(v,n,E.type),T==null||T(j,A)};Gu.onPointerDown(v.nativeEvent,{autoPanOnConnect:_,connectionMode:M,connectionRadius:L,domNode:C,handleId:E.id,nodeId:E.nodeId,nodeLookup:F,isTarget:R,edgeUpdaterType:E.type,lib:D,flowId:S,cancelConnection:$,panBy:b,isValidConnection:(...j)=>{var A,W;return((W=(A=m.getState()).isValidConnection)==null?void 0:W.call(A,...j))??!0},onConnect:N,onConnectStart:z,onConnectEnd:(...j)=>{var A,W;return(W=(A=m.getState()).onConnectEnd)==null?void 0:W.call(A,...j)},onReconnectEnd:k,updateConnection:P,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:v.currentTarget})},x=v=>w(v,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),p=v=>w(v,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),y=()=>g(!0),h=()=>g(!1);return I.jsxs(I.Fragment,{children:[(e===!0||e==="source")&&I.jsx(bd,{position:l,centerX:r,centerY:o,radius:t,onMouseDown:x,onMouseEnter:y,onMouseOut:h,type:"source"}),(e===!0||e==="target")&&I.jsx(bd,{position:u,centerX:i,centerY:s,radius:t,onMouseDown:p,onMouseEnter:y,onMouseOut:h,type:"target"})]})}function R2({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:u,onMouseLeave:a,reconnectRadius:f,onReconnect:c,onReconnectStart:d,onReconnectEnd:g,rfId:m,edgeTypes:w,noPanClassName:x,onError:p,disableKeyboardA11y:y}){let h=ne(q=>q.edgeLookup.get(e));const v=ne(q=>q.defaultEdgeOptions);h=v?{...v,...h}:h;let E=h.type||"default",_=(w==null?void 0:w[E])||Td[E];_===void 0&&(p==null||p("011",Ct.error011(E)),E="default",_=(w==null?void 0:w.default)||Td.default);const C=!!(h.focusable||t&&typeof h.focusable>"u"),M=typeof c<"u"&&(h.reconnectable||n&&typeof h.reconnectable>"u"),L=!!(h.selectable||r&&typeof h.selectable>"u"),D=O.useRef(null),[T,$]=O.useState(!1),[F,S]=O.useState(!1),b=he(),{zIndex:P,sourceX:R,sourceY:k,targetX:N,targetY:z,sourcePosition:j,targetPosition:A}=ne(O.useCallback(q=>{const Z=q.nodeLookup.get(h.source),ie=q.nodeLookup.get(h.target);if(!Z||!ie)return{zIndex:h.zIndex,...Ld};const ue=dS({id:e,sourceNode:Z,targetNode:ie,sourceHandle:h.sourceHandle||null,targetHandle:h.targetHandle||null,connectionMode:q.connectionMode,onError:p});return{zIndex:iS({selected:h.selected,zIndex:h.zIndex,sourceNode:Z,targetNode:ie,elevateOnSelect:q.elevateEdgesOnSelect,zIndexMode:q.zIndexMode}),...ue||Ld}},[h.source,h.target,h.sourceHandle,h.targetHandle,h.selected,h.zIndex]),de),W=O.useMemo(()=>h.markerStart?`url('#${Yu(h.markerStart,m)}')`:void 0,[h.markerStart,m]),B=O.useMemo(()=>h.markerEnd?`url('#${Yu(h.markerEnd,m)}')`:void 0,[h.markerEnd,m]);if(h.hidden||R===null||k===null||N===null||z===null)return null;const X=q=>{var oe;const{addSelectedEdges:Z,unselectNodesAndEdges:ie,multiSelectionActive:ue}=b.getState();L&&(b.setState({nodesSelectionActive:!1}),h.selected&&ue?(ie({nodes:[],edges:[h]}),(oe=D.current)==null||oe.blur()):Z([e])),o&&o(q,h)},G=i?q=>{i(q,{...h})}:void 0,Q=s?q=>{s(q,{...h})}:void 0,H=l?q=>{l(q,{...h})}:void 0,K=u?q=>{u(q,{...h})}:void 0,ee=a?q=>{a(q,{...h})}:void 0,J=q=>{var Z;if(!y&&Gg.includes(q.key)&&L){const{unselectNodesAndEdges:ie,addSelectedEdges:ue}=b.getState();q.key==="Escape"?((Z=D.current)==null||Z.blur(),ie({edges:[h]})):ue([e])}};return I.jsx("svg",{style:{zIndex:P},children:I.jsxs("g",{className:_e(["react-flow__edge",`react-flow__edge-${E}`,h.className,x,{selected:h.selected,animated:h.animated,inactive:!L&&!o,updating:T,selectable:L}]),onClick:X,onDoubleClick:G,onContextMenu:Q,onMouseEnter:H,onMouseMove:K,onMouseLeave:ee,onKeyDown:C?J:void 0,tabIndex:C?0:void 0,role:h.ariaRole??(C?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":h.ariaLabel===null?void 0:h.ariaLabel||`Edge from ${h.source} to ${h.target}`,"aria-describedby":C?`${Lm}-${m}`:void 0,ref:D,...h.domAttributes,children:[!F&&I.jsx(_,{id:e,source:h.source,target:h.target,type:h.type,selected:h.selected,animated:h.animated,selectable:L,deletable:h.deletable??!0,label:h.label,labelStyle:h.labelStyle,labelShowBg:h.labelShowBg,labelBgStyle:h.labelBgStyle,labelBgPadding:h.labelBgPadding,labelBgBorderRadius:h.labelBgBorderRadius,sourceX:R,sourceY:k,targetX:N,targetY:z,sourcePosition:j,targetPosition:A,data:h.data,style:h.style,sourceHandleId:h.sourceHandle,targetHandleId:h.targetHandle,markerStart:W,markerEnd:B,pathOptions:"pathOptions"in h?h.pathOptions:void 0,interactionWidth:h.interactionWidth}),M&&I.jsx(b2,{edge:h,isReconnectable:M,reconnectRadius:f,onReconnect:c,onReconnectStart:d,onReconnectEnd:g,sourceX:R,sourceY:k,targetX:N,targetY:z,sourcePosition:j,targetPosition:A,setUpdateHover:$,setReconnecting:S})]})})}var O2=O.memo(R2);const $2=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function r0({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:u,onEdgeMouseLeave:a,onEdgeClick:f,reconnectRadius:c,onEdgeDoubleClick:d,onReconnectStart:g,onReconnectEnd:m,disableKeyboardA11y:w}){const{edgesFocusable:x,edgesReconnectable:p,elementsSelectable:y,onError:h}=ne($2,de),v=x2(t);return I.jsxs("div",{className:"react-flow__edges",children:[I.jsx(N2,{defaultColor:e,rfId:n}),v.map(E=>I.jsx(O2,{id:E,edgesFocusable:x,edgesReconnectable:p,elementsSelectable:y,noPanClassName:o,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:u,onMouseLeave:a,onClick:f,reconnectRadius:c,onDoubleClick:d,onReconnectStart:g,onReconnectEnd:m,rfId:n,onError:h,edgeTypes:r,disableKeyboardA11y:w},E))]})}r0.displayName="EdgeRenderer";const A2=O.memo(r0),D2=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function j2({children:e}){const t=ne(D2);return I.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function F2(e){const t=cc(),n=O.useRef(!1);O.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const V2=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function H2(e){const t=ne(V2),n=he();return O.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function B2(e){return e.connection.inProgress?{...e.connection,to:Xo(e.connection.to,e.transform)}:{...e.connection}}function W2(e){return B2}function U2(e){const t=W2();return ne(t,de)}const Y2=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function X2({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:i,height:s,isValid:l,inProgress:u}=ne(Y2,de);return!(i&&o&&u)?null:I.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:I.jsx("g",{className:_e(["react-flow__connection",Zg(l)]),children:I.jsx(o0,{style:t,type:n,CustomComponent:r,isValid:l})})})}const o0=({style:e,type:t=qt.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:i,fromNode:s,fromHandle:l,fromPosition:u,to:a,toNode:f,toHandle:c,toPosition:d,pointer:g}=U2();if(!o)return;if(n)return I.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:i.x,fromY:i.y,toX:a.x,toY:a.y,fromPosition:u,toPosition:d,connectionStatus:Zg(r),toNode:f,toHandle:c,pointer:g});let m="";const w={sourceX:i.x,sourceY:i.y,sourcePosition:u,targetX:a.x,targetY:a.y,targetPosition:d};switch(t){case qt.Bezier:[m]=am(w);break;case qt.SimpleBezier:[m]=Um(w);break;case qt.Step:[m]=Uu({...w,borderRadius:0});break;case qt.SmoothStep:[m]=Uu(w);break;default:[m]=dm(w)}return I.jsx("path",{d:m,fill:"none",className:"react-flow__connection-path",style:e})};o0.displayName="ConnectionLine";const G2={};function Rd(e=G2){O.useRef(e),he(),O.useEffect(()=>{},[e])}function Q2(){he(),O.useRef(!1),O.useEffect(()=>{},[])}function i0({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:u,onNodeMouseLeave:a,onNodeContextMenu:f,onSelectionContextMenu:c,onSelectionStart:d,onSelectionEnd:g,connectionLineType:m,connectionLineStyle:w,connectionLineComponent:x,connectionLineContainerStyle:p,selectionKeyCode:y,selectionOnDrag:h,selectionMode:v,multiSelectionKeyCode:E,panActivationKeyCode:_,zoomActivationKeyCode:C,deleteKeyCode:M,onlyRenderVisibleElements:L,elementsSelectable:D,defaultViewport:T,translateExtent:$,minZoom:F,maxZoom:S,preventScrolling:b,defaultMarkerColor:P,zoomOnScroll:R,zoomOnPinch:k,panOnScroll:N,panOnScrollSpeed:z,panOnScrollMode:j,zoomOnDoubleClick:A,panOnDrag:W,onPaneClick:B,onPaneMouseEnter:X,onPaneMouseMove:G,onPaneMouseLeave:Q,onPaneScroll:H,onPaneContextMenu:K,paneClickDistance:ee,nodeClickDistance:J,onEdgeContextMenu:q,onEdgeMouseEnter:Z,onEdgeMouseMove:ie,onEdgeMouseLeave:ue,reconnectRadius:oe,onReconnect:Te,onReconnectStart:Wt,onReconnectEnd:It,noDragClassName:yn,noWheelClassName:Lr,noPanClassName:zr,disableKeyboardA11y:br,nodeExtent:Js,rfId:Go,viewport:Hn,onViewportChange:Rr}){return Rd(e),Rd(t),Q2(),F2(n),H2(Hn),I.jsx(c2,{onPaneClick:B,onPaneMouseEnter:X,onPaneMouseMove:G,onPaneMouseLeave:Q,onPaneContextMenu:K,onPaneScroll:H,paneClickDistance:ee,deleteKeyCode:M,selectionKeyCode:y,selectionOnDrag:h,selectionMode:v,onSelectionStart:d,onSelectionEnd:g,multiSelectionKeyCode:E,panActivationKeyCode:_,zoomActivationKeyCode:C,elementsSelectable:D,zoomOnScroll:R,zoomOnPinch:k,zoomOnDoubleClick:A,panOnScroll:N,panOnScrollSpeed:z,panOnScrollMode:j,panOnDrag:W,defaultViewport:T,translateExtent:$,minZoom:F,maxZoom:S,onSelectionContextMenu:c,preventScrolling:b,noDragClassName:yn,noWheelClassName:Lr,noPanClassName:zr,disableKeyboardA11y:br,onViewportChange:Rr,isControlledViewport:!!Hn,children:I.jsxs(j2,{children:[I.jsx(A2,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:s,onReconnect:Te,onReconnectStart:Wt,onReconnectEnd:It,onlyRenderVisibleElements:L,onEdgeContextMenu:q,onEdgeMouseEnter:Z,onEdgeMouseMove:ie,onEdgeMouseLeave:ue,reconnectRadius:oe,defaultMarkerColor:P,noPanClassName:zr,disableKeyboardA11y:br,rfId:Go}),I.jsx(X2,{style:w,type:m,component:x,containerStyle:p}),I.jsx("div",{className:"react-flow__edgelabel-renderer"}),I.jsx(w2,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:u,onNodeMouseLeave:a,onNodeContextMenu:f,nodeClickDistance:J,onlyRenderVisibleElements:L,noPanClassName:zr,noDragClassName:yn,disableKeyboardA11y:br,nodeExtent:Js,rfId:Go}),I.jsx("div",{className:"react-flow__viewport-portal"})]})})}i0.displayName="GraphView";const K2=O.memo(i0),Od=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:u=.5,maxZoom:a=2,nodeOrigin:f,nodeExtent:c,zIndexMode:d="basic"}={})=>{const g=new Map,m=new Map,w=new Map,x=new Map,p=r??t??[],y=n??e??[],h=f??[0,0],v=c??Lo;gm(w,x,p);const{nodesInitialized:E}=Xu(y,g,m,{nodeOrigin:h,nodeExtent:v,zIndexMode:d});let _=[0,0,1];if(s&&o&&i){const C=Uo(g,{filter:T=>!!((T.width||T.initialWidth)&&(T.height||T.initialHeight))}),{x:M,y:L,zoom:D}=rc(C,o,i,u,a,(l==null?void 0:l.padding)??.1);_=[M,L,D]}return{rfId:"1",width:o??0,height:i??0,transform:_,nodes:y,nodesInitialized:E,nodeLookup:g,parentLookup:m,edges:p,edgeLookup:x,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:u,maxZoom:a,translateExtent:Lo,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:_r.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:h,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:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...Kg},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:J_,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Qg,zIndexMode:d,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Z2=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:u,maxZoom:a,nodeOrigin:f,nodeExtent:c,zIndexMode:d})=>mk((g,m)=>{async function w(){const{nodeLookup:x,panZoom:p,fitViewOptions:y,fitViewResolver:h,width:v,height:E,minZoom:_,maxZoom:C}=m();p&&(await Z_({nodes:x,width:v,height:E,panZoom:p,minZoom:_,maxZoom:C},y),h==null||h.resolve(!0),g({fitViewResolver:null}))}return{...Od({nodes:e,edges:t,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:u,maxZoom:a,nodeOrigin:f,nodeExtent:c,defaultNodes:n,defaultEdges:r,zIndexMode:d}),setNodes:x=>{const{nodeLookup:p,parentLookup:y,nodeOrigin:h,elevateNodesOnSelect:v,fitViewQueued:E,zIndexMode:_,nodesSelectionActive:C}=m(),{nodesInitialized:M,hasSelectedNodes:L}=Xu(x,p,y,{nodeOrigin:h,nodeExtent:c,elevateNodesOnSelect:v,checkEquality:!0,zIndexMode:_}),D=C&&L;E&&M?(w(),g({nodes:x,nodesInitialized:M,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):g({nodes:x,nodesInitialized:M,nodesSelectionActive:D})},setEdges:x=>{const{connectionLookup:p,edgeLookup:y}=m();gm(p,y,x),g({edges:x})},setDefaultNodesAndEdges:(x,p)=>{if(x){const{setNodes:y}=m();y(x),g({hasDefaultNodes:!0})}if(p){const{setEdges:y}=m();y(p),g({hasDefaultEdges:!0})}},updateNodeInternals:x=>{const{triggerNodeChanges:p,nodeLookup:y,parentLookup:h,domNode:v,nodeOrigin:E,nodeExtent:_,debug:C,fitViewQueued:M,zIndexMode:L}=m(),{changes:D,updatedInternals:T}=xS(x,y,h,v,E,_,L);T&&(mS(y,h,{nodeOrigin:E,nodeExtent:_,zIndexMode:L}),M?(w(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(D==null?void 0:D.length)>0&&(C&&console.log("React Flow: trigger node changes",D),p==null||p(D)))},updateNodePositions:(x,p=!1)=>{const y=[];let h=[];const{nodeLookup:v,triggerNodeChanges:E,connection:_,updateConnection:C,onNodesChangeMiddlewareMap:M}=m();for(const[L,D]of x){const T=v.get(L),$=!!(T!=null&&T.expandParent&&(T!=null&&T.parentId)&&(D!=null&&D.position)),F={id:L,type:"position",position:$?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:p};if(T&&_.inProgress&&_.fromNode.id===T.id){const S=Dn(T,_.fromHandle,Y.Left,!0);C({..._,from:S})}$&&T.parentId&&y.push({id:L,parentId:T.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),h.push(F)}if(y.length>0){const{parentLookup:L,nodeOrigin:D}=m(),T=ac(y,v,L,D);h.push(...T)}for(const L of M.values())h=L(h);E(h)},triggerNodeChanges:x=>{const{onNodesChange:p,setNodes:y,nodes:h,hasDefaultNodes:v,debug:E}=m();if(x!=null&&x.length){if(v){const _=Rm(x,h);y(_)}E&&console.log("React Flow: trigger node changes",x),p==null||p(x)}},triggerEdgeChanges:x=>{const{onEdgesChange:p,setEdges:y,edges:h,hasDefaultEdges:v,debug:E}=m();if(x!=null&&x.length){if(v){const _=Om(x,h);y(_)}E&&console.log("React Flow: trigger edge changes",x),p==null||p(x)}},addSelectedNodes:x=>{const{multiSelectionActive:p,edgeLookup:y,nodeLookup:h,triggerNodeChanges:v,triggerEdgeChanges:E}=m();if(p){const _=x.map(C=>En(C,!0));v(_);return}v(or(h,new Set([...x]),!0)),E(or(y))},addSelectedEdges:x=>{const{multiSelectionActive:p,edgeLookup:y,nodeLookup:h,triggerNodeChanges:v,triggerEdgeChanges:E}=m();if(p){const _=x.map(C=>En(C,!0));E(_);return}E(or(y,new Set([...x]))),v(or(h,new Set,!0))},unselectNodesAndEdges:({nodes:x,edges:p}={})=>{const{edges:y,nodes:h,nodeLookup:v,triggerNodeChanges:E,triggerEdgeChanges:_}=m(),C=x||h,M=p||y,L=[];for(const T of C){if(!T.selected)continue;const $=v.get(T.id);$&&($.selected=!1),L.push(En(T.id,!1))}const D=[];for(const T of M)T.selected&&D.push(En(T.id,!1));E(L),_(D)},setMinZoom:x=>{const{panZoom:p,maxZoom:y}=m();p==null||p.setScaleExtent([x,y]),g({minZoom:x})},setMaxZoom:x=>{const{panZoom:p,minZoom:y}=m();p==null||p.setScaleExtent([y,x]),g({maxZoom:x})},setTranslateExtent:x=>{var p;(p=m().panZoom)==null||p.setTranslateExtent(x),g({translateExtent:x})},resetSelectedElements:()=>{const{edges:x,nodes:p,triggerNodeChanges:y,triggerEdgeChanges:h,elementsSelectable:v}=m();if(!v)return;const E=p.reduce((C,M)=>M.selected?[...C,En(M.id,!1)]:C,[]),_=x.reduce((C,M)=>M.selected?[...C,En(M.id,!1)]:C,[]);y(E),h(_)},setNodeExtent:x=>{const{nodes:p,nodeLookup:y,parentLookup:h,nodeOrigin:v,elevateNodesOnSelect:E,nodeExtent:_,zIndexMode:C}=m();x[0][0]===_[0][0]&&x[0][1]===_[0][1]&&x[1][0]===_[1][0]&&x[1][1]===_[1][1]||(Xu(p,y,h,{nodeOrigin:v,nodeExtent:x,elevateNodesOnSelect:E,checkEquality:!1,zIndexMode:C}),g({nodeExtent:x}))},panBy:x=>{const{transform:p,width:y,height:h,panZoom:v,translateExtent:E}=m();return ES({delta:x,panZoom:v,transform:p,translateExtent:E,width:y,height:h})},setCenter:async(x,p,y)=>{const{width:h,height:v,maxZoom:E,panZoom:_}=m();if(!_)return Promise.resolve(!1);const C=typeof(y==null?void 0:y.zoom)<"u"?y.zoom:E;return await _.setViewport({x:h/2-x*C,y:v/2-p*C,zoom:C},{duration:y==null?void 0:y.duration,ease:y==null?void 0:y.ease,interpolate:y==null?void 0:y.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{g({connection:{...Kg}})},updateConnection:x=>{g({connection:x})},reset:()=>g({...Od()})}},Object.is);function s0({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:u,fitView:a,nodeOrigin:f,nodeExtent:c,zIndexMode:d,children:g}){const[m]=O.useState(()=>Z2({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:a,minZoom:s,maxZoom:l,fitViewOptions:u,nodeOrigin:f,nodeExtent:c,zIndexMode:d}));return I.jsx(yk,{value:m,children:I.jsx(jk,{children:g})})}function q2({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:l,fitViewOptions:u,minZoom:a,maxZoom:f,nodeOrigin:c,nodeExtent:d,zIndexMode:g}){return O.useContext(Xs)?I.jsx(I.Fragment,{children:e}):I.jsx(s0,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:u,initialMinZoom:a,initialMaxZoom:f,nodeOrigin:c,nodeExtent:d,zIndexMode:g,children:e})}const J2={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function eN({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:u,onInit:a,onMove:f,onMoveStart:c,onMoveEnd:d,onConnect:g,onConnectStart:m,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:p,onNodeMouseEnter:y,onNodeMouseMove:h,onNodeMouseLeave:v,onNodeContextMenu:E,onNodeDoubleClick:_,onNodeDragStart:C,onNodeDrag:M,onNodeDragStop:L,onNodesDelete:D,onEdgesDelete:T,onDelete:$,onSelectionChange:F,onSelectionDragStart:S,onSelectionDrag:b,onSelectionDragStop:P,onSelectionContextMenu:R,onSelectionStart:k,onSelectionEnd:N,onBeforeDelete:z,connectionMode:j,connectionLineType:A=qt.Bezier,connectionLineStyle:W,connectionLineComponent:B,connectionLineContainerStyle:X,deleteKeyCode:G="Backspace",selectionKeyCode:Q="Shift",selectionOnDrag:H=!1,selectionMode:K=zo.Full,panActivationKeyCode:ee="Space",multiSelectionKeyCode:J=Oo()?"Meta":"Control",zoomActivationKeyCode:q=Oo()?"Meta":"Control",snapToGrid:Z,snapGrid:ie,onlyRenderVisibleElements:ue=!1,selectNodesOnDrag:oe,nodesDraggable:Te,autoPanOnNodeFocus:Wt,nodesConnectable:It,nodesFocusable:yn,nodeOrigin:Lr=zm,edgesFocusable:zr,edgesReconnectable:br,elementsSelectable:Js=!0,defaultViewport:Go=Tk,minZoom:Hn=.5,maxZoom:Rr=2,translateExtent:mc=Lo,preventScrolling:$0=!0,nodeExtent:el,defaultMarkerColor:A0="#b1b1b7",zoomOnScroll:D0=!0,zoomOnPinch:j0=!0,panOnScroll:F0=!1,panOnScrollSpeed:V0=.5,panOnScrollMode:H0=Pn.Free,zoomOnDoubleClick:B0=!0,panOnDrag:W0=!0,onPaneClick:U0,onPaneMouseEnter:Y0,onPaneMouseMove:X0,onPaneMouseLeave:G0,onPaneScroll:Q0,onPaneContextMenu:K0,paneClickDistance:Z0=1,nodeClickDistance:q0=0,children:J0,onReconnect:ey,onReconnectStart:ty,onReconnectEnd:ny,onEdgeContextMenu:ry,onEdgeDoubleClick:oy,onEdgeMouseEnter:iy,onEdgeMouseMove:sy,onEdgeMouseLeave:ly,reconnectRadius:uy=10,onNodesChange:ay,onEdgesChange:cy,noDragClassName:fy="nodrag",noWheelClassName:dy="nowheel",noPanClassName:yc="nopan",fitView:vc,fitViewOptions:wc,connectOnClick:hy,attributionPosition:py,proOptions:gy,defaultEdgeOptions:my,elevateNodesOnSelect:yy=!0,elevateEdgesOnSelect:vy=!1,disableKeyboardA11y:xc=!1,autoPanOnConnect:wy,autoPanOnNodeDrag:xy,autoPanSpeed:Ey,connectionRadius:_y,isValidConnection:Sy,onError:ky,style:Ny,id:Ec,nodeDragThreshold:Cy,connectionDragThreshold:My,viewport:Iy,onViewportChange:Py,width:Ty,height:Ly,colorMode:zy="light",debug:by,onScroll:Qo,ariaLabelConfig:Ry,zIndexMode:_c="basic",...Oy},$y){const tl=Ec||"1",Ay=Rk(zy),Dy=O.useCallback(Sc=>{Sc.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Qo==null||Qo(Sc)},[Qo]);return I.jsx("div",{"data-testid":"rf__wrapper",...Oy,onScroll:Dy,style:{...Ny,...J2},ref:$y,className:_e(["react-flow",o,Ay]),id:Ec,role:"application",children:I.jsxs(q2,{nodes:e,edges:t,width:Ty,height:Ly,fitView:vc,fitViewOptions:wc,minZoom:Hn,maxZoom:Rr,nodeOrigin:Lr,nodeExtent:el,zIndexMode:_c,children:[I.jsx(bk,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:m,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:p,nodesDraggable:Te,autoPanOnNodeFocus:Wt,nodesConnectable:It,nodesFocusable:yn,edgesFocusable:zr,edgesReconnectable:br,elementsSelectable:Js,elevateNodesOnSelect:yy,elevateEdgesOnSelect:vy,minZoom:Hn,maxZoom:Rr,nodeExtent:el,onNodesChange:ay,onEdgesChange:cy,snapToGrid:Z,snapGrid:ie,connectionMode:j,translateExtent:mc,connectOnClick:hy,defaultEdgeOptions:my,fitView:vc,fitViewOptions:wc,onNodesDelete:D,onEdgesDelete:T,onDelete:$,onNodeDragStart:C,onNodeDrag:M,onNodeDragStop:L,onSelectionDrag:b,onSelectionDragStart:S,onSelectionDragStop:P,onMove:f,onMoveStart:c,onMoveEnd:d,noPanClassName:yc,nodeOrigin:Lr,rfId:tl,autoPanOnConnect:wy,autoPanOnNodeDrag:xy,autoPanSpeed:Ey,onError:ky,connectionRadius:_y,isValidConnection:Sy,selectNodesOnDrag:oe,nodeDragThreshold:Cy,connectionDragThreshold:My,onBeforeDelete:z,debug:by,ariaLabelConfig:Ry,zIndexMode:_c}),I.jsx(K2,{onInit:a,onNodeClick:l,onEdgeClick:u,onNodeMouseEnter:y,onNodeMouseMove:h,onNodeMouseLeave:v,onNodeContextMenu:E,onNodeDoubleClick:_,nodeTypes:i,edgeTypes:s,connectionLineType:A,connectionLineStyle:W,connectionLineComponent:B,connectionLineContainerStyle:X,selectionKeyCode:Q,selectionOnDrag:H,selectionMode:K,deleteKeyCode:G,multiSelectionKeyCode:J,panActivationKeyCode:ee,zoomActivationKeyCode:q,onlyRenderVisibleElements:ue,defaultViewport:Go,translateExtent:mc,minZoom:Hn,maxZoom:Rr,preventScrolling:$0,zoomOnScroll:D0,zoomOnPinch:j0,zoomOnDoubleClick:B0,panOnScroll:F0,panOnScrollSpeed:V0,panOnScrollMode:H0,panOnDrag:W0,onPaneClick:U0,onPaneMouseEnter:Y0,onPaneMouseMove:X0,onPaneMouseLeave:G0,onPaneScroll:Q0,onPaneContextMenu:K0,paneClickDistance:Z0,nodeClickDistance:q0,onSelectionContextMenu:R,onSelectionStart:k,onSelectionEnd:N,onReconnect:ey,onReconnectStart:ty,onReconnectEnd:ny,onEdgeContextMenu:ry,onEdgeDoubleClick:oy,onEdgeMouseEnter:iy,onEdgeMouseMove:sy,onEdgeMouseLeave:ly,reconnectRadius:uy,defaultMarkerColor:A0,noDragClassName:fy,noWheelClassName:dy,noPanClassName:yc,rfId:tl,disableKeyboardA11y:xc,nodeExtent:el,viewport:Iy,onViewportChange:Py}),I.jsx(Pk,{onSelectionChange:F}),J0,I.jsx(kk,{proOptions:gy,position:py}),I.jsx(Sk,{rfId:tl,disableKeyboardA11y:xc})]})})}var tN=$m(eN);function nN(e){const[t,n]=O.useState(e),r=O.useCallback(o=>n(i=>Rm(o,i)),[]);return[t,n,r]}function rN(e){const[t,n]=O.useState(e),r=O.useCallback(o=>n(i=>Om(o,i)),[]);return[t,n,r]}function oN({dimensions:e,lineWidth:t,variant:n,className:r}){return I.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:_e(["react-flow__background-pattern",n,r])})}function iN({radius:e,className:t}){return I.jsx("circle",{cx:e,cy:e,r:e,className:_e(["react-flow__background-pattern","dots",t])})}var cn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(cn||(cn={}));const sN={[cn.Dots]:1,[cn.Lines]:1,[cn.Cross]:6},lN=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function l0({id:e,variant:t=cn.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=0,color:s,bgColor:l,style:u,className:a,patternClassName:f}){const c=O.useRef(null),{transform:d,patternId:g}=ne(lN,de),m=r||sN[t],w=t===cn.Dots,x=t===cn.Cross,p=Array.isArray(n)?n:[n,n],y=[p[0]*d[2]||1,p[1]*d[2]||1],h=m*d[2],v=Array.isArray(i)?i:[i,i],E=x?[h,h]:y,_=[v[0]*d[2]||1+E[0]/2,v[1]*d[2]||1+E[1]/2],C=`${g}${e||""}`;return I.jsxs("svg",{className:_e(["react-flow__background",a]),style:{...u,...Qs,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:c,"data-testid":"rf__background",children:[I.jsx("pattern",{id:C,x:d[0]%y[0],y:d[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:w?I.jsx(iN,{radius:h/2,className:f}):I.jsx(oN,{dimensions:E,lineWidth:o,variant:t,className:f})}),I.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${C})`})]})}l0.displayName="Background";const uN=O.memo(l0);function aN(){return I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:I.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function cN(){return I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:I.jsx("path",{d:"M0 0h32v4.2H0z"})})}function fN(){return I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:I.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 dN(){return I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:I.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 hN(){return I.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:I.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 Ei({children:e,className:t,...n}){return I.jsx("button",{type:"button",className:_e(["react-flow__controls-button",t]),...n,children:e})}const pN=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function u0({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:u,className:a,children:f,position:c="bottom-left",orientation:d="vertical","aria-label":g}){const m=he(),{isInteractive:w,minZoomReached:x,maxZoomReached:p,ariaLabelConfig:y}=ne(pN,de),{zoomIn:h,zoomOut:v,fitView:E}=cc(),_=()=>{h(),i==null||i()},C=()=>{v(),s==null||s()},M=()=>{E(o),l==null||l()},L=()=>{m.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),u==null||u(!w)},D=d==="horizontal"?"horizontal":"vertical";return I.jsxs(Gs,{className:_e(["react-flow__controls",D,a]),position:c,style:e,"data-testid":"rf__controls","aria-label":g??y["controls.ariaLabel"],children:[t&&I.jsxs(I.Fragment,{children:[I.jsx(Ei,{onClick:_,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:p,children:I.jsx(aN,{})}),I.jsx(Ei,{onClick:C,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:x,children:I.jsx(cN,{})})]}),n&&I.jsx(Ei,{className:"react-flow__controls-fitview",onClick:M,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:I.jsx(fN,{})}),r&&I.jsx(Ei,{className:"react-flow__controls-interactive",onClick:L,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:w?I.jsx(hN,{}):I.jsx(dN,{})}),f]})}u0.displayName="Controls";const gN=O.memo(u0);function mN({id:e,x:t,y:n,width:r,height:o,style:i,color:s,strokeColor:l,strokeWidth:u,className:a,borderRadius:f,shapeRendering:c,selected:d,onClick:g}){const{background:m,backgroundColor:w}=i||{},x=s||m||w;return I.jsx("rect",{className:_e(["react-flow__minimap-node",{selected:d},a]),x:t,y:n,rx:f,ry:f,width:r,height:o,style:{fill:x,stroke:l,strokeWidth:u},shapeRendering:c,onClick:g?p=>g(p,e):void 0})}const yN=O.memo(mN),vN=e=>e.nodes.map(t=>t.id),Al=e=>e instanceof Function?e:()=>e;function wN({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:i=yN,onClick:s}){const l=ne(vN,de),u=Al(t),a=Al(e),f=Al(n),c=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return I.jsx(I.Fragment,{children:l.map(d=>I.jsx(EN,{id:d,nodeColorFunc:u,nodeStrokeColorFunc:a,nodeClassNameFunc:f,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:i,onClick:s,shapeRendering:c},d))})}function xN({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:u}){const{node:a,x:f,y:c,width:d,height:g}=ne(m=>{const w=m.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const x=w.internals.userNode,{x:p,y}=w.internals.positionAbsolute,{width:h,height:v}=Bt(x);return{node:x,x:p,y,width:h,height:v}},de);return!a||a.hidden||!rm(a)?null:I.jsx(l,{x:f,y:c,width:d,height:g,style:a.style,selected:!!a.selected,className:r(a),color:t(a),borderRadius:o,strokeColor:n(a),strokeWidth:i,shapeRendering:s,onClick:u,id:a.id})}const EN=O.memo(xN);var _N=O.memo(wN);const SN=200,kN=150,NN=e=>!e.hidden,CN=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?nm(Uo(e.nodeLookup,{filter:NN}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},MN="react-flow__minimap-desc";function a0({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:u,maskColor:a,maskStrokeColor:f,maskStrokeWidth:c,position:d="bottom-right",onClick:g,onNodeClick:m,pannable:w=!1,zoomable:x=!1,ariaLabel:p,inversePan:y,zoomStep:h=1,offsetScale:v=5}){const E=he(),_=O.useRef(null),{boundingRect:C,viewBB:M,rfId:L,panZoom:D,translateExtent:T,flowWidth:$,flowHeight:F,ariaLabelConfig:S}=ne(CN,de),b=(e==null?void 0:e.width)??SN,P=(e==null?void 0:e.height)??kN,R=C.width/b,k=C.height/P,N=Math.max(R,k),z=N*b,j=N*P,A=v*N,W=C.x-(z-C.width)/2-A,B=C.y-(j-C.height)/2-A,X=z+A*2,G=j+A*2,Q=`${MN}-${L}`,H=O.useRef(0),K=O.useRef();H.current=N,O.useEffect(()=>{if(_.current&&D)return K.current=TS({domNode:_.current,panZoom:D,getTransform:()=>E.getState().transform,getViewScale:()=>H.current}),()=>{var Z;(Z=K.current)==null||Z.destroy()}},[D]),O.useEffect(()=>{var Z;(Z=K.current)==null||Z.update({translateExtent:T,width:$,height:F,inversePan:y,pannable:w,zoomStep:h,zoomable:x})},[w,x,y,h,T,$,F]);const ee=g?Z=>{var oe;const[ie,ue]=((oe=K.current)==null?void 0:oe.pointer(Z))||[0,0];g(Z,{x:ie,y:ue})}:void 0,J=m?O.useCallback((Z,ie)=>{const ue=E.getState().nodeLookup.get(ie).internals.userNode;m(Z,ue)},[]):void 0,q=p??S["minimap.ariaLabel"];return I.jsx(Gs,{position:d,style:{...e,"--xy-minimap-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-stroke-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-width-props":typeof c=="number"?c*N:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:_e(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:I.jsxs("svg",{width:b,height:P,viewBox:`${W} ${B} ${X} ${G}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Q,ref:_,onClick:ee,children:[q&&I.jsx("title",{id:Q,children:q}),I.jsx(_N,{onClick:J,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:s,nodeComponent:l}),I.jsx("path",{className:"react-flow__minimap-mask",d:`M${W-A},${B-A}h${X+A*2}v${G+A*2}h${-X-A*2}z
62
+ M${M.x},${M.y}h${M.width}v${M.height}h${-M.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}a0.displayName="MiniMap";const IN=O.memo(a0),PN=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,TN={[Cr.Line]:"right",[Cr.Handle]:"bottom-right"};function LN({nodeId:e,position:t,variant:n=Cr.Handle,className:r,style:o=void 0,children:i,color:s,minWidth:l=10,minHeight:u=10,maxWidth:a=Number.MAX_VALUE,maxHeight:f=Number.MAX_VALUE,keepAspectRatio:c=!1,resizeDirection:d,autoScale:g=!0,shouldResize:m,onResizeStart:w,onResize:x,onResizeEnd:p}){const y=Fm(),h=typeof e=="string"?e:y,v=he(),E=O.useRef(null),_=n===Cr.Handle,C=ne(O.useCallback(PN(_&&g),[_,g]),de),M=O.useRef(null),L=t??TN[n];O.useEffect(()=>{if(!(!E.current||!h))return M.current||(M.current=WS({domNode:E.current,nodeId:h,getStoreItems:()=>{const{nodeLookup:T,transform:$,snapGrid:F,snapToGrid:S,nodeOrigin:b,domNode:P}=v.getState();return{nodeLookup:T,transform:$,snapGrid:F,snapToGrid:S,nodeOrigin:b,paneDomNode:P}},onChange:(T,$)=>{const{triggerNodeChanges:F,nodeLookup:S,parentLookup:b,nodeOrigin:P}=v.getState(),R=[],k={x:T.x,y:T.y},N=S.get(h);if(N&&N.expandParent&&N.parentId){const z=N.origin??P,j=T.width??N.measured.width??0,A=T.height??N.measured.height??0,W={id:N.id,parentId:N.parentId,rect:{width:j,height:A,...om({x:T.x??N.position.x,y:T.y??N.position.y},{width:j,height:A},N.parentId,S,z)}},B=ac([W],S,b,P);R.push(...B),k.x=T.x?Math.max(z[0]*j,T.x):void 0,k.y=T.y?Math.max(z[1]*A,T.y):void 0}if(k.x!==void 0&&k.y!==void 0){const z={id:h,type:"position",position:{...k}};R.push(z)}if(T.width!==void 0&&T.height!==void 0){const j={id:h,type:"dimensions",resizing:!0,setAttributes:d?d==="horizontal"?"width":"height":!0,dimensions:{width:T.width,height:T.height}};R.push(j)}for(const z of $){const j={...z,type:"position"};R.push(j)}F(R)},onEnd:({width:T,height:$})=>{const F={id:h,type:"dimensions",resizing:!1,dimensions:{width:T,height:$}};v.getState().triggerNodeChanges([F])}})),M.current.update({controlPosition:L,boundaries:{minWidth:l,minHeight:u,maxWidth:a,maxHeight:f},keepAspectRatio:c,resizeDirection:d,onResizeStart:w,onResize:x,onResizeEnd:p,shouldResize:m}),()=>{var T;(T=M.current)==null||T.destroy()}},[L,l,u,a,f,c,w,x,p,m]);const D=L.split("-");return I.jsx("div",{className:_e(["react-flow__resize-control","nodrag",...D,n,r]),ref:E,style:{...o,scale:C,...s&&{[_?"backgroundColor":"borderColor"]:s}},children:i})}O.memo(LN);function zN({data:e}){const{label:t,file:n,stateSlots:r,isContextProvider:o,renderCount:i,isRecentlyRendered:s}=e;return I.jsxs("div",{style:{background:s?"#1e3a2f":"#1a1d27",border:`1.5px solid ${s?"#22c55e":o?"#818cf8":"#2e3348"}`,borderRadius:10,padding:"10px 14px",minWidth:160,fontFamily:"monospace",transition:"border-color 0.2s, background 0.2s",boxShadow:s?"0 0 12px #22c55e44":"0 2px 8px #00000044"},children:[I.jsx(hn,{type:"target",position:Y.Top,style:{background:"#4b5563"}}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[o&&I.jsx("span",{style:{fontSize:9,background:"#4338ca",color:"#c7d2fe",padding:"1px 5px",borderRadius:4},children:"CTX"}),I.jsx("span",{style:{color:"#e2e8f0",fontWeight:700,fontSize:13},children:t})]}),I.jsx("div",{style:{color:"#64748b",fontSize:10,marginBottom:r.length>0?6:0},children:n}),r.length>0&&I.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:4},children:r.map(l=>I.jsx("span",{style:{fontSize:10,background:"#172554",color:"#93c5fd",padding:"1px 6px",borderRadius:4,border:"1px solid #1e3a8a"},children:l},l))}),i>0&&I.jsx("div",{style:{position:"absolute",top:-8,right:-8,background:s?"#22c55e":"#334155",color:s?"#fff":"#94a3b8",fontSize:10,fontWeight:700,borderRadius:999,padding:"1px 6px",minWidth:20,textAlign:"center",transition:"background 0.2s"},children:i}),I.jsx(hn,{type:"source",position:Y.Bottom,style:{background:"#4b5563"}})]})}function bN({data:e}){const{label:t,file:n,renderCount:r,isRecentlyRendered:o}=e;return I.jsxs("div",{style:{background:o?"#1e1b40":"#13111f",border:`1.5px solid ${o?"#818cf8":"#3730a3"}`,borderRadius:10,padding:"10px 14px",minWidth:150,fontFamily:"monospace",transition:"border-color 0.2s, background 0.2s",boxShadow:o?"0 0 12px #818cf844":"0 2px 8px #00000044"},children:[I.jsx(hn,{type:"target",position:Y.Top,style:{background:"#4b5563"}}),I.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[I.jsx("span",{style:{fontSize:9,background:"#4338ca",color:"#c7d2fe",padding:"1px 5px",borderRadius:4},children:"CONTEXT"}),I.jsx("span",{style:{color:"#c7d2fe",fontWeight:700,fontSize:13},children:t})]}),I.jsx("div",{style:{color:"#64748b",fontSize:10},children:n}),r>0&&I.jsx("div",{style:{position:"absolute",top:-8,right:-8,background:o?"#818cf8":"#334155",color:"#fff",fontSize:10,fontWeight:700,borderRadius:999,padding:"1px 6px",minWidth:20,textAlign:"center"},children:r}),I.jsx(hn,{type:"source",position:Y.Bottom,style:{background:"#4b5563"}})]})}const RN=800,ON=window.__RSF_PORT__??7272;function $N(e,t){const n=O.useRef({renderCounts:{},recentlyRendered:new Set}),r=O.useRef(new Map),o=O.useCallback(s=>{const l=n.current;l.renderCounts[s.componentName]=s.renderCount,l.recentlyRendered.add(s.componentName);const u=r.current.get(s.componentName);u&&clearTimeout(u);const a=setTimeout(()=>{n.current.recentlyRendered.delete(s.componentName),e({...n.current,recentlyRendered:new Set(n.current.recentlyRendered)})},RN);r.current.set(s.componentName,a),e({...l,recentlyRendered:new Set(l.recentlyRendered)})},[e]),i=O.useCallback(s=>{n.current.renderCounts[s.componentName]=s.renderCount},[]);O.useEffect(()=>{let s=null,l=!1,u=2e3;function a(){l||(s=new WebSocket(`ws://${window.location.hostname}:${ON}/runtime-ui`),s.addEventListener("message",f=>{try{const c=JSON.parse(f.data);if(c.type==="render")o(c);else if(c.type==="graph-update"&&t)t(c.graph);else if(c.type==="history"&&Array.isArray(c.events)){for(const d of c.events)d.type==="render"&&i(d);e({...n.current,recentlyRendered:new Set})}}catch{}}),s.addEventListener("open",()=>{u=2e3}),s.addEventListener("close",()=>{l||(setTimeout(a,u),u=Math.min(u*2,3e4))}))}return a(),()=>{l=!0,s==null||s.close(),r.current.forEach(clearTimeout)}},[o,i,e,t])}var AN="\0",vn="\0",$d="";let DN=class{constructor(t){we(this,"_isDirected",!0);we(this,"_isMultigraph",!1);we(this,"_isCompound",!1);we(this,"_label");we(this,"_defaultNodeLabelFn",()=>{});we(this,"_defaultEdgeLabelFn",()=>{});we(this,"_nodes",{});we(this,"_in",{});we(this,"_preds",{});we(this,"_out",{});we(this,"_sucs",{});we(this,"_edgeObjs",{});we(this,"_edgeLabels",{});we(this,"_nodeCount",0);we(this,"_edgeCount",0);we(this,"_parent");we(this,"_children");t&&(this._isDirected=Object.hasOwn(t,"directed")?t.directed:!0,this._isMultigraph=Object.hasOwn(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.hasOwn(t,"compound")?t.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[vn]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,typeof t!="function"&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter(n=>Object.keys(t._in[n]).length===0)}sinks(){var t=this;return this.nodes().filter(n=>Object.keys(t._out[n]).length===0)}setNodes(t,n){var r=arguments,o=this;return t.forEach(function(i){r.length>1?o.setNode(i,n):o.setNode(i)}),this}setNode(t,n){return Object.hasOwn(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=vn,this._children[t]={},this._children[vn][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.hasOwn(this._nodes,t)}removeNode(t){var n=this;if(Object.hasOwn(this._nodes,t)){var r=o=>n.removeEdge(n._edgeObjs[o]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach(function(o){n.setParent(o)}),delete this._children[t]),Object.keys(this._in[t]).forEach(r),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n=vn;else{n+="";for(var r=n;r!==void 0;r=this.parent(r))if(r===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var n=this._parent[t];if(n!==vn)return n}}children(t=vn){if(this._isCompound){var n=this._children[t];if(n)return Object.keys(n)}else{if(t===vn)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var n=this._preds[t];if(n)return Object.keys(n)}successors(t){var n=this._sucs[t];if(n)return Object.keys(n)}neighbors(t){var n=this.predecessors(t);if(n){const o=new Set(n);for(var r of this.successors(t))o.add(r);return Array.from(o.values())}}isLeaf(t){var n;return this.isDirected()?n=this.successors(t):n=this.neighbors(t),n.length===0}filterNodes(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([s,l]){t(s)&&n.setNode(s,l)}),Object.values(this._edgeObjs).forEach(function(s){n.hasNode(s.v)&&n.hasNode(s.w)&&n.setEdge(s,r.edge(s))});var o={};function i(s){var l=r.parent(s);return l===void 0||n.hasNode(l)?(o[s]=l,l):l in o?o[l]:i(l)}return this._isCompound&&n.nodes().forEach(s=>n.setParent(s,i(s))),n}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,typeof t!="function"&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,n){var r=this,o=arguments;return t.reduce(function(i,s){return o.length>1?r.setEdge(i,s,n):r.setEdge(i,s),s}),this}setEdge(){var t,n,r,o,i=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(t=s.v,n=s.w,r=s.name,arguments.length===2&&(o=arguments[1],i=!0)):(t=s,n=arguments[1],r=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),t=""+t,n=""+n,r!==void 0&&(r=""+r);var l=Zr(this._isDirected,t,n,r);if(Object.hasOwn(this._edgeLabels,l))return i&&(this._edgeLabels[l]=o),this;if(r!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[l]=i?o:this._defaultEdgeLabelFn(t,n,r);var u=jN(this._isDirected,t,n,r);return t=u.v,n=u.w,Object.freeze(u),this._edgeObjs[l]=u,Ad(this._preds[n],t),Ad(this._sucs[t],n),this._in[n][l]=u,this._out[t][l]=u,this._edgeCount++,this}edge(t,n,r){var o=arguments.length===1?Dl(this._isDirected,arguments[0]):Zr(this._isDirected,t,n,r);return this._edgeLabels[o]}edgeAsObj(){const t=this.edge(...arguments);return typeof t!="object"?{label:t}:t}hasEdge(t,n,r){var o=arguments.length===1?Dl(this._isDirected,arguments[0]):Zr(this._isDirected,t,n,r);return Object.hasOwn(this._edgeLabels,o)}removeEdge(t,n,r){var o=arguments.length===1?Dl(this._isDirected,arguments[0]):Zr(this._isDirected,t,n,r),i=this._edgeObjs[o];return i&&(t=i.v,n=i.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Dd(this._preds[n],t),Dd(this._sucs[t],n),delete this._in[n][o],delete this._out[t][o],this._edgeCount--),this}inEdges(t,n){var r=this._in[t];if(r){var o=Object.values(r);return n?o.filter(i=>i.v===n):o}}outEdges(t,n){var r=this._out[t];if(r){var o=Object.values(r);return n?o.filter(i=>i.w===n):o}}nodeEdges(t,n){var r=this.inEdges(t,n);if(r)return r.concat(this.outEdges(t,n))}};function Ad(e,t){e[t]?e[t]++:e[t]=1}function Dd(e,t){--e[t]||delete e[t]}function Zr(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var s=o;o=i,i=s}return o+$d+i+$d+(r===void 0?AN:r)}function jN(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var s=o;o=i,i=s}var l={v:o,w:i};return r&&(l.name=r),l}function Dl(e,t){return Zr(e,t.v,t.w,t.name)}var dc=DN,FN="2.2.4",VN={Graph:dc,version:FN},HN=dc,BN={write:WN,read:XN};function WN(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:UN(e),edges:YN(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function UN(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),o={v:t};return n!==void 0&&(o.value=n),r!==void 0&&(o.parent=r),o})}function YN(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function XN(e){var t=new HN(e.options).setGraph(e.value);return e.nodes.forEach(function(n){t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(function(n){t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var GN=QN;function QN(e){var t={},n=[],r;function o(i){Object.hasOwn(t,i)||(t[i]=!0,r.push(i),e.successors(i).forEach(o),e.predecessors(i).forEach(o))}return e.nodes().forEach(function(i){r=[],o(i),r.length&&n.push(r)}),n}let KN=class{constructor(){we(this,"_arr",[]);we(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(t){return t.key})}has(t){return Object.hasOwn(this._keyIndices,t)}priority(t){var n=this._keyIndices[t];if(n!==void 0)return this._arr[n].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(t,n){var r=this._keyIndices;if(t=String(t),!Object.hasOwn(r,t)){var o=this._arr,i=o.length;return r[t]=i,o.push({key:t,priority:n}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,n){var r=this._keyIndices[t];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)}_heapify(t){var n=this._arr,r=2*t,o=r+1,i=t;r<n.length&&(i=n[r].priority<n[i].priority?r:i,o<n.length&&(i=n[o].priority<n[i].priority?o:i),i!==t&&(this._swap(t,i),this._heapify(i)))}_decrease(t){for(var n=this._arr,r=n[t].priority,o;t!==0&&(o=t>>1,!(n[o].priority<r));)this._swap(t,o),t=o}_swap(t,n){var r=this._arr,o=this._keyIndices,i=r[t],s=r[n];r[t]=s,r[n]=i,o[s.key]=t,o[i.key]=n}};var c0=KN,ZN=c0,f0=JN,qN=()=>1;function JN(e,t,n,r){return eC(e,String(t),n||qN,r||function(o){return e.outEdges(o)})}function eC(e,t,n,r){var o={},i=new ZN,s,l,u=function(a){var f=a.v!==s?a.v:a.w,c=o[f],d=n(a),g=l.distance+d;if(d<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+a+" Weight: "+d);g<c.distance&&(c.distance=g,c.predecessor=s,i.decrease(f,g))};for(e.nodes().forEach(function(a){var f=a===t?0:Number.POSITIVE_INFINITY;o[a]={distance:f},i.add(a,f)});i.size()>0&&(s=i.removeMin(),l=o[s],l.distance!==Number.POSITIVE_INFINITY);)r(s).forEach(u);return o}var tC=f0,nC=rC;function rC(e,t,n){return e.nodes().reduce(function(r,o){return r[o]=tC(e,o,t,n),r},{})}var d0=oC;function oC(e){var t=0,n=[],r={},o=[];function i(s){var l=r[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach(function(f){Object.hasOwn(r,f)?r[f].onStack&&(l.lowlink=Math.min(l.lowlink,r[f].index)):(i(f),l.lowlink=Math.min(l.lowlink,r[f].lowlink))}),l.lowlink===l.index){var u=[],a;do a=n.pop(),r[a].onStack=!1,u.push(a);while(s!==a);o.push(u)}}return e.nodes().forEach(function(s){Object.hasOwn(r,s)||i(s)}),o}var iC=d0,sC=lC;function lC(e){return iC(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var uC=cC,aC=()=>1;function cC(e,t,n){return fC(e,t||aC,n||function(r){return e.outEdges(r)})}function fC(e,t,n){var r={},o=e.nodes();return o.forEach(function(i){r[i]={},r[i][i]={distance:0},o.forEach(function(s){i!==s&&(r[i][s]={distance:Number.POSITIVE_INFINITY})}),n(i).forEach(function(s){var l=s.v===i?s.w:s.v,u=t(s);r[i][l]={distance:u,predecessor:i}})}),o.forEach(function(i){var s=r[i];o.forEach(function(l){var u=r[l];o.forEach(function(a){var f=u[i],c=s[a],d=u[a],g=f.distance+c.distance;g<d.distance&&(d.distance=g,d.predecessor=c.predecessor)})})}),r}function h0(e){var t={},n={},r=[];function o(i){if(Object.hasOwn(n,i))throw new Zu;Object.hasOwn(t,i)||(n[i]=!0,t[i]=!0,e.predecessors(i).forEach(o),delete n[i],r.push(i))}if(e.sinks().forEach(o),Object.keys(t).length!==e.nodeCount())throw new Zu;return r}class Zu extends Error{constructor(){super(...arguments)}}var p0=h0;h0.CycleException=Zu;var jd=p0,dC=hC;function hC(e){try{jd(e)}catch(t){if(t instanceof jd.CycleException)return!1;throw t}return!0}var g0=pC;function pC(e,t,n){Array.isArray(t)||(t=[t]);var r=e.isDirected()?l=>e.successors(l):l=>e.neighbors(l),o=n==="post"?gC:mC,i=[],s={};return t.forEach(l=>{if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);o(l,r,s,i)}),i}function gC(e,t,n,r){for(var o=[[e,!1]];o.length>0;){var i=o.pop();i[1]?r.push(i[0]):Object.hasOwn(n,i[0])||(n[i[0]]=!0,o.push([i[0],!0]),m0(t(i[0]),s=>o.push([s,!1])))}}function mC(e,t,n,r){for(var o=[e];o.length>0;){var i=o.pop();Object.hasOwn(n,i)||(n[i]=!0,r.push(i),m0(t(i),s=>o.push(s)))}}function m0(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}var yC=g0,vC=wC;function wC(e,t){return yC(e,t,"post")}var xC=g0,EC=_C;function _C(e,t){return xC(e,t,"pre")}var SC=dc,kC=c0,NC=CC;function CC(e,t){var n=new SC,r={},o=new kC,i;function s(u){var a=u.v===i?u.w:u.v,f=o.priority(a);if(f!==void 0){var c=t(u);c<f&&(r[a]=i,o.decrease(a,c))}}if(e.nodeCount()===0)return n;e.nodes().forEach(function(u){o.add(u,Number.POSITIVE_INFINITY),n.setNode(u)}),o.decrease(e.nodes()[0],0);for(var l=!1;o.size()>0;){if(i=o.removeMin(),Object.hasOwn(r,i))n.setEdge(i,r[i]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(i).forEach(s)}return n}var MC={components:GN,dijkstra:f0,dijkstraAll:nC,findCycles:sC,floydWarshall:uC,isAcyclic:dC,postorder:vC,preorder:EC,prim:NC,tarjan:d0,topsort:p0},Fd=VN,vt={Graph:Fd.Graph,json:BN,alg:MC,version:Fd.version};let IC=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return Vd(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&Vd(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let t=[],n=this._sentinel,r=n._prev;for(;r!==n;)t.push(JSON.stringify(r,PC)),r=r._prev;return"["+t.join(", ")+"]"}};function Vd(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function PC(e,t){if(e!=="_next"&&e!=="_prev")return t}var TC=IC;let LC=vt.Graph,zC=TC;var bC=OC;let RC=()=>1;function OC(e,t){if(e.nodeCount()<=1)return[];let n=AC(e,t||RC);return $C(n.graph,n.buckets,n.zeroIdx).flatMap(o=>e.outEdges(o.v,o.w))}function $C(e,t,n){let r=[],o=t[t.length-1],i=t[0],s;for(;e.nodeCount();){for(;s=i.dequeue();)jl(e,t,n,s);for(;s=o.dequeue();)jl(e,t,n,s);if(e.nodeCount()){for(let l=t.length-2;l>0;--l)if(s=t[l].dequeue(),s){r=r.concat(jl(e,t,n,s,!0));break}}}return r}function jl(e,t,n,r,o){let i=o?[]:void 0;return e.inEdges(r.v).forEach(s=>{let l=e.edge(s),u=e.node(s.v);o&&i.push({v:s.v,w:s.w}),u.out-=l,qu(t,n,u)}),e.outEdges(r.v).forEach(s=>{let l=e.edge(s),u=s.w,a=e.node(u);a.in-=l,qu(t,n,a)}),e.removeNode(r.v),i}function AC(e,t){let n=new LC,r=0,o=0;e.nodes().forEach(l=>{n.setNode(l,{v:l,in:0,out:0})}),e.edges().forEach(l=>{let u=n.edge(l.v,l.w)||0,a=t(l),f=u+a;n.setEdge(l.v,l.w,f),o=Math.max(o,n.node(l.v).out+=a),r=Math.max(r,n.node(l.w).in+=a)});let i=DC(o+r+3).map(()=>new zC),s=r+1;return n.nodes().forEach(l=>{qu(i,s,n.node(l))}),{graph:n,buckets:i,zeroIdx:s}}function qu(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function DC(e){const t=[];for(let n=0;n<e;n++)t.push(n);return t}let y0=vt.Graph;var Ee={addBorderNode:XC,addDummyNode:v0,applyWithChunking:Zs,asNonCompoundGraph:FC,buildLayerMatrix:WC,intersectRect:BC,mapValues:eM,maxRank:x0,normalizeRanks:UC,notime:ZC,partition:QC,pick:JC,predecessorWeights:HC,range:_0,removeEmptyRanks:YC,simplify:jC,successorWeights:VC,time:KC,uniqueId:E0,zipObject:hc};function v0(e,t,n,r){for(var o=r;e.hasNode(o);)o=E0(r);return n.dummy=t,e.setNode(o,n),o}function jC(e){let t=new y0().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),t}function FC(e){let t=new y0({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function VC(e){let t=e.nodes().map(n=>{let r={};return e.outEdges(n).forEach(o=>{r[o.w]=(r[o.w]||0)+e.edge(o).weight}),r});return hc(e.nodes(),t)}function HC(e){let t=e.nodes().map(n=>{let r={};return e.inEdges(n).forEach(o=>{r[o.v]=(r[o.v]||0)+e.edge(o).weight}),r});return hc(e.nodes(),t)}function BC(e,t){let n=e.x,r=e.y,o=t.x-n,i=t.y-r,s=e.width/2,l=e.height/2;if(!o&&!i)throw new Error("Not possible to find intersection inside of the rectangle");let u,a;return Math.abs(i)*s>Math.abs(o)*l?(i<0&&(l=-l),u=l*o/i,a=l):(o<0&&(s=-s),u=s,a=s*i/o),{x:n+u,y:r+a}}function WC(e){let t=_0(x0(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),o=r.rank;o!==void 0&&(t[o][r.order]=n)}),t}function UC(e){let t=e.nodes().map(r=>{let o=e.node(r).rank;return o===void 0?Number.MAX_VALUE:o}),n=Zs(Math.min,t);e.nodes().forEach(r=>{let o=e.node(r);Object.hasOwn(o,"rank")&&(o.rank-=n)})}function YC(e){let t=e.nodes().map(s=>e.node(s).rank),n=Zs(Math.min,t),r=[];e.nodes().forEach(s=>{let l=e.node(s).rank-n;r[l]||(r[l]=[]),r[l].push(s)});let o=0,i=e.graph().nodeRankFactor;Array.from(r).forEach((s,l)=>{s===void 0&&l%i!==0?--o:s!==void 0&&o&&s.forEach(u=>e.node(u).rank+=o)})}function XC(e,t,n,r){let o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),v0(e,"border",o,t)}function GC(e,t=w0){const n=[];for(let r=0;r<e.length;r+=t){const o=e.slice(r,r+t);n.push(o)}return n}const w0=65535;function Zs(e,t){if(t.length>w0){const n=GC(t);return e.apply(null,n.map(r=>e.apply(null,r)))}else return e.apply(null,t)}function x0(e){const n=e.nodes().map(r=>{let o=e.node(r).rank;return o===void 0?Number.MIN_VALUE:o});return Zs(Math.max,n)}function QC(e,t){let n={lhs:[],rhs:[]};return e.forEach(r=>{t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function KC(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}}function ZC(e,t){return t()}let qC=0;function E0(e){var t=++qC;return e+(""+t)}function _0(e,t,n=1){t==null&&(t=e,e=0);let r=i=>i<t;n<0&&(r=i=>t<i);const o=[];for(let i=e;r(i);i+=n)o.push(i);return o}function JC(e,t){const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function eM(e,t){let n=t;return typeof t=="string"&&(n=r=>r[t]),Object.entries(e).reduce((r,[o,i])=>(r[o]=n(i,o),r),{})}function hc(e,t){return e.reduce((n,r,o)=>(n[r]=t[o],n),{})}let tM=bC,nM=Ee.uniqueId;var rM={run:oM,undo:sM};function oM(e){(e.graph().acyclicer==="greedy"?tM(e,n(e)):iM(e)).forEach(r=>{let o=e.edge(r);e.removeEdge(r),o.forwardName=r.name,o.reversed=!0,e.setEdge(r.w,r.v,o,nM("rev"))});function n(r){return o=>r.edge(o).weight}}function iM(e){let t=[],n={},r={};function o(i){Object.hasOwn(r,i)||(r[i]=!0,n[i]=!0,e.outEdges(i).forEach(s=>{Object.hasOwn(n,s.w)?t.push(s):o(s.w)}),delete n[i])}return e.nodes().forEach(o),t}function sM(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}let lM=Ee;var uM={run:aM,undo:fM};function aM(e){e.graph().dummyChains=[],e.edges().forEach(t=>cM(e,t))}function cM(e,t){let n=t.v,r=e.node(n).rank,o=t.w,i=e.node(o).rank,s=t.name,l=e.edge(t),u=l.labelRank;if(i===r+1)return;e.removeEdge(t);let a,f,c;for(c=0,++r;r<i;++c,++r)l.points=[],f={width:0,height:0,edgeLabel:l,edgeObj:t,rank:r},a=lM.addDummyNode(e,"edge",f,"_d"),r===u&&(f.width=l.width,f.height=l.height,f.dummy="edge-label",f.labelpos=l.labelpos),e.setEdge(n,a,{weight:l.weight},s),c===0&&e.graph().dummyChains.push(a),n=a;e.setEdge(n,o,{weight:l.weight},s)}function fM(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,o;for(e.setEdge(n.edgeObj,r);n.dummy;)o=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=o,n=e.node(t)})}const{applyWithChunking:dM}=Ee;var qs={longestPath:hM,slack:pM};function hM(e){var t={};function n(r){var o=e.node(r);if(Object.hasOwn(t,r))return o.rank;t[r]=!0;let i=e.outEdges(r).map(l=>l==null?Number.POSITIVE_INFINITY:n(l.w)-e.edge(l).minlen);var s=dM(Math.min,i);return s===Number.POSITIVE_INFINITY&&(s=0),o.rank=s}e.sources().forEach(n)}function pM(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var gM=vt.Graph,xs=qs.slack,S0=mM;function mM(e){var t=new gM({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var o,i;yM(t,e)<r;)o=vM(t,e),i=t.hasNode(o.v)?xs(e,o):-xs(e,o),wM(t,e,i);return t}function yM(e,t){function n(r){t.nodeEdges(r).forEach(o=>{var i=o.v,s=r===i?o.w:i;!e.hasNode(s)&&!xs(t,o)&&(e.setNode(s,{}),e.setEdge(r,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function vM(e,t){return t.edges().reduce((r,o)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(i=xs(t,o)),i<r[0]?[i,o]:r},[Number.POSITIVE_INFINITY,null])[1]}function wM(e,t,n){e.nodes().forEach(r=>t.node(r).rank+=n)}var xM=S0,Hd=qs.slack,EM=qs.longestPath,_M=vt.alg.preorder,SM=vt.alg.postorder,kM=Ee.simplify,NM=Vn;Vn.initLowLimValues=gc;Vn.initCutValues=pc;Vn.calcCutValue=k0;Vn.leaveEdge=C0;Vn.enterEdge=M0;Vn.exchangeEdges=I0;function Vn(e){e=kM(e),EM(e);var t=xM(e);gc(t),pc(t,e);for(var n,r;n=C0(t);)r=M0(t,e,n),I0(t,e,n,r)}function pc(e,t){var n=SM(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(r=>CM(e,t,r))}function CM(e,t,n){var r=e.node(n),o=r.parent;e.edge(n,o).cutvalue=k0(e,t,n)}function k0(e,t,n){var r=e.node(n),o=r.parent,i=!0,s=t.edge(n,o),l=0;return s||(i=!1,s=t.edge(o,n)),l=s.weight,t.nodeEdges(n).forEach(u=>{var a=u.v===n,f=a?u.w:u.v;if(f!==o){var c=a===i,d=t.edge(u).weight;if(l+=c?d:-d,IM(e,n,f)){var g=e.edge(n,f).cutvalue;l+=c?-g:g}}}),l}function gc(e,t){arguments.length<2&&(t=e.nodes()[0]),N0(e,{},1,t)}function N0(e,t,n,r,o){var i=n,s=e.node(r);return t[r]=!0,e.neighbors(r).forEach(l=>{Object.hasOwn(t,l)||(n=N0(e,t,n,l,r))}),s.low=i,s.lim=n++,o?s.parent=o:delete s.parent,n}function C0(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function M0(e,t,n){var r=n.v,o=n.w;t.hasEdge(r,o)||(r=n.w,o=n.v);var i=e.node(r),s=e.node(o),l=i,u=!1;i.lim>s.lim&&(l=s,u=!0);var a=t.edges().filter(f=>u===Bd(e,e.node(f.v),l)&&u!==Bd(e,e.node(f.w),l));return a.reduce((f,c)=>Hd(t,c)<Hd(t,f)?c:f)}function I0(e,t,n,r){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),gc(e),pc(e,t),MM(e,t)}function MM(e,t){var n=e.nodes().find(o=>!t.node(o).parent),r=_M(e,n);r=r.slice(1),r.forEach(o=>{var i=e.node(o).parent,s=t.edge(o,i),l=!1;s||(s=t.edge(i,o),l=!0),t.node(o).rank=t.node(i).rank+(l?s.minlen:-s.minlen)})}function IM(e,t,n){return e.hasEdge(t,n)}function Bd(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var PM=qs,P0=PM.longestPath,TM=S0,LM=NM,zM=bM;function bM(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case"network-simplex":Wd(e);break;case"tight-tree":OM(e);break;case"longest-path":RM(e);break;case"none":break;default:Wd(e)}}var RM=P0;function OM(e){P0(e),TM(e)}function Wd(e){LM(e)}var $M=AM;function AM(e){let t=jM(e);e.graph().dummyChains.forEach(n=>{let r=e.node(n),o=r.edgeObj,i=DM(e,t,o.v,o.w),s=i.path,l=i.lca,u=0,a=s[u],f=!0;for(;n!==o.w;){if(r=e.node(n),f){for(;(a=s[u])!==l&&e.node(a).maxRank<r.rank;)u++;a===l&&(f=!1)}if(!f){for(;u<s.length-1&&e.node(a=s[u+1]).minRank<=r.rank;)u++;a=s[u]}e.setParent(n,a),n=e.successors(n)[0]}})}function DM(e,t,n,r){let o=[],i=[],s=Math.min(t[n].low,t[r].low),l=Math.max(t[n].lim,t[r].lim),u,a;u=n;do u=e.parent(u),o.push(u);while(u&&(t[u].low>s||l>t[u].lim));for(a=u,u=r;(u=e.parent(u))!==a;)i.push(u);return{path:o.concat(i.reverse()),lca:a}}function jM(e){let t={},n=0;function r(o){let i=n;e.children(o).forEach(r),t[o]={low:i,lim:n++}}return e.children().forEach(r),t}let Es=Ee;var FM={run:VM,cleanup:WM};function VM(e){let t=Es.addDummyNode(e,"root",{},"_root"),n=HM(e),r=Object.values(n),o=Es.applyWithChunking(Math.max,r)-1,i=2*o+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=i);let s=BM(e)+1;e.children().forEach(l=>T0(e,t,i,s,o,n,l)),e.graph().nodeRankFactor=i}function T0(e,t,n,r,o,i,s){let l=e.children(s);if(!l.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:n});return}let u=Es.addBorderNode(e,"_bt"),a=Es.addBorderNode(e,"_bb"),f=e.node(s);e.setParent(u,s),f.borderTop=u,e.setParent(a,s),f.borderBottom=a,l.forEach(c=>{T0(e,t,n,r,o,i,c);let d=e.node(c),g=d.borderTop?d.borderTop:c,m=d.borderBottom?d.borderBottom:c,w=d.borderTop?r:2*r,x=g!==m?1:o-i[s]+1;e.setEdge(u,g,{weight:w,minlen:x,nestingEdge:!0}),e.setEdge(m,a,{weight:w,minlen:x,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,u,{weight:0,minlen:o+i[s]})}function HM(e){var t={};function n(r,o){var i=e.children(r);i&&i.length&&i.forEach(s=>n(s,o+1)),t[r]=o}return e.children().forEach(r=>n(r,1)),t}function BM(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function WM(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(n=>{var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}let UM=Ee;var YM=XM;function XM(e){function t(n){let r=e.children(n),o=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(let i=o.minRank,s=o.maxRank+1;i<s;++i)Ud(e,"borderLeft","_bl",n,o,i),Ud(e,"borderRight","_br",n,o,i)}}e.children().forEach(t)}function Ud(e,t,n,r,o,i){let s={width:0,height:0,rank:i,borderType:t},l=o[t][i-1],u=UM.addDummyNode(e,"border",s,n);o[t][i]=u,e.setParent(u,r),l&&e.setEdge(l,u,{weight:1})}var GM={adjust:QM,undo:KM};function QM(e){let t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&L0(e)}function KM(e){let t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&ZM(e),(t==="lr"||t==="rl")&&(qM(e),L0(e))}function L0(e){e.nodes().forEach(t=>Yd(e.node(t))),e.edges().forEach(t=>Yd(e.edge(t)))}function Yd(e){let t=e.width;e.width=e.height,e.height=t}function ZM(e){e.nodes().forEach(t=>Fl(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(Fl),Object.hasOwn(n,"y")&&Fl(n)})}function Fl(e){e.y=-e.y}function qM(e){e.nodes().forEach(t=>Vl(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(Vl),Object.hasOwn(n,"x")&&Vl(n)})}function Vl(e){let t=e.x;e.x=e.y,e.y=t}let Xd=Ee;var JM=e3;function e3(e){let t={},n=e.nodes().filter(u=>!e.children(u).length),r=n.map(u=>e.node(u).rank),o=Xd.applyWithChunking(Math.max,r),i=Xd.range(o+1).map(()=>[]);function s(u){if(t[u])return;t[u]=!0;let a=e.node(u);i[a.rank].push(u),e.successors(u).forEach(s)}return n.sort((u,a)=>e.node(u).rank-e.node(a).rank).forEach(s),i}let t3=Ee.zipObject;var n3=r3;function r3(e,t){let n=0;for(let r=1;r<t.length;++r)n+=o3(e,t[r-1],t[r]);return n}function o3(e,t,n){let r=t3(n,n.map((a,f)=>f)),o=t.flatMap(a=>e.outEdges(a).map(f=>({pos:r[f.w],weight:e.edge(f).weight})).sort((f,c)=>f.pos-c.pos)),i=1;for(;i<n.length;)i<<=1;let s=2*i-1;i-=1;let l=new Array(s).fill(0),u=0;return o.forEach(a=>{let f=a.pos+i;l[f]+=a.weight;let c=0;for(;f>0;)f%2&&(c+=l[f+1]),f=f-1>>1,l[f]+=a.weight;u+=a.weight*c}),u}var i3=s3;function s3(e,t=[]){return t.map(n=>{let r=e.inEdges(n);if(r.length){let o=r.reduce((i,s)=>{let l=e.edge(s),u=e.node(s.v);return{sum:i.sum+l.weight*u.order,weight:i.weight+l.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:n}})}let l3=Ee;var u3=a3;function a3(e,t){let n={};e.forEach((o,i)=>{let s=n[o.v]={indegree:0,in:[],out:[],vs:[o.v],i};o.barycenter!==void 0&&(s.barycenter=o.barycenter,s.weight=o.weight)}),t.edges().forEach(o=>{let i=n[o.v],s=n[o.w];i!==void 0&&s!==void 0&&(s.indegree++,i.out.push(n[o.w]))});let r=Object.values(n).filter(o=>!o.indegree);return c3(r)}function c3(e){let t=[];function n(o){return i=>{i.merged||(i.barycenter===void 0||o.barycenter===void 0||i.barycenter>=o.barycenter)&&f3(o,i)}}function r(o){return i=>{i.in.push(o),--i.indegree===0&&e.push(i)}}for(;e.length;){let o=e.pop();t.push(o),o.in.reverse().forEach(n(o)),o.out.forEach(r(o))}return t.filter(o=>!o.merged).map(o=>l3.pick(o,["vs","i","barycenter","weight"]))}function f3(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}let d3=Ee;var h3=p3;function p3(e,t){let n=d3.partition(e,f=>Object.hasOwn(f,"barycenter")),r=n.lhs,o=n.rhs.sort((f,c)=>c.i-f.i),i=[],s=0,l=0,u=0;r.sort(g3(!!t)),u=Gd(i,o,u),r.forEach(f=>{u+=f.vs.length,i.push(f.vs),s+=f.barycenter*f.weight,l+=f.weight,u=Gd(i,o,u)});let a={vs:i.flat(!0)};return l&&(a.barycenter=s/l,a.weight=l),a}function Gd(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function g3(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}let m3=i3,y3=u3,v3=h3;var w3=z0;function z0(e,t,n,r){let o=e.children(t),i=e.node(t),s=i?i.borderLeft:void 0,l=i?i.borderRight:void 0,u={};s&&(o=o.filter(d=>d!==s&&d!==l));let a=m3(e,o);a.forEach(d=>{if(e.children(d.v).length){let g=z0(e,d.v,n,r);u[d.v]=g,Object.hasOwn(g,"barycenter")&&E3(d,g)}});let f=y3(a,n);x3(f,u);let c=v3(f,r);if(s&&(c.vs=[s,c.vs,l].flat(!0),e.predecessors(s).length)){let d=e.node(e.predecessors(s)[0]),g=e.node(e.predecessors(l)[0]);Object.hasOwn(c,"barycenter")||(c.barycenter=0,c.weight=0),c.barycenter=(c.barycenter*c.weight+d.order+g.order)/(c.weight+2),c.weight+=2}return c}function x3(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(r=>t[r]?t[r].vs:r)})}function E3(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}let _3=vt.Graph,S3=Ee;var k3=N3;function N3(e,t,n,r){r||(r=e.nodes());let o=C3(e),i=new _3({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(s=>e.node(s));return r.forEach(s=>{let l=e.node(s),u=e.parent(s);(l.rank===t||l.minRank<=t&&t<=l.maxRank)&&(i.setNode(s),i.setParent(s,u||o),e[n](s).forEach(a=>{let f=a.v===s?a.w:a.v,c=i.edge(f,s),d=c!==void 0?c.weight:0;i.setEdge(f,s,{weight:e.edge(a).weight+d})}),Object.hasOwn(l,"minRank")&&i.setNode(s,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]}))}),i}function C3(e){for(var t;e.hasNode(t=S3.uniqueId("_root")););return t}var M3=I3;function I3(e,t,n){let r={},o;n.forEach(i=>{let s=e.parent(i),l,u;for(;s;){if(l=e.parent(s),l?(u=r[l],r[l]=s):(u=o,o=s),u&&u!==s){t.setEdge(u,s);return}s=l}})}let P3=JM,T3=n3,L3=w3,z3=k3,b3=M3,R3=vt.Graph,_i=Ee;var O3=b0;function b0(e,t){if(t&&typeof t.customOrder=="function"){t.customOrder(e,b0);return}let n=_i.maxRank(e),r=Qd(e,_i.range(1,n+1),"inEdges"),o=Qd(e,_i.range(n-1,-1,-1),"outEdges"),i=P3(e);if(Kd(e,i),t&&t.disableOptimalOrderHeuristic)return;let s=Number.POSITIVE_INFINITY,l;for(let u=0,a=0;a<4;++u,++a){$3(u%2?r:o,u%4>=2),i=_i.buildLayerMatrix(e);let f=T3(e,i);f<s&&(a=0,l=Object.assign({},i),s=f)}Kd(e,l)}function Qd(e,t,n){const r=new Map,o=(i,s)=>{r.has(i)||r.set(i,[]),r.get(i).push(s)};for(const i of e.nodes()){const s=e.node(i);if(typeof s.rank=="number"&&o(s.rank,i),typeof s.minRank=="number"&&typeof s.maxRank=="number")for(let l=s.minRank;l<=s.maxRank;l++)l!==s.rank&&o(l,i)}return t.map(function(i){return z3(e,i,n,r.get(i)||[])})}function $3(e,t){let n=new R3;e.forEach(function(r){let o=r.graph().root,i=L3(r,o,n,t);i.vs.forEach((s,l)=>r.node(s).order=l),b3(r,n,i.vs)})}function Kd(e,t){Object.values(t).forEach(n=>n.forEach((r,o)=>e.node(r).order=o))}let A3=vt.Graph,zt=Ee;var D3={positionX:Q3};function j3(e,t){let n={};function r(o,i){let s=0,l=0,u=o.length,a=i[i.length-1];return i.forEach((f,c)=>{let d=V3(e,f),g=d?e.node(d).order:u;(d||f===a)&&(i.slice(l,c+1).forEach(m=>{e.predecessors(m).forEach(w=>{let x=e.node(w),p=x.order;(p<s||g<p)&&!(x.dummy&&e.node(m).dummy)&&R0(n,w,m)})}),l=c+1,s=g)}),i}return t.length&&t.reduce(r),n}function F3(e,t){let n={};function r(i,s,l,u,a){let f;zt.range(s,l).forEach(c=>{f=i[c],e.node(f).dummy&&e.predecessors(f).forEach(d=>{let g=e.node(d);g.dummy&&(g.order<u||g.order>a)&&R0(n,d,f)})})}function o(i,s){let l=-1,u,a=0;return s.forEach((f,c)=>{if(e.node(f).dummy==="border"){let d=e.predecessors(f);d.length&&(u=e.node(d[0]).order,r(s,a,c,l,u),a=c,l=u)}r(s,a,s.length,u,i.length)}),s}return t.length&&t.reduce(o),n}function V3(e,t){if(e.node(t).dummy)return e.predecessors(t).find(n=>e.node(n).dummy)}function R0(e,t,n){if(t>n){let o=t;t=n,n=o}let r=e[t];r||(e[t]=r={}),r[n]=!0}function H3(e,t,n){if(t>n){let r=t;t=n,n=r}return!!e[t]&&Object.hasOwn(e[t],n)}function B3(e,t,n,r){let o={},i={},s={};return t.forEach(l=>{l.forEach((u,a)=>{o[u]=u,i[u]=u,s[u]=a})}),t.forEach(l=>{let u=-1;l.forEach(a=>{let f=r(a);if(f.length){f=f.sort((d,g)=>s[d]-s[g]);let c=(f.length-1)/2;for(let d=Math.floor(c),g=Math.ceil(c);d<=g;++d){let m=f[d];i[a]===a&&u<s[m]&&!H3(n,a,m)&&(i[m]=a,i[a]=o[a]=o[m],u=s[m])}}})}),{root:o,align:i}}function W3(e,t,n,r,o){let i={},s=U3(e,t,n,o),l=o?"borderLeft":"borderRight";function u(c,d){let g=s.nodes(),m=g.pop(),w={};for(;m;)w[m]?c(m):(w[m]=!0,g.push(m),g=g.concat(d(m))),m=g.pop()}function a(c){i[c]=s.inEdges(c).reduce((d,g)=>Math.max(d,i[g.v]+s.edge(g)),0)}function f(c){let d=s.outEdges(c).reduce((m,w)=>Math.min(m,i[w.w]-s.edge(w)),Number.POSITIVE_INFINITY),g=e.node(c);d!==Number.POSITIVE_INFINITY&&g.borderType!==l&&(i[c]=Math.max(i[c],d))}return u(a,s.predecessors.bind(s)),u(f,s.successors.bind(s)),Object.keys(r).forEach(c=>i[c]=i[n[c]]),i}function U3(e,t,n,r){let o=new A3,i=e.graph(),s=K3(i.nodesep,i.edgesep,r);return t.forEach(l=>{let u;l.forEach(a=>{let f=n[a];if(o.setNode(f),u){var c=n[u],d=o.edge(c,f);o.setEdge(c,f,Math.max(s(e,a,u),d||0))}u=a})}),o}function Y3(e,t){return Object.values(t).reduce((n,r)=>{let o=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(r).forEach(([l,u])=>{let a=Z3(e,l)/2;o=Math.max(u+a,o),i=Math.min(u-a,i)});const s=o-i;return s<n[0]&&(n=[s,r]),n},[Number.POSITIVE_INFINITY,null])[1]}function X3(e,t){let n=Object.values(t),r=zt.applyWithChunking(Math.min,n),o=zt.applyWithChunking(Math.max,n);["u","d"].forEach(i=>{["l","r"].forEach(s=>{let l=i+s,u=e[l];if(u===t)return;let a=Object.values(u),f=r-zt.applyWithChunking(Math.min,a);s!=="l"&&(f=o-zt.applyWithChunking(Math.max,a)),f&&(e[l]=zt.mapValues(u,c=>c+f))})})}function G3(e,t){return zt.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let o=Object.values(e).map(i=>i[r]).sort((i,s)=>i-s);return(o[1]+o[2])/2}})}function Q3(e){let t=zt.buildLayerMatrix(e),n=Object.assign(j3(e,t),F3(e,t)),r={},o;["u","d"].forEach(s=>{o=s==="u"?t:Object.values(t).reverse(),["l","r"].forEach(l=>{l==="r"&&(o=o.map(c=>Object.values(c).reverse()));let u=(s==="u"?e.predecessors:e.successors).bind(e),a=B3(e,o,n,u),f=W3(e,o,a.root,a.align,l==="r");l==="r"&&(f=zt.mapValues(f,c=>-c)),r[s+l]=f})});let i=Y3(e,r);return X3(r,i),G3(r,e.graph().align)}function K3(e,t,n){return(r,o,i)=>{let s=r.node(o),l=r.node(i),u=0,a;if(u+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=-s.width/2;break;case"r":a=s.width/2;break}if(a&&(u+=n?a:-a),a=0,u+=(s.dummy?t:e)/2,u+=(l.dummy?t:e)/2,u+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":a=l.width/2;break;case"r":a=-l.width/2;break}return a&&(u+=n?a:-a),a=0,u}}function Z3(e,t){return e.node(t).width}let O0=Ee,q3=D3.positionX;var J3=eI;function eI(e){e=O0.asNonCompoundGraph(e),tI(e),Object.entries(q3(e)).forEach(([t,n])=>e.node(t).x=n)}function tI(e){let t=O0.buildLayerMatrix(e),n=e.graph().ranksep,r=0;t.forEach(o=>{const i=o.reduce((s,l)=>{const u=e.node(l).height;return s>u?s:u},0);o.forEach(s=>e.node(s).y=r+i/2),r+=i+n})}let Zd=rM,qd=uM,nI=zM,rI=Ee.normalizeRanks,oI=$M,iI=Ee.removeEmptyRanks,Jd=FM,sI=YM,eh=GM,lI=O3,uI=J3,it=Ee,aI=vt.Graph;var cI=fI;function fI(e,t){let n=t&&t.debugTiming?it.time:it.notime;n("layout",()=>{let r=n(" buildLayoutGraph",()=>EI(e));n(" runLayout",()=>dI(r,n,t)),n(" updateInputGraph",()=>hI(e,r))})}function dI(e,t,n){t(" makeSpaceForEdgeLabels",()=>_I(e)),t(" removeSelfEdges",()=>LI(e)),t(" acyclic",()=>Zd.run(e)),t(" nestingGraph.run",()=>Jd.run(e)),t(" rank",()=>nI(it.asNonCompoundGraph(e))),t(" injectEdgeLabelProxies",()=>SI(e)),t(" removeEmptyRanks",()=>iI(e)),t(" nestingGraph.cleanup",()=>Jd.cleanup(e)),t(" normalizeRanks",()=>rI(e)),t(" assignRankMinMax",()=>kI(e)),t(" removeEdgeLabelProxies",()=>NI(e)),t(" normalize.run",()=>qd.run(e)),t(" parentDummyChains",()=>oI(e)),t(" addBorderSegments",()=>sI(e)),t(" order",()=>lI(e,n)),t(" insertSelfEdges",()=>zI(e)),t(" adjustCoordinateSystem",()=>eh.adjust(e)),t(" position",()=>uI(e)),t(" positionSelfEdges",()=>bI(e)),t(" removeBorderNodes",()=>TI(e)),t(" normalize.undo",()=>qd.undo(e)),t(" fixupEdgeLabelCoords",()=>II(e)),t(" undoCoordinateSystem",()=>eh.undo(e)),t(" translateGraph",()=>CI(e)),t(" assignNodeIntersects",()=>MI(e)),t(" reversePoints",()=>PI(e)),t(" acyclic.undo",()=>Zd.undo(e))}function hI(e,t){e.nodes().forEach(n=>{let r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,r.rank=o.rank,t.children(n).length&&(r.width=o.width,r.height=o.height))}),e.edges().forEach(n=>{let r=e.edge(n),o=t.edge(n);r.points=o.points,Object.hasOwn(o,"x")&&(r.x=o.x,r.y=o.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}let pI=["nodesep","edgesep","ranksep","marginx","marginy"],gI={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},mI=["acyclicer","ranker","rankdir","align"],yI=["width","height","rank"],th={width:0,height:0},vI=["minlen","weight","width","height","labeloffset"],wI={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},xI=["labelpos"];function EI(e){let t=new aI({multigraph:!0,compound:!0}),n=Bl(e.graph());return t.setGraph(Object.assign({},gI,Hl(n,pI),it.pick(n,mI))),e.nodes().forEach(r=>{let o=Bl(e.node(r));const i=Hl(o,yI);Object.keys(th).forEach(s=>{i[s]===void 0&&(i[s]=th[s])}),t.setNode(r,i),t.setParent(r,e.parent(r))}),e.edges().forEach(r=>{let o=Bl(e.edge(r));t.setEdge(r,Object.assign({},wI,Hl(o,vI),it.pick(o,xI)))}),t}function _I(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function SI(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let r=e.node(t.v),i={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};it.addDummyNode(e,"edge-proxy",i,"_ep")}})}function kI(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function NI(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function CI(e){let t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,o=0,i=e.graph(),s=i.marginx||0,l=i.marginy||0;function u(a){let f=a.x,c=a.y,d=a.width,g=a.height;t=Math.min(t,f-d/2),n=Math.max(n,f+d/2),r=Math.min(r,c-g/2),o=Math.max(o,c+g/2)}e.nodes().forEach(a=>u(e.node(a))),e.edges().forEach(a=>{let f=e.edge(a);Object.hasOwn(f,"x")&&u(f)}),t-=s,r-=l,e.nodes().forEach(a=>{let f=e.node(a);f.x-=t,f.y-=r}),e.edges().forEach(a=>{let f=e.edge(a);f.points.forEach(c=>{c.x-=t,c.y-=r}),Object.hasOwn(f,"x")&&(f.x-=t),Object.hasOwn(f,"y")&&(f.y-=r)}),i.width=n-t+s,i.height=o-r+l}function MI(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),o=e.node(t.w),i,s;n.points?(i=n.points[0],s=n.points[n.points.length-1]):(n.points=[],i=o,s=r),n.points.unshift(it.intersectRect(r,i)),n.points.push(it.intersectRect(o,s))})}function II(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function PI(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function TI(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),o=e.node(n.borderBottom),i=e.node(n.borderLeft[n.borderLeft.length-1]),s=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(s.x-i.x),n.height=Math.abs(o.y-r.y),n.x=i.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function LI(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function zI(e){var t=it.buildLayerMatrix(e);t.forEach(n=>{var r=0;n.forEach((o,i)=>{var s=e.node(o);s.order=i+r,(s.selfEdges||[]).forEach(l=>{it.addDummyNode(e,"selfedge",{width:l.label.width,height:l.label.height,rank:s.rank,order:i+ ++r,e:l.e,label:l.label},"_se")}),delete s.selfEdges})})}function bI(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,s=n.x-o,l=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*s/3,y:i-l},{x:o+5*s/6,y:i-l},{x:o+s,y:i},{x:o+5*s/6,y:i+l},{x:o+2*s/3,y:i+l}],n.label.x=n.x,n.label.y=n.y}})}function Hl(e,t){return it.mapValues(it.pick(e,t),Number)}function Bl(e){var t={};return e&&Object.entries(e).forEach(([n,r])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=r}),t}let RI=Ee,OI=vt.Graph;var $I={debugOrdering:AI};function AI(e){let t=RI.buildLayerMatrix(e),n=new OI({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(r=>{n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),e.edges().forEach(r=>n.setEdge(r.v,r.w,{},r.name)),t.forEach((r,o)=>{let i="layer"+o;n.setNode(i,{rank:"same"}),r.reduce((s,l)=>(n.setEdge(s,l,{style:"invis"}),l))}),n}var DI="1.1.8",jI={graphlib:vt,layout:cI,debug:$I,util:{time:Ee.time,notime:Ee.notime},version:DI};const nh=Ju(jI),rh=180,oh=90;function FI(e,t){const n=new nh.graphlib.Graph;n.setDefaultEdgeLabel(()=>({})),n.setGraph({rankdir:"TB",ranksep:80,nodesep:60});for(const r of e)n.setNode(r.id,{width:rh,height:oh});for(const r of t)n.setEdge(r.source,r.target);return nh.layout(n),e.map(r=>{const o=n.node(r.id);return{...r,position:{x:o.x-rh/2,y:o.y-oh/2}}})}const VI={component:zN,context:bN};function HI(e,t){return e.nodes.map((n,r)=>({id:n.id,type:n.type,position:{x:r%5*220,y:Math.floor(r/5)*160},data:{label:n.label,file:n.file,stateSlots:n.stateSlots,isContextProvider:n.isContextProvider,renderCount:t.renderCounts[n.id]??0,isRecentlyRendered:t.recentlyRendered.has(n.id)}}))}function BI(e){return e.edges.map(t=>{const n=t.type==="context-subscription",r=t.type==="context-provision",o=n?"#818cf8":r?"#a78bfa":"#334155";return{id:t.id,source:t.source,target:t.target,type:"smoothstep",animated:n||r,style:{stroke:o,strokeWidth:n||r?2:1.5},markerEnd:{type:bo.ArrowClosed,color:o}}})}function WI(){const[e,t]=O.useState(null),[n,r]=O.useState(null),[o,i]=O.useState({renderCounts:{},recentlyRendered:new Set}),[s,l,u]=nN([]),[a,f,c]=rN([]),d=O.useRef(null),g=O.useCallback(x=>f(p=>fm(x,p)),[f]);O.useEffect(()=>{let x=!1,p=500;function y(h){fetch("/api/graph").then(v=>{if(!v.ok)throw new Error(`HTTP ${v.status}`);return v.json()}).then(v=>{x||t(v)}).catch(()=>{if(!x){if(h>=6){r("Could not reach CLI server after multiple retries");return}setTimeout(()=>y(h+1),p),p=Math.min(p*2,8e3)}})}return y(0),()=>{x=!0}},[]),O.useEffect(()=>{if(!e)return;const p=HI(e,{renderCounts:{},recentlyRendered:new Set}),y=BI(e),h=FI(p,y);l(h),f(y),requestAnimationFrame(()=>{var v;(v=d.current)==null||v.fitView({padding:.15,duration:400})})},[e,l,f]),O.useEffect(()=>{e&&l(x=>x.map(p=>({...p,data:{...p.data,renderCount:o.renderCounts[p.id]??0,isRecentlyRendered:o.recentlyRendered.has(p.id)}})))},[o,e,l]);const m=O.useCallback(x=>{i(x)},[]),w=O.useCallback(x=>{t(x)},[]);return $N(m,w),n?I.jsxs("div",{style:{color:"#f87171",fontFamily:"monospace",padding:32,background:"#0f1117",height:"100%"},children:[I.jsx("div",{style:{fontSize:16,marginBottom:8},children:"Failed to load graph"}),I.jsx("div",{style:{color:"#64748b",fontSize:13},children:n}),I.jsxs("div",{style:{color:"#64748b",fontSize:12,marginTop:16},children:["Make sure the CLI server is running: ",I.jsx("code",{children:"npx react-state-flow ./src"})]})]}):e?I.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:[I.jsxs("div",{style:{flexShrink:0,zIndex:10,background:"#0f1117",borderBottom:"1px solid #1e2235",padding:"10px 16px",display:"flex",alignItems:"center",gap:12,fontFamily:"monospace"},children:[I.jsx("span",{style:{color:"#e2e8f0",fontWeight:700,fontSize:14},children:"React State Flow"}),I.jsx("span",{style:{color:"#334155",fontSize:12},children:"|"}),I.jsxs("span",{style:{color:"#64748b",fontSize:12},children:[e.nodes.length," nodes · ",e.edges.length," edges"]}),I.jsxs("div",{style:{marginLeft:"auto",display:"flex",gap:12,alignItems:"center",fontSize:11,color:"#64748b"},children:[I.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[I.jsx("span",{style:{width:8,height:8,borderRadius:999,background:"#334155",display:"inline-block"}}),"parent-child"]}),I.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[I.jsx("span",{style:{width:8,height:8,borderRadius:999,background:"#818cf8",display:"inline-block"}}),"context sub"]}),I.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[I.jsx("span",{style:{width:8,height:8,borderRadius:999,background:"#a78bfa",display:"inline-block"}}),"context provides"]}),I.jsxs("span",{style:{display:"flex",alignItems:"center",gap:4},children:[I.jsx("span",{style:{width:8,height:8,borderRadius:999,background:"#22c55e",display:"inline-block"}}),"re-render"]})]})]}),I.jsx("div",{style:{flex:1,minHeight:0},children:I.jsxs(tN,{nodes:s,edges:a,onNodesChange:u,onEdgesChange:c,onConnect:g,nodeTypes:VI,onInit:x=>{d.current=x},fitView:!0,fitViewOptions:{padding:.15,minZoom:.2},style:{background:"#0f1117",width:"100%",height:"100%"},children:[I.jsx(uN,{color:"#1e2235",gap:24}),I.jsx(gN,{style:{background:"#1a1d27",border:"1px solid #2e3348"}}),I.jsx(IN,{style:{background:"#1a1d27",border:"1px solid #2e3348"},nodeColor:x=>x.type==="context"?"#4338ca":"#334155"})]})})]}):I.jsx("div",{style:{color:"#64748b",fontFamily:"monospace",padding:32,background:"#0f1117",height:"100%"},children:"Loading graph..."})}function UI(){return I.jsx(s0,{children:I.jsx(WI,{})})}yg(document.getElementById("root")).render(I.jsx(O.StrictMode,{children:I.jsx(UI,{})}));