dbdocs 0.0.0__py3-none-any.whl

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 oP=Object.defineProperty;var iP=(bt,_t,Ot)=>_t in bt?oP(bt,_t,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):bt[_t]=Ot;var Se=(bt,_t,Ot)=>iP(bt,typeof _t!="symbol"?_t+"":_t,Ot);(function(){"use strict";function bt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _t={exports:{}},Ot={},wc={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 Hr=Symbol.for("react.element"),R0=Symbol.for("react.portal"),A0=Symbol.for("react.fragment"),D0=Symbol.for("react.strict_mode"),j0=Symbol.for("react.profiler"),F0=Symbol.for("react.provider"),V0=Symbol.for("react.context"),H0=Symbol.for("react.forward_ref"),B0=Symbol.for("react.suspense"),W0=Symbol.for("react.memo"),U0=Symbol.for("react.lazy"),xc=Symbol.iterator;function Y0(e){return e===null||typeof e!="object"?null:(e=xc&&e[xc]||e["@@iterator"],typeof e=="function"?e:null)}var Ec={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_c=Object.assign,Sc={};function Jn(e,t,n){this.props=e,this.context=t,this.refs=Sc,this.updater=n||Ec}Jn.prototype.isReactComponent={},Jn.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")},Jn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function kc(){}kc.prototype=Jn.prototype;function rl(e,t,n){this.props=e,this.context=t,this.refs=Sc,this.updater=n||Ec}var ol=rl.prototype=new kc;ol.constructor=rl,_c(ol,Jn.prototype),ol.isPureReactComponent=!0;var Nc=Array.isArray,Cc=Object.prototype.hasOwnProperty,il={current:null},Mc={key:!0,ref:!0,__self:!0,__source:!0};function Ic(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)Cc.call(t,r)&&!Mc.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:Hr,type:e,key:i,ref:s,props:o,_owner:il.current}}function X0(e,t){return{$$typeof:Hr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function sl(e){return typeof e=="object"&&e!==null&&e.$$typeof===Hr}function G0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Pc=/\/+/g;function ll(e,t){return typeof e=="object"&&e!==null&&e.key!=null?G0(""+e.key):t.toString(36)}function ei(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 Hr:case R0:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+ll(s,0):r,Nc(o)?(n="",e!=null&&(n=e.replace(Pc,"$&/")+"/"),ei(o,t,n,"",function(a){return a})):o!=null&&(sl(o)&&(o=X0(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Pc,"$&/")+"/")+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+ll(i,l);s+=ei(i,t,n,u,o)}else if(u=Y0(e),typeof u=="function")for(e=u.call(e),l=0;!(i=e.next()).done;)i=i.value,u=r+ll(i,l++),s+=ei(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 ti(e,t,n){if(e==null)return e;var r=[],o=0;return ei(e,r,"","",function(i){return t.call(n,i,o++)}),r}function Q0(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 Oe={current:null},ni={transition:null},K0={ReactCurrentDispatcher:Oe,ReactCurrentBatchConfig:ni,ReactCurrentOwner:il};function Lc(){throw Error("act(...) is not supported in production builds of React.")}te.Children={map:ti,forEach:function(e,t,n){ti(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ti(e,function(){t++}),t},toArray:function(e){return ti(e,function(t){return t})||[]},only:function(e){if(!sl(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},te.Component=Jn,te.Fragment=A0,te.Profiler=j0,te.PureComponent=rl,te.StrictMode=D0,te.Suspense=B0,te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K0,te.act=Lc,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=_c({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=il.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)Cc.call(t,u)&&!Mc.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:Hr,type:e.type,key:o,ref:i,props:r,_owner:s}},te.createContext=function(e){return e={$$typeof:V0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:F0,_context:e},e.Consumer=e},te.createElement=Ic,te.createFactory=function(e){var t=Ic.bind(null,e);return t.type=e,t},te.createRef=function(){return{current:null}},te.forwardRef=function(e){return{$$typeof:H0,render:e}},te.isValidElement=sl,te.lazy=function(e){return{$$typeof:U0,_payload:{_status:-1,_result:e},_init:Q0}},te.memo=function(e,t){return{$$typeof:W0,type:e,compare:t===void 0?null:t}},te.startTransition=function(e){var t=ni.transition;ni.transition={};try{e()}finally{ni.transition=t}},te.unstable_act=Lc,te.useCallback=function(e,t){return Oe.current.useCallback(e,t)},te.useContext=function(e){return Oe.current.useContext(e)},te.useDebugValue=function(){},te.useDeferredValue=function(e){return Oe.current.useDeferredValue(e)},te.useEffect=function(e,t){return Oe.current.useEffect(e,t)},te.useId=function(){return Oe.current.useId()},te.useImperativeHandle=function(e,t,n){return Oe.current.useImperativeHandle(e,t,n)},te.useInsertionEffect=function(e,t){return Oe.current.useInsertionEffect(e,t)},te.useLayoutEffect=function(e,t){return Oe.current.useLayoutEffect(e,t)},te.useMemo=function(e,t){return Oe.current.useMemo(e,t)},te.useReducer=function(e,t,n){return Oe.current.useReducer(e,t,n)},te.useRef=function(e){return Oe.current.useRef(e)},te.useState=function(e){return Oe.current.useState(e)},te.useSyncExternalStore=function(e,t,n){return Oe.current.useSyncExternalStore(e,t,n)},te.useTransition=function(){return Oe.current.useTransition()},te.version="18.3.1",wc.exports=te;var A=wc.exports;const Z0=bt(A);/**
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 q0=A,J0=Symbol.for("react.element"),ey=Symbol.for("react.fragment"),ty=Object.prototype.hasOwnProperty,ny=q0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ry={key:!0,ref:!0,__self:!0,__source:!0};function Tc(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)ty.call(t,r)&&!ry.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:J0,type:e,key:i,ref:s,props:o,_owner:ny.current}}Ot.Fragment=ey,Ot.jsx=Tc,Ot.jsxs=Tc,_t.exports=Ot;var L=_t.exports,$c={exports:{}},Ue={},zc={exports:{}},bc={};/**
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(M,N){var R=M.length;M.push(N);e:for(;0<R;){var j=R-1>>>1,D=M[j];if(0<o(D,N))M[j]=N,M[R]=D,R=j;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var N=M[0],R=M.pop();if(R!==N){M[0]=R;e:for(var j=0,D=M.length,W=D>>>1;j<W;){var U=2*(j+1)-1,Z=M[U],q=U+1,G=M[q];if(0>o(Z,R))q<D&&0>o(G,Z)?(M[j]=G,M[q]=R,j=q):(M[j]=Z,M[U]=R,j=U);else if(q<D&&0>o(G,R))M[j]=G,M[q]=R,j=q;else break e}}return N}function o(M,N){var R=M.sortIndex-N.sortIndex;return R!==0?R:M.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=[],c=1,f=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(M){for(var N=n(a);N!==null;){if(N.callback===null)r(a);else if(N.startTime<=M)r(a),N.sortIndex=N.expirationTime,t(u,N);else break;N=n(a)}}function v(M){if(w=!1,h(M),!m)if(n(u)!==null)m=!0,I(_);else{var N=n(a);N!==null&&O(v,N.startTime-M)}}function _(M,N){m=!1,w&&(w=!1,p(C),C=-1),g=!0;var R=d;try{for(h(N),f=n(u);f!==null&&(!(f.expirationTime>N)||M&&!P());){var j=f.callback;if(typeof j=="function"){f.callback=null,d=f.priorityLevel;var D=j(f.expirationTime<=N);N=e.unstable_now(),typeof D=="function"?f.callback=D:f===n(u)&&r(u),h(N)}else r(u);f=n(u)}if(f!==null)var W=!0;else{var U=n(a);U!==null&&O(v,U.startTime-N),W=!1}return W}finally{f=null,d=R,g=!1}}var S=!1,k=null,C=-1,$=5,b=-1;function P(){return!(e.unstable_now()-b<$)}function z(){if(k!==null){var M=e.unstable_now();b=M;var N=!0;try{N=k(!0,M)}finally{N?F():(S=!1,k=null)}}else S=!1}var F;if(typeof y=="function")F=function(){y(z)};else if(typeof MessageChannel<"u"){var E=new MessageChannel,T=E.port2;E.port1.onmessage=z,F=function(){T.postMessage(null)}}else F=function(){x(z,0)};function I(M){k=M,S||(S=!0,F())}function O(M,N){C=x(function(){M(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(M){M.callback=null},e.unstable_continueExecution=function(){m||g||(m=!0,I(_))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(M){switch(d){case 1:case 2:case 3:var N=3;break;default:N=d}var R=d;d=N;try{return M()}finally{d=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,N){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var R=d;d=M;try{return N()}finally{d=R}},e.unstable_scheduleCallback=function(M,N,R){var j=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?j+R:j):R=j,M){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=R+D,M={id:c++,callback:N,priorityLevel:M,startTime:R,expirationTime:D,sortIndex:-1},R>j?(M.sortIndex=R,t(a,M),n(u)===null&&M===n(a)&&(w?(p(C),C=-1):w=!0,O(v,R-j))):(M.sortIndex=D,t(u,M),m||g||(m=!0,I(_))),M},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(M){var N=d;return function(){var R=d;d=N;try{return M.apply(this,arguments)}finally{d=R}}}})(bc),zc.exports=bc;var oy=zc.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 iy=A,Ye=oy;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Oc=new Set,Br={};function Nn(e,t){er(e,t),er(e+"Capture",t)}function er(e,t){for(Br[e]=t,e=0;e<t.length;e++)Oc.add(t[e])}var Rt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ul=Object.prototype.hasOwnProperty,sy=/^[: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]*$/,Rc={},Ac={};function ly(e){return ul.call(Ac,e)?!0:ul.call(Rc,e)?!1:sy.test(e)?Ac[e]=!0:(Rc[e]=!0,!1)}function uy(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 ay(e,t,n,r){if(t===null||typeof t>"u"||uy(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 Re(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 Ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ie[e]=new Re(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ie[t]=new Re(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ie[e]=new Re(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ie[e]=new Re(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){Ie[e]=new Re(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Ie[e]=new Re(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Ie[e]=new Re(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Ie[e]=new Re(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Ie[e]=new Re(e,5,!1,e.toLowerCase(),null,!1,!1)});var al=/[\-:]([a-z])/g;function cl(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(al,cl);Ie[t]=new Re(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(al,cl);Ie[t]=new Re(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(al,cl);Ie[t]=new Re(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Ie[e]=new Re(e,1,!1,e.toLowerCase(),null,!1,!1)}),Ie.xlinkHref=new Re("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Ie[e]=new Re(e,1,!1,e.toLowerCase(),null,!0,!0)});function fl(e,t,n,r){var o=Ie.hasOwnProperty(t)?Ie[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ay(t,n,o,r)&&(n=null),r||o===null?ly(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 At=iy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ri=Symbol.for("react.element"),tr=Symbol.for("react.portal"),nr=Symbol.for("react.fragment"),dl=Symbol.for("react.strict_mode"),hl=Symbol.for("react.profiler"),Dc=Symbol.for("react.provider"),jc=Symbol.for("react.context"),pl=Symbol.for("react.forward_ref"),gl=Symbol.for("react.suspense"),ml=Symbol.for("react.suspense_list"),yl=Symbol.for("react.memo"),en=Symbol.for("react.lazy"),Fc=Symbol.for("react.offscreen"),Vc=Symbol.iterator;function Wr(e){return e===null||typeof e!="object"?null:(e=Vc&&e[Vc]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Object.assign,vl;function Ur(e){if(vl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);vl=t&&t[1]||""}return`
34
+ `+vl+e}var wl=!1;function xl(e,t){if(!e||wl)return"";wl=!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{wl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ur(e):""}function cy(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=xl(e.type,!1),e;case 11:return e=xl(e.type.render,!1),e;case 1:return e=xl(e.type,!0),e;default:return""}}function El(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 nr:return"Fragment";case tr:return"Portal";case hl:return"Profiler";case dl:return"StrictMode";case gl:return"Suspense";case ml:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case jc:return(e.displayName||"Context")+".Consumer";case Dc:return(e._context.displayName||"Context")+".Provider";case pl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yl:return t=e.displayName||null,t!==null?t:El(e.type)||"Memo";case en:t=e._payload,e=e._init;try{return El(e(t))}catch{}}return null}function fy(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 El(t);case 8:return t===dl?"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 tn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dy(e){var t=Hc(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 oi(e){e._valueTracker||(e._valueTracker=dy(e))}function Bc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ii(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 _l(e,t){var n=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Wc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=tn(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 Uc(e,t){t=t.checked,t!=null&&fl(e,"checked",t,!1)}function Sl(e,t){Uc(e,t);var n=tn(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")?kl(e,t.type,n):t.hasOwnProperty("defaultValue")&&kl(e,t.type,tn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yc(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 kl(e,t,n){(t!=="number"||ii(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Yr=Array.isArray;function rr(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=""+tn(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 Nl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return pe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Xc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(Yr(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:tn(n)}}function Gc(e,t){var n=tn(t.value),r=tn(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 Qc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Kc(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 Cl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Kc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var si,Zc=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(si=si||document.createElement("div"),si.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=si.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Xr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gr={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},hy=["Webkit","ms","Moz","O"];Object.keys(Gr).forEach(function(e){hy.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gr[t]=Gr[e]})});function qc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gr.hasOwnProperty(e)&&Gr[e]?(""+t).trim():t+"px"}function Jc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=qc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var py=pe({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 Ml(e,t){if(t){if(py[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function Il(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 Pl=null;function Ll(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tl=null,or=null,ir=null;function ef(e){if(e=yo(e)){if(typeof Tl!="function")throw Error(H(280));var t=e.stateNode;t&&(t=Pi(t),Tl(e.stateNode,e.type,t))}}function tf(e){or?ir?ir.push(e):ir=[e]:or=e}function nf(){if(or){var e=or,t=ir;if(ir=or=null,ef(e),t)for(e=0;e<t.length;e++)ef(t[e])}}function rf(e,t){return e(t)}function of(){}var $l=!1;function sf(e,t,n){if($l)return e(t,n);$l=!0;try{return rf(e,t,n)}finally{$l=!1,(or!==null||ir!==null)&&(of(),nf())}}function Qr(e,t){var n=e.stateNode;if(n===null)return null;var r=Pi(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(H(231,t,typeof n));return n}var zl=!1;if(Rt)try{var Kr={};Object.defineProperty(Kr,"passive",{get:function(){zl=!0}}),window.addEventListener("test",Kr,Kr),window.removeEventListener("test",Kr,Kr)}catch{zl=!1}function gy(e,t,n,r,o,i,s,l,u){var a=Array.prototype.slice.call(arguments,3);try{t.apply(n,a)}catch(c){this.onError(c)}}var Zr=!1,li=null,ui=!1,bl=null,my={onError:function(e){Zr=!0,li=e}};function yy(e,t,n,r,o,i,s,l,u){Zr=!1,li=null,gy.apply(my,arguments)}function vy(e,t,n,r,o,i,s,l,u){if(yy.apply(this,arguments),Zr){if(Zr){var a=li;Zr=!1,li=null}else throw Error(H(198));ui||(ui=!0,bl=a)}}function Cn(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 lf(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 uf(e){if(Cn(e)!==e)throw Error(H(188))}function wy(e){var t=e.alternate;if(!t){if(t=Cn(e),t===null)throw Error(H(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 uf(o),e;if(i===r)return uf(o),t;i=i.sibling}throw Error(H(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(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function af(e){return e=wy(e),e!==null?cf(e):null}function cf(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=cf(e);if(t!==null)return t;e=e.sibling}return null}var ff=Ye.unstable_scheduleCallback,df=Ye.unstable_cancelCallback,xy=Ye.unstable_shouldYield,Ey=Ye.unstable_requestPaint,ve=Ye.unstable_now,_y=Ye.unstable_getCurrentPriorityLevel,Ol=Ye.unstable_ImmediatePriority,hf=Ye.unstable_UserBlockingPriority,ai=Ye.unstable_NormalPriority,Sy=Ye.unstable_LowPriority,pf=Ye.unstable_IdlePriority,ci=null,St=null;function ky(e){if(St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(ci,e,void 0,(e.current.flags&128)===128)}catch{}}var lt=Math.clz32?Math.clz32:My,Ny=Math.log,Cy=Math.LN2;function My(e){return e>>>=0,e===0?32:31-(Ny(e)/Cy|0)|0}var fi=64,di=4194304;function qr(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 hi(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=qr(l):(i&=s,i!==0&&(r=qr(i)))}else s=n&~o,s!==0?r=qr(s):i!==0&&(r=qr(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-lt(t),o=1<<n,r|=e[n],t&=~o;return r}function Iy(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 Py(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-lt(i),l=1<<s,u=o[s];u===-1?(!(l&n)||l&r)&&(o[s]=Iy(l,t)):u<=t&&(e.expiredLanes|=l),i&=~l}}function Rl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function gf(){var e=fi;return fi<<=1,!(fi&4194240)&&(fi=64),e}function Al(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Jr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-lt(t),e[t]=n}function Ly(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-lt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Dl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-lt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var se=0;function mf(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var yf,jl,vf,wf,xf,Fl=!1,pi=[],nn=null,rn=null,on=null,eo=new Map,to=new Map,sn=[],Ty="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 Ef(e,t){switch(e){case"focusin":case"focusout":nn=null;break;case"dragenter":case"dragleave":rn=null;break;case"mouseover":case"mouseout":on=null;break;case"pointerover":case"pointerout":eo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":to.delete(t.pointerId)}}function no(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=yo(t),t!==null&&jl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function $y(e,t,n,r,o){switch(t){case"focusin":return nn=no(nn,e,t,n,r,o),!0;case"dragenter":return rn=no(rn,e,t,n,r,o),!0;case"mouseover":return on=no(on,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return eo.set(i,no(eo.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,to.set(i,no(to.get(i)||null,e,t,n,r,o)),!0}return!1}function _f(e){var t=Mn(e.target);if(t!==null){var n=Cn(t);if(n!==null){if(t=n.tag,t===13){if(t=lf(n),t!==null){e.blockedOn=t,xf(e.priority,function(){vf(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 gi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Hl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Pl=r,n.target.dispatchEvent(r),Pl=null}else return t=yo(n),t!==null&&jl(t),e.blockedOn=n,!1;t.shift()}return!0}function Sf(e,t,n){gi(e)&&n.delete(t)}function zy(){Fl=!1,nn!==null&&gi(nn)&&(nn=null),rn!==null&&gi(rn)&&(rn=null),on!==null&&gi(on)&&(on=null),eo.forEach(Sf),to.forEach(Sf)}function ro(e,t){e.blockedOn===t&&(e.blockedOn=null,Fl||(Fl=!0,Ye.unstable_scheduleCallback(Ye.unstable_NormalPriority,zy)))}function oo(e){function t(o){return ro(o,e)}if(0<pi.length){ro(pi[0],e);for(var n=1;n<pi.length;n++){var r=pi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(nn!==null&&ro(nn,e),rn!==null&&ro(rn,e),on!==null&&ro(on,e),eo.forEach(t),to.forEach(t),n=0;n<sn.length;n++)r=sn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<sn.length&&(n=sn[0],n.blockedOn===null);)_f(n),n.blockedOn===null&&sn.shift()}var sr=At.ReactCurrentBatchConfig,mi=!0;function by(e,t,n,r){var o=se,i=sr.transition;sr.transition=null;try{se=1,Vl(e,t,n,r)}finally{se=o,sr.transition=i}}function Oy(e,t,n,r){var o=se,i=sr.transition;sr.transition=null;try{se=4,Vl(e,t,n,r)}finally{se=o,sr.transition=i}}function Vl(e,t,n,r){if(mi){var o=Hl(e,t,n,r);if(o===null)iu(e,t,r,yi,n),Ef(e,r);else if($y(o,e,t,n,r))r.stopPropagation();else if(Ef(e,r),t&4&&-1<Ty.indexOf(e)){for(;o!==null;){var i=yo(o);if(i!==null&&yf(i),i=Hl(e,t,n,r),i===null&&iu(e,t,r,yi,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else iu(e,t,r,null,n)}}var yi=null;function Hl(e,t,n,r){if(yi=null,e=Ll(r),e=Mn(e),e!==null)if(t=Cn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=lf(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 kf(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(_y()){case Ol:return 1;case hf:return 4;case ai:case Sy:return 16;case pf:return 536870912;default:return 16}default:return 16}}var ln=null,Bl=null,vi=null;function Nf(){if(vi)return vi;var e,t=Bl,n=t.length,r,o="value"in ln?ln.value:ln.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 vi=o.slice(e,1<r?1-r:void 0)}function wi(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 xi(){return!0}function Cf(){return!1}function Xe(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)?xi:Cf,this.isPropagationStopped=Cf,this}return pe(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=xi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=xi)},persist:function(){},isPersistent:xi}),t}var lr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wl=Xe(lr),io=pe({},lr,{view:0,detail:0}),Ry=Xe(io),Ul,Yl,so,Ei=pe({},io,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gl,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!==so&&(so&&e.type==="mousemove"?(Ul=e.screenX-so.screenX,Yl=e.screenY-so.screenY):Yl=Ul=0,so=e),Ul)},movementY:function(e){return"movementY"in e?e.movementY:Yl}}),Mf=Xe(Ei),Ay=pe({},Ei,{dataTransfer:0}),Dy=Xe(Ay),jy=pe({},io,{relatedTarget:0}),Xl=Xe(jy),Fy=pe({},lr,{animationName:0,elapsedTime:0,pseudoElement:0}),Vy=Xe(Fy),Hy=pe({},lr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),By=Xe(Hy),Wy=pe({},lr,{data:0}),If=Xe(Wy),Uy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yy={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"},Xy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Xy[e])?!!t[e]:!1}function Gl(){return Gy}var Qy=pe({},io,{key:function(e){if(e.key){var t=Uy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=wi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Yy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gl,charCode:function(e){return e.type==="keypress"?wi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?wi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ky=Xe(Qy),Zy=pe({},Ei,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pf=Xe(Zy),qy=pe({},io,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gl}),Jy=Xe(qy),ev=pe({},lr,{propertyName:0,elapsedTime:0,pseudoElement:0}),tv=Xe(ev),nv=pe({},Ei,{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}),rv=Xe(nv),ov=[9,13,27,32],Ql=Rt&&"CompositionEvent"in window,lo=null;Rt&&"documentMode"in document&&(lo=document.documentMode);var iv=Rt&&"TextEvent"in window&&!lo,Lf=Rt&&(!Ql||lo&&8<lo&&11>=lo),Tf=" ",$f=!1;function zf(e,t){switch(e){case"keyup":return ov.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ur=!1;function sv(e,t){switch(e){case"compositionend":return bf(t);case"keypress":return t.which!==32?null:($f=!0,Tf);case"textInput":return e=t.data,e===Tf&&$f?null:e;default:return null}}function lv(e,t){if(ur)return e==="compositionend"||!Ql&&zf(e,t)?(e=Nf(),vi=Bl=ln=null,ur=!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 Lf&&t.locale!=="ko"?null:t.data;default:return null}}var uv={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 Of(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!uv[e.type]:t==="textarea"}function Rf(e,t,n,r){tf(r),t=Ci(t,"onChange"),0<t.length&&(n=new Wl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var uo=null,ao=null;function av(e){ed(e,0)}function _i(e){var t=hr(e);if(Bc(t))return e}function cv(e,t){if(e==="change")return t}var Af=!1;if(Rt){var Kl;if(Rt){var Zl="oninput"in document;if(!Zl){var Df=document.createElement("div");Df.setAttribute("oninput","return;"),Zl=typeof Df.oninput=="function"}Kl=Zl}else Kl=!1;Af=Kl&&(!document.documentMode||9<document.documentMode)}function jf(){uo&&(uo.detachEvent("onpropertychange",Ff),ao=uo=null)}function Ff(e){if(e.propertyName==="value"&&_i(ao)){var t=[];Rf(t,ao,e,Ll(e)),sf(av,t)}}function fv(e,t,n){e==="focusin"?(jf(),uo=t,ao=n,uo.attachEvent("onpropertychange",Ff)):e==="focusout"&&jf()}function dv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _i(ao)}function hv(e,t){if(e==="click")return _i(t)}function pv(e,t){if(e==="input"||e==="change")return _i(t)}function gv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ut=typeof Object.is=="function"?Object.is:gv;function co(e,t){if(ut(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(!ul.call(t,o)||!ut(e[o],t[o]))return!1}return!0}function Vf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hf(e,t){var n=Vf(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=Vf(n)}}function Bf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wf(){for(var e=window,t=ii();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ii(e.document)}return t}function ql(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 mv(e){var t=Wf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Bf(n.ownerDocument.documentElement,n)){if(r!==null&&ql(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=Hf(n,i);var s=Hf(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 yv=Rt&&"documentMode"in document&&11>=document.documentMode,ar=null,Jl=null,fo=null,eu=!1;function Uf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;eu||ar==null||ar!==ii(r)||(r=ar,"selectionStart"in r&&ql(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}),fo&&co(fo,r)||(fo=r,r=Ci(Jl,"onSelect"),0<r.length&&(t=new Wl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ar)))}function Si(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var cr={animationend:Si("Animation","AnimationEnd"),animationiteration:Si("Animation","AnimationIteration"),animationstart:Si("Animation","AnimationStart"),transitionend:Si("Transition","TransitionEnd")},tu={},Yf={};Rt&&(Yf=document.createElement("div").style,"AnimationEvent"in window||(delete cr.animationend.animation,delete cr.animationiteration.animation,delete cr.animationstart.animation),"TransitionEvent"in window||delete cr.transitionend.transition);function ki(e){if(tu[e])return tu[e];if(!cr[e])return e;var t=cr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Yf)return tu[e]=t[n];return e}var Xf=ki("animationend"),Gf=ki("animationiteration"),Qf=ki("animationstart"),Kf=ki("transitionend"),Zf=new Map,qf="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 un(e,t){Zf.set(e,t),Nn(t,[e])}for(var nu=0;nu<qf.length;nu++){var ru=qf[nu],vv=ru.toLowerCase(),wv=ru[0].toUpperCase()+ru.slice(1);un(vv,"on"+wv)}un(Xf,"onAnimationEnd"),un(Gf,"onAnimationIteration"),un(Qf,"onAnimationStart"),un("dblclick","onDoubleClick"),un("focusin","onFocus"),un("focusout","onBlur"),un(Kf,"onTransitionEnd"),er("onMouseEnter",["mouseout","mouseover"]),er("onMouseLeave",["mouseout","mouseover"]),er("onPointerEnter",["pointerout","pointerover"]),er("onPointerLeave",["pointerout","pointerover"]),Nn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Nn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Nn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Nn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ho="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(" "),xv=new Set("cancel close invalid load scroll toggle".split(" ").concat(ho));function Jf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,vy(r,t,void 0,e),e.currentTarget=null}function ed(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;Jf(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;Jf(o,l,a),i=u}}}if(ui)throw e=bl,ui=!1,bl=null,e}function ae(e,t){var n=t[fu];n===void 0&&(n=t[fu]=new Set);var r=e+"__bubble";n.has(r)||(td(t,e,2,!1),n.add(r))}function ou(e,t,n){var r=0;t&&(r|=4),td(n,e,r,t)}var Ni="_reactListening"+Math.random().toString(36).slice(2);function po(e){if(!e[Ni]){e[Ni]=!0,Oc.forEach(function(n){n!=="selectionchange"&&(xv.has(n)||ou(n,!1,e),ou(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ni]||(t[Ni]=!0,ou("selectionchange",!1,t))}}function td(e,t,n,r){switch(kf(t)){case 1:var o=by;break;case 4:o=Oy;break;default:o=Vl}n=o.bind(null,t,n,e),o=void 0,!zl||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 iu(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=Mn(l),s===null)return;if(u=s.tag,u===5||u===6){r=i=s;continue e}l=l.parentNode}}r=r.return}sf(function(){var a=i,c=Ll(n),f=[];e:{var d=Zf.get(e);if(d!==void 0){var g=Wl,m=e;switch(e){case"keypress":if(wi(n)===0)break e;case"keydown":case"keyup":g=Ky;break;case"focusin":m="focus",g=Xl;break;case"focusout":m="blur",g=Xl;break;case"beforeblur":case"afterblur":g=Xl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=Mf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Dy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=Jy;break;case Xf:case Gf:case Qf:g=Vy;break;case Kf:g=tv;break;case"scroll":g=Ry;break;case"wheel":g=rv;break;case"copy":case"cut":case"paste":g=By;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Pf}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=Qr(y,p),v!=null&&w.push(go(y,v,h)))),x)break;y=y.return}0<w.length&&(d=new g(d,m,null,n,c),f.push({event:d,listeners:w}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",d&&n!==Pl&&(m=n.relatedTarget||n.fromElement)&&(Mn(m)||m[Dt]))break e;if((g||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,g?(m=n.relatedTarget||n.toElement,g=a,m=m?Mn(m):null,m!==null&&(x=Cn(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(g=null,m=a),g!==m)){if(w=Mf,v="onMouseLeave",p="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(w=Pf,v="onPointerLeave",p="onPointerEnter",y="pointer"),x=g==null?d:hr(g),h=m==null?d:hr(m),d=new w(v,y+"leave",g,n,c),d.target=x,d.relatedTarget=h,v=null,Mn(c)===a&&(w=new w(p,y+"enter",m,n,c),w.target=h,w.relatedTarget=x,v=w),x=v,g&&m)t:{for(w=g,p=m,y=0,h=w;h;h=fr(h))y++;for(h=0,v=p;v;v=fr(v))h++;for(;0<y-h;)w=fr(w),y--;for(;0<h-y;)p=fr(p),h--;for(;y--;){if(w===p||p!==null&&w===p.alternate)break t;w=fr(w),p=fr(p)}w=null}else w=null;g!==null&&nd(f,d,g,w,!1),m!==null&&x!==null&&nd(f,x,m,w,!0)}}e:{if(d=a?hr(a):window,g=d.nodeName&&d.nodeName.toLowerCase(),g==="select"||g==="input"&&d.type==="file")var _=cv;else if(Of(d))if(Af)_=pv;else{_=dv;var S=fv}else(g=d.nodeName)&&g.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(_=hv);if(_&&(_=_(e,a))){Rf(f,_,n,c);break e}S&&S(e,d,a),e==="focusout"&&(S=d._wrapperState)&&S.controlled&&d.type==="number"&&kl(d,"number",d.value)}switch(S=a?hr(a):window,e){case"focusin":(Of(S)||S.contentEditable==="true")&&(ar=S,Jl=a,fo=null);break;case"focusout":fo=Jl=ar=null;break;case"mousedown":eu=!0;break;case"contextmenu":case"mouseup":case"dragend":eu=!1,Uf(f,n,c);break;case"selectionchange":if(yv)break;case"keydown":case"keyup":Uf(f,n,c)}var k;if(Ql)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else ur?zf(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(Lf&&n.locale!=="ko"&&(ur||C!=="onCompositionStart"?C==="onCompositionEnd"&&ur&&(k=Nf()):(ln=c,Bl="value"in ln?ln.value:ln.textContent,ur=!0)),S=Ci(a,C),0<S.length&&(C=new If(C,e,null,n,c),f.push({event:C,listeners:S}),k?C.data=k:(k=bf(n),k!==null&&(C.data=k)))),(k=iv?sv(e,n):lv(e,n))&&(a=Ci(a,"onBeforeInput"),0<a.length&&(c=new If("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:a}),c.data=k))}ed(f,t)})}function go(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ci(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Qr(e,n),i!=null&&r.unshift(go(e,i,o)),i=Qr(e,t),i!=null&&r.push(go(e,i,o))),e=e.return}return r}function fr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function nd(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=Qr(n,i),u!=null&&s.unshift(go(n,u,l))):o||(u=Qr(n,i),u!=null&&s.push(go(n,u,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Ev=/\r\n?/g,_v=/\u0000|\uFFFD/g;function rd(e){return(typeof e=="string"?e:""+e).replace(Ev,`
38
+ `).replace(_v,"")}function Mi(e,t,n){if(t=rd(t),rd(e)!==t&&n)throw Error(H(425))}function Ii(){}var su=null,lu=null;function uu(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 au=typeof setTimeout=="function"?setTimeout:void 0,Sv=typeof clearTimeout=="function"?clearTimeout:void 0,od=typeof Promise=="function"?Promise:void 0,kv=typeof queueMicrotask=="function"?queueMicrotask:typeof od<"u"?function(e){return od.resolve(null).then(e).catch(Nv)}:au;function Nv(e){setTimeout(function(){throw e})}function cu(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),oo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);oo(t)}function an(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 id(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 dr=Math.random().toString(36).slice(2),kt="__reactFiber$"+dr,mo="__reactProps$"+dr,Dt="__reactContainer$"+dr,fu="__reactEvents$"+dr,Cv="__reactListeners$"+dr,Mv="__reactHandles$"+dr;function Mn(e){var t=e[kt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Dt]||n[kt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=id(e);e!==null;){if(n=e[kt])return n;e=id(e)}return t}e=n,n=e.parentNode}return null}function yo(e){return e=e[kt]||e[Dt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function hr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function Pi(e){return e[mo]||null}var du=[],pr=-1;function cn(e){return{current:e}}function ce(e){0>pr||(e.current=du[pr],du[pr]=null,pr--)}function ue(e,t){pr++,du[pr]=e.current,e.current=t}var fn={},Te=cn(fn),je=cn(!1),In=fn;function gr(e,t){var n=e.type.contextTypes;if(!n)return fn;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 Fe(e){return e=e.childContextTypes,e!=null}function Li(){ce(je),ce(Te)}function sd(e,t,n){if(Te.current!==fn)throw Error(H(168));ue(Te,t),ue(je,n)}function ld(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(H(108,fy(e)||"Unknown",o));return pe({},n,r)}function Ti(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fn,In=Te.current,ue(Te,e),ue(je,je.current),!0}function ud(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=ld(e,t,In),r.__reactInternalMemoizedMergedChildContext=e,ce(je),ce(Te),ue(Te,e)):ce(je),ue(je,n)}var jt=null,$i=!1,hu=!1;function ad(e){jt===null?jt=[e]:jt.push(e)}function Iv(e){$i=!0,ad(e)}function dn(){if(!hu&&jt!==null){hu=!0;var e=0,t=se;try{var n=jt;for(se=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}jt=null,$i=!1}catch(o){throw jt!==null&&(jt=jt.slice(e+1)),ff(Ol,dn),o}finally{se=t,hu=!1}}return null}var mr=[],yr=0,zi=null,bi=0,Je=[],et=0,Pn=null,Ft=1,Vt="";function Ln(e,t){mr[yr++]=bi,mr[yr++]=zi,zi=e,bi=t}function cd(e,t,n){Je[et++]=Ft,Je[et++]=Vt,Je[et++]=Pn,Pn=e;var r=Ft;e=Vt;var o=32-lt(r)-1;r&=~(1<<o),n+=1;var i=32-lt(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Ft=1<<32-lt(t)+o|n<<o|r,Vt=i+e}else Ft=1<<i|n<<o|r,Vt=e}function pu(e){e.return!==null&&(Ln(e,1),cd(e,1,0))}function gu(e){for(;e===zi;)zi=mr[--yr],mr[yr]=null,bi=mr[--yr],mr[yr]=null;for(;e===Pn;)Pn=Je[--et],Je[et]=null,Vt=Je[--et],Je[et]=null,Ft=Je[--et],Je[et]=null}var Ge=null,Qe=null,fe=!1,at=null;function fd(e,t){var n=ot(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 dd(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,Qe=an(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ge=e,Qe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Pn!==null?{id:Ft,overflow:Vt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ot(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ge=e,Qe=null,!0):!1;default:return!1}}function mu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function yu(e){if(fe){var t=Qe;if(t){var n=t;if(!dd(e,t)){if(mu(e))throw Error(H(418));t=an(n.nextSibling);var r=Ge;t&&dd(e,t)?fd(r,n):(e.flags=e.flags&-4097|2,fe=!1,Ge=e)}}else{if(mu(e))throw Error(H(418));e.flags=e.flags&-4097|2,fe=!1,Ge=e}}}function hd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ge=e}function Oi(e){if(e!==Ge)return!1;if(!fe)return hd(e),fe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!uu(e.type,e.memoizedProps)),t&&(t=Qe)){if(mu(e))throw pd(),Error(H(418));for(;t;)fd(e,t),t=an(t.nextSibling)}if(hd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qe=an(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qe=null}}else Qe=Ge?an(e.stateNode.nextSibling):null;return!0}function pd(){for(var e=Qe;e;)e=an(e.nextSibling)}function vr(){Qe=Ge=null,fe=!1}function vu(e){at===null?at=[e]:at.push(e)}var Pv=At.ReactCurrentBatchConfig;function vo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var 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(H(284));if(!n._owner)throw Error(H(290,e))}return e}function Ri(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function gd(e){var t=e._init;return t(e._payload)}function md(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=xn(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=aa(h,p.mode,v),y.return=p,y):(y=o(y,h),y.return=p,y)}function u(p,y,h,v){var _=h.type;return _===nr?c(p,y,h.props.children,v,h.key):y!==null&&(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===en&&gd(_)===y.type)?(v=o(y,h.props),v.ref=vo(p,y,h),v.return=p,v):(v=ss(h.type,h.key,h.props,null,p.mode,v),v.ref=vo(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=ca(h,p.mode,v),y.return=p,y):(y=o(y,h.children||[]),y.return=p,y)}function c(p,y,h,v,_){return y===null||y.tag!==7?(y=Dn(h,p.mode,v,_),y.return=p,y):(y=o(y,h),y.return=p,y)}function f(p,y,h){if(typeof y=="string"&&y!==""||typeof y=="number")return y=aa(""+y,p.mode,h),y.return=p,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ri:return h=ss(y.type,y.key,y.props,null,p.mode,h),h.ref=vo(p,null,y),h.return=p,h;case tr:return y=ca(y,p.mode,h),y.return=p,y;case en:var v=y._init;return f(p,v(y._payload),h)}if(Yr(y)||Wr(y))return y=Dn(y,p.mode,h,null),y.return=p,y;Ri(p,y)}return null}function d(p,y,h,v){var _=y!==null?y.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return _!==null?null:l(p,y,""+h,v);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case ri:return h.key===_?u(p,y,h,v):null;case tr:return h.key===_?a(p,y,h,v):null;case en:return _=h._init,d(p,y,_(h._payload),v)}if(Yr(h)||Wr(h))return _!==null?null:c(p,y,h,v,null);Ri(p,h)}return null}function g(p,y,h,v,_){if(typeof v=="string"&&v!==""||typeof v=="number")return p=p.get(h)||null,l(y,p,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ri:return p=p.get(v.key===null?h:v.key)||null,u(y,p,v,_);case tr:return p=p.get(v.key===null?h:v.key)||null,a(y,p,v,_);case en:var S=v._init;return g(p,y,h,S(v._payload),_)}if(Yr(v)||Wr(v))return p=p.get(h)||null,c(y,p,v,_,null);Ri(y,v)}return null}function m(p,y,h,v){for(var _=null,S=null,k=y,C=y=0,$=null;k!==null&&C<h.length;C++){k.index>C?($=k,k=null):$=k.sibling;var b=d(p,k,h[C],v);if(b===null){k===null&&(k=$);break}e&&k&&b.alternate===null&&t(p,k),y=i(b,y,C),S===null?_=b:S.sibling=b,S=b,k=$}if(C===h.length)return n(p,k),fe&&Ln(p,C),_;if(k===null){for(;C<h.length;C++)k=f(p,h[C],v),k!==null&&(y=i(k,y,C),S===null?_=k:S.sibling=k,S=k);return fe&&Ln(p,C),_}for(k=r(p,k);C<h.length;C++)$=g(k,p,C,h[C],v),$!==null&&(e&&$.alternate!==null&&k.delete($.key===null?C:$.key),y=i($,y,C),S===null?_=$:S.sibling=$,S=$);return e&&k.forEach(function(P){return t(p,P)}),fe&&Ln(p,C),_}function w(p,y,h,v){var _=Wr(h);if(typeof _!="function")throw Error(H(150));if(h=_.call(h),h==null)throw Error(H(151));for(var S=_=null,k=y,C=y=0,$=null,b=h.next();k!==null&&!b.done;C++,b=h.next()){k.index>C?($=k,k=null):$=k.sibling;var P=d(p,k,b.value,v);if(P===null){k===null&&(k=$);break}e&&k&&P.alternate===null&&t(p,k),y=i(P,y,C),S===null?_=P:S.sibling=P,S=P,k=$}if(b.done)return n(p,k),fe&&Ln(p,C),_;if(k===null){for(;!b.done;C++,b=h.next())b=f(p,b.value,v),b!==null&&(y=i(b,y,C),S===null?_=b:S.sibling=b,S=b);return fe&&Ln(p,C),_}for(k=r(p,k);!b.done;C++,b=h.next())b=g(k,p,C,b.value,v),b!==null&&(e&&b.alternate!==null&&k.delete(b.key===null?C:b.key),y=i(b,y,C),S===null?_=b:S.sibling=b,S=b);return e&&k.forEach(function(z){return t(p,z)}),fe&&Ln(p,C),_}function x(p,y,h,v){if(typeof h=="object"&&h!==null&&h.type===nr&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case ri:e:{for(var _=h.key,S=y;S!==null;){if(S.key===_){if(_=h.type,_===nr){if(S.tag===7){n(p,S.sibling),y=o(S,h.props.children),y.return=p,p=y;break e}}else if(S.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===en&&gd(_)===S.type){n(p,S.sibling),y=o(S,h.props),y.ref=vo(p,S,h),y.return=p,p=y;break e}n(p,S);break}else t(p,S);S=S.sibling}h.type===nr?(y=Dn(h.props.children,p.mode,v,h.key),y.return=p,p=y):(v=ss(h.type,h.key,h.props,null,p.mode,v),v.ref=vo(p,y,h),v.return=p,p=v)}return s(p);case tr:e:{for(S=h.key;y!==null;){if(y.key===S)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=ca(h,p.mode,v),y.return=p,p=y}return s(p);case en:return S=h._init,x(p,y,S(h._payload),v)}if(Yr(h))return m(p,y,h,v);if(Wr(h))return w(p,y,h,v);Ri(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=aa(h,p.mode,v),y.return=p,p=y),s(p)):n(p,y)}return x}var wr=md(!0),yd=md(!1),Ai=cn(null),Di=null,xr=null,wu=null;function xu(){wu=xr=Di=null}function Eu(e){var t=Ai.current;ce(Ai),e._currentValue=t}function _u(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 Er(e,t){Di=e,wu=xr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ve=!0),e.firstContext=null)}function tt(e){var t=e._currentValue;if(wu!==e)if(e={context:e,memoizedValue:t,next:null},xr===null){if(Di===null)throw Error(H(308));xr=e,Di.dependencies={lanes:0,firstContext:e}}else xr=xr.next=e;return t}var Tn=null;function Su(e){Tn===null?Tn=[e]:Tn.push(e)}function vd(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Su(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ht(e,r)}function Ht(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 hn=!1;function ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wd(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 Bt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,oe&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ht(e,n)}return o=r.interleaved,o===null?(t.next=t,Su(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ht(e,n)}function ji(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,Dl(e,n)}}function xd(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 Fi(e,t,n,r){var o=e.updateQueue;hn=!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 c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=a:l.next=a,c.lastBaseUpdate=u))}if(i!==null){var f=o.baseState;s=0,c=a=u=null,l=i;do{var d=l.lane,g=l.eventTime;if((r&d)===d){c!==null&&(c=c.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"){f=m.call(g,f,d);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=w.payload,d=typeof m=="function"?m.call(g,f,d):m,d==null)break e;f=pe({},f,d);break e;case 2:hn=!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},c===null?(a=c=g,u=f):c=c.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(c===null&&(u=f),o.baseState=u,o.firstBaseUpdate=a,o.lastBaseUpdate=c,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=f}}function Ed(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(H(191,o));o.call(r)}}}var wo={},Nt=cn(wo),xo=cn(wo),Eo=cn(wo);function $n(e){if(e===wo)throw Error(H(174));return e}function Nu(e,t){switch(ue(Eo,t),ue(xo,e),ue(Nt,wo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Cl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Cl(t,e)}ce(Nt),ue(Nt,t)}function _r(){ce(Nt),ce(xo),ce(Eo)}function _d(e){$n(Eo.current);var t=$n(Nt.current),n=Cl(t,e.type);t!==n&&(ue(xo,e),ue(Nt,n))}function Cu(e){xo.current===e&&(ce(Nt),ce(xo))}var ge=cn(0);function Vi(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 Mu=[];function Iu(){for(var e=0;e<Mu.length;e++)Mu[e]._workInProgressVersionPrimary=null;Mu.length=0}var Hi=At.ReactCurrentDispatcher,Pu=At.ReactCurrentBatchConfig,zn=0,me=null,ke=null,Ce=null,Bi=!1,_o=!1,So=0,Lv=0;function $e(){throw Error(H(321))}function Lu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ut(e[n],t[n]))return!1;return!0}function Tu(e,t,n,r,o,i){if(zn=i,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hi.current=e===null||e.memoizedState===null?bv:Ov,e=n(r,o),_o){i=0;do{if(_o=!1,So=0,25<=i)throw Error(H(301));i+=1,Ce=ke=null,t.updateQueue=null,Hi.current=Rv,e=n(r,o)}while(_o)}if(Hi.current=Yi,t=ke!==null&&ke.next!==null,zn=0,Ce=ke=me=null,Bi=!1,t)throw Error(H(300));return e}function $u(){var e=So!==0;return So=0,e}function Ct(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ce===null?me.memoizedState=Ce=e:Ce=Ce.next=e,Ce}function nt(){if(ke===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=Ce===null?me.memoizedState:Ce.next;if(t!==null)Ce=t,ke=e;else{if(e===null)throw Error(H(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},Ce===null?me.memoizedState=Ce=e:Ce=Ce.next=e}return Ce}function ko(e,t){return typeof t=="function"?t(e):t}function zu(e){var t=nt(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=ke,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 c=a.lane;if((zn&c)===c)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 f={lane:c,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null};u===null?(l=u=f,s=r):u=u.next=f,me.lanes|=c,bn|=c}a=a.next}while(a!==null&&a!==i);u===null?s=r:u.next=l,ut(r,t.memoizedState)||(Ve=!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,me.lanes|=i,bn|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function bu(e){var t=nt(),n=t.queue;if(n===null)throw Error(H(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);ut(i,t.memoizedState)||(Ve=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Sd(){}function kd(e,t){var n=me,r=nt(),o=t(),i=!ut(r.memoizedState,o);if(i&&(r.memoizedState=o,Ve=!0),r=r.queue,Ou(Md.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ce!==null&&Ce.memoizedState.tag&1){if(n.flags|=2048,No(9,Cd.bind(null,n,r,o,t),void 0,null),Me===null)throw Error(H(349));zn&30||Nd(n,t,o)}return o}function Nd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Cd(e,t,n,r){t.value=n,t.getSnapshot=r,Id(t)&&Pd(e)}function Md(e,t,n){return n(function(){Id(t)&&Pd(e)})}function Id(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ut(e,n)}catch{return!0}}function Pd(e){var t=Ht(e,1);t!==null&&ht(t,e,1,-1)}function Ld(e){var t=Ct();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=zv.bind(null,me,e),[t.memoizedState,e]}function No(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.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 Td(){return nt().memoizedState}function Wi(e,t,n,r){var o=Ct();me.flags|=e,o.memoizedState=No(1|t,n,void 0,r===void 0?null:r)}function Ui(e,t,n,r){var o=nt();r=r===void 0?null:r;var i=void 0;if(ke!==null){var s=ke.memoizedState;if(i=s.destroy,r!==null&&Lu(r,s.deps)){o.memoizedState=No(t,n,i,r);return}}me.flags|=e,o.memoizedState=No(1|t,n,i,r)}function $d(e,t){return Wi(8390656,8,e,t)}function Ou(e,t){return Ui(2048,8,e,t)}function zd(e,t){return Ui(4,2,e,t)}function bd(e,t){return Ui(4,4,e,t)}function Od(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 Rd(e,t,n){return n=n!=null?n.concat([e]):null,Ui(4,4,Od.bind(null,t,e),n)}function Ru(){}function Ad(e,t){var n=nt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Dd(e,t){var n=nt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Lu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function jd(e,t,n){return zn&21?(ut(n,t)||(n=gf(),me.lanes|=n,bn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ve=!0),e.memoizedState=n)}function Tv(e,t){var n=se;se=n!==0&&4>n?n:4,e(!0);var r=Pu.transition;Pu.transition={};try{e(!1),t()}finally{se=n,Pu.transition=r}}function Fd(){return nt().memoizedState}function $v(e,t,n){var r=vn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vd(e))Hd(t,n);else if(n=vd(e,t,n,r),n!==null){var o=De();ht(n,e,r,o),Bd(n,t,r)}}function zv(e,t,n){var r=vn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vd(e))Hd(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,ut(l,s)){var u=t.interleaved;u===null?(o.next=o,Su(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=vd(e,t,o,r),n!==null&&(o=De(),ht(n,e,r,o),Bd(n,t,r))}}function Vd(e){var t=e.alternate;return e===me||t!==null&&t===me}function Hd(e,t){_o=Bi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Dl(e,n)}}var Yi={readContext:tt,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useInsertionEffect:$e,useLayoutEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useMutableSource:$e,useSyncExternalStore:$e,useId:$e,unstable_isNewReconciler:!1},bv={readContext:tt,useCallback:function(e,t){return Ct().memoizedState=[e,t===void 0?null:t],e},useContext:tt,useEffect:$d,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wi(4194308,4,Od.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Wi(4,2,e,t)},useMemo:function(e,t){var n=Ct();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ct();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=$v.bind(null,me,e),[r.memoizedState,e]},useRef:function(e){var t=Ct();return e={current:e},t.memoizedState=e},useState:Ld,useDebugValue:Ru,useDeferredValue:function(e){return Ct().memoizedState=e},useTransition:function(){var e=Ld(!1),t=e[0];return e=Tv.bind(null,e[1]),Ct().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=me,o=Ct();if(fe){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),Me===null)throw Error(H(349));zn&30||Nd(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,$d(Md.bind(null,r,i,e),[e]),r.flags|=2048,No(9,Cd.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ct(),t=Me.identifierPrefix;if(fe){var n=Vt,r=Ft;n=(r&~(1<<32-lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=So++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Lv++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ov={readContext:tt,useCallback:Ad,useContext:tt,useEffect:Ou,useImperativeHandle:Rd,useInsertionEffect:zd,useLayoutEffect:bd,useMemo:Dd,useReducer:zu,useRef:Td,useState:function(){return zu(ko)},useDebugValue:Ru,useDeferredValue:function(e){var t=nt();return jd(t,ke.memoizedState,e)},useTransition:function(){var e=zu(ko)[0],t=nt().memoizedState;return[e,t]},useMutableSource:Sd,useSyncExternalStore:kd,useId:Fd,unstable_isNewReconciler:!1},Rv={readContext:tt,useCallback:Ad,useContext:tt,useEffect:Ou,useImperativeHandle:Rd,useInsertionEffect:zd,useLayoutEffect:bd,useMemo:Dd,useReducer:bu,useRef:Td,useState:function(){return bu(ko)},useDebugValue:Ru,useDeferredValue:function(e){var t=nt();return ke===null?t.memoizedState=e:jd(t,ke.memoizedState,e)},useTransition:function(){var e=bu(ko)[0],t=nt().memoizedState;return[e,t]},useMutableSource:Sd,useSyncExternalStore:kd,useId:Fd,unstable_isNewReconciler:!1};function ct(e,t){if(e&&e.defaultProps){t=pe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Au(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:pe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Xi={isMounted:function(e){return(e=e._reactInternals)?Cn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=De(),o=vn(e),i=Bt(r,o);i.payload=t,n!=null&&(i.callback=n),t=pn(e,i,o),t!==null&&(ht(t,e,o,r),ji(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=De(),o=vn(e),i=Bt(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=pn(e,i,o),t!==null&&(ht(t,e,o,r),ji(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=De(),r=vn(e),o=Bt(n,r);o.tag=2,t!=null&&(o.callback=t),t=pn(e,o,r),t!==null&&(ht(t,e,r,n),ji(t,e,r))}};function Wd(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?!co(n,r)||!co(o,i):!0}function Ud(e,t,n){var r=!1,o=fn,i=t.contextType;return typeof i=="object"&&i!==null?i=tt(i):(o=Fe(t)?In:Te.current,r=t.contextTypes,i=(r=r!=null)?gr(e,o):fn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Xi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Yd(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&&Xi.enqueueReplaceState(t,t.state,null)}function Du(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},ku(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=tt(i):(i=Fe(t)?In:Te.current,o.context=gr(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Au(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&&Xi.enqueueReplaceState(o,o.state,null),Fi(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Sr(e,t){try{var n="",r=t;do n+=cy(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 ju(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Fu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Av=typeof WeakMap=="function"?WeakMap:Map;function Xd(e,t,n){n=Bt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){es||(es=!0,ta=r),Fu(e,t)},n}function Gd(e,t,n){n=Bt(-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(){Fu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Fu(e,t),typeof r!="function"&&(mn===null?mn=new Set([this]):mn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Qd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Av;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=Zv.bind(null,e,t,n),t.then(e,e))}function Kd(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 Zd(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=Bt(-1,1),t.tag=2,pn(n,t,1))),n.lanes|=1),e)}var Dv=At.ReactCurrentOwner,Ve=!1;function Ae(e,t,n,r){t.child=e===null?yd(t,null,n,r):wr(t,e.child,n,r)}function qd(e,t,n,r,o){n=n.render;var i=t.ref;return Er(t,o),r=Tu(e,t,n,r,i,o),n=$u(),e!==null&&!Ve?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Wt(e,t,o)):(fe&&n&&pu(t),t.flags|=1,Ae(e,t,r,o),t.child)}function Jd(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!ua(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,eh(e,t,i,r,o)):(e=ss(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:co,n(s,r)&&e.ref===t.ref)return Wt(e,t,o)}return t.flags|=1,e=xn(i,r),e.ref=t.ref,e.return=t,t.child=e}function eh(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(co(i,r)&&e.ref===t.ref)if(Ve=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Ve=!0);else return t.lanes=e.lanes,Wt(e,t,o)}return Vu(e,t,n,r,o)}function th(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},ue(Nr,Ke),Ke|=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,ue(Nr,Ke),Ke|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ue(Nr,Ke),Ke|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ue(Nr,Ke),Ke|=r;return Ae(e,t,o,n),t.child}function nh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Vu(e,t,n,r,o){var i=Fe(n)?In:Te.current;return i=gr(t,i),Er(t,o),n=Tu(e,t,n,r,i,o),r=$u(),e!==null&&!Ve?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Wt(e,t,o)):(fe&&r&&pu(t),t.flags|=1,Ae(e,t,n,o),t.child)}function rh(e,t,n,r,o){if(Fe(n)){var i=!0;Ti(t)}else i=!1;if(Er(t,o),t.stateNode===null)Qi(e,t),Ud(t,n,r),Du(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=tt(a):(a=Fe(n)?In:Te.current,a=gr(t,a));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||u!==a)&&Yd(t,s,r,a),hn=!1;var d=t.memoizedState;s.state=d,Fi(t,r,s,o),u=t.memoizedState,l!==r||d!==u||je.current||hn?(typeof c=="function"&&(Au(t,n,c,r),u=t.memoizedState),(l=hn||Wd(t,n,l,r,d,u,a))?(f||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,wd(e,t),l=t.memoizedProps,a=t.type===t.elementType?l:ct(t.type,l),s.props=a,f=t.pendingProps,d=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=tt(u):(u=Fe(n)?In:Te.current,u=gr(t,u));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==f||d!==u)&&Yd(t,s,r,u),hn=!1,d=t.memoizedState,s.state=d,Fi(t,r,s,o);var m=t.memoizedState;l!==f||d!==m||je.current||hn?(typeof g=="function"&&(Au(t,n,g,r),m=t.memoizedState),(a=hn||Wd(t,n,a,r,d,m,u)||!1)?(c||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 Hu(e,t,n,r,i,o)}function Hu(e,t,n,r,o,i){nh(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&ud(t,n,!1),Wt(e,t,i);r=t.stateNode,Dv.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=wr(t,e.child,null,i),t.child=wr(t,null,l,i)):Ae(e,t,l,i),t.memoizedState=r.state,o&&ud(t,n,!0),t.child}function oh(e){var t=e.stateNode;t.pendingContext?sd(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sd(e,t.context,!1),Nu(e,t.containerInfo)}function ih(e,t,n,r,o){return vr(),vu(o),t.flags|=256,Ae(e,t,n,r),t.child}var Bu={dehydrated:null,treeContext:null,retryLane:0};function Wu(e){return{baseLanes:e,cachePool:null,transitions:null}}function sh(e,t,n){var r=t.pendingProps,o=ge.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),ue(ge,o&1),e===null)return yu(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=ls(s,r,0,null),e=Dn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Wu(n),t.memoizedState=Bu,e):Uu(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return jv(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=xn(o,u),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=xn(l,i):(i=Dn(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?Wu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Bu,r}return i=e.child,e=i.sibling,r=xn(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 Uu(e,t){return t=ls({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Gi(e,t,n,r){return r!==null&&vu(r),wr(t,e.child,null,n),e=Uu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jv(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=ju(Error(H(422))),Gi(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=ls({mode:"visible",children:r.children},o,0,null),i=Dn(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&wr(t,e.child,null,s),t.child.memoizedState=Wu(s),t.memoizedState=Bu,i);if(!(t.mode&1))return Gi(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(H(419)),r=ju(i,r,void 0),Gi(e,t,s,r)}if(l=(s&e.childLanes)!==0,Ve||l){if(r=Me,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,Ht(e,o),ht(r,e,o,-1))}return la(),r=ju(Error(H(421))),Gi(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=qv.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Qe=an(o.nextSibling),Ge=t,fe=!0,at=null,e!==null&&(Je[et++]=Ft,Je[et++]=Vt,Je[et++]=Pn,Ft=e.id,Vt=e.overflow,Pn=t),t=Uu(t,r.children),t.flags|=4096,t)}function lh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),_u(e.return,t,n)}function Yu(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 uh(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ae(e,t,r.children,n),r=ge.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&&lh(e,n,t);else if(e.tag===19)lh(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(ue(ge,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&&Vi(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Yu(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&&Vi(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Yu(t,!0,n,null,i);break;case"together":Yu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wt(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(H(153));if(t.child!==null){for(e=t.child,n=xn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=xn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fv(e,t,n){switch(t.tag){case 3:oh(t),vr();break;case 5:_d(t);break;case 1:Fe(t.type)&&Ti(t);break;case 4:Nu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ue(Ai,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ue(ge,ge.current&1),t.flags|=128,null):n&t.child.childLanes?sh(e,t,n):(ue(ge,ge.current&1),e=Wt(e,t,n),e!==null?e.sibling:null);ue(ge,ge.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return uh(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ue(ge,ge.current),r)break;return null;case 22:case 23:return t.lanes=0,th(e,t,n)}return Wt(e,t,n)}var ah,Xu,ch,fh;ah=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}},Xu=function(){},ch=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,$n(Nt.current);var i=null;switch(n){case"input":o=_l(e,o),r=_l(e,r),i=[];break;case"select":o=pe({},o,{value:void 0}),r=pe({},r,{value:void 0}),i=[];break;case"textarea":o=Nl(e,o),r=Nl(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ii)}Ml(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"&&(Br.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"&&(Br.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)}},fh=function(e,t,n,r){n!==r&&(t.flags|=4)};function Co(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 Vv(e,t,n){var r=t.pendingProps;switch(gu(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 Fe(t.type)&&Li(),ze(t),null;case 3:return r=t.stateNode,_r(),ce(je),ce(Te),Iu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Oi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,at!==null&&(oa(at),at=null))),Xu(e,t),ze(t),null;case 5:Cu(t);var o=$n(Eo.current);if(n=t.type,e!==null&&t.stateNode!=null)ch(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return ze(t),null}if(e=$n(Nt.current),Oi(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[kt]=t,r[mo]=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<ho.length;o++)ae(ho[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":Wc(r,i),ae("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ae("invalid",r);break;case"textarea":Xc(r,i),ae("invalid",r)}Ml(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&&Mi(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Mi(r.textContent,l,e),o=["children",""+l]):Br.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&ae("scroll",r)}switch(n){case"input":oi(r),Yc(r,i,!0);break;case"textarea":oi(r),Qc(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Ii)}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=Kc(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[kt]=t,e[mo]=r,ah(e,t,!1,!1),t.stateNode=e;e:{switch(s=Il(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<ho.length;o++)ae(ho[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":Wc(e,r),o=_l(e,r),ae("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=pe({},r,{value:void 0}),ae("invalid",e);break;case"textarea":Xc(e,r),o=Nl(e,r),ae("invalid",e);break;default:o=r}Ml(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];i==="style"?Jc(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Zc(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Xr(e,u):typeof u=="number"&&Xr(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Br.hasOwnProperty(i)?u!=null&&i==="onScroll"&&ae("scroll",e):u!=null&&fl(e,i,u,s))}switch(n){case"input":oi(e),Yc(e,r,!1);break;case"textarea":oi(e),Qc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+tn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?rr(e,!!r.multiple,i,!1):r.defaultValue!=null&&rr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ii)}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)fh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=$n(Eo.current),$n(Nt.current),Oi(t)){if(r=t.stateNode,n=t.memoizedProps,r[kt]=t,(i=r.nodeValue!==n)&&(e=Ge,e!==null))switch(e.tag){case 3:Mi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kt]=t,t.stateNode=r}return ze(t),null;case 13:if(ce(ge),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(fe&&Qe!==null&&t.mode&1&&!(t.flags&128))pd(),vr(),t.flags|=98560,i=!1;else if(i=Oi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(H(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(H(317));i[kt]=t}else vr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),i=!1}else at!==null&&(oa(at),at=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||ge.current&1?Ne===0&&(Ne=3):la())),t.updateQueue!==null&&(t.flags|=4),ze(t),null);case 4:return _r(),Xu(e,t),e===null&&po(t.stateNode.containerInfo),ze(t),null;case 10:return Eu(t.type._context),ze(t),null;case 17:return Fe(t.type)&&Li(),ze(t),null;case 19:if(ce(ge),i=t.memoizedState,i===null)return ze(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Co(i,!1);else{if(Ne!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Vi(e),s!==null){for(t.flags|=128,Co(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 ue(ge,ge.current&1|2),t.child}e=e.sibling}i.tail!==null&&ve()>Cr&&(t.flags|=128,r=!0,Co(i,!1),t.lanes=4194304)}else{if(!r)if(e=Vi(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Co(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!fe)return ze(t),null}else 2*ve()-i.renderingStartTime>Cr&&n!==1073741824&&(t.flags|=128,r=!0,Co(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=ge.current,ue(ge,r?n&1|2:n&1),t):(ze(t),null);case 22:case 23:return sa(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ke&1073741824&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function Hv(e,t){switch(gu(t),t.tag){case 1:return Fe(t.type)&&Li(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _r(),ce(je),ce(Te),Iu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Cu(t),null;case 13:if(ce(ge),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));vr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(ge),null;case 4:return _r(),null;case 10:return Eu(t.type._context),null;case 22:case 23:return sa(),null;case 24:return null;default:return null}}var Ki=!1,be=!1,Bv=typeof WeakSet=="function"?WeakSet:Set,Y=null;function kr(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 Gu(e,t,n){try{n()}catch(r){ye(e,t,r)}}var dh=!1;function Wv(e,t){if(su=mi,e=Wf(),ql(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,c=0,f=e,d=null;t:for(;;){for(var g;f!==n||o!==0&&f.nodeType!==3||(l=s+o),f!==i||r!==0&&f.nodeType!==3||(u=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(g=f.firstChild)!==null;)d=f,f=g;for(;;){if(f===e)break t;if(d===n&&++a===o&&(l=s),d===i&&++c===r&&(u=s),(g=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=g}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(lu={focusedElem:e,selectionRange:n},mi=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;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:ct(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(H(163))}}catch(v){ye(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return m=dh,dh=!1,m}function Mo(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&&Gu(t,n,i)}o=o.next}while(o!==r)}}function Zi(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 Qu(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 hh(e){var t=e.alternate;t!==null&&(e.alternate=null,hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kt],delete t[mo],delete t[fu],delete t[Cv],delete t[Mv])),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 ph(e){return e.tag===5||e.tag===3||e.tag===4}function gh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ph(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 Ku(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=Ii));else if(r!==4&&(e=e.child,e!==null))for(Ku(e,t,n),e=e.sibling;e!==null;)Ku(e,t,n),e=e.sibling}function Zu(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(Zu(e,t,n),e=e.sibling;e!==null;)Zu(e,t,n),e=e.sibling}var Pe=null,ft=!1;function gn(e,t,n){for(n=n.child;n!==null;)mh(e,t,n),n=n.sibling}function mh(e,t,n){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(ci,n)}catch{}switch(n.tag){case 5:be||kr(n,t);case 6:var r=Pe,o=ft;Pe=null,gn(e,t,n),Pe=r,ft=o,Pe!==null&&(ft?(e=Pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pe.removeChild(n.stateNode));break;case 18:Pe!==null&&(ft?(e=Pe,n=n.stateNode,e.nodeType===8?cu(e.parentNode,n):e.nodeType===1&&cu(e,n),oo(e)):cu(Pe,n.stateNode));break;case 4:r=Pe,o=ft,Pe=n.stateNode.containerInfo,ft=!0,gn(e,t,n),Pe=r,ft=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)&&Gu(n,t,s),o=o.next}while(o!==r)}gn(e,t,n);break;case 1:if(!be&&(kr(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)}gn(e,t,n);break;case 21:gn(e,t,n);break;case 22:n.mode&1?(be=(r=be)||n.memoizedState!==null,gn(e,t,n),be=r):gn(e,t,n);break;default:gn(e,t,n)}}function yh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Bv),t.forEach(function(r){var o=Jv.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function dt(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:Pe=l.stateNode,ft=!1;break e;case 3:Pe=l.stateNode.containerInfo,ft=!0;break e;case 4:Pe=l.stateNode.containerInfo,ft=!0;break e}l=l.return}if(Pe===null)throw Error(H(160));mh(i,s,o),Pe=null,ft=!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;)vh(t,e),t=t.sibling}function vh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dt(t,e),Mt(e),r&4){try{Mo(3,e,e.return),Zi(3,e)}catch(w){ye(e,e.return,w)}try{Mo(5,e,e.return)}catch(w){ye(e,e.return,w)}}break;case 1:dt(t,e),Mt(e),r&512&&n!==null&&kr(n,n.return);break;case 5:if(dt(t,e),Mt(e),r&512&&n!==null&&kr(n,n.return),e.flags&32){var o=e.stateNode;try{Xr(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&&Uc(o,i),Il(l,s);var a=Il(l,i);for(s=0;s<u.length;s+=2){var c=u[s],f=u[s+1];c==="style"?Jc(o,f):c==="dangerouslySetInnerHTML"?Zc(o,f):c==="children"?Xr(o,f):fl(o,c,f,a)}switch(l){case"input":Sl(o,i);break;case"textarea":Gc(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var g=i.value;g!=null?rr(o,!!i.multiple,g,!1):d!==!!i.multiple&&(i.defaultValue!=null?rr(o,!!i.multiple,i.defaultValue,!0):rr(o,!!i.multiple,i.multiple?[]:"",!1))}o[mo]=i}catch(w){ye(e,e.return,w)}}break;case 6:if(dt(t,e),Mt(e),r&4){if(e.stateNode===null)throw Error(H(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(w){ye(e,e.return,w)}}break;case 3:if(dt(t,e),Mt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{oo(t.containerInfo)}catch(w){ye(e,e.return,w)}break;case 4:dt(t,e),Mt(e);break;case 13:dt(t,e),Mt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(ea=ve())),r&4&&yh(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(be=(a=be)||c,dt(t,e),be=a):dt(t,e),Mt(e),r&8192){if(a=e.memoizedState!==null,(e.stateNode.isHidden=a)&&!c&&e.mode&1)for(Y=e,c=e.child;c!==null;){for(f=Y=c;Y!==null;){switch(d=Y,g=d.child,d.tag){case 0:case 11:case 14:case 15:Mo(4,d,d.return);break;case 1:kr(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:kr(d,d.return);break;case 22:if(d.memoizedState!==null){Eh(f);continue}}g!==null?(g.return=d,Y=g):Eh(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{o=f.stateNode,a?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,u=f.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=qc("display",s))}catch(w){ye(e,e.return,w)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=a?"":f.memoizedProps}catch(w){ye(e,e.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:dt(t,e),Mt(e),r&4&&yh(e);break;case 21:break;default:dt(t,e),Mt(e)}}function Mt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ph(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Xr(o,""),r.flags&=-33);var i=gh(e);Zu(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=gh(e);Ku(e,l,s);break;default:throw Error(H(161))}}catch(u){ye(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Uv(e,t,n){Y=e,wh(e)}function wh(e,t,n){for(var r=(e.mode&1)!==0;Y!==null;){var o=Y,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Ki;if(!s){var l=o.alternate,u=l!==null&&l.memoizedState!==null||be;l=Ki;var a=be;if(Ki=s,(be=u)&&!a)for(Y=o;Y!==null;)s=Y,u=s.child,s.tag===22&&s.memoizedState!==null?_h(o):u!==null?(u.return=s,Y=u):_h(o);for(;i!==null;)Y=i,wh(i),i=i.sibling;Y=o,Ki=l,be=a}xh(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,Y=i):xh(e)}}function xh(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:be||Zi(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:ct(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Ed(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}Ed(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 c=a.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&oo(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}be||t.flags&512&&Qu(t)}catch(d){ye(t,t.return,d)}}if(t===e){Y=null;break}if(n=t.sibling,n!==null){n.return=t.return,Y=n;break}Y=t.return}}function Eh(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Y=n;break}Y=t.return}}function _h(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Zi(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{Qu(t)}catch(u){ye(t,i,u)}break;case 5:var s=t.return;try{Qu(t)}catch(u){ye(t,s,u)}}}catch(u){ye(t,t.return,u)}if(t===e){Y=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Y=l;break}Y=t.return}}var Yv=Math.ceil,qi=At.ReactCurrentDispatcher,qu=At.ReactCurrentOwner,rt=At.ReactCurrentBatchConfig,oe=0,Me=null,xe=null,Le=0,Ke=0,Nr=cn(0),Ne=0,Io=null,bn=0,Ji=0,Ju=0,Po=null,He=null,ea=0,Cr=1/0,Ut=null,es=!1,ta=null,mn=null,ts=!1,yn=null,ns=0,Lo=0,na=null,rs=-1,os=0;function De(){return oe&6?ve():rs!==-1?rs:rs=ve()}function vn(e){return e.mode&1?oe&2&&Le!==0?Le&-Le:Pv.transition!==null?(os===0&&(os=gf()),os):(e=se,e!==0||(e=window.event,e=e===void 0?16:kf(e.type)),e):1}function ht(e,t,n,r){if(50<Lo)throw Lo=0,na=null,Error(H(185));Jr(e,n,r),(!(oe&2)||e!==Me)&&(e===Me&&(!(oe&2)&&(Ji|=n),Ne===4&&wn(e,Le)),Be(e,r),n===1&&oe===0&&!(t.mode&1)&&(Cr=ve()+500,$i&&dn()))}function Be(e,t){var n=e.callbackNode;Py(e,t);var r=hi(e,e===Me?Le:0);if(r===0)n!==null&&df(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&df(n),t===1)e.tag===0?Iv(kh.bind(null,e)):ad(kh.bind(null,e)),kv(function(){!(oe&6)&&dn()}),n=null;else{switch(mf(r)){case 1:n=Ol;break;case 4:n=hf;break;case 16:n=ai;break;case 536870912:n=pf;break;default:n=ai}n=$h(n,Sh.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Sh(e,t){if(rs=-1,os=0,oe&6)throw Error(H(327));var n=e.callbackNode;if(Mr()&&e.callbackNode!==n)return null;var r=hi(e,e===Me?Le:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=is(e,r);else{t=r;var o=oe;oe|=2;var i=Ch();(Me!==e||Le!==t)&&(Ut=null,Cr=ve()+500,Rn(e,t));do try{Qv();break}catch(l){Nh(e,l)}while(!0);xu(),qi.current=i,oe=o,xe!==null?t=0:(Me=null,Le=0,t=Ne)}if(t!==0){if(t===2&&(o=Rl(e),o!==0&&(r=o,t=ra(e,o))),t===1)throw n=Io,Rn(e,0),wn(e,r),Be(e,ve()),n;if(t===6)wn(e,r);else{if(o=e.current.alternate,!(r&30)&&!Xv(o)&&(t=is(e,r),t===2&&(i=Rl(e),i!==0&&(r=i,t=ra(e,i))),t===1))throw n=Io,Rn(e,0),wn(e,r),Be(e,ve()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:An(e,He,Ut);break;case 3:if(wn(e,r),(r&130023424)===r&&(t=ea+500-ve(),10<t)){if(hi(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){De(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=au(An.bind(null,e,He,Ut),t);break}An(e,He,Ut);break;case 4:if(wn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-lt(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*Yv(r/1960))-r,10<r){e.timeoutHandle=au(An.bind(null,e,He,Ut),r);break}An(e,He,Ut);break;case 5:An(e,He,Ut);break;default:throw Error(H(329))}}}return Be(e,ve()),e.callbackNode===n?Sh.bind(null,e):null}function ra(e,t){var n=Po;return e.current.memoizedState.isDehydrated&&(Rn(e,t).flags|=256),e=is(e,t),e!==2&&(t=He,He=n,t!==null&&oa(t)),e}function oa(e){He===null?He=e:He.push.apply(He,e)}function Xv(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(!ut(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 wn(e,t){for(t&=~Ju,t&=~Ji,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-lt(t),r=1<<n;e[n]=-1,t&=~r}}function kh(e){if(oe&6)throw Error(H(327));Mr();var t=hi(e,0);if(!(t&1))return Be(e,ve()),null;var n=is(e,t);if(e.tag!==0&&n===2){var r=Rl(e);r!==0&&(t=r,n=ra(e,r))}if(n===1)throw n=Io,Rn(e,0),wn(e,t),Be(e,ve()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,An(e,He,Ut),Be(e,ve()),null}function ia(e,t){var n=oe;oe|=1;try{return e(t)}finally{oe=n,oe===0&&(Cr=ve()+500,$i&&dn())}}function On(e){yn!==null&&yn.tag===0&&!(oe&6)&&Mr();var t=oe;oe|=1;var n=rt.transition,r=se;try{if(rt.transition=null,se=1,e)return e()}finally{se=r,rt.transition=n,oe=t,!(oe&6)&&dn()}}function sa(){Ke=Nr.current,ce(Nr)}function Rn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Sv(n)),xe!==null)for(n=xe.return;n!==null;){var r=n;switch(gu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Li();break;case 3:_r(),ce(je),ce(Te),Iu();break;case 5:Cu(r);break;case 4:_r();break;case 13:ce(ge);break;case 19:ce(ge);break;case 10:Eu(r.type._context);break;case 22:case 23:sa()}n=n.return}if(Me=e,xe=e=xn(e.current,null),Le=Ke=t,Ne=0,Io=null,Ju=Ji=bn=0,He=Po=null,Tn!==null){for(t=0;t<Tn.length;t++)if(n=Tn[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}Tn=null}return e}function Nh(e,t){do{var n=xe;try{if(xu(),Hi.current=Yi,Bi){for(var r=me.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Bi=!1}if(zn=0,Ce=ke=me=null,_o=!1,So=0,qu.current=null,n===null||n.return===null){Ne=1,Io=t,xe=null;break}e:{var i=e,s=n.return,l=n,u=t;if(t=Le,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var a=u,c=l,f=c.tag;if(!(c.mode&1)&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var g=Kd(s);if(g!==null){g.flags&=-257,Zd(g,s,l,i,t),g.mode&1&&Qd(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)){Qd(i,a,t),la();break e}u=Error(H(426))}}else if(fe&&l.mode&1){var x=Kd(s);if(x!==null){!(x.flags&65536)&&(x.flags|=256),Zd(x,s,l,i,t),vu(Sr(u,l));break e}}i=u=Sr(u,l),Ne!==4&&(Ne=2),Po===null?Po=[i]:Po.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=Xd(i,u,t);xd(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"&&(mn===null||!mn.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var v=Gd(i,l,t);xd(i,v);break e}}i=i.return}while(i!==null)}Ih(n)}catch(_){t=_,xe===n&&n!==null&&(xe=n=n.return);continue}break}while(!0)}function Ch(){var e=qi.current;return qi.current=Yi,e===null?Yi:e}function la(){(Ne===0||Ne===3||Ne===2)&&(Ne=4),Me===null||!(bn&268435455)&&!(Ji&268435455)||wn(Me,Le)}function is(e,t){var n=oe;oe|=2;var r=Ch();(Me!==e||Le!==t)&&(Ut=null,Rn(e,t));do try{Gv();break}catch(o){Nh(e,o)}while(!0);if(xu(),oe=n,qi.current=r,xe!==null)throw Error(H(261));return Me=null,Le=0,Ne}function Gv(){for(;xe!==null;)Mh(xe)}function Qv(){for(;xe!==null&&!xy();)Mh(xe)}function Mh(e){var t=Th(e.alternate,e,Ke);e.memoizedProps=e.pendingProps,t===null?Ih(e):xe=t,qu.current=null}function Ih(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Hv(n,t),n!==null){n.flags&=32767,xe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ne=6,xe=null;return}}else if(n=Vv(n,t,Ke),n!==null){xe=n;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);Ne===0&&(Ne=5)}function An(e,t,n){var r=se,o=rt.transition;try{rt.transition=null,se=1,Kv(e,t,n,r)}finally{rt.transition=o,se=r}return null}function Kv(e,t,n,r){do Mr();while(yn!==null);if(oe&6)throw Error(H(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(H(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Ly(e,i),e===Me&&(xe=Me=null,Le=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ts||(ts=!0,$h(ai,function(){return Mr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=rt.transition,rt.transition=null;var s=se;se=1;var l=oe;oe|=4,qu.current=null,Wv(e,n),vh(n,e),mv(lu),mi=!!su,lu=su=null,e.current=n,Uv(n),Ey(),oe=l,se=s,rt.transition=i}else e.current=n;if(ts&&(ts=!1,yn=e,ns=o),i=e.pendingLanes,i===0&&(mn=null),ky(n.stateNode),Be(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(es)throw es=!1,e=ta,ta=null,e;return ns&1&&e.tag!==0&&Mr(),i=e.pendingLanes,i&1?e===na?Lo++:(Lo=0,na=e):Lo=0,dn(),null}function Mr(){if(yn!==null){var e=mf(ns),t=rt.transition,n=se;try{if(rt.transition=null,se=16>e?16:e,yn===null)var r=!1;else{if(e=yn,yn=null,ns=0,oe&6)throw Error(H(331));var o=oe;for(oe|=4,Y=e.current;Y!==null;){var i=Y,s=i.child;if(Y.flags&16){var l=i.deletions;if(l!==null){for(var u=0;u<l.length;u++){var a=l[u];for(Y=a;Y!==null;){var c=Y;switch(c.tag){case 0:case 11:case 15:Mo(8,c,i)}var f=c.child;if(f!==null)f.return=c,Y=f;else for(;Y!==null;){c=Y;var d=c.sibling,g=c.return;if(hh(c),c===a){Y=null;break}if(d!==null){d.return=g,Y=d;break}Y=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)}}Y=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,Y=s;else e:for(;Y!==null;){if(i=Y,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Mo(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,Y=p;break e}Y=i.return}}var y=e.current;for(Y=y;Y!==null;){s=Y;var h=s.child;if(s.subtreeFlags&2064&&h!==null)h.return=s,Y=h;else e:for(s=y;Y!==null;){if(l=Y,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Zi(9,l)}}catch(_){ye(l,l.return,_)}if(l===s){Y=null;break e}var v=l.sibling;if(v!==null){v.return=l.return,Y=v;break e}Y=l.return}}if(oe=o,dn(),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(ci,e)}catch{}r=!0}return r}finally{se=n,rt.transition=t}}return!1}function Ph(e,t,n){t=Sr(n,t),t=Xd(e,t,1),e=pn(e,t,1),t=De(),e!==null&&(Jr(e,1,t),Be(e,t))}function ye(e,t,n){if(e.tag===3)Ph(e,e,n);else for(;t!==null;){if(t.tag===3){Ph(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(mn===null||!mn.has(r))){e=Sr(n,e),e=Gd(t,e,1),t=pn(t,e,1),e=De(),t!==null&&(Jr(t,1,e),Be(t,e));break}}t=t.return}}function Zv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=De(),e.pingedLanes|=e.suspendedLanes&n,Me===e&&(Le&n)===n&&(Ne===4||Ne===3&&(Le&130023424)===Le&&500>ve()-ea?Rn(e,0):Ju|=n),Be(e,t)}function Lh(e,t){t===0&&(e.mode&1?(t=di,di<<=1,!(di&130023424)&&(di=4194304)):t=1);var n=De();e=Ht(e,t),e!==null&&(Jr(e,t,n),Be(e,n))}function qv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Lh(e,n)}function Jv(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(H(314))}r!==null&&r.delete(t),Lh(e,n)}var Th;Th=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||je.current)Ve=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ve=!1,Fv(e,t,n);Ve=!!(e.flags&131072)}else Ve=!1,fe&&t.flags&1048576&&cd(t,bi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qi(e,t),e=t.pendingProps;var o=gr(t,Te.current);Er(t,n),o=Tu(null,t,r,e,o,n);var i=$u();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,Fe(r)?(i=!0,Ti(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ku(t),o.updater=Xi,t.stateNode=o,o._reactInternals=t,Du(t,r,e,n),t=Hu(null,t,r,!0,i,n)):(t.tag=0,fe&&i&&pu(t),Ae(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=tw(r),e=ct(r,e),o){case 0:t=Vu(null,t,r,e,n);break e;case 1:t=rh(null,t,r,e,n);break e;case 11:t=qd(null,t,r,e,n);break e;case 14:t=Jd(null,t,r,ct(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ct(r,o),Vu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ct(r,o),rh(e,t,r,o,n);case 3:e:{if(oh(t),e===null)throw Error(H(387));r=t.pendingProps,i=t.memoizedState,o=i.element,wd(e,t),Fi(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=Sr(Error(H(423)),t),t=ih(e,t,r,n,o);break e}else if(r!==o){o=Sr(Error(H(424)),t),t=ih(e,t,r,n,o);break e}else for(Qe=an(t.stateNode.containerInfo.firstChild),Ge=t,fe=!0,at=null,n=yd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vr(),r===o){t=Wt(e,t,n);break e}Ae(e,t,r,n)}t=t.child}return t;case 5:return _d(t),e===null&&yu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,uu(r,o)?s=null:i!==null&&uu(r,i)&&(t.flags|=32),nh(e,t),Ae(e,t,s,n),t.child;case 6:return e===null&&yu(t),null;case 13:return sh(e,t,n);case 4:return Nu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wr(t,null,r,n):Ae(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ct(r,o),qd(e,t,r,o,n);case 7:return Ae(e,t,t.pendingProps,n),t.child;case 8:return Ae(e,t,t.pendingProps.children,n),t.child;case 12:return Ae(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,ue(Ai,r._currentValue),r._currentValue=s,i!==null)if(ut(i.value,s)){if(i.children===o.children&&!je.current){t=Wt(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=Bt(-1,n&-n),u.tag=2;var a=i.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?u.next=u:(u.next=c.next,c.next=u),a.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),_u(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(H(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),_u(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}Ae(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Er(t,n),o=tt(o),r=r(o),t.flags|=1,Ae(e,t,r,n),t.child;case 14:return r=t.type,o=ct(r,t.pendingProps),o=ct(r.type,o),Jd(e,t,r,o,n);case 15:return eh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ct(r,o),Qi(e,t),t.tag=1,Fe(r)?(e=!0,Ti(t)):e=!1,Er(t,n),Ud(t,r,o),Du(t,r,o,n),Hu(null,t,r,!0,e,n);case 19:return uh(e,t,n);case 22:return th(e,t,n)}throw Error(H(156,t.tag))};function $h(e,t){return ff(e,t)}function ew(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 ot(e,t,n,r){return new ew(e,t,n,r)}function ua(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tw(e){if(typeof e=="function")return ua(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pl)return 11;if(e===yl)return 14}return 2}function xn(e,t){var n=e.alternate;return n===null?(n=ot(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 ss(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")ua(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case nr:return Dn(n.children,o,i,t);case dl:s=8,o|=8;break;case hl:return e=ot(12,n,t,o|2),e.elementType=hl,e.lanes=i,e;case gl:return e=ot(13,n,t,o),e.elementType=gl,e.lanes=i,e;case ml:return e=ot(19,n,t,o),e.elementType=ml,e.lanes=i,e;case Fc:return ls(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Dc:s=10;break e;case jc:s=9;break e;case pl:s=11;break e;case yl:s=14;break e;case en:s=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=ot(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Dn(e,t,n,r){return e=ot(7,e,r,t),e.lanes=n,e}function ls(e,t,n,r){return e=ot(22,e,r,t),e.elementType=Fc,e.lanes=n,e.stateNode={isHidden:!1},e}function aa(e,t,n){return e=ot(6,e,null,t),e.lanes=n,e}function ca(e,t,n){return t=ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nw(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=Al(0),this.expirationTimes=Al(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Al(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function fa(e,t,n,r,o,i,s,l,u){return e=new nw(e,t,n,l,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ot(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ku(i),e}function rw(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:tr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function zh(e){if(!e)return fn;e=e._reactInternals;e:{if(Cn(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Fe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(Fe(n))return ld(e,n,t)}return t}function bh(e,t,n,r,o,i,s,l,u){return e=fa(n,r,!0,e,o,i,s,l,u),e.context=zh(null),n=e.current,r=De(),o=vn(n),i=Bt(r,o),i.callback=t??null,pn(n,i,o),e.current.lanes=o,Jr(e,o,r),Be(e,r),e}function us(e,t,n,r){var o=t.current,i=De(),s=vn(o);return n=zh(n),t.context===null?t.context=n:t.pendingContext=n,t=Bt(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=pn(o,t,s),e!==null&&(ht(e,o,s,i),ji(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 Oh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function da(e,t){Oh(e,t),(e=e.alternate)&&Oh(e,t)}function ow(){return null}var Rh=typeof reportError=="function"?reportError:function(e){console.error(e)};function ha(e){this._internalRoot=e}cs.prototype.render=ha.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));us(e,t,null,null)},cs.prototype.unmount=ha.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;On(function(){us(null,e,null,null)}),t[Dt]=null}};function cs(e){this._internalRoot=e}cs.prototype.unstable_scheduleHydration=function(e){if(e){var t=wf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<sn.length&&t!==0&&t<sn[n].priority;n++);sn.splice(n,0,e),n===0&&_f(e)}};function pa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function fs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ah(){}function iw(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=bh(t,r,e,0,null,!1,!1,"",Ah);return e._reactRootContainer=s,e[Dt]=s.current,po(e.nodeType===8?e.parentNode:e),On(),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=fa(e,0,!1,null,null,!1,!1,"",Ah);return e._reactRootContainer=u,e[Dt]=u.current,po(e.nodeType===8?e.parentNode:e),On(function(){us(t,u,n,r)}),u}function ds(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)}}us(t,s,e,o)}else s=iw(n,t,e,o,r);return as(s)}yf=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=qr(t.pendingLanes);n!==0&&(Dl(t,n|1),Be(t,ve()),!(oe&6)&&(Cr=ve()+500,dn()))}break;case 13:On(function(){var r=Ht(e,1);if(r!==null){var o=De();ht(r,e,1,o)}}),da(e,1)}},jl=function(e){if(e.tag===13){var t=Ht(e,134217728);if(t!==null){var n=De();ht(t,e,134217728,n)}da(e,134217728)}},vf=function(e){if(e.tag===13){var t=vn(e),n=Ht(e,t);if(n!==null){var r=De();ht(n,e,t,r)}da(e,t)}},wf=function(){return se},xf=function(e,t){var n=se;try{return se=e,t()}finally{se=n}},Tl=function(e,t,n){switch(t){case"input":if(Sl(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=Pi(r);if(!o)throw Error(H(90));Bc(r),Sl(r,o)}}}break;case"textarea":Gc(e,n);break;case"select":t=n.value,t!=null&&rr(e,!!n.multiple,t,!1)}},rf=ia,of=On;var sw={usingClientEntryPoint:!1,Events:[yo,hr,Pi,tf,nf,ia]},To={findFiberByHostInstance:Mn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},lw={bundleType:To.bundleType,version:To.version,rendererPackageName:To.rendererPackageName,rendererConfig:To.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:At.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=af(e),e===null?null:e.stateNode},findFiberByHostInstance:To.findFiberByHostInstance||ow,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 hs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hs.isDisabled&&hs.supportsFiber)try{ci=hs.inject(lw),St=hs}catch{}}Ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sw,Ue.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!pa(t))throw Error(H(200));return rw(e,t,null,n)},Ue.createRoot=function(e,t){if(!pa(e))throw Error(H(299));var n=!1,r="",o=Rh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=fa(e,1,!1,null,null,n,!1,r,o),e[Dt]=t.current,po(e.nodeType===8?e.parentNode:e),new ha(t)},Ue.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=af(t),e=e===null?null:e.stateNode,e},Ue.flushSync=function(e){return On(e)},Ue.hydrate=function(e,t,n){if(!fs(t))throw Error(H(200));return ds(null,e,t,!0,n)},Ue.hydrateRoot=function(e,t,n){if(!pa(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=Rh;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=bh(t,null,e,1,n??null,o,!1,i,s),e[Dt]=t.current,po(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 cs(t)},Ue.render=function(e,t,n){if(!fs(t))throw Error(H(200));return ds(null,e,t,!1,n)},Ue.unmountComponentAtNode=function(e){if(!fs(e))throw Error(H(40));return e._reactRootContainer?(On(function(){ds(null,null,e,!1,function(){e._reactRootContainer=null,e[Dt]=null})}),!0):!1},Ue.unstable_batchedUpdates=ia,Ue.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!fs(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return ds(e,t,n,!1,r)},Ue.version="18.3.1-next-f1338f8080-20240426";function Dh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dh)}catch(e){console.error(e)}}Dh(),$c.exports=Ue;var uw=$c.exports,jh,Fh=uw;jh=Fh.createRoot,Fh.hydrateRoot;function Ee(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=Ee(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var aw={value:()=>{}};function ps(){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 gs(n)}function gs(e){this._=e}function cw(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}})}gs.prototype=ps.prototype={constructor:gs,on:function(e,t){var n=this._,r=cw(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=fw(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]=Vh(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Vh(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 gs(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 fw(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Vh(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=aw,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var ga="http://www.w3.org/1999/xhtml";const Hh={svg:"http://www.w3.org/2000/svg",xhtml:ga,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ms(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Hh.hasOwnProperty(t)?{space:Hh[t],local:e}:e}function dw(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ga&&t.documentElement.namespaceURI===ga?t.createElement(e):t.createElementNS(n,e)}}function hw(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Bh(e){var t=ms(e);return(t.local?hw:dw)(t)}function pw(){}function ma(e){return e==null?pw:function(){return this.querySelector(e)}}function gw(e){typeof e!="function"&&(e=ma(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,c=0;c<s;++c)(u=i[c])&&(a=e.call(u,u.__data__,c,i))&&("__data__"in u&&(a.__data__=u.__data__),l[c]=a);return new Ze(r,this._parents)}function mw(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function yw(){return[]}function Wh(e){return e==null?yw:function(){return this.querySelectorAll(e)}}function vw(e){return function(){return mw(e.apply(this,arguments))}}function ww(e){typeof e=="function"?e=vw(e):e=Wh(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 Ze(r,o)}function Uh(e){return function(){return this.matches(e)}}function Yh(e){return function(t){return t.matches(e)}}var xw=Array.prototype.find;function Ew(e){return function(){return xw.call(this.children,e)}}function _w(){return this.firstElementChild}function Sw(e){return this.select(e==null?_w:Ew(typeof e=="function"?e:Yh(e)))}var kw=Array.prototype.filter;function Nw(){return Array.from(this.children)}function Cw(e){return function(){return kw.call(this.children,e)}}function Mw(e){return this.selectAll(e==null?Nw:Cw(typeof e=="function"?e:Yh(e)))}function Iw(e){typeof e!="function"&&(e=Uh(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 Ze(r,this._parents)}function Xh(e){return new Array(e.length)}function Pw(){return new Ze(this._enter||this._groups.map(Xh),this._parents)}function ys(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ys.prototype={constructor:ys,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 Lw(e){return function(){return e}}function Tw(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 ys(e,i[s]);for(;s<u;++s)(l=t[s])&&(o[s]=l)}function $w(e,t,n,r,o,i,s){var l,u,a=new Map,c=t.length,f=i.length,d=new Array(c),g;for(l=0;l<c;++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<f;++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 ys(e,i[l]);for(l=0;l<c;++l)(u=t[l])&&a.get(d[l])===u&&(o[l]=u)}function zw(e){return e.__data__}function bw(e,t){if(!arguments.length)return Array.from(this,zw);var n=t?$w:Tw,r=this._parents,o=this._groups;typeof e!="function"&&(e=Lw(e));for(var i=o.length,s=new Array(i),l=new Array(i),u=new Array(i),a=0;a<i;++a){var c=r[a],f=o[a],d=f.length,g=Ow(e.call(c,c&&c.__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(c,f,w,x,p,g,t);for(var y=0,h=0,v,_;y<m;++y)if(v=w[y]){for(y>=h&&(h=y+1);!(_=x[h])&&++h<m;);v._next=_||null}}return s=new Ze(s,r),s._enter=l,s._exit=u,s}function Ow(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Rw(){return new Ze(this._exit||this._groups.map(Xh),this._parents)}function Aw(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 Dw(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],c=r[u],f=a.length,d=l[u]=new Array(f),g,m=0;m<f;++m)(g=a[m]||c[m])&&(d[m]=g);for(;u<o;++u)l[u]=n[u];return new Ze(l,this._parents)}function jw(){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 Fw(e){e||(e=Vw);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],l=s.length,u=o[i]=new Array(l),a,c=0;c<l;++c)(a=s[c])&&(u[c]=a);u.sort(t)}return new Ze(o,this._parents).order()}function Vw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Hw(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Bw(){return Array.from(this)}function Ww(){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 Uw(){let e=0;for(const t of this)++e;return e}function Yw(){return!this.node()}function Xw(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 Gw(e){return function(){this.removeAttribute(e)}}function Qw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Kw(e,t){return function(){this.setAttribute(e,t)}}function Zw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function qw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Jw(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 e1(e,t){var n=ms(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?Qw:Gw:typeof t=="function"?n.local?Jw:qw:n.local?Zw:Kw)(n,t))}function Gh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function t1(e){return function(){this.style.removeProperty(e)}}function n1(e,t,n){return function(){this.style.setProperty(e,t,n)}}function r1(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function o1(e,t,n){return arguments.length>1?this.each((t==null?t1:typeof t=="function"?r1:n1)(e,t,n??"")):Ir(this.node(),e)}function Ir(e,t){return e.style.getPropertyValue(t)||Gh(e).getComputedStyle(e,null).getPropertyValue(t)}function i1(e){return function(){delete this[e]}}function s1(e,t){return function(){this[e]=t}}function l1(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function u1(e,t){return arguments.length>1?this.each((t==null?i1:typeof t=="function"?l1:s1)(e,t)):this.node()[e]}function Qh(e){return e.trim().split(/^|\s+/)}function ya(e){return e.classList||new Kh(e)}function Kh(e){this._node=e,this._names=Qh(e.getAttribute("class")||"")}Kh.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 Zh(e,t){for(var n=ya(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function qh(e,t){for(var n=ya(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function a1(e){return function(){Zh(this,e)}}function c1(e){return function(){qh(this,e)}}function f1(e,t){return function(){(t.apply(this,arguments)?Zh:qh)(this,e)}}function d1(e,t){var n=Qh(e+"");if(arguments.length<2){for(var r=ya(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?f1:t?a1:c1)(n,t))}function h1(){this.textContent=""}function p1(e){return function(){this.textContent=e}}function g1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function m1(e){return arguments.length?this.each(e==null?h1:(typeof e=="function"?g1:p1)(e)):this.node().textContent}function y1(){this.innerHTML=""}function v1(e){return function(){this.innerHTML=e}}function w1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function x1(e){return arguments.length?this.each(e==null?y1:(typeof e=="function"?w1:v1)(e)):this.node().innerHTML}function E1(){this.nextSibling&&this.parentNode.appendChild(this)}function _1(){return this.each(E1)}function S1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function k1(){return this.each(S1)}function N1(e){var t=typeof e=="function"?e:Bh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function C1(){return null}function M1(e,t){var n=typeof e=="function"?e:Bh(e),r=t==null?C1:typeof t=="function"?t:ma(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function I1(){var e=this.parentNode;e&&e.removeChild(this)}function P1(){return this.each(I1)}function L1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function T1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $1(e){return this.select(e?T1:L1)}function z1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function b1(e){return function(t){e.call(this,t,this.__data__)}}function O1(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 R1(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 A1(e,t,n){return function(){var r=this.__on,o,i=b1(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 D1(e,t,n){var r=O1(e+""),o,i=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,a=l.length,c;u<a;++u)for(o=0,c=l[u];o<i;++o)if((s=r[o]).type===c.type&&s.name===c.name)return c.value}return}for(l=t?A1:R1,o=0;o<i;++o)this.each(l(r[o],t,n));return this}function Jh(e,t,n){var r=Gh(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 j1(e,t){return function(){return Jh(this,e,t)}}function F1(e,t){return function(){return Jh(this,e,t.apply(this,arguments))}}function V1(e,t){return this.each((typeof t=="function"?F1:j1)(e,t))}function*H1(){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 ep=[null];function Ze(e,t){this._groups=e,this._parents=t}function $o(){return new Ze([[document.documentElement]],ep)}function B1(){return this}Ze.prototype=$o.prototype={constructor:Ze,select:gw,selectAll:ww,selectChild:Sw,selectChildren:Mw,filter:Iw,data:bw,enter:Pw,exit:Rw,join:Aw,merge:Dw,selection:B1,order:jw,sort:Fw,call:Hw,nodes:Bw,node:Ww,size:Uw,empty:Yw,each:Xw,attr:e1,style:o1,property:u1,classed:d1,text:m1,html:x1,raise:_1,lower:k1,append:N1,insert:M1,remove:P1,clone:$1,datum:z1,on:D1,dispatch:V1,[Symbol.iterator]:H1};function qe(e){return typeof e=="string"?new Ze([[document.querySelector(e)]],[document.documentElement]):new Ze([[e]],ep)}function W1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function pt(e,t){if(e=W1(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 U1={passive:!1},zo={capture:!0,passive:!1};function va(e){e.stopImmediatePropagation()}function Pr(e){e.preventDefault(),e.stopImmediatePropagation()}function tp(e){var t=e.document.documentElement,n=qe(e).on("dragstart.drag",Pr,zo);"onselectstart"in t?n.on("selectstart.drag",Pr,zo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function np(e,t){var n=e.document.documentElement,r=qe(e).on("dragstart.drag",null);t&&(r.on("click.drag",Pr,zo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const vs=e=>()=>e;function wa(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:l,dx:u,dy:a,dispatch:c}){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:c}})}wa.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Y1(e){return!e.ctrlKey&&!e.button}function X1(){return this.parentNode}function G1(e,t){return t??{x:e.x,y:e.y}}function Q1(){return navigator.maxTouchPoints||"ontouchstart"in this}function rp(){var e=Y1,t=X1,n=G1,r=Q1,o={},i=ps("start","drag","end"),s=0,l,u,a,c,f=0;function d(v){v.on("mousedown.drag",g).filter(r).on("touchstart.drag",x).on("touchmove.drag",p,U1).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(v,_){if(!(c||!e.call(this,v,_))){var S=h(this,t.call(this,v,_),v,_,"mouse");S&&(qe(v.view).on("mousemove.drag",m,zo).on("mouseup.drag",w,zo),tp(v.view),va(v),a=!1,l=v.clientX,u=v.clientY,S("start",v))}}function m(v){if(Pr(v),!a){var _=v.clientX-l,S=v.clientY-u;a=_*_+S*S>f}o.mouse("drag",v)}function w(v){qe(v.view).on("mousemove.drag mouseup.drag",null),np(v.view,a),Pr(v),o.mouse("end",v)}function x(v,_){if(e.call(this,v,_)){var S=v.changedTouches,k=t.call(this,v,_),C=S.length,$,b;for($=0;$<C;++$)(b=h(this,k,v,_,S[$].identifier,S[$]))&&(va(v),b("start",v,S[$]))}}function p(v){var _=v.changedTouches,S=_.length,k,C;for(k=0;k<S;++k)(C=o[_[k].identifier])&&(Pr(v),C("drag",v,_[k]))}function y(v){var _=v.changedTouches,S=_.length,k,C;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),k=0;k<S;++k)(C=o[_[k].identifier])&&(va(v),C("end",v,_[k]))}function h(v,_,S,k,C,$){var b=i.copy(),P=pt($||S,_),z,F,E;if((E=n.call(v,new wa("beforestart",{sourceEvent:S,target:d,identifier:C,active:s,x:P[0],y:P[1],dx:0,dy:0,dispatch:b}),k))!=null)return z=E.x-P[0]||0,F=E.y-P[1]||0,function T(I,O,M){var N=P,R;switch(I){case"start":o[C]=T,R=s++;break;case"end":delete o[C],--s;case"drag":P=pt(M||O,_),R=s;break}b.call(I,v,new wa(I,{sourceEvent:O,subject:E,target:d,identifier:C,active:R,x:P[0]+z,y:P[1]+F,dx:P[0]-N[0],dy:P[1]-N[1],dispatch:b}),k)}}return d.filter=function(v){return arguments.length?(e=typeof v=="function"?v:vs(!!v),d):e},d.container=function(v){return arguments.length?(t=typeof v=="function"?v:vs(v),d):t},d.subject=function(v){return arguments.length?(n=typeof v=="function"?v:vs(v),d):n},d.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:vs(!!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?(f=(v=+v)*v,d):Math.sqrt(f)},d}function xa(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function op(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function bo(){}var Oo=.7,ws=1/Oo,Lr="\\s*([+-]?\\d+)\\s*",Ro="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",It="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",K1=/^#([0-9a-f]{3,8})$/,Z1=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),q1=new RegExp(`^rgb\\(${It},${It},${It}\\)$`),J1=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${Ro}\\)$`),ex=new RegExp(`^rgba\\(${It},${It},${It},${Ro}\\)$`),tx=new RegExp(`^hsl\\(${Ro},${It},${It}\\)$`),nx=new RegExp(`^hsla\\(${Ro},${It},${It},${Ro}\\)$`),ip={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};xa(bo,jn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:sp,formatHex:sp,formatHex8:rx,formatHsl:ox,formatRgb:lp,toString:lp});function sp(){return this.rgb().formatHex()}function rx(){return this.rgb().formatHex8()}function ox(){return dp(this).formatHsl()}function lp(){return this.rgb().formatRgb()}function jn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=K1.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?up(t):n===3?new We(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?xs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?xs(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=Z1.exec(e))?new We(t[1],t[2],t[3],1):(t=q1.exec(e))?new We(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=J1.exec(e))?xs(t[1],t[2],t[3],t[4]):(t=ex.exec(e))?xs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=tx.exec(e))?fp(t[1],t[2]/100,t[3]/100,1):(t=nx.exec(e))?fp(t[1],t[2]/100,t[3]/100,t[4]):ip.hasOwnProperty(e)?up(ip[e]):e==="transparent"?new We(NaN,NaN,NaN,0):null}function up(e){return new We(e>>16&255,e>>8&255,e&255,1)}function xs(e,t,n,r){return r<=0&&(e=t=n=NaN),new We(e,t,n,r)}function ix(e){return e instanceof bo||(e=jn(e)),e?(e=e.rgb(),new We(e.r,e.g,e.b,e.opacity)):new We}function Ea(e,t,n,r){return arguments.length===1?ix(e):new We(e,t,n,r??1)}function We(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}xa(We,Ea,op(bo,{brighter(e){return e=e==null?ws:Math.pow(ws,e),new We(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Oo:Math.pow(Oo,e),new We(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new We(Fn(this.r),Fn(this.g),Fn(this.b),Es(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:ap,formatHex:ap,formatHex8:sx,formatRgb:cp,toString:cp}));function ap(){return`#${Vn(this.r)}${Vn(this.g)}${Vn(this.b)}`}function sx(){return`#${Vn(this.r)}${Vn(this.g)}${Vn(this.b)}${Vn((isNaN(this.opacity)?1:this.opacity)*255)}`}function cp(){const e=Es(this.opacity);return`${e===1?"rgb(":"rgba("}${Fn(this.r)}, ${Fn(this.g)}, ${Fn(this.b)}${e===1?")":`, ${e})`}`}function Es(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vn(e){return e=Fn(e),(e<16?"0":"")+e.toString(16)}function fp(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gt(e,t,n,r)}function dp(e){if(e instanceof gt)return new gt(e.h,e.s,e.l,e.opacity);if(e instanceof bo||(e=jn(e)),!e)return new gt;if(e instanceof gt)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 gt(s,l,u,e.opacity)}function lx(e,t,n,r){return arguments.length===1?dp(e):new gt(e,t,n,r??1)}function gt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}xa(gt,lx,op(bo,{brighter(e){return e=e==null?ws:Math.pow(ws,e),new gt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Oo:Math.pow(Oo,e),new gt(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 We(_a(e>=240?e-240:e+120,o,r),_a(e,o,r),_a(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new gt(hp(this.h),_s(this.s),_s(this.l),Es(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=Es(this.opacity);return`${e===1?"hsl(":"hsla("}${hp(this.h)}, ${_s(this.s)*100}%, ${_s(this.l)*100}%${e===1?")":`, ${e})`}`}}));function hp(e){return e=(e||0)%360,e<0?e+360:e}function _s(e){return Math.max(0,Math.min(1,e||0))}function _a(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 Sa=e=>()=>e;function ux(e,t){return function(n){return e+n*t}}function ax(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 cx(e){return(e=+e)==1?pp:function(t,n){return n-t?ax(t,n,e):Sa(isNaN(t)?n:t)}}function pp(e,t){var n=t-e;return n?ux(e,n):Sa(isNaN(e)?t:e)}const Ss=function e(t){var n=cx(t);function r(o,i){var s=n((o=Ea(o)).r,(i=Ea(i)).r),l=n(o.g,i.g),u=n(o.b,i.b),a=pp(o.opacity,i.opacity);return function(c){return o.r=s(c),o.g=l(c),o.b=u(c),o.opacity=a(c),o+""}}return r.gamma=e,r}(1);function fx(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 dx(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function hx(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]=Ao(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 px(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Pt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function gx(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]=Ao(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var ka=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Na=new RegExp(ka.source,"g");function mx(e){return function(){return e}}function yx(e){return function(t){return e(t)+""}}function gp(e,t){var n=ka.lastIndex=Na.lastIndex=0,r,o,i,s=-1,l=[],u=[];for(e=e+"",t=t+"";(r=ka.exec(e))&&(o=Na.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:Pt(r,o)})),n=Na.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?u[0]?yx(u[0].x):mx(t):(t=u.length,function(a){for(var c=0,f;c<t;++c)l[(f=u[c]).i]=f.x(a);return l.join("")})}function Ao(e,t){var n=typeof t,r;return t==null||n==="boolean"?Sa(t):(n==="number"?Pt:n==="string"?(r=jn(t))?(t=r,Ss):gp:t instanceof jn?Ss:t instanceof Date?px:dx(t)?fx:Array.isArray(t)?hx:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?gx:Pt)(e,t)}var mp=180/Math.PI,Ca={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function yp(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)*mp,skewX:Math.atan(u)*mp,scaleX:s,scaleY:l}}var ks;function vx(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ca:yp(t.a,t.b,t.c,t.d,t.e,t.f)}function wx(e){return e==null||(ks||(ks=document.createElementNS("http://www.w3.org/2000/svg","g")),ks.setAttribute("transform",e),!(e=ks.transform.baseVal.consolidate()))?Ca:(e=e.matrix,yp(e.a,e.b,e.c,e.d,e.e,e.f))}function vp(e,t,n,r){function o(a){return a.length?a.pop()+" ":""}function i(a,c,f,d,g,m){if(a!==f||c!==d){var w=g.push("translate(",null,t,null,n);m.push({i:w-4,x:Pt(a,f)},{i:w-2,x:Pt(c,d)})}else(f||d)&&g.push("translate("+f+t+d+n)}function s(a,c,f,d){a!==c?(a-c>180?c+=360:c-a>180&&(a+=360),d.push({i:f.push(o(f)+"rotate(",null,r)-2,x:Pt(a,c)})):c&&f.push(o(f)+"rotate("+c+r)}function l(a,c,f,d){a!==c?d.push({i:f.push(o(f)+"skewX(",null,r)-2,x:Pt(a,c)}):c&&f.push(o(f)+"skewX("+c+r)}function u(a,c,f,d,g,m){if(a!==f||c!==d){var w=g.push(o(g)+"scale(",null,",",null,")");m.push({i:w-4,x:Pt(a,f)},{i:w-2,x:Pt(c,d)})}else(f!==1||d!==1)&&g.push(o(g)+"scale("+f+","+d+")")}return function(a,c){var f=[],d=[];return a=e(a),c=e(c),i(a.translateX,a.translateY,c.translateX,c.translateY,f,d),s(a.rotate,c.rotate,f,d),l(a.skewX,c.skewX,f,d),u(a.scaleX,a.scaleY,c.scaleX,c.scaleY,f,d),a=c=null,function(g){for(var m=-1,w=d.length,x;++m<w;)f[(x=d[m]).i]=x.x(g);return f.join("")}}}var xx=vp(vx,"px, ","px)","deg)"),Ex=vp(wx,", ",")",")"),_x=1e-12;function wp(e){return((e=Math.exp(e))+1/e)/2}function Sx(e){return((e=Math.exp(e))-1/e)/2}function kx(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ns=function e(t,n,r){function o(i,s){var l=i[0],u=i[1],a=i[2],c=s[0],f=s[1],d=s[2],g=c-l,m=f-u,w=g*g+m*m,x,p;if(w<_x)p=Math.log(d/a)/t,x=function(k){return[l+k*g,u+k*m,a*Math.exp(t*k*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),_=Math.log(Math.sqrt(h*h+1)-h),S=Math.log(Math.sqrt(v*v+1)-v);p=(S-_)/t,x=function(k){var C=k*p,$=wp(_),b=a/(n*y)*($*kx(t*C+_)-Sx(_));return[l+b*g,u+b*m,a*$/wp(t*C+_)]}}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 Tr=0,Do=0,jo=0,xp=1e3,Cs,Fo,Ms=0,Hn=0,Is=0,Vo=typeof performance=="object"&&performance.now?performance:Date,Ep=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ma(){return Hn||(Ep(Nx),Hn=Vo.now()+Is)}function Nx(){Hn=0}function Ps(){this._call=this._time=this._next=null}Ps.prototype=_p.prototype={constructor:Ps,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ma():+n)+(t==null?0:+t),!this._next&&Fo!==this&&(Fo?Fo._next=this:Cs=this,Fo=this),this._call=e,this._time=n,Ia()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ia())}};function _p(e,t,n){var r=new Ps;return r.restart(e,t,n),r}function Cx(){Ma(),++Tr;for(var e=Cs,t;e;)(t=Hn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Tr}function Sp(){Hn=(Ms=Vo.now())+Is,Tr=Do=0;try{Cx()}finally{Tr=0,Ix(),Hn=0}}function Mx(){var e=Vo.now(),t=e-Ms;t>xp&&(Is-=t,Ms=e)}function Ix(){for(var e,t=Cs,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:Cs=n);Fo=e,Ia(r)}function Ia(e){if(!Tr){Do&&(Do=clearTimeout(Do));var t=e-Hn;t>24?(e<1/0&&(Do=setTimeout(Sp,e-Vo.now()-Is)),jo&&(jo=clearInterval(jo))):(jo||(Ms=Vo.now(),jo=setInterval(Mx,xp)),Tr=1,Ep(Sp))}}function kp(e,t,n){var r=new Ps;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var Px=ps("start","end","cancel","interrupt"),Lx=[],Np=0,Cp=1,Pa=2,Ls=3,Mp=4,La=5,Ts=6;function $s(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;Tx(e,n,{name:t,index:r,group:o,on:Px,tween:Lx,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Np})}function Ta(e,t){var n=mt(e,t);if(n.state>Np)throw new Error("too late; already scheduled");return n}function Lt(e,t){var n=mt(e,t);if(n.state>Ls)throw new Error("too late; already running");return n}function mt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Tx(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=_p(i,0,n.time);function i(a){n.state=Cp,n.timer.restart(s,n.delay,n.time),n.delay<=a&&s(a-n.delay)}function s(a){var c,f,d,g;if(n.state!==Cp)return u();for(c in r)if(g=r[c],g.name===n.name){if(g.state===Ls)return kp(s);g.state===Mp?(g.state=Ts,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[c]):+c<t&&(g.state=Ts,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[c])}if(kp(function(){n.state===Ls&&(n.state=Mp,n.timer.restart(l,n.delay,n.time),l(a))}),n.state=Pa,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Pa){for(n.state=Ls,o=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(g=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(o[++f]=g);o.length=f+1}}function l(a){for(var c=a<n.duration?n.ease.call(null,a/n.duration):(n.timer.restart(u),n.state=La,1),f=-1,d=o.length;++f<d;)o[f].call(e,c);n.state===La&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=Ts,n.timer.stop(),delete r[t];for(var a in r)return;delete e.__transition}}function zs(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>Pa&&r.state<La,r.state=Ts,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function $x(e){return this.each(function(){zs(this,e)})}function zx(e,t){var n,r;return function(){var o=Lt(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 bx(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Lt(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 Ox(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=mt(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?zx:bx)(n,e,t))}function $a(e,t,n){var r=e._id;return e.each(function(){var o=Lt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return mt(o,r).value[t]}}function Ip(e,t){var n;return(typeof t=="number"?Pt:t instanceof jn?Ss:(n=jn(t))?(t=n,Ss):gp)(e,t)}function Rx(e){return function(){this.removeAttribute(e)}}function Ax(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Dx(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 jx(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 Fx(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 Vx(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 Hx(e,t){var n=ms(e),r=n==="transform"?Ex:Ip;return this.attrTween(e,typeof t=="function"?(n.local?Vx:Fx)(n,r,$a(this,"attr."+e,t)):t==null?(n.local?Ax:Rx)(n):(n.local?jx:Dx)(n,r,t))}function Bx(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Wx(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Ux(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Wx(e,i)),n}return o._value=t,o}function Yx(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Bx(e,i)),n}return o._value=t,o}function Xx(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=ms(e);return this.tween(n,(r.local?Ux:Yx)(r,t))}function Gx(e,t){return function(){Ta(this,e).delay=+t.apply(this,arguments)}}function Qx(e,t){return t=+t,function(){Ta(this,e).delay=t}}function Kx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Gx:Qx)(t,e)):mt(this.node(),t).delay}function Zx(e,t){return function(){Lt(this,e).duration=+t.apply(this,arguments)}}function qx(e,t){return t=+t,function(){Lt(this,e).duration=t}}function Jx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Zx:qx)(t,e)):mt(this.node(),t).duration}function eE(e,t){if(typeof t!="function")throw new Error;return function(){Lt(this,e).ease=t}}function tE(e){var t=this._id;return arguments.length?this.each(eE(t,e)):mt(this.node(),t).ease}function nE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Lt(this,e).ease=n}}function rE(e){if(typeof e!="function")throw new Error;return this.each(nE(this._id,e))}function oE(e){typeof e!="function"&&(e=Uh(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 Yt(r,this._parents,this._name,this._id)}function iE(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],c=u.length,f=s[l]=new Array(c),d,g=0;g<c;++g)(d=u[g]||a[g])&&(f[g]=d);for(;l<r;++l)s[l]=t[l];return new Yt(s,this._parents,this._name,this._id)}function sE(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 lE(e,t,n){var r,o,i=sE(t)?Ta:Lt;return function(){var s=i(this,e),l=s.on;l!==r&&(o=(r=l).copy()).on(t,n),s.on=o}}function uE(e,t){var n=this._id;return arguments.length<2?mt(this.node(),n).on.on(e):this.each(lE(n,e,t))}function aE(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function cE(){return this.on("end.remove",aE(this._id))}function fE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ma(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),c,f,d=0;d<u;++d)(c=l[d])&&(f=e.call(c,c.__data__,d,l))&&("__data__"in c&&(f.__data__=c.__data__),a[d]=f,$s(a[d],t,n,d,a,mt(c,n)));return new Yt(i,this._parents,t,n)}function dE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Wh(e));for(var r=this._groups,o=r.length,i=[],s=[],l=0;l<o;++l)for(var u=r[l],a=u.length,c,f=0;f<a;++f)if(c=u[f]){for(var d=e.call(c,c.__data__,f,u),g,m=mt(c,n),w=0,x=d.length;w<x;++w)(g=d[w])&&$s(g,t,n,w,d,m);i.push(d),s.push(c)}return new Yt(i,s,t,n)}var hE=$o.prototype.constructor;function pE(){return new hE(this._groups,this._parents)}function gE(e,t){var n,r,o;return function(){var i=Ir(this,e),s=(this.style.removeProperty(e),Ir(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function Pp(e){return function(){this.style.removeProperty(e)}}function mE(e,t,n){var r,o=n+"",i;return function(){var s=Ir(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function yE(e,t,n){var r,o,i;return function(){var s=Ir(this,e),l=n(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),Ir(this,e))),s===u?null:s===r&&u===o?i:(o=u,i=t(r=s,l))}}function vE(e,t){var n,r,o,i="style."+t,s="end."+i,l;return function(){var u=Lt(this,e),a=u.on,c=u.value[i]==null?l||(l=Pp(t)):void 0;(a!==n||o!==c)&&(r=(n=a).copy()).on(s,o=c),u.on=r}}function wE(e,t,n){var r=(e+="")=="transform"?xx:Ip;return t==null?this.styleTween(e,gE(e,r)).on("end.style."+e,Pp(e)):typeof t=="function"?this.styleTween(e,yE(e,r,$a(this,"style."+e,t))).each(vE(this._id,e)):this.styleTween(e,mE(e,r,t),n).on("end.style."+e,null)}function xE(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function EE(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&xE(e,s,n)),r}return i._value=t,i}function _E(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,EE(e,t,n??""))}function SE(e){return function(){this.textContent=e}}function kE(e){return function(){var t=e(this);this.textContent=t??""}}function NE(e){return this.tween("text",typeof e=="function"?kE($a(this,"text",e)):SE(e==null?"":e+""))}function CE(e){return function(t){this.textContent=e.call(this,t)}}function ME(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&CE(o)),t}return r._value=e,r}function IE(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,ME(e))}function PE(){for(var e=this._name,t=this._id,n=Lp(),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 c=mt(u,t);$s(u,e,n,a,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Yt(r,this._parents,e,n)}function LE(){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=Lt(this,r),c=a.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),a.on=t}),o===0&&i()})}var TE=0;function Yt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Lp(){return++TE}var Xt=$o.prototype;Yt.prototype={constructor:Yt,select:fE,selectAll:dE,selectChild:Xt.selectChild,selectChildren:Xt.selectChildren,filter:oE,merge:iE,selection:pE,transition:PE,call:Xt.call,nodes:Xt.nodes,node:Xt.node,size:Xt.size,empty:Xt.empty,each:Xt.each,on:uE,attr:Hx,attrTween:Xx,style:wE,styleTween:_E,text:NE,textTween:IE,remove:cE,tween:Ox,delay:Kx,duration:Jx,ease:tE,easeVarying:rE,end:LE,[Symbol.iterator]:Xt[Symbol.iterator]};function $E(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var zE={time:null,delay:0,duration:250,ease:$E};function bE(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 OE(e){var t,n;e instanceof Yt?(t=e._id,e=e._name):(t=Lp(),(n=zE).time=Ma(),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])&&$s(u,e,t,a,s,n||bE(u,t));return new Yt(r,this._parents,e,t)}$o.prototype.interrupt=$x,$o.prototype.transition=OE;const bs=e=>()=>e;function RE(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 Gt(e,t,n){this.k=e,this.x=t,this.y=n}Gt.prototype={constructor:Gt,scale:function(e){return e===1?this:new Gt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Gt(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 Os=new Gt(1,0,0);Tp.prototype=Gt.prototype;function Tp(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Os;return e.__zoom}function za(e){e.stopImmediatePropagation()}function Ho(e){e.preventDefault(),e.stopImmediatePropagation()}function AE(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function DE(){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 $p(){return this.__zoom||Os}function jE(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function FE(){return navigator.maxTouchPoints||"ontouchstart"in this}function VE(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 zp(){var e=AE,t=DE,n=VE,r=jE,o=FE,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,u=Ns,a=ps("start","zoom","end"),c,f,d,g=500,m=150,w=0,x=10;function p(E){E.property("__zoom",$p).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",b).filter(o).on("touchstart.zoom",P).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(E,T,I,O){var M=E.selection?E.selection():E;M.property("__zoom",$p),E!==M?_(E,T,I,O):M.interrupt().each(function(){S(this,arguments).event(O).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},p.scaleBy=function(E,T,I,O){p.scaleTo(E,function(){var M=this.__zoom.k,N=typeof T=="function"?T.apply(this,arguments):T;return M*N},I,O)},p.scaleTo=function(E,T,I,O){p.transform(E,function(){var M=t.apply(this,arguments),N=this.__zoom,R=I==null?v(M):typeof I=="function"?I.apply(this,arguments):I,j=N.invert(R),D=typeof T=="function"?T.apply(this,arguments):T;return n(h(y(N,D),R,j),M,s)},I,O)},p.translateBy=function(E,T,I,O){p.transform(E,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),s)},null,O)},p.translateTo=function(E,T,I,O,M){p.transform(E,function(){var N=t.apply(this,arguments),R=this.__zoom,j=O==null?v(N):typeof O=="function"?O.apply(this,arguments):O;return n(Os.translate(j[0],j[1]).scale(R.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof I=="function"?-I.apply(this,arguments):-I),N,s)},O,M)};function y(E,T){return T=Math.max(i[0],Math.min(i[1],T)),T===E.k?E:new Gt(T,E.x,E.y)}function h(E,T,I){var O=T[0]-I[0]*E.k,M=T[1]-I[1]*E.k;return O===E.x&&M===E.y?E:new Gt(E.k,O,M)}function v(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function _(E,T,I,O){E.on("start.zoom",function(){S(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(O).end()}).tween("zoom",function(){var M=this,N=arguments,R=S(M,N).event(O),j=t.apply(M,N),D=I==null?v(j):typeof I=="function"?I.apply(M,N):I,W=Math.max(j[1][0]-j[0][0],j[1][1]-j[0][1]),U=M.__zoom,Z=typeof T=="function"?T.apply(M,N):T,q=u(U.invert(D).concat(W/U.k),Z.invert(D).concat(W/Z.k));return function(G){if(G===1)G=Z;else{var V=q(G),B=W/V[2];G=new Gt(B,D[0]-V[0]*B,D[1]-V[1]*B)}R.zoom(null,G)}})}function S(E,T,I){return!I&&E.__zooming||new k(E,T)}function k(E,T){this.that=E,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,T),this.taps=0}k.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,T){return this.mouse&&E!=="mouse"&&(this.mouse[1]=T.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=T.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=T.invert(this.touch1[0])),this.that.__zoom=T,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var T=qe(this.that).datum();a.call(E,this.that,new RE(E,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:a}),T)}};function C(E,...T){if(!e.apply(this,arguments))return;var I=S(this,T).event(E),O=this.__zoom,M=Math.max(i[0],Math.min(i[1],O.k*Math.pow(2,r.apply(this,arguments)))),N=pt(E);if(I.wheel)(I.mouse[0][0]!==N[0]||I.mouse[0][1]!==N[1])&&(I.mouse[1]=O.invert(I.mouse[0]=N)),clearTimeout(I.wheel);else{if(O.k===M)return;I.mouse=[N,O.invert(N)],zs(this),I.start()}Ho(E),I.wheel=setTimeout(R,m),I.zoom("mouse",n(h(y(O,M),I.mouse[0],I.mouse[1]),I.extent,s));function R(){I.wheel=null,I.end()}}function $(E,...T){if(d||!e.apply(this,arguments))return;var I=E.currentTarget,O=S(this,T,!0).event(E),M=qe(E.view).on("mousemove.zoom",D,!0).on("mouseup.zoom",W,!0),N=pt(E,I),R=E.clientX,j=E.clientY;tp(E.view),za(E),O.mouse=[N,this.__zoom.invert(N)],zs(this),O.start();function D(U){if(Ho(U),!O.moved){var Z=U.clientX-R,q=U.clientY-j;O.moved=Z*Z+q*q>w}O.event(U).zoom("mouse",n(h(O.that.__zoom,O.mouse[0]=pt(U,I),O.mouse[1]),O.extent,s))}function W(U){M.on("mousemove.zoom mouseup.zoom",null),np(U.view,O.moved),Ho(U),O.event(U).end()}}function b(E,...T){if(e.apply(this,arguments)){var I=this.__zoom,O=pt(E.changedTouches?E.changedTouches[0]:E,this),M=I.invert(O),N=I.k*(E.shiftKey?.5:2),R=n(h(y(I,N),O,M),t.apply(this,T),s);Ho(E),l>0?qe(this).transition().duration(l).call(_,R,O,E):qe(this).call(p.transform,R,O,E)}}function P(E,...T){if(e.apply(this,arguments)){var I=E.touches,O=I.length,M=S(this,T,E.changedTouches.length===O).event(E),N,R,j,D;for(za(E),R=0;R<O;++R)j=I[R],D=pt(j,this),D=[D,this.__zoom.invert(D),j.identifier],M.touch0?!M.touch1&&M.touch0[2]!==D[2]&&(M.touch1=D,M.taps=0):(M.touch0=D,N=!0,M.taps=1+!!c);c&&(c=clearTimeout(c)),N&&(M.taps<2&&(f=D[0],c=setTimeout(function(){c=null},g)),zs(this),M.start())}}function z(E,...T){if(this.__zooming){var I=S(this,T).event(E),O=E.changedTouches,M=O.length,N,R,j,D;for(Ho(E),N=0;N<M;++N)R=O[N],j=pt(R,this),I.touch0&&I.touch0[2]===R.identifier?I.touch0[0]=j:I.touch1&&I.touch1[2]===R.identifier&&(I.touch1[0]=j);if(R=I.that.__zoom,I.touch1){var W=I.touch0[0],U=I.touch0[1],Z=I.touch1[0],q=I.touch1[1],G=(G=Z[0]-W[0])*G+(G=Z[1]-W[1])*G,V=(V=q[0]-U[0])*V+(V=q[1]-U[1])*V;R=y(R,Math.sqrt(G/V)),j=[(W[0]+Z[0])/2,(W[1]+Z[1])/2],D=[(U[0]+q[0])/2,(U[1]+q[1])/2]}else if(I.touch0)j=I.touch0[0],D=I.touch0[1];else return;I.zoom("touch",n(h(R,j,D),I.extent,s))}}function F(E,...T){if(this.__zooming){var I=S(this,T).event(E),O=E.changedTouches,M=O.length,N,R;for(za(E),d&&clearTimeout(d),d=setTimeout(function(){d=null},g),N=0;N<M;++N)R=O[N],I.touch0&&I.touch0[2]===R.identifier?delete I.touch0:I.touch1&&I.touch1[2]===R.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(R=pt(R,this),Math.hypot(f[0]-R[0],f[1]-R[1])<x)){var j=qe(this).on("dblclick.zoom");j&&j.apply(this,arguments)}}}return p.wheelDelta=function(E){return arguments.length?(r=typeof E=="function"?E:bs(+E),p):r},p.filter=function(E){return arguments.length?(e=typeof E=="function"?E:bs(!!E),p):e},p.touchable=function(E){return arguments.length?(o=typeof E=="function"?E:bs(!!E),p):o},p.extent=function(E){return arguments.length?(t=typeof E=="function"?E:bs([[+E[0][0],+E[0][1]],[+E[1][0],+E[1][1]]]),p):t},p.scaleExtent=function(E){return arguments.length?(i[0]=+E[0],i[1]=+E[1],p):[i[0],i[1]]},p.translateExtent=function(E){return arguments.length?(s[0][0]=+E[0][0],s[1][0]=+E[1][0],s[0][1]=+E[0][1],s[1][1]=+E[1][1],p):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},p.constrain=function(E){return arguments.length?(n=E,p):n},p.duration=function(E){return arguments.length?(l=+E,p):l},p.interpolate=function(E){return arguments.length?(u=E,p):u},p.on=function(){var E=a.on.apply(a,arguments);return E===a?p:E},p.clickDistance=function(E){return arguments.length?(w=(E=+E)*E,p):Math.sqrt(w)},p.tapDistance=function(E){return arguments.length?(x=+E,p):x},p}const yt={error001:(e="react")=>`Seems like you have not used zustand provider as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id: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.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},Bo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],bp=["Enter"," ","Escape"],Op={"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 Bn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Bn||(Bn={}));var Wo;(function(e){e.Partial="partial",e.Full="full"})(Wo||(Wo={}));const Rp={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var En;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(En||(En={}));var Rs;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Rs||(Rs={}));var X;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(X||(X={}));const Ap={[X.Left]:X.Right,[X.Right]:X.Left,[X.Top]:X.Bottom,[X.Bottom]:X.Top};function Dp(e){return e===null?null:e?"valid":"invalid"}const jp=e=>"id"in e&&"source"in e&&"target"in e,HE=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),ba=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Uo=(e,t=[0,0])=>{const{width:n,height:r}=Qt(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},BE=(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):ba(o)?o:t.nodeLookup.get(o.id));const l=s?js(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return As(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ds(n)},Yo=(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=As(n,js(o)),r=!0)}),r?Ds(n):{x:0,y:0,width:0,height:0}},Oa=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{const l={...Or(t,[n,r,o]),width:t.width/o,height:t.height/o},u=[];for(const a of e.values()){const{measured:c,selectable:f=!0,hidden:d=!1}=a;if(s&&!f||d)continue;const g=c.width??a.width??a.initialWidth??null,m=c.height??a.height??a.initialHeight??null,w=Xo(l,br(a)),x=(g??0)*(m??0),p=i&&w>0;(!a.internals.handleBounds||p||w>=x||a.dragging)&&u.push(a)}return u},WE=(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 UE(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 YE({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return!0;const l=UE(e,s),u=Yo(l),a=Da(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}),!0}function Fp({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},c=s.origin??r;let f=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!l)i==null||i("005",yt.error005());else{const g=l.measured.width,m=l.measured.height;g&&m&&(f=[[u,a],[u+g,a+m]])}else l&&Un(s.extent)&&(f=[[s.extent[0][0]+u,s.extent[0][1]+a],[s.extent[1][0]+u,s.extent[1][1]+a]]);const d=Un(f)?Wn(t,f,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",yt.error015())),{position:{x:d.x-u+(s.measured.width??0)*c[0],y:d.y-a+(s.measured.height??0)*c[1]},positionAbsolute:d}}async function XE({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),c=WE(s,u);for(const d of u)l.has(d.id)&&!c.find(m=>m.id===d.id)&&c.push(d);if(!o)return{edges:c,nodes:s};const f=await o({nodes:s,edges:c});return typeof f=="boolean"?f?{edges:c,nodes:s}:{edges:[],nodes:[]}:f}const zr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Wn=(e={x:0,y:0},t,n)=>({x:zr(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:zr(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Vp(e,t,n){const{width:r,height:o}=Qt(n),{x:i,y:s}=n.internals.positionAbsolute;return Wn(e,[[i,s],[i+r,s+o]],t)}const Hp=(e,t,n)=>e<t?zr(Math.abs(e-t),1,t)/t:e>n?-zr(Math.abs(e-n),1,t)/t:0,Ra=(e,t,n=15,r=40)=>{const o=Hp(e.x,r,t.width-r)*n,i=Hp(e.y,r,t.height-r)*n;return[o,i]},As=(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)}),Aa=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Ds=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),br=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=ba(e)?e.internals.positionAbsolute:Uo(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}},js=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=ba(e)?e.internals.positionAbsolute:Uo(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)}},Bp=(e,t)=>Ds(As(Aa(e),Aa(t))),Xo=(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)},Wp=e=>vt(e.width)&&vt(e.height)&&vt(e.x)&&vt(e.y),vt=e=>!isNaN(e)&&isFinite(e),Up=(e,t)=>(n,r)=>{},Go=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Or=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?Go(l,s):l},Rr=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function Ar(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(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function GE(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Ar(e,n),o=Ar(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=Ar(e.top??e.y??0,n),o=Ar(e.bottom??e.y??0,n),i=Ar(e.left??e.x??0,t),s=Ar(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 QE(e,t,n,r,o,i){const{x:s,y:l}=Rr(e,[t,n,r]),{x:u,y:a}=Rr({x:e.x+e.width,y:e.y+e.height},[t,n,r]),c=o-u,f=i-a;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(c),bottom:Math.floor(f)}}const Da=(e,t,n,r,o,i)=>{const s=GE(i,t,n),l=(t-s.x)/e.width,u=(n-s.y)/e.height,a=Math.min(l,u),c=zr(a,r,o),f=e.x+e.width/2,d=e.y+e.height/2,g=t/2-f*c,m=n/2-d*c,w=QE(e,g,m,c,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:c}},Qo=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Un(e){return e!=null&&e!=="parent"}function Qt(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 Yp(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 Xp(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 Gp(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function KE(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function ZE(e){return{...Op,...e||{}}}function Ko(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:i,y:s}=wt(e),l=Or({x:i-((o==null?void 0:o.left)??0),y:s-((o==null?void 0:o.top)??0)},r),{x:u,y:a}=n?Go(l,t):l;return{xSnapped:u,ySnapped:a,...l}}const ja=e=>({width:e.offsetWidth,height:e.offsetHeight}),Qp=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},qE=["INPUT","SELECT","TEXTAREA"];function Kp(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:qE.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Zp=e=>"clientX"in e,wt=(e,t)=>{var i,s;const n=Zp(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)}},qp=(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,...ja(s)}})};function Jp({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,c=Math.abs(u-e),f=Math.abs(a-t);return[u,a,c,f]}function Fs(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function eg({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case X.Left:return[t-Fs(t-r,i),n];case X.Right:return[t+Fs(r-t,i),n];case X.Top:return[t,n-Fs(n-o,i)];case X.Bottom:return[t,n+Fs(o-n,i)]}}function tg({sourceX:e,sourceY:t,sourcePosition:n=X.Bottom,targetX:r,targetY:o,targetPosition:i=X.Top,curvature:s=.25}){const[l,u]=eg({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[a,c]=eg({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[f,d,g,m]=Jp({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:u,targetControlX:a,targetControlY:c});return[`M${e},${t} C${l},${u} ${a},${c} ${r},${o}`,f,d,g,m]}function ng({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 JE({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 e_({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const i=As(js(e),js(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 Xo(s,Ds(i))>0}const t_=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,n_=(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)),r_=(e,t,n={})=>{var i;if(!e.source||!e.target)return(i=n.onError)==null||i.call(n,"006",yt.error006()),t;const r=n.getEdgeId||t_;let o;return jp(e)?o={...e}:o={...e,id:r(e)},n_(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function rg({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,l]=ng({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,l]}const og={[X.Left]:{x:-1,y:0},[X.Right]:{x:1,y:0},[X.Top]:{x:0,y:-1},[X.Bottom]:{x:0,y:1}},o_=({source:e,sourcePosition:t=X.Bottom,target:n})=>t===X.Left||t===X.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},ig=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function i_({source:e,sourcePosition:t=X.Bottom,target:n,targetPosition:r=X.Top,center:o,offset:i,stepPosition:s}){const l=og[t],u=og[r],a={x:e.x+l.x*i,y:e.y+l.y*i},c={x:n.x+u.x*i,y:n.y+u.y*i},f=o_({source:a,sourcePosition:t,target:c}),d=f.x!==0?"x":"y",g=f[d];let m=[],w,x;const p={x:0,y:0},y={x:0,y:0},[,,h,v]=ng({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+(c.x-a.x)*s,x=o.y??(a.y+c.y)/2):(w=o.x??(a.x+c.x)/2,x=o.y??a.y+(c.y-a.y)*s);const C=[{x:w,y:a.y},{x:w,y:c.y}],$=[{x:a.x,y:x},{x:c.x,y:x}];l[d]===g?m=d==="x"?C:$:m=d==="x"?$:C}else{const C=[{x:a.x,y:c.y}],$=[{x:c.x,y:a.y}];if(d==="x"?m=l.x===g?$:C:m=l.y===g?C:$,t===r){const E=Math.abs(e[d]-n[d]);if(E<=i){const T=Math.min(i-1,i-E);l[d]===g?p[d]=(a[d]>e[d]?-1:1)*T:y[d]=(c[d]>n[d]?-1:1)*T}}if(t!==r){const E=d==="x"?"y":"x",T=l[d]===u[E],I=a[E]>c[E],O=a[E]<c[E];(l[d]===1&&(!T&&I||T&&O)||l[d]!==1&&(!T&&O||T&&I))&&(m=d==="x"?C:$)}const b={x:a.x+p.x,y:a.y+p.y},P={x:c.x+y.x,y:c.y+y.y},z=Math.max(Math.abs(b.x-m[0].x),Math.abs(P.x-m[0].x)),F=Math.max(Math.abs(b.y-m[0].y),Math.abs(P.y-m[0].y));z>=F?(w=(b.x+P.x)/2,x=m[0].y):(w=m[0].x,x=(b.y+P.y)/2)}const _={x:a.x+p.x,y:a.y+p.y},S={x:c.x+y.x,y:c.y+y.y};return[[e,..._.x!==m[0].x||_.y!==m[0].y?[_]:[],...m,...S.x!==m[m.length-1].x||S.y!==m[m.length-1].y?[S]:[],n],w,x,h,v]}function s_(e,t,n,r){const o=Math.min(ig(e,t)/2,ig(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,c=e.y<n.y?1:-1;return`L ${i+o*a},${s}Q ${i},${s} ${i},${s+o*c}`}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 Fa({sourceX:e,sourceY:t,sourcePosition:n=X.Bottom,targetX:r,targetY:o,targetPosition:i=X.Top,borderRadius:s=5,centerX:l,centerY:u,offset:a=20,stepPosition:c=.5}){const[f,d,g,m,w]=i_({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:l,y:u},offset:a,stepPosition:c});let x=`M${f[0].x} ${f[0].y}`;for(let p=1;p<f.length-1;p++)x+=s_(f[p-1],f[p],f[p+1],s);return x+=`L${f[f.length-1].x} ${f[f.length-1].y}`,[x,d,g,m,w]}function sg(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function l_(e){var f;const{sourceNode:t,targetNode:n}=e;if(!sg(t)||!sg(n))return null;const r=t.internals.handleBounds||lg(t.handles),o=n.internals.handleBounds||lg(n.handles),i=ug((r==null?void 0:r.source)??[],e.sourceHandle),s=ug(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(f=e.onError)==null||f.call(e,"008",yt.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||X.Bottom,u=(s==null?void 0:s.position)||X.Top,a=Yn(t,i,l),c=Yn(n,s,u);return{sourceX:a.x,sourceY:a.y,targetX:c.x,targetY:c.y,sourcePosition:l,targetPosition:u}}function lg(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 Yn(e,t,n=X.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??Qt(e);if(r)return{x:o+s/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case X.Top:return{x:o+s/2,y:i};case X.Right:return{x:o+s,y:i+l/2};case X.Bottom:return{x:o+s/2,y:i+l};case X.Left:return{x:o,y:i+l/2}}}function ug(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Va(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function u_(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=Va(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 ag=1e3,a_=10,Ha={nodeOrigin:[0,0],nodeExtent:Bo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},c_={...Ha,checkEquality:!0};function Ba(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function f_(e,t,n){const r=Ba(Ha,n);for(const o of e.values())if(o.parentId)Ya(o,e,t,r);else{const i=Uo(o,r.nodeOrigin),s=Un(o.extent)?o.extent:r.nodeExtent,l=Wn(i,s,Qt(o));o.internals.positionAbsolute=l}}function d_(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 Wa(e){return e==="manual"}function Ua(e,t,n,r={}){var c,f;const o=Ba(c_,r),i={i:0},s=new Map(t),l=o!=null&&o.elevateNodesOnSelect&&!Wa(o.zIndexMode)?ag: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=Uo(d,o.nodeOrigin),w=Un(d.extent)?d.extent:o.nodeExtent,x=Wn(m,w,Qt(d));g={...o.defaults,...d,measured:{width:(c=d.measured)==null?void 0:c.width,height:(f=d.measured)==null?void 0:f.height},internals:{positionAbsolute:x,handleBounds:d_(d,g),z:cg(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&&Ya(g,t,n,r,i),a||(a=d.selected??!1)}return{nodesInitialized:u,hasSelectedNodes:a}}function h_(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 Ya(e,t,n,r,o){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:u}=Ba(Ha,r),a=e.parentId,c=t.get(a);if(!c){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}h_(e,n),o&&!c.parentId&&c.internals.rootParentIndex===void 0&&u==="auto"&&(c.internals.rootParentIndex=++o.i,c.internals.z=c.internals.z+o.i*a_),o&&c.internals.rootParentIndex!==void 0&&(o.i=c.internals.rootParentIndex);const f=i&&!Wa(u)?ag:0,{x:d,y:g,z:m}=p_(e,c,s,l,f,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 cg(e,t,n){const r=vt(e.zIndex)?e.zIndex:0;return Wa(n)?r:r+(e.selected?t:0)}function p_(e,t,n,r,o,i){const{x:s,y:l}=t.internals.positionAbsolute,u=Qt(e),a=Uo(e,n),c=Un(e.extent)?Wn(a,e.extent,u):a;let f=Wn({x:s+c.x,y:l+c.y},r,u);e.extent==="parent"&&(f=Vp(f,u,t));const d=cg(e,o,i),g=t.internals.z??0;return{x:f.x,y:f.y,z:g>=d?g+1:d}}function Xa(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)??br(u),c=Bp(a,l.rect);i.set(l.parentId,{expandedRect:c,parent:u})}return i.size>0&&i.forEach(({expandedRect:l,parent:u},a)=>{var h;const c=u.internals.positionAbsolute,f=Qt(u),d=u.origin??r,g=l.x<c.x?Math.round(Math.abs(c.x-l.x)):0,m=l.y<c.y?Math.round(Math.abs(c.y-l.y)):0,w=Math.max(f.width,Math.round(l.width)),x=Math.max(f.height,Math.round(l.height)),p=(w-f.width)*d[0],y=(x-f.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(_=>_.id===v.id)||o.push({id:v.id,type:"position",position:{x:v.position.x+g,y:v.position.y+m}})})),(f.width<l.width||f.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 g_(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=[],c=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(c.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=ja(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=Un(m.extent)?m.extent:i;let{positionAbsolute:v}=m.internals;m.parentId&&m.extent==="parent"?v=Vp(v,w,t.get(m.parentId)):h&&(v=Wn(v,h,w));const _={...m,measured:w,internals:{...m.internals,positionAbsolute:v,handleBounds:{source:qp("source",g.nodeElement,y,f,m.id),target:qp("target",g.nodeElement,y,f,m.id)}}};t.set(m.id,_),m.parentId&&Ya(_,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:br(_,o)}))}}if(d.length>0){const g=Xa(d,t,n,o);a.push(...g)}return{changes:a,updatedInternals:u}}async function m_({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:i}){if(!t||!e.x&&!e.y)return!1;const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,i]],r);return!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2])}function fg(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 dg(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}`,c=`${i}-${l}--${o}-${s}`;fg("source",u,c,e,o,s),fg("target",u,a,e,i,l),t.set(r.id,r)}}function hg(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:hg(n,t):!1}function pg(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 y_(e,t,n,r){const o=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!hg(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 Ga({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,l,u;const o=[];for(const[a,c]of t){const f=(s=n.get(a))==null?void 0:s.internals.userNode;f&&o.push({...f,position:c.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 v_({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=Go(i,t);return{x:s.x-i.x,y:s.y-i.y}}function w_({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},c=null,f=!1,d=null,g=!1,m=!1,w=null;function x({noDragClassName:y,handleSelector:h,domNode:v,isSelectable:_,nodeId:S,nodeClickDistance:k=0}){d=qe(v);function C({x:z,y:F}){const{nodeLookup:E,nodeExtent:T,snapGrid:I,snapToGrid:O,nodeOrigin:M,onNodeDrag:N,onSelectionDrag:R,onError:j,updateNodePositions:D}=t();i={x:z,y:F};let W=!1;const U=l.size>1,Z=U&&T?Aa(Yo(l)):null,q=U&&O?v_({dragItems:l,snapGrid:I,x:z,y:F}):null;for(const[G,V]of l){if(!E.has(G))continue;let B={x:z-V.distance.x,y:F-V.distance.y};O&&(B=q?{x:Math.round(B.x+q.x),y:Math.round(B.y+q.y)}:Go(B,I));let ee=null;if(U&&T&&!V.extent&&Z){const{positionAbsolute:Q}=V.internals,ne=Q.x-Z.x+T[0][0],ie=Q.x+V.measured.width-Z.x2+T[1][0],le=Q.y-Z.y+T[0][1],we=Q.y+V.measured.height-Z.y2+T[1][1];ee=[[ne,le],[ie,we]]}const{position:J,positionAbsolute:K}=Fp({nodeId:G,nextPosition:B,nodeLookup:E,nodeExtent:ee||T,nodeOrigin:M,onError:j});W=W||V.position.x!==J.x||V.position.y!==J.y,V.position=J,V.internals.positionAbsolute=K}if(m=m||W,!!W&&(D(l,!0),w&&(r||N||!S&&R))){const[G,V]=Ga({nodeId:S,dragItems:l,nodeLookup:E});r==null||r(w,l,G,V),N==null||N(w,G,V),S||R==null||R(w,V)}}async function $(){if(!c)return;const{transform:z,panBy:F,autoPanSpeed:E,autoPanOnNodeDrag:T}=t();if(!T){u=!1,cancelAnimationFrame(s);return}const[I,O]=Ra(a,c,E);(I!==0||O!==0)&&(i.x=(i.x??0)-I/z[2],i.y=(i.y??0)-O/z[2],await F({x:I,y:O})&&C(i)),s=requestAnimationFrame($)}function b(z){var U;const{nodeLookup:F,multiSelectionActive:E,nodesDraggable:T,transform:I,snapGrid:O,snapToGrid:M,selectNodesOnDrag:N,onNodeDragStart:R,onSelectionDragStart:j,unselectNodesAndEdges:D}=t();f=!0,(!N||!_)&&!E&&S&&((U=F.get(S))!=null&&U.selected||D()),_&&N&&S&&(e==null||e(S));const W=Ko(z.sourceEvent,{transform:I,snapGrid:O,snapToGrid:M,containerBounds:c});if(i=W,l=y_(F,T,W,S),l.size>0&&(n||R||!S&&j)){const[Z,q]=Ga({nodeId:S,dragItems:l,nodeLookup:F});n==null||n(z.sourceEvent,l,Z,q),R==null||R(z.sourceEvent,Z,q),S||j==null||j(z.sourceEvent,q)}}const P=rp().clickDistance(k).on("start",z=>{const{domNode:F,nodeDragThreshold:E,transform:T,snapGrid:I,snapToGrid:O}=t();c=(F==null?void 0:F.getBoundingClientRect())||null,g=!1,m=!1,w=z.sourceEvent,E===0&&b(z),i=Ko(z.sourceEvent,{transform:T,snapGrid:I,snapToGrid:O,containerBounds:c}),a=wt(z.sourceEvent,c)}).on("drag",z=>{const{autoPanOnNodeDrag:F,transform:E,snapGrid:T,snapToGrid:I,nodeDragThreshold:O,nodeLookup:M}=t(),N=Ko(z.sourceEvent,{transform:E,snapGrid:T,snapToGrid:I,containerBounds:c});if(w=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||S&&!M.has(S))&&(g=!0),!g){if(!u&&F&&f&&(u=!0,$()),!f){const R=wt(z.sourceEvent,c),j=R.x-a.x,D=R.y-a.y;Math.sqrt(j*j+D*D)>O&&b(z)}(i.x!==N.xSnapped||i.y!==N.ySnapped)&&l&&f&&(a=wt(z.sourceEvent,c),C(N))}}).on("end",z=>{if(!f||g){g&&l.size>0&&t().updateNodePositions(l,!1);return}if(u=!1,f=!1,cancelAnimationFrame(s),l.size>0){const{nodeLookup:F,updateNodePositions:E,onNodeDragStop:T,onSelectionDragStop:I}=t();if(m&&(E(l,!1),m=!1),o||T||!S&&I){const[O,M]=Ga({nodeId:S,dragItems:l,nodeLookup:F,dragging:!1});o==null||o(z.sourceEvent,l,O,M),T==null||T(z.sourceEvent,O,M),S||I==null||I(z.sourceEvent,M)}}}).filter(z=>{const F=z.target;return!z.button&&(!y||!pg(F,`.${y}`,v))&&(!h||pg(F,h,v))});d.call(P)}function p(){d==null||d.on(".drag",null)}return{update:x,destroy:p}}function x_(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())Xo(o,br(i))>0&&r.push(i);return r}const E_=250;function __(e,t,n,r){var l,u;let o=[],i=1/0;const s=x_(e,n,t+E_);for(const a of s){const c=[...((l=a.internals.handleBounds)==null?void 0:l.source)??[],...((u=a.internals.handleBounds)==null?void 0:u.target)??[]];for(const f of c){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:d,y:g}=Yn(a,f,f.position,!0),m=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(g-e.y,2));m>t||(m<i?(o=[{...f,x:d,y:g}],i=m):m===i&&o.push({...f,x:d,y:g}))}}if(!o.length)return null;if(o.length>1){const a=r.type==="source"?"target":"source";return o.find(c=>c.type===a)??o[0]}return o[0]}function gg(e,t,n,r,o,i=!1){var a,c,f;const s=r.get(e);if(!s)return null;const l=o==="strict"?(a=s.internals.handleBounds)==null?void 0:a[t]:[...((c=s.internals.handleBounds)==null?void 0:c.source)??[],...((f=s.internals.handleBounds)==null?void 0:f.target)??[]],u=(n?l==null?void 0:l.find(d=>d.id===n):l==null?void 0:l[0])??null;return u&&i?{...u,...Yn(s,u,u.position,!0)}:u}function mg(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function S_(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const yg=()=>!0;function k_(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:u,lib:a,autoPanOnConnect:c,flowId:f,panBy:d,cancelConnection:g,onConnectStart:m,onConnect:w,onConnectEnd:x,isValidConnection:p=yg,onReconnectEnd:y,updateConnection:h,getTransform:v,getFromHandle:_,autoPanSpeed:S,dragThreshold:k=1,handleDomNode:C}){const $=Qp(e.target);let b=0,P;const{x:z,y:F}=wt(e),E=mg(i,C),T=l==null?void 0:l.getBoundingClientRect();let I=!1;if(!T||!E)return;const O=gg(o,E,r,u,t);if(!O)return;let M=wt(e,T),N=!1,R=null,j=!1,D=null;function W(){if(!c||!T)return;const[J,K]=Ra(M,T,S);d({x:J,y:K}),b=requestAnimationFrame(W)}const U={...O,nodeId:o,type:E,position:O.position},Z=u.get(o);let G={inProgress:!0,isValid:null,from:Yn(Z,U,X.Left,!0),fromHandle:U,fromPosition:U.position,fromNode:Z,to:M,toHandle:null,toPosition:Ap[U.position],toNode:null,pointer:M};function V(){I=!0,h(G),m==null||m(e,{nodeId:o,handleId:r,handleType:E})}k===0&&V();function B(J){if(!I){const{x:we,y:st}=wt(J),$t=we-z,zt=st-F;if(!($t*$t+zt*zt>k*k))return;V()}if(!_()||!U){ee(J);return}const K=v();M=wt(J,T),P=__(Or(M,K,!1,[1,1]),n,u,U),N||(W(),N=!0);const Q=vg(J,{handle:P,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:p,doc:$,lib:a,flowId:f,nodeLookup:u});D=Q.handleDomNode,R=Q.connection,j=S_(!!P,Q.isValid);const ne=u.get(o),ie=ne?Yn(ne,U,X.Left,!0):G.from,le={...G,from:ie,isValid:j,to:Q.toHandle&&j?Rr({x:Q.toHandle.x,y:Q.toHandle.y},K):M,toHandle:Q.toHandle,toPosition:j&&Q.toHandle?Q.toHandle.position:Ap[U.position],toNode:Q.toHandle?u.get(Q.toHandle.nodeId):null,pointer:M};h(le),G=le}function ee(J){if(!("touches"in J&&J.touches.length>0)){if(I){(P||D)&&R&&j&&(w==null||w(R));const{inProgress:K,...Q}=G,ne={...Q,toPosition:G.toHandle?G.toPosition:null};x==null||x(J,ne),i&&(y==null||y(J,ne))}g(),cancelAnimationFrame(b),N=!1,j=!1,R=null,D=null,$.removeEventListener("mousemove",B),$.removeEventListener("mouseup",ee),$.removeEventListener("touchmove",B),$.removeEventListener("touchend",ee)}}$.addEventListener("mousemove",B),$.addEventListener("mouseup",ee),$.addEventListener("touchmove",B),$.addEventListener("touchend",ee)}function vg(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:l,flowId:u,isValidConnection:a=yg,nodeLookup:c}){const f=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}=wt(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=mg(void 0,x),h=x.getAttribute("data-nodeid"),v=x.getAttribute("data-handleid"),_=x.classList.contains("connectable"),S=x.classList.contains("connectableend");if(!h||!y)return p;const k={source:f?h:r,sourceHandle:f?v:o,target:f?r:h,targetHandle:f?o:v};p.connection=k;const $=_&&S&&(n===$r.Strict?f&&y==="source"||!f&&y==="target":h!==r||v!==o);p.isValid=$&&a(k),p.toHandle=gg(h,y,v,c,n,!0)}return p}const Qa={onPointerDown:k_,isValid:vg};function N_({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=qe(e);function i({translateExtent:l,width:u,height:a,zoomStep:c=1,pannable:f=!0,zoomable:d=!0,inversePan:g=!1}){const m=h=>{if(h.sourceEvent.type!=="wheel"||!t)return;const v=n(),_=h.sourceEvent.ctrlKey&&Qo()?10:1,S=-h.sourceEvent.deltaY*(h.sourceEvent.deltaMode===1?.05:h.sourceEvent.deltaMode?1:.002)*c,k=v[2]*Math.pow(2,S*_);t.scaleTo(k)};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 _=[h.sourceEvent.clientX??h.sourceEvent.touches[0].clientX,h.sourceEvent.clientY??h.sourceEvent.touches[0].clientY],S=[_[0]-w[0],_[1]-w[1]];w=_;const k=r()*Math.max(v[2],Math.log(v[2]))*(g?-1:1),C={x:v[0]-S[0]*k,y:v[1]-S[1]*k},$=[[0,0],[u,a]];t.setViewportConstrained({x:C.x,y:C.y,zoom:v[2]},$,l)},y=zp().on("start",x).on("zoom",f?p:null).on("zoom.wheel",d?m:null);o.call(y,{})}function s(){o.on("zoom",null)}return{update:i,destroy:s,pointer:pt}}const Vs=e=>({x:e.x,y:e.y,zoom:e.k}),Ka=({x:e,y:t,zoom:n})=>Os.translate(e,t).scale(n),Dr=(e,t)=>e.target.closest(`.${t}`),wg=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),C_=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Za=(e,t=0,n=C_,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},xg=e=>{const t=e.ctrlKey&&Qo()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function M_({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:u,onPanZoomEnd:a}){return c=>{if(Dr(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(c.ctrlKey&&s){const x=pt(c),p=xg(c),y=f*Math.pow(2,p);r.scaleTo(n,y,x,c);return}const d=c.deltaMode===1?20:1;let g=o===Bn.Vertical?0:c.deltaX*d,m=o===Bn.Horizontal?0:c.deltaY*d;!Qo()&&c.shiftKey&&o!==Bn.Vertical&&(g=c.deltaY*d,m=0),r.translateBy(n,-(g/f)*i,-(m/f)*i,{internal:!0});const w=Vs(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(u==null||u(c,w),e.panScrollTimeout=setTimeout(()=>{a==null||a(c,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(c,w))}}function I_({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,l=Dr(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,o)}}function P_({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,l;if((i=r.sourceEvent)!=null&&i.internal)return;const o=Vs(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 L_({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{var s,l;e.usedRightMouseButton=!!(n&&wg(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,Vs(i.transform)))}}function T_({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&&wg(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const u=Vs(s.transform);e.prevViewport=u,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(s.sourceEvent,u)},n?150:0)}}}function $_({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:l,noPanClassName:u,lib:a,connectionInProgress:c}){return f=>{var x;const d=e||t,g=n&&f.ctrlKey,m=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Dr(f,`${a}-flow__node`)||Dr(f,`${a}-flow__edge`)))return!0;if(!r&&!d&&!o&&!i&&!n||s||c&&!m||Dr(f,l)&&m||Dr(f,u)&&(!m||o&&m&&!e)||!n&&f.ctrlKey&&m)return!1;if(!n&&f.type==="touchstart"&&((x=f.touches)==null?void 0:x.length)>1)return f.preventDefault(),!1;if(!d&&!o&&!g&&m||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||m)&&w}}function z_({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},c=e.getBoundingClientRect(),f=zp().scaleExtent([t,n]).translateExtent(r),d=qe(e).call(f);y({x:o.x,y:o.y,zoom:zr(o.zoom,t,n)},[[0,0],[c.width,c.height]],r);const g=d.on("wheel.zoom"),m=d.on("dblclick.zoom");f.wheelDelta(xg);async function w(P,z){return d?new Promise(F=>{f==null||f.interpolate((z==null?void 0:z.interpolate)==="linear"?Ao:Ns).transform(Za(d,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>F(!0)),P)}):!1}function x({noWheelClassName:P,noPanClassName:z,onPaneContextMenu:F,userSelectionActive:E,panOnScroll:T,panOnDrag:I,panOnScrollMode:O,panOnScrollSpeed:M,preventScrolling:N,zoomOnPinch:R,zoomOnScroll:j,zoomOnDoubleClick:D,zoomActivationKeyPressed:W,lib:U,onTransformChange:Z,connectionInProgress:q,paneClickDistance:G,selectionOnDrag:V}){E&&!a.isZoomingOrPanning&&p();const B=T&&!W&&!E;f.clickDistance(V?1/0:!vt(G)||G<0?0:G);const ee=B?M_({zoomPanValues:a,noWheelClassName:P,d3Selection:d,d3Zoom:f,panOnScrollMode:O,panOnScrollSpeed:M,zoomOnPinch:R,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):I_({noWheelClassName:P,preventScrolling:N,d3ZoomHandler:g});d.on("wheel.zoom",ee,{passive:!1});const J=P_({zoomPanValues:a,onDraggingChange:u,onPanZoomStart:s});f.on("start",J);const K=L_({zoomPanValues:a,panOnDrag:I,onPaneContextMenu:!!F,onPanZoom:i,onTransformChange:Z});f.on("zoom",K);const Q=T_({zoomPanValues:a,panOnDrag:I,panOnScroll:T,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:u});f.on("end",Q);const ne=$_({zoomActivationKeyPressed:W,panOnDrag:I,zoomOnScroll:j,panOnScroll:T,zoomOnDoubleClick:D,zoomOnPinch:R,userSelectionActive:E,noPanClassName:z,noWheelClassName:P,lib:U,connectionInProgress:q});f.filter(ne),D?d.on("dblclick.zoom",m):d.on("dblclick.zoom",null)}function p(){f.on("zoom",null)}async function y(P,z,F){const E=Ka(P),T=f==null?void 0:f.constrain()(E,z,F);return T&&await w(T),T}async function h(P,z){const F=Ka(P);return await w(F,z),F}function v(P){if(d){const z=Ka(P),F=d.property("__zoom");(F.k!==P.zoom||F.x!==P.x||F.y!==P.y)&&(f==null||f.transform(d,z,null,{sync:!0}))}}function _(){const P=d?Tp(d.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}async function S(P,z){return d?new Promise(F=>{f==null||f.interpolate((z==null?void 0:z.interpolate)==="linear"?Ao:Ns).scaleTo(Za(d,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>F(!0)),P)}):!1}async function k(P,z){return d?new Promise(F=>{f==null||f.interpolate((z==null?void 0:z.interpolate)==="linear"?Ao:Ns).scaleBy(Za(d,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>F(!0)),P)}):!1}function C(P){f==null||f.scaleExtent(P)}function $(P){f==null||f.translateExtent(P)}function b(P){const z=!vt(P)||P<0?0:P;f==null||f.clickDistance(z)}return{update:x,destroy:p,setViewport:h,setViewportConstrained:y,getViewport:_,scaleTo:S,scaleBy:k,setScaleExtent:C,setTranslateExtent:$,syncViewport:v,setClickDistance:b}}var jr;(function(e){e.Line="line",e.Handle="handle"})(jr||(jr={}));function b_({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 Eg(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 _n(e,t){return Math.max(0,t-e)}function Sn(e,t){return Math.max(0,e-t)}function Hs(e,t,n){return Math.max(0,t-e,e-n)}function _g(e,t){return e?!t:t}function O_(e,t,n,r,o,i,s,l){let{affectsX:u,affectsY:a}=t;const{isHorizontal:c,isVertical:f}=t,d=c&&f,{xSnapped:g,ySnapped:m}=n,{minWidth:w,maxWidth:x,minHeight:p,maxHeight:y}=r,{x:h,y:v,width:_,height:S,aspectRatio:k}=e;let C=Math.floor(c?g-e.pointerX:0),$=Math.floor(f?m-e.pointerY:0);const b=_+(u?-C:C),P=S+(a?-$:$),z=-i[0]*_,F=-i[1]*S;let E=Hs(b,w,x),T=Hs(P,p,y);if(s){let M=0,N=0;u&&C<0?M=_n(h+C+z,s[0][0]):!u&&C>0&&(M=Sn(h+b+z,s[1][0])),a&&$<0?N=_n(v+$+F,s[0][1]):!a&&$>0&&(N=Sn(v+P+F,s[1][1])),E=Math.max(E,M),T=Math.max(T,N)}if(l){let M=0,N=0;u&&C>0?M=Sn(h+C,l[0][0]):!u&&C<0&&(M=_n(h+b,l[1][0])),a&&$>0?N=Sn(v+$,l[0][1]):!a&&$<0&&(N=_n(v+P,l[1][1])),E=Math.max(E,M),T=Math.max(T,N)}if(o){if(c){const M=Hs(b/k,p,y)*k;if(E=Math.max(E,M),s){let N=0;!u&&!a||u&&!a&&d?N=Sn(v+F+b/k,s[1][1])*k:N=_n(v+F+(u?C:-C)/k,s[0][1])*k,E=Math.max(E,N)}if(l){let N=0;!u&&!a||u&&!a&&d?N=_n(v+b/k,l[1][1])*k:N=Sn(v+(u?C:-C)/k,l[0][1])*k,E=Math.max(E,N)}}if(f){const M=Hs(P*k,w,x)/k;if(T=Math.max(T,M),s){let N=0;!u&&!a||a&&!u&&d?N=Sn(h+P*k+z,s[1][0])/k:N=_n(h+(a?$:-$)*k+z,s[0][0])/k,T=Math.max(T,N)}if(l){let N=0;!u&&!a||a&&!u&&d?N=_n(h+P*k,l[1][0])/k:N=Sn(h+(a?$:-$)*k,l[0][0])/k,T=Math.max(T,N)}}}$=$+($<0?T:-T),C=C+(C<0?E:-E),o&&(d?b>P*k?$=(_g(u,a)?-C:C)/k:C=(_g(u,a)?-$:$)*k:c?($=C/k,a=u):(C=$*k,u=a));const I=u?h+C:h,O=a?v+$:v;return{width:_+(u?-C:C),height:S+(a?-$:$),x:i[0]*C*(u?-1:1)+I,y:i[1]*$*(a?-1:1)+O}}const Sg={width:0,height:0,x:0,y:0},R_={...Sg,pointerX:0,pointerY:0,aspectRatio:1};function A_(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 D_({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const i=qe(e);let s={controlDirection:Eg("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:c,keepAspectRatio:f,resizeDirection:d,onResizeStart:g,onResize:m,onResizeEnd:w,shouldResize:x}){let p={...Sg},y={...R_};s={boundaries:c,resizeDirection:d,keepAspectRatio:f,controlDirection:Eg(a)};let h,v=null,_=[],S,k,C,$=!1;const b=rp().on("start",P=>{const{nodeLookup:z,transform:F,snapGrid:E,snapToGrid:T,nodeOrigin:I,paneDomNode:O}=n();if(h=z.get(t),!h)return;v=(O==null?void 0:O.getBoundingClientRect())??null;const{xSnapped:M,ySnapped:N}=Ko(P.sourceEvent,{transform:F,snapGrid:E,snapToGrid:T,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:M,pointerY:N,aspectRatio:p.width/p.height},S=void 0,k=Un(h.extent)?h.extent:void 0,h.parentId&&(h.extent==="parent"||h.expandParent)&&(S=z.get(h.parentId)),S&&h.extent==="parent"&&(k=[[0,0],[S.measured.width,S.measured.height]]),_=[],C=void 0;for(const[R,j]of z)if(j.parentId===t&&(_.push({id:R,position:{...j.position},extent:j.extent}),j.extent==="parent"||j.expandParent)){const D=A_(j,h,j.origin??I);C?C=[[Math.min(D[0][0],C[0][0]),Math.min(D[0][1],C[0][1])],[Math.max(D[1][0],C[1][0]),Math.max(D[1][1],C[1][1])]]:C=D}g==null||g(P,{...p})}).on("drag",P=>{const{transform:z,snapGrid:F,snapToGrid:E,nodeOrigin:T}=n(),I=Ko(P.sourceEvent,{transform:z,snapGrid:F,snapToGrid:E,containerBounds:v}),O=[];if(!h)return;const{x:M,y:N,width:R,height:j}=p,D={},W=h.origin??T,{width:U,height:Z,x:q,y:G}=O_(y,s.controlDirection,I,s.boundaries,s.keepAspectRatio,W,k,C),V=U!==R,B=Z!==j,ee=q!==M&&V,J=G!==N&&B;if(!ee&&!J&&!V&&!B)return;if((ee||J||W[0]===1||W[1]===1)&&(D.x=ee?q:p.x,D.y=J?G:p.y,p.x=D.x,p.y=D.y,_.length>0)){const ie=q-M,le=G-N;for(const we of _)we.position={x:we.position.x-ie+W[0]*(U-R),y:we.position.y-le+W[1]*(Z-j)},O.push(we)}if((V||B)&&(D.width=V&&(!s.resizeDirection||s.resizeDirection==="horizontal")?U:p.width,D.height=B&&(!s.resizeDirection||s.resizeDirection==="vertical")?Z:p.height,p.width=D.width,p.height=D.height),S&&h.expandParent){const ie=W[0]*(D.width??0);D.x&&D.x<ie&&(p.x=ie,y.x=y.x-(D.x-ie));const le=W[1]*(D.height??0);D.y&&D.y<le&&(p.y=le,y.y=y.y-(D.y-le))}const K=b_({width:p.width,prevWidth:R,height:p.height,prevHeight:j,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),Q={...p,direction:K};(x==null?void 0:x(P,Q))!==!1&&($=!0,m==null||m(P,Q),r(D,O))}).on("end",P=>{$&&(w==null||w(P,{...p}),o==null||o({...p}),$=!1)});i.call(b)}function u(){i.on(".drag",null)}return{update:l,destroy:u}}var kg={exports:{}},Ng={},Cg={exports:{}},Mg={};/**
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 Fr=A;function j_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var F_=typeof Object.is=="function"?Object.is:j_,V_=Fr.useState,H_=Fr.useEffect,B_=Fr.useLayoutEffect,W_=Fr.useDebugValue;function U_(e,t){var n=t(),r=V_({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return B_(function(){o.value=n,o.getSnapshot=t,qa(o)&&i({inst:o})},[e,n,t]),H_(function(){return qa(o)&&i({inst:o}),e(function(){qa(o)&&i({inst:o})})},[e]),W_(n),n}function qa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!F_(e,n)}catch{return!0}}function Y_(e,t){return t()}var X_=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Y_:U_;Mg.useSyncExternalStore=Fr.useSyncExternalStore!==void 0?Fr.useSyncExternalStore:X_,Cg.exports=Mg;var G_=Cg.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 Bs=A,Q_=G_;function K_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Z_=typeof Object.is=="function"?Object.is:K_,q_=Q_.useSyncExternalStore,J_=Bs.useRef,eS=Bs.useEffect,tS=Bs.useMemo,nS=Bs.useDebugValue;Ng.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=J_(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=tS(function(){function u(g){if(!a){if(a=!0,c=g,g=r(g),o!==void 0&&s.hasValue){var m=s.value;if(o(m,g))return f=m}return f=g}if(m=f,Z_(c,g))return m;var w=r(g);return o!==void 0&&o(m,w)?(c=g,m):(c=g,f=w)}var a=!1,c,f,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=q_(e,i[0],i[1]);return eS(function(){s.hasValue=!0,s.value=l},[l]),nS(l),l},kg.exports=Ng;var rS=kg.exports;const oS=bt(rS),iS={},Ig=e=>{let t;const n=new Set,r=(c,f)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const g=t;t=f??(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:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(iS?"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},sS=e=>e?Ig(e):Ig,{useDebugValue:lS}=Z0,{useSyncExternalStoreWithSelector:uS}=oS,aS=e=>e;function Pg(e,t=aS,n){const r=uS(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return lS(r),r}const Lg=(e,t)=>{const n=sS(e),r=(o,i=t)=>Pg(n,o,i);return Object.assign(r,n),r},cS=(e,t)=>e?Lg(e,t):Lg;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 Ws=A.createContext(null),fS=Ws.Provider,Tg=yt.error001("react");function re(e,t){const n=A.useContext(Ws);if(n===null)throw new Error(Tg);return Pg(n,e,t)}function he(){const e=A.useContext(Ws);if(e===null)throw new Error(Tg);return A.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const $g={display:"none"},dS={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},zg="react-flow__node-desc",bg="react-flow__edge-desc",hS="react-flow__aria-live",pS=e=>e.ariaLiveMessage,gS=e=>e.ariaLabelConfig;function mS({rfId:e}){const t=re(pS);return L.jsx("div",{id:`${hS}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:dS,children:t})}function yS({rfId:e,disableKeyboardA11y:t}){const n=re(gS);return L.jsxs(L.Fragment,{children:[L.jsx("div",{id:`${zg}-${e}`,style:$g,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),L.jsx("div",{id:`${bg}-${e}`,style:$g,children:n["edge.a11yDescription.default"]}),!t&&L.jsx(mS,{rfId:e})]})}const Us=A.forwardRef(({position:e="top-left",children:t,className:n,style:r,...o},i)=>{const s=`${e}`.split("-");return L.jsx("div",{className:Ee(["react-flow__panel",n,...s]),style:r,ref:i,...o,children:t})});Us.displayName="Panel";function vS({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:L.jsx(Us,{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:L.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const wS=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}},Ys=e=>e.id;function xS(e,t){return de(e.selectedNodes.map(Ys),t.selectedNodes.map(Ys))&&de(e.selectedEdges.map(Ys),t.selectedEdges.map(Ys))}function ES({onSelectionChange:e}){const t=he(),{selectedNodes:n,selectedEdges:r}=re(wS,xS);return A.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,r,e]),null}const _S=e=>!!e.onSelectionChangeHandlers;function SS({onSelectionChange:e}){const t=re(_S);return e||t?L.jsx(ES,{onSelectionChange:e}):null}const Og=[0,0],kS={x:0,y:0,zoom:1},Rg=[...["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"],"rfId"],NS=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}),Ag={translateExtent:Bo,nodeOrigin:Og,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function CS(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:u}=re(NS,de),a=he();A.useEffect(()=>(u(e.defaultNodes,e.defaultEdges),()=>{c.current=Ag,l()}),[]);const c=A.useRef(Ag);return A.useEffect(()=>{for(const f of Rg){const d=e[f],g=c.current[f];d!==g&&(typeof e[f]>"u"||(f==="nodes"?t(d):f==="edges"?n(d):f==="minZoom"?r(d):f==="maxZoom"?o(d):f==="translateExtent"?i(d):f==="nodeExtent"?s(d):f==="ariaLabelConfig"?a.setState({ariaLabelConfig:ZE(d)}):f==="fitView"?a.setState({fitViewQueued:d}):f==="fitViewOptions"?a.setState({fitViewOptions:d}):a.setState({[f]:d})))}c.current=e},Rg.map(f=>e[f])),null}function Dg(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function MS(e){var r;const[t,n]=A.useState(e==="system"?null:e);return A.useEffect(()=>{if(e!=="system"){n(e);return}const o=Dg(),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=Dg())!=null&&r.matches?"dark":"light"}const jg=typeof document<"u"?document:null;function Zo(e=null,t={target:jg,actInsideInputWithModifier:!0}){const[n,r]=A.useState(!1),o=A.useRef(!1),i=A.useRef(new Set([])),[s,l]=A.useMemo(()=>{if(e!==null){const a=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
57
+ `).replace(`
58
+
59
+ `,`
60
+ +`).split(`
61
+ `)),c=a.reduce((f,d)=>f.concat(...d),[]);return[a,c]}return[[],[]]},[e]);return A.useEffect(()=>{const u=(t==null?void 0:t.target)??jg,a=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const c=g=>{var x,p;if(o.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!o.current||o.current&&!a)&&Kp(g))return!1;const w=Vg(g.code,l);if(i.current.add(g[w]),Fg(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)}},f=g=>{const m=Vg(g.code,l);Fg(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",c),u==null||u.addEventListener("keyup",f),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{u==null||u.removeEventListener("keydown",c),u==null||u.removeEventListener("keyup",f),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function Fg(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function Vg(e,t){return t.includes(e)?"code":"key"}const IS=()=>{const e=he();return A.useMemo(()=>({zoomIn:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!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),!0):!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=Da(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}),!0):!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},c=n.snapGrid??o,f=n.snapToGrid??i;return Or(a,r,f,c)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),s=Rr(t,n);return{x:s.x+o,y:s.y+i}}}),[])};function Hg(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)PS(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 PS(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 LS(e,t){return Hg(e,t)}function TS(e,t){return Hg(e,t)}function Xn(e,t){return{id:e,type:"select",selected:t}}function Vr(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(Xn(i.id,s)))}return r}function Bg({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 Wg(e){return{id:e.id,type:"remove"}}const $S=Up();function zS(e,t,n={}){return r_(e,t,{...n,onError:n.onError??$S})}const Ug=e=>HE(e),bS=e=>jp(e);function Yg(e){return A.forwardRef(e)}const OS=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Xg(e){const[t,n]=A.useState(BigInt(0)),[r]=A.useState(()=>RS(()=>n(o=>o+BigInt(1))));return OS(()=>{const o=r.get();o.length&&(e(o),r.reset())},[t]),r}function RS(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Gg=A.createContext(null);function AS({children:e}){const t=he(),n=A.useCallback(l=>{const{nodes:u=[],setNodes:a,hasDefaultNodes:c,onNodesChange:f,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=Bg({items:w,lookup:d});for(const p of m.values())x=p(x);c&&a(w),x.length>0?f==null||f(x):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:p,nodes:y,setNodes:h}=t.getState();p&&h(y)})},[]),r=Xg(n),o=A.useCallback(l=>{const{edges:u=[],setEdges:a,hasDefaultEdges:c,onEdgesChange:f,edgeLookup:d}=t.getState();let g=u;for(const m of l)g=typeof m=="function"?m(g):m;c?a(g):f&&f(Bg({items:g,lookup:d}))},[]),i=Xg(o),s=A.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return L.jsx(Gg.Provider,{value:s,children:e})}function DS(){const e=A.useContext(Gg);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const jS=e=>!!e.panZoom;function Ja(){const e=IS(),t=he(),n=DS(),r=re(jS),o=A.useMemo(()=>{const i=f=>t.getState().nodeLookup.get(f),s=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},u=f=>{var p,y;const{nodeLookup:d,nodeOrigin:g}=t.getState(),m=Ug(f)?f:d.get(f.id),w=m.parentId?Xp(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 br(x)},a=(f,d,g={replace:!1})=>{s(m=>m.map(w=>{if(w.id===f){const x=typeof d=="function"?d(w):d;return g.replace&&Ug(x)?x:{...w,...x}}return w}))},c=(f,d,g={replace:!1})=>{l(m=>m.map(w=>{if(w.id===f){const x=typeof d=="function"?d(w):d;return g.replace&&bS(x)?x:{...w,...x}}return w}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>{var d;return(d=i(f))==null?void 0:d.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(d=>({...d}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:s,setEdges:l,addNodes:f=>{const d=Array.isArray(f)?f:[f];n.nodeQueue.push(g=>[...g,...d])},addEdges:f=>{const d=Array.isArray(f)?f:[f];n.edgeQueue.push(g=>[...g,...d])},toObject:()=>{const{nodes:f=[],edges:d=[],transform:g}=t.getState(),[m,w,x]=g;return{nodes:f.map(p=>({...p})),edges:d.map(p=>({...p})),viewport:{x:m,y:w,zoom:x}}},deleteElements:async({nodes:f=[],edges:d=[]})=>{const{nodes:g,edges:m,onNodesDelete:w,onEdgesDelete:x,triggerNodeChanges:p,triggerEdgeChanges:y,onDelete:h,onBeforeDelete:v}=t.getState(),{nodes:_,edges:S}=await XE({nodesToRemove:f,edgesToRemove:d,nodes:g,edges:m,onBeforeDelete:v}),k=S.length>0,C=_.length>0;if(k){const $=S.map(Wg);x==null||x(S),y($)}if(C){const $=_.map(Wg);w==null||w(_),p($)}return(C||k)&&(h==null||h({nodes:_,edges:S})),{deletedNodes:_,deletedEdges:S}},getIntersectingNodes:(f,d=!0,g)=>{const m=Wp(f),w=m?f:u(f),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===f.id||!y.internals.positionAbsolute))return!1;const h=br(x?p:y),v=Xo(h,w);return d&&v>0||v>=h.width*h.height||v>=w.width*w.height}):[]},isNodeIntersecting:(f,d,g=!0)=>{const w=Wp(f)?f:u(f);if(!w)return!1;const x=Xo(w,d);return g&&x>0||x>=d.width*d.height||x>=w.width*w.height},updateNode:a,updateNodeData:(f,d,g={replace:!1})=>{a(f,m=>{const w=typeof d=="function"?d(m):d;return g.replace?{...m,data:w}:{...m,data:{...m.data,...w}}},g)},updateEdge:c,updateEdgeData:(f,d,g={replace:!1})=>{c(f,m=>{const w=typeof d=="function"?d(m):d;return g.replace?{...m,data:w}:{...m,data:{...m.data,...w}}},g)},getNodesBounds:f=>{const{nodeLookup:d,nodeOrigin:g}=t.getState();return BE(f,{nodeLookup:d,nodeOrigin:g})},getHandleConnections:({type:f,id:d,nodeId:g})=>{var m;return Array.from(((m=t.getState().connectionLookup.get(`${g}-${f}${d?`-${d}`:""}`))==null?void 0:m.values())??[])},getNodeConnections:({type:f,handleId:d,nodeId:g})=>{var m;return Array.from(((m=t.getState().connectionLookup.get(`${g}${f?d?`-${f}-${d}`:`-${f}`:""}`))==null?void 0:m.values())??[])},fitView:async f=>{const d=t.getState().fitViewResolver??KE();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:d}),n.nodeQueue.push(g=>[...g]),d.promise}}},[]);return A.useMemo(()=>({...o,...e,viewportInitialized:r}),[r])}const Qg=e=>e.selected,FS=typeof window<"u"?window:void 0;function VS({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=he(),{deleteElements:r}=Ja(),o=Zo(e,{actInsideInputWithModifier:!1}),i=Zo(t,{target:FS});A.useEffect(()=>{if(o){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(Qg),edges:s.filter(Qg)}),n.setState({nodesSelectionActive:!1})}},[o]),A.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function HS(e){const t=he();A.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=ja(e.current);(r.height===0||r.width===0)&&((l=(s=t.getState()).onError)==null||l.call(s,"004",yt.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 Xs={position:"absolute",width:"100%",height:"100%",top:0,left:0},BS=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function WS({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:i=Bn.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:u,translateExtent:a,minZoom:c,maxZoom:f,zoomActivationKeyCode:d,preventScrolling:g=!0,children:m,noWheelClassName:w,noPanClassName:x,onViewportChange:p,isControlledViewport:y,paneClickDistance:h,selectionOnDrag:v}){const _=he(),S=A.useRef(null),{userSelectionActive:k,lib:C,connectionInProgress:$}=re(BS,de),b=Zo(d),P=A.useRef();HS(S);const z=A.useCallback(F=>{p==null||p({x:F[0],y:F[1],zoom:F[2]}),y||_.setState({transform:F})},[p,y]);return A.useEffect(()=>{if(S.current){P.current=z_({domNode:S.current,minZoom:c,maxZoom:f,translateExtent:a,viewport:u,onDraggingChange:I=>_.setState(O=>O.paneDragging===I?O:{paneDragging:I}),onPanZoomStart:(I,O)=>{const{onViewportChangeStart:M,onMoveStart:N}=_.getState();N==null||N(I,O),M==null||M(O)},onPanZoom:(I,O)=>{const{onViewportChange:M,onMove:N}=_.getState();N==null||N(I,O),M==null||M(O)},onPanZoomEnd:(I,O)=>{const{onViewportChangeEnd:M,onMoveEnd:N}=_.getState();N==null||N(I,O),M==null||M(O)}});const{x:F,y:E,zoom:T}=P.current.getViewport();return _.setState({panZoom:P.current,transform:[F,E,T],domNode:S.current.closest(".react-flow")}),()=>{var I;(I=P.current)==null||I.destroy()}}},[]),A.useEffect(()=>{var F;(F=P.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:b,preventScrolling:g,noPanClassName:x,userSelectionActive:k,noWheelClassName:w,lib:C,onTransformChange:z,connectionInProgress:$,selectionOnDrag:v,paneClickDistance:h})},[e,t,n,r,o,i,s,l,b,g,x,k,w,C,z,$,v,h]),L.jsx("div",{className:"react-flow__renderer",ref:S,style:Xs,children:m})}const US=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function YS(){const{userSelectionActive:e,userSelectionRect:t}=re(US,de);return e&&t?L.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 ec=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},XS=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function GS({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Wo.Full,panOnDrag:r,autoPanOnSelection:o,paneClickDistance:i,selectionOnDrag:s,onSelectionStart:l,onSelectionEnd:u,onPaneClick:a,onPaneContextMenu:c,onPaneScroll:f,onPaneMouseEnter:d,onPaneMouseMove:g,onPaneMouseLeave:m,children:w}){const x=A.useRef(0),p=he(),{userSelectionActive:y,elementsSelectable:h,dragging:v,connectionInProgress:_,panBy:S,autoPanSpeed:k}=re(XS,de),C=h&&(e||y),$=A.useRef(null),b=A.useRef(),P=A.useRef(new Set),z=A.useRef(new Set),F=A.useRef(!1),E=A.useRef({x:0,y:0}),T=A.useRef(!1),I=V=>{if(F.current||_){F.current=!1;return}a==null||a(V),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},O=V=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){V.preventDefault();return}c==null||c(V)},M=f?V=>f(V):void 0,N=V=>{F.current&&(V.stopPropagation(),F.current=!1)},R=V=>{var we,st;const{domNode:B,transform:ee}=p.getState();if(b.current=B==null?void 0:B.getBoundingClientRect(),!b.current)return;const J=V.target===$.current;if(!J&&!!V.target.closest(".nokey")||!e||!(s&&J||t)||V.button!==0||!V.isPrimary)return;(st=(we=V.target)==null?void 0:we.setPointerCapture)==null||st.call(we,V.pointerId),F.current=!1;const{x:ne,y:ie}=wt(V.nativeEvent,b.current),le=Or({x:ne,y:ie},ee);p.setState({userSelectionRect:{width:0,height:0,startX:le.x,startY:le.y,x:ne,y:ie}}),J||(V.stopPropagation(),V.preventDefault())};function j(V,B){const{userSelectionRect:ee}=p.getState();if(!ee)return;const{transform:J,nodeLookup:K,edgeLookup:Q,connectionLookup:ne,triggerNodeChanges:ie,triggerEdgeChanges:le,defaultEdgeOptions:we}=p.getState(),st={x:ee.startX,y:ee.startY},{x:$t,y:zt}=Rr(st,J),Zt={startX:st.x,startY:st.y,x:V<$t?V:$t,y:B<zt?B:zt,width:Math.abs(V-$t),height:Math.abs(B-zt)},Jo=P.current,Kn=z.current;P.current=new Set(Oa(K,Zt,J,n===Wo.Partial,!0).map(Et=>Et.id)),z.current=new Set;const Zn=(we==null?void 0:we.selectable)??!0;for(const Et of P.current){const qt=ne.get(Et);if(qt)for(const{edgeId:Jt}of qt.values()){const qn=Q.get(Jt);qn&&(qn.selectable??Zn)&&z.current.add(Jt)}}if(!Gp(Jo,P.current)){const Et=Vr(K,P.current,!0);ie(Et)}if(!Gp(Kn,z.current)){const Et=Vr(Q,z.current);le(Et)}p.setState({userSelectionRect:Zt,userSelectionActive:!0,nodesSelectionActive:!1})}function D(){if(!o||!b.current)return;const[V,B]=Ra(E.current,b.current,k);S({x:V,y:B}).then(ee=>{if(!F.current||!ee){x.current=requestAnimationFrame(D);return}const{x:J,y:K}=E.current;j(J,K),x.current=requestAnimationFrame(D)})}const W=()=>{cancelAnimationFrame(x.current),x.current=0,T.current=!1};A.useEffect(()=>()=>W(),[]);const U=V=>{const{userSelectionRect:B,transform:ee,resetSelectedElements:J}=p.getState();if(!b.current||!B)return;const{x:K,y:Q}=wt(V.nativeEvent,b.current);E.current={x:K,y:Q};const ne=Rr({x:B.startX,y:B.startY},ee);if(!F.current){const ie=t?0:i;if(Math.hypot(K-ne.x,Q-ne.y)<=ie)return;J(),l==null||l(V)}F.current=!0,T.current||(D(),T.current=!0),j(K,Q)},Z=V=>{var B,ee;V.button===0&&((ee=(B=V.target)==null?void 0:B.releasePointerCapture)==null||ee.call(B,V.pointerId),!y&&V.target===$.current&&p.getState().userSelectionRect&&(I==null||I(V)),p.setState({userSelectionActive:!1,userSelectionRect:null}),F.current&&(u==null||u(V),p.setState({nodesSelectionActive:P.current.size>0})),W())},q=V=>{var B,ee;(ee=(B=V.target)==null?void 0:B.releasePointerCapture)==null||ee.call(B,V.pointerId),W()},G=r===!0||Array.isArray(r)&&r.includes(0);return L.jsxs("div",{className:Ee(["react-flow__pane",{draggable:G,dragging:v,selection:e}]),onClick:C?void 0:ec(I,$),onContextMenu:ec(O,$),onWheel:ec(M,$),onPointerEnter:C?void 0:d,onPointerMove:C?U:g,onPointerUp:C?Z:void 0,onPointerCancel:C?q:void 0,onPointerDownCapture:C?R:void 0,onClickCapture:C?N:void 0,onPointerLeave:m,ref:$,style:Xs,children:[w,L.jsx(YS,{})]})}function tc({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",yt.error012(e));return}t.setState({nodesSelectionActive:!1}),a.selected?(n||a.selected&&s)&&(i({nodes:[a],edges:[]}),requestAnimationFrame(()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.blur()})):o([e])}function Kg({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,nodeClickDistance:s}){const l=he(),[u,a]=A.useState(!1),c=A.useRef();return A.useEffect(()=>{c.current=w_({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{tc({id:f,store:l,nodeRef:e})},onDragStart:()=>{a(!0)},onDragStop:()=>{a(!1)}})},[]),A.useEffect(()=>{if(!(t||!e.current||!c.current))return c.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:s}),()=>{var f;(f=c.current)==null||f.destroy()}},[n,r,t,i,e,o,s]),u}const QS=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Zg(){const e=he();return A.useCallback(n=>{const{nodeExtent:r,snapToGrid:o,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:u,nodeLookup:a,nodeOrigin:c}=e.getState(),f=new Map,d=QS(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=Go(y,i));const{position:h,positionAbsolute:v}=Fp({nodeId:p.id,nextPosition:y,nodeLookup:a,nodeExtent:r,nodeOrigin:c,onError:l});p.position=h,p.internals.positionAbsolute=v,f.set(p.id,p)}u(f)},[])}const nc=A.createContext(null),KS=nc.Provider;nc.Consumer;const qg=()=>A.useContext(nc),ZS=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),qS=(e,t,n)=>r=>{const{connectionClickStartHandle:o,connectionMode:i,connection:s}=r,{fromHandle:l,toHandle:u,isValid:a}=s,c=(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:c,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:c&&a}};function JS({type:e="source",position:t=X.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:u,className:a,onMouseDown:c,onTouchStart:f,...d},g){var T,I;const m=s||null,w=e==="target",x=he(),p=qg(),{connectOnClick:y,noPanClassName:h,rfId:v}=re(ZS,de),{connectingFrom:_,connectingTo:S,clickConnecting:k,isPossibleEndHandle:C,connectionInProcess:$,clickConnectionInProcess:b,valid:P}=re(qS(p,m,e),de);p||(I=(T=x.getState()).onError)==null||I.call(T,"010",yt.error010());const z=O=>{const{defaultEdgeOptions:M,onConnect:N,hasDefaultEdges:R}=x.getState(),j={...M,...O};if(R){const{edges:D,setEdges:W,onError:U}=x.getState();W(zS(j,D,{onError:U}))}N==null||N(j),l==null||l(j)},F=O=>{if(!p)return;const M=Zp(O.nativeEvent);if(o&&(M&&O.button===0||!M)){const N=x.getState();Qa.onPointerDown(O.nativeEvent,{handleDomNode:O.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:(...R)=>{var j,D;return(D=(j=x.getState()).onConnectEnd)==null?void 0:D.call(j,...R)},updateConnection:N.updateConnection,onConnect:z,isValidConnection:n||((...R)=>{var j,D;return((D=(j=x.getState()).isValidConnection)==null?void 0:D.call(j,...R))??!0}),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:N.autoPanSpeed,dragThreshold:N.connectionDragThreshold})}M?c==null||c(O):f==null||f(O)},E=O=>{const{onClickConnectStart:M,onClickConnectEnd:N,connectionClickStartHandle:R,connectionMode:j,isValidConnection:D,lib:W,rfId:U,nodeLookup:Z,connection:q}=x.getState();if(!p||!R&&!o)return;if(!R){M==null||M(O.nativeEvent,{nodeId:p,handleId:m,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:p,type:e,id:m}});return}const G=Qp(O.target),V=n||D,{connection:B,isValid:ee}=Qa.isValid(O.nativeEvent,{handle:{nodeId:p,id:m,type:e},connectionMode:j,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:V,flowId:U,doc:G,lib:W,nodeLookup:Z});ee&&B&&z(B);const J=structuredClone(q);delete J.inProgress,J.toPosition=J.toHandle?J.toHandle.position:null,N==null||N(O,J),x.setState({connectionClickStartHandle:null})};return L.jsx("div",{"data-handleid":m,"data-nodeid":p,"data-handlepos":t,"data-id":`${v}-${p}-${m}-${e}`,className:Ee(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",h,a,{source:!w,target:w,connectable:r,connectablestart:o,connectableend:i,clickconnecting:k,connectingfrom:_,connectingto:S,valid:P,connectionindicator:r&&(!$||C)&&($||b?i:o)}]),onMouseDown:F,onTouchStart:F,onClick:y?E:void 0,ref:g,...d,children:u})}const Tt=A.memo(Yg(JS));function ek({data:e,isConnectable:t,sourcePosition:n=X.Bottom}){return L.jsxs(L.Fragment,{children:[e==null?void 0:e.label,L.jsx(Tt,{type:"source",position:n,isConnectable:t})]})}function tk({data:e,isConnectable:t,targetPosition:n=X.Top,sourcePosition:r=X.Bottom}){return L.jsxs(L.Fragment,{children:[L.jsx(Tt,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,L.jsx(Tt,{type:"source",position:r,isConnectable:t})]})}function nk(){return null}function rk({data:e,isConnectable:t,targetPosition:n=X.Top}){return L.jsxs(L.Fragment,{children:[L.jsx(Tt,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Gs={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Jg={input:ek,default:tk,output:rk,group:nk};function ok(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 ik=e=>{const{width:t,height:n,x:r,y:o}=Yo(e.nodeLookup,{filter:i=>!!i.selected});return{width:vt(t)?t:null,height:vt(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 sk({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=he(),{width:o,height:i,transformString:s,userSelectionActive:l}=re(ik,de),u=Zg(),a=A.useRef(null);A.useEffect(()=>{var g;n||(g=a.current)==null||g.focus({preventScroll:!0})},[n]);const c=!l&&o!==null&&i!==null;if(Kg({nodeRef:a,disabled:!c}),!c)return null;const f=e?g=>{const m=r.getState().nodes.filter(w=>w.selected);e(g,m)}:void 0,d=g=>{Object.prototype.hasOwnProperty.call(Gs,g.key)&&(g.preventDefault(),u({direction:Gs[g.key],factor:g.shiftKey?4:1}))};return L.jsx("div",{className:Ee(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:L.jsx("div",{ref:a,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:d,style:{width:o,height:i}})})}const em=typeof window<"u"?window:void 0,lk=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function tm({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:u,selectionKeyCode:a,selectionOnDrag:c,selectionMode:f,onSelectionStart:d,onSelectionEnd:g,multiSelectionKeyCode:m,panActivationKeyCode:w,zoomActivationKeyCode:x,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:h,panOnScroll:v,panOnScrollSpeed:_,panOnScrollMode:S,zoomOnDoubleClick:k,panOnDrag:C,autoPanOnSelection:$,defaultViewport:b,translateExtent:P,minZoom:z,maxZoom:F,preventScrolling:E,onSelectionContextMenu:T,noWheelClassName:I,noPanClassName:O,disableKeyboardA11y:M,onViewportChange:N,isControlledViewport:R}){const{nodesSelectionActive:j,userSelectionActive:D}=re(lk,de),W=Zo(a,{target:em}),U=Zo(w,{target:em}),Z=U||C,q=U||v,G=c&&Z!==!0,V=W||D||G;return VS({deleteKeyCode:u,multiSelectionKeyCode:m}),L.jsx(WS,{onPaneContextMenu:i,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:h,panOnScroll:q,panOnScrollSpeed:_,panOnScrollMode:S,zoomOnDoubleClick:k,panOnDrag:!W&&Z,defaultViewport:b,translateExtent:P,minZoom:z,maxZoom:F,zoomActivationKeyCode:x,preventScrolling:E,noWheelClassName:I,noPanClassName:O,onViewportChange:N,isControlledViewport:R,paneClickDistance:l,selectionOnDrag:G,children:L.jsxs(GS,{onSelectionStart:d,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:Z,autoPanOnSelection:$,isSelecting:!!V,selectionMode:f,selectionKeyPressed:W,paneClickDistance:l,selectionOnDrag:G,children:[e,j&&L.jsx(sk,{onSelectionContextMenu:T,noPanClassName:O,disableKeyboardA11y:M})]})})}tm.displayName="FlowRenderer";const uk=A.memo(tm),ak=e=>t=>e?Oa(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 ck(e){return re(A.useCallback(ak(e),[e]),de)}const fk=e=>e.updateNodeInternals;function dk(){const e=re(fk),[t]=A.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 A.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function hk({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=he(),i=A.useRef(null),s=A.useRef(null),l=A.useRef(e.sourcePosition),u=A.useRef(e.targetPosition),a=A.useRef(t),c=n&&!!e.internals.handleBounds;return A.useEffect(()=>{i.current&&!e.hidden&&(!c||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[c,e.hidden]),A.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),A.useEffect(()=>{if(i.current){const f=a.current!==t,d=l.current!==e.sourcePosition,g=u.current!==e.targetPosition;(f||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 pk({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:u,nodesConnectable:a,nodesFocusable:c,resizeObserver:f,noDragClassName:d,noPanClassName:g,disableKeyboardA11y:m,rfId:w,nodeTypes:x,nodeClickDistance:p,onError:y}){const{node:h,internals:v,isParent:_}=re(V=>{const B=V.nodeLookup.get(e),ee=V.parentLookup.has(e);return{node:B,internals:B.internals,isParent:ee}},de);let S=h.type||"default",k=(x==null?void 0:x[S])||Jg[S];k===void 0&&(y==null||y("003",yt.error003(S)),S="default",k=(x==null?void 0:x.default)||Jg.default);const C=!!(h.draggable||l&&typeof h.draggable>"u"),$=!!(h.selectable||u&&typeof h.selectable>"u"),b=!!(h.connectable||a&&typeof h.connectable>"u"),P=!!(h.focusable||c&&typeof h.focusable>"u"),z=he(),F=Yp(h),E=hk({node:h,nodeType:S,hasDimensions:F,resizeObserver:f}),T=Kg({nodeRef:E,disabled:h.hidden||!C,noDragClassName:d,handleSelector:h.dragHandle,nodeId:e,isSelectable:$,nodeClickDistance:p}),I=Zg();if(h.hidden)return null;const O=Qt(h),M=ok(h),N=$||C||t||n||r||o,R=n?V=>n(V,{...v.userNode}):void 0,j=r?V=>r(V,{...v.userNode}):void 0,D=o?V=>o(V,{...v.userNode}):void 0,W=i?V=>i(V,{...v.userNode}):void 0,U=s?V=>s(V,{...v.userNode}):void 0,Z=V=>{const{selectNodesOnDrag:B,nodeDragThreshold:ee}=z.getState();$&&(!B||!C||ee>0)&&tc({id:e,store:z,nodeRef:E}),t&&t(V,{...v.userNode})},q=V=>{if(!(Kp(V.nativeEvent)||m)){if(bp.includes(V.key)&&$){const B=V.key==="Escape";tc({id:e,store:z,unselect:B,nodeRef:E})}else if(C&&h.selected&&Object.prototype.hasOwnProperty.call(Gs,V.key)){V.preventDefault();const{ariaLabelConfig:B}=z.getState();z.setState({ariaLiveMessage:B["node.a11yDescription.ariaLiveMessage"]({direction:V.key.replace("Arrow","").toLowerCase(),x:~~v.positionAbsolute.x,y:~~v.positionAbsolute.y})}),I({direction:Gs[V.key],factor:V.shiftKey?4:1})}}},G=()=>{var ne;if(m||!((ne=E.current)!=null&&ne.matches(":focus-visible")))return;const{transform:V,width:B,height:ee,autoPanOnNodeFocus:J,setCenter:K}=z.getState();if(!J)return;Oa(new Map([[e,h]]),{x:0,y:0,width:B,height:ee},V,!0).length>0||K(h.position.x+O.width/2,h.position.y+O.height/2,{zoom:V[2]})};return L.jsx("div",{className:Ee(["react-flow__node",`react-flow__node-${S}`,{[g]:C},h.className,{selected:h.selected,selectable:$,parent:_,draggable:C,dragging:T}]),ref:E,style:{zIndex:v.z,transform:`translate(${v.positionAbsolute.x}px,${v.positionAbsolute.y}px)`,pointerEvents:N?"all":"none",visibility:F?"visible":"hidden",...h.style,...M},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:R,onMouseMove:j,onMouseLeave:D,onContextMenu:W,onClick:Z,onDoubleClick:U,onKeyDown:P?q:void 0,tabIndex:P?0:void 0,onFocus:P?G:void 0,role:h.ariaRole??(P?"group":void 0),"aria-roledescription":"node","aria-describedby":m?void 0:`${zg}-${w}`,"aria-label":h.ariaLabel,...h.domAttributes,children:L.jsx(KS,{value:e,children:L.jsx(k,{id:e,data:h.data,type:S,positionAbsoluteX:v.positionAbsolute.x,positionAbsoluteY:v.positionAbsolute.y,selected:h.selected??!1,selectable:$,draggable:C,deletable:h.deletable??!0,isConnectable:b,sourcePosition:h.sourcePosition,targetPosition:h.targetPosition,dragging:T,dragHandle:h.dragHandle,zIndex:v.z,parentId:h.parentId,...O})})})}var gk=A.memo(pk);const mk=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function nm(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,onError:i}=re(mk,de),s=ck(e.onlyRenderVisibleElements),l=dk();return L.jsx("div",{className:"react-flow__nodes",style:Xs,children:s.map(u=>L.jsx(gk,{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))})}nm.displayName="NodeRenderer";const yk=A.memo(nm);function vk(e){return re(A.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&&e_({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),de)}const wk=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return L.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},xk=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return L.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},rm={[Rs.Arrow]:wk,[Rs.ArrowClosed]:xk};function Ek(e){const t=he();return A.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(rm,e)?rm[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",yt.error009(e)),null)},[e])}const _k=({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=Ek(t);return u?L.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:L.jsx(u,{color:n,strokeWidth:s})}):null},om=({defaultColor:e,rfId:t})=>{const n=re(i=>i.edges),r=re(i=>i.defaultEdgeOptions),o=A.useMemo(()=>u_(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?L.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:L.jsx("defs",{children:o.map(i=>L.jsx(_k,{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};om.displayName="MarkerDefinitions";var Sk=A.memo(om);function im({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:u,className:a,...c}){const[f,d]=A.useState({x:1,y:0,width:0,height:0}),g=Ee(["react-flow__edge-textwrapper",a]),m=A.useRef(null);return A.useEffect(()=>{if(m.current){const w=m.current.getBBox();d({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?L.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:g,visibility:f.width?"visible":"hidden",...c,children:[o&&L.jsx("rect",{width:f.width+2*s[0],x:-s[0],y:-s[1],height:f.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),L.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:m,style:r,children:n}),u]}):null}im.displayName="EdgeText";const kk=A.memo(im);function Qs({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u,interactionWidth:a=20,...c}){return L.jsxs(L.Fragment,{children:[L.jsx("path",{...c,d:e,fill:"none",className:Ee(["react-flow__edge-path",c.className])}),a?L.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:a,className:"react-flow__edge-interaction"}):null,r&&vt(t)&&vt(n)?L.jsx(kk,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:u}):null]})}function sm({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===X.Left||e===X.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function lm({sourceX:e,sourceY:t,sourcePosition:n=X.Bottom,targetX:r,targetY:o,targetPosition:i=X.Top}){const[s,l]=sm({pos:n,x1:e,y1:t,x2:r,y2:o}),[u,a]=sm({pos:i,x1:r,y1:o,x2:e,y2:t}),[c,f,d,g]=Jp({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}`,c,f,d,g]}function um(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:l,label:u,labelStyle:a,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:g,style:m,markerEnd:w,markerStart:x,interactionWidth:p})=>{const[y,h,v]=lm({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l}),_=e.isInternal?void 0:t;return L.jsx(Qs,{id:_,path:y,labelX:h,labelY:v,label:u,labelStyle:a,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:g,style:m,markerEnd:w,markerStart:x,interactionWidth:p})})}const Nk=um({isInternal:!1}),am=um({isInternal:!0});Nk.displayName="SimpleBezierEdge",am.displayName="SimpleBezierEdgeInternal";function cm(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:u,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:f,style:d,sourcePosition:g=X.Bottom,targetPosition:m=X.Top,markerEnd:w,markerStart:x,pathOptions:p,interactionWidth:y})=>{const[h,v,_]=Fa({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}),S=e.isInternal?void 0:t;return L.jsx(Qs,{id:S,path:h,labelX:v,labelY:_,label:s,labelStyle:l,labelShowBg:u,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:w,markerStart:x,interactionWidth:y})})}const fm=cm({isInternal:!1}),dm=cm({isInternal:!0});fm.displayName="SmoothStepEdge",dm.displayName="SmoothStepEdgeInternal";function hm(e){return A.memo(({id:t,...n})=>{var o;const r=e.isInternal?void 0:t;return L.jsx(fm,{...n,id:r,pathOptions:A.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const Ck=hm({isInternal:!1}),pm=hm({isInternal:!0});Ck.displayName="StepEdge",pm.displayName="StepEdgeInternal";function gm(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:u,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:g,markerStart:m,interactionWidth:w})=>{const[x,p,y]=rg({sourceX:n,sourceY:r,targetX:o,targetY:i}),h=e.isInternal?void 0:t;return L.jsx(Qs,{id:h,path:x,labelX:p,labelY:y,label:s,labelStyle:l,labelShowBg:u,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:g,markerStart:m,interactionWidth:w})})}const Mk=gm({isInternal:!1}),mm=gm({isInternal:!0});Mk.displayName="StraightEdge",mm.displayName="StraightEdgeInternal";function ym(e){return A.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s=X.Bottom,targetPosition:l=X.Top,label:u,labelStyle:a,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:g,style:m,markerEnd:w,markerStart:x,pathOptions:p,interactionWidth:y})=>{const[h,v,_]=tg({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l,curvature:p==null?void 0:p.curvature}),S=e.isInternal?void 0:t;return L.jsx(Qs,{id:S,path:h,labelX:v,labelY:_,label:u,labelStyle:a,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:g,style:m,markerEnd:w,markerStart:x,interactionWidth:y})})}const Ik=ym({isInternal:!1}),vm=ym({isInternal:!0});Ik.displayName="BezierEdge",vm.displayName="BezierEdgeInternal";const wm={default:vm,straight:mm,step:pm,smoothstep:dm,simplebezier:am},xm={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Pk=(e,t,n)=>n===X.Left?e-t:n===X.Right?e+t:e,Lk=(e,t,n)=>n===X.Top?e-t:n===X.Bottom?e+t:e,Em="react-flow__edgeupdater";function _m({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:s,type:l}){return L.jsx("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:s,className:Ee([Em,`${Em}-${l}`]),cx:Pk(t,r,e),cy:Lk(n,r,e),r,stroke:"transparent",fill:"transparent"})}function Tk({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:l,targetPosition:u,onReconnect:a,onReconnectStart:c,onReconnectEnd:f,setReconnecting:d,setUpdateHover:g}){const m=he(),w=(v,_)=>{if(v.button!==0)return;const{autoPanOnConnect:S,domNode:k,connectionMode:C,connectionRadius:$,lib:b,onConnectStart:P,cancelConnection:z,nodeLookup:F,rfId:E,panBy:T,updateConnection:I}=m.getState(),O=_.type==="target",M=(j,D)=>{d(!1),f==null||f(j,n,_.type,D)},N=j=>a==null?void 0:a(n,j),R=(j,D)=>{d(!0),c==null||c(v,n,_.type),P==null||P(j,D)};Qa.onPointerDown(v.nativeEvent,{autoPanOnConnect:S,connectionMode:C,connectionRadius:$,domNode:k,handleId:_.id,nodeId:_.nodeId,nodeLookup:F,isTarget:O,edgeUpdaterType:_.type,lib:b,flowId:E,cancelConnection:z,panBy:T,isValidConnection:(...j)=>{var D,W;return((W=(D=m.getState()).isValidConnection)==null?void 0:W.call(D,...j))??!0},onConnect:N,onConnectStart:R,onConnectEnd:(...j)=>{var D,W;return(W=(D=m.getState()).onConnectEnd)==null?void 0:W.call(D,...j)},onReconnectEnd:M,updateConnection:I,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 L.jsxs(L.Fragment,{children:[(e===!0||e==="source")&&L.jsx(_m,{position:l,centerX:r,centerY:o,radius:t,onMouseDown:x,onMouseEnter:y,onMouseOut:h,type:"source"}),(e===!0||e==="target")&&L.jsx(_m,{position:u,centerX:i,centerY:s,radius:t,onMouseDown:p,onMouseEnter:y,onMouseOut:h,type:"target"})]})}function $k({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:u,onMouseLeave:a,reconnectRadius:c,onReconnect:f,onReconnectStart:d,onReconnectEnd:g,rfId:m,edgeTypes:w,noPanClassName:x,onError:p,disableKeyboardA11y:y}){let h=re(K=>K.edgeLookup.get(e));const v=re(K=>K.defaultEdgeOptions);h=v?{...v,...h}:h;let _=h.type||"default",S=(w==null?void 0:w[_])||wm[_];S===void 0&&(p==null||p("011",yt.error011(_)),_="default",S=(w==null?void 0:w.default)||wm.default);const k=!!(h.focusable||t&&typeof h.focusable>"u"),C=typeof f<"u"&&(h.reconnectable||n&&typeof h.reconnectable>"u"),$=!!(h.selectable||r&&typeof h.selectable>"u"),b=A.useRef(null),[P,z]=A.useState(!1),[F,E]=A.useState(!1),T=he(),{zIndex:I,sourceX:O,sourceY:M,targetX:N,targetY:R,sourcePosition:j,targetPosition:D}=re(A.useCallback(K=>{const Q=K.nodeLookup.get(h.source),ne=K.nodeLookup.get(h.target);if(!Q||!ne)return{zIndex:h.zIndex,...xm};const ie=l_({id:e,sourceNode:Q,targetNode:ne,sourceHandle:h.sourceHandle||null,targetHandle:h.targetHandle||null,connectionMode:K.connectionMode,onError:p});return{zIndex:JE({selected:h.selected,zIndex:h.zIndex,sourceNode:Q,targetNode:ne,elevateOnSelect:K.elevateEdgesOnSelect,zIndexMode:K.zIndexMode}),...ie||xm}},[h.source,h.target,h.sourceHandle,h.targetHandle,h.selected,h.zIndex]),de),W=A.useMemo(()=>h.markerStart?`url('#${Va(h.markerStart,m)}')`:void 0,[h.markerStart,m]),U=A.useMemo(()=>h.markerEnd?`url('#${Va(h.markerEnd,m)}')`:void 0,[h.markerEnd,m]);if(h.hidden||O===null||M===null||N===null||R===null)return null;const Z=K=>{var le;const{addSelectedEdges:Q,unselectNodesAndEdges:ne,multiSelectionActive:ie}=T.getState();$&&(T.setState({nodesSelectionActive:!1}),h.selected&&ie?(ne({nodes:[],edges:[h]}),(le=b.current)==null||le.blur()):Q([e])),o&&o(K,h)},q=i?K=>{i(K,{...h})}:void 0,G=s?K=>{s(K,{...h})}:void 0,V=l?K=>{l(K,{...h})}:void 0,B=u?K=>{u(K,{...h})}:void 0,ee=a?K=>{a(K,{...h})}:void 0,J=K=>{var Q;if(!y&&bp.includes(K.key)&&$){const{unselectNodesAndEdges:ne,addSelectedEdges:ie}=T.getState();K.key==="Escape"?((Q=b.current)==null||Q.blur(),ne({edges:[h]})):ie([e])}};return L.jsx("svg",{style:{zIndex:I},children:L.jsxs("g",{className:Ee(["react-flow__edge",`react-flow__edge-${_}`,h.className,x,{selected:h.selected,animated:h.animated,inactive:!$&&!o,updating:P,selectable:$}]),onClick:Z,onDoubleClick:q,onContextMenu:G,onMouseEnter:V,onMouseMove:B,onMouseLeave:ee,onKeyDown:k?J:void 0,tabIndex:k?0:void 0,role:h.ariaRole??(k?"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":k?`${bg}-${m}`:void 0,ref:b,...h.domAttributes,children:[!F&&L.jsx(S,{id:e,source:h.source,target:h.target,type:h.type,selected:h.selected,animated:h.animated,selectable:$,deletable:h.deletable??!0,label:h.label,labelStyle:h.labelStyle,labelShowBg:h.labelShowBg,labelBgStyle:h.labelBgStyle,labelBgPadding:h.labelBgPadding,labelBgBorderRadius:h.labelBgBorderRadius,sourceX:O,sourceY:M,targetX:N,targetY:R,sourcePosition:j,targetPosition:D,data:h.data,style:h.style,sourceHandleId:h.sourceHandle,targetHandleId:h.targetHandle,markerStart:W,markerEnd:U,pathOptions:"pathOptions"in h?h.pathOptions:void 0,interactionWidth:h.interactionWidth}),C&&L.jsx(Tk,{edge:h,isReconnectable:C,reconnectRadius:c,onReconnect:f,onReconnectStart:d,onReconnectEnd:g,sourceX:O,sourceY:M,targetX:N,targetY:R,sourcePosition:j,targetPosition:D,setUpdateHover:z,setReconnecting:E})]})})}var zk=A.memo($k);const bk=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Sm({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:u,onEdgeMouseLeave:a,onEdgeClick:c,reconnectRadius:f,onEdgeDoubleClick:d,onReconnectStart:g,onReconnectEnd:m,disableKeyboardA11y:w}){const{edgesFocusable:x,edgesReconnectable:p,elementsSelectable:y,onError:h}=re(bk,de),v=vk(t);return L.jsxs("div",{className:"react-flow__edges",children:[L.jsx(Sk,{defaultColor:e,rfId:n}),v.map(_=>L.jsx(zk,{id:_,edgesFocusable:x,edgesReconnectable:p,elementsSelectable:y,noPanClassName:o,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:u,onMouseLeave:a,onClick:c,reconnectRadius:f,onDoubleClick:d,onReconnectStart:g,onReconnectEnd:m,rfId:n,onError:h,edgeTypes:r,disableKeyboardA11y:w},_))]})}Sm.displayName="EdgeRenderer";const Ok=A.memo(Sm),Rk=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Ak({children:e}){const t=re(Rk);return L.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Dk(e){const t=Ja(),n=A.useRef(!1);A.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const jk=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function Fk(e){const t=re(jk),n=he();return A.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Vk(e){return e.connection.inProgress?{...e.connection,to:Or(e.connection.to,e.transform)}:{...e.connection}}function Hk(e){return Vk}function Bk(e){const t=Hk();return re(t,de)}const Wk=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Uk({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:i,height:s,isValid:l,inProgress:u}=re(Wk,de);return!(i&&o&&u)?null:L.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:L.jsx("g",{className:Ee(["react-flow__connection",Dp(l)]),children:L.jsx(km,{style:t,type:n,CustomComponent:r,isValid:l})})})}const km=({style:e,type:t=En.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:i,fromNode:s,fromHandle:l,fromPosition:u,to:a,toNode:c,toHandle:f,toPosition:d,pointer:g}=Bk();if(!o)return;if(n)return L.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:Dp(r),toNode:c,toHandle:f,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 En.Bezier:[m]=tg(w);break;case En.SimpleBezier:[m]=lm(w);break;case En.Step:[m]=Fa({...w,borderRadius:0});break;case En.SmoothStep:[m]=Fa(w);break;default:[m]=rg(w)}return L.jsx("path",{d:m,fill:"none",className:"react-flow__connection-path",style:e})};km.displayName="ConnectionLine";const Yk={};function Nm(e=Yk){A.useRef(e),he(),A.useEffect(()=>{},[e])}function Xk(){he(),A.useRef(!1),A.useEffect(()=>{},[])}function Cm({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:u,onNodeMouseLeave:a,onNodeContextMenu:c,onSelectionContextMenu:f,onSelectionStart:d,onSelectionEnd:g,connectionLineType:m,connectionLineStyle:w,connectionLineComponent:x,connectionLineContainerStyle:p,selectionKeyCode:y,selectionOnDrag:h,selectionMode:v,multiSelectionKeyCode:_,panActivationKeyCode:S,zoomActivationKeyCode:k,deleteKeyCode:C,onlyRenderVisibleElements:$,elementsSelectable:b,defaultViewport:P,translateExtent:z,minZoom:F,maxZoom:E,preventScrolling:T,defaultMarkerColor:I,zoomOnScroll:O,zoomOnPinch:M,panOnScroll:N,panOnScrollSpeed:R,panOnScrollMode:j,zoomOnDoubleClick:D,panOnDrag:W,autoPanOnSelection:U,onPaneClick:Z,onPaneMouseEnter:q,onPaneMouseMove:G,onPaneMouseLeave:V,onPaneScroll:B,onPaneContextMenu:ee,paneClickDistance:J,nodeClickDistance:K,onEdgeContextMenu:Q,onEdgeMouseEnter:ne,onEdgeMouseMove:ie,onEdgeMouseLeave:le,reconnectRadius:we,onReconnect:st,onReconnectStart:$t,onReconnectEnd:zt,noDragClassName:Zt,noWheelClassName:Jo,noPanClassName:Kn,disableKeyboardA11y:Zn,nodeExtent:Et,rfId:qt,viewport:Jt,onViewportChange:qn}){return Nm(e),Nm(t),Xk(),Dk(n),Fk(Jt),L.jsx(uk,{onPaneClick:Z,onPaneMouseEnter:q,onPaneMouseMove:G,onPaneMouseLeave:V,onPaneContextMenu:ee,onPaneScroll:B,paneClickDistance:J,deleteKeyCode:C,selectionKeyCode:y,selectionOnDrag:h,selectionMode:v,onSelectionStart:d,onSelectionEnd:g,multiSelectionKeyCode:_,panActivationKeyCode:S,zoomActivationKeyCode:k,elementsSelectable:b,zoomOnScroll:O,zoomOnPinch:M,zoomOnDoubleClick:D,panOnScroll:N,panOnScrollSpeed:R,panOnScrollMode:j,panOnDrag:W,autoPanOnSelection:U,defaultViewport:P,translateExtent:z,minZoom:F,maxZoom:E,onSelectionContextMenu:f,preventScrolling:T,noDragClassName:Zt,noWheelClassName:Jo,noPanClassName:Kn,disableKeyboardA11y:Zn,onViewportChange:qn,isControlledViewport:!!Jt,children:L.jsxs(Ak,{children:[L.jsx(Ok,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:s,onReconnect:st,onReconnectStart:$t,onReconnectEnd:zt,onlyRenderVisibleElements:$,onEdgeContextMenu:Q,onEdgeMouseEnter:ne,onEdgeMouseMove:ie,onEdgeMouseLeave:le,reconnectRadius:we,defaultMarkerColor:I,noPanClassName:Kn,disableKeyboardA11y:Zn,rfId:qt}),L.jsx(Uk,{style:w,type:m,component:x,containerStyle:p}),L.jsx("div",{className:"react-flow__edgelabel-renderer"}),L.jsx(yk,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:u,onNodeMouseLeave:a,onNodeContextMenu:c,nodeClickDistance:K,onlyRenderVisibleElements:$,noPanClassName:Kn,noDragClassName:Zt,disableKeyboardA11y:Zn,nodeExtent:Et,rfId:qt}),L.jsx("div",{className:"react-flow__viewport-portal"})]})})}Cm.displayName="GraphView";const Gk=A.memo(Cm),Qk=Up(),Mm=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:u=.5,maxZoom:a=2,nodeOrigin:c,nodeExtent:f,zIndexMode:d="basic"}={})=>{const g=new Map,m=new Map,w=new Map,x=new Map,p=r??t??[],y=n??e??[],h=c??[0,0],v=f??Bo;dg(w,x,p);const{nodesInitialized:_}=Ua(y,g,m,{nodeOrigin:h,nodeExtent:v,zIndexMode:d});let S=[0,0,1];if(s&&o&&i){const k=Yo(g,{filter:P=>!!((P.width||P.initialWidth)&&(P.height||P.initialHeight))}),{x:C,y:$,zoom:b}=Da(k,o,i,u,a,(l==null?void 0:l.padding)??.1);S=[C,$,b]}return{rfId:"1",width:o??0,height:i??0,transform:S,nodes:y,nodesInitialized:_,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:Bo,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:{...Rp},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Qk,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Op,zIndexMode:d,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Kk=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:u,maxZoom:a,nodeOrigin:c,nodeExtent:f,zIndexMode:d})=>cS((g,m)=>{async function w(){const{nodeLookup:x,panZoom:p,fitViewOptions:y,fitViewResolver:h,width:v,height:_,minZoom:S,maxZoom:k}=m();p&&(await YE({nodes:x,width:v,height:_,panZoom:p,minZoom:S,maxZoom:k},y),h==null||h.resolve(!0),g({fitViewResolver:null}))}return{...Mm({nodes:e,edges:t,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:u,maxZoom:a,nodeOrigin:c,nodeExtent:f,defaultNodes:n,defaultEdges:r,zIndexMode:d}),setNodes:x=>{const{nodeLookup:p,parentLookup:y,nodeOrigin:h,elevateNodesOnSelect:v,fitViewQueued:_,zIndexMode:S,nodesSelectionActive:k}=m(),{nodesInitialized:C,hasSelectedNodes:$}=Ua(x,p,y,{nodeOrigin:h,nodeExtent:f,elevateNodesOnSelect:v,checkEquality:!0,zIndexMode:S}),b=k&&$;_&&C?(w(),g({nodes:x,nodesInitialized:C,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:b})):g({nodes:x,nodesInitialized:C,nodesSelectionActive:b})},setEdges:x=>{const{connectionLookup:p,edgeLookup:y}=m();dg(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:_,nodeExtent:S,debug:k,fitViewQueued:C,zIndexMode:$}=m(),{changes:b,updatedInternals:P}=g_(x,y,h,v,_,S,$);P&&(f_(y,h,{nodeOrigin:_,nodeExtent:S,zIndexMode:$}),C?(w(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(b==null?void 0:b.length)>0&&(k&&console.log("React Flow: trigger node changes",b),p==null||p(b)))},updateNodePositions:(x,p=!1)=>{const y=[];let h=[];const{nodeLookup:v,triggerNodeChanges:_,connection:S,updateConnection:k,onNodesChangeMiddlewareMap:C}=m();for(const[$,b]of x){const P=v.get($),z=!!(P!=null&&P.expandParent&&(P!=null&&P.parentId)&&(b!=null&&b.position)),F={id:$,type:"position",position:z?{x:Math.max(0,b.position.x),y:Math.max(0,b.position.y)}:b.position,dragging:p};if(P&&S.inProgress&&S.fromNode.id===P.id){const E=Yn(P,S.fromHandle,X.Left,!0);k({...S,from:E})}z&&P.parentId&&y.push({id:$,parentId:P.parentId,rect:{...b.internals.positionAbsolute,width:b.measured.width??0,height:b.measured.height??0}}),h.push(F)}if(y.length>0){const{parentLookup:$,nodeOrigin:b}=m(),P=Xa(y,v,$,b);h.push(...P)}for(const $ of C.values())h=$(h);_(h)},triggerNodeChanges:x=>{const{onNodesChange:p,setNodes:y,nodes:h,hasDefaultNodes:v,debug:_}=m();if(x!=null&&x.length){if(v){const S=LS(x,h);y(S)}_&&console.log("React Flow: trigger node changes",x),p==null||p(x)}},triggerEdgeChanges:x=>{const{onEdgesChange:p,setEdges:y,edges:h,hasDefaultEdges:v,debug:_}=m();if(x!=null&&x.length){if(v){const S=TS(x,h);y(S)}_&&console.log("React Flow: trigger edge changes",x),p==null||p(x)}},addSelectedNodes:x=>{const{multiSelectionActive:p,edgeLookup:y,nodeLookup:h,triggerNodeChanges:v,triggerEdgeChanges:_}=m();if(p){const S=x.map(k=>Xn(k,!0));v(S);return}v(Vr(h,new Set([...x]),!0)),_(Vr(y))},addSelectedEdges:x=>{const{multiSelectionActive:p,edgeLookup:y,nodeLookup:h,triggerNodeChanges:v,triggerEdgeChanges:_}=m();if(p){const S=x.map(k=>Xn(k,!0));_(S);return}_(Vr(y,new Set([...x]))),v(Vr(h,new Set,!0))},unselectNodesAndEdges:({nodes:x,edges:p}={})=>{const{edges:y,nodes:h,nodeLookup:v,triggerNodeChanges:_,triggerEdgeChanges:S}=m(),k=x||h,C=p||y,$=[];for(const P of k){if(!P.selected)continue;const z=v.get(P.id);z&&(z.selected=!1),$.push(Xn(P.id,!1))}const b=[];for(const P of C)P.selected&&b.push(Xn(P.id,!1));_($),S(b)},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 _=p.reduce((k,C)=>C.selected?[...k,Xn(C.id,!1)]:k,[]),S=x.reduce((k,C)=>C.selected?[...k,Xn(C.id,!1)]:k,[]);y(_),h(S)},setNodeExtent:x=>{const{nodes:p,nodeLookup:y,parentLookup:h,nodeOrigin:v,elevateNodesOnSelect:_,nodeExtent:S,zIndexMode:k}=m();x[0][0]===S[0][0]&&x[0][1]===S[0][1]&&x[1][0]===S[1][0]&&x[1][1]===S[1][1]||(Ua(p,y,h,{nodeOrigin:v,nodeExtent:x,elevateNodesOnSelect:_,checkEquality:!1,zIndexMode:k}),g({nodeExtent:x}))},panBy:x=>{const{transform:p,width:y,height:h,panZoom:v,translateExtent:_}=m();return m_({delta:x,panZoom:v,transform:p,translateExtent:_,width:y,height:h})},setCenter:async(x,p,y)=>{const{width:h,height:v,maxZoom:_,panZoom:S}=m();if(!S)return!1;const k=typeof(y==null?void 0:y.zoom)<"u"?y.zoom:_;return await S.setViewport({x:h/2-x*k,y:v/2-p*k,zoom:k},{duration:y==null?void 0:y.duration,ease:y==null?void 0:y.ease,interpolate:y==null?void 0:y.interpolate}),!0},cancelConnection:()=>{g({connection:{...Rp}})},updateConnection:x=>{g({connection:x})},reset:()=>g({...Mm()})}},Object.is);function Im({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:u,fitView:a,nodeOrigin:c,nodeExtent:f,zIndexMode:d,children:g}){const[m]=A.useState(()=>Kk({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:a,minZoom:s,maxZoom:l,fitViewOptions:u,nodeOrigin:c,nodeExtent:f,zIndexMode:d}));return L.jsx(fS,{value:m,children:L.jsx(AS,{children:g})})}function Zk({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:l,fitViewOptions:u,minZoom:a,maxZoom:c,nodeOrigin:f,nodeExtent:d,zIndexMode:g}){return A.useContext(Ws)?L.jsx(L.Fragment,{children:e}):L.jsx(Im,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:u,initialMinZoom:a,initialMaxZoom:c,nodeOrigin:f,nodeExtent:d,zIndexMode:g,children:e})}const qk={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Jk({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:u,onInit:a,onMove:c,onMoveStart:f,onMoveEnd:d,onConnect:g,onConnectStart:m,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:p,onNodeMouseEnter:y,onNodeMouseMove:h,onNodeMouseLeave:v,onNodeContextMenu:_,onNodeDoubleClick:S,onNodeDragStart:k,onNodeDrag:C,onNodeDragStop:$,onNodesDelete:b,onEdgesDelete:P,onDelete:z,onSelectionChange:F,onSelectionDragStart:E,onSelectionDrag:T,onSelectionDragStop:I,onSelectionContextMenu:O,onSelectionStart:M,onSelectionEnd:N,onBeforeDelete:R,connectionMode:j,connectionLineType:D=En.Bezier,connectionLineStyle:W,connectionLineComponent:U,connectionLineContainerStyle:Z,deleteKeyCode:q="Backspace",selectionKeyCode:G="Shift",selectionOnDrag:V=!1,selectionMode:B=Wo.Full,panActivationKeyCode:ee="Space",multiSelectionKeyCode:J=Qo()?"Meta":"Control",zoomActivationKeyCode:K=Qo()?"Meta":"Control",snapToGrid:Q,snapGrid:ne,onlyRenderVisibleElements:ie=!1,selectNodesOnDrag:le,nodesDraggable:we,autoPanOnNodeFocus:st,nodesConnectable:$t,nodesFocusable:zt,nodeOrigin:Zt=Og,edgesFocusable:Jo,edgesReconnectable:Kn,elementsSelectable:Zn=!0,defaultViewport:Et=kS,minZoom:qt=.5,maxZoom:Jt=2,translateExtent:qn=Bo,preventScrolling:eI=!0,nodeExtent:yc,defaultMarkerColor:tI="#b1b1b7",zoomOnScroll:nI=!0,zoomOnPinch:rI=!0,panOnScroll:oI=!1,panOnScrollSpeed:iI=.5,panOnScrollMode:sI=Bn.Free,zoomOnDoubleClick:lI=!0,panOnDrag:uI=!0,onPaneClick:aI,onPaneMouseEnter:cI,onPaneMouseMove:fI,onPaneMouseLeave:dI,onPaneScroll:hI,onPaneContextMenu:pI,paneClickDistance:gI=1,nodeClickDistance:mI=0,children:yI,onReconnect:vI,onReconnectStart:wI,onReconnectEnd:xI,onEdgeContextMenu:EI,onEdgeDoubleClick:_I,onEdgeMouseEnter:SI,onEdgeMouseMove:kI,onEdgeMouseLeave:NI,reconnectRadius:CI=10,onNodesChange:MI,onEdgesChange:II,noDragClassName:PI="nodrag",noWheelClassName:LI="nowheel",noPanClassName:P0="nopan",fitView:L0,fitViewOptions:T0,connectOnClick:TI,attributionPosition:$I,proOptions:zI,defaultEdgeOptions:bI,elevateNodesOnSelect:OI=!0,elevateEdgesOnSelect:RI=!1,disableKeyboardA11y:$0=!1,autoPanOnConnect:AI,autoPanOnNodeDrag:DI,autoPanOnSelection:jI=!0,autoPanSpeed:FI,connectionRadius:VI,isValidConnection:HI,onError:BI,style:WI,id:z0,nodeDragThreshold:UI,connectionDragThreshold:YI,viewport:XI,onViewportChange:GI,width:QI,height:KI,colorMode:ZI="light",debug:qI,onScroll:nl,ariaLabelConfig:JI,zIndexMode:b0="basic",...eP},tP){const vc=z0||"1",nP=MS(ZI),rP=A.useCallback(O0=>{O0.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),nl==null||nl(O0)},[nl]);return L.jsx("div",{"data-testid":"rf__wrapper",...eP,onScroll:rP,style:{...WI,...qk},ref:tP,className:Ee(["react-flow",o,nP]),id:z0,role:"application",children:L.jsxs(Zk,{nodes:e,edges:t,width:QI,height:KI,fitView:L0,fitViewOptions:T0,minZoom:qt,maxZoom:Jt,nodeOrigin:Zt,nodeExtent:yc,zIndexMode:b0,children:[L.jsx(CS,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:m,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:p,nodesDraggable:we,autoPanOnNodeFocus:st,nodesConnectable:$t,nodesFocusable:zt,edgesFocusable:Jo,edgesReconnectable:Kn,elementsSelectable:Zn,elevateNodesOnSelect:OI,elevateEdgesOnSelect:RI,minZoom:qt,maxZoom:Jt,nodeExtent:yc,onNodesChange:MI,onEdgesChange:II,snapToGrid:Q,snapGrid:ne,connectionMode:j,translateExtent:qn,connectOnClick:TI,defaultEdgeOptions:bI,fitView:L0,fitViewOptions:T0,onNodesDelete:b,onEdgesDelete:P,onDelete:z,onNodeDragStart:k,onNodeDrag:C,onNodeDragStop:$,onSelectionDrag:T,onSelectionDragStart:E,onSelectionDragStop:I,onMove:c,onMoveStart:f,onMoveEnd:d,noPanClassName:P0,nodeOrigin:Zt,rfId:vc,autoPanOnConnect:AI,autoPanOnNodeDrag:DI,autoPanSpeed:FI,onError:BI,connectionRadius:VI,isValidConnection:HI,selectNodesOnDrag:le,nodeDragThreshold:UI,connectionDragThreshold:YI,onBeforeDelete:R,debug:qI,ariaLabelConfig:JI,zIndexMode:b0}),L.jsx(Gk,{onInit:a,onNodeClick:l,onEdgeClick:u,onNodeMouseEnter:y,onNodeMouseMove:h,onNodeMouseLeave:v,onNodeContextMenu:_,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:s,connectionLineType:D,connectionLineStyle:W,connectionLineComponent:U,connectionLineContainerStyle:Z,selectionKeyCode:G,selectionOnDrag:V,selectionMode:B,deleteKeyCode:q,multiSelectionKeyCode:J,panActivationKeyCode:ee,zoomActivationKeyCode:K,onlyRenderVisibleElements:ie,defaultViewport:Et,translateExtent:qn,minZoom:qt,maxZoom:Jt,preventScrolling:eI,zoomOnScroll:nI,zoomOnPinch:rI,zoomOnDoubleClick:lI,panOnScroll:oI,panOnScrollSpeed:iI,panOnScrollMode:sI,panOnDrag:uI,autoPanOnSelection:jI,onPaneClick:aI,onPaneMouseEnter:cI,onPaneMouseMove:fI,onPaneMouseLeave:dI,onPaneScroll:hI,onPaneContextMenu:pI,paneClickDistance:gI,nodeClickDistance:mI,onSelectionContextMenu:O,onSelectionStart:M,onSelectionEnd:N,onReconnect:vI,onReconnectStart:wI,onReconnectEnd:xI,onEdgeContextMenu:EI,onEdgeDoubleClick:_I,onEdgeMouseEnter:SI,onEdgeMouseMove:kI,onEdgeMouseLeave:NI,reconnectRadius:CI,defaultMarkerColor:tI,noDragClassName:PI,noWheelClassName:LI,noPanClassName:P0,rfId:vc,disableKeyboardA11y:$0,nodeExtent:yc,viewport:XI,onViewportChange:GI}),L.jsx(SS,{onSelectionChange:F}),yI,L.jsx(vS,{proOptions:zI,position:$I}),L.jsx(yS,{rfId:vc,disableKeyboardA11y:$0})]})})}var e2=Yg(Jk);function t2({dimensions:e,lineWidth:t,variant:n,className:r}){return L.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Ee(["react-flow__background-pattern",n,r])})}function n2({radius:e,className:t}){return L.jsx("circle",{cx:e,cy:e,r:e,className:Ee(["react-flow__background-pattern","dots",t])})}var kn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(kn||(kn={}));const r2={[kn.Dots]:1,[kn.Lines]:1,[kn.Cross]:6},o2=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Pm({id:e,variant:t=kn.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=0,color:s,bgColor:l,style:u,className:a,patternClassName:c}){const f=A.useRef(null),{transform:d,patternId:g}=re(o2,de),m=r||r2[t],w=t===kn.Dots,x=t===kn.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],_=x?[h,h]:y,S=[v[0]*d[2]||1+_[0]/2,v[1]*d[2]||1+_[1]/2],k=`${g}${e||""}`;return L.jsxs("svg",{className:Ee(["react-flow__background",a]),style:{...u,...Xs,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:f,"data-testid":"rf__background",children:[L.jsx("pattern",{id:k,x:d[0]%y[0],y:d[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:w?L.jsx(n2,{radius:h/2,className:c}):L.jsx(t2,{dimensions:_,lineWidth:o,variant:t,className:c})}),L.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${k})`})]})}Pm.displayName="Background";const i2=A.memo(Pm);function s2(){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:L.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function l2(){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:L.jsx("path",{d:"M0 0h32v4.2H0z"})})}function u2(){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:L.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 a2(){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:L.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 c2(){return L.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:L.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 Ks({children:e,className:t,...n}){return L.jsx("button",{type:"button",className:Ee(["react-flow__controls-button",t]),...n,children:e})}const f2=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Lm({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:u,className:a,children:c,position:f="bottom-left",orientation:d="vertical","aria-label":g}){const m=he(),{isInteractive:w,minZoomReached:x,maxZoomReached:p,ariaLabelConfig:y}=re(f2,de),{zoomIn:h,zoomOut:v,fitView:_}=Ja(),S=()=>{h(),i==null||i()},k=()=>{v(),s==null||s()},C=()=>{_(o),l==null||l()},$=()=>{m.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),u==null||u(!w)},b=d==="horizontal"?"horizontal":"vertical";return L.jsxs(Us,{className:Ee(["react-flow__controls",b,a]),position:f,style:e,"data-testid":"rf__controls","aria-label":g??y["controls.ariaLabel"],children:[t&&L.jsxs(L.Fragment,{children:[L.jsx(Ks,{onClick:S,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:p,children:L.jsx(s2,{})}),L.jsx(Ks,{onClick:k,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:x,children:L.jsx(l2,{})})]}),n&&L.jsx(Ks,{className:"react-flow__controls-fitview",onClick:C,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:L.jsx(u2,{})}),r&&L.jsx(Ks,{className:"react-flow__controls-interactive",onClick:$,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:w?L.jsx(c2,{}):L.jsx(a2,{})}),c]})}Lm.displayName="Controls";const d2=A.memo(Lm);function h2({id:e,x:t,y:n,width:r,height:o,style:i,color:s,strokeColor:l,strokeWidth:u,className:a,borderRadius:c,shapeRendering:f,selected:d,onClick:g}){const{background:m,backgroundColor:w}=i||{},x=s||m||w;return L.jsx("rect",{className:Ee(["react-flow__minimap-node",{selected:d},a]),x:t,y:n,rx:c,ry:c,width:r,height:o,style:{fill:x,stroke:l,strokeWidth:u},shapeRendering:f,onClick:g?p=>g(p,e):void 0})}const p2=A.memo(h2),g2=e=>e.nodes.map(t=>t.id),rc=e=>e instanceof Function?e:()=>e;function m2({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:i=p2,onClick:s}){const l=re(g2,de),u=rc(t),a=rc(e),c=rc(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return L.jsx(L.Fragment,{children:l.map(d=>L.jsx(v2,{id:d,nodeColorFunc:u,nodeStrokeColorFunc:a,nodeClassNameFunc:c,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:i,onClick:s,shapeRendering:f},d))})}function y2({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:u}){const{node:a,x:c,y:f,width:d,height:g}=re(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}=Qt(x);return{node:x,x:p,y,width:h,height:v}},de);return!a||a.hidden||!Yp(a)?null:L.jsx(l,{x:c,y:f,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 v2=A.memo(y2);var w2=A.memo(m2);const x2=200,E2=150,_2=e=>!e.hidden,S2=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?Bp(Yo(e.nodeLookup,{filter:_2}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},k2="react-flow__minimap-desc";function Tm({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:u,maskColor:a,maskStrokeColor:c,maskStrokeWidth:f,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 _=he(),S=A.useRef(null),{boundingRect:k,viewBB:C,rfId:$,panZoom:b,translateExtent:P,flowWidth:z,flowHeight:F,ariaLabelConfig:E}=re(S2,de),T=(e==null?void 0:e.width)??x2,I=(e==null?void 0:e.height)??E2,O=k.width/T,M=k.height/I,N=Math.max(O,M),R=N*T,j=N*I,D=v*N,W=k.x-(R-k.width)/2-D,U=k.y-(j-k.height)/2-D,Z=R+D*2,q=j+D*2,G=`${k2}-${$}`,V=A.useRef(0),B=A.useRef();V.current=N,A.useEffect(()=>{if(S.current&&b)return B.current=N_({domNode:S.current,panZoom:b,getTransform:()=>_.getState().transform,getViewScale:()=>V.current}),()=>{var Q;(Q=B.current)==null||Q.destroy()}},[b]),A.useEffect(()=>{var Q;(Q=B.current)==null||Q.update({translateExtent:P,width:z,height:F,inversePan:y,pannable:w,zoomStep:h,zoomable:x})},[w,x,y,h,P,z,F]);const ee=g?Q=>{var le;const[ne,ie]=((le=B.current)==null?void 0:le.pointer(Q))||[0,0];g(Q,{x:ne,y:ie})}:void 0,J=m?A.useCallback((Q,ne)=>{const ie=_.getState().nodeLookup.get(ne).internals.userNode;m(Q,ie)},[]):void 0,K=p??E["minimap.ariaLabel"];return L.jsx(Us,{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 c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*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:Ee(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:L.jsxs("svg",{width:T,height:I,viewBox:`${W} ${U} ${Z} ${q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":G,ref:S,onClick:ee,children:[K&&L.jsx("title",{id:G,children:K}),L.jsx(w2,{onClick:J,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:s,nodeComponent:l}),L.jsx("path",{className:"react-flow__minimap-mask",d:`M${W-D},${U-D}h${Z+D*2}v${q+D*2}h${-Z-D*2}z
62
+ M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Tm.displayName="MiniMap";const N2=A.memo(Tm),C2=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,M2={[jr.Line]:"right",[jr.Handle]:"bottom-right"};function I2({nodeId:e,position:t,variant:n=jr.Handle,className:r,style:o=void 0,children:i,color:s,minWidth:l=10,minHeight:u=10,maxWidth:a=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:d,autoScale:g=!0,shouldResize:m,onResizeStart:w,onResize:x,onResizeEnd:p}){const y=qg(),h=typeof e=="string"?e:y,v=he(),_=A.useRef(null),S=n===jr.Handle,k=re(A.useCallback(C2(S&&g),[S,g]),de),C=A.useRef(null),$=t??M2[n];A.useEffect(()=>{if(!(!_.current||!h))return C.current||(C.current=D_({domNode:_.current,nodeId:h,getStoreItems:()=>{const{nodeLookup:P,transform:z,snapGrid:F,snapToGrid:E,nodeOrigin:T,domNode:I}=v.getState();return{nodeLookup:P,transform:z,snapGrid:F,snapToGrid:E,nodeOrigin:T,paneDomNode:I}},onChange:(P,z)=>{const{triggerNodeChanges:F,nodeLookup:E,parentLookup:T,nodeOrigin:I}=v.getState(),O=[],M={x:P.x,y:P.y},N=E.get(h);if(N&&N.expandParent&&N.parentId){const R=N.origin??I,j=P.width??N.measured.width??0,D=P.height??N.measured.height??0,W={id:N.id,parentId:N.parentId,rect:{width:j,height:D,...Xp({x:P.x??N.position.x,y:P.y??N.position.y},{width:j,height:D},N.parentId,E,R)}},U=Xa([W],E,T,I);O.push(...U),M.x=P.x?Math.max(R[0]*j,P.x):void 0,M.y=P.y?Math.max(R[1]*D,P.y):void 0}if(M.x!==void 0&&M.y!==void 0){const R={id:h,type:"position",position:{...M}};O.push(R)}if(P.width!==void 0&&P.height!==void 0){const j={id:h,type:"dimensions",resizing:!0,setAttributes:d?d==="horizontal"?"width":"height":!0,dimensions:{width:P.width,height:P.height}};O.push(j)}for(const R of z){const j={...R,type:"position"};O.push(j)}F(O)},onEnd:({width:P,height:z})=>{const F={id:h,type:"dimensions",resizing:!1,dimensions:{width:P,height:z}};v.getState().triggerNodeChanges([F])}})),C.current.update({controlPosition:$,boundaries:{minWidth:l,minHeight:u,maxWidth:a,maxHeight:c},keepAspectRatio:f,resizeDirection:d,onResizeStart:w,onResize:x,onResizeEnd:p,shouldResize:m}),()=>{var P;(P=C.current)==null||P.destroy()}},[$,l,u,a,c,f,w,x,p,m]);const b=$.split("-");return L.jsx("div",{className:Ee(["react-flow__resize-control","nodrag",...b,n,r]),ref:_,style:{...o,scale:k,...s&&{[S?"backgroundColor":"borderColor"]:s}},children:i})}A.memo(I2);const P2={model:"var(--model, #2f6feb)",source:"var(--source, #16a34a)",seed:"var(--seed, #b45309)",snapshot:"var(--snapshot, #7c3aed)"},$m="__table_in",zm="__table_out",bm=e=>`${e}__in`,Om=e=>`${e}__out`;function L2(e){return e.is_primary_key?"PK":e.is_foreign_key?"FK":null}function T2({data:e}){const t=e.record,n=e.focused,r=P2[t.resource_type]??"var(--border, #888)";return L.jsxs("div",{className:`dbd-erd${n?" dbd-erd-focus":""}`,title:t.id,children:[L.jsx(Tt,{type:"target",position:X.Left,id:$m,className:"dbd-h-table"}),L.jsx(Tt,{type:"source",position:X.Right,id:zm,className:"dbd-h-table"}),L.jsxs("div",{className:"dbd-erd-head",style:{borderTopColor:r},children:[L.jsx("span",{className:"dbd-erd-name",children:t.label}),L.jsx("span",{className:"dbd-erd-schema",children:t.schema})]}),L.jsx("div",{className:"dbd-erd-cols",children:(t.columns??[]).map(o=>{const i=L2(o);return L.jsxs("div",{className:"dbd-erd-col",children:[L.jsx(Tt,{type:"target",position:X.Left,id:bm(o.name),className:"dbd-h-col"}),i?L.jsx("span",{className:`dbd-erd-badge dbd-${i.toLowerCase()}`,children:i}):L.jsx("span",{className:"dbd-erd-badge dbd-none"}),L.jsx("span",{className:"dbd-erd-colname",children:o.name}),L.jsx("span",{className:"dbd-erd-coltype",children:o.type}),L.jsx(Tt,{type:"source",position:X.Right,id:Om(o.name),className:"dbd-h-col"})]},o.name)})})]})}const $2={width:190,height:40},z2=230,b2=34,O2=22;function R2(e){var s;const t=e.nodes??{},n=Object.keys(t),r=n.map(l=>({id:l,type:"lineage",position:{x:0,y:0},data:{record:t[l]}})),o=(((s=e.lineage)==null?void 0:s.edges)??[]).map((l,u)=>({id:`l${u}`,source:l.source,target:l.target,type:"smoothstep"})),i=n.map(l=>({id:l,...$2}));return{nodes:r,edges:o,sizes:i}}function A2(e,t){const n=e.erd??{nodes:[],edges:[]};let r=n.nodes,o=n.edges;if(t){const c=new Set([t]);for(const f of n.edges)f.source===t&&c.add(f.target),f.target===t&&c.add(f.source);r=n.nodes.filter(f=>c.has(f.id)),o=n.edges.filter(f=>c.has(f.source)&&c.has(f.target))}const i=r.map(c=>({id:c.id,type:"erdTable",position:{x:0,y:0},data:{record:c,focused:c.id===t}})),s=new Map(r.map(c=>[c.id,new Set((c.columns??[]).map(f=>f.name))])),l=(c,f)=>{var d;return((d=s.get(c))==null?void 0:d.has(f))??!1},u=[];for(const c of o){const f=c.from_columns??[],d=c.to_columns??[],g=Math.max(f.length,d.length,1);for(let m=0;m<g;m++){const w=f[m]??f[0],x=d[m]??d[0];u.push({id:`${c.id}__${m}`,source:c.source,target:c.target,sourceHandle:w&&l(c.source,w)?Om(w):zm,targetHandle:x&&l(c.target,x)?bm(x):$m,type:"smoothstep",animated:c.type==="n1"})}}const a=r.map(c=>({id:c.id,width:z2,height:b2+Math.max(1,(c.columns??[]).length)*O2}));return{nodes:i,edges:u,sizes:a}}function D2(e,t){var s,l;const n=new Set([t]),r=((s=e.lineage)==null?void 0:s.parents)??{},o=((l=e.lineage)==null?void 0:l.children)??{},i=(u,a)=>{for(const c of a[u]??[])n.has(c)||(n.add(c),i(c,a))};return i(t,r),i(t,o),n}var j2="\0",Gn="\0",Rm="";let F2=class{constructor(t){Se(this,"_isDirected",!0);Se(this,"_isMultigraph",!1);Se(this,"_isCompound",!1);Se(this,"_label");Se(this,"_defaultNodeLabelFn",()=>{});Se(this,"_defaultEdgeLabelFn",()=>{});Se(this,"_nodes",{});Se(this,"_in",{});Se(this,"_preds",{});Se(this,"_out",{});Se(this,"_sucs",{});Se(this,"_edgeObjs",{});Se(this,"_edgeLabels",{});Se(this,"_nodeCount",0);Se(this,"_edgeCount",0);Se(this,"_parent");Se(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[Gn]={})}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]=Gn,this._children[t]={},this._children[Gn][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=Gn;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!==Gn)return n}}children(t=Gn){if(this._isCompound){var n=this._children[t];if(n)return Object.keys(n)}else{if(t===Gn)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=qo(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=V2(this._isDirected,t,n,r);return t=u.v,n=u.w,Object.freeze(u),this._edgeObjs[l]=u,Am(this._preds[n],t),Am(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?oc(this._isDirected,arguments[0]):qo(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?oc(this._isDirected,arguments[0]):qo(this._isDirected,t,n,r);return Object.hasOwn(this._edgeLabels,o)}removeEdge(t,n,r){var o=arguments.length===1?oc(this._isDirected,arguments[0]):qo(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],Dm(this._preds[n],t),Dm(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 Am(e,t){e[t]?e[t]++:e[t]=1}function Dm(e,t){--e[t]||delete e[t]}function qo(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var s=o;o=i,i=s}return o+Rm+i+Rm+(r===void 0?j2:r)}function V2(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 oc(e,t){return qo(e,t.v,t.w,t.name)}var ic=F2,H2="2.2.4",B2={Graph:ic,version:H2},W2=ic,U2={write:Y2,read:Q2};function Y2(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:X2(e),edges:G2(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function X2(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 G2(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 Q2(e){var t=new W2(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 K2=Z2;function Z2(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}var jm=class{constructor(){Se(this,"_arr",[]);Se(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}},q2=jm,Fm=eN,J2=()=>1;function eN(e,t,n,r){return tN(e,String(t),n||J2,r||function(o){return e.outEdges(o)})}function tN(e,t,n,r){var o={},i=new q2,s,l,u=function(a){var c=a.v!==s?a.v:a.w,f=o[c],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<f.distance&&(f.distance=g,f.predecessor=s,i.decrease(c,g))};for(e.nodes().forEach(function(a){var c=a===t?0:Number.POSITIVE_INFINITY;o[a]={distance:c},i.add(a,c)});i.size()>0&&(s=i.removeMin(),l=o[s],l.distance!==Number.POSITIVE_INFINITY);)r(s).forEach(u);return o}var nN=Fm,rN=oN;function oN(e,t,n){return e.nodes().reduce(function(r,o){return r[o]=nN(e,o,t,n),r},{})}var Vm=iN;function iN(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(c){Object.hasOwn(r,c)?r[c].onStack&&(l.lowlink=Math.min(l.lowlink,r[c].index)):(i(c),l.lowlink=Math.min(l.lowlink,r[c].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 sN=Vm,lN=uN;function uN(e){return sN(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var aN=fN,cN=()=>1;function fN(e,t,n){return dN(e,t||cN,n||function(r){return e.outEdges(r)})}function dN(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 c=u[i],f=s[a],d=u[a],g=c.distance+f.distance;g<d.distance&&(d.distance=g,d.predecessor=f.predecessor)})})}),r}function Hm(e){var t={},n={},r=[];function o(i){if(Object.hasOwn(n,i))throw new sc;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 sc;return r}class sc extends Error{constructor(){super(...arguments)}}var Bm=Hm;Hm.CycleException=sc;var Wm=Bm,hN=pN;function pN(e){try{Wm(e)}catch(t){if(t instanceof Wm.CycleException)return!1;throw t}return!0}var Um=gN;function gN(e,t,n){Array.isArray(t)||(t=[t]);var r=e.isDirected()?l=>e.successors(l):l=>e.neighbors(l),o=n==="post"?mN:yN,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 mN(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]),Ym(t(i[0]),s=>o.push([s,!1])))}}function yN(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),Ym(t(i),s=>o.push(s)))}}function Ym(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}var vN=Um,wN=xN;function xN(e,t){return vN(e,t,"post")}var EN=Um,_N=SN;function SN(e,t){return EN(e,t,"pre")}var kN=ic,NN=jm,CN=MN;function MN(e,t){var n=new kN,r={},o=new NN,i;function s(u){var a=u.v===i?u.w:u.v,c=o.priority(a);if(c!==void 0){var f=t(u);f<c&&(r[a]=i,o.decrease(a,f))}}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 IN={components:K2,dijkstra:Fm,dijkstraAll:rN,findCycles:lN,floydWarshall:aN,isAcyclic:hN,postorder:wN,preorder:_N,prim:CN,tarjan:Vm,topsort:Bm},Xm=B2,xt={Graph:Xm.Graph,json:U2,alg:IN,version:Xm.version};let PN=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return Gm(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&Gm(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,LN)),r=r._prev;return"["+t.join(", ")+"]"}};function Gm(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function LN(e,t){if(e!=="_next"&&e!=="_prev")return t}var TN=PN;let $N=xt.Graph,zN=TN;var bN=RN;let ON=()=>1;function RN(e,t){if(e.nodeCount()<=1)return[];let n=DN(e,t||ON);return AN(n.graph,n.buckets,n.zeroIdx).flatMap(o=>e.outEdges(o.v,o.w))}function AN(e,t,n){let r=[],o=t[t.length-1],i=t[0],s;for(;e.nodeCount();){for(;s=i.dequeue();)lc(e,t,n,s);for(;s=o.dequeue();)lc(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(lc(e,t,n,s,!0));break}}}return r}function lc(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,uc(t,n,u)}),e.outEdges(r.v).forEach(s=>{let l=e.edge(s),u=s.w,a=e.node(u);a.in-=l,uc(t,n,a)}),e.removeNode(r.v),i}function DN(e,t){let n=new $N,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),c=u+a;n.setEdge(l.v,l.w,c),o=Math.max(o,n.node(l.v).out+=a),r=Math.max(r,n.node(l.w).in+=a)});let i=jN(o+r+3).map(()=>new zN),s=r+1;return n.nodes().forEach(l=>{uc(i,s,n.node(l))}),{graph:n,buckets:i,zeroIdx:s}}function uc(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 jN(e){const t=[];for(let n=0;n<e;n++)t.push(n);return t}let Qm=xt.Graph;var _e={addBorderNode:GN,addDummyNode:Km,applyWithChunking:Zs,asNonCompoundGraph:VN,buildLayerMatrix:UN,intersectRect:WN,mapValues:tC,maxRank:qm,normalizeRanks:YN,notime:qN,partition:KN,pick:eC,predecessorWeights:BN,range:e0,removeEmptyRanks:XN,simplify:FN,successorWeights:HN,time:ZN,uniqueId:Jm,zipObject:ac};function Km(e,t,n,r){for(var o=r;e.hasNode(o);)o=Jm(r);return n.dummy=t,e.setNode(o,n),o}function FN(e){let t=new Qm().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 VN(e){let t=new Qm({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 HN(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 ac(e.nodes(),t)}function BN(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 ac(e.nodes(),t)}function WN(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 UN(e){let t=e0(qm(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 YN(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 XN(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 GN(e,t,n,r){let o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),Km(e,"border",o,t)}function QN(e,t=Zm){const n=[];for(let r=0;r<e.length;r+=t){const o=e.slice(r,r+t);n.push(o)}return n}const Zm=65535;function Zs(e,t){if(t.length>Zm){const n=QN(t);return e.apply(null,n.map(r=>e.apply(null,r)))}else return e.apply(null,t)}function qm(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 KN(e,t){let n={lhs:[],rhs:[]};return e.forEach(r=>{t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function ZN(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}}function qN(e,t){return t()}let JN=0;function Jm(e){var t=++JN;return e+(""+t)}function e0(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 eC(e,t){const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function tC(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 ac(e,t){return e.reduce((n,r,o)=>(n[r]=t[o],n),{})}let nC=bN,rC=_e.uniqueId;var oC={run:iC,undo:lC};function iC(e){(e.graph().acyclicer==="greedy"?nC(e,n(e)):sC(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,rC("rev"))});function n(r){return o=>r.edge(o).weight}}function sC(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 lC(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 uC=_e;var aC={run:cC,undo:dC};function cC(e){e.graph().dummyChains=[],e.edges().forEach(t=>fC(e,t))}function fC(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,c,f;for(f=0,++r;r<i;++f,++r)l.points=[],c={width:0,height:0,edgeLabel:l,edgeObj:t,rank:r},a=uC.addDummyNode(e,"edge",c,"_d"),r===u&&(c.width=l.width,c.height=l.height,c.dummy="edge-label",c.labelpos=l.labelpos),e.setEdge(n,a,{weight:l.weight},s),f===0&&e.graph().dummyChains.push(a),n=a;e.setEdge(n,o,{weight:l.weight},s)}function dC(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:hC}=_e;var qs={longestPath:pC,slack:gC};function pC(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=hC(Math.min,i);return s===Number.POSITIVE_INFINITY&&(s=0),o.rank=s}e.sources().forEach(n)}function gC(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var mC=xt.Graph,Js=qs.slack,t0=yC;function yC(e){var t=new mC({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var o,i;vC(t,e)<r;)o=wC(t,e),i=t.hasNode(o.v)?Js(e,o):-Js(e,o),xC(t,e,i);return t}function vC(e,t){function n(r){t.nodeEdges(r).forEach(o=>{var i=o.v,s=r===i?o.w:i;!e.hasNode(s)&&!Js(t,o)&&(e.setNode(s,{}),e.setEdge(r,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function wC(e,t){return t.edges().reduce((r,o)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(i=Js(t,o)),i<r[0]?[i,o]:r},[Number.POSITIVE_INFINITY,null])[1]}function xC(e,t,n){e.nodes().forEach(r=>t.node(r).rank+=n)}var EC=t0,n0=qs.slack,_C=qs.longestPath,SC=xt.alg.preorder,kC=xt.alg.postorder,NC=_e.simplify,CC=Qn;Qn.initLowLimValues=fc,Qn.initCutValues=cc,Qn.calcCutValue=r0,Qn.leaveEdge=i0,Qn.enterEdge=s0,Qn.exchangeEdges=l0;function Qn(e){e=NC(e),_C(e);var t=EC(e);fc(t),cc(t,e);for(var n,r;n=i0(t);)r=s0(t,e,n),l0(t,e,n,r)}function cc(e,t){var n=kC(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(r=>MC(e,t,r))}function MC(e,t,n){var r=e.node(n),o=r.parent;e.edge(n,o).cutvalue=r0(e,t,n)}function r0(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,c=a?u.w:u.v;if(c!==o){var f=a===i,d=t.edge(u).weight;if(l+=f?d:-d,PC(e,n,c)){var g=e.edge(n,c).cutvalue;l+=f?-g:g}}}),l}function fc(e,t){arguments.length<2&&(t=e.nodes()[0]),o0(e,{},1,t)}function o0(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=o0(e,t,n,l,r))}),s.low=i,s.lim=n++,o?s.parent=o:delete s.parent,n}function i0(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function s0(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(c=>u===u0(e,e.node(c.v),l)&&u!==u0(e,e.node(c.w),l));return a.reduce((c,f)=>n0(t,f)<n0(t,c)?f:c)}function l0(e,t,n,r){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),fc(e),cc(e,t),IC(e,t)}function IC(e,t){var n=e.nodes().find(o=>!t.node(o).parent),r=SC(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 PC(e,t,n){return e.hasEdge(t,n)}function u0(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var LC=qs,a0=LC.longestPath,TC=t0,$C=CC,zC=bC;function bC(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case"network-simplex":c0(e);break;case"tight-tree":RC(e);break;case"longest-path":OC(e);break;case"none":break;default:c0(e)}}var OC=a0;function RC(e){a0(e),TC(e)}function c0(e){$C(e)}var AC=DC;function DC(e){let t=FC(e);e.graph().dummyChains.forEach(n=>{let r=e.node(n),o=r.edgeObj,i=jC(e,t,o.v,o.w),s=i.path,l=i.lca,u=0,a=s[u],c=!0;for(;n!==o.w;){if(r=e.node(n),c){for(;(a=s[u])!==l&&e.node(a).maxRank<r.rank;)u++;a===l&&(c=!1)}if(!c){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 jC(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 FC(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 el=_e;var VC={run:HC,cleanup:UC};function HC(e){let t=el.addDummyNode(e,"root",{},"_root"),n=BC(e),r=Object.values(n),o=el.applyWithChunking(Math.max,r)-1,i=2*o+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=i);let s=WC(e)+1;e.children().forEach(l=>f0(e,t,i,s,o,n,l)),e.graph().nodeRankFactor=i}function f0(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=el.addBorderNode(e,"_bt"),a=el.addBorderNode(e,"_bb"),c=e.node(s);e.setParent(u,s),c.borderTop=u,e.setParent(a,s),c.borderBottom=a,l.forEach(f=>{f0(e,t,n,r,o,i,f);let d=e.node(f),g=d.borderTop?d.borderTop:f,m=d.borderBottom?d.borderBottom:f,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 BC(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 WC(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function UC(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 YC=_e;var XC=GC;function GC(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)d0(e,"borderLeft","_bl",n,o,i),d0(e,"borderRight","_br",n,o,i)}}e.children().forEach(t)}function d0(e,t,n,r,o,i){let s={width:0,height:0,rank:i,borderType:t},l=o[t][i-1],u=YC.addDummyNode(e,"border",s,n);o[t][i]=u,e.setParent(u,r),l&&e.setEdge(l,u,{weight:1})}var QC={adjust:KC,undo:ZC};function KC(e){let t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&h0(e)}function ZC(e){let t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&qC(e),(t==="lr"||t==="rl")&&(JC(e),h0(e))}function h0(e){e.nodes().forEach(t=>p0(e.node(t))),e.edges().forEach(t=>p0(e.edge(t)))}function p0(e){let t=e.width;e.width=e.height,e.height=t}function qC(e){e.nodes().forEach(t=>dc(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(dc),Object.hasOwn(n,"y")&&dc(n)})}function dc(e){e.y=-e.y}function JC(e){e.nodes().forEach(t=>hc(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(hc),Object.hasOwn(n,"x")&&hc(n)})}function hc(e){let t=e.x;e.x=e.y,e.y=t}let g0=_e;var eM=tM;function tM(e){let t={},n=e.nodes().filter(u=>!e.children(u).length),r=n.map(u=>e.node(u).rank),o=g0.applyWithChunking(Math.max,r),i=g0.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 nM=_e.zipObject;var rM=oM;function oM(e,t){let n=0;for(let r=1;r<t.length;++r)n+=iM(e,t[r-1],t[r]);return n}function iM(e,t,n){let r=nM(n,n.map((a,c)=>c)),o=t.flatMap(a=>e.outEdges(a).map(c=>({pos:r[c.w],weight:e.edge(c).weight})).sort((c,f)=>c.pos-f.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 c=a.pos+i;l[c]+=a.weight;let f=0;for(;c>0;)c%2&&(f+=l[c+1]),c=c-1>>1,l[c]+=a.weight;u+=a.weight*f}),u}var sM=lM;function lM(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 uM=_e;var aM=cM;function cM(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 fM(r)}function fM(e){let t=[];function n(o){return i=>{i.merged||(i.barycenter===void 0||o.barycenter===void 0||i.barycenter>=o.barycenter)&&dM(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=>uM.pick(o,["vs","i","barycenter","weight"]))}function dM(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 hM=_e;var pM=gM;function gM(e,t){let n=hM.partition(e,c=>Object.hasOwn(c,"barycenter")),r=n.lhs,o=n.rhs.sort((c,f)=>f.i-c.i),i=[],s=0,l=0,u=0;r.sort(mM(!!t)),u=m0(i,o,u),r.forEach(c=>{u+=c.vs.length,i.push(c.vs),s+=c.barycenter*c.weight,l+=c.weight,u=m0(i,o,u)});let a={vs:i.flat(!0)};return l&&(a.barycenter=s/l,a.weight=l),a}function m0(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 mM(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}let yM=sM,vM=aM,wM=pM;var xM=y0;function y0(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=yM(e,o);a.forEach(d=>{if(e.children(d.v).length){let g=y0(e,d.v,n,r);u[d.v]=g,Object.hasOwn(g,"barycenter")&&_M(d,g)}});let c=vM(a,n);EM(c,u);let f=wM(c,r);if(s&&(f.vs=[s,f.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(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+g.order)/(f.weight+2),f.weight+=2}return f}function EM(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(r=>t[r]?t[r].vs:r)})}function _M(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 SM=xt.Graph,kM=_e;var NM=CM;function CM(e,t,n,r){r||(r=e.nodes());let o=MM(e),i=new SM({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 c=a.v===s?a.w:a.v,f=i.edge(c,s),d=f!==void 0?f.weight:0;i.setEdge(c,s,{weight:e.edge(a).weight+d})}),Object.hasOwn(l,"minRank")&&i.setNode(s,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]}))}),i}function MM(e){for(var t;e.hasNode(t=kM.uniqueId("_root")););return t}var IM=PM;function PM(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 LM=eM,TM=rM,$M=xM,zM=NM,bM=IM,OM=xt.Graph,tl=_e;var RM=v0;function v0(e,t){if(t&&typeof t.customOrder=="function"){t.customOrder(e,v0);return}let n=tl.maxRank(e),r=w0(e,tl.range(1,n+1),"inEdges"),o=w0(e,tl.range(n-1,-1,-1),"outEdges"),i=LM(e);if(x0(e,i),t&&t.disableOptimalOrderHeuristic)return;let s=Number.POSITIVE_INFINITY,l;for(let u=0,a=0;a<4;++u,++a){AM(u%2?r:o,u%4>=2),i=tl.buildLayerMatrix(e);let c=TM(e,i);c<s&&(a=0,l=Object.assign({},i),s=c)}x0(e,l)}function w0(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 zM(e,i,n,r.get(i)||[])})}function AM(e,t){let n=new OM;e.forEach(function(r){let o=r.graph().root,i=$M(r,o,n,t);i.vs.forEach((s,l)=>r.node(s).order=l),bM(r,n,i.vs)})}function x0(e,t){Object.values(t).forEach(n=>n.forEach((r,o)=>e.node(r).order=o))}let DM=xt.Graph,Kt=_e;var jM={positionX:KM};function FM(e,t){let n={};function r(o,i){let s=0,l=0,u=o.length,a=i[i.length-1];return i.forEach((c,f)=>{let d=HM(e,c),g=d?e.node(d).order:u;(d||c===a)&&(i.slice(l,f+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)&&E0(n,w,m)})}),l=f+1,s=g)}),i}return t.length&&t.reduce(r),n}function VM(e,t){let n={};function r(i,s,l,u,a){let c;Kt.range(s,l).forEach(f=>{c=i[f],e.node(c).dummy&&e.predecessors(c).forEach(d=>{let g=e.node(d);g.dummy&&(g.order<u||g.order>a)&&E0(n,d,c)})})}function o(i,s){let l=-1,u,a=0;return s.forEach((c,f)=>{if(e.node(c).dummy==="border"){let d=e.predecessors(c);d.length&&(u=e.node(d[0]).order,r(s,a,f,l,u),a=f,l=u)}r(s,a,s.length,u,i.length)}),s}return t.length&&t.reduce(o),n}function HM(e,t){if(e.node(t).dummy)return e.predecessors(t).find(n=>e.node(n).dummy)}function E0(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 BM(e,t,n){if(t>n){let r=t;t=n,n=r}return!!e[t]&&Object.hasOwn(e[t],n)}function WM(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 c=r(a);if(c.length){c=c.sort((d,g)=>s[d]-s[g]);let f=(c.length-1)/2;for(let d=Math.floor(f),g=Math.ceil(f);d<=g;++d){let m=c[d];i[a]===a&&u<s[m]&&!BM(n,a,m)&&(i[m]=a,i[a]=o[a]=o[m],u=s[m])}}})}),{root:o,align:i}}function UM(e,t,n,r,o){let i={},s=YM(e,t,n,o),l=o?"borderLeft":"borderRight";function u(f,d){let g=s.nodes(),m=g.pop(),w={};for(;m;)w[m]?f(m):(w[m]=!0,g.push(m),g=g.concat(d(m))),m=g.pop()}function a(f){i[f]=s.inEdges(f).reduce((d,g)=>Math.max(d,i[g.v]+s.edge(g)),0)}function c(f){let d=s.outEdges(f).reduce((m,w)=>Math.min(m,i[w.w]-s.edge(w)),Number.POSITIVE_INFINITY),g=e.node(f);d!==Number.POSITIVE_INFINITY&&g.borderType!==l&&(i[f]=Math.max(i[f],d))}return u(a,s.predecessors.bind(s)),u(c,s.successors.bind(s)),Object.keys(r).forEach(f=>i[f]=i[n[f]]),i}function YM(e,t,n,r){let o=new DM,i=e.graph(),s=ZM(i.nodesep,i.edgesep,r);return t.forEach(l=>{let u;l.forEach(a=>{let c=n[a];if(o.setNode(c),u){var f=n[u],d=o.edge(f,c);o.setEdge(f,c,Math.max(s(e,a,u),d||0))}u=a})}),o}function XM(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=qM(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 GM(e,t){let n=Object.values(t),r=Kt.applyWithChunking(Math.min,n),o=Kt.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),c=r-Kt.applyWithChunking(Math.min,a);s!=="l"&&(c=o-Kt.applyWithChunking(Math.max,a)),c&&(e[l]=Kt.mapValues(u,f=>f+c))})})}function QM(e,t){return Kt.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 KM(e){let t=Kt.buildLayerMatrix(e),n=Object.assign(FM(e,t),VM(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(f=>Object.values(f).reverse()));let u=(s==="u"?e.predecessors:e.successors).bind(e),a=WM(e,o,n,u),c=UM(e,o,a.root,a.align,l==="r");l==="r"&&(c=Kt.mapValues(c,f=>-f)),r[s+l]=c})});let i=XM(e,r);return GM(r,i),QM(r,e.graph().align)}function ZM(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 qM(e,t){return e.node(t).width}let _0=_e,JM=jM.positionX;var e3=t3;function t3(e){e=_0.asNonCompoundGraph(e),n3(e),Object.entries(JM(e)).forEach(([t,n])=>e.node(t).x=n)}function n3(e){let t=_0.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 S0=oC,k0=aC,r3=zC,o3=_e.normalizeRanks,i3=AC,s3=_e.removeEmptyRanks,N0=VC,l3=XC,C0=QC,u3=RM,a3=e3,it=_e,c3=xt.Graph;var f3=d3;function d3(e,t){let n=t&&t.debugTiming?it.time:it.notime;n("layout",()=>{let r=n(" buildLayoutGraph",()=>_3(e));n(" runLayout",()=>h3(r,n,t)),n(" updateInputGraph",()=>p3(e,r))})}function h3(e,t,n){t(" makeSpaceForEdgeLabels",()=>S3(e)),t(" removeSelfEdges",()=>$3(e)),t(" acyclic",()=>S0.run(e)),t(" nestingGraph.run",()=>N0.run(e)),t(" rank",()=>r3(it.asNonCompoundGraph(e))),t(" injectEdgeLabelProxies",()=>k3(e)),t(" removeEmptyRanks",()=>s3(e)),t(" nestingGraph.cleanup",()=>N0.cleanup(e)),t(" normalizeRanks",()=>o3(e)),t(" assignRankMinMax",()=>N3(e)),t(" removeEdgeLabelProxies",()=>C3(e)),t(" normalize.run",()=>k0.run(e)),t(" parentDummyChains",()=>i3(e)),t(" addBorderSegments",()=>l3(e)),t(" order",()=>u3(e,n)),t(" insertSelfEdges",()=>z3(e)),t(" adjustCoordinateSystem",()=>C0.adjust(e)),t(" position",()=>a3(e)),t(" positionSelfEdges",()=>b3(e)),t(" removeBorderNodes",()=>T3(e)),t(" normalize.undo",()=>k0.undo(e)),t(" fixupEdgeLabelCoords",()=>P3(e)),t(" undoCoordinateSystem",()=>C0.undo(e)),t(" translateGraph",()=>M3(e)),t(" assignNodeIntersects",()=>I3(e)),t(" reversePoints",()=>L3(e)),t(" acyclic.undo",()=>S0.undo(e))}function p3(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 g3=["nodesep","edgesep","ranksep","marginx","marginy"],m3={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},y3=["acyclicer","ranker","rankdir","align"],v3=["width","height","rank"],M0={width:0,height:0},w3=["minlen","weight","width","height","labeloffset"],x3={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E3=["labelpos"];function _3(e){let t=new c3({multigraph:!0,compound:!0}),n=gc(e.graph());return t.setGraph(Object.assign({},m3,pc(n,g3),it.pick(n,y3))),e.nodes().forEach(r=>{let o=gc(e.node(r));const i=pc(o,v3);Object.keys(M0).forEach(s=>{i[s]===void 0&&(i[s]=M0[s])}),t.setNode(r,i),t.setParent(r,e.parent(r))}),e.edges().forEach(r=>{let o=gc(e.edge(r));t.setEdge(r,Object.assign({},x3,pc(o,w3),it.pick(o,E3)))}),t}function S3(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 k3(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 N3(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 C3(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 M3(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 c=a.x,f=a.y,d=a.width,g=a.height;t=Math.min(t,c-d/2),n=Math.max(n,c+d/2),r=Math.min(r,f-g/2),o=Math.max(o,f+g/2)}e.nodes().forEach(a=>u(e.node(a))),e.edges().forEach(a=>{let c=e.edge(a);Object.hasOwn(c,"x")&&u(c)}),t-=s,r-=l,e.nodes().forEach(a=>{let c=e.node(a);c.x-=t,c.y-=r}),e.edges().forEach(a=>{let c=e.edge(a);c.points.forEach(f=>{f.x-=t,f.y-=r}),Object.hasOwn(c,"x")&&(c.x-=t),Object.hasOwn(c,"y")&&(c.y-=r)}),i.width=n-t+s,i.height=o-r+l}function I3(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 P3(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 L3(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function T3(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 $3(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 z3(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 b3(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 pc(e,t){return it.mapValues(it.pick(e,t),Number)}function gc(e){var t={};return e&&Object.entries(e).forEach(([n,r])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=r}),t}let O3=_e,R3=xt.Graph;var A3={debugOrdering:D3};function D3(e){let t=O3.buildLayerMatrix(e),n=new R3({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 j3="1.1.8",F3={graphlib:xt,layout:f3,debug:A3,util:{time:_e.time,notime:_e.notime},version:j3};const I0=bt(F3),V3="LR",H3=60,B3=140;function W3(e,t){const n=new I0.graphlib.Graph;n.setGraph({rankdir:V3,nodesep:H3,ranksep:B3,marginx:24,marginy:24}),n.setDefaultEdgeLabel(()=>({}));for(const o of e)n.setNode(o.id,{width:o.width,height:o.height});for(const o of t)n.hasNode(o.source)&&n.hasNode(o.target)&&n.setEdge(o.source,o.target);I0.layout(n);const r=new Map;for(const o of e){const i=n.node(o.id);i&&r.set(o.id,{x:i.x-o.width/2,y:i.y-o.height/2})}return r}function U3(e,t){return e.map(n=>({...n,position:t.get(n.id)??{x:0,y:0}}))}function Y3(e){return e.map(t=>({source:t.source,target:t.target}))}const X3={model:"var(--model, #2f6feb)",source:"var(--source, #16a34a)",seed:"var(--seed, #b45309)",snapshot:"var(--snapshot, #7c3aed)"};function G3({data:e}){const t=e.record,n=e.dimmed,r=X3[t.resource_type]??"var(--border, #888)";return L.jsxs("div",{className:`dbd-node${n?" dbd-dim":""}`,title:t.id,children:[L.jsx(Tt,{type:"target",position:X.Left}),L.jsx("span",{className:"dbd-node-bar",style:{background:r}}),L.jsx("span",{className:"dbd-node-label",children:t.label}),L.jsx(Tt,{type:"source",position:X.Right})]})}const Q3={lineage:G3,erdTable:T2};function K3(e){const t=new Set;for(const n of Object.keys(e.nodes??{}))t.add(e.nodes[n].schema);return Array.from(t).sort()}function Z3({mode:e,focus:t,data:n,onOpenNode:r}){var $;const o=e==="dag",[i,s]=A.useState(!1),l=e==="erd",u=o||l&&i,a=!u,c=t&&(($=n.nodes)!=null&&$[t])?n.nodes[t].label:t??"",[f,d]=A.useState(c),[g,m]=A.useState(""),[w,x]=A.useState(""),[p,y]=A.useState(null),h=A.useMemo(()=>{if(!o)return t??null;const b=f.trim().toLowerCase();if(!b)return null;const P=Object.keys(n.nodes??{});return P.find(z=>z.toLowerCase()===b)??P.find(z=>n.nodes[z].label.toLowerCase()===b)??P.find(z=>n.nodes[z].label.toLowerCase().startsWith(b))??null},[o,f,t,n]),{nodes:v,edges:_}=A.useMemo(()=>{const b=o?R2(n):A2(n,e==="erd-node"?t:null),P=W3(b.sizes,Y3(b.edges));let z=U3(b.nodes,P),F=b.edges;if(o){const E=h?D2(n,h):null;z=z.filter(I=>{const O=n.nodes[I.id];return!(g&&O.resource_type!==g||w&&O.schema!==w)}).map(I=>({...I,data:{...I.data,dimmed:E?!E.has(I.id):!1,focused:I.id===h}}));const T=new Set(z.map(I=>I.id));F=b.edges.filter(I=>T.has(I.source)&&T.has(I.target)).map(I=>{const O=E&&E.has(I.source)&&E.has(I.target);return{...I,animated:!!O,style:E?O?{stroke:"var(--accent, #2f6feb)",strokeWidth:2}:{opacity:.12}:void 0}})}else if(p){const E=new Set([p.source,p.target]);z=z.map(T=>({...T,data:{...T.data,dimmed:!E.has(T.id)}})),F=b.edges.map(T=>{const I=T.source===p.source&&T.target===p.target;return{...T,animated:I,style:I?{stroke:"var(--accent, #2f6feb)",strokeWidth:2.5}:{opacity:.1}}})}return{nodes:z,edges:F}},[o,e,t,h,n,g,w,p]),S=(b,P)=>{r&&r(P.id)},k=(b,P)=>{y(z=>z&&z.source===P.source&&z.target===P.target?null:{source:P.source,target:P.target})},C=()=>y(null);return L.jsxs("div",{className:"dbd-graph",children:[o&&L.jsxs("div",{className:"dbd-toolbar",children:[L.jsx("input",{placeholder:"Focus a node…",value:f,onChange:b=>d(b.target.value)}),L.jsxs("select",{value:g,onChange:b=>m(b.target.value),children:[L.jsx("option",{value:"",children:"All types"}),L.jsx("option",{value:"model",children:"Models"}),L.jsx("option",{value:"source",children:"Sources"}),L.jsx("option",{value:"seed",children:"Seeds"}),L.jsx("option",{value:"snapshot",children:"Snapshots"})]}),L.jsxs("select",{value:w,onChange:b=>x(b.target.value),children:[L.jsx("option",{value:"",children:"All schemas"}),K3(n).map(b=>L.jsx("option",{value:b,children:b},b))]})]}),l&&L.jsx("div",{className:"dbd-erd-bar",children:L.jsx("button",{type:"button",className:`dbd-lock-btn${i?" on":""}`,onClick:()=>s(b=>!b),title:i?"Lock pan & zoom":"Unlock pan & zoom",children:i?"🔓 Pan & zoom on":"🔒 Locked — click to pan & zoom"})}),L.jsx("div",{className:"dbd-canvas",children:L.jsx(Im,{children:L.jsxs(e2,{nodes:v,edges:_,nodeTypes:Q3,onNodeClick:S,onEdgeClick:k,onPaneClick:C,fitView:!0,minZoom:.1,proOptions:{hideAttribution:!0},...a?{panOnDrag:!1,zoomOnScroll:!1,zoomOnPinch:!1,zoomOnDoubleClick:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!0,preventScrolling:!1,fitViewOptions:{padding:.15}}:{},children:[L.jsx(i2,{}),u&&L.jsx(d2,{showInteractive:!1}),u&&L.jsx(N2,{pannable:!0,zoomable:!0})]})})})]})}const mc=new WeakMap;function q3(e){const t=window.dbdocsData;if(!t)return;const n=e.dataset.mode||"dag",r=e.dataset.focus||null,o=s=>{location.hash=`#/node/${encodeURIComponent(s)}`},i=jh(e);mc.set(e,i),i.render(L.jsx(A.StrictMode,{children:L.jsx(Z3,{mode:n,focus:r,data:t,onOpenNode:o})}))}function J3(e){const t=mc.get(e);t&&(t.unmount(),mc.delete(e))}window.dbdocsGraph={mount:q3,unmount:J3}})();