@emeryld/rrroutes-openapi 2.6.2 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/public/assets/Add.js +1 -0
- package/dist/public/assets/Autocomplete.js +1 -0
- package/dist/public/assets/BaseFilterBar.js +1 -0
- package/dist/public/assets/BentoGrid.js +1 -0
- package/dist/public/assets/CacheLogsPage.js +1 -0
- package/dist/public/assets/DeleteOutline.js +1 -0
- package/dist/public/assets/DiffPage.js +7 -0
- package/dist/public/assets/Download.js +1 -0
- package/dist/public/assets/EndpointDetailPage.js +1 -0
- package/dist/public/assets/EndpointDetailPanel.js +1 -0
- package/dist/public/assets/EndpointPlaygroundPage.js +1 -0
- package/dist/public/assets/ExpandLess.js +1 -0
- package/dist/public/assets/ExportButton.js +2 -0
- package/dist/public/assets/FlowBuilderPage.js +20 -0
- package/dist/public/assets/HistoryPage.js +1 -0
- package/dist/public/assets/LogsPage.js +1 -0
- package/dist/public/assets/PageContainer.js +3 -0
- package/dist/public/assets/PlayArrow.js +1 -0
- package/dist/public/assets/PresetsPage.js +4 -0
- package/dist/public/assets/RoutesPage.js +1 -0
- package/dist/public/assets/SchedulingPage.js +1 -0
- package/dist/public/assets/SchemaTreeView.js +1 -0
- package/dist/public/assets/SettingsPage.js +1 -0
- package/dist/public/assets/SocketsPage.js +1 -0
- package/dist/public/assets/docs.css +1 -1
- package/dist/public/assets/docs.js +95 -177
- package/dist/public/assets/filterTypes.js +1 -0
- package/dist/public/assets/getValidReactChildren.js +1 -0
- package/dist/public/assets/kvRowAdapters.js +1 -0
- package/dist/public/assets/schemaDefaults.js +1 -0
- package/dist/public/assets/useEndpointOptions.js +1 -0
- package/dist/public/assets/useQueryState.js +1 -0
- package/dist/public/assets/vendor-recharts.js +99 -0
- package/dist/public/assets/vendor-xyflow.js +15 -0
- package/dist/web/v2/AppShell.d.ts +1 -3
- package/dist/web/v2/components/diff/DiffViewer.d.ts +7 -0
- package/dist/web/v2/components/diff/RequestDiffSelector.d.ts +15 -0
- package/dist/web/v2/components/diff/SchemaDiffViewer.d.ts +7 -0
- package/dist/web/v2/components/feedback/CopyAsMenu.d.ts +10 -0
- package/dist/web/v2/components/feedback/CopySnackbar.d.ts +1 -0
- package/dist/web/v2/components/flows/FlowCanvas.d.ts +13 -0
- package/dist/web/v2/components/flows/FlowNodeEditor.d.ts +8 -0
- package/dist/web/v2/components/flows/FlowRunProgress.d.ts +7 -0
- package/dist/web/v2/components/flows/FlowVariablePanel.d.ts +7 -0
- package/dist/web/v2/components/flows/nodes/ConditionNode.d.ts +7 -0
- package/dist/web/v2/components/flows/nodes/DelayNode.d.ts +7 -0
- package/dist/web/v2/components/flows/nodes/ExtractNode.d.ts +8 -0
- package/dist/web/v2/components/flows/nodes/RequestNode.d.ts +10 -0
- package/dist/web/v2/components/layout/ActivityBar.d.ts +1 -0
- package/dist/web/v2/components/layout/BentoGrid.d.ts +17 -0
- package/dist/web/v2/components/layout/ContentArea.d.ts +1 -0
- package/dist/web/v2/components/layout/PanelRegistry.d.ts +17 -0
- package/dist/web/v2/components/request/LastRunPanel.d.ts +5 -0
- package/dist/web/v2/components/request/TimingBreakdown.d.ts +11 -0
- package/dist/web/v2/components/requests/timeline/TimelinePhaseBar.d.ts +13 -0
- package/dist/web/v2/components/requests/timeline/TimelineWaterfall.d.ts +12 -0
- package/dist/web/v2/hooks/useLeafEndpoint.d.ts +2 -2
- package/dist/web/v2/pages/DiffPage.d.ts +1 -0
- package/dist/web/v2/pages/FlowBuilderPage.d.ts +1 -0
- package/dist/web/v2/stores/flowStore.d.ts +70 -0
- package/dist/web/v2/stores/layoutStore.d.ts +13 -0
- package/dist/web/v2/stores/playgroundSettingsStore.d.ts +10 -0
- package/dist/web/v2/stores/snackbarStore.d.ts +17 -0
- package/dist/web/v2/types/types.cacheLog.d.ts +135 -49
- package/dist/web/v2/types/types.endpoint.d.ts +195 -139
- package/dist/web/v2/types/types.log.d.ts +48 -19
- package/dist/web/v2/types/types.preset.d.ts +168 -84
- package/dist/web/v2/types/types.requestLog.d.ts +135 -90
- package/dist/web/v2/types/types.scheduling.d.ts +87 -37
- package/dist/web/v2/types/types.socket.d.ts +69 -33
- package/dist/web/v2/utils/codeGeneration.d.ts +12 -0
- package/dist/web/v2/utils/diffUtils.d.ts +11 -0
- package/dist/web/v2/utils/flowRunner.d.ts +17 -0
- package/dist/web/v2/utils/templateResolver.d.ts +4 -0
- package/package.json +15 -12
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{r as vs,i as _s,c as Bn,a as Fn,b as bs,d as Es,e as Ss,f as we,g as qe,u as Ns,R as Cs,h as L}from"./vendor-recharts.js";var Ue={exports:{}},Gt={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.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 On;function Ms(){if(On)return Gt;On=1;var t=vs(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,r=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(a,c,l){var f,u={},d=null,h=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(h=c.ref);for(f in c)o.call(c,f)&&!i.hasOwnProperty(f)&&(u[f]=c[f]);if(a&&a.defaultProps)for(f in c=a.defaultProps,c)u[f]===void 0&&(u[f]=c[f]);return{$$typeof:e,type:a,key:d,ref:h,props:u,_owner:r.current}}return Gt.Fragment=n,Gt.jsx=s,Gt.jsxs=s,Gt}var jn;function Is(){return jn||(jn=1,Ue.exports=Ms()),Ue.exports}var P=Is();function it(t){if(typeof t=="string"||typeof t=="number")return""+t;let e="";if(Array.isArray(t))for(let n=0,o;n<t.length;n++)(o=it(t[n]))!==""&&(e+=(e&&" ")+o);else for(let n in t)t[n]&&(e+=(e&&" ")+n);return e}var As={value:()=>{}};function Te(){for(var t=0,e=arguments.length,n={},o;t<e;++t){if(!(o=arguments[t]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new ve(n)}function ve(t){this._=t}function ks(t,e){return t.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}ve.prototype=Te.prototype={constructor:ve,on:function(t,e){var n=this._,o=ks(t+"",n),r,i=-1,s=o.length;if(arguments.length<2){for(;++i<s;)if((r=(t=o[i]).type)&&(r=Ps(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<s;)if(r=(t=o[i]).type)n[r]=Yn(n[r],t.name,e);else if(e==null)for(r in n)n[r]=Yn(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ve(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],o=0,r=i.length;o<r;++o)i[o].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)}};function Ps(t,e){for(var n=0,o=t.length,r;n<o;++n)if((r=t[n]).name===e)return r.value}function Yn(t,e,n){for(var o=0,r=t.length;o<r;++o)if(t[o].name===e){t[o]=As,t=t.slice(0,o).concat(t.slice(o+1));break}return n!=null&&t.push({name:e,value:n}),t}var on="http://www.w3.org/1999/xhtml";const Xn={svg:"http://www.w3.org/2000/svg",xhtml:on,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ze(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Xn.hasOwnProperty(e)?{space:Xn[e],local:t}:t}function $s(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===on&&e.documentElement.namespaceURI===on?e.createElement(t):e.createElementNS(n,t)}}function Ts(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ho(t){var e=ze(t);return(e.local?Ts:$s)(e)}function zs(){}function mn(t){return t==null?zs:function(){return this.querySelector(t)}}function Ls(t){typeof t!="function"&&(t=mn(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i=e[r],s=i.length,a=o[r]=new Array(s),c,l,f=0;f<s;++f)(c=i[f])&&(l=t.call(c,c.__data__,f,i))&&("__data__"in c&&(l.__data__=c.__data__),a[f]=l);return new ct(o,this._parents)}function Ds(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Hs(){return[]}function Ro(t){return t==null?Hs:function(){return this.querySelectorAll(t)}}function Rs(t){return function(){return Ds(t.apply(this,arguments))}}function Vs(t){typeof t=="function"?t=Rs(t):t=Ro(t);for(var e=this._groups,n=e.length,o=[],r=[],i=0;i<n;++i)for(var s=e[i],a=s.length,c,l=0;l<a;++l)(c=s[l])&&(o.push(t.call(c,c.__data__,l,s)),r.push(c));return new ct(o,r)}function Vo(t){return function(){return this.matches(t)}}function Bo(t){return function(e){return e.matches(t)}}var Bs=Array.prototype.find;function Fs(t){return function(){return Bs.call(this.children,t)}}function Os(){return this.firstElementChild}function js(t){return this.select(t==null?Os:Fs(typeof t=="function"?t:Bo(t)))}var Ys=Array.prototype.filter;function Xs(){return Array.from(this.children)}function Ws(t){return function(){return Ys.call(this.children,t)}}function Gs(t){return this.selectAll(t==null?Xs:Ws(typeof t=="function"?t:Bo(t)))}function qs(t){typeof t!="function"&&(t=Vo(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i=e[r],s=i.length,a=o[r]=[],c,l=0;l<s;++l)(c=i[l])&&t.call(c,c.__data__,l,i)&&a.push(c);return new ct(o,this._parents)}function Fo(t){return new Array(t.length)}function Us(){return new ct(this._enter||this._groups.map(Fo),this._parents)}function Se(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Se.prototype={constructor:Se,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Ks(t){return function(){return t}}function Zs(t,e,n,o,r,i){for(var s=0,a,c=e.length,l=i.length;s<l;++s)(a=e[s])?(a.__data__=i[s],o[s]=a):n[s]=new Se(t,i[s]);for(;s<c;++s)(a=e[s])&&(r[s]=a)}function Qs(t,e,n,o,r,i,s){var a,c,l=new Map,f=e.length,u=i.length,d=new Array(f),h;for(a=0;a<f;++a)(c=e[a])&&(d[a]=h=s.call(c,c.__data__,a,e)+"",l.has(h)?r[a]=c:l.set(h,c));for(a=0;a<u;++a)h=s.call(t,i[a],a,i)+"",(c=l.get(h))?(o[a]=c,c.__data__=i[a],l.delete(h)):n[a]=new Se(t,i[a]);for(a=0;a<f;++a)(c=e[a])&&l.get(d[a])===c&&(r[a]=c)}function Js(t){return t.__data__}function ta(t,e){if(!arguments.length)return Array.from(this,Js);var n=e?Qs:Zs,o=this._parents,r=this._groups;typeof t!="function"&&(t=Ks(t));for(var i=r.length,s=new Array(i),a=new Array(i),c=new Array(i),l=0;l<i;++l){var f=o[l],u=r[l],d=u.length,h=ea(t.call(f,f&&f.__data__,l,o)),p=h.length,v=a[l]=new Array(p),y=s[l]=new Array(p),m=c[l]=new Array(d);n(f,u,v,y,m,h,e);for(var _=0,g=0,x,N;_<p;++_)if(x=v[_]){for(_>=g&&(g=_+1);!(N=y[g])&&++g<p;);x._next=N||null}}return s=new ct(s,o),s._enter=a,s._exit=c,s}function ea(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function na(){return new ct(this._exit||this._groups.map(Fo),this._parents)}function oa(t,e,n){var o=this.enter(),r=this,i=this.exit();return typeof t=="function"?(o=t(o),o&&(o=o.selection())):o=o.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function ra(t){for(var e=t.selection?t.selection():t,n=this._groups,o=e._groups,r=n.length,i=o.length,s=Math.min(r,i),a=new Array(r),c=0;c<s;++c)for(var l=n[c],f=o[c],u=l.length,d=a[c]=new Array(u),h,p=0;p<u;++p)(h=l[p]||f[p])&&(d[p]=h);for(;c<r;++c)a[c]=n[c];return new ct(a,this._parents)}function ia(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var o=t[e],r=o.length-1,i=o[r],s;--r>=0;)(s=o[r])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function sa(t){t||(t=aa);function e(u,d){return u&&d?t(u.__data__,d.__data__):!u-!d}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var s=n[i],a=s.length,c=r[i]=new Array(a),l,f=0;f<a;++f)(l=s[f])&&(c[f]=l);c.sort(e)}return new ct(r,this._parents).order()}function aa(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ca(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function ua(){return Array.from(this)}function la(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o=t[e],r=0,i=o.length;r<i;++r){var s=o[r];if(s)return s}return null}function da(){let t=0;for(const e of this)++t;return t}function fa(){return!this.node()}function ha(t){for(var e=this._groups,n=0,o=e.length;n<o;++n)for(var r=e[n],i=0,s=r.length,a;i<s;++i)(a=r[i])&&t.call(a,a.__data__,i,r);return this}function ga(t){return function(){this.removeAttribute(t)}}function pa(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ma(t,e){return function(){this.setAttribute(t,e)}}function ya(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function xa(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function wa(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function va(t,e){var n=ze(t);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((e==null?n.local?pa:ga:typeof e=="function"?n.local?wa:xa:n.local?ya:ma)(n,e))}function Oo(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function _a(t){return function(){this.style.removeProperty(t)}}function ba(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ea(t,e,n){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(t):this.style.setProperty(t,o,n)}}function Sa(t,e,n){return arguments.length>1?this.each((e==null?_a:typeof e=="function"?Ea:ba)(t,e,n??"")):Dt(this.node(),t)}function Dt(t,e){return t.style.getPropertyValue(e)||Oo(t).getComputedStyle(t,null).getPropertyValue(e)}function Na(t){return function(){delete this[t]}}function Ca(t,e){return function(){this[t]=e}}function Ma(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Ia(t,e){return arguments.length>1?this.each((e==null?Na:typeof e=="function"?Ma:Ca)(t,e)):this.node()[t]}function jo(t){return t.trim().split(/^|\s+/)}function yn(t){return t.classList||new Yo(t)}function Yo(t){this._node=t,this._names=jo(t.getAttribute("class")||"")}Yo.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Xo(t,e){for(var n=yn(t),o=-1,r=e.length;++o<r;)n.add(e[o])}function Wo(t,e){for(var n=yn(t),o=-1,r=e.length;++o<r;)n.remove(e[o])}function Aa(t){return function(){Xo(this,t)}}function ka(t){return function(){Wo(this,t)}}function Pa(t,e){return function(){(e.apply(this,arguments)?Xo:Wo)(this,t)}}function $a(t,e){var n=jo(t+"");if(arguments.length<2){for(var o=yn(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Pa:e?Aa:ka)(n,e))}function Ta(){this.textContent=""}function za(t){return function(){this.textContent=t}}function La(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Da(t){return arguments.length?this.each(t==null?Ta:(typeof t=="function"?La:za)(t)):this.node().textContent}function Ha(){this.innerHTML=""}function Ra(t){return function(){this.innerHTML=t}}function Va(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Ba(t){return arguments.length?this.each(t==null?Ha:(typeof t=="function"?Va:Ra)(t)):this.node().innerHTML}function Fa(){this.nextSibling&&this.parentNode.appendChild(this)}function Oa(){return this.each(Fa)}function ja(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ya(){return this.each(ja)}function Xa(t){var e=typeof t=="function"?t:Ho(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Wa(){return null}function Ga(t,e){var n=typeof t=="function"?t:Ho(t),o=e==null?Wa:typeof e=="function"?e:mn(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function qa(){var t=this.parentNode;t&&t.removeChild(this)}function Ua(){return this.each(qa)}function Ka(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Za(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Qa(t){return this.select(t?Za:Ka)}function Ja(t){return arguments.length?this.property("__data__",t):this.node().__data__}function tc(t){return function(e){t.call(this,e,this.__data__)}}function ec(t){return t.trim().split(/^|\s+/).map(function(e){var n="",o=e.indexOf(".");return o>=0&&(n=e.slice(o+1),e=e.slice(0,o)),{type:e,name:n}})}function nc(t){return function(){var e=this.__on;if(e){for(var n=0,o=-1,r=e.length,i;n<r;++n)i=e[n],(!t.type||i.type===t.type)&&i.name===t.name?this.removeEventListener(i.type,i.listener,i.options):e[++o]=i;++o?e.length=o:delete this.__on}}}function oc(t,e,n){return function(){var o=this.__on,r,i=tc(e);if(o){for(var s=0,a=o.length;s<a;++s)if((r=o[s]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=e;return}}this.addEventListener(t.type,i,n),r={type:t.type,name:t.name,value:e,listener:i,options:n},o?o.push(r):this.__on=[r]}}function rc(t,e,n){var o=ec(t+""),r,i=o.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,l=a.length,f;c<l;++c)for(r=0,f=a[c];r<i;++r)if((s=o[r]).type===f.type&&s.name===f.name)return f.value}return}for(a=e?oc:nc,r=0;r<i;++r)this.each(a(o[r],e,n));return this}function Go(t,e,n){var o=Oo(t),r=o.CustomEvent;typeof r=="function"?r=new r(e,n):(r=o.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function ic(t,e){return function(){return Go(this,t,e)}}function sc(t,e){return function(){return Go(this,t,e.apply(this,arguments))}}function ac(t,e){return this.each((typeof e=="function"?sc:ic)(t,e))}function*cc(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o=t[e],r=0,i=o.length,s;r<i;++r)(s=o[r])&&(yield s)}var qo=[null];function ct(t,e){this._groups=t,this._parents=e}function se(){return new ct([[document.documentElement]],qo)}function uc(){return this}ct.prototype=se.prototype={constructor:ct,select:Ls,selectAll:Vs,selectChild:js,selectChildren:Gs,filter:qs,data:ta,enter:Us,exit:na,join:oa,merge:ra,selection:uc,order:ia,sort:sa,call:ca,nodes:ua,node:la,size:da,empty:fa,each:ha,attr:va,style:Sa,property:Ia,classed:$a,text:Da,html:Ba,raise:Oa,lower:Ya,append:Xa,insert:Ga,remove:Ua,clone:Qa,datum:Ja,on:rc,dispatch:ac,[Symbol.iterator]:cc};function at(t){return typeof t=="string"?new ct([[document.querySelector(t)]],[document.documentElement]):new ct([[t]],qo)}function lc(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ut(t,e){if(t=lc(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,o=o.matrixTransform(e.getScreenCTM().inverse()),[o.x,o.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}const dc={passive:!1},Jt={capture:!0,passive:!1};function Ke(t){t.stopImmediatePropagation()}function Lt(t){t.preventDefault(),t.stopImmediatePropagation()}function Uo(t){var e=t.document.documentElement,n=at(t).on("dragstart.drag",Lt,Jt);"onselectstart"in e?n.on("selectstart.drag",Lt,Jt):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ko(t,e){var n=t.document.documentElement,o=at(t).on("dragstart.drag",null);e&&(o.on("click.drag",Lt,Jt),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const he=t=>()=>t;function rn(t,{sourceEvent:e,subject:n,target:o,identifier:r,active:i,x:s,y:a,dx:c,dy:l,dispatch:f}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:f}})}rn.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function fc(t){return!t.ctrlKey&&!t.button}function hc(){return this.parentNode}function gc(t,e){return e??{x:t.x,y:t.y}}function pc(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zo(){var t=fc,e=hc,n=gc,o=pc,r={},i=Te("start","drag","end"),s=0,a,c,l,f,u=0;function d(x){x.on("mousedown.drag",h).filter(o).on("touchstart.drag",y).on("touchmove.drag",m,dc).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,N){if(!(f||!t.call(this,x,N))){var S=g(this,e.call(this,x,N),x,N,"mouse");S&&(at(x.view).on("mousemove.drag",p,Jt).on("mouseup.drag",v,Jt),Uo(x.view),Ke(x),l=!1,a=x.clientX,c=x.clientY,S("start",x))}}function p(x){if(Lt(x),!l){var N=x.clientX-a,S=x.clientY-c;l=N*N+S*S>u}r.mouse("drag",x)}function v(x){at(x.view).on("mousemove.drag mouseup.drag",null),Ko(x.view,l),Lt(x),r.mouse("end",x)}function y(x,N){if(t.call(this,x,N)){var S=x.changedTouches,k=e.call(this,x,N),T=S.length,$,B;for($=0;$<T;++$)(B=g(this,k,x,N,S[$].identifier,S[$]))&&(Ke(x),B("start",x,S[$]))}}function m(x){var N=x.changedTouches,S=N.length,k,T;for(k=0;k<S;++k)(T=r[N[k].identifier])&&(Lt(x),T("drag",x,N[k]))}function _(x){var N=x.changedTouches,S=N.length,k,T;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),k=0;k<S;++k)(T=r[N[k].identifier])&&(Ke(x),T("end",x,N[k]))}function g(x,N,S,k,T,$){var B=i.copy(),M=ut($||S,N),z,V,w;if((w=n.call(x,new rn("beforestart",{sourceEvent:S,target:d,identifier:T,active:s,x:M[0],y:M[1],dx:0,dy:0,dispatch:B}),k))!=null)return z=w.x-M[0]||0,V=w.y-M[1]||0,function I(b,A,C){var E=M,D;switch(b){case"start":r[T]=I,D=s++;break;case"end":delete r[T],--s;case"drag":M=ut(C||A,N),D=s;break}B.call(b,x,new rn(b,{sourceEvent:A,subject:w,target:d,identifier:T,active:D,x:M[0]+z,y:M[1]+V,dx:M[0]-E[0],dy:M[1]-E[1],dispatch:B}),k)}}return d.filter=function(x){return arguments.length?(t=typeof x=="function"?x:he(!!x),d):t},d.container=function(x){return arguments.length?(e=typeof x=="function"?x:he(x),d):e},d.subject=function(x){return arguments.length?(n=typeof x=="function"?x:he(x),d):n},d.touchable=function(x){return arguments.length?(o=typeof x=="function"?x:he(!!x),d):o},d.on=function(){var x=i.on.apply(i,arguments);return x===i?d:x},d.clickDistance=function(x){return arguments.length?(u=(x=+x)*x,d):Math.sqrt(u)},d}var Ht=0,Kt=0,qt=0,Qo=1e3,Ne,Zt,Ce=0,It=0,Le=0,te=typeof performance=="object"&&performance.now?performance:Date,Jo=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function xn(){return It||(Jo(mc),It=te.now()+Le)}function mc(){It=0}function Me(){this._call=this._time=this._next=null}Me.prototype=tr.prototype={constructor:Me,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?xn():+n)+(e==null?0:+e),!this._next&&Zt!==this&&(Zt?Zt._next=this:Ne=this,Zt=this),this._call=t,this._time=n,sn()},stop:function(){this._call&&(this._call=null,this._time=1/0,sn())}};function tr(t,e,n){var o=new Me;return o.restart(t,e,n),o}function yc(){xn(),++Ht;for(var t=Ne,e;t;)(e=It-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ht}function Wn(){It=(Ce=te.now())+Le,Ht=Kt=0;try{yc()}finally{Ht=0,wc(),It=0}}function xc(){var t=te.now(),e=t-Ce;e>Qo&&(Le-=e,Ce=t)}function wc(){for(var t,e=Ne,n,o=1/0;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ne=n);Zt=t,sn(o)}function sn(t){if(!Ht){Kt&&(Kt=clearTimeout(Kt));var e=t-It;e>24?(t<1/0&&(Kt=setTimeout(Wn,t-te.now()-Le)),qt&&(qt=clearInterval(qt))):(qt||(Ce=te.now(),qt=setInterval(xc,Qo)),Ht=1,Jo(Wn))}}function Gn(t,e,n){var o=new Me;return e=e==null?0:+e,o.restart(r=>{o.stop(),t(r+e)},e,n),o}var vc=Te("start","end","cancel","interrupt"),_c=[],er=0,qn=1,an=2,_e=3,Un=4,cn=5,be=6;function De(t,e,n,o,r,i){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;bc(t,n,{name:e,index:o,group:r,on:vc,tween:_c,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:er})}function wn(t,e){var n=ft(t,e);if(n.state>er)throw new Error("too late; already scheduled");return n}function gt(t,e){var n=ft(t,e);if(n.state>_e)throw new Error("too late; already running");return n}function ft(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function bc(t,e,n){var o=t.__transition,r;o[e]=n,n.timer=tr(i,0,n.time);function i(l){n.state=qn,n.timer.restart(s,n.delay,n.time),n.delay<=l&&s(l-n.delay)}function s(l){var f,u,d,h;if(n.state!==qn)return c();for(f in o)if(h=o[f],h.name===n.name){if(h.state===_e)return Gn(s);h.state===Un?(h.state=be,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete o[f]):+f<e&&(h.state=be,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete o[f])}if(Gn(function(){n.state===_e&&(n.state=Un,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=an,n.on.call("start",t,t.__data__,n.index,n.group),n.state===an){for(n.state=_e,r=new Array(d=n.tween.length),f=0,u=-1;f<d;++f)(h=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=h);r.length=u+1}}function a(l){for(var f=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=cn,1),u=-1,d=r.length;++u<d;)r[u].call(t,f);n.state===cn&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=be,n.timer.stop(),delete o[e];for(var l in o)return;delete t.__transition}}function Ee(t,e){var n=t.__transition,o,r,i=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((o=n[s]).name!==e){i=!1;continue}r=o.state>an&&o.state<cn,o.state=be,o.timer.stop(),o.on.call(r?"interrupt":"cancel",t,t.__data__,o.index,o.group),delete n[s]}i&&delete t.__transition}}function Ec(t){return this.each(function(){Ee(this,t)})}function Sc(t,e){var n,o;return function(){var r=gt(this,t),i=r.tween;if(i!==n){o=n=i;for(var s=0,a=o.length;s<a;++s)if(o[s].name===e){o=o.slice(),o.splice(s,1);break}}r.tween=o}}function Nc(t,e,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=gt(this,t),s=i.tween;if(s!==o){r=(o=s).slice();for(var a={name:e,value:n},c=0,l=r.length;c<l;++c)if(r[c].name===e){r[c]=a;break}c===l&&r.push(a)}i.tween=r}}function Cc(t,e){var n=this._id;if(t+="",arguments.length<2){for(var o=ft(this.node(),n).tween,r=0,i=o.length,s;r<i;++r)if((s=o[r]).name===t)return s.value;return null}return this.each((e==null?Sc:Nc)(n,t,e))}function vn(t,e,n){var o=t._id;return t.each(function(){var r=gt(this,o);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return ft(r,o).value[e]}}function nr(t,e){var n;return(typeof e=="number"?_s:e instanceof Bn?Fn:(n=Bn(e))?(e=n,Fn):bs)(t,e)}function Mc(t){return function(){this.removeAttribute(t)}}function Ic(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ac(t,e,n){var o,r=n+"",i;return function(){var s=this.getAttribute(t);return s===r?null:s===o?i:i=e(o=s,n)}}function kc(t,e,n){var o,r=n+"",i;return function(){var s=this.getAttributeNS(t.space,t.local);return s===r?null:s===o?i:i=e(o=s,n)}}function Pc(t,e,n){var o,r,i;return function(){var s,a=n(this),c;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),c=a+"",s===c?null:s===o&&c===r?i:(r=c,i=e(o=s,a)))}}function $c(t,e,n){var o,r,i;return function(){var s,a=n(this),c;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),c=a+"",s===c?null:s===o&&c===r?i:(r=c,i=e(o=s,a)))}}function Tc(t,e){var n=ze(t),o=n==="transform"?Es:nr;return this.attrTween(t,typeof e=="function"?(n.local?$c:Pc)(n,o,vn(this,"attr."+t,e)):e==null?(n.local?Ic:Mc)(n):(n.local?kc:Ac)(n,o,e))}function zc(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Lc(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Dc(t,e){var n,o;function r(){var i=e.apply(this,arguments);return i!==o&&(n=(o=i)&&Lc(t,i)),n}return r._value=e,r}function Hc(t,e){var n,o;function r(){var i=e.apply(this,arguments);return i!==o&&(n=(o=i)&&zc(t,i)),n}return r._value=e,r}function Rc(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var o=ze(t);return this.tween(n,(o.local?Dc:Hc)(o,e))}function Vc(t,e){return function(){wn(this,t).delay=+e.apply(this,arguments)}}function Bc(t,e){return e=+e,function(){wn(this,t).delay=e}}function Fc(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Vc:Bc)(e,t)):ft(this.node(),e).delay}function Oc(t,e){return function(){gt(this,t).duration=+e.apply(this,arguments)}}function jc(t,e){return e=+e,function(){gt(this,t).duration=e}}function Yc(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Oc:jc)(e,t)):ft(this.node(),e).duration}function Xc(t,e){if(typeof e!="function")throw new Error;return function(){gt(this,t).ease=e}}function Wc(t){var e=this._id;return arguments.length?this.each(Xc(e,t)):ft(this.node(),e).ease}function Gc(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;gt(this,t).ease=n}}function qc(t){if(typeof t!="function")throw new Error;return this.each(Gc(this._id,t))}function Uc(t){typeof t!="function"&&(t=Vo(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i=e[r],s=i.length,a=o[r]=[],c,l=0;l<s;++l)(c=i[l])&&t.call(c,c.__data__,l,i)&&a.push(c);return new xt(o,this._parents,this._name,this._id)}function Kc(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,o=e.length,r=n.length,i=Math.min(o,r),s=new Array(o),a=0;a<i;++a)for(var c=e[a],l=n[a],f=c.length,u=s[a]=new Array(f),d,h=0;h<f;++h)(d=c[h]||l[h])&&(u[h]=d);for(;a<o;++a)s[a]=e[a];return new xt(s,this._parents,this._name,this._id)}function Zc(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Qc(t,e,n){var o,r,i=Zc(e)?wn:gt;return function(){var s=i(this,t),a=s.on;a!==o&&(r=(o=a).copy()).on(e,n),s.on=r}}function Jc(t,e){var n=this._id;return arguments.length<2?ft(this.node(),n).on.on(t):this.each(Qc(n,t,e))}function tu(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function eu(){return this.on("end.remove",tu(this._id))}function nu(t){var e=this._name,n=this._id;typeof t!="function"&&(t=mn(t));for(var o=this._groups,r=o.length,i=new Array(r),s=0;s<r;++s)for(var a=o[s],c=a.length,l=i[s]=new Array(c),f,u,d=0;d<c;++d)(f=a[d])&&(u=t.call(f,f.__data__,d,a))&&("__data__"in f&&(u.__data__=f.__data__),l[d]=u,De(l[d],e,n,d,l,ft(f,n)));return new xt(i,this._parents,e,n)}function ou(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ro(t));for(var o=this._groups,r=o.length,i=[],s=[],a=0;a<r;++a)for(var c=o[a],l=c.length,f,u=0;u<l;++u)if(f=c[u]){for(var d=t.call(f,f.__data__,u,c),h,p=ft(f,n),v=0,y=d.length;v<y;++v)(h=d[v])&&De(h,e,n,v,d,p);i.push(d),s.push(f)}return new xt(i,s,e,n)}var ru=se.prototype.constructor;function iu(){return new ru(this._groups,this._parents)}function su(t,e){var n,o,r;return function(){var i=Dt(this,t),s=(this.style.removeProperty(t),Dt(this,t));return i===s?null:i===n&&s===o?r:r=e(n=i,o=s)}}function or(t){return function(){this.style.removeProperty(t)}}function au(t,e,n){var o,r=n+"",i;return function(){var s=Dt(this,t);return s===r?null:s===o?i:i=e(o=s,n)}}function cu(t,e,n){var o,r,i;return function(){var s=Dt(this,t),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(t),Dt(this,t))),s===c?null:s===o&&c===r?i:(r=c,i=e(o=s,a))}}function uu(t,e){var n,o,r,i="style."+e,s="end."+i,a;return function(){var c=gt(this,t),l=c.on,f=c.value[i]==null?a||(a=or(e)):void 0;(l!==n||r!==f)&&(o=(n=l).copy()).on(s,r=f),c.on=o}}function lu(t,e,n){var o=(t+="")=="transform"?Ss:nr;return e==null?this.styleTween(t,su(t,o)).on("end.style."+t,or(t)):typeof e=="function"?this.styleTween(t,cu(t,o,vn(this,"style."+t,e))).each(uu(this._id,t)):this.styleTween(t,au(t,o,e),n).on("end.style."+t,null)}function du(t,e,n){return function(o){this.style.setProperty(t,e.call(this,o),n)}}function fu(t,e,n){var o,r;function i(){var s=e.apply(this,arguments);return s!==r&&(o=(r=s)&&du(t,s,n)),o}return i._value=e,i}function hu(t,e,n){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,fu(t,e,n??""))}function gu(t){return function(){this.textContent=t}}function pu(t){return function(){var e=t(this);this.textContent=e??""}}function mu(t){return this.tween("text",typeof t=="function"?pu(vn(this,"text",t)):gu(t==null?"":t+""))}function yu(t){return function(e){this.textContent=t.call(this,e)}}function xu(t){var e,n;function o(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&yu(r)),e}return o._value=t,o}function wu(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,xu(t))}function vu(){for(var t=this._name,e=this._id,n=rr(),o=this._groups,r=o.length,i=0;i<r;++i)for(var s=o[i],a=s.length,c,l=0;l<a;++l)if(c=s[l]){var f=ft(c,e);De(c,t,n,l,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new xt(o,this._parents,t,n)}function _u(){var t,e,n=this,o=n._id,r=n.size();return new Promise(function(i,s){var a={value:s},c={value:function(){--r===0&&i()}};n.each(function(){var l=gt(this,o),f=l.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(c)),l.on=e}),r===0&&i()})}var bu=0;function xt(t,e,n,o){this._groups=t,this._parents=e,this._name=n,this._id=o}function rr(){return++bu}var mt=se.prototype;xt.prototype={constructor:xt,select:nu,selectAll:ou,selectChild:mt.selectChild,selectChildren:mt.selectChildren,filter:Uc,merge:Kc,selection:iu,transition:vu,call:mt.call,nodes:mt.nodes,node:mt.node,size:mt.size,empty:mt.empty,each:mt.each,on:Jc,attr:Tc,attrTween:Rc,style:lu,styleTween:hu,text:mu,textTween:wu,remove:eu,tween:Cc,delay:Fc,duration:Yc,ease:Wc,easeVarying:qc,end:_u,[Symbol.iterator]:mt[Symbol.iterator]};function Eu(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Su={time:null,delay:0,duration:250,ease:Eu};function Nu(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Cu(t){var e,n;t instanceof xt?(e=t._id,t=t._name):(e=rr(),(n=Su).time=xn(),t=t==null?null:t+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var s=o[i],a=s.length,c,l=0;l<a;++l)(c=s[l])&&De(c,t,e,l,s,n||Nu(c,e));return new xt(o,this._parents,t,e)}se.prototype.interrupt=Ec;se.prototype.transition=Cu;const ge=t=>()=>t;function Mu(t,{sourceEvent:e,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function yt(t,e,n){this.k=t,this.x=e,this.y=n}yt.prototype={constructor:yt,scale:function(t){return t===1?this:new yt(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new yt(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var He=new yt(1,0,0);ir.prototype=yt.prototype;function ir(t){for(;!t.__zoom;)if(!(t=t.parentNode))return He;return t.__zoom}function Ze(t){t.stopImmediatePropagation()}function Ut(t){t.preventDefault(),t.stopImmediatePropagation()}function Iu(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Au(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Kn(){return this.__zoom||He}function ku(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Pu(){return navigator.maxTouchPoints||"ontouchstart"in this}function $u(t,e,n){var o=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],i=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function sr(){var t=Iu,e=Au,n=$u,o=ku,r=Pu,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,c=we,l=Te("start","zoom","end"),f,u,d,h=500,p=150,v=0,y=10;function m(w){w.property("__zoom",Kn).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",$).on("dblclick.zoom",B).filter(r).on("touchstart.zoom",M).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(w,I,b,A){var C=w.selection?w.selection():w;C.property("__zoom",Kn),w!==C?N(w,I,b,A):C.interrupt().each(function(){S(this,arguments).event(A).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},m.scaleBy=function(w,I,b,A){m.scaleTo(w,function(){var C=this.__zoom.k,E=typeof I=="function"?I.apply(this,arguments):I;return C*E},b,A)},m.scaleTo=function(w,I,b,A){m.transform(w,function(){var C=e.apply(this,arguments),E=this.__zoom,D=b==null?x(C):typeof b=="function"?b.apply(this,arguments):b,R=E.invert(D),H=typeof I=="function"?I.apply(this,arguments):I;return n(g(_(E,H),D,R),C,s)},b,A)},m.translateBy=function(w,I,b,A){m.transform(w,function(){return n(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof b=="function"?b.apply(this,arguments):b),e.apply(this,arguments),s)},null,A)},m.translateTo=function(w,I,b,A,C){m.transform(w,function(){var E=e.apply(this,arguments),D=this.__zoom,R=A==null?x(E):typeof A=="function"?A.apply(this,arguments):A;return n(He.translate(R[0],R[1]).scale(D.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof b=="function"?-b.apply(this,arguments):-b),E,s)},A,C)};function _(w,I){return I=Math.max(i[0],Math.min(i[1],I)),I===w.k?w:new yt(I,w.x,w.y)}function g(w,I,b){var A=I[0]-b[0]*w.k,C=I[1]-b[1]*w.k;return A===w.x&&C===w.y?w:new yt(w.k,A,C)}function x(w){return[(+w[0][0]+ +w[1][0])/2,(+w[0][1]+ +w[1][1])/2]}function N(w,I,b,A){w.on("start.zoom",function(){S(this,arguments).event(A).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(A).end()}).tween("zoom",function(){var C=this,E=arguments,D=S(C,E).event(A),R=e.apply(C,E),H=b==null?x(R):typeof b=="function"?b.apply(C,E):b,O=Math.max(R[1][0]-R[0][0],R[1][1]-R[0][1]),j=C.__zoom,X=typeof I=="function"?I.apply(C,E):I,U=c(j.invert(H).concat(O/j.k),X.invert(H).concat(O/X.k));return function(G){if(G===1)G=X;else{var F=U(G),W=O/F[2];G=new yt(W,H[0]-F[0]*W,H[1]-F[1]*W)}D.zoom(null,G)}})}function S(w,I,b){return!b&&w.__zooming||new k(w,I)}function k(w,I){this.that=w,this.args=I,this.active=0,this.sourceEvent=null,this.extent=e.apply(w,I),this.taps=0}k.prototype={event:function(w){return w&&(this.sourceEvent=w),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(w,I){return this.mouse&&w!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&w!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&w!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(w){var I=at(this.that).datum();l.call(w,this.that,new Mu(w,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:l}),I)}};function T(w,...I){if(!t.apply(this,arguments))return;var b=S(this,I).event(w),A=this.__zoom,C=Math.max(i[0],Math.min(i[1],A.k*Math.pow(2,o.apply(this,arguments)))),E=ut(w);if(b.wheel)(b.mouse[0][0]!==E[0]||b.mouse[0][1]!==E[1])&&(b.mouse[1]=A.invert(b.mouse[0]=E)),clearTimeout(b.wheel);else{if(A.k===C)return;b.mouse=[E,A.invert(E)],Ee(this),b.start()}Ut(w),b.wheel=setTimeout(D,p),b.zoom("mouse",n(g(_(A,C),b.mouse[0],b.mouse[1]),b.extent,s));function D(){b.wheel=null,b.end()}}function $(w,...I){if(d||!t.apply(this,arguments))return;var b=w.currentTarget,A=S(this,I,!0).event(w),C=at(w.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",O,!0),E=ut(w,b),D=w.clientX,R=w.clientY;Uo(w.view),Ze(w),A.mouse=[E,this.__zoom.invert(E)],Ee(this),A.start();function H(j){if(Ut(j),!A.moved){var X=j.clientX-D,U=j.clientY-R;A.moved=X*X+U*U>v}A.event(j).zoom("mouse",n(g(A.that.__zoom,A.mouse[0]=ut(j,b),A.mouse[1]),A.extent,s))}function O(j){C.on("mousemove.zoom mouseup.zoom",null),Ko(j.view,A.moved),Ut(j),A.event(j).end()}}function B(w,...I){if(t.apply(this,arguments)){var b=this.__zoom,A=ut(w.changedTouches?w.changedTouches[0]:w,this),C=b.invert(A),E=b.k*(w.shiftKey?.5:2),D=n(g(_(b,E),A,C),e.apply(this,I),s);Ut(w),a>0?at(this).transition().duration(a).call(N,D,A,w):at(this).call(m.transform,D,A,w)}}function M(w,...I){if(t.apply(this,arguments)){var b=w.touches,A=b.length,C=S(this,I,w.changedTouches.length===A).event(w),E,D,R,H;for(Ze(w),D=0;D<A;++D)R=b[D],H=ut(R,this),H=[H,this.__zoom.invert(H),R.identifier],C.touch0?!C.touch1&&C.touch0[2]!==H[2]&&(C.touch1=H,C.taps=0):(C.touch0=H,E=!0,C.taps=1+!!f);f&&(f=clearTimeout(f)),E&&(C.taps<2&&(u=H[0],f=setTimeout(function(){f=null},h)),Ee(this),C.start())}}function z(w,...I){if(this.__zooming){var b=S(this,I).event(w),A=w.changedTouches,C=A.length,E,D,R,H;for(Ut(w),E=0;E<C;++E)D=A[E],R=ut(D,this),b.touch0&&b.touch0[2]===D.identifier?b.touch0[0]=R:b.touch1&&b.touch1[2]===D.identifier&&(b.touch1[0]=R);if(D=b.that.__zoom,b.touch1){var O=b.touch0[0],j=b.touch0[1],X=b.touch1[0],U=b.touch1[1],G=(G=X[0]-O[0])*G+(G=X[1]-O[1])*G,F=(F=U[0]-j[0])*F+(F=U[1]-j[1])*F;D=_(D,Math.sqrt(G/F)),R=[(O[0]+X[0])/2,(O[1]+X[1])/2],H=[(j[0]+U[0])/2,(j[1]+U[1])/2]}else if(b.touch0)R=b.touch0[0],H=b.touch0[1];else return;b.zoom("touch",n(g(D,R,H),b.extent,s))}}function V(w,...I){if(this.__zooming){var b=S(this,I).event(w),A=w.changedTouches,C=A.length,E,D;for(Ze(w),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),E=0;E<C;++E)D=A[E],b.touch0&&b.touch0[2]===D.identifier?delete b.touch0:b.touch1&&b.touch1[2]===D.identifier&&delete b.touch1;if(b.touch1&&!b.touch0&&(b.touch0=b.touch1,delete b.touch1),b.touch0)b.touch0[1]=this.__zoom.invert(b.touch0[0]);else if(b.end(),b.taps===2&&(D=ut(D,this),Math.hypot(u[0]-D[0],u[1]-D[1])<y)){var R=at(this).on("dblclick.zoom");R&&R.apply(this,arguments)}}}return m.wheelDelta=function(w){return arguments.length?(o=typeof w=="function"?w:ge(+w),m):o},m.filter=function(w){return arguments.length?(t=typeof w=="function"?w:ge(!!w),m):t},m.touchable=function(w){return arguments.length?(r=typeof w=="function"?w:ge(!!w),m):r},m.extent=function(w){return arguments.length?(e=typeof w=="function"?w:ge([[+w[0][0],+w[0][1]],[+w[1][0],+w[1][1]]]),m):e},m.scaleExtent=function(w){return arguments.length?(i[0]=+w[0],i[1]=+w[1],m):[i[0],i[1]]},m.translateExtent=function(w){return arguments.length?(s[0][0]=+w[0][0],s[1][0]=+w[1][0],s[0][1]=+w[0][1],s[1][1]=+w[1][1],m):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},m.constrain=function(w){return arguments.length?(n=w,m):n},m.duration=function(w){return arguments.length?(a=+w,m):a},m.interpolate=function(w){return arguments.length?(c=w,m):c},m.on=function(){var w=l.on.apply(l,arguments);return w===l?m:w},m.clickDistance=function(w){return arguments.length?(v=(w=+w)*w,m):Math.sqrt(v)},m.tapDistance=function(w){return arguments.length?(y=+w,m):y},m}const ht={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:e,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${t} handle id: "${t==="source"?n:o}", edge id: ${e}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/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."},ee=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],ar=["Enter"," ","Escape"],cr={"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:t,x:e,y:n})=>`Moved selected node ${t}. New position, x: ${e}, 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 Rt;(function(t){t.Strict="strict",t.Loose="loose"})(Rt||(Rt={}));var Mt;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(Mt||(Mt={}));var ne;(function(t){t.Partial="partial",t.Full="full"})(ne||(ne={}));const ur={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Et;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Et||(Et={}));var Ie;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(Ie||(Ie={}));var Y;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(Y||(Y={}));const Zn={[Y.Left]:Y.Right,[Y.Right]:Y.Left,[Y.Top]:Y.Bottom,[Y.Bottom]:Y.Top};function lr(t){return t===null?null:t?"valid":"invalid"}const dr=t=>"id"in t&&"source"in t&&"target"in t,Tu=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),_n=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),ae=(t,e=[0,0])=>{const{width:n,height:o}=wt(t),r=t.origin??e,i=n*r[0],s=o*r[1];return{x:t.position.x-i,y:t.position.y-s}},zu=(t,e={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const n=t.reduce((o,r)=>{const i=typeof r=="string";let s=!e.nodeLookup&&!i?r:void 0;e.nodeLookup&&(s=i?e.nodeLookup.get(r):_n(r)?r:e.nodeLookup.get(r.id));const a=s?Ae(s,e.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Re(o,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ve(n)},ce=(t,e={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return t.forEach(r=>{(e.filter===void 0||e.filter(r))&&(n=Re(n,Ae(r)),o=!0)}),o?Ve(n):{x:0,y:0,width:0,height:0}},bn=(t,e,[n,o,r]=[0,0,1],i=!1,s=!1)=>{const a={...le(e,[n,o,r]),width:e.width/r,height:e.height/r},c=[];for(const l of t.values()){const{measured:f,selectable:u=!0,hidden:d=!1}=l;if(s&&!u||d)continue;const h=f.width??l.width??l.initialWidth??null,p=f.height??l.height??l.initialHeight??null,v=oe(a,Bt(l)),y=(h??0)*(p??0),m=i&&v>0;(!l.internals.handleBounds||m||v>=y||l.dragging)&&c.push(l)}return c},Lu=(t,e)=>{const n=new Set;return t.forEach(o=>{n.add(o.id)}),e.filter(o=>n.has(o.source)||n.has(o.target))};function Du(t,e){const n=new Map,o=e!=null&&e.nodes?new Set(e.nodes.map(r=>r.id)):null;return t.forEach(r=>{r.measured.width&&r.measured.height&&((e==null?void 0:e.includeHiddenNodes)||!r.hidden)&&(!o||o.has(r.id))&&n.set(r.id,r)}),n}async function Hu({nodes:t,width:e,height:n,panZoom:o,minZoom:r,maxZoom:i},s){if(t.size===0)return Promise.resolve(!0);const a=Du(t,s),c=ce(a),l=En(c,e,n,(s==null?void 0:s.minZoom)??r,(s==null?void 0:s.maxZoom)??i,(s==null?void 0:s.padding)??.1);return await o.setViewport(l,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function fr({nodeId:t,nextPosition:e,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:i}){const s=n.get(t),a=s.parentId?n.get(s.parentId):void 0,{x:c,y:l}=a?a.internals.positionAbsolute:{x:0,y:0},f=s.origin??o;let u=s.extent||r;if(s.extent==="parent"&&!s.expandParent)if(!a)i==null||i("005",ht.error005());else{const h=a.measured.width,p=a.measured.height;h&&p&&(u=[[c,l],[c+h,l+p]])}else a&&Ft(s.extent)&&(u=[[s.extent[0][0]+c,s.extent[0][1]+l],[s.extent[1][0]+c,s.extent[1][1]+l]]);const d=Ft(u)?At(e,u,s.measured):e;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",ht.error015())),{position:{x:d.x-c+(s.measured.width??0)*f[0],y:d.y-l+(s.measured.height??0)*f[1]},positionAbsolute:d}}async function Ru({nodesToRemove:t=[],edgesToRemove:e=[],nodes:n,edges:o,onBeforeDelete:r}){const i=new Set(t.map(d=>d.id)),s=[];for(const d of n){if(d.deletable===!1)continue;const h=i.has(d.id),p=!h&&d.parentId&&s.find(v=>v.id===d.parentId);(h||p)&&s.push(d)}const a=new Set(e.map(d=>d.id)),c=o.filter(d=>d.deletable!==!1),f=Lu(s,c);for(const d of c)a.has(d.id)&&!f.find(p=>p.id===d.id)&&f.push(d);if(!r)return{edges:f,nodes:s};const u=await r({nodes:s,edges:f});return typeof u=="boolean"?u?{edges:f,nodes:s}:{edges:[],nodes:[]}:u}const Vt=(t,e=0,n=1)=>Math.min(Math.max(t,e),n),At=(t={x:0,y:0},e,n)=>({x:Vt(t.x,e[0][0],e[1][0]-((n==null?void 0:n.width)??0)),y:Vt(t.y,e[0][1],e[1][1]-((n==null?void 0:n.height)??0))});function hr(t,e,n){const{width:o,height:r}=wt(n),{x:i,y:s}=n.internals.positionAbsolute;return At(t,[[i,s],[i+o,s+r]],e)}const Qn=(t,e,n)=>t<e?Vt(Math.abs(t-e),1,e)/e:t>n?-Vt(Math.abs(t-n),1,e)/e:0,gr=(t,e,n=15,o=40)=>{const r=Qn(t.x,o,e.width-o)*n,i=Qn(t.y,o,e.height-o)*n;return[r,i]},Re=(t,e)=>({x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}),un=({x:t,y:e,width:n,height:o})=>({x:t,y:e,x2:t+n,y2:e+o}),Ve=({x:t,y:e,x2:n,y2:o})=>({x:t,y:e,width:n-t,height:o-e}),Bt=(t,e=[0,0])=>{var r,i;const{x:n,y:o}=_n(t)?t.internals.positionAbsolute:ae(t,e);return{x:n,y:o,width:((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth??0,height:((i=t.measured)==null?void 0:i.height)??t.height??t.initialHeight??0}},Ae=(t,e=[0,0])=>{var r,i;const{x:n,y:o}=_n(t)?t.internals.positionAbsolute:ae(t,e);return{x:n,y:o,x2:n+(((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth??0),y2:o+(((i=t.measured)==null?void 0:i.height)??t.height??t.initialHeight??0)}},pr=(t,e)=>Ve(Re(un(t),un(e))),oe=(t,e)=>{const n=Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)),o=Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y));return Math.ceil(n*o)},Jn=t=>lt(t.width)&<(t.height)&<(t.x)&<(t.y),lt=t=>!isNaN(t)&&isFinite(t),Vu=(t,e)=>{},ue=(t,e=[1,1])=>({x:e[0]*Math.round(t.x/e[0]),y:e[1]*Math.round(t.y/e[1])}),le=({x:t,y:e},[n,o,r],i=!1,s=[1,1])=>{const a={x:(t-n)/r,y:(e-o)/r};return i?ue(a,s):a},ke=({x:t,y:e},[n,o,r])=>({x:t*r+n,y:e*r+o});function $t(t,e){if(typeof t=="number")return Math.floor((e-e/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const n=parseFloat(t);if(!Number.isNaN(n))return Math.floor(n)}if(typeof t=="string"&&t.endsWith("%")){const n=parseFloat(t);if(!Number.isNaN(n))return Math.floor(e*n*.01)}return console.error(`[React Flow] The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Bu(t,e,n){if(typeof t=="string"||typeof t=="number"){const o=$t(t,n),r=$t(t,e);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof t=="object"){const o=$t(t.top??t.y??0,n),r=$t(t.bottom??t.y??0,n),i=$t(t.left??t.x??0,e),s=$t(t.right??t.x??0,e);return{top:o,right:s,bottom:r,left:i,x:i+s,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Fu(t,e,n,o,r,i){const{x:s,y:a}=ke(t,[e,n,o]),{x:c,y:l}=ke({x:t.x+t.width,y:t.y+t.height},[e,n,o]),f=r-c,u=i-l;return{left:Math.floor(s),top:Math.floor(a),right:Math.floor(f),bottom:Math.floor(u)}}const En=(t,e,n,o,r,i)=>{const s=Bu(i,e,n),a=(e-s.x)/t.width,c=(n-s.y)/t.height,l=Math.min(a,c),f=Vt(l,o,r),u=t.x+t.width/2,d=t.y+t.height/2,h=e/2-u*f,p=n/2-d*f,v=Fu(t,h,p,f,e,n),y={left:Math.min(v.left-s.left,0),top:Math.min(v.top-s.top,0),right:Math.min(v.right-s.right,0),bottom:Math.min(v.bottom-s.bottom,0)};return{x:h-y.left+y.right,y:p-y.top+y.bottom,zoom:f}},re=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function Ft(t){return t!=null&&t!=="parent"}function wt(t){var e,n;return{width:((e=t.measured)==null?void 0:e.width)??t.width??t.initialWidth??0,height:((n=t.measured)==null?void 0:n.height)??t.height??t.initialHeight??0}}function mr(t){var e,n;return(((e=t.measured)==null?void 0:e.width)??t.width??t.initialWidth)!==void 0&&(((n=t.measured)==null?void 0:n.height)??t.height??t.initialHeight)!==void 0}function yr(t,e={width:0,height:0},n,o,r){const i={...t},s=o.get(n);if(s){const a=s.origin||r;i.x+=s.internals.positionAbsolute.x-(e.width??0)*a[0],i.y+=s.internals.positionAbsolute.y-(e.height??0)*a[1]}return i}function to(t,e){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}function Ou(){let t,e;return{promise:new Promise((o,r)=>{t=o,e=r}),resolve:t,reject:e}}function ju(t){return{...cr,...t||{}}}function Qt(t,{snapGrid:e=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:i,y:s}=dt(t),a=le({x:i-((r==null?void 0:r.left)??0),y:s-((r==null?void 0:r.top)??0)},o),{x:c,y:l}=n?ue(a,e):a;return{xSnapped:c,ySnapped:l,...a}}const Sn=t=>({width:t.offsetWidth,height:t.offsetHeight}),xr=t=>{var e;return((e=t==null?void 0:t.getRootNode)==null?void 0:e.call(t))||(window==null?void 0:window.document)},Yu=["INPUT","SELECT","TEXTAREA"];function wr(t){var o,r;const e=((r=(o=t.composedPath)==null?void 0:o.call(t))==null?void 0:r[0])||t.target;return(e==null?void 0:e.nodeType)!==1?!1:Yu.includes(e.nodeName)||e.hasAttribute("contenteditable")||!!e.closest(".nokey")}const vr=t=>"clientX"in t,dt=(t,e)=>{var i,s;const n=vr(t),o=n?t.clientX:(i=t.touches)==null?void 0:i[0].clientX,r=n?t.clientY:(s=t.touches)==null?void 0:s[0].clientY;return{x:o-((e==null?void 0:e.left)??0),y:r-((e==null?void 0:e.top)??0)}},eo=(t,e,n,o,r)=>{const i=e.querySelectorAll(`.${t}`);return!i||!i.length?null:Array.from(i).map(s=>{const a=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:t,nodeId:r,position:s.getAttribute("data-handlepos"),x:(a.left-n.left)/o,y:(a.top-n.top)/o,...Sn(s)}})};function _r({sourceX:t,sourceY:e,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:s,targetControlY:a}){const c=t*.125+r*.375+s*.375+n*.125,l=e*.125+i*.375+a*.375+o*.125,f=Math.abs(c-t),u=Math.abs(l-e);return[c,l,f,u]}function pe(t,e){return t>=0?.5*t:e*25*Math.sqrt(-t)}function no({pos:t,x1:e,y1:n,x2:o,y2:r,c:i}){switch(t){case Y.Left:return[e-pe(e-o,i),n];case Y.Right:return[e+pe(o-e,i),n];case Y.Top:return[e,n-pe(n-r,i)];case Y.Bottom:return[e,n+pe(r-n,i)]}}function br({sourceX:t,sourceY:e,sourcePosition:n=Y.Bottom,targetX:o,targetY:r,targetPosition:i=Y.Top,curvature:s=.25}){const[a,c]=no({pos:n,x1:t,y1:e,x2:o,y2:r,c:s}),[l,f]=no({pos:i,x1:o,y1:r,x2:t,y2:e,c:s}),[u,d,h,p]=_r({sourceX:t,sourceY:e,targetX:o,targetY:r,sourceControlX:a,sourceControlY:c,targetControlX:l,targetControlY:f});return[`M${t},${e} C${a},${c} ${l},${f} ${o},${r}`,u,d,h,p]}function Er({sourceX:t,sourceY:e,targetX:n,targetY:o}){const r=Math.abs(n-t)/2,i=n<t?n+r:n-r,s=Math.abs(o-e)/2,a=o<e?o+s:o-s;return[i,a,r,s]}function Xu({sourceNode:t,targetNode:e,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:i="basic"}){if(i==="manual")return o;const s=r&&n?o+1e3:o,a=Math.max(t.parentId||r&&t.selected?t.internals.z:0,e.parentId||r&&e.selected?e.internals.z:0);return s+a}function Wu({sourceNode:t,targetNode:e,width:n,height:o,transform:r}){const i=Re(Ae(t),Ae(e));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return oe(s,Ve(i))>0}const Gu=({source:t,sourceHandle:e,target:n,targetHandle:o})=>`xy-edge__${t}${e||""}-${n}${o||""}`,qu=(t,e)=>e.some(n=>n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)),Uu=(t,e,n={})=>{if(!t.source||!t.target)return e;const o=n.getEdgeId||Gu;let r;return dr(t)?r={...t}:r={...t,id:o(t)},qu(r,e)?e:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,e.concat(r))};function Sr({sourceX:t,sourceY:e,targetX:n,targetY:o}){const[r,i,s,a]=Er({sourceX:t,sourceY:e,targetX:n,targetY:o});return[`M ${t},${e}L ${n},${o}`,r,i,s,a]}const oo={[Y.Left]:{x:-1,y:0},[Y.Right]:{x:1,y:0},[Y.Top]:{x:0,y:-1},[Y.Bottom]:{x:0,y:1}},Ku=({source:t,sourcePosition:e=Y.Bottom,target:n})=>e===Y.Left||e===Y.Right?t.x<n.x?{x:1,y:0}:{x:-1,y:0}:t.y<n.y?{x:0,y:1}:{x:0,y:-1},ro=(t,e)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));function Zu({source:t,sourcePosition:e=Y.Bottom,target:n,targetPosition:o=Y.Top,center:r,offset:i,stepPosition:s}){const a=oo[e],c=oo[o],l={x:t.x+a.x*i,y:t.y+a.y*i},f={x:n.x+c.x*i,y:n.y+c.y*i},u=Ku({source:l,sourcePosition:e,target:f}),d=u.x!==0?"x":"y",h=u[d];let p=[],v,y;const m={x:0,y:0},_={x:0,y:0},[,,g,x]=Er({sourceX:t.x,sourceY:t.y,targetX:n.x,targetY:n.y});if(a[d]*c[d]===-1){d==="x"?(v=r.x??l.x+(f.x-l.x)*s,y=r.y??(l.y+f.y)/2):(v=r.x??(l.x+f.x)/2,y=r.y??l.y+(f.y-l.y)*s);const T=[{x:v,y:l.y},{x:v,y:f.y}],$=[{x:l.x,y},{x:f.x,y}];a[d]===h?p=d==="x"?T:$:p=d==="x"?$:T}else{const T=[{x:l.x,y:f.y}],$=[{x:f.x,y:l.y}];if(d==="x"?p=a.x===h?$:T:p=a.y===h?T:$,e===o){const w=Math.abs(t[d]-n[d]);if(w<=i){const I=Math.min(i-1,i-w);a[d]===h?m[d]=(l[d]>t[d]?-1:1)*I:_[d]=(f[d]>n[d]?-1:1)*I}}if(e!==o){const w=d==="x"?"y":"x",I=a[d]===c[w],b=l[w]>f[w],A=l[w]<f[w];(a[d]===1&&(!I&&b||I&&A)||a[d]!==1&&(!I&&A||I&&b))&&(p=d==="x"?T:$)}const B={x:l.x+m.x,y:l.y+m.y},M={x:f.x+_.x,y:f.y+_.y},z=Math.max(Math.abs(B.x-p[0].x),Math.abs(M.x-p[0].x)),V=Math.max(Math.abs(B.y-p[0].y),Math.abs(M.y-p[0].y));z>=V?(v=(B.x+M.x)/2,y=p[0].y):(v=p[0].x,y=(B.y+M.y)/2)}const N={x:l.x+m.x,y:l.y+m.y},S={x:f.x+_.x,y:f.y+_.y};return[[t,...N.x!==p[0].x||N.y!==p[0].y?[N]:[],...p,...S.x!==p[p.length-1].x||S.y!==p[p.length-1].y?[S]:[],n],v,y,g,x]}function Qu(t,e,n,o){const r=Math.min(ro(t,e)/2,ro(e,n)/2,o),{x:i,y:s}=e;if(t.x===i&&i===n.x||t.y===s&&s===n.y)return`L${i} ${s}`;if(t.y===s){const l=t.x<n.x?-1:1,f=t.y<n.y?1:-1;return`L ${i+r*l},${s}Q ${i},${s} ${i},${s+r*f}`}const a=t.x<n.x?1:-1,c=t.y<n.y?-1:1;return`L ${i},${s+r*c}Q ${i},${s} ${i+r*a},${s}`}function ln({sourceX:t,sourceY:e,sourcePosition:n=Y.Bottom,targetX:o,targetY:r,targetPosition:i=Y.Top,borderRadius:s=5,centerX:a,centerY:c,offset:l=20,stepPosition:f=.5}){const[u,d,h,p,v]=Zu({source:{x:t,y:e},sourcePosition:n,target:{x:o,y:r},targetPosition:i,center:{x:a,y:c},offset:l,stepPosition:f});let y=`M${u[0].x} ${u[0].y}`;for(let m=1;m<u.length-1;m++)y+=Qu(u[m-1],u[m],u[m+1],s);return y+=`L${u[u.length-1].x} ${u[u.length-1].y}`,[y,d,h,p,v]}function io(t){var e;return t&&!!(t.internals.handleBounds||(e=t.handles)!=null&&e.length)&&!!(t.measured.width||t.width||t.initialWidth)}function Ju(t){var u;const{sourceNode:e,targetNode:n}=t;if(!io(e)||!io(n))return null;const o=e.internals.handleBounds||so(e.handles),r=n.internals.handleBounds||so(n.handles),i=ao((o==null?void 0:o.source)??[],t.sourceHandle),s=ao(t.connectionMode===Rt.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),t.targetHandle);if(!i||!s)return(u=t.onError)==null||u.call(t,"008",ht.error008(i?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const a=(i==null?void 0:i.position)||Y.Bottom,c=(s==null?void 0:s.position)||Y.Top,l=kt(e,i,a),f=kt(n,s,c);return{sourceX:l.x,sourceY:l.y,targetX:f.x,targetY:f.y,sourcePosition:a,targetPosition:c}}function so(t){if(!t)return null;const e=[],n=[];for(const o of t)o.width=o.width??1,o.height=o.height??1,o.type==="source"?e.push(o):o.type==="target"&&n.push(o);return{source:e,target:n}}function kt(t,e,n=Y.Left,o=!1){const r=((e==null?void 0:e.x)??0)+t.internals.positionAbsolute.x,i=((e==null?void 0:e.y)??0)+t.internals.positionAbsolute.y,{width:s,height:a}=e??wt(t);if(o)return{x:r+s/2,y:i+a/2};switch((e==null?void 0:e.position)??n){case Y.Top:return{x:r+s/2,y:i};case Y.Right:return{x:r+s,y:i+a/2};case Y.Bottom:return{x:r+s/2,y:i+a};case Y.Left:return{x:r,y:i+a/2}}}function ao(t,e){return t&&(e?t.find(n=>n.id===e):t[0])||null}function dn(t,e){return t?typeof t=="string"?t:`${e?`${e}__`:""}${Object.keys(t).sort().map(o=>`${o}=${t[o]}`).join("&")}`:""}function tl(t,{id:e,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const i=new Set;return t.reduce((s,a)=>([a.markerStart||o,a.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const l=dn(c,e);i.has(l)||(s.push({id:l,color:c.color||n,...c}),i.add(l))}}),s),[]).sort((s,a)=>s.id.localeCompare(a.id))}const Nr=1e3,el=10,Nn={nodeOrigin:[0,0],nodeExtent:ee,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},nl={...Nn,checkEquality:!0};function Cn(t,e){const n={...t};for(const o in e)e[o]!==void 0&&(n[o]=e[o]);return n}function ol(t,e,n){const o=Cn(Nn,n);for(const r of t.values())if(r.parentId)In(r,t,e,o);else{const i=ae(r,o.nodeOrigin),s=Ft(r.extent)?r.extent:o.nodeExtent,a=At(i,s,wt(r));r.internals.positionAbsolute=a}}function rl(t,e){if(!t.handles)return t.measured?e==null?void 0:e.internals.handleBounds:void 0;const n=[],o=[];for(const r of t.handles){const i={id:r.id,width:r.width??1,height:r.height??1,nodeId:t.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(i):r.type==="target"&&o.push(i)}return{source:n,target:o}}function Mn(t){return t==="manual"}function fn(t,e,n,o={}){var f,u;const r=Cn(nl,o),i={i:0},s=new Map(e),a=r!=null&&r.elevateNodesOnSelect&&!Mn(r.zIndexMode)?Nr:0;let c=t.length>0,l=!1;e.clear(),n.clear();for(const d of t){let h=s.get(d.id);if(r.checkEquality&&d===(h==null?void 0:h.internals.userNode))e.set(d.id,h);else{const p=ae(d,r.nodeOrigin),v=Ft(d.extent)?d.extent:r.nodeExtent,y=At(p,v,wt(d));h={...r.defaults,...d,measured:{width:(f=d.measured)==null?void 0:f.width,height:(u=d.measured)==null?void 0:u.height},internals:{positionAbsolute:y,handleBounds:rl(d,h),z:Cr(d,a,r.zIndexMode),userNode:d}},e.set(d.id,h)}(h.measured===void 0||h.measured.width===void 0||h.measured.height===void 0)&&!h.hidden&&(c=!1),d.parentId&&In(h,e,n,o,i),l||(l=d.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:l}}function il(t,e){if(!t.parentId)return;const n=e.get(t.parentId);n?n.set(t.id,t):e.set(t.parentId,new Map([[t.id,t]]))}function In(t,e,n,o,r){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:a,zIndexMode:c}=Cn(Nn,o),l=t.parentId,f=e.get(l);if(!f){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}il(t,n),r&&!f.parentId&&f.internals.rootParentIndex===void 0&&c==="auto"&&(f.internals.rootParentIndex=++r.i,f.internals.z=f.internals.z+r.i*el),r&&f.internals.rootParentIndex!==void 0&&(r.i=f.internals.rootParentIndex);const u=i&&!Mn(c)?Nr:0,{x:d,y:h,z:p}=sl(t,f,s,a,u,c),{positionAbsolute:v}=t.internals,y=d!==v.x||h!==v.y;(y||p!==t.internals.z)&&e.set(t.id,{...t,internals:{...t.internals,positionAbsolute:y?{x:d,y:h}:v,z:p}})}function Cr(t,e,n){const o=lt(t.zIndex)?t.zIndex:0;return Mn(n)?o:o+(t.selected?e:0)}function sl(t,e,n,o,r,i){const{x:s,y:a}=e.internals.positionAbsolute,c=wt(t),l=ae(t,n),f=Ft(t.extent)?At(l,t.extent,c):l;let u=At({x:s+f.x,y:a+f.y},o,c);t.extent==="parent"&&(u=hr(u,c,e));const d=Cr(t,r,i),h=e.internals.z??0;return{x:u.x,y:u.y,z:h>=d?h+1:d}}function An(t,e,n,o=[0,0]){var s;const r=[],i=new Map;for(const a of t){const c=e.get(a.parentId);if(!c)continue;const l=((s=i.get(a.parentId))==null?void 0:s.expandedRect)??Bt(c),f=pr(l,a.rect);i.set(a.parentId,{expandedRect:f,parent:c})}return i.size>0&&i.forEach(({expandedRect:a,parent:c},l)=>{var g;const f=c.internals.positionAbsolute,u=wt(c),d=c.origin??o,h=a.x<f.x?Math.round(Math.abs(f.x-a.x)):0,p=a.y<f.y?Math.round(Math.abs(f.y-a.y)):0,v=Math.max(u.width,Math.round(a.width)),y=Math.max(u.height,Math.round(a.height)),m=(v-u.width)*d[0],_=(y-u.height)*d[1];(h>0||p>0||m||_)&&(r.push({id:l,type:"position",position:{x:c.position.x-h+m,y:c.position.y-p+_}}),(g=n.get(l))==null||g.forEach(x=>{t.some(N=>N.id===x.id)||r.push({id:x.id,type:"position",position:{x:x.position.x+h,y:x.position.y+p}})})),(u.width<a.width||u.height<a.height||h||p)&&r.push({id:l,type:"dimensions",setAttributes:!0,dimensions:{width:v+(h?d[0]*h-m:0),height:y+(p?d[1]*p-_:0)}})}),r}function al(t,e,n,o,r,i,s){const a=o==null?void 0:o.querySelector(".xyflow__viewport");let c=!1;if(!a)return{changes:[],updatedInternals:c};const l=[],f=window.getComputedStyle(a),{m22:u}=new window.DOMMatrixReadOnly(f.transform),d=[];for(const h of t.values()){const p=e.get(h.id);if(!p)continue;if(p.hidden){e.set(p.id,{...p,internals:{...p.internals,handleBounds:void 0}}),c=!0;continue}const v=Sn(h.nodeElement),y=p.measured.width!==v.width||p.measured.height!==v.height;if(!!(v.width&&v.height&&(y||!p.internals.handleBounds||h.force))){const _=h.nodeElement.getBoundingClientRect(),g=Ft(p.extent)?p.extent:i;let{positionAbsolute:x}=p.internals;p.parentId&&p.extent==="parent"?x=hr(x,v,e.get(p.parentId)):g&&(x=At(x,g,v));const N={...p,measured:v,internals:{...p.internals,positionAbsolute:x,handleBounds:{source:eo("source",h.nodeElement,_,u,p.id),target:eo("target",h.nodeElement,_,u,p.id)}}};e.set(p.id,N),p.parentId&&In(N,e,n,{nodeOrigin:r,zIndexMode:s}),c=!0,y&&(l.push({id:p.id,type:"dimensions",dimensions:v}),p.expandParent&&p.parentId&&d.push({id:p.id,parentId:p.parentId,rect:Bt(N,r)}))}}if(d.length>0){const h=An(d,e,n,r);l.push(...h)}return{changes:l,updatedInternals:c}}async function cl({delta:t,panZoom:e,transform:n,translateExtent:o,width:r,height:i}){if(!e||!t.x&&!t.y)return Promise.resolve(!1);const s=await e.setViewportConstrained({x:n[0]+t.x,y:n[1]+t.y,zoom:n[2]},[[0,0],[r,i]],o),a=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(a)}function co(t,e,n,o,r,i){let s=r;const a=o.get(s)||new Map;o.set(s,a.set(n,e)),s=`${r}-${t}`;const c=o.get(s)||new Map;if(o.set(s,c.set(n,e)),i){s=`${r}-${t}-${i}`;const l=o.get(s)||new Map;o.set(s,l.set(n,e))}}function Mr(t,e,n){t.clear(),e.clear();for(const o of n){const{source:r,target:i,sourceHandle:s=null,targetHandle:a=null}=o,c={edgeId:o.id,source:r,target:i,sourceHandle:s,targetHandle:a},l=`${r}-${s}--${i}-${a}`,f=`${i}-${a}--${r}-${s}`;co("source",c,f,t,r,s),co("target",c,l,t,i,a),e.set(o.id,o)}}function Ir(t,e){if(!t.parentId)return!1;const n=e.get(t.parentId);return n?n.selected?!0:Ir(n,e):!1}function uo(t,e,n){var r;let o=t;do{if((r=o==null?void 0:o.matches)!=null&&r.call(o,e))return!0;if(o===n)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function ul(t,e,n,o){const r=new Map;for(const[i,s]of t)if((s.selected||s.id===o)&&(!s.parentId||!Ir(s,t))&&(s.draggable||e&&typeof s.draggable>"u")){const a=t.get(i);a&&r.set(i,{id:i,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return r}function Qe({nodeId:t,dragItems:e,nodeLookup:n,dragging:o=!0}){var s,a,c;const r=[];for(const[l,f]of e){const u=(s=n.get(l))==null?void 0:s.internals.userNode;u&&r.push({...u,position:f.position,dragging:o})}if(!t)return[r[0],r];const i=(a=n.get(t))==null?void 0:a.internals.userNode;return[i?{...i,position:((c=e.get(t))==null?void 0:c.position)||i.position,dragging:o}:r[0],r]}function ll({dragItems:t,snapGrid:e,x:n,y:o}){const r=t.values().next().value;if(!r)return null;const i={x:n-r.distance.x,y:o-r.distance.y},s=ue(i,e);return{x:s.x-i.x,y:s.y-i.y}}function dl({onNodeMouseDown:t,getStoreItems:e,onDragStart:n,onDrag:o,onDragStop:r}){let i={x:null,y:null},s=0,a=new Map,c=!1,l={x:0,y:0},f=null,u=!1,d=null,h=!1,p=!1,v=null;function y({noDragClassName:_,handleSelector:g,domNode:x,isSelectable:N,nodeId:S,nodeClickDistance:k=0}){d=at(x);function T({x:z,y:V}){const{nodeLookup:w,nodeExtent:I,snapGrid:b,snapToGrid:A,nodeOrigin:C,onNodeDrag:E,onSelectionDrag:D,onError:R,updateNodePositions:H}=e();i={x:z,y:V};let O=!1;const j=a.size>1,X=j&&I?un(ce(a)):null,U=j&&A?ll({dragItems:a,snapGrid:b,x:z,y:V}):null;for(const[G,F]of a){if(!w.has(G))continue;let W={x:z-F.distance.x,y:V-F.distance.y};A&&(W=U?{x:Math.round(W.x+U.x),y:Math.round(W.y+U.y)}:ue(W,b));let Q=null;if(j&&I&&!F.extent&&X){const{positionAbsolute:q}=F.internals,et=q.x-X.x+I[0][0],nt=q.x+F.measured.width-X.x2+I[1][0],tt=q.y-X.y+I[0][1],st=q.y+F.measured.height-X.y2+I[1][1];Q=[[et,tt],[nt,st]]}const{position:Z,positionAbsolute:K}=fr({nodeId:G,nextPosition:W,nodeLookup:w,nodeExtent:Q||I,nodeOrigin:C,onError:R});O=O||F.position.x!==Z.x||F.position.y!==Z.y,F.position=Z,F.internals.positionAbsolute=K}if(p=p||O,!!O&&(H(a,!0),v&&(o||E||!S&&D))){const[G,F]=Qe({nodeId:S,dragItems:a,nodeLookup:w});o==null||o(v,a,G,F),E==null||E(v,G,F),S||D==null||D(v,F)}}async function $(){if(!f)return;const{transform:z,panBy:V,autoPanSpeed:w,autoPanOnNodeDrag:I}=e();if(!I){c=!1,cancelAnimationFrame(s);return}const[b,A]=gr(l,f,w);(b!==0||A!==0)&&(i.x=(i.x??0)-b/z[2],i.y=(i.y??0)-A/z[2],await V({x:b,y:A})&&T(i)),s=requestAnimationFrame($)}function B(z){var j;const{nodeLookup:V,multiSelectionActive:w,nodesDraggable:I,transform:b,snapGrid:A,snapToGrid:C,selectNodesOnDrag:E,onNodeDragStart:D,onSelectionDragStart:R,unselectNodesAndEdges:H}=e();u=!0,(!E||!N)&&!w&&S&&((j=V.get(S))!=null&&j.selected||H()),N&&E&&S&&(t==null||t(S));const O=Qt(z.sourceEvent,{transform:b,snapGrid:A,snapToGrid:C,containerBounds:f});if(i=O,a=ul(V,I,O,S),a.size>0&&(n||D||!S&&R)){const[X,U]=Qe({nodeId:S,dragItems:a,nodeLookup:V});n==null||n(z.sourceEvent,a,X,U),D==null||D(z.sourceEvent,X,U),S||R==null||R(z.sourceEvent,U)}}const M=Zo().clickDistance(k).on("start",z=>{const{domNode:V,nodeDragThreshold:w,transform:I,snapGrid:b,snapToGrid:A}=e();f=(V==null?void 0:V.getBoundingClientRect())||null,h=!1,p=!1,v=z.sourceEvent,w===0&&B(z),i=Qt(z.sourceEvent,{transform:I,snapGrid:b,snapToGrid:A,containerBounds:f}),l=dt(z.sourceEvent,f)}).on("drag",z=>{const{autoPanOnNodeDrag:V,transform:w,snapGrid:I,snapToGrid:b,nodeDragThreshold:A,nodeLookup:C}=e(),E=Qt(z.sourceEvent,{transform:w,snapGrid:I,snapToGrid:b,containerBounds:f});if(v=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||S&&!C.has(S))&&(h=!0),!h){if(!c&&V&&u&&(c=!0,$()),!u){const D=dt(z.sourceEvent,f),R=D.x-l.x,H=D.y-l.y;Math.sqrt(R*R+H*H)>A&&B(z)}(i.x!==E.xSnapped||i.y!==E.ySnapped)&&a&&u&&(l=dt(z.sourceEvent,f),T(E))}}).on("end",z=>{if(!(!u||h)&&(c=!1,u=!1,cancelAnimationFrame(s),a.size>0)){const{nodeLookup:V,updateNodePositions:w,onNodeDragStop:I,onSelectionDragStop:b}=e();if(p&&(w(a,!1),p=!1),r||I||!S&&b){const[A,C]=Qe({nodeId:S,dragItems:a,nodeLookup:V,dragging:!1});r==null||r(z.sourceEvent,a,A,C),I==null||I(z.sourceEvent,A,C),S||b==null||b(z.sourceEvent,C)}}}).filter(z=>{const V=z.target;return!z.button&&(!_||!uo(V,`.${_}`,x))&&(!g||uo(V,g,x))});d.call(M)}function m(){d==null||d.on(".drag",null)}return{update:y,destroy:m}}function fl(t,e,n){const o=[],r={x:t.x-n,y:t.y-n,width:n*2,height:n*2};for(const i of e.values())oe(r,Bt(i))>0&&o.push(i);return o}const hl=250;function gl(t,e,n,o){var a,c;let r=[],i=1/0;const s=fl(t,n,e+hl);for(const l of s){const f=[...((a=l.internals.handleBounds)==null?void 0:a.source)??[],...((c=l.internals.handleBounds)==null?void 0:c.target)??[]];for(const u of f){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;const{x:d,y:h}=kt(l,u,u.position,!0),p=Math.sqrt(Math.pow(d-t.x,2)+Math.pow(h-t.y,2));p>e||(p<i?(r=[{...u,x:d,y:h}],i=p):p===i&&r.push({...u,x:d,y:h}))}}if(!r.length)return null;if(r.length>1){const l=o.type==="source"?"target":"source";return r.find(f=>f.type===l)??r[0]}return r[0]}function Ar(t,e,n,o,r,i=!1){var l,f,u;const s=o.get(t);if(!s)return null;const a=r==="strict"?(l=s.internals.handleBounds)==null?void 0:l[e]:[...((f=s.internals.handleBounds)==null?void 0:f.source)??[],...((u=s.internals.handleBounds)==null?void 0:u.target)??[]],c=(n?a==null?void 0:a.find(d=>d.id===n):a==null?void 0:a[0])??null;return c&&i?{...c,...kt(s,c,c.position,!0)}:c}function kr(t,e){return t||(e!=null&&e.classList.contains("target")?"target":e!=null&&e.classList.contains("source")?"source":null)}function pl(t,e){let n=null;return e?n=!0:t&&!e&&(n=!1),n}const Pr=()=>!0;function ml(t,{connectionMode:e,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:i,isTarget:s,domNode:a,nodeLookup:c,lib:l,autoPanOnConnect:f,flowId:u,panBy:d,cancelConnection:h,onConnectStart:p,onConnect:v,onConnectEnd:y,isValidConnection:m=Pr,onReconnectEnd:_,updateConnection:g,getTransform:x,getFromHandle:N,autoPanSpeed:S,dragThreshold:k=1,handleDomNode:T}){const $=xr(t.target);let B=0,M;const{x:z,y:V}=dt(t),w=kr(i,T),I=a==null?void 0:a.getBoundingClientRect();let b=!1;if(!I||!w)return;const A=Ar(r,w,o,c,e);if(!A)return;let C=dt(t,I),E=!1,D=null,R=!1,H=null;function O(){if(!f||!I)return;const[Z,K]=gr(C,I,S);d({x:Z,y:K}),B=requestAnimationFrame(O)}const j={...A,nodeId:r,type:w,position:A.position},X=c.get(r);let G={inProgress:!0,isValid:null,from:kt(X,j,Y.Left,!0),fromHandle:j,fromPosition:j.position,fromNode:X,to:C,toHandle:null,toPosition:Zn[j.position],toNode:null,pointer:C};function F(){b=!0,g(G),p==null||p(t,{nodeId:r,handleId:o,handleType:w})}k===0&&F();function W(Z){if(!b){const{x:st,y:vt}=dt(Z),pt=st-z,Nt=vt-V;if(!(pt*pt+Nt*Nt>k*k))return;F()}if(!N()||!j){Q(Z);return}const K=x();C=dt(Z,I),M=gl(le(C,K,!1,[1,1]),n,c,j),E||(O(),E=!0);const q=$r(Z,{handle:M,connectionMode:e,fromNodeId:r,fromHandleId:o,fromType:s?"target":"source",isValidConnection:m,doc:$,lib:l,flowId:u,nodeLookup:c});H=q.handleDomNode,D=q.connection,R=pl(!!M,q.isValid);const et=c.get(r),nt=et?kt(et,j,Y.Left,!0):G.from,tt={...G,from:nt,isValid:R,to:q.toHandle&&R?ke({x:q.toHandle.x,y:q.toHandle.y},K):C,toHandle:q.toHandle,toPosition:R&&q.toHandle?q.toHandle.position:Zn[j.position],toNode:q.toHandle?c.get(q.toHandle.nodeId):null,pointer:C};g(tt),G=tt}function Q(Z){if(!("touches"in Z&&Z.touches.length>0)){if(b){(M||H)&&D&&R&&(v==null||v(D));const{inProgress:K,...q}=G,et={...q,toPosition:G.toHandle?G.toPosition:null};y==null||y(Z,et),i&&(_==null||_(Z,et))}h(),cancelAnimationFrame(B),E=!1,R=!1,D=null,H=null,$.removeEventListener("mousemove",W),$.removeEventListener("mouseup",Q),$.removeEventListener("touchmove",W),$.removeEventListener("touchend",Q)}}$.addEventListener("mousemove",W),$.addEventListener("mouseup",Q),$.addEventListener("touchmove",W),$.addEventListener("touchend",Q)}function $r(t,{handle:e,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:s,lib:a,flowId:c,isValidConnection:l=Pr,nodeLookup:f}){const u=i==="target",d=e?s.querySelector(`.${a}-flow__handle[data-id="${c}-${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`):null,{x:h,y:p}=dt(t),v=s.elementFromPoint(h,p),y=v!=null&&v.classList.contains(`${a}-flow__handle`)?v:d,m={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){const _=kr(void 0,y),g=y.getAttribute("data-nodeid"),x=y.getAttribute("data-handleid"),N=y.classList.contains("connectable"),S=y.classList.contains("connectableend");if(!g||!_)return m;const k={source:u?g:o,sourceHandle:u?x:r,target:u?o:g,targetHandle:u?r:x};m.connection=k;const $=N&&S&&(n===Rt.Strict?u&&_==="source"||!u&&_==="target":g!==o||x!==r);m.isValid=$&&l(k),m.toHandle=Ar(g,_,x,f,n,!0)}return m}const hn={onPointerDown:ml,isValid:$r};function yl({domNode:t,panZoom:e,getTransform:n,getViewScale:o}){const r=at(t);function i({translateExtent:a,width:c,height:l,zoomStep:f=1,pannable:u=!0,zoomable:d=!0,inversePan:h=!1}){const p=g=>{if(g.sourceEvent.type!=="wheel"||!e)return;const x=n(),N=g.sourceEvent.ctrlKey&&re()?10:1,S=-g.sourceEvent.deltaY*(g.sourceEvent.deltaMode===1?.05:g.sourceEvent.deltaMode?1:.002)*f,k=x[2]*Math.pow(2,S*N);e.scaleTo(k)};let v=[0,0];const y=g=>{(g.sourceEvent.type==="mousedown"||g.sourceEvent.type==="touchstart")&&(v=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY])},m=g=>{const x=n();if(g.sourceEvent.type!=="mousemove"&&g.sourceEvent.type!=="touchmove"||!e)return;const N=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY],S=[N[0]-v[0],N[1]-v[1]];v=N;const k=o()*Math.max(x[2],Math.log(x[2]))*(h?-1:1),T={x:x[0]-S[0]*k,y:x[1]-S[1]*k},$=[[0,0],[c,l]];e.setViewportConstrained({x:T.x,y:T.y,zoom:x[2]},$,a)},_=sr().on("start",y).on("zoom",u?m:null).on("zoom.wheel",d?p:null);r.call(_,{})}function s(){r.on("zoom",null)}return{update:i,destroy:s,pointer:ut}}const Be=t=>({x:t.x,y:t.y,zoom:t.k}),Je=({x:t,y:e,zoom:n})=>He.translate(t,e).scale(n),Tt=(t,e)=>t.target.closest(`.${e}`),Tr=(t,e)=>e===2&&Array.isArray(t)&&t.includes(2),xl=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,tn=(t,e=0,n=xl,o=()=>{})=>{const r=typeof e=="number"&&e>0;return r||o(),r?t.transition().duration(e).ease(n).on("end",o):t},zr=t=>{const e=t.ctrlKey&&re()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*e};function wl({zoomPanValues:t,noWheelClassName:e,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:a,onPanZoom:c,onPanZoomEnd:l}){return f=>{if(Tt(f,e))return f.ctrlKey&&f.preventDefault(),!1;f.preventDefault(),f.stopImmediatePropagation();const u=n.property("__zoom").k||1;if(f.ctrlKey&&s){const y=ut(f),m=zr(f),_=u*Math.pow(2,m);o.scaleTo(n,_,y,f);return}const d=f.deltaMode===1?20:1;let h=r===Mt.Vertical?0:f.deltaX*d,p=r===Mt.Horizontal?0:f.deltaY*d;!re()&&f.shiftKey&&r!==Mt.Vertical&&(h=f.deltaY*d,p=0),o.translateBy(n,-(h/u)*i,-(p/u)*i,{internal:!0});const v=Be(n.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(c==null||c(f,v),t.panScrollTimeout=setTimeout(()=>{l==null||l(f,v),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,a==null||a(f,v))}}function vl({noWheelClassName:t,preventScrolling:e,d3ZoomHandler:n}){return function(o,r){const i=o.type==="wheel",s=!e&&i&&!o.ctrlKey,a=Tt(o,t);if(o.ctrlKey&&i&&a&&o.preventDefault(),s||a)return null;o.preventDefault(),n.call(this,o,r)}}function _l({zoomPanValues:t,onDraggingChange:e,onPanZoomStart:n}){return o=>{var i,s,a;if((i=o.sourceEvent)!=null&&i.internal)return;const r=Be(o.transform);t.mouseButton=((s=o.sourceEvent)==null?void 0:s.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=r,((a=o.sourceEvent)==null?void 0:a.type)==="mousedown"&&e(!0),n&&(n==null||n(o.sourceEvent,r))}}function bl({zoomPanValues:t,panOnDrag:e,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return i=>{var s,a;t.usedRightMouseButton=!!(n&&Tr(e,t.mouseButton??0)),(s=i.sourceEvent)!=null&&s.sync||o([i.transform.x,i.transform.y,i.transform.k]),r&&!((a=i.sourceEvent)!=null&&a.internal)&&(r==null||r(i.sourceEvent,Be(i.transform)))}}function El({zoomPanValues:t,panOnDrag:e,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:i}){return s=>{var a;if(!((a=s.sourceEvent)!=null&&a.internal)&&(t.isZoomingOrPanning=!1,i&&Tr(e,t.mouseButton??0)&&!t.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),t.usedRightMouseButton=!1,o(!1),r)){const c=Be(s.transform);t.prevViewport=c,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{r==null||r(s.sourceEvent,c)},n?150:0)}}}function Sl({zoomActivationKeyPressed:t,zoomOnScroll:e,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:a,noPanClassName:c,lib:l,connectionInProgress:f}){return u=>{var y;const d=t||e,h=n&&u.ctrlKey,p=u.type==="wheel";if(u.button===1&&u.type==="mousedown"&&(Tt(u,`${l}-flow__node`)||Tt(u,`${l}-flow__edge`)))return!0;if(!o&&!d&&!r&&!i&&!n||s||f&&!p||Tt(u,a)&&p||Tt(u,c)&&(!p||r&&p&&!t)||!n&&u.ctrlKey&&p)return!1;if(!n&&u.type==="touchstart"&&((y=u.touches)==null?void 0:y.length)>1)return u.preventDefault(),!1;if(!d&&!r&&!h&&p||!o&&(u.type==="mousedown"||u.type==="touchstart")||Array.isArray(o)&&!o.includes(u.button)&&u.type==="mousedown")return!1;const v=Array.isArray(o)&&o.includes(u.button)||!u.button||u.button<=1;return(!u.ctrlKey||p)&&v}}function Nl({domNode:t,minZoom:e,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:a,onDraggingChange:c}){const l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},f=t.getBoundingClientRect(),u=sr().scaleExtent([e,n]).translateExtent(o),d=at(t).call(u);_({x:r.x,y:r.y,zoom:Vt(r.zoom,e,n)},[[0,0],[f.width,f.height]],o);const h=d.on("wheel.zoom"),p=d.on("dblclick.zoom");u.wheelDelta(zr);function v(M,z){return d?new Promise(V=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?qe:we).transform(tn(d,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>V(!0)),M)}):Promise.resolve(!1)}function y({noWheelClassName:M,noPanClassName:z,onPaneContextMenu:V,userSelectionActive:w,panOnScroll:I,panOnDrag:b,panOnScrollMode:A,panOnScrollSpeed:C,preventScrolling:E,zoomOnPinch:D,zoomOnScroll:R,zoomOnDoubleClick:H,zoomActivationKeyPressed:O,lib:j,onTransformChange:X,connectionInProgress:U,paneClickDistance:G,selectionOnDrag:F}){w&&!l.isZoomingOrPanning&&m();const W=I&&!O&&!w;u.clickDistance(F?1/0:!lt(G)||G<0?0:G);const Q=W?wl({zoomPanValues:l,noWheelClassName:M,d3Selection:d,d3Zoom:u,panOnScrollMode:A,panOnScrollSpeed:C,zoomOnPinch:D,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:a}):vl({noWheelClassName:M,preventScrolling:E,d3ZoomHandler:h});if(d.on("wheel.zoom",Q,{passive:!1}),!w){const K=_l({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:s});u.on("start",K);const q=bl({zoomPanValues:l,panOnDrag:b,onPaneContextMenu:!!V,onPanZoom:i,onTransformChange:X});u.on("zoom",q);const et=El({zoomPanValues:l,panOnDrag:b,panOnScroll:I,onPaneContextMenu:V,onPanZoomEnd:a,onDraggingChange:c});u.on("end",et)}const Z=Sl({zoomActivationKeyPressed:O,panOnDrag:b,zoomOnScroll:R,panOnScroll:I,zoomOnDoubleClick:H,zoomOnPinch:D,userSelectionActive:w,noPanClassName:z,noWheelClassName:M,lib:j,connectionInProgress:U});u.filter(Z),H?d.on("dblclick.zoom",p):d.on("dblclick.zoom",null)}function m(){u.on("zoom",null)}async function _(M,z,V){const w=Je(M),I=u==null?void 0:u.constrain()(w,z,V);return I&&await v(I),new Promise(b=>b(I))}async function g(M,z){const V=Je(M);return await v(V,z),new Promise(w=>w(V))}function x(M){if(d){const z=Je(M),V=d.property("__zoom");(V.k!==M.zoom||V.x!==M.x||V.y!==M.y)&&(u==null||u.transform(d,z,null,{sync:!0}))}}function N(){const M=d?ir(d.node()):{x:0,y:0,k:1};return{x:M.x,y:M.y,zoom:M.k}}function S(M,z){return d?new Promise(V=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?qe:we).scaleTo(tn(d,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>V(!0)),M)}):Promise.resolve(!1)}function k(M,z){return d?new Promise(V=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?qe:we).scaleBy(tn(d,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>V(!0)),M)}):Promise.resolve(!1)}function T(M){u==null||u.scaleExtent(M)}function $(M){u==null||u.translateExtent(M)}function B(M){const z=!lt(M)||M<0?0:M;u==null||u.clickDistance(z)}return{update:y,destroy:m,setViewport:g,setViewportConstrained:_,getViewport:N,scaleTo:S,scaleBy:k,setScaleExtent:T,setTranslateExtent:$,syncViewport:x,setClickDistance:B}}var Ot;(function(t){t.Line="line",t.Handle="handle"})(Ot||(Ot={}));function Cl({width:t,prevWidth:e,height:n,prevHeight:o,affectsX:r,affectsY:i}){const s=t-e,a=n-o,c=[s>0?1:s<0?-1:0,a>0?1:a<0?-1:0];return s&&r&&(c[0]=c[0]*-1),a&&i&&(c[1]=c[1]*-1),c}function lo(t){const e=t.includes("right")||t.includes("left"),n=t.includes("bottom")||t.includes("top"),o=t.includes("left"),r=t.includes("top");return{isHorizontal:e,isVertical:n,affectsX:o,affectsY:r}}function _t(t,e){return Math.max(0,e-t)}function bt(t,e){return Math.max(0,t-e)}function me(t,e,n){return Math.max(0,e-t,t-n)}function fo(t,e){return t?!e:e}function Ml(t,e,n,o,r,i,s,a){let{affectsX:c,affectsY:l}=e;const{isHorizontal:f,isVertical:u}=e,d=f&&u,{xSnapped:h,ySnapped:p}=n,{minWidth:v,maxWidth:y,minHeight:m,maxHeight:_}=o,{x:g,y:x,width:N,height:S,aspectRatio:k}=t;let T=Math.floor(f?h-t.pointerX:0),$=Math.floor(u?p-t.pointerY:0);const B=N+(c?-T:T),M=S+(l?-$:$),z=-i[0]*N,V=-i[1]*S;let w=me(B,v,y),I=me(M,m,_);if(s){let C=0,E=0;c&&T<0?C=_t(g+T+z,s[0][0]):!c&&T>0&&(C=bt(g+B+z,s[1][0])),l&&$<0?E=_t(x+$+V,s[0][1]):!l&&$>0&&(E=bt(x+M+V,s[1][1])),w=Math.max(w,C),I=Math.max(I,E)}if(a){let C=0,E=0;c&&T>0?C=bt(g+T,a[0][0]):!c&&T<0&&(C=_t(g+B,a[1][0])),l&&$>0?E=bt(x+$,a[0][1]):!l&&$<0&&(E=_t(x+M,a[1][1])),w=Math.max(w,C),I=Math.max(I,E)}if(r){if(f){const C=me(B/k,m,_)*k;if(w=Math.max(w,C),s){let E=0;!c&&!l||c&&!l&&d?E=bt(x+V+B/k,s[1][1])*k:E=_t(x+V+(c?T:-T)/k,s[0][1])*k,w=Math.max(w,E)}if(a){let E=0;!c&&!l||c&&!l&&d?E=_t(x+B/k,a[1][1])*k:E=bt(x+(c?T:-T)/k,a[0][1])*k,w=Math.max(w,E)}}if(u){const C=me(M*k,v,y)/k;if(I=Math.max(I,C),s){let E=0;!c&&!l||l&&!c&&d?E=bt(g+M*k+z,s[1][0])/k:E=_t(g+(l?$:-$)*k+z,s[0][0])/k,I=Math.max(I,E)}if(a){let E=0;!c&&!l||l&&!c&&d?E=_t(g+M*k,a[1][0])/k:E=bt(g+(l?$:-$)*k,a[0][0])/k,I=Math.max(I,E)}}}$=$+($<0?I:-I),T=T+(T<0?w:-w),r&&(d?B>M*k?$=(fo(c,l)?-T:T)/k:T=(fo(c,l)?-$:$)*k:f?($=T/k,l=c):(T=$*k,c=l));const b=c?g+T:g,A=l?x+$:x;return{width:N+(c?-T:T),height:S+(l?-$:$),x:i[0]*T*(c?-1:1)+b,y:i[1]*$*(l?-1:1)+A}}const Lr={width:0,height:0,x:0,y:0},Il={...Lr,pointerX:0,pointerY:0,aspectRatio:1};function Al(t){return[[0,0],[t.measured.width,t.measured.height]]}function kl(t,e,n){const o=e.position.x+t.position.x,r=e.position.y+t.position.y,i=t.measured.width??0,s=t.measured.height??0,a=n[0]*i,c=n[1]*s;return[[o-a,r-c],[o+i-a,r+s-c]]}function Pl({domNode:t,nodeId:e,getStoreItems:n,onChange:o,onEnd:r}){const i=at(t);let s={controlDirection:lo("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function a({controlPosition:l,boundaries:f,keepAspectRatio:u,resizeDirection:d,onResizeStart:h,onResize:p,onResizeEnd:v,shouldResize:y}){let m={...Lr},_={...Il};s={boundaries:f,resizeDirection:d,keepAspectRatio:u,controlDirection:lo(l)};let g,x=null,N=[],S,k,T,$=!1;const B=Zo().on("start",M=>{const{nodeLookup:z,transform:V,snapGrid:w,snapToGrid:I,nodeOrigin:b,paneDomNode:A}=n();if(g=z.get(e),!g)return;x=(A==null?void 0:A.getBoundingClientRect())??null;const{xSnapped:C,ySnapped:E}=Qt(M.sourceEvent,{transform:V,snapGrid:w,snapToGrid:I,containerBounds:x});m={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},_={...m,pointerX:C,pointerY:E,aspectRatio:m.width/m.height},S=void 0,g.parentId&&(g.extent==="parent"||g.expandParent)&&(S=z.get(g.parentId),k=S&&g.extent==="parent"?Al(S):void 0),N=[],T=void 0;for(const[D,R]of z)if(R.parentId===e&&(N.push({id:D,position:{...R.position},extent:R.extent}),R.extent==="parent"||R.expandParent)){const H=kl(R,g,R.origin??b);T?T=[[Math.min(H[0][0],T[0][0]),Math.min(H[0][1],T[0][1])],[Math.max(H[1][0],T[1][0]),Math.max(H[1][1],T[1][1])]]:T=H}h==null||h(M,{...m})}).on("drag",M=>{const{transform:z,snapGrid:V,snapToGrid:w,nodeOrigin:I}=n(),b=Qt(M.sourceEvent,{transform:z,snapGrid:V,snapToGrid:w,containerBounds:x}),A=[];if(!g)return;const{x:C,y:E,width:D,height:R}=m,H={},O=g.origin??I,{width:j,height:X,x:U,y:G}=Ml(_,s.controlDirection,b,s.boundaries,s.keepAspectRatio,O,k,T),F=j!==D,W=X!==R,Q=U!==C&&F,Z=G!==E&&W;if(!Q&&!Z&&!F&&!W)return;if((Q||Z||O[0]===1||O[1]===1)&&(H.x=Q?U:m.x,H.y=Z?G:m.y,m.x=H.x,m.y=H.y,N.length>0)){const nt=U-C,tt=G-E;for(const st of N)st.position={x:st.position.x-nt+O[0]*(j-D),y:st.position.y-tt+O[1]*(X-R)},A.push(st)}if((F||W)&&(H.width=F&&(!s.resizeDirection||s.resizeDirection==="horizontal")?j:m.width,H.height=W&&(!s.resizeDirection||s.resizeDirection==="vertical")?X:m.height,m.width=H.width,m.height=H.height),S&&g.expandParent){const nt=O[0]*(H.width??0);H.x&&H.x<nt&&(m.x=nt,_.x=_.x-(H.x-nt));const tt=O[1]*(H.height??0);H.y&&H.y<tt&&(m.y=tt,_.y=_.y-(H.y-tt))}const K=Cl({width:m.width,prevWidth:D,height:m.height,prevHeight:R,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),q={...m,direction:K};(y==null?void 0:y(M,q))!==!1&&($=!0,p==null||p(M,q),o(H,A))}).on("end",M=>{$&&(v==null||v(M,{...m}),r==null||r({...m}),$=!1)});i.call(B)}function c(){i.on(".drag",null)}return{update:a,destroy:c}}const $l={},ho=t=>{let e;const n=new Set,o=(f,u)=>{const d=typeof f=="function"?f(e):f;if(!Object.is(d,e)){const h=e;e=u??(typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(p=>p(e,h))}},r=()=>e,c={setState:o,getState:r,getInitialState:()=>l,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{($l?"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()}},l=e=t(o,r,c);return c},Tl=t=>t?ho(t):ho,{useDebugValue:zl}=Cs,{useSyncExternalStoreWithSelector:Ll}=Ns,Dl=t=>t;function Dr(t,e=Dl,n){const o=Ll(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return zl(o),o}const go=(t,e)=>{const n=Tl(t),o=(r,i=e)=>Dr(n,r,i);return Object.assign(o,n),o},Hl=(t,e)=>t?go(t,e):go;function ot(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[o,r]of t)if(!Object.is(r,e.get(o)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const o of t)if(!e.has(o))return!1;return!0}const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(e,o)||!Object.is(t[o],e[o]))return!1;return!0}const Fe=L.createContext(null),Rl=Fe.Provider,Hr=ht.error001();function J(t,e){const n=L.useContext(Fe);if(n===null)throw new Error(Hr);return Dr(n,t,e)}function rt(){const t=L.useContext(Fe);if(t===null)throw new Error(Hr);return L.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const po={display:"none"},Vl={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Rr="react-flow__node-desc",Vr="react-flow__edge-desc",Bl="react-flow__aria-live",Fl=t=>t.ariaLiveMessage,Ol=t=>t.ariaLabelConfig;function jl({rfId:t}){const e=J(Fl);return P.jsx("div",{id:`${Bl}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:Vl,children:e})}function Yl({rfId:t,disableKeyboardA11y:e}){const n=J(Ol);return P.jsxs(P.Fragment,{children:[P.jsx("div",{id:`${Rr}-${t}`,style:po,children:e?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),P.jsx("div",{id:`${Vr}-${t}`,style:po,children:n["edge.a11yDescription.default"]}),!e&&P.jsx(jl,{rfId:t})]})}const Oe=L.forwardRef(({position:t="top-left",children:e,className:n,style:o,...r},i)=>{const s=`${t}`.split("-");return P.jsx("div",{className:it(["react-flow__panel",n,...s]),style:o,ref:i,...r,children:e})});Oe.displayName="Panel";function Xl({proOptions:t,position:e="bottom-right"}){return t!=null&&t.hideAttribution?null:P.jsx(Oe,{position:e,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:P.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Wl=t=>{const e=[],n=[];for(const[,o]of t.nodeLookup)o.selected&&e.push(o.internals.userNode);for(const[,o]of t.edgeLookup)o.selected&&n.push(o);return{selectedNodes:e,selectedEdges:n}},ye=t=>t.id;function Gl(t,e){return ot(t.selectedNodes.map(ye),e.selectedNodes.map(ye))&&ot(t.selectedEdges.map(ye),e.selectedEdges.map(ye))}function ql({onSelectionChange:t}){const e=rt(),{selectedNodes:n,selectedEdges:o}=J(Wl,Gl);return L.useEffect(()=>{const r={nodes:n,edges:o};t==null||t(r),e.getState().onSelectionChangeHandlers.forEach(i=>i(r))},[n,o,t]),null}const Ul=t=>!!t.onSelectionChangeHandlers;function Kl({onSelectionChange:t}){const e=J(Ul);return t||e?P.jsx(ql,{onSelectionChange:t}):null}const gn=typeof window<"u"?L.useLayoutEffect:L.useEffect,Br=[0,0],Zl={x:0,y:0,zoom:1},Ql=["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"],mo=[...Ql,"rfId"],Jl=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),yo={translateExtent:ee,nodeOrigin:Br,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function td(t){const{setNodes:e,setEdges:n,setMinZoom:o,setMaxZoom:r,setTranslateExtent:i,setNodeExtent:s,reset:a,setDefaultNodesAndEdges:c}=J(Jl,ot),l=rt();gn(()=>(c(t.defaultNodes,t.defaultEdges),()=>{f.current=yo,a()}),[]);const f=L.useRef(yo);return gn(()=>{for(const u of mo){const d=t[u],h=f.current[u];d!==h&&(typeof t[u]>"u"||(u==="nodes"?e(d):u==="edges"?n(d):u==="minZoom"?o(d):u==="maxZoom"?r(d):u==="translateExtent"?i(d):u==="nodeExtent"?s(d):u==="ariaLabelConfig"?l.setState({ariaLabelConfig:ju(d)}):u==="fitView"?l.setState({fitViewQueued:d}):u==="fitViewOptions"?l.setState({fitViewOptions:d}):l.setState({[u]:d})))}f.current=t},mo.map(u=>t[u])),null}function xo(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function ed(t){var o;const[e,n]=L.useState(t==="system"?null:t);return L.useEffect(()=>{if(t!=="system"){n(t);return}const r=xo(),i=()=>n(r!=null&&r.matches?"dark":"light");return i(),r==null||r.addEventListener("change",i),()=>{r==null||r.removeEventListener("change",i)}},[t]),e!==null?e:(o=xo())!=null&&o.matches?"dark":"light"}const wo=typeof document<"u"?document:null;function ie(t=null,e={target:wo,actInsideInputWithModifier:!0}){const[n,o]=L.useState(!1),r=L.useRef(!1),i=L.useRef(new Set([])),[s,a]=L.useMemo(()=>{if(t!==null){const l=(Array.isArray(t)?t:[t]).filter(u=>typeof u=="string").map(u=>u.replace("+",`
|
|
10
|
+
`).replace(`
|
|
11
|
+
|
|
12
|
+
`,`
|
|
13
|
+
+`).split(`
|
|
14
|
+
`)),f=l.reduce((u,d)=>u.concat(...d),[]);return[l,f]}return[[],[]]},[t]);return L.useEffect(()=>{const c=(e==null?void 0:e.target)??wo,l=(e==null?void 0:e.actInsideInputWithModifier)??!0;if(t!==null){const f=h=>{var y,m;if(r.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!r.current||r.current&&!l)&&wr(h))return!1;const v=_o(h.code,a);if(i.current.add(h[v]),vo(s,i.current,!1)){const _=((m=(y=h.composedPath)==null?void 0:y.call(h))==null?void 0:m[0])||h.target,g=(_==null?void 0:_.nodeName)==="BUTTON"||(_==null?void 0:_.nodeName)==="A";e.preventDefault!==!1&&(r.current||!g)&&h.preventDefault(),o(!0)}},u=h=>{const p=_o(h.code,a);vo(s,i.current,!0)?(o(!1),i.current.clear()):i.current.delete(h[p]),h.key==="Meta"&&i.current.clear(),r.current=!1},d=()=>{i.current.clear(),o(!1)};return c==null||c.addEventListener("keydown",f),c==null||c.addEventListener("keyup",u),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{c==null||c.removeEventListener("keydown",f),c==null||c.removeEventListener("keyup",u),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[t,o]),n}function vo(t,e,n){return t.filter(o=>n||o.length===e.size).some(o=>o.every(r=>e.has(r)))}function _o(t,e){return e.includes(t)?"code":"key"}const nd=()=>{const t=rt();return L.useMemo(()=>({zoomIn:e=>{const{panZoom:n}=t.getState();return n?n.scaleBy(1.2,e):Promise.resolve(!1)},zoomOut:e=>{const{panZoom:n}=t.getState();return n?n.scaleBy(1/1.2,e):Promise.resolve(!1)},zoomTo:(e,n)=>{const{panZoom:o}=t.getState();return o?o.scaleTo(e,n):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(e,n)=>{const{transform:[o,r,i],panZoom:s}=t.getState();return s?(await s.setViewport({x:e.x??o,y:e.y??r,zoom:e.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[e,n,o]=t.getState().transform;return{x:e,y:n,zoom:o}},setCenter:async(e,n,o)=>t.getState().setCenter(e,n,o),fitBounds:async(e,n)=>{const{width:o,height:r,minZoom:i,maxZoom:s,panZoom:a}=t.getState(),c=En(e,o,r,i,s,(n==null?void 0:n.padding)??.1);return a?(await a.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(e,n={})=>{const{transform:o,snapGrid:r,snapToGrid:i,domNode:s}=t.getState();if(!s)return e;const{x:a,y:c}=s.getBoundingClientRect(),l={x:e.x-a,y:e.y-c},f=n.snapGrid??r,u=n.snapToGrid??i;return le(l,o,u,f)},flowToScreenPosition:e=>{const{transform:n,domNode:o}=t.getState();if(!o)return e;const{x:r,y:i}=o.getBoundingClientRect(),s=ke(e,n);return{x:s.x+r,y:s.y+i}}}),[])};function Fr(t,e){const n=[],o=new Map,r=[];for(const i of t)if(i.type==="add"){r.push(i);continue}else if(i.type==="remove"||i.type==="replace")o.set(i.id,[i]);else{const s=o.get(i.id);s?s.push(i):o.set(i.id,[i])}for(const i of e){const s=o.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 a={...i};for(const c of s)od(c,a);n.push(a)}return r.length&&r.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function od(t,e){switch(t.type){case"select":{e.selected=t.selected;break}case"position":{typeof t.position<"u"&&(e.position=t.position),typeof t.dragging<"u"&&(e.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(e.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(e.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(e.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(e.resizing=t.resizing);break}}}function Or(t,e){return Fr(t,e)}function jr(t,e){return Fr(t,e)}function Ct(t,e){return{id:t,type:"select",selected:e}}function zt(t,e=new Set,n=!1){const o=[];for(const[r,i]of t){const s=e.has(r);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),o.push(Ct(i.id,s)))}return o}function bo({items:t=[],lookup:e}){var r;const n=[],o=new Map(t.map(i=>[i.id,i]));for(const[i,s]of t.entries()){const a=e.get(s.id),c=((r=a==null?void 0:a.internals)==null?void 0:r.userNode)??a;c!==void 0&&c!==s&&n.push({id:s.id,item:s,type:"replace"}),c===void 0&&n.push({item:s,type:"add",index:i})}for(const[i]of e)o.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function Eo(t){return{id:t.id,type:"remove"}}const So=t=>Tu(t),rd=t=>dr(t);function Yr(t){return L.forwardRef(t)}function No(t){const[e,n]=L.useState(BigInt(0)),[o]=L.useState(()=>id(()=>n(r=>r+BigInt(1))));return gn(()=>{const r=o.get();r.length&&(t(r),o.reset())},[e]),o}function id(t){let e=[];return{get:()=>e,reset:()=>{e=[]},push:n=>{e.push(n),t()}}}const Xr=L.createContext(null);function sd({children:t}){const e=rt(),n=L.useCallback(a=>{const{nodes:c=[],setNodes:l,hasDefaultNodes:f,onNodesChange:u,nodeLookup:d,fitViewQueued:h,onNodesChangeMiddlewareMap:p}=e.getState();let v=c;for(const m of a)v=typeof m=="function"?m(v):m;let y=bo({items:v,lookup:d});for(const m of p.values())y=m(y);f&&l(v),y.length>0?u==null||u(y):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:m,nodes:_,setNodes:g}=e.getState();m&&g(_)})},[]),o=No(n),r=L.useCallback(a=>{const{edges:c=[],setEdges:l,hasDefaultEdges:f,onEdgesChange:u,edgeLookup:d}=e.getState();let h=c;for(const p of a)h=typeof p=="function"?p(h):p;f?l(h):u&&u(bo({items:h,lookup:d}))},[]),i=No(r),s=L.useMemo(()=>({nodeQueue:o,edgeQueue:i}),[]);return P.jsx(Xr.Provider,{value:s,children:t})}function ad(){const t=L.useContext(Xr);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const cd=t=>!!t.panZoom;function kn(){const t=nd(),e=rt(),n=ad(),o=J(cd),r=L.useMemo(()=>{const i=u=>e.getState().nodeLookup.get(u),s=u=>{n.nodeQueue.push(u)},a=u=>{n.edgeQueue.push(u)},c=u=>{var m,_;const{nodeLookup:d,nodeOrigin:h}=e.getState(),p=So(u)?u:d.get(u.id),v=p.parentId?yr(p.position,p.measured,p.parentId,d,h):p.position,y={...p,position:v,width:((m=p.measured)==null?void 0:m.width)??p.width,height:((_=p.measured)==null?void 0:_.height)??p.height};return Bt(y)},l=(u,d,h={replace:!1})=>{s(p=>p.map(v=>{if(v.id===u){const y=typeof d=="function"?d(v):d;return h.replace&&So(y)?y:{...v,...y}}return v}))},f=(u,d,h={replace:!1})=>{a(p=>p.map(v=>{if(v.id===u){const y=typeof d=="function"?d(v):d;return h.replace&&rd(y)?y:{...v,...y}}return v}))};return{getNodes:()=>e.getState().nodes.map(u=>({...u})),getNode:u=>{var d;return(d=i(u))==null?void 0:d.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:u=[]}=e.getState();return u.map(d=>({...d}))},getEdge:u=>e.getState().edgeLookup.get(u),setNodes:s,setEdges:a,addNodes:u=>{const d=Array.isArray(u)?u:[u];n.nodeQueue.push(h=>[...h,...d])},addEdges:u=>{const d=Array.isArray(u)?u:[u];n.edgeQueue.push(h=>[...h,...d])},toObject:()=>{const{nodes:u=[],edges:d=[],transform:h}=e.getState(),[p,v,y]=h;return{nodes:u.map(m=>({...m})),edges:d.map(m=>({...m})),viewport:{x:p,y:v,zoom:y}}},deleteElements:async({nodes:u=[],edges:d=[]})=>{const{nodes:h,edges:p,onNodesDelete:v,onEdgesDelete:y,triggerNodeChanges:m,triggerEdgeChanges:_,onDelete:g,onBeforeDelete:x}=e.getState(),{nodes:N,edges:S}=await Ru({nodesToRemove:u,edgesToRemove:d,nodes:h,edges:p,onBeforeDelete:x}),k=S.length>0,T=N.length>0;if(k){const $=S.map(Eo);y==null||y(S),_($)}if(T){const $=N.map(Eo);v==null||v(N),m($)}return(T||k)&&(g==null||g({nodes:N,edges:S})),{deletedNodes:N,deletedEdges:S}},getIntersectingNodes:(u,d=!0,h)=>{const p=Jn(u),v=p?u:c(u),y=h!==void 0;return v?(h||e.getState().nodes).filter(m=>{const _=e.getState().nodeLookup.get(m.id);if(_&&!p&&(m.id===u.id||!_.internals.positionAbsolute))return!1;const g=Bt(y?m:_),x=oe(g,v);return d&&x>0||x>=g.width*g.height||x>=v.width*v.height}):[]},isNodeIntersecting:(u,d,h=!0)=>{const v=Jn(u)?u:c(u);if(!v)return!1;const y=oe(v,d);return h&&y>0||y>=d.width*d.height||y>=v.width*v.height},updateNode:l,updateNodeData:(u,d,h={replace:!1})=>{l(u,p=>{const v=typeof d=="function"?d(p):d;return h.replace?{...p,data:v}:{...p,data:{...p.data,...v}}},h)},updateEdge:f,updateEdgeData:(u,d,h={replace:!1})=>{f(u,p=>{const v=typeof d=="function"?d(p):d;return h.replace?{...p,data:v}:{...p,data:{...p.data,...v}}},h)},getNodesBounds:u=>{const{nodeLookup:d,nodeOrigin:h}=e.getState();return zu(u,{nodeLookup:d,nodeOrigin:h})},getHandleConnections:({type:u,id:d,nodeId:h})=>{var p;return Array.from(((p=e.getState().connectionLookup.get(`${h}-${u}${d?`-${d}`:""}`))==null?void 0:p.values())??[])},getNodeConnections:({type:u,handleId:d,nodeId:h})=>{var p;return Array.from(((p=e.getState().connectionLookup.get(`${h}${u?d?`-${u}-${d}`:`-${u}`:""}`))==null?void 0:p.values())??[])},fitView:async u=>{const d=e.getState().fitViewResolver??Ou();return e.setState({fitViewQueued:!0,fitViewOptions:u,fitViewResolver:d}),n.nodeQueue.push(h=>[...h]),d.promise}}},[]);return L.useMemo(()=>({...r,...t,viewportInitialized:o}),[o])}const Co=t=>t.selected,ud=typeof window<"u"?window:void 0;function ld({deleteKeyCode:t,multiSelectionKeyCode:e}){const n=rt(),{deleteElements:o}=kn(),r=ie(t,{actInsideInputWithModifier:!1}),i=ie(e,{target:ud});L.useEffect(()=>{if(r){const{edges:s,nodes:a}=n.getState();o({nodes:a.filter(Co),edges:s.filter(Co)}),n.setState({nodesSelectionActive:!1})}},[r]),L.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function dd(t){const e=rt();L.useEffect(()=>{const n=()=>{var r,i,s,a;if(!t.current||!(((i=(r=t.current).checkVisibility)==null?void 0:i.call(r))??!0))return!1;const o=Sn(t.current);(o.height===0||o.width===0)&&((a=(s=e.getState()).onError)==null||a.call(s,"004",ht.error004())),e.setState({width:o.width||500,height:o.height||500})};if(t.current){n(),window.addEventListener("resize",n);const o=new ResizeObserver(()=>n());return o.observe(t.current),()=>{window.removeEventListener("resize",n),o&&t.current&&o.unobserve(t.current)}}},[])}const je={position:"absolute",width:"100%",height:"100%",top:0,left:0},fd=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function hd({onPaneContextMenu:t,zoomOnScroll:e=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:r=.5,panOnScrollMode:i=Mt.Free,zoomOnDoubleClick:s=!0,panOnDrag:a=!0,defaultViewport:c,translateExtent:l,minZoom:f,maxZoom:u,zoomActivationKeyCode:d,preventScrolling:h=!0,children:p,noWheelClassName:v,noPanClassName:y,onViewportChange:m,isControlledViewport:_,paneClickDistance:g,selectionOnDrag:x}){const N=rt(),S=L.useRef(null),{userSelectionActive:k,lib:T,connectionInProgress:$}=J(fd,ot),B=ie(d),M=L.useRef();dd(S);const z=L.useCallback(V=>{m==null||m({x:V[0],y:V[1],zoom:V[2]}),_||N.setState({transform:V})},[m,_]);return L.useEffect(()=>{if(S.current){M.current=Nl({domNode:S.current,minZoom:f,maxZoom:u,translateExtent:l,viewport:c,onDraggingChange:b=>N.setState(A=>A.paneDragging===b?A:{paneDragging:b}),onPanZoomStart:(b,A)=>{const{onViewportChangeStart:C,onMoveStart:E}=N.getState();E==null||E(b,A),C==null||C(A)},onPanZoom:(b,A)=>{const{onViewportChange:C,onMove:E}=N.getState();E==null||E(b,A),C==null||C(A)},onPanZoomEnd:(b,A)=>{const{onViewportChangeEnd:C,onMoveEnd:E}=N.getState();E==null||E(b,A),C==null||C(A)}});const{x:V,y:w,zoom:I}=M.current.getViewport();return N.setState({panZoom:M.current,transform:[V,w,I],domNode:S.current.closest(".react-flow")}),()=>{var b;(b=M.current)==null||b.destroy()}}},[]),L.useEffect(()=>{var V;(V=M.current)==null||V.update({onPaneContextMenu:t,zoomOnScroll:e,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:r,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:a,zoomActivationKeyPressed:B,preventScrolling:h,noPanClassName:y,userSelectionActive:k,noWheelClassName:v,lib:T,onTransformChange:z,connectionInProgress:$,selectionOnDrag:x,paneClickDistance:g})},[t,e,n,o,r,i,s,a,B,h,y,k,v,T,z,$,x,g]),P.jsx("div",{className:"react-flow__renderer",ref:S,style:je,children:p})}const gd=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function pd(){const{userSelectionActive:t,userSelectionRect:e}=J(gd,ot);return t&&e?P.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:e.width,height:e.height,transform:`translate(${e.x}px, ${e.y}px)`}}):null}const en=(t,e)=>n=>{n.target===e.current&&(t==null||t(n))},md=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function yd({isSelecting:t,selectionKeyPressed:e,selectionMode:n=ne.Full,panOnDrag:o,paneClickDistance:r,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:a,onPaneClick:c,onPaneContextMenu:l,onPaneScroll:f,onPaneMouseEnter:u,onPaneMouseMove:d,onPaneMouseLeave:h,children:p}){const v=rt(),{userSelectionActive:y,elementsSelectable:m,dragging:_,connectionInProgress:g}=J(md,ot),x=m&&(t||y),N=L.useRef(null),S=L.useRef(),k=L.useRef(new Set),T=L.useRef(new Set),$=L.useRef(!1),B=C=>{if($.current||g){$.current=!1;return}c==null||c(C),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},M=C=>{if(Array.isArray(o)&&(o!=null&&o.includes(2))){C.preventDefault();return}l==null||l(C)},z=f?C=>f(C):void 0,V=C=>{$.current&&(C.stopPropagation(),$.current=!1)},w=C=>{var X,U;const{domNode:E}=v.getState();if(S.current=E==null?void 0:E.getBoundingClientRect(),!S.current)return;const D=C.target===N.current;if(!D&&!!C.target.closest(".nokey")||!t||!(i&&D||e)||C.button!==0||!C.isPrimary)return;(U=(X=C.target)==null?void 0:X.setPointerCapture)==null||U.call(X,C.pointerId),$.current=!1;const{x:O,y:j}=dt(C.nativeEvent,S.current);v.setState({userSelectionRect:{width:0,height:0,startX:O,startY:j,x:O,y:j}}),D||(C.stopPropagation(),C.preventDefault())},I=C=>{const{userSelectionRect:E,transform:D,nodeLookup:R,edgeLookup:H,connectionLookup:O,triggerNodeChanges:j,triggerEdgeChanges:X,defaultEdgeOptions:U,resetSelectedElements:G}=v.getState();if(!S.current||!E)return;const{x:F,y:W}=dt(C.nativeEvent,S.current),{startX:Q,startY:Z}=E;if(!$.current){const tt=e?0:r;if(Math.hypot(F-Q,W-Z)<=tt)return;G(),s==null||s(C)}$.current=!0;const K={startX:Q,startY:Z,x:F<Q?F:Q,y:W<Z?W:Z,width:Math.abs(F-Q),height:Math.abs(W-Z)},q=k.current,et=T.current;k.current=new Set(bn(R,K,D,n===ne.Partial,!0).map(tt=>tt.id)),T.current=new Set;const nt=(U==null?void 0:U.selectable)??!0;for(const tt of k.current){const st=O.get(tt);if(st)for(const{edgeId:vt}of st.values()){const pt=H.get(vt);pt&&(pt.selectable??nt)&&T.current.add(vt)}}if(!to(q,k.current)){const tt=zt(R,k.current,!0);j(tt)}if(!to(et,T.current)){const tt=zt(H,T.current);X(tt)}v.setState({userSelectionRect:K,userSelectionActive:!0,nodesSelectionActive:!1})},b=C=>{var E,D;C.button===0&&((D=(E=C.target)==null?void 0:E.releasePointerCapture)==null||D.call(E,C.pointerId),!y&&C.target===N.current&&v.getState().userSelectionRect&&(B==null||B(C)),v.setState({userSelectionActive:!1,userSelectionRect:null}),$.current&&(a==null||a(C),v.setState({nodesSelectionActive:k.current.size>0})))},A=o===!0||Array.isArray(o)&&o.includes(0);return P.jsxs("div",{className:it(["react-flow__pane",{draggable:A,dragging:_,selection:t}]),onClick:x?void 0:en(B,N),onContextMenu:en(M,N),onWheel:en(z,N),onPointerEnter:x?void 0:u,onPointerMove:x?I:d,onPointerUp:x?b:void 0,onPointerDownCapture:x?w:void 0,onClickCapture:x?V:void 0,onPointerLeave:h,ref:N,style:je,children:[p,P.jsx(pd,{})]})}function pn({id:t,store:e,unselect:n=!1,nodeRef:o}){const{addSelectedNodes:r,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:a,onError:c}=e.getState(),l=a.get(t);if(!l){c==null||c("012",ht.error012(t));return}e.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&s)&&(i({nodes:[l],edges:[]}),requestAnimationFrame(()=>{var f;return(f=o==null?void 0:o.current)==null?void 0:f.blur()})):r([t])}function Wr({nodeRef:t,disabled:e=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:i,nodeClickDistance:s}){const a=rt(),[c,l]=L.useState(!1),f=L.useRef();return L.useEffect(()=>{f.current=dl({getStoreItems:()=>a.getState(),onNodeMouseDown:u=>{pn({id:u,store:a,nodeRef:t})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}})},[]),L.useEffect(()=>{if(!(e||!t.current||!f.current))return f.current.update({noDragClassName:n,handleSelector:o,domNode:t.current,isSelectable:i,nodeId:r,nodeClickDistance:s}),()=>{var u;(u=f.current)==null||u.destroy()}},[n,o,e,i,t,r,s]),c}const xd=t=>e=>e.selected&&(e.draggable||t&&typeof e.draggable>"u");function Gr(){const t=rt();return L.useCallback(n=>{const{nodeExtent:o,snapToGrid:r,snapGrid:i,nodesDraggable:s,onError:a,updateNodePositions:c,nodeLookup:l,nodeOrigin:f}=t.getState(),u=new Map,d=xd(s),h=r?i[0]:5,p=r?i[1]:5,v=n.direction.x*h*n.factor,y=n.direction.y*p*n.factor;for(const[,m]of l){if(!d(m))continue;let _={x:m.internals.positionAbsolute.x+v,y:m.internals.positionAbsolute.y+y};r&&(_=ue(_,i));const{position:g,positionAbsolute:x}=fr({nodeId:m.id,nextPosition:_,nodeLookup:l,nodeExtent:o,nodeOrigin:f,onError:a});m.position=g,m.internals.positionAbsolute=x,u.set(m.id,m)}c(u)},[])}const Pn=L.createContext(null),wd=Pn.Provider;Pn.Consumer;const qr=()=>L.useContext(Pn),vd=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),_d=(t,e,n)=>o=>{const{connectionClickStartHandle:r,connectionMode:i,connection:s}=o,{fromHandle:a,toHandle:c,isValid:l}=s,f=(c==null?void 0:c.nodeId)===t&&(c==null?void 0:c.id)===e&&(c==null?void 0:c.type)===n;return{connectingFrom:(a==null?void 0:a.nodeId)===t&&(a==null?void 0:a.id)===e&&(a==null?void 0:a.type)===n,connectingTo:f,clickConnecting:(r==null?void 0:r.nodeId)===t&&(r==null?void 0:r.id)===e&&(r==null?void 0:r.type)===n,isPossibleEndHandle:i===Rt.Strict?(a==null?void 0:a.type)!==n:t!==(a==null?void 0:a.nodeId)||e!==(a==null?void 0:a.id),connectionInProcess:!!a,clickConnectionInProcess:!!r,valid:f&&l}};function bd({type:t="source",position:e=Y.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:i=!0,id:s,onConnect:a,children:c,className:l,onMouseDown:f,onTouchStart:u,...d},h){var I,b;const p=s||null,v=t==="target",y=rt(),m=qr(),{connectOnClick:_,noPanClassName:g,rfId:x}=J(vd,ot),{connectingFrom:N,connectingTo:S,clickConnecting:k,isPossibleEndHandle:T,connectionInProcess:$,clickConnectionInProcess:B,valid:M}=J(_d(m,p,t),ot);m||(b=(I=y.getState()).onError)==null||b.call(I,"010",ht.error010());const z=A=>{const{defaultEdgeOptions:C,onConnect:E,hasDefaultEdges:D}=y.getState(),R={...C,...A};if(D){const{edges:H,setEdges:O}=y.getState();O(Uu(R,H))}E==null||E(R),a==null||a(R)},V=A=>{if(!m)return;const C=vr(A.nativeEvent);if(r&&(C&&A.button===0||!C)){const E=y.getState();hn.onPointerDown(A.nativeEvent,{handleDomNode:A.currentTarget,autoPanOnConnect:E.autoPanOnConnect,connectionMode:E.connectionMode,connectionRadius:E.connectionRadius,domNode:E.domNode,nodeLookup:E.nodeLookup,lib:E.lib,isTarget:v,handleId:p,nodeId:m,flowId:E.rfId,panBy:E.panBy,cancelConnection:E.cancelConnection,onConnectStart:E.onConnectStart,onConnectEnd:(...D)=>{var R,H;return(H=(R=y.getState()).onConnectEnd)==null?void 0:H.call(R,...D)},updateConnection:E.updateConnection,onConnect:z,isValidConnection:n||((...D)=>{var R,H;return((H=(R=y.getState()).isValidConnection)==null?void 0:H.call(R,...D))??!0}),getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,autoPanSpeed:E.autoPanSpeed,dragThreshold:E.connectionDragThreshold})}C?f==null||f(A):u==null||u(A)},w=A=>{const{onClickConnectStart:C,onClickConnectEnd:E,connectionClickStartHandle:D,connectionMode:R,isValidConnection:H,lib:O,rfId:j,nodeLookup:X,connection:U}=y.getState();if(!m||!D&&!r)return;if(!D){C==null||C(A.nativeEvent,{nodeId:m,handleId:p,handleType:t}),y.setState({connectionClickStartHandle:{nodeId:m,type:t,id:p}});return}const G=xr(A.target),F=n||H,{connection:W,isValid:Q}=hn.isValid(A.nativeEvent,{handle:{nodeId:m,id:p,type:t},connectionMode:R,fromNodeId:D.nodeId,fromHandleId:D.id||null,fromType:D.type,isValidConnection:F,flowId:j,doc:G,lib:O,nodeLookup:X});Q&&W&&z(W);const Z=structuredClone(U);delete Z.inProgress,Z.toPosition=Z.toHandle?Z.toHandle.position:null,E==null||E(A,Z),y.setState({connectionClickStartHandle:null})};return P.jsx("div",{"data-handleid":p,"data-nodeid":m,"data-handlepos":e,"data-id":`${x}-${m}-${p}-${t}`,className:it(["react-flow__handle",`react-flow__handle-${e}`,"nodrag",g,l,{source:!v,target:v,connectable:o,connectablestart:r,connectableend:i,clickconnecting:k,connectingfrom:N,connectingto:S,valid:M,connectionindicator:o&&(!$||T)&&($||B?i:r)}]),onMouseDown:V,onTouchStart:V,onClick:_?w:void 0,ref:h,...d,children:c})}const Pe=L.memo(Yr(bd));function Ed({data:t,isConnectable:e,sourcePosition:n=Y.Bottom}){return P.jsxs(P.Fragment,{children:[t==null?void 0:t.label,P.jsx(Pe,{type:"source",position:n,isConnectable:e})]})}function Sd({data:t,isConnectable:e,targetPosition:n=Y.Top,sourcePosition:o=Y.Bottom}){return P.jsxs(P.Fragment,{children:[P.jsx(Pe,{type:"target",position:n,isConnectable:e}),t==null?void 0:t.label,P.jsx(Pe,{type:"source",position:o,isConnectable:e})]})}function Nd(){return null}function Cd({data:t,isConnectable:e,targetPosition:n=Y.Top}){return P.jsxs(P.Fragment,{children:[P.jsx(Pe,{type:"target",position:n,isConnectable:e}),t==null?void 0:t.label]})}const $e={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Mo={input:Ed,default:Sd,output:Cd,group:Nd};function Md(t){var e,n,o,r;return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??((e=t.style)==null?void 0:e.width),height:t.height??t.initialHeight??((n=t.style)==null?void 0:n.height)}:{width:t.width??((o=t.style)==null?void 0:o.width),height:t.height??((r=t.style)==null?void 0:r.height)}}const Id=t=>{const{width:e,height:n,x:o,y:r}=ce(t.nodeLookup,{filter:i=>!!i.selected});return{width:lt(e)?e:null,height:lt(n)?n:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${o}px,${r}px)`}};function Ad({onSelectionContextMenu:t,noPanClassName:e,disableKeyboardA11y:n}){const o=rt(),{width:r,height:i,transformString:s,userSelectionActive:a}=J(Id,ot),c=Gr(),l=L.useRef(null);L.useEffect(()=>{var h;n||(h=l.current)==null||h.focus({preventScroll:!0})},[n]);const f=!a&&r!==null&&i!==null;if(Wr({nodeRef:l,disabled:!f}),!f)return null;const u=t?h=>{const p=o.getState().nodes.filter(v=>v.selected);t(h,p)}:void 0,d=h=>{Object.prototype.hasOwnProperty.call($e,h.key)&&(h.preventDefault(),c({direction:$e[h.key],factor:h.shiftKey?4:1}))};return P.jsx("div",{className:it(["react-flow__nodesselection","react-flow__container",e]),style:{transform:s},children:P.jsx("div",{ref:l,className:"react-flow__nodesselection-rect",onContextMenu:u,tabIndex:n?void 0:-1,onKeyDown:n?void 0:d,style:{width:r,height:i}})})}const Io=typeof window<"u"?window:void 0,kd=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function Ur({children:t,onPaneClick:e,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:a,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:f,selectionMode:u,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:p,panActivationKeyCode:v,zoomActivationKeyCode:y,elementsSelectable:m,zoomOnScroll:_,zoomOnPinch:g,panOnScroll:x,panOnScrollSpeed:N,panOnScrollMode:S,zoomOnDoubleClick:k,panOnDrag:T,defaultViewport:$,translateExtent:B,minZoom:M,maxZoom:z,preventScrolling:V,onSelectionContextMenu:w,noWheelClassName:I,noPanClassName:b,disableKeyboardA11y:A,onViewportChange:C,isControlledViewport:E}){const{nodesSelectionActive:D,userSelectionActive:R}=J(kd,ot),H=ie(l,{target:Io}),O=ie(v,{target:Io}),j=O||T,X=O||x,U=f&&j!==!0,G=H||R||U;return ld({deleteKeyCode:c,multiSelectionKeyCode:p}),P.jsx(hd,{onPaneContextMenu:i,elementsSelectable:m,zoomOnScroll:_,zoomOnPinch:g,panOnScroll:X,panOnScrollSpeed:N,panOnScrollMode:S,zoomOnDoubleClick:k,panOnDrag:!H&&j,defaultViewport:$,translateExtent:B,minZoom:M,maxZoom:z,zoomActivationKeyCode:y,preventScrolling:V,noWheelClassName:I,noPanClassName:b,onViewportChange:C,isControlledViewport:E,paneClickDistance:a,selectionOnDrag:U,children:P.jsxs(yd,{onSelectionStart:d,onSelectionEnd:h,onPaneClick:e,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:j,isSelecting:!!G,selectionMode:u,selectionKeyPressed:H,paneClickDistance:a,selectionOnDrag:U,children:[t,D&&P.jsx(Ad,{onSelectionContextMenu:w,noPanClassName:b,disableKeyboardA11y:A})]})})}Ur.displayName="FlowRenderer";const Pd=L.memo(Ur),$d=t=>e=>t?bn(e.nodeLookup,{x:0,y:0,width:e.width,height:e.height},e.transform,!0).map(n=>n.id):Array.from(e.nodeLookup.keys());function Td(t){return J(L.useCallback($d(t),[t]),ot)}const zd=t=>t.updateNodeInternals;function Ld(){const t=J(zd),[e]=L.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const o=new Map;n.forEach(r=>{const i=r.target.getAttribute("data-id");o.set(i,{id:i,nodeElement:r.target,force:!0})}),t(o)}));return L.useEffect(()=>()=>{e==null||e.disconnect()},[e]),e}function Dd({node:t,nodeType:e,hasDimensions:n,resizeObserver:o}){const r=rt(),i=L.useRef(null),s=L.useRef(null),a=L.useRef(t.sourcePosition),c=L.useRef(t.targetPosition),l=L.useRef(e),f=n&&!!t.internals.handleBounds;return L.useEffect(()=>{i.current&&!t.hidden&&(!f||s.current!==i.current)&&(s.current&&(o==null||o.unobserve(s.current)),o==null||o.observe(i.current),s.current=i.current)},[f,t.hidden]),L.useEffect(()=>()=>{s.current&&(o==null||o.unobserve(s.current),s.current=null)},[]),L.useEffect(()=>{if(i.current){const u=l.current!==e,d=a.current!==t.sourcePosition,h=c.current!==t.targetPosition;(u||d||h)&&(l.current=e,a.current=t.sourcePosition,c.current=t.targetPosition,r.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:i.current,force:!0}]])))}},[t.id,e,t.sourcePosition,t.targetPosition]),i}function Hd({id:t,onClick:e,onMouseEnter:n,onMouseMove:o,onMouseLeave:r,onContextMenu:i,onDoubleClick:s,nodesDraggable:a,elementsSelectable:c,nodesConnectable:l,nodesFocusable:f,resizeObserver:u,noDragClassName:d,noPanClassName:h,disableKeyboardA11y:p,rfId:v,nodeTypes:y,nodeClickDistance:m,onError:_}){const{node:g,internals:x,isParent:N}=J(F=>{const W=F.nodeLookup.get(t),Q=F.parentLookup.has(t);return{node:W,internals:W.internals,isParent:Q}},ot);let S=g.type||"default",k=(y==null?void 0:y[S])||Mo[S];k===void 0&&(_==null||_("003",ht.error003(S)),S="default",k=(y==null?void 0:y.default)||Mo.default);const T=!!(g.draggable||a&&typeof g.draggable>"u"),$=!!(g.selectable||c&&typeof g.selectable>"u"),B=!!(g.connectable||l&&typeof g.connectable>"u"),M=!!(g.focusable||f&&typeof g.focusable>"u"),z=rt(),V=mr(g),w=Dd({node:g,nodeType:S,hasDimensions:V,resizeObserver:u}),I=Wr({nodeRef:w,disabled:g.hidden||!T,noDragClassName:d,handleSelector:g.dragHandle,nodeId:t,isSelectable:$,nodeClickDistance:m}),b=Gr();if(g.hidden)return null;const A=wt(g),C=Md(g),E=$||T||e||n||o||r,D=n?F=>n(F,{...x.userNode}):void 0,R=o?F=>o(F,{...x.userNode}):void 0,H=r?F=>r(F,{...x.userNode}):void 0,O=i?F=>i(F,{...x.userNode}):void 0,j=s?F=>s(F,{...x.userNode}):void 0,X=F=>{const{selectNodesOnDrag:W,nodeDragThreshold:Q}=z.getState();$&&(!W||!T||Q>0)&&pn({id:t,store:z,nodeRef:w}),e&&e(F,{...x.userNode})},U=F=>{if(!(wr(F.nativeEvent)||p)){if(ar.includes(F.key)&&$){const W=F.key==="Escape";pn({id:t,store:z,unselect:W,nodeRef:w})}else if(T&&g.selected&&Object.prototype.hasOwnProperty.call($e,F.key)){F.preventDefault();const{ariaLabelConfig:W}=z.getState();z.setState({ariaLiveMessage:W["node.a11yDescription.ariaLiveMessage"]({direction:F.key.replace("Arrow","").toLowerCase(),x:~~x.positionAbsolute.x,y:~~x.positionAbsolute.y})}),b({direction:$e[F.key],factor:F.shiftKey?4:1})}}},G=()=>{var et;if(p||!((et=w.current)!=null&&et.matches(":focus-visible")))return;const{transform:F,width:W,height:Q,autoPanOnNodeFocus:Z,setCenter:K}=z.getState();if(!Z)return;bn(new Map([[t,g]]),{x:0,y:0,width:W,height:Q},F,!0).length>0||K(g.position.x+A.width/2,g.position.y+A.height/2,{zoom:F[2]})};return P.jsx("div",{className:it(["react-flow__node",`react-flow__node-${S}`,{[h]:T},g.className,{selected:g.selected,selectable:$,parent:N,draggable:T,dragging:I}]),ref:w,style:{zIndex:x.z,transform:`translate(${x.positionAbsolute.x}px,${x.positionAbsolute.y}px)`,pointerEvents:E?"all":"none",visibility:V?"visible":"hidden",...g.style,...C},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:D,onMouseMove:R,onMouseLeave:H,onContextMenu:O,onClick:X,onDoubleClick:j,onKeyDown:M?U:void 0,tabIndex:M?0:void 0,onFocus:M?G:void 0,role:g.ariaRole??(M?"group":void 0),"aria-roledescription":"node","aria-describedby":p?void 0:`${Rr}-${v}`,"aria-label":g.ariaLabel,...g.domAttributes,children:P.jsx(wd,{value:t,children:P.jsx(k,{id:t,data:g.data,type:S,positionAbsoluteX:x.positionAbsolute.x,positionAbsoluteY:x.positionAbsolute.y,selected:g.selected??!1,selectable:$,draggable:T,deletable:g.deletable??!0,isConnectable:B,sourcePosition:g.sourcePosition,targetPosition:g.targetPosition,dragging:I,dragHandle:g.dragHandle,zIndex:x.z,parentId:g.parentId,...A})})})}var Rd=L.memo(Hd);const Vd=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function Kr(t){const{nodesDraggable:e,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,onError:i}=J(Vd,ot),s=Td(t.onlyRenderVisibleElements),a=Ld();return P.jsx("div",{className:"react-flow__nodes",style:je,children:s.map(c=>P.jsx(Rd,{id:c,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:a,nodesDraggable:e,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,nodeClickDistance:t.nodeClickDistance,onError:i},c))})}Kr.displayName="NodeRenderer";const Bd=L.memo(Kr);function Fd(t){return J(L.useCallback(n=>{if(!t)return n.edges.map(r=>r.id);const o=[];if(n.width&&n.height)for(const r of n.edges){const i=n.nodeLookup.get(r.source),s=n.nodeLookup.get(r.target);i&&s&&Wu({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&o.push(r.id)}return o},[t]),ot)}const Od=({color:t="none",strokeWidth:e=1})=>{const n={strokeWidth:e,...t&&{stroke:t}};return P.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},jd=({color:t="none",strokeWidth:e=1})=>{const n={strokeWidth:e,...t&&{stroke:t,fill:t}};return P.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Ao={[Ie.Arrow]:Od,[Ie.ArrowClosed]:jd};function Yd(t){const e=rt();return L.useMemo(()=>{var r,i;return Object.prototype.hasOwnProperty.call(Ao,t)?Ao[t]:((i=(r=e.getState()).onError)==null||i.call(r,"009",ht.error009(t)),null)},[t])}const Xd=({id:t,type:e,color:n,width:o=12.5,height:r=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:a="auto-start-reverse"})=>{const c=Yd(e);return c?P.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:a,refX:"0",refY:"0",children:P.jsx(c,{color:n,strokeWidth:s})}):null},Zr=({defaultColor:t,rfId:e})=>{const n=J(i=>i.edges),o=J(i=>i.defaultEdgeOptions),r=L.useMemo(()=>tl(n,{id:e,defaultColor:t,defaultMarkerStart:o==null?void 0:o.markerStart,defaultMarkerEnd:o==null?void 0:o.markerEnd}),[n,o,e,t]);return r.length?P.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:P.jsx("defs",{children:r.map(i=>P.jsx(Xd,{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};Zr.displayName="MarkerDefinitions";var Wd=L.memo(Zr);function Qr({x:t,y:e,label:n,labelStyle:o,labelShowBg:r=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:a=2,children:c,className:l,...f}){const[u,d]=L.useState({x:1,y:0,width:0,height:0}),h=it(["react-flow__edge-textwrapper",l]),p=L.useRef(null);return L.useEffect(()=>{if(p.current){const v=p.current.getBBox();d({x:v.x,y:v.y,width:v.width,height:v.height})}},[n]),n?P.jsxs("g",{transform:`translate(${t-u.width/2} ${e-u.height/2})`,className:h,visibility:u.width?"visible":"hidden",...f,children:[r&&P.jsx("rect",{width:u.width+2*s[0],x:-s[0],y:-s[1],height:u.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:a,ry:a}),P.jsx("text",{className:"react-flow__edge-text",y:u.height/2,dy:"0.3em",ref:p,style:o,children:n}),c]}):null}Qr.displayName="EdgeText";const Gd=L.memo(Qr);function Ye({path:t,labelX:e,labelY:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:c,interactionWidth:l=20,...f}){return P.jsxs(P.Fragment,{children:[P.jsx("path",{...f,d:t,fill:"none",className:it(["react-flow__edge-path",f.className])}),l?P.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:l,className:"react-flow__edge-interaction"}):null,o&<(e)&<(n)?P.jsx(Gd,{x:e,y:n,label:o,labelStyle:r,labelShowBg:i,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:c}):null]})}function ko({pos:t,x1:e,y1:n,x2:o,y2:r}){return t===Y.Left||t===Y.Right?[.5*(e+o),n]:[e,.5*(n+r)]}function Jr({sourceX:t,sourceY:e,sourcePosition:n=Y.Bottom,targetX:o,targetY:r,targetPosition:i=Y.Top}){const[s,a]=ko({pos:n,x1:t,y1:e,x2:o,y2:r}),[c,l]=ko({pos:i,x1:o,y1:r,x2:t,y2:e}),[f,u,d,h]=_r({sourceX:t,sourceY:e,targetX:o,targetY:r,sourceControlX:s,sourceControlY:a,targetControlX:c,targetControlY:l});return[`M${t},${e} C${s},${a} ${c},${l} ${o},${r}`,f,u,d,h]}function ti(t){return L.memo(({id:e,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:s,targetPosition:a,label:c,labelStyle:l,labelShowBg:f,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:v,markerStart:y,interactionWidth:m})=>{const[_,g,x]=Jr({sourceX:n,sourceY:o,sourcePosition:s,targetX:r,targetY:i,targetPosition:a}),N=t.isInternal?void 0:e;return P.jsx(Ye,{id:N,path:_,labelX:g,labelY:x,label:c,labelStyle:l,labelShowBg:f,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:v,markerStart:y,interactionWidth:m})})}const qd=ti({isInternal:!1}),ei=ti({isInternal:!0});qd.displayName="SimpleBezierEdge";ei.displayName="SimpleBezierEdgeInternal";function ni(t){return L.memo(({id:e,sourceX:n,sourceY:o,targetX:r,targetY:i,label:s,labelStyle:a,labelShowBg:c,labelBgStyle:l,labelBgPadding:f,labelBgBorderRadius:u,style:d,sourcePosition:h=Y.Bottom,targetPosition:p=Y.Top,markerEnd:v,markerStart:y,pathOptions:m,interactionWidth:_})=>{const[g,x,N]=ln({sourceX:n,sourceY:o,sourcePosition:h,targetX:r,targetY:i,targetPosition:p,borderRadius:m==null?void 0:m.borderRadius,offset:m==null?void 0:m.offset,stepPosition:m==null?void 0:m.stepPosition}),S=t.isInternal?void 0:e;return P.jsx(Ye,{id:S,path:g,labelX:x,labelY:N,label:s,labelStyle:a,labelShowBg:c,labelBgStyle:l,labelBgPadding:f,labelBgBorderRadius:u,style:d,markerEnd:v,markerStart:y,interactionWidth:_})})}const oi=ni({isInternal:!1}),ri=ni({isInternal:!0});oi.displayName="SmoothStepEdge";ri.displayName="SmoothStepEdgeInternal";function ii(t){return L.memo(({id:e,...n})=>{var r;const o=t.isInternal?void 0:e;return P.jsx(oi,{...n,id:o,pathOptions:L.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(r=n.pathOptions)==null?void 0:r.offset])})})}const Ud=ii({isInternal:!1}),si=ii({isInternal:!0});Ud.displayName="StepEdge";si.displayName="StepEdgeInternal";function ai(t){return L.memo(({id:e,sourceX:n,sourceY:o,targetX:r,targetY:i,label:s,labelStyle:a,labelShowBg:c,labelBgStyle:l,labelBgPadding:f,labelBgBorderRadius:u,style:d,markerEnd:h,markerStart:p,interactionWidth:v})=>{const[y,m,_]=Sr({sourceX:n,sourceY:o,targetX:r,targetY:i}),g=t.isInternal?void 0:e;return P.jsx(Ye,{id:g,path:y,labelX:m,labelY:_,label:s,labelStyle:a,labelShowBg:c,labelBgStyle:l,labelBgPadding:f,labelBgBorderRadius:u,style:d,markerEnd:h,markerStart:p,interactionWidth:v})})}const Kd=ai({isInternal:!1}),ci=ai({isInternal:!0});Kd.displayName="StraightEdge";ci.displayName="StraightEdgeInternal";function ui(t){return L.memo(({id:e,sourceX:n,sourceY:o,targetX:r,targetY:i,sourcePosition:s=Y.Bottom,targetPosition:a=Y.Top,label:c,labelStyle:l,labelShowBg:f,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:v,markerStart:y,pathOptions:m,interactionWidth:_})=>{const[g,x,N]=br({sourceX:n,sourceY:o,sourcePosition:s,targetX:r,targetY:i,targetPosition:a,curvature:m==null?void 0:m.curvature}),S=t.isInternal?void 0:e;return P.jsx(Ye,{id:S,path:g,labelX:x,labelY:N,label:c,labelStyle:l,labelShowBg:f,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:v,markerStart:y,interactionWidth:_})})}const Zd=ui({isInternal:!1}),li=ui({isInternal:!0});Zd.displayName="BezierEdge";li.displayName="BezierEdgeInternal";const Po={default:li,straight:ci,step:si,smoothstep:ri,simplebezier:ei},$o={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Qd=(t,e,n)=>n===Y.Left?t-e:n===Y.Right?t+e:t,Jd=(t,e,n)=>n===Y.Top?t-e:n===Y.Bottom?t+e:t,To="react-flow__edgeupdater";function zo({position:t,centerX:e,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:i,onMouseOut:s,type:a}){return P.jsx("circle",{onMouseDown:r,onMouseEnter:i,onMouseOut:s,className:it([To,`${To}-${a}`]),cx:Qd(e,o,t),cy:Jd(n,o,t),r:o,stroke:"transparent",fill:"transparent"})}function tf({isReconnectable:t,reconnectRadius:e,edge:n,sourceX:o,sourceY:r,targetX:i,targetY:s,sourcePosition:a,targetPosition:c,onReconnect:l,onReconnectStart:f,onReconnectEnd:u,setReconnecting:d,setUpdateHover:h}){const p=rt(),v=(x,N)=>{if(x.button!==0)return;const{autoPanOnConnect:S,domNode:k,connectionMode:T,connectionRadius:$,lib:B,onConnectStart:M,cancelConnection:z,nodeLookup:V,rfId:w,panBy:I,updateConnection:b}=p.getState(),A=N.type==="target",C=(R,H)=>{d(!1),u==null||u(R,n,N.type,H)},E=R=>l==null?void 0:l(n,R),D=(R,H)=>{d(!0),f==null||f(x,n,N.type),M==null||M(R,H)};hn.onPointerDown(x.nativeEvent,{autoPanOnConnect:S,connectionMode:T,connectionRadius:$,domNode:k,handleId:N.id,nodeId:N.nodeId,nodeLookup:V,isTarget:A,edgeUpdaterType:N.type,lib:B,flowId:w,cancelConnection:z,panBy:I,isValidConnection:(...R)=>{var H,O;return((O=(H=p.getState()).isValidConnection)==null?void 0:O.call(H,...R))??!0},onConnect:E,onConnectStart:D,onConnectEnd:(...R)=>{var H,O;return(O=(H=p.getState()).onConnectEnd)==null?void 0:O.call(H,...R)},onReconnectEnd:C,updateConnection:b,getTransform:()=>p.getState().transform,getFromHandle:()=>p.getState().connection.fromHandle,dragThreshold:p.getState().connectionDragThreshold,handleDomNode:x.currentTarget})},y=x=>v(x,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),m=x=>v(x,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),_=()=>h(!0),g=()=>h(!1);return P.jsxs(P.Fragment,{children:[(t===!0||t==="source")&&P.jsx(zo,{position:a,centerX:o,centerY:r,radius:e,onMouseDown:y,onMouseEnter:_,onMouseOut:g,type:"source"}),(t===!0||t==="target")&&P.jsx(zo,{position:c,centerX:i,centerY:s,radius:e,onMouseDown:m,onMouseEnter:_,onMouseOut:g,type:"target"})]})}function ef({id:t,edgesFocusable:e,edgesReconnectable:n,elementsSelectable:o,onClick:r,onDoubleClick:i,onContextMenu:s,onMouseEnter:a,onMouseMove:c,onMouseLeave:l,reconnectRadius:f,onReconnect:u,onReconnectStart:d,onReconnectEnd:h,rfId:p,edgeTypes:v,noPanClassName:y,onError:m,disableKeyboardA11y:_}){let g=J(K=>K.edgeLookup.get(t));const x=J(K=>K.defaultEdgeOptions);g=x?{...x,...g}:g;let N=g.type||"default",S=(v==null?void 0:v[N])||Po[N];S===void 0&&(m==null||m("011",ht.error011(N)),N="default",S=(v==null?void 0:v.default)||Po.default);const k=!!(g.focusable||e&&typeof g.focusable>"u"),T=typeof u<"u"&&(g.reconnectable||n&&typeof g.reconnectable>"u"),$=!!(g.selectable||o&&typeof g.selectable>"u"),B=L.useRef(null),[M,z]=L.useState(!1),[V,w]=L.useState(!1),I=rt(),{zIndex:b,sourceX:A,sourceY:C,targetX:E,targetY:D,sourcePosition:R,targetPosition:H}=J(L.useCallback(K=>{const q=K.nodeLookup.get(g.source),et=K.nodeLookup.get(g.target);if(!q||!et)return{zIndex:g.zIndex,...$o};const nt=Ju({id:t,sourceNode:q,targetNode:et,sourceHandle:g.sourceHandle||null,targetHandle:g.targetHandle||null,connectionMode:K.connectionMode,onError:m});return{zIndex:Xu({selected:g.selected,zIndex:g.zIndex,sourceNode:q,targetNode:et,elevateOnSelect:K.elevateEdgesOnSelect,zIndexMode:K.zIndexMode}),...nt||$o}},[g.source,g.target,g.sourceHandle,g.targetHandle,g.selected,g.zIndex]),ot),O=L.useMemo(()=>g.markerStart?`url('#${dn(g.markerStart,p)}')`:void 0,[g.markerStart,p]),j=L.useMemo(()=>g.markerEnd?`url('#${dn(g.markerEnd,p)}')`:void 0,[g.markerEnd,p]);if(g.hidden||A===null||C===null||E===null||D===null)return null;const X=K=>{var tt;const{addSelectedEdges:q,unselectNodesAndEdges:et,multiSelectionActive:nt}=I.getState();$&&(I.setState({nodesSelectionActive:!1}),g.selected&&nt?(et({nodes:[],edges:[g]}),(tt=B.current)==null||tt.blur()):q([t])),r&&r(K,g)},U=i?K=>{i(K,{...g})}:void 0,G=s?K=>{s(K,{...g})}:void 0,F=a?K=>{a(K,{...g})}:void 0,W=c?K=>{c(K,{...g})}:void 0,Q=l?K=>{l(K,{...g})}:void 0,Z=K=>{var q;if(!_&&ar.includes(K.key)&&$){const{unselectNodesAndEdges:et,addSelectedEdges:nt}=I.getState();K.key==="Escape"?((q=B.current)==null||q.blur(),et({edges:[g]})):nt([t])}};return P.jsx("svg",{style:{zIndex:b},children:P.jsxs("g",{className:it(["react-flow__edge",`react-flow__edge-${N}`,g.className,y,{selected:g.selected,animated:g.animated,inactive:!$&&!r,updating:M,selectable:$}]),onClick:X,onDoubleClick:U,onContextMenu:G,onMouseEnter:F,onMouseMove:W,onMouseLeave:Q,onKeyDown:k?Z:void 0,tabIndex:k?0:void 0,role:g.ariaRole??(k?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":g.ariaLabel===null?void 0:g.ariaLabel||`Edge from ${g.source} to ${g.target}`,"aria-describedby":k?`${Vr}-${p}`:void 0,ref:B,...g.domAttributes,children:[!V&&P.jsx(S,{id:t,source:g.source,target:g.target,type:g.type,selected:g.selected,animated:g.animated,selectable:$,deletable:g.deletable??!0,label:g.label,labelStyle:g.labelStyle,labelShowBg:g.labelShowBg,labelBgStyle:g.labelBgStyle,labelBgPadding:g.labelBgPadding,labelBgBorderRadius:g.labelBgBorderRadius,sourceX:A,sourceY:C,targetX:E,targetY:D,sourcePosition:R,targetPosition:H,data:g.data,style:g.style,sourceHandleId:g.sourceHandle,targetHandleId:g.targetHandle,markerStart:O,markerEnd:j,pathOptions:"pathOptions"in g?g.pathOptions:void 0,interactionWidth:g.interactionWidth}),T&&P.jsx(tf,{edge:g,isReconnectable:T,reconnectRadius:f,onReconnect:u,onReconnectStart:d,onReconnectEnd:h,sourceX:A,sourceY:C,targetX:E,targetY:D,sourcePosition:R,targetPosition:H,setUpdateHover:z,setReconnecting:w})]})})}var nf=L.memo(ef);const of=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function di({defaultMarkerColor:t,onlyRenderVisibleElements:e,rfId:n,edgeTypes:o,noPanClassName:r,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:a,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:f,reconnectRadius:u,onEdgeDoubleClick:d,onReconnectStart:h,onReconnectEnd:p,disableKeyboardA11y:v}){const{edgesFocusable:y,edgesReconnectable:m,elementsSelectable:_,onError:g}=J(of,ot),x=Fd(e);return P.jsxs("div",{className:"react-flow__edges",children:[P.jsx(Wd,{defaultColor:t,rfId:n}),x.map(N=>P.jsx(nf,{id:N,edgesFocusable:y,edgesReconnectable:m,elementsSelectable:_,noPanClassName:r,onReconnect:i,onContextMenu:s,onMouseEnter:a,onMouseMove:c,onMouseLeave:l,onClick:f,reconnectRadius:u,onDoubleClick:d,onReconnectStart:h,onReconnectEnd:p,rfId:n,onError:g,edgeTypes:o,disableKeyboardA11y:v},N))]})}di.displayName="EdgeRenderer";const rf=L.memo(di),sf=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function af({children:t}){const e=J(sf);return P.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:e},children:t})}function cf(t){const e=kn(),n=L.useRef(!1);L.useEffect(()=>{!n.current&&e.viewportInitialized&&t&&(setTimeout(()=>t(e),1),n.current=!0)},[t,e.viewportInitialized])}const uf=t=>{var e;return(e=t.panZoom)==null?void 0:e.syncViewport};function lf(t){const e=J(uf),n=rt();return L.useEffect(()=>{t&&(e==null||e(t),n.setState({transform:[t.x,t.y,t.zoom]}))},[t,e]),null}function df(t){return t.connection.inProgress?{...t.connection,to:le(t.connection.to,t.transform)}:{...t.connection}}function ff(t){return df}function hf(t){const e=ff();return J(e,ot)}const gf=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function pf({containerStyle:t,style:e,type:n,component:o}){const{nodesConnectable:r,width:i,height:s,isValid:a,inProgress:c}=J(gf,ot);return!(i&&r&&c)?null:P.jsx("svg",{style:t,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:P.jsx("g",{className:it(["react-flow__connection",lr(a)]),children:P.jsx(fi,{style:e,type:n,CustomComponent:o,isValid:a})})})}const fi=({style:t,type:e=Et.Bezier,CustomComponent:n,isValid:o})=>{const{inProgress:r,from:i,fromNode:s,fromHandle:a,fromPosition:c,to:l,toNode:f,toHandle:u,toPosition:d,pointer:h}=hf();if(!r)return;if(n)return P.jsx(n,{connectionLineType:e,connectionLineStyle:t,fromNode:s,fromHandle:a,fromX:i.x,fromY:i.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:d,connectionStatus:lr(o),toNode:f,toHandle:u,pointer:h});let p="";const v={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:d};switch(e){case Et.Bezier:[p]=br(v);break;case Et.SimpleBezier:[p]=Jr(v);break;case Et.Step:[p]=ln({...v,borderRadius:0});break;case Et.SmoothStep:[p]=ln(v);break;default:[p]=Sr(v)}return P.jsx("path",{d:p,fill:"none",className:"react-flow__connection-path",style:t})};fi.displayName="ConnectionLine";const mf={};function Lo(t=mf){L.useRef(t),rt(),L.useEffect(()=>{},[t])}function yf(){rt(),L.useRef(!1),L.useEffect(()=>{},[])}function hi({nodeTypes:t,edgeTypes:e,onInit:n,onNodeClick:o,onEdgeClick:r,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:a,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:f,onSelectionContextMenu:u,onSelectionStart:d,onSelectionEnd:h,connectionLineType:p,connectionLineStyle:v,connectionLineComponent:y,connectionLineContainerStyle:m,selectionKeyCode:_,selectionOnDrag:g,selectionMode:x,multiSelectionKeyCode:N,panActivationKeyCode:S,zoomActivationKeyCode:k,deleteKeyCode:T,onlyRenderVisibleElements:$,elementsSelectable:B,defaultViewport:M,translateExtent:z,minZoom:V,maxZoom:w,preventScrolling:I,defaultMarkerColor:b,zoomOnScroll:A,zoomOnPinch:C,panOnScroll:E,panOnScrollSpeed:D,panOnScrollMode:R,zoomOnDoubleClick:H,panOnDrag:O,onPaneClick:j,onPaneMouseEnter:X,onPaneMouseMove:U,onPaneMouseLeave:G,onPaneScroll:F,onPaneContextMenu:W,paneClickDistance:Q,nodeClickDistance:Z,onEdgeContextMenu:K,onEdgeMouseEnter:q,onEdgeMouseMove:et,onEdgeMouseLeave:nt,reconnectRadius:tt,onReconnect:st,onReconnectStart:vt,onReconnectEnd:pt,noDragClassName:Nt,noWheelClassName:jt,noPanClassName:Yt,disableKeyboardA11y:Xt,nodeExtent:Xe,rfId:de,viewport:Pt,onViewportChange:Wt}){return Lo(t),Lo(e),yf(),cf(n),lf(Pt),P.jsx(Pd,{onPaneClick:j,onPaneMouseEnter:X,onPaneMouseMove:U,onPaneMouseLeave:G,onPaneContextMenu:W,onPaneScroll:F,paneClickDistance:Q,deleteKeyCode:T,selectionKeyCode:_,selectionOnDrag:g,selectionMode:x,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:N,panActivationKeyCode:S,zoomActivationKeyCode:k,elementsSelectable:B,zoomOnScroll:A,zoomOnPinch:C,zoomOnDoubleClick:H,panOnScroll:E,panOnScrollSpeed:D,panOnScrollMode:R,panOnDrag:O,defaultViewport:M,translateExtent:z,minZoom:V,maxZoom:w,onSelectionContextMenu:u,preventScrolling:I,noDragClassName:Nt,noWheelClassName:jt,noPanClassName:Yt,disableKeyboardA11y:Xt,onViewportChange:Wt,isControlledViewport:!!Pt,children:P.jsxs(af,{children:[P.jsx(rf,{edgeTypes:e,onEdgeClick:r,onEdgeDoubleClick:s,onReconnect:st,onReconnectStart:vt,onReconnectEnd:pt,onlyRenderVisibleElements:$,onEdgeContextMenu:K,onEdgeMouseEnter:q,onEdgeMouseMove:et,onEdgeMouseLeave:nt,reconnectRadius:tt,defaultMarkerColor:b,noPanClassName:Yt,disableKeyboardA11y:Xt,rfId:de}),P.jsx(pf,{style:v,type:p,component:y,containerStyle:m}),P.jsx("div",{className:"react-flow__edgelabel-renderer"}),P.jsx(Bd,{nodeTypes:t,onNodeClick:o,onNodeDoubleClick:i,onNodeMouseEnter:a,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:f,nodeClickDistance:Z,onlyRenderVisibleElements:$,noPanClassName:Yt,noDragClassName:Nt,disableKeyboardA11y:Xt,nodeExtent:Xe,rfId:de}),P.jsx("div",{className:"react-flow__viewport-portal"})]})})}hi.displayName="GraphView";const xf=L.memo(hi),Do=({nodes:t,edges:e,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:s,fitViewOptions:a,minZoom:c=.5,maxZoom:l=2,nodeOrigin:f,nodeExtent:u,zIndexMode:d="basic"}={})=>{const h=new Map,p=new Map,v=new Map,y=new Map,m=o??e??[],_=n??t??[],g=f??[0,0],x=u??ee;Mr(v,y,m);const{nodesInitialized:N}=fn(_,h,p,{nodeOrigin:g,nodeExtent:x,zIndexMode:d});let S=[0,0,1];if(s&&r&&i){const k=ce(h,{filter:M=>!!((M.width||M.initialWidth)&&(M.height||M.initialHeight))}),{x:T,y:$,zoom:B}=En(k,r,i,c,l,(a==null?void 0:a.padding)??.1);S=[T,$,B]}return{rfId:"1",width:r??0,height:i??0,transform:S,nodes:_,nodesInitialized:N,nodeLookup:h,parentLookup:p,edges:m,edgeLookup:y,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:ee,nodeExtent:x,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Rt.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:g,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:a,fitViewResolver:null,connection:{...ur},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Vu,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:cr,zIndexMode:d,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},wf=({nodes:t,edges:e,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:s,fitViewOptions:a,minZoom:c,maxZoom:l,nodeOrigin:f,nodeExtent:u,zIndexMode:d})=>Hl((h,p)=>{async function v(){const{nodeLookup:y,panZoom:m,fitViewOptions:_,fitViewResolver:g,width:x,height:N,minZoom:S,maxZoom:k}=p();m&&(await Hu({nodes:y,width:x,height:N,panZoom:m,minZoom:S,maxZoom:k},_),g==null||g.resolve(!0),h({fitViewResolver:null}))}return{...Do({nodes:t,edges:e,width:r,height:i,fitView:s,fitViewOptions:a,minZoom:c,maxZoom:l,nodeOrigin:f,nodeExtent:u,defaultNodes:n,defaultEdges:o,zIndexMode:d}),setNodes:y=>{const{nodeLookup:m,parentLookup:_,nodeOrigin:g,elevateNodesOnSelect:x,fitViewQueued:N,zIndexMode:S,nodesSelectionActive:k}=p(),{nodesInitialized:T,hasSelectedNodes:$}=fn(y,m,_,{nodeOrigin:g,nodeExtent:u,elevateNodesOnSelect:x,checkEquality:!0,zIndexMode:S}),B=k&&$;N&&T?(v(),h({nodes:y,nodesInitialized:T,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:B})):h({nodes:y,nodesInitialized:T,nodesSelectionActive:B})},setEdges:y=>{const{connectionLookup:m,edgeLookup:_}=p();Mr(m,_,y),h({edges:y})},setDefaultNodesAndEdges:(y,m)=>{if(y){const{setNodes:_}=p();_(y),h({hasDefaultNodes:!0})}if(m){const{setEdges:_}=p();_(m),h({hasDefaultEdges:!0})}},updateNodeInternals:y=>{const{triggerNodeChanges:m,nodeLookup:_,parentLookup:g,domNode:x,nodeOrigin:N,nodeExtent:S,debug:k,fitViewQueued:T,zIndexMode:$}=p(),{changes:B,updatedInternals:M}=al(y,_,g,x,N,S,$);M&&(ol(_,g,{nodeOrigin:N,nodeExtent:S,zIndexMode:$}),T?(v(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),(B==null?void 0:B.length)>0&&(k&&console.log("React Flow: trigger node changes",B),m==null||m(B)))},updateNodePositions:(y,m=!1)=>{const _=[];let g=[];const{nodeLookup:x,triggerNodeChanges:N,connection:S,updateConnection:k,onNodesChangeMiddlewareMap:T}=p();for(const[$,B]of y){const M=x.get($),z=!!(M!=null&&M.expandParent&&(M!=null&&M.parentId)&&(B!=null&&B.position)),V={id:$,type:"position",position:z?{x:Math.max(0,B.position.x),y:Math.max(0,B.position.y)}:B.position,dragging:m};if(M&&S.inProgress&&S.fromNode.id===M.id){const w=kt(M,S.fromHandle,Y.Left,!0);k({...S,from:w})}z&&M.parentId&&_.push({id:$,parentId:M.parentId,rect:{...B.internals.positionAbsolute,width:B.measured.width??0,height:B.measured.height??0}}),g.push(V)}if(_.length>0){const{parentLookup:$,nodeOrigin:B}=p(),M=An(_,x,$,B);g.push(...M)}for(const $ of T.values())g=$(g);N(g)},triggerNodeChanges:y=>{const{onNodesChange:m,setNodes:_,nodes:g,hasDefaultNodes:x,debug:N}=p();if(y!=null&&y.length){if(x){const S=Or(y,g);_(S)}N&&console.log("React Flow: trigger node changes",y),m==null||m(y)}},triggerEdgeChanges:y=>{const{onEdgesChange:m,setEdges:_,edges:g,hasDefaultEdges:x,debug:N}=p();if(y!=null&&y.length){if(x){const S=jr(y,g);_(S)}N&&console.log("React Flow: trigger edge changes",y),m==null||m(y)}},addSelectedNodes:y=>{const{multiSelectionActive:m,edgeLookup:_,nodeLookup:g,triggerNodeChanges:x,triggerEdgeChanges:N}=p();if(m){const S=y.map(k=>Ct(k,!0));x(S);return}x(zt(g,new Set([...y]),!0)),N(zt(_))},addSelectedEdges:y=>{const{multiSelectionActive:m,edgeLookup:_,nodeLookup:g,triggerNodeChanges:x,triggerEdgeChanges:N}=p();if(m){const S=y.map(k=>Ct(k,!0));N(S);return}N(zt(_,new Set([...y]))),x(zt(g,new Set,!0))},unselectNodesAndEdges:({nodes:y,edges:m}={})=>{const{edges:_,nodes:g,nodeLookup:x,triggerNodeChanges:N,triggerEdgeChanges:S}=p(),k=y||g,T=m||_,$=[];for(const M of k){if(!M.selected)continue;const z=x.get(M.id);z&&(z.selected=!1),$.push(Ct(M.id,!1))}const B=[];for(const M of T)M.selected&&B.push(Ct(M.id,!1));N($),S(B)},setMinZoom:y=>{const{panZoom:m,maxZoom:_}=p();m==null||m.setScaleExtent([y,_]),h({minZoom:y})},setMaxZoom:y=>{const{panZoom:m,minZoom:_}=p();m==null||m.setScaleExtent([_,y]),h({maxZoom:y})},setTranslateExtent:y=>{var m;(m=p().panZoom)==null||m.setTranslateExtent(y),h({translateExtent:y})},resetSelectedElements:()=>{const{edges:y,nodes:m,triggerNodeChanges:_,triggerEdgeChanges:g,elementsSelectable:x}=p();if(!x)return;const N=m.reduce((k,T)=>T.selected?[...k,Ct(T.id,!1)]:k,[]),S=y.reduce((k,T)=>T.selected?[...k,Ct(T.id,!1)]:k,[]);_(N),g(S)},setNodeExtent:y=>{const{nodes:m,nodeLookup:_,parentLookup:g,nodeOrigin:x,elevateNodesOnSelect:N,nodeExtent:S,zIndexMode:k}=p();y[0][0]===S[0][0]&&y[0][1]===S[0][1]&&y[1][0]===S[1][0]&&y[1][1]===S[1][1]||(fn(m,_,g,{nodeOrigin:x,nodeExtent:y,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:k}),h({nodeExtent:y}))},panBy:y=>{const{transform:m,width:_,height:g,panZoom:x,translateExtent:N}=p();return cl({delta:y,panZoom:x,transform:m,translateExtent:N,width:_,height:g})},setCenter:async(y,m,_)=>{const{width:g,height:x,maxZoom:N,panZoom:S}=p();if(!S)return Promise.resolve(!1);const k=typeof(_==null?void 0:_.zoom)<"u"?_.zoom:N;return await S.setViewport({x:g/2-y*k,y:x/2-m*k,zoom:k},{duration:_==null?void 0:_.duration,ease:_==null?void 0:_.ease,interpolate:_==null?void 0:_.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...ur}})},updateConnection:y=>{h({connection:y})},reset:()=>h({...Do()})}},Object.is);function vf({initialNodes:t,initialEdges:e,defaultNodes:n,defaultEdges:o,initialWidth:r,initialHeight:i,initialMinZoom:s,initialMaxZoom:a,initialFitViewOptions:c,fitView:l,nodeOrigin:f,nodeExtent:u,zIndexMode:d,children:h}){const[p]=L.useState(()=>wf({nodes:t,edges:e,defaultNodes:n,defaultEdges:o,width:r,height:i,fitView:l,minZoom:s,maxZoom:a,fitViewOptions:c,nodeOrigin:f,nodeExtent:u,zIndexMode:d}));return P.jsx(Rl,{value:p,children:P.jsx(sd,{children:h})})}function _f({children:t,nodes:e,edges:n,defaultNodes:o,defaultEdges:r,width:i,height:s,fitView:a,fitViewOptions:c,minZoom:l,maxZoom:f,nodeOrigin:u,nodeExtent:d,zIndexMode:h}){return L.useContext(Fe)?P.jsx(P.Fragment,{children:t}):P.jsx(vf,{initialNodes:e,initialEdges:n,defaultNodes:o,defaultEdges:r,initialWidth:i,initialHeight:s,fitView:a,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:f,nodeOrigin:u,nodeExtent:d,zIndexMode:h,children:t})}const bf={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Ef({nodes:t,edges:e,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:i,edgeTypes:s,onNodeClick:a,onEdgeClick:c,onInit:l,onMove:f,onMoveStart:u,onMoveEnd:d,onConnect:h,onConnectStart:p,onConnectEnd:v,onClickConnectStart:y,onClickConnectEnd:m,onNodeMouseEnter:_,onNodeMouseMove:g,onNodeMouseLeave:x,onNodeContextMenu:N,onNodeDoubleClick:S,onNodeDragStart:k,onNodeDrag:T,onNodeDragStop:$,onNodesDelete:B,onEdgesDelete:M,onDelete:z,onSelectionChange:V,onSelectionDragStart:w,onSelectionDrag:I,onSelectionDragStop:b,onSelectionContextMenu:A,onSelectionStart:C,onSelectionEnd:E,onBeforeDelete:D,connectionMode:R,connectionLineType:H=Et.Bezier,connectionLineStyle:O,connectionLineComponent:j,connectionLineContainerStyle:X,deleteKeyCode:U="Backspace",selectionKeyCode:G="Shift",selectionOnDrag:F=!1,selectionMode:W=ne.Full,panActivationKeyCode:Q="Space",multiSelectionKeyCode:Z=re()?"Meta":"Control",zoomActivationKeyCode:K=re()?"Meta":"Control",snapToGrid:q,snapGrid:et,onlyRenderVisibleElements:nt=!1,selectNodesOnDrag:tt,nodesDraggable:st,autoPanOnNodeFocus:vt,nodesConnectable:pt,nodesFocusable:Nt,nodeOrigin:jt=Br,edgesFocusable:Yt,edgesReconnectable:Xt,elementsSelectable:Xe=!0,defaultViewport:de=Zl,minZoom:Pt=.5,maxZoom:Wt=2,translateExtent:$n=ee,preventScrolling:yi=!0,nodeExtent:We,defaultMarkerColor:xi="#b1b1b7",zoomOnScroll:wi=!0,zoomOnPinch:vi=!0,panOnScroll:_i=!1,panOnScrollSpeed:bi=.5,panOnScrollMode:Ei=Mt.Free,zoomOnDoubleClick:Si=!0,panOnDrag:Ni=!0,onPaneClick:Ci,onPaneMouseEnter:Mi,onPaneMouseMove:Ii,onPaneMouseLeave:Ai,onPaneScroll:ki,onPaneContextMenu:Pi,paneClickDistance:$i=1,nodeClickDistance:Ti=0,children:zi,onReconnect:Li,onReconnectStart:Di,onReconnectEnd:Hi,onEdgeContextMenu:Ri,onEdgeDoubleClick:Vi,onEdgeMouseEnter:Bi,onEdgeMouseMove:Fi,onEdgeMouseLeave:Oi,reconnectRadius:ji=10,onNodesChange:Yi,onEdgesChange:Xi,noDragClassName:Wi="nodrag",noWheelClassName:Gi="nowheel",noPanClassName:Tn="nopan",fitView:zn,fitViewOptions:Ln,connectOnClick:qi,attributionPosition:Ui,proOptions:Ki,defaultEdgeOptions:Zi,elevateNodesOnSelect:Qi=!0,elevateEdgesOnSelect:Ji=!1,disableKeyboardA11y:Dn=!1,autoPanOnConnect:ts,autoPanOnNodeDrag:es,autoPanSpeed:ns,connectionRadius:os,isValidConnection:rs,onError:is,style:ss,id:Hn,nodeDragThreshold:as,connectionDragThreshold:cs,viewport:us,onViewportChange:ls,width:ds,height:fs,colorMode:hs="light",debug:gs,onScroll:fe,ariaLabelConfig:ps,zIndexMode:Rn="basic",...ms},ys){const Ge=Hn||"1",xs=ed(hs),ws=L.useCallback(Vn=>{Vn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),fe==null||fe(Vn)},[fe]);return P.jsx("div",{"data-testid":"rf__wrapper",...ms,onScroll:ws,style:{...ss,...bf},ref:ys,className:it(["react-flow",r,xs]),id:Hn,role:"application",children:P.jsxs(_f,{nodes:t,edges:e,width:ds,height:fs,fitView:zn,fitViewOptions:Ln,minZoom:Pt,maxZoom:Wt,nodeOrigin:jt,nodeExtent:We,zIndexMode:Rn,children:[P.jsx(td,{nodes:t,edges:e,defaultNodes:n,defaultEdges:o,onConnect:h,onConnectStart:p,onConnectEnd:v,onClickConnectStart:y,onClickConnectEnd:m,nodesDraggable:st,autoPanOnNodeFocus:vt,nodesConnectable:pt,nodesFocusable:Nt,edgesFocusable:Yt,edgesReconnectable:Xt,elementsSelectable:Xe,elevateNodesOnSelect:Qi,elevateEdgesOnSelect:Ji,minZoom:Pt,maxZoom:Wt,nodeExtent:We,onNodesChange:Yi,onEdgesChange:Xi,snapToGrid:q,snapGrid:et,connectionMode:R,translateExtent:$n,connectOnClick:qi,defaultEdgeOptions:Zi,fitView:zn,fitViewOptions:Ln,onNodesDelete:B,onEdgesDelete:M,onDelete:z,onNodeDragStart:k,onNodeDrag:T,onNodeDragStop:$,onSelectionDrag:I,onSelectionDragStart:w,onSelectionDragStop:b,onMove:f,onMoveStart:u,onMoveEnd:d,noPanClassName:Tn,nodeOrigin:jt,rfId:Ge,autoPanOnConnect:ts,autoPanOnNodeDrag:es,autoPanSpeed:ns,onError:is,connectionRadius:os,isValidConnection:rs,selectNodesOnDrag:tt,nodeDragThreshold:as,connectionDragThreshold:cs,onBeforeDelete:D,debug:gs,ariaLabelConfig:ps,zIndexMode:Rn}),P.jsx(xf,{onInit:l,onNodeClick:a,onEdgeClick:c,onNodeMouseEnter:_,onNodeMouseMove:g,onNodeMouseLeave:x,onNodeContextMenu:N,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:s,connectionLineType:H,connectionLineStyle:O,connectionLineComponent:j,connectionLineContainerStyle:X,selectionKeyCode:G,selectionOnDrag:F,selectionMode:W,deleteKeyCode:U,multiSelectionKeyCode:Z,panActivationKeyCode:Q,zoomActivationKeyCode:K,onlyRenderVisibleElements:nt,defaultViewport:de,translateExtent:$n,minZoom:Pt,maxZoom:Wt,preventScrolling:yi,zoomOnScroll:wi,zoomOnPinch:vi,zoomOnDoubleClick:Si,panOnScroll:_i,panOnScrollSpeed:bi,panOnScrollMode:Ei,panOnDrag:Ni,onPaneClick:Ci,onPaneMouseEnter:Mi,onPaneMouseMove:Ii,onPaneMouseLeave:Ai,onPaneScroll:ki,onPaneContextMenu:Pi,paneClickDistance:$i,nodeClickDistance:Ti,onSelectionContextMenu:A,onSelectionStart:C,onSelectionEnd:E,onReconnect:Li,onReconnectStart:Di,onReconnectEnd:Hi,onEdgeContextMenu:Ri,onEdgeDoubleClick:Vi,onEdgeMouseEnter:Bi,onEdgeMouseMove:Fi,onEdgeMouseLeave:Oi,reconnectRadius:ji,defaultMarkerColor:xi,noDragClassName:Wi,noWheelClassName:Gi,noPanClassName:Tn,rfId:Ge,disableKeyboardA11y:Dn,nodeExtent:We,viewport:us,onViewportChange:ls}),P.jsx(Kl,{onSelectionChange:V}),zi,P.jsx(Xl,{proOptions:Ki,position:Ui}),P.jsx(Yl,{rfId:Ge,disableKeyboardA11y:Dn})]})})}var Kf=Yr(Ef);function Zf(t){const[e,n]=L.useState(t),o=L.useCallback(r=>n(i=>Or(r,i)),[]);return[e,n,o]}function Qf(t){const[e,n]=L.useState(t),o=L.useCallback(r=>n(i=>jr(r,i)),[]);return[e,n,o]}function Sf({dimensions:t,lineWidth:e,variant:n,className:o}){return P.jsx("path",{strokeWidth:e,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:it(["react-flow__background-pattern",n,o])})}function Nf({radius:t,className:e}){return P.jsx("circle",{cx:t,cy:t,r:t,className:it(["react-flow__background-pattern","dots",e])})}var St;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(St||(St={}));const Cf={[St.Dots]:1,[St.Lines]:1,[St.Cross]:6},Mf=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function gi({id:t,variant:e=St.Dots,gap:n=20,size:o,lineWidth:r=1,offset:i=0,color:s,bgColor:a,style:c,className:l,patternClassName:f}){const u=L.useRef(null),{transform:d,patternId:h}=J(Mf,ot),p=o||Cf[e],v=e===St.Dots,y=e===St.Cross,m=Array.isArray(n)?n:[n,n],_=[m[0]*d[2]||1,m[1]*d[2]||1],g=p*d[2],x=Array.isArray(i)?i:[i,i],N=y?[g,g]:_,S=[x[0]*d[2]||1+N[0]/2,x[1]*d[2]||1+N[1]/2],k=`${h}${t||""}`;return P.jsxs("svg",{className:it(["react-flow__background",l]),style:{...c,...je,"--xy-background-color-props":a,"--xy-background-pattern-color-props":s},ref:u,"data-testid":"rf__background",children:[P.jsx("pattern",{id:k,x:d[0]%_[0],y:d[1]%_[1],width:_[0],height:_[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:v?P.jsx(Nf,{radius:g/2,className:f}):P.jsx(Sf,{dimensions:N,lineWidth:r,variant:e,className:f})}),P.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${k})`})]})}gi.displayName="Background";const Jf=L.memo(gi);function If(){return P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:P.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Af(){return P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:P.jsx("path",{d:"M0 0h32v4.2H0z"})})}function kf(){return P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:P.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 Pf(){return P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:P.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 $f(){return P.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:P.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 xe({children:t,className:e,...n}){return P.jsx("button",{type:"button",className:it(["react-flow__controls-button",e]),...n,children:t})}const Tf=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function pi({style:t,showZoom:e=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:r,onZoomIn:i,onZoomOut:s,onFitView:a,onInteractiveChange:c,className:l,children:f,position:u="bottom-left",orientation:d="vertical","aria-label":h}){const p=rt(),{isInteractive:v,minZoomReached:y,maxZoomReached:m,ariaLabelConfig:_}=J(Tf,ot),{zoomIn:g,zoomOut:x,fitView:N}=kn(),S=()=>{g(),i==null||i()},k=()=>{x(),s==null||s()},T=()=>{N(r),a==null||a()},$=()=>{p.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),c==null||c(!v)},B=d==="horizontal"?"horizontal":"vertical";return P.jsxs(Oe,{className:it(["react-flow__controls",B,l]),position:u,style:t,"data-testid":"rf__controls","aria-label":h??_["controls.ariaLabel"],children:[e&&P.jsxs(P.Fragment,{children:[P.jsx(xe,{onClick:S,className:"react-flow__controls-zoomin",title:_["controls.zoomIn.ariaLabel"],"aria-label":_["controls.zoomIn.ariaLabel"],disabled:m,children:P.jsx(If,{})}),P.jsx(xe,{onClick:k,className:"react-flow__controls-zoomout",title:_["controls.zoomOut.ariaLabel"],"aria-label":_["controls.zoomOut.ariaLabel"],disabled:y,children:P.jsx(Af,{})})]}),n&&P.jsx(xe,{className:"react-flow__controls-fitview",onClick:T,title:_["controls.fitView.ariaLabel"],"aria-label":_["controls.fitView.ariaLabel"],children:P.jsx(kf,{})}),o&&P.jsx(xe,{className:"react-flow__controls-interactive",onClick:$,title:_["controls.interactive.ariaLabel"],"aria-label":_["controls.interactive.ariaLabel"],children:v?P.jsx($f,{}):P.jsx(Pf,{})}),f]})}pi.displayName="Controls";const th=L.memo(pi);function zf({id:t,x:e,y:n,width:o,height:r,style:i,color:s,strokeColor:a,strokeWidth:c,className:l,borderRadius:f,shapeRendering:u,selected:d,onClick:h}){const{background:p,backgroundColor:v}=i||{},y=s||p||v;return P.jsx("rect",{className:it(["react-flow__minimap-node",{selected:d},l]),x:e,y:n,rx:f,ry:f,width:o,height:r,style:{fill:y,stroke:a,strokeWidth:c},shapeRendering:u,onClick:h?m=>h(m,t):void 0})}const Lf=L.memo(zf),Df=t=>t.nodes.map(e=>e.id),nn=t=>t instanceof Function?t:()=>t;function Hf({nodeStrokeColor:t,nodeColor:e,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:r,nodeComponent:i=Lf,onClick:s}){const a=J(Df,ot),c=nn(e),l=nn(t),f=nn(n),u=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return P.jsx(P.Fragment,{children:a.map(d=>P.jsx(Vf,{id:d,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:f,nodeBorderRadius:o,nodeStrokeWidth:r,NodeComponent:i,onClick:s,shapeRendering:u},d))})}function Rf({id:t,nodeColorFunc:e,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:r,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:a,onClick:c}){const{node:l,x:f,y:u,width:d,height:h}=J(p=>{const v=p.nodeLookup.get(t);if(!v)return{node:void 0,x:0,y:0,width:0,height:0};const y=v.internals.userNode,{x:m,y:_}=v.internals.positionAbsolute,{width:g,height:x}=wt(y);return{node:y,x:m,y:_,width:g,height:x}},ot);return!l||l.hidden||!mr(l)?null:P.jsx(a,{x:f,y:u,width:d,height:h,style:l.style,selected:!!l.selected,className:o(l),color:e(l),borderRadius:r,strokeColor:n(l),strokeWidth:i,shapeRendering:s,onClick:c,id:l.id})}const Vf=L.memo(Rf);var Bf=L.memo(Hf);const Ff=200,Of=150,jf=t=>!t.hidden,Yf=t=>{const e={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:e,boundingRect:t.nodeLookup.size>0?pr(ce(t.nodeLookup,{filter:jf}),e):e,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},Xf="react-flow__minimap-desc";function mi({style:t,className:e,nodeStrokeColor:n,nodeColor:o,nodeClassName:r="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:a,bgColor:c,maskColor:l,maskStrokeColor:f,maskStrokeWidth:u,position:d="bottom-right",onClick:h,onNodeClick:p,pannable:v=!1,zoomable:y=!1,ariaLabel:m,inversePan:_,zoomStep:g=1,offsetScale:x=5}){const N=rt(),S=L.useRef(null),{boundingRect:k,viewBB:T,rfId:$,panZoom:B,translateExtent:M,flowWidth:z,flowHeight:V,ariaLabelConfig:w}=J(Yf,ot),I=(t==null?void 0:t.width)??Ff,b=(t==null?void 0:t.height)??Of,A=k.width/I,C=k.height/b,E=Math.max(A,C),D=E*I,R=E*b,H=x*E,O=k.x-(D-k.width)/2-H,j=k.y-(R-k.height)/2-H,X=D+H*2,U=R+H*2,G=`${Xf}-${$}`,F=L.useRef(0),W=L.useRef();F.current=E,L.useEffect(()=>{if(S.current&&B)return W.current=yl({domNode:S.current,panZoom:B,getTransform:()=>N.getState().transform,getViewScale:()=>F.current}),()=>{var q;(q=W.current)==null||q.destroy()}},[B]),L.useEffect(()=>{var q;(q=W.current)==null||q.update({translateExtent:M,width:z,height:V,inversePan:_,pannable:v,zoomStep:g,zoomable:y})},[v,y,_,g,M,z,V]);const Q=h?q=>{var tt;const[et,nt]=((tt=W.current)==null?void 0:tt.pointer(q))||[0,0];h(q,{x:et,y:nt})}:void 0,Z=p?L.useCallback((q,et)=>{const nt=N.getState().nodeLookup.get(et).internals.userNode;p(q,nt)},[]):void 0,K=m??w["minimap.ariaLabel"];return P.jsx(Oe,{position:d,style:{...t,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-width-props":typeof u=="number"?u*E:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o: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:it(["react-flow__minimap",e]),"data-testid":"rf__minimap",children:P.jsxs("svg",{width:I,height:b,viewBox:`${O} ${j} ${X} ${U}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":G,ref:S,onClick:Q,children:[K&&P.jsx("title",{id:G,children:K}),P.jsx(Bf,{onClick:Z,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:r,nodeStrokeWidth:s,nodeComponent:a}),P.jsx("path",{className:"react-flow__minimap-mask",d:`M${O-H},${j-H}h${X+H*2}v${U+H*2}h${-X-H*2}z
|
|
15
|
+
M${T.x},${T.y}h${T.width}v${T.height}h${-T.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}mi.displayName="MiniMap";const eh=L.memo(mi),Wf=t=>e=>t?`${Math.max(1/e.transform[2],1)}`:void 0,Gf={[Ot.Line]:"right",[Ot.Handle]:"bottom-right"};function qf({nodeId:t,position:e,variant:n=Ot.Handle,className:o,style:r=void 0,children:i,color:s,minWidth:a=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:f=Number.MAX_VALUE,keepAspectRatio:u=!1,resizeDirection:d,autoScale:h=!0,shouldResize:p,onResizeStart:v,onResize:y,onResizeEnd:m}){const _=qr(),g=typeof t=="string"?t:_,x=rt(),N=L.useRef(null),S=n===Ot.Handle,k=J(L.useCallback(Wf(S&&h),[S,h]),ot),T=L.useRef(null),$=e??Gf[n];L.useEffect(()=>{if(!(!N.current||!g))return T.current||(T.current=Pl({domNode:N.current,nodeId:g,getStoreItems:()=>{const{nodeLookup:M,transform:z,snapGrid:V,snapToGrid:w,nodeOrigin:I,domNode:b}=x.getState();return{nodeLookup:M,transform:z,snapGrid:V,snapToGrid:w,nodeOrigin:I,paneDomNode:b}},onChange:(M,z)=>{const{triggerNodeChanges:V,nodeLookup:w,parentLookup:I,nodeOrigin:b}=x.getState(),A=[],C={x:M.x,y:M.y},E=w.get(g);if(E&&E.expandParent&&E.parentId){const D=E.origin??b,R=M.width??E.measured.width??0,H=M.height??E.measured.height??0,O={id:E.id,parentId:E.parentId,rect:{width:R,height:H,...yr({x:M.x??E.position.x,y:M.y??E.position.y},{width:R,height:H},E.parentId,w,D)}},j=An([O],w,I,b);A.push(...j),C.x=M.x?Math.max(D[0]*R,M.x):void 0,C.y=M.y?Math.max(D[1]*H,M.y):void 0}if(C.x!==void 0&&C.y!==void 0){const D={id:g,type:"position",position:{...C}};A.push(D)}if(M.width!==void 0&&M.height!==void 0){const R={id:g,type:"dimensions",resizing:!0,setAttributes:d?d==="horizontal"?"width":"height":!0,dimensions:{width:M.width,height:M.height}};A.push(R)}for(const D of z){const R={...D,type:"position"};A.push(R)}V(A)},onEnd:({width:M,height:z})=>{const V={id:g,type:"dimensions",resizing:!1,dimensions:{width:M,height:z}};x.getState().triggerNodeChanges([V])}})),T.current.update({controlPosition:$,boundaries:{minWidth:a,minHeight:c,maxWidth:l,maxHeight:f},keepAspectRatio:u,resizeDirection:d,onResizeStart:v,onResize:y,onResizeEnd:m,shouldResize:p}),()=>{var M;(M=T.current)==null||M.destroy()}},[$,a,c,l,f,u,v,y,m,p]);const B=$.split("-");return P.jsx("div",{className:it(["react-flow__resize-control","nodrag",...B,n,o]),ref:N,style:{...r,scale:k,...s&&{[S?"backgroundColor":"borderColor"]:s}},children:i})}L.memo(qf);export{Jf as B,th as C,Pe as H,eh as M,Y as P,Qf as a,Uu as b,Kf as i,P as j,Zf as u};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { type Theme } from '@mui/material/styles';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
2
|
type AppShellProps = {
|
|
4
|
-
children: ReactNode;
|
|
5
3
|
title?: string;
|
|
6
4
|
theme?: Theme;
|
|
7
5
|
};
|
|
8
|
-
export declare function AppShell({
|
|
6
|
+
export declare function AppShell({ title, theme }: AppShellProps): import("react/jsx-runtime").JSX.Element;
|
|
9
7
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type RequestOption = {
|
|
2
|
+
id: string;
|
|
3
|
+
method: string;
|
|
4
|
+
path: string;
|
|
5
|
+
status: number;
|
|
6
|
+
createdAt: number;
|
|
7
|
+
};
|
|
8
|
+
type RequestDiffSelectorProps = {
|
|
9
|
+
requests: RequestOption[];
|
|
10
|
+
value: string | null;
|
|
11
|
+
onChange: (id: string | null) => void;
|
|
12
|
+
label?: string;
|
|
13
|
+
};
|
|
14
|
+
export default function RequestDiffSelector({ requests, value, onChange, label, }: RequestDiffSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SerializableSchema } from '../../types/types.endpoint.js';
|
|
2
|
+
type SchemaDiffViewerProps = {
|
|
3
|
+
data: unknown;
|
|
4
|
+
schema: SerializableSchema;
|
|
5
|
+
};
|
|
6
|
+
export default function SchemaDiffViewer({ data, schema, }: SchemaDiffViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type CopyAsMenuProps = {
|
|
2
|
+
method: string;
|
|
3
|
+
url: string;
|
|
4
|
+
headers?: Record<string, string>;
|
|
5
|
+
body?: string;
|
|
6
|
+
queryParams?: Record<string, string>;
|
|
7
|
+
size?: 'small' | 'medium';
|
|
8
|
+
};
|
|
9
|
+
export default function CopyAsMenu({ method, url, headers, body, queryParams, size, }: CopyAsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CopySnackbar(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Node, type Edge, type OnNodesChange, type OnEdgesChange, type OnConnect } from '@xyflow/react';
|
|
2
|
+
import '@xyflow/react/dist/style.css';
|
|
3
|
+
type FlowCanvasProps = {
|
|
4
|
+
nodes: Node[];
|
|
5
|
+
edges: Edge[];
|
|
6
|
+
onNodesChange: OnNodesChange;
|
|
7
|
+
onEdgesChange: OnEdgesChange;
|
|
8
|
+
onConnect: OnConnect;
|
|
9
|
+
onNodeClick?: (event: React.MouseEvent, node: Node) => void;
|
|
10
|
+
onMouseMove?: (event: React.MouseEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
export default function FlowCanvas({ nodes, edges, onNodesChange, onEdgesChange, onConnect, onNodeClick, onMouseMove, }: FlowCanvasProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FlowStepNode } from '../../stores/flowStore.js';
|
|
2
|
+
type FlowNodeEditorProps = {
|
|
3
|
+
node: FlowStepNode | null;
|
|
4
|
+
onUpdate: (nodeId: string, data: unknown) => void;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
};
|
|
7
|
+
export default function FlowNodeEditor({ node, onUpdate, onClose, }: FlowNodeEditorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FlowRunState, FlowStepNode } from '../../stores/flowStore.js';
|
|
2
|
+
type FlowRunProgressProps = {
|
|
3
|
+
runState: FlowRunState;
|
|
4
|
+
nodes: FlowStepNode[];
|
|
5
|
+
};
|
|
6
|
+
export default function FlowRunProgress({ runState, nodes, }: FlowRunProgressProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FlowStepNode, FlowVariable } from '../../stores/flowStore.js';
|
|
2
|
+
type FlowVariablePanelProps = {
|
|
3
|
+
variables: FlowVariable[];
|
|
4
|
+
nodes: FlowStepNode[];
|
|
5
|
+
};
|
|
6
|
+
export default function FlowVariablePanel({ variables, nodes, }: FlowVariablePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
2
|
+
type ConditionNodeData = {
|
|
3
|
+
expression: string;
|
|
4
|
+
onSelect?: () => void;
|
|
5
|
+
};
|
|
6
|
+
export default function ConditionNode({ data }: NodeProps<Node<ConditionNodeData>>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
2
|
+
type DelayNodeData = {
|
|
3
|
+
durationMs: number;
|
|
4
|
+
onSelect?: () => void;
|
|
5
|
+
};
|
|
6
|
+
export default function DelayNode({ data }: NodeProps<Node<DelayNodeData>>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
2
|
+
type ExtractNodeData = {
|
|
3
|
+
variableName: string;
|
|
4
|
+
jsonPath: string;
|
|
5
|
+
onSelect?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export default function ExtractNode({ data }: NodeProps<Node<ExtractNodeData>>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Node, type NodeProps } from '@xyflow/react';
|
|
2
|
+
type RequestNodeData = {
|
|
3
|
+
method: string;
|
|
4
|
+
path: string;
|
|
5
|
+
headers?: Record<string, string>;
|
|
6
|
+
body?: string;
|
|
7
|
+
onSelect?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export default function RequestNode({ data }: NodeProps<Node<RequestNodeData>>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ActivityBar(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
type BentoGridProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
};
|
|
5
|
+
export declare function BentoGrid({ children }: BentoGridProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
type BentoRowProps = {
|
|
7
|
+
sizes?: number[];
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare function BentoRow({ sizes: initialSizes, children }: BentoRowProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
type BentoCardProps = {
|
|
12
|
+
title?: string;
|
|
13
|
+
actions?: ReactNode;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export declare function BentoCard({ title, actions, children }: BentoCardProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ContentArea(): import("react/jsx-runtime").JSX.Element;
|