PageSourceSearch

https://kiku.listen.org/3566.4af9eea29b46f20d.bundle.js

js listen.org collected 2026-10-02 06:41:40 UTC 223,276 bytes, 1 lines download raw bytes

1"use strict";(self["webpackChunkclient"]=self["webpackChunkclient"]||[]).push([[3566],{14366:function(e,t,n){n.d(t,{V:function(){return g}});var o=n(20641),i=n(50953),r=n(90033),a=n(75408),l=(e=>(e["Lines"]="lines",e["Dots"]="dots",e))(l||{});const u=function({dimensions:e,size:t,color:n}){return(0,o.h)("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},s=function({radius:e,color:t}){return(0,o.h)("circle",{cx:e,cy:e,r:e,fill:t})};l.Lines,l.Dots;const c={[l.Dots]:"#81818a",[l.Lines]:"#eee"},d=["id","x","y","width","height","patternTransform"],h={key:2,height:"100",width:"100"},f=["fill"],p=["x","y","fill"],v={name:"Background",compatConfig:{MODE:3}},g=(0,o.pM)({...v,props:{id:{},variant:{default:()=>l.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=(0,a.Id)(),v=(0,o.EW)(()=>{const t=n.value.zoom,[o,i]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],r=[o*t||1,i*t||1],a=e.size*t,[l,u]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],s=[l*t||1+r[0]/2,u*t||1+r[1]/2];return{scaledGap:r,offset:s,size:a}}),g=(0,i.lW)(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),m=(0,i.lW)(()=>e.color||e.patternColor||c[e.variant||l.Dots]);return(e,t)=>((0,o.uX)(),(0,o.CE)("svg",{class:"vue-flow__background vue-flow__container",style:(0,r.Tr)({height:`${e.height>100?100:e.height}%`,width:`${e.width>100?100:e.width}%`})},[(0,o.RG)(e.$slots,"pattern-container",{id:g.value},()=>[(0,o.Lk)("pattern",{id:g.value,x:(0,i.R1)(n).x%v.value.scaledGap[0],y:(0,i.R1)(n).y%v.value.scaledGap[1],width:v.value.scaledGap[0],height:v.value.scaledGap[1],patternTransform:`translate(-${v.value.offset[0]},-${v.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[(0,o.RG)(e.$slots,"pattern",{},()=>[e.variant===(0,i.R1)(l).Lines?((0,o.uX)(),(0,o.Wv)((0,i.R1)(u),{key:0,size:e.lineWidth,color:m.value,dimensions:v.value.scaledGap},null,8,["size","color","dimensions"])):e.variant===(0,i.R1)(l).Dots?((0,o.uX)(),(0,o.Wv)((0,i.R1)(s),{key:1,color:m.value,radius:v.value.size/2},null,8,["color","radius"])):(0,o.Q3)("",!0),e.bgColor?((0,o.uX)(),(0,o.CE)("svg",h,[(0,o.Lk)("rect",{width:"100%",height:"100%",fill:e.bgColor},null,8,f)])):(0,o.Q3)("",!0)])],8,d)]),(0,o.Lk)("rect",{x:e.x,y:e.y,width:"100%",height:"100%",fill:`url(#${g.value})`},null,8,p),(0,o.RG)(e.$slots,"default",{id:g.value})],4))}})},65142:function(e,t,n){n.d(t,{of:function(){return Yi}});var o=n(20641),i=n(50953),r=n(90033),a=n(75408),l={value:()=>{}};function u(){for(var e,t=0,n=arguments.length,o={};t<n;++t){if(!(e=arguments[t]+"")||e in o||/[\s.]/.test(e))throw new Error("illegal type: "+e);o[e]=[]}return new s(o)}function s(e){this._=e}function c(e,t){return e.trim().split(/^|\s+/).map(function(e){var n="",o=e.indexOf(".");if(o>=0&&(n=e.slice(o+1),e=e.slice(0,o)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}})}function d(e,t){for(var n,o=0,i=e.length;o<i;++o)if((n=e[o]).name===t)return n.value}function h(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=l,e=e.slice(0,o).concat(e.slice(o+1));break}return null!=n&&e.push({name:t,value:n}),e}s.prototype=u.prototype={constructor:s,on:function(e,t){var n,o=this._,i=c(e+"",o),r=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);while(++r<a)if(n=(e=i[r]).type)o[n]=h(o[n],e.name,t);else if(null==t)for(n in o)o[n]=h(o[n],e.name,null);return this}while(++r<a)if((n=(e=i[r]).type)&&(n=d(o[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new s(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,o,i=new Array(n),r=0;r<n;++r)i[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,n=o.length;r<n;++r)o[r].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,r=o.length;i<r;++i)o[i].value.apply(t,n)}};var f="http://www.w3.org/1999/xhtml";const p={svg:"http://www.w3.org/2000/svg",xhtml:f,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function v(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),p.hasOwnProperty(t)?{space:p[t],local:e}:e}function g(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===f&&t.documentElement.namespaceURI===f?t.createElement(e):t.createElementNS(n,e)}}function m(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function y(e){var t=v(e);return(t.local?m:g)(t)}function w(){}function _(e){return null==e?w:function(){return this.querySelector(e)}}function b(e){"function"!==typeof e&&(e=_(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a,l=t[i],u=l.length,s=o[i]=new Array(u),c=0;c<u;++c)(r=l[c])&&(a=e.call(r,r.__data__,c,l))&&("__data__"in r&&(a.__data__=r.__data__),s[c]=a);return new st(o,this._parents)}function x(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function E(){return[]}function k(e){return null==e?E:function(){return this.querySelectorAll(e)}}function S(e){return function(){return x(e.apply(this,arguments))}}function N(e){e="function"===typeof e?S(e):k(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var a,l=t[r],u=l.length,s=0;s<u;++s)(a=l[s])&&(o.push(e.call(a,a.__data__,s,l)),i.push(a));return new st(o,i)}function M(e){return function(){return this.matches(e)}}function C(e){return function(t){return t.matches(e)}}var I=Array.prototype.find;function A(e){return function(){return I.call(this.children,e)}}function $(){return this.firstElementChild}function T(e){return this.select(null==e?$:A("function"===typeof e?e:C(e)))}var B=Array.prototype.filter;function P(){return Array.from(this.children)}function z(e){return function(){return B.call(this.children,e)}}function R(e){return this.selectAll(null==e?P:z("function"===typeof e?e:C(e)))}function D(e){"function"!==typeof e&&(e=M(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a=t[i],l=a.length,u=o[i]=[],s=0;s<l;++s)(r=a[s])&&e.call(r,r.__data__,s,a)&&u.push(r);return new st(o,this._parents)}function O(e){return new Array(e.length)}function V(){return new st(this._enter||this._groups.map(O),this._parents)}function X(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function L(e){return function(){return e}}function W(e,t,n,o,i,r){for(var a,l=0,u=t.length,s=r.length;l<s;++l)(a=t[l])?(a.__data__=r[l],o[l]=a):n[l]=new X(e,r[l]);for(;l<u;++l)(a=t[l])&&(i[l]=a)}function H(e,t,n,o,i,r,a){var l,u,s,c=new Map,d=t.length,h=r.length,f=new Array(d);for(l=0;l<d;++l)(u=t[l])&&(f[l]=s=a.call(u,u.__data__,l,t)+"",c.has(s)?i[l]=u:c.set(s,u));for(l=0;l<h;++l)s=a.call(e,r[l],l,r)+"",(u=c.get(s))?(o[l]=u,u.__data__=r[l],c.delete(s)):n[l]=new X(e,r[l]);for(l=0;l<d;++l)(u=t[l])&&c.get(f[l])===u&&(i[l]=u)}function G(e){return e.__data__}function Y(e,t){if(!arguments.length)return Array.from(this,G);var n=t?H:W,o=this._parents,i=this._groups;"function"!==typeof e&&(e=L(e));for(var r=i.length,a=new Array(r),l=new Array(r),u=new Array(r),s=0;s<r;++s){var c=o[s],d=i[s],h=d.length,f=F(e.call(c,c&&c.__data__,s,o)),p=f.length,v=l[s]=new Array(p),g=a[s]=new Array(p),m=u[s]=new Array(h);n(c,d,v,g,m,f,t);for(var y,w,_=0,b=0;_<p;++_)if(y=v[_]){_>=b&&(b=_+1);while(!(w=g[b])&&++b<p);y._next=w||null}}return a=new st(a,o),a._enter=l,a._exit=u,a}function F(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function U(){return new st(this._exit||this._groups.map(O),this._parents)}function K(e,t,n){var o=this.enter(),i=this,r=this.exit();return"function"===typeof e?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),null!=t&&(i=t(i),i&&(i=i.selection())),null==n?r.remove():n(r),o&&i?o.merge
1(i).order():i}function j(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,a=Math.min(i,r),l=new Array(i),u=0;u<a;++u)for(var s,c=n[u],d=o[u],h=c.length,f=l[u]=new Array(h),p=0;p<h;++p)(s=c[p]||d[p])&&(f[p]=s);for(;u<i;++u)l[u]=n[u];return new st(l,this._parents)}function Z(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o,i=e[t],r=i.length-1,a=i[r];--r>=0;)(o=i[r])&&(a&&4^o.compareDocumentPosition(a)&&a.parentNode.insertBefore(o,a),a=o);return this}function q(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Q);for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var a,l=n[r],u=l.length,s=i[r]=new Array(u),c=0;c<u;++c)(a=l[c])&&(s[c]=a);s.sort(t)}return new st(i,this._parents).order()}function Q(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function J(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ee(){return Array.from(this)}function te(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var a=o[i];if(a)return a}return null}function ne(){let e=0;for(const t of this)++e;return e}function oe(){return!this.node()}function ie(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i,r=t[n],a=0,l=r.length;a<l;++a)(i=r[a])&&e.call(i,i.__data__,a,r);return this}function re(e){return function(){this.removeAttribute(e)}}function ae(e){return function(){this.removeAttributeNS(e.space,e.local)}}function le(e,t){return function(){this.setAttribute(e,t)}}function ue(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function se(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function ce(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function de(e,t){var n=v(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((null==t?n.local?ae:re:"function"===typeof t?n.local?ce:se:n.local?ue:le)(n,t))}function he(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function fe(e){return function(){this.style.removeProperty(e)}}function pe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ve(e,t,n){return function(){var o=t.apply(this,arguments);null==o?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function ge(e,t,n){return arguments.length>1?this.each((null==t?fe:"function"===typeof t?ve:pe)(e,t,null==n?"":n)):me(this.node(),e)}function me(e,t){return e.style.getPropertyValue(t)||he(e).getComputedStyle(e,null).getPropertyValue(t)}function ye(e){return function(){delete this[e]}}function we(e,t){return function(){this[e]=t}}function _e(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function be(e,t){return arguments.length>1?this.each((null==t?ye:"function"===typeof t?_e:we)(e,t)):this.node()[e]}function xe(e){return e.trim().split(/^|\s+/)}function Ee(e){return e.classList||new ke(e)}function ke(e){this._node=e,this._names=xe(e.getAttribute("class")||"")}function Se(e,t){var n=Ee(e),o=-1,i=t.length;while(++o<i)n.add(t[o])}function Ne(e,t){var n=Ee(e),o=-1,i=t.length;while(++o<i)n.remove(t[o])}function Me(e){return function(){Se(this,e)}}function Ce(e){return function(){Ne(this,e)}}function Ie(e,t){return function(){(t.apply(this,arguments)?Se:Ne)(this,e)}}function Ae(e,t){var n=xe(e+"");if(arguments.length<2){var o=Ee(this.node()),i=-1,r=n.length;while(++i<r)if(!o.contains(n[i]))return!1;return!0}return this.each(("function"===typeof t?Ie:t?Me:Ce)(n,t))}function $e(){this.textContent=""}function Te(e){return function(){this.textContent=e}}function Be(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function Pe(e){return arguments.length?this.each(null==e?$e:("function"===typeof e?Be:Te)(e)):this.node().textContent}function ze(){this.innerHTML=""}function Re(e){return function(){this.innerHTML=e}}function De(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function Oe(e){return arguments.length?this.each(null==e?ze:("function"===typeof e?De:Re)(e)):this.node().innerHTML}function Ve(){this.nextSibling&&this.parentNode.appendChild(this)}function Xe(){return this.each(Ve)}function Le(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function We(){return this.each(Le)}function He(e){var t="function"===typeof e?e:y(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Ge(){return null}function Ye(e,t){var n="function"===typeof e?e:y(e),o=null==t?Ge:"function"===typeof t?t:_(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Fe(){var e=this.parentNode;e&&e.removeChild(this)}function Ue(){return this.each(Fe)}function Ke(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function je(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ze(e){return this.select(e?je:Ke)}function qe(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Qe(e){return function(t){e.call(this,t,this.__data__)}}function Je(e){return e.trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function et(e){return function(){var t=this.__on;if(t){for(var n,o=0,i=-1,r=t.length;o<r;++o)n=t[o],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function tt(e,t,n){return function(){var o,i=this.__on,r=Qe(t);if(i)for(var a=0,l=i.length;a<l;++a)if((o=i[a]).type===e.type&&o.name===e.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=r,o.options=n),void(o.value=t);this.addEventListener(e.type,r,n),o={type:e.type,name:e.name,value:t,listener:r,options:n},i?i.push(o):this.__on=[o]}}function nt(e,t,n){var o,i,r=Je(e+""),a=r.length;if(!(arguments.length<2)){for(l=t?tt:et,o=0;o<a;
1++o)this.each(l(r[o],t,n));return this}var l=this.node().__on;if(l)for(var u,s=0,c=l.length;s<c;++s)for(o=0,u=l[s];o<a;++o)if((i=r[o]).type===u.type&&i.name===u.name)return u.value}function ot(e,t,n){var o=he(e),i=o.CustomEvent;"function"===typeof i?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function it(e,t){return function(){return ot(this,e,t)}}function rt(e,t){return function(){return ot(this,e,t.apply(this,arguments))}}function at(e,t){return this.each(("function"===typeof t?rt:it)(e,t))}function*lt(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o,i=e[t],r=0,a=i.length;r<a;++r)(o=i[r])&&(yield o)}X.prototype={constructor:X,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},ke.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var ut=[null];function st(e,t){this._groups=e,this._parents=t}function ct(){return new st([[document.documentElement]],ut)}function dt(){return this}function ht(e){return"string"===typeof e?new st([[document.querySelector(e)]],[document.documentElement]):new st([[e]],ut)}function ft(e){let t;while(t=e.sourceEvent)e=t;return e}function pt(e,t){if(e=ft(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}st.prototype=ct.prototype={constructor:st,select:b,selectAll:N,selectChild:T,selectChildren:R,filter:D,data:Y,enter:V,exit:U,join:K,merge:j,selection:dt,order:Z,sort:q,call:J,nodes:ee,node:te,size:ne,empty:oe,each:ie,attr:de,style:ge,property:be,classed:Ae,text:Pe,html:Oe,raise:Xe,lower:We,append:He,insert:Ye,remove:Ue,clone:Ze,datum:qe,on:nt,dispatch:at,[Symbol.iterator]:lt};const vt={capture:!0,passive:!1};function gt(e){e.preventDefault(),e.stopImmediatePropagation()}function mt(e){var t=e.document.documentElement,n=ht(e).on("dragstart.drag",gt,vt);"onselectstart"in t?n.on("selectstart.drag",gt,vt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function yt(e,t){var n=e.document.documentElement,o=ht(e).on("dragstart.drag",null);t&&(o.on("click.drag",gt,vt),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function wt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function _t(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function bt(){}var xt=.7,Et=1/xt,kt="\\s*([+-]?\\d+)\\s*",St="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Nt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mt=/^#([0-9a-f]{3,8})$/,Ct=new RegExp(`^rgb\\(${kt},${kt},${kt}\\)$`),It=new RegExp(`^rgb\\(${Nt},${Nt},${Nt}\\)$`),At=new RegExp(`^rgba\\(${kt},${kt},${kt},${St}\\)$`),$t=new RegExp(`^rgba\\(${Nt},${Nt},${Nt},${St}\\)$`),Tt=new RegExp(`^hsl\\(${St},${Nt},${Nt}\\)$`),Bt=new RegExp(`^hsla\\(${St},${Nt},${Nt},${St}\\)$`),Pt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function zt(){return this.rgb().formatHex()}function Rt(){return this.rgb().formatHex8()}function Dt(){return Qt(this).formatHsl()}function Ot(){return this.rgb().formatRgb()}function Vt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Mt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Xt(t):3===n?
vendor: 3,710 bytes, line 1
1new Gt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Lt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Lt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ct.exec(e))?new Gt(t[1],t[2],t[3],1):(t=It.exec(e))?new Gt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=At.exec(e))?Lt(t[1],t[2],t[3],t[4]):(t=$t.exec(e))?Lt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Tt.exec(e))?qt(t[1],t[2]/100,t[3]/100,1):(t=Bt.exec(e))?qt(t[1],t[2]/100,t[3]/100,t[4]):Pt.hasOwnProperty(e)?Xt(Pt[e]):"transparent"===e?new Gt(NaN,NaN,NaN,0):null}function Xt(e){return new Gt(e>>16&255,e>>8&255,255&e,1)}function Lt(e,t,n,o){return o<=0&&(e=t=n=NaN),new Gt(e,t,n,o)}function Wt(e){return e instanceof bt||(e=Vt(e)),e?(e=e.rgb(),new Gt(e.r,e.g,e.b,e.opacity)):new Gt}function Ht(e,t,n,o){return 1===arguments.length?Wt(e):new Gt(e,t,n,null==o?1:o)}function Gt(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}function Yt(){return`#${Zt(this.r)}${Zt(this.g)}${Zt(this.b)}`}function Ft(){return`#${Zt(this.r)}${Zt(this.g)}${Zt(this.b)}${Zt(255*(isNaN(this.opacity)?1:this.opacity))}`}function Ut(){const e=Kt(this.opacity);return`${1===e?"rgb(":"rgba("}${jt(this.r)}, ${jt(this.g)}, ${jt(this.b)}${1===e?")":`, ${e})`}`}function Kt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function jt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zt(e){return e=jt(e),(e<16?"0":"")+e.toString(16)}function qt(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new en(e,t,n,o)}function Qt(e){if(e instanceof en)return new en(e.h,e.s,e.l,e.opacity);if(e instanceof bt||(e=Vt(e)),!e)return new en;if(e instanceof en)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),a=NaN,l=r-i,u=(r+i)/2;return l?(a=t===r?(n-o)/l+6*(n<o):n===r?(o-t)/l+2:(t-n)/l+4,l/=u<.5?r+i:2-r-i,a*=60):l=u>0&&u<1?0:a,new en(a,l,u,e.opacity)}function Jt(e,t,n,o){return 1===arguments.length?Qt(e):new en(e,t,n,null==o?1:o)}function en(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}function tn(e){return e=(e||0)%360,e<0?e+360:e}function nn(e){return Math.max(0,Math.min(1,e||0))}function on(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}wt(bt,Vt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:zt,formatHex:zt,formatHex8:Rt,formatHsl:Dt,formatRgb:Ot,toString:Ot}),wt(Gt,Ht,_t(bt,{brighter(e){return e=null==e?Et:Math.pow(Et,e),new Gt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?xt:Math.pow(xt,e),new Gt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Gt(jt(this.r),jt(this.g),jt(this.b),Kt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Yt,formatHex:Yt,formatHex8:Ft,formatRgb:Ut,toString:Ut})),wt(en,Jt,_t(bt,{brighter(e){return e=null==e?Et:Math.pow(Et,e),new en(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?xt:Math.pow(xt,e),new en(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new Gt(on(e>=240?e-240:e+120,i,o),on(e,i,o),on(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new en(tn(this.h),nn(this.s),nn(this.l),Kt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Kt(this.opacity);return`${1===e?"hsl(":"hsla("}${tn(this.h)}, ${100*nn(this.s)}%, ${100*nn(this.l)}%${1===e?")":`, ${e})`}`}}));const rn=e=>()=>e;function an(e,t){return function(n){return e+n*t}}
1function ln(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function un(e){return 1===(e=+e)?sn:function(t,n){return n-t?ln(t,n,e):rn(isNaN(t)?n:t)}}function sn(e,t){var n=t-e;return n?an(e,n):rn(isNaN(e)?t:e)}const cn=function e(t){var n=un(t);function o(e,t){var o=n((e=Ht(e)).r,(t=Ht(t)).r),i=n(e.g,t.g),r=n(e.b,t.b),a=sn(e.opacity,t.opacity);return function(t){return e.r=o(t),e.g=i(t),e.b=r(t),e.opacity=a(t),e+""}}return o.gamma=e,o}(1);function dn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var hn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fn=new RegExp(hn.source,"g");function pn(e){return function(){return e}}function vn(e){return function(t){return e(t)+""}}function gn(e,t){var n,o,i,r=hn.lastIndex=fn.lastIndex=0,a=-1,l=[],u=[];e+="",t+="";while((n=hn.exec(e))&&(o=fn.exec(t)))(i=o.index)>r&&(i=t.slice(r,i),l[a]?l[a]+=i:l[++a]=i),(n=n[0])===(o=o[0])?l[a]?l[a]+=o:l[++a]=o:(l[++a]=null,u.push({i:a,x:dn(n,o)})),r=fn.lastIndex;return r<t.length&&(i=t.slice(r),l[a]?l[a]+=i:l[++a]=i),l.length<2?u[0]?vn(u[0].x):pn(t):(t=u.length,function(e){for(var n,o=0;o<t;++o)l[(n=u[o]).i]=n.x(e);return l.join("")})}var mn,yn=180/Math.PI,wn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _n(e,t,n,o,i,r){var a,l,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*o)&&(n-=e*u,o-=t*u),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,u/=l),e*o<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*yn,skewX:Math.atan(u)*yn,scaleX:a,scaleY:l}}function bn(e){const t=new("function"===typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?wn:_n(t.a,t.b,t.c,t.d,t.e,t.f)}function xn(e){return null==e?wn:(mn||(mn=document.createElementNS("http://www.w3.org/2000/svg","g")),mn.setAttribute("transform",e),(e=mn.transform.baseVal.consolidate())?(e=e.matrix,_n(e.a,e.b,e.c,e.d,e.e,e.f)):wn)}function En(e,t,n,o){function i(e){return e.length?e.pop()+" ":""}function r(e,o,i,r,a,l){if(e!==i||o!==r){var u=a.push("translate(",null,t,null,n);l.push({i:u-4,x:dn(e,i)},{i:u-2,x:dn(o,r)})}else(i||r)&&a.push("translate("+i+t+r+n)}function a(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(i(n)+"rotate(",null,o)-2,x:dn(e,t)})):t&&n.push(i(n)+"rotate("+t+o)}function l(e,t,n,r){e!==t?r.push({i:n.push(i(n)+"skewX(",null,o)-2,x:dn(e,t)}):t&&n.push(i(n)+"skewX("+t+o)}function u(e,t,n,o,r,a){if(e!==n||t!==o){var l=r.push(i(r)+"scale(",null,",",null,")");a.push({i:l-4,x:dn(e,n)},{i:l-2,x:dn(t,o)})}else 1===n&&1===o||r.push(i(r)+"scale("+n+","+o+")")}return function(t,n){var o=[],i=[];return t=e(t),n=e(n),r(t.translateX,t.translateY,n.translateX,n.translateY,o,i),a(t.rotate,n.rotate,o,i),l(t.skewX,n.skewX,o,i),u(t.scaleX,t.scaleY,n.scaleX,n.scaleY,o,i),t=n=null,function(e){var t,n=-1,r=i.length;while(++n<r)o[(t=i[n]).i]=t.x(e);return o.join("")}}}var kn=En(bn,"px, ","px)","deg)"),Sn=En(xn,", ",")",")"),Nn=1e-12;function Mn(e){return((e=Math.exp(e))+1/e)/2}function Cn(e){return((e=Math.exp(e))-1/e)/2}function In(e){return((e=Math.exp(2*e))-1)/(e+1)}const An=function e(t,n,o){function i(e,i){var r,a,l=e[0],u=e[1],s=e[2],c=i[0],d=i[1],h=i[2],f=c-l,p=d-u,v=f*f+p*p;if(v<Nn)a=Math.log(h/s)/t,r=function(e){return[l+e*f,u+e*p,s*Math.exp(t*e*a)]};else{var g=Math.sqrt(v),m=(h*h-s*s+o*v)/(2*s*n*g),y=(h*h-s*s-o*v)/(2*h*n*g),w=Math.log(Math.sqrt(m*m+1)-m),_=Math.log(Math.sqrt(y*y+1)-y);a=(_-w)/t,r=function(e){var o=e*a,i=Mn(w),r=s/(n*g)*(i*In(t*o+w)-Cn(w));return[l+r*f,u+r*p,s*i/Mn(t*o+w)]}}return r.duration=1e3*a*t/Math.SQRT2,r}return i.rho=function(t){var n=Math.max(.001,+t),o=n*n,i=o*o;return e(n,o,i)},i}(Math.SQRT2,2,4);var $n,Tn,Bn=0,Pn=0,zn=0,Rn=1e3,Dn=0,On=0,Vn=0,Xn="object"===typeof performance&&performance.now?performance:Date,Ln="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Wn(){return On||(Ln(Hn),On=Xn.now()+Vn)}function Hn(){On=0}function Gn(){this._call=this._time=this._next=null}function Yn(e,t,n){var o=new Gn;return o.restart(e,t,n),o}function Fn(){Wn(),++Bn;var e,t=$n;while(t)(e=On-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Bn}function Un(){On=(Dn=Xn.now())+Vn,Bn=Pn=0;try{Fn()}finally{Bn=0,jn(),On=0}}function Kn(){var e=Xn.now(),t=e-Dn;t>Rn&&(Vn-=t,Dn=e)}function jn(){var e,t,n=$n,o=1/0;while(n)n._call?(o>n._time&&(o=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:$n=t);Tn=e,Zn(o)}function Zn(e){if(!Bn){Pn&&(Pn=clearTimeout(Pn));var t=e-On;t>24?(e<1/0&&(Pn=setTimeout(Un,e-Xn.now()-Vn)),zn&&(zn=clearInterval(zn))):(zn||(Dn=Xn.now(),zn=setInterval(Kn,Rn)),Bn=1,Ln(Un))}}
1function qn(e,t,n){var o=new Gn;return t=null==t?0:+t,o.restart(n=>{o.stop(),e(n+t)},t,n),o}Gn.prototype=Yn.prototype={constructor:Gn,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?Wn():+n)+(null==t?0:+t),this._next||Tn===this||(Tn?Tn._next=this:$n=this,Tn=this),this._call=e,this._time=n,Zn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zn())}};var Qn=u("start","end","cancel","interrupt"),Jn=[],eo=0,to=1,no=2,oo=3,io=4,ro=5,ao=6;function lo(e,t,n,o,i,r){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};ho(e,n,{name:t,index:o,group:i,on:Qn,tween:Jn,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:eo})}function uo(e,t){var n=co(e,t);if(n.state>eo)throw new Error("too late; already scheduled");return n}function so(e,t){var n=co(e,t);if(n.state>oo)throw new Error("too late; already running");return n}function co(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function ho(e,t,n){var o,i=e.__transition;function r(e){n.state=to,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(r){var s,c,d,h;if(n.state!==to)return u();for(s in i)if(h=i[s],h.name===n.name){if(h.state===oo)return qn(a);h.state===io?(h.state=ao,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[s]):+s<t&&(h.state=ao,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[s])}if(qn(function(){n.state===oo&&(n.state=io,n.timer.restart(l,n.delay,n.time),l(r))}),n.state=no,n.on.call("start",e,e.__data__,n.index,n.group),n.state===no){for(n.state=oo,o=new Array(d=n.tween.length),s=0,c=-1;s<d;++s)(h=n.tween[s].value.call(e,e.__data__,n.index,n.group))&&(o[++c]=h);o.length=c+1}}function l(t){var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(u),n.state=ro,1),r=-1,a=o.length;while(++r<a)o[r].call(e,i);n.state===ro&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){for(var o in n.state=ao,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=Yn(r,0,n.time)}function fo(e,t){var n,o,i,r=e.__transition,a=!0;if(r){for(i in t=null==t?null:t+"",r)(n=r[i]).name===t?(o=n.state>no&&n.state<ro,n.state=ao,n.timer.stop(),n.on.call(o?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[i]):a=!1;a&&delete e.__transition}}function po(e){return this.each(function(){fo(this,e)})}function vo(e,t){var n,o;return function(){var i=so(this,e),r=i.tween;if(r!==n){o=n=r;for(var a=0,l=o.length;a<l;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}i.tween=o}}function go(e,t,n){var o,i;if("function"!==typeof n)throw new Error;return function(){var r=so(this,e),a=r.tween;if(a!==o){i=(o=a).slice();for(var l={name:t,value:n},u=0,s=i.length;u<s;++u)if(i[u].name===t){i[u]=l;break}u===s&&i.push(l)}r.tween=i}}function mo(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o,i=co(this.node(),n).tween,r=0,a=i.length;r<a;++r)if((o=i[r]).name===e)return o.value;return null}return this.each((null==t?vo:go)(n,e,t))}function yo(e,t,n){var o=e._id;return e.each(function(){var e=so(this,o);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return co(e,o).value[t]}}function wo(e,t){var n;return("number"===typeof t?dn:t instanceof Vt?cn:(n=Vt(t))?(t=n,cn):gn)(e,t)}function _o(e){return function(){this.removeAttribute(e)}}function bo(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xo(e,t,n){var o,i,r=n+"";return function(){var a=this.getAttribute(e);return a===r?null:a===o?i:i=t(o=a,n)}}function Eo(e,t,n){var o,i,r=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===o?i:i=t(o=a,n)}}function ko(e,t,n){var o,i,r;return function(){var a,l,u=n(this);if(null!=u)return a=this.getAttribute(e),l=u+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,u));this.removeAttribute(e)}}function So(e,t,n){var o,i,r;return function(){var a,l,u=n(this);if(null!=u)return a=this.getAttributeNS(e.space,e.local),l=u+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,u));this.removeAttributeNS(e.space,e.local)}}function No(e,t){var n=v(e),o="transform"===n?Sn:wo;return this.attrTween(e,"function"===typeof t?(n.local?So:ko)(n,o,yo(this,"attr."+e,t)):null==t?(n.local?bo:_o)(n):(n.local?Eo:xo)(n,o,t))}function Mo(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Co(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Io(e,t){var n,o;function i(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Co(e,i)),n}return i._value=t,i}function Ao(e,t){var n,o;function i(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Mo(e,i)),n}return i._value=t,i}function $o(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!==typeof t)throw new Error;var o=v(e);return this.tween(n,(o.local?Io:Ao)(o,t))}function To(e,t){return function(){uo(this,e).delay=+t.apply(this,arguments)}}function Bo(e,t){return t=+t,function(){uo(this,e).delay=t}}function Po(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?To:Bo)(t,e)):co(this.node(),t).delay}function zo(e,t){return function(){so(this,e).duration=+t.apply(this,arguments)}}function Ro(e,t){return t=+t,function(){so(this,e).duration=t}}function Do(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?zo:Ro)(t,e)):co(this.node(),t).duration}function Oo(e,t){if("function"!==typeof t)throw new Error;return function(){so(this,e).ease=t}}function Vo(e){var t=this._id;return arguments.length?this.each(Oo(t,e)):co(this.node(),t).ease}function Xo(e,t){return function(){var n=t.apply(this,arguments);if("function"!==typeof n)throw new Error;so(this,e).ease=n}}function Lo(e){if("function"!==typeof e)throw new Error;return this.each(Xo(this._id,e))}function Wo(e){"function"!==typeof e&&(e=M(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a=t[i],l=a.length,u=o[i]=[],s=0;s<l;++s)(r=a[s])&&e.call(r,r.__data__,s,a)&&u.push(r);return new mi(o,this._parents,this._name,this._id)}function Ho(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),a=new Array(o),l=0;l<r;++l)for(var u,s=t[l],c=n[l],d=s.length,h=a[l]=new Array(d),f=0;f<d;++f)(u=s[f]||c[f])&&(h[f]=u);for(;l<o;++l)a[l]=t[l];return new mi(a,this._parents,this._name,this._id)}function Go(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}function Yo(e,t,n){var o,i,r=Go(t)?uo:so;return function(){var a=r(this,e),l=a.on;l!==o&&(i=(o=l).copy()).on(t,n),a.on=i}}function Fo(e,t){var n=this._id;return arguments.length<2?co(this.node(),n).on.on(e):this.each(Yo(n,e,t))}function Uo(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Ko(){return this.on("end.remove",Uo(this._id))}function jo(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=_(e));for(var o=this._groups,i=o.length,r=new Array(i),a=0;a<i;++a)for(var l,u,s=o[a],c=s.length,d=r[a]=new Array(c),h=0;h<c;++h)(l=s[h])&&(u=e.call(l,l.__data__,h,s))&&("__data__"in l&&(u.__data__=l.__data__),d[h]=u,lo(d[h],t,n,h,d,co(l,n)));return new mi(r,this._parents,t,n)}function Zo(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=k(e));for(var o=this._groups,i=o.length,r=[],a=[],l=0;l<i;++l)for(var u,s=o[l],c=s.length,d=0;d<c;++d)if(u=s[d]){for(var h,f=e.call(u,u.__data__,d,s),p=co(u,n),v=0,g=f.length;v<g;++v)(h=f[v])&&lo(h,t,n,v,f,p);
1r.push(f),a.push(u)}return new mi(r,a,t,n)}var qo=ct.prototype.constructor;function Qo(){return new qo(this._groups,this._parents)}function Jo(e,t){var n,o,i;return function(){var r=me(this,e),a=(this.style.removeProperty(e),me(this,e));return r===a?null:r===n&&a===o?i:i=t(n=r,o=a)}}function ei(e){return function(){this.style.removeProperty(e)}}function ti(e,t,n){var o,i,r=n+"";return function(){var a=me(this,e);return a===r?null:a===o?i:i=t(o=a,n)}}function ni(e,t,n){var o,i,r;return function(){var a=me(this,e),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(e),u=l=me(this,e)),a===u?null:a===o&&u===i?r:(i=u,r=t(o=a,l))}}function oi(e,t){var n,o,i,r,a="style."+t,l="end."+a;return function(){var u=so(this,e),s=u.on,c=null==u.value[a]?r||(r=ei(t)):void 0;s===n&&i===c||(o=(n=s).copy()).on(l,i=c),u.on=o}}function ii(e,t,n){var o="transform"===(e+="")?kn:wo;return null==t?this.styleTween(e,Jo(e,o)).on("end.style."+e,ei(e)):"function"===typeof t?this.styleTween(e,ni(e,o,yo(this,"style."+e,t))).each(oi(this._id,e)):this.styleTween(e,ti(e,o,t),n).on("end.style."+e,null)}function ri(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function ai(e,t,n){var o,i;function r(){var r=t.apply(this,arguments);return r!==i&&(o=(i=r)&&ri(e,r,n)),o}return r._value=t,r}function li(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(null==t)return this.tween(o,null);if("function"!==typeof t)throw new Error;return this.tween(o,ai(e,t,null==n?"":n))}function ui(e){return function(){this.textContent=e}}function si(e){return function(){var t=e(this);this.textContent=null==t?"":t}}function ci(e){return this.tween("text","function"===typeof e?si(yo(this,"text",e)):ui(null==e?"":e+""))}function di(e){return function(t){this.textContent=e.call(this,t)}}function hi(e){var t,n;function o(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&di(o)),t}return o._value=e,o}function fi(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!==typeof e)throw new Error;return this.tween(t,hi(e))}function pi(){for(var e=this._name,t=this._id,n=yi(),o=this._groups,i=o.length,r=0;r<i;++r)for(var a,l=o[r],u=l.length,s=0;s<u;++s)if(a=l[s]){var c=co(a,t);lo(a,e,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new mi(o,this._parents,e,n)}function vi(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,a){var l={value:a},u={value:function(){0===--i&&r()}};n.each(function(){var n=so(this,o),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),n.on=t}),0===i&&r()})}var gi=0;function mi(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function yi(){return++gi}var wi=ct.prototype;function _i(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}mi.prototype={constructor:mi,select:jo,selectAll:Zo,selectChild:wi.selectChild,selectChildren:wi.selectChildren,filter:Wo,merge:Ho,selection:Qo,transition:pi,call:wi.call,nodes:wi.nodes,node:wi.node,size:wi.size,empty:wi.empty,each:wi.each,on:Fo,attr:No,attrTween:$o,style:ii,styleTween:li,text:ci,textTween:fi,remove:Ko,tween:mo,delay:Po,duration:Do,ease:Vo,easeVarying:Lo,end:vi,[Symbol.iterator]:wi[Symbol.iterator]};var bi={time:null,delay:0,duration:250,ease:_i};function xi(e,t){var n;while(!(n=e.__transition)||!(n=n[t]))if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Ei(e){var t,n;e instanceof mi?(t=e._id,e=e._name):(t=yi(),(n=bi).time=Wn(),e=null==e?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var a,l=o[r],u=l.length,s=0;s<u;++s)(a=l[s])&&lo(a,e,t,s,l,n||xi(a,t));return new mi(o,this._parents,e,t)}ct.prototype.interrupt=po,ct.prototype.transition=Ei;const ki=e=>()=>e;function Si(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Ni(e,t,n){this.k=e,this.x=t,this.y=n}Ni.prototype={constructor:Ni,scale:function(e){return 1===e?this:new Ni(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Ni(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Mi=new Ni(1,0,0);function Ci(e){e.stopImmediatePropagation()}function Ii(e){e.preventDefault(),e.stopImmediatePropagation()}function Ai(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function $i(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Ti(){return this.__zoom||Mi}function Bi(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?
vendor: 5,874 bytes, line 1
11:.002)*(e.ctrlKey?10:1)}function Pi(){return navigator.maxTouchPoints||"ontouchstart"in this}function zi(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}function Ri(){var e,t,n,o=Ai,i=$i,r=zi,a=Bi,l=Pi,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=An,f=u("start","zoom","end"),p=500,v=150,g=0,m=10;function y(e){e.property("__zoom",Ti).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",N).on("dblclick.zoom",M).filter(l).on("touchstart.zoom",C).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",A).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(e,t){return t=Math.max(s[0],Math.min(s[1],t)),t===e.k?e:new Ni(t,e.x,e.y)}function _(e,t,n){var o=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return o===e.x&&i===e.y?e:new Ni(e.k,o,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,t,n,o){e.on("start.zoom",function(){E(this,arguments).event(o).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(o).end()}).tween("zoom",function(){var e=this,r=arguments,a=E(e,r).event(o),l=i.apply(e,r),u=null==n?b(l):"function"===typeof n?n.apply(e,r):n,s=Math.max(l[1][0]-l[0][0],l[1][1]-l[0][1]),c=e.__zoom,d="function"===typeof t?t.apply(e,r):t,f=h(c.invert(u).concat(s/c.k),d.invert(u).concat(s/d.k));return function(e){if(1===e)e=d;else{var t=f(e),n=s/t[2];e=new Ni(n,u[0]-t[0]*n,u[1]-t[1]*n)}a.zoom(null,e)}})}function E(e,t,n){return!n&&e.__zooming||new k(e,t)}function k(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function S(e,...t){if(o.apply(this,arguments)){var n=E(this,t).event(e),i=this.__zoom,l=Math.max(s[0],Math.min(s[1],i.k*Math.pow(2,a.apply(this,arguments)))),u=pt(e);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=i.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(i.k===l)return;n.mouse=[u,i.invert(u)],fo(this),n.start()}Ii(e),n.wheel=setTimeout(d,v),n.zoom("mouse",r(_(w(i,l),n.mouse[0],n.mouse[1]),n.extent,c))}function d(){n.wheel=null,n.end()}}function N(e,...t){if(!n&&o.apply(this,arguments)){var i=e.currentTarget,a=E(this,t,!0).event(e),l=ht(e.view).on("mousemove.zoom",h,!0).on("mouseup.zoom",f,!0),u=pt(e,i),s=e.clientX,d=e.clientY;mt(e.view),Ci(e),a.mouse=[u,this.__zoom.invert(u)],fo(this),a.start()}function h(e){if(Ii(e),!a.moved){var t=e.clientX-s,n=e.clientY-d;a.moved=t*t+n*n>g}a.event(e).zoom("mouse",r(_(a.that.__zoom,a.mouse[0]=pt(e,i),a.mouse[1]),a.extent,c))}function f(e){l.on("mousemove.zoom mouseup.zoom",null),yt(e.view,a.moved),Ii(e),a.event(e).end()}}function M(e,...t){if(o.apply(this,arguments)){var n=this.__zoom,a=pt(e.changedTouches?e.changedTouches[0]:e,this),l=n.invert(a),u=n.k*(e.shiftKey?.5:2),s=r(_(w(n,u),a,l),i.apply(this,t),c);Ii(e),d>0?ht(this).transition().duration(d).call(x,s,a,e):ht(this).call(y.transform,s,a,e)}}function C(n,...i){if(o.apply(this,arguments)){var r,a,l,u,s=n.touches,c=s.length,d=E(this,i,n.changedTouches.length===c).event(n);for(Ci(n),a=0;a<c;++a)l=s[a],u=pt(l,this),u=[u,this.__zoom.invert(u),l.identifier],d.touch0?d.touch1||d.touch0[2]===u[2]||(d.touch1=u,d.taps=0):(d.touch0=u,r=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),r&&(d.taps<2&&(t=u[0],e=setTimeout(function(){e=null},p)),fo(this),d.start())}}function I(e,...t){if(this.__zooming){var n,o,i,a,l=E(this,t).event(e),u=e.changedTouches,s=u.length;for(Ii(e),n=0;n<s;++n)o=u[n],i=pt(o,this),l.touch0&&l.touch0[2]===o.identifier?l.touch0[0]=i:l.touch1&&l.touch1[2]===o.identifier&&(l.touch1[0]=i);if(o=l.that.__zoom,l.touch1){var d=l.touch0[0],h=l.touch0[1],f=l.touch1[0],p=l.touch1[1],v=(v=f[0]-d[0])*v+(v=f[1]-d[1])*v,g=(g=p[0]-h[0])*g+(g=p[1]-h[1])*g;o=w(o,Math.sqrt(v/g)),i=[(d[0]+f[0])/2,(d[1]+f[1])/2],a=[(h[0]+p[0])/2,(h[1]+p[1])/2]}else{if(!l.touch0)return;i=l.touch0[0],a=l.touch0[1]}l.zoom("touch",r(_(o,i,a),l.extent,c))}}function A(e,...o){if(this.__zooming){var i,r,a=E(this,o).event(e),l=e.changedTouches,u=l.length;for(Ci(e),n&&clearTimeout(n),n=setTimeout(function(){n=null},p),i=0;i<u;++i)r=l[i],a.touch0&&a.touch0[2]===r.identifier?delete a.touch0:a.touch1&&a.touch1[2]===r.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(r=pt(r,this),Math.hypot(t[0]-r[0],t[1]-r[1])<m)){var s=ht(this).on("dblclick.zoom");s&&s.apply(this,arguments)}}}return y.transform=function(e,t,n,o){var i=e.selection?e.selection():e;i.property("__zoom",Ti),e!==i?x(e,t,n,o):i.interrupt().each(function(){E(this,arguments).event(o).start().zoom(null,"function"===typeof t?t.apply(this,arguments):t).end()})},y.scaleBy=function(e,t,n,o){y.scaleTo(e,function(){var e=this.__zoom.k,n="function"===typeof t?t.apply(this,arguments):t;return e*n},n,o)},y.scaleTo=function(e,t,n,o){y.transform(e,function(){var e=i.apply(this,arguments),o=this.__zoom,a=null==n?b(e):"function"===typeof n?n.apply(this,arguments):n,l=o.invert(a),u="function"===typeof t?t.apply(this,arguments):t;return r(_(w(o,u),a,l),e,c)},n,o)},y.translateBy=function(e,t,n,o){y.transform(e,function(){return r(this.__zoom.translate("function"===typeof t?t.apply(this,arguments):t,"function"===typeof n?n.apply(this,arguments):n),i.apply(this,arguments),c)},null,o)},y.translateTo=function(e,t,n,o,a){y.transform(e,function(){var e=i.apply(this,arguments),a=this.__zoom,l=null==o?b(e):"function"===typeof o?o.apply(this,arguments):o;return r(Mi.translate(l[0],l[1]).scale(a.k).translate("function"===typeof t?-t.apply(this,arguments):-t,"function"===typeof n?-n.apply(this,arguments):-n),e,c)},o,a)},k.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit
1("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=ht(this.that).datum();f.call(e,this.that,new Si(e,{sourceEvent:this.sourceEvent,target:y,type:e,transform:this.that.__zoom,dispatch:f}),t)}},y.wheelDelta=function(e){return arguments.length?(a="function"===typeof e?e:ki(+e),y):a},y.filter=function(e){return arguments.length?(o="function"===typeof e?e:ki(!!e),y):o},y.touchable=function(e){return arguments.length?(l="function"===typeof e?e:ki(!!e),y):l},y.extent=function(e){return arguments.length?(i="function"===typeof e?e:ki([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),y):i},y.scaleExtent=function(e){return arguments.length?(s[0]=+e[0],s[1]=+e[1],y):[s[0],s[1]]},y.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],y):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},y.constrain=function(e){return arguments.length?(r=e,y):r},y.duration=function(e){return arguments.length?(d=+e,y):d},y.interpolate=function(e){return arguments.length?(h=e,y):h},y.on=function(){var e=f.on.apply(f,arguments);return e===f?y:e},y.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,y):Math.sqrt(g)},y.tapDistance=function(e){return arguments.length?(m=+e,y):m},y}Ni.prototype;const Di=Symbol("MiniMapSlots"),Oi=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],Vi={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},Xi=(0,o.pM)({...Vi,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,{emit:t}){const n=e,a=(0,o.WQ)(Di),l=(0,o.OA)(),u=(0,i.lW)(()=>l.style??{});function s(e){t("click",e)}function c(e){t("dblclick",e)}function d(e){t("mouseenter",e)}function h(e){t("mousemove",e)}function f(e){t("mouseleave",e)}return(e,t)=>e.hidden||0===e.dimensions.width||0===e.dimensions.height?(0,o.Q3)("",!0):((0,o.uX)(),(0,o.CE)(o.FK,{key:0},[(0,i.R1)(a)[`node-${n.type}`]?((0,o.uX)(),(0,o.Wv)((0,o.$y)((0,i.R1)(a)[`node-${n.type}`]),(0,r._B)((0,o.v6)({key:0},{...n,...e.$attrs})),null,16)):((0,o.uX)(),(0,o.CE)("rect",(0,o.v6)({key:1,id:e.id},e.$attrs,{class:["vue-flow__minimap-node",{selected:e.selected,dragging:e.dragging}],x:e.position.x,y:e.position.y,rx:e.borderRadius,ry:e.borderRadius,width:e.dimensions.width,height:e.dimensions.height,fill:e.color||u.value.background||u.value.backgroundColor,stroke:e.strokeColor,"stroke-width":e.strokeWidth,"shape-rendering":e.shapeRendering,onClick:s,onDblclick:c,onMouseenter:d,onMousemove:h,onMouseleave:f}),null,16,Oi))],64))}}),Li=["width","height","viewBox","aria-labelledby"],Wi=["id"],Hi=["d","fill","stroke","stroke-width"],Gi={name:"MiniMap",compatConfig:{MODE:3}},Yi=(0,o.pM)({...Gi,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,{emit:t}){const n=(0,o.Ht)(),l=(0,o.OA)(),u=200,s=150,{id:c,edges:d,viewport:h,translateExtent:f,dimensions:p,emits:v,d3Selection:g,d3Zoom:m,getNodesInitialized:y}=(0,a.Id)(),w=(0,i.KR)();(0,o.Gt)(Di,n);const _=(0,i.lW)(()=>{var t;return e.width??(null==(t=l.style)?void 0:t.width)??u}),b=(0,i.lW)(()=>{var t;return e.height??(null==(t=l.style)?void 0:t.height)??s}),x="undefined"===typeof window||window.chrome?"crispEdges":"geometricPrecision",E=(0,o.EW)(()=>"string"===typeof e.nodeColor?()=>e.nodeColor:e.nodeColor),k=(0,o.EW)(()=>"string"===typeof e.nodeStrokeColor?()=>e.nodeStrokeColor:e.nodeStrokeColor),S=(0,o.EW)(()=>"string"===typeof e.nodeClassName?()=>e.nodeClassName:"function"===typeof e.nodeClassName?e.nodeClassName:()=>""),N=(0,o.EW)(()=>(0,a.vf)(y.value.filter(e=>!e.hidden))),M=(0,o.EW)(()=>
1({x:-h.value.x/h.value.zoom,y:-h.value.y/h.value.zoom,width:p.value.width/h.value.zoom,height:p.value.height/h.value.zoom})),C=(0,o.EW)(()=>y.value&&y.value.length?(0,a.Um)(N.value,M.value):M.value),I=(0,o.EW)(()=>{const e=C.value.width/_.value,t=C.value.height/b.value;return Math.max(e,t)}),A=(0,o.EW)(()=>{const t=I.value*_.value,n=I.value*b.value,o=e.offsetScale*I.value;return{offset:o,x:C.value.x-(t-C.value.width)/2-o,y:C.value.y-(n-C.value.height)/2-o,width:t+2*o,height:n+2*o}}),$=(0,o.EW)(()=>A.value.x&&A.value.y?`\n    M${A.value.x-A.value.offset},${A.value.y-A.value.offset}\n    h${A.value.width+2*A.value.offset}\n    v${A.value.height+2*A.value.offset}\n    h${-A.value.width-2*A.value.offset}z\n    M${M.value.x+e.maskBorderRadius},${M.value.y}\n    h${M.value.width-2*e.maskBorderRadius}\n    a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 ${e.maskBorderRadius},${e.maskBorderRadius}\n    v${M.value.height-2*e.maskBorderRadius}\n    a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 -${e.maskBorderRadius},${e.maskBorderRadius}\n    h${-(M.value.width-2*e.maskBorderRadius)}\n    a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 -${e.maskBorderRadius},-${e.maskBorderRadius}\n    v${-(M.value.height-2*e.maskBorderRadius)}\n    a${e.maskBorderRadius},${e.maskBorderRadius} 0 0 1 ${e.maskBorderRadius},-${e.maskBorderRadius}z`:"");function T(e){const[n,o]=pt(e);t("click",{event:e,position:{x:n,y:o}})}function B(e,n){const o={event:e,node:n,connectedEdges:(0,a.AX)([n],d.value)};v.miniMapNodeClick(o),t("nodeClick",o)}function P(e,n){const o={event:e,node:n,connectedEdges:(0,a.AX)([n],d.value)};v.miniMapNodeDoubleClick(o),t("nodeDblclick",o)}function z(e,n){const o={event:e,node:n,connectedEdges:(0,a.AX)([n],d.value)};v.miniMapNodeMouseEnter(o),t("nodeMouseenter",o)}function R(e,n){const o={event:e,node:n,connectedEdges:(0,a.AX)([n],d.value)};v.miniMapNodeMouseMove(o),t("nodeMousemove",o)}function D(e,n){const o={event:e,node:n,connectedEdges:(0,a.AX)([n],d.value)};v.miniMapNodeMouseLeave(o),t("nodeMouseleave",o)}return(0,o.nT)(t=>{if(w.value){const n=ht(w.value),o=t=>{if("wheel"!==t.sourceEvent.type||!g.value||!m.value)return;const n=t.sourceEvent.ctrlKey&&(0,a.Ue)()?10:1,o=-t.sourceEvent.deltaY*(1===t.sourceEvent.deltaMode?.05:t.sourceEvent.deltaMode?1:.002)*e.zoomStep,i=h.value.zoom*2**(o*n);m.value.scaleTo(g.value,i)},i=t=>{if("mousemove"!==t.sourceEvent.type||!g.value||!m.value)return;const n=I.value*Math.max(1,h.value.zoom)*(e.inversePan?-1:1),o={x:h.value.x-t.sourceEvent.movementX*n,y:h.value.y-t.sourceEvent.movementY*n},i=[[0,0],[p.value.width,p.value.height]],r=Mi.translate(o.x,o.y).scale(h.value.zoom),a=m.value.constrain()(r,i,f.value);m.value.transform(g.value,a)},r=Ri().wheelDelta(t=>(0,a.iz)(t)*(e.zoomStep/10)).on("zoom",e.pannable?i:()=>{}).on("zoom.wheel",e.zoomable?o:()=>{});n.call(r),t(()=>{n.on("zoom",null)})}},{flush:"post"}),(e,t)=>((0,o.uX)(),(0,o.Wv)((0,i.R1)(a.Zk),{position:e.position,class:(0,r.C4)(["vue-flow__minimap",{pannable:e.pannable,zoomable:e.zoomable}])},{default:(0,o.k6)(()=>[((0,o.uX)(),(0,o.CE)("svg",{ref_key:"el",ref:w,width:_.value,height:b.value,viewBox:[A.value.x,A.value.y,A.value.width,A.value.height].join(" "),role:"img","aria-labelledby":`vue-flow__minimap-${(0,i.R1)(c)}`,onClick:T},[e.ariaLabel?((0,o.uX)(),(0,o.CE)("title",{key:0,id:`vue-flow__minimap-${(0,i.R1)(c)}`},(0,r.v_)(e.ariaLabel),9,Wi)):(0,o.Q3)("",!0),((0,o.uX)(!0),(0,o.CE)(o.FK,null,(0,o.pI)((0,i.R1)(y),t=>((0,o.uX)(),(0,o.Wv)(Xi,{id:t.id,key:t.id,f:"",position:t.computedPosition,dimensions:t.dimensions,selected:t.selected,dragging:t.dragging,style:(0,r.Tr)(t.style),class:(0,r.C4)(S.value(t)),color:E.value(t),"border-radius":e.nodeBorderRadius,"stroke-color":k.value(t),"stroke-width":e.nodeStrokeWidth,"shape-rendering":(0,i.R1)(x),type:t.type,hidden:t.hidden,onClick:e=>B(e,t),onDblclick:e=>P(e,t),onMouseenter:e=>z(e,t),onMousemove:e=>R(e,t),onMouseleave:e=>D(e,t)},null,8,["id","position","dimensions","selected","dragging","style","class","color","border-radius","stroke-color","stroke-width","shape-rendering","type","hidden","onClick","onDblclick","onMouseenter","onMousemove","onMouseleave"]))),128)),(0,o.Lk)("path",{class:"vue-flow__minimap-mask",d:$.value,fill:e.maskColor,stroke:e.maskStrokeColor,"stroke-width":e.maskStrokeWidth,"fill-rule":"evenodd"},null,8,Hi)],8,Li))]),_:1},8,["position","class"]))}})},75408:function(e,t,n){n.d(t,{AX:function(){return ha},Id:function(){return Yu},Ue:function(){return Za},Um:function(){return sa},Zk:function(){return Xs},_3:function(){return Nr},h7:function(){return tu},iz:function(){return _a},nO:function(){return Os},vf:function(){return ca},yX:function(){return _r}});var o=n(50953),i=n(20641),r=n(90033);function a(e){return!!(0,o.o5)()&&((0,o.jr)(e),!0)}function l(e){return"function"===typeof e?e():(0,o.R1)(e)}const u="undefined"!==typeof window&&"undefined"!==typeof document,s=e=>"undefined"!==typeof e,c=Object.prototype.toString,d=e=>"[object Object]"===c.call(e),h=()=>{};function f(e,t){function n(...n){return new Promise((o,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(o).catch(i)})}return n}const p=e=>e();function v(e=p){const t=(0,o.KR)(!0);function n(){t.value=!1}function i(){t.value=!0}const r=(...n)=>{t.value&&e(...n)};return{isActive:(0,o.tB)(t),pause:n,resume:i,eventFilter:r}}function g(e,t=!1,n="Timeout"){return new Promise((o,i)=>{t?setTimeout(()=>i(n),e):setTimeout(o,e)})}function m(e,t,n={}){const{eventFilter:o=p,...r}=n;return(0,i.wB)(e,f(o,t),r)}function y(e,t,n={}){const{eventFilter:o,...i}
1=n,{eventFilter:r,pause:a,resume:l,isActive:u}=v(o),s=m(e,t,{...i,eventFilter:r});return{stop:s,pause:a,resume:l,isActive:u}}function w(e,t={}){if(!(0,o.i9)(e))return(0,o.QW)(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const i in e.value)n[i]=(0,o.rY)(()=>({get(){return e.value[i]},set(n){var o;const r=null==(o=l(t.replaceRef))||o;if(r)if(Array.isArray(e.value)){const t=[...e.value];t[i]=n,e.value=t}else{const t={...e.value,[i]:n};Object.setPrototypeOf(t,Object.getPrototypeOf(e.value)),e.value=t}else e.value[i]=n}}));return n}function _(e,t=!1){function n(n,{flush:o="sync",deep:r=!1,timeout:a,throwOnTimeout:u}={}){let s=null;const c=new Promise(a=>{s=(0,i.wB)(e,e=>{n(e)!==t&&(null==s||s(),a(e))},{flush:o,deep:r,immediate:!0})}),d=[c];return null!=a&&d.push(g(a,u).then(()=>l(e)).finally(()=>null==s?void 0:s())),Promise.race(d)}function r(r,a){if(!(0,o.i9)(r))return n(e=>e===r,a);const{flush:u="sync",deep:s=!1,timeout:c,throwOnTimeout:d}=null!=a?a:{};let h=null;const f=new Promise(n=>{h=(0,i.wB)([e,r],([e,o])=>{t!==(e===o)&&(null==h||h(),n(e))},{flush:u,deep:s,immediate:!0})}),p=[f];return null!=c&&p.push(g(c,d).then(()=>l(e)).finally(()=>(null==h||h(),l(e)))),Promise.race(p)}function a(e){return n(e=>Boolean(e),e)}function u(e){return r(null,e)}function s(e){return r(void 0,e)}function c(e){return n(Number.isNaN,e)}function d(e,t){return n(t=>{const n=Array.from(t);return n.includes(e)||n.includes(l(e))},t)}function h(e){return f(1,e)}function f(e=1,t){let o=-1;return n(()=>(o+=1,o>=e),t)}if(Array.isArray(l(e))){const o={toMatch:n,toContains:d,changed:h,changedTimes:f,get not(){return _(e,!t)}};return o}{const o={toMatch:n,toBe:r,toBeTruthy:a,toBeNull:u,toBeNaN:c,toBeUndefined:s,changed:h,changedTimes:f,get not(){return _(e,!t)}};return o}}function b(e){return _(e)}function x(e){var t;const n=l(e);return null!=(t=null==n?void 0:n.$el)?t:n}const E=u?window:void 0;function k(...e){let t,n,o,r;if("string"===typeof e[0]||Array.isArray(e[0])?([n,o,r]=e,t=E):[t,n,o,r]=e,!t)return h;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const u=[],s=()=>{u.forEach(e=>e()),u.length=0},c=(e,t,n,o)=>(e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)),f=(0,i.wB)(()=>[x(t),l(r)],([e,t])=>{if(s(),!e)return;const i=d(t)?{...t}:t;u.push(...n.flatMap(t=>o.map(n=>c(e,t,n,i))))},{immediate:!0,flush:"post"}),p=()=>{f(),s()};return a(p),p}function S(e){return"function"===typeof e?e:"string"===typeof e?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function N(...e){let t,n,o={};3===e.length?(t=e[0],n=e[1],o=e[2]):2===e.length?"object"===typeof e[1]?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=E,eventName:r="keydown",passive:a=!1,dedupe:u=!1}=o,s=S(t),c=e=>{e.repeat&&l(u)||s(e)&&n(e)};return k(i,r,c,a)}function M(e){return JSON.parse(JSON.stringify(e))}function C(e,t,n,r={}){var a,l,u;const{clone:c=!1,passive:d=!1,eventName:h,deep:f=!1,defaultValue:p,shouldEmit:v}=r,g=(0,i.nI)(),m=n||(null==g?void 0:g.emit)||(null==(a=null==g?void 0:g.$emit)?void 0:a.bind(g))||(null==(u=null==(l=null==g?void 0:g.proxy)?void 0:l.$emit)?void 0:u.bind(null==g?void 0:g.proxy));let y=h;t||(t="modelValue"),y=y||`update:${t.toString()}`;const w=e=>c?"function"===typeof c?c(e):M(e):e,_=()=>s(e[t])?w(e[t]):p,b=e=>{v?v(e)&&m(y,e):m(y,e)};if(d){const n=_(),r=(0,o.KR)(n);let a=!1;return(0,i.wB)(()=>e[t],e=>{a||(a=!0,r.value=w(e),(0,i.dY)(()=>a=!1))}),(0,i.wB)(r,n=>{a||n===e[t]&&!f||b(n)},{deep:f}),r}return(0,i.EW)({get(){return _()},set(e){b(e)}})}var I={value:()=>{}};function A(){for(var e,t=0,n=arguments.length,o={};t<n;++t){if(!(e=arguments[t]+"")||e in o||/[\s.]/.test(e))throw new Error("illegal type: "+e);o[e]=[]}return new $(o)}function $(e){this._=e}function T(e,t){return e.trim().split(/^|\s+/).map(function(e){var n="",o=e.indexOf(".");if(o>=0&&(n=e.slice(o+1),e=e.slice(0,o)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}})}function B(e,t){for(var n,o=0,i=e.length;o<i;++o)if((n=e[o]).name===t)return n.value}function P(e,t,n){for(var o=0,i=e.length;o<i;
1++o)if(e[o].name===t){e[o]=I,e=e.slice(0,o).concat(e.slice(o+1));break}return null!=n&&e.push({name:t,value:n}),e}$.prototype=A.prototype={constructor:$,on:function(e,t){var n,o=this._,i=T(e+"",o),r=-1,a=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);while(++r<a)if(n=(e=i[r]).type)o[n]=P(o[n],e.name,t);else if(null==t)for(n in o)o[n]=P(o[n],e.name,null);return this}while(++r<a)if((n=(e=i[r]).type)&&(n=B(o[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new $(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,o,i=new Array(n),r=0;r<n;++r)i[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,n=o.length;r<n;++r)o[r].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,r=o.length;i<r;++i)o[i].value.apply(t,n)}};var z="http://www.w3.org/1999/xhtml";const R={svg:"http://www.w3.org/2000/svg",xhtml:z,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function D(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),R.hasOwnProperty(t)?{space:R[t],local:e}:e}function O(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===z&&t.documentElement.namespaceURI===z?t.createElement(e):t.createElementNS(n,e)}}function V(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function X(e){var t=D(e);return(t.local?V:O)(t)}function L(){}function W(e){return null==e?L:function(){return this.querySelector(e)}}function H(e){"function"!==typeof e&&(e=W(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a,l=t[i],u=l.length,s=o[i]=new Array(u),c=0;c<u;++c)(r=l[c])&&(a=e.call(r,r.__data__,c,l))&&("__data__"in r&&(a.__data__=r.__data__),s[c]=a);return new $t(o,this._parents)}function G(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function Y(){return[]}function F(e){return null==e?Y:function(){return this.querySelectorAll(e)}}function U(e){return function(){return G(e.apply(this,arguments))}}function K(e){e="function"===typeof e?U(e):F(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var a,l=t[r],u=l.length,s=0;s<u;++s)(a=l[s])&&(o.push(e.call(a,a.__data__,s,l)),i.push(a));return new $t(o,i)}function j(e){return function(){return this.matches(e)}}function Z(e){return function(t){return t.matches(e)}}var q=Array.prototype.find;function Q(e){return function(){return q.call(this.children,e)}}function J(){return this.firstElementChild}function ee(e){return this.select(null==e?J:Q("function"===typeof e?e:Z(e)))}var te=Array.prototype.filter;function ne(){return Array.from(this.children)}function oe(e){return function(){return te.call(this.children,e)}}function ie(e){return this.selectAll(null==e?ne:oe("function"===typeof e?e:Z(e)))}function re(e){"function"!==typeof e&&(e=j(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a=t[i],l=a.length,u=o[i]=[],s=0;s<l;++s)(r=a[s])&&e.call(r,r.__data__,s,a)&&u.push(r);return new $t(o,this._parents)}function ae(e){return new Array(e.length)}function le(){return new $t(this._enter||this._groups.map(ae),this._parents)}function ue(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function se(e){return function(){return e}}function ce(e,t,n,o,i,r){for(var a,l=0,u=t.length,s=r.length;l<s;++l)(a=t[l])?(a.__data__=r[l],o[l]=a):n[l]=new ue(e,r[l]);for(;l<u;++l)(a=t[l])&&(i[l]=a)}function de(e,t,n,o,i,r,a){var l,u,s,c=new Map,d=t.length,h=r.length,f=new Array(d);for(l=0;l<d;++l)(u=t[l])&&(f[l]=s=a.call(u,u.__data__,l,t)+"",c.has(s)?i[l]=u:c.set(s,u));for(l=0;l<h;++l)s=a.call(e,r[l],l,r)+"",(u=c.get(s))?(o[l]=u,u.__data__=r[l],c.delete(s)):n[l]=new ue(e,r[l]);for(l=0;l<d;++l)(u=t[l])&&c.get(f[l])===u&&(i[l]=u)}function he(e){return e.__data__}function fe(e,t){if(!arguments.length)return Array.from(this,he);var n=t?de:ce,o=this._parents,i=this._groups;"function"!==typeof e&&(e=se(e));for(var r=i.length,a=new Array(r),l=new Array(r),u=new Array(r),s=0;s<r;++s){var c=o[s],d=i[s],h=d.length,f=pe(e.call(c,c&&c.__data__,s,o)),p=f.length,v=l[s]=new Array(p),g=a[s]=new Array(p),m=u[s]=new Array(h);n(c,d,v,g,m,f,t);for(var y,w,_=0,b=0;_<p;++_)if(y=v[_]){_>=b&&(b=_+1);while(!(w=g[b])&&++b<p);y._next=w||null}}return a=new $t(a,o),a._enter=l,a._exit=u,a}function pe(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function ve(){return new $t(this._exit||this._groups.map(ae),this._parents)}function ge(e,t,n){var o=this.enter(),i=this,r=this.exit();return"function"===typeof e?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),null!=t&&(i=t(i),i&&(i=i.selection())),null==n?r.remove():n(r),o&&i?o.merge
1(i).order():i}function me(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,a=Math.min(i,r),l=new Array(i),u=0;u<a;++u)for(var s,c=n[u],d=o[u],h=c.length,f=l[u]=new Array(h),p=0;p<h;++p)(s=c[p]||d[p])&&(f[p]=s);for(;u<i;++u)l[u]=n[u];return new $t(l,this._parents)}function ye(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o,i=e[t],r=i.length-1,a=i[r];--r>=0;)(o=i[r])&&(a&&4^o.compareDocumentPosition(a)&&a.parentNode.insertBefore(o,a),a=o);return this}function we(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=_e);for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var a,l=n[r],u=l.length,s=i[r]=new Array(u),c=0;c<u;++c)(a=l[c])&&(s[c]=a);s.sort(t)}return new $t(i,this._parents).order()}function _e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function be(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function xe(){return Array.from(this)}function Ee(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var a=o[i];if(a)return a}return null}function ke(){let e=0;for(const t of this)++e;return e}function Se(){return!this.node()}function Ne(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i,r=t[n],a=0,l=r.length;a<l;++a)(i=r[a])&&e.call(i,i.__data__,a,r);return this}function Me(e){return function(){this.removeAttribute(e)}}function Ce(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ie(e,t){return function(){this.setAttribute(e,t)}}function Ae(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function $e(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Te(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Be(e,t){var n=D(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((null==t?n.local?Ce:Me:"function"===typeof t?n.local?Te:$e:n.local?Ae:Ie)(n,t))}function Pe(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ze(e){return function(){this.style.removeProperty(e)}}function Re(e,t,n){return function(){this.style.setProperty(e,t,n)}}function De(e,t,n){return function(){var o=t.apply(this,arguments);null==o?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Oe(e,t,n){return arguments.length>1?this.each((null==t?ze:"function"===typeof t?De:Re)(e,t,null==n?"":n)):Ve(this.node(),e)}function Ve(e,t){return e.style.getPropertyValue(t)||Pe(e).getComputedStyle(e,null).getPropertyValue(t)}function Xe(e){return function(){delete this[e]}}function Le(e,t){return function(){this[e]=t}}function We(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function He(e,t){return arguments.length>1?this.each((null==t?Xe:"function"===typeof t?We:Le)(e,t)):this.node()[e]}function Ge(e){return e.trim().split(/^|\s+/)}function Ye(e){return e.classList||new Fe(e)}function Fe(e){this._node=e,this._names=Ge(e.getAttribute("class")||"")}function Ue(e,t){var n=Ye(e),o=-1,i=t.length;while(++o<i)n.add(t[o])}function Ke(e,t){var n=Ye(e),o=-1,i=t.length;while(++o<i)n.remove(t[o])}function je(e){return function(){Ue(this,e)}}function Ze(e){return function(){Ke(this,e)}}function qe(e,t){return function(){(t.apply(this,arguments)?Ue:Ke)(this,e)}}function Qe(e,t){var n=Ge(e+"");if(arguments.length<2){var o=Ye(this.node()),i=-1,r=n.length;while(++i<r)if(!o.contains(n[i]))return!1;return!0}return this.each(("function"===typeof t?qe:t?je:Ze)(n,t))}function Je(){this.textContent=""}function et(e){return function(){this.textContent=e}}function tt(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function nt(e){return arguments.length?this.each(null==e?Je:("function"===typeof e?tt:et)(e)):this.node().textContent}function ot(){this.innerHTML=""}function it(e){return function(){this.innerHTML=e}}function rt(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function at(e){return arguments.length?this.each(null==e?ot:("function"===typeof e?rt:it)(e)):this.node().innerHTML}function lt(){this.nextSibling&&this.parentNode.appendChild(this)}function ut(){return this.each(lt)}function st(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ct(){return this.each(st)}function dt(e){var t="function"===typeof e?e:X(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ht(){return null}function ft(e,t){var n="function"===typeof e?e:X(e),o=null==t?ht:"function"===typeof t?t:W(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function pt(){var e=this.parentNode;e&&e.removeChild(this)}function vt(){return this.each(pt)}function gt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mt(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yt(e){return this.select(e?mt:gt)}function wt(e){return arguments.length?this.property("__data__",e):this.node().__data__}function _t(e){return function(t){e.call(this,t,this.__data__)}}function bt(e){return e.trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function xt(e){return function(){var t=this.__on;if(t){for(var n,o=0,i=-1,r=t.length;o<r;++o)n=t[o],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function Et(e,t,n){return function(){var o,i=this.__on,r=_t(t);if(i)for(var a=0,l=i.length;a<l;++a)if((o=i[a]).type===e.type&&o.name===e.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=r,o.options=n),void(o.value=t);this.addEventListener(e.type,r,n),o={type:e.type,name:e.name,value:t,listener:r,options:n},i?i.push(o):this.__on=[o]}}function kt(e,t,n){var o,i,r=bt(e+""),a=r.length;if(!(arguments.length<2)){for(l=t?Et:xt,o=0;o<a;
1++o)this.each(l(r[o],t,n));return this}var l=this.node().__on;if(l)for(var u,s=0,c=l.length;s<c;++s)for(o=0,u=l[s];o<a;++o)if((i=r[o]).type===u.type&&i.name===u.name)return u.value}function St(e,t,n){var o=Pe(e),i=o.CustomEvent;"function"===typeof i?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Nt(e,t){return function(){return St(this,e,t)}}function Mt(e,t){return function(){return St(this,e,t.apply(this,arguments))}}function Ct(e,t){return this.each(("function"===typeof t?Mt:Nt)(e,t))}function*It(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o,i=e[t],r=0,a=i.length;r<a;++r)(o=i[r])&&(yield o)}ue.prototype={constructor:ue,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},Fe.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var At=[null];function $t(e,t){this._groups=e,this._parents=t}function Tt(){return new $t([[document.documentElement]],At)}function Bt(){return this}function Pt(e){return"string"===typeof e?new $t([[document.querySelector(e)]],[document.documentElement]):new $t([[e]],At)}function zt(e){let t;while(t=e.sourceEvent)e=t;return e}function Rt(e,t){if(e=zt(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}$t.prototype=Tt.prototype={constructor:$t,select:H,selectAll:K,selectChild:ee,selectChildren:ie,filter:re,data:fe,enter:le,exit:ve,join:ge,merge:me,selection:Bt,order:ye,sort:we,call:be,nodes:xe,node:Ee,size:ke,empty:Se,each:Ne,attr:Be,style:Oe,property:He,classed:Qe,text:nt,html:at,raise:ut,lower:ct,append:dt,insert:ft,remove:vt,clone:yt,datum:wt,on:kt,dispatch:Ct,[Symbol.iterator]:It};const Dt={passive:!1},Ot={capture:!0,passive:!1};function Vt(e){e.stopImmediatePropagation()}function Xt(e){e.preventDefault(),e.stopImmediatePropagation()}function Lt(e){var t=e.document.documentElement,n=Pt(e).on("dragstart.drag",Xt,Ot);"onselectstart"in t?n.on("selectstart.drag",Xt,Ot):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Wt(e,t){var n=e.document.documentElement,o=Pt(e).on("dragstart.drag",null);t&&(o.on("click.drag",Xt,Ot),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 Ht=e=>()=>e;function Gt(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:r,x:a,y:l,dx:u,dy:s,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:r,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:s,enumerable:!0,configurable:!0},_:{value:c}})}function Yt(e){return!e.ctrlKey&&!e.button}function Ft(){return this.parentNode}function Ut(e,t){return null==t?{x:e.x,y:e.y}:t}function Kt(){return navigator.maxTouchPoints||"ontouchstart"in this}function jt(){var e,t,n,o,i=Yt,r=Ft,a=Ut,l=Kt,u={},s=A("start","drag","end"),c=0,d=0;function h(e){e.on("mousedown.drag",f).filter(l).on("touchstart.drag",g).on("touchmove.drag",m,Dt).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(a,l){if(!o&&i.call(this,a,l)){var u=w(this,r.call(this,a,l),a,l,"mouse");u&&(Pt(a.view).on("mousemove.drag",p,Ot).on("mouseup.drag",v,Ot),Lt(a.view),Vt(a),n=!1,e=a.clientX,t=a.clientY,u("start",a))}}
vendor: 5,375 bytes, line 1
1function p(o){if(Xt(o),!n){var i=o.clientX-e,r=o.clientY-t;n=i*i+r*r>d}u.mouse("drag",o)}function v(e){Pt(e.view).on("mousemove.drag mouseup.drag",null),Wt(e.view,n),Xt(e),u.mouse("end",e)}function g(e,t){if(i.call(this,e,t)){var n,o,a=e.changedTouches,l=r.call(this,e,t),u=a.length;for(n=0;n<u;++n)(o=w(this,l,e,t,a[n].identifier,a[n]))&&(Vt(e),o("start",e,a[n]))}}function m(e){var t,n,o=e.changedTouches,i=o.length;for(t=0;t<i;++t)(n=u[o[t].identifier])&&(Xt(e),n("drag",e,o[t]))}function y(e){var t,n,i=e.changedTouches,r=i.length;for(o&&clearTimeout(o),o=setTimeout(function(){o=null},500),t=0;t<r;++t)(n=u[i[t].identifier])&&(Vt(e),n("end",e,i[t]))}function w(e,t,n,o,i,r){var l,d,f,p=s.copy(),v=Rt(r||n,t);if(null!=(f=a.call(e,new Gt("beforestart",{sourceEvent:n,target:h,identifier:i,active:c,x:v[0],y:v[1],dx:0,dy:0,dispatch:p}),o)))return l=f.x-v[0]||0,d=f.y-v[1]||0,function n(r,a,s){var g,m=v;switch(r){case"start":u[i]=n,g=c++;break;case"end":delete u[i],--c;case"drag":v=Rt(s||a,t),g=c;break}p.call(r,e,new Gt(r,{sourceEvent:a,subject:f,target:h,identifier:i,active:g,x:v[0]+l,y:v[1]+d,dx:v[0]-m[0],dy:v[1]-m[1],dispatch:p}),o)}}return h.filter=function(e){return arguments.length?(i="function"===typeof e?e:Ht(!!e),h):i},h.container=function(e){return arguments.length?(r="function"===typeof e?e:Ht(e),h):r},h.subject=function(e){return arguments.length?(a="function"===typeof e?e:Ht(e),h):a},h.touchable=function(e){return arguments.length?(l="function"===typeof e?e:Ht(!!e),h):l},h.on=function(){var e=s.on.apply(s,arguments);return e===s?h:e},h.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,h):Math.sqrt(d)},h}function Zt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qt(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Qt(){}Gt.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Jt=.7,en=1/Jt,tn="\\s*([+-]?\\d+)\\s*",nn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rn=/^#([0-9a-f]{3,8})$/,an=new RegExp(`^rgb\\(${tn},${tn},${tn}\\)$`),ln=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),un=new RegExp(`^rgba\\(${tn},${tn},${tn},${nn}\\)$`),sn=new RegExp(`^rgba\\(${on},${on},${on},${nn}\\)$`),cn=new RegExp(`^hsl\\(${nn},${on},${on}\\)$`),dn=new RegExp(`^hsla\\(${nn},${on},${on},${nn}\\)$`),hn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function fn(){return this.rgb().formatHex()}function pn(){return this.rgb().formatHex8()}function vn(){return An(this).formatHsl()}function gn(){return this.rgb().formatRgb()}function mn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=rn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?yn(t):3===n?
vendor: 5,649 bytes, line 1
1new xn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?wn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?wn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=an.exec(e))?new xn(t[1],t[2],t[3],1):(t=ln.exec(e))?new xn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=un.exec(e))?wn(t[1],t[2],t[3],t[4]):(t=sn.exec(e))?wn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=cn.exec(e))?In(t[1],t[2]/100,t[3]/100,1):(t=dn.exec(e))?In(t[1],t[2]/100,t[3]/100,t[4]):hn.hasOwnProperty(e)?yn(hn[e]):"transparent"===e?new xn(NaN,NaN,NaN,0):null}function yn(e){return new xn(e>>16&255,e>>8&255,255&e,1)}function wn(e,t,n,o){return o<=0&&(e=t=n=NaN),new xn(e,t,n,o)}function _n(e){return e instanceof Qt||(e=mn(e)),e?(e=e.rgb(),new xn(e.r,e.g,e.b,e.opacity)):new xn}function bn(e,t,n,o){return 1===arguments.length?_n(e):new xn(e,t,n,null==o?1:o)}function xn(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}function En(){return`#${Cn(this.r)}${Cn(this.g)}${Cn(this.b)}`}function kn(){return`#${Cn(this.r)}${Cn(this.g)}${Cn(this.b)}${Cn(255*(isNaN(this.opacity)?1:this.opacity))}`}function Sn(){const e=Nn(this.opacity);return`${1===e?"rgb(":"rgba("}${Mn(this.r)}, ${Mn(this.g)}, ${Mn(this.b)}${1===e?")":`, ${e})`}`}function Nn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Mn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cn(e){return e=Mn(e),(e<16?"0":"")+e.toString(16)}function In(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Tn(e,t,n,o)}function An(e){if(e instanceof Tn)return new Tn(e.h,e.s,e.l,e.opacity);if(e instanceof Qt||(e=mn(e)),!e)return new Tn;if(e instanceof Tn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),r=Math.max(t,n,o),a=NaN,l=r-i,u=(r+i)/2;return l?(a=t===r?(n-o)/l+6*(n<o):n===r?(o-t)/l+2:(t-n)/l+4,l/=u<.5?r+i:2-r-i,a*=60):l=u>0&&u<1?0:a,new Tn(a,l,u,e.opacity)}function $n(e,t,n,o){return 1===arguments.length?An(e):new Tn(e,t,n,null==o?1:o)}function Tn(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}function Bn(e){return e=(e||0)%360,e<0?e+360:e}function Pn(e){return Math.max(0,Math.min(1,e||0))}function zn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Zt(Qt,mn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fn,formatHex:fn,formatHex8:pn,formatHsl:vn,formatRgb:gn,toString:gn}),Zt(xn,bn,qt(Qt,{brighter(e){return e=null==e?en:Math.pow(en,e),new xn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Jt:Math.pow(Jt,e),new xn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xn(Mn(this.r),Mn(this.g),Mn(this.b),Nn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:En,formatHex:En,formatHex8:kn,formatRgb:Sn,toString:Sn})),Zt(Tn,$n,qt(Qt,{brighter(e){return e=null==e?en:Math.pow(en,e),new Tn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Jt:Math.pow(Jt,e),new Tn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new xn(zn(e>=240?e-240:e+120,i,o),zn(e,i,o),zn(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new Tn(Bn(this.h),Pn(this.s),Pn(this.l),Nn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Nn(this.opacity);return`${1===e?"hsl(":"hsla("}${Bn(this.h)}, ${100*Pn(this.s)}%, ${100*Pn(this.l)}%${1===e?")":`, ${e})`}`}}));const Rn=e=>()=>e;function Dn(e,t){return function(n){return e+n*t}}function On(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Vn(e){return 1===(e=+e)?Xn:function(t,n){return n-t?On(t,n,e):Rn(isNaN(t)?n:t)}}function Xn(e,t){var n=t-e;return n?Dn(e,n):Rn(isNaN(e)?t:e)}const Ln=function e(t){var n=Vn(t);function o(e,t){var o=n((e=bn(e)).r,(t=bn(t)).r),i=n(e.g,t.g),r=n(e.b,t.b),a=Xn(e.opacity,t.opacity);return function(t){return e.r=o(t),e.g=i(t),e.b=r(t),e.opacity=a(t),e+""}}return o.gamma=e,o}(1);function Wn(e,t){t||(t=[]);var n,o=e?Math.min(t.length,e.length):0,i=t.slice();return function(r){for(n=0;n<o;++n)i[n]=e[n]*(1-r)+t[n]*r;return i}}function Hn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Gn(e,t){var n,o=t?t.length:0,i=e?Math.min(o,e.length):0,r=new Array(i),a=new Array(o);for(n=0;n<i;++n)r[n]=Jn(e[n],t[n]);for(;n<o;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=r[n](e);return a}}function Yn(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Fn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Un(e,t){var n,o={},i={};for(n in null!==e&&"object"===typeof e||(e={}),null!==t&&"object"===typeof t||(t={}),t)n in e?o[n]=Jn(e[n],t[n]):i[n]=t[n];return function(e){for(n in o)i[n]=o[n](e);return i}}var Kn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jn=new RegExp(Kn.source,"g");function Zn(e){return function(){return e}}function qn(e){return function(t){return e(t)+""}}function Qn(e,t){var n,o,i,r=Kn.lastIndex=jn.lastIndex=0,a=-1,l=[],u=[];e+="",t+="";while((n=Kn.exec(e))&&(o=jn.exec(t)))(i=o.index)>r&&(i=t.slice(r,i),l[a]?l[a]+=i:l[++a]=i),(n=n[0])===(o=o[0])?l[a]?l[a]+=o:l[++a]=o:(l[++a]=null,u.push({i:a,x:Fn(n,o)})),r=jn.lastIndex;return r<t.length&&(i=t.slice(r),l[a]?l[a]+=i:l[++a]=i),l.length<2?u[0]?qn(u[0].x):Zn(t):(t=u.length,function(e){for(var n,o=0;o<t;++o)l[(n=u[o]).i]=n.x(e);return l.join("")})}function Jn(e,t){var n,o=typeof t;
1return null==t||"boolean"===o?Rn(t):("number"===o?Fn:"string"===o?(n=mn(t))?(t=n,Ln):Qn:t instanceof mn?Ln:t instanceof Date?Yn:Hn(t)?Wn:Array.isArray(t)?Gn:"function"!==typeof t.valueOf&&"function"!==typeof t.toString||isNaN(t)?Un:Fn)(e,t)}var eo,to=180/Math.PI,no={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function oo(e,t,n,o,i,r){var a,l,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*o)&&(n-=e*u,o-=t*u),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,u/=l),e*o<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*to,skewX:Math.atan(u)*to,scaleX:a,scaleY:l}}function io(e){const t=new("function"===typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?no:oo(t.a,t.b,t.c,t.d,t.e,t.f)}function ro(e){return null==e?no:(eo||(eo=document.createElementNS("http://www.w3.org/2000/svg","g")),eo.setAttribute("transform",e),(e=eo.transform.baseVal.consolidate())?(e=e.matrix,oo(e.a,e.b,e.c,e.d,e.e,e.f)):no)}function ao(e,t,n,o){function i(e){return e.length?e.pop()+" ":""}function r(e,o,i,r,a,l){if(e!==i||o!==r){var u=a.push("translate(",null,t,null,n);l.push({i:u-4,x:Fn(e,i)},{i:u-2,x:Fn(o,r)})}else(i||r)&&a.push("translate("+i+t+r+n)}function a(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(i(n)+"rotate(",null,o)-2,x:Fn(e,t)})):t&&n.push(i(n)+"rotate("+t+o)}function l(e,t,n,r){e!==t?r.push({i:n.push(i(n)+"skewX(",null,o)-2,x:Fn(e,t)}):t&&n.push(i(n)+"skewX("+t+o)}function u(e,t,n,o,r,a){if(e!==n||t!==o){var l=r.push(i(r)+"scale(",null,",",null,")");a.push({i:l-4,x:Fn(e,n)},{i:l-2,x:Fn(t,o)})}else 1===n&&1===o||r.push(i(r)+"scale("+n+","+o+")")}return function(t,n){var o=[],i=[];return t=e(t),n=e(n),r(t.translateX,t.translateY,n.translateX,n.translateY,o,i),a(t.rotate,n.rotate,o,i),l(t.skewX,n.skewX,o,i),u(t.scaleX,t.scaleY,n.scaleX,n.scaleY,o,i),t=n=null,function(e){var t,n=-1,r=i.length;while(++n<r)o[(t=i[n]).i]=t.x(e);return o.join("")}}}var lo=ao(io,"px, ","px)","deg)"),uo=ao(ro,", ",")",")"),so=1e-12;function co(e){return((e=Math.exp(e))+1/e)/2}function ho(e){return((e=Math.exp(e))-1/e)/2}function fo(e){return((e=Math.exp(2*e))-1)/(e+1)}const po=function e(t,n,o){function i(e,i){var r,a,l=e[0],u=e[1],s=e[2],c=i[0],d=i[1],h=i[2],f=c-l,p=d-u,v=f*f+p*p;if(v<so)a=Math.log(h/s)/t,r=function(e){return[l+e*f,u+e*p,s*Math.exp(t*e*a)]};else{var g=Math.sqrt(v),m=(h*h-s*s+o*v)/(2*s*n*g),y=(h*h-s*s-o*v)/(2*h*n*g),w=Math.log(Math.sqrt(m*m+1)-m),_=Math.log(Math.sqrt(y*y+1)-y);a=(_-w)/t,r=function(e){var o=e*a,i=co(w),r=s/(n*g)*(i*fo(t*o+w)-ho(w));return[l+r*f,u+r*p,s*i/co(t*o+w)]}}return r.duration=1e3*a*t/Math.SQRT2,r}return i.rho=function(t){var n=Math.max(.001,+t),o=n*n,i=o*o;return e(n,o,i)},i}(Math.SQRT2,2,4);var vo,go,mo=0,yo=0,wo=0,_o=1e3,bo=0,xo=0,Eo=0,ko="object"===typeof performance&&performance.now?performance:Date,So="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function No(){return xo||(So(Mo),xo=ko.now()+Eo)}function Mo(){xo=0}function Co(){this._call=this._time=this._next=null}function Io(e,t,n){var o=new Co;return o.restart(e,t,n),o}function Ao(){No(),++mo;var e,t=vo;while(t)(e=xo-t._time)>=0&&t._call.call(void 0,e),t=t._next;--mo}function $o(){xo=(bo=ko.now())+Eo,mo=yo=0;try{Ao()}finally{mo=0,Bo(),xo=0}}function To(){var e=ko.now(),t=e-bo;t>_o&&(Eo-=t,bo=e)}function Bo(){var e,t,n=vo,o=1/0;while(n)n._call?(o>n._time&&(o=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:vo=t);go=e,Po(o)}function Po(e){if(!mo){yo&&(yo=clearTimeout(yo));var t=e-xo;t>24?(e<1/0&&(yo=setTimeout($o,e-ko.now()-Eo)),wo&&(wo=clearInterval(wo))):(wo||(bo=ko.now(),wo=setInterval(To,_o)),mo=1,So($o))}}function zo(e,t,n){var o=new Co;return t=null==t?0:+t,o.restart(n=>{o.stop(),e(n+t)},t,n),o}Co.prototype=Io.prototype={constructor:Co,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?No():+n)+(null==t?0:+t),this._next||go===this||(go?go._next=this:vo=this,go=this),this._call=e,this._time=n,Po()},stop:function(){this._call&&(this._call=null,this._time=1/0,Po())}};var Ro=A("start","end","cancel","interrupt"),Do=[],Oo=0,Vo=1,Xo=2,Lo=3,Wo=4,Ho=5,Go=6;function Yo(e,t,n,o,i,r){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};
1jo(e,n,{name:t,index:o,group:i,on:Ro,tween:Do,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:Oo})}function Fo(e,t){var n=Ko(e,t);if(n.state>Oo)throw new Error("too late; already scheduled");return n}function Uo(e,t){var n=Ko(e,t);if(n.state>Lo)throw new Error("too late; already running");return n}function Ko(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function jo(e,t,n){var o,i=e.__transition;function r(e){n.state=Vo,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(r){var s,c,d,h;if(n.state!==Vo)return u();for(s in i)if(h=i[s],h.name===n.name){if(h.state===Lo)return zo(a);h.state===Wo?(h.state=Go,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[s]):+s<t&&(h.state=Go,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[s])}if(zo(function(){n.state===Lo&&(n.state=Wo,n.timer.restart(l,n.delay,n.time),l(r))}),n.state=Xo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Xo){for(n.state=Lo,o=new Array(d=n.tween.length),s=0,c=-1;s<d;++s)(h=n.tween[s].value.call(e,e.__data__,n.index,n.group))&&(o[++c]=h);o.length=c+1}}function l(t){var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(u),n.state=Ho,1),r=-1,a=o.length;while(++r<a)o[r].call(e,i);n.state===Ho&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){for(var o in n.state=Go,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=Io(r,0,n.time)}function Zo(e,t){var n,o,i,r=e.__transition,a=!0;if(r){for(i in t=null==t?null:t+"",r)(n=r[i]).name===t?(o=n.state>Xo&&n.state<Ho,n.state=Go,n.timer.stop(),n.on.call(o?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[i]):a=!1;a&&delete e.__transition}}function qo(e){return this.each(function(){Zo(this,e)})}function Qo(e,t){var n,o;return function(){var i=Uo(this,e),r=i.tween;if(r!==n){o=n=r;for(var a=0,l=o.length;a<l;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}i.tween=o}}function Jo(e,t,n){var o,i;if("function"!==typeof n)throw new Error;return function(){var r=Uo(this,e),a=r.tween;if(a!==o){i=(o=a).slice();for(var l={name:t,value:n},u=0,s=i.length;u<s;++u)if(i[u].name===t){i[u]=l;break}u===s&&i.push(l)}r.tween=i}}function ei(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o,i=Ko(this.node(),n).tween,r=0,a=i.length;r<a;++r)if((o=i[r]).name===e)return o.value;return null}return this.each((null==t?Qo:Jo)(n,e,t))}function ti(e,t,n){var o=e._id;return e.each(function(){var e=Uo(this,o);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return Ko(e,o).value[t]}}function ni(e,t){var n;return("number"===typeof t?Fn:t instanceof mn?Ln:(n=mn(t))?(t=n,Ln):Qn)(e,t)}function oi(e){return function(){this.removeAttribute(e)}}function ii(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ri(e,t,n){var o,i,r=n+"";return function(){var a=this.getAttribute(e);return a===r?null:a===o?i:i=t(o=a,n)}}function ai(e,t,n){var o,i,r=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===o?i:i=t(o=a,n)}}function li(e,t,n){var o,i,r;return function(){var a,l,u=n(this);if(null!=u)return a=this.getAttribute(e),l=u+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,u));this.removeAttribute(e)}}function ui(e,t,n){var o,i,r;return function(){var a,l,u=n(this);if(null!=u)return a=this.getAttributeNS(e.space,e.local),l=u+"",a===l?null:a===o&&l===i?r:(i=l,r=t(o=a,u));this.removeAttributeNS(e.space,e.local)}}function si(e,t){var n=D(e),o="transform"===n?uo:ni;return this.attrTween(e,"function"===typeof t?(n.local?ui:li)(n,o,ti(this,"attr."+e,t)):null==t?(n.local?ii:oi)(n):(n.local?ai:ri)(n,o,t))}function ci(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function di(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function hi(e,t){var n,o;function i(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&di(e,i)),n}return i._value=t,i}function fi(e,t){var n,o;function i(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&ci(e,i)),n}return i._value=t,i}function pi(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!==typeof t)throw new Error;var o=D(e);return this.tween(n,(o.local?hi:fi)(o,t))}function vi(e,t){return function(){Fo(this,e).delay=+t.apply(this,arguments)}}function gi(e,t){return t=+t,function(){Fo(this,e).delay=t}}function mi(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?vi:gi)(t,e)):Ko(this.node(),t).delay}function yi(e,t){return function(){Uo(this,e).duration=+t.apply(this,arguments)}}function wi(e,t){return t=+t,function(){Uo(this,e).duration=t}}function _i(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?yi:wi)(t,e)):Ko(this.node(),t).duration}function bi(e,t){if("function"!==typeof t)throw new Error;return function(){Uo(this,e).ease=t}}function xi(e){var t=this._id;return arguments.length?this.each(bi(t,e)):Ko(this.node(),t).ease}function Ei(e,t){return function(){var n=t.apply(this,arguments);if("function"!==typeof n)throw new Error;Uo(this,e).ease=n}}function ki(e){if("function"!==typeof e)throw new Error;return this.each(Ei(this._id,e))}function Si(e){"function"!==typeof e&&(e=j(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a=t[i],l=a.length,u=o[i]=[],s=0;s<l;++s)(r=a[s])&&e.call(r,r.__data__,s,a)&&u.push(r);return new er(o,this._parents,this._name,this._id)}function Ni(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),a=new Array(o),l=0;l<r;++l)for(var u,s=t[l],c=n[l],d=s.length,h=a[l]=new Array(d),f=0;f<d;++f)(u=s[f]||c[f])&&(h[f]=u);for(;l<o;++l)a[l]=t[l];return new er(a,this._parents,this._name,this._id)}function Mi(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}function Ci(e,t,n){var o,i,r=Mi(t)?Fo:Uo;return function(){var a=r(this,e),l=a.on;l!==o&&(i=(o=l).copy()).on(t,n),a.on=i}}function Ii(e,t){var n=this._id;return arguments.length<2?Ko(this.node(),n).on.on(e):this.each(Ci(n,e,t))}function Ai(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function $i(){return this.on("end.remove",Ai(this._id))}function Ti(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=W(e));for(var o=this._groups,i=o.length,r=new Array(i),a=0;a<i;++a)for(var l,u,s=o[a],c=s.length,d=r[a]=new Array(c),h=0;h<c;++h)(l=s[h])&&(u=e.call(l,l.__data__,h,s))&&("__data__"in l&&(u.__data__=l.__data__),d[h]=u,Yo(d[h],t,n,h,d,Ko(l,n)));return new er(r,this._parents,t,n)}function Bi(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=F(e));for(var o=this._groups,i=o.length,r=[],a=[],l=0;l<i;++l)for(var u,s=o[l],c=s.length,d=0;d<c;++d)if(u=s[d]){for(var h,f=e.call(u,u.__data__,d,s),p=Ko(u,n),v=0,g=f.length;v<g;++v)(h=f[v])&&Yo(h,t,n,v,f,p);
1r.push(f),a.push(u)}return new er(r,a,t,n)}var Pi=Tt.prototype.constructor;function zi(){return new Pi(this._groups,this._parents)}function Ri(e,t){var n,o,i;return function(){var r=Ve(this,e),a=(this.style.removeProperty(e),Ve(this,e));return r===a?null:r===n&&a===o?i:i=t(n=r,o=a)}}function Di(e){return function(){this.style.removeProperty(e)}}function Oi(e,t,n){var o,i,r=n+"";return function(){var a=Ve(this,e);return a===r?null:a===o?i:i=t(o=a,n)}}function Vi(e,t,n){var o,i,r;return function(){var a=Ve(this,e),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(e),u=l=Ve(this,e)),a===u?null:a===o&&u===i?r:(i=u,r=t(o=a,l))}}function Xi(e,t){var n,o,i,r,a="style."+t,l="end."+a;return function(){var u=Uo(this,e),s=u.on,c=null==u.value[a]?r||(r=Di(t)):void 0;s===n&&i===c||(o=(n=s).copy()).on(l,i=c),u.on=o}}function Li(e,t,n){var o="transform"===(e+="")?lo:ni;return null==t?this.styleTween(e,Ri(e,o)).on("end.style."+e,Di(e)):"function"===typeof t?this.styleTween(e,Vi(e,o,ti(this,"style."+e,t))).each(Xi(this._id,e)):this.styleTween(e,Oi(e,o,t),n).on("end.style."+e,null)}function Wi(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function Hi(e,t,n){var o,i;function r(){var r=t.apply(this,arguments);return r!==i&&(o=(i=r)&&Wi(e,r,n)),o}return r._value=t,r}function Gi(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(null==t)return this.tween(o,null);if("function"!==typeof t)throw new Error;return this.tween(o,Hi(e,t,null==n?"":n))}function Yi(e){return function(){this.textContent=e}}function Fi(e){return function(){var t=e(this);this.textContent=null==t?"":t}}function Ui(e){return this.tween("text","function"===typeof e?Fi(ti(this,"text",e)):Yi(null==e?"":e+""))}function Ki(e){return function(t){this.textContent=e.call(this,t)}}function ji(e){var t,n;function o(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&Ki(o)),t}return o._value=e,o}function Zi(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!==typeof e)throw new Error;return this.tween(t,ji(e))}function qi(){for(var e=this._name,t=this._id,n=tr(),o=this._groups,i=o.length,r=0;r<i;++r)for(var a,l=o[r],u=l.length,s=0;s<u;++s)if(a=l[s]){var c=Ko(a,t);Yo(a,e,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new er(o,this._parents,e,n)}function Qi(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(r,a){var l={value:a},u={value:function(){0===--i&&r()}};n.each(function(){var n=Uo(this,o),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),n.on=t}),0===i&&r()})}var Ji=0;function er(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function tr(){return++Ji}var nr=Tt.prototype;function or(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}er.prototype={constructor:er,select:Ti,selectAll:Bi,selectChild:nr.selectChild,selectChildren:nr.selectChildren,filter:Si,merge:Ni,selection:zi,transition:qi,call:nr.call,nodes:nr.nodes,node:nr.node,size:nr.size,empty:nr.empty,each:nr.each,on:Ii,attr:si,attrTween:pi,style:Li,styleTween:Gi,text:Ui,textTween:Zi,remove:$i,tween:ei,delay:mi,duration:_i,ease:xi,easeVarying:ki,end:Qi,[Symbol.iterator]:nr[Symbol.iterator]};var ir={time:null,delay:0,duration:250,ease:or};function rr(e,t){var n;while(!(n=e.__transition)||!(n=n[t]))if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function ar(e){var t,n;e instanceof er?(t=e._id,e=e._name):(t=tr(),(n=ir).time=No(),e=null==e?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var a,l=o[r],u=l.length,s=0;s<u;++s)(a=l[s])&&Yo(a,e,t,s,l,n||rr(a,t));return new er(o,this._parents,e,t)}Tt.prototype.interrupt=qo,Tt.prototype.transition=ar;const lr=e=>()=>e;function ur(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function sr(e,t,n){this.k=e,this.x=t,this.y=n}sr.prototype={constructor:sr,scale:function(e){return 1===e?this:new sr(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new sr(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var cr=new sr(1,0,0);function dr(e){e.stopImmediatePropagation()}function hr(e){e.preventDefault(),e.stopImmediatePropagation()}function fr(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function pr(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function vr(){return this.__zoom||cr}function gr(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?
vendor: 5,874 bytes, line 1
11:.002)*(e.ctrlKey?10:1)}function mr(){return navigator.maxTouchPoints||"ontouchstart"in this}function yr(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}function wr(){var e,t,n,o=fr,i=pr,r=yr,a=gr,l=mr,u=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,d=po,h=A("start","zoom","end"),f=500,p=150,v=0,g=10;function m(e){e.property("__zoom",vr).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",N).filter(l).on("touchstart.zoom",M).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(e,t){return t=Math.max(u[0],Math.min(u[1],t)),t===e.k?e:new sr(t,e.x,e.y)}function w(e,t,n){var o=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return o===e.x&&i===e.y?e:new sr(e.k,o,i)}function _(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function b(e,t,n,o){e.on("start.zoom",function(){x(this,arguments).event(o).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(o).end()}).tween("zoom",function(){var e=this,r=arguments,a=x(e,r).event(o),l=i.apply(e,r),u=null==n?_(l):"function"===typeof n?n.apply(e,r):n,s=Math.max(l[1][0]-l[0][0],l[1][1]-l[0][1]),c=e.__zoom,h="function"===typeof t?t.apply(e,r):t,f=d(c.invert(u).concat(s/c.k),h.invert(u).concat(s/h.k));return function(e){if(1===e)e=h;else{var t=f(e),n=s/t[2];e=new sr(n,u[0]-t[0]*n,u[1]-t[1]*n)}a.zoom(null,e)}})}function x(e,t,n){return!n&&e.__zooming||new E(e,t)}function E(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function k(e,...t){if(o.apply(this,arguments)){var n=x(this,t).event(e),i=this.__zoom,l=Math.max(u[0],Math.min(u[1],i.k*Math.pow(2,a.apply(this,arguments)))),c=Rt(e);if(n.wheel)n.mouse[0][0]===c[0]&&n.mouse[0][1]===c[1]||(n.mouse[1]=i.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(i.k===l)return;n.mouse=[c,i.invert(c)],Zo(this),n.start()}hr(e),n.wheel=setTimeout(d,p),n.zoom("mouse",r(w(y(i,l),n.mouse[0],n.mouse[1]),n.extent,s))}function d(){n.wheel=null,n.end()}}function S(e,...t){if(!n&&o.apply(this,arguments)){var i=e.currentTarget,a=x(this,t,!0).event(e),l=Pt(e.view).on("mousemove.zoom",h,!0).on("mouseup.zoom",f,!0),u=Rt(e,i),c=e.clientX,d=e.clientY;Lt(e.view),dr(e),a.mouse=[u,this.__zoom.invert(u)],Zo(this),a.start()}function h(e){if(hr(e),!a.moved){var t=e.clientX-c,n=e.clientY-d;a.moved=t*t+n*n>v}a.event(e).zoom("mouse",r(w(a.that.__zoom,a.mouse[0]=Rt(e,i),a.mouse[1]),a.extent,s))}function f(e){l.on("mousemove.zoom mouseup.zoom",null),Wt(e.view,a.moved),hr(e),a.event(e).end()}}function N(e,...t){if(o.apply(this,arguments)){var n=this.__zoom,a=Rt(e.changedTouches?e.changedTouches[0]:e,this),l=n.invert(a),u=n.k*(e.shiftKey?.5:2),d=r(w(y(n,u),a,l),i.apply(this,t),s);hr(e),c>0?Pt(this).transition().duration(c).call(b,d,a,e):Pt(this).call(m.transform,d,a,e)}}function M(n,...i){if(o.apply(this,arguments)){var r,a,l,u,s=n.touches,c=s.length,d=x(this,i,n.changedTouches.length===c).event(n);for(dr(n),a=0;a<c;++a)l=s[a],u=Rt(l,this),u=[u,this.__zoom.invert(u),l.identifier],d.touch0?d.touch1||d.touch0[2]===u[2]||(d.touch1=u,d.taps=0):(d.touch0=u,r=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),r&&(d.taps<2&&(t=u[0],e=setTimeout(function(){e=null},f)),Zo(this),d.start())}}function C(e,...t){if(this.__zooming){var n,o,i,a,l=x(this,t).event(e),u=e.changedTouches,c=u.length;for(hr(e),n=0;n<c;++n)o=u[n],i=Rt(o,this),l.touch0&&l.touch0[2]===o.identifier?l.touch0[0]=i:l.touch1&&l.touch1[2]===o.identifier&&(l.touch1[0]=i);if(o=l.that.__zoom,l.touch1){var d=l.touch0[0],h=l.touch0[1],f=l.touch1[0],p=l.touch1[1],v=(v=f[0]-d[0])*v+(v=f[1]-d[1])*v,g=(g=p[0]-h[0])*g+(g=p[1]-h[1])*g;o=y(o,Math.sqrt(v/g)),i=[(d[0]+f[0])/2,(d[1]+f[1])/2],a=[(h[0]+p[0])/2,(h[1]+p[1])/2]}else{if(!l.touch0)return;i=l.touch0[0],a=l.touch0[1]}l.zoom("touch",r(w(o,i,a),l.extent,s))}}function I(e,...o){if(this.__zooming){var i,r,a=x(this,o).event(e),l=e.changedTouches,u=l.length;for(dr(e),n&&clearTimeout(n),n=setTimeout(function(){n=null},f),i=0;i<u;++i)r=l[i],a.touch0&&a.touch0[2]===r.identifier?delete a.touch0:a.touch1&&a.touch1[2]===r.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(r=Rt(r,this),Math.hypot(t[0]-r[0],t[1]-r[1])<g)){var s=Pt(this).on("dblclick.zoom");s&&s.apply(this,arguments)}}}return m.transform=function(e,t,n,o){var i=e.selection?e.selection():e;i.property("__zoom",vr),e!==i?b(e,t,n,o):i.interrupt().each(function(){x(this,arguments).event(o).start().zoom(null,"function"===typeof t?t.apply(this,arguments):t).end()})},m.scaleBy=function(e,t,n,o){m.scaleTo(e,function(){var e=this.__zoom.k,n="function"===typeof t?t.apply(this,arguments):t;return e*n},n,o)},m.scaleTo=function(e,t,n,o){m.transform(e,function(){var e=i.apply(this,arguments),o=this.__zoom,a=null==n?_(e):"function"===typeof n?n.apply(this,arguments):n,l=o.invert(a),u="function"===typeof t?t.apply(this,arguments):t;return r(w(y(o,u),a,l),e,s)},n,o)},m.translateBy=function(e,t,n,o){m.transform(e,function(){return r(this.__zoom.translate("function"===typeof t?t.apply(this,arguments):t,"function"===typeof n?n.apply(this,arguments):n),i.apply(this,arguments),s)},null,o)},m.translateTo=function(e,t,n,o,a){m.transform(e,function(){var e=i.apply(this,arguments),a=this.__zoom,l=null==o?_(e):"function"===typeof o?o.apply(this,arguments):o;return r(cr.translate(l[0],l[1]).scale(a.k).translate("function"===typeof t?-t.apply(this,arguments):-t,"function"===typeof n?-n.apply(this,arguments):-n),e,s)},o,a)},E.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit
1("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=Pt(this.that).datum();h.call(e,this.that,new ur(e,{sourceEvent:this.sourceEvent,target:m,type:e,transform:this.that.__zoom,dispatch:h}),t)}},m.wheelDelta=function(e){return arguments.length?(a="function"===typeof e?e:lr(+e),m):a},m.filter=function(e){return arguments.length?(o="function"===typeof e?e:lr(!!e),m):o},m.touchable=function(e){return arguments.length?(l="function"===typeof e?e:lr(!!e),m):l},m.extent=function(e){return arguments.length?(i="function"===typeof e?e:lr([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):i},m.scaleExtent=function(e){return arguments.length?(u[0]=+e[0],u[1]=+e[1],m):[u[0],u[1]]},m.translateExtent=function(e){return arguments.length?(s[0][0]=+e[0][0],s[1][0]=+e[1][0],s[0][1]=+e[0][1],s[1][1]=+e[1][1],m):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},m.constrain=function(e){return arguments.length?(r=e,m):r},m.duration=function(e){return arguments.length?(c=+e,m):c},m.interpolate=function(e){return arguments.length?(d=e,m):d},m.on=function(){var e=h.on.apply(h,arguments);return e===h?m:e},m.clickDistance=function(e){return arguments.length?(v=(e=+e)*e,m):Math.sqrt(v)},m.tapDistance=function(e){return arguments.length?(g=+e,m):g},m}sr.prototype;var _r=(e=>(e["Left"]="left",e["Top"]="top",e["Right"]="right",e["Bottom"]="bottom",e))(_r||{}),br=(e=>(e["Partial"]="partial",e["Full"]="full",e))(br||{}),xr=(e=>(e["Bezier"]="default",e["SimpleBezier"]="simple-bezier",e["Straight"]="straight",e["Step"]="step",e["SmoothStep"]="smoothstep",e))(xr||{}),Er=(e=>(e["Strict"]="strict",e["Loose"]="loose",e))(Er||{}),kr=(e=>(e["Arrow"]="arrow",e["ArrowClosed"]="arrowclosed",e))(kr||{}),Sr=(e=>(e["Free"]="free",e["Vertical"]="vertical",e["Horizontal"]="horizontal",e))(Sr||{}),Nr=(e=>(e["TopLeft"]="top-left",e["TopCenter"]="top-center",e["TopRight"]="top-right",e["BottomLeft"]="bottom-left",e["BottomCenter"]="bottom-center",e["BottomRight"]="bottom-right",e))(Nr||{});const Mr=["INPUT","SELECT","TEXTAREA"],Cr="undefined"!==typeof document?document:null;function Ir(e){var t,n;const o=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target,i="function"===typeof(null==o?void 0:o.hasAttribute)&&o.hasAttribute("contenteditable"),r="function"===typeof(null==o?void 0:o.closest)?o.closest(".nokey"):null;return Mr.includes(null==o?void 0:o.nodeName)||i||!!r}function Ar(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function $r(e,t,n,o){const i=t.replace("+","\n").replace("\n\n","\n+").split("\n").map(e=>e.trim().toLowerCase());if(1===i.length)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const r=i.every((e,t)=>n.has(e)&&Array.from(n.values())[t]===i[t]);return o&&n.delete(e.toLowerCase()),r}function Tr(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=Br(n.code,e);return Array.isArray(e)?e.some(e=>$r(n[o],e,t,"keyup"===n.type)):$r(n[o],e,t,"keyup"===n.type)}}function Br(e,t){return t.includes(e)?"code":"key"}function Pr(e,t){const n=(0,i.EW)(()=>(0,o.BA)(null==t?void 0:t.target)??Cr),r=(0,o.IJ)(!0===(0,o.BA)(e));let a=!1;const l=new Set;let u=c((0,o.BA)(e));function s(){a=!1,l.clear(),r.value=!0===(0,o.BA)(e)}function c(e){return null===e?(s(),()=>!1):"boolean"===typeof e?(s(),r.value=e,()=>!1):Array.isArray(e)||"string"===typeof e?Tr(e,l):e}return(0,i.wB)(()=>(0,o.BA)(e),(e,t)=>{"boolean"===typeof t&&"boolean"!==typeof e&&s(),u=c(e)},{immediate:!0}),k(["blur","contextmenu"],s),N((...e)=>u(...e),e=>{var n,i;const l=(0,o.BA)(null==t?void 0:t.actInsideInputWithModifier)??!0,u=(0,o.BA)(null==t?void 0:t.preventDefault)??!1;a=Ar(e);const s=(!a||a&&!l)&&Ir(e);if(s)return;const c=(null==(i=null==(n=e.composedPath)?void 0:n.call(e))?void 0:i[0])||e.target,d="BUTTON"===(null==c?void 0:c.nodeName)||"A"===(null==c?void 0:c.nodeName);u||!a&&d||e.preventDefault(),r.value=!0},{eventName:"keydown",target:n}),N((...e)=>u(...e),e=>{const n=(0,o.BA)(null==t?void 0:t.actInsideInputWithModifier)??!0;if(r.value){const t=(!a||a&&!n)&&Ir(e);
1if(t)return;a=!1,r.value=!1}},{eventName:"keyup",target:n}),r}const zr="vue-flow__node-desc",Rr="vue-flow__edge-desc",Dr="vue-flow__aria-live",Or=["Enter"," ","Escape"],Vr={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function Xr(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function Lr(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function Wr(e){return{width:e.offsetWidth,height:e.offsetHeight}}function Hr(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Gr(e,t){return{x:Hr(e.x,t[0][0],t[1][0]),y:Hr(e.y,t[0][1],t[1][1])}}function Yr(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function Fr(e){return e&&"object"===typeof e&&"id"in e&&"source"in e&&"target"in e}function Ur(e){return e&&"object"===typeof e&&"id"in e&&"position"in e&&!Fr(e)}function Kr(e){return Ur(e)&&"computedPosition"in e}function jr(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Zr(e){return jr(e.width)&&jr(e.height)&&jr(e.x)&&jr(e.y)}function qr(e,t,n){const i={id:e.id.toString(),type:e.type??"default",dimensions:(0,o.IG)({width:0,height:0}),computedPosition:(0,o.IG)({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:vl(e.data)?e.data:{},events:(0,o.IG)(vl(e.events)?e.events:{})};return Object.assign(t??i,e,{id:e.id.toString(),parentNode:n})}function Qr(e,t,n){var i,r;const a={id:e.id.toString(),type:e.type??(null==t?void 0:t.type)??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:null==(i=e.sourceHandle)?void 0:i.toString(),targetHandle:null==(r=e.targetHandle)?void 0:r.toString(),updatable:e.updatable??(null==n?void 0:n.updatable),selectable:e.selectable??(null==n?void 0:n.selectable),focusable:e.focu
1sable??(null==n?void 0:n.focusable),data:vl(e.data)?e.data:{},events:(0,o.IG)(vl(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??(null==n?void 0:n.interactionWidth),...n??{}};return Object.assign(t??a,e,{id:e.id.toString()})}function Jr(e,t,n,o){const i="string"===typeof e?e:e.id,r=new Set,a="source"===o?"target":"source";for(const l of n)l[a]===i&&r.add(l[o]);return t.filter(e=>r.has(e.id))}function ea(...e){if(3===e.length){const[t,n,o]=e;return Jr(t,n,o,"target")}const[t,n]=e,o="string"===typeof t?t:t.id,i=n.filter(e=>Fr(e)&&e.source===o);return i.map(e=>n.find(t=>Ur(t)&&t.id===e.target))}function ta(...e){if(3===e.length){const[t,n,o]=e;return Jr(t,n,o,"source")}const[t,n]=e,o="string"===typeof t?t:t.id,i=n.filter(e=>Fr(e)&&e.target===o);return i.map(e=>n.find(t=>Ur(t)&&t.id===e.source))}function na({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function oa(e,t){return t.some(t=>Fr(t)&&t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle))}function ia({x:e,y:t},{x:n,y:o,zoom:i}){return{x:e*i+n,y:t*i+o}}function ra({x:e,y:t},{x:n,y:o,zoom:i},r=!1,a=[1,1]){const l={x:(e-n)/i,y:(t-o)/i};return r?Qa(l,a):l}function aa(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function la({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function ua({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function sa(e,t){return ua(aa(la(e),la(t)))}function ca(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n<e.length;n++){const o=e[n];t=aa(t,la({...o.computedPosition,...o.dimensions}))}return ua(t)}function da(e,t,n={x:0,y:0,zoom:1},o=!1,i=!1){const r={...ra(t,n),width:t.width/n.zoom,height:t.height/n.zoom},a=[];for(const l of e){const{dimensions:e,selectable:t=!0,hidden:n=!1}=l,u=e.width??l.width??null,s=e.height??l.height??null;if(i&&!t||n)continue;const c=Lr(r,Xr(l)),d=null===u||null===s,h=o&&c>0,f=(u??0)*(s??0),p=d||h||c>=f;(p||l.dragging)&&a.push(l)}return a}function ha(e,t){const n=new Set;if("string"===typeof e)n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(e=>n.has(e.source)||n.has(e.target))}function fa(e,t){if("number"===typeof e)return Math.floor(.5*(t-t/(1+e)));if("string"===typeof e&&e.endsWith("px")){const t=Number.parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if("string"===typeof e&&e.endsWith("%")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return dl(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function pa(e,t,n){if("string"===typeof e||"number"===typeof e){const o=fa(e,n),i=fa(e,t);return{top:o,right:i,bottom:o,left:i,x:2*i,y:2*o}}if("object"===typeof e){const o=fa(e.top??e.y??0,n),i=fa(e.bottom??e.y??0,n),r=fa(e.left??e.x??0,t),a=fa(e.right??e.x??0,t);return{top:o,right:a,bottom:i,left:r,x:r+a,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function va(e,t,n,o,i,r){const{x:a,y:l}=ia(e,{x:t,y:n,zoom:o}),{x:u,y:s}=ia({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:o}),c=i-u,d=r-s;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(c),bottom:Math.floor(d)}}function ga(e,t,n,o,i,r=.1){const a=pa(r,t,n),l=(t-a.x)/e.width,u=(n-a.y)/e.height,s=Math.min(l,u),c=Hr(s,o,i),d=e.x+e.width/2,h=e.y+e.height/2,f=t/2-d*c,p=n/2-h*c,v=va(e,f,p,c,t,n),g={left:Math.min(v.left-a.left,0),top:Math.min(v.top-a.top,0),right:Math.min(v.right-a.right,0),bottom:Math.min(v.bottom-a.bottom,0)};return{x:f-g.left+g.right,y:p-g.top+g.bottom,zoom:c}}function ma(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function ya(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return!!n&&(!!n.selected||ya(n,t))}function wa(e,t){if("undefined"===typeof e)return"";if("string"===typeof e)return e;const n=t?`${t}__`:"";return`${n}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&")}`}function _a(e){const t=e.ctrlKey&&Za()?10:1;
1return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t}function ba(e,t,n){return e<t?Hr(Math.abs(e-t),1,t)/t:e>n?-Hr(Math.abs(e-n),1,t)/t:0}function xa(e,t,n=15,o=40){const i=ba(e.x,o,t.width-o)*n,r=ba(e.y,o,t.height-o)*n;return[i,r]}function Ea(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let i={};if("function"===typeof t.style?i={...t.style(t)}:t.style&&(i={...t.style}),i.width=i.width??`${t.dimensions.width}px`,i.height=i.height??`${t.dimensions.height}px`,n>0)if("string"===typeof i.width){const e=Number(i.width.replace("px",""));i.width=`${e+n}px`}else i.width+=n;if(o>0)if("string"===typeof i.height){const e=Number(i.height.replace("px",""));i.height=`${e+o}px`}else i.height+=o;if(e.position.x<0){const n=Math.abs(e.position.x);if(t.position.x=t.position.x-n,"string"===typeof i.width){const e=Number(i.width.replace("px",""));i.width=`${e+n}px`}else i.width+=n;e.position.x=0}if(e.position.y<0){const n=Math.abs(e.position.y);if(t.position.y=t.position.y-n,"string"===typeof i.height){const e=Number(i.height.replace("px",""));i.height=`${e+n}px`}else i.height+=n;e.position.y=0}t.dimensions.width=Number(i.width.toString().replace("px","")),t.dimensions.height=Number(i.height.toString().replace("px","")),"function"===typeof t.style?t.style=e=>{const n=t.style;return{...n(e),...i}}:t.style={...t.style,...i}}}}function ka(e,t){var n,o;const r=e.filter(e=>"add"===e.type||"remove"===e.type);for(const i of r)if("add"===i.type){const e=t.findIndex(e=>e.id===i.item.id);-1===e&&t.push(i.item)}else if("remove"===i.type){const e=t.findIndex(e=>e.id===i.id);-1!==e&&t.splice(e,1)}const a=t.map(e=>e.id);for(const l of t)for(const r of e)if(r.id===l.id)switch(r.type){case"select":l.selected=r.selected;break;case"position":if(Kr(l)&&("undefined"!==typeof r.position&&(l.position=r.position),"undefined"!==typeof r.dragging&&(l.dragging=r.dragging),l.expandParent&&l.parentNode)){const e=t[a.indexOf(l.parentNode)];e&&Kr(e)&&Ea(l,e)}break;case"dimensions":if(Kr(l)&&("undefined"!==typeof r.dimensions&&(l.dimensions=r.dimensions),"undefined"!==typeof r.updateStyle&&r.updateStyle&&(l.style={...l.style||{},width:`${null==(n=r.dimensions)?void 0:n.width}px`,height:`${null==(o=r.dimensions)?void 0:o.height}px`}),"undefined"!==typeof r.resizing&&(l.resizing=r.resizing),l.expandParent&&l.parentNode)){const e=t[a.indexOf(l.parentNode)];if(e&&Kr(e)){const t=!!e.dimensions.width&&!!e.dimensions.height;t?Ea(l,e):(0,i.dY)(()=>{Ea(l,e)})}}break}return t}function Sa(e,t){return{id:e,type:"select",selected:t}}function Na(e){return{item:e,type:"add"}}function Ma(e){return{id:e,type:"remove"}}function Ca(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function Ia(e,t=new Set,n=!1){const o=[];for(const[i,r]of e){const e=t.has(i);void 0===r.selected&&!e||r.selected===e||(n&&(r.selected=e),o.push(Sa(r.id,e)))}return o}const Aa=()=>{};function $a(e){const t=new Set;let n=Aa,o=()=>!1;const i=()=>t.size>0||o(),r=e=>{n=e},l=()=>{n=Aa},u=e=>{o=e},s=()=>{o=()=>!1},c=e=>{t.delete(e)},d=e=>{t.add(e);const n=()=>c(e);return a(n),{off:n}},h=o=>{const r=[n];return i()?r.push(...t):e&&r.push(e),Promise.allSettled(r.map(e=>e(o)))};return{on:d,off:c,trigger:h,hasListeners:i,listeners:t,setEmitter:r,removeEmitter:l,setHasEmitListeners:u,removeHasEmitListeners:s}}function Ta(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function Ba(e,t,n,o){var i,r;const a=new Map;for(const[l,u]of e)if((u.selected||u.id===o)&&(!u.parentNode||!ya(u,e))&&(u.draggable||t&&"undefined"===typeof u.draggable)){const t=e.get(l);t&&a.set(l,{id:u.id,position:u.position||{x:0,y:0},distance:{x:n.x-(null==(i=u.computedPosition)?void 0:i.x)||0,y:n.y-(null==(r=u.computedPosition)?void 0:r.y)||0},from:{x:u.computedPosition.x,y:u.computedPosition.y},extent:u.extent,parentNode:u.parentNode,dimensions:{...u.dimensions},expandParent:u.expandParent})}return Array.from(a.values())}function Pa({id:e,dragItems:t,findNode:n}){const o=[];for(const i of t){const e=n(i.id);e&&o.push(e)}return[e?o.find(t=>
1t.id===e):o[0],o]}function za(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function Ra(e,t,n){const[o,i,r,a]="string"!==typeof e?za(e.padding):[0,0,0,0];return!(!n||"undefined"===typeof n.computedPosition.x||"undefined"===typeof n.computedPosition.y||"undefined"===typeof n.dimensions.width||"undefined"===typeof n.dimensions.height)&&[[n.computedPosition.x+a,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-i,n.computedPosition.y+n.dimensions.height-r]]}function Da(e,t,n,o){let i=e.extent||n;if("parent"!==i&&(Array.isArray(i)||"parent"!==(null==i?void 0:i.range))||e.expandParent){if(Array.isArray(i)){const e=(null==o?void 0:o.computedPosition.x)||0,t=(null==o?void 0:o.computedPosition.y)||0;i=[[i[0][0]+e,i[0][1]+t],[i[1][0]+e,i[1][1]+t]]}else if("parent"!==i&&(null==i?void 0:i.range)&&Array.isArray(i.range)){const[e,t,n,r]=za(i.padding),a=(null==o?void 0:o.computedPosition.x)||0,l=(null==o?void 0:o.computedPosition.y)||0;i=[[i.range[0][0]+a+r,i.range[0][1]+l+e],[i.range[1][0]+a-t,i.range[1][1]+l-n]]}}else if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const t=Ra(i,e,o);t&&(i=t)}else t(new Fa(Ga.NODE_EXTENT_INVALID,e.id)),i=n;return"parent"===i?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function Oa({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function Va(e,t,n,o,i){const r=Oa(e.dimensions,Da(e,n,o,i)),a=Gr(t,r);return{position:{x:a.x-((null==i?void 0:i.computedPosition.x)||0),y:a.y-((null==i?void 0:i.computedPosition.y)||0)},computedPosition:a}}function Xa(e,t,n=_r.Left,o=!1){const i=((null==t?void 0:t.x)??0)+e.computedPosition.x,r=((null==t?void 0:t.y)??0)+e.computedPosition.y,{width:a,height:l}=t??qa(e);if(o)return{x:i+a/2,y:r+l/2};const u=(null==t?void 0:t.position)??n;switch(u){case _r.Top:return{x:i+a/2,y:r};case _r.Right:return{x:i+a,y:r+l/2};case _r.Bottom:return{x:i+a/2,y:r+l};case _r.Left:return{x:i,y:r+l/2}}}function La(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function Wa({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:i,targetHeight:r,width:a,height:l,viewport:u}){const s={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+o,t.y+r)};s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const c=la({x:(0-u.x)/u.zoom,y:(0-u.y)/u.zoom,width:a/u.zoom,height:l/u.zoom}),d=Math.max(0,Math.min(c.x2,s.x2)-Math.max(c.x,s.x)),h=Math.max(0,Math.min(c.y2,s.y2)-Math.max(c.y,s.y)),f=Math.ceil(d*h);return f>0}function Ha(e,t,n=!1){const o="number"===typeof e.zIndex;let i=o?e.zIndex:0;const r=t(e.source),a=t(e.target);return r&&a?(n&&(i=o?e.zIndex:Math.max(r.computedPosition.z||0,a.computedPosition.z||0)),i):0}var Ga=(e=>(e["MISSING_STYLES"]="MISSING_STYLES",e["MISSING_VIEWPORT_DIMENSIONS"]="MISSING_VIEWPORT_DIMENSIONS",e["NODE_INVALID"]="NODE_INVALID",e["NODE_NOT_FOUND"]="NODE_NOT_FOUND",e["NODE_MISSING_PARENT"]="NODE_MISSING_PARENT",e["NODE_TYPE_MISSING"]="NODE_TYPE_MISSING",e["NODE_EXTENT_INVALID"]="NODE_EXTENT_INVALID",e["EDGE_INVALID"]="EDGE_INVALID",e["EDGE_NOT_FOUND"]="EDGE_NOT_FOUND",e["EDGE_SOURCE_MISSING"]="EDGE_SOURCE_MISSING",e["EDGE_TARGET_MISSING"]="EDGE_TARGET_MISSING",e["EDGE_TYPE_MISSING"]="EDGE_TYPE_MISSING",e["EDGE_SOURCE_TARGET_SAME"]="EDGE_SOURCE_TARGET_SAME",e["EDGE_SOURCE_TARGET_MISSING"]="EDGE_SOURCE_TARGET_MISSING",e["EDGE_ORPHANED"]="EDGE_ORPHANED",e["USEVUEFLOW_OPTIONS"]="USEVUEFLOW_OPTIONS",e))(Ga||{});const Ya={["MISSING_STYLES"]:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",["MISSING_VIEWPORT_DIMENSIONS"]:()=>"The Vue Flow parent container needs a width and a height to render the graph",["NODE_INVALID"]:e=>`Node is invalid\nNode: ${e}`,["NODE_NOT_FOUND"]:e=>`Node not found\nNode: ${e}`,["NODE_MISSING_PARENT"]:(e,t)=>`Node is missing a parent\nNode: ${e}\nParent: ${t}`,["NODE_TYPE_MISSING"]:e=>`Node type is missing\nType: ${e}`,["NODE_EXTENT_INVALID"]:e=>`Only child nodes can use a parent extent\nNode: ${e}`,["EDGE_INVALID"]:e=>`An edge needs a source and a target\nEdge: ${e}`,["EDGE_SOURCE_MISSING"]:(e,t)=>`Edge source is missing\nEdge: ${e} \nSource: ${t}`,["EDGE_TARGET_MISSING"]:(e,t)=>`Edge target is missing\nEdge: ${e} \nTarget: ${t}`,["EDGE_TYPE_MISSING"]:e=>`Edge type is missing\nType: ${e}`,["EDGE_SOURCE_TARGET_SAME"]:(e,t,n)=>`Edge source and target are the same\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,["EDGE_SOURCE_TARGET_MISSING"]:(e,t,n)=>`Edge source or target is missing\nEdge: ${e} \nSource: ${t} \nTarget: ${n}`,["EDGE_ORPHANED"]:e=>`Edge was orphaned (suddenly missing source or target) and has been removed\nEdge: ${e}`,["EDGE_NOT_FOUND"]:e=>`Edge not found\nEdge: ${e}`,["USEVUEFLOW_OPTIONS"]:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};
1class Fa extends Error{constructor(e,...t){var n;super(null==(n=Ya[e])?void 0:n.call(Ya,...t)),this.name="VueFlowError",this.code=e,this.args=t}}function Ua(e){return"clientX"in e}function Ka(e){return"sourceEvent"in e}function ja(e,t){const n=Ua(e);let o,i;return n?(o=e.clientX,i=e.clientY):"touches"in e&&e.touches.length>0?(o=e.touches[0].clientX,i=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(o=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(o=0,i=0),{x:o-((null==t?void 0:t.left)??0),y:i-((null==t?void 0:t.top)??0)}}const Za=()=>{var e;return"undefined"!==typeof navigator&&(null==(e=null==navigator?void 0:navigator.userAgent)?void 0:e.indexOf("Mac"))>=0};function qa(e){var t,n;return{width:(null==(t=e.dimensions)?void 0:t.width)??e.width??0,height:(null==(n=e.dimensions)?void 0:n.height)??e.height??0}}function Qa(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const Ja=()=>!0;function el(e){null==e||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function tl(e,t,n){const o=[],i={x:e.x-n,y:e.y-n,width:2*n,height:2*n};for(const r of t.values())Lr(i,Xr(r))>0&&o.push(r);return o}const nl=250;function ol(e,t,n,o){var i,r;let a=[],l=Number.POSITIVE_INFINITY;const u=tl(e,n,t+nl);for(const s of u){const n=[...(null==(i=s.handleBounds)?void 0:i.source)??[],...(null==(r=s.handleBounds)?void 0:r.target)??[]];for(const i of n){if(o.nodeId===i.nodeId&&o.type===i.type&&o.id===i.id)continue;const{x:n,y:r}=Xa(s,i,i.position,!0),u=Math.sqrt((n-e.x)**2+(r-e.y)**2);u>t||(u<l?(a=[{...i,x:n,y:r}],l=u):u===l&&a.push({...i,x:n,y:r}))}}if(!a.length)return null;if(a.length>1){const e="source"===o.type?"target":"source";return a.find(t=>t.type===e)??a[0]}return a[0]}function il(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:r,doc:a,lib:l,flowId:u,isValidConnection:s=Ja},c,d,h,f){const p="target"===r,v=t?a.querySelector(`.${l}-flow__handle[data-id="${u}-${null==t?void 0:t.nodeId}-${null==t?void 0:t.id}-${null==t?void 0:t.type}"]`):null,{x:g,y:m}=ja(e),y=a.elementFromPoint(g,m),w=(null==y?void 0:y.classList.contains(`${l}-flow__handle`))?y:v,_={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const e=rl(void 0,w),t=w.getAttribute("data-nodeid"),r=w.getAttribute("data-handleid"),a=w.classList.contains("connectable"),l=w.classList.contains("connectableend");if(!t||!e)return _;const u={source:p?t:o,sourceHandle:p?r:i,target:p?o:t,targetHandle:p?i:r};_.connection=u;const v=a&&l,g=v&&(n===Er.Strict?p&&"source"===e||!p&&"target"===e:t!==o||r!==i);_.isValid=g&&s(u,{nodes:d,edges:c,sourceNode:h(u.source),targetNode:h(u.target)}),_.toHandle=ul(t,e,r,f,n,!0)}return _}function rl(e,t){return e||((null==t?void 0:t.classList.contains("target"))?"target":(null==t?void 0:t.classList.contains("source"))?"source":null)}function al(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function ll(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function ul(e,t,n,o,i,r=!1){var a,l,u;const s=o.get(e);if(!s)return null;const c=i===Er.Strict?null==(a=s.handleBounds)?void 0:a[t]:[...(null==(l=s.handleBounds)?void 0:l.source)??[],...(null==(u=s.handleBounds)?void 0:u.target)??[]],d=(n?null==c?void 0:c.find(e=>e.id===n):null==c?void 0:c[0])??null;return d&&r?{...d,...Xa(s,d,d.position,!0)}:d}const sl={[_r.Left]:_r.Right,[_r.Right]:_r.Left,[_r.Top]:_r.Bottom,[_r.Bottom]:_r.Top},cl=["production","prod"];function dl(e,...t){hl()&&console.warn(`[Vue Flow]: ${e}`,...t)}function hl(){return!cl.includes("production")}function fl(e,t,n,o,i){const r=t.querySelectorAll(`.vue-flow__handle.${e}`);return(null==r?void 0:r.length)?Array.from(r).map(t=>{const r=t.getBoundingClientRect();return{id:t.getAttribute("data-handleid"),type:e,nodeId:i,position:t.getAttribute("data-handlepos"),x:(r.left-n.left)/o,y:(r.top-n.top)/o,...Wr(t)}}):null}function pl(e,t,n,o,r,a=!1,l){r.value=!1,e.selected?(a||e.selected&&t)&&(o([e]),(0,i.dY)(()=>{l.blur()})):n([e])}function vl(e){const t=(0,o.R1)(e);return"undefined"!==typeof t}function gl(e,t,n,o){if(!e||!e.source||!e.target)return n(new Fa(Ga.EDGE_INVALID,(null==e?void 0:e.id)??"[ID UNKNOWN]")),!1;let i;return i=Fr(e)?e:{...e,id:na(e)},i=Qr(i,void 0,o),!oa(i,t)&&i}function ml(e,t,n,o,i){if(!t.source||!t.target)return i(new Fa(Ga.EDGE_INVALID,e.
1id)),!1;if(!n)return i(new Fa(Ga.EDGE_NOT_FOUND,e.id)),!1;const{id:r,...a}=e;return{...a,id:o?na(t):r,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function yl(e,t,n){const o={},i=[];for(let r=0;r<e.length;++r){const a=e[r];if(!Ur(a)){n(new Fa(Ga.NODE_INVALID,null==a?void 0:a.id)||`[ID UNKNOWN|INDEX ${r}]`);continue}const l=qr(a,t(a.id),a.parentNode);a.parentNode&&(o[a.parentNode]=!0),i[r]=l}for(const r of i){const e=t(r.parentNode)||i.find(e=>e.id===r.parentNode);r.parentNode&&!e&&n(new Fa(Ga.NODE_MISSING_PARENT,r.id,r.parentNode)),(r.parentNode||o[r.id])&&(o[r.id]&&(r.isParent=!0),e&&(e.isParent=!0))}return i}function wl(e,t,n,o,i,r){let a=i;const l=o.get(a)||new Map;o.set(a,l.set(n,t)),a=`${i}-${e}`;const u=o.get(a)||new Map;if(o.set(a,u.set(n,t)),r){a=`${i}-${e}-${r}`;const l=o.get(a)||new Map;o.set(a,l.set(n,t))}}function _l(e,t,n){e.clear();for(const o of n){const{source:t,target:n,sourceHandle:i=null,targetHandle:r=null}=o,a={edgeId:o.id,source:t,target:n,sourceHandle:i,targetHandle:r},l=`${t}-${i}--${n}-${r}`,u=`${n}-${r}--${t}-${i}`;wl("source",a,u,e,t,i),wl("target",a,l,e,n,r)}}function bl(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function xl(e,t,n,o,i,r,a,l){const u=[];for(const s of e){const e=Fr(s)?s:gl(s,l,i,r);if(!e)continue;const c=n(e.source),d=n(e.target);if(!c||!d){i(new Fa(Ga.EDGE_SOURCE_TARGET_MISSING,e.id,e.source,e.target));continue}if(!c){i(new Fa(Ga.EDGE_SOURCE_MISSING,e.id,e.source));continue}if(!d){i(new Fa(Ga.EDGE_TARGET_MISSING,e.id,e.target));continue}if(t){const n=t(e,{edges:l,nodes:a,sourceNode:c,targetNode:d});if(!n){i(new Fa(Ga.EDGE_INVALID,e.id));continue}}const h=o(e.id);u.push({...Qr(e,h,r),sourceNode:c,targetNode:d})}return u}const El=Symbol("vueFlow"),kl=Symbol("nodeId"),Sl=Symbol("nodeRef"),Nl=Symbol("edgeId"),Ml=Symbol("edgeRef"),Cl=Symbol("slots");function Il(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:r,noDragClassName:a,nodeLookup:l,nodeExtent:u,nodeDragThreshold:s,viewport:c,autoPanOnNodeDrag:d,autoPanSpeed:h,nodesDraggable:f,panBy:p,findNode:v,multiSelectionActive:g,nodesSelectionActive:m,selectNodesOnDrag:y,removeSelectedElements:w,addSelectedNodes:_,updateNodePositions:b,emits:x}=Yu(),{onStart:E,onDrag:k,onStop:S,onClick:N,el:M,disabled:C,id:I,selectable:A,dragHandle:$}=e,T=(0,o.IJ)(!1);let B,P=[],z=null,R={x:void 0,y:void 0},D={x:0,y:0},O=null,V=!1,X=!1,L=0,W=!1;const H=Tl(),G=({x:e,y:t})=>{R={x:e,y:t};let o=!1;if(P=P.map(i=>{const a={x:e-i.distance.x,y:t-i.distance.y},{computedPosition:l}=Va(i,n.value?Qa(a,r.value):a,x.error,u.value,i.parentNode?v(i.parentNode):void 0);return o=o||i.position.x!==l.x||i.position.y!==l.y,i.position=l,i}),X=X||o,o&&(b(P,!0,!0),T.value=!0,O)){const[e,t]=Pa({id:I,dragItems:P,findNode:v});k({event:O,node:e,nodes:t})}},Y=()=>{if(!z)return;const[e,t]=xa(D,z,h.value);if(0!==e||0!==t){const n={x:(R.x??0)-e/c.value.zoom,y:(R.y??0)-t/c.value.zoom};p({x:e,y:t})&&G(n)}L=requestAnimationFrame(Y)},F=(e,t)=>{V=!0;const n=v(I);y.value||g.value||!n||n.selected||w(),n&&(0,o.BA)(A)&&y.value&&pl(n,g.value,_,w,m,!1,t);const i=H(e.sourceEvent);if(R=i,P=Ba(l.value,f.value,i,I),P.length){const[t,n]=Pa({id:I,dragItems:P,findNode:v});E({event:e.sourceEvent,node:t,nodes:n})}},U=(e,n)=>{var o;"touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1||(X=!1,0===s.value&&F(e,n),R=H(e.sourceEvent),z=(null==(o=t.value)?void 0:o.getBoundingClientRect())||null,D=ja(e.sourceEvent,z))},K=(e,t)=>{const n=H(e.sourceEvent);if(!W&&V&&d.value&&(W=!0,Y()),!V){const o=n.xSnapped-(R.x??0),i=n.ySnapped-(R.y??0),r=Math.sqrt(o*o+i*i);r>s.value&&F(e,t)}(R.x!==n.xSnapped||R.y!==n.ySnapped)&&P.length&&V&&(O=e.sourceEvent,D=ja(e.sourceEvent,z),G(n))},j=e=>{let t=!1;if(!V&&!T.value&&!g.value){const n=e.sourceEvent,o=H(n),i=o.xSnapped-(R.x??0),r=o.ySnapped-(R.y??0),a=Math.sqrt(i*i+r*r);0!==a&&a<=s.value&&(null==N||N(n),t=!0)}if(P.length&&!t){X&&(b(P,!1,!1),X=!1);const[t,n]=Pa({id:I,dragItems:P,findNode:v});S({event:e.sourceEvent,node:t,nodes:n})}P=[],T.value=!1,W=!1,V=!1,R={x:void 0,y:void 0},cancelAnimationFrame(L)};return(0,i.wB)([()=>(0,o.BA)(C),M],([e,t],n,i)=>{if(t){const n=Pt(t);e||(B=jt().on("start",e=>U(e,t)).on("drag",e=>K(e,t)).on("end",e=>j(e)).filter(e=>{const n=e.target,i=(0,o.BA)($);return!e.button&&(!a.value||!Ta(n,`.${a.value}`,t)&&(!i||Ta(n,i,t)))}),n.call(B)),i(()=>{n.on(".drag",null),B&&(B.on("start",null),B.on("drag",null),B.on("end",null))})}}),T}function Al(){return{doubleClick:$a(),click:$a(),mouseEnter:$a(),mouseMove:$a(),mouseLeave:$a(),contextMenu:$a(),updateStart:$a(),update:$a(),updateEnd:$a()}}function $l(e,t){const n=Al();return n.doubleClick.on(n=>{var o,i;t.edgeDoubleClick(n),null==(i=null==(o=e.events)?void 0:o.doubleClick)||i.call(o,n)}),n.click.on(n=>{var o,i;t.edgeClick(n),null==(i=null==(o=e.events)?void 0:o.click)||i.call(o,n)}),n.mouseEnter.on(n=>{var o,i;t.edgeMouseEnter(n),null==(i=null==(o=e.events)?void 0:o.mouseEnter)||i.call(o,n)}),n.mouseMove.on(n=>{var o,i;t.edgeMouseMove(n),null==(i=null==(o=e.events)?void 0:o.mouseMove)||i.call(o,n)}),n.mouseLeave.on(n=>{var o,i;t.edgeMouseLeave(n),null==(i=null==(o=e.events)?void 0:o.mouseLeave)||i.call(o,n)}),n.contextMenu.on(n=>{var o,i;t.edgeContextMenu(n),null==(i=null==(o=e.events)?void 0:o.contextMenu)||i.call(o,n)}),n.updateStart.on(n=>{var o,i;t.edgeUpdateStart(n),null==(i=null==(o=e.events)?void 0:o.updateStart)||i.call(o,n)}),n.update.on(n=>{var o,i;t.edgeUpdate(n),null==(i=null==(o=e.events)?void 0:o.update)||i.call(o,n)}),n.updateEnd.on(n=>{var o,i;t.edgeUpdateEnd(n),null==(i=null==(o=e.events)?void 0:o.updateEnd)||i.call(o,n)}),Object.entries(n).reduce((e,[t,n])=>(e.emit[t]=n.trigger,e.on[t]=n.on,e),{emit:{},on:{}})}
1function Tl(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=Yu();return i=>{var r;const a=(null==(r=o.value)?void 0:r.getBoundingClientRect())??{left:0,top:0},l=Ka(i)?i.sourceEvent:i,{x:u,y:s}=ja(l,a),c=ra({x:u,y:s},e.value),{x:d,y:h}=n.value?Qa(c,t.value):c;return{xSnapped:d,ySnapped:h,...c}}}function Bl(){return!0}function Pl({handleId:e,nodeId:t,type:n,isValidConnection:i,edgeUpdaterType:r,onEdgeUpdate:a,onEdgeUpdateEnd:l}){const{id:u,vueFlowRef:s,connectionMode:c,connectionRadius:d,connectOnClick:h,connectionClickStartHandle:f,nodesConnectable:p,autoPanOnConnect:v,autoPanSpeed:g,findNode:m,panBy:y,startConnection:w,updateConnection:_,endConnection:b,emits:x,viewport:E,edges:k,nodes:S,isValidConnection:N,nodeLookup:M}=Yu();let C=null,I=!1,A=null;function $(h){var f;const p="target"===(0,o.BA)(n),$=Ua(h),T=Yr(h.target),B=h.currentTarget;if(B&&($&&0===h.button||!$)){let n=function(n){G=ja(n,L),z=ol(ra(G,E.value,!1,[1,1]),d.value,M.value,U),Y||(F(),Y=!0);const i=il(n,{handle:z,connectionMode:c.value,fromNodeId:(0,o.BA)(t),fromHandleId:(0,o.BA)(e),fromType:p?"target":"source",isValidConnection:R,doc:T,lib:"vue",flowId:u,nodeLookup:M.value},k.value,S.value,m,M.value);A=i.handleDomNode,C=i.connection,I=ll(!!z,i.isValid);const r={...q,isValid:I,to:i.toHandle&&I?ia({x:i.toHandle.x,y:i.toHandle.y},E.value):G,toHandle:i.toHandle,toPosition:I&&i.toHandle?i.toHandle.position:sl[U.position],toNode:i.toHandle?M.value.get(i.toHandle.nodeId):null};if(I&&z&&(null==q?void 0:q.toHandle)&&r.toHandle&&q.toHandle.type===r.toHandle.type&&q.toHandle.nodeId===r.toHandle.nodeId&&q.toHandle.id===r.toHandle.id&&q.to.x===r.to.x&&q.to.y===r.to.y)return;const a=z??i.toHandle;if(_(a&&I?ia({x:a.x,y:a.y},E.value):G,a,al(!!a,I)),q=r,!z&&!I&&!A)return el(H);C&&C.source!==C.target&&A&&(el(H),H=A,A.classList.add("connecting","vue-flow__handle-connecting"),A.classList.toggle("valid",!!I),A.classList.toggle("vue-flow__handle-valid",!!I))},$=function(e){"touches"in e&&e.touches.length>0||((z||A)&&C&&I&&(a?a(e,C):x.connect(C)),x.connectEnd(e),r&&(null==l||l(e)),el(H),cancelAnimationFrame(D),b(e),Y=!1,I=!1,C=null,A=null,T.removeEventListener("mousemove",n),T.removeEventListener("mouseup",$),T.removeEventListener("touchmove",n),T.removeEventListener("touchend",$))};const P=m((0,o.BA)(t));let z,R=(0,o.BA)(i)||N.value||Bl;!R&&P&&(R=(p?P.isValidSourcePos:P.isValidTargetPos)||Bl);let D=0;const{x:O,y:V}=ja(h),X=rl((0,o.BA)(r),B),L=null==(f=s.value)?void 0:f.getBoundingClientRect();if(!L||!X)return;const W=ul((0,o.BA)(t),X,(0,o.BA)(e),M.value,c.value);if(!W)return;let H,G=ja(h,L),Y=!1;const F=()=>{if(!v.value)return;const[e,t]=xa(G,L,g.value);y({x:e,y:t}),D=requestAnimationFrame(F)},U={...W,nodeId:(0,o.BA)(t),type:X,position:W.position},K=M.value.get((0,o.BA)(t)),j=Xa(K,U,_r.Left,!0),Z={inProgress:!0,isValid:null,from:j,fromHandle:U,fromPosition:U.position,fromNode:K,to:G,toHandle:null,toPosition:sl[U.position],toNode:null};w({nodeId:(0,o.BA)(t),id:(0,o.BA)(e),type:X,position:(null==B?void 0:B.getAttribute("data-handlepos"))||_r.Top,...G},{x:O-L.left,y:V-L.top}),x.connectStart({event:h,nodeId:(0,o.BA)(t),handleId:(0,o.BA)(e),handleType:X});let q=Z;T.addEventListener("mousemove",n),T.addEventListener("mouseup",$),T.addEventListener("touchmove",n),T.addEventListener("touchend",$)}}function T(r){var a,l;if(!h.value)return;const s="target"===(0,o.BA)(n);if(!f.value)return x.clickConnectStart({event:r,nodeId:(0,o.BA)(t),handleId:(0,o.BA)(e)}),void w({nodeId:(0,o.BA)(t),type:(0,o.BA)(n),id:(0,o.BA)(e),position:_r.Top,...ja(r)},void 0,!0);let d=(0,o.BA)(i)||N.value||Bl;const v=m((0,o.BA)(t));if(!d&&v&&(d=(s?v.isValidSourcePos:v.isValidTargetPos)||Bl),v&&!1===("undefined"===typeof v.connectable?p.value:v.connectable))return;const g=Yr(r.target),y=il(r,{handle:{nodeId:(0,o.BA)(t),id:(0,o.BA)(e),type:(0,o.BA)(n),position:_r.Top,...ja(r)},connectionMode:c.value,fromNodeId:f.value.nodeId,fromHandleId:f.value.id??null,fromType:f.value.type,isValidConnection:d,doc:g,lib:"vue",flowId:u,nodeLookup:M.value},k.value,S.value,m,M.value),_=(null==(a=y.connection)?void 0:a.source)===(null==(l=y.connection)?void 0:l.target);y.isValid&&y.connection&&!_&&x.connect(y.connection),x.clickConnectEnd(r),b(r,!0)}return{handlePointerDown:$,handleClick:T}}function zl(){return(0,i.WQ)(kl,"")}function Rl(e){const t=e??zl()??"",n=(0,i.WQ)(Sl,(0,o.KR)(null)),{findNode:r,edges:a,emits:l}=Yu(),u=r(t);return u||l.error(new Fa(Ga.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:u,parentNode:(0,i.EW)(()=>r(u.parentNode)),connectedEdges:(0,i.EW)(()=>ha([u],a.value))}}function Dl(){return{doubleClick:$a(),click:$a(),mouseEnter:$a(),mouseMove:$a(),mouseLeave:$a(),contextMenu:$a(),dragStart:$a(),drag:$a(),dragStop:$a()}}function Ol(e,t){const n=Dl();return n.doubleClick.on(n=>{var o,i;t.nodeDoubleClick(n),null==(i=null==(o=e.events)?void 0:o.doubleClick)||i.call(o,n)}),n.click.on(n=>{var o,i;t.nodeClick(n),null==(i=null==(o=e.events)?void 0:o.click)||i.call(o,n)}),n.mouseEnter.on(n=>{var o,i;t.nodeMouseEnter(n),null==(i=null==(o=e.events)?void 0:o.mouseEnter)||i.call(o,n)}),n.mouseMove.on(n=>{var o,i;t.nodeMouseMove(n),null==(i=null==(o=e.events)?void 0:o.mouseMove)||i.call(o,n)}),n.mouseLeave.on(n=>{var o,i;t.nodeMouseLeave(n),null==(i=null==(o=e.events)?void 0:o.mouseLeave)||i.call(o,n)}),n.contextMenu.on(n=>{var o,i;t.nodeContextMenu(n),null==(i=null==(o=e.events)?void 0:o.contextMenu)||i.call(o,n)}),n.dragStart.on(n=>{var o,i;t.nodeDragStart(n),null==(i=null==(o=e.events)?void 0:o.dragStart)||i.call(o,n)}),n.drag.on(n=>{var o,i;t.nodeDrag(n),null==(i=null==(o=e.events)?void 0:o.drag)||i.call(o,n)}),n.dragStop.on(n=>{var o,i;t.nodeDragStop(n),null==(i=null==(o=e.events)?void 0:o.dragStop)||i.call(o,n)}),Object.entries(n).reduce((e,[t,n])=>(e.emit[t]=n.trigger,e.on[t]=n.on,e),{emit:{},on:{}})}function Vl(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:i,snapToGri
1d:r,nodesDraggable:a,emits:l}=Yu();return(u,s=!1)=>{const c=r.value?i.value[0]:5,d=r.value?i.value[1]:5,h=s?4:1,f=u.x*c*h,p=u.y*d*h,v=[];for(const n of e.value)if(n.draggable||a&&"undefined"===typeof n.draggable){const e={x:n.computedPosition.x+f,y:n.computedPosition.y+p},{position:i}=Va(n,e,l.error,t.value,n.parentNode?o(n.parentNode):void 0);v.push({id:n.id,position:i,from:n.position,distance:{x:u.x,y:u.y},dimensions:n.dimensions})}n(v,!0,!1)}}const Xl=.1,Ll=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function Wl(){return dl("Viewport not initialized yet."),Promise.resolve(!1)}const Hl={zoomIn:Wl,zoomOut:Wl,zoomTo:Wl,fitView:Wl,setCenter:Wl,fitBounds:Wl,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:Wl,setTransform:Wl,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function Gl(e){function t(t,n){return new Promise(o=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate("linear"===(null==n?void 0:n.interpolate)?Jn:po).scaleBy(Yl(e.d3Selection,null==n?void 0:n.duration,null==n?void 0:n.ease,()=>{o(!0)}),t):o(!1)})}function n(t,n,o,i){return new Promise(r=>{var a;const{x:l,y:u}=Gr({x:-t,y:-n},e.translateExtent),s=cr.translate(-l,-u).scale(o);e.d3Selection&&e.d3Zoom?null==(a=e.d3Zoom)||a.interpolate("linear"===(null==i?void 0:i.interpolate)?Jn:po).transform(Yl(e.d3Selection,null==i?void 0:i.duration,null==i?void 0:i.ease,()=>{r(!0)}),s):r(!1)})}return(0,i.EW)(()=>{const o=e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height;return o?{viewportInitialized:!0,zoomIn:e=>t(1.2,e),zoomOut:e=>t(1/1.2,e),zoomTo:(t,n)=>new Promise(o=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate("linear"===(null==n?void 0:n.interpolate)?Jn:po).scaleTo(Yl(e.d3Selection,null==n?void 0:n.duration,null==n?void 0:n.ease,()=>{o(!0)}),t):o(!1)}),setViewport:(e,t)=>n(e.x,e.y,e.zoom,t),setTransform:(e,t)=>n(e.x,e.y,e.zoom,t),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(t={padding:Xl,includeHiddenNodes:!1,duration:0})=>{var o,i;const r=[];for(const n of e.nodes){const e=n.dimensions.width&&n.dimensions.height&&((null==t?void 0:t.includeHiddenNodes)||!n.hidden);e&&(!(null==(o=t.nodes)?void 0:o.length)||(null==(i=t.nodes)?void 0:i.length)&&t.nodes.includes(n.id))&&r.push(n)}if(!r.length)return Promise.resolve(!1);const a=ca(r),{x:l,y:u,zoom:s}=ga(a,e.dimensions.width,e.dimensions.height,t.minZoom??e.minZoom,t.maxZoom??e.maxZoom,t.padding??Xl);return n(l,u,s,t)},setCenter:(t,o,i)=>{const r="undefined"!==typeof(null==i?void 0:i.zoom)?i.zoom:e.maxZoom,a=e.dimensions.width/2-t*r,l=e.dimensions.height/2-o*r;return n(a,l,r,i)},fitBounds:(t,o={padding:Xl})=>{const{x:i,y:r,zoom:a}=ga(t,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,o.padding??Xl);return n(i,r,a,o)},project:t=>ra(t,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:t=>{if(e.vueFlowRef){const{x:n,y:o}=e.vueFlowRef.getBoundingClientRect(),i={x:t.x-n,y:t.y-o};return ra(i,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:t=>{if(e.vueFlowRef){const{x:n,y:o}=e.vueFlowRef.getBoundingClientRect(),i={x:t.x+n,y:t.y+o};return ia(i,e.viewport)}return{x:0,y:0}}}:Hl})}function Yl(e,t=0,n=Ll,o=()=>{}){const i="number"===typeof t&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e}function Fl(e,t,n){const r=(0,o.uY)(!0);return r.run(()=>{const a=()=>{r.run(()=>{let t,r,a=!(!n.nodes.value.length&&!n.edges.value.length);t=y([e.modelValue,()=>{var t,n;return null==(n=null==(t=e.modelValue)?void 0:t.value)?void 0:n.length}],([e])=>{e&&Array.isArray(e)&&(null==r||r.pause(),n.setElements(e),r||a||!e.length?null==r||r.resume():a=!0)}),r=y([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([n,o])=>{var r;(null==(r=e.modelValue)?void 0:r.value)&&Array.isArray(e.modelValue.value)&&(null==t||t.pause(),e.modelValue.value=[...n,...o],(0,i.dY)(()=>{null==t||t.resume()}))},{immediate:a}),(0,o.jr)(()=>{null==t||t.stop(),null==r||r.stop()})})},l=()=>{r.run(()=>{let t,r,a=!!n.nodes.value.length;t=y([e.nodes,()=>{var t,n;return null==(n=null==(t=e.nodes)?void 0:t.value)?void 0:n.length}],([e])=>{e&&Array.isArray(e)&&(null==r||r.pause(),n.setNodes(e),r||a||!e.length?null==r||r.resume():a=!0)}),r=y([n.nodes,()=>n.nodes.value.length],([n])=>{var o;(null==(o=e.nodes)?void 0:o.value)&&Array.isArray(e.nodes.value)&&(null==t||t.pause(),e.nodes.value=[...n],(0,i.dY)(()=>{null==t||t.resume()}))},{immediate:a}),(0,o.jr)(()=>{null==t||t.stop(),null==r||r.stop()})})},u=()=>{r.run(()=>{let t,r,a=!!n.edges.value.length;t=y([e.edges,()=>{var t,n;return null==(n=null==(t=e.edges)?void 0:t.value)?void 0:n.length}],([e])=>{e&&Array.isArray(e)&&(null==r||r.pause(),n.setEdges(e),r||a||!e.length?null==r||r.resume():a=!0)}),r=y([n.edges,()=>n.edges.value.length],([n])=>{var o;(null==(o=e.edges)?void 0:o.value)&&Array.isArray(e.edges.value)&&(null==t||t.pause(),e.edges.value=[...n],(0,i.dY)(()=>{null==t||t.resume()}))},{immediate:a}),(0,o.jr)(()=>{null==t||t.stop(),null==r||r.stop()})})},s=()=>{r.run(()=>{(0,i.wB)(()=>t.maxZoom,()=>{t.maxZoom&&vl(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},c=()=>{r.run(()=>{(0,i.wB)(()=>t.minZoom,()=>{t.minZoom&&vl(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},d=()=>{r.run(()=>{(0,i.wB)(()=>t.translateExtent,()=>{t.translateExtent&&vl(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},h=()=>{r.run(()=>{(0,i.wB)(()=>t.nodeExtent,()=>
1{t.nodeExtent&&vl(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},f=()=>{r.run(()=>{(0,i.wB)(()=>t.applyDefault,()=>{vl(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},p=()=>{r.run(()=>{const e=async e=>{let o=e;"function"===typeof t.autoConnect&&(o=await t.autoConnect(e)),!1!==o&&n.addEdges([o])};(0,i.wB)(()=>t.autoConnect,()=>{vl(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),(0,i.wB)(n.autoConnect,(t,o,i)=>{t?n.onConnect(e):n.hooks.value.connect.off(e),i(()=>{n.hooks.value.connect.off(e)})},{immediate:!0})})},v=()=>{const e=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const a of Object.keys(t)){const l=a;if(!e.includes(l)){const e=(0,o.lW)(()=>t[l]),a=n[l];(0,o.i9)(a)&&r.run(()=>{(0,i.wB)(e,e=>{vl(e)&&(a.value=e)},{immediate:!0})})}}},g=()=>{a(),l(),u(),c(),s(),d(),h(),f(),p(),v()};g()}),()=>r.stop()}function Ul(){return{edgesChange:$a(),nodesChange:$a(),nodeDoubleClick:$a(),nodeClick:$a(),nodeMouseEnter:$a(),nodeMouseMove:$a(),nodeMouseLeave:$a(),nodeContextMenu:$a(),nodeDragStart:$a(),nodeDrag:$a(),nodeDragStop:$a(),nodesInitialized:$a(),miniMapNodeClick:$a(),miniMapNodeDoubleClick:$a(),miniMapNodeMouseEnter:$a(),miniMapNodeMouseMove:$a(),miniMapNodeMouseLeave:$a(),connect:$a(),connectStart:$a(),connectEnd:$a(),clickConnectStart:$a(),clickConnectEnd:$a(),paneReady:$a(),init:$a(),move:$a(),moveStart:$a(),moveEnd:$a(),selectionDragStart:$a(),selectionDrag:$a(),selectionDragStop:$a(),selectionContextMenu:$a(),selectionStart:$a(),selectionEnd:$a(),viewportChangeStart:$a(),viewportChange:$a(),viewportChangeEnd:$a(),paneScroll:$a(),paneClick:$a(),paneContextMenu:$a(),paneMouseEnter:$a(),paneMouseMove:$a(),paneMouseLeave:$a(),edgeContextMenu:$a(),edgeMouseEnter:$a(),edgeMouseMove:$a(),edgeMouseLeave:$a(),edgeDoubleClick:$a(),edgeClick:$a(),edgeUpdateStart:$a(),edgeUpdate:$a(),edgeUpdateEnd:$a(),updateNodeInternals:$a(),error:$a(e=>dl(e.message))}}function Kl(e,t){const n=(0,i.nI)();function o(e){var t;const o=jl(e),i=null==(t=null==n?void 0:n.vnode.props)?void 0:t[o];return!!i}(0,i.KC)(()=>{for(const[n,i]of Object.entries(t.value)){const t=t=>{e(n,t)};i.setEmitter(t),a(i.removeEmitter),i.setHasEmitListeners(()=>o(n)),a(i.removeHasEmitListeners)}})}function jl(e){const[t,...n]=e.split(":"),o=t.replace(/(?:^|-)(\w)/g,(e,t)=>t.toUpperCase());return`on${o}${n.length?`:${n.join(":")}`:""}`}function Zl(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:br.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Sr.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:xr.Bezier,style:{}},connectionMode:Er.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:Za()?"Meta":"Control",zoomActivationKeyCode:Za()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:Ul(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const ql=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function Ql(e,t,n){const o=Gl(e),i=t=>{const n=t??[];e.hooks.updateNodeInternals.trigger(n)},r=t=>
1ta(t,e.nodes,e.edges),a=t=>ea(t,e.nodes,e.edges),l=t=>ha(t,e.edges),u=({id:t,type:n,nodeId:o})=>{var i;const r=t?`-${n}-${t}`:`-${n}`;return Array.from((null==(i=e.connectionLookup.get(`${o}${r}`))?void 0:i.values())??[])},s=e=>{if(e)return t.value.get(e)},c=e=>{if(e)return n.value.get(e)},d=(t,n,o)=>{var i,r;const a=[];for(const e of t){const t={id:e.id,type:"position",dragging:o,from:e.from};if(n&&(t.position=e.position,e.parentNode)){const n=s(e.parentNode);t.position={x:t.position.x-((null==(i=null==n?void 0:n.computedPosition)?void 0:i.x)??0),y:t.position.y-((null==(r=null==n?void 0:n.computedPosition)?void 0:r.y)??0)}}a.push(t)}(null==a?void 0:a.length)&&e.hooks.nodesChange.trigger(a)},h=t=>{if(!e.vueFlowRef)return;const n=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!n)return;const i=window.getComputedStyle(n),{m22:r}=new window.DOMMatrixReadOnly(i.transform),a=[];for(const e of t){const t=e,n=s(t.id);if(n){const e=Wr(t.nodeElement),o=!(!e.width||!e.height||n.dimensions.width===e.width&&n.dimensions.height===e.height&&!t.forceUpdate);if(o){const o=t.nodeElement.getBoundingClientRect();n.dimensions=e,n.handleBounds.source=fl("source",t.nodeElement,o,r,n.id),n.handleBounds.target=fl("target",t.nodeElement,o,r,n.id),a.push({id:n.id,type:"dimensions",dimensions:e})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),a.length&&e.hooks.nodesChange.trigger(a)},f=(o,i)=>{const r=new Set,a=new Set;for(const e of o)Ur(e)?r.add(e.id):Fr(e)&&a.add(e.id);const l=Ia(t.value,r,!0),u=Ia(n.value,a);if(e.multiSelectionActive){for(const e of r)l.push(Sa(e,i));for(const e of a)u.push(Sa(e,i))}l.length&&e.hooks.nodesChange.trigger(l),u.length&&e.hooks.edgesChange.trigger(u)},p=o=>{if(e.multiSelectionActive){const t=o.map(e=>Sa(e.id,!0));return void e.hooks.nodesChange.trigger(t)}e.hooks.nodesChange.trigger(Ia(t.value,new Set(o.map(e=>e.id)),!0)),e.hooks.edgesChange.trigger(Ia(n.value))},v=o=>{if(e.multiSelectionActive){const t=o.map(e=>Sa(e.id,!0));return void e.hooks.edgesChange.trigger(t)}e.hooks.edgesChange.trigger(Ia(n.value,new Set(o.map(e=>e.id)))),e.hooks.nodesChange.trigger(Ia(t.value,new Set,!0))},g=e=>{f(e,!0)},m=t=>{const n=t||e.nodes,o=n.map(e=>(e.selected=!1,Sa(e.id,!1)));e.hooks.nodesChange.trigger(o)},y=t=>{const n=t||e.edges,o=n.map(e=>(e.selected=!1,Sa(e.id,!1)));e.hooks.edgesChange.trigger(o)},w=t=>{if(!t||!t.length)return f([],!1);const n=t.reduce((e,t)=>{const n=Sa(t.id,!1);return Ur(t)?e.nodes.push(n):e.edges.push(n),e},{nodes:[],edges:[]});n.nodes.length&&e.hooks.nodesChange.trigger(n.nodes),n.edges.length&&e.hooks.edgesChange.trigger(n.edges)},_=t=>{var n;null==(n=e.d3Zoom)||n.scaleExtent([t,e.maxZoom]),e.minZoom=t},x=t=>{var n;null==(n=e.d3Zoom)||n.scaleExtent([e.minZoom,t]),e.maxZoom=t},E=t=>{var n;null==(n=e.d3Zoom)||n.translateExtent(t),e.translateExtent=t},k=t=>{e.nodeExtent=t,i()},S=t=>{var n;null==(n=e.d3Zoom)||n.clickDistance(t)},N=t=>{e.nodesDraggable=t,e.nodesConnectable=t,e.elementsSelectable=t},M=t=>{const n=t instanceof Function?t(e.nodes):t;(e.initialized||n.length)&&(e.nodes=yl(n,s,e.hooks.error.trigger))},C=t=>{const o=t instanceof Function?t(e.edges):t;if(!e.initialized&&!o.length)return;const i=xl(o,e.isValidConnection,s,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);_l(e.connectionLookup,n.value,i),e.edges=i},I=t=>{const n=t instanceof Function?t([...e.nodes,...e.edges]):t;(e.initialized||n.length)&&(M(n.filter(Ur)),C(n.filter(Fr)))},A=t=>{let n=t instanceof Function?t(e.nodes):t;n=Array.isArray(n)?n:[n];const o=yl(n,s,e.hooks.error.trigger),i=[];for(const e of o)i.push(Na(e));i.length&&e.hooks.nodesChange.trigger(i)},$=t=>{let n=t instanceof Function?t(e.edges):t;n=Array.isArray(n)?n:[n];const o=xl(n,e.isValidConnection,s,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),i=[];for(const e of o)i.push(Na(e));i.length&&e.hooks.edgesChange.trigger(i)},T=(t,n=!0,o=!1)=>{const i=t instanceof Function?t(e.nodes):t,r=Array.isArray(i)?i:[i],a=[],u=[];function c(e){const t=l(e);for(const n of t)vl(n.deletable)&&!n.deletable||u.push(Ca(n.id,n.source,n.target,n.sourceHandle,n.targetHandle))}function d(t){const o=[];for(const n of e.nodes)n.parentNode===t&&o.push(n);if(o.length){for(const e of o)a.push(Ma(e.id));n&&c(o);for(const e of o)d(e.id)}}for(const e of r){const t="string"===typeof e?s(e):e;t&&(vl(t.deletable)&&!t.deletable||(a.push(Ma(t.id)),n&&c([t]),o&&d(t.id)))}u.length&&e.hooks.edgesChange.trigger(u),a.length&&e.hooks.nodesChange.trigger(a)},B=t=>{const n=t instanceof Function?t(e.edges):t,o=Array.isArray(n)?n:[n],i=[];for(const e of o){const t="string"===typeof e?c(e):e;t&&(vl(t.deletable)&&!t.deletable||i.push(Ca("string"===typeof e?e:e.id,t.source,t.target,t.sourceHandle,t.targetHandle)))}e.hooks.edgesChange.trigger(i)},P=(t,o,i=!0)=>{const r=c(t.id);if(!r)return!1;const a=e.edges.indexOf(r),l=ml(t,o,r,i,e.hooks.error.trigger);if(l){const[t]=xl([l],e.isValidConnection,s,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((e,n)=>
1n===a?t:e),_l(e.connectionLookup,n.value,[t]),t}return!1},z=(e,t,n={replace:!1})=>{const o=c(e);if(!o)return;const i="function"===typeof t?t(o):t;o.data=n.replace?i:{...o.data,...i}},R=t=>ka(t,e.nodes),D=t=>{const o=ka(t,e.edges);return _l(e.connectionLookup,n.value,o),o},O=(t,n,o={replace:!1})=>{const i=s(t);if(!i)return;const r="function"===typeof n?n(i):n;o.replace?e.nodes.splice(e.nodes.indexOf(i),1,r):Object.assign(i,r)},V=(e,t,n={replace:!1})=>{const o=s(e);if(!o)return;const i="function"===typeof t?t(o):t;o.data=n.replace?i:{...o.data,...i}},X=(t,n,o=!1)=>{o?e.connectionClickStartHandle=t:e.connectionStartHandle=t,e.connectionEndHandle=null,e.connectionStatus=null,n&&(e.connectionPosition=n)},L=(t,n=null,o=null)=>{e.connectionStartHandle&&(e.connectionPosition=t,e.connectionEndHandle=n,e.connectionStatus=o)},W=(t,n)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,n?e.connectionClickStartHandle=null:e.connectionStartHandle=null},H=e=>{const t=Zr(e),n=t?null:Kr(e)?e:s(e.id);if(!t&&!n)return[null,null,t];const o=t?e:Xr(n);return[o,n,t]},G=(t,n=!0,o=e.nodes)=>{const[i,r,a]=H(t);if(!i)return[];const l=[];for(const u of o||e.nodes){if(!a&&(u.id===r.id||!u.computedPosition))continue;
1const e=Xr(u),t=Lr(e,i),o=n&&t>0;(o||t>=e.width*e.height||t>=Number(i.width)*Number(i.height))&&l.push(u)}return l},Y=(e,t,n=!0)=>{const[o]=H(e);if(!o)return!1;const i=Lr(o,t),r=n&&i>0;return r||i>=Number(o.width)*Number(o.height)},F=t=>{const{viewport:n,dimensions:o,d3Zoom:i,d3Selection:r,translateExtent:a}=e;if(!i||!r||!t.x&&!t.y)return!1;const l=cr.translate(n.x+t.x,n.y+t.y).scale(n.zoom),u=[[0,0],[o.width,o.height]],s=i.constrain()(l,u,a),c=e.viewport.x!==s.x||e.viewport.y!==s.y||e.viewport.zoom!==s.k;return i.transform(r,s),c},U=t=>{const n=t instanceof Function?t(e):t,o=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];vl(n.defaultEdgeOptions)&&(e.defaultEdgeOptions=n.defaultEdgeOptions);const i=n.modelValue||n.nodes||n.edges?[]:void 0;i&&(n.modelValue&&i.push(...n.modelValue),n.nodes&&i.push(...n.nodes),n.edges&&i.push(...n.edges),I(i));const r=()=>{vl(n.maxZoom)&&x(n.maxZoom),vl(n.minZoom)&&_(n.minZoom),vl(n.translateExtent)&&E(n.translateExtent)};for(const a of Object.keys(n)){const t=a,i=n[t];![...ql,...o].includes(t)&&vl(i)&&(e[t]=i)}b(()=>e.d3Zoom).not.toBeNull().then(r),e.initialized||(e.initialized=!0)},K=()=>{const t=[],n=[];for(const o of e.nodes){const{computedPosition:e,handleBounds:n,selected:i,dimensions:r,isParent:a,resizing:l,dragging:u,events:s,...c}=o;t.push(c)}for(const o of e.edges){const{selected:e,sourceNode:t,targetNode:i,events:r,...a}=o;n.push(a)}return JSON.parse(JSON.stringify({nodes:t,edges:n,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},j=t=>new Promise(n=>{const{nodes:i,edges:r,position:a,zoom:l,viewport:u}=t;i&&M(i),r&&C(r);const[s,c]=(null==u?void 0:u.x)&&(null==u?void 0:u.y)?[u.x,u.y]:a??[null,null];if(s&&c){const t=(null==u?void 0:u.zoom)||l||e.viewport.zoom;return b(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:s,y:c,zoom:t}).then(()=>{n(!0)})})}n(!0)}),Z=()=>{const t=Zl();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const n=cr.translate(t.defaultViewport.x??0,t.defaultViewport.y??0).scale(Hr(t.defaultViewport.zoom??1,t.minZoom,t.maxZoom)),o=e.viewportRef.getBoundingClientRect(),i=[[0,0],[o.width,o.height]],r=e.d3Zoom.constrain()(n,i,t.translateExtent);e.d3Zoom.transform(e.d3Selection,r)}U(t)};return{updateNodePositions:d,updateNodeDimensions:h,setElements:I,setNodes:M,setEdges:C,addNodes:A,addEdges:$,removeNodes:T,removeEdges:B,findNode:s,findEdge:c,updateEdge:P,updateEdgeData:z,updateNode:O,updateNodeData:V,applyEdgeChanges:D,applyNodeChanges:R,addSelectedElements:g,addSelectedNodes:p,addSelectedEdges:v,setMinZoom:_,setMaxZoom:x,setTranslateExtent:E,setNodeExtent:k,setPaneClickDistance:S,removeSelectedElements:w,removeSelectedNodes:m,removeSelectedEdges:y,startConnection:X,updateConnection:L,endConnection:W,setInteractive:N,setState:U,getIntersectingNodes:G,getIncomers:r,getOutgoers:a,getConnectedEdges:l,getHandleConnections:u,isNodeIntersecting:Y,panBy:F,fitView:e=>o.value.fitView(e),zoomIn:e=>o.value.zoomIn(e),zoomOut:e=>o.value.zoomOut(e),zoomTo:(e,t)=>o.value.zoomTo(e,t),setViewport:(e,t)=>o.value.setViewport(e,t),setTransform:(e,t)=>o.value.setTransform(e,t),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(e,t,n)=>o.value.setCenter(e,t,n),fitBounds:(e,t)=>o.value.fitBounds(e,t),project:e=>o.value.project(e),screenToFlowCoordinate:e=>o.value.screenToFlowCoordinate(e),flowToScreenCoordinate:e=>o.value.flowToScreenCoordinate(e),toObject:K,fromObject:j,updateNodeInternals:i,viewportHelper:o,$reset:Z,$destroy:()=>{}}}const Jl=["data-id","data-handleid","data-nodeid","data-handlepos"],eu={name:"Handle",compatConfig:{MODE:3}},tu=(0,i.pM)({...eu,props:{id:{default:null},type:{},position:{default:()=>_r.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=(0,i.bn)(e,["position","connectable","connectableStart","connectableEnd","id"]),a=(0,o.lW)(()=>n.type??"source"),l=(0,o.lW)(()=>n.isValidConnection??null),{id:u,connectionStartHandle:s,connectionClickStartHandle:c,connectionEndHandle:d,vueFlowRef:h,nodesConnectable:f,noDragClassName:p,noPanClassName:v}=Yu(),{id:g,node:m,nodeEl:y,connectedEdges:w}=Rl(),_=(0,o.KR)(),b=(0,o.lW)(()=>"undefined"===typeof e.connectableStart||e.connectableStart),x=(0,o.lW)(()=>"undefined"===typeof e.connectableEnd||e.connectableEnd),E=(0,o.lW)(()=>{var t,n,o,i,r,l;return(null==(t=s.value)?void 0:t.nodeId)===g&&(null==(n=s.value)?void 0:n.id)===e.id&&(null==(o=s.value)?void 0:o.type)===a.value||(null==(i=d.value)?void 0:i.nodeId)===g&&(null==(r=d.value)?void 0:r.id)===e.id&&(null==(l=d.value)?void 0:l.type)===a.value}),k=(0,o.lW)(()=>{var t,n,o;return(null==(t=c.value)?void 0:t.nodeId)===g&&(null==(n=c.value)?void 0:n.id)===e.id&&(null==(o=c.value)?void 0:o.type)===a.value}),{handlePointerDown:S,handleClick:N}=Pl({nodeId:g,handleId:e.id,isValidConnection:l,type:a}),M=(0,i.EW)(()=>"string"===typeof e.connectable&&"single"===e.connectable?!w.value.some(t=>{const n=t[`${a.value}Handle`];return t[a.value]===g&&(!n||n===e.id)}):"number"===typeof e.connectable?w.value.filter(t=>{const n=t[`${a.value}Handle`];return t[a.value]===g&&(!n||n===e.id)}).length<e.connectable:"function"===typeof e.connectable?e.connectable(m,w.value):vl(e.connectable)?e.connectable:f.value);function C(e){const t=Ua(e);M.value&&b.value&&(t&&0===e.button||!t)&&S(e)}function I(e){g&&(c.value||b.value)&&M.value&&N(e)}return(0,i.sV)(()=>{var t;if(!m.dimensions.width||!m.dimensions.height)return;const n=null==(t=m.handleBounds[a.value])?void 0:t.find(t=>
1t.id===e.id);if(!h.value||n)return;const o=h.value.querySelector(".vue-flow__transformationpane");if(!y.value||!_.value||!o||!e.id)return;const i=y.value.getBoundingClientRect(),r=_.value.getBoundingClientRect(),l=window.getComputedStyle(o),{m22:u}=new window.DOMMatrixReadOnly(l.transform),s={id:e.id,position:e.position,x:(r.left-i.left)/u,y:(r.top-i.top)/u,type:a.value,nodeId:g,...Wr(_.value)};m.handleBounds[a.value]=[...m.handleBounds[a.value]??[],s]}),t({handleClick:N,handlePointerDown:S,onClick:I,onPointerDown:C}),(t,n)=>((0,i.uX)(),(0,i.CE)("div",{ref_key:"handle",ref:_,"data-id":`${(0,o.R1)(u)}-${(0,o.R1)(g)}-${e.id}-${a.value}`,"data-handleid":e.id,"data-nodeid":(0,o.R1)(g),"data-handlepos":t.position,class:(0,r.C4)(["vue-flow__handle",[`vue-flow__handle-${t.position}`,`vue-flow__handle-${e.id}`,(0,o.R1)(p),(0,o.R1)(v),a.value,{connectable:M.value,connecting:k.value,connectablestart:b.value,connectableend:x.value,connectionindicator:M.value&&(b.value&&!E.value||x.value&&E.value)}]]),onMousedown:C,onTouchstartPassive:C,onClick:I},[(0,i.RG)(t.$slots,"default",{id:t.id})],42,Jl))}}),nu=function({sourcePosition:e=_r.Bottom,targetPosition:t=_r.Top,label:n,connectable:o=!0,isValidTargetPos:r,isValidSourcePos:a,data:l}){const u=l.label??n;return[(0,i.h)(tu,{type:"target",position:t,connectable:o,isValidConnection:r}),"string"!==typeof u&&u?(0,i.h)(u):(0,i.h)(i.FK,[u]),(0,i.h)(tu,{type:"source",position:e,connectable:o,isValidConnection:a})]};nu.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],nu.inheritAttrs=!1,nu.compatConfig={MODE:3};const ou=nu,iu=function({targetPosition:e=_r.Top,label:t,connectable:n=!0,isValidTargetPos:o,data:r}){const a=r.label??t;return[(0,i.h)(tu,{type:"target",position:e,connectable:n,isValidConnection:o}),"string"!==typeof a&&a?(0,i.h)(a):(0,i.h)(i.FK,[a])]};iu.props=["targetPosition","label","isValidTargetPos","connectable","data"],iu.inheritAttrs=!1,iu.compatConfig={MODE:3};const ru=iu,au=function({sourcePosition:e=_r.Bottom,label:t,connectable:n=!0,isValidSourcePos:o,data:r}){const a=r.label??t;return["string"!==typeof a&&a?(0,i.h)(a):(0,i.h)(i.FK,[a]),(0,i.h)(tu,{type:"source",position:e,connectable:n,isValidConnection:o})]};au.props=["sourcePosition","label","isValidSourcePos","connectable","data"],au.inheritAttrs=!1,au.compatConfig={MODE:3};const lu=au,uu=["transform"],su=["width","height","x","y","rx","ry"],cu=["y"],du={name:"EdgeText",compatConfig:{MODE:3}},hu=(0,i.pM)({...du,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=(0,o.KR)({x:0,y:0,width:0,height:0}),n=(0,o.KR)(null),a=(0,i.EW)(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);function l(){if(!n.value)return;const e=n.value.getBBox();e.width===t.value.width&&e.height===t.value.height||(t.value=e)}return(0,i.sV)(l),(0,i.wB)([()=>e.x,()=>e.y,n,()=>e.label],l),(e,o)=>((0,i.uX)(),(0,i.CE)("g",{transform:a.value,class:"vue-flow__edge-textwrapper"},[e.labelShowBg?((0,i.uX)(),(0,i.CE)("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*e.labelBgPadding[0]}px`,height:`${t.value.height+2*e.labelBgPadding[1]}px`,x:-e.labelBgPadding[0],y:-e.labelBgPadding[1],style:(0,r.Tr)(e.labelBgStyle),rx:e.labelBgBorderRadius,ry:e.labelBgBorderRadius},null,12,su)):(0,i.Q3)("",!0),(0,i.Lk)("text",(0,i.v6)(e.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:e.labelStyle}),[(0,i.RG)(e.$slots,"default",{},()=>["string"!==typeof e.label?((0,i.uX)(),(0,i.Wv)((0,i.$y)(e.label),{key:0})):((0,i.uX)(),(0,i.CE)(i.FK,{key:1},[(0,i.eW)((0,r.v_)(e.label),1)],64))])],16,cu)],8,uu))}}),fu=["id","d","marker-end","marker-start"],pu=["d","stroke-width"],vu={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},gu=(0,i.pM)({...vu,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=(0,o.KR)(null),r=(0,o.KR)(null),a=(0,o.KR)(null),l=(0,i.OA)();return t({pathEl:n,interactionEl:r,labelEl:a}),(e,t)=>((0,i.uX)(),(0,i.CE)(i.FK,null,[(0,i.Lk)("path",(0,i.v6)((0,o.R1)(l),{id:e.id,ref_key:"pathEl",ref:n,d:e.path,class:"vue-flow__edge-path","marker-end":e.markerEnd,"marker-start":e.markerStart}),null,16,fu),e.interactionWidth?((0,i.uX)(),(0,i.CE)("path",{key:0,ref_key:"interactionEl",ref:r,fill:"none",d:e.path,"stroke-width":e.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,pu)):(0,i.Q3)("",!0),e.label&&e.labelX&&e.labelY?((0,i.uX)(),(0,i.Wv)(hu,{key:1,ref_key:"labelEl",ref:a,x:e.labelX,y:e.labelY,label:e.label,"label-show-bg":e.labelShowBg,"label-bg-style":e.labelBgStyle,"label-bg-padding":e.labelBgPadding,"label-bg-border-radius":e.labelBgBorderRadius,"label-style":e.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):(0,i.Q3)("",!0)],64))}});function mu({sourceX:e,sourceY:t,targetX:n,targetY:o}){const i=Math.abs(n-e)/2,r=n<e?n+i:n-i,a=Math.abs(o-t)/2,l=o<t?o+a:o-a;return[r,l,i,a]}function yu({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:r,targetControlX:a,targetControlY:l}){const u=.125*e+.375*i+.375*a+.125*n,s=.125*t+.375*r+.375*l+.125*o,c=Math.abs(u-e),d=Math.abs(s-t);return[u,s,c,d]}function wu(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}
1function _u({pos:e,x1:t,y1:n,x2:o,y2:i,c:r}){let a,l;switch(e){case _r.Left:a=t-wu(t-o,r),l=n;break;case _r.Right:a=t+wu(o-t,r),l=n;break;case _r.Top:a=t,l=n-wu(n-i,r);break;case _r.Bottom:a=t,l=n+wu(i-n,r);break}return[a,l]}function bu(e){const{sourceX:t,sourceY:n,sourcePosition:o=_r.Bottom,targetX:i,targetY:r,targetPosition:a=_r.Top,curvature:l=.25}=e,[u,s]=_u({pos:o,x1:t,y1:n,x2:i,y2:r,c:l}),[c,d]=_u({pos:a,x1:i,y1:r,x2:t,y2:n,c:l}),[h,f,p,v]=yu({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:u,sourceControlY:s,targetControlX:c,targetControlY:d});return[`M${t},${n} C${u},${s} ${c},${d} ${i},${r}`,h,f,p,v]}function xu({pos:e,x1:t,y1:n,x2:o,y2:i}){let r,a;switch(e){case _r.Left:case _r.Right:r=.5*(t+o),a=n;break;case _r.Top:case _r.Bottom:r=t,a=.5*(n+i);break}return[r,a]}function Eu(e){const{sourceX:t,sourceY:n,sourcePosition:o=_r.Bottom,targetX:i,targetY:r,targetPosition:a=_r.Top}=e,[l,u]=xu({pos:o,x1:t,y1:n,x2:i,y2:r}),[s,c]=xu({pos:a,x1:i,y1:r,x2:t,y2:n}),[d,h,f,p]=yu({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:l,sourceControlY:u,targetControlX:s,targetControlY:c});return[`M${t},${n} C${l},${u} ${s},${c} ${i},${r}`,d,h,f,p]}const ku={[_r.Left]:{x:-1,y:0},[_r.Right]:{x:1,y:0},[_r.Top]:{x:0,y:-1},[_r.Bottom]:{x:0,y:1}};function Su({source:e,sourcePosition:t=_r.Bottom,target:n}){return t===_r.Left||t===_r.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1}}function Nu(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function Mu({source:e,sourcePosition:t=_r.Bottom,target:n,targetPosition:o=_r.Top,center:i,offset:r}){const a=ku[t],l=ku[o],u={x:e.x+a.x*r,y:e.y+a.y*r},s={x:n.x+l.x*r,y:n.y+l.y*r},c=Su({source:u,sourcePosition:t,target:s}),d=0!==c.x?"x":"y",h=c[d];let f,p,v;const g={x:0,y:0},m={x:0,y:0},[y,w,_,b]=mu({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*l[d]===-1){p=i.x??y,v=i.y??w;const e=[{x:p,y:u.y},{x:p,y:s.y}],t=[{x:u.x,y:v},{x:s.x,y:v}];f=a[d]===h?"x"===d?e:t:"x"===d?t:e}else{const i=[{x:u.x,y:s.y}],c=[{x:s.x,y:u.y}];if(f="x"===d?a.x===h?c:i:a.y===h?i:c,t===o){const t=Math.abs(e[d]-n[d]);if(t<=r){const o=Math.min(r-1,r-t);a[d]===h?g[d]=(u[d]>e[d]?-1:1)*o:m[d]=(s[d]>n[d]?-1:1)*o}}if(t!==o){const e="x"===d?"y":"x",t=a[d]===l[e],n=u[e]>s[e],o=u[e]<s[e],r=1===a[d]&&(!t&&n||t&&o)||1!==a[d]&&(!t&&o||t&&n);r&&(f="x"===d?i:c)}const y={x:u.x+g.x,y:u.y+g.y},w={x:s.x+m.x,y:s.y+m.y},_=Math.max(Math.abs(y.x-f[0].x),Math.abs(w.x-f[0].x)),b=Math.max(Math.abs(y.y-f[0].y),Math.abs(w.y-f[0].y));_>=b?(p=(y.x+w.x)/2,v=f[0].y):(p=f[0].x,v=(y.y+w.y)/2)}const x=[e,{x:u.x+g.x,y:u.y+g.y},...f,{x:s.x+m.x,y:s.y+m.y},n];return[x,p,v,_,b]}function Cu(e,t,n,o){const i=Math.min(Nu(e,t)/2,Nu(t,n)/2,o),{x:r,y:a}=t;if(e.x===r&&r===n.x||e.y===a&&a===n.y)return`L${r} ${a}`;if(e.y===a){const t=e.x<n.x?-1:1,o=e.y<n.y?1:-1;return`L ${r+i*t},${a}Q ${r},${a} ${r},${a+i*o}`}const l=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${r},${a+i*u}Q ${r},${a} ${r+i*l},${a}`}function Iu(e){const{sourceX:t,sourceY:n,sourcePosition:o=_r.Bottom,targetX:i,targetY:r,targetPosition:a=_r.Top,borderRadius:l=5,centerX:u,centerY:s,offset:c=20}=e,[d,h,f,p,v]=Mu({source:{x:t,y:n},sourcePosition:o,target:{x:i,y:r},targetPosition:a,center:{x:u,y:s},offset:c}),g=d.reduce((e,t,n)=>{let o;return o=n>0&&n<d.length-1?Cu(d[n-1],t,d[n+1],l):`${0===n?"M":"L"}${t.x} ${t.y}`,e+=o,e},"");return[g,h,f,p,v]}function Au(e){const{sourceX:t,sourceY:n,targetX:o,targetY:i}=e,[r,a,l,u]=mu({sourceX:t,sourceY:n,targetX:o,targetY:i});return[`M ${t},${n}L ${o},${i}`,r,a,l,u]}const $u=(0,i.pM)({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=Au(e);return(0,i.h)(gu,{path:n,labelX:o,labelY:r,...t,...e})}}}),Tu=$u,Bu=(0,i.pM)({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=Iu({...e,sourcePosition:e.sourcePosition??_r.Bottom,targetPosition:e.targetPosition??_r.Top});return(0,i.h)(gu,{path:n,labelX:o,labelY:r,...t,...e})}}}),Pu=Bu,zu=(0,i.pM)({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>(0,i.h)(Pu,{...e,...t,borderRadius:0})}}),Ru=zu,Du=(0,i.pM)({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=bu({...e,sourcePosition:e.sourcePosition??_r.Bottom,targetPosition:e.targetPosition??_r.Top});return(0,i.h)(gu,{path:n,labelX:o,labelY:r,...t,...e})}}}),Ou=Du,Vu=(0,i.pM)({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=Eu({...e,sourcePosition:e.sourcePosition??_r.Bottom,targetPosition:e.targetPosition??_r.Top});return(0,i.h)(gu,{path:n,labelX:o,labelY:r,...t,...e})}}}),Xu=Vu,Lu={input:lu,default:ou,output:ru},Wu={default:Ou,straight:Tu,step:Ru,smoothstep:Pu,simplebezier:Xu};function Hu(e,t,n){const o=(0,i.EW)(()=>e=>t.value.get(e)),r=(0,i.EW)(()=>e=>n.value.get(e)),a=(0,i.EW)(()=>{const t={...Wu,...e.edgeTypes},n=Object.keys(t);for(const o of e.edges)o.type&&!n.includes(o.type)&&(t[o.type]=o.type);return t}),l=(0,i.EW)(()=>
1{const t={...Lu,...e.nodeTypes},n=Object.keys(t);for(const o of e.nodes)o.type&&!n.includes(o.type)&&(t[o.type]=o.type);return t}),u=(0,i.EW)(()=>e.onlyRenderVisibleElements?da(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),s=(0,i.EW)(()=>{if(e.onlyRenderVisibleElements){const n=[];for(const o of e.edges){const i=t.value.get(o.source),r=t.value.get(o.target);Wa({sourcePos:i.computedPosition||{x:0,y:0},targetPos:r.computedPosition||{x:0,y:0},sourceWidth:i.dimensions.width,sourceHeight:i.dimensions.height,targetWidth:r.dimensions.width,targetHeight:r.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&n.push(o)}return n}return e.edges}),c=(0,i.EW)(()=>[...u.value,...s.value]),d=(0,i.EW)(()=>{const t=[];for(const n of e.nodes)n.selected&&t.push(n);return t}),h=(0,i.EW)(()=>{const t=[];for(const n of e.edges)n.selected&&t.push(n);return t}),f=(0,i.EW)(()=>[...d.value,...h.value]),p=(0,i.EW)(()=>{const t=[];for(const n of e.nodes)n.dimensions.width&&n.dimensions.height&&void 0!==n.handleBounds&&t.push(n);return t}),v=(0,i.EW)(()=>u.value.length>0&&p.value.length===u.value.length);return{getNode:o,getEdge:r,getElements:c,getEdgeTypes:a,getNodeTypes:l,getEdges:s,getNodes:u,getSelectedElements:f,getSelectedNodes:d,getSelectedEdges:h,getNodesInitialized:p,areNodesInitialized:v}}class Gu{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var e;const t=null==(e=(0,i.nI)())?void 0:e.appContext.app,n=(null==t?void 0:t.config.globalProperties.$vueFlowStorage)??Gu.instance;return Gu.instance=n??new Gu,t&&(t.config.globalProperties.$vueFlowStorage=Gu.instance),Gu.instance}set(e,t){return this.flows.set(e,t)}get(e){return this.flows.get(e)}remove(e){return this.flows.delete(e)}create(e,t){const n=Zl(),r=(0,o.Kh)(n),a={};for(const[o,i]of Object.entries(r.hooks)){const e=`on${o.charAt(0).toUpperCase()+o.slice(1)}`;a[e]=i.on}const l={};for(const[o,i]of Object.entries(r.hooks))l[o]=i.trigger;const u=(0,i.EW)(()=>{const e=new Map;for(const t of r.nodes)e.set(t.id,t);return e}),s=(0,i.EW)(()=>{const e=new Map;
1for(const t of r.edges)e.set(t.id,t);return e}),c=Hu(r,u,s),d=Ql(r,u,s);d.setState({...r,...t});const h={...a,...c,...d,...w(r),nodeLookup:u,edgeLookup:s,emits:l,id:e,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(e)}};return this.set(e,h),h}getId(){return"vue-flow-"+this.currentId++}}function Yu(e){const t=Gu.getInstance(),n=(0,o.o5)(),r="object"===typeof e,l=r?e:{id:e},u=l.id,s=u??(null==n?void 0:n.vueFlowId);let c;if(n){const e=(0,i.WQ)(El,null);"undefined"===typeof e||null===e||s&&e.id!==s||(c=e)}if(c||s&&(c=t.get(s)),!c||s&&c.id!==s){const e=u??t.getId(),r=t.create(e,l);c=r;const s=n??(0,o.uY)(!0);s.run(()=>{(0,i.wB)(r.applyDefault,(e,t,n)=>{const o=e=>{r.applyNodeChanges(e)},i=e=>{r.applyEdgeChanges(e)};e?(r.onNodesChange(o),r.onEdgesChange(i)):(r.hooks.value.nodesChange.off(o),r.hooks.value.edgesChange.off(i)),n(()=>{r.hooks.value.nodesChange.off(o),r.hooks.value.edgesChange.off(i)})},{immediate:!0}),a(()=>{if(c){const e=t.get(c.id);e?e.$destroy():dl(`No store instance found for id ${c.id} in storage.`)}})})}else r&&c.setState(l);if(n&&((0,i.Gt)(El,c),n.vueFlowId=c.id),r){const e=(0,i.nI)();"VueFlow"!==(null==e?void 0:e.type.name)&&c.emits.error(new Fa(Ga.USEVUEFLOW_OPTIONS))}return c}function Fu(e){const{emits:t,dimensions:n}=Yu();let o;(0,i.sV)(()=>{const r=()=>{var o,i;if(!e.value||!((null==(i=(o=e.value).checkVisibility)?void 0:i.call(o))??1))return;const r=Wr(e.value);0!==r.width&&0!==r.height||t.error(new Fa(Ga.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:r.width||500,height:r.height||500}};r(),window.addEventListener("resize",r),e.value&&(o=new ResizeObserver(()=>r()),o.observe(e.value)),(0,i.xo)(()=>{window.removeEventListener("resize",r),o&&e.value&&o.unobserve(e.value)})})}const Uu={name:"UserSelection",compatConfig:{MODE:3}},Ku=(0,i.pM)({...Uu,props:{userSelectionRect:{}},setup(e){return(e,t)=>((0,i.uX)(),(0,i.CE)("div",{class:"vue-flow__selection vue-flow__container",style:(0,r.Tr)({width:`${e.userSelectionRect.width}px`,height:`${e.userSelectionRect.height}px`,transform:`translate(${e.userSelectionRect.x}px, ${e.userSelectionRect.y}px)`})},null,4))}}),ju=["tabIndex"],Zu={name:"NodesSelection",compatConfig:{MODE:3}},qu=(0,i.pM)({...Zu,setup(e){const{emits:t,viewport:n,getSelectedNodes:a,noPanClassName:l,disableKeyboardA11y:u,userSelectionActive:s}=Yu(),c=Vl(),d=(0,o.KR)(null),h=Il({el:d,onStart(e){t.selectionDragStart(e),t.nodeDragStart(e)},onDrag(e){t.selectionDrag(e),t.nodeDrag(e)},onStop(e){t.selectionDragStop(e),t.nodeDragStop(e)}});(0,i.sV)(()=>{var e;u.value||null==(e=d.value)||e.focus({preventScroll:!0})});const f=(0,i.EW)(()=>ca(a.value)),p=(0,i.EW)(()=>({width:`${f.value.width}px`,height:`${f.value.height}px`,top:`${f.value.y}px`,left:`${f.value.x}px`}));function v(e){t.selectionContextMenu({event:e,nodes:a.value})}function g(e){u.value||Vr[e.key]&&(e.preventDefault(),c({x:Vr[e.key].x,y:Vr[e.key].y},e.shiftKey))}return(e,t)=>!(0,o.R1)(s)&&f.value.width&&f.value.height?((0,i.uX)(),(0,i.CE)("div",{key:0,class:(0,r.C4)(["vue-flow__nodesselection vue-flow__container",(0,o.R1)(l)]),style:(0,r.Tr)({transform:`translate(${(0,o.R1)(n).x}px,${(0,o.R1)(n).y}px) scale(${(0,o.R1)(n).zoom})`})},[(0,i.Lk)("div",{ref_key:"el",ref:d,class:(0,r.C4)([{dragging:(0,o.R1)(h)},"vue-flow__nodesselection-rect"]),style:(0,r.Tr)(p.value),tabIndex:(0,o.R1)(u)?void 0:-1,onContextmenu:v,onKeydown:g},null,46,ju)],6)):(0,i.Q3)("",!0)}});function Qu(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const Ju={name:"Pane",compatConfig:{MODE:3}},es=(0,i.pM)({...Ju,props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:a,emits:l,userSelectionActive:u,removeSelectedElements:s,userSelectionRect:c,elementsSelectable:d,nodesSelectionActive:h,getSelectedEdges:f,getSelectedNodes:p,removeNodes:v,removeEdges:g,selectionMode:m,deleteKeyCode:y,multiSelectionKeyCode:w,multiSelectionActive:_,edgeLookup:b,nodeLookup:x,connectionLookup:E,defaultEdgeOptions:k,connectionStartHandle:S,panOnDrag:N}=Yu(),M=(0,o.IJ)(null),C=(0,o.IJ)(new Set),I=(0,o.IJ)(new Set),A=(0,o.IJ)(null),$=(0,o.lW)(()=>d.value&&(e.isSelecting||u.value)),T=(0,o.lW)(()=>null!==S.value);let B=!1,P=!1;const z=Pr(y,{actInsideInputWithModifier:!1}),R=Pr(w);function D(e,t){return n=>{n.target===t&&(null==e||e(n))}}function O(e){B||T.value?B=!1:(l.paneClick(e),s(),h.value=!1)}function V(e){var t;Array.isArray(N.value)&&(null==(t=N.value)?void 0:t.includes(2))?e.preventDefault():l.paneContextMenu(e)}function X(e){l.paneScroll(e)}function L(n){var o,i,r;if(A.value=(null==(o=t.value)?void 0:o.getBoundingClientRect())??null,!d.value||!e.isSelecting||0!==n.button||n.target!==M.value||!A.value)return;null==(r=null==(i=n.target)?void 0:i.setPointerCapture)||r.call(i,n.pointerId);const{x:a,y:u}=Qu(n,A.value);P=!0,B=!1,s(),c.value={width:0,height:0,startX:a,startY:u,x:a,y:u},l.selectionStart(n)}function W(e){var t;if(!A.value||!c.value)return;B=!0;const{x:o,y:i}=ja(e,A.value),{startX:r=0,startY:s=0}=c.value,d={startX:r,startY:s,x:o<r?o:r,y:i<s?i:s,width:Math.abs(o-r),height:Math.abs(i-s)},f=C.value,p=I.value;C.value=new Set(da(n.value,d,a.value,m.value===br.Partial,!0).map(e=>e.id)),I.value=new Set;const v=(null==(t=k.value)?void 0:t.selectable)??!0;for(const n of C.value){const e=E.value.get(n);if(e)for(const{edgeId:t}of e.values()){const e=b.value.get(t);e&&(e.selectable??v)&&I.value.add(t)}}if(!bl(f,C.value)){const e=Ia(x.value,C.value,!0);l.nodesChange(e)}if(!bl(p,I.value)){const e=Ia(b.value,I.value);l.edgesChange(e)}c.value=d,u.value=!0,h.value=!1}function H(t){var n;0===t.button&&P&&(null==(n=t.target)||n.releasePointerCapture(t.pointerId),!u.value&&c.value&&t.target===M.value&&O(t),u.value=!1,c.value=null,h.value=C.value.size>0,l.selectionEnd(t),e.selectionKeyPressed&&(B=!1),P=!1)}return(0,i.wB)(z,e=>{e&&(v(p.value),g(f.value),h.value=!1)}),(0,i.wB)(R,e=>{_.value=e}),(e,t)=>((0,i.uX)(),(0,i.CE)("div",{ref_key:"container",ref:M,class:(0,r.C4)(["vue-flow__pane vue-flow__container",{selection:e.isSelecting}]),onClick:t[0]||(t[0]=e=>$.value?void 0:D(O,M.value)(e)),onContextmenu:t[1]||(t[1]=e=>D(V,M.value)(e)),onWheelPassive:t[2]||(t[2]=e=>D(X,M.value)(e)),onPointerenter:t[3]||(t[3]=e=>$.value?void 0:(0,o.R1)(l).paneMouseEnter(e)),onPointerdown:t[4]||(t[4]=e=>
1$.value?L(e):(0,o.R1)(l).paneMouseMove(e)),onPointermove:t[5]||(t[5]=e=>$.value?W(e):(0,o.R1)(l).paneMouseMove(e)),onPointerup:t[6]||(t[6]=e=>$.value?H(e):void 0),onPointerleave:t[7]||(t[7]=e=>(0,o.R1)(l).paneMouseLeave(e))},[(0,i.RG)(e.$slots,"default"),(0,o.R1)(u)&&(0,o.R1)(c)?((0,i.uX)(),(0,i.Wv)(Ku,{key:0,"user-selection-rect":(0,o.R1)(c)},null,8,["user-selection-rect"])):(0,i.Q3)("",!0),(0,o.R1)(h)&&(0,o.R1)(p).length?((0,i.uX)(),(0,i.Wv)(qu,{key:1})):(0,i.Q3)("",!0)],34))}}),ts={name:"Transform",compatConfig:{MODE:3}},ns=(0,i.pM)({...ts,setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=Yu(),a=(0,i.EW)(()=>!!n.value&&!o.value),l=(0,i.EW)(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(e,t)=>((0,i.uX)(),(0,i.CE)("div",{class:"vue-flow__transformationpane vue-flow__container",style:(0,r.Tr)({transform:l.value,opacity:a.value?0:void 0})},[(0,i.RG)(e.$slots,"default")],4))}}),os={name:"Viewport",compatConfig:{MODE:3}},is=(0,i.pM)({...os,setup(e){const{minZoom:t,maxZoom:n,defaultViewport:a,translateExtent:l,zoomActivationKeyCode:u,selectionKeyCode:s,panActivationKeyCode:c,panOnScroll:d,panOnScrollMode:h,panOnScrollSpeed:f,panOnDrag:p,zoomOnDoubleClick:v,zoomOnPinch:g,zoomOnScroll:m,preventScrolling:y,noWheelClassName:w,noPanClassName:_,emits:b,connectionStartHandle:x,userSelectionActive:E,paneDragging:k,d3Zoom:S,d3Selection:N,d3ZoomHandler:M,viewport:C,viewportRef:I,paneClickDistance:A}=Yu();Fu(I);const $=(0,o.IJ)(!1),T=(0,o.IJ)(!1);let B=null,P=!1,z=0,R={x:0,y:0,zoom:0};const D=Pr(c),O=Pr(s),V=Pr(u),X=(0,o.lW)(()=>(!O.value||O.value&&!0===s.value)&&(D.value||p.value)),L=(0,o.lW)(()=>D.value||d.value),W=(0,o.lW)(()=>!0===s.value&&!0!==X.value),H=(0,o.lW)(()=>O.value&&!0!==s.value||E.value||W.value),G=(0,o.lW)(()=>null!==x.value);function Y(e,t){return 2===t&&Array.isArray(e)&&e.includes(2)}function F(e,t){return e.x!==t.x&&!Number.isNaN(t.x)||e.y!==t.y&&!Number.isNaN(t.y)||e.zoom!==t.k&&!Number.isNaN(t.k)}function U(e){return{x:e.x,y:e.y,zoom:e.k}}function K(e,t){return e.target.closest(`.${t}`)}return(0,i.sV)(()=>{if(!I.value)return void dl("Viewport element is missing");const e=I.value,o=e.getBoundingClientRect(),r=wr().clickDistance(A.value).scaleExtent([t.value,n.value]).translateExtent(l.value),u=Pt(e).call(r),c=u.on("wheel.zoom"),x=cr.translate(a.value.x??0,a.value.y??0).scale(Hr(a.value.zoom??1,t.value,n.value)),O=[[0,0],[o.width,o.height]],H=r.constrain()(x,O,l.value);r.transform(u,H),r.wheelDelta(_a),S.value=r,N.value=u,M.value=c,C.value={x:H.x,y:H.y,zoom:H.k},r.on("start",e=>{var t;if(!e.sourceEvent)return null;z=e.sourceEvent.button,$.value=!0;const n=U(e.transform);"mousedown"===(null==(t=e.sourceEvent)?void 0:t.type)&&(k.value=!0),R=n,b.viewportChangeStart(n),b.moveStart({event:e,flowTransform:n})}),r.on("end",e=>{if(!e.sourceEvent)return null;if($.value=!1,k.value=!1,Y(X.value,z??0)&&!P&&b.paneContextMenu(e.sourceEvent),P=!1,F(R,e.transform)){const t=U(e.transform);R=t,b.viewportChangeEnd(t),b.moveEnd({event:e,flowTransform:t})}}),r.filter(e=>{var t;const n=V.value||m.value,o=g.value&&e.ctrlKey,i=e.button,r="wheel"===e.type;if(1===i&&"mousedown"===e.type&&(K(e,"vue-flow__node")||K(e,"vue-flow__edge")))return!0;if(!X.value&&!n&&!L.value&&!v.value&&!g.value)return!1;if(E.value)return!1;if(G.value&&!r)return!1;if(!v.value&&"dblclick"===e.type)return!1;if(K(e,w.value)&&r)return!1;if(K(e,_.value)&&(!r||L.value&&r&&!V.value))return!1;if(!g.value&&e.ctrlKey&&r)return!1;if(!n&&!L.value&&!o&&r)return!1;if(!g&&"touchstart"===e.type&&(null==(t=e.touches)?void 0:t.length)>1)return e.preventDefault(),!1;if(!X.value&&("mousedown"===e.type||"touchstart"===e.type))return!1;if(W.value&&Array.isArray(p.value)&&p.value.includes(0)&&0===i)return!1;if(Array.isArray(p.value)&&!p.value.includes(i)&&("mousedown"===e.type||"touchstart"===e.type))return!1;const a=Array.isArray(p.value)&&p.value.includes(i)||!0===s.value&&Array.isArray(p.value)&&!p.value.includes(0)||!i||i<=1;return(!e.ctrlKey||D.value||r)&&a}),(0,i.wB)([E,X],()=>{E.value&&!$.value?r.on("zoom",null):E.value||r.on("zoom",e=>{C.value={x:e.transform.x,y:e.transform.y,zoom:e.transform.k};const t=U(e.transform);P=Y(X.value,z??0),b.viewportChange(t),b.move({event:e,flowTransform:t})})},{immediate:!0}),(0,i.wB)([E,L,h,V,g,y,w],()=>{!L.value||V.value||E.value?"undefined"!==typeof c&&u.on("wheel.zoom",function(e,t){const n=!y.value&&"wheel"===e.type&&!e.ctrlKey,o=V.value||m.value,i=g.value&&e.ctrlKey,r=!o&&!d.value&&!i&&"wheel"===e.type;if(r||n||K(e,w.value))return null;e.preventDefault(),c.call(this,e,t)},{passive:!1}):u.on("wheel.zoom",e=>{if(K(e,w.value))return!1;const t=V.value||m.value,n=g.value&&e.ctrlKey,o=!y.value||L.value||t||n;if(!o)return!1;e.preventDefault(),e.stopImmediatePropagation();const i=u.property("__zoom").k||1,a=Za();if(!D.value&&e.ctrlKey&&g.value&&a){const t=Rt(e),n=_a(e),o=i*2**n;return void r.scaleTo(u,o,t,e)}const l=1===e.deltaMode?20:1;let s=h.value===Sr.Vertical?0:e.deltaX*l,c=h.value===Sr.Horizontal?0:e.deltaY*l;!a&&e.shiftKey&&h.value!==Sr.Vertical&&!s&&c&&(s=c,c=0),r.translateBy(u,-s/i*f.value,-c/i*f.value);const d=U(u.property("__zoom"));B&&clearTimeout(B),T.value?(b.move({event:e,flowTransform:d}),b.viewportChange(d),B=setTimeout(()=>{b.moveEnd({event:e,flowTransform:d}),b.viewportChangeEnd(d),T.value=!1},150)):(T.value=!0,b.moveStart({event:e,flowTransform:d}),b.viewportChangeStart(d))},{passive:!1})},{immediate:!0})}),(e,t)=>((0,i.uX)(),(0,i.CE)("div",{ref_key:"viewportRef",ref:I,class:"vue-flow__viewport vue-flow__container"},[(0,i.bF)(es,{"is-selecting":H.value,"selection-key-pressed":(0,o.R1)(O),class:(0,r.C4)({connecting:G.value,dragging:(0,o.R1)(k),draggable:!0===(0,o.R1)(p)||Array.isArray((0,o.R1)(p))&&(0,o.R1)(p).includes(0)})},{default:(0,i.k6)(()=>[(0,i.bF)(ns,null,{default:(0,i.k6)(()=>[(0,i.RG)(e.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),rs=["id"],as=["id"],ls=["id"],us={name:"A11yDescriptions",compatConfig:{MODE:3}},ss=(0,i.pM)({...us,setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:a}=Yu();return(e,l)=>((0,i.uX)(),(0,i.CE)(i.FK,null,[(0,i.Lk)("div",{id:`${(0,o.R1)(zr)}-${(0,o.R1)(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+(0,r.v_)((0,o.R1)(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,rs),(0,i.Lk)("div",{id:`${(0,o.R1)(Rr)}-${(0,o.R1)(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,as),(0,o.R1)(n)?(0,i.Q3)("",!0):((0,i.uX)(),(0,i.CE)("div",{key:0,id:`${(0,o.R1)(Dr)}-${(0,o.R1)(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},(0,r.v_)((0,o.R1)(a)),9,ls))],64))}});function cs(){const e=Yu();(0,i.wB)(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function ds(e,t,n){return n===_r.Left?e-t:n===_r.Right?e+t:e}function hs(e,t,n){return n===_r.Top?e-t:n===_r.Bottom?e+t:e}
1const fs=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=_r.Top,type:r}){return(0,i.h)("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${r}`,cx:ds(t,e,o),cy:hs(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};fs.props=["radius","centerX","centerY","position","type"],fs.compatConfig={MODE:3};const ps=fs,vs=(0,i.pM)({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:r,edgeUpdaterRadius:a,emits:l,nodesSelectionActive:u,noPanClassName:s,getEdgeTypes:c,removeSelectedEdges:d,findEdge:h,findNode:f,isValidConnection:p,multiSelectionActive:v,disableKeyboardA11y:g,elementsSelectable:m,edgesUpdatable:y,edgesFocusable:w,hooks:_}=Yu(),b=(0,i.EW)(()=>h(e.id)),{emit:x,on:E}=$l(b.value,l),k=(0,i.WQ)(Cl),S=(0,i.nI)(),N=(0,o.KR)(!1),M=(0,o.KR)(!1),C=(0,o.KR)(""),I=(0,o.KR)(null),A=(0,o.KR)("source"),$=(0,o.KR)(null),T=(0,o.lW)(()=>"undefined"===typeof b.value.selectable?m.value:b.value.selectable),B=(0,o.lW)(()=>"undefined"===typeof b.value.updatable?y.value:b.value.updatable),P=(0,o.lW)(()=>"undefined"===typeof b.value.focusable?w.value:b.value.focusable);(0,i.Gt)(Nl,e.id),(0,i.Gt)(Ml,$);const z=(0,i.EW)(()=>b.value.class instanceof Function?b.value.class(b.value):b.value.class),R=(0,i.EW)(()=>b.value.style instanceof Function?b.value.style(b.value):b.value.style),D=(0,i.EW)(()=>{const e=b.value.type||"default",t=null==k?void 0:k[`edge-${e}`];if(t)return t;let n=b.value.template??c.value[e];if("string"===typeof n&&S){const t=Object.keys(S.appContext.components);t&&t.includes(e)&&(n=(0,i.g2)(e,!1))}return n&&"string"!==typeof n?n:(l.error(new Fa(Ga.EDGE_TYPE_MISSING,n)),!1)}),{handlePointerDown:O}=Pl({nodeId:C,handleId:I,type:A,isValidConnection:p,edgeUpdaterType:A,onEdgeUpdate:L,onEdgeUpdateEnd:W});return()=>{const n=f(b.value.source),o=f(b.value.target),u="pathOptions"in b.value?b.value.pathOptions:{};if(!n&&!o)return l.error(new Fa(Ga.EDGE_SOURCE_TARGET_MISSING,b.value.id,b.value.source,b.value.target)),null;if(!n)return l.error(new Fa(Ga.EDGE_SOURCE_MISSING,b.value.id,b.value.source)),null;if(!o)return l.error(new Fa(Ga.EDGE_TARGET_MISSING,b.value.id,b.value.target)),null;if(!b.value||b.value.hidden||n.hidden||o.hidden)return null;let d;d=r.value===Er.Strict?n.handleBounds.source:[...n.handleBounds.source||[],...n.handleBounds.target||[]];const h=La(d,b.value.sourceHandle);let p;p=r.value===Er.Strict?o.handleBounds.target:[...o.handleBounds.target||[],...o.handleBounds.source||[]];const v=La(p,b.value.targetHandle),g=(null==h?void 0:h.position)||_r.Bottom,m=(null==v?void 0:v.position)||_r.Top,{x:y,y:w}=Xa(n,h,g),{x:x,y:k}=Xa(o,v,m);return b.value.sourceX=y,b.value.sourceY=w,b.value.targetX=x,b.value.targetY=k,(0,i.h)("g",{ref:$,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${!1===D.value?"default":b.value.type||"default"}`,s.value,z.value,{updating:N.value,selected:b.value.selected,animated:b.value.animated,inactive:!T.value&&!_.value.edgeClick.hasListeners()}],tabIndex:P.value?0:void 0,"aria-label":null===b.value.ariaLabel?void 0:b.value.ariaLabel??`Edge from ${b.value.source} to ${b.value.target}`,"aria-describedby":P.value?`${Rr}-${t}`:void 0,"aria-roledescription":"edge",role:P.value?"group":"img",...b.value.domAttributes,onClick:G,onContextmenu:Y,onDblclick:F,onMouseenter:U,onMousemove:K,onMouseleave:j,onKeyDown:P.value?Q:void 0},[M.value?null:(0,i.h)(!1===D.value?c.value.default:D.value,{id:e.id,sourceNode:n,targetNode:o,source:b.value.source,target:b.value.target,type:b.value.type,updatable:B.value,selected:b.value.selected,animated:b.value.animated,label:b.value.label,labelStyle:b.value.labelStyle,labelShowBg:b.value.labelShowBg,labelBgStyle:b.value.labelBgStyle,labelBgPadding:b.value.labelBgPadding,labelBgBorderRadius:b.value.labelBgBorderRadius,data:b.value.data,events:{...b.value.events,...E},style:R.value,markerStart:`url('#${wa(b.value.markerStart,t)}')`,markerEnd:`url('#${wa(b.value.markerEnd,t)}')`,sourcePosition:g,targetPosition:m,sourceX:y,sourceY:w,targetX:x,targetY:k,sourceHandleId:b.value.sourceHandle,targetHandleId:b.value.targetHandle,interactionWidth:b.value.interactionWidth,...u}),["source"===B.value||!0===B.value?[(0,i.h)("g",{onMousedown:Z,onMouseenter:V,onMouseout:X},(0,i.h)(ps,{position:g,centerX:y,centerY:w,radius:a.value,type:"source","data-type":"source"}))]:null,"target"===B.value||!0===B.value?[(0,i.h)("g",{onMousedown:q,onMouseenter:V,onMouseout:X},(0,i.h)(ps,{position:m,centerX:x,centerY:k,radius:a.value,type:"target","data-type":"target"}))]:null]])};function V(){N.value=!0}function X(){N.value=!1}function L(e,t){x.update({event:e,edge:b.value,connection:t})}function W(e){x.updateEnd({event:e,edge:b.value}),M.value=!1}function H(e,t){0===e.button&&(M.value=!0,C.value=t?b.value.target:b.value.source,I.value=(t?b.value.targetHandle:b.value.sourceHandle)??null,A.value=t?"target":"source",x.updateStart({event:e,edge:b.value}),O(e))}function G(e){var t;const o={event:e,edge:b.value};T.value&&(u.value=!1,b.value.selected&&v.value?(d([b.value]),null==(t=$.value)||t.blur()):n([b.value])),x.click(o)}function Y(e){x.contextMenu({event:e,edge:b.value})}function F(e){x.doubleClick({event:e,edge:b.value})}function U(e){x.mouseEnter({event:e,edge:b.value})}function K(e){x.mouseMove({event:e,edge:b.value})}function j(e){x.mouseLeave({event:e,edge:b.value})}function Z(e){H(e,!0)}function q(e){H(e,!1)}function Q(t){var o;if(!g.value&&Or.includes(t.key)&&T.value){const i="Escape"===t.key;i?(null==(o=$.value)||o.blur(),d([h(e.id)])):n([h(e.id)])}}}}),gs=vs,ms=(0,i.pM)({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:o,connectionEndHandle:r,connectionPosition:a,connectionLineType:l,connectionLineStyle:u,connectionLineOptions:s,connectionStatus:c,viewport:d,findNode:h}=Yu(),f=null==(e=(0,i.WQ)(Cl))?void 0:e["connection-line"],p=(0,i.EW)(()=>{var e;return h(null==(e=o.value)?void 0:e.nodeId)}),v=(0,i.EW)(()=>{var e;return h(null==(e=r.value)?void 0:e.nodeId)??null}),g=(0,i.EW)(()=>({x:(a.value.x-d.value.x)/d.value.zoom,y:(a.value.y-d.value.y)/d.value.zoom})),m=(0,i.EW)(()=>s.value.markerStart?`url(#${wa(s.value.markerStart,t)})`:""),y=(0,i.EW)(()=>s.value.markerEnd?`url(#${wa(s.value.markerEnd,t)})`:"");return()=>{var e,t,a;
1if(!p.value||!o.value)return null;const d=o.value.id,h=o.value.type,w=p.value.handleBounds;let _=(null==w?void 0:w[h])??[];if(n.value===Er.Loose){const e=(null==w?void 0:w["source"===h?"target":"source"])??[];_=[..._,...e]}if(!_)return null;const b=(d?_.find(e=>e.id===d):_[0])??null,x=(null==b?void 0:b.position)??_r.Top,{x:E,y:k}=Xa(p.value,b,x);let S=null;v.value&&(S=n.value===Er.Strict?(null==(e=v.value.handleBounds["source"===h?"target":"source"])?void 0:e.find(e=>{var t;return e.id===(null==(t=r.value)?void 0:t.id)}))||null:(null==(t=[...v.value.handleBounds.source??[],...v.value.handleBounds.target??[]])?void 0:t.find(e=>{var t;return e.id===(null==(t=r.value)?void 0:t.id)}))||null);const N=(null==(a=r.value)?void 0:a.position)??(x?sl[x]:null);if(!x||!N)return null;const M=l.value??s.value.type??xr.Bezier;let C="";const I={sourceX:E,sourceY:k,sourcePosition:x,targetX:g.value.x,targetY:g.value.y,targetPosition:N};return M===xr.Bezier?[C]=bu(I):M===xr.Step?[C]=Iu({...I,borderRadius:0}):M===xr.SmoothStep?[C]=Iu(I):M===xr.SimpleBezier?[C]=Eu(I):C=`M${E},${k} ${g.value.x},${g.value.y}`,(0,i.h)("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},(0,i.h)("g",{class:"vue-flow__connection"},f?(0,i.h)(f,{sourceX:E,sourceY:k,sourcePosition:x,targetX:g.value.x,targetY:g.value.y,targetPosition:N,sourceNode:p.value,sourceHandle:b,targetNode:v.value,targetHandle:S,markerEnd:y.value,markerStart:m.value,connectionStatus:c.value}):(0,i.h)("path",{d:C,class:[s.value.class,c.value,"vue-flow__connection-path"],style:{...u.value,...s.value.style},"marker-end":y.value,"marker-start":m.value})))}}}),ys=ms,ws=["id","markerWidth","markerHeight","markerUnits","orient"],_s={name:"MarkerType",compatConfig:{MODE:3}},bs=(0,i.pM)({..._s,props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(e,t)=>((0,i.uX)(),(0,i.CE)("marker",{id:e.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${e.width}`,markerHeight:`${e.height}`,markerUnits:e.markerUnits,orient:e.orient},[e.type===(0,o.R1)(kr).ArrowClosed?((0,i.uX)(),(0,i.CE)("polyline",{key:0,style:(0,r.Tr)({stroke:e.color,fill:e.color,strokeWidth:e.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):(0,i.Q3)("",!0),e.type===(0,o.R1)(kr).Arrow?((0,i.uX)(),(0,i.CE)("polyline",{key:1,style:(0,r.Tr)({stroke:e.color,strokeWidth:e.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):(0,i.Q3)("",!0)],8,ws))}}),xs={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},Es={name:"MarkerDefinitions",compatConfig:{MODE:3}},ks=(0,i.pM)({...Es,setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:r}=Yu(),a=(0,i.EW)(()=>{const e=new Set,i=[],a=n=>{if(n){const o=wa(n,t);e.has(o)||("object"===typeof n?i.push({...n,id:o,color:n.color||r.value}):i.push({id:o,color:r.value,type:n}),e.add(o))}};for(const t of[o.value.markerEnd,o.value.markerStart])a(t);for(const t of n.value)for(const e of[t.markerStart,t.markerEnd])a(e);return i.sort((e,t)=>e.id.localeCompare(t.id))});return(e,t)=>((0,i.uX)(),(0,i.CE)("svg",xs,[(0,i.Lk)("defs",null,[((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)(a.value,e=>((0,i.uX)(),(0,i.Wv)(bs,{id:e.id,key:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,"stroke-width":e.strokeWidth,orient:e.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),Ss={name:"Edges",compatConfig:{MODE:3}},Ns=(0,i.pM)({...Ss,setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:a}=Yu();return(e,l)=>((0,i.uX)(),(0,i.CE)(i.FK,null,[(0,i.bF)(ks),((0,i.uX)(!0),(0,i.CE)(i.FK,null,(0,i.pI)((0,o.R1)(n),e=>((0,i.uX)(),(0,i.CE)("svg",{key:e.id,class:"vue-flow__edges vue-flow__container",style:(0,r.Tr)({zIndex:(0,o.R1)(Ha)(e,(0,o.R1)(t),(0,o.R1)(a))})},[(0,i.bF)((0,o.R1)(gs),{id:e.id},null,8,["id"])],4))),128)),(0,i.bF)((0,o.R1)(ys))],64))}}),Ms=(0,i.pM)({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:r,nodesSelectionActive:a,multiSelectionActive:l,emits:u,removeSelectedNodes:s,addSelectedNodes:c,updateNodeDimensions:d,onUpdateNodeInternals:h,getNodeTypes:f,nodeExtent:p,elevateNodesOnSelect:v,disableKeyboardA11y:g,ariaLiveMessage:m,snapToGri
1d:y,snapGrid:w,nodeDragThreshold:_,nodesDraggable:x,elementsSelectable:E,nodesConnectable:k,nodesFocusable:S,hooks:N}=Yu(),M=(0,o.KR)(null);(0,i.Gt)(Sl,M),(0,i.Gt)(kl,e.id);const C=(0,i.WQ)(Cl),I=(0,i.nI)(),A=Vl(),{node:$,parentNode:T}=Rl(e.id),{emit:B,on:P}=Ol($,u),z=(0,o.lW)(()=>"undefined"===typeof $.draggable?x.value:$.draggable),R=(0,o.lW)(()=>"undefined"===typeof $.selectable?E.value:$.selectable),D=(0,o.lW)(()=>"undefined"===typeof $.connectable?k.value:$.connectable),O=(0,o.lW)(()=>"undefined"===typeof $.focusable?S.value:$.focusable),V=(0,i.EW)(()=>R.value||z.value||N.value.nodeClick.hasListeners()||N.value.nodeDoubleClick.hasListeners()||N.value.nodeMouseEnter.hasListeners()||N.value.nodeMouseMove.hasListeners()||N.value.nodeMouseLeave.hasListeners()),X=(0,o.lW)(()=>!!$.dimensions.width&&!!$.dimensions.height),L=(0,i.EW)(()=>{const e=$.type||"default",t=null==C?void 0:C[`node-${e}`];if(t)return t;let n=$.template||f.value[e];if("string"===typeof n&&I){const t=Object.keys(I.appContext.components);t&&t.includes(e)&&(n=(0,i.g2)(e,!1))}return n&&"string"!==typeof n?n:(u.error(new Fa(Ga.NODE_TYPE_MISSING,n)),!1)}),W=Il({id:e.id,el:M,disabled:()=>!z.value,selectable:R,dragHandle:()=>$.dragHandle,onStart(e){B.dragStart(e)},onDrag(e){B.drag(e)},onStop(e){B.dragStop(e)},onClick(e){J(e)}}),H=(0,i.EW)(()=>$.class instanceof Function?$.class($):$.class),G=(0,i.EW)(()=>{const e=($.style instanceof Function?$.style($):$.style)||{},t=$.width instanceof Function?$.width($):$.width,n=$.height instanceof Function?$.height($):$.height;return!e.width&&t&&(e.width="string"===typeof t?t:`${t}px`),!e.height&&n&&(e.height="string"===typeof n?n:`${n}px`),e}),Y=(0,o.lW)(()=>Number($.zIndex??G.value.zIndex??0));return h(t=>{!t.includes(e.id)&&t.length||U()}),(0,i.sV)(()=>{(0,i.wB)(()=>$.hidden,(t=!1,n,o)=>{!t&&M.value&&(e.resizeObserver.observe(M.value),o(()=>{M.value&&e.resizeObserver.unobserve(M.value)}))},{immediate:!0,flush:"post"})}),(0,i.wB)([()=>$.type,()=>$.sourcePosition,()=>$.targetPosition],()=>{(0,i.dY)(()=>{d([{id:e.id,nodeElement:M.value,forceUpdate:!0}])})}),(0,i.wB)([()=>$.position.x,()=>$.position.y,()=>{var e;return null==(e=T.value)?void 0:e.computedPosition.x},()=>{var e;return null==(e=T.value)?void 0:e.computedPosition.y},()=>{var e;return null==(e=T.value)?void 0:e.computedPosition.z},Y,()=>$.selected,()=>$.dimensions.height,()=>$.dimensions.width,()=>{var e;return null==(e=T.value)?void 0:e.dimensions.height},()=>{var e;return null==(e=T.value)?void 0:e.dimensions.width}],([e,t,n,o,i,r])=>{const a={x:e,y:t,z:r+(v.value&&$.selected?1e3:0)};$.computedPosition="undefined"!==typeof n&&"undefined"!==typeof o?ma({x:n,y:o,z:i},a):a},{flush:"post",immediate:!0}),(0,i.wB)([()=>$.extent,p],([e,t],[n,o])=>{e===n&&t===o||F()}),"parent"===$.extent||"object"===typeof $.extent&&"range"in $.extent&&"parent"===$.extent.range?b(()=>X).toBe(!0).then(F):F(),()=>$.hidden?null:(0,i.h)("div",{ref:M,"data-id":$.id,class:["vue-flow__node",`vue-flow__node-${!1===L.value?"default":$.type||"default"}`,{[n.value]:z.value,dragging:null==W?void 0:W.value,draggable:z.value,selected:$.selected,selectable:R.value,parent:$.isParent},H.value],style:{visibility:X.value?"visible":"hidden",zIndex:$.computedPosition.z??Y.value,transform:`translate(${$.computedPosition.x}px,${$.computedPosition.y}px)`,pointerEvents:V.value?"all":"none",...G.value},tabIndex:O.value?0:void 0,role:O.value?"group":void 0,"aria-describedby":g.value?void 0:`${zr}-${t}`,"aria-label":$.ariaLabel,"aria-roledescription":"node",...$.domAttributes,onMouseenter:K,onMousemove:j,onMouseleave:Z,onContextmenu:q,onClick:J,onDblclick:Q,onKeydown:ee},[(0,i.h)(!1===L.value?f.value.default:L.value,{id:$.id,type:$.type,data:$.data,events:{...$.events,...P},selected:$.selected,resizing:$.resizing,dragging:W.value,connectable:D.value,position:$.computedPosition,dimensions:$.dimensions,isValidTargetPos:$.isValidTargetPos,isValidSourcePos:$.isValidSourcePos,parent:$.parentNode,parentNodeId:$.parentNode,zIndex:$.computedPosition.z??Y.value,targetPosition:$.targetPosition,sourcePosition:$.sourcePosition,label:$.label,dragHandle:$.dragHandle,onUpdateNodeInternals:U})]);function F(){const e=$.computedPosition,{computedPosition:t,position:n}=Va($,y.value?Qa(e,w.value):e,u.error,p.value,T.value);$.computedPosition.x===t.x&&$.computedPosition.y===t.y||($.computedPosition={...$.computedPosition,...t}),$.position.x===n.x&&$.position.y===n.y||($.position=n)}function U(){M.value&&d([{id:e.id,nodeElement:M.value,forceUpdate:!0}])}function K(e){(null==W?void 0:W.value)||B.mouseEnter({event:e,node:$})}function j(e){(null==W?void 0:W.value)||B.mouseMove({event:e,node:$})}function Z(e){(null==W?void 0:W.value)||B.mouseLeave({event:e,node:$})}function q(e){return B.contextMenu({event:e,node:$})}function Q(e){return B.doubleClick({event:e,node:$})}function J(e){R.value&&(!r.value||!z.value||_.value>0)&&pl($,l.value,c,s,a,!1,M.value),B.click({event:e,node:$})}
1function ee(e){if(!Ir(e)&&!g.value)if(Or.includes(e.key)&&R.value){const t="Escape"===e.key;pl($,l.value,c,s,a,t,M.value)}else z.value&&$.selected&&Vr[e.key]&&(e.preventDefault(),m.value=`Moved selected node ${e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~$.position.x}, y: ${~~$.position.y}`,A({x:Vr[e.key].x,y:Vr[e.key].y},e.shiftKey))}}}),Cs=Ms,Is={height:"0",width:"0"},As={name:"EdgeLabelRenderer",compatConfig:{MODE:3}};function $s(e={includeHiddenNodes:!1}){const{nodes:t}=Yu();return(0,i.EW)(()=>{if(0===t.value.length)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&(void 0===(null==n?void 0:n.handleBounds)||0===n.dimensions.width||0===n.dimensions.height))return!1;return!0})}const Ts={class:"vue-flow__nodes vue-flow__container"},Bs={name:"Nodes",compatConfig:{MODE:3}},Ps=(0,i.pM)({...Bs,setup(e){const{getNodes:t,updateNodeDimensions:n,emits:r}=Yu(),a=$s(),l=(0,o.KR)();return(0,i.wB)(a,e=>{e&&(0,i.dY)(()=>{r.nodesInitialized(t.value)})},{immediate:!0}),(0,i.sV)(()=>{l.value=new ResizeObserver(e=>{const t=e.map(e=>{const t=e.target.getAttribute("data-id");return{id:t,nodeElement:e.target,forceUpdate:!0}});(0,i.dY)(()=>n(t))})}),(0,i.xo)(()=>{var e;return null==(e=l.value)?void 0:e.disconnect()}),(e,n)=>((0,i.uX)(),(0,i.CE)("div",Ts,[l.value?((0,i.uX)(!0),(0,i.CE)(i.FK,{key:0},(0,i.pI)((0,o.R1)(t),(e,t,n,r)=>{const a=[e.id];if(r&&r.key===e.id&&(0,i.Bs)(r,a))return r;const u=((0,i.uX)(),(0,i.Wv)((0,o.R1)(Cs),{id:e.id,key:e.id,"resize-observer":l.value},null,8,["id","resize-observer"]));return u.memo=a,u},n,0),128)):(0,i.Q3)("",!0)]))}});function zs(){const{emits:e}=Yu();(0,i.sV)(()=>{if(hl()){const t=document.querySelector(".vue-flow__pane");t&&"1"!==window.getComputedStyle(t).zIndex&&e.error(new Fa(Ga.MISSING_STYLES))}})}const Rs=(0,i.Lk)("div",{class:"vue-flow__edge-labels"},null,-1),Ds={name:"VueFlow",compatConfig:{MODE:3}},Os=(0,i.pM)({...Ds,props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const r=e,a=(0,i.Ht)(),l=C(r,"modelValue",n),u=C(r,"nodes",n),s=C(r,"edges",n),c=Yu(r),d=Fl({modelValue:l,nodes:u,edges:s},r,c);return Kl(n,c.hooks),cs(),zs(),(0,i.Gt)(Cl,a),(0,i.hi)(d),t(c),(e,t)=>((0,i.uX)(),(0,i.CE)("div",{ref:(0,o.R1)(c).vueFlowRef,class:"vue-flow"},[(0,i.bF)(is,null,{default:(0,i.k6)(()=>[(0,i.bF)(Ns),Rs,(0,i.bF)(Ps),(0,i.RG)(e.$slots,"zoom-pane")]),_:3}),(0,i.RG)(e.$slots,"default"),(0,i.bF)(ss)],512))}}),Vs={name:"Panel",compatConfig:{MODE:3}},Xs=(0,i.pM)({...Vs,props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Yu(),a=(0,i.EW)(()=>`${t.position}`.split("-"));return(e,t)=>((0,i.uX)(),(0,i.CE)("div",{class:(0,r.C4)(["vue-flow__panel",a.value]),style:(0,r.Tr)({pointerEvents:(0,o.R1)(n)?"none":"all"})},[(0,i.RG)(e.$slots,"default")],6))}})},76722:function(e,t,n){n.d(t,{H:function(){return D}});var o=n(20641),i=n(50953),r=n(75408);const a={name:"ControlButton",compatConfig:{MODE:3}},l=(e,t)=>
1{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},u={type:"button",class:"vue-flow__controls-button"};function s(e,t,n,i,r,a){return(0,o.uX)(),(0,o.CE)("button",u,[(0,o.RG)(e.$slots,"default")])}const c=l(a,[["render",s]]),d={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},h=(0,o.Lk)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1),f=[h];function p(e,t){return(0,o.uX)(),(0,o.CE)("svg",d,f)}const v={render:p},g={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},m=(0,o.Lk)("path",{d:"M0 0h32v4.2H0z"},null,-1),y=[m];function w(e,t){return(0,o.uX)(),(0,o.CE)("svg",g,y)}const _={render:w},b={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},x=(0,o.Lk)("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 0 0 27.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.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1),E=[x];function k(e,t){return(0,o.uX)(),(0,o.CE)("svg",b,E)}const S={render:k},N={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},M=(0,o.Lk)("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 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-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"},null,-1),C=[M];function I(e,t){return(0,o.uX)(),(0,o.CE)("svg",N,C)}const A={render:I},$={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T=(0,o.Lk)("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 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1),B=[T];function P(e,t){return(0,o.uX)(),(0,o.CE)("svg",$,B)}const z={render:P},R={name:"Controls",compatConfig:{MODE:3}},D=(0,o.pM)({...R,props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>r._3.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const{nodesDraggable:n,nodesConnectable:a,elementsSelectable:l,setInteractive:u,zoomIn:s,zoomOut:d,fitView:h,viewport:f,minZoom:p,maxZoom:g}=(0,r.Id)(),m=(0,i.lW)(()=>n.value||a.value||l.value),y=(0,i.lW)(()=>f.value.zoom<=p.value),w=(0,i.lW)(()=>f.value.zoom>=g.value);function b(){s(),t("zoomIn")}function x(){d(),t("zoomOut")}function E(){h(e.fitViewParams),t("fitView")}function k(){u(!m.value),t("interactionChange",!m.value)}return(e,t)=>((0,o.uX)(),(0,o.Wv)((0,i.R1)(r.Zk),{class:"vue-flow__controls",position:e.position},{default:(0,o.k6)(()=>[(0,o.RG)(e.$slots,"top"),e.showZoom?((0,o.uX)(),(0,o.CE)(o.FK,{key:0},[(0,o.RG)(e.$slots,"control-zoom-in",{},()=>[(0,o.bF)(c,{class:"vue-flow__controls-zoomin",disabled:w.value,onClick:b},{default:(0,o.k6)(()=>[(0,o.RG)(e.$slots,"icon-zoom-in",{},()=>[((0,o.uX)(),(0,o.Wv)((0,o.$y)((0,i.R1)(v))))])]),_:3},8,["disabled"])]),(0,o.RG)(e.$slots,"control-zoom-out",{},()=>[(0,o.bF)(c,{class:"vue-flow__controls-zoomout",disabled:y.value,onClick:x},{default:(0,o.k6)(()=>[(0,o.RG)(e.$slots,"icon-zoom-out",{},()=>[((0,o.uX)(),(0,o.Wv)((0,o.$y)((0,i.R1)(_))))])]),_:3},8,["disabled"])])],64)):(0,o.Q3)("",!0),e.showFitView?(0,o.RG)(e.$slots,"control-fit-view",{key:1},()=>[(0,o.bF)(c,{class:"vue-flow__controls-fitview",onClick:E},{default:(0,o.k6)(()=>[(0,o.RG)(e.$slots,"icon-fit-view",{},()=>[((0,o.uX)(),(0,o.Wv)((0,o.$y)((0,i.R1)(S))))])]),_:3})]):(0,o.Q3)("",!0),e.showInteractive?(0,o.RG)(e.$slots,"control-interactive",{key:2},()=>[e.showInteractive?((0,o.uX)(),(0,o.Wv)(c,{key:0,class:"vue-flow__controls-interactive",onClick:k},{default:(0,o.k6)(()=>[m.value?(0,o.RG)(e.$slots,"icon-unlock",{key:0}
1,()=>[((0,o.uX)(),(0,o.Wv)((0,o.$y)((0,i.R1)(z))))]):(0,o.Q3)("",!0),m.value?(0,o.Q3)("",!0):(0,o.RG)(e.$slots,"icon-lock",{key:1},()=>[((0,o.uX)(),(0,o.Wv)((0,o.$y)((0,i.R1)(A))))])]),_:3})):(0,o.Q3)("",!0)]):(0,o.Q3)("",!0),(0,o.RG)(e.$slots,"default")]),_:3},8,["position"]))}})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.